From f3a7de0d03c2395a240382e4de749d51214a840b Mon Sep 17 00:00:00 2001 From: Kumar Gala Date: Fri, 29 Jul 2011 08:35:16 -0500 Subject: Add initial README Signed-off-by: Kumar Gala --- meta-fsl-ppc/README | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 meta-fsl-ppc/README diff --git a/meta-fsl-ppc/README b/meta-fsl-ppc/README new file mode 100644 index 00000000..31ccba05 --- /dev/null +++ b/meta-fsl-ppc/README @@ -0,0 +1,4 @@ +meta-fsl-ppc +========== + +This is the location for Freescale PowerPC maintained BSP's -- cgit v1.2.3-54-g00ecf From 2d2e083bd39cf65543ced738c019b34e38c5ee38 Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Tue, 4 Oct 2011 12:46:59 -0500 Subject: Initial commit for FSL Machines, Images, and Distro settings Signed-off-by: Matthew McClintock --- meta-fsl-ppc/conf/distro/fsl.conf | 49 ++++++++++++++++++++++++++++++ meta-fsl-ppc/conf/layer.conf | 11 +++++++ meta-fsl-ppc/conf/machine/e500mc.inc | 20 ++++++++++++ meta-fsl-ppc/conf/machine/e500v2.inc | 19 ++++++++++++ meta-fsl-ppc/conf/machine/e5500-64b.inc | 20 ++++++++++++ meta-fsl-ppc/conf/machine/e5500.inc | 20 ++++++++++++ meta-fsl-ppc/conf/machine/mpc8572ds.conf | 7 +++++ meta-fsl-ppc/conf/machine/p1020rdb.conf | 7 +++++ meta-fsl-ppc/conf/machine/p1022ds.conf | 7 +++++ meta-fsl-ppc/conf/machine/p2020ds.conf | 10 ++++++ meta-fsl-ppc/conf/machine/p3041ds.conf | 7 +++++ meta-fsl-ppc/conf/machine/p4080ds.conf | 9 ++++++ meta-fsl-ppc/conf/machine/p5020ds-64b.conf | 7 +++++ meta-fsl-ppc/conf/machine/p5020ds.conf | 7 +++++ meta-fsl-ppc/images/fsl-image-lsb-sdk.bb | 11 +++++++ meta-fsl-ppc/images/fsl-image-lsb.bb | 9 ++++++ meta-fsl-ppc/images/fsl-image-minimal.bb | 15 +++++++++ 17 files changed, 235 insertions(+) create mode 100644 meta-fsl-ppc/conf/distro/fsl.conf create mode 100644 meta-fsl-ppc/conf/layer.conf create mode 100644 meta-fsl-ppc/conf/machine/e500mc.inc create mode 100644 meta-fsl-ppc/conf/machine/e500v2.inc create mode 100644 meta-fsl-ppc/conf/machine/e5500-64b.inc create mode 100644 meta-fsl-ppc/conf/machine/e5500.inc create mode 100644 meta-fsl-ppc/conf/machine/mpc8572ds.conf create mode 100644 meta-fsl-ppc/conf/machine/p1020rdb.conf create mode 100644 meta-fsl-ppc/conf/machine/p1022ds.conf create mode 100644 meta-fsl-ppc/conf/machine/p2020ds.conf create mode 100644 meta-fsl-ppc/conf/machine/p3041ds.conf create mode 100644 meta-fsl-ppc/conf/machine/p4080ds.conf create mode 100644 meta-fsl-ppc/conf/machine/p5020ds-64b.conf create mode 100644 meta-fsl-ppc/conf/machine/p5020ds.conf create mode 100644 meta-fsl-ppc/images/fsl-image-lsb-sdk.bb create mode 100644 meta-fsl-ppc/images/fsl-image-lsb.bb create mode 100644 meta-fsl-ppc/images/fsl-image-minimal.bb diff --git a/meta-fsl-ppc/conf/distro/fsl.conf b/meta-fsl-ppc/conf/distro/fsl.conf new file mode 100644 index 00000000..8b35b052 --- /dev/null +++ b/meta-fsl-ppc/conf/distro/fsl.conf @@ -0,0 +1,49 @@ +DISTRO = "fsl" +DISTRO_NAME = "Yocto (Built by Poky 5.0)" +DISTRO_VERSION = "1.0+snapshot-${DATE}" +SDK_VENDOR = "-fslsdk" +SDK_VERSION := "${@'${DISTRO_VERSION}'.replace('snapshot-${DATE}','snapshot')}" + +MAINTAINER = "FSL " + +TARGET_VENDOR = "-fsl" + +LOCALCONF_VERSION = "1" + +DISTRO_FEATURES_append = " largefile opengl" + +SDK_NAME = "${DISTRO}-${TCLIBC}-${SDK_ARCH}-${TARGET_ARCH}" +SDKPATH = "/opt/${DISTRO}/${SDK_VERSION}" + +DISTRO_EXTRA_RDEPENDS += "task-core-boot" +DISTRO_EXTRA_RRECOMMENDS += "" + +POKYQEMUDEPS = "${@base_contains("INCOMPATIBLE_LICENSE", "GPLv3", "", "qemu-config",d)}" +DISTRO_EXTRA_RDEPENDS_append_qemuarm = " ${POKYQEMUDEPS}" +DISTRO_EXTRA_RDEPENDS_append_qemumips = " ${POKYQEMUDEPS}" +DISTRO_EXTRA_RDEPENDS_append_qemuppc = " ${POKYQEMUDEPS}" +DISTRO_EXTRA_RDEPENDS_append_qemux86 = " ${POKYQEMUDEPS}" +DISTRO_EXTRA_RDEPENDS_append_qemux86-64 = " ${POKYQEMUDEPS}" + +TCLIBCAPPEND = "" + +QEMU_TARGETS ?= "arm i386 mips mipsel ppc x86_64" +# Other QEMU_TARGETS "mips64 mips64el sh4" + +PREMIRRORS ?= "\ +bzr://.*/.* http://autobuilder.yoctoproject.org/sources/ \n \ +cvs://.*/.* http://autobuilder.yoctoproject.org/sources/ \n \ +git://.*/.* http://autobuilder.yoctoproject.org/sources/ \n \ +hg://.*/.* http://autobuilder.yoctoproject.org/sources/ \n \ +osc://.*/.* http://autobuilder.yoctoproject.org/sources/ \n \ +p4://.*/.* http://autobuilder.yoctoproject.org/sources/ \n \ +svk://.*/.* http://autobuilder.yoctoproject.org/sources/ \n \ +svn://.*/.* http://autobuilder.yoctoproject.org/sources/ \n" + +MIRRORS =+ "\ +ftp://.*/.* http://autobuilder.yoctoproject.org/sources/ \n \ +http://.*/.* http://autobuilder.yoctoproject.org/sources/ \n \ +https://.*/.* http://autobuilder.yoctoproject.org/sources/ \n" + +IMAGE_CLASSES = "image_types_uboot" + diff --git a/meta-fsl-ppc/conf/layer.conf b/meta-fsl-ppc/conf/layer.conf new file mode 100644 index 00000000..b469c670 --- /dev/null +++ b/meta-fsl-ppc/conf/layer.conf @@ -0,0 +1,11 @@ +# We have a packages directory, add to BBFILES +BBPATH := "${BBPATH}:${LAYERDIR}" + +BBFILES += "${LAYERDIR}/recipes-*/*/*.bb*" +BBFILES += "${LAYERDIR}/images/*.bb" + +BBFILE_COLLECTIONS += "fsl" +BBFILE_PATTERN_fsl := "^${LAYERDIR}/" +BBFILE_PRIORITY_fsl = "5" + +BB_ENV_EXTRAWHITE := "KSRC USRC" diff --git a/meta-fsl-ppc/conf/machine/e500mc.inc b/meta-fsl-ppc/conf/machine/e500mc.inc new file mode 100644 index 00000000..fbd78301 --- /dev/null +++ b/meta-fsl-ppc/conf/machine/e500mc.inc @@ -0,0 +1,20 @@ +TARGET_FPU = "hard" + +require conf/machine/include/tune-ppce500mc.inc + +MACHINE_FEATURES = "kernel26 keyboard pci ext2 ext3 serial" +MACHINE_FEATURES_RRECOMMENDS = "" + + +PREFERRED_PROVIDER_virtual/kernel = "linux-qoriq-sdk" +PREFERRED_VERSION_virtual/kernel = "3.0.1" +PREFERRED_PROVIDER_linux-libc-headers = "linux-qoriq-sdk-headers" + +KERNEL_IMAGETYPE = "uImage" +SERIAL_CONSOLE = "115200 ttyS0" +IMAGE_FSTYPES = "tar.gz ext2.gz" +# disable the images below for now +# ext2.bz2 ext2.lzma \ +# ext2.gz.u-boot ext2.bz2.u-boot ext2.lzma.u-boot" + +MACHINEOVERRIDES .= ":e500mc" diff --git a/meta-fsl-ppc/conf/machine/e500v2.inc b/meta-fsl-ppc/conf/machine/e500v2.inc new file mode 100644 index 00000000..165f4c5a --- /dev/null +++ b/meta-fsl-ppc/conf/machine/e500v2.inc @@ -0,0 +1,19 @@ +TARGET_FPU = "ppc-efd" + +require conf/machine/include/tune-ppce500v2.inc + +MACHINE_FEATURES = "kernel26 pci ext2 ext3 serial" +MACHINE_EXTRA_RRECOMMENDS = "" + +PREFERRED_PROVIDER_virtual/kernel = "linux-qoriq-sdk" +PREFERRED_VERSION_virtual/kernel = "3.0.1" +PREFERRED_PROVIDER_linux-libc-headers = "linux-qoriq-sdk-headers" + +KERNEL_IMAGETYPE = "uImage" +SERIAL_CONSOLE = "115200 ttyS0" +IMAGE_FSTYPES = "tar.gz ext2.gz" +# disable the images below for now +# ext2.bz2 ext2.lzma \ +# ext2.gz.u-boot ext2.bz2.u-boot ext2.lzma.u-boot" + +MACHINEOVERRIDES .= ":e500v2" diff --git a/meta-fsl-ppc/conf/machine/e5500-64b.inc b/meta-fsl-ppc/conf/machine/e5500-64b.inc new file mode 100644 index 00000000..7dca1799 --- /dev/null +++ b/meta-fsl-ppc/conf/machine/e5500-64b.inc @@ -0,0 +1,20 @@ +TARGET_FPU = "hard" + +require conf/machine/include/tune-ppce5500-64b.inc + +MACHINE_FEATURES = "kernel26 keyboard pci ext2 ext3 serial" +MACHINE_FEATURES_RRECOMMENDS = "" + + +PREFERRED_PROVIDER_virtual/kernel = "linux-qoriq-sdk" +PREFERRED_VERSION_virtual/kernel = "3.0.1" +PREFERRED_PROVIDER_linux-libc-headers = "linux-qoriq-sdk-headers" + +KERNEL_IMAGETYPE = "uImage" +SERIAL_CONSOLE = "115200 ttyS0" +IMAGE_FSTYPES = "tar.gz ext2.gz" +# disable the images below for now +# ext2.bz2 ext2.lzma \ +# ext2.gz.u-boot ext2.bz2.u-boot ext2.lzma.u-boot" + +MACHINEOVERRIDES .= ":e5500-64b" diff --git a/meta-fsl-ppc/conf/machine/e5500.inc b/meta-fsl-ppc/conf/machine/e5500.inc new file mode 100644 index 00000000..a833a9a2 --- /dev/null +++ b/meta-fsl-ppc/conf/machine/e5500.inc @@ -0,0 +1,20 @@ +TARGET_FPU = "hard" + +require conf/machine/include/tune-ppce5500-32b.inc + +MACHINE_FEATURES = "kernel26 keyboard pci ext2 ext3 serial" +MACHINE_FEATURES_RRECOMMENDS = "" + + +#PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" +PREFERRED_VERSION_virtual/kernel ?= "3.0.1" +PREFERRED_PROVIDER_linux-libc-headers ?= "linux-qoriq-sdk-headers" + +KERNEL_IMAGETYPE = "uImage" +SERIAL_CONSOLE = "115200 ttyS0" +IMAGE_FSTYPES = "tar.gz ext2.gz" +# disable the images below for now +# ext2.bz2 ext2.lzma \ +# ext2.gz.u-boot ext2.bz2.u-boot ext2.lzma.u-boot" + +MACHINEOVERRIDES .= ":e5500" diff --git a/meta-fsl-ppc/conf/machine/mpc8572ds.conf b/meta-fsl-ppc/conf/machine/mpc8572ds.conf new file mode 100644 index 00000000..e05d9453 --- /dev/null +++ b/meta-fsl-ppc/conf/machine/mpc8572ds.conf @@ -0,0 +1,7 @@ +#@TYPE: Machine +#@DESCRIPTION: Machine configuration for running + +require e500v2.inc + +KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/mpc8572ds.dts" +KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" diff --git a/meta-fsl-ppc/conf/machine/p1020rdb.conf b/meta-fsl-ppc/conf/machine/p1020rdb.conf new file mode 100644 index 00000000..f44bdbd0 --- /dev/null +++ b/meta-fsl-ppc/conf/machine/p1020rdb.conf @@ -0,0 +1,7 @@ +#@TYPE: Machine +#@DESCRIPTION: Machine configuration for running + +require e500v2.inc + +KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p1020rdb.dts" +KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" diff --git a/meta-fsl-ppc/conf/machine/p1022ds.conf b/meta-fsl-ppc/conf/machine/p1022ds.conf new file mode 100644 index 00000000..b7d90194 --- /dev/null +++ b/meta-fsl-ppc/conf/machine/p1022ds.conf @@ -0,0 +1,7 @@ +#@TYPE: Machine +#@DESCRIPTION: Machine configuration for running + +require e500v2.inc + +KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p1022ds.dts" +KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" diff --git a/meta-fsl-ppc/conf/machine/p2020ds.conf b/meta-fsl-ppc/conf/machine/p2020ds.conf new file mode 100644 index 00000000..16868547 --- /dev/null +++ b/meta-fsl-ppc/conf/machine/p2020ds.conf @@ -0,0 +1,10 @@ +#@TYPE: Machine +#@DESCRIPTION: Machine configuration for running + +require e500v2.inc + +KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p2020ds.dts" +KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" + +UBOOT_MACHINES = "P2020DS_SDCARD_config P2020DS_config" +BOOTFORMAT_CONFIG = "config_sram_p2020ds.dat" diff --git a/meta-fsl-ppc/conf/machine/p3041ds.conf b/meta-fsl-ppc/conf/machine/p3041ds.conf new file mode 100644 index 00000000..90b37fe4 --- /dev/null +++ b/meta-fsl-ppc/conf/machine/p3041ds.conf @@ -0,0 +1,7 @@ +#@TYPE: Machine +#@DESCRIPTION: Machine configuration for running + +require e500mc.inc + +KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p3041ds.dts" +KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet32_smp_defconfig" diff --git a/meta-fsl-ppc/conf/machine/p4080ds.conf b/meta-fsl-ppc/conf/machine/p4080ds.conf new file mode 100644 index 00000000..1166f66e --- /dev/null +++ b/meta-fsl-ppc/conf/machine/p4080ds.conf @@ -0,0 +1,9 @@ +#@TYPE: Machine +#@DESCRIPTION: Machine configuration for running + +require e500mc.inc + +KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p4080ds.dts" +KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet32_smp_defconfig" + +UBOOT_MACHINES = "P4080DS_config" diff --git a/meta-fsl-ppc/conf/machine/p5020ds-64b.conf b/meta-fsl-ppc/conf/machine/p5020ds-64b.conf new file mode 100644 index 00000000..2810caff --- /dev/null +++ b/meta-fsl-ppc/conf/machine/p5020ds-64b.conf @@ -0,0 +1,7 @@ +#@TYPE: Machine +#@DESCRIPTION: Machine configuration for running + +require e5500-64b.inc + +KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p5020ds.dts" +KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet64_smp_defconfig" diff --git a/meta-fsl-ppc/conf/machine/p5020ds.conf b/meta-fsl-ppc/conf/machine/p5020ds.conf new file mode 100644 index 00000000..33ef5bb3 --- /dev/null +++ b/meta-fsl-ppc/conf/machine/p5020ds.conf @@ -0,0 +1,7 @@ +#@TYPE: Machine +#@DESCRIPTION: Machine configuration for running + +require e5500.inc + +KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p5020ds.dts" +KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet32_smp_defconfig" diff --git a/meta-fsl-ppc/images/fsl-image-lsb-sdk.bb b/meta-fsl-ppc/images/fsl-image-lsb-sdk.bb new file mode 100644 index 00000000..5e0e7aea --- /dev/null +++ b/meta-fsl-ppc/images/fsl-image-lsb-sdk.bb @@ -0,0 +1,11 @@ +IMAGE_FEATURES += "apps-console-core tools-sdk dev-pkgs ssh-server-openssh" +EXTRA_IMAGE_FEATURES = "tools-debug tools-profile tools-testapps debug-tweaks" + + +IMAGE_INSTALL = "\ + ${POKY_BASE_INSTALL} \ + task-core-basic \ + task-core-lsb \ + " + +inherit core-image diff --git a/meta-fsl-ppc/images/fsl-image-lsb.bb b/meta-fsl-ppc/images/fsl-image-lsb.bb new file mode 100644 index 00000000..22eb7f48 --- /dev/null +++ b/meta-fsl-ppc/images/fsl-image-lsb.bb @@ -0,0 +1,9 @@ +IMAGE_FEATURES += "apps-console-core ssh-server-openssh" + +IMAGE_INSTALL = "\ + ${POKY_BASE_INSTALL} \ + task-core-basic \ + task-core-lsb \ + " + +inherit core-image diff --git a/meta-fsl-ppc/images/fsl-image-minimal.bb b/meta-fsl-ppc/images/fsl-image-minimal.bb new file mode 100644 index 00000000..743e121b --- /dev/null +++ b/meta-fsl-ppc/images/fsl-image-minimal.bb @@ -0,0 +1,15 @@ +# +# Copyright (C) 2007 OpenedHand Ltd. +# +IMAGE_INSTALL = "task-core-boot ${ROOTFS_PKGMANAGE_BOOTSTRAP}" + +IMAGE_LINGUAS = " " + +LICENSE = "MIT" + +inherit core-image + +IMAGE_ROOTFS_SIZE = "8192" + +# remove not needed ipkg informations +ROOTFS_POSTPROCESS_COMMAND += "remove_packaging_data_files ; " -- cgit v1.2.3-54-g00ecf From bd88e75b4fc3638e3412c00dbef230b678d2ca6b Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Tue, 11 Oct 2011 10:07:13 -0500 Subject: Update dtc and git to be included in lsb-sdk image Signed-off-by: Matthew McClintock --- meta-fsl-ppc/images/fsl-image-lsb-sdk.bb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/meta-fsl-ppc/images/fsl-image-lsb-sdk.bb b/meta-fsl-ppc/images/fsl-image-lsb-sdk.bb index 5e0e7aea..964bd30c 100644 --- a/meta-fsl-ppc/images/fsl-image-lsb-sdk.bb +++ b/meta-fsl-ppc/images/fsl-image-lsb-sdk.bb @@ -6,6 +6,8 @@ IMAGE_INSTALL = "\ ${POKY_BASE_INSTALL} \ task-core-basic \ task-core-lsb \ + git \ + dtc \ " inherit core-image -- cgit v1.2.3-54-g00ecf From 250ebdcb6abf15dda275435c762f63df102b92d8 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Fri, 14 Oct 2011 17:07:08 +0000 Subject: define preferred version of u-boot-mkimage-native current preferred version 2009.08 is not available, only 2011.03 2011.06 exists Signed-off-by: Ting Liu --- meta-fsl-ppc/conf/distro/fsl.conf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/meta-fsl-ppc/conf/distro/fsl.conf b/meta-fsl-ppc/conf/distro/fsl.conf index 8b35b052..9f2e8209 100644 --- a/meta-fsl-ppc/conf/distro/fsl.conf +++ b/meta-fsl-ppc/conf/distro/fsl.conf @@ -47,3 +47,5 @@ https://.*/.* http://autobuilder.yoctoproject.org/sources/ \n" IMAGE_CLASSES = "image_types_uboot" +PREFERRED_VERSION_u-boot-mkimage-native_powerpc = "2011.06" + -- cgit v1.2.3-54-g00ecf From bec280fbfadae88e5aee5ebd244174086d4e79c3 Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Tue, 18 Oct 2011 16:37:03 -0500 Subject: Update images and distro information Signed-off-by: Matthew McClintock --- meta-fsl-ppc/conf/distro/fsl.conf | 4 ++-- meta-fsl-ppc/images/fsl-image-lsb-sdk.bb | 3 ++- meta-fsl-ppc/images/fsl-toolchain.bb | 8 ++++++++ 3 files changed, 12 insertions(+), 3 deletions(-) create mode 100644 meta-fsl-ppc/images/fsl-toolchain.bb diff --git a/meta-fsl-ppc/conf/distro/fsl.conf b/meta-fsl-ppc/conf/distro/fsl.conf index 9f2e8209..42d39638 100644 --- a/meta-fsl-ppc/conf/distro/fsl.conf +++ b/meta-fsl-ppc/conf/distro/fsl.conf @@ -1,6 +1,6 @@ DISTRO = "fsl" -DISTRO_NAME = "Yocto (Built by Poky 5.0)" -DISTRO_VERSION = "1.0+snapshot-${DATE}" +DISTRO_NAME = "Yocto (Built by Poky 6.0)" +DISTRO_VERSION = "1.1" SDK_VENDOR = "-fslsdk" SDK_VERSION := "${@'${DISTRO_VERSION}'.replace('snapshot-${DATE}','snapshot')}" diff --git a/meta-fsl-ppc/images/fsl-image-lsb-sdk.bb b/meta-fsl-ppc/images/fsl-image-lsb-sdk.bb index 964bd30c..964f5d5b 100644 --- a/meta-fsl-ppc/images/fsl-image-lsb-sdk.bb +++ b/meta-fsl-ppc/images/fsl-image-lsb-sdk.bb @@ -1,13 +1,14 @@ IMAGE_FEATURES += "apps-console-core tools-sdk dev-pkgs ssh-server-openssh" EXTRA_IMAGE_FEATURES = "tools-debug tools-profile tools-testapps debug-tweaks" - IMAGE_INSTALL = "\ ${POKY_BASE_INSTALL} \ task-core-basic \ task-core-lsb \ git \ dtc \ + flex \ + bison \ " inherit core-image diff --git a/meta-fsl-ppc/images/fsl-toolchain.bb b/meta-fsl-ppc/images/fsl-toolchain.bb new file mode 100644 index 00000000..db8bdf28 --- /dev/null +++ b/meta-fsl-ppc/images/fsl-toolchain.bb @@ -0,0 +1,8 @@ +PR = "r1" + +TOOLCHAIN_OUTPUTNAME ?= "${SDK_NAME}-toolchain-${DISTRO_VERSION}" +require recipes-core/meta/meta-toolchain.bb + +TOOLCHAIN_HOST_TASK = "dtc-nativesdk" + +TOOLCHAIN_NEED_CONFIGSITE_CACHE += "zlib" -- cgit v1.2.3-54-g00ecf From cdf01da4b7fe1c59f608a45b630ff3a5d4e2eca8 Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Tue, 18 Oct 2011 16:46:06 -0500 Subject: Add support for p3060qds Signed-off-by: Matthew McClintock --- meta-fsl-ppc/conf/machine/p3060qds.conf | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 meta-fsl-ppc/conf/machine/p3060qds.conf diff --git a/meta-fsl-ppc/conf/machine/p3060qds.conf b/meta-fsl-ppc/conf/machine/p3060qds.conf new file mode 100644 index 00000000..7cf7ec00 --- /dev/null +++ b/meta-fsl-ppc/conf/machine/p3060qds.conf @@ -0,0 +1,7 @@ +#@TYPE: Machine +#@DESCRIPTION: Machine configuration for running + +require e500mc.inc + +KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p3060qds.dts" +KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet32_smp_defconfig" -- cgit v1.2.3-54-g00ecf From cea2e80f6af90942277441987d8dd7bfe74ef8f1 Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Wed, 19 Oct 2011 02:16:36 -0500 Subject: Change SDK_NAME for fsl distro powerpc and power64 conflict across various TUNES, instead lets name based off the PACKAGE_ARCH (ppce500v2, ppce500mc, etc) Signed-off-by: Matthew McClintock --- meta-fsl-ppc/conf/distro/fsl.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-fsl-ppc/conf/distro/fsl.conf b/meta-fsl-ppc/conf/distro/fsl.conf index 42d39638..25b990c1 100644 --- a/meta-fsl-ppc/conf/distro/fsl.conf +++ b/meta-fsl-ppc/conf/distro/fsl.conf @@ -12,7 +12,7 @@ LOCALCONF_VERSION = "1" DISTRO_FEATURES_append = " largefile opengl" -SDK_NAME = "${DISTRO}-${TCLIBC}-${SDK_ARCH}-${TARGET_ARCH}" +SDK_NAME = "${DISTRO}-${TCLIBC}-${SDK_ARCH}-${PACKAGE_ARCH}" SDKPATH = "/opt/${DISTRO}/${SDK_VERSION}" DISTRO_EXTRA_RDEPENDS += "task-core-boot" -- cgit v1.2.3-54-g00ecf From cf729e2bac1722b3c8d65ccf9c2a6b7ddbad78da Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Wed, 19 Oct 2011 11:45:50 -0500 Subject: Add overall reference to Freescale git server Signed-off-by: Matthew McClintock --- meta-fsl-ppc/conf/distro/fsl.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/meta-fsl-ppc/conf/distro/fsl.conf b/meta-fsl-ppc/conf/distro/fsl.conf index 25b990c1..ea4d48e8 100644 --- a/meta-fsl-ppc/conf/distro/fsl.conf +++ b/meta-fsl-ppc/conf/distro/fsl.conf @@ -49,3 +49,4 @@ IMAGE_CLASSES = "image_types_uboot" PREFERRED_VERSION_u-boot-mkimage-native_powerpc = "2011.06" +FREESCALE_GIT = "git://git.am.freescale.net" -- cgit v1.2.3-54-g00ecf From a0d462448a024fb902cc3475612255b4a61671a9 Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Wed, 19 Oct 2011 15:48:47 -0500 Subject: Fix to build u-boot images instead of just ext2.gz images Signed-off-by: Matthew McClintock --- meta-fsl-ppc/conf/machine/e500mc.inc | 2 +- meta-fsl-ppc/conf/machine/e500v2.inc | 2 +- meta-fsl-ppc/conf/machine/e5500-64b.inc | 2 +- meta-fsl-ppc/conf/machine/e5500.inc | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/meta-fsl-ppc/conf/machine/e500mc.inc b/meta-fsl-ppc/conf/machine/e500mc.inc index fbd78301..71a6ae5c 100644 --- a/meta-fsl-ppc/conf/machine/e500mc.inc +++ b/meta-fsl-ppc/conf/machine/e500mc.inc @@ -12,7 +12,7 @@ PREFERRED_PROVIDER_linux-libc-headers = "linux-qoriq-sdk-headers" KERNEL_IMAGETYPE = "uImage" SERIAL_CONSOLE = "115200 ttyS0" -IMAGE_FSTYPES = "tar.gz ext2.gz" +IMAGE_FSTYPES = "tar.gz ext2.gz.u-boot" # disable the images below for now # ext2.bz2 ext2.lzma \ # ext2.gz.u-boot ext2.bz2.u-boot ext2.lzma.u-boot" diff --git a/meta-fsl-ppc/conf/machine/e500v2.inc b/meta-fsl-ppc/conf/machine/e500v2.inc index 165f4c5a..7ed0bdc6 100644 --- a/meta-fsl-ppc/conf/machine/e500v2.inc +++ b/meta-fsl-ppc/conf/machine/e500v2.inc @@ -11,7 +11,7 @@ PREFERRED_PROVIDER_linux-libc-headers = "linux-qoriq-sdk-headers" KERNEL_IMAGETYPE = "uImage" SERIAL_CONSOLE = "115200 ttyS0" -IMAGE_FSTYPES = "tar.gz ext2.gz" +IMAGE_FSTYPES = "tar.gz ext2.gz.u-boot" # disable the images below for now # ext2.bz2 ext2.lzma \ # ext2.gz.u-boot ext2.bz2.u-boot ext2.lzma.u-boot" diff --git a/meta-fsl-ppc/conf/machine/e5500-64b.inc b/meta-fsl-ppc/conf/machine/e5500-64b.inc index 7dca1799..c340a07a 100644 --- a/meta-fsl-ppc/conf/machine/e5500-64b.inc +++ b/meta-fsl-ppc/conf/machine/e5500-64b.inc @@ -12,7 +12,7 @@ PREFERRED_PROVIDER_linux-libc-headers = "linux-qoriq-sdk-headers" KERNEL_IMAGETYPE = "uImage" SERIAL_CONSOLE = "115200 ttyS0" -IMAGE_FSTYPES = "tar.gz ext2.gz" +IMAGE_FSTYPES = "tar.gz ext2.gz.u-boot" # disable the images below for now # ext2.bz2 ext2.lzma \ # ext2.gz.u-boot ext2.bz2.u-boot ext2.lzma.u-boot" diff --git a/meta-fsl-ppc/conf/machine/e5500.inc b/meta-fsl-ppc/conf/machine/e5500.inc index a833a9a2..11e2fb64 100644 --- a/meta-fsl-ppc/conf/machine/e5500.inc +++ b/meta-fsl-ppc/conf/machine/e5500.inc @@ -12,7 +12,7 @@ PREFERRED_PROVIDER_linux-libc-headers ?= "linux-qoriq-sdk-headers" KERNEL_IMAGETYPE = "uImage" SERIAL_CONSOLE = "115200 ttyS0" -IMAGE_FSTYPES = "tar.gz ext2.gz" +IMAGE_FSTYPES = "tar.gz ext2.gz.u-boot" # disable the images below for now # ext2.bz2 ext2.lzma \ # ext2.gz.u-boot ext2.bz2.u-boot ext2.lzma.u-boot" -- cgit v1.2.3-54-g00ecf From 4a17483d585d6e4ea3c6996837eb7ea302dc959a Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Thu, 20 Oct 2011 15:03:06 -0500 Subject: Build u-boot for various machines Signed-off-by: Matthew McClintock --- meta-fsl-ppc/conf/machine/mpc8572ds.conf | 1 + meta-fsl-ppc/conf/machine/p1020rdb.conf | 1 + meta-fsl-ppc/conf/machine/p1022ds.conf | 1 + meta-fsl-ppc/conf/machine/p2020ds.conf | 1 + meta-fsl-ppc/conf/machine/p3041ds.conf | 1 + meta-fsl-ppc/conf/machine/p3060qds.conf | 1 + meta-fsl-ppc/conf/machine/p4080ds.conf | 3 +-- meta-fsl-ppc/conf/machine/p5020ds-64b.conf | 2 ++ meta-fsl-ppc/conf/machine/p5020ds.conf | 1 + 9 files changed, 10 insertions(+), 2 deletions(-) diff --git a/meta-fsl-ppc/conf/machine/mpc8572ds.conf b/meta-fsl-ppc/conf/machine/mpc8572ds.conf index e05d9453..164c0db3 100644 --- a/meta-fsl-ppc/conf/machine/mpc8572ds.conf +++ b/meta-fsl-ppc/conf/machine/mpc8572ds.conf @@ -3,5 +3,6 @@ require e500v2.inc +UBOOT_MACHINES = "MPC8572DS" KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/mpc8572ds.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" diff --git a/meta-fsl-ppc/conf/machine/p1020rdb.conf b/meta-fsl-ppc/conf/machine/p1020rdb.conf index f44bdbd0..87ef1ce7 100644 --- a/meta-fsl-ppc/conf/machine/p1020rdb.conf +++ b/meta-fsl-ppc/conf/machine/p1020rdb.conf @@ -3,5 +3,6 @@ require e500v2.inc +UBOOT_MACHINES = "P1020RDB" KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p1020rdb.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" diff --git a/meta-fsl-ppc/conf/machine/p1022ds.conf b/meta-fsl-ppc/conf/machine/p1022ds.conf index b7d90194..07246dca 100644 --- a/meta-fsl-ppc/conf/machine/p1022ds.conf +++ b/meta-fsl-ppc/conf/machine/p1022ds.conf @@ -3,5 +3,6 @@ require e500v2.inc +UBOOT_MACHINES = "P1022DS" KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p1022ds.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" diff --git a/meta-fsl-ppc/conf/machine/p2020ds.conf b/meta-fsl-ppc/conf/machine/p2020ds.conf index 16868547..527c67dd 100644 --- a/meta-fsl-ppc/conf/machine/p2020ds.conf +++ b/meta-fsl-ppc/conf/machine/p2020ds.conf @@ -3,6 +3,7 @@ require e500v2.inc +UBOOT_MACHINES = "P2020DS" KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p2020ds.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" diff --git a/meta-fsl-ppc/conf/machine/p3041ds.conf b/meta-fsl-ppc/conf/machine/p3041ds.conf index 90b37fe4..5adcb224 100644 --- a/meta-fsl-ppc/conf/machine/p3041ds.conf +++ b/meta-fsl-ppc/conf/machine/p3041ds.conf @@ -3,5 +3,6 @@ require e500mc.inc +UBOOT_MACHINES = "P3041DS" KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p3041ds.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet32_smp_defconfig" diff --git a/meta-fsl-ppc/conf/machine/p3060qds.conf b/meta-fsl-ppc/conf/machine/p3060qds.conf index 7cf7ec00..f6fc75e3 100644 --- a/meta-fsl-ppc/conf/machine/p3060qds.conf +++ b/meta-fsl-ppc/conf/machine/p3060qds.conf @@ -3,5 +3,6 @@ require e500mc.inc +UBOOT_MACHINES = "P3060QDS" KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p3060qds.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet32_smp_defconfig" diff --git a/meta-fsl-ppc/conf/machine/p4080ds.conf b/meta-fsl-ppc/conf/machine/p4080ds.conf index 1166f66e..861ed3c6 100644 --- a/meta-fsl-ppc/conf/machine/p4080ds.conf +++ b/meta-fsl-ppc/conf/machine/p4080ds.conf @@ -3,7 +3,6 @@ require e500mc.inc +UBOOT_MACHINES = "P4080DS" KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p4080ds.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet32_smp_defconfig" - -UBOOT_MACHINES = "P4080DS_config" diff --git a/meta-fsl-ppc/conf/machine/p5020ds-64b.conf b/meta-fsl-ppc/conf/machine/p5020ds-64b.conf index 2810caff..bd97d295 100644 --- a/meta-fsl-ppc/conf/machine/p5020ds-64b.conf +++ b/meta-fsl-ppc/conf/machine/p5020ds-64b.conf @@ -3,5 +3,7 @@ require e5500-64b.inc +# TODO: fix 32bit build of u-boot for p5020ds-64b +UBOOT_MACHINES = "" KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p5020ds.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet64_smp_defconfig" diff --git a/meta-fsl-ppc/conf/machine/p5020ds.conf b/meta-fsl-ppc/conf/machine/p5020ds.conf index 33ef5bb3..a4a6d32b 100644 --- a/meta-fsl-ppc/conf/machine/p5020ds.conf +++ b/meta-fsl-ppc/conf/machine/p5020ds.conf @@ -3,5 +3,6 @@ require e5500.inc +UBOOT_MACHINES = "P5020DS" KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p5020ds.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet32_smp_defconfig" -- cgit v1.2.3-54-g00ecf From b19fb276a19819d861320fed8da156c1584f2de4 Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Fri, 21 Oct 2011 15:30:06 -0500 Subject: Add ccache to lsb-sdk image Signed-off-by: Matthew McClintock --- meta-fsl-ppc/images/fsl-image-lsb-sdk.bb | 1 + 1 file changed, 1 insertion(+) diff --git a/meta-fsl-ppc/images/fsl-image-lsb-sdk.bb b/meta-fsl-ppc/images/fsl-image-lsb-sdk.bb index 964f5d5b..72b24099 100644 --- a/meta-fsl-ppc/images/fsl-image-lsb-sdk.bb +++ b/meta-fsl-ppc/images/fsl-image-lsb-sdk.bb @@ -9,6 +9,7 @@ IMAGE_INSTALL = "\ dtc \ flex \ bison \ + ccache \ " inherit core-image -- cgit v1.2.3-54-g00ecf From cf755ddd160696065b6912d50a826a1519cda870 Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Wed, 26 Oct 2011 22:09:20 -0500 Subject: Add fsl-toolchain-bare for just barebones toolchain Make fsl-toolchain build from the -bare version and we can start adding nativesdk package such as qemu and dtc there Signed-off-by: Matthew McClintock --- meta-fsl-ppc/images/fsl-toolchain-bare.bb | 8 ++++++++ meta-fsl-ppc/images/fsl-toolchain.bb | 8 ++++---- 2 files changed, 12 insertions(+), 4 deletions(-) create mode 100644 meta-fsl-ppc/images/fsl-toolchain-bare.bb diff --git a/meta-fsl-ppc/images/fsl-toolchain-bare.bb b/meta-fsl-ppc/images/fsl-toolchain-bare.bb new file mode 100644 index 00000000..16f32981 --- /dev/null +++ b/meta-fsl-ppc/images/fsl-toolchain-bare.bb @@ -0,0 +1,8 @@ +PR = "r3" + +require recipes-core/meta/meta-toolchain.bb + +TOOLCHAIN_OUTPUTNAME = "${SDK_NAME}-toolchain-bare-${DISTRO_VERSION}" +TOOLCHAIN_TARGET_TASK = "task-core-standalone-sdk-target" +TOOLCHAIN_HOST_TASK = "task-cross-canadian-${TRANSLATED_TARGET_ARCH}" +TOOLCHAIN_NEED_CONFIGSITE_CACHE += "zlib" diff --git a/meta-fsl-ppc/images/fsl-toolchain.bb b/meta-fsl-ppc/images/fsl-toolchain.bb index db8bdf28..ec2d424a 100644 --- a/meta-fsl-ppc/images/fsl-toolchain.bb +++ b/meta-fsl-ppc/images/fsl-toolchain.bb @@ -1,8 +1,8 @@ PR = "r1" -TOOLCHAIN_OUTPUTNAME ?= "${SDK_NAME}-toolchain-${DISTRO_VERSION}" -require recipes-core/meta/meta-toolchain.bb +require fsl-toolchain-bare.bb -TOOLCHAIN_HOST_TASK = "dtc-nativesdk" +TOOLCHAIN_OUTPUTNAME = "${SDK_NAME}-toolchain-${DISTRO_VERSION}" +TOOLCHAIN_TARGET_TASK += "" +TOOLCHAIN_HOST_TASK += "dtc-nativesdk qemu-nativesdk" -TOOLCHAIN_NEED_CONFIGSITE_CACHE += "zlib" -- cgit v1.2.3-54-g00ecf From 91b63a9fea42df0de9a4887ca913c3b2537f66dc Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Tue, 1 Nov 2011 17:07:30 -0500 Subject: Add mux-server for all, and boot-format for e500v2 parts Signed-off-by: Matthew McClintock --- meta-fsl-ppc/images/fsl-toolchain.bb | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/meta-fsl-ppc/images/fsl-toolchain.bb b/meta-fsl-ppc/images/fsl-toolchain.bb index ec2d424a..7995b7f7 100644 --- a/meta-fsl-ppc/images/fsl-toolchain.bb +++ b/meta-fsl-ppc/images/fsl-toolchain.bb @@ -4,5 +4,13 @@ require fsl-toolchain-bare.bb TOOLCHAIN_OUTPUTNAME = "${SDK_NAME}-toolchain-${DISTRO_VERSION}" TOOLCHAIN_TARGET_TASK += "" -TOOLCHAIN_HOST_TASK += "dtc-nativesdk qemu-nativesdk" +TOOLCHAIN_HOST_TASK += " \ + dtc-nativesdk \ + qemu-nativesdk \ + mux-server-nativesdk \ + " + +TOOLCHAIN_HOST_TASK_append_e500v2 = " \ + boot-format-nativesdk \ + " -- cgit v1.2.3-54-g00ecf From d89fb7742383a98dbe30d763007a317120e5b76a Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Fri, 2 Sep 2011 09:51:22 +0000 Subject: add udev rules in netbase to rename ethernet port Signed-off-by: Zhenhua Luo --- .../files/71-fsl-dpaa-persistent-networking.rules | 16 ++++++++++++++++ .../recipes-append/netbase/netbase_4.45.bbappend | 8 ++++++++ 2 files changed, 24 insertions(+) create mode 100644 meta-fsl-ppc/recipes-append/netbase/files/71-fsl-dpaa-persistent-networking.rules create mode 100644 meta-fsl-ppc/recipes-append/netbase/netbase_4.45.bbappend diff --git a/meta-fsl-ppc/recipes-append/netbase/files/71-fsl-dpaa-persistent-networking.rules b/meta-fsl-ppc/recipes-append/netbase/files/71-fsl-dpaa-persistent-networking.rules new file mode 100644 index 00000000..ff7998f1 --- /dev/null +++ b/meta-fsl-ppc/recipes-append/netbase/files/71-fsl-dpaa-persistent-networking.rules @@ -0,0 +1,16 @@ +# Rules for handling naming the DPAA FMan ethernet ports in a consistent way +SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe4e0000", NAME="fm1-gb0" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe4e2000", NAME="fm1-gb1" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe4e4000", NAME="fm1-gb2" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe4e6000", NAME="fm1-gb3" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe4e8000", NAME="fm1-gb4" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe4f0000", NAME="fm1-10g" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe5e0000", NAME="fm2-gb0" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe5e2000", NAME="fm2-gb1" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe5e4000", NAME="fm2-gb2" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe5e6000", NAME="fm2-gb3" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe5f0000", NAME="fm2-10g" + +# P1023 has its Fman @ different offsets +SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ff7e0000", NAME="fm1-gb0" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ff7e2000", NAME="fm1-gb1" diff --git a/meta-fsl-ppc/recipes-append/netbase/netbase_4.45.bbappend b/meta-fsl-ppc/recipes-append/netbase/netbase_4.45.bbappend new file mode 100644 index 00000000..0cc1ce2e --- /dev/null +++ b/meta-fsl-ppc/recipes-append/netbase/netbase_4.45.bbappend @@ -0,0 +1,8 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/files:" + +SRC_URI += "file://71-fsl-dpaa-persistent-networking.rules" + +do_install_append () { + install -d ${D}${sysconfdir}/udev/rules.d/ + install -m 0644 ${WORKDIR}/71-fsl-dpaa-persistent-networking.rules ${D}${sysconfdir}/udev/rules.d +} -- cgit v1.2.3-54-g00ecf From a87baaf9705f75302b64a2b89ed8966116717975 Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Mon, 7 Nov 2011 16:49:41 -0600 Subject: Include extra boot-format-nativesdk-config in fsl-toolchain Signed-off-by: Matthew McClintock --- meta-fsl-ppc/images/fsl-toolchain.bb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/meta-fsl-ppc/images/fsl-toolchain.bb b/meta-fsl-ppc/images/fsl-toolchain.bb index 7995b7f7..89fca774 100644 --- a/meta-fsl-ppc/images/fsl-toolchain.bb +++ b/meta-fsl-ppc/images/fsl-toolchain.bb @@ -3,7 +3,8 @@ PR = "r1" require fsl-toolchain-bare.bb TOOLCHAIN_OUTPUTNAME = "${SDK_NAME}-toolchain-${DISTRO_VERSION}" -TOOLCHAIN_TARGET_TASK += "" +TOOLCHAIN_TARGET_TASK += " \ + " TOOLCHAIN_HOST_TASK += " \ dtc-nativesdk \ qemu-nativesdk \ @@ -12,5 +13,6 @@ TOOLCHAIN_HOST_TASK += " \ TOOLCHAIN_HOST_TASK_append_e500v2 = " \ boot-format-nativesdk \ + boot-format-nativesdk-config \ " -- cgit v1.2.3-54-g00ecf From 72c62d4e5e0526438ee9c7ea007d96289eb216c7 Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Mon, 7 Nov 2011 16:50:27 -0600 Subject: Spawn multiple tty's on first two serial ports by default Signed-off-by: Matthew McClintock --- meta-fsl-ppc/conf/distro/fsl.conf | 4 ++++ meta-fsl-ppc/conf/machine/e500mc.inc | 1 - meta-fsl-ppc/conf/machine/e500v2.inc | 1 - meta-fsl-ppc/conf/machine/e5500-64b.inc | 1 - meta-fsl-ppc/conf/machine/e5500.inc | 1 - 5 files changed, 4 insertions(+), 4 deletions(-) diff --git a/meta-fsl-ppc/conf/distro/fsl.conf b/meta-fsl-ppc/conf/distro/fsl.conf index ea4d48e8..93649c3b 100644 --- a/meta-fsl-ppc/conf/distro/fsl.conf +++ b/meta-fsl-ppc/conf/distro/fsl.conf @@ -50,3 +50,7 @@ IMAGE_CLASSES = "image_types_uboot" PREFERRED_VERSION_u-boot-mkimage-native_powerpc = "2011.06" FREESCALE_GIT = "git://git.am.freescale.net" + +SYSVINIT_ENABLED_GETTYS = "" +USE_VT = "" +SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1" diff --git a/meta-fsl-ppc/conf/machine/e500mc.inc b/meta-fsl-ppc/conf/machine/e500mc.inc index 71a6ae5c..b4a8b010 100644 --- a/meta-fsl-ppc/conf/machine/e500mc.inc +++ b/meta-fsl-ppc/conf/machine/e500mc.inc @@ -11,7 +11,6 @@ PREFERRED_VERSION_virtual/kernel = "3.0.1" PREFERRED_PROVIDER_linux-libc-headers = "linux-qoriq-sdk-headers" KERNEL_IMAGETYPE = "uImage" -SERIAL_CONSOLE = "115200 ttyS0" IMAGE_FSTYPES = "tar.gz ext2.gz.u-boot" # disable the images below for now # ext2.bz2 ext2.lzma \ diff --git a/meta-fsl-ppc/conf/machine/e500v2.inc b/meta-fsl-ppc/conf/machine/e500v2.inc index 7ed0bdc6..16408e2d 100644 --- a/meta-fsl-ppc/conf/machine/e500v2.inc +++ b/meta-fsl-ppc/conf/machine/e500v2.inc @@ -10,7 +10,6 @@ PREFERRED_VERSION_virtual/kernel = "3.0.1" PREFERRED_PROVIDER_linux-libc-headers = "linux-qoriq-sdk-headers" KERNEL_IMAGETYPE = "uImage" -SERIAL_CONSOLE = "115200 ttyS0" IMAGE_FSTYPES = "tar.gz ext2.gz.u-boot" # disable the images below for now # ext2.bz2 ext2.lzma \ diff --git a/meta-fsl-ppc/conf/machine/e5500-64b.inc b/meta-fsl-ppc/conf/machine/e5500-64b.inc index c340a07a..2393cfd3 100644 --- a/meta-fsl-ppc/conf/machine/e5500-64b.inc +++ b/meta-fsl-ppc/conf/machine/e5500-64b.inc @@ -11,7 +11,6 @@ PREFERRED_VERSION_virtual/kernel = "3.0.1" PREFERRED_PROVIDER_linux-libc-headers = "linux-qoriq-sdk-headers" KERNEL_IMAGETYPE = "uImage" -SERIAL_CONSOLE = "115200 ttyS0" IMAGE_FSTYPES = "tar.gz ext2.gz.u-boot" # disable the images below for now # ext2.bz2 ext2.lzma \ diff --git a/meta-fsl-ppc/conf/machine/e5500.inc b/meta-fsl-ppc/conf/machine/e5500.inc index 11e2fb64..839fa26e 100644 --- a/meta-fsl-ppc/conf/machine/e5500.inc +++ b/meta-fsl-ppc/conf/machine/e5500.inc @@ -11,7 +11,6 @@ PREFERRED_VERSION_virtual/kernel ?= "3.0.1" PREFERRED_PROVIDER_linux-libc-headers ?= "linux-qoriq-sdk-headers" KERNEL_IMAGETYPE = "uImage" -SERIAL_CONSOLE = "115200 ttyS0" IMAGE_FSTYPES = "tar.gz ext2.gz.u-boot" # disable the images below for now # ext2.bz2 ext2.lzma \ -- cgit v1.2.3-54-g00ecf From e962fef71b9fb35dd9ed0ff8e07f90bf2b74f4eb Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Tue, 8 Nov 2011 13:23:13 -0600 Subject: Remove dependencies on packages not in this layer, will use bbappend to add them in the layer where dependencies exist Signed-off-by: Matthew McClintock --- meta-fsl-ppc/images/fsl-toolchain.bb | 7 ------- 1 file changed, 7 deletions(-) diff --git a/meta-fsl-ppc/images/fsl-toolchain.bb b/meta-fsl-ppc/images/fsl-toolchain.bb index 89fca774..83425c70 100644 --- a/meta-fsl-ppc/images/fsl-toolchain.bb +++ b/meta-fsl-ppc/images/fsl-toolchain.bb @@ -8,11 +8,4 @@ TOOLCHAIN_TARGET_TASK += " \ TOOLCHAIN_HOST_TASK += " \ dtc-nativesdk \ qemu-nativesdk \ - mux-server-nativesdk \ " - -TOOLCHAIN_HOST_TASK_append_e500v2 = " \ - boot-format-nativesdk \ - boot-format-nativesdk-config \ - " - -- cgit v1.2.3-54-g00ecf From c8044ff3841f15320030630a001a570ed19527fa Mon Sep 17 00:00:00 2001 From: Madeeha Javed Date: Tue, 8 Nov 2011 14:43:57 -0600 Subject: Add support for graphics on p1022ds Signed-off-by: Madeeha Javed Signed-off-by: Matthew McClintock --- meta-fsl-ppc/conf/machine/p1022ds.conf | 10 ++++++ .../xorg-driver/xf86-video-fbdev_0.4.2.bb | 9 +++++ .../xorg-driver/xorg-driver-common.inc | 40 ++++++++++++++++++++++ .../xorg-driver/xorg-driver-video.inc | 4 +++ .../xserver-xf86-config/p1022ds/xorg.conf | 27 +++++++++++++++ .../xorg-xserver/xserver-xf86-config_0.1.bbappend | 1 + 6 files changed, 91 insertions(+) create mode 100644 meta-fsl-ppc/recipes-graphics/xorg-driver/xf86-video-fbdev_0.4.2.bb create mode 100644 meta-fsl-ppc/recipes-graphics/xorg-driver/xorg-driver-common.inc create mode 100644 meta-fsl-ppc/recipes-graphics/xorg-driver/xorg-driver-video.inc create mode 100644 meta-fsl-ppc/recipes-graphics/xorg-xserver/xserver-xf86-config/p1022ds/xorg.conf create mode 100644 meta-fsl-ppc/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend diff --git a/meta-fsl-ppc/conf/machine/p1022ds.conf b/meta-fsl-ppc/conf/machine/p1022ds.conf index 07246dca..b104a482 100644 --- a/meta-fsl-ppc/conf/machine/p1022ds.conf +++ b/meta-fsl-ppc/conf/machine/p1022ds.conf @@ -6,3 +6,13 @@ require e500v2.inc UBOOT_MACHINES = "P1022DS" KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p1022ds.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" + +PREFERRED_PROVIDER_virtual/xserver = "xserver-xf86-lite" + +XSERVER = " \ + xserver-xf86-lite \ + xf86-input-evdev \ + xf86-input-mouse \ + xf86-input-keyboard \ + xf86-video-fbdev \ +" diff --git a/meta-fsl-ppc/recipes-graphics/xorg-driver/xf86-video-fbdev_0.4.2.bb b/meta-fsl-ppc/recipes-graphics/xorg-driver/xf86-video-fbdev_0.4.2.bb new file mode 100644 index 00000000..d555fbc4 --- /dev/null +++ b/meta-fsl-ppc/recipes-graphics/xorg-driver/xf86-video-fbdev_0.4.2.bb @@ -0,0 +1,9 @@ +require xorg-driver-video.inc +LIC_FILES_CHKSUM = "file://COPYING;md5=d8cbd99fff773f92e844948f74ef0df8" + +DESCRIPTION = "X.Org X server -- fbdev display driver" +PE = "1" +PR = "${INC_PR}.1" + +SRC_URI[md5sum] = "53a533d9e0c2da50962282526bace074" +SRC_URI[sha256sum] = "93b271b4b41d7e5ca108849a583b9523e96c51813d046282285355b7001f82d5" diff --git a/meta-fsl-ppc/recipes-graphics/xorg-driver/xorg-driver-common.inc b/meta-fsl-ppc/recipes-graphics/xorg-driver/xorg-driver-common.inc new file mode 100644 index 00000000..c0f4a15a --- /dev/null +++ b/meta-fsl-ppc/recipes-graphics/xorg-driver/xorg-driver-common.inc @@ -0,0 +1,40 @@ +DESCRIPTION = "X driver" +HOMEPAGE = "http://www.x.org" +SECTION = "x11/drivers" +LICENSE = "MIT-X" +INC_PR = "r15" + +DEPENDS = "randrproto virtual/xserver-xf86 xproto" + +SRC_URI = "${XORG_MIRROR}/individual/driver/${BPN}-${PV}.tar.bz2" + +S = "${WORKDIR}/${BPN}-${PV}" + +FILES_${PN} += " ${libdir}/xorg/modules" +FILES_${PN}-dbg += "${libdir}/xorg/modules/*/.debug" + +inherit autotools pkgconfig + +TARGET_CPPFLAGS += "-I${STAGING_DIR_HOST}/usr/include/xorg" + +# Another sucky behavor from Xorg configure scripts. +# They use AC_CHECK_FILE to check for DRI headers. Yuck! +# Of course this will blow up when cross compiling. + +do_configure_prepend() { + incdir=${layout_includedir}/xorg + for f in dri.h sarea.h dristruct.h exa.h damage.h xf86Module.h; do + path="$incdir/$f" + if [ -f "${STAGING_DIR_HOST}/$path" ]; then + p=`echo "$path" | sed 'y%*+%pp%;s%[^_[:alnum:]]%_%g'` + eval "export ac_cv_file_$p=yes" + fi + done +} + +# FIXME: We don't want to include the libtool archives (*.la) from modules +# directory, as they serve no useful purpose. Upstream should fix Makefile.am +do_install_append() { + find ${D}${libdir}/xorg/modules -regex ".*\.la$" | xargs rm -f -- +} + diff --git a/meta-fsl-ppc/recipes-graphics/xorg-driver/xorg-driver-video.inc b/meta-fsl-ppc/recipes-graphics/xorg-driver/xorg-driver-video.inc new file mode 100644 index 00000000..bce8c9a7 --- /dev/null +++ b/meta-fsl-ppc/recipes-graphics/xorg-driver/xorg-driver-video.inc @@ -0,0 +1,4 @@ +include xorg-driver-common.inc + +DEPENDS = "randrproto renderproto videoproto xextproto fontsproto xproto" + diff --git a/meta-fsl-ppc/recipes-graphics/xorg-xserver/xserver-xf86-config/p1022ds/xorg.conf b/meta-fsl-ppc/recipes-graphics/xorg-xserver/xserver-xf86-config/p1022ds/xorg.conf new file mode 100644 index 00000000..57f284e8 --- /dev/null +++ b/meta-fsl-ppc/recipes-graphics/xorg-xserver/xserver-xf86-config/p1022ds/xorg.conf @@ -0,0 +1,27 @@ +Section "Screen" + Identifier "Builtin Default fbdev Screen 0" + Device "Builtin Default fbdev Device 0" +EndSection + +Section "ServerLayout" + Identifier "Builtin Default Layout" + Screen "Builtin Default fbdev Screen 0" +EndSection + +Section "ServerFlags" + Option "DontZap" "0" +EndSection + +Section "InputClass" + Identifier "keyboard-all" + Driver "evdev" + MatchIsKeyboard "on" +EndSection + + +Section "InputClass" + Identifier "mouse-all" + Driver "evdev" + MatchIsPointer "on" +EndSection + diff --git a/meta-fsl-ppc/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend b/meta-fsl-ppc/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend new file mode 100644 index 00000000..72d991c7 --- /dev/null +++ b/meta-fsl-ppc/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend @@ -0,0 +1 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" -- cgit v1.2.3-54-g00ecf From 658a47dbe057c335d8b07f95e10b9672f3cc34fa Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Tue, 8 Nov 2011 22:30:14 -0600 Subject: Add DEPENDS to the xserver for xf86-video-fbdev Signed-off-by: Matthew McClintock --- meta-fsl-ppc/recipes-graphics/xorg-driver/xf86-video-fbdev_0.4.2.bb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/meta-fsl-ppc/recipes-graphics/xorg-driver/xf86-video-fbdev_0.4.2.bb b/meta-fsl-ppc/recipes-graphics/xorg-driver/xf86-video-fbdev_0.4.2.bb index d555fbc4..038c421d 100644 --- a/meta-fsl-ppc/recipes-graphics/xorg-driver/xf86-video-fbdev_0.4.2.bb +++ b/meta-fsl-ppc/recipes-graphics/xorg-driver/xf86-video-fbdev_0.4.2.bb @@ -5,5 +5,7 @@ DESCRIPTION = "X.Org X server -- fbdev display driver" PE = "1" PR = "${INC_PR}.1" +DEPENDS += "virtual/xserver" + SRC_URI[md5sum] = "53a533d9e0c2da50962282526bace074" SRC_URI[sha256sum] = "93b271b4b41d7e5ca108849a583b9523e96c51813d046282285355b7001f82d5" -- cgit v1.2.3-54-g00ecf From 0d4f4648ee55cd92761e6f0780b9ecdd4d192be0 Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Fri, 18 Nov 2011 14:23:18 -0600 Subject: Add linux-qoriq-sdk recipe to meta-fsl-ppc Signed-off-by: Matthew McClintock --- .../linux/files/add-no-error-array-bounds.patch | 13 +++++++ .../files/add-no-unused-but-set-variable.patch | 13 +++++++ .../linux/linux-qoriq-sdk-headers.bb | 45 ++++++++++++++++++++++ .../recipes-kernel/linux/linux-qoriq-sdk.bb | 15 ++++++++ .../recipes-kernel/linux/linux-qoriq-sdk.inc | 19 +++++++++ .../recipes-kernel/linux/linux-yocto_3.0.bbappend | 13 +++++++ 6 files changed, 118 insertions(+) create mode 100644 meta-fsl-ppc/recipes-kernel/linux/files/add-no-error-array-bounds.patch create mode 100644 meta-fsl-ppc/recipes-kernel/linux/files/add-no-unused-but-set-variable.patch create mode 100644 meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk-headers.bb create mode 100644 meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.bb create mode 100644 meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc create mode 100644 meta-fsl-ppc/recipes-kernel/linux/linux-yocto_3.0.bbappend diff --git a/meta-fsl-ppc/recipes-kernel/linux/files/add-no-error-array-bounds.patch b/meta-fsl-ppc/recipes-kernel/linux/files/add-no-error-array-bounds.patch new file mode 100644 index 00000000..57b3974d --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/linux/files/add-no-error-array-bounds.patch @@ -0,0 +1,13 @@ +Index: git/Makefile +=================================================================== +--- git.orig/Makefile ++++ git/Makefile +@@ -558,7 +558,7 @@ endif # $(dot-config) + # Defaults to vmlinux, but the arch makefile usually adds further targets + all: vmlinux + +-KBUILD_CFLAGS += -Wno-unused-but-set-variable ++KBUILD_CFLAGS += -Wno-unused-but-set-variable -Wno-error=array-bounds + + ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE + KBUILD_CFLAGS += -Os diff --git a/meta-fsl-ppc/recipes-kernel/linux/files/add-no-unused-but-set-variable.patch b/meta-fsl-ppc/recipes-kernel/linux/files/add-no-unused-but-set-variable.patch new file mode 100644 index 00000000..51335294 --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/linux/files/add-no-unused-but-set-variable.patch @@ -0,0 +1,13 @@ +diff --git a/Makefile b/Makefile +index e821f72..cb2fcba 100644 +--- a/Makefile ++++ b/Makefile +@@ -526,6 +526,8 @@ endif # $(dot-config) + # Defaults vmlinux but it is usually overridden in the arch makefile + all: vmlinux + ++KBUILD_CFLAGS += -Wno-unused-but-set-variable ++ + ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE + KBUILD_CFLAGS += -Os + else diff --git a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk-headers.bb b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk-headers.bb new file mode 100644 index 00000000..f3a37e2d --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk-headers.bb @@ -0,0 +1,45 @@ +PROVIDES = "linux-libc-headers" + +DESCRIPTION = "Linux kernel headers for Freescale platforms" +SECTION = "devel" +LICENSE = "GPLv2" + +INHIBIT_DEFAULT_DEPS = "1" +PROVIDES = "linux-libc-headers linux-qoriq-sdk-headers" +RPROVIDES_${PN}-dev = "linux-libc-headers-dev" +RPROVIDES_${PN}-dbg = "linux-libc-headers-dbg" +RDEPENDS_${PN}-dev = "" +RRECOMMENDS_${PN}-dbg = "${PN}-dev (= ${EXTENDPKGV})" + +require recipes-kernel/linux/linux-qoriq-sdk.inc + +set_arch() { + case ${TARGET_ARCH} in + arm*) ARCH=arm ;; + i*86*) ARCH=i386 ;; + ia64*) ARCH=ia64 ;; + mips*) ARCH=mips ;; + powerpc*) ARCH=powerpc ;; + x86_64*) ARCH=x86_64 ;; + esac +} + +do_configure () { + set_arch + cp ${KERNEL_DEFCONFIG} ${B}/.config + oe_runmake oldconfig ARCH=${ARCH} +} + +do_compile () { +} + +do_install() { + set_arch + cd ${S} + oe_runmake headers_install INSTALL_HDR_PATH=${D}${exec_prefix} ARCH=${ARCH} + + # The ..install.cmd conflicts between various configure runs + find ${D}${includedir} -name ..install.cmd | xargs rm -f +} + +BBCLASSEXTEND = "nativesdk" diff --git a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.bb b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.bb new file mode 100644 index 00000000..6784f458 --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.bb @@ -0,0 +1,15 @@ +inherit kernel +require recipes-kernel/linux/linux-dtb.inc + +DESCRIPTION = "Linux kernel for Freescale platforms" +SECTION = "kernel" +LICENSE = "GPLv2" + +require recipes-kernel/linux/linux-qoriq-sdk.inc + +kernel_do_configure_prepend() { + # copy desired defconfig so we pick it up for the real kernel_do_configure + cp ${KERNEL_DEFCONFIG} ${B}/.config +} + +require recipes-kernel/linux/linux-tools.inc diff --git a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc new file mode 100644 index 00000000..29d6be87 --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc @@ -0,0 +1,19 @@ +LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7" + +PV = "3.0.6" +PR = "r2" + +SRCREV = "1e3e8ed15249d73a066ddfe2e80882935c35dcb7" +SRC_URI = "git://git.freescale.com/ppc/sdk/linux.git \ + file://add-no-unused-but-set-variable.patch \ + file://add-no-error-array-bounds.patch \ + " + +KSRC ?= "" +S = ${@base_conditional("KSRC", "", "${WORKDIR}/git", "${KSRC}", d)} + +# make everything compatible for the time being +COMPATIBLE_MACHINE_$MACHINE = $MACHINE + +# only powerpc and powerpc64 are compatible +COMPATIBLE_HOST = "(powerpc|powerpc64)" diff --git a/meta-fsl-ppc/recipes-kernel/linux/linux-yocto_3.0.bbappend b/meta-fsl-ppc/recipes-kernel/linux/linux-yocto_3.0.bbappend new file mode 100644 index 00000000..ac4bd7b1 --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/linux/linux-yocto_3.0.bbappend @@ -0,0 +1,13 @@ +KMACHINE_e500v2 = "yocto/standard/fsl-mpc8315e-rdb" +KMACHINE_e500mc = "yocto/standard/fsl-mpc8315e-rdb" + +SRCREV_machine_e500v2 = "5d3c0b06071abd663c7790df141060ae462660a9" +SRCREV_machine_e500mc = "5d3c0b06071abd663c7790df141060ae462660a9" + +COMPATIBLE_MACHINE_mpc8572ds = "mpc8572ds" +COMPATIBLE_MACHINE_p1020rdb = "p1020rdb" +COMPATIBLE_MACHINE_p2020ds = "p2020ds" +COMPATIBLE_MACHINE_p3041ds = "p3041ds" +COMPATIBLE_MACHINE_p4080ds = "p4080ds" +COMPATIBLE_MACHINE_p5020ds-64b = "p5020ds-64b" +COMPATIBLE_MACHINE_p5020ds = "p5020ds" -- cgit v1.2.3-54-g00ecf From b1bb92609847f8df401958a4361193cb23684184 Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Fri, 18 Nov 2011 14:34:29 -0600 Subject: Add u-boot recipe to meta-fsl-ppc Signed-off-by: Matthew McClintock --- meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb | 99 ++++++++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb diff --git a/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb b/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb new file mode 100644 index 00000000..8ef48568 --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb @@ -0,0 +1,99 @@ +DESCRIPTION = "U-boot bootloader" +HOMEPAGE = "http://u-boot.sf.net" +SECTION = "bootloaders" +PROVIDES = "virtual/bootloader" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=1707d6db1d42237583f50183a5651ecb" + +PR = "r5" +INHIBIT_DEFAULT_DEPS = "1" +DEPENDS = "boot-format-native virtual/${TARGET_PREFIX}gcc" + +inherit deploy + +SRCREV = "348d8fceba39e5622d315ffda7d72ff6bbcf05ec" +SRC_URI = "git://git.freescale.com/ppc/sdk/u-boot.git \ + " + +EXTRA_OEMAKE = "CROSS_COMPILE=${TARGET_PREFIX}" +PACKAGE_ARCH = "${MACHINE_ARCH}" + +USRC ?= "" +S = ${@base_conditional("USRC", "", "${WORKDIR}/git", "${USRC}", d)} + +do_compile () { + unset LDFLAGS + unset CFLAGS + unset CPPFLAGS + + if [ "x${UBOOT_MACHINES}" == "x" ]; then + UBOOT_MACHINES=${UBOOT_MACHINE} + fi + + for board in ${UBOOT_MACHINES}; do + oe_runmake O=${board} distclean + oe_runmake O=${board} ${board} + oe_runmake O=${board} all + + case "${board}" in + *SDCARD*) UBOOT_TARGET="u-bootx-sd";; + *SPIFLASH*) UBOOT_TARGET="u-bootx-spi";; + *) UBOOT_TARGET="";; + esac + + if [ "x${UBOOT_TARGET}" != "x" ]; then + ${STAGING_BINDIR_NATIVE}/boot_format \ + ${STAGING_DATADIR_NATIVE}/${BOOTFORMAT_CONFIG} \ + ${S}/${board}/u-boot.bin -spi ${S}/${board}/${UBOOT_TARGET}.bin + fi + done +} + +do_install(){ + if [ "x${UBOOT_MACHINES}" == "x" ]; then + UBOOT_MACHINES=${UBOOT_MACHINE} + fi + + for board in ${UBOOT_MACHINES}; do + case "${board}" in + *SDCARD*) UBOOT_TARGET="u-bootx-sd";; + *SPIFLASH*) UBOOT_TARGET="u-bootx-spi";; + *NAND*) UBOOT_TARGET="u-boot-nand";; + *) UBOOT_TARGET="u-boot";; + esac + + if [ -f ${S}/${UBOOT_TARGET}.bin ]; then + install ${S}/${board}/${UBOOT_TARGET}.bin ${D}/boot/${UBOOT_TARGET}-${MACHINE}-${PV}-${PR}.bin + ln -sf ${UBOOT_TARGET}-${MACHINE}-${PV}-${PR}.bin ${D}/boot/${UBOOT_TARGET}.bin + fi + done +} + +do_deploy(){ + if [ "x${UBOOT_MACHINES}" == "x" ]; then + UBOOT_MACHINES=${UBOOT_MACHINE} + fi + + for board in ${UBOOT_MACHINES}; do + case "${board}" in + *SDCARD*) UBOOT_TARGET="u-bootx-sd";; + *SPIFLASH*) UBOOT_TARGET="u-bootx-spi";; + *NAND*) UBOOT_TARGET="u-boot-nand";; + *) UBOOT_TARGET="u-boot";; + esac + + if [ -f ${S}/${board}/${UBOOT_TARGET}.bin ]; then + mkdir -p ${DEPLOY_DIR_IMAGE} + install ${S}/${board}/${UBOOT_TARGET}.bin ${DEPLOY_DIR_IMAGE}/${UBOOT_TARGET}-${MACHINE}-${PV}-${PR}.bin + + cd ${DEPLOY_DIR_IMAGE} + rm -f ${UBOOT_TARGET}-${MACHINE}.bin + ln -sf ${UBOOT_TARGET}-${MACHINE}-${PV}-${PR}.bin ${UBOOT_TARGET}-${MACHINE}.bin + fi + done +} +addtask deploy after do_install + +FILES_${PN} += "/boot" + +ALLOW_EMPTY = 1 -- cgit v1.2.3-54-g00ecf From 92bfd35d75f12cd3e3e34fb340b3bdd89780ae35 Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Mon, 21 Nov 2011 12:37:57 -0600 Subject: Add u-boot to default images Signed-off-by: Matthew McClintock --- meta-fsl-ppc/conf/machine/p5020ds-64b.conf | 2 +- meta-fsl-ppc/images/fsl-image-lsb-sdk.bb | 1 + meta-fsl-ppc/images/fsl-image-lsb.bb | 1 + meta-fsl-ppc/images/fsl-image-minimal.bb | 3 +-- meta-fsl-ppc/images/fsl-toolchain.bb | 5 +++++ 5 files changed, 9 insertions(+), 3 deletions(-) diff --git a/meta-fsl-ppc/conf/machine/p5020ds-64b.conf b/meta-fsl-ppc/conf/machine/p5020ds-64b.conf index bd97d295..6ff89627 100644 --- a/meta-fsl-ppc/conf/machine/p5020ds-64b.conf +++ b/meta-fsl-ppc/conf/machine/p5020ds-64b.conf @@ -4,6 +4,6 @@ require e5500-64b.inc # TODO: fix 32bit build of u-boot for p5020ds-64b -UBOOT_MACHINES = "" +UBOOT_MACHINES = "P5020DS" KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p5020ds.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet64_smp_defconfig" diff --git a/meta-fsl-ppc/images/fsl-image-lsb-sdk.bb b/meta-fsl-ppc/images/fsl-image-lsb-sdk.bb index 72b24099..04b941b1 100644 --- a/meta-fsl-ppc/images/fsl-image-lsb-sdk.bb +++ b/meta-fsl-ppc/images/fsl-image-lsb-sdk.bb @@ -10,6 +10,7 @@ IMAGE_INSTALL = "\ flex \ bison \ ccache \ + u-boot \ " inherit core-image diff --git a/meta-fsl-ppc/images/fsl-image-lsb.bb b/meta-fsl-ppc/images/fsl-image-lsb.bb index 22eb7f48..bb743b49 100644 --- a/meta-fsl-ppc/images/fsl-image-lsb.bb +++ b/meta-fsl-ppc/images/fsl-image-lsb.bb @@ -4,6 +4,7 @@ IMAGE_INSTALL = "\ ${POKY_BASE_INSTALL} \ task-core-basic \ task-core-lsb \ + u-boot \ " inherit core-image diff --git a/meta-fsl-ppc/images/fsl-image-minimal.bb b/meta-fsl-ppc/images/fsl-image-minimal.bb index 743e121b..74bce63f 100644 --- a/meta-fsl-ppc/images/fsl-image-minimal.bb +++ b/meta-fsl-ppc/images/fsl-image-minimal.bb @@ -1,8 +1,7 @@ # # Copyright (C) 2007 OpenedHand Ltd. # -IMAGE_INSTALL = "task-core-boot ${ROOTFS_PKGMANAGE_BOOTSTRAP}" - +IMAGE_INSTALL = "task-core-boot ${ROOTFS_PKGMANAGE_BOOTSTRAP} u-boot" IMAGE_LINGUAS = " " LICENSE = "MIT" diff --git a/meta-fsl-ppc/images/fsl-toolchain.bb b/meta-fsl-ppc/images/fsl-toolchain.bb index 83425c70..ffc42fd3 100644 --- a/meta-fsl-ppc/images/fsl-toolchain.bb +++ b/meta-fsl-ppc/images/fsl-toolchain.bb @@ -4,7 +4,12 @@ require fsl-toolchain-bare.bb TOOLCHAIN_OUTPUTNAME = "${SDK_NAME}-toolchain-${DISTRO_VERSION}" TOOLCHAIN_TARGET_TASK += " \ + gtk+-dev \ + dtc \ " + +TOOLCHAIN_TARGET_TASK_append_e500mc = " usdpaa" + TOOLCHAIN_HOST_TASK += " \ dtc-nativesdk \ qemu-nativesdk \ -- cgit v1.2.3-54-g00ecf From 85b559aa923e3292d233e4c7d68226dda00c83a9 Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Mon, 21 Nov 2011 20:55:34 -0600 Subject: u-boot: Add work around for -lgcc not found With just CROSS_COMPILE defined we do not modify the CFLAGS to include the required --sysroot arguments. By adding CC as well the appropriate arguments are passed in. Signed-off-by: Matthew McClintock --- meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb b/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb index 8ef48568..28cad381 100644 --- a/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb +++ b/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb @@ -15,7 +15,7 @@ SRCREV = "348d8fceba39e5622d315ffda7d72ff6bbcf05ec" SRC_URI = "git://git.freescale.com/ppc/sdk/u-boot.git \ " -EXTRA_OEMAKE = "CROSS_COMPILE=${TARGET_PREFIX}" +EXTRA_OEMAKE = 'CROSS_COMPILE=${TARGET_PREFIX} CC="${CC}"' PACKAGE_ARCH = "${MACHINE_ARCH}" USRC ?= "" -- cgit v1.2.3-54-g00ecf From 5277c79ce86b551daf48baba91ab9d4309a996e0 Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Thu, 24 Nov 2011 01:10:16 -0600 Subject: Add compilation flags for u-boot when building for p5020ds-64b which still has a 32bit u-boot Signed-off-by: Matthew McClintock --- meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb b/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb index 28cad381..c1d0c697 100644 --- a/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb +++ b/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb @@ -5,7 +5,7 @@ PROVIDES = "virtual/bootloader" LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=1707d6db1d42237583f50183a5651ecb" -PR = "r5" +PR = "r6" INHIBIT_DEFAULT_DEPS = "1" DEPENDS = "boot-format-native virtual/${TARGET_PREFIX}gcc" @@ -16,6 +16,8 @@ SRC_URI = "git://git.freescale.com/ppc/sdk/u-boot.git \ " EXTRA_OEMAKE = 'CROSS_COMPILE=${TARGET_PREFIX} CC="${CC}"' +EXTRA_OEMAKE_e5500-64b = 'CROSS_COMPILE=${TARGET_PREFIX} CC="${CC} -m32" LD="${LD} -melf32ppc"' + PACKAGE_ARCH = "${MACHINE_ARCH}" USRC ?= "" -- cgit v1.2.3-54-g00ecf From 1a22b7d7dbb20bc236e6929e10587d69a4f5c180 Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Mon, 28 Nov 2011 11:33:41 -0600 Subject: Remove -mcpu= from CC as it's affecting code size Signed-off-by: Matthew McClintock --- meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb b/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb index c1d0c697..9cc761dc 100644 --- a/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb +++ b/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb @@ -5,7 +5,7 @@ PROVIDES = "virtual/bootloader" LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=1707d6db1d42237583f50183a5651ecb" -PR = "r6" +PR = "r7" INHIBIT_DEFAULT_DEPS = "1" DEPENDS = "boot-format-native virtual/${TARGET_PREFIX}gcc" @@ -15,8 +15,8 @@ SRCREV = "348d8fceba39e5622d315ffda7d72ff6bbcf05ec" SRC_URI = "git://git.freescale.com/ppc/sdk/u-boot.git \ " -EXTRA_OEMAKE = 'CROSS_COMPILE=${TARGET_PREFIX} CC="${CC}"' -EXTRA_OEMAKE_e5500-64b = 'CROSS_COMPILE=${TARGET_PREFIX} CC="${CC} -m32" LD="${LD} -melf32ppc"' +EXTRA_OEMAKE = 'CROSS_COMPILE=${TARGET_PREFIX} CC="${TARGET_PREFIX}gcc ${TOOLCHAIN_OPTIONS}"' +EXTRA_OEMAKE_e5500-64b = 'CROSS_COMPILE=${TARGET_PREFIX} CC="${TARGET_PREFIX}gcc ${TOOLCHAIN_OPTIONS} -m32" LD="${LD} -melf32ppc"' PACKAGE_ARCH = "${MACHINE_ARCH}" -- cgit v1.2.3-54-g00ecf From df85a0fede88d758746498af2a4cf43b20b01b75 Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Mon, 28 Nov 2011 11:34:17 -0600 Subject: Add mkdir -p to target install dir so it exists Signed-off-by: Matthew McClintock --- meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb | 1 + 1 file changed, 1 insertion(+) diff --git a/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb b/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb index 9cc761dc..de907b37 100644 --- a/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb +++ b/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb @@ -65,6 +65,7 @@ do_install(){ esac if [ -f ${S}/${UBOOT_TARGET}.bin ]; then + mkdir -p ${S}/${board}/${UBOOT_TARGET}.bin ${D}/boot/ install ${S}/${board}/${UBOOT_TARGET}.bin ${D}/boot/${UBOOT_TARGET}-${MACHINE}-${PV}-${PR}.bin ln -sf ${UBOOT_TARGET}-${MACHINE}-${PV}-${PR}.bin ${D}/boot/${UBOOT_TARGET}.bin fi -- cgit v1.2.3-54-g00ecf From 96fe426e2a0538a7b911fa7f6a865cf132dc79d4 Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Tue, 29 Nov 2011 10:25:25 -0600 Subject: u-boot: Fix mkdir path that was wrong Signed-off-by: Matthew McClintock --- meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb b/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb index de907b37..30294ff9 100644 --- a/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb +++ b/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb @@ -65,7 +65,7 @@ do_install(){ esac if [ -f ${S}/${UBOOT_TARGET}.bin ]; then - mkdir -p ${S}/${board}/${UBOOT_TARGET}.bin ${D}/boot/ + mkdir -p ${D}/boot/ install ${S}/${board}/${UBOOT_TARGET}.bin ${D}/boot/${UBOOT_TARGET}-${MACHINE}-${PV}-${PR}.bin ln -sf ${UBOOT_TARGET}-${MACHINE}-${PV}-${PR}.bin ${D}/boot/${UBOOT_TARGET}.bin fi -- cgit v1.2.3-54-g00ecf From 313fc4e298d5d3bb7c5a1ba35ecfdd3d6b3c2eeb Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Tue, 29 Nov 2011 21:45:07 -0600 Subject: u-boot_git.bb: Make u-boot build for 64-bit parts u-boot is always built 32-bit even for 64-bit parts, this is an issue for 64-bit machines. This is a first attempt at getting this working. However, this method is less than ideal as it uses multilib to build a 32-bit toolchain to build u-boot Signed-off-by: Matthew McClintock --- meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb b/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb index 30294ff9..3105f9cd 100644 --- a/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb +++ b/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb @@ -5,7 +5,7 @@ PROVIDES = "virtual/bootloader" LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=1707d6db1d42237583f50183a5651ecb" -PR = "r7" +PR = "r8" INHIBIT_DEFAULT_DEPS = "1" DEPENDS = "boot-format-native virtual/${TARGET_PREFIX}gcc" @@ -14,9 +14,13 @@ inherit deploy SRCREV = "348d8fceba39e5622d315ffda7d72ff6bbcf05ec" SRC_URI = "git://git.freescale.com/ppc/sdk/u-boot.git \ " +DEPENDS_append_e5500-64b = " lib32-gcc-cross" +PATH_append_e5500-64b = ":${STAGING_BINDIR_NATIVE}/powerpc-${DISTRO}mllib32-${HOST_OS}/" +TOOLCHAIN_OPTIONS_append_e5500-64b = "/../lib32-${MACHINE}" +WRAP_TARGET_PREFIX_e5500-64b = "powerpc-${DISTRO}mllib32-${HOST_OS}-" -EXTRA_OEMAKE = 'CROSS_COMPILE=${TARGET_PREFIX} CC="${TARGET_PREFIX}gcc ${TOOLCHAIN_OPTIONS}"' -EXTRA_OEMAKE_e5500-64b = 'CROSS_COMPILE=${TARGET_PREFIX} CC="${TARGET_PREFIX}gcc ${TOOLCHAIN_OPTIONS} -m32" LD="${LD} -melf32ppc"' +WRAP_TARGET_PREFIX = "${TARGET_PREFIX}" +EXTRA_OEMAKE = 'CROSS_COMPILE=${WRAP_TARGET_PREFIX} CC="${WRAP_TARGET_PREFIX}gcc ${TOOLCHAIN_OPTIONS}"' PACKAGE_ARCH = "${MACHINE_ARCH}" -- cgit v1.2.3-54-g00ecf From a40becac8f5423f5f5179c61f8ee0ded817f9b3b Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Wed, 30 Nov 2011 15:16:55 +0000 Subject: add machine configure file for p1023rds and p2041rdb Signed-off-by: Zhenhua Luo --- meta-fsl-ppc/conf/machine/p1023rds.conf | 8 ++++++++ meta-fsl-ppc/conf/machine/p2041rdb.conf | 8 ++++++++ 2 files changed, 16 insertions(+) create mode 100644 meta-fsl-ppc/conf/machine/p1023rds.conf create mode 100644 meta-fsl-ppc/conf/machine/p2041rdb.conf diff --git a/meta-fsl-ppc/conf/machine/p1023rds.conf b/meta-fsl-ppc/conf/machine/p1023rds.conf new file mode 100644 index 00000000..c5615dbd --- /dev/null +++ b/meta-fsl-ppc/conf/machine/p1023rds.conf @@ -0,0 +1,8 @@ +#@TYPE: Machine +#@DESCRIPTION: Machine configuration for running + +require e500v2.inc + +UBOOT_MACHINES = "P1023RDS" +KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p1023rds.dts" +KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/85xx/p1023rds_defconfig" diff --git a/meta-fsl-ppc/conf/machine/p2041rdb.conf b/meta-fsl-ppc/conf/machine/p2041rdb.conf new file mode 100644 index 00000000..ab7ce5bc --- /dev/null +++ b/meta-fsl-ppc/conf/machine/p2041rdb.conf @@ -0,0 +1,8 @@ +#@TYPE: Machine +#@DESCRIPTION: Machine configuration for running + +require e500mc.inc + +UBOOT_MACHINES = "P2041RDB" +KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p2041rdb.dts" +KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet32_smp_defconfig" -- cgit v1.2.3-54-g00ecf From 99a928f2c43475984de869b846de05e3dbad93a3 Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Wed, 30 Nov 2011 18:00:27 -0600 Subject: bbappends: Add +fsl to PR of all packages we modify This way we can tell if we modified them after they are built and shipped. This is just to help with debugged later. Signed-off-by: Matthew McClintock --- meta-fsl-ppc/recipes-append/netbase/netbase_4.45.bbappend | 2 ++ .../recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend | 2 ++ meta-fsl-ppc/recipes-kernel/linux/linux-yocto_3.0.bbappend | 2 ++ 3 files changed, 6 insertions(+) diff --git a/meta-fsl-ppc/recipes-append/netbase/netbase_4.45.bbappend b/meta-fsl-ppc/recipes-append/netbase/netbase_4.45.bbappend index 0cc1ce2e..837cd204 100644 --- a/meta-fsl-ppc/recipes-append/netbase/netbase_4.45.bbappend +++ b/meta-fsl-ppc/recipes-append/netbase/netbase_4.45.bbappend @@ -6,3 +6,5 @@ do_install_append () { install -d ${D}${sysconfdir}/udev/rules.d/ install -m 0644 ${WORKDIR}/71-fsl-dpaa-persistent-networking.rules ${D}${sysconfdir}/udev/rules.d } + +PR .= "+${DISTRO}" diff --git a/meta-fsl-ppc/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend b/meta-fsl-ppc/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend index 72d991c7..c6acb5f9 100644 --- a/meta-fsl-ppc/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend +++ b/meta-fsl-ppc/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend @@ -1 +1,3 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +PR .= "+{DISTRO}" diff --git a/meta-fsl-ppc/recipes-kernel/linux/linux-yocto_3.0.bbappend b/meta-fsl-ppc/recipes-kernel/linux/linux-yocto_3.0.bbappend index ac4bd7b1..fb92821b 100644 --- a/meta-fsl-ppc/recipes-kernel/linux/linux-yocto_3.0.bbappend +++ b/meta-fsl-ppc/recipes-kernel/linux/linux-yocto_3.0.bbappend @@ -11,3 +11,5 @@ COMPATIBLE_MACHINE_p3041ds = "p3041ds" COMPATIBLE_MACHINE_p4080ds = "p4080ds" COMPATIBLE_MACHINE_p5020ds-64b = "p5020ds-64b" COMPATIBLE_MACHINE_p5020ds = "p5020ds" + +PR .= "+${DISTRO}" -- cgit v1.2.3-54-g00ecf From 3394c5be074cdc2f4296e75caa1ce381c7706585 Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Sun, 4 Dec 2011 18:20:48 -0600 Subject: linux-qoriq-sdk-headers: remove vardep for KERNEL_DEFCONFIG since it does not effect headers Signed-off-by: Matthew McClintock --- meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk-headers.bb | 1 + 1 file changed, 1 insertion(+) diff --git a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk-headers.bb b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk-headers.bb index f3a37e2d..cf1ffeee 100644 --- a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk-headers.bb +++ b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk-headers.bb @@ -29,6 +29,7 @@ do_configure () { cp ${KERNEL_DEFCONFIG} ${B}/.config oe_runmake oldconfig ARCH=${ARCH} } +do_configure[vardepsexclude] += "KERNEL_DEFCONFIG" do_compile () { } -- cgit v1.2.3-54-g00ecf From 9ad3acb4631770038ae5bf1ee3b58af6a98bc0af Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Mon, 5 Dec 2011 09:52:41 -0600 Subject: xserver-xf86-config_0.1.bbappend: Fix typo Signed-off-by: Matthew McClintock --- .../recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-fsl-ppc/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend b/meta-fsl-ppc/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend index c6acb5f9..0291bb71 100644 --- a/meta-fsl-ppc/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend +++ b/meta-fsl-ppc/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend @@ -1,3 +1,3 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" -PR .= "+{DISTRO}" +PR .= "+${DISTRO}" -- cgit v1.2.3-54-g00ecf From 319e1fc15eb23072f261db7369badff09babb42d Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Mon, 5 Dec 2011 14:58:24 -0600 Subject: fsl-toolchain.bb: use glib to pull in glib instead of gtk Change this from gtk+ to glib since we can not specific this in TOOLCHAIN_TARGET_TASK Signed-off-by: Matthew McClintock --- meta-fsl-ppc/images/fsl-toolchain.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-fsl-ppc/images/fsl-toolchain.bb b/meta-fsl-ppc/images/fsl-toolchain.bb index ffc42fd3..f549bc21 100644 --- a/meta-fsl-ppc/images/fsl-toolchain.bb +++ b/meta-fsl-ppc/images/fsl-toolchain.bb @@ -4,7 +4,7 @@ require fsl-toolchain-bare.bb TOOLCHAIN_OUTPUTNAME = "${SDK_NAME}-toolchain-${DISTRO_VERSION}" TOOLCHAIN_TARGET_TASK += " \ - gtk+-dev \ + glib-2.0 \ dtc \ " -- cgit v1.2.3-54-g00ecf From d7f0a98ffec25f6304ee379e21f62f6838a7ceb3 Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Wed, 7 Dec 2011 14:56:27 +0000 Subject: conf/machines: add non-dpaa target boards support The following boards are added: mpc8536ds.conf, mpc8548cds.conf, p1010rdb.conf, p1020mbg.conf, p1020utm.conf,p1021rdb.conf, p1024rdb.conf, p1025rdb.conf, p2020rdb.conf Signed-off-by: Zhenhua Luo Signed-off-by: Matthew McClintock --- meta-fsl-ppc/conf/machine/mpc8536ds.conf | 9 +++++++++ meta-fsl-ppc/conf/machine/mpc8548cds.conf | 9 +++++++++ meta-fsl-ppc/conf/machine/p1010rdb.conf | 9 +++++++++ meta-fsl-ppc/conf/machine/p1020mbg.conf | 9 +++++++++ meta-fsl-ppc/conf/machine/p1020utm.conf | 9 +++++++++ meta-fsl-ppc/conf/machine/p1021rdb.conf | 9 +++++++++ meta-fsl-ppc/conf/machine/p1024rdb.conf | 9 +++++++++ meta-fsl-ppc/conf/machine/p1025rdb.conf | 9 +++++++++ meta-fsl-ppc/conf/machine/p2020rdb.conf | 9 +++++++++ 9 files changed, 81 insertions(+) create mode 100644 meta-fsl-ppc/conf/machine/mpc8536ds.conf create mode 100644 meta-fsl-ppc/conf/machine/mpc8548cds.conf create mode 100644 meta-fsl-ppc/conf/machine/p1010rdb.conf create mode 100644 meta-fsl-ppc/conf/machine/p1020mbg.conf create mode 100644 meta-fsl-ppc/conf/machine/p1020utm.conf create mode 100644 meta-fsl-ppc/conf/machine/p1021rdb.conf create mode 100644 meta-fsl-ppc/conf/machine/p1024rdb.conf create mode 100644 meta-fsl-ppc/conf/machine/p1025rdb.conf create mode 100644 meta-fsl-ppc/conf/machine/p2020rdb.conf diff --git a/meta-fsl-ppc/conf/machine/mpc8536ds.conf b/meta-fsl-ppc/conf/machine/mpc8536ds.conf new file mode 100644 index 00000000..02170cb9 --- /dev/null +++ b/meta-fsl-ppc/conf/machine/mpc8536ds.conf @@ -0,0 +1,9 @@ +#@TYPE: Machine +#@Name: Freescale MPC8536DS +#@DESCRIPTION: Machine configuration for the Freescale MPC8536DS + +require e500v2.inc + +UBOOT_MACHINES = "MPC8536DS" +KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/mpc8536ds.dts" +KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" diff --git a/meta-fsl-ppc/conf/machine/mpc8548cds.conf b/meta-fsl-ppc/conf/machine/mpc8548cds.conf new file mode 100644 index 00000000..738f9831 --- /dev/null +++ b/meta-fsl-ppc/conf/machine/mpc8548cds.conf @@ -0,0 +1,9 @@ +#@TYPE: Machine +#@Name: Freescale MPC8548CDS +#@DESCRIPTION: Machine configuration for the Freescale MPC8548CDS + +require e500v2.inc + +UBOOT_MACHINES = "MPC8548CDS" +KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/mpc8548cds.dts" +KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" diff --git a/meta-fsl-ppc/conf/machine/p1010rdb.conf b/meta-fsl-ppc/conf/machine/p1010rdb.conf new file mode 100644 index 00000000..726d2122 --- /dev/null +++ b/meta-fsl-ppc/conf/machine/p1010rdb.conf @@ -0,0 +1,9 @@ +#@TYPE: Machine +#@Name: Freescale P1010RDB +#@DESCRIPTION: Machine configuration for the Freescale P1010RDB + +require e500v2.inc + +UBOOT_MACHINES = "P1010RDB_NAND" +KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p1010rdb.dts" +KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" diff --git a/meta-fsl-ppc/conf/machine/p1020mbg.conf b/meta-fsl-ppc/conf/machine/p1020mbg.conf new file mode 100644 index 00000000..ba1de3c8 --- /dev/null +++ b/meta-fsl-ppc/conf/machine/p1020mbg.conf @@ -0,0 +1,9 @@ +#@TYPE: Machine +#@Name: Freescale P1020MBG +#@DESCRIPTION: Machine configuration for the Freescale P1020MBG + +require e500v2.inc + +UBOOT_MACHINES = "P1020MBG-PC" +KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p1020mbg.dts" +KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" diff --git a/meta-fsl-ppc/conf/machine/p1020utm.conf b/meta-fsl-ppc/conf/machine/p1020utm.conf new file mode 100644 index 00000000..91833b16 --- /dev/null +++ b/meta-fsl-ppc/conf/machine/p1020utm.conf @@ -0,0 +1,9 @@ +#@TYPE: Machine +#@Name: Freescale P1020UTM +#@DESCRIPTION: Machine configuration for the Freescale P1020UTM + +require e500v2.inc + +UBOOT_MACHINES = "P1020UTM-PC" +KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p1020utm.dts" +KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" diff --git a/meta-fsl-ppc/conf/machine/p1021rdb.conf b/meta-fsl-ppc/conf/machine/p1021rdb.conf new file mode 100644 index 00000000..7e029be4 --- /dev/null +++ b/meta-fsl-ppc/conf/machine/p1021rdb.conf @@ -0,0 +1,9 @@ +#@TYPE: Machine +#@Name: Freescale P1021RDB +#@DESCRIPTION: Machine configuration for the Freescale P1021RDB + +require e500v2.inc + +UBOOT_MACHINES = "P1021RDB-PC" +KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p1021rdb.dts" +KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" diff --git a/meta-fsl-ppc/conf/machine/p1024rdb.conf b/meta-fsl-ppc/conf/machine/p1024rdb.conf new file mode 100644 index 00000000..e170a997 --- /dev/null +++ b/meta-fsl-ppc/conf/machine/p1024rdb.conf @@ -0,0 +1,9 @@ +#@TYPE: Machine +#@Name: Freescale P1024RDB +#@DESCRIPTION: Machine configuration for the Freescale P1024RDB + +require e500v2.inc + +UBOOT_MACHINES = "P1024RDB" +KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p1024rdb.dts" +KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" diff --git a/meta-fsl-ppc/conf/machine/p1025rdb.conf b/meta-fsl-ppc/conf/machine/p1025rdb.conf new file mode 100644 index 00000000..6e7b3c0b --- /dev/null +++ b/meta-fsl-ppc/conf/machine/p1025rdb.conf @@ -0,0 +1,9 @@ +#@TYPE: Machine +#@Name: Freescale P1025RDB +#@DESCRIPTION: Machine configuration for the Freescale P1025RDB + +require e500v2.inc + +UBOOT_MACHINES = "P1025RDB" +KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p1025rdb.dts" +KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" diff --git a/meta-fsl-ppc/conf/machine/p2020rdb.conf b/meta-fsl-ppc/conf/machine/p2020rdb.conf new file mode 100644 index 00000000..22b07f8c --- /dev/null +++ b/meta-fsl-ppc/conf/machine/p2020rdb.conf @@ -0,0 +1,9 @@ +#@TYPE: Machine +#@Name: Freescale P2020RDB +#@DESCRIPTION: Machine configuration for the Freescale P2020RDB + +require e500v2.inc + +UBOOT_MACHINES = "P2020RDB-PC" +KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p2020rdb.dts" +KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" -- cgit v1.2.3-54-g00ecf From 4436324109686bdd7662d14aa75053f405725dd6 Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Fri, 9 Dec 2011 08:20:40 +0000 Subject: update the kernel defconfig for non-smp targets Signed-off-by: Zhenhua Luo --- meta-fsl-ppc/conf/machine/mpc8536ds.conf | 2 +- meta-fsl-ppc/conf/machine/mpc8548cds.conf | 2 +- meta-fsl-ppc/conf/machine/p1010rdb.conf | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/meta-fsl-ppc/conf/machine/mpc8536ds.conf b/meta-fsl-ppc/conf/machine/mpc8536ds.conf index 02170cb9..171233b2 100644 --- a/meta-fsl-ppc/conf/machine/mpc8536ds.conf +++ b/meta-fsl-ppc/conf/machine/mpc8536ds.conf @@ -6,4 +6,4 @@ require e500v2.inc UBOOT_MACHINES = "MPC8536DS" KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/mpc8536ds.dts" -KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" +KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_defconfig" diff --git a/meta-fsl-ppc/conf/machine/mpc8548cds.conf b/meta-fsl-ppc/conf/machine/mpc8548cds.conf index 738f9831..22cc5582 100644 --- a/meta-fsl-ppc/conf/machine/mpc8548cds.conf +++ b/meta-fsl-ppc/conf/machine/mpc8548cds.conf @@ -6,4 +6,4 @@ require e500v2.inc UBOOT_MACHINES = "MPC8548CDS" KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/mpc8548cds.dts" -KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" +KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_defconfig" diff --git a/meta-fsl-ppc/conf/machine/p1010rdb.conf b/meta-fsl-ppc/conf/machine/p1010rdb.conf index 726d2122..693eed12 100644 --- a/meta-fsl-ppc/conf/machine/p1010rdb.conf +++ b/meta-fsl-ppc/conf/machine/p1010rdb.conf @@ -6,4 +6,4 @@ require e500v2.inc UBOOT_MACHINES = "P1010RDB_NAND" KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p1010rdb.dts" -KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" +KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_defconfig" -- cgit v1.2.3-54-g00ecf From 3504a5a71ed5eff3c32c85b7741bb01ddc687159 Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Wed, 28 Dec 2011 12:25:38 -0600 Subject: Add boot-format recipe using public git Signed-off-by: Matthew McClintock --- .../recipes-tools/boot-format/boot-format_git.bb | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 meta-fsl-ppc/recipes-tools/boot-format/boot-format_git.bb diff --git a/meta-fsl-ppc/recipes-tools/boot-format/boot-format_git.bb b/meta-fsl-ppc/recipes-tools/boot-format/boot-format_git.bb new file mode 100644 index 00000000..a8b1bb53 --- /dev/null +++ b/meta-fsl-ppc/recipes-tools/boot-format/boot-format_git.bb @@ -0,0 +1,20 @@ +DESCRIPTION = "Boot format utility for booting from eSDHC/eSPI" +LICENSE = "GPL" +PR = "r2" +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" + +SRC_URI = "git://git.freescale.com/ppc/sdk/boot-format.git\ + " +SRCREV = "aca17b98516ef1869e7f2d98e865bce9226e8bba" + +S = "${WORKDIR}/git" +EXTRA_OEMAKE = 'CC="${CC}"' + +do_install(){ + oe_runmake DESTDIR=${D} PREFIX=${prefix} install +} + +PACKAGES =+ "${PN}-config" +FILES_${PN}-config += "${datadir}/*" + +BBCLASSEXTEND = "native nativesdk" -- cgit v1.2.3-54-g00ecf From 9af115ab714530332dd41e569a602beb16b19a01 Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Wed, 28 Dec 2011 12:35:17 -0600 Subject: Initial add of rcw using public git Signed-off-by: Matthew McClintock --- meta-fsl-ppc/recipes-tools/rcw/rcw_git.bb | 34 +++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 meta-fsl-ppc/recipes-tools/rcw/rcw_git.bb diff --git a/meta-fsl-ppc/recipes-tools/rcw/rcw_git.bb b/meta-fsl-ppc/recipes-tools/rcw/rcw_git.bb new file mode 100644 index 00000000..1bb0b17e --- /dev/null +++ b/meta-fsl-ppc/recipes-tools/rcw/rcw_git.bb @@ -0,0 +1,34 @@ +DESCRIPTION = "Reset Control Words (RCW)" +SECTION = "rcw" +LICENSE = "BSD" +PR = "r1" + +LIC_FILES_CHKSUM = " \ + file://p2041rdb/LICENSE;md5=96dd72f26e9bb861de5c76c60e35e1bc \ + file://p3041ds/LICENSE;md5=96dd72f26e9bb861de5c76c60e35e1bc \ + file://p3060qds/LICENSE;md5=96dd72f26e9bb861de5c76c60e35e1bc \ + file://p4080ds/LICENSE;md5=96dd72f26e9bb861de5c76c60e35e1bc \ + file://p5020ds/LICENSE;md5=96dd72f26e9bb861de5c76c60e35e1bc \ +" + +# this package is specific to the machine itself +INHIBIT_DEFAULT_DEPS = "1" +PACKAGE_ARCH = "${MACHINE_ARCH}" + +inherit deploy + +SRCREV = "${AUTOREV}" +SRC_URI = "git://git.freescale.com/ppc/sdk/rcw.git" + +S = "${WORKDIR}/git" + +do_deploy () { + make install + + M=`echo ${MACHINE} | sed s/-64b//g` + mkdir -p ${DEPLOY_DIR_IMAGE}/rcw + cp -r ${S}/${M}/${M} ${DEPLOY_DIR_IMAGE}/rcw +} +addtask deploy after do_install + +ALLOW_EMPTY_${PN} = "1" -- cgit v1.2.3-54-g00ecf From 9cae58ad3fb168d4bfdf9f7ada75e46e818b8823 Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Wed, 28 Dec 2011 12:35:26 -0600 Subject: Initial add of hv-cfg using public git Signed-off-by: Matthew McClintock --- meta-fsl-ppc/recipes-tools/hv-cfg/hv-cfg_git.bb | 34 +++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 meta-fsl-ppc/recipes-tools/hv-cfg/hv-cfg_git.bb diff --git a/meta-fsl-ppc/recipes-tools/hv-cfg/hv-cfg_git.bb b/meta-fsl-ppc/recipes-tools/hv-cfg/hv-cfg_git.bb new file mode 100644 index 00000000..7a17c643 --- /dev/null +++ b/meta-fsl-ppc/recipes-tools/hv-cfg/hv-cfg_git.bb @@ -0,0 +1,34 @@ +DESCRIPTION = "Hypervisor Config" +SECTION = "hv-cfg" +LICENSE = "BSD" +PR = "r1" + +LIC_FILES_CHKSUM = " \ + file://p2041rdb/LICENSE;md5=96dd72f26e9bb861de5c76c60e35e1bc \ + file://p3041ds/LICENSE;md5=96dd72f26e9bb861de5c76c60e35e1bc \ + file://p3060qds/LICENSE;md5=96dd72f26e9bb861de5c76c60e35e1bc \ + file://p4080ds/LICENSE;md5=96dd72f26e9bb861de5c76c60e35e1bc \ + file://p5020ds/LICENSE;md5=96dd72f26e9bb861de5c76c60e35e1bc \ +" + +# this package is specific to the machine itself +INHIBIT_DEFAULT_DEPS = "1" +PACKAGE_ARCH = "${MACHINE_ARCH}" + +inherit deploy + +SRCREV = "${AUTOREV}" +SRC_URI = "git://git.freescale.com/ppc/sdk/hv-cfg.git" + +S = "${WORKDIR}/git" + +do_deploy () { + make install + + M=`echo ${MACHINE} | sed s/-64b//g` + mkdir -p ${DEPLOY_DIR_IMAGE}/hv-cfg + cp -r ${S}/${M}/${M} ${DEPLOY_DIR_IMAGE}/hv-cfg +} +addtask deploy after do_install + +ALLOW_EMPTY_${PN} = "1" -- cgit v1.2.3-54-g00ecf From 2f71a8d0313c41716e9ec4c87e1e4197973b1cf6 Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Sat, 31 Dec 2011 13:49:38 +0000 Subject: u-boot: make sure u-boot images are included in cache package fix the u-boot images are not generated when do cache build Signed-off-by: Zhenhua Luo --- meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb b/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb index 3105f9cd..17097b0c 100644 --- a/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb +++ b/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb @@ -5,7 +5,7 @@ PROVIDES = "virtual/bootloader" LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=1707d6db1d42237583f50183a5651ecb" -PR = "r8" +PR = "r9" INHIBIT_DEFAULT_DEPS = "1" DEPENDS = "boot-format-native virtual/${TARGET_PREFIX}gcc" @@ -96,6 +96,13 @@ do_deploy(){ cd ${DEPLOY_DIR_IMAGE} rm -f ${UBOOT_TARGET}-${MACHINE}.bin ln -sf ${UBOOT_TARGET}-${MACHINE}-${PV}-${PR}.bin ${UBOOT_TARGET}-${MACHINE}.bin + + mkdir -p ${DEPLOYDIR} + install ${S}/${board}/${UBOOT_TARGET}.bin ${DEPLOYDIR}/${UBOOT_TARGET}-${MACHINE}-${PV}-${PR}.bin + + cd ${DEPLOYDIR} + rm -f ${UBOOT_TARGET}-${MACHINE}.bin + ln -sf ${UBOOT_TARGET}-${MACHINE}-${PV}-${PR}.bin ${UBOOT_TARGET}-${MACHINE}.bin fi done } -- cgit v1.2.3-54-g00ecf From 26ede1fb5c58f1d784e3887de709037a6897af37 Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Fri, 30 Dec 2011 13:34:00 +0000 Subject: hv-cfg: add dtc-native into the depencency list Signed-off-by: Zhenhua Luo --- meta-fsl-ppc/recipes-tools/hv-cfg/hv-cfg_git.bb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/meta-fsl-ppc/recipes-tools/hv-cfg/hv-cfg_git.bb b/meta-fsl-ppc/recipes-tools/hv-cfg/hv-cfg_git.bb index 7a17c643..855c55d2 100644 --- a/meta-fsl-ppc/recipes-tools/hv-cfg/hv-cfg_git.bb +++ b/meta-fsl-ppc/recipes-tools/hv-cfg/hv-cfg_git.bb @@ -1,7 +1,7 @@ DESCRIPTION = "Hypervisor Config" SECTION = "hv-cfg" LICENSE = "BSD" -PR = "r1" +PR = "r2" LIC_FILES_CHKSUM = " \ file://p2041rdb/LICENSE;md5=96dd72f26e9bb861de5c76c60e35e1bc \ @@ -11,6 +11,8 @@ LIC_FILES_CHKSUM = " \ file://p5020ds/LICENSE;md5=96dd72f26e9bb861de5c76c60e35e1bc \ " +DEPENDS += "dtc-native" + # this package is specific to the machine itself INHIBIT_DEFAULT_DEPS = "1" PACKAGE_ARCH = "${MACHINE_ARCH}" -- cgit v1.2.3-54-g00ecf From 0e9ae46a55cc182c2792b746b50197de1f29d22d Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Sat, 31 Dec 2011 13:49:39 +0000 Subject: make sure hv-cfg and rcw binaries are included in cache packages fix the rcw and hv-cfg binaries are not generated when do cache build Signed-off-by: Zhenhua Luo --- meta-fsl-ppc/recipes-tools/hv-cfg/hv-cfg_git.bb | 5 ++++- meta-fsl-ppc/recipes-tools/rcw/rcw_git.bb | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/meta-fsl-ppc/recipes-tools/hv-cfg/hv-cfg_git.bb b/meta-fsl-ppc/recipes-tools/hv-cfg/hv-cfg_git.bb index 855c55d2..d0562026 100644 --- a/meta-fsl-ppc/recipes-tools/hv-cfg/hv-cfg_git.bb +++ b/meta-fsl-ppc/recipes-tools/hv-cfg/hv-cfg_git.bb @@ -1,7 +1,7 @@ DESCRIPTION = "Hypervisor Config" SECTION = "hv-cfg" LICENSE = "BSD" -PR = "r2" +PR = "r3" LIC_FILES_CHKSUM = " \ file://p2041rdb/LICENSE;md5=96dd72f26e9bb861de5c76c60e35e1bc \ @@ -30,6 +30,9 @@ do_deploy () { M=`echo ${MACHINE} | sed s/-64b//g` mkdir -p ${DEPLOY_DIR_IMAGE}/hv-cfg cp -r ${S}/${M}/${M} ${DEPLOY_DIR_IMAGE}/hv-cfg + + install -d ${DEPLOYDIR}/hv-cfg + cp -r ${S}/${M}/${M} ${DEPLOYDIR}/hv-cfg } addtask deploy after do_install diff --git a/meta-fsl-ppc/recipes-tools/rcw/rcw_git.bb b/meta-fsl-ppc/recipes-tools/rcw/rcw_git.bb index 1bb0b17e..99a0d749 100644 --- a/meta-fsl-ppc/recipes-tools/rcw/rcw_git.bb +++ b/meta-fsl-ppc/recipes-tools/rcw/rcw_git.bb @@ -1,7 +1,7 @@ DESCRIPTION = "Reset Control Words (RCW)" SECTION = "rcw" LICENSE = "BSD" -PR = "r1" +PR = "r2" LIC_FILES_CHKSUM = " \ file://p2041rdb/LICENSE;md5=96dd72f26e9bb861de5c76c60e35e1bc \ @@ -28,6 +28,9 @@ do_deploy () { M=`echo ${MACHINE} | sed s/-64b//g` mkdir -p ${DEPLOY_DIR_IMAGE}/rcw cp -r ${S}/${M}/${M} ${DEPLOY_DIR_IMAGE}/rcw + + install -d ${DEPLOYDIR}/rcw + cp -r ${S}/${M}/${M} ${DEPLOYDIR}/rcw } addtask deploy after do_install -- cgit v1.2.3-54-g00ecf From 208f7b382a8bfc04ba54e23b94599f2b4b75c7dd Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Thu, 29 Dec 2011 15:05:38 +0000 Subject: set PREFERRED_PROVIDER_virtual/libx11 to libx11 To avoid the following error when building fsl-image-lsb/fsl-image-lsb-sdk: ERROR: Multiple .bb files are due to be built which each provide virtual/libx11 (/home/jenkins/poky/meta/recipes-graphics/xorg-lib/libx11_1.3.4.bb /home/jenkins/poky/meta/recipes-graphics/xorg-lib/libx11-trim_1.3.4.bb). task-core-lsb requires runtime dependency "libx11-locale" which is only provided by libx11_1.3.4.bb. Meanwhile, PREFERRED_PROVIDER_virtual/libx11 is by default set to "libx11-trim". File "libx11-trim_1.3.4.bb" is selected when adding dependency virtual/libx11 for dbus/qt4 etc. Both of the two recipes provide virtual/libx11. Signed-off-by: Ting Liu --- meta-fsl-ppc/conf/distro/fsl.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/meta-fsl-ppc/conf/distro/fsl.conf b/meta-fsl-ppc/conf/distro/fsl.conf index 93649c3b..25bf9afb 100644 --- a/meta-fsl-ppc/conf/distro/fsl.conf +++ b/meta-fsl-ppc/conf/distro/fsl.conf @@ -48,6 +48,7 @@ https://.*/.* http://autobuilder.yoctoproject.org/sources/ \n" IMAGE_CLASSES = "image_types_uboot" PREFERRED_VERSION_u-boot-mkimage-native_powerpc = "2011.06" +PREFERRED_PROVIDER_virtual/libx11 = "libx11" FREESCALE_GIT = "git://git.am.freescale.net" -- cgit v1.2.3-54-g00ecf From 0cc602b4eeacc1bf4b458ecf4dfd98cc1199fe42 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Thu, 29 Dec 2011 15:05:39 +0000 Subject: e5500: set PREFERRED_PROVIDER_virtual/kernel to linux-qoriq-sdk Signed-off-by: Ting Liu --- meta-fsl-ppc/conf/machine/e5500.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-fsl-ppc/conf/machine/e5500.inc b/meta-fsl-ppc/conf/machine/e5500.inc index 839fa26e..0fffdebb 100644 --- a/meta-fsl-ppc/conf/machine/e5500.inc +++ b/meta-fsl-ppc/conf/machine/e5500.inc @@ -6,7 +6,7 @@ MACHINE_FEATURES = "kernel26 keyboard pci ext2 ext3 serial" MACHINE_FEATURES_RRECOMMENDS = "" -#PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" +PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" PREFERRED_VERSION_virtual/kernel ?= "3.0.1" PREFERRED_PROVIDER_linux-libc-headers ?= "linux-qoriq-sdk-headers" -- cgit v1.2.3-54-g00ecf From 2cc7c4837fbae55e230277eb781dac3bff69c95d Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Thu, 5 Jan 2012 13:43:03 +0000 Subject: add usdpaa dts into KERNEL_DEVICETREE p2041rdb, p3041ds, p3060qds, p4080ds, p5020ds and p5020ds-64b Signed-off-by: Zhenhua Luo --- meta-fsl-ppc/conf/machine/p2041rdb.conf | 3 ++- meta-fsl-ppc/conf/machine/p3041ds.conf | 3 ++- meta-fsl-ppc/conf/machine/p3060qds.conf | 3 ++- meta-fsl-ppc/conf/machine/p4080ds.conf | 3 ++- meta-fsl-ppc/conf/machine/p5020ds-64b.conf | 3 ++- meta-fsl-ppc/conf/machine/p5020ds.conf | 3 ++- 6 files changed, 12 insertions(+), 6 deletions(-) diff --git a/meta-fsl-ppc/conf/machine/p2041rdb.conf b/meta-fsl-ppc/conf/machine/p2041rdb.conf index ab7ce5bc..83dc8523 100644 --- a/meta-fsl-ppc/conf/machine/p2041rdb.conf +++ b/meta-fsl-ppc/conf/machine/p2041rdb.conf @@ -4,5 +4,6 @@ require e500mc.inc UBOOT_MACHINES = "P2041RDB" -KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p2041rdb.dts" +KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p2041rdb.dts \ + ${S}/arch/powerpc/boot/dts/p2041rdb-usdpaa.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet32_smp_defconfig" diff --git a/meta-fsl-ppc/conf/machine/p3041ds.conf b/meta-fsl-ppc/conf/machine/p3041ds.conf index 5adcb224..83312920 100644 --- a/meta-fsl-ppc/conf/machine/p3041ds.conf +++ b/meta-fsl-ppc/conf/machine/p3041ds.conf @@ -4,5 +4,6 @@ require e500mc.inc UBOOT_MACHINES = "P3041DS" -KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p3041ds.dts" +KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p3041ds.dts \ + ${S}/arch/powerpc/boot/dts/p3041ds-usdpaa.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet32_smp_defconfig" diff --git a/meta-fsl-ppc/conf/machine/p3060qds.conf b/meta-fsl-ppc/conf/machine/p3060qds.conf index f6fc75e3..e8636ae1 100644 --- a/meta-fsl-ppc/conf/machine/p3060qds.conf +++ b/meta-fsl-ppc/conf/machine/p3060qds.conf @@ -4,5 +4,6 @@ require e500mc.inc UBOOT_MACHINES = "P3060QDS" -KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p3060qds.dts" +KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p3060qds.dts + ${S}/arch/powerpc/boot/dts/p3060qds-usdpaa.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet32_smp_defconfig" diff --git a/meta-fsl-ppc/conf/machine/p4080ds.conf b/meta-fsl-ppc/conf/machine/p4080ds.conf index 861ed3c6..96d082c6 100644 --- a/meta-fsl-ppc/conf/machine/p4080ds.conf +++ b/meta-fsl-ppc/conf/machine/p4080ds.conf @@ -4,5 +4,6 @@ require e500mc.inc UBOOT_MACHINES = "P4080DS" -KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p4080ds.dts" +KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p4080ds.dts \ + ${S}/arch/powerpc/boot/dts/p4080ds-usdpaa.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet32_smp_defconfig" diff --git a/meta-fsl-ppc/conf/machine/p5020ds-64b.conf b/meta-fsl-ppc/conf/machine/p5020ds-64b.conf index 6ff89627..7333643c 100644 --- a/meta-fsl-ppc/conf/machine/p5020ds-64b.conf +++ b/meta-fsl-ppc/conf/machine/p5020ds-64b.conf @@ -5,5 +5,6 @@ require e5500-64b.inc # TODO: fix 32bit build of u-boot for p5020ds-64b UBOOT_MACHINES = "P5020DS" -KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p5020ds.dts" +KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p5020ds.dts \ + ${S}/arch/powerpc/boot/dts/p5020ds-usdpaa.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet64_smp_defconfig" diff --git a/meta-fsl-ppc/conf/machine/p5020ds.conf b/meta-fsl-ppc/conf/machine/p5020ds.conf index a4a6d32b..296fd4e3 100644 --- a/meta-fsl-ppc/conf/machine/p5020ds.conf +++ b/meta-fsl-ppc/conf/machine/p5020ds.conf @@ -4,5 +4,6 @@ require e5500.inc UBOOT_MACHINES = "P5020DS" -KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p5020ds.dts" +KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p5020ds.dts \ + ${S}/arch/powerpc/boot/dts/p5020ds-usdpaa.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet32_smp_defconfig" -- cgit v1.2.3-54-g00ecf From 37e5680da79ce07c73ee7bf81de5492ff2d0eb73 Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Fri, 6 Jan 2012 11:48:30 -0600 Subject: Update fsl distro Signed-off-by: Matthew McClintock --- meta-fsl-ppc/conf/distro/fsl.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meta-fsl-ppc/conf/distro/fsl.conf b/meta-fsl-ppc/conf/distro/fsl.conf index 25bf9afb..686254ee 100644 --- a/meta-fsl-ppc/conf/distro/fsl.conf +++ b/meta-fsl-ppc/conf/distro/fsl.conf @@ -4,7 +4,7 @@ DISTRO_VERSION = "1.1" SDK_VENDOR = "-fslsdk" SDK_VERSION := "${@'${DISTRO_VERSION}'.replace('snapshot-${DATE}','snapshot')}" -MAINTAINER = "FSL " +MAINTAINER = "Matthew McClintock " TARGET_VENDOR = "-fsl" @@ -12,7 +12,7 @@ LOCALCONF_VERSION = "1" DISTRO_FEATURES_append = " largefile opengl" -SDK_NAME = "${DISTRO}-${TCLIBC}-${SDK_ARCH}-${PACKAGE_ARCH}" +SDK_NAME = "${DISTRO}-${TCLIBC}-${SDK_ARCH}-${TARGET_ARCH}" SDKPATH = "/opt/${DISTRO}/${SDK_VERSION}" DISTRO_EXTRA_RDEPENDS += "task-core-boot" -- cgit v1.2.3-54-g00ecf From db40c2c77a7405e3a153a8bf563bdafa1b1e9e2c Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Wed, 11 Jan 2012 10:41:27 -0600 Subject: p3060qds.conf: Fix typo Signed-off-by: Matthew McClintock --- meta-fsl-ppc/conf/machine/p3060qds.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-fsl-ppc/conf/machine/p3060qds.conf b/meta-fsl-ppc/conf/machine/p3060qds.conf index e8636ae1..dd872c93 100644 --- a/meta-fsl-ppc/conf/machine/p3060qds.conf +++ b/meta-fsl-ppc/conf/machine/p3060qds.conf @@ -4,6 +4,6 @@ require e500mc.inc UBOOT_MACHINES = "P3060QDS" -KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p3060qds.dts +KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p3060qds.dts \ ${S}/arch/powerpc/boot/dts/p3060qds-usdpaa.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet32_smp_defconfig" -- cgit v1.2.3-54-g00ecf From 7ec6d2f651c8b719bc5c60305b488bcfeb3621b8 Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Thu, 12 Jan 2012 11:15:45 -0600 Subject: make all IMAGE_FSTYPES overridable Signed-off-by: Matthew McClintock --- meta-fsl-ppc/conf/machine/e500mc.inc | 2 +- meta-fsl-ppc/conf/machine/e500v2.inc | 2 +- meta-fsl-ppc/conf/machine/e5500-64b.inc | 2 +- meta-fsl-ppc/conf/machine/e5500.inc | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/meta-fsl-ppc/conf/machine/e500mc.inc b/meta-fsl-ppc/conf/machine/e500mc.inc index b4a8b010..e79a91a9 100644 --- a/meta-fsl-ppc/conf/machine/e500mc.inc +++ b/meta-fsl-ppc/conf/machine/e500mc.inc @@ -11,7 +11,7 @@ PREFERRED_VERSION_virtual/kernel = "3.0.1" PREFERRED_PROVIDER_linux-libc-headers = "linux-qoriq-sdk-headers" KERNEL_IMAGETYPE = "uImage" -IMAGE_FSTYPES = "tar.gz ext2.gz.u-boot" +IMAGE_FSTYPES ?= "tar.gz ext2.gz.u-boot" # disable the images below for now # ext2.bz2 ext2.lzma \ # ext2.gz.u-boot ext2.bz2.u-boot ext2.lzma.u-boot" diff --git a/meta-fsl-ppc/conf/machine/e500v2.inc b/meta-fsl-ppc/conf/machine/e500v2.inc index 16408e2d..2bed583d 100644 --- a/meta-fsl-ppc/conf/machine/e500v2.inc +++ b/meta-fsl-ppc/conf/machine/e500v2.inc @@ -10,7 +10,7 @@ PREFERRED_VERSION_virtual/kernel = "3.0.1" PREFERRED_PROVIDER_linux-libc-headers = "linux-qoriq-sdk-headers" KERNEL_IMAGETYPE = "uImage" -IMAGE_FSTYPES = "tar.gz ext2.gz.u-boot" +IMAGE_FSTYPES ?= "tar.gz ext2.gz.u-boot" # disable the images below for now # ext2.bz2 ext2.lzma \ # ext2.gz.u-boot ext2.bz2.u-boot ext2.lzma.u-boot" diff --git a/meta-fsl-ppc/conf/machine/e5500-64b.inc b/meta-fsl-ppc/conf/machine/e5500-64b.inc index 2393cfd3..069349aa 100644 --- a/meta-fsl-ppc/conf/machine/e5500-64b.inc +++ b/meta-fsl-ppc/conf/machine/e5500-64b.inc @@ -11,7 +11,7 @@ PREFERRED_VERSION_virtual/kernel = "3.0.1" PREFERRED_PROVIDER_linux-libc-headers = "linux-qoriq-sdk-headers" KERNEL_IMAGETYPE = "uImage" -IMAGE_FSTYPES = "tar.gz ext2.gz.u-boot" +IMAGE_FSTYPES ?= "tar.gz ext2.gz.u-boot" # disable the images below for now # ext2.bz2 ext2.lzma \ # ext2.gz.u-boot ext2.bz2.u-boot ext2.lzma.u-boot" diff --git a/meta-fsl-ppc/conf/machine/e5500.inc b/meta-fsl-ppc/conf/machine/e5500.inc index 0fffdebb..ca9cfd32 100644 --- a/meta-fsl-ppc/conf/machine/e5500.inc +++ b/meta-fsl-ppc/conf/machine/e5500.inc @@ -11,7 +11,7 @@ PREFERRED_VERSION_virtual/kernel ?= "3.0.1" PREFERRED_PROVIDER_linux-libc-headers ?= "linux-qoriq-sdk-headers" KERNEL_IMAGETYPE = "uImage" -IMAGE_FSTYPES = "tar.gz ext2.gz.u-boot" +IMAGE_FSTYPES ?= "tar.gz ext2.gz.u-boot" # disable the images below for now # ext2.bz2 ext2.lzma \ # ext2.gz.u-boot ext2.bz2.u-boot ext2.lzma.u-boot" -- cgit v1.2.3-54-g00ecf From f697ac6494f7fdc05edbd09bf678f5608f04df32 Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Thu, 19 Jan 2012 13:08:45 -0600 Subject: Move default images types built into image recipes Signed-off-by: Matthew McClintock --- meta-fsl-ppc/conf/machine/e500mc.inc | 1 - meta-fsl-ppc/conf/machine/e500v2.inc | 1 - meta-fsl-ppc/conf/machine/e5500-64b.inc | 1 - meta-fsl-ppc/conf/machine/e5500.inc | 1 - meta-fsl-ppc/images/fsl-image-lsb-sdk.bb | 2 ++ meta-fsl-ppc/images/fsl-image-lsb.bb | 2 ++ meta-fsl-ppc/images/fsl-image-minimal.bb | 2 ++ 7 files changed, 6 insertions(+), 4 deletions(-) diff --git a/meta-fsl-ppc/conf/machine/e500mc.inc b/meta-fsl-ppc/conf/machine/e500mc.inc index e79a91a9..a8eb16b3 100644 --- a/meta-fsl-ppc/conf/machine/e500mc.inc +++ b/meta-fsl-ppc/conf/machine/e500mc.inc @@ -11,7 +11,6 @@ PREFERRED_VERSION_virtual/kernel = "3.0.1" PREFERRED_PROVIDER_linux-libc-headers = "linux-qoriq-sdk-headers" KERNEL_IMAGETYPE = "uImage" -IMAGE_FSTYPES ?= "tar.gz ext2.gz.u-boot" # disable the images below for now # ext2.bz2 ext2.lzma \ # ext2.gz.u-boot ext2.bz2.u-boot ext2.lzma.u-boot" diff --git a/meta-fsl-ppc/conf/machine/e500v2.inc b/meta-fsl-ppc/conf/machine/e500v2.inc index 2bed583d..d529b3f9 100644 --- a/meta-fsl-ppc/conf/machine/e500v2.inc +++ b/meta-fsl-ppc/conf/machine/e500v2.inc @@ -10,7 +10,6 @@ PREFERRED_VERSION_virtual/kernel = "3.0.1" PREFERRED_PROVIDER_linux-libc-headers = "linux-qoriq-sdk-headers" KERNEL_IMAGETYPE = "uImage" -IMAGE_FSTYPES ?= "tar.gz ext2.gz.u-boot" # disable the images below for now # ext2.bz2 ext2.lzma \ # ext2.gz.u-boot ext2.bz2.u-boot ext2.lzma.u-boot" diff --git a/meta-fsl-ppc/conf/machine/e5500-64b.inc b/meta-fsl-ppc/conf/machine/e5500-64b.inc index 069349aa..03cb2dbc 100644 --- a/meta-fsl-ppc/conf/machine/e5500-64b.inc +++ b/meta-fsl-ppc/conf/machine/e5500-64b.inc @@ -11,7 +11,6 @@ PREFERRED_VERSION_virtual/kernel = "3.0.1" PREFERRED_PROVIDER_linux-libc-headers = "linux-qoriq-sdk-headers" KERNEL_IMAGETYPE = "uImage" -IMAGE_FSTYPES ?= "tar.gz ext2.gz.u-boot" # disable the images below for now # ext2.bz2 ext2.lzma \ # ext2.gz.u-boot ext2.bz2.u-boot ext2.lzma.u-boot" diff --git a/meta-fsl-ppc/conf/machine/e5500.inc b/meta-fsl-ppc/conf/machine/e5500.inc index ca9cfd32..471bb22d 100644 --- a/meta-fsl-ppc/conf/machine/e5500.inc +++ b/meta-fsl-ppc/conf/machine/e5500.inc @@ -11,7 +11,6 @@ PREFERRED_VERSION_virtual/kernel ?= "3.0.1" PREFERRED_PROVIDER_linux-libc-headers ?= "linux-qoriq-sdk-headers" KERNEL_IMAGETYPE = "uImage" -IMAGE_FSTYPES ?= "tar.gz ext2.gz.u-boot" # disable the images below for now # ext2.bz2 ext2.lzma \ # ext2.gz.u-boot ext2.bz2.u-boot ext2.lzma.u-boot" diff --git a/meta-fsl-ppc/images/fsl-image-lsb-sdk.bb b/meta-fsl-ppc/images/fsl-image-lsb-sdk.bb index 04b941b1..c4fff429 100644 --- a/meta-fsl-ppc/images/fsl-image-lsb-sdk.bb +++ b/meta-fsl-ppc/images/fsl-image-lsb-sdk.bb @@ -14,3 +14,5 @@ IMAGE_INSTALL = "\ " inherit core-image + +IMAGE_FSTYPES ?= "nfsroot" diff --git a/meta-fsl-ppc/images/fsl-image-lsb.bb b/meta-fsl-ppc/images/fsl-image-lsb.bb index bb743b49..47f4c38d 100644 --- a/meta-fsl-ppc/images/fsl-image-lsb.bb +++ b/meta-fsl-ppc/images/fsl-image-lsb.bb @@ -8,3 +8,5 @@ IMAGE_INSTALL = "\ " inherit core-image + +IMAGE_FSTYPES ?= "nfsroot" diff --git a/meta-fsl-ppc/images/fsl-image-minimal.bb b/meta-fsl-ppc/images/fsl-image-minimal.bb index 74bce63f..a290d8be 100644 --- a/meta-fsl-ppc/images/fsl-image-minimal.bb +++ b/meta-fsl-ppc/images/fsl-image-minimal.bb @@ -12,3 +12,5 @@ IMAGE_ROOTFS_SIZE = "8192" # remove not needed ipkg informations ROOTFS_POSTPROCESS_COMMAND += "remove_packaging_data_files ; " + +IMAGE_FSTYPES ?= "tar.gz ext2.gz.u-boot" -- cgit v1.2.3-54-g00ecf From 4010c70e2eff9fe02965e0117a4daff5e49af4a9 Mon Sep 17 00:00:00 2001 From: Diana CRACIUN Date: Tue, 24 Jan 2012 16:02:33 +0000 Subject: Added the proper terminal support for Linux under Hypervisor. Under Hypervisor, Linux is using ttyEHV0. Signed-off-by: Diana CRACIUN --- meta-fsl-ppc/conf/distro/fsl.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-fsl-ppc/conf/distro/fsl.conf b/meta-fsl-ppc/conf/distro/fsl.conf index 686254ee..16590b93 100644 --- a/meta-fsl-ppc/conf/distro/fsl.conf +++ b/meta-fsl-ppc/conf/distro/fsl.conf @@ -54,4 +54,4 @@ FREESCALE_GIT = "git://git.am.freescale.net" SYSVINIT_ENABLED_GETTYS = "" USE_VT = "" -SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1" +SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" -- cgit v1.2.3-54-g00ecf From e6e723489baca418ab917ece69eee25599935a63 Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Wed, 8 Feb 2012 12:49:35 -0600 Subject: u-boot: fixup building multiple images and add thsoe images for p1020rdb to start with Signed-off-by: Matthew McClintock --- meta-fsl-ppc/conf/machine/p1020rdb.conf | 4 +++- meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb | 26 ++++++++++++------------ 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/meta-fsl-ppc/conf/machine/p1020rdb.conf b/meta-fsl-ppc/conf/machine/p1020rdb.conf index 87ef1ce7..1d046b4c 100644 --- a/meta-fsl-ppc/conf/machine/p1020rdb.conf +++ b/meta-fsl-ppc/conf/machine/p1020rdb.conf @@ -3,6 +3,8 @@ require e500v2.inc -UBOOT_MACHINES = "P1020RDB" +BOOTFORMAT_CONFIG = "config_ddr3_1gb_p1_p2_rdb_pc_667M.dat" +UBOOT_MACHINES = "P1020RDB P1020RDB-PC P1020RDB-PC_SPIFLASH P1020RDB-PC_NAND P1020RDB-PC_SDCARD" + KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p1020rdb.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" diff --git a/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb b/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb index 17097b0c..25bc2e51 100644 --- a/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb +++ b/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb @@ -42,8 +42,8 @@ do_compile () { oe_runmake O=${board} all case "${board}" in - *SDCARD*) UBOOT_TARGET="u-bootx-sd";; - *SPIFLASH*) UBOOT_TARGET="u-bootx-spi";; + *SDCARD*) UBOOT_TARGET="u-boot-sd";; + *SPIFLASH*) UBOOT_TARGET="u-boot-spi";; *) UBOOT_TARGET="";; esac @@ -62,16 +62,16 @@ do_install(){ for board in ${UBOOT_MACHINES}; do case "${board}" in - *SDCARD*) UBOOT_TARGET="u-bootx-sd";; - *SPIFLASH*) UBOOT_TARGET="u-bootx-spi";; + *SDCARD*) UBOOT_TARGET="u-boot-sd";; + *SPIFLASH*) UBOOT_TARGET="u-boot-spi";; *NAND*) UBOOT_TARGET="u-boot-nand";; *) UBOOT_TARGET="u-boot";; esac if [ -f ${S}/${UBOOT_TARGET}.bin ]; then mkdir -p ${D}/boot/ - install ${S}/${board}/${UBOOT_TARGET}.bin ${D}/boot/${UBOOT_TARGET}-${MACHINE}-${PV}-${PR}.bin - ln -sf ${UBOOT_TARGET}-${MACHINE}-${PV}-${PR}.bin ${D}/boot/${UBOOT_TARGET}.bin + install ${S}/${board}/${UBOOT_TARGET}.bin ${D}/boot/${UBOOT_TARGET}-${board}-${PV}-${PR}.bin + ln -sf ${UBOOT_TARGET}-${board}-${PV}-${PR}.bin ${D}/boot/${UBOOT_TARGET}.bin fi done } @@ -83,8 +83,8 @@ do_deploy(){ for board in ${UBOOT_MACHINES}; do case "${board}" in - *SDCARD*) UBOOT_TARGET="u-bootx-sd";; - *SPIFLASH*) UBOOT_TARGET="u-bootx-spi";; + *SDCARD*) UBOOT_TARGET="u-boot-sd";; + *SPIFLASH*) UBOOT_TARGET="u-boot-spi";; *NAND*) UBOOT_TARGET="u-boot-nand";; *) UBOOT_TARGET="u-boot";; esac @@ -94,15 +94,15 @@ do_deploy(){ install ${S}/${board}/${UBOOT_TARGET}.bin ${DEPLOY_DIR_IMAGE}/${UBOOT_TARGET}-${MACHINE}-${PV}-${PR}.bin cd ${DEPLOY_DIR_IMAGE} - rm -f ${UBOOT_TARGET}-${MACHINE}.bin - ln -sf ${UBOOT_TARGET}-${MACHINE}-${PV}-${PR}.bin ${UBOOT_TARGET}-${MACHINE}.bin + rm -f ${UBOOT_TARGET}-${board}.bin + ln -sf ${UBOOT_TARGET}-${board}-${PV}-${PR}.bin ${UBOOT_TARGET}-${board}.bin mkdir -p ${DEPLOYDIR} - install ${S}/${board}/${UBOOT_TARGET}.bin ${DEPLOYDIR}/${UBOOT_TARGET}-${MACHINE}-${PV}-${PR}.bin + install ${S}/${board}/${UBOOT_TARGET}.bin ${DEPLOYDIR}/${UBOOT_TARGET}-${board}-${PV}-${PR}.bin cd ${DEPLOYDIR} - rm -f ${UBOOT_TARGET}-${MACHINE}.bin - ln -sf ${UBOOT_TARGET}-${MACHINE}-${PV}-${PR}.bin ${UBOOT_TARGET}-${MACHINE}.bin + rm -f ${UBOOT_TARGET}-${board}.bin + ln -sf ${UBOOT_TARGET}-${board}-${PV}-${PR}.bin ${UBOOT_TARGET}-${board}.bin fi done } -- cgit v1.2.3-54-g00ecf From 94b4659dc8a292d4db1e2da342081ff800fc13d3 Mon Sep 17 00:00:00 2001 From: Chunrong Guo Date: Mon, 20 Feb 2012 16:12:33 +0000 Subject: conf/machine/p5040ds.conf Signed-off-by:ChunRong Guo --- meta-fsl-ppc/conf/machine/p5040ds.conf | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 meta-fsl-ppc/conf/machine/p5040ds.conf diff --git a/meta-fsl-ppc/conf/machine/p5040ds.conf b/meta-fsl-ppc/conf/machine/p5040ds.conf new file mode 100644 index 00000000..f980b0c0 --- /dev/null +++ b/meta-fsl-ppc/conf/machine/p5040ds.conf @@ -0,0 +1,9 @@ +#@TYPE: Machine +#@DESCRIPTION: Machine configuration for running + +require e5500.inc + +UBOOT_MACHINES = "P5040DS" +KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p5040ds.dts \ + ${S}/arch/powerpc/boot/dts/p5040ds-usdpaa.dts" +KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet32_smp_defconfig" -- cgit v1.2.3-54-g00ecf From da7ecb429d56958d02724475b6ed2863b9a6a3d1 Mon Sep 17 00:00:00 2001 From: Chunrong Guo Date: Mon, 20 Feb 2012 16:12:32 +0000 Subject: conf/machine/mpc8544ds.conf Signed-off-by: ChunRong Guo --- meta-fsl-ppc/conf/machine/mpc8544ds.conf | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 meta-fsl-ppc/conf/machine/mpc8544ds.conf diff --git a/meta-fsl-ppc/conf/machine/mpc8544ds.conf b/meta-fsl-ppc/conf/machine/mpc8544ds.conf new file mode 100644 index 00000000..39e2aaed --- /dev/null +++ b/meta-fsl-ppc/conf/machine/mpc8544ds.conf @@ -0,0 +1,9 @@ +#@TYPE: Machine +#@Name: Freescale MPC8544DS +#@DESCRIPTION: Machine configuration for the Freescale MPC8544DS + +require e500v2.inc + +UBOOT_MACHINES = "MPC8544DS" +KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/mpc8544ds.dts" +KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_defconfig" -- cgit v1.2.3-54-g00ecf From 3beadeea07f02c9c4a43db259213cf71d52526c8 Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Thu, 23 Feb 2012 13:40:11 +0000 Subject: mtd-utils: fix corrupt cleanmarker with flash_erase -j command patch is got from http://patchwork.ozlabs.org/patch/108873/ Signed-off-by: Zhenhua Luo --- ...t-cleanmarker-with-flash_erase--j-command.patch | 132 +++++++++++++++++++++ .../recipes-devtools/mtd/mtd-utils_1.4.6.bbappend | 3 + 2 files changed, 135 insertions(+) create mode 100644 meta-fsl-ppc/recipes-devtools/mtd/mtd-utils-1.4.6/mtd-utils-fix-corrupt-cleanmarker-with-flash_erase--j-command.patch create mode 100644 meta-fsl-ppc/recipes-devtools/mtd/mtd-utils_1.4.6.bbappend diff --git a/meta-fsl-ppc/recipes-devtools/mtd/mtd-utils-1.4.6/mtd-utils-fix-corrupt-cleanmarker-with-flash_erase--j-command.patch b/meta-fsl-ppc/recipes-devtools/mtd/mtd-utils-1.4.6/mtd-utils-fix-corrupt-cleanmarker-with-flash_erase--j-command.patch new file mode 100644 index 00000000..2823c657 --- /dev/null +++ b/meta-fsl-ppc/recipes-devtools/mtd/mtd-utils-1.4.6/mtd-utils-fix-corrupt-cleanmarker-with-flash_erase--j-command.patch @@ -0,0 +1,132 @@ +From patchwork Mon Aug 8 08:16:43 2011 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +Subject: mtd-utils: fix corrupt cleanmarker with flash_erase -j command +Date: Sun, 07 Aug 2011 22:16:43 -0000 +From: b35362@freescale.com +X-Patchwork-Id: 108873 +Message-Id: <1312791403-13473-1-git-send-email-b35362@freescale.com> +To: +Cc: Liu Shuo , Artem.Bityutskiy@nokia.com, + Li Yang , linux-mtd@lists.infradead.org + +From: Liu Shuo + +Flash_erase -j should fill discrete freeoob areas with required bytes +of JFFS2 cleanmarker in jffs2_check_nand_cleanmarker(). Not just fill +the first freeoob area. + +The below is the result without this workaround: + +JFFS2: Erase block at 0x00000000 is not formatted. It will be erased +JFFS2: Erase block at 0x00004000 is not formatted. It will be erased +JFFS2: Erase block at 0x00008000 is not formatted. It will be erased +JFFS2: Erase block at 0x0000c000 is not formatted. It will be erased +JFFS2: Erase block at 0x00010000 is not formatted. It will be erased +JFFS2: Erase block at 0x00014000 is not formatted. It will be erased +JFFS2: Erase block at 0x00018000 is not formatted. It will be erased +JFFS2: Erase block at 0x0001c000 is not formatted. It will be erased +JFFS2: Erase block at 0x00020000 is not formatted. It will be erased +JFFS2: Erase block at 0x00024000 is not formatted. It will be erased +JFFS2: Erase block at 0x00028000 is not formatted. It will be erased +... + +Signed-off-by: Liu Shuo +Signed-off-by: Li Yang + +--- +v2 : get length of availble freeoob bytes from oobinfo information, + not use the ioctl ECCGETLAYOUT which is being deprecated. + + flash_erase.c | 46 +++++++++++++++++++++++++++++++++++++++------- + 1 files changed, 39 insertions(+), 7 deletions(-) + +diff --git a/flash_erase.c b/flash_erase.c +index fe2eaca..3e94495 100644 +--- a/flash_erase.c ++++ b/flash_erase.c +@@ -98,6 +98,7 @@ int main(int argc, char *argv[]) + int isNAND; + int error = 0; + uint64_t offset = 0; ++ void *oob_data = NULL; + + /* + * Process user arguments +@@ -197,15 +198,43 @@ int main(int argc, char *argv[]) + if (ioctl(fd, MEMGETOOBSEL, &oobinfo) != 0) + return sys_errmsg("%s: unable to get NAND oobinfo", mtd_device); + ++ cleanmarker.totlen = cpu_to_je32(8); + /* Check for autoplacement */ + if (oobinfo.useecc == MTD_NANDECC_AUTOPLACE) { +- /* Get the position of the free bytes */ +- if (!oobinfo.oobfree[0][1]) ++ struct nand_ecclayout_user ecclayout; ++ int i, oobavail; ++ ++ for (i = 0, oobavail = 0; oobinfo.oobfree[i][1]; i++) ++ oobavail += oobinfo.oobfree[i][1]; ++ ++ if (!oobavail) + return errmsg(" Eeep. Autoplacement selected and no empty space in oob"); ++ ++ /* Get the position of the free bytes */ + clmpos = oobinfo.oobfree[0][0]; +- clmlen = oobinfo.oobfree[0][1]; +- if (clmlen > 8) +- clmlen = 8; ++ clmlen = MIN(oobavail, 8); ++ ++ if (oobinfo.oobfree[0][1] < 8 && oobavail >= 8) { ++ int left, n, last = 0; ++ void *cm; ++ ++ oob_data = malloc(mtd.oob_size); ++ if (!oob_data) ++ return -ENOMEM; ++ ++ memset(oob_data, 0xff, mtd.oob_size); ++ cm = &cleanmarker; ++ for (i = 0, left = clmlen; left ; i++) { ++ n = MIN(left, oobinfo.oobfree[i][1]); ++ memcpy(oob_data + oobinfo.oobfree[i][0], ++ cm, n); ++ left -= n; ++ cm += n; ++ last = oobinfo.oobfree[i][0] + n; ++ } ++ ++ clmlen = last - clmpos; ++ } + } else { + /* Legacy mode */ + switch (mtd.oob_size) { +@@ -223,7 +252,6 @@ int main(int argc, char *argv[]) + break; + } + } +- cleanmarker.totlen = cpu_to_je32(8); + } + cleanmarker.hdr_crc = cpu_to_je32(mtd_crc32(0, &cleanmarker, sizeof(cleanmarker) - 4)); + } +@@ -272,7 +300,8 @@ int main(int argc, char *argv[]) + + /* write cleanmarker */ + if (isNAND) { +- if (mtd_write_oob(mtd_desc, &mtd, fd, offset + clmpos, clmlen, &cleanmarker) != 0) { ++ void *data = oob_data ? oob_data + clmpos : &cleanmarker; ++ if (mtd_write_oob(mtd_desc, &mtd, fd, offset + clmpos, clmlen, data) != 0) { + sys_errmsg("%s: MTD writeoob failure", mtd_device); + continue; + } +@@ -291,5 +320,8 @@ int main(int argc, char *argv[]) + show_progress(&mtd, offset, eb, eb_start, eb_cnt); + bareverbose(!quiet, "\n"); + ++ if (oob_data) ++ free(oob_data); ++ + return 0; + } diff --git a/meta-fsl-ppc/recipes-devtools/mtd/mtd-utils_1.4.6.bbappend b/meta-fsl-ppc/recipes-devtools/mtd/mtd-utils_1.4.6.bbappend new file mode 100644 index 00000000..2d963688 --- /dev/null +++ b/meta-fsl-ppc/recipes-devtools/mtd/mtd-utils_1.4.6.bbappend @@ -0,0 +1,3 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/mtd-utils-1.4.6:" + +SRC_URI += "file://mtd-utils-fix-corrupt-cleanmarker-with-flash_erase--j-command.patch" -- cgit v1.2.3-54-g00ecf From 73501b842727c1e3e770943d45921d2ff803792f Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Wed, 22 Feb 2012 16:56:11 -0600 Subject: update p5020ds to use common tune file instead of diff ones for 32/64 bit Signed-off-by: Matthew McClintock --- meta-fsl-ppc/conf/machine/e5500-64b.inc | 3 ++- meta-fsl-ppc/conf/machine/e5500.inc | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/meta-fsl-ppc/conf/machine/e5500-64b.inc b/meta-fsl-ppc/conf/machine/e5500-64b.inc index 03cb2dbc..4e460531 100644 --- a/meta-fsl-ppc/conf/machine/e5500-64b.inc +++ b/meta-fsl-ppc/conf/machine/e5500-64b.inc @@ -1,6 +1,7 @@ TARGET_FPU = "hard" -require conf/machine/include/tune-ppce5500-64b.inc +DEFAULTTUNE ?= "ppc64e5500" +require conf/machine/include/tune-ppce5500.inc MACHINE_FEATURES = "kernel26 keyboard pci ext2 ext3 serial" MACHINE_FEATURES_RRECOMMENDS = "" diff --git a/meta-fsl-ppc/conf/machine/e5500.inc b/meta-fsl-ppc/conf/machine/e5500.inc index 471bb22d..4ec51ce0 100644 --- a/meta-fsl-ppc/conf/machine/e5500.inc +++ b/meta-fsl-ppc/conf/machine/e5500.inc @@ -1,6 +1,6 @@ TARGET_FPU = "hard" -require conf/machine/include/tune-ppce5500-32b.inc +require conf/machine/include/tune-ppce5500.inc MACHINE_FEATURES = "kernel26 keyboard pci ext2 ext3 serial" MACHINE_FEATURES_RRECOMMENDS = "" -- cgit v1.2.3-54-g00ecf From 5cb85a53b3e33d42ae4cbb2e3f1d5cbb5cab709d Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Fri, 24 Feb 2012 09:48:05 +0000 Subject: busybox: fix the build error when enable CONFIG_TCPSVD These patches were pulled from upstream busybox Signed-off-by: Zhenhua Luo --- ...bbb.h-do-not-use-homegrown-struct-sysinfo.patch | 54 ++++++++++++ ...around-sysinfo.h-versus-linux-.h-problems.patch | 95 ++++++++++++++++++++++ .../recipes-append/busybox/busybox_1.18.5.bbappend | 5 ++ 3 files changed, 154 insertions(+) create mode 100644 meta-fsl-ppc/recipes-append/busybox/busybox-1.18.5/0001-libbb.h-do-not-use-homegrown-struct-sysinfo.patch create mode 100644 meta-fsl-ppc/recipes-append/busybox/busybox-1.18.5/0002-work-around-sysinfo.h-versus-linux-.h-problems.patch create mode 100644 meta-fsl-ppc/recipes-append/busybox/busybox_1.18.5.bbappend diff --git a/meta-fsl-ppc/recipes-append/busybox/busybox-1.18.5/0001-libbb.h-do-not-use-homegrown-struct-sysinfo.patch b/meta-fsl-ppc/recipes-append/busybox/busybox-1.18.5/0001-libbb.h-do-not-use-homegrown-struct-sysinfo.patch new file mode 100644 index 00000000..ab0c48f7 --- /dev/null +++ b/meta-fsl-ppc/recipes-append/busybox/busybox-1.18.5/0001-libbb.h-do-not-use-homegrown-struct-sysinfo.patch @@ -0,0 +1,54 @@ +From b87113587ed488ee10f621bde099766e13088923 Mon Sep 17 00:00:00 2001 +From: Denys Vlasenko +Date: Mon, 25 Jul 2011 09:05:43 +0000 +Subject: [PATCH 1/2] libbb.h: do not use homegrown struct sysinfo. + +Signed-off-by: Denys Vlasenko +--- + include/libbb.h | 23 ++++------------------- + 1 files changed, 4 insertions(+), 19 deletions(-) + +diff --git a/include/libbb.h b/include/libbb.h +index 7c1db3f..afe3b61 100644 +--- a/include/libbb.h ++++ b/include/libbb.h +@@ -44,6 +44,10 @@ + #ifdef HAVE_SYS_STATFS_H + # include + #endif ++/* struct sysinfo is linux-specific */ ++#ifdef __linux__ ++# include ++#endif + #if ENABLE_SELINUX + # include + # include +@@ -100,25 +104,6 @@ int klogctl(int type, char *b, int len); + #if !defined __FreeBSD__ + char *dirname(char *path); + #endif +-/* Include our own copy of struct sysinfo to avoid binary compatibility +- * problems with Linux 2.4, which changed things. Grumble, grumble. */ +-struct sysinfo { +- long uptime; /* Seconds since boot */ +- unsigned long loads[3]; /* 1, 5, and 15 minute load averages */ +- unsigned long totalram; /* Total usable main memory size */ +- unsigned long freeram; /* Available memory size */ +- unsigned long sharedram; /* Amount of shared memory */ +- unsigned long bufferram; /* Memory used by buffers */ +- unsigned long totalswap; /* Total swap space size */ +- unsigned long freeswap; /* swap space still available */ +- unsigned short procs; /* Number of current processes */ +- unsigned short pad; /* Padding needed for m68k */ +- unsigned long totalhigh; /* Total high memory size */ +- unsigned long freehigh; /* Available high memory size */ +- unsigned int mem_unit; /* Memory unit size in bytes */ +- char _f[20 - 2 * sizeof(long) - sizeof(int)]; /* Padding: libc5 uses this.. */ +-}; +-int sysinfo(struct sysinfo* info); + #ifndef PATH_MAX + # define PATH_MAX 256 + #endif +-- +1.7.5 + diff --git a/meta-fsl-ppc/recipes-append/busybox/busybox-1.18.5/0002-work-around-sysinfo.h-versus-linux-.h-problems.patch b/meta-fsl-ppc/recipes-append/busybox/busybox-1.18.5/0002-work-around-sysinfo.h-versus-linux-.h-problems.patch new file mode 100644 index 00000000..4d4d1756 --- /dev/null +++ b/meta-fsl-ppc/recipes-append/busybox/busybox-1.18.5/0002-work-around-sysinfo.h-versus-linux-.h-problems.patch @@ -0,0 +1,95 @@ +From f0256fb16d37061e04ca966da9d51d8eb205bc89 Mon Sep 17 00:00:00 2001 +From: Denys Vlasenko +Date: Tue, 26 Jul 2011 11:42:12 +0000 +Subject: *: work around sysinfo.h versus linux/*.h problems + +Signed-off-by: Denys Vlasenko +--- + include/libbb.h | 10 ++++++---- + init/init.c | 3 ++- + procps/free.c | 3 +++ + procps/ps.c | 3 +++ + procps/uptime.c | 4 ++++ + 5 files changed, 18 insertions(+), 5 deletions(-) + +diff --git a/include/libbb.h b/include/libbb.h +index afe3b61..9fcd770 100644 +--- a/include/libbb.h ++++ b/include/libbb.h +@@ -44,10 +44,12 @@ + #ifdef HAVE_SYS_STATFS_H + # include + #endif +-/* struct sysinfo is linux-specific */ +-#ifdef __linux__ +-# include +-#endif ++/* Don't do this here: ++ * #include ++ * Some linux/ includes pull in conflicting definition ++ * of struct sysinfo (only in some toolchanins), which breaks build. ++ * Include sys/sysinfo.h only in those files which need it. ++ */ + #if ENABLE_SELINUX + # include + # include +diff --git a/init/init.c b/init/init.c +index 0a0d503..5121b94 100644 +--- a/init/init.c ++++ b/init/init.c +@@ -113,7 +113,8 @@ + #include + #include + #ifdef __linux__ +-#include ++# include ++# include + #endif + #if ENABLE_FEATURE_UTMP + # include /* DEAD_PROCESS */ +diff --git a/procps/free.c b/procps/free.c +index efbac5b..706be1b 100644 +--- a/procps/free.c ++++ b/procps/free.c +@@ -10,6 +10,9 @@ + /* getopt not needed */ + + #include "libbb.h" ++#ifdef __linux__ ++# include ++#endif + + struct globals { + unsigned mem_unit; +diff --git a/procps/ps.c b/procps/ps.c +index 48b55a7..e9e6ca9 100644 +--- a/procps/ps.c ++++ b/procps/ps.c +@@ -16,6 +16,9 @@ enum { MAX_WIDTH = 2*1024 }; + + #if ENABLE_DESKTOP + ++#ifdef __linux__ ++# include ++#endif + #include /* for times() */ + #ifndef AT_CLKTCK + #define AT_CLKTCK 17 +diff --git a/procps/uptime.c b/procps/uptime.c +index 5c48795..eda782c 100644 +--- a/procps/uptime.c ++++ b/procps/uptime.c +@@ -16,6 +16,10 @@ + /* getopt not needed */ + + #include "libbb.h" ++#ifdef __linux__ ++# include ++#endif ++ + + #ifndef FSHIFT + # define FSHIFT 16 /* nr of bits of precision */ +-- +1.7.5 + diff --git a/meta-fsl-ppc/recipes-append/busybox/busybox_1.18.5.bbappend b/meta-fsl-ppc/recipes-append/busybox/busybox_1.18.5.bbappend new file mode 100644 index 00000000..b285c16c --- /dev/null +++ b/meta-fsl-ppc/recipes-append/busybox/busybox_1.18.5.bbappend @@ -0,0 +1,5 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/busybox-1.18.5:" + +SRC_URI += "file://0001-libbb.h-do-not-use-homegrown-struct-sysinfo.patch \ + file://0002-work-around-sysinfo.h-versus-linux-.h-problems.patch \ +" -- cgit v1.2.3-54-g00ecf From 0518066b120ab6bb9a750c21e54d9a7b3444abab Mon Sep 17 00:00:00 2001 From: Chunrong Guo Date: Fri, 24 Feb 2012 09:29:10 +0000 Subject: u-boot: add additional u-boot images for all Freescale boards Signed-off-by:Chunrong Guo --- meta-fsl-ppc/conf/machine/mpc8536ds.conf | 3 ++- meta-fsl-ppc/conf/machine/p1020mbg.conf | 3 ++- meta-fsl-ppc/conf/machine/p1020rdb.conf | 4 ++-- meta-fsl-ppc/conf/machine/p1020utm.conf | 3 ++- meta-fsl-ppc/conf/machine/p1021rdb.conf | 4 ++-- meta-fsl-ppc/conf/machine/p1022ds.conf | 3 ++- meta-fsl-ppc/conf/machine/p1024rdb.conf | 3 ++- meta-fsl-ppc/conf/machine/p1025rdb.conf | 4 +++- meta-fsl-ppc/conf/machine/p2020ds.conf | 6 ++---- meta-fsl-ppc/conf/machine/p2020rdb.conf | 3 ++- 10 files changed, 21 insertions(+), 15 deletions(-) diff --git a/meta-fsl-ppc/conf/machine/mpc8536ds.conf b/meta-fsl-ppc/conf/machine/mpc8536ds.conf index 171233b2..e60292e3 100644 --- a/meta-fsl-ppc/conf/machine/mpc8536ds.conf +++ b/meta-fsl-ppc/conf/machine/mpc8536ds.conf @@ -4,6 +4,7 @@ require e500v2.inc -UBOOT_MACHINES = "MPC8536DS" +BOOTFORMAT_CONFIG = "config_ddr2_512m_mpc8536ds_667M.dat" +UBOOT_MACHINES = "MPC8536DS MPC8536DS_36BIT MPC8536DS_NAND MPC8536DS_SDCARD MPC8536DS_SPIFLASH" KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/mpc8536ds.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_defconfig" diff --git a/meta-fsl-ppc/conf/machine/p1020mbg.conf b/meta-fsl-ppc/conf/machine/p1020mbg.conf index ba1de3c8..5bb8436b 100644 --- a/meta-fsl-ppc/conf/machine/p1020mbg.conf +++ b/meta-fsl-ppc/conf/machine/p1020mbg.conf @@ -4,6 +4,7 @@ require e500v2.inc -UBOOT_MACHINES = "P1020MBG-PC" +BOOTFORMAT_CONFIG = "config_ddr3_1gb_p1_p2_rdb_pc_800M.dat" +UBOOT_MACHINES = "P1020MBG-PC P1020MBG-PC_SDCARD P1020MBG-PC_36BIT P1020MBG-PC_36BIT_SDCARD" KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p1020mbg.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" diff --git a/meta-fsl-ppc/conf/machine/p1020rdb.conf b/meta-fsl-ppc/conf/machine/p1020rdb.conf index 1d046b4c..d9b6579f 100644 --- a/meta-fsl-ppc/conf/machine/p1020rdb.conf +++ b/meta-fsl-ppc/conf/machine/p1020rdb.conf @@ -3,8 +3,8 @@ require e500v2.inc -BOOTFORMAT_CONFIG = "config_ddr3_1gb_p1_p2_rdb_pc_667M.dat" -UBOOT_MACHINES = "P1020RDB P1020RDB-PC P1020RDB-PC_SPIFLASH P1020RDB-PC_NAND P1020RDB-PC_SDCARD" +BOOTFORMAT_CONFIG = "config_ddr3_1gb_p1_p2_rdb_pc_800M.dat" +UBOOT_MACHINES = " P1020RDB-PC P1020RDB-PC_SPIFLASH P1020RDB-PC_NAND P1020RDB-PC_SDCARD P1020RDB-PC_36BIT P1020RDB-PC_36BIT_SPIFLASH P1020RDB-PC_36BIT_NAND P1020RDB-PC_36BIT_SDCARD" KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p1020rdb.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" diff --git a/meta-fsl-ppc/conf/machine/p1020utm.conf b/meta-fsl-ppc/conf/machine/p1020utm.conf index 91833b16..eb3311f3 100644 --- a/meta-fsl-ppc/conf/machine/p1020utm.conf +++ b/meta-fsl-ppc/conf/machine/p1020utm.conf @@ -4,6 +4,7 @@ require e500v2.inc -UBOOT_MACHINES = "P1020UTM-PC" +BOOTFORMAT_CONFIG = "config_ddr3_1gb_p1_p2_rdb_pc_800M.dat" +UBOOT_MACHINES = "P1020UTM-PC P1020UTM-PC_SDCARD P1020UTM-PC_36BIT P1020UTM-PC_36BIT_SDCARD" KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p1020utm.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" diff --git a/meta-fsl-ppc/conf/machine/p1021rdb.conf b/meta-fsl-ppc/conf/machine/p1021rdb.conf index 7e029be4..8bdc4005 100644 --- a/meta-fsl-ppc/conf/machine/p1021rdb.conf +++ b/meta-fsl-ppc/conf/machine/p1021rdb.conf @@ -3,7 +3,7 @@ #@DESCRIPTION: Machine configuration for the Freescale P1021RDB require e500v2.inc - -UBOOT_MACHINES = "P1021RDB-PC" +BOOTFORMAT_CONFIG = "config_ddr3_1gb_p1_p2_rdb_pc_800M.dat" +UBOOT_MACHINES = "P1021RDB-PC P1021RDB-PC_NAND P1021RDB-PC_SDCARD P1021RDB-PC_SPIFLASH P1021RDB-PC_36BIT P1021RDB-PC_36BIT_SPIFLASH P1021RDB-PC_36BIT_NAND P1021RDB-PC_36BIT_SDCARD" KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p1021rdb.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" diff --git a/meta-fsl-ppc/conf/machine/p1022ds.conf b/meta-fsl-ppc/conf/machine/p1022ds.conf index b104a482..c9f18779 100644 --- a/meta-fsl-ppc/conf/machine/p1022ds.conf +++ b/meta-fsl-ppc/conf/machine/p1022ds.conf @@ -3,7 +3,8 @@ require e500v2.inc -UBOOT_MACHINES = "P1022DS" +BOOTFORMAT_CONFIG = "config_ddr3_2gb_p1022ds.dat" +UBOOT_MACHINES = "P1022DS P1022DS_NAND P1022DS_SPIFLASH P1022DS_SDCARD P1022DS_36BIT P1022DS_36BIT_SPIFLASH P1022DS_36BIT_NAND P1022DS_36BIT_SDCARD" KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p1022ds.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" diff --git a/meta-fsl-ppc/conf/machine/p1024rdb.conf b/meta-fsl-ppc/conf/machine/p1024rdb.conf index e170a997..c562e035 100644 --- a/meta-fsl-ppc/conf/machine/p1024rdb.conf +++ b/meta-fsl-ppc/conf/machine/p1024rdb.conf @@ -4,6 +4,7 @@ require e500v2.inc -UBOOT_MACHINES = "P1024RDB" +BOOTFORMAT_CONFIG = "config_ddr3_1gb_p1_p2_rdb_pc_667M.dat" +UBOOT_MACHINES = "P1024RDB P1024RDB_36BIT P1024RDB_NAND P1024RDB_SDCARD P1024RDB_SPIFLASH" KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p1024rdb.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" diff --git a/meta-fsl-ppc/conf/machine/p1025rdb.conf b/meta-fsl-ppc/conf/machine/p1025rdb.conf index 6e7b3c0b..6d2f4faa 100644 --- a/meta-fsl-ppc/conf/machine/p1025rdb.conf +++ b/meta-fsl-ppc/conf/machine/p1025rdb.conf @@ -4,6 +4,8 @@ require e500v2.inc -UBOOT_MACHINES = "P1025RDB" + +BOOTFORMAT_CONFIG = "config_ddr3_1gb_p1_p2_rdb_pc_667M.dat" +UBOOT_MACHINES = "P1025RDB P1025RDB_36BIT P1025RDB_NAND P1025RDB_SDCARD P1025RDB_SPIFLASH" KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p1025rdb.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" diff --git a/meta-fsl-ppc/conf/machine/p2020ds.conf b/meta-fsl-ppc/conf/machine/p2020ds.conf index 527c67dd..59288626 100644 --- a/meta-fsl-ppc/conf/machine/p2020ds.conf +++ b/meta-fsl-ppc/conf/machine/p2020ds.conf @@ -2,10 +2,8 @@ #@DESCRIPTION: Machine configuration for running require e500v2.inc +BOOTFORMAT_CONFIG = "config_sram_p2020ds.dat" -UBOOT_MACHINES = "P2020DS" +UBOOT_MACHINES = "P2020DS P2020DS_36BIT P2020DS_DDR2 P2020DS_SDCARD P2020DS_SPIFLASH" KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p2020ds.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" - -UBOOT_MACHINES = "P2020DS_SDCARD_config P2020DS_config" -BOOTFORMAT_CONFIG = "config_sram_p2020ds.dat" diff --git a/meta-fsl-ppc/conf/machine/p2020rdb.conf b/meta-fsl-ppc/conf/machine/p2020rdb.conf index 22b07f8c..1cb2319c 100644 --- a/meta-fsl-ppc/conf/machine/p2020rdb.conf +++ b/meta-fsl-ppc/conf/machine/p2020rdb.conf @@ -4,6 +4,7 @@ require e500v2.inc -UBOOT_MACHINES = "P2020RDB-PC" +BOOTFORMAT_CONFIG = "config_ddr3_1gb_64bit_p2020rdb_pc.dat" +UBOOT_MACHINES = " P2020RDB-PC P2020RDB-PC_NAND P2020RDB-PC_SDCARD P2020RDB-PC_SPIFLASH P2020RDB-PC_36BIT P2020RDB-PC_36BIT_SPIFLASH P2020RDB-PC_36BIT_NAND P2020RDB-PC_36BIT_SDCARD" KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p2020rdb.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" -- cgit v1.2.3-54-g00ecf From 224f831c9f696fff14a79b34a5de2ab3da9e842f Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Mon, 27 Feb 2012 10:40:53 +0000 Subject: busybox: fix install error when CONFIG_INETD enabled To avoid the following error: | CONFIG_INETD=y | install: cannot stat `.../busybox-1.18.5-r2/inetd': No such file or directory | ERROR: Function 'do_install' failed Signed-off-by: Ting Liu --- .../recipes-append/busybox/busybox-1.18.5/inetd | 33 ++++++++++++++++++++++ .../busybox/busybox-1.18.5/inetd.conf | 20 +++++++++++++ .../recipes-append/busybox/busybox_1.18.5.bbappend | 2 ++ 3 files changed, 55 insertions(+) create mode 100644 meta-fsl-ppc/recipes-append/busybox/busybox-1.18.5/inetd create mode 100644 meta-fsl-ppc/recipes-append/busybox/busybox-1.18.5/inetd.conf diff --git a/meta-fsl-ppc/recipes-append/busybox/busybox-1.18.5/inetd b/meta-fsl-ppc/recipes-append/busybox/busybox-1.18.5/inetd new file mode 100644 index 00000000..cf50bcd5 --- /dev/null +++ b/meta-fsl-ppc/recipes-append/busybox/busybox-1.18.5/inetd @@ -0,0 +1,33 @@ +#!/bin/sh +# +# start/stop inetd super server. + +if ! [ -x /usr/sbin/inetd ]; then + exit 0 +fi + +case "$1" in + start) + echo -n "Starting internet superserver:" + echo -n " inetd" ; start-stop-daemon -S -x /usr/sbin/inetd > /dev/null + echo "." + ;; + stop) + echo -n "Stopping internet superserver:" + echo -n " inetd" ; start-stop-daemon -K -x /usr/sbin/inetd > /dev/null + echo "." + ;; + restart) + echo -n "Restarting internet superserver:" + echo -n " inetd " + killall -HUP inetd + echo "." + ;; + *) + echo "Usage: /etc/init.d/inetd {start|stop|restart}" + exit 1 + ;; +esac + +exit 0 + diff --git a/meta-fsl-ppc/recipes-append/busybox/busybox-1.18.5/inetd.conf b/meta-fsl-ppc/recipes-append/busybox/busybox-1.18.5/inetd.conf new file mode 100644 index 00000000..b02fe850 --- /dev/null +++ b/meta-fsl-ppc/recipes-append/busybox/busybox-1.18.5/inetd.conf @@ -0,0 +1,20 @@ +# /etc/inetd.conf: see inetd(8) for further informations. +# +# Internet server configuration database +# +# If you want to disable an entry so it isn't touched during +# package updates just comment it out with a single '#' character. +# +# +# +#:INTERNAL: Internal services +#echo stream tcp nowait root internal +#echo dgram udp wait root internal +#chargen stream tcp nowait root internal +#chargen dgram udp wait root internal +#discard stream tcp nowait root internal +#discard dgram udp wait root internal +#daytime stream tcp nowait root internal +#daytime dgram udp wait root internal +#time stream tcp nowait root internal +#time dgram udp wait root internal diff --git a/meta-fsl-ppc/recipes-append/busybox/busybox_1.18.5.bbappend b/meta-fsl-ppc/recipes-append/busybox/busybox_1.18.5.bbappend index b285c16c..cdf171b0 100644 --- a/meta-fsl-ppc/recipes-append/busybox/busybox_1.18.5.bbappend +++ b/meta-fsl-ppc/recipes-append/busybox/busybox_1.18.5.bbappend @@ -2,4 +2,6 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/busybox-1.18.5:" SRC_URI += "file://0001-libbb.h-do-not-use-homegrown-struct-sysinfo.patch \ file://0002-work-around-sysinfo.h-versus-linux-.h-problems.patch \ + file://inetd \ + file://inetd.conf \ " -- cgit v1.2.3-54-g00ecf From 5fd9060f96dababff6db0e02a0fda72b1906abb9 Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Mon, 27 Feb 2012 11:00:42 -0600 Subject: fsl.conf: override TARGET_VENDOR for multilib scenario Signed-off-by: Matthew McClintock --- meta-fsl-ppc/conf/distro/fsl.conf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/meta-fsl-ppc/conf/distro/fsl.conf b/meta-fsl-ppc/conf/distro/fsl.conf index 16590b93..888f28c0 100644 --- a/meta-fsl-ppc/conf/distro/fsl.conf +++ b/meta-fsl-ppc/conf/distro/fsl.conf @@ -7,6 +7,8 @@ SDK_VERSION := "${@'${DISTRO_VERSION}'.replace('snapshot-${DATE}','snapshot')}" MAINTAINER = "Matthew McClintock " TARGET_VENDOR = "-fsl" +TARGET_VENDOR_virtclass-multilib-lib32 = "-fsl" +TARGET_VENDOR_virtclass-multilib-lib64 = "-fsl" LOCALCONF_VERSION = "1" -- cgit v1.2.3-54-g00ecf From f84ac1ebbcccfac14a62cdd607d04fb9bb51534c Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Mon, 27 Feb 2012 11:01:23 -0600 Subject: u-boot_git.bb: update u-boot recipe to use new triplet's after multilib changes Signed-off-by: Matthew McClintock --- meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb b/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb index 25bc2e51..af5343ff 100644 --- a/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb +++ b/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb @@ -5,7 +5,7 @@ PROVIDES = "virtual/bootloader" LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=1707d6db1d42237583f50183a5651ecb" -PR = "r9" +PR = "r10" INHIBIT_DEFAULT_DEPS = "1" DEPENDS = "boot-format-native virtual/${TARGET_PREFIX}gcc" @@ -15,9 +15,9 @@ SRCREV = "348d8fceba39e5622d315ffda7d72ff6bbcf05ec" SRC_URI = "git://git.freescale.com/ppc/sdk/u-boot.git \ " DEPENDS_append_e5500-64b = " lib32-gcc-cross" -PATH_append_e5500-64b = ":${STAGING_BINDIR_NATIVE}/powerpc-${DISTRO}mllib32-${HOST_OS}/" +PATH_append_e5500-64b = ":${STAGING_BINDIR_NATIVE}/${DEFAULTTUNE_virtclass-multilib-lib32}${TARGET_VENDOR_virtclass-multilib-lib32}-${HOST_OS}/" TOOLCHAIN_OPTIONS_append_e5500-64b = "/../lib32-${MACHINE}" -WRAP_TARGET_PREFIX_e5500-64b = "powerpc-${DISTRO}mllib32-${HOST_OS}-" +WRAP_TARGET_PREFIX_e5500-64b = "powerpc${TARGET_VENDOR_virtclass-multilib-lib32}-${HOST_OS}-" WRAP_TARGET_PREFIX = "${TARGET_PREFIX}" EXTRA_OEMAKE = 'CROSS_COMPILE=${WRAP_TARGET_PREFIX} CC="${WRAP_TARGET_PREFIX}gcc ${TOOLCHAIN_OPTIONS}"' -- cgit v1.2.3-54-g00ecf From 8acfcb68d7166c9673c6e8e1ff4c93fe4a351a2a Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Tue, 6 Mar 2012 23:13:22 -0600 Subject: fsl-toolchain.bb: remove qemu-nativesdk from toolchain Signed-off-by: Matthew McClintock --- meta-fsl-ppc/images/fsl-toolchain.bb | 1 - 1 file changed, 1 deletion(-) diff --git a/meta-fsl-ppc/images/fsl-toolchain.bb b/meta-fsl-ppc/images/fsl-toolchain.bb index f549bc21..7db1af5c 100644 --- a/meta-fsl-ppc/images/fsl-toolchain.bb +++ b/meta-fsl-ppc/images/fsl-toolchain.bb @@ -12,5 +12,4 @@ TOOLCHAIN_TARGET_TASK_append_e500mc = " usdpaa" TOOLCHAIN_HOST_TASK += " \ dtc-nativesdk \ - qemu-nativesdk \ " -- cgit v1.2.3-54-g00ecf From 10796265edeecec5e06201f20fde44a237c66c84 Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Fri, 9 Mar 2012 10:38:14 -0600 Subject: fsl.conf: Change TARGET_ARCH to TUNEPKG_ARCH for generating toolchain tarball Signed-off-by: Matthew McClintock --- meta-fsl-ppc/conf/distro/fsl.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-fsl-ppc/conf/distro/fsl.conf b/meta-fsl-ppc/conf/distro/fsl.conf index 888f28c0..b9867a51 100644 --- a/meta-fsl-ppc/conf/distro/fsl.conf +++ b/meta-fsl-ppc/conf/distro/fsl.conf @@ -14,7 +14,7 @@ LOCALCONF_VERSION = "1" DISTRO_FEATURES_append = " largefile opengl" -SDK_NAME = "${DISTRO}-${TCLIBC}-${SDK_ARCH}-${TARGET_ARCH}" +SDK_NAME = "${DISTRO}-${TCLIBC}-${SDK_ARCH}-${TUNE_PKGARCH}" SDKPATH = "/opt/${DISTRO}/${SDK_VERSION}" DISTRO_EXTRA_RDEPENDS += "task-core-boot" -- cgit v1.2.3-54-g00ecf From 87848817bf9bfac32fcc0389af7c78db2aae83b3 Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Thu, 8 Mar 2012 17:26:44 -0600 Subject: conf/layer.conf: expand search for bbappend files Signed-off-by: Matthew McClintock --- meta-fsl-ppc/conf/layer.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-fsl-ppc/conf/layer.conf b/meta-fsl-ppc/conf/layer.conf index b469c670..9d2e54b9 100644 --- a/meta-fsl-ppc/conf/layer.conf +++ b/meta-fsl-ppc/conf/layer.conf @@ -2,7 +2,7 @@ BBPATH := "${BBPATH}:${LAYERDIR}" BBFILES += "${LAYERDIR}/recipes-*/*/*.bb*" -BBFILES += "${LAYERDIR}/images/*.bb" +BBFILES += "${LAYERDIR}/images/*.bb*" BBFILE_COLLECTIONS += "fsl" BBFILE_PATTERN_fsl := "^${LAYERDIR}/" -- cgit v1.2.3-54-g00ecf From 389790217317efb20b345e3781b64dc5b598d82c Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Mon, 12 Mar 2012 11:00:07 -0500 Subject: fsl-toolchain.bb: remove usdpaa from fsl-toolchain which was incorrectly added This is not building any x86 tools or libraries to link against, it' just trying to build the target usdpaa package for e500mc. Signed-off-by: Matthew McClintock --- meta-fsl-ppc/images/fsl-toolchain.bb | 2 -- 1 file changed, 2 deletions(-) diff --git a/meta-fsl-ppc/images/fsl-toolchain.bb b/meta-fsl-ppc/images/fsl-toolchain.bb index 7db1af5c..c1d59d31 100644 --- a/meta-fsl-ppc/images/fsl-toolchain.bb +++ b/meta-fsl-ppc/images/fsl-toolchain.bb @@ -8,8 +8,6 @@ TOOLCHAIN_TARGET_TASK += " \ dtc \ " -TOOLCHAIN_TARGET_TASK_append_e500mc = " usdpaa" - TOOLCHAIN_HOST_TASK += " \ dtc-nativesdk \ " -- cgit v1.2.3-54-g00ecf From c2d2002191c2011c2ab41f8222383c9945d7de58 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Thu, 8 Mar 2012 15:22:45 +0000 Subject: busybox: enable all features Signed-off-by: Ting Liu --- .../busybox/busybox-1.18.5/defconfig-maximum | 990 +++++++++++++++++++++ .../recipes-append/busybox/busybox_1.18.5.bbappend | 8 + 2 files changed, 998 insertions(+) create mode 100644 meta-fsl-ppc/recipes-append/busybox/busybox-1.18.5/defconfig-maximum diff --git a/meta-fsl-ppc/recipes-append/busybox/busybox-1.18.5/defconfig-maximum b/meta-fsl-ppc/recipes-append/busybox/busybox-1.18.5/defconfig-maximum new file mode 100644 index 00000000..a3feea64 --- /dev/null +++ b/meta-fsl-ppc/recipes-append/busybox/busybox-1.18.5/defconfig-maximum @@ -0,0 +1,990 @@ +# +# Automatically generated make config: don't edit +# Busybox version: 1.18.5 +# Tue Mar 6 14:41:09 2012 +# +CONFIG_HAVE_DOT_CONFIG=y + +# +# Busybox Settings +# + +# +# General Configuration +# +# CONFIG_DESKTOP is not set +# CONFIG_EXTRA_COMPAT is not set +CONFIG_INCLUDE_SUSv2=y +# CONFIG_USE_PORTABLE_CODE is not set +CONFIG_PLATFORM_LINUX=y +CONFIG_FEATURE_BUFFERS_USE_MALLOC=y +# CONFIG_FEATURE_BUFFERS_GO_ON_STACK is not set +# CONFIG_FEATURE_BUFFERS_GO_IN_BSS is not set +CONFIG_SHOW_USAGE=y +CONFIG_FEATURE_VERBOSE_USAGE=y +CONFIG_FEATURE_COMPRESS_USAGE=y +CONFIG_FEATURE_INSTALLER=y +# CONFIG_INSTALL_NO_USR is not set +CONFIG_LOCALE_SUPPORT=y +# CONFIG_UNICODE_SUPPORT is not set +# CONFIG_UNICODE_USING_LOCALE is not set +# CONFIG_FEATURE_CHECK_UNICODE_IN_ENV is not set +CONFIG_SUBST_WCHAR=0 +CONFIG_LAST_SUPPORTED_WCHAR=0 +# CONFIG_UNICODE_COMBINING_WCHARS is not set +# CONFIG_UNICODE_WIDE_WCHARS is not set +# CONFIG_UNICODE_BIDI_SUPPORT is not set +# CONFIG_UNICODE_NEUTRAL_TABLE is not set +# CONFIG_UNICODE_PRESERVE_BROKEN is not set +CONFIG_LONG_OPTS=y +CONFIG_FEATURE_DEVPTS=y +# CONFIG_FEATURE_CLEAN_UP is not set +CONFIG_FEATURE_WTMP=y +CONFIG_FEATURE_UTMP=y +CONFIG_FEATURE_PIDFILE=y +CONFIG_FEATURE_SUID=y +CONFIG_FEATURE_SUID_CONFIG=y +CONFIG_FEATURE_SUID_CONFIG_QUIET=y +# CONFIG_SELINUX is not set +# CONFIG_FEATURE_PREFER_APPLETS is not set +CONFIG_BUSYBOX_EXEC_PATH="/proc/self/exe" +CONFIG_FEATURE_SYSLOG=y +CONFIG_FEATURE_HAVE_RPC=y + +# +# Build Options +# +# CONFIG_STATIC is not set +# CONFIG_PIE is not set +# CONFIG_NOMMU is not set +# CONFIG_BUILD_LIBBUSYBOX is not set +# CONFIG_FEATURE_INDIVIDUAL is not set +# CONFIG_FEATURE_SHARED_BUSYBOX is not set +CONFIG_LFS=y +CONFIG_CROSS_COMPILER_PREFIX="" +CONFIG_EXTRA_CFLAGS="" + +# +# Debugging Options +# +# CONFIG_DEBUG is not set +# CONFIG_DEBUG_PESSIMIZE is not set +# CONFIG_WERROR is not set +CONFIG_NO_DEBUG_LIB=y +# CONFIG_DMALLOC is not set +# CONFIG_EFENCE is not set + +# +# Installation Options ("make install" behavior) +# +CONFIG_INSTALL_APPLET_SYMLINKS=y +# CONFIG_INSTALL_APPLET_HARDLINKS is not set +# CONFIG_INSTALL_APPLET_SCRIPT_WRAPPERS is not set +# CONFIG_INSTALL_APPLET_DONT is not set +# CONFIG_INSTALL_SH_APPLET_SYMLINK is not set +# CONFIG_INSTALL_SH_APPLET_HARDLINK is not set +# CONFIG_INSTALL_SH_APPLET_SCRIPT_WRAPPER is not set +CONFIG_PREFIX="./_install" + +# +# Busybox Library Tuning +# +CONFIG_PASSWORD_MINLEN=6 +CONFIG_MD5_SIZE_VS_SPEED=2 +CONFIG_FEATURE_FAST_TOP=y +# CONFIG_FEATURE_ETC_NETWORKS is not set +CONFIG_FEATURE_USE_TERMIOS=y +CONFIG_FEATURE_EDITING=y +CONFIG_FEATURE_EDITING_MAX_LEN=1024 +# CONFIG_FEATURE_EDITING_VI is not set +CONFIG_FEATURE_EDITING_HISTORY=255 +CONFIG_FEATURE_EDITING_SAVEHISTORY=y +CONFIG_FEATURE_TAB_COMPLETION=y +CONFIG_FEATURE_USERNAME_COMPLETION=y +CONFIG_FEATURE_EDITING_FANCY_PROMPT=y +# CONFIG_FEATURE_EDITING_ASK_TERMINAL is not set +CONFIG_FEATURE_NON_POSIX_CP=y +# CONFIG_FEATURE_VERBOSE_CP_MESSAGE is not set +CONFIG_FEATURE_COPYBUF_KB=4 +CONFIG_MONOTONIC_SYSCALL=y +CONFIG_IOCTL_HEX2STR_ERROR=y +CONFIG_FEATURE_HWIB=y + +# +# Applets +# + +# +# Archival Utilities +# +CONFIG_FEATURE_SEAMLESS_XZ=y +CONFIG_FEATURE_SEAMLESS_LZMA=y +CONFIG_FEATURE_SEAMLESS_BZ2=y +CONFIG_FEATURE_SEAMLESS_GZ=y +CONFIG_FEATURE_SEAMLESS_Z=y +CONFIG_AR=y +CONFIG_FEATURE_AR_LONG_FILENAMES=y +CONFIG_FEATURE_AR_CREATE=y +CONFIG_BUNZIP2=y +CONFIG_BZIP2=y +CONFIG_CPIO=y +CONFIG_FEATURE_CPIO_O=y +CONFIG_FEATURE_CPIO_P=y +# CONFIG_DPKG is not set +# CONFIG_DPKG_DEB is not set +# CONFIG_FEATURE_DPKG_DEB_EXTRACT_ONLY is not set +CONFIG_GUNZIP=y +CONFIG_GZIP=y +CONFIG_FEATURE_GZIP_LONG_OPTIONS=y +CONFIG_LZOP=y +# CONFIG_LZOP_COMPR_HIGH is not set +CONFIG_RPM2CPIO=y +CONFIG_RPM=y +CONFIG_TAR=y +CONFIG_FEATURE_TAR_CREATE=y +CONFIG_FEATURE_TAR_AUTODETECT=y +CONFIG_FEATURE_TAR_FROM=y +CONFIG_FEATURE_TAR_OLDGNU_COMPATIBILITY=y +CONFIG_FEATURE_TAR_OLDSUN_COMPATIBILITY=y +CONFIG_FEATURE_TAR_GNU_EXTENSIONS=y +CONFIG_FEATURE_TAR_LONG_OPTIONS=y +CONFIG_FEATURE_TAR_TO_COMMAND=y +CONFIG_FEATURE_TAR_UNAME_GNAME=y +CONFIG_FEATURE_TAR_NOPRESERVE_TIME=y +# CONFIG_FEATURE_TAR_SELINUX is not set +# CONFIG_UNCOMPRESS is not set +CONFIG_UNLZMA=y +CONFIG_FEATURE_LZMA_FAST=y +CONFIG_LZMA=y +CONFIG_UNXZ=y +CONFIG_XZ=y +CONFIG_UNZIP=y + +# +# Coreutils +# +CONFIG_BASENAME=y +CONFIG_CAT=y +CONFIG_DATE=y +CONFIG_FEATURE_DATE_ISOFMT=y +# CONFIG_FEATURE_DATE_NANO is not set +CONFIG_FEATURE_DATE_COMPAT=y +CONFIG_TEST=y +CONFIG_FEATURE_TEST_64=y +CONFIG_TR=y +CONFIG_FEATURE_TR_CLASSES=y +CONFIG_FEATURE_TR_EQUIV=y +CONFIG_BASE64=y +CONFIG_CAL=y +CONFIG_CATV=y +CONFIG_CHGRP=y +CONFIG_CHMOD=y +CONFIG_CHOWN=y +CONFIG_FEATURE_CHOWN_LONG_OPTIONS=y +CONFIG_CHROOT=y +CONFIG_CKSUM=y +CONFIG_COMM=y +CONFIG_CP=y +CONFIG_FEATURE_CP_LONG_OPTIONS=y +CONFIG_CUT=y +CONFIG_DD=y +CONFIG_FEATURE_DD_SIGNAL_HANDLING=y +CONFIG_FEATURE_DD_THIRD_STATUS_LINE=y +CONFIG_FEATURE_DD_IBS_OBS=y +CONFIG_DF=y +CONFIG_FEATURE_DF_FANCY=y +CONFIG_DIRNAME=y +CONFIG_DOS2UNIX=y +CONFIG_UNIX2DOS=y +CONFIG_DU=y +CONFIG_FEATURE_DU_DEFAULT_BLOCKSIZE_1K=y +CONFIG_ECHO=y +CONFIG_FEATURE_FANCY_ECHO=y +CONFIG_ENV=y +CONFIG_FEATURE_ENV_LONG_OPTIONS=y +CONFIG_EXPAND=y +CONFIG_FEATURE_EXPAND_LONG_OPTIONS=y +CONFIG_EXPR=y +CONFIG_EXPR_MATH_SUPPORT_64=y +CONFIG_FALSE=y +CONFIG_FOLD=y +CONFIG_FSYNC=y +CONFIG_HEAD=y +CONFIG_FEATURE_FANCY_HEAD=y +CONFIG_HOSTID=y +CONFIG_ID=y +CONFIG_INSTALL=y +CONFIG_FEATURE_INSTALL_LONG_OPTIONS=y +CONFIG_LENGTH=y +CONFIG_LN=y +CONFIG_LOGNAME=y +CONFIG_LS=y +CONFIG_FEATURE_LS_FILETYPES=y +CONFIG_FEATURE_LS_FOLLOWLINKS=y +CONFIG_FEATURE_LS_RECURSIVE=y +CONFIG_FEATURE_LS_SORTFILES=y +CONFIG_FEATURE_LS_TIMESTAMPS=y +CONFIG_FEATURE_LS_USERNAME=y +CONFIG_FEATURE_LS_COLOR=y +CONFIG_FEATURE_LS_COLOR_IS_DEFAULT=y +CONFIG_MD5SUM=y +CONFIG_MKDIR=y +CONFIG_FEATURE_MKDIR_LONG_OPTIONS=y +CONFIG_MKFIFO=y +CONFIG_MKNOD=y +CONFIG_MV=y +CONFIG_FEATURE_MV_LONG_OPTIONS=y +CONFIG_NICE=y +CONFIG_NOHUP=y +CONFIG_OD=y +CONFIG_PRINTENV=y +CONFIG_PRINTF=y +CONFIG_PWD=y +CONFIG_READLINK=y +CONFIG_FEATURE_READLINK_FOLLOW=y +CONFIG_REALPATH=y +CONFIG_RM=y +CONFIG_RMDIR=y +CONFIG_FEATURE_RMDIR_LONG_OPTIONS=y +CONFIG_SEQ=y +CONFIG_SHA1SUM=y +CONFIG_SHA256SUM=y +CONFIG_SHA512SUM=y +CONFIG_SLEEP=y +CONFIG_FEATURE_FANCY_SLEEP=y +CONFIG_FEATURE_FLOAT_SLEEP=y +CONFIG_SORT=y +CONFIG_FEATURE_SORT_BIG=y +CONFIG_SPLIT=y +CONFIG_FEATURE_SPLIT_FANCY=y +CONFIG_STAT=y +CONFIG_FEATURE_STAT_FORMAT=y +CONFIG_STTY=y +CONFIG_SUM=y +CONFIG_SYNC=y +CONFIG_TAC=y +CONFIG_TAIL=y +CONFIG_FEATURE_FANCY_TAIL=y +CONFIG_TEE=y +CONFIG_FEATURE_TEE_USE_BLOCK_IO=y +CONFIG_TOUCH=y +CONFIG_TRUE=y +CONFIG_TTY=y +CONFIG_UNAME=y +CONFIG_UNEXPAND=y +CONFIG_FEATURE_UNEXPAND_LONG_OPTIONS=y +CONFIG_UNIQ=y +CONFIG_USLEEP=y +CONFIG_UUDECODE=y +CONFIG_UUENCODE=y +CONFIG_WC=y +CONFIG_FEATURE_WC_LARGE=y +CONFIG_WHO=y +CONFIG_WHOAMI=y +CONFIG_YES=y + +# +# Common options for cp and mv +# +CONFIG_FEATURE_PRESERVE_HARDLINKS=y + +# +# Common options for ls, more and telnet +# +CONFIG_FEATURE_AUTOWIDTH=y + +# +# Common options for df, du, ls +# +CONFIG_FEATURE_HUMAN_READABLE=y + +# +# Common options for md5sum, sha1sum, sha256sum, sha512sum +# +CONFIG_FEATURE_MD5_SHA1_SUM_CHECK=y + +# +# Console Utilities +# +CONFIG_CHVT=y +CONFIG_FGCONSOLE=y +CONFIG_CLEAR=y +CONFIG_DEALLOCVT=y +CONFIG_DUMPKMAP=y +CONFIG_KBD_MODE=y +CONFIG_LOADFONT=y +CONFIG_LOADKMAP=y +CONFIG_OPENVT=y +CONFIG_RESET=y +CONFIG_RESIZE=y +CONFIG_FEATURE_RESIZE_PRINT=y +CONFIG_SETCONSOLE=y +CONFIG_FEATURE_SETCONSOLE_LONG_OPTIONS=y +CONFIG_SETFONT=y +CONFIG_FEATURE_SETFONT_TEXTUAL_MAP=y +CONFIG_DEFAULT_SETFONT_DIR="" +CONFIG_SETKEYCODES=y +CONFIG_SETLOGCONS=y +CONFIG_SHOWKEY=y + +# +# Common options for loadfont and setfont +# +CONFIG_FEATURE_LOADFONT_PSF2=y +CONFIG_FEATURE_LOADFONT_RAW=y + +# +# Debian Utilities +# +CONFIG_MKTEMP=y +CONFIG_PIPE_PROGRESS=y +CONFIG_RUN_PARTS=y +CONFIG_FEATURE_RUN_PARTS_LONG_OPTIONS=y +CONFIG_FEATURE_RUN_PARTS_FANCY=y +CONFIG_START_STOP_DAEMON=y +CONFIG_FEATURE_START_STOP_DAEMON_FANCY=y +CONFIG_FEATURE_START_STOP_DAEMON_LONG_OPTIONS=y +CONFIG_WHICH=y + +# +# Editors +# +CONFIG_PATCH=y +CONFIG_AWK=y +CONFIG_FEATURE_AWK_LIBM=y +CONFIG_CMP=y +CONFIG_DIFF=y +CONFIG_FEATURE_DIFF_LONG_OPTIONS=y +CONFIG_FEATURE_DIFF_DIR=y +CONFIG_ED=y +CONFIG_SED=y +CONFIG_VI=y +CONFIG_FEATURE_VI_MAX_LEN=4096 +CONFIG_FEATURE_VI_8BIT=y +CONFIG_FEATURE_VI_COLON=y +CONFIG_FEATURE_VI_YANKMARK=y +CONFIG_FEATURE_VI_SEARCH=y +CONFIG_FEATURE_VI_USE_SIGNALS=y +CONFIG_FEATURE_VI_DOT_CMD=y +CONFIG_FEATURE_VI_READONLY=y +CONFIG_FEATURE_VI_SETOPTS=y +CONFIG_FEATURE_VI_SET=y +CONFIG_FEATURE_VI_WIN_RESIZE=y +CONFIG_FEATURE_VI_ASK_TERMINAL=y +CONFIG_FEATURE_VI_OPTIMIZE_CURSOR=y +CONFIG_FEATURE_ALLOW_EXEC=y + +# +# Finding Utilities +# +CONFIG_FIND=y +CONFIG_FEATURE_FIND_PRINT0=y +CONFIG_FEATURE_FIND_MTIME=y +CONFIG_FEATURE_FIND_MMIN=y +CONFIG_FEATURE_FIND_PERM=y +CONFIG_FEATURE_FIND_TYPE=y +CONFIG_FEATURE_FIND_XDEV=y +CONFIG_FEATURE_FIND_MAXDEPTH=y +CONFIG_FEATURE_FIND_NEWER=y +CONFIG_FEATURE_FIND_INUM=y +CONFIG_FEATURE_FIND_EXEC=y +CONFIG_FEATURE_FIND_USER=y +CONFIG_FEATURE_FIND_GROUP=y +CONFIG_FEATURE_FIND_NOT=y +CONFIG_FEATURE_FIND_DEPTH=y +CONFIG_FEATURE_FIND_PAREN=y +CONFIG_FEATURE_FIND_SIZE=y +CONFIG_FEATURE_FIND_PRUNE=y +CONFIG_FEATURE_FIND_DELETE=y +CONFIG_FEATURE_FIND_PATH=y +CONFIG_FEATURE_FIND_REGEX=y +# CONFIG_FEATURE_FIND_CONTEXT is not set +CONFIG_FEATURE_FIND_LINKS=y +CONFIG_GREP=y +CONFIG_FEATURE_GREP_EGREP_ALIAS=y +CONFIG_FEATURE_GREP_FGREP_ALIAS=y +CONFIG_FEATURE_GREP_CONTEXT=y +CONFIG_XARGS=y +CONFIG_FEATURE_XARGS_SUPPORT_CONFIRMATION=y +CONFIG_FEATURE_XARGS_SUPPORT_QUOTES=y +CONFIG_FEATURE_XARGS_SUPPORT_TERMOPT=y +CONFIG_FEATURE_XARGS_SUPPORT_ZERO_TERM=y + +# +# Init Utilities +# +# CONFIG_BOOTCHARTD is not set +# CONFIG_FEATURE_BOOTCHARTD_BLOATED_HEADER is not set +# CONFIG_FEATURE_BOOTCHARTD_CONFIG_FILE is not set +CONFIG_HALT=y +# CONFIG_FEATURE_CALL_TELINIT is not set +CONFIG_TELINIT_PATH="" +# CONFIG_INIT is not set +# CONFIG_FEATURE_USE_INITTAB is not set +# CONFIG_FEATURE_KILL_REMOVED is not set +CONFIG_FEATURE_KILL_DELAY=0 +# CONFIG_FEATURE_INIT_SCTTY is not set +# CONFIG_FEATURE_INIT_SYSLOG is not set +# CONFIG_FEATURE_EXTRA_QUIET is not set +# CONFIG_FEATURE_INIT_COREDUMPS is not set +# CONFIG_FEATURE_INITRD is not set +CONFIG_INIT_TERMINAL_TYPE="" +# CONFIG_MESG is not set + +# +# Login/Password Management Utilities +# +# CONFIG_ADD_SHELL is not set +# CONFIG_REMOVE_SHELL is not set +# CONFIG_FEATURE_SHADOWPASSWDS is not set +# CONFIG_USE_BB_PWD_GRP is not set +# CONFIG_USE_BB_SHADOW is not set +CONFIG_USE_BB_CRYPT=y +CONFIG_USE_BB_CRYPT_SHA=y +# CONFIG_ADDUSER is not set +# CONFIG_FEATURE_ADDUSER_LONG_OPTIONS is not set +# CONFIG_FEATURE_CHECK_NAMES is not set +CONFIG_FIRST_SYSTEM_ID=0 +CONFIG_LAST_SYSTEM_ID=0 +# CONFIG_ADDGROUP is not set +# CONFIG_FEATURE_ADDGROUP_LONG_OPTIONS is not set +# CONFIG_FEATURE_ADDUSER_TO_GROUP is not set +# CONFIG_DELUSER is not set +# CONFIG_DELGROUP is not set +# CONFIG_FEATURE_DEL_USER_FROM_GROUP is not set +# CONFIG_GETTY is not set +# CONFIG_LOGIN is not set +# CONFIG_PAM is not set +# CONFIG_LOGIN_SCRIPTS is not set +# CONFIG_FEATURE_NOLOGIN is not set +# CONFIG_FEATURE_SECURETTY is not set +# CONFIG_PASSWD is not set +# CONFIG_FEATURE_PASSWD_WEAK_CHECK is not set +# CONFIG_CRYPTPW is not set +# CONFIG_CHPASSWD is not set +# CONFIG_SU is not set +# CONFIG_FEATURE_SU_SYSLOG is not set +# CONFIG_FEATURE_SU_CHECKS_SHELLS is not set +# CONFIG_SULOGIN is not set +# CONFIG_VLOCK is not set + +# +# Linux Ext2 FS Progs +# +CONFIG_CHATTR=y +CONFIG_FSCK=y +CONFIG_LSATTR=y +# CONFIG_TUNE2FS is not set + +# +# Linux Module Utilities +# +# CONFIG_MODINFO is not set +# CONFIG_MODPROBE_SMALL is not set +# CONFIG_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE is not set +# CONFIG_FEATURE_MODPROBE_SMALL_CHECK_ALREADY_LOADED is not set +CONFIG_INSMOD=y +CONFIG_RMMOD=y +CONFIG_LSMOD=y +# CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT is not set +CONFIG_MODPROBE=y +# CONFIG_FEATURE_MODPROBE_BLACKLIST is not set +# CONFIG_DEPMOD is not set + +# +# Options common to multiple modutils +# +# CONFIG_FEATURE_2_4_MODULES is not set +# CONFIG_FEATURE_INSMOD_TRY_MMAP is not set +# CONFIG_FEATURE_INSMOD_VERSION_CHECKING is not set +# CONFIG_FEATURE_INSMOD_KSYMOOPS_SYMBOLS is not set +# CONFIG_FEATURE_INSMOD_LOADINKMEM is not set +# CONFIG_FEATURE_INSMOD_LOAD_MAP is not set +# CONFIG_FEATURE_INSMOD_LOAD_MAP_FULL is not set +CONFIG_FEATURE_CHECK_TAINTED_MODULE=y +CONFIG_FEATURE_MODUTILS_ALIAS=y +CONFIG_FEATURE_MODUTILS_SYMBOLS=y +CONFIG_DEFAULT_MODULES_DIR="/lib/modules" +CONFIG_DEFAULT_DEPMOD_FILE="modules.dep" + +# +# Linux System Utilities +# +# CONFIG_BLOCKDEV is not set +# CONFIG_REV is not set +# CONFIG_ACPID is not set +# CONFIG_FEATURE_ACPID_COMPAT is not set +# CONFIG_BLKID is not set +CONFIG_DMESG=y +CONFIG_FEATURE_DMESG_PRETTY=y +CONFIG_FBSET=y +CONFIG_FEATURE_FBSET_FANCY=y +CONFIG_FEATURE_FBSET_READMODE=y +# CONFIG_FDFLUSH is not set +# CONFIG_FDFORMAT is not set +CONFIG_FDISK=y +CONFIG_FDISK_SUPPORT_LARGE_DISKS=y +CONFIG_FEATURE_FDISK_WRITABLE=y +# CONFIG_FEATURE_AIX_LABEL is not set +# CONFIG_FEATURE_SGI_LABEL is not set +# CONFIG_FEATURE_SUN_LABEL is not set +# CONFIG_FEATURE_OSF_LABEL is not set +# CONFIG_FEATURE_GPT_LABEL is not set +CONFIG_FEATURE_FDISK_ADVANCED=y +CONFIG_FINDFS=y +CONFIG_FLOCK=y +CONFIG_FREERAMDISK=y +CONFIG_FSCK_MINIX=y +CONFIG_MKFS_EXT2=y +CONFIG_MKFS_MINIX=y +CONFIG_FEATURE_MINIX2=y +# CONFIG_MKFS_REISER is not set +CONFIG_MKFS_VFAT=y +CONFIG_GETOPT=y +CONFIG_FEATURE_GETOPT_LONG=y +CONFIG_HEXDUMP=y +CONFIG_FEATURE_HEXDUMP_REVERSE=y +CONFIG_HD=y +CONFIG_HWCLOCK=y +CONFIG_FEATURE_HWCLOCK_LONG_OPTIONS=y +CONFIG_FEATURE_HWCLOCK_ADJTIME_FHS=y +CONFIG_IPCRM=y +CONFIG_IPCS=y +CONFIG_LOSETUP=y +CONFIG_LSPCI=y +CONFIG_LSUSB=y +# CONFIG_MDEV is not set +# CONFIG_FEATURE_MDEV_CONF is not set +# CONFIG_FEATURE_MDEV_RENAME is not set +# CONFIG_FEATURE_MDEV_RENAME_REGEXP is not set +# CONFIG_FEATURE_MDEV_EXEC is not set +# CONFIG_FEATURE_MDEV_LOAD_FIRMWARE is not set +CONFIG_MKSWAP=y +CONFIG_FEATURE_MKSWAP_UUID=y +CONFIG_MORE=y +CONFIG_MOUNT=y +CONFIG_FEATURE_MOUNT_FAKE=y +CONFIG_FEATURE_MOUNT_VERBOSE=y +# CONFIG_FEATURE_MOUNT_HELPERS is not set +CONFIG_FEATURE_MOUNT_LABEL=y +CONFIG_FEATURE_MOUNT_NFS=y +CONFIG_FEATURE_MOUNT_CIFS=y +CONFIG_FEATURE_MOUNT_FLAGS=y +CONFIG_FEATURE_MOUNT_FSTAB=y +CONFIG_PIVOT_ROOT=y +CONFIG_RDATE=y +# CONFIG_RDEV is not set +# CONFIG_READPROFILE is not set +# CONFIG_RTCWAKE is not set +# CONFIG_SCRIPT is not set +# CONFIG_SCRIPTREPLAY is not set +# CONFIG_SETARCH is not set +CONFIG_SWAPONOFF=y +CONFIG_FEATURE_SWAPON_PRI=y +CONFIG_SWITCH_ROOT=y +CONFIG_UMOUNT=y +CONFIG_FEATURE_UMOUNT_ALL=y + +# +# Common options for mount/umount +# +CONFIG_FEATURE_MOUNT_LOOP=y +CONFIG_FEATURE_MOUNT_LOOP_CREATE=y +# CONFIG_FEATURE_MTAB_SUPPORT is not set +CONFIG_VOLUMEID=y + +# +# Filesystem/Volume identification +# +# CONFIG_FEATURE_VOLUMEID_EXT is not set +# CONFIG_FEATURE_VOLUMEID_BTRFS is not set +# CONFIG_FEATURE_VOLUMEID_REISERFS is not set +# CONFIG_FEATURE_VOLUMEID_FAT is not set +# CONFIG_FEATURE_VOLUMEID_HFS is not set +# CONFIG_FEATURE_VOLUMEID_JFS is not set +# CONFIG_FEATURE_VOLUMEID_XFS is not set +# CONFIG_FEATURE_VOLUMEID_NTFS is not set +# CONFIG_FEATURE_VOLUMEID_ISO9660 is not set +# CONFIG_FEATURE_VOLUMEID_UDF is not set +# CONFIG_FEATURE_VOLUMEID_LUKS is not set +# CONFIG_FEATURE_VOLUMEID_LINUXSWAP is not set +# CONFIG_FEATURE_VOLUMEID_CRAMFS is not set +# CONFIG_FEATURE_VOLUMEID_ROMFS is not set +# CONFIG_FEATURE_VOLUMEID_SYSV is not set +# CONFIG_FEATURE_VOLUMEID_OCFS2 is not set +# CONFIG_FEATURE_VOLUMEID_LINUXRAID is not set + +# +# Miscellaneous Utilities +# +# CONFIG_CONSPY is not set +# CONFIG_NANDWRITE is not set +# CONFIG_NANDDUMP is not set +# CONFIG_UBIATTACH is not set +# CONFIG_UBIDETACH is not set +# CONFIG_ADJTIMEX is not set +# CONFIG_BBCONFIG is not set +# CONFIG_FEATURE_COMPRESS_BBCONFIG is not set +# CONFIG_BEEP is not set +CONFIG_FEATURE_BEEP_FREQ=0 +CONFIG_FEATURE_BEEP_LENGTH_MS=0 +# CONFIG_CHAT is not set +# CONFIG_FEATURE_CHAT_NOFAIL is not set +# CONFIG_FEATURE_CHAT_TTY_HIFI is not set +# CONFIG_FEATURE_CHAT_IMPLICIT_CR is not set +# CONFIG_FEATURE_CHAT_SWALLOW_OPTS is not set +# CONFIG_FEATURE_CHAT_SEND_ESCAPES is not set +# CONFIG_FEATURE_CHAT_VAR_ABORT_LEN is not set +# CONFIG_FEATURE_CHAT_CLR_ABORT is not set +# CONFIG_CHRT is not set +CONFIG_CROND=y +CONFIG_FEATURE_CROND_D=y +CONFIG_FEATURE_CROND_CALL_SENDMAIL=y +CONFIG_FEATURE_CROND_DIR="/var/spool/cron" +CONFIG_CRONTAB=y +CONFIG_DC=y +CONFIG_FEATURE_DC_LIBM=y +# CONFIG_DEVFSD is not set +# CONFIG_DEVFSD_MODLOAD is not set +# CONFIG_DEVFSD_FG_NP is not set +# CONFIG_DEVFSD_VERBOSE is not set +# CONFIG_FEATURE_DEVFS is not set +# CONFIG_DEVMEM is not set +# CONFIG_EJECT is not set +# CONFIG_FEATURE_EJECT_SCSI is not set +# CONFIG_FBSPLASH is not set +# CONFIG_FLASHCP is not set +# CONFIG_FLASH_LOCK is not set +# CONFIG_FLASH_UNLOCK is not set +# CONFIG_FLASH_ERASEALL is not set +# CONFIG_IONICE is not set +# CONFIG_INOTIFYD is not set +CONFIG_LAST=y +# CONFIG_FEATURE_LAST_SMALL is not set +CONFIG_FEATURE_LAST_FANCY=y +CONFIG_LESS=y +CONFIG_FEATURE_LESS_MAXLINES=9999999 +CONFIG_FEATURE_LESS_BRACKETS=y +CONFIG_FEATURE_LESS_FLAGS=y +CONFIG_FEATURE_LESS_MARKS=y +CONFIG_FEATURE_LESS_REGEXP=y +CONFIG_FEATURE_LESS_WINCH=y +CONFIG_FEATURE_LESS_DASHCMD=y +CONFIG_FEATURE_LESS_LINENUMS=y +CONFIG_HDPARM=y +CONFIG_FEATURE_HDPARM_GET_IDENTITY=y +CONFIG_FEATURE_HDPARM_HDIO_SCAN_HWIF=y +CONFIG_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF=y +CONFIG_FEATURE_HDPARM_HDIO_DRIVE_RESET=y +CONFIG_FEATURE_HDPARM_HDIO_TRISTATE_HWIF=y +CONFIG_FEATURE_HDPARM_HDIO_GETSET_DMA=y +# CONFIG_MAKEDEVS is not set +# CONFIG_FEATURE_MAKEDEVS_LEAF is not set +# CONFIG_FEATURE_MAKEDEVS_TABLE is not set +CONFIG_MAN=y +CONFIG_MICROCOM=y +CONFIG_MOUNTPOINT=y +# CONFIG_MT is not set +# CONFIG_RAIDAUTORUN is not set +# CONFIG_READAHEAD is not set +# CONFIG_RFKILL is not set +CONFIG_RUNLEVEL=y +CONFIG_RX=y +CONFIG_SETSID=y +CONFIG_STRINGS=y +# CONFIG_TASKSET is not set +# CONFIG_FEATURE_TASKSET_FANCY is not set +CONFIG_TIME=y +CONFIG_TIMEOUT=y +CONFIG_TTYSIZE=y +# CONFIG_VOLNAME is not set +CONFIG_WALL=y +CONFIG_WATCHDOG=y + +# +# Networking Utilities +# +CONFIG_NBDCLIENT=y +CONFIG_NC=y +CONFIG_NC_SERVER=y +CONFIG_NC_EXTRA=y +# CONFIG_NC_110_COMPAT is not set +CONFIG_FEATURE_IPV6=y +# CONFIG_FEATURE_UNIX_LOCAL is not set +CONFIG_FEATURE_PREFER_IPV4_ADDRESS=y +# CONFIG_VERBOSE_RESOLUTION_ERRORS is not set +CONFIG_ARP=y +CONFIG_ARPING=y +CONFIG_BRCTL=y +CONFIG_FEATURE_BRCTL_FANCY=y +CONFIG_FEATURE_BRCTL_SHOW=y +CONFIG_DNSD=y +CONFIG_ETHER_WAKE=y +CONFIG_FAKEIDENTD=y +CONFIG_FTPD=y +CONFIG_FEATURE_FTP_WRITE=y +CONFIG_FEATURE_FTPD_ACCEPT_BROKEN_LIST=y +CONFIG_FTPGET=y +CONFIG_FTPPUT=y +CONFIG_FEATURE_FTPGETPUT_LONG_OPTIONS=y +CONFIG_HOSTNAME=y +CONFIG_HTTPD=y +CONFIG_FEATURE_HTTPD_RANGES=y +CONFIG_FEATURE_HTTPD_USE_SENDFILE=y +CONFIG_FEATURE_HTTPD_SETUID=y +CONFIG_FEATURE_HTTPD_BASIC_AUTH=y +CONFIG_FEATURE_HTTPD_AUTH_MD5=y +CONFIG_FEATURE_HTTPD_CGI=y +CONFIG_FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR=y +CONFIG_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV=y +CONFIG_FEATURE_HTTPD_ENCODE_URL_STR=y +CONFIG_FEATURE_HTTPD_ERROR_PAGES=y +CONFIG_FEATURE_HTTPD_PROXY=y +CONFIG_FEATURE_HTTPD_GZIP=y +CONFIG_IFCONFIG=y +CONFIG_FEATURE_IFCONFIG_STATUS=y +CONFIG_FEATURE_IFCONFIG_SLIP=y +CONFIG_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ=y +CONFIG_FEATURE_IFCONFIG_HW=y +CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS=y +CONFIG_IFENSLAVE=y +CONFIG_IFPLUGD=y +CONFIG_IFUPDOWN=y +CONFIG_IFUPDOWN_IFSTATE_PATH="/var/run/ifstate" +# CONFIG_FEATURE_IFUPDOWN_IP is not set +# CONFIG_FEATURE_IFUPDOWN_IP_BUILTIN is not set +CONFIG_FEATURE_IFUPDOWN_IFCONFIG_BUILTIN=y +CONFIG_FEATURE_IFUPDOWN_IPV4=y +CONFIG_FEATURE_IFUPDOWN_IPV6=y +CONFIG_FEATURE_IFUPDOWN_MAPPING=y +# CONFIG_FEATURE_IFUPDOWN_EXTERNAL_DHCP is not set +CONFIG_INETD=y +CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_ECHO=y +CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DISCARD=y +CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_TIME=y +CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DAYTIME=y +CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_CHARGEN=y +CONFIG_FEATURE_INETD_RPC=y +CONFIG_IP=y +CONFIG_FEATURE_IP_ADDRESS=y +CONFIG_FEATURE_IP_LINK=y +CONFIG_FEATURE_IP_ROUTE=y +CONFIG_FEATURE_IP_TUNNEL=y +CONFIG_FEATURE_IP_RULE=y +CONFIG_FEATURE_IP_SHORT_FORMS=y +# CONFIG_FEATURE_IP_RARE_PROTOCOLS is not set +CONFIG_IPADDR=y +CONFIG_IPLINK=y +CONFIG_IPROUTE=y +CONFIG_IPTUNNEL=y +CONFIG_IPRULE=y +CONFIG_IPCALC=y +CONFIG_FEATURE_IPCALC_FANCY=y +CONFIG_FEATURE_IPCALC_LONG_OPTIONS=y +CONFIG_NAMEIF=y +CONFIG_FEATURE_NAMEIF_EXTENDED=y +CONFIG_NETSTAT=y +CONFIG_FEATURE_NETSTAT_WIDE=y +CONFIG_FEATURE_NETSTAT_PRG=y +CONFIG_NSLOOKUP=y +CONFIG_NTPD=y +CONFIG_FEATURE_NTPD_SERVER=y +CONFIG_PING=y +CONFIG_PING6=y +CONFIG_FEATURE_FANCY_PING=y +CONFIG_PSCAN=y +CONFIG_ROUTE=y +CONFIG_SLATTACH=y +CONFIG_TCPSVD=y +CONFIG_TELNET=y +CONFIG_FEATURE_TELNET_TTYPE=y +CONFIG_FEATURE_TELNET_AUTOLOGIN=y +CONFIG_TELNETD=y +CONFIG_FEATURE_TELNETD_STANDALONE=y +CONFIG_FEATURE_TELNETD_INETD_WAIT=y +CONFIG_TFTP=y +CONFIG_TFTPD=y + +# +# Common options for tftp/tftpd +# +CONFIG_FEATURE_TFTP_GET=y +CONFIG_FEATURE_TFTP_PUT=y +CONFIG_FEATURE_TFTP_BLOCKSIZE=y +CONFIG_FEATURE_TFTP_PROGRESS_BAR=y +# CONFIG_TFTP_DEBUG is not set +CONFIG_TRACEROUTE=y +CONFIG_TRACEROUTE6=y +CONFIG_FEATURE_TRACEROUTE_VERBOSE=y +# CONFIG_FEATURE_TRACEROUTE_SOURCE_ROUTE is not set +# CONFIG_FEATURE_TRACEROUTE_USE_ICMP is not set +CONFIG_TUNCTL=y +CONFIG_FEATURE_TUNCTL_UG=y +CONFIG_UDHCPD=y +CONFIG_DHCPRELAY=y +CONFIG_DUMPLEASES=y +CONFIG_FEATURE_UDHCPD_WRITE_LEASES_EARLY=y +CONFIG_DHCPD_LEASES_FILE="/var/lib/misc/udhcpd.leases" +CONFIG_UDHCPC=y +CONFIG_FEATURE_UDHCPC_ARPING=y +CONFIG_FEATURE_UDHCP_PORT=y +CONFIG_UDHCP_DEBUG=9 +CONFIG_FEATURE_UDHCP_RFC3397=y +CONFIG_UDHCPC_DEFAULT_SCRIPT="/usr/share/udhcpc/default.script" +CONFIG_UDHCPC_SLACK_FOR_BUGGY_SERVERS=80 +CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS="-R -n" +CONFIG_UDPSVD=y +CONFIG_VCONFIG=y +CONFIG_WGET=y +CONFIG_FEATURE_WGET_STATUSBAR=y +CONFIG_FEATURE_WGET_AUTHENTICATION=y +CONFIG_FEATURE_WGET_LONG_OPTIONS=y +CONFIG_FEATURE_WGET_TIMEOUT=y +CONFIG_ZCIP=y + +# +# Print Utilities +# +# CONFIG_LPD is not set +# CONFIG_LPR is not set +# CONFIG_LPQ is not set + +# +# Mail Utilities +# +# CONFIG_MAKEMIME is not set +CONFIG_FEATURE_MIME_CHARSET="" +# CONFIG_POPMAILDIR is not set +# CONFIG_FEATURE_POPMAILDIR_DELIVERY is not set +# CONFIG_REFORMIME is not set +# CONFIG_FEATURE_REFORMIME_COMPAT is not set +# CONFIG_SENDMAIL is not set + +# +# Process Utilities +# +CONFIG_IOSTAT=y +CONFIG_MPSTAT=y +CONFIG_PMAP=y +CONFIG_POWERTOP=y +CONFIG_SMEMCAP=y +CONFIG_FREE=y +CONFIG_FUSER=y +CONFIG_KILL=y +CONFIG_KILLALL=y +CONFIG_KILLALL5=y +CONFIG_NMETER=y +CONFIG_PGREP=y +CONFIG_PIDOF=y +CONFIG_FEATURE_PIDOF_SINGLE=y +CONFIG_FEATURE_PIDOF_OMIT=y +CONFIG_PKILL=y +CONFIG_PS=y +CONFIG_FEATURE_PS_WIDE=y +# CONFIG_FEATURE_PS_TIME is not set +# CONFIG_FEATURE_PS_ADDITIONAL_COLUMNS is not set +# CONFIG_FEATURE_PS_UNUSUAL_SYSTEMS is not set +CONFIG_RENICE=y +CONFIG_BB_SYSCTL=y +CONFIG_TOP=y +CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE=y +CONFIG_FEATURE_TOP_CPU_GLOBAL_PERCENTS=y +CONFIG_FEATURE_TOP_SMP_CPU=y +CONFIG_FEATURE_TOP_DECIMALS=y +CONFIG_FEATURE_TOP_SMP_PROCESS=y +CONFIG_FEATURE_TOPMEM=y +CONFIG_FEATURE_SHOW_THREADS=y +CONFIG_UPTIME=y +CONFIG_WATCH=y + +# +# Runit Utilities +# +# CONFIG_RUNSV is not set +# CONFIG_RUNSVDIR is not set +# CONFIG_FEATURE_RUNSVDIR_LOG is not set +# CONFIG_SV is not set +CONFIG_SV_DEFAULT_SERVICE_DIR="" +# CONFIG_SVLOGD is not set +# CONFIG_CHPST is not set +# CONFIG_SETUIDGID is not set +# CONFIG_ENVUIDGID is not set +# CONFIG_ENVDIR is not set +# CONFIG_SOFTLIMIT is not set +# CONFIG_CHCON is not set +# CONFIG_FEATURE_CHCON_LONG_OPTIONS is not set +# CONFIG_GETENFORCE is not set +# CONFIG_GETSEBOOL is not set +# CONFIG_LOAD_POLICY is not set +# CONFIG_MATCHPATHCON is not set +# CONFIG_RESTORECON is not set +# CONFIG_RUNCON is not set +# CONFIG_FEATURE_RUNCON_LONG_OPTIONS is not set +# CONFIG_SELINUXENABLED is not set +# CONFIG_SETENFORCE is not set +# CONFIG_SETFILES is not set +# CONFIG_FEATURE_SETFILES_CHECK_OPTION is not set +# CONFIG_SETSEBOOL is not set +# CONFIG_SESTATUS is not set + +# +# Shells +# +CONFIG_ASH=y +CONFIG_ASH_BASH_COMPAT=y +CONFIG_ASH_JOB_CONTROL=y +CONFIG_ASH_ALIAS=y +CONFIG_ASH_GETOPTS=y +CONFIG_ASH_BUILTIN_ECHO=y +CONFIG_ASH_BUILTIN_PRINTF=y +CONFIG_ASH_BUILTIN_TEST=y +# CONFIG_ASH_CMDCMD is not set +# CONFIG_ASH_MAIL is not set +CONFIG_ASH_OPTIMIZE_FOR_SIZE=y +# CONFIG_ASH_RANDOM_SUPPORT is not set +CONFIG_ASH_EXPAND_PRMT=y +# CONFIG_CTTYHACK is not set +# CONFIG_HUSH is not set +# CONFIG_HUSH_BASH_COMPAT is not set +# CONFIG_HUSH_BRACE_EXPANSION is not set +# CONFIG_HUSH_HELP is not set +# CONFIG_HUSH_INTERACTIVE is not set +# CONFIG_HUSH_SAVEHISTORY is not set +# CONFIG_HUSH_JOB is not set +# CONFIG_HUSH_TICK is not set +# CONFIG_HUSH_IF is not set +# CONFIG_HUSH_LOOPS is not set +# CONFIG_HUSH_CASE is not set +# CONFIG_HUSH_FUNCTIONS is not set +# CONFIG_HUSH_LOCAL is not set +# CONFIG_HUSH_RANDOM_SUPPORT is not set +# CONFIG_HUSH_EXPORT_N is not set +# CONFIG_HUSH_MODE_X is not set +# CONFIG_MSH is not set +CONFIG_FEATURE_SH_IS_ASH=y +# CONFIG_FEATURE_SH_IS_HUSH is not set +# CONFIG_FEATURE_SH_IS_NONE is not set +# CONFIG_FEATURE_BASH_IS_ASH is not set +# CONFIG_FEATURE_BASH_IS_HUSH is not set +CONFIG_FEATURE_BASH_IS_NONE=y +CONFIG_SH_MATH_SUPPORT=y +CONFIG_SH_MATH_SUPPORT_64=y +CONFIG_FEATURE_SH_EXTRA_QUIET=y +# CONFIG_FEATURE_SH_STANDALONE is not set +# CONFIG_FEATURE_SH_NOFORK is not set + +# +# System Logging Utilities +# +CONFIG_SYSLOGD=y +CONFIG_FEATURE_ROTATE_LOGFILE=y +CONFIG_FEATURE_REMOTE_LOG=y +# CONFIG_FEATURE_SYSLOGD_DUP is not set +CONFIG_FEATURE_SYSLOGD_READ_BUFFER_SIZE=256 +CONFIG_FEATURE_IPC_SYSLOG=y +CONFIG_FEATURE_IPC_SYSLOG_BUFFER_SIZE=16 +CONFIG_LOGREAD=y +CONFIG_FEATURE_LOGREAD_REDUCED_LOCKING=y +CONFIG_KLOGD=y +# CONFIG_FEATURE_KLOGD_KLOGCTL is not set +CONFIG_LOGGER=y diff --git a/meta-fsl-ppc/recipes-append/busybox/busybox_1.18.5.bbappend b/meta-fsl-ppc/recipes-append/busybox/busybox_1.18.5.bbappend index cdf171b0..e35a65ee 100644 --- a/meta-fsl-ppc/recipes-append/busybox/busybox_1.18.5.bbappend +++ b/meta-fsl-ppc/recipes-append/busybox/busybox_1.18.5.bbappend @@ -1,7 +1,15 @@ +PR .= "+${DISTRO}.0" + FILESEXTRAPATHS_prepend := "${THISDIR}/busybox-1.18.5:" SRC_URI += "file://0001-libbb.h-do-not-use-homegrown-struct-sysinfo.patch \ file://0002-work-around-sysinfo.h-versus-linux-.h-problems.patch \ file://inetd \ file://inetd.conf \ + file://defconfig-maximum \ " + +do_configure_prepend () { + cp ${WORKDIR}/defconfig-maximum ${WORKDIR}/defconfig +} + -- cgit v1.2.3-54-g00ecf From d69ad8411234ff3b6299d0a34dc8b7a4a94fd163 Mon Sep 17 00:00:00 2001 From: Chunrong Guo Date: Mon, 12 Mar 2012 15:06:08 +0000 Subject: Overide smb configuration file Signed-off-by: Chunrong Guo --- meta-fsl-ppc/recipes-append/samba/files/smb.conf | 22 ++++++++++++++++++++++ .../recipes-append/samba/samba_3.5.6.bbappend | 4 ++++ 2 files changed, 26 insertions(+) create mode 100644 meta-fsl-ppc/recipes-append/samba/files/smb.conf create mode 100644 meta-fsl-ppc/recipes-append/samba/samba_3.5.6.bbappend diff --git a/meta-fsl-ppc/recipes-append/samba/files/smb.conf b/meta-fsl-ppc/recipes-append/samba/files/smb.conf new file mode 100644 index 00000000..c13df310 --- /dev/null +++ b/meta-fsl-ppc/recipes-append/samba/files/smb.conf @@ -0,0 +1,22 @@ +[global] +interfaces = eth0, eth1 +map to guest = Bad User +client NTLMv2 auth = Yes +client lanman auth = No +client plaintext auth = No +max xmit = 2097152 +socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=262142 SO_SNDBUF=262142 +dns proxy = No +use sendfile = Yes +guest account = root +pre-reply write = No +min receivefile size = 1 +dos charset = UTF-8 +unix charset = UTF-8 +display charset = UTF-8 + +[public] +path = /smbshare +read only = No +guest ok = Yes + diff --git a/meta-fsl-ppc/recipes-append/samba/samba_3.5.6.bbappend b/meta-fsl-ppc/recipes-append/samba/samba_3.5.6.bbappend new file mode 100644 index 00000000..7277e475 --- /dev/null +++ b/meta-fsl-ppc/recipes-append/samba/samba_3.5.6.bbappend @@ -0,0 +1,4 @@ +FILEXTRAPATHS_prepend := "${THISDIR}/files:" + +PR .= "+${DISTRO}.0" + -- cgit v1.2.3-54-g00ecf From f6bad4bec2bc785c371657ed5dc5959c652af181 Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Fri, 9 Mar 2012 11:46:03 +0000 Subject: linux-qoriq-sdk.inc: update kernel version Signed-off-by: Matthew McClintock --- meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc index 29d6be87..06896eea 100644 --- a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc +++ b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc @@ -1,6 +1,6 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7" -PV = "3.0.6" +PV = "3.0.18" PR = "r2" SRCREV = "1e3e8ed15249d73a066ddfe2e80882935c35dcb7" -- cgit v1.2.3-54-g00ecf From 74b320981e8abcb0b80cae899ed70700ff316a8d Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Wed, 29 Feb 2012 04:46:32 +0000 Subject: Fix quoting errors in recipes Signed-off-by: Matthew McClintock --- meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc | 4 ++-- meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc index 06896eea..4d6fc3a7 100644 --- a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc +++ b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc @@ -10,10 +10,10 @@ SRC_URI = "git://git.freescale.com/ppc/sdk/linux.git \ " KSRC ?= "" -S = ${@base_conditional("KSRC", "", "${WORKDIR}/git", "${KSRC}", d)} +S = '${@base_conditional("KSRC", "", "${WORKDIR}/git", "${KSRC}", d)}' # make everything compatible for the time being -COMPATIBLE_MACHINE_$MACHINE = $MACHINE +COMPATIBLE_MACHINE_$MACHINE = "$MACHINE" # only powerpc and powerpc64 are compatible COMPATIBLE_HOST = "(powerpc|powerpc64)" diff --git a/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb b/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb index af5343ff..43fc2def 100644 --- a/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb +++ b/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb @@ -25,7 +25,7 @@ EXTRA_OEMAKE = 'CROSS_COMPILE=${WRAP_TARGET_PREFIX} CC="${WRAP_TARGET_PREFIX}gcc PACKAGE_ARCH = "${MACHINE_ARCH}" USRC ?= "" -S = ${@base_conditional("USRC", "", "${WORKDIR}/git", "${USRC}", d)} +S = '${@base_conditional("USRC", "", "${WORKDIR}/git", "${USRC}", d)}' do_compile () { unset LDFLAGS @@ -110,4 +110,4 @@ addtask deploy after do_install FILES_${PN} += "/boot" -ALLOW_EMPTY = 1 +ALLOW_EMPTY = "1" -- cgit v1.2.3-54-g00ecf From ad6b3b8bc7b90f0f4beb70efea6696cc6c367d99 Mon Sep 17 00:00:00 2001 From: Stuart Yoder Date: Sun, 11 Mar 2012 04:52:39 +0000 Subject: meta-fsl-ppc-private: updates to build fsl qemu instead of upstream Signed-off-by: Stuart Yoder --- meta-fsl-ppc/recipes-append/qemu/qemu_git.bbappend | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 meta-fsl-ppc/recipes-append/qemu/qemu_git.bbappend diff --git a/meta-fsl-ppc/recipes-append/qemu/qemu_git.bbappend b/meta-fsl-ppc/recipes-append/qemu/qemu_git.bbappend new file mode 100644 index 00000000..d371047f --- /dev/null +++ b/meta-fsl-ppc/recipes-append/qemu/qemu_git.bbappend @@ -0,0 +1,6 @@ +SRC_URI = "git://git.am.freescale.net/gitolite/sdk/qemu.git;protocol=git" +SRCREV = "${AUTOREV}" + +QEMU_TARGETS ?= "ppc" + +PR .= "+${DISTRO}.0" -- cgit v1.2.3-54-g00ecf From d1657529d217e6a9d66a04f9ce971de458ff3c39 Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Fri, 9 Mar 2012 10:57:35 +0000 Subject: integrate fsl toolchain patches binutils: bin.e500mc_nop.patch bin.e5500.patch bin.e6500-2.patch eglibc: generate-supported.mk glibc.e500mc_subspecies_of_powerpc_is_not_supported.patch glibc.fixgcc4.6.patch glibc.fix_prof.patch glibc.fix_sqrt.patch glibc.readv_proto.patch glibc.undefined_static.patch gcc: gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch gcc.fix_longversionstring.patch gcc.rm_slow_tests.patch gcc.fix_mingw32.patch gcc.fix_cloogstatic2.patch gcc.fix_build-with-cxx.patch gcc.e6500-FSF46.patch gcc.ld_unaligned-460.patch gcc.local_unaligned_altivec.patch gcc.soft_float-460.patch gcc.case_values.patch gcc.builtin_isel.patch gcc.experimental_move.patch gcc.widen_types-46.patch gcc.extelim-v3.patch gcc.e5500_mfocr.patch gcc.opt-array-offset.patch gcc.load_on_store_bypass-462.patch gcc.fix_constvector.patch gcc.fix_MTWX51204-dwarf-vector-reg.patch gcc.fix_ira-loop-pressure.patch optional_libstdc.patch gcc.remove_CCUNSmode_reference.patch gcc.check_path_validity.patch gcc.fix_header_issue.patch gcc.fix_SSIZE_MAX_undefine_issue.patch gettext: gettext.fix_testcase.patch Signed-off-by: Zhenhua Luo --- .../gettext/files/gettext.fix_testcase.patch | 13 + .../gettext/gettext_0.18.1.1.bbappend | 5 + .../binutils-cross-canadian_2.21.1a.bbappend | 1 + .../binutils/binutils-cross_2.21.1a.bbappend | 1 + .../binutils/binutils-crosssdk_2.21.1a.bbappend | 1 + .../recipes-devtools/binutils/binutils-fsl.inc | 10 + .../binutils/binutils_2.21.1a.bbappend | 1 + .../binutils/files/bin.e500mc_nop.patch | 114 + .../binutils/files/bin.e5500.patch | 102 + .../binutils/files/bin.e6500-2.patch | 674 ++++ .../recipes-devtools/eglibc/eglibc-fsl.inc | 14 + .../eglibc/eglibc-initial_2.13.bbappend | 1 + .../eglibc/eglibc-locale_2.13.bbappend | 1 + .../recipes-devtools/eglibc/eglibc_2.13.bbappend | 1 + .../recipes-devtools/eglibc/files/etc/ld.so.conf | 0 .../eglibc/files/generate-supported.mk | 11 + ...mc_subspecies_of_powerpc_is_not_supported.patch | 11 + .../eglibc/files/glibc.fix_prof.patch | 38 + .../eglibc/files/glibc.fix_sqrt.patch | 500 +++ .../eglibc/files/glibc.fixgcc4.6.patch | 29 + .../eglibc/files/glibc.readv_proto.patch | 99 + .../eglibc/files/glibc.undefined_static.patch | 37 + .../gcc/files/gcc.builtin_isel.patch | 1059 ++++++ .../gcc/files/gcc.case_values.patch | 65 + .../gcc/files/gcc.check_path_validity.patch | 12 + .../gcc/files/gcc.e5500_mfocr.patch | 181 + .../gcc/files/gcc.e6500-FSF46.patch | 4011 ++++++++++++++++++++ .../gcc/files/gcc.experimental_move.patch | 32 + .../gcc/files/gcc.extelim-v3.patch | 3491 +++++++++++++++++ .../files/gcc.fix_MTWX51204-dwarf-vector-reg.patch | 9 + .../files/gcc.fix_SSIZE_MAX_undefine_issue.patch | 11 + .../gcc/files/gcc.fix_build-with-cxx.patch | 39 + .../gcc/files/gcc.fix_cloogstatic2.patch | 18 + .../gcc/files/gcc.fix_constvector.patch | 43 + .../gcc/files/gcc.fix_header_issue.patch | 12 + .../gcc/files/gcc.fix_ira-loop-pressure.patch | 12 + .../gcc/files/gcc.fix_longversionstring.patch | 16 + .../gcc/files/gcc.fix_mingw32.patch | 11 + .../gcc/files/gcc.ld_unaligned-460.patch | 32 + .../gcc/files/gcc.load_on_store_bypass-462.patch | 138 + .../gcc/files/gcc.local_unaligned_altivec.patch | 18 + .../gcc/files/gcc.opt-array-offset.patch | 350 ++ .../gcc/files/gcc.remove_CCUNSmode_reference.patch | 24 + .../gcc/files/gcc.rm_slow_tests.patch | 67 + .../gcc/files/gcc.soft_float-460.patch | 190 + .../gcc/files/gcc.widen_types-46.patch | 1534 ++++++++ .../gcc/files/optional_libstdc.patch | 86 + .../gcc/gcc-cross-canadian_4.6.bbappend | 1 + .../gcc/gcc-cross-initial_4.6.bbappend | 1 + .../gcc/gcc-cross-intermediate_4.6.bbappend | 1 + .../recipes-devtools/gcc/gcc-cross_4.6.bbappend | 1 + .../gcc/gcc-crosssdk-initial_4.6.bbappend | 1 + .../gcc/gcc-crosssdk-intermediate_4.6.bbappend | 22 + .../recipes-devtools/gcc/gcc-crosssdk_4.6.bbappend | 1 + meta-fsl-ppc/recipes-devtools/gcc/gcc-fsl.inc | 44 + .../recipes-devtools/gcc/gcc-runtime_4.6.bbappend | 1 + meta-fsl-ppc/recipes-devtools/gcc/gcc_4.6.bbappend | 1 + .../recipes-devtools/gcc/libgcc_4.6.bbappend | 1 + 58 files changed, 13200 insertions(+) create mode 100644 meta-fsl-ppc/recipes-append/gettext/files/gettext.fix_testcase.patch create mode 100644 meta-fsl-ppc/recipes-append/gettext/gettext_0.18.1.1.bbappend create mode 100644 meta-fsl-ppc/recipes-devtools/binutils/binutils-cross-canadian_2.21.1a.bbappend create mode 100644 meta-fsl-ppc/recipes-devtools/binutils/binutils-cross_2.21.1a.bbappend create mode 100644 meta-fsl-ppc/recipes-devtools/binutils/binutils-crosssdk_2.21.1a.bbappend create mode 100644 meta-fsl-ppc/recipes-devtools/binutils/binutils-fsl.inc create mode 100644 meta-fsl-ppc/recipes-devtools/binutils/binutils_2.21.1a.bbappend create mode 100644 meta-fsl-ppc/recipes-devtools/binutils/files/bin.e500mc_nop.patch create mode 100644 meta-fsl-ppc/recipes-devtools/binutils/files/bin.e5500.patch create mode 100644 meta-fsl-ppc/recipes-devtools/binutils/files/bin.e6500-2.patch create mode 100644 meta-fsl-ppc/recipes-devtools/eglibc/eglibc-fsl.inc create mode 100644 meta-fsl-ppc/recipes-devtools/eglibc/eglibc-initial_2.13.bbappend create mode 100644 meta-fsl-ppc/recipes-devtools/eglibc/eglibc-locale_2.13.bbappend create mode 100644 meta-fsl-ppc/recipes-devtools/eglibc/eglibc_2.13.bbappend create mode 100644 meta-fsl-ppc/recipes-devtools/eglibc/files/etc/ld.so.conf create mode 100644 meta-fsl-ppc/recipes-devtools/eglibc/files/generate-supported.mk create mode 100644 meta-fsl-ppc/recipes-devtools/eglibc/files/glibc.e500mc_subspecies_of_powerpc_is_not_supported.patch create mode 100644 meta-fsl-ppc/recipes-devtools/eglibc/files/glibc.fix_prof.patch create mode 100644 meta-fsl-ppc/recipes-devtools/eglibc/files/glibc.fix_sqrt.patch create mode 100644 meta-fsl-ppc/recipes-devtools/eglibc/files/glibc.fixgcc4.6.patch create mode 100644 meta-fsl-ppc/recipes-devtools/eglibc/files/glibc.readv_proto.patch create mode 100644 meta-fsl-ppc/recipes-devtools/eglibc/files/glibc.undefined_static.patch create mode 100644 meta-fsl-ppc/recipes-devtools/gcc/files/gcc.builtin_isel.patch create mode 100644 meta-fsl-ppc/recipes-devtools/gcc/files/gcc.case_values.patch create mode 100644 meta-fsl-ppc/recipes-devtools/gcc/files/gcc.check_path_validity.patch create mode 100644 meta-fsl-ppc/recipes-devtools/gcc/files/gcc.e5500_mfocr.patch create mode 100644 meta-fsl-ppc/recipes-devtools/gcc/files/gcc.e6500-FSF46.patch create mode 100644 meta-fsl-ppc/recipes-devtools/gcc/files/gcc.experimental_move.patch create mode 100644 meta-fsl-ppc/recipes-devtools/gcc/files/gcc.extelim-v3.patch create mode 100644 meta-fsl-ppc/recipes-devtools/gcc/files/gcc.fix_MTWX51204-dwarf-vector-reg.patch create mode 100644 meta-fsl-ppc/recipes-devtools/gcc/files/gcc.fix_SSIZE_MAX_undefine_issue.patch create mode 100644 meta-fsl-ppc/recipes-devtools/gcc/files/gcc.fix_build-with-cxx.patch create mode 100644 meta-fsl-ppc/recipes-devtools/gcc/files/gcc.fix_cloogstatic2.patch create mode 100644 meta-fsl-ppc/recipes-devtools/gcc/files/gcc.fix_constvector.patch create mode 100644 meta-fsl-ppc/recipes-devtools/gcc/files/gcc.fix_header_issue.patch create mode 100644 meta-fsl-ppc/recipes-devtools/gcc/files/gcc.fix_ira-loop-pressure.patch create mode 100644 meta-fsl-ppc/recipes-devtools/gcc/files/gcc.fix_longversionstring.patch create mode 100644 meta-fsl-ppc/recipes-devtools/gcc/files/gcc.fix_mingw32.patch create mode 100644 meta-fsl-ppc/recipes-devtools/gcc/files/gcc.ld_unaligned-460.patch create mode 100644 meta-fsl-ppc/recipes-devtools/gcc/files/gcc.load_on_store_bypass-462.patch create mode 100644 meta-fsl-ppc/recipes-devtools/gcc/files/gcc.local_unaligned_altivec.patch create mode 100644 meta-fsl-ppc/recipes-devtools/gcc/files/gcc.opt-array-offset.patch create mode 100644 meta-fsl-ppc/recipes-devtools/gcc/files/gcc.remove_CCUNSmode_reference.patch create mode 100644 meta-fsl-ppc/recipes-devtools/gcc/files/gcc.rm_slow_tests.patch create mode 100644 meta-fsl-ppc/recipes-devtools/gcc/files/gcc.soft_float-460.patch create mode 100644 meta-fsl-ppc/recipes-devtools/gcc/files/gcc.widen_types-46.patch create mode 100644 meta-fsl-ppc/recipes-devtools/gcc/files/optional_libstdc.patch create mode 100644 meta-fsl-ppc/recipes-devtools/gcc/gcc-cross-canadian_4.6.bbappend create mode 100644 meta-fsl-ppc/recipes-devtools/gcc/gcc-cross-initial_4.6.bbappend create mode 100644 meta-fsl-ppc/recipes-devtools/gcc/gcc-cross-intermediate_4.6.bbappend create mode 100644 meta-fsl-ppc/recipes-devtools/gcc/gcc-cross_4.6.bbappend create mode 100644 meta-fsl-ppc/recipes-devtools/gcc/gcc-crosssdk-initial_4.6.bbappend create mode 100644 meta-fsl-ppc/recipes-devtools/gcc/gcc-crosssdk-intermediate_4.6.bbappend create mode 100644 meta-fsl-ppc/recipes-devtools/gcc/gcc-crosssdk_4.6.bbappend create mode 100644 meta-fsl-ppc/recipes-devtools/gcc/gcc-fsl.inc create mode 100644 meta-fsl-ppc/recipes-devtools/gcc/gcc-runtime_4.6.bbappend create mode 100644 meta-fsl-ppc/recipes-devtools/gcc/gcc_4.6.bbappend create mode 100644 meta-fsl-ppc/recipes-devtools/gcc/libgcc_4.6.bbappend diff --git a/meta-fsl-ppc/recipes-append/gettext/files/gettext.fix_testcase.patch b/meta-fsl-ppc/recipes-append/gettext/files/gettext.fix_testcase.patch new file mode 100644 index 00000000..135f2678 --- /dev/null +++ b/meta-fsl-ppc/recipes-append/gettext/files/gettext.fix_testcase.patch @@ -0,0 +1,13 @@ +--- gettext-0.16.1/gettext-runtime/tests/test-lock.c-orig 2011-07-22 12:51:14.734334073 -0500 ++++ gettext-0.16.1/gettext-runtime/tests/test-lock.c 2011-07-22 12:43:59.962333864 -0500 +@@ -106,7 +106,9 @@ + } + static inline void * gl_thread_self (void) + { +- return (void *) pthread_self (); ++ pthread_t x; ++ x = pthread_self (); ++ return (void *)&x; + } + #endif + #if TEST_PTH_THREADS diff --git a/meta-fsl-ppc/recipes-append/gettext/gettext_0.18.1.1.bbappend b/meta-fsl-ppc/recipes-append/gettext/gettext_0.18.1.1.bbappend new file mode 100644 index 00000000..937be226 --- /dev/null +++ b/meta-fsl-ppc/recipes-append/gettext/gettext_0.18.1.1.bbappend @@ -0,0 +1,5 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/files:" + +SRC_URI += "file://gettext.fix_testcase.patch" + +PR .= "+${DISTRO}.0" diff --git a/meta-fsl-ppc/recipes-devtools/binutils/binutils-cross-canadian_2.21.1a.bbappend b/meta-fsl-ppc/recipes-devtools/binutils/binutils-cross-canadian_2.21.1a.bbappend new file mode 100644 index 00000000..d46b87a8 --- /dev/null +++ b/meta-fsl-ppc/recipes-devtools/binutils/binutils-cross-canadian_2.21.1a.bbappend @@ -0,0 +1 @@ +require binutils-fsl.inc diff --git a/meta-fsl-ppc/recipes-devtools/binutils/binutils-cross_2.21.1a.bbappend b/meta-fsl-ppc/recipes-devtools/binutils/binutils-cross_2.21.1a.bbappend new file mode 100644 index 00000000..d46b87a8 --- /dev/null +++ b/meta-fsl-ppc/recipes-devtools/binutils/binutils-cross_2.21.1a.bbappend @@ -0,0 +1 @@ +require binutils-fsl.inc diff --git a/meta-fsl-ppc/recipes-devtools/binutils/binutils-crosssdk_2.21.1a.bbappend b/meta-fsl-ppc/recipes-devtools/binutils/binutils-crosssdk_2.21.1a.bbappend new file mode 100644 index 00000000..d46b87a8 --- /dev/null +++ b/meta-fsl-ppc/recipes-devtools/binutils/binutils-crosssdk_2.21.1a.bbappend @@ -0,0 +1 @@ +require binutils-fsl.inc diff --git a/meta-fsl-ppc/recipes-devtools/binutils/binutils-fsl.inc b/meta-fsl-ppc/recipes-devtools/binutils/binutils-fsl.inc new file mode 100644 index 00000000..e425d42a --- /dev/null +++ b/meta-fsl-ppc/recipes-devtools/binutils/binutils-fsl.inc @@ -0,0 +1,10 @@ +SRC_URI = "\ + ${GNU_MIRROR}/binutils/binutils-${PV}.tar.bz2 \ + file://bin.e5500.patch \ + file://bin.e6500-2.patch \ + file://bin.e500mc_nop.patch \ + " + +FILESEXTRAPATHS_prepend := "${THISDIR}/files:" + +PR .= "+${DISTRO}.0" diff --git a/meta-fsl-ppc/recipes-devtools/binutils/binutils_2.21.1a.bbappend b/meta-fsl-ppc/recipes-devtools/binutils/binutils_2.21.1a.bbappend new file mode 100644 index 00000000..d46b87a8 --- /dev/null +++ b/meta-fsl-ppc/recipes-devtools/binutils/binutils_2.21.1a.bbappend @@ -0,0 +1 @@ +require binutils-fsl.inc diff --git a/meta-fsl-ppc/recipes-devtools/binutils/files/bin.e500mc_nop.patch b/meta-fsl-ppc/recipes-devtools/binutils/files/bin.e500mc_nop.patch new file mode 100644 index 00000000..9c9d52ca --- /dev/null +++ b/meta-fsl-ppc/recipes-devtools/binutils/files/bin.e500mc_nop.patch @@ -0,0 +1,114 @@ +Generate the preferred NOP: ori r0, r0, 0 in the place of ori r2, r2, 0 +and add the nop test cases in gas for e500mc64, e5500 and e6500. + +diff -ruN binutils-4.6.0-orig/gas/config/tc-ppc.c binutils-4.6.0-new/gas/config/tc-ppc.c +--- binutils-4.6.0-orig/gas/config/tc-ppc.c 2011-08-18 16:02:21.847979825 -0500 ++++ binutils-4.6.0-new/gas/config/tc-ppc.c 2011-08-19 10:09:19.888849978 -0500 +@@ -5815,8 +5817,14 @@ + } + + if ((ppc_cpu & PPC_OPCODE_POWER7) != 0) +- /* power7 group terminating nop: "ori 2,2,0". */ +- md_number_to_chars (dest, 0x60420000, 4); ++ { ++ if (ppc_cpu & PPC_OPCODE_E500MC) ++ /* e500mc group terminating nop: "ori 0,0,0". */ ++ md_number_to_chars (dest, 0x60000000, 4); ++ else ++ /* power7 group terminating nop: "ori 2,2,0". */ ++ md_number_to_chars (dest, 0x60420000, 4); ++ } + else + /* power6 group terminating nop: "ori 1,1,0". */ + md_number_to_chars (dest, 0x60210000, 4); +diff -ruN binutils-4.6.0-orig/gas/testsuite/gas/ppc/e500mc64_nop.d binutils-4.6.0-new/gas/testsuite/gas/ppc/e500mc64_nop.d +--- binutils-4.6.0-orig/gas/testsuite/gas/ppc/e500mc64_nop.d 1969-12-31 18:00:00.000000000 -0600 ++++ binutils-4.6.0-new/gas/testsuite/gas/ppc/e500mc64_nop.d 2011-08-19 10:16:29.561849966 -0500 +@@ -0,0 +1,13 @@ ++#as: -mppc -me500mc64 ++#objdump: -dr -Me500mc64 ++#name: Power E500MC64 nop tests ++ ++.*: +file format elf(32)?(64)?-powerpc.* ++ ++Disassembly of section \.text: ++ ++0+00 : ++ 0: 60 00 00 00 nop ++ 4: 60 00 00 00 nop ++ 8: 60 00 00 00 nop ++ c: 60 00 00 00 nop +diff -ruN binutils-4.6.0-orig/gas/testsuite/gas/ppc/e500mc64_nop.s binutils-4.6.0-new/gas/testsuite/gas/ppc/e500mc64_nop.s +--- binutils-4.6.0-orig/gas/testsuite/gas/ppc/e500mc64_nop.s 1969-12-31 18:00:00.000000000 -0600 ++++ binutils-4.6.0-new/gas/testsuite/gas/ppc/e500mc64_nop.s 2011-08-19 10:16:29.561849966 -0500 +@@ -0,0 +1,5 @@ ++# Power E500MC64 nop tests ++ .section ".text" ++start: ++ nop ++ .p2align 4,,15 +diff -ruN binutils-4.6.0-orig/gas/testsuite/gas/ppc/e5500_nop.d binutils-4.6.0-new/gas/testsuite/gas/ppc/e5500_nop.d +--- binutils-4.6.0-orig/gas/testsuite/gas/ppc/e5500_nop.d 1969-12-31 18:00:00.000000000 -0600 ++++ binutils-4.6.0-new/gas/testsuite/gas/ppc/e5500_nop.d 2011-08-19 10:16:29.561849966 -0500 +@@ -0,0 +1,13 @@ ++#as: -mppc -me5500 ++#objdump: -dr -Me5500 ++#name: Power E5500 nop tests ++ ++.*: +file format elf(32)?(64)?-powerpc.* ++ ++Disassembly of section \.text: ++ ++0+00 : ++ 0: 60 00 00 00 nop ++ 4: 60 00 00 00 nop ++ 8: 60 00 00 00 nop ++ c: 60 00 00 00 nop +diff -ruN binutils-4.6.0-orig/gas/testsuite/gas/ppc/e5500_nop.s binutils-4.6.0-new/gas/testsuite/gas/ppc/e5500_nop.s +--- binutils-4.6.0-orig/gas/testsuite/gas/ppc/e5500_nop.s 1969-12-31 18:00:00.000000000 -0600 ++++ binutils-4.6.0-new/gas/testsuite/gas/ppc/e5500_nop.s 2011-08-19 10:16:29.561849966 -0500 +@@ -0,0 +1,5 @@ ++# Power E5500 nop tests ++ .section ".text" ++start: ++ nop ++ .p2align 4,,15 +diff -ruN binutils-4.6.0-orig/gas/testsuite/gas/ppc/e6500_nop.d binutils-4.6.0-new/gas/testsuite/gas/ppc/e6500_nop.d +--- binutils-4.6.0-orig/gas/testsuite/gas/ppc/e6500_nop.d 1969-12-31 18:00:00.000000000 -0600 ++++ binutils-4.6.0-new/gas/testsuite/gas/ppc/e6500_nop.d 2011-08-19 10:16:29.561849966 -0500 +@@ -0,0 +1,13 @@ ++#as: -mppc -me6500 ++#objdump: -dr -Me6500 ++#name: Power E6500 nop tests ++ ++.*: +file format elf(32)?(64)?-powerpc.* ++ ++Disassembly of section \.text: ++ ++0+00 : ++ 0: 60 00 00 00 nop ++ 4: 60 00 00 00 nop ++ 8: 60 00 00 00 nop ++ c: 60 00 00 00 nop +diff -ruN binutils-4.6.0-orig/gas/testsuite/gas/ppc/e6500_nop.s binutils-4.6.0-new/gas/testsuite/gas/ppc/e6500_nop.s +--- binutils-4.6.0-orig/gas/testsuite/gas/ppc/e6500_nop.s 1969-12-31 18:00:00.000000000 -0600 ++++ binutils-4.6.0-new/gas/testsuite/gas/ppc/e6500_nop.s 2011-08-19 10:16:29.562849956 -0500 +@@ -0,0 +1,5 @@ ++# Power E6500 nop tests ++ .section ".text" ++start: ++ nop ++ .p2align 4,,15 +diff -ruN binutils-4.6.0-orig/gas/testsuite/gas/ppc/ppc.exp binutils-4.6.0-new/gas/testsuite/gas/ppc/ppc.exp +--- binutils-4.6.0-orig/gas/testsuite/gas/ppc/ppc.exp 2011-08-19 10:15:29.445978575 -0500 ++++ binutils-4.6.0-new/gas/testsuite/gas/ppc/ppc.exp 2011-08-19 10:16:17.827852501 -0500 +@@ -43,6 +43,9 @@ + run_dump_test "ppc750ps" + run_dump_test "e500mc" + run_dump_test "e6500" ++ run_dump_test "e500mc64_nop" ++ run_dump_test "e5500_nop" ++ run_dump_test "e6500_nop" + run_dump_test "a2" + run_dump_test "cell" + run_dump_test "common" diff --git a/meta-fsl-ppc/recipes-devtools/binutils/files/bin.e5500.patch b/meta-fsl-ppc/recipes-devtools/binutils/files/bin.e5500.patch new file mode 100644 index 00000000..800590c3 --- /dev/null +++ b/meta-fsl-ppc/recipes-devtools/binutils/files/bin.e5500.patch @@ -0,0 +1,102 @@ +bin.e5500 + +Implements target e5500 and -me5500, etc.. + +diff -r -u binutils-2.21-20110211-orig/bfd/archures.c binutils-2.21-20110211/bfd/archures.c +--- binutils-2.21-20110211-orig/bfd/archures.c 2010-12-30 18:33:31.000000000 -0600 ++++ binutils-2.21-20110211/bfd/archures.c 2011-02-14 13:17:00.528340236 -0600 +@@ -234,6 +234,7 @@ + .#define bfd_mach_ppc_e500 500 + .#define bfd_mach_ppc_e500mc 5001 + .#define bfd_mach_ppc_e500mc64 5005 ++.#define bfd_mach_ppc_e5500 5006 + .#define bfd_mach_ppc_titan 83 + . bfd_arch_rs6000, {* IBM RS/6000 *} + .#define bfd_mach_rs6k 6000 +diff -r -u binutils-2.21-20110211-orig/bfd/bfd-in2.h binutils-2.21-20110211/bfd/bfd-in2.h +--- binutils-2.21-20110211-orig/bfd/bfd-in2.h 2011-02-11 10:57:58.000000000 -0600 ++++ binutils-2.21-20110211/bfd/bfd-in2.h 2011-02-14 13:19:57.365092179 -0600 +@@ -1921,6 +1921,7 @@ + #define bfd_mach_ppc_e500 500 + #define bfd_mach_ppc_e500mc 5001 + #define bfd_mach_ppc_e500mc64 5005 ++#define bfd_mach_ppc_e5500 5006 + #define bfd_mach_ppc_titan 83 + bfd_arch_rs6000, /* IBM RS/6000 */ + #define bfd_mach_rs6k 6000 +diff -r -u binutils-2.21-20110211-orig/bfd/cpu-powerpc.c binutils-2.21-20110211/bfd/cpu-powerpc.c +--- binutils-2.21-20110211-orig/bfd/cpu-powerpc.c 2010-02-07 19:59:34.000000000 -0600 ++++ binutils-2.21-20110211/bfd/cpu-powerpc.c 2011-02-14 13:21:48.802403135 -0600 +@@ -352,6 +352,20 @@ + FALSE, /* not the default */ + powerpc_compatible, + bfd_default_scan, ++ &bfd_powerpc_archs[19] ++ }, ++ { ++ 64, /* 64 bits in a word */ ++ 64, /* 64 bits in an address */ ++ 8, /* 8 bits in a byte */ ++ bfd_arch_powerpc, ++ bfd_mach_ppc_e5500, ++ "powerpc", ++ "powerpc:e5500", ++ 3, ++ FALSE, /* not the default */ ++ powerpc_compatible, ++ bfd_default_scan, + 0 + } + }; +diff -r -u binutils-2.21-20110211-orig/gas/config/tc-ppc.c binutils-2.21-20110211/gas/config/tc-ppc.c +--- binutils-2.21-20110211-orig/gas/config/tc-ppc.c 2011-02-11 10:58:01.000000000 -0600 ++++ binutils-2.21-20110211/gas/config/tc-ppc.c 2011-02-14 13:23:39.478340515 -0600 +@@ -1235,6 +1235,7 @@ + -me500, -me500x2 generate code for Motorola e500 core complex\n\ + -me500mc, generate code for Freescale e500mc core complex\n\ + -me500mc64, generate code for Freescale e500mc64 core complex\n\ ++-me5500, generate code for Freescale e5500 core complex\n\ + -mspe generate code for Motorola SPE instructions\n\ + -mtitan generate code for AppliedMicro Titan core complex\n\ + -mregnames Allow symbolic names for registers\n\ +diff -r -u binutils-2.21-20110211-orig/gas/doc/as.texinfo binutils-2.21-20110211/gas/doc/as.texinfo +--- binutils-2.21-20110211-orig/gas/doc/as.texinfo 2011-02-11 10:58:01.000000000 -0600 ++++ binutils-2.21-20110211/gas/doc/as.texinfo 2011-02-14 13:26:01.383403323 -0600 +@@ -431,7 +431,7 @@ + [@b{-a32}|@b{-a64}] + [@b{-mpwrx}|@b{-mpwr2}|@b{-mpwr}|@b{-m601}|@b{-mppc}|@b{-mppc32}|@b{-m603}|@b{-m604}|@b{-m403}|@b{-m405}| + @b{-m440}|@b{-m464}|@b{-m476}|@b{-m7400}|@b{-m7410}|@b{-m7450}|@b{-m7455}|@b{-m750cl}|@b{-mppc64}| +- @b{-m620}|@b{-me500}|@b{-e500x2}|@b{-me500mc}|@b{-me500mc64}|@b{-mppc64bridge}|@b{-mbooke}| ++ @b{-m620}|@b{-me500}|@b{-e500x2}|@b{-me500mc}|@b{-me500mc64}|@b{-me5500}|@b{-mppc64bridge}|@b{-mbooke}| + @b{-mpower4}|@b{-mpr4}|@b{-mpower5}|@b{-mpwr5}|@b{-mpwr5x}|@b{-mpower6}|@b{-mpwr6}| + @b{-mpower7}|@b{-mpw7}|@b{-ma2}|@b{-mcell}|@b{-mspe}|@b{-mtitan}|@b{-me300}|@b{-mcom}] + [@b{-many}] [@b{-maltivec}|@b{-mvsx}] +diff -r -u binutils-2.21-20110211-orig/gas/doc/c-ppc.texi binutils-2.21-20110211/gas/doc/c-ppc.texi +--- binutils-2.21-20110211-orig/gas/doc/c-ppc.texi 2011-02-11 10:58:04.000000000 -0600 ++++ binutils-2.21-20110211/gas/doc/c-ppc.texi 2011-02-14 13:26:31.140090956 -0600 +@@ -88,6 +88,9 @@ + @item -me500mc64 + Generate code for Freescale e500mc64 core complex. + ++@item -me5500 ++Generate code for Freescale e5500 core complex. ++ + @item -mspe + Generate code for Motorola SPE instructions. + +diff -r -u binutils-2.21-20110211-orig/opcodes/ppc-dis.c binutils-2.21-20110211/opcodes/ppc-dis.c +--- binutils-2.21-20110211-orig/opcodes/ppc-dis.c 2010-07-03 03:27:23.000000000 -0500 ++++ binutils-2.21-20110211/opcodes/ppc-dis.c 2011-02-14 13:28:54.384090879 -0600 +@@ -114,6 +114,12 @@ + | PPC_OPCODE_E500MC | PPC_OPCODE_64 | PPC_OPCODE_POWER5 + | PPC_OPCODE_POWER6 | PPC_OPCODE_POWER7), + 0 }, ++ { "e5500", (PPC_OPCODE_PPC | PPC_OPCODE_BOOKE | PPC_OPCODE_ISEL ++ | PPC_OPCODE_PMR | PPC_OPCODE_CACHELCK | PPC_OPCODE_RFMCI ++ | PPC_OPCODE_E500MC | PPC_OPCODE_64 | PPC_OPCODE_POWER4 ++ | PPC_OPCODE_POWER5 | PPC_OPCODE_POWER6 ++ | PPC_OPCODE_POWER7), ++ 0 }, + { "e500x2", (PPC_OPCODE_PPC | PPC_OPCODE_BOOKE | PPC_OPCODE_SPE + | PPC_OPCODE_ISEL | PPC_OPCODE_EFS | PPC_OPCODE_BRLOCK + | PPC_OPCODE_PMR | PPC_OPCODE_CACHELCK | PPC_OPCODE_RFMCI diff --git a/meta-fsl-ppc/recipes-devtools/binutils/files/bin.e6500-2.patch b/meta-fsl-ppc/recipes-devtools/binutils/files/bin.e6500-2.patch new file mode 100644 index 00000000..e8633233 --- /dev/null +++ b/meta-fsl-ppc/recipes-devtools/binutils/files/bin.e6500-2.patch @@ -0,0 +1,674 @@ +bin.e6500-2 +Implements target e6500 and -me6500, etc.. + +Also enables some cell instructions but using different opcodes. (This +should be temporary until new mnemonics are chosen. Likely to be +defined only when ISA 2.07 comes out) + +Also implements new altivec instructions, and a few other e6500 +instructions like miso, and sync with two arguments. + +diff -ruN binutils-2.21-20110211-e5500/bfd/archures.c binutils-2.21-20110211-e6500/bfd/archures.c +--- binutils-2.21-20110211-e5500/bfd/archures.c 2011-05-03 16:04:03.828069461 -0500 ++++ binutils-2.21-20110211-e6500/bfd/archures.c 2011-05-03 16:04:15.253938636 -0500 +@@ -235,6 +235,7 @@ + .#define bfd_mach_ppc_e500mc 5001 + .#define bfd_mach_ppc_e500mc64 5005 + .#define bfd_mach_ppc_e5500 5006 ++.#define bfd_mach_ppc_e6500 5007 + .#define bfd_mach_ppc_titan 83 + . bfd_arch_rs6000, {* IBM RS/6000 *} + .#define bfd_mach_rs6k 6000 +diff -ruN binutils-2.21-20110211-e5500/bfd/bfd-in2.h binutils-2.21-20110211-e6500/bfd/bfd-in2.h +--- binutils-2.21-20110211-e5500/bfd/bfd-in2.h 2011-05-03 16:04:03.836064584 -0500 ++++ binutils-2.21-20110211-e6500/bfd/bfd-in2.h 2011-05-03 16:04:15.260938268 -0500 +@@ -1922,6 +1922,7 @@ + #define bfd_mach_ppc_e500mc 5001 + #define bfd_mach_ppc_e500mc64 5005 + #define bfd_mach_ppc_e5500 5006 ++#define bfd_mach_ppc_e6500 5007 + #define bfd_mach_ppc_titan 83 + bfd_arch_rs6000, /* IBM RS/6000 */ + #define bfd_mach_rs6k 6000 +diff -ruN binutils-2.21-20110211-e5500/bfd/cpu-powerpc.c binutils-2.21-20110211-e6500/bfd/cpu-powerpc.c +--- binutils-2.21-20110211-e5500/bfd/cpu-powerpc.c 2011-05-03 16:04:03.839066505 -0500 ++++ binutils-2.21-20110211-e6500/bfd/cpu-powerpc.c 2011-05-03 16:04:15.272066052 -0500 +@@ -366,6 +366,20 @@ + FALSE, /* not the default */ + powerpc_compatible, + bfd_default_scan, ++ &bfd_powerpc_archs[20] ++ }, ++ { ++ 64, /* 64 bits in a word */ ++ 64, /* 64 bits in an address */ ++ 8, /* 8 bits in a byte */ ++ bfd_arch_powerpc, ++ bfd_mach_ppc_e6500, ++ "powerpc", ++ "powerpc:e6500", ++ 3, ++ FALSE, /* not the default */ ++ powerpc_compatible, ++ bfd_default_scan, + 0 + } + }; +diff -ruN binutils-2.21-20110211-e5500/gas/config/tc-ppc.c binutils-2.21-20110211-e6500/gas/config/tc-ppc.c +--- binutils-2.21-20110211-e5500/gas/config/tc-ppc.c 2011-05-03 16:04:03.847063157 -0500 ++++ binutils-2.21-20110211-e6500/gas/config/tc-ppc.c 2011-05-03 16:04:15.279062744 -0500 +@@ -1236,6 +1236,7 @@ + -me500mc, generate code for Freescale e500mc core complex\n\ + -me500mc64, generate code for Freescale e500mc64 core complex\n\ + -me5500, generate code for Freescale e5500 core complex\n\ ++-me6500, generate code for Freescale e6500 core complex\n\ + -mspe generate code for Motorola SPE instructions\n\ + -mtitan generate code for AppliedMicro Titan core complex\n\ + -mregnames Allow symbolic names for registers\n\ +diff -ruN binutils-2.21-20110211-e5500/gas/doc/as.texinfo binutils-2.21-20110211-e6500/gas/doc/as.texinfo +--- binutils-2.21-20110211-e5500/gas/doc/as.texinfo 2011-05-03 16:04:03.857062970 -0500 ++++ binutils-2.21-20110211-e6500/gas/doc/as.texinfo 2011-05-03 16:04:15.289062767 -0500 +@@ -431,8 +431,8 @@ + [@b{-a32}|@b{-a64}] + [@b{-mpwrx}|@b{-mpwr2}|@b{-mpwr}|@b{-m601}|@b{-mppc}|@b{-mppc32}|@b{-m603}|@b{-m604}|@b{-m403}|@b{-m405}| + @b{-m440}|@b{-m464}|@b{-m476}|@b{-m7400}|@b{-m7410}|@b{-m7450}|@b{-m7455}|@b{-m750cl}|@b{-mppc64}| +- @b{-m620}|@b{-me500}|@b{-e500x2}|@b{-me500mc}|@b{-me500mc64}|@b{-me5500}|@b{-mppc64bridge}|@b{-mbooke}| +- @b{-mpower4}|@b{-mpr4}|@b{-mpower5}|@b{-mpwr5}|@b{-mpwr5x}|@b{-mpower6}|@b{-mpwr6}| ++ @b{-m620}|@b{-me500}|@b{-e500x2}|@b{-me500mc}|@b{-me500mc64}|@b{-me5500}|@b{-me6500}|@b{-mppc64bridge}| ++ @b{-mbooke}|@b{-mpower4}|@b{-mpr4}|@b{-mpower5}|@b{-mpwr5}|@b{-mpwr5x}|@b{-mpower6}|@b{-mpwr6}| + @b{-mpower7}|@b{-mpw7}|@b{-ma2}|@b{-mcell}|@b{-mspe}|@b{-mtitan}|@b{-me300}|@b{-mcom}] + [@b{-many}] [@b{-maltivec}|@b{-mvsx}] + [@b{-mregnames}|@b{-mno-regnames}] +diff -ruN binutils-2.21-20110211-e5500/gas/doc/c-ppc.texi binutils-2.21-20110211-e6500/gas/doc/c-ppc.texi +--- binutils-2.21-20110211-e5500/gas/doc/c-ppc.texi 2011-05-03 16:04:03.859065711 -0500 ++++ binutils-2.21-20110211-e6500/gas/doc/c-ppc.texi 2011-05-03 16:04:15.291064458 -0500 +@@ -91,6 +91,9 @@ + @item -me5500 + Generate code for Freescale e5500 core complex. + ++@item -me6500 ++Generate code for Freescale e6500 core complex. ++ + @item -mspe + Generate code for Motorola SPE instructions. + +diff -ruN binutils-2.21-20110211-e5500/gas/testsuite/gas/ppc/e6500.d binutils-2.21-20110211-e6500/gas/testsuite/gas/ppc/e6500.d +--- binutils-2.21-20110211-e5500/gas/testsuite/gas/ppc/e6500.d 1969-12-31 18:00:00.000000000 -0600 ++++ binutils-2.21-20110211-e6500/gas/testsuite/gas/ppc/e6500.d 2011-05-03 17:04:13.611815418 -0500 +@@ -0,0 +1,75 @@ ++#as: -mppc -me6500 ++#objdump: -dr -Me6500 ++#name: Power E6500 tests ++ ++.*: +file format elf(32)?(64)?-powerpc.* ++ ++Disassembly of section \.text: ++ ++0+00 : ++ 0: 10 01 10 c0 vabsdub v0,v1,v2 ++ 4: 10 01 11 00 vabsduh v0,v1,v2 ++ 8: 10 01 11 40 vabsduw v0,v1,v2 ++ c: 7c 01 10 dc mvidsplt v0,r1,r2 ++ 10: 7c 01 11 1c mviwsplt v0,r1,r2 ++ 14: 7c 00 12 0a lvexbx v0,0,r2 ++ 18: 7c 01 12 0a lvexbx v0,r1,r2 ++ 1c: 7c 00 12 4a lvexhx v0,0,r2 ++ 20: 7c 01 12 4a lvexhx v0,r1,r2 ++ 24: 7c 00 12 8a lvexwx v0,0,r2 ++ 28: 7c 01 12 8a lvexwx v0,r1,r2 ++ 2c: 7c 00 13 0a stvexbx v0,0,r2 ++ 30: 7c 01 13 0a stvexbx v0,r1,r2 ++ 34: 7c 00 13 4a stvexhx v0,0,r2 ++ 38: 7c 01 13 4a stvexhx v0,r1,r2 ++ 3c: 7c 00 13 8a stvexwx v0,0,r2 ++ 40: 7c 01 13 8a stvexwx v0,r1,r2 ++ 44: 7c 00 12 4e lvepx v0,0,r2 ++ 48: 7c 01 12 4e lvepx v0,r1,r2 ++ 4c: 7c 00 12 0e lvepxl v0,0,r2 ++ 50: 7c 01 12 0e lvepxl v0,r1,r2 ++ 54: 7c 00 16 4e stvepx v0,0,r2 ++ 58: 7c 01 16 4e stvepx v0,r1,r2 ++ 5c: 7c 00 16 0e stvepxl v0,0,r2 ++ 60: 7c 01 16 0e stvepxl v0,r1,r2 ++ 64: 7c 00 14 8a lvlx v0,0,r2 ++ 68: 7c 01 14 8a lvlx v0,r1,r2 ++ 6c: 7c 00 16 8a lvlxl v0,0,r2 ++ 70: 7c 01 16 8a lvlxl v0,r1,r2 ++ 74: 7c 00 14 4a lvrx v0,0,r2 ++ 78: 7c 01 14 4a lvrx v0,r1,r2 ++ 7c: 7c 00 16 4a lvrxl v0,0,r2 ++ 80: 7c 01 16 4a lvrxl v0,r1,r2 ++ 84: 7c 00 15 8a stvlx v0,0,r2 ++ 88: 7c 01 15 8a stvlx v0,r1,r2 ++ 8c: 7c 00 17 8a stvlxl v0,0,r2 ++ 90: 7c 01 17 8a stvlxl v0,r1,r2 ++ 94: 7c 00 15 4a stvrx v0,0,r2 ++ 98: 7c 01 15 4a stvrx v0,r1,r2 ++ 9c: 7c 00 17 4a stvrxl v0,0,r2 ++ a0: 7c 01 17 4a stvrxl v0,r1,r2 ++ a4: 7c 00 14 ca lvswx v0,0,r2 ++ a8: 7c 01 14 ca lvswx v0,r1,r2 ++ ac: 7c 00 16 ca lvswxl v0,0,r2 ++ b0: 7c 01 16 ca lvswxl v0,r1,r2 ++ b4: 7c 00 15 ca stvswx v0,0,r2 ++ b8: 7c 01 15 ca stvswx v0,r1,r2 ++ bc: 7c 00 17 ca stvswxl v0,0,r2 ++ c0: 7c 01 17 ca stvswxl v0,r1,r2 ++ c4: 7c 00 16 0a lvsm v0,0,r2 ++ c8: 7c 01 16 0a lvsm v0,r1,r2 ++ cc: 7f 5a d3 78 miso ++ d0: 7c 00 04 ac sync ++ d4: 7c 00 04 ac sync ++ d8: 7c 20 04 ac lwsync ++ dc: 7c 00 04 ac sync ++ e0: 7c 07 04 ac sync 0,7 ++ e4: 7c 28 04 ac sync 1,8 ++ e8: 7c 00 00 c3 dni 0,0 ++ ec: 7f ff 00 c3 dni 31,31 ++ f0: 7c 40 0b 4d dcblq. 2,0,r1 ++ f4: 7c 43 0b 4d dcblq. 2,r3,r1 ++ f8: 7c 40 09 8d icblq. 2,0,r1 ++ fc: 7c 43 09 8d icblq. 2,r3,r1 ++ 100: 7c 10 02 dc mftmr r0,16 ++ 104: 7c 10 03 dc mttmr 16,r0 +diff -ruN binutils-2.21-20110211-e5500/gas/testsuite/gas/ppc/e6500.s binutils-2.21-20110211-e6500/gas/testsuite/gas/ppc/e6500.s +--- binutils-2.21-20110211-e5500/gas/testsuite/gas/ppc/e6500.s 1969-12-31 18:00:00.000000000 -0600 ++++ binutils-2.21-20110211-e6500/gas/testsuite/gas/ppc/e6500.s 2011-05-03 16:35:30.724819687 -0500 +@@ -0,0 +1,69 @@ ++# Power E6500 tests ++ .section ".text" ++start: ++ vabsdub 0, 1, 2 ++ vabsduh 0, 1, 2 ++ vabsduw 0, 1, 2 ++ mvidsplt 0, 1, 2 ++ mviwsplt 0, 1, 2 ++ lvexbx 0, 0, 2 ++ lvexbx 0, 1, 2 ++ lvexhx 0, 0, 2 ++ lvexhx 0, 1, 2 ++ lvexwx 0, 0, 2 ++ lvexwx 0, 1, 2 ++ stvexbx 0, 0, 2 ++ stvexbx 0, 1, 2 ++ stvexhx 0, 0, 2 ++ stvexhx 0, 1, 2 ++ stvexwx 0, 0, 2 ++ stvexwx 0, 1, 2 ++ lvepx 0, 0, 2 ++ lvepx 0, 1, 2 ++ lvepxl 0, 0, 2 ++ lvepxl 0, 1, 2 ++ stvepx 0, 0, 2 ++ stvepx 0, 1, 2 ++ stvepxl 0, 0, 2 ++ stvepxl 0, 1, 2 ++ lvlx 0, 0, 2 ++ lvlx 0, 1, 2 ++ lvlxl 0, 0, 2 ++ lvlxl 0, 1, 2 ++ lvrx 0, 0, 2 ++ lvrx 0, 1, 2 ++ lvrxl 0, 0, 2 ++ lvrxl 0, 1, 2 ++ stvlx 0, 0, 2 ++ stvlx 0, 1, 2 ++ stvlxl 0, 0, 2 ++ stvlxl 0, 1, 2 ++ stvrx 0, 0, 2 ++ stvrx 0, 1, 2 ++ stvrxl 0, 0, 2 ++ stvrxl 0, 1, 2 ++ lvswx 0, 0, 2 ++ lvswx 0, 1, 2 ++ lvswxl 0, 0, 2 ++ lvswxl 0, 1, 2 ++ stvswx 0, 0, 2 ++ stvswx 0, 1, 2 ++ stvswxl 0, 0, 2 ++ stvswxl 0, 1, 2 ++ lvsm 0, 0, 2 ++ lvsm 0, 1, 2 ++ miso ++ sync ++ sync 0,0 ++ sync 1,0 ++ sync 2,0 ++ sync 3,7 ++ sync 3,8 ++ dni 0,0 ++ dni 31,31 ++ dcblq. 2,0,1 ++ dcblq. 2,3,1 ++ icblq. 2,0,1 ++ icblq. 2,3,1 ++ mftmr 0,16 ++ mttmr 16,0 +diff -ruN binutils-2.21-20110211-e5500/gas/testsuite/gas/ppc/ppc.exp binutils-2.21-20110211-e6500/gas/testsuite/gas/ppc/ppc.exp +--- binutils-2.21-20110211-e5500/gas/testsuite/gas/ppc/ppc.exp 2010-02-07 19:59:38.000000000 -0600 ++++ binutils-2.21-20110211-e6500/gas/testsuite/gas/ppc/ppc.exp 2011-05-03 16:04:15.297067070 -0500 +@@ -42,6 +42,7 @@ + run_list_test "range" "-a32" + run_dump_test "ppc750ps" + run_dump_test "e500mc" ++ run_dump_test "e6500" + run_dump_test "a2" + run_dump_test "cell" + run_dump_test "common" +diff -ruN binutils-2.21-20110211-e5500/include/opcode/ppc.h binutils-2.21-20110211-e6500/include/opcode/ppc.h +--- binutils-2.21-20110211-e5500/include/opcode/ppc.h 2010-07-03 01:51:53.000000000 -0500 ++++ binutils-2.21-20110211-e6500/include/opcode/ppc.h 2011-05-03 16:04:15.298069340 -0500 +@@ -174,6 +174,15 @@ + /* Opcode which is supported by the e500 family */ + #define PPC_OPCODE_E500 0x100000000ull + ++/* Opcode is supported by Extended Altivec Vector Unit */ ++#define PPC_OPCODE_ALTIVEC2 0x200000000ull ++ ++/* Opcode is supported by Power E6500 */ ++#define PPC_OPCODE_E6500 0x400000000ull ++ ++/* Opcode is supported by Thread management APU */ ++#define PPC_OPCODE_TMR 0x800000000ull ++ + /* A macro to extract the major opcode from an instruction. */ + #define PPC_OP(i) (((i) >> 26) & 0x3f) + +diff -ruN binutils-2.21-20110211-e5500/opcodes/ppc-dis.c binutils-2.21-20110211-e6500/opcodes/ppc-dis.c +--- binutils-2.21-20110211-e5500/opcodes/ppc-dis.c 2011-05-03 16:04:03.862065832 -0500 ++++ binutils-2.21-20110211-e6500/opcodes/ppc-dis.c 2011-05-03 16:04:15.300067851 -0500 +@@ -120,6 +120,12 @@ + | PPC_OPCODE_POWER5 | PPC_OPCODE_POWER6 + | PPC_OPCODE_POWER7), + 0 }, ++ { "e6500", (PPC_OPCODE_PPC | PPC_OPCODE_BOOKE | PPC_OPCODE_ISEL ++ | PPC_OPCODE_PMR | PPC_OPCODE_CACHELCK | PPC_OPCODE_RFMCI ++ | PPC_OPCODE_E500MC | PPC_OPCODE_64 | PPC_OPCODE_ALTIVEC ++ | PPC_OPCODE_ALTIVEC2 | PPC_OPCODE_E6500 | PPC_OPCODE_POWER4 ++ | PPC_OPCODE_POWER5 | PPC_OPCODE_POWER6 | PPC_OPCODE_POWER7), ++ 0 }, + { "e500x2", (PPC_OPCODE_PPC | PPC_OPCODE_BOOKE | PPC_OPCODE_SPE + | PPC_OPCODE_ISEL | PPC_OPCODE_EFS | PPC_OPCODE_BRLOCK + | PPC_OPCODE_PMR | PPC_OPCODE_CACHELCK | PPC_OPCODE_RFMCI +diff -ruN binutils-2.21-20110211-e5500/opcodes/ppc-opc.c binutils-2.21-20110211-e6500/opcodes/ppc-opc.c +--- binutils-2.21-20110211-e5500/opcodes/ppc-opc.c 2011-02-11 10:58:12.000000000 -0600 ++++ binutils-2.21-20110211-e6500/opcodes/ppc-opc.c 2011-05-03 17:22:20.260813917 -0500 +@@ -53,6 +53,7 @@ + static long extract_boe (unsigned long, ppc_cpu_t, int *); + static unsigned long insert_fxm (unsigned long, long, ppc_cpu_t, const char **); + static long extract_fxm (unsigned long, ppc_cpu_t, int *); ++static unsigned long insert_ls (unsigned long, long, ppc_cpu_t, const char **); + static unsigned long insert_mbe (unsigned long, long, ppc_cpu_t, const char **); + static long extract_mbe (unsigned long, ppc_cpu_t, int *); + static unsigned long insert_mb6 (unsigned long, long, ppc_cpu_t, const char **); +@@ -450,6 +451,7 @@ + lower 5 bits are stored in the upper 5 and vice- versa. */ + #define SPR SISIGNOPT + 1 + #define PMR SPR ++#define TMR SPR + #define SPR_MASK (0x3ff << 11) + { 0x3ff, 11, insert_spr, extract_spr, 0 }, + +@@ -472,8 +474,12 @@ + #define T STRM + { 0x3, 21, NULL, NULL, 0 }, + ++ /* The ESYNC field in an X (sync) form instruction. */ ++#define ESYNC STRM + 1 ++ { 0xf, 16, insert_ls, NULL, PPC_OPERAND_OPTIONAL }, ++ + /* The SV field in a POWER SC form instruction. */ +-#define SV STRM + 1 ++#define SV ESYNC + 1 + { 0x3fff, 2, NULL, NULL, 0 }, + + /* The TBR field in an XFX form instruction. This is like the SPR +@@ -515,6 +521,7 @@ + + /* The UIMM field in a VX form instruction. */ + #define UIMM SIMM + 1 ++#define DCTL UIMM + { 0x1f, 16, NULL, NULL, 0 }, + + /* The SHB field in a VA form instruction. */ +@@ -996,6 +1003,32 @@ + return mask; + } + ++/* The LS field in a sync instruction that accepts 2 operands ++ Values 2 and 3 are reserved, ++ must be treated as 0 for future compatibility ++ Values 0 and 1 can be accepted, if field ESYNC is zero ++ Otherwise L = complement of ESYNC-bit2 (1<<18) */ ++ ++static unsigned long ++insert_ls (unsigned long insn, ++ long value, ++ ppc_cpu_t dialect ATTRIBUTE_UNUSED, ++ const char **errmsg ATTRIBUTE_UNUSED) ++{ ++ unsigned long ls; ++ ++ ls = (insn >> 21) & 0x03; ++ if (value == 0) ++ { ++ if (ls > 1) ++ return insn & ~(0x3 << 21); ++ return insn; ++ } ++ if ((value & 0x2) != 0) ++ return (insn & ~(0x3 << 21)) | ((value & 0xf) << 16); ++ return (insn & ~(0x3 << 21)) | (0x1 << 21) | ((value & 0xf) << 16); ++} ++ + /* The MB and ME fields in an M form instruction expressed as a single + operand which is itself a bitmask. The extraction function always + marks it as invalid, since we never want to recognize an +@@ -1728,6 +1761,9 @@ + /* An X form sync instruction with everything filled in except the LS field. */ + #define XSYNC_MASK (0xff9fffff) + ++/* An X form sync instruction with everything filled in except the L and E fields. */ ++#define XSYNCLE_MASK (0xff90ffff) ++ + /* An X_MASK, but with the EH bit clear. */ + #define XEH_MASK (X_MASK & ~((unsigned long )1)) + +@@ -1922,6 +1958,7 @@ + #define PPC860 PPC + #define PPCPS PPC_OPCODE_PPCPS + #define PPCVEC PPC_OPCODE_ALTIVEC ++#define PPCVEC2 PPC_OPCODE_ALTIVEC2 + #define PPCVSX PPC_OPCODE_VSX + #define POWER PPC_OPCODE_POWER + #define POWER2 PPC_OPCODE_POWER | PPC_OPCODE_POWER2 +@@ -1940,6 +1977,7 @@ + #define PPCEFS PPC_OPCODE_EFS + #define PPCBRLK PPC_OPCODE_BRLOCK + #define PPCPMR PPC_OPCODE_PMR ++#define PPCTMR PPC_OPCODE_TMR + #define PPCCHLK PPC_OPCODE_CACHELCK + #define PPCRFMCI PPC_OPCODE_RFMCI + #define E500MC PPC_OPCODE_E500MC +@@ -1947,6 +1985,7 @@ + #define TITAN PPC_OPCODE_TITAN + #define MULHW PPC_OPCODE_405 | PPC_OPCODE_440 | TITAN + #define E500 PPC_OPCODE_E500 ++#define E6500 PPC_OPCODE_E6500 + + /* The opcode table. + +@@ -2112,12 +2151,14 @@ + {"machhwsu", XO (4, 76,0,0),XO_MASK, MULHW, PPCNONE, {RT, RA, RB}}, + {"machhwsu.", XO (4, 76,0,1),XO_MASK, MULHW, PPCNONE, {RT, RA, RB}}, + {"ps_cmpo1", X (4, 96), X_MASK|(3<<21), PPCPS, PPCNONE, {BF, FRA, FRB}}, ++{"vabsdub", VX (4, 192), VX_MASK, PPCVEC2, PPCNONE, {VD, VA, VB}}, + {"vcmpeqfp", VXR(4, 198,0), VXR_MASK, PPCVEC, PPCNONE, {VD, VA, VB}}, + {"vpkuwus", VX (4, 206), VX_MASK, PPCVEC, PPCNONE, {VD, VA, VB}}, + {"machhws", XO (4, 108,0,0),XO_MASK, MULHW, PPCNONE, {RT, RA, RB}}, + {"machhws.", XO (4, 108,0,1),XO_MASK, MULHW, PPCNONE, {RT, RA, RB}}, + {"nmachhws", XO (4, 110,0,0),XO_MASK, MULHW, PPCNONE, {RT, RA, RB}}, + {"nmachhws.", XO (4, 110,0,1),XO_MASK, MULHW, PPCNONE, {RT, RA, RB}}, ++{"vabsduh", VX (4, 256), VX_MASK, PPCVEC2, PPCNONE, {VD, VA, VB}}, + {"vmaxsb", VX (4, 258), VX_MASK, PPCVEC, PPCNONE, {VD, VA, VB}}, + {"vslb", VX (4, 260), VX_MASK, PPCVEC, PPCNONE, {VD, VA, VB}}, + {"vmulosb", VX (4, 264), VX_MASK, PPCVEC, PPCNONE, {VD, VA, VB}}, +@@ -2130,6 +2171,7 @@ + {"mulchwu.", XRC(4, 136,1), X_MASK, MULHW, PPCNONE, {RT, RA, RB}}, + {"macchwu", XO (4, 140,0,0),XO_MASK, MULHW, PPCNONE, {RT, RA, RB}}, + {"macchwu.", XO (4, 140,0,1),XO_MASK, MULHW, PPCNONE, {RT, RA, RB}}, ++{"vabsduw", VX (4, 320), VX_MASK, PPCVEC2, PPCNONE, {VD, VA, VB}}, + {"vmaxsh", VX (4, 322), VX_MASK, PPCVEC, PPCNONE, {VD, VA, VB}}, + {"vslh", VX (4, 324), VX_MASK, PPCVEC, PPCNONE, {VD, VA, VB}}, + {"vmulosh", VX (4, 328), VX_MASK, PPCVEC, PPCNONE, {VD, VA, VB}}, +@@ -3613,6 +3655,8 @@ + + {"lbepx", X(31,95), X_MASK, E500MC|PPCA2, PPCNONE, {RT, RA, RB}}, + ++{"dni", XRC(31,97,1), XRB_MASK, E6500, PPCNONE, {DUI, DCTL}}, ++ + {"lvx", X(31,103), X_MASK, PPCVEC, PPCNONE, {VD, RA, RB}}, + {"lqfcmx", APU(31,103,0), APU_MASK, PPC405, PPCNONE, {FCRT, RA, RB}}, + +@@ -3622,6 +3666,8 @@ + {"mul", XO(31,107,0,0), XO_MASK, M601, PPCNONE, {RT, RA, RB}}, + {"mul.", XO(31,107,0,1), XO_MASK, M601, PPCNONE, {RT, RA, RB}}, + ++{"mvidsplt", X(31,110), X_MASK, PPCVEC2, PPCNONE, {VD, RA, RB}}, ++ + {"mtsrdin", X(31,114), XRA_MASK, PPC64, PPCNONE, {RS, RB}}, + + {"lharx", X(31,116), XEH_MASK, POWER7, PPCNONE, {RT, RA0, RB, EH}}, +@@ -3656,6 +3702,8 @@ + {"adde.", XO(31,138,0,1), XO_MASK, PPCCOM, PPCNONE, {RT, RA, RB}}, + {"ae.", XO(31,138,0,1), XO_MASK, PWRCOM, PPCNONE, {RT, RA, RB}}, + ++{"mviwsplt", X(31,142), X_MASK, PPCVEC2, PPCNONE, {VD, RA, RB}}, ++ + {"dcbtstlse", X(31,142), X_MASK, PPCCHLK, PPCNONE, {CT, RA, RB}}, + + {"mtcr", XFXM(31,144,0xff,0), XRARB_MASK, COM, PPCNONE, {RS}}, +@@ -3711,6 +3759,8 @@ + + {"prtyd", X(31,186), XRB_MASK, POWER6|PPCA2, PPCNONE, {RA, RS}}, + ++{"icblq.", XRC(31,198,1), X_MASK, E6500, PPCNONE, {CT, RA0, RB}}, ++ + {"stvewx", X(31,199), X_MASK, PPCVEC, PPCNONE, {VS, RA, RB}}, + {"stwfcmx", APU(31,199,0), APU_MASK, PPC405, PPCNONE, {FCRT, RA, RB}}, + +@@ -3788,8 +3838,12 @@ + {"mfdcrx", X(31,259), X_MASK, BOOKE|PPCA2|PPC476, TITAN, {RS, RA}}, + {"mfdcrx.", XRC(31,259,1), X_MASK, PPCA2, PPCNONE, {RS, RA}}, + ++{"lvexbx", X(31,261), X_MASK, PPCVEC2, PPCNONE, {VD, RA0, RB}}, ++ + {"icbt", X(31,262), XRT_MASK, PPC403, PPCNONE, {RA, RB}}, + ++{"lvepxl", X(31,263), X_MASK, PPCVEC2, PPCNONE, {VD, RA0, RB}}, ++ + {"ldfcmx", APU(31,263,0), APU_MASK, PPC405, PPCNONE, {FCRT, RA, RB}}, + {"doz", XO(31,264,0,0), XO_MASK, M601, PPCNONE, {RT, RA, RB}}, + {"doz.", XO(31,264,0,1), XO_MASK, M601, PPCNONE, {RT, RA, RB}}, +@@ -3823,6 +3877,9 @@ + + {"mfdcrux", X(31,291), X_MASK, PPC464, PPCNONE, {RS, RA}}, + ++{"lvexhx", X(31,293), X_MASK, PPCVEC2, PPCNONE, {VD, RA0, RB}}, ++{"lvepx", X(31,295), X_MASK, PPCVEC2, PPCNONE, {VD, RA0, RB}}, ++ + {"tlbie", X(31,306), XRTLRA_MASK, PPC, TITAN, {RB, L}}, + {"tlbi", X(31,306), XRT_MASK, POWER, PPCNONE, {RA0, RB}}, + +@@ -3874,6 +3931,8 @@ + {"mfdcr", X(31,323), X_MASK, PPC403|BOOKE|PPCA2|PPC476, TITAN, {RT, SPR}}, + {"mfdcr.", XRC(31,323,1), X_MASK, PPCA2, PPCNONE, {RT, SPR}}, + ++{"lvexwx", X(31,325), X_MASK, PPCVEC2, PPCNONE, {VD, RA0, RB}}, ++ + {"dcread", X(31,326), X_MASK, PPC476|TITAN, PPCNONE, {RT, RA, RB}}, + + {"div", XO(31,331,0,0), XO_MASK, M601, PPCNONE, {RT, RA, RB}}, +@@ -3882,6 +3941,7 @@ + {"lxvdsx", X(31,332), XX1_MASK, PPCVSX, PPCNONE, {XT6, RA, RB}}, + + {"mfpmr", X(31,334), X_MASK, PPCPMR|PPCE300, PPCNONE, {RT, PMR}}, ++{"mftmr", X(31,366), X_MASK, PPCTMR|E6500, PPCNONE, {RT, TMR}}, + + {"mfmq", XSPR(31,339, 0), XSPR_MASK, M601, PPCNONE, {RT}}, + {"mfxer", XSPR(31,339, 1), XSPR_MASK, COM, PPCNONE, {RT}}, +@@ -4112,6 +4172,8 @@ + {"mtdcrx", X(31,387), X_MASK, BOOKE|PPCA2|PPC476, TITAN, {RA, RS}}, + {"mtdcrx.", XRC(31,387,1), X_MASK, PPCA2, PPCNONE, {RA, RS}}, + ++{"stvexbx", X(31,389), X_MASK, PPCVEC2, PPCNONE, {VS, RA0, RB}}, ++ + {"dcblc", X(31,390), X_MASK, PPCCHLK|PPC476|TITAN, PPCNONE, {CT, RA, RB}}, + {"stdfcmx", APU(31,391,0), APU_MASK, PPC405, PPCNONE, {FCRT, RA, RB}}, + +@@ -4136,6 +4198,10 @@ + + {"mtdcrux", X(31,419), X_MASK, PPC464, PPCNONE, {RA, RS}}, + ++{"stvexhx", X(31,421), X_MASK, PPCVEC2, PPCNONE, {VS, RA0, RB}}, ++ ++{"dcblq.", XRC(31,422,1), X_MASK, E6500, PPCNONE, {CT, RA0, RB}}, ++ + {"divde", XO(31,425,0,0), XO_MASK, POWER7|PPCA2, PPCNONE, {RT, RA, RB}}, + {"divde.", XO(31,425,0,1), XO_MASK, POWER7|PPCA2, PPCNONE, {RT, RA, RB}}, + {"divwe", XO(31,427,0,0), XO_MASK, POWER7|PPCA2, PPCNONE, {RT, RA, RB}}, +@@ -4149,6 +4215,8 @@ + + {"mdors", 0x7f9ce378, 0xffffffff, E500MC, PPCNONE, {0}}, + ++{"miso", 0x7f5ad378, 0xffffffff, E6500, PPCNONE, {0}}, ++ + {"mr", XRC(31,444,0), X_MASK, COM, PPCNONE, {RA, RS, RBS}}, + {"or", XRC(31,444,0), X_MASK, COM, PPCNONE, {RA, RS, RB}}, + {"mr.", XRC(31,444,1), X_MASK, COM, PPCNONE, {RA, RS, RBS}}, +@@ -4191,6 +4259,8 @@ + {"mtdcr", X(31,451), X_MASK, PPC403|BOOKE|PPCA2|PPC476, TITAN, {SPR, RS}}, + {"mtdcr.", XRC(31,451,1), X_MASK, PPCA2, PPCNONE, {SPR, RS}}, + ++{"stvexwx", X(31,453), X_MASK, PPCVEC2, PPCNONE, {VS, RA0, RB}}, ++ + {"dccci", X(31,454), XRT_MASK, PPC403|PPC440|TITAN|PPCA2, PPCNONE, {RAOPT, RBOPT}}, + {"dci", X(31,454), XRARB_MASK, PPCA2|PPC476, PPCNONE, {CT}}, + +@@ -4201,6 +4271,7 @@ + {"divwu.", XO(31,459,0,1), XO_MASK, PPC, PPCNONE, {RT, RA, RB}}, + + {"mtpmr", X(31,462), X_MASK, PPCPMR|PPCE300, PPCNONE, {PMR, RS}}, ++{"mttmr", X(31,494), X_MASK, PPCTMR|E6500, PPCNONE, {TMR, RS}}, + + {"mtmq", XSPR(31,467, 0), XSPR_MASK, M601, PPCNONE, {RS}}, + {"mtxer", XSPR(31,467, 1), XSPR_MASK, COM, PPCNONE, {RS}}, +@@ -4445,6 +4516,8 @@ + + {"lhdx", X(31,547), X_MASK, E500MC, PPCNONE, {RT, RA, RB}}, + ++{"lvrx", X(31,549), X_MASK, PPCVEC2, PPCNONE, {VD, RA0, RB}}, ++ + {"bbelr", X(31,550), X_MASK, PPCBRLK, PPCNONE, {0}}, + + {"lvrx", X(31,551), X_MASK, CELL, PPCNONE, {VD, RA0, RB}}, +@@ -4461,6 +4534,8 @@ + + {"lwdx", X(31,579), X_MASK, E500MC, PPCNONE, {RT, RA, RB}}, + ++{"lvlx", X(31,581), X_MASK, PPCVEC2, PPCNONE, {VD, RA0, RB}}, ++ + {"lwfcmux", APU(31,583,0), APU_MASK, PPC405, PPCNONE, {FCRT, RA, RB}}, + + {"lxsdx", X(31,588), XX1_MASK, PPCVSX, PPCNONE, {XT6, RA, RB}}, +@@ -4472,9 +4547,10 @@ + + {"lwsync", XSYNC(31,598,1), 0xffffffff, PPC, E500, {0}}, + {"ptesync", XSYNC(31,598,2), 0xffffffff, PPC64, PPCNONE, {0}}, ++{"sync", X(31,598), XSYNCLE_MASK,E6500, PPCNONE, {LS, ESYNC}}, + {"sync", X(31,598), XSYNC_MASK, PPCCOM, BOOKE|PPC476, {LS}}, + {"msync", X(31,598), 0xffffffff, BOOKE|PPCA2|PPC476, PPCNONE, {0}}, +-{"sync", X(31,598), 0xffffffff, BOOKE|PPC476, PPCNONE, {0}}, ++{"sync", X(31,598), 0xffffffff, BOOKE|PPC476, E6500, {0}}, + {"lwsync", X(31,598), 0xffffffff, E500, PPCNONE, {0}}, + {"dcs", X(31,598), 0xffffffff, PWRCOM, PPCNONE, {0}}, + +@@ -4485,6 +4561,8 @@ + + {"lddx", X(31,611), X_MASK, E500MC, PPCNONE, {RT, RA, RB}}, + ++{"lvswx", X(31,613), X_MASK, PPCVEC2, PPCNONE, {VD, RA0, RB}}, ++ + {"lqfcmux", APU(31,615,0), APU_MASK, PPC405, PPCNONE, {FCRT, RA, RB}}, + + {"nego", XO(31,104,1,0), XORB_MASK, COM, PPCNONE, {RT, RA}}, +@@ -4534,6 +4612,8 @@ + + {"sthdx", X(31,675), X_MASK, E500MC, PPCNONE, {RS, RA, RB}}, + ++{"stvrx", X(31,677), X_MASK, PPCVEC2, PPCNONE, {VS, RA0, RB}}, ++ + {"stvrx", X(31,679), X_MASK, CELL, PPCNONE, {VS, RA0, RB}}, + {"sthfcmux", APU(31,679,0), APU_MASK, PPC405, PPCNONE, {FCRT, RA, RB}}, + +@@ -4546,6 +4626,8 @@ + + {"stwdx", X(31,707), X_MASK, E500MC, PPCNONE, {RS, RA, RB}}, + ++{"stvlx", X(31,709), X_MASK, PPCVEC2, PPCNONE, {VS, RA0, RB}}, ++ + {"stwfcmux", APU(31,711,0), APU_MASK, PPC405, PPCNONE, {FCRT, RA, RB}}, + + {"stxsdx", X(31,716), XX1_MASK, PPCVSX, PPCNONE, {XS6, RA, RB}}, +@@ -4578,6 +4660,8 @@ + + {"stddx", X(31,739), X_MASK, E500MC, PPCNONE, {RS, RA, RB}}, + ++{"stvswx", X(31,741), X_MASK, PPCVEC2, PPCNONE, {VS, RA0, RB}}, ++ + {"stqfcmux", APU(31,743,0), APU_MASK, PPC405, PPCNONE, {FCRT, RA, RB}}, + + {"subfmeo", XO(31,232,1,0), XORB_MASK, PPCCOM, PPCNONE, {RT, RA}}, +@@ -4606,6 +4690,8 @@ + {"srliq", XRC(31,760,0), X_MASK, M601, PPCNONE, {RA, RS, SH}}, + {"srliq.", XRC(31,760,1), X_MASK, M601, PPCNONE, {RA, RS, SH}}, + ++{"lvsm", X(31,773), X_MASK, PPCVEC2, PPCNONE, {VD, RA0, RB}}, ++{"stvepxl", X(31,775), X_MASK, PPCVEC2, PPCNONE, {VS, RA0, RB}}, + {"lvlxl", X(31,775), X_MASK, CELL, PPCNONE, {VD, RA0, RB}}, + {"ldfcmux", APU(31,775,0), APU_MASK, PPC405, PPCNONE, {FCRT, RA, RB}}, + +@@ -4638,6 +4724,8 @@ + + {"lfddx", X(31,803), X_MASK, E500MC, PPCNONE, {FRT, RA, RB}}, + ++{"lvrxl", X(31,805), X_MASK, PPCVEC2, PPCNONE, {VD, RA0, RB}}, ++{"stvepx", X(31,807), X_MASK, PPCVEC2, PPCNONE, {VS, RA0, RB}}, + {"lvrxl", X(31,807), X_MASK, CELL, PPCNONE, {VD, RA0, RB}}, + + {"rac", X(31,818), X_MASK, M601, PPCNONE, {RT, RA, RB}}, +@@ -4658,6 +4746,8 @@ + {"sradi", XS(31,413,0), XS_MASK, PPC64, PPCNONE, {RA, RS, SH6}}, + {"sradi.", XS(31,413,1), XS_MASK, PPC64, PPCNONE, {RA, RS, SH6}}, + ++{"lvlxl", X(31,837), X_MASK, PPCVEC2, PPCNONE, {VD, RA0, RB}}, ++ + {"divo", XO(31,331,1,0), XO_MASK, M601, PPCNONE, {RT, RA, RB}}, + {"divo.", XO(31,331,1,1), XO_MASK, M601, PPCNONE, {RT, RA, RB}}, + +@@ -4676,6 +4766,8 @@ + + {"lfiwax", X(31,855), X_MASK, POWER6|PPCA2|PPC476, PPCNONE, {FRT, RA0, RB}}, + ++{"lvswxl", X(31,869), X_MASK, PPCVEC2, PPCNONE, {VD, RA0, RB}}, ++ + {"abso", XO(31,360,1,0), XORB_MASK, M601, PPCNONE, {RT, RA}}, + {"abso.", XO(31,360,1,1), XORB_MASK, M601, PPCNONE, {RT, RA}}, + +@@ -4721,6 +4813,8 @@ + + {"stfddx", X(31,931), X_MASK, E500MC, PPCNONE, {FRS, RA, RB}}, + ++{"stvrxl", X(31,933), X_MASK, PPCVEC2, PPCNONE, {VS, RA0, RB}}, ++ + {"wclrone", XOPL2(31,934,2),XRT_MASK, PPCA2, PPCNONE, {RA0, RB}}, + {"wclrall", X(31,934), XRARB_MASK, PPCA2, PPCNONE, {L}}, + {"wclr", X(31,934), X_MASK, PPCA2, PPCNONE, {L, RA0, RB}}, +@@ -4749,6 +4843,8 @@ + {"extsb", XRC(31,954,0), XRB_MASK, PPC, PPCNONE, {RA, RS}}, + {"extsb.", XRC(31,954,1), XRB_MASK, PPC, PPCNONE, {RA, RS}}, + ++{"stvlxl", X(31,965), X_MASK, PPCVEC2, PPCNONE, {VS, RA0, RB}}, ++ + {"iccci", X(31,966), XRT_MASK, PPC403|PPC440|TITAN|PPCA2, PPCNONE, {RAOPT, RBOPT}}, + {"ici", X(31,966), XRARB_MASK, PPCA2|PPC476, PPCNONE, {CT}}, + +@@ -4776,6 +4872,8 @@ + + {"icbiep", XRT(31,991,0), XRT_MASK, E500MC|PPCA2, PPCNONE, {RA, RB}}, + ++{"stvswxl", X(31,997), X_MASK, PPCVEC2, PPCNONE, {VS, RA0, RB}}, ++ + {"icread", X(31,998), XRT_MASK, PPC403|PPC440|PPC476|TITAN, PPCNONE, {RA, RB}}, + + {"nabso", XO(31,488,1,0), XORB_MASK, M601, PPCNONE, {RT, RA}}, diff --git a/meta-fsl-ppc/recipes-devtools/eglibc/eglibc-fsl.inc b/meta-fsl-ppc/recipes-devtools/eglibc/eglibc-fsl.inc new file mode 100644 index 00000000..f7540110 --- /dev/null +++ b/meta-fsl-ppc/recipes-devtools/eglibc/eglibc-fsl.inc @@ -0,0 +1,14 @@ +SRC_URI = "svn://www.eglibc.org/svn/branches/;module=${EGLIBC_BRANCH};proto=http \ + file://glibc.undefined_static.patch \ + file://glibc.fixgcc4.6.patch \ + file://glibc.readv_proto.patch \ + file://glibc.fix_sqrt.patch \ + file://glibc.fix_prof.patch \ + file://glibc.e500mc_subspecies_of_powerpc_is_not_supported.patch \ + file://etc/ld.so.conf \ + file://generate-supported.mk \ +" + +FILESEXTRAPATHS_prepend := "${THISDIR}/files:" + +PR .= "+${DISTRO}.0" diff --git a/meta-fsl-ppc/recipes-devtools/eglibc/eglibc-initial_2.13.bbappend b/meta-fsl-ppc/recipes-devtools/eglibc/eglibc-initial_2.13.bbappend new file mode 100644 index 00000000..4f61361b --- /dev/null +++ b/meta-fsl-ppc/recipes-devtools/eglibc/eglibc-initial_2.13.bbappend @@ -0,0 +1 @@ +require eglibc-fsl.inc diff --git a/meta-fsl-ppc/recipes-devtools/eglibc/eglibc-locale_2.13.bbappend b/meta-fsl-ppc/recipes-devtools/eglibc/eglibc-locale_2.13.bbappend new file mode 100644 index 00000000..4f61361b --- /dev/null +++ b/meta-fsl-ppc/recipes-devtools/eglibc/eglibc-locale_2.13.bbappend @@ -0,0 +1 @@ +require eglibc-fsl.inc diff --git a/meta-fsl-ppc/recipes-devtools/eglibc/eglibc_2.13.bbappend b/meta-fsl-ppc/recipes-devtools/eglibc/eglibc_2.13.bbappend new file mode 100644 index 00000000..4f61361b --- /dev/null +++ b/meta-fsl-ppc/recipes-devtools/eglibc/eglibc_2.13.bbappend @@ -0,0 +1 @@ +require eglibc-fsl.inc diff --git a/meta-fsl-ppc/recipes-devtools/eglibc/files/etc/ld.so.conf b/meta-fsl-ppc/recipes-devtools/eglibc/files/etc/ld.so.conf new file mode 100644 index 00000000..e69de29b diff --git a/meta-fsl-ppc/recipes-devtools/eglibc/files/generate-supported.mk b/meta-fsl-ppc/recipes-devtools/eglibc/files/generate-supported.mk new file mode 100644 index 00000000..d2a28c2d --- /dev/null +++ b/meta-fsl-ppc/recipes-devtools/eglibc/files/generate-supported.mk @@ -0,0 +1,11 @@ +#!/usr/bin/make + +include $(IN) + +all: + rm -f $(OUT) + touch $(OUT) + for locale in $(SUPPORTED-LOCALES); do \ + [ $$locale = true ] && continue; \ + echo $$locale | sed 's,/, ,' >> $(OUT); \ + done diff --git a/meta-fsl-ppc/recipes-devtools/eglibc/files/glibc.e500mc_subspecies_of_powerpc_is_not_supported.patch b/meta-fsl-ppc/recipes-devtools/eglibc/files/glibc.e500mc_subspecies_of_powerpc_is_not_supported.patch new file mode 100644 index 00000000..6feb76ef --- /dev/null +++ b/meta-fsl-ppc/recipes-devtools/eglibc/files/glibc.e500mc_subspecies_of_powerpc_is_not_supported.patch @@ -0,0 +1,11 @@ +--- a/configure 2012-03-05 07:00:49.600200254 -0600 ++++ b/configure 2012-03-05 07:01:13.249394037 -0600 +@@ -4581,7 +4581,7 @@ + if test -z "$submachine_used" && test -n "$submachine"; then + { { $as_echo "$as_me:$LINENO: error: The $submachine subspecies of $host_cpu is not supported." >&5 + $as_echo "$as_me: error: The $submachine subspecies of $host_cpu is not supported." >&2;} +- { (exit 1); exit 1; }; } ++ } + fi + + diff --git a/meta-fsl-ppc/recipes-devtools/eglibc/files/glibc.fix_prof.patch b/meta-fsl-ppc/recipes-devtools/eglibc/files/glibc.fix_prof.patch new file mode 100644 index 00000000..966e9e3c --- /dev/null +++ b/meta-fsl-ppc/recipes-devtools/eglibc/files/glibc.fix_prof.patch @@ -0,0 +1,38 @@ +diff -ruN libc-orig/elf/dl-runtime.c libc-e5500/elf/dl-runtime.c +--- libc-orig/elf/dl-runtime.c 2011-12-08 04:25:09.201995061 -0600 ++++ libc-e5500/elf/dl-runtime.c 2011-12-08 04:26:12.760996794 -0600 +@@ -156,7 +156,7 @@ + } + #endif + +-#if !defined PROF && !defined ELF_MACHINE_NO_PLT && !__BOUNDED_POINTERS__ ++#if !defined ELF_MACHINE_NO_PLT && !__BOUNDED_POINTERS__ + DL_FIXUP_VALUE_TYPE + __attribute ((noinline)) ARCH_FIXUP_ATTRIBUTE + _dl_profile_fixup ( +@@ -425,7 +425,7 @@ + return value; + } + +-#endif /* PROF && ELF_MACHINE_NO_PLT */ ++#endif /* ELF_MACHINE_NO_PLT */ + + + #include +diff -ruN libc-orig/sysdeps/powerpc/powerpc32/dl-trampoline.S libc-e5500/sysdeps/powerpc/powerpc32/dl-trampoline.S +--- libc-orig/sysdeps/powerpc/powerpc32/dl-trampoline.S 2011-12-08 04:25:12.103998210 -0600 ++++ libc-e5500/sysdeps/powerpc/powerpc32/dl-trampoline.S 2011-12-08 04:26:19.310748350 -0600 +@@ -71,7 +71,6 @@ + cfi_endproc + .size _dl_runtime_resolve,.-_dl_runtime_resolve + +-#ifndef PROF + .align 2 + .globl _dl_prof_resolve + .type _dl_prof_resolve,@function +@@ -183,4 +182,4 @@ + bctr + cfi_endproc + .size _dl_prof_resolve,.-_dl_prof_resolve +-#endif ++ diff --git a/meta-fsl-ppc/recipes-devtools/eglibc/files/glibc.fix_sqrt.patch b/meta-fsl-ppc/recipes-devtools/eglibc/files/glibc.fix_sqrt.patch new file mode 100644 index 00000000..a648b4ff --- /dev/null +++ b/meta-fsl-ppc/recipes-devtools/eglibc/files/glibc.fix_sqrt.patch @@ -0,0 +1,500 @@ +Implements sqrt with fsqrte. +Adds functions for 603e (also used for e300c3, e600 and e500mc) +Adds functions for e5500 in 64 bit mode (also used for e6500) + +diff -ruN libc-orig/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c libc-e5500/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c +--- libc-orig/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c 1969-12-31 18:00:00.000000000 -0600 ++++ libc-e5500/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c 2011-05-18 13:00:40.423986787 -0500 +@@ -0,0 +1,134 @@ ++/* Double-precision floating point square root. ++ Copyright (C) 2010 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 ++#include ++#include ++#include ++ ++#include ++#include ++ ++static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 }; ++static const ieee_float_shape_type a_inf = {.word = 0x7f800000 }; ++static const float two108 = 3.245185536584267269e+32; ++static const float twom54 = 5.551115123125782702e-17; ++static const float half = 0.5; ++ ++/* The method is based on the descriptions in: ++ ++ _The Handbook of Floating-Pointer Arithmetic_ by Muller et al., chapter 5; ++ _IA-64 and Elementary Functions: Speed and Precision_ by Markstein, chapter 9 ++ ++ We find the actual square root and half of its reciprocal ++ simultaneously. */ ++ ++#ifdef __STDC__ ++double ++__ieee754_sqrt (double b) ++#else ++double ++__ieee754_sqrt (b) ++ double b; ++#endif ++{ ++ if (__builtin_expect (b > 0, 1)) ++ { ++ double y, g, h, d, r; ++ ieee_double_shape_type u; ++ ++ if (__builtin_expect (b != a_inf.value, 1)) ++ { ++ fenv_t fe; ++ ++ fe = fegetenv_register (); ++ ++ u.value = b; ++ ++ relax_fenv_state (); ++ ++ __asm__ ("frsqrte %[estimate], %[x]\n" ++ : [estimate] "=f" (y) : [x] "f" (b)); ++ ++ /* Following Muller et al, page 168, equation 5.20. ++ ++ h goes to 1/(2*sqrt(b)) ++ g goes to sqrt(b). ++ ++ We need three iterations to get within 1ulp. */ ++ ++ /* Indicate that these can be performed prior to the branch. GCC ++ insists on sinking them below the branch, however; it seems like ++ they'd be better before the branch so that we can cover any latency ++ from storing the argument and loading its high word. Oh well. */ ++ ++ g = b * y; ++ h = 0.5 * y; ++ ++ /* Handle small numbers by scaling. */ ++ if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0)) ++ return __ieee754_sqrt (b * two108) * twom54; ++ ++#define FMADD(a_, c_, b_) \ ++ ({ double __r; \ ++ __asm__ ("fmadd %[r], %[a], %[c], %[b]\n" \ ++ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \ ++ __r;}) ++#define FNMSUB(a_, c_, b_) \ ++ ({ double __r; \ ++ __asm__ ("fnmsub %[r], %[a], %[c], %[b]\n" \ ++ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \ ++ __r;}) ++ ++ r = FNMSUB (g, h, half); ++ g = FMADD (g, r, g); ++ h = FMADD (h, r, h); ++ ++ r = FNMSUB (g, h, half); ++ g = FMADD (g, r, g); ++ h = FMADD (h, r, h); ++ ++ r = FNMSUB (g, h, half); ++ g = FMADD (g, r, g); ++ h = FMADD (h, r, h); ++ ++ /* g is now +/- 1ulp, or exactly equal to, the square root of b. */ ++ ++ /* Final refinement. */ ++ d = FNMSUB (g, g, b); ++ ++ fesetenv_register (fe); ++ return FMADD (d, h, g); ++ } ++ } ++ else if (b < 0) ++ { ++ /* For some reason, some PowerPC32 processors don't implement ++ FE_INVALID_SQRT. */ ++#ifdef FE_INVALID_SQRT ++ feraiseexcept (FE_INVALID_SQRT); ++ ++ fenv_union_t u = { .fenv = fegetenv_register () }; ++ if ((u.l[1] & FE_INVALID) == 0) ++#endif ++ feraiseexcept (FE_INVALID); ++ b = a_nan.value; ++ } ++ return f_wash (b); ++} +diff -ruN libc-orig/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c libc-e5500/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c +--- libc-orig/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c 1969-12-31 18:00:00.000000000 -0600 ++++ libc-e5500/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c 2011-05-18 13:00:40.423986787 -0500 +@@ -0,0 +1,101 @@ ++/* Single-precision floating point square root. ++ Copyright (C) 2010 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 ++#include ++#include ++#include ++ ++#include ++#include ++ ++static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 }; ++static const ieee_float_shape_type a_inf = {.word = 0x7f800000 }; ++static const float threehalf = 1.5; ++ ++/* The method is based on the descriptions in: ++ ++ _The Handbook of Floating-Pointer Arithmetic_ by Muller et al., chapter 5; ++ _IA-64 and Elementary Functions: Speed and Precision_ by Markstein, chapter 9 ++ ++ We find the reciprocal square root and use that to compute the actual ++ square root. */ ++ ++#ifdef __STDC__ ++float ++__ieee754_sqrtf (float b) ++#else ++float ++__ieee754_sqrtf (b) ++ float b; ++#endif ++{ ++ if (__builtin_expect (b > 0, 1)) ++ { ++#define FMSUB(a_, c_, b_) \ ++ ({ double __r; \ ++ __asm__ ("fmsub %[r], %[a], %[c], %[b]\n" \ ++ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \ ++ __r;}) ++#define FNMSUB(a_, c_, b_) \ ++ ({ double __r; \ ++ __asm__ ("fnmsub %[r], %[a], %[c], %[b]\n" \ ++ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \ ++ __r;}) ++ ++ if (__builtin_expect (b != a_inf.value, 1)) ++ { ++ double y, x; ++ fenv_t fe; ++ ++ fe = fegetenv_register (); ++ ++ relax_fenv_state (); ++ ++ /* Compute y = 1.5 * b - b. Uses fewer constants than y = 0.5 * b. */ ++ y = FMSUB (threehalf, b, b); ++ ++ /* Initial estimate. */ ++ __asm__ ("frsqrte %[x], %[b]\n" : [x] "=f" (x) : [b] "f" (b)); ++ ++ /* Iterate. x_{n+1} = x_n * (1.5 - y * (x_n * x_n)). */ ++ x = x * FNMSUB (y, x * x, threehalf); ++ x = x * FNMSUB (y, x * x, threehalf); ++ x = x * FNMSUB (y, x * x, threehalf); ++ ++ /* All done. */ ++ fesetenv_register (fe); ++ return x * b; ++ } ++ } ++ else if (b < 0) ++ { ++ /* For some reason, some PowerPC32 processors don't implement ++ FE_INVALID_SQRT. */ ++#ifdef FE_INVALID_SQRT ++ feraiseexcept (FE_INVALID_SQRT); ++ ++ fenv_union_t u = { .fenv = fegetenv_register () }; ++ if ((u.l[1] & FE_INVALID) == 0) ++#endif ++ feraiseexcept (FE_INVALID); ++ b = a_nan.value; ++ } ++ return f_washf (b); ++} +diff -ruN libc-orig/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c libc-e5500/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c +--- libc-orig/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c 1969-12-31 18:00:00.000000000 -0600 ++++ libc-e5500/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c 2011-05-18 11:15:22.467987000 -0500 +@@ -0,0 +1,134 @@ ++/* Double-precision floating point square root. ++ Copyright (C) 2010 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 ++#include ++#include ++#include ++ ++#include ++#include ++ ++static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 }; ++static const ieee_float_shape_type a_inf = {.word = 0x7f800000 }; ++static const float two108 = 3.245185536584267269e+32; ++static const float twom54 = 5.551115123125782702e-17; ++static const float half = 0.5; ++ ++/* The method is based on the descriptions in: ++ ++ _The Handbook of Floating-Pointer Arithmetic_ by Muller et al., chapter 5; ++ _IA-64 and Elementary Functions: Speed and Precision_ by Markstein, chapter 9 ++ ++ We find the actual square root and half of its reciprocal ++ simultaneously. */ ++ ++#ifdef __STDC__ ++double ++__ieee754_sqrt (double b) ++#else ++double ++__ieee754_sqrt (b) ++ double b; ++#endif ++{ ++ if (__builtin_expect (b > 0, 1)) ++ { ++ double y, g, h, d, r; ++ ieee_double_shape_type u; ++ ++ if (__builtin_expect (b != a_inf.value, 1)) ++ { ++ fenv_t fe; ++ ++ fe = fegetenv_register (); ++ ++ u.value = b; ++ ++ relax_fenv_state (); ++ ++ __asm__ ("frsqrte %[estimate], %[x]\n" ++ : [estimate] "=f" (y) : [x] "f" (b)); ++ ++ /* Following Muller et al, page 168, equation 5.20. ++ ++ h goes to 1/(2*sqrt(b)) ++ g goes to sqrt(b). ++ ++ We need three iterations to get within 1ulp. */ ++ ++ /* Indicate that these can be performed prior to the branch. GCC ++ insists on sinking them below the branch, however; it seems like ++ they'd be better before the branch so that we can cover any latency ++ from storing the argument and loading its high word. Oh well. */ ++ ++ g = b * y; ++ h = 0.5 * y; ++ ++ /* Handle small numbers by scaling. */ ++ if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0)) ++ return __ieee754_sqrt (b * two108) * twom54; ++ ++#define FMADD(a_, c_, b_) \ ++ ({ double __r; \ ++ __asm__ ("fmadd %[r], %[a], %[c], %[b]\n" \ ++ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \ ++ __r;}) ++#define FNMSUB(a_, c_, b_) \ ++ ({ double __r; \ ++ __asm__ ("fnmsub %[r], %[a], %[c], %[b]\n" \ ++ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \ ++ __r;}) ++ ++ r = FNMSUB (g, h, half); ++ g = FMADD (g, r, g); ++ h = FMADD (h, r, h); ++ ++ r = FNMSUB (g, h, half); ++ g = FMADD (g, r, g); ++ h = FMADD (h, r, h); ++ ++ r = FNMSUB (g, h, half); ++ g = FMADD (g, r, g); ++ h = FMADD (h, r, h); ++ ++ /* g is now +/- 1ulp, or exactly equal to, the square root of b. */ ++ ++ /* Final refinement. */ ++ d = FNMSUB (g, g, b); ++ ++ fesetenv_register (fe); ++ return FMADD (d, h, g); ++ } ++ } ++ else if (b < 0) ++ { ++ /* For some reason, some PowerPC32 processors don't implement ++ FE_INVALID_SQRT. */ ++#ifdef FE_INVALID_SQRT ++ feraiseexcept (FE_INVALID_SQRT); ++ ++ fenv_union_t u = { .fenv = fegetenv_register () }; ++ if ((u.l[1] & FE_INVALID) == 0) ++#endif ++ feraiseexcept (FE_INVALID); ++ b = a_nan.value; ++ } ++ return f_wash (b); ++} +diff -ruN libc-orig/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c libc-e5500/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c +--- libc-orig/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c 1969-12-31 18:00:00.000000000 -0600 ++++ libc-e5500/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c 2011-05-18 11:15:22.467987000 -0500 +@@ -0,0 +1,101 @@ ++/* Single-precision floating point square root. ++ Copyright (C) 2010 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 ++#include ++#include ++#include ++ ++#include ++#include ++ ++static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 }; ++static const ieee_float_shape_type a_inf = {.word = 0x7f800000 }; ++static const float threehalf = 1.5; ++ ++/* The method is based on the descriptions in: ++ ++ _The Handbook of Floating-Pointer Arithmetic_ by Muller et al., chapter 5; ++ _IA-64 and Elementary Functions: Speed and Precision_ by Markstein, chapter 9 ++ ++ We find the reciprocal square root and use that to compute the actual ++ square root. */ ++ ++#ifdef __STDC__ ++float ++__ieee754_sqrtf (float b) ++#else ++float ++__ieee754_sqrtf (b) ++ float b; ++#endif ++{ ++ if (__builtin_expect (b > 0, 1)) ++ { ++#define FMSUB(a_, c_, b_) \ ++ ({ double __r; \ ++ __asm__ ("fmsub %[r], %[a], %[c], %[b]\n" \ ++ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \ ++ __r;}) ++#define FNMSUB(a_, c_, b_) \ ++ ({ double __r; \ ++ __asm__ ("fnmsub %[r], %[a], %[c], %[b]\n" \ ++ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \ ++ __r;}) ++ ++ if (__builtin_expect (b != a_inf.value, 1)) ++ { ++ double y, x; ++ fenv_t fe; ++ ++ fe = fegetenv_register (); ++ ++ relax_fenv_state (); ++ ++ /* Compute y = 1.5 * b - b. Uses fewer constants than y = 0.5 * b. */ ++ y = FMSUB (threehalf, b, b); ++ ++ /* Initial estimate. */ ++ __asm__ ("frsqrte %[x], %[b]\n" : [x] "=f" (x) : [b] "f" (b)); ++ ++ /* Iterate. x_{n+1} = x_n * (1.5 - y * (x_n * x_n)). */ ++ x = x * FNMSUB (y, x * x, threehalf); ++ x = x * FNMSUB (y, x * x, threehalf); ++ x = x * FNMSUB (y, x * x, threehalf); ++ ++ /* All done. */ ++ fesetenv_register (fe); ++ return x * b; ++ } ++ } ++ else if (b < 0) ++ { ++ /* For some reason, some PowerPC32 processors don't implement ++ FE_INVALID_SQRT. */ ++#ifdef FE_INVALID_SQRT ++ feraiseexcept (FE_INVALID_SQRT); ++ ++ fenv_union_t u = { .fenv = fegetenv_register () }; ++ if ((u.l[1] & FE_INVALID) == 0) ++#endif ++ feraiseexcept (FE_INVALID); ++ b = a_nan.value; ++ } ++ return f_washf (b); ++} +diff -ruN libc-orig/sysdeps/unix/sysv/linux/powerpc/powerpc32/603e/fpu/Implies libc-e5500/sysdeps/unix/sysv/linux/powerpc/powerpc32/603e/fpu/Implies +--- libc-orig/sysdeps/unix/sysv/linux/powerpc/powerpc32/603e/fpu/Implies 1969-12-31 18:00:00.000000000 -0600 ++++ libc-e5500/sysdeps/unix/sysv/linux/powerpc/powerpc32/603e/fpu/Implies 2011-05-18 13:01:33.987988922 -0500 +@@ -0,0 +1 @@ ++powerpc/powerpc32/603e/fpu +diff -ruN libc-orig/sysdeps/unix/sysv/linux/powerpc/powerpc64/e5500/fpu/Implies libc-e5500/sysdeps/unix/sysv/linux/powerpc/powerpc64/e5500/fpu/Implies +--- libc-orig/sysdeps/unix/sysv/linux/powerpc/powerpc64/e5500/fpu/Implies 1969-12-31 18:00:00.000000000 -0600 ++++ libc-e5500/sysdeps/unix/sysv/linux/powerpc/powerpc64/e5500/fpu/Implies 2011-05-18 11:15:22.412987000 -0500 +@@ -0,0 +1 @@ ++powerpc/powerpc64/e5500/fpu diff --git a/meta-fsl-ppc/recipes-devtools/eglibc/files/glibc.fixgcc4.6.patch b/meta-fsl-ppc/recipes-devtools/eglibc/files/glibc.fixgcc4.6.patch new file mode 100644 index 00000000..42887694 --- /dev/null +++ b/meta-fsl-ppc/recipes-devtools/eglibc/files/glibc.fixgcc4.6.patch @@ -0,0 +1,29 @@ +glibc.fixgcc4.6 + +Glibc build scripts relies on information given by "gcc -v --help". +With gcc-4.6 and latter, this information is not printed with "--help" +anymore, but with "--target-help". This patch should be used until +glibs sources catches up with gcc. + +--- libc/configure.in-orig 2010-06-07 11:11:01.000000000 -0500 ++++ libc/configure.in 2010-06-07 11:11:28.000000000 -0500 +@@ -1620,7 +1620,7 @@ + AC_CACHE_CHECK(for -z relro option, + libc_cv_z_relro, [dnl + libc_cv_z_relro=no +- if AC_TRY_COMMAND([${CC-cc} -v --help 2>&1|grep "z relro" 1>&AS_MESSAGE_LOG_FD]) ++ if AC_TRY_COMMAND([${CC-cc} -v --target-help 2>&1|grep "z relro" 1>&AS_MESSAGE_LOG_FD]) + then + if AC_TRY_COMMAND([${CC-cc} -Wl,--verbose 2>&1|grep DATA_SEGMENT_RELRO_END 1>&AS_MESSAGE_LOG_FD]) + then +--- libc/configure-orig 2010-06-07 11:11:13.000000000 -0500 ++++ libc/configure 2010-06-07 11:12:00.000000000 -0500 +@@ -6670,7 +6670,7 @@ + $as_echo_n "(cached) " >&6 + else + libc_cv_z_relro=no +- if { ac_try='${CC-cc} -v --help 2>&1|grep "z relro" 1>&5' ++ if { ac_try='${CC-cc} -v --target-help 2>&1|grep "z relro" 1>&5' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? diff --git a/meta-fsl-ppc/recipes-devtools/eglibc/files/glibc.readv_proto.patch b/meta-fsl-ppc/recipes-devtools/eglibc/files/glibc.readv_proto.patch new file mode 100644 index 00000000..fbeee699 --- /dev/null +++ b/meta-fsl-ppc/recipes-devtools/eglibc/files/glibc.readv_proto.patch @@ -0,0 +1,99 @@ +glibc.readv_proto + +Unfortunate choice of variable names. Causes syntax errors on Altivec +enabled targets. + +diff -u libc-orig/sysdeps/unix/sysv/linux/readv.c libc/sysdeps/unix/sysv/linux/readv.c +--- libc-orig/sysdeps/unix/sysv/linux/readv.c 2011-05-11 11:01:36.625600000 -0500 ++++ libc/sysdeps/unix/sysv/linux/readv.c 2011-05-11 11:03:19.443599768 -0500 +@@ -40,20 +40,20 @@ + + + ssize_t +-__libc_readv (fd, vector, count) ++__libc_readv (fd, vec_tor, count) + int fd; +- const struct iovec *vector; ++ const struct iovec *vec_tor; + int count; + { + ssize_t result; + + if (SINGLE_THREAD_P) +- result = INLINE_SYSCALL (readv, 3, fd, CHECK_N (vector, count), count); ++ result = INLINE_SYSCALL (readv, 3, fd, CHECK_N (vec_tor, count), count); + else + { + int oldtype = LIBC_CANCEL_ASYNC (); + +- result = INLINE_SYSCALL (readv, 3, fd, CHECK_N (vector, count), count); ++ result = INLINE_SYSCALL (readv, 3, fd, CHECK_N (vec_tor, count), count); + + LIBC_CANCEL_RESET (oldtype); + } +@@ -64,7 +64,7 @@ + if (result >= 0 || errno != EINVAL || count <= UIO_FASTIOV) + return result; + +- return __atomic_readv_replacement (fd, vector, count); ++ return __atomic_readv_replacement (fd, vec_tor, count); + #endif + } + strong_alias (__libc_readv, __readv) +diff -u libc-orig/sysdeps/unix/sysv/linux/writev.c libc/sysdeps/unix/sysv/linux/writev.c +--- libc-orig/sysdeps/unix/sysv/linux/writev.c 2011-05-11 11:01:36.577599548 -0500 ++++ libc/sysdeps/unix/sysv/linux/writev.c 2011-05-11 11:03:33.994599785 -0500 +@@ -40,20 +40,20 @@ + + + ssize_t +-__libc_writev (fd, vector, count) ++__libc_writev (fd, vec_tor, count) + int fd; +- const struct iovec *vector; ++ const struct iovec *vec_tor; + int count; + { + ssize_t result; + + if (SINGLE_THREAD_P) +- result = INLINE_SYSCALL (writev, 3, fd, CHECK_N (vector, count), count); ++ result = INLINE_SYSCALL (writev, 3, fd, CHECK_N (vec_tor, count), count); + else + { + int oldtype = LIBC_CANCEL_ASYNC (); + +- result = INLINE_SYSCALL (writev, 3, fd, CHECK_N (vector, count), count); ++ result = INLINE_SYSCALL (writev, 3, fd, CHECK_N (vec_tor, count), count); + + LIBC_CANCEL_RESET (oldtype); + } +@@ -64,7 +64,7 @@ + if (result >= 0 || errno != EINVAL || count <= UIO_FASTIOV) + return result; + +- return __atomic_writev_replacement (fd, vector, count); ++ return __atomic_writev_replacement (fd, vec_tor, count); + #endif + } + strong_alias (__libc_writev, __writev) +diff -u libc-orig/include/sys/uio.h libc/include/sys/uio.h +--- libc-orig/include/sys/uio.h 2011-05-11 11:07:53.953602501 -0500 ++++ libc/include/sys/uio.h 2011-05-11 11:08:25.117599576 -0500 +@@ -2,12 +2,12 @@ + #include + + /* Now define the internal interfaces. */ +-extern ssize_t __readv (int __fd, __const struct iovec *__vector, ++extern ssize_t __readv (int __fd, __const struct iovec *__vec_tor, + int __count); +-extern ssize_t __libc_readv (int __fd, __const struct iovec *__vector, ++extern ssize_t __libc_readv (int __fd, __const struct iovec *__vec_tor, + int __count); +-extern ssize_t __writev (int __fd, __const struct iovec *__vector, ++extern ssize_t __writev (int __fd, __const struct iovec *__vec_tor, + int __count); +-extern ssize_t __libc_writev (int __fd, __const struct iovec *__vector, ++extern ssize_t __libc_writev (int __fd, __const struct iovec *__vec_tor, + int __count); + #endif diff --git a/meta-fsl-ppc/recipes-devtools/eglibc/files/glibc.undefined_static.patch b/meta-fsl-ppc/recipes-devtools/eglibc/files/glibc.undefined_static.patch new file mode 100644 index 00000000..aba52855 --- /dev/null +++ b/meta-fsl-ppc/recipes-devtools/eglibc/files/glibc.undefined_static.patch @@ -0,0 +1,37 @@ +glibc.undefined_static + +This works around an old binutils bug, which would delete static +constants out of the code, thus causing undefined symbols. Not sure if +this patch is still needed. + +diff -rc libc-orig/stdio-common/psiginfo-define.h libc-new/stdio-common/psiginfo-define.h +*** libc-orig/stdio-common/psiginfo-define.h 2009-04-09 08:12:53.000000000 -0500 +--- libc-new/stdio-common/psiginfo-define.h 2009-04-09 08:20:36.000000000 -0500 +*************** +*** 1,4 **** +! static const union C(codestrs_t_, NOW) { + struct { + #define P(n, s) char MF(__LINE__)[sizeof (s)]; + #include "psiginfo-data.h" +--- 1,4 ---- +! const union C(codestrs_t_, NOW) { + struct { + #define P(n, s) char MF(__LINE__)[sizeof (s)]; + #include "psiginfo-data.h" +*************** +*** 8,14 **** + #define P(n, s) s, + #include "psiginfo-data.h" + } }; +! static const uint8_t C(codes_, NOW)[] = { + #define P(n, s) [(n) - 1] = offsetof (union C(codestrs_t_, NOW), MF(__LINE__)), + #include "psiginfo-data.h" + }; +--- 8,14 ---- + #define P(n, s) s, + #include "psiginfo-data.h" + } }; +! const uint8_t C(codes_, NOW)[] = { + #define P(n, s) [(n) - 1] = offsetof (union C(codestrs_t_, NOW), MF(__LINE__)), + #include "psiginfo-data.h" + }; diff --git a/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.builtin_isel.patch b/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.builtin_isel.patch new file mode 100644 index 00000000..10e59999 --- /dev/null +++ b/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.builtin_isel.patch @@ -0,0 +1,1059 @@ +diff -ruN gcc-4.6.0-orig/gcc/config/rs6000/rs6000-builtin.def gcc-4.6.0-new/gcc/config/rs6000/rs6000-builtin.def +--- gcc-4.6.0-orig/gcc/config/rs6000/rs6000-builtin.def 2011-02-21 15:38:21.000000000 -0600 ++++ gcc-4.6.0-new/gcc/config/rs6000/rs6000-builtin.def 2011-07-25 12:32:26.626006000 -0500 +@@ -750,6 +750,71 @@ + RS6000_BUILTIN(SPE_BUILTIN_MFSPEFSCR, RS6000_BTC_MISC) + RS6000_BUILTIN(SPE_BUILTIN_BRINC, RS6000_BTC_MISC) + ++/* ISEL builtins. */ ++/* Generic versions that get resolved to specific builtins. */ ++RS6000_BUILTIN(RS6000_BUILTIN_ISELEQ, RS6000_BTC_PURE) ++RS6000_BUILTIN_EQUATE(ISEL_BUILTIN_OVERLOADED_FIRST, ++ RS6000_BUILTIN_ISELEQ) ++RS6000_BUILTIN(RS6000_BUILTIN_ISELGT, RS6000_BTC_PURE) ++RS6000_BUILTIN(RS6000_BUILTIN_ISELLT, RS6000_BTC_PURE) ++RS6000_BUILTIN(RS6000_BUILTIN_ISELGTU, RS6000_BTC_PURE) ++RS6000_BUILTIN(RS6000_BUILTIN_ISELLTU, RS6000_BTC_PURE) ++/* Same deal, but for 64-bit comparisons. */ ++RS6000_BUILTIN(RS6000_BUILTIN_ISELEQD, RS6000_BTC_PURE) ++RS6000_BUILTIN(RS6000_BUILTIN_ISELGTD, RS6000_BTC_PURE) ++RS6000_BUILTIN(RS6000_BUILTIN_ISELLTD, RS6000_BTC_PURE) ++RS6000_BUILTIN(RS6000_BUILTIN_ISELGTDU, RS6000_BTC_PURE) ++RS6000_BUILTIN(RS6000_BUILTIN_ISELLTDU, RS6000_BTC_PURE) ++RS6000_BUILTIN_EQUATE(ISEL_BUILTIN_OVERLOADED_LAST, ++ RS6000_BUILTIN_ISELLTDU) ++ ++/* Each set of arguments is polymorphic in selected arguments and return ++ value. */ ++#undef RS6000_ISEL_BASE ++#define RS6000_ISEL_BASE(ARG, PRED, CMP) \ ++ RS6000_BUILTIN(RS6000_BUILTIN_ISEL_##PRED##CMP##_##ARG##_SS, RS6000_BTC_PURE) \ ++ RS6000_BUILTIN(RS6000_BUILTIN_ISEL_##PRED##CMP##_##ARG##_PP, RS6000_BTC_PURE) \ ++ RS6000_BUILTIN(RS6000_BUILTIN_ISEL_##PRED##CMP##_##ARG##_UU, RS6000_BTC_PURE) ++#undef RS6000_ISEL_PTR_ARG ++#define RS6000_ISEL_PTR_ARG(PRED, CMP) RS6000_ISEL_BASE(PP, PRED, CMP) ++#undef RS6000_ISEL_SIGNED_ARG ++#define RS6000_ISEL_SIGNED_ARG(PRED, CMP) RS6000_ISEL_BASE(SS, PRED, CMP) ++#undef RS6000_ISEL_UNSIGNED_ARG ++#define RS6000_ISEL_UNSIGNED_ARG(PRED, CMP) RS6000_ISEL_BASE(UU, PRED, CMP) ++ ++#undef RS6000_ISEL_EQ ++#define RS6000_ISEL_EQ(CMP) \ ++ RS6000_ISEL_PTR_ARG(EQ, CMP) \ ++ RS6000_ISEL_SIGNED_ARG(EQ, CMP) \ ++ RS6000_ISEL_UNSIGNED_ARG(EQ, CMP) ++ ++#undef RS6000_ISEL_LT ++#define RS6000_ISEL_LT(CMP) RS6000_ISEL_SIGNED_ARG(LT, CMP) ++ ++#undef RS6000_ISEL_GT ++#define RS6000_ISEL_GT(CMP) RS6000_ISEL_SIGNED_ARG(GT, CMP) ++ ++#undef RS6000_ISEL_LTU ++#define RS6000_ISEL_LTU(CMP) \ ++ RS6000_ISEL_PTR_ARG(LTU, CMP) \ ++ RS6000_ISEL_UNSIGNED_ARG(LTU, CMP) ++ ++#undef RS6000_ISEL_GTU ++#define RS6000_ISEL_GTU(CMP) \ ++ RS6000_ISEL_PTR_ARG(GTU, CMP) \ ++ RS6000_ISEL_UNSIGNED_ARG(GTU, CMP) ++ ++RS6000_ISEL_EQ(CMPW) ++RS6000_ISEL_LT(CMPW) ++RS6000_ISEL_GT(CMPW) ++RS6000_ISEL_LTU(CMPW) ++RS6000_ISEL_GTU(CMPW) ++RS6000_ISEL_EQ(CMPD) ++RS6000_ISEL_LT(CMPD) ++RS6000_ISEL_GT(CMPD) ++RS6000_ISEL_LTU(CMPD) ++RS6000_ISEL_GTU(CMPD) ++ + /* PAIRED builtins. */ + RS6000_BUILTIN(PAIRED_BUILTIN_DIVV2SF3, RS6000_BTC_MISC) + RS6000_BUILTIN(PAIRED_BUILTIN_ABSV2SF2, RS6000_BTC_MISC) +diff -ruN gcc-4.6.0-orig/gcc/config/rs6000/rs6000.c gcc-4.6.0-new/gcc/config/rs6000/rs6000.c +--- gcc-4.6.0-orig/gcc/config/rs6000/rs6000.c 2011-03-15 07:57:37.000000000 -0500 ++++ gcc-4.6.0-new/gcc/config/rs6000/rs6000.c 2011-07-25 13:19:52.415921000 -0500 +@@ -12402,6 +12402,289 @@ + return target; + } + ++/* isel builtins are a bit funny, because we want the user to be able to do: ++ ++ char *p, *q, *r; ++ int x, y, z; ++ unsigned int a, b, c; ++ ... ++ p = __builtin_iseleq (i, j, q, r); ++ x = __builtin_iseleq (i, j, y, z); ++ a = __builtin_iseleq (i, j, b, c); ++ ++ and, of course, i and j may be of several different types depending on the ++ condition. ++ ++ We handle this by having generic builtins that ++ TARGET_RESOLVE_OVERLOADED_BUILTIN takes and turns into calls to our ++ specific builtins. */ ++ ++/* Macros to help constructing the isel_builtin_desc arrays. ++ These closely mirror the macros in rs6000-builtins.def. */ ++/* HACK: Use VOIDmode here as a constant approximation to Pmode and fix ++ at runtime. We can't use Pmode because in biarch its definition is ++ not constant. */ ++#define ISEL_Pmode VOIDmode ++#define ISEL_BASE(FLAGS, ARG, RESULT, PRED, CMP, MODE, RMODE) \ ++ { NULL, FLAGS, RS6000_BUILTIN_ISEL_##PRED##CMP##_##ARG##_##RESULT, \ ++ PRED, MODE, RMODE }, ++#define ISEL_P_RESULT(FLAGS, ARG, PRED, CMP, MODE, RMODE) \ ++ ISEL_BASE (FLAGS | ISEL_FLAG_SEL_PTR, ARG, PP, PRED, \ ++ CMP, MODE, ISEL_Pmode) ++#define ISEL_S_RESULT(FLAGS, ARG, PRED, CMP, MODE, RMODE) \ ++ ISEL_BASE (FLAGS | ISEL_FLAG_SEL_SIGNED, ARG, SS, PRED, \ ++ CMP, MODE, RMODE) ++#define ISEL_U_RESULT(FLAGS, ARG, PRED, CMP, MODE, RMODE) \ ++ ISEL_BASE (FLAGS | ISEL_FLAG_SEL_UNSIGNED, ARG, UU, PRED, \ ++ CMP, MODE, RMODE) ++ ++#define ISEL_EXPAND_ARG(FLAG, ARG, PRED, CMP, MODE, RMODE) \ ++ ISEL_P_RESULT (FLAG, ARG, PRED, CMP, MODE, RMODE) \ ++ ISEL_S_RESULT (FLAG, ARG, PRED, CMP, MODE, RMODE) \ ++ ISEL_U_RESULT (FLAG, ARG, PRED, CMP, MODE, RMODE) ++#define ISEL_PTR_ARG(PRED, CMP, MODE) \ ++ ISEL_EXPAND_ARG (ISEL_FLAG_CMP_PTR, PP, PRED, CMP, ISEL_Pmode, MODE) ++#define ISEL_SIGNED_ARG(PRED, CMP, MODE) \ ++ ISEL_EXPAND_ARG (ISEL_FLAG_CMP_SIGNED, SS, PRED, CMP, MODE, MODE) ++#define ISEL_UNSIGNED_ARG(PRED, CMP, MODE) \ ++ ISEL_EXPAND_ARG (ISEL_FLAG_CMP_UNSIGNED, UU, PRED, CMP, MODE, MODE) ++ ++#define ISEL_EQ(CMP, MODE) \ ++ ISEL_PTR_ARG (EQ, CMP, MODE) \ ++ ISEL_SIGNED_ARG (EQ, CMP, MODE) \ ++ ISEL_UNSIGNED_ARG (EQ, CMP, MODE) ++#define ISEL_LT(CMP, MODE) ISEL_SIGNED_ARG (LT, CMP, MODE) ++#define ISEL_GT(CMP, MODE) ISEL_SIGNED_ARG (GT, CMP, MODE) ++#define ISEL_LTU(CMP, MODE) \ ++ ISEL_PTR_ARG (LTU, CMP, MODE) \ ++ ISEL_UNSIGNED_ARG (LTU, CMP, MODE) ++#define ISEL_GTU(CMP, MODE) \ ++ ISEL_PTR_ARG (GTU, CMP, MODE) \ ++ ISEL_UNSIGNED_ARG (GTU, CMP, MODE) ++ ++const struct isel_builtin_desc builtin_iselw[32] = { ++ ISEL_EQ (CMPW, SImode) ++ ISEL_LT (CMPW, SImode) ++ ISEL_GT (CMPW, SImode) ++ ISEL_LTU (CMPW, SImode) ++ ISEL_GTU (CMPW, SImode) ++ { "__builtin_iseleq", 0, RS6000_BUILTIN_ISELEQ, EQ, SImode, SImode }, ++ { "__builtin_isellt", 0, RS6000_BUILTIN_ISELLT, LT, SImode, SImode }, ++ { "__builtin_iselgt", 0, RS6000_BUILTIN_ISELGT, GT, SImode, SImode }, ++ { "__builtin_iselltu", 0, RS6000_BUILTIN_ISELLTU, LTU, SImode, SImode }, ++ { "__builtin_iselgtu", 0, RS6000_BUILTIN_ISELGTU, GTU, SImode, SImode } ++}; ++ ++const struct isel_builtin_desc builtin_iseld[32] = { ++ ISEL_EQ (CMPD, DImode) ++ ISEL_LT (CMPD, DImode) ++ ISEL_GT (CMPD, DImode) ++ ISEL_LTU (CMPD, DImode) ++ ISEL_GTU (CMPD, DImode) ++ { "__builtin_isel64eq", 0, RS6000_BUILTIN_ISELEQD, EQ, DImode, DImode }, ++ { "__builtin_isel64lt", 0, RS6000_BUILTIN_ISELLTD, LT, DImode, DImode }, ++ { "__builtin_isel64gt", 0, RS6000_BUILTIN_ISELGTD, GT, DImode, DImode }, ++ { "__builtin_isel64ltu", 0, RS6000_BUILTIN_ISELLTDU, LTU, DImode, DImode }, ++ { "__builtin_isel64gtu", 0, RS6000_BUILTIN_ISELGTDU, GTU, DImode, DImode } ++}; ++ ++/* Return the mode which DESC uses for comparisons. */ ++ ++static enum machine_mode ++isel_cmp_mode (const struct isel_builtin_desc *desc) ++{ ++ enum machine_mode mode = (enum machine_mode) desc->cmp_mode; ++ ++ return (mode == VOIDmode ? Pmode : mode); ++} ++ ++/* Return the mode in which DESC selects arguments. */ ++ ++static enum machine_mode ++isel_sel_mode (const struct isel_builtin_desc *desc) ++{ ++ enum machine_mode mode = (enum machine_mode) desc->sel_mode; ++ ++ return (mode == VOIDmode ? Pmode : mode); ++} ++ ++/* Return a tree describing the arguments for DESC according to CMPP: ++ true for comparison arguments, false for select arguments. */ ++ ++static tree ++isel_argtype (const struct isel_builtin_desc *desc, bool cmpp) ++{ ++ switch (desc->arg_flags & (cmpp ++ ? ISEL_FLAG_CMP_MASK ++ : ISEL_FLAG_SEL_MASK)) ++ { ++ case ISEL_FLAG_CMP_PTR: ++ case ISEL_FLAG_SEL_PTR: ++ return ptr_type_node; ++ case ISEL_FLAG_CMP_SIGNED: ++ return (isel_cmp_mode (desc) == SImode ++ ? integer_type_node ++ : long_integer_type_node); ++ case ISEL_FLAG_SEL_SIGNED: ++ return (isel_sel_mode (desc) == SImode ++ ? integer_type_node ++ : long_integer_type_node); ++ case ISEL_FLAG_CMP_UNSIGNED: ++ return (isel_cmp_mode (desc) == SImode ++ ? unsigned_type_node ++ : long_unsigned_type_node); ++ case ISEL_FLAG_SEL_UNSIGNED: ++ default: ++ return (isel_sel_mode (desc) == SImode ++ ? unsigned_type_node ++ : long_unsigned_type_node); ++ } ++} ++ ++/* Return a mnemonic string describing the argument or result of FLAGS ++ depending on CMPP. */ ++ ++static const char * ++isel_strdesc (int flags, bool cmpp) ++{ ++ switch (flags & (cmpp ? ISEL_FLAG_CMP_MASK : ISEL_FLAG_SEL_MASK)) ++ { ++ case ISEL_FLAG_CMP_PTR: ++ case ISEL_FLAG_SEL_PTR: ++ return "p"; ++ case ISEL_FLAG_CMP_SIGNED: ++ case ISEL_FLAG_SEL_SIGNED: ++ return "s"; ++ case ISEL_FLAG_CMP_UNSIGNED: ++ case ISEL_FLAG_SEL_UNSIGNED: ++ return "u"; ++ default: ++ gcc_unreachable (); ++ } ++} ++ ++/* Initialize N_DESC isel builtins from DESC. SIGNED_TYPE holds the ++ basic type for signed variants of isel, UNSIGNED_TYPE the type for ++ unsigned variants. */ ++ ++static void ++rs6000_init_isel_builtins (const struct isel_builtin_desc *desc, int n_descs) ++{ ++ int i; ++ const char *is64 = (desc == &builtin_iselw[0] ? "32" : "64"); ++ ++ for (i = 0; i < n_descs; i++) ++ { ++ const struct isel_builtin_desc *d = &desc[i]; ++ tree cmptype, seltype, ftype; ++ ++ cmptype = isel_argtype (d, true); ++ seltype = isel_argtype (d, false); ++ ++ ftype = build_function_type_list (seltype, cmptype, cmptype, ++ seltype, seltype, NULL_TREE); ++ ++ if (d->name) ++ def_builtin (MASK_ISEL, d->name, ftype, d->code); ++ else ++ { ++ char builtin_name[40]; ++ ++ sprintf (builtin_name, "__builtin_isel%s%s%s%s%s%s", ++ is64, ++ GET_RTX_NAME (d->cmp_code), ++ GET_MODE_NAME (isel_cmp_mode (d)), ++ isel_strdesc (d->arg_flags, true), ++ isel_strdesc (d->arg_flags, false), ++ GET_MODE_NAME (isel_sel_mode (d))); ++ ++ def_builtin (MASK_ISEL, ggc_strdup (builtin_name), ftype, d->code); ++ } ++ } ++} ++ ++static rtx ++rs6000_expand_isel_builtin (const struct isel_builtin_desc *desc, ++ int n_descs, tree exp, rtx target, int fcode) ++{ ++ int i; ++ ++ for (i = 0; i < n_descs; i++) ++ { ++ const struct isel_builtin_desc *d = &desc[i]; ++ ++ if (fcode == (int) d->code) ++ { ++ int opidx; ++ unsigned int j; ++ rtx cmp; ++ rtx operands[4]; ++ enum insn_code icode; ++ enum machine_mode opmode; ++ enum machine_mode cmpmode = isel_cmp_mode (d); ++ enum machine_mode selmode = isel_sel_mode (d); ++ ++ /* Determine underlying isel insn. */ ++ switch (d->cmp_code) ++ { ++ case GTU: ++ case LTU: ++ icode = (Pmode == SImode ++ ? CODE_FOR_isel_unsigned_si ++ : CODE_FOR_isel_unsigned_di); ++ break; ++ default: ++ icode = (Pmode == SImode ++ ? CODE_FOR_isel_signed_si ++ : CODE_FOR_isel_signed_di); ++ break; ++ } ++ ++ for (j = 0; j < ARRAY_SIZE (operands); j++) ++ { ++ tree arg = CALL_EXPR_ARG (exp, j); ++ ++ /* If we got invalid arguments, bail out before generating ++ bad rtl. */ ++ if (arg == error_mark_node) ++ return const0_rtx; ++ ++ operands[j] = expand_normal (arg); ++ ++ /* Validate. */ ++ /* HACK: The isel pattern doesn't actually consume all the ++ operands to the builtin; it only consumes 2 and 3. The ++ other two will be handed off to a compare ++ insn. Unfortunately, said insn is not named, so we ++ can't directly access its insn_data here. Fake it by ++ validating operands 0 and 1 with the isel pattern; that ++ should be good enough. */ ++ opidx = (j < 2 ? 2 : j); ++ opmode = (j < 2 ? cmpmode : selmode); ++ if (! (*insn_data[icode].operand[opidx].predicate) (operands[j], ++ opmode)) ++ operands[j] = copy_to_mode_reg (opmode, operands[j]); ++ } ++ ++ /* Validate target. */ ++ if (target == NULL_RTX ++ || GET_MODE (target) != selmode ++ || ! (*insn_data[icode].operand[0].predicate) (target, selmode)) ++ target = gen_reg_rtx (selmode); ++ ++ /* Generate comparison. */ ++ cmp = gen_rtx_fmt_ee ((enum rtx_code)d->cmp_code, cmpmode, ++ operands[0], operands[1]); ++ ++ rs6000_emit_int_cmove (target, cmp, operands[2], operands[3]); ++ ++ return target; ++ } ++ } ++ ++ return NULL_RTX; ++} ++ + /* Expand an expression EXP that calls a built-in function, + with result going to TARGET if that's convenient + (and in mode MODE if that's convenient). +@@ -12520,6 +12803,24 @@ + if (success) + return ret; + } ++ if (TARGET_ISEL) ++ { ++ ret = rs6000_expand_isel_builtin (builtin_iselw, ++ ARRAY_SIZE (builtin_iselw), ++ exp, target, fcode); ++ ++ if (ret != NULL_RTX) ++ return ret; ++ } ++ if (TARGET_ISEL64) ++ { ++ ret = rs6000_expand_isel_builtin (builtin_iseld, ++ ARRAY_SIZE (builtin_iseld), ++ exp, target, fcode); ++ ++ if (ret != NULL_RTX) ++ return ret; ++ } + + gcc_assert (TARGET_ALTIVEC || TARGET_VSX || TARGET_SPE || TARGET_PAIRED_FLOAT); + +@@ -12738,6 +13039,10 @@ + spe_init_builtins (); + if (TARGET_ALTIVEC) + altivec_init_builtins (); ++ if (TARGET_ISEL) ++ rs6000_init_isel_builtins (builtin_iselw, ARRAY_SIZE (builtin_iselw)); ++ if (TARGET_ISEL64) ++ rs6000_init_isel_builtins (builtin_iseld, ARRAY_SIZE (builtin_iseld)); + if (TARGET_ALTIVEC || TARGET_SPE || TARGET_PAIRED_FLOAT || TARGET_VSX) + rs6000_common_init_builtins (); + if (TARGET_FRE) +diff -ruN gcc-4.6.0-orig/gcc/config/rs6000/rs6000-c.c gcc-4.6.0-new/gcc/config/rs6000/rs6000-c.c +--- gcc-4.6.0-orig/gcc/config/rs6000/rs6000-c.c 2011-02-02 23:42:19.000000000 -0600 ++++ gcc-4.6.0-new/gcc/config/rs6000/rs6000-c.c 2011-07-25 16:07:14.616209000 -0500 +@@ -3439,7 +3439,7 @@ + /* Implementation of the resolve_overloaded_builtin target hook, to + support Altivec's overloaded builtins. */ + +-tree ++static tree + altivec_resolve_overloaded_builtin (location_t loc, tree fndecl, + void *passed_arglist) + { +@@ -3770,3 +3770,148 @@ + error ("invalid parameter combination for AltiVec intrinsic"); + return error_mark_node; + } ++ ++/* Return true if the pair of arguments in ARGS is acceptable according ++ to DECLTYPES and FLAGS. CMPP determines whether this is for the ++ comparison arguments. */ ++ ++static bool ++isel_arguments_valid (tree *args, tree *decltypes, int flags, bool cmpp) ++{ ++ tree type0 = TREE_TYPE (args[0]); ++ tree type1 = TREE_TYPE (args[1]); ++ tree decltype0 = decltypes[0]; ++ tree decltype1 = decltypes[1]; ++ ++ switch (flags & (cmpp ? ISEL_FLAG_CMP_MASK : ISEL_FLAG_SEL_MASK)) ++ { ++ /* For pointer arguments and results, we just need to make sure ++ we're receiving pointers, and they can be freely converted to ++ and from void *. For pointer results, we also need to ensure ++ that the types of the passed arguments are compatible: this is ++ similar to what the ?: construct would need to ensure. */ ++ case ISEL_FLAG_CMP_PTR: ++ case ISEL_FLAG_SEL_PTR: ++ { ++ /* Results compatible with each other? */ ++ if (!lang_hooks.types_compatible_p (type0, type1)) ++ return false; ++ ++ return (POINTER_TYPE_P (type0) ++ && POINTER_TYPE_P (type1)); ++ } ++ break; ++ /* For signed and unsigned arguments and results, we just need to ++ make sure that the argument types are compatible with the ++ declared types; we can insert conversions to make everything ++ match up. */ ++ case ISEL_FLAG_CMP_SIGNED: ++ case ISEL_FLAG_SEL_SIGNED: ++ case ISEL_FLAG_CMP_UNSIGNED: ++ case ISEL_FLAG_SEL_UNSIGNED: ++ return (lang_hooks.types_compatible_p (type0, decltype0) ++ && lang_hooks.types_compatible_p (type1, decltype1)); ++ default: ++ ; ++ } ++ ++ gcc_unreachable (); ++} ++ ++/* Determine if FNDECL is a generic isel intrinsic and if it can be ++ resolved to a non-generic version with a proper type using the ++ descriptions found in DESC. Return a call to the non-generic builtin ++ if so. */ ++ ++static tree ++rs6000_resolve_isel_builtin (location_t loc, tree fndecl, ++ void *passed_arglist, ++ const struct isel_builtin_desc *desc, ++ int n_descs) ++{ ++ VEC(tree,gc) *arglist = (VEC(tree,gc) *) passed_arglist; ++ unsigned int nargs = VEC_length (tree, arglist); ++ int i; ++ unsigned int fcode = DECL_FUNCTION_CODE (fndecl); ++ const struct isel_builtin_desc *generic = NULL; ++ ++ /* Is this even a builtin we care about? */ ++ if (fcode < ISEL_BUILTIN_OVERLOADED_FIRST ++ || fcode > ISEL_BUILTIN_OVERLOADED_LAST) ++ return NULL_TREE; ++ ++ if (nargs != 4) ++ { ++ error ("isel intrinsics only accept 4 arguments"); ++ return error_mark_node; ++ } ++ ++ /* Find the generic builtin we're resolving. */ ++ for (i = 0; i < n_descs; i++) ++ if (desc[i].code == fcode) ++ { ++ generic = &desc[i]; ++ break; ++ } ++ ++ /* Happens if we're looking for a 64-bit builtin in the 32-bit ++ descriptors. */ ++ if (generic == NULL) ++ return NULL_TREE; ++ ++ /* Try all the builtins whose comparison matches the generic one. */ ++ for (i = 0; i < n_descs; i++) ++ { ++ const struct isel_builtin_desc *d = &desc[i]; ++ int j; ++ tree *argp = VEC_address (tree, arglist); ++ tree impl_fndecl; ++ tree decltypes[4], t; ++ tree converted_args[4]; ++ ++ if (d == generic || d->cmp_code != generic->cmp_code) ++ continue; ++ ++ impl_fndecl = rs6000_builtin_decls[d->code]; ++ t = TYPE_ARG_TYPES (TREE_TYPE (impl_fndecl)); ++ for (j = 0 ; t != void_list_node; j++, t = TREE_CHAIN (t)) ++ decltypes[j] = TREE_VALUE (t); ++ ++ if (!isel_arguments_valid (argp, decltypes, d->arg_flags, true) ++ || !isel_arguments_valid (argp+2, decltypes+2, d->arg_flags, false)) ++ continue; ++ ++ /* We got here, we're ok. Build a new, resolved CALL_EXPR. */ ++ for (j = 0; j < 4; j++) ++ converted_args[j] = fold_convert (decltypes[j], argp[j]); ++ ++ return build_call_expr_loc (loc, impl_fndecl, 4, ++ converted_args[0], converted_args[1], ++ converted_args[2], converted_args[3]); ++ } ++ ++ error ("invalid parameter combination for isel intrinsic"); ++ return error_mark_node; ++} ++ ++tree ++rs6000_resolve_overloaded_builtin (location_t loc, tree fndecl, void *arglist) ++{ ++ tree t; ++ ++ t = altivec_resolve_overloaded_builtin (loc, fndecl, arglist); ++ if (t) ++ return t; ++ ++ t = rs6000_resolve_isel_builtin (loc, fndecl, arglist, ++ builtin_iselw, ARRAY_SIZE (builtin_iselw)); ++ if (t) ++ return t; ++ ++ t = rs6000_resolve_isel_builtin (loc, fndecl, arglist, ++ builtin_iseld, ARRAY_SIZE (builtin_iseld)); ++ if (t) ++ return t; ++ ++ return NULL_TREE; ++} +diff -ruN gcc-4.6.0-orig/gcc/config/rs6000/rs6000.h gcc-4.6.0-new/gcc/config/rs6000/rs6000.h +--- gcc-4.6.0-orig/gcc/config/rs6000/rs6000.h 2011-03-07 13:27:09.000000000 -0600 ++++ gcc-4.6.0-new/gcc/config/rs6000/rs6000.h 2011-07-25 16:07:04.045105000 -0500 +@@ -535,7 +535,7 @@ + #define REGISTER_TARGET_PRAGMAS() do { \ + c_register_pragma (0, "longcall", rs6000_pragma_longcall); \ + targetm.target_option.pragma_parse = rs6000_pragma_target_parse; \ +- targetm.resolve_overloaded_builtin = altivec_resolve_overloaded_builtin; \ ++ targetm.resolve_overloaded_builtin = rs6000_resolve_overloaded_builtin; \ + } while (0) + + /* Target #defines. */ +@@ -2446,3 +2446,41 @@ + extern GTY(()) tree rs6000_builtin_types[RS6000_BTI_MAX]; + extern GTY(()) tree rs6000_builtin_decls[RS6000_BUILTIN_COUNT]; + ++/* Values for struct isel_builtin_desc.arg_flags. */ ++enum { ++ ISEL_FLAG_CMP_PTR = 0x1, ++ ISEL_FLAG_CMP_SIGNED = 0x2, ++ ISEL_FLAG_CMP_UNSIGNED = 0x4, ++ ISEL_FLAG_CMP_MASK = 0x7, ++ ISEL_FLAG_SEL_PTR = 0x10, ++ ISEL_FLAG_SEL_SIGNED = 0x20, ++ ISEL_FLAG_SEL_UNSIGNED = 0x40, ++ ISEL_FLAG_SEL_MASK = 0x70 ++}; ++ ++struct isel_builtin_desc { ++ /* Name of this builtin. NULL if we should construct it. */ ++ const char *name; ++ ++ /* Flags for argument combinations accepted by the builtin. ++ Zero if this builtin is a generic builtin, to be resolved later. */ ++ int arg_flags; ++ ++ /* The code of the builtin. */ ++ enum rs6000_builtins code; ++ ++ /* rtx_code and machine_mode are not available here; use ints instead. */ ++ /* The comparison code the builtin uses. */ ++ int cmp_code; ++ ++ /* The mode the builtin does comparisons in. */ ++ int cmp_mode; ++ ++ /* The mode the builtin's selected arguments are in. ++ Also happens to be its result mode. */ ++ int sel_mode; ++}; ++ ++/* Arrays describing isel builtins. */ ++extern const struct isel_builtin_desc builtin_iselw[32]; ++extern const struct isel_builtin_desc builtin_iseld[32]; +diff -ruN gcc-4.6.0-orig/gcc/config/rs6000/rs6000-protos.h gcc-4.6.0-new/gcc/config/rs6000/rs6000-protos.h +--- gcc-4.6.0-orig/gcc/config/rs6000/rs6000-protos.h 2011-03-15 07:57:37.000000000 -0500 ++++ gcc-4.6.0-new/gcc/config/rs6000/rs6000-protos.h 2011-07-25 16:07:50.484773000 -0500 +@@ -142,7 +142,7 @@ + unsigned int); + extern unsigned int darwin_rs6000_special_round_type_align (tree, unsigned int, + unsigned int); +-extern tree altivec_resolve_overloaded_builtin (location_t, tree, void *); ++extern tree rs6000_resolve_overloaded_builtin (location_t, tree, void *); + extern rtx rs6000_libcall_value (enum machine_mode); + extern rtx rs6000_va_arg (tree, tree); + extern int function_ok_for_sibcall (tree); +diff -ruN gcc-4.6.0-orig/gcc/testsuite/gcc.target/powerpc/builtin-isel64.c gcc-4.6.0-new/gcc/testsuite/gcc.target/powerpc/builtin-isel64.c +--- gcc-4.6.0-orig/gcc/testsuite/gcc.target/powerpc/builtin-isel64.c 1969-12-31 18:00:00.000000000 -0600 ++++ gcc-4.6.0-new/gcc/testsuite/gcc.target/powerpc/builtin-isel64.c 2011-07-25 12:27:55.343932000 -0500 +@@ -0,0 +1,75 @@ ++/* { dg-do compile { target { powerpc*-*-* && lp64 } } } */ ++/* { dg-options "-mcpu=e500mc64" } */ ++ ++#include "builtin-isel.h" ++ ++/* Equality comparisons. */ ++ ++#undef FUNCTION_NAME ++#define FUNCTION_NAME isel64eq ++ ++SIGNED64_PROTO ++{ ++ L = ISEL_BUILTIN (x, y, a, b); ++ U = ISEL_BUILTIN (x, y, (unsigned long) a, (unsigned long) b); ++ r = ISEL_BUILTIN (x, y, p, q); ++ r = ISEL_BUILTIN (x, y, (char *) p, (char *) q); ++ L = ISEL_BUILTIN (p, q, a, b); ++ /* Equality checks explicitly permit unsigned comparison operands. */ ++ L = ISEL_BUILTIN ((unsigned long) x, (unsigned long) y, a, b); ++ r = ISEL_BUILTIN ((unsigned long) x, (unsigned long) y, p, q); ++} ++ ++/* less-than, greater-than. */ ++ ++#undef FUNCTION_NAME ++#define FUNCTION_NAME isel64lt ++ ++SIGNED64_PROTO ++{ ++ L = ISEL_BUILTIN (x, y, a, b); ++ U = ISEL_BUILTIN (x, y, (unsigned long) a, (unsigned long) b); ++ r = ISEL_BUILTIN (x, y, p, q); ++ r = ISEL_BUILTIN (x, y, (char *) p, (char *) q); ++} ++ ++#undef FUNCTION_NAME ++#define FUNCTION_NAME isel64gt ++ ++SIGNED64_PROTO ++{ ++ L = ISEL_BUILTIN (x, y, a, b); ++ U = ISEL_BUILTIN (x, y, (unsigned long) a, (unsigned long) b); ++ r = ISEL_BUILTIN (x, y, p, q); ++ r = ISEL_BUILTIN (x, y, (char *) p, (char *) q); ++} ++ ++/* Unsigned variants. These permit unsigned and pointer operands for ++ comparison only. */ ++ ++#undef FUNCTION_NAME ++#define FUNCTION_NAME isel64ltu ++ ++UNSIGNED64_PROTO ++{ ++ L = ISEL_BUILTIN (x, y, a, b); ++ U = ISEL_BUILTIN (x, y, (unsigned long) a, (unsigned long) b); ++ r = ISEL_BUILTIN (x, y, p, q); ++ r = ISEL_BUILTIN (x, y, (char *) p, (char *) q); ++ L = ISEL_BUILTIN (p, q, a, b); ++} ++ ++#undef FUNCTION_NAME ++#define FUNCTION_NAME isel64gtu ++ ++UNSIGNED64_PROTO ++{ ++ L = ISEL_BUILTIN (x, y, a, b); ++ U = ISEL_BUILTIN (x, y, (unsigned long) a, (unsigned long) b); ++ r = ISEL_BUILTIN (x, y, p, q); ++ r = ISEL_BUILTIN (x, y, (char *) p, (char *) q); ++ L = ISEL_BUILTIN (p, q, a, b); ++} ++ ++/* Don't use bare isel, as that'll match function names and the like. */ ++/* { dg-final { scan-assembler-times "isel " 26 } } */ +diff -ruN gcc-4.6.0-orig/gcc/testsuite/gcc.target/powerpc/builtin-isel64-errors.c gcc-4.6.0-new/gcc/testsuite/gcc.target/powerpc/builtin-isel64-errors.c +--- gcc-4.6.0-orig/gcc/testsuite/gcc.target/powerpc/builtin-isel64-errors.c 1969-12-31 18:00:00.000000000 -0600 ++++ gcc-4.6.0-new/gcc/testsuite/gcc.target/powerpc/builtin-isel64-errors.c 2011-07-25 12:27:55.372965000 -0500 +@@ -0,0 +1,110 @@ ++/* Test rejection of invalid parameter combinations in isel builtins. */ ++/* { dg-do compile { target { powerpc*-*-* && lp64 } } } */ ++/* { dg-options "-mcpu=e5500" } */ ++ ++#include "builtin-isel.h" ++ ++ ++/* Equality comparisons. */ ++ ++#undef FUNCTION_NAME ++#define FUNCTION_NAME isel64eq ++ ++SIGNED64_PROTO ++{ ++ /* Mismatches in argument type. */ ++ ISEL_BUILTIN ((unsigned long) x, y, a, b); /* { dg-error "isel intrinsic" } */ ++ ISEL_BUILTIN (x, (unsigned long) y, a, b); /* { dg-error "isel intrinsic" } */ ++ ISEL_BUILTIN ((long *) p, q, a, b); /* { dg-error "isel intrinsic" } */ ++ ISEL_BUILTIN (p, (long *) q, a, b); /* { dg-error "isel intrinsic" } */ ++ /* Mismatches in return type. */ ++ ISEL_BUILTIN (x, y, (unsigned long) a, b); /* { dg-error "isel intrinsic" } */ ++ ISEL_BUILTIN (x, y, a, (unsigned long) b); /* { dg-error "isel intrinsic" } */ ++ ISEL_BUILTIN (x, y, (long *) p, q); /* { dg-error "isel intrinsic" } */ ++ ISEL_BUILTIN (x, y, p, (long *) q); /* { dg-error "isel intrinsic" } */ ++} ++ ++/* less-than, greater-than. */ ++ ++#undef FUNCTION_NAME ++#define FUNCTION_NAME isel64lt ++ ++SIGNED64_PROTO ++{ ++ /* Unsigned comparison should be done with the *u variants. */ ++ ISEL_BUILTIN ((unsigned long) x, (unsigned long) y, a, b); /* { dg-error "isel intrinsic" } */ ++ /* So should pointer comparison. */ ++ ISEL_BUILTIN (p, q, a, b); /* { dg-error "isel intrinsic" } */ ++ /* Mismatches in argument type. */ ++ ISEL_BUILTIN ((unsigned long) x, y, a, b); /* { dg-error "isel intrinsic" } */ ++ ISEL_BUILTIN (x, (unsigned long) y, a, b); /* { dg-error "isel intrinsic" } */ ++ ISEL_BUILTIN ((long *) p, q, a, b); /* { dg-error "isel intrinsic" } */ ++ ISEL_BUILTIN (p, (long *) q, a, b); /* { dg-error "isel intrinsic" } */ ++ /* Mismatches in return type. */ ++ ISEL_BUILTIN (x, y, (unsigned long) a, b); /* { dg-error "isel intrinsic" } */ ++ ISEL_BUILTIN (x, y, a, (unsigned long) b); /* { dg-error "isel intrinsic" } */ ++ ISEL_BUILTIN (x, y, (long *) p, q); /* { dg-error "isel intrinsic" } */ ++ ISEL_BUILTIN (x, y, p, (long *) q); /* { dg-error "isel intrinsic" } */ ++} ++ ++#undef FUNCTION_NAME ++#define FUNCTION_NAME isel64gt ++ ++SIGNED64_PROTO ++{ ++ /* Unsigned comparison should be done with the *u variants. */ ++ ISEL_BUILTIN ((unsigned long) x, (unsigned long) y, a, b); /* { dg-error "isel intrinsic" } */ ++ /* So should pointer comparison. */ ++ ISEL_BUILTIN (p, q, a, b); /* { dg-error "isel intrinsic" } */ ++ /* Mismatches in argument type. */ ++ ISEL_BUILTIN ((unsigned long) x, y, a, b); /* { dg-error "isel intrinsic" } */ ++ ISEL_BUILTIN (x, (unsigned long) y, a, b); /* { dg-error "isel intrinsic" } */ ++ ISEL_BUILTIN ((long *) p, q, a, b); /* { dg-error "isel intrinsic" } */ ++ ISEL_BUILTIN (p, (long *) q, a, b); /* { dg-error "isel intrinsic" } */ ++ /* Mismatches in return type. */ ++ ISEL_BUILTIN (x, y, (unsigned long) a, b); /* { dg-error "isel intrinsic" } */ ++ ISEL_BUILTIN (x, y, a, (unsigned long) b); /* { dg-error "isel intrinsic" } */ ++ ISEL_BUILTIN (x, y, (long *) p, q); /* { dg-error "isel intrinsic" } */ ++ ISEL_BUILTIN (x, y, p, (long *) q); /* { dg-error "isel intrinsic" } */ ++} ++ ++/* Unsigned variants. These permit unsigned and pointer operands for ++ comparison only. */ ++ ++#undef FUNCTION_NAME ++#define FUNCTION_NAME isel64ltu ++ ++UNSIGNED64_PROTO ++{ ++ /* Signed comparison should be done with the signed variants. */ ++ ISEL_BUILTIN ((long) x, (long) y, a, b); /* { dg-error "isel intrinsic" } */ ++ /* Mismatches in argument type. */ ++ ISEL_BUILTIN ((long) x, y, a, b); /* { dg-error "isel intrinsic" } */ ++ ISEL_BUILTIN (x, (long) y, a, b); /* { dg-error "isel intrinsic" } */ ++ ISEL_BUILTIN ((long *) p, q, a, b); /* { dg-error "isel intrinsic" } */ ++ ISEL_BUILTIN (p, (long *) q, a, b); /* { dg-error "isel intrinsic" } */ ++ /* Mismatches in return type. */ ++ ISEL_BUILTIN (x, y, (unsigned long) a, b); /* { dg-error "isel intrinsic" } */ ++ ISEL_BUILTIN (x, y, a, (unsigned long) b); /* { dg-error "isel intrinsic" } */ ++ ISEL_BUILTIN (x, y, (long *) p, q); /* { dg-error "isel intrinsic" } */ ++ ISEL_BUILTIN (x, y, p, (long *) q); /* { dg-error "isel intrinsic" } */ ++} ++ ++#undef FUNCTION_NAME ++#define FUNCTION_NAME isel64gtu ++ ++UNSIGNED64_PROTO ++{ ++ /* Signed comparison should be done with the signed variants. */ ++ ISEL_BUILTIN ((long) x, (long) y, a, b); /* { dg-error "isel intrinsic" } */ ++ /* Mismatches in argument type. */ ++ ISEL_BUILTIN ((long) x, y, a, b); /* { dg-error "isel intrinsic" } */ ++ ISEL_BUILTIN (x, (long) y, a, b); /* { dg-error "isel intrinsic" } */ ++ ISEL_BUILTIN ((long *) p, q, a, b); /* { dg-error "isel intrinsic" } */ ++ ISEL_BUILTIN (p, (long *) q, a, b); /* { dg-error "isel intrinsic" } */ ++ /* Mismatches in return type. */ ++ ISEL_BUILTIN (x, y, (unsigned long) a, b); /* { dg-error "isel intrinsic" } */ ++ ISEL_BUILTIN (x, y, a, (unsigned long) b); /* { dg-error "isel intrinsic" } */ ++ ISEL_BUILTIN (x, y, (long *) p, q); /* { dg-error "isel intrinsic" } */ ++ ISEL_BUILTIN (x, y, p, (long *) q); /* { dg-error "isel intrinsic" } */ ++} +diff -ruN gcc-4.6.0-orig/gcc/testsuite/gcc.target/powerpc/builtin-isel.c gcc-4.6.0-new/gcc/testsuite/gcc.target/powerpc/builtin-isel.c +--- gcc-4.6.0-orig/gcc/testsuite/gcc.target/powerpc/builtin-isel.c 1969-12-31 18:00:00.000000000 -0600 ++++ gcc-4.6.0-new/gcc/testsuite/gcc.target/powerpc/builtin-isel.c 2011-07-25 12:27:55.405959000 -0500 +@@ -0,0 +1,81 @@ ++/* { dg-do compile } */ ++/* { dg-options "-mcpu=e500mc" } */ ++ ++#include "builtin-isel.h" ++ ++/* We're not being clever with the preprocessor here because DejaGNU ++ will get confused. We do try to use it to eliminate what duplication ++ we can. */ ++ ++/* We check to see that the resolution permits polymorphic results. */ ++ ++/* Equality comparisons. */ ++ ++#undef FUNCTION_NAME ++#define FUNCTION_NAME iseleq ++ ++SIGNED_PROTO ++{ ++ i = ISEL_BUILTIN (x, y, a, b); ++ u = ISEL_BUILTIN (x, y, (unsigned int) a, (unsigned int) b); ++ r = ISEL_BUILTIN (x, y, p, q); ++ r = ISEL_BUILTIN (x, y, (char *) p, (char *) q); ++ i = ISEL_BUILTIN (p, q, a, b); ++ /* Equality checks explicitly permit unsigned comparison operands. */ ++ i = ISEL_BUILTIN ((unsigned int) x, (unsigned int) y, a, b); ++ r = ISEL_BUILTIN ((unsigned int) x, (unsigned int) y, p, q); ++} ++ ++/* less-than, greater-than. */ ++ ++#undef FUNCTION_NAME ++#define FUNCTION_NAME isellt ++ ++SIGNED_PROTO ++{ ++ i = ISEL_BUILTIN (x, y, a, b); ++ u = ISEL_BUILTIN (x, y, (unsigned int) a, (unsigned int) b); ++ r = ISEL_BUILTIN (x, y, p, q); ++ r = ISEL_BUILTIN (x, y, (char *) p, (char *) q); ++} ++ ++#undef FUNCTION_NAME ++#define FUNCTION_NAME iselgt ++ ++SIGNED_PROTO ++{ ++ i = ISEL_BUILTIN (x, y, a, b); ++ u = ISEL_BUILTIN (x, y, (unsigned int) a, (unsigned int) b); ++ r = ISEL_BUILTIN (x, y, p, q); ++ r = ISEL_BUILTIN (x, y, (char *) p, (char *) q); ++} ++ ++/* Unsigned variants. These permit unsigned and pointer operands for ++ comparison only. */ ++ ++#undef FUNCTION_NAME ++#define FUNCTION_NAME iselltu ++ ++UNSIGNED_PROTO ++{ ++ i = ISEL_BUILTIN (x, y, a, b); ++ u = ISEL_BUILTIN (x, y, (unsigned int) a, (unsigned int) b); ++ r = ISEL_BUILTIN (x, y, p, q); ++ r = ISEL_BUILTIN (x, y, (char *) p, (char *) q); ++ i = ISEL_BUILTIN (p, q, a, b); ++} ++ ++#undef FUNCTION_NAME ++#define FUNCTION_NAME iselgtu ++ ++UNSIGNED_PROTO ++{ ++ i = ISEL_BUILTIN (x, y, a, b); ++ u = ISEL_BUILTIN (x, y, (unsigned int) a, (unsigned int) b); ++ r = ISEL_BUILTIN (x, y, p, q); ++ r = ISEL_BUILTIN (x, y, (char *) p, (char *) q); ++ i = ISEL_BUILTIN (p, q, a, b); ++} ++ ++/* Don't use bare isel, as that'll match function names and the like. */ ++/* { dg-final { scan-assembler-times "isel " 26 } } */ +diff -ruN gcc-4.6.0-orig/gcc/testsuite/gcc.target/powerpc/builtin-isel-errors.c gcc-4.6.0-new/gcc/testsuite/gcc.target/powerpc/builtin-isel-errors.c +--- gcc-4.6.0-orig/gcc/testsuite/gcc.target/powerpc/builtin-isel-errors.c 1969-12-31 18:00:00.000000000 -0600 ++++ gcc-4.6.0-new/gcc/testsuite/gcc.target/powerpc/builtin-isel-errors.c 2011-07-25 12:27:55.443938000 -0500 +@@ -0,0 +1,117 @@ ++/* Test rejection of invalid parameter combinations in isel builtins. */ ++/* { dg-do compile } */ ++/* { dg-options "-mcpu=e500mc" } */ ++ ++#include "builtin-isel.h" ++ ++/* We're not being clever with the preprocessor here because DejaGNU ++ will get confused. We do try to use it to eliminate what duplication ++ we can. */ ++ ++/* We check basic resolution of each builtin. We also check to see that ++ the resolution permits polymorphic results. Argument type mismatches ++ and result type mismatches are not permitted, except where noted. */ ++ ++/* Equality comparisons. */ ++ ++#undef FUNCTION_NAME ++#define FUNCTION_NAME iseleq ++ ++SIGNED_PROTO ++{ ++ /* Mismatches in argument type. */ ++ ISEL_BUILTIN ((unsigned int) x, y, a, b); /* { dg-error "isel intrinsic" } */ ++ ISEL_BUILTIN (x, (unsigned int) y, a, b); /* { dg-error "isel intrinsic" } */ ++ ISEL_BUILTIN ((int *) p, q, a, b); /* { dg-error "isel intrinsic" } */ ++ ISEL_BUILTIN (p, (int *) q, a, b); /* { dg-error "isel intrinsic" } */ ++ /* Mismatches in return type. */ ++ ISEL_BUILTIN (x, y, (unsigned int) a, b); /* { dg-error "isel intrinsic" } */ ++ ISEL_BUILTIN (x, y, a, (unsigned int) b); /* { dg-error "isel intrinsic" } */ ++ ISEL_BUILTIN (x, y, (int *) p, q); /* { dg-error "isel intrinsic" } */ ++ ISEL_BUILTIN (x, y, p, (int *) q); /* { dg-error "isel intrinsic" } */ ++} ++ ++/* less-than, greater-than. */ ++ ++#undef FUNCTION_NAME ++#define FUNCTION_NAME isellt ++ ++SIGNED_PROTO ++{ ++ /* Unsigned comparison should be done with the *u variants. */ ++ ISEL_BUILTIN ((unsigned int) x, (unsigned int) y, a, b); /* { dg-error "isel intrinsic" } */ ++ /* So should pointer comparison. */ ++ ISEL_BUILTIN (p, q, a, b); /* { dg-error "isel intrinsic" } */ ++ /* Mismatches in argument type. */ ++ ISEL_BUILTIN ((unsigned int) x, y, a, b); /* { dg-error "isel intrinsic" } */ ++ ISEL_BUILTIN (x, (unsigned int) y, a, b); /* { dg-error "isel intrinsic" } */ ++ ISEL_BUILTIN ((int *) p, q, a, b); /* { dg-error "isel intrinsic" } */ ++ ISEL_BUILTIN (p, (int *) q, a, b); /* { dg-error "isel intrinsic" } */ ++ /* Mismatches in return type. */ ++ ISEL_BUILTIN (x, y, (unsigned int) a, b); /* { dg-error "isel intrinsic" } */ ++ ISEL_BUILTIN (x, y, a, (unsigned int) b); /* { dg-error "isel intrinsic" } */ ++ ISEL_BUILTIN (x, y, (int *) p, q); /* { dg-error "isel intrinsic" } */ ++ ISEL_BUILTIN (x, y, p, (int *) q); /* { dg-error "isel intrinsic" } */ ++} ++ ++#undef FUNCTION_NAME ++#define FUNCTION_NAME iselgt ++ ++SIGNED_PROTO ++{ ++ /* Unsigned comparison should be done with the *u variants. */ ++ ISEL_BUILTIN ((unsigned int) x, (unsigned int) y, a, b); /* { dg-error "isel intrinsic" } */ ++ /* So should pointer comparison. */ ++ ISEL_BUILTIN (p, q, a, b); /* { dg-error "isel intrinsic" } */ ++ /* Mismatches in argument type. */ ++ ISEL_BUILTIN ((unsigned int) x, y, a, b); /* { dg-error "isel intrinsic" } */ ++ ISEL_BUILTIN (x, (unsigned int) y, a, b); /* { dg-error "isel intrinsic" } */ ++ ISEL_BUILTIN ((int *) p, q, a, b); /* { dg-error "isel intrinsic" } */ ++ ISEL_BUILTIN (p, (int *) q, a, b); /* { dg-error "isel intrinsic" } */ ++ /* Mismatches in return type. */ ++ ISEL_BUILTIN (x, y, (unsigned int) a, b); /* { dg-error "isel intrinsic" } */ ++ ISEL_BUILTIN (x, y, a, (unsigned int) b); /* { dg-error "isel intrinsic" } */ ++ ISEL_BUILTIN (x, y, (int *) p, q); /* { dg-error "isel intrinsic" } */ ++ ISEL_BUILTIN (x, y, p, (int *) q); /* { dg-error "isel intrinsic" } */ ++} ++ ++/* Unsigned variants. These permit unsigned and pointer operands for ++ comparison only. */ ++ ++#undef FUNCTION_NAME ++#define FUNCTION_NAME iselltu ++ ++UNSIGNED_PROTO ++{ ++ /* Signed comparison should be done with the signed variants. */ ++ ISEL_BUILTIN ((int) x, (int) y, a, b); /* { dg-error "isel intrinsic" } */ ++ /* Mismatches in argument type. */ ++ ISEL_BUILTIN ((int) x, y, a, b); /* { dg-error "isel intrinsic" } */ ++ ISEL_BUILTIN (x, (int) y, a, b); /* { dg-error "isel intrinsic" } */ ++ ISEL_BUILTIN ((int *) p, q, a, b); /* { dg-error "isel intrinsic" } */ ++ ISEL_BUILTIN (p, (int *) q, a, b); /* { dg-error "isel intrinsic" } */ ++ /* Mismatches in return type. */ ++ ISEL_BUILTIN (x, y, (unsigned int) a, b); /* { dg-error "isel intrinsic" } */ ++ ISEL_BUILTIN (x, y, a, (unsigned int) b); /* { dg-error "isel intrinsic" } */ ++ ISEL_BUILTIN (x, y, (int *) p, q); /* { dg-error "isel intrinsic" } */ ++ ISEL_BUILTIN (x, y, p, (int *) q); /* { dg-error "isel intrinsic" } */ ++} ++ ++#undef FUNCTION_NAME ++#define FUNCTION_NAME iselgtu ++ ++UNSIGNED_PROTO ++{ ++ /* Signed comparison should be done with the signed variants. */ ++ ISEL_BUILTIN ((int) x, (int) y, a, b); /* { dg-error "isel intrinsic" } */ ++ /* Mismatches in argument type. */ ++ ISEL_BUILTIN ((int) x, y, a, b); /* { dg-error "isel intrinsic" } */ ++ ISEL_BUILTIN (x, (int) y, a, b); /* { dg-error "isel intrinsic" } */ ++ ISEL_BUILTIN ((int *) p, q, a, b); /* { dg-error "isel intrinsic" } */ ++ ISEL_BUILTIN (p, (int *) q, a, b); /* { dg-error "isel intrinsic" } */ ++ /* Mismatches in return type. */ ++ ISEL_BUILTIN (x, y, (unsigned int) a, b); /* { dg-error "isel intrinsic" } */ ++ ISEL_BUILTIN (x, y, a, (unsigned int) b); /* { dg-error "isel intrinsic" } */ ++ ISEL_BUILTIN (x, y, (int *) p, q); /* { dg-error "isel intrinsic" } */ ++ ISEL_BUILTIN (x, y, p, (int *) q); /* { dg-error "isel intrinsic" } */ ++} +diff -ruN gcc-4.6.0-orig/gcc/testsuite/gcc.target/powerpc/builtin-isel.h gcc-4.6.0-new/gcc/testsuite/gcc.target/powerpc/builtin-isel.h +--- gcc-4.6.0-orig/gcc/testsuite/gcc.target/powerpc/builtin-isel.h 1969-12-31 18:00:00.000000000 -0600 ++++ gcc-4.6.0-new/gcc/testsuite/gcc.target/powerpc/builtin-isel.h 2011-07-25 12:27:55.483942000 -0500 +@@ -0,0 +1,25 @@ ++/* Common definitions for builtin isel testing. */ ++ ++#define SIGNED_ARGLIST (int x, int y, int a, int b, void *p, void *q) ++#define UNSIGNED_ARGLIST (unsigned int x, unsigned int y, \ ++ int a, int b, void *p, void *q) ++ ++#define SIGNED_PROTO void FUNCTION_NAME SIGNED_ARGLIST ++#define UNSIGNED_PROTO void FUNCTION_NAME UNSIGNED_ARGLIST ++ ++#define SIGNED64_ARGLIST (long x, long y, long a, long b, void *p, void *q) ++#define UNSIGNED64_ARGLIST (unsigned long x, unsigned long y, \ ++ long a, long b, void *p, void *q) ++ ++#define SIGNED64_PROTO void FUNCTION_NAME SIGNED64_ARGLIST ++#define UNSIGNED64_PROTO void FUNCTION_NAME UNSIGNED64_ARGLIST ++ ++#define CONCAT2(X,Y) X##Y ++#define CONCAT(X,Y) CONCAT2(X, Y) ++#define ISEL_BUILTIN CONCAT(__builtin_, FUNCTION_NAME) ++ ++volatile int i; ++volatile unsigned int u; ++volatile void *r; ++volatile long L; ++volatile unsigned long U; diff --git a/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.case_values.patch b/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.case_values.patch new file mode 100644 index 00000000..5be766d9 --- /dev/null +++ b/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.case_values.patch @@ -0,0 +1,65 @@ +--- gcc-4.6.0/gcc/params.def-orig 2011-06-16 11:39:42.412634260 -0500 ++++ gcc-4.6.0/gcc/params.def 2011-06-16 11:41:29.457630886 -0500 +@@ -39,6 +39,11 @@ + + Be sure to add an entry to invoke.texi summarizing the parameter. */ + ++DEFPARAM (PARAM_CASE_VALUES_THRESHOLD, ++ "case-values-threshold", ++ "Minimum number of case statements for each a jump table will be used", ++ 4, 4, 1000) ++ + /* The threshold ratio between current and hottest structure counts. + We say that if the ratio of the current structure count, + calculated by profiling, to the hottest structure count +--- gcc-4.6.0/gcc/config/rs6000/rs6000.c-orig 2011-06-16 12:24:03.440630751 -0500 ++++ gcc-4.6.0/gcc/config/rs6000/rs6000.c 2011-06-16 12:24:51.450630163 -0500 +@@ -1282,6 +1282,7 @@ + struct cl_target_option *); + static bool rs6000_can_inline_p (tree, tree); + static void rs6000_set_current_function (tree); ++static unsigned int rs6000_case_values_threshold (void); + + + /* Default register names. */ +--- gcc-4.6.0/gcc/config/rs6000/rs6000.c-orig 2011-06-16 11:18:27.131631000 -0500 ++++ gcc-4.6.0/gcc/config/rs6000/rs6000.c 2011-06-16 11:38:15.225631714 -0500 +@@ -1704,6 +1704,9 @@ + #undef TARGET_SET_CURRENT_FUNCTION + #define TARGET_SET_CURRENT_FUNCTION rs6000_set_current_function + ++#undef TARGET_CASE_VALUES_THRESHOLD ++#define TARGET_CASE_VALUES_THRESHOLD rs6000_case_values_threshold ++ + struct gcc_target targetm = TARGET_INITIALIZER; + + +@@ -28179,6 +28182,12 @@ + } + + ++static unsigned int ++rs6000_case_values_threshold (void) ++{ ++ return PARAM_VALUE (PARAM_CASE_VALUES_THRESHOLD); ++} ++ + /* Save the current options */ + + static void +--- gcc-4.6.0/gcc/config/rs6000/rs6000.c-orig 2011-06-17 12:19:00.463631000 -0500 ++++ gcc-4.6.0/gcc/config/rs6000/rs6000.c 2011-06-17 12:06:28.904630840 -0500 +@@ -2906,6 +2906,13 @@ + if (rs6000_block_move_inline_limit < (TARGET_POWERPC64 ? 64 : 32)) + rs6000_block_move_inline_limit = (TARGET_POWERPC64 ? 64 : 32); + ++ if ((rs6000_cpu == PROCESSOR_PPC8540 ++ || rs6000_cpu == PROCESSOR_PPCE500MC ++ || rs6000_cpu == PROCESSOR_PPCE5500 ++ || rs6000_cpu == PROCESSOR_PPCE6500) ++ && global_options_set.x_param_values[(int) PARAM_CASE_VALUES_THRESHOLD] != true) ++ global_options.x_param_values[(int) PARAM_CASE_VALUES_THRESHOLD] = 8; ++ + if (global_init_p) + { + /* If the appropriate debug option is enabled, replace the target hooks diff --git a/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.check_path_validity.patch b/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.check_path_validity.patch new file mode 100644 index 00000000..5d70a397 --- /dev/null +++ b/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.check_path_validity.patch @@ -0,0 +1,12 @@ +--- gcc-4_6-branch/gcc/Makefile.in.orig 2012-03-06 01:10:15.277196930 -0600 ++++ gcc-4_6-branch/gcc/Makefile.in 2012-03-06 01:10:54.083378912 -0600 +@@ -4170,6 +4170,9 @@ + else \ + set -e; for ml in `cat fixinc_list`; do \ + sysroot_headers_suffix=`echo $${ml} | sed -e 's/;.*$$//'`; \ ++ if test "x$${sysroot_headers_suffix}" = "x"; then \ ++ continue; \ ++ fi; \ + multi_dir=`echo $${ml} | sed -e 's/^[^;]*;//'`; \ + fix_dir=include-fixed$${multi_dir}; \ + if ! $(inhibit_libc) && test ! -d ${SYSTEM_HEADER_DIR}; then \ diff --git a/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.e5500_mfocr.patch b/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.e5500_mfocr.patch new file mode 100644 index 00000000..16b3538a --- /dev/null +++ b/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.e5500_mfocr.patch @@ -0,0 +1,181 @@ +# Problem: Although gcc is prepared to avoid "mfocr" instructions + (which takes 5 cycles in our parts and 2 cycles on IBM parts). This + instruction is used on the mentioned program. What is suspicious + about it, is that the code compiled for 32 bits does not use the + instruction. So, it could be a omission in the previous + implementation, or a bug, or a new opportunity. +# Reported by: Performance team (PARC) +# Owned by: Ping Hu +# Action: + * 'mfocr' flag problem: that 'mfocr' flag was uncorrectly set for E5500, + which caused the 'mfocr' instructions generated even on E5500. + * avoid generating 'mfcr' and 'mfocr' instructions: due to the fact + that both instructions are expensive on Freescale processors. + * A target specific flag, -mslow-mfocr, can be used to avoid generating + 'mfcr' and 'mfocr' instructions in 64-bit mode, thus restoring legacy + operations if desired. + +diff -ruN gcc-4.6.2-clean/gcc/config/rs6000/rs6000.c gcc-4.6.2/gcc/config/rs6000/rs6000.c +--- gcc-4.6.2-clean/gcc/config/rs6000/rs6000.c 2011-11-22 11:11:47.479144000 -0600 ++++ gcc-4.6.2/gcc/config/rs6000/rs6000.c 2011-11-29 16:23:45.074279998 -0600 +@@ -1885,6 +1885,7 @@ + POWERPC_BASE_MASK | MASK_PPC_GFXOPT | MASK_POWERPC64} + }; + ++ + /* Look up a processor name for -mcpu=xxx and -mtune=xxx. Return -1 if the + name is invalid. */ + +@@ -2902,6 +2903,10 @@ + || rs6000_cpu == PROCESSOR_PPCE6500) + target_flags &= ~MASK_PPC_GPOPT; + ++ if (rs6000_cpu == PROCESSOR_PPCE5500) ++ target_flags &= ~MASK_MFCRF; ++ ++ + /* store_one_arg depends on expand_block_move to handle at least the + size of reg_parm_stack_space. */ + if (rs6000_block_move_inline_limit < (TARGET_POWERPC64 ? 64 : 32)) +diff -ruN gcc-4.6.2-clean/gcc/config/rs6000/rs6000.md gcc-4.6.2/gcc/config/rs6000/rs6000.md +--- gcc-4.6.2-clean/gcc/config/rs6000/rs6000.md 2011-11-22 11:11:47.036144001 -0600 ++++ gcc-4.6.2/gcc/config/rs6000/rs6000.md 2011-11-29 16:24:04.705280001 -0600 +@@ -215,6 +215,8 @@ + ; (one with a '.') will compare; and the size used for arithmetic carries. + (define_mode_iterator P [(SI "TARGET_32BIT") (DI "TARGET_64BIT")]) + ++(define_mode_iterator P2 [(SI "TARGET_32BIT || TARGET_SLOW_MFOCR") (DI "TARGET_64BIT")]) ++ + ; Any hardware-supported floating-point mode + (define_mode_iterator FP [ + (SF "TARGET_HARD_FLOAT +@@ -2208,9 +2210,9 @@ + + (define_insn "" + [(set (match_operand:CC 0 "cc_reg_operand" "=x,?y") +- (compare:CC (neg:P (match_operand:P 1 "gpc_reg_operand" "r,r")) ++ (compare:CC (neg:P2 (match_operand:P2 1 "gpc_reg_operand" "r,r")) + (const_int 0))) +- (clobber (match_scratch:P 2 "=r,r"))] ++ (clobber (match_scratch:P2 2 "=r,r"))] + "" + "@ + neg. %2,%1 +@@ -2220,12 +2222,12 @@ + + (define_split + [(set (match_operand:CC 0 "cc_reg_not_cr0_operand" "") +- (compare:CC (neg:P (match_operand:P 1 "gpc_reg_operand" "")) ++ (compare:CC (neg:P2 (match_operand:P2 1 "gpc_reg_operand" "")) + (const_int 0))) +- (clobber (match_scratch:P 2 ""))] ++ (clobber (match_scratch:P2 2 ""))] + "reload_completed" + [(set (match_dup 2) +- (neg:P (match_dup 1))) ++ (neg:P2 (match_dup 1))) + (set (match_dup 0) + (compare:CC (match_dup 2) + (const_int 0)))] +@@ -2233,10 +2235,10 @@ + + (define_insn "" + [(set (match_operand:CC 2 "cc_reg_operand" "=x,?y") +- (compare:CC (neg:P (match_operand:P 1 "gpc_reg_operand" "r,r")) ++ (compare:CC (neg:P2 (match_operand:P2 1 "gpc_reg_operand" "r,r")) + (const_int 0))) +- (set (match_operand:P 0 "gpc_reg_operand" "=r,r") +- (neg:P (match_dup 1)))] ++ (set (match_operand:P2 0 "gpc_reg_operand" "=r,r") ++ (neg:P2 (match_dup 1)))] + "" + "@ + neg. %0,%1 +@@ -2246,13 +2248,13 @@ + + (define_split + [(set (match_operand:CC 2 "cc_reg_not_cr0_operand" "") +- (compare:CC (neg:P (match_operand:P 1 "gpc_reg_operand" "")) ++ (compare:CC (neg:P2 (match_operand:P2 1 "gpc_reg_operand" "")) + (const_int 0))) +- (set (match_operand:P 0 "gpc_reg_operand" "") +- (neg:P (match_dup 1)))] ++ (set (match_operand:P2 0 "gpc_reg_operand" "") ++ (neg:P2 (match_dup 1)))] + "reload_completed" + [(set (match_dup 0) +- (neg:P (match_dup 1))) ++ (neg:P2 (match_dup 1))) + (set (match_dup 2) + (compare:CC (match_dup 0) + (const_int 0)))] +@@ -15286,31 +15288,31 @@ + [(set_attr "length" "12")]) + + (define_insn_and_split "*gtu" +- [(set (match_operand:P 0 "gpc_reg_operand" "=r") +- (gtu:P (match_operand:P 1 "gpc_reg_operand" "r") +- (match_operand:P 2 "reg_or_short_operand" "rI")))] ++ [(set (match_operand:P2 0 "gpc_reg_operand" "=r") ++ (gtu:P2 (match_operand:P2 1 "gpc_reg_operand" "r") ++ (match_operand:P2 2 "reg_or_short_operand" "rI")))] + "" + "#" + "" +- [(set (match_dup 0) (neg:P (gtu:P (match_dup 1) (match_dup 2)))) +- (set (match_dup 0) (neg:P (match_dup 0)))] ++ [(set (match_dup 0) (neg:P2 (gtu:P2 (match_dup 1) (match_dup 2)))) ++ (set (match_dup 0) (neg:P2 (match_dup 0)))] + "") + + (define_insn_and_split "*gtu_compare" + [(set (match_operand:CC 3 "cc_reg_operand" "=x,?y") + (compare:CC +- (gtu:P (match_operand:P 1 "gpc_reg_operand" "r,r") +- (match_operand:P 2 "reg_or_short_operand" "rI,rI")) ++ (gtu:P2 (match_operand:P2 1 "gpc_reg_operand" "r,r") ++ (match_operand:P2 2 "reg_or_short_operand" "rI,rI")) + (const_int 0))) +- (set (match_operand:P 0 "gpc_reg_operand" "=r,r") +- (gtu:P (match_dup 1) (match_dup 2)))] ++ (set (match_operand:P2 0 "gpc_reg_operand" "=r,r") ++ (gtu:P2 (match_dup 1) (match_dup 2)))] + "" + "#" + "" +- [(set (match_dup 0) (neg:P (gtu:P (match_dup 1) (match_dup 2)))) ++ [(set (match_dup 0) (neg:P2 (gtu:P2 (match_dup 1) (match_dup 2)))) + (parallel [(set (match_dup 3) +- (compare:CC (neg:P (match_dup 0)) (const_int 0))) +- (set (match_dup 0) (neg:P (match_dup 0)))])] ++ (compare:CC (neg:P2 (match_dup 0)) (const_int 0))) ++ (set (match_dup 0) (neg:P2 (match_dup 0)))])] + "") + + (define_insn_and_split "*plus_gtu" +@@ -15345,9 +15347,9 @@ + "") + + (define_insn "*neg_gtu" +- [(set (match_operand:P 0 "gpc_reg_operand" "=r") +- (neg:P (gtu:P (match_operand:P 1 "gpc_reg_operand" "r") +- (match_operand:P 2 "reg_or_short_operand" "rI"))))] ++ [(set (match_operand:P2 0 "gpc_reg_operand" "=r") ++ (neg:P2 (gtu:P2 (match_operand:P2 1 "gpc_reg_operand" "r") ++ (match_operand:P2 2 "reg_or_short_operand" "rI"))))] + "" + "{sf%I2|subf%I2c} %0,%1,%2\;{sfe|subfe} %0,%0,%0" + [(set_attr "type" "two") +--- gcc-4.6.2-clean/gcc/config/rs6000/rs6000.opt 2011-11-22 11:11:47.480143999 -0600 ++++ gcc-4.6.2/gcc/config/rs6000/rs6000.opt 2011-11-29 16:24:16.322280634 -0600 +@@ -381,6 +381,10 @@ + Target + Generate SPE SIMD instructions on E500 + ++mslow-mfocr ++Target Report Var(TARGET_SLOW_MFOCR) ++Generate slow mfocr instructions ++ + mpaired + Target Var(rs6000_paired_float) Save + Generate PPC750CL paired-single instructions diff --git a/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.e6500-FSF46.patch b/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.e6500-FSF46.patch new file mode 100644 index 00000000..f9fa33de --- /dev/null +++ b/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.e6500-FSF46.patch @@ -0,0 +1,4011 @@ +diff -ruN gcc-4.6.2-orig/gcc/config/rs6000/altivec.h gcc-4.6.2/gcc/config/rs6000/altivec.h +--- gcc-4.6.2-orig/gcc/config/rs6000/altivec.h 2011-02-02 23:42:19.000000000 -0600 ++++ gcc-4.6.2/gcc/config/rs6000/altivec.h 2012-03-06 12:33:43.943038996 -0600 +@@ -322,6 +322,30 @@ + #define vec_vsx_st __builtin_vec_vsx_st + #endif + ++#ifdef __ALTIVEC2__ ++/* New Altivec instructions */ ++#define vec_absd __builtin_vec_absd ++#define vec_lvexbx __builtin_vec_lvexbx ++#define vec_lvexhx __builtin_vec_lvexhx ++#define vec_lvexwx __builtin_vec_lvexwx ++#define vec_stvexbx __builtin_vec_stvexbx ++#define vec_stvexhx __builtin_vec_stvexhx ++#define vec_stvexwx __builtin_vec_stvexwx ++#define vec_lvswx __builtin_vec_lvswx ++#define vec_lvswxl __builtin_vec_lvswxl ++#define vec_stvswx __builtin_vec_stvswx ++#define vec_stvswxl __builtin_vec_stvswxl ++#define vec_lvsm __builtin_vec_lvsm ++#define vec_lvtlx __builtin_vec_lvtlx ++#define vec_lvtlxl __builtin_vec_lvtlxl ++#define vec_lvtrx __builtin_vec_lvtrx ++#define vec_lvtrxl __builtin_vec_lvtrxl ++#define vec_stvflx __builtin_vec_stvflx ++#define vec_stvflxl __builtin_vec_stvflxl ++#define vec_stvfrx __builtin_vec_stvfrx ++#define vec_stvfrxl __builtin_vec_stvfrxl ++#endif ++ + /* Predicates. + For C++, we use templates in order to allow non-parenthesized arguments. + For C, instead, we use macros since non-parenthesized arguments were +diff -ruN gcc-4.6.2-orig/gcc/config/rs6000/altivec.md gcc-4.6.2/gcc/config/rs6000/altivec.md +--- gcc-4.6.2-orig/gcc/config/rs6000/altivec.md 2011-07-08 15:10:18.000000000 -0500 ++++ gcc-4.6.2/gcc/config/rs6000/altivec.md 2012-03-06 12:24:35.058038999 -0600 +@@ -91,9 +91,11 @@ + (UNSPEC_LVSL 194) + (UNSPEC_LVSR 195) + (UNSPEC_LVE 196) ++ (UNSPEC_LVEX 197) + (UNSPEC_STVX 201) + (UNSPEC_STVXL 202) + (UNSPEC_STVE 203) ++ (UNSPEC_STVEX 204) + (UNSPEC_SET_VSCR 213) + (UNSPEC_GET_VRSAVE 214) + (UNSPEC_LVX 215) +@@ -123,6 +125,19 @@ + (UNSPEC_STVLXL 241) + (UNSPEC_STVRX 242) + (UNSPEC_STVRXL 243) ++ (UNSPEC_LVTLX 244) ++ (UNSPEC_LVTLXL 245) ++ (UNSPEC_LVTRX 246) ++ (UNSPEC_LVTRXL 247) ++ (UNSPEC_STVFLX 248) ++ (UNSPEC_STVFLXL 249) ++ (UNSPEC_STVFRX 250) ++ (UNSPEC_STVFRXL 251) ++ (UNSPEC_LVSWX 252) ++ (UNSPEC_LVSWXL 253) ++ (UNSPEC_LVSM 254) ++ (UNSPEC_STVSWX 255) ++ (UNSPEC_STVSWXL 256) + (UNSPEC_VMULWHUB 308) + (UNSPEC_VMULWLUB 309) + (UNSPEC_VMULWHSB 310) +@@ -143,6 +158,9 @@ + (UNSPEC_VUPKLS_V4SF 325) + (UNSPEC_VUPKHU_V4SF 326) + (UNSPEC_VUPKLU_V4SF 327) ++ (UNSPEC_VABSDUB 328) ++ (UNSPEC_VABSDUH 329) ++ (UNSPEC_VABSDUW 330) + ]) + + (define_constants +@@ -323,6 +341,34 @@ + + ;; Simple binary operations. + ++;; absd ++(define_insn "altivec_vabsduw" ++ [(set (match_operand:V4SI 0 "register_operand" "=v") ++ (unspec:V4SI [(match_operand:V4SI 1 "register_operand" "v") ++ (match_operand:V4SI 2 "register_operand" "v")] ++ UNSPEC_VABSDUW))] ++ "TARGET_ALTIVEC2" ++ "vabsduw %0,%1,%2" ++ [(set_attr "type" "vecsimple")]) ++ ++(define_insn "altivec_vabsduh" ++ [(set (match_operand:V8HI 0 "register_operand" "=v") ++ (unspec:V8HI [(match_operand:V8HI 1 "register_operand" "v") ++ (match_operand:V8HI 2 "register_operand" "v")] ++ UNSPEC_VABSDUH))] ++ "TARGET_ALTIVEC2" ++ "vabsduh %0,%1,%2" ++ [(set_attr "type" "vecsimple")]) ++ ++(define_insn "altivec_vabsdub" ++ [(set (match_operand:V16QI 0 "register_operand" "=v") ++ (unspec:V16QI [(match_operand:V16QI 1 "register_operand" "v") ++ (match_operand:V16QI 2 "register_operand" "v")] ++ UNSPEC_VABSDUB))] ++ "TARGET_ALTIVEC2" ++ "vabsdub %0,%1,%2" ++ [(set_attr "type" "vecsimple")]) ++ + ;; add + (define_insn "add3" + [(set (match_operand:VI 0 "register_operand" "=v") +@@ -1741,6 +1787,15 @@ + "lvewx %0,%y1" + [(set_attr "type" "vecload")]) + ++(define_insn "altivec_lvexx" ++ [(parallel ++ [(set (match_operand:VI 0 "register_operand" "=v") ++ (match_operand:VI 1 "memory_operand" "Z")) ++ (unspec [(const_int 0)] UNSPEC_LVEX)])] ++ "TARGET_ALTIVEC2" ++ "lvexx %0,%y1" ++ [(set_attr "type" "vecload")]) ++ + (define_insn "altivec_lvxl" + [(parallel + [(set (match_operand:V4SI 0 "register_operand" "=v") +@@ -1791,6 +1846,13 @@ + "stvewx %1,%y0" + [(set_attr "type" "vecstore")]) + ++(define_insn "altivec_stvexx" ++ [(set (match_operand: 0 "memory_operand" "=Z") ++ (unspec: [(match_operand:VI 1 "register_operand" "v")] UNSPEC_STVEX))] ++ "TARGET_ALTIVEC2" ++ "stvexx %1,%y0" ++ [(set_attr "type" "vecstore")]) ++ + ;; Generate + ;; vspltis? SCRATCH0,0 + ;; vsubu?m SCRATCH2,SCRATCH1,%1 +@@ -2358,7 +2420,7 @@ + DONE; + }") + +-;; Vector SIMD PEM v2.06c defines LVLX, LVLXL, LVRX, LVRXL, ++;; Vector SIMD PEM v2.06c defines LVLX, LVLXL, LVRX1, LVRXL, + ;; STVLX, STVLXL, STVVRX, STVRXL are available only on Cell. + (define_insn "altivec_lvlx" + [(set (match_operand:V16QI 0 "register_operand" "=v") +@@ -2394,8 +2456,8 @@ + + (define_insn "altivec_stvlx" + [(parallel +- [(set (match_operand:V4SI 0 "memory_operand" "=Z") +- (match_operand:V4SI 1 "register_operand" "v")) ++ [(set (match_operand:V16QI 0 "memory_operand" "=Z") ++ (match_operand:V16QI 1 "register_operand" "v")) + (unspec [(const_int 0)] UNSPEC_STVLX)])] + "TARGET_ALTIVEC && rs6000_cpu == PROCESSOR_CELL" + "stvlx %1,%y0" +@@ -2403,8 +2465,8 @@ + + (define_insn "altivec_stvlxl" + [(parallel +- [(set (match_operand:V4SI 0 "memory_operand" "=Z") +- (match_operand:V4SI 1 "register_operand" "v")) ++ [(set (match_operand:V16QI 0 "memory_operand" "=Z") ++ (match_operand:V16QI 1 "register_operand" "v")) + (unspec [(const_int 0)] UNSPEC_STVLXL)])] + "TARGET_ALTIVEC && rs6000_cpu == PROCESSOR_CELL" + "stvlxl %1,%y0" +@@ -2412,8 +2474,8 @@ + + (define_insn "altivec_stvrx" + [(parallel +- [(set (match_operand:V4SI 0 "memory_operand" "=Z") +- (match_operand:V4SI 1 "register_operand" "v")) ++ [(set (match_operand:V16QI 0 "memory_operand" "=Z") ++ (match_operand:V16QI 1 "register_operand" "v")) + (unspec [(const_int 0)] UNSPEC_STVRX)])] + "TARGET_ALTIVEC && rs6000_cpu == PROCESSOR_CELL" + "stvrx %1,%y0" +@@ -2421,13 +2483,123 @@ + + (define_insn "altivec_stvrxl" + [(parallel +- [(set (match_operand:V4SI 0 "memory_operand" "=Z") +- (match_operand:V4SI 1 "register_operand" "v")) ++ [(set (match_operand:V16QI 0 "memory_operand" "=Z") ++ (match_operand:V16QI 1 "register_operand" "v")) + (unspec [(const_int 0)] UNSPEC_STVRXL)])] + "TARGET_ALTIVEC && rs6000_cpu == PROCESSOR_CELL" + "stvrxl %1,%y0" + [(set_attr "type" "vecstore")]) + ++(define_insn "altivec_lvtlx" ++ [(set (match_operand:V16QI 0 "register_operand" "=v") ++ (unspec:V16QI [(match_operand 1 "memory_operand" "Z")] ++ UNSPEC_LVTLX))] ++ "TARGET_ALTIVEC2" ++ "lvtlx %0,%y1" ++ [(set_attr "type" "vecload")]) ++ ++(define_insn "altivec_lvtlxl" ++ [(set (match_operand:V16QI 0 "register_operand" "=v") ++ (unspec:V16QI [(match_operand 1 "memory_operand" "Z")] ++ UNSPEC_LVTLXL))] ++ "TARGET_ALTIVEC2" ++ "lvtlxl %0,%y1" ++ [(set_attr "type" "vecload")]) ++ ++(define_insn "altivec_lvtrx" ++ [(set (match_operand:V16QI 0 "register_operand" "=v") ++ (unspec:V16QI [(match_operand 1 "memory_operand" "Z")] ++ UNSPEC_LVTRX))] ++ "TARGET_ALTIVEC2" ++ "lvtrx %0,%y1" ++ [(set_attr "type" "vecload")]) ++ ++(define_insn "altivec_lvtrxl" ++ [(set (match_operand:V16QI 0 "register_operand" "=v") ++ (unspec:V16QI [(match_operand 1 "memory_operand" "Z")] ++ UNSPEC_LVTRXL))] ++ "TARGET_ALTIVEC2" ++ "lvtrxl %0,%y1" ++ [(set_attr "type" "vecload")]) ++ ++(define_insn "altivec_stvflx" ++ [(parallel ++ [(set (match_operand:V16QI 0 "memory_operand" "=Z") ++ (match_operand:V16QI 1 "register_operand" "v")) ++ (unspec [(const_int 0)] UNSPEC_STVFLX)])] ++ "TARGET_ALTIVEC2" ++ "stvflx %1,%y0" ++ [(set_attr "type" "vecstore")]) ++ ++(define_insn "altivec_stvflxl" ++ [(parallel ++ [(set (match_operand:V16QI 0 "memory_operand" "=Z") ++ (match_operand:V16QI 1 "register_operand" "v")) ++ (unspec [(const_int 0)] UNSPEC_STVFLXL)])] ++ "TARGET_ALTIVEC2" ++ "stvflxl %1,%y0" ++ [(set_attr "type" "vecstore")]) ++ ++(define_insn "altivec_stvfrx" ++ [(parallel ++ [(set (match_operand:V16QI 0 "memory_operand" "=Z") ++ (match_operand:V16QI 1 "register_operand" "v")) ++ (unspec [(const_int 0)] UNSPEC_STVFRX)])] ++ "TARGET_ALTIVEC2" ++ "stvfrx %1,%y0" ++ [(set_attr "type" "vecstore")]) ++ ++(define_insn "altivec_stvfrxl" ++ [(parallel ++ [(set (match_operand:V16QI 0 "memory_operand" "=Z") ++ (match_operand:V16QI 1 "register_operand" "v")) ++ (unspec [(const_int 0)] UNSPEC_STVFRXL)])] ++ "TARGET_ALTIVEC2" ++ "stvfrxl %1,%y0" ++ [(set_attr "type" "vecstore")]) ++ ++(define_insn "altivec_lvswx" ++ [(set (match_operand:V16QI 0 "register_operand" "=v") ++ (unspec:V16QI [(match_operand 1 "memory_operand" "Z")] ++ UNSPEC_LVSWX))] ++ "TARGET_ALTIVEC2" ++ "lvswx %0,%y1" ++ [(set_attr "type" "vecload")]) ++ ++(define_insn "altivec_lvswxl" ++ [(set (match_operand:V16QI 0 "register_operand" "=v") ++ (unspec:V16QI [(match_operand 1 "memory_operand" "Z")] ++ UNSPEC_LVSWXL))] ++ "TARGET_ALTIVEC2" ++ "lvswxl %0,%y1" ++ [(set_attr "type" "vecload")]) ++ ++(define_insn "altivec_lvsm" ++ [(set (match_operand:V16QI 0 "register_operand" "=v") ++ (unspec:V16QI [(match_operand 1 "memory_operand" "Z")] ++ UNSPEC_LVSM))] ++ "TARGET_ALTIVEC2" ++ "lvsm %0,%y1" ++ [(set_attr "type" "vecload")]) ++ ++(define_insn "altivec_stvswx" ++ [(parallel ++ [(set (match_operand:V16QI 0 "memory_operand" "=Z") ++ (match_operand:V16QI 1 "register_operand" "v")) ++ (unspec [(const_int 0)] UNSPEC_STVSWX)])] ++ "TARGET_ALTIVEC2" ++ "stvswx %1,%y0" ++ [(set_attr "type" "vecstore")]) ++ ++(define_insn "altivec_stvswxl" ++ [(parallel ++ [(set (match_operand:V16QI 0 "memory_operand" "=Z") ++ (match_operand:V16QI 1 "register_operand" "v")) ++ (unspec [(const_int 0)] UNSPEC_STVSWXL)])] ++ "TARGET_ALTIVEC2" ++ "stvswxl %1,%y0" ++ [(set_attr "type" "vecstore")]) ++ + (define_expand "vec_extract_evenv4si" + [(set (match_operand:V4SI 0 "register_operand" "") + (unspec:V4SI [(match_operand:V4SI 1 "register_operand" "") +diff -ruN gcc-4.6.2-orig/gcc/config/rs6000/e5500.md gcc-4.6.2/gcc/config/rs6000/e5500.md +--- gcc-4.6.2-orig/gcc/config/rs6000/e5500.md 1969-12-31 18:00:00.000000000 -0600 ++++ gcc-4.6.2/gcc/config/rs6000/e5500.md 2012-03-06 12:16:07.590039001 -0600 +@@ -0,0 +1,176 @@ ++;; Pipeline description for Freescale PowerPC e5500 core. ++;; Copyright (C) 2011 Free Software Foundation, Inc. ++;; Contributed by Edmar Wienskoski (edmar@freescale.com) ++;; ++;; This file is part of GCC. ++;; ++;; GCC 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. ++;; ++;; GCC 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 GCC; see the file COPYING3. If not see ++;; . ++;; ++;; e5500 64-bit SFX(2), CFX, LSU, FPU, BU ++;; Max issue 3 insns/clock cycle (includes 1 branch) ++ ++(define_automaton "e5500_most,e5500_long") ++(define_cpu_unit "e5500_decode_0,e5500_decode_1" "e5500_most") ++ ++;; SFX. ++(define_cpu_unit "e5500_sfx_0,e5500_sfx_1" "e5500_most") ++ ++;; CFX. ++(define_cpu_unit "e5500_cfx_stage0,e5500_cfx_stage1" "e5500_most") ++ ++;; Non-pipelined division. ++(define_cpu_unit "e5500_cfx_div" "e5500_long") ++ ++;; LSU. ++(define_cpu_unit "e5500_lsu" "e5500_most") ++ ++;; FPU. ++(define_cpu_unit "e5500_fpu" "e5500_long") ++ ++;; BU. ++(define_cpu_unit "e5500_bu" "e5500_most") ++ ++;; The following units are used to make the automata deterministic. ++(define_cpu_unit "present_e5500_decode_0" "e5500_most") ++(define_cpu_unit "present_e5500_sfx_0" "e5500_most") ++(presence_set "present_e5500_decode_0" "e5500_decode_0") ++(presence_set "present_e5500_sfx_0" "e5500_sfx_0") ++ ++;; Some useful abbreviations. ++(define_reservation "e5500_decode" ++ "e5500_decode_0|e5500_decode_1+present_e5500_decode_0") ++(define_reservation "e5500_sfx" ++ "e5500_sfx_0|e5500_sfx_1+present_e5500_sfx_0") ++ ++;; SFX. ++(define_insn_reservation "e5500_sfx" 1 ++ (and (eq_attr "type" "integer,insert_word,insert_dword,delayed_compare,\ ++ shift,cntlz,exts") ++ (eq_attr "cpu" "ppce5500")) ++ "e5500_decode,e5500_sfx") ++ ++(define_insn_reservation "e5500_sfx2" 2 ++ (and (eq_attr "type" "cmp,compare,fast_compare,trap") ++ (eq_attr "cpu" "ppce5500")) ++ "e5500_decode,e5500_sfx") ++ ++(define_insn_reservation "e5500_delayed" 2 ++ (and (eq_attr "type" "var_shift_rotate,var_delayed_compare,popcnt") ++ (eq_attr "cpu" "ppce5500")) ++ "e5500_decode,e5500_sfx*2") ++ ++(define_insn_reservation "e5500_two" 2 ++ (and (eq_attr "type" "two") ++ (eq_attr "cpu" "ppce5500")) ++ "e5500_decode,e5500_decode+e5500_sfx,e5500_sfx") ++ ++(define_insn_reservation "e5500_three" 3 ++ (and (eq_attr "type" "three") ++ (eq_attr "cpu" "ppce5500")) ++ "e5500_decode,(e5500_decode+e5500_sfx)*2,e5500_sfx") ++ ++;; SFX - Mfcr. ++(define_insn_reservation "e5500_mfcr" 4 ++ (and (eq_attr "type" "mfcr") ++ (eq_attr "cpu" "ppce5500")) ++ "e5500_decode,e5500_sfx_0*4") ++ ++;; SFX - Mtcrf. ++(define_insn_reservation "e5500_mtcrf" 1 ++ (and (eq_attr "type" "mtcr") ++ (eq_attr "cpu" "ppce5500")) ++ "e5500_decode,e5500_sfx_0") ++ ++;; SFX - Mtjmpr. ++(define_insn_reservation "e5500_mtjmpr" 1 ++ (and (eq_attr "type" "mtjmpr,mfjmpr") ++ (eq_attr "cpu" "ppce5500")) ++ "e5500_decode,e5500_sfx") ++ ++;; CFX - Multiply. ++(define_insn_reservation "e5500_multiply" 4 ++ (and (eq_attr "type" "imul") ++ (eq_attr "cpu" "ppce5500")) ++ "e5500_decode,e5500_cfx_stage0,e5500_cfx_stage1") ++ ++(define_insn_reservation "e5500_multiply_i" 5 ++ (and (eq_attr "type" "imul2,imul3,imul_compare") ++ (eq_attr "cpu" "ppce5500")) ++ "e5500_decode,e5500_cfx_stage0,\ ++ e5500_cfx_stage0+e5500_cfx_stage1,e5500_cfx_stage1") ++ ++;; CFX - Divide. ++(define_insn_reservation "e5500_divide" 16 ++ (and (eq_attr "type" "idiv") ++ (eq_attr "cpu" "ppce5500")) ++ "e5500_decode,e5500_cfx_stage0+e5500_cfx_div,\ ++ e5500_cfx_div*15") ++ ++(define_insn_reservation "e5500_divide_d" 26 ++ (and (eq_attr "type" "ldiv") ++ (eq_attr "cpu" "ppce5500")) ++ "e5500_decode,e5500_cfx_stage0+e5500_cfx_div,\ ++ e5500_cfx_div*25") ++ ++;; LSU - Loads. ++(define_insn_reservation "e5500_load" 3 ++ (and (eq_attr "type" "load,load_ext,load_ext_u,load_ext_ux,load_ux,load_u,\ ++ load_l,sync") ++ (eq_attr "cpu" "ppce5500")) ++ "e5500_decode,e5500_lsu") ++ ++(define_insn_reservation "e5500_fpload" 4 ++ (and (eq_attr "type" "fpload,fpload_ux,fpload_u") ++ (eq_attr "cpu" "ppce5500")) ++ "e5500_decode,e5500_lsu") ++ ++;; LSU - Stores. ++(define_insn_reservation "e5500_store" 3 ++ (and (eq_attr "type" "store,store_ux,store_u,store_c") ++ (eq_attr "cpu" "ppce5500")) ++ "e5500_decode,e5500_lsu") ++ ++(define_insn_reservation "e5500_fpstore" 3 ++ (and (eq_attr "type" "fpstore,fpstore_ux,fpstore_u") ++ (eq_attr "cpu" "ppce5500")) ++ "e5500_decode,e5500_lsu") ++ ++;; FP. ++(define_insn_reservation "e5500_float" 7 ++ (and (eq_attr "type" "fpsimple,fp,fpcompare,dmul") ++ (eq_attr "cpu" "ppce5500")) ++ "e5500_decode,e5500_fpu") ++ ++(define_insn_reservation "e5500_sdiv" 20 ++ (and (eq_attr "type" "sdiv") ++ (eq_attr "cpu" "ppce5500")) ++ "e5500_decode,e5500_fpu*20") ++ ++(define_insn_reservation "e5500_ddiv" 35 ++ (and (eq_attr "type" "ddiv") ++ (eq_attr "cpu" "ppce5500")) ++ "e5500_decode,e5500_fpu*35") ++ ++;; BU. ++(define_insn_reservation "e5500_branch" 1 ++ (and (eq_attr "type" "jmpreg,branch,isync") ++ (eq_attr "cpu" "ppce5500")) ++ "e5500_decode,e5500_bu") ++ ++;; BU - CR logical. ++(define_insn_reservation "e5500_cr_logical" 1 ++ (and (eq_attr "type" "cr_logical,delayed_cr") ++ (eq_attr "cpu" "ppce5500")) ++ "e5500_decode,e5500_bu") +diff -ruN gcc-4.6.2-orig/gcc/config/rs6000/e6500.md gcc-4.6.2/gcc/config/rs6000/e6500.md +--- gcc-4.6.2-orig/gcc/config/rs6000/e6500.md 1969-12-31 18:00:00.000000000 -0600 ++++ gcc-4.6.2/gcc/config/rs6000/e6500.md 2012-03-06 12:16:25.573039002 -0600 +@@ -0,0 +1,213 @@ ++;; Pipeline description for Freescale PowerPC e6500 core. ++;; Copyright (C) 2011 Free Software Foundation, Inc. ++;; Contributed by Edmar Wienskoski (edmar@freescale.com) ++;; ++;; This file is part of GCC. ++;; ++;; GCC 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. ++;; ++;; GCC 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 GCC; see the file COPYING3. If not see ++;; . ++;; ++;; e6500 64-bit SFX(2), CFX, LSU, FPU, BU, VSFX, VCFX, VFPU, VPERM ++;; Max issue 3 insns/clock cycle (includes 1 branch) ++ ++(define_automaton "e6500_most,e6500_long,e6500_vec") ++(define_cpu_unit "e6500_decode_0,e6500_decode_1" "e6500_most") ++ ++;; SFX. ++(define_cpu_unit "e6500_sfx_0,e6500_sfx_1" "e6500_most") ++ ++;; CFX. ++(define_cpu_unit "e6500_cfx_stage0,e6500_cfx_stage1" "e6500_most") ++ ++;; Non-pipelined division. ++(define_cpu_unit "e6500_cfx_div" "e6500_long") ++ ++;; LSU. ++(define_cpu_unit "e6500_lsu" "e6500_most") ++ ++;; FPU. ++(define_cpu_unit "e6500_fpu" "e6500_long") ++ ++;; BU. ++(define_cpu_unit "e6500_bu" "e6500_most") ++ ++;; Altivec unit ++(define_cpu_unit "e6500_vec,e6500_vecperm" "e6500_vec") ++ ++;; The following units are used to make the automata deterministic. ++(define_cpu_unit "present_e6500_decode_0" "e6500_most") ++(define_cpu_unit "present_e6500_sfx_0" "e6500_most") ++(presence_set "present_e6500_decode_0" "e6500_decode_0") ++(presence_set "present_e6500_sfx_0" "e6500_sfx_0") ++ ++;; Some useful abbreviations. ++(define_reservation "e6500_decode" ++ "e6500_decode_0|e6500_decode_1+present_e6500_decode_0") ++(define_reservation "e6500_sfx" ++ "e6500_sfx_0|e6500_sfx_1+present_e6500_sfx_0") ++ ++;; SFX. ++(define_insn_reservation "e6500_sfx" 1 ++ (and (eq_attr "type" "integer,insert_word,insert_dword,delayed_compare,\ ++ shift,cntlz,exts") ++ (eq_attr "cpu" "ppce6500")) ++ "e6500_decode,e6500_sfx") ++ ++(define_insn_reservation "e6500_sfx2" 2 ++ (and (eq_attr "type" "cmp,compare,fast_compare,trap") ++ (eq_attr "cpu" "ppce6500")) ++ "e6500_decode,e6500_sfx") ++ ++(define_insn_reservation "e6500_delayed" 2 ++ (and (eq_attr "type" "var_shift_rotate,var_delayed_compare,popcnt") ++ (eq_attr "cpu" "ppce6500")) ++ "e6500_decode,e6500_sfx*2") ++ ++(define_insn_reservation "e6500_two" 2 ++ (and (eq_attr "type" "two") ++ (eq_attr "cpu" "ppce6500")) ++ "e6500_decode,e6500_decode+e6500_sfx,e6500_sfx") ++ ++(define_insn_reservation "e6500_three" 3 ++ (and (eq_attr "type" "three") ++ (eq_attr "cpu" "ppce6500")) ++ "e6500_decode,(e6500_decode+e6500_sfx)*2,e6500_sfx") ++ ++;; SFX - Mfcr. ++(define_insn_reservation "e6500_mfcr" 4 ++ (and (eq_attr "type" "mfcr") ++ (eq_attr "cpu" "ppce6500")) ++ "e6500_decode,e6500_sfx_0*4") ++ ++;; SFX - Mtcrf. ++(define_insn_reservation "e6500_mtcrf" 1 ++ (and (eq_attr "type" "mtcr") ++ (eq_attr "cpu" "ppce6500")) ++ "e6500_decode,e6500_sfx_0") ++ ++;; SFX - Mtjmpr. ++(define_insn_reservation "e6500_mtjmpr" 1 ++ (and (eq_attr "type" "mtjmpr,mfjmpr") ++ (eq_attr "cpu" "ppce6500")) ++ "e6500_decode,e6500_sfx") ++ ++;; CFX - Multiply. ++(define_insn_reservation "e6500_multiply" 4 ++ (and (eq_attr "type" "imul") ++ (eq_attr "cpu" "ppce6500")) ++ "e6500_decode,e6500_cfx_stage0,e6500_cfx_stage1") ++ ++(define_insn_reservation "e6500_multiply_i" 5 ++ (and (eq_attr "type" "imul2,imul3,imul_compare") ++ (eq_attr "cpu" "ppce6500")) ++ "e6500_decode,e6500_cfx_stage0,\ ++ e6500_cfx_stage0+e6500_cfx_stage1,e6500_cfx_stage1") ++ ++;; CFX - Divide. ++(define_insn_reservation "e6500_divide" 16 ++ (and (eq_attr "type" "idiv") ++ (eq_attr "cpu" "ppce6500")) ++ "e6500_decode,e6500_cfx_stage0+e6500_cfx_div,\ ++ e6500_cfx_div*15") ++ ++(define_insn_reservation "e6500_divide_d" 26 ++ (and (eq_attr "type" "ldiv") ++ (eq_attr "cpu" "ppce6500")) ++ "e6500_decode,e6500_cfx_stage0+e6500_cfx_div,\ ++ e6500_cfx_div*25") ++ ++;; LSU - Loads. ++(define_insn_reservation "e6500_load" 3 ++ (and (eq_attr "type" "load,load_ext,load_ext_u,load_ext_ux,load_ux,load_u,\ ++ load_l,sync") ++ (eq_attr "cpu" "ppce6500")) ++ "e6500_decode,e6500_lsu") ++ ++(define_insn_reservation "e6500_fpload" 4 ++ (and (eq_attr "type" "fpload,fpload_ux,fpload_u") ++ (eq_attr "cpu" "ppce6500")) ++ "e6500_decode,e6500_lsu") ++ ++(define_insn_reservation "e6500_vecload" 4 ++ (and (eq_attr "type" "vecload") ++ (eq_attr "cpu" "ppce6500")) ++ "e6500_decode,e6500_lsu") ++ ++;; LSU - Stores. ++(define_insn_reservation "e6500_store" 3 ++ (and (eq_attr "type" "store,store_ux,store_u,store_c") ++ (eq_attr "cpu" "ppce6500")) ++ "e6500_decode,e6500_lsu") ++ ++(define_insn_reservation "e6500_fpstore" 3 ++ (and (eq_attr "type" "fpstore,fpstore_ux,fpstore_u") ++ (eq_attr "cpu" "ppce6500")) ++ "e6500_decode,e6500_lsu") ++ ++(define_insn_reservation "e6500_vecstore" 4 ++ (and (eq_attr "type" "vecstore") ++ (eq_attr "cpu" "ppce6500")) ++ "e6500_decode,e6500_lsu") ++ ++;; FP. ++(define_insn_reservation "e6500_float" 7 ++ (and (eq_attr "type" "fpsimple,fp,fpcompare,dmul") ++ (eq_attr "cpu" "ppce6500")) ++ "e6500_decode,e6500_fpu") ++ ++(define_insn_reservation "e6500_sdiv" 20 ++ (and (eq_attr "type" "sdiv") ++ (eq_attr "cpu" "ppce6500")) ++ "e6500_decode,e6500_fpu*20") ++ ++(define_insn_reservation "e6500_ddiv" 35 ++ (and (eq_attr "type" "ddiv") ++ (eq_attr "cpu" "ppce6500")) ++ "e6500_decode,e6500_fpu*35") ++ ++;; BU. ++(define_insn_reservation "e6500_branch" 1 ++ (and (eq_attr "type" "jmpreg,branch,isync") ++ (eq_attr "cpu" "ppce6500")) ++ "e6500_decode,e6500_bu") ++ ++;; BU - CR logical. ++(define_insn_reservation "e6500_cr_logical" 1 ++ (and (eq_attr "type" "cr_logical,delayed_cr") ++ (eq_attr "cpu" "ppce6500")) ++ "e6500_decode,e6500_bu") ++ ++;; VSFX. ++(define_insn_reservation "e6500_vecsimple" 1 ++ (and (eq_attr "type" "vecsimple,veccmp") ++ (eq_attr "cpu" "ppce6500")) ++ "e6500_decode,e6500_vec") ++ ++;; VCFX. ++(define_insn_reservation "e6500_veccomplex" 4 ++ (and (eq_attr "type" "veccomplex") ++ (eq_attr "cpu" "ppce6500")) ++ "e6500_decode,e6500_vec") ++ ++;; VFPU. ++(define_insn_reservation "e6500_vecfloat" 6 ++ (and (eq_attr "type" "vecfloat") ++ (eq_attr "cpu" "ppce6500")) ++ "e6500_decode,e6500_vec") ++ ++;; VPERM. ++(define_insn_reservation "e6500_vecperm" 2 ++ (and (eq_attr "type" "vecperm") ++ (eq_attr "cpu" "ppce6500")) ++ "e6500_decode,e6500_vecperm") +diff -ruN gcc-4.6.2-orig/gcc/config/rs6000/rs6000-builtin.def gcc-4.6.2/gcc/config/rs6000/rs6000-builtin.def +--- gcc-4.6.2-orig/gcc/config/rs6000/rs6000-builtin.def 2011-02-21 15:38:21.000000000 -0600 ++++ gcc-4.6.2/gcc/config/rs6000/rs6000-builtin.def 2012-03-06 12:37:40.248039025 -0600 +@@ -224,6 +224,9 @@ + RS6000_BUILTIN(ALTIVEC_BUILTIN_LVEBX, RS6000_BTC_MEM) + RS6000_BUILTIN(ALTIVEC_BUILTIN_LVEHX, RS6000_BTC_MEM) + RS6000_BUILTIN(ALTIVEC_BUILTIN_LVEWX, RS6000_BTC_MEM) ++RS6000_BUILTIN(ALTIVEC_BUILTIN_LVEXBX, RS6000_BTC_MEM) ++RS6000_BUILTIN(ALTIVEC_BUILTIN_LVEXHX, RS6000_BTC_MEM) ++RS6000_BUILTIN(ALTIVEC_BUILTIN_LVEXWX, RS6000_BTC_MEM) + RS6000_BUILTIN(ALTIVEC_BUILTIN_LVXL, RS6000_BTC_MEM) + RS6000_BUILTIN(ALTIVEC_BUILTIN_LVX, RS6000_BTC_MEM) + RS6000_BUILTIN(ALTIVEC_BUILTIN_STVX, RS6000_BTC_MEM) +@@ -231,14 +234,30 @@ + RS6000_BUILTIN(ALTIVEC_BUILTIN_LVLXL, RS6000_BTC_MEM) + RS6000_BUILTIN(ALTIVEC_BUILTIN_LVRX, RS6000_BTC_MEM) + RS6000_BUILTIN(ALTIVEC_BUILTIN_LVRXL, RS6000_BTC_MEM) ++RS6000_BUILTIN(ALTIVEC_BUILTIN_LVTLX, RS6000_BTC_MEM) ++RS6000_BUILTIN(ALTIVEC_BUILTIN_LVTLXL, RS6000_BTC_MEM) ++RS6000_BUILTIN(ALTIVEC_BUILTIN_LVTRX, RS6000_BTC_MEM) ++RS6000_BUILTIN(ALTIVEC_BUILTIN_LVTRXL, RS6000_BTC_MEM) ++RS6000_BUILTIN(ALTIVEC_BUILTIN_LVSWX, RS6000_BTC_MEM) ++RS6000_BUILTIN(ALTIVEC_BUILTIN_LVSWXL, RS6000_BTC_MEM) ++RS6000_BUILTIN(ALTIVEC_BUILTIN_LVSM, RS6000_BTC_MEM) + RS6000_BUILTIN(ALTIVEC_BUILTIN_STVEBX, RS6000_BTC_MEM) + RS6000_BUILTIN(ALTIVEC_BUILTIN_STVEHX, RS6000_BTC_MEM) + RS6000_BUILTIN(ALTIVEC_BUILTIN_STVEWX, RS6000_BTC_MEM) ++RS6000_BUILTIN(ALTIVEC_BUILTIN_STVEXBX, RS6000_BTC_MEM) ++RS6000_BUILTIN(ALTIVEC_BUILTIN_STVEXHX, RS6000_BTC_MEM) ++RS6000_BUILTIN(ALTIVEC_BUILTIN_STVEXWX, RS6000_BTC_MEM) + RS6000_BUILTIN(ALTIVEC_BUILTIN_STVXL, RS6000_BTC_MEM) + RS6000_BUILTIN(ALTIVEC_BUILTIN_STVLX, RS6000_BTC_MEM) + RS6000_BUILTIN(ALTIVEC_BUILTIN_STVLXL, RS6000_BTC_MEM) + RS6000_BUILTIN(ALTIVEC_BUILTIN_STVRX, RS6000_BTC_MEM) + RS6000_BUILTIN(ALTIVEC_BUILTIN_STVRXL, RS6000_BTC_MEM) ++RS6000_BUILTIN(ALTIVEC_BUILTIN_STVFLX, RS6000_BTC_MEM) ++RS6000_BUILTIN(ALTIVEC_BUILTIN_STVFLXL, RS6000_BTC_MEM) ++RS6000_BUILTIN(ALTIVEC_BUILTIN_STVFRX, RS6000_BTC_MEM) ++RS6000_BUILTIN(ALTIVEC_BUILTIN_STVFRXL, RS6000_BTC_MEM) ++RS6000_BUILTIN(ALTIVEC_BUILTIN_STVSWX, RS6000_BTC_MEM) ++RS6000_BUILTIN(ALTIVEC_BUILTIN_STVSWXL, RS6000_BTC_MEM) + RS6000_BUILTIN(ALTIVEC_BUILTIN_VCMPBFP_P, RS6000_BTC_FP_PURE) + RS6000_BUILTIN(ALTIVEC_BUILTIN_VCMPEQFP_P, RS6000_BTC_FP_PURE) + RS6000_BUILTIN(ALTIVEC_BUILTIN_VCMPEQUB_P, RS6000_BTC_CONST) +@@ -275,6 +294,9 @@ + RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_EXT_V4SF, RS6000_BTC_CONST) + RS6000_BUILTIN(ALTIVEC_BUILTIN_COPYSIGN_V4SF, RS6000_BTC_CONST) + RS6000_BUILTIN(ALTIVEC_BUILTIN_VRECIPFP, RS6000_BTC_FP_PURE) ++RS6000_BUILTIN(ALTIVEC_BUILTIN_ABSDUB, RS6000_BTC_CONST) ++RS6000_BUILTIN(ALTIVEC_BUILTIN_ABSDUH, RS6000_BTC_CONST) ++RS6000_BUILTIN(ALTIVEC_BUILTIN_ABSDUW, RS6000_BTC_CONST) + + /* Altivec overloaded builtins. */ + /* For now, don't set the classification for overloaded functions. +@@ -286,6 +308,7 @@ + RS6000_BUILTIN(ALTIVEC_BUILTIN_VCMPGT_P, RS6000_BTC_MISC) + RS6000_BUILTIN(ALTIVEC_BUILTIN_VCMPGE_P, RS6000_BTC_MISC) + RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_ABS, RS6000_BTC_MISC) ++RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_ABSD, RS6000_BTC_MISC) + RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_ABSS, RS6000_BTC_MISC) + RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_ADD, RS6000_BTC_MISC) + RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_ADDC, RS6000_BTC_MISC) +@@ -321,10 +344,20 @@ + RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_LVEBX, RS6000_BTC_MISC) + RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_LVEHX, RS6000_BTC_MISC) + RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_LVEWX, RS6000_BTC_MISC) ++RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_LVEXBX, RS6000_BTC_MISC) ++RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_LVEXHX, RS6000_BTC_MISC) ++RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_LVEXWX, RS6000_BTC_MISC) + RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_LVLX, RS6000_BTC_MISC) + RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_LVLXL, RS6000_BTC_MISC) + RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_LVRX, RS6000_BTC_MISC) + RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_LVRXL, RS6000_BTC_MISC) ++RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_LVTLX, RS6000_BTC_MISC) ++RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_LVTLXL, RS6000_BTC_MISC) ++RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_LVTRX, RS6000_BTC_MISC) ++RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_LVTRXL, RS6000_BTC_MISC) ++RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_LVSWX, RS6000_BTC_MISC) ++RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_LVSWXL, RS6000_BTC_MISC) ++RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_LVSM, RS6000_BTC_MISC) + RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_LVSL, RS6000_BTC_MISC) + RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_LVSR, RS6000_BTC_MISC) + RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_MADD, RS6000_BTC_MISC) +@@ -389,10 +422,19 @@ + RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_STVEBX, RS6000_BTC_MISC) + RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_STVEHX, RS6000_BTC_MISC) + RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_STVEWX, RS6000_BTC_MISC) ++RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_STVEXBX, RS6000_BTC_MISC) ++RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_STVEXHX, RS6000_BTC_MISC) ++RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_STVEXWX, RS6000_BTC_MISC) + RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_STVLX, RS6000_BTC_MISC) + RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_STVLXL, RS6000_BTC_MISC) + RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_STVRX, RS6000_BTC_MISC) + RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_STVRXL, RS6000_BTC_MISC) ++RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_STVFLX, RS6000_BTC_MISC) ++RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_STVFLXL, RS6000_BTC_MISC) ++RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_STVFRX, RS6000_BTC_MISC) ++RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_STVFRXL, RS6000_BTC_MISC) ++RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_STVSWX, RS6000_BTC_MISC) ++RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_STVSWXL, RS6000_BTC_MISC) + RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_SUB, RS6000_BTC_MISC) + RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_SUBC, RS6000_BTC_MISC) + RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_SUBS, RS6000_BTC_MISC) +diff -ruN gcc-4.6.2-orig/gcc/config/rs6000/rs6000.c gcc-4.6.2/gcc/config/rs6000/rs6000.c +--- gcc-4.6.2-orig/gcc/config/rs6000/rs6000.c 2011-09-18 17:01:56.000000000 -0500 ++++ gcc-4.6.2/gcc/config/rs6000/rs6000.c 2012-03-06 12:44:04.689039002 -0600 +@@ -779,6 +779,44 @@ + 1, /* prefetch streams /*/ + }; + ++/* Instruction costs on PPCE5500 processors. */ ++static const ++struct processor_costs ppce5500_cost = { ++ COSTS_N_INSNS (5), /* mulsi */ ++ COSTS_N_INSNS (5), /* mulsi_const */ ++ COSTS_N_INSNS (5), /* mulsi_const9 */ ++ COSTS_N_INSNS (5), /* muldi */ ++ COSTS_N_INSNS (14), /* divsi */ ++ COSTS_N_INSNS (14), /* divdi */ ++ COSTS_N_INSNS (7), /* fp */ ++ COSTS_N_INSNS (10), /* dmul */ ++ COSTS_N_INSNS (36), /* sdiv */ ++ COSTS_N_INSNS (66), /* ddiv */ ++ 64, /* cache line size */ ++ 32, /* l1 cache */ ++ 128, /* l2 cache */ ++ 1, /* prefetch streams /*/ ++}; ++ ++/* Instruction costs on PPCE6500 processors. */ ++static const ++struct processor_costs ppce6500_cost = { ++ COSTS_N_INSNS (5), /* mulsi */ ++ COSTS_N_INSNS (5), /* mulsi_const */ ++ COSTS_N_INSNS (5), /* mulsi_const9 */ ++ COSTS_N_INSNS (5), /* muldi */ ++ COSTS_N_INSNS (14), /* divsi */ ++ COSTS_N_INSNS (14), /* divdi */ ++ COSTS_N_INSNS (7), /* fp */ ++ COSTS_N_INSNS (10), /* dmul */ ++ COSTS_N_INSNS (36), /* sdiv */ ++ COSTS_N_INSNS (66), /* ddiv */ ++ 64, /* cache line size */ ++ 32, /* l1 cache */ ++ 128, /* l2 cache */ ++ 1, /* prefetch streams /*/ ++}; ++ + /* Instruction costs on AppliedMicro Titan processors. */ + static const + struct processor_costs titan_cost = { +@@ -1690,7 +1728,7 @@ + | MASK_MFCRF | MASK_POPCNTB | MASK_FPRND | MASK_MULHW + | MASK_DLMZB | MASK_CMPB | MASK_MFPGPR | MASK_DFP + | MASK_POPCNTD | MASK_VSX | MASK_ISEL | MASK_NO_UPDATE +- | MASK_RECIP_PRECISION) ++ | MASK_RECIP_PRECISION | MASK_ALTIVEC2) + }; + + /* Masks for instructions set at various powerpc ISAs. */ +@@ -1785,6 +1823,12 @@ + | MASK_ISEL}, + {"e500mc64", PROCESSOR_PPCE500MC64, POWERPC_BASE_MASK | MASK_POWERPC64 + | MASK_PPC_GFXOPT | MASK_ISEL}, ++ {"e5500", PROCESSOR_PPCE5500, POWERPC_BASE_MASK | MASK_POWERPC64 ++ | MASK_PPC_GFXOPT | MASK_ISEL | MASK_CMPB | MASK_POPCNTB ++ | MASK_POPCNTD}, ++ {"e6500", PROCESSOR_PPCE6500, POWERPC_7400_MASK | MASK_POWERPC64 ++ | MASK_MFCRF | MASK_ISEL | MASK_CMPB | MASK_POPCNTB | MASK_POPCNTD ++ | MASK_ALTIVEC2}, + {"860", PROCESSOR_MPCCORE, POWERPC_BASE_MASK | MASK_SOFT_FLOAT}, + {"970", PROCESSOR_POWER4, + POWERPC_7400_MASK | MASK_PPC_GPOPT | MASK_MFCRF | MASK_POWERPC64}, +@@ -2742,13 +2786,19 @@ + : PROCESSOR_DEFAULT)); + + if (rs6000_cpu == PROCESSOR_PPCE300C2 || rs6000_cpu == PROCESSOR_PPCE300C3 +- || rs6000_cpu == PROCESSOR_PPCE500MC || rs6000_cpu == PROCESSOR_PPCE500MC64) ++ || rs6000_cpu == PROCESSOR_PPCE500MC || rs6000_cpu == PROCESSOR_PPCE500MC64 ++ || rs6000_cpu == PROCESSOR_PPCE5500) + { + if (TARGET_ALTIVEC) + error ("AltiVec not supported in this target"); + if (TARGET_SPE) + error ("SPE not supported in this target"); + } ++ if (rs6000_cpu == PROCESSOR_PPCE6500) ++ { ++ if (TARGET_SPE) ++ error ("SPE not supported in this target"); ++ } + + /* Disable Cell microcode if we are optimizing for the Cell + and not optimizing for size. */ +@@ -2843,9 +2893,16 @@ + user's opinion, though. */ + if (rs6000_block_move_inline_limit == 0 + && (rs6000_cpu == PROCESSOR_PPCE500MC +- || rs6000_cpu == PROCESSOR_PPCE500MC64)) ++ || rs6000_cpu == PROCESSOR_PPCE500MC64 ++ || rs6000_cpu == PROCESSOR_PPCE5500 ++ || rs6000_cpu == PROCESSOR_PPCE6500)) + rs6000_block_move_inline_limit = 128; + ++ /* Those machines does not have fsqrt instruction */ ++ if (rs6000_cpu == PROCESSOR_PPCE5500 ++ || rs6000_cpu == PROCESSOR_PPCE6500) ++ target_flags &= ~MASK_PPC_GPOPT; ++ + /* store_one_arg depends on expand_block_move to handle at least the + size of reg_parm_stack_space. */ + if (rs6000_block_move_inline_limit < (TARGET_POWERPC64 ? 64 : 32)) +@@ -2977,7 +3034,9 @@ + #endif + + if (TARGET_E500 || rs6000_cpu == PROCESSOR_PPCE500MC +- || rs6000_cpu == PROCESSOR_PPCE500MC64) ++ || rs6000_cpu == PROCESSOR_PPCE500MC64 ++ || rs6000_cpu == PROCESSOR_PPCE5500 ++ || rs6000_cpu == PROCESSOR_PPCE6500) + { + /* The e500 and e500mc do not have string instructions, and we set + MASK_STRING above when optimizing for size. */ +@@ -3024,7 +3083,9 @@ + || rs6000_cpu == PROCESSOR_POWER6 + || rs6000_cpu == PROCESSOR_POWER7 + || rs6000_cpu == PROCESSOR_PPCE500MC +- || rs6000_cpu == PROCESSOR_PPCE500MC64); ++ || rs6000_cpu == PROCESSOR_PPCE500MC64 ++ || rs6000_cpu == PROCESSOR_PPCE5500 ++ || rs6000_cpu == PROCESSOR_PPCE6500); + + /* Allow debug switches to override the above settings. These are set to -1 + in rs6000.opt to indicate the user hasn't directly set the switch. */ +@@ -3246,6 +3307,14 @@ + rs6000_cost = &ppce500mc64_cost; + break; + ++ case PROCESSOR_PPCE5500: ++ rs6000_cost = &ppce5500_cost; ++ break; ++ ++ case PROCESSOR_PPCE6500: ++ rs6000_cost = &ppce6500_cost; ++ break; ++ + case PROCESSOR_TITAN: + rs6000_cost = &titan_cost; + break; +@@ -10212,6 +10281,9 @@ + { MASK_ALTIVEC, CODE_FOR_addv8hi3, "__builtin_altivec_vadduhm", ALTIVEC_BUILTIN_VADDUHM }, + { MASK_ALTIVEC, CODE_FOR_addv4si3, "__builtin_altivec_vadduwm", ALTIVEC_BUILTIN_VADDUWM }, + { MASK_ALTIVEC, CODE_FOR_addv4sf3, "__builtin_altivec_vaddfp", ALTIVEC_BUILTIN_VADDFP }, ++ { MASK_ALTIVEC2, CODE_FOR_altivec_vabsdub, "__builtin_altivec_vabsdub", ALTIVEC_BUILTIN_ABSDUB }, ++ { MASK_ALTIVEC2, CODE_FOR_altivec_vabsduh, "__builtin_altivec_vabsduh", ALTIVEC_BUILTIN_ABSDUH }, ++ { MASK_ALTIVEC2, CODE_FOR_altivec_vabsduw, "__builtin_altivec_vabsduw", ALTIVEC_BUILTIN_ABSDUW }, + { MASK_ALTIVEC, CODE_FOR_altivec_vaddcuw, "__builtin_altivec_vaddcuw", ALTIVEC_BUILTIN_VADDCUW }, + { MASK_ALTIVEC, CODE_FOR_altivec_vaddubs, "__builtin_altivec_vaddubs", ALTIVEC_BUILTIN_VADDUBS }, + { MASK_ALTIVEC, CODE_FOR_altivec_vaddsbs, "__builtin_altivec_vaddsbs", ALTIVEC_BUILTIN_VADDSBS }, +@@ -10372,6 +10444,7 @@ + { MASK_VSX, CODE_FOR_vec_interleave_highv2df, "__builtin_vsx_mergeh_2df", VSX_BUILTIN_VEC_MERGEH_V2DF }, + { MASK_VSX, CODE_FOR_vec_interleave_highv2di, "__builtin_vsx_mergeh_2di", VSX_BUILTIN_VEC_MERGEH_V2DI }, + ++ { MASK_ALTIVEC2, CODE_FOR_nothing, "__builtin_vec_absd", ALTIVEC_BUILTIN_VEC_ABSD }, + { MASK_ALTIVEC|MASK_VSX, CODE_FOR_nothing, "__builtin_vec_add", ALTIVEC_BUILTIN_VEC_ADD }, + { MASK_ALTIVEC|MASK_VSX, CODE_FOR_nothing, "__builtin_vec_vaddfp", ALTIVEC_BUILTIN_VEC_VADDFP }, + { MASK_ALTIVEC, CODE_FOR_nothing, "__builtin_vec_vadduwm", ALTIVEC_BUILTIN_VEC_VADDUWM }, +@@ -11803,6 +11876,12 @@ + return altivec_expand_stv_builtin (CODE_FOR_altivec_stvehx, exp); + case ALTIVEC_BUILTIN_STVEWX: + return altivec_expand_stv_builtin (CODE_FOR_altivec_stvewx, exp); ++ case ALTIVEC_BUILTIN_STVEXBX: ++ return altivec_expand_stv_builtin (CODE_FOR_altivec_stvexbx, exp); ++ case ALTIVEC_BUILTIN_STVEXHX: ++ return altivec_expand_stv_builtin (CODE_FOR_altivec_stvexhx, exp); ++ case ALTIVEC_BUILTIN_STVEXWX: ++ return altivec_expand_stv_builtin (CODE_FOR_altivec_stvexwx, exp); + case ALTIVEC_BUILTIN_STVXL: + return altivec_expand_stv_builtin (CODE_FOR_altivec_stvxl, exp); + +@@ -11814,6 +11893,18 @@ + return altivec_expand_stv_builtin (CODE_FOR_altivec_stvrx, exp); + case ALTIVEC_BUILTIN_STVRXL: + return altivec_expand_stv_builtin (CODE_FOR_altivec_stvrxl, exp); ++ case ALTIVEC_BUILTIN_STVFLX: ++ return altivec_expand_stv_builtin (CODE_FOR_altivec_stvflx, exp); ++ case ALTIVEC_BUILTIN_STVFLXL: ++ return altivec_expand_stv_builtin (CODE_FOR_altivec_stvflxl, exp); ++ case ALTIVEC_BUILTIN_STVFRX: ++ return altivec_expand_stv_builtin (CODE_FOR_altivec_stvfrx, exp); ++ case ALTIVEC_BUILTIN_STVFRXL: ++ return altivec_expand_stv_builtin (CODE_FOR_altivec_stvfrxl, exp); ++ case ALTIVEC_BUILTIN_STVSWX: ++ return altivec_expand_stv_builtin (CODE_FOR_altivec_stvswx, exp); ++ case ALTIVEC_BUILTIN_STVSWXL: ++ return altivec_expand_stv_builtin (CODE_FOR_altivec_stvswxl, exp); + + case VSX_BUILTIN_STXVD2X_V2DF: + return altivec_expand_stv_builtin (CODE_FOR_vsx_store_v2df, exp); +@@ -11948,6 +12039,15 @@ + case ALTIVEC_BUILTIN_LVEWX: + return altivec_expand_lv_builtin (CODE_FOR_altivec_lvewx, + exp, target, false); ++ case ALTIVEC_BUILTIN_LVEXBX: ++ return altivec_expand_lv_builtin (CODE_FOR_altivec_lvexbx, ++ exp, target, false); ++ case ALTIVEC_BUILTIN_LVEXHX: ++ return altivec_expand_lv_builtin (CODE_FOR_altivec_lvexhx, ++ exp, target, false); ++ case ALTIVEC_BUILTIN_LVEXWX: ++ return altivec_expand_lv_builtin (CODE_FOR_altivec_lvexwx, ++ exp, target, false); + case ALTIVEC_BUILTIN_LVXL: + return altivec_expand_lv_builtin (CODE_FOR_altivec_lvxl, + exp, target, false); +@@ -11966,6 +12066,27 @@ + case ALTIVEC_BUILTIN_LVRXL: + return altivec_expand_lv_builtin (CODE_FOR_altivec_lvrxl, + exp, target, true); ++ case ALTIVEC_BUILTIN_LVTLX: ++ return altivec_expand_lv_builtin (CODE_FOR_altivec_lvtlx, ++ exp, target, true); ++ case ALTIVEC_BUILTIN_LVTLXL: ++ return altivec_expand_lv_builtin (CODE_FOR_altivec_lvtlxl, ++ exp, target, true); ++ case ALTIVEC_BUILTIN_LVTRX: ++ return altivec_expand_lv_builtin (CODE_FOR_altivec_lvtrx, ++ exp, target, true); ++ case ALTIVEC_BUILTIN_LVTRXL: ++ return altivec_expand_lv_builtin (CODE_FOR_altivec_lvtrxl, ++ exp, target, true); ++ case ALTIVEC_BUILTIN_LVSWX: ++ return altivec_expand_lv_builtin (CODE_FOR_altivec_lvswx, ++ exp, target, true); ++ case ALTIVEC_BUILTIN_LVSWXL: ++ return altivec_expand_lv_builtin (CODE_FOR_altivec_lvswxl, ++ exp, target, true); ++ case ALTIVEC_BUILTIN_LVSM: ++ return altivec_expand_lv_builtin (CODE_FOR_altivec_lvsm, ++ exp, target, true); + case VSX_BUILTIN_LXVD2X_V2DF: + return altivec_expand_lv_builtin (CODE_FOR_vsx_load_v2df, + exp, target, false); +@@ -13278,6 +13399,9 @@ + def_builtin (MASK_ALTIVEC, "__builtin_altivec_lvebx", v16qi_ftype_long_pcvoid, ALTIVEC_BUILTIN_LVEBX); + def_builtin (MASK_ALTIVEC, "__builtin_altivec_lvehx", v8hi_ftype_long_pcvoid, ALTIVEC_BUILTIN_LVEHX); + def_builtin (MASK_ALTIVEC, "__builtin_altivec_lvewx", v4si_ftype_long_pcvoid, ALTIVEC_BUILTIN_LVEWX); ++ def_builtin (MASK_ALTIVEC2, "__builtin_altivec_lvexbx", v16qi_ftype_long_pcvoid, ALTIVEC_BUILTIN_LVEXBX); ++ def_builtin (MASK_ALTIVEC2, "__builtin_altivec_lvexhx", v8hi_ftype_long_pcvoid, ALTIVEC_BUILTIN_LVEXHX); ++ def_builtin (MASK_ALTIVEC2, "__builtin_altivec_lvexwx", v4si_ftype_long_pcvoid, ALTIVEC_BUILTIN_LVEXWX); + def_builtin (MASK_ALTIVEC, "__builtin_altivec_lvxl", v4si_ftype_long_pcvoid, ALTIVEC_BUILTIN_LVXL); + def_builtin (MASK_ALTIVEC, "__builtin_altivec_lvx", v4si_ftype_long_pcvoid, ALTIVEC_BUILTIN_LVX); + def_builtin (MASK_ALTIVEC, "__builtin_altivec_stvx", void_ftype_v4si_long_pvoid, ALTIVEC_BUILTIN_STVX); +@@ -13285,6 +13409,9 @@ + def_builtin (MASK_ALTIVEC, "__builtin_altivec_stvxl", void_ftype_v4si_long_pvoid, ALTIVEC_BUILTIN_STVXL); + def_builtin (MASK_ALTIVEC, "__builtin_altivec_stvebx", void_ftype_v16qi_long_pvoid, ALTIVEC_BUILTIN_STVEBX); + def_builtin (MASK_ALTIVEC, "__builtin_altivec_stvehx", void_ftype_v8hi_long_pvoid, ALTIVEC_BUILTIN_STVEHX); ++ def_builtin (MASK_ALTIVEC2, "__builtin_altivec_stvexbx", void_ftype_v16qi_long_pvoid, ALTIVEC_BUILTIN_STVEXBX); ++ def_builtin (MASK_ALTIVEC2, "__builtin_altivec_stvexhx", void_ftype_v8hi_long_pvoid, ALTIVEC_BUILTIN_STVEXHX); ++ def_builtin (MASK_ALTIVEC2, "__builtin_altivec_stvexwx", void_ftype_v4si_long_pvoid, ALTIVEC_BUILTIN_STVEXWX); + def_builtin (MASK_ALTIVEC, "__builtin_vec_ld", opaque_ftype_long_pcvoid, ALTIVEC_BUILTIN_VEC_LD); + def_builtin (MASK_ALTIVEC, "__builtin_vec_lde", opaque_ftype_long_pcvoid, ALTIVEC_BUILTIN_VEC_LDE); + def_builtin (MASK_ALTIVEC, "__builtin_vec_ldl", opaque_ftype_long_pcvoid, ALTIVEC_BUILTIN_VEC_LDL); +@@ -13293,12 +13420,18 @@ + def_builtin (MASK_ALTIVEC, "__builtin_vec_lvebx", v16qi_ftype_long_pcvoid, ALTIVEC_BUILTIN_VEC_LVEBX); + def_builtin (MASK_ALTIVEC, "__builtin_vec_lvehx", v8hi_ftype_long_pcvoid, ALTIVEC_BUILTIN_VEC_LVEHX); + def_builtin (MASK_ALTIVEC, "__builtin_vec_lvewx", v4si_ftype_long_pcvoid, ALTIVEC_BUILTIN_VEC_LVEWX); ++ def_builtin (MASK_ALTIVEC2, "__builtin_vec_lvexbx", v16qi_ftype_long_pcvoid, ALTIVEC_BUILTIN_VEC_LVEXBX); ++ def_builtin (MASK_ALTIVEC2, "__builtin_vec_lvexhx", v8hi_ftype_long_pcvoid, ALTIVEC_BUILTIN_VEC_LVEXHX); ++ def_builtin (MASK_ALTIVEC2, "__builtin_vec_lvexwx", v4si_ftype_long_pcvoid, ALTIVEC_BUILTIN_VEC_LVEXWX); + def_builtin (MASK_ALTIVEC, "__builtin_vec_st", void_ftype_opaque_long_pvoid, ALTIVEC_BUILTIN_VEC_ST); + def_builtin (MASK_ALTIVEC, "__builtin_vec_ste", void_ftype_opaque_long_pvoid, ALTIVEC_BUILTIN_VEC_STE); + def_builtin (MASK_ALTIVEC, "__builtin_vec_stl", void_ftype_opaque_long_pvoid, ALTIVEC_BUILTIN_VEC_STL); + def_builtin (MASK_ALTIVEC, "__builtin_vec_stvewx", void_ftype_opaque_long_pvoid, ALTIVEC_BUILTIN_VEC_STVEWX); + def_builtin (MASK_ALTIVEC, "__builtin_vec_stvebx", void_ftype_opaque_long_pvoid, ALTIVEC_BUILTIN_VEC_STVEBX); + def_builtin (MASK_ALTIVEC, "__builtin_vec_stvehx", void_ftype_opaque_long_pvoid, ALTIVEC_BUILTIN_VEC_STVEHX); ++ def_builtin (MASK_ALTIVEC2, "__builtin_vec_stvexwx", void_ftype_opaque_long_pvoid, ALTIVEC_BUILTIN_VEC_STVEXWX); ++ def_builtin (MASK_ALTIVEC2, "__builtin_vec_stvexbx", void_ftype_opaque_long_pvoid, ALTIVEC_BUILTIN_VEC_STVEXBX); ++ def_builtin (MASK_ALTIVEC2, "__builtin_vec_stvexhx", void_ftype_opaque_long_pvoid, ALTIVEC_BUILTIN_VEC_STVEXHX); + + def_builtin (MASK_VSX, "__builtin_vsx_lxvd2x_v2df", v2df_ftype_long_pcvoid, + VSX_BUILTIN_LXVD2X_V2DF); +@@ -13351,6 +13484,33 @@ + def_builtin (MASK_ALTIVEC, "__builtin_vec_stvrx", void_ftype_v16qi_long_pvoid, ALTIVEC_BUILTIN_VEC_STVRX); + def_builtin (MASK_ALTIVEC, "__builtin_vec_stvrxl", void_ftype_v16qi_long_pvoid, ALTIVEC_BUILTIN_VEC_STVRXL); + } ++ def_builtin (MASK_ALTIVEC2, "__builtin_altivec_lvtlx", v16qi_ftype_long_pcvoid, ALTIVEC_BUILTIN_LVTLX); ++ def_builtin (MASK_ALTIVEC2, "__builtin_altivec_lvtlxl", v16qi_ftype_long_pcvoid, ALTIVEC_BUILTIN_LVTLXL); ++ def_builtin (MASK_ALTIVEC2, "__builtin_altivec_lvtrx", v16qi_ftype_long_pcvoid, ALTIVEC_BUILTIN_LVTRX); ++ def_builtin (MASK_ALTIVEC2, "__builtin_altivec_lvtrxl", v16qi_ftype_long_pcvoid, ALTIVEC_BUILTIN_LVTRXL); ++ def_builtin (MASK_ALTIVEC2, "__builtin_vec_lvtlx", v16qi_ftype_long_pcvoid, ALTIVEC_BUILTIN_VEC_LVTLX); ++ def_builtin (MASK_ALTIVEC2, "__builtin_vec_lvtlxl", v16qi_ftype_long_pcvoid, ALTIVEC_BUILTIN_VEC_LVTLXL); ++ def_builtin (MASK_ALTIVEC2, "__builtin_vec_lvtrx", v16qi_ftype_long_pcvoid, ALTIVEC_BUILTIN_VEC_LVTRX); ++ def_builtin (MASK_ALTIVEC2, "__builtin_vec_lvtrxl", v16qi_ftype_long_pcvoid, ALTIVEC_BUILTIN_VEC_LVTRXL); ++ def_builtin (MASK_ALTIVEC2, "__builtin_altivec_stvflx", void_ftype_v16qi_long_pvoid, ALTIVEC_BUILTIN_STVFLX); ++ def_builtin (MASK_ALTIVEC2, "__builtin_altivec_stvflxl", void_ftype_v16qi_long_pvoid, ALTIVEC_BUILTIN_STVFLXL); ++ def_builtin (MASK_ALTIVEC2, "__builtin_altivec_stvfrx", void_ftype_v16qi_long_pvoid, ALTIVEC_BUILTIN_STVFRX); ++ def_builtin (MASK_ALTIVEC2, "__builtin_altivec_stvfrxl", void_ftype_v16qi_long_pvoid, ALTIVEC_BUILTIN_STVFRXL); ++ def_builtin (MASK_ALTIVEC2, "__builtin_vec_stvflx", void_ftype_v16qi_long_pvoid, ALTIVEC_BUILTIN_VEC_STVFLX); ++ def_builtin (MASK_ALTIVEC2, "__builtin_vec_stvflxl", void_ftype_v16qi_long_pvoid, ALTIVEC_BUILTIN_VEC_STVFLXL); ++ def_builtin (MASK_ALTIVEC2, "__builtin_vec_stvfrx", void_ftype_v16qi_long_pvoid, ALTIVEC_BUILTIN_VEC_STVFRX); ++ def_builtin (MASK_ALTIVEC2, "__builtin_vec_stvfrxl", void_ftype_v16qi_long_pvoid, ALTIVEC_BUILTIN_VEC_STVFRXL); ++ def_builtin (MASK_ALTIVEC2, "__builtin_altivec_lvswx", v16qi_ftype_long_pcvoid, ALTIVEC_BUILTIN_LVSWX); ++ def_builtin (MASK_ALTIVEC2, "__builtin_altivec_lvswxl", v16qi_ftype_long_pcvoid, ALTIVEC_BUILTIN_LVSWXL); ++ def_builtin (MASK_ALTIVEC2, "__builtin_vec_lvswx", v16qi_ftype_long_pcvoid, ALTIVEC_BUILTIN_VEC_LVSWX); ++ def_builtin (MASK_ALTIVEC2, "__builtin_vec_lvswxl", v16qi_ftype_long_pcvoid, ALTIVEC_BUILTIN_VEC_LVSWXL); ++ def_builtin (MASK_ALTIVEC2, "__builtin_altivec_lvsm", v16qi_ftype_long_pcvoid, ALTIVEC_BUILTIN_LVSM); ++ def_builtin (MASK_ALTIVEC2, "__builtin_vec_lvsm", v16qi_ftype_long_pcvoid, ALTIVEC_BUILTIN_VEC_LVSM); ++ def_builtin (MASK_ALTIVEC2, "__builtin_altivec_stvswx", void_ftype_v16qi_long_pvoid, ALTIVEC_BUILTIN_STVSWX); ++ def_builtin (MASK_ALTIVEC2, "__builtin_altivec_stvswxl", void_ftype_v16qi_long_pvoid, ALTIVEC_BUILTIN_STVSWXL); ++ def_builtin (MASK_ALTIVEC2, "__builtin_vec_stvswx", void_ftype_v16qi_long_pvoid, ALTIVEC_BUILTIN_VEC_STVSWX); ++ def_builtin (MASK_ALTIVEC2, "__builtin_vec_stvswxl", void_ftype_v16qi_long_pvoid, ALTIVEC_BUILTIN_VEC_STVSWXL); ++ + def_builtin (MASK_ALTIVEC, "__builtin_vec_step", int_ftype_opaque, ALTIVEC_BUILTIN_VEC_STEP); + def_builtin (MASK_ALTIVEC, "__builtin_vec_splats", opaque_ftype_opaque, ALTIVEC_BUILTIN_VEC_SPLATS); + def_builtin (MASK_ALTIVEC, "__builtin_vec_promote", opaque_ftype_opaque, ALTIVEC_BUILTIN_VEC_PROMOTE); +@@ -13668,6 +13828,9 @@ + case ALTIVEC_BUILTIN_VMULEUH_UNS: + case ALTIVEC_BUILTIN_VMULOUB_UNS: + case ALTIVEC_BUILTIN_VMULOUH_UNS: ++ case ALTIVEC_BUILTIN_ABSDUB: ++ case ALTIVEC_BUILTIN_ABSDUH: ++ case ALTIVEC_BUILTIN_ABSDUW: + h.uns_p[0] = 1; + h.uns_p[1] = 1; + h.uns_p[2] = 1; +@@ -23250,6 +23413,7 @@ + || rs6000_cpu_attr == CPU_PPC750 + || rs6000_cpu_attr == CPU_PPC7400 + || rs6000_cpu_attr == CPU_PPC7450 ++ || rs6000_cpu_attr == CPU_PPCE5500 + || rs6000_cpu_attr == CPU_POWER4 + || rs6000_cpu_attr == CPU_POWER5 + || rs6000_cpu_attr == CPU_POWER7 +@@ -23794,6 +23958,8 @@ + case CPU_PPCE300C3: + case CPU_PPCE500MC: + case CPU_PPCE500MC64: ++ case CPU_PPCE5500: ++ case CPU_PPCE6500: + case CPU_TITAN: + return 2; + case CPU_RIOS2: +diff -ruN gcc-4.6.2-orig/gcc/config/rs6000/rs6000-c.c gcc-4.6.2/gcc/config/rs6000/rs6000-c.c +--- gcc-4.6.2-orig/gcc/config/rs6000/rs6000-c.c 2011-02-02 23:42:19.000000000 -0600 ++++ gcc-4.6.2/gcc/config/rs6000/rs6000-c.c 2012-03-06 12:54:55.964038969 -0600 +@@ -310,6 +310,8 @@ + /* Enable context-sensitive macros. */ + cpp_get_callbacks (pfile)->macro_to_expand = rs6000_macro_to_expand; + } ++ if (TARGET_ALTIVEC2) ++ builtin_define ("__ALTIVEC2__"); + } + if (rs6000_cpu == PROCESSOR_CELL) + builtin_define ("__PPU__"); +@@ -569,6 +571,24 @@ + RS6000_BTI_bool_V8HI, RS6000_BTI_bool_V16QI, 0, 0 }, + + /* Binary AltiVec/VSX builtins. */ ++ { ALTIVEC_BUILTIN_VEC_ABSD, ALTIVEC_BUILTIN_ABSDUB, ++ RS6000_BTI_unsigned_V16QI, RS6000_BTI_bool_V16QI, RS6000_BTI_unsigned_V16QI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_ABSD, ALTIVEC_BUILTIN_ABSDUB, ++ RS6000_BTI_unsigned_V16QI, RS6000_BTI_unsigned_V16QI, RS6000_BTI_unsigned_V16QI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_ABSD, ALTIVEC_BUILTIN_ABSDUB, ++ RS6000_BTI_unsigned_V16QI, RS6000_BTI_unsigned_V16QI, RS6000_BTI_bool_V16QI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_ABSD, ALTIVEC_BUILTIN_ABSDUH, ++ RS6000_BTI_unsigned_V8HI, RS6000_BTI_bool_V8HI, RS6000_BTI_unsigned_V8HI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_ABSD, ALTIVEC_BUILTIN_ABSDUH, ++ RS6000_BTI_unsigned_V8HI, RS6000_BTI_unsigned_V8HI, RS6000_BTI_unsigned_V8HI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_ABSD, ALTIVEC_BUILTIN_ABSDUH, ++ RS6000_BTI_unsigned_V8HI, RS6000_BTI_unsigned_V8HI, RS6000_BTI_bool_V8HI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_ABSD, ALTIVEC_BUILTIN_ABSDUW, ++ RS6000_BTI_unsigned_V4SI, RS6000_BTI_bool_V4SI, RS6000_BTI_unsigned_V4SI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_ABSD, ALTIVEC_BUILTIN_ABSDUW, ++ RS6000_BTI_unsigned_V4SI, RS6000_BTI_unsigned_V4SI, RS6000_BTI_unsigned_V4SI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_ABSD, ALTIVEC_BUILTIN_ABSDUW, ++ RS6000_BTI_unsigned_V4SI, RS6000_BTI_unsigned_V4SI, RS6000_BTI_bool_V4SI, 0 }, + { ALTIVEC_BUILTIN_VEC_ADD, ALTIVEC_BUILTIN_VADDUBM, + RS6000_BTI_V16QI, RS6000_BTI_bool_V16QI, RS6000_BTI_V16QI, 0 }, + { ALTIVEC_BUILTIN_VEC_ADD, ALTIVEC_BUILTIN_VADDUBM, +@@ -1084,6 +1104,24 @@ + RS6000_BTI_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_INTQI, 0 }, + { ALTIVEC_BUILTIN_VEC_LVEBX, ALTIVEC_BUILTIN_LVEBX, + RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTQI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVEXWX, ALTIVEC_BUILTIN_LVEXWX, ++ RS6000_BTI_V4SF, RS6000_BTI_INTSI, ~RS6000_BTI_float, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVEXWX, ALTIVEC_BUILTIN_LVEXWX, ++ RS6000_BTI_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_INTSI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVEXWX, ALTIVEC_BUILTIN_LVEXWX, ++ RS6000_BTI_unsigned_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTSI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVEXWX, ALTIVEC_BUILTIN_LVEXWX, ++ RS6000_BTI_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_long, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVEXWX, ALTIVEC_BUILTIN_LVEXWX, ++ RS6000_BTI_unsigned_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_long, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVEXHX, ALTIVEC_BUILTIN_LVEXHX, ++ RS6000_BTI_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_INTHI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVEXHX, ALTIVEC_BUILTIN_LVEXHX, ++ RS6000_BTI_unsigned_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTHI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVEXBX, ALTIVEC_BUILTIN_LVEXBX, ++ RS6000_BTI_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_INTQI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVEXBX, ALTIVEC_BUILTIN_LVEXBX, ++ RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTQI, 0 }, + { ALTIVEC_BUILTIN_VEC_LDL, ALTIVEC_BUILTIN_LVXL, + RS6000_BTI_V4SF, RS6000_BTI_INTSI, ~RS6000_BTI_V4SF, 0 }, + { ALTIVEC_BUILTIN_VEC_LDL, ALTIVEC_BUILTIN_LVXL, +@@ -1336,6 +1374,258 @@ + RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V16QI, 0 }, + { ALTIVEC_BUILTIN_VEC_LVRXL, ALTIVEC_BUILTIN_LVRXL, + RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTQI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVTLX, ALTIVEC_BUILTIN_LVTLX, ++ RS6000_BTI_V4SF, RS6000_BTI_INTSI, ~RS6000_BTI_V4SF, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVTLX, ALTIVEC_BUILTIN_LVTLX, ++ RS6000_BTI_V4SF, RS6000_BTI_INTSI, ~RS6000_BTI_float, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVTLX, ALTIVEC_BUILTIN_LVTLX, ++ RS6000_BTI_bool_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V4SI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVTLX, ALTIVEC_BUILTIN_LVTLX, ++ RS6000_BTI_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_V4SI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVTLX, ALTIVEC_BUILTIN_LVTLX, ++ RS6000_BTI_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_INTSI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVTLX, ALTIVEC_BUILTIN_LVTLX, ++ RS6000_BTI_unsigned_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V4SI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVTLX, ALTIVEC_BUILTIN_LVTLX, ++ RS6000_BTI_unsigned_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTSI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVTLX, ALTIVEC_BUILTIN_LVTLX, ++ RS6000_BTI_bool_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V8HI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVTLX, ALTIVEC_BUILTIN_LVTLX, ++ RS6000_BTI_pixel_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_pixel_V8HI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVTLX, ALTIVEC_BUILTIN_LVTLX, ++ RS6000_BTI_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_V8HI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVTLX, ALTIVEC_BUILTIN_LVTLX, ++ RS6000_BTI_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_INTHI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVTLX, ALTIVEC_BUILTIN_LVTLX, ++ RS6000_BTI_unsigned_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V8HI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVTLX, ALTIVEC_BUILTIN_LVTLX, ++ RS6000_BTI_unsigned_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTHI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVTLX, ALTIVEC_BUILTIN_LVTLX, ++ RS6000_BTI_bool_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V16QI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVTLX, ALTIVEC_BUILTIN_LVTLX, ++ RS6000_BTI_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_V16QI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVTLX, ALTIVEC_BUILTIN_LVTLX, ++ RS6000_BTI_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_INTQI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVTLX, ALTIVEC_BUILTIN_LVTLX, ++ RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V16QI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVTLX, ALTIVEC_BUILTIN_LVTLX, ++ RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTQI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVTLXL, ALTIVEC_BUILTIN_LVTLXL, ++ RS6000_BTI_V4SF, RS6000_BTI_INTSI, ~RS6000_BTI_V4SF, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVTLXL, ALTIVEC_BUILTIN_LVTLXL, ++ RS6000_BTI_V4SF, RS6000_BTI_INTSI, ~RS6000_BTI_float, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVTLXL, ALTIVEC_BUILTIN_LVTLXL, ++ RS6000_BTI_bool_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V4SI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVTLXL, ALTIVEC_BUILTIN_LVTLXL, ++ RS6000_BTI_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_V4SI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVTLXL, ALTIVEC_BUILTIN_LVTLXL, ++ RS6000_BTI_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_INTSI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVTLXL, ALTIVEC_BUILTIN_LVTLXL, ++ RS6000_BTI_unsigned_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V4SI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVTLXL, ALTIVEC_BUILTIN_LVTLXL, ++ RS6000_BTI_unsigned_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTSI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVTLXL, ALTIVEC_BUILTIN_LVTLXL, ++ RS6000_BTI_bool_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V8HI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVTLXL, ALTIVEC_BUILTIN_LVTLXL, ++ RS6000_BTI_pixel_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_pixel_V8HI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVTLXL, ALTIVEC_BUILTIN_LVTLXL, ++ RS6000_BTI_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_V8HI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVTLXL, ALTIVEC_BUILTIN_LVTLXL, ++ RS6000_BTI_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_INTHI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVTLXL, ALTIVEC_BUILTIN_LVTLXL, ++ RS6000_BTI_unsigned_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V8HI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVTLXL, ALTIVEC_BUILTIN_LVTLXL, ++ RS6000_BTI_unsigned_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTHI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVTLXL, ALTIVEC_BUILTIN_LVTLXL, ++ RS6000_BTI_bool_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V16QI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVTLXL, ALTIVEC_BUILTIN_LVTLXL, ++ RS6000_BTI_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_V16QI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVTLXL, ALTIVEC_BUILTIN_LVTLXL, ++ RS6000_BTI_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_INTQI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVTLXL, ALTIVEC_BUILTIN_LVTLXL, ++ RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V16QI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVTLXL, ALTIVEC_BUILTIN_LVTLXL, ++ RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTQI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVTRX, ALTIVEC_BUILTIN_LVTRX, ++ RS6000_BTI_V4SF, RS6000_BTI_INTSI, ~RS6000_BTI_V4SF, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVTRX, ALTIVEC_BUILTIN_LVTRX, ++ RS6000_BTI_V4SF, RS6000_BTI_INTSI, ~RS6000_BTI_float, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVTRX, ALTIVEC_BUILTIN_LVTRX, ++ RS6000_BTI_bool_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V4SI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVTRX, ALTIVEC_BUILTIN_LVTRX, ++ RS6000_BTI_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_V4SI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVTRX, ALTIVEC_BUILTIN_LVTRX, ++ RS6000_BTI_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_INTSI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVTRX, ALTIVEC_BUILTIN_LVTRX, ++ RS6000_BTI_unsigned_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V4SI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVTRX, ALTIVEC_BUILTIN_LVTRX, ++ RS6000_BTI_unsigned_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTSI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVTRX, ALTIVEC_BUILTIN_LVTRX, ++ RS6000_BTI_bool_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V8HI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVTRX, ALTIVEC_BUILTIN_LVTRX, ++ RS6000_BTI_pixel_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_pixel_V8HI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVTRX, ALTIVEC_BUILTIN_LVTRX, ++ RS6000_BTI_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_V8HI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVTRX, ALTIVEC_BUILTIN_LVTRX, ++ RS6000_BTI_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_INTHI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVTRX, ALTIVEC_BUILTIN_LVTRX, ++ RS6000_BTI_unsigned_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V8HI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVTRX, ALTIVEC_BUILTIN_LVTRX, ++ RS6000_BTI_unsigned_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTHI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVTRX, ALTIVEC_BUILTIN_LVTRX, ++ RS6000_BTI_bool_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V16QI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVTRX, ALTIVEC_BUILTIN_LVTRX, ++ RS6000_BTI_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_V16QI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVTRX, ALTIVEC_BUILTIN_LVTRX, ++ RS6000_BTI_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_INTQI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVTRX, ALTIVEC_BUILTIN_LVTRX, ++ RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V16QI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVTRX, ALTIVEC_BUILTIN_LVTRX, ++ RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTQI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVTRXL, ALTIVEC_BUILTIN_LVTRXL, ++ RS6000_BTI_V4SF, RS6000_BTI_INTSI, ~RS6000_BTI_V4SF, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVTRXL, ALTIVEC_BUILTIN_LVTRXL, ++ RS6000_BTI_V4SF, RS6000_BTI_INTSI, ~RS6000_BTI_float, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVTRXL, ALTIVEC_BUILTIN_LVTRXL, ++ RS6000_BTI_bool_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V4SI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVTRXL, ALTIVEC_BUILTIN_LVTRXL, ++ RS6000_BTI_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_V4SI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVTRXL, ALTIVEC_BUILTIN_LVTRXL, ++ RS6000_BTI_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_INTSI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVTRXL, ALTIVEC_BUILTIN_LVTRXL, ++ RS6000_BTI_unsigned_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V4SI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVTRXL, ALTIVEC_BUILTIN_LVTRXL, ++ RS6000_BTI_unsigned_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTSI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVTRXL, ALTIVEC_BUILTIN_LVTRXL, ++ RS6000_BTI_bool_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V8HI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVTRXL, ALTIVEC_BUILTIN_LVTRXL, ++ RS6000_BTI_pixel_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_pixel_V8HI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVTRXL, ALTIVEC_BUILTIN_LVTRXL, ++ RS6000_BTI_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_V8HI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVTRXL, ALTIVEC_BUILTIN_LVTRXL, ++ RS6000_BTI_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_INTHI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVTRXL, ALTIVEC_BUILTIN_LVTRXL, ++ RS6000_BTI_unsigned_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V8HI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVTRXL, ALTIVEC_BUILTIN_LVTRXL, ++ RS6000_BTI_unsigned_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTHI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVTRXL, ALTIVEC_BUILTIN_LVTRXL, ++ RS6000_BTI_bool_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V16QI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVTRXL, ALTIVEC_BUILTIN_LVTRXL, ++ RS6000_BTI_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_V16QI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVTRXL, ALTIVEC_BUILTIN_LVTRXL, ++ RS6000_BTI_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_INTQI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVTRXL, ALTIVEC_BUILTIN_LVTRXL, ++ RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V16QI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVTRXL, ALTIVEC_BUILTIN_LVTRXL, ++ RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTQI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVSWX, ALTIVEC_BUILTIN_LVSWX, ++ RS6000_BTI_V4SF, RS6000_BTI_INTSI, ~RS6000_BTI_V4SF, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVSWX, ALTIVEC_BUILTIN_LVSWX, ++ RS6000_BTI_V4SF, RS6000_BTI_INTSI, ~RS6000_BTI_float, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVSWX, ALTIVEC_BUILTIN_LVSWX, ++ RS6000_BTI_bool_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V4SI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVSWX, ALTIVEC_BUILTIN_LVSWX, ++ RS6000_BTI_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_V4SI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVSWX, ALTIVEC_BUILTIN_LVSWX, ++ RS6000_BTI_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_INTSI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVSWX, ALTIVEC_BUILTIN_LVSWX, ++ RS6000_BTI_unsigned_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V4SI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVSWX, ALTIVEC_BUILTIN_LVSWX, ++ RS6000_BTI_unsigned_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTSI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVSWX, ALTIVEC_BUILTIN_LVSWX, ++ RS6000_BTI_bool_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V8HI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVSWX, ALTIVEC_BUILTIN_LVSWX, ++ RS6000_BTI_pixel_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_pixel_V8HI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVSWX, ALTIVEC_BUILTIN_LVSWX, ++ RS6000_BTI_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_V8HI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVSWX, ALTIVEC_BUILTIN_LVSWX, ++ RS6000_BTI_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_INTHI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVSWX, ALTIVEC_BUILTIN_LVSWX, ++ RS6000_BTI_unsigned_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V8HI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVSWX, ALTIVEC_BUILTIN_LVSWX, ++ RS6000_BTI_unsigned_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTHI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVSWX, ALTIVEC_BUILTIN_LVSWX, ++ RS6000_BTI_bool_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V16QI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVSWX, ALTIVEC_BUILTIN_LVSWX, ++ RS6000_BTI_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_V16QI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVSWX, ALTIVEC_BUILTIN_LVSWX, ++ RS6000_BTI_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_INTQI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVSWX, ALTIVEC_BUILTIN_LVSWX, ++ RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V16QI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVSWX, ALTIVEC_BUILTIN_LVSWX, ++ RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTQI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVSWXL, ALTIVEC_BUILTIN_LVSWXL, ++ RS6000_BTI_V4SF, RS6000_BTI_INTSI, ~RS6000_BTI_V4SF, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVSWXL, ALTIVEC_BUILTIN_LVSWXL, ++ RS6000_BTI_V4SF, RS6000_BTI_INTSI, ~RS6000_BTI_float, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVSWXL, ALTIVEC_BUILTIN_LVSWXL, ++ RS6000_BTI_bool_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V4SI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVSWXL, ALTIVEC_BUILTIN_LVSWXL, ++ RS6000_BTI_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_V4SI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVSWXL, ALTIVEC_BUILTIN_LVSWXL, ++ RS6000_BTI_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_INTSI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVSWXL, ALTIVEC_BUILTIN_LVSWXL, ++ RS6000_BTI_unsigned_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V4SI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVSWXL, ALTIVEC_BUILTIN_LVSWXL, ++ RS6000_BTI_unsigned_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTSI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVSWXL, ALTIVEC_BUILTIN_LVSWXL, ++ RS6000_BTI_bool_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V8HI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVSWXL, ALTIVEC_BUILTIN_LVSWXL, ++ RS6000_BTI_pixel_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_pixel_V8HI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVSWXL, ALTIVEC_BUILTIN_LVSWXL, ++ RS6000_BTI_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_V8HI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVSWXL, ALTIVEC_BUILTIN_LVSWXL, ++ RS6000_BTI_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_INTHI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVSWXL, ALTIVEC_BUILTIN_LVSWXL, ++ RS6000_BTI_unsigned_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V8HI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVSWXL, ALTIVEC_BUILTIN_LVSWXL, ++ RS6000_BTI_unsigned_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTHI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVSWXL, ALTIVEC_BUILTIN_LVSWXL, ++ RS6000_BTI_bool_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V16QI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVSWXL, ALTIVEC_BUILTIN_LVSWXL, ++ RS6000_BTI_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_V16QI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVSWXL, ALTIVEC_BUILTIN_LVSWXL, ++ RS6000_BTI_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_INTQI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVSWXL, ALTIVEC_BUILTIN_LVSWXL, ++ RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V16QI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVSWXL, ALTIVEC_BUILTIN_LVSWXL, ++ RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTQI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVSM, ALTIVEC_BUILTIN_LVSM, ++ RS6000_BTI_V4SF, RS6000_BTI_INTSI, ~RS6000_BTI_V4SF, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVSM, ALTIVEC_BUILTIN_LVSM, ++ RS6000_BTI_V4SF, RS6000_BTI_INTSI, ~RS6000_BTI_float, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVSM, ALTIVEC_BUILTIN_LVSM, ++ RS6000_BTI_bool_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V4SI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVSM, ALTIVEC_BUILTIN_LVSM, ++ RS6000_BTI_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_V4SI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVSM, ALTIVEC_BUILTIN_LVSM, ++ RS6000_BTI_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_INTSI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVSM, ALTIVEC_BUILTIN_LVSM, ++ RS6000_BTI_unsigned_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V4SI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVSM, ALTIVEC_BUILTIN_LVSM, ++ RS6000_BTI_unsigned_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTSI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVSM, ALTIVEC_BUILTIN_LVSM, ++ RS6000_BTI_bool_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V8HI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVSM, ALTIVEC_BUILTIN_LVSM, ++ RS6000_BTI_pixel_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_pixel_V8HI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVSM, ALTIVEC_BUILTIN_LVSM, ++ RS6000_BTI_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_V8HI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVSM, ALTIVEC_BUILTIN_LVSM, ++ RS6000_BTI_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_INTHI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVSM, ALTIVEC_BUILTIN_LVSM, ++ RS6000_BTI_unsigned_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V8HI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVSM, ALTIVEC_BUILTIN_LVSM, ++ RS6000_BTI_unsigned_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTHI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVSM, ALTIVEC_BUILTIN_LVSM, ++ RS6000_BTI_bool_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V16QI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVSM, ALTIVEC_BUILTIN_LVSM, ++ RS6000_BTI_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_V16QI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVSM, ALTIVEC_BUILTIN_LVSM, ++ RS6000_BTI_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_INTQI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVSM, ALTIVEC_BUILTIN_LVSM, ++ RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V16QI, 0 }, ++ { ALTIVEC_BUILTIN_VEC_LVSM, ALTIVEC_BUILTIN_LVSM, ++ RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTQI, 0 }, + { ALTIVEC_BUILTIN_VEC_MAX, ALTIVEC_BUILTIN_VMAXUB, + RS6000_BTI_unsigned_V16QI, RS6000_BTI_bool_V16QI, RS6000_BTI_unsigned_V16QI, 0 }, + { ALTIVEC_BUILTIN_VEC_MAX, ALTIVEC_BUILTIN_VMAXUB, +@@ -2812,6 +3102,46 @@ + RS6000_BTI_void, RS6000_BTI_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_void }, + { ALTIVEC_BUILTIN_VEC_STVEBX, ALTIVEC_BUILTIN_STVEBX, + RS6000_BTI_void, RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_void }, ++ { ALTIVEC_BUILTIN_VEC_STVEXWX, ALTIVEC_BUILTIN_STVEXWX, ++ RS6000_BTI_void, RS6000_BTI_V4SF, RS6000_BTI_INTSI, ~RS6000_BTI_float }, ++ { ALTIVEC_BUILTIN_VEC_STVEXWX, ALTIVEC_BUILTIN_STVEXWX, ++ RS6000_BTI_void, RS6000_BTI_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_INTSI }, ++ { ALTIVEC_BUILTIN_VEC_STVEXWX, ALTIVEC_BUILTIN_STVEXWX, ++ RS6000_BTI_void, RS6000_BTI_unsigned_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTSI }, ++ { ALTIVEC_BUILTIN_VEC_STVEXWX, ALTIVEC_BUILTIN_STVEXWX, ++ RS6000_BTI_void, RS6000_BTI_bool_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_INTSI }, ++ { ALTIVEC_BUILTIN_VEC_STVEXWX, ALTIVEC_BUILTIN_STVEXWX, ++ RS6000_BTI_void, RS6000_BTI_bool_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTSI }, ++ { ALTIVEC_BUILTIN_VEC_STVEXWX, ALTIVEC_BUILTIN_STVEXWX, ++ RS6000_BTI_void, RS6000_BTI_V4SF, RS6000_BTI_INTSI, ~RS6000_BTI_void }, ++ { ALTIVEC_BUILTIN_VEC_STVEXWX, ALTIVEC_BUILTIN_STVEXWX, ++ RS6000_BTI_void, RS6000_BTI_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_void }, ++ { ALTIVEC_BUILTIN_VEC_STVEXWX, ALTIVEC_BUILTIN_STVEXWX, ++ RS6000_BTI_void, RS6000_BTI_unsigned_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_void }, ++ { ALTIVEC_BUILTIN_VEC_STVEXHX, ALTIVEC_BUILTIN_STVEXHX, ++ RS6000_BTI_void, RS6000_BTI_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_INTHI }, ++ { ALTIVEC_BUILTIN_VEC_STVEXHX, ALTIVEC_BUILTIN_STVEXHX, ++ RS6000_BTI_void, RS6000_BTI_unsigned_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTHI }, ++ { ALTIVEC_BUILTIN_VEC_STVEXHX, ALTIVEC_BUILTIN_STVEXHX, ++ RS6000_BTI_void, RS6000_BTI_bool_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_INTHI }, ++ { ALTIVEC_BUILTIN_VEC_STVEXHX, ALTIVEC_BUILTIN_STVEXHX, ++ RS6000_BTI_void, RS6000_BTI_bool_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTHI }, ++ { ALTIVEC_BUILTIN_VEC_STVEXHX, ALTIVEC_BUILTIN_STVEXHX, ++ RS6000_BTI_void, RS6000_BTI_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_void }, ++ { ALTIVEC_BUILTIN_VEC_STVEXHX, ALTIVEC_BUILTIN_STVEXHX, ++ RS6000_BTI_void, RS6000_BTI_unsigned_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_void }, ++ { ALTIVEC_BUILTIN_VEC_STVEXBX, ALTIVEC_BUILTIN_STVEXBX, ++ RS6000_BTI_void, RS6000_BTI_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_INTQI }, ++ { ALTIVEC_BUILTIN_VEC_STVEXBX, ALTIVEC_BUILTIN_STVEXBX, ++ RS6000_BTI_void, RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTQI }, ++ { ALTIVEC_BUILTIN_VEC_STVEXBX, ALTIVEC_BUILTIN_STVEXBX, ++ RS6000_BTI_void, RS6000_BTI_bool_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_INTQI }, ++ { ALTIVEC_BUILTIN_VEC_STVEXBX, ALTIVEC_BUILTIN_STVEXBX, ++ RS6000_BTI_void, RS6000_BTI_bool_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTQI }, ++ { ALTIVEC_BUILTIN_VEC_STVEXBX, ALTIVEC_BUILTIN_STVEXBX, ++ RS6000_BTI_void, RS6000_BTI_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_void }, ++ { ALTIVEC_BUILTIN_VEC_STVEXBX, ALTIVEC_BUILTIN_STVEXBX, ++ RS6000_BTI_void, RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_void }, + { ALTIVEC_BUILTIN_VEC_STL, ALTIVEC_BUILTIN_STVXL, + RS6000_BTI_void, RS6000_BTI_V4SF, RS6000_BTI_INTSI, ~RS6000_BTI_V4SF }, + { ALTIVEC_BUILTIN_VEC_STL, ALTIVEC_BUILTIN_STVXL, +@@ -3016,6 +3346,222 @@ + RS6000_BTI_void, RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V16QI }, + { ALTIVEC_BUILTIN_VEC_STVRXL, ALTIVEC_BUILTIN_STVRXL, + RS6000_BTI_void, RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTQI }, ++ { ALTIVEC_BUILTIN_VEC_STVFLX, ALTIVEC_BUILTIN_STVFLX, ++ RS6000_BTI_void, RS6000_BTI_V4SF, RS6000_BTI_INTSI, ~RS6000_BTI_V4SF }, ++ { ALTIVEC_BUILTIN_VEC_STVFLX, ALTIVEC_BUILTIN_STVFLX, ++ RS6000_BTI_void, RS6000_BTI_V4SF, RS6000_BTI_INTSI, ~RS6000_BTI_float }, ++ { ALTIVEC_BUILTIN_VEC_STVFLX, ALTIVEC_BUILTIN_STVFLX, ++ RS6000_BTI_void, RS6000_BTI_bool_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V4SI }, ++ { ALTIVEC_BUILTIN_VEC_STVFLX, ALTIVEC_BUILTIN_STVFLX, ++ RS6000_BTI_void, RS6000_BTI_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_V4SI }, ++ { ALTIVEC_BUILTIN_VEC_STVFLX, ALTIVEC_BUILTIN_STVFLX, ++ RS6000_BTI_void, RS6000_BTI_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_INTSI }, ++ { ALTIVEC_BUILTIN_VEC_STVFLX, ALTIVEC_BUILTIN_STVFLX, ++ RS6000_BTI_void, RS6000_BTI_unsigned_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V4SI }, ++ { ALTIVEC_BUILTIN_VEC_STVFLX, ALTIVEC_BUILTIN_STVFLX, ++ RS6000_BTI_void, RS6000_BTI_unsigned_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTSI }, ++ { ALTIVEC_BUILTIN_VEC_STVFLX, ALTIVEC_BUILTIN_STVFLX, ++ RS6000_BTI_void, RS6000_BTI_bool_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V8HI }, ++ { ALTIVEC_BUILTIN_VEC_STVFLX, ALTIVEC_BUILTIN_STVFLX, ++ RS6000_BTI_void, RS6000_BTI_pixel_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_pixel_V8HI }, ++ { ALTIVEC_BUILTIN_VEC_STVFLX, ALTIVEC_BUILTIN_STVFLX, ++ RS6000_BTI_void, RS6000_BTI_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_V8HI }, ++ { ALTIVEC_BUILTIN_VEC_STVFLX, ALTIVEC_BUILTIN_STVFLX, ++ RS6000_BTI_void, RS6000_BTI_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_INTHI }, ++ { ALTIVEC_BUILTIN_VEC_STVFLX, ALTIVEC_BUILTIN_STVFLX, ++ RS6000_BTI_void, RS6000_BTI_unsigned_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V8HI }, ++ { ALTIVEC_BUILTIN_VEC_STVFLX, ALTIVEC_BUILTIN_STVFLX, ++ RS6000_BTI_void, RS6000_BTI_unsigned_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTHI }, ++ { ALTIVEC_BUILTIN_VEC_STVFLX, ALTIVEC_BUILTIN_STVFLX, ++ RS6000_BTI_void, RS6000_BTI_bool_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V16QI }, ++ { ALTIVEC_BUILTIN_VEC_STVFLX, ALTIVEC_BUILTIN_STVFLX, ++ RS6000_BTI_void, RS6000_BTI_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_V16QI }, ++ { ALTIVEC_BUILTIN_VEC_STVFLX, ALTIVEC_BUILTIN_STVFLX, ++ RS6000_BTI_void, RS6000_BTI_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_INTQI }, ++ { ALTIVEC_BUILTIN_VEC_STVFLX, ALTIVEC_BUILTIN_STVFLX, ++ RS6000_BTI_void, RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V16QI }, ++ { ALTIVEC_BUILTIN_VEC_STVFLX, ALTIVEC_BUILTIN_STVFLX, ++ RS6000_BTI_void, RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTQI }, ++ { ALTIVEC_BUILTIN_VEC_STVFLXL, ALTIVEC_BUILTIN_STVFLXL, ++ RS6000_BTI_void, RS6000_BTI_V4SF, RS6000_BTI_INTSI, ~RS6000_BTI_V4SF }, ++ { ALTIVEC_BUILTIN_VEC_STVFLXL, ALTIVEC_BUILTIN_STVFLXL, ++ RS6000_BTI_void, RS6000_BTI_V4SF, RS6000_BTI_INTSI, ~RS6000_BTI_float }, ++ { ALTIVEC_BUILTIN_VEC_STVFLXL, ALTIVEC_BUILTIN_STVFLXL, ++ RS6000_BTI_void, RS6000_BTI_bool_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V4SI }, ++ { ALTIVEC_BUILTIN_VEC_STVFLXL, ALTIVEC_BUILTIN_STVFLXL, ++ RS6000_BTI_void, RS6000_BTI_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_V4SI }, ++ { ALTIVEC_BUILTIN_VEC_STVFLXL, ALTIVEC_BUILTIN_STVFLXL, ++ RS6000_BTI_void, RS6000_BTI_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_INTSI }, ++ { ALTIVEC_BUILTIN_VEC_STVFLXL, ALTIVEC_BUILTIN_STVFLXL, ++ RS6000_BTI_void, RS6000_BTI_unsigned_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V4SI }, ++ { ALTIVEC_BUILTIN_VEC_STVFLXL, ALTIVEC_BUILTIN_STVFLXL, ++ RS6000_BTI_void, RS6000_BTI_unsigned_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTSI }, ++ { ALTIVEC_BUILTIN_VEC_STVFLXL, ALTIVEC_BUILTIN_STVFLXL, ++ RS6000_BTI_void, RS6000_BTI_bool_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V8HI }, ++ { ALTIVEC_BUILTIN_VEC_STVFLXL, ALTIVEC_BUILTIN_STVFLXL, ++ RS6000_BTI_void, RS6000_BTI_pixel_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_pixel_V8HI }, ++ { ALTIVEC_BUILTIN_VEC_STVFLXL, ALTIVEC_BUILTIN_STVFLXL, ++ RS6000_BTI_void, RS6000_BTI_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_V8HI }, ++ { ALTIVEC_BUILTIN_VEC_STVFLXL, ALTIVEC_BUILTIN_STVFLXL, ++ RS6000_BTI_void, RS6000_BTI_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_INTHI }, ++ { ALTIVEC_BUILTIN_VEC_STVFLXL, ALTIVEC_BUILTIN_STVFLXL, ++ RS6000_BTI_void, RS6000_BTI_unsigned_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V8HI }, ++ { ALTIVEC_BUILTIN_VEC_STVFLXL, ALTIVEC_BUILTIN_STVFLXL, ++ RS6000_BTI_void, RS6000_BTI_unsigned_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTHI }, ++ { ALTIVEC_BUILTIN_VEC_STVFLXL, ALTIVEC_BUILTIN_STVFLXL, ++ RS6000_BTI_void, RS6000_BTI_bool_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V16QI }, ++ { ALTIVEC_BUILTIN_VEC_STVFLXL, ALTIVEC_BUILTIN_STVFLXL, ++ RS6000_BTI_void, RS6000_BTI_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_V16QI }, ++ { ALTIVEC_BUILTIN_VEC_STVFLXL, ALTIVEC_BUILTIN_STVFLXL, ++ RS6000_BTI_void, RS6000_BTI_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_INTQI }, ++ { ALTIVEC_BUILTIN_VEC_STVFLXL, ALTIVEC_BUILTIN_STVFLXL, ++ RS6000_BTI_void, RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V16QI }, ++ { ALTIVEC_BUILTIN_VEC_STVFLXL, ALTIVEC_BUILTIN_STVFLXL, ++ RS6000_BTI_void, RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTQI }, ++ { ALTIVEC_BUILTIN_VEC_STVFRX, ALTIVEC_BUILTIN_STVFRX, ++ RS6000_BTI_void, RS6000_BTI_V4SF, RS6000_BTI_INTSI, ~RS6000_BTI_V4SF }, ++ { ALTIVEC_BUILTIN_VEC_STVFRX, ALTIVEC_BUILTIN_STVFRX, ++ RS6000_BTI_void, RS6000_BTI_V4SF, RS6000_BTI_INTSI, ~RS6000_BTI_float }, ++ { ALTIVEC_BUILTIN_VEC_STVFRX, ALTIVEC_BUILTIN_STVFRX, ++ RS6000_BTI_void, RS6000_BTI_bool_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V4SI }, ++ { ALTIVEC_BUILTIN_VEC_STVFRX, ALTIVEC_BUILTIN_STVFRX, ++ RS6000_BTI_void, RS6000_BTI_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_V4SI }, ++ { ALTIVEC_BUILTIN_VEC_STVFRX, ALTIVEC_BUILTIN_STVFRX, ++ RS6000_BTI_void, RS6000_BTI_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_INTSI }, ++ { ALTIVEC_BUILTIN_VEC_STVFRX, ALTIVEC_BUILTIN_STVFRX, ++ RS6000_BTI_void, RS6000_BTI_unsigned_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V4SI }, ++ { ALTIVEC_BUILTIN_VEC_STVFRX, ALTIVEC_BUILTIN_STVFRX, ++ RS6000_BTI_void, RS6000_BTI_unsigned_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTSI }, ++ { ALTIVEC_BUILTIN_VEC_STVFRX, ALTIVEC_BUILTIN_STVFRX, ++ RS6000_BTI_void, RS6000_BTI_bool_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V8HI }, ++ { ALTIVEC_BUILTIN_VEC_STVFRX, ALTIVEC_BUILTIN_STVFRX, ++ RS6000_BTI_void, RS6000_BTI_pixel_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_pixel_V8HI }, ++ { ALTIVEC_BUILTIN_VEC_STVFRX, ALTIVEC_BUILTIN_STVFRX, ++ RS6000_BTI_void, RS6000_BTI_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_V8HI }, ++ { ALTIVEC_BUILTIN_VEC_STVFRX, ALTIVEC_BUILTIN_STVFRX, ++ RS6000_BTI_void, RS6000_BTI_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_INTHI }, ++ { ALTIVEC_BUILTIN_VEC_STVFRX, ALTIVEC_BUILTIN_STVFRX, ++ RS6000_BTI_void, RS6000_BTI_unsigned_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V8HI }, ++ { ALTIVEC_BUILTIN_VEC_STVFRX, ALTIVEC_BUILTIN_STVFRX, ++ RS6000_BTI_void, RS6000_BTI_unsigned_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTHI }, ++ { ALTIVEC_BUILTIN_VEC_STVFRX, ALTIVEC_BUILTIN_STVFRX, ++ RS6000_BTI_void, RS6000_BTI_bool_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V16QI }, ++ { ALTIVEC_BUILTIN_VEC_STVFRX, ALTIVEC_BUILTIN_STVFRX, ++ RS6000_BTI_void, RS6000_BTI_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_V16QI }, ++ { ALTIVEC_BUILTIN_VEC_STVFRX, ALTIVEC_BUILTIN_STVFRX, ++ RS6000_BTI_void, RS6000_BTI_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_INTQI }, ++ { ALTIVEC_BUILTIN_VEC_STVFRX, ALTIVEC_BUILTIN_STVFRX, ++ RS6000_BTI_void, RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V16QI }, ++ { ALTIVEC_BUILTIN_VEC_STVFRX, ALTIVEC_BUILTIN_STVFRX, ++ RS6000_BTI_void, RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTQI }, ++ { ALTIVEC_BUILTIN_VEC_STVFRXL, ALTIVEC_BUILTIN_STVFRXL, ++ RS6000_BTI_void, RS6000_BTI_V4SF, RS6000_BTI_INTSI, ~RS6000_BTI_V4SF }, ++ { ALTIVEC_BUILTIN_VEC_STVFRXL, ALTIVEC_BUILTIN_STVFRXL, ++ RS6000_BTI_void, RS6000_BTI_V4SF, RS6000_BTI_INTSI, ~RS6000_BTI_float }, ++ { ALTIVEC_BUILTIN_VEC_STVFRXL, ALTIVEC_BUILTIN_STVFRXL, ++ RS6000_BTI_void, RS6000_BTI_bool_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V4SI }, ++ { ALTIVEC_BUILTIN_VEC_STVFRXL, ALTIVEC_BUILTIN_STVFRXL, ++ RS6000_BTI_void, RS6000_BTI_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_V4SI }, ++ { ALTIVEC_BUILTIN_VEC_STVFRXL, ALTIVEC_BUILTIN_STVFRXL, ++ RS6000_BTI_void, RS6000_BTI_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_INTSI }, ++ { ALTIVEC_BUILTIN_VEC_STVFRXL, ALTIVEC_BUILTIN_STVFRXL, ++ RS6000_BTI_void, RS6000_BTI_unsigned_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V4SI }, ++ { ALTIVEC_BUILTIN_VEC_STVFRXL, ALTIVEC_BUILTIN_STVFRXL, ++ RS6000_BTI_void, RS6000_BTI_unsigned_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTSI }, ++ { ALTIVEC_BUILTIN_VEC_STVFRXL, ALTIVEC_BUILTIN_STVFRXL, ++ RS6000_BTI_void, RS6000_BTI_bool_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V8HI }, ++ { ALTIVEC_BUILTIN_VEC_STVFRXL, ALTIVEC_BUILTIN_STVFRXL, ++ RS6000_BTI_void, RS6000_BTI_pixel_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_pixel_V8HI }, ++ { ALTIVEC_BUILTIN_VEC_STVFRXL, ALTIVEC_BUILTIN_STVFRXL, ++ RS6000_BTI_void, RS6000_BTI_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_V8HI }, ++ { ALTIVEC_BUILTIN_VEC_STVFRXL, ALTIVEC_BUILTIN_STVFRXL, ++ RS6000_BTI_void, RS6000_BTI_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_INTHI }, ++ { ALTIVEC_BUILTIN_VEC_STVFRXL, ALTIVEC_BUILTIN_STVFRXL, ++ RS6000_BTI_void, RS6000_BTI_unsigned_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V8HI }, ++ { ALTIVEC_BUILTIN_VEC_STVFRXL, ALTIVEC_BUILTIN_STVFRXL, ++ RS6000_BTI_void, RS6000_BTI_unsigned_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTHI }, ++ { ALTIVEC_BUILTIN_VEC_STVFRXL, ALTIVEC_BUILTIN_STVFRXL, ++ RS6000_BTI_void, RS6000_BTI_bool_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V16QI }, ++ { ALTIVEC_BUILTIN_VEC_STVFRXL, ALTIVEC_BUILTIN_STVFRXL, ++ RS6000_BTI_void, RS6000_BTI_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_V16QI }, ++ { ALTIVEC_BUILTIN_VEC_STVFRXL, ALTIVEC_BUILTIN_STVFRXL, ++ RS6000_BTI_void, RS6000_BTI_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_INTQI }, ++ { ALTIVEC_BUILTIN_VEC_STVFRXL, ALTIVEC_BUILTIN_STVFRXL, ++ RS6000_BTI_void, RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V16QI }, ++ { ALTIVEC_BUILTIN_VEC_STVFRXL, ALTIVEC_BUILTIN_STVFRXL, ++ RS6000_BTI_void, RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTQI }, ++ { ALTIVEC_BUILTIN_VEC_STVSWX, ALTIVEC_BUILTIN_STVSWX, ++ RS6000_BTI_void, RS6000_BTI_V4SF, RS6000_BTI_INTSI, ~RS6000_BTI_V4SF }, ++ { ALTIVEC_BUILTIN_VEC_STVSWX, ALTIVEC_BUILTIN_STVSWX, ++ RS6000_BTI_void, RS6000_BTI_V4SF, RS6000_BTI_INTSI, ~RS6000_BTI_float }, ++ { ALTIVEC_BUILTIN_VEC_STVSWX, ALTIVEC_BUILTIN_STVSWX, ++ RS6000_BTI_void, RS6000_BTI_bool_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V4SI }, ++ { ALTIVEC_BUILTIN_VEC_STVSWX, ALTIVEC_BUILTIN_STVSWX, ++ RS6000_BTI_void, RS6000_BTI_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_V4SI }, ++ { ALTIVEC_BUILTIN_VEC_STVSWX, ALTIVEC_BUILTIN_STVSWX, ++ RS6000_BTI_void, RS6000_BTI_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_INTSI }, ++ { ALTIVEC_BUILTIN_VEC_STVSWX, ALTIVEC_BUILTIN_STVSWX, ++ RS6000_BTI_void, RS6000_BTI_unsigned_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V4SI }, ++ { ALTIVEC_BUILTIN_VEC_STVSWX, ALTIVEC_BUILTIN_STVSWX, ++ RS6000_BTI_void, RS6000_BTI_unsigned_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTSI }, ++ { ALTIVEC_BUILTIN_VEC_STVSWX, ALTIVEC_BUILTIN_STVSWX, ++ RS6000_BTI_void, RS6000_BTI_bool_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V8HI }, ++ { ALTIVEC_BUILTIN_VEC_STVSWX, ALTIVEC_BUILTIN_STVSWX, ++ RS6000_BTI_void, RS6000_BTI_pixel_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_pixel_V8HI }, ++ { ALTIVEC_BUILTIN_VEC_STVSWX, ALTIVEC_BUILTIN_STVSWX, ++ RS6000_BTI_void, RS6000_BTI_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_V8HI }, ++ { ALTIVEC_BUILTIN_VEC_STVSWX, ALTIVEC_BUILTIN_STVSWX, ++ RS6000_BTI_void, RS6000_BTI_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_INTHI }, ++ { ALTIVEC_BUILTIN_VEC_STVSWX, ALTIVEC_BUILTIN_STVSWX, ++ RS6000_BTI_void, RS6000_BTI_unsigned_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V8HI }, ++ { ALTIVEC_BUILTIN_VEC_STVSWX, ALTIVEC_BUILTIN_STVSWX, ++ RS6000_BTI_void, RS6000_BTI_unsigned_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTHI }, ++ { ALTIVEC_BUILTIN_VEC_STVSWX, ALTIVEC_BUILTIN_STVSWX, ++ RS6000_BTI_void, RS6000_BTI_bool_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V16QI }, ++ { ALTIVEC_BUILTIN_VEC_STVSWX, ALTIVEC_BUILTIN_STVSWX, ++ RS6000_BTI_void, RS6000_BTI_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_V16QI }, ++ { ALTIVEC_BUILTIN_VEC_STVSWX, ALTIVEC_BUILTIN_STVSWX, ++ RS6000_BTI_void, RS6000_BTI_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_INTQI }, ++ { ALTIVEC_BUILTIN_VEC_STVSWX, ALTIVEC_BUILTIN_STVSWX, ++ RS6000_BTI_void, RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V16QI }, ++ { ALTIVEC_BUILTIN_VEC_STVSWX, ALTIVEC_BUILTIN_STVSWX, ++ RS6000_BTI_void, RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTQI }, ++ { ALTIVEC_BUILTIN_VEC_STVSWXL, ALTIVEC_BUILTIN_STVSWXL, ++ RS6000_BTI_void, RS6000_BTI_V4SF, RS6000_BTI_INTSI, ~RS6000_BTI_V4SF }, ++ { ALTIVEC_BUILTIN_VEC_STVSWXL, ALTIVEC_BUILTIN_STVSWXL, ++ RS6000_BTI_void, RS6000_BTI_V4SF, RS6000_BTI_INTSI, ~RS6000_BTI_float }, ++ { ALTIVEC_BUILTIN_VEC_STVSWXL, ALTIVEC_BUILTIN_STVSWXL, ++ RS6000_BTI_void, RS6000_BTI_bool_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V4SI }, ++ { ALTIVEC_BUILTIN_VEC_STVSWXL, ALTIVEC_BUILTIN_STVSWXL, ++ RS6000_BTI_void, RS6000_BTI_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_V4SI }, ++ { ALTIVEC_BUILTIN_VEC_STVSWXL, ALTIVEC_BUILTIN_STVSWXL, ++ RS6000_BTI_void, RS6000_BTI_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_INTSI }, ++ { ALTIVEC_BUILTIN_VEC_STVSWXL, ALTIVEC_BUILTIN_STVSWXL, ++ RS6000_BTI_void, RS6000_BTI_unsigned_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V4SI }, ++ { ALTIVEC_BUILTIN_VEC_STVSWXL, ALTIVEC_BUILTIN_STVSWXL, ++ RS6000_BTI_void, RS6000_BTI_unsigned_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTSI }, ++ { ALTIVEC_BUILTIN_VEC_STVSWXL, ALTIVEC_BUILTIN_STVSWXL, ++ RS6000_BTI_void, RS6000_BTI_bool_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V8HI }, ++ { ALTIVEC_BUILTIN_VEC_STVSWXL, ALTIVEC_BUILTIN_STVSWXL, ++ RS6000_BTI_void, RS6000_BTI_pixel_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_pixel_V8HI }, ++ { ALTIVEC_BUILTIN_VEC_STVSWXL, ALTIVEC_BUILTIN_STVSWXL, ++ RS6000_BTI_void, RS6000_BTI_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_V8HI }, ++ { ALTIVEC_BUILTIN_VEC_STVSWXL, ALTIVEC_BUILTIN_STVSWXL, ++ RS6000_BTI_void, RS6000_BTI_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_INTHI }, ++ { ALTIVEC_BUILTIN_VEC_STVSWXL, ALTIVEC_BUILTIN_STVSWXL, ++ RS6000_BTI_void, RS6000_BTI_unsigned_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V8HI }, ++ { ALTIVEC_BUILTIN_VEC_STVSWXL, ALTIVEC_BUILTIN_STVSWXL, ++ RS6000_BTI_void, RS6000_BTI_unsigned_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTHI }, ++ { ALTIVEC_BUILTIN_VEC_STVSWXL, ALTIVEC_BUILTIN_STVSWXL, ++ RS6000_BTI_void, RS6000_BTI_bool_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V16QI }, ++ { ALTIVEC_BUILTIN_VEC_STVSWXL, ALTIVEC_BUILTIN_STVSWXL, ++ RS6000_BTI_void, RS6000_BTI_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_V16QI }, ++ { ALTIVEC_BUILTIN_VEC_STVSWXL, ALTIVEC_BUILTIN_STVSWXL, ++ RS6000_BTI_void, RS6000_BTI_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_INTQI }, ++ { ALTIVEC_BUILTIN_VEC_STVSWXL, ALTIVEC_BUILTIN_STVSWXL, ++ RS6000_BTI_void, RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V16QI }, ++ { ALTIVEC_BUILTIN_VEC_STVSWXL, ALTIVEC_BUILTIN_STVSWXL, ++ RS6000_BTI_void, RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTQI }, + { VSX_BUILTIN_VEC_XXSLDWI, VSX_BUILTIN_XXSLDWI_16QI, + RS6000_BTI_V16QI, RS6000_BTI_V16QI, RS6000_BTI_V16QI, RS6000_BTI_NOT_OPAQUE }, + { VSX_BUILTIN_VEC_XXSLDWI, VSX_BUILTIN_XXSLDWI_16QI, +diff -ruN gcc-4.6.2-orig/gcc/config/rs6000/rs6000.h gcc-4.6.2/gcc/config/rs6000/rs6000.h +--- gcc-4.6.2-orig/gcc/config/rs6000/rs6000.h 2011-07-27 13:17:15.000000000 -0500 ++++ gcc-4.6.2/gcc/config/rs6000/rs6000.h 2012-03-06 12:16:25.582039002 -0600 +@@ -168,6 +168,8 @@ + %{mcpu=e300c3: -me300} \ + %{mcpu=e500mc: -me500mc} \ + %{mcpu=e500mc64: -me500mc64} \ ++%{mcpu=e5500: -me5500} \ ++%{mcpu=e6500: -me6500} \ + %{maltivec: -maltivec} \ + %{mvsx: -mvsx %{!maltivec: -maltivec} %{!mcpu*: %(asm_cpu_power7)}} \ + -many" +@@ -477,13 +479,15 @@ + + #define TARGET_FCTIDZ TARGET_FCFID + #define TARGET_STFIWX TARGET_PPC_GFXOPT +-#define TARGET_LFIWAX TARGET_CMPB +-#define TARGET_LFIWZX TARGET_POPCNTD +-#define TARGET_FCFIDS TARGET_POPCNTD +-#define TARGET_FCFIDU TARGET_POPCNTD +-#define TARGET_FCFIDUS TARGET_POPCNTD +-#define TARGET_FCTIDUZ TARGET_POPCNTD +-#define TARGET_FCTIWUZ TARGET_POPCNTD ++#define TARGET_LFIWAX (TARGET_CMPB && rs6000_cpu != PROCESSOR_PPCE5500 \ ++ && rs6000_cpu != PROCESSOR_PPCE6500) ++#define TARGET_LFIWZX (TARGET_POPCNTD && rs6000_cpu != PROCESSOR_PPCE5500 \ ++ && rs6000_cpu != PROCESSOR_PPCE6500) ++#define TARGET_FCFIDS TARGET_LFIWZX ++#define TARGET_FCFIDU TARGET_LFIWZX ++#define TARGET_FCFIDUS TARGET_LFIWZX ++#define TARGET_FCTIDUZ TARGET_LFIWZX ++#define TARGET_FCTIWUZ TARGET_LFIWZX + + /* E500 processors only support plain "sync", not lwsync. */ + #define TARGET_NO_LWSYNC TARGET_E500 +@@ -494,10 +498,14 @@ + + #define TARGET_FRE (TARGET_HARD_FLOAT && TARGET_FPRS \ + && TARGET_DOUBLE_FLOAT \ +- && (TARGET_POPCNTB || VECTOR_UNIT_VSX_P (DFmode))) ++ && (TARGET_POPCNTB || VECTOR_UNIT_VSX_P (DFmode)) \ ++ && rs6000_cpu != PROCESSOR_PPCE5500 \ ++ && rs6000_cpu != PROCESSOR_PPCE6500) + + #define TARGET_FRSQRTES (TARGET_HARD_FLOAT && TARGET_POPCNTB \ +- && TARGET_FPRS && TARGET_SINGLE_FLOAT) ++ && TARGET_FPRS && TARGET_SINGLE_FLOAT \ ++ && rs6000_cpu != PROCESSOR_PPCE5500 \ ++ && rs6000_cpu != PROCESSOR_PPCE6500) + + #define TARGET_FRSQRTE (TARGET_HARD_FLOAT && TARGET_FPRS \ + && TARGET_DOUBLE_FLOAT \ +diff -ruN gcc-4.6.2-orig/gcc/config/rs6000/rs6000.md gcc-4.6.2/gcc/config/rs6000/rs6000.md +--- gcc-4.6.2-orig/gcc/config/rs6000/rs6000.md 2011-09-19 11:41:20.000000000 -0500 ++++ gcc-4.6.2/gcc/config/rs6000/rs6000.md 2012-03-06 12:16:25.584039002 -0600 +@@ -126,7 +126,7 @@ + + ;; Define an insn type attribute. This is used in function unit delay + ;; computations. +-(define_attr "type" "integer,two,three,load,load_ext,load_ext_u,load_ext_ux,load_ux,load_u,store,store_ux,store_u,fpload,fpload_ux,fpload_u,fpstore,fpstore_ux,fpstore_u,vecload,vecstore,imul,imul2,imul3,lmul,idiv,ldiv,insert_word,branch,cmp,fast_compare,compare,var_delayed_compare,delayed_compare,imul_compare,lmul_compare,fpcompare,cr_logical,delayed_cr,mfcr,mfcrf,mtcr,mfjmpr,mtjmpr,fp,fpsimple,dmul,sdiv,ddiv,ssqrt,dsqrt,jmpreg,brinc,vecsimple,veccomplex,vecdiv,veccmp,veccmpsimple,vecperm,vecfloat,vecfdiv,isync,sync,load_l,store_c,shift,trap,insert_dword,var_shift_rotate,cntlz,exts,mffgpr,mftgpr,isel" ++(define_attr "type" "integer,two,three,load,load_ext,load_ext_u,load_ext_ux,load_ux,load_u,store,store_ux,store_u,fpload,fpload_ux,fpload_u,fpstore,fpstore_ux,fpstore_u,vecload,vecstore,imul,imul2,imul3,lmul,idiv,ldiv,insert_word,branch,cmp,fast_compare,compare,var_delayed_compare,delayed_compare,imul_compare,lmul_compare,fpcompare,cr_logical,delayed_cr,mfcr,mfcrf,mtcr,mfjmpr,mtjmpr,fp,fpsimple,dmul,sdiv,ddiv,ssqrt,dsqrt,jmpreg,brinc,vecsimple,veccomplex,vecdiv,veccmp,veccmpsimple,vecperm,vecfloat,vecfdiv,isync,sync,load_l,store_c,shift,trap,insert_dword,var_shift_rotate,cntlz,exts,mffgpr,mftgpr,isel,popcnt" + (const_string "integer")) + + ;; Define floating point instruction sub-types for use with Xfpu.md +@@ -148,7 +148,7 @@ + ;; Processor type -- this attribute must exactly match the processor_type + ;; enumeration in rs6000.h. + +-(define_attr "cpu" "rios1,rios2,rs64a,mpccore,ppc403,ppc405,ppc440,ppc476,ppc601,ppc603,ppc604,ppc604e,ppc620,ppc630,ppc750,ppc7400,ppc7450,ppc8540,ppce300c2,ppce300c3,ppce500mc,ppce500mc64,power4,power5,power6,power7,cell,ppca2,titan" ++(define_attr "cpu" "rios1,rios2,rs64a,mpccore,ppc403,ppc405,ppc440,ppc476,ppc601,ppc603,ppc604,ppc604e,ppc620,ppc630,ppc750,ppc7400,ppc7450,ppc8540,ppce300c2,ppce300c3,ppce500mc,ppce500mc64,ppce5500,ppce6500,power4,power5,power6,power7,cell,ppca2,titan" + (const (symbol_ref "rs6000_cpu_attr"))) + + +@@ -176,6 +176,8 @@ + (include "e300c2c3.md") + (include "e500mc.md") + (include "e500mc64.md") ++(include "e5500.md") ++(include "e6500.md") + (include "power4.md") + (include "power5.md") + (include "power6.md") +@@ -2302,13 +2304,17 @@ + (unspec:GPR [(match_operand:GPR 1 "gpc_reg_operand" "r")] + UNSPEC_POPCNTB))] + "TARGET_POPCNTB" +- "popcntb %0,%1") ++ "popcntb %0,%1" ++ [(set_attr "length" "4") ++ (set_attr "type" "popcnt")]) + + (define_insn "popcntd2" + [(set (match_operand:GPR 0 "gpc_reg_operand" "=r") + (popcount:GPR (match_operand:GPR 1 "gpc_reg_operand" "r")))] + "TARGET_POPCNTD" +- "popcnt %0,%1") ++ "popcnt %0,%1" ++ [(set_attr "length" "4") ++ (set_attr "type" "popcnt")]) + + (define_expand "popcount2" + [(set (match_operand:GPR 0 "gpc_reg_operand" "") +@@ -5957,10 +5963,10 @@ + && ((TARGET_PPC_GFXOPT + && !HONOR_NANS (mode) + && !HONOR_SIGNED_ZEROS (mode)) +- || TARGET_CMPB ++ || TARGET_LFIWAX + || VECTOR_UNIT_VSX_P (mode))" + { +- if (TARGET_CMPB || VECTOR_UNIT_VSX_P (mode)) ++ if (TARGET_LFIWAX || VECTOR_UNIT_VSX_P (mode)) + { + emit_insn (gen_copysign3_fcpsgn (operands[0], operands[1], + operands[2])); +@@ -5979,7 +5985,7 @@ + (unspec:SFDF [(match_operand:SFDF 1 "gpc_reg_operand" "") + (match_operand:SFDF 2 "gpc_reg_operand" "")] + UNSPEC_COPYSIGN))] +- "TARGET_CMPB && !VECTOR_UNIT_VSX_P (mode)" ++ "TARGET_LFIWAX && !VECTOR_UNIT_VSX_P (mode)" + "fcpsgn %0,%2,%1" + [(set_attr "type" "fp")]) + +diff -ruN gcc-4.6.2-orig/gcc/config/rs6000/rs6000.opt gcc-4.6.2/gcc/config/rs6000/rs6000.opt +--- gcc-4.6.2-orig/gcc/config/rs6000/rs6000.opt 2010-11-29 19:47:54.000000000 -0600 ++++ gcc-4.6.2/gcc/config/rs6000/rs6000.opt 2012-03-06 12:16:25.584039002 -0600 +@@ -179,6 +179,10 @@ + Target Report Mask(ALTIVEC) Save + Use AltiVec instructions + ++maltivec2 ++Target Report Mask(ALTIVEC2) Save ++Use AltiVec PowerPC V2.07 instructions ++ + mhard-dfp + Target Report Mask(DFP) Save + Use decimal floating point instructions +diff -ruN gcc-4.6.2-orig/gcc/config/rs6000/rs6000-opts.h gcc-4.6.2/gcc/config/rs6000/rs6000-opts.h +--- gcc-4.6.2-orig/gcc/config/rs6000/rs6000-opts.h 2010-11-19 11:27:18.000000000 -0600 ++++ gcc-4.6.2/gcc/config/rs6000/rs6000-opts.h 2012-03-06 12:16:25.584039002 -0600 +@@ -53,6 +53,8 @@ + PROCESSOR_PPCE300C3, + PROCESSOR_PPCE500MC, + PROCESSOR_PPCE500MC64, ++ PROCESSOR_PPCE5500, ++ PROCESSOR_PPCE6500, + PROCESSOR_POWER4, + PROCESSOR_POWER5, + PROCESSOR_POWER6, +diff -ruN gcc-4.6.2-orig/gcc/config.gcc gcc-4.6.2/gcc/config.gcc +--- gcc-4.6.2-orig/gcc/config.gcc 2011-07-22 11:44:50.000000000 -0500 ++++ gcc-4.6.2/gcc/config.gcc 2012-03-06 12:16:25.585039002 -0600 +@@ -396,7 +396,7 @@ + extra_headers="ppc-asm.h altivec.h spe.h ppu_intrinsics.h paired.h spu2vmx.h vec_types.h si2vmx.h" + need_64bit_hwint=yes + case x$with_cpu in +- xpowerpc64|xdefault64|x6[23]0|x970|xG5|xpower[34567]|xpower6x|xrs64a|xcell|xa2|xe500mc64) ++ xpowerpc64|xdefault64|x6[23]0|x970|xG5|xpower[34567]|xpower6x|xrs64a|xcell|xa2|xe500mc64|xe5500|Xe6500) + cpu_is_64bit=yes + ;; + esac +@@ -3501,8 +3501,8 @@ + | 401 | 403 | 405 | 405fp | 440 | 440fp | 464 | 464fp \ + | 476 | 476fp | 505 | 601 | 602 | 603 | 603e | ec603e \ + | 604 | 604e | 620 | 630 | 740 | 750 | 7400 | 7450 \ +- | a2 | e300c[23] | 854[08] | e500mc | e500mc64 | titan\ +- | 801 | 821 | 823 | 860 | 970 | G3 | G4 | G5 | cell) ++ | a2 | e300c[23] | 854[08] | e500mc | e500mc64 | e5500 | e6500 \ ++ | titan | 801 | 821 | 823 | 860 | 970 | G3 | G4 | G5 | cell) + # OK + ;; + *) +diff -ruN gcc-4.6.2-orig/gcc/doc/extend.texi gcc-4.6.2/gcc/doc/extend.texi +--- gcc-4.6.2-orig/gcc/doc/extend.texi 2011-10-24 09:55:45.000000000 -0500 ++++ gcc-4.6.2/gcc/doc/extend.texi 2012-03-06 12:56:49.399039002 -0600 +@@ -12509,6 +12509,291 @@ + @samp{vec_vsx_st} builtins will always generate the VSX @samp{LXVD2X}, + @samp{LXVW4X}, @samp{STXVD2X}, and @samp{STXVW4X} instructions. + ++Using @option{-maltivec2} will extend the Altivec interface with the ++following additional functions: ++ ++@smallexample ++vector unsigned char vec_absd (vector unsigned char, vector unsigned char); ++vector unsigned char vec_absd (vector bool char, vector unsigned char); ++vector unsigned char vec_absd (vector unsigned char, vector bool char); ++vector unsigned short vec_absd (vector unsigned short, vector unsigned short); ++vector unsigned short vec_absd (vector bool short, vector unsigned short); ++vector unsigned short vec_absd (vector unsigned short, vector bool short); ++vector unsigned int vec_absd (vector unsigned int, vector unsigned int); ++vector unsigned int vec_absd (vector bool int, vector unsigned int); ++vector unsigned int vec_absd (vector unsigned int, vector bool int); ++ ++vector signed char vec_lvexbx (long, signed char *); ++vector unsigned char vec_lvexbx (long, unsigned char *); ++vector signed short vec_lvexhx (long, signed short *); ++vector unsigned short vec_lvexhx (long, unsigned short *); ++vector float vec_lvexwx (long, float *); ++vector signed int vec_lvexwx (long, signed int *); ++vector unsigned int vec_lvexwx (long, unsigned int *); ++vector signed int vec_lvexwx (long, signed long *); ++vector unsigned int vec_lvexwx (long, unsigned long *); ++ ++void vec_stvexbx (vector signed char, long, signed char *); ++void vec_stvexbx (vector unsigned char, long, unsigned char *); ++void vec_stvexbx (vector bool char, long, signed char *); ++void vec_stvexbx (vector bool char, long, unsigned char *); ++void vec_stvexbx (vector signed char, long, void *); ++void vec_stvexbx (vector unsigned char, long, void *); ++void vec_stvexhx (vector signed short, long, signed short *); ++void vec_stvexhx (vector unsigned short, long, unsigned short *); ++void vec_stvexhx (vector bool short, long, signed short *); ++void vec_stvexhx (vector bool short, long, unsigned short *); ++void vec_stvexhx (vector signed short, long, void *); ++void vec_stvexhx (vector unsigned short, long, void *); ++void vec_stvexwx (vector float, long, float *); ++void vec_stvexwx (vector signed int, long, signed int *); ++void vec_stvexwx (vector unsigned int, long, unsigned int *); ++void vec_stvexwx (vector bool int, long, signed int *); ++void vec_stvexwx (vector bool int, long, unsigned int *); ++void vec_stvexwx (vector float, long, void *); ++void vec_stvexwx (vector signed int, long, void *); ++void vec_stvexwx (vector unsigned int, long, void *); ++ ++vector float vec_lvtlx (long, vector float *); ++vector float vec_lvtlx (long, float *); ++vector bool int vec_lvtlx (long, vector bool int *); ++vector signed int vec_lvtlx (long, vector signed int *); ++vector signed int vec_lvtlx (long, signed int *); ++vector unsigned int vec_lvtlx (long, vector unsigned int *); ++vector unsigned int vec_lvtlx (long, unsigned int *); ++vector bool short vec_lvtlx (long, vector bool short *); ++vector pixel vec_lvtlx (long, vector pixel *); ++vector signed short vec_lvtlx (long, vector signed short *); ++vector signed short vec_lvtlx (long, signed short *); ++vector unsigned short vec_lvtlx (long, vector unsigned short *); ++vector unsigned short vec_lvtlx (long, unsigned short *); ++vector bool char vec_lvtlx (long, vector bool char *); ++vector signed char vec_lvtlx (long, vector signed char *); ++vector signed char vec_lvtlx (long, signed char *); ++vector unsigned char vec_lvtlx (long, vector unsigned char *); ++vector unsigned char vec_lvtlx (long, unsigned char *); ++vector float vec_lvtlxl (long, vector float *); ++vector float vec_lvtlxl (long, float *); ++vector bool int vec_lvtlxl (long, vector bool int *); ++vector signed int vec_lvtlxl (long, vector signed int *); ++vector signed int vec_lvtlxl (long, signed int *); ++vector unsigned int vec_lvtlxl (long, vector unsigned int *); ++vector unsigned int vec_lvtlxl (long, unsigned int *); ++vector bool short vec_lvtlxl (long, vector bool short *); ++vector pixel vec_lvtlxl (long, vector pixel *); ++vector signed short vec_lvtlxl (long, vector signed short *); ++vector signed short vec_lvtlxl (long, signed short *); ++vector unsigned short vec_lvtlxl (long, vector unsigned short *); ++vector unsigned short vec_lvtlxl (long, unsigned short *); ++vector bool char vec_lvtlxl (long, vector bool char *); ++vector signed char vec_lvtlxl (long, vector signed char *); ++vector signed char vec_lvtlxl (long, signed char *); ++vector unsigned char vec_lvtlxl (long, vector unsigned char *); ++vector unsigned char vec_lvtlxl (long, unsigned char *); ++vector float vec_lvtrx (long, vector float *); ++vector float vec_lvtrx (long, float *); ++vector bool int vec_lvtrx (long, vector bool int *); ++vector signed int vec_lvtrx (long, vector signed int *); ++vector signed int vec_lvtrx (long, signed int *); ++vector unsigned int vec_lvtrx (long, vector unsigned int *); ++vector unsigned int vec_lvtrx (long, unsigned int *); ++vector bool short vec_lvtrx (long, vector bool short *); ++vector pixel vec_lvtrx (long, vector pixel *); ++vector signed short vec_lvtrx (long, vector signed short *); ++vector signed short vec_lvtrx (long, signed short *); ++vector unsigned short vec_lvtrx (long, vector unsigned short *); ++vector unsigned short vec_lvtrx (long, unsigned short *); ++vector bool char vec_lvtrx (long, vector bool char *); ++vector signed char vec_lvtrx (long, vector signed char *); ++vector signed char vec_lvtrx (long, signed char *); ++vector unsigned char vec_lvtrx (long, vector unsigned char *); ++vector unsigned char vec_lvtrx (long, unsigned char *); ++vector float vec_lvtrxl (long, vector float *); ++vector float vec_lvtrxl (long, float *); ++vector bool int vec_lvtrxl (long, vector bool int *); ++vector signed int vec_lvtrxl (long, vector signed int *); ++vector signed int vec_lvtrxl (long, signed int *); ++vector unsigned int vec_lvtrxl (long, vector unsigned int *); ++vector unsigned int vec_lvtrxl (long, unsigned int *); ++vector bool short vec_lvtrxl (long, vector bool short *); ++vector pixel vec_lvtrxl (long, vector pixel *); ++vector signed short vec_lvtrxl (long, vector signed short *); ++vector signed short vec_lvtrxl (long, signed short *); ++vector unsigned short vec_lvtrxl (long, vector unsigned short *); ++vector unsigned short vec_lvtrxl (long, unsigned short *); ++vector bool char vec_lvtrxl (long, vector bool char *); ++vector signed char vec_lvtrxl (long, vector signed char *); ++vector signed char vec_lvtrxl (long, signed char *); ++vector unsigned char vec_lvtrxl (long, vector unsigned char *); ++vector unsigned char vec_lvtrxl (long, unsigned char *); ++ ++void vec_stvflx (vector float, long, vector float *); ++void vec_stvflx (vector float, long, float *); ++void vec_stvflx (vector bool int, long, vector bool int *); ++void vec_stvflx (vector signed int, long, vector signed int *); ++void vec_stvflx (vector signed int, long, signed int *); ++void vec_stvflx (vector unsigned int, long, vector unsigned int *); ++void vec_stvflx (vector unsigned int, long, unsigned int *); ++void vec_stvflx (vector bool short, long, vector bool short *); ++void vec_stvflx (vector pixel, long, vector pixel *); ++void vec_stvflx (vector signed short, long, vector signed short *); ++void vec_stvflx (vector signed short, long, signed short *); ++void vec_stvflx (vector unsigned short, long, vector unsigned short *); ++void vec_stvflx (vector unsigned short, long, unsigned short *); ++void vec_stvflx (vector bool char, long, vector bool char *); ++void vec_stvflx (vector signed char, long, vector signed char *); ++void vec_stvflx (vector signed char, long, signed char *); ++void vec_stvflx (vector unsigned char, long, vector unsigned char *); ++void vec_stvflx (vector unsigned char, long, unsigned char *); ++void vec_stvflxl (vector float, long, vector float *); ++void vec_stvflxl (vector float, long, float *); ++void vec_stvflxl (vector bool int, long, vector bool int *); ++void vec_stvflxl (vector signed int, long, vector signed int *); ++void vec_stvflxl (vector signed int, long, signed int *); ++void vec_stvflxl (vector unsigned int, long, vector unsigned int *); ++void vec_stvflxl (vector unsigned int, long, unsigned int *); ++void vec_stvflxl (vector bool short, long, vector bool short *); ++void vec_stvflxl (vector pixel, long, vector pixel *); ++void vec_stvflxl (vector signed short, long, vector signed short *); ++void vec_stvflxl (vector signed short, long, signed short *); ++void vec_stvflxl (vector unsigned short, long, vector unsigned short *); ++void vec_stvflxl (vector unsigned short, long, unsigned short *); ++void vec_stvflxl (vector bool char, long, vector bool char *); ++void vec_stvflxl (vector signed char, long, vector signed char *); ++void vec_stvflxl (vector signed char, long, signed char *); ++void vec_stvflxl (vector unsigned char, long, vector unsigned char *); ++void vec_stvflxl (vector unsigned char, long, unsigned char *); ++void vec_stvfrx (vector float, long, vector float *); ++void vec_stvfrx (vector float, long, float *); ++void vec_stvfrx (vector bool int, long, vector bool int *); ++void vec_stvfrx (vector signed int, long, vector signed int *); ++void vec_stvfrx (vector signed int, long, signed int *); ++void vec_stvfrx (vector unsigned int, long, vector unsigned int *); ++void vec_stvfrx (vector unsigned int, long, unsigned int *); ++void vec_stvfrx (vector bool short, long, vector bool short *); ++void vec_stvfrx (vector pixel, long, vector pixel *); ++void vec_stvfrx (vector signed short, long, vector signed short *); ++void vec_stvfrx (vector signed short, long, signed short *); ++void vec_stvfrx (vector unsigned short, long, vector unsigned short *); ++void vec_stvfrx (vector unsigned short, long, unsigned short *); ++void vec_stvfrx (vector bool char, long, vector bool char *); ++void vec_stvfrx (vector signed char, long, vector signed char *); ++void vec_stvfrx (vector signed char, long, signed char *); ++void vec_stvfrx (vector unsigned char, long, vector unsigned char *); ++void vec_stvfrx (vector unsigned char, long, unsigned char *); ++void vec_stvfrxl (vector float, long, vector float *); ++void vec_stvfrxl (vector float, long, float *); ++void vec_stvfrxl (vector bool int, long, vector bool int *); ++void vec_stvfrxl (vector signed int, long, vector signed int *); ++void vec_stvfrxl (vector signed int, long, signed int *); ++void vec_stvfrxl (vector unsigned int, long, vector unsigned int *); ++void vec_stvfrxl (vector unsigned int, long, unsigned int *); ++void vec_stvfrxl (vector bool short, long, vector bool short *); ++void vec_stvfrxl (vector pixel, long, vector pixel *); ++void vec_stvfrxl (vector signed short, long, vector signed short *); ++void vec_stvfrxl (vector signed short, long, signed short *); ++void vec_stvfrxl (vector unsigned short, long, vector unsigned short *); ++void vec_stvfrxl (vector unsigned short, long, unsigned short *); ++void vec_stvfrxl (vector bool char, long, vector bool char *); ++void vec_stvfrxl (vector signed char, long, vector signed char *); ++void vec_stvfrxl (vector signed char, long, signed char *); ++void vec_stvfrxl (vector unsigned char, long, vector unsigned char *); ++void vec_stvfrxl (vector unsigned char, long, unsigned char *); ++ ++vector float vec_lvswx (long, vector float *); ++vector float vec_lvswx (long, float *); ++vector bool int vec_lvswx (long, vector bool int *); ++vector signed int vec_lvswx (long, vector signed int *); ++vector signed int vec_lvswx (long, signed int *); ++vector unsigned int vec_lvswx (long, vector unsigned int *); ++vector unsigned int vec_lvswx (long, unsigned int *); ++vector bool short vec_lvswx (long, vector bool short *); ++vector pixel vec_lvswx (long, vector pixel *); ++vector signed short vec_lvswx (long, vector signed short *); ++vector signed short vec_lvswx (long, signed short *); ++vector unsigned short vec_lvswx (long, vector unsigned short *); ++vector unsigned short vec_lvswx (long, unsigned short *); ++vector bool char vec_lvswx (long, vector bool char *); ++vector signed char vec_lvswx (long, vector signed char *); ++vector signed char vec_lvswx (long, signed char *); ++vector unsigned char vec_lvswx (long, vector unsigned char *); ++vector unsigned char vec_lvswx (long, unsigned char *); ++vector float vec_lvswxl (long, vector float *); ++vector float vec_lvswxl (long, float *); ++vector bool int vec_lvswxl (long, vector bool int *); ++vector signed int vec_lvswxl (long, vector signed int *); ++vector signed int vec_lvswxl (long, signed int *); ++vector unsigned int vec_lvswxl (long, vector unsigned int *); ++vector unsigned int vec_lvswxl (long, unsigned int *); ++vector bool short vec_lvswxl (long, vector bool short *); ++vector pixel vec_lvswxl (long, vector pixel *); ++vector signed short vec_lvswxl (long, vector signed short *); ++vector signed short vec_lvswxl (long, signed short *); ++vector unsigned short vec_lvswxl (long, vector unsigned short *); ++vector unsigned short vec_lvswxl (long, unsigned short *); ++vector bool char vec_lvswxl (long, vector bool char *); ++vector signed char vec_lvswxl (long, vector signed char *); ++vector signed char vec_lvswxl (long, signed char *); ++vector unsigned char vec_lvswxl (long, vector unsigned char *); ++vector unsigned char vec_lvswxl (long, unsigned char *); ++ ++void vec_stvswx (vector float, long, vector float *); ++void vec_stvswx (vector float, long, float *); ++void vec_stvswx (vector bool int, long, vector bool int *); ++void vec_stvswx (vector signed int, long, vector signed int *); ++void vec_stvswx (vector signed int, long, signed int *); ++void vec_stvswx (vector unsigned int, long, vector unsigned int *); ++void vec_stvswx (vector unsigned int, long, unsigned int *); ++void vec_stvswx (vector bool short, long, vector bool short *); ++void vec_stvswx (vector pixel, long, vector pixel *); ++void vec_stvswx (vector signed short, long, vector signed short *); ++void vec_stvswx (vector signed short, long, signed short *); ++void vec_stvswx (vector unsigned short, long, vector unsigned short *); ++void vec_stvswx (vector unsigned short, long, unsigned short *); ++void vec_stvswx (vector bool char, long, vector bool char *); ++void vec_stvswx (vector signed char, long, vector signed char *); ++void vec_stvswx (vector signed char, long, signed char *); ++void vec_stvswx (vector unsigned char, long, vector unsigned char *); ++void vec_stvswx (vector unsigned char, long, unsigned char *); ++void vec_stvswxl (vector float, long, vector float *); ++void vec_stvswxl (vector float, long, float *); ++void vec_stvswxl (vector bool int, long, vector bool int *); ++void vec_stvswxl (vector signed int, long, vector signed int *); ++void vec_stvswxl (vector signed int, long, signed int *); ++void vec_stvswxl (vector unsigned int, long, vector unsigned int *); ++void vec_stvswxl (vector unsigned int, long, unsigned int *); ++void vec_stvswxl (vector bool short, long, vector bool short *); ++void vec_stvswxl (vector pixel, long, vector pixel *); ++void vec_stvswxl (vector signed short, long, vector signed short *); ++void vec_stvswxl (vector signed short, long, signed short *); ++void vec_stvswxl (vector unsigned short, long, vector unsigned short *); ++void vec_stvswxl (vector unsigned short, long, unsigned short *); ++void vec_stvswxl (vector bool char, long, vector bool char *); ++void vec_stvswxl (vector signed char, long, vector signed char *); ++void vec_stvswxl (vector signed char, long, signed char *); ++void vec_stvswxl (vector unsigned char, long, vector unsigned char *); ++void vec_stvswxl (vector unsigned char, long, unsigned char *); ++ ++vector float vec_lvsm (long, vector float *); ++vector float vec_lvsm (long, float *); ++vector bool int vec_lvsm (long, vector bool int *); ++vector signed int vec_lvsm (long, vector signed int *); ++vector signed int vec_lvsm (long, signed int *); ++vector unsigned int vec_lvsm (long, vector unsigned int *); ++vector unsigned int vec_lvsm (long, unsigned int *); ++vector bool short vec_lvsm (long, vector bool short *); ++vector pixel vec_lvsm (long, vector pixel *); ++vector signed short vec_lvsm (long, vector signed short *); ++vector signed short vec_lvsm (long, signed short *); ++vector unsigned short vec_lvsm (long, vector unsigned short *); ++vector unsigned short vec_lvsm (long, unsigned short *); ++vector bool char vec_lvsm (long, vector bool char *); ++vector signed char vec_lvsm (long, vector signed char *); ++vector signed char vec_lvsm (long, signed char *); ++vector unsigned char vec_lvsm (long, vector unsigned char *); ++vector unsigned char vec_lvsm (long, unsigned char *); ++@end smallexample ++ + GCC provides a few other builtins on Powerpc to access certain instructions: + @smallexample + float __builtin_recipdivf (float, float); +diff -ruN gcc-4.6.2-orig/gcc/doc/invoke.texi gcc-4.6.2/gcc/doc/invoke.texi +--- gcc-4.6.2-orig/gcc/doc/invoke.texi 2011-10-24 07:22:21.000000000 -0500 ++++ gcc-4.6.2/gcc/doc/invoke.texi 2012-03-06 12:56:49.402039002 -0600 +@@ -770,7 +770,7 @@ + -mcmodel=@var{code-model} @gol + -mpower -mno-power -mpower2 -mno-power2 @gol + -mpowerpc -mpowerpc64 -mno-powerpc @gol +--maltivec -mno-altivec @gol ++-maltivec -mno-altivec -maltivec2 -mno-altivec2 @gol + -mpowerpc-gpopt -mno-powerpc-gpopt @gol + -mpowerpc-gfxopt -mno-powerpc-gfxopt @gol + -mmfcrf -mno-mfcrf -mpopcntb -mno-popcntb -mpopcntd -mno-popcntd @gol +@@ -15536,16 +15536,21 @@ + The @option{-mpopcntb} option allows GCC to generate the popcount and + double precision FP reciprocal estimate instruction implemented on the + POWER5 processor and other processors that support the PowerPC V2.02 +-architecture. +-The @option{-mpopcntd} option allows GCC to generate the popcount +-instruction implemented on the POWER7 processor and other processors +-that support the PowerPC V2.06 architecture. ++architecture. On the e5500 and e6500 processors, only the popcount ++instruction is generated. ++The @option{-mpopcntd} option allows GCC to generate the popcount and ++double word to FP conversion instructions implemented on the POWER7 ++processor and other processors that support the PowerPC V2.06 ++architecture. On the e5500 and e6500 processors, only the popcount ++instruction is generated. + The @option{-mfprnd} option allows GCC to generate the FP round to + integer instructions implemented on the POWER5+ processor and other + processors that support the PowerPC V2.03 architecture. + The @option{-mcmpb} option allows GCC to generate the compare bytes +-instruction implemented on the POWER6 processor and other processors +-that support the PowerPC V2.05 architecture. ++and copy sign instructions implemented on the POWER6 processor and ++other processors that support the PowerPC V2.05 architecture. On the ++e5500 and e6500 processors, only the compare bytes instruction is ++generated. + The @option{-mmfpgpr} option allows GCC to generate the FP move to/from + general purpose register instructions implemented on the POWER6X + processor and other processors that support the extended PowerPC V2.05 +@@ -15592,11 +15597,13 @@ + @samp{603e}, @samp{604}, @samp{604e}, @samp{620}, @samp{630}, @samp{740}, + @samp{7400}, @samp{7450}, @samp{750}, @samp{801}, @samp{821}, @samp{823}, + @samp{860}, @samp{970}, @samp{8540}, @samp{a2}, @samp{e300c2}, +-@samp{e300c3}, @samp{e500mc}, @samp{e500mc64}, @samp{ec603e}, @samp{G3}, +-@samp{G4}, @samp{G5}, @samp{titan}, @samp{power}, @samp{power2}, @samp{power3}, +-@samp{power4}, @samp{power5}, @samp{power5+}, @samp{power6}, @samp{power6x}, +-@samp{power7}, @samp{common}, @samp{powerpc}, @samp{powerpc64}, @samp{rios}, +-@samp{rios1}, @samp{rios2}, @samp{rsc}, and @samp{rs64}. ++@samp{e300c3}, @samp{e500mc}, @samp{e500mc64}, @samp{e5500}, ++@samp{e6500}, @samp{ec603e}, @samp{G3}, @samp{G4}, @samp{G5}, ++@samp{titan}, @samp{power}, @samp{power2}, @samp{power3}, ++@samp{power4}, @samp{power5}, @samp{power5+}, @samp{power6}, ++@samp{power6x}, @samp{power7}, @samp{common}, @samp{powerpc}, ++@samp{powerpc64}, @samp{rios}, @samp{rios1}, @samp{rios2}, @samp{rsc}, ++and @samp{rs64}. + + @option{-mcpu=common} selects a completely generic processor. Code + generated under this option will run on any POWER or PowerPC processor. +@@ -15617,10 +15624,11 @@ + The @option{-mcpu} options automatically enable or disable the + following options: + +-@gccoptlist{-maltivec -mfprnd -mhard-float -mmfcrf -mmultiple @gol +--mnew-mnemonics -mpopcntb -mpopcntd -mpower -mpower2 -mpowerpc64 @gol +--mpowerpc-gpopt -mpowerpc-gfxopt -msingle-float -mdouble-float @gol +--msimple-fpu -mstring -mmulhw -mdlmzb -mmfpgpr -mvsx} ++@gccoptlist{-maltivec -maltivec2 -mfprnd -mhard-float -mmfcrf ++-mmultiple @gol -mnew-mnemonics -mpopcntb -mpopcntd -mpower -mpower2 ++-mpowerpc64 @gol -mpowerpc-gpopt -mpowerpc-gfxopt -msingle-float ++-mdouble-float @gol -msimple-fpu -mstring -mmulhw -mdlmzb -mmfpgpr ++-mvsx} + + The particular options set for any particular CPU will vary between + compiler versions, depending on what setting seems to produce optimal +@@ -15671,6 +15679,16 @@ + @option{-mabi=altivec} to adjust the current ABI with AltiVec ABI + enhancements. + ++@item -maltivec2 ++@itemx -mno-altivec2 ++@opindex maltivec2 ++@opindex mno-altivec2 ++Generate code that uses (does not use) AltiVec2 instructions, and also ++enable the use of built-in functions that allow more direct access to ++the AltiVec2 instruction set. You may also need to set ++@option{-mabi=altivec} to adjust the current ABI with AltiVec ABI ++enhancements. ++ + @item -mvrsave + @itemx -mno-vrsave + @opindex mvrsave +diff -ruN gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-10.c gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-10.c +--- gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-10.c 1969-12-31 18:00:00.000000000 -0600 ++++ gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-10.c 2012-03-06 12:31:05.152039004 -0600 +@@ -0,0 +1,66 @@ ++/* { dg-do compile { target { powerpc*-*-* } } } */ ++/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */ ++/* { dg-require-effective-target powerpc_altivec_ok } */ ++/* { dg-options "-O2 -maltivec -maltivec2" } */ ++/* { dg-final { scan-assembler-times "lvtlx" 37 } } */ ++ ++#include ++ ++typedef __vector signed char vsc; ++typedef __vector signed short vss; ++typedef __vector signed int vsi; ++typedef __vector unsigned char vuc; ++typedef __vector unsigned short vus; ++typedef __vector unsigned int vui; ++typedef __vector bool char vbc; ++typedef __vector bool short vbs; ++typedef __vector bool int vbi; ++typedef __vector float vsf; ++typedef __vector pixel vp; ++typedef signed char sc; ++typedef signed short ss; ++typedef signed int si; ++typedef signed long sl; ++typedef unsigned char uc; ++typedef unsigned short us; ++typedef unsigned int ui; ++typedef unsigned long ul; ++typedef float sf; ++ ++vsc lc1(long a, void *p) { return __builtin_altivec_lvtlx (a,p); } ++vsf llx01(long a, vsf *p) { return __builtin_vec_lvtlx (a,p); } ++vsf llx02(long a, sf *p) { return __builtin_vec_lvtlx (a,p); } ++vbi llx03(long a, vbi *p) { return __builtin_vec_lvtlx (a,p); } ++vsi llx04(long a, vsi *p) { return __builtin_vec_lvtlx (a,p); } ++vsi llx05(long a, si *p) { return __builtin_vec_lvtlx (a,p); } ++vui llx06(long a, vui *p) { return __builtin_vec_lvtlx (a,p); } ++vui llx07(long a, ui *p) { return __builtin_vec_lvtlx (a,p); } ++vbs llx08(long a, vbs *p) { return __builtin_vec_lvtlx (a,p); } ++vp llx09(long a, vp *p) { return __builtin_vec_lvtlx (a,p); } ++vss llx10(long a, vss *p) { return __builtin_vec_lvtlx (a,p); } ++vss llx11(long a, ss *p) { return __builtin_vec_lvtlx (a,p); } ++vus llx12(long a, vus *p) { return __builtin_vec_lvtlx (a,p); } ++vus llx13(long a, us *p) { return __builtin_vec_lvtlx (a,p); } ++vbc llx14(long a, vbc *p) { return __builtin_vec_lvtlx (a,p); } ++vsc llx15(long a, vsc *p) { return __builtin_vec_lvtlx (a,p); } ++vsc llx16(long a, sc *p) { return __builtin_vec_lvtlx (a,p); } ++vuc llx17(long a, vuc *p) { return __builtin_vec_lvtlx (a,p); } ++vuc llx18(long a, uc *p) { return __builtin_vec_lvtlx (a,p); } ++vsf Dllx01(long a, vsf *p) { return vec_lvtlx (a,p); } ++vsf Dllx02(long a, sf *p) { return vec_lvtlx (a,p); } ++vbi Dllx03(long a, vbi *p) { return vec_lvtlx (a,p); } ++vsi Dllx04(long a, vsi *p) { return vec_lvtlx (a,p); } ++vsi Dllx05(long a, si *p) { return vec_lvtlx (a,p); } ++vui Dllx06(long a, vui *p) { return vec_lvtlx (a,p); } ++vui Dllx07(long a, ui *p) { return vec_lvtlx (a,p); } ++vbs Dllx08(long a, vbs *p) { return vec_lvtlx (a,p); } ++vp Dllx09(long a, vp *p) { return vec_lvtlx (a,p); } ++vss Dllx10(long a, vss *p) { return vec_lvtlx (a,p); } ++vss Dllx11(long a, ss *p) { return vec_lvtlx (a,p); } ++vus Dllx12(long a, vus *p) { return vec_lvtlx (a,p); } ++vus Dllx13(long a, us *p) { return vec_lvtlx (a,p); } ++vbc Dllx14(long a, vbc *p) { return vec_lvtlx (a,p); } ++vsc Dllx15(long a, vsc *p) { return vec_lvtlx (a,p); } ++vsc Dllx16(long a, sc *p) { return vec_lvtlx (a,p); } ++vuc Dllx17(long a, vuc *p) { return vec_lvtlx (a,p); } ++vuc Dllx18(long a, uc *p) { return vec_lvtlx (a,p); } +diff -ruN gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-11.c gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-11.c +--- gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-11.c 1969-12-31 18:00:00.000000000 -0600 ++++ gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-11.c 2012-03-06 12:31:05.153039004 -0600 +@@ -0,0 +1,66 @@ ++/* { dg-do compile { target { powerpc*-*-* } } } */ ++/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */ ++/* { dg-require-effective-target powerpc_altivec_ok } */ ++/* { dg-options "-O2 -maltivec -maltivec2" } */ ++/* { dg-final { scan-assembler-times "lvtlxl" 37 } } */ ++ ++#include ++ ++typedef __vector signed char vsc; ++typedef __vector signed short vss; ++typedef __vector signed int vsi; ++typedef __vector unsigned char vuc; ++typedef __vector unsigned short vus; ++typedef __vector unsigned int vui; ++typedef __vector bool char vbc; ++typedef __vector bool short vbs; ++typedef __vector bool int vbi; ++typedef __vector float vsf; ++typedef __vector pixel vp; ++typedef signed char sc; ++typedef signed short ss; ++typedef signed int si; ++typedef signed long sl; ++typedef unsigned char uc; ++typedef unsigned short us; ++typedef unsigned int ui; ++typedef unsigned long ul; ++typedef float sf; ++ ++vsc lc2(long a, void *p) { return __builtin_altivec_lvtlxl (a,p); } ++vsf llxl01(long a, vsf *p) { return __builtin_vec_lvtlxl (a,p); } ++vsf llxl02(long a, sf *p) { return __builtin_vec_lvtlxl (a,p); } ++vbi llxl03(long a, vbi *p) { return __builtin_vec_lvtlxl (a,p); } ++vsi llxl04(long a, vsi *p) { return __builtin_vec_lvtlxl (a,p); } ++vsi llxl05(long a, si *p) { return __builtin_vec_lvtlxl (a,p); } ++vui llxl06(long a, vui *p) { return __builtin_vec_lvtlxl (a,p); } ++vui llxl07(long a, ui *p) { return __builtin_vec_lvtlxl (a,p); } ++vbs llxl08(long a, vbs *p) { return __builtin_vec_lvtlxl (a,p); } ++vp llxl09(long a, vp *p) { return __builtin_vec_lvtlxl (a,p); } ++vss llxl10(long a, vss *p) { return __builtin_vec_lvtlxl (a,p); } ++vss llxl11(long a, ss *p) { return __builtin_vec_lvtlxl (a,p); } ++vus llxl12(long a, vus *p) { return __builtin_vec_lvtlxl (a,p); } ++vus llxl13(long a, us *p) { return __builtin_vec_lvtlxl (a,p); } ++vbc llxl14(long a, vbc *p) { return __builtin_vec_lvtlxl (a,p); } ++vsc llxl15(long a, vsc *p) { return __builtin_vec_lvtlxl (a,p); } ++vsc llxl16(long a, sc *p) { return __builtin_vec_lvtlxl (a,p); } ++vuc llxl17(long a, vuc *p) { return __builtin_vec_lvtlxl (a,p); } ++vuc llxl18(long a, uc *p) { return __builtin_vec_lvtlxl (a,p); } ++vsf Dllxl01(long a, vsf *p) { return vec_lvtlxl (a,p); } ++vsf Dllxl02(long a, sf *p) { return vec_lvtlxl (a,p); } ++vbi Dllxl03(long a, vbi *p) { return vec_lvtlxl (a,p); } ++vsi Dllxl04(long a, vsi *p) { return vec_lvtlxl (a,p); } ++vsi Dllxl05(long a, si *p) { return vec_lvtlxl (a,p); } ++vui Dllxl06(long a, vui *p) { return vec_lvtlxl (a,p); } ++vui Dllxl07(long a, ui *p) { return vec_lvtlxl (a,p); } ++vbs Dllxl08(long a, vbs *p) { return vec_lvtlxl (a,p); } ++vp Dllxl09(long a, vp *p) { return vec_lvtlxl (a,p); } ++vss Dllxl10(long a, vss *p) { return vec_lvtlxl (a,p); } ++vss Dllxl11(long a, ss *p) { return vec_lvtlxl (a,p); } ++vus Dllxl12(long a, vus *p) { return vec_lvtlxl (a,p); } ++vus Dllxl13(long a, us *p) { return vec_lvtlxl (a,p); } ++vbc Dllxl14(long a, vbc *p) { return vec_lvtlxl (a,p); } ++vsc Dllxl15(long a, vsc *p) { return vec_lvtlxl (a,p); } ++vsc Dllxl16(long a, sc *p) { return vec_lvtlxl (a,p); } ++vuc Dllxl17(long a, vuc *p) { return vec_lvtlxl (a,p); } ++vuc Dllxl18(long a, uc *p) { return vec_lvtlxl (a,p); } +diff -ruN gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-12.c gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-12.c +--- gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-12.c 1969-12-31 18:00:00.000000000 -0600 ++++ gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-12.c 2012-03-06 12:31:05.153039004 -0600 +@@ -0,0 +1,66 @@ ++/* { dg-do compile { target { powerpc*-*-* } } } */ ++/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */ ++/* { dg-require-effective-target powerpc_altivec_ok } */ ++/* { dg-options "-O2 -maltivec -maltivec2" } */ ++/* { dg-final { scan-assembler-times "lvtrx" 37 } } */ ++ ++#include ++ ++typedef __vector signed char vsc; ++typedef __vector signed short vss; ++typedef __vector signed int vsi; ++typedef __vector unsigned char vuc; ++typedef __vector unsigned short vus; ++typedef __vector unsigned int vui; ++typedef __vector bool char vbc; ++typedef __vector bool short vbs; ++typedef __vector bool int vbi; ++typedef __vector float vsf; ++typedef __vector pixel vp; ++typedef signed char sc; ++typedef signed short ss; ++typedef signed int si; ++typedef signed long sl; ++typedef unsigned char uc; ++typedef unsigned short us; ++typedef unsigned int ui; ++typedef unsigned long ul; ++typedef float sf; ++ ++vsc lc3(long a, void *p) { return __builtin_altivec_lvtrx (a,p); } ++vsf lrx01(long a, vsf *p) { return __builtin_vec_lvtrx (a,p); } ++vsf lrx02(long a, sf *p) { return __builtin_vec_lvtrx (a,p); } ++vbi lrx03(long a, vbi *p) { return __builtin_vec_lvtrx (a,p); } ++vsi lrx04(long a, vsi *p) { return __builtin_vec_lvtrx (a,p); } ++vsi lrx05(long a, si *p) { return __builtin_vec_lvtrx (a,p); } ++vui lrx06(long a, vui *p) { return __builtin_vec_lvtrx (a,p); } ++vui lrx07(long a, ui *p) { return __builtin_vec_lvtrx (a,p); } ++vbs lrx08(long a, vbs *p) { return __builtin_vec_lvtrx (a,p); } ++vp lrx09(long a, vp *p) { return __builtin_vec_lvtrx (a,p); } ++vss lrx10(long a, vss *p) { return __builtin_vec_lvtrx (a,p); } ++vss lrx11(long a, ss *p) { return __builtin_vec_lvtrx (a,p); } ++vus lrx12(long a, vus *p) { return __builtin_vec_lvtrx (a,p); } ++vus lrx13(long a, us *p) { return __builtin_vec_lvtrx (a,p); } ++vbc lrx14(long a, vbc *p) { return __builtin_vec_lvtrx (a,p); } ++vsc lrx15(long a, vsc *p) { return __builtin_vec_lvtrx (a,p); } ++vsc lrx16(long a, sc *p) { return __builtin_vec_lvtrx (a,p); } ++vuc lrx17(long a, vuc *p) { return __builtin_vec_lvtrx (a,p); } ++vuc lrx18(long a, uc *p) { return __builtin_vec_lvtrx (a,p); } ++vsf Dlrx01(long a, vsf *p) { return vec_lvtrx (a,p); } ++vsf Dlrx02(long a, sf *p) { return vec_lvtrx (a,p); } ++vbi Dlrx03(long a, vbi *p) { return vec_lvtrx (a,p); } ++vsi Dlrx04(long a, vsi *p) { return vec_lvtrx (a,p); } ++vsi Dlrx05(long a, si *p) { return vec_lvtrx (a,p); } ++vui Dlrx06(long a, vui *p) { return vec_lvtrx (a,p); } ++vui Dlrx07(long a, ui *p) { return vec_lvtrx (a,p); } ++vbs Dlrx08(long a, vbs *p) { return vec_lvtrx (a,p); } ++vp Dlrx09(long a, vp *p) { return vec_lvtrx (a,p); } ++vss Dlrx10(long a, vss *p) { return vec_lvtrx (a,p); } ++vss Dlrx11(long a, ss *p) { return vec_lvtrx (a,p); } ++vus Dlrx12(long a, vus *p) { return vec_lvtrx (a,p); } ++vus Dlrx13(long a, us *p) { return vec_lvtrx (a,p); } ++vbc Dlrx14(long a, vbc *p) { return vec_lvtrx (a,p); } ++vsc Dlrx15(long a, vsc *p) { return vec_lvtrx (a,p); } ++vsc Dlrx16(long a, sc *p) { return vec_lvtrx (a,p); } ++vuc Dlrx17(long a, vuc *p) { return vec_lvtrx (a,p); } ++vuc Dlrx18(long a, uc *p) { return vec_lvtrx (a,p); } +diff -ruN gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-13.c gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-13.c +--- gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-13.c 1969-12-31 18:00:00.000000000 -0600 ++++ gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-13.c 2012-03-06 12:31:05.153039004 -0600 +@@ -0,0 +1,66 @@ ++/* { dg-do compile { target { powerpc*-*-* } } } */ ++/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */ ++/* { dg-require-effective-target powerpc_altivec_ok } */ ++/* { dg-options "-O2 -maltivec -maltivec2" } */ ++/* { dg-final { scan-assembler-times "lvtrxl" 37 } } */ ++ ++#include ++ ++typedef __vector signed char vsc; ++typedef __vector signed short vss; ++typedef __vector signed int vsi; ++typedef __vector unsigned char vuc; ++typedef __vector unsigned short vus; ++typedef __vector unsigned int vui; ++typedef __vector bool char vbc; ++typedef __vector bool short vbs; ++typedef __vector bool int vbi; ++typedef __vector float vsf; ++typedef __vector pixel vp; ++typedef signed char sc; ++typedef signed short ss; ++typedef signed int si; ++typedef signed long sl; ++typedef unsigned char uc; ++typedef unsigned short us; ++typedef unsigned int ui; ++typedef unsigned long ul; ++typedef float sf; ++ ++vsc lc4(long a, void *p) { return __builtin_altivec_lvtrxl (a,p); } ++vsf lrxl01(long a, vsf *p) { return __builtin_vec_lvtrxl (a,p); } ++vsf lrxl02(long a, sf *p) { return __builtin_vec_lvtrxl (a,p); } ++vbi lrxl03(long a, vbi *p) { return __builtin_vec_lvtrxl (a,p); } ++vsi lrxl04(long a, vsi *p) { return __builtin_vec_lvtrxl (a,p); } ++vsi lrxl05(long a, si *p) { return __builtin_vec_lvtrxl (a,p); } ++vui lrxl06(long a, vui *p) { return __builtin_vec_lvtrxl (a,p); } ++vui lrxl07(long a, ui *p) { return __builtin_vec_lvtrxl (a,p); } ++vbs lrxl08(long a, vbs *p) { return __builtin_vec_lvtrxl (a,p); } ++vp lrxl09(long a, vp *p) { return __builtin_vec_lvtrxl (a,p); } ++vss lrxl10(long a, vss *p) { return __builtin_vec_lvtrxl (a,p); } ++vss lrxl11(long a, ss *p) { return __builtin_vec_lvtrxl (a,p); } ++vus lrxl12(long a, vus *p) { return __builtin_vec_lvtrxl (a,p); } ++vus lrxl13(long a, us *p) { return __builtin_vec_lvtrxl (a,p); } ++vbc lrxl14(long a, vbc *p) { return __builtin_vec_lvtrxl (a,p); } ++vsc lrxl15(long a, vsc *p) { return __builtin_vec_lvtrxl (a,p); } ++vsc lrxl16(long a, sc *p) { return __builtin_vec_lvtrxl (a,p); } ++vuc lrxl17(long a, vuc *p) { return __builtin_vec_lvtrxl (a,p); } ++vuc lrxl18(long a, uc *p) { return __builtin_vec_lvtrxl (a,p); } ++vsf Dlrxl01(long a, vsf *p) { return vec_lvtrxl (a,p); } ++vsf Dlrxl02(long a, sf *p) { return vec_lvtrxl (a,p); } ++vbi Dlrxl03(long a, vbi *p) { return vec_lvtrxl (a,p); } ++vsi Dlrxl04(long a, vsi *p) { return vec_lvtrxl (a,p); } ++vsi Dlrxl05(long a, si *p) { return vec_lvtrxl (a,p); } ++vui Dlrxl06(long a, vui *p) { return vec_lvtrxl (a,p); } ++vui Dlrxl07(long a, ui *p) { return vec_lvtrxl (a,p); } ++vbs Dlrxl08(long a, vbs *p) { return vec_lvtrxl (a,p); } ++vp Dlrxl09(long a, vp *p) { return vec_lvtrxl (a,p); } ++vss Dlrxl10(long a, vss *p) { return vec_lvtrxl (a,p); } ++vss Dlrxl11(long a, ss *p) { return vec_lvtrxl (a,p); } ++vus Dlrxl12(long a, vus *p) { return vec_lvtrxl (a,p); } ++vus Dlrxl13(long a, us *p) { return vec_lvtrxl (a,p); } ++vbc Dlrxl14(long a, vbc *p) { return vec_lvtrxl (a,p); } ++vsc Dlrxl15(long a, vsc *p) { return vec_lvtrxl (a,p); } ++vsc Dlrxl16(long a, sc *p) { return vec_lvtrxl (a,p); } ++vuc Dlrxl17(long a, vuc *p) { return vec_lvtrxl (a,p); } ++vuc Dlrxl18(long a, uc *p) { return vec_lvtrxl (a,p); } +diff -ruN gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-14.c gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-14.c +--- gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-14.c 1969-12-31 18:00:00.000000000 -0600 ++++ gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-14.c 2012-03-06 12:31:05.154039003 -0600 +@@ -0,0 +1,66 @@ ++/* { dg-do compile { target { powerpc*-*-* } } } */ ++/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */ ++/* { dg-require-effective-target powerpc_altivec_ok } */ ++/* { dg-options "-O2 -maltivec -maltivec2" } */ ++/* { dg-final { scan-assembler-times "stvflx" 37 } } */ ++ ++#include ++ ++typedef __vector signed char vsc; ++typedef __vector signed short vss; ++typedef __vector signed int vsi; ++typedef __vector unsigned char vuc; ++typedef __vector unsigned short vus; ++typedef __vector unsigned int vui; ++typedef __vector bool char vbc; ++typedef __vector bool short vbs; ++typedef __vector bool int vbi; ++typedef __vector float vsf; ++typedef __vector pixel vp; ++typedef signed char sc; ++typedef signed short ss; ++typedef signed int si; ++typedef signed long sl; ++typedef unsigned char uc; ++typedef unsigned short us; ++typedef unsigned int ui; ++typedef unsigned long ul; ++typedef float sf; ++ ++void sc1(vsc v, long a, void *p) { __builtin_altivec_stvflx (v,a,p); } ++void slx01(vsf v, long a, vsf *p) { __builtin_vec_stvflx (v,a,p); } ++void slx02(vsf v, long a, sf *p) { __builtin_vec_stvflx (v,a,p); } ++void slx03(vbi v, long a, vbi *p) { __builtin_vec_stvflx (v,a,p); } ++void slx04(vsi v, long a, vsi *p) { __builtin_vec_stvflx (v,a,p); } ++void slx05(vsi v, long a, si *p) { __builtin_vec_stvflx (v,a,p); } ++void slx06(vui v, long a, vui *p) { __builtin_vec_stvflx (v,a,p); } ++void slx07(vui v, long a, ui *p) { __builtin_vec_stvflx (v,a,p); } ++void slx08(vbs v, long a, vbs *p) { __builtin_vec_stvflx (v,a,p); } ++void slx09(vp v, long a, vp *p) { __builtin_vec_stvflx (v,a,p); } ++void slx10(vss v, long a, vss *p) { __builtin_vec_stvflx (v,a,p); } ++void slx11(vss v, long a, ss *p) { __builtin_vec_stvflx (v,a,p); } ++void slx12(vus v, long a, vus *p) { __builtin_vec_stvflx (v,a,p); } ++void slx13(vus v, long a, us *p) { __builtin_vec_stvflx (v,a,p); } ++void slx14(vbc v, long a, vbc *p) { __builtin_vec_stvflx (v,a,p); } ++void slx15(vsc v, long a, vsc *p) { __builtin_vec_stvflx (v,a,p); } ++void slx16(vsc v, long a, sc *p) { __builtin_vec_stvflx (v,a,p); } ++void slx17(vuc v, long a, vuc *p) { __builtin_vec_stvflx (v,a,p); } ++void slx18(vuc v, long a, uc *p) { __builtin_vec_stvflx (v,a,p); } ++void Dslx01(vsf v, long a, vsf *p) { vec_stvflx (v,a,p); } ++void Dslx02(vsf v, long a, sf *p) { vec_stvflx (v,a,p); } ++void Dslx03(vbi v, long a, vbi *p) { vec_stvflx (v,a,p); } ++void Dslx04(vsi v, long a, vsi *p) { vec_stvflx (v,a,p); } ++void Dslx05(vsi v, long a, si *p) { vec_stvflx (v,a,p); } ++void Dslx06(vui v, long a, vui *p) { vec_stvflx (v,a,p); } ++void Dslx07(vui v, long a, ui *p) { vec_stvflx (v,a,p); } ++void Dslx08(vbs v, long a, vbs *p) { vec_stvflx (v,a,p); } ++void Dslx09(vp v, long a, vp *p) { vec_stvflx (v,a,p); } ++void Dslx10(vss v, long a, vss *p) { vec_stvflx (v,a,p); } ++void Dslx11(vss v, long a, ss *p) { vec_stvflx (v,a,p); } ++void Dslx12(vus v, long a, vus *p) { vec_stvflx (v,a,p); } ++void Dslx13(vus v, long a, us *p) { vec_stvflx (v,a,p); } ++void Dslx14(vbc v, long a, vbc *p) { vec_stvflx (v,a,p); } ++void Dslx15(vsc v, long a, vsc *p) { vec_stvflx (v,a,p); } ++void Dslx16(vsc v, long a, sc *p) { vec_stvflx (v,a,p); } ++void Dslx17(vuc v, long a, vuc *p) { vec_stvflx (v,a,p); } ++void Dslx18(vuc v, long a, uc *p) { vec_stvflx (v,a,p); } +diff -ruN gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-15.c gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-15.c +--- gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-15.c 1969-12-31 18:00:00.000000000 -0600 ++++ gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-15.c 2012-03-06 12:31:05.154039003 -0600 +@@ -0,0 +1,66 @@ ++/* { dg-do compile { target { powerpc*-*-* } } } */ ++/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */ ++/* { dg-require-effective-target powerpc_altivec_ok } */ ++/* { dg-options "-O2 -maltivec -maltivec2" } */ ++/* { dg-final { scan-assembler-times "stvflxl" 37 } } */ ++ ++#include ++ ++typedef __vector signed char vsc; ++typedef __vector signed short vss; ++typedef __vector signed int vsi; ++typedef __vector unsigned char vuc; ++typedef __vector unsigned short vus; ++typedef __vector unsigned int vui; ++typedef __vector bool char vbc; ++typedef __vector bool short vbs; ++typedef __vector bool int vbi; ++typedef __vector float vsf; ++typedef __vector pixel vp; ++typedef signed char sc; ++typedef signed short ss; ++typedef signed int si; ++typedef signed long sl; ++typedef unsigned char uc; ++typedef unsigned short us; ++typedef unsigned int ui; ++typedef unsigned long ul; ++typedef float sf; ++ ++void sc2(vsc v, long a, void *p) { __builtin_altivec_stvflxl (v,a,p); } ++void slxl01(vsf v, long a, vsf *p) { __builtin_vec_stvflxl (v,a,p); } ++void slxl02(vsf v, long a, sf *p) { __builtin_vec_stvflxl (v,a,p); } ++void slxl03(vbi v, long a, vbi *p) { __builtin_vec_stvflxl (v,a,p); } ++void slxl04(vsi v, long a, vsi *p) { __builtin_vec_stvflxl (v,a,p); } ++void slxl05(vsi v, long a, si *p) { __builtin_vec_stvflxl (v,a,p); } ++void slxl06(vui v, long a, vui *p) { __builtin_vec_stvflxl (v,a,p); } ++void slxl07(vui v, long a, ui *p) { __builtin_vec_stvflxl (v,a,p); } ++void slxl08(vbs v, long a, vbs *p) { __builtin_vec_stvflxl (v,a,p); } ++void slxl09(vp v, long a, vp *p) { __builtin_vec_stvflxl (v,a,p); } ++void slxl10(vss v, long a, vss *p) { __builtin_vec_stvflxl (v,a,p); } ++void slxl11(vss v, long a, ss *p) { __builtin_vec_stvflxl (v,a,p); } ++void slxl12(vus v, long a, vus *p) { __builtin_vec_stvflxl (v,a,p); } ++void slxl13(vus v, long a, us *p) { __builtin_vec_stvflxl (v,a,p); } ++void slxl14(vbc v, long a, vbc *p) { __builtin_vec_stvflxl (v,a,p); } ++void slxl15(vsc v, long a, vsc *p) { __builtin_vec_stvflxl (v,a,p); } ++void slxl16(vsc v, long a, sc *p) { __builtin_vec_stvflxl (v,a,p); } ++void slxl17(vuc v, long a, vuc *p) { __builtin_vec_stvflxl (v,a,p); } ++void slxl18(vuc v, long a, uc *p) { __builtin_vec_stvflxl (v,a,p); } ++void Dslxl01(vsf v, long a, vsf *p) { vec_stvflxl (v,a,p); } ++void Dslxl02(vsf v, long a, sf *p) { vec_stvflxl (v,a,p); } ++void Dslxl03(vbi v, long a, vbi *p) { vec_stvflxl (v,a,p); } ++void Dslxl04(vsi v, long a, vsi *p) { vec_stvflxl (v,a,p); } ++void Dslxl05(vsi v, long a, si *p) { vec_stvflxl (v,a,p); } ++void Dslxl06(vui v, long a, vui *p) { vec_stvflxl (v,a,p); } ++void Dslxl07(vui v, long a, ui *p) { vec_stvflxl (v,a,p); } ++void Dslxl08(vbs v, long a, vbs *p) { vec_stvflxl (v,a,p); } ++void Dslxl09(vp v, long a, vp *p) { vec_stvflxl (v,a,p); } ++void Dslxl10(vss v, long a, vss *p) { vec_stvflxl (v,a,p); } ++void Dslxl11(vss v, long a, ss *p) { vec_stvflxl (v,a,p); } ++void Dslxl12(vus v, long a, vus *p) { vec_stvflxl (v,a,p); } ++void Dslxl13(vus v, long a, us *p) { vec_stvflxl (v,a,p); } ++void Dslxl14(vbc v, long a, vbc *p) { vec_stvflxl (v,a,p); } ++void Dslxl15(vsc v, long a, vsc *p) { vec_stvflxl (v,a,p); } ++void Dslxl16(vsc v, long a, sc *p) { vec_stvflxl (v,a,p); } ++void Dslxl17(vuc v, long a, vuc *p) { vec_stvflxl (v,a,p); } ++void Dslxl18(vuc v, long a, uc *p) { vec_stvflxl (v,a,p); } +diff -ruN gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-16.c gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-16.c +--- gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-16.c 1969-12-31 18:00:00.000000000 -0600 ++++ gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-16.c 2012-03-06 12:31:05.154039003 -0600 +@@ -0,0 +1,66 @@ ++/* { dg-do compile { target { powerpc*-*-* } } } */ ++/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */ ++/* { dg-require-effective-target powerpc_altivec_ok } */ ++/* { dg-options "-O2 -maltivec -maltivec2" } */ ++/* { dg-final { scan-assembler-times "stvfrx" 37 } } */ ++ ++#include ++ ++typedef __vector signed char vsc; ++typedef __vector signed short vss; ++typedef __vector signed int vsi; ++typedef __vector unsigned char vuc; ++typedef __vector unsigned short vus; ++typedef __vector unsigned int vui; ++typedef __vector bool char vbc; ++typedef __vector bool short vbs; ++typedef __vector bool int vbi; ++typedef __vector float vsf; ++typedef __vector pixel vp; ++typedef signed char sc; ++typedef signed short ss; ++typedef signed int si; ++typedef signed long sl; ++typedef unsigned char uc; ++typedef unsigned short us; ++typedef unsigned int ui; ++typedef unsigned long ul; ++typedef float sf; ++ ++void sc3(vsc v, long a, void *p) { __builtin_altivec_stvfrx (v,a,p); } ++void srx01(vsf v, long a, vsf *p) { __builtin_vec_stvfrx (v,a,p); } ++void srx02(vsf v, long a, sf *p) { __builtin_vec_stvfrx (v,a,p); } ++void srx03(vbi v, long a, vbi *p) { __builtin_vec_stvfrx (v,a,p); } ++void srx04(vsi v, long a, vsi *p) { __builtin_vec_stvfrx (v,a,p); } ++void srx05(vsi v, long a, si *p) { __builtin_vec_stvfrx (v,a,p); } ++void srx06(vui v, long a, vui *p) { __builtin_vec_stvfrx (v,a,p); } ++void srx07(vui v, long a, ui *p) { __builtin_vec_stvfrx (v,a,p); } ++void srx08(vbs v, long a, vbs *p) { __builtin_vec_stvfrx (v,a,p); } ++void srx09(vp v, long a, vp *p) { __builtin_vec_stvfrx (v,a,p); } ++void srx10(vss v, long a, vss *p) { __builtin_vec_stvfrx (v,a,p); } ++void srx11(vss v, long a, ss *p) { __builtin_vec_stvfrx (v,a,p); } ++void srx12(vus v, long a, vus *p) { __builtin_vec_stvfrx (v,a,p); } ++void srx13(vus v, long a, us *p) { __builtin_vec_stvfrx (v,a,p); } ++void srx14(vbc v, long a, vbc *p) { __builtin_vec_stvfrx (v,a,p); } ++void srx15(vsc v, long a, vsc *p) { __builtin_vec_stvfrx (v,a,p); } ++void srx16(vsc v, long a, sc *p) { __builtin_vec_stvfrx (v,a,p); } ++void srx17(vuc v, long a, vuc *p) { __builtin_vec_stvfrx (v,a,p); } ++void srx18(vuc v, long a, uc *p) { __builtin_vec_stvfrx (v,a,p); } ++void Dsrx01(vsf v, long a, vsf *p) { vec_stvfrx (v,a,p); } ++void Dsrx02(vsf v, long a, sf *p) { vec_stvfrx (v,a,p); } ++void Dsrx03(vbi v, long a, vbi *p) { vec_stvfrx (v,a,p); } ++void Dsrx04(vsi v, long a, vsi *p) { vec_stvfrx (v,a,p); } ++void Dsrx05(vsi v, long a, si *p) { vec_stvfrx (v,a,p); } ++void Dsrx06(vui v, long a, vui *p) { vec_stvfrx (v,a,p); } ++void Dsrx07(vui v, long a, ui *p) { vec_stvfrx (v,a,p); } ++void Dsrx08(vbs v, long a, vbs *p) { vec_stvfrx (v,a,p); } ++void Dsrx09(vp v, long a, vp *p) { vec_stvfrx (v,a,p); } ++void Dsrx10(vss v, long a, vss *p) { vec_stvfrx (v,a,p); } ++void Dsrx11(vss v, long a, ss *p) { vec_stvfrx (v,a,p); } ++void Dsrx12(vus v, long a, vus *p) { vec_stvfrx (v,a,p); } ++void Dsrx13(vus v, long a, us *p) { vec_stvfrx (v,a,p); } ++void Dsrx14(vbc v, long a, vbc *p) { vec_stvfrx (v,a,p); } ++void Dsrx15(vsc v, long a, vsc *p) { vec_stvfrx (v,a,p); } ++void Dsrx16(vsc v, long a, sc *p) { vec_stvfrx (v,a,p); } ++void Dsrx17(vuc v, long a, vuc *p) { vec_stvfrx (v,a,p); } ++void Dsrx18(vuc v, long a, uc *p) { vec_stvfrx (v,a,p); } +diff -ruN gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-17.c gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-17.c +--- gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-17.c 1969-12-31 18:00:00.000000000 -0600 ++++ gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-17.c 2012-03-06 12:31:05.155039001 -0600 +@@ -0,0 +1,66 @@ ++/* { dg-do compile { target { powerpc*-*-* } } } */ ++/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */ ++/* { dg-require-effective-target powerpc_altivec_ok } */ ++/* { dg-options "-O2 -maltivec -maltivec2" } */ ++/* { dg-final { scan-assembler-times "stvfrxl" 37 } } */ ++ ++#include ++ ++typedef __vector signed char vsc; ++typedef __vector signed short vss; ++typedef __vector signed int vsi; ++typedef __vector unsigned char vuc; ++typedef __vector unsigned short vus; ++typedef __vector unsigned int vui; ++typedef __vector bool char vbc; ++typedef __vector bool short vbs; ++typedef __vector bool int vbi; ++typedef __vector float vsf; ++typedef __vector pixel vp; ++typedef signed char sc; ++typedef signed short ss; ++typedef signed int si; ++typedef signed long sl; ++typedef unsigned char uc; ++typedef unsigned short us; ++typedef unsigned int ui; ++typedef unsigned long ul; ++typedef float sf; ++ ++void sc4(vsc v, long a, void *p) { __builtin_altivec_stvfrxl (v,a,p); } ++void srxl01(vsf v, long a, vsf *p) { __builtin_vec_stvfrxl (v,a,p); } ++void srxl02(vsf v, long a, sf *p) { __builtin_vec_stvfrxl (v,a,p); } ++void srxl03(vbi v, long a, vbi *p) { __builtin_vec_stvfrxl (v,a,p); } ++void srxl04(vsi v, long a, vsi *p) { __builtin_vec_stvfrxl (v,a,p); } ++void srxl05(vsi v, long a, si *p) { __builtin_vec_stvfrxl (v,a,p); } ++void srxl06(vui v, long a, vui *p) { __builtin_vec_stvfrxl (v,a,p); } ++void srxl07(vui v, long a, ui *p) { __builtin_vec_stvfrxl (v,a,p); } ++void srxl08(vbs v, long a, vbs *p) { __builtin_vec_stvfrxl (v,a,p); } ++void srxl09(vp v, long a, vp *p) { __builtin_vec_stvfrxl (v,a,p); } ++void srxl10(vss v, long a, vss *p) { __builtin_vec_stvfrxl (v,a,p); } ++void srxl11(vss v, long a, ss *p) { __builtin_vec_stvfrxl (v,a,p); } ++void srxl12(vus v, long a, vus *p) { __builtin_vec_stvfrxl (v,a,p); } ++void srxl13(vus v, long a, us *p) { __builtin_vec_stvfrxl (v,a,p); } ++void srxl14(vbc v, long a, vbc *p) { __builtin_vec_stvfrxl (v,a,p); } ++void srxl15(vsc v, long a, vsc *p) { __builtin_vec_stvfrxl (v,a,p); } ++void srxl16(vsc v, long a, sc *p) { __builtin_vec_stvfrxl (v,a,p); } ++void srxl17(vuc v, long a, vuc *p) { __builtin_vec_stvfrxl (v,a,p); } ++void srxl18(vuc v, long a, uc *p) { __builtin_vec_stvfrxl (v,a,p); } ++void Dsrxl01(vsf v, long a, vsf *p) { vec_stvfrxl (v,a,p); } ++void Dsrxl02(vsf v, long a, sf *p) { vec_stvfrxl (v,a,p); } ++void Dsrxl03(vbi v, long a, vbi *p) { vec_stvfrxl (v,a,p); } ++void Dsrxl04(vsi v, long a, vsi *p) { vec_stvfrxl (v,a,p); } ++void Dsrxl05(vsi v, long a, si *p) { vec_stvfrxl (v,a,p); } ++void Dsrxl06(vui v, long a, vui *p) { vec_stvfrxl (v,a,p); } ++void Dsrxl07(vui v, long a, ui *p) { vec_stvfrxl (v,a,p); } ++void Dsrxl08(vbs v, long a, vbs *p) { vec_stvfrxl (v,a,p); } ++void Dsrxl09(vp v, long a, vp *p) { vec_stvfrxl (v,a,p); } ++void Dsrxl10(vss v, long a, vss *p) { vec_stvfrxl (v,a,p); } ++void Dsrxl11(vss v, long a, ss *p) { vec_stvfrxl (v,a,p); } ++void Dsrxl12(vus v, long a, vus *p) { vec_stvfrxl (v,a,p); } ++void Dsrxl13(vus v, long a, us *p) { vec_stvfrxl (v,a,p); } ++void Dsrxl14(vbc v, long a, vbc *p) { vec_stvfrxl (v,a,p); } ++void Dsrxl15(vsc v, long a, vsc *p) { vec_stvfrxl (v,a,p); } ++void Dsrxl16(vsc v, long a, sc *p) { vec_stvfrxl (v,a,p); } ++void Dsrxl17(vuc v, long a, vuc *p) { vec_stvfrxl (v,a,p); } ++void Dsrxl18(vuc v, long a, uc *p) { vec_stvfrxl (v,a,p); } +diff -ruN gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-18.c gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-18.c +--- gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-18.c 1969-12-31 18:00:00.000000000 -0600 ++++ gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-18.c 2012-03-06 12:31:05.155039001 -0600 +@@ -0,0 +1,66 @@ ++/* { dg-do compile { target { powerpc*-*-* } } } */ ++/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */ ++/* { dg-require-effective-target powerpc_altivec_ok } */ ++/* { dg-options "-O2 -maltivec -maltivec2" } */ ++/* { dg-final { scan-assembler-times "lvswx" 37 } } */ ++ ++#include ++ ++typedef __vector signed char vsc; ++typedef __vector signed short vss; ++typedef __vector signed int vsi; ++typedef __vector unsigned char vuc; ++typedef __vector unsigned short vus; ++typedef __vector unsigned int vui; ++typedef __vector bool char vbc; ++typedef __vector bool short vbs; ++typedef __vector bool int vbi; ++typedef __vector float vsf; ++typedef __vector pixel vp; ++typedef signed char sc; ++typedef signed short ss; ++typedef signed int si; ++typedef signed long sl; ++typedef unsigned char uc; ++typedef unsigned short us; ++typedef unsigned int ui; ++typedef unsigned long ul; ++typedef float sf; ++ ++vsc ls1(long a, void *p) { return __builtin_altivec_lvswx (a,p); } ++vsf ls01(long a, vsf *p) { return __builtin_vec_lvswx (a,p); } ++vsf ls02(long a, sf *p) { return __builtin_vec_lvswx (a,p); } ++vbi ls03(long a, vbi *p) { return __builtin_vec_lvswx (a,p); } ++vsi ls04(long a, vsi *p) { return __builtin_vec_lvswx (a,p); } ++vsi ls05(long a, si *p) { return __builtin_vec_lvswx (a,p); } ++vui ls06(long a, vui *p) { return __builtin_vec_lvswx (a,p); } ++vui ls07(long a, ui *p) { return __builtin_vec_lvswx (a,p); } ++vbs ls08(long a, vbs *p) { return __builtin_vec_lvswx (a,p); } ++vp ls09(long a, vp *p) { return __builtin_vec_lvswx (a,p); } ++vss ls10(long a, vss *p) { return __builtin_vec_lvswx (a,p); } ++vss ls11(long a, ss *p) { return __builtin_vec_lvswx (a,p); } ++vus ls12(long a, vus *p) { return __builtin_vec_lvswx (a,p); } ++vus ls13(long a, us *p) { return __builtin_vec_lvswx (a,p); } ++vbc ls14(long a, vbc *p) { return __builtin_vec_lvswx (a,p); } ++vsc ls15(long a, vsc *p) { return __builtin_vec_lvswx (a,p); } ++vsc ls16(long a, sc *p) { return __builtin_vec_lvswx (a,p); } ++vuc ls17(long a, vuc *p) { return __builtin_vec_lvswx (a,p); } ++vuc ls18(long a, uc *p) { return __builtin_vec_lvswx (a,p); } ++vsf Dls01(long a, vsf *p) { return vec_lvswx (a,p); } ++vsf Dls02(long a, sf *p) { return vec_lvswx (a,p); } ++vbi Dls03(long a, vbi *p) { return vec_lvswx (a,p); } ++vsi Dls04(long a, vsi *p) { return vec_lvswx (a,p); } ++vsi Dls05(long a, si *p) { return vec_lvswx (a,p); } ++vui Dls06(long a, vui *p) { return vec_lvswx (a,p); } ++vui Dls07(long a, ui *p) { return vec_lvswx (a,p); } ++vbs Dls08(long a, vbs *p) { return vec_lvswx (a,p); } ++vp Dls09(long a, vp *p) { return vec_lvswx (a,p); } ++vss Dls10(long a, vss *p) { return vec_lvswx (a,p); } ++vss Dls11(long a, ss *p) { return vec_lvswx (a,p); } ++vus Dls12(long a, vus *p) { return vec_lvswx (a,p); } ++vus Dls13(long a, us *p) { return vec_lvswx (a,p); } ++vbc Dls14(long a, vbc *p) { return vec_lvswx (a,p); } ++vsc Dls15(long a, vsc *p) { return vec_lvswx (a,p); } ++vsc Dls16(long a, sc *p) { return vec_lvswx (a,p); } ++vuc Dls17(long a, vuc *p) { return vec_lvswx (a,p); } ++vuc Dls18(long a, uc *p) { return vec_lvswx (a,p); } +diff -ruN gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-19.c gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-19.c +--- gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-19.c 1969-12-31 18:00:00.000000000 -0600 ++++ gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-19.c 2012-03-06 12:31:05.155039001 -0600 +@@ -0,0 +1,66 @@ ++/* { dg-do compile { target { powerpc*-*-* } } } */ ++/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */ ++/* { dg-require-effective-target powerpc_altivec_ok } */ ++/* { dg-options "-O2 -maltivec -maltivec2" } */ ++/* { dg-final { scan-assembler-times "lvswxl" 37 } } */ ++ ++#include ++ ++typedef __vector signed char vsc; ++typedef __vector signed short vss; ++typedef __vector signed int vsi; ++typedef __vector unsigned char vuc; ++typedef __vector unsigned short vus; ++typedef __vector unsigned int vui; ++typedef __vector bool char vbc; ++typedef __vector bool short vbs; ++typedef __vector bool int vbi; ++typedef __vector float vsf; ++typedef __vector pixel vp; ++typedef signed char sc; ++typedef signed short ss; ++typedef signed int si; ++typedef signed long sl; ++typedef unsigned char uc; ++typedef unsigned short us; ++typedef unsigned int ui; ++typedef unsigned long ul; ++typedef float sf; ++ ++vsc ls2l(long a, void *p) { return __builtin_altivec_lvswxl (a,p); } ++vsf lsl01(long a, vsf *p) { return __builtin_vec_lvswxl (a,p); } ++vsf lsl02(long a, sf *p) { return __builtin_vec_lvswxl (a,p); } ++vbi lsl03(long a, vbi *p) { return __builtin_vec_lvswxl (a,p); } ++vsi lsl04(long a, vsi *p) { return __builtin_vec_lvswxl (a,p); } ++vsi lsl05(long a, si *p) { return __builtin_vec_lvswxl (a,p); } ++vui lsl06(long a, vui *p) { return __builtin_vec_lvswxl (a,p); } ++vui lsl07(long a, ui *p) { return __builtin_vec_lvswxl (a,p); } ++vbs lsl08(long a, vbs *p) { return __builtin_vec_lvswxl (a,p); } ++vp lsl09(long a, vp *p) { return __builtin_vec_lvswxl (a,p); } ++vss lsl10(long a, vss *p) { return __builtin_vec_lvswxl (a,p); } ++vss lsl11(long a, ss *p) { return __builtin_vec_lvswxl (a,p); } ++vus lsl12(long a, vus *p) { return __builtin_vec_lvswxl (a,p); } ++vus lsl13(long a, us *p) { return __builtin_vec_lvswxl (a,p); } ++vbc lsl14(long a, vbc *p) { return __builtin_vec_lvswxl (a,p); } ++vsc lsl15(long a, vsc *p) { return __builtin_vec_lvswxl (a,p); } ++vsc lsl16(long a, sc *p) { return __builtin_vec_lvswxl (a,p); } ++vuc lsl17(long a, vuc *p) { return __builtin_vec_lvswxl (a,p); } ++vuc lsl18(long a, uc *p) { return __builtin_vec_lvswxl (a,p); } ++vsf Dlsl01(long a, vsf *p) { return vec_lvswxl (a,p); } ++vsf Dlsl02(long a, sf *p) { return vec_lvswxl (a,p); } ++vbi Dlsl03(long a, vbi *p) { return vec_lvswxl (a,p); } ++vsi Dlsl04(long a, vsi *p) { return vec_lvswxl (a,p); } ++vsi Dlsl05(long a, si *p) { return vec_lvswxl (a,p); } ++vui Dlsl06(long a, vui *p) { return vec_lvswxl (a,p); } ++vui Dlsl07(long a, ui *p) { return vec_lvswxl (a,p); } ++vbs Dlsl08(long a, vbs *p) { return vec_lvswxl (a,p); } ++vp Dlsl09(long a, vp *p) { return vec_lvswxl (a,p); } ++vss Dlsl10(long a, vss *p) { return vec_lvswxl (a,p); } ++vss Dlsl11(long a, ss *p) { return vec_lvswxl (a,p); } ++vus Dlsl12(long a, vus *p) { return vec_lvswxl (a,p); } ++vus Dlsl13(long a, us *p) { return vec_lvswxl (a,p); } ++vbc Dlsl14(long a, vbc *p) { return vec_lvswxl (a,p); } ++vsc Dlsl15(long a, vsc *p) { return vec_lvswxl (a,p); } ++vsc Dlsl16(long a, sc *p) { return vec_lvswxl (a,p); } ++vuc Dlsl17(long a, vuc *p) { return vec_lvswxl (a,p); } ++vuc Dlsl18(long a, uc *p) { return vec_lvswxl (a,p); } +diff -ruN gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-1.c gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-1.c +--- gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-1.c 1969-12-31 18:00:00.000000000 -0600 ++++ gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-1.c 2012-03-06 12:31:05.156039000 -0600 +@@ -0,0 +1,36 @@ ++/* { dg-do compile { target { powerpc*-*-* } } } */ ++/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */ ++/* { dg-require-effective-target powerpc_altivec_ok } */ ++/* { dg-options "-O2 -maltivec -maltivec2" } */ ++/* { dg-final { scan-assembler-times "vabsdub" 7 } } */ ++ ++#include ++ ++typedef __vector signed char vsc; ++typedef __vector signed short vss; ++typedef __vector signed int vsi; ++typedef __vector unsigned char vuc; ++typedef __vector unsigned short vus; ++typedef __vector unsigned int vui; ++typedef __vector bool char vbc; ++typedef __vector bool short vbs; ++typedef __vector bool int vbi; ++typedef __vector float vsf; ++typedef __vector pixel vp; ++typedef signed char sc; ++typedef signed short ss; ++typedef signed int si; ++typedef signed long sl; ++typedef unsigned char uc; ++typedef unsigned short us; ++typedef unsigned int ui; ++typedef unsigned long ul; ++typedef float sf; ++ ++vuc fa1b(vuc a, vuc b) { return __builtin_altivec_vabsdub (a,b); } ++vuc ad1(vuc a, vuc b) { return __builtin_vec_absd (a,b); } ++vuc ad2(vbc a, vuc b) { return __builtin_vec_absd (a,b); } ++vuc ad3(vuc a, vbc b) { return __builtin_vec_absd (a,b); } ++vuc Dad1(vuc a, vuc b) { return vec_absd (a,b); } ++vuc Dad2(vbc a, vuc b) { return vec_absd (a,b); } ++vuc Dad3(vuc a, vbc b) { return vec_absd (a,b); } +diff -ruN gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-20.c gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-20.c +--- gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-20.c 1969-12-31 18:00:00.000000000 -0600 ++++ gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-20.c 2012-03-06 12:31:05.156039000 -0600 +@@ -0,0 +1,66 @@ ++/* { dg-do compile { target { powerpc*-*-* } } } */ ++/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */ ++/* { dg-require-effective-target powerpc_altivec_ok } */ ++/* { dg-options "-O2 -maltivec -maltivec2" } */ ++/* { dg-final { scan-assembler-times "stvswx" 37 } } */ ++ ++#include ++ ++typedef __vector signed char vsc; ++typedef __vector signed short vss; ++typedef __vector signed int vsi; ++typedef __vector unsigned char vuc; ++typedef __vector unsigned short vus; ++typedef __vector unsigned int vui; ++typedef __vector bool char vbc; ++typedef __vector bool short vbs; ++typedef __vector bool int vbi; ++typedef __vector float vsf; ++typedef __vector pixel vp; ++typedef signed char sc; ++typedef signed short ss; ++typedef signed int si; ++typedef signed long sl; ++typedef unsigned char uc; ++typedef unsigned short us; ++typedef unsigned int ui; ++typedef unsigned long ul; ++typedef float sf; ++ ++void ss1(vsc v, long a, vsc *p) { __builtin_altivec_stvswx (v,a,p); } ++void ssx01(vsf v, long a, vsf *p) { __builtin_vec_stvswx (v,a,p); } ++void ssx02(vsf v, long a, sf *p) { __builtin_vec_stvswx (v,a,p); } ++void ssx03(vbi v, long a, vbi *p) { __builtin_vec_stvswx (v,a,p); } ++void ssx04(vsi v, long a, vsi *p) { __builtin_vec_stvswx (v,a,p); } ++void ssx05(vsi v, long a, si *p) { __builtin_vec_stvswx (v,a,p); } ++void ssx06(vui v, long a, vui *p) { __builtin_vec_stvswx (v,a,p); } ++void ssx07(vui v, long a, ui *p) { __builtin_vec_stvswx (v,a,p); } ++void ssx08(vbs v, long a, vbs *p) { __builtin_vec_stvswx (v,a,p); } ++void ssx09(vp v, long a, vp *p) { __builtin_vec_stvswx (v,a,p); } ++void ssx10(vss v, long a, vss *p) { __builtin_vec_stvswx (v,a,p); } ++void ssx11(vss v, long a, ss *p) { __builtin_vec_stvswx (v,a,p); } ++void ssx12(vus v, long a, vus *p) { __builtin_vec_stvswx (v,a,p); } ++void ssx13(vus v, long a, us *p) { __builtin_vec_stvswx (v,a,p); } ++void ssx14(vbc v, long a, vbc *p) { __builtin_vec_stvswx (v,a,p); } ++void ssx15(vsc v, long a, vsc *p) { __builtin_vec_stvswx (v,a,p); } ++void ssx16(vsc v, long a, sc *p) { __builtin_vec_stvswx (v,a,p); } ++void ssx17(vuc v, long a, vuc *p) { __builtin_vec_stvswx (v,a,p); } ++void ssx18(vuc v, long a, uc *p) { __builtin_vec_stvswx (v,a,p); } ++void Dssx01(vsf v, long a, vsf *p) { vec_stvswx (v,a,p); } ++void Dssx02(vsf v, long a, sf *p) { vec_stvswx (v,a,p); } ++void Dssx03(vbi v, long a, vbi *p) { vec_stvswx (v,a,p); } ++void Dssx04(vsi v, long a, vsi *p) { vec_stvswx (v,a,p); } ++void Dssx05(vsi v, long a, si *p) { vec_stvswx (v,a,p); } ++void Dssx06(vui v, long a, vui *p) { vec_stvswx (v,a,p); } ++void Dssx07(vui v, long a, ui *p) { vec_stvswx (v,a,p); } ++void Dssx08(vbs v, long a, vbs *p) { vec_stvswx (v,a,p); } ++void Dssx09(vp v, long a, vp *p) { vec_stvswx (v,a,p); } ++void Dssx10(vss v, long a, vss *p) { vec_stvswx (v,a,p); } ++void Dssx11(vss v, long a, ss *p) { vec_stvswx (v,a,p); } ++void Dssx12(vus v, long a, vus *p) { vec_stvswx (v,a,p); } ++void Dssx13(vus v, long a, us *p) { vec_stvswx (v,a,p); } ++void Dssx14(vbc v, long a, vbc *p) { vec_stvswx (v,a,p); } ++void Dssx15(vsc v, long a, vsc *p) { vec_stvswx (v,a,p); } ++void Dssx16(vsc v, long a, sc *p) { vec_stvswx (v,a,p); } ++void Dssx17(vuc v, long a, vuc *p) { vec_stvswx (v,a,p); } ++void Dssx18(vuc v, long a, uc *p) { vec_stvswx (v,a,p); } +diff -ruN gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-21.c gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-21.c +--- gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-21.c 1969-12-31 18:00:00.000000000 -0600 ++++ gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-21.c 2012-03-06 12:31:05.156039000 -0600 +@@ -0,0 +1,66 @@ ++/* { dg-do compile { target { powerpc*-*-* } } } */ ++/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */ ++/* { dg-require-effective-target powerpc_altivec_ok } */ ++/* { dg-options "-O2 -maltivec -maltivec2" } */ ++/* { dg-final { scan-assembler-times "stvswxl" 37 } } */ ++ ++#include ++ ++typedef __vector signed char vsc; ++typedef __vector signed short vss; ++typedef __vector signed int vsi; ++typedef __vector unsigned char vuc; ++typedef __vector unsigned short vus; ++typedef __vector unsigned int vui; ++typedef __vector bool char vbc; ++typedef __vector bool short vbs; ++typedef __vector bool int vbi; ++typedef __vector float vsf; ++typedef __vector pixel vp; ++typedef signed char sc; ++typedef signed short ss; ++typedef signed int si; ++typedef signed long sl; ++typedef unsigned char uc; ++typedef unsigned short us; ++typedef unsigned int ui; ++typedef unsigned long ul; ++typedef float sf; ++ ++void ss2l(vsc v, long a, vsc *p) { __builtin_altivec_stvswxl (v,a,p); } ++void ssxl01(vsf v, long a, vsf *p) { __builtin_vec_stvswxl (v,a,p); } ++void ssxl02(vsf v, long a, sf *p) { __builtin_vec_stvswxl (v,a,p); } ++void ssxl03(vbi v, long a, vbi *p) { __builtin_vec_stvswxl (v,a,p); } ++void ssxl04(vsi v, long a, vsi *p) { __builtin_vec_stvswxl (v,a,p); } ++void ssxl05(vsi v, long a, si *p) { __builtin_vec_stvswxl (v,a,p); } ++void ssxl06(vui v, long a, vui *p) { __builtin_vec_stvswxl (v,a,p); } ++void ssxl07(vui v, long a, ui *p) { __builtin_vec_stvswxl (v,a,p); } ++void ssxl08(vbs v, long a, vbs *p) { __builtin_vec_stvswxl (v,a,p); } ++void ssxl09(vp v, long a, vp *p) { __builtin_vec_stvswxl (v,a,p); } ++void ssxl10(vss v, long a, vss *p) { __builtin_vec_stvswxl (v,a,p); } ++void ssxl11(vss v, long a, ss *p) { __builtin_vec_stvswxl (v,a,p); } ++void ssxl12(vus v, long a, vus *p) { __builtin_vec_stvswxl (v,a,p); } ++void ssxl13(vus v, long a, us *p) { __builtin_vec_stvswxl (v,a,p); } ++void ssxl14(vbc v, long a, vbc *p) { __builtin_vec_stvswxl (v,a,p); } ++void ssxl15(vsc v, long a, vsc *p) { __builtin_vec_stvswxl (v,a,p); } ++void ssxl16(vsc v, long a, sc *p) { __builtin_vec_stvswxl (v,a,p); } ++void ssxl17(vuc v, long a, vuc *p) { __builtin_vec_stvswxl (v,a,p); } ++void ssxl18(vuc v, long a, uc *p) { __builtin_vec_stvswxl (v,a,p); } ++void Dssxl01(vsf v, long a, vsf *p) { vec_stvswxl (v,a,p); } ++void Dssxl02(vsf v, long a, sf *p) { vec_stvswxl (v,a,p); } ++void Dssxl03(vbi v, long a, vbi *p) { vec_stvswxl (v,a,p); } ++void Dssxl04(vsi v, long a, vsi *p) { vec_stvswxl (v,a,p); } ++void Dssxl05(vsi v, long a, si *p) { vec_stvswxl (v,a,p); } ++void Dssxl06(vui v, long a, vui *p) { vec_stvswxl (v,a,p); } ++void Dssxl07(vui v, long a, ui *p) { vec_stvswxl (v,a,p); } ++void Dssxl08(vbs v, long a, vbs *p) { vec_stvswxl (v,a,p); } ++void Dssxl09(vp v, long a, vp *p) { vec_stvswxl (v,a,p); } ++void Dssxl10(vss v, long a, vss *p) { vec_stvswxl (v,a,p); } ++void Dssxl11(vss v, long a, ss *p) { vec_stvswxl (v,a,p); } ++void Dssxl12(vus v, long a, vus *p) { vec_stvswxl (v,a,p); } ++void Dssxl13(vus v, long a, us *p) { vec_stvswxl (v,a,p); } ++void Dssxl14(vbc v, long a, vbc *p) { vec_stvswxl (v,a,p); } ++void Dssxl15(vsc v, long a, vsc *p) { vec_stvswxl (v,a,p); } ++void Dssxl16(vsc v, long a, sc *p) { vec_stvswxl (v,a,p); } ++void Dssxl17(vuc v, long a, vuc *p) { vec_stvswxl (v,a,p); } ++void Dssxl18(vuc v, long a, uc *p) { vec_stvswxl (v,a,p); } +diff -ruN gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-22.c gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-22.c +--- gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-22.c 1969-12-31 18:00:00.000000000 -0600 ++++ gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-22.c 2012-03-06 12:31:05.157039001 -0600 +@@ -0,0 +1,66 @@ ++/* { dg-do compile { target { powerpc*-*-* } } } */ ++/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */ ++/* { dg-require-effective-target powerpc_altivec_ok } */ ++/* { dg-options "-O2 -maltivec -maltivec2" } */ ++/* { dg-final { scan-assembler-times "lvsm" 37 } } */ ++ ++#include ++ ++typedef __vector signed char vsc; ++typedef __vector signed short vss; ++typedef __vector signed int vsi; ++typedef __vector unsigned char vuc; ++typedef __vector unsigned short vus; ++typedef __vector unsigned int vui; ++typedef __vector bool char vbc; ++typedef __vector bool short vbs; ++typedef __vector bool int vbi; ++typedef __vector float vsf; ++typedef __vector pixel vp; ++typedef signed char sc; ++typedef signed short ss; ++typedef signed int si; ++typedef signed long sl; ++typedef unsigned char uc; ++typedef unsigned short us; ++typedef unsigned int ui; ++typedef unsigned long ul; ++typedef float sf; ++ ++vsc lsm(long a, void *p) { return __builtin_altivec_lvsm (a,p); } ++vsf lm01(long a, vsf *p) { return __builtin_vec_lvsm (a,p); } ++vsf lm02(long a, sf *p) { return __builtin_vec_lvsm (a,p); } ++vbi lm03(long a, vbi *p) { return __builtin_vec_lvsm (a,p); } ++vsi lm04(long a, vsi *p) { return __builtin_vec_lvsm (a,p); } ++vsi lm05(long a, si *p) { return __builtin_vec_lvsm (a,p); } ++vui lm06(long a, vui *p) { return __builtin_vec_lvsm (a,p); } ++vui lm07(long a, ui *p) { return __builtin_vec_lvsm (a,p); } ++vbs lm08(long a, vbs *p) { return __builtin_vec_lvsm (a,p); } ++vp lm09(long a, vp *p) { return __builtin_vec_lvsm (a,p); } ++vss lm10(long a, vss *p) { return __builtin_vec_lvsm (a,p); } ++vss lm11(long a, ss *p) { return __builtin_vec_lvsm (a,p); } ++vus lm12(long a, vus *p) { return __builtin_vec_lvsm (a,p); } ++vus lm13(long a, us *p) { return __builtin_vec_lvsm (a,p); } ++vbc lm14(long a, vbc *p) { return __builtin_vec_lvsm (a,p); } ++vsc lm15(long a, vsc *p) { return __builtin_vec_lvsm (a,p); } ++vsc lm16(long a, sc *p) { return __builtin_vec_lvsm (a,p); } ++vuc lm17(long a, vuc *p) { return __builtin_vec_lvsm (a,p); } ++vuc lm18(long a, uc *p) { return __builtin_vec_lvsm (a,p); } ++vsf Dlm01(long a, vsf *p) { return vec_lvsm (a,p); } ++vsf Dlm02(long a, sf *p) { return vec_lvsm (a,p); } ++vbi Dlm03(long a, vbi *p) { return vec_lvsm (a,p); } ++vsi Dlm04(long a, vsi *p) { return vec_lvsm (a,p); } ++vsi Dlm05(long a, si *p) { return vec_lvsm (a,p); } ++vui Dlm06(long a, vui *p) { return vec_lvsm (a,p); } ++vui Dlm07(long a, ui *p) { return vec_lvsm (a,p); } ++vbs Dlm08(long a, vbs *p) { return vec_lvsm (a,p); } ++vp Dlm09(long a, vp *p) { return vec_lvsm (a,p); } ++vss Dlm10(long a, vss *p) { return vec_lvsm (a,p); } ++vss Dlm11(long a, ss *p) { return vec_lvsm (a,p); } ++vus Dlm12(long a, vus *p) { return vec_lvsm (a,p); } ++vus Dlm13(long a, us *p) { return vec_lvsm (a,p); } ++vbc Dlm14(long a, vbc *p) { return vec_lvsm (a,p); } ++vsc Dlm15(long a, vsc *p) { return vec_lvsm (a,p); } ++vsc Dlm16(long a, sc *p) { return vec_lvsm (a,p); } ++vuc Dlm17(long a, vuc *p) { return vec_lvsm (a,p); } ++vuc Dlm18(long a, uc *p) { return vec_lvsm (a,p); } +diff -ruN gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-2.c gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-2.c +--- gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-2.c 1969-12-31 18:00:00.000000000 -0600 ++++ gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-2.c 2012-03-06 12:31:05.157039001 -0600 +@@ -0,0 +1,36 @@ ++/* { dg-do compile { target { powerpc*-*-* } } } */ ++/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */ ++/* { dg-require-effective-target powerpc_altivec_ok } */ ++/* { dg-options "-O2 -maltivec -maltivec2" } */ ++/* { dg-final { scan-assembler-times "vabsduh" 7 } } */ ++ ++#include ++ ++typedef __vector signed char vsc; ++typedef __vector signed short vss; ++typedef __vector signed int vsi; ++typedef __vector unsigned char vuc; ++typedef __vector unsigned short vus; ++typedef __vector unsigned int vui; ++typedef __vector bool char vbc; ++typedef __vector bool short vbs; ++typedef __vector bool int vbi; ++typedef __vector float vsf; ++typedef __vector pixel vp; ++typedef signed char sc; ++typedef signed short ss; ++typedef signed int si; ++typedef signed long sl; ++typedef unsigned char uc; ++typedef unsigned short us; ++typedef unsigned int ui; ++typedef unsigned long ul; ++typedef float sf; ++ ++vus fa2h(vus a, vus b) { return __builtin_altivec_vabsduh (a,b); } ++vus ad4(vus a, vus b) { return __builtin_vec_absd (a,b); } ++vus ad5(vbs a, vus b) { return __builtin_vec_absd (a,b); } ++vus ad6(vus a, vbs b) { return __builtin_vec_absd (a,b); } ++vus Dad4(vus a, vus b) { return vec_absd (a,b); } ++vus Dad5(vbs a, vus b) { return vec_absd (a,b); } ++vus Dad6(vus a, vbs b) { return vec_absd (a,b); } +diff -ruN gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-3.c gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-3.c +--- gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-3.c 1969-12-31 18:00:00.000000000 -0600 ++++ gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-3.c 2012-03-06 12:31:05.157039001 -0600 +@@ -0,0 +1,36 @@ ++/* { dg-do compile { target { powerpc*-*-* } } } */ ++/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */ ++/* { dg-require-effective-target powerpc_altivec_ok } */ ++/* { dg-options "-O2 -maltivec -maltivec2" } */ ++/* { dg-final { scan-assembler-times "vabsduw" 7 } } */ ++ ++#include ++ ++typedef __vector signed char vsc; ++typedef __vector signed short vss; ++typedef __vector signed int vsi; ++typedef __vector unsigned char vuc; ++typedef __vector unsigned short vus; ++typedef __vector unsigned int vui; ++typedef __vector bool char vbc; ++typedef __vector bool short vbs; ++typedef __vector bool int vbi; ++typedef __vector float vsf; ++typedef __vector pixel vp; ++typedef signed char sc; ++typedef signed short ss; ++typedef signed int si; ++typedef signed long sl; ++typedef unsigned char uc; ++typedef unsigned short us; ++typedef unsigned int ui; ++typedef unsigned long ul; ++typedef float sf; ++ ++vui fa3w(vui a, vui b) { return __builtin_altivec_vabsduw (a,b); } ++vui ad7(vui a, vui b) { return __builtin_vec_absd (a,b); } ++vui ad8(vbi a, vui b) { return __builtin_vec_absd (a,b); } ++vui ad9(vui a, vbi b) { return __builtin_vec_absd (a,b); } ++vui Dad7(vui a, vui b) { return vec_absd (a,b); } ++vui Dad8(vbi a, vui b) { return vec_absd (a,b); } ++vui Dad9(vui a, vbi b) { return vec_absd (a,b); } +diff -ruN gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-4.c gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-4.c +--- gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-4.c 1969-12-31 18:00:00.000000000 -0600 ++++ gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-4.c 2012-03-06 12:31:05.158039002 -0600 +@@ -0,0 +1,34 @@ ++/* { dg-do compile { target { powerpc*-*-* } } } */ ++/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */ ++/* { dg-require-effective-target powerpc_altivec_ok } */ ++/* { dg-options "-O2 -maltivec -maltivec2" } */ ++/* { dg-final { scan-assembler-times "lvexbx" 5 } } */ ++ ++#include ++ ++typedef __vector signed char vsc; ++typedef __vector signed short vss; ++typedef __vector signed int vsi; ++typedef __vector unsigned char vuc; ++typedef __vector unsigned short vus; ++typedef __vector unsigned int vui; ++typedef __vector bool char vbc; ++typedef __vector bool short vbs; ++typedef __vector bool int vbi; ++typedef __vector float vsf; ++typedef __vector pixel vp; ++typedef signed char sc; ++typedef signed short ss; ++typedef signed int si; ++typedef signed long sl; ++typedef unsigned char uc; ++typedef unsigned short us; ++typedef unsigned int ui; ++typedef unsigned long ul; ++typedef float sf; ++ ++vsc le1b(long a, void *p) { return __builtin_altivec_lvexbx (a,p); } ++vsc leb1(long a, sc *p) { return __builtin_vec_lvexbx (a,p); } ++vuc leb2(long a, uc *p) { return __builtin_vec_lvexbx (a,p); } ++vsc Dleb1(long a, sc *p) { return vec_lvexbx (a,p); } ++vuc Dleb2(long a, uc *p) { return vec_lvexbx (a,p); } +diff -ruN gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-5.c gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-5.c +--- gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-5.c 1969-12-31 18:00:00.000000000 -0600 ++++ gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-5.c 2012-03-06 12:31:05.158039002 -0600 +@@ -0,0 +1,34 @@ ++/* { dg-do compile { target { powerpc*-*-* } } } */ ++/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */ ++/* { dg-require-effective-target powerpc_altivec_ok } */ ++/* { dg-options "-O2 -maltivec -maltivec2" } */ ++/* { dg-final { scan-assembler-times "lvexhx" 5 } } */ ++ ++#include ++ ++typedef __vector signed char vsc; ++typedef __vector signed short vss; ++typedef __vector signed int vsi; ++typedef __vector unsigned char vuc; ++typedef __vector unsigned short vus; ++typedef __vector unsigned int vui; ++typedef __vector bool char vbc; ++typedef __vector bool short vbs; ++typedef __vector bool int vbi; ++typedef __vector float vsf; ++typedef __vector pixel vp; ++typedef signed char sc; ++typedef signed short ss; ++typedef signed int si; ++typedef signed long sl; ++typedef unsigned char uc; ++typedef unsigned short us; ++typedef unsigned int ui; ++typedef unsigned long ul; ++typedef float sf; ++ ++vss le2h(long a, void *p) { return __builtin_altivec_lvexhx (a,p); } ++vss leh1(long a, ss *p) { return __builtin_vec_lvexhx (a,p); } ++vus leh2(long a, us *p) { return __builtin_vec_lvexhx (a,p); } ++vss Dleh1(long a, ss *p) { return vec_lvexhx (a,p); } ++vus Dleh2(long a, us *p) { return vec_lvexhx (a,p); } +diff -ruN gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-6.c gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-6.c +--- gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-6.c 1969-12-31 18:00:00.000000000 -0600 ++++ gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-6.c 2012-03-06 12:31:05.158039002 -0600 +@@ -0,0 +1,40 @@ ++/* { dg-do compile { target { powerpc*-*-* } } } */ ++/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */ ++/* { dg-require-effective-target powerpc_altivec_ok } */ ++/* { dg-options "-O2 -maltivec -maltivec2" } */ ++/* { dg-final { scan-assembler-times "lvexwx" 11 } } */ ++ ++#include ++ ++typedef __vector signed char vsc; ++typedef __vector signed short vss; ++typedef __vector signed int vsi; ++typedef __vector unsigned char vuc; ++typedef __vector unsigned short vus; ++typedef __vector unsigned int vui; ++typedef __vector bool char vbc; ++typedef __vector bool short vbs; ++typedef __vector bool int vbi; ++typedef __vector float vsf; ++typedef __vector pixel vp; ++typedef signed char sc; ++typedef signed short ss; ++typedef signed int si; ++typedef signed long sl; ++typedef unsigned char uc; ++typedef unsigned short us; ++typedef unsigned int ui; ++typedef unsigned long ul; ++typedef float sf; ++ ++vsi le3w(long a, void *p) { return __builtin_altivec_lvexwx (a,p); } ++vsf lew1(long a, sf *p) { return __builtin_vec_lvexwx (a,p); } ++vsi lew2(long a, si *p) { return __builtin_vec_lvexwx (a,p); } ++vui lew3(long a, ui *p) { return __builtin_vec_lvexwx (a,p); } ++vsi lew4(long a, sl *p) { return __builtin_vec_lvexwx (a,p); } ++vui lew5(long a, ul *p) { return __builtin_vec_lvexwx (a,p); } ++vsf Dlew1(long a, sf *p) { return vec_lvexwx (a,p); } ++vsi Dlew2(long a, si *p) { return vec_lvexwx (a,p); } ++vui Dlew3(long a, ui *p) { return vec_lvexwx (a,p); } ++vsi Dlew4(long a, sl *p) { return vec_lvexwx (a,p); } ++vui Dlew5(long a, ul *p) { return vec_lvexwx (a,p); } +diff -ruN gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-7.c gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-7.c +--- gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-7.c 1969-12-31 18:00:00.000000000 -0600 ++++ gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-7.c 2012-03-06 12:31:05.159039002 -0600 +@@ -0,0 +1,42 @@ ++/* { dg-do compile { target { powerpc*-*-* } } } */ ++/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */ ++/* { dg-require-effective-target powerpc_altivec_ok } */ ++/* { dg-options "-O2 -maltivec -maltivec2" } */ ++/* { dg-final { scan-assembler-times "stvexbx" 13 } } */ ++ ++#include ++ ++typedef __vector signed char vsc; ++typedef __vector signed short vss; ++typedef __vector signed int vsi; ++typedef __vector unsigned char vuc; ++typedef __vector unsigned short vus; ++typedef __vector unsigned int vui; ++typedef __vector bool char vbc; ++typedef __vector bool short vbs; ++typedef __vector bool int vbi; ++typedef __vector float vsf; ++typedef __vector pixel vp; ++typedef signed char sc; ++typedef signed short ss; ++typedef signed int si; ++typedef signed long sl; ++typedef unsigned char uc; ++typedef unsigned short us; ++typedef unsigned int ui; ++typedef unsigned long ul; ++typedef float sf; ++ ++void se1b(vsc v, long a, vsc *p) { __builtin_altivec_stvexbx (v,a,p); } ++void seb1(vsc v, long a, sc *p) { __builtin_vec_stvexbx (v,a,p); } ++void seb2(vuc v, long a, uc *p) { __builtin_vec_stvexbx (v,a,p); } ++void seb3(vbc v, long a, sc *p) { __builtin_vec_stvexbx (v,a,p); } ++void seb4(vbc v, long a, uc *p) { __builtin_vec_stvexbx (v,a,p); } ++void seb5(vsc v, long a, void *p) { __builtin_vec_stvexbx (v,a,p); } ++void seb6(vuc v, long a, void *p) { __builtin_vec_stvexbx (v,a,p); } ++void Dseb1(vsc v, long a, sc *p) { vec_stvexbx (v,a,p); } ++void Dseb2(vuc v, long a, uc *p) { vec_stvexbx (v,a,p); } ++void Dseb3(vbc v, long a, sc *p) { vec_stvexbx (v,a,p); } ++void Dseb4(vbc v, long a, uc *p) { vec_stvexbx (v,a,p); } ++void Dseb5(vsc v, long a, void *p) { vec_stvexbx (v,a,p); } ++void Dseb6(vuc v, long a, void *p) { vec_stvexbx (v,a,p); } +diff -ruN gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-8.c gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-8.c +--- gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-8.c 1969-12-31 18:00:00.000000000 -0600 ++++ gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-8.c 2012-03-06 12:31:05.159039002 -0600 +@@ -0,0 +1,42 @@ ++/* { dg-do compile { target { powerpc*-*-* } } } */ ++/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */ ++/* { dg-require-effective-target powerpc_altivec_ok } */ ++/* { dg-options "-O2 -maltivec -maltivec2" } */ ++/* { dg-final { scan-assembler-times "stvexhx" 13 } } */ ++ ++#include ++ ++typedef __vector signed char vsc; ++typedef __vector signed short vss; ++typedef __vector signed int vsi; ++typedef __vector unsigned char vuc; ++typedef __vector unsigned short vus; ++typedef __vector unsigned int vui; ++typedef __vector bool char vbc; ++typedef __vector bool short vbs; ++typedef __vector bool int vbi; ++typedef __vector float vsf; ++typedef __vector pixel vp; ++typedef signed char sc; ++typedef signed short ss; ++typedef signed int si; ++typedef signed long sl; ++typedef unsigned char uc; ++typedef unsigned short us; ++typedef unsigned int ui; ++typedef unsigned long ul; ++typedef float sf; ++ ++void se2h(vss v, long a, vss *p) { __builtin_altivec_stvexhx (v,a,p); } ++void seh1(vss v, long a, ss *p) { __builtin_vec_stvexhx (v,a,p); } ++void seh2(vus v, long a, us *p) { __builtin_vec_stvexhx (v,a,p); } ++void seh3(vbs v, long a, ss *p) { __builtin_vec_stvexhx (v,a,p); } ++void seh4(vbs v, long a, us *p) { __builtin_vec_stvexhx (v,a,p); } ++void seh5(vss v, long a, void *p) { __builtin_vec_stvexhx (v,a,p); } ++void seh6(vus v, long a, void *p) { __builtin_vec_stvexhx (v,a,p); } ++void Dseh1(vss v, long a, ss *p) { vec_stvexhx (v,a,p); } ++void Dseh2(vus v, long a, us *p) { vec_stvexhx (v,a,p); } ++void Dseh3(vbs v, long a, ss *p) { vec_stvexhx (v,a,p); } ++void Dseh4(vbs v, long a, us *p) { vec_stvexhx (v,a,p); } ++void Dseh5(vss v, long a, void *p) { vec_stvexhx (v,a,p); } ++void Dseh6(vus v, long a, void *p) { vec_stvexhx (v,a,p); } +diff -ruN gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-9.c gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-9.c +--- gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-9.c 1969-12-31 18:00:00.000000000 -0600 ++++ gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-9.c 2012-03-06 12:31:05.159039002 -0600 +@@ -0,0 +1,46 @@ ++/* { dg-do compile { target { powerpc*-*-* } } } */ ++/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */ ++/* { dg-require-effective-target powerpc_altivec_ok } */ ++/* { dg-options "-O2 -maltivec -maltivec2" } */ ++/* { dg-final { scan-assembler-times "stvexwx" 17 } } */ ++ ++#include ++ ++typedef __vector signed char vsc; ++typedef __vector signed short vss; ++typedef __vector signed int vsi; ++typedef __vector unsigned char vuc; ++typedef __vector unsigned short vus; ++typedef __vector unsigned int vui; ++typedef __vector bool char vbc; ++typedef __vector bool short vbs; ++typedef __vector bool int vbi; ++typedef __vector float vsf; ++typedef __vector pixel vp; ++typedef signed char sc; ++typedef signed short ss; ++typedef signed int si; ++typedef signed long sl; ++typedef unsigned char uc; ++typedef unsigned short us; ++typedef unsigned int ui; ++typedef unsigned long ul; ++typedef float sf; ++ ++void se3w(vsi v, long a, vsi *p) { __builtin_altivec_stvexwx (v,a,p); } ++void sew1(vsf v, long a, sf *p) { __builtin_vec_stvexwx (v,a,p); } ++void sew2(vsi v, long a, si *p) { __builtin_vec_stvexwx (v,a,p); } ++void sew3(vui v, long a, ui *p) { __builtin_vec_stvexwx (v,a,p); } ++void sew4(vbi v, long a, si *p) { __builtin_vec_stvexwx (v,a,p); } ++void sew5(vbi v, long a, ui *p) { __builtin_vec_stvexwx (v,a,p); } ++void sew6(vsf v, long a, void *p) { __builtin_vec_stvexwx (v,a,p); } ++void sew7(vsi v, long a, void *p) { __builtin_vec_stvexwx (v,a,p); } ++void sew8(vui v, long a, void *p) { __builtin_vec_stvexwx (v,a,p); } ++void Dsew1(vsf v, long a, sf *p) { vec_stvexwx (v,a,p); } ++void Dsew2(vsi v, long a, si *p) { vec_stvexwx (v,a,p); } ++void Dsew3(vui v, long a, ui *p) { vec_stvexwx (v,a,p); } ++void Dsew4(vbi v, long a, si *p) { vec_stvexwx (v,a,p); } ++void Dsew5(vbi v, long a, ui *p) { vec_stvexwx (v,a,p); } ++void Dsew6(vsf v, long a, void *p) { vec_stvexwx (v,a,p); } ++void Dsew7(vsi v, long a, void *p) { vec_stvexwx (v,a,p); } ++void Dsew8(vui v, long a, void *p) { vec_stvexwx (v,a,p); } +diff -ruN gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/cell_builtin-1.c gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/cell_builtin-1.c +--- gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/cell_builtin-1.c 1969-12-31 18:00:00.000000000 -0600 ++++ gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/cell_builtin-1.c 2012-03-06 12:31:15.921038995 -0600 +@@ -0,0 +1,48 @@ ++/* { dg-do compile { target { powerpc*-*-* } } } */ ++/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */ ++/* { dg-require-effective-target powerpc_altivec_ok } */ ++/* { dg-options "-O2 -maltivec -mcpu=cell" } */ ++/* { dg-final { scan-assembler-times "lvlx" 19 } } */ ++ ++#include ++ ++typedef __vector signed char vsc; ++typedef __vector signed short vss; ++typedef __vector signed int vsi; ++typedef __vector unsigned char vuc; ++typedef __vector unsigned short vus; ++typedef __vector unsigned int vui; ++typedef __vector bool char vbc; ++typedef __vector bool short vbs; ++typedef __vector bool int vbi; ++typedef __vector float vsf; ++typedef __vector pixel vp; ++typedef signed char sc; ++typedef signed short ss; ++typedef signed int si; ++typedef signed long sl; ++typedef unsigned char uc; ++typedef unsigned short us; ++typedef unsigned int ui; ++typedef unsigned long ul; ++typedef float sf; ++ ++vsc lc1(long a, void *p) { return __builtin_altivec_lvlx (a,p); } ++vsf llx01(long a, vsf *p) { return __builtin_vec_lvlx (a,p); } ++vsf llx02(long a, sf *p) { return __builtin_vec_lvlx (a,p); } ++vbi llx03(long a, vbi *p) { return __builtin_vec_lvlx (a,p); } ++vsi llx04(long a, vsi *p) { return __builtin_vec_lvlx (a,p); } ++vsi llx05(long a, si *p) { return __builtin_vec_lvlx (a,p); } ++vui llx06(long a, vui *p) { return __builtin_vec_lvlx (a,p); } ++vui llx07(long a, ui *p) { return __builtin_vec_lvlx (a,p); } ++vbs llx08(long a, vbs *p) { return __builtin_vec_lvlx (a,p); } ++vp llx09(long a, vp *p) { return __builtin_vec_lvlx (a,p); } ++vss llx10(long a, vss *p) { return __builtin_vec_lvlx (a,p); } ++vss llx11(long a, ss *p) { return __builtin_vec_lvlx (a,p); } ++vus llx12(long a, vus *p) { return __builtin_vec_lvlx (a,p); } ++vus llx13(long a, us *p) { return __builtin_vec_lvlx (a,p); } ++vbc llx14(long a, vbc *p) { return __builtin_vec_lvlx (a,p); } ++vsc llx15(long a, vsc *p) { return __builtin_vec_lvlx (a,p); } ++vsc llx16(long a, sc *p) { return __builtin_vec_lvlx (a,p); } ++vuc llx17(long a, vuc *p) { return __builtin_vec_lvlx (a,p); } ++vuc llx18(long a, uc *p) { return __builtin_vec_lvlx (a,p); } +diff -ruN gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/cell_builtin-2.c gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/cell_builtin-2.c +--- gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/cell_builtin-2.c 1969-12-31 18:00:00.000000000 -0600 ++++ gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/cell_builtin-2.c 2012-03-06 12:31:15.921038995 -0600 +@@ -0,0 +1,48 @@ ++/* { dg-do compile { target { powerpc*-*-* } } } */ ++/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */ ++/* { dg-require-effective-target powerpc_altivec_ok } */ ++/* { dg-options "-O2 -maltivec -mcpu=cell" } */ ++/* { dg-final { scan-assembler-times "lvlxl" 19 } } */ ++ ++#include ++ ++typedef __vector signed char vsc; ++typedef __vector signed short vss; ++typedef __vector signed int vsi; ++typedef __vector unsigned char vuc; ++typedef __vector unsigned short vus; ++typedef __vector unsigned int vui; ++typedef __vector bool char vbc; ++typedef __vector bool short vbs; ++typedef __vector bool int vbi; ++typedef __vector float vsf; ++typedef __vector pixel vp; ++typedef signed char sc; ++typedef signed short ss; ++typedef signed int si; ++typedef signed long sl; ++typedef unsigned char uc; ++typedef unsigned short us; ++typedef unsigned int ui; ++typedef unsigned long ul; ++typedef float sf; ++ ++vsc lc2(long a, void *p) { return __builtin_altivec_lvlxl (a,p); } ++vsf llxl01(long a, vsf *p) { return __builtin_vec_lvlxl (a,p); } ++vsf llxl02(long a, sf *p) { return __builtin_vec_lvlxl (a,p); } ++vbi llxl03(long a, vbi *p) { return __builtin_vec_lvlxl (a,p); } ++vsi llxl04(long a, vsi *p) { return __builtin_vec_lvlxl (a,p); } ++vsi llxl05(long a, si *p) { return __builtin_vec_lvlxl (a,p); } ++vui llxl06(long a, vui *p) { return __builtin_vec_lvlxl (a,p); } ++vui llxl07(long a, ui *p) { return __builtin_vec_lvlxl (a,p); } ++vbs llxl08(long a, vbs *p) { return __builtin_vec_lvlxl (a,p); } ++vp llxl09(long a, vp *p) { return __builtin_vec_lvlxl (a,p); } ++vss llxl10(long a, vss *p) { return __builtin_vec_lvlxl (a,p); } ++vss llxl11(long a, ss *p) { return __builtin_vec_lvlxl (a,p); } ++vus llxl12(long a, vus *p) { return __builtin_vec_lvlxl (a,p); } ++vus llxl13(long a, us *p) { return __builtin_vec_lvlxl (a,p); } ++vbc llxl14(long a, vbc *p) { return __builtin_vec_lvlxl (a,p); } ++vsc llxl15(long a, vsc *p) { return __builtin_vec_lvlxl (a,p); } ++vsc llxl16(long a, sc *p) { return __builtin_vec_lvlxl (a,p); } ++vuc llxl17(long a, vuc *p) { return __builtin_vec_lvlxl (a,p); } ++vuc llxl18(long a, uc *p) { return __builtin_vec_lvlxl (a,p); } +diff -ruN gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/cell_builtin-3.c gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/cell_builtin-3.c +--- gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/cell_builtin-3.c 1969-12-31 18:00:00.000000000 -0600 ++++ gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/cell_builtin-3.c 2012-03-06 12:31:15.922038996 -0600 +@@ -0,0 +1,48 @@ ++/* { dg-do compile { target { powerpc*-*-* } } } */ ++/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */ ++/* { dg-require-effective-target powerpc_altivec_ok } */ ++/* { dg-options "-O2 -maltivec -mcpu=cell" } */ ++/* { dg-final { scan-assembler-times "lvrx" 19 } } */ ++ ++#include ++ ++typedef __vector signed char vsc; ++typedef __vector signed short vss; ++typedef __vector signed int vsi; ++typedef __vector unsigned char vuc; ++typedef __vector unsigned short vus; ++typedef __vector unsigned int vui; ++typedef __vector bool char vbc; ++typedef __vector bool short vbs; ++typedef __vector bool int vbi; ++typedef __vector float vsf; ++typedef __vector pixel vp; ++typedef signed char sc; ++typedef signed short ss; ++typedef signed int si; ++typedef signed long sl; ++typedef unsigned char uc; ++typedef unsigned short us; ++typedef unsigned int ui; ++typedef unsigned long ul; ++typedef float sf; ++ ++vsc lc3(long a, void *p) { return __builtin_altivec_lvrx (a,p); } ++vsf lrx01(long a, vsf *p) { return __builtin_vec_lvrx (a,p); } ++vsf lrx02(long a, sf *p) { return __builtin_vec_lvrx (a,p); } ++vbi lrx03(long a, vbi *p) { return __builtin_vec_lvrx (a,p); } ++vsi lrx04(long a, vsi *p) { return __builtin_vec_lvrx (a,p); } ++vsi lrx05(long a, si *p) { return __builtin_vec_lvrx (a,p); } ++vui lrx06(long a, vui *p) { return __builtin_vec_lvrx (a,p); } ++vui lrx07(long a, ui *p) { return __builtin_vec_lvrx (a,p); } ++vbs lrx08(long a, vbs *p) { return __builtin_vec_lvrx (a,p); } ++vp lrx09(long a, vp *p) { return __builtin_vec_lvrx (a,p); } ++vss lrx10(long a, vss *p) { return __builtin_vec_lvrx (a,p); } ++vss lrx11(long a, ss *p) { return __builtin_vec_lvrx (a,p); } ++vus lrx12(long a, vus *p) { return __builtin_vec_lvrx (a,p); } ++vus lrx13(long a, us *p) { return __builtin_vec_lvrx (a,p); } ++vbc lrx14(long a, vbc *p) { return __builtin_vec_lvrx (a,p); } ++vsc lrx15(long a, vsc *p) { return __builtin_vec_lvrx (a,p); } ++vsc lrx16(long a, sc *p) { return __builtin_vec_lvrx (a,p); } ++vuc lrx17(long a, vuc *p) { return __builtin_vec_lvrx (a,p); } ++vuc lrx18(long a, uc *p) { return __builtin_vec_lvrx (a,p); } +diff -ruN gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/cell_builtin-4.c gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/cell_builtin-4.c +--- gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/cell_builtin-4.c 1969-12-31 18:00:00.000000000 -0600 ++++ gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/cell_builtin-4.c 2012-03-06 12:31:15.922038996 -0600 +@@ -0,0 +1,48 @@ ++/* { dg-do compile { target { powerpc*-*-* } } } */ ++/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */ ++/* { dg-require-effective-target powerpc_altivec_ok } */ ++/* { dg-options "-O2 -maltivec -mcpu=cell" } */ ++/* { dg-final { scan-assembler-times "lvrxl" 19 } } */ ++ ++#include ++ ++typedef __vector signed char vsc; ++typedef __vector signed short vss; ++typedef __vector signed int vsi; ++typedef __vector unsigned char vuc; ++typedef __vector unsigned short vus; ++typedef __vector unsigned int vui; ++typedef __vector bool char vbc; ++typedef __vector bool short vbs; ++typedef __vector bool int vbi; ++typedef __vector float vsf; ++typedef __vector pixel vp; ++typedef signed char sc; ++typedef signed short ss; ++typedef signed int si; ++typedef signed long sl; ++typedef unsigned char uc; ++typedef unsigned short us; ++typedef unsigned int ui; ++typedef unsigned long ul; ++typedef float sf; ++ ++vsc lc4(long a, void *p) { return __builtin_altivec_lvrxl (a,p); } ++vsf lrxl01(long a, vsf *p) { return __builtin_vec_lvrxl (a,p); } ++vsf lrxl02(long a, sf *p) { return __builtin_vec_lvrxl (a,p); } ++vbi lrxl03(long a, vbi *p) { return __builtin_vec_lvrxl (a,p); } ++vsi lrxl04(long a, vsi *p) { return __builtin_vec_lvrxl (a,p); } ++vsi lrxl05(long a, si *p) { return __builtin_vec_lvrxl (a,p); } ++vui lrxl06(long a, vui *p) { return __builtin_vec_lvrxl (a,p); } ++vui lrxl07(long a, ui *p) { return __builtin_vec_lvrxl (a,p); } ++vbs lrxl08(long a, vbs *p) { return __builtin_vec_lvrxl (a,p); } ++vp lrxl09(long a, vp *p) { return __builtin_vec_lvrxl (a,p); } ++vss lrxl10(long a, vss *p) { return __builtin_vec_lvrxl (a,p); } ++vss lrxl11(long a, ss *p) { return __builtin_vec_lvrxl (a,p); } ++vus lrxl12(long a, vus *p) { return __builtin_vec_lvrxl (a,p); } ++vus lrxl13(long a, us *p) { return __builtin_vec_lvrxl (a,p); } ++vbc lrxl14(long a, vbc *p) { return __builtin_vec_lvrxl (a,p); } ++vsc lrxl15(long a, vsc *p) { return __builtin_vec_lvrxl (a,p); } ++vsc lrxl16(long a, sc *p) { return __builtin_vec_lvrxl (a,p); } ++vuc lrxl17(long a, vuc *p) { return __builtin_vec_lvrxl (a,p); } ++vuc lrxl18(long a, uc *p) { return __builtin_vec_lvrxl (a,p); } +diff -ruN gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/cell_builtin-5.c gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/cell_builtin-5.c +--- gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/cell_builtin-5.c 1969-12-31 18:00:00.000000000 -0600 ++++ gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/cell_builtin-5.c 2012-03-06 12:31:15.922038996 -0600 +@@ -0,0 +1,48 @@ ++/* { dg-do compile { target { powerpc*-*-* } } } */ ++/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */ ++/* { dg-require-effective-target powerpc_altivec_ok } */ ++/* { dg-options "-O2 -maltivec -mcpu=cell" } */ ++/* { dg-final { scan-assembler-times "stvlx" 19 } } */ ++ ++#include ++ ++typedef __vector signed char vsc; ++typedef __vector signed short vss; ++typedef __vector signed int vsi; ++typedef __vector unsigned char vuc; ++typedef __vector unsigned short vus; ++typedef __vector unsigned int vui; ++typedef __vector bool char vbc; ++typedef __vector bool short vbs; ++typedef __vector bool int vbi; ++typedef __vector float vsf; ++typedef __vector pixel vp; ++typedef signed char sc; ++typedef signed short ss; ++typedef signed int si; ++typedef signed long sl; ++typedef unsigned char uc; ++typedef unsigned short us; ++typedef unsigned int ui; ++typedef unsigned long ul; ++typedef float sf; ++ ++void sc1(vsc v, long a, void *p) { __builtin_altivec_stvlx (v,a,p); } ++void slx01(vsf v, long a, vsf *p) { __builtin_vec_stvlx (v,a,p); } ++void slx02(vsf v, long a, sf *p) { __builtin_vec_stvlx (v,a,p); } ++void slx03(vbi v, long a, vbi *p) { __builtin_vec_stvlx (v,a,p); } ++void slx04(vsi v, long a, vsi *p) { __builtin_vec_stvlx (v,a,p); } ++void slx05(vsi v, long a, si *p) { __builtin_vec_stvlx (v,a,p); } ++void slx06(vui v, long a, vui *p) { __builtin_vec_stvlx (v,a,p); } ++void slx07(vui v, long a, ui *p) { __builtin_vec_stvlx (v,a,p); } ++void slx08(vbs v, long a, vbs *p) { __builtin_vec_stvlx (v,a,p); } ++void slx09(vp v, long a, vp *p) { __builtin_vec_stvlx (v,a,p); } ++void slx10(vss v, long a, vss *p) { __builtin_vec_stvlx (v,a,p); } ++void slx11(vss v, long a, ss *p) { __builtin_vec_stvlx (v,a,p); } ++void slx12(vus v, long a, vus *p) { __builtin_vec_stvlx (v,a,p); } ++void slx13(vus v, long a, us *p) { __builtin_vec_stvlx (v,a,p); } ++void slx14(vbc v, long a, vbc *p) { __builtin_vec_stvlx (v,a,p); } ++void slx15(vsc v, long a, vsc *p) { __builtin_vec_stvlx (v,a,p); } ++void slx16(vsc v, long a, sc *p) { __builtin_vec_stvlx (v,a,p); } ++void slx17(vuc v, long a, vuc *p) { __builtin_vec_stvlx (v,a,p); } ++void slx18(vuc v, long a, uc *p) { __builtin_vec_stvlx (v,a,p); } +diff -ruN gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/cell_builtin-6.c gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/cell_builtin-6.c +--- gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/cell_builtin-6.c 1969-12-31 18:00:00.000000000 -0600 ++++ gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/cell_builtin-6.c 2012-03-06 12:31:15.923039000 -0600 +@@ -0,0 +1,48 @@ ++/* { dg-do compile { target { powerpc*-*-* } } } */ ++/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */ ++/* { dg-require-effective-target powerpc_altivec_ok } */ ++/* { dg-options "-O2 -maltivec -mcpu=cell" } */ ++/* { dg-final { scan-assembler-times "stvlxl" 19 } } */ ++ ++#include ++ ++typedef __vector signed char vsc; ++typedef __vector signed short vss; ++typedef __vector signed int vsi; ++typedef __vector unsigned char vuc; ++typedef __vector unsigned short vus; ++typedef __vector unsigned int vui; ++typedef __vector bool char vbc; ++typedef __vector bool short vbs; ++typedef __vector bool int vbi; ++typedef __vector float vsf; ++typedef __vector pixel vp; ++typedef signed char sc; ++typedef signed short ss; ++typedef signed int si; ++typedef signed long sl; ++typedef unsigned char uc; ++typedef unsigned short us; ++typedef unsigned int ui; ++typedef unsigned long ul; ++typedef float sf; ++ ++void sc2(vsc v, long a, void *p) { __builtin_altivec_stvlxl (v,a,p); } ++void slxl01(vsf v, long a, vsf *p) { __builtin_vec_stvlxl (v,a,p); } ++void slxl02(vsf v, long a, sf *p) { __builtin_vec_stvlxl (v,a,p); } ++void slxl03(vbi v, long a, vbi *p) { __builtin_vec_stvlxl (v,a,p); } ++void slxl04(vsi v, long a, vsi *p) { __builtin_vec_stvlxl (v,a,p); } ++void slxl05(vsi v, long a, si *p) { __builtin_vec_stvlxl (v,a,p); } ++void slxl06(vui v, long a, vui *p) { __builtin_vec_stvlxl (v,a,p); } ++void slxl07(vui v, long a, ui *p) { __builtin_vec_stvlxl (v,a,p); } ++void slxl08(vbs v, long a, vbs *p) { __builtin_vec_stvlxl (v,a,p); } ++void slxl09(vp v, long a, vp *p) { __builtin_vec_stvlxl (v,a,p); } ++void slxl10(vss v, long a, vss *p) { __builtin_vec_stvlxl (v,a,p); } ++void slxl11(vss v, long a, ss *p) { __builtin_vec_stvlxl (v,a,p); } ++void slxl12(vus v, long a, vus *p) { __builtin_vec_stvlxl (v,a,p); } ++void slxl13(vus v, long a, us *p) { __builtin_vec_stvlxl (v,a,p); } ++void slxl14(vbc v, long a, vbc *p) { __builtin_vec_stvlxl (v,a,p); } ++void slxl15(vsc v, long a, vsc *p) { __builtin_vec_stvlxl (v,a,p); } ++void slxl16(vsc v, long a, sc *p) { __builtin_vec_stvlxl (v,a,p); } ++void slxl17(vuc v, long a, vuc *p) { __builtin_vec_stvlxl (v,a,p); } ++void slxl18(vuc v, long a, uc *p) { __builtin_vec_stvlxl (v,a,p); } +diff -ruN gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/cell_builtin-7.c gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/cell_builtin-7.c +--- gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/cell_builtin-7.c 1969-12-31 18:00:00.000000000 -0600 ++++ gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/cell_builtin-7.c 2012-03-06 12:31:15.923039000 -0600 +@@ -0,0 +1,48 @@ ++/* { dg-do compile { target { powerpc*-*-* } } } */ ++/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */ ++/* { dg-require-effective-target powerpc_altivec_ok } */ ++/* { dg-options "-O2 -maltivec -mcpu=cell" } */ ++/* { dg-final { scan-assembler-times "stvrx" 19 } } */ ++ ++#include ++ ++typedef __vector signed char vsc; ++typedef __vector signed short vss; ++typedef __vector signed int vsi; ++typedef __vector unsigned char vuc; ++typedef __vector unsigned short vus; ++typedef __vector unsigned int vui; ++typedef __vector bool char vbc; ++typedef __vector bool short vbs; ++typedef __vector bool int vbi; ++typedef __vector float vsf; ++typedef __vector pixel vp; ++typedef signed char sc; ++typedef signed short ss; ++typedef signed int si; ++typedef signed long sl; ++typedef unsigned char uc; ++typedef unsigned short us; ++typedef unsigned int ui; ++typedef unsigned long ul; ++typedef float sf; ++ ++void sc3(vsc v, long a, void *p) { __builtin_altivec_stvrx (v,a,p); } ++void srx01(vsf v, long a, vsf *p) { __builtin_vec_stvrx (v,a,p); } ++void srx02(vsf v, long a, sf *p) { __builtin_vec_stvrx (v,a,p); } ++void srx03(vbi v, long a, vbi *p) { __builtin_vec_stvrx (v,a,p); } ++void srx04(vsi v, long a, vsi *p) { __builtin_vec_stvrx (v,a,p); } ++void srx05(vsi v, long a, si *p) { __builtin_vec_stvrx (v,a,p); } ++void srx06(vui v, long a, vui *p) { __builtin_vec_stvrx (v,a,p); } ++void srx07(vui v, long a, ui *p) { __builtin_vec_stvrx (v,a,p); } ++void srx08(vbs v, long a, vbs *p) { __builtin_vec_stvrx (v,a,p); } ++void srx09(vp v, long a, vp *p) { __builtin_vec_stvrx (v,a,p); } ++void srx10(vss v, long a, vss *p) { __builtin_vec_stvrx (v,a,p); } ++void srx11(vss v, long a, ss *p) { __builtin_vec_stvrx (v,a,p); } ++void srx12(vus v, long a, vus *p) { __builtin_vec_stvrx (v,a,p); } ++void srx13(vus v, long a, us *p) { __builtin_vec_stvrx (v,a,p); } ++void srx14(vbc v, long a, vbc *p) { __builtin_vec_stvrx (v,a,p); } ++void srx15(vsc v, long a, vsc *p) { __builtin_vec_stvrx (v,a,p); } ++void srx16(vsc v, long a, sc *p) { __builtin_vec_stvrx (v,a,p); } ++void srx17(vuc v, long a, vuc *p) { __builtin_vec_stvrx (v,a,p); } ++void srx18(vuc v, long a, uc *p) { __builtin_vec_stvrx (v,a,p); } +diff -ruN gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/cell_builtin-8.c gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/cell_builtin-8.c +--- gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/cell_builtin-8.c 1969-12-31 18:00:00.000000000 -0600 ++++ gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/cell_builtin-8.c 2012-03-06 12:31:15.923039000 -0600 +@@ -0,0 +1,48 @@ ++/* { dg-do compile { target { powerpc*-*-* } } } */ ++/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */ ++/* { dg-require-effective-target powerpc_altivec_ok } */ ++/* { dg-options "-O2 -maltivec -mcpu=cell" } */ ++/* { dg-final { scan-assembler-times "stvrxl" 19 } } */ ++ ++#include ++ ++typedef __vector signed char vsc; ++typedef __vector signed short vss; ++typedef __vector signed int vsi; ++typedef __vector unsigned char vuc; ++typedef __vector unsigned short vus; ++typedef __vector unsigned int vui; ++typedef __vector bool char vbc; ++typedef __vector bool short vbs; ++typedef __vector bool int vbi; ++typedef __vector float vsf; ++typedef __vector pixel vp; ++typedef signed char sc; ++typedef signed short ss; ++typedef signed int si; ++typedef signed long sl; ++typedef unsigned char uc; ++typedef unsigned short us; ++typedef unsigned int ui; ++typedef unsigned long ul; ++typedef float sf; ++ ++void sc4(vsc v, long a, void *p) { __builtin_altivec_stvrxl (v,a,p); } ++void srxl01(vsf v, long a, vsf *p) { __builtin_vec_stvrxl (v,a,p); } ++void srxl02(vsf v, long a, sf *p) { __builtin_vec_stvrxl (v,a,p); } ++void srxl03(vbi v, long a, vbi *p) { __builtin_vec_stvrxl (v,a,p); } ++void srxl04(vsi v, long a, vsi *p) { __builtin_vec_stvrxl (v,a,p); } ++void srxl05(vsi v, long a, si *p) { __builtin_vec_stvrxl (v,a,p); } ++void srxl06(vui v, long a, vui *p) { __builtin_vec_stvrxl (v,a,p); } ++void srxl07(vui v, long a, ui *p) { __builtin_vec_stvrxl (v,a,p); } ++void srxl08(vbs v, long a, vbs *p) { __builtin_vec_stvrxl (v,a,p); } ++void srxl09(vp v, long a, vp *p) { __builtin_vec_stvrxl (v,a,p); } ++void srxl10(vss v, long a, vss *p) { __builtin_vec_stvrxl (v,a,p); } ++void srxl11(vss v, long a, ss *p) { __builtin_vec_stvrxl (v,a,p); } ++void srxl12(vus v, long a, vus *p) { __builtin_vec_stvrxl (v,a,p); } ++void srxl13(vus v, long a, us *p) { __builtin_vec_stvrxl (v,a,p); } ++void srxl14(vbc v, long a, vbc *p) { __builtin_vec_stvrxl (v,a,p); } ++void srxl15(vsc v, long a, vsc *p) { __builtin_vec_stvrxl (v,a,p); } ++void srxl16(vsc v, long a, sc *p) { __builtin_vec_stvrxl (v,a,p); } ++void srxl17(vuc v, long a, vuc *p) { __builtin_vec_stvrxl (v,a,p); } ++void srxl18(vuc v, long a, uc *p) { __builtin_vec_stvrxl (v,a,p); } diff --git a/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.experimental_move.patch b/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.experimental_move.patch new file mode 100644 index 00000000..b9642ed6 --- /dev/null +++ b/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.experimental_move.patch @@ -0,0 +1,32 @@ +diff -ruN gcc-4.4.0/gcc/config/rs6000/rs6000.c gcc-4.4.0-e500mc64/gcc/config/rs6000/rs6000.c +--- gcc-4.4.0/gcc/config/rs6000/rs6000.c 2009-03-17 15:18:21.000000000 -0500 ++++ gcc-4.4.0-e500mc64/gcc/config/rs6000/rs6000.c 2009-12-04 10:36:44.000000000 -0600 +@@ -11032,6 +11059,14 @@ + mode = SImode; + gen_func.mov = gen_movsi; + } ++ else if (TARGET_COPY_UNALIGNED && bytes == 3 && offset > 0) ++ { ++ /* We generate a single unaligned SI move instead of 2 (HI, QI) */ ++ move_bytes = 3; ++ mode = SImode; ++ gen_func.mov = gen_movsi; ++ offset--; ++ } + else if (bytes >= 2 && (align >= 16 || !STRICT_ALIGNMENT)) + { /* move 2 bytes */ + move_bytes = 2; +diff -ruN gcc-4.4.0/gcc/config/rs6000/rs6000.opt gcc-4.4.0-e500mc64/gcc/config/rs6000/rs6000.opt +--- gcc-4.4.0/gcc/config/rs6000/rs6000.opt 2009-02-20 09:20:38.000000000 -0600 ++++ gcc-4.4.0-e500mc64/gcc/config/rs6000/rs6000.opt 2009-09-30 13:51:17.000000000 -0500 +@@ -201,6 +201,10 @@ + Target RejectNegative Joined + -misel=yes/no Deprecated option. Use -misel/-mno-isel instead + ++mcopy-unaligned ++Target Report Var(TARGET_COPY_UNALIGNED) ++Generate unaligned word load and stores to move 3 bytes ++ + mspe + Target + Generate SPE SIMD instructions on E500 diff --git a/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.extelim-v3.patch b/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.extelim-v3.patch new file mode 100644 index 00000000..e124b187 --- /dev/null +++ b/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.extelim-v3.patch @@ -0,0 +1,3491 @@ +Eliminate sign and zero extensions in PPC generated code +A new module is introduced 'extelim.c' and a new RTL pass is introduced. +The '-f[no-]extelim' flag controls this pass and is enabled at -O2 and above. +The algorithm is based on the paper "Effective Sign Extension Elimination", Kawahito, et. al. +More details on implementation in the extelim.c module. + +--- gcc-4.6-branch-clean/gcc/opts.c 2011-07-27 12:02:02.483850879 -0500 ++++ gcc-4.6-branch/gcc/opts.c 2011-07-25 17:59:00.911975444 -0500 +@@ -492,6 +492,7 @@ + { OPT_LEVELS_2_PLUS, OPT_falign_jumps, NULL, 1 }, + { OPT_LEVELS_2_PLUS, OPT_falign_labels, NULL, 1 }, + { OPT_LEVELS_2_PLUS, OPT_falign_functions, NULL, 1 }, ++ { OPT_LEVELS_2_PLUS, OPT_fextelim, NULL, 1 }, + + /* -O3 optimizations. */ + { OPT_LEVELS_3_PLUS, OPT_ftree_loop_distribute_patterns, NULL, 1 }, +--- gcc-4.6-branch-clean/gcc/tree-pass.h 2011-07-27 12:02:02.485981448 -0500 ++++ gcc-4.6-branch/gcc/tree-pass.h 2011-07-25 17:59:00.912976334 -0500 +@@ -483,6 +483,7 @@ + extern struct rtl_opt_pass pass_initial_value_sets; + extern struct rtl_opt_pass pass_unshare_all_rtl; + extern struct rtl_opt_pass pass_instantiate_virtual_regs; ++extern struct rtl_opt_pass pass_rtl_extelim; + extern struct rtl_opt_pass pass_rtl_fwprop; + extern struct rtl_opt_pass pass_rtl_fwprop_addr; + extern struct rtl_opt_pass pass_jump2; +--- gcc-4.6-branch-clean/gcc/timevar.def 2011-07-27 12:02:02.487999008 -0500 ++++ gcc-4.6-branch/gcc/timevar.def 2011-07-25 17:59:00.913979563 -0500 +@@ -180,6 +180,7 @@ + DEFTIMEVAR (TV_VARCONST , "varconst") + DEFTIMEVAR (TV_LOWER_SUBREG , "lower subreg") + DEFTIMEVAR (TV_JUMP , "jump") ++DEFTIMEVAR (TV_EXTELIM , "extension elimination") + DEFTIMEVAR (TV_FWPROP , "forward prop") + DEFTIMEVAR (TV_CSE , "CSE") + DEFTIMEVAR (TV_DCE , "dead code elimination") +--- gcc-4.6-branch-clean/gcc/common.opt 2011-07-27 12:02:02.490978128 -0500 ++++ gcc-4.6-branch/gcc/common.opt 2011-07-25 17:59:00.915979093 -0500 +@@ -996,6 +996,10 @@ + Common Report Var(flag_eliminate_dwarf2_dups) + Perform DWARF2 duplicate elimination + ++fextelim ++Common Report Var(flag_extelim) ++Perform zero/sign extension removal ++ + fipa-sra + Common Report Var(flag_ipa_sra) Init(0) Optimization + Perform interprocedural reduction of aggregates +--- gcc-4.6-branch-clean/gcc/Makefile.in 2011-07-27 12:02:02.498976606 -0500 ++++ gcc-4.6-branch/gcc/Makefile.in 2011-07-25 17:59:00.919975303 -0500 +@@ -1233,6 +1233,7 @@ + explow.o \ + expmed.o \ + expr.o \ ++ extelim.o \ + final.o \ + fixed-value.o \ + fold-const.o \ +@@ -2891,6 +2892,11 @@ + reload.h langhooks.h intl.h $(TM_P_H) $(TARGET_H) \ + tree-iterator.h gt-expr.h $(MACHMODE_H) $(TIMEVAR_H) $(TREE_FLOW_H) \ + $(TREE_PASS_H) $(DF_H) $(DIAGNOSTIC_H) vecprim.h $(SSAEXPAND_H) ++extelim.o : extelim.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ ++ $(TREE_H) $(TM_P_H) $(FLAGS_H) $(REGS_H) hard-reg-set.h $(BASIC_BLOCK_H) \ ++ insn-config.h $(FUNCTION_H) $(EXPR_H) $(INSN_ATTR_H) $(RECOG_H) \ ++ toplev.h $(TARGET_H) $(TIMEVAR_H) $(OPTABS_H) insn-codes.h \ ++ output.h $(PARAMS_H) $(TREE_PASS_H) $(CGRAPH_H) + dojump.o : dojump.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(TREE_H) \ + $(FLAGS_H) $(FUNCTION_H) $(EXPR_H) $(OPTABS_H) $(INSN_ATTR_H) insn-config.h \ + langhooks.h $(GGC_H) gt-dojump.h vecprim.h $(BASIC_BLOCK_H) output.h +--- gcc-4.6-branch-clean/gcc/passes.c 2011-07-27 12:02:02.502976386 -0500 ++++ gcc-4.6-branch/gcc/passes.c 2011-07-25 17:59:00.922975752 -0500 +@@ -990,6 +990,7 @@ + NEXT_PASS (pass_web); + NEXT_PASS (pass_rtl_cprop); + NEXT_PASS (pass_cse2); ++ NEXT_PASS (pass_rtl_extelim); + NEXT_PASS (pass_rtl_dse1); + NEXT_PASS (pass_rtl_fwprop_addr); + NEXT_PASS (pass_inc_dec); +--- gcc-4.6.1-clean/gcc/extelim.c 1969-12-31 18:00:00.000000000 -0600 ++++ gcc-4.6.1/gcc/extelim.c 2011-11-14 15:43:10.041143996 -0600 +@@ -0,0 +1,3407 @@ ++/* Redundant extension elimination ++ Copyright (C) 2010 Free Software Foundation, Inc. ++ Contributed by John Russo (john.russo@freescale.com) ++ ++This file is part of GCC. ++ ++GCC 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. ++ ++GCC 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 GCC; see the file COPYING3. If not see ++. */ ++ ++/* ++PURPOSE: Implement a method for eliminating redundant and superflous sign ++extension instructions from 64-bit PPC e5500 generated code. ++ ++MOTIVATING EXAMPLE: ++The Nullstone loop_6.c kernel looks like: ++ int i; ++ int a[100]; ++ ++ ref_int_p (&a[0]); ++ ++ for (i=2; i<100; i++) ++ a[i] = a[i-1] + a[i-2]; ++ ++The final, generated code for the loop body is: ++ ++32-bit 64-bit ++add r25,r11,r0 add r5,r5,r8 ++add r26,r0,r25 addi r4,r4,12 ++stw r25,0(r9) add r27,r5,r8 ++add r27,r25,r26 stw r5,0(r9) ++stw r26,4(r9) extsw r12,r27 <=== ++add r28,r26,r27 stw r27,4(r9) ++stw r27,8(r9) add r6,r5,r12 ++add r29,r27,r28 add r28,r6,r12 ++stw r28,12(r9) stw r6,8(r9) ++add r30,r28,r29 extsw r0,r28 <=== ++stw r29,16(r9) stw r28,12(r9) ++add r12,r29,r30 add r7,r6,r0 ++stw r30,20(r9) add r29,r7,r0 ++add r3,r30,r12 stw r7,16(r9) ++stw r12,24(r9) extsw r3,r29 <=== ++add r4,r12,r3 stw r29,20(r9) ++stw r3,28(r9) add r10,r7,r3 ++add r5,r3,r4 add r30,r10,r3 ++stw r4,32(r9) stw r10,24(r9) ++add r6,r4,r5 extsw r8,r30 <=== ++stw r5,36(r9) stw r30,28(r9) ++add r7,r5,r6 add r11,r10,r8 ++stw r6,40(r9) add r12,r11,r8 ++add r8,r6,r7 stw r11,32(r9) ++stw r7,44(r9) extsw r26,r12 <=== ++add r10,r7,r8 stw r12,36(r9) ++stw r8,48(r9) add r0,r11,r26 ++add r11,r8,r10 add r3,r0,r26 ++stw r10,52(r9) stw r0,40(r9) ++add r0,r10,r11 subfic r26,r4,100 ++stw r11,56(r9) stw r3,44(r9) ++stw r0,60(r9) extsw r5,r0 <=== ++addi r9,r9,64 extsw r8,r3 <=== ++bdnz+ 10000640 extsw r4,r4 <=== ++ clrldi r26,r26,32 ++ addi r9,r9,48 ++ bdnz+ 10000890 ++ ++GENERAL APPROACH: ++Consider a machine whose native register size is 64-bits ++ ++0 3132 63 ++|-----------||-----------| ++ ++where bit 63 is the LSB and bit 0 is the MSB of a long int ++and bit 63 is the LSB and bit 32 is the MSB of an int. ++ ++Sign and zero extension are inserted to RTL to preserve the ++operation's semantics when the operands used are not the ++native register size since normally the machine only performs ++the operation using a native register size. In practice, many ++of the inserted extensions are not necessary. ++ ++First, the extension may simply be redundant. That is, the ++same operation is performed on the same operands. The redundant ++extensions can be eliminated. ++ ++Secondly, if the extended portion of the register (the "upper" bits) ++are not essential to the calculations performed on the output of the ++extension, then the extension is not necessary. For example, given ++int (32-bit) inputs and outputs: ++ ++c = a + b ++d = sxt(c) ++e = d + 1; ++ ++The "upper" bits of d (bit 0-31) do not affect the calculation ++of e. It doesn't matter what the "upper" bits of d are, the int result ++e is the same regardless of the sxt instruction. ++ ++Thirdly, the extensions may not be necessary if the operands are ++already extended and the operation preserves the extended bits. ++ ++a = mem[&b] ; sign extending load ++c = a + 1 ++d = sxt(c) ++ ++Here, a is generated by a sign extending load, the operation ++does nothing to invalidate the extension to c, thus the extension ++on c to d is not necessary. ++ ++In each case, the redundant extension must be replaced by a copy, ++with the copy to be optimized out in later phases. ++ ++The three cases described above form the general idea behind the ++algorithms implemented here to eliminate redundant and unneccessary ++extensions. ++ ++Sign extensions do not have to be preserved for overflow conditions ++since signed overflow behavior is not defined in C. For example, ++take a 16-bit variable in a 32-bit register. It is ok ++for 0x0000_7fff to overflow to 0x0000_8000 and not 0xffff_8000. ++This implies that it is not necessary to preserve the sign ++extension. ++ ++Unsigned overflow extension need to be preserved because ++unsigned overflow is modulo. For example, a 16-bit unsigned ++overflow of 0x0000_FFFF must be 0x0000_0000 in a 32-bit register, ++not 0x0001_0000. In order to remove the unsigned zero extension, ++we would need to range check the variable to be sure it doesn't ++overflow. ++ ++RTL ANALYSIS: ++I looked at the RTL representation after RTL generation (.expand) and ++after the first forward propagation (.fwprop1). Since RTL is not compact ++when printing out, I reduced the .fwprop1 RTL to this pseudocode: ++ ++(note: sxt,zxt mean double word length, 64-bit, extension). ++ ++(1) r198 = m[r113+ #112] ; load a[0] ++(2) r174 = sxt(r198) ++(3) r199 = m[r113+ #116] ; load a[1] ++(4) r186 = sxt(r199) ++(5) r181 = r113 + #120 ; load &a[2] ++(6) r180 = 2 ; i = 2 ++(7) L1: ++(8) r200 = r174 + r186 ; t1 = a[i-1] + a[i-2] ++(9) r174 = sxt(r200) ++(10) m[r181] = r200 ; a[i] = t1 ++(11) r201 = r200 + r186 ; t2 = t1 + a[i-1] ++(12) r186 = sxt(r201) ++(13) m[r181+4] = r201 ; a[i+1] = t2 ++(14) r202 = r180 + 2 ; i += 2 ++(14.1) r180 = sxt(r202) ++(15) r203 = 100 - r202 ; used to calc loop remainder ++(16) r185 = zxt(r203) ; used to calc loop remainder ++(17) r181 = r181 + 8 ; address induction var ++(18) ccr204 = cmp(r202,#98) ; set CC ++(19) BNE ccr204,L1 ; branch ++ ++In the pseudo-code, you see several sign extension candidates: (2),(4), ++(9), (12), (14.1), (16). ++ ++ALGORITHM: ++To eliminate the extra sign ext you have to look at (1) the definitions ++of the source of the sign extensions and/or (2) look at the uses of the target ++of the sign extensions. In either case, if doing a global elimination ++pass, you'll need def-use chain information. ++ ++The algorithms are recursive. Using the use/def and def/use chains ++we attempt to find ultimately whether the extension is relevant ++or not. ++ ++ ++Example 1. ++Extensions (2) and (4) are not put in the candidate list because ++they are combined into a load/ext pair that is ultimately generated ++as sign extending loads. ++ ++Take the sign extension at (9), r174 = sxt(r200). ++Def analysis shows that r200 is defined by 2 registers, thus no ++further def analysis recursion can occur. ++Use analysis. Find all the uses of r174. There is 1 use at (8) r200 = r174 + r186. ++The extension does not affect the add operation results. Continuing, we look at ++the uses of r200 to see if the results of operations on r200 need the sign extended bits. ++We see 2 uses of r200 at (10) and (11). (10) is a 32-bit store of r200, ++so the sign extended bits are irrelevant. (11), however, is an unknown, ++so we must look that the uses of this result, r201. A similar sequence ++occurs for r201 when it defines r186. Looking at the uses of r186 at ++(8) and (11), we have already visited those statements so they have ++been covered already. So it appears that the sxt to r174 at (9) ultimately ++dead-ends to a store instruction that doesn't case about the sign extended ++bits. The sxt at (9) can be removed. ++ ++The remaining extensions are processed similarly. ++ ++PROGRAM STRUCTURE: ++ ++extension elimination -- main entry point ++ find extensions -- identify extension candidates ++ extension duplication -- insert extension at strategic points to ++ enable removal of extensions at more frequently ++ executed points. ++ find extensions -- recreate extension candidate list ++ sort extensions -- sort extension candidate list by loop depth ++ for each ext in list -- process each extension candidate ++ eliminate one extension ++ replace marked candidates with copy -- optimize the extension ++ ++PSEUDOCODE: ++ ++Create working list of sign extensions, sxt_list ++ ++For each insn, insn_sxt, in sxt_list ++ ext_needed = true ++ For all insns, insn_def, that DEFINE and REACH the SOURCE_REG(insn_sxt) ++ ext_needed = analyze_def(insn_def, insn_sxt) ++ if (ext_needed) ++ break; ++ end_loop ++ if (ext_needed) ++ For all insns, insn_use, that USE and are REACHED by the DEST_REG(insn_sxt) ++ ext_needed = analyze_use(insn_use, insn_sxt) ++ if (ext_needed) ++ break; ++ end_loop ++ ++ if (!ext_needed) ++ mark_for_replace_with_copy(I) ++end_loop ++ ++For each insn, insn_sxt, in sxt_list ++ if (insn_sxt is marked for replacement) ++ replace_insn_with_copy(insn_sxt) ++end_loop ++ ++-------------------------- ++function: analyze_def(def) ++--------------------------- ++return true if extension is needed, false otherwise. ++ ++destination_operand = defined operand of source ++source_operand = source operand of def ++ ++if (have_seen_this_insn_already (def)) ++ return true; ++ ++set_seen_this_insn_flag (def) ++ ++analysis_result = analyze_result_def (def) ++switch (analysis_result) ++ case source_operand_is_extended: ++ return false ++ case stop_recursion: ++ return true ++ case continue_recursion: ++ break; ++ ++ext_needed = true; ++ ++For all insns, insn_def, that USE and REACHED by the register of destination_operand ++ ext_needed = analyze_def(insn_def)) ++ if (ext_needed) ++ break; ++end_loop ++ ++return ext_needed ++ ++-------------------------- ++function: analyze_use(use) ++--------------------------- ++return true if extension is needed, false otherwise. ++ ++destination_operand = destination operand of use ++source_operand = source operand of use ++ ++if (have_seen_this_insn_already (use)) ++ return false; ++ ++set_seen_this_insn_flag (use) ++ ++analysis_result = analyze_result_use (use) ++switch (analysis_result) ++ case low_bits_not_affected_by_use: ++ return false ++ case low_bits_affected_by_use: ++ return true ++ case look_at_uses_of_destination_operand ++ break; ++ ++ext_needed = true; ++For all insns, insn_use, that USE the register of destination_operand ++ ext_needed = analyze_use(insn_use)) ++ if (ext_needed) ++ break; ++end_loop ++ ++return ext_needed ++ ++REFERENCES: ++ ++"Effective Sign Extension Elimination", Kawahito, Komatsu, Nakatani. ++IBM Tokyo Researc Laboratory. ++ ++"New sign/zero extension elimination pass", deVries. ++http://gcc.gnu.org/ml/gcc-patches/2010-10/msg01529.html ++*/ ++ ++/* ++Iteration 4: pre-ZERO_EXTEND version, duplicates sign_extend at uses ++Iteration 5: begin supporting ZERO_EXTEND, crashes on Coremark. ++Iteration 6: revert to 4, support SI:HI sign_extensions. ++Iteration 7: Add support for zero extend. This version deletes ++ "inserted" duplicate extensions when redundant and propagates ++ the copied value. This propagate fails in other_tests/test2.sh. ++ I am reverting back to replacing the "inserted" extension to a copy. ++ Copy propagation should always be able to eliminate this copy. ++ Coremark was stable, however. ++Iteration 8: Revert to change extensions to copy, regardless of whether ++ the extension was duplicated or not. ++ Refactor setting of dest,src in analyze_ext_use, analyze_ext_def, now ++ handled with a single function. ++Iteration 9: ++ Inserted redundant extensions at function return points. ++ Sorted the order that extensions are processed by loop depth. ++ Additional cases in upper_bits_do_not_affect_dest ++Iteration 10: ++ Fixes for test failures. A major problem was uncovered where ++ the "visited" flag was not properly cleared. This meant that ++ each time a new extension was processed, it appeared that some ++ extensions were visited already and there were not. The result ++ was false removals. This fix significantly affects the benchmark. ++ Another change was to comment out the duplicate_exts_at_uses. This ++ seemed to have little effect now that the visited flag issue is ++ fixed. ++Iteration 11: ++ Cleanup warnings during build. ++Iteration 12: ++ QImode support started. ++Iteration 13: ++ Redesign and refactor analyze_ext_use, analyze_ext_def ++Iteration 14: ++ Continue redesign and refactor of analyze_ext_use, analyze_ext_def ++ Debugging paper_example.c ++Iteration 15: ++ cond_c fix ++Iteration 16: (not tested) ++ Refactor check_compare code ++ Refactor action decision in PARALLEL ++ Allow pass-thru on insns that are marked for replace copy ++ instead of stopping recursion if we see a marked insn. ++ Examining lshiftrt.c program (signed and unsigned). ++Iteration 17: ++ Refactor mostly complete. Passed all local testing including ++ nas and perfect. Best coremark results so far. ++Iteration 18: ++ Oops. analyze_ext_def was disabled. Enabling it improves ++ Coremark. Passed coremark, perfect. ++Iteration 19: ++ Local tests are passing. Tested with glibc. ++ Added statistics. ++ Fixed elimination from CALL output in operand_is_extended. ++ This impacted Coremark went from 6300 to 6170. But is necessary. ++ More safety for used regs in analyze_ext_def. ++ More safety for the types of extensions. ++Iteration 20: ++ Fixes for various tests. ++Iteration 21: ++ pr43017 -funroll_loops fix. ++Iteration 22: ++ Fixes for AND immediate in operand_is_extended. ++ Cosmetic cleanup. ++Iteration 23: ++ Fixes for consumer-2,spec2k,spec2k6. Handle ++ SUBREG_PROMOTED_VAR_P flags on operands whose ++ dependent extension has been eliminated. ++Iteration 24: ++ Fixed problem in native build during bootstrapping. ++ Extelim was considering debug_insns and should have ++ ignored them. This resulted in a compare fail between ++ stage2 and stage3. ++Iteration 25: ++ - Post-release 4.6.1 development ++ - Full duplication of extensions at uses turned on. ++ - Recursion into original extension no longer kills optimization (analyze_ext_def only) ++ - Allow some duplication into the same block if it enables insn selection ++ - Allow CCmode and CCUNSmode into mode_supported_p ++Iteration 26: ++ - Solve ICEs due to null df-ref. ++Iteration 27: ++ - Fixed issue with duplication of extension at a self-assign. ++ - Some fixes for copying flags during duplication ++ - Some fixes for counting register uses. ++Iteration 28: ++ - Fixed issue with duplication of extension when use has multiple ++ reaching definitions. ++Iteration 29: ++ - Release candidate for Q42011 release iteration. ++Iteration 30: ++ - Turn off extension duplication - minimally effective ++ ++*/ ++ ++#include "config.h" ++#include "system.h" ++#include "coretypes.h" ++#include "tm.h" ++#include "rtl.h" ++#include "tree.h" ++#include "tm_p.h" ++#include "flags.h" ++#include "regs.h" ++#include "hard-reg-set.h" ++#include "basic-block.h" ++#include "insn-config.h" ++#include "function.h" ++#include "expr.h" ++#include "insn-attr.h" ++#include "recog.h" ++#include "toplev.h" ++#include "target.h" ++#include "timevar.h" ++#include "optabs.h" ++#include "insn-codes.h" ++#include "rtlhooks-def.h" ++#include "output.h" ++#include "params.h" ++#include "timevar.h" ++#include "tree-pass.h" ++#include "cgraph.h" ++#include "df.h" ++#include "vec.h" ++ ++/* Feature flags */ ++/* Duplicate extensions at each immediate use */ ++#define EXTELIM_DUPLICATE_EXTS_AT_USES 0 ++/* Dump DF information also in dump */ ++#define EXTELIM_DF_DUMP 0 ++ ++ ++/* Typedefs */ ++typedef unsigned int insn_flag_t; /* Insn flags type */ ++typedef int extelim_uid_t; /* UID type */ ++DEF_VEC_I (insn_flag_t); /* Define vector type and allocation type */ ++DEF_VEC_ALLOC_I (insn_flag_t, heap); ++ ++typedef struct GTY (()) ext_record ++{ ++ rtx ext; /* The extension insn */ ++ VEC (rtx, heap) * ext_uses; /* List of use records for this extension. For some ++ some extensions, we will duplicate the extension ++ at these use points. */ ++ VEC (rtx, heap) * ext_updates;/* List of rtx that need to be updated if the extension ++ is to be eliminated. For example, SUBREG_PROMOTED flags ++ on SUBREG uses defined by this extension should ++ be reset since the extension is eliminated. The PROMOTED ++ flag is no longer valid. */ ++} *ext_record_t; ++ ++typedef struct regspec_cb_data ++{ ++ unsigned int regno; ++ rtx exp; ++} regspec_cb_data_t; ++ ++/* Static variables */ ++DEF_VEC_P (ext_record_t); ++DEF_VEC_ALLOC_P (ext_record_t, heap); ++VEC (ext_record_t, heap) * extensions; /* Vector holding all extension records */ ++VEC (insn_flag_t, heap) * insn_flags; /* Vector holding flags for all insns */ ++VEC (rtx, heap) * returns; /* Vector holding return insns for this function */ ++ ++ static extelim_uid_t max_uid; /* Max UID insn value for insn_flags allocation */ ++ static ext_record_t current_ext_record; /* Current extension record being processed */ ++ ++/* Statistics */ ++ static int num_cand; /* Number of extensions detected */ ++ static int num_cand_ignored; /* Number of extensions ignored */ ++ static int num_cand_transformed; /* Number of extensions transformed to copy */ ++ ++/* Basic information about the extension being processed */ ++ enum machine_mode ext_to_mode; /* Mode extended to */ ++ enum machine_mode ext_from_mode; /* Mode extended from */ ++ enum rtx_code ext_code; /* Sign or zero extend */ ++ ++/* Insn use analysis possible results */ ++ enum insn_use_results ++ { ++ EXTELIM_ANALYSIS_RESULT_LOWBITS_NOT_AFFECTED, ++ EXTELIM_ANALYSIS_RESULT_LOWBITS_AFFECTED, ++ EXTELIM_ANALYSIS_RESULT_CONTINUE_RECURSION ++ }; ++ ++/* Insn def analysis possible results */ ++ enum insn_def_results ++ { ++ EXTELIM_ANALYSIS_RESULT_DEF_EXTENDED, ++ EXTELIM_ANALYSIS_RESULT_DEF_STOP_RECURSION, ++ EXTELIM_ANALYSIS_RESULT_DEF_CONTINUE_RECURSION ++ }; ++ ++/* Insn flags for this pass */ ++#define EXTELIM_NONE 0 ++#define EXTELIM_SEEN (1<<0) /* Mark insn as visited during DF traversal */ ++#define EXTELIM_REPLACE_COPY (1<<1) /* Mark ext insn as replace with copy */ ++#define EXTELIM_INSERTED (1<<2) /* Mark ext insn as algorithmically inserted */ ++#define EXTELIM_INSERTED_FOR (1<<3) /* Mark use insn for which ext has been inserted */ ++ ++ ++/* Query the insn flag */ ++ ++ static bool insn_flag_p (insn_flag_t set_p, extelim_uid_t uid) ++{ ++ insn_flag_t flags; ++ ++ if (((flags = VEC_index (insn_flag_t, insn_flags, uid)) & set_p) == set_p) ++ return true; ++ ++ return false; ++} ++ ++/* Set the insn flags */ ++ ++static void ++insn_flag_set (insn_flag_t flags, extelim_uid_t uid) ++{ ++ insn_flag_t set; ++ set = VEC_index (insn_flag_t, insn_flags, uid); ++ set |= flags; ++ VEC_replace (insn_flag_t, insn_flags, uid, set); ++} ++ ++/* Clear insn flags */ ++ ++static void ++insn_flag_clear (insn_flag_t flags, extelim_uid_t uid) ++{ ++ insn_flag_t clear; ++ clear = VEC_index (insn_flag_t, insn_flags, uid); ++ clear &= ~flags; ++ VEC_replace (insn_flag_t, insn_flags, uid, clear); ++} ++ ++/* Set static variable max_uid to the largest ++ insn uid found in the module plus 1. This will be the ++ size of the vector for insn flags. */ ++ ++static void ++set_max_uid (void) ++{ ++ basic_block bb; ++ rtx insn; ++ extelim_uid_t lmax_uid = 0; ++ ++ FOR_EACH_BB (bb) FOR_BB_INSNS (bb, insn) ++ { ++ if (INSN_P (insn)) ++ { ++ if (INSN_UID (insn) > lmax_uid) ++ lmax_uid = INSN_UID (insn); ++ } ++ } ++ max_uid = lmax_uid + 1; ++} ++ ++/* Re-initializes the requested insn flags to their reset state */ ++ ++static void ++reinit_insn_flags (insn_flag_t flags_to_be_reset) ++{ ++ extelim_uid_t i; ++ ++ /* Account for new insns */ ++ set_max_uid (); ++ ++ for (i = 0; i < max_uid; i++) ++ { ++ insn_flag_clear (flags_to_be_reset, i); ++ } ++} ++ ++/* Init the vector for insn flags. One ++ vector element per insn is created. ++ The flags are init'd to EXTELIM_NONE. */ ++ ++static void ++init_flags_vector (void) ++{ ++ extelim_uid_t i; ++ /* Get the maximum uid value. We'll use this ++ information to set up a vector of max_uid ++ length. Each element of the vector will hold ++ the pass-specific flags for each insn. */ ++ max_uid = 0; ++ set_max_uid (); ++ ++ /* Allocate the vector of insn flags */ ++ insn_flags = VEC_alloc (insn_flag_t, heap, max_uid); ++ ++ /* Initialize the insn flags vector */ ++ for (i = 0; i < max_uid; i++) ++ { ++ VEC_quick_insert (insn_flag_t, insn_flags, i, EXTELIM_NONE); ++ } ++} ++ ++/* Initialize this pass */ ++ ++static void ++init_pass (void) ++{ ++ /* Init insn flags vector */ ++ init_flags_vector (); ++ ++ /* This pass requires def-use chain information */ ++ df_chain_add_problem (DF_DU_CHAIN + DF_UD_CHAIN); ++ df_analyze (); ++} ++ ++static void ++free_extensions (void) ++{ ++ ext_record_t ext_record; ++ unsigned i; ++ ++ FOR_EACH_VEC_ELT (ext_record_t, extensions, i, ext_record) ++ { ++ if (!VEC_empty (rtx, ext_record->ext_uses)) ++ VEC_free (rtx, heap, ext_record->ext_uses); ++ ++ if (!VEC_empty (rtx, ext_record->ext_updates)) ++ VEC_free (rtx, heap, ext_record->ext_updates); ++ } ++ VEC_free (ext_record_t, heap, extensions); ++} ++ ++/* Clean up this pass */ ++ ++static void ++finish_pass (void) ++{ ++ free_extensions (); ++ VEC_free (insn_flag_t, heap, insn_flags); ++ VEC_free (rtx, heap, returns); ++} ++ ++static void ++update_uid_vectors (extelim_uid_t uid) ++{ ++ VEC_safe_grow_cleared (insn_flag_t, heap, insn_flags, uid + 1); ++} ++ ++/* Emit a insn before a given insn, update vector lengths ++ of those vectors that are indexed by uid. Return uid ++ of the inserted insn. */ ++ ++static extelim_uid_t ++extelim_emit_before (rtx new_insn, rtx before_insn) ++{ ++ rtx seq; ++ extelim_uid_t new_uid; ++ ++ start_sequence (); ++ emit_insn (new_insn); ++ seq = get_insns (); ++ end_sequence (); ++ new_insn = emit_insn_before (seq, before_insn); ++ ++ /* Expand the flags vector to hold the new insn and set the ++ inserted flag on the insn. */ ++ new_uid = INSN_UID (new_insn); ++ update_uid_vectors (new_uid); ++ return new_uid; ++} ++ ++/* Utility function to find the REG exp ++ given an rtx */ ++ ++static rtx ++register_exp (rtx exp) ++{ ++ if (REG_P (exp)) ++ { ++ return exp; ++ } ++ else if (GET_CODE (exp) == SUBREG) ++ { ++ return SUBREG_REG (exp); ++ } ++ else ++ return NULL; ++} ++ ++/* Check whether this is a sign extension. */ ++ ++static bool ++extension_p (rtx insn, rtx * dest, rtx * inner, int *preserved_size) ++{ ++ rtx src, op0; ++ ++ /* Detect set of reg. */ ++ if (GET_CODE (PATTERN (insn)) != SET) ++ return false; ++ ++ src = SET_SRC (PATTERN (insn)); ++ *dest = SET_DEST (PATTERN (insn)); ++ ++ if (!REG_P (*dest)) ++ return false; ++ ++ if (GET_CODE (src) == SIGN_EXTEND || GET_CODE (src) == ZERO_EXTEND) ++ { ++ op0 = XEXP (src, 0); ++ ++ /* Determine amount of least significant bits preserved by operation. */ ++ if (GET_CODE (src) == AND) ++ *preserved_size = ctz_hwi (~UINTVAL (XEXP (src, 1))); ++ else ++ *preserved_size = GET_MODE_BITSIZE (GET_MODE (op0)); ++ ++ if (GET_CODE (op0) == SUBREG) ++ { ++ if (subreg_lsb (op0) != 0) ++ return false; ++ ++ *inner = SUBREG_REG (op0); ++ return true; ++ } ++ else if (REG_P (op0)) ++ { ++ *inner = op0; ++ return true; ++ } ++ } ++ ++ return false; ++} ++ ++/* Return true if this is the last use of a ++ register, false otherwise. */ ++ ++static bool ++reg_is_dead_p (rtx insn, rtx reg_expr) ++{ ++ rtx link; ++ gcc_assert (REG_P (reg_expr)); ++ ++ for (link = REG_NOTES (insn); link; link = XEXP (link, 1)) ++ { ++ if (REG_NOTE_KIND (link) == REG_DEAD && REG_P (XEXP (link, 0))) ++ { ++ if (REGNO (XEXP (link, 0)) == REGNO (reg_expr)) ++ return true; ++ } ++ } ++ return false; ++} ++ ++/* Return true if we don't want to place this ++ extension in the candidate extensions list because of the ++ previous insn. Return false otherwise. */ ++ ++static bool ++ignore_extension_prev_p (rtx ext_insn, rtx prev_insn) ++{ ++ rtx prev_dest, prev_src, prev = PATTERN (prev_insn); ++ rtx ext_src, ext = PATTERN (ext_insn); ++ ++ /* It's OK to allow extension with no accompanying prev real insn */ ++ if (!NONDEBUG_INSN_P (prev_insn) || NOTE_P (prev_insn)) ++ return false; ++ ++ if (GET_CODE (prev) != SET) ++ return false; ++ ++ if (GET_CODE (ext) != SET) ++ return false; ++ ++ prev_dest = SET_DEST (prev); ++ prev_src = SET_SRC (prev); ++ ++ /* Source register of sign extension */ ++ ext_src = XEXP (SET_SRC (ext), 0); ++ ++ /* Check previous insns */ ++ ++ /* Previous insn is a load whose dest is the ++ extension's source and the dest reg is ++ dead */ ++ if (MEM_P (prev_src) && (prev_dest = register_exp (prev_dest))) ++ { ++ if ((ext_src = register_exp (ext_src))) ++ { ++ if ((REGNO (prev_dest) == REGNO (ext_src)) ++ && reg_is_dead_p (ext_insn, ext_src)) ++ return true; ++ } ++ } ++ return false; ++} ++ ++/* Return true if we don't want to place this ++ extension in the candidate extensions list because of the ++ next insn. Return false otherwise. */ ++ ++static bool ++ignore_extension_next_p (rtx ext_insn, rtx next_insn) ++{ ++ rtx next = PATTERN (next_insn); ++ rtx ext_src, ext = PATTERN (ext_insn); ++ ++ if (GET_CODE (ext) != SET) ++ return false; ++ ++ /* Check next insns */ ++ if (!NONDEBUG_INSN_P (next_insn) || NOTE_P (next_insn)) ++ return false; ++ ++ if (GET_CODE (next) != SET) ++ return false; ++ ++ /* zero-extend followed by left shift by 1 -- this sequence will be ++ detected by the insn selection. */ ++ if (GET_CODE (SET_SRC (ext)) == ZERO_EXTEND) ++ { ++ if (GET_CODE (SET_SRC (next)) == ASHIFT ++ && CONST_INT_P (XEXP (SET_SRC (next), 1)) ++ && UINTVAL (XEXP (SET_SRC (next), 1)) == 0x1) ++ return true; ++ } ++ ++ return false; ++} ++ ++/* Find extensions and store them in the extensions vector. */ ++ ++static bool ++find_extensions (void) ++{ ++ basic_block bb; ++ rtx insn, dest, inner; ++ int preserved_size; ++ ext_record_t extrec; ++ ++ /* For all insns, call note_use for each use in insn. */ ++ FOR_EACH_BB (bb) ++ { ++ FOR_BB_INSNS (bb, insn) ++ { ++ if (!NONDEBUG_INSN_P (insn)) ++ continue; ++ ++ if (!extension_p (insn, &dest, &inner, &preserved_size)) ++ { ++ continue; ++ } ++ ++ /* We do not consider extensions that follow a load for ++ this target, as the code selector optimizes the sequence ++ to a load with sign extend or load with zero extend. */ ++ if (PREV_INSN (insn) ++ && ignore_extension_prev_p (insn, PREV_INSN (insn))) ++ { ++ if (dump_file) ++ fprintf (dump_file, "extension at uid=%d ignored\n", ++ INSN_UID (insn)); ++ num_cand_ignored++; ++ continue; ++ } ++ /* We don't consider certain sequences that are picked up by ++ insn selection. */ ++ if (NEXT_INSN (insn) ++ && ignore_extension_next_p (insn, NEXT_INSN (insn))) ++ { ++ if (dump_file) ++ fprintf (dump_file, "extension at uid=%d ignored\n", ++ INSN_UID (insn)); ++ num_cand_ignored++; ++ continue; ++ } ++ ++ /* Only looking at sign extensions to DImode, SImode, or HImode */ ++ if (GET_MODE_BITSIZE (SImode) != preserved_size ++ && GET_MODE_BITSIZE (HImode) != preserved_size ++ && GET_MODE_BITSIZE (QImode) != preserved_size) ++ continue; ++ ++ extrec = (ext_record_t) xmalloc (sizeof (struct ext_record)); ++ extrec->ext = insn; ++ extrec->ext_uses = NULL; ++ extrec->ext_updates = NULL; ++ VEC_safe_push (ext_record_t, heap, extensions, extrec); ++ num_cand++; ++ } ++ } ++ ++ if (dump_file) ++ { ++ if (!VEC_empty (ext_record_t, extensions)) ++ fprintf (dump_file, "\n"); ++ else ++ fprintf (dump_file, "no extensions found.\n"); ++ } ++ ++ return !VEC_empty (ext_record_t, extensions); ++} ++ ++/* Return true if the rtx mode is a supported mode for ++ this optimization, false otherwise. */ ++ ++static bool ++mode_supported_p (rtx exp) ++{ ++ if (GET_MODE (exp) != QImode ++ && GET_MODE (exp) != HImode ++ && GET_MODE (exp) != SImode ++ && GET_MODE (exp) != DImode ++ && GET_MODE (exp) != CCmode ++ && GET_MODE (exp) != CCUNSmode) ++ return false; ++ ++ return true; ++} ++ ++/* Return true if the rtx is a function return expr, false otherwise */ ++ ++static bool ++return_val_p (rtx dest) ++{ ++ if ((REG_P (dest) || GET_CODE (dest) == PARALLEL) && ++ REG_FUNCTION_VALUE_P (dest)) ++ { ++ return true; ++ } ++ return false; ++} ++ ++ ++/* A 'for_each_rtx' callback returning 1 if the rtx is a ++ REG or SUBREG rtx. The first matching rtx found stops the ++ rtx traversal. */ ++ ++static int ++reg_or_subreg_rtx (rtx * x, void *data) ++{ ++ regspec_cb_data_t *ldata = (regspec_cb_data_t *) data; ++ ++ if (REG_P (*x)) ++ { ++ ldata->exp = *x; ++ return 1; ++ } ++ ++ if (GET_CODE (*x) == SUBREG) ++ { ++ ldata->exp = SUBREG_REG (*x); ++ return 1; ++ } ++ ++ return 0; ++} ++ ++/* A 'for_each_rtx' callback returning 1 if the rtx is a ++ REG or SUBREG rtx whose register number is that passed ++ in the data parameter. Data parameter's rtx value is ++ set to the matching rtx if found. */ ++ ++static int ++reg_or_subreg_rtx_regno (rtx * x, void *data) ++{ ++ regspec_cb_data_t *ldata = (regspec_cb_data_t *) data; ++ ++ if (REG_P (*x) && (REGNO (*x) == ldata->regno)) ++ { ++ ldata->exp = *x; ++ return 1; ++ } ++ if (GET_CODE (*x) == SUBREG && (REGNO (SUBREG_REG (*x)) == ldata->regno)) ++ { ++ ldata->exp = SUBREG_REG (*x); ++ return 1; ++ } ++ return 0; ++} ++ ++/* Callback that counts the number of register operands ++ in an expression. Return 0 to allow all rtxs to be ++ traversed. */ ++ ++static int ++count_reg_operands (rtx * x, void *data) ++{ ++ regspec_cb_data_t *ldata = (regspec_cb_data_t *) data; ++ ++ if (register_exp (*x) != NULL) ++ { ++ ldata->regno++; ++ } ++ return 0; ++} ++ ++/* Count the number of register operands in an expression. ++ We use the regspec_cb_data_t regno field as the number ++ of register operands we found in an expression. */ ++ ++static int ++num_reg_operands (rtx x) ++{ ++ int rv; ++ regspec_cb_data_t data; ++ data.regno = 0; ++ data.exp = NULL_RTX; ++ ++ if ((rv = for_each_rtx (&x, count_reg_operands, (void *) &data)) == 0) ++ return (data.regno); /* contains the count */ ++ else ++ return 0; ++} ++ ++/* Find the SUBREG or REG rtx corresponding to regno in the given rtx. ++ Return NULL_RTX if the regno rtx is not found. */ ++ ++static rtx ++find_regspec_regno (unsigned int regno, rtx x) ++{ ++ int rv; ++ regspec_cb_data_t data; ++ data.regno = regno; ++ data.exp = NULL_RTX; ++ ++ if ((rv = for_each_rtx (&x, reg_or_subreg_rtx_regno, (void *) &data)) != 0) ++ return (data.exp); ++ else ++ return NULL_RTX; ++} ++ ++/* Find a REG or SUBREG rtx, starting at expr x. ++ Return NULL_RTX if no REG or SUBREG rtx is found. ++ If found, the rtx returned is a REG (not SUBREG) */ ++ ++static rtx ++find_regspec (rtx x) ++{ ++ int rv; ++ regspec_cb_data_t data; ++ data.regno = -1; /* not used */ ++ data.exp = NULL_RTX; ++ ++ if ((rv = for_each_rtx (&x, reg_or_subreg_rtx, (void *) &data)) != 0) ++ return (data.exp); ++ else ++ return NULL_RTX; ++} ++ ++/* Return true if the expression defines single register, regno. */ ++ ++static bool ++expr_defines_regno_p (rtx insn, unsigned int regno) ++{ ++ rtx reg; ++ if (GET_CODE (insn) == SET) ++ { ++ reg = SET_DEST (insn); ++ if (find_regspec_regno (regno, reg) != NULL_RTX) ++ return true; ++ } ++ return false; ++} ++ ++/* Return true if the insn defines a single register, regno. ++ Return false otherwise */ ++ ++static bool ++defines_regno_p (rtx insn_insn, unsigned int regno, int indent) ++{ ++ extelim_uid_t uid = INSN_UID (insn_insn); ++ df_ref *p_def; ++ ++ /* Get the operands defined */ ++ p_def = DF_INSN_UID_DEFS (uid); ++ ++ if (!p_def) ++ return false; ++ ++ if (*(p_def + 1) != NULL) ++ { ++ if (dump_file) ++ fprintf (dump_file, "%*suid=%d defines multiple registers\n", ++ indent, " ", uid); ++ return false; ++ } ++ ++ if (DF_REF_REGNO (*p_def) != regno) ++ { ++ if (dump_file) ++ fprintf (dump_file, "%*suid=%d defines does not define %d\n", ++ indent, " ", uid, regno); ++ return false; ++ } ++ ++ return true; ++} ++ ++/* The operand is already extended and the extension is compatible with ++ the originating extension with respect to type and size. ++ E.g. zero_extend:HI meets and AND r,#0xffff. Another example ++ is LSHIFT:SI left or right and zero_extend:SI, because the ++ instruction selected is rlwinm and clears the upper 32 bits. ++ Other examples in the code. Return true if a compatible extension ++ is found, false otherwise. */ ++ ++static bool ++operand_is_extended (rtx dest, rtx srcexp, int indent) ++{ ++ /* Output of a CALL is already extended. ++ To ensure that the return value is not modified by the extend, ++ the extend from mode size must be at least the size of the CALL output. ++ Example - this is redundant since output of CALL is extended. ++ X:SI = CALL ... ++ Y:DI = sign_extend:DI (X:SI) */ ++ if (GET_CODE (srcexp) == CALL ++ && (GET_MODE_BITSIZE (ext_from_mode)) >= ++ GET_MODE_BITSIZE (GET_MODE (dest))) ++ { ++ if (dump_file) ++ fprintf (dump_file, ++ "%*s...is extended already (CALL insn output)\n", indent, ++ " "); ++ return true; ++ } ++ ++ /* Output is load immediate or load constant */ ++ if (CONST_INT_P (srcexp)) ++ { ++ bool is_extended; ++ if (ext_from_mode == QImode && (UINTVAL (srcexp) <= 0xff)) ++ is_extended = true; ++ else if (ext_from_mode == HImode && (UINTVAL (srcexp) <= 0xffff)) ++ is_extended = true; ++ else if (ext_from_mode == SImode && (UINTVAL (srcexp) <= 0xffffffff)) ++ is_extended = true; ++ else ++ is_extended = false; ++ ++ if (is_extended) ++ { ++ if (dump_file) ++ fprintf (dump_file, ++ "%*s... is extended already (CONST_INT load)\n", indent, ++ " "); ++ return true; ++ } ++ } ++ ++ /* Sign extension of the same type as the originating extension. ++ Here the candidate defines the register used in the originating extension. ++ The originating extension will be replaced by a copy if it is found to be ++ redundant with respect to the candidate extension. ++ The candidate (this extension dest,src) must write the at least the same bits as the ++ originating extension in order to be redundant. So, we follow these rules: ++ ++ cand_to_mode == machine mode of the destination for this candidate extension ++ cand_from_mode == machine mode of the source for this candidate extension ++ ext_to_mode == machine mode of the originating extension output ++ ext_from_mode == machine mode of the originating extension input ++ ++ SIZE(cand_to_mode) >= SIZE(extend_to_mode) && SIZE(cand_from_mode) <= SIZE(extend_from_mode) ++ ++ Example 1: ++ Candidate (HI->SI extension) ++ DI SI HI QI 0 ++ | |<---| | | ++ ++ Originating (SI->DI) ++ DI SI HI QI 0 ++ |<-------| | | | ++ ++ Not redundant, candidate does not cover the original bits: ++ SIZE(cand_to_mode)[SI] !>= SIZE(extend_to_mode)[DI] ++ ++ Example 2: ++ Candidate (QI->DI extension) ++ DI SI HI QI 0 ++ |<-------|----|--| | ++ ++ Originating (HI->SI) ++ DI SI HI QI 0 ++ | |<---| | | ++ ++ Redundant, candidate covers the original bits: ++ SIZE(cand_to_mode) [DI] >= SIZE(extend_to_mode) [SI] ++ AND ++ SIZE(cand_from_mode) [QI] <= SIZE(extend_from_mode) [HI] ++ */ ++ if (GET_CODE (srcexp) == ext_code) ++ { ++ enum machine_mode cand_from_mode = GET_MODE (XEXP (srcexp, 0)); ++ enum machine_mode cand_to_mode = GET_MODE (dest); ++ if ((GET_MODE_BITSIZE (cand_to_mode) >= GET_MODE_BITSIZE (ext_to_mode)) ++ && (GET_MODE_BITSIZE (cand_from_mode) <= ++ GET_MODE_BITSIZE (ext_from_mode))) ++ { ++ if (dump_file) ++ fprintf (dump_file, ++ "%*s...is already extended (redundant extension)\n", ++ indent, " "); ++ return true; ++ } ++ } ++ ++ /* Encountered an insn with the same effect as extension, e.g. ++ AND (regspec) (const_int). E.g. AND (reg:SI) (0x7fff) is equivalent ++ to ZERO_EXTEND:DI (reg:HI) or SIGN_EXTEND:DI (reg:HI). The code selection ++ for AND zero extends the entire register, so we don't have to ++ check that srcexp extends to at least ext_to_mode size. */ ++ if ((GET_CODE (srcexp) == AND) && CONST_INT_P (XEXP (srcexp, 1))) ++ { ++ if (ext_from_mode == QImode && (UINTVAL (XEXP (srcexp, 1)) <= 0x7f)) ++ return true; ++ else if (ext_from_mode == HImode ++ && (UINTVAL (XEXP (srcexp, 1)) <= 0x7fff)) ++ return true; ++ else if (ext_from_mode == SImode ++ && (UINTVAL (XEXP (srcexp, 1)) <= 0x7fffffff)) ++ return true; ++ } ++ ++ return false; ++} ++ ++/* Determine if the operation allows us to continue the propagation. ++ We kill the propagation for all operations except copy. This ++ ensures that the extended operand that we may find eventually ++ is not modified by insns in the def-use chain. It's harsh, ++ but it's safest eliminate all but the most benign (copy) operations ++ in the propagation chain. */ ++ ++static bool ++continue_def_propagation (rtx dest, rtx srcexp, rtx src_operand, int indent) ++{ ++ /* Only continue if its a copy -- that is, the srcexp is a register expression */ ++ if ( register_exp (srcexp) ) ++ return true; ++ ++ return false; ++} ++ ++/* Helper for insn_def_analysis_result. ++ The register operand, src is set here. Recall we ++ can only handle one register operand in the src expression. ++ We one of 3 states: ++ 1) Determine the operand is extended, ...DEF_EXTENDED returned. ++ 2) Determine the propagation can continue, ...DEF_CONTINUE_RECURSION returned. ++ 3) Otherwise, ...DEF_STOP_RECURSION is returned. */ ++static enum insn_def_results ++insn_def_analysis_result_1 (rtx insn, bool treat_as_copy, ++ unsigned int regno_def ATTRIBUTE_UNUSED, ++ rtx * src, int indent) ++{ ++ rtx dest, srcexp; ++ int num_operands; ++ ++ /* Insn has to be an expression we can analyze */ ++ if (GET_CODE (insn) != SET) ++ { ++ if (dump_file) ++ fprintf (dump_file, "%*s...is not a SET expression\n", indent, " "); ++ return EXTELIM_ANALYSIS_RESULT_DEF_STOP_RECURSION; ++ } ++ dest = SET_DEST (insn); ++ srcexp = SET_SRC (insn); ++ ++ /* Dest must be a reg, not expression */ ++ if (!REG_P (dest)) ++ { ++ if (dump_file) ++ fprintf (dump_file, ++ "%*s...dest is not a simple register\n", indent, " "); ++ return EXTELIM_ANALYSIS_RESULT_DEF_STOP_RECURSION; ++ } ++ ++ /* First check whether the operand is extended already. If so, ++ we can leave immediately successfully. */ ++ if (operand_is_extended (dest, srcexp, indent) && !treat_as_copy) ++ return (EXTELIM_ANALYSIS_RESULT_DEF_EXTENDED); ++ ++ ++ /* Failing to determine that the operand is already extended, ++ we have to validate that we have register operands to propagate. */ ++ num_operands = num_reg_operands (srcexp); ++ ++ /* At least one register operand required for propagation. */ ++ if (num_operands == 0) ++ { ++ if (dump_file) ++ fprintf (dump_file, ++ "%*s...no register operands in RHS\n", indent, " "); ++ return EXTELIM_ANALYSIS_RESULT_DEF_STOP_RECURSION; ++ } ++ ++ /* Only one register operand is allowed in the RHS since we can't ++ can't propagate more than one register. */ ++ if (num_operands > 1) ++ { ++ if (dump_file) ++ fprintf (dump_file, ++ "%*s...found multiple register operands in RHS\n", indent, ++ " "); ++ return EXTELIM_ANALYSIS_RESULT_DEF_STOP_RECURSION; ++ } ++ ++ /* Find the used operand in the src expression */ ++ *src = find_regspec (srcexp); ++ if (*src == NULL_RTX || !mode_supported_p (*src)) ++ { ++ if (dump_file) ++ fprintf (dump_file, ++ "%*s...src operand reg=%d cannot be found or is unsupported mode\n", ++ indent, " ", regno_def); ++ return EXTELIM_ANALYSIS_RESULT_DEF_STOP_RECURSION; ++ } ++ ++ /* This is an extension, but it is previously marked to be transformed to a copy. ++ We just treat it as a copy even though it hasn't been transformed yet. So ++ continue the propagation. */ ++ if (treat_as_copy) ++ { ++ if (dump_file) ++ fprintf (dump_file, ++ "%*s...%s is treated as a copy (marked for replace)\n", ++ indent, " ", GET_RTX_NAME (GET_CODE (srcexp))); ++ return (EXTELIM_ANALYSIS_RESULT_DEF_CONTINUE_RECURSION); ++ } ++ ++ /* Validate that it's ok to continue propagation with this operand. */ ++ if (continue_def_propagation (dest, srcexp, *src, indent)) ++ return (EXTELIM_ANALYSIS_RESULT_DEF_CONTINUE_RECURSION); ++ ++ /* Else we default to halting the search for a redundant extension */ ++ return (EXTELIM_ANALYSIS_RESULT_DEF_STOP_RECURSION); ++} ++ ++/* Determine if the insn extends it's destination register in ++ a manner such that the original extension is redundant. */ ++ ++static enum insn_def_results ++insn_def_analysis_result (rtx insn_insn, unsigned int regno_def, rtx * src, ++ int indent) ++{ ++ bool treat_as_copy = false; ++ ++ /* Insn must only define one output */ ++ if (!defines_regno_p (insn_insn, regno_def, indent)) ++ { ++ if (dump_file) ++ fprintf (dump_file, ++ "%*s...defines more than 1 output\n", indent, " "); ++ return EXTELIM_ANALYSIS_RESULT_DEF_STOP_RECURSION; ++ } ++ ++ /* We want to treat this extension as a copy and continue propagation. ++ Otherwise, it would be detected again as redundant. */ ++ if (insn_flag_p (EXTELIM_REPLACE_COPY, INSN_UID (insn_insn))) ++ { ++ if (dump_file) ++ fprintf (dump_file, ++ "%*suse at uid=%d is marked to transform to copy\n", indent, ++ " ", INSN_UID (insn_insn)); ++ treat_as_copy = true; ++ } ++ ++ /* Do the analysis */ ++ return (insn_def_analysis_result_1 ++ (PATTERN (insn_insn), treat_as_copy, regno_def, src, indent)); ++} ++ ++/* Analyze each of the expressions in a PARALLEL expression. As each of ++ the expressions may yield a different state, select the most conservative ++ state to return. */ ++ ++static enum insn_def_results ++insn_def_analysis_2 (rtx insn_def, unsigned int regno_def, rtx * src, ++ int indent) ++{ ++ int i; ++ rtx insn = PATTERN (insn_def); ++ enum insn_def_results action; ++ enum insn_def_results return_action = ++ EXTELIM_ANALYSIS_RESULT_DEF_STOP_RECURSION; ++ ++ gcc_assert (GET_CODE (insn) == PARALLEL); ++ ++ for (i = XVECLEN (insn, 0) - 1; i >= 0; i--) ++ { ++ rtx body = XVECEXP (insn, 0, i); ++ /* Only act on the expressions that define regno_def */ ++ if (!expr_defines_regno_p (body, regno_def)) ++ continue; ++ /* Determine the next action */ ++ action = insn_def_analysis_result_1 (body, false /* treat_as_copy */ , ++ regno_def, src, indent); ++ /* The result of this expression stops the recursion, i.e. no ++ longer reasonable to continue looking at further recursion. */ ++ if (action == EXTELIM_ANALYSIS_RESULT_DEF_STOP_RECURSION) ++ return action; ++ /* Only return EXTENDED if there are no other different actions ++ in the series. Otherwise, CONTINUE_RECURSION is returned. */ ++ if (action == EXTELIM_ANALYSIS_RESULT_DEF_CONTINUE_RECURSION) ++ return_action = action; ++ else if (return_action == ++ EXTELIM_ANALYSIS_RESULT_DEF_CONTINUE_RECURSION) ++ return_action = EXTELIM_ANALYSIS_RESULT_DEF_CONTINUE_RECURSION; ++ else ++ return_action = action; ++ } ++ return (return_action); ++} ++ ++/* Helper 1 for insn_def_analysis */ ++ ++static enum insn_def_results ++insn_def_analysis_1 (rtx insn_def, unsigned int regno_def, rtx * src, ++ int indent) ++{ ++ rtx def = PATTERN (insn_def); ++ enum insn_def_results action; ++ ++ switch (GET_CODE (def)) ++ { ++ case PARALLEL: ++ action = insn_def_analysis_2 (insn_def, regno_def, src, indent); ++ break; ++ default: ++ action = insn_def_analysis_result (insn_def, regno_def, src, indent); ++ break; ++ } ++ return action; ++} ++ ++/* We look at the definition of a register that is either the ++ sign or zero extend source register or a definition that that ++ has been propagated to here via analyze_ext_def. The objective ++ is to determine, by looking at the operation and operands, whether ++ the register is sign/zero extended by virtue of the operation and/or ++ operands. If so, the original extension is redundant. ++ The function returns one of 3 possible states after analyzing the ++ insn: ++ 1. EXTELIM_ANALYSIS_RESULT_DEF_EXTENDED - we determined that the ++ insn does indeed extend the original source extension register. ++ analyze_ext_def returns FALSE, therefore, ending the recursion ++ and propagation. ++ 2. EXTELIM_ANALYSIS_RESULT_DEF_STOP_RECURSION - we determined that ++ the insn does not meet the criteria to continue the recursive search. ++ Some conditions causing this may be multiple operands defining this ++ register (we only propagate on a single input operand) or the insn ++ defines more than one output or the operation does not allow ++ a previous extension to propagate, e.g. an arithmetic shift on ++ a SI value clears the upper bits using rlwinm. MUL, DIV, MOD ++ stop recursion because the result is longer than the input size, ++ thus impacting the possible previous extension. ++ 3. EXTELIM_ANALYSIS_RESULT_DEF_CONTINUE_RECURSION - we found an ++ operation with one register operand and the operation will not ++ affect a previous extension if one exists. ADD, SUB are examples. ++ We continue looking up the chain at the definition of the operand ++ for an extended result. ++ If we run into a previous extension marked for replacement during ++ recursion, we treat it as a copy (CONTINUE_RECURSION since the ++ extension is preserved by the copy). */ ++ ++static enum insn_def_results ++insn_def_analysis (rtx insn_def, unsigned int regno_def, rtx * src, ++ int indent) ++{ ++ return (insn_def_analysis_1 (insn_def, regno_def, src, indent)); ++} ++ ++/* Analyze the insn defining the source of the sign extension. ++ If it can be determined that the definition is already ++ sign extended, return false. Otherwise, return true if ++ extension is needed. */ ++ ++static bool ++analyze_ext_def (rtx insn_def, unsigned int regno_def, int indent) ++{ ++ extelim_uid_t uid; ++ rtx def = PATTERN (insn_def); ++ rtx src; ++ df_ref df_def, *p_use; ++ bool ext_needed, indent_once; ++ struct df_link *link; ++ enum insn_def_results analysis_result; ++ ++ gcc_assert (def != NULL); ++ ++ uid = INSN_UID (insn_def); ++ ++ /* If we seen the originating extension again, return false (ext not needed) */ ++ if (current_ext_record->ext == insn_def) ++ { ++ if (dump_file) ++ fprintf (dump_file, ++ "%*sdef at uid=%d is original extension\n", indent, " ", uid); ++ return false; ++ } ++ ++ /* The recursion has to definitively end with an operand being ++ extended (and compatible with the originating extension). If ++ we see the insn again, this could return a faulty positive (false), ++ so we return true here instead of false. See pr43017 (-funroll-loops) ++ as an example. */ ++ if (insn_flag_p (EXTELIM_SEEN, uid)) ++ { ++ if (dump_file) ++ fprintf (dump_file, ++ "%*sdef at uid=%d is visited already\n", indent, " ", uid); ++ return true; ++ } ++ ++ /* Mark this insn as seen */ ++ insn_flag_set (EXTELIM_SEEN, uid); ++ ++ analysis_result = insn_def_analysis (insn_def, regno_def, &src, indent); ++ switch (analysis_result) ++ { ++ /* We know conclusively that the register defined in this expression ++ is already extended. */ ++ case EXTELIM_ANALYSIS_RESULT_DEF_EXTENDED: ++ if (dump_file) ++ fprintf (dump_file, "%*sdef at uid=%d is extended\n", indent, " ", ++ uid); ++ return false; ++ break; ++ /* We know conclusively that we cannot continue the recursion. Perhaps ++ the expression defines multiple registers, etc. */ ++ case EXTELIM_ANALYSIS_RESULT_DEF_STOP_RECURSION: ++ if (dump_file) ++ fprintf (dump_file, "%*sdef at uid=%d cannot be propagated\n", indent, ++ " ", uid); ++ return true; ++ break; ++ /* Continue to look at the operands of this expression. They may be extended ++ already. */ ++ case EXTELIM_ANALYSIS_RESULT_DEF_CONTINUE_RECURSION: ++ break; ++ default: ++ gcc_unreachable (); ++ } ++ ++ /* This is the operand for which we want to find definitions. There should ++ only be one operand as we have previously checked for operations with only ++ one register operand as the src previously. */ ++ p_use = DF_INSN_UID_USES (uid); ++ gcc_assert (p_use != NULL); ++ ++ /* Make sure that this use is the one returned in src. Otherwise we simply ++ stop the propagation. Note the DF_INSN_UID_USES works at the insn ++ level, so a PARALLEL pattern may return many uses, hence the need ++ to validate the correct use here. */ ++ if ((*p_use == NULL) || (DF_REF_REGNO (*p_use) != REGNO (src))) ++ return true; ++ ++ ext_needed = true; ++ indent_once = true; ++ for (link = DF_REF_CHAIN (*p_use); link; link = link->next) ++ { ++ rtx insn_def; ++ df_def = link->ref; ++ if (!df_def) ++ continue; ++ /* Link must be to a definition of the use */ ++ if (!DF_REF_REG_DEF_P (df_def)) ++ continue; ++ /* Ignore ARTIFICIAL defs */ ++ if (DF_REF_IS_ARTIFICIAL (df_def)) ++ continue; ++ insn_def = DF_REF_INSN (df_def); ++ /* Don't consider debug_insns */ ++ if (!NONDEBUG_INSN_P (insn_def)) ++ continue; ++ if (dump_file) ++ fprintf (dump_file, ++ "%*sdef of reg=%d at uid=%d\n", indent, " ", ++ DF_REF_REGNO (df_def), INSN_UID (insn_def)); ++ /* Set indent for dump formatting */ ++ if (indent_once) ++ { ++ ++indent; ++ indent_once = false; ++ } ++ ext_needed = analyze_ext_def (insn_def, DF_REF_REGNO (df_def), indent); ++ if (ext_needed) ++ break; ++ } ++ ++ if (dump_file) ++ fprintf (dump_file, ++ "%*sext %s needed\n", indent, " ", ext_needed ? "" : "not"); ++ ++ return ext_needed; ++} ++ ++/* Determine whether the expression needs to be saved for this extension. ++ The expression will be updated in some way if the extension is ultimately ++ eliminated. */ ++ ++static bool ++exp_needs_update_p (rtx exp) ++{ ++ if (GET_CODE (exp) == SUBREG ++ && (SUBREG_PROMOTED_VAR_P (exp))) ++ { ++ return true; ++ } ++ return false; ++} ++ ++/* Some expressions may need to be updated if the originating extension ++ is eliminated. For example, SUBREG_PROMOTED flags on uses are no longer ++ valid if the extension is eliminated. Save the expression here. */ ++ ++static void ++save_ext_update (ext_record_t extrec, rtx exp) ++{ ++ /* Save this expression to be updated if the extension is eliminated. */ ++ VEC_safe_push (rtx, heap, extrec->ext_updates, exp); ++} ++ ++/* Check a compare operation to determine whether the operands ++ of the compare use the upper bits of the extension. Return ++ true if the upper bits are not relevant in the compare, false ++ otherwise. */ ++ ++static bool ++check_compare (rtx dest, rtx src) ++{ ++ /* Detect ++ (set (reg:CC r0) (compare:CC (REGSPEC) (REGSPEC))) ++ or ++ (set (reg:CC r0) (compare:CC (REGSPEC) (CONST))) ++ where REGSPEC is (reg:mm r) or (subreg:mm (reg:MM r) n) ++ CONST is a constant integer. ++ The mode size of compare ops must be less than the ++ mode of the original extension for the upper bits to ++ be irrelevant. ++ An exception is made for mode sizes less than a word size. ++ For our targets, there is no 'cmph' insn, so we bail out ++ if we see a comparison of sizes less than a word (SI). */ ++ if (REG_P (dest) ++ && (GET_MODE (dest) == CCmode || GET_MODE (dest) == CCUNSmode) ++ && GET_CODE (src) == COMPARE ++ && (GET_MODE (src) == CCmode || GET_MODE (src) == CCUNSmode)) ++ { ++ rtx compare_op0 = XEXP (src, 0); ++ rtx compare_op1 = XEXP (src, 1); ++ ++ /* Check the first operand, op0, size. */ ++ if ((REG_P (compare_op0) || GET_CODE (compare_op0) == SUBREG) ++ && (GET_MODE_BITSIZE (GET_MODE (compare_op0)) <= ++ GET_MODE_BITSIZE (ext_from_mode))) ++ { ++ /* Half word compares and smaller are performed as word compares, so upper bits are used. */ ++ if (GET_MODE_BITSIZE (GET_MODE (compare_op0)) < SImode) ++ return false; ++ ++ /* Now check the other operand, op1. */ ++ if ((REG_P (compare_op1) || GET_CODE (compare_op1) == SUBREG) ++ && (GET_MODE_BITSIZE (GET_MODE (compare_op1)) <= ++ GET_MODE_BITSIZE (ext_from_mode))) ++ return true; ++ ++ /* Compare to constant, we know op0 already meets size constraints. */ ++ if (CONST_INT_P (compare_op1)) ++ return true; ++ } ++ } ++ return false; ++} ++ ++/* Determine condition a, whether the upper bits are relevant to the operation. ++ Return false if we prove the upper bits are not relevant in the operation, ++ true otherwise. */ ++ ++static bool ++operation_uses_upper_bits (rtx dest, rtx src, unsigned int regno_use, ++ int indent ATTRIBUTE_UNUSED) ++{ ++ rtx regspec_src = find_regspec_regno (regno_use, src); ++ ++ if (check_compare (dest, src)) ++ return false; ++ ++ /* Store of regno to mem, size stored is the same or smaller than the extended from size */ ++ if (MEM_P (dest) ++ && (GET_MODE_BITSIZE (GET_MODE (dest)) <= ++ GET_MODE_BITSIZE (ext_from_mode)) ++ /* Ensure the used register is being stored and not used in another capacity, say, as a pointer. */ ++ && (regspec_src)) ++ return false; ++ ++ /* Operation operand size is the same or smaller than the extended from size */ ++ if (regspec_src) ++ { ++ if (GET_MODE_BITSIZE (GET_MODE (regspec_src)) <= ++ GET_MODE_BITSIZE (ext_from_mode)) ++ return false; ++ } ++ ++ /* Default to the safest result */ ++ return true; ++} ++ ++/* Determine if this insn also extends to the size or greater of the original extension. ++ Sign extend can propagate to zero extend and vice-versa because the upper bits ++ haven't affected the low bits up to now throughout the propagation. */ ++ ++static bool ++operation_extends_to_upper_bits_size (rtx src, int indent ATTRIBUTE_UNUSED) ++{ ++ /* Sign extension of the same type as the originating extension. ++ Here the candidate uses the register defined by the originating extension. ++ If the candidate is found to be redundant, the originating extension is ++ replaced with a copy. ++ ++ We follow these rules: ++ ++ dest_mode == machine mode of the destination for this candidate extension ++ (it's the same mode as the src, e,g, reg:DI = sign_extend:DI ...) ++ src_mode == machine mode of the source for this candidate extension ++ (the mode of the used register, SI in this case, e.g. reg:DI = sign_extend:DI (subreg:SI (reg:DI)) ++ ext_to_mode == machine mode of the originating extension output ++ ext_from_mode == machine mode of the originating extension input ++ ++ SIZE(cand_from_mode) >= SIZE(extend_from_mode) && SIZE(cand_to_mode) <= SIZE(extend_to_mode) ++ ++ Example 1: ++ Originating (SI->DI) ++ DI SI HI QI 0 ++ |<-------| | | | ++ ++ Candidate (HI->SI extension) ++ DI SI HI QI 0 ++ | |<---| | | ++ ++ Not redundant, candidate does not cover the original bits: ++ SIZE(dest_mode)[SI] !<= SIZE(extend_to_mode)[DI] ++ ++ Example 2: ++ Originating (HI->SI) ++ DI SI HI QI 0 ++ | |<---| | | ++ ++ Candidate (QI->DI extension) ++ DI SI HI QI 0 ++ |<-------|----|--| | ++ ++ Redundant, candidate covers the original bits: ++ SIZE(cand_to_mode) [DI] >= SIZE(extend_to_mode) [SI] ++ AND ++ SIZE(cand_from_mode) [QI] <= SIZE(extend_from_mode) [HI] */ ++ if (GET_CODE (src) == ext_code) ++ { ++ /* Extend is redundant if we don't overwrite the source of the ++ previous extension and extends to at least the extent of the original. */ ++ enum machine_mode cand_from_mode = GET_MODE (XEXP (src, 0)); ++ enum machine_mode cand_to_mode = GET_MODE (src); ++ if (GET_MODE_BITSIZE (cand_from_mode) >= ++ GET_MODE_BITSIZE (ext_from_mode) ++ && (GET_MODE_BITSIZE (cand_to_mode) <= ++ GET_MODE_BITSIZE (ext_to_mode))) ++ return true; ++ } ++ ++ /* Encountered an insn with the same effect as extension, e.g. ++ AND (regspec) (const_int). E.g. AND (reg:SI) (0xffff) is equivalent ++ to ZERO_EXTEND:DI (reg:HI) */ ++ if ((GET_CODE (src) == AND) && CONST_INT_P (XEXP (src, 1))) ++ { ++ /* Extends to at least the original extension size */ ++ if (GET_MODE_BITSIZE (GET_MODE (src)) >= GET_MODE_BITSIZE (ext_to_mode)) ++ { ++ if (ext_from_mode == QImode && (UINTVAL (XEXP (src, 1)) <= 0xff)) ++ return true; ++ else if (ext_from_mode == HImode ++ && (UINTVAL (XEXP (src, 1)) <= 0xffff)) ++ return true; ++ else if (ext_from_mode == SImode ++ && (UINTVAL (XEXP (src, 1)) <= 0xffffffff)) ++ return true; ++ else ++ return false; ++ } ++ } ++ return false; ++} ++ ++/* Determine whether the operation's upper bits subtly or overtly affects the low bits. */ ++ ++static bool ++operation_implicitly_affects_lowbits (rtx dest, rtx src, ++ unsigned int regno_use, int indent) ++{ ++ rtx regspec = find_regspec_regno (regno_use, src); ++ ++ /* First, a return expression must be assumed to affect the lowbits as the return value ++ must be extended properly. */ ++ if (return_val_p (dest)) ++ { ++ if (dump_file) ++ { ++ fprintf (dump_file, "%*sDestination is a return value\n", indent, ++ " "); ++ } ++ return true; ++ } ++ ++ /* These operations implicitly affect the lowbits, except where noted. */ ++ switch (GET_CODE (src)) ++ { ++ case MULT: ++ case DIV: ++ case UDIV: ++ case UMOD: ++ case MOD: ++ /* Normally, yes, these operations return true (affects low bits). But when the ++ the operand size is less than or equal to the "low bits" size AND the operation size ++ is the same as the operand size, the operation is performed only on the "low bits" ++ and the "upper bits" do not contribute to the output. */ ++ if (regspec ++ && (GET_MODE_BITSIZE (GET_MODE (regspec)) <= ++ GET_MODE_BITSIZE (ext_from_mode)) ++ && GET_MODE_BITSIZE (GET_MODE (src)) == ++ GET_MODE_BITSIZE (GET_MODE (regspec))) ++ return false; ++ return true; ++ ++ break; ++ /* Shift rights normally affect the low bits. There can be special cases where this ++ is not true, such a the operand size is smaller than the extended from size, e.g. ++ set (reg:SI Y) (zero_extend:SI (subreg:HI (reg:SI X))) ++ set (reg:QI Z) (lshiftrt (subreg:QI (reg:SI Y)) ++ The shift of the QI data is not affected by the extension of HI data unless the ++ shift is large enough to encroach into the QI bits. This seems rare and I do not ++ check for it. */ ++ case LSHIFTRT: ++ case ASHIFTRT: ++ return true; ++ break; ++ /* Other operations are known not to impact the low bits */ ++ default: ++ return false; ++ } ++ ++} ++ ++/* The operation directly defines a propagatable output. Several ++ operations do not define such output. E.g. MEM (loads) do not ++ define an output based on the operation. USE is another example, ++ as it isn't a real operation. */ ++ ++static bool ++operation_directly_defines_an_output (rtx dest, rtx src, ++ int indent ATTRIBUTE_UNUSED) ++{ ++ switch (GET_CODE (src)) ++ { ++ case REG: ++ case SUBREG: ++ case PLUS: ++ case MINUS: ++ case NEG: ++ case MULT: ++ case DIV: ++ case MOD: ++ case UDIV: ++ case UMOD: ++ case AND: ++ case IOR: ++ case XOR: ++ case NOT: ++ case ASHIFT: ++ case ROTATE: ++ case ASHIFTRT: ++ case LSHIFTRT: ++ case ROTATERT: ++ case SIGN_EXTEND: ++ case ZERO_EXTEND: ++ case TRUNCATE: ++ return true; ++ break; ++ /* OK to propagate if the output of IF_THEN_ELSE is a register */ ++ case IF_THEN_ELSE: ++ if (REG_P (dest)) ++ return true; ++ break; ++ /* All others are assumed not to generate a normal output */ ++ default: ++ break; ++ } ++ return false; ++} ++ ++/* Helper for insn_use_analysis_result */ ++ ++static enum insn_use_results ++insn_use_analysis_result_1 (rtx insn, bool treat_as_copy, ++ unsigned int regno_use, rtx * dest, int indent) ++{ ++ rtx src; ++ bool cond_a, cond_b, cond_c, cond_d; ++ ++ if (GET_CODE (insn) != SET) ++ return EXTELIM_ANALYSIS_RESULT_LOWBITS_AFFECTED; ++ ++ *dest = SET_DEST (insn); ++ src = SET_SRC (insn); ++ ++ /* Bail out on inline assembly also */ ++ if (GET_CODE (src) == ASM_INPUT || GET_CODE (src) == ASM_OPERANDS) ++ return EXTELIM_ANALYSIS_RESULT_LOWBITS_AFFECTED; ++ ++ /* Bail out on non supported types */ ++ if (!mode_supported_p (*dest)) ++ return EXTELIM_ANALYSIS_RESULT_LOWBITS_AFFECTED; ++ ++ /* First, we determine cond_c (is a redundant extension) because it gates the ++ other conditions. */ ++ if ((cond_c = operation_extends_to_upper_bits_size (src, indent))) ++ { ++ if (treat_as_copy) ++ { ++ if (dump_file) ++ fprintf (dump_file, ++ "%*s...%s is treated as a copy (marked for replace)\n", ++ indent, " ", GET_RTX_NAME (GET_CODE (src))); ++ return EXTELIM_ANALYSIS_RESULT_CONTINUE_RECURSION; ++ } ++ ++ if (dump_file) ++ fprintf (dump_file, ++ "%*s...%s is a redundant extension\n", ++ indent, " ", GET_RTX_NAME (GET_CODE (src))); ++ return EXTELIM_ANALYSIS_RESULT_LOWBITS_NOT_AFFECTED; ++ } ++ ++ cond_a = operation_uses_upper_bits (*dest, src, regno_use, indent); ++ ++ cond_b = ++ operation_implicitly_affects_lowbits (*dest, src, regno_use, indent); ++ ++ cond_d = operation_directly_defines_an_output (*dest, src, indent); ++ ++ /* Operation implicitly affects low bits */ ++ if (cond_b) ++ { ++ if (dump_file) ++ fprintf (dump_file, ++ "%*s...%s implicitly affects low bits\n", ++ indent, " ", GET_RTX_NAME (GET_CODE (src))); ++ return EXTELIM_ANALYSIS_RESULT_LOWBITS_AFFECTED; ++ } ++ ++ /* Neither cond_a nor cond_b affects the low bits */ ++ if (!cond_a) ++ { ++ if (dump_file) ++ fprintf (dump_file, ++ "%*s...%s does not use upper bits\n", ++ indent, " ", GET_RTX_NAME (GET_CODE (src))); ++ return EXTELIM_ANALYSIS_RESULT_LOWBITS_NOT_AFFECTED; ++ } ++ ++ /* To continue recursion, the operation must define a ++ meaningful output. */ ++ if (!cond_d) ++ { ++ if (dump_file) ++ fprintf (dump_file, ++ "%*s...%s does not define a propagatable output\n", ++ indent, " ", GET_RTX_NAME (GET_CODE (src))); ++ return EXTELIM_ANALYSIS_RESULT_LOWBITS_AFFECTED; ++ } ++ ++ /* This leaves cond_a, meaning we need to continue down the chain ++ to see if the low bits are ultimately affected by the upper bits. */ ++ return EXTELIM_ANALYSIS_RESULT_CONTINUE_RECURSION; ++} ++ ++/* Determine the action based on the insn conditions. The truth table is ++ simplified using if statements. Insns previously marked for replace by copy ++ are identified, these will be essentially be treated as copies now and not ++ be detected as redundant for this use. */ ++static enum insn_use_results ++insn_use_analysis_result (rtx insn_insn, unsigned int regno_use, rtx * dest, ++ int indent) ++{ ++ bool treat_as_copy = false; ++ if (insn_flag_p (EXTELIM_REPLACE_COPY, INSN_UID (insn_insn))) ++ { ++ if (dump_file) ++ fprintf (dump_file, ++ "%*suse at uid=%d is marked to transform to copy\n", indent, ++ " ", INSN_UID (insn_insn)); ++ treat_as_copy = true; ++ } ++ return (insn_use_analysis_result_1 ++ (PATTERN (insn_insn), treat_as_copy, regno_use, dest, indent)); ++} ++ ++/* We have to analyze each expression action in a PARALLEL series. ++ Return the appropriate action for a series of expressions in a PARALLEL insn. ++ LOWBITS_AFFECTED stops the loop. This leaves only CONTINUE_RECURSION ++ or LOWBITS_NOT_AFFECTED. LOWBITS_NOT_AFFECTED is only returned ++ if there are no other different actions in the series (no CONTINUE_RECURSION ++ states). For each CONTINUE_RECURSION action we encounter, the destination ++ registers must be identical since we can only propagate one use (one definition ++ of dest) should CONTINUE_RECURSION be returned. */ ++ ++static enum insn_use_results ++analyze_action (enum insn_use_results cur_action, ++ enum insn_use_results prev_action, ++ rtx * dest, rtx * prev_dest) ++{ ++ enum insn_use_results return_action; ++ ++ if (cur_action == EXTELIM_ANALYSIS_RESULT_LOWBITS_AFFECTED) ++ return cur_action; ++ ++ if (cur_action == EXTELIM_ANALYSIS_RESULT_CONTINUE_RECURSION) ++ return_action = cur_action; ++ else if (prev_action == EXTELIM_ANALYSIS_RESULT_CONTINUE_RECURSION) ++ return_action = EXTELIM_ANALYSIS_RESULT_CONTINUE_RECURSION; ++ else ++ return_action = cur_action; ++ ++ if (return_action == EXTELIM_ANALYSIS_RESULT_CONTINUE_RECURSION) ++ { ++ if (*prev_dest) ++ { ++ /* All bets off if the series defines multiple outputs */ ++ if (*prev_dest != *dest) ++ return_action = EXTELIM_ANALYSIS_RESULT_LOWBITS_AFFECTED; ++ } ++ } ++ /* Set prev_dest */ ++ *prev_dest = *dest; ++ ++ return return_action; ++} ++ ++/* Helper 2 for insn_use_analysis. Return the appropriate action ++ for a series of expressions in a PARALLEL insn. */ ++ ++static enum insn_use_results ++insn_use_analysis_2 (rtx insn_use, unsigned int regno_use, rtx * dest, ++ int indent) ++{ ++ int i; ++ rtx insn = PATTERN (insn_use); ++ rtx prev_dest = NULL_RTX; ++ enum insn_use_results action; ++ enum insn_use_results return_action = ++ EXTELIM_ANALYSIS_RESULT_LOWBITS_NOT_AFFECTED; ++ ++ gcc_assert (GET_CODE (insn) == PARALLEL); ++ ++ /* We make a quick decision about call_insns here. Since the use reached ++ a call, we assume it's an outgoing parameter and thus must be extended ++ as per the ABI. */ ++ if (CALL_P (insn_use)) ++ { ++ if (dump_file) ++ fprintf (dump_file, "%*s...is a call parameter\n", indent, " "); ++ return EXTELIM_ANALYSIS_RESULT_LOWBITS_AFFECTED; ++ } ++ ++ for (i = XVECLEN (insn, 0) - 1; i >= 0; i--) ++ { ++ rtx body = XVECEXP (insn, 0, i); ++ /* Only act on the expressions containing a use of regno_use. */ ++ if (regno_use_in (regno_use, body) == NULL_RTX) ++ continue; ++ ++ /* Determine the next action */ ++ action = insn_use_analysis_result_1 (body, false /* treat as copy */ , ++ regno_use, dest, indent); ++ ++ /* Here we make a decision on the return action based on the previous actions. ++ This is done to accomodate different actions from different elements in the ++ PARALLEL series of expressions. */ ++ return_action = ++ analyze_action (action, return_action, dest, &prev_dest); ++ ++ /* The result of this expression stops the recursion, i.e. "low bits" ++ are affected by the operation. */ ++ if (return_action == EXTELIM_ANALYSIS_RESULT_LOWBITS_AFFECTED) ++ break; ++ } ++ return (return_action); ++} ++ ++/* Helper 1 for insn_use_analysis */ ++ ++static enum insn_use_results ++insn_use_analysis_1 (rtx insn_use, unsigned int regno_use, rtx * dest, ++ int indent) ++{ ++ rtx use = PATTERN (insn_use); ++ enum insn_use_results action; ++ ++ switch (GET_CODE (use)) ++ { ++ case PARALLEL: ++ action = insn_use_analysis_2 (insn_use, regno_use, dest, indent); ++ break; ++ default: ++ action = insn_use_analysis_result (insn_use, regno_use, dest, indent); ++ break; ++ } ++ ++ return action; ++} ++ ++/* Analyze the insn and determine the next course of action in the ++ use analysis loop. ++ There are several conditions to consider: ++ ++ 1. The "extended from" mode. This is an enum machine_mode value ++ that determines what is the size extended. It is derived from the ++ source of the original extension. It is the "low bits" value. ++ It is these range of bits that cannot be affected by the operation's ++ "upper bits" in order to determine whether the extend is useful or not. ++ Examples: ++ (1) set (reg:DI Y (zero_extend:DI (subreg:QI (reg:DI X))) ==> low bits = QI ++ (2) set (reg:SI Y (sign_extend:SI (reg:HI X) ==> low bits = HI ++ ++ 2. The "extend to" mode. This is the size extended to in the original ++ extension. It is the "upper bits" value. The entire extended to size may ++ be used subsequently or it may be subreg'd to a smaller or larger sizes ++ later in the propagation. ++ For example (1) above, "upper bits" is DI, and (2) "upper bits" is SI. ++ ++ 3. The code, ext_code, of the original extension, either ZERO_EXTEND or SIGN_EXTEND. ++ ++ 4. Operation code. For an insn, the actual operation code corresponding to ++ a machine instruction. For certain codes, we know that the "low bits" of the ++ result are modified by the insn because of the values in the "upper bits" of the ++ input operand. We say the operation implicitly uses the "upper bits" to modify the ++ "low bits". For other codes, the "upper bits" do not affect the output result ++ in the "low bits". ++ ++ If the operation does implicitly use the "upper bits" to modify ++ the "low bits", it is instantly a deal killer. The original extension must be ++ preserved. ++ ++ If the operation does not implicitly use "upper bits" to modify the "low bits", ++ then the action to take depends on the operation operand size relative to ++ "low bits" size. ++ ++ We only want to deal with codes that map to real instructions, ++ like ADD, SUB, MULT, LSHIFTRT, etc. Codes such as PARALLEL, etc. do not map to ++ instruction and must be dissected to extract the real instructions. ++ ++ Furthermode, for recursion to continue, the operation and operand must define ++ an output related to the input operand (the use register). This doesn't happen ++ for operations such as "mem" where the output is indirectly related to the ++ input operand. ++ ++ 5. Operation mode. The operation mode of the operation code. This sometimes impacts ++ the effect of the operation. For example MULT:SI and MULT:DI map to two different ++ machine instructions and both may have operands of SI mode. However, the MULT:SI ++ results will be oblivious to the upper bits of the DI register whereas, SI part of ++ MULT:DI result will be affected by the upper bits of the DI register. ++ ++ Several conditions determine the action to take based on the various inputs. ++ ++ The truth table inputs are A, B, and C. The truth table output is the action to take. ++ ++ A. True if the used operand mode size is greater than the extended_from ("low bits") mode size. ++ B. True if the operation implicitly uses upper bits to define the low bits ++ C. True if the operation also extends the output to upper bits size ++ D. True if the operation and input operand directly define an output operand. ++ ++ Condition A. means the upper bits are in use in the operation. The extend _may_ be needed, ++ all things being equal, so the action would be to continue recursion to the use of the ++ defined operand, i.e. return CONTINUE_RECURSION. ++ ++ Condition B. means the "low bits" are modified by the extended portion of the register ++ by virtue of the operation. For example, logical shift right, where the extended ++ portion is shifted into the "low bits". Another example, multiply, where the machine ++ uses the extended portion implicitly to calculate the results, some of which are ++ reflected in the "low bits" of the result. The extension is definitely needed in these ++ cases for this use, so return LOWBITS_AFFECTED. Recursion is stopped and analysis of ++ this extension is halted. ++ ++ Condition C. means the operation and it's operands perform the same extension as ++ the originating extension. The operation must extend to the same size _or higher_ of ++ the original extension. In this case, the original extension is truly redundant and ++ we return LOWBITS_NOT_AFFECTED for this use. ++ ++ Condtion D. means the operation and operand directly define an output operand. For most ++ arithmetic and unary operations this is true. For mem and other internal operations, ++ e.g. USE, this is false. ++ ++ Condition Action Comments ++ ================================================================== ++ A. B. C. D. ++ ------------------------------------------------------------------ ++ X X true true LOW_BITS_NOT_AFFECTED extend is redundant ++ ------------------------------------------------------------------ ++ false false false X LOW_BITS_NOT_AFFECTED used operand is smaller than "low bits" ++ ------------------------------------------------------------------ ++ false true false true LOW_BITS_AFFECTED "low bits" modified implicitly by operation ++ ------------------------------------------------------------------ ++ true false false true CONTINUE_RECURSION "low bits" _may_ be impacted by next uses ++ ------------------------------------------------------------------ ++ true true false true LOW_BITS_AFFECTED "low bits" modified implicitly by operation */ ++ ++static enum insn_use_results ++insn_use_analysis (rtx insn_use, unsigned int regno_use, rtx * dest, ++ int indent) ++{ ++ return (insn_use_analysis_1 (insn_use, regno_use, dest, indent)); ++} ++ ++/* Analyze the operation and operands of this use of a sign extension ++ target register. If the target register's upper bits do not ++ affect the result of the operation, then the sign extension is ++ useless. Returns true if the extension is needed, false ++ otherwise. */ ++ ++static bool ++analyze_ext_use (rtx insn_use, unsigned int regno_use, int indent) ++{ ++ bool ext_needed, indent_once; ++ unsigned int dest_target_regno; ++ extelim_uid_t uid; ++ rtx use = PATTERN (insn_use), dest; ++ df_ref df_use, *p_def; ++ struct df_link *link; ++ enum insn_use_results analysis_result; ++ ++ gcc_assert (use != NULL); ++ ++ uid = INSN_UID (insn_use); ++ ++ if (insn_flag_p (EXTELIM_SEEN, uid)) ++ { ++ if (dump_file) ++ fprintf (dump_file, ++ "%*suse at uid=%d is visited already\n", indent, " ", uid); ++ return false; ++ } ++ ++ /* Mark this insn as seen */ ++ insn_flag_set (EXTELIM_SEEN, uid); ++ ++ analysis_result = insn_use_analysis (insn_use, regno_use, &dest, indent); ++ switch (analysis_result) ++ { ++ /* We know conclusively that the "upper bits" of the extended ++ entity do not impact the "low bits" of the output of the operation. */ ++ case EXTELIM_ANALYSIS_RESULT_LOWBITS_NOT_AFFECTED: ++ if (dump_file) ++ fprintf (dump_file, "%*suse at uid=%d is not affected\n", indent, " ", ++ uid); ++ return false; ++ break; ++ /* We know conclusively that the "upper bits" of the extended ++ entity _do_ impact the "low bits" of the output of the operation. */ ++ case EXTELIM_ANALYSIS_RESULT_LOWBITS_AFFECTED: ++ if (dump_file) ++ fprintf (dump_file, "%*suse at uid=%d is affected\n", indent, " ", ++ uid); ++ return true; ++ break; ++ /* Continue to look at the uses of the result to determine the impact ++ of the "upper bits" */ ++ case EXTELIM_ANALYSIS_RESULT_CONTINUE_RECURSION: ++ break; ++ default: ++ gcc_unreachable (); ++ } ++ ++ /* We reach here because the action taken is CONTINUE_RECURSION. ++ Continue to look at the uses of the destination register recursively. ++ If the propagation ultimately ends where the upper bits are not significant ++ to the final output, then the extension can be removed. */ ++ if (!REG_P (dest)) ++ { ++ if (dump_file) ++ fprintf (dump_file, ++ "%*sdest of uid=%d (SET) is not a register\n", indent, " ", ++ uid); ++ return true; ++ } ++ ++ dest_target_regno = REGNO (dest); ++ ++ /* What this insn defines */ ++ p_def = DF_INSN_UID_DEFS (uid); ++ ++ /* Ref must be valid and there must be only one definition and it must be the ++ destination */ ++ if ((*p_def == NULL) || (*(p_def + 1) != NULL)) ++ return true; ++ ++ gcc_assert (DF_REF_REGNO (*p_def) == dest_target_regno); ++ ++ ext_needed = true; ++ indent_once = true; ++ for (link = DF_REF_CHAIN (*p_def); link; link = link->next) ++ { ++ rtx insn_use, use_exp; ++ df_use = link->ref; ++ if (!df_use) ++ continue; ++ /* Link must be a USE of the DEF */ ++ if (!DF_REF_REG_USE_P (df_use)) ++ continue; ++ /* Ignore ARTIFICIAL USES */ ++ if (DF_REF_IS_ARTIFICIAL (df_use)) ++ continue; ++ insn_use = DF_REF_INSN (df_use); ++ /* Don't consider debug_insns */ ++ if (!NONDEBUG_INSN_P (insn_use)) ++ continue; ++ use_exp = DF_REF_REG (df_use); ++ ++ if (exp_needs_update_p (use_exp)) ++ { ++ if (dump_file) ++ fprintf (dump_file, ++ "%*ssaved reg=%d expression for update\n", indent, " ", DF_REF_REGNO (df_use)); ++ save_ext_update (current_ext_record, use_exp); ++ } ++ ++ if (dump_file) ++ fprintf (dump_file, ++ "%*suse at uid=%d of reg=%d\n", indent, " ", ++ INSN_UID (insn_use), DF_REF_REGNO (df_use)); ++ /* Set indent for dump formatting */ ++ if (indent_once) ++ { ++ ++indent; ++ indent_once = false; ++ } ++ ext_needed = analyze_ext_use (insn_use, DF_REF_REGNO (df_use), indent); ++ if (ext_needed) ++ break; ++ } ++ ++ if (dump_file) ++ fprintf (dump_file, ++ "%*sext %s needed\n", indent, " ", ext_needed ? "" : "not"); ++ ++ return ext_needed; ++} ++ ++/* Set a flag on an insn indicating that it is ++ marked for replacement by a copy insn or for ++ deletion. */ ++ ++static void ++mark_replace_with_copy (rtx ext) ++{ ++ extelim_uid_t uid = INSN_UID (ext); ++ insn_flag_set (EXTELIM_REPLACE_COPY, uid); ++} ++ ++/* Get the mode that we are sign/zero extending from */ ++ ++static enum machine_mode ++get_ext_from_mode (rtx src) ++{ ++ rtx regexp; ++ gcc_assert (GET_CODE (src) == ZERO_EXTEND || GET_CODE (src) == SIGN_EXTEND); ++ ++ /* The SUBREG or REG mode of the extend operand */ ++ regexp = XEXP (src, 0); ++ return (GET_MODE (regexp)); ++} ++ ++/* Perform the action on the expression. Return true ++ if any action performed, false otherwise. */ ++ ++static bool ++process_ext_update (rtx exp) ++{ ++ /* Reset SUBREG_PROMOTED state to false */ ++ if (GET_CODE (exp) == SUBREG ++ && SUBREG_PROMOTED_VAR_P (exp)) ++ { ++ SUBREG_PROMOTED_VAR_P (exp) = 0; ++ return true; ++ } ++ ++ return false; ++} ++ ++/* Process the current extension record, looking at all the ++ the expressions that need to be updated because this ++ extension will be replaced by a copy. */ ++ ++static void ++process_ext_updates (ext_record_t extrec) ++{ ++ unsigned i; ++ rtx exp; ++ bool updated=false; ++ ++ ++ FOR_EACH_VEC_ELT (rtx, extrec->ext_updates, i, exp) ++ { ++ updated |= process_ext_update (exp); ++ } ++ ++ if (dump_file && updated) ++ fprintf (dump_file, " updates processed for extension at uid=%d\n", ++ INSN_UID (extrec->ext)); ++} ++ ++/* Try to eliminate the sign extension by examining the ++ definitions of the extension source and the uses ++ of the extension destination. */ ++ ++static void ++eliminate_one_extend (rtx ext) ++{ ++ rtx src, dest, regexp; ++ df_ref df_use, df_def, *ext_use, *ext_def; ++ unsigned int ext_dest_regno, ext_src_regno, def_use_count = 1; ++ bool ext_needed = true; ++ extelim_uid_t uid = INSN_UID (ext); ++ struct df_link *link; ++ const char *inserted = ++ insn_flag_p (EXTELIM_INSERTED, uid) ? "inserted" : ""; ++ ++ /* Reset desired per insn flags for each extension analyzed */ ++ reinit_insn_flags (EXTELIM_SEEN); ++ ++ gcc_assert (GET_CODE (PATTERN (ext)) == SET); ++ src = SET_SRC (PATTERN (ext)); ++ dest = SET_DEST (PATTERN (ext)); ++ ++ /* Save the basic information about the extension in a file global */ ++ ext_to_mode = GET_MODE (dest); ++ ext_from_mode = get_ext_from_mode (src); ++ ext_code = GET_CODE (src); ++ ++ /* Also mark this original extension as "SEEN" so we don't recurse into it. */ ++ insn_flag_set (EXTELIM_SEEN, INSN_UID (ext)); ++ ++ /* Find the target of the extension */ ++ if (!REG_P (dest)) ++ return; ++ ext_dest_regno = REGNO (dest); ++ ++ /* Find the source of the extension: set (REG:MODE (sign_extend (REG|SUBREG:MODE ... */ ++ if ((regexp = register_exp (XEXP (src, 0))) == NULL) ++ return; ++ ext_src_regno = REGNO (regexp); ++ ++ /* Iterate through the reaching definitions of the source of the extension ++ recursively. If the source if already sign extended, mark the ++ extension for replacement with a copy or deletion (deletion if it was ++ inserted in the duplication pass). */ ++ ext_use = DF_INSN_UID_USES (uid); ++ /* There is only one use in a sign/zero extension insn and it must be the ++ source register */ ++ gcc_assert (*(ext_use + 1) == NULL); ++ gcc_assert (DF_REF_REGNO (*ext_use) == ext_src_regno); ++ ++ /* Now look at all the reaching definitions of this use */ ++ for (link = DF_REF_CHAIN (*ext_use); link; link = link->next) ++ { ++ rtx insn_def; ++ df_def = link->ref; ++ if (!df_def) ++ continue; ++ /* Link must be to a definition of the use */ ++ if (!DF_REF_REG_DEF_P (df_def)) ++ continue; ++ /* Ignore ARTIFICIAL defs */ ++ if (DF_REF_IS_ARTIFICIAL (df_def)) ++ continue; ++ insn_def = DF_REF_INSN (df_def); ++ /* Don't consider debug_insns */ ++ if (!NONDEBUG_INSN_P (insn_def)) ++ continue; ++ if (dump_file) ++ fprintf (dump_file, ++ " analyze def #%d of reg=%d at uid=%u\n", ++ def_use_count, DF_REF_REGNO (*ext_use), INSN_UID (insn_def)); ++ ext_needed = analyze_ext_def (insn_def, DF_REF_REGNO (*ext_use), 2); ++ if (ext_needed) ++ break; ++ def_use_count++; ++ } ++ ++ /* Try the def-use chains if the extension wasn't marked by the ++ previous pass. */ ++ if (ext_needed) ++ { ++ /* Defs of the sign extension */ ++ ext_def = DF_INSN_UID_DEFS (uid); ++ /* There is only one def in a sign extension insn and it must be the ++ destination */ ++ gcc_assert (*(ext_def + 1) == NULL); ++ gcc_assert (DF_REF_REGNO (*ext_def) == ext_dest_regno); ++ ++ /* Counter for debug dump */ ++ def_use_count = 1; ++ /* Reset desired per insn flags for each extension analyzed */ ++ reinit_insn_flags (EXTELIM_SEEN); ++ /* Also mark this original extension as "SEEN" so we don't recurse into it. */ ++ insn_flag_set (EXTELIM_SEEN, INSN_UID (ext)); ++ ++ /* Iterate over the reached uses of extension destination register recursively. ++ If the destination register's upper bits are ultimately not ++ relevant, the extension can be marked for replacement with a ++ copy. */ ++ for (link = DF_REF_CHAIN (*ext_def); link; link = link->next) ++ { ++ rtx insn_use, use_exp; ++ df_use = link->ref; ++ if (!df_use) ++ continue; ++ /* Link must be a USE of the DEF */ ++ if (!DF_REF_REG_USE_P (df_use)) ++ continue; ++ /* Ignore ARTIFICIAL USES */ ++ if (DF_REF_IS_ARTIFICIAL (df_use)) ++ continue; ++ insn_use = DF_REF_INSN (df_use); ++ /* Don't consider debug_insns */ ++ if (!NONDEBUG_INSN_P (insn_use)) ++ continue; ++ use_exp = DF_REF_REG (df_use); ++ ++ if (exp_needs_update_p (use_exp)) ++ { ++ if (dump_file) ++ fprintf (dump_file, ++ " saved reg=%d expression for update\n", DF_REF_REGNO (df_use)); ++ save_ext_update (current_ext_record, use_exp); ++ } ++ ++ if (dump_file) ++ fprintf (dump_file, ++ " analyze use #%d at uid=%u of reg=%d\n", ++ def_use_count, INSN_UID (insn_use), ++ DF_REF_REGNO (*ext_def)); ++ ext_needed = analyze_ext_use (insn_use, DF_REF_REGNO (*ext_def), 2); ++ if (ext_needed) ++ break; ++ def_use_count++; ++ } ++ } ++ ++ /* The extension is not needed. The rtl for the extension is marked ++ for replace by copy. */ ++ if (!ext_needed) ++ { ++ process_ext_updates (current_ext_record); ++ ++ if (dump_file) ++ fprintf (dump_file, ++ ":) mark %s extension insn uid=%d for copy replacement\n", ++ inserted, INSN_UID (ext)); ++ mark_replace_with_copy (ext); ++ num_cand_transformed++; ++ } ++ else ++ { ++ if (dump_file) ++ fprintf (dump_file, ++ ":( %s extension insn uid=%d is needed\n", inserted, ++ INSN_UID (ext)); ++ } ++} ++ ++/* Replace the sign extension with a copy instruction ++ ++ example 1: ++ from: ++ dest src ++ (set (reg:DI destreg) (sign_extend:DI (reg:SI srcreg))) ++ to: ++ (clobber (reg:DI destreg)) ++ (set (subreg:SI (reg:DI destreg) 4) (reg:SI srcreg)) ++ ++ or ++ ++ example 2: ++ from: ++ dest src ++ (set (reg:DI destreg) (sign_extend:DI (subreg:SI (reg:DI srcreg) 4))) ++ to: ++ (clobber (reg:DI destreg)) ++ (set (subreg:SI (reg:DI destreg) 4) (subreg:SI (reg:DI srcreg) 4)) ++ ++ or ++ ++ example 3: ++ from: ++ dest src ++ (set (reg:SI destreg) (sign_extend:SI (subreg:HI (reg:SI srcreg) 2))) ++ to: ++ (clobber (reg:SI destreg)) ++ (set (subreg:HI (reg:SI destreg) 2) (subreg:HI (reg:SI srcreg) 2)) */ ++ ++static void ++replace_with_copy (rtx ext) ++{ ++ rtx extension = PATTERN (ext); ++ rtx ext_op, src, dest, insns, cp_dest, cp_src; ++ enum machine_mode inner_mode; ++ gcc_assert (GET_CODE (extension) == SET); ++ ++ dest = SET_DEST (extension); ++ src = SET_SRC (extension); ++ ++ /* The sign extension operand */ ++ ext_op = XEXP (src, 0); ++ /* Get the inner mode */ ++ inner_mode = GET_MODE (ext_op); ++ gcc_assert (inner_mode == SImode || inner_mode == HImode ++ || inner_mode == QImode); ++ ++ /* Make dest a SUBREG:mm */ ++ cp_dest = gen_lowpart_SUBREG (inner_mode, dest); ++ ++ /* Copy src is the sign extension target register */ ++ cp_src = ext_op; ++ ++ /* ??? clobber is needed for rtl consistency, don't know why */ ++ start_sequence (); ++ emit_clobber (dest); ++ emit_move_insn (cp_dest, cp_src); ++ insns = get_insns (); ++ end_sequence (); ++ emit_insn_before (insns, ext); ++ ++ delete_insn (ext); ++} ++ ++/* Iterate through extensions, replace those extensions ++ that are marked as so with a copy insn. */ ++ ++static void ++replace_ext_with_copy (void) ++{ ++ ext_record_t extrec; ++ unsigned i; ++ ++ FOR_EACH_VEC_ELT (ext_record_t, extensions, i, extrec) ++ { ++ const char *inserted = insn_flag_p (EXTELIM_INSERTED, ++ INSN_UID (extrec-> ++ ext)) ? "inserted" : ""; ++ if (insn_flag_p (EXTELIM_REPLACE_COPY, INSN_UID (extrec->ext))) ++ { ++ if (dump_file) ++ fprintf (dump_file, ++ " replace %s extension uid=%d with a copy\n", inserted, ++ INSN_UID (extrec->ext)); ++ replace_with_copy (extrec->ext); ++ } ++ } ++} ++ ++ ++/* Copy the RTX flags from old to new */ ++ ++static void ++copy_flags (rtx oldrtx, rtx newrtx) ++{ ++ if (RTX_FLAG (oldrtx, in_struct)) ++ RTX_FLAG (newrtx, in_struct) = true; ++ ++ if (RTX_FLAG (oldrtx, volatil)) ++ RTX_FLAG (newrtx, volatil) = true; ++ ++ if (RTX_FLAG (oldrtx, unchanging)) ++ RTX_FLAG (newrtx, unchanging) = true; ++ ++ if (RTX_FLAG (oldrtx, frame_related)) ++ RTX_FLAG (newrtx, frame_related) = true; ++ ++ if (RTX_FLAG (oldrtx, jump)) ++ RTX_FLAG (newrtx, jump) = true; ++ ++ if (RTX_FLAG (oldrtx, call)) ++ RTX_FLAG (newrtx, call) = true; ++ ++ if (RTX_FLAG (oldrtx, return_val)) ++ RTX_FLAG (newrtx, return_val) = true; ++} ++ ++/* Iterate through the insn notes looking for 'kind'. If ++ found replace the register rtx with the new rtx. */ ++ ++static void ++update_notes (enum reg_note kind, rtx insn, rtx reg, rtx new_reg) ++{ ++ rtx link; ++ for (link = REG_NOTES (insn); link; link = XEXP (link, 1)) ++ if (REG_NOTE_KIND (link) == kind) ++ { ++ rtx op0 = XEXP (link, 0); ++ if (kind == REG_DEAD) ++ if (REG_P (op0) && op0 == reg) ++ XEXP (link, 0) = new_reg; ++ } ++} ++ ++ ++ ++#if EXTELIM_DUPLICATE_EXTS_AT_USES ++/* Insert a duplicate sign extension at the use point. ++ Add a flag indicating this extension is algorithmically ++ added. Since the "inserted" extensions have the form ++ regX = sign_extend (subreg:mm (reg:MM regX), offset), ++ they can simply be deleted if they are redundant since we ++ are at a reaching use of the original definition. We also ++ mark the use insn where the insert occurs so we don't insert ++ the same extension from another def at this use. */ ++ ++static void ++insert_duplicate_ext_at_use (rtx ext_insn, rtx use_insn) ++{ ++ rtx ext = PATTERN (ext_insn), ext_src, ext_dest; ++ rtx new_ext_src_inner, new_ext_src_outer, new_ext_part; ++ rtx new_ext_dest, new_ext_insn; ++ extelim_uid_t new_uid; ++ df_ref *p_df_uses; ++ unsigned int ext_dest_regno; ++ enum machine_mode inner_mode; ++ bool sign_extend_p = ++ GET_CODE (SET_SRC (PATTERN (ext_insn))) == SIGN_EXTEND ? true : false; ++ ++ /* This new extension must be of the form: ++ set (reg:MM X (sign_extend:MM (subreg:mm (reg:MM X)))) ++ where mm is smaller than MM. */ ++ ext_dest = SET_DEST (ext); ++ ext_src = SET_SRC (ext); ++ ++ gcc_assert (REG_P (register_exp (ext_dest))); ++ ++ /* A copy of the extend destination register to a new virtual register */ ++ new_ext_dest = gen_reg_rtx (GET_MODE (ext_dest)); ++ /* A copy of the extend source (same reg as dest), REG_P */ ++ new_ext_src_inner = copy_rtx (ext_dest); ++ /* Get inner mode, either mm for SUBREG:mm (REG:MM) or MM for (REG:MM) */ ++ if (GET_CODE (XEXP (ext_src, 0)) == SUBREG) ++ inner_mode = GET_MODE (XEXP (ext_src, 0)); ++ else if (REG_P (XEXP (ext_src, 0))) ++ inner_mode = GET_MODE (XEXP (ext_src, 0)); ++ else ++ /* Can't determine sign_extend operand */ ++ gcc_unreachable (); ++ ++ /* Make a subreg rtx */ ++ new_ext_src_outer = gen_lowpart_SUBREG (inner_mode, new_ext_src_inner); ++ /* Make a sign/zero extend insn */ ++ new_ext_part = sign_extend_p ++ ? gen_rtx_SIGN_EXTEND (GET_MODE (ext_dest), new_ext_src_outer) ++ : gen_rtx_ZERO_EXTEND (GET_MODE (ext_dest), new_ext_src_outer); ++ /* (set (new:MM (sign_extend:MM (subreg:mm (reg:MM ext_dest))))) */ ++ new_ext_insn = gen_rtx_SET (VOIDmode, new_ext_dest, new_ext_part); ++ ++ /* Now update the use */ ++ /* Operands used by this the use_insn */ ++ ext_dest_regno = REGNO (register_exp (ext_dest)); ++ for (p_df_uses = DF_INSN_UID_USES (INSN_UID (use_insn)); *p_df_uses; ++ p_df_uses++) ++ { ++ if (DF_REF_REGNO (*p_df_uses) == ext_dest_regno) ++ { ++ rtx use_reg = DF_REF_REG (*p_df_uses); ++ ++ /* Replace the register use in use_insn with the new register. If the use ++ is a subreg pattern, replace the innermost reg. */ ++ replace_rtx (PATTERN (use_insn), register_exp (use_reg), ++ new_ext_dest); ++ /* Update flags on new dest reg */ ++ copy_flags (register_exp (use_reg), new_ext_dest); ++ /* Update any notes associated with use reg and use_insn */ ++ update_notes (REG_DEAD, use_insn, register_exp (use_reg), new_ext_dest); ++ /* DF info must be updated since existing insn is changed */ ++ df_insn_rescan (use_insn); ++ } ++ } ++ ++ new_uid = extelim_emit_before (new_ext_insn, use_insn); ++ insn_flag_set (EXTELIM_INSERTED, new_uid); ++} ++ ++/* Allow the duplication of the extension even if the extension ++ and the duplication use are in the same block. */ ++ ++static bool ++allow_same_block_duplication_p (rtx ext_insn, rtx use_insn) ++{ ++ rtx ext = PATTERN (ext_insn); ++ rtx use = PATTERN (use_insn); ++ ++ if (GET_CODE (SET_SRC (use)) == ASHIFT && GET_CODE (SET_SRC (ext)) == ZERO_EXTEND) ++ return true; ++ return false; ++} ++ ++/* Determine if the extension should be duplicated at this use point. ++ Return true if yes, false otherwise. */ ++ ++static bool ++save_ext_use_p (ext_record_t extrec, rtx use_insn) ++{ ++ rtx ext_insn, ext, ext_dest, use = PATTERN (use_insn), use_src; ++ df_ref df_use; ++ ++ ext_insn = extrec->ext; ++ ext = PATTERN (ext_insn); ++ ext_dest = SET_DEST (ext); ++ ++ if (GET_CODE (use) != SET) ++ { ++ if (dump_file) ++ fprintf (dump_file, " no -- use is not a SET code\n"); ++ return false; ++ } ++ ++ /* Check for obviousness */ ++ /* 1. The use is only reached by the a single definition of the extension. ++ Otherwise, it wouldn't be legal to insert a duplicate extension ++ as other defs reaching this use may not need it. Certainly not all ++ other defs may reach here, but this is the conservative approximation. ++ Found in nof/muldf3.c */ ++ df_use = df_find_use (use_insn, ext_dest); ++ if ( df_use && DF_REF_CHAIN (df_use)->next) ++ { ++ if (dump_file) ++ fprintf (dump_file, ++ " no -- there are multiple definitions of reg=%d reaching this use\n", ++ (REGNO (register_exp (ext_dest)))); ++ return false; ++ } ++ ++ /* 2. The extension and use are in the same block. Since ++ this is a reached use, it's obvious we don't need another ++ extension. The exception is this -- we are trying to set ++ up a specific extension,insn pattern that will be recognized ++ by the insn selector. This pattern will also be ignored when ++ the next extension candidate list is created in the next pass. */ ++ if (INSN_P (ext_insn) && INSN_P (use_insn)) ++ { ++ if (BLOCK_FOR_INSN (ext_insn) == BLOCK_FOR_INSN (use_insn)) ++ { ++ if (allow_same_block_duplication_p (ext_insn, use_insn)) ++ ; ++ else ++ { ++ if (dump_file) ++ fprintf (dump_file, ++ " no -- ext and use are in the same block\n"); ++ return false; ++ } ++ } ++ } ++ ++ /* 3. The use is a sign extension of the extension destination reg */ ++ use_src = SET_SRC (use); ++ if (GET_CODE (use_src) == SIGN_EXTEND ++ && REG_P (register_exp (XEXP (use_src, 0))) ++ && REG_P (register_exp (ext_dest))) ++ if (GET_MODE (use_src) == GET_MODE (ext_dest) ++ && REGNO (register_exp (XEXP (use_src, 0))) == ++ REGNO (register_exp (ext_dest))) ++ { ++ if (dump_file) ++ fprintf (dump_file, ++ " no -- the use is a sign extension of reg=%d\n", ++ REGNO (register_exp (XEXP (use_src, 0)))); ++ return false; ++ } ++ ++ /* 4. The use already has an extension inserted and one of the use's operands ++ is a register matching the reaching definition. So don't reinsert the same ++ extension. */ ++ if (insn_flag_p (EXTELIM_INSERTED_FOR, INSN_UID (use_insn))) ++ { ++ df_ref *p_df_uses; ++ /* Operands used by this the use_insn */ ++ for (p_df_uses = DF_INSN_UID_USES (INSN_UID (use_insn)); *p_df_uses; ++ p_df_uses++) ++ { ++ if (REG_P (register_exp (ext_dest)) && ++ DF_REF_REGNO (*p_df_uses) == REGNO (register_exp (ext_dest))) ++ { ++ if (dump_file) ++ fprintf (dump_file, ++ " no -- this use is marked for sign extension insertion already\n"); ++ return false; ++ } ++ } ++ } ++ ++ /* 5. There is also a definition of the ext dest register at this use (as can occur in self assignment). */ ++ if (register_exp (SET_DEST (use)) && REG_P (ext_dest) ++ && REGNO (register_exp (SET_DEST (use))) == REGNO (ext_dest)) ++ { ++ if (dump_file) ++ fprintf (dump_file, ++ " no -- this use also assigns the used register\n"); ++ return false; ++ } ++ ++ ++ if (dump_file) ++ fprintf (dump_file, " yes\n"); ++ return true; ++} ++ ++/* Save the use insn in the extension records list of ++ uses. At the next phase, we will duplicate the extension ++ at these use points. */ ++ ++static void ++save_ext_use (ext_record_t extrec, rtx use_insn) ++{ ++ /* Mark the use insn, it will have a duplicate inserted */ ++ insn_flag_set (EXTELIM_INSERTED_FOR, INSN_UID (use_insn)); ++ /* Save use to the list of uses to be duplicated for this extension. */ ++ VEC_safe_push (rtx, heap, extrec->ext_uses, use_insn); ++} ++ ++ ++/* Save the qualified use of an extension to a list */ ++ ++static void ++gather_ext_uses_info (ext_record_t extrec) ++{ ++ rtx ext; ++ df_ref *ext_def, df_use; ++ unsigned int def_use_count = 1; ++ extelim_uid_t uid; ++ struct df_link *link; ++ ++ gcc_assert (extrec != NULL); ++ ext = extrec->ext; ++ uid = INSN_UID (ext); ++ ++ /* Insn level defs of the sign extension */ ++ ext_def = DF_INSN_UID_DEFS (uid); ++ /* There is only one def in a sign extension insn */ ++ gcc_assert (*(ext_def + 1) == NULL); ++ ++ /* Iterate over the reached uses of extension destination register. ++ Duplicate the extension at the use point. */ ++ for (link = DF_REF_CHAIN (*ext_def); link; link = link->next) ++ { ++ rtx insn_use; ++ df_use = link->ref; ++ if (!df_use) ++ continue; ++ /* Link must be a USE of the DEF */ ++ if (!DF_REF_REG_USE_P (df_use)) ++ continue; ++ /* Ignore ARTIFICIAL USES */ ++ if (DF_REF_IS_ARTIFICIAL (df_use)) ++ continue; ++ insn_use = DF_REF_INSN (df_use); ++ ++ /* Don't consider debug_insns */ ++ if (!NONDEBUG_INSN_P (insn_use)) ++ continue; ++ ++ if (dump_file) ++ fprintf (dump_file, ++ " use #%d duplicate ext of reg=%d at uid=%u?\n", ++ def_use_count, DF_REF_REGNO (*ext_def), INSN_UID (insn_use)); ++ if (save_ext_use_p (extrec, insn_use)) ++ save_ext_use (extrec, insn_use); ++ def_use_count++; ++ } ++} ++ ++/* At each use point of the sign extension, unless the ++ use is obviously already sign extended, insert a ++ sign extension insn before the use. We do this in two ++ passes to avoid confusing the dataflow information. */ ++ ++static void ++duplicate_exts_at_uses (void) ++{ ++ unsigned i, j; ++ ext_record_t extrec; ++ rtx use_insn; ++ ++ /* Get the uses where the extensions will be duplicated */ ++ FOR_EACH_VEC_ELT (ext_record_t, extensions, i, extrec) ++ { ++ if (dump_file) ++ fprintf (dump_file, "gathering extension uid=%u use information\n", ++ INSN_UID (extrec->ext)); ++ gather_ext_uses_info (extrec); ++ } ++ ++ /* Now duplicate the extensions at the appropriate use points */ ++ FOR_EACH_VEC_ELT (ext_record_t, extensions, i, extrec) ++ { ++ if (dump_file) ++ fprintf (dump_file, "extension uid=%u\n", INSN_UID (extrec->ext)); ++ ++ FOR_EACH_VEC_ELT (rtx, extrec->ext_uses, j, use_insn) ++ { ++ if (dump_file) ++ fprintf (dump_file, " duplicated at use uid=%u\n", ++ INSN_UID (use_insn)); ++ insert_duplicate_ext_at_use (extrec->ext, use_insn); ++ } ++ } ++} ++#endif /* EXTELIM_DUPLICATE_EXTS_AT_USES */ ++ ++/* Determine if an instruction is a return insn */ ++ ++static rtx ++return_p (rtx rtn_insn) ++{ ++ rtx rtn = PATTERN (rtn_insn), dest; ++ int i; ++ ++ if (GET_CODE (rtn) != SET) ++ return false; ++ ++ dest = SET_DEST (rtn); ++ ++ /* Is a return value? */ ++ if ((REG_P (dest) || GET_CODE (dest) == PARALLEL) && ++ REG_FUNCTION_VALUE_P (dest)) ++ { ++ /* Simple SET, return the insn */ ++ if (REG_P (dest)) ++ return rtn_insn; ++ /* PARALLEL, find the embedded rtx */ ++ if (GET_CODE (dest) == PARALLEL) ++ for (i = XVECLEN (rtn_insn, 0) - 1; i >= 0; i--) ++ { ++ rtx body = XVECEXP (rtn_insn, 0, i); ++ if (GET_CODE (body) == SET) ++ { ++ dest = SET_DEST (body); ++ if (REG_FUNCTION_VALUE_P (dest)) ++ return body; ++ } ++ } ++ } ++ /* Not a return */ ++ return NULL; ++} ++ ++/* Find all return RTLs in the function and save them in ++ a list. */ ++ ++static bool ++find_returns (void) ++{ ++ basic_block bb; ++ rtx insn, rtn_insn; ++ bool found = false; ++ ++ /* For all insns */ ++ FOR_EACH_BB (bb) ++ { ++ FOR_BB_INSNS (bb, insn) ++ { ++ if (!NONDEBUG_INSN_P (insn)) ++ continue; ++ ++ if ((rtn_insn = return_p (insn)) == NULL) ++ { ++ continue; ++ } ++ if (dump_file) ++ fprintf (dump_file, " found return at uid=%u\n", INSN_UID (rtn_insn)); ++ ++ VEC_safe_push (rtx, heap, returns, rtn_insn); ++ found = true; ++ } ++ } ++ ++ return (found); ++} ++ ++/* Get the signedness and machine mode of the function */ ++ ++static bool ++get_return_info (bool * signed_p, enum machine_mode *return_mode) ++{ ++ tree rtninfo; ++ ++ if ((rtninfo = DECL_RESULT (current_function_decl)) != NULL) ++ { ++ *signed_p = !TYPE_UNSIGNED (TREE_TYPE (rtninfo)); ++ *return_mode = DECL_MODE (rtninfo); ++ return true; ++ } ++ return false; ++} ++ ++/* If the dest mode of the return is larger than ++ the function return mode, we can subreg the return ++ insn to the return mode and extend to the destination. ++ E.g. unsigned, return mode: HImode ++ set (reg/i:DI Y) (reg:DI X) ++ becomes ++ set (reg:DI new) (zero_extend:DI (subreg:HI (reg:DI X))) ++ set (reg/i:DI Y) (reg:DI new) */ ++ ++static void ++make_ext_at_rtn (rtx rtn_insn, bool fun_signed_p, enum machine_mode fun_mode) ++{ ++ rtx rtn = PATTERN (rtn_insn); ++ rtx dest, src, new_ext_dest, new_ext_src, new_ext_outer, new_ext_part, ++ new_ext_insn; ++ extelim_uid_t new_uid; ++ gcc_assert (GET_CODE (rtn) == SET); ++ ++ dest = SET_DEST (rtn); ++ src = SET_SRC (rtn); ++ ++ /* Deal with scalar rtn values only */ ++ if (fun_mode != DImode ++ && fun_mode != SImode && fun_mode != HImode && fun_mode != QImode) ++ { ++ if (dump_file) ++ fprintf (dump_file, "failed-- not scalar return mode\n"); ++ return; ++ } ++ ++ /* Dest and src have to have the same mode. This should always be ++ true for well formed rtl, but we check anyway. */ ++ if (GET_MODE (dest) != GET_MODE (src)) ++ { ++ if (dump_file) ++ fprintf (dump_file, "failed-- dest and src modes differ\n"); ++ return; ++ } ++ ++ /* Also check that we are dealing with simple regs here. */ ++ if (!REG_P (dest) || !REG_P (src)) ++ { ++ if (dump_file) ++ fprintf (dump_file, "failed-- dest or src is not REG_P\n"); ++ return; ++ } ++ ++ /* The return reg mode should never be smaller than fun return mode. If the ++ same size, however, we can't subreg either, so return */ ++ if (GET_MODE_BITSIZE (GET_MODE (dest)) <= GET_MODE_BITSIZE (fun_mode)) ++ { ++ if (dump_file) ++ fprintf (dump_file, ++ "failed-- dest size mode is smaller or equal to function mode size\n"); ++ return; ++ } ++ ++ /* From here we should be able to build a subreg since the function return mode ++ size is smaller than the return register mode size */ ++ new_ext_dest = gen_reg_rtx (GET_MODE (src)); /* set (reg:MM new) */ ++ new_ext_src = copy_rtx (src); /* copy of X, copyX */ ++ new_ext_outer = gen_lowpart_SUBREG (fun_mode, new_ext_src); /* subreg:mm (reg:MM copyX) */ ++ new_ext_part = fun_signed_p /* extend:MM (subreg:mm (reg:MM copyX)) */ ++ ? gen_rtx_SIGN_EXTEND (GET_MODE (src), new_ext_outer) ++ : gen_rtx_ZERO_EXTEND (GET_MODE (src), new_ext_outer); ++ /* Put it together */ ++ new_ext_insn = gen_rtx_SET (VOIDmode, new_ext_dest, new_ext_part); ++ ++ /* Modify src of return insn to use new pseudo */ ++ replace_rtx (PATTERN (rtn_insn), src, new_ext_dest); ++ /* Update flags on new dest reg */ ++ copy_flags (src, new_ext_dest); ++ /* Update any notes associated with replaced register */ ++ update_notes (REG_DEAD, rtn_insn, src, new_ext_dest); ++ /* Rescan the modified insn */ ++ df_insn_rescan (rtn_insn); ++ /* Insert the new insn */ ++ new_uid = extelim_emit_before (new_ext_insn, rtn_insn); ++ ++ if (dump_file) ++ fprintf (dump_file, "success\n"); ++} ++ ++/* Insert extensions at return points. Scan the RTL ++ for the return statements. Determine if the RTL ++ can be modified to insert an extension. Modify the ++ return to insert the extension. */ ++ ++static void ++insert_ext_at_returns (void) ++{ ++ bool signed_p; ++ enum machine_mode return_mode; ++ rtx rtn_insn; ++ int i; ++ ++ /* Generate list of return rtls for the function */ ++ if (dump_file) ++ fprintf (dump_file, "gathering return insns...\n"); ++ ++ if (!find_returns ()) ++ return; ++ ++ if (!get_return_info (&signed_p, &return_mode)) ++ return; ++ ++ /* For each return instruction, generate a sign/zero extend ++ if the current return size is larger than the function ++ return mode. */ ++ FOR_EACH_VEC_ELT (rtx, returns, i, rtn_insn) ++ { ++ if (dump_file) ++ fprintf (dump_file, " making extension at return uid=%u...", ++ INSN_UID (rtn_insn)); ++ make_ext_at_rtn (rtn_insn, signed_p, return_mode); ++ } ++} ++ ++/* Compare two extension records by loop depth. ++ Used by VEC_qsort to sort the order in which extensions ++ are processed. */ ++ ++static int ++ext_record_compare (const void *p_er1, const void *p_er2) ++{ ++ const ext_record_t er1 = *(const ext_record_t *) p_er1; ++ const ext_record_t er2 = *(const ext_record_t *) p_er2; ++ basic_block bb1, bb2; ++ rtx ext1, ext2; ++ ++ if (er1 == er2) ++ return 0; ++ ++ ext1 = er1->ext; ++ ext2 = er2->ext; ++ ++ bb1 = BLOCK_FOR_INSN (ext1); ++ bb2 = BLOCK_FOR_INSN (ext2); ++ ++ /* Sort high to low */ ++ return (bb2->loop_depth - bb1->loop_depth); ++} ++ ++/* The main interface to this optimization. */ ++ ++static void ++extension_elimination (void) ++{ ++ ext_record_t ext; ++ unsigned i; ++ ++ init_pass (); ++ ++ /* Find initial sign extension candidates */ ++ if (!find_extensions ()) ++ { ++ finish_pass (); ++ return; ++ } ++ ++ /* Insert sign extension at return points in ++ the function. */ ++ insert_ext_at_returns (); ++ ++ /* Duplicate the sign extensions at their use ++ points unless the use is already obviously sign ++ extended or extension is already added. */ ++#if EXTELIM_DUPLICATE_EXTS_AT_USES ++ duplicate_exts_at_uses (); ++#endif ++ ++ /* Update DF information since now have new insns. */ ++ df_finish_pass (true); ++ df_chain_add_problem (DF_DU_CHAIN + DF_UD_CHAIN); ++ df_analyze (); ++ ++#if EXTELIM_DF_DUMP ++ if (dump_file) ++ df_dump (dump_file); ++#endif ++ ++ /* Init statistics */ ++ num_cand = 0; ++ num_cand_ignored = 0; ++ num_cand_transformed = 0; ++ ++ /* Free old extensions list, generate new one that includes ++ the new extensions. */ ++ free_extensions (); ++ ++ if (!find_extensions ()) ++ { ++ finish_pass (); ++ return; ++ } ++ ++ if (dump_file) ++ { ++ fprintf (dump_file, "\nRTL After Extension Duplication\n"); ++ print_rtl (dump_file, get_insns ()); ++ } ++ ++ if (dump_file) ++ fprintf (dump_file, "Begin extension elimination analysis\n"); ++ ++ /* Sort the extensions by loop depth. We want to try to eliminate ++ those in innermost loops (highest loop depth) first. */ ++ VEC_qsort (ext_record_t, extensions, ext_record_compare); ++ ++ /* Iterate through extension worklist */ ++ FOR_EACH_VEC_ELT (ext_record_t, extensions, i, ext) ++ { ++ rtx ext_insn = ext->ext; ++ rtx ext_src = SET_SRC (PATTERN (ext_insn)); ++ const char *ext_name = ++ GET_CODE (ext_src) == SIGN_EXTEND ? "sign" : "zero"; ++ const char *inserted = ++ insn_flag_p (EXTELIM_INSERTED, INSN_UID (ext_insn)) ? "inserted" : ""; ++ extelim_uid_t uid = INSN_UID (ext_insn); ++ ++ if (dump_file) ++ fprintf (dump_file, ++ " (loop_depth=%d)\n", ++ inserted, ext_name, uid, ++ BLOCK_FOR_INSN (ext_insn)->loop_depth); ++ ++ current_ext_record = ext; ++ eliminate_one_extend (ext->ext); ++ } ++ ++ if (dump_file) ++ fprintf (dump_file, "Begin extension elimination transformations\n"); ++ ++ replace_ext_with_copy (); ++ ++ if (dump_file) ++ fprintf (dump_file, "\nRTL After Extension Elimination\n"); ++ ++ finish_pass (); ++ ++ /* Print statistics */ ++ if (dump_file) ++ { ++ fprintf (dump_file, ++ "Number of extensions ignored: %d (of %d candidiates)\nDETECTION EFFECTIVENESS: %f%%\n", ++ num_cand_ignored, num_cand, ++ ((float) (num_cand - num_cand_ignored) / (float) num_cand) * ++ 100); ++ fprintf (dump_file, ++ "Number of extensions converted to copy: %d (of %d candidiates)\nCONVERSION EFFECTIVENESS: %f%%\n", ++ num_cand_transformed, num_cand, ++ ((float) num_cand_transformed / (float) num_cand) * 100); ++ } ++} ++ ++/* Remove redundant extensions. */ ++ ++static unsigned int ++rest_of_handle_extelim (void) ++{ ++ extension_elimination (); ++ return 0; ++} ++ ++/* Run extelim pass when flag_extelim is set at optimization level > 0. */ ++ ++static bool ++gate_handle_extelim (void) ++{ ++ return (optimize > 0 && flag_extelim); ++} ++ ++struct rtl_opt_pass pass_rtl_extelim = { ++ { ++ RTL_PASS, ++ "extelim", /* name */ ++ gate_handle_extelim, /* gate */ ++ rest_of_handle_extelim, /* execute */ ++ NULL, /* sub */ ++ NULL, /* next */ ++ 0, /* static_pass_number */ ++ TV_EXTELIM, /* tv_id */ ++ 0, /* properties_required */ ++ 0, /* properties_provided */ ++ 0, /* properties_destroyed */ ++ 0, /* todo_flags_start */ ++ TODO_ggc_collect | TODO_dump_func | TODO_df_finish | TODO_verify_rtl_sharing, /* todo_flags_finish */ ++ } ++}; diff --git a/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.fix_MTWX51204-dwarf-vector-reg.patch b/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.fix_MTWX51204-dwarf-vector-reg.patch new file mode 100644 index 00000000..cb34859a --- /dev/null +++ b/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.fix_MTWX51204-dwarf-vector-reg.patch @@ -0,0 +1,9 @@ +diff -Naur gcc-4.6.2/gcc/config/rs6000/sysv4.h gcc-4.6.2-MTWX51204-dwarf-vector-reg/gcc/config/rs6000/sysv4.h +--- gcc-4.6.2/gcc/config/rs6000/sysv4.h 2011-03-07 01:50:23.000000000 -0600 ++++ gcc-4.6.2-MTWX51204-dwarf-vector-reg/gcc/config/rs6000/sysv4.h 2011-12-16 09:44:18.469039002 -0600 +@@ -1035,5 +1035,3 @@ + + /* This target uses the sysv4.opt file. */ + #define TARGET_USES_SYSV4_OPT 1 +- +-#undef DBX_REGISTER_NUMBER diff --git a/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.fix_SSIZE_MAX_undefine_issue.patch b/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.fix_SSIZE_MAX_undefine_issue.patch new file mode 100644 index 00000000..51dc5586 --- /dev/null +++ b/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.fix_SSIZE_MAX_undefine_issue.patch @@ -0,0 +1,11 @@ +--- gcc-4_6-branch/gcc/config/host-linux.c.orig 2012-03-08 02:18:57.282190580 -0600 ++++ gcc-4_6-branch/gcc/config/host-linux.c 2012-03-08 02:19:30.930158694 -0600 +@@ -17,6 +17,8 @@ + along with GCC; see the file COPYING3. If not see + . */ + ++#include ++ + #include "config.h" + #include "system.h" + #include "coretypes.h" diff --git a/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.fix_build-with-cxx.patch b/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.fix_build-with-cxx.patch new file mode 100644 index 00000000..cfceafd3 --- /dev/null +++ b/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.fix_build-with-cxx.patch @@ -0,0 +1,39 @@ +gcc.fix_build-with-cxx + +On native builds, when linking cc1 with static libraries (ppl cloog, +gmp, mpfr), there is c++ code brought in by libppl. Normally cc1 is +linked through "gcc", but in this case it should be linked with "g++". + +To work around this, gcc is configured with --enable-build-with-cxx, +which compiles and links the entire compiler with g++. Since g++ is +more rigorous about the use of the "const" keyword, there is a couple +of places that we get syntax errors. This patch fixes them. + +--- gcc-4.6.0/gcc/config/rs6000/rs6000.c-orig 2011-05-09 10:35:55.627190744 -0500 ++++ gcc-4.6.0/gcc/config/rs6000/rs6000.c 2011-05-09 10:39:09.232814653 -0500 +@@ -22502,11 +22502,12 @@ + rs6000_xcoff_strip_dollar (const char *name) + { + char *strip, *p; ++ const char *q; + int len; + +- p = strchr (name, '$'); ++ q = strchr (name, '$'); + +- if (p == 0 || p == name) ++ if (q == 0 || q == name) + return name; + + len = strlen (name); +--- gcc-4.6.0/gcc/objc/objc-next-runtime-abi-02.c-orig 2011-05-11 13:46:44.559065173 -0500 ++++ gcc-4.6.0/gcc/objc/objc-next-runtime-abi-02.c 2011-05-11 13:48:34.956939829 -0500 +@@ -1878,7 +1878,7 @@ + static const char * + newabi_append_ro (const char *name) + { +- char *dollar; ++ const char *dollar; + char *p; + static char string[BUFSIZE]; + dollar = strchr (name, '$'); diff --git a/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.fix_cloogstatic2.patch b/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.fix_cloogstatic2.patch new file mode 100644 index 00000000..afa29d93 --- /dev/null +++ b/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.fix_cloogstatic2.patch @@ -0,0 +1,18 @@ +gcc.fix_cloogstatic2 + +When only static libraries are available (so we can build cc1 without +depending on extras libraries), we get a bunch of undefined symbols +that are defined in libpwl. This patch explicitly adds libpwl to the +linker command. + +--- gcc-trunk/configure.orig 2011-03-10 12:48:29.433528020 -0600 ++++ gcc-trunk/configure 2011-03-10 12:52:11.342145967 -0600 +@@ -5770,7 +5770,7 @@ + LDFLAGS="$saved_LDFLAGS" + fi + +- ppllibs="$ppllibs -lppl_c -lppl $pwllib -lgmpxx" ++ ppllibs="$ppllibs -lppl_c -lppl -lpwl $pwllib -lgmpxx" + + if test "$enable_ppl_version_check" != no; then + saved_CFLAGS="$CFLAGS" diff --git a/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.fix_constvector.patch b/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.fix_constvector.patch new file mode 100644 index 00000000..c4a27766 --- /dev/null +++ b/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.fix_constvector.patch @@ -0,0 +1,43 @@ +For altivec targets, 32 bits, the spec2k-gap bmk does not build. The +reason is that at some point the vectorizer creates an CONST_VECTOR +rtl, where the elements are SYMBOL_REFs. + +Gcc ICE on simplify_immed_subreg, where it checks that CONST_VECTORS +can be only made of CONST_INT, CONST_DOUBLE, or CONST_FIXED. + +I really don't understand what that function does, but since the +vectorizer will bailout later anyway, I think it is safe to treat +SYMBOL_REFs as CONST_INT. (NOT for FSF submission, as I really don't +have a clue) + +This problem does not exists on gcc-4.5 + +This problem does not exists on 64 bits, since there is no altivec +type that can support 64bit elements. + +Here is a simplified test case: + +typedef void f_t (void); +extern f_t f; +extern f_t *A[12]; +extern f_t *B[12]; +void bad_vector () +{ + int i; + + for (i = 0; i < 12; i++ ) { + A[i] = f; + B[i] = f; + } +} + +--- gcc-4.6.2/gcc/simplify-rtx.c~ 2011-12-28 12:28:01.700039002 -0600 ++++ gcc-4.6.2/gcc/simplify-rtx.c 2011-12-28 12:38:22.287039002 -0600 +@@ -5001,6 +5001,7 @@ + switch (GET_CODE (el)) + { + case CONST_INT: ++ case SYMBOL_REF: + for (i = 0; + i < HOST_BITS_PER_WIDE_INT && i < elem_bitsize; + i += value_bit) diff --git a/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.fix_header_issue.patch b/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.fix_header_issue.patch new file mode 100644 index 00000000..e2b9f7f2 --- /dev/null +++ b/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.fix_header_issue.patch @@ -0,0 +1,12 @@ +--- gcc-4_6-branch/gcc/limitx.h.orig 2012-03-08 01:11:23.024440826 -0600 ++++ gcc-4_6-branch/gcc/limitx.h 2012-03-08 01:13:44.372515706 -0600 +@@ -30,6 +30,7 @@ + #define _GCC_LIMITS_H_ + + #ifndef _LIBC_LIMITS_H_ +-/* Use "..." so that we find syslimits.h only in this same directory. */ +-#include "syslimits.h" ++#define _GCC_NEXT_LIMITS_H /* tell gcc's limits.h to recurse */ ++#include_next ++#undef _GCC_NEXT_LIMITS_H + #endif diff --git a/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.fix_ira-loop-pressure.patch b/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.fix_ira-loop-pressure.patch new file mode 100644 index 00000000..86ad32a1 --- /dev/null +++ b/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.fix_ira-loop-pressure.patch @@ -0,0 +1,12 @@ +diff -Naur gcc-4.6.2/gcc/config/rs6000/rs6000.c gcc-4.6.2-loop_invariant/gcc/config/rs6000/rs6000.c +--- gcc-4.6.2/gcc/config/rs6000/rs6000.c 2011-11-24 00:03:49.709144001 -0600 ++++ gcc-4.6.2-loop_invariant/gcc/config/rs6000/rs6000.c 2011-12-12 23:49:27.901487730 -0600 +@@ -2723,7 +2723,7 @@ + calculation works better for RTL loop invariant motion on targets + with enough (>= 32) registers. It is an expensive optimization. + So it is on only for peak performance. */ +- if (optimize >= 3 && global_init_p) ++ if (optimize >= 3 && global_init_p && !global_options_set.x_flag_ira_loop_pressure) + flag_ira_loop_pressure = 1; + + /* Set the pointer size. */ diff --git a/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.fix_longversionstring.patch b/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.fix_longversionstring.patch new file mode 100644 index 00000000..2d7fae78 --- /dev/null +++ b/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.fix_longversionstring.patch @@ -0,0 +1,16 @@ +gcc.fix_longversionstring + +Freescale version string is really long, and it can overflow a +buffer. This patch extends the size of the buffer. + +--- gcc-4.6.0/gcc/dwarf2out.c-orig 2011-03-18 11:22:01.000000000 -0500 ++++ gcc-4.6.0/gcc/dwarf2out.c 2011-05-06 10:24:24.114277925 -0500 +@@ -20005,7 +20005,7 @@ + gen_compile_unit_die (const char *filename) + { + dw_die_ref die; +- char producer[250]; ++ char producer[2500]; + const char *language_string = lang_hooks.name; + int language; + diff --git a/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.fix_mingw32.patch b/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.fix_mingw32.patch new file mode 100644 index 00000000..0d8c00ef --- /dev/null +++ b/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.fix_mingw32.patch @@ -0,0 +1,11 @@ +--- gcc-4.6.0/gcc/configure~ 2011-02-28 09:36:37.000000000 -0600 ++++ gcc-4.6.0/gcc/configure 2011-06-28 10:07:22.430630818 -0500 +@@ -10898,7 +10898,7 @@ + saved_CFLAGS="${CFLAGS}" + CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \ + LDFLAGS="${LDFLAGS_FOR_BUILD}" \ +- ${realsrcdir}/configure \ ++ ${realsrcdir}/configure --with-gnu-ld --with-gnu-as --enable-targets=all \ + --enable-languages=${enable_languages-all} \ + --target=$target_alias --host=$build_alias --build=$build_alias + CFLAGS="${saved_CFLAGS}" diff --git a/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.ld_unaligned-460.patch b/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.ld_unaligned-460.patch new file mode 100644 index 00000000..2eb270eb --- /dev/null +++ b/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.ld_unaligned-460.patch @@ -0,0 +1,32 @@ +gcc.ld_unaligned-460 + +Optimization: +Allows a "ld" of an address that is world aligned. There is a penalty +performance, but it still beats a pair of "lwz". + +Index: gcc-4.4-e500mc64-20090322/gcc/config/rs6000/rs6000.c +=================================================================== +--- gcc-4.4-e500mc64-20090322/gcc/config/rs6000/rs6000.c (revision 137727) ++++ gcc-4.4-e500mc64-20090322/gcc/config/rs6000/rs6000.c (working copy) +@@ -10640,7 +10667,9 @@ + else if (bytes >= 8 && TARGET_POWERPC64 + /* 64-bit loads and stores require word-aligned + displacements. */ +- && (align >= 64 || (!STRICT_ALIGNMENT && align >= 32))) ++ && (align >= 64 || (!STRICT_ALIGNMENT && align >= 32) ++ || rs6000_cpu == PROCESSOR_PPCE5500 ++ || rs6000_cpu == PROCESSOR_PPCE6500)) + { + clear_bytes = 8; + mode = DImode; +@@ -10775,7 +10808,9 @@ + else if (bytes >= 8 && TARGET_POWERPC64 + /* 64-bit loads and stores require word-aligned + displacements. */ +- && (align >= 64 || (!STRICT_ALIGNMENT && align >= 32))) ++ && (align >= 64 || (!STRICT_ALIGNMENT && align >= 32) ++ || rs6000_cpu == PROCESSOR_PPCE5500 ++ || rs6000_cpu == PROCESSOR_PPCE6500)) + { + move_bytes = 8; + mode = DImode; diff --git a/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.load_on_store_bypass-462.patch b/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.load_on_store_bypass-462.patch new file mode 100644 index 00000000..a03a7ff2 --- /dev/null +++ b/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.load_on_store_bypass-462.patch @@ -0,0 +1,138 @@ + + This patch implements option -fbypass-load-on-store + + A load on store collision causes the load to to be replayed if the store has not completed. + Under -fbypass-load-on-store, GCC will attempt to avoid a load on store collision by trying + to space the load away from the store by scheduling upto 14 instructions in between, to + prevent the load from executing too early. + + -fbypass-load-on-store is enabled under -fschedule-insns + + Cores supported: e5500, e6500, e500mc + + Ref: Load-on-Store Collision Avoidance by Software Stall of Load. James Yang. May 18, 2010 + +diff -ruN fsl-gcc-4.6.2-sans-bypass/gcc/common.opt fsl-gcc-4.6.2-new-bypass/gcc/common.opt +--- fsl-gcc-4.6.2-sans-bypass/gcc/common.opt 2011-11-29 11:10:18.967872292 -0600 ++++ fsl-gcc-4.6.2-new-bypass/gcc/common.opt 2011-11-29 14:02:46.765994436 -0600 +@@ -840,6 +840,10 @@ + Common Report Var(flag_btr_bb_exclusive) Optimization + Restrict target load migration not to re-use registers in any basic block + ++fbypass-load-on-store ++Common Report Var(flag_bypass_load_on_store) Optimization ++Bypass load on store collision ++ + fcall-saved- + Common Joined RejectNegative Var(common_deferred_options) Defer + -fcall-saved- Mark as being preserved across functions +diff -ruN fsl-gcc-4.6.2-sans-bypass/gcc/config/rs6000/e500mc64.md fsl-gcc-4.6.2-new-bypass/gcc/config/rs6000/e500mc64.md +--- fsl-gcc-4.6.2-sans-bypass/gcc/config/rs6000/e500mc64.md 2011-11-29 11:11:38.454868780 -0600 ++++ fsl-gcc-4.6.2-new-bypass/gcc/config/rs6000/e500mc64.md 2011-11-29 17:10:39.849869060 -0600 +@@ -189,3 +189,5 @@ + (and (eq_attr "type" "ddiv") + (eq_attr "cpu" "ppce500mc64")) + "e500mc64_decode,e500mc64_issue+e500mc64_fpu,e500mc64_fpu*34") ++ ++(define_bypass 15 "e500mc64_store" "e500mc64_load" "rs6000_bypass_load_on_store_collision_p") +diff -ruN fsl-gcc-4.6.2-sans-bypass/gcc/config/rs6000/e500mc.md fsl-gcc-4.6.2-new-bypass/gcc/config/rs6000/e500mc.md +--- fsl-gcc-4.6.2-sans-bypass/gcc/config/rs6000/e500mc.md 2011-11-29 11:11:38.479869032 -0600 ++++ fsl-gcc-4.6.2-new-bypass/gcc/config/rs6000/e500mc.md 2011-11-29 17:10:27.810997020 -0600 +@@ -198,3 +198,5 @@ + (and (eq_attr "type" "ddiv") + (eq_attr "cpu" "ppce500mc")) + "e500mc_decode,e500mc_issue+e500mc_fpu,e500mc_fpu*65") ++ ++(define_bypass 15 "e500mc_store" "e500mc_load" "rs6000_bypass_load_on_store_collision_p") +diff -ruN fsl-gcc-4.6.2-sans-bypass/gcc/config/rs6000/e5500.md fsl-gcc-4.6.2-new-bypass/gcc/config/rs6000/e5500.md +--- fsl-gcc-4.6.2-sans-bypass/gcc/config/rs6000/e5500.md 2011-11-29 11:11:38.321744639 -0600 ++++ fsl-gcc-4.6.2-new-bypass/gcc/config/rs6000/e5500.md 2011-11-29 17:10:47.255997293 -0600 +@@ -174,3 +174,5 @@ + (and (eq_attr "type" "cr_logical,delayed_cr") + (eq_attr "cpu" "ppce5500")) + "e5500_decode,e5500_bu") ++ ++(define_bypass 15 "e5500_store" "e5500_load" "rs6000_bypass_load_on_store_collision_p") +diff -ruN fsl-gcc-4.6.2-sans-bypass/gcc/config/rs6000/e6500.md fsl-gcc-4.6.2-new-bypass/gcc/config/rs6000/e6500.md +--- fsl-gcc-4.6.2-sans-bypass/gcc/config/rs6000/e6500.md 2011-11-29 11:11:37.831996567 -0600 ++++ fsl-gcc-4.6.2-new-bypass/gcc/config/rs6000/e6500.md 2011-11-29 17:11:00.902869709 -0600 +@@ -211,3 +211,5 @@ + (and (eq_attr "type" "vecperm") + (eq_attr "cpu" "ppce6500")) + "e6500_decode,e6500_vecperm") ++ ++(define_bypass 15 "e6500_store" "e6500_load" "rs6000_bypass_load_on_store_collision_p") +diff -ruN fsl-gcc-4.6.2-sans-bypass/gcc/config/rs6000/rs6000.c fsl-gcc-4.6.2-new-bypass/gcc/config/rs6000/rs6000.c +--- fsl-gcc-4.6.2-sans-bypass/gcc/config/rs6000/rs6000.c 2011-11-29 11:11:38.393748363 -0600 ++++ fsl-gcc-4.6.2-new-bypass/gcc/config/rs6000/rs6000.c 2011-11-29 17:10:15.740745470 -0600 +@@ -28719,3 +28719,20 @@ + + + #include "gt-rs6000.h" ++ ++bool ++rs6000_bypass_load_on_store_collision_p (rtx out_insn, rtx in_insn) ++{ ++ /* The out_insn is a store and the in_insn is a load */ ++ if (flag_bypass_load_on_store && ++ (GET_CODE (PATTERN (out_insn)) == SET && ++ GET_CODE (SET_DEST (PATTERN (out_insn))) == MEM && ++ GET_CODE (SET_SRC (PATTERN (out_insn))) == REG) && ++ (GET_CODE (PATTERN (in_insn)) == SET && ++ GET_CODE (SET_DEST (PATTERN (in_insn))) == REG && ++ GET_CODE (SET_SRC (PATTERN (in_insn))) == MEM)) ++ return rtx_equal_p (SET_DEST (PATTERN (out_insn)), ++ SET_SRC (PATTERN (in_insn))); ++ else ++ return false; ++} +diff -ruN fsl-gcc-4.6.2-sans-bypass/gcc/config/rs6000/rs6000-protos.h fsl-gcc-4.6.2-new-bypass/gcc/config/rs6000/rs6000-protos.h +--- fsl-gcc-4.6.2-sans-bypass/gcc/config/rs6000/rs6000-protos.h 2011-11-29 11:11:37.783996630 -0600 ++++ fsl-gcc-4.6.2-new-bypass/gcc/config/rs6000/rs6000-protos.h 2011-11-29 17:42:51.443119385 -0600 +@@ -174,6 +174,8 @@ + + extern void rs6000_aix_asm_output_dwarf_table_ref (char *); + ++extern bool rs6000_bypass_load_on_store_collision_p (rtx out_insn, rtx in_insn); ++ + /* Declare functions in rs6000-c.c */ + + extern void rs6000_pragma_longcall (struct cpp_reader *); +diff -ruN fsl-gcc-4.6.2-sans-bypass/gcc/testsuite/gcc.target/powerpc/bypass-load-on-store.c fsl-gcc-4.6.2-new-bypass/gcc/testsuite/gcc.target/powerpc/bypass-load-on-store.c +--- fsl-gcc-4.6.2-sans-bypass/gcc/testsuite/gcc.target/powerpc/bypass-load-on-store.c 1969-12-31 18:00:00.000000000 -0600 ++++ fsl-gcc-4.6.2-new-bypass/gcc/testsuite/gcc.target/powerpc/bypass-load-on-store.c 2011-11-30 16:36:55.168869498 -0600 +@@ -0,0 +1,34 @@ ++/* { dg-do compile { target { powerpc*-*-* } } } */ ++/* { dg-options "-O0 -fschedule-insns -fbypass-load-on-store -fdump-rtl-sched1 -fsched-verbose=2" } */ ++ ++void nescaf(void) ++{ ++ long a, b, c, d, ++ e, f, g, h, ++ i, j, k, l, ++ m, n, o, p, ++ q, r, s, t, ++ ++ z, w; ++ ++ a = 41; b = 79; c = 20; d = 11; ++ e = 13; f = 43; g = 13; h = 21; ++ i = 12; j = 45; k = 55; l = 90; ++ m = 23; n = 61; o = 89; p = 53; ++ q = 83; r = 52; s = 76; t = 99; ++ ++ /* Now, we have a store followed by a load. The assignments to a-t are ++ * all independent of the store-load computation below. The question is: ++ * Under -fschedule-insns -fbypass-load-on-store, are 14 of the above ++ * instructions moved between the store-load? ++ */ ++ z = 121; ++ w = z; ++} ++ ++/* Note: There is going to be exactly one insn that will be assigned cost 15. ++ * Since its insn-number will likely change, we do not include the insn ++ * number in the scan - just the part of the dump that'll be invariant. ++ */ ++/* { dg-final { scan-rtl-dump "into queue with cost=15" "sched1" { target powerpc*-*-* } } } */ ++/* { dg-final { cleanup-rtl-dump "sched1" } } */ diff --git a/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.local_unaligned_altivec.patch b/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.local_unaligned_altivec.patch new file mode 100644 index 00000000..feee54a1 --- /dev/null +++ b/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.local_unaligned_altivec.patch @@ -0,0 +1,18 @@ +gcc.local_unaligned_altivec + +Optimization: +On Altivec targets, make all char arrays 128 bits aligned (instead of +32 bits aligned) + +--- gcc-4.5.0/gcc/config/rs6000/rs6000.h-orig 2010-10-20 10:23:52.000000000 -0500 ++++ gcc-4.5.0/gcc/config/rs6000/rs6000.h 2010-10-20 10:39:14.000000000 -0500 +@@ -768,7 +768,8 @@ + ? 64 \ + : (TREE_CODE (TYPE) == ARRAY_TYPE \ + && TYPE_MODE (TREE_TYPE (TYPE)) == QImode \ +- && (ALIGN) < BITS_PER_WORD) ? BITS_PER_WORD : (ALIGN))) ++ && (ALIGN) < (TARGET_ALTIVEC ? 128 : BITS_PER_WORD)) \ ++ ? (TARGET_ALTIVEC ? 128 : BITS_PER_WORD) : (ALIGN))) + + /* Nonzero if move instructions will actually fail to work + when given unaligned data. */ diff --git a/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.opt-array-offset.patch b/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.opt-array-offset.patch new file mode 100644 index 00000000..7cdc6f79 --- /dev/null +++ b/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.opt-array-offset.patch @@ -0,0 +1,350 @@ +Implements a GIMPLE pass to optimize array access by factoring +out expressions that calculate address offset from +multiple array access. Controls with flag -fopt-array-offset + +diff -ruN XLMe500mc/gcc/common.opt XLMe5500/gcc/common.opt +--- XLMe500mc/gcc/common.opt 2011-10-18 14:49:23.026644000 -0500 ++++ XLMe5500/gcc/common.opt 2011-10-05 12:39:26.242644101 -0500 +@@ -1992,6 +1992,10 @@ + Common Report Var(flag_tree_vrp) Init(0) Optimization + Perform Value Range Propagation on trees + ++fopt-array-offset ++Common Report Var(flag_opt_array_offset) ++Expand array offset address calculations ++ + funit-at-a-time + Common Report Var(flag_unit_at_a_time) Init(1) Optimization + Compile whole compilation unit at a time +diff -ruN XLMe500mc/gcc/Makefile.in XLMe5500/gcc/Makefile.in +--- XLMe500mc/gcc/Makefile.in 2011-10-18 14:49:23.028644000 -0500 ++++ XLMe5500/gcc/Makefile.in 2011-10-05 12:08:28.104643898 -0500 +@@ -1306,6 +1306,7 @@ + omp-low.o \ + optabs.o \ + options.o \ ++ opt-array-offset.o \ + opts-common.o \ + opts-global.o \ + opts.o \ +@@ -2629,7 +2630,10 @@ + $(FLAGS_H) $(CGRAPH_H) $(PLUGIN_H) \ + $(TREE_INLINE_H) tree-mudflap.h $(GGC_H) graph.h $(CGRAPH_H) \ + $(TREE_PASS_H) $(CFGLOOP_H) $(EXCEPT_H) $(REGSET_H) +- ++opt-array-offset.o : opt-array-offset.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ ++ $(TM_H) $(FLAGS_H) $(TREE_H) $(TREE_FLOW_H) $(TIMEVAR_H) \ ++ $(TREE_PASS_H) alloc-pool.h $(BASIC_BLOCK_H) $(TARGET_H) \ ++ $(DIAGNOSTIC_H) gimple-pretty-print.h tree-pretty-print.h + widen-types.o : widen-types.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(GIMPLE_H) \ + $(DIAGNOSTIC_H) $(GIMPLE_H) $(TREE_INLINE_H) langhooks.h \ + $(LANGHOOKS_DEF_H) $(TREE_FLOW_H) $(CGRAPH_H) $(TIMEVAR_H) $(TM_H) \ +diff -ruN XLMe500mc/gcc/opt-array-offset.c XLMe5500/gcc/opt-array-offset.c +--- XLMe500mc/gcc/opt-array-offset.c 1969-12-31 18:00:00.000000000 -0600 ++++ XLMe5500/gcc/opt-array-offset.c 2011-11-01 15:24:21.746039000 -0500 +@@ -0,0 +1,283 @@ ++/* Optimizing array element access ++ Copyright (C) 2011 ++ Free Software Foundation, Inc. ++ ++This file is part of GCC. ++ ++GCC 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. ++ ++GCC 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 GCC; see the file COPYING3. If not see ++. */ ++ ++ ++/* This is a GIMPLE pass over basic block which coverts the stmts: ++ ++ a = b +/- c1; ++ c = a * c2; ++ ++ to: ++ ++ a = b * c2; ++ c = a +/- c1 * c2; ++ ++ in effect expanding the multiplication across addition/substraction. ++ ++ Motivating example: ++ Consider the following simple integer array access: ++ ++ a[i] = c; ++ a[i + 1] = c; ++ ++ The following GIMPLE equivalent will be generated: ++ ++ off_1 = i * 4; ++ a_i = a + off_1; ++ *a_i = c; ++ ++ off_1 = i + 1; ++ off_2 = off_1 * 4; ++ a_i1 = a + off_2; ++ *a_i1 = c; ++ ++ Notice that a_i1 could simply be a_i + 4. But the calcuation of i+1 ++ is preventing CSE to perform. This pass will essentially convert the ++ second expr into: ++ ++ off_1 = i * 4; ++ off_2 = off_1 + 4; ++ a_i1 = a + off_2; ++ .... ++ ++ Thus allowing the previous index i calculation to be reuse. off_1 + 4 ++ would also be combined into a_i if offset addressing mode is available. ++ This also have side effect of avoiding redundant sign extension on ++ i+1 for LP64 model where native integer size is different from pointer size. ++ ++ The algorithm iterates through all the basic blocks looking for ++ the above pattern. Care is taken to make sure off_1 only ++ has the single use otherwise the transformation cannot be perform. ++*/ ++ ++ ++#include "config.h" ++#include "system.h" ++#include "coretypes.h" ++#include "tm.h" ++#include "flags.h" ++#include "tree.h" ++#include "tree-flow.h" ++#include "timevar.h" ++#include "tree-pass.h" ++#include "alloc-pool.h" ++#include "basic-block.h" ++#include "target.h" ++#include "gimple-pretty-print.h" ++#include "tree-pretty-print.h" ++ ++ ++/* ++ We are looking for: ++ a = b +/- c1 ++ c = a * c2 (stmt incoming) ++ d = &arr + c ++*/ ++static bool ++is_candidate (gimple stmt) ++{ ++ tree mul_result = gimple_get_lhs (stmt); ++ tree rhs1, rhs2; ++ gimple rhs1_stmt, use_stmt; ++ use_operand_p use_p; ++ imm_use_iterator imm_iter; ++ ++ /* check for a * c2 */ ++ if (gimple_assign_rhs_code (stmt) != MULT_EXPR) ++ return false; ++ ++ rhs1 = gimple_assign_rhs1 (stmt); ++ rhs2 = gimple_assign_rhs2 (stmt); ++ ++ if (TREE_CODE (rhs2) != INTEGER_CST) ++ return false; ++ ++ /* check for b + c1 */ ++ if (TREE_CODE (rhs1) == SSA_NAME) ++ { ++ rhs1_stmt = SSA_NAME_DEF_STMT (rhs1); ++ if (is_gimple_assign (rhs1_stmt)) ++ { ++ tree rhs1_2; ++ tree plusminus_result; ++ ++ if (gimple_assign_rhs_code (rhs1_stmt) != PLUS_EXPR ++ && gimple_assign_rhs_code (rhs1_stmt) != MINUS_EXPR) ++ return false; ++ ++ rhs1_2 = gimple_assign_rhs2 (rhs1_stmt); ++ if (TREE_CODE (rhs1_2) != INTEGER_CST) ++ return false; ++ ++ /* make sure there are no other uses of a ++ e.g. if a is used as an indcution variable ++ we cannot modified it ++ */ ++ plusminus_result = gimple_get_lhs (rhs1_stmt); ++ FOR_EACH_IMM_USE_FAST (use_p, imm_iter, plusminus_result) ++ { ++ use_stmt = USE_STMT (use_p); ++ ++ /* ignore PHI node */ ++ if (is_gimple_assign (use_stmt) && ++ (gimple_assign_rhs_code (use_stmt) == GIMPLE_PHI)) ++ continue; ++ if (use_stmt != stmt) ++ return false; ++ } ++ ++#if 0 ++ if (gimple_bb(rhs1_stmt) != gimple_bb(stmt)) ++ return false; ++#endif ++ } ++ else ++ return false; ++ } ++ else ++ return false; ++ ++ /* now look for uses of c that is a pointer use */ ++ FOR_EACH_IMM_USE_FAST (use_p, imm_iter, mul_result) ++ { ++ enum tree_code use_code; ++ ++ use_stmt = USE_STMT (use_p); ++ ++ if (is_gimple_debug (use_stmt)) ++ continue; ++ ++ if (gimple_bb (use_stmt) != gimple_bb (stmt)) ++ return false; ++ ++ if (!is_gimple_assign (use_stmt)) ++ return false; ++ ++ use_code = gimple_assign_rhs_code (use_stmt); ++ if (use_code != POINTER_PLUS_EXPR) ++ return false; ++ } ++ ++ if (dump_file) ++ { ++ fprintf (dump_file, "Found candidate:\n"); ++ print_gimple_stmt (dump_file, rhs1_stmt, 0, TDF_SLIM); ++ print_gimple_stmt (dump_file, stmt, 0, TDF_SLIM); ++ print_gimple_stmt (dump_file, use_stmt, 0, TDF_SLIM); ++ } ++ ++ return true; ++} ++ ++/* Do the actual transformation: ++ a = b + c1 ==> a = b * c2 ++ c = a * c2 ==> c = a + c1*c2 ++*/ ++static bool ++expand_plusminus_mult (gimple stmt) ++{ ++ tree c1, c2, mul_result; ++ gimple rhs1_stmt; ++ ++ /* get c2 */ ++ c2 = gimple_assign_rhs2 (stmt); ++ ++ /* get c1 */ ++ rhs1_stmt = SSA_NAME_DEF_STMT (gimple_assign_rhs1 (stmt)); ++ c1 = gimple_assign_rhs2 (rhs1_stmt); ++ ++ /* form c1 * c2 */ ++ mul_result = double_int_to_tree (TREE_TYPE(c2), double_int_mul ++ (tree_to_double_int (c1), tree_to_double_int (c2))); ++ ++ /* a = b + c1 ==> a = b * c2 */ ++ gimple_assign_set_rhs2 (rhs1_stmt, c2); ++ gimple_assign_set_rhs_code (rhs1_stmt, MULT_EXPR); ++ update_stmt (rhs1_stmt); ++ ++ /* c = a * c2 ==> c = a + c1*c2 */ ++ gimple_assign_set_rhs2 (stmt, mul_result); ++ /* MINUS_EXPR has already been embedded into c1*c2 */ ++ gimple_assign_set_rhs_code (stmt, PLUS_EXPR); ++ update_stmt (stmt); ++ ++ return true; ++} ++ ++ ++static unsigned int ++execute_opt_array_offset (void) ++{ ++ basic_block bb; ++ tree fndecl; ++ ++ FOR_EACH_BB (bb) ++ { ++ gimple_stmt_iterator gsi; ++ ++ for (gsi = gsi_after_labels (bb); !gsi_end_p (gsi); gsi_next(&gsi)) ++ { ++ gimple stmt = gsi_stmt (gsi); ++ tree lhs,rhs1,rhs2,rhs3; ++ enum tree_code code; ++ ++ /* only interested in assign statement */ ++ if (is_gimple_assign (stmt)) ++ { ++ /* find stmts calculating array offset */ ++ if (is_candidate (stmt)) ++ /* convert stmt */ ++ expand_plusminus_mult(stmt); ++ ++ } ++ } ++ } ++ ++ return 0; ++} ++ ++static bool ++gate_opt_array_offset (void) ++{ ++ return flag_opt_array_offset && optimize; ++} ++ ++struct gimple_opt_pass pass_opt_array_offset = ++{ ++ { ++ GIMPLE_PASS, ++ "opt_array_offset", /* name */ ++ gate_opt_array_offset, /* gate */ ++ execute_opt_array_offset, /* execute */ ++ NULL, /* sub */ ++ NULL, /* next */ ++ 0, /* static_pass_number */ ++ TV_NONE, /* tv_id */ ++ PROP_ssa, /* properties_required */ ++ 0, /* properties_provided */ ++ 0, /* properties_destroyed */ ++ 0, /* todo_flags_start */ ++ TODO_verify_ssa ++ | TODO_verify_stmts ++ | TODO_update_ssa ++ | TODO_dump_func /* todo_flags_finish */ ++ } ++}; ++ +diff -ruN XLMe500mc/gcc/passes.c XLMe5500/gcc/passes.c +--- XLMe500mc/gcc/passes.c 2011-10-18 14:49:23.029644000 -0500 ++++ XLMe5500/gcc/passes.c 2011-10-05 11:19:01.168644127 -0500 +@@ -937,6 +937,7 @@ + NEXT_PASS (pass_phiopt); + NEXT_PASS (pass_fold_builtins); + NEXT_PASS (pass_optimize_widening_mul); ++ NEXT_PASS (pass_opt_array_offset); + NEXT_PASS (pass_tail_calls); + NEXT_PASS (pass_rename_ssa_copies); + NEXT_PASS (pass_uncprop); +diff -ruN XLMe500mc/gcc/tree-pass.h XLMe5500/gcc/tree-pass.h +--- XLMe500mc/gcc/tree-pass.h 2011-10-18 14:49:23.029644000 -0500 ++++ XLMe5500/gcc/tree-pass.h 2011-10-05 11:19:59.665643705 -0500 +@@ -421,6 +421,7 @@ + extern struct gimple_opt_pass pass_cse_sincos; + extern struct gimple_opt_pass pass_optimize_bswap; + extern struct gimple_opt_pass pass_optimize_widening_mul; ++extern struct gimple_opt_pass pass_opt_array_offset; + extern struct gimple_opt_pass pass_warn_function_return; + extern struct gimple_opt_pass pass_warn_function_noreturn; + extern struct gimple_opt_pass pass_cselim; diff --git a/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.remove_CCUNSmode_reference.patch b/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.remove_CCUNSmode_reference.patch new file mode 100644 index 00000000..03e3ce9c --- /dev/null +++ b/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.remove_CCUNSmode_reference.patch @@ -0,0 +1,24 @@ +--- gcc-4_6-branch/gcc/extelim.c.orig 2012-03-05 21:42:53.984215949 -0600 ++++ gcc-4_6-branch/gcc/extelim.c 2012-03-05 21:43:27.884394659 -0600 +@@ -922,8 +922,7 @@ + && GET_MODE (exp) != HImode + && GET_MODE (exp) != SImode + && GET_MODE (exp) != DImode +- && GET_MODE (exp) != CCmode +- && GET_MODE (exp) != CCUNSmode) ++ && GET_MODE (exp) != CCmode) + return false; + + return true; +@@ -1653,9 +1652,9 @@ + For our targets, there is no 'cmph' insn, so we bail out + if we see a comparison of sizes less than a word (SI). */ + if (REG_P (dest) +- && (GET_MODE (dest) == CCmode || GET_MODE (dest) == CCUNSmode) ++ && (GET_MODE (dest) == CCmode) + && GET_CODE (src) == COMPARE +- && (GET_MODE (src) == CCmode || GET_MODE (src) == CCUNSmode)) ++ && (GET_MODE (src) == CCmode)) + { + rtx compare_op0 = XEXP (src, 0); + rtx compare_op1 = XEXP (src, 1); diff --git a/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.rm_slow_tests.patch b/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.rm_slow_tests.patch new file mode 100644 index 00000000..b02b7555 --- /dev/null +++ b/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.rm_slow_tests.patch @@ -0,0 +1,67 @@ +diff -urN gcc-4.6.0/gcc/testsuite/gfortran.dg/cray_pointers_8.f90 gcc-4.6.0-fixed/gcc/testsuite/gfortran.dg/cray_pointers_8.f90 +--- gcc-4.6.0/gcc/testsuite/gfortran.dg/cray_pointers_8.f90 2009-02-13 15:12:34.000000000 -0600 ++++ gcc-4.6.0-fixed/gcc/testsuite/gfortran.dg/cray_pointers_8.f90 1969-12-31 18:00:00.000000000 -0600 +@@ -1,63 +0,0 @@ +-! { dg-do run } +-! { dg-options "-fcray-pointer" } +-! +-! Test the fix for PR36528 in which the Cray pointer was not passed +-! correctly to 'euler' so that an undefined reference to fcn was +-! generated by the linker. +-! +-! Reported by Tobias Burnus +-! from http://groups.google.com/group/comp.lang.fortran/msg/86b65bad78e6af78 +-! +-real function p1(x) +- real, intent(in) :: x +- p1 = x +-end +- +-real function euler(xp,xk,dx,f) +- real, intent(in) :: xp, xk, dx +- interface +- real function f(x) +- real, intent(in) :: x +- end function +- end interface +- real x, y +- y = 0.0 +- x = xp +- do while (x .le. xk) +- y = y + f(x)*dx +- x = x + dx +- end do +- euler = y +-end +-program main +- interface +- real function p1 (x) +- real, intent(in) :: x +- end function +- real function fcn (x) +- real, intent(in) :: x +- end function +- real function euler (xp,xk,dx,f) +- real, intent(in) :: xp, xk ,dx +- interface +- real function f(x) +- real, intent(in) :: x +- end function +- end interface +- end function +- end interface +- real x, xp, xk, dx, y, z +- pointer (pfcn, fcn) +- pfcn = loc(p1) +- xp = 0.0 +- xk = 1.0 +- dx = 0.0005 +- y = 0.0 +- x = xp +- do while (x .le. xk) +- y = y + fcn(x)*dx +- x = x + dx +- end do +- z = euler(0.0,1.0,0.0005,fcn) +- if (abs (y - z) .gt. 1e-6) call abort +-end diff --git a/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.soft_float-460.patch b/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.soft_float-460.patch new file mode 100644 index 00000000..eafa6ab0 --- /dev/null +++ b/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.soft_float-460.patch @@ -0,0 +1,190 @@ +diff -u gcc-4.6.0-orig/libstdc++-v3/testsuite/ext/pb_ds/regression/hash_data_map_rand.cc gcc-4.6.0/libstdc++-v3/testsuite/ext/pb_ds/regression/hash_data_map_rand.cc +--- gcc-4.6.0-orig/libstdc++-v3/testsuite/ext/pb_ds/regression/hash_data_map_rand.cc 2011-05-11 20:01:58.000000000 -0500 ++++ gcc-4.6.0/libstdc++-v3/testsuite/ext/pb_ds/regression/hash_data_map_rand.cc 2011-05-11 20:03:39.000000000 -0500 +@@ -46,17 +46,17 @@ + + #ifndef ITERATIONS + # ifdef _GLIBCXX_DEBUG +-# define ITERATIONS 100 ++# define ITERATIONS 2 + # else +-# define ITERATIONS 5000 ++# define ITERATIONS 2 + #endif + #endif + + #ifndef KEYS + # ifdef _GLIBCXX_DEBUG +-# define KEYS 200 ++# define KEYS 5 + # else +-# define KEYS 10000 ++# define KEYS 5 + # endif + #endif + +diff -u gcc-4.6.0-orig/libstdc++-v3/testsuite/ext/pb_ds/regression/hash_no_data_map_rand.cc gcc-4.6.0/libstdc++-v3/testsuite/ext/pb_ds/regression/hash_no_data_map_rand.cc +--- gcc-4.6.0-orig/libstdc++-v3/testsuite/ext/pb_ds/regression/hash_no_data_map_rand.cc 2011-05-11 20:01:58.000000000 -0500 ++++ gcc-4.6.0/libstdc++-v3/testsuite/ext/pb_ds/regression/hash_no_data_map_rand.cc 2011-05-11 20:04:00.000000000 -0500 +@@ -46,17 +46,17 @@ + + #ifndef ITERATIONS + # ifdef _GLIBCXX_DEBUG +-# define ITERATIONS 100 ++# define ITERATIONS 2 + # else +-# define ITERATIONS 5000 ++# define ITERATIONS 2 + #endif + #endif + + #ifndef KEYS + # ifdef _GLIBCXX_DEBUG +-# define KEYS 200 ++# define KEYS 5 + # else +-# define KEYS 10000 ++# define KEYS 5 + # endif + #endif + +diff -u gcc-4.6.0-orig/libstdc++-v3/testsuite/ext/pb_ds/regression/list_update_data_map_rand.cc gcc-4.6.0/libstdc++-v3/testsuite/ext/pb_ds/regression/list_update_data_map_rand.cc +--- gcc-4.6.0-orig/libstdc++-v3/testsuite/ext/pb_ds/regression/list_update_data_map_rand.cc 2011-05-11 20:01:58.000000000 -0500 ++++ gcc-4.6.0/libstdc++-v3/testsuite/ext/pb_ds/regression/list_update_data_map_rand.cc 2011-05-11 20:02:23.000000000 -0500 +@@ -47,7 +47,7 @@ + using namespace __gnu_pbds::test; + typedef lu_map_tl_t map_tl_t; + +- return rand_regression_test(50, 10, ++ return rand_regression_test(2, 5, + "lu_data_map_rand_regression_test", + map_tl_t()); + } +diff -u gcc-4.6.0-orig/libstdc++-v3/testsuite/ext/pb_ds/regression/list_update_no_data_map_rand.cc gcc-4.6.0/libstdc++-v3/testsuite/ext/pb_ds/regression/list_update_no_data_map_rand.cc +--- gcc-4.6.0-orig/libstdc++-v3/testsuite/ext/pb_ds/regression/list_update_no_data_map_rand.cc 2011-05-11 20:01:58.000000000 -0500 ++++ gcc-4.6.0/libstdc++-v3/testsuite/ext/pb_ds/regression/list_update_no_data_map_rand.cc 2011-05-11 20:02:23.000000000 -0500 +@@ -47,7 +47,7 @@ + using namespace __gnu_pbds::test; + typedef lu_set_tl_t map_tl_t; + +- return rand_regression_test(50, 10, ++ return rand_regression_test(2, 5, + "lu_no_data_map_rand_regression_test", + map_tl_t()); + } +diff -u gcc-4.6.0-orig/libstdc++-v3/testsuite/ext/pb_ds/regression/priority_queue_rand.cc gcc-4.6.0/libstdc++-v3/testsuite/ext/pb_ds/regression/priority_queue_rand.cc +--- gcc-4.6.0-orig/libstdc++-v3/testsuite/ext/pb_ds/regression/priority_queue_rand.cc 2011-05-11 20:01:58.000000000 -0500 ++++ gcc-4.6.0/libstdc++-v3/testsuite/ext/pb_ds/regression/priority_queue_rand.cc 2011-05-11 20:02:23.000000000 -0500 +@@ -45,10 +45,10 @@ + #include + + #ifndef ITERATIONS +-#define ITERATIONS 5000 ++#define ITERATIONS 2 + #endif + #ifndef KEYS +-#define KEYS 10000 ++#define KEYS 5 + #endif + int + main(int argc, char* a_p_argv[]) +diff -u gcc-4.6.0-orig/libstdc++-v3/testsuite/ext/pb_ds/regression/tree_data_map_rand.cc gcc-4.6.0/libstdc++-v3/testsuite/ext/pb_ds/regression/tree_data_map_rand.cc +--- gcc-4.6.0-orig/libstdc++-v3/testsuite/ext/pb_ds/regression/tree_data_map_rand.cc 2011-05-11 20:01:58.000000000 -0500 ++++ gcc-4.6.0/libstdc++-v3/testsuite/ext/pb_ds/regression/tree_data_map_rand.cc 2011-05-11 20:04:21.000000000 -0500 +@@ -46,17 +46,17 @@ + + #ifndef ITERATIONS + # ifdef _GLIBCXX_DEBUG +-# define ITERATIONS 100 ++# define ITERATIONS 2 + # else +-# define ITERATIONS 5000 ++# define ITERATIONS 2 + #endif + #endif + + #ifndef KEYS + # ifdef _GLIBCXX_DEBUG +-# define KEYS 200 ++# define KEYS 5 + # else +-# define KEYS 10000 ++# define KEYS 5 + # endif + #endif + +diff -u gcc-4.6.0-orig/libstdc++-v3/testsuite/ext/pb_ds/regression/tree_no_data_map_rand.cc gcc-4.6.0/libstdc++-v3/testsuite/ext/pb_ds/regression/tree_no_data_map_rand.cc +--- gcc-4.6.0-orig/libstdc++-v3/testsuite/ext/pb_ds/regression/tree_no_data_map_rand.cc 2011-05-11 20:01:58.000000000 -0500 ++++ gcc-4.6.0/libstdc++-v3/testsuite/ext/pb_ds/regression/tree_no_data_map_rand.cc 2011-05-11 20:04:41.000000000 -0500 +@@ -47,17 +47,17 @@ + + #ifndef ITERATIONS + # ifdef _GLIBCXX_DEBUG +-# define ITERATIONS 100 ++# define ITERATIONS 2 + # else +-# define ITERATIONS 5000 ++# define ITERATIONS 2 + #endif + #endif + + #ifndef KEYS + # ifdef _GLIBCXX_DEBUG +-# define KEYS 200 ++# define KEYS 5 + # else +-# define KEYS 10000 ++# define KEYS 5 + # endif + #endif + +diff -u gcc-4.6.0-orig/libstdc++-v3/testsuite/ext/pb_ds/regression/trie_data_map_rand.cc gcc-4.6.0/libstdc++-v3/testsuite/ext/pb_ds/regression/trie_data_map_rand.cc +--- gcc-4.6.0-orig/libstdc++-v3/testsuite/ext/pb_ds/regression/trie_data_map_rand.cc 2011-05-11 20:01:58.000000000 -0500 ++++ gcc-4.6.0/libstdc++-v3/testsuite/ext/pb_ds/regression/trie_data_map_rand.cc 2011-05-11 20:05:34.000000000 -0500 +@@ -46,17 +46,17 @@ + + #ifndef ITERATIONS + # ifdef _GLIBCXX_DEBUG +-# define ITERATIONS 100 ++# define ITERATIONS 2 + # else +-# define ITERATIONS 5000 ++# define ITERATIONS 2 + #endif + #endif + + #ifndef KEYS + # ifdef _GLIBCXX_DEBUG +-# define KEYS 200 ++# define KEYS 5 + # else +-# define KEYS 10000 ++# define KEYS 5 + # endif + #endif + +diff -u gcc-4.6.0-orig/libstdc++-v3/testsuite/ext/pb_ds/regression/trie_no_data_map_rand.cc gcc-4.6.0/libstdc++-v3/testsuite/ext/pb_ds/regression/trie_no_data_map_rand.cc +--- gcc-4.6.0-orig/libstdc++-v3/testsuite/ext/pb_ds/regression/trie_no_data_map_rand.cc 2011-05-11 20:01:58.000000000 -0500 ++++ gcc-4.6.0/libstdc++-v3/testsuite/ext/pb_ds/regression/trie_no_data_map_rand.cc 2011-05-11 20:05:50.000000000 -0500 +@@ -46,17 +46,17 @@ + + #ifndef ITERATIONS + # ifdef _GLIBCXX_DEBUG +-# define ITERATIONS 100 ++# define ITERATIONS 2 + # else +-# define ITERATIONS 5000 ++# define ITERATIONS 2 + #endif + #endif + + #ifndef KEYS + # ifdef _GLIBCXX_DEBUG +-# define KEYS 200 ++# define KEYS 5 + # else +-# define KEYS 10000 ++# define KEYS 5 + # endif + #endif + diff --git a/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.widen_types-46.patch b/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.widen_types-46.patch new file mode 100644 index 00000000..05905607 --- /dev/null +++ b/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.widen_types-46.patch @@ -0,0 +1,1534 @@ +diff -ruN gcc-4.6.0-orig/gcc/common.opt gcc-4.6.0-new/gcc/common.opt +--- gcc-4.6.0-orig/gcc/common.opt 2011-03-05 18:38:13.000000000 -0600 ++++ gcc-4.6.0-new/gcc/common.opt 2011-08-25 13:16:36.408937475 -0500 +@@ -1797,6 +1797,10 @@ + Common Report Var(flag_strict_overflow) + Treat signed overflow as undefined + ++fwiden-types ++Common Report Var(flag_widen_types) ++Widen signed integral variables (local, whose address has not been taken, non-volatile and having precision less than that of long) to long (retaining original qualifiers) ++ + fsyntax-only + Common Report Var(flag_syntax_only) + Check for syntax errors, then stop +diff -ruN gcc-4.6.0-orig/gcc/Makefile.in gcc-4.6.0-new/gcc/Makefile.in +--- gcc-4.6.0-orig/gcc/Makefile.in 2011-01-25 22:19:58.000000000 -0600 ++++ gcc-4.6.0-new/gcc/Makefile.in 2011-08-25 13:16:36.411937390 -0500 +@@ -1245,6 +1245,7 @@ + gimple-fold.o \ + gimple-low.o \ + gimple-pretty-print.o \ ++ widen-types.o \ + gimplify.o \ + godump.o \ + graph.o \ +@@ -2628,6 +2629,12 @@ + $(TREE_INLINE_H) tree-mudflap.h $(GGC_H) graph.h $(CGRAPH_H) \ + $(TREE_PASS_H) $(CFGLOOP_H) $(EXCEPT_H) $(REGSET_H) + ++widen-types.o : widen-types.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(GIMPLE_H) \ ++ $(DIAGNOSTIC_H) $(GIMPLE_H) $(TREE_INLINE_H) langhooks.h \ ++ $(LANGHOOKS_DEF_H) $(TREE_FLOW_H) $(CGRAPH_H) $(TIMEVAR_H) $(TM_H) \ ++ coretypes.h $(EXCEPT_H) $(FLAGS_H) $(RTL_H) $(FUNCTION_H) $(EXPR_H) output.h \ ++ $(GGC_H) gt-gimplify.h $(HASHTAB_H) $(TARGET_H) $(DIAGNOSTIC_CORE_H) $(OPTABS_H) \ ++ $(SPLAY_TREE_H) $(VEC_H) tree-iterator.h tree-pass.h tree-pretty-print.h + gimplify.o : gimplify.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(GIMPLE_H) \ + $(DIAGNOSTIC_H) $(GIMPLE_H) $(TREE_INLINE_H) langhooks.h \ + $(LANGHOOKS_DEF_H) $(TREE_FLOW_H) $(CGRAPH_H) $(TIMEVAR_H) $(TM_H) \ +@@ -3733,6 +3740,7 @@ + $(srcdir)/tree-cfg.c \ + $(srcdir)/tree-dfa.c \ + $(srcdir)/tree-iterator.c $(srcdir)/gimplify.c \ ++ $(srcdir)/widen-types.c \ + $(srcdir)/tree-chrec.h \ + $(srcdir)/tree-scalar-evolution.c \ + $(srcdir)/tree-ssa-operands.h \ +diff -ruN gcc-4.6.0-orig/gcc/passes.c gcc-4.6.0-new/gcc/passes.c +--- gcc-4.6.0-orig/gcc/passes.c 2011-02-17 10:18:24.000000000 -0600 ++++ gcc-4.6.0-new/gcc/passes.c 2011-08-25 13:16:36.413937342 -0500 +@@ -719,6 +719,7 @@ + backend might produce already lowered functions that are not processed + by these passes. */ + p = &all_lowering_passes; ++ NEXT_PASS (pass_widen_types_stmts); + NEXT_PASS (pass_warn_unused_result); + NEXT_PASS (pass_diagnose_omp_blocks); + NEXT_PASS (pass_mudflap_1); +@@ -741,6 +742,7 @@ + NEXT_PASS (pass_fixup_cfg); + NEXT_PASS (pass_init_datastructures); + NEXT_PASS (pass_expand_omp); ++ NEXT_PASS (pass_widen_types_bbs); + + NEXT_PASS (pass_referenced_vars); + NEXT_PASS (pass_build_ssa); +diff -ruN gcc-4.6.0-orig/gcc/tree-pass.h gcc-4.6.0-new/gcc/tree-pass.h +--- gcc-4.6.0-orig/gcc/tree-pass.h 2011-02-01 09:12:26.000000000 -0600 ++++ gcc-4.6.0-new/gcc/tree-pass.h 2011-08-25 13:16:36.406937543 -0500 +@@ -349,6 +349,7 @@ + + extern void tree_lowering_passes (tree decl); + ++extern struct gimple_opt_pass pass_widen_types_stmts; + extern struct gimple_opt_pass pass_mudflap_1; + extern struct gimple_opt_pass pass_mudflap_2; + extern struct gimple_opt_pass pass_lower_cf; +@@ -409,6 +410,7 @@ + extern struct gimple_opt_pass pass_lower_omp; + extern struct gimple_opt_pass pass_diagnose_omp_blocks; + extern struct gimple_opt_pass pass_expand_omp; ++extern struct gimple_opt_pass pass_widen_types_bbs; + extern struct gimple_opt_pass pass_expand_omp_ssa; + extern struct gimple_opt_pass pass_object_sizes; + extern struct gimple_opt_pass pass_fold_builtins; +diff -ruN gcc-4.6.0-orig/gcc/widen-types.c gcc-4.6.0-new/gcc/widen-types.c +--- gcc-4.6.0-orig/gcc/widen-types.c 1969-12-31 18:00:00.000000000 -0600 ++++ gcc-4.6.0-new/gcc/widen-types.c 2011-08-25 17:27:31.372937392 -0500 +@@ -0,0 +1,1446 @@ ++/* ++ Type Widening: ++ ++ Locals and temporaries having signed integral types, whose address has ++ not been taken, are not volatile qualified, and having type precision ++ less than that of type long are widened to type long (with any other ++ qualifiers retained). ++ ++ Copyright (C) 2011 ++ Free Software Foundation, Inc. ++ ++This file is part of GCC. ++ ++GCC 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. ++ ++GCC 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 GCC; see the file COPYING3. If not see ++. */ ++ ++#include "config.h" ++#include "system.h" ++#include "coretypes.h" ++#include "tm.h" ++#include "tree.h" ++#include "tm_p.h" ++#include "gimple.h" ++#include "basic-block.h" ++#include "tree-iterator.h" ++#include "tree-inline.h" ++#include "langhooks.h" ++#include "tree-pretty-print.h" ++#include "gimple-pretty-print.h" ++#include "langhooks.h" ++#include "tree-flow.h" ++#include "cgraph.h" ++#include "timevar.h" ++#include "hashtab.h" ++#include "flags.h" ++#include "function.h" ++#include "output.h" ++#include "ggc.h" ++#include "tree-dump.h" ++#include "tree-pass.h" ++#include "diagnostic-core.h" ++#include "target.h" ++#include "pointer-set.h" ++#include "splay-tree.h" ++#include "vec.h" ++#include "gimple.h" ++#include "tree-pass.h" ++ ++#include "langhooks-def.h" ++#include "expr.h" ++ ++#include "except.h" ++#include "value-prof.h" ++#include "pointer-set.h" ++ ++/* define TW_FINALIZE_STMTS to 1, if you want to run the widening ++ * pass just after gimplification - over the sequence of statements. ++ */ ++#define TW_FINALIZE_STMTS 1 ++ ++#define TW_DEBUG 0 ++#if TW_DEBUG ++ ++#define TWDBG_STMT(stmt) fprintf (stderr, "%s: ", __FUNCTION__); \ ++ debug_gimple_stmt (stmt); ++ ++#define TWDBG_TREE(tree) \ ++{ \ ++ fprintf (stderr, "%s:\n", #tree); \ ++ debug_tree (tree); \ ++ fprintf (stderr, "\n"); \ ++} ++ ++#define TWDBG_MSG(fmt) \ ++fprintf (stderr, "%s: ", __FUNCTION__); \ ++fprintf (stderr, fmt) ++ ++#define TWDBG_MSG1(fmt, msg) \ ++fprintf (stderr, "%s: ", __FUNCTION__); \ ++fprintf (stderr, fmt, msg) ++ ++#else ++#define TWDBG_STMT(stmt) ++#define TWDBG_TREE(tree) ++#define TWDBG_MSG(fmt) ++#define TWDBG_MSG1(fmt, msg) ++#endif ++ ++#if TW_DEBUG ++static void tw_dump_candidate_list (void); ++static bool tw_debug_candidate (const void *t, void **candidacy, void *data); ++#endif ++static void tw_init (void); ++static void tw_reset (void); ++static long tw_candidate (tree node); ++static long tw_candidate_const (tree node); ++static long *tw_log_candidate (tree node); ++static long tw_candidacy_valid (tree node); ++static void tw_candidacy (tree node, long value); ++static long tw_in_candidate_list (tree node); ++static tree tw_widen_constant (tree node); ++static tree tw_widen_variable (tree node); ++#ifdef TW_FINALIZE_STMTS ++static long tw_fn_has_openmp (gimple_seq stmts); ++#endif ++static void tw_log_parms (tree fndecl); ++#ifdef TW_FINALIZE_STMTS ++static void tw_log_vars (gimple_seq stmts); ++#endif ++static void tw_log_local_decls (void); ++#ifdef TW_FINALIZE_STMTS ++static unsigned int tw_finalize_stmts (void); ++#endif ++static unsigned int tw_finalize_bbs (void); ++static long tw_gimple_in_seq (gimple_seq stmts, long widen); ++static long tw_gimple_in_bb (basic_block bb, long widen); ++static long tw_switch (gimple stmt, long widen); ++static long tw_gimple_stmt (gimple stmt, long widen); ++static long tw_gimple_assign (gimple stmt, long widen); ++static long tw_gimple_assign_single (gimple stmt, long widen); ++static long tw_gimple_assign_unary (gimple stmt, long widen); ++static long tw_gimple_assign_binary (gimple stmt, long widen); ++static long tw_gimple_assign_ternary (gimple stmt, long widen); ++static bool is_formatted_IO_fn (tree decl); ++static long tw_gimple_call (gimple stmt, long widen); ++static long tw_gimple_comparison (gimple stmt, long widen); ++static long tw_gimple_switch (gimple stmt, long widen); ++static long tw_gimple_return (gimple stmt, long widen); ++static long tw_gimple_asm (gimple stmt, long widen); ++static long tw_gimple_debug (gimple stmt, long widen); ++ ++static struct pointer_map_t *tw_candidate_list; ++ ++#if TW_DEBUG ++static void ++tw_dump_candidate_list (void) ++{ ++ TWDBG_MSG ("Dumping candidate list:\n"); ++ pointer_map_traverse (tw_candidate_list, tw_debug_candidate, NULL); ++ TWDBG_MSG ("Done dumping candidate list\n"); ++} ++ ++static ++bool tw_debug_candidate (const void *t, void **candidacy, void *data) ++{ ++ debug_tree (t); ++ fprintf(stderr, "candidacy: %ld\n data (ignore): %p", *((long *) candidacy), data); ++ return true; ++} ++#endif ++ ++static void ++tw_init (void) ++{ ++ gcc_assert (tw_candidate_list == NULL); ++ tw_candidate_list = pointer_map_create (); ++} ++ ++static void ++tw_reset (void) ++{ ++ if (tw_candidate_list) ++ { ++ pointer_map_destroy (tw_candidate_list); ++ tw_candidate_list = NULL; ++ } ++} ++ ++/* gcc.dg/torture/pr43879_[12].c ++ * Initialized statics should not be widened: ++ * ++ * void bar(int c) ++ * { ++ * static int x = 1; // if widened, x gets initialized to (2^32) ++ * if (c != x) __builtin_abort(); ++ * x--; ++ * } ++ * ++ * int main() ++ * { ++ * int c = 1; ++ * bar (1); ++ * return 0; ++ * } ++ * ++ * Likely, the initial value is laid out/translated to RTL way before ++ * the rest of the code is translated to GIMPLE; so when we widen the ++ * type, it's already too late. ++ */ ++ ++/* tw_candidate() has no way to tell if it was passed a local variable ++ * (or not) - so make sure it is passed local variables or parameters only. ++ */ ++static long ++tw_candidate (tree node) ++{ ++ long rv = 0; ++ ++ if (!node || TREE_TYPE (node) == error_mark_node) ++ return 0; ++ ++ if (node && TREE_TYPE (node) != error_mark_node && ++ ((TREE_CODE (node) == VAR_DECL && ++ /* See note: Initialized statics should not be widened. */ ++ (!TREE_STATIC (node) || !DECL_INITIAL (node))) || ++ TREE_CODE (node) == PARM_DECL || ++ TREE_CODE (node) == DEBUG_EXPR_DECL) && ++ !TYPE_VOLATILE (TREE_TYPE (node)) && ++ !TREE_ADDRESSABLE (node) && ++ !POINTER_TYPE_P (TREE_TYPE (node)) && ++ INTEGRAL_TYPE_P (TREE_TYPE (node)) && ++ !TYPE_UNSIGNED (TREE_TYPE (node)) && ++ (TYPE_PRECISION (TREE_TYPE (node)) < TYPE_PRECISION (long_integer_type_node))) ++ rv = 1; ++ return rv; ++} ++ ++static long ++tw_candidate_const (tree node) ++{ ++ long rv = 0; ++ ++ if (node && TREE_TYPE (node) != error_mark_node && ++ INTEGRAL_TYPE_P (TREE_TYPE (node)) && ++ TREE_CONSTANT (node) && ++ (TYPE_PRECISION (TREE_TYPE (node)) < TYPE_PRECISION (long_integer_type_node))) ++ rv = 1; ++ return rv; ++} ++ ++static long * ++tw_log_candidate (tree node) ++{ ++ long *pval = NULL; ++ ++ if (tw_candidate_list && node && TREE_TYPE (node) != error_mark_node) ++ { ++ pval = (long *) pointer_map_contains (tw_candidate_list, node); ++ if (!pval) ++ { ++ pval = (long *) pointer_map_insert (tw_candidate_list, node); ++ *pval = 1; ++ TWDBG_MSG ("Logged variable:\n"); ++ TWDBG_TREE (node); ++ } ++ } ++ return pval; ++} ++ ++static long ++tw_candidacy_valid (tree node) ++{ ++ long rval = 0; ++ long *pval = NULL; ++ ++ if (tw_candidate_list && node && TREE_TYPE (node) != error_mark_node) ++ pval = (long *) pointer_map_contains (tw_candidate_list, node); ++ if (pval) ++ rval = *pval ? 1 : 0; ++ return rval; ++} ++ ++static void ++tw_candidacy (tree node, long value) ++{ ++ long *pval; ++ ++ if (tw_candidate_list && node) ++ { ++ pval = (long *) pointer_map_contains (tw_candidate_list, node); ++ if (pval) ++ { ++ *pval = value; ++#if TW_DEBUG ++ fprintf (stderr, "Setting candidacy of node:\n"); ++ TWDBG_TREE (node); ++ fprintf (stderr, "to: %ld\n", value); ++#endif ++ } ++ } ++} ++ ++static long ++tw_in_candidate_list (tree node) ++{ ++ long *pval; ++ long rval = 0; ++ ++ if (tw_candidate_list && node && TREE_TYPE (node) != error_mark_node) ++ { ++ pval = (long *) pointer_map_contains (tw_candidate_list, node); ++ rval = pval ? 1 : 0; ++ } ++ return rval; ++} ++ ++static tree ++tw_widen_constant (tree node) ++{ ++ if (node && tw_candidate_const (node)) ++ node = build_int_cst (long_integer_type_node, TREE_INT_CST_LOW (node)); ++ ++ return node; ++} ++ ++static tree ++tw_widen_variable (tree node) ++{ ++ if (node && tw_candidacy_valid (node)) ++ { ++ TWDBG_MSG ("Widening:\n"); ++ TWDBG_TREE(node); ++ ++ TREE_TYPE (node) = build_qualified_type (long_integer_type_node, ++ TYPE_QUALS (TREE_TYPE (node))); ++ ++ if (TREE_CODE (node) != DEBUG_EXPR_DECL) ++ relayout_decl (node); ++ } ++ return node; ++} ++ ++#ifdef TW_FINALIZE_STMTS ++static long ++tw_fn_has_openmp (gimple_seq stmts) ++{ ++ gimple_stmt_iterator ittr; ++ long found_openmp = 0; ++ ++ for (ittr = gsi_start (stmts); !gsi_end_p (ittr) && !found_openmp; gsi_next (&ittr)) ++ { ++ gimple stmt = gsi_stmt (ittr); ++ ++ switch (gimple_code (stmt)) ++ { ++ case GIMPLE_BIND: ++ found_openmp = tw_fn_has_openmp (gimple_bind_body (stmt)); ++ break; ++ ++ case GIMPLE_TRY: ++ found_openmp = tw_fn_has_openmp (gimple_try_eval (stmt)); ++ found_openmp = tw_fn_has_openmp (gimple_try_cleanup (stmt)); ++ break; ++ ++ case GIMPLE_EH_FILTER: ++ found_openmp = tw_fn_has_openmp (gimple_eh_filter_failure (stmt)); ++ break; ++ ++ case GIMPLE_CATCH: ++ found_openmp = tw_fn_has_openmp (gimple_catch_handler (stmt)); ++ break; ++ ++ default: ++ switch (gimple_code (stmt)) ++ { ++ CASE_GIMPLE_OMP: ++ found_openmp = 1; ++ break; ++ default: ++ break; ++ } ++ } ++ } ++ return found_openmp; ++} ++#endif ++ ++/* Originally, we implemented type widening over the emitted GIMPLE ++ * sequence. Later on, we discovered that we needed to wait till ++ * after OpenMP expansion, so we implemented type widening over the ++ * CFG-BB form. ++ */ ++#ifdef TW_FINALIZE_STMTS ++struct gimple_opt_pass pass_widen_types_stmts = ++{ ++ { ++ GIMPLE_PASS, ++ "tw-stmts", /* name */ ++ NULL, /* gate */ ++ tw_finalize_stmts, /* execute */ ++ NULL, /* sub */ ++ NULL, /* next */ ++ 0, /* static_pass_number */ ++ TV_NONE, /* tv_id */ ++ PROP_gimple_any, /* properties_required */ ++ 0, /* properties_provided */ ++ 0, /* properties_destroyed */ ++ 0, /* todo_flags_start */ ++ TODO_dump_func /* todo_flags_finish */ ++ } ++}; ++#endif ++ ++struct gimple_opt_pass pass_widen_types_bbs = ++{ ++ { ++ GIMPLE_PASS, ++ "tw-bbs", /* name */ ++ NULL, /* gate */ ++ tw_finalize_bbs, /* execute */ ++ NULL, /* sub */ ++ NULL, /* next */ ++ 0, /* static_pass_number */ ++ TV_NONE, /* tv_id */ ++ PROP_gimple_any, /* properties_required */ ++ 0, /* properties_provided */ ++ 0, /* properties_destroyed */ ++ 0, /* todo_flags_start */ ++ TODO_dump_func /* todo_flags_finish */ ++ } ++}; ++ ++static ++void ++tw_log_parms (tree fndecl) ++{ ++ tree parm; ++ ++ if (!fndecl) ++ return; ++ for (parm = DECL_ARGUMENTS (fndecl); parm; parm = DECL_CHAIN (parm)) ++ if (tw_candidate (parm)) ++ tw_log_candidate (parm); ++ return; ++} ++ ++#ifdef TW_FINALIZE_STMTS ++static ++void ++tw_log_vars (gimple_seq stmts) ++{ ++ gimple_stmt_iterator ittr; ++ tree vars, vindex; ++ ++ if (!stmts) ++ return; ++ ++ gcc_assert (tw_candidate_list != NULL); ++ ++ for (ittr = gsi_start (stmts); !gsi_end_p (ittr); gsi_next (&ittr)) ++ { ++ gimple stmt = gsi_stmt (ittr); ++ ++ switch (gimple_code (stmt)) ++ { ++ case GIMPLE_BIND: ++ vars = gimple_bind_vars (stmt); ++ for (vindex = vars; vindex; vindex = DECL_CHAIN (vindex)) ++ if (tw_candidate (vindex)) ++ tw_log_candidate (vindex); ++ tw_log_vars (gimple_bind_body (stmt)); ++ break; ++ ++ case GIMPLE_TRY: ++ tw_log_vars (gimple_try_eval (stmt)); ++ tw_log_vars (gimple_try_cleanup (stmt)); ++ break; ++ ++ case GIMPLE_EH_FILTER: ++ tw_log_vars (gimple_eh_filter_failure (stmt)); ++ break; ++ ++ case GIMPLE_CATCH: ++ tw_log_vars (gimple_catch_handler (stmt)); ++ break; ++ ++ default: ++ break; ++ } ++ } ++ ++ return; ++} ++#endif ++ ++static ++void ++tw_log_local_decls (void) ++{ ++ tree decl; ++ unsigned ix; ++ ++ FOR_EACH_LOCAL_DECL (cfun, ix, decl) ++ { ++ TWDBG_MSG ("Testing decl:\n"); ++ TWDBG_TREE (decl); ++ if (tw_candidate (decl)) ++ tw_log_candidate (decl); ++ } ++} ++ ++/* Widen types. tw_finalize_stmts () can be run anytime immediately after ++ * gimplification but before the CFG pass (see comment * accompanying ++ * gimple_body ()). ++ * ++ * After gimplification has occurred, the emitted GIMPLE is ++ * scanned to check if these variables are only used among ++ * themselves (with the exception of being cast to unsigned long); ++ * invalidating the candidacy of any variable that is used with ++ * another outside this set (and so on recursively). The variables ++ * that remain after this process all occur in operations with other ++ * such candidate variables, (or with constants) - the type of all ++ * such residual candidate variables (and of constants that appear ++ * with these in operations) is changed to long (along with the ++ * original accompannying qualifiers on the type). ++ * ++ * void ++ * init_optimization_passes (void) ++ * ++ * p = &all_lowering_passes; ++ * NEXT_PASS (pass_widen_types_stmts); ++ * NEXT_PASS (pass_warn_unused_result); ++ */ ++#ifdef TW_FINALIZE_STMTS ++static ++unsigned int ++tw_finalize_stmts (void) ++{ ++ long iv = 0; ++ gimple_seq stmts; ++ tree fndecl = current_function_decl; ++ ++ if (strcmp (lang_hooks.name, "GNU C") != 0 || ++ seen_error () || ++ !flag_strict_overflow || ++ !flag_widen_types) ++ { ++ TWDBG_MSG ("Skipping: Language not C or seen error or -fno-strict-overflow or -fno-widen-types\n"); ++ return 0; ++ } ++ ++ /* gcc.dg/pr23518.c execution test */ ++ if (flag_wrapv) ++ { ++ TWDBG_MSG ("Skipping: -fwrapv specified.\n"); ++ return 0; ++ } ++ ++ if (debug_info_level == DINFO_LEVEL_NONE) ++ { ++ /* PS: That we cannot call relayout_decl () on DEBUG_EXPR_DECL is an ++ * issue: Debug information is generated after lowering from tree to ++ * GIMPLE; unless we widen before debug information is generated, the ++ * debug information will record pre-widening information - and that ++ * cannot be changed because relayout_decl () cannot be invoked on ++ * DEBUG_EXPR_DECL. expand_debug_locations () during cfgexpand will ++ * fail gcc_assert ()'s on the DEBUG_INSN's since e.g. the modes will ++ * not agree, etc. So if we are compiling -g, we ought to run the ++ * pass_widen_types_stmts. ++ * ++ * In short: pass_widen_types_stmts runs iff we're generating debug ++ * information. ++ */ ++ TWDBG_MSG ("Skipping: Debug level none.\n"); ++ return 0; ++ } ++ gcc_assert (debug_info_level != DINFO_LEVEL_NONE); ++ ++ if (!fndecl) ++ { ++ TWDBG_MSG ("Skipping: !fndecl.\n"); ++ return 0; ++ } ++ ++ TWDBG_MSG ("Widening function:\n"); ++ TWDBG_TREE (fndecl); ++ ++ stmts = gimple_body (fndecl); ++ ++ if (!stmts) ++ { ++ TWDBG_MSG ("Skipping: !stmts.\n"); ++ return 0; ++ } ++ ++ if (tw_fn_has_openmp (stmts)) ++ { ++ TWDBG_MSG ("Skipping: OpenMP stmts found.\n"); ++ return 0; ++ } ++ ++ /* Assume for now that we do not need to check for nested functions: ++ * (cgraph_get_node (fndecl) && cgraph_get_node (fndecl)->nested != NULL) || ++ * TREE_CODE (DECL_CONTEXT (fndecl)) != TRANSLATION_UNIT_DECL || ++ * Well, turns out that a nested function is processed only if it is ++ * actually invoked from within the function, so we are in good shape. ++ */ ++ ++ tw_init (); ++ tw_log_parms (fndecl); ++ tw_log_vars (stmts); ++#if TW_DEBUG ++ tw_dump_candidate_list (); ++#endif ++ ++ do ++ { ++ iv = tw_gimple_in_seq (stmts, 0); ++ } while (iv); ++ tw_gimple_in_seq (stmts, 1); ++ verify_types_in_gimple_seq (stmts); ++ ++ tw_reset (); ++ ++ return 0; ++} ++#endif ++ ++static ++unsigned int ++tw_finalize_bbs (void) ++{ ++ long iv = 0; ++ basic_block bb; ++ tree fndecl; ++ ++ if (strcmp (lang_hooks.name, "GNU C") != 0 || ++ seen_error () || ++ !flag_strict_overflow || ++ !flag_widen_types) ++ { ++ TWDBG_MSG ("Skipping: Language not C or seen error or -fno-strict-overflow or -fno-widen-types\n"); ++ return 0; ++ } ++ ++ /* gcc.dg/pr23518.c execution test */ ++ if (flag_wrapv) ++ { ++ TWDBG_MSG ("Skipping: -fwrapv specified.\n"); ++ return 0; ++ } ++ ++ if (debug_info_level != DINFO_LEVEL_NONE && flag_openmp) ++ { ++ /* Cannot run this pass as the debug information has already ++ * been recorded; If we type widen now, it'll lead to assert ++ * failures during RTL expansion in expandcfg.c since the ++ * debug information would all be prewidening and would ++ * mismatch with the postwidening information for the variables ++ * that got widened (but whoose debug information was already ++ * generated). This is all because we cannot call relayout_decl () ++ * on DEBUG_EXPR_DECL's - see note elsewhere. ++ */ ++ TWDBG_MSG ("Skipping: Non-zero debug level and -fopenmp specified.\n"); ++ return 0; ++ } ++ ++ if (!cfun || !(fndecl = cfun->decl) || !(cfun->cfg)) ++ { ++ TWDBG_MSG ("Skipping: !cfun or !fndecl or !(cfun->cfg).\n"); ++ return 0; ++ } ++ ++ TWDBG_MSG ("Widening function:\n"); ++ TWDBG_TREE (fndecl); ++ ++ /* Assume for now that we do not need to check for nested functions: ++ * (cgraph_get_node (fndecl) && cgraph_get_node (fndecl)->nested != NULL) || ++ * TREE_CODE (DECL_CONTEXT (fndecl)) != TRANSLATION_UNIT_DECL || ++ * Well, turns out that a nested function is processed only if it is ++ * actually invoked from within the function, so we are in good shape. ++ */ ++ ++ tw_init (); ++ tw_log_parms (fndecl); ++ tw_log_local_decls (); ++#if TW_DEBUG ++ tw_dump_candidate_list (); ++#endif ++ ++ do ++ { ++ iv = 0; ++ FOR_EACH_BB (bb) ++ iv += tw_gimple_in_bb (bb, 0); ++ } while (iv); ++ FOR_EACH_BB (bb) ++ tw_gimple_in_bb (bb, 1); ++ FOR_EACH_BB (bb) ++ verify_types_in_gimple_seq (bb_seq (bb)); ++ ++ tw_reset (); ++ ++ return 0; ++} ++ ++/* Assumes that we have run verify_gimple_in_seq (stmts) ++ * i.e. that we have valid gimple. ++ */ ++static long ++tw_gimple_in_seq (gimple_seq stmts, long widen) ++{ ++ gimple_stmt_iterator ittr; ++ long iv = 0; ++ ++ for (ittr = gsi_start (stmts); !gsi_end_p (ittr); gsi_next (&ittr)) ++ { ++ gimple stmt = gsi_stmt (ittr); ++ iv += tw_switch (stmt, widen); ++ } ++ return iv; ++} ++ ++static long ++tw_gimple_in_bb (basic_block bb, long widen) ++{ ++ gimple_stmt_iterator ittr; ++ long iv = 0; ++ ++#if TW_DEBUG ++ fprintf (stderr, "Dumping basic block (widen = %ld):\n", widen); ++ debug_bb (bb); ++ fprintf (stderr, "Done dumping basic block (widen = %ld)\n", widen); ++#endif ++ for (ittr = gsi_start_bb (bb); !gsi_end_p (ittr); gsi_next (&ittr)) ++ { ++ gimple stmt = gsi_stmt (ittr); ++ iv += tw_switch (stmt, widen); ++ } ++ return iv; ++} ++ ++static long ++tw_switch (gimple stmt, long widen) ++{ ++ long iv = 0; ++ ++ switch (gimple_code (stmt)) ++ { ++ case GIMPLE_BIND: ++ iv += tw_gimple_in_seq (gimple_bind_body (stmt), widen); ++ break; ++ ++ case GIMPLE_TRY: ++ iv += tw_gimple_in_seq (gimple_try_eval (stmt), widen); ++ iv += tw_gimple_in_seq (gimple_try_cleanup (stmt), widen); ++ break; ++ ++ case GIMPLE_EH_FILTER: ++ iv += tw_gimple_in_seq (gimple_eh_filter_failure (stmt), widen); ++ break; ++ ++ case GIMPLE_CATCH: ++ iv += tw_gimple_in_seq (gimple_catch_handler (stmt), widen); ++ break; ++ ++ default: ++ iv += tw_gimple_stmt (stmt, widen); ++ break; ++ } ++ return iv; ++} ++ ++/* tw_gimple_stmt () mimics verify_gimple_stmt () ++ */ ++static long ++tw_gimple_stmt (gimple stmt, long widen) ++{ ++ long iv = 0; ++ ++ switch (gimple_code (stmt)) ++ { ++ case GIMPLE_ASSIGN: ++ iv = tw_gimple_assign (stmt, widen); ++ break; ++ ++ case GIMPLE_CALL: ++ iv = tw_gimple_call (stmt, widen); ++ break; ++ ++ case GIMPLE_COND: ++ iv = tw_gimple_comparison (stmt, widen); ++ break; ++ ++ case GIMPLE_SWITCH: ++ iv = tw_gimple_switch (stmt, widen); ++ break; ++ ++ case GIMPLE_RETURN: ++ iv = tw_gimple_return (stmt, widen); ++ break; ++ ++ case GIMPLE_LABEL: ++ TWDBG_STMT(stmt); ++ break; ++ ++ case GIMPLE_GOTO: ++ TWDBG_STMT(stmt); ++ break; ++ ++ case GIMPLE_ASM: ++ iv = tw_gimple_asm (stmt, widen); ++ break; ++ ++ /* Tuples that do not have tree operands. */ ++ case GIMPLE_NOP: ++ case GIMPLE_PREDICT: ++ case GIMPLE_RESX: ++ case GIMPLE_EH_DISPATCH: ++ case GIMPLE_EH_MUST_NOT_THROW: ++ TWDBG_STMT(stmt); ++ break; ++ ++ CASE_GIMPLE_OMP: ++ TWDBG_STMT(stmt); ++ break; ++ ++ case GIMPLE_DEBUG: ++ iv = tw_gimple_debug (stmt, widen); ++ break; ++ ++ default: ++ gcc_unreachable (); ++ } ++ return iv; ++} ++ ++static long ++tw_gimple_assign (gimple stmt, long widen) ++{ ++ long iv = 0; ++ ++ switch (gimple_assign_rhs_class (stmt)) ++ { ++ case GIMPLE_SINGLE_RHS: ++ iv = tw_gimple_assign_single (stmt, widen); ++ break; ++ ++ case GIMPLE_UNARY_RHS: ++ iv = tw_gimple_assign_unary (stmt, widen); ++ break; ++ ++ case GIMPLE_BINARY_RHS: ++ iv = tw_gimple_assign_binary (stmt, widen); ++ break; ++ ++ case GIMPLE_TERNARY_RHS: ++ iv = tw_gimple_assign_ternary (stmt, widen); ++ break; ++ ++ default: ++ gcc_unreachable (); ++ } ++ return iv; ++} ++ ++static long ++tw_gimple_assign_single (gimple stmt, long widen) ++{ ++ tree lhs = gimple_assign_lhs (stmt); ++ tree rhs1 = gimple_assign_rhs1 (stmt); ++ tree value; ++ long iv = 0; ++ unsigned int idx; ++ ++ TWDBG_STMT(stmt); ++ TWDBG_TREE(lhs); ++ TWDBG_TREE(rhs1); ++ ++ if (widen) ++ { ++ TWDBG_MSG ("Widening run.\n"); ++ if (TREE_CODE (rhs1) == ARRAY_REF && ++ tw_candidacy_valid (TREE_OPERAND (rhs1, 1))) ++ { ++ /* Note that we are widening the array index, hence no ++ * gimple_assign_set_rhs1 () */ ++ tw_widen_variable (TREE_OPERAND (rhs1, 1)); ++ } ++ else if (TREE_CODE (lhs) == ARRAY_REF && ++ tw_candidacy_valid (TREE_OPERAND (lhs, 1))) ++ { ++ /* Note that we are widening the array index, hence no ++ * gimple_assign_set_lhs () */ ++ tw_widen_variable (TREE_OPERAND (lhs, 1)); ++ } ++ else if (tw_candidacy_valid (lhs) && tw_candidate_const (rhs1)) ++ { ++ gimple_assign_set_lhs (stmt, tw_widen_variable (lhs)); ++ gimple_assign_set_rhs1 (stmt, tw_widen_constant (rhs1)); ++ } ++ else if (tw_candidacy_valid (lhs) && tw_candidacy_valid (rhs1)) ++ { ++ gimple_assign_set_lhs (stmt, tw_widen_variable (lhs)); ++ gimple_assign_set_rhs1 (stmt, tw_widen_variable (rhs1)); ++ } ++ } ++ else ++ { ++ TWDBG_MSG ("Validating run.\n"); ++ if (tw_candidacy_valid (lhs) && tw_candidate_const (rhs1)) ++ return iv; ++ if (tw_candidacy_valid (lhs) && tw_candidacy_valid (rhs1)) ++ return iv; ++ if (TREE_CODE (lhs) == VAR_DECL && TREE_CODE (TREE_TYPE (lhs)) == VECTOR_TYPE && ++ TREE_CODE (rhs1) == CONSTRUCTOR && TREE_CODE (TREE_TYPE (rhs1)) == VECTOR_TYPE) ++ { ++ FOR_EACH_CONSTRUCTOR_VALUE (CONSTRUCTOR_ELTS (rhs1), idx, value) ++ { ++ if (tw_candidacy_valid (value)) ++ { ++ TWDBG_MSG ("Invalidating candidacy of constructor element:\n"); ++ TWDBG_TREE (value); ++ tw_candidacy (value, 0); ++ iv++; ++ } ++ } ++ } ++ if (tw_candidacy_valid (lhs)) ++ { ++ tw_candidacy (lhs, 0); ++ iv++; ++ } ++ if (tw_candidacy_valid (rhs1)) ++ { ++ tw_candidacy (rhs1, 0); ++ iv++; ++ } ++ } ++ return iv; ++} ++ ++static long ++tw_gimple_assign_unary (gimple stmt, long widen) ++{ ++ tree lhs = gimple_assign_lhs (stmt); ++ tree rhs1 = gimple_assign_rhs1 (stmt); ++ long iv = 0; ++ ++ TWDBG_STMT(stmt); ++ TWDBG_TREE(lhs); ++ TWDBG_TREE(rhs1); ++ ++ if (widen) ++ { ++ TWDBG_MSG ("Widening run.\n"); ++ if (gimple_assign_rhs_code (stmt) == NOP_EXPR && ++ tw_candidacy_valid (rhs1) && ++ (TREE_TYPE (lhs) == long_unsigned_type_node || ++ TREE_TYPE (lhs) == long_integer_type_node)) ++ gimple_assign_set_rhs1 (stmt, tw_widen_variable (rhs1)); ++ } ++ else ++ { ++ TWDBG_MSG ("Validating run.\n"); ++ if (gimple_assign_rhs_code (stmt) == NOP_EXPR && ++ tw_candidacy_valid (rhs1) && ++ (TREE_TYPE (lhs) == long_unsigned_type_node || ++ TREE_TYPE (lhs) == long_integer_type_node)) ++ return iv; ++ if (tw_candidacy_valid (lhs)) ++ { ++ tw_candidacy (lhs, 0); ++ iv++; ++ } ++ if (tw_candidacy_valid (rhs1)) ++ { ++ tw_candidacy (rhs1, 0); ++ iv++; ++ } ++ } ++ return iv; ++} ++ ++static long ++tw_gimple_assign_binary (gimple stmt, long widen) ++{ ++ tree lhs = gimple_assign_lhs (stmt); ++ tree rhs1 = gimple_assign_rhs1 (stmt); ++ tree rhs2 = gimple_assign_rhs2 (stmt); ++ long iv = 0; ++ ++ TWDBG_STMT(stmt); ++ TWDBG_TREE(lhs); ++ TWDBG_TREE(rhs1); ++ TWDBG_TREE(rhs2); ++ ++ if (widen) ++ { ++ TWDBG_MSG ("Widening run.\n"); ++ if (tw_candidacy_valid (lhs) && tw_candidacy_valid (rhs1) && tw_candidate_const (rhs2)) ++ { ++ gimple_assign_set_lhs (stmt, tw_widen_variable (lhs)); ++ gimple_assign_set_rhs1 (stmt, tw_widen_variable (rhs1)); ++ gimple_assign_set_rhs2 (stmt, tw_widen_constant (rhs2)); ++ } ++ else if (tw_candidacy_valid (lhs) && tw_candidacy_valid (rhs1) && tw_candidacy_valid (rhs2)) ++ { ++ gimple_assign_set_lhs (stmt, tw_widen_variable (lhs)); ++ gimple_assign_set_rhs1 (stmt, tw_widen_variable (rhs1)); ++ gimple_assign_set_rhs2 (stmt, tw_widen_variable (rhs2)); ++ } ++ } ++ else ++ { ++ TWDBG_MSG ("Validating run.\n"); ++ if (tw_candidacy_valid (lhs) && tw_candidacy_valid (rhs1) && tw_candidate_const (rhs2)) ++ return iv; ++ if (tw_candidacy_valid (lhs) && tw_candidacy_valid (rhs1) && tw_candidacy_valid (rhs2)) ++ return iv; ++ if (tw_candidacy_valid (lhs)) ++ { ++ tw_candidacy (lhs, 0); ++ iv++; ++ } ++ if (tw_candidacy_valid (rhs1)) ++ { ++ tw_candidacy (rhs1, 0); ++ iv++; ++ } ++ if (tw_candidacy_valid (rhs2)) ++ { ++ tw_candidacy (rhs2, 0); ++ iv++; ++ } ++ } ++ return iv; ++} ++ ++static long ++tw_gimple_assign_ternary (gimple stmt, long widen) ++{ ++ tree lhs = gimple_assign_lhs (stmt); ++ tree rhs1 = gimple_assign_rhs1 (stmt); ++ tree rhs2 = gimple_assign_rhs2 (stmt); ++ tree rhs3 = gimple_assign_rhs3 (stmt); ++ long iv = 0; ++ ++ TWDBG_STMT(stmt); ++ TWDBG_TREE(lhs); ++ TWDBG_TREE(rhs1); ++ TWDBG_TREE(rhs2); ++ TWDBG_TREE(rhs3); ++ ++ if (widen) ++ { ++ TWDBG_MSG ("Widening run.\n"); ++ return iv; ++ } ++ ++ TWDBG_MSG ("Validating run.\n"); ++ if (tw_candidacy_valid (lhs)) ++ { ++ tw_candidacy (lhs, 0); ++ iv++; ++ } ++ if (tw_candidacy_valid (rhs1)) ++ { ++ tw_candidacy (rhs1, 0); ++ iv++; ++ } ++ if (tw_candidacy_valid (rhs2)) ++ { ++ tw_candidacy (rhs2, 0); ++ iv++; ++ } ++ if (tw_candidacy_valid (rhs3)) ++ { ++ tw_candidacy (rhs3, 0); ++ iv++; ++ } ++ return iv; ++} ++ ++/* Ref. WG14/N1256 Committee Draft - September 7, 2007 ISO/IEC 9899:TC3 ++ * 7.19.6 Formatted input/output functions ++ * Sec. 17.19.6.[1 ... 14] ++ */ ++#define IO_FN_COUNT 14 ++static const char *IO_fn_names[IO_FN_COUNT] = ++{ ++ "fprintf", "fscanf", ++ "printf", "scanf", ++ "snprintf", ++ "sprintf", "sscanf", ++ "vfprintf", "vfscanf", ++ "vprintf", "vscanf", ++ "vsnprintf", ++ "vsprintf", "vsscanf", ++}; ++ ++static bool ++is_formatted_IO_fn (tree decl) ++{ ++ const char *fn_name; ++ long i; ++ ++ if (decl && TREE_CODE (decl) == FUNCTION_DECL && ++ DECL_NAME (decl) /* TREE_CODE (decl) == IDENTIFIER_NODE */ && ++ (fn_name = IDENTIFIER_POINTER (DECL_NAME (decl)))) ++ { ++ for (i = 0; i < IO_FN_COUNT; i++) ++ if (strcmp (IO_fn_names[i], fn_name) == 0) ++ return true; ++ } ++ return false; ++} ++ ++/* TODO: If you have: ++ * ++ * int i, n, f(); ++ * ++ * n = f(); ++ * ++ * for (i = 0; i < n; i++) ++ * // stuff ++ * ++ * then (after the candidate set stabilizes) do: ++ * ++ * int n, f(); ++ * long twl.n; ++ * ++ * n = f(); ++ * twl.n = (long) n; ++ * ++ * for (i = 0; i < twl.n; i++) ++ * // stuff ++ * ++ * only if adding twl.n does not decrease the size of the stabilized ++ * candidate set or "cause any other damage". ++ * ++ * This should help in benchmarks where parameters are set via function ++ * calls to prevent them from being optimized away. ++ * ++ */ ++static long ++tw_gimple_call (gimple stmt, long widen) ++{ ++#if TW_DEBUG ++ tree fn = gimple_call_fn (stmt); ++#endif ++ long iv = 0; ++ unsigned i; ++ tree arg; ++ ++ TWDBG_STMT(stmt); ++ TWDBG_TREE(fn); ++ TWDBG_TREE(gimple_call_fndecl (stmt)); ++ ++ if (widen) ++ { ++ TWDBG_MSG ("Widening run.\n"); ++ for (i = 0; i < gimple_call_num_args (stmt); i++) ++ { ++ arg = gimple_call_arg (stmt, i); ++ if (arg && tw_candidacy_valid (arg)) ++ gimple_call_set_arg (stmt, i, tw_widen_variable (arg)); ++ } ++ return iv; ++ } ++ ++ TWDBG_MSG ("Validating run.\n"); ++ if (gimple_call_lhs (stmt) && tw_candidacy_valid (gimple_call_lhs (stmt))) ++ { ++ tw_candidacy (gimple_call_lhs (stmt), 0); ++ iv++; ++ } ++ if (gimple_call_fndecl (stmt) && ++ (is_builtin_fn (gimple_call_fndecl (stmt)) || ++ is_formatted_IO_fn (gimple_call_fndecl (stmt)))) ++ { ++ /* Certain types of function (printf-scanf family, ++ * formatted IO functions, builtin functions) ought ++ * not to have their args widened. ++ * ++ * e.g. A call to printf () such as: ++ * int x; ++ * printf ("%d", x); ++ * because, we cannot change the %d to a %ld. ++ * ++ * or e.g. in: ++ * ++ * int D.2852; ++ * int si; ++ * ++ * si = 2; ++ * __builtin_altivec_dst (&vi, si, 0); ++ * D.2852 = 0; ++ * ++ * si should not be widened. ++ * ++ * PS: We could generate code for casts to their original types in the ++ * call, but that would slow-down performance and we do not expect ++ * a loop index to be used in a call to a formatted IO function. ++ */ ++ for (i = 0; i < gimple_call_num_args (stmt); i++) ++ { ++ arg = gimple_call_arg (stmt, i); ++ if (arg && tw_candidacy_valid (arg)) ++ { ++ tw_candidacy (arg, 0); ++ iv++; ++ } ++ } ++ } ++ return iv; ++} ++ ++static long ++tw_gimple_comparison (gimple stmt, long widen) ++{ ++ tree lhs = gimple_cond_lhs (stmt); ++ tree rhs = gimple_cond_rhs (stmt); ++ long iv = 0; ++ ++ TWDBG_STMT(stmt); ++ TWDBG_TREE(lhs); ++ TWDBG_TREE(rhs); ++ ++ if (widen) ++ { ++ TWDBG_MSG ("Widening run.\n"); ++ if (tw_candidacy_valid (lhs) && tw_candidate_const (rhs)) ++ { ++ gimple_cond_set_lhs (stmt, tw_widen_variable (lhs)); ++ gimple_cond_set_rhs (stmt, tw_widen_constant (rhs)); ++ } ++ else if (tw_candidate_const (lhs) && tw_candidacy_valid (rhs)) ++ { ++ gimple_cond_set_lhs (stmt, tw_widen_constant (lhs)); ++ gimple_cond_set_rhs (stmt, tw_widen_variable (rhs)); ++ } ++ else if (tw_candidacy_valid (lhs) && tw_candidacy_valid (rhs)) ++ { ++ gimple_cond_set_lhs (stmt, tw_widen_variable (lhs)); ++ gimple_cond_set_rhs (stmt, tw_widen_variable (rhs)); ++ } ++ } ++ else ++ { ++ TWDBG_MSG ("Validating run.\n"); ++ if (tw_candidacy_valid (lhs) && tw_candidate_const (rhs)) ++ return iv; ++ if (tw_candidate_const (lhs) && tw_candidacy_valid (rhs)) ++ return iv; ++ if (tw_candidacy_valid (lhs) && tw_candidacy_valid (rhs)) ++ return iv; ++ if (tw_candidacy_valid (lhs)) ++ { ++ tw_candidacy (lhs, 0); ++ iv++; ++ } ++ if (tw_candidacy_valid (rhs)) ++ { ++ tw_candidacy (rhs, 0); ++ iv++; ++ } ++ } ++ return iv; ++} ++ ++static long ++tw_gimple_switch (gimple stmt, long widen) ++{ ++ tree index = gimple_switch_index (stmt); ++ long iv = 0; ++ ++ TWDBG_STMT(stmt); ++ TWDBG_TREE(index); ++ ++ if (widen && tw_candidacy_valid (index)) ++ { ++ TWDBG_MSG ("Widening run.\n"); ++ gimple_switch_set_index (stmt, tw_widen_variable (index)); ++ return iv; ++ } ++ ++ TWDBG_MSG ("Validating run.\n"); ++ return iv; ++} ++ ++static long ++tw_gimple_return (gimple stmt, long widen) ++{ ++ tree op = gimple_return_retval (stmt); ++ long iv = 0; ++ ++ TWDBG_STMT(stmt); ++ TWDBG_TREE(op); ++ ++ if (widen) ++ { ++ TWDBG_MSG ("Widening run.\n"); ++ return iv; ++ } ++ ++ TWDBG_MSG ("Validating run.\n"); ++ if (tw_candidacy_valid (op)) ++ { ++ tw_candidacy (op, 0); ++ iv++; ++ } ++ return iv; ++} ++ ++static long ++tw_gimple_asm (gimple stmt, long widen) ++{ ++ long iv = 0; ++ unsigned int ninputs = gimple_asm_ninputs (stmt); ++ unsigned int noutputs = gimple_asm_noutputs (stmt); ++ unsigned int nclobbers = gimple_asm_nclobbers (stmt); ++ unsigned int i; ++ ++ TWDBG_STMT(stmt); ++ TWDBG_MSG("Inputs:\n"); ++ for (i = 0; i < ninputs; i++) ++ { ++ TWDBG_MSG1 ("input %d\n", i); ++ TWDBG_TREE (gimple_asm_input_op (stmt, i)); ++ } ++ TWDBG_MSG("Outputs:\n"); ++ for (i = 0; i < noutputs; i++) ++ { ++ TWDBG_MSG1 ("output %d\n", i); ++ TWDBG_TREE (gimple_asm_output_op (stmt, i)); ++ } ++ TWDBG_MSG("Clobbers:\n"); ++ for (i = 0; i < nclobbers; i++) ++ { ++ TWDBG_MSG1 ("clobber %d\n", i); ++ TWDBG_TREE (gimple_asm_clobber_op (stmt, i)); ++ } ++ if (widen) ++ { ++ TWDBG_MSG ("Widening run.\n"); ++ return iv; ++ } ++ TWDBG_MSG ("Validating run.\n"); ++ for (i = 0; i < ninputs; i++) ++ { ++ if (tw_candidacy_valid (gimple_asm_input_op (stmt, i))) ++ { ++ tw_candidacy (gimple_asm_input_op (stmt, i), 0); ++ iv++; ++ } ++ } ++ for (i = 0; i < noutputs; i++) ++ { ++ if (tw_candidacy_valid (gimple_asm_output_op (stmt, i))) ++ { ++ tw_candidacy (gimple_asm_output_op (stmt, i), 0); ++ iv++; ++ } ++ } ++ for (i = 0; i < nclobbers; i++) ++ { ++ if (tw_candidacy_valid (gimple_asm_clobber_op (stmt, i))) ++ { ++ tw_candidacy (gimple_asm_clobber_op (stmt, i), 0); ++ iv++; ++ } ++ } ++ return iv; ++} ++ ++static long ++tw_gimple_debug (gimple stmt, long widen) ++{ ++ long iv = 0; ++ tree var, value; ++ ++ var = gimple_debug_bind_get_var (stmt); ++ value = gimple_debug_bind_get_value (stmt); ++ ++ TWDBG_STMT(stmt); ++ TWDBG_TREE(var); ++ TWDBG_TREE(value); ++ ++ /* TODO: What if the value is a constant? */ ++ ++ if (widen) ++ { ++ TWDBG_MSG ("Widening run.\n"); ++ if (tw_candidacy_valid (var) && tw_candidacy_valid (value)) ++ { ++ gimple_debug_bind_set_var (stmt, tw_widen_variable (var)); ++ gimple_debug_bind_set_value (stmt, tw_widen_variable (value)); ++ } ++ else if (tw_candidacy_valid (var) && tw_candidate_const (value)) ++ { ++ gimple_debug_bind_set_var (stmt, tw_widen_variable (var)); ++ gimple_debug_bind_set_value (stmt, tw_widen_constant (value)); ++ } ++ } ++ else ++ { ++ TWDBG_MSG ("Validating run.\n"); ++ ++ if (var && !tw_in_candidate_list (var) && tw_candidate (var)) ++ tw_log_candidate (var); ++ if (value && !tw_in_candidate_list (value) && tw_candidate (value)) ++ tw_log_candidate (value); ++ if (tw_candidacy_valid (var) && tw_candidacy_valid (value)) ++ return iv; ++ if (tw_candidacy_valid (var)) ++ { ++ tw_candidacy (var, 0); ++ iv++; ++ } ++ if (tw_candidacy_valid (value)) ++ { ++ tw_candidacy (value, 0); ++ iv++; ++ } ++ } ++ ++ return iv; ++} ++ ++/* Notes: ++ * ------ ++ * ++ * Limitations to be documented: ++ * 0. -g -fopenmp not supported. ++ * ++ * Known DejaGNU failures: ++ * 0. FAIL: gcc.dg/pr38245-2.c scan-tree-dump-not optimized "link_error" ++ * This failure is because the optimization is dependent on the type of the variable; ++ * once the type of the variable has changed from int to long, the inequalities in ++ * this test case no longer hold and the code cannot be optimized anymore, consequently, ++ * the test fails. ++ * ++ * DejaGNU failures that are not due to type-widening: ++ * 0. gcc.dg/vect/vect-120.c scan-tree-dump-times vect "vectorized 1 loops" 1 ++ * 1.gcc.dg/vect/vect-120.c -flto scan-tree-dump-times vect "vectorized 1 loops" 1 ++ * ++ * DejaGNU PASS'es with -fwiden-types (but FAIL's in the baseline - the baseline needs ++ * to be fixed - it just so happens that the debug information happens to be better in ++ * the type-converted case. We have verified that the generated assembly is the same in ++ * either case (or has extsw eliminated)): ++ * gcc.dg/guality/pr45882.c ++ * gcc.dg/guality/pr43177.c ++ * ++ */ diff --git a/meta-fsl-ppc/recipes-devtools/gcc/files/optional_libstdc.patch b/meta-fsl-ppc/recipes-devtools/gcc/files/optional_libstdc.patch new file mode 100644 index 00000000..fe157a89 --- /dev/null +++ b/meta-fsl-ppc/recipes-devtools/gcc/files/optional_libstdc.patch @@ -0,0 +1,86 @@ +Upstream-Status: Inappropriate [embedded specific] + +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 + +Index: gcc-4.6.0/gcc/cp/g++spec.c +=================================================================== +--- gcc-4.6.0.orig/gcc/cp/g++spec.c ++++ gcc-4.6.0/gcc/cp/g++spec.c +@@ -127,6 +127,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.6.0/gcc/doc/invoke.texi +=================================================================== +--- gcc-4.6.0.orig/gcc/doc/invoke.texi ++++ gcc-4.6.0/gcc/doc/invoke.texi +@@ -193,7 +193,7 @@ in the following sections. + -fno-pretty-templates @gol + -frepo -fno-rtti -fstats -ftemplate-depth=@var{n} @gol + -fno-threadsafe-statics -fuse-cxa-atexit -fno-weak -nostdinc++ @gol +--fno-default-inline -fvisibility-inlines-hidden @gol ++-nostdlib++ -fno-default-inline -fvisibility-inlines-hidden @gol + -fvisibility-ms-compat @gol + -Wabi -Wconversion-null -Wctor-dtor-privacy @gol + -Wnoexcept -Wnon-virtual-dtor -Wreorder @gol +@@ -431,7 +431,7 @@ Objective-C and Objective-C++ Dialects}. + @gccoptlist{@var{object-file-name} -l@var{library} @gol + -nostartfiles -nodefaultlibs -nostdlib -pie -rdynamic @gol + -s -static -static-libgcc -static-libstdc++ -shared @gol +--shared-libgcc -symbolic @gol ++-shared-libgcc -symbolic -nostdlib++ @gol + -T @var{script} -Wl,@var{option} -Xlinker @var{option} @gol + -u @var{symbol}} + +@@ -9069,6 +9069,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.6.0/gcc/c-family/c.opt +=================================================================== +--- gcc-4.6.0.orig/gcc/c-family/c.opt ++++ gcc-4.6.0/gcc/c-family/c.opt +@@ -1111,6 +1111,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.6.0/gcc/gcc.c +=================================================================== +--- gcc-4.6.0.orig/gcc/gcc.c ++++ gcc-4.6.0/gcc/gcc.c +@@ -666,6 +666,7 @@ proper position among the other output f + %(mflib) " STACK_SPLIT_SPEC "\ + %{fprofile-arcs|fprofile-generate*|coverage:-lgcov}\ + %{!nostdlib:%{!nodefaultlibs:%(link_ssp) %(link_gcc_c_sequence)}}\ ++ %{!nostdlib++:}\ + %{!nostdlib:%{!nostartfiles:%E}} %{T*} }}}}}}" + #endif + diff --git a/meta-fsl-ppc/recipes-devtools/gcc/gcc-cross-canadian_4.6.bbappend b/meta-fsl-ppc/recipes-devtools/gcc/gcc-cross-canadian_4.6.bbappend new file mode 100644 index 00000000..1c725f2f --- /dev/null +++ b/meta-fsl-ppc/recipes-devtools/gcc/gcc-cross-canadian_4.6.bbappend @@ -0,0 +1 @@ +require gcc-fsl.inc diff --git a/meta-fsl-ppc/recipes-devtools/gcc/gcc-cross-initial_4.6.bbappend b/meta-fsl-ppc/recipes-devtools/gcc/gcc-cross-initial_4.6.bbappend new file mode 100644 index 00000000..1c725f2f --- /dev/null +++ b/meta-fsl-ppc/recipes-devtools/gcc/gcc-cross-initial_4.6.bbappend @@ -0,0 +1 @@ +require gcc-fsl.inc diff --git a/meta-fsl-ppc/recipes-devtools/gcc/gcc-cross-intermediate_4.6.bbappend b/meta-fsl-ppc/recipes-devtools/gcc/gcc-cross-intermediate_4.6.bbappend new file mode 100644 index 00000000..1c725f2f --- /dev/null +++ b/meta-fsl-ppc/recipes-devtools/gcc/gcc-cross-intermediate_4.6.bbappend @@ -0,0 +1 @@ +require gcc-fsl.inc diff --git a/meta-fsl-ppc/recipes-devtools/gcc/gcc-cross_4.6.bbappend b/meta-fsl-ppc/recipes-devtools/gcc/gcc-cross_4.6.bbappend new file mode 100644 index 00000000..1c725f2f --- /dev/null +++ b/meta-fsl-ppc/recipes-devtools/gcc/gcc-cross_4.6.bbappend @@ -0,0 +1 @@ +require gcc-fsl.inc diff --git a/meta-fsl-ppc/recipes-devtools/gcc/gcc-crosssdk-initial_4.6.bbappend b/meta-fsl-ppc/recipes-devtools/gcc/gcc-crosssdk-initial_4.6.bbappend new file mode 100644 index 00000000..1c725f2f --- /dev/null +++ b/meta-fsl-ppc/recipes-devtools/gcc/gcc-crosssdk-initial_4.6.bbappend @@ -0,0 +1 @@ +require gcc-fsl.inc diff --git a/meta-fsl-ppc/recipes-devtools/gcc/gcc-crosssdk-intermediate_4.6.bbappend b/meta-fsl-ppc/recipes-devtools/gcc/gcc-crosssdk-intermediate_4.6.bbappend new file mode 100644 index 00000000..ed27db03 --- /dev/null +++ b/meta-fsl-ppc/recipes-devtools/gcc/gcc-crosssdk-intermediate_4.6.bbappend @@ -0,0 +1,22 @@ +require gcc-fsl.inc + +do_install () { + oe_runmake 'DESTDIR=${D}' install + install -d ${D}${target_base_libdir}/ + cp -rf ${D}${exec_prefix}/${TARGET_SYS}/${baselib}/ ${D}${target_base_libdir}/ + + # We don't really need this (here shares/ contains man/, info/, locale/). + rm -rf ${D}${datadir}/ + + # We use libiberty from binutils + find ${D}${exec_prefix}/lib -name libiberty.a | xargs rm -f + find ${D}${exec_prefix}/lib -name libiberty.h | xargs rm -f + + # Insert symlinks into libexec so when tools without a prefix are searched for, the correct ones are + # found. These need to be relative paths so they work in different locations. + dest=${D}${libexecdir}/gcc/${TARGET_SYS}/${BINV}/ + install -d $dest + for t in ar as ld nm objcopy objdump ranlib strip g77 gcc cpp gfortran; do + ln -sf ${BINRELPATH}/${TARGET_PREFIX}$t $dest$t + done +} diff --git a/meta-fsl-ppc/recipes-devtools/gcc/gcc-crosssdk_4.6.bbappend b/meta-fsl-ppc/recipes-devtools/gcc/gcc-crosssdk_4.6.bbappend new file mode 100644 index 00000000..1c725f2f --- /dev/null +++ b/meta-fsl-ppc/recipes-devtools/gcc/gcc-crosssdk_4.6.bbappend @@ -0,0 +1 @@ +require gcc-fsl.inc diff --git a/meta-fsl-ppc/recipes-devtools/gcc/gcc-fsl.inc b/meta-fsl-ppc/recipes-devtools/gcc/gcc-fsl.inc new file mode 100644 index 00000000..83d519c6 --- /dev/null +++ b/meta-fsl-ppc/recipes-devtools/gcc/gcc-fsl.inc @@ -0,0 +1,44 @@ +#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" + +BINV = "4.6.2" + +SRCREV = "180516" +# ignore linaro backports since we are changing the SRCREV +GCC-4_6-BRANCH-LINARO-BACKPORTS = "" + +SRC_URI = "svn://gcc.gnu.org/svn/gcc/branches;module=${BRANCH};proto=http \ + file://gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch \ + file://gcc.fix_longversionstring.patch \ + file://gcc.rm_slow_tests.patch \ + file://gcc.fix_mingw32.patch \ + file://gcc.fix_cloogstatic2.patch \ + file://gcc.fix_build-with-cxx.patch \ + file://gcc.e6500-FSF46.patch \ + file://gcc.ld_unaligned-460.patch \ + file://gcc.local_unaligned_altivec.patch \ + file://gcc.soft_float-460.patch \ + file://gcc.case_values.patch \ + file://gcc.builtin_isel.patch \ + file://gcc.experimental_move.patch \ + file://gcc.widen_types-46.patch \ + file://gcc.extelim-v3.patch \ + file://gcc.e5500_mfocr.patch \ + file://gcc.opt-array-offset.patch \ + file://gcc.load_on_store_bypass-462.patch \ + file://gcc.fix_constvector.patch \ + file://gcc.fix_MTWX51204-dwarf-vector-reg.patch \ + file://gcc.fix_ira-loop-pressure.patch \ + file://optional_libstdc.patch \ + file://gcc.remove_CCUNSmode_reference.patch \ + file://gcc.check_path_validity.patch \ + file://gcc.fix_header_issue.patch \ + file://gcc.fix_SSIZE_MAX_undefine_issue.patch \ +" + +FILESEXTRAPATHS_prepend := "${THISDIR}/files:" + +PR .= "+${DISTRO}.0" diff --git a/meta-fsl-ppc/recipes-devtools/gcc/gcc-runtime_4.6.bbappend b/meta-fsl-ppc/recipes-devtools/gcc/gcc-runtime_4.6.bbappend new file mode 100644 index 00000000..1c725f2f --- /dev/null +++ b/meta-fsl-ppc/recipes-devtools/gcc/gcc-runtime_4.6.bbappend @@ -0,0 +1 @@ +require gcc-fsl.inc diff --git a/meta-fsl-ppc/recipes-devtools/gcc/gcc_4.6.bbappend b/meta-fsl-ppc/recipes-devtools/gcc/gcc_4.6.bbappend new file mode 100644 index 00000000..1c725f2f --- /dev/null +++ b/meta-fsl-ppc/recipes-devtools/gcc/gcc_4.6.bbappend @@ -0,0 +1 @@ +require gcc-fsl.inc diff --git a/meta-fsl-ppc/recipes-devtools/gcc/libgcc_4.6.bbappend b/meta-fsl-ppc/recipes-devtools/gcc/libgcc_4.6.bbappend new file mode 100644 index 00000000..1c725f2f --- /dev/null +++ b/meta-fsl-ppc/recipes-devtools/gcc/libgcc_4.6.bbappend @@ -0,0 +1 @@ +require gcc-fsl.inc -- cgit v1.2.3-54-g00ecf From 5d385ce7453e5d299ce48974cb11664c9b23926e Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Tue, 13 Mar 2012 14:55:41 -0500 Subject: gcc-fsl.inc: Add patches to fix gxx-include-dir The patch in this patch is copied from upstream and is just updated to apply cleanly with respect to our patch series Signed-off-by: Matthew McClintock --- .../GPLUSPLUS_INCLUDE_DIR_with_sysroot_fsl.patch | 186 +++++++++++++++++++++ meta-fsl-ppc/recipes-devtools/gcc/gcc-fsl.inc | 3 +- 2 files changed, 188 insertions(+), 1 deletion(-) create mode 100644 meta-fsl-ppc/recipes-devtools/gcc/files/GPLUSPLUS_INCLUDE_DIR_with_sysroot_fsl.patch diff --git a/meta-fsl-ppc/recipes-devtools/gcc/files/GPLUSPLUS_INCLUDE_DIR_with_sysroot_fsl.patch b/meta-fsl-ppc/recipes-devtools/gcc/files/GPLUSPLUS_INCLUDE_DIR_with_sysroot_fsl.patch new file mode 100644 index 00000000..6ae6190e --- /dev/null +++ b/meta-fsl-ppc/recipes-devtools/gcc/files/GPLUSPLUS_INCLUDE_DIR_with_sysroot_fsl.patch @@ -0,0 +1,186 @@ +source: http://patchwork.ozlabs.org/patch/129800/ +Upstream-Status: Submitted + +ChangeLog + * Makefile.in (gcc_gxx_include_dir_add_sysroot): New. + (PREPROCESSOR_DEFINES): Define GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT. + + * cppdefault.c (cpp_include_defaults): replace hard coded "1" with + GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT for "add_sysroot" field. + + * configure.ac (AC_SUBST): Add gcc_gxx_include_dir_add_sysroot to + control whether sysroot should be prepended to gxx include dir. + + * configure: Regenerate. + +Hi, this is a follow up for issue "http://codereview.appspot.com/4641076". + +The rationale for the patch copied from previous thread: +======================================= +The setup: + +Configuring a toolchain targeting x86-64 GNU Linux (Ubuntu Lucid), as a +cross-compiler. Using a sysroot to provide the Lucid headers+libraries, +with the sysroot path being within the GCC install tree. Want to use the +Lucid system libstdc++ and headers, which means that I'm not +building/installing libstdc++-v3. + +So, configuring with: + --with-sysroot="$SYSROOT" + --disable-libstdc++-v3 \ + --with-gxx-include-dir="$SYSROOT/usr/include/c++/4.4" \ +(among other options). + +Hoping to support two usage models with this configuration, w.r.t. use of +the sysroot: + +(1) somebody installs the sysroot in the normal location relative to the +GCC install, and relocates the whole bundle (sysroot+GCC). This works +great AFAICT, GCC finds its includes (including the C++ includes) thanks +to the add_standard_paths iprefix handling. + +(2) somebody installs the sysroot in a non-standard location, and uses +--sysroot to try to access it. This works fine for the C headers, but +doesn't work. + +For the C headers, add_standard_paths prepends the sysroot location to +the /usr/include path (since that's what's specified in cppdefault.c for +that path). It doesn't do the same for the C++ include path, though +(again, as specified in cppdefault.c). + +add_standard_paths doesn't attempt to relocate built-in include paths that +start with the compiled-in sysroot location (e.g., the g++ include dir, in +this case). This isn't surprising really: normally you either prepend the +sysroot location or you don't (as specified by cppdefault.c); none of the +built-in paths normally *start* with the sysroot location and need to be +relocated. However, in this odd-ball case of trying to use the C++ headers +from the sysroot, one of the paths *does* need to be relocated in this way. +=========================== +Index: gcc-4_6-branch/gcc/Makefile.in +=================================================================== +--- gcc-4_6-branch.orig/gcc/Makefile.in ++++ gcc-4_6-branch/gcc/Makefile.in +@@ -587,6 +587,7 @@ slibdir = @slibdir@ + build_tooldir = $(exec_prefix)/$(target_noncanonical) + # Directory in which the compiler finds target-independent g++ includes. + gcc_gxx_include_dir = @gcc_gxx_include_dir@ ++gcc_gxx_include_dir_add_sysroot = @gcc_gxx_include_dir_add_sysroot@ + # Directory to search for site-specific includes. + local_includedir = $(local_prefix)/include + includedir = $(prefix)/include +@@ -3982,6 +3983,7 @@ PREPROCESSOR_DEFINES = \ + -DGCC_INCLUDE_DIR=\"$(libsubdir)/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) \ + -DGPLUSPLUS_TOOL_INCLUDE_DIR=\"$(gcc_gxx_include_dir)/$(target_noncanonical)\" \ + -DGPLUSPLUS_BACKWARD_INCLUDE_DIR=\"$(gcc_gxx_include_dir)/backward\" \ + -DLOCAL_INCLUDE_DIR=\"$(local_includedir)\" \ +Index: gcc-4_6-branch/gcc/configure.ac +=================================================================== +--- gcc-4_6-branch.orig/gcc/configure.ac ++++ gcc-4_6-branch/gcc/configure.ac +@@ -144,6 +144,15 @@ if test x${gcc_gxx_include_dir} = x; the + fi + fi + ++gcc_gxx_include_dir_add_sysroot=0 ++if test "${with_sysroot+set}" = set; then : ++ gcc_gxx_without_sysroot=`expr "${gcc_gxx_include_dir}" : "${with_sysroot}"'\(.*\)'` ++ if test "${gcc_gxx_without_sysroot}"; then : ++ gcc_gxx_include_dir="${gcc_gxx_without_sysroot}" ++ gcc_gxx_include_dir_add_sysroot=1 ++ fi ++fi ++ + AC_ARG_WITH(cpp_install_dir, + [ --with-cpp-install-dir=DIR + install the user visible C preprocessor in DIR +@@ -4732,6 +4741,7 @@ AC_SUBST(extra_programs) + AC_SUBST(float_h_file) + AC_SUBST(gcc_config_arguments) + AC_SUBST(gcc_gxx_include_dir) ++AC_SUBST(gcc_gxx_include_dir_add_sysroot) + AC_SUBST(host_exeext) + AC_SUBST(host_xm_file_list) + AC_SUBST(host_xm_include_list) +Index: gcc-4_6-branch/gcc/cppdefault.c +=================================================================== +--- gcc-4_6-branch.orig/gcc/cppdefault.c ++++ gcc-4_6-branch/gcc/cppdefault.c +@@ -48,15 +48,18 @@ const struct default_include cpp_include + = { + #ifdef GPLUSPLUS_INCLUDE_DIR + /* Pick up GNU C++ generic include files. */ +- { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1, 0, 0 }, ++ { GPLUSPLUS_INCLUDE_DIR, "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, 0, 1 }, ++ { GPLUSPLUS_TOOL_INCLUDE_DIR, "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, 0, 0 }, ++ { GPLUSPLUS_BACKWARD_INCLUDE_DIR, "G++", 1, 1, ++ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 }, + #endif + #ifdef GCC_INCLUDE_DIR + /* This is the dir for gcc's private headers. */ +Index: gcc-4_6-branch/gcc/configure +=================================================================== +--- gcc-4_6-branch.orig/gcc/configure ++++ gcc-4_6-branch/gcc/configure +@@ -636,6 +636,7 @@ host_xm_defines + host_xm_include_list + host_xm_file_list + host_exeext ++gcc_gxx_include_dir_add_sysroot + gcc_gxx_include_dir + gcc_config_arguments + float_h_file +@@ -3306,6 +3307,15 @@ if test x${gcc_gxx_include_dir} = x; the + fi + fi + ++gcc_gxx_include_dir_add_sysroot=0 ++if test "${with_sysroot+set}" = set; then : ++ gcc_gxx_without_sysroot=`expr "${gcc_gxx_include_dir}" : "${with_sysroot}"'\(.*\)'` ++ if test "${gcc_gxx_without_sysroot}"; then : ++ gcc_gxx_include_dir="${gcc_gxx_without_sysroot}" ++ gcc_gxx_include_dir_add_sysroot=1 ++ fi ++fi ++ + + # Check whether --with-cpp_install_dir was given. + if test "${with_cpp_install_dir+set}" = set; then : +@@ -17505,7 +17515,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 17508 "configure" ++#line 17518 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -17611,7 +17621,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 17614 "configure" ++#line 17624 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -26195,6 +26205,7 @@ fi + + + ++ + # Echo link setup. + if test x${build} = x${host} ; then + if test x${host} = x${target} ; then diff --git a/meta-fsl-ppc/recipes-devtools/gcc/gcc-fsl.inc b/meta-fsl-ppc/recipes-devtools/gcc/gcc-fsl.inc index 83d519c6..47555c84 100644 --- a/meta-fsl-ppc/recipes-devtools/gcc/gcc-fsl.inc +++ b/meta-fsl-ppc/recipes-devtools/gcc/gcc-fsl.inc @@ -37,8 +37,9 @@ SRC_URI = "svn://gcc.gnu.org/svn/gcc/branches;module=${BRANCH};proto=http \ file://gcc.check_path_validity.patch \ file://gcc.fix_header_issue.patch \ file://gcc.fix_SSIZE_MAX_undefine_issue.patch \ + file://GPLUSPLUS_INCLUDE_DIR_with_sysroot_fsl.patch \ " FILESEXTRAPATHS_prepend := "${THISDIR}/files:" -PR .= "+${DISTRO}.0" +PR .= "+${DISTRO}.1" -- cgit v1.2.3-54-g00ecf From 885935ba893c651f0a2504df7458f7ceadffbe41 Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Fri, 9 Mar 2012 16:09:12 +0000 Subject: binutils: pull a patch from Yocto to fix path issue of libiberty without the fix, following error appears when build native packages which require libierty.a: /usr/bin/ld: cannot find -liberty Signed-off-by: Zhenhua Luo --- .../recipes-devtools/binutils/binutils-fsl.inc | 3 ++- .../binutils/files/libiberty_path_fix.patch | 22 ++++++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 meta-fsl-ppc/recipes-devtools/binutils/files/libiberty_path_fix.patch diff --git a/meta-fsl-ppc/recipes-devtools/binutils/binutils-fsl.inc b/meta-fsl-ppc/recipes-devtools/binutils/binutils-fsl.inc index e425d42a..88b5eac5 100644 --- a/meta-fsl-ppc/recipes-devtools/binutils/binutils-fsl.inc +++ b/meta-fsl-ppc/recipes-devtools/binutils/binutils-fsl.inc @@ -3,8 +3,9 @@ SRC_URI = "\ file://bin.e5500.patch \ file://bin.e6500-2.patch \ file://bin.e500mc_nop.patch \ + file://libiberty_path_fix.patch \ " FILESEXTRAPATHS_prepend := "${THISDIR}/files:" -PR .= "+${DISTRO}.0" +PR .= "+${DISTRO}.1" diff --git a/meta-fsl-ppc/recipes-devtools/binutils/files/libiberty_path_fix.patch b/meta-fsl-ppc/recipes-devtools/binutils/files/libiberty_path_fix.patch new file mode 100644 index 00000000..3772dfbe --- /dev/null +++ b/meta-fsl-ppc/recipes-devtools/binutils/files/libiberty_path_fix.patch @@ -0,0 +1,22 @@ +Upstream-Status: Inappropriate [embedded specific] + +don't let the distro compiler point to the wrong installation location + +Thanks to RP for helping find the source code causing the issue. + +2010/08/13 +Nitin A Kamble +Index: binutils-2.20.1/libiberty/Makefile.in +=================================================================== +--- binutils-2.20.1.orig/libiberty/Makefile.in ++++ binutils-2.20.1/libiberty/Makefile.in +@@ -327,7 +327,8 @@ install: install_to_$(INSTALL_DEST) inst + # multilib-specific flags, it's overridden by FLAGS_TO_PASS from the + # default multilib, so we have to take CFLAGS into account as well, + # since it will be passed the multilib flags. +-MULTIOSDIR = `$(CC) $(CFLAGS) -print-multi-os-directory` ++#MULTIOSDIR = `$(CC) $(CFLAGS) -print-multi-os-directory` ++MULTIOSDIR = "" + install_to_libdir: all + ${mkinstalldirs} $(DESTDIR)$(libdir)/$(MULTIOSDIR) + $(INSTALL_DATA) $(TARGETLIB) $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB)n -- cgit v1.2.3-54-g00ecf From aa5ff26026fa223c5dd36f7facfee3cd697a7be0 Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Wed, 14 Mar 2012 16:43:05 -0500 Subject: binutils: remove bad libbfd.la file Signed-off-by: Matthew McClintock --- meta-fsl-ppc/recipes-devtools/binutils/binutils-fsl.inc | 2 +- meta-fsl-ppc/recipes-devtools/binutils/binutils_2.21.1a.bbappend | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/meta-fsl-ppc/recipes-devtools/binutils/binutils-fsl.inc b/meta-fsl-ppc/recipes-devtools/binutils/binutils-fsl.inc index 88b5eac5..c2c822ea 100644 --- a/meta-fsl-ppc/recipes-devtools/binutils/binutils-fsl.inc +++ b/meta-fsl-ppc/recipes-devtools/binutils/binutils-fsl.inc @@ -8,4 +8,4 @@ SRC_URI = "\ FILESEXTRAPATHS_prepend := "${THISDIR}/files:" -PR .= "+${DISTRO}.1" +PR .= "+${DISTRO}.2" diff --git a/meta-fsl-ppc/recipes-devtools/binutils/binutils_2.21.1a.bbappend b/meta-fsl-ppc/recipes-devtools/binutils/binutils_2.21.1a.bbappend index d46b87a8..a8aa7cea 100644 --- a/meta-fsl-ppc/recipes-devtools/binutils/binutils_2.21.1a.bbappend +++ b/meta-fsl-ppc/recipes-devtools/binutils/binutils_2.21.1a.bbappend @@ -1 +1,5 @@ require binutils-fsl.inc + +do_install_append () { + rm -f ${D}/usr/lib/libbfd.la +} -- cgit v1.2.3-54-g00ecf From 6420efb6f4911f97477a5176a774055725fd21c4 Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Wed, 14 Mar 2012 17:13:41 -0500 Subject: toolchain: only apply patches to toolchain if we are using the FSL distro Signed-off-by: Matthew McClintock --- meta-fsl-ppc/recipes-devtools/binutils/binutils-fsl.inc | 4 ++-- meta-fsl-ppc/recipes-devtools/eglibc/eglibc-fsl.inc | 4 ++-- meta-fsl-ppc/recipes-devtools/gcc/gcc-fsl.inc | 10 +++++----- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/meta-fsl-ppc/recipes-devtools/binutils/binutils-fsl.inc b/meta-fsl-ppc/recipes-devtools/binutils/binutils-fsl.inc index c2c822ea..e7792621 100644 --- a/meta-fsl-ppc/recipes-devtools/binutils/binutils-fsl.inc +++ b/meta-fsl-ppc/recipes-devtools/binutils/binutils-fsl.inc @@ -1,4 +1,4 @@ -SRC_URI = "\ +SRC_URI_fsl = "\ ${GNU_MIRROR}/binutils/binutils-${PV}.tar.bz2 \ file://bin.e5500.patch \ file://bin.e6500-2.patch \ @@ -8,4 +8,4 @@ SRC_URI = "\ FILESEXTRAPATHS_prepend := "${THISDIR}/files:" -PR .= "+${DISTRO}.2" +PR_fsl .= "+${DISTRO}.2" diff --git a/meta-fsl-ppc/recipes-devtools/eglibc/eglibc-fsl.inc b/meta-fsl-ppc/recipes-devtools/eglibc/eglibc-fsl.inc index f7540110..63bf8bbd 100644 --- a/meta-fsl-ppc/recipes-devtools/eglibc/eglibc-fsl.inc +++ b/meta-fsl-ppc/recipes-devtools/eglibc/eglibc-fsl.inc @@ -1,4 +1,4 @@ -SRC_URI = "svn://www.eglibc.org/svn/branches/;module=${EGLIBC_BRANCH};proto=http \ +SRC_URI_fsl = "svn://www.eglibc.org/svn/branches/;module=${EGLIBC_BRANCH};proto=http \ file://glibc.undefined_static.patch \ file://glibc.fixgcc4.6.patch \ file://glibc.readv_proto.patch \ @@ -11,4 +11,4 @@ SRC_URI = "svn://www.eglibc.org/svn/branches/;module=${EGLIBC_BRANCH};proto=http FILESEXTRAPATHS_prepend := "${THISDIR}/files:" -PR .= "+${DISTRO}.0" +PR_fsl .= "+${DISTRO}.0" diff --git a/meta-fsl-ppc/recipes-devtools/gcc/gcc-fsl.inc b/meta-fsl-ppc/recipes-devtools/gcc/gcc-fsl.inc index 47555c84..2e5be822 100644 --- a/meta-fsl-ppc/recipes-devtools/gcc/gcc-fsl.inc +++ b/meta-fsl-ppc/recipes-devtools/gcc/gcc-fsl.inc @@ -4,13 +4,13 @@ # file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1 \ # file://COPYING.RUNTIME;md5=fe60d87048567d4fe8c8a0ed2448bcc8" -BINV = "4.6.2" +BINV_fsl = "4.6.2" -SRCREV = "180516" +SRCREV_fsl = "180516" # ignore linaro backports since we are changing the SRCREV -GCC-4_6-BRANCH-LINARO-BACKPORTS = "" +GCC-4_6-BRANCH-LINARO-BACKPORTS_fsl = "" -SRC_URI = "svn://gcc.gnu.org/svn/gcc/branches;module=${BRANCH};proto=http \ +SRC_URI_fsl = "svn://gcc.gnu.org/svn/gcc/branches;module=${BRANCH};proto=http \ file://gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch \ file://gcc.fix_longversionstring.patch \ file://gcc.rm_slow_tests.patch \ @@ -42,4 +42,4 @@ SRC_URI = "svn://gcc.gnu.org/svn/gcc/branches;module=${BRANCH};proto=http \ FILESEXTRAPATHS_prepend := "${THISDIR}/files:" -PR .= "+${DISTRO}.1" +PR_fsl .= "+${DISTRO}.1" -- cgit v1.2.3-54-g00ecf From 3e7e7d6912149f609eb958ee46299368a4c9c1ce Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Wed, 14 Mar 2012 22:12:07 -0500 Subject: binutils: remove bad libbfd.la for all binutils (cross, native, etc) and use correct libdir Signed-off-by: Matthew McClintock --- meta-fsl-ppc/recipes-devtools/binutils/binutils-fsl.inc | 6 +++++- meta-fsl-ppc/recipes-devtools/binutils/binutils_2.21.1a.bbappend | 4 ---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/meta-fsl-ppc/recipes-devtools/binutils/binutils-fsl.inc b/meta-fsl-ppc/recipes-devtools/binutils/binutils-fsl.inc index e7792621..0995b83b 100644 --- a/meta-fsl-ppc/recipes-devtools/binutils/binutils-fsl.inc +++ b/meta-fsl-ppc/recipes-devtools/binutils/binutils-fsl.inc @@ -8,4 +8,8 @@ SRC_URI_fsl = "\ FILESEXTRAPATHS_prepend := "${THISDIR}/files:" -PR_fsl .= "+${DISTRO}.2" +PR_fsl .= "+${DISTRO}.3" + +do_install_append() { + rm -f ${D}${libdir}/libbfd.la +} diff --git a/meta-fsl-ppc/recipes-devtools/binutils/binutils_2.21.1a.bbappend b/meta-fsl-ppc/recipes-devtools/binutils/binutils_2.21.1a.bbappend index a8aa7cea..d46b87a8 100644 --- a/meta-fsl-ppc/recipes-devtools/binutils/binutils_2.21.1a.bbappend +++ b/meta-fsl-ppc/recipes-devtools/binutils/binutils_2.21.1a.bbappend @@ -1,5 +1 @@ require binutils-fsl.inc - -do_install_append () { - rm -f ${D}/usr/lib/libbfd.la -} -- cgit v1.2.3-54-g00ecf From 3cf6082c1bc2db47493195616344ca61aa80e677 Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Thu, 15 Mar 2012 01:30:26 -0500 Subject: binutils: add patches from poky's binutils This drops my previous changes and just adds in patches from poky that already address libtool issues Signed-off-by: Matthew McClintock --- .../recipes-devtools/binutils/binutils-fsl.inc | 10 +- .../binutils/files/libtool-2.4-update_fsl.patch | 18705 +++++++++++++++++++ 2 files changed, 18710 insertions(+), 5 deletions(-) create mode 100644 meta-fsl-ppc/recipes-devtools/binutils/files/libtool-2.4-update_fsl.patch diff --git a/meta-fsl-ppc/recipes-devtools/binutils/binutils-fsl.inc b/meta-fsl-ppc/recipes-devtools/binutils/binutils-fsl.inc index 0995b83b..0309032a 100644 --- a/meta-fsl-ppc/recipes-devtools/binutils/binutils-fsl.inc +++ b/meta-fsl-ppc/recipes-devtools/binutils/binutils-fsl.inc @@ -3,13 +3,13 @@ SRC_URI_fsl = "\ file://bin.e5500.patch \ file://bin.e6500-2.patch \ file://bin.e500mc_nop.patch \ + file://libtool-2.4-update_fsl.patch \ + file://binutils-2.19.1-ld-sysroot.patch \ file://libiberty_path_fix.patch \ + file://binutils-poison.patch \ + file://libtool-rpath-fix.patch \ " FILESEXTRAPATHS_prepend := "${THISDIR}/files:" -PR_fsl .= "+${DISTRO}.3" - -do_install_append() { - rm -f ${D}${libdir}/libbfd.la -} +PR_fsl .= "+${DISTRO}.4" diff --git a/meta-fsl-ppc/recipes-devtools/binutils/files/libtool-2.4-update_fsl.patch b/meta-fsl-ppc/recipes-devtools/binutils/files/libtool-2.4-update_fsl.patch new file mode 100644 index 00000000..039241f5 --- /dev/null +++ b/meta-fsl-ppc/recipes-devtools/binutils/files/libtool-2.4-update_fsl.patch @@ -0,0 +1,18705 @@ +Upstream-Status: Inappropriate [embedded specific] + +Index: binutils-2.21.1/libtool.m4 +=================================================================== +--- binutils-2.21.1.orig/libtool.m4 ++++ binutils-2.21.1/libtool.m4 +@@ -1,7 +1,8 @@ + # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- + # + # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +-# 2006, 2007, 2008, 2009 Free Software Foundation, Inc. ++# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, ++# Inc. + # Written by Gordon Matzigkeit, 1996 + # + # This file is free software; the Free Software Foundation gives +@@ -10,7 +11,8 @@ + + m4_define([_LT_COPYING], [dnl + # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +-# 2006, 2007, 2008, 2009 Free Software Foundation, Inc. ++# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, ++# Inc. + # Written by Gordon Matzigkeit, 1996 + # + # This file is part of GNU Libtool. +@@ -37,7 +39,7 @@ m4_define([_LT_COPYING], [dnl + # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + ]) + +-# serial 56 LT_INIT ++# serial 57 LT_INIT + + + # LT_PREREQ(VERSION) +@@ -92,7 +94,8 @@ _LT_SET_OPTIONS([$0], [$1]) + LIBTOOL_DEPS="$ltmain" + + # Always use our own libtool. +-LIBTOOL='$(SHELL) $(top_builddir)/libtool' ++LIBTOOL='$(SHELL) $(top_builddir)' ++LIBTOOL="$LIBTOOL/${host_alias}-libtool" + AC_SUBST(LIBTOOL)dnl + + _LT_SETUP +@@ -166,10 +169,13 @@ _LT_DECL([], [exeext], [0], [Executable + dnl + m4_require([_LT_FILEUTILS_DEFAULTS])dnl + m4_require([_LT_CHECK_SHELL_FEATURES])dnl ++m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl + m4_require([_LT_CMD_RELOAD])dnl + m4_require([_LT_CHECK_MAGIC_METHOD])dnl ++m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl + m4_require([_LT_CMD_OLD_ARCHIVE])dnl + m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl ++m4_require([_LT_WITH_SYSROOT])dnl + + _LT_CONFIG_LIBTOOL_INIT([ + # See if we are running on zsh, and set the options which allow our +@@ -199,7 +205,7 @@ aix3*) + esac + + # Global variables: +-ofile=libtool ++ofile=${host_alias}-libtool + can_build_shared=yes + + # All known linkers require a `.a' archive for static linking (except MSVC, +@@ -632,7 +638,7 @@ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_ + m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) + configured by $[0], generated by m4_PACKAGE_STRING. + +-Copyright (C) 2009 Free Software Foundation, Inc. ++Copyright (C) 2010 Free Software Foundation, Inc. + This config.lt script is free software; the Free Software Foundation + gives unlimited permision to copy, distribute and modify it." + +@@ -746,15 +752,12 @@ _LT_EOF + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? +- sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ +- || (rm -f "$cfgfile"; exit 1) ++ sed '$q' "$ltmain" >> "$cfgfile" \ ++ || (rm -f "$cfgfile"; exit 1) + +- _LT_PROG_XSI_SHELLFNS ++ _LT_PROG_REPLACE_SHELLFNS + +- sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ +- || (rm -f "$cfgfile"; exit 1) +- +- mv -f "$cfgfile" "$ofile" || ++ mv -f "$cfgfile" "$ofile" || + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" + ], +@@ -980,6 +983,8 @@ _LT_EOF + $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD + echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD + $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD ++ echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD ++ $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD + cat > conftest.c << _LT_EOF + int main() { return 0;} + _LT_EOF +@@ -1069,30 +1074,41 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES], + fi + ]) + +-# _LT_SYS_MODULE_PATH_AIX +-# ----------------------- ++# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) ++# ---------------------------------- + # Links a minimal program and checks the executable + # for the system default hardcoded library path. In most cases, + # this is /usr/lib:/lib, but when the MPI compilers are used + # the location of the communication and MPI libs are included too. + # If we don't find anything, use the default library path according + # to the aix ld manual. ++# Store the results from the different compilers for each TAGNAME. ++# Allow to override them for all tags through lt_cv_aix_libpath. + m4_defun([_LT_SYS_MODULE_PATH_AIX], + [m4_require([_LT_DECL_SED])dnl +-AC_LINK_IFELSE(AC_LANG_PROGRAM,[ +-lt_aix_libpath_sed=' +- /Import File Strings/,/^$/ { +- /^0/ { +- s/^0 *\(.*\)$/\1/ +- p +- } +- }' +-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +-# Check for a 64-bit object if we didn't find anything. +-if test -z "$aix_libpath"; then +- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +-fi],[]) +-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ++if test "${lt_cv_aix_libpath+set}" = set; then ++ aix_libpath=$lt_cv_aix_libpath ++else ++ AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], ++ [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ ++ lt_aix_libpath_sed='[ ++ /Import File Strings/,/^$/ { ++ /^0/ { ++ s/^0 *\([^ ]*\) *$/\1/ ++ p ++ } ++ }]' ++ _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` ++ # Check for a 64-bit object if we didn't find anything. ++ if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then ++ _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` ++ fi],[]) ++ if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then ++ _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" ++ fi ++ ]) ++ aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) ++fi + ])# _LT_SYS_MODULE_PATH_AIX + + +@@ -1117,7 +1133,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO + + AC_MSG_CHECKING([how to print strings]) + # Test print first, because it will be a builtin if present. +-if test "X`print -r -- -n 2>/dev/null`" = X-n && \ ++if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ + test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='print -r --' + elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then +@@ -1161,6 +1177,39 @@ _LT_DECL([], [ECHO], [1], [An echo progr + ])# _LT_PROG_ECHO_BACKSLASH + + ++# _LT_WITH_SYSROOT ++# ---------------- ++AC_DEFUN([_LT_WITH_SYSROOT], ++[AC_MSG_CHECKING([for sysroot]) ++AC_ARG_WITH([libtool-sysroot], ++[ --with-libtool-sysroot[=DIR] Search for dependent libraries within DIR ++ (or the compiler's sysroot if not specified).], ++[], [with_libtool_sysroot=no]) ++ ++dnl lt_sysroot will always be passed unquoted. We quote it here ++dnl in case the user passed a directory name. ++lt_sysroot= ++case ${with_libtool_sysroot} in #( ++ yes) ++ if test "$GCC" = yes; then ++ lt_sysroot=`$CC --print-sysroot 2>/dev/null` ++ fi ++ ;; #( ++ /*) ++ lt_sysroot=`echo "$with_libtool_sysroot" | sed -e "$sed_quote_subst"` ++ ;; #( ++ no|'') ++ ;; #( ++ *) ++ AC_MSG_RESULT([${with_libtool_sysroot}]) ++ AC_MSG_ERROR([The sysroot must be an absolute path.]) ++ ;; ++esac ++ ++ AC_MSG_RESULT([${lt_sysroot:-no}]) ++_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl ++[dependent libraries, and in which our libraries should be installed.])]) ++ + # _LT_ENABLE_LOCK + # --------------- + m4_defun([_LT_ENABLE_LOCK], +@@ -1307,14 +1356,47 @@ need_locks="$enable_libtool_lock" + ])# _LT_ENABLE_LOCK + + ++# _LT_PROG_AR ++# ----------- ++m4_defun([_LT_PROG_AR], ++[AC_CHECK_TOOLS(AR, [ar], false) ++: ${AR=ar} ++: ${AR_FLAGS=cru} ++_LT_DECL([], [AR], [1], [The archiver]) ++_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) ++ ++AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], ++ [lt_cv_ar_at_file=no ++ AC_COMPILE_IFELSE([AC_LANG_PROGRAM], ++ [echo conftest.$ac_objext > conftest.lst ++ lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' ++ AC_TRY_EVAL([lt_ar_try]) ++ if test "$ac_status" -eq 0; then ++ # Ensure the archiver fails upon bogus file names. ++ rm -f conftest.$ac_objext libconftest.a ++ AC_TRY_EVAL([lt_ar_try]) ++ if test "$ac_status" -ne 0; then ++ lt_cv_ar_at_file=@ ++ fi ++ fi ++ rm -f conftest.* libconftest.a ++ ]) ++ ]) ++ ++if test "x$lt_cv_ar_at_file" = xno; then ++ archiver_list_spec= ++else ++ archiver_list_spec=$lt_cv_ar_at_file ++fi ++_LT_DECL([], [archiver_list_spec], [1], ++ [How to feed a file listing to the archiver]) ++])# _LT_PROG_AR ++ ++ + # _LT_CMD_OLD_ARCHIVE + # ------------------- + m4_defun([_LT_CMD_OLD_ARCHIVE], +-[AC_CHECK_TOOL(AR, ar, false) +-test -z "$AR" && AR=ar +-test -z "$AR_FLAGS" && AR_FLAGS=cru +-_LT_DECL([], [AR], [1], [The archiver]) +-_LT_DECL([], [AR_FLAGS], [1]) ++[_LT_PROG_AR + + AC_CHECK_TOOL(STRIP, strip, :) + test -z "$STRIP" && STRIP=: +@@ -1610,7 +1692,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-[#line __oline__ "configure" ++[#line $LINENO "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -1654,10 +1736,10 @@ else + /* When -fvisbility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ + #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +-void fnord () __attribute__((visibility("default"))); ++int fnord () __attribute__((visibility("default"))); + #endif + +-void fnord () { int i=42; } ++int fnord () { return 42; } + int main () + { + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); +@@ -2197,8 +2279,9 @@ cygwin* | mingw* | pw32* | cegcc*) + need_version=no + need_lib_prefix=no + +- case $GCC,$host_os in +- yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) ++ case $GCC,$cc_basename in ++ yes,*) ++ # gcc + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ +@@ -2231,13 +2314,71 @@ m4_if([$1], [],[ + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + ;; + esac ++ dynamic_linker='Win32 ld.exe' ++ ;; ++ ++ *,cl*) ++ # Native MSVC ++ libname_spec='$name' ++ soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ++ library_names_spec='${libname}.dll.lib' ++ ++ case $build_os in ++ mingw*) ++ sys_lib_search_path_spec= ++ lt_save_ifs=$IFS ++ IFS=';' ++ for lt_path in $LIB ++ do ++ IFS=$lt_save_ifs ++ # Let DOS variable expansion print the short 8.3 style file name. ++ lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` ++ sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" ++ done ++ IFS=$lt_save_ifs ++ # Convert to MSYS style. ++ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` ++ ;; ++ cygwin*) ++ # Convert to unix form, then to dos form, then back to unix form ++ # but this time dos style (no spaces!) so that the unix form looks ++ # like /cygdrive/c/PROGRA~1:/cygdr... ++ sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` ++ sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` ++ sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ++ ;; ++ *) ++ sys_lib_search_path_spec="$LIB" ++ if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then ++ # It is most probably a Windows format PATH. ++ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` ++ else ++ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ++ fi ++ # FIXME: find the short name or the path components, as spaces are ++ # common. (e.g. "Program Files" -> "PROGRA~1") ++ ;; ++ esac ++ ++ # DLL is installed to $(libdir)/../bin by postinstall_cmds ++ postinstall_cmds='base_file=`basename \${file}`~ ++ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ ++ dldir=$destdir/`dirname \$dlpath`~ ++ test -d \$dldir || mkdir -p \$dldir~ ++ $install_prog $dir/$dlname \$dldir/$dlname' ++ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ ++ dlpath=$dir/\$dldll~ ++ $RM \$dlpath' ++ shlibpath_overrides_runpath=yes ++ dynamic_linker='Win32 link.exe' + ;; + + *) ++ # Assume MSVC wrapper + library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' ++ dynamic_linker='Win32 ld.exe' + ;; + esac +- dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; +@@ -2333,7 +2474,7 @@ haiku*) + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LIBRARY_PATH + shlibpath_overrides_runpath=yes +- sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib' ++ sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' + hardcode_into_libs=yes + ;; + +@@ -2941,6 +3082,11 @@ case $reload_flag in + esac + reload_cmds='$LD$reload_flag -o $output$reload_objs' + case $host_os in ++ cygwin* | mingw* | pw32* | cegcc*) ++ if test "$GCC" != yes; then ++ reload_cmds=false ++ fi ++ ;; + darwin*) + if test "$GCC" = yes; then + reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' +@@ -3007,7 +3153,8 @@ mingw* | pw32*) + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + else +- lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' ++ # Keep this pattern in sync with the one in func_win32_libid. ++ lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' + lt_cv_file_magic_cmd='$OBJDUMP -f' + fi + ;; +@@ -3158,6 +3305,21 @@ tpf*) + ;; + esac + ]) ++ ++file_magic_glob= ++want_nocaseglob=no ++if test "$build" = "$host"; then ++ case $host_os in ++ mingw* | pw32*) ++ if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then ++ want_nocaseglob=yes ++ else ++ file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` ++ fi ++ ;; ++ esac ++fi ++ + file_magic_cmd=$lt_cv_file_magic_cmd + deplibs_check_method=$lt_cv_deplibs_check_method + test -z "$deplibs_check_method" && deplibs_check_method=unknown +@@ -3165,7 +3327,11 @@ test -z "$deplibs_check_method" && depli + _LT_DECL([], [deplibs_check_method], [1], + [Method to check whether dependent libraries are shared objects]) + _LT_DECL([], [file_magic_cmd], [1], +- [Command to use when deplibs_check_method == "file_magic"]) ++ [Command to use when deplibs_check_method = "file_magic"]) ++_LT_DECL([], [file_magic_glob], [1], ++ [How to find potential files when deplibs_check_method = "file_magic"]) ++_LT_DECL([], [want_nocaseglob], [1], ++ [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) + ])# _LT_CHECK_MAGIC_METHOD + + +@@ -3268,6 +3434,67 @@ dnl aclocal-1.4 backwards compatibility: + dnl AC_DEFUN([AM_PROG_NM], []) + dnl AC_DEFUN([AC_PROG_NM], []) + ++# _LT_CHECK_SHAREDLIB_FROM_LINKLIB ++# -------------------------------- ++# how to determine the name of the shared library ++# associated with a specific link library. ++# -- PORTME fill in with the dynamic library characteristics ++m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], ++[m4_require([_LT_DECL_EGREP]) ++m4_require([_LT_DECL_OBJDUMP]) ++m4_require([_LT_DECL_DLLTOOL]) ++AC_CACHE_CHECK([how to associate runtime and link libraries], ++lt_cv_sharedlib_from_linklib_cmd, ++[lt_cv_sharedlib_from_linklib_cmd='unknown' ++ ++case $host_os in ++cygwin* | mingw* | pw32* | cegcc*) ++ # two different shell functions defined in ltmain.sh ++ # decide which to use based on capabilities of $DLLTOOL ++ case `$DLLTOOL --help 2>&1` in ++ *--identify-strict*) ++ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ++ ;; ++ *) ++ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ++ ;; ++ esac ++ ;; ++*) ++ # fallback: assume linklib IS sharedlib ++ lt_cv_sharedlib_from_linklib_cmd="$ECHO" ++ ;; ++esac ++]) ++sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd ++test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO ++ ++_LT_DECL([], [sharedlib_from_linklib_cmd], [1], ++ [Command to associate shared and link libraries]) ++])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB ++ ++ ++# _LT_PATH_MANIFEST_TOOL ++# ---------------------- ++# locate the manifest tool ++m4_defun([_LT_PATH_MANIFEST_TOOL], ++[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) ++test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt ++AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], ++ [lt_cv_path_mainfest_tool=no ++ echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD ++ $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out ++ cat conftest.err >&AS_MESSAGE_LOG_FD ++ if $GREP 'Manifest Tool' conftest.out > /dev/null; then ++ lt_cv_path_mainfest_tool=yes ++ fi ++ rm -f conftest*]) ++if test "x$lt_cv_path_mainfest_tool" != xyes; then ++ MANIFEST_TOOL=: ++fi ++_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl ++])# _LT_PATH_MANIFEST_TOOL ++ + + # LT_LIB_M + # -------- +@@ -3394,8 +3621,8 @@ esac + lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + + # Transform an extracted symbol line into symbol name and symbol address +-lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" +-lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" ++lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" ++lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" + + # Handle CRLF in mingw tool chain + opt_cr= +@@ -3431,6 +3658,7 @@ for ac_symprfx in "" "_"; do + else + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + fi ++ lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" + + # Check to see that the pipe works correctly. + pipe_works=no +@@ -3464,6 +3692,18 @@ _LT_EOF + if $GREP ' nm_test_var$' "$nlist" >/dev/null; then + if $GREP ' nm_test_func$' "$nlist" >/dev/null; then + cat <<_LT_EOF > conftest.$ac_ext ++/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ ++#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) ++/* DATA imports from DLLs on WIN32 con't be const, because runtime ++ relocations are performed -- see ld's documentation on pseudo-relocs. */ ++# define LT@&t@_DLSYM_CONST ++#elif defined(__osf__) ++/* This system does not cope well with relocations in const data. */ ++# define LT@&t@_DLSYM_CONST ++#else ++# define LT@&t@_DLSYM_CONST const ++#endif ++ + #ifdef __cplusplus + extern "C" { + #endif +@@ -3475,7 +3715,7 @@ _LT_EOF + cat <<_LT_EOF >> conftest.$ac_ext + + /* The mapping between symbol names and symbols. */ +-const struct { ++LT@&t@_DLSYM_CONST struct { + const char *name; + void *address; + } +@@ -3501,15 +3741,15 @@ static const void *lt_preloaded_setup() + _LT_EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext +- lt_save_LIBS="$LIBS" +- lt_save_CFLAGS="$CFLAGS" ++ lt_globsym_save_LIBS=$LIBS ++ lt_globsym_save_CFLAGS=$CFLAGS + LIBS="conftstm.$ac_objext" + CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" + if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then + pipe_works=yes + fi +- LIBS="$lt_save_LIBS" +- CFLAGS="$lt_save_CFLAGS" ++ LIBS=$lt_globsym_save_LIBS ++ CFLAGS=$lt_globsym_save_CFLAGS + else + echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD + fi +@@ -3542,6 +3782,13 @@ else + AC_MSG_RESULT(ok) + fi + ++# Response file support. ++if test "$lt_cv_nm_interface" = "MS dumpbin"; then ++ nm_file_list_spec='@' ++elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then ++ nm_file_list_spec='@' ++fi ++ + _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], + [Take the output of nm and produce a listing of raw symbols and C names]) + _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], +@@ -3552,6 +3799,8 @@ _LT_DECL([global_symbol_to_c_name_addres + _LT_DECL([global_symbol_to_c_name_address_lib_prefix], + [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], + [Transform the output of nm in a C name address pair when lib prefix is needed]) ++_LT_DECL([], [nm_file_list_spec], [1], ++ [Specify filename containing input files for $NM]) + ]) # _LT_CMD_GLOBAL_SYMBOLS + + +@@ -3563,7 +3812,6 @@ _LT_TAGVAR(lt_prog_compiler_wl, $1)= + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_TAGVAR(lt_prog_compiler_static, $1)= + +-AC_MSG_CHECKING([for $compiler option to produce PIC]) + m4_if([$1], [CXX], [ + # C++ specific cases for pic, static, wl, etc. + if test "$GXX" = yes; then +@@ -3668,6 +3916,12 @@ m4_if([$1], [CXX], [ + ;; + esac + ;; ++ mingw* | cygwin* | os2* | pw32* | cegcc*) ++ # This hack is so that the source file can tell whether it is being ++ # built for inclusion in a dll (and should export symbols for example). ++ m4_if([$1], [GCJ], [], ++ [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ++ ;; + dgux*) + case $cc_basename in + ec++*) +@@ -3820,7 +4074,7 @@ m4_if([$1], [CXX], [ + ;; + solaris*) + case $cc_basename in +- CC*) ++ CC* | sunCC*) + # Sun C++ 4.2, 5.x and Centerline C++ + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' +@@ -4042,6 +4296,12 @@ m4_if([$1], [CXX], [ + _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' + _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' + ;; ++ nagfor*) ++ # NAG Fortran compiler ++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' ++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' ++ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ++ ;; + pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) +@@ -4104,7 +4364,7 @@ m4_if([$1], [CXX], [ + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + case $cc_basename in +- f77* | f90* | f95*) ++ f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; + *) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; +@@ -4161,9 +4421,11 @@ case $host_os in + _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" + ;; + esac +-AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) +-_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], +- [How to pass a linker flag through the compiler]) ++ ++AC_CACHE_CHECK([for $compiler option to produce PIC], ++ [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], ++ [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) ++_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) + + # + # Check to make sure the PIC flag actually works. +@@ -4182,6 +4444,8 @@ fi + _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], + [Additional compiler flags for building library objects]) + ++_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], ++ [How to pass a linker flag through the compiler]) + # + # Check to make sure the static flag actually works. + # +@@ -4202,6 +4466,7 @@ _LT_TAGDECL([link_static_flag], [lt_prog + m4_defun([_LT_LINKER_SHLIBS], + [AC_REQUIRE([LT_PATH_LD])dnl + AC_REQUIRE([LT_PATH_NM])dnl ++m4_require([_LT_PATH_MANIFEST_TOOL])dnl + m4_require([_LT_FILEUTILS_DEFAULTS])dnl + m4_require([_LT_DECL_EGREP])dnl + m4_require([_LT_DECL_SED])dnl +@@ -4210,6 +4475,7 @@ m4_require([_LT_TAG_COMPILER])dnl + AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) + m4_if([$1], [CXX], [ + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ++ _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] + case $host_os in + aix[[4-9]]*) + # If we're using GNU nm, then we don't want the "-C" option. +@@ -4224,15 +4490,20 @@ m4_if([$1], [CXX], [ + ;; + pw32*) + _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" +- ;; ++ ;; + cygwin* | mingw* | cegcc*) +- _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' +- ;; ++ case $cc_basename in ++ cl*) ;; ++ *) ++ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' ++ _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] ++ ;; ++ esac ++ ;; + *) + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' +- ;; ++ ;; + esac +- _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] + ], [ + runpath_var= + _LT_TAGVAR(allow_undefined_flag, $1)= +@@ -4400,7 +4671,8 @@ _LT_EOF + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=no + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes +- _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' ++ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' ++ _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' +@@ -4448,7 +4720,7 @@ _LT_EOF + if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ + && test "$tmp_diet" = no + then +- tmp_addflag= ++ tmp_addflag=' $pic_flag' + tmp_sharedflag='-shared' + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler +@@ -4499,12 +4771,12 @@ _LT_EOF + _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' +- _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' ++ _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' + if test "x$supports_anon_versioning" = xyes; then + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ +- $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' ++ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + fi + ;; + esac +@@ -4518,8 +4790,8 @@ _LT_EOF + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else +- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' +- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' ++ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + +@@ -4537,8 +4809,8 @@ _LT_EOF + + _LT_EOF + elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then +- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' +- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' ++ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi +@@ -4584,8 +4856,8 @@ _LT_EOF + + *) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then +- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' +- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' ++ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi +@@ -4715,7 +4987,7 @@ _LT_EOF + _LT_TAGVAR(allow_undefined_flag, $1)='-berok' + # Determine the default libpath from the value encoded in an + # empty executable. +- _LT_SYS_MODULE_PATH_AIX ++ _LT_SYS_MODULE_PATH_AIX([$1]) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else +@@ -4726,7 +4998,7 @@ _LT_EOF + else + # Determine the default libpath from the value encoded in an + # empty executable. +- _LT_SYS_MODULE_PATH_AIX ++ _LT_SYS_MODULE_PATH_AIX([$1]) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. +@@ -4770,20 +5042,63 @@ _LT_EOF + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. +- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' +- _LT_TAGVAR(allow_undefined_flag, $1)=unsupported +- # Tell ltmain to make .lib files, not .a files. +- libext=lib +- # Tell ltmain to make .dll files, not .so files. +- shrext_cmds=".dll" +- # FIXME: Setting linknames here is a bad hack. +- _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' +- # The linker will automatically build a .lib file if we build a DLL. +- _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' +- # FIXME: Should let the user specify the lib program. +- _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' +- _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' +- _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ++ case $cc_basename in ++ cl*) ++ # Native MSVC ++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' ++ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported ++ _LT_TAGVAR(always_export_symbols, $1)=yes ++ _LT_TAGVAR(file_list_spec, $1)='@' ++ # Tell ltmain to make .lib files, not .a files. ++ libext=lib ++ # Tell ltmain to make .dll files, not .so files. ++ shrext_cmds=".dll" ++ # FIXME: Setting linknames here is a bad hack. ++ _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' ++ _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then ++ sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; ++ else ++ sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; ++ fi~ ++ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ ++ linknames=' ++ # The linker will not automatically build a static lib if we build a DLL. ++ # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' ++ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ++ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' ++ # Don't use ranlib ++ _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' ++ _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ ++ lt_tool_outputfile="@TOOL_OUTPUT@"~ ++ case $lt_outputfile in ++ *.exe|*.EXE) ;; ++ *) ++ lt_outputfile="$lt_outputfile.exe" ++ lt_tool_outputfile="$lt_tool_outputfile.exe" ++ ;; ++ esac~ ++ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then ++ $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; ++ $RM "$lt_outputfile.manifest"; ++ fi' ++ ;; ++ *) ++ # Assume MSVC wrapper ++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' ++ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported ++ # Tell ltmain to make .lib files, not .a files. ++ libext=lib ++ # Tell ltmain to make .dll files, not .so files. ++ shrext_cmds=".dll" ++ # FIXME: Setting linknames here is a bad hack. ++ _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' ++ # The linker will automatically build a .lib file if we build a DLL. ++ _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' ++ # FIXME: Should let the user specify the lib program. ++ _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' ++ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ++ ;; ++ esac + ;; + + darwin* | rhapsody*) +@@ -4821,7 +5136,7 @@ _LT_EOF + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) +- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' ++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no +@@ -4829,7 +5144,7 @@ _LT_EOF + + hpux9*) + if test "$GCC" = yes; then +- _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ++ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + fi +@@ -4845,7 +5160,7 @@ _LT_EOF + + hpux10*) + if test "$GCC" = yes && test "$with_gnu_ld" = no; then +- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi +@@ -4869,10 +5184,10 @@ _LT_EOF + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) +- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) +- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else +@@ -4919,16 +5234,31 @@ _LT_EOF + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then +- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + # Try to use the -exported_symbol ld option, if it does not + # work, assume that -exports_file does not work either and + # implicitly export all symbols. +- save_LDFLAGS="$LDFLAGS" +- LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" +- AC_LINK_IFELSE(int foo(void) {}, +- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' +- ) +- LDFLAGS="$save_LDFLAGS" ++ # This should be the same for all languages, so no per-tag cache variable. ++ AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], ++ [lt_cv_irix_exported_symbol], ++ [save_LDFLAGS="$LDFLAGS" ++ LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" ++ AC_LINK_IFELSE( ++ [AC_LANG_SOURCE( ++ [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], ++ [C++], [[int foo (void) { return 0; }]], ++ [Fortran 77], [[ ++ subroutine foo ++ end]], ++ [Fortran], [[ ++ subroutine foo ++ end]])])], ++ [lt_cv_irix_exported_symbol=yes], ++ [lt_cv_irix_exported_symbol=no]) ++ LDFLAGS="$save_LDFLAGS"]) ++ if test "$lt_cv_irix_exported_symbol" = yes; then ++ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' ++ fi + else + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' +@@ -5013,7 +5343,7 @@ _LT_EOF + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' +- _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + else + _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' +@@ -5032,9 +5362,9 @@ _LT_EOF + _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' + if test "$GCC" = yes; then + wlarc='${wl}' +- _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ +- $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ++ $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + else + case `$CC -V 2>&1` in + *"Compilers 5.0"*) +@@ -5306,8 +5636,6 @@ _LT_TAGDECL([], [inherit_rpath], [0], + to runtime path list]) + _LT_TAGDECL([], [link_all_deplibs], [0], + [Whether libtool must link a program against all its dependency libraries]) +-_LT_TAGDECL([], [fix_srcfile_path], [1], +- [Fix the shell variable $srcfile for the compiler]) + _LT_TAGDECL([], [always_export_symbols], [0], + [Set to "yes" if exported symbols are required]) + _LT_TAGDECL([], [export_symbols_cmds], [2], +@@ -5318,6 +5646,8 @@ _LT_TAGDECL([], [include_expsyms], [1], + [Symbols that must always be exported]) + _LT_TAGDECL([], [prelink_cmds], [2], + [Commands necessary for linking programs (against libraries) with templates]) ++_LT_TAGDECL([], [postlink_cmds], [2], ++ [Commands necessary for finishing linking programs]) + _LT_TAGDECL([], [file_list_spec], [1], + [Specify filename containing input files]) + dnl FIXME: Not yet implemented +@@ -5419,6 +5749,7 @@ CC="$lt_save_CC" + m4_defun([_LT_LANG_CXX_CONFIG], + [m4_require([_LT_FILEUTILS_DEFAULTS])dnl + m4_require([_LT_DECL_EGREP])dnl ++m4_require([_LT_PATH_MANIFEST_TOOL])dnl + if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then +@@ -5480,6 +5811,7 @@ if test "$_lt_caught_CXX_error" != yes; + + # Allow CC to be a program name with arguments. + lt_save_CC=$CC ++ lt_save_CFLAGS=$CFLAGS + lt_save_LD=$LD + lt_save_GCC=$GCC + GCC=$GXX +@@ -5497,6 +5829,7 @@ if test "$_lt_caught_CXX_error" != yes; + fi + test -z "${LDCXX+set}" || LD=$LDCXX + CC=${CXX-"c++"} ++ CFLAGS=$CXXFLAGS + compiler=$CC + _LT_TAGVAR(compiler, $1)=$CC + _LT_CC_BASENAME([$compiler]) +@@ -5518,8 +5851,8 @@ if test "$_lt_caught_CXX_error" != yes; + # Check if GNU C++ uses GNU ld as the underlying linker, since the + # archiving commands below assume that GNU ld is being used. + if test "$with_gnu_ld" = yes; then +- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' +- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ++ _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' ++ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' +@@ -5660,7 +5993,7 @@ if test "$_lt_caught_CXX_error" != yes; + _LT_TAGVAR(allow_undefined_flag, $1)='-berok' + # Determine the default libpath from the value encoded in an empty + # executable. +- _LT_SYS_MODULE_PATH_AIX ++ _LT_SYS_MODULE_PATH_AIX([$1]) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" +@@ -5672,7 +6005,7 @@ if test "$_lt_caught_CXX_error" != yes; + else + # Determine the default libpath from the value encoded in an + # empty executable. +- _LT_SYS_MODULE_PATH_AIX ++ _LT_SYS_MODULE_PATH_AIX([$1]) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. +@@ -5714,29 +6047,75 @@ if test "$_lt_caught_CXX_error" != yes; + ;; + + cygwin* | mingw* | pw32* | cegcc*) +- # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, +- # as there is no search path for DLLs. +- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' +- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' +- _LT_TAGVAR(allow_undefined_flag, $1)=unsupported +- _LT_TAGVAR(always_export_symbols, $1)=no +- _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes +- +- if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then +- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' +- # If the export-symbols file already is a .def file (1st line +- # is EXPORTS), use it as is; otherwise, prepend... +- _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then +- cp $export_symbols $output_objdir/$soname.def; +- else +- echo EXPORTS > $output_objdir/$soname.def; +- cat $export_symbols >> $output_objdir/$soname.def; +- fi~ +- $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' +- else +- _LT_TAGVAR(ld_shlibs, $1)=no +- fi +- ;; ++ case $GXX,$cc_basename in ++ ,cl* | no,cl*) ++ # Native MSVC ++ # hardcode_libdir_flag_spec is actually meaningless, as there is ++ # no search path for DLLs. ++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' ++ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported ++ _LT_TAGVAR(always_export_symbols, $1)=yes ++ _LT_TAGVAR(file_list_spec, $1)='@' ++ # Tell ltmain to make .lib files, not .a files. ++ libext=lib ++ # Tell ltmain to make .dll files, not .so files. ++ shrext_cmds=".dll" ++ # FIXME: Setting linknames here is a bad hack. ++ _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' ++ _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then ++ $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; ++ else ++ $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; ++ fi~ ++ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ ++ linknames=' ++ # The linker will not automatically build a static lib if we build a DLL. ++ # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' ++ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ++ # Don't use ranlib ++ _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' ++ _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ ++ lt_tool_outputfile="@TOOL_OUTPUT@"~ ++ case $lt_outputfile in ++ *.exe|*.EXE) ;; ++ *) ++ lt_outputfile="$lt_outputfile.exe" ++ lt_tool_outputfile="$lt_tool_outputfile.exe" ++ ;; ++ esac~ ++ func_to_tool_file "$lt_outputfile"~ ++ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then ++ $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; ++ $RM "$lt_outputfile.manifest"; ++ fi' ++ ;; ++ *) ++ # g++ ++ # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, ++ # as there is no search path for DLLs. ++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' ++ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' ++ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported ++ _LT_TAGVAR(always_export_symbols, $1)=no ++ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ++ ++ if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then ++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' ++ # If the export-symbols file already is a .def file (1st line ++ # is EXPORTS), use it as is; otherwise, prepend... ++ _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then ++ cp $export_symbols $output_objdir/$soname.def; ++ else ++ echo EXPORTS > $output_objdir/$soname.def; ++ cat $export_symbols >> $output_objdir/$soname.def; ++ fi~ ++ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' ++ else ++ _LT_TAGVAR(ld_shlibs, $1)=no ++ fi ++ ;; ++ esac ++ ;; + darwin* | rhapsody*) + _LT_DARWIN_LINKER_FEATURES($1) + ;; +@@ -5811,7 +6190,7 @@ if test "$_lt_caught_CXX_error" != yes; + ;; + *) + if test "$GXX" = yes; then +- _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ++ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no +@@ -5882,10 +6261,10 @@ if test "$_lt_caught_CXX_error" != yes; + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) +- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) +- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + fi +@@ -5926,9 +6305,9 @@ if test "$_lt_caught_CXX_error" != yes; + *) + if test "$GXX" = yes; then + if test "$with_gnu_ld" = no; then +- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else +- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' ++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' + fi + fi + _LT_TAGVAR(link_all_deplibs, $1)=yes +@@ -5998,20 +6377,20 @@ if test "$_lt_caught_CXX_error" != yes; + _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ +- compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"' ++ compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' + _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ +- $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~ ++ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ + $RANLIB $oldlib' + _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ +- $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' ++ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ +- $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ++ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + ;; + *) # Version 6 and above use weak symbols + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' +@@ -6206,7 +6585,7 @@ if test "$_lt_caught_CXX_error" != yes; + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + ;; + *) +- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + ;; + esac + +@@ -6252,7 +6631,7 @@ if test "$_lt_caught_CXX_error" != yes; + + solaris*) + case $cc_basename in +- CC*) ++ CC* | sunCC*) + # Sun C++ 4.2, 5.x and Centerline C++ + _LT_TAGVAR(archive_cmds_need_lc,$1)=yes + _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' +@@ -6293,9 +6672,9 @@ if test "$_lt_caught_CXX_error" != yes; + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' + if $CC --version | $GREP -v '^2\.7' > /dev/null; then +- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' ++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ +- $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' ++ $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when +@@ -6424,6 +6803,7 @@ if test "$_lt_caught_CXX_error" != yes; + fi # test -n "$compiler" + + CC=$lt_save_CC ++ CFLAGS=$lt_save_CFLAGS + LDCXX=$LD + LD=$lt_save_LD + GCC=$lt_save_GCC +@@ -6438,6 +6818,29 @@ AC_LANG_POP + ])# _LT_LANG_CXX_CONFIG + + ++# _LT_FUNC_STRIPNAME_CNF ++# ---------------------- ++# func_stripname_cnf prefix suffix name ++# strip PREFIX and SUFFIX off of NAME. ++# PREFIX and SUFFIX must not contain globbing or regex special ++# characters, hashes, percent signs, but SUFFIX may contain a leading ++# dot (in which case that matches only a dot). ++# ++# This function is identical to the (non-XSI) version of func_stripname, ++# except this one can be used by m4 code that may be executed by configure, ++# rather than the libtool script. ++m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl ++AC_REQUIRE([_LT_DECL_SED]) ++AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) ++func_stripname_cnf () ++{ ++ case ${2} in ++ .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; ++ *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; ++ esac ++} # func_stripname_cnf ++])# _LT_FUNC_STRIPNAME_CNF ++ + # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) + # --------------------------------- + # Figure out "hidden" library dependencies from verbose +@@ -6446,6 +6849,7 @@ AC_LANG_POP + # objects, libraries and library flags. + m4_defun([_LT_SYS_HIDDEN_LIBDEPS], + [m4_require([_LT_FILEUTILS_DEFAULTS])dnl ++AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl + # Dependencies to place before and after the object being linked: + _LT_TAGVAR(predep_objects, $1)= + _LT_TAGVAR(postdep_objects, $1)= +@@ -6496,6 +6900,13 @@ public class foo { + }; + _LT_EOF + ]) ++ ++_lt_libdeps_save_CFLAGS=$CFLAGS ++case "$CC $CFLAGS " in #( ++*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; ++*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; ++esac ++ + dnl Parse the compiler output and extract the necessary + dnl objects, libraries and library flags. + if AC_TRY_EVAL(ac_compile); then +@@ -6507,7 +6918,7 @@ if AC_TRY_EVAL(ac_compile); then + pre_test_object_deps_done=no + + for p in `eval "$output_verbose_link_cmd"`; do +- case $p in ++ case ${prev}${p} in + + -L* | -R* | -l*) + # Some compilers place space between "-{L,R}" and the path. +@@ -6516,13 +6927,22 @@ if AC_TRY_EVAL(ac_compile); then + test $p = "-R"; then + prev=$p + continue +- else +- prev= + fi + ++ # Expand the sysroot to ease extracting the directories later. ++ if test -z "$prev"; then ++ case $p in ++ -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; ++ -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; ++ -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; ++ esac ++ fi ++ case $p in ++ =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; ++ esac + if test "$pre_test_object_deps_done" = no; then +- case $p in +- -L* | -R*) ++ case ${prev} in ++ -L | -R) + # Internal compiler library paths should come after those + # provided the user. The postdeps already come after the + # user supplied libs so there is no need to process them. +@@ -6542,8 +6962,10 @@ if AC_TRY_EVAL(ac_compile); then + _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" + fi + fi ++ prev= + ;; + ++ *.lto.$objext) ;; # Ignore GCC LTO objects + *.$objext) + # This assumes that the test object file only shows up + # once in the compiler output. +@@ -6579,6 +7001,7 @@ else + fi + + $RM -f confest.$objext ++CFLAGS=$_lt_libdeps_save_CFLAGS + + # PORTME: override above test on systems where it is broken + m4_if([$1], [CXX], +@@ -6615,7 +7038,7 @@ linux*) + + solaris*) + case $cc_basename in +- CC*) ++ CC* | sunCC*) + # The more standards-conforming stlport4 library is + # incompatible with the Cstd library. Avoid specifying + # it if it's in CXXFLAGS. Ignore libCrun as +@@ -6728,7 +7151,9 @@ if test "$_lt_disable_F77" != yes; then + # Allow CC to be a program name with arguments. + lt_save_CC="$CC" + lt_save_GCC=$GCC ++ lt_save_CFLAGS=$CFLAGS + CC=${F77-"f77"} ++ CFLAGS=$FFLAGS + compiler=$CC + _LT_TAGVAR(compiler, $1)=$CC + _LT_CC_BASENAME([$compiler]) +@@ -6782,6 +7207,7 @@ if test "$_lt_disable_F77" != yes; then + + GCC=$lt_save_GCC + CC="$lt_save_CC" ++ CFLAGS="$lt_save_CFLAGS" + fi # test "$_lt_disable_F77" != yes + + AC_LANG_POP +@@ -6858,7 +7284,9 @@ if test "$_lt_disable_FC" != yes; then + # Allow CC to be a program name with arguments. + lt_save_CC="$CC" + lt_save_GCC=$GCC ++ lt_save_CFLAGS=$CFLAGS + CC=${FC-"f95"} ++ CFLAGS=$FCFLAGS + compiler=$CC + GCC=$ac_cv_fc_compiler_gnu + +@@ -6914,7 +7342,8 @@ if test "$_lt_disable_FC" != yes; then + fi # test -n "$compiler" + + GCC=$lt_save_GCC +- CC="$lt_save_CC" ++ CC=$lt_save_CC ++ CFLAGS=$lt_save_CFLAGS + fi # test "$_lt_disable_FC" != yes + + AC_LANG_POP +@@ -6951,10 +7380,12 @@ _LT_COMPILER_BOILERPLATE + _LT_LINKER_BOILERPLATE + + # Allow CC to be a program name with arguments. +-lt_save_CC="$CC" ++lt_save_CC=$CC ++lt_save_CFLAGS=$CFLAGS + lt_save_GCC=$GCC + GCC=yes + CC=${GCJ-"gcj"} ++CFLAGS=$GCJFLAGS + compiler=$CC + _LT_TAGVAR(compiler, $1)=$CC + _LT_TAGVAR(LD, $1)="$LD" +@@ -6985,7 +7416,8 @@ fi + AC_LANG_RESTORE + + GCC=$lt_save_GCC +-CC="$lt_save_CC" ++CC=$lt_save_CC ++CFLAGS=$lt_save_CFLAGS + ])# _LT_LANG_GCJ_CONFIG + + +@@ -7020,9 +7452,11 @@ _LT_LINKER_BOILERPLATE + + # Allow CC to be a program name with arguments. + lt_save_CC="$CC" ++lt_save_CFLAGS=$CFLAGS + lt_save_GCC=$GCC + GCC= + CC=${RC-"windres"} ++CFLAGS= + compiler=$CC + _LT_TAGVAR(compiler, $1)=$CC + _LT_CC_BASENAME([$compiler]) +@@ -7035,7 +7469,8 @@ fi + + GCC=$lt_save_GCC + AC_LANG_RESTORE +-CC="$lt_save_CC" ++CC=$lt_save_CC ++CFLAGS=$lt_save_CFLAGS + ])# _LT_LANG_RC_CONFIG + + +@@ -7094,6 +7529,15 @@ _LT_DECL([], [OBJDUMP], [1], [An object + AC_SUBST([OBJDUMP]) + ]) + ++# _LT_DECL_DLLTOOL ++# ---------------- ++# Ensure DLLTOOL variable is set. ++m4_defun([_LT_DECL_DLLTOOL], ++[AC_CHECK_TOOL(DLLTOOL, dlltool, false) ++test -z "$DLLTOOL" && DLLTOOL=dlltool ++_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) ++AC_SUBST([DLLTOOL]) ++]) + + # _LT_DECL_SED + # ------------ +@@ -7187,8 +7631,8 @@ m4_defun([_LT_CHECK_SHELL_FEATURES], + # Try some XSI features + xsi_shell=no + ( _lt_dummy="a/b/c" +- test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ +- = c,a/b,, \ ++ test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ ++ = c,a/b,b/c, \ + && eval 'test $(( 1 + 1 )) -eq 2 \ + && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ + && xsi_shell=yes +@@ -7227,206 +7671,162 @@ _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn + ])# _LT_CHECK_SHELL_FEATURES + + +-# _LT_PROG_XSI_SHELLFNS +-# --------------------- +-# Bourne and XSI compatible variants of some useful shell functions. +-m4_defun([_LT_PROG_XSI_SHELLFNS], +-[case $xsi_shell in +- yes) +- cat << \_LT_EOF >> "$cfgfile" +- +-# func_dirname file append nondir_replacement +-# Compute the dirname of FILE. If nonempty, add APPEND to the result, +-# otherwise set result to NONDIR_REPLACEMENT. +-func_dirname () +-{ +- case ${1} in +- */*) func_dirname_result="${1%/*}${2}" ;; +- * ) func_dirname_result="${3}" ;; +- esac +-} +- +-# func_basename file +-func_basename () +-{ +- func_basename_result="${1##*/}" +-} +- +-# func_dirname_and_basename file append nondir_replacement +-# perform func_basename and func_dirname in a single function +-# call: +-# dirname: Compute the dirname of FILE. If nonempty, +-# add APPEND to the result, otherwise set result +-# to NONDIR_REPLACEMENT. +-# value returned in "$func_dirname_result" +-# basename: Compute filename of FILE. +-# value retuned in "$func_basename_result" +-# Implementation must be kept synchronized with func_dirname +-# and func_basename. For efficiency, we do not delegate to +-# those functions but instead duplicate the functionality here. +-func_dirname_and_basename () +-{ +- case ${1} in +- */*) func_dirname_result="${1%/*}${2}" ;; +- * ) func_dirname_result="${3}" ;; +- esac +- func_basename_result="${1##*/}" +-} +- +-# func_stripname prefix suffix name +-# strip PREFIX and SUFFIX off of NAME. +-# PREFIX and SUFFIX must not contain globbing or regex special +-# characters, hashes, percent signs, but SUFFIX may contain a leading +-# dot (in which case that matches only a dot). +-func_stripname () +-{ +- # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are +- # positional parameters, so assign one to ordinary parameter first. +- func_stripname_result=${3} +- func_stripname_result=${func_stripname_result#"${1}"} +- func_stripname_result=${func_stripname_result%"${2}"} +-} +- +-# func_opt_split +-func_opt_split () +-{ +- func_opt_split_opt=${1%%=*} +- func_opt_split_arg=${1#*=} +-} +- +-# func_lo2o object +-func_lo2o () +-{ +- case ${1} in +- *.lo) func_lo2o_result=${1%.lo}.${objext} ;; +- *) func_lo2o_result=${1} ;; +- esac +-} +- +-# func_xform libobj-or-source +-func_xform () +-{ +- func_xform_result=${1%.*}.lo +-} +- +-# func_arith arithmetic-term... +-func_arith () +-{ +- func_arith_result=$(( $[*] )) +-} +- +-# func_len string +-# STRING may not start with a hyphen. +-func_len () +-{ +- func_len_result=${#1} +-} +- +-_LT_EOF +- ;; +- *) # Bourne compatible functions. +- cat << \_LT_EOF >> "$cfgfile" +- +-# func_dirname file append nondir_replacement +-# Compute the dirname of FILE. If nonempty, add APPEND to the result, +-# otherwise set result to NONDIR_REPLACEMENT. +-func_dirname () +-{ +- # Extract subdirectory from the argument. +- func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` +- if test "X$func_dirname_result" = "X${1}"; then +- func_dirname_result="${3}" +- else +- func_dirname_result="$func_dirname_result${2}" +- fi +-} +- +-# func_basename file +-func_basename () +-{ +- func_basename_result=`$ECHO "${1}" | $SED "$basename"` +-} ++# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) ++# ------------------------------------------------------ ++# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and ++# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. ++m4_defun([_LT_PROG_FUNCTION_REPLACE], ++[dnl { ++sed -e '/^$1 ()$/,/^} # $1 /c\ ++$1 ()\ ++{\ ++m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) ++} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++]) + +-dnl func_dirname_and_basename +-dnl A portable version of this function is already defined in general.m4sh +-dnl so there is no need for it here. + +-# func_stripname prefix suffix name +-# strip PREFIX and SUFFIX off of NAME. +-# PREFIX and SUFFIX must not contain globbing or regex special +-# characters, hashes, percent signs, but SUFFIX may contain a leading +-# dot (in which case that matches only a dot). +-# func_strip_suffix prefix name +-func_stripname () +-{ +- case ${2} in +- .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; +- *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; +- esac +-} ++# _LT_PROG_REPLACE_SHELLFNS ++# ------------------------- ++# Replace existing portable implementations of several shell functions with ++# equivalent extended shell implementations where those features are available.. ++m4_defun([_LT_PROG_REPLACE_SHELLFNS], ++[if test x"$xsi_shell" = xyes; then ++ _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl ++ case ${1} in ++ */*) func_dirname_result="${1%/*}${2}" ;; ++ * ) func_dirname_result="${3}" ;; ++ esac]) ++ ++ _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl ++ func_basename_result="${1##*/}"]) ++ ++ _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl ++ case ${1} in ++ */*) func_dirname_result="${1%/*}${2}" ;; ++ * ) func_dirname_result="${3}" ;; ++ esac ++ func_basename_result="${1##*/}"]) + +-# sed scripts: +-my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q' +-my_sed_long_arg='1s/^-[[^=]]*=//' ++ _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl ++ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are ++ # positional parameters, so assign one to ordinary parameter first. ++ func_stripname_result=${3} ++ func_stripname_result=${func_stripname_result#"${1}"} ++ func_stripname_result=${func_stripname_result%"${2}"}]) ++ ++ _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl ++ func_split_long_opt_name=${1%%=*} ++ func_split_long_opt_arg=${1#*=}]) ++ ++ _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl ++ func_split_short_opt_arg=${1#??} ++ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) ++ ++ _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl ++ case ${1} in ++ *.lo) func_lo2o_result=${1%.lo}.${objext} ;; ++ *) func_lo2o_result=${1} ;; ++ esac]) + +-# func_opt_split +-func_opt_split () +-{ +- func_opt_split_opt=`$ECHO "${1}" | $SED "$my_sed_long_opt"` +- func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"` +-} ++ _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) + +-# func_lo2o object +-func_lo2o () +-{ +- func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` +-} ++ _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) + +-# func_xform libobj-or-source +-func_xform () +-{ +- func_xform_result=`$ECHO "${1}" | $SED 's/\.[[^.]]*$/.lo/'` +-} ++ _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) ++fi + +-# func_arith arithmetic-term... +-func_arith () +-{ +- func_arith_result=`expr "$[@]"` +-} ++if test x"$lt_shell_append" = xyes; then ++ _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) + +-# func_len string +-# STRING may not start with a hyphen. +-func_len () +-{ +- func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len` +-} ++ _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl ++ func_quote_for_eval "${2}" ++dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ ++ eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) ++ ++ # Save a `func_append' function call where possible by direct use of '+=' ++ sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++ test 0 -eq $? || _lt_function_replace_fail=: ++else ++ # Save a `func_append' function call even when '+=' is not available ++ sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++ test 0 -eq $? || _lt_function_replace_fail=: ++fi + +-_LT_EOF +-esac ++if test x"$_lt_function_replace_fail" = x":"; then ++ AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) ++fi ++]) + +-case $lt_shell_append in +- yes) +- cat << \_LT_EOF >> "$cfgfile" +- +-# func_append var value +-# Append VALUE to the end of shell variable VAR. +-func_append () +-{ +- eval "$[1]+=\$[2]" +-} +-_LT_EOF ++# _LT_PATH_CONVERSION_FUNCTIONS ++# ----------------------------- ++# Determine which file name conversion functions should be used by ++# func_to_host_file (and, implicitly, by func_to_host_path). These are needed ++# for certain cross-compile configurations and native mingw. ++m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], ++[AC_REQUIRE([AC_CANONICAL_HOST])dnl ++AC_REQUIRE([AC_CANONICAL_BUILD])dnl ++AC_MSG_CHECKING([how to convert $build file names to $host format]) ++AC_CACHE_VAL(lt_cv_to_host_file_cmd, ++[case $host in ++ *-*-mingw* ) ++ case $build in ++ *-*-mingw* ) # actually msys ++ lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ++ ;; ++ *-*-cygwin* ) ++ lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ++ ;; ++ * ) # otherwise, assume *nix ++ lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ++ ;; ++ esac + ;; +- *) +- cat << \_LT_EOF >> "$cfgfile" +- +-# func_append var value +-# Append VALUE to the end of shell variable VAR. +-func_append () +-{ +- eval "$[1]=\$$[1]\$[2]" +-} +- +-_LT_EOF ++ *-*-cygwin* ) ++ case $build in ++ *-*-mingw* ) # actually msys ++ lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ++ ;; ++ *-*-cygwin* ) ++ lt_cv_to_host_file_cmd=func_convert_file_noop ++ ;; ++ * ) # otherwise, assume *nix ++ lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ++ ;; ++ esac + ;; +- esac ++ * ) # unhandled hosts (and "normal" native builds) ++ lt_cv_to_host_file_cmd=func_convert_file_noop ++ ;; ++esac ++]) ++to_host_file_cmd=$lt_cv_to_host_file_cmd ++AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) ++_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], ++ [0], [convert $build file names to $host format])dnl ++ ++AC_MSG_CHECKING([how to convert $build file names to toolchain format]) ++AC_CACHE_VAL(lt_cv_to_tool_file_cmd, ++[#assume ordinary cross tools, or native build. ++lt_cv_to_tool_file_cmd=func_convert_file_noop ++case $host in ++ *-*-mingw* ) ++ case $build in ++ *-*-mingw* ) # actually msys ++ lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ++ ;; ++ esac ++ ;; ++esac + ]) ++to_tool_file_cmd=$lt_cv_to_tool_file_cmd ++AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) ++_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], ++ [0], [convert $build files to toolchain format])dnl ++])# _LT_PATH_CONVERSION_FUNCTIONS +Index: binutils-2.21.1/ltmain.sh +=================================================================== +--- binutils-2.21.1.orig/ltmain.sh ++++ binutils-2.21.1/ltmain.sh +@@ -1,10 +1,9 @@ +-# Generated from ltmain.m4sh. + +-# libtool (GNU libtool 1.3134 2009-11-29) 2.2.7a ++# libtool (GNU libtool) 2.4 + # Written by Gordon Matzigkeit , 1996 + + # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, +-# 2007, 2008, 2009 Free Software Foundation, Inc. ++# 2007, 2008, 2009, 2010 Free Software Foundation, Inc. + # This is free software; see the source for copying conditions. There is NO + # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +@@ -38,7 +37,6 @@ + # -n, --dry-run display commands without modifying any files + # --features display basic configuration information and exit + # --mode=MODE use operation mode MODE +-# --no-finish let install mode avoid finish commands + # --preserve-dup-deps don't remove duplicate dependency libraries + # --quiet, --silent don't print informational messages + # --no-quiet, --no-silent +@@ -71,17 +69,19 @@ + # compiler: $LTCC + # compiler flags: $LTCFLAGS + # linker: $LD (gnu? $with_gnu_ld) +-# $progname: (GNU libtool 1.3134 2009-11-29) 2.2.7a ++# $progname: (GNU libtool) 2.4 + # automake: $automake_version + # autoconf: $autoconf_version + # + # Report bugs to . ++# GNU libtool home page: . ++# General help using GNU software: . + + PROGRAM=libtool + PACKAGE=libtool +-VERSION=2.2.7a +-TIMESTAMP=" 1.3134 2009-11-29" +-package_revision=1.3134 ++VERSION=2.4 ++TIMESTAMP="" ++package_revision=1.3293 + + # Be Bourne compatible + if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then +@@ -106,9 +106,6 @@ _LTECHO_EOF' + } + + # NLS nuisances: We save the old values to restore during execute mode. +-# Only set LANG and LC_ALL to C if already set. +-# These must not be set unconditionally because not all systems understand +-# e.g. LANG=C (notably SCO). + lt_user_locale= + lt_safe_locale= + for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES +@@ -121,15 +118,13 @@ do + lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" + fi" + done ++LC_ALL=C ++LANGUAGE=C ++export LANGUAGE LC_ALL + + $lt_unset CDPATH + + +- +- +- +- +- + # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh + # is ksh but when the shell is invoked as "sh" and the current value of + # the _XPG environment variable is not equal to 1 (one), the special +@@ -140,7 +135,7 @@ progpath="$0" + + + : ${CP="cp -f"} +-: ${ECHO=$as_echo} ++test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'} + : ${EGREP="/bin/grep -E"} + : ${FGREP="/bin/grep -F"} + : ${GREP="/bin/grep"} +@@ -149,7 +144,7 @@ progpath="$0" + : ${MKDIR="mkdir"} + : ${MV="mv -f"} + : ${RM="rm -f"} +-: ${SED="/mount/endor/wildenhu/local-x86_64/bin/sed"} ++: ${SED="/bin/sed"} + : ${SHELL="${CONFIG_SHELL-/bin/sh}"} + : ${Xsed="$SED -e 1s/^X//"} + +@@ -169,6 +164,27 @@ IFS=" $lt_nl" + dirname="s,/[^/]*$,," + basename="s,^.*/,," + ++# func_dirname file append nondir_replacement ++# Compute the dirname of FILE. If nonempty, add APPEND to the result, ++# otherwise set result to NONDIR_REPLACEMENT. ++func_dirname () ++{ ++ func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` ++ if test "X$func_dirname_result" = "X${1}"; then ++ func_dirname_result="${3}" ++ else ++ func_dirname_result="$func_dirname_result${2}" ++ fi ++} # func_dirname may be replaced by extended shell implementation ++ ++ ++# func_basename file ++func_basename () ++{ ++ func_basename_result=`$ECHO "${1}" | $SED "$basename"` ++} # func_basename may be replaced by extended shell implementation ++ ++ + # func_dirname_and_basename file append nondir_replacement + # perform func_basename and func_dirname in a single function + # call: +@@ -183,17 +199,31 @@ basename="s,^.*/,," + # those functions but instead duplicate the functionality here. + func_dirname_and_basename () + { +- # Extract subdirectory from the argument. +- func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"` +- if test "X$func_dirname_result" = "X${1}"; then +- func_dirname_result="${3}" +- else +- func_dirname_result="$func_dirname_result${2}" +- fi +- func_basename_result=`$ECHO "${1}" | $SED -e "$basename"` +-} ++ # Extract subdirectory from the argument. ++ func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"` ++ if test "X$func_dirname_result" = "X${1}"; then ++ func_dirname_result="${3}" ++ else ++ func_dirname_result="$func_dirname_result${2}" ++ fi ++ func_basename_result=`$ECHO "${1}" | $SED -e "$basename"` ++} # func_dirname_and_basename may be replaced by extended shell implementation ++ ++ ++# func_stripname prefix suffix name ++# strip PREFIX and SUFFIX off of NAME. ++# PREFIX and SUFFIX must not contain globbing or regex special ++# characters, hashes, percent signs, but SUFFIX may contain a leading ++# dot (in which case that matches only a dot). ++# func_strip_suffix prefix name ++func_stripname () ++{ ++ case ${2} in ++ .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; ++ *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; ++ esac ++} # func_stripname may be replaced by extended shell implementation + +-# Generated shell functions inserted here. + + # These SED scripts presuppose an absolute path with a trailing slash. + pathcar='s,^/\([^/]*\).*$,\1,' +@@ -376,6 +406,15 @@ sed_quote_subst='s/\([`"$\\]\)/\\\1/g' + # Same as above, but do not quote variable references. + double_quote_subst='s/\(["`\\]\)/\\\1/g' + ++# Sed substitution that turns a string into a regex matching for the ++# string literally. ++sed_make_literal_regex='s,[].[^$\\*\/],\\&,g' ++ ++# Sed substitution that converts a w32 file name or path ++# which contains forward slashes, into one that contains ++# (escaped) backslashes. A very naive implementation. ++lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' ++ + # Re-`\' parameter expansions in output of double_quote_subst that were + # `\'-ed in input to the same. If an odd number of `\' preceded a '$' + # in input to double_quote_subst, that '$' was protected from expansion. +@@ -404,7 +443,7 @@ opt_warning=: + # name if it has been set yet. + func_echo () + { +- $ECHO "$progname${mode+: }$mode: $*" ++ $ECHO "$progname: ${opt_mode+$opt_mode: }$*" + } + + # func_verbose arg... +@@ -430,14 +469,14 @@ func_echo_all () + # Echo program name prefixed message to standard error. + func_error () + { +- $ECHO "$progname${mode+: }$mode: "${1+"$@"} 1>&2 ++ $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2 + } + + # func_warning arg... + # Echo program name prefixed warning message to standard error. + func_warning () + { +- $opt_warning && $ECHO "$progname${mode+: }$mode: warning: "${1+"$@"} 1>&2 ++ $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2 + + # bash bug again: + : +@@ -656,19 +695,35 @@ func_show_eval_locale () + fi + } + +- +- ++# func_tr_sh ++# Turn $1 into a string suitable for a shell variable name. ++# Result is stored in $func_tr_sh_result. All characters ++# not in the set a-zA-Z0-9_ are replaced with '_'. Further, ++# if $1 begins with a digit, a '_' is prepended as well. ++func_tr_sh () ++{ ++ case $1 in ++ [0-9]* | *[!a-zA-Z0-9_]*) ++ func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'` ++ ;; ++ * ) ++ func_tr_sh_result=$1 ++ ;; ++ esac ++} + + + # func_version + # Echo version message to standard output and exit. + func_version () + { ++ $opt_debug ++ + $SED -n '/(C)/!b go + :more + /\./!{ + N +- s/\n# // ++ s/\n# / / + b more + } + :go +@@ -685,7 +740,9 @@ func_version () + # Echo short help message to standard output and exit. + func_usage () + { +- $SED -n '/^# Usage:/,/^# *-h/ { ++ $opt_debug ++ ++ $SED -n '/^# Usage:/,/^# *.*--help/ { + s/^# // + s/^# *$// + s/\$progname/'$progname'/ +@@ -701,7 +758,10 @@ func_usage () + # unless 'noexit' is passed as argument. + func_help () + { ++ $opt_debug ++ + $SED -n '/^# Usage:/,/# Report bugs to/ { ++ :print + s/^# // + s/^# *$// + s*\$progname*'$progname'* +@@ -714,7 +774,11 @@ func_help () + s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/ + s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/ + p +- }' < "$progpath" ++ d ++ } ++ /^# .* home page:/b print ++ /^# General help using/b print ++ ' < "$progpath" + ret=$? + if test -z "$1"; then + exit $ret +@@ -726,12 +790,39 @@ func_help () + # exit_cmd. + func_missing_arg () + { +- func_error "missing argument for $1" ++ $opt_debug ++ ++ func_error "missing argument for $1." + exit_cmd=exit + } + +-exit_cmd=: + ++# func_split_short_opt shortopt ++# Set func_split_short_opt_name and func_split_short_opt_arg shell ++# variables after splitting SHORTOPT after the 2nd character. ++func_split_short_opt () ++{ ++ my_sed_short_opt='1s/^\(..\).*$/\1/;q' ++ my_sed_short_rest='1s/^..\(.*\)$/\1/;q' ++ ++ func_split_short_opt_name=`$ECHO "$1" | $SED "$my_sed_short_opt"` ++ func_split_short_opt_arg=`$ECHO "$1" | $SED "$my_sed_short_rest"` ++} # func_split_short_opt may be replaced by extended shell implementation ++ ++ ++# func_split_long_opt longopt ++# Set func_split_long_opt_name and func_split_long_opt_arg shell ++# variables after splitting LONGOPT at the `=' sign. ++func_split_long_opt () ++{ ++ my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q' ++ my_sed_long_arg='1s/^--[^=]*=//' ++ ++ func_split_long_opt_name=`$ECHO "$1" | $SED "$my_sed_long_opt"` ++ func_split_long_opt_arg=`$ECHO "$1" | $SED "$my_sed_long_arg"` ++} # func_split_long_opt may be replaced by extended shell implementation ++ ++exit_cmd=: + + + +@@ -741,26 +832,64 @@ magic="%%%MAGIC variable%%%" + magic_exe="%%%MAGIC EXE variable%%%" + + # Global variables. +-# $mode is unset + nonopt= +-execute_dlfiles= + preserve_args= + lo2o="s/\\.lo\$/.${objext}/" + o2lo="s/\\.${objext}\$/.lo/" + extracted_archives= + extracted_serial=0 + +-opt_dry_run=false +-opt_finish=: +-opt_duplicate_deps=false +-opt_silent=false +-opt_debug=: +- + # If this variable is set in any of the actions, the command in it + # will be execed at the end. This prevents here-documents from being + # left over by shells. + exec_cmd= + ++# func_append var value ++# Append VALUE to the end of shell variable VAR. ++func_append () ++{ ++ eval "${1}=\$${1}\${2}" ++} # func_append may be replaced by extended shell implementation ++ ++# func_append_quoted var value ++# Quote VALUE and append to the end of shell variable VAR, separated ++# by a space. ++func_append_quoted () ++{ ++ func_quote_for_eval "${2}" ++ eval "${1}=\$${1}\\ \$func_quote_for_eval_result" ++} # func_append_quoted may be replaced by extended shell implementation ++ ++ ++# func_arith arithmetic-term... ++func_arith () ++{ ++ func_arith_result=`expr "${@}"` ++} # func_arith may be replaced by extended shell implementation ++ ++ ++# func_len string ++# STRING may not start with a hyphen. ++func_len () ++{ ++ func_len_result=`expr "${1}" : ".*" 2>/dev/null || echo $max_cmd_len` ++} # func_len may be replaced by extended shell implementation ++ ++ ++# func_lo2o object ++func_lo2o () ++{ ++ func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` ++} # func_lo2o may be replaced by extended shell implementation ++ ++ ++# func_xform libobj-or-source ++func_xform () ++{ ++ func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` ++} # func_xform may be replaced by extended shell implementation ++ ++ + # func_fatal_configuration arg... + # Echo program name prefixed message to standard error, followed by + # a configuration failure hint, and exit. +@@ -850,130 +979,204 @@ func_enable_tag () + esac + } + +-# Parse options once, thoroughly. This comes as soon as possible in +-# the script to make things like `libtool --version' happen quickly. ++# func_check_version_match ++# Ensure that we are using m4 macros, and libtool script from the same ++# release of libtool. ++func_check_version_match () + { ++ if test "$package_revision" != "$macro_revision"; then ++ if test "$VERSION" != "$macro_version"; then ++ if test -z "$macro_version"; then ++ cat >&2 <<_LT_EOF ++$progname: Version mismatch error. This is $PACKAGE $VERSION, but the ++$progname: definition of this LT_INIT comes from an older release. ++$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION ++$progname: and run autoconf again. ++_LT_EOF ++ else ++ cat >&2 <<_LT_EOF ++$progname: Version mismatch error. This is $PACKAGE $VERSION, but the ++$progname: definition of this LT_INIT comes from $PACKAGE $macro_version. ++$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION ++$progname: and run autoconf again. ++_LT_EOF ++ fi ++ else ++ cat >&2 <<_LT_EOF ++$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, ++$progname: but the definition of this LT_INIT comes from revision $macro_revision. ++$progname: You should recreate aclocal.m4 with macros from revision $package_revision ++$progname: of $PACKAGE $VERSION and run autoconf again. ++_LT_EOF ++ fi ++ ++ exit $EXIT_MISMATCH ++ fi ++} ++ ++ ++# Shorthand for --mode=foo, only valid as the first argument ++case $1 in ++clean|clea|cle|cl) ++ shift; set dummy --mode clean ${1+"$@"}; shift ++ ;; ++compile|compil|compi|comp|com|co|c) ++ shift; set dummy --mode compile ${1+"$@"}; shift ++ ;; ++execute|execut|execu|exec|exe|ex|e) ++ shift; set dummy --mode execute ${1+"$@"}; shift ++ ;; ++finish|finis|fini|fin|fi|f) ++ shift; set dummy --mode finish ${1+"$@"}; shift ++ ;; ++install|instal|insta|inst|ins|in|i) ++ shift; set dummy --mode install ${1+"$@"}; shift ++ ;; ++link|lin|li|l) ++ shift; set dummy --mode link ${1+"$@"}; shift ++ ;; ++uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) ++ shift; set dummy --mode uninstall ${1+"$@"}; shift ++ ;; ++esac + +- # Shorthand for --mode=foo, only valid as the first argument +- case $1 in +- clean|clea|cle|cl) +- shift; set dummy --mode clean ${1+"$@"}; shift +- ;; +- compile|compil|compi|comp|com|co|c) +- shift; set dummy --mode compile ${1+"$@"}; shift +- ;; +- execute|execut|execu|exec|exe|ex|e) +- shift; set dummy --mode execute ${1+"$@"}; shift +- ;; +- finish|finis|fini|fin|fi|f) +- shift; set dummy --mode finish ${1+"$@"}; shift +- ;; +- install|instal|insta|inst|ins|in|i) +- shift; set dummy --mode install ${1+"$@"}; shift +- ;; +- link|lin|li|l) +- shift; set dummy --mode link ${1+"$@"}; shift +- ;; +- uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) +- shift; set dummy --mode uninstall ${1+"$@"}; shift +- ;; +- esac + +- # Parse non-mode specific arguments: +- while test "$#" -gt 0; do ++ ++# Option defaults: ++opt_debug=: ++opt_dry_run=false ++opt_config=false ++opt_preserve_dup_deps=false ++opt_features=false ++opt_finish=false ++opt_help=false ++opt_help_all=false ++opt_silent=: ++opt_verbose=: ++opt_silent=false ++opt_verbose=false ++ ++ ++# Parse options once, thoroughly. This comes as soon as possible in the ++# script to make things like `--version' happen as quickly as we can. ++{ ++ # this just eases exit handling ++ while test $# -gt 0; do + opt="$1" + shift +- + case $opt in +- --config) func_config ;; +- +- --debug) preserve_args="$preserve_args $opt" ++ --debug|-x) opt_debug='set -x' + func_echo "enabling shell trace mode" +- opt_debug='set -x' + $opt_debug + ;; +- +- -dlopen) test "$#" -eq 0 && func_missing_arg "$opt" && break +- execute_dlfiles="$execute_dlfiles $1" +- shift ++ --dry-run|--dryrun|-n) ++ opt_dry_run=: + ;; +- +- --dry-run | -n) opt_dry_run=: ;; +- --features) func_features ;; +- --finish) mode="finish" ;; +- --no-finish) opt_finish=false ;; +- +- --mode) test "$#" -eq 0 && func_missing_arg "$opt" && break +- case $1 in +- # Valid mode arguments: +- clean) ;; +- compile) ;; +- execute) ;; +- finish) ;; +- install) ;; +- link) ;; +- relink) ;; +- uninstall) ;; +- +- # Catch anything else as an error +- *) func_error "invalid argument for $opt" +- exit_cmd=exit +- break +- ;; +- esac +- +- mode="$1" ++ --config) ++ opt_config=: ++func_config ++ ;; ++ --dlopen|-dlopen) ++ optarg="$1" ++ opt_dlopen="${opt_dlopen+$opt_dlopen ++}$optarg" + shift + ;; +- + --preserve-dup-deps) +- opt_duplicate_deps=: ;; +- +- --quiet|--silent) preserve_args="$preserve_args $opt" +- opt_silent=: +- opt_verbose=false ++ opt_preserve_dup_deps=: + ;; +- +- --no-quiet|--no-silent) +- preserve_args="$preserve_args $opt" +- opt_silent=false ++ --features) ++ opt_features=: ++func_features + ;; +- +- --verbose| -v) preserve_args="$preserve_args $opt" ++ --finish) ++ opt_finish=: ++set dummy --mode finish ${1+"$@"}; shift ++ ;; ++ --help) ++ opt_help=: ++ ;; ++ --help-all) ++ opt_help_all=: ++opt_help=': help-all' ++ ;; ++ --mode) ++ test $# = 0 && func_missing_arg $opt && break ++ optarg="$1" ++ opt_mode="$optarg" ++case $optarg in ++ # Valid mode arguments: ++ clean|compile|execute|finish|install|link|relink|uninstall) ;; ++ ++ # Catch anything else as an error ++ *) func_error "invalid argument for $opt" ++ exit_cmd=exit ++ break ++ ;; ++esac ++ shift ++ ;; ++ --no-silent|--no-quiet) + opt_silent=false +- opt_verbose=: ++func_append preserve_args " $opt" + ;; +- +- --no-verbose) preserve_args="$preserve_args $opt" ++ --no-verbose) + opt_verbose=false ++func_append preserve_args " $opt" + ;; +- +- --tag) test "$#" -eq 0 && func_missing_arg "$opt" && break +- preserve_args="$preserve_args $opt $1" +- func_enable_tag "$1" # tagname is set here ++ --silent|--quiet) ++ opt_silent=: ++func_append preserve_args " $opt" ++ opt_verbose=false ++ ;; ++ --verbose|-v) ++ opt_verbose=: ++func_append preserve_args " $opt" ++opt_silent=false ++ ;; ++ --tag) ++ test $# = 0 && func_missing_arg $opt && break ++ optarg="$1" ++ opt_tag="$optarg" ++func_append preserve_args " $opt $optarg" ++func_enable_tag "$optarg" + shift + ;; + ++ -\?|-h) func_usage ;; ++ --help) func_help ;; ++ --version) func_version ;; ++ + # Separate optargs to long options: +- -dlopen=*|--mode=*|--tag=*) +- func_opt_split "$opt" +- set dummy "$func_opt_split_opt" "$func_opt_split_arg" ${1+"$@"} ++ --*=*) ++ func_split_long_opt "$opt" ++ set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"} + shift + ;; + +- -\?|-h) func_usage ;; +- --help) opt_help=: ;; +- --help-all) opt_help=': help-all' ;; +- --version) func_version ;; +- +- -*) func_fatal_help "unrecognized option \`$opt'" ;; +- +- *) nonopt="$opt" +- break ++ # Separate non-argument short options: ++ -\?*|-h*|-n*|-v*) ++ func_split_short_opt "$opt" ++ set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"} ++ shift + ;; ++ ++ --) break ;; ++ -*) func_fatal_help "unrecognized option \`$opt'" ;; ++ *) set dummy "$opt" ${1+"$@"}; shift; break ;; + esac + done + ++ # Validate options: ++ ++ # save first non-option argument ++ if test "$#" -gt 0; then ++ nonopt="$opt" ++ shift ++ fi ++ ++ # preserve --debug ++ test "$opt_debug" = : || func_append preserve_args " --debug" + + case $host in + *cygwin* | *mingw* | *pw32* | *cegcc*) +@@ -981,82 +1184,44 @@ func_enable_tag () + opt_duplicate_compiler_generated_deps=: + ;; + *) +- opt_duplicate_compiler_generated_deps=$opt_duplicate_deps ++ opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps + ;; + esac + +- # Having warned about all mis-specified options, bail out if +- # anything was wrong. +- $exit_cmd $EXIT_FAILURE +-} ++ $opt_help || { ++ # Sanity checks first: ++ func_check_version_match + +-# func_check_version_match +-# Ensure that we are using m4 macros, and libtool script from the same +-# release of libtool. +-func_check_version_match () +-{ +- if test "$package_revision" != "$macro_revision"; then +- if test "$VERSION" != "$macro_version"; then +- if test -z "$macro_version"; then +- cat >&2 <<_LT_EOF +-$progname: Version mismatch error. This is $PACKAGE $VERSION, but the +-$progname: definition of this LT_INIT comes from an older release. +-$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION +-$progname: and run autoconf again. +-_LT_EOF +- else +- cat >&2 <<_LT_EOF +-$progname: Version mismatch error. This is $PACKAGE $VERSION, but the +-$progname: definition of this LT_INIT comes from $PACKAGE $macro_version. +-$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION +-$progname: and run autoconf again. +-_LT_EOF +- fi +- else +- cat >&2 <<_LT_EOF +-$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, +-$progname: but the definition of this LT_INIT comes from revision $macro_revision. +-$progname: You should recreate aclocal.m4 with macros from revision $package_revision +-$progname: of $PACKAGE $VERSION and run autoconf again. +-_LT_EOF ++ if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then ++ func_fatal_configuration "not configured to build any kind of library" + fi + +- exit $EXIT_MISMATCH +- fi +-} +- ++ # Darwin sucks ++ eval std_shrext=\"$shrext_cmds\" + +-## ----------- ## +-## Main. ## +-## ----------- ## +- +-$opt_help || { +- # Sanity checks first: +- func_check_version_match +- +- if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then +- func_fatal_configuration "not configured to build any kind of library" +- fi ++ # Only execute mode is allowed to have -dlopen flags. ++ if test -n "$opt_dlopen" && test "$opt_mode" != execute; then ++ func_error "unrecognized option \`-dlopen'" ++ $ECHO "$help" 1>&2 ++ exit $EXIT_FAILURE ++ fi + +- test -z "$mode" && func_fatal_error "error: you must specify a MODE." ++ # Change the help message to a mode-specific one. ++ generic_help="$help" ++ help="Try \`$progname --help --mode=$opt_mode' for more information." ++ } + + +- # Darwin sucks +- eval "std_shrext=\"$shrext_cmds\"" ++ # Bail if the options were screwed ++ $exit_cmd $EXIT_FAILURE ++} + + +- # Only execute mode is allowed to have -dlopen flags. +- if test -n "$execute_dlfiles" && test "$mode" != execute; then +- func_error "unrecognized option \`-dlopen'" +- $ECHO "$help" 1>&2 +- exit $EXIT_FAILURE +- fi + +- # Change the help message to a mode-specific one. +- generic_help="$help" +- help="Try \`$progname --help --mode=$mode' for more information." +-} + ++## ----------- ## ++## Main. ## ++## ----------- ## + + # func_lalib_p file + # True iff FILE is a libtool `.la' library or `.lo' object file. +@@ -1121,12 +1286,9 @@ func_ltwrapper_executable_p () + # temporary ltwrapper_script. + func_ltwrapper_scriptname () + { +- func_ltwrapper_scriptname_result="" +- if func_ltwrapper_executable_p "$1"; then +- func_dirname_and_basename "$1" "" "." +- func_stripname '' '.exe' "$func_basename_result" +- func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" +- fi ++ func_dirname_and_basename "$1" "" "." ++ func_stripname '' '.exe' "$func_basename_result" ++ func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" + } + + # func_ltwrapper_p file +@@ -1149,7 +1311,7 @@ func_execute_cmds () + save_ifs=$IFS; IFS='~' + for cmd in $1; do + IFS=$save_ifs +- eval "cmd=\"$cmd\"" ++ eval cmd=\"$cmd\" + func_show_eval "$cmd" "${2-:}" + done + IFS=$save_ifs +@@ -1172,6 +1334,37 @@ func_source () + } + + ++# func_resolve_sysroot PATH ++# Replace a leading = in PATH with a sysroot. Store the result into ++# func_resolve_sysroot_result ++func_resolve_sysroot () ++{ ++ func_resolve_sysroot_result=$1 ++ case $func_resolve_sysroot_result in ++ =*) ++ func_stripname '=' '' "$func_resolve_sysroot_result" ++ func_resolve_sysroot_result=$lt_sysroot$func_stripname_result ++ ;; ++ esac ++} ++ ++# func_replace_sysroot PATH ++# If PATH begins with the sysroot, replace it with = and ++# store the result into func_replace_sysroot_result. ++func_replace_sysroot () ++{ ++ case "$lt_sysroot:$1" in ++ ?*:"$lt_sysroot"*) ++ func_stripname "$lt_sysroot" '' "$1" ++ func_replace_sysroot_result="=$func_stripname_result" ++ ;; ++ *) ++ # Including no sysroot. ++ func_replace_sysroot_result=$1 ++ ;; ++ esac ++} ++ + # func_infer_tag arg + # Infer tagged configuration to use if any are available and + # if one wasn't chosen via the "--tag" command line option. +@@ -1184,8 +1377,7 @@ func_infer_tag () + if test -n "$available_tags" && test -z "$tagname"; then + CC_quoted= + for arg in $CC; do +- func_quote_for_eval "$arg" +- CC_quoted="$CC_quoted $func_quote_for_eval_result" ++ func_append_quoted CC_quoted "$arg" + done + CC_expanded=`func_echo_all $CC` + CC_quoted_expanded=`func_echo_all $CC_quoted` +@@ -1204,8 +1396,7 @@ func_infer_tag () + CC_quoted= + for arg in $CC; do + # Double-quote args containing other shell metacharacters. +- func_quote_for_eval "$arg" +- CC_quoted="$CC_quoted $func_quote_for_eval_result" ++ func_append_quoted CC_quoted "$arg" + done + CC_expanded=`func_echo_all $CC` + CC_quoted_expanded=`func_echo_all $CC_quoted` +@@ -1274,6 +1465,486 @@ EOF + } + } + ++ ++################################################## ++# FILE NAME AND PATH CONVERSION HELPER FUNCTIONS # ++################################################## ++ ++# func_convert_core_file_wine_to_w32 ARG ++# Helper function used by file name conversion functions when $build is *nix, ++# and $host is mingw, cygwin, or some other w32 environment. Relies on a ++# correctly configured wine environment available, with the winepath program ++# in $build's $PATH. ++# ++# ARG is the $build file name to be converted to w32 format. ++# Result is available in $func_convert_core_file_wine_to_w32_result, and will ++# be empty on error (or when ARG is empty) ++func_convert_core_file_wine_to_w32 () ++{ ++ $opt_debug ++ func_convert_core_file_wine_to_w32_result="$1" ++ if test -n "$1"; then ++ # Unfortunately, winepath does not exit with a non-zero error code, so we ++ # are forced to check the contents of stdout. On the other hand, if the ++ # command is not found, the shell will set an exit code of 127 and print ++ # *an error message* to stdout. So we must check for both error code of ++ # zero AND non-empty stdout, which explains the odd construction: ++ func_convert_core_file_wine_to_w32_tmp=`winepath -w "$1" 2>/dev/null` ++ if test "$?" -eq 0 && test -n "${func_convert_core_file_wine_to_w32_tmp}"; then ++ func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" | ++ $SED -e "$lt_sed_naive_backslashify"` ++ else ++ func_convert_core_file_wine_to_w32_result= ++ fi ++ fi ++} ++# end: func_convert_core_file_wine_to_w32 ++ ++ ++# func_convert_core_path_wine_to_w32 ARG ++# Helper function used by path conversion functions when $build is *nix, and ++# $host is mingw, cygwin, or some other w32 environment. Relies on a correctly ++# configured wine environment available, with the winepath program in $build's ++# $PATH. Assumes ARG has no leading or trailing path separator characters. ++# ++# ARG is path to be converted from $build format to win32. ++# Result is available in $func_convert_core_path_wine_to_w32_result. ++# Unconvertible file (directory) names in ARG are skipped; if no directory names ++# are convertible, then the result may be empty. ++func_convert_core_path_wine_to_w32 () ++{ ++ $opt_debug ++ # unfortunately, winepath doesn't convert paths, only file names ++ func_convert_core_path_wine_to_w32_result="" ++ if test -n "$1"; then ++ oldIFS=$IFS ++ IFS=: ++ for func_convert_core_path_wine_to_w32_f in $1; do ++ IFS=$oldIFS ++ func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f" ++ if test -n "$func_convert_core_file_wine_to_w32_result" ; then ++ if test -z "$func_convert_core_path_wine_to_w32_result"; then ++ func_convert_core_path_wine_to_w32_result="$func_convert_core_file_wine_to_w32_result" ++ else ++ func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result" ++ fi ++ fi ++ done ++ IFS=$oldIFS ++ fi ++} ++# end: func_convert_core_path_wine_to_w32 ++ ++ ++# func_cygpath ARGS... ++# Wrapper around calling the cygpath program via LT_CYGPATH. This is used when ++# when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2) ++# $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or ++# (2), returns the Cygwin file name or path in func_cygpath_result (input ++# file name or path is assumed to be in w32 format, as previously converted ++# from $build's *nix or MSYS format). In case (3), returns the w32 file name ++# or path in func_cygpath_result (input file name or path is assumed to be in ++# Cygwin format). Returns an empty string on error. ++# ++# ARGS are passed to cygpath, with the last one being the file name or path to ++# be converted. ++# ++# Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH ++# environment variable; do not put it in $PATH. ++func_cygpath () ++{ ++ $opt_debug ++ if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then ++ func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null` ++ if test "$?" -ne 0; then ++ # on failure, ensure result is empty ++ func_cygpath_result= ++ fi ++ else ++ func_cygpath_result= ++ func_error "LT_CYGPATH is empty or specifies non-existent file: \`$LT_CYGPATH'" ++ fi ++} ++#end: func_cygpath ++ ++ ++# func_convert_core_msys_to_w32 ARG ++# Convert file name or path ARG from MSYS format to w32 format. Return ++# result in func_convert_core_msys_to_w32_result. ++func_convert_core_msys_to_w32 () ++{ ++ $opt_debug ++ # awkward: cmd appends spaces to result ++ func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | ++ $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"` ++} ++#end: func_convert_core_msys_to_w32 ++ ++ ++# func_convert_file_check ARG1 ARG2 ++# Verify that ARG1 (a file name in $build format) was converted to $host ++# format in ARG2. Otherwise, emit an error message, but continue (resetting ++# func_to_host_file_result to ARG1). ++func_convert_file_check () ++{ ++ $opt_debug ++ if test -z "$2" && test -n "$1" ; then ++ func_error "Could not determine host file name corresponding to" ++ func_error " \`$1'" ++ func_error "Continuing, but uninstalled executables may not work." ++ # Fallback: ++ func_to_host_file_result="$1" ++ fi ++} ++# end func_convert_file_check ++ ++ ++# func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH ++# Verify that FROM_PATH (a path in $build format) was converted to $host ++# format in TO_PATH. Otherwise, emit an error message, but continue, resetting ++# func_to_host_file_result to a simplistic fallback value (see below). ++func_convert_path_check () ++{ ++ $opt_debug ++ if test -z "$4" && test -n "$3"; then ++ func_error "Could not determine the host path corresponding to" ++ func_error " \`$3'" ++ func_error "Continuing, but uninstalled executables may not work." ++ # Fallback. This is a deliberately simplistic "conversion" and ++ # should not be "improved". See libtool.info. ++ if test "x$1" != "x$2"; then ++ lt_replace_pathsep_chars="s|$1|$2|g" ++ func_to_host_path_result=`echo "$3" | ++ $SED -e "$lt_replace_pathsep_chars"` ++ else ++ func_to_host_path_result="$3" ++ fi ++ fi ++} ++# end func_convert_path_check ++ ++ ++# func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG ++# Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT ++# and appending REPL if ORIG matches BACKPAT. ++func_convert_path_front_back_pathsep () ++{ ++ $opt_debug ++ case $4 in ++ $1 ) func_to_host_path_result="$3$func_to_host_path_result" ++ ;; ++ esac ++ case $4 in ++ $2 ) func_append func_to_host_path_result "$3" ++ ;; ++ esac ++} ++# end func_convert_path_front_back_pathsep ++ ++ ++################################################## ++# $build to $host FILE NAME CONVERSION FUNCTIONS # ++################################################## ++# invoked via `$to_host_file_cmd ARG' ++# ++# In each case, ARG is the path to be converted from $build to $host format. ++# Result will be available in $func_to_host_file_result. ++ ++ ++# func_to_host_file ARG ++# Converts the file name ARG from $build format to $host format. Return result ++# in func_to_host_file_result. ++func_to_host_file () ++{ ++ $opt_debug ++ $to_host_file_cmd "$1" ++} ++# end func_to_host_file ++ ++ ++# func_to_tool_file ARG LAZY ++# converts the file name ARG from $build format to toolchain format. Return ++# result in func_to_tool_file_result. If the conversion in use is listed ++# in (the comma separated) LAZY, no conversion takes place. ++func_to_tool_file () ++{ ++ $opt_debug ++ case ,$2, in ++ *,"$to_tool_file_cmd",*) ++ func_to_tool_file_result=$1 ++ ;; ++ *) ++ $to_tool_file_cmd "$1" ++ func_to_tool_file_result=$func_to_host_file_result ++ ;; ++ esac ++} ++# end func_to_tool_file ++ ++ ++# func_convert_file_noop ARG ++# Copy ARG to func_to_host_file_result. ++func_convert_file_noop () ++{ ++ func_to_host_file_result="$1" ++} ++# end func_convert_file_noop ++ ++ ++# func_convert_file_msys_to_w32 ARG ++# Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic ++# conversion to w32 is not available inside the cwrapper. Returns result in ++# func_to_host_file_result. ++func_convert_file_msys_to_w32 () ++{ ++ $opt_debug ++ func_to_host_file_result="$1" ++ if test -n "$1"; then ++ func_convert_core_msys_to_w32 "$1" ++ func_to_host_file_result="$func_convert_core_msys_to_w32_result" ++ fi ++ func_convert_file_check "$1" "$func_to_host_file_result" ++} ++# end func_convert_file_msys_to_w32 ++ ++ ++# func_convert_file_cygwin_to_w32 ARG ++# Convert file name ARG from Cygwin to w32 format. Returns result in ++# func_to_host_file_result. ++func_convert_file_cygwin_to_w32 () ++{ ++ $opt_debug ++ func_to_host_file_result="$1" ++ if test -n "$1"; then ++ # because $build is cygwin, we call "the" cygpath in $PATH; no need to use ++ # LT_CYGPATH in this case. ++ func_to_host_file_result=`cygpath -m "$1"` ++ fi ++ func_convert_file_check "$1" "$func_to_host_file_result" ++} ++# end func_convert_file_cygwin_to_w32 ++ ++ ++# func_convert_file_nix_to_w32 ARG ++# Convert file name ARG from *nix to w32 format. Requires a wine environment ++# and a working winepath. Returns result in func_to_host_file_result. ++func_convert_file_nix_to_w32 () ++{ ++ $opt_debug ++ func_to_host_file_result="$1" ++ if test -n "$1"; then ++ func_convert_core_file_wine_to_w32 "$1" ++ func_to_host_file_result="$func_convert_core_file_wine_to_w32_result" ++ fi ++ func_convert_file_check "$1" "$func_to_host_file_result" ++} ++# end func_convert_file_nix_to_w32 ++ ++ ++# func_convert_file_msys_to_cygwin ARG ++# Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. ++# Returns result in func_to_host_file_result. ++func_convert_file_msys_to_cygwin () ++{ ++ $opt_debug ++ func_to_host_file_result="$1" ++ if test -n "$1"; then ++ func_convert_core_msys_to_w32 "$1" ++ func_cygpath -u "$func_convert_core_msys_to_w32_result" ++ func_to_host_file_result="$func_cygpath_result" ++ fi ++ func_convert_file_check "$1" "$func_to_host_file_result" ++} ++# end func_convert_file_msys_to_cygwin ++ ++ ++# func_convert_file_nix_to_cygwin ARG ++# Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed ++# in a wine environment, working winepath, and LT_CYGPATH set. Returns result ++# in func_to_host_file_result. ++func_convert_file_nix_to_cygwin () ++{ ++ $opt_debug ++ func_to_host_file_result="$1" ++ if test -n "$1"; then ++ # convert from *nix to w32, then use cygpath to convert from w32 to cygwin. ++ func_convert_core_file_wine_to_w32 "$1" ++ func_cygpath -u "$func_convert_core_file_wine_to_w32_result" ++ func_to_host_file_result="$func_cygpath_result" ++ fi ++ func_convert_file_check "$1" "$func_to_host_file_result" ++} ++# end func_convert_file_nix_to_cygwin ++ ++ ++############################################# ++# $build to $host PATH CONVERSION FUNCTIONS # ++############################################# ++# invoked via `$to_host_path_cmd ARG' ++# ++# In each case, ARG is the path to be converted from $build to $host format. ++# The result will be available in $func_to_host_path_result. ++# ++# Path separators are also converted from $build format to $host format. If ++# ARG begins or ends with a path separator character, it is preserved (but ++# converted to $host format) on output. ++# ++# All path conversion functions are named using the following convention: ++# file name conversion function : func_convert_file_X_to_Y () ++# path conversion function : func_convert_path_X_to_Y () ++# where, for any given $build/$host combination the 'X_to_Y' value is the ++# same. If conversion functions are added for new $build/$host combinations, ++# the two new functions must follow this pattern, or func_init_to_host_path_cmd ++# will break. ++ ++ ++# func_init_to_host_path_cmd ++# Ensures that function "pointer" variable $to_host_path_cmd is set to the ++# appropriate value, based on the value of $to_host_file_cmd. ++to_host_path_cmd= ++func_init_to_host_path_cmd () ++{ ++ $opt_debug ++ if test -z "$to_host_path_cmd"; then ++ func_stripname 'func_convert_file_' '' "$to_host_file_cmd" ++ to_host_path_cmd="func_convert_path_${func_stripname_result}" ++ fi ++} ++ ++ ++# func_to_host_path ARG ++# Converts the path ARG from $build format to $host format. Return result ++# in func_to_host_path_result. ++func_to_host_path () ++{ ++ $opt_debug ++ func_init_to_host_path_cmd ++ $to_host_path_cmd "$1" ++} ++# end func_to_host_path ++ ++ ++# func_convert_path_noop ARG ++# Copy ARG to func_to_host_path_result. ++func_convert_path_noop () ++{ ++ func_to_host_path_result="$1" ++} ++# end func_convert_path_noop ++ ++ ++# func_convert_path_msys_to_w32 ARG ++# Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic ++# conversion to w32 is not available inside the cwrapper. Returns result in ++# func_to_host_path_result. ++func_convert_path_msys_to_w32 () ++{ ++ $opt_debug ++ func_to_host_path_result="$1" ++ if test -n "$1"; then ++ # Remove leading and trailing path separator characters from ARG. MSYS ++ # behavior is inconsistent here; cygpath turns them into '.;' and ';.'; ++ # and winepath ignores them completely. ++ func_stripname : : "$1" ++ func_to_host_path_tmp1=$func_stripname_result ++ func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" ++ func_to_host_path_result="$func_convert_core_msys_to_w32_result" ++ func_convert_path_check : ";" \ ++ "$func_to_host_path_tmp1" "$func_to_host_path_result" ++ func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" ++ fi ++} ++# end func_convert_path_msys_to_w32 ++ ++ ++# func_convert_path_cygwin_to_w32 ARG ++# Convert path ARG from Cygwin to w32 format. Returns result in ++# func_to_host_file_result. ++func_convert_path_cygwin_to_w32 () ++{ ++ $opt_debug ++ func_to_host_path_result="$1" ++ if test -n "$1"; then ++ # See func_convert_path_msys_to_w32: ++ func_stripname : : "$1" ++ func_to_host_path_tmp1=$func_stripname_result ++ func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"` ++ func_convert_path_check : ";" \ ++ "$func_to_host_path_tmp1" "$func_to_host_path_result" ++ func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" ++ fi ++} ++# end func_convert_path_cygwin_to_w32 ++ ++ ++# func_convert_path_nix_to_w32 ARG ++# Convert path ARG from *nix to w32 format. Requires a wine environment and ++# a working winepath. Returns result in func_to_host_file_result. ++func_convert_path_nix_to_w32 () ++{ ++ $opt_debug ++ func_to_host_path_result="$1" ++ if test -n "$1"; then ++ # See func_convert_path_msys_to_w32: ++ func_stripname : : "$1" ++ func_to_host_path_tmp1=$func_stripname_result ++ func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" ++ func_to_host_path_result="$func_convert_core_path_wine_to_w32_result" ++ func_convert_path_check : ";" \ ++ "$func_to_host_path_tmp1" "$func_to_host_path_result" ++ func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" ++ fi ++} ++# end func_convert_path_nix_to_w32 ++ ++ ++# func_convert_path_msys_to_cygwin ARG ++# Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. ++# Returns result in func_to_host_file_result. ++func_convert_path_msys_to_cygwin () ++{ ++ $opt_debug ++ func_to_host_path_result="$1" ++ if test -n "$1"; then ++ # See func_convert_path_msys_to_w32: ++ func_stripname : : "$1" ++ func_to_host_path_tmp1=$func_stripname_result ++ func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" ++ func_cygpath -u -p "$func_convert_core_msys_to_w32_result" ++ func_to_host_path_result="$func_cygpath_result" ++ func_convert_path_check : : \ ++ "$func_to_host_path_tmp1" "$func_to_host_path_result" ++ func_convert_path_front_back_pathsep ":*" "*:" : "$1" ++ fi ++} ++# end func_convert_path_msys_to_cygwin ++ ++ ++# func_convert_path_nix_to_cygwin ARG ++# Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a ++# a wine environment, working winepath, and LT_CYGPATH set. Returns result in ++# func_to_host_file_result. ++func_convert_path_nix_to_cygwin () ++{ ++ $opt_debug ++ func_to_host_path_result="$1" ++ if test -n "$1"; then ++ # Remove leading and trailing path separator characters from ++ # ARG. msys behavior is inconsistent here, cygpath turns them ++ # into '.;' and ';.', and winepath ignores them completely. ++ func_stripname : : "$1" ++ func_to_host_path_tmp1=$func_stripname_result ++ func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" ++ func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result" ++ func_to_host_path_result="$func_cygpath_result" ++ func_convert_path_check : : \ ++ "$func_to_host_path_tmp1" "$func_to_host_path_result" ++ func_convert_path_front_back_pathsep ":*" "*:" : "$1" ++ fi ++} ++# end func_convert_path_nix_to_cygwin ++ ++ + # func_mode_compile arg... + func_mode_compile () + { +@@ -1314,12 +1985,12 @@ func_mode_compile () + ;; + + -pie | -fpie | -fPIE) +- pie_flag="$pie_flag $arg" ++ func_append pie_flag " $arg" + continue + ;; + + -shared | -static | -prefer-pic | -prefer-non-pic) +- later="$later $arg" ++ func_append later " $arg" + continue + ;; + +@@ -1340,15 +2011,14 @@ func_mode_compile () + save_ifs="$IFS"; IFS=',' + for arg in $args; do + IFS="$save_ifs" +- func_quote_for_eval "$arg" +- lastarg="$lastarg $func_quote_for_eval_result" ++ func_append_quoted lastarg "$arg" + done + IFS="$save_ifs" + func_stripname ' ' '' "$lastarg" + lastarg=$func_stripname_result + + # Add the arguments to base_compile. +- base_compile="$base_compile $lastarg" ++ func_append base_compile " $lastarg" + continue + ;; + +@@ -1364,8 +2034,7 @@ func_mode_compile () + esac # case $arg_mode + + # Aesthetically quote the previous argument. +- func_quote_for_eval "$lastarg" +- base_compile="$base_compile $func_quote_for_eval_result" ++ func_append_quoted base_compile "$lastarg" + done # for arg + + case $arg_mode in +@@ -1496,17 +2165,16 @@ compiler." + $opt_dry_run || $RM $removelist + exit $EXIT_FAILURE + fi +- removelist="$removelist $output_obj" ++ func_append removelist " $output_obj" + $ECHO "$srcfile" > "$lockfile" + fi + + $opt_dry_run || $RM $removelist +- removelist="$removelist $lockfile" ++ func_append removelist " $lockfile" + trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 + +- if test -n "$fix_srcfile_path"; then +- eval "srcfile=\"$fix_srcfile_path\"" +- fi ++ func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 ++ srcfile=$func_to_tool_file_result + func_quote_for_eval "$srcfile" + qsrcfile=$func_quote_for_eval_result + +@@ -1526,7 +2194,7 @@ compiler." + + if test -z "$output_obj"; then + # Place PIC objects in $objdir +- command="$command -o $lobj" ++ func_append command " -o $lobj" + fi + + func_show_eval_locale "$command" \ +@@ -1573,11 +2241,11 @@ compiler." + command="$base_compile $qsrcfile $pic_flag" + fi + if test "$compiler_c_o" = yes; then +- command="$command -o $obj" ++ func_append command " -o $obj" + fi + + # Suppress compiler output if we already did a PIC compilation. +- command="$command$suppress_output" ++ func_append command "$suppress_output" + func_show_eval_locale "$command" \ + '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' + +@@ -1622,13 +2290,13 @@ compiler." + } + + $opt_help || { +- test "$mode" = compile && func_mode_compile ${1+"$@"} ++ test "$opt_mode" = compile && func_mode_compile ${1+"$@"} + } + + func_mode_help () + { + # We need to display help for each of the modes. +- case $mode in ++ case $opt_mode in + "") + # Generic help is extracted from the usage comments + # at the start of this file. +@@ -1659,8 +2327,8 @@ This mode accepts the following addition + + -o OUTPUT-FILE set the output file name to OUTPUT-FILE + -no-suppress do not suppress compiler output for multiple passes +- -prefer-pic try to building PIC objects only +- -prefer-non-pic try to building non-PIC objects only ++ -prefer-pic try to build PIC objects only ++ -prefer-non-pic try to build non-PIC objects only + -shared do not build a \`.o' file suitable for static linking + -static only build a \`.o' file suitable for static linking + -Wc,FLAG pass FLAG directly to the compiler +@@ -1804,7 +2472,7 @@ Otherwise, only FILE itself is deleted u + ;; + + *) +- func_fatal_help "invalid operation mode \`$mode'" ++ func_fatal_help "invalid operation mode \`$opt_mode'" + ;; + esac + +@@ -1819,13 +2487,13 @@ if $opt_help; then + else + { + func_help noexit +- for mode in compile link execute install finish uninstall clean; do ++ for opt_mode in compile link execute install finish uninstall clean; do + func_mode_help + done + } | sed -n '1p; 2,$s/^Usage:/ or: /p' + { + func_help noexit +- for mode in compile link execute install finish uninstall clean; do ++ for opt_mode in compile link execute install finish uninstall clean; do + echo + func_mode_help + done +@@ -1854,13 +2522,16 @@ func_mode_execute () + func_fatal_help "you must specify a COMMAND" + + # Handle -dlopen flags immediately. +- for file in $execute_dlfiles; do ++ for file in $opt_dlopen; do + test -f "$file" \ + || func_fatal_help "\`$file' is not a file" + + dir= + case $file in + *.la) ++ func_resolve_sysroot "$file" ++ file=$func_resolve_sysroot_result ++ + # Check to see that this really is a libtool archive. + func_lalib_unsafe_p "$file" \ + || func_fatal_help "\`$lib' is not a valid libtool archive" +@@ -1882,7 +2553,7 @@ func_mode_execute () + dir="$func_dirname_result" + + if test -f "$dir/$objdir/$dlname"; then +- dir="$dir/$objdir" ++ func_append dir "/$objdir" + else + if test ! -f "$dir/$dlname"; then + func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" +@@ -1907,10 +2578,10 @@ func_mode_execute () + test -n "$absdir" && dir="$absdir" + + # Now add the directory to shlibpath_var. +- if eval test -z \"\$$shlibpath_var\"; then +- eval $shlibpath_var=\$dir ++ if eval "test -z \"\$$shlibpath_var\""; then ++ eval "$shlibpath_var=\"\$dir\"" + else +- eval $shlibpath_var=\$dir:\$$shlibpath_var ++ eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" + fi + done + +@@ -1939,8 +2610,7 @@ func_mode_execute () + ;; + esac + # Quote arguments (to preserve shell metacharacters). +- func_quote_for_eval "$file" +- args="$args $func_quote_for_eval_result" ++ func_append_quoted args "$file" + done + + if test "X$opt_dry_run" = Xfalse; then +@@ -1972,22 +2642,59 @@ func_mode_execute () + fi + } + +-test "$mode" = execute && func_mode_execute ${1+"$@"} ++test "$opt_mode" = execute && func_mode_execute ${1+"$@"} + + + # func_mode_finish arg... + func_mode_finish () + { + $opt_debug +- libdirs="$nonopt" ++ libs= ++ libdirs= + admincmds= + +- if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then +- for dir +- do +- libdirs="$libdirs $dir" +- done ++ for opt in "$nonopt" ${1+"$@"} ++ do ++ if test -d "$opt"; then ++ func_append libdirs " $opt" ++ ++ elif test -f "$opt"; then ++ if func_lalib_unsafe_p "$opt"; then ++ func_append libs " $opt" ++ else ++ func_warning "\`$opt' is not a valid libtool archive" ++ fi ++ ++ else ++ func_fatal_error "invalid argument \`$opt'" ++ fi ++ done ++ ++ if test -n "$libs"; then ++ if test -n "$lt_sysroot"; then ++ sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"` ++ sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;" ++ else ++ sysroot_cmd= ++ fi ++ ++ # Remove sysroot references ++ if $opt_dry_run; then ++ for lib in $libs; do ++ echo "removing references to $lt_sysroot and \`=' prefixes from $lib" ++ done ++ else ++ tmpdir=`func_mktempdir` ++ for lib in $libs; do ++ sed -e "${sysroot_cmd} s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ ++ > $tmpdir/tmp-la ++ mv -f $tmpdir/tmp-la $lib ++ done ++ ${RM}r "$tmpdir" ++ fi ++ fi + ++ if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then + for libdir in $libdirs; do + if test -n "$finish_cmds"; then + # Do each command in the finish commands. +@@ -1997,7 +2704,7 @@ func_mode_finish () + if test -n "$finish_eval"; then + # Do the single finish_eval. + eval cmds=\"$finish_eval\" +- $opt_dry_run || eval "$cmds" || admincmds="$admincmds ++ $opt_dry_run || eval "$cmds" || func_append admincmds " + $cmds" + fi + done +@@ -2006,53 +2713,55 @@ func_mode_finish () + # Exit here if they wanted silent mode. + $opt_silent && exit $EXIT_SUCCESS + +- echo "----------------------------------------------------------------------" +- echo "Libraries have been installed in:" +- for libdir in $libdirs; do +- $ECHO " $libdir" +- done +- echo +- echo "If you ever happen to want to link against installed libraries" +- echo "in a given directory, LIBDIR, you must either use libtool, and" +- echo "specify the full pathname of the library, or use the \`-LLIBDIR'" +- echo "flag during linking and do at least one of the following:" +- if test -n "$shlibpath_var"; then +- echo " - add LIBDIR to the \`$shlibpath_var' environment variable" +- echo " during execution" +- fi +- if test -n "$runpath_var"; then +- echo " - add LIBDIR to the \`$runpath_var' environment variable" +- echo " during linking" +- fi +- if test -n "$hardcode_libdir_flag_spec"; then +- libdir=LIBDIR +- eval "flag=\"$hardcode_libdir_flag_spec\"" ++ if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then ++ echo "----------------------------------------------------------------------" ++ echo "Libraries have been installed in:" ++ for libdir in $libdirs; do ++ $ECHO " $libdir" ++ done ++ echo ++ echo "If you ever happen to want to link against installed libraries" ++ echo "in a given directory, LIBDIR, you must either use libtool, and" ++ echo "specify the full pathname of the library, or use the \`-LLIBDIR'" ++ echo "flag during linking and do at least one of the following:" ++ if test -n "$shlibpath_var"; then ++ echo " - add LIBDIR to the \`$shlibpath_var' environment variable" ++ echo " during execution" ++ fi ++ if test -n "$runpath_var"; then ++ echo " - add LIBDIR to the \`$runpath_var' environment variable" ++ echo " during linking" ++ fi ++ if test -n "$hardcode_libdir_flag_spec"; then ++ libdir=LIBDIR ++ eval flag=\"$hardcode_libdir_flag_spec\" + +- $ECHO " - use the \`$flag' linker flag" +- fi +- if test -n "$admincmds"; then +- $ECHO " - have your system administrator run these commands:$admincmds" +- fi +- if test -f /etc/ld.so.conf; then +- echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" +- fi +- echo ++ $ECHO " - use the \`$flag' linker flag" ++ fi ++ if test -n "$admincmds"; then ++ $ECHO " - have your system administrator run these commands:$admincmds" ++ fi ++ if test -f /etc/ld.so.conf; then ++ echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" ++ fi ++ echo + +- echo "See any operating system documentation about shared libraries for" +- case $host in +- solaris2.[6789]|solaris2.1[0-9]) +- echo "more information, such as the ld(1), crle(1) and ld.so(8) manual" +- echo "pages." +- ;; +- *) +- echo "more information, such as the ld(1) and ld.so(8) manual pages." +- ;; +- esac +- echo "----------------------------------------------------------------------" ++ echo "See any operating system documentation about shared libraries for" ++ case $host in ++ solaris2.[6789]|solaris2.1[0-9]) ++ echo "more information, such as the ld(1), crle(1) and ld.so(8) manual" ++ echo "pages." ++ ;; ++ *) ++ echo "more information, such as the ld(1) and ld.so(8) manual pages." ++ ;; ++ esac ++ echo "----------------------------------------------------------------------" ++ fi + exit $EXIT_SUCCESS + } + +-test "$mode" = finish && func_mode_finish ${1+"$@"} ++test "$opt_mode" = finish && func_mode_finish ${1+"$@"} + + + # func_mode_install arg... +@@ -2077,7 +2786,7 @@ func_mode_install () + # The real first argument should be the name of the installation program. + # Aesthetically quote it. + func_quote_for_eval "$arg" +- install_prog="$install_prog$func_quote_for_eval_result" ++ func_append install_prog "$func_quote_for_eval_result" + install_shared_prog=$install_prog + case " $install_prog " in + *[\\\ /]cp\ *) install_cp=: ;; +@@ -2097,7 +2806,7 @@ func_mode_install () + do + arg2= + if test -n "$dest"; then +- files="$files $dest" ++ func_append files " $dest" + dest=$arg + continue + fi +@@ -2135,11 +2844,11 @@ func_mode_install () + + # Aesthetically quote the argument. + func_quote_for_eval "$arg" +- install_prog="$install_prog $func_quote_for_eval_result" ++ func_append install_prog " $func_quote_for_eval_result" + if test -n "$arg2"; then + func_quote_for_eval "$arg2" + fi +- install_shared_prog="$install_shared_prog $func_quote_for_eval_result" ++ func_append install_shared_prog " $func_quote_for_eval_result" + done + + test -z "$install_prog" && \ +@@ -2151,7 +2860,7 @@ func_mode_install () + if test -n "$install_override_mode" && $no_mode; then + if $install_cp; then :; else + func_quote_for_eval "$install_override_mode" +- install_shared_prog="$install_shared_prog -m $func_quote_for_eval_result" ++ func_append install_shared_prog " -m $func_quote_for_eval_result" + fi + fi + +@@ -2209,10 +2918,13 @@ func_mode_install () + case $file in + *.$libext) + # Do the static libraries later. +- staticlibs="$staticlibs $file" ++ func_append staticlibs " $file" + ;; + + *.la) ++ func_resolve_sysroot "$file" ++ file=$func_resolve_sysroot_result ++ + # Check to see that this really is a libtool archive. + func_lalib_unsafe_p "$file" \ + || func_fatal_help "\`$file' is not a valid libtool archive" +@@ -2226,23 +2938,30 @@ func_mode_install () + if test "X$destdir" = "X$libdir"; then + case "$current_libdirs " in + *" $libdir "*) ;; +- *) current_libdirs="$current_libdirs $libdir" ;; ++ *) func_append current_libdirs " $libdir" ;; + esac + else + # Note the libdir as a future libdir. + case "$future_libdirs " in + *" $libdir "*) ;; +- *) future_libdirs="$future_libdirs $libdir" ;; ++ *) func_append future_libdirs " $libdir" ;; + esac + fi + + func_dirname "$file" "/" "" + dir="$func_dirname_result" +- dir="$dir$objdir" ++ func_append dir "$objdir" + + if test -n "$relink_command"; then ++ # Strip any trailing slash from the destination. ++ func_stripname '' '/' "$libdir" ++ destlibdir=$func_stripname_result ++ ++ func_stripname '' '/' "$destdir" ++ s_destdir=$func_stripname_result ++ + # Determine the prefix the user has applied to our future dir. +- inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"` ++ inst_prefix_dir=`$ECHO "X$s_destdir" | $Xsed -e "s%$destlibdir\$%%"` + + # Don't allow the user to place us outside of our expected + # location b/c this prevents finding dependent libraries that +@@ -2315,7 +3034,7 @@ func_mode_install () + func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' + + # Maybe install the static library, too. +- test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" ++ test -n "$old_library" && func_append staticlibs " $dir/$old_library" + ;; + + *.lo) +@@ -2503,7 +3222,7 @@ func_mode_install () + test -n "$future_libdirs" && \ + func_warning "remember to run \`$progname --finish$future_libdirs'" + +- if test -n "$current_libdirs" && $opt_finish; then ++ if test -n "$current_libdirs"; then + # Maybe just do a dry run. + $opt_dry_run && current_libdirs=" -n$current_libdirs" + exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' +@@ -2512,7 +3231,7 @@ func_mode_install () + fi + } + +-test "$mode" = install && func_mode_install ${1+"$@"} ++test "$opt_mode" = install && func_mode_install ${1+"$@"} + + + # func_generate_dlsyms outputname originator pic_p +@@ -2559,6 +3278,18 @@ extern \"C\" { + #pragma GCC diagnostic ignored \"-Wstrict-prototypes\" + #endif + ++/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ ++#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) ++/* DATA imports from DLLs on WIN32 con't be const, because runtime ++ relocations are performed -- see ld's documentation on pseudo-relocs. */ ++# define LT_DLSYM_CONST ++#elif defined(__osf__) ++/* This system does not cope well with relocations in const data. */ ++# define LT_DLSYM_CONST ++#else ++# define LT_DLSYM_CONST const ++#endif ++ + /* External symbol declarations for the compiler. */\ + " + +@@ -2570,21 +3301,22 @@ extern \"C\" { + # Add our own program objects to the symbol list. + progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP` + for progfile in $progfiles; do +- func_verbose "extracting global C symbols from \`$progfile'" +- $opt_dry_run || eval "$NM $progfile | $global_symbol_pipe >> '$nlist'" ++ func_to_tool_file "$progfile" func_convert_file_msys_to_w32 ++ func_verbose "extracting global C symbols from \`$func_to_tool_file_result'" ++ $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'" + done + + if test -n "$exclude_expsyms"; then + $opt_dry_run || { +- $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T +- $MV "$nlist"T "$nlist" ++ eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' ++ eval '$MV "$nlist"T "$nlist"' + } + fi + + if test -n "$export_symbols_regex"; then + $opt_dry_run || { +- $EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T +- $MV "$nlist"T "$nlist" ++ eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' ++ eval '$MV "$nlist"T "$nlist"' + } + fi + +@@ -2593,23 +3325,23 @@ extern \"C\" { + export_symbols="$output_objdir/$outputname.exp" + $opt_dry_run || { + $RM $export_symbols +- ${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' < "$nlist" > "$export_symbols" ++ eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' + case $host in + *cygwin* | *mingw* | *cegcc* ) +- echo EXPORTS > "$output_objdir/$outputname.def" +- cat "$export_symbols" >> "$output_objdir/$outputname.def" ++ eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' ++ eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' + ;; + esac + } + else + $opt_dry_run || { +- ${SED} -e 's/\([].[*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/' < "$export_symbols" > "$output_objdir/$outputname.exp" +- $GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T +- $MV "$nlist"T "$nlist" ++ eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' ++ eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' ++ eval '$MV "$nlist"T "$nlist"' + case $host in + *cygwin* | *mingw* | *cegcc* ) +- echo EXPORTS > "$output_objdir/$outputname.def" +- cat "$nlist" >> "$output_objdir/$outputname.def" ++ eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' ++ eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' + ;; + esac + } +@@ -2620,10 +3352,52 @@ extern \"C\" { + func_verbose "extracting global C symbols from \`$dlprefile'" + func_basename "$dlprefile" + name="$func_basename_result" +- $opt_dry_run || { +- $ECHO ": $name " >> "$nlist" +- eval "$NM $dlprefile 2>/dev/null | $global_symbol_pipe >> '$nlist'" +- } ++ case $host in ++ *cygwin* | *mingw* | *cegcc* ) ++ # if an import library, we need to obtain dlname ++ if func_win32_import_lib_p "$dlprefile"; then ++ func_tr_sh "$dlprefile" ++ eval "curr_lafile=\$libfile_$func_tr_sh_result" ++ dlprefile_dlbasename="" ++ if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then ++ # Use subshell, to avoid clobbering current variable values ++ dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"` ++ if test -n "$dlprefile_dlname" ; then ++ func_basename "$dlprefile_dlname" ++ dlprefile_dlbasename="$func_basename_result" ++ else ++ # no lafile. user explicitly requested -dlpreopen . ++ $sharedlib_from_linklib_cmd "$dlprefile" ++ dlprefile_dlbasename=$sharedlib_from_linklib_result ++ fi ++ fi ++ $opt_dry_run || { ++ if test -n "$dlprefile_dlbasename" ; then ++ eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"' ++ else ++ func_warning "Could not compute DLL name from $name" ++ eval '$ECHO ": $name " >> "$nlist"' ++ fi ++ func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 ++ eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe | ++ $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'" ++ } ++ else # not an import lib ++ $opt_dry_run || { ++ eval '$ECHO ": $name " >> "$nlist"' ++ func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 ++ eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" ++ } ++ fi ++ ;; ++ *) ++ $opt_dry_run || { ++ eval '$ECHO ": $name " >> "$nlist"' ++ func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 ++ eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" ++ } ++ ;; ++ esac + done + + $opt_dry_run || { +@@ -2661,26 +3435,9 @@ typedef struct { + const char *name; + void *address; + } lt_dlsymlist; +-" +- case $host in +- *cygwin* | *mingw* | *cegcc* ) +- echo >> "$output_objdir/$my_dlsyms" "\ +-/* DATA imports from DLLs on WIN32 con't be const, because +- runtime relocations are performed -- see ld's documentation +- on pseudo-relocs. */" +- lt_dlsym_const= ;; +- *osf5*) +- echo >> "$output_objdir/$my_dlsyms" "\ +-/* This system does not cope well with relocations in const data */" +- lt_dlsym_const= ;; +- *) +- lt_dlsym_const=const ;; +- esac +- +- echo >> "$output_objdir/$my_dlsyms" "\ +-extern $lt_dlsym_const lt_dlsymlist ++extern LT_DLSYM_CONST lt_dlsymlist + lt_${my_prefix}_LTX_preloaded_symbols[]; +-$lt_dlsym_const lt_dlsymlist ++LT_DLSYM_CONST lt_dlsymlist + lt_${my_prefix}_LTX_preloaded_symbols[] = + {\ + { \"$my_originator\", (void *) 0 }," +@@ -2736,7 +3493,7 @@ static const void *lt_preloaded_setup() + for arg in $LTCFLAGS; do + case $arg in + -pie | -fpie | -fPIE) ;; +- *) symtab_cflags="$symtab_cflags $arg" ;; ++ *) func_append symtab_cflags " $arg" ;; + esac + done + +@@ -2796,9 +3553,11 @@ func_win32_libid () + win32_libid_type="x86 archive import" + ;; + *ar\ archive*) # could be an import, or static +- if $OBJDUMP -f "$1" | $SED -e '10q' 2>/dev/null | +- $EGREP 'file format (pe-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then +- win32_nmres=`$NM -f posix -A "$1" | ++ # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. ++ if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | ++ $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then ++ func_to_tool_file "$1" func_convert_file_msys_to_w32 ++ win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | + $SED -n -e ' + 1,100{ + / I /{ +@@ -2827,6 +3586,131 @@ func_win32_libid () + $ECHO "$win32_libid_type" + } + ++# func_cygming_dll_for_implib ARG ++# ++# Platform-specific function to extract the ++# name of the DLL associated with the specified ++# import library ARG. ++# Invoked by eval'ing the libtool variable ++# $sharedlib_from_linklib_cmd ++# Result is available in the variable ++# $sharedlib_from_linklib_result ++func_cygming_dll_for_implib () ++{ ++ $opt_debug ++ sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"` ++} ++ ++# func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs ++# ++# The is the core of a fallback implementation of a ++# platform-specific function to extract the name of the ++# DLL associated with the specified import library LIBNAME. ++# ++# SECTION_NAME is either .idata$6 or .idata$7, depending ++# on the platform and compiler that created the implib. ++# ++# Echos the name of the DLL associated with the ++# specified import library. ++func_cygming_dll_for_implib_fallback_core () ++{ ++ $opt_debug ++ match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"` ++ $OBJDUMP -s --section "$1" "$2" 2>/dev/null | ++ $SED '/^Contents of section '"$match_literal"':/{ ++ # Place marker at beginning of archive member dllname section ++ s/.*/====MARK====/ ++ p ++ d ++ } ++ # These lines can sometimes be longer than 43 characters, but ++ # are always uninteresting ++ /:[ ]*file format pe[i]\{,1\}-/d ++ /^In archive [^:]*:/d ++ # Ensure marker is printed ++ /^====MARK====/p ++ # Remove all lines with less than 43 characters ++ /^.\{43\}/!d ++ # From remaining lines, remove first 43 characters ++ s/^.\{43\}//' | ++ $SED -n ' ++ # Join marker and all lines until next marker into a single line ++ /^====MARK====/ b para ++ H ++ $ b para ++ b ++ :para ++ x ++ s/\n//g ++ # Remove the marker ++ s/^====MARK====// ++ # Remove trailing dots and whitespace ++ s/[\. \t]*$// ++ # Print ++ /./p' | ++ # we now have a list, one entry per line, of the stringified ++ # contents of the appropriate section of all members of the ++ # archive which possess that section. Heuristic: eliminate ++ # all those which have a first or second character that is ++ # a '.' (that is, objdump's representation of an unprintable ++ # character.) This should work for all archives with less than ++ # 0x302f exports -- but will fail for DLLs whose name actually ++ # begins with a literal '.' or a single character followed by ++ # a '.'. ++ # ++ # Of those that remain, print the first one. ++ $SED -e '/^\./d;/^.\./d;q' ++} ++ ++# func_cygming_gnu_implib_p ARG ++# This predicate returns with zero status (TRUE) if ++# ARG is a GNU/binutils-style import library. Returns ++# with nonzero status (FALSE) otherwise. ++func_cygming_gnu_implib_p () ++{ ++ $opt_debug ++ func_to_tool_file "$1" func_convert_file_msys_to_w32 ++ func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'` ++ test -n "$func_cygming_gnu_implib_tmp" ++} ++ ++# func_cygming_ms_implib_p ARG ++# This predicate returns with zero status (TRUE) if ++# ARG is an MS-style import library. Returns ++# with nonzero status (FALSE) otherwise. ++func_cygming_ms_implib_p () ++{ ++ $opt_debug ++ func_to_tool_file "$1" func_convert_file_msys_to_w32 ++ func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` ++ test -n "$func_cygming_ms_implib_tmp" ++} ++ ++# func_cygming_dll_for_implib_fallback ARG ++# Platform-specific function to extract the ++# name of the DLL associated with the specified ++# import library ARG. ++# ++# This fallback implementation is for use when $DLLTOOL ++# does not support the --identify-strict option. ++# Invoked by eval'ing the libtool variable ++# $sharedlib_from_linklib_cmd ++# Result is available in the variable ++# $sharedlib_from_linklib_result ++func_cygming_dll_for_implib_fallback () ++{ ++ $opt_debug ++ if func_cygming_gnu_implib_p "$1" ; then ++ # binutils import library ++ sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"` ++ elif func_cygming_ms_implib_p "$1" ; then ++ # ms-generated import library ++ sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"` ++ else ++ # unknown ++ sharedlib_from_linklib_result="" ++ fi ++} + + + # func_extract_an_archive dir oldlib +@@ -2917,7 +3801,7 @@ func_extract_archives () + darwin_file= + darwin_files= + for darwin_file in $darwin_filelist; do +- darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP` ++ darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP` + $LIPO -create -output "$darwin_file" $darwin_files + done # $darwin_filelist + $RM -rf unfat-$$ +@@ -2932,7 +3816,7 @@ func_extract_archives () + func_extract_an_archive "$my_xdir" "$my_xabs" + ;; + esac +- my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` ++ my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP` + done + + func_extract_archives_result="$my_oldobjs" +@@ -3014,7 +3898,110 @@ func_fallback_echo () + _LTECHO_EOF' + } + ECHO=\"$qECHO\" +- fi\ ++ fi ++ ++# Very basic option parsing. These options are (a) specific to ++# the libtool wrapper, (b) are identical between the wrapper ++# /script/ and the wrapper /executable/ which is used only on ++# windows platforms, and (c) all begin with the string "--lt-" ++# (application programs are unlikely to have options which match ++# this pattern). ++# ++# There are only two supported options: --lt-debug and ++# --lt-dump-script. There is, deliberately, no --lt-help. ++# ++# The first argument to this parsing function should be the ++# script's $0 value, followed by "$@". ++lt_option_debug= ++func_parse_lt_options () ++{ ++ lt_script_arg0=\$0 ++ shift ++ for lt_opt ++ do ++ case \"\$lt_opt\" in ++ --lt-debug) lt_option_debug=1 ;; ++ --lt-dump-script) ++ lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\` ++ test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=. ++ lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\` ++ cat \"\$lt_dump_D/\$lt_dump_F\" ++ exit 0 ++ ;; ++ --lt-*) ++ \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2 ++ exit 1 ++ ;; ++ esac ++ done ++ ++ # Print the debug banner immediately: ++ if test -n \"\$lt_option_debug\"; then ++ echo \"${outputname}:${output}:\${LINENO}: libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\" 1>&2 ++ fi ++} ++ ++# Used when --lt-debug. Prints its arguments to stdout ++# (redirection is the responsibility of the caller) ++func_lt_dump_args () ++{ ++ lt_dump_args_N=1; ++ for lt_arg ++ do ++ \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[\$lt_dump_args_N]: \$lt_arg\" ++ lt_dump_args_N=\`expr \$lt_dump_args_N + 1\` ++ done ++} ++ ++# Core function for launching the target application ++func_exec_program_core () ++{ ++" ++ case $host in ++ # Backslashes separate directories on plain windows ++ *-*-mingw | *-*-os2* | *-cegcc*) ++ $ECHO "\ ++ if test -n \"\$lt_option_debug\"; then ++ \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir\\\\\$program\" 1>&2 ++ func_lt_dump_args \${1+\"\$@\"} 1>&2 ++ fi ++ exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} ++" ++ ;; ++ ++ *) ++ $ECHO "\ ++ if test -n \"\$lt_option_debug\"; then ++ \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir/\$program\" 1>&2 ++ func_lt_dump_args \${1+\"\$@\"} 1>&2 ++ fi ++ exec \"\$progdir/\$program\" \${1+\"\$@\"} ++" ++ ;; ++ esac ++ $ECHO "\ ++ \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 ++ exit 1 ++} ++ ++# A function to encapsulate launching the target application ++# Strips options in the --lt-* namespace from \$@ and ++# launches target application with the remaining arguments. ++func_exec_program () ++{ ++ for lt_wr_arg ++ do ++ case \$lt_wr_arg in ++ --lt-*) ;; ++ *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; ++ esac ++ shift ++ done ++ func_exec_program_core \${1+\"\$@\"} ++} ++ ++ # Parse options ++ func_parse_lt_options \"\$0\" \${1+\"\$@\"} + + # Find the directory that this script lives in. + thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\` +@@ -3078,7 +4065,7 @@ _LTECHO_EOF' + + # relink executable if necessary + if test -n \"\$relink_command\"; then +- if relink_command_output=\`eval \"\$relink_command\" 2>&1\`; then : ++ if relink_command_output=\`eval \$relink_command 2>&1\`; then : + else + $ECHO \"\$relink_command_output\" >&2 + $RM \"\$progdir/\$file\" +@@ -3102,6 +4089,18 @@ _LTECHO_EOF' + + if test -f \"\$progdir/\$program\"; then" + ++ # fixup the dll searchpath if we need to. ++ # ++ # Fix the DLL searchpath if we need to. Do this before prepending ++ # to shlibpath, because on Windows, both are PATH and uninstalled ++ # libraries must come first. ++ if test -n "$dllsearchpath"; then ++ $ECHO "\ ++ # Add the dll search path components to the executable PATH ++ PATH=$dllsearchpath:\$PATH ++" ++ fi ++ + # Export our shlibpath_var if we have one. + if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then + $ECHO "\ +@@ -3116,35 +4115,10 @@ _LTECHO_EOF' + " + fi + +- # fixup the dll searchpath if we need to. +- if test -n "$dllsearchpath"; then +- $ECHO "\ +- # Add the dll search path components to the executable PATH +- PATH=$dllsearchpath:\$PATH +-" +- fi +- + $ECHO "\ + if test \"\$libtool_execute_magic\" != \"$magic\"; then + # Run the actual program with our arguments. +-" +- case $host in +- # Backslashes separate directories on plain windows +- *-*-mingw | *-*-os2* | *-cegcc*) +- $ECHO "\ +- exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} +-" +- ;; +- +- *) +- $ECHO "\ +- exec \"\$progdir/\$program\" \${1+\"\$@\"} +-" +- ;; +- esac +- $ECHO "\ +- \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 +- exit 1 ++ func_exec_program \${1+\"\$@\"} + fi + else + # The program doesn't exist. +@@ -3158,166 +4132,6 @@ fi\ + } + + +-# func_to_host_path arg +-# +-# Convert paths to host format when used with build tools. +-# Intended for use with "native" mingw (where libtool itself +-# is running under the msys shell), or in the following cross- +-# build environments: +-# $build $host +-# mingw (msys) mingw [e.g. native] +-# cygwin mingw +-# *nix + wine mingw +-# where wine is equipped with the `winepath' executable. +-# In the native mingw case, the (msys) shell automatically +-# converts paths for any non-msys applications it launches, +-# but that facility isn't available from inside the cwrapper. +-# Similar accommodations are necessary for $host mingw and +-# $build cygwin. Calling this function does no harm for other +-# $host/$build combinations not listed above. +-# +-# ARG is the path (on $build) that should be converted to +-# the proper representation for $host. The result is stored +-# in $func_to_host_path_result. +-func_to_host_path () +-{ +- func_to_host_path_result="$1" +- if test -n "$1"; then +- case $host in +- *mingw* ) +- lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' +- case $build in +- *mingw* ) # actually, msys +- # awkward: cmd appends spaces to result +- func_to_host_path_result=`( cmd //c echo "$1" ) 2>/dev/null | +- $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"` +- ;; +- *cygwin* ) +- func_to_host_path_result=`cygpath -w "$1" | +- $SED -e "$lt_sed_naive_backslashify"` +- ;; +- * ) +- # Unfortunately, winepath does not exit with a non-zero +- # error code, so we are forced to check the contents of +- # stdout. On the other hand, if the command is not +- # found, the shell will set an exit code of 127 and print +- # *an error message* to stdout. So we must check for both +- # error code of zero AND non-empty stdout, which explains +- # the odd construction: +- func_to_host_path_tmp1=`winepath -w "$1" 2>/dev/null` +- if test "$?" -eq 0 && test -n "${func_to_host_path_tmp1}"; then +- func_to_host_path_result=`$ECHO "$func_to_host_path_tmp1" | +- $SED -e "$lt_sed_naive_backslashify"` +- else +- # Allow warning below. +- func_to_host_path_result= +- fi +- ;; +- esac +- if test -z "$func_to_host_path_result" ; then +- func_error "Could not determine host path corresponding to" +- func_error " \`$1'" +- func_error "Continuing, but uninstalled executables may not work." +- # Fallback: +- func_to_host_path_result="$1" +- fi +- ;; +- esac +- fi +-} +-# end: func_to_host_path +- +-# func_to_host_pathlist arg +-# +-# Convert pathlists to host format when used with build tools. +-# See func_to_host_path(), above. This function supports the +-# following $build/$host combinations (but does no harm for +-# combinations not listed here): +-# $build $host +-# mingw (msys) mingw [e.g. native] +-# cygwin mingw +-# *nix + wine mingw +-# +-# Path separators are also converted from $build format to +-# $host format. If ARG begins or ends with a path separator +-# character, it is preserved (but converted to $host format) +-# on output. +-# +-# ARG is a pathlist (on $build) that should be converted to +-# the proper representation on $host. The result is stored +-# in $func_to_host_pathlist_result. +-func_to_host_pathlist () +-{ +- func_to_host_pathlist_result="$1" +- if test -n "$1"; then +- case $host in +- *mingw* ) +- lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' +- # Remove leading and trailing path separator characters from +- # ARG. msys behavior is inconsistent here, cygpath turns them +- # into '.;' and ';.', and winepath ignores them completely. +- func_stripname : : "$1" +- func_to_host_pathlist_tmp1=$func_stripname_result +- case $build in +- *mingw* ) # Actually, msys. +- # Awkward: cmd appends spaces to result. +- func_to_host_pathlist_result=` +- ( cmd //c echo "$func_to_host_pathlist_tmp1" ) 2>/dev/null | +- $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"` +- ;; +- *cygwin* ) +- func_to_host_pathlist_result=`cygpath -w -p "$func_to_host_pathlist_tmp1" | +- $SED -e "$lt_sed_naive_backslashify"` +- ;; +- * ) +- # unfortunately, winepath doesn't convert pathlists +- func_to_host_pathlist_result="" +- func_to_host_pathlist_oldIFS=$IFS +- IFS=: +- for func_to_host_pathlist_f in $func_to_host_pathlist_tmp1 ; do +- IFS=$func_to_host_pathlist_oldIFS +- if test -n "$func_to_host_pathlist_f" ; then +- func_to_host_path "$func_to_host_pathlist_f" +- if test -n "$func_to_host_path_result" ; then +- if test -z "$func_to_host_pathlist_result" ; then +- func_to_host_pathlist_result="$func_to_host_path_result" +- else +- func_append func_to_host_pathlist_result ";$func_to_host_path_result" +- fi +- fi +- fi +- done +- IFS=$func_to_host_pathlist_oldIFS +- ;; +- esac +- if test -z "$func_to_host_pathlist_result"; then +- func_error "Could not determine the host path(s) corresponding to" +- func_error " \`$1'" +- func_error "Continuing, but uninstalled executables may not work." +- # Fallback. This may break if $1 contains DOS-style drive +- # specifications. The fix is not to complicate the expression +- # below, but for the user to provide a working wine installation +- # with winepath so that path translation in the cross-to-mingw +- # case works properly. +- lt_replace_pathsep_nix_to_dos="s|:|;|g" +- func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp1" |\ +- $SED -e "$lt_replace_pathsep_nix_to_dos"` +- fi +- # Now, add the leading and trailing path separators back +- case "$1" in +- :* ) func_to_host_pathlist_result=";$func_to_host_pathlist_result" +- ;; +- esac +- case "$1" in +- *: ) func_append func_to_host_pathlist_result ";" +- ;; +- esac +- ;; +- esac +- fi +-} +-# end: func_to_host_pathlist +- + # func_emit_cwrapperexe_src + # emit the source code for a wrapper executable on stdout + # Must ONLY be called from within func_mode_link because +@@ -3334,10 +4148,6 @@ func_emit_cwrapperexe_src () + + This wrapper executable should never be moved out of the build directory. + If it is, it will not operate correctly. +- +- Currently, it simply execs the wrapper *script* "$SHELL $output", +- but could eventually absorb all of the scripts functionality and +- exec $objdir/$outputname directly. + */ + EOF + cat <<"EOF" +@@ -3462,22 +4272,13 @@ int setenv (const char *, const char *, + if (stale) { free ((void *) stale); stale = 0; } \ + } while (0) + +-#undef LTWRAPPER_DEBUGPRINTF +-#if defined LT_DEBUGWRAPPER +-# define LTWRAPPER_DEBUGPRINTF(args) ltwrapper_debugprintf args +-static void +-ltwrapper_debugprintf (const char *fmt, ...) +-{ +- va_list args; +- va_start (args, fmt); +- (void) vfprintf (stderr, fmt, args); +- va_end (args); +-} ++#if defined(LT_DEBUGWRAPPER) ++static int lt_debug = 1; + #else +-# define LTWRAPPER_DEBUGPRINTF(args) ++static int lt_debug = 0; + #endif + +-const char *program_name = NULL; ++const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */ + + void *xmalloc (size_t num); + char *xstrdup (const char *string); +@@ -3487,7 +4288,10 @@ char *chase_symlinks (const char *pathsp + int make_executable (const char *path); + int check_executable (const char *path); + char *strendzap (char *str, const char *pat); +-void lt_fatal (const char *message, ...); ++void lt_debugprintf (const char *file, int line, const char *fmt, ...); ++void lt_fatal (const char *file, int line, const char *message, ...); ++static const char *nonnull (const char *s); ++static const char *nonempty (const char *s); + void lt_setenv (const char *name, const char *value); + char *lt_extend_str (const char *orig_value, const char *add, int to_end); + void lt_update_exe_path (const char *name, const char *value); +@@ -3497,14 +4301,14 @@ void lt_dump_script (FILE *f); + EOF + + cat <"))); ++ lt_debugprintf (__FILE__, __LINE__, "(main) lt_argv_zero: %s\n", ++ nonnull (lt_argv_zero)); + for (i = 0; i < newargc; i++) + { +- LTWRAPPER_DEBUGPRINTF (("(main) newargz[%d] : %s\n", i, (newargz[i] ? newargz[i] : ""))); ++ lt_debugprintf (__FILE__, __LINE__, "(main) newargz[%d]: %s\n", ++ i, nonnull (newargz[i])); + } + + EOF +@@ -3706,7 +4529,9 @@ EOF + if (rval == -1) + { + /* failed to start process */ +- LTWRAPPER_DEBUGPRINTF (("(main) failed to launch target \"%s\": errno = %d\n", lt_argv_zero, errno)); ++ lt_debugprintf (__FILE__, __LINE__, ++ "(main) failed to launch target \"%s\": %s\n", ++ lt_argv_zero, nonnull (strerror (errno))); + return 127; + } + return rval; +@@ -3728,7 +4553,7 @@ xmalloc (size_t num) + { + void *p = (void *) malloc (num); + if (!p) +- lt_fatal ("Memory exhausted"); ++ lt_fatal (__FILE__, __LINE__, "memory exhausted"); + + return p; + } +@@ -3762,8 +4587,8 @@ check_executable (const char *path) + { + struct stat st; + +- LTWRAPPER_DEBUGPRINTF (("(check_executable) : %s\n", +- path ? (*path ? path : "EMPTY!") : "NULL!")); ++ lt_debugprintf (__FILE__, __LINE__, "(check_executable): %s\n", ++ nonempty (path)); + if ((!path) || (!*path)) + return 0; + +@@ -3780,8 +4605,8 @@ make_executable (const char *path) + int rval = 0; + struct stat st; + +- LTWRAPPER_DEBUGPRINTF (("(make_executable) : %s\n", +- path ? (*path ? path : "EMPTY!") : "NULL!")); ++ lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n", ++ nonempty (path)); + if ((!path) || (!*path)) + return 0; + +@@ -3807,8 +4632,8 @@ find_executable (const char *wrapper) + int tmp_len; + char *concat_name; + +- LTWRAPPER_DEBUGPRINTF (("(find_executable) : %s\n", +- wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!")); ++ lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n", ++ nonempty (wrapper)); + + if ((wrapper == NULL) || (*wrapper == '\0')) + return NULL; +@@ -3861,7 +4686,8 @@ find_executable (const char *wrapper) + { + /* empty path: current directory */ + if (getcwd (tmp, LT_PATHMAX) == NULL) +- lt_fatal ("getcwd failed"); ++ lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", ++ nonnull (strerror (errno))); + tmp_len = strlen (tmp); + concat_name = + XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); +@@ -3886,7 +4712,8 @@ find_executable (const char *wrapper) + } + /* Relative path | not found in path: prepend cwd */ + if (getcwd (tmp, LT_PATHMAX) == NULL) +- lt_fatal ("getcwd failed"); ++ lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", ++ nonnull (strerror (errno))); + tmp_len = strlen (tmp); + concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); + memcpy (concat_name, tmp, tmp_len); +@@ -3912,8 +4739,9 @@ chase_symlinks (const char *pathspec) + int has_symlinks = 0; + while (strlen (tmp_pathspec) && !has_symlinks) + { +- LTWRAPPER_DEBUGPRINTF (("checking path component for symlinks: %s\n", +- tmp_pathspec)); ++ lt_debugprintf (__FILE__, __LINE__, ++ "checking path component for symlinks: %s\n", ++ tmp_pathspec); + if (lstat (tmp_pathspec, &s) == 0) + { + if (S_ISLNK (s.st_mode) != 0) +@@ -3935,8 +4763,9 @@ chase_symlinks (const char *pathspec) + } + else + { +- char *errstr = strerror (errno); +- lt_fatal ("Error accessing file %s (%s)", tmp_pathspec, errstr); ++ lt_fatal (__FILE__, __LINE__, ++ "error accessing file \"%s\": %s", ++ tmp_pathspec, nonnull (strerror (errno))); + } + } + XFREE (tmp_pathspec); +@@ -3949,7 +4778,8 @@ chase_symlinks (const char *pathspec) + tmp_pathspec = realpath (pathspec, buf); + if (tmp_pathspec == 0) + { +- lt_fatal ("Could not follow symlinks for %s", pathspec); ++ lt_fatal (__FILE__, __LINE__, ++ "could not follow symlinks for %s", pathspec); + } + return xstrdup (tmp_pathspec); + #endif +@@ -3975,11 +4805,25 @@ strendzap (char *str, const char *pat) + return str; + } + ++void ++lt_debugprintf (const char *file, int line, const char *fmt, ...) ++{ ++ va_list args; ++ if (lt_debug) ++ { ++ (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line); ++ va_start (args, fmt); ++ (void) vfprintf (stderr, fmt, args); ++ va_end (args); ++ } ++} ++ + static void +-lt_error_core (int exit_status, const char *mode, ++lt_error_core (int exit_status, const char *file, ++ int line, const char *mode, + const char *message, va_list ap) + { +- fprintf (stderr, "%s: %s: ", program_name, mode); ++ fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode); + vfprintf (stderr, message, ap); + fprintf (stderr, ".\n"); + +@@ -3988,20 +4832,32 @@ lt_error_core (int exit_status, const ch + } + + void +-lt_fatal (const char *message, ...) ++lt_fatal (const char *file, int line, const char *message, ...) + { + va_list ap; + va_start (ap, message); +- lt_error_core (EXIT_FAILURE, "FATAL", message, ap); ++ lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap); + va_end (ap); + } + ++static const char * ++nonnull (const char *s) ++{ ++ return s ? s : "(null)"; ++} ++ ++static const char * ++nonempty (const char *s) ++{ ++ return (s && !*s) ? "(empty)" : nonnull (s); ++} ++ + void + lt_setenv (const char *name, const char *value) + { +- LTWRAPPER_DEBUGPRINTF (("(lt_setenv) setting '%s' to '%s'\n", +- (name ? name : ""), +- (value ? value : ""))); ++ lt_debugprintf (__FILE__, __LINE__, ++ "(lt_setenv) setting '%s' to '%s'\n", ++ nonnull (name), nonnull (value)); + { + #ifdef HAVE_SETENV + /* always make a copy, for consistency with !HAVE_SETENV */ +@@ -4049,9 +4905,9 @@ lt_extend_str (const char *orig_value, c + void + lt_update_exe_path (const char *name, const char *value) + { +- LTWRAPPER_DEBUGPRINTF (("(lt_update_exe_path) modifying '%s' by prepending '%s'\n", +- (name ? name : ""), +- (value ? value : ""))); ++ lt_debugprintf (__FILE__, __LINE__, ++ "(lt_update_exe_path) modifying '%s' by prepending '%s'\n", ++ nonnull (name), nonnull (value)); + + if (name && *name && value && *value) + { +@@ -4070,9 +4926,9 @@ lt_update_exe_path (const char *name, co + void + lt_update_lib_path (const char *name, const char *value) + { +- LTWRAPPER_DEBUGPRINTF (("(lt_update_lib_path) modifying '%s' by prepending '%s'\n", +- (name ? name : ""), +- (value ? value : ""))); ++ lt_debugprintf (__FILE__, __LINE__, ++ "(lt_update_lib_path) modifying '%s' by prepending '%s'\n", ++ nonnull (name), nonnull (value)); + + if (name && *name && value && *value) + { +@@ -4222,7 +5078,7 @@ EOF + func_win32_import_lib_p () + { + $opt_debug +- case `eval "$file_magic_cmd \"\$1\" 2>/dev/null" | $SED -e 10q` in ++ case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in + *import*) : ;; + *) false ;; + esac +@@ -4401,9 +5257,9 @@ func_mode_link () + ;; + *) + if test "$prev" = dlfiles; then +- dlfiles="$dlfiles $arg" ++ func_append dlfiles " $arg" + else +- dlprefiles="$dlprefiles $arg" ++ func_append dlprefiles " $arg" + fi + prev= + continue +@@ -4427,7 +5283,7 @@ func_mode_link () + *-*-darwin*) + case "$deplibs " in + *" $qarg.ltframework "*) ;; +- *) deplibs="$deplibs $qarg.ltframework" # this is fixed later ++ *) func_append deplibs " $qarg.ltframework" # this is fixed later + ;; + esac + ;; +@@ -4446,7 +5302,7 @@ func_mode_link () + moreargs= + for fil in `cat "$save_arg"` + do +-# moreargs="$moreargs $fil" ++# func_append moreargs " $fil" + arg=$fil + # A libtool-controlled object. + +@@ -4475,7 +5331,7 @@ func_mode_link () + + if test "$prev" = dlfiles; then + if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then +- dlfiles="$dlfiles $pic_object" ++ func_append dlfiles " $pic_object" + prev= + continue + else +@@ -4487,7 +5343,7 @@ func_mode_link () + # CHECK ME: I think I busted this. -Ossama + if test "$prev" = dlprefiles; then + # Preload the old-style object. +- dlprefiles="$dlprefiles $pic_object" ++ func_append dlprefiles " $pic_object" + prev= + fi + +@@ -4557,12 +5413,12 @@ func_mode_link () + if test "$prev" = rpath; then + case "$rpath " in + *" $arg "*) ;; +- *) rpath="$rpath $arg" ;; ++ *) func_append rpath " $arg" ;; + esac + else + case "$xrpath " in + *" $arg "*) ;; +- *) xrpath="$xrpath $arg" ;; ++ *) func_append xrpath " $arg" ;; + esac + fi + prev= +@@ -4574,28 +5430,28 @@ func_mode_link () + continue + ;; + weak) +- weak_libs="$weak_libs $arg" ++ func_append weak_libs " $arg" + prev= + continue + ;; + xcclinker) +- linker_flags="$linker_flags $qarg" +- compiler_flags="$compiler_flags $qarg" ++ func_append linker_flags " $qarg" ++ func_append compiler_flags " $qarg" + prev= + func_append compile_command " $qarg" + func_append finalize_command " $qarg" + continue + ;; + xcompiler) +- compiler_flags="$compiler_flags $qarg" ++ func_append compiler_flags " $qarg" + prev= + func_append compile_command " $qarg" + func_append finalize_command " $qarg" + continue + ;; + xlinker) +- linker_flags="$linker_flags $qarg" +- compiler_flags="$compiler_flags $wl$qarg" ++ func_append linker_flags " $qarg" ++ func_append compiler_flags " $wl$qarg" + prev= + func_append compile_command " $wl$qarg" + func_append finalize_command " $wl$qarg" +@@ -4686,15 +5542,16 @@ func_mode_link () + ;; + + -L*) +- func_stripname '-L' '' "$arg" +- dir=$func_stripname_result +- if test -z "$dir"; then ++ func_stripname "-L" '' "$arg" ++ if test -z "$func_stripname_result"; then + if test "$#" -gt 0; then + func_fatal_error "require no space between \`-L' and \`$1'" + else + func_fatal_error "need path for \`-L' option" + fi + fi ++ func_resolve_sysroot "$func_stripname_result" ++ dir=$func_resolve_sysroot_result + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) ;; +@@ -4706,10 +5563,16 @@ func_mode_link () + ;; + esac + case "$deplibs " in +- *" -L$dir "*) ;; ++ *" -L$dir "* | *" $arg "*) ++ # Will only happen for absolute or sysroot arguments ++ ;; + *) +- deplibs="$deplibs -L$dir" +- lib_search_path="$lib_search_path $dir" ++ # Preserve sysroot, but never include relative directories ++ case $dir in ++ [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;; ++ *) func_append deplibs " -L$dir" ;; ++ esac ++ func_append lib_search_path " $dir" + ;; + esac + case $host in +@@ -4718,12 +5581,12 @@ func_mode_link () + case :$dllsearchpath: in + *":$dir:"*) ;; + ::) dllsearchpath=$dir;; +- *) dllsearchpath="$dllsearchpath:$dir";; ++ *) func_append dllsearchpath ":$dir";; + esac + case :$dllsearchpath: in + *":$testbindir:"*) ;; + ::) dllsearchpath=$testbindir;; +- *) dllsearchpath="$dllsearchpath:$testbindir";; ++ *) func_append dllsearchpath ":$testbindir";; + esac + ;; + esac +@@ -4747,7 +5610,7 @@ func_mode_link () + ;; + *-*-rhapsody* | *-*-darwin1.[012]) + # Rhapsody C and math libraries are in the System framework +- deplibs="$deplibs System.ltframework" ++ func_append deplibs " System.ltframework" + continue + ;; + *-*-sco3.2v5* | *-*-sco5v6*) +@@ -4758,9 +5621,6 @@ func_mode_link () + # Compiler inserts libc in the correct place for threads to work + test "X$arg" = "X-lc" && continue + ;; +- *-*-linux*) +- test "X$arg" = "X-lc" && continue +- ;; + esac + elif test "X$arg" = "X-lc_r"; then + case $host in +@@ -4770,7 +5630,7 @@ func_mode_link () + ;; + esac + fi +- deplibs="$deplibs $arg" ++ func_append deplibs " $arg" + continue + ;; + +@@ -4782,8 +5642,8 @@ func_mode_link () + # Tru64 UNIX uses -model [arg] to determine the layout of C++ + # classes, name mangling, and exception handling. + # Darwin uses the -arch flag to determine output architecture. +- -model|-arch|-isysroot) +- compiler_flags="$compiler_flags $arg" ++ -model|-arch|-isysroot|--sysroot) ++ func_append compiler_flags " $arg" + func_append compile_command " $arg" + func_append finalize_command " $arg" + prev=xcompiler +@@ -4791,12 +5651,12 @@ func_mode_link () + ;; + + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) +- compiler_flags="$compiler_flags $arg" ++ func_append compiler_flags " $arg" + func_append compile_command " $arg" + func_append finalize_command " $arg" + case "$new_inherited_linker_flags " in + *" $arg "*) ;; +- * ) new_inherited_linker_flags="$new_inherited_linker_flags $arg" ;; ++ * ) func_append new_inherited_linker_flags " $arg" ;; + esac + continue + ;; +@@ -4863,13 +5723,17 @@ func_mode_link () + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) ;; ++ =*) ++ func_stripname '=' '' "$dir" ++ dir=$lt_sysroot$func_stripname_result ++ ;; + *) + func_fatal_error "only absolute run-paths are allowed" + ;; + esac + case "$xrpath " in + *" $dir "*) ;; +- *) xrpath="$xrpath $dir" ;; ++ *) func_append xrpath " $dir" ;; + esac + continue + ;; +@@ -4922,8 +5786,8 @@ func_mode_link () + for flag in $args; do + IFS="$save_ifs" + func_quote_for_eval "$flag" +- arg="$arg $func_quote_for_eval_result" +- compiler_flags="$compiler_flags $func_quote_for_eval_result" ++ func_append arg " $func_quote_for_eval_result" ++ func_append compiler_flags " $func_quote_for_eval_result" + done + IFS="$save_ifs" + func_stripname ' ' '' "$arg" +@@ -4938,9 +5802,9 @@ func_mode_link () + for flag in $args; do + IFS="$save_ifs" + func_quote_for_eval "$flag" +- arg="$arg $wl$func_quote_for_eval_result" +- compiler_flags="$compiler_flags $wl$func_quote_for_eval_result" +- linker_flags="$linker_flags $func_quote_for_eval_result" ++ func_append arg " $wl$func_quote_for_eval_result" ++ func_append compiler_flags " $wl$func_quote_for_eval_result" ++ func_append linker_flags " $func_quote_for_eval_result" + done + IFS="$save_ifs" + func_stripname ' ' '' "$arg" +@@ -4968,24 +5832,27 @@ func_mode_link () + arg="$func_quote_for_eval_result" + ;; + +- # -64, -mips[0-9] enable 64-bit mode on the SGI compiler +- # -r[0-9][0-9]* specifies the processor on the SGI compiler +- # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler +- # +DA*, +DD* enable 64-bit mode on the HP compiler +- # -q* pass through compiler args for the IBM compiler +- # -m*, -t[45]*, -txscale* pass through architecture-specific +- # compiler args for GCC +- # -F/path gives path to uninstalled frameworks, gcc on darwin +- # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC +- # @file GCC response files +- # -tp=* Portland pgcc target processor selection ++ # Flags to be passed through unchanged, with rationale: ++ # -64, -mips[0-9] enable 64-bit mode for the SGI compiler ++ # -r[0-9][0-9]* specify processor for the SGI compiler ++ # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler ++ # +DA*, +DD* enable 64-bit mode for the HP compiler ++ # -q* compiler args for the IBM compiler ++ # -m*, -t[45]*, -txscale* architecture-specific flags for GCC ++ # -F/path path to uninstalled frameworks, gcc on darwin ++ # -p, -pg, --coverage, -fprofile-* profiling flags for GCC ++ # @file GCC response files ++ # -tp=* Portland pgcc target processor selection ++ # --sysroot=* for sysroot support ++ # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization + -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ +- -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*) ++ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ ++ -O*|-flto*|-fwhopr*|-fuse-linker-plugin) + func_quote_for_eval "$arg" + arg="$func_quote_for_eval_result" + func_append compile_command " $arg" + func_append finalize_command " $arg" +- compiler_flags="$compiler_flags $arg" ++ func_append compiler_flags " $arg" + continue + ;; + +@@ -4997,7 +5864,7 @@ func_mode_link () + + *.$objext) + # A standard object. +- objs="$objs $arg" ++ func_append objs " $arg" + ;; + + *.lo) +@@ -5028,7 +5895,7 @@ func_mode_link () + + if test "$prev" = dlfiles; then + if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then +- dlfiles="$dlfiles $pic_object" ++ func_append dlfiles " $pic_object" + prev= + continue + else +@@ -5040,7 +5907,7 @@ func_mode_link () + # CHECK ME: I think I busted this. -Ossama + if test "$prev" = dlprefiles; then + # Preload the old-style object. +- dlprefiles="$dlprefiles $pic_object" ++ func_append dlprefiles " $pic_object" + prev= + fi + +@@ -5085,24 +5952,25 @@ func_mode_link () + + *.$libext) + # An archive. +- deplibs="$deplibs $arg" +- old_deplibs="$old_deplibs $arg" ++ func_append deplibs " $arg" ++ func_append old_deplibs " $arg" + continue + ;; + + *.la) + # A libtool-controlled library. + ++ func_resolve_sysroot "$arg" + if test "$prev" = dlfiles; then + # This library was specified with -dlopen. +- dlfiles="$dlfiles $arg" ++ func_append dlfiles " $func_resolve_sysroot_result" + prev= + elif test "$prev" = dlprefiles; then + # The library was specified with -dlpreopen. +- dlprefiles="$dlprefiles $arg" ++ func_append dlprefiles " $func_resolve_sysroot_result" + prev= + else +- deplibs="$deplibs $arg" ++ func_append deplibs " $func_resolve_sysroot_result" + fi + continue + ;; +@@ -5127,7 +5995,7 @@ func_mode_link () + func_fatal_help "the \`$prevarg' option requires an argument" + + if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then +- eval "arg=\"$export_dynamic_flag_spec\"" ++ eval arg=\"$export_dynamic_flag_spec\" + func_append compile_command " $arg" + func_append finalize_command " $arg" + fi +@@ -5144,11 +6012,13 @@ func_mode_link () + else + shlib_search_path= + fi +- eval "sys_lib_search_path=\"$sys_lib_search_path_spec\"" +- eval "sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"" ++ eval sys_lib_search_path=\"$sys_lib_search_path_spec\" ++ eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" + + func_dirname "$output" "/" "" + output_objdir="$func_dirname_result$objdir" ++ func_to_tool_file "$output_objdir/" ++ tool_output_objdir=$func_to_tool_file_result + # Create the object directory. + func_mkdir_p "$output_objdir" + +@@ -5169,12 +6039,12 @@ func_mode_link () + # Find all interdependent deplibs by searching for libraries + # that are linked more than once (e.g. -la -lb -la) + for deplib in $deplibs; do +- if $opt_duplicate_deps ; then ++ if $opt_preserve_dup_deps ; then + case "$libs " in +- *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; ++ *" $deplib "*) func_append specialdeplibs " $deplib" ;; + esac + fi +- libs="$libs $deplib" ++ func_append libs " $deplib" + done + + if test "$linkmode" = lib; then +@@ -5187,9 +6057,9 @@ func_mode_link () + if $opt_duplicate_compiler_generated_deps; then + for pre_post_dep in $predeps $postdeps; do + case "$pre_post_deps " in +- *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; ++ *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;; + esac +- pre_post_deps="$pre_post_deps $pre_post_dep" ++ func_append pre_post_deps " $pre_post_dep" + done + fi + pre_post_deps= +@@ -5256,8 +6126,9 @@ func_mode_link () + for lib in $dlprefiles; do + # Ignore non-libtool-libs + dependency_libs= ++ func_resolve_sysroot "$lib" + case $lib in +- *.la) func_source "$lib" ;; ++ *.la) func_source "$func_resolve_sysroot_result" ;; + esac + + # Collect preopened libtool deplibs, except any this library +@@ -5267,7 +6138,7 @@ func_mode_link () + deplib_base=$func_basename_result + case " $weak_libs " in + *" $deplib_base "*) ;; +- *) deplibs="$deplibs $deplib" ;; ++ *) func_append deplibs " $deplib" ;; + esac + done + done +@@ -5288,11 +6159,11 @@ func_mode_link () + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else +- compiler_flags="$compiler_flags $deplib" ++ func_append compiler_flags " $deplib" + if test "$linkmode" = lib ; then + case "$new_inherited_linker_flags " in + *" $deplib "*) ;; +- * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;; ++ * ) func_append new_inherited_linker_flags " $deplib" ;; + esac + fi + fi +@@ -5377,7 +6248,7 @@ func_mode_link () + if test "$linkmode" = lib ; then + case "$new_inherited_linker_flags " in + *" $deplib "*) ;; +- * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;; ++ * ) func_append new_inherited_linker_flags " $deplib" ;; + esac + fi + fi +@@ -5390,7 +6261,8 @@ func_mode_link () + test "$pass" = conv && continue + newdependency_libs="$deplib $newdependency_libs" + func_stripname '-L' '' "$deplib" +- newlib_search_path="$newlib_search_path $func_stripname_result" ++ func_resolve_sysroot "$func_stripname_result" ++ func_append newlib_search_path " $func_resolve_sysroot_result" + ;; + prog) + if test "$pass" = conv; then +@@ -5404,7 +6276,8 @@ func_mode_link () + finalize_deplibs="$deplib $finalize_deplibs" + fi + func_stripname '-L' '' "$deplib" +- newlib_search_path="$newlib_search_path $func_stripname_result" ++ func_resolve_sysroot "$func_stripname_result" ++ func_append newlib_search_path " $func_resolve_sysroot_result" + ;; + *) + func_warning "\`-L' is ignored for archives/objects" +@@ -5415,17 +6288,21 @@ func_mode_link () + -R*) + if test "$pass" = link; then + func_stripname '-R' '' "$deplib" +- dir=$func_stripname_result ++ func_resolve_sysroot "$func_stripname_result" ++ dir=$func_resolve_sysroot_result + # Make sure the xrpath contains only unique directories. + case "$xrpath " in + *" $dir "*) ;; +- *) xrpath="$xrpath $dir" ;; ++ *) func_append xrpath " $dir" ;; + esac + fi + deplibs="$deplib $deplibs" + continue + ;; +- *.la) lib="$deplib" ;; ++ *.la) ++ func_resolve_sysroot "$deplib" ++ lib=$func_resolve_sysroot_result ++ ;; + *.$libext) + if test "$pass" = conv; then + deplibs="$deplib $deplibs" +@@ -5488,11 +6365,11 @@ func_mode_link () + if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then + # If there is no dlopen support or we're linking statically, + # we need to preload. +- newdlprefiles="$newdlprefiles $deplib" ++ func_append newdlprefiles " $deplib" + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else +- newdlfiles="$newdlfiles $deplib" ++ func_append newdlfiles " $deplib" + fi + fi + continue +@@ -5538,7 +6415,7 @@ func_mode_link () + for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do + case " $new_inherited_linker_flags " in + *" $tmp_inherited_linker_flag "*) ;; +- *) new_inherited_linker_flags="$new_inherited_linker_flags $tmp_inherited_linker_flag";; ++ *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";; + esac + done + fi +@@ -5546,8 +6423,8 @@ func_mode_link () + if test "$linkmode,$pass" = "lib,link" || + test "$linkmode,$pass" = "prog,scan" || + { test "$linkmode" != prog && test "$linkmode" != lib; }; then +- test -n "$dlopen" && dlfiles="$dlfiles $dlopen" +- test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" ++ test -n "$dlopen" && func_append dlfiles " $dlopen" ++ test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen" + fi + + if test "$pass" = conv; then +@@ -5558,20 +6435,20 @@ func_mode_link () + func_fatal_error "cannot find name of link library for \`$lib'" + fi + # It is a libtool convenience library, so add in its objects. +- convenience="$convenience $ladir/$objdir/$old_library" +- old_convenience="$old_convenience $ladir/$objdir/$old_library" ++ func_append convenience " $ladir/$objdir/$old_library" ++ func_append old_convenience " $ladir/$objdir/$old_library" + elif test "$linkmode" != prog && test "$linkmode" != lib; then + func_fatal_error "\`$lib' is not a convenience library" + fi + tmp_libs= + for deplib in $dependency_libs; do + deplibs="$deplib $deplibs" +- if $opt_duplicate_deps ; then ++ if $opt_preserve_dup_deps ; then + case "$tmp_libs " in +- *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; ++ *" $deplib "*) func_append specialdeplibs " $deplib" ;; + esac + fi +- tmp_libs="$tmp_libs $deplib" ++ func_append tmp_libs " $deplib" + done + continue + fi # $pass = conv +@@ -5579,9 +6456,15 @@ func_mode_link () + + # Get the name of the library we link against. + linklib= +- for l in $old_library $library_names; do +- linklib="$l" +- done ++ if test -n "$old_library" && ++ { test "$prefer_static_libs" = yes || ++ test "$prefer_static_libs,$installed" = "built,no"; }; then ++ linklib=$old_library ++ else ++ for l in $old_library $library_names; do ++ linklib="$l" ++ done ++ fi + if test -z "$linklib"; then + func_fatal_error "cannot find name of link library for \`$lib'" + fi +@@ -5598,9 +6481,9 @@ func_mode_link () + # statically, we need to preload. We also need to preload any + # dependent libraries so libltdl's deplib preloader doesn't + # bomb out in the load deplibs phase. +- dlprefiles="$dlprefiles $lib $dependency_libs" ++ func_append dlprefiles " $lib $dependency_libs" + else +- newdlfiles="$newdlfiles $lib" ++ func_append newdlfiles " $lib" + fi + continue + fi # $pass = dlopen +@@ -5622,14 +6505,14 @@ func_mode_link () + + # Find the relevant object directory and library name. + if test "X$installed" = Xyes; then +- if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then ++ if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then + func_warning "library \`$lib' was moved." + dir="$ladir" + absdir="$abs_ladir" + libdir="$abs_ladir" + else +- dir="$libdir" +- absdir="$libdir" ++ dir="$lt_sysroot$libdir" ++ absdir="$lt_sysroot$libdir" + fi + test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes + else +@@ -5637,12 +6520,12 @@ func_mode_link () + dir="$ladir" + absdir="$abs_ladir" + # Remove this search path later +- notinst_path="$notinst_path $abs_ladir" ++ func_append notinst_path " $abs_ladir" + else + dir="$ladir/$objdir" + absdir="$abs_ladir/$objdir" + # Remove this search path later +- notinst_path="$notinst_path $abs_ladir" ++ func_append notinst_path " $abs_ladir" + fi + fi # $installed = yes + func_stripname 'lib' '.la' "$laname" +@@ -5653,20 +6536,46 @@ func_mode_link () + if test -z "$libdir" && test "$linkmode" = prog; then + func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'" + fi +- # Prefer using a static library (so that no silly _DYNAMIC symbols +- # are required to link). +- if test -n "$old_library"; then +- newdlprefiles="$newdlprefiles $dir/$old_library" +- # Keep a list of preopened convenience libraries to check +- # that they are being used correctly in the link pass. +- test -z "$libdir" && \ +- dlpreconveniencelibs="$dlpreconveniencelibs $dir/$old_library" +- # Otherwise, use the dlname, so that lt_dlopen finds it. +- elif test -n "$dlname"; then +- newdlprefiles="$newdlprefiles $dir/$dlname" +- else +- newdlprefiles="$newdlprefiles $dir/$linklib" +- fi ++ case "$host" in ++ # special handling for platforms with PE-DLLs. ++ *cygwin* | *mingw* | *cegcc* ) ++ # Linker will automatically link against shared library if both ++ # static and shared are present. Therefore, ensure we extract ++ # symbols from the import library if a shared library is present ++ # (otherwise, the dlopen module name will be incorrect). We do ++ # this by putting the import library name into $newdlprefiles. ++ # We recover the dlopen module name by 'saving' the la file ++ # name in a special purpose variable, and (later) extracting the ++ # dlname from the la file. ++ if test -n "$dlname"; then ++ func_tr_sh "$dir/$linklib" ++ eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname" ++ func_append newdlprefiles " $dir/$linklib" ++ else ++ func_append newdlprefiles " $dir/$old_library" ++ # Keep a list of preopened convenience libraries to check ++ # that they are being used correctly in the link pass. ++ test -z "$libdir" && \ ++ func_append dlpreconveniencelibs " $dir/$old_library" ++ fi ++ ;; ++ * ) ++ # Prefer using a static library (so that no silly _DYNAMIC symbols ++ # are required to link). ++ if test -n "$old_library"; then ++ func_append newdlprefiles " $dir/$old_library" ++ # Keep a list of preopened convenience libraries to check ++ # that they are being used correctly in the link pass. ++ test -z "$libdir" && \ ++ func_append dlpreconveniencelibs " $dir/$old_library" ++ # Otherwise, use the dlname, so that lt_dlopen finds it. ++ elif test -n "$dlname"; then ++ func_append newdlprefiles " $dir/$dlname" ++ else ++ func_append newdlprefiles " $dir/$linklib" ++ fi ++ ;; ++ esac + fi # $pass = dlpreopen + + if test -z "$libdir"; then +@@ -5684,7 +6593,7 @@ func_mode_link () + + + if test "$linkmode" = prog && test "$pass" != link; then +- newlib_search_path="$newlib_search_path $ladir" ++ func_append newlib_search_path " $ladir" + deplibs="$lib $deplibs" + + linkalldeplibs=no +@@ -5697,7 +6606,8 @@ func_mode_link () + for deplib in $dependency_libs; do + case $deplib in + -L*) func_stripname '-L' '' "$deplib" +- newlib_search_path="$newlib_search_path $func_stripname_result" ++ func_resolve_sysroot "$func_stripname_result" ++ func_append newlib_search_path " $func_resolve_sysroot_result" + ;; + esac + # Need to link against all dependency_libs? +@@ -5708,12 +6618,12 @@ func_mode_link () + # or/and link against static libraries + newdependency_libs="$deplib $newdependency_libs" + fi +- if $opt_duplicate_deps ; then ++ if $opt_preserve_dup_deps ; then + case "$tmp_libs " in +- *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; ++ *" $deplib "*) func_append specialdeplibs " $deplib" ;; + esac + fi +- tmp_libs="$tmp_libs $deplib" ++ func_append tmp_libs " $deplib" + done # for deplib + continue + fi # $linkmode = prog... +@@ -5728,7 +6638,7 @@ func_mode_link () + # Make sure the rpath contains only unique directories. + case "$temp_rpath:" in + *"$absdir:"*) ;; +- *) temp_rpath="$temp_rpath$absdir:" ;; ++ *) func_append temp_rpath "$absdir:" ;; + esac + fi + +@@ -5740,7 +6650,7 @@ func_mode_link () + *) + case "$compile_rpath " in + *" $absdir "*) ;; +- *) compile_rpath="$compile_rpath $absdir" ++ *) func_append compile_rpath " $absdir" ;; + esac + ;; + esac +@@ -5749,7 +6659,7 @@ func_mode_link () + *) + case "$finalize_rpath " in + *" $libdir "*) ;; +- *) finalize_rpath="$finalize_rpath $libdir" ++ *) func_append finalize_rpath " $libdir" ;; + esac + ;; + esac +@@ -5774,12 +6684,12 @@ func_mode_link () + case $host in + *cygwin* | *mingw* | *cegcc*) + # No point in relinking DLLs because paths are not encoded +- notinst_deplibs="$notinst_deplibs $lib" ++ func_append notinst_deplibs " $lib" + need_relink=no + ;; + *) + if test "$installed" = no; then +- notinst_deplibs="$notinst_deplibs $lib" ++ func_append notinst_deplibs " $lib" + need_relink=yes + fi + ;; +@@ -5814,7 +6724,7 @@ func_mode_link () + *) + case "$compile_rpath " in + *" $absdir "*) ;; +- *) compile_rpath="$compile_rpath $absdir" ++ *) func_append compile_rpath " $absdir" ;; + esac + ;; + esac +@@ -5823,7 +6733,7 @@ func_mode_link () + *) + case "$finalize_rpath " in + *" $libdir "*) ;; +- *) finalize_rpath="$finalize_rpath $libdir" ++ *) func_append finalize_rpath " $libdir" ;; + esac + ;; + esac +@@ -5835,7 +6745,7 @@ func_mode_link () + shift + realname="$1" + shift +- eval "libname=\"$libname_spec\"" ++ libname=`eval "\\$ECHO \"$libname_spec\""` + # use dlname if we got it. it's perfectly good, no? + if test -n "$dlname"; then + soname="$dlname" +@@ -5848,7 +6758,7 @@ func_mode_link () + versuffix="-$major" + ;; + esac +- eval "soname=\"$soname_spec\"" ++ eval soname=\"$soname_spec\" + else + soname="$realname" + fi +@@ -5877,7 +6787,7 @@ func_mode_link () + linklib=$newlib + fi # test -n "$old_archive_from_expsyms_cmds" + +- if test "$linkmode" = prog || test "$mode" != relink; then ++ if test "$linkmode" = prog || test "$opt_mode" != relink; then + add_shlibpath= + add_dir= + add= +@@ -5933,7 +6843,7 @@ func_mode_link () + if test -n "$inst_prefix_dir"; then + case $libdir in + [\\/]*) +- add_dir="$add_dir -L$inst_prefix_dir$libdir" ++ func_append add_dir " -L$inst_prefix_dir$libdir" + ;; + esac + fi +@@ -5955,7 +6865,7 @@ func_mode_link () + if test -n "$add_shlibpath"; then + case :$compile_shlibpath: in + *":$add_shlibpath:"*) ;; +- *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; ++ *) func_append compile_shlibpath "$add_shlibpath:" ;; + esac + fi + if test "$linkmode" = prog; then +@@ -5969,13 +6879,13 @@ func_mode_link () + test "$hardcode_shlibpath_var" = yes; then + case :$finalize_shlibpath: in + *":$libdir:"*) ;; +- *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; ++ *) func_append finalize_shlibpath "$libdir:" ;; + esac + fi + fi + fi + +- if test "$linkmode" = prog || test "$mode" = relink; then ++ if test "$linkmode" = prog || test "$opt_mode" = relink; then + add_shlibpath= + add_dir= + add= +@@ -5989,7 +6899,7 @@ func_mode_link () + elif test "$hardcode_shlibpath_var" = yes; then + case :$finalize_shlibpath: in + *":$libdir:"*) ;; +- *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; ++ *) func_append finalize_shlibpath "$libdir:" ;; + esac + add="-l$name" + elif test "$hardcode_automatic" = yes; then +@@ -6001,12 +6911,12 @@ func_mode_link () + fi + else + # We cannot seem to hardcode it, guess we'll fake it. +- add_dir="-L$libdir" ++ add_dir="-L$lt_sysroot$libdir" + # Try looking first in the location we're being installed to. + if test -n "$inst_prefix_dir"; then + case $libdir in + [\\/]*) +- add_dir="$add_dir -L$inst_prefix_dir$libdir" ++ func_append add_dir " -L$inst_prefix_dir$libdir" + ;; + esac + fi +@@ -6083,27 +6993,33 @@ func_mode_link () + temp_xrpath=$func_stripname_result + case " $xrpath " in + *" $temp_xrpath "*) ;; +- *) xrpath="$xrpath $temp_xrpath";; ++ *) func_append xrpath " $temp_xrpath";; + esac;; +- *) temp_deplibs="$temp_deplibs $libdir";; ++ *) func_append temp_deplibs " $libdir";; + esac + done + dependency_libs="$temp_deplibs" + fi + +- newlib_search_path="$newlib_search_path $absdir" ++ func_append newlib_search_path " $absdir" + # Link against this library + test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" + # ... and its dependency_libs + tmp_libs= + for deplib in $dependency_libs; do + newdependency_libs="$deplib $newdependency_libs" +- if $opt_duplicate_deps ; then ++ case $deplib in ++ -L*) func_stripname '-L' '' "$deplib" ++ func_resolve_sysroot "$func_stripname_result";; ++ *) func_resolve_sysroot "$deplib" ;; ++ esac ++ if $opt_preserve_dup_deps ; then + case "$tmp_libs " in +- *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; ++ *" $func_resolve_sysroot_result "*) ++ func_append specialdeplibs " $func_resolve_sysroot_result" ;; + esac + fi +- tmp_libs="$tmp_libs $deplib" ++ func_append tmp_libs " $func_resolve_sysroot_result" + done + + if test "$link_all_deplibs" != no; then +@@ -6113,8 +7029,10 @@ func_mode_link () + case $deplib in + -L*) path="$deplib" ;; + *.la) ++ func_resolve_sysroot "$deplib" ++ deplib=$func_resolve_sysroot_result + func_dirname "$deplib" "" "." +- dir="$func_dirname_result" ++ dir=$func_dirname_result + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; +@@ -6130,7 +7048,7 @@ func_mode_link () + case $host in + *-*-darwin*) + depdepl= +- deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` ++ eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` + if test -n "$deplibrary_names" ; then + for tmp in $deplibrary_names ; do + depdepl=$tmp +@@ -6141,8 +7059,8 @@ func_mode_link () + if test -z "$darwin_install_name"; then + darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` + fi +- compiler_flags="$compiler_flags ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" +- linker_flags="$linker_flags -dylib_file ${darwin_install_name}:${depdepl}" ++ func_append compiler_flags " ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" ++ func_append linker_flags " -dylib_file ${darwin_install_name}:${depdepl}" + path= + fi + fi +@@ -6152,7 +7070,7 @@ func_mode_link () + ;; + esac + else +- libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` ++ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` + test -z "$libdir" && \ + func_fatal_error "\`$deplib' is not a valid libtool archive" + test "$absdir" != "$libdir" && \ +@@ -6192,7 +7110,7 @@ func_mode_link () + for dir in $newlib_search_path; do + case "$lib_search_path " in + *" $dir "*) ;; +- *) lib_search_path="$lib_search_path $dir" ;; ++ *) func_append lib_search_path " $dir" ;; + esac + done + newlib_search_path= +@@ -6205,7 +7123,7 @@ func_mode_link () + fi + for var in $vars dependency_libs; do + # Add libraries to $var in reverse order +- eval tmp_libs=\$$var ++ eval tmp_libs=\"\$$var\" + new_libs= + for deplib in $tmp_libs; do + # FIXME: Pedantically, this is the right thing to do, so +@@ -6250,13 +7168,13 @@ func_mode_link () + -L*) + case " $tmp_libs " in + *" $deplib "*) ;; +- *) tmp_libs="$tmp_libs $deplib" ;; ++ *) func_append tmp_libs " $deplib" ;; + esac + ;; +- *) tmp_libs="$tmp_libs $deplib" ;; ++ *) func_append tmp_libs " $deplib" ;; + esac + done +- eval $var=\$tmp_libs ++ eval $var=\"$tmp_libs\" + done # for var + fi + # Last step: remove runtime libs from dependency_libs +@@ -6269,7 +7187,7 @@ func_mode_link () + ;; + esac + if test -n "$i" ; then +- tmp_libs="$tmp_libs $i" ++ func_append tmp_libs " $i" + fi + done + dependency_libs=$tmp_libs +@@ -6310,7 +7228,7 @@ func_mode_link () + # Now set the variables for building old libraries. + build_libtool_libs=no + oldlibs="$output" +- objs="$objs$old_deplibs" ++ func_append objs "$old_deplibs" + ;; + + lib) +@@ -6319,8 +7237,8 @@ func_mode_link () + lib*) + func_stripname 'lib' '.la' "$outputname" + name=$func_stripname_result +- eval "shared_ext=\"$shrext_cmds\"" +- eval "libname=\"$libname_spec\"" ++ eval shared_ext=\"$shrext_cmds\" ++ eval libname=\"$libname_spec\" + ;; + *) + test "$module" = no && \ +@@ -6330,8 +7248,8 @@ func_mode_link () + # Add the "lib" prefix for modules if required + func_stripname '' '.la' "$outputname" + name=$func_stripname_result +- eval "shared_ext=\"$shrext_cmds\"" +- eval "libname=\"$libname_spec\"" ++ eval shared_ext=\"$shrext_cmds\" ++ eval libname=\"$libname_spec\" + else + func_stripname '' '.la' "$outputname" + libname=$func_stripname_result +@@ -6346,7 +7264,7 @@ func_mode_link () + echo + $ECHO "*** Warning: Linking the shared library $output against the non-libtool" + $ECHO "*** objects $objs is not portable!" +- libobjs="$libobjs $objs" ++ func_append libobjs " $objs" + fi + fi + +@@ -6544,7 +7462,7 @@ func_mode_link () + done + + # Make executables depend on our current version. +- verstring="$verstring:${current}.0" ++ func_append verstring ":${current}.0" + ;; + + qnx) +@@ -6612,10 +7530,10 @@ func_mode_link () + fi + + func_generate_dlsyms "$libname" "$libname" "yes" +- libobjs="$libobjs $symfileobj" ++ func_append libobjs " $symfileobj" + test "X$libobjs" = "X " && libobjs= + +- if test "$mode" != relink; then ++ if test "$opt_mode" != relink; then + # Remove our outputs, but don't remove object files since they + # may have been created when compiling PIC objects. + removelist= +@@ -6631,7 +7549,7 @@ func_mode_link () + continue + fi + fi +- removelist="$removelist $p" ++ func_append removelist " $p" + ;; + *) ;; + esac +@@ -6642,7 +7560,7 @@ func_mode_link () + + # Now set the variables for building old libraries. + if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then +- oldlibs="$oldlibs $output_objdir/$libname.$libext" ++ func_append oldlibs " $output_objdir/$libname.$libext" + + # Transform .lo files to .o files. + oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP` +@@ -6659,10 +7577,11 @@ func_mode_link () + # If the user specified any rpath flags, then add them. + temp_xrpath= + for libdir in $xrpath; do +- temp_xrpath="$temp_xrpath -R$libdir" ++ func_replace_sysroot "$libdir" ++ func_append temp_xrpath " -R$func_replace_sysroot_result" + case "$finalize_rpath " in + *" $libdir "*) ;; +- *) finalize_rpath="$finalize_rpath $libdir" ;; ++ *) func_append finalize_rpath " $libdir" ;; + esac + done + if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then +@@ -6676,7 +7595,7 @@ func_mode_link () + for lib in $old_dlfiles; do + case " $dlprefiles $dlfiles " in + *" $lib "*) ;; +- *) dlfiles="$dlfiles $lib" ;; ++ *) func_append dlfiles " $lib" ;; + esac + done + +@@ -6686,7 +7605,7 @@ func_mode_link () + for lib in $old_dlprefiles; do + case "$dlprefiles " in + *" $lib "*) ;; +- *) dlprefiles="$dlprefiles $lib" ;; ++ *) func_append dlprefiles " $lib" ;; + esac + done + +@@ -6698,7 +7617,7 @@ func_mode_link () + ;; + *-*-rhapsody* | *-*-darwin1.[012]) + # Rhapsody C library is in the System framework +- deplibs="$deplibs System.ltframework" ++ func_append deplibs " System.ltframework" + ;; + *-*-netbsd*) + # Don't link with libc until the a.out ld.so is fixed. +@@ -6715,7 +7634,7 @@ func_mode_link () + *) + # Add libc to deplibs on all other systems if necessary. + if test "$build_libtool_need_lc" = "yes"; then +- deplibs="$deplibs -lc" ++ func_append deplibs " -lc" + fi + ;; + esac +@@ -6764,18 +7683,18 @@ EOF + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + case " $predeps $postdeps " in + *" $i "*) +- newdeplibs="$newdeplibs $i" ++ func_append newdeplibs " $i" + i="" + ;; + esac + fi + if test -n "$i" ; then +- eval "libname=\"$libname_spec\"" +- eval "deplib_matches=\"$library_names_spec\"" ++ libname=`eval "\\$ECHO \"$libname_spec\""` ++ deplib_matches=`eval "\\$ECHO \"$library_names_spec\""` + set dummy $deplib_matches; shift + deplib_match=$1 + if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then +- newdeplibs="$newdeplibs $i" ++ func_append newdeplibs " $i" + else + droppeddeps=yes + echo +@@ -6789,7 +7708,7 @@ EOF + fi + ;; + *) +- newdeplibs="$newdeplibs $i" ++ func_append newdeplibs " $i" + ;; + esac + done +@@ -6807,18 +7726,18 @@ EOF + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + case " $predeps $postdeps " in + *" $i "*) +- newdeplibs="$newdeplibs $i" ++ func_append newdeplibs " $i" + i="" + ;; + esac + fi + if test -n "$i" ; then +- eval "libname=\"$libname_spec\"" +- eval "deplib_matches=\"$library_names_spec\"" ++ libname=`eval "\\$ECHO \"$libname_spec\""` ++ deplib_matches=`eval "\\$ECHO \"$library_names_spec\""` + set dummy $deplib_matches; shift + deplib_match=$1 + if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then +- newdeplibs="$newdeplibs $i" ++ func_append newdeplibs " $i" + else + droppeddeps=yes + echo +@@ -6840,7 +7759,7 @@ EOF + fi + ;; + *) +- newdeplibs="$newdeplibs $i" ++ func_append newdeplibs " $i" + ;; + esac + done +@@ -6857,15 +7776,27 @@ EOF + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + case " $predeps $postdeps " in + *" $a_deplib "*) +- newdeplibs="$newdeplibs $a_deplib" ++ func_append newdeplibs " $a_deplib" + a_deplib="" + ;; + esac + fi + if test -n "$a_deplib" ; then +- eval "libname=\"$libname_spec\"" ++ libname=`eval "\\$ECHO \"$libname_spec\""` ++ if test -n "$file_magic_glob"; then ++ libnameglob=`func_echo_all "$libname" | $SED -e $file_magic_glob` ++ else ++ libnameglob=$libname ++ fi ++ test "$want_nocaseglob" = yes && nocaseglob=`shopt -p nocaseglob` + for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do +- potential_libs=`ls $i/$libname[.-]* 2>/dev/null` ++ if test "$want_nocaseglob" = yes; then ++ shopt -s nocaseglob ++ potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` ++ $nocaseglob ++ else ++ potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` ++ fi + for potent_lib in $potential_libs; do + # Follow soft links. + if ls -lLd "$potent_lib" 2>/dev/null | +@@ -6885,10 +7816,10 @@ EOF + *) potlib=`$ECHO "$potlib" | $SED 's,[^/]*$,,'`"$potliblink";; + esac + done +- if eval "$file_magic_cmd \"\$potlib\"" 2>/dev/null | ++ if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | + $SED -e 10q | + $EGREP "$file_magic_regex" > /dev/null; then +- newdeplibs="$newdeplibs $a_deplib" ++ func_append newdeplibs " $a_deplib" + a_deplib="" + break 2 + fi +@@ -6913,7 +7844,7 @@ EOF + ;; + *) + # Add a -L argument. +- newdeplibs="$newdeplibs $a_deplib" ++ func_append newdeplibs " $a_deplib" + ;; + esac + done # Gone through all deplibs. +@@ -6929,20 +7860,20 @@ EOF + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + case " $predeps $postdeps " in + *" $a_deplib "*) +- newdeplibs="$newdeplibs $a_deplib" ++ func_append newdeplibs " $a_deplib" + a_deplib="" + ;; + esac + fi + if test -n "$a_deplib" ; then +- eval "libname=\"$libname_spec\"" ++ libname=`eval "\\$ECHO \"$libname_spec\""` + for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do + potential_libs=`ls $i/$libname[.-]* 2>/dev/null` + for potent_lib in $potential_libs; do + potlib="$potent_lib" # see symlink-check above in file_magic test + if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \ + $EGREP "$match_pattern_regex" > /dev/null; then +- newdeplibs="$newdeplibs $a_deplib" ++ func_append newdeplibs " $a_deplib" + a_deplib="" + break 2 + fi +@@ -6967,7 +7898,7 @@ EOF + ;; + *) + # Add a -L argument. +- newdeplibs="$newdeplibs $a_deplib" ++ func_append newdeplibs " $a_deplib" + ;; + esac + done # Gone through all deplibs. +@@ -7071,7 +8002,7 @@ EOF + *) + case " $deplibs " in + *" -L$path/$objdir "*) +- new_libs="$new_libs -L$path/$objdir" ;; ++ func_append new_libs " -L$path/$objdir" ;; + esac + ;; + esac +@@ -7081,10 +8012,10 @@ EOF + -L*) + case " $new_libs " in + *" $deplib "*) ;; +- *) new_libs="$new_libs $deplib" ;; ++ *) func_append new_libs " $deplib" ;; + esac + ;; +- *) new_libs="$new_libs $deplib" ;; ++ *) func_append new_libs " $deplib" ;; + esac + done + deplibs="$new_libs" +@@ -7101,10 +8032,12 @@ EOF + hardcode_libdirs= + dep_rpath= + rpath="$finalize_rpath" +- test "$mode" != relink && rpath="$compile_rpath$rpath" ++ test "$opt_mode" != relink && rpath="$compile_rpath$rpath" + for libdir in $rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then ++ func_replace_sysroot "$libdir" ++ libdir=$func_replace_sysroot_result + if test -z "$hardcode_libdirs"; then + hardcode_libdirs="$libdir" + else +@@ -7113,18 +8046,18 @@ EOF + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) +- hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ++ func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" + ;; + esac + fi + else +- eval "flag=\"$hardcode_libdir_flag_spec\"" +- dep_rpath="$dep_rpath $flag" ++ eval flag=\"$hardcode_libdir_flag_spec\" ++ func_append dep_rpath " $flag" + fi + elif test -n "$runpath_var"; then + case "$perm_rpath " in + *" $libdir "*) ;; +- *) perm_rpath="$perm_rpath $libdir" ;; ++ *) func_apped perm_rpath " $libdir" ;; + esac + fi + done +@@ -7133,40 +8066,38 @@ EOF + test -n "$hardcode_libdirs"; then + libdir="$hardcode_libdirs" + if test -n "$hardcode_libdir_flag_spec_ld"; then +- eval "dep_rpath=\"$hardcode_libdir_flag_spec_ld\"" ++ eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" + else +- eval "dep_rpath=\"$hardcode_libdir_flag_spec\"" ++ eval dep_rpath=\"$hardcode_libdir_flag_spec\" + fi + fi + if test -n "$runpath_var" && test -n "$perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $perm_rpath; do +- rpath="$rpath$dir:" ++ func_append rpath "$dir:" + done +- eval $runpath_var=\$rpath\$$runpath_var +- export $runpath_var ++ eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" + fi + test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" + fi + + shlibpath="$finalize_shlibpath" +- test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" ++ test "$opt_mode" != relink && shlibpath="$compile_shlibpath$shlibpath" + if test -n "$shlibpath"; then +- eval $shlibpath_var=\$shlibpath\$$shlibpath_var +- export $shlibpath_var ++ eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" + fi + + # Get the real and link names of the library. +- eval "shared_ext=\"$shrext_cmds\"" +- eval "library_names=\"$library_names_spec\"" ++ eval shared_ext=\"$shrext_cmds\" ++ eval library_names=\"$library_names_spec\" + set dummy $library_names + shift + realname="$1" + shift + + if test -n "$soname_spec"; then +- eval "soname=\"$soname_spec\"" ++ eval soname=\"$soname_spec\" + else + soname="$realname" + fi +@@ -7178,7 +8109,7 @@ EOF + linknames= + for link + do +- linknames="$linknames $link" ++ func_append linknames " $link" + done + + # Use standard objects if they are pic +@@ -7189,7 +8120,7 @@ EOF + if test -n "$export_symbols" && test -n "$include_expsyms"; then + $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" + export_symbols="$output_objdir/$libname.uexp" +- delfiles="$delfiles $export_symbols" ++ func_append delfiles " $export_symbols" + fi + + orig_export_symbols= +@@ -7220,13 +8151,45 @@ EOF + $opt_dry_run || $RM $export_symbols + cmds=$export_symbols_cmds + save_ifs="$IFS"; IFS='~' +- for cmd in $cmds; do ++ for cmd1 in $cmds; do + IFS="$save_ifs" +- eval "cmd=\"$cmd\"" +- func_len " $cmd" +- len=$func_len_result +- if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then ++ # Take the normal branch if the nm_file_list_spec branch ++ # doesn't work or if tool conversion is not needed. ++ case $nm_file_list_spec~$to_tool_file_cmd in ++ *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*) ++ try_normal_branch=yes ++ eval cmd=\"$cmd1\" ++ func_len " $cmd" ++ len=$func_len_result ++ ;; ++ *) ++ try_normal_branch=no ++ ;; ++ esac ++ if test "$try_normal_branch" = yes \ ++ && { test "$len" -lt "$max_cmd_len" \ ++ || test "$max_cmd_len" -le -1; } ++ then ++ func_show_eval "$cmd" 'exit $?' ++ skipped_export=false ++ elif test -n "$nm_file_list_spec"; then ++ func_basename "$output" ++ output_la=$func_basename_result ++ save_libobjs=$libobjs ++ save_output=$output ++ output=${output_objdir}/${output_la}.nm ++ func_to_tool_file "$output" ++ libobjs=$nm_file_list_spec$func_to_tool_file_result ++ func_append delfiles " $output" ++ func_verbose "creating $NM input file list: $output" ++ for obj in $save_libobjs; do ++ func_to_tool_file "$obj" ++ $ECHO "$func_to_tool_file_result" ++ done > "$output" ++ eval cmd=\"$cmd1\" + func_show_eval "$cmd" 'exit $?' ++ output=$save_output ++ libobjs=$save_libobjs + skipped_export=false + else + # The command line is too long to execute in one step. +@@ -7248,7 +8211,7 @@ EOF + if test -n "$export_symbols" && test -n "$include_expsyms"; then + tmp_export_symbols="$export_symbols" + test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" +- $opt_dry_run || $ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols" ++ $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' + fi + + if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then +@@ -7260,7 +8223,7 @@ EOF + # global variables. join(1) would be nice here, but unfortunately + # isn't a blessed tool. + $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter +- delfiles="$delfiles $export_symbols $output_objdir/$libname.filter" ++ func_append delfiles " $export_symbols $output_objdir/$libname.filter" + export_symbols=$output_objdir/$libname.def + $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols + fi +@@ -7270,7 +8233,7 @@ EOF + case " $convenience " in + *" $test_deplib "*) ;; + *) +- tmp_deplibs="$tmp_deplibs $test_deplib" ++ func_append tmp_deplibs " $test_deplib" + ;; + esac + done +@@ -7286,43 +8249,43 @@ EOF + fi + if test -n "$whole_archive_flag_spec"; then + save_libobjs=$libobjs +- eval "libobjs=\"\$libobjs $whole_archive_flag_spec\"" ++ eval libobjs=\"\$libobjs $whole_archive_flag_spec\" + test "X$libobjs" = "X " && libobjs= + else + gentop="$output_objdir/${outputname}x" +- generated="$generated $gentop" ++ func_append generated " $gentop" + + func_extract_archives $gentop $convenience +- libobjs="$libobjs $func_extract_archives_result" ++ func_append libobjs " $func_extract_archives_result" + test "X$libobjs" = "X " && libobjs= + fi + fi + + if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then +- eval "flag=\"$thread_safe_flag_spec\"" +- linker_flags="$linker_flags $flag" ++ eval flag=\"$thread_safe_flag_spec\" ++ func_append linker_flags " $flag" + fi + + # Make a backup of the uninstalled library when relinking +- if test "$mode" = relink; then +- $opt_dry_run || (cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U) || exit $? ++ if test "$opt_mode" = relink; then ++ $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? + fi + + # Do each of the archive commands. + if test "$module" = yes && test -n "$module_cmds" ; then + if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then +- eval "test_cmds=\"$module_expsym_cmds\"" ++ eval test_cmds=\"$module_expsym_cmds\" + cmds=$module_expsym_cmds + else +- eval "test_cmds=\"$module_cmds\"" ++ eval test_cmds=\"$module_cmds\" + cmds=$module_cmds + fi + else + if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then +- eval "test_cmds=\"$archive_expsym_cmds\"" ++ eval test_cmds=\"$archive_expsym_cmds\" + cmds=$archive_expsym_cmds + else +- eval "test_cmds=\"$archive_cmds\"" ++ eval test_cmds=\"$archive_cmds\" + cmds=$archive_cmds + fi + fi +@@ -7366,10 +8329,13 @@ EOF + echo 'INPUT (' > $output + for obj in $save_libobjs + do +- $ECHO "$obj" >> $output ++ func_to_tool_file "$obj" ++ $ECHO "$func_to_tool_file_result" >> $output + done + echo ')' >> $output +- delfiles="$delfiles $output" ++ func_append delfiles " $output" ++ func_to_tool_file "$output" ++ output=$func_to_tool_file_result + elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then + output=${output_objdir}/${output_la}.lnk + func_verbose "creating linker input file list: $output" +@@ -7383,15 +8349,17 @@ EOF + fi + for obj + do +- $ECHO "$obj" >> $output ++ func_to_tool_file "$obj" ++ $ECHO "$func_to_tool_file_result" >> $output + done +- delfiles="$delfiles $output" +- output=$firstobj\"$file_list_spec$output\" ++ func_append delfiles " $output" ++ func_to_tool_file "$output" ++ output=$firstobj\"$file_list_spec$func_to_tool_file_result\" + else + if test -n "$save_libobjs"; then + func_verbose "creating reloadable object files..." + output=$output_objdir/$output_la-${k}.$objext +- eval "test_cmds=\"$reload_cmds\"" ++ eval test_cmds=\"$reload_cmds\" + func_len " $test_cmds" + len0=$func_len_result + len=$len0 +@@ -7411,12 +8379,12 @@ EOF + if test "$k" -eq 1 ; then + # The first file doesn't have a previous command to add. + reload_objs=$objlist +- eval "concat_cmds=\"$reload_cmds\"" ++ eval concat_cmds=\"$reload_cmds\" + else + # All subsequent reloadable object files will link in + # the last one created. + reload_objs="$objlist $last_robj" +- eval "concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\"" ++ eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\" + fi + last_robj=$output_objdir/$output_la-${k}.$objext + func_arith $k + 1 +@@ -7433,11 +8401,11 @@ EOF + # files will link in the last one created. + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ + reload_objs="$objlist $last_robj" +- eval "concat_cmds=\"\${concat_cmds}$reload_cmds\"" ++ eval concat_cmds=\"\${concat_cmds}$reload_cmds\" + if test -n "$last_robj"; then +- eval "concat_cmds=\"\${concat_cmds}~\$RM $last_robj\"" ++ eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" + fi +- delfiles="$delfiles $output" ++ func_append delfiles " $output" + + else + output= +@@ -7450,9 +8418,9 @@ EOF + libobjs=$output + # Append the command to create the export file. + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ +- eval "concat_cmds=\"\$concat_cmds$export_symbols_cmds\"" ++ eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" + if test -n "$last_robj"; then +- eval "concat_cmds=\"\$concat_cmds~\$RM $last_robj\"" ++ eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" + fi + fi + +@@ -7471,7 +8439,7 @@ EOF + lt_exit=$? + + # Restore the uninstalled library and exit +- if test "$mode" = relink; then ++ if test "$opt_mode" = relink; then + ( cd "$output_objdir" && \ + $RM "${realname}T" && \ + $MV "${realname}U" "$realname" ) +@@ -7492,7 +8460,7 @@ EOF + if test -n "$export_symbols" && test -n "$include_expsyms"; then + tmp_export_symbols="$export_symbols" + test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" +- $opt_dry_run || $ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols" ++ $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' + fi + + if test -n "$orig_export_symbols"; then +@@ -7504,7 +8472,7 @@ EOF + # global variables. join(1) would be nice here, but unfortunately + # isn't a blessed tool. + $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter +- delfiles="$delfiles $export_symbols $output_objdir/$libname.filter" ++ func_append delfiles " $export_symbols $output_objdir/$libname.filter" + export_symbols=$output_objdir/$libname.def + $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols + fi +@@ -7515,7 +8483,7 @@ EOF + output=$save_output + + if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then +- eval "libobjs=\"\$libobjs $whole_archive_flag_spec\"" ++ eval libobjs=\"\$libobjs $whole_archive_flag_spec\" + test "X$libobjs" = "X " && libobjs= + fi + # Expand the library linking commands again to reset the +@@ -7539,23 +8507,23 @@ EOF + + if test -n "$delfiles"; then + # Append the command to remove temporary files to $cmds. +- eval "cmds=\"\$cmds~\$RM $delfiles\"" ++ eval cmds=\"\$cmds~\$RM $delfiles\" + fi + + # Add any objects from preloaded convenience libraries + if test -n "$dlprefiles"; then + gentop="$output_objdir/${outputname}x" +- generated="$generated $gentop" ++ func_append generated " $gentop" + + func_extract_archives $gentop $dlprefiles +- libobjs="$libobjs $func_extract_archives_result" ++ func_append libobjs " $func_extract_archives_result" + test "X$libobjs" = "X " && libobjs= + fi + + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" +- eval "cmd=\"$cmd\"" ++ eval cmd=\"$cmd\" + $opt_silent || { + func_quote_for_expand "$cmd" + eval "func_echo $func_quote_for_expand_result" +@@ -7564,7 +8532,7 @@ EOF + lt_exit=$? + + # Restore the uninstalled library and exit +- if test "$mode" = relink; then ++ if test "$opt_mode" = relink; then + ( cd "$output_objdir" && \ + $RM "${realname}T" && \ + $MV "${realname}U" "$realname" ) +@@ -7576,8 +8544,8 @@ EOF + IFS="$save_ifs" + + # Restore the uninstalled library and exit +- if test "$mode" = relink; then +- $opt_dry_run || (cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname) || exit $? ++ if test "$opt_mode" = relink; then ++ $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? + + if test -n "$convenience"; then + if test -z "$whole_archive_flag_spec"; then +@@ -7656,17 +8624,20 @@ EOF + + if test -n "$convenience"; then + if test -n "$whole_archive_flag_spec"; then +- eval "tmp_whole_archive_flags=\"$whole_archive_flag_spec\"" ++ eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" + reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` + else + gentop="$output_objdir/${obj}x" +- generated="$generated $gentop" ++ func_append generated " $gentop" + + func_extract_archives $gentop $convenience + reload_conv_objs="$reload_objs $func_extract_archives_result" + fi + fi + ++ # If we're not building shared, we need to use non_pic_objs ++ test "$build_libtool_libs" != yes && libobjs="$non_pic_objects" ++ + # Create the old-style object. + reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test + +@@ -7690,7 +8661,7 @@ EOF + # Create an invalid libtool object if no PIC, so that we don't + # accidentally link it into a program. + # $show "echo timestamp > $libobj" +- # $opt_dry_run || echo timestamp > $libobj || exit $? ++ # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? + exit $EXIT_SUCCESS + fi + +@@ -7740,8 +8711,8 @@ EOF + if test "$tagname" = CXX ; then + case ${MACOSX_DEPLOYMENT_TARGET-10.0} in + 10.[0123]) +- compile_command="$compile_command ${wl}-bind_at_load" +- finalize_command="$finalize_command ${wl}-bind_at_load" ++ func_append compile_command " ${wl}-bind_at_load" ++ func_append finalize_command " ${wl}-bind_at_load" + ;; + esac + fi +@@ -7761,7 +8732,7 @@ EOF + *) + case " $compile_deplibs " in + *" -L$path/$objdir "*) +- new_libs="$new_libs -L$path/$objdir" ;; ++ func_append new_libs " -L$path/$objdir" ;; + esac + ;; + esac +@@ -7771,17 +8742,17 @@ EOF + -L*) + case " $new_libs " in + *" $deplib "*) ;; +- *) new_libs="$new_libs $deplib" ;; ++ *) func_append new_libs " $deplib" ;; + esac + ;; +- *) new_libs="$new_libs $deplib" ;; ++ *) func_append new_libs " $deplib" ;; + esac + done + compile_deplibs="$new_libs" + + +- compile_command="$compile_command $compile_deplibs" +- finalize_command="$finalize_command $finalize_deplibs" ++ func_append compile_command " $compile_deplibs" ++ func_append finalize_command " $finalize_deplibs" + + if test -n "$rpath$xrpath"; then + # If the user specified any rpath flags, then add them. +@@ -7789,7 +8760,7 @@ EOF + # This is the magic to use -rpath. + case "$finalize_rpath " in + *" $libdir "*) ;; +- *) finalize_rpath="$finalize_rpath $libdir" ;; ++ *) func_append finalize_rpath " $libdir" ;; + esac + done + fi +@@ -7808,18 +8779,18 @@ EOF + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) +- hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ++ func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" + ;; + esac + fi + else +- eval "flag=\"$hardcode_libdir_flag_spec\"" +- rpath="$rpath $flag" ++ eval flag=\"$hardcode_libdir_flag_spec\" ++ func_append rpath " $flag" + fi + elif test -n "$runpath_var"; then + case "$perm_rpath " in + *" $libdir "*) ;; +- *) perm_rpath="$perm_rpath $libdir" ;; ++ *) func_append perm_rpath " $libdir" ;; + esac + fi + case $host in +@@ -7828,12 +8799,12 @@ EOF + case :$dllsearchpath: in + *":$libdir:"*) ;; + ::) dllsearchpath=$libdir;; +- *) dllsearchpath="$dllsearchpath:$libdir";; ++ *) func_append dllsearchpath ":$libdir";; + esac + case :$dllsearchpath: in + *":$testbindir:"*) ;; + ::) dllsearchpath=$testbindir;; +- *) dllsearchpath="$dllsearchpath:$testbindir";; ++ *) func_append dllsearchpath ":$testbindir";; + esac + ;; + esac +@@ -7842,7 +8813,7 @@ EOF + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir="$hardcode_libdirs" +- eval "rpath=\" $hardcode_libdir_flag_spec\"" ++ eval rpath=\" $hardcode_libdir_flag_spec\" + fi + compile_rpath="$rpath" + +@@ -7859,18 +8830,18 @@ EOF + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) +- hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ++ func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" + ;; + esac + fi + else +- eval "flag=\"$hardcode_libdir_flag_spec\"" +- rpath="$rpath $flag" ++ eval flag=\"$hardcode_libdir_flag_spec\" ++ func_append rpath " $flag" + fi + elif test -n "$runpath_var"; then + case "$finalize_perm_rpath " in + *" $libdir "*) ;; +- *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; ++ *) func_append finalize_perm_rpath " $libdir" ;; + esac + fi + done +@@ -7878,7 +8849,7 @@ EOF + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir="$hardcode_libdirs" +- eval "rpath=\" $hardcode_libdir_flag_spec\"" ++ eval rpath=\" $hardcode_libdir_flag_spec\" + fi + finalize_rpath="$rpath" + +@@ -7921,6 +8892,12 @@ EOF + exit_status=0 + func_show_eval "$link_command" 'exit_status=$?' + ++ if test -n "$postlink_cmds"; then ++ func_to_tool_file "$output" ++ postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` ++ func_execute_cmds "$postlink_cmds" 'exit $?' ++ fi ++ + # Delete the generated files. + if test -f "$output_objdir/${outputname}S.${objext}"; then + func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"' +@@ -7943,7 +8920,7 @@ EOF + # We should set the runpath_var. + rpath= + for dir in $perm_rpath; do +- rpath="$rpath$dir:" ++ func_append rpath "$dir:" + done + compile_var="$runpath_var=\"$rpath\$$runpath_var\" " + fi +@@ -7951,7 +8928,7 @@ EOF + # We should set the runpath_var. + rpath= + for dir in $finalize_perm_rpath; do +- rpath="$rpath$dir:" ++ func_append rpath "$dir:" + done + finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " + fi +@@ -7966,6 +8943,13 @@ EOF + $opt_dry_run || $RM $output + # Link the executable and exit + func_show_eval "$link_command" 'exit $?' ++ ++ if test -n "$postlink_cmds"; then ++ func_to_tool_file "$output" ++ postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` ++ func_execute_cmds "$postlink_cmds" 'exit $?' ++ fi ++ + exit $EXIT_SUCCESS + fi + +@@ -7999,6 +8983,12 @@ EOF + + func_show_eval "$link_command" 'exit $?' + ++ if test -n "$postlink_cmds"; then ++ func_to_tool_file "$output_objdir/$outputname" ++ postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` ++ func_execute_cmds "$postlink_cmds" 'exit $?' ++ fi ++ + # Now create the wrapper script. + func_verbose "creating $output" + +@@ -8096,7 +9086,7 @@ EOF + else + oldobjs="$old_deplibs $non_pic_objects" + if test "$preload" = yes && test -f "$symfileobj"; then +- oldobjs="$oldobjs $symfileobj" ++ func_append oldobjs " $symfileobj" + fi + fi + addlibs="$old_convenience" +@@ -8104,10 +9094,10 @@ EOF + + if test -n "$addlibs"; then + gentop="$output_objdir/${outputname}x" +- generated="$generated $gentop" ++ func_append generated " $gentop" + + func_extract_archives $gentop $addlibs +- oldobjs="$oldobjs $func_extract_archives_result" ++ func_append oldobjs " $func_extract_archives_result" + fi + + # Do each command in the archive commands. +@@ -8118,10 +9108,10 @@ EOF + # Add any objects from preloaded convenience libraries + if test -n "$dlprefiles"; then + gentop="$output_objdir/${outputname}x" +- generated="$generated $gentop" ++ func_append generated " $gentop" + + func_extract_archives $gentop $dlprefiles +- oldobjs="$oldobjs $func_extract_archives_result" ++ func_append oldobjs " $func_extract_archives_result" + fi + + # POSIX demands no paths to be encoded in archives. We have +@@ -8139,7 +9129,7 @@ EOF + else + echo "copying selected object files to avoid basename conflicts..." + gentop="$output_objdir/${outputname}x" +- generated="$generated $gentop" ++ func_append generated " $gentop" + func_mkdir_p "$gentop" + save_oldobjs=$oldobjs + oldobjs= +@@ -8163,18 +9153,28 @@ EOF + esac + done + func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" +- oldobjs="$oldobjs $gentop/$newobj" ++ func_append oldobjs " $gentop/$newobj" + ;; +- *) oldobjs="$oldobjs $obj" ;; ++ *) func_append oldobjs " $obj" ;; + esac + done + fi +- eval "cmds=\"$old_archive_cmds\"" ++ eval cmds=\"$old_archive_cmds\" + + func_len " $cmds" + len=$func_len_result + if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then + cmds=$old_archive_cmds ++ elif test -n "$archiver_list_spec"; then ++ func_verbose "using command file archive linking..." ++ for obj in $oldobjs ++ do ++ func_to_tool_file "$obj" ++ $ECHO "$func_to_tool_file_result" ++ done > $output_objdir/$libname.libcmd ++ func_to_tool_file "$output_objdir/$libname.libcmd" ++ oldobjs=" $archiver_list_spec$func_to_tool_file_result" ++ cmds=$old_archive_cmds + else + # the command line is too long to link in one step, link in parts + func_verbose "using piecewise archive linking..." +@@ -8189,7 +9189,7 @@ EOF + do + last_oldobj=$obj + done +- eval "test_cmds=\"$old_archive_cmds\"" ++ eval test_cmds=\"$old_archive_cmds\" + func_len " $test_cmds" + len0=$func_len_result + len=$len0 +@@ -8208,7 +9208,7 @@ EOF + RANLIB=$save_RANLIB + fi + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ +- eval "concat_cmds=\"\${concat_cmds}$old_archive_cmds\"" ++ eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" + objlist= + len=$len0 + fi +@@ -8216,9 +9216,9 @@ EOF + RANLIB=$save_RANLIB + oldobjs=$objlist + if test "X$oldobjs" = "X" ; then +- eval "cmds=\"\$concat_cmds\"" ++ eval cmds=\"\$concat_cmds\" + else +- eval "cmds=\"\$concat_cmds~\$old_archive_cmds\"" ++ eval cmds=\"\$concat_cmds~\$old_archive_cmds\" + fi + fi + fi +@@ -8268,12 +9268,23 @@ EOF + *.la) + func_basename "$deplib" + name="$func_basename_result" +- libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` ++ func_resolve_sysroot "$deplib" ++ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` + test -z "$libdir" && \ + func_fatal_error "\`$deplib' is not a valid libtool archive" +- newdependency_libs="$newdependency_libs $libdir/$name" ++ func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" ++ ;; ++ -L*) ++ func_stripname -L '' "$deplib" ++ func_replace_sysroot "$func_stripname_result" ++ func_append newdependency_libs " -L$func_replace_sysroot_result" + ;; +- *) newdependency_libs="$newdependency_libs $deplib" ;; ++ -R*) ++ func_stripname -R '' "$deplib" ++ func_replace_sysroot "$func_stripname_result" ++ func_append newdependency_libs " -R$func_replace_sysroot_result" ++ ;; ++ *) func_append newdependency_libs " $deplib" ;; + esac + done + dependency_libs="$newdependency_libs" +@@ -8284,12 +9295,14 @@ EOF + *.la) + func_basename "$lib" + name="$func_basename_result" +- libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` ++ func_resolve_sysroot "$lib" ++ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` ++ + test -z "$libdir" && \ + func_fatal_error "\`$lib' is not a valid libtool archive" +- newdlfiles="$newdlfiles $libdir/$name" ++ func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name" + ;; +- *) newdlfiles="$newdlfiles $lib" ;; ++ *) func_append newdlfiles " $lib" ;; + esac + done + dlfiles="$newdlfiles" +@@ -8303,10 +9316,11 @@ EOF + # the library: + func_basename "$lib" + name="$func_basename_result" +- libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` ++ func_resolve_sysroot "$lib" ++ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` + test -z "$libdir" && \ + func_fatal_error "\`$lib' is not a valid libtool archive" +- newdlprefiles="$newdlprefiles $libdir/$name" ++ func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name" + ;; + esac + done +@@ -8318,7 +9332,7 @@ EOF + [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; + *) abs=`pwd`"/$lib" ;; + esac +- newdlfiles="$newdlfiles $abs" ++ func_append newdlfiles " $abs" + done + dlfiles="$newdlfiles" + newdlprefiles= +@@ -8327,7 +9341,7 @@ EOF + [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; + *) abs=`pwd`"/$lib" ;; + esac +- newdlprefiles="$newdlprefiles $abs" ++ func_append newdlprefiles " $abs" + done + dlprefiles="$newdlprefiles" + fi +@@ -8412,7 +9426,7 @@ relink_command=\"$relink_command\"" + exit $EXIT_SUCCESS + } + +-{ test "$mode" = link || test "$mode" = relink; } && ++{ test "$opt_mode" = link || test "$opt_mode" = relink; } && + func_mode_link ${1+"$@"} + + +@@ -8432,9 +9446,9 @@ func_mode_uninstall () + for arg + do + case $arg in +- -f) RM="$RM $arg"; rmforce=yes ;; +- -*) RM="$RM $arg" ;; +- *) files="$files $arg" ;; ++ -f) func_append RM " $arg"; rmforce=yes ;; ++ -*) func_append RM " $arg" ;; ++ *) func_append files " $arg" ;; + esac + done + +@@ -8443,24 +9457,23 @@ func_mode_uninstall () + + rmdirs= + +- origobjdir="$objdir" + for file in $files; do + func_dirname "$file" "" "." + dir="$func_dirname_result" + if test "X$dir" = X.; then +- objdir="$origobjdir" ++ odir="$objdir" + else +- objdir="$dir/$origobjdir" ++ odir="$dir/$objdir" + fi + func_basename "$file" + name="$func_basename_result" +- test "$mode" = uninstall && objdir="$dir" ++ test "$opt_mode" = uninstall && odir="$dir" + +- # Remember objdir for removal later, being careful to avoid duplicates +- if test "$mode" = clean; then ++ # Remember odir for removal later, being careful to avoid duplicates ++ if test "$opt_mode" = clean; then + case " $rmdirs " in +- *" $objdir "*) ;; +- *) rmdirs="$rmdirs $objdir" ;; ++ *" $odir "*) ;; ++ *) func_append rmdirs " $odir" ;; + esac + fi + +@@ -8486,18 +9499,17 @@ func_mode_uninstall () + + # Delete the libtool libraries and symlinks. + for n in $library_names; do +- rmfiles="$rmfiles $objdir/$n" ++ func_append rmfiles " $odir/$n" + done +- test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" ++ test -n "$old_library" && func_append rmfiles " $odir/$old_library" + +- case "$mode" in ++ case "$opt_mode" in + clean) +- case " $library_names " in +- # " " in the beginning catches empty $dlname ++ case " $library_names " in + *" $dlname "*) ;; +- *) rmfiles="$rmfiles $objdir/$dlname" ;; ++ *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;; + esac +- test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" ++ test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i" + ;; + uninstall) + if test -n "$library_names"; then +@@ -8525,19 +9537,19 @@ func_mode_uninstall () + # Add PIC object to the list of files to remove. + if test -n "$pic_object" && + test "$pic_object" != none; then +- rmfiles="$rmfiles $dir/$pic_object" ++ func_append rmfiles " $dir/$pic_object" + fi + + # Add non-PIC object to the list of files to remove. + if test -n "$non_pic_object" && + test "$non_pic_object" != none; then +- rmfiles="$rmfiles $dir/$non_pic_object" ++ func_append rmfiles " $dir/$non_pic_object" + fi + fi + ;; + + *) +- if test "$mode" = clean ; then ++ if test "$opt_mode" = clean ; then + noexename=$name + case $file in + *.exe) +@@ -8547,7 +9559,7 @@ func_mode_uninstall () + noexename=$func_stripname_result + # $file with .exe has already been added to rmfiles, + # add $file without .exe +- rmfiles="$rmfiles $file" ++ func_append rmfiles " $file" + ;; + esac + # Do a test to see if this is a libtool program. +@@ -8556,7 +9568,7 @@ func_mode_uninstall () + func_ltwrapper_scriptname "$file" + relink_command= + func_source $func_ltwrapper_scriptname_result +- rmfiles="$rmfiles $func_ltwrapper_scriptname_result" ++ func_append rmfiles " $func_ltwrapper_scriptname_result" + else + relink_command= + func_source $dir/$noexename +@@ -8564,12 +9576,12 @@ func_mode_uninstall () + + # note $name still contains .exe if it was in $file originally + # as does the version of $file that was added into $rmfiles +- rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" ++ func_append rmfiles " $odir/$name $odir/${name}S.${objext}" + if test "$fast_install" = yes && test -n "$relink_command"; then +- rmfiles="$rmfiles $objdir/lt-$name" ++ func_append rmfiles " $odir/lt-$name" + fi + if test "X$noexename" != "X$name" ; then +- rmfiles="$rmfiles $objdir/lt-${noexename}.c" ++ func_append rmfiles " $odir/lt-${noexename}.c" + fi + fi + fi +@@ -8577,7 +9589,6 @@ func_mode_uninstall () + esac + func_show_eval "$RM $rmfiles" 'exit_status=1' + done +- objdir="$origobjdir" + + # Try to remove the ${objdir}s in the directories where we deleted files + for dir in $rmdirs; do +@@ -8589,16 +9600,16 @@ func_mode_uninstall () + exit $exit_status + } + +-{ test "$mode" = uninstall || test "$mode" = clean; } && ++{ test "$opt_mode" = uninstall || test "$opt_mode" = clean; } && + func_mode_uninstall ${1+"$@"} + +-test -z "$mode" && { ++test -z "$opt_mode" && { + help="$generic_help" + func_fatal_help "you must specify a MODE" + } + + test -z "$exec_cmd" && \ +- func_fatal_help "invalid operation mode \`$mode'" ++ func_fatal_help "invalid operation mode \`$opt_mode'" + + if test -n "$exec_cmd"; then + eval exec "$exec_cmd" +Index: binutils-2.21.1/ltoptions.m4 +=================================================================== +--- binutils-2.21.1.orig/ltoptions.m4 ++++ binutils-2.21.1/ltoptions.m4 +@@ -8,7 +8,7 @@ + # unlimited permission to copy and/or distribute it, with or without + # modifications, as long as this notice is preserved. + +-# serial 6 ltoptions.m4 ++# serial 7 ltoptions.m4 + + # This is to help aclocal find these macros, as it can't see m4_define. + AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) +Index: binutils-2.21.1/ltversion.m4 +=================================================================== +--- binutils-2.21.1.orig/ltversion.m4 ++++ binutils-2.21.1/ltversion.m4 +@@ -7,17 +7,17 @@ + # unlimited permission to copy and/or distribute it, with or without + # modifications, as long as this notice is preserved. + +-# Generated from ltversion.in. ++# @configure_input@ + +-# serial 3134 ltversion.m4 ++# serial 3293 ltversion.m4 + # This file is part of GNU Libtool + +-m4_define([LT_PACKAGE_VERSION], [2.2.7a]) +-m4_define([LT_PACKAGE_REVISION], [1.3134]) ++m4_define([LT_PACKAGE_VERSION], [2.4]) ++m4_define([LT_PACKAGE_REVISION], [1.3293]) + + AC_DEFUN([LTVERSION_VERSION], +-[macro_version='2.2.7a' +-macro_revision='1.3134' ++[macro_version='2.4' ++macro_revision='1.3293' + _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) + _LT_DECL(, macro_revision, 0) + ]) +Index: binutils-2.21.1/lt~obsolete.m4 +=================================================================== +--- binutils-2.21.1.orig/lt~obsolete.m4 ++++ binutils-2.21.1/lt~obsolete.m4 +@@ -7,7 +7,7 @@ + # unlimited permission to copy and/or distribute it, with or without + # modifications, as long as this notice is preserved. + +-# serial 4 lt~obsolete.m4 ++# serial 5 lt~obsolete.m4 + + # These exist entirely to fool aclocal when bootstrapping libtool. + # +Index: binutils-2.21.1/configure +=================================================================== +--- binutils-2.21.1.orig/configure ++++ binutils-2.21.1/configure +@@ -2670,7 +2670,7 @@ host_libs="intl mmalloc libiberty opcode + # binutils, gas and ld appear in that order because it makes sense to run + # "make check" in that particular order. + # If --enable-gold is used, "gold" may replace "ld". +-host_tools="texinfo byacc flex bison binutils gas ld fixincludes gcc cgen sid sim gdb make patch prms send-pr gprof etc expect dejagnu ash bash bzip2 m4 autoconf automake libtool diff rcs fileutils shellutils time textutils wdiff find uudecode hello tar gzip indent recode release sed utils guile perl gawk findutils gettext zip fastjar gnattools" ++host_tools="byacc flex bison binutils gas ld fixincludes gcc cgen sid sim gdb make patch prms send-pr gprof etc expect dejagnu ash bash bzip2 m4 autoconf automake libtool diff rcs fileutils shellutils time textutils wdiff find uudecode hello tar gzip indent recode release sed utils guile perl gawk findutils gettext zip fastjar gnattools" + + # libgcj represents the runtime libraries only used by gcj. + libgcj="target-libffi \ +@@ -7597,7 +7597,7 @@ case " $build_configdirs " in + # For an installed makeinfo, we require it to be from texinfo 4.7 or + # higher, else we use the "missing" dummy. + if ${MAKEINFO} --version \ +- | egrep 'texinfo[^0-9]*(4\.([7-9]|[1-9][0-9])|[5-9]|[1-9][0-9])' >/dev/null 2>&1; then ++ | egrep 'texinfo[^0-9]*([1-3][0-9]|4.[4-9]|4.[1-9][0-9]+|[5-9])' >/dev/null 2>&1; then + : + else + MAKEINFO="$MISSING makeinfo" +Index: binutils-2.21.1/bfd/configure +=================================================================== +--- binutils-2.21.1.orig/bfd/configure ++++ binutils-2.21.1/bfd/configure +@@ -667,6 +667,9 @@ OTOOL + LIPO + NMEDIT + DSYMUTIL ++MANIFEST_TOOL ++ac_ct_AR ++DLLTOOL + OBJDUMP + LN_S + NM +@@ -779,6 +782,7 @@ enable_static + with_pic + enable_fast_install + with_gnu_ld ++with_libtool_sysroot + enable_libtool_lock + enable_plugins + enable_largefile +@@ -1453,6 +1457,8 @@ Optional Packages: + --with-pic try to use only PIC/non-PIC objects [default=use + both] + --with-gnu-ld assume the C compiler uses GNU ld [default=no] ++ --with-libtool-sysroot=DIR Search for dependent libraries within DIR ++ (or the compiler's sysroot if not specified). + --with-mmap try using mmap for BFD input files if available + --with-separate-debug-dir=DIR + Look for global separate debug info in DIR +@@ -5383,8 +5389,8 @@ esac + + + +-macro_version='2.2.7a' +-macro_revision='1.3134' ++macro_version='2.4' ++macro_revision='1.3293' + + + +@@ -5424,7 +5430,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 + $as_echo_n "checking how to print strings... " >&6; } + # Test print first, because it will be a builtin if present. +-if test "X`print -r -- -n 2>/dev/null`" = X-n && \ ++if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ + test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='print -r --' + elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then +@@ -6110,8 +6116,8 @@ $as_echo_n "checking whether the shell u + # Try some XSI features + xsi_shell=no + ( _lt_dummy="a/b/c" +- test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ +- = c,a/b,, \ ++ test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ ++ = c,a/b,b/c, \ + && eval 'test $(( 1 + 1 )) -eq 2 \ + && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ + && xsi_shell=yes +@@ -6160,6 +6166,80 @@ esac + + + ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 ++$as_echo_n "checking how to convert $build file names to $host format... " >&6; } ++if test "${lt_cv_to_host_file_cmd+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ case $host in ++ *-*-mingw* ) ++ case $build in ++ *-*-mingw* ) # actually msys ++ lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ++ ;; ++ *-*-cygwin* ) ++ lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ++ ;; ++ * ) # otherwise, assume *nix ++ lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ++ ;; ++ esac ++ ;; ++ *-*-cygwin* ) ++ case $build in ++ *-*-mingw* ) # actually msys ++ lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ++ ;; ++ *-*-cygwin* ) ++ lt_cv_to_host_file_cmd=func_convert_file_noop ++ ;; ++ * ) # otherwise, assume *nix ++ lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ++ ;; ++ esac ++ ;; ++ * ) # unhandled hosts (and "normal" native builds) ++ lt_cv_to_host_file_cmd=func_convert_file_noop ++ ;; ++esac ++ ++fi ++ ++to_host_file_cmd=$lt_cv_to_host_file_cmd ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 ++$as_echo "$lt_cv_to_host_file_cmd" >&6; } ++ ++ ++ ++ ++ ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 ++$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } ++if test "${lt_cv_to_tool_file_cmd+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ #assume ordinary cross tools, or native build. ++lt_cv_to_tool_file_cmd=func_convert_file_noop ++case $host in ++ *-*-mingw* ) ++ case $build in ++ *-*-mingw* ) # actually msys ++ lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ++ ;; ++ esac ++ ;; ++esac ++ ++fi ++ ++to_tool_file_cmd=$lt_cv_to_tool_file_cmd ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 ++$as_echo "$lt_cv_to_tool_file_cmd" >&6; } ++ ++ ++ ++ ++ + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 + $as_echo_n "checking for $LD option to reload object files... " >&6; } + if test "${lt_cv_ld_reload_flag+set}" = set; then : +@@ -6176,6 +6256,11 @@ case $reload_flag in + esac + reload_cmds='$LD$reload_flag -o $output$reload_objs' + case $host_os in ++ cygwin* | mingw* | pw32* | cegcc*) ++ if test "$GCC" != yes; then ++ reload_cmds=false ++ fi ++ ;; + darwin*) + if test "$GCC" = yes; then + reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' +@@ -6344,7 +6429,8 @@ mingw* | pw32*) + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + else +- lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' ++ # Keep this pattern in sync with the one in func_win32_libid. ++ lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' + lt_cv_file_magic_cmd='$OBJDUMP -f' + fi + ;; +@@ -6498,6 +6584,21 @@ esac + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 + $as_echo "$lt_cv_deplibs_check_method" >&6; } ++ ++file_magic_glob= ++want_nocaseglob=no ++if test "$build" = "$host"; then ++ case $host_os in ++ mingw* | pw32*) ++ if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then ++ want_nocaseglob=yes ++ else ++ file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` ++ fi ++ ;; ++ esac ++fi ++ + file_magic_cmd=$lt_cv_file_magic_cmd + deplibs_check_method=$lt_cv_deplibs_check_method + test -z "$deplibs_check_method" && deplibs_check_method=unknown +@@ -6513,9 +6614,162 @@ test -z "$deplibs_check_method" && depli + + + ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + if test -n "$ac_tool_prefix"; then +- # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. +-set dummy ${ac_tool_prefix}ar; ac_word=$2 ++ # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. ++set dummy ${ac_tool_prefix}dlltool; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if test "${ac_cv_prog_DLLTOOL+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test -n "$DLLTOOL"; then ++ ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ++ ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++ done ++IFS=$as_save_IFS ++ ++fi ++fi ++DLLTOOL=$ac_cv_prog_DLLTOOL ++if test -n "$DLLTOOL"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 ++$as_echo "$DLLTOOL" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++fi ++ ++ ++fi ++if test -z "$ac_cv_prog_DLLTOOL"; then ++ ac_ct_DLLTOOL=$DLLTOOL ++ # Extract the first word of "dlltool", so it can be a program name with args. ++set dummy dlltool; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test -n "$ac_ct_DLLTOOL"; then ++ ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ++ ac_cv_prog_ac_ct_DLLTOOL="dlltool" ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++ done ++IFS=$as_save_IFS ++ ++fi ++fi ++ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL ++if test -n "$ac_ct_DLLTOOL"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 ++$as_echo "$ac_ct_DLLTOOL" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++fi ++ ++ if test "x$ac_ct_DLLTOOL" = x; then ++ DLLTOOL="false" ++ else ++ case $cross_compiling:$ac_tool_warned in ++yes:) ++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 ++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ++ac_tool_warned=yes ;; ++esac ++ DLLTOOL=$ac_ct_DLLTOOL ++ fi ++else ++ DLLTOOL="$ac_cv_prog_DLLTOOL" ++fi ++ ++test -z "$DLLTOOL" && DLLTOOL=dlltool ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 ++$as_echo_n "checking how to associate runtime and link libraries... " >&6; } ++if test "${lt_cv_sharedlib_from_linklib_cmd+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ lt_cv_sharedlib_from_linklib_cmd='unknown' ++ ++case $host_os in ++cygwin* | mingw* | pw32* | cegcc*) ++ # two different shell functions defined in ltmain.sh ++ # decide which to use based on capabilities of $DLLTOOL ++ case `$DLLTOOL --help 2>&1` in ++ *--identify-strict*) ++ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ++ ;; ++ *) ++ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ++ ;; ++ esac ++ ;; ++*) ++ # fallback: assume linklib IS sharedlib ++ lt_cv_sharedlib_from_linklib_cmd="$ECHO" ++ ;; ++esac ++ ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 ++$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } ++sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd ++test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO ++ ++ ++ ++ ++ ++ ++ ++if test -n "$ac_tool_prefix"; then ++ for ac_prog in ar ++ do ++ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. ++set dummy $ac_tool_prefix$ac_prog; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } + if test "${ac_cv_prog_AR+set}" = set; then : +@@ -6531,7 +6785,7 @@ do + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then +- ac_cv_prog_AR="${ac_tool_prefix}ar" ++ ac_cv_prog_AR="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +@@ -6551,11 +6805,15 @@ $as_echo "no" >&6; } + fi + + ++ test -n "$AR" && break ++ done + fi +-if test -z "$ac_cv_prog_AR"; then ++if test -z "$AR"; then + ac_ct_AR=$AR +- # Extract the first word of "ar", so it can be a program name with args. +-set dummy ar; ac_word=$2 ++ for ac_prog in ar ++do ++ # Extract the first word of "$ac_prog", so it can be a program name with args. ++set dummy $ac_prog; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } + if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : +@@ -6571,7 +6829,7 @@ do + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then +- ac_cv_prog_ac_ct_AR="ar" ++ ac_cv_prog_ac_ct_AR="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +@@ -6590,6 +6848,10 @@ else + $as_echo "no" >&6; } + fi + ++ ++ test -n "$ac_ct_AR" && break ++done ++ + if test "x$ac_ct_AR" = x; then + AR="false" + else +@@ -6601,16 +6863,72 @@ ac_tool_warned=yes ;; + esac + AR=$ac_ct_AR + fi +-else +- AR="$ac_cv_prog_AR" + fi + +-test -z "$AR" && AR=ar +-test -z "$AR_FLAGS" && AR_FLAGS=cru ++: ${AR=ar} ++: ${AR_FLAGS=cru} ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 ++$as_echo_n "checking for archiver @FILE support... " >&6; } ++if test "${lt_cv_ar_at_file+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ lt_cv_ar_at_file=no ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ + ++int ++main () ++{ + ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : ++ echo conftest.$ac_objext > conftest.lst ++ lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' ++ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 ++ (eval $lt_ar_try) 2>&5 ++ ac_status=$? ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; } ++ if test "$ac_status" -eq 0; then ++ # Ensure the archiver fails upon bogus file names. ++ rm -f conftest.$ac_objext libconftest.a ++ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 ++ (eval $lt_ar_try) 2>&5 ++ ac_status=$? ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; } ++ if test "$ac_status" -ne 0; then ++ lt_cv_ar_at_file=@ ++ fi ++ fi ++ rm -f conftest.* libconftest.a + ++fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 ++$as_echo "$lt_cv_ar_at_file" >&6; } ++ ++if test "x$lt_cv_ar_at_file" = xno; then ++ archiver_list_spec= ++else ++ archiver_list_spec=$lt_cv_ar_at_file ++fi + + + +@@ -6952,8 +7270,8 @@ esac + lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + + # Transform an extracted symbol line into symbol name and symbol address +-lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" +-lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" ++lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" ++lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" + + # Handle CRLF in mingw tool chain + opt_cr= +@@ -6989,6 +7307,7 @@ for ac_symprfx in "" "_"; do + else + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + fi ++ lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" + + # Check to see that the pipe works correctly. + pipe_works=no +@@ -7030,6 +7349,18 @@ _LT_EOF + if $GREP ' nm_test_var$' "$nlist" >/dev/null; then + if $GREP ' nm_test_func$' "$nlist" >/dev/null; then + cat <<_LT_EOF > conftest.$ac_ext ++/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ ++#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) ++/* DATA imports from DLLs on WIN32 con't be const, because runtime ++ relocations are performed -- see ld's documentation on pseudo-relocs. */ ++# define LT_DLSYM_CONST ++#elif defined(__osf__) ++/* This system does not cope well with relocations in const data. */ ++# define LT_DLSYM_CONST ++#else ++# define LT_DLSYM_CONST const ++#endif ++ + #ifdef __cplusplus + extern "C" { + #endif +@@ -7041,7 +7372,7 @@ _LT_EOF + cat <<_LT_EOF >> conftest.$ac_ext + + /* The mapping between symbol names and symbols. */ +-const struct { ++LT_DLSYM_CONST struct { + const char *name; + void *address; + } +@@ -7067,8 +7398,8 @@ static const void *lt_preloaded_setup() + _LT_EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext +- lt_save_LIBS="$LIBS" +- lt_save_CFLAGS="$CFLAGS" ++ lt_globsym_save_LIBS=$LIBS ++ lt_globsym_save_CFLAGS=$CFLAGS + LIBS="conftstm.$ac_objext" + CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 +@@ -7078,8 +7409,8 @@ _LT_EOF + test $ac_status = 0; } && test -s conftest${ac_exeext}; then + pipe_works=yes + fi +- LIBS="$lt_save_LIBS" +- CFLAGS="$lt_save_CFLAGS" ++ LIBS=$lt_globsym_save_LIBS ++ CFLAGS=$lt_globsym_save_CFLAGS + else + echo "cannot find nm_test_func in $nlist" >&5 + fi +@@ -7116,6 +7447,20 @@ else + $as_echo "ok" >&6; } + fi + ++# Response file support. ++if test "$lt_cv_nm_interface" = "MS dumpbin"; then ++ nm_file_list_spec='@' ++elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then ++ nm_file_list_spec='@' ++fi ++ ++ ++ ++ ++ ++ ++ ++ + + + +@@ -7135,6 +7480,41 @@ fi + + + ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 ++$as_echo_n "checking for sysroot... " >&6; } ++ ++# Check whether --with-libtool-sysroot was given. ++if test "${with_libtool_sysroot+set}" = set; then : ++ withval=$with_libtool_sysroot; ++else ++ with_libtool_sysroot=no ++fi ++ ++ ++lt_sysroot= ++case ${with_libtool_sysroot} in #( ++ yes) ++ if test "$GCC" = yes; then ++ lt_sysroot=`$CC --print-sysroot 2>/dev/null` ++ fi ++ ;; #( ++ /*) ++ lt_sysroot=`echo "$with_libtool_sysroot" | sed -e "$sed_quote_subst"` ++ ;; #( ++ no|'') ++ ;; #( ++ *) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libtool_sysroot}" >&5 ++$as_echo "${with_libtool_sysroot}" >&6; } ++ as_fn_error "The sysroot must be an absolute path." "$LINENO" 5 ++ ;; ++esac ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 ++$as_echo "${lt_sysroot:-no}" >&6; } ++ ++ ++ + + + # Check whether --enable-libtool-lock was given. +@@ -7330,6 +7710,123 @@ esac + + need_locks="$enable_libtool_lock" + ++if test -n "$ac_tool_prefix"; then ++ # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. ++set dummy ${ac_tool_prefix}mt; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if test "${ac_cv_prog_MANIFEST_TOOL+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test -n "$MANIFEST_TOOL"; then ++ ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ++ ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++ done ++IFS=$as_save_IFS ++ ++fi ++fi ++MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL ++if test -n "$MANIFEST_TOOL"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 ++$as_echo "$MANIFEST_TOOL" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++fi ++ ++ ++fi ++if test -z "$ac_cv_prog_MANIFEST_TOOL"; then ++ ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL ++ # Extract the first word of "mt", so it can be a program name with args. ++set dummy mt; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if test "${ac_cv_prog_ac_ct_MANIFEST_TOOL+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test -n "$ac_ct_MANIFEST_TOOL"; then ++ ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ++ ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++ done ++IFS=$as_save_IFS ++ ++fi ++fi ++ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL ++if test -n "$ac_ct_MANIFEST_TOOL"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 ++$as_echo "$ac_ct_MANIFEST_TOOL" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++fi ++ ++ if test "x$ac_ct_MANIFEST_TOOL" = x; then ++ MANIFEST_TOOL=":" ++ else ++ case $cross_compiling:$ac_tool_warned in ++yes:) ++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 ++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ++ac_tool_warned=yes ;; ++esac ++ MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL ++ fi ++else ++ MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" ++fi ++ ++test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 ++$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } ++if test "${lt_cv_path_mainfest_tool+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ lt_cv_path_mainfest_tool=no ++ echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 ++ $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out ++ cat conftest.err >&5 ++ if $GREP 'Manifest Tool' conftest.out > /dev/null; then ++ lt_cv_path_mainfest_tool=yes ++ fi ++ rm -f conftest* ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 ++$as_echo "$lt_cv_path_mainfest_tool" >&6; } ++if test "x$lt_cv_path_mainfest_tool" != xyes; then ++ MANIFEST_TOOL=: ++fi ++ ++ ++ ++ ++ + + case $host_os in + rhapsody* | darwin*) +@@ -7893,6 +8390,8 @@ _LT_EOF + $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 + echo "$AR cru libconftest.a conftest.o" >&5 + $AR cru libconftest.a conftest.o 2>&5 ++ echo "$RANLIB libconftest.a" >&5 ++ $RANLIB libconftest.a 2>&5 + cat > conftest.c << _LT_EOF + int main() { return 0;} + _LT_EOF +@@ -8057,7 +8556,8 @@ fi + LIBTOOL_DEPS="$ltmain" + + # Always use our own libtool. +-LIBTOOL='$(SHELL) $(top_builddir)/libtool' ++LIBTOOL='$(SHELL) $(top_builddir)' ++LIBTOOL="$LIBTOOL/${host_alias}-libtool" + + + +@@ -8146,7 +8646,7 @@ aix3*) + esac + + # Global variables: +-ofile=libtool ++ofile=${host_alias}-libtool + can_build_shared=yes + + # All known linkers require a `.a' archive for static linking (except MSVC, +@@ -8444,8 +8944,6 @@ fi + lt_prog_compiler_pic= + lt_prog_compiler_static= + +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +-$as_echo_n "checking for $compiler option to produce PIC... " >&6; } + + if test "$GCC" = yes; then + lt_prog_compiler_wl='-Wl,' +@@ -8610,6 +9108,12 @@ $as_echo_n "checking for $compiler optio + lt_prog_compiler_pic='--shared' + lt_prog_compiler_static='--static' + ;; ++ nagfor*) ++ # NAG Fortran compiler ++ lt_prog_compiler_wl='-Wl,-Wl,,' ++ lt_prog_compiler_pic='-PIC' ++ lt_prog_compiler_static='-Bstatic' ++ ;; + pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) +@@ -8672,7 +9176,7 @@ $as_echo_n "checking for $compiler optio + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + case $cc_basename in +- f77* | f90* | f95*) ++ f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) + lt_prog_compiler_wl='-Qoption ld ';; + *) + lt_prog_compiler_wl='-Wl,';; +@@ -8729,13 +9233,17 @@ case $host_os in + lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" + ;; + esac +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5 +-$as_echo "$lt_prog_compiler_pic" >&6; } +- +- +- +- + ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 ++$as_echo_n "checking for $compiler option to produce PIC... " >&6; } ++if test "${lt_cv_prog_compiler_pic+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ lt_cv_prog_compiler_pic=$lt_prog_compiler_pic ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 ++$as_echo "$lt_cv_prog_compiler_pic" >&6; } ++lt_prog_compiler_pic=$lt_cv_prog_compiler_pic + + # + # Check to make sure the PIC flag actually works. +@@ -8796,6 +9304,11 @@ fi + + + ++ ++ ++ ++ ++ + # + # Check to make sure the static flag actually works. + # +@@ -9146,7 +9659,8 @@ _LT_EOF + allow_undefined_flag=unsupported + always_export_symbols=no + enable_shared_with_static_runtimes=yes +- export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' ++ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' ++ exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' +@@ -9194,7 +9708,7 @@ _LT_EOF + if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ + && test "$tmp_diet" = no + then +- tmp_addflag= ++ tmp_addflag=' $pic_flag' + tmp_sharedflag='-shared' + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler +@@ -9245,12 +9759,12 @@ _LT_EOF + whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' + hardcode_libdir_flag_spec= + hardcode_libdir_flag_spec_ld='-rpath $libdir' +- archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' ++ archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' + if test "x$supports_anon_versioning" = xyes; then + archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ +- $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' ++ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + fi + ;; + esac +@@ -9264,8 +9778,8 @@ _LT_EOF + archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else +- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' +- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ++ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' ++ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + +@@ -9283,8 +9797,8 @@ _LT_EOF + + _LT_EOF + elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then +- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' +- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ++ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' ++ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi +@@ -9330,8 +9844,8 @@ _LT_EOF + + *) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then +- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' +- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ++ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' ++ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi +@@ -9461,7 +9975,13 @@ _LT_EOF + allow_undefined_flag='-berok' + # Determine the default libpath from the value encoded in an + # empty executable. +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ if test "${lt_cv_aix_libpath+set}" = set; then ++ aix_libpath=$lt_cv_aix_libpath ++else ++ if test "${lt_cv_aix_libpath_+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + int +@@ -9474,22 +9994,29 @@ main () + _ACEOF + if ac_fn_c_try_link "$LINENO"; then : + +-lt_aix_libpath_sed=' +- /Import File Strings/,/^$/ { +- /^0/ { +- s/^0 *\(.*\)$/\1/ +- p +- } +- }' +-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +-# Check for a 64-bit object if we didn't find anything. +-if test -z "$aix_libpath"; then +- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +-fi ++ lt_aix_libpath_sed=' ++ /Import File Strings/,/^$/ { ++ /^0/ { ++ s/^0 *\([^ ]*\) *$/\1/ ++ p ++ } ++ }' ++ lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` ++ # Check for a 64-bit object if we didn't find anything. ++ if test -z "$lt_cv_aix_libpath_"; then ++ lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` ++ fi + fi + rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ++ if test -z "$lt_cv_aix_libpath_"; then ++ lt_cv_aix_libpath_="/usr/lib:/lib" ++ fi ++ ++fi ++ ++ aix_libpath=$lt_cv_aix_libpath_ ++fi + + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" +@@ -9501,7 +10028,13 @@ if test -z "$aix_libpath"; then aix_libp + else + # Determine the default libpath from the value encoded in an + # empty executable. +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ if test "${lt_cv_aix_libpath+set}" = set; then ++ aix_libpath=$lt_cv_aix_libpath ++else ++ if test "${lt_cv_aix_libpath_+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + int +@@ -9514,22 +10047,29 @@ main () + _ACEOF + if ac_fn_c_try_link "$LINENO"; then : + +-lt_aix_libpath_sed=' +- /Import File Strings/,/^$/ { +- /^0/ { +- s/^0 *\(.*\)$/\1/ +- p +- } +- }' +-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +-# Check for a 64-bit object if we didn't find anything. +-if test -z "$aix_libpath"; then +- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +-fi ++ lt_aix_libpath_sed=' ++ /Import File Strings/,/^$/ { ++ /^0/ { ++ s/^0 *\([^ ]*\) *$/\1/ ++ p ++ } ++ }' ++ lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` ++ # Check for a 64-bit object if we didn't find anything. ++ if test -z "$lt_cv_aix_libpath_"; then ++ lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` ++ fi + fi + rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ++ if test -z "$lt_cv_aix_libpath_"; then ++ lt_cv_aix_libpath_="/usr/lib:/lib" ++ fi ++ ++fi ++ ++ aix_libpath=$lt_cv_aix_libpath_ ++fi + + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, +@@ -9574,20 +10114,63 @@ if test -z "$aix_libpath"; then aix_libp + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. +- hardcode_libdir_flag_spec=' ' +- allow_undefined_flag=unsupported +- # Tell ltmain to make .lib files, not .a files. +- libext=lib +- # Tell ltmain to make .dll files, not .so files. +- shrext_cmds=".dll" +- # FIXME: Setting linknames here is a bad hack. +- archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' +- # The linker will automatically build a .lib file if we build a DLL. +- old_archive_from_new_cmds='true' +- # FIXME: Should let the user specify the lib program. +- old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' +- fix_srcfile_path='`cygpath -w "$srcfile"`' +- enable_shared_with_static_runtimes=yes ++ case $cc_basename in ++ cl*) ++ # Native MSVC ++ hardcode_libdir_flag_spec=' ' ++ allow_undefined_flag=unsupported ++ always_export_symbols=yes ++ file_list_spec='@' ++ # Tell ltmain to make .lib files, not .a files. ++ libext=lib ++ # Tell ltmain to make .dll files, not .so files. ++ shrext_cmds=".dll" ++ # FIXME: Setting linknames here is a bad hack. ++ archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' ++ archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then ++ sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; ++ else ++ sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; ++ fi~ ++ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ ++ linknames=' ++ # The linker will not automatically build a static lib if we build a DLL. ++ # _LT_TAGVAR(old_archive_from_new_cmds, )='true' ++ enable_shared_with_static_runtimes=yes ++ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' ++ # Don't use ranlib ++ old_postinstall_cmds='chmod 644 $oldlib' ++ postlink_cmds='lt_outputfile="@OUTPUT@"~ ++ lt_tool_outputfile="@TOOL_OUTPUT@"~ ++ case $lt_outputfile in ++ *.exe|*.EXE) ;; ++ *) ++ lt_outputfile="$lt_outputfile.exe" ++ lt_tool_outputfile="$lt_tool_outputfile.exe" ++ ;; ++ esac~ ++ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then ++ $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; ++ $RM "$lt_outputfile.manifest"; ++ fi' ++ ;; ++ *) ++ # Assume MSVC wrapper ++ hardcode_libdir_flag_spec=' ' ++ allow_undefined_flag=unsupported ++ # Tell ltmain to make .lib files, not .a files. ++ libext=lib ++ # Tell ltmain to make .dll files, not .so files. ++ shrext_cmds=".dll" ++ # FIXME: Setting linknames here is a bad hack. ++ archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' ++ # The linker will automatically build a .lib file if we build a DLL. ++ old_archive_from_new_cmds='true' ++ # FIXME: Should let the user specify the lib program. ++ old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' ++ enable_shared_with_static_runtimes=yes ++ ;; ++ esac + ;; + + darwin* | rhapsody*) +@@ -9652,7 +10235,7 @@ if test -z "$aix_libpath"; then aix_libp + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) +- archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' ++ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no +@@ -9660,7 +10243,7 @@ if test -z "$aix_libpath"; then aix_libp + + hpux9*) + if test "$GCC" = yes; then +- archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ++ archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + fi +@@ -9676,7 +10259,7 @@ if test -z "$aix_libpath"; then aix_libp + + hpux10*) + if test "$GCC" = yes && test "$with_gnu_ld" = no; then +- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ++ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi +@@ -9700,10 +10283,10 @@ if test -z "$aix_libpath"; then aix_libp + archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) +- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ++ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) +- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ++ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else +@@ -9782,23 +10365,36 @@ fi + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then +- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ++ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + # Try to use the -exported_symbol ld option, if it does not + # work, assume that -exports_file does not work either and + # implicitly export all symbols. +- save_LDFLAGS="$LDFLAGS" +- LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ # This should be the same for all languages, so no per-tag cache variable. ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 ++$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } ++if test "${lt_cv_irix_exported_symbol+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ save_LDFLAGS="$LDFLAGS" ++ LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-int foo(void) {} ++int foo (void) { return 0; } + _ACEOF + if ac_fn_c_try_link "$LINENO"; then : +- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' +- ++ lt_cv_irix_exported_symbol=yes ++else ++ lt_cv_irix_exported_symbol=no + fi + rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +- LDFLAGS="$save_LDFLAGS" ++ LDFLAGS="$save_LDFLAGS" ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 ++$as_echo "$lt_cv_irix_exported_symbol" >&6; } ++ if test "$lt_cv_irix_exported_symbol" = yes; then ++ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' ++ fi + else + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' +@@ -9883,7 +10479,7 @@ rm -f core conftest.err conftest.$ac_obj + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' +- archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ++ archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + else + allow_undefined_flag=' -expect_unresolved \*' +@@ -9902,9 +10498,9 @@ rm -f core conftest.err conftest.$ac_obj + no_undefined_flag=' -z defs' + if test "$GCC" = yes; then + wlarc='${wl}' +- archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ++ archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ +- $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ++ $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + else + case `$CC -V 2>&1` in + *"Compilers 5.0"*) +@@ -10480,8 +11076,9 @@ cygwin* | mingw* | pw32* | cegcc*) + need_version=no + need_lib_prefix=no + +- case $GCC,$host_os in +- yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) ++ case $GCC,$cc_basename in ++ yes,*) ++ # gcc + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ +@@ -10514,13 +11111,71 @@ cygwin* | mingw* | pw32* | cegcc*) + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + esac ++ dynamic_linker='Win32 ld.exe' ++ ;; ++ ++ *,cl*) ++ # Native MSVC ++ libname_spec='$name' ++ soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ++ library_names_spec='${libname}.dll.lib' ++ ++ case $build_os in ++ mingw*) ++ sys_lib_search_path_spec= ++ lt_save_ifs=$IFS ++ IFS=';' ++ for lt_path in $LIB ++ do ++ IFS=$lt_save_ifs ++ # Let DOS variable expansion print the short 8.3 style file name. ++ lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` ++ sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" ++ done ++ IFS=$lt_save_ifs ++ # Convert to MSYS style. ++ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ++ ;; ++ cygwin*) ++ # Convert to unix form, then to dos form, then back to unix form ++ # but this time dos style (no spaces!) so that the unix form looks ++ # like /cygdrive/c/PROGRA~1:/cygdr... ++ sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` ++ sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` ++ sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ++ ;; ++ *) ++ sys_lib_search_path_spec="$LIB" ++ if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then ++ # It is most probably a Windows format PATH. ++ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` ++ else ++ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ++ fi ++ # FIXME: find the short name or the path components, as spaces are ++ # common. (e.g. "Program Files" -> "PROGRA~1") ++ ;; ++ esac ++ ++ # DLL is installed to $(libdir)/../bin by postinstall_cmds ++ postinstall_cmds='base_file=`basename \${file}`~ ++ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ ++ dldir=$destdir/`dirname \$dlpath`~ ++ test -d \$dldir || mkdir -p \$dldir~ ++ $install_prog $dir/$dlname \$dldir/$dlname' ++ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ ++ dlpath=$dir/\$dldll~ ++ $RM \$dlpath' ++ shlibpath_overrides_runpath=yes ++ dynamic_linker='Win32 link.exe' + ;; + + *) ++ # Assume MSVC wrapper + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ++ dynamic_linker='Win32 ld.exe' + ;; + esac +- dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; +@@ -10616,7 +11271,7 @@ haiku*) + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LIBRARY_PATH + shlibpath_overrides_runpath=yes +- sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib' ++ sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' + hardcode_into_libs=yes + ;; + +@@ -11412,7 +12067,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 11415 "configure" ++#line $LINENO "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -11456,10 +12111,10 @@ else + /* When -fvisbility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ + #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +-void fnord () __attribute__((visibility("default"))); ++int fnord () __attribute__((visibility("default"))); + #endif + +-void fnord () { int i=42; } ++int fnord () { return 42; } + int main () + { + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); +@@ -11518,7 +12173,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 11521 "configure" ++#line $LINENO "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -11562,10 +12217,10 @@ else + /* When -fvisbility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ + #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +-void fnord () __attribute__((visibility("default"))); ++int fnord () __attribute__((visibility("default"))); + #endif + +-void fnord () { int i=42; } ++int fnord () { return 42; } + int main () + { + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); +@@ -15045,7 +15700,7 @@ SHARED_LDFLAGS= + if test "$enable_shared" = "yes"; then + x=`sed -n -e 's/^[ ]*PICFLAG[ ]*=[ ]*//p' < ../libiberty/Makefile | sed -n '$p'` + if test -n "$x"; then +- SHARED_LIBADD="-L`pwd`/../libiberty/pic -liberty" ++ SHARED_LIBADD="`pwd`/../libiberty/pic/libiberty.a" + fi + + # More hacks to build DLLs on Windows. +@@ -16619,13 +17274,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_ + lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' + lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' + lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' ++lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' ++lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' + reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' + reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' + OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' + deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' + file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' ++file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' ++want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' ++DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' ++sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' + AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' + AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' ++archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' + STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' + RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' + old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' +@@ -16640,14 +17302,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$l + lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' + lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' + lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' ++nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' ++lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' + objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' + MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' + lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' +-lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' + lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' ++lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' + lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' + lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' + need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' ++MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' + DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' + NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' + LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' +@@ -16680,12 +17345,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcod + hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' + inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' + link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' +-fix_srcfile_path='`$ECHO "$fix_srcfile_path" | $SED "$delay_single_quote_subst"`' + always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' + export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' + exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' + include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' + prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' ++postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' + file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' + variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' + need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' +@@ -16740,8 +17405,13 @@ reload_flag \ + OBJDUMP \ + deplibs_check_method \ + file_magic_cmd \ ++file_magic_glob \ ++want_nocaseglob \ ++DLLTOOL \ ++sharedlib_from_linklib_cmd \ + AR \ + AR_FLAGS \ ++archiver_list_spec \ + STRIP \ + RANLIB \ + CC \ +@@ -16751,12 +17421,14 @@ lt_cv_sys_global_symbol_pipe \ + lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ ++nm_file_list_spec \ + lt_prog_compiler_no_builtin_flag \ +-lt_prog_compiler_wl \ + lt_prog_compiler_pic \ ++lt_prog_compiler_wl \ + lt_prog_compiler_static \ + lt_cv_prog_compiler_c_o \ + need_locks \ ++MANIFEST_TOOL \ + DSYMUTIL \ + NMEDIT \ + LIPO \ +@@ -16772,7 +17444,6 @@ no_undefined_flag \ + hardcode_libdir_flag_spec \ + hardcode_libdir_flag_spec_ld \ + hardcode_libdir_separator \ +-fix_srcfile_path \ + exclude_expsyms \ + include_expsyms \ + file_list_spec \ +@@ -16808,6 +17479,7 @@ module_cmds \ + module_expsym_cmds \ + export_symbols_cmds \ + prelink_cmds \ ++postlink_cmds \ + postinstall_cmds \ + postuninstall_cmds \ + finish_cmds \ +@@ -17587,7 +18259,8 @@ $as_echo X"$file" | + # NOTE: Changes made to this file will be lost: look at ltmain.sh. + # + # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +-# 2006, 2007, 2008, 2009 Free Software Foundation, Inc. ++# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, ++# Inc. + # Written by Gordon Matzigkeit, 1996 + # + # This file is part of GNU Libtool. +@@ -17690,19 +18363,42 @@ SP2NL=$lt_lt_SP2NL + # turn newlines into spaces. + NL2SP=$lt_lt_NL2SP + ++# convert \$build file names to \$host format. ++to_host_file_cmd=$lt_cv_to_host_file_cmd ++ ++# convert \$build files to toolchain format. ++to_tool_file_cmd=$lt_cv_to_tool_file_cmd ++ + # An object symbol dumper. + OBJDUMP=$lt_OBJDUMP + + # Method to check whether dependent libraries are shared objects. + deplibs_check_method=$lt_deplibs_check_method + +-# Command to use when deplibs_check_method == "file_magic". ++# Command to use when deplibs_check_method = "file_magic". + file_magic_cmd=$lt_file_magic_cmd + ++# How to find potential files when deplibs_check_method = "file_magic". ++file_magic_glob=$lt_file_magic_glob ++ ++# Find potential files using nocaseglob when deplibs_check_method = "file_magic". ++want_nocaseglob=$lt_want_nocaseglob ++ ++# DLL creation program. ++DLLTOOL=$lt_DLLTOOL ++ ++# Command to associate shared and link libraries. ++sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd ++ + # The archiver. + AR=$lt_AR ++ ++# Flags to create an archive. + AR_FLAGS=$lt_AR_FLAGS + ++# How to feed a file listing to the archiver. ++archiver_list_spec=$lt_archiver_list_spec ++ + # A symbol stripping program. + STRIP=$lt_STRIP + +@@ -17732,6 +18428,12 @@ global_symbol_to_c_name_address=$lt_lt_c + # Transform the output of nm in a C name address pair when lib prefix is needed. + global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix + ++# Specify filename containing input files for \$NM. ++nm_file_list_spec=$lt_nm_file_list_spec ++ ++# The root where to search for dependent libraries,and in which our libraries should be installed. ++lt_sysroot=$lt_sysroot ++ + # The name of the directory that contains temporary libtool files. + objdir=$objdir + +@@ -17741,6 +18443,9 @@ MAGIC_CMD=$MAGIC_CMD + # Must we lock files when doing compilation? + need_locks=$lt_need_locks + ++# Manifest tool. ++MANIFEST_TOOL=$lt_MANIFEST_TOOL ++ + # Tool to manipulate archived DWARF debug symbol files on Mac OS X. + DSYMUTIL=$lt_DSYMUTIL + +@@ -17855,12 +18560,12 @@ with_gcc=$GCC + # Compiler flag to turn off builtin functions. + no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag + +-# How to pass a linker flag through the compiler. +-wl=$lt_lt_prog_compiler_wl +- + # Additional compiler flags for building library objects. + pic_flag=$lt_lt_prog_compiler_pic + ++# How to pass a linker flag through the compiler. ++wl=$lt_lt_prog_compiler_wl ++ + # Compiler flag to prevent dynamic linking. + link_static_flag=$lt_lt_prog_compiler_static + +@@ -17947,9 +18652,6 @@ inherit_rpath=$inherit_rpath + # Whether libtool must link a program against all its dependency libraries. + link_all_deplibs=$link_all_deplibs + +-# Fix the shell variable \$srcfile for the compiler. +-fix_srcfile_path=$lt_fix_srcfile_path +- + # Set to "yes" if exported symbols are required. + always_export_symbols=$always_export_symbols + +@@ -17965,6 +18667,9 @@ include_expsyms=$lt_include_expsyms + # Commands necessary for linking programs (against libraries) with templates. + prelink_cmds=$lt_prelink_cmds + ++# Commands necessary for finishing linking programs. ++postlink_cmds=$lt_postlink_cmds ++ + # Specify filename containing input files. + file_list_spec=$lt_file_list_spec + +@@ -17997,210 +18702,169 @@ ltmain="$ac_aux_dir/ltmain.sh" + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? +- sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ +- || (rm -f "$cfgfile"; exit 1) +- +- case $xsi_shell in +- yes) +- cat << \_LT_EOF >> "$cfgfile" +- +-# func_dirname file append nondir_replacement +-# Compute the dirname of FILE. If nonempty, add APPEND to the result, +-# otherwise set result to NONDIR_REPLACEMENT. +-func_dirname () +-{ +- case ${1} in +- */*) func_dirname_result="${1%/*}${2}" ;; +- * ) func_dirname_result="${3}" ;; +- esac +-} +- +-# func_basename file +-func_basename () +-{ +- func_basename_result="${1##*/}" +-} +- +-# func_dirname_and_basename file append nondir_replacement +-# perform func_basename and func_dirname in a single function +-# call: +-# dirname: Compute the dirname of FILE. If nonempty, +-# add APPEND to the result, otherwise set result +-# to NONDIR_REPLACEMENT. +-# value returned in "$func_dirname_result" +-# basename: Compute filename of FILE. +-# value retuned in "$func_basename_result" +-# Implementation must be kept synchronized with func_dirname +-# and func_basename. For efficiency, we do not delegate to +-# those functions but instead duplicate the functionality here. +-func_dirname_and_basename () +-{ +- case ${1} in +- */*) func_dirname_result="${1%/*}${2}" ;; +- * ) func_dirname_result="${3}" ;; +- esac +- func_basename_result="${1##*/}" +-} +- +-# func_stripname prefix suffix name +-# strip PREFIX and SUFFIX off of NAME. +-# PREFIX and SUFFIX must not contain globbing or regex special +-# characters, hashes, percent signs, but SUFFIX may contain a leading +-# dot (in which case that matches only a dot). +-func_stripname () +-{ +- # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are +- # positional parameters, so assign one to ordinary parameter first. +- func_stripname_result=${3} +- func_stripname_result=${func_stripname_result#"${1}"} +- func_stripname_result=${func_stripname_result%"${2}"} +-} +- +-# func_opt_split +-func_opt_split () +-{ +- func_opt_split_opt=${1%%=*} +- func_opt_split_arg=${1#*=} +-} +- +-# func_lo2o object +-func_lo2o () +-{ +- case ${1} in +- *.lo) func_lo2o_result=${1%.lo}.${objext} ;; +- *) func_lo2o_result=${1} ;; +- esac +-} +- +-# func_xform libobj-or-source +-func_xform () +-{ +- func_xform_result=${1%.*}.lo +-} +- +-# func_arith arithmetic-term... +-func_arith () +-{ +- func_arith_result=$(( $* )) +-} +- +-# func_len string +-# STRING may not start with a hyphen. +-func_len () +-{ +- func_len_result=${#1} +-} +- +-_LT_EOF +- ;; +- *) # Bourne compatible functions. +- cat << \_LT_EOF >> "$cfgfile" +- +-# func_dirname file append nondir_replacement +-# Compute the dirname of FILE. If nonempty, add APPEND to the result, +-# otherwise set result to NONDIR_REPLACEMENT. +-func_dirname () +-{ +- # Extract subdirectory from the argument. +- func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` +- if test "X$func_dirname_result" = "X${1}"; then +- func_dirname_result="${3}" +- else +- func_dirname_result="$func_dirname_result${2}" +- fi +-} +- +-# func_basename file +-func_basename () +-{ +- func_basename_result=`$ECHO "${1}" | $SED "$basename"` +-} +- +- +-# func_stripname prefix suffix name +-# strip PREFIX and SUFFIX off of NAME. +-# PREFIX and SUFFIX must not contain globbing or regex special +-# characters, hashes, percent signs, but SUFFIX may contain a leading +-# dot (in which case that matches only a dot). +-# func_strip_suffix prefix name +-func_stripname () +-{ +- case ${2} in +- .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; +- *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; +- esac +-} +- +-# sed scripts: +-my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q' +-my_sed_long_arg='1s/^-[^=]*=//' +- +-# func_opt_split +-func_opt_split () +-{ +- func_opt_split_opt=`$ECHO "${1}" | $SED "$my_sed_long_opt"` +- func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"` +-} +- +-# func_lo2o object +-func_lo2o () +-{ +- func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` +-} +- +-# func_xform libobj-or-source +-func_xform () +-{ +- func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` +-} +- +-# func_arith arithmetic-term... +-func_arith () +-{ +- func_arith_result=`expr "$@"` +-} +- +-# func_len string +-# STRING may not start with a hyphen. +-func_len () +-{ +- func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` +-} +- +-_LT_EOF +-esac +- +-case $lt_shell_append in +- yes) +- cat << \_LT_EOF >> "$cfgfile" +- +-# func_append var value +-# Append VALUE to the end of shell variable VAR. +-func_append () +-{ +- eval "$1+=\$2" +-} +-_LT_EOF +- ;; +- *) +- cat << \_LT_EOF >> "$cfgfile" +- +-# func_append var value +-# Append VALUE to the end of shell variable VAR. +-func_append () +-{ +- eval "$1=\$$1\$2" +-} +- +-_LT_EOF +- ;; +- esac ++ sed '$q' "$ltmain" >> "$cfgfile" \ ++ || (rm -f "$cfgfile"; exit 1) + ++ if test x"$xsi_shell" = xyes; then ++ sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ ++func_dirname ()\ ++{\ ++\ case ${1} in\ ++\ */*) func_dirname_result="${1%/*}${2}" ;;\ ++\ * ) func_dirname_result="${3}" ;;\ ++\ esac\ ++} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_basename ()$/,/^} # func_basename /c\ ++func_basename ()\ ++{\ ++\ func_basename_result="${1##*/}"\ ++} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ ++func_dirname_and_basename ()\ ++{\ ++\ case ${1} in\ ++\ */*) func_dirname_result="${1%/*}${2}" ;;\ ++\ * ) func_dirname_result="${3}" ;;\ ++\ esac\ ++\ func_basename_result="${1##*/}"\ ++} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ ++func_stripname ()\ ++{\ ++\ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ ++\ # positional parameters, so assign one to ordinary parameter first.\ ++\ func_stripname_result=${3}\ ++\ func_stripname_result=${func_stripname_result#"${1}"}\ ++\ func_stripname_result=${func_stripname_result%"${2}"}\ ++} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ ++func_split_long_opt ()\ ++{\ ++\ func_split_long_opt_name=${1%%=*}\ ++\ func_split_long_opt_arg=${1#*=}\ ++} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ ++func_split_short_opt ()\ ++{\ ++\ func_split_short_opt_arg=${1#??}\ ++\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ ++} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ ++func_lo2o ()\ ++{\ ++\ case ${1} in\ ++\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ ++\ *) func_lo2o_result=${1} ;;\ ++\ esac\ ++} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_xform ()$/,/^} # func_xform /c\ ++func_xform ()\ ++{\ ++ func_xform_result=${1%.*}.lo\ ++} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_arith ()$/,/^} # func_arith /c\ ++func_arith ()\ ++{\ ++ func_arith_result=$(( $* ))\ ++} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_len ()$/,/^} # func_len /c\ ++func_len ()\ ++{\ ++ func_len_result=${#1}\ ++} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++fi ++ ++if test x"$lt_shell_append" = xyes; then ++ sed -e '/^func_append ()$/,/^} # func_append /c\ ++func_append ()\ ++{\ ++ eval "${1}+=\\${2}"\ ++} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ ++func_append_quoted ()\ ++{\ ++\ func_quote_for_eval "${2}"\ ++\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ ++} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ # Save a `func_append' function call where possible by direct use of '+=' ++ sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++ test 0 -eq $? || _lt_function_replace_fail=: ++else ++ # Save a `func_append' function call even when '+=' is not available ++ sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++ test 0 -eq $? || _lt_function_replace_fail=: ++fi ++ ++if test x"$_lt_function_replace_fail" = x":"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 ++$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} ++fi + +- sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ +- || (rm -f "$cfgfile"; exit 1) + +- mv -f "$cfgfile" "$ofile" || ++ mv -f "$cfgfile" "$ofile" || + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" + +Index: binutils-2.21.1/opcodes/configure +=================================================================== +--- binutils-2.21.1.orig/opcodes/configure ++++ binutils-2.21.1/opcodes/configure +@@ -647,6 +647,9 @@ OTOOL + LIPO + NMEDIT + DSYMUTIL ++MANIFEST_TOOL ++ac_ct_AR ++DLLTOOL + OBJDUMP + LN_S + NM +@@ -759,6 +762,7 @@ enable_static + with_pic + enable_fast_install + with_gnu_ld ++with_libtool_sysroot + enable_libtool_lock + enable_targets + enable_werror +@@ -1417,6 +1421,8 @@ Optional Packages: + --with-pic try to use only PIC/non-PIC objects [default=use + both] + --with-gnu-ld assume the C compiler uses GNU ld [default=no] ++ --with-libtool-sysroot=DIR Search for dependent libraries within DIR ++ (or the compiler's sysroot if not specified). + + Some influential environment variables: + CC C compiler command +@@ -5112,8 +5118,8 @@ esac + + + +-macro_version='2.2.7a' +-macro_revision='1.3134' ++macro_version='2.4' ++macro_revision='1.3293' + + + +@@ -5153,7 +5159,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 + $as_echo_n "checking how to print strings... " >&6; } + # Test print first, because it will be a builtin if present. +-if test "X`print -r -- -n 2>/dev/null`" = X-n && \ ++if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ + test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='print -r --' + elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then +@@ -5839,8 +5845,8 @@ $as_echo_n "checking whether the shell u + # Try some XSI features + xsi_shell=no + ( _lt_dummy="a/b/c" +- test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ +- = c,a/b,, \ ++ test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ ++ = c,a/b,b/c, \ + && eval 'test $(( 1 + 1 )) -eq 2 \ + && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ + && xsi_shell=yes +@@ -5889,6 +5895,80 @@ esac + + + ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 ++$as_echo_n "checking how to convert $build file names to $host format... " >&6; } ++if test "${lt_cv_to_host_file_cmd+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ case $host in ++ *-*-mingw* ) ++ case $build in ++ *-*-mingw* ) # actually msys ++ lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ++ ;; ++ *-*-cygwin* ) ++ lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ++ ;; ++ * ) # otherwise, assume *nix ++ lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ++ ;; ++ esac ++ ;; ++ *-*-cygwin* ) ++ case $build in ++ *-*-mingw* ) # actually msys ++ lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ++ ;; ++ *-*-cygwin* ) ++ lt_cv_to_host_file_cmd=func_convert_file_noop ++ ;; ++ * ) # otherwise, assume *nix ++ lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ++ ;; ++ esac ++ ;; ++ * ) # unhandled hosts (and "normal" native builds) ++ lt_cv_to_host_file_cmd=func_convert_file_noop ++ ;; ++esac ++ ++fi ++ ++to_host_file_cmd=$lt_cv_to_host_file_cmd ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 ++$as_echo "$lt_cv_to_host_file_cmd" >&6; } ++ ++ ++ ++ ++ ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 ++$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } ++if test "${lt_cv_to_tool_file_cmd+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ #assume ordinary cross tools, or native build. ++lt_cv_to_tool_file_cmd=func_convert_file_noop ++case $host in ++ *-*-mingw* ) ++ case $build in ++ *-*-mingw* ) # actually msys ++ lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ++ ;; ++ esac ++ ;; ++esac ++ ++fi ++ ++to_tool_file_cmd=$lt_cv_to_tool_file_cmd ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 ++$as_echo "$lt_cv_to_tool_file_cmd" >&6; } ++ ++ ++ ++ ++ + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 + $as_echo_n "checking for $LD option to reload object files... " >&6; } + if test "${lt_cv_ld_reload_flag+set}" = set; then : +@@ -5905,6 +5985,11 @@ case $reload_flag in + esac + reload_cmds='$LD$reload_flag -o $output$reload_objs' + case $host_os in ++ cygwin* | mingw* | pw32* | cegcc*) ++ if test "$GCC" != yes; then ++ reload_cmds=false ++ fi ++ ;; + darwin*) + if test "$GCC" = yes; then + reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' +@@ -6073,7 +6158,8 @@ mingw* | pw32*) + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + else +- lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' ++ # Keep this pattern in sync with the one in func_win32_libid. ++ lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' + lt_cv_file_magic_cmd='$OBJDUMP -f' + fi + ;; +@@ -6227,6 +6313,21 @@ esac + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 + $as_echo "$lt_cv_deplibs_check_method" >&6; } ++ ++file_magic_glob= ++want_nocaseglob=no ++if test "$build" = "$host"; then ++ case $host_os in ++ mingw* | pw32*) ++ if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then ++ want_nocaseglob=yes ++ else ++ file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` ++ fi ++ ;; ++ esac ++fi ++ + file_magic_cmd=$lt_cv_file_magic_cmd + deplibs_check_method=$lt_cv_deplibs_check_method + test -z "$deplibs_check_method" && deplibs_check_method=unknown +@@ -6242,9 +6343,162 @@ test -z "$deplibs_check_method" && depli + + + ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + if test -n "$ac_tool_prefix"; then +- # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. +-set dummy ${ac_tool_prefix}ar; ac_word=$2 ++ # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. ++set dummy ${ac_tool_prefix}dlltool; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if test "${ac_cv_prog_DLLTOOL+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test -n "$DLLTOOL"; then ++ ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ++ ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++ done ++IFS=$as_save_IFS ++ ++fi ++fi ++DLLTOOL=$ac_cv_prog_DLLTOOL ++if test -n "$DLLTOOL"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 ++$as_echo "$DLLTOOL" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++fi ++ ++ ++fi ++if test -z "$ac_cv_prog_DLLTOOL"; then ++ ac_ct_DLLTOOL=$DLLTOOL ++ # Extract the first word of "dlltool", so it can be a program name with args. ++set dummy dlltool; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test -n "$ac_ct_DLLTOOL"; then ++ ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ++ ac_cv_prog_ac_ct_DLLTOOL="dlltool" ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++ done ++IFS=$as_save_IFS ++ ++fi ++fi ++ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL ++if test -n "$ac_ct_DLLTOOL"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 ++$as_echo "$ac_ct_DLLTOOL" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++fi ++ ++ if test "x$ac_ct_DLLTOOL" = x; then ++ DLLTOOL="false" ++ else ++ case $cross_compiling:$ac_tool_warned in ++yes:) ++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 ++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ++ac_tool_warned=yes ;; ++esac ++ DLLTOOL=$ac_ct_DLLTOOL ++ fi ++else ++ DLLTOOL="$ac_cv_prog_DLLTOOL" ++fi ++ ++test -z "$DLLTOOL" && DLLTOOL=dlltool ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 ++$as_echo_n "checking how to associate runtime and link libraries... " >&6; } ++if test "${lt_cv_sharedlib_from_linklib_cmd+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ lt_cv_sharedlib_from_linklib_cmd='unknown' ++ ++case $host_os in ++cygwin* | mingw* | pw32* | cegcc*) ++ # two different shell functions defined in ltmain.sh ++ # decide which to use based on capabilities of $DLLTOOL ++ case `$DLLTOOL --help 2>&1` in ++ *--identify-strict*) ++ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ++ ;; ++ *) ++ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ++ ;; ++ esac ++ ;; ++*) ++ # fallback: assume linklib IS sharedlib ++ lt_cv_sharedlib_from_linklib_cmd="$ECHO" ++ ;; ++esac ++ ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 ++$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } ++sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd ++test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO ++ ++ ++ ++ ++ ++ ++ ++if test -n "$ac_tool_prefix"; then ++ for ac_prog in ar ++ do ++ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. ++set dummy $ac_tool_prefix$ac_prog; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } + if test "${ac_cv_prog_AR+set}" = set; then : +@@ -6260,7 +6514,7 @@ do + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then +- ac_cv_prog_AR="${ac_tool_prefix}ar" ++ ac_cv_prog_AR="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +@@ -6280,11 +6534,15 @@ $as_echo "no" >&6; } + fi + + ++ test -n "$AR" && break ++ done + fi +-if test -z "$ac_cv_prog_AR"; then ++if test -z "$AR"; then + ac_ct_AR=$AR +- # Extract the first word of "ar", so it can be a program name with args. +-set dummy ar; ac_word=$2 ++ for ac_prog in ar ++do ++ # Extract the first word of "$ac_prog", so it can be a program name with args. ++set dummy $ac_prog; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } + if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : +@@ -6300,7 +6558,7 @@ do + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then +- ac_cv_prog_ac_ct_AR="ar" ++ ac_cv_prog_ac_ct_AR="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +@@ -6319,6 +6577,10 @@ else + $as_echo "no" >&6; } + fi + ++ ++ test -n "$ac_ct_AR" && break ++done ++ + if test "x$ac_ct_AR" = x; then + AR="false" + else +@@ -6330,12 +6592,11 @@ ac_tool_warned=yes ;; + esac + AR=$ac_ct_AR + fi +-else +- AR="$ac_cv_prog_AR" + fi + +-test -z "$AR" && AR=ar +-test -z "$AR_FLAGS" && AR_FLAGS=cru ++: ${AR=ar} ++: ${AR_FLAGS=cru} ++ + + + +@@ -6346,6 +6607,63 @@ test -z "$AR_FLAGS" && AR_FLAGS=cru + + + ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 ++$as_echo_n "checking for archiver @FILE support... " >&6; } ++if test "${lt_cv_ar_at_file+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ lt_cv_ar_at_file=no ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++ ++int ++main () ++{ ++ ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : ++ echo conftest.$ac_objext > conftest.lst ++ lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' ++ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 ++ (eval $lt_ar_try) 2>&5 ++ ac_status=$? ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; } ++ if test "$ac_status" -eq 0; then ++ # Ensure the archiver fails upon bogus file names. ++ rm -f conftest.$ac_objext libconftest.a ++ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 ++ (eval $lt_ar_try) 2>&5 ++ ac_status=$? ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; } ++ if test "$ac_status" -ne 0; then ++ lt_cv_ar_at_file=@ ++ fi ++ fi ++ rm -f conftest.* libconftest.a ++ ++fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 ++$as_echo "$lt_cv_ar_at_file" >&6; } ++ ++if test "x$lt_cv_ar_at_file" = xno; then ++ archiver_list_spec= ++else ++ archiver_list_spec=$lt_cv_ar_at_file ++fi ++ ++ ++ ++ ++ ++ + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +@@ -6681,8 +6999,8 @@ esac + lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + + # Transform an extracted symbol line into symbol name and symbol address +-lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" +-lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" ++lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" ++lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" + + # Handle CRLF in mingw tool chain + opt_cr= +@@ -6718,6 +7036,7 @@ for ac_symprfx in "" "_"; do + else + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + fi ++ lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" + + # Check to see that the pipe works correctly. + pipe_works=no +@@ -6759,6 +7078,18 @@ _LT_EOF + if $GREP ' nm_test_var$' "$nlist" >/dev/null; then + if $GREP ' nm_test_func$' "$nlist" >/dev/null; then + cat <<_LT_EOF > conftest.$ac_ext ++/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ ++#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) ++/* DATA imports from DLLs on WIN32 con't be const, because runtime ++ relocations are performed -- see ld's documentation on pseudo-relocs. */ ++# define LT_DLSYM_CONST ++#elif defined(__osf__) ++/* This system does not cope well with relocations in const data. */ ++# define LT_DLSYM_CONST ++#else ++# define LT_DLSYM_CONST const ++#endif ++ + #ifdef __cplusplus + extern "C" { + #endif +@@ -6770,7 +7101,7 @@ _LT_EOF + cat <<_LT_EOF >> conftest.$ac_ext + + /* The mapping between symbol names and symbols. */ +-const struct { ++LT_DLSYM_CONST struct { + const char *name; + void *address; + } +@@ -6796,8 +7127,8 @@ static const void *lt_preloaded_setup() + _LT_EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext +- lt_save_LIBS="$LIBS" +- lt_save_CFLAGS="$CFLAGS" ++ lt_globsym_save_LIBS=$LIBS ++ lt_globsym_save_CFLAGS=$CFLAGS + LIBS="conftstm.$ac_objext" + CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 +@@ -6807,8 +7138,8 @@ _LT_EOF + test $ac_status = 0; } && test -s conftest${ac_exeext}; then + pipe_works=yes + fi +- LIBS="$lt_save_LIBS" +- CFLAGS="$lt_save_CFLAGS" ++ LIBS=$lt_globsym_save_LIBS ++ CFLAGS=$lt_globsym_save_CFLAGS + else + echo "cannot find nm_test_func in $nlist" >&5 + fi +@@ -6845,6 +7176,14 @@ else + $as_echo "ok" >&6; } + fi + ++# Response file support. ++if test "$lt_cv_nm_interface" = "MS dumpbin"; then ++ nm_file_list_spec='@' ++elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then ++ nm_file_list_spec='@' ++fi ++ ++ + + + +@@ -6866,6 +7205,47 @@ fi + + + ++ ++ ++ ++ ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 ++$as_echo_n "checking for sysroot... " >&6; } ++ ++# Check whether --with-libtool-sysroot was given. ++if test "${with_libtool_sysroot+set}" = set; then : ++ withval=$with_libtool_sysroot; ++else ++ with_libtool_sysroot=no ++fi ++ ++ ++lt_sysroot= ++case ${with_libtool_sysroot} in #( ++ yes) ++ if test "$GCC" = yes; then ++ lt_sysroot=`$CC --print-sysroot 2>/dev/null` ++ fi ++ ;; #( ++ /*) ++ lt_sysroot=`echo "$with_libtool_sysroot" | sed -e "$sed_quote_subst"` ++ ;; #( ++ no|'') ++ ;; #( ++ *) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libtool_sysroot}" >&5 ++$as_echo "${with_libtool_sysroot}" >&6; } ++ as_fn_error "The sysroot must be an absolute path." "$LINENO" 5 ++ ;; ++esac ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 ++$as_echo "${lt_sysroot:-no}" >&6; } ++ ++ ++ ++ ++ + # Check whether --enable-libtool-lock was given. + if test "${enable_libtool_lock+set}" = set; then : + enableval=$enable_libtool_lock; +@@ -7059,6 +7439,123 @@ esac + + need_locks="$enable_libtool_lock" + ++if test -n "$ac_tool_prefix"; then ++ # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. ++set dummy ${ac_tool_prefix}mt; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if test "${ac_cv_prog_MANIFEST_TOOL+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test -n "$MANIFEST_TOOL"; then ++ ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ++ ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++ done ++IFS=$as_save_IFS ++ ++fi ++fi ++MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL ++if test -n "$MANIFEST_TOOL"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 ++$as_echo "$MANIFEST_TOOL" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++fi ++ ++ ++fi ++if test -z "$ac_cv_prog_MANIFEST_TOOL"; then ++ ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL ++ # Extract the first word of "mt", so it can be a program name with args. ++set dummy mt; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if test "${ac_cv_prog_ac_ct_MANIFEST_TOOL+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test -n "$ac_ct_MANIFEST_TOOL"; then ++ ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ++ ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++ done ++IFS=$as_save_IFS ++ ++fi ++fi ++ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL ++if test -n "$ac_ct_MANIFEST_TOOL"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 ++$as_echo "$ac_ct_MANIFEST_TOOL" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++fi ++ ++ if test "x$ac_ct_MANIFEST_TOOL" = x; then ++ MANIFEST_TOOL=":" ++ else ++ case $cross_compiling:$ac_tool_warned in ++yes:) ++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 ++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ++ac_tool_warned=yes ;; ++esac ++ MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL ++ fi ++else ++ MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" ++fi ++ ++test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 ++$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } ++if test "${lt_cv_path_mainfest_tool+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ lt_cv_path_mainfest_tool=no ++ echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 ++ $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out ++ cat conftest.err >&5 ++ if $GREP 'Manifest Tool' conftest.out > /dev/null; then ++ lt_cv_path_mainfest_tool=yes ++ fi ++ rm -f conftest* ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 ++$as_echo "$lt_cv_path_mainfest_tool" >&6; } ++if test "x$lt_cv_path_mainfest_tool" != xyes; then ++ MANIFEST_TOOL=: ++fi ++ ++ ++ ++ ++ + + case $host_os in + rhapsody* | darwin*) +@@ -7622,6 +8119,8 @@ _LT_EOF + $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 + echo "$AR cru libconftest.a conftest.o" >&5 + $AR cru libconftest.a conftest.o 2>&5 ++ echo "$RANLIB libconftest.a" >&5 ++ $RANLIB libconftest.a 2>&5 + cat > conftest.c << _LT_EOF + int main() { return 0;} + _LT_EOF +@@ -7787,7 +8286,8 @@ fi + LIBTOOL_DEPS="$ltmain" + + # Always use our own libtool. +-LIBTOOL='$(SHELL) $(top_builddir)/libtool' ++LIBTOOL='$(SHELL) $(top_builddir)' ++LIBTOOL="$LIBTOOL/${host_alias}-libtool" + + + +@@ -7876,7 +8376,7 @@ aix3*) + esac + + # Global variables: +-ofile=libtool ++ofile=${host_alias}-libtool + can_build_shared=yes + + # All known linkers require a `.a' archive for static linking (except MSVC, +@@ -8174,8 +8674,6 @@ fi + lt_prog_compiler_pic= + lt_prog_compiler_static= + +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +-$as_echo_n "checking for $compiler option to produce PIC... " >&6; } + + if test "$GCC" = yes; then + lt_prog_compiler_wl='-Wl,' +@@ -8340,6 +8838,12 @@ $as_echo_n "checking for $compiler optio + lt_prog_compiler_pic='--shared' + lt_prog_compiler_static='--static' + ;; ++ nagfor*) ++ # NAG Fortran compiler ++ lt_prog_compiler_wl='-Wl,-Wl,,' ++ lt_prog_compiler_pic='-PIC' ++ lt_prog_compiler_static='-Bstatic' ++ ;; + pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) +@@ -8402,7 +8906,7 @@ $as_echo_n "checking for $compiler optio + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + case $cc_basename in +- f77* | f90* | f95*) ++ f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) + lt_prog_compiler_wl='-Qoption ld ';; + *) + lt_prog_compiler_wl='-Wl,';; +@@ -8459,13 +8963,17 @@ case $host_os in + lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" + ;; + esac +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5 +-$as_echo "$lt_prog_compiler_pic" >&6; } +- +- +- +- + ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 ++$as_echo_n "checking for $compiler option to produce PIC... " >&6; } ++if test "${lt_cv_prog_compiler_pic+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ lt_cv_prog_compiler_pic=$lt_prog_compiler_pic ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 ++$as_echo "$lt_cv_prog_compiler_pic" >&6; } ++lt_prog_compiler_pic=$lt_cv_prog_compiler_pic + + # + # Check to make sure the PIC flag actually works. +@@ -8526,6 +9034,11 @@ fi + + + ++ ++ ++ ++ ++ + # + # Check to make sure the static flag actually works. + # +@@ -8876,7 +9389,8 @@ _LT_EOF + allow_undefined_flag=unsupported + always_export_symbols=no + enable_shared_with_static_runtimes=yes +- export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' ++ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' ++ exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' +@@ -8924,7 +9438,7 @@ _LT_EOF + if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ + && test "$tmp_diet" = no + then +- tmp_addflag= ++ tmp_addflag=' $pic_flag' + tmp_sharedflag='-shared' + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler +@@ -8975,12 +9489,12 @@ _LT_EOF + whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' + hardcode_libdir_flag_spec= + hardcode_libdir_flag_spec_ld='-rpath $libdir' +- archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' ++ archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' + if test "x$supports_anon_versioning" = xyes; then + archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ +- $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' ++ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + fi + ;; + esac +@@ -8994,8 +9508,8 @@ _LT_EOF + archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else +- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' +- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ++ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' ++ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + +@@ -9013,8 +9527,8 @@ _LT_EOF + + _LT_EOF + elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then +- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' +- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ++ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' ++ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi +@@ -9060,8 +9574,8 @@ _LT_EOF + + *) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then +- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' +- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ++ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' ++ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi +@@ -9191,7 +9705,13 @@ _LT_EOF + allow_undefined_flag='-berok' + # Determine the default libpath from the value encoded in an + # empty executable. +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ if test "${lt_cv_aix_libpath+set}" = set; then ++ aix_libpath=$lt_cv_aix_libpath ++else ++ if test "${lt_cv_aix_libpath_+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + int +@@ -9204,22 +9724,29 @@ main () + _ACEOF + if ac_fn_c_try_link "$LINENO"; then : + +-lt_aix_libpath_sed=' +- /Import File Strings/,/^$/ { +- /^0/ { +- s/^0 *\(.*\)$/\1/ +- p +- } +- }' +-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +-# Check for a 64-bit object if we didn't find anything. +-if test -z "$aix_libpath"; then +- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +-fi ++ lt_aix_libpath_sed=' ++ /Import File Strings/,/^$/ { ++ /^0/ { ++ s/^0 *\([^ ]*\) *$/\1/ ++ p ++ } ++ }' ++ lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` ++ # Check for a 64-bit object if we didn't find anything. ++ if test -z "$lt_cv_aix_libpath_"; then ++ lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` ++ fi + fi + rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ++ if test -z "$lt_cv_aix_libpath_"; then ++ lt_cv_aix_libpath_="/usr/lib:/lib" ++ fi ++ ++fi ++ ++ aix_libpath=$lt_cv_aix_libpath_ ++fi + + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" +@@ -9231,7 +9758,13 @@ if test -z "$aix_libpath"; then aix_libp + else + # Determine the default libpath from the value encoded in an + # empty executable. +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ if test "${lt_cv_aix_libpath+set}" = set; then ++ aix_libpath=$lt_cv_aix_libpath ++else ++ if test "${lt_cv_aix_libpath_+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + int +@@ -9244,22 +9777,29 @@ main () + _ACEOF + if ac_fn_c_try_link "$LINENO"; then : + +-lt_aix_libpath_sed=' +- /Import File Strings/,/^$/ { +- /^0/ { +- s/^0 *\(.*\)$/\1/ +- p +- } +- }' +-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +-# Check for a 64-bit object if we didn't find anything. +-if test -z "$aix_libpath"; then +- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +-fi ++ lt_aix_libpath_sed=' ++ /Import File Strings/,/^$/ { ++ /^0/ { ++ s/^0 *\([^ ]*\) *$/\1/ ++ p ++ } ++ }' ++ lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` ++ # Check for a 64-bit object if we didn't find anything. ++ if test -z "$lt_cv_aix_libpath_"; then ++ lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` ++ fi + fi + rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ++ if test -z "$lt_cv_aix_libpath_"; then ++ lt_cv_aix_libpath_="/usr/lib:/lib" ++ fi ++ ++fi ++ ++ aix_libpath=$lt_cv_aix_libpath_ ++fi + + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, +@@ -9304,20 +9844,63 @@ if test -z "$aix_libpath"; then aix_libp + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. +- hardcode_libdir_flag_spec=' ' +- allow_undefined_flag=unsupported +- # Tell ltmain to make .lib files, not .a files. +- libext=lib +- # Tell ltmain to make .dll files, not .so files. +- shrext_cmds=".dll" +- # FIXME: Setting linknames here is a bad hack. +- archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' +- # The linker will automatically build a .lib file if we build a DLL. +- old_archive_from_new_cmds='true' +- # FIXME: Should let the user specify the lib program. +- old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' +- fix_srcfile_path='`cygpath -w "$srcfile"`' +- enable_shared_with_static_runtimes=yes ++ case $cc_basename in ++ cl*) ++ # Native MSVC ++ hardcode_libdir_flag_spec=' ' ++ allow_undefined_flag=unsupported ++ always_export_symbols=yes ++ file_list_spec='@' ++ # Tell ltmain to make .lib files, not .a files. ++ libext=lib ++ # Tell ltmain to make .dll files, not .so files. ++ shrext_cmds=".dll" ++ # FIXME: Setting linknames here is a bad hack. ++ archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' ++ archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then ++ sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; ++ else ++ sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; ++ fi~ ++ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ ++ linknames=' ++ # The linker will not automatically build a static lib if we build a DLL. ++ # _LT_TAGVAR(old_archive_from_new_cmds, )='true' ++ enable_shared_with_static_runtimes=yes ++ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' ++ # Don't use ranlib ++ old_postinstall_cmds='chmod 644 $oldlib' ++ postlink_cmds='lt_outputfile="@OUTPUT@"~ ++ lt_tool_outputfile="@TOOL_OUTPUT@"~ ++ case $lt_outputfile in ++ *.exe|*.EXE) ;; ++ *) ++ lt_outputfile="$lt_outputfile.exe" ++ lt_tool_outputfile="$lt_tool_outputfile.exe" ++ ;; ++ esac~ ++ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then ++ $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; ++ $RM "$lt_outputfile.manifest"; ++ fi' ++ ;; ++ *) ++ # Assume MSVC wrapper ++ hardcode_libdir_flag_spec=' ' ++ allow_undefined_flag=unsupported ++ # Tell ltmain to make .lib files, not .a files. ++ libext=lib ++ # Tell ltmain to make .dll files, not .so files. ++ shrext_cmds=".dll" ++ # FIXME: Setting linknames here is a bad hack. ++ archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' ++ # The linker will automatically build a .lib file if we build a DLL. ++ old_archive_from_new_cmds='true' ++ # FIXME: Should let the user specify the lib program. ++ old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' ++ enable_shared_with_static_runtimes=yes ++ ;; ++ esac + ;; + + darwin* | rhapsody*) +@@ -9382,7 +9965,7 @@ if test -z "$aix_libpath"; then aix_libp + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) +- archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' ++ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no +@@ -9390,7 +9973,7 @@ if test -z "$aix_libpath"; then aix_libp + + hpux9*) + if test "$GCC" = yes; then +- archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ++ archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + fi +@@ -9406,7 +9989,7 @@ if test -z "$aix_libpath"; then aix_libp + + hpux10*) + if test "$GCC" = yes && test "$with_gnu_ld" = no; then +- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ++ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi +@@ -9430,10 +10013,10 @@ if test -z "$aix_libpath"; then aix_libp + archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) +- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ++ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) +- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ++ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else +@@ -9512,23 +10095,36 @@ fi + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then +- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ++ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + # Try to use the -exported_symbol ld option, if it does not + # work, assume that -exports_file does not work either and + # implicitly export all symbols. +- save_LDFLAGS="$LDFLAGS" +- LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ # This should be the same for all languages, so no per-tag cache variable. ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 ++$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } ++if test "${lt_cv_irix_exported_symbol+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ save_LDFLAGS="$LDFLAGS" ++ LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-int foo(void) {} ++int foo (void) { return 0; } + _ACEOF + if ac_fn_c_try_link "$LINENO"; then : +- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' +- ++ lt_cv_irix_exported_symbol=yes ++else ++ lt_cv_irix_exported_symbol=no + fi + rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +- LDFLAGS="$save_LDFLAGS" ++ LDFLAGS="$save_LDFLAGS" ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 ++$as_echo "$lt_cv_irix_exported_symbol" >&6; } ++ if test "$lt_cv_irix_exported_symbol" = yes; then ++ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' ++ fi + else + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' +@@ -9613,7 +10209,7 @@ rm -f core conftest.err conftest.$ac_obj + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' +- archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ++ archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + else + allow_undefined_flag=' -expect_unresolved \*' +@@ -9632,9 +10228,9 @@ rm -f core conftest.err conftest.$ac_obj + no_undefined_flag=' -z defs' + if test "$GCC" = yes; then + wlarc='${wl}' +- archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ++ archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ +- $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ++ $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + else + case `$CC -V 2>&1` in + *"Compilers 5.0"*) +@@ -10210,8 +10806,9 @@ cygwin* | mingw* | pw32* | cegcc*) + need_version=no + need_lib_prefix=no + +- case $GCC,$host_os in +- yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) ++ case $GCC,$cc_basename in ++ yes,*) ++ # gcc + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ +@@ -10244,13 +10841,71 @@ cygwin* | mingw* | pw32* | cegcc*) + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + esac ++ dynamic_linker='Win32 ld.exe' ++ ;; ++ ++ *,cl*) ++ # Native MSVC ++ libname_spec='$name' ++ soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ++ library_names_spec='${libname}.dll.lib' ++ ++ case $build_os in ++ mingw*) ++ sys_lib_search_path_spec= ++ lt_save_ifs=$IFS ++ IFS=';' ++ for lt_path in $LIB ++ do ++ IFS=$lt_save_ifs ++ # Let DOS variable expansion print the short 8.3 style file name. ++ lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` ++ sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" ++ done ++ IFS=$lt_save_ifs ++ # Convert to MSYS style. ++ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ++ ;; ++ cygwin*) ++ # Convert to unix form, then to dos form, then back to unix form ++ # but this time dos style (no spaces!) so that the unix form looks ++ # like /cygdrive/c/PROGRA~1:/cygdr... ++ sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` ++ sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` ++ sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ++ ;; ++ *) ++ sys_lib_search_path_spec="$LIB" ++ if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then ++ # It is most probably a Windows format PATH. ++ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` ++ else ++ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ++ fi ++ # FIXME: find the short name or the path components, as spaces are ++ # common. (e.g. "Program Files" -> "PROGRA~1") ++ ;; ++ esac ++ ++ # DLL is installed to $(libdir)/../bin by postinstall_cmds ++ postinstall_cmds='base_file=`basename \${file}`~ ++ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ ++ dldir=$destdir/`dirname \$dlpath`~ ++ test -d \$dldir || mkdir -p \$dldir~ ++ $install_prog $dir/$dlname \$dldir/$dlname' ++ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ ++ dlpath=$dir/\$dldll~ ++ $RM \$dlpath' ++ shlibpath_overrides_runpath=yes ++ dynamic_linker='Win32 link.exe' + ;; + + *) ++ # Assume MSVC wrapper + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ++ dynamic_linker='Win32 ld.exe' + ;; + esac +- dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; +@@ -10346,7 +11001,7 @@ haiku*) + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LIBRARY_PATH + shlibpath_overrides_runpath=yes +- sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib' ++ sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' + hardcode_into_libs=yes + ;; + +@@ -11142,7 +11797,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 11145 "configure" ++#line $LINENO "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -11186,10 +11841,10 @@ else + /* When -fvisbility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ + #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +-void fnord () __attribute__((visibility("default"))); ++int fnord () __attribute__((visibility("default"))); + #endif + +-void fnord () { int i=42; } ++int fnord () { return 42; } + int main () + { + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); +@@ -11248,7 +11903,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 11251 "configure" ++#line $LINENO "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -11292,10 +11947,10 @@ else + /* When -fvisbility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ + #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +-void fnord () __attribute__((visibility("default"))); ++int fnord () __attribute__((visibility("default"))); + #endif + +-void fnord () { int i=42; } ++int fnord () { return 42; } + int main () + { + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); +@@ -12328,7 +12983,7 @@ if test "$enable_shared" = "yes"; then + # since libbfd may not pull in the entirety of libiberty. + x=`sed -n -e 's/^[ ]*PICFLAG[ ]*=[ ]*//p' < ../libiberty/Makefile | sed -n '$p'` + if test -n "$x"; then +- SHARED_LIBADD="-L`pwd`/../libiberty/pic -liberty" ++ SHARED_LIBADD="`pwd`/../libiberty/pic/libiberty.a" + fi + + case "${host}" in +@@ -13289,13 +13944,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_ + lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' + lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' + lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' ++lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' ++lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' + reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' + reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' + OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' + deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' + file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' ++file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' ++want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' ++DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' ++sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' + AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' + AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' ++archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' + STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' + RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' + old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' +@@ -13310,14 +13972,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$l + lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' + lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' + lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' ++nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' ++lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' + objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' + MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' + lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' +-lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' + lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' ++lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' + lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' + lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' + need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' ++MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' + DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' + NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' + LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' +@@ -13350,12 +14015,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcod + hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' + inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' + link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' +-fix_srcfile_path='`$ECHO "$fix_srcfile_path" | $SED "$delay_single_quote_subst"`' + always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' + export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' + exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' + include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' + prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' ++postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' + file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' + variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' + need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' +@@ -13410,8 +14075,13 @@ reload_flag \ + OBJDUMP \ + deplibs_check_method \ + file_magic_cmd \ ++file_magic_glob \ ++want_nocaseglob \ ++DLLTOOL \ ++sharedlib_from_linklib_cmd \ + AR \ + AR_FLAGS \ ++archiver_list_spec \ + STRIP \ + RANLIB \ + CC \ +@@ -13421,12 +14091,14 @@ lt_cv_sys_global_symbol_pipe \ + lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ ++nm_file_list_spec \ + lt_prog_compiler_no_builtin_flag \ +-lt_prog_compiler_wl \ + lt_prog_compiler_pic \ ++lt_prog_compiler_wl \ + lt_prog_compiler_static \ + lt_cv_prog_compiler_c_o \ + need_locks \ ++MANIFEST_TOOL \ + DSYMUTIL \ + NMEDIT \ + LIPO \ +@@ -13442,7 +14114,6 @@ no_undefined_flag \ + hardcode_libdir_flag_spec \ + hardcode_libdir_flag_spec_ld \ + hardcode_libdir_separator \ +-fix_srcfile_path \ + exclude_expsyms \ + include_expsyms \ + file_list_spec \ +@@ -13478,6 +14149,7 @@ module_cmds \ + module_expsym_cmds \ + export_symbols_cmds \ + prelink_cmds \ ++postlink_cmds \ + postinstall_cmds \ + postuninstall_cmds \ + finish_cmds \ +@@ -14234,7 +14906,8 @@ $as_echo X"$file" | + # NOTE: Changes made to this file will be lost: look at ltmain.sh. + # + # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +-# 2006, 2007, 2008, 2009 Free Software Foundation, Inc. ++# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, ++# Inc. + # Written by Gordon Matzigkeit, 1996 + # + # This file is part of GNU Libtool. +@@ -14337,19 +15010,42 @@ SP2NL=$lt_lt_SP2NL + # turn newlines into spaces. + NL2SP=$lt_lt_NL2SP + ++# convert \$build file names to \$host format. ++to_host_file_cmd=$lt_cv_to_host_file_cmd ++ ++# convert \$build files to toolchain format. ++to_tool_file_cmd=$lt_cv_to_tool_file_cmd ++ + # An object symbol dumper. + OBJDUMP=$lt_OBJDUMP + + # Method to check whether dependent libraries are shared objects. + deplibs_check_method=$lt_deplibs_check_method + +-# Command to use when deplibs_check_method == "file_magic". ++# Command to use when deplibs_check_method = "file_magic". + file_magic_cmd=$lt_file_magic_cmd + ++# How to find potential files when deplibs_check_method = "file_magic". ++file_magic_glob=$lt_file_magic_glob ++ ++# Find potential files using nocaseglob when deplibs_check_method = "file_magic". ++want_nocaseglob=$lt_want_nocaseglob ++ ++# DLL creation program. ++DLLTOOL=$lt_DLLTOOL ++ ++# Command to associate shared and link libraries. ++sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd ++ + # The archiver. + AR=$lt_AR ++ ++# Flags to create an archive. + AR_FLAGS=$lt_AR_FLAGS + ++# How to feed a file listing to the archiver. ++archiver_list_spec=$lt_archiver_list_spec ++ + # A symbol stripping program. + STRIP=$lt_STRIP + +@@ -14379,6 +15075,12 @@ global_symbol_to_c_name_address=$lt_lt_c + # Transform the output of nm in a C name address pair when lib prefix is needed. + global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix + ++# Specify filename containing input files for \$NM. ++nm_file_list_spec=$lt_nm_file_list_spec ++ ++# The root where to search for dependent libraries,and in which our libraries should be installed. ++lt_sysroot=$lt_sysroot ++ + # The name of the directory that contains temporary libtool files. + objdir=$objdir + +@@ -14388,6 +15090,9 @@ MAGIC_CMD=$MAGIC_CMD + # Must we lock files when doing compilation? + need_locks=$lt_need_locks + ++# Manifest tool. ++MANIFEST_TOOL=$lt_MANIFEST_TOOL ++ + # Tool to manipulate archived DWARF debug symbol files on Mac OS X. + DSYMUTIL=$lt_DSYMUTIL + +@@ -14502,12 +15207,12 @@ with_gcc=$GCC + # Compiler flag to turn off builtin functions. + no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag + +-# How to pass a linker flag through the compiler. +-wl=$lt_lt_prog_compiler_wl +- + # Additional compiler flags for building library objects. + pic_flag=$lt_lt_prog_compiler_pic + ++# How to pass a linker flag through the compiler. ++wl=$lt_lt_prog_compiler_wl ++ + # Compiler flag to prevent dynamic linking. + link_static_flag=$lt_lt_prog_compiler_static + +@@ -14594,9 +15299,6 @@ inherit_rpath=$inherit_rpath + # Whether libtool must link a program against all its dependency libraries. + link_all_deplibs=$link_all_deplibs + +-# Fix the shell variable \$srcfile for the compiler. +-fix_srcfile_path=$lt_fix_srcfile_path +- + # Set to "yes" if exported symbols are required. + always_export_symbols=$always_export_symbols + +@@ -14612,6 +15314,9 @@ include_expsyms=$lt_include_expsyms + # Commands necessary for linking programs (against libraries) with templates. + prelink_cmds=$lt_prelink_cmds + ++# Commands necessary for finishing linking programs. ++postlink_cmds=$lt_postlink_cmds ++ + # Specify filename containing input files. + file_list_spec=$lt_file_list_spec + +@@ -14644,210 +15349,169 @@ ltmain="$ac_aux_dir/ltmain.sh" + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? +- sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ +- || (rm -f "$cfgfile"; exit 1) +- +- case $xsi_shell in +- yes) +- cat << \_LT_EOF >> "$cfgfile" +- +-# func_dirname file append nondir_replacement +-# Compute the dirname of FILE. If nonempty, add APPEND to the result, +-# otherwise set result to NONDIR_REPLACEMENT. +-func_dirname () +-{ +- case ${1} in +- */*) func_dirname_result="${1%/*}${2}" ;; +- * ) func_dirname_result="${3}" ;; +- esac +-} +- +-# func_basename file +-func_basename () +-{ +- func_basename_result="${1##*/}" +-} +- +-# func_dirname_and_basename file append nondir_replacement +-# perform func_basename and func_dirname in a single function +-# call: +-# dirname: Compute the dirname of FILE. If nonempty, +-# add APPEND to the result, otherwise set result +-# to NONDIR_REPLACEMENT. +-# value returned in "$func_dirname_result" +-# basename: Compute filename of FILE. +-# value retuned in "$func_basename_result" +-# Implementation must be kept synchronized with func_dirname +-# and func_basename. For efficiency, we do not delegate to +-# those functions but instead duplicate the functionality here. +-func_dirname_and_basename () +-{ +- case ${1} in +- */*) func_dirname_result="${1%/*}${2}" ;; +- * ) func_dirname_result="${3}" ;; +- esac +- func_basename_result="${1##*/}" +-} +- +-# func_stripname prefix suffix name +-# strip PREFIX and SUFFIX off of NAME. +-# PREFIX and SUFFIX must not contain globbing or regex special +-# characters, hashes, percent signs, but SUFFIX may contain a leading +-# dot (in which case that matches only a dot). +-func_stripname () +-{ +- # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are +- # positional parameters, so assign one to ordinary parameter first. +- func_stripname_result=${3} +- func_stripname_result=${func_stripname_result#"${1}"} +- func_stripname_result=${func_stripname_result%"${2}"} +-} +- +-# func_opt_split +-func_opt_split () +-{ +- func_opt_split_opt=${1%%=*} +- func_opt_split_arg=${1#*=} +-} +- +-# func_lo2o object +-func_lo2o () +-{ +- case ${1} in +- *.lo) func_lo2o_result=${1%.lo}.${objext} ;; +- *) func_lo2o_result=${1} ;; +- esac +-} +- +-# func_xform libobj-or-source +-func_xform () +-{ +- func_xform_result=${1%.*}.lo +-} +- +-# func_arith arithmetic-term... +-func_arith () +-{ +- func_arith_result=$(( $* )) +-} +- +-# func_len string +-# STRING may not start with a hyphen. +-func_len () +-{ +- func_len_result=${#1} +-} +- +-_LT_EOF +- ;; +- *) # Bourne compatible functions. +- cat << \_LT_EOF >> "$cfgfile" +- +-# func_dirname file append nondir_replacement +-# Compute the dirname of FILE. If nonempty, add APPEND to the result, +-# otherwise set result to NONDIR_REPLACEMENT. +-func_dirname () +-{ +- # Extract subdirectory from the argument. +- func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` +- if test "X$func_dirname_result" = "X${1}"; then +- func_dirname_result="${3}" +- else +- func_dirname_result="$func_dirname_result${2}" +- fi +-} +- +-# func_basename file +-func_basename () +-{ +- func_basename_result=`$ECHO "${1}" | $SED "$basename"` +-} +- +- +-# func_stripname prefix suffix name +-# strip PREFIX and SUFFIX off of NAME. +-# PREFIX and SUFFIX must not contain globbing or regex special +-# characters, hashes, percent signs, but SUFFIX may contain a leading +-# dot (in which case that matches only a dot). +-# func_strip_suffix prefix name +-func_stripname () +-{ +- case ${2} in +- .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; +- *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; +- esac +-} +- +-# sed scripts: +-my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q' +-my_sed_long_arg='1s/^-[^=]*=//' +- +-# func_opt_split +-func_opt_split () +-{ +- func_opt_split_opt=`$ECHO "${1}" | $SED "$my_sed_long_opt"` +- func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"` +-} +- +-# func_lo2o object +-func_lo2o () +-{ +- func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` +-} +- +-# func_xform libobj-or-source +-func_xform () +-{ +- func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` +-} +- +-# func_arith arithmetic-term... +-func_arith () +-{ +- func_arith_result=`expr "$@"` +-} +- +-# func_len string +-# STRING may not start with a hyphen. +-func_len () +-{ +- func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` +-} +- +-_LT_EOF +-esac +- +-case $lt_shell_append in +- yes) +- cat << \_LT_EOF >> "$cfgfile" +- +-# func_append var value +-# Append VALUE to the end of shell variable VAR. +-func_append () +-{ +- eval "$1+=\$2" +-} +-_LT_EOF +- ;; +- *) +- cat << \_LT_EOF >> "$cfgfile" +- +-# func_append var value +-# Append VALUE to the end of shell variable VAR. +-func_append () +-{ +- eval "$1=\$$1\$2" +-} +- +-_LT_EOF +- ;; +- esac ++ sed '$q' "$ltmain" >> "$cfgfile" \ ++ || (rm -f "$cfgfile"; exit 1) + ++ if test x"$xsi_shell" = xyes; then ++ sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ ++func_dirname ()\ ++{\ ++\ case ${1} in\ ++\ */*) func_dirname_result="${1%/*}${2}" ;;\ ++\ * ) func_dirname_result="${3}" ;;\ ++\ esac\ ++} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_basename ()$/,/^} # func_basename /c\ ++func_basename ()\ ++{\ ++\ func_basename_result="${1##*/}"\ ++} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ ++func_dirname_and_basename ()\ ++{\ ++\ case ${1} in\ ++\ */*) func_dirname_result="${1%/*}${2}" ;;\ ++\ * ) func_dirname_result="${3}" ;;\ ++\ esac\ ++\ func_basename_result="${1##*/}"\ ++} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ ++func_stripname ()\ ++{\ ++\ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ ++\ # positional parameters, so assign one to ordinary parameter first.\ ++\ func_stripname_result=${3}\ ++\ func_stripname_result=${func_stripname_result#"${1}"}\ ++\ func_stripname_result=${func_stripname_result%"${2}"}\ ++} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ ++func_split_long_opt ()\ ++{\ ++\ func_split_long_opt_name=${1%%=*}\ ++\ func_split_long_opt_arg=${1#*=}\ ++} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ ++func_split_short_opt ()\ ++{\ ++\ func_split_short_opt_arg=${1#??}\ ++\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ ++} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ ++func_lo2o ()\ ++{\ ++\ case ${1} in\ ++\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ ++\ *) func_lo2o_result=${1} ;;\ ++\ esac\ ++} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_xform ()$/,/^} # func_xform /c\ ++func_xform ()\ ++{\ ++ func_xform_result=${1%.*}.lo\ ++} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_arith ()$/,/^} # func_arith /c\ ++func_arith ()\ ++{\ ++ func_arith_result=$(( $* ))\ ++} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_len ()$/,/^} # func_len /c\ ++func_len ()\ ++{\ ++ func_len_result=${#1}\ ++} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++fi ++ ++if test x"$lt_shell_append" = xyes; then ++ sed -e '/^func_append ()$/,/^} # func_append /c\ ++func_append ()\ ++{\ ++ eval "${1}+=\\${2}"\ ++} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ ++func_append_quoted ()\ ++{\ ++\ func_quote_for_eval "${2}"\ ++\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ ++} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ # Save a `func_append' function call where possible by direct use of '+=' ++ sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++ test 0 -eq $? || _lt_function_replace_fail=: ++else ++ # Save a `func_append' function call even when '+=' is not available ++ sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++ test 0 -eq $? || _lt_function_replace_fail=: ++fi ++ ++if test x"$_lt_function_replace_fail" = x":"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 ++$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} ++fi + +- sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ +- || (rm -f "$cfgfile"; exit 1) + +- mv -f "$cfgfile" "$ofile" || ++ mv -f "$cfgfile" "$ofile" || + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" + +Index: binutils-2.21.1/binutils/configure +=================================================================== +--- binutils-2.21.1.orig/binutils/configure ++++ binutils-2.21.1/binutils/configure +@@ -654,8 +654,11 @@ OTOOL + LIPO + NMEDIT + DSYMUTIL ++MANIFEST_TOOL + RANLIB ++ac_ct_AR + AR ++DLLTOOL + OBJDUMP + LN_S + NM +@@ -768,6 +771,7 @@ enable_static + with_pic + enable_fast_install + with_gnu_ld ++with_libtool_sysroot + enable_libtool_lock + enable_targets + enable_werror +@@ -1429,6 +1433,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-gnu-ld assume the C compiler uses GNU ld default=no + --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib + --without-libiconv-prefix don't search for libiconv in includedir and libdir +@@ -5146,8 +5152,8 @@ esac + + + +-macro_version='2.2.7a' +-macro_revision='1.3134' ++macro_version='2.4' ++macro_revision='1.3293' + + + +@@ -5187,7 +5193,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 + $as_echo_n "checking how to print strings... " >&6; } + # Test print first, because it will be a builtin if present. +-if test "X`print -r -- -n 2>/dev/null`" = X-n && \ ++if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ + test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='print -r --' + elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then +@@ -5873,8 +5879,8 @@ $as_echo_n "checking whether the shell u + # Try some XSI features + xsi_shell=no + ( _lt_dummy="a/b/c" +- test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ +- = c,a/b,, \ ++ test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ ++ = c,a/b,b/c, \ + && eval 'test $(( 1 + 1 )) -eq 2 \ + && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ + && xsi_shell=yes +@@ -5923,6 +5929,80 @@ esac + + + ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 ++$as_echo_n "checking how to convert $build file names to $host format... " >&6; } ++if test "${lt_cv_to_host_file_cmd+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ case $host in ++ *-*-mingw* ) ++ case $build in ++ *-*-mingw* ) # actually msys ++ lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ++ ;; ++ *-*-cygwin* ) ++ lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ++ ;; ++ * ) # otherwise, assume *nix ++ lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ++ ;; ++ esac ++ ;; ++ *-*-cygwin* ) ++ case $build in ++ *-*-mingw* ) # actually msys ++ lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ++ ;; ++ *-*-cygwin* ) ++ lt_cv_to_host_file_cmd=func_convert_file_noop ++ ;; ++ * ) # otherwise, assume *nix ++ lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ++ ;; ++ esac ++ ;; ++ * ) # unhandled hosts (and "normal" native builds) ++ lt_cv_to_host_file_cmd=func_convert_file_noop ++ ;; ++esac ++ ++fi ++ ++to_host_file_cmd=$lt_cv_to_host_file_cmd ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 ++$as_echo "$lt_cv_to_host_file_cmd" >&6; } ++ ++ ++ ++ ++ ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 ++$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } ++if test "${lt_cv_to_tool_file_cmd+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ #assume ordinary cross tools, or native build. ++lt_cv_to_tool_file_cmd=func_convert_file_noop ++case $host in ++ *-*-mingw* ) ++ case $build in ++ *-*-mingw* ) # actually msys ++ lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ++ ;; ++ esac ++ ;; ++esac ++ ++fi ++ ++to_tool_file_cmd=$lt_cv_to_tool_file_cmd ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 ++$as_echo "$lt_cv_to_tool_file_cmd" >&6; } ++ ++ ++ ++ ++ + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 + $as_echo_n "checking for $LD option to reload object files... " >&6; } + if test "${lt_cv_ld_reload_flag+set}" = set; then : +@@ -5939,6 +6019,11 @@ case $reload_flag in + esac + reload_cmds='$LD$reload_flag -o $output$reload_objs' + case $host_os in ++ cygwin* | mingw* | pw32* | cegcc*) ++ if test "$GCC" != yes; then ++ reload_cmds=false ++ fi ++ ;; + darwin*) + if test "$GCC" = yes; then + reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' +@@ -6107,7 +6192,8 @@ mingw* | pw32*) + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + else +- lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' ++ # Keep this pattern in sync with the one in func_win32_libid. ++ lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' + lt_cv_file_magic_cmd='$OBJDUMP -f' + fi + ;; +@@ -6261,6 +6347,21 @@ esac + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 + $as_echo "$lt_cv_deplibs_check_method" >&6; } ++ ++file_magic_glob= ++want_nocaseglob=no ++if test "$build" = "$host"; then ++ case $host_os in ++ mingw* | pw32*) ++ if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then ++ want_nocaseglob=yes ++ else ++ file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` ++ fi ++ ;; ++ esac ++fi ++ + file_magic_cmd=$lt_cv_file_magic_cmd + deplibs_check_method=$lt_cv_deplibs_check_method + test -z "$deplibs_check_method" && deplibs_check_method=unknown +@@ -6276,9 +6377,162 @@ test -z "$deplibs_check_method" && depli + + + ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + if test -n "$ac_tool_prefix"; then +- # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. +-set dummy ${ac_tool_prefix}ar; ac_word=$2 ++ # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. ++set dummy ${ac_tool_prefix}dlltool; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if test "${ac_cv_prog_DLLTOOL+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test -n "$DLLTOOL"; then ++ ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ++ ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++ done ++IFS=$as_save_IFS ++ ++fi ++fi ++DLLTOOL=$ac_cv_prog_DLLTOOL ++if test -n "$DLLTOOL"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 ++$as_echo "$DLLTOOL" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++fi ++ ++ ++fi ++if test -z "$ac_cv_prog_DLLTOOL"; then ++ ac_ct_DLLTOOL=$DLLTOOL ++ # Extract the first word of "dlltool", so it can be a program name with args. ++set dummy dlltool; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test -n "$ac_ct_DLLTOOL"; then ++ ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ++ ac_cv_prog_ac_ct_DLLTOOL="dlltool" ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++ done ++IFS=$as_save_IFS ++ ++fi ++fi ++ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL ++if test -n "$ac_ct_DLLTOOL"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 ++$as_echo "$ac_ct_DLLTOOL" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++fi ++ ++ if test "x$ac_ct_DLLTOOL" = x; then ++ DLLTOOL="false" ++ else ++ case $cross_compiling:$ac_tool_warned in ++yes:) ++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 ++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ++ac_tool_warned=yes ;; ++esac ++ DLLTOOL=$ac_ct_DLLTOOL ++ fi ++else ++ DLLTOOL="$ac_cv_prog_DLLTOOL" ++fi ++ ++test -z "$DLLTOOL" && DLLTOOL=dlltool ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 ++$as_echo_n "checking how to associate runtime and link libraries... " >&6; } ++if test "${lt_cv_sharedlib_from_linklib_cmd+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ lt_cv_sharedlib_from_linklib_cmd='unknown' ++ ++case $host_os in ++cygwin* | mingw* | pw32* | cegcc*) ++ # two different shell functions defined in ltmain.sh ++ # decide which to use based on capabilities of $DLLTOOL ++ case `$DLLTOOL --help 2>&1` in ++ *--identify-strict*) ++ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ++ ;; ++ *) ++ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ++ ;; ++ esac ++ ;; ++*) ++ # fallback: assume linklib IS sharedlib ++ lt_cv_sharedlib_from_linklib_cmd="$ECHO" ++ ;; ++esac ++ ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 ++$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } ++sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd ++test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO ++ ++ ++ ++ ++ ++ ++ ++if test -n "$ac_tool_prefix"; then ++ for ac_prog in ar ++ do ++ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. ++set dummy $ac_tool_prefix$ac_prog; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } + if test "${ac_cv_prog_AR+set}" = set; then : +@@ -6294,7 +6548,7 @@ do + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then +- ac_cv_prog_AR="${ac_tool_prefix}ar" ++ ac_cv_prog_AR="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +@@ -6314,11 +6568,15 @@ $as_echo "no" >&6; } + fi + + ++ test -n "$AR" && break ++ done + fi +-if test -z "$ac_cv_prog_AR"; then ++if test -z "$AR"; then + ac_ct_AR=$AR +- # Extract the first word of "ar", so it can be a program name with args. +-set dummy ar; ac_word=$2 ++ for ac_prog in ar ++do ++ # Extract the first word of "$ac_prog", so it can be a program name with args. ++set dummy $ac_prog; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } + if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : +@@ -6334,7 +6592,7 @@ do + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then +- ac_cv_prog_ac_ct_AR="ar" ++ ac_cv_prog_ac_ct_AR="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +@@ -6353,6 +6611,10 @@ else + $as_echo "no" >&6; } + fi + ++ ++ test -n "$ac_ct_AR" && break ++done ++ + if test "x$ac_ct_AR" = x; then + AR="false" + else +@@ -6364,12 +6626,10 @@ ac_tool_warned=yes ;; + esac + AR=$ac_ct_AR + fi +-else +- AR="$ac_cv_prog_AR" + fi + +-test -z "$AR" && AR=ar +-test -z "$AR_FLAGS" && AR_FLAGS=cru ++: ${AR=ar} ++: ${AR_FLAGS=cru} + + + +@@ -6381,6 +6641,64 @@ test -z "$AR_FLAGS" && AR_FLAGS=cru + + + ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 ++$as_echo_n "checking for archiver @FILE support... " >&6; } ++if test "${lt_cv_ar_at_file+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ lt_cv_ar_at_file=no ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++ ++int ++main () ++{ ++ ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : ++ echo conftest.$ac_objext > conftest.lst ++ lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' ++ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 ++ (eval $lt_ar_try) 2>&5 ++ ac_status=$? ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; } ++ if test "$ac_status" -eq 0; then ++ # Ensure the archiver fails upon bogus file names. ++ rm -f conftest.$ac_objext libconftest.a ++ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 ++ (eval $lt_ar_try) 2>&5 ++ ac_status=$? ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; } ++ if test "$ac_status" -ne 0; then ++ lt_cv_ar_at_file=@ ++ fi ++ fi ++ rm -f conftest.* libconftest.a ++ ++fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 ++$as_echo "$lt_cv_ar_at_file" >&6; } ++ ++if test "x$lt_cv_ar_at_file" = xno; then ++ archiver_list_spec= ++else ++ archiver_list_spec=$lt_cv_ar_at_file ++fi ++ ++ ++ ++ ++ ++ ++ + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. + set dummy ${ac_tool_prefix}strip; ac_word=$2 +@@ -6715,8 +7033,8 @@ esac + lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + + # Transform an extracted symbol line into symbol name and symbol address +-lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" +-lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" ++lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" ++lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" + + # Handle CRLF in mingw tool chain + opt_cr= +@@ -6752,6 +7070,7 @@ for ac_symprfx in "" "_"; do + else + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + fi ++ lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" + + # Check to see that the pipe works correctly. + pipe_works=no +@@ -6793,6 +7112,18 @@ _LT_EOF + if $GREP ' nm_test_var$' "$nlist" >/dev/null; then + if $GREP ' nm_test_func$' "$nlist" >/dev/null; then + cat <<_LT_EOF > conftest.$ac_ext ++/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ ++#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) ++/* DATA imports from DLLs on WIN32 con't be const, because runtime ++ relocations are performed -- see ld's documentation on pseudo-relocs. */ ++# define LT_DLSYM_CONST ++#elif defined(__osf__) ++/* This system does not cope well with relocations in const data. */ ++# define LT_DLSYM_CONST ++#else ++# define LT_DLSYM_CONST const ++#endif ++ + #ifdef __cplusplus + extern "C" { + #endif +@@ -6804,7 +7135,7 @@ _LT_EOF + cat <<_LT_EOF >> conftest.$ac_ext + + /* The mapping between symbol names and symbols. */ +-const struct { ++LT_DLSYM_CONST struct { + const char *name; + void *address; + } +@@ -6830,8 +7161,8 @@ static const void *lt_preloaded_setup() + _LT_EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext +- lt_save_LIBS="$LIBS" +- lt_save_CFLAGS="$CFLAGS" ++ lt_globsym_save_LIBS=$LIBS ++ lt_globsym_save_CFLAGS=$CFLAGS + LIBS="conftstm.$ac_objext" + CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 +@@ -6841,8 +7172,8 @@ _LT_EOF + test $ac_status = 0; } && test -s conftest${ac_exeext}; then + pipe_works=yes + fi +- LIBS="$lt_save_LIBS" +- CFLAGS="$lt_save_CFLAGS" ++ LIBS=$lt_globsym_save_LIBS ++ CFLAGS=$lt_globsym_save_CFLAGS + else + echo "cannot find nm_test_func in $nlist" >&5 + fi +@@ -6879,6 +7210,19 @@ else + $as_echo "ok" >&6; } + fi + ++# Response file support. ++if test "$lt_cv_nm_interface" = "MS dumpbin"; then ++ nm_file_list_spec='@' ++elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then ++ nm_file_list_spec='@' ++fi ++ ++ ++ ++ ++ ++ ++ + + + +@@ -6899,6 +7243,42 @@ fi + + + ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 ++$as_echo_n "checking for sysroot... " >&6; } ++ ++# Check whether --with-libtool-sysroot was given. ++if test "${with_libtool_sysroot+set}" = set; then : ++ withval=$with_libtool_sysroot; ++else ++ with_libtool_sysroot=no ++fi ++ ++ ++lt_sysroot= ++case ${with_libtool_sysroot} in #( ++ yes) ++ if test "$GCC" = yes; then ++ lt_sysroot=`$CC --print-sysroot 2>/dev/null` ++ fi ++ ;; #( ++ /*) ++ lt_sysroot=`echo "$with_libtool_sysroot" | sed -e "$sed_quote_subst"` ++ ;; #( ++ no|'') ++ ;; #( ++ *) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libtool_sysroot}" >&5 ++$as_echo "${with_libtool_sysroot}" >&6; } ++ as_fn_error "The sysroot must be an absolute path." "$LINENO" 5 ++ ;; ++esac ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 ++$as_echo "${lt_sysroot:-no}" >&6; } ++ ++ ++ ++ + + # Check whether --enable-libtool-lock was given. + if test "${enable_libtool_lock+set}" = set; then : +@@ -7093,6 +7473,123 @@ esac + + need_locks="$enable_libtool_lock" + ++if test -n "$ac_tool_prefix"; then ++ # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. ++set dummy ${ac_tool_prefix}mt; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if test "${ac_cv_prog_MANIFEST_TOOL+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test -n "$MANIFEST_TOOL"; then ++ ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ++ ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++ done ++IFS=$as_save_IFS ++ ++fi ++fi ++MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL ++if test -n "$MANIFEST_TOOL"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 ++$as_echo "$MANIFEST_TOOL" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++fi ++ ++ ++fi ++if test -z "$ac_cv_prog_MANIFEST_TOOL"; then ++ ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL ++ # Extract the first word of "mt", so it can be a program name with args. ++set dummy mt; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if test "${ac_cv_prog_ac_ct_MANIFEST_TOOL+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test -n "$ac_ct_MANIFEST_TOOL"; then ++ ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ++ ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++ done ++IFS=$as_save_IFS ++ ++fi ++fi ++ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL ++if test -n "$ac_ct_MANIFEST_TOOL"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 ++$as_echo "$ac_ct_MANIFEST_TOOL" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++fi ++ ++ if test "x$ac_ct_MANIFEST_TOOL" = x; then ++ MANIFEST_TOOL=":" ++ else ++ case $cross_compiling:$ac_tool_warned in ++yes:) ++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 ++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ++ac_tool_warned=yes ;; ++esac ++ MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL ++ fi ++else ++ MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" ++fi ++ ++test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 ++$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } ++if test "${lt_cv_path_mainfest_tool+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ lt_cv_path_mainfest_tool=no ++ echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 ++ $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out ++ cat conftest.err >&5 ++ if $GREP 'Manifest Tool' conftest.out > /dev/null; then ++ lt_cv_path_mainfest_tool=yes ++ fi ++ rm -f conftest* ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 ++$as_echo "$lt_cv_path_mainfest_tool" >&6; } ++if test "x$lt_cv_path_mainfest_tool" != xyes; then ++ MANIFEST_TOOL=: ++fi ++ ++ ++ ++ ++ + + case $host_os in + rhapsody* | darwin*) +@@ -7656,6 +8153,8 @@ _LT_EOF + $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 + echo "$AR cru libconftest.a conftest.o" >&5 + $AR cru libconftest.a conftest.o 2>&5 ++ echo "$RANLIB libconftest.a" >&5 ++ $RANLIB libconftest.a 2>&5 + cat > conftest.c << _LT_EOF + int main() { return 0;} + _LT_EOF +@@ -7851,7 +8350,8 @@ fi + LIBTOOL_DEPS="$ltmain" + + # Always use our own libtool. +-LIBTOOL='$(SHELL) $(top_builddir)/libtool' ++LIBTOOL='$(SHELL) $(top_builddir)' ++LIBTOOL="$LIBTOOL/${host_alias}-libtool" + + + +@@ -7940,7 +8440,7 @@ aix3*) + esac + + # Global variables: +-ofile=libtool ++ofile=${host_alias}-libtool + can_build_shared=yes + + # All known linkers require a `.a' archive for static linking (except MSVC, +@@ -8238,8 +8738,6 @@ fi + lt_prog_compiler_pic= + lt_prog_compiler_static= + +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +-$as_echo_n "checking for $compiler option to produce PIC... " >&6; } + + if test "$GCC" = yes; then + lt_prog_compiler_wl='-Wl,' +@@ -8404,6 +8902,12 @@ $as_echo_n "checking for $compiler optio + lt_prog_compiler_pic='--shared' + lt_prog_compiler_static='--static' + ;; ++ nagfor*) ++ # NAG Fortran compiler ++ lt_prog_compiler_wl='-Wl,-Wl,,' ++ lt_prog_compiler_pic='-PIC' ++ lt_prog_compiler_static='-Bstatic' ++ ;; + pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) +@@ -8466,7 +8970,7 @@ $as_echo_n "checking for $compiler optio + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + case $cc_basename in +- f77* | f90* | f95*) ++ f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) + lt_prog_compiler_wl='-Qoption ld ';; + *) + lt_prog_compiler_wl='-Wl,';; +@@ -8523,13 +9027,17 @@ case $host_os in + lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" + ;; + esac +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5 +-$as_echo "$lt_prog_compiler_pic" >&6; } +- +- +- +- + ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 ++$as_echo_n "checking for $compiler option to produce PIC... " >&6; } ++if test "${lt_cv_prog_compiler_pic+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ lt_cv_prog_compiler_pic=$lt_prog_compiler_pic ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 ++$as_echo "$lt_cv_prog_compiler_pic" >&6; } ++lt_prog_compiler_pic=$lt_cv_prog_compiler_pic + + # + # Check to make sure the PIC flag actually works. +@@ -8590,6 +9098,11 @@ fi + + + ++ ++ ++ ++ ++ + # + # Check to make sure the static flag actually works. + # +@@ -8940,7 +9453,8 @@ _LT_EOF + allow_undefined_flag=unsupported + always_export_symbols=no + enable_shared_with_static_runtimes=yes +- export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' ++ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' ++ exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' +@@ -8988,7 +9502,7 @@ _LT_EOF + if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ + && test "$tmp_diet" = no + then +- tmp_addflag= ++ tmp_addflag=' $pic_flag' + tmp_sharedflag='-shared' + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler +@@ -9039,12 +9553,12 @@ _LT_EOF + whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' + hardcode_libdir_flag_spec= + hardcode_libdir_flag_spec_ld='-rpath $libdir' +- archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' ++ archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' + if test "x$supports_anon_versioning" = xyes; then + archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ +- $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' ++ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + fi + ;; + esac +@@ -9058,8 +9572,8 @@ _LT_EOF + archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else +- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' +- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ++ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' ++ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + +@@ -9077,8 +9591,8 @@ _LT_EOF + + _LT_EOF + elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then +- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' +- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ++ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' ++ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi +@@ -9124,8 +9638,8 @@ _LT_EOF + + *) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then +- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' +- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ++ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' ++ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi +@@ -9255,7 +9769,13 @@ _LT_EOF + allow_undefined_flag='-berok' + # Determine the default libpath from the value encoded in an + # empty executable. +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ if test "${lt_cv_aix_libpath+set}" = set; then ++ aix_libpath=$lt_cv_aix_libpath ++else ++ if test "${lt_cv_aix_libpath_+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + int +@@ -9268,22 +9788,29 @@ main () + _ACEOF + if ac_fn_c_try_link "$LINENO"; then : + +-lt_aix_libpath_sed=' +- /Import File Strings/,/^$/ { +- /^0/ { +- s/^0 *\(.*\)$/\1/ +- p +- } +- }' +-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +-# Check for a 64-bit object if we didn't find anything. +-if test -z "$aix_libpath"; then +- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +-fi ++ lt_aix_libpath_sed=' ++ /Import File Strings/,/^$/ { ++ /^0/ { ++ s/^0 *\([^ ]*\) *$/\1/ ++ p ++ } ++ }' ++ lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` ++ # Check for a 64-bit object if we didn't find anything. ++ if test -z "$lt_cv_aix_libpath_"; then ++ lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` ++ fi + fi + rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ++ if test -z "$lt_cv_aix_libpath_"; then ++ lt_cv_aix_libpath_="/usr/lib:/lib" ++ fi ++ ++fi ++ ++ aix_libpath=$lt_cv_aix_libpath_ ++fi + + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" +@@ -9295,7 +9822,13 @@ if test -z "$aix_libpath"; then aix_libp + else + # Determine the default libpath from the value encoded in an + # empty executable. +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ if test "${lt_cv_aix_libpath+set}" = set; then ++ aix_libpath=$lt_cv_aix_libpath ++else ++ if test "${lt_cv_aix_libpath_+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + int +@@ -9308,22 +9841,29 @@ main () + _ACEOF + if ac_fn_c_try_link "$LINENO"; then : + +-lt_aix_libpath_sed=' +- /Import File Strings/,/^$/ { +- /^0/ { +- s/^0 *\(.*\)$/\1/ +- p +- } +- }' +-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +-# Check for a 64-bit object if we didn't find anything. +-if test -z "$aix_libpath"; then +- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +-fi ++ lt_aix_libpath_sed=' ++ /Import File Strings/,/^$/ { ++ /^0/ { ++ s/^0 *\([^ ]*\) *$/\1/ ++ p ++ } ++ }' ++ lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` ++ # Check for a 64-bit object if we didn't find anything. ++ if test -z "$lt_cv_aix_libpath_"; then ++ lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` ++ fi + fi + rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ++ if test -z "$lt_cv_aix_libpath_"; then ++ lt_cv_aix_libpath_="/usr/lib:/lib" ++ fi ++ ++fi ++ ++ aix_libpath=$lt_cv_aix_libpath_ ++fi + + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, +@@ -9368,20 +9908,63 @@ if test -z "$aix_libpath"; then aix_libp + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. +- hardcode_libdir_flag_spec=' ' +- allow_undefined_flag=unsupported +- # Tell ltmain to make .lib files, not .a files. +- libext=lib +- # Tell ltmain to make .dll files, not .so files. +- shrext_cmds=".dll" +- # FIXME: Setting linknames here is a bad hack. +- archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' +- # The linker will automatically build a .lib file if we build a DLL. +- old_archive_from_new_cmds='true' +- # FIXME: Should let the user specify the lib program. +- old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' +- fix_srcfile_path='`cygpath -w "$srcfile"`' +- enable_shared_with_static_runtimes=yes ++ case $cc_basename in ++ cl*) ++ # Native MSVC ++ hardcode_libdir_flag_spec=' ' ++ allow_undefined_flag=unsupported ++ always_export_symbols=yes ++ file_list_spec='@' ++ # Tell ltmain to make .lib files, not .a files. ++ libext=lib ++ # Tell ltmain to make .dll files, not .so files. ++ shrext_cmds=".dll" ++ # FIXME: Setting linknames here is a bad hack. ++ archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' ++ archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then ++ sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; ++ else ++ sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; ++ fi~ ++ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ ++ linknames=' ++ # The linker will not automatically build a static lib if we build a DLL. ++ # _LT_TAGVAR(old_archive_from_new_cmds, )='true' ++ enable_shared_with_static_runtimes=yes ++ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' ++ # Don't use ranlib ++ old_postinstall_cmds='chmod 644 $oldlib' ++ postlink_cmds='lt_outputfile="@OUTPUT@"~ ++ lt_tool_outputfile="@TOOL_OUTPUT@"~ ++ case $lt_outputfile in ++ *.exe|*.EXE) ;; ++ *) ++ lt_outputfile="$lt_outputfile.exe" ++ lt_tool_outputfile="$lt_tool_outputfile.exe" ++ ;; ++ esac~ ++ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then ++ $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; ++ $RM "$lt_outputfile.manifest"; ++ fi' ++ ;; ++ *) ++ # Assume MSVC wrapper ++ hardcode_libdir_flag_spec=' ' ++ allow_undefined_flag=unsupported ++ # Tell ltmain to make .lib files, not .a files. ++ libext=lib ++ # Tell ltmain to make .dll files, not .so files. ++ shrext_cmds=".dll" ++ # FIXME: Setting linknames here is a bad hack. ++ archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' ++ # The linker will automatically build a .lib file if we build a DLL. ++ old_archive_from_new_cmds='true' ++ # FIXME: Should let the user specify the lib program. ++ old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' ++ enable_shared_with_static_runtimes=yes ++ ;; ++ esac + ;; + + darwin* | rhapsody*) +@@ -9446,7 +10029,7 @@ if test -z "$aix_libpath"; then aix_libp + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) +- archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' ++ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no +@@ -9454,7 +10037,7 @@ if test -z "$aix_libpath"; then aix_libp + + hpux9*) + if test "$GCC" = yes; then +- archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ++ archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + fi +@@ -9470,7 +10053,7 @@ if test -z "$aix_libpath"; then aix_libp + + hpux10*) + if test "$GCC" = yes && test "$with_gnu_ld" = no; then +- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ++ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi +@@ -9494,10 +10077,10 @@ if test -z "$aix_libpath"; then aix_libp + archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) +- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ++ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) +- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ++ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else +@@ -9576,23 +10159,36 @@ fi + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then +- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ++ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + # Try to use the -exported_symbol ld option, if it does not + # work, assume that -exports_file does not work either and + # implicitly export all symbols. +- save_LDFLAGS="$LDFLAGS" +- LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ # This should be the same for all languages, so no per-tag cache variable. ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 ++$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } ++if test "${lt_cv_irix_exported_symbol+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ save_LDFLAGS="$LDFLAGS" ++ LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-int foo(void) {} ++int foo (void) { return 0; } + _ACEOF + if ac_fn_c_try_link "$LINENO"; then : +- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' +- ++ lt_cv_irix_exported_symbol=yes ++else ++ lt_cv_irix_exported_symbol=no + fi + rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +- LDFLAGS="$save_LDFLAGS" ++ LDFLAGS="$save_LDFLAGS" ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 ++$as_echo "$lt_cv_irix_exported_symbol" >&6; } ++ if test "$lt_cv_irix_exported_symbol" = yes; then ++ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' ++ fi + else + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' +@@ -9677,7 +10273,7 @@ rm -f core conftest.err conftest.$ac_obj + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' +- archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ++ archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + else + allow_undefined_flag=' -expect_unresolved \*' +@@ -9696,9 +10292,9 @@ rm -f core conftest.err conftest.$ac_obj + no_undefined_flag=' -z defs' + if test "$GCC" = yes; then + wlarc='${wl}' +- archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ++ archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ +- $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ++ $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + else + case `$CC -V 2>&1` in + *"Compilers 5.0"*) +@@ -10274,8 +10870,9 @@ cygwin* | mingw* | pw32* | cegcc*) + need_version=no + need_lib_prefix=no + +- case $GCC,$host_os in +- yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) ++ case $GCC,$cc_basename in ++ yes,*) ++ # gcc + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ +@@ -10308,13 +10905,71 @@ cygwin* | mingw* | pw32* | cegcc*) + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + esac ++ dynamic_linker='Win32 ld.exe' ++ ;; ++ ++ *,cl*) ++ # Native MSVC ++ libname_spec='$name' ++ soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ++ library_names_spec='${libname}.dll.lib' ++ ++ case $build_os in ++ mingw*) ++ sys_lib_search_path_spec= ++ lt_save_ifs=$IFS ++ IFS=';' ++ for lt_path in $LIB ++ do ++ IFS=$lt_save_ifs ++ # Let DOS variable expansion print the short 8.3 style file name. ++ lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` ++ sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" ++ done ++ IFS=$lt_save_ifs ++ # Convert to MSYS style. ++ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ++ ;; ++ cygwin*) ++ # Convert to unix form, then to dos form, then back to unix form ++ # but this time dos style (no spaces!) so that the unix form looks ++ # like /cygdrive/c/PROGRA~1:/cygdr... ++ sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` ++ sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` ++ sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ++ ;; ++ *) ++ sys_lib_search_path_spec="$LIB" ++ if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then ++ # It is most probably a Windows format PATH. ++ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` ++ else ++ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ++ fi ++ # FIXME: find the short name or the path components, as spaces are ++ # common. (e.g. "Program Files" -> "PROGRA~1") ++ ;; ++ esac ++ ++ # DLL is installed to $(libdir)/../bin by postinstall_cmds ++ postinstall_cmds='base_file=`basename \${file}`~ ++ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ ++ dldir=$destdir/`dirname \$dlpath`~ ++ test -d \$dldir || mkdir -p \$dldir~ ++ $install_prog $dir/$dlname \$dldir/$dlname' ++ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ ++ dlpath=$dir/\$dldll~ ++ $RM \$dlpath' ++ shlibpath_overrides_runpath=yes ++ dynamic_linker='Win32 link.exe' + ;; + + *) ++ # Assume MSVC wrapper + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ++ dynamic_linker='Win32 ld.exe' + ;; + esac +- dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; +@@ -10410,7 +11065,7 @@ haiku*) + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LIBRARY_PATH + shlibpath_overrides_runpath=yes +- sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib' ++ sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' + hardcode_into_libs=yes + ;; + +@@ -11206,7 +11861,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 11209 "configure" ++#line $LINENO "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -11250,10 +11905,10 @@ else + /* When -fvisbility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ + #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +-void fnord () __attribute__((visibility("default"))); ++int fnord () __attribute__((visibility("default"))); + #endif + +-void fnord () { int i=42; } ++int fnord () { return 42; } + int main () + { + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); +@@ -11312,7 +11967,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 11315 "configure" ++#line $LINENO "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -11356,10 +12011,10 @@ else + /* When -fvisbility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ + #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +-void fnord () __attribute__((visibility("default"))); ++int fnord () __attribute__((visibility("default"))); + #endif + +-void fnord () { int i=42; } ++int fnord () { return 42; } + int main () + { + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); +@@ -14754,13 +15409,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_ + lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' + lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' + lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' ++lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' ++lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' + reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' + reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' + OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' + deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' + file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' ++file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' ++want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' ++DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' ++sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' + AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' + AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' ++archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' + STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' + RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' + old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' +@@ -14775,14 +15437,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$l + lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' + lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' + lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' ++nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' ++lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' + objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' + MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' + lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' +-lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' + lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' ++lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' + lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' + lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' + need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' ++MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' + DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' + NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' + LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' +@@ -14815,12 +15480,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcod + hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' + inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' + link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' +-fix_srcfile_path='`$ECHO "$fix_srcfile_path" | $SED "$delay_single_quote_subst"`' + always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' + export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' + exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' + include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' + prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' ++postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' + file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' + variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' + need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' +@@ -14875,8 +15540,13 @@ reload_flag \ + OBJDUMP \ + deplibs_check_method \ + file_magic_cmd \ ++file_magic_glob \ ++want_nocaseglob \ ++DLLTOOL \ ++sharedlib_from_linklib_cmd \ + AR \ + AR_FLAGS \ ++archiver_list_spec \ + STRIP \ + RANLIB \ + CC \ +@@ -14886,12 +15556,14 @@ lt_cv_sys_global_symbol_pipe \ + lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ ++nm_file_list_spec \ + lt_prog_compiler_no_builtin_flag \ +-lt_prog_compiler_wl \ + lt_prog_compiler_pic \ ++lt_prog_compiler_wl \ + lt_prog_compiler_static \ + lt_cv_prog_compiler_c_o \ + need_locks \ ++MANIFEST_TOOL \ + DSYMUTIL \ + NMEDIT \ + LIPO \ +@@ -14907,7 +15579,6 @@ no_undefined_flag \ + hardcode_libdir_flag_spec \ + hardcode_libdir_flag_spec_ld \ + hardcode_libdir_separator \ +-fix_srcfile_path \ + exclude_expsyms \ + include_expsyms \ + file_list_spec \ +@@ -14943,6 +15614,7 @@ module_cmds \ + module_expsym_cmds \ + export_symbols_cmds \ + prelink_cmds \ ++postlink_cmds \ + postinstall_cmds \ + postuninstall_cmds \ + finish_cmds \ +@@ -15700,7 +16372,8 @@ $as_echo X"$file" | + # NOTE: Changes made to this file will be lost: look at ltmain.sh. + # + # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +-# 2006, 2007, 2008, 2009 Free Software Foundation, Inc. ++# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, ++# Inc. + # Written by Gordon Matzigkeit, 1996 + # + # This file is part of GNU Libtool. +@@ -15803,19 +16476,42 @@ SP2NL=$lt_lt_SP2NL + # turn newlines into spaces. + NL2SP=$lt_lt_NL2SP + ++# convert \$build file names to \$host format. ++to_host_file_cmd=$lt_cv_to_host_file_cmd ++ ++# convert \$build files to toolchain format. ++to_tool_file_cmd=$lt_cv_to_tool_file_cmd ++ + # An object symbol dumper. + OBJDUMP=$lt_OBJDUMP + + # Method to check whether dependent libraries are shared objects. + deplibs_check_method=$lt_deplibs_check_method + +-# Command to use when deplibs_check_method == "file_magic". ++# Command to use when deplibs_check_method = "file_magic". + file_magic_cmd=$lt_file_magic_cmd + ++# How to find potential files when deplibs_check_method = "file_magic". ++file_magic_glob=$lt_file_magic_glob ++ ++# Find potential files using nocaseglob when deplibs_check_method = "file_magic". ++want_nocaseglob=$lt_want_nocaseglob ++ ++# DLL creation program. ++DLLTOOL=$lt_DLLTOOL ++ ++# Command to associate shared and link libraries. ++sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd ++ + # The archiver. + AR=$lt_AR ++ ++# Flags to create an archive. + AR_FLAGS=$lt_AR_FLAGS + ++# How to feed a file listing to the archiver. ++archiver_list_spec=$lt_archiver_list_spec ++ + # A symbol stripping program. + STRIP=$lt_STRIP + +@@ -15845,6 +16541,12 @@ global_symbol_to_c_name_address=$lt_lt_c + # Transform the output of nm in a C name address pair when lib prefix is needed. + global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix + ++# Specify filename containing input files for \$NM. ++nm_file_list_spec=$lt_nm_file_list_spec ++ ++# The root where to search for dependent libraries,and in which our libraries should be installed. ++lt_sysroot=$lt_sysroot ++ + # The name of the directory that contains temporary libtool files. + objdir=$objdir + +@@ -15854,6 +16556,9 @@ MAGIC_CMD=$MAGIC_CMD + # Must we lock files when doing compilation? + need_locks=$lt_need_locks + ++# Manifest tool. ++MANIFEST_TOOL=$lt_MANIFEST_TOOL ++ + # Tool to manipulate archived DWARF debug symbol files on Mac OS X. + DSYMUTIL=$lt_DSYMUTIL + +@@ -15968,12 +16673,12 @@ with_gcc=$GCC + # Compiler flag to turn off builtin functions. + no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag + +-# How to pass a linker flag through the compiler. +-wl=$lt_lt_prog_compiler_wl +- + # Additional compiler flags for building library objects. + pic_flag=$lt_lt_prog_compiler_pic + ++# How to pass a linker flag through the compiler. ++wl=$lt_lt_prog_compiler_wl ++ + # Compiler flag to prevent dynamic linking. + link_static_flag=$lt_lt_prog_compiler_static + +@@ -16060,9 +16765,6 @@ inherit_rpath=$inherit_rpath + # Whether libtool must link a program against all its dependency libraries. + link_all_deplibs=$link_all_deplibs + +-# Fix the shell variable \$srcfile for the compiler. +-fix_srcfile_path=$lt_fix_srcfile_path +- + # Set to "yes" if exported symbols are required. + always_export_symbols=$always_export_symbols + +@@ -16078,6 +16780,9 @@ include_expsyms=$lt_include_expsyms + # Commands necessary for linking programs (against libraries) with templates. + prelink_cmds=$lt_prelink_cmds + ++# Commands necessary for finishing linking programs. ++postlink_cmds=$lt_postlink_cmds ++ + # Specify filename containing input files. + file_list_spec=$lt_file_list_spec + +@@ -16110,210 +16815,169 @@ ltmain="$ac_aux_dir/ltmain.sh" + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? +- sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ +- || (rm -f "$cfgfile"; exit 1) +- +- case $xsi_shell in +- yes) +- cat << \_LT_EOF >> "$cfgfile" +- +-# func_dirname file append nondir_replacement +-# Compute the dirname of FILE. If nonempty, add APPEND to the result, +-# otherwise set result to NONDIR_REPLACEMENT. +-func_dirname () +-{ +- case ${1} in +- */*) func_dirname_result="${1%/*}${2}" ;; +- * ) func_dirname_result="${3}" ;; +- esac +-} +- +-# func_basename file +-func_basename () +-{ +- func_basename_result="${1##*/}" +-} +- +-# func_dirname_and_basename file append nondir_replacement +-# perform func_basename and func_dirname in a single function +-# call: +-# dirname: Compute the dirname of FILE. If nonempty, +-# add APPEND to the result, otherwise set result +-# to NONDIR_REPLACEMENT. +-# value returned in "$func_dirname_result" +-# basename: Compute filename of FILE. +-# value retuned in "$func_basename_result" +-# Implementation must be kept synchronized with func_dirname +-# and func_basename. For efficiency, we do not delegate to +-# those functions but instead duplicate the functionality here. +-func_dirname_and_basename () +-{ +- case ${1} in +- */*) func_dirname_result="${1%/*}${2}" ;; +- * ) func_dirname_result="${3}" ;; +- esac +- func_basename_result="${1##*/}" +-} +- +-# func_stripname prefix suffix name +-# strip PREFIX and SUFFIX off of NAME. +-# PREFIX and SUFFIX must not contain globbing or regex special +-# characters, hashes, percent signs, but SUFFIX may contain a leading +-# dot (in which case that matches only a dot). +-func_stripname () +-{ +- # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are +- # positional parameters, so assign one to ordinary parameter first. +- func_stripname_result=${3} +- func_stripname_result=${func_stripname_result#"${1}"} +- func_stripname_result=${func_stripname_result%"${2}"} +-} +- +-# func_opt_split +-func_opt_split () +-{ +- func_opt_split_opt=${1%%=*} +- func_opt_split_arg=${1#*=} +-} +- +-# func_lo2o object +-func_lo2o () +-{ +- case ${1} in +- *.lo) func_lo2o_result=${1%.lo}.${objext} ;; +- *) func_lo2o_result=${1} ;; +- esac +-} +- +-# func_xform libobj-or-source +-func_xform () +-{ +- func_xform_result=${1%.*}.lo +-} +- +-# func_arith arithmetic-term... +-func_arith () +-{ +- func_arith_result=$(( $* )) +-} +- +-# func_len string +-# STRING may not start with a hyphen. +-func_len () +-{ +- func_len_result=${#1} +-} +- +-_LT_EOF +- ;; +- *) # Bourne compatible functions. +- cat << \_LT_EOF >> "$cfgfile" +- +-# func_dirname file append nondir_replacement +-# Compute the dirname of FILE. If nonempty, add APPEND to the result, +-# otherwise set result to NONDIR_REPLACEMENT. +-func_dirname () +-{ +- # Extract subdirectory from the argument. +- func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` +- if test "X$func_dirname_result" = "X${1}"; then +- func_dirname_result="${3}" +- else +- func_dirname_result="$func_dirname_result${2}" +- fi +-} +- +-# func_basename file +-func_basename () +-{ +- func_basename_result=`$ECHO "${1}" | $SED "$basename"` +-} +- +- +-# func_stripname prefix suffix name +-# strip PREFIX and SUFFIX off of NAME. +-# PREFIX and SUFFIX must not contain globbing or regex special +-# characters, hashes, percent signs, but SUFFIX may contain a leading +-# dot (in which case that matches only a dot). +-# func_strip_suffix prefix name +-func_stripname () +-{ +- case ${2} in +- .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; +- *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; +- esac +-} +- +-# sed scripts: +-my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q' +-my_sed_long_arg='1s/^-[^=]*=//' +- +-# func_opt_split +-func_opt_split () +-{ +- func_opt_split_opt=`$ECHO "${1}" | $SED "$my_sed_long_opt"` +- func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"` +-} +- +-# func_lo2o object +-func_lo2o () +-{ +- func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` +-} +- +-# func_xform libobj-or-source +-func_xform () +-{ +- func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` +-} +- +-# func_arith arithmetic-term... +-func_arith () +-{ +- func_arith_result=`expr "$@"` +-} +- +-# func_len string +-# STRING may not start with a hyphen. +-func_len () +-{ +- func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` +-} +- +-_LT_EOF +-esac +- +-case $lt_shell_append in +- yes) +- cat << \_LT_EOF >> "$cfgfile" +- +-# func_append var value +-# Append VALUE to the end of shell variable VAR. +-func_append () +-{ +- eval "$1+=\$2" +-} +-_LT_EOF +- ;; +- *) +- cat << \_LT_EOF >> "$cfgfile" +- +-# func_append var value +-# Append VALUE to the end of shell variable VAR. +-func_append () +-{ +- eval "$1=\$$1\$2" +-} +- +-_LT_EOF +- ;; +- esac ++ sed '$q' "$ltmain" >> "$cfgfile" \ ++ || (rm -f "$cfgfile"; exit 1) + ++ if test x"$xsi_shell" = xyes; then ++ sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ ++func_dirname ()\ ++{\ ++\ case ${1} in\ ++\ */*) func_dirname_result="${1%/*}${2}" ;;\ ++\ * ) func_dirname_result="${3}" ;;\ ++\ esac\ ++} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_basename ()$/,/^} # func_basename /c\ ++func_basename ()\ ++{\ ++\ func_basename_result="${1##*/}"\ ++} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ ++func_dirname_and_basename ()\ ++{\ ++\ case ${1} in\ ++\ */*) func_dirname_result="${1%/*}${2}" ;;\ ++\ * ) func_dirname_result="${3}" ;;\ ++\ esac\ ++\ func_basename_result="${1##*/}"\ ++} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ ++func_stripname ()\ ++{\ ++\ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ ++\ # positional parameters, so assign one to ordinary parameter first.\ ++\ func_stripname_result=${3}\ ++\ func_stripname_result=${func_stripname_result#"${1}"}\ ++\ func_stripname_result=${func_stripname_result%"${2}"}\ ++} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ ++func_split_long_opt ()\ ++{\ ++\ func_split_long_opt_name=${1%%=*}\ ++\ func_split_long_opt_arg=${1#*=}\ ++} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ ++func_split_short_opt ()\ ++{\ ++\ func_split_short_opt_arg=${1#??}\ ++\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ ++} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ ++func_lo2o ()\ ++{\ ++\ case ${1} in\ ++\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ ++\ *) func_lo2o_result=${1} ;;\ ++\ esac\ ++} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_xform ()$/,/^} # func_xform /c\ ++func_xform ()\ ++{\ ++ func_xform_result=${1%.*}.lo\ ++} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_arith ()$/,/^} # func_arith /c\ ++func_arith ()\ ++{\ ++ func_arith_result=$(( $* ))\ ++} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_len ()$/,/^} # func_len /c\ ++func_len ()\ ++{\ ++ func_len_result=${#1}\ ++} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++fi ++ ++if test x"$lt_shell_append" = xyes; then ++ sed -e '/^func_append ()$/,/^} # func_append /c\ ++func_append ()\ ++{\ ++ eval "${1}+=\\${2}"\ ++} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ ++func_append_quoted ()\ ++{\ ++\ func_quote_for_eval "${2}"\ ++\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ ++} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ # Save a `func_append' function call where possible by direct use of '+=' ++ sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++ test 0 -eq $? || _lt_function_replace_fail=: ++else ++ # Save a `func_append' function call even when '+=' is not available ++ sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++ test 0 -eq $? || _lt_function_replace_fail=: ++fi ++ ++if test x"$_lt_function_replace_fail" = x":"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 ++$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} ++fi + +- sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ +- || (rm -f "$cfgfile"; exit 1) + +- mv -f "$cfgfile" "$ofile" || ++ mv -f "$cfgfile" "$ofile" || + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" + +Index: binutils-2.21.1/gas/configure +=================================================================== +--- binutils-2.21.1.orig/gas/configure ++++ binutils-2.21.1/gas/configure +@@ -645,8 +645,11 @@ OTOOL + LIPO + NMEDIT + DSYMUTIL ++MANIFEST_TOOL + RANLIB ++ac_ct_AR + AR ++DLLTOOL + OBJDUMP + LN_S + NM +@@ -759,6 +762,7 @@ enable_static + with_pic + enable_fast_install + with_gnu_ld ++with_libtool_sysroot + enable_libtool_lock + enable_targets + enable_checking +@@ -1420,6 +1424,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-zlib include zlib support (auto/yes/no) default=auto + + Some influential environment variables: +@@ -5135,8 +5141,8 @@ esac + + + +-macro_version='2.2.7a' +-macro_revision='1.3134' ++macro_version='2.4' ++macro_revision='1.3293' + + + +@@ -5176,7 +5182,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 + $as_echo_n "checking how to print strings... " >&6; } + # Test print first, because it will be a builtin if present. +-if test "X`print -r -- -n 2>/dev/null`" = X-n && \ ++if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ + test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='print -r --' + elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then +@@ -5862,8 +5868,8 @@ $as_echo_n "checking whether the shell u + # Try some XSI features + xsi_shell=no + ( _lt_dummy="a/b/c" +- test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ +- = c,a/b,, \ ++ test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ ++ = c,a/b,b/c, \ + && eval 'test $(( 1 + 1 )) -eq 2 \ + && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ + && xsi_shell=yes +@@ -5912,6 +5918,80 @@ esac + + + ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 ++$as_echo_n "checking how to convert $build file names to $host format... " >&6; } ++if test "${lt_cv_to_host_file_cmd+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ case $host in ++ *-*-mingw* ) ++ case $build in ++ *-*-mingw* ) # actually msys ++ lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ++ ;; ++ *-*-cygwin* ) ++ lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ++ ;; ++ * ) # otherwise, assume *nix ++ lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ++ ;; ++ esac ++ ;; ++ *-*-cygwin* ) ++ case $build in ++ *-*-mingw* ) # actually msys ++ lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ++ ;; ++ *-*-cygwin* ) ++ lt_cv_to_host_file_cmd=func_convert_file_noop ++ ;; ++ * ) # otherwise, assume *nix ++ lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ++ ;; ++ esac ++ ;; ++ * ) # unhandled hosts (and "normal" native builds) ++ lt_cv_to_host_file_cmd=func_convert_file_noop ++ ;; ++esac ++ ++fi ++ ++to_host_file_cmd=$lt_cv_to_host_file_cmd ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 ++$as_echo "$lt_cv_to_host_file_cmd" >&6; } ++ ++ ++ ++ ++ ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 ++$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } ++if test "${lt_cv_to_tool_file_cmd+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ #assume ordinary cross tools, or native build. ++lt_cv_to_tool_file_cmd=func_convert_file_noop ++case $host in ++ *-*-mingw* ) ++ case $build in ++ *-*-mingw* ) # actually msys ++ lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ++ ;; ++ esac ++ ;; ++esac ++ ++fi ++ ++to_tool_file_cmd=$lt_cv_to_tool_file_cmd ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 ++$as_echo "$lt_cv_to_tool_file_cmd" >&6; } ++ ++ ++ ++ ++ + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 + $as_echo_n "checking for $LD option to reload object files... " >&6; } + if test "${lt_cv_ld_reload_flag+set}" = set; then : +@@ -5928,6 +6008,11 @@ case $reload_flag in + esac + reload_cmds='$LD$reload_flag -o $output$reload_objs' + case $host_os in ++ cygwin* | mingw* | pw32* | cegcc*) ++ if test "$GCC" != yes; then ++ reload_cmds=false ++ fi ++ ;; + darwin*) + if test "$GCC" = yes; then + reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' +@@ -6096,7 +6181,8 @@ mingw* | pw32*) + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + else +- lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' ++ # Keep this pattern in sync with the one in func_win32_libid. ++ lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' + lt_cv_file_magic_cmd='$OBJDUMP -f' + fi + ;; +@@ -6250,6 +6336,21 @@ esac + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 + $as_echo "$lt_cv_deplibs_check_method" >&6; } ++ ++file_magic_glob= ++want_nocaseglob=no ++if test "$build" = "$host"; then ++ case $host_os in ++ mingw* | pw32*) ++ if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then ++ want_nocaseglob=yes ++ else ++ file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` ++ fi ++ ;; ++ esac ++fi ++ + file_magic_cmd=$lt_cv_file_magic_cmd + deplibs_check_method=$lt_cv_deplibs_check_method + test -z "$deplibs_check_method" && deplibs_check_method=unknown +@@ -6265,9 +6366,162 @@ test -z "$deplibs_check_method" && depli + + + ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++if test -n "$ac_tool_prefix"; then ++ # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. ++set dummy ${ac_tool_prefix}dlltool; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if test "${ac_cv_prog_DLLTOOL+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test -n "$DLLTOOL"; then ++ ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ++ ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++ done ++IFS=$as_save_IFS ++ ++fi ++fi ++DLLTOOL=$ac_cv_prog_DLLTOOL ++if test -n "$DLLTOOL"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 ++$as_echo "$DLLTOOL" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++fi ++ ++ ++fi ++if test -z "$ac_cv_prog_DLLTOOL"; then ++ ac_ct_DLLTOOL=$DLLTOOL ++ # Extract the first word of "dlltool", so it can be a program name with args. ++set dummy dlltool; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test -n "$ac_ct_DLLTOOL"; then ++ ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ++ ac_cv_prog_ac_ct_DLLTOOL="dlltool" ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++ done ++IFS=$as_save_IFS ++ ++fi ++fi ++ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL ++if test -n "$ac_ct_DLLTOOL"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 ++$as_echo "$ac_ct_DLLTOOL" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++fi ++ ++ if test "x$ac_ct_DLLTOOL" = x; then ++ DLLTOOL="false" ++ else ++ case $cross_compiling:$ac_tool_warned in ++yes:) ++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 ++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ++ac_tool_warned=yes ;; ++esac ++ DLLTOOL=$ac_ct_DLLTOOL ++ fi ++else ++ DLLTOOL="$ac_cv_prog_DLLTOOL" ++fi ++ ++test -z "$DLLTOOL" && DLLTOOL=dlltool ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 ++$as_echo_n "checking how to associate runtime and link libraries... " >&6; } ++if test "${lt_cv_sharedlib_from_linklib_cmd+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ lt_cv_sharedlib_from_linklib_cmd='unknown' ++ ++case $host_os in ++cygwin* | mingw* | pw32* | cegcc*) ++ # two different shell functions defined in ltmain.sh ++ # decide which to use based on capabilities of $DLLTOOL ++ case `$DLLTOOL --help 2>&1` in ++ *--identify-strict*) ++ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ++ ;; ++ *) ++ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ++ ;; ++ esac ++ ;; ++*) ++ # fallback: assume linklib IS sharedlib ++ lt_cv_sharedlib_from_linklib_cmd="$ECHO" ++ ;; ++esac ++ ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 ++$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } ++sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd ++test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO ++ ++ ++ ++ ++ ++ ++ + if test -n "$ac_tool_prefix"; then +- # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. +-set dummy ${ac_tool_prefix}ar; ac_word=$2 ++ for ac_prog in ar ++ do ++ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. ++set dummy $ac_tool_prefix$ac_prog; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } + if test "${ac_cv_prog_AR+set}" = set; then : +@@ -6283,7 +6537,7 @@ do + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then +- ac_cv_prog_AR="${ac_tool_prefix}ar" ++ ac_cv_prog_AR="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +@@ -6303,11 +6557,15 @@ $as_echo "no" >&6; } + fi + + ++ test -n "$AR" && break ++ done + fi +-if test -z "$ac_cv_prog_AR"; then ++if test -z "$AR"; then + ac_ct_AR=$AR +- # Extract the first word of "ar", so it can be a program name with args. +-set dummy ar; ac_word=$2 ++ for ac_prog in ar ++do ++ # Extract the first word of "$ac_prog", so it can be a program name with args. ++set dummy $ac_prog; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } + if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : +@@ -6323,7 +6581,7 @@ do + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then +- ac_cv_prog_ac_ct_AR="ar" ++ ac_cv_prog_ac_ct_AR="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +@@ -6342,6 +6600,10 @@ else + $as_echo "no" >&6; } + fi + ++ ++ test -n "$ac_ct_AR" && break ++done ++ + if test "x$ac_ct_AR" = x; then + AR="false" + else +@@ -6353,16 +6615,72 @@ ac_tool_warned=yes ;; + esac + AR=$ac_ct_AR + fi +-else +- AR="$ac_cv_prog_AR" + fi + +-test -z "$AR" && AR=ar +-test -z "$AR_FLAGS" && AR_FLAGS=cru ++: ${AR=ar} ++: ${AR_FLAGS=cru} ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 ++$as_echo_n "checking for archiver @FILE support... " >&6; } ++if test "${lt_cv_ar_at_file+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ lt_cv_ar_at_file=no ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++ ++int ++main () ++{ + ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : ++ echo conftest.$ac_objext > conftest.lst ++ lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' ++ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 ++ (eval $lt_ar_try) 2>&5 ++ ac_status=$? ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; } ++ if test "$ac_status" -eq 0; then ++ # Ensure the archiver fails upon bogus file names. ++ rm -f conftest.$ac_objext libconftest.a ++ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 ++ (eval $lt_ar_try) 2>&5 ++ ac_status=$? ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; } ++ if test "$ac_status" -ne 0; then ++ lt_cv_ar_at_file=@ ++ fi ++ fi ++ rm -f conftest.* libconftest.a + ++fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 ++$as_echo "$lt_cv_ar_at_file" >&6; } + ++if test "x$lt_cv_ar_at_file" = xno; then ++ archiver_list_spec= ++else ++ archiver_list_spec=$lt_cv_ar_at_file ++fi + + + +@@ -6704,8 +7022,8 @@ esac + lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + + # Transform an extracted symbol line into symbol name and symbol address +-lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" +-lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" ++lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" ++lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" + + # Handle CRLF in mingw tool chain + opt_cr= +@@ -6741,6 +7059,7 @@ for ac_symprfx in "" "_"; do + else + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + fi ++ lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" + + # Check to see that the pipe works correctly. + pipe_works=no +@@ -6782,6 +7101,18 @@ _LT_EOF + if $GREP ' nm_test_var$' "$nlist" >/dev/null; then + if $GREP ' nm_test_func$' "$nlist" >/dev/null; then + cat <<_LT_EOF > conftest.$ac_ext ++/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ ++#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) ++/* DATA imports from DLLs on WIN32 con't be const, because runtime ++ relocations are performed -- see ld's documentation on pseudo-relocs. */ ++# define LT_DLSYM_CONST ++#elif defined(__osf__) ++/* This system does not cope well with relocations in const data. */ ++# define LT_DLSYM_CONST ++#else ++# define LT_DLSYM_CONST const ++#endif ++ + #ifdef __cplusplus + extern "C" { + #endif +@@ -6793,7 +7124,7 @@ _LT_EOF + cat <<_LT_EOF >> conftest.$ac_ext + + /* The mapping between symbol names and symbols. */ +-const struct { ++LT_DLSYM_CONST struct { + const char *name; + void *address; + } +@@ -6819,8 +7150,8 @@ static const void *lt_preloaded_setup() + _LT_EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext +- lt_save_LIBS="$LIBS" +- lt_save_CFLAGS="$CFLAGS" ++ lt_globsym_save_LIBS=$LIBS ++ lt_globsym_save_CFLAGS=$CFLAGS + LIBS="conftstm.$ac_objext" + CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 +@@ -6830,8 +7161,8 @@ _LT_EOF + test $ac_status = 0; } && test -s conftest${ac_exeext}; then + pipe_works=yes + fi +- LIBS="$lt_save_LIBS" +- CFLAGS="$lt_save_CFLAGS" ++ LIBS=$lt_globsym_save_LIBS ++ CFLAGS=$lt_globsym_save_CFLAGS + else + echo "cannot find nm_test_func in $nlist" >&5 + fi +@@ -6868,6 +7199,19 @@ else + $as_echo "ok" >&6; } + fi + ++# Response file support. ++if test "$lt_cv_nm_interface" = "MS dumpbin"; then ++ nm_file_list_spec='@' ++elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then ++ nm_file_list_spec='@' ++fi ++ ++ ++ ++ ++ ++ ++ + + + +@@ -6888,6 +7232,42 @@ fi + + + ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 ++$as_echo_n "checking for sysroot... " >&6; } ++ ++# Check whether --with-libtool-sysroot was given. ++if test "${with_libtool_sysroot+set}" = set; then : ++ withval=$with_libtool_sysroot; ++else ++ with_libtool_sysroot=no ++fi ++ ++ ++lt_sysroot= ++case ${with_libtool_sysroot} in #( ++ yes) ++ if test "$GCC" = yes; then ++ lt_sysroot=`$CC --print-sysroot 2>/dev/null` ++ fi ++ ;; #( ++ /*) ++ lt_sysroot=`echo "$with_libtool_sysroot" | sed -e "$sed_quote_subst"` ++ ;; #( ++ no|'') ++ ;; #( ++ *) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libtool_sysroot}" >&5 ++$as_echo "${with_libtool_sysroot}" >&6; } ++ as_fn_error "The sysroot must be an absolute path." "$LINENO" 5 ++ ;; ++esac ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 ++$as_echo "${lt_sysroot:-no}" >&6; } ++ ++ ++ ++ + + # Check whether --enable-libtool-lock was given. + if test "${enable_libtool_lock+set}" = set; then : +@@ -7082,6 +7462,123 @@ esac + + need_locks="$enable_libtool_lock" + ++if test -n "$ac_tool_prefix"; then ++ # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. ++set dummy ${ac_tool_prefix}mt; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if test "${ac_cv_prog_MANIFEST_TOOL+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test -n "$MANIFEST_TOOL"; then ++ ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ++ ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++ done ++IFS=$as_save_IFS ++ ++fi ++fi ++MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL ++if test -n "$MANIFEST_TOOL"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 ++$as_echo "$MANIFEST_TOOL" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++fi ++ ++ ++fi ++if test -z "$ac_cv_prog_MANIFEST_TOOL"; then ++ ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL ++ # Extract the first word of "mt", so it can be a program name with args. ++set dummy mt; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if test "${ac_cv_prog_ac_ct_MANIFEST_TOOL+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test -n "$ac_ct_MANIFEST_TOOL"; then ++ ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ++ ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++ done ++IFS=$as_save_IFS ++ ++fi ++fi ++ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL ++if test -n "$ac_ct_MANIFEST_TOOL"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 ++$as_echo "$ac_ct_MANIFEST_TOOL" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++fi ++ ++ if test "x$ac_ct_MANIFEST_TOOL" = x; then ++ MANIFEST_TOOL=":" ++ else ++ case $cross_compiling:$ac_tool_warned in ++yes:) ++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 ++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ++ac_tool_warned=yes ;; ++esac ++ MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL ++ fi ++else ++ MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" ++fi ++ ++test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 ++$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } ++if test "${lt_cv_path_mainfest_tool+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ lt_cv_path_mainfest_tool=no ++ echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 ++ $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out ++ cat conftest.err >&5 ++ if $GREP 'Manifest Tool' conftest.out > /dev/null; then ++ lt_cv_path_mainfest_tool=yes ++ fi ++ rm -f conftest* ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 ++$as_echo "$lt_cv_path_mainfest_tool" >&6; } ++if test "x$lt_cv_path_mainfest_tool" != xyes; then ++ MANIFEST_TOOL=: ++fi ++ ++ ++ ++ ++ + + case $host_os in + rhapsody* | darwin*) +@@ -7645,6 +8142,8 @@ _LT_EOF + $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 + echo "$AR cru libconftest.a conftest.o" >&5 + $AR cru libconftest.a conftest.o 2>&5 ++ echo "$RANLIB libconftest.a" >&5 ++ $RANLIB libconftest.a 2>&5 + cat > conftest.c << _LT_EOF + int main() { return 0;} + _LT_EOF +@@ -7840,7 +8339,8 @@ fi + LIBTOOL_DEPS="$ltmain" + + # Always use our own libtool. +-LIBTOOL='$(SHELL) $(top_builddir)/libtool' ++LIBTOOL='$(SHELL) $(top_builddir)' ++LIBTOOL="$LIBTOOL/${host_alias}-libtool" + + + +@@ -7929,7 +8429,7 @@ aix3*) + esac + + # Global variables: +-ofile=libtool ++ofile=${host_alias}-libtool + can_build_shared=yes + + # All known linkers require a `.a' archive for static linking (except MSVC, +@@ -8227,8 +8727,6 @@ fi + lt_prog_compiler_pic= + lt_prog_compiler_static= + +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +-$as_echo_n "checking for $compiler option to produce PIC... " >&6; } + + if test "$GCC" = yes; then + lt_prog_compiler_wl='-Wl,' +@@ -8393,6 +8891,12 @@ $as_echo_n "checking for $compiler optio + lt_prog_compiler_pic='--shared' + lt_prog_compiler_static='--static' + ;; ++ nagfor*) ++ # NAG Fortran compiler ++ lt_prog_compiler_wl='-Wl,-Wl,,' ++ lt_prog_compiler_pic='-PIC' ++ lt_prog_compiler_static='-Bstatic' ++ ;; + pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) +@@ -8455,7 +8959,7 @@ $as_echo_n "checking for $compiler optio + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + case $cc_basename in +- f77* | f90* | f95*) ++ f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) + lt_prog_compiler_wl='-Qoption ld ';; + *) + lt_prog_compiler_wl='-Wl,';; +@@ -8512,13 +9016,17 @@ case $host_os in + lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" + ;; + esac +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5 +-$as_echo "$lt_prog_compiler_pic" >&6; } +- +- +- +- + ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 ++$as_echo_n "checking for $compiler option to produce PIC... " >&6; } ++if test "${lt_cv_prog_compiler_pic+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ lt_cv_prog_compiler_pic=$lt_prog_compiler_pic ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 ++$as_echo "$lt_cv_prog_compiler_pic" >&6; } ++lt_prog_compiler_pic=$lt_cv_prog_compiler_pic + + # + # Check to make sure the PIC flag actually works. +@@ -8579,6 +9087,11 @@ fi + + + ++ ++ ++ ++ ++ + # + # Check to make sure the static flag actually works. + # +@@ -8929,7 +9442,8 @@ _LT_EOF + allow_undefined_flag=unsupported + always_export_symbols=no + enable_shared_with_static_runtimes=yes +- export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' ++ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' ++ exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' +@@ -8977,7 +9491,7 @@ _LT_EOF + if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ + && test "$tmp_diet" = no + then +- tmp_addflag= ++ tmp_addflag=' $pic_flag' + tmp_sharedflag='-shared' + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler +@@ -9028,12 +9542,12 @@ _LT_EOF + whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' + hardcode_libdir_flag_spec= + hardcode_libdir_flag_spec_ld='-rpath $libdir' +- archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' ++ archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' + if test "x$supports_anon_versioning" = xyes; then + archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ +- $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' ++ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + fi + ;; + esac +@@ -9047,8 +9561,8 @@ _LT_EOF + archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else +- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' +- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ++ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' ++ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + +@@ -9066,8 +9580,8 @@ _LT_EOF + + _LT_EOF + elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then +- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' +- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ++ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' ++ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi +@@ -9113,8 +9627,8 @@ _LT_EOF + + *) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then +- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' +- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ++ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' ++ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi +@@ -9244,7 +9758,13 @@ _LT_EOF + allow_undefined_flag='-berok' + # Determine the default libpath from the value encoded in an + # empty executable. +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ if test "${lt_cv_aix_libpath+set}" = set; then ++ aix_libpath=$lt_cv_aix_libpath ++else ++ if test "${lt_cv_aix_libpath_+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + int +@@ -9257,22 +9777,29 @@ main () + _ACEOF + if ac_fn_c_try_link "$LINENO"; then : + +-lt_aix_libpath_sed=' +- /Import File Strings/,/^$/ { +- /^0/ { +- s/^0 *\(.*\)$/\1/ +- p +- } +- }' +-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +-# Check for a 64-bit object if we didn't find anything. +-if test -z "$aix_libpath"; then +- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +-fi ++ lt_aix_libpath_sed=' ++ /Import File Strings/,/^$/ { ++ /^0/ { ++ s/^0 *\([^ ]*\) *$/\1/ ++ p ++ } ++ }' ++ lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` ++ # Check for a 64-bit object if we didn't find anything. ++ if test -z "$lt_cv_aix_libpath_"; then ++ lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` ++ fi + fi + rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ++ if test -z "$lt_cv_aix_libpath_"; then ++ lt_cv_aix_libpath_="/usr/lib:/lib" ++ fi ++ ++fi ++ ++ aix_libpath=$lt_cv_aix_libpath_ ++fi + + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" +@@ -9284,7 +9811,13 @@ if test -z "$aix_libpath"; then aix_libp + else + # Determine the default libpath from the value encoded in an + # empty executable. +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ if test "${lt_cv_aix_libpath+set}" = set; then ++ aix_libpath=$lt_cv_aix_libpath ++else ++ if test "${lt_cv_aix_libpath_+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + int +@@ -9297,22 +9830,29 @@ main () + _ACEOF + if ac_fn_c_try_link "$LINENO"; then : + +-lt_aix_libpath_sed=' +- /Import File Strings/,/^$/ { +- /^0/ { +- s/^0 *\(.*\)$/\1/ +- p +- } +- }' +-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +-# Check for a 64-bit object if we didn't find anything. +-if test -z "$aix_libpath"; then +- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +-fi ++ lt_aix_libpath_sed=' ++ /Import File Strings/,/^$/ { ++ /^0/ { ++ s/^0 *\([^ ]*\) *$/\1/ ++ p ++ } ++ }' ++ lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` ++ # Check for a 64-bit object if we didn't find anything. ++ if test -z "$lt_cv_aix_libpath_"; then ++ lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` ++ fi + fi + rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ++ if test -z "$lt_cv_aix_libpath_"; then ++ lt_cv_aix_libpath_="/usr/lib:/lib" ++ fi ++ ++fi ++ ++ aix_libpath=$lt_cv_aix_libpath_ ++fi + + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, +@@ -9357,20 +9897,63 @@ if test -z "$aix_libpath"; then aix_libp + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. +- hardcode_libdir_flag_spec=' ' +- allow_undefined_flag=unsupported +- # Tell ltmain to make .lib files, not .a files. +- libext=lib +- # Tell ltmain to make .dll files, not .so files. +- shrext_cmds=".dll" +- # FIXME: Setting linknames here is a bad hack. +- archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' +- # The linker will automatically build a .lib file if we build a DLL. +- old_archive_from_new_cmds='true' +- # FIXME: Should let the user specify the lib program. +- old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' +- fix_srcfile_path='`cygpath -w "$srcfile"`' +- enable_shared_with_static_runtimes=yes ++ case $cc_basename in ++ cl*) ++ # Native MSVC ++ hardcode_libdir_flag_spec=' ' ++ allow_undefined_flag=unsupported ++ always_export_symbols=yes ++ file_list_spec='@' ++ # Tell ltmain to make .lib files, not .a files. ++ libext=lib ++ # Tell ltmain to make .dll files, not .so files. ++ shrext_cmds=".dll" ++ # FIXME: Setting linknames here is a bad hack. ++ archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' ++ archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then ++ sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; ++ else ++ sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; ++ fi~ ++ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ ++ linknames=' ++ # The linker will not automatically build a static lib if we build a DLL. ++ # _LT_TAGVAR(old_archive_from_new_cmds, )='true' ++ enable_shared_with_static_runtimes=yes ++ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' ++ # Don't use ranlib ++ old_postinstall_cmds='chmod 644 $oldlib' ++ postlink_cmds='lt_outputfile="@OUTPUT@"~ ++ lt_tool_outputfile="@TOOL_OUTPUT@"~ ++ case $lt_outputfile in ++ *.exe|*.EXE) ;; ++ *) ++ lt_outputfile="$lt_outputfile.exe" ++ lt_tool_outputfile="$lt_tool_outputfile.exe" ++ ;; ++ esac~ ++ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then ++ $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; ++ $RM "$lt_outputfile.manifest"; ++ fi' ++ ;; ++ *) ++ # Assume MSVC wrapper ++ hardcode_libdir_flag_spec=' ' ++ allow_undefined_flag=unsupported ++ # Tell ltmain to make .lib files, not .a files. ++ libext=lib ++ # Tell ltmain to make .dll files, not .so files. ++ shrext_cmds=".dll" ++ # FIXME: Setting linknames here is a bad hack. ++ archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' ++ # The linker will automatically build a .lib file if we build a DLL. ++ old_archive_from_new_cmds='true' ++ # FIXME: Should let the user specify the lib program. ++ old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' ++ enable_shared_with_static_runtimes=yes ++ ;; ++ esac + ;; + + darwin* | rhapsody*) +@@ -9435,7 +10018,7 @@ if test -z "$aix_libpath"; then aix_libp + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) +- archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' ++ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no +@@ -9443,7 +10026,7 @@ if test -z "$aix_libpath"; then aix_libp + + hpux9*) + if test "$GCC" = yes; then +- archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ++ archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + fi +@@ -9459,7 +10042,7 @@ if test -z "$aix_libpath"; then aix_libp + + hpux10*) + if test "$GCC" = yes && test "$with_gnu_ld" = no; then +- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ++ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi +@@ -9483,10 +10066,10 @@ if test -z "$aix_libpath"; then aix_libp + archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) +- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ++ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) +- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ++ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else +@@ -9565,23 +10148,36 @@ fi + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then +- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ++ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + # Try to use the -exported_symbol ld option, if it does not + # work, assume that -exports_file does not work either and + # implicitly export all symbols. +- save_LDFLAGS="$LDFLAGS" +- LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ # This should be the same for all languages, so no per-tag cache variable. ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 ++$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } ++if test "${lt_cv_irix_exported_symbol+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ save_LDFLAGS="$LDFLAGS" ++ LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-int foo(void) {} ++int foo (void) { return 0; } + _ACEOF + if ac_fn_c_try_link "$LINENO"; then : +- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' +- ++ lt_cv_irix_exported_symbol=yes ++else ++ lt_cv_irix_exported_symbol=no + fi + rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +- LDFLAGS="$save_LDFLAGS" ++ LDFLAGS="$save_LDFLAGS" ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 ++$as_echo "$lt_cv_irix_exported_symbol" >&6; } ++ if test "$lt_cv_irix_exported_symbol" = yes; then ++ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' ++ fi + else + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' +@@ -9666,7 +10262,7 @@ rm -f core conftest.err conftest.$ac_obj + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' +- archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ++ archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + else + allow_undefined_flag=' -expect_unresolved \*' +@@ -9685,9 +10281,9 @@ rm -f core conftest.err conftest.$ac_obj + no_undefined_flag=' -z defs' + if test "$GCC" = yes; then + wlarc='${wl}' +- archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ++ archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ +- $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ++ $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + else + case `$CC -V 2>&1` in + *"Compilers 5.0"*) +@@ -10263,8 +10859,9 @@ cygwin* | mingw* | pw32* | cegcc*) + need_version=no + need_lib_prefix=no + +- case $GCC,$host_os in +- yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) ++ case $GCC,$cc_basename in ++ yes,*) ++ # gcc + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ +@@ -10297,13 +10894,71 @@ cygwin* | mingw* | pw32* | cegcc*) + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + esac ++ dynamic_linker='Win32 ld.exe' ++ ;; ++ ++ *,cl*) ++ # Native MSVC ++ libname_spec='$name' ++ soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ++ library_names_spec='${libname}.dll.lib' ++ ++ case $build_os in ++ mingw*) ++ sys_lib_search_path_spec= ++ lt_save_ifs=$IFS ++ IFS=';' ++ for lt_path in $LIB ++ do ++ IFS=$lt_save_ifs ++ # Let DOS variable expansion print the short 8.3 style file name. ++ lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` ++ sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" ++ done ++ IFS=$lt_save_ifs ++ # Convert to MSYS style. ++ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ++ ;; ++ cygwin*) ++ # Convert to unix form, then to dos form, then back to unix form ++ # but this time dos style (no spaces!) so that the unix form looks ++ # like /cygdrive/c/PROGRA~1:/cygdr... ++ sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` ++ sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` ++ sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ++ ;; ++ *) ++ sys_lib_search_path_spec="$LIB" ++ if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then ++ # It is most probably a Windows format PATH. ++ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` ++ else ++ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ++ fi ++ # FIXME: find the short name or the path components, as spaces are ++ # common. (e.g. "Program Files" -> "PROGRA~1") ++ ;; ++ esac ++ ++ # DLL is installed to $(libdir)/../bin by postinstall_cmds ++ postinstall_cmds='base_file=`basename \${file}`~ ++ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ ++ dldir=$destdir/`dirname \$dlpath`~ ++ test -d \$dldir || mkdir -p \$dldir~ ++ $install_prog $dir/$dlname \$dldir/$dlname' ++ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ ++ dlpath=$dir/\$dldll~ ++ $RM \$dlpath' ++ shlibpath_overrides_runpath=yes ++ dynamic_linker='Win32 link.exe' + ;; + + *) ++ # Assume MSVC wrapper + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ++ dynamic_linker='Win32 ld.exe' + ;; + esac +- dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; +@@ -10399,7 +11054,7 @@ haiku*) + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LIBRARY_PATH + shlibpath_overrides_runpath=yes +- sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib' ++ sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' + hardcode_into_libs=yes + ;; + +@@ -11195,7 +11850,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 11198 "configure" ++#line $LINENO "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -11239,10 +11894,10 @@ else + /* When -fvisbility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ + #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +-void fnord () __attribute__((visibility("default"))); ++int fnord () __attribute__((visibility("default"))); + #endif + +-void fnord () { int i=42; } ++int fnord () { return 42; } + int main () + { + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); +@@ -11301,7 +11956,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 11304 "configure" ++#line $LINENO "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -11345,10 +12000,10 @@ else + /* When -fvisbility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ + #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +-void fnord () __attribute__((visibility("default"))); ++int fnord () __attribute__((visibility("default"))); + #endif + +-void fnord () { int i=42; } ++int fnord () { return 42; } + int main () + { + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); +@@ -14941,13 +15596,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_ + lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' + lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' + lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' ++lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' ++lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' + reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' + reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' + OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' + deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' + file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' ++file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' ++want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' ++DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' ++sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' + AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' + AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' ++archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' + STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' + RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' + old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' +@@ -14962,14 +15624,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$l + lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' + lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' + lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' ++nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' ++lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' + objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' + MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' + lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' +-lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' + lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' ++lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' + lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' + lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' + need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' ++MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' + DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' + NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' + LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' +@@ -15002,12 +15667,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcod + hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' + inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' + link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' +-fix_srcfile_path='`$ECHO "$fix_srcfile_path" | $SED "$delay_single_quote_subst"`' + always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' + export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' + exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' + include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' + prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' ++postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' + file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' + variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' + need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' +@@ -15062,8 +15727,13 @@ reload_flag \ + OBJDUMP \ + deplibs_check_method \ + file_magic_cmd \ ++file_magic_glob \ ++want_nocaseglob \ ++DLLTOOL \ ++sharedlib_from_linklib_cmd \ + AR \ + AR_FLAGS \ ++archiver_list_spec \ + STRIP \ + RANLIB \ + CC \ +@@ -15073,12 +15743,14 @@ lt_cv_sys_global_symbol_pipe \ + lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ ++nm_file_list_spec \ + lt_prog_compiler_no_builtin_flag \ +-lt_prog_compiler_wl \ + lt_prog_compiler_pic \ ++lt_prog_compiler_wl \ + lt_prog_compiler_static \ + lt_cv_prog_compiler_c_o \ + need_locks \ ++MANIFEST_TOOL \ + DSYMUTIL \ + NMEDIT \ + LIPO \ +@@ -15094,7 +15766,6 @@ no_undefined_flag \ + hardcode_libdir_flag_spec \ + hardcode_libdir_flag_spec_ld \ + hardcode_libdir_separator \ +-fix_srcfile_path \ + exclude_expsyms \ + include_expsyms \ + file_list_spec \ +@@ -15130,6 +15801,7 @@ module_cmds \ + module_expsym_cmds \ + export_symbols_cmds \ + prelink_cmds \ ++postlink_cmds \ + postinstall_cmds \ + postuninstall_cmds \ + finish_cmds \ +@@ -15894,7 +16566,8 @@ $as_echo X"$file" | + # NOTE: Changes made to this file will be lost: look at ltmain.sh. + # + # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +-# 2006, 2007, 2008, 2009 Free Software Foundation, Inc. ++# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, ++# Inc. + # Written by Gordon Matzigkeit, 1996 + # + # This file is part of GNU Libtool. +@@ -15997,19 +16670,42 @@ SP2NL=$lt_lt_SP2NL + # turn newlines into spaces. + NL2SP=$lt_lt_NL2SP + ++# convert \$build file names to \$host format. ++to_host_file_cmd=$lt_cv_to_host_file_cmd ++ ++# convert \$build files to toolchain format. ++to_tool_file_cmd=$lt_cv_to_tool_file_cmd ++ + # An object symbol dumper. + OBJDUMP=$lt_OBJDUMP + + # Method to check whether dependent libraries are shared objects. + deplibs_check_method=$lt_deplibs_check_method + +-# Command to use when deplibs_check_method == "file_magic". ++# Command to use when deplibs_check_method = "file_magic". + file_magic_cmd=$lt_file_magic_cmd + ++# How to find potential files when deplibs_check_method = "file_magic". ++file_magic_glob=$lt_file_magic_glob ++ ++# Find potential files using nocaseglob when deplibs_check_method = "file_magic". ++want_nocaseglob=$lt_want_nocaseglob ++ ++# DLL creation program. ++DLLTOOL=$lt_DLLTOOL ++ ++# Command to associate shared and link libraries. ++sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd ++ + # The archiver. + AR=$lt_AR ++ ++# Flags to create an archive. + AR_FLAGS=$lt_AR_FLAGS + ++# How to feed a file listing to the archiver. ++archiver_list_spec=$lt_archiver_list_spec ++ + # A symbol stripping program. + STRIP=$lt_STRIP + +@@ -16039,6 +16735,12 @@ global_symbol_to_c_name_address=$lt_lt_c + # Transform the output of nm in a C name address pair when lib prefix is needed. + global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix + ++# Specify filename containing input files for \$NM. ++nm_file_list_spec=$lt_nm_file_list_spec ++ ++# The root where to search for dependent libraries,and in which our libraries should be installed. ++lt_sysroot=$lt_sysroot ++ + # The name of the directory that contains temporary libtool files. + objdir=$objdir + +@@ -16048,6 +16750,9 @@ MAGIC_CMD=$MAGIC_CMD + # Must we lock files when doing compilation? + need_locks=$lt_need_locks + ++# Manifest tool. ++MANIFEST_TOOL=$lt_MANIFEST_TOOL ++ + # Tool to manipulate archived DWARF debug symbol files on Mac OS X. + DSYMUTIL=$lt_DSYMUTIL + +@@ -16162,12 +16867,12 @@ with_gcc=$GCC + # Compiler flag to turn off builtin functions. + no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag + +-# How to pass a linker flag through the compiler. +-wl=$lt_lt_prog_compiler_wl +- + # Additional compiler flags for building library objects. + pic_flag=$lt_lt_prog_compiler_pic + ++# How to pass a linker flag through the compiler. ++wl=$lt_lt_prog_compiler_wl ++ + # Compiler flag to prevent dynamic linking. + link_static_flag=$lt_lt_prog_compiler_static + +@@ -16254,9 +16959,6 @@ inherit_rpath=$inherit_rpath + # Whether libtool must link a program against all its dependency libraries. + link_all_deplibs=$link_all_deplibs + +-# Fix the shell variable \$srcfile for the compiler. +-fix_srcfile_path=$lt_fix_srcfile_path +- + # Set to "yes" if exported symbols are required. + always_export_symbols=$always_export_symbols + +@@ -16272,6 +16974,9 @@ include_expsyms=$lt_include_expsyms + # Commands necessary for linking programs (against libraries) with templates. + prelink_cmds=$lt_prelink_cmds + ++# Commands necessary for finishing linking programs. ++postlink_cmds=$lt_postlink_cmds ++ + # Specify filename containing input files. + file_list_spec=$lt_file_list_spec + +@@ -16304,210 +17009,169 @@ ltmain="$ac_aux_dir/ltmain.sh" + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? +- sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ +- || (rm -f "$cfgfile"; exit 1) +- +- case $xsi_shell in +- yes) +- cat << \_LT_EOF >> "$cfgfile" +- +-# func_dirname file append nondir_replacement +-# Compute the dirname of FILE. If nonempty, add APPEND to the result, +-# otherwise set result to NONDIR_REPLACEMENT. +-func_dirname () +-{ +- case ${1} in +- */*) func_dirname_result="${1%/*}${2}" ;; +- * ) func_dirname_result="${3}" ;; +- esac +-} +- +-# func_basename file +-func_basename () +-{ +- func_basename_result="${1##*/}" +-} +- +-# func_dirname_and_basename file append nondir_replacement +-# perform func_basename and func_dirname in a single function +-# call: +-# dirname: Compute the dirname of FILE. If nonempty, +-# add APPEND to the result, otherwise set result +-# to NONDIR_REPLACEMENT. +-# value returned in "$func_dirname_result" +-# basename: Compute filename of FILE. +-# value retuned in "$func_basename_result" +-# Implementation must be kept synchronized with func_dirname +-# and func_basename. For efficiency, we do not delegate to +-# those functions but instead duplicate the functionality here. +-func_dirname_and_basename () +-{ +- case ${1} in +- */*) func_dirname_result="${1%/*}${2}" ;; +- * ) func_dirname_result="${3}" ;; +- esac +- func_basename_result="${1##*/}" +-} +- +-# func_stripname prefix suffix name +-# strip PREFIX and SUFFIX off of NAME. +-# PREFIX and SUFFIX must not contain globbing or regex special +-# characters, hashes, percent signs, but SUFFIX may contain a leading +-# dot (in which case that matches only a dot). +-func_stripname () +-{ +- # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are +- # positional parameters, so assign one to ordinary parameter first. +- func_stripname_result=${3} +- func_stripname_result=${func_stripname_result#"${1}"} +- func_stripname_result=${func_stripname_result%"${2}"} +-} +- +-# func_opt_split +-func_opt_split () +-{ +- func_opt_split_opt=${1%%=*} +- func_opt_split_arg=${1#*=} +-} +- +-# func_lo2o object +-func_lo2o () +-{ +- case ${1} in +- *.lo) func_lo2o_result=${1%.lo}.${objext} ;; +- *) func_lo2o_result=${1} ;; +- esac +-} +- +-# func_xform libobj-or-source +-func_xform () +-{ +- func_xform_result=${1%.*}.lo +-} +- +-# func_arith arithmetic-term... +-func_arith () +-{ +- func_arith_result=$(( $* )) +-} +- +-# func_len string +-# STRING may not start with a hyphen. +-func_len () +-{ +- func_len_result=${#1} +-} +- +-_LT_EOF +- ;; +- *) # Bourne compatible functions. +- cat << \_LT_EOF >> "$cfgfile" +- +-# func_dirname file append nondir_replacement +-# Compute the dirname of FILE. If nonempty, add APPEND to the result, +-# otherwise set result to NONDIR_REPLACEMENT. +-func_dirname () +-{ +- # Extract subdirectory from the argument. +- func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` +- if test "X$func_dirname_result" = "X${1}"; then +- func_dirname_result="${3}" +- else +- func_dirname_result="$func_dirname_result${2}" +- fi +-} +- +-# func_basename file +-func_basename () +-{ +- func_basename_result=`$ECHO "${1}" | $SED "$basename"` +-} +- +- +-# func_stripname prefix suffix name +-# strip PREFIX and SUFFIX off of NAME. +-# PREFIX and SUFFIX must not contain globbing or regex special +-# characters, hashes, percent signs, but SUFFIX may contain a leading +-# dot (in which case that matches only a dot). +-# func_strip_suffix prefix name +-func_stripname () +-{ +- case ${2} in +- .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; +- *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; +- esac +-} +- +-# sed scripts: +-my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q' +-my_sed_long_arg='1s/^-[^=]*=//' +- +-# func_opt_split +-func_opt_split () +-{ +- func_opt_split_opt=`$ECHO "${1}" | $SED "$my_sed_long_opt"` +- func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"` +-} +- +-# func_lo2o object +-func_lo2o () +-{ +- func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` +-} +- +-# func_xform libobj-or-source +-func_xform () +-{ +- func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` +-} +- +-# func_arith arithmetic-term... +-func_arith () +-{ +- func_arith_result=`expr "$@"` +-} +- +-# func_len string +-# STRING may not start with a hyphen. +-func_len () +-{ +- func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` +-} +- +-_LT_EOF +-esac +- +-case $lt_shell_append in +- yes) +- cat << \_LT_EOF >> "$cfgfile" +- +-# func_append var value +-# Append VALUE to the end of shell variable VAR. +-func_append () +-{ +- eval "$1+=\$2" +-} +-_LT_EOF +- ;; +- *) +- cat << \_LT_EOF >> "$cfgfile" +- +-# func_append var value +-# Append VALUE to the end of shell variable VAR. +-func_append () +-{ +- eval "$1=\$$1\$2" +-} +- +-_LT_EOF +- ;; +- esac ++ sed '$q' "$ltmain" >> "$cfgfile" \ ++ || (rm -f "$cfgfile"; exit 1) + ++ if test x"$xsi_shell" = xyes; then ++ sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ ++func_dirname ()\ ++{\ ++\ case ${1} in\ ++\ */*) func_dirname_result="${1%/*}${2}" ;;\ ++\ * ) func_dirname_result="${3}" ;;\ ++\ esac\ ++} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_basename ()$/,/^} # func_basename /c\ ++func_basename ()\ ++{\ ++\ func_basename_result="${1##*/}"\ ++} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ ++func_dirname_and_basename ()\ ++{\ ++\ case ${1} in\ ++\ */*) func_dirname_result="${1%/*}${2}" ;;\ ++\ * ) func_dirname_result="${3}" ;;\ ++\ esac\ ++\ func_basename_result="${1##*/}"\ ++} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ ++func_stripname ()\ ++{\ ++\ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ ++\ # positional parameters, so assign one to ordinary parameter first.\ ++\ func_stripname_result=${3}\ ++\ func_stripname_result=${func_stripname_result#"${1}"}\ ++\ func_stripname_result=${func_stripname_result%"${2}"}\ ++} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ ++func_split_long_opt ()\ ++{\ ++\ func_split_long_opt_name=${1%%=*}\ ++\ func_split_long_opt_arg=${1#*=}\ ++} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ ++func_split_short_opt ()\ ++{\ ++\ func_split_short_opt_arg=${1#??}\ ++\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ ++} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ ++func_lo2o ()\ ++{\ ++\ case ${1} in\ ++\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ ++\ *) func_lo2o_result=${1} ;;\ ++\ esac\ ++} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_xform ()$/,/^} # func_xform /c\ ++func_xform ()\ ++{\ ++ func_xform_result=${1%.*}.lo\ ++} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_arith ()$/,/^} # func_arith /c\ ++func_arith ()\ ++{\ ++ func_arith_result=$(( $* ))\ ++} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_len ()$/,/^} # func_len /c\ ++func_len ()\ ++{\ ++ func_len_result=${#1}\ ++} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++fi ++ ++if test x"$lt_shell_append" = xyes; then ++ sed -e '/^func_append ()$/,/^} # func_append /c\ ++func_append ()\ ++{\ ++ eval "${1}+=\\${2}"\ ++} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ ++func_append_quoted ()\ ++{\ ++\ func_quote_for_eval "${2}"\ ++\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ ++} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ # Save a `func_append' function call where possible by direct use of '+=' ++ sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++ test 0 -eq $? || _lt_function_replace_fail=: ++else ++ # Save a `func_append' function call even when '+=' is not available ++ sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++ test 0 -eq $? || _lt_function_replace_fail=: ++fi ++ ++if test x"$_lt_function_replace_fail" = x":"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 ++$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} ++fi + +- sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ +- || (rm -f "$cfgfile"; exit 1) + +- mv -f "$cfgfile" "$ofile" || ++ mv -f "$cfgfile" "$ofile" || + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" + +Index: binutils-2.21.1/gprof/configure +=================================================================== +--- binutils-2.21.1.orig/gprof/configure ++++ binutils-2.21.1/gprof/configure +@@ -629,8 +629,11 @@ OTOOL + LIPO + NMEDIT + DSYMUTIL ++MANIFEST_TOOL + RANLIB ++ac_ct_AR + AR ++DLLTOOL + OBJDUMP + LN_S + NM +@@ -743,6 +746,7 @@ enable_static + with_pic + enable_fast_install + with_gnu_ld ++with_libtool_sysroot + enable_libtool_lock + enable_nls + enable_maintainer_mode +@@ -1397,6 +1401,8 @@ Optional Packages: + --with-pic try to use only PIC/non-PIC objects [default=use + both] + --with-gnu-ld assume the C compiler uses GNU ld [default=no] ++ --with-libtool-sysroot=DIR Search for dependent libraries within DIR ++ (or the compiler's sysroot if not specified). + + Some influential environment variables: + CC C compiler command +@@ -5065,8 +5071,8 @@ esac + + + +-macro_version='2.2.7a' +-macro_revision='1.3134' ++macro_version='2.4' ++macro_revision='1.3293' + + + +@@ -5106,7 +5112,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 + $as_echo_n "checking how to print strings... " >&6; } + # Test print first, because it will be a builtin if present. +-if test "X`print -r -- -n 2>/dev/null`" = X-n && \ ++if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ + test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='print -r --' + elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then +@@ -5792,8 +5798,8 @@ $as_echo_n "checking whether the shell u + # Try some XSI features + xsi_shell=no + ( _lt_dummy="a/b/c" +- test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ +- = c,a/b,, \ ++ test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ ++ = c,a/b,b/c, \ + && eval 'test $(( 1 + 1 )) -eq 2 \ + && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ + && xsi_shell=yes +@@ -5842,6 +5848,80 @@ esac + + + ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 ++$as_echo_n "checking how to convert $build file names to $host format... " >&6; } ++if test "${lt_cv_to_host_file_cmd+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ case $host in ++ *-*-mingw* ) ++ case $build in ++ *-*-mingw* ) # actually msys ++ lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ++ ;; ++ *-*-cygwin* ) ++ lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ++ ;; ++ * ) # otherwise, assume *nix ++ lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ++ ;; ++ esac ++ ;; ++ *-*-cygwin* ) ++ case $build in ++ *-*-mingw* ) # actually msys ++ lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ++ ;; ++ *-*-cygwin* ) ++ lt_cv_to_host_file_cmd=func_convert_file_noop ++ ;; ++ * ) # otherwise, assume *nix ++ lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ++ ;; ++ esac ++ ;; ++ * ) # unhandled hosts (and "normal" native builds) ++ lt_cv_to_host_file_cmd=func_convert_file_noop ++ ;; ++esac ++ ++fi ++ ++to_host_file_cmd=$lt_cv_to_host_file_cmd ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 ++$as_echo "$lt_cv_to_host_file_cmd" >&6; } ++ ++ ++ ++ ++ ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 ++$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } ++if test "${lt_cv_to_tool_file_cmd+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ #assume ordinary cross tools, or native build. ++lt_cv_to_tool_file_cmd=func_convert_file_noop ++case $host in ++ *-*-mingw* ) ++ case $build in ++ *-*-mingw* ) # actually msys ++ lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ++ ;; ++ esac ++ ;; ++esac ++ ++fi ++ ++to_tool_file_cmd=$lt_cv_to_tool_file_cmd ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 ++$as_echo "$lt_cv_to_tool_file_cmd" >&6; } ++ ++ ++ ++ ++ + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 + $as_echo_n "checking for $LD option to reload object files... " >&6; } + if test "${lt_cv_ld_reload_flag+set}" = set; then : +@@ -5858,6 +5938,11 @@ case $reload_flag in + esac + reload_cmds='$LD$reload_flag -o $output$reload_objs' + case $host_os in ++ cygwin* | mingw* | pw32* | cegcc*) ++ if test "$GCC" != yes; then ++ reload_cmds=false ++ fi ++ ;; + darwin*) + if test "$GCC" = yes; then + reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' +@@ -6026,7 +6111,8 @@ mingw* | pw32*) + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + else +- lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' ++ # Keep this pattern in sync with the one in func_win32_libid. ++ lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' + lt_cv_file_magic_cmd='$OBJDUMP -f' + fi + ;; +@@ -6185,6 +6271,21 @@ esac + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 + $as_echo "$lt_cv_deplibs_check_method" >&6; } ++ ++file_magic_glob= ++want_nocaseglob=no ++if test "$build" = "$host"; then ++ case $host_os in ++ mingw* | pw32*) ++ if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then ++ want_nocaseglob=yes ++ else ++ file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` ++ fi ++ ;; ++ esac ++fi ++ + file_magic_cmd=$lt_cv_file_magic_cmd + deplibs_check_method=$lt_cv_deplibs_check_method + test -z "$deplibs_check_method" && deplibs_check_method=unknown +@@ -6200,9 +6301,162 @@ test -z "$deplibs_check_method" && depli + + + ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + if test -n "$ac_tool_prefix"; then +- # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. +-set dummy ${ac_tool_prefix}ar; ac_word=$2 ++ # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. ++set dummy ${ac_tool_prefix}dlltool; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if test "${ac_cv_prog_DLLTOOL+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test -n "$DLLTOOL"; then ++ ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ++ ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++ done ++IFS=$as_save_IFS ++ ++fi ++fi ++DLLTOOL=$ac_cv_prog_DLLTOOL ++if test -n "$DLLTOOL"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 ++$as_echo "$DLLTOOL" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++fi ++ ++ ++fi ++if test -z "$ac_cv_prog_DLLTOOL"; then ++ ac_ct_DLLTOOL=$DLLTOOL ++ # Extract the first word of "dlltool", so it can be a program name with args. ++set dummy dlltool; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test -n "$ac_ct_DLLTOOL"; then ++ ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ++ ac_cv_prog_ac_ct_DLLTOOL="dlltool" ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++ done ++IFS=$as_save_IFS ++ ++fi ++fi ++ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL ++if test -n "$ac_ct_DLLTOOL"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 ++$as_echo "$ac_ct_DLLTOOL" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++fi ++ ++ if test "x$ac_ct_DLLTOOL" = x; then ++ DLLTOOL="false" ++ else ++ case $cross_compiling:$ac_tool_warned in ++yes:) ++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 ++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ++ac_tool_warned=yes ;; ++esac ++ DLLTOOL=$ac_ct_DLLTOOL ++ fi ++else ++ DLLTOOL="$ac_cv_prog_DLLTOOL" ++fi ++ ++test -z "$DLLTOOL" && DLLTOOL=dlltool ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 ++$as_echo_n "checking how to associate runtime and link libraries... " >&6; } ++if test "${lt_cv_sharedlib_from_linklib_cmd+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ lt_cv_sharedlib_from_linklib_cmd='unknown' ++ ++case $host_os in ++cygwin* | mingw* | pw32* | cegcc*) ++ # two different shell functions defined in ltmain.sh ++ # decide which to use based on capabilities of $DLLTOOL ++ case `$DLLTOOL --help 2>&1` in ++ *--identify-strict*) ++ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ++ ;; ++ *) ++ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ++ ;; ++ esac ++ ;; ++*) ++ # fallback: assume linklib IS sharedlib ++ lt_cv_sharedlib_from_linklib_cmd="$ECHO" ++ ;; ++esac ++ ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 ++$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } ++sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd ++test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO ++ ++ ++ ++ ++ ++ ++ ++if test -n "$ac_tool_prefix"; then ++ for ac_prog in ar ++ do ++ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. ++set dummy $ac_tool_prefix$ac_prog; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } + if test "${ac_cv_prog_AR+set}" = set; then : +@@ -6218,7 +6472,7 @@ do + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then +- ac_cv_prog_AR="${ac_tool_prefix}ar" ++ ac_cv_prog_AR="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +@@ -6238,11 +6492,15 @@ $as_echo "no" >&6; } + fi + + ++ test -n "$AR" && break ++ done + fi +-if test -z "$ac_cv_prog_AR"; then ++if test -z "$AR"; then + ac_ct_AR=$AR +- # Extract the first word of "ar", so it can be a program name with args. +-set dummy ar; ac_word=$2 ++ for ac_prog in ar ++do ++ # Extract the first word of "$ac_prog", so it can be a program name with args. ++set dummy $ac_prog; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } + if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : +@@ -6258,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 +- ac_cv_prog_ac_ct_AR="ar" ++ ac_cv_prog_ac_ct_AR="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +@@ -6277,6 +6535,10 @@ else + $as_echo "no" >&6; } + fi + ++ ++ test -n "$ac_ct_AR" && break ++done ++ + if test "x$ac_ct_AR" = x; then + AR="false" + else +@@ -6288,12 +6550,10 @@ ac_tool_warned=yes ;; + esac + AR=$ac_ct_AR + fi +-else +- AR="$ac_cv_prog_AR" + fi + +-test -z "$AR" && AR=ar +-test -z "$AR_FLAGS" && AR_FLAGS=cru ++: ${AR=ar} ++: ${AR_FLAGS=cru} + + + +@@ -6305,6 +6565,64 @@ test -z "$AR_FLAGS" && AR_FLAGS=cru + + + ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 ++$as_echo_n "checking for archiver @FILE support... " >&6; } ++if test "${lt_cv_ar_at_file+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ lt_cv_ar_at_file=no ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++ ++int ++main () ++{ ++ ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : ++ echo conftest.$ac_objext > conftest.lst ++ lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' ++ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 ++ (eval $lt_ar_try) 2>&5 ++ ac_status=$? ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; } ++ if test "$ac_status" -eq 0; then ++ # Ensure the archiver fails upon bogus file names. ++ rm -f conftest.$ac_objext libconftest.a ++ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 ++ (eval $lt_ar_try) 2>&5 ++ ac_status=$? ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; } ++ if test "$ac_status" -ne 0; then ++ lt_cv_ar_at_file=@ ++ fi ++ fi ++ rm -f conftest.* libconftest.a ++ ++fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 ++$as_echo "$lt_cv_ar_at_file" >&6; } ++ ++if test "x$lt_cv_ar_at_file" = xno; then ++ archiver_list_spec= ++else ++ archiver_list_spec=$lt_cv_ar_at_file ++fi ++ ++ ++ ++ ++ ++ ++ + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. + set dummy ${ac_tool_prefix}strip; ac_word=$2 +@@ -6639,8 +6957,8 @@ esac + lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + + # Transform an extracted symbol line into symbol name and symbol address +-lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" +-lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" ++lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" ++lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" + + # Handle CRLF in mingw tool chain + opt_cr= +@@ -6676,6 +6994,7 @@ for ac_symprfx in "" "_"; do + else + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + fi ++ lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" + + # Check to see that the pipe works correctly. + pipe_works=no +@@ -6717,6 +7036,18 @@ _LT_EOF + if $GREP ' nm_test_var$' "$nlist" >/dev/null; then + if $GREP ' nm_test_func$' "$nlist" >/dev/null; then + cat <<_LT_EOF > conftest.$ac_ext ++/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ ++#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) ++/* DATA imports from DLLs on WIN32 con't be const, because runtime ++ relocations are performed -- see ld's documentation on pseudo-relocs. */ ++# define LT_DLSYM_CONST ++#elif defined(__osf__) ++/* This system does not cope well with relocations in const data. */ ++# define LT_DLSYM_CONST ++#else ++# define LT_DLSYM_CONST const ++#endif ++ + #ifdef __cplusplus + extern "C" { + #endif +@@ -6728,7 +7059,7 @@ _LT_EOF + cat <<_LT_EOF >> conftest.$ac_ext + + /* The mapping between symbol names and symbols. */ +-const struct { ++LT_DLSYM_CONST struct { + const char *name; + void *address; + } +@@ -6754,8 +7085,8 @@ static const void *lt_preloaded_setup() + _LT_EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext +- lt_save_LIBS="$LIBS" +- lt_save_CFLAGS="$CFLAGS" ++ lt_globsym_save_LIBS=$LIBS ++ lt_globsym_save_CFLAGS=$CFLAGS + LIBS="conftstm.$ac_objext" + CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 +@@ -6765,8 +7096,8 @@ _LT_EOF + test $ac_status = 0; } && test -s conftest${ac_exeext}; then + pipe_works=yes + fi +- LIBS="$lt_save_LIBS" +- CFLAGS="$lt_save_CFLAGS" ++ LIBS=$lt_globsym_save_LIBS ++ CFLAGS=$lt_globsym_save_CFLAGS + else + echo "cannot find nm_test_func in $nlist" >&5 + fi +@@ -6803,6 +7134,19 @@ else + $as_echo "ok" >&6; } + fi + ++# Response file support. ++if test "$lt_cv_nm_interface" = "MS dumpbin"; then ++ nm_file_list_spec='@' ++elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then ++ nm_file_list_spec='@' ++fi ++ ++ ++ ++ ++ ++ ++ + + + +@@ -6823,6 +7167,42 @@ fi + + + ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 ++$as_echo_n "checking for sysroot... " >&6; } ++ ++# Check whether --with-libtool-sysroot was given. ++if test "${with_libtool_sysroot+set}" = set; then : ++ withval=$with_libtool_sysroot; ++else ++ with_libtool_sysroot=no ++fi ++ ++ ++lt_sysroot= ++case ${with_libtool_sysroot} in #( ++ yes) ++ if test "$GCC" = yes; then ++ lt_sysroot=`$CC --print-sysroot 2>/dev/null` ++ fi ++ ;; #( ++ /*) ++ lt_sysroot=`echo "$with_libtool_sysroot" | sed -e "$sed_quote_subst"` ++ ;; #( ++ no|'') ++ ;; #( ++ *) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libtool_sysroot}" >&5 ++$as_echo "${with_libtool_sysroot}" >&6; } ++ as_fn_error "The sysroot must be an absolute path." "$LINENO" 5 ++ ;; ++esac ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 ++$as_echo "${lt_sysroot:-no}" >&6; } ++ ++ ++ ++ + + # Check whether --enable-libtool-lock was given. + if test "${enable_libtool_lock+set}" = set; then : +@@ -7017,6 +7397,123 @@ esac + + need_locks="$enable_libtool_lock" + ++if test -n "$ac_tool_prefix"; then ++ # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. ++set dummy ${ac_tool_prefix}mt; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if test "${ac_cv_prog_MANIFEST_TOOL+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test -n "$MANIFEST_TOOL"; then ++ ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ++ ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++ done ++IFS=$as_save_IFS ++ ++fi ++fi ++MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL ++if test -n "$MANIFEST_TOOL"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 ++$as_echo "$MANIFEST_TOOL" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++fi ++ ++ ++fi ++if test -z "$ac_cv_prog_MANIFEST_TOOL"; then ++ ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL ++ # Extract the first word of "mt", so it can be a program name with args. ++set dummy mt; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if test "${ac_cv_prog_ac_ct_MANIFEST_TOOL+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test -n "$ac_ct_MANIFEST_TOOL"; then ++ ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ++ ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++ done ++IFS=$as_save_IFS ++ ++fi ++fi ++ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL ++if test -n "$ac_ct_MANIFEST_TOOL"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 ++$as_echo "$ac_ct_MANIFEST_TOOL" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++fi ++ ++ if test "x$ac_ct_MANIFEST_TOOL" = x; then ++ MANIFEST_TOOL=":" ++ else ++ case $cross_compiling:$ac_tool_warned in ++yes:) ++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 ++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ++ac_tool_warned=yes ;; ++esac ++ MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL ++ fi ++else ++ MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" ++fi ++ ++test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 ++$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } ++if test "${lt_cv_path_mainfest_tool+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ lt_cv_path_mainfest_tool=no ++ echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 ++ $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out ++ cat conftest.err >&5 ++ if $GREP 'Manifest Tool' conftest.out > /dev/null; then ++ lt_cv_path_mainfest_tool=yes ++ fi ++ rm -f conftest* ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 ++$as_echo "$lt_cv_path_mainfest_tool" >&6; } ++if test "x$lt_cv_path_mainfest_tool" != xyes; then ++ MANIFEST_TOOL=: ++fi ++ ++ ++ ++ ++ + + case $host_os in + rhapsody* | darwin*) +@@ -7580,6 +8077,8 @@ _LT_EOF + $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 + echo "$AR cru libconftest.a conftest.o" >&5 + $AR cru libconftest.a conftest.o 2>&5 ++ echo "$RANLIB libconftest.a" >&5 ++ $RANLIB libconftest.a 2>&5 + cat > conftest.c << _LT_EOF + int main() { return 0;} + _LT_EOF +@@ -7775,7 +8274,8 @@ fi + LIBTOOL_DEPS="$ltmain" + + # Always use our own libtool. +-LIBTOOL='$(SHELL) $(top_builddir)/libtool' ++LIBTOOL='$(SHELL) $(top_builddir)' ++LIBTOOL="$LIBTOOL/${host_alias}-libtool" + + + +@@ -7864,7 +8364,7 @@ aix3*) + esac + + # Global variables: +-ofile=libtool ++ofile=${host_alias}-libtool + can_build_shared=yes + + # All known linkers require a `.a' archive for static linking (except MSVC, +@@ -8162,8 +8662,6 @@ fi + lt_prog_compiler_pic= + lt_prog_compiler_static= + +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +-$as_echo_n "checking for $compiler option to produce PIC... " >&6; } + + if test "$GCC" = yes; then + lt_prog_compiler_wl='-Wl,' +@@ -8328,6 +8826,12 @@ $as_echo_n "checking for $compiler optio + lt_prog_compiler_pic='--shared' + lt_prog_compiler_static='--static' + ;; ++ nagfor*) ++ # NAG Fortran compiler ++ lt_prog_compiler_wl='-Wl,-Wl,,' ++ lt_prog_compiler_pic='-PIC' ++ lt_prog_compiler_static='-Bstatic' ++ ;; + pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) +@@ -8390,7 +8894,7 @@ $as_echo_n "checking for $compiler optio + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + case $cc_basename in +- f77* | f90* | f95*) ++ f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) + lt_prog_compiler_wl='-Qoption ld ';; + *) + lt_prog_compiler_wl='-Wl,';; +@@ -8447,13 +8951,17 @@ case $host_os in + lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" + ;; + esac +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5 +-$as_echo "$lt_prog_compiler_pic" >&6; } +- +- +- +- + ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 ++$as_echo_n "checking for $compiler option to produce PIC... " >&6; } ++if test "${lt_cv_prog_compiler_pic+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ lt_cv_prog_compiler_pic=$lt_prog_compiler_pic ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 ++$as_echo "$lt_cv_prog_compiler_pic" >&6; } ++lt_prog_compiler_pic=$lt_cv_prog_compiler_pic + + # + # Check to make sure the PIC flag actually works. +@@ -8514,6 +9022,11 @@ fi + + + ++ ++ ++ ++ ++ + # + # Check to make sure the static flag actually works. + # +@@ -8864,7 +9377,8 @@ _LT_EOF + allow_undefined_flag=unsupported + always_export_symbols=no + enable_shared_with_static_runtimes=yes +- export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' ++ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' ++ exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' +@@ -8912,7 +9426,7 @@ _LT_EOF + if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ + && test "$tmp_diet" = no + then +- tmp_addflag= ++ tmp_addflag=' $pic_flag' + tmp_sharedflag='-shared' + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler +@@ -8963,12 +9477,12 @@ _LT_EOF + whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' + hardcode_libdir_flag_spec= + hardcode_libdir_flag_spec_ld='-rpath $libdir' +- archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' ++ archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' + if test "x$supports_anon_versioning" = xyes; then + archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ +- $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' ++ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + fi + ;; + esac +@@ -8982,8 +9496,8 @@ _LT_EOF + archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else +- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' +- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ++ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' ++ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + +@@ -9001,8 +9515,8 @@ _LT_EOF + + _LT_EOF + elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then +- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' +- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ++ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' ++ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi +@@ -9048,8 +9562,8 @@ _LT_EOF + + *) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then +- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' +- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ++ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' ++ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi +@@ -9179,7 +9693,13 @@ _LT_EOF + allow_undefined_flag='-berok' + # Determine the default libpath from the value encoded in an + # empty executable. +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ if test "${lt_cv_aix_libpath+set}" = set; then ++ aix_libpath=$lt_cv_aix_libpath ++else ++ if test "${lt_cv_aix_libpath_+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + int +@@ -9192,22 +9712,29 @@ main () + _ACEOF + if ac_fn_c_try_link "$LINENO"; then : + +-lt_aix_libpath_sed=' +- /Import File Strings/,/^$/ { +- /^0/ { +- s/^0 *\(.*\)$/\1/ +- p +- } +- }' +-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +-# Check for a 64-bit object if we didn't find anything. +-if test -z "$aix_libpath"; then +- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +-fi ++ lt_aix_libpath_sed=' ++ /Import File Strings/,/^$/ { ++ /^0/ { ++ s/^0 *\([^ ]*\) *$/\1/ ++ p ++ } ++ }' ++ lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` ++ # Check for a 64-bit object if we didn't find anything. ++ if test -z "$lt_cv_aix_libpath_"; then ++ lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` ++ fi + fi + rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ++ if test -z "$lt_cv_aix_libpath_"; then ++ lt_cv_aix_libpath_="/usr/lib:/lib" ++ fi ++ ++fi ++ ++ aix_libpath=$lt_cv_aix_libpath_ ++fi + + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" +@@ -9219,7 +9746,13 @@ if test -z "$aix_libpath"; then aix_libp + else + # Determine the default libpath from the value encoded in an + # empty executable. +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ if test "${lt_cv_aix_libpath+set}" = set; then ++ aix_libpath=$lt_cv_aix_libpath ++else ++ if test "${lt_cv_aix_libpath_+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + int +@@ -9232,22 +9765,29 @@ main () + _ACEOF + if ac_fn_c_try_link "$LINENO"; then : + +-lt_aix_libpath_sed=' +- /Import File Strings/,/^$/ { +- /^0/ { +- s/^0 *\(.*\)$/\1/ +- p +- } +- }' +-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +-# Check for a 64-bit object if we didn't find anything. +-if test -z "$aix_libpath"; then +- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +-fi ++ lt_aix_libpath_sed=' ++ /Import File Strings/,/^$/ { ++ /^0/ { ++ s/^0 *\([^ ]*\) *$/\1/ ++ p ++ } ++ }' ++ lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` ++ # Check for a 64-bit object if we didn't find anything. ++ if test -z "$lt_cv_aix_libpath_"; then ++ lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` ++ fi + fi + rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ++ if test -z "$lt_cv_aix_libpath_"; then ++ lt_cv_aix_libpath_="/usr/lib:/lib" ++ fi ++ ++fi ++ ++ aix_libpath=$lt_cv_aix_libpath_ ++fi + + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, +@@ -9292,20 +9832,63 @@ if test -z "$aix_libpath"; then aix_libp + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. +- hardcode_libdir_flag_spec=' ' +- allow_undefined_flag=unsupported +- # Tell ltmain to make .lib files, not .a files. +- libext=lib +- # Tell ltmain to make .dll files, not .so files. +- shrext_cmds=".dll" +- # FIXME: Setting linknames here is a bad hack. +- archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' +- # The linker will automatically build a .lib file if we build a DLL. +- old_archive_from_new_cmds='true' +- # FIXME: Should let the user specify the lib program. +- old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' +- fix_srcfile_path='`cygpath -w "$srcfile"`' +- enable_shared_with_static_runtimes=yes ++ case $cc_basename in ++ cl*) ++ # Native MSVC ++ hardcode_libdir_flag_spec=' ' ++ allow_undefined_flag=unsupported ++ always_export_symbols=yes ++ file_list_spec='@' ++ # Tell ltmain to make .lib files, not .a files. ++ libext=lib ++ # Tell ltmain to make .dll files, not .so files. ++ shrext_cmds=".dll" ++ # FIXME: Setting linknames here is a bad hack. ++ archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' ++ archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then ++ sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; ++ else ++ sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; ++ fi~ ++ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ ++ linknames=' ++ # The linker will not automatically build a static lib if we build a DLL. ++ # _LT_TAGVAR(old_archive_from_new_cmds, )='true' ++ enable_shared_with_static_runtimes=yes ++ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' ++ # Don't use ranlib ++ old_postinstall_cmds='chmod 644 $oldlib' ++ postlink_cmds='lt_outputfile="@OUTPUT@"~ ++ lt_tool_outputfile="@TOOL_OUTPUT@"~ ++ case $lt_outputfile in ++ *.exe|*.EXE) ;; ++ *) ++ lt_outputfile="$lt_outputfile.exe" ++ lt_tool_outputfile="$lt_tool_outputfile.exe" ++ ;; ++ esac~ ++ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then ++ $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; ++ $RM "$lt_outputfile.manifest"; ++ fi' ++ ;; ++ *) ++ # Assume MSVC wrapper ++ hardcode_libdir_flag_spec=' ' ++ allow_undefined_flag=unsupported ++ # Tell ltmain to make .lib files, not .a files. ++ libext=lib ++ # Tell ltmain to make .dll files, not .so files. ++ shrext_cmds=".dll" ++ # FIXME: Setting linknames here is a bad hack. ++ archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' ++ # The linker will automatically build a .lib file if we build a DLL. ++ old_archive_from_new_cmds='true' ++ # FIXME: Should let the user specify the lib program. ++ old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' ++ enable_shared_with_static_runtimes=yes ++ ;; ++ esac + ;; + + darwin* | rhapsody*) +@@ -9370,7 +9953,7 @@ if test -z "$aix_libpath"; then aix_libp + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) +- archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' ++ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no +@@ -9378,7 +9961,7 @@ if test -z "$aix_libpath"; then aix_libp + + hpux9*) + if test "$GCC" = yes; then +- archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ++ archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + fi +@@ -9394,7 +9977,7 @@ if test -z "$aix_libpath"; then aix_libp + + hpux10*) + if test "$GCC" = yes && test "$with_gnu_ld" = no; then +- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ++ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi +@@ -9418,10 +10001,10 @@ if test -z "$aix_libpath"; then aix_libp + archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) +- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ++ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) +- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ++ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else +@@ -9500,23 +10083,36 @@ fi + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then +- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ++ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + # Try to use the -exported_symbol ld option, if it does not + # work, assume that -exports_file does not work either and + # implicitly export all symbols. +- save_LDFLAGS="$LDFLAGS" +- LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ # This should be the same for all languages, so no per-tag cache variable. ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 ++$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } ++if test "${lt_cv_irix_exported_symbol+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ save_LDFLAGS="$LDFLAGS" ++ LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-int foo(void) {} ++int foo (void) { return 0; } + _ACEOF + if ac_fn_c_try_link "$LINENO"; then : +- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' +- ++ lt_cv_irix_exported_symbol=yes ++else ++ lt_cv_irix_exported_symbol=no + fi + rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +- LDFLAGS="$save_LDFLAGS" ++ LDFLAGS="$save_LDFLAGS" ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 ++$as_echo "$lt_cv_irix_exported_symbol" >&6; } ++ if test "$lt_cv_irix_exported_symbol" = yes; then ++ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' ++ fi + else + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' +@@ -9601,7 +10197,7 @@ rm -f core conftest.err conftest.$ac_obj + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' +- archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ++ archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + else + allow_undefined_flag=' -expect_unresolved \*' +@@ -9620,9 +10216,9 @@ rm -f core conftest.err conftest.$ac_obj + no_undefined_flag=' -z defs' + if test "$GCC" = yes; then + wlarc='${wl}' +- archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ++ archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ +- $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ++ $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + else + case `$CC -V 2>&1` in + *"Compilers 5.0"*) +@@ -10198,8 +10794,9 @@ cygwin* | mingw* | pw32* | cegcc*) + need_version=no + need_lib_prefix=no + +- case $GCC,$host_os in +- yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) ++ case $GCC,$cc_basename in ++ yes,*) ++ # gcc + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ +@@ -10232,13 +10829,71 @@ cygwin* | mingw* | pw32* | cegcc*) + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + esac ++ dynamic_linker='Win32 ld.exe' ++ ;; ++ ++ *,cl*) ++ # Native MSVC ++ libname_spec='$name' ++ soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ++ library_names_spec='${libname}.dll.lib' ++ ++ case $build_os in ++ mingw*) ++ sys_lib_search_path_spec= ++ lt_save_ifs=$IFS ++ IFS=';' ++ for lt_path in $LIB ++ do ++ IFS=$lt_save_ifs ++ # Let DOS variable expansion print the short 8.3 style file name. ++ lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` ++ sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" ++ done ++ IFS=$lt_save_ifs ++ # Convert to MSYS style. ++ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ++ ;; ++ cygwin*) ++ # Convert to unix form, then to dos form, then back to unix form ++ # but this time dos style (no spaces!) so that the unix form looks ++ # like /cygdrive/c/PROGRA~1:/cygdr... ++ sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` ++ sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` ++ sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ++ ;; ++ *) ++ sys_lib_search_path_spec="$LIB" ++ if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then ++ # It is most probably a Windows format PATH. ++ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` ++ else ++ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ++ fi ++ # FIXME: find the short name or the path components, as spaces are ++ # common. (e.g. "Program Files" -> "PROGRA~1") ++ ;; ++ esac ++ ++ # DLL is installed to $(libdir)/../bin by postinstall_cmds ++ postinstall_cmds='base_file=`basename \${file}`~ ++ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ ++ dldir=$destdir/`dirname \$dlpath`~ ++ test -d \$dldir || mkdir -p \$dldir~ ++ $install_prog $dir/$dlname \$dldir/$dlname' ++ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ ++ dlpath=$dir/\$dldll~ ++ $RM \$dlpath' ++ shlibpath_overrides_runpath=yes ++ dynamic_linker='Win32 link.exe' + ;; + + *) ++ # Assume MSVC wrapper + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ++ dynamic_linker='Win32 ld.exe' + ;; + esac +- dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; +@@ -10334,7 +10989,7 @@ haiku*) + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LIBRARY_PATH + shlibpath_overrides_runpath=yes +- sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib' ++ sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' + hardcode_into_libs=yes + ;; + +@@ -11130,7 +11785,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 11128 "configure" ++#line $LINENO "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -11174,10 +11829,10 @@ else + /* When -fvisbility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ + #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +-void fnord () __attribute__((visibility("default"))); ++int fnord () __attribute__((visibility("default"))); + #endif + +-void fnord () { int i=42; } ++int fnord () { return 42; } + int main () + { + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); +@@ -11236,7 +11891,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 11234 "configure" ++#line $LINENO "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -11280,10 +11935,10 @@ else + /* When -fvisbility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ + #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +-void fnord () __attribute__((visibility("default"))); ++int fnord () __attribute__((visibility("default"))); + #endif + +-void fnord () { int i=42; } ++int fnord () { return 42; } + int main () + { + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); +@@ -12825,13 +13480,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_ + lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' + lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' + lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' ++lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' ++lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' + reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' + reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' + OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' + deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' + file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' ++file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' ++want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' ++DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' ++sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' + AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' + AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' ++archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' + STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' + RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' + old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' +@@ -12846,14 +13508,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$l + lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' + lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' + lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' ++nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' ++lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' + objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' + MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' + lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' +-lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' + lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' ++lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' + lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' + lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' + need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' ++MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' + DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' + NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' + LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' +@@ -12886,12 +13551,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcod + hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' + inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' + link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' +-fix_srcfile_path='`$ECHO "$fix_srcfile_path" | $SED "$delay_single_quote_subst"`' + always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' + export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' + exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' + include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' + prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' ++postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' + file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' + variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' + need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' +@@ -12946,8 +13611,13 @@ reload_flag \ + OBJDUMP \ + deplibs_check_method \ + file_magic_cmd \ ++file_magic_glob \ ++want_nocaseglob \ ++DLLTOOL \ ++sharedlib_from_linklib_cmd \ + AR \ + AR_FLAGS \ ++archiver_list_spec \ + STRIP \ + RANLIB \ + CC \ +@@ -12957,12 +13627,14 @@ lt_cv_sys_global_symbol_pipe \ + lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ ++nm_file_list_spec \ + lt_prog_compiler_no_builtin_flag \ +-lt_prog_compiler_wl \ + lt_prog_compiler_pic \ ++lt_prog_compiler_wl \ + lt_prog_compiler_static \ + lt_cv_prog_compiler_c_o \ + need_locks \ ++MANIFEST_TOOL \ + DSYMUTIL \ + NMEDIT \ + LIPO \ +@@ -12978,7 +13650,6 @@ no_undefined_flag \ + hardcode_libdir_flag_spec \ + hardcode_libdir_flag_spec_ld \ + hardcode_libdir_separator \ +-fix_srcfile_path \ + exclude_expsyms \ + include_expsyms \ + file_list_spec \ +@@ -13014,6 +13685,7 @@ module_cmds \ + module_expsym_cmds \ + export_symbols_cmds \ + prelink_cmds \ ++postlink_cmds \ + postinstall_cmds \ + postuninstall_cmds \ + finish_cmds \ +@@ -13770,7 +14442,8 @@ $as_echo X"$file" | + # NOTE: Changes made to this file will be lost: look at ltmain.sh. + # + # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +-# 2006, 2007, 2008, 2009 Free Software Foundation, Inc. ++# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, ++# Inc. + # Written by Gordon Matzigkeit, 1996 + # + # This file is part of GNU Libtool. +@@ -13873,19 +14546,42 @@ SP2NL=$lt_lt_SP2NL + # turn newlines into spaces. + NL2SP=$lt_lt_NL2SP + ++# convert \$build file names to \$host format. ++to_host_file_cmd=$lt_cv_to_host_file_cmd ++ ++# convert \$build files to toolchain format. ++to_tool_file_cmd=$lt_cv_to_tool_file_cmd ++ + # An object symbol dumper. + OBJDUMP=$lt_OBJDUMP + + # Method to check whether dependent libraries are shared objects. + deplibs_check_method=$lt_deplibs_check_method + +-# Command to use when deplibs_check_method == "file_magic". ++# Command to use when deplibs_check_method = "file_magic". + file_magic_cmd=$lt_file_magic_cmd + ++# How to find potential files when deplibs_check_method = "file_magic". ++file_magic_glob=$lt_file_magic_glob ++ ++# Find potential files using nocaseglob when deplibs_check_method = "file_magic". ++want_nocaseglob=$lt_want_nocaseglob ++ ++# DLL creation program. ++DLLTOOL=$lt_DLLTOOL ++ ++# Command to associate shared and link libraries. ++sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd ++ + # The archiver. + AR=$lt_AR ++ ++# Flags to create an archive. + AR_FLAGS=$lt_AR_FLAGS + ++# How to feed a file listing to the archiver. ++archiver_list_spec=$lt_archiver_list_spec ++ + # A symbol stripping program. + STRIP=$lt_STRIP + +@@ -13915,6 +14611,12 @@ global_symbol_to_c_name_address=$lt_lt_c + # Transform the output of nm in a C name address pair when lib prefix is needed. + global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix + ++# Specify filename containing input files for \$NM. ++nm_file_list_spec=$lt_nm_file_list_spec ++ ++# The root where to search for dependent libraries,and in which our libraries should be installed. ++lt_sysroot=$lt_sysroot ++ + # The name of the directory that contains temporary libtool files. + objdir=$objdir + +@@ -13924,6 +14626,9 @@ MAGIC_CMD=$MAGIC_CMD + # Must we lock files when doing compilation? + need_locks=$lt_need_locks + ++# Manifest tool. ++MANIFEST_TOOL=$lt_MANIFEST_TOOL ++ + # Tool to manipulate archived DWARF debug symbol files on Mac OS X. + DSYMUTIL=$lt_DSYMUTIL + +@@ -14038,12 +14743,12 @@ with_gcc=$GCC + # Compiler flag to turn off builtin functions. + no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag + +-# How to pass a linker flag through the compiler. +-wl=$lt_lt_prog_compiler_wl +- + # Additional compiler flags for building library objects. + pic_flag=$lt_lt_prog_compiler_pic + ++# How to pass a linker flag through the compiler. ++wl=$lt_lt_prog_compiler_wl ++ + # Compiler flag to prevent dynamic linking. + link_static_flag=$lt_lt_prog_compiler_static + +@@ -14130,9 +14835,6 @@ inherit_rpath=$inherit_rpath + # Whether libtool must link a program against all its dependency libraries. + link_all_deplibs=$link_all_deplibs + +-# Fix the shell variable \$srcfile for the compiler. +-fix_srcfile_path=$lt_fix_srcfile_path +- + # Set to "yes" if exported symbols are required. + always_export_symbols=$always_export_symbols + +@@ -14148,6 +14850,9 @@ include_expsyms=$lt_include_expsyms + # Commands necessary for linking programs (against libraries) with templates. + prelink_cmds=$lt_prelink_cmds + ++# Commands necessary for finishing linking programs. ++postlink_cmds=$lt_postlink_cmds ++ + # Specify filename containing input files. + file_list_spec=$lt_file_list_spec + +@@ -14180,210 +14885,169 @@ ltmain="$ac_aux_dir/ltmain.sh" + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? +- sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ +- || (rm -f "$cfgfile"; exit 1) +- +- case $xsi_shell in +- yes) +- cat << \_LT_EOF >> "$cfgfile" +- +-# func_dirname file append nondir_replacement +-# Compute the dirname of FILE. If nonempty, add APPEND to the result, +-# otherwise set result to NONDIR_REPLACEMENT. +-func_dirname () +-{ +- case ${1} in +- */*) func_dirname_result="${1%/*}${2}" ;; +- * ) func_dirname_result="${3}" ;; +- esac +-} +- +-# func_basename file +-func_basename () +-{ +- func_basename_result="${1##*/}" +-} +- +-# func_dirname_and_basename file append nondir_replacement +-# perform func_basename and func_dirname in a single function +-# call: +-# dirname: Compute the dirname of FILE. If nonempty, +-# add APPEND to the result, otherwise set result +-# to NONDIR_REPLACEMENT. +-# value returned in "$func_dirname_result" +-# basename: Compute filename of FILE. +-# value retuned in "$func_basename_result" +-# Implementation must be kept synchronized with func_dirname +-# and func_basename. For efficiency, we do not delegate to +-# those functions but instead duplicate the functionality here. +-func_dirname_and_basename () +-{ +- case ${1} in +- */*) func_dirname_result="${1%/*}${2}" ;; +- * ) func_dirname_result="${3}" ;; +- esac +- func_basename_result="${1##*/}" +-} +- +-# func_stripname prefix suffix name +-# strip PREFIX and SUFFIX off of NAME. +-# PREFIX and SUFFIX must not contain globbing or regex special +-# characters, hashes, percent signs, but SUFFIX may contain a leading +-# dot (in which case that matches only a dot). +-func_stripname () +-{ +- # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are +- # positional parameters, so assign one to ordinary parameter first. +- func_stripname_result=${3} +- func_stripname_result=${func_stripname_result#"${1}"} +- func_stripname_result=${func_stripname_result%"${2}"} +-} +- +-# func_opt_split +-func_opt_split () +-{ +- func_opt_split_opt=${1%%=*} +- func_opt_split_arg=${1#*=} +-} +- +-# func_lo2o object +-func_lo2o () +-{ +- case ${1} in +- *.lo) func_lo2o_result=${1%.lo}.${objext} ;; +- *) func_lo2o_result=${1} ;; +- esac +-} +- +-# func_xform libobj-or-source +-func_xform () +-{ +- func_xform_result=${1%.*}.lo +-} +- +-# func_arith arithmetic-term... +-func_arith () +-{ +- func_arith_result=$(( $* )) +-} +- +-# func_len string +-# STRING may not start with a hyphen. +-func_len () +-{ +- func_len_result=${#1} +-} +- +-_LT_EOF +- ;; +- *) # Bourne compatible functions. +- cat << \_LT_EOF >> "$cfgfile" +- +-# func_dirname file append nondir_replacement +-# Compute the dirname of FILE. If nonempty, add APPEND to the result, +-# otherwise set result to NONDIR_REPLACEMENT. +-func_dirname () +-{ +- # Extract subdirectory from the argument. +- func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` +- if test "X$func_dirname_result" = "X${1}"; then +- func_dirname_result="${3}" +- else +- func_dirname_result="$func_dirname_result${2}" +- fi +-} +- +-# func_basename file +-func_basename () +-{ +- func_basename_result=`$ECHO "${1}" | $SED "$basename"` +-} +- +- +-# func_stripname prefix suffix name +-# strip PREFIX and SUFFIX off of NAME. +-# PREFIX and SUFFIX must not contain globbing or regex special +-# characters, hashes, percent signs, but SUFFIX may contain a leading +-# dot (in which case that matches only a dot). +-# func_strip_suffix prefix name +-func_stripname () +-{ +- case ${2} in +- .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; +- *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; +- esac +-} +- +-# sed scripts: +-my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q' +-my_sed_long_arg='1s/^-[^=]*=//' +- +-# func_opt_split +-func_opt_split () +-{ +- func_opt_split_opt=`$ECHO "${1}" | $SED "$my_sed_long_opt"` +- func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"` +-} +- +-# func_lo2o object +-func_lo2o () +-{ +- func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` +-} +- +-# func_xform libobj-or-source +-func_xform () +-{ +- func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` +-} +- +-# func_arith arithmetic-term... +-func_arith () +-{ +- func_arith_result=`expr "$@"` +-} +- +-# func_len string +-# STRING may not start with a hyphen. +-func_len () +-{ +- func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` +-} +- +-_LT_EOF +-esac +- +-case $lt_shell_append in +- yes) +- cat << \_LT_EOF >> "$cfgfile" +- +-# func_append var value +-# Append VALUE to the end of shell variable VAR. +-func_append () +-{ +- eval "$1+=\$2" +-} +-_LT_EOF +- ;; +- *) +- cat << \_LT_EOF >> "$cfgfile" +- +-# func_append var value +-# Append VALUE to the end of shell variable VAR. +-func_append () +-{ +- eval "$1=\$$1\$2" +-} +- +-_LT_EOF +- ;; +- esac ++ sed '$q' "$ltmain" >> "$cfgfile" \ ++ || (rm -f "$cfgfile"; exit 1) + ++ if test x"$xsi_shell" = xyes; then ++ sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ ++func_dirname ()\ ++{\ ++\ case ${1} in\ ++\ */*) func_dirname_result="${1%/*}${2}" ;;\ ++\ * ) func_dirname_result="${3}" ;;\ ++\ esac\ ++} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_basename ()$/,/^} # func_basename /c\ ++func_basename ()\ ++{\ ++\ func_basename_result="${1##*/}"\ ++} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ ++func_dirname_and_basename ()\ ++{\ ++\ case ${1} in\ ++\ */*) func_dirname_result="${1%/*}${2}" ;;\ ++\ * ) func_dirname_result="${3}" ;;\ ++\ esac\ ++\ func_basename_result="${1##*/}"\ ++} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ ++func_stripname ()\ ++{\ ++\ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ ++\ # positional parameters, so assign one to ordinary parameter first.\ ++\ func_stripname_result=${3}\ ++\ func_stripname_result=${func_stripname_result#"${1}"}\ ++\ func_stripname_result=${func_stripname_result%"${2}"}\ ++} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ ++func_split_long_opt ()\ ++{\ ++\ func_split_long_opt_name=${1%%=*}\ ++\ func_split_long_opt_arg=${1#*=}\ ++} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ ++func_split_short_opt ()\ ++{\ ++\ func_split_short_opt_arg=${1#??}\ ++\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ ++} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ ++func_lo2o ()\ ++{\ ++\ case ${1} in\ ++\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ ++\ *) func_lo2o_result=${1} ;;\ ++\ esac\ ++} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_xform ()$/,/^} # func_xform /c\ ++func_xform ()\ ++{\ ++ func_xform_result=${1%.*}.lo\ ++} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_arith ()$/,/^} # func_arith /c\ ++func_arith ()\ ++{\ ++ func_arith_result=$(( $* ))\ ++} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_len ()$/,/^} # func_len /c\ ++func_len ()\ ++{\ ++ func_len_result=${#1}\ ++} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++fi ++ ++if test x"$lt_shell_append" = xyes; then ++ sed -e '/^func_append ()$/,/^} # func_append /c\ ++func_append ()\ ++{\ ++ eval "${1}+=\\${2}"\ ++} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ ++func_append_quoted ()\ ++{\ ++\ func_quote_for_eval "${2}"\ ++\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ ++} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ # Save a `func_append' function call where possible by direct use of '+=' ++ sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++ test 0 -eq $? || _lt_function_replace_fail=: ++else ++ # Save a `func_append' function call even when '+=' is not available ++ sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++ test 0 -eq $? || _lt_function_replace_fail=: ++fi ++ ++if test x"$_lt_function_replace_fail" = x":"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 ++$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} ++fi + +- sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ +- || (rm -f "$cfgfile"; exit 1) + +- mv -f "$cfgfile" "$ofile" || ++ mv -f "$cfgfile" "$ofile" || + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" + +Index: binutils-2.21.1/ld/configure +=================================================================== +--- binutils-2.21.1.orig/ld/configure ++++ binutils-2.21.1/ld/configure +@@ -644,8 +644,11 @@ OTOOL + LIPO + NMEDIT + DSYMUTIL ++MANIFEST_TOOL + RANLIB ++ac_ct_AR + AR ++DLLTOOL + OBJDUMP + LN_S + NM +@@ -783,6 +786,7 @@ enable_static + with_pic + enable_fast_install + with_gnu_ld ++with_libtool_sysroot + enable_libtool_lock + enable_nls + ' +@@ -1447,6 +1451,8 @@ Optional Packages: + --with-pic try to use only PIC/non-PIC objects [default=use + both] + --with-gnu-ld assume the C compiler uses GNU ld [default=no] ++ --with-libtool-sysroot=DIR Search for dependent libraries within DIR ++ (or the compiler's sysroot if not specified). + + Some influential environment variables: + CC C compiler command +@@ -6081,8 +6087,8 @@ esac + + + +-macro_version='2.2.7a' +-macro_revision='1.3134' ++macro_version='2.4' ++macro_revision='1.3293' + + + +@@ -6122,7 +6128,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 + $as_echo_n "checking how to print strings... " >&6; } + # Test print first, because it will be a builtin if present. +-if test "X`print -r -- -n 2>/dev/null`" = X-n && \ ++if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ + test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='print -r --' + elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then +@@ -6808,8 +6814,8 @@ $as_echo_n "checking whether the shell u + # Try some XSI features + xsi_shell=no + ( _lt_dummy="a/b/c" +- test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ +- = c,a/b,, \ ++ test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ ++ = c,a/b,b/c, \ + && eval 'test $(( 1 + 1 )) -eq 2 \ + && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ + && xsi_shell=yes +@@ -6858,6 +6864,80 @@ esac + + + ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 ++$as_echo_n "checking how to convert $build file names to $host format... " >&6; } ++if test "${lt_cv_to_host_file_cmd+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ case $host in ++ *-*-mingw* ) ++ case $build in ++ *-*-mingw* ) # actually msys ++ lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ++ ;; ++ *-*-cygwin* ) ++ lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ++ ;; ++ * ) # otherwise, assume *nix ++ lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ++ ;; ++ esac ++ ;; ++ *-*-cygwin* ) ++ case $build in ++ *-*-mingw* ) # actually msys ++ lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ++ ;; ++ *-*-cygwin* ) ++ lt_cv_to_host_file_cmd=func_convert_file_noop ++ ;; ++ * ) # otherwise, assume *nix ++ lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ++ ;; ++ esac ++ ;; ++ * ) # unhandled hosts (and "normal" native builds) ++ lt_cv_to_host_file_cmd=func_convert_file_noop ++ ;; ++esac ++ ++fi ++ ++to_host_file_cmd=$lt_cv_to_host_file_cmd ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 ++$as_echo "$lt_cv_to_host_file_cmd" >&6; } ++ ++ ++ ++ ++ ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 ++$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } ++if test "${lt_cv_to_tool_file_cmd+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ #assume ordinary cross tools, or native build. ++lt_cv_to_tool_file_cmd=func_convert_file_noop ++case $host in ++ *-*-mingw* ) ++ case $build in ++ *-*-mingw* ) # actually msys ++ lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ++ ;; ++ esac ++ ;; ++esac ++ ++fi ++ ++to_tool_file_cmd=$lt_cv_to_tool_file_cmd ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 ++$as_echo "$lt_cv_to_tool_file_cmd" >&6; } ++ ++ ++ ++ ++ + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 + $as_echo_n "checking for $LD option to reload object files... " >&6; } + if test "${lt_cv_ld_reload_flag+set}" = set; then : +@@ -6874,6 +6954,11 @@ case $reload_flag in + esac + reload_cmds='$LD$reload_flag -o $output$reload_objs' + case $host_os in ++ cygwin* | mingw* | pw32* | cegcc*) ++ if test "$GCC" != yes; then ++ reload_cmds=false ++ fi ++ ;; + darwin*) + if test "$GCC" = yes; then + reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' +@@ -7042,7 +7127,8 @@ mingw* | pw32*) + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + else +- lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' ++ # Keep this pattern in sync with the one in func_win32_libid. ++ lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' + lt_cv_file_magic_cmd='$OBJDUMP -f' + fi + ;; +@@ -7196,6 +7282,21 @@ esac + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 + $as_echo "$lt_cv_deplibs_check_method" >&6; } ++ ++file_magic_glob= ++want_nocaseglob=no ++if test "$build" = "$host"; then ++ case $host_os in ++ mingw* | pw32*) ++ if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then ++ want_nocaseglob=yes ++ else ++ file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` ++ fi ++ ;; ++ esac ++fi ++ + file_magic_cmd=$lt_cv_file_magic_cmd + deplibs_check_method=$lt_cv_deplibs_check_method + test -z "$deplibs_check_method" && deplibs_check_method=unknown +@@ -7211,9 +7312,162 @@ test -z "$deplibs_check_method" && depli + + + ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + if test -n "$ac_tool_prefix"; then +- # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. +-set dummy ${ac_tool_prefix}ar; ac_word=$2 ++ # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. ++set dummy ${ac_tool_prefix}dlltool; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if test "${ac_cv_prog_DLLTOOL+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test -n "$DLLTOOL"; then ++ ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ++ ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++ done ++IFS=$as_save_IFS ++ ++fi ++fi ++DLLTOOL=$ac_cv_prog_DLLTOOL ++if test -n "$DLLTOOL"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 ++$as_echo "$DLLTOOL" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++fi ++ ++ ++fi ++if test -z "$ac_cv_prog_DLLTOOL"; then ++ ac_ct_DLLTOOL=$DLLTOOL ++ # Extract the first word of "dlltool", so it can be a program name with args. ++set dummy dlltool; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test -n "$ac_ct_DLLTOOL"; then ++ ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ++ ac_cv_prog_ac_ct_DLLTOOL="dlltool" ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++ done ++IFS=$as_save_IFS ++ ++fi ++fi ++ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL ++if test -n "$ac_ct_DLLTOOL"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 ++$as_echo "$ac_ct_DLLTOOL" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++fi ++ ++ if test "x$ac_ct_DLLTOOL" = x; then ++ DLLTOOL="false" ++ else ++ case $cross_compiling:$ac_tool_warned in ++yes:) ++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 ++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ++ac_tool_warned=yes ;; ++esac ++ DLLTOOL=$ac_ct_DLLTOOL ++ fi ++else ++ DLLTOOL="$ac_cv_prog_DLLTOOL" ++fi ++ ++test -z "$DLLTOOL" && DLLTOOL=dlltool ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 ++$as_echo_n "checking how to associate runtime and link libraries... " >&6; } ++if test "${lt_cv_sharedlib_from_linklib_cmd+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ lt_cv_sharedlib_from_linklib_cmd='unknown' ++ ++case $host_os in ++cygwin* | mingw* | pw32* | cegcc*) ++ # two different shell functions defined in ltmain.sh ++ # decide which to use based on capabilities of $DLLTOOL ++ case `$DLLTOOL --help 2>&1` in ++ *--identify-strict*) ++ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ++ ;; ++ *) ++ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ++ ;; ++ esac ++ ;; ++*) ++ # fallback: assume linklib IS sharedlib ++ lt_cv_sharedlib_from_linklib_cmd="$ECHO" ++ ;; ++esac ++ ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 ++$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } ++sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd ++test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO ++ ++ ++ ++ ++ ++ ++ ++if test -n "$ac_tool_prefix"; then ++ for ac_prog in ar ++ do ++ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. ++set dummy $ac_tool_prefix$ac_prog; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } + if test "${ac_cv_prog_AR+set}" = set; then : +@@ -7229,7 +7483,7 @@ do + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then +- ac_cv_prog_AR="${ac_tool_prefix}ar" ++ ac_cv_prog_AR="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +@@ -7249,11 +7503,15 @@ $as_echo "no" >&6; } + fi + + ++ test -n "$AR" && break ++ done + fi +-if test -z "$ac_cv_prog_AR"; then ++if test -z "$AR"; then + ac_ct_AR=$AR +- # Extract the first word of "ar", so it can be a program name with args. +-set dummy ar; ac_word=$2 ++ for ac_prog in ar ++do ++ # Extract the first word of "$ac_prog", so it can be a program name with args. ++set dummy $ac_prog; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } + if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : +@@ -7269,7 +7527,7 @@ do + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then +- ac_cv_prog_ac_ct_AR="ar" ++ ac_cv_prog_ac_ct_AR="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +@@ -7288,6 +7546,10 @@ else + $as_echo "no" >&6; } + fi + ++ ++ test -n "$ac_ct_AR" && break ++done ++ + if test "x$ac_ct_AR" = x; then + AR="false" + else +@@ -7299,12 +7561,10 @@ ac_tool_warned=yes ;; + esac + AR=$ac_ct_AR + fi +-else +- AR="$ac_cv_prog_AR" + fi + +-test -z "$AR" && AR=ar +-test -z "$AR_FLAGS" && AR_FLAGS=cru ++: ${AR=ar} ++: ${AR_FLAGS=cru} + + + +@@ -7316,6 +7576,64 @@ test -z "$AR_FLAGS" && AR_FLAGS=cru + + + ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 ++$as_echo_n "checking for archiver @FILE support... " >&6; } ++if test "${lt_cv_ar_at_file+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ lt_cv_ar_at_file=no ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++ ++int ++main () ++{ ++ ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : ++ echo conftest.$ac_objext > conftest.lst ++ lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' ++ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 ++ (eval $lt_ar_try) 2>&5 ++ ac_status=$? ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; } ++ if test "$ac_status" -eq 0; then ++ # Ensure the archiver fails upon bogus file names. ++ rm -f conftest.$ac_objext libconftest.a ++ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 ++ (eval $lt_ar_try) 2>&5 ++ ac_status=$? ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; } ++ if test "$ac_status" -ne 0; then ++ lt_cv_ar_at_file=@ ++ fi ++ fi ++ rm -f conftest.* libconftest.a ++ ++fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 ++$as_echo "$lt_cv_ar_at_file" >&6; } ++ ++if test "x$lt_cv_ar_at_file" = xno; then ++ archiver_list_spec= ++else ++ archiver_list_spec=$lt_cv_ar_at_file ++fi ++ ++ ++ ++ ++ ++ ++ + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. + set dummy ${ac_tool_prefix}strip; ac_word=$2 +@@ -7650,8 +7968,8 @@ esac + lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + + # Transform an extracted symbol line into symbol name and symbol address +-lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" +-lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" ++lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" ++lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" + + # Handle CRLF in mingw tool chain + opt_cr= +@@ -7687,6 +8005,7 @@ for ac_symprfx in "" "_"; do + else + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + fi ++ lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" + + # Check to see that the pipe works correctly. + pipe_works=no +@@ -7728,6 +8047,18 @@ _LT_EOF + if $GREP ' nm_test_var$' "$nlist" >/dev/null; then + if $GREP ' nm_test_func$' "$nlist" >/dev/null; then + cat <<_LT_EOF > conftest.$ac_ext ++/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ ++#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) ++/* DATA imports from DLLs on WIN32 con't be const, because runtime ++ relocations are performed -- see ld's documentation on pseudo-relocs. */ ++# define LT_DLSYM_CONST ++#elif defined(__osf__) ++/* This system does not cope well with relocations in const data. */ ++# define LT_DLSYM_CONST ++#else ++# define LT_DLSYM_CONST const ++#endif ++ + #ifdef __cplusplus + extern "C" { + #endif +@@ -7739,7 +8070,7 @@ _LT_EOF + cat <<_LT_EOF >> conftest.$ac_ext + + /* The mapping between symbol names and symbols. */ +-const struct { ++LT_DLSYM_CONST struct { + const char *name; + void *address; + } +@@ -7765,8 +8096,8 @@ static const void *lt_preloaded_setup() + _LT_EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext +- lt_save_LIBS="$LIBS" +- lt_save_CFLAGS="$CFLAGS" ++ lt_globsym_save_LIBS=$LIBS ++ lt_globsym_save_CFLAGS=$CFLAGS + LIBS="conftstm.$ac_objext" + CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 +@@ -7776,8 +8107,8 @@ _LT_EOF + test $ac_status = 0; } && test -s conftest${ac_exeext}; then + pipe_works=yes + fi +- LIBS="$lt_save_LIBS" +- CFLAGS="$lt_save_CFLAGS" ++ LIBS=$lt_globsym_save_LIBS ++ CFLAGS=$lt_globsym_save_CFLAGS + else + echo "cannot find nm_test_func in $nlist" >&5 + fi +@@ -7814,6 +8145,21 @@ else + $as_echo "ok" >&6; } + fi + ++# Response file support. ++if test "$lt_cv_nm_interface" = "MS dumpbin"; then ++ nm_file_list_spec='@' ++elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then ++ nm_file_list_spec='@' ++fi ++ ++ ++ ++ ++ ++ ++ ++ ++ + + + +@@ -7832,6 +8178,40 @@ fi + + + ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 ++$as_echo_n "checking for sysroot... " >&6; } ++ ++# Check whether --with-libtool-sysroot was given. ++if test "${with_libtool_sysroot+set}" = set; then : ++ withval=$with_libtool_sysroot; ++else ++ with_libtool_sysroot=no ++fi ++ ++ ++lt_sysroot= ++case ${with_libtool_sysroot} in #( ++ yes) ++ if test "$GCC" = yes; then ++ lt_sysroot=`$CC --print-sysroot 2>/dev/null` ++ fi ++ ;; #( ++ /*) ++ lt_sysroot=`echo "$with_libtool_sysroot" | sed -e "$sed_quote_subst"` ++ ;; #( ++ no|'') ++ ;; #( ++ *) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libtool_sysroot}" >&5 ++$as_echo "${with_libtool_sysroot}" >&6; } ++ as_fn_error "The sysroot must be an absolute path." "$LINENO" 5 ++ ;; ++esac ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 ++$as_echo "${lt_sysroot:-no}" >&6; } ++ ++ + + + +@@ -8022,11 +8402,128 @@ sparc*-*solaris*) + ;; + esac + fi +- rm -rf conftest* +- ;; ++ rm -rf conftest* ++ ;; ++esac ++ ++need_locks="$enable_libtool_lock" ++ ++if test -n "$ac_tool_prefix"; then ++ # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. ++set dummy ${ac_tool_prefix}mt; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if test "${ac_cv_prog_MANIFEST_TOOL+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test -n "$MANIFEST_TOOL"; then ++ ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ++ ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++ done ++IFS=$as_save_IFS ++ ++fi ++fi ++MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL ++if test -n "$MANIFEST_TOOL"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 ++$as_echo "$MANIFEST_TOOL" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++fi ++ ++ ++fi ++if test -z "$ac_cv_prog_MANIFEST_TOOL"; then ++ ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL ++ # Extract the first word of "mt", so it can be a program name with args. ++set dummy mt; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if test "${ac_cv_prog_ac_ct_MANIFEST_TOOL+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test -n "$ac_ct_MANIFEST_TOOL"; then ++ ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ++ ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++ done ++IFS=$as_save_IFS ++ ++fi ++fi ++ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL ++if test -n "$ac_ct_MANIFEST_TOOL"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 ++$as_echo "$ac_ct_MANIFEST_TOOL" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++fi ++ ++ if test "x$ac_ct_MANIFEST_TOOL" = x; then ++ MANIFEST_TOOL=":" ++ else ++ case $cross_compiling:$ac_tool_warned in ++yes:) ++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 ++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ++ac_tool_warned=yes ;; + esac ++ MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL ++ fi ++else ++ MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" ++fi ++ ++test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 ++$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } ++if test "${lt_cv_path_mainfest_tool+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ lt_cv_path_mainfest_tool=no ++ echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 ++ $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out ++ cat conftest.err >&5 ++ if $GREP 'Manifest Tool' conftest.out > /dev/null; then ++ lt_cv_path_mainfest_tool=yes ++ fi ++ rm -f conftest* ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 ++$as_echo "$lt_cv_path_mainfest_tool" >&6; } ++if test "x$lt_cv_path_mainfest_tool" != xyes; then ++ MANIFEST_TOOL=: ++fi ++ ++ ++ + +-need_locks="$enable_libtool_lock" + + + case $host_os in +@@ -8591,6 +9088,8 @@ _LT_EOF + $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 + echo "$AR cru libconftest.a conftest.o" >&5 + $AR cru libconftest.a conftest.o 2>&5 ++ echo "$RANLIB libconftest.a" >&5 ++ $RANLIB libconftest.a 2>&5 + cat > conftest.c << _LT_EOF + int main() { return 0;} + _LT_EOF +@@ -8787,7 +9286,8 @@ fi + LIBTOOL_DEPS="$ltmain" + + # Always use our own libtool. +-LIBTOOL='$(SHELL) $(top_builddir)/libtool' ++LIBTOOL='$(SHELL) $(top_builddir)' ++LIBTOOL="$LIBTOOL/${host_alias}-libtool" + + + +@@ -8876,7 +9376,7 @@ aix3*) + esac + + # Global variables: +-ofile=libtool ++ofile=${host_alias}-libtool + can_build_shared=yes + + # All known linkers require a `.a' archive for static linking (except MSVC, +@@ -9174,8 +9674,6 @@ fi + lt_prog_compiler_pic= + lt_prog_compiler_static= + +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +-$as_echo_n "checking for $compiler option to produce PIC... " >&6; } + + if test "$GCC" = yes; then + lt_prog_compiler_wl='-Wl,' +@@ -9340,6 +9838,12 @@ $as_echo_n "checking for $compiler optio + lt_prog_compiler_pic='--shared' + lt_prog_compiler_static='--static' + ;; ++ nagfor*) ++ # NAG Fortran compiler ++ lt_prog_compiler_wl='-Wl,-Wl,,' ++ lt_prog_compiler_pic='-PIC' ++ lt_prog_compiler_static='-Bstatic' ++ ;; + pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) +@@ -9402,7 +9906,7 @@ $as_echo_n "checking for $compiler optio + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + case $cc_basename in +- f77* | f90* | f95*) ++ f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) + lt_prog_compiler_wl='-Qoption ld ';; + *) + lt_prog_compiler_wl='-Wl,';; +@@ -9459,13 +9963,17 @@ case $host_os in + lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" + ;; + esac +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5 +-$as_echo "$lt_prog_compiler_pic" >&6; } +- +- +- +- + ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 ++$as_echo_n "checking for $compiler option to produce PIC... " >&6; } ++if test "${lt_cv_prog_compiler_pic+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ lt_cv_prog_compiler_pic=$lt_prog_compiler_pic ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 ++$as_echo "$lt_cv_prog_compiler_pic" >&6; } ++lt_prog_compiler_pic=$lt_cv_prog_compiler_pic + + # + # Check to make sure the PIC flag actually works. +@@ -9526,6 +10034,11 @@ fi + + + ++ ++ ++ ++ ++ + # + # Check to make sure the static flag actually works. + # +@@ -9876,7 +10389,8 @@ _LT_EOF + allow_undefined_flag=unsupported + always_export_symbols=no + enable_shared_with_static_runtimes=yes +- export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' ++ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' ++ exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' +@@ -9924,7 +10438,7 @@ _LT_EOF + if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ + && test "$tmp_diet" = no + then +- tmp_addflag= ++ tmp_addflag=' $pic_flag' + tmp_sharedflag='-shared' + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler +@@ -9975,12 +10489,12 @@ _LT_EOF + whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' + hardcode_libdir_flag_spec= + hardcode_libdir_flag_spec_ld='-rpath $libdir' +- archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' ++ archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' + if test "x$supports_anon_versioning" = xyes; then + archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ +- $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' ++ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + fi + ;; + esac +@@ -9994,8 +10508,8 @@ _LT_EOF + archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else +- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' +- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ++ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' ++ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + +@@ -10013,8 +10527,8 @@ _LT_EOF + + _LT_EOF + elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then +- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' +- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ++ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' ++ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi +@@ -10060,8 +10574,8 @@ _LT_EOF + + *) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then +- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' +- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ++ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' ++ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi +@@ -10191,7 +10705,13 @@ _LT_EOF + allow_undefined_flag='-berok' + # Determine the default libpath from the value encoded in an + # empty executable. +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ if test "${lt_cv_aix_libpath+set}" = set; then ++ aix_libpath=$lt_cv_aix_libpath ++else ++ if test "${lt_cv_aix_libpath_+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + int +@@ -10204,22 +10724,29 @@ main () + _ACEOF + if ac_fn_c_try_link "$LINENO"; then : + +-lt_aix_libpath_sed=' +- /Import File Strings/,/^$/ { +- /^0/ { +- s/^0 *\(.*\)$/\1/ +- p +- } +- }' +-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +-# Check for a 64-bit object if we didn't find anything. +-if test -z "$aix_libpath"; then +- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +-fi ++ lt_aix_libpath_sed=' ++ /Import File Strings/,/^$/ { ++ /^0/ { ++ s/^0 *\([^ ]*\) *$/\1/ ++ p ++ } ++ }' ++ lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` ++ # Check for a 64-bit object if we didn't find anything. ++ if test -z "$lt_cv_aix_libpath_"; then ++ lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` ++ fi + fi + rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ++ if test -z "$lt_cv_aix_libpath_"; then ++ lt_cv_aix_libpath_="/usr/lib:/lib" ++ fi ++ ++fi ++ ++ aix_libpath=$lt_cv_aix_libpath_ ++fi + + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" +@@ -10231,7 +10758,13 @@ if test -z "$aix_libpath"; then aix_libp + else + # Determine the default libpath from the value encoded in an + # empty executable. +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ if test "${lt_cv_aix_libpath+set}" = set; then ++ aix_libpath=$lt_cv_aix_libpath ++else ++ if test "${lt_cv_aix_libpath_+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + int +@@ -10244,22 +10777,29 @@ main () + _ACEOF + if ac_fn_c_try_link "$LINENO"; then : + +-lt_aix_libpath_sed=' +- /Import File Strings/,/^$/ { +- /^0/ { +- s/^0 *\(.*\)$/\1/ +- p +- } +- }' +-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +-# Check for a 64-bit object if we didn't find anything. +-if test -z "$aix_libpath"; then +- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +-fi ++ lt_aix_libpath_sed=' ++ /Import File Strings/,/^$/ { ++ /^0/ { ++ s/^0 *\([^ ]*\) *$/\1/ ++ p ++ } ++ }' ++ lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` ++ # Check for a 64-bit object if we didn't find anything. ++ if test -z "$lt_cv_aix_libpath_"; then ++ lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` ++ fi + fi + rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ++ if test -z "$lt_cv_aix_libpath_"; then ++ lt_cv_aix_libpath_="/usr/lib:/lib" ++ fi ++ ++fi ++ ++ aix_libpath=$lt_cv_aix_libpath_ ++fi + + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, +@@ -10304,20 +10844,63 @@ if test -z "$aix_libpath"; then aix_libp + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. +- hardcode_libdir_flag_spec=' ' +- allow_undefined_flag=unsupported +- # Tell ltmain to make .lib files, not .a files. +- libext=lib +- # Tell ltmain to make .dll files, not .so files. +- shrext_cmds=".dll" +- # FIXME: Setting linknames here is a bad hack. +- archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' +- # The linker will automatically build a .lib file if we build a DLL. +- old_archive_from_new_cmds='true' +- # FIXME: Should let the user specify the lib program. +- old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' +- fix_srcfile_path='`cygpath -w "$srcfile"`' +- enable_shared_with_static_runtimes=yes ++ case $cc_basename in ++ cl*) ++ # Native MSVC ++ hardcode_libdir_flag_spec=' ' ++ allow_undefined_flag=unsupported ++ always_export_symbols=yes ++ file_list_spec='@' ++ # Tell ltmain to make .lib files, not .a files. ++ libext=lib ++ # Tell ltmain to make .dll files, not .so files. ++ shrext_cmds=".dll" ++ # FIXME: Setting linknames here is a bad hack. ++ archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' ++ archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then ++ sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; ++ else ++ sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; ++ fi~ ++ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ ++ linknames=' ++ # The linker will not automatically build a static lib if we build a DLL. ++ # _LT_TAGVAR(old_archive_from_new_cmds, )='true' ++ enable_shared_with_static_runtimes=yes ++ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' ++ # Don't use ranlib ++ old_postinstall_cmds='chmod 644 $oldlib' ++ postlink_cmds='lt_outputfile="@OUTPUT@"~ ++ lt_tool_outputfile="@TOOL_OUTPUT@"~ ++ case $lt_outputfile in ++ *.exe|*.EXE) ;; ++ *) ++ lt_outputfile="$lt_outputfile.exe" ++ lt_tool_outputfile="$lt_tool_outputfile.exe" ++ ;; ++ esac~ ++ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then ++ $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; ++ $RM "$lt_outputfile.manifest"; ++ fi' ++ ;; ++ *) ++ # Assume MSVC wrapper ++ hardcode_libdir_flag_spec=' ' ++ allow_undefined_flag=unsupported ++ # Tell ltmain to make .lib files, not .a files. ++ libext=lib ++ # Tell ltmain to make .dll files, not .so files. ++ shrext_cmds=".dll" ++ # FIXME: Setting linknames here is a bad hack. ++ archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' ++ # The linker will automatically build a .lib file if we build a DLL. ++ old_archive_from_new_cmds='true' ++ # FIXME: Should let the user specify the lib program. ++ old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' ++ enable_shared_with_static_runtimes=yes ++ ;; ++ esac + ;; + + darwin* | rhapsody*) +@@ -10382,7 +10965,7 @@ if test -z "$aix_libpath"; then aix_libp + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) +- archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' ++ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no +@@ -10390,7 +10973,7 @@ if test -z "$aix_libpath"; then aix_libp + + hpux9*) + if test "$GCC" = yes; then +- archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ++ archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + fi +@@ -10406,7 +10989,7 @@ if test -z "$aix_libpath"; then aix_libp + + hpux10*) + if test "$GCC" = yes && test "$with_gnu_ld" = no; then +- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ++ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi +@@ -10430,10 +11013,10 @@ if test -z "$aix_libpath"; then aix_libp + archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) +- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ++ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) +- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ++ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else +@@ -10512,23 +11095,36 @@ fi + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then +- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ++ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + # Try to use the -exported_symbol ld option, if it does not + # work, assume that -exports_file does not work either and + # implicitly export all symbols. +- save_LDFLAGS="$LDFLAGS" +- LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ # This should be the same for all languages, so no per-tag cache variable. ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 ++$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } ++if test "${lt_cv_irix_exported_symbol+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ save_LDFLAGS="$LDFLAGS" ++ LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-int foo(void) {} ++int foo (void) { return 0; } + _ACEOF + if ac_fn_c_try_link "$LINENO"; then : +- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' +- ++ lt_cv_irix_exported_symbol=yes ++else ++ lt_cv_irix_exported_symbol=no + fi + rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +- LDFLAGS="$save_LDFLAGS" ++ LDFLAGS="$save_LDFLAGS" ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 ++$as_echo "$lt_cv_irix_exported_symbol" >&6; } ++ if test "$lt_cv_irix_exported_symbol" = yes; then ++ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' ++ fi + else + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' +@@ -10613,7 +11209,7 @@ rm -f core conftest.err conftest.$ac_obj + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' +- archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ++ archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + else + allow_undefined_flag=' -expect_unresolved \*' +@@ -10632,9 +11228,9 @@ rm -f core conftest.err conftest.$ac_obj + no_undefined_flag=' -z defs' + if test "$GCC" = yes; then + wlarc='${wl}' +- archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ++ archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ +- $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ++ $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + else + case `$CC -V 2>&1` in + *"Compilers 5.0"*) +@@ -11210,8 +11806,9 @@ cygwin* | mingw* | pw32* | cegcc*) + need_version=no + need_lib_prefix=no + +- case $GCC,$host_os in +- yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) ++ case $GCC,$cc_basename in ++ yes,*) ++ # gcc + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ +@@ -11244,13 +11841,71 @@ cygwin* | mingw* | pw32* | cegcc*) + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + esac ++ dynamic_linker='Win32 ld.exe' ++ ;; ++ ++ *,cl*) ++ # Native MSVC ++ libname_spec='$name' ++ soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ++ library_names_spec='${libname}.dll.lib' ++ ++ case $build_os in ++ mingw*) ++ sys_lib_search_path_spec= ++ lt_save_ifs=$IFS ++ IFS=';' ++ for lt_path in $LIB ++ do ++ IFS=$lt_save_ifs ++ # Let DOS variable expansion print the short 8.3 style file name. ++ lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` ++ sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" ++ done ++ IFS=$lt_save_ifs ++ # Convert to MSYS style. ++ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ++ ;; ++ cygwin*) ++ # Convert to unix form, then to dos form, then back to unix form ++ # but this time dos style (no spaces!) so that the unix form looks ++ # like /cygdrive/c/PROGRA~1:/cygdr... ++ sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` ++ sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` ++ sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ++ ;; ++ *) ++ sys_lib_search_path_spec="$LIB" ++ if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then ++ # It is most probably a Windows format PATH. ++ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` ++ else ++ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ++ fi ++ # FIXME: find the short name or the path components, as spaces are ++ # common. (e.g. "Program Files" -> "PROGRA~1") ++ ;; ++ esac ++ ++ # DLL is installed to $(libdir)/../bin by postinstall_cmds ++ postinstall_cmds='base_file=`basename \${file}`~ ++ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ ++ dldir=$destdir/`dirname \$dlpath`~ ++ test -d \$dldir || mkdir -p \$dldir~ ++ $install_prog $dir/$dlname \$dldir/$dlname' ++ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ ++ dlpath=$dir/\$dldll~ ++ $RM \$dlpath' ++ shlibpath_overrides_runpath=yes ++ dynamic_linker='Win32 link.exe' + ;; + + *) ++ # Assume MSVC wrapper + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ++ dynamic_linker='Win32 ld.exe' + ;; + esac +- dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; +@@ -11346,7 +12001,7 @@ haiku*) + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LIBRARY_PATH + shlibpath_overrides_runpath=yes +- sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib' ++ sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' + hardcode_into_libs=yes + ;; + +@@ -12142,7 +12797,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 12145 "configure" ++#line $LINENO "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -12186,10 +12841,10 @@ else + /* When -fvisbility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ + #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +-void fnord () __attribute__((visibility("default"))); ++int fnord () __attribute__((visibility("default"))); + #endif + +-void fnord () { int i=42; } ++int fnord () { return 42; } + int main () + { + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); +@@ -12248,7 +12903,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 12251 "configure" ++#line $LINENO "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -12292,10 +12947,10 @@ else + /* When -fvisbility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ + #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +-void fnord () __attribute__((visibility("default"))); ++int fnord () __attribute__((visibility("default"))); + #endif + +-void fnord () { int i=42; } ++int fnord () { return 42; } + int main () + { + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); +@@ -17606,13 +18261,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_ + lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' + lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' + lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' ++lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' ++lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' + reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' + reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' + OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' + deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' + file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' ++file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' ++want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' ++DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' ++sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' + AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' + AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' ++archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' + STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' + RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' + old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' +@@ -17627,14 +18289,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$l + lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' + lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' + lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' ++nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' ++lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' + objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' + MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' + lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' +-lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' + lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' ++lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' + lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' + lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' + need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' ++MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' + DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' + NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' + LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' +@@ -17667,12 +18332,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcod + hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' + inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' + link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' +-fix_srcfile_path='`$ECHO "$fix_srcfile_path" | $SED "$delay_single_quote_subst"`' + always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' + export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' + exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' + include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' + prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' ++postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' + file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' + variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' + need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' +@@ -17782,8 +18447,13 @@ reload_flag \ + OBJDUMP \ + deplibs_check_method \ + file_magic_cmd \ ++file_magic_glob \ ++want_nocaseglob \ ++DLLTOOL \ ++sharedlib_from_linklib_cmd \ + AR \ + AR_FLAGS \ ++archiver_list_spec \ + STRIP \ + RANLIB \ + CC \ +@@ -17793,12 +18463,14 @@ lt_cv_sys_global_symbol_pipe \ + lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ ++nm_file_list_spec \ + lt_prog_compiler_no_builtin_flag \ +-lt_prog_compiler_wl \ + lt_prog_compiler_pic \ ++lt_prog_compiler_wl \ + lt_prog_compiler_static \ + lt_cv_prog_compiler_c_o \ + need_locks \ ++MANIFEST_TOOL \ + DSYMUTIL \ + NMEDIT \ + LIPO \ +@@ -17814,7 +18486,6 @@ no_undefined_flag \ + hardcode_libdir_flag_spec \ + hardcode_libdir_flag_spec_ld \ + hardcode_libdir_separator \ +-fix_srcfile_path \ + exclude_expsyms \ + include_expsyms \ + file_list_spec \ +@@ -17883,6 +18554,7 @@ module_cmds \ + module_expsym_cmds \ + export_symbols_cmds \ + prelink_cmds \ ++postlink_cmds \ + postinstall_cmds \ + postuninstall_cmds \ + finish_cmds \ +@@ -18690,7 +19362,8 @@ $as_echo X"$file" | + # NOTE: Changes made to this file will be lost: look at ltmain.sh. + # + # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +-# 2006, 2007, 2008, 2009 Free Software Foundation, Inc. ++# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, ++# Inc. + # Written by Gordon Matzigkeit, 1996 + # + # This file is part of GNU Libtool. +@@ -18793,19 +19466,42 @@ SP2NL=$lt_lt_SP2NL + # turn newlines into spaces. + NL2SP=$lt_lt_NL2SP + ++# convert \$build file names to \$host format. ++to_host_file_cmd=$lt_cv_to_host_file_cmd ++ ++# convert \$build files to toolchain format. ++to_tool_file_cmd=$lt_cv_to_tool_file_cmd ++ + # An object symbol dumper. + OBJDUMP=$lt_OBJDUMP + + # Method to check whether dependent libraries are shared objects. + deplibs_check_method=$lt_deplibs_check_method + +-# Command to use when deplibs_check_method == "file_magic". ++# Command to use when deplibs_check_method = "file_magic". + file_magic_cmd=$lt_file_magic_cmd + ++# How to find potential files when deplibs_check_method = "file_magic". ++file_magic_glob=$lt_file_magic_glob ++ ++# Find potential files using nocaseglob when deplibs_check_method = "file_magic". ++want_nocaseglob=$lt_want_nocaseglob ++ ++# DLL creation program. ++DLLTOOL=$lt_DLLTOOL ++ ++# Command to associate shared and link libraries. ++sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd ++ + # The archiver. + AR=$lt_AR ++ ++# Flags to create an archive. + AR_FLAGS=$lt_AR_FLAGS + ++# How to feed a file listing to the archiver. ++archiver_list_spec=$lt_archiver_list_spec ++ + # A symbol stripping program. + STRIP=$lt_STRIP + +@@ -18835,6 +19531,12 @@ global_symbol_to_c_name_address=$lt_lt_c + # Transform the output of nm in a C name address pair when lib prefix is needed. + global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix + ++# Specify filename containing input files for \$NM. ++nm_file_list_spec=$lt_nm_file_list_spec ++ ++# The root where to search for dependent libraries,and in which our libraries should be installed. ++lt_sysroot=$lt_sysroot ++ + # The name of the directory that contains temporary libtool files. + objdir=$objdir + +@@ -18844,6 +19546,9 @@ MAGIC_CMD=$MAGIC_CMD + # Must we lock files when doing compilation? + need_locks=$lt_need_locks + ++# Manifest tool. ++MANIFEST_TOOL=$lt_MANIFEST_TOOL ++ + # Tool to manipulate archived DWARF debug symbol files on Mac OS X. + DSYMUTIL=$lt_DSYMUTIL + +@@ -18958,12 +19663,12 @@ with_gcc=$GCC + # Compiler flag to turn off builtin functions. + no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag + +-# How to pass a linker flag through the compiler. +-wl=$lt_lt_prog_compiler_wl +- + # Additional compiler flags for building library objects. + pic_flag=$lt_lt_prog_compiler_pic + ++# How to pass a linker flag through the compiler. ++wl=$lt_lt_prog_compiler_wl ++ + # Compiler flag to prevent dynamic linking. + link_static_flag=$lt_lt_prog_compiler_static + +@@ -19050,9 +19755,6 @@ inherit_rpath=$inherit_rpath + # Whether libtool must link a program against all its dependency libraries. + link_all_deplibs=$link_all_deplibs + +-# Fix the shell variable \$srcfile for the compiler. +-fix_srcfile_path=$lt_fix_srcfile_path +- + # Set to "yes" if exported symbols are required. + always_export_symbols=$always_export_symbols + +@@ -19068,6 +19770,9 @@ include_expsyms=$lt_include_expsyms + # Commands necessary for linking programs (against libraries) with templates. + prelink_cmds=$lt_prelink_cmds + ++# Commands necessary for finishing linking programs. ++postlink_cmds=$lt_postlink_cmds ++ + # Specify filename containing input files. + file_list_spec=$lt_file_list_spec + +@@ -19114,210 +19819,169 @@ ltmain="$ac_aux_dir/ltmain.sh" + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? +- sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ +- || (rm -f "$cfgfile"; exit 1) +- +- case $xsi_shell in +- yes) +- cat << \_LT_EOF >> "$cfgfile" +- +-# func_dirname file append nondir_replacement +-# Compute the dirname of FILE. If nonempty, add APPEND to the result, +-# otherwise set result to NONDIR_REPLACEMENT. +-func_dirname () +-{ +- case ${1} in +- */*) func_dirname_result="${1%/*}${2}" ;; +- * ) func_dirname_result="${3}" ;; +- esac +-} +- +-# func_basename file +-func_basename () +-{ +- func_basename_result="${1##*/}" +-} +- +-# func_dirname_and_basename file append nondir_replacement +-# perform func_basename and func_dirname in a single function +-# call: +-# dirname: Compute the dirname of FILE. If nonempty, +-# add APPEND to the result, otherwise set result +-# to NONDIR_REPLACEMENT. +-# value returned in "$func_dirname_result" +-# basename: Compute filename of FILE. +-# value retuned in "$func_basename_result" +-# Implementation must be kept synchronized with func_dirname +-# and func_basename. For efficiency, we do not delegate to +-# those functions but instead duplicate the functionality here. +-func_dirname_and_basename () +-{ +- case ${1} in +- */*) func_dirname_result="${1%/*}${2}" ;; +- * ) func_dirname_result="${3}" ;; +- esac +- func_basename_result="${1##*/}" +-} +- +-# func_stripname prefix suffix name +-# strip PREFIX and SUFFIX off of NAME. +-# PREFIX and SUFFIX must not contain globbing or regex special +-# characters, hashes, percent signs, but SUFFIX may contain a leading +-# dot (in which case that matches only a dot). +-func_stripname () +-{ +- # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are +- # positional parameters, so assign one to ordinary parameter first. +- func_stripname_result=${3} +- func_stripname_result=${func_stripname_result#"${1}"} +- func_stripname_result=${func_stripname_result%"${2}"} +-} +- +-# func_opt_split +-func_opt_split () +-{ +- func_opt_split_opt=${1%%=*} +- func_opt_split_arg=${1#*=} +-} +- +-# func_lo2o object +-func_lo2o () +-{ +- case ${1} in +- *.lo) func_lo2o_result=${1%.lo}.${objext} ;; +- *) func_lo2o_result=${1} ;; +- esac +-} +- +-# func_xform libobj-or-source +-func_xform () +-{ +- func_xform_result=${1%.*}.lo +-} +- +-# func_arith arithmetic-term... +-func_arith () +-{ +- func_arith_result=$(( $* )) +-} +- +-# func_len string +-# STRING may not start with a hyphen. +-func_len () +-{ +- func_len_result=${#1} +-} +- +-_LT_EOF +- ;; +- *) # Bourne compatible functions. +- cat << \_LT_EOF >> "$cfgfile" +- +-# func_dirname file append nondir_replacement +-# Compute the dirname of FILE. If nonempty, add APPEND to the result, +-# otherwise set result to NONDIR_REPLACEMENT. +-func_dirname () +-{ +- # Extract subdirectory from the argument. +- func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` +- if test "X$func_dirname_result" = "X${1}"; then +- func_dirname_result="${3}" +- else +- func_dirname_result="$func_dirname_result${2}" +- fi +-} +- +-# func_basename file +-func_basename () +-{ +- func_basename_result=`$ECHO "${1}" | $SED "$basename"` +-} +- +- +-# func_stripname prefix suffix name +-# strip PREFIX and SUFFIX off of NAME. +-# PREFIX and SUFFIX must not contain globbing or regex special +-# characters, hashes, percent signs, but SUFFIX may contain a leading +-# dot (in which case that matches only a dot). +-# func_strip_suffix prefix name +-func_stripname () +-{ +- case ${2} in +- .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; +- *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; +- esac +-} +- +-# sed scripts: +-my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q' +-my_sed_long_arg='1s/^-[^=]*=//' +- +-# func_opt_split +-func_opt_split () +-{ +- func_opt_split_opt=`$ECHO "${1}" | $SED "$my_sed_long_opt"` +- func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"` +-} +- +-# func_lo2o object +-func_lo2o () +-{ +- func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` +-} +- +-# func_xform libobj-or-source +-func_xform () +-{ +- func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` +-} +- +-# func_arith arithmetic-term... +-func_arith () +-{ +- func_arith_result=`expr "$@"` +-} +- +-# func_len string +-# STRING may not start with a hyphen. +-func_len () +-{ +- func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` +-} +- +-_LT_EOF +-esac +- +-case $lt_shell_append in +- yes) +- cat << \_LT_EOF >> "$cfgfile" +- +-# func_append var value +-# Append VALUE to the end of shell variable VAR. +-func_append () +-{ +- eval "$1+=\$2" +-} +-_LT_EOF +- ;; +- *) +- cat << \_LT_EOF >> "$cfgfile" +- +-# func_append var value +-# Append VALUE to the end of shell variable VAR. +-func_append () +-{ +- eval "$1=\$$1\$2" +-} +- +-_LT_EOF +- ;; +- esac ++ sed '$q' "$ltmain" >> "$cfgfile" \ ++ || (rm -f "$cfgfile"; exit 1) + ++ if test x"$xsi_shell" = xyes; then ++ sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ ++func_dirname ()\ ++{\ ++\ case ${1} in\ ++\ */*) func_dirname_result="${1%/*}${2}" ;;\ ++\ * ) func_dirname_result="${3}" ;;\ ++\ esac\ ++} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_basename ()$/,/^} # func_basename /c\ ++func_basename ()\ ++{\ ++\ func_basename_result="${1##*/}"\ ++} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ ++func_dirname_and_basename ()\ ++{\ ++\ case ${1} in\ ++\ */*) func_dirname_result="${1%/*}${2}" ;;\ ++\ * ) func_dirname_result="${3}" ;;\ ++\ esac\ ++\ func_basename_result="${1##*/}"\ ++} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ ++func_stripname ()\ ++{\ ++\ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ ++\ # positional parameters, so assign one to ordinary parameter first.\ ++\ func_stripname_result=${3}\ ++\ func_stripname_result=${func_stripname_result#"${1}"}\ ++\ func_stripname_result=${func_stripname_result%"${2}"}\ ++} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ ++func_split_long_opt ()\ ++{\ ++\ func_split_long_opt_name=${1%%=*}\ ++\ func_split_long_opt_arg=${1#*=}\ ++} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ ++func_split_short_opt ()\ ++{\ ++\ func_split_short_opt_arg=${1#??}\ ++\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ ++} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ ++func_lo2o ()\ ++{\ ++\ case ${1} in\ ++\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ ++\ *) func_lo2o_result=${1} ;;\ ++\ esac\ ++} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_xform ()$/,/^} # func_xform /c\ ++func_xform ()\ ++{\ ++ func_xform_result=${1%.*}.lo\ ++} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_arith ()$/,/^} # func_arith /c\ ++func_arith ()\ ++{\ ++ func_arith_result=$(( $* ))\ ++} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_len ()$/,/^} # func_len /c\ ++func_len ()\ ++{\ ++ func_len_result=${#1}\ ++} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++fi ++ ++if test x"$lt_shell_append" = xyes; then ++ sed -e '/^func_append ()$/,/^} # func_append /c\ ++func_append ()\ ++{\ ++ eval "${1}+=\\${2}"\ ++} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ ++func_append_quoted ()\ ++{\ ++\ func_quote_for_eval "${2}"\ ++\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ ++} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ # Save a `func_append' function call where possible by direct use of '+=' ++ sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++ test 0 -eq $? || _lt_function_replace_fail=: ++else ++ # Save a `func_append' function call even when '+=' is not available ++ sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++ test 0 -eq $? || _lt_function_replace_fail=: ++fi ++ ++if test x"$_lt_function_replace_fail" = x":"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 ++$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} ++fi + +- sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ +- || (rm -f "$cfgfile"; exit 1) + +- mv -f "$cfgfile" "$ofile" || ++ mv -f "$cfgfile" "$ofile" || + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" + +Index: binutils-2.21.1/bfd/configure.in +=================================================================== +--- binutils-2.21.1.orig/bfd/configure.in ++++ binutils-2.21.1/bfd/configure.in +@@ -536,7 +536,7 @@ changequote(,)dnl + x=`sed -n -e 's/^[ ]*PICFLAG[ ]*=[ ]*//p' < ../libiberty/Makefile | sed -n '$p'` + changequote([,])dnl + if test -n "$x"; then +- SHARED_LIBADD="-L`pwd`/../libiberty/pic -liberty" ++ SHARED_LIBADD="`pwd`/../libiberty/pic/libiberty.a" + fi + + # More hacks to build DLLs on Windows. +Index: binutils-2.21.1/opcodes/configure.in +=================================================================== +--- binutils-2.21.1.orig/opcodes/configure.in ++++ binutils-2.21.1/opcodes/configure.in +@@ -134,7 +134,7 @@ changequote(,)dnl + x=`sed -n -e 's/^[ ]*PICFLAG[ ]*=[ ]*//p' < ../libiberty/Makefile | sed -n '$p'` + changequote([,])dnl + if test -n "$x"; then +- SHARED_LIBADD="-L`pwd`/../libiberty/pic -liberty" ++ SHARED_LIBADD="`pwd`/../libiberty/pic/libiberty.a" + fi + + case "${host}" in -- cgit v1.2.3-54-g00ecf From 95873f8dc44db1ae967f58b2753820407f1fcae6 Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Thu, 15 Mar 2012 11:14:16 -0500 Subject: chagne lsb and lsb-sdk to tar.gz instead of nfsroot Signed-off-by: Matthew McClintock --- meta-fsl-ppc/images/fsl-image-lsb-sdk.bb | 2 +- meta-fsl-ppc/images/fsl-image-lsb.bb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/meta-fsl-ppc/images/fsl-image-lsb-sdk.bb b/meta-fsl-ppc/images/fsl-image-lsb-sdk.bb index c4fff429..22332d2a 100644 --- a/meta-fsl-ppc/images/fsl-image-lsb-sdk.bb +++ b/meta-fsl-ppc/images/fsl-image-lsb-sdk.bb @@ -15,4 +15,4 @@ IMAGE_INSTALL = "\ inherit core-image -IMAGE_FSTYPES ?= "nfsroot" +IMAGE_FSTYPES ?= "tar.gz" diff --git a/meta-fsl-ppc/images/fsl-image-lsb.bb b/meta-fsl-ppc/images/fsl-image-lsb.bb index 47f4c38d..b4e90650 100644 --- a/meta-fsl-ppc/images/fsl-image-lsb.bb +++ b/meta-fsl-ppc/images/fsl-image-lsb.bb @@ -9,4 +9,4 @@ IMAGE_INSTALL = "\ inherit core-image -IMAGE_FSTYPES ?= "nfsroot" +IMAGE_FSTYPES ?= "tar.gz" -- cgit v1.2.3-54-g00ecf From f519b94b58301e775dc51604731fa6f18296926b Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Thu, 15 Mar 2012 11:15:06 -0500 Subject: remove fsl-image-lsb - just use fsl-image-lsb-sdk Signed-off-by: Matthew McClintock --- meta-fsl-ppc/images/fsl-image-lsb.bb | 12 ------------ 1 file changed, 12 deletions(-) delete mode 100644 meta-fsl-ppc/images/fsl-image-lsb.bb diff --git a/meta-fsl-ppc/images/fsl-image-lsb.bb b/meta-fsl-ppc/images/fsl-image-lsb.bb deleted file mode 100644 index b4e90650..00000000 --- a/meta-fsl-ppc/images/fsl-image-lsb.bb +++ /dev/null @@ -1,12 +0,0 @@ -IMAGE_FEATURES += "apps-console-core ssh-server-openssh" - -IMAGE_INSTALL = "\ - ${POKY_BASE_INSTALL} \ - task-core-basic \ - task-core-lsb \ - u-boot \ - " - -inherit core-image - -IMAGE_FSTYPES ?= "tar.gz" -- cgit v1.2.3-54-g00ecf From 8a528868b4f53844eedf69cf95e5e467c4e89503 Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Thu, 15 Mar 2012 11:43:36 -0500 Subject: qemu: remove bbappends since we reference private git server Signed-off-by: Matthew McClintock --- meta-fsl-ppc/recipes-append/qemu/qemu_git.bbappend | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 meta-fsl-ppc/recipes-append/qemu/qemu_git.bbappend diff --git a/meta-fsl-ppc/recipes-append/qemu/qemu_git.bbappend b/meta-fsl-ppc/recipes-append/qemu/qemu_git.bbappend deleted file mode 100644 index d371047f..00000000 --- a/meta-fsl-ppc/recipes-append/qemu/qemu_git.bbappend +++ /dev/null @@ -1,6 +0,0 @@ -SRC_URI = "git://git.am.freescale.net/gitolite/sdk/qemu.git;protocol=git" -SRCREV = "${AUTOREV}" - -QEMU_TARGETS ?= "ppc" - -PR .= "+${DISTRO}.0" -- cgit v1.2.3-54-g00ecf From 692297fcc1aff701019a9d6e4d3ace1136fceafa Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Thu, 15 Mar 2012 15:51:55 -0500 Subject: Revert "linux-qoriq-sdk.inc: update kernel version" This reverts commit dea2327ad76ba04bb047f343eeea587bc9e28943. git.freescale.com Linux tree is still point at 3.0.6 --- meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc index 4d6fc3a7..f90d8949 100644 --- a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc +++ b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc @@ -1,6 +1,6 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7" -PV = "3.0.18" +PV = "3.0.6" PR = "r2" SRCREV = "1e3e8ed15249d73a066ddfe2e80882935c35dcb7" -- cgit v1.2.3-54-g00ecf From 6b1fa9926e6494993c8083ac7f2426429b905ba4 Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Thu, 15 Mar 2012 15:53:42 -0500 Subject: remove linux-yocto_3.0.bbappend since we have not used/tested this at all Signed-off-by: Matthew McClintock --- .../recipes-kernel/linux/linux-yocto_3.0.bbappend | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 meta-fsl-ppc/recipes-kernel/linux/linux-yocto_3.0.bbappend diff --git a/meta-fsl-ppc/recipes-kernel/linux/linux-yocto_3.0.bbappend b/meta-fsl-ppc/recipes-kernel/linux/linux-yocto_3.0.bbappend deleted file mode 100644 index fb92821b..00000000 --- a/meta-fsl-ppc/recipes-kernel/linux/linux-yocto_3.0.bbappend +++ /dev/null @@ -1,15 +0,0 @@ -KMACHINE_e500v2 = "yocto/standard/fsl-mpc8315e-rdb" -KMACHINE_e500mc = "yocto/standard/fsl-mpc8315e-rdb" - -SRCREV_machine_e500v2 = "5d3c0b06071abd663c7790df141060ae462660a9" -SRCREV_machine_e500mc = "5d3c0b06071abd663c7790df141060ae462660a9" - -COMPATIBLE_MACHINE_mpc8572ds = "mpc8572ds" -COMPATIBLE_MACHINE_p1020rdb = "p1020rdb" -COMPATIBLE_MACHINE_p2020ds = "p2020ds" -COMPATIBLE_MACHINE_p3041ds = "p3041ds" -COMPATIBLE_MACHINE_p4080ds = "p4080ds" -COMPATIBLE_MACHINE_p5020ds-64b = "p5020ds-64b" -COMPATIBLE_MACHINE_p5020ds = "p5020ds" - -PR .= "+${DISTRO}" -- cgit v1.2.3-54-g00ecf From 75e97cb4b196dda7b3d941a9d38ed73e0d9fd02b Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Fri, 16 Mar 2012 17:02:31 +0000 Subject: gcc: add gcc.fix_min_max.patch Signed-off-by: Zhenhua Luo --- .../gcc/files/gcc.fix_min_max.patch | 38 ++++++++++++++++++++++ meta-fsl-ppc/recipes-devtools/gcc/gcc-fsl.inc | 3 +- 2 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 meta-fsl-ppc/recipes-devtools/gcc/files/gcc.fix_min_max.patch diff --git a/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.fix_min_max.patch b/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.fix_min_max.patch new file mode 100644 index 00000000..81167bec --- /dev/null +++ b/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.fix_min_max.patch @@ -0,0 +1,38 @@ +diff -Naur gcc-4.6.2/gcc/config/rs6000/rs6000.c gcc-4.6.2-modified-office2-gs8-ice-fix/gcc/config/rs6000/rs6000.c +--- gcc-4.6.2/gcc/config/rs6000/rs6000.c 2011-09-18 17:01:56.000000000 -0500 ++++ gcc-4.6.2-modified-office2-gs8-ice-fix/gcc/config/rs6000/rs6000.c 2012-01-13 07:07:31.702487887 -0600 +@@ -17727,11 +17727,34 @@ + c = GEU; + + if (code == SMAX || code == UMAX) ++ { + target = emit_conditional_move (dest, c, op0, op1, mode, + op0, op1, mode, 0); ++ if(!target) ++ { ++ rtx tem; ++ tem = simplify_const_relational_operation (c, mode, op0, op1); ++ if(rtx_equal_p(tem,const0_rtx)) ++ target = op1; ++ else if(rtx_equal_p(tem,const1_rtx)) ++ target = op0; ++ } ++ ++ } + else ++ { + target = emit_conditional_move (dest, c, op0, op1, mode, + op1, op0, mode, 0); ++ if(!target) ++ { ++ rtx tem; ++ tem = simplify_const_relational_operation (c, mode, op0, op1); ++ if(rtx_equal_p(tem,const0_rtx)) ++ target = op0; ++ else if(rtx_equal_p(tem,const1_rtx)) ++ target = op1; ++ } ++ } + gcc_assert (target); + if (target != dest) + emit_move_insn (dest, target); diff --git a/meta-fsl-ppc/recipes-devtools/gcc/gcc-fsl.inc b/meta-fsl-ppc/recipes-devtools/gcc/gcc-fsl.inc index 2e5be822..9e7c6155 100644 --- a/meta-fsl-ppc/recipes-devtools/gcc/gcc-fsl.inc +++ b/meta-fsl-ppc/recipes-devtools/gcc/gcc-fsl.inc @@ -38,8 +38,9 @@ SRC_URI_fsl = "svn://gcc.gnu.org/svn/gcc/branches;module=${BRANCH};proto=http \ file://gcc.fix_header_issue.patch \ file://gcc.fix_SSIZE_MAX_undefine_issue.patch \ file://GPLUSPLUS_INCLUDE_DIR_with_sysroot_fsl.patch \ + file://gcc.fix_min_max.patch \ " FILESEXTRAPATHS_prepend := "${THISDIR}/files:" -PR_fsl .= "+${DISTRO}.1" +PR_fsl .= "+${DISTRO}.2" -- cgit v1.2.3-54-g00ecf From 802802baa19568dace4ca98ce458221a3f724d7e Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Mon, 19 Mar 2012 11:11:23 -0500 Subject: fsl.conf: change qemu targets to just ppc Signed-off-by: Matthew McClintock --- meta-fsl-ppc/conf/distro/fsl.conf | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/meta-fsl-ppc/conf/distro/fsl.conf b/meta-fsl-ppc/conf/distro/fsl.conf index b9867a51..32c86d45 100644 --- a/meta-fsl-ppc/conf/distro/fsl.conf +++ b/meta-fsl-ppc/conf/distro/fsl.conf @@ -29,8 +29,7 @@ DISTRO_EXTRA_RDEPENDS_append_qemux86-64 = " ${POKYQEMUDEPS}" TCLIBCAPPEND = "" -QEMU_TARGETS ?= "arm i386 mips mipsel ppc x86_64" -# Other QEMU_TARGETS "mips64 mips64el sh4" +QEMU_TARGETS ?= "ppc" PREMIRRORS ?= "\ bzr://.*/.* http://autobuilder.yoctoproject.org/sources/ \n \ -- cgit v1.2.3-54-g00ecf From 7ce99a700b18199722960c7938ef924e81d221b0 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Mon, 19 Mar 2012 18:34:20 +0000 Subject: ipsec-tools: enable several options Signed-off-by: Ting Liu --- meta-fsl-ppc/recipes-append/ipsec-tools/ipsec-tools_0.7.2.bbappend | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 meta-fsl-ppc/recipes-append/ipsec-tools/ipsec-tools_0.7.2.bbappend diff --git a/meta-fsl-ppc/recipes-append/ipsec-tools/ipsec-tools_0.7.2.bbappend b/meta-fsl-ppc/recipes-append/ipsec-tools/ipsec-tools_0.7.2.bbappend new file mode 100644 index 00000000..dc383242 --- /dev/null +++ b/meta-fsl-ppc/recipes-append/ipsec-tools/ipsec-tools_0.7.2.bbappend @@ -0,0 +1,7 @@ +EXTRA_OECONF_append_fsl = "\ + --enable-dpd \ + --enable-ipv6 \ + --enable-natt \ +" + +PR .= "+${DISTRO}.0" -- cgit v1.2.3-54-g00ecf From c5cf6892f01fbe83c42deeafc43d1d060e2cd8fc Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Tue, 20 Mar 2012 17:06:57 -0500 Subject: gcc: remove crosssdk from using fsl specific patches Signed-off-by: Matthew McClintock --- .../gcc/gcc-crosssdk-initial_4.6.bbappend | 1 - .../gcc/gcc-crosssdk-intermediate_4.6.bbappend | 22 ---------------------- .../recipes-devtools/gcc/gcc-crosssdk_4.6.bbappend | 1 - meta-fsl-ppc/recipes-devtools/gcc/gcc-fsl.inc | 2 +- .../recipes-devtools/gcc/gcc-runtime_4.6.bbappend | 1 - 5 files changed, 1 insertion(+), 26 deletions(-) delete mode 100644 meta-fsl-ppc/recipes-devtools/gcc/gcc-crosssdk-initial_4.6.bbappend delete mode 100644 meta-fsl-ppc/recipes-devtools/gcc/gcc-crosssdk-intermediate_4.6.bbappend delete mode 100644 meta-fsl-ppc/recipes-devtools/gcc/gcc-crosssdk_4.6.bbappend delete mode 100644 meta-fsl-ppc/recipes-devtools/gcc/gcc-runtime_4.6.bbappend diff --git a/meta-fsl-ppc/recipes-devtools/gcc/gcc-crosssdk-initial_4.6.bbappend b/meta-fsl-ppc/recipes-devtools/gcc/gcc-crosssdk-initial_4.6.bbappend deleted file mode 100644 index 1c725f2f..00000000 --- a/meta-fsl-ppc/recipes-devtools/gcc/gcc-crosssdk-initial_4.6.bbappend +++ /dev/null @@ -1 +0,0 @@ -require gcc-fsl.inc diff --git a/meta-fsl-ppc/recipes-devtools/gcc/gcc-crosssdk-intermediate_4.6.bbappend b/meta-fsl-ppc/recipes-devtools/gcc/gcc-crosssdk-intermediate_4.6.bbappend deleted file mode 100644 index ed27db03..00000000 --- a/meta-fsl-ppc/recipes-devtools/gcc/gcc-crosssdk-intermediate_4.6.bbappend +++ /dev/null @@ -1,22 +0,0 @@ -require gcc-fsl.inc - -do_install () { - oe_runmake 'DESTDIR=${D}' install - install -d ${D}${target_base_libdir}/ - cp -rf ${D}${exec_prefix}/${TARGET_SYS}/${baselib}/ ${D}${target_base_libdir}/ - - # We don't really need this (here shares/ contains man/, info/, locale/). - rm -rf ${D}${datadir}/ - - # We use libiberty from binutils - find ${D}${exec_prefix}/lib -name libiberty.a | xargs rm -f - find ${D}${exec_prefix}/lib -name libiberty.h | xargs rm -f - - # Insert symlinks into libexec so when tools without a prefix are searched for, the correct ones are - # found. These need to be relative paths so they work in different locations. - dest=${D}${libexecdir}/gcc/${TARGET_SYS}/${BINV}/ - install -d $dest - for t in ar as ld nm objcopy objdump ranlib strip g77 gcc cpp gfortran; do - ln -sf ${BINRELPATH}/${TARGET_PREFIX}$t $dest$t - done -} diff --git a/meta-fsl-ppc/recipes-devtools/gcc/gcc-crosssdk_4.6.bbappend b/meta-fsl-ppc/recipes-devtools/gcc/gcc-crosssdk_4.6.bbappend deleted file mode 100644 index 1c725f2f..00000000 --- a/meta-fsl-ppc/recipes-devtools/gcc/gcc-crosssdk_4.6.bbappend +++ /dev/null @@ -1 +0,0 @@ -require gcc-fsl.inc diff --git a/meta-fsl-ppc/recipes-devtools/gcc/gcc-fsl.inc b/meta-fsl-ppc/recipes-devtools/gcc/gcc-fsl.inc index 9e7c6155..9e8cb314 100644 --- a/meta-fsl-ppc/recipes-devtools/gcc/gcc-fsl.inc +++ b/meta-fsl-ppc/recipes-devtools/gcc/gcc-fsl.inc @@ -43,4 +43,4 @@ SRC_URI_fsl = "svn://gcc.gnu.org/svn/gcc/branches;module=${BRANCH};proto=http \ FILESEXTRAPATHS_prepend := "${THISDIR}/files:" -PR_fsl .= "+${DISTRO}.2" +PR_fsl .= "+${DISTRO}.3" diff --git a/meta-fsl-ppc/recipes-devtools/gcc/gcc-runtime_4.6.bbappend b/meta-fsl-ppc/recipes-devtools/gcc/gcc-runtime_4.6.bbappend deleted file mode 100644 index 1c725f2f..00000000 --- a/meta-fsl-ppc/recipes-devtools/gcc/gcc-runtime_4.6.bbappend +++ /dev/null @@ -1 +0,0 @@ -require gcc-fsl.inc -- cgit v1.2.3-54-g00ecf From c6bb7f5177ca1db3d77c084e96e01c782bfacf18 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Thu, 22 Mar 2012 13:56:52 +0000 Subject: P1023RDS: build NAND u-boot by default Signed-off-by: Ting Liu --- meta-fsl-ppc/conf/machine/p1023rds.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-fsl-ppc/conf/machine/p1023rds.conf b/meta-fsl-ppc/conf/machine/p1023rds.conf index c5615dbd..b3e7631e 100644 --- a/meta-fsl-ppc/conf/machine/p1023rds.conf +++ b/meta-fsl-ppc/conf/machine/p1023rds.conf @@ -3,6 +3,6 @@ require e500v2.inc -UBOOT_MACHINES = "P1023RDS" +UBOOT_MACHINES = "P1023RDS P1023RDS_NAND" KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p1023rds.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/85xx/p1023rds_defconfig" -- cgit v1.2.3-54-g00ecf From 4bb49ec9a33ba59f5dd8d831589ff69522877d3a Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Thu, 22 Mar 2012 10:25:15 +0000 Subject: meta-fsl-ppc: do_deploy not use DEPLOY_DIR_IMAGE images in DEPLOYDIR will be deployed to DEPLOY_DIR_IMAGE automatically, not need install images to DEPLOY_DIR_IMAGE any more Signed-off-by: Ting Liu --- meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb | 11 ++--------- meta-fsl-ppc/recipes-tools/hv-cfg/hv-cfg_git.bb | 7 ++----- meta-fsl-ppc/recipes-tools/rcw/rcw_git.bb | 7 ++----- 3 files changed, 6 insertions(+), 19 deletions(-) diff --git a/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb b/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb index 43fc2def..50c89a92 100644 --- a/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb +++ b/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb @@ -5,7 +5,7 @@ PROVIDES = "virtual/bootloader" LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=1707d6db1d42237583f50183a5651ecb" -PR = "r10" +PR = "r11" INHIBIT_DEFAULT_DEPS = "1" DEPENDS = "boot-format-native virtual/${TARGET_PREFIX}gcc" @@ -68,7 +68,7 @@ do_install(){ *) UBOOT_TARGET="u-boot";; esac - if [ -f ${S}/${UBOOT_TARGET}.bin ]; then + if [ -f ${S}/${board}/${UBOOT_TARGET}.bin ]; then mkdir -p ${D}/boot/ install ${S}/${board}/${UBOOT_TARGET}.bin ${D}/boot/${UBOOT_TARGET}-${board}-${PV}-${PR}.bin ln -sf ${UBOOT_TARGET}-${board}-${PV}-${PR}.bin ${D}/boot/${UBOOT_TARGET}.bin @@ -90,13 +90,6 @@ do_deploy(){ esac if [ -f ${S}/${board}/${UBOOT_TARGET}.bin ]; then - mkdir -p ${DEPLOY_DIR_IMAGE} - install ${S}/${board}/${UBOOT_TARGET}.bin ${DEPLOY_DIR_IMAGE}/${UBOOT_TARGET}-${MACHINE}-${PV}-${PR}.bin - - cd ${DEPLOY_DIR_IMAGE} - rm -f ${UBOOT_TARGET}-${board}.bin - ln -sf ${UBOOT_TARGET}-${board}-${PV}-${PR}.bin ${UBOOT_TARGET}-${board}.bin - mkdir -p ${DEPLOYDIR} install ${S}/${board}/${UBOOT_TARGET}.bin ${DEPLOYDIR}/${UBOOT_TARGET}-${board}-${PV}-${PR}.bin diff --git a/meta-fsl-ppc/recipes-tools/hv-cfg/hv-cfg_git.bb b/meta-fsl-ppc/recipes-tools/hv-cfg/hv-cfg_git.bb index d0562026..1207ba56 100644 --- a/meta-fsl-ppc/recipes-tools/hv-cfg/hv-cfg_git.bb +++ b/meta-fsl-ppc/recipes-tools/hv-cfg/hv-cfg_git.bb @@ -1,7 +1,7 @@ DESCRIPTION = "Hypervisor Config" SECTION = "hv-cfg" LICENSE = "BSD" -PR = "r3" +PR = "r4" LIC_FILES_CHKSUM = " \ file://p2041rdb/LICENSE;md5=96dd72f26e9bb861de5c76c60e35e1bc \ @@ -28,11 +28,8 @@ do_deploy () { make install M=`echo ${MACHINE} | sed s/-64b//g` - mkdir -p ${DEPLOY_DIR_IMAGE}/hv-cfg - cp -r ${S}/${M}/${M} ${DEPLOY_DIR_IMAGE}/hv-cfg - install -d ${DEPLOYDIR}/hv-cfg - cp -r ${S}/${M}/${M} ${DEPLOYDIR}/hv-cfg + cp -r ${S}/${M}/${M}/* ${DEPLOYDIR}/hv-cfg } addtask deploy after do_install diff --git a/meta-fsl-ppc/recipes-tools/rcw/rcw_git.bb b/meta-fsl-ppc/recipes-tools/rcw/rcw_git.bb index 99a0d749..f36e142e 100644 --- a/meta-fsl-ppc/recipes-tools/rcw/rcw_git.bb +++ b/meta-fsl-ppc/recipes-tools/rcw/rcw_git.bb @@ -1,7 +1,7 @@ DESCRIPTION = "Reset Control Words (RCW)" SECTION = "rcw" LICENSE = "BSD" -PR = "r2" +PR = "r3" LIC_FILES_CHKSUM = " \ file://p2041rdb/LICENSE;md5=96dd72f26e9bb861de5c76c60e35e1bc \ @@ -26,11 +26,8 @@ do_deploy () { make install M=`echo ${MACHINE} | sed s/-64b//g` - mkdir -p ${DEPLOY_DIR_IMAGE}/rcw - cp -r ${S}/${M}/${M} ${DEPLOY_DIR_IMAGE}/rcw - install -d ${DEPLOYDIR}/rcw - cp -r ${S}/${M}/${M} ${DEPLOYDIR}/rcw + cp -r ${S}/${M}/${M}/* ${DEPLOYDIR}/rcw } addtask deploy after do_install -- cgit v1.2.3-54-g00ecf From cdc43d95d18082b13a38de499f6ddc00f1734368 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Thu, 22 Mar 2012 11:47:08 +0000 Subject: point to internel git tree:u-boot, rcw, hv-cfg, boot-format Signed-off-by: Ting Liu --- meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bbappend | 8 ++++++++ meta-fsl-ppc/recipes-tools/boot-format/boot-format_git.bbappend | 8 ++++++++ meta-fsl-ppc/recipes-tools/hv-cfg/hv-cfg_git.bbappend | 8 ++++++++ meta-fsl-ppc/recipes-tools/rcw/rcw_git.bbappend | 8 ++++++++ 4 files changed, 32 insertions(+) create mode 100644 meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bbappend create mode 100644 meta-fsl-ppc/recipes-tools/boot-format/boot-format_git.bbappend create mode 100644 meta-fsl-ppc/recipes-tools/hv-cfg/hv-cfg_git.bbappend create mode 100644 meta-fsl-ppc/recipes-tools/rcw/rcw_git.bbappend diff --git a/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bbappend b/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bbappend new file mode 100644 index 00000000..436d8b8d --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bbappend @@ -0,0 +1,8 @@ +# we call this git since it's ongoing development +# once it's on git.freescale.com it needs to be updated +# to the correct version there +PV = "git" + +SRC_URI = "git://git.am.freescale.net/gitolite/sdk/u-boot-devel.git" +SRCREV = "${AUTOREV}" + diff --git a/meta-fsl-ppc/recipes-tools/boot-format/boot-format_git.bbappend b/meta-fsl-ppc/recipes-tools/boot-format/boot-format_git.bbappend new file mode 100644 index 00000000..1398e7b2 --- /dev/null +++ b/meta-fsl-ppc/recipes-tools/boot-format/boot-format_git.bbappend @@ -0,0 +1,8 @@ +# we call this git since it's ongoing development +# once it's on git.freescale.com it needs to be updated +# to the correct version there +PV = "git" + +SRC_URI = "git://git.am.freescale.net/gitolite/sdk/boot-format.git" +SRCREV = "${AUTOREV}" + diff --git a/meta-fsl-ppc/recipes-tools/hv-cfg/hv-cfg_git.bbappend b/meta-fsl-ppc/recipes-tools/hv-cfg/hv-cfg_git.bbappend new file mode 100644 index 00000000..13920b56 --- /dev/null +++ b/meta-fsl-ppc/recipes-tools/hv-cfg/hv-cfg_git.bbappend @@ -0,0 +1,8 @@ +# we call this git since it's ongoing development +# once it's on git.freescale.com it needs to be updated +# to the correct version there +PV = "git" + +SRC_URI = "git://git.am.freescale.net/gitolite/sdk/hv-cfg.git" +SRCREV = "${AUTOREV}" + diff --git a/meta-fsl-ppc/recipes-tools/rcw/rcw_git.bbappend b/meta-fsl-ppc/recipes-tools/rcw/rcw_git.bbappend new file mode 100644 index 00000000..0e8508fe --- /dev/null +++ b/meta-fsl-ppc/recipes-tools/rcw/rcw_git.bbappend @@ -0,0 +1,8 @@ +# we call this git since it's ongoing development +# once it's on git.freescale.com it needs to be updated +# to the correct version there +PV = "git" + +SRC_URI = "git://git.am.freescale.net/gitolite/sdk/rcw.git" +SRCREV = "${AUTOREV}" + -- cgit v1.2.3-54-g00ecf From d7102f04fc8d0568f49b449a4a1814261f8bf005 Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Fri, 23 Mar 2012 18:16:22 +0800 Subject: Revert "point to internel git tree:u-boot, rcw, hv-cfg, boot-format" this patch is for meta-fsl-ppc-private This reverts commit 221ac89a12d44d6a862c48451250b125f5aa46e2. --- meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bbappend | 8 -------- meta-fsl-ppc/recipes-tools/boot-format/boot-format_git.bbappend | 8 -------- meta-fsl-ppc/recipes-tools/hv-cfg/hv-cfg_git.bbappend | 8 -------- meta-fsl-ppc/recipes-tools/rcw/rcw_git.bbappend | 8 -------- 4 files changed, 32 deletions(-) delete mode 100644 meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bbappend delete mode 100644 meta-fsl-ppc/recipes-tools/boot-format/boot-format_git.bbappend delete mode 100644 meta-fsl-ppc/recipes-tools/hv-cfg/hv-cfg_git.bbappend delete mode 100644 meta-fsl-ppc/recipes-tools/rcw/rcw_git.bbappend diff --git a/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bbappend b/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bbappend deleted file mode 100644 index 436d8b8d..00000000 --- a/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bbappend +++ /dev/null @@ -1,8 +0,0 @@ -# we call this git since it's ongoing development -# once it's on git.freescale.com it needs to be updated -# to the correct version there -PV = "git" - -SRC_URI = "git://git.am.freescale.net/gitolite/sdk/u-boot-devel.git" -SRCREV = "${AUTOREV}" - diff --git a/meta-fsl-ppc/recipes-tools/boot-format/boot-format_git.bbappend b/meta-fsl-ppc/recipes-tools/boot-format/boot-format_git.bbappend deleted file mode 100644 index 1398e7b2..00000000 --- a/meta-fsl-ppc/recipes-tools/boot-format/boot-format_git.bbappend +++ /dev/null @@ -1,8 +0,0 @@ -# we call this git since it's ongoing development -# once it's on git.freescale.com it needs to be updated -# to the correct version there -PV = "git" - -SRC_URI = "git://git.am.freescale.net/gitolite/sdk/boot-format.git" -SRCREV = "${AUTOREV}" - diff --git a/meta-fsl-ppc/recipes-tools/hv-cfg/hv-cfg_git.bbappend b/meta-fsl-ppc/recipes-tools/hv-cfg/hv-cfg_git.bbappend deleted file mode 100644 index 13920b56..00000000 --- a/meta-fsl-ppc/recipes-tools/hv-cfg/hv-cfg_git.bbappend +++ /dev/null @@ -1,8 +0,0 @@ -# we call this git since it's ongoing development -# once it's on git.freescale.com it needs to be updated -# to the correct version there -PV = "git" - -SRC_URI = "git://git.am.freescale.net/gitolite/sdk/hv-cfg.git" -SRCREV = "${AUTOREV}" - diff --git a/meta-fsl-ppc/recipes-tools/rcw/rcw_git.bbappend b/meta-fsl-ppc/recipes-tools/rcw/rcw_git.bbappend deleted file mode 100644 index 0e8508fe..00000000 --- a/meta-fsl-ppc/recipes-tools/rcw/rcw_git.bbappend +++ /dev/null @@ -1,8 +0,0 @@ -# we call this git since it's ongoing development -# once it's on git.freescale.com it needs to be updated -# to the correct version there -PV = "git" - -SRC_URI = "git://git.am.freescale.net/gitolite/sdk/rcw.git" -SRCREV = "${AUTOREV}" - -- cgit v1.2.3-54-g00ecf From 5642b08b5ce7c0defe9b050f00a275c1ac062da7 Mon Sep 17 00:00:00 2001 From: Chunrong Guo Date: Fri, 23 Mar 2012 16:24:29 +0000 Subject: fix "shutdown" hang issue fix ENGR00170373: shutdown doesn't work Signed-off-by: Chunrong Guo --- .../recipes-append/sysvinit/sysvinit-inittab_2.88dsf.bbappend | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 meta-fsl-ppc/recipes-append/sysvinit/sysvinit-inittab_2.88dsf.bbappend diff --git a/meta-fsl-ppc/recipes-append/sysvinit/sysvinit-inittab_2.88dsf.bbappend b/meta-fsl-ppc/recipes-append/sysvinit/sysvinit-inittab_2.88dsf.bbappend new file mode 100644 index 00000000..85e1cec6 --- /dev/null +++ b/meta-fsl-ppc/recipes-append/sysvinit/sysvinit-inittab_2.88dsf.bbappend @@ -0,0 +1,8 @@ + +do_install_append() { + echo "ll:1:respawn:${base_sbindir}/getty 115200 ttyS0 ">> ${D}${sysconfdir}/inittab + echo "l2:1:respawn:${base_sbindir}/getty 115200 ttyEHV0">> ${D}${sysconfdir}/inittab + +} +PR .= "+${DISTRO}.0" + -- cgit v1.2.3-54-g00ecf From 5b727b3cd4cfff134dae73ef59c55c133a7bcda7 Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Fri, 23 Mar 2012 23:41:55 +0000 Subject: fix appending distro tag to PR Signed-off-by: Matthew McClintock --- meta-fsl-ppc/recipes-append/ipsec-tools/ipsec-tools_0.7.2.bbappend | 2 +- meta-fsl-ppc/recipes-devtools/binutils/binutils-fsl.inc | 2 +- meta-fsl-ppc/recipes-devtools/eglibc/eglibc-fsl.inc | 2 +- meta-fsl-ppc/recipes-devtools/gcc/gcc-fsl.inc | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/meta-fsl-ppc/recipes-append/ipsec-tools/ipsec-tools_0.7.2.bbappend b/meta-fsl-ppc/recipes-append/ipsec-tools/ipsec-tools_0.7.2.bbappend index dc383242..6478dc75 100644 --- a/meta-fsl-ppc/recipes-append/ipsec-tools/ipsec-tools_0.7.2.bbappend +++ b/meta-fsl-ppc/recipes-append/ipsec-tools/ipsec-tools_0.7.2.bbappend @@ -4,4 +4,4 @@ EXTRA_OECONF_append_fsl = "\ --enable-natt \ " -PR .= "+${DISTRO}.0" +PR_append_fsl = "+${DISTRO}.0" diff --git a/meta-fsl-ppc/recipes-devtools/binutils/binutils-fsl.inc b/meta-fsl-ppc/recipes-devtools/binutils/binutils-fsl.inc index 0309032a..258f6cc7 100644 --- a/meta-fsl-ppc/recipes-devtools/binutils/binutils-fsl.inc +++ b/meta-fsl-ppc/recipes-devtools/binutils/binutils-fsl.inc @@ -12,4 +12,4 @@ SRC_URI_fsl = "\ FILESEXTRAPATHS_prepend := "${THISDIR}/files:" -PR_fsl .= "+${DISTRO}.4" +PR_append_fsl = "+${DISTRO}.4" diff --git a/meta-fsl-ppc/recipes-devtools/eglibc/eglibc-fsl.inc b/meta-fsl-ppc/recipes-devtools/eglibc/eglibc-fsl.inc index 63bf8bbd..88876f04 100644 --- a/meta-fsl-ppc/recipes-devtools/eglibc/eglibc-fsl.inc +++ b/meta-fsl-ppc/recipes-devtools/eglibc/eglibc-fsl.inc @@ -11,4 +11,4 @@ SRC_URI_fsl = "svn://www.eglibc.org/svn/branches/;module=${EGLIBC_BRANCH};proto= FILESEXTRAPATHS_prepend := "${THISDIR}/files:" -PR_fsl .= "+${DISTRO}.0" +PR_append_fsl = "+${DISTRO}.0" diff --git a/meta-fsl-ppc/recipes-devtools/gcc/gcc-fsl.inc b/meta-fsl-ppc/recipes-devtools/gcc/gcc-fsl.inc index 9e8cb314..f7058feb 100644 --- a/meta-fsl-ppc/recipes-devtools/gcc/gcc-fsl.inc +++ b/meta-fsl-ppc/recipes-devtools/gcc/gcc-fsl.inc @@ -43,4 +43,4 @@ SRC_URI_fsl = "svn://gcc.gnu.org/svn/gcc/branches;module=${BRANCH};proto=http \ FILESEXTRAPATHS_prepend := "${THISDIR}/files:" -PR_fsl .= "+${DISTRO}.3" +PR_append_fsl = "+${DISTRO}.3" -- cgit v1.2.3-54-g00ecf From 1b9207dc7245765b7f35b368ed133e4ca6329ef7 Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Tue, 27 Mar 2012 03:21:54 +0000 Subject: gcc: add gcc-runtime back which should have powerpc patches Signed-off-by: Matthew McClintock --- meta-fsl-ppc/recipes-devtools/gcc/gcc-fsl.inc | 2 +- meta-fsl-ppc/recipes-devtools/gcc/gcc-runtime_4.6.bbappend | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 meta-fsl-ppc/recipes-devtools/gcc/gcc-runtime_4.6.bbappend diff --git a/meta-fsl-ppc/recipes-devtools/gcc/gcc-fsl.inc b/meta-fsl-ppc/recipes-devtools/gcc/gcc-fsl.inc index f7058feb..b5ad200e 100644 --- a/meta-fsl-ppc/recipes-devtools/gcc/gcc-fsl.inc +++ b/meta-fsl-ppc/recipes-devtools/gcc/gcc-fsl.inc @@ -43,4 +43,4 @@ SRC_URI_fsl = "svn://gcc.gnu.org/svn/gcc/branches;module=${BRANCH};proto=http \ FILESEXTRAPATHS_prepend := "${THISDIR}/files:" -PR_append_fsl = "+${DISTRO}.3" +PR_append_fsl = "+${DISTRO}.4" diff --git a/meta-fsl-ppc/recipes-devtools/gcc/gcc-runtime_4.6.bbappend b/meta-fsl-ppc/recipes-devtools/gcc/gcc-runtime_4.6.bbappend new file mode 100644 index 00000000..1c725f2f --- /dev/null +++ b/meta-fsl-ppc/recipes-devtools/gcc/gcc-runtime_4.6.bbappend @@ -0,0 +1 @@ +require gcc-fsl.inc -- cgit v1.2.3-54-g00ecf From 5b6d43fc949f297b1d2533bcebb7291e9cc1871e Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Tue, 27 Mar 2012 21:57:56 +0800 Subject: libxml: add --with-fexceptions into configure parameter list Signed-off-by: Zhenhua Luo --- meta-fsl-ppc/recipes-append/libxml/libxml2_2.7.8.bbappend | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 meta-fsl-ppc/recipes-append/libxml/libxml2_2.7.8.bbappend diff --git a/meta-fsl-ppc/recipes-append/libxml/libxml2_2.7.8.bbappend b/meta-fsl-ppc/recipes-append/libxml/libxml2_2.7.8.bbappend new file mode 100644 index 00000000..9b3f7f64 --- /dev/null +++ b/meta-fsl-ppc/recipes-append/libxml/libxml2_2.7.8.bbappend @@ -0,0 +1,3 @@ +EXTRA_OECONF += "--with-fexceptions" + +PR .= "+${DISTRO}.0" -- cgit v1.2.3-54-g00ecf From 703c252d21b9df78a97271a98a7cba79f66fca96 Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Tue, 27 Mar 2012 12:47:44 +0000 Subject: add libgomp and libgomp-dev in fsl-toolchain Signed-off-by: Zhenhua Luo --- meta-fsl-ppc/images/fsl-toolchain.bb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/meta-fsl-ppc/images/fsl-toolchain.bb b/meta-fsl-ppc/images/fsl-toolchain.bb index c1d59d31..9100810d 100644 --- a/meta-fsl-ppc/images/fsl-toolchain.bb +++ b/meta-fsl-ppc/images/fsl-toolchain.bb @@ -6,6 +6,8 @@ TOOLCHAIN_OUTPUTNAME = "${SDK_NAME}-toolchain-${DISTRO_VERSION}" TOOLCHAIN_TARGET_TASK += " \ glib-2.0 \ dtc \ + libgomp \ + libgomp-dev \ " TOOLCHAIN_HOST_TASK += " \ -- cgit v1.2.3-54-g00ecf From 83d235a231f4baebf0ea697ea2c60a1acca84179 Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Thu, 29 Mar 2012 12:53:08 -0500 Subject: fsl.conf: make DISTRO_FEATURES minimal as possible Signed-off-by: Matthew McClintock --- meta-fsl-ppc/conf/distro/fsl.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-fsl-ppc/conf/distro/fsl.conf b/meta-fsl-ppc/conf/distro/fsl.conf index 32c86d45..f74a8d74 100644 --- a/meta-fsl-ppc/conf/distro/fsl.conf +++ b/meta-fsl-ppc/conf/distro/fsl.conf @@ -12,7 +12,7 @@ TARGET_VENDOR_virtclass-multilib-lib64 = "-fsl" LOCALCONF_VERSION = "1" -DISTRO_FEATURES_append = " largefile opengl" +DISTRO_FEATURES = "${DISTRO_FEATURES_LIBC}" SDK_NAME = "${DISTRO}-${TCLIBC}-${SDK_ARCH}-${TUNE_PKGARCH}" SDKPATH = "/opt/${DISTRO}/${SDK_VERSION}" -- cgit v1.2.3-54-g00ecf From 029a294aea96531b2b7fac80aa59c861496fabba Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Sat, 31 Mar 2012 11:39:21 +0800 Subject: remove bbappend of ipsec-tools and samba due to the two packages are not in poky repository Signed-off-by: Zhenhua Luo --- .../ipsec-tools/ipsec-tools_0.7.2.bbappend | 7 ------- meta-fsl-ppc/recipes-append/samba/files/smb.conf | 22 ---------------------- .../recipes-append/samba/samba_3.5.6.bbappend | 4 ---- 3 files changed, 33 deletions(-) delete mode 100644 meta-fsl-ppc/recipes-append/ipsec-tools/ipsec-tools_0.7.2.bbappend delete mode 100644 meta-fsl-ppc/recipes-append/samba/files/smb.conf delete mode 100644 meta-fsl-ppc/recipes-append/samba/samba_3.5.6.bbappend diff --git a/meta-fsl-ppc/recipes-append/ipsec-tools/ipsec-tools_0.7.2.bbappend b/meta-fsl-ppc/recipes-append/ipsec-tools/ipsec-tools_0.7.2.bbappend deleted file mode 100644 index 6478dc75..00000000 --- a/meta-fsl-ppc/recipes-append/ipsec-tools/ipsec-tools_0.7.2.bbappend +++ /dev/null @@ -1,7 +0,0 @@ -EXTRA_OECONF_append_fsl = "\ - --enable-dpd \ - --enable-ipv6 \ - --enable-natt \ -" - -PR_append_fsl = "+${DISTRO}.0" diff --git a/meta-fsl-ppc/recipes-append/samba/files/smb.conf b/meta-fsl-ppc/recipes-append/samba/files/smb.conf deleted file mode 100644 index c13df310..00000000 --- a/meta-fsl-ppc/recipes-append/samba/files/smb.conf +++ /dev/null @@ -1,22 +0,0 @@ -[global] -interfaces = eth0, eth1 -map to guest = Bad User -client NTLMv2 auth = Yes -client lanman auth = No -client plaintext auth = No -max xmit = 2097152 -socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=262142 SO_SNDBUF=262142 -dns proxy = No -use sendfile = Yes -guest account = root -pre-reply write = No -min receivefile size = 1 -dos charset = UTF-8 -unix charset = UTF-8 -display charset = UTF-8 - -[public] -path = /smbshare -read only = No -guest ok = Yes - diff --git a/meta-fsl-ppc/recipes-append/samba/samba_3.5.6.bbappend b/meta-fsl-ppc/recipes-append/samba/samba_3.5.6.bbappend deleted file mode 100644 index 7277e475..00000000 --- a/meta-fsl-ppc/recipes-append/samba/samba_3.5.6.bbappend +++ /dev/null @@ -1,4 +0,0 @@ -FILEXTRAPATHS_prepend := "${THISDIR}/files:" - -PR .= "+${DISTRO}.0" - -- cgit v1.2.3-54-g00ecf From 3666711d737031c11fec1b5d27dd4ec9435e39eb Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Mon, 2 Apr 2012 14:58:57 -0500 Subject: Revert "fsl.conf: make DISTRO_FEATURES minimal as possible" This reverts commit 314ce1065833306d44f3cd42ffbd9f330e2c02b5. This is causing issues with larger images that don't build when X11 is disabled. We need to defer this issue until after our release --- meta-fsl-ppc/conf/distro/fsl.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-fsl-ppc/conf/distro/fsl.conf b/meta-fsl-ppc/conf/distro/fsl.conf index f74a8d74..32c86d45 100644 --- a/meta-fsl-ppc/conf/distro/fsl.conf +++ b/meta-fsl-ppc/conf/distro/fsl.conf @@ -12,7 +12,7 @@ TARGET_VENDOR_virtclass-multilib-lib64 = "-fsl" LOCALCONF_VERSION = "1" -DISTRO_FEATURES = "${DISTRO_FEATURES_LIBC}" +DISTRO_FEATURES_append = " largefile opengl" SDK_NAME = "${DISTRO}-${TCLIBC}-${SDK_ARCH}-${TUNE_PKGARCH}" SDKPATH = "/opt/${DISTRO}/${SDK_VERSION}" -- cgit v1.2.3-54-g00ecf From f3e1304ed27ffa31601bb6aae2c7261afcd4b320 Mon Sep 17 00:00:00 2001 From: Chunrong Guo Date: Mon, 9 Apr 2012 14:09:15 +0800 Subject: Add more supported u-boot types for dpaa targets Signed-off-by: Chunrong Guo Signed-off-by: Zhenhua Luo --- meta-fsl-ppc/conf/machine/p2041rdb.conf | 2 +- meta-fsl-ppc/conf/machine/p3041ds.conf | 2 +- meta-fsl-ppc/conf/machine/p3060qds.conf | 2 +- meta-fsl-ppc/conf/machine/p4080ds.conf | 2 +- meta-fsl-ppc/conf/machine/p5020ds.conf | 2 +- meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb | 19 +++++++++++++++---- 6 files changed, 20 insertions(+), 9 deletions(-) diff --git a/meta-fsl-ppc/conf/machine/p2041rdb.conf b/meta-fsl-ppc/conf/machine/p2041rdb.conf index 83dc8523..014699e9 100644 --- a/meta-fsl-ppc/conf/machine/p2041rdb.conf +++ b/meta-fsl-ppc/conf/machine/p2041rdb.conf @@ -3,7 +3,7 @@ require e500mc.inc -UBOOT_MACHINES = "P2041RDB" +UBOOT_MACHINES = "P2041RDB P2041RDB_SECURE_BOOT P2041RDB_SDCARD P2041RDB_SPIFLASH" KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p2041rdb.dts \ ${S}/arch/powerpc/boot/dts/p2041rdb-usdpaa.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet32_smp_defconfig" diff --git a/meta-fsl-ppc/conf/machine/p3041ds.conf b/meta-fsl-ppc/conf/machine/p3041ds.conf index 83312920..2bdfb333 100644 --- a/meta-fsl-ppc/conf/machine/p3041ds.conf +++ b/meta-fsl-ppc/conf/machine/p3041ds.conf @@ -3,7 +3,7 @@ require e500mc.inc -UBOOT_MACHINES = "P3041DS" +UBOOT_MACHINES = "P3041DS P3041DS_NAND P3041DS_SECURE_BOOT P3041DS_SRIOBOOT_MASTER P3041DS_SRIOBOOT_SLAVE P3041DS_SDCARD P3041DS_SPIFLASH" KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p3041ds.dts \ ${S}/arch/powerpc/boot/dts/p3041ds-usdpaa.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet32_smp_defconfig" diff --git a/meta-fsl-ppc/conf/machine/p3060qds.conf b/meta-fsl-ppc/conf/machine/p3060qds.conf index dd872c93..4cfc85e9 100644 --- a/meta-fsl-ppc/conf/machine/p3060qds.conf +++ b/meta-fsl-ppc/conf/machine/p3060qds.conf @@ -3,7 +3,7 @@ require e500mc.inc -UBOOT_MACHINES = "P3060QDS" +UBOOT_MACHINES = "P3060QDS P3060QDS_NAND P3060QDS_SECURE_BOOT " KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p3060qds.dts \ ${S}/arch/powerpc/boot/dts/p3060qds-usdpaa.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet32_smp_defconfig" diff --git a/meta-fsl-ppc/conf/machine/p4080ds.conf b/meta-fsl-ppc/conf/machine/p4080ds.conf index 96d082c6..66a9554c 100644 --- a/meta-fsl-ppc/conf/machine/p4080ds.conf +++ b/meta-fsl-ppc/conf/machine/p4080ds.conf @@ -3,7 +3,7 @@ require e500mc.inc -UBOOT_MACHINES = "P4080DS" +UBOOT_MACHINES = "P4080DS P4080DS_SECURE_BOOT P4080DS_SRIOBOOT_MASTER P4080DS_SRIOBOOT_SLAVE P4080DS_SDCARD P4080DS_SPIFLASH " KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p4080ds.dts \ ${S}/arch/powerpc/boot/dts/p4080ds-usdpaa.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet32_smp_defconfig" diff --git a/meta-fsl-ppc/conf/machine/p5020ds.conf b/meta-fsl-ppc/conf/machine/p5020ds.conf index 296fd4e3..84de7577 100644 --- a/meta-fsl-ppc/conf/machine/p5020ds.conf +++ b/meta-fsl-ppc/conf/machine/p5020ds.conf @@ -3,7 +3,7 @@ require e5500.inc -UBOOT_MACHINES = "P5020DS" +UBOOT_MACHINES = "P5020DS P5020DS_NAND P5020DS_SECURE_BOOT P5020DS_SRIOBOOT_MASTER P5020DS_SRIOBOOT_SLAVE P5020DS_SDCARD P5020DS_SPIFLASH " KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p5020ds.dts \ ${S}/arch/powerpc/boot/dts/p5020ds-usdpaa.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet32_smp_defconfig" diff --git a/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb b/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb index 50c89a92..6568a785 100644 --- a/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb +++ b/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb @@ -5,7 +5,7 @@ PROVIDES = "virtual/bootloader" LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=1707d6db1d42237583f50183a5651ecb" -PR = "r11" +PR = "r12" INHIBIT_DEFAULT_DEPS = "1" DEPENDS = "boot-format-native virtual/${TARGET_PREFIX}gcc" @@ -44,13 +44,24 @@ do_compile () { case "${board}" in *SDCARD*) UBOOT_TARGET="u-boot-sd";; *SPIFLASH*) UBOOT_TARGET="u-boot-spi";; + *NAND*) UBOOT_TARGET="u-boot-nand";; *) UBOOT_TARGET="";; esac if [ "x${UBOOT_TARGET}" != "x" ]; then - ${STAGING_BINDIR_NATIVE}/boot_format \ - ${STAGING_DATADIR_NATIVE}/${BOOTFORMAT_CONFIG} \ - ${S}/${board}/u-boot.bin -spi ${S}/${board}/${UBOOT_TARGET}.bin + if [ "${MACHINE_ARCH}" == "p1023rds" ] || \ + [ "${MACHINE_ARCH}" == "p2041rdb" ] || \ + [ "${MACHINE_ARCH}" == "p3041ds" ] || \ + [ "${MACHINE_ARCH}" == "p3060qds" ] || \ + [ "${MACHINE_ARCH}" == "p4080ds" ] || \ + [ "${MACHINE_ARCH}" == "p5020ds" ] || \ + [ "${MACHINE_ARCH}" == "p5020ds-64b" ]; then + cp ${S}/${board}/u-boot.bin ${S}/${board}/${UBOOT_TARGET}.bin + else + ${STAGING_BINDIR_NATIVE}/boot_format \ + ${STAGING_DATADIR_NATIVE}/${BOOTFORMAT_CONFIG} \ + ${S}/${board}/u-boot.bin -spi ${S}/${board}/${UBOOT_TARGET}.bin + fi fi done } -- cgit v1.2.3-54-g00ecf From baa20d4fd4bc7e5d2d467af009c458092826a5de Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Mon, 9 Apr 2012 18:11:48 +0800 Subject: remove unnecessary line from UBOOT_TARGET judgement p5020ds-32b and p5020ds-64b use the same u-boot configuration option, remove p5020ds-64b line in UBOOT_TARGET judgement. Signed-off-by: Zhenhua Luo --- meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb b/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb index 6568a785..decb6ec1 100644 --- a/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb +++ b/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb @@ -5,7 +5,7 @@ PROVIDES = "virtual/bootloader" LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=1707d6db1d42237583f50183a5651ecb" -PR = "r12" +PR = "r13" INHIBIT_DEFAULT_DEPS = "1" DEPENDS = "boot-format-native virtual/${TARGET_PREFIX}gcc" @@ -54,8 +54,7 @@ do_compile () { [ "${MACHINE_ARCH}" == "p3041ds" ] || \ [ "${MACHINE_ARCH}" == "p3060qds" ] || \ [ "${MACHINE_ARCH}" == "p4080ds" ] || \ - [ "${MACHINE_ARCH}" == "p5020ds" ] || \ - [ "${MACHINE_ARCH}" == "p5020ds-64b" ]; then + [ "${MACHINE_ARCH}" == "p5020ds" ]; then cp ${S}/${board}/u-boot.bin ${S}/${board}/${UBOOT_TARGET}.bin else ${STAGING_BINDIR_NATIVE}/boot_format \ -- cgit v1.2.3-54-g00ecf From 15eb52b7af1bf60ffea23a777a290ae43e5dae62 Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Tue, 10 Apr 2012 10:54:11 +0800 Subject: fix u-boot-nand build error of non-dpaa targets u-boot-nand doesn't need to be handled by boot-format Signed-off-by: Zhenhua Luo --- meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb b/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb index decb6ec1..5060741b 100644 --- a/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb +++ b/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb @@ -5,7 +5,7 @@ PROVIDES = "virtual/bootloader" LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=1707d6db1d42237583f50183a5651ecb" -PR = "r13" +PR = "r14" INHIBIT_DEFAULT_DEPS = "1" DEPENDS = "boot-format-native virtual/${TARGET_PREFIX}gcc" @@ -54,7 +54,8 @@ do_compile () { [ "${MACHINE_ARCH}" == "p3041ds" ] || \ [ "${MACHINE_ARCH}" == "p3060qds" ] || \ [ "${MACHINE_ARCH}" == "p4080ds" ] || \ - [ "${MACHINE_ARCH}" == "p5020ds" ]; then + [ "${MACHINE_ARCH}" == "p5020ds" ] || \ + [ "${UBOOT_TARGET}" == "u-boot-nand" ]; then cp ${S}/${board}/u-boot.bin ${S}/${board}/${UBOOT_TARGET}.bin else ${STAGING_BINDIR_NATIVE}/boot_format \ -- cgit v1.2.3-54-g00ecf From c09d96d73e2f1b403cb5913d543c3af1306ef963 Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Tue, 10 Apr 2012 17:25:32 +0800 Subject: tclap: add tclap 1.2.1 Signed-off-by: Zhenhua Luo --- meta-fsl-ppc/recipes-devtools/tclap/tclap_1.2.1.bb | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 meta-fsl-ppc/recipes-devtools/tclap/tclap_1.2.1.bb diff --git a/meta-fsl-ppc/recipes-devtools/tclap/tclap_1.2.1.bb b/meta-fsl-ppc/recipes-devtools/tclap/tclap_1.2.1.bb new file mode 100644 index 00000000..aa478b58 --- /dev/null +++ b/meta-fsl-ppc/recipes-devtools/tclap/tclap_1.2.1.bb @@ -0,0 +1,17 @@ +DESCRIPTION = "Templatized C++ Command Line Parser" +HOMEPAGE = "http://tclap.sourceforge.net/" +SECTION = "tclap" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://COPYING;md5=c8ab0ff134bcc584d0e6b5b9f8732453" + +SRCREV = "3627d9402e529770df9b0edf2aa8c0e0d6c6bb41" +SRC_URI = "git://tclap.git.sourceforge.net/gitroot/tclap/tclap;protocal=git;branch=master" + +S = "${WORKDIR}/git" +inherit autotools + +do_install_prepend() { + install -d ${S}/docs/html +} + +BBCLASSEXTEND = "native nativesdk" -- cgit v1.2.3-54-g00ecf From b800580bfbf24567f94d40a6bb7feb6e38de1581 Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Wed, 11 Apr 2012 23:55:15 +0000 Subject: fsl-toolchain: add glib-2.0-dev package so we pull in header and pkgconfig files Signed-off-by: Matthew McClintock --- meta-fsl-ppc/images/fsl-toolchain.bb | 1 + 1 file changed, 1 insertion(+) diff --git a/meta-fsl-ppc/images/fsl-toolchain.bb b/meta-fsl-ppc/images/fsl-toolchain.bb index 9100810d..7f51cdc9 100644 --- a/meta-fsl-ppc/images/fsl-toolchain.bb +++ b/meta-fsl-ppc/images/fsl-toolchain.bb @@ -5,6 +5,7 @@ require fsl-toolchain-bare.bb TOOLCHAIN_OUTPUTNAME = "${SDK_NAME}-toolchain-${DISTRO_VERSION}" TOOLCHAIN_TARGET_TASK += " \ glib-2.0 \ + glib-2.0-dev \ dtc \ libgomp \ libgomp-dev \ -- cgit v1.2.3-54-g00ecf From 68d3afb574a5041ab80bff2211a8a460ba3de31d Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Thu, 12 Apr 2012 16:47:33 +0800 Subject: Disable rp_filter to enhance ASF IP forward performance Signed-off-by: Zhenhua Luo --- .../recipes-append/procps/files/sysctl.conf | 64 ++++++++++++++++++++++ .../recipes-append/procps/procps_3.2.8.bbappend | 3 + 2 files changed, 67 insertions(+) create mode 100644 meta-fsl-ppc/recipes-append/procps/files/sysctl.conf create mode 100644 meta-fsl-ppc/recipes-append/procps/procps_3.2.8.bbappend diff --git a/meta-fsl-ppc/recipes-append/procps/files/sysctl.conf b/meta-fsl-ppc/recipes-append/procps/files/sysctl.conf new file mode 100644 index 00000000..6148472c --- /dev/null +++ b/meta-fsl-ppc/recipes-append/procps/files/sysctl.conf @@ -0,0 +1,64 @@ +# This configuration file is taken from Debian. +# +# /etc/sysctl.conf - Configuration file for setting system variables +# See sysctl.conf (5) for information. +# + +#kernel.domainname = example.com + +# Uncomment the following to stop low-level messages on console +#kernel.printk = 4 4 1 7 + +##############################################################3 +# Functions previously found in netbase +# + +# Uncomment the next two lines to enable Spoof protection (reverse-path filter) +# Turn on Source Address Verification in all interfaces to +# prevent some spoofing attacks +net.ipv4.conf.default.rp_filter=0 +net.ipv4.conf.all.rp_filter=0 + +# Uncomment the next line to enable TCP/IP SYN cookies +#net.ipv4.tcp_syncookies=1 + +# Uncomment the next line to enable packet forwarding for IPv4 +#net.ipv4.ip_forward=1 + +# Uncomment the next line to enable packet forwarding for IPv6 +#net.ipv6.conf.all.forwarding=1 + + +################################################################### +# Additional settings - these settings can improve the network +# security of the host and prevent against some network attacks +# including spoofing attacks and man in the middle attacks through +# redirection. Some network environments, however, require that these +# settings are disabled so review and enable them as needed. +# +# Ignore ICMP broadcasts +#net.ipv4.icmp_echo_ignore_broadcasts = 1 +# +# Ignore bogus ICMP errors +#net.ipv4.icmp_ignore_bogus_error_responses = 1 +# +# Do not accept ICMP redirects (prevent MITM attacks) +#net.ipv4.conf.all.accept_redirects = 0 +#net.ipv6.conf.all.accept_redirects = 0 +# _or_ +# Accept ICMP redirects only for gateways listed in our default +# gateway list (enabled by default) +# net.ipv4.conf.all.secure_redirects = 1 +# +# Do not send ICMP redirects (we are not a router) +#net.ipv4.conf.all.send_redirects = 0 +# +# Do not accept IP source route packets (we are not a router) +#net.ipv4.conf.all.accept_source_route = 0 +#net.ipv6.conf.all.accept_source_route = 0 +# +# Log Martian Packets +#net.ipv4.conf.all.log_martians = 1 +# + +#kernel.shmmax = 141762560 diff --git a/meta-fsl-ppc/recipes-append/procps/procps_3.2.8.bbappend b/meta-fsl-ppc/recipes-append/procps/procps_3.2.8.bbappend new file mode 100644 index 00000000..7f993346 --- /dev/null +++ b/meta-fsl-ppc/recipes-append/procps/procps_3.2.8.bbappend @@ -0,0 +1,3 @@ +PR .= "+${DISTRO}.0" + +FILESEXTRAPATHS_prepend := "${THISDIR}/files:" -- cgit v1.2.3-54-g00ecf From 69edfcbe23c0548c034bb0f7b621a51ae8580b17 Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Wed, 11 Apr 2012 20:33:17 +0000 Subject: disable udhcp in busybox to stop ip auto-assign Signed-off-by: Zhenhua Luo --- .../busybox/busybox-1.18.5/defconfig-maximum | 28 +++++++++++----------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/meta-fsl-ppc/recipes-append/busybox/busybox-1.18.5/defconfig-maximum b/meta-fsl-ppc/recipes-append/busybox/busybox-1.18.5/defconfig-maximum index a3feea64..b1f6243e 100644 --- a/meta-fsl-ppc/recipes-append/busybox/busybox-1.18.5/defconfig-maximum +++ b/meta-fsl-ppc/recipes-append/busybox/busybox-1.18.5/defconfig-maximum @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit # Busybox version: 1.18.5 -# Tue Mar 6 14:41:09 2012 +# Wed Apr 11 09:06:27 2012 # CONFIG_HAVE_DOT_CONFIG=y @@ -820,19 +820,19 @@ CONFIG_FEATURE_TRACEROUTE_VERBOSE=y # CONFIG_FEATURE_TRACEROUTE_USE_ICMP is not set CONFIG_TUNCTL=y CONFIG_FEATURE_TUNCTL_UG=y -CONFIG_UDHCPD=y -CONFIG_DHCPRELAY=y -CONFIG_DUMPLEASES=y -CONFIG_FEATURE_UDHCPD_WRITE_LEASES_EARLY=y -CONFIG_DHCPD_LEASES_FILE="/var/lib/misc/udhcpd.leases" -CONFIG_UDHCPC=y -CONFIG_FEATURE_UDHCPC_ARPING=y -CONFIG_FEATURE_UDHCP_PORT=y -CONFIG_UDHCP_DEBUG=9 -CONFIG_FEATURE_UDHCP_RFC3397=y -CONFIG_UDHCPC_DEFAULT_SCRIPT="/usr/share/udhcpc/default.script" -CONFIG_UDHCPC_SLACK_FOR_BUGGY_SERVERS=80 -CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS="-R -n" +# CONFIG_UDHCPD is not set +# CONFIG_DHCPRELAY is not set +# CONFIG_DUMPLEASES is not set +# CONFIG_FEATURE_UDHCPD_WRITE_LEASES_EARLY is not set +CONFIG_DHCPD_LEASES_FILE="" +# CONFIG_UDHCPC is not set +# CONFIG_FEATURE_UDHCPC_ARPING is not set +# CONFIG_FEATURE_UDHCP_PORT is not set +CONFIG_UDHCP_DEBUG=0 +# CONFIG_FEATURE_UDHCP_RFC3397 is not set +CONFIG_UDHCPC_DEFAULT_SCRIPT="" +CONFIG_UDHCPC_SLACK_FOR_BUGGY_SERVERS=0 +CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS="" CONFIG_UDPSVD=y CONFIG_VCONFIG=y CONFIG_WGET=y -- cgit v1.2.3-54-g00ecf From 10f1e474b9da866888dd99960b687db80447fa93 Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Fri, 13 Apr 2012 16:33:19 +0800 Subject: enable CHRT in busybox defconfig chrt (required for some of the RT test cases, 'chrt' allows to set scheduling prio/policy of a thread. Signed-off-by: Zhenhua Luo --- meta-fsl-ppc/recipes-append/busybox/busybox-1.18.5/defconfig-maximum | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-fsl-ppc/recipes-append/busybox/busybox-1.18.5/defconfig-maximum b/meta-fsl-ppc/recipes-append/busybox/busybox-1.18.5/defconfig-maximum index b1f6243e..6073476b 100644 --- a/meta-fsl-ppc/recipes-append/busybox/busybox-1.18.5/defconfig-maximum +++ b/meta-fsl-ppc/recipes-append/busybox/busybox-1.18.5/defconfig-maximum @@ -636,7 +636,7 @@ CONFIG_FEATURE_BEEP_LENGTH_MS=0 # CONFIG_FEATURE_CHAT_SEND_ESCAPES is not set # CONFIG_FEATURE_CHAT_VAR_ABORT_LEN is not set # CONFIG_FEATURE_CHAT_CLR_ABORT is not set -# CONFIG_CHRT is not set +CONFIG_CHRT=y CONFIG_CROND=y CONFIG_FEATURE_CROND_D=y CONFIG_FEATURE_CROND_CALL_SENDMAIL=y -- cgit v1.2.3-54-g00ecf From 0dd931a1146db3ed64761401312b011878254db8 Mon Sep 17 00:00:00 2001 From: Stefan Szabo Date: Fri, 13 Apr 2012 18:20:19 +0000 Subject: Added rule to rename to fm2-gb4 the 5th GB of 2nd FMan in P5040 Signed-off-by: Stefan Szabo --- .../recipes-append/netbase/files/71-fsl-dpaa-persistent-networking.rules | 1 + 1 file changed, 1 insertion(+) diff --git a/meta-fsl-ppc/recipes-append/netbase/files/71-fsl-dpaa-persistent-networking.rules b/meta-fsl-ppc/recipes-append/netbase/files/71-fsl-dpaa-persistent-networking.rules index ff7998f1..356c172f 100644 --- a/meta-fsl-ppc/recipes-append/netbase/files/71-fsl-dpaa-persistent-networking.rules +++ b/meta-fsl-ppc/recipes-append/netbase/files/71-fsl-dpaa-persistent-networking.rules @@ -9,6 +9,7 @@ SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe5e0000", NAME="fm2- SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe5e2000", NAME="fm2-gb1" SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe5e4000", NAME="fm2-gb2" SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe5e6000", NAME="fm2-gb3" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe5e8000", NAME="fm2-gb4" SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe5f0000", NAME="fm2-10g" # P1023 has its Fman @ different offsets -- cgit v1.2.3-54-g00ecf From bdb041016dc76f09aa6fefa0f2fdf03cc4fbd03e Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Wed, 18 Apr 2012 15:21:58 +0800 Subject: add e500mc support for oprofile Signed-off-by: Zhenhua Luo --- ...ile-0.9.6-add-e500mc-support-in-op_events.patch | 15 ++ .../files/oprofile-0.9.6-e500mc-support-2.patch | 35 +++++ .../files/oprofile-0.9.6-e500mc-support.patch | 169 +++++++++++++++++++++ .../oprofile/oprofile_0.9.6.bbappend | 8 + 4 files changed, 227 insertions(+) create mode 100644 meta-fsl-ppc/recipes-append/oprofile/files/oprofile-0.9.6-add-e500mc-support-in-op_events.patch create mode 100644 meta-fsl-ppc/recipes-append/oprofile/files/oprofile-0.9.6-e500mc-support-2.patch create mode 100644 meta-fsl-ppc/recipes-append/oprofile/files/oprofile-0.9.6-e500mc-support.patch create mode 100644 meta-fsl-ppc/recipes-append/oprofile/oprofile_0.9.6.bbappend diff --git a/meta-fsl-ppc/recipes-append/oprofile/files/oprofile-0.9.6-add-e500mc-support-in-op_events.patch b/meta-fsl-ppc/recipes-append/oprofile/files/oprofile-0.9.6-add-e500mc-support-in-op_events.patch new file mode 100644 index 00000000..aa220093 --- /dev/null +++ b/meta-fsl-ppc/recipes-append/oprofile/files/oprofile-0.9.6-add-e500mc-support-in-op_events.patch @@ -0,0 +1,15 @@ +Add e500mc support in libop/op_events.c + +Signed-off-by: Zhenhua Luo +=============================================================================== +diff -urN oprofile-0.9.6/libop/op_events.c oprofile-0.9.6-new/libop/op_events.c +--- oprofile-0.9.6/libop/op_events.c 2009-11-24 23:25:17.000000000 +0800 ++++ oprofile-0.9.6-new/libop/op_events.c 2010-08-19 11:13:15.000000000 +0800 +@@ -1062,6 +1062,7 @@ + + case CPU_PPC_E500: + case CPU_PPC_E500_2: ++ case CPU_PPC_E500MC: + case CPU_PPC_E300: + descr->name = "CPU_CLK"; + break; diff --git a/meta-fsl-ppc/recipes-append/oprofile/files/oprofile-0.9.6-e500mc-support-2.patch b/meta-fsl-ppc/recipes-append/oprofile/files/oprofile-0.9.6-e500mc-support-2.patch new file mode 100644 index 00000000..51288a57 --- /dev/null +++ b/meta-fsl-ppc/recipes-append/oprofile/files/oprofile-0.9.6-e500mc-support-2.patch @@ -0,0 +1,35 @@ +Add e500mc event in oprofile Makefile to add e500mc support + +Signed-off-by: Luo Zhenhua +=============================================================================== +diff -urN oprofile-0.9.6-old/events/Makefile.am oprofile-0.9.6/events/Makefile.am +--- oprofile-0.9.6-old/events/Makefile.am 2009-11-24 23:25:18.000000000 +0800 ++++ oprofile-0.9.6/events/Makefile.am 2010-08-13 15:23:24.000000000 +0800 +@@ -55,6 +55,7 @@ + mips/vr5500/events mips/vr5500/unit_masks \ + ppc/7450/events ppc/7450/unit_masks \ + ppc/e500/events ppc/e500/unit_masks \ ++ ppc/e500mc/events ppc/e500mc/unit_masks \ + ppc/e500v2/events ppc/e500v2/unit_masks \ + ppc/e300/events ppc/e300/unit_masks + +diff -urN oprofile-0.9.6-old/events/Makefile.in oprofile-0.9.6/events/Makefile.in +--- oprofile-0.9.6-old/events/Makefile.in 2009-11-24 23:25:48.000000000 +0800 ++++ oprofile-0.9.6/events/Makefile.in 2010-08-13 15:23:03.000000000 +0800 +@@ -258,6 +258,7 @@ + mips/vr5500/events mips/vr5500/unit_masks \ + ppc/7450/events ppc/7450/unit_masks \ + ppc/e500/events ppc/e500/unit_masks \ ++ ppc/e500mc/events ppc/e500mc/unit_masks \ + ppc/e500v2/events ppc/e500v2/unit_masks \ + ppc/e300/events ppc/e300/unit_masks + +@@ -312,7 +313,7 @@ + + + distdir: $(DISTFILES) +- $(mkdir_p) $(distdir)/alpha/ev4 $(distdir)/alpha/ev5 $(distdir)/alpha/ev6 $(distdir)/alpha/ev67 $(distdir)/alpha/pca56 $(distdir)/arm/armv6 $(distdir)/arm/armv7 $(distdir)/arm/mpcore $(distdir)/arm/xscale1 $(distdir)/arm/xscale2 $(distdir)/avr32 $(distdir)/i386/arch_perfmon $(distdir)/i386/athlon $(distdir)/i386/atom $(distdir)/i386/core $(distdir)/i386/core_2 $(distdir)/i386/core_i7 $(distdir)/i386/nehalem $(distdir)/i386/p4 $(distdir)/i386/p4-ht $(distdir)/i386/p6_mobile $(distdir)/i386/pii $(distdir)/i386/piii $(distdir)/i386/ppro $(distdir)/ia64/ia64 $(distdir)/ia64/itanium $(distdir)/ia64/itanium2 $(distdir)/mips/20K $(distdir)/mips/24K $(distdir)/mips/25K $(distdir)/mips/34K $(distdir)/mips/5K $(distdir)/mips/r10000 $(distdir)/mips/r12000 $(distdir)/mips/rm7000 $(distdir)/mips/rm9000 $(distdir)/mips/sb1 $(distdir)/mips/vr5432 $(distdir)/mips/vr5500 $(distdir)/ppc/7450 $(distdir)/ppc/e300 $(distdir)/ppc/e500 $(distdir)/ppc/e500v2 $(distdir)/ppc64/970 $(distdir)/ppc64/970MP $(distdir)/ppc64/cell-be $(distdir)/ppc64/ibm-compat-v1 $(distdir)/ppc64/pa6t $(distdir)/ppc64/power4 $(distdir)/ppc64/power5 $(distdir)/ppc64/power5+ $(distdir)/ppc64/power5++ $(distdir)/ppc64/power6 $(distdir)/ppc64/power7 $(distdir)/rtc $(distdir)/x86-64/family10 $(distdir)/x86-64/family11h $(distdir)/x86-64/hammer ++ $(mkdir_p) $(distdir)/alpha/ev4 $(distdir)/alpha/ev5 $(distdir)/alpha/ev6 $(distdir)/alpha/ev67 $(distdir)/alpha/pca56 $(distdir)/arm/armv6 $(distdir)/arm/armv7 $(distdir)/arm/mpcore $(distdir)/arm/xscale1 $(distdir)/arm/xscale2 $(distdir)/avr32 $(distdir)/i386/arch_perfmon $(distdir)/i386/athlon $(distdir)/i386/atom $(distdir)/i386/core $(distdir)/i386/core_2 $(distdir)/i386/core_i7 $(distdir)/i386/nehalem $(distdir)/i386/p4 $(distdir)/i386/p4-ht $(distdir)/i386/p6_mobile $(distdir)/i386/pii $(distdir)/i386/piii $(distdir)/i386/ppro $(distdir)/ia64/ia64 $(distdir)/ia64/itanium $(distdir)/ia64/itanium2 $(distdir)/mips/20K $(distdir)/mips/24K $(distdir)/mips/25K $(distdir)/mips/34K $(distdir)/mips/5K $(distdir)/mips/r10000 $(distdir)/mips/r12000 $(distdir)/mips/rm7000 $(distdir)/mips/rm9000 $(distdir)/mips/sb1 $(distdir)/mips/vr5432 $(distdir)/mips/vr5500 $(distdir)/ppc/7450 $(distdir)/ppc/e300 $(distdir)/ppc/e500 $(distdir)/ppc/e500mc $(distdir)/ppc/e500v2 $(distdir)/ppc64/970 $(distdir)/ppc64/970MP $(distdir)/ppc64/cell-be $(distdir)/ppc64/ibm-compat-v1 $(distdir)/ppc64/pa6t $(distdir)/ppc64/power4 $(distdir)/ppc64/power5 $(distdir)/ppc64/power5+ $(distdir)/ppc64/power5++ $(distdir)/ppc64/power6 $(distdir)/ppc64/power7 $(distdir)/rtc $(distdir)/x86-64/family10 $(distdir)/x86-64/family11h $(distdir)/x86-64/hammer + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ + list='$(DISTFILES)'; for file in $$list; do \ diff --git a/meta-fsl-ppc/recipes-append/oprofile/files/oprofile-0.9.6-e500mc-support.patch b/meta-fsl-ppc/recipes-append/oprofile/files/oprofile-0.9.6-e500mc-support.patch new file mode 100644 index 00000000..e2aaf22b --- /dev/null +++ b/meta-fsl-ppc/recipes-append/oprofile/files/oprofile-0.9.6-e500mc-support.patch @@ -0,0 +1,169 @@ +Add e500mc event in oprofile to add e500mc support + +Signed-off-by: George Stephen +=============================================================================== +diff -urN oprofile-0.9.6/events/ppc/e500mc/events oprofile-0.9.6-new/events/ppc/e500mc/events +--- oprofile-0.9.6/events/ppc/e500mc/events 1970-01-01 08:00:00.000000000 +0800 ++++ oprofile-0.9.6-new/events/ppc/e500mc/events 2010-08-16 17:57:49.000000000 +0800 +@@ -0,0 +1,120 @@ ++# e500mc Events ++# ++# Copyright (C) 2010 Freescale Semiconductor, Inc. ++# ++event:0x1 counters:0,1,2,3 um:zero minimum:100 name:CPU_CLK : Cycles ++event:0x2 counters:0,1,2,3 um:zero minimum:500 name:COMPLETED_INSNS : Completed Instructions (0, 1, or 2 per cycle) ++event:0x3 counters:0,1,2,3 um:zero minimum:500 name:COMPLETED_OPS : Completed Micro-ops (counts 2 for load/store w/update) ++event:0x4 counters:0,1,2,3 um:zero minimum:500 name:INSTRUCTION_FETCHES : Instruction fetches ++event:0x5 counters:0,1,2,3 um:zero minimum:500 name:DECODED_OPS : Micro-ops decoded ++event:0x8 counters:0,1,2,3 um:zero minimum:500 name:COMPLETED_BRANCHES : Branch Instructions completed ++event:0x9 counters:0,1,2,3 um:zero minimum:500 name:COMPLETED_LOAD_OPS : Load micro-ops completed ++event:0xa counters:0,1,2,3 um:zero minimum:500 name:COMPLETED_STORE_OPS : Store micro-ops completed ++event:0xb counters:0,1,2,3 um:zero minimum:500 name:COMPLETION_REDIRECTS : Number of completion buffer redirects ++event:0xc counters:0,1,2,3 um:zero minimum:500 name:BRANCHES_FINISHED : Branches finished ++event:0xd counters:0,1,2,3 um:zero minimum:500 name:TAKEN_BRANCHES_FINISHED : Taken branches finished ++event:0xe counters:0,1,2,3 um:zero minimum:500 name:BIFFED_BRANCHES_FINISHED : Biffed branches finished ++event:0xf counters:0,1,2,3 um:zero minimum:500 name:BRANCHES_MISPREDICTED : Branch instructions mispredicted due to direction, target, or IAB prediction ++event:0x10 counters:0,1,2,3 um:zero minimum:500 name:BRANCHES_MISPREDICTED_DIRECTION : Branches mispredicted due to direction prediction ++event:0x11 counters:0,1,2,3 um:zero minimum:500 name:BTB_HITS : Branches that hit in the BTB, or missed but are not taken ++event:0x12 counters:0,1,2,3 um:zero minimum:500 name:DECODE_STALLED : Cycles the instruction buffer was not empty, but 0 instructions decoded ++event:0x13 counters:0,1,2,3 um:zero minimum:500 name:ISSUE_STALLED : Cycles the issue buffer is not empty but 0 instructions issued ++event:0x14 counters:0,1,2,3 um:zero minimum:500 name:BRANCH_ISSUE_STALLED : Cycles the branch buffer is not empty but 0 instructions issued ++event:0x15 counters:0,1,2,3 um:zero minimum:500 name:SRS0_SCHEDULE_STALLED : Cycles SRS0 is not empty but 0 instructions scheduled ++event:0x16 counters:0,1,2,3 um:zero minimum:500 name:SRS1_SCHEDULE_STALLED : Cycles SRS1 is not empty but 0 instructions scheduled ++event:0x17 counters:0,1,2,3 um:zero minimum:500 name:VRS_SCHEDULE_STALLED : Cycles VRS is not empty but 0 instructions scheduled ++event:0x18 counters:0,1,2,3 um:zero minimum:500 name:LRS_SCHEDULE_STALLED : Cycles LRS is not empty but 0 instructions scheduled ++event:0x19 counters:0,1,2,3 um:zero minimum:500 name:BRS_SCHEDULE_STALLED : Cycles BRS is not empty but 0 instructions scheduled Load/Store, Data Cache, and dLFB Events ++event:0x1a counters:0,1,2,3 um:zero minimum:500 name:TOTAL_TRANSLATED : Total Ldst microops translated. ++event:0x1b counters:0,1,2,3 um:zero minimum:500 name:LOADS_TRANSLATED : Number of cacheable L* or EVL* microops translated. (This includes microops from load-multiple, load-update, and load-context instructions.) ++event:0x1c counters:0,1,2,3 um:zero minimum:500 name:STORES_TRANSLATED : Number of cacheable ST* or EVST* microops translated. (This includes microops from store-multiple, store-update, and save-context instructions.) ++event:0x1d counters:0,1,2,3 um:zero minimum:500 name:TOUCHES_TRANSLATED : Number of cacheable DCBT and DCBTST instructions translated (L1 only) (Does not count touches that are converted to nops i.e. exceptions, noncacheable, hid0[nopti] bit is set.) ++event:0x1e counters:0,1,2,3 um:zero minimum:500 name:CACHEOPS_TRANSLATED : Number of dcba, dcbf, dcbst, and dcbz instructions translated (e500 traps on dcbi) ++event:0x1f counters:0,1,2,3 um:zero minimum:500 name:CACHEINHIBITED_ACCESSES_TRANSLATED : Number of cache inhibited accesses translated ++event:0x20 counters:0,1,2,3 um:zero minimum:500 name:GUARDED_LOADS_TRANSLATED : Number of guarded loads translated ++event:0x21 counters:0,1,2,3 um:zero minimum:500 name:WRITETHROUGH_STORES_TRANSLATED : Number of write-through stores translated ++event:0x22 counters:0,1,2,3 um:zero minimum:500 name:MISALIGNED_ACCESSES_TRANSLATED : Number of misaligned load or store accesses translated. ++event:0x23 counters:0,1,2,3 um:zero minimum:500 name:TOTAL_ALLOCATED_DLFB : Total allocated to dLFB ++event:0x24 counters:0,1,2,3 um:zero minimum:500 name:LOADS_TRANSLATED_ALLOCATED_DLFB : Loads translated and allocated to dLFB (Applies to same class of instructions as loads translated.) ++event:0x25 counters:0,1,2,3 um:zero minimum:500 name:STORES_COMPLETED_ALLOCATED_DLFB : Stores completed and allocated to dLFB (Applies to same class of instructions as stores translated.) ++event:0x26 counters:0,1,2,3 um:zero minimum:500 name:TOUCHES_TRANSLATED_ALLOCATED_DLFB : Touches translated and allocated to dLFB (Applies to same class of instructions as touches translated.) ++event:0x27 counters:0,1,2,3 um:zero minimum:500 name:STORES_COMPLETED : Number of cacheable ST* or EVST* microops completed. (Applies to the same class of instructions as stores translated.) ++event:0x28 counters:0,1,2,3 um:zero minimum:500 name:DL1_LOCKS : Number of cache lines locked in the dL1. (Counts a lock even if an overlock condition is encountered.) ++event:0x29 counters:0,1,2,3 um:zero minimum:500 name:DL1_RELOADS : This is historically used to determine dcache miss rate (along with loads/stores completed). This counts dL1 reloads for any reason. ++event:0x2a counters:0,1,2,3 um:zero minimum:500 name:DL1_CASTOUTS : dL1 castouts. Does not count castouts due to DCBF. ++event:0x2b counters:0,1,2,3 um:zero minimum:500 name:DETECTED_REPLAYS : Times detected replay condition - Load miss with dLFB full. ++event:0x2c counters:0,1,2,3 um:zero minimum:500 name:LOAD_MISS_QUEUE_FULL_REPLAYS : Load miss with load queue full. ++event:0x2d counters:0,1,2,3 um:zero minimum:500 name:LOAD_GUARDED_MISS_NOT_LAST_REPLAYS : Load guarded miss when the load is not yet at the bottom of the completion buffer. ++event:0x2e counters:0,1,2,3 um:zero minimum:500 name:STORE_TRANSLATED_QUEUE_FULL_REPLAYS : Translate a store when the StQ is full. ++event:0x2f counters:0,1,2,3 um:zero minimum:500 name:ADDRESS_COLLISION_REPLAYS : Address collision. ++event:0x30 counters:0,1,2,3 um:zero minimum:500 name:DMMU_MISS_REPLAYS : DMMU_MISS_REPLAYS : DMMU miss. ++event:0x31 counters:0,1,2,3 um:zero minimum:500 name:DMMU_BUSY_REPLAYS : DMMU_BUSY_REPLAYS : DMMU busy. ++event:0x32 counters:0,1,2,3 um:zero minimum:500 name:SECOND_PART_MISALIGNED_AFTER_MISS_REPLAYS : Second part of misaligned access when first part missed in cache. ++event:0x33 counters:0,1,2,3 um:zero minimum:500 name:LOAD_MISS_DLFB_FULL_CYCLES : Cycles stalled on replay condition - Load miss with dLFB full. ++event:0x34 counters:0,1,2,3 um:zero minimum:500 name:LOAD_MISS_QUEUE_FULL_CYCLES : Cycles stalled on replay condition - Load miss with load queue full. ++event:0x35 counters:0,1,2,3 um:zero minimum:500 name:LOAD_GUARDED_MISS_NOT_LAST_CYCLES : Cycles stalled on replay condition - Load guarded miss when the load is not yet at the bottom of the completion buffer. ++event:0x36 counters:0,1,2,3 um:zero minimum:500 name:STORE_TRANSLATED_QUEUE_FULL_CYCLES : Cycles stalled on replay condition - Translate a store when the StQ is full. ++event:0x37 counters:0,1,2,3 um:zero minimum:500 name:ADDRESS_COLLISION_CYCLES : Cycles stalled on replay condition - Address collision. ++event:0x38 counters:0,1,2,3 um:zero minimum:500 name:DMMU_MISS_CYCLES : Cycles stalled on replay condition - DMMU miss. ++event:0x39 counters:0,1,2,3 um:zero minimum:500 name:DMMU_BUSY_CYCLES : Cycles stalled on replay condition - DMMU busy. ++event:0x3a counters:0,1,2,3 um:zero minimum:500 name:SECOND_PART_MISALIGNED_AFTER_MISS_CYCLES : Cycles stalled on replay condition - Second part of misaligned access when first part missed in cache. ++event:0x3b counters:0,1,2,3 um:zero minimum:500 name:IL1_LOCKS : Number of cache lines locked in the iL1. (Counts a lock even if an overlock condition is encountered.) ++event:0x3c counters:0,1,2,3 um:zero minimum:500 name:IL1_FETCH_RELOADS : This is historically used to determine icache miss rate (along with instructions completed) Reloads due to demand fetch. ++event:0x3d counters:0,1,2,3 um:zero minimum:500 name:FETCHES : Counts the number of fetches that write at least one instruction to the instruction buffer. (With instruction fetched, can used to compute instructions-per-fetch) ++event:0x3e counters:0,1,2,3 um:zero minimum:500 name:IMMU_TLB4K_RELOADS : iMMU TLB4K reloads ++event:0x3f counters:0,1,2,3 um:zero minimum:500 name:IMMU_VSP_RELOADS : iMMU VSP reloads ++event:0x40 counters:0,1,2,3 um:zero minimum:500 name:DMMU_TLB4K_RELOADS : dMMU TLB4K reloads ++event:0x41 counters:0,1,2,3 um:zero minimum:500 name:DMMU_VSP_RELOADS : dMMU VSP reloads ++event:0x42 counters:0,1,2,3 um:zero minimum:500 name:L2MMU_MISSES : Counts iTLB/dTLB error interrupt ++event:0x43 counters:0,1,2,3 um:zero minimum:500 name:BIU_MASTER_REQUESTS : Number of master transactions. (Number of master TSs.) ++event:0x44 counters:0,1,2,3 um:zero minimum:500 name:BIU_MASTER_I_REQUESTS : Number of master I-Side transactions. (Number of master I-Side TSs.) ++event:0x45 counters:0,1,2,3 um:zero minimum:500 name:BIU_MASTER_D_REQUESTS : Number of master D-Side transactions. (Number of master D-Side TSs.) ++event:0x46 counters:0,1,2,3 um:zero minimum:500 name:BIU_MASTER_D_CASTOUT_REQUESTS : Number of master D-Side non-program-demand castout transactions. This counts replacement pushes and snoop pushes. This does not count DCBF castouts. (Number of master D-side non-program-demand castout TSs.) ++event:0x48 counters:0,1,2,3 um:zero minimum:500 name:SNOOP_REQUESTS : Number of externally generated snoop requests. (Counts snoop TSs.) ++event:0x49 counters:0,1,2,3 um:zero minimum:500 name:SNOOP_HITS : Number of snoop hits on all D-side resources regardless of the cache state (modified, exclusive, or shared) ++event:0x4a counters:0,1,2,3 um:zero minimum:500 name:SNOOP_PUSHES : Number of snoop pushes from all D-side resources. (Counts snoop ARTRY/WOPs.) ++event:0x52 counters:0,1,2,3 um:zero minimum:500 name:PMC0_OVERFLOW : Counts the number of times PMC0[32] transitioned from 1 to 0. ++event:0x53 counters:0,1,2,3 um:zero minimum:500 name:PMC1_OVERFLOW : Counts the number of times PMC1[32] transitioned from 1 to 0. ++event:0x54 counters:0,1,2,3 um:zero minimum:500 name:PMC2_OVERFLOW : Counts the number of times PMC2[32] transitioned from 1 to 0. ++event:0x55 counters:0,1,2,3 um:zero minimum:500 name:PMC3_OVERFLOW : Counts the number of times PMC3[32] transitioned from 1 to 0. ++event:0x56 counters:0,1,2,3 um:zero minimum:500 name:INTERRUPTS : Number of interrupts taken ++event:0x57 counters:0,1,2,3 um:zero minimum:500 name:EXTERNAL_INTERRUPTS : Number of external input interrupts taken ++event:0x58 counters:0,1,2,3 um:zero minimum:500 name:CRITICAL_INTERRUPTS : Number of critical input interrupts taken ++event:0x59 counters:0,1,2,3 um:zero minimum:500 name:SC_TRAP_INTERRUPTS : Number of system call and trap interrupts ++event:0x5b counters:0,1,2,3 um:zero minimum:500 name:L2_LINEFILL_REQ : Number L2 Linefill requests ++event:0x5c counters:0,1,2,3 um:zero minimum:500 name:L2_VICTIM_SELECT : Number L2 Victim selects ++event:0x6e counters:0,1,2,3 um:zero minimum:500 name:L2_ACCESS : Number L2 cache accesses ++event:0x6f counters:0,1,2,3 um:zero minimum:500 name:L2_HIT_ACCESS : Number L2 hit cache accesses ++event:0x70 counters:0,1,2,3 um:zero minimum:500 name:L2_DATA_ACCESS : Number L2 data cache accesses ++event:0x71 counters:0,1,2,3 um:zero minimum:500 name:L2_HIT_DATA_ACCESS : Number L2 hit data cache accesses ++event:0x72 counters:0,1,2,3 um:zero minimum:500 name:L2_INST_ACCESS : Number L2 instruction cache accesses ++event:0x73 counters:0,1,2,3 um:zero minimum:500 name:L2_HIT_INST_ACCESS : Number L2 hit instruction cache accesses ++event:0x74 counters:0,1,2,3 um:zero minimum:500 name:L2_ALLOC : Number L2 cache allocations ++event:0x75 counters:0,1,2,3 um:zero minimum:500 name:L2_DATA_ALLOC : Number L2 data cache allocations ++event:0x76 counters:0,1,2,3 um:zero minimum:500 name:L2_DIRTY_DATA_ALLOC : Number L2 dirty data cache allocations ++event:0x77 counters:0,1,2,3 um:zero minimum:500 name:L2_INST_ALLOC : Number L2 instruction cache allocations ++event:0x78 counters:0,1,2,3 um:zero minimum:500 name:L2_UPDATE : Number L2 cache updates ++event:0x79 counters:0,1,2,3 um:zero minimum:500 name:L2_CLEAN_UPDATE : Number L2 cache clean updates ++event:0x7a counters:0,1,2,3 um:zero minimum:500 name:L2_DIRTY_UPDATE : Number L2 cache dirty updates ++event:0x7b counters:0,1,2,3 um:zero minimum:500 name:L2_CLEAN_REDU_UPDATE : Number L2 cache clean redundant updates ++event:0x7c counters:0,1,2,3 um:zero minimum:500 name:L2_DIRTY_REDU_UPDATE : Number L2 cache dirty redundant updates ++event:0x7d counters:0,1,2,3 um:zero minimum:500 name:L2_LOCKS : Number L2 cache locks ++event:0x7e counters:0,1,2,3 um:zero minimum:500 name:L2_CASTOUT : Number L2 cache castouts ++event:0x7f counters:0,1,2,3 um:zero minimum:500 name:L2_HIT_DATA_DIRTY : Number L2 cache data dirty hits ++event:0x82 counters:0,1,2,3 um:zero minimum:500 name:L2_INV_CLEAN : Number L2 cache invalidation of clean lines ++event:0x83 counters:0,1,2,3 um:zero minimum:500 name:L2_INV_INCOHER : Number L2 cache invalidation of incoherent lines ++event:0x84 counters:0,1,2,3 um:zero minimum:500 name:L2_INV_COHER : Number L2 cache invalidation of coherent lines ++event:0x94 counters:0,1,2,3 um:zero minimum:500 name:DVT0 : Detection of write to DEVENT with DVT0 set ++event:0x95 counters:0,1,2,3 um:zero minimum:500 name:DVT1 : Detection of write to DEVENT with DVT1 set ++event:0x96 counters:0,1,2,3 um:zero minimum:500 name:DVT2 : Detection of write to DEVENT with DVT2 set ++event:0x97 counters:0,1,2,3 um:zero minimum:500 name:DVT3 : Detection of write to DEVENT with DVT3 set ++event:0x98 counters:0,1,2,3 um:zero minimum:500 name:DVT4 : Detection of write to DEVENT with DVT4 set ++event:0x99 counters:0,1,2,3 um:zero minimum:500 name:DVT5 : Detection of write to DEVENT with DVT5 set ++event:0x9a counters:0,1,2,3 um:zero minimum:500 name:DVT6 : Detection of write to DEVENT with DVT6 set ++event:0x9b counters:0,1,2,3 um:zero minimum:500 name:DVT7 : Detection of write to DEVENT with DVT7 set ++event:0x9c counters:0,1,2,3 um:zero minimum:500 name:CYCLES_NEXUS_STALLED : Number of completion cycles stalled due to Nexus FIFO full ++event:0xb0 counters:0,1,2,3 um:zero minimum:500 name:DECORATED_LOAD : Number of decorated loads. ++event:0xb1 counters:0,1,2,3 um:zero minimum:500 name:DECORATED_STORE : Number of decorated stores ++event:0xb2 counters:0,1,2,3 um:zero minimum:500 name:LOAD_RETRY : Number of load retries ++event:0xb3 counters:0,1,2,3 um:zero minimum:500 name:STWCX_SUCCESS : Number of successful stwcx. instructions ++event:0xb4 counters:0,1,2,3 um:zero minimum:500 name:STWCX_UNSUCCESS : Number of unsuccessful stwcx. instructions +diff -urN oprofile-0.9.6/events/ppc/e500mc/unit_masks oprofile-0.9.6-new/events/ppc/e500mc/unit_masks +--- oprofile-0.9.6/events/ppc/e500mc/unit_masks 1970-01-01 08:00:00.000000000 +0800 ++++ oprofile-0.9.6-new/events/ppc/e500mc/unit_masks 2010-08-16 17:56:03.000000000 +0800 +@@ -0,0 +1,4 @@ ++# e500 possible unit masks ++# ++name:zero type:mandatory default:0x0 ++ 0x0 No unit mask +diff -urN oprofile-0.9.6/libop/op_cpu_type.c oprofile-0.9.6-new/libop/op_cpu_type.c +--- oprofile-0.9.6/libop/op_cpu_type.c 2009-11-24 23:25:17.000000000 +0800 ++++ oprofile-0.9.6-new/libop/op_cpu_type.c 2010-08-16 17:56:03.000000000 +0800 +@@ -82,6 +82,7 @@ + { "ppc64 compat version 1", "ppc64/ibm-compat-v1", CPU_PPC64_IBM_COMPAT_V1, 4 }, + { "Intel Core/i7", "i386/core_i7", CPU_CORE_I7, 4 }, + { "Intel Atom", "i386/atom", CPU_ATOM, 2 }, ++ { "e500mc", "ppc/e500mc", CPU_PPC_E500MC, 4 }, + }; + + static size_t const nr_cpu_descrs = sizeof(cpu_descrs) / sizeof(struct cpu_descr); +diff -urN oprofile-0.9.6/libop/op_cpu_type.h oprofile-0.9.6-new/libop/op_cpu_type.h +--- oprofile-0.9.6/libop/op_cpu_type.h 2009-11-24 23:25:17.000000000 +0800 ++++ oprofile-0.9.6-new/libop/op_cpu_type.h 2010-08-16 17:56:03.000000000 +0800 +@@ -79,6 +79,7 @@ + CPU_PPC64_IBM_COMPAT_V1, /**< IBM PPC64 processor compat mode version 1 */ + CPU_CORE_I7, /* Intel Core i7, Nehalem */ + CPU_ATOM, /* First generation Intel Atom */ ++ CPU_PPC_E500MC, /**< e500mc */ + MAX_CPU_TYPE + } op_cpu; + +diff -urN oprofile-0.9.6/utils/ophelp.c oprofile-0.9.6-new/utils/ophelp.c +--- oprofile-0.9.6/utils/ophelp.c 2009-11-24 23:25:17.000000000 +0800 ++++ oprofile-0.9.6-new/utils/ophelp.c 2010-08-16 17:56:03.000000000 +0800 +@@ -619,6 +619,7 @@ + + case CPU_PPC_E500: + case CPU_PPC_E500_2: ++ case CPU_PPC_E500MC: + event_doc = + "See PowerPC e500 Core Complex Reference Manual\n" + "Chapter 7: Performance Monitor\n" diff --git a/meta-fsl-ppc/recipes-append/oprofile/oprofile_0.9.6.bbappend b/meta-fsl-ppc/recipes-append/oprofile/oprofile_0.9.6.bbappend new file mode 100644 index 00000000..4feadf1d --- /dev/null +++ b/meta-fsl-ppc/recipes-append/oprofile/oprofile_0.9.6.bbappend @@ -0,0 +1,8 @@ +PR .= "+${DISTRO}.0" + +FILESEXTRAPATHS_prepend := "${THISDIR}/files:" + +SRC_URI += "file://oprofile-0.9.6-e500mc-support.patch \ + file://oprofile-0.9.6-e500mc-support-2.patch \ + file://oprofile-0.9.6-add-e500mc-support-in-op_events.patch \ +" -- cgit v1.2.3-54-g00ecf From 4be6114c264e9cc88f7e058bfbafeaca50b5059a Mon Sep 17 00:00:00 2001 From: Chunrong Guo Date: Wed, 18 Apr 2012 14:19:29 +0000 Subject: recipes-append/udev: add skip rules for inappropriate block devices Signed-off-by: Chunrong Guo --- meta-fsl-ppc/recipes-append/udev/files/local.rules | 39 ++++++++++++++++++++++ meta-fsl-ppc/recipes-append/udev/udev_164.bbappend | 4 +++ 2 files changed, 43 insertions(+) create mode 100644 meta-fsl-ppc/recipes-append/udev/files/local.rules create mode 100644 meta-fsl-ppc/recipes-append/udev/udev_164.bbappend diff --git a/meta-fsl-ppc/recipes-append/udev/files/local.rules b/meta-fsl-ppc/recipes-append/udev/files/local.rules new file mode 100644 index 00000000..9c134efa --- /dev/null +++ b/meta-fsl-ppc/recipes-append/udev/files/local.rules @@ -0,0 +1,39 @@ +# There are a number of modifiers that are allowed to be used in some +# of the different fields. They provide the following subsitutions: +# +# %n the "kernel number" of the device. +# For example, 'sda3' has a "kernel number" of '3' +# %e the smallest number for that name which does not matches an existing node +# %k the kernel name for the device +# %M the kernel major number for the device +# %m the kernel minor number for the device +# %b the bus id for the device +# %c the string returned by the PROGRAM +# %s{filename} the content of a sysfs attribute +# %% the '%' char itself +# + +KERNEL=="nbd*", GOTO="persistent_storage_end" + +# Media automounting +SUBSYSTEM=="block", ACTION=="add" RUN+="/etc/udev/scripts/mount.sh" +SUBSYSTEM=="block", ACTION=="remove" RUN+="/etc/udev/scripts/mount.sh" + +# Handle network interface setup +SUBSYSTEM=="net", ACTION=="add" RUN+="/etc/udev/scripts/network.sh" +SUBSYSTEM=="net", ACTION=="remove" RUN+="/etc/udev/scripts/network.sh" + +# The first framebuffer is symlinked to /dev/fb +KERNEL=="fb0", SYMLINK+="fb" + +# The first rtc device is symlinked to /dev/rtc +KERNEL=="rtc0", SYMLINK+="rtc" + +# Try and modprobe for drivers for new hardware +ACTION=="add", DEVPATH=="/devices/*", ENV{MODALIAS}=="?*", RUN+="/sbin/modprobe $env{MODALIAS}" + +# Create a symlink to any touchscreen input device +SUBSYSTEM=="input", KERNEL=="event[0-9]*", ATTRS{modalias}=="input:*-e0*,3,*a0,1,*18,*", SYMLINK+="input/touchscreen0" + +LABEL="persistent_storage_end" + diff --git a/meta-fsl-ppc/recipes-append/udev/udev_164.bbappend b/meta-fsl-ppc/recipes-append/udev/udev_164.bbappend new file mode 100644 index 00000000..7277e475 --- /dev/null +++ b/meta-fsl-ppc/recipes-append/udev/udev_164.bbappend @@ -0,0 +1,4 @@ +FILEXTRAPATHS_prepend := "${THISDIR}/files:" + +PR .= "+${DISTRO}.0" + -- cgit v1.2.3-54-g00ecf From 161947b736c04059945773b362b88bbea82afec3 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Fri, 20 Apr 2012 10:11:21 +0000 Subject: u-boot-sd: skip using boot-format to regenerate images u-boot images can be deployed to SD using boot-format on target board. This method can leave the SD partition not destoryed. For bug ENGR179814. Signed-off-by: Ting Liu --- meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb b/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb index 5060741b..1b256dad 100644 --- a/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb +++ b/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb @@ -5,7 +5,7 @@ PROVIDES = "virtual/bootloader" LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=1707d6db1d42237583f50183a5651ecb" -PR = "r14" +PR = "r15" INHIBIT_DEFAULT_DEPS = "1" DEPENDS = "boot-format-native virtual/${TARGET_PREFIX}gcc" @@ -55,6 +55,7 @@ do_compile () { [ "${MACHINE_ARCH}" == "p3060qds" ] || \ [ "${MACHINE_ARCH}" == "p4080ds" ] || \ [ "${MACHINE_ARCH}" == "p5020ds" ] || \ + [ "${UBOOT_TARGET}" == "u-boot-sd" ] || \ [ "${UBOOT_TARGET}" == "u-boot-nand" ]; then cp ${S}/${board}/u-boot.bin ${S}/${board}/${UBOOT_TARGET}.bin else -- cgit v1.2.3-54-g00ecf From 6f1569e0c88d80b622e324c4ffcb6ead8b7b8812 Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Tue, 24 Apr 2012 18:31:57 -0500 Subject: Disable ccache in FSL distro I'm trying to determine if ccache is causing issues with sstate and need to disable and it do a complete build for testing Signed-off-by: Matthew McClintock --- meta-fsl-ppc/conf/distro/fsl.conf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/meta-fsl-ppc/conf/distro/fsl.conf b/meta-fsl-ppc/conf/distro/fsl.conf index 32c86d45..50a82797 100644 --- a/meta-fsl-ppc/conf/distro/fsl.conf +++ b/meta-fsl-ppc/conf/distro/fsl.conf @@ -56,3 +56,5 @@ FREESCALE_GIT = "git://git.am.freescale.net" SYSVINIT_ENABLED_GETTYS = "" USE_VT = "" SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" + +CCACHE = "" -- cgit v1.2.3-54-g00ecf From d21c99d34af6c29283865e823cb5f42a4bdae83e Mon Sep 17 00:00:00 2001 From: Chunrong Guo Date: Wed, 25 Apr 2012 08:17:56 +0000 Subject: add p5040-64b support Signed-off-by: Chunrong Guo --- meta-fsl-ppc/conf/machine/p5040ds-64b.conf | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 meta-fsl-ppc/conf/machine/p5040ds-64b.conf diff --git a/meta-fsl-ppc/conf/machine/p5040ds-64b.conf b/meta-fsl-ppc/conf/machine/p5040ds-64b.conf new file mode 100644 index 00000000..3e4d66e5 --- /dev/null +++ b/meta-fsl-ppc/conf/machine/p5040ds-64b.conf @@ -0,0 +1,10 @@ +#@TYPE: Machine +#@DESCRIPTION: Machine configuration for running + +require e5500-64b.inc + +UBOOT_MACHINES = "P5040DS" + +KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p5040ds.dts " + +KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet64_smp_defconfig" -- cgit v1.2.3-54-g00ecf From 777075cbdfcfd11e5aefe9fc09df11e80581aebd Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Fri, 27 Apr 2012 11:28:02 -0500 Subject: remove p3060qds Signed-off-by: Matthew McClintock --- meta-fsl-ppc/conf/machine/p3060qds.conf | 9 --------- meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb | 1 - meta-fsl-ppc/recipes-tools/hv-cfg/hv-cfg_git.bb | 1 - meta-fsl-ppc/recipes-tools/rcw/rcw_git.bb | 1 - 4 files changed, 12 deletions(-) delete mode 100644 meta-fsl-ppc/conf/machine/p3060qds.conf diff --git a/meta-fsl-ppc/conf/machine/p3060qds.conf b/meta-fsl-ppc/conf/machine/p3060qds.conf deleted file mode 100644 index 4cfc85e9..00000000 --- a/meta-fsl-ppc/conf/machine/p3060qds.conf +++ /dev/null @@ -1,9 +0,0 @@ -#@TYPE: Machine -#@DESCRIPTION: Machine configuration for running - -require e500mc.inc - -UBOOT_MACHINES = "P3060QDS P3060QDS_NAND P3060QDS_SECURE_BOOT " -KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p3060qds.dts \ - ${S}/arch/powerpc/boot/dts/p3060qds-usdpaa.dts" -KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet32_smp_defconfig" diff --git a/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb b/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb index 1b256dad..027f304f 100644 --- a/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb +++ b/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb @@ -52,7 +52,6 @@ do_compile () { if [ "${MACHINE_ARCH}" == "p1023rds" ] || \ [ "${MACHINE_ARCH}" == "p2041rdb" ] || \ [ "${MACHINE_ARCH}" == "p3041ds" ] || \ - [ "${MACHINE_ARCH}" == "p3060qds" ] || \ [ "${MACHINE_ARCH}" == "p4080ds" ] || \ [ "${MACHINE_ARCH}" == "p5020ds" ] || \ [ "${UBOOT_TARGET}" == "u-boot-sd" ] || \ diff --git a/meta-fsl-ppc/recipes-tools/hv-cfg/hv-cfg_git.bb b/meta-fsl-ppc/recipes-tools/hv-cfg/hv-cfg_git.bb index 1207ba56..22c08a2f 100644 --- a/meta-fsl-ppc/recipes-tools/hv-cfg/hv-cfg_git.bb +++ b/meta-fsl-ppc/recipes-tools/hv-cfg/hv-cfg_git.bb @@ -6,7 +6,6 @@ PR = "r4" LIC_FILES_CHKSUM = " \ file://p2041rdb/LICENSE;md5=96dd72f26e9bb861de5c76c60e35e1bc \ file://p3041ds/LICENSE;md5=96dd72f26e9bb861de5c76c60e35e1bc \ - file://p3060qds/LICENSE;md5=96dd72f26e9bb861de5c76c60e35e1bc \ file://p4080ds/LICENSE;md5=96dd72f26e9bb861de5c76c60e35e1bc \ file://p5020ds/LICENSE;md5=96dd72f26e9bb861de5c76c60e35e1bc \ " diff --git a/meta-fsl-ppc/recipes-tools/rcw/rcw_git.bb b/meta-fsl-ppc/recipes-tools/rcw/rcw_git.bb index f36e142e..af8db7d2 100644 --- a/meta-fsl-ppc/recipes-tools/rcw/rcw_git.bb +++ b/meta-fsl-ppc/recipes-tools/rcw/rcw_git.bb @@ -6,7 +6,6 @@ PR = "r3" LIC_FILES_CHKSUM = " \ file://p2041rdb/LICENSE;md5=96dd72f26e9bb861de5c76c60e35e1bc \ file://p3041ds/LICENSE;md5=96dd72f26e9bb861de5c76c60e35e1bc \ - file://p3060qds/LICENSE;md5=96dd72f26e9bb861de5c76c60e35e1bc \ file://p4080ds/LICENSE;md5=96dd72f26e9bb861de5c76c60e35e1bc \ file://p5020ds/LICENSE;md5=96dd72f26e9bb861de5c76c60e35e1bc \ " -- cgit v1.2.3-54-g00ecf From dca0343753278903a1f7bb56d21122903d9ee764 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Fri, 27 Apr 2012 10:49:49 +0000 Subject: u-boot: package images to u-boot-images Signed-off-by: Ting Liu --- meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb b/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb index 027f304f..3d42aa8a 100644 --- a/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb +++ b/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb @@ -5,7 +5,7 @@ PROVIDES = "virtual/bootloader" LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=1707d6db1d42237583f50183a5651ecb" -PR = "r15" +PR = "r16" INHIBIT_DEFAULT_DEPS = "1" DEPENDS = "boot-format-native virtual/${TARGET_PREFIX}gcc" @@ -112,6 +112,7 @@ do_deploy(){ } addtask deploy after do_install -FILES_${PN} += "/boot" +PACKAGES += "${PN}-images" +FILES_${PN}-images += "/boot" ALLOW_EMPTY = "1" -- cgit v1.2.3-54-g00ecf From b63fb2567aee67d6a63ba4527ecd7d2483fa9c5f Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Tue, 1 May 2012 03:39:30 +0000 Subject: sysvinit-inittab.bbappend: remove and rely only on poky Signed-off-by: Matthew McClintock --- .../recipes-append/sysvinit/sysvinit-inittab_2.88dsf.bbappend | 8 -------- 1 file changed, 8 deletions(-) delete mode 100644 meta-fsl-ppc/recipes-append/sysvinit/sysvinit-inittab_2.88dsf.bbappend diff --git a/meta-fsl-ppc/recipes-append/sysvinit/sysvinit-inittab_2.88dsf.bbappend b/meta-fsl-ppc/recipes-append/sysvinit/sysvinit-inittab_2.88dsf.bbappend deleted file mode 100644 index 85e1cec6..00000000 --- a/meta-fsl-ppc/recipes-append/sysvinit/sysvinit-inittab_2.88dsf.bbappend +++ /dev/null @@ -1,8 +0,0 @@ - -do_install_append() { - echo "ll:1:respawn:${base_sbindir}/getty 115200 ttyS0 ">> ${D}${sysconfdir}/inittab - echo "l2:1:respawn:${base_sbindir}/getty 115200 ttyEHV0">> ${D}${sysconfdir}/inittab - -} -PR .= "+${DISTRO}.0" - -- cgit v1.2.3-54-g00ecf From bf2aa26b1145f1171b13ce2edaa3195b23e6806b Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Wed, 9 May 2012 09:33:32 +0000 Subject: define JFFS2_ERASEBLOCK size for all boards Signed-off-by: Ting Liu --- meta-fsl-ppc/conf/machine/mpc8536ds.conf | 3 +++ meta-fsl-ppc/conf/machine/mpc8544ds.conf | 3 +++ meta-fsl-ppc/conf/machine/mpc8548cds.conf | 3 +++ meta-fsl-ppc/conf/machine/mpc8572ds.conf | 3 +++ meta-fsl-ppc/conf/machine/p1010rdb.conf | 3 +++ meta-fsl-ppc/conf/machine/p1020mbg.conf | 3 +++ meta-fsl-ppc/conf/machine/p1020rdb.conf | 3 +++ meta-fsl-ppc/conf/machine/p1020utm.conf | 3 +++ meta-fsl-ppc/conf/machine/p1021rdb.conf | 3 +++ meta-fsl-ppc/conf/machine/p1022ds.conf | 3 +++ meta-fsl-ppc/conf/machine/p1023rds.conf | 3 +++ meta-fsl-ppc/conf/machine/p1024rdb.conf | 3 +++ meta-fsl-ppc/conf/machine/p1025rdb.conf | 3 +++ meta-fsl-ppc/conf/machine/p2020ds.conf | 3 +++ meta-fsl-ppc/conf/machine/p2020rdb.conf | 3 +++ meta-fsl-ppc/conf/machine/p2041rdb.conf | 3 +++ meta-fsl-ppc/conf/machine/p3041ds.conf | 3 +++ meta-fsl-ppc/conf/machine/p4080ds.conf | 3 +++ meta-fsl-ppc/conf/machine/p5020ds-64b.conf | 3 +++ meta-fsl-ppc/conf/machine/p5020ds.conf | 3 +++ meta-fsl-ppc/conf/machine/p5040ds-64b.conf | 3 +++ meta-fsl-ppc/conf/machine/p5040ds.conf | 3 +++ 22 files changed, 66 insertions(+) diff --git a/meta-fsl-ppc/conf/machine/mpc8536ds.conf b/meta-fsl-ppc/conf/machine/mpc8536ds.conf index e60292e3..21effbc9 100644 --- a/meta-fsl-ppc/conf/machine/mpc8536ds.conf +++ b/meta-fsl-ppc/conf/machine/mpc8536ds.conf @@ -8,3 +8,6 @@ BOOTFORMAT_CONFIG = "config_ddr2_512m_mpc8536ds_667M.dat" UBOOT_MACHINES = "MPC8536DS MPC8536DS_36BIT MPC8536DS_NAND MPC8536DS_SDCARD MPC8536DS_SPIFLASH" KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/mpc8536ds.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_defconfig" + +JFFS2_ERASEBLOCK = "0x20000" + diff --git a/meta-fsl-ppc/conf/machine/mpc8544ds.conf b/meta-fsl-ppc/conf/machine/mpc8544ds.conf index 39e2aaed..a9cfadc3 100644 --- a/meta-fsl-ppc/conf/machine/mpc8544ds.conf +++ b/meta-fsl-ppc/conf/machine/mpc8544ds.conf @@ -7,3 +7,6 @@ require e500v2.inc UBOOT_MACHINES = "MPC8544DS" KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/mpc8544ds.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_defconfig" + +JFFS2_ERASEBLOCK = "0x20000" + diff --git a/meta-fsl-ppc/conf/machine/mpc8548cds.conf b/meta-fsl-ppc/conf/machine/mpc8548cds.conf index 22cc5582..0d0dcf18 100644 --- a/meta-fsl-ppc/conf/machine/mpc8548cds.conf +++ b/meta-fsl-ppc/conf/machine/mpc8548cds.conf @@ -7,3 +7,6 @@ require e500v2.inc UBOOT_MACHINES = "MPC8548CDS" KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/mpc8548cds.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_defconfig" + +JFFS2_ERASEBLOCK = "0x20000" + diff --git a/meta-fsl-ppc/conf/machine/mpc8572ds.conf b/meta-fsl-ppc/conf/machine/mpc8572ds.conf index 164c0db3..277cdc41 100644 --- a/meta-fsl-ppc/conf/machine/mpc8572ds.conf +++ b/meta-fsl-ppc/conf/machine/mpc8572ds.conf @@ -6,3 +6,6 @@ require e500v2.inc UBOOT_MACHINES = "MPC8572DS" KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/mpc8572ds.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" + +JFFS2_ERASEBLOCK = "0x20000" + diff --git a/meta-fsl-ppc/conf/machine/p1010rdb.conf b/meta-fsl-ppc/conf/machine/p1010rdb.conf index 693eed12..362acd21 100644 --- a/meta-fsl-ppc/conf/machine/p1010rdb.conf +++ b/meta-fsl-ppc/conf/machine/p1010rdb.conf @@ -7,3 +7,6 @@ require e500v2.inc UBOOT_MACHINES = "P1010RDB_NAND" KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p1010rdb.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_defconfig" + +JFFS2_ERASEBLOCK = "0x20000" + diff --git a/meta-fsl-ppc/conf/machine/p1020mbg.conf b/meta-fsl-ppc/conf/machine/p1020mbg.conf index 5bb8436b..f2b9eafd 100644 --- a/meta-fsl-ppc/conf/machine/p1020mbg.conf +++ b/meta-fsl-ppc/conf/machine/p1020mbg.conf @@ -8,3 +8,6 @@ BOOTFORMAT_CONFIG = "config_ddr3_1gb_p1_p2_rdb_pc_800M.dat" UBOOT_MACHINES = "P1020MBG-PC P1020MBG-PC_SDCARD P1020MBG-PC_36BIT P1020MBG-PC_36BIT_SDCARD" KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p1020mbg.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" + +JFFS2_ERASEBLOCK = "0x20000" + diff --git a/meta-fsl-ppc/conf/machine/p1020rdb.conf b/meta-fsl-ppc/conf/machine/p1020rdb.conf index d9b6579f..80d113e2 100644 --- a/meta-fsl-ppc/conf/machine/p1020rdb.conf +++ b/meta-fsl-ppc/conf/machine/p1020rdb.conf @@ -8,3 +8,6 @@ UBOOT_MACHINES = " P1020RDB-PC P1020RDB-PC_SPIFLASH P1020RDB-PC_NAND P1020RDB-PC KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p1020rdb.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" + +JFFS2_ERASEBLOCK = "0x20000" + diff --git a/meta-fsl-ppc/conf/machine/p1020utm.conf b/meta-fsl-ppc/conf/machine/p1020utm.conf index eb3311f3..98b8ef36 100644 --- a/meta-fsl-ppc/conf/machine/p1020utm.conf +++ b/meta-fsl-ppc/conf/machine/p1020utm.conf @@ -8,3 +8,6 @@ BOOTFORMAT_CONFIG = "config_ddr3_1gb_p1_p2_rdb_pc_800M.dat" UBOOT_MACHINES = "P1020UTM-PC P1020UTM-PC_SDCARD P1020UTM-PC_36BIT P1020UTM-PC_36BIT_SDCARD" KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p1020utm.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" + +JFFS2_ERASEBLOCK = "0x20000" + diff --git a/meta-fsl-ppc/conf/machine/p1021rdb.conf b/meta-fsl-ppc/conf/machine/p1021rdb.conf index 8bdc4005..6da8ef3b 100644 --- a/meta-fsl-ppc/conf/machine/p1021rdb.conf +++ b/meta-fsl-ppc/conf/machine/p1021rdb.conf @@ -7,3 +7,6 @@ BOOTFORMAT_CONFIG = "config_ddr3_1gb_p1_p2_rdb_pc_800M.dat" UBOOT_MACHINES = "P1021RDB-PC P1021RDB-PC_NAND P1021RDB-PC_SDCARD P1021RDB-PC_SPIFLASH P1021RDB-PC_36BIT P1021RDB-PC_36BIT_SPIFLASH P1021RDB-PC_36BIT_NAND P1021RDB-PC_36BIT_SDCARD" KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p1021rdb.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" + +JFFS2_ERASEBLOCK = "0x20000" + diff --git a/meta-fsl-ppc/conf/machine/p1022ds.conf b/meta-fsl-ppc/conf/machine/p1022ds.conf index c9f18779..3071bae2 100644 --- a/meta-fsl-ppc/conf/machine/p1022ds.conf +++ b/meta-fsl-ppc/conf/machine/p1022ds.conf @@ -17,3 +17,6 @@ XSERVER = " \ xf86-input-keyboard \ xf86-video-fbdev \ " + +JFFS2_ERASEBLOCK = "0x20000" + diff --git a/meta-fsl-ppc/conf/machine/p1023rds.conf b/meta-fsl-ppc/conf/machine/p1023rds.conf index b3e7631e..522bde6c 100644 --- a/meta-fsl-ppc/conf/machine/p1023rds.conf +++ b/meta-fsl-ppc/conf/machine/p1023rds.conf @@ -6,3 +6,6 @@ require e500v2.inc UBOOT_MACHINES = "P1023RDS P1023RDS_NAND" KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p1023rds.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/85xx/p1023rds_defconfig" + +JFFS2_ERASEBLOCK = "0x10000" + diff --git a/meta-fsl-ppc/conf/machine/p1024rdb.conf b/meta-fsl-ppc/conf/machine/p1024rdb.conf index c562e035..aa6b22fe 100644 --- a/meta-fsl-ppc/conf/machine/p1024rdb.conf +++ b/meta-fsl-ppc/conf/machine/p1024rdb.conf @@ -8,3 +8,6 @@ BOOTFORMAT_CONFIG = "config_ddr3_1gb_p1_p2_rdb_pc_667M.dat" UBOOT_MACHINES = "P1024RDB P1024RDB_36BIT P1024RDB_NAND P1024RDB_SDCARD P1024RDB_SPIFLASH" KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p1024rdb.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" + +JFFS2_ERASEBLOCK = "0x20000" + diff --git a/meta-fsl-ppc/conf/machine/p1025rdb.conf b/meta-fsl-ppc/conf/machine/p1025rdb.conf index 6d2f4faa..27e3fa47 100644 --- a/meta-fsl-ppc/conf/machine/p1025rdb.conf +++ b/meta-fsl-ppc/conf/machine/p1025rdb.conf @@ -9,3 +9,6 @@ BOOTFORMAT_CONFIG = "config_ddr3_1gb_p1_p2_rdb_pc_667M.dat" UBOOT_MACHINES = "P1025RDB P1025RDB_36BIT P1025RDB_NAND P1025RDB_SDCARD P1025RDB_SPIFLASH" KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p1025rdb.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" + +JFFS2_ERASEBLOCK = "0x20000" + diff --git a/meta-fsl-ppc/conf/machine/p2020ds.conf b/meta-fsl-ppc/conf/machine/p2020ds.conf index 59288626..3059bdef 100644 --- a/meta-fsl-ppc/conf/machine/p2020ds.conf +++ b/meta-fsl-ppc/conf/machine/p2020ds.conf @@ -7,3 +7,6 @@ BOOTFORMAT_CONFIG = "config_sram_p2020ds.dat" UBOOT_MACHINES = "P2020DS P2020DS_36BIT P2020DS_DDR2 P2020DS_SDCARD P2020DS_SPIFLASH" KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p2020ds.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" + +JFFS2_ERASEBLOCK = "0x20000" + diff --git a/meta-fsl-ppc/conf/machine/p2020rdb.conf b/meta-fsl-ppc/conf/machine/p2020rdb.conf index 1cb2319c..976134aa 100644 --- a/meta-fsl-ppc/conf/machine/p2020rdb.conf +++ b/meta-fsl-ppc/conf/machine/p2020rdb.conf @@ -8,3 +8,6 @@ BOOTFORMAT_CONFIG = "config_ddr3_1gb_64bit_p2020rdb_pc.dat" UBOOT_MACHINES = " P2020RDB-PC P2020RDB-PC_NAND P2020RDB-PC_SDCARD P2020RDB-PC_SPIFLASH P2020RDB-PC_36BIT P2020RDB-PC_36BIT_SPIFLASH P2020RDB-PC_36BIT_NAND P2020RDB-PC_36BIT_SDCARD" KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p2020rdb.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" + +JFFS2_ERASEBLOCK = "0x20000" + diff --git a/meta-fsl-ppc/conf/machine/p2041rdb.conf b/meta-fsl-ppc/conf/machine/p2041rdb.conf index 014699e9..bc6b67a9 100644 --- a/meta-fsl-ppc/conf/machine/p2041rdb.conf +++ b/meta-fsl-ppc/conf/machine/p2041rdb.conf @@ -7,3 +7,6 @@ UBOOT_MACHINES = "P2041RDB P2041RDB_SECURE_BOOT P2041RDB_SDCARD P2041RDB_SPIFLAS KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p2041rdb.dts \ ${S}/arch/powerpc/boot/dts/p2041rdb-usdpaa.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet32_smp_defconfig" + +JFFS2_ERASEBLOCK = "0x10000" + diff --git a/meta-fsl-ppc/conf/machine/p3041ds.conf b/meta-fsl-ppc/conf/machine/p3041ds.conf index 2bdfb333..facfc4af 100644 --- a/meta-fsl-ppc/conf/machine/p3041ds.conf +++ b/meta-fsl-ppc/conf/machine/p3041ds.conf @@ -7,3 +7,6 @@ UBOOT_MACHINES = "P3041DS P3041DS_NAND P3041DS_SECURE_BOOT P3041DS_SRIOBOOT_MAST KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p3041ds.dts \ ${S}/arch/powerpc/boot/dts/p3041ds-usdpaa.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet32_smp_defconfig" + +JFFS2_ERASEBLOCK = "0x10000" + diff --git a/meta-fsl-ppc/conf/machine/p4080ds.conf b/meta-fsl-ppc/conf/machine/p4080ds.conf index 66a9554c..cebedc98 100644 --- a/meta-fsl-ppc/conf/machine/p4080ds.conf +++ b/meta-fsl-ppc/conf/machine/p4080ds.conf @@ -7,3 +7,6 @@ UBOOT_MACHINES = "P4080DS P4080DS_SECURE_BOOT P4080DS_SRIOBOOT_MASTER P4080DS_SR KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p4080ds.dts \ ${S}/arch/powerpc/boot/dts/p4080ds-usdpaa.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet32_smp_defconfig" + +JFFS2_ERASEBLOCK = "0x10000" + diff --git a/meta-fsl-ppc/conf/machine/p5020ds-64b.conf b/meta-fsl-ppc/conf/machine/p5020ds-64b.conf index 7333643c..e9e919df 100644 --- a/meta-fsl-ppc/conf/machine/p5020ds-64b.conf +++ b/meta-fsl-ppc/conf/machine/p5020ds-64b.conf @@ -8,3 +8,6 @@ UBOOT_MACHINES = "P5020DS" KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p5020ds.dts \ ${S}/arch/powerpc/boot/dts/p5020ds-usdpaa.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet64_smp_defconfig" + +JFFS2_ERASEBLOCK = "0x10000" + diff --git a/meta-fsl-ppc/conf/machine/p5020ds.conf b/meta-fsl-ppc/conf/machine/p5020ds.conf index 84de7577..ab640144 100644 --- a/meta-fsl-ppc/conf/machine/p5020ds.conf +++ b/meta-fsl-ppc/conf/machine/p5020ds.conf @@ -7,3 +7,6 @@ UBOOT_MACHINES = "P5020DS P5020DS_NAND P5020DS_SECURE_BOOT P5020DS_SRIOBOOT_MAST KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p5020ds.dts \ ${S}/arch/powerpc/boot/dts/p5020ds-usdpaa.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet32_smp_defconfig" + +JFFS2_ERASEBLOCK = "0x10000" + diff --git a/meta-fsl-ppc/conf/machine/p5040ds-64b.conf b/meta-fsl-ppc/conf/machine/p5040ds-64b.conf index 3e4d66e5..a0c56375 100644 --- a/meta-fsl-ppc/conf/machine/p5040ds-64b.conf +++ b/meta-fsl-ppc/conf/machine/p5040ds-64b.conf @@ -8,3 +8,6 @@ UBOOT_MACHINES = "P5040DS" KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p5040ds.dts " KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet64_smp_defconfig" + +JFFS2_ERASEBLOCK = "0x10000" + diff --git a/meta-fsl-ppc/conf/machine/p5040ds.conf b/meta-fsl-ppc/conf/machine/p5040ds.conf index f980b0c0..b8998cac 100644 --- a/meta-fsl-ppc/conf/machine/p5040ds.conf +++ b/meta-fsl-ppc/conf/machine/p5040ds.conf @@ -7,3 +7,6 @@ UBOOT_MACHINES = "P5040DS" KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p5040ds.dts \ ${S}/arch/powerpc/boot/dts/p5040ds-usdpaa.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet32_smp_defconfig" + +JFFS2_ERASEBLOCK = "0x10000" + -- cgit v1.2.3-54-g00ecf From 00411c64be1f13e7039d3f7927a41e55f7ae74aa Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Thu, 10 May 2012 10:02:07 +0000 Subject: meta-fsl-ppc-private: add testfloat Signed-off-by: Ting Liu --- .../testfloat/files/SoftFloat-powerpc-1.patch | 1427 +++++++++++++++++ .../files/TestFloat-powerpc-E500v2-SPE-1.patch | 1644 ++++++++++++++++++++ .../files/Yocto-replace-COMPILE_PREFIX-gcc.patch | 67 + .../recipes-test/testfloat/testfloat_2a.bb | 36 + 4 files changed, 3174 insertions(+) create mode 100644 meta-fsl-ppc/recipes-test/testfloat/files/SoftFloat-powerpc-1.patch create mode 100644 meta-fsl-ppc/recipes-test/testfloat/files/TestFloat-powerpc-E500v2-SPE-1.patch create mode 100644 meta-fsl-ppc/recipes-test/testfloat/files/Yocto-replace-COMPILE_PREFIX-gcc.patch create mode 100644 meta-fsl-ppc/recipes-test/testfloat/testfloat_2a.bb diff --git a/meta-fsl-ppc/recipes-test/testfloat/files/SoftFloat-powerpc-1.patch b/meta-fsl-ppc/recipes-test/testfloat/files/SoftFloat-powerpc-1.patch new file mode 100644 index 00000000..b6db2de2 --- /dev/null +++ b/meta-fsl-ppc/recipes-test/testfloat/files/SoftFloat-powerpc-1.patch @@ -0,0 +1,1427 @@ +This patch adds PowerPC support in SoftFloat. + +Signed-off-by: Ebony Zhu +Signed-off-by: Liu Yu +--- + SoftFloat-2b/processors/powerpc-GCC.h | 87 ++++ + SoftFloat-2b/softfloat/bits32/powerpc-GCC/Makefile | 26 ++ + SoftFloat-2b/softfloat/bits32/powerpc-GCC/milieu.h | 55 +++ + .../bits32/powerpc-GCC/softfloat-specialize | 252 ++++++++++++ + .../softfloat/bits32/powerpc-GCC/softfloat.h | 155 +++++++ + SoftFloat-2b/softfloat/bits64/powerpc-GCC/Makefile | 24 ++ + SoftFloat-2b/softfloat/bits64/powerpc-GCC/milieu.h | 55 +++ + .../bits64/powerpc-GCC/softfloat-specialize | 422 ++++++++++++++++++++ + .../softfloat/bits64/powerpc-GCC/softfloat.h | 269 +++++++++++++ + 9 files changed, 1345 insertions(+), 0 deletions(-) + create mode 100644 SoftFloat-2b/processors/powerpc-GCC.h + create mode 100644 SoftFloat-2b/softfloat/bits32/powerpc-GCC/Makefile + create mode 100644 SoftFloat-2b/softfloat/bits32/powerpc-GCC/milieu.h + create mode 100644 SoftFloat-2b/softfloat/bits32/powerpc-GCC/softfloat-specialize + create mode 100644 SoftFloat-2b/softfloat/bits32/powerpc-GCC/softfloat.h + create mode 100644 SoftFloat-2b/softfloat/bits64/powerpc-GCC/Makefile + create mode 100644 SoftFloat-2b/softfloat/bits64/powerpc-GCC/milieu.h + create mode 100644 SoftFloat-2b/softfloat/bits64/powerpc-GCC/softfloat-specialize + create mode 100644 SoftFloat-2b/softfloat/bits64/powerpc-GCC/softfloat.h + +diff --git a/SoftFloat-2b/processors/powerpc-GCC.h b/SoftFloat-2b/processors/powerpc-GCC.h +new file mode 100644 +index 0000000..002a786 +--- /dev/null ++++ b/SoftFloat-2b/processors/powerpc-GCC.h +@@ -0,0 +1,87 @@ ++/* ++ * This file is derived from processors/386-gcc.h, ++ * the copyright for that material belongs to the original owners. ++ * ++ * Additional material and changes where applicable is: ++ * Copyright (C) 2008 Freescale Semiconductor, Inc. All rights reserved. ++ * ++ * Author: Ebony Zhu, ++ * Yu Liu, ++ * ++ * THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort has ++ * been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT TIMES ++ * RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO PERSONS ++ * AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ALL LOSSES, ++ * COSTS, OR OTHER PROBLEMS THEY INCUR DUE TO THE SOFTWARE, AND WHO FURTHERMORE ++ * EFFECTIVELY INDEMNIFY JOHN HAUSER AND THE INTERNATIONAL COMPUTER SCIENCE ++ * INSTITUTE (possibly via similar legal warning) AGAINST ALL LOSSES, COSTS, OR ++ * OTHER PROBLEMS INCURRED BY THEIR CUSTOMERS AND CLIENTS DUE TO THE SOFTWARE. ++ */ ++ ++/*---------------------------------------------------------------------------- ++| One of the macros `BIGENDIAN' or `LITTLEENDIAN' must be defined. ++*----------------------------------------------------------------------------*/ ++#define BIGENDIAN ++ ++/*---------------------------------------------------------------------------- ++| The macro `BITS64' can be defined to indicate that 64-bit integer types are ++| supported by the compiler. ++*----------------------------------------------------------------------------*/ ++#define BITS32 ++ ++/*---------------------------------------------------------------------------- ++| Each of the following `typedef's defines the most convenient type that holds ++| integers of at least as many bits as specified. For example, `uint8' should ++| be the most convenient type that can hold unsigned integers of as many as ++| 8 bits. The `flag' type must be able to hold either a 0 or 1. For most ++| implementations of C, `flag', `uint8', and `int8' should all be `typedef'ed ++| to the same as `int'. ++*----------------------------------------------------------------------------*/ ++typedef int flag; ++typedef int uint8; ++typedef int int8; ++typedef int uint16; ++typedef int int16; ++typedef unsigned int uint32; ++typedef signed int int32; ++#ifdef BITS64 ++typedef unsigned long long int uint64; ++typedef signed long long int int64; ++#endif ++ ++/*---------------------------------------------------------------------------- ++| Each of the following `typedef's defines a type that holds integers ++| of _exactly_ the number of bits specified. For instance, for most ++| implementation of C, `bits16' and `sbits16' should be `typedef'ed to ++| `unsigned short int' and `signed short int' (or `short int'), respectively. ++*----------------------------------------------------------------------------*/ ++typedef unsigned char bits8; ++typedef signed char sbits8; ++typedef unsigned short int bits16; ++typedef signed short int sbits16; ++typedef unsigned int bits32; ++typedef signed int sbits32; ++#ifdef BITS64 ++typedef unsigned long long int bits64; ++typedef signed long long int sbits64; ++#endif ++ ++#ifdef BITS64 ++/*---------------------------------------------------------------------------- ++| The `LIT64' macro takes as its argument a textual integer literal and ++| if necessary ``marks'' the literal as having a 64-bit integer type. ++| For example, the GNU C Compiler (`gcc') requires that 64-bit literals be ++| appended with the letters `LL' standing for `long long', which is `gcc's ++| name for the 64-bit integer type. Some compilers may allow `LIT64' to be ++| defined as the identity macro: `#define LIT64( a ) a'. ++*----------------------------------------------------------------------------*/ ++#define LIT64( a ) a##LL ++#endif ++ ++/*---------------------------------------------------------------------------- ++| The macro `INLINE' can be used before functions that should be inlined. If ++| a compiler does not support explicit inlining, this macro should be defined ++| to be `static'. ++*----------------------------------------------------------------------------*/ ++#define INLINE extern inline ++ +diff --git a/SoftFloat-2b/softfloat/bits32/powerpc-GCC/Makefile b/SoftFloat-2b/softfloat/bits32/powerpc-GCC/Makefile +new file mode 100644 +index 0000000..28f1e33 +--- /dev/null ++++ b/SoftFloat-2b/softfloat/bits32/powerpc-GCC/Makefile +@@ -0,0 +1,26 @@ ++ ++PROCESSOR_H = ../../../processors/powerpc-GCC.h ++SOFTFLOAT_MACROS = ../softfloat-macros ++ ++OBJ = .o ++EXE = ++INCLUDES = -I. -I.. ++COMPILE_C = $(COMPILE_PREFIX)gcc -msoft-float -c -o $@ $(INCLUDES) -I- -O2 ++LINK = $(COMPILE_PREFIX)gcc -o $@ ++ ++ALL: softfloat$(OBJ) timesoftfloat$(EXE) ++ ++milieu.h: $(PROCESSOR_H) ++ touch milieu.h ++ ++softfloat$(OBJ): milieu.h softfloat.h softfloat-specialize $(SOFTFLOAT_MACROS) ../softfloat.c ++ $(COMPILE_C) ../softfloat.c ++ ++timesoftfloat$(OBJ): milieu.h softfloat.h ../timesoftfloat.c ++ $(COMPILE_C) ../timesoftfloat.c ++ ++timesoftfloat$(EXE): softfloat$(OBJ) timesoftfloat$(OBJ) ++ $(LINK) softfloat$(OBJ) timesoftfloat$(OBJ) ++ ++clean: ++ rm -f *.o timesoftfloat$(EXE) +diff --git a/SoftFloat-2b/softfloat/bits32/powerpc-GCC/milieu.h b/SoftFloat-2b/softfloat/bits32/powerpc-GCC/milieu.h +new file mode 100644 +index 0000000..d8b6012 +--- /dev/null ++++ b/SoftFloat-2b/softfloat/bits32/powerpc-GCC/milieu.h +@@ -0,0 +1,55 @@ ++/* ++ * This file is derived from softfloat/bits32/386-Win32-GCC/milieu.h, ++ * the copyright for that material belongs to the original owners. ++ * ++ * Additional material and changes where applicable is: ++ * Copyright (C) 2008 Freescale Semiconductor, Inc. All rights reserved. ++ * ++ * Author: Ebony Zhu, ++ * Yu Liu, ++ */ ++ ++/*============================================================================ ++ ++This C header file is part of the SoftFloat IEC/IEEE Floating-point Arithmetic ++Package, Release 2b. ++ ++Written by John R. Hauser. This work was made possible in part by the ++International Computer Science Institute, located at Suite 600, 1947 Center ++Street, Berkeley, California 94704. Funding was partially provided by the ++National Science Foundation under grant MIP-9311980. The original version ++of this code was written as part of a project to build a fixed-point vector ++processor in collaboration with the University of California at Berkeley, ++overseen by Profs. Nelson Morgan and John Wawrzynek. More information ++is available through the Web page `http://www.cs.berkeley.edu/~jhauser/ ++arithmetic/SoftFloat.html'. ++ ++THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort has ++been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT TIMES ++RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO PERSONS ++AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ALL LOSSES, ++COSTS, OR OTHER PROBLEMS THEY INCUR DUE TO THE SOFTWARE, AND WHO FURTHERMORE ++EFFECTIVELY INDEMNIFY JOHN HAUSER AND THE INTERNATIONAL COMPUTER SCIENCE ++INSTITUTE (possibly via similar legal warning) AGAINST ALL LOSSES, COSTS, OR ++OTHER PROBLEMS INCURRED BY THEIR CUSTOMERS AND CLIENTS DUE TO THE SOFTWARE. ++ ++Derivative works are acceptable, even for commercial purposes, so long as ++(1) the source code for the derivative work includes prominent notice that ++the work is derivative, and (2) the source code includes prominent notice with ++these four paragraphs for those parts of this code that are retained. ++ ++=============================================================================*/ ++ ++/*---------------------------------------------------------------------------- ++| Include common integer types and flags. ++*----------------------------------------------------------------------------*/ ++#include "../../../processors/powerpc-GCC.h" ++ ++/*---------------------------------------------------------------------------- ++| Symbolic Boolean literals. ++*----------------------------------------------------------------------------*/ ++enum { ++ FALSE = 0, ++ TRUE = 1 ++}; ++ +diff --git a/SoftFloat-2b/softfloat/bits32/powerpc-GCC/softfloat-specialize b/SoftFloat-2b/softfloat/bits32/powerpc-GCC/softfloat-specialize +new file mode 100644 +index 0000000..fd2caa4 +--- /dev/null ++++ b/SoftFloat-2b/softfloat/bits32/powerpc-GCC/softfloat-specialize +@@ -0,0 +1,252 @@ ++/* ++ * This file is derived from softfloat/bits32/386-Win32-GCC/softfloat-specialize, ++ * the copyright for that material belongs to the original owners. ++ * ++ * Additional material and changes where applicable is: ++ * Copyright (C) 2008 Freescale Semiconductor, Inc. All rights reserved. ++ * ++ * Author: Ebony Zhu, ++ * Yu Liu, ++ */ ++ ++/*============================================================================ ++ ++This C source fragment is part of the SoftFloat IEC/IEEE Floating-point ++Arithmetic Package, Release 2b. ++ ++Written by John R. Hauser. This work was made possible in part by the ++International Computer Science Institute, located at Suite 600, 1947 Center ++Street, Berkeley, California 94704. Funding was partially provided by the ++National Science Foundation under grant MIP-9311980. The original version ++of this code was written as part of a project to build a fixed-point vector ++processor in collaboration with the University of California at Berkeley, ++overseen by Profs. Nelson Morgan and John Wawrzynek. More information ++is available through the Web page `http://www.cs.berkeley.edu/~jhauser/ ++arithmetic/SoftFloat.html'. ++ ++THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort has ++been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT TIMES ++RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO PERSONS ++AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ALL LOSSES, ++COSTS, OR OTHER PROBLEMS THEY INCUR DUE TO THE SOFTWARE, AND WHO FURTHERMORE ++EFFECTIVELY INDEMNIFY JOHN HAUSER AND THE INTERNATIONAL COMPUTER SCIENCE ++INSTITUTE (possibly via similar legal warning) AGAINST ALL LOSSES, COSTS, OR ++OTHER PROBLEMS INCURRED BY THEIR CUSTOMERS AND CLIENTS DUE TO THE SOFTWARE. ++ ++Derivative works are acceptable, even for commercial purposes, so long as ++(1) the source code for the derivative work includes prominent notice that ++the work is derivative, and (2) the source code includes prominent notice with ++these four paragraphs for those parts of this code that are retained. ++ ++=============================================================================*/ ++ ++/*---------------------------------------------------------------------------- ++| Underflow tininess-detection mode, statically initialized to default value. ++| (The declaration in `softfloat.h' must match the `int8' type here.) ++*----------------------------------------------------------------------------*/ ++int8 float_detect_tininess = float_tininess_after_rounding; ++ ++/*---------------------------------------------------------------------------- ++| Raises the exceptions specified by `flags'. Floating-point traps can be ++| defined here if desired. It is currently not possible for such a trap ++| to substitute a result value. If traps are not implemented, this routine ++| should be simply `float_exception_flags |= flags;'. ++*----------------------------------------------------------------------------*/ ++ ++void float_raise( int8 flags ) ++{ ++ ++ float_exception_flags |= flags; ++ ++} ++ ++/*---------------------------------------------------------------------------- ++| Internal canonical NaN format. ++*----------------------------------------------------------------------------*/ ++typedef struct { ++ flag sign; ++ bits32 high, low; ++} commonNaNT; ++ ++/*---------------------------------------------------------------------------- ++| The pattern for a default generated single-precision NaN. ++*----------------------------------------------------------------------------*/ ++enum { ++ float32_default_nan = 0xFFFFFFFF ++}; ++ ++/*---------------------------------------------------------------------------- ++| Returns 1 if the single-precision floating-point value `a' is a NaN; ++| otherwise returns 0. ++*----------------------------------------------------------------------------*/ ++ ++flag float32_is_nan( float32 a ) ++{ ++ ++ return ( 0xFF000000 < (bits32) ( a<<1 ) ); ++ ++} ++ ++/*---------------------------------------------------------------------------- ++| Returns 1 if the single-precision floating-point value `a' is a signaling ++| NaN; otherwise returns 0. ++*----------------------------------------------------------------------------*/ ++ ++flag float32_is_signaling_nan( float32 a ) ++{ ++ ++ return ( ( ( a>>22 ) & 0x1FF ) == 0x1FE ) && ( a & 0x003FFFFF ); ++ ++} ++ ++/*---------------------------------------------------------------------------- ++| Returns the result of converting the single-precision floating-point NaN ++| `a' to the canonical NaN format. If `a' is a signaling NaN, the invalid ++| exception is raised. ++*----------------------------------------------------------------------------*/ ++ ++static commonNaNT float32ToCommonNaN( float32 a ) ++{ ++ commonNaNT z; ++ ++ if ( float32_is_signaling_nan( a ) ) float_raise( float_flag_invalid ); ++ z.sign = a>>31; ++ z.low = 0; ++ z.high = a<<9; ++ return z; ++ ++} ++ ++/*---------------------------------------------------------------------------- ++| Returns the result of converting the canonical NaN `a' to the single- ++| precision floating-point format. ++*----------------------------------------------------------------------------*/ ++ ++static float32 commonNaNToFloat32( commonNaNT a ) ++{ ++ ++ return ( ( (bits32) a.sign )<<31 ) | 0x7FC00000 | ( a.high>>9 ); ++ ++} ++ ++/*---------------------------------------------------------------------------- ++| Takes two single-precision floating-point values `a' and `b', one of which ++| is a NaN, and returns the appropriate NaN result. If either `a' or `b' is a ++| signaling NaN, the invalid exception is raised. ++*----------------------------------------------------------------------------*/ ++ ++static float32 propagateFloat32NaN( float32 a, float32 b ) ++{ ++ flag aIsNaN, aIsSignalingNaN, bIsNaN, bIsSignalingNaN; ++ ++ aIsNaN = float32_is_nan( a ); ++ aIsSignalingNaN = float32_is_signaling_nan( a ); ++ bIsNaN = float32_is_nan( b ); ++ bIsSignalingNaN = float32_is_signaling_nan( b ); ++ a |= 0x00400000; ++ b |= 0x00400000; ++ if ( aIsSignalingNaN | bIsSignalingNaN ) float_raise( float_flag_invalid ); ++ if ( aIsNaN ) { ++ return ( aIsSignalingNaN & bIsNaN ) ? b : a; ++ } ++ else { ++ return b; ++ } ++ ++} ++ ++/*---------------------------------------------------------------------------- ++| The pattern for a default generated double-precision NaN. The `high' and ++| `low' values hold the most- and least-significant bits, respectively. ++*----------------------------------------------------------------------------*/ ++enum { ++ float64_default_nan_high = 0xFFFFFFFF, ++ float64_default_nan_low = 0xFFFFFFFF ++}; ++ ++/*---------------------------------------------------------------------------- ++| Returns 1 if the double-precision floating-point value `a' is a NaN; ++| otherwise returns 0. ++*----------------------------------------------------------------------------*/ ++ ++flag float64_is_nan( float64 a ) ++{ ++ ++ return ++ ( 0xFFE00000 <= (bits32) ( a.high<<1 ) ) ++ && ( a.low || ( a.high & 0x000FFFFF ) ); ++ ++} ++ ++/*---------------------------------------------------------------------------- ++| Returns 1 if the double-precision floating-point value `a' is a signaling ++| NaN; otherwise returns 0. ++*----------------------------------------------------------------------------*/ ++ ++flag float64_is_signaling_nan( float64 a ) ++{ ++ ++ return ++ ( ( ( a.high>>19 ) & 0xFFF ) == 0xFFE ) ++ && ( a.low || ( a.high & 0x0007FFFF ) ); ++ ++} ++ ++/*---------------------------------------------------------------------------- ++| Returns the result of converting the double-precision floating-point NaN ++| `a' to the canonical NaN format. If `a' is a signaling NaN, the invalid ++| exception is raised. ++*----------------------------------------------------------------------------*/ ++ ++static commonNaNT float64ToCommonNaN( float64 a ) ++{ ++ commonNaNT z; ++ ++ if ( float64_is_signaling_nan( a ) ) float_raise( float_flag_invalid ); ++ z.sign = a.high>>31; ++ shortShift64Left( a.high, a.low, 12, &z.high, &z.low ); ++ return z; ++ ++} ++ ++/*---------------------------------------------------------------------------- ++| Returns the result of converting the canonical NaN `a' to the double- ++| precision floating-point format. ++*----------------------------------------------------------------------------*/ ++ ++static float64 commonNaNToFloat64( commonNaNT a ) ++{ ++ float64 z; ++ ++ shift64Right( a.high, a.low, 12, &z.high, &z.low ); ++ z.high |= ( ( (bits32) a.sign )<<31 ) | 0x7FF80000; ++ return z; ++ ++} ++ ++/*---------------------------------------------------------------------------- ++| Takes two double-precision floating-point values `a' and `b', one of which ++| is a NaN, and returns the appropriate NaN result. If either `a' or `b' is a ++| signaling NaN, the invalid exception is raised. ++*----------------------------------------------------------------------------*/ ++ ++static float64 propagateFloat64NaN( float64 a, float64 b ) ++{ ++ flag aIsNaN, aIsSignalingNaN, bIsNaN, bIsSignalingNaN; ++ ++ aIsNaN = float64_is_nan( a ); ++ aIsSignalingNaN = float64_is_signaling_nan( a ); ++ bIsNaN = float64_is_nan( b ); ++ bIsSignalingNaN = float64_is_signaling_nan( b ); ++ a.high |= 0x00080000; ++ b.high |= 0x00080000; ++ if ( aIsSignalingNaN | bIsSignalingNaN ) float_raise( float_flag_invalid ); ++ if ( aIsNaN ) { ++ return ( aIsSignalingNaN & bIsNaN ) ? b : a; ++ } ++ else { ++ return b; ++ } ++ ++} ++ +diff --git a/SoftFloat-2b/softfloat/bits32/powerpc-GCC/softfloat.h b/SoftFloat-2b/softfloat/bits32/powerpc-GCC/softfloat.h +new file mode 100644 +index 0000000..0015b8e +--- /dev/null ++++ b/SoftFloat-2b/softfloat/bits32/powerpc-GCC/softfloat.h +@@ -0,0 +1,155 @@ ++/* ++ * This file is derived from softfloat/bits32/386-Win32-GCC/softfloat.h, ++ * the copyright for that material belongs to the original owners. ++ * ++ * Additional material and changes where applicable is: ++ * Copyright (C) 2008 Freescale Semiconductor, Inc. All rights reserved. ++ * ++ * Author: Ebony Zhu, ++ * Yu Liu, ++ */ ++ ++/*============================================================================ ++ ++This C header file is part of the SoftFloat IEC/IEEE Floating-point Arithmetic ++Package, Release 2b. ++ ++Written by John R. Hauser. This work was made possible in part by the ++International Computer Science Institute, located at Suite 600, 1947 Center ++Street, Berkeley, California 94704. Funding was partially provided by the ++National Science Foundation under grant MIP-9311980. The original version ++of this code was written as part of a project to build a fixed-point vector ++processor in collaboration with the University of California at Berkeley, ++overseen by Profs. Nelson Morgan and John Wawrzynek. More information ++is available through the Web page `http://www.cs.berkeley.edu/~jhauser/ ++arithmetic/SoftFloat.html'. ++ ++THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort has ++been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT TIMES ++RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO PERSONS ++AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ALL LOSSES, ++COSTS, OR OTHER PROBLEMS THEY INCUR DUE TO THE SOFTWARE, AND WHO FURTHERMORE ++EFFECTIVELY INDEMNIFY JOHN HAUSER AND THE INTERNATIONAL COMPUTER SCIENCE ++INSTITUTE (possibly via similar legal warning) AGAINST ALL LOSSES, COSTS, OR ++OTHER PROBLEMS INCURRED BY THEIR CUSTOMERS AND CLIENTS DUE TO THE SOFTWARE. ++ ++Derivative works are acceptable, even for commercial purposes, so long as ++(1) the source code for the derivative work includes prominent notice that ++the work is derivative, and (2) the source code includes prominent notice with ++these four paragraphs for those parts of this code that are retained. ++ ++=============================================================================*/ ++ ++/*---------------------------------------------------------------------------- ++| Software IEC/IEEE floating-point types. ++*----------------------------------------------------------------------------*/ ++typedef bits32 float32; ++typedef struct { ++ bits32 high, low; ++} float64; ++ ++/*---------------------------------------------------------------------------- ++| Software IEC/IEEE floating-point underflow tininess-detection mode. ++*----------------------------------------------------------------------------*/ ++extern int8 float_detect_tininess; ++enum { ++ float_tininess_after_rounding = 0, ++ float_tininess_before_rounding = 1 ++}; ++ ++/*---------------------------------------------------------------------------- ++| Software IEC/IEEE floating-point rounding mode. ++*----------------------------------------------------------------------------*/ ++extern int8 float_rounding_mode; ++enum { ++ float_round_nearest_even = 0, ++ float_round_to_zero = 1, ++ float_round_up = 2, ++ float_round_down = 3 ++}; ++ ++/*---------------------------------------------------------------------------- ++| Software IEC/IEEE floating-point exception flags. ++*----------------------------------------------------------------------------*/ ++/* ++extern int8 float_exception_flags; ++enum { ++ float_flag_inexact = 1, ++ float_flag_underflow = 2, ++ float_flag_overflow = 4, ++ float_flag_divbyzero = 8, ++ float_flag_invalid = 16 ++}; ++*/ ++ ++extern int8 float_exception_flags; ++enum { ++ float_flag_inexact = 16, ++ float_flag_underflow = 2, ++ float_flag_overflow = 1, ++ float_flag_divbyzero = 4, ++ float_flag_invalid = 8 ++}; ++ ++/*---------------------------------------------------------------------------- ++| Routine to raise any or all of the software IEC/IEEE floating-point ++| exception flags. ++*----------------------------------------------------------------------------*/ ++void float_raise( int8 ); ++ ++/*---------------------------------------------------------------------------- ++| Software IEC/IEEE integer-to-floating-point conversion routines. ++*----------------------------------------------------------------------------*/ ++float32 int32_to_float32( int32 ); ++float64 int32_to_float64( int32 ); ++ ++/*---------------------------------------------------------------------------- ++| Software IEC/IEEE single-precision conversion routines. ++*----------------------------------------------------------------------------*/ ++int32 float32_to_int32( float32 ); ++int32 float32_to_int32_round_to_zero( float32 ); ++float64 float32_to_float64( float32 ); ++ ++/*---------------------------------------------------------------------------- ++| Software IEC/IEEE single-precision operations. ++*----------------------------------------------------------------------------*/ ++float32 float32_round_to_int( float32 ); ++float32 float32_add( float32, float32 ); ++float32 float32_sub( float32, float32 ); ++float32 float32_mul( float32, float32 ); ++float32 float32_div( float32, float32 ); ++float32 float32_rem( float32, float32 ); ++float32 float32_sqrt( float32 ); ++flag float32_eq( float32, float32 ); ++flag float32_le( float32, float32 ); ++flag float32_lt( float32, float32 ); ++flag float32_eq_signaling( float32, float32 ); ++flag float32_le_quiet( float32, float32 ); ++flag float32_lt_quiet( float32, float32 ); ++flag float32_is_signaling_nan( float32 ); ++ ++/*---------------------------------------------------------------------------- ++| Software IEC/IEEE double-precision conversion routines. ++*----------------------------------------------------------------------------*/ ++int32 float64_to_int32( float64 ); ++int32 float64_to_int32_round_to_zero( float64 ); ++float32 float64_to_float32( float64 ); ++ ++/*---------------------------------------------------------------------------- ++| Software IEC/IEEE double-precision operations. ++*----------------------------------------------------------------------------*/ ++float64 float64_round_to_int( float64 ); ++float64 float64_add( float64, float64 ); ++float64 float64_sub( float64, float64 ); ++float64 float64_mul( float64, float64 ); ++float64 float64_div( float64, float64 ); ++float64 float64_rem( float64, float64 ); ++float64 float64_sqrt( float64 ); ++flag float64_eq( float64, float64 ); ++flag float64_le( float64, float64 ); ++flag float64_lt( float64, float64 ); ++flag float64_eq_signaling( float64, float64 ); ++flag float64_le_quiet( float64, float64 ); ++flag float64_lt_quiet( float64, float64 ); ++flag float64_is_signaling_nan( float64 ); ++ +diff --git a/SoftFloat-2b/softfloat/bits64/powerpc-GCC/Makefile b/SoftFloat-2b/softfloat/bits64/powerpc-GCC/Makefile +new file mode 100644 +index 0000000..a5e2cc7 +--- /dev/null ++++ b/SoftFloat-2b/softfloat/bits64/powerpc-GCC/Makefile +@@ -0,0 +1,24 @@ ++ ++PROCESSOR_H = ../../../processors/powerpc-GCC.h ++SOFTFLOAT_MACROS = ../softfloat-macros ++ ++OBJ = .o ++EXE = ++INCLUDES = -I. -I.. ++COMPILE_C = $(COMPILE_PREFIX) -mcpu=8548 -mhard-float -mfloat-gprs=double -o $@ $(INCLUDES) -I- -O2 ++LINK = $(COMPILE_PREFIX) -o $@ ++ ++ALL: softfloat$(OBJ) timesoftfloat$(EXE) ++ ++milieu.h: $(PROCESSOR_H) ++ touch milieu.h ++ ++softfloat$(OBJ): milieu.h softfloat.h softfloat-specialize $(SOFTFLOAT_MACROS) ../softfloat.c ++ $(COMPILE_C) ../softfloat.c ++ ++timesoftfloat$(OBJ): milieu.h softfloat.h ../timesoftfloat.c ++ $(COMPILE_C) ../timesoftfloat.c ++ ++timesoftfloat$(EXE): softfloat$(OBJ) timesoftfloat$(OBJ) ++ $(LINK) softfloat$(OBJ) timesoftfloat$(OBJ) ++ +diff --git a/SoftFloat-2b/softfloat/bits64/powerpc-GCC/milieu.h b/SoftFloat-2b/softfloat/bits64/powerpc-GCC/milieu.h +new file mode 100644 +index 0000000..1b66490 +--- /dev/null ++++ b/SoftFloat-2b/softfloat/bits64/powerpc-GCC/milieu.h +@@ -0,0 +1,55 @@ ++/* ++ * This file is derived from softfloat/bits64/386-Win32-GCC/milieu.h, ++ * the copyright for that material belongs to the original owners. ++ * ++ * Additional material and changes where applicable is: ++ * Copyright (C) 2008 Freescale Semiconductor, Inc. All rights reserved. ++ * ++ * Author: Ebony Zhu, ++ * Yu Liu, ++ */ ++ ++/*============================================================================ ++ ++This C header file is part of the SoftFloat IEC/IEEE Floating-point Arithmetic ++Package, Release 2b. ++ ++Written by John R. Hauser. This work was made possible in part by the ++International Computer Science Institute, located at Suite 600, 1947 Center ++Street, Berkeley, California 94704. Funding was partially provided by the ++National Science Foundation under grant MIP-9311980. The original version ++of this code was written as part of a project to build a fixed-point vector ++processor in collaboration with the University of California at Berkeley, ++overseen by Profs. Nelson Morgan and John Wawrzynek. More information ++is available through the Web page `http://www.cs.berkeley.edu/~jhauser/ ++arithmetic/SoftFloat.html'. ++ ++THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort has ++been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT TIMES ++RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO PERSONS ++AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ALL LOSSES, ++COSTS, OR OTHER PROBLEMS THEY INCUR DUE TO THE SOFTWARE, AND WHO FURTHERMORE ++EFFECTIVELY INDEMNIFY JOHN HAUSER AND THE INTERNATIONAL COMPUTER SCIENCE ++INSTITUTE (possibly via similar legal warning) AGAINST ALL LOSSES, COSTS, OR ++OTHER PROBLEMS INCURRED BY THEIR CUSTOMERS AND CLIENTS DUE TO THE SOFTWARE. ++ ++Derivative works are acceptable, even for commercial purposes, so long as ++(1) the source code for the derivative work includes prominent notice that ++the work is derivative, and (2) the source code includes prominent notice with ++these four paragraphs for those parts of this code that are retained. ++ ++=============================================================================*/ ++ ++/*---------------------------------------------------------------------------- ++| Include common integer types and flags. ++*----------------------------------------------------------------------------*/ ++#include "../../../processors/SPARC-GCC.h" ++ ++/*---------------------------------------------------------------------------- ++| Symbolic Boolean literals. ++*----------------------------------------------------------------------------*/ ++enum { ++ FALSE = 0, ++ TRUE = 1 ++}; ++ +diff --git a/SoftFloat-2b/softfloat/bits64/powerpc-GCC/softfloat-specialize b/SoftFloat-2b/softfloat/bits64/powerpc-GCC/softfloat-specialize +new file mode 100644 +index 0000000..b1d0bc8 +--- /dev/null ++++ b/SoftFloat-2b/softfloat/bits64/powerpc-GCC/softfloat-specialize +@@ -0,0 +1,422 @@ ++/* ++ * This file is derived from softfloat/bits64/386-Win32-GCC/softfloat-specialize, ++ * the copyright for that material belongs to the original owners. ++ * ++ * Additional material and changes where applicable is: ++ * Copyright (C) 2008 Freescale Semiconductor, Inc. All rights reserved. ++ * ++ * Author: Ebony Zhu, ++ * Yu Liu, ++ */ ++ ++/*============================================================================ ++ ++This C source fragment is part of the SoftFloat IEC/IEEE Floating-point ++Arithmetic Package, Release 2b. ++ ++Written by John R. Hauser. This work was made possible in part by the ++International Computer Science Institute, located at Suite 600, 1947 Center ++Street, Berkeley, California 94704. Funding was partially provided by the ++National Science Foundation under grant MIP-9311980. The original version ++of this code was written as part of a project to build a fixed-point vector ++processor in collaboration with the University of California at Berkeley, ++overseen by Profs. Nelson Morgan and John Wawrzynek. More information ++is available through the Web page `http://www.cs.berkeley.edu/~jhauser/ ++arithmetic/SoftFloat.html'. ++ ++THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort has ++been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT TIMES ++RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO PERSONS ++AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ALL LOSSES, ++COSTS, OR OTHER PROBLEMS THEY INCUR DUE TO THE SOFTWARE, AND WHO FURTHERMORE ++EFFECTIVELY INDEMNIFY JOHN HAUSER AND THE INTERNATIONAL COMPUTER SCIENCE ++INSTITUTE (possibly via similar legal warning) AGAINST ALL LOSSES, COSTS, OR ++OTHER PROBLEMS INCURRED BY THEIR CUSTOMERS AND CLIENTS DUE TO THE SOFTWARE. ++ ++Derivative works are acceptable, even for commercial purposes, so long as ++(1) the source code for the derivative work includes prominent notice that ++the work is derivative, and (2) the source code includes prominent notice with ++these four paragraphs for those parts of this code that are retained. ++ ++=============================================================================*/ ++ ++/*---------------------------------------------------------------------------- ++| Underflow tininess-detection mode, statically initialized to default value. ++| (The declaration in `softfloat.h' must match the `int8' type here.) ++*----------------------------------------------------------------------------*/ ++int8 float_detect_tininess = float_tininess_before_rounding; ++ ++/*---------------------------------------------------------------------------- ++| Raises the exceptions specified by `flags'. Floating-point traps can be ++| defined here if desired. It is currently not possible for such a trap ++| to substitute a result value. If traps are not implemented, this routine ++| should be simply `float_exception_flags |= flags;'. ++*----------------------------------------------------------------------------*/ ++ ++void float_raise( int8 flags ) ++{ ++ ++ float_exception_flags |= flags; ++ ++} ++ ++/*---------------------------------------------------------------------------- ++| Internal canonical NaN format. ++*----------------------------------------------------------------------------*/ ++typedef struct { ++ flag sign; ++ bits64 high, low; ++} commonNaNT; ++ ++/*---------------------------------------------------------------------------- ++| The pattern for a default generated single-precision NaN. ++*----------------------------------------------------------------------------*/ ++#define float32_default_nan 0x7FFFFFFF ++ ++/*---------------------------------------------------------------------------- ++| Returns 1 if the single-precision floating-point value `a' is a NaN; ++| otherwise returns 0. ++*----------------------------------------------------------------------------*/ ++ ++flag float32_is_nan( float32 a ) ++{ ++ ++ return ( 0xFF000000 < (bits32) ( a<<1 ) ); ++ ++} ++ ++/*---------------------------------------------------------------------------- ++| Returns 1 if the single-precision floating-point value `a' is a signaling ++| NaN; otherwise returns 0. ++*----------------------------------------------------------------------------*/ ++ ++flag float32_is_signaling_nan( float32 a ) ++{ ++ ++ return ( ( ( a>>22 ) & 0x1FF ) == 0x1FE ) && ( a & 0x003FFFFF ); ++ ++} ++ ++/*---------------------------------------------------------------------------- ++| Returns the result of converting the single-precision floating-point NaN ++| `a' to the canonical NaN format. If `a' is a signaling NaN, the invalid ++| exception is raised. ++*----------------------------------------------------------------------------*/ ++ ++static commonNaNT float32ToCommonNaN( float32 a ) ++{ ++ commonNaNT z; ++ ++ if ( float32_is_signaling_nan( a ) ) float_raise( float_flag_invalid ); ++ z.sign = a>>31; ++ z.low = 0; ++ z.high = ( (bits64) a )<<41; ++ return z; ++ ++} ++ ++/*---------------------------------------------------------------------------- ++| Returns the result of converting the canonical NaN `a' to the single- ++| precision floating-point format. ++*----------------------------------------------------------------------------*/ ++ ++static float32 commonNaNToFloat32( commonNaNT a ) ++{ ++ ++ return ( ( (bits32) a.sign )<<31 ) | 0x7FC00000 | ( a.high>>41 ); ++ ++} ++ ++/*---------------------------------------------------------------------------- ++| Takes two single-precision floating-point values `a' and `b', one of which ++| is a NaN, and returns the appropriate NaN result. If either `a' or `b' is a ++| signaling NaN, the invalid exception is raised. ++*----------------------------------------------------------------------------*/ ++ ++static float32 propagateFloat32NaN( float32 a, float32 b ) ++{ ++ flag aIsNaN, aIsSignalingNaN, bIsNaN, bIsSignalingNaN; ++ ++ aIsNaN = float32_is_nan( a ); ++ aIsSignalingNaN = float32_is_signaling_nan( a ); ++ bIsNaN = float32_is_nan( b ); ++ bIsSignalingNaN = float32_is_signaling_nan( b ); ++ a |= 0x00400000; ++ b |= 0x00400000; ++ if ( aIsSignalingNaN | bIsSignalingNaN ) float_raise( float_flag_invalid ); ++ return bIsSignalingNaN ? b : aIsSignalingNaN ? a : bIsNaN ? b : a; ++ ++} ++ ++/*---------------------------------------------------------------------------- ++| The pattern for a default generated double-precision NaN. ++*----------------------------------------------------------------------------*/ ++#define float64_default_nan LIT64( 0x7FFFFFFFFFFFFFFF ) ++ ++/*---------------------------------------------------------------------------- ++| Returns 1 if the double-precision floating-point value `a' is a NaN; ++| otherwise returns 0. ++*----------------------------------------------------------------------------*/ ++ ++flag float64_is_nan( float64 a ) ++{ ++ ++ return ( LIT64( 0xFFE0000000000000 ) < (bits64) ( a<<1 ) ); ++ ++} ++ ++/*---------------------------------------------------------------------------- ++| Returns 1 if the double-precision floating-point value `a' is a signaling ++| NaN; otherwise returns 0. ++*----------------------------------------------------------------------------*/ ++ ++flag float64_is_signaling_nan( float64 a ) ++{ ++ ++ return ++ ( ( ( a>>51 ) & 0xFFF ) == 0xFFE ) ++ && ( a & LIT64( 0x0007FFFFFFFFFFFF ) ); ++ ++} ++ ++/*---------------------------------------------------------------------------- ++| Returns the result of converting the double-precision floating-point NaN ++| `a' to the canonical NaN format. If `a' is a signaling NaN, the invalid ++| exception is raised. ++*----------------------------------------------------------------------------*/ ++ ++static commonNaNT float64ToCommonNaN( float64 a ) ++{ ++ commonNaNT z; ++ ++ if ( float64_is_signaling_nan( a ) ) float_raise( float_flag_invalid ); ++ z.sign = a>>63; ++ z.low = 0; ++ z.high = a<<12; ++ return z; ++ ++} ++ ++/*---------------------------------------------------------------------------- ++| Returns the result of converting the canonical NaN `a' to the double- ++| precision floating-point format. ++*----------------------------------------------------------------------------*/ ++ ++static float64 commonNaNToFloat64( commonNaNT a ) ++{ ++ ++ return ++ ( ( (bits64) a.sign )<<63 ) ++ | LIT64( 0x7FF8000000000000 ) ++ | ( a.high>>12 ); ++ ++} ++ ++/*---------------------------------------------------------------------------- ++| Takes two double-precision floating-point values `a' and `b', one of which ++| is a NaN, and returns the appropriate NaN result. If either `a' or `b' is a ++| signaling NaN, the invalid exception is raised. ++*----------------------------------------------------------------------------*/ ++ ++static float64 propagateFloat64NaN( float64 a, float64 b ) ++{ ++ flag aIsNaN, aIsSignalingNaN, bIsNaN, bIsSignalingNaN; ++ ++ aIsNaN = float64_is_nan( a ); ++ aIsSignalingNaN = float64_is_signaling_nan( a ); ++ bIsNaN = float64_is_nan( b ); ++ bIsSignalingNaN = float64_is_signaling_nan( b ); ++ a |= LIT64( 0x0008000000000000 ); ++ b |= LIT64( 0x0008000000000000 ); ++ if ( aIsSignalingNaN | bIsSignalingNaN ) float_raise( float_flag_invalid ); ++ return bIsSignalingNaN ? b : aIsSignalingNaN ? a : bIsNaN ? b : a; ++ ++} ++ ++#ifdef FLOATX80 ++ ++/*---------------------------------------------------------------------------- ++| The pattern for a default generated extended double-precision NaN. The ++| `high' and `low' values hold the most- and least-significant bits, ++| respectively. ++*----------------------------------------------------------------------------*/ ++#define floatx80_default_nan_high 0x7FFF ++#define floatx80_default_nan_low LIT64( 0xFFFFFFFFFFFFFFFF ) ++ ++/*---------------------------------------------------------------------------- ++| Returns 1 if the extended double-precision floating-point value `a' is a ++| NaN; otherwise returns 0. ++*----------------------------------------------------------------------------*/ ++ ++flag floatx80_is_nan( floatx80 a ) ++{ ++ ++ return ( ( a.high & 0x7FFF ) == 0x7FFF ) && (bits64) ( a.low<<1 ); ++ ++} ++ ++/*---------------------------------------------------------------------------- ++| Returns 1 if the extended double-precision floating-point value `a' is a ++| signaling NaN; otherwise returns 0. ++*----------------------------------------------------------------------------*/ ++ ++flag floatx80_is_signaling_nan( floatx80 a ) ++{ ++ bits64 aLow; ++ ++ aLow = a.low & ~ LIT64( 0x4000000000000000 ); ++ return ++ ( ( a.high & 0x7FFF ) == 0x7FFF ) ++ && (bits64) ( aLow<<1 ) ++ && ( a.low == aLow ); ++ ++} ++ ++/*---------------------------------------------------------------------------- ++| Returns the result of converting the extended double-precision floating- ++| point NaN `a' to the canonical NaN format. If `a' is a signaling NaN, the ++| invalid exception is raised. ++*----------------------------------------------------------------------------*/ ++ ++static commonNaNT floatx80ToCommonNaN( floatx80 a ) ++{ ++ commonNaNT z; ++ ++ if ( floatx80_is_signaling_nan( a ) ) float_raise( float_flag_invalid ); ++ z.sign = a.high>>15; ++ z.low = 0; ++ z.high = a.low<<1; ++ return z; ++ ++} ++ ++/*---------------------------------------------------------------------------- ++| Returns the result of converting the canonical NaN `a' to the extended ++| double-precision floating-point format. ++*----------------------------------------------------------------------------*/ ++ ++static floatx80 commonNaNToFloatx80( commonNaNT a ) ++{ ++ floatx80 z; ++ ++ z.low = LIT64( 0xC000000000000000 ) | ( a.high>>1 ); ++ z.high = ( ( (bits16) a.sign )<<15 ) | 0x7FFF; ++ return z; ++ ++} ++ ++/*---------------------------------------------------------------------------- ++| Takes two extended double-precision floating-point values `a' and `b', one ++| of which is a NaN, and returns the appropriate NaN result. If either `a' or ++| `b' is a signaling NaN, the invalid exception is raised. ++*----------------------------------------------------------------------------*/ ++ ++static floatx80 propagateFloatx80NaN( floatx80 a, floatx80 b ) ++{ ++ flag aIsNaN, aIsSignalingNaN, bIsNaN, bIsSignalingNaN; ++ ++ aIsNaN = floatx80_is_nan( a ); ++ aIsSignalingNaN = floatx80_is_signaling_nan( a ); ++ bIsNaN = floatx80_is_nan( b ); ++ bIsSignalingNaN = floatx80_is_signaling_nan( b ); ++ a.low |= LIT64( 0xC000000000000000 ); ++ b.low |= LIT64( 0xC000000000000000 ); ++ if ( aIsSignalingNaN | bIsSignalingNaN ) float_raise( float_flag_invalid ); ++ return bIsSignalingNaN ? b : aIsSignalingNaN ? a : bIsNaN ? b : a; ++ ++} ++ ++#endif ++ ++#ifdef FLOAT128 ++ ++/*---------------------------------------------------------------------------- ++| The pattern for a default generated quadruple-precision NaN. The `high' and ++| `low' values hold the most- and least-significant bits, respectively. ++*----------------------------------------------------------------------------*/ ++#define float128_default_nan_high LIT64( 0x7FFFFFFFFFFFFFFF ) ++#define float128_default_nan_low LIT64( 0xFFFFFFFFFFFFFFFF ) ++ ++/*---------------------------------------------------------------------------- ++| Returns 1 if the quadruple-precision floating-point value `a' is a NaN; ++| otherwise returns 0. ++*----------------------------------------------------------------------------*/ ++ ++flag float128_is_nan( float128 a ) ++{ ++ ++ return ++ ( LIT64( 0xFFFE000000000000 ) <= (bits64) ( a.high<<1 ) ) ++ && ( a.low || ( a.high & LIT64( 0x0000FFFFFFFFFFFF ) ) ); ++ ++} ++ ++/*---------------------------------------------------------------------------- ++| Returns 1 if the quadruple-precision floating-point value `a' is a ++| signaling NaN; otherwise returns 0. ++*----------------------------------------------------------------------------*/ ++ ++flag float128_is_signaling_nan( float128 a ) ++{ ++ ++ return ++ ( ( ( a.high>>47 ) & 0xFFFF ) == 0xFFFE ) ++ && ( a.low || ( a.high & LIT64( 0x00007FFFFFFFFFFF ) ) ); ++ ++} ++ ++/*---------------------------------------------------------------------------- ++| Returns the result of converting the quadruple-precision floating-point NaN ++| `a' to the canonical NaN format. If `a' is a signaling NaN, the invalid ++| exception is raised. ++*----------------------------------------------------------------------------*/ ++ ++static commonNaNT float128ToCommonNaN( float128 a ) ++{ ++ commonNaNT z; ++ ++ if ( float128_is_signaling_nan( a ) ) float_raise( float_flag_invalid ); ++ z.sign = a.high>>63; ++ shortShift128Left( a.high, a.low, 16, &z.high, &z.low ); ++ return z; ++ ++} ++ ++/*---------------------------------------------------------------------------- ++| Returns the result of converting the canonical NaN `a' to the quadruple- ++| precision floating-point format. ++*----------------------------------------------------------------------------*/ ++ ++static float128 commonNaNToFloat128( commonNaNT a ) ++{ ++ float128 z; ++ ++ shift128Right( a.high, a.low, 16, &z.high, &z.low ); ++ z.high |= ( ( (bits64) a.sign )<<63 ) | LIT64( 0x7FFF800000000000 ); ++ return z; ++ ++} ++ ++/*---------------------------------------------------------------------------- ++| Takes two quadruple-precision floating-point values `a' and `b', one of ++| which is a NaN, and returns the appropriate NaN result. If either `a' or ++| `b' is a signaling NaN, the invalid exception is raised. ++*----------------------------------------------------------------------------*/ ++ ++static float128 propagateFloat128NaN( float128 a, float128 b ) ++{ ++ flag aIsNaN, aIsSignalingNaN, bIsNaN, bIsSignalingNaN; ++ ++ aIsNaN = float128_is_nan( a ); ++ aIsSignalingNaN = float128_is_signaling_nan( a ); ++ bIsNaN = float128_is_nan( b ); ++ bIsSignalingNaN = float128_is_signaling_nan( b ); ++ a.high |= LIT64( 0x0000800000000000 ); ++ b.high |= LIT64( 0x0000800000000000 ); ++ if ( aIsSignalingNaN | bIsSignalingNaN ) float_raise( float_flag_invalid ); ++ return bIsSignalingNaN ? b : aIsSignalingNaN ? a : bIsNaN ? b : a; ++ ++} ++ ++#endif ++ +diff --git a/SoftFloat-2b/softfloat/bits64/powerpc-GCC/softfloat.h b/SoftFloat-2b/softfloat/bits64/powerpc-GCC/softfloat.h +new file mode 100644 +index 0000000..5b7cb1c +--- /dev/null ++++ b/SoftFloat-2b/softfloat/bits64/powerpc-GCC/softfloat.h +@@ -0,0 +1,269 @@ ++/* ++ * This file is derived from softfloat/bits64/386-Win32-GCC/softfloat.h, ++ * the copyright for that material belongs to the original owners. ++ * ++ * Additional material and changes where applicable is: ++ * Copyright (C) 2008 Freescale Semiconductor, Inc. All rights reserved. ++ * ++ * Author: Ebony Zhu, ++ * Yu Liu, ++ */ ++ ++/*============================================================================ ++ ++This C header file is part of the SoftFloat IEC/IEEE Floating-point Arithmetic ++Package, Release 2b. ++ ++Written by John R. Hauser. This work was made possible in part by the ++International Computer Science Institute, located at Suite 600, 1947 Center ++Street, Berkeley, California 94704. Funding was partially provided by the ++National Science Foundation under grant MIP-9311980. The original version ++of this code was written as part of a project to build a fixed-point vector ++processor in collaboration with the University of California at Berkeley, ++overseen by Profs. Nelson Morgan and John Wawrzynek. More information ++is available through the Web page `http://www.cs.berkeley.edu/~jhauser/ ++arithmetic/SoftFloat.html'. ++ ++THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort has ++been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT TIMES ++RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO PERSONS ++AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ALL LOSSES, ++COSTS, OR OTHER PROBLEMS THEY INCUR DUE TO THE SOFTWARE, AND WHO FURTHERMORE ++EFFECTIVELY INDEMNIFY JOHN HAUSER AND THE INTERNATIONAL COMPUTER SCIENCE ++INSTITUTE (possibly via similar legal warning) AGAINST ALL LOSSES, COSTS, OR ++OTHER PROBLEMS INCURRED BY THEIR CUSTOMERS AND CLIENTS DUE TO THE SOFTWARE. ++ ++Derivative works are acceptable, even for commercial purposes, so long as ++(1) the source code for the derivative work includes prominent notice that ++the work is derivative, and (2) the source code includes prominent notice with ++these four paragraphs for those parts of this code that are retained. ++ ++=============================================================================*/ ++ ++/*---------------------------------------------------------------------------- ++| The macro `FLOATX80' must be defined to enable the extended double-precision ++| floating-point format `floatx80'. If this macro is not defined, the ++| `floatx80' type will not be defined, and none of the functions that either ++| input or output the `floatx80' type will be defined. The same applies to ++| the `FLOAT128' macro and the quadruple-precision format `float128'. ++*----------------------------------------------------------------------------*/ ++#define FLOATX80 ++#define FLOAT128 ++ ++/*---------------------------------------------------------------------------- ++| Software IEC/IEEE floating-point types. ++*----------------------------------------------------------------------------*/ ++typedef unsigned int float32; ++typedef unsigned long long float64; ++#ifdef FLOATX80 ++typedef struct { ++ unsigned short high; ++ unsigned long long low; ++} floatx80; ++#endif ++#ifdef FLOAT128 ++typedef struct { ++ unsigned long long high, low; ++} float128; ++#endif ++ ++/*---------------------------------------------------------------------------- ++| Software IEC/IEEE floating-point underflow tininess-detection mode. ++*----------------------------------------------------------------------------*/ ++extern int float_detect_tininess; ++enum { ++ float_tininess_after_rounding = 0, ++ float_tininess_before_rounding = 1 ++}; ++ ++/*---------------------------------------------------------------------------- ++| Software IEC/IEEE floating-point rounding mode. ++*----------------------------------------------------------------------------*/ ++extern int float_rounding_mode; ++enum { ++ float_round_nearest_even = 0, ++ float_round_to_zero = 1, ++ float_round_up = 2, ++ float_round_down = 3 ++}; ++ ++/*---------------------------------------------------------------------------- ++| Software IEC/IEEE floating-point exception flags. ++*----------------------------------------------------------------------------*/ ++extern int float_exception_flags; ++enum { ++ float_flag_inexact = 1, ++ float_flag_divbyzero = 2, ++ float_flag_underflow = 4, ++ float_flag_overflow = 8, ++ float_flag_invalid = 16 ++}; ++ ++/*---------------------------------------------------------------------------- ++| Routine to raise any or all of the software IEC/IEEE floating-point ++| exception flags. ++*----------------------------------------------------------------------------*/ ++void float_raise( int ); ++ ++/*---------------------------------------------------------------------------- ++| Software IEC/IEEE integer-to-floating-point conversion routines. ++*----------------------------------------------------------------------------*/ ++float32 int32_to_float32( int ); ++float64 int32_to_float64( int ); ++#ifdef FLOATX80 ++floatx80 int32_to_floatx80( int ); ++#endif ++#ifdef FLOAT128 ++float128 int32_to_float128( int ); ++#endif ++float32 int64_to_float32( long long ); ++float64 int64_to_float64( long long ); ++#ifdef FLOATX80 ++floatx80 int64_to_floatx80( long long ); ++#endif ++#ifdef FLOAT128 ++float128 int64_to_float128( long long ); ++#endif ++ ++/*---------------------------------------------------------------------------- ++| Software IEC/IEEE single-precision conversion routines. ++*----------------------------------------------------------------------------*/ ++int float32_to_int32( float32 ); ++int float32_to_int32_round_to_zero( float32 ); ++long long float32_to_int64( float32 ); ++long long float32_to_int64_round_to_zero( float32 ); ++float64 float32_to_float64( float32 ); ++#ifdef FLOATX80 ++floatx80 float32_to_floatx80( float32 ); ++#endif ++#ifdef FLOAT128 ++float128 float32_to_float128( float32 ); ++#endif ++ ++/*---------------------------------------------------------------------------- ++| Software IEC/IEEE single-precision operations. ++*----------------------------------------------------------------------------*/ ++float32 float32_round_to_int( float32 ); ++float32 float32_add( float32, float32 ); ++float32 float32_sub( float32, float32 ); ++float32 float32_mul( float32, float32 ); ++float32 float32_div( float32, float32 ); ++float32 float32_rem( float32, float32 ); ++float32 float32_sqrt( float32 ); ++int float32_eq( float32, float32 ); ++int float32_le( float32, float32 ); ++int float32_lt( float32, float32 ); ++int float32_eq_signaling( float32, float32 ); ++int float32_le_quiet( float32, float32 ); ++int float32_lt_quiet( float32, float32 ); ++int float32_is_signaling_nan( float32 ); ++ ++/*---------------------------------------------------------------------------- ++| Software IEC/IEEE double-precision conversion routines. ++*----------------------------------------------------------------------------*/ ++int float64_to_int32( float64 ); ++int float64_to_int32_round_to_zero( float64 ); ++long long float64_to_int64( float64 ); ++long long float64_to_int64_round_to_zero( float64 ); ++float32 float64_to_float32( float64 ); ++#ifdef FLOATX80 ++floatx80 float64_to_floatx80( float64 ); ++#endif ++#ifdef FLOAT128 ++float128 float64_to_float128( float64 ); ++#endif ++ ++/*---------------------------------------------------------------------------- ++| Software IEC/IEEE double-precision operations. ++*----------------------------------------------------------------------------*/ ++float64 float64_round_to_int( float64 ); ++float64 float64_add( float64, float64 ); ++float64 float64_sub( float64, float64 ); ++float64 float64_mul( float64, float64 ); ++float64 float64_div( float64, float64 ); ++float64 float64_rem( float64, float64 ); ++float64 float64_sqrt( float64 ); ++int float64_eq( float64, float64 ); ++int float64_le( float64, float64 ); ++int float64_lt( float64, float64 ); ++int float64_eq_signaling( float64, float64 ); ++int float64_le_quiet( float64, float64 ); ++int float64_lt_quiet( float64, float64 ); ++int float64_is_signaling_nan( float64 ); ++ ++#ifdef FLOATX80 ++ ++/*---------------------------------------------------------------------------- ++| Software IEC/IEEE extended double-precision conversion routines. ++*----------------------------------------------------------------------------*/ ++int floatx80_to_int32( floatx80 ); ++int floatx80_to_int32_round_to_zero( floatx80 ); ++long long floatx80_to_int64( floatx80 ); ++long long floatx80_to_int64_round_to_zero( floatx80 ); ++float32 floatx80_to_float32( floatx80 ); ++float64 floatx80_to_float64( floatx80 ); ++#ifdef FLOAT128 ++float128 floatx80_to_float128( floatx80 ); ++#endif ++ ++/*---------------------------------------------------------------------------- ++| Software IEC/IEEE extended double-precision rounding precision. Valid ++| values are 32, 64, and 80. ++*----------------------------------------------------------------------------*/ ++extern int floatx80_rounding_precision; ++ ++/*---------------------------------------------------------------------------- ++| Software IEC/IEEE extended double-precision operations. ++*----------------------------------------------------------------------------*/ ++floatx80 floatx80_round_to_int( floatx80 ); ++floatx80 floatx80_add( floatx80, floatx80 ); ++floatx80 floatx80_sub( floatx80, floatx80 ); ++floatx80 floatx80_mul( floatx80, floatx80 ); ++floatx80 floatx80_div( floatx80, floatx80 ); ++floatx80 floatx80_rem( floatx80, floatx80 ); ++floatx80 floatx80_sqrt( floatx80 ); ++int floatx80_eq( floatx80, floatx80 ); ++int floatx80_le( floatx80, floatx80 ); ++int floatx80_lt( floatx80, floatx80 ); ++int floatx80_eq_signaling( floatx80, floatx80 ); ++int floatx80_le_quiet( floatx80, floatx80 ); ++int floatx80_lt_quiet( floatx80, floatx80 ); ++int floatx80_is_signaling_nan( floatx80 ); ++ ++#endif ++ ++#ifdef FLOAT128 ++ ++/*---------------------------------------------------------------------------- ++| Software IEC/IEEE quadruple-precision conversion routines. ++*----------------------------------------------------------------------------*/ ++int float128_to_int32( float128 ); ++int float128_to_int32_round_to_zero( float128 ); ++long long float128_to_int64( float128 ); ++long long float128_to_int64_round_to_zero( float128 ); ++float32 float128_to_float32( float128 ); ++float64 float128_to_float64( float128 ); ++#ifdef FLOATX80 ++floatx80 float128_to_floatx80( float128 ); ++#endif ++ ++/*---------------------------------------------------------------------------- ++| Software IEC/IEEE quadruple-precision operations. ++*----------------------------------------------------------------------------*/ ++float128 float128_round_to_int( float128 ); ++float128 float128_add( float128, float128 ); ++float128 float128_sub( float128, float128 ); ++float128 float128_mul( float128, float128 ); ++float128 float128_div( float128, float128 ); ++float128 float128_rem( float128, float128 ); ++float128 float128_sqrt( float128 ); ++int float128_eq( float128, float128 ); ++int float128_le( float128, float128 ); ++int float128_lt( float128, float128 ); ++int float128_eq_signaling( float128, float128 ); ++int float128_le_quiet( float128, float128 ); ++int float128_lt_quiet( float128, float128 ); ++int float128_is_signaling_nan( float128 ); ++ ++#endif ++ +-- +1.5.4 + diff --git a/meta-fsl-ppc/recipes-test/testfloat/files/TestFloat-powerpc-E500v2-SPE-1.patch b/meta-fsl-ppc/recipes-test/testfloat/files/TestFloat-powerpc-E500v2-SPE-1.patch new file mode 100644 index 00000000..c34421cf --- /dev/null +++ b/meta-fsl-ppc/recipes-test/testfloat/files/TestFloat-powerpc-E500v2-SPE-1.patch @@ -0,0 +1,1644 @@ +This patch adds PowerPC E500v2 SPE support in TestFloat. +And it disables the testing for hardware that can not trigger SPE interrupt. + +Signed-off-by: Ebony Zhu +Signed-off-by: Liu Yu +--- + processors/POWERPC-gcc.h | 99 +++++ + testfloat/powerpc-linux-gcc/Makefile | 83 +++++ + testfloat/powerpc-linux-gcc/milieu.h | 71 ++++ + testfloat/powerpc-linux-gcc/systflags.c | 107 ++++++ + testfloat/powerpc-linux-gcc/systfloat.c | 595 +++++++++++++++++++++++++++++++ + testfloat/powerpc-linux-gcc/systmodes.c | 67 ++++ + testfloat/templates/Makefile | 18 +- + testfloat/templates/milieu.h | 2 +- + testfloat/testFunction.h | 2 +- + testfloat/testLoops.c | 216 +++++++++++ + 10 files changed, 1252 insertions(+), 8 deletions(-) + create mode 100644 processors/POWERPC-gcc.h + create mode 100644 testfloat/powerpc-linux-gcc/Makefile + create mode 100644 testfloat/powerpc-linux-gcc/milieu.h + create mode 100644 testfloat/powerpc-linux-gcc/systflags.c + create mode 100644 testfloat/powerpc-linux-gcc/systfloat.c + create mode 100644 testfloat/powerpc-linux-gcc/systmodes.c + +diff --git a/processors/POWERPC-gcc.h b/processors/POWERPC-gcc.h +new file mode 100644 +index 0000000..4201faa +--- /dev/null ++++ b/processors/POWERPC-gcc.h +@@ -0,0 +1,99 @@ ++/* ++ * This file is derived from processors/i386-GCC.h, ++ * the copyright for that material belongs to the original owners. ++ * ++ * Additional material and changes where applicable is: ++ * Copyright (C) 2008 Freescale Semiconductor, Inc. All rights reserved. ++ * ++ * Author: Ebony Zhu, ++ * Yu Liu, ++ * ++ * THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort has ++ * been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT TIMES ++ * RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO PERSONS ++ * AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ALL LOSSES, ++ * COSTS, OR OTHER PROBLEMS THEY INCUR DUE TO THE SOFTWARE, AND WHO FURTHERMORE ++ * EFFECTIVELY INDEMNIFY JOHN HAUSER AND THE INTERNATIONAL COMPUTER SCIENCE ++ * INSTITUTE (possibly via similar legal warning) AGAINST ALL LOSSES, COSTS, OR ++ * OTHER PROBLEMS INCURRED BY THEIR CUSTOMERS AND CLIENTS DUE TO THE SOFTWARE. ++ */ ++ ++/* ++------------------------------------------------------------------------------- ++One of the macros `BIGENDIAN' or `LITTLEENDIAN' must be defined. ++------------------------------------------------------------------------------- ++*/ ++#define BIGENDIAN ++ ++/* ++------------------------------------------------------------------------------- ++The macro `BITS64' can be defined to indicate that 64-bit integer types are ++supported by the compiler. ++------------------------------------------------------------------------------- ++*/ ++#undef BITS64 ++ ++/* ++------------------------------------------------------------------------------- ++Each of the following `typedef's defines the most convenient type that holds ++integers of at least as many bits as specified. For example, `uint8' should ++be the most convenient type that can hold unsigned integers of as many as ++8 bits. The `flag' type must be able to hold either a 0 or 1. For most ++implementations of C, `flag', `uint8', and `int8' should all be `typedef'ed ++to the same as `int'. ++------------------------------------------------------------------------------- ++*/ ++typedef int flag; ++typedef int uint8; ++typedef int int8; ++typedef int uint16; ++typedef int int16; ++typedef unsigned int uint32; ++typedef signed int int32; ++#ifdef BITS64 ++typedef unsigned long long int uint64; ++typedef signed long long int int64; ++#endif ++ ++/* ++------------------------------------------------------------------------------- ++Each of the following `typedef's defines a type that holds integers ++of _exactly_ the number of bits specified. For instance, for most ++implementation of C, `bits16' and `sbits16' should be `typedef'ed to ++`unsigned short int' and `signed short int' (or `short int'), respectively. ++------------------------------------------------------------------------------- ++*/ ++typedef unsigned char bits8; ++typedef signed char sbits8; ++typedef unsigned short int bits16; ++typedef signed short int sbits16; ++typedef unsigned int bits32; ++typedef signed int sbits32; ++#ifdef BITS64 ++typedef unsigned long long int bits64; ++typedef signed long long int sbits64; ++#endif ++ ++#ifdef BITS64 ++/* ++------------------------------------------------------------------------------- ++The `LIT64' macro takes as its argument a textual integer literal and ++if necessary ``marks'' the literal as having a 64-bit integer type. ++For example, the GNU C Compiler (`gcc') requires that 64-bit literals be ++appended with the letters `LL' standing for `long long', which is `gcc's ++name for the 64-bit integer type. Some compilers may allow `LIT64' to be ++defined as the identity macro: `#define LIT64( a ) a'. ++------------------------------------------------------------------------------- ++*/ ++#define LIT64( a ) a##LL ++#endif ++ ++/* ++------------------------------------------------------------------------------- ++The macro `INLINE' can be used before functions that should be inlined. If ++a compiler does not support explicit inlining, this macro should be defined ++to be `static'. ++------------------------------------------------------------------------------- ++*/ ++#define INLINE extern inline ++ +diff --git a/testfloat/powerpc-linux-gcc/Makefile b/testfloat/powerpc-linux-gcc/Makefile +new file mode 100644 +index 0000000..de50aad +--- /dev/null ++++ b/testfloat/powerpc-linux-gcc/Makefile +@@ -0,0 +1,83 @@ ++ ++PROCESSOR_H = ../../processors/POWERPC-gcc.h ++SOFTFLOAT_VERSION = bits32 ++TARGET = powerpc-GCC ++SOFTFLOAT_DIR = ../../SoftFloat-2b/softfloat/$(SOFTFLOAT_VERSION)/$(TARGET) ++ ++OBJ = .o ++EXE = ++INCLUDES = -I. -I.. -I$(SOFTFLOAT_DIR) ++ ++COMPILE_C = $(COMPILE_PREFIX)gcc -c -o $@ $(INCLUDES) -I- -O $(EXTRA_CFLAGS) ++ ++COMPILE_C_HARD = $(COMPILE_PREFIX)gcc -c -te500v2 -o $@ $(INCLUDES) ++ ++COMPILE_SLOWFLOAT_C = $(COMPILE_PREFIX)gcc -c -o $@ $(INCLUDES) -I- -O ++ ++LINK = $(COMPILE_PREFIX)gcc -lm -o $@ ++ ++SOFTFLOAT_H = $(SOFTFLOAT_DIR)/softfloat.h ++SOFTFLOAT_OBJ = $(SOFTFLOAT_DIR)/softfloat$(OBJ) ++ ++ALL: testsoftfloat$(EXE) testfloat$(EXE) ++ ++systmodes$(OBJ): milieu.h systmodes.c ++ $(COMPILE_C) systmodes.c ++ ++systflags$(OBJ): milieu.h ../systflags.h systflags.c ++ $(COMPILE_C) systflags.c ++ ++systfloat$(OBJ): milieu.h $(SOFTFLOAT_H) ../systfloat.h systfloat.c ++ $(COMPILE_C_HARD) systfloat.c ++ ++#------------------------------------------------------------------------------ ++# Probably O.K. below here. ++#------------------------------------------------------------------------------ ++ ++milieu.h: $(PROCESSOR_H) ++ touch milieu.h ++ ++fail$(OBJ): milieu.h ../fail.h ++ $(COMPILE_C) ../fail.c ++ ++random$(OBJ): milieu.h ../random.h ++ $(COMPILE_C) ../random.c ++ ++testCases$(OBJ): milieu.h ../fail.h ../random.h $(SOFTFLOAT_H) ../testCases.h ../testCases.c ++ $(COMPILE_C) ../testCases.c ++ ++writeHex$(OBJ): milieu.h $(SOFTFLOAT_H) ../writeHex.h ../writeHex.c ++ $(COMPILE_C) ../writeHex.c ++ ++testLoops$(OBJ): milieu.h $(SOFTFLOAT_H) ../testCases.h ../writeHex.h ../testLoops.h ../testLoops.c ++ $(COMPILE_C) ../testLoops.c ++ ++slowfloat$(OBJ): milieu.h $(SOFTFLOAT_H) ../slowfloat.h ../slowfloat-32.c ../slowfloat-64.c ../slowfloat.c ++ $(COMPILE_SLOWFLOAT_C) ../slowfloat.c ++ ++testsoftfloat$(OBJ): milieu.h ../fail.h $(SOFTFLOAT_H) ../testCases.h ../testLoops.h ../slowfloat.h ../testsoftfloat.c ++ $(COMPILE_C) ../testsoftfloat.c ++ ++testsoftfloat$(EXE): fail$(OBJ) random$(OBJ) $(SOFTFLOAT_OBJ) testCases$(OBJ) writeHex$(OBJ) testLoops$(OBJ) slowfloat$(OBJ) testsoftfloat$(OBJ) systflags$(OBJ) systmodes$(OBJ) ++ $(LINK) fail$(OBJ) random$(OBJ) $(SOFTFLOAT_OBJ) testCases$(OBJ) writeHex$(OBJ) testLoops$(OBJ) slowfloat$(OBJ) testsoftfloat$(OBJ) systflags$(OBJ) systmodes$(OBJ) ++ ++testFunction$(OBJ): milieu.h $(SOFTFLOAT_H) ../testCases.h ../testLoops.h ../systmodes.h ../systflags.h ../systfloat.h ../testFunction.h ../testFunction.c ++ $(COMPILE_C) ../testFunction.c ++ ++testfloat$(OBJ): milieu.h ../fail.h $(SOFTFLOAT_H) ../testCases.h ../testLoops.h ../systflags.h ../testFunction.h ../testfloat.c ++ $(COMPILE_C) ../testfloat.c ++ ++testfloat$(EXE): fail$(OBJ) random$(OBJ) $(SOFTFLOAT_OBJ) testCases$(OBJ) writeHex$(OBJ) testLoops$(OBJ) systmodes$(OBJ) systflags$(OBJ) systfloat$(OBJ) testFunction$(OBJ) testfloat$(OBJ) ++ $(LINK) fail$(OBJ) random$(OBJ) $(SOFTFLOAT_OBJ) testCases$(OBJ) writeHex$(OBJ) testLoops$(OBJ) systmodes$(OBJ) systflags$(OBJ) systfloat$(OBJ) testFunction$(OBJ) testfloat$(OBJ) ++ ++$(SOFTFLOAT_OBJ): ++ make -C $(SOFTFLOAT_DIR) ++ ++cp: ALL ++ cp testsoftfloat$(EXE) ../../test_softfloat$(EXE) ++ cp testfloat$(EXE) ../../test_float$(EXE) ++ ++clean: ++ make -C $(SOFTFLOAT_DIR) clean ++ rm -f *.o testfloat$(EXE) testsoftfloat$(EXE) ++ rm -f ../../test_softfloat$(EXE) ../../test_float$(EXE) +diff --git a/testfloat/powerpc-linux-gcc/milieu.h b/testfloat/powerpc-linux-gcc/milieu.h +new file mode 100644 +index 0000000..29d2b18 +--- /dev/null ++++ b/testfloat/powerpc-linux-gcc/milieu.h +@@ -0,0 +1,71 @@ ++/* ++ * This file is derived from testfloat/386-Win32-gcc/milieu.h, ++ * the copyright for that material belongs to the original owners. ++ * ++ * Additional material and changes where applicable is: ++ * Copyright (C) 2008 Freescale Semiconductor, Inc. All rights reserved. ++ * ++ * Author: Ebony Zhu, ++ * Yu Liu, ++ */ ++ ++/* ++=============================================================================== ++ ++This C header file is part of TestFloat, Release 2a, a package of programs ++for testing the correctness of floating-point arithmetic complying to the ++IEC/IEEE Standard for Floating-Point. ++ ++Written by John R. Hauser. More information is available through the Web ++page `http://HTTP.CS.Berkeley.EDU/~jhauser/arithmetic/TestFloat.html'. ++ ++THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort ++has been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT ++TIMES RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO ++PERSONS AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ANY ++AND ALL LOSSES, COSTS, OR OTHER PROBLEMS ARISING FROM ITS USE. ++ ++Derivative works are acceptable, even for commercial purposes, so long as ++(1) they include prominent notice that the work is derivative, and (2) they ++include prominent notice akin to these four paragraphs for those parts of ++this code that are retained. ++ ++=============================================================================== ++*/ ++ ++/* ++------------------------------------------------------------------------------- ++Include common integer types and flags. ++------------------------------------------------------------------------------- ++*/ ++#include "../../processors/POWERPC-gcc.h" ++/* ++------------------------------------------------------------------------------- ++If the `BITS64' macro is defined by the processor header file but the ++version of SoftFloat being used/tested is the 32-bit one (`bits32'), the ++`BITS64' macro must be undefined here. ++------------------------------------------------------------------------------- ++*/ ++ ++#undef BITS64 ++/* ++------------------------------------------------------------------------------- ++The macro `LONG_DOUBLE_IS_FLOATX80' can be defined to indicate that the ++C compiler supports the type `long double' as an extended double-precision ++format. Alternatively, the macro `LONG_DOUBLE_IS_FLOAT128' can be defined ++to indicate that `long double' is a quadruple-precision format. If neither ++of these macros is defined, `long double' will be ignored. ++------------------------------------------------------------------------------- ++#define LONG_DOUBLE_IS_FLOATX80 ++*/ ++ ++/* ++------------------------------------------------------------------------------- ++Symbolic Boolean literals. ++------------------------------------------------------------------------------- ++*/ ++enum { ++ FALSE = 0, ++ TRUE = 1 ++}; ++ +diff --git a/testfloat/powerpc-linux-gcc/systflags.c b/testfloat/powerpc-linux-gcc/systflags.c +new file mode 100644 +index 0000000..c382442 +--- /dev/null ++++ b/testfloat/powerpc-linux-gcc/systflags.c +@@ -0,0 +1,107 @@ ++/* ++ * This file is derived from testfloat/386-Win32-gcc/systflags.c, ++ * the copyright for that material belongs to the original owners. ++ * ++ * Additional material and changes where applicable is: ++ * Copyright (C) 2008 Freescale Semiconductor, Inc. All rights reserved. ++ * ++ * Author: Ebony Zhu, ++ * Yu Liu, ++ */ ++ ++/* ++=============================================================================== ++ ++This C source file is part of TestFloat, Release 2a, a package of programs ++for testing the correctness of floating-point arithmetic complying to the ++IEC/IEEE Standard for Floating-Point. ++ ++Written by John R. Hauser. More information is available through the Web ++page `http://HTTP.CS.Berkeley.EDU/~jhauser/arithmetic/TestFloat.html'. ++ ++THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort ++has been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT ++TIMES RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO ++PERSONS AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ANY ++AND ALL LOSSES, COSTS, OR OTHER PROBLEMS ARISING FROM ITS USE. ++ ++Derivative works are acceptable, even for commercial purposes, so long as ++(1) they include prominent notice that the work is derivative, and (2) they ++include prominent notice akin to these four paragraphs for those parts of ++this code that are retained. ++ ++=============================================================================== ++*/ ++ ++#include "milieu.h" ++#include "systflags.h" ++#include ++#include ++#include ++#include ++#include ++ ++#ifdef __SPE__ ++ ++#include ++ ++ ++#define SPE_FINV_ENABLE (1UL << 5) ++#define SPE_FDBZ_ENABLE (1UL << 4) ++#define SPE_FUNF_ENABLE (1UL << 3) ++#define SPE_FOVF_ENABLE (1UL << 2) ++ ++#define SPE_FG (1UL << 13) ++#define SPE_FX (1UL << 12) ++#define SPE_FINV (1UL << 11) ++#define SPE_FDBZ (1UL << 10) ++#define SPE_FUNF (1UL << 9) ++#define SPE_FOVF (1UL << 8) ++ ++#define SPE_FG_H (1UL << 29) ++#define SPE_FX_H (1UL << 28) ++#define SPE_FINV_H (1UL << 27) ++#define SPE_FDBZ_H (1UL << 26) ++#define SPE_FUNF_H (1UL << 25) ++#define SPE_FOVF_H (1UL << 24) ++ ++static int is_soft_emu = 0; ++ ++#endif ++/* ++------------------------------------------------------------------------------- ++Clears the system's IEC/IEEE floating-point exception flags. Returns the ++previous value of the flags. ++------------------------------------------------------------------------------- ++*/ ++extern int rounding; ++unsigned int spefscr = 0; ++ ++int8 syst_float_flags_clear( void ) ++{ ++#ifdef TEST_KERNEL_EMU ++ if( (spefscr & (SPE_FINV | SPE_FINV_H)) ++ || (spefscr & (SPE_FDBZ | SPE_FDBZ_H)) ++ || (spefscr & (SPE_FUNF | SPE_FUNF_H)) ++ || (spefscr & (SPE_FOVF | SPE_FOVF_H)) ++ || (spefscr & (SPE_FX | SPE_FG | SPE_FX_H | SPE_FG_H))){ ++ is_soft_emu = 1; ++ } else { ++ is_soft_emu = 0; ++ } ++#endif ++ __builtin_spe_mtspefscr(0x3c|(rounding & 0x3)); ++ ++ return ((spefscr>>17) & 0x1f); ++} ++ ++int syst_float_is_soft_emu(void) ++{ ++ int ret = 0; ++#ifdef TEST_KERNEL_EMU ++ ret = is_soft_emu; ++#endif ++ return ret; ++} ++ ++ +diff --git a/testfloat/powerpc-linux-gcc/systfloat.c b/testfloat/powerpc-linux-gcc/systfloat.c +new file mode 100644 +index 0000000..8d06f9f +--- /dev/null ++++ b/testfloat/powerpc-linux-gcc/systfloat.c +@@ -0,0 +1,595 @@ ++/* ++ * This file is derived from testfloat/systfloat.c, ++ * the copyright for that material belongs to the original owners. ++ * ++ * Additional material and changes where applicable is: ++ * Copyright (C) 2008 Freescale Semiconductor, Inc. All rights reserved. ++ * ++ * Author: Ebony Zhu, ++ * Yu Liu, ++ */ ++ ++/* ++=============================================================================== ++ ++This C source file is part of TestFloat, Release 2a, a package of programs ++for testing the correctness of floating-point arithmetic complying to the ++IEC/IEEE Standard for Floating-Point. ++ ++Written by John R. Hauser. More information is available through the Web ++page `http://HTTP.CS.Berkeley.EDU/~jhauser/arithmetic/TestFloat.html'. ++ ++THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort ++has been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT ++TIMES RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO ++PERSONS AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ANY ++AND ALL LOSSES, COSTS, OR OTHER PROBLEMS ARISING FROM ITS USE. ++ ++Derivative works are acceptable, even for commercial purposes, so long as ++(1) they include prominent notice that the work is derivative, and (2) they ++include prominent notice akin to these four paragraphs for those parts of ++this code that are retained. ++ ++=============================================================================== ++*/ ++ ++#include ++#include "milieu.h" ++#include "softfloat.h" ++#include "systfloat.h" ++ ++extern unsigned int spefscr; ++ ++float32 syst_int32_to_float32( int32 a ) ++{ ++ float32 z; ++ ++ *( (float *) &z ) = a; ++ spefscr = __builtin_spe_mfspefscr(); ++ return z; ++ ++} ++ ++float64 syst_int32_to_float64( int32 a ) ++{ ++ float64 z; ++ ++ *( (double *) &z ) = a; ++ spefscr = __builtin_spe_mfspefscr(); ++ return z; ++ ++} ++ ++#if defined( FLOATX80 ) && defined( LONG_DOUBLE_IS_FLOATX80 ) ++ ++floatx80 syst_int32_to_floatx80( int32 a ) ++{ ++ floatx80 z; ++ ++ *( (long double *) &z ) = a; ++ return z; ++ ++} ++ ++#endif ++ ++#if defined( FLOAT128 ) && defined( LONG_DOUBLE_IS_FLOAT128 ) ++ ++float128 syst_int32_to_float128( int32 a ) ++{ ++ float128 z; ++ ++ *( (long double *) &z ) = a; ++ return z; ++ ++} ++ ++#endif ++ ++#ifdef BITS64 ++ ++float32 syst_int64_to_float32( int64 a ) ++{ ++ float32 z; ++ ++ *( (float *) &z ) = a; ++ spefscr = __builtin_spe_mfspefscr(); ++ return z; ++ ++} ++ ++float64 syst_int64_to_float64( int64 a ) ++{ ++ float64 z; ++ ++ *( (double *) &z ) = a; ++ spefscr = __builtin_spe_mfspefscr(); ++ return z; ++ ++} ++ ++#if defined( FLOATX80 ) && defined( LONG_DOUBLE_IS_FLOATX80 ) ++ ++floatx80 syst_int64_to_floatx80( int64 a ) ++{ ++ floatx80 z; ++ ++ *( (long double *) &z ) = a; ++ return z; ++ ++} ++ ++#endif ++ ++#if defined( FLOAT128 ) && defined( LONG_DOUBLE_IS_FLOAT128 ) ++ ++float128 syst_int64_to_float128( int64 a ) ++{ ++ float128 z; ++ ++ *( (long double *) &z ) = a; ++ return z; ++ ++} ++ ++#endif ++ ++#endif ++ ++int32 syst_float32_to_int32_round_to_zero( float32 a ) ++{ ++ int32 z = *( (float *) &a ); ++ spefscr = __builtin_spe_mfspefscr(); ++ ++ return z; ++ ++} ++ ++#ifdef BITS64 ++ ++int64 syst_float32_to_int64_round_to_zero( float32 a ) ++{ ++ int64 z = *( (float *) &a ); ++ spefscr = __builtin_spe_mfspefscr(); ++ return z; ++ ++} ++ ++#endif ++ ++float64 syst_float32_to_float64( float32 a ) ++{ ++ float64 z; ++ ++ *( (double *) &z ) = *( (float *) &a ); ++ spefscr = __builtin_spe_mfspefscr(); ++ return z; ++ ++} ++ ++#if defined( FLOATX80 ) && defined( LONG_DOUBLE_IS_FLOATX80 ) ++ ++floatx80 syst_float32_to_floatx80( float32 a ) ++{ ++ floatx80 z; ++ ++ *( (long double *) &z ) = *( (float *) &a ); ++ return z; ++ ++} ++ ++#endif ++ ++#if defined( FLOAT128 ) && defined( LONG_DOUBLE_IS_FLOAT128 ) ++ ++float128 syst_float32_to_float128( float32 a ) ++{ ++ float128 z; ++ ++ *( (long double *) &z ) = *( (float *) &a ); ++ return z; ++ ++} ++ ++#endif ++ ++float32 syst_float32_add( float32 a, float32 b ) ++{ ++ float32 z; ++ ++ *( (float *) &z ) = *( (float *) &a ) + *( (float *) &b ); ++ spefscr = __builtin_spe_mfspefscr(); ++ return z; ++ ++} ++ ++float32 syst_float32_sub( float32 a, float32 b ) ++{ ++ float32 z; ++ ++ *( (float *) &z ) = *( (float *) &a ) - *( (float *) &b ); ++ spefscr = __builtin_spe_mfspefscr(); ++ return z; ++ ++} ++ ++float32 syst_float32_mul( float32 a, float32 b ) ++{ ++ float32 z; ++ ++ *( (float *) &z ) = *( (float *) &a ) * *( (float *) &b ); ++ spefscr = __builtin_spe_mfspefscr(); ++ return z; ++ ++} ++ ++float32 syst_float32_div( float32 a, float32 b ) ++{ ++ float32 z; ++ ++ *( (float *) &z ) = *( (float *) &a ) / *( (float *) &b ); ++ spefscr = __builtin_spe_mfspefscr(); ++ return z; ++ ++} ++ ++flag syst_float32_eq( float32 a, float32 b ) ++{ ++ flag f = ( *( (float *) &a ) == *( (float *) &b ) ); ++ spefscr = __builtin_spe_mfspefscr(); ++ return f; ++ ++} ++ ++flag syst_float32_le( float32 a, float32 b ) ++{ ++ flag f = ( *( (float *) &a ) <= *( (float *) &b ) ); ++ spefscr = __builtin_spe_mfspefscr(); ++ return f; ++ ++} ++ ++flag syst_float32_lt( float32 a, float32 b ) ++{ ++ flag f = ( *( (float *) &a ) < *( (float *) &b ) ); ++ spefscr = __builtin_spe_mfspefscr(); ++ return f; ++ ++} ++ ++int32 syst_float64_to_int32_round_to_zero( float64 a ) ++{ ++ int32 z = *( (double *) &a ); ++ spefscr = __builtin_spe_mfspefscr(); ++ return z; ++ ++} ++ ++#ifdef BITS64 ++ ++int64 syst_float64_to_int64_round_to_zero( float64 a ) ++{ ++ int64 z = *( (double *) &a ); ++ spefscr = __builtin_spe_mfspefscr(); ++ return z; ++ ++} ++ ++#endif ++ ++float32 syst_float64_to_float32( float64 a ) ++{ ++ float32 z; ++ ++ *( (float *) &z ) = *( (double *) &a ); ++ spefscr = __builtin_spe_mfspefscr(); ++ return z; ++ ++} ++ ++#if defined( FLOATX80 ) && defined( LONG_DOUBLE_IS_FLOATX80 ) ++ ++floatx80 syst_float64_to_floatx80( float64 a ) ++{ ++ floatx80 z; ++ ++ *( (long double *) &z ) = *( (double *) &a ); ++ return z; ++ ++} ++ ++#endif ++ ++#if defined( FLOAT128 ) && defined( LONG_DOUBLE_IS_FLOAT128 ) ++ ++float128 syst_float64_to_float128( float64 a ) ++{ ++ float128 z; ++ ++ *( (long double *) &z ) = *( (double *) &a ); ++ return z; ++ ++} ++ ++#endif ++ ++float64 syst_float64_add( float64 a, float64 b ) ++{ ++ float64 z; ++ ++ *( (double *) &z ) = *( (double *) &a ) + *( (double *) &b ); ++ spefscr = __builtin_spe_mfspefscr(); ++ return z; ++ ++} ++ ++float64 syst_float64_sub( float64 a, float64 b ) ++{ ++ float64 z; ++ ++ *( (double *) &z ) = *( (double *) &a ) - *( (double *) &b ); ++ spefscr = __builtin_spe_mfspefscr(); ++ return z; ++ ++} ++ ++float64 syst_float64_mul( float64 a, float64 b ) ++{ ++ float64 z; ++ ++ *( (double *) &z ) = *( (double *) &a ) * *( (double *) &b ); ++ spefscr = __builtin_spe_mfspefscr(); ++ return z; ++ ++} ++ ++float64 syst_float64_div( float64 a, float64 b ) ++{ ++ float64 z; ++ ++ *( (double *) &z ) = *( (double *) &a ) / *( (double *) &b ); ++ spefscr = __builtin_spe_mfspefscr(); ++ return z; ++ ++} ++ ++float64 syst_float64_sqrt( float64 a ) ++{ ++ /* Ebony ++ float64 z; ++ ++ *( (double *) &z ) = sqrt( *( (double *) &a ) ); ++ spefscr = __builtin_spe_mfspefscr(); ++ return z; ++ */ ++ ++} ++ ++flag syst_float64_eq( float64 a, float64 b ) ++{ ++ flag f = ( *( (double *) &a ) == *( (double *) &b ) ); ++ spefscr = __builtin_spe_mfspefscr(); ++ return f; ++ ++} ++ ++flag syst_float64_le( float64 a, float64 b ) ++{ ++ flag f = ( *( (double *) &a ) <= *( (double *) &b ) ); ++ spefscr = __builtin_spe_mfspefscr(); ++ return f; ++ ++} ++ ++flag syst_float64_lt( float64 a, float64 b ) ++{ ++ flag f = ( *( (double *) &a ) < *( (double *) &b ) ); ++ spefscr = __builtin_spe_mfspefscr(); ++ return f; ++ ++} ++ ++#if defined( FLOATX80 ) && defined( LONG_DOUBLE_IS_FLOATX80 ) ++ ++int32 syst_floatx80_to_int32_round_to_zero( floatx80 a ) ++{ ++ ++ return *( (long double *) &a ); ++ ++} ++ ++#ifdef BITS64 ++ ++int64 syst_floatx80_to_int64_round_to_zero( floatx80 a ) ++{ ++ ++ return *( (long double *) &a ); ++ ++} ++ ++#endif ++ ++float32 syst_floatx80_to_float32( floatx80 a ) ++{ ++ float32 z; ++ ++ *( (float *) &z ) = *( (long double *) &a ); ++ return z; ++ ++} ++ ++float64 syst_floatx80_to_float64( floatx80 a ) ++{ ++ float64 z; ++ ++ *( (double *) &z ) = *( (long double *) &a ); ++ return z; ++ ++} ++ ++floatx80 syst_floatx80_add( floatx80 a, floatx80 b ) ++{ ++ floatx80 z; ++ ++ *( (long double *) &z ) = ++ *( (long double *) &a ) + *( (long double *) &b ); ++ return z; ++ ++} ++ ++floatx80 syst_floatx80_sub( floatx80 a, floatx80 b ) ++{ ++ floatx80 z; ++ ++ *( (long double *) &z ) = ++ *( (long double *) &a ) - *( (long double *) &b ); ++ return z; ++ ++} ++ ++floatx80 syst_floatx80_mul( floatx80 a, floatx80 b ) ++{ ++ floatx80 z; ++ ++ *( (long double *) &z ) = ++ *( (long double *) &a ) * *( (long double *) &b ); ++ return z; ++ ++} ++ ++floatx80 syst_floatx80_div( floatx80 a, floatx80 b ) ++{ ++ floatx80 z; ++ ++ *( (long double *) &z ) = ++ *( (long double *) &a ) / *( (long double *) &b ); ++ spefscr = __builtin_spe_mfspefscr(); ++ return z; ++ ++} ++ ++flag syst_floatx80_eq( floatx80 a, floatx80 b ) ++{ ++ ++ return ( *( (long double *) &a ) == *( (long double *) &b ) ); ++ ++} ++ ++flag syst_floatx80_le( floatx80 a, floatx80 b ) ++{ ++ ++ return ( *( (long double *) &a ) <= *( (long double *) &b ) ); ++ ++} ++ ++flag syst_floatx80_lt( floatx80 a, floatx80 b ) ++{ ++ ++ return ( *( (long double *) &a ) < *( (long double *) &b ) ); ++ ++} ++ ++#endif ++ ++#if defined( FLOAT128 ) && defined( LONG_DOUBLE_IS_FLOAT128 ) ++ ++int32 syst_float128_to_int32_round_to_zero( float128 a ) ++{ ++ ++ return *( (long double *) &a ); ++ ++} ++ ++#ifdef BITS64 ++ ++int64 syst_float128_to_int64_round_to_zero( float128 a ) ++{ ++ ++ return *( (long double *) &a ); ++ ++} ++ ++#endif ++ ++float32 syst_float128_to_float32( float128 a ) ++{ ++ float32 z; ++ ++ *( (float *) &z ) = *( (long double *) &a ); ++ return z; ++ ++} ++ ++float64 syst_float128_to_float64( float128 a ) ++{ ++ float64 z; ++ ++ *( (double *) &z ) = *( (long double *) &a ); ++ return z; ++ ++} ++ ++float128 syst_float128_add( float128 a, float128 b ) ++{ ++ float128 z; ++ ++ *( (long double *) &z ) = ++ *( (long double *) &a ) + *( (long double *) &b ); ++ return z; ++ ++} ++ ++float128 syst_float128_sub( float128 a, float128 b ) ++{ ++ float128 z; ++ ++ *( (long double *) &z ) = ++ *( (long double *) &a ) - *( (long double *) &b ); ++ return z; ++ ++} ++ ++float128 syst_float128_mul( float128 a, float128 b ) ++{ ++ float128 z; ++ ++ *( (long double *) &z ) = ++ *( (long double *) &a ) * *( (long double *) &b ); ++ return z; ++ ++} ++ ++float128 syst_float128_div( float128 a, float128 b ) ++{ ++ float128 z; ++ ++ *( (long double *) &z ) = ++ *( (long double *) &a ) / *( (long double *) &b ); ++ spefscr = __builtin_spe_mfspefscr(); ++ return z; ++ ++} ++ ++flag syst_float128_eq( float128 a, float128 b ) ++{ ++ ++ return ( *( (long double *) &a ) == *( (long double *) &b ) ); ++ ++} ++ ++flag syst_float128_le( float128 a, float128 b ) ++{ ++ ++ return ( *( (long double *) &a ) <= *( (long double *) &b ) ); ++ ++} ++ ++flag syst_float128_lt( float128 a, float128 b ) ++{ ++ ++ return ( *( (long double *) &a ) < *( (long double *) &b ) ); ++ ++} ++ ++#endif ++ +diff --git a/testfloat/powerpc-linux-gcc/systmodes.c b/testfloat/powerpc-linux-gcc/systmodes.c +new file mode 100644 +index 0000000..143cdea +--- /dev/null ++++ b/testfloat/powerpc-linux-gcc/systmodes.c +@@ -0,0 +1,67 @@ ++/* ++ * This file is derived from testfloat/386-Win32-gcc/systmodes.S, ++ * the copyright for that material belongs to the original owners. ++ * ++ * Additional material and changes where applicable is: ++ * Copyright (C) 2008 Freescale Semiconductor, Inc. All rights reserved. ++ * ++ * Author: Ebony Zhu, ++ * Yu Liu, ++ */ ++ ++/* ++=============================================================================== ++ ++This C source file is part of TestFloat, Release 2a, a package of programs ++for testing the correctness of floating-point arithmetic complying to the ++IEC/IEEE Standard for Floating-Point. ++ ++Written by John R. Hauser. More information is available through the Web ++page `http://HTTP.CS.Berkeley.EDU/~jhauser/arithmetic/TestFloat.html'. ++ ++THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort ++has been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT ++TIMES RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO ++PERSONS AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ANY ++AND ALL LOSSES, COSTS, OR OTHER PROBLEMS ARISING FROM ITS USE. ++ ++Derivative works are acceptable, even for commercial purposes, so long as ++(1) they include prominent notice that the work is derivative, and (2) they ++include prominent notice akin to these four paragraphs for those parts of ++this code that are retained. ++ ++=============================================================================== ++*/ ++ ++#include ++#include "milieu.h" ++#include "systmodes.h" ++/* ++------------------------------------------------------------------------------- ++Sets the system's IEC/IEEE floating-point rounding mode. Also disables all ++system exception traps. ++------------------------------------------------------------------------------- ++*/ ++int rounding; ++ ++void syst_float_set_rounding_mode( int8 roundingMode ) ++{ ++ (void) fesetround ( roundingMode ); ++ rounding = roundingMode; ++} ++ ++/* ++------------------------------------------------------------------------------- ++Sets the rounding precision of subsequent extended double-precision ++operations. The `precision' argument should be one of 0, 32, 64, or 80. ++If `precision' is 32, the rounding precision is set equivalent to single ++precision; else if `precision' is 64, the rounding precision is set ++equivalent to double precision; else the rounding precision is set to full ++extended double precision. ++------------------------------------------------------------------------------- ++*/ ++void syst_float_set_rounding_precision( int8 precision ) ++{ ++ ++} ++ +diff --git a/testfloat/templates/Makefile b/testfloat/templates/Makefile +index f5f3cde..18cffe0 100644 +--- a/testfloat/templates/Makefile ++++ b/testfloat/templates/Makefile +@@ -1,15 +1,21 @@ + +-PROCESSOR_H = ../../processors/!!!processor.h ++#PROCESSOR_H = ../../processors/!!!processor.h ++PROCESSOR_H = ../../processors/POWERPC-gcc.h + SOFTFLOAT_VERSION = bits64 +-TARGET = !!!target +-SOFTFLOAT_DIR = ../../softfloat/$(SOFTFLOAT_VERSION)/$(TARGET) ++ ++#TARGET = !!!target ++TARGET = powerpc-GCC ++SOFTFLOAT_DIR = ../../../SoftFloat-2b/softfloat/$(SOFTFLOAT_VERSION)/$(TARGET) + + OBJ = .o + EXE = + INCLUDES = -I. -I.. -I$(SOFTFLOAT_DIR) +-COMPILE_C = gcc -c -o $@ $(INCLUDES) -I- -O2 +-COMPILE_SLOWFLOAT_C = gcc -c -o $@ $(INCLUDES) -I- -O3 +-LINK = gcc -o $@ ++#COMPILE_C = gcc -c -o $@ $(INCLUDES) -I- -O2 ++#COMPILE_SLOWFLOAT_C = gcc -c -o $@ $(INCLUDES) -I- -O3 ++#LINK = gcc -o $@ ++COMPILE_C = /opt/mtwk/usr/local/gcc-3_4-e500-glibc-2.3.4-dp/powerpc-linux-gnuspe/bin/powerpc-linux-gnuspe-gcc -c -o $@ $(INCLUDES) -I- -O2 ++COMPILE_SLOWFLOAT_C = /opt/mtwk/usr/local/gcc-3_4-e500-glibc-2.3.4-dp/powerpc-linux-gnuspe/bin/powerpc-linux-gnuspe-gcc -c -o $@ $(INCLUDES) -I- -O3 ++LINK = /opt/mtwk/usr/local/gcc-3_4-e500-glibc-2.3.4-dp/powerpc-linux-gnuspe/bin/powerpc-linux-gnuspe-gcc -o $@ + + SOFTFLOAT_H = $(SOFTFLOAT_DIR)/softfloat.h + SOFTFLOAT_OBJ = $(SOFTFLOAT_DIR)/softfloat$(OBJ) +diff --git a/testfloat/templates/milieu.h b/testfloat/templates/milieu.h +index 56d3ac4..3214ca8 100644 +--- a/testfloat/templates/milieu.h ++++ b/testfloat/templates/milieu.h +@@ -28,7 +28,7 @@ this code that are retained. + Include common integer types and flags. + ------------------------------------------------------------------------------- + */ +-#include "../../processors/!!!processor.h" ++#include "../../processors/SPARC-gcc.h" + + /* + ------------------------------------------------------------------------------- +diff --git a/testfloat/testFunction.h b/testfloat/testFunction.h +index 04bf856..00139a7 100644 +--- a/testfloat/testFunction.h ++++ b/testfloat/testFunction.h +@@ -126,8 +126,8 @@ extern const flag functionExists[ NUM_FUNCTIONS ]; + enum { + ROUND_NEAREST_EVEN = 1, + ROUND_TO_ZERO, +- ROUND_DOWN, + ROUND_UP, ++ ROUND_DOWN, + NUM_ROUNDINGMODES + }; + +diff --git a/testfloat/testLoops.c b/testfloat/testLoops.c +index 8ba92f3..ba05548 100644 +--- a/testfloat/testLoops.c ++++ b/testfloat/testLoops.c +@@ -488,6 +488,11 @@ void + (void) testFlagsFunctionPtr(); + testZ = testFunction( testCases_a_int32 ); + testFlags = testFlagsFunctionPtr(); ++#ifdef TEST_KERNEL_EMU ++ if (! syst_float_is_soft_emu()){ ++ continue; ++ } ++#endif + --count; + if ( count == 0 ) { + checkEarlyExit(); +@@ -539,6 +544,11 @@ void + (void) testFlagsFunctionPtr(); + testZ = testFunction( testCases_a_int32 ); + testFlags = testFlagsFunctionPtr(); ++#ifdef TEST_KERNEL_EMU ++ if (! syst_float_is_soft_emu()){ ++ continue; ++ } ++#endif + --count; + if ( count == 0 ) { + checkEarlyExit(); +@@ -592,6 +602,11 @@ void + (void) testFlagsFunctionPtr(); + testZ = testFunction( testCases_a_int32 ); + testFlags = testFlagsFunctionPtr(); ++#ifdef TEST_KERNEL_EMU ++ if (! syst_float_is_soft_emu()){ ++ continue; ++ } ++#endif + --count; + if ( count == 0 ) { + checkEarlyExit(); +@@ -647,6 +662,11 @@ void + (void) testFlagsFunctionPtr(); + testZ = testFunction( testCases_a_int32 ); + testFlags = testFlagsFunctionPtr(); ++#ifdef TEST_KERNEL_EMU ++ if (! syst_float_is_soft_emu()){ ++ continue; ++ } ++#endif + --count; + if ( count == 0 ) { + checkEarlyExit(); +@@ -702,6 +722,11 @@ void + (void) testFlagsFunctionPtr(); + testZ = testFunction( testCases_a_int64 ); + testFlags = testFlagsFunctionPtr(); ++#ifdef TEST_KERNEL_EMU ++ if (! syst_float_is_soft_emu()){ ++ continue; ++ } ++#endif + --count; + if ( count == 0 ) { + checkEarlyExit(); +@@ -753,6 +778,11 @@ void + (void) testFlagsFunctionPtr(); + testZ = testFunction( testCases_a_int64 ); + testFlags = testFlagsFunctionPtr(); ++#ifdef TEST_KERNEL_EMU ++ if (! syst_float_is_soft_emu()){ ++ continue; ++ } ++#endif + --count; + if ( count == 0 ) { + checkEarlyExit(); +@@ -806,6 +836,11 @@ void + (void) testFlagsFunctionPtr(); + testZ = testFunction( testCases_a_int64 ); + testFlags = testFlagsFunctionPtr(); ++#ifdef TEST_KERNEL_EMU ++ if (! syst_float_is_soft_emu()){ ++ continue; ++ } ++#endif + --count; + if ( count == 0 ) { + checkEarlyExit(); +@@ -861,6 +896,11 @@ void + (void) testFlagsFunctionPtr(); + testZ = testFunction( testCases_a_int64 ); + testFlags = testFlagsFunctionPtr(); ++#ifdef TEST_KERNEL_EMU ++ if (! syst_float_is_soft_emu()){ ++ continue; ++ } ++#endif + --count; + if ( count == 0 ) { + checkEarlyExit(); +@@ -916,6 +956,11 @@ void + (void) testFlagsFunctionPtr(); + testZ = testFunction( testCases_a_float32 ); + testFlags = testFlagsFunctionPtr(); ++#ifdef TEST_KERNEL_EMU ++ if (! syst_float_is_soft_emu()){ ++ continue; ++ } ++#endif + --count; + if ( count == 0 ) { + checkEarlyExit(); +@@ -973,6 +1018,11 @@ void + (void) testFlagsFunctionPtr(); + testZ = testFunction( testCases_a_float32 ); + testFlags = testFlagsFunctionPtr(); ++#ifdef TEST_KERNEL_EMU ++ if (! syst_float_is_soft_emu()){ ++ continue; ++ } ++#endif + --count; + if ( count == 0 ) { + checkEarlyExit(); +@@ -1030,6 +1080,11 @@ void + (void) testFlagsFunctionPtr(); + testZ = testFunction( testCases_a_float32 ); + testFlags = testFlagsFunctionPtr(); ++#ifdef TEST_KERNEL_EMU ++ if (! syst_float_is_soft_emu()){ ++ continue; ++ } ++#endif + --count; + if ( count == 0 ) { + checkEarlyExit(); +@@ -1087,6 +1142,11 @@ void + (void) testFlagsFunctionPtr(); + testZ = testFunction( testCases_a_float32 ); + testFlags = testFlagsFunctionPtr(); ++#ifdef TEST_KERNEL_EMU ++ if (! syst_float_is_soft_emu()){ ++ continue; ++ } ++#endif + --count; + if ( count == 0 ) { + checkEarlyExit(); +@@ -1146,6 +1206,11 @@ void + (void) testFlagsFunctionPtr(); + testZ = testFunction( testCases_a_float32 ); + testFlags = testFlagsFunctionPtr(); ++#ifdef TEST_KERNEL_EMU ++ if (! syst_float_is_soft_emu()){ ++ continue; ++ } ++#endif + --count; + if ( count == 0 ) { + checkEarlyExit(); +@@ -1203,6 +1268,11 @@ void + (void) testFlagsFunctionPtr(); + testZ = testFunction( testCases_a_float32 ); + testFlags = testFlagsFunctionPtr(); ++#ifdef TEST_KERNEL_EMU ++ if (! syst_float_is_soft_emu()){ ++ continue; ++ } ++#endif + --count; + if ( count == 0 ) { + checkEarlyExit(); +@@ -1260,6 +1330,11 @@ void + (void) testFlagsFunctionPtr(); + testZ = testFunction( testCases_a_float32, testCases_b_float32 ); + testFlags = testFlagsFunctionPtr(); ++#ifdef TEST_KERNEL_EMU ++ if (! syst_float_is_soft_emu()){ ++ continue; ++ } ++#endif + --count; + if ( count == 0 ) { + checkEarlyExit(); +@@ -1312,6 +1387,25 @@ void + (void) testFlagsFunctionPtr(); + testZ = testFunction( testCases_a_float32, testCases_b_float32 ); + testFlags = testFlagsFunctionPtr(); ++ ++if(testCases_a_float32 == 0x7ffffe && testCases_b_float32 == 0x3f7ffffe) ++{ ++ ++ writeErrorFound( 10000 - count ); ++ writeInputs_ab_float32(); ++ fputs( " ", stdout ); ++ writeOutputs_z_float32( trueZ, trueFlags, testZ, testFlags ); ++ fflush( stdout ); ++ if (! syst_float_is_soft_emu()){ ++ exit(-1); ++ } ++} ++#ifdef TEST_KERNEL_EMU ++ if (! syst_float_is_soft_emu()){ ++ continue; ++ } ++#endif ++ + --count; + if ( count == 0 ) { + checkEarlyExit(); +@@ -1370,6 +1464,11 @@ void + (void) testFlagsFunctionPtr(); + testZ = testFunction( testCases_a_float64 ); + testFlags = testFlagsFunctionPtr(); ++#ifdef TEST_KERNEL_EMU ++ if (! syst_float_is_soft_emu()){ ++ continue; ++ } ++#endif + --count; + if ( count == 0 ) { + checkEarlyExit(); +@@ -1427,6 +1526,11 @@ void + (void) testFlagsFunctionPtr(); + testZ = testFunction( testCases_a_float64 ); + testFlags = testFlagsFunctionPtr(); ++#ifdef TEST_KERNEL_EMU ++ if (! syst_float_is_soft_emu()){ ++ continue; ++ } ++#endif + --count; + if ( count == 0 ) { + checkEarlyExit(); +@@ -1484,6 +1588,11 @@ void + (void) testFlagsFunctionPtr(); + testZ = testFunction( testCases_a_float64 ); + testFlags = testFlagsFunctionPtr(); ++#ifdef TEST_KERNEL_EMU ++ if (! syst_float_is_soft_emu()){ ++ continue; ++ } ++#endif + --count; + if ( count == 0 ) { + checkEarlyExit(); +@@ -1541,6 +1650,11 @@ void + (void) testFlagsFunctionPtr(); + testZ = testFunction( testCases_a_float64 ); + testFlags = testFlagsFunctionPtr(); ++#ifdef TEST_KERNEL_EMU ++ if (! syst_float_is_soft_emu()){ ++ continue; ++ } ++#endif + --count; + if ( count == 0 ) { + checkEarlyExit(); +@@ -1600,6 +1714,11 @@ void + (void) testFlagsFunctionPtr(); + testZ = testFunction( testCases_a_float64 ); + testFlags = testFlagsFunctionPtr(); ++#ifdef TEST_KERNEL_EMU ++ if (! syst_float_is_soft_emu()){ ++ continue; ++ } ++#endif + --count; + if ( count == 0 ) { + checkEarlyExit(); +@@ -1657,6 +1776,11 @@ void + (void) testFlagsFunctionPtr(); + testZ = testFunction( testCases_a_float64 ); + testFlags = testFlagsFunctionPtr(); ++#ifdef TEST_KERNEL_EMU ++ if (! syst_float_is_soft_emu()){ ++ continue; ++ } ++#endif + --count; + if ( count == 0 ) { + checkEarlyExit(); +@@ -1714,6 +1838,11 @@ void + (void) testFlagsFunctionPtr(); + testZ = testFunction( testCases_a_float64, testCases_b_float64 ); + testFlags = testFlagsFunctionPtr(); ++#ifdef TEST_KERNEL_EMU ++ if (! syst_float_is_soft_emu()){ ++ continue; ++ } ++#endif + --count; + if ( count == 0 ) { + checkEarlyExit(); +@@ -1766,6 +1895,13 @@ void + (void) testFlagsFunctionPtr(); + testZ = testFunction( testCases_a_float64, testCases_b_float64 ); + testFlags = testFlagsFunctionPtr(); ++ ++#ifdef TEST_KERNEL_EMU ++ if (! syst_float_is_soft_emu()){ ++ continue; ++ } ++#endif ++ + --count; + if ( count == 0 ) { + checkEarlyExit(); +@@ -1826,6 +1962,11 @@ void + (void) testFlagsFunctionPtr(); + testZ = testFunction( testCases_a_floatx80 ); + testFlags = testFlagsFunctionPtr(); ++#ifdef TEST_KERNEL_EMU ++ if (! syst_float_is_soft_emu()){ ++ continue; ++ } ++#endif + --count; + if ( count == 0 ) { + checkEarlyExit(); +@@ -1883,6 +2024,11 @@ void + (void) testFlagsFunctionPtr(); + testZ = testFunction( testCases_a_floatx80 ); + testFlags = testFlagsFunctionPtr(); ++#ifdef TEST_KERNEL_EMU ++ if (! syst_float_is_soft_emu()){ ++ continue; ++ } ++#endif + --count; + if ( count == 0 ) { + checkEarlyExit(); +@@ -1940,6 +2086,11 @@ void + (void) testFlagsFunctionPtr(); + testZ = testFunction( testCases_a_floatx80 ); + testFlags = testFlagsFunctionPtr(); ++#ifdef TEST_KERNEL_EMU ++ if (! syst_float_is_soft_emu()){ ++ continue; ++ } ++#endif + --count; + if ( count == 0 ) { + checkEarlyExit(); +@@ -1995,6 +2146,11 @@ void + (void) testFlagsFunctionPtr(); + testZ = testFunction( testCases_a_floatx80 ); + testFlags = testFlagsFunctionPtr(); ++#ifdef TEST_KERNEL_EMU ++ if (! syst_float_is_soft_emu()){ ++ continue; ++ } ++#endif + --count; + if ( count == 0 ) { + checkEarlyExit(); +@@ -2052,6 +2208,11 @@ void + (void) testFlagsFunctionPtr(); + testZ = testFunction( testCases_a_floatx80 ); + testFlags = testFlagsFunctionPtr(); ++#ifdef TEST_KERNEL_EMU ++ if (! syst_float_is_soft_emu()){ ++ continue; ++ } ++#endif + --count; + if ( count == 0 ) { + checkEarlyExit(); +@@ -2109,6 +2270,11 @@ void + (void) testFlagsFunctionPtr(); + testZ = testFunction( testCases_a_floatx80 ); + testFlags = testFlagsFunctionPtr(); ++#ifdef TEST_KERNEL_EMU ++ if (! syst_float_is_soft_emu()){ ++ continue; ++ } ++#endif + --count; + if ( count == 0 ) { + checkEarlyExit(); +@@ -2166,6 +2332,11 @@ void + (void) testFlagsFunctionPtr(); + testZ = testFunction( testCases_a_floatx80, testCases_b_floatx80 ); + testFlags = testFlagsFunctionPtr(); ++#ifdef TEST_KERNEL_EMU ++ if (! syst_float_is_soft_emu()){ ++ continue; ++ } ++#endif + --count; + if ( count == 0 ) { + checkEarlyExit(); +@@ -2218,6 +2389,11 @@ void + (void) testFlagsFunctionPtr(); + testZ = testFunction( testCases_a_floatx80, testCases_b_floatx80 ); + testFlags = testFlagsFunctionPtr(); ++#ifdef TEST_KERNEL_EMU ++ if (! syst_float_is_soft_emu()){ ++ continue; ++ } ++#endif + --count; + if ( count == 0 ) { + checkEarlyExit(); +@@ -2280,6 +2456,11 @@ void + (void) testFlagsFunctionPtr(); + testZ = testFunction( testCases_a_float128 ); + testFlags = testFlagsFunctionPtr(); ++#ifdef TEST_KERNEL_EMU ++ if (! syst_float_is_soft_emu()){ ++ continue; ++ } ++#endif + --count; + if ( count == 0 ) { + checkEarlyExit(); +@@ -2337,6 +2518,11 @@ void + (void) testFlagsFunctionPtr(); + testZ = testFunction( testCases_a_float128 ); + testFlags = testFlagsFunctionPtr(); ++#ifdef TEST_KERNEL_EMU ++ if (! syst_float_is_soft_emu()){ ++ continue; ++ } ++#endif + --count; + if ( count == 0 ) { + checkEarlyExit(); +@@ -2394,6 +2580,11 @@ void + (void) testFlagsFunctionPtr(); + testZ = testFunction( testCases_a_float128 ); + testFlags = testFlagsFunctionPtr(); ++#ifdef TEST_KERNEL_EMU ++ if (! syst_float_is_soft_emu()){ ++ continue; ++ } ++#endif + --count; + if ( count == 0 ) { + checkEarlyExit(); +@@ -2449,6 +2640,11 @@ void + (void) testFlagsFunctionPtr(); + testZ = testFunction( testCases_a_float128 ); + testFlags = testFlagsFunctionPtr(); ++#ifdef TEST_KERNEL_EMU ++ if (! syst_float_is_soft_emu()){ ++ continue; ++ } ++#endif + --count; + if ( count == 0 ) { + checkEarlyExit(); +@@ -2506,6 +2702,11 @@ void + (void) testFlagsFunctionPtr(); + testZ = testFunction( testCases_a_float128 ); + testFlags = testFlagsFunctionPtr(); ++#ifdef TEST_KERNEL_EMU ++ if (! syst_float_is_soft_emu()){ ++ continue; ++ } ++#endif + --count; + if ( count == 0 ) { + checkEarlyExit(); +@@ -2563,6 +2764,11 @@ void + (void) testFlagsFunctionPtr(); + testZ = testFunction( testCases_a_float128 ); + testFlags = testFlagsFunctionPtr(); ++#ifdef TEST_KERNEL_EMU ++ if (! syst_float_is_soft_emu()){ ++ continue; ++ } ++#endif + --count; + if ( count == 0 ) { + checkEarlyExit(); +@@ -2620,6 +2826,11 @@ void + (void) testFlagsFunctionPtr(); + testZ = testFunction( testCases_a_float128, testCases_b_float128 ); + testFlags = testFlagsFunctionPtr(); ++#ifdef TEST_KERNEL_EMU ++ if (! syst_float_is_soft_emu()){ ++ continue; ++ } ++#endif + --count; + if ( count == 0 ) { + checkEarlyExit(); +@@ -2672,6 +2883,11 @@ void + (void) testFlagsFunctionPtr(); + testZ = testFunction( testCases_a_float128, testCases_b_float128 ); + testFlags = testFlagsFunctionPtr(); ++#ifdef TEST_KERNEL_EMU ++ if (! syst_float_is_soft_emu()){ ++ continue; ++ } ++#endif + --count; + if ( count == 0 ) { + checkEarlyExit(); +-- +1.5.4 + diff --git a/meta-fsl-ppc/recipes-test/testfloat/files/Yocto-replace-COMPILE_PREFIX-gcc.patch b/meta-fsl-ppc/recipes-test/testfloat/files/Yocto-replace-COMPILE_PREFIX-gcc.patch new file mode 100644 index 00000000..42de56d3 --- /dev/null +++ b/meta-fsl-ppc/recipes-test/testfloat/files/Yocto-replace-COMPILE_PREFIX-gcc.patch @@ -0,0 +1,67 @@ +From 6c7567e05c28b8cb6c7dc68c278950a32feb6f64 Mon Sep 17 00:00:00 2001 +From: Ting Liu +Date: Wed, 9 May 2012 02:42:57 -0500 +Subject: [PATCH] Yocto: replace $(COMPILE_PREFIX)gcc with $(CC) and remove -te500v2 flags + +Signed-off-by: Ting Liu +--- + SoftFloat-2b/softfloat/bits32/powerpc-GCC/Makefile | 4 ++-- + SoftFloat-2b/softfloat/bits64/powerpc-GCC/Makefile | 4 ++-- + testfloat/powerpc-linux-gcc/Makefile | 8 ++++---- + 3 files changed, 8 insertions(+), 8 deletions(-) + +diff --git a/SoftFloat-2b/softfloat/bits32/powerpc-GCC/Makefile b/SoftFloat-2b/softfloat/bits32/powerpc-GCC/Makefile +index 28f1e33..4098048 100644 +--- a/SoftFloat-2b/softfloat/bits32/powerpc-GCC/Makefile ++++ b/SoftFloat-2b/softfloat/bits32/powerpc-GCC/Makefile +@@ -5,8 +5,8 @@ SOFTFLOAT_MACROS = ../softfloat-macros + OBJ = .o + EXE = + INCLUDES = -I. -I.. +-COMPILE_C = $(COMPILE_PREFIX)gcc -msoft-float -c -o $@ $(INCLUDES) -I- -O2 +-LINK = $(COMPILE_PREFIX)gcc -o $@ ++COMPILE_C = $(CC) -msoft-float -c -o $@ $(INCLUDES) -I- -O2 ++LINK = $(CC) -o $@ + + ALL: softfloat$(OBJ) timesoftfloat$(EXE) + +diff --git a/SoftFloat-2b/softfloat/bits64/powerpc-GCC/Makefile b/SoftFloat-2b/softfloat/bits64/powerpc-GCC/Makefile +index a5e2cc7..c34e16e 100644 +--- a/SoftFloat-2b/softfloat/bits64/powerpc-GCC/Makefile ++++ b/SoftFloat-2b/softfloat/bits64/powerpc-GCC/Makefile +@@ -5,8 +5,8 @@ SOFTFLOAT_MACROS = ../softfloat-macros + OBJ = .o + EXE = + INCLUDES = -I. -I.. +-COMPILE_C = $(COMPILE_PREFIX) -mcpu=8548 -mhard-float -mfloat-gprs=double -o $@ $(INCLUDES) -I- -O2 +-LINK = $(COMPILE_PREFIX) -o $@ ++COMPILE_C = $(CC) -mcpu=8548 -mhard-float -mfloat-gprs=double -o $@ $(INCLUDES) -I- -O2 ++LINK = $(CC) -o $@ + + ALL: softfloat$(OBJ) timesoftfloat$(EXE) + +diff --git a/testfloat/powerpc-linux-gcc/Makefile b/testfloat/powerpc-linux-gcc/Makefile +index de50aad..1a8b5f7 100644 +--- a/testfloat/powerpc-linux-gcc/Makefile ++++ b/testfloat/powerpc-linux-gcc/Makefile +@@ -8,13 +8,13 @@ OBJ = .o + EXE = + INCLUDES = -I. -I.. -I$(SOFTFLOAT_DIR) + +-COMPILE_C = $(COMPILE_PREFIX)gcc -c -o $@ $(INCLUDES) -I- -O $(EXTRA_CFLAGS) ++COMPILE_C = $(CC) -c -o $@ $(INCLUDES) -I- -O $(EXTRA_CFLAGS) + +-COMPILE_C_HARD = $(COMPILE_PREFIX)gcc -c -te500v2 -o $@ $(INCLUDES) ++COMPILE_C_HARD = $(CC) -c -o $@ $(INCLUDES) + +-COMPILE_SLOWFLOAT_C = $(COMPILE_PREFIX)gcc -c -o $@ $(INCLUDES) -I- -O ++COMPILE_SLOWFLOAT_C = $(CC) -c -o $@ $(INCLUDES) -I- -O + +-LINK = $(COMPILE_PREFIX)gcc -lm -o $@ ++LINK = $(CC) -lm -o $@ + + SOFTFLOAT_H = $(SOFTFLOAT_DIR)/softfloat.h + SOFTFLOAT_OBJ = $(SOFTFLOAT_DIR)/softfloat$(OBJ) +-- +1.7.3.4 + diff --git a/meta-fsl-ppc/recipes-test/testfloat/testfloat_2a.bb b/meta-fsl-ppc/recipes-test/testfloat/testfloat_2a.bb new file mode 100644 index 00000000..d78e74f4 --- /dev/null +++ b/meta-fsl-ppc/recipes-test/testfloat/testfloat_2a.bb @@ -0,0 +1,36 @@ +DESCRIPTION = "A program for testing floating-point implementation" +SECTION = "test" +LICENSE = "Distributable: Hauser TestFloat" + +LIC_FILES_CHKSUM = "file://testfloat/testfloat.txt;beginline=87;endline=95;md5=bdb2e8111838a48015c29bd97f5b6145" + +SRC_URI = " http://www.jhauser.us/arithmetic/TestFloat-2a.tar.Z;name=TestFloat \ + http://www.jhauser.us/arithmetic/SoftFloat-2b.tar.Z;name=SoftFloat \ + file://SoftFloat-powerpc-1.patch \ + file://TestFloat-powerpc-E500v2-SPE-1.patch \ + file://Yocto-replace-COMPILE_PREFIX-gcc.patch \ + " +SRC_URI[TestFloat.md5sum] = "4dc889319ae1e0c5381ec511f784553a" +SRC_URI[TestFloat.sha256sum] = "84d14aa42adefbda2ec9708b42946f7fa59f93689b042684bd027863481f8e4e" +SRC_URI[SoftFloat.md5sum] = "b4a58b5c941f1a2317e4c2500086e3fa" +SRC_URI[SoftFloat.sha256sum] = "89d14b55113a2ba8cbda7011443ba1d298d381c89d939515d56c5f18f2febf81" + +S=${WORKDIR}/TestFloat-2a + +do_unpack2(){ + mv ${WORKDIR}/SoftFloat-2b ${S}/SoftFloat-2b + cd ${S} + find -type f -exec dos2unix {} \; +} +addtask do_unpack2 after do_unpack before do_patch + +do_compile(){ + oe_runmake -C testfloat/powerpc-linux-gcc/ CC="${CC}" EXTRA_CFLAGS="-DTEST_KERNEL_EMU" +} + +do_install(){ + install -d ${D}/${bindir} + install testfloat/powerpc-linux-gcc/testfloat ${D}/${bindir} + install testfloat/powerpc-linux-gcc/testsoftfloat ${D}/${bindir} +} + -- cgit v1.2.3-54-g00ecf From fc929a8c2daf45793fc5982faaa0a1ea7b46fdb7 Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Tue, 15 May 2012 13:25:30 -0500 Subject: fsl.conf: update distro conf for denzil release Signed-off-by: Matthew McClintock --- meta-fsl-ppc/conf/distro/fsl.conf | 61 ++++++++++++++++++++++++++++++--------- 1 file changed, 48 insertions(+), 13 deletions(-) diff --git a/meta-fsl-ppc/conf/distro/fsl.conf b/meta-fsl-ppc/conf/distro/fsl.conf index 50a82797..7cde60f2 100644 --- a/meta-fsl-ppc/conf/distro/fsl.conf +++ b/meta-fsl-ppc/conf/distro/fsl.conf @@ -1,6 +1,6 @@ DISTRO = "fsl" -DISTRO_NAME = "Yocto (Built by Poky 6.0)" -DISTRO_VERSION = "1.1" +DISTRO_NAME = "Yocto (Built by Poky 7.0)" +DISTRO_VERSION = "1.2" SDK_VENDOR = "-fslsdk" SDK_VERSION := "${@'${DISTRO_VERSION}'.replace('snapshot-${DATE}','snapshot')}" @@ -32,19 +32,52 @@ TCLIBCAPPEND = "" QEMU_TARGETS ?= "ppc" PREMIRRORS ?= "\ -bzr://.*/.* http://autobuilder.yoctoproject.org/sources/ \n \ -cvs://.*/.* http://autobuilder.yoctoproject.org/sources/ \n \ -git://.*/.* http://autobuilder.yoctoproject.org/sources/ \n \ -hg://.*/.* http://autobuilder.yoctoproject.org/sources/ \n \ -osc://.*/.* http://autobuilder.yoctoproject.org/sources/ \n \ -p4://.*/.* http://autobuilder.yoctoproject.org/sources/ \n \ -svk://.*/.* http://autobuilder.yoctoproject.org/sources/ \n \ -svn://.*/.* http://autobuilder.yoctoproject.org/sources/ \n" +bzr://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \ +cvs://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \ +git://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \ +hg://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \ +osc://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \ +p4://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \ +svk://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \ +svn://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n" MIRRORS =+ "\ -ftp://.*/.* http://autobuilder.yoctoproject.org/sources/ \n \ -http://.*/.* http://autobuilder.yoctoproject.org/sources/ \n \ -https://.*/.* http://autobuilder.yoctoproject.org/sources/ \n" +ftp://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \ +http://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \ +https://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n" + +# The CONNECTIVITY_CHECK_URI's are used to test whether we can succesfully +# fetch from the network (and warn you if not). To disable the test set +# the variable to be empty. +CONNECTIVITY_CHECK_URIS ?= "git://git.yoctoproject.org/yocto-firewall-test;protocol=git;rev=HEAD \ + https://eula-downloads.yoctoproject.org/index.php \ + http://bugzilla.yoctoproject.org/report.cgi" + +SANITY_TESTED_DISTROS ?= " \ + Yocto (Built by Poky 7.0) 1.2 \n \ + Ubuntu 10.04.4 LTS \n \ + Ubuntu 11.10 \n \ + Ubuntu 12.04 \n \ + Fedora release 15 (Lovelock) \n \ + Fedora release 16 (Verne) \n \ + Fedora release 17 (Beefy Miracle) \n \ + CentOS release 5.6 (Final) \n \ + CentOS release 5.7 (Final) \n \ + CentOS release 6.2 (Final) \n \ + Debian GNU/Linux 6.0.4 (squeeze) \n \ + openSUSE 11.4 \n \ + openSUSE 12.1 \n \ + " + +# Default hash policy for distro +BB_SIGNATURE_HANDLER ?= 'OEBasicHash' +# +# OELAYOUT_ABI allows us to notify users when the format of TMPDIR changes in +# an incompatible way. Such changes should usually be detailed in the commit +# that breaks the format and have been previously discussed on the mailing list +# with general agreement from the core team. +# +OELAYOUT_ABI = "8" IMAGE_CLASSES = "image_types_uboot" @@ -58,3 +91,5 @@ USE_VT = "" SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" CCACHE = "" + + -- cgit v1.2.3-54-g00ecf From a32fd240493ff8926cc8630ff6afb4c6fe611b6b Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Tue, 15 May 2012 13:27:56 -0500 Subject: testfloat_2a.bb: fix quoting issues Signed-off-by: Matthew McClintock --- meta-fsl-ppc/recipes-test/testfloat/testfloat_2a.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-fsl-ppc/recipes-test/testfloat/testfloat_2a.bb b/meta-fsl-ppc/recipes-test/testfloat/testfloat_2a.bb index d78e74f4..740ad0f4 100644 --- a/meta-fsl-ppc/recipes-test/testfloat/testfloat_2a.bb +++ b/meta-fsl-ppc/recipes-test/testfloat/testfloat_2a.bb @@ -15,7 +15,7 @@ SRC_URI[TestFloat.sha256sum] = "84d14aa42adefbda2ec9708b42946f7fa59f93689b042684 SRC_URI[SoftFloat.md5sum] = "b4a58b5c941f1a2317e4c2500086e3fa" SRC_URI[SoftFloat.sha256sum] = "89d14b55113a2ba8cbda7011443ba1d298d381c89d939515d56c5f18f2febf81" -S=${WORKDIR}/TestFloat-2a +S = "${WORKDIR}/TestFloat-2a" do_unpack2(){ mv ${WORKDIR}/SoftFloat-2b ${S}/SoftFloat-2b -- cgit v1.2.3-54-g00ecf From a996b3b18229a5261f0d6280a569361369123646 Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Tue, 15 May 2012 13:28:58 -0500 Subject: remove fsl specific toolchain Signed-off-by: Matthew McClintock --- .../binutils-cross-canadian_2.21.1a.bbappend | 1 - .../binutils/binutils-cross_2.21.1a.bbappend | 1 - .../binutils/binutils-crosssdk_2.21.1a.bbappend | 1 - .../recipes-devtools/binutils/binutils-fsl.inc | 15 - .../binutils/binutils_2.21.1a.bbappend | 1 - .../binutils/files/bin.e500mc_nop.patch | 114 - .../binutils/files/bin.e5500.patch | 102 - .../binutils/files/bin.e6500-2.patch | 674 - .../binutils/files/libiberty_path_fix.patch | 22 - .../binutils/files/libtool-2.4-update_fsl.patch | 18705 ------------------- .../recipes-devtools/eglibc/eglibc-fsl.inc | 14 - .../eglibc/eglibc-initial_2.13.bbappend | 1 - .../eglibc/eglibc-locale_2.13.bbappend | 1 - .../recipes-devtools/eglibc/eglibc_2.13.bbappend | 1 - .../recipes-devtools/eglibc/files/etc/ld.so.conf | 0 .../eglibc/files/generate-supported.mk | 11 - ...mc_subspecies_of_powerpc_is_not_supported.patch | 11 - .../eglibc/files/glibc.fix_prof.patch | 38 - .../eglibc/files/glibc.fix_sqrt.patch | 500 - .../eglibc/files/glibc.fixgcc4.6.patch | 29 - .../eglibc/files/glibc.readv_proto.patch | 99 - .../eglibc/files/glibc.undefined_static.patch | 37 - .../GPLUSPLUS_INCLUDE_DIR_with_sysroot_fsl.patch | 186 - .../gcc/files/gcc.builtin_isel.patch | 1059 -- .../gcc/files/gcc.case_values.patch | 65 - .../gcc/files/gcc.check_path_validity.patch | 12 - .../gcc/files/gcc.e5500_mfocr.patch | 181 - .../gcc/files/gcc.e6500-FSF46.patch | 4011 ---- .../gcc/files/gcc.experimental_move.patch | 32 - .../gcc/files/gcc.extelim-v3.patch | 3491 ---- .../files/gcc.fix_MTWX51204-dwarf-vector-reg.patch | 9 - .../files/gcc.fix_SSIZE_MAX_undefine_issue.patch | 11 - .../gcc/files/gcc.fix_build-with-cxx.patch | 39 - .../gcc/files/gcc.fix_cloogstatic2.patch | 18 - .../gcc/files/gcc.fix_constvector.patch | 43 - .../gcc/files/gcc.fix_header_issue.patch | 12 - .../gcc/files/gcc.fix_ira-loop-pressure.patch | 12 - .../gcc/files/gcc.fix_longversionstring.patch | 16 - .../gcc/files/gcc.fix_min_max.patch | 38 - .../gcc/files/gcc.fix_mingw32.patch | 11 - .../gcc/files/gcc.ld_unaligned-460.patch | 32 - .../gcc/files/gcc.load_on_store_bypass-462.patch | 138 - .../gcc/files/gcc.local_unaligned_altivec.patch | 18 - .../gcc/files/gcc.opt-array-offset.patch | 350 - .../gcc/files/gcc.remove_CCUNSmode_reference.patch | 24 - .../gcc/files/gcc.rm_slow_tests.patch | 67 - .../gcc/files/gcc.soft_float-460.patch | 190 - .../gcc/files/gcc.widen_types-46.patch | 1534 -- .../gcc/files/optional_libstdc.patch | 86 - .../gcc/gcc-cross-canadian_4.6.bbappend | 1 - .../gcc/gcc-cross-initial_4.6.bbappend | 1 - .../gcc/gcc-cross-intermediate_4.6.bbappend | 1 - .../recipes-devtools/gcc/gcc-cross_4.6.bbappend | 1 - meta-fsl-ppc/recipes-devtools/gcc/gcc-fsl.inc | 46 - .../recipes-devtools/gcc/gcc-runtime_4.6.bbappend | 1 - meta-fsl-ppc/recipes-devtools/gcc/gcc_4.6.bbappend | 1 - .../recipes-devtools/gcc/libgcc_4.6.bbappend | 1 - 57 files changed, 32116 deletions(-) delete mode 100644 meta-fsl-ppc/recipes-devtools/binutils/binutils-cross-canadian_2.21.1a.bbappend delete mode 100644 meta-fsl-ppc/recipes-devtools/binutils/binutils-cross_2.21.1a.bbappend delete mode 100644 meta-fsl-ppc/recipes-devtools/binutils/binutils-crosssdk_2.21.1a.bbappend delete mode 100644 meta-fsl-ppc/recipes-devtools/binutils/binutils-fsl.inc delete mode 100644 meta-fsl-ppc/recipes-devtools/binutils/binutils_2.21.1a.bbappend delete mode 100644 meta-fsl-ppc/recipes-devtools/binutils/files/bin.e500mc_nop.patch delete mode 100644 meta-fsl-ppc/recipes-devtools/binutils/files/bin.e5500.patch delete mode 100644 meta-fsl-ppc/recipes-devtools/binutils/files/bin.e6500-2.patch delete mode 100644 meta-fsl-ppc/recipes-devtools/binutils/files/libiberty_path_fix.patch delete mode 100644 meta-fsl-ppc/recipes-devtools/binutils/files/libtool-2.4-update_fsl.patch delete mode 100644 meta-fsl-ppc/recipes-devtools/eglibc/eglibc-fsl.inc delete mode 100644 meta-fsl-ppc/recipes-devtools/eglibc/eglibc-initial_2.13.bbappend delete mode 100644 meta-fsl-ppc/recipes-devtools/eglibc/eglibc-locale_2.13.bbappend delete mode 100644 meta-fsl-ppc/recipes-devtools/eglibc/eglibc_2.13.bbappend delete mode 100644 meta-fsl-ppc/recipes-devtools/eglibc/files/etc/ld.so.conf delete mode 100644 meta-fsl-ppc/recipes-devtools/eglibc/files/generate-supported.mk delete mode 100644 meta-fsl-ppc/recipes-devtools/eglibc/files/glibc.e500mc_subspecies_of_powerpc_is_not_supported.patch delete mode 100644 meta-fsl-ppc/recipes-devtools/eglibc/files/glibc.fix_prof.patch delete mode 100644 meta-fsl-ppc/recipes-devtools/eglibc/files/glibc.fix_sqrt.patch delete mode 100644 meta-fsl-ppc/recipes-devtools/eglibc/files/glibc.fixgcc4.6.patch delete mode 100644 meta-fsl-ppc/recipes-devtools/eglibc/files/glibc.readv_proto.patch delete mode 100644 meta-fsl-ppc/recipes-devtools/eglibc/files/glibc.undefined_static.patch delete mode 100644 meta-fsl-ppc/recipes-devtools/gcc/files/GPLUSPLUS_INCLUDE_DIR_with_sysroot_fsl.patch delete mode 100644 meta-fsl-ppc/recipes-devtools/gcc/files/gcc.builtin_isel.patch delete mode 100644 meta-fsl-ppc/recipes-devtools/gcc/files/gcc.case_values.patch delete mode 100644 meta-fsl-ppc/recipes-devtools/gcc/files/gcc.check_path_validity.patch delete mode 100644 meta-fsl-ppc/recipes-devtools/gcc/files/gcc.e5500_mfocr.patch delete mode 100644 meta-fsl-ppc/recipes-devtools/gcc/files/gcc.e6500-FSF46.patch delete mode 100644 meta-fsl-ppc/recipes-devtools/gcc/files/gcc.experimental_move.patch delete mode 100644 meta-fsl-ppc/recipes-devtools/gcc/files/gcc.extelim-v3.patch delete mode 100644 meta-fsl-ppc/recipes-devtools/gcc/files/gcc.fix_MTWX51204-dwarf-vector-reg.patch delete mode 100644 meta-fsl-ppc/recipes-devtools/gcc/files/gcc.fix_SSIZE_MAX_undefine_issue.patch delete mode 100644 meta-fsl-ppc/recipes-devtools/gcc/files/gcc.fix_build-with-cxx.patch delete mode 100644 meta-fsl-ppc/recipes-devtools/gcc/files/gcc.fix_cloogstatic2.patch delete mode 100644 meta-fsl-ppc/recipes-devtools/gcc/files/gcc.fix_constvector.patch delete mode 100644 meta-fsl-ppc/recipes-devtools/gcc/files/gcc.fix_header_issue.patch delete mode 100644 meta-fsl-ppc/recipes-devtools/gcc/files/gcc.fix_ira-loop-pressure.patch delete mode 100644 meta-fsl-ppc/recipes-devtools/gcc/files/gcc.fix_longversionstring.patch delete mode 100644 meta-fsl-ppc/recipes-devtools/gcc/files/gcc.fix_min_max.patch delete mode 100644 meta-fsl-ppc/recipes-devtools/gcc/files/gcc.fix_mingw32.patch delete mode 100644 meta-fsl-ppc/recipes-devtools/gcc/files/gcc.ld_unaligned-460.patch delete mode 100644 meta-fsl-ppc/recipes-devtools/gcc/files/gcc.load_on_store_bypass-462.patch delete mode 100644 meta-fsl-ppc/recipes-devtools/gcc/files/gcc.local_unaligned_altivec.patch delete mode 100644 meta-fsl-ppc/recipes-devtools/gcc/files/gcc.opt-array-offset.patch delete mode 100644 meta-fsl-ppc/recipes-devtools/gcc/files/gcc.remove_CCUNSmode_reference.patch delete mode 100644 meta-fsl-ppc/recipes-devtools/gcc/files/gcc.rm_slow_tests.patch delete mode 100644 meta-fsl-ppc/recipes-devtools/gcc/files/gcc.soft_float-460.patch delete mode 100644 meta-fsl-ppc/recipes-devtools/gcc/files/gcc.widen_types-46.patch delete mode 100644 meta-fsl-ppc/recipes-devtools/gcc/files/optional_libstdc.patch delete mode 100644 meta-fsl-ppc/recipes-devtools/gcc/gcc-cross-canadian_4.6.bbappend delete mode 100644 meta-fsl-ppc/recipes-devtools/gcc/gcc-cross-initial_4.6.bbappend delete mode 100644 meta-fsl-ppc/recipes-devtools/gcc/gcc-cross-intermediate_4.6.bbappend delete mode 100644 meta-fsl-ppc/recipes-devtools/gcc/gcc-cross_4.6.bbappend delete mode 100644 meta-fsl-ppc/recipes-devtools/gcc/gcc-fsl.inc delete mode 100644 meta-fsl-ppc/recipes-devtools/gcc/gcc-runtime_4.6.bbappend delete mode 100644 meta-fsl-ppc/recipes-devtools/gcc/gcc_4.6.bbappend delete mode 100644 meta-fsl-ppc/recipes-devtools/gcc/libgcc_4.6.bbappend diff --git a/meta-fsl-ppc/recipes-devtools/binutils/binutils-cross-canadian_2.21.1a.bbappend b/meta-fsl-ppc/recipes-devtools/binutils/binutils-cross-canadian_2.21.1a.bbappend deleted file mode 100644 index d46b87a8..00000000 --- a/meta-fsl-ppc/recipes-devtools/binutils/binutils-cross-canadian_2.21.1a.bbappend +++ /dev/null @@ -1 +0,0 @@ -require binutils-fsl.inc diff --git a/meta-fsl-ppc/recipes-devtools/binutils/binutils-cross_2.21.1a.bbappend b/meta-fsl-ppc/recipes-devtools/binutils/binutils-cross_2.21.1a.bbappend deleted file mode 100644 index d46b87a8..00000000 --- a/meta-fsl-ppc/recipes-devtools/binutils/binutils-cross_2.21.1a.bbappend +++ /dev/null @@ -1 +0,0 @@ -require binutils-fsl.inc diff --git a/meta-fsl-ppc/recipes-devtools/binutils/binutils-crosssdk_2.21.1a.bbappend b/meta-fsl-ppc/recipes-devtools/binutils/binutils-crosssdk_2.21.1a.bbappend deleted file mode 100644 index d46b87a8..00000000 --- a/meta-fsl-ppc/recipes-devtools/binutils/binutils-crosssdk_2.21.1a.bbappend +++ /dev/null @@ -1 +0,0 @@ -require binutils-fsl.inc diff --git a/meta-fsl-ppc/recipes-devtools/binutils/binutils-fsl.inc b/meta-fsl-ppc/recipes-devtools/binutils/binutils-fsl.inc deleted file mode 100644 index 258f6cc7..00000000 --- a/meta-fsl-ppc/recipes-devtools/binutils/binutils-fsl.inc +++ /dev/null @@ -1,15 +0,0 @@ -SRC_URI_fsl = "\ - ${GNU_MIRROR}/binutils/binutils-${PV}.tar.bz2 \ - file://bin.e5500.patch \ - file://bin.e6500-2.patch \ - file://bin.e500mc_nop.patch \ - file://libtool-2.4-update_fsl.patch \ - file://binutils-2.19.1-ld-sysroot.patch \ - file://libiberty_path_fix.patch \ - file://binutils-poison.patch \ - file://libtool-rpath-fix.patch \ - " - -FILESEXTRAPATHS_prepend := "${THISDIR}/files:" - -PR_append_fsl = "+${DISTRO}.4" diff --git a/meta-fsl-ppc/recipes-devtools/binutils/binutils_2.21.1a.bbappend b/meta-fsl-ppc/recipes-devtools/binutils/binutils_2.21.1a.bbappend deleted file mode 100644 index d46b87a8..00000000 --- a/meta-fsl-ppc/recipes-devtools/binutils/binutils_2.21.1a.bbappend +++ /dev/null @@ -1 +0,0 @@ -require binutils-fsl.inc diff --git a/meta-fsl-ppc/recipes-devtools/binutils/files/bin.e500mc_nop.patch b/meta-fsl-ppc/recipes-devtools/binutils/files/bin.e500mc_nop.patch deleted file mode 100644 index 9c9d52ca..00000000 --- a/meta-fsl-ppc/recipes-devtools/binutils/files/bin.e500mc_nop.patch +++ /dev/null @@ -1,114 +0,0 @@ -Generate the preferred NOP: ori r0, r0, 0 in the place of ori r2, r2, 0 -and add the nop test cases in gas for e500mc64, e5500 and e6500. - -diff -ruN binutils-4.6.0-orig/gas/config/tc-ppc.c binutils-4.6.0-new/gas/config/tc-ppc.c ---- binutils-4.6.0-orig/gas/config/tc-ppc.c 2011-08-18 16:02:21.847979825 -0500 -+++ binutils-4.6.0-new/gas/config/tc-ppc.c 2011-08-19 10:09:19.888849978 -0500 -@@ -5815,8 +5817,14 @@ - } - - if ((ppc_cpu & PPC_OPCODE_POWER7) != 0) -- /* power7 group terminating nop: "ori 2,2,0". */ -- md_number_to_chars (dest, 0x60420000, 4); -+ { -+ if (ppc_cpu & PPC_OPCODE_E500MC) -+ /* e500mc group terminating nop: "ori 0,0,0". */ -+ md_number_to_chars (dest, 0x60000000, 4); -+ else -+ /* power7 group terminating nop: "ori 2,2,0". */ -+ md_number_to_chars (dest, 0x60420000, 4); -+ } - else - /* power6 group terminating nop: "ori 1,1,0". */ - md_number_to_chars (dest, 0x60210000, 4); -diff -ruN binutils-4.6.0-orig/gas/testsuite/gas/ppc/e500mc64_nop.d binutils-4.6.0-new/gas/testsuite/gas/ppc/e500mc64_nop.d ---- binutils-4.6.0-orig/gas/testsuite/gas/ppc/e500mc64_nop.d 1969-12-31 18:00:00.000000000 -0600 -+++ binutils-4.6.0-new/gas/testsuite/gas/ppc/e500mc64_nop.d 2011-08-19 10:16:29.561849966 -0500 -@@ -0,0 +1,13 @@ -+#as: -mppc -me500mc64 -+#objdump: -dr -Me500mc64 -+#name: Power E500MC64 nop tests -+ -+.*: +file format elf(32)?(64)?-powerpc.* -+ -+Disassembly of section \.text: -+ -+0+00 : -+ 0: 60 00 00 00 nop -+ 4: 60 00 00 00 nop -+ 8: 60 00 00 00 nop -+ c: 60 00 00 00 nop -diff -ruN binutils-4.6.0-orig/gas/testsuite/gas/ppc/e500mc64_nop.s binutils-4.6.0-new/gas/testsuite/gas/ppc/e500mc64_nop.s ---- binutils-4.6.0-orig/gas/testsuite/gas/ppc/e500mc64_nop.s 1969-12-31 18:00:00.000000000 -0600 -+++ binutils-4.6.0-new/gas/testsuite/gas/ppc/e500mc64_nop.s 2011-08-19 10:16:29.561849966 -0500 -@@ -0,0 +1,5 @@ -+# Power E500MC64 nop tests -+ .section ".text" -+start: -+ nop -+ .p2align 4,,15 -diff -ruN binutils-4.6.0-orig/gas/testsuite/gas/ppc/e5500_nop.d binutils-4.6.0-new/gas/testsuite/gas/ppc/e5500_nop.d ---- binutils-4.6.0-orig/gas/testsuite/gas/ppc/e5500_nop.d 1969-12-31 18:00:00.000000000 -0600 -+++ binutils-4.6.0-new/gas/testsuite/gas/ppc/e5500_nop.d 2011-08-19 10:16:29.561849966 -0500 -@@ -0,0 +1,13 @@ -+#as: -mppc -me5500 -+#objdump: -dr -Me5500 -+#name: Power E5500 nop tests -+ -+.*: +file format elf(32)?(64)?-powerpc.* -+ -+Disassembly of section \.text: -+ -+0+00 : -+ 0: 60 00 00 00 nop -+ 4: 60 00 00 00 nop -+ 8: 60 00 00 00 nop -+ c: 60 00 00 00 nop -diff -ruN binutils-4.6.0-orig/gas/testsuite/gas/ppc/e5500_nop.s binutils-4.6.0-new/gas/testsuite/gas/ppc/e5500_nop.s ---- binutils-4.6.0-orig/gas/testsuite/gas/ppc/e5500_nop.s 1969-12-31 18:00:00.000000000 -0600 -+++ binutils-4.6.0-new/gas/testsuite/gas/ppc/e5500_nop.s 2011-08-19 10:16:29.561849966 -0500 -@@ -0,0 +1,5 @@ -+# Power E5500 nop tests -+ .section ".text" -+start: -+ nop -+ .p2align 4,,15 -diff -ruN binutils-4.6.0-orig/gas/testsuite/gas/ppc/e6500_nop.d binutils-4.6.0-new/gas/testsuite/gas/ppc/e6500_nop.d ---- binutils-4.6.0-orig/gas/testsuite/gas/ppc/e6500_nop.d 1969-12-31 18:00:00.000000000 -0600 -+++ binutils-4.6.0-new/gas/testsuite/gas/ppc/e6500_nop.d 2011-08-19 10:16:29.561849966 -0500 -@@ -0,0 +1,13 @@ -+#as: -mppc -me6500 -+#objdump: -dr -Me6500 -+#name: Power E6500 nop tests -+ -+.*: +file format elf(32)?(64)?-powerpc.* -+ -+Disassembly of section \.text: -+ -+0+00 : -+ 0: 60 00 00 00 nop -+ 4: 60 00 00 00 nop -+ 8: 60 00 00 00 nop -+ c: 60 00 00 00 nop -diff -ruN binutils-4.6.0-orig/gas/testsuite/gas/ppc/e6500_nop.s binutils-4.6.0-new/gas/testsuite/gas/ppc/e6500_nop.s ---- binutils-4.6.0-orig/gas/testsuite/gas/ppc/e6500_nop.s 1969-12-31 18:00:00.000000000 -0600 -+++ binutils-4.6.0-new/gas/testsuite/gas/ppc/e6500_nop.s 2011-08-19 10:16:29.562849956 -0500 -@@ -0,0 +1,5 @@ -+# Power E6500 nop tests -+ .section ".text" -+start: -+ nop -+ .p2align 4,,15 -diff -ruN binutils-4.6.0-orig/gas/testsuite/gas/ppc/ppc.exp binutils-4.6.0-new/gas/testsuite/gas/ppc/ppc.exp ---- binutils-4.6.0-orig/gas/testsuite/gas/ppc/ppc.exp 2011-08-19 10:15:29.445978575 -0500 -+++ binutils-4.6.0-new/gas/testsuite/gas/ppc/ppc.exp 2011-08-19 10:16:17.827852501 -0500 -@@ -43,6 +43,9 @@ - run_dump_test "ppc750ps" - run_dump_test "e500mc" - run_dump_test "e6500" -+ run_dump_test "e500mc64_nop" -+ run_dump_test "e5500_nop" -+ run_dump_test "e6500_nop" - run_dump_test "a2" - run_dump_test "cell" - run_dump_test "common" diff --git a/meta-fsl-ppc/recipes-devtools/binutils/files/bin.e5500.patch b/meta-fsl-ppc/recipes-devtools/binutils/files/bin.e5500.patch deleted file mode 100644 index 800590c3..00000000 --- a/meta-fsl-ppc/recipes-devtools/binutils/files/bin.e5500.patch +++ /dev/null @@ -1,102 +0,0 @@ -bin.e5500 - -Implements target e5500 and -me5500, etc.. - -diff -r -u binutils-2.21-20110211-orig/bfd/archures.c binutils-2.21-20110211/bfd/archures.c ---- binutils-2.21-20110211-orig/bfd/archures.c 2010-12-30 18:33:31.000000000 -0600 -+++ binutils-2.21-20110211/bfd/archures.c 2011-02-14 13:17:00.528340236 -0600 -@@ -234,6 +234,7 @@ - .#define bfd_mach_ppc_e500 500 - .#define bfd_mach_ppc_e500mc 5001 - .#define bfd_mach_ppc_e500mc64 5005 -+.#define bfd_mach_ppc_e5500 5006 - .#define bfd_mach_ppc_titan 83 - . bfd_arch_rs6000, {* IBM RS/6000 *} - .#define bfd_mach_rs6k 6000 -diff -r -u binutils-2.21-20110211-orig/bfd/bfd-in2.h binutils-2.21-20110211/bfd/bfd-in2.h ---- binutils-2.21-20110211-orig/bfd/bfd-in2.h 2011-02-11 10:57:58.000000000 -0600 -+++ binutils-2.21-20110211/bfd/bfd-in2.h 2011-02-14 13:19:57.365092179 -0600 -@@ -1921,6 +1921,7 @@ - #define bfd_mach_ppc_e500 500 - #define bfd_mach_ppc_e500mc 5001 - #define bfd_mach_ppc_e500mc64 5005 -+#define bfd_mach_ppc_e5500 5006 - #define bfd_mach_ppc_titan 83 - bfd_arch_rs6000, /* IBM RS/6000 */ - #define bfd_mach_rs6k 6000 -diff -r -u binutils-2.21-20110211-orig/bfd/cpu-powerpc.c binutils-2.21-20110211/bfd/cpu-powerpc.c ---- binutils-2.21-20110211-orig/bfd/cpu-powerpc.c 2010-02-07 19:59:34.000000000 -0600 -+++ binutils-2.21-20110211/bfd/cpu-powerpc.c 2011-02-14 13:21:48.802403135 -0600 -@@ -352,6 +352,20 @@ - FALSE, /* not the default */ - powerpc_compatible, - bfd_default_scan, -+ &bfd_powerpc_archs[19] -+ }, -+ { -+ 64, /* 64 bits in a word */ -+ 64, /* 64 bits in an address */ -+ 8, /* 8 bits in a byte */ -+ bfd_arch_powerpc, -+ bfd_mach_ppc_e5500, -+ "powerpc", -+ "powerpc:e5500", -+ 3, -+ FALSE, /* not the default */ -+ powerpc_compatible, -+ bfd_default_scan, - 0 - } - }; -diff -r -u binutils-2.21-20110211-orig/gas/config/tc-ppc.c binutils-2.21-20110211/gas/config/tc-ppc.c ---- binutils-2.21-20110211-orig/gas/config/tc-ppc.c 2011-02-11 10:58:01.000000000 -0600 -+++ binutils-2.21-20110211/gas/config/tc-ppc.c 2011-02-14 13:23:39.478340515 -0600 -@@ -1235,6 +1235,7 @@ - -me500, -me500x2 generate code for Motorola e500 core complex\n\ - -me500mc, generate code for Freescale e500mc core complex\n\ - -me500mc64, generate code for Freescale e500mc64 core complex\n\ -+-me5500, generate code for Freescale e5500 core complex\n\ - -mspe generate code for Motorola SPE instructions\n\ - -mtitan generate code for AppliedMicro Titan core complex\n\ - -mregnames Allow symbolic names for registers\n\ -diff -r -u binutils-2.21-20110211-orig/gas/doc/as.texinfo binutils-2.21-20110211/gas/doc/as.texinfo ---- binutils-2.21-20110211-orig/gas/doc/as.texinfo 2011-02-11 10:58:01.000000000 -0600 -+++ binutils-2.21-20110211/gas/doc/as.texinfo 2011-02-14 13:26:01.383403323 -0600 -@@ -431,7 +431,7 @@ - [@b{-a32}|@b{-a64}] - [@b{-mpwrx}|@b{-mpwr2}|@b{-mpwr}|@b{-m601}|@b{-mppc}|@b{-mppc32}|@b{-m603}|@b{-m604}|@b{-m403}|@b{-m405}| - @b{-m440}|@b{-m464}|@b{-m476}|@b{-m7400}|@b{-m7410}|@b{-m7450}|@b{-m7455}|@b{-m750cl}|@b{-mppc64}| -- @b{-m620}|@b{-me500}|@b{-e500x2}|@b{-me500mc}|@b{-me500mc64}|@b{-mppc64bridge}|@b{-mbooke}| -+ @b{-m620}|@b{-me500}|@b{-e500x2}|@b{-me500mc}|@b{-me500mc64}|@b{-me5500}|@b{-mppc64bridge}|@b{-mbooke}| - @b{-mpower4}|@b{-mpr4}|@b{-mpower5}|@b{-mpwr5}|@b{-mpwr5x}|@b{-mpower6}|@b{-mpwr6}| - @b{-mpower7}|@b{-mpw7}|@b{-ma2}|@b{-mcell}|@b{-mspe}|@b{-mtitan}|@b{-me300}|@b{-mcom}] - [@b{-many}] [@b{-maltivec}|@b{-mvsx}] -diff -r -u binutils-2.21-20110211-orig/gas/doc/c-ppc.texi binutils-2.21-20110211/gas/doc/c-ppc.texi ---- binutils-2.21-20110211-orig/gas/doc/c-ppc.texi 2011-02-11 10:58:04.000000000 -0600 -+++ binutils-2.21-20110211/gas/doc/c-ppc.texi 2011-02-14 13:26:31.140090956 -0600 -@@ -88,6 +88,9 @@ - @item -me500mc64 - Generate code for Freescale e500mc64 core complex. - -+@item -me5500 -+Generate code for Freescale e5500 core complex. -+ - @item -mspe - Generate code for Motorola SPE instructions. - -diff -r -u binutils-2.21-20110211-orig/opcodes/ppc-dis.c binutils-2.21-20110211/opcodes/ppc-dis.c ---- binutils-2.21-20110211-orig/opcodes/ppc-dis.c 2010-07-03 03:27:23.000000000 -0500 -+++ binutils-2.21-20110211/opcodes/ppc-dis.c 2011-02-14 13:28:54.384090879 -0600 -@@ -114,6 +114,12 @@ - | PPC_OPCODE_E500MC | PPC_OPCODE_64 | PPC_OPCODE_POWER5 - | PPC_OPCODE_POWER6 | PPC_OPCODE_POWER7), - 0 }, -+ { "e5500", (PPC_OPCODE_PPC | PPC_OPCODE_BOOKE | PPC_OPCODE_ISEL -+ | PPC_OPCODE_PMR | PPC_OPCODE_CACHELCK | PPC_OPCODE_RFMCI -+ | PPC_OPCODE_E500MC | PPC_OPCODE_64 | PPC_OPCODE_POWER4 -+ | PPC_OPCODE_POWER5 | PPC_OPCODE_POWER6 -+ | PPC_OPCODE_POWER7), -+ 0 }, - { "e500x2", (PPC_OPCODE_PPC | PPC_OPCODE_BOOKE | PPC_OPCODE_SPE - | PPC_OPCODE_ISEL | PPC_OPCODE_EFS | PPC_OPCODE_BRLOCK - | PPC_OPCODE_PMR | PPC_OPCODE_CACHELCK | PPC_OPCODE_RFMCI diff --git a/meta-fsl-ppc/recipes-devtools/binutils/files/bin.e6500-2.patch b/meta-fsl-ppc/recipes-devtools/binutils/files/bin.e6500-2.patch deleted file mode 100644 index e8633233..00000000 --- a/meta-fsl-ppc/recipes-devtools/binutils/files/bin.e6500-2.patch +++ /dev/null @@ -1,674 +0,0 @@ -bin.e6500-2 -Implements target e6500 and -me6500, etc.. - -Also enables some cell instructions but using different opcodes. (This -should be temporary until new mnemonics are chosen. Likely to be -defined only when ISA 2.07 comes out) - -Also implements new altivec instructions, and a few other e6500 -instructions like miso, and sync with two arguments. - -diff -ruN binutils-2.21-20110211-e5500/bfd/archures.c binutils-2.21-20110211-e6500/bfd/archures.c ---- binutils-2.21-20110211-e5500/bfd/archures.c 2011-05-03 16:04:03.828069461 -0500 -+++ binutils-2.21-20110211-e6500/bfd/archures.c 2011-05-03 16:04:15.253938636 -0500 -@@ -235,6 +235,7 @@ - .#define bfd_mach_ppc_e500mc 5001 - .#define bfd_mach_ppc_e500mc64 5005 - .#define bfd_mach_ppc_e5500 5006 -+.#define bfd_mach_ppc_e6500 5007 - .#define bfd_mach_ppc_titan 83 - . bfd_arch_rs6000, {* IBM RS/6000 *} - .#define bfd_mach_rs6k 6000 -diff -ruN binutils-2.21-20110211-e5500/bfd/bfd-in2.h binutils-2.21-20110211-e6500/bfd/bfd-in2.h ---- binutils-2.21-20110211-e5500/bfd/bfd-in2.h 2011-05-03 16:04:03.836064584 -0500 -+++ binutils-2.21-20110211-e6500/bfd/bfd-in2.h 2011-05-03 16:04:15.260938268 -0500 -@@ -1922,6 +1922,7 @@ - #define bfd_mach_ppc_e500mc 5001 - #define bfd_mach_ppc_e500mc64 5005 - #define bfd_mach_ppc_e5500 5006 -+#define bfd_mach_ppc_e6500 5007 - #define bfd_mach_ppc_titan 83 - bfd_arch_rs6000, /* IBM RS/6000 */ - #define bfd_mach_rs6k 6000 -diff -ruN binutils-2.21-20110211-e5500/bfd/cpu-powerpc.c binutils-2.21-20110211-e6500/bfd/cpu-powerpc.c ---- binutils-2.21-20110211-e5500/bfd/cpu-powerpc.c 2011-05-03 16:04:03.839066505 -0500 -+++ binutils-2.21-20110211-e6500/bfd/cpu-powerpc.c 2011-05-03 16:04:15.272066052 -0500 -@@ -366,6 +366,20 @@ - FALSE, /* not the default */ - powerpc_compatible, - bfd_default_scan, -+ &bfd_powerpc_archs[20] -+ }, -+ { -+ 64, /* 64 bits in a word */ -+ 64, /* 64 bits in an address */ -+ 8, /* 8 bits in a byte */ -+ bfd_arch_powerpc, -+ bfd_mach_ppc_e6500, -+ "powerpc", -+ "powerpc:e6500", -+ 3, -+ FALSE, /* not the default */ -+ powerpc_compatible, -+ bfd_default_scan, - 0 - } - }; -diff -ruN binutils-2.21-20110211-e5500/gas/config/tc-ppc.c binutils-2.21-20110211-e6500/gas/config/tc-ppc.c ---- binutils-2.21-20110211-e5500/gas/config/tc-ppc.c 2011-05-03 16:04:03.847063157 -0500 -+++ binutils-2.21-20110211-e6500/gas/config/tc-ppc.c 2011-05-03 16:04:15.279062744 -0500 -@@ -1236,6 +1236,7 @@ - -me500mc, generate code for Freescale e500mc core complex\n\ - -me500mc64, generate code for Freescale e500mc64 core complex\n\ - -me5500, generate code for Freescale e5500 core complex\n\ -+-me6500, generate code for Freescale e6500 core complex\n\ - -mspe generate code for Motorola SPE instructions\n\ - -mtitan generate code for AppliedMicro Titan core complex\n\ - -mregnames Allow symbolic names for registers\n\ -diff -ruN binutils-2.21-20110211-e5500/gas/doc/as.texinfo binutils-2.21-20110211-e6500/gas/doc/as.texinfo ---- binutils-2.21-20110211-e5500/gas/doc/as.texinfo 2011-05-03 16:04:03.857062970 -0500 -+++ binutils-2.21-20110211-e6500/gas/doc/as.texinfo 2011-05-03 16:04:15.289062767 -0500 -@@ -431,8 +431,8 @@ - [@b{-a32}|@b{-a64}] - [@b{-mpwrx}|@b{-mpwr2}|@b{-mpwr}|@b{-m601}|@b{-mppc}|@b{-mppc32}|@b{-m603}|@b{-m604}|@b{-m403}|@b{-m405}| - @b{-m440}|@b{-m464}|@b{-m476}|@b{-m7400}|@b{-m7410}|@b{-m7450}|@b{-m7455}|@b{-m750cl}|@b{-mppc64}| -- @b{-m620}|@b{-me500}|@b{-e500x2}|@b{-me500mc}|@b{-me500mc64}|@b{-me5500}|@b{-mppc64bridge}|@b{-mbooke}| -- @b{-mpower4}|@b{-mpr4}|@b{-mpower5}|@b{-mpwr5}|@b{-mpwr5x}|@b{-mpower6}|@b{-mpwr6}| -+ @b{-m620}|@b{-me500}|@b{-e500x2}|@b{-me500mc}|@b{-me500mc64}|@b{-me5500}|@b{-me6500}|@b{-mppc64bridge}| -+ @b{-mbooke}|@b{-mpower4}|@b{-mpr4}|@b{-mpower5}|@b{-mpwr5}|@b{-mpwr5x}|@b{-mpower6}|@b{-mpwr6}| - @b{-mpower7}|@b{-mpw7}|@b{-ma2}|@b{-mcell}|@b{-mspe}|@b{-mtitan}|@b{-me300}|@b{-mcom}] - [@b{-many}] [@b{-maltivec}|@b{-mvsx}] - [@b{-mregnames}|@b{-mno-regnames}] -diff -ruN binutils-2.21-20110211-e5500/gas/doc/c-ppc.texi binutils-2.21-20110211-e6500/gas/doc/c-ppc.texi ---- binutils-2.21-20110211-e5500/gas/doc/c-ppc.texi 2011-05-03 16:04:03.859065711 -0500 -+++ binutils-2.21-20110211-e6500/gas/doc/c-ppc.texi 2011-05-03 16:04:15.291064458 -0500 -@@ -91,6 +91,9 @@ - @item -me5500 - Generate code for Freescale e5500 core complex. - -+@item -me6500 -+Generate code for Freescale e6500 core complex. -+ - @item -mspe - Generate code for Motorola SPE instructions. - -diff -ruN binutils-2.21-20110211-e5500/gas/testsuite/gas/ppc/e6500.d binutils-2.21-20110211-e6500/gas/testsuite/gas/ppc/e6500.d ---- binutils-2.21-20110211-e5500/gas/testsuite/gas/ppc/e6500.d 1969-12-31 18:00:00.000000000 -0600 -+++ binutils-2.21-20110211-e6500/gas/testsuite/gas/ppc/e6500.d 2011-05-03 17:04:13.611815418 -0500 -@@ -0,0 +1,75 @@ -+#as: -mppc -me6500 -+#objdump: -dr -Me6500 -+#name: Power E6500 tests -+ -+.*: +file format elf(32)?(64)?-powerpc.* -+ -+Disassembly of section \.text: -+ -+0+00 : -+ 0: 10 01 10 c0 vabsdub v0,v1,v2 -+ 4: 10 01 11 00 vabsduh v0,v1,v2 -+ 8: 10 01 11 40 vabsduw v0,v1,v2 -+ c: 7c 01 10 dc mvidsplt v0,r1,r2 -+ 10: 7c 01 11 1c mviwsplt v0,r1,r2 -+ 14: 7c 00 12 0a lvexbx v0,0,r2 -+ 18: 7c 01 12 0a lvexbx v0,r1,r2 -+ 1c: 7c 00 12 4a lvexhx v0,0,r2 -+ 20: 7c 01 12 4a lvexhx v0,r1,r2 -+ 24: 7c 00 12 8a lvexwx v0,0,r2 -+ 28: 7c 01 12 8a lvexwx v0,r1,r2 -+ 2c: 7c 00 13 0a stvexbx v0,0,r2 -+ 30: 7c 01 13 0a stvexbx v0,r1,r2 -+ 34: 7c 00 13 4a stvexhx v0,0,r2 -+ 38: 7c 01 13 4a stvexhx v0,r1,r2 -+ 3c: 7c 00 13 8a stvexwx v0,0,r2 -+ 40: 7c 01 13 8a stvexwx v0,r1,r2 -+ 44: 7c 00 12 4e lvepx v0,0,r2 -+ 48: 7c 01 12 4e lvepx v0,r1,r2 -+ 4c: 7c 00 12 0e lvepxl v0,0,r2 -+ 50: 7c 01 12 0e lvepxl v0,r1,r2 -+ 54: 7c 00 16 4e stvepx v0,0,r2 -+ 58: 7c 01 16 4e stvepx v0,r1,r2 -+ 5c: 7c 00 16 0e stvepxl v0,0,r2 -+ 60: 7c 01 16 0e stvepxl v0,r1,r2 -+ 64: 7c 00 14 8a lvlx v0,0,r2 -+ 68: 7c 01 14 8a lvlx v0,r1,r2 -+ 6c: 7c 00 16 8a lvlxl v0,0,r2 -+ 70: 7c 01 16 8a lvlxl v0,r1,r2 -+ 74: 7c 00 14 4a lvrx v0,0,r2 -+ 78: 7c 01 14 4a lvrx v0,r1,r2 -+ 7c: 7c 00 16 4a lvrxl v0,0,r2 -+ 80: 7c 01 16 4a lvrxl v0,r1,r2 -+ 84: 7c 00 15 8a stvlx v0,0,r2 -+ 88: 7c 01 15 8a stvlx v0,r1,r2 -+ 8c: 7c 00 17 8a stvlxl v0,0,r2 -+ 90: 7c 01 17 8a stvlxl v0,r1,r2 -+ 94: 7c 00 15 4a stvrx v0,0,r2 -+ 98: 7c 01 15 4a stvrx v0,r1,r2 -+ 9c: 7c 00 17 4a stvrxl v0,0,r2 -+ a0: 7c 01 17 4a stvrxl v0,r1,r2 -+ a4: 7c 00 14 ca lvswx v0,0,r2 -+ a8: 7c 01 14 ca lvswx v0,r1,r2 -+ ac: 7c 00 16 ca lvswxl v0,0,r2 -+ b0: 7c 01 16 ca lvswxl v0,r1,r2 -+ b4: 7c 00 15 ca stvswx v0,0,r2 -+ b8: 7c 01 15 ca stvswx v0,r1,r2 -+ bc: 7c 00 17 ca stvswxl v0,0,r2 -+ c0: 7c 01 17 ca stvswxl v0,r1,r2 -+ c4: 7c 00 16 0a lvsm v0,0,r2 -+ c8: 7c 01 16 0a lvsm v0,r1,r2 -+ cc: 7f 5a d3 78 miso -+ d0: 7c 00 04 ac sync -+ d4: 7c 00 04 ac sync -+ d8: 7c 20 04 ac lwsync -+ dc: 7c 00 04 ac sync -+ e0: 7c 07 04 ac sync 0,7 -+ e4: 7c 28 04 ac sync 1,8 -+ e8: 7c 00 00 c3 dni 0,0 -+ ec: 7f ff 00 c3 dni 31,31 -+ f0: 7c 40 0b 4d dcblq. 2,0,r1 -+ f4: 7c 43 0b 4d dcblq. 2,r3,r1 -+ f8: 7c 40 09 8d icblq. 2,0,r1 -+ fc: 7c 43 09 8d icblq. 2,r3,r1 -+ 100: 7c 10 02 dc mftmr r0,16 -+ 104: 7c 10 03 dc mttmr 16,r0 -diff -ruN binutils-2.21-20110211-e5500/gas/testsuite/gas/ppc/e6500.s binutils-2.21-20110211-e6500/gas/testsuite/gas/ppc/e6500.s ---- binutils-2.21-20110211-e5500/gas/testsuite/gas/ppc/e6500.s 1969-12-31 18:00:00.000000000 -0600 -+++ binutils-2.21-20110211-e6500/gas/testsuite/gas/ppc/e6500.s 2011-05-03 16:35:30.724819687 -0500 -@@ -0,0 +1,69 @@ -+# Power E6500 tests -+ .section ".text" -+start: -+ vabsdub 0, 1, 2 -+ vabsduh 0, 1, 2 -+ vabsduw 0, 1, 2 -+ mvidsplt 0, 1, 2 -+ mviwsplt 0, 1, 2 -+ lvexbx 0, 0, 2 -+ lvexbx 0, 1, 2 -+ lvexhx 0, 0, 2 -+ lvexhx 0, 1, 2 -+ lvexwx 0, 0, 2 -+ lvexwx 0, 1, 2 -+ stvexbx 0, 0, 2 -+ stvexbx 0, 1, 2 -+ stvexhx 0, 0, 2 -+ stvexhx 0, 1, 2 -+ stvexwx 0, 0, 2 -+ stvexwx 0, 1, 2 -+ lvepx 0, 0, 2 -+ lvepx 0, 1, 2 -+ lvepxl 0, 0, 2 -+ lvepxl 0, 1, 2 -+ stvepx 0, 0, 2 -+ stvepx 0, 1, 2 -+ stvepxl 0, 0, 2 -+ stvepxl 0, 1, 2 -+ lvlx 0, 0, 2 -+ lvlx 0, 1, 2 -+ lvlxl 0, 0, 2 -+ lvlxl 0, 1, 2 -+ lvrx 0, 0, 2 -+ lvrx 0, 1, 2 -+ lvrxl 0, 0, 2 -+ lvrxl 0, 1, 2 -+ stvlx 0, 0, 2 -+ stvlx 0, 1, 2 -+ stvlxl 0, 0, 2 -+ stvlxl 0, 1, 2 -+ stvrx 0, 0, 2 -+ stvrx 0, 1, 2 -+ stvrxl 0, 0, 2 -+ stvrxl 0, 1, 2 -+ lvswx 0, 0, 2 -+ lvswx 0, 1, 2 -+ lvswxl 0, 0, 2 -+ lvswxl 0, 1, 2 -+ stvswx 0, 0, 2 -+ stvswx 0, 1, 2 -+ stvswxl 0, 0, 2 -+ stvswxl 0, 1, 2 -+ lvsm 0, 0, 2 -+ lvsm 0, 1, 2 -+ miso -+ sync -+ sync 0,0 -+ sync 1,0 -+ sync 2,0 -+ sync 3,7 -+ sync 3,8 -+ dni 0,0 -+ dni 31,31 -+ dcblq. 2,0,1 -+ dcblq. 2,3,1 -+ icblq. 2,0,1 -+ icblq. 2,3,1 -+ mftmr 0,16 -+ mttmr 16,0 -diff -ruN binutils-2.21-20110211-e5500/gas/testsuite/gas/ppc/ppc.exp binutils-2.21-20110211-e6500/gas/testsuite/gas/ppc/ppc.exp ---- binutils-2.21-20110211-e5500/gas/testsuite/gas/ppc/ppc.exp 2010-02-07 19:59:38.000000000 -0600 -+++ binutils-2.21-20110211-e6500/gas/testsuite/gas/ppc/ppc.exp 2011-05-03 16:04:15.297067070 -0500 -@@ -42,6 +42,7 @@ - run_list_test "range" "-a32" - run_dump_test "ppc750ps" - run_dump_test "e500mc" -+ run_dump_test "e6500" - run_dump_test "a2" - run_dump_test "cell" - run_dump_test "common" -diff -ruN binutils-2.21-20110211-e5500/include/opcode/ppc.h binutils-2.21-20110211-e6500/include/opcode/ppc.h ---- binutils-2.21-20110211-e5500/include/opcode/ppc.h 2010-07-03 01:51:53.000000000 -0500 -+++ binutils-2.21-20110211-e6500/include/opcode/ppc.h 2011-05-03 16:04:15.298069340 -0500 -@@ -174,6 +174,15 @@ - /* Opcode which is supported by the e500 family */ - #define PPC_OPCODE_E500 0x100000000ull - -+/* Opcode is supported by Extended Altivec Vector Unit */ -+#define PPC_OPCODE_ALTIVEC2 0x200000000ull -+ -+/* Opcode is supported by Power E6500 */ -+#define PPC_OPCODE_E6500 0x400000000ull -+ -+/* Opcode is supported by Thread management APU */ -+#define PPC_OPCODE_TMR 0x800000000ull -+ - /* A macro to extract the major opcode from an instruction. */ - #define PPC_OP(i) (((i) >> 26) & 0x3f) - -diff -ruN binutils-2.21-20110211-e5500/opcodes/ppc-dis.c binutils-2.21-20110211-e6500/opcodes/ppc-dis.c ---- binutils-2.21-20110211-e5500/opcodes/ppc-dis.c 2011-05-03 16:04:03.862065832 -0500 -+++ binutils-2.21-20110211-e6500/opcodes/ppc-dis.c 2011-05-03 16:04:15.300067851 -0500 -@@ -120,6 +120,12 @@ - | PPC_OPCODE_POWER5 | PPC_OPCODE_POWER6 - | PPC_OPCODE_POWER7), - 0 }, -+ { "e6500", (PPC_OPCODE_PPC | PPC_OPCODE_BOOKE | PPC_OPCODE_ISEL -+ | PPC_OPCODE_PMR | PPC_OPCODE_CACHELCK | PPC_OPCODE_RFMCI -+ | PPC_OPCODE_E500MC | PPC_OPCODE_64 | PPC_OPCODE_ALTIVEC -+ | PPC_OPCODE_ALTIVEC2 | PPC_OPCODE_E6500 | PPC_OPCODE_POWER4 -+ | PPC_OPCODE_POWER5 | PPC_OPCODE_POWER6 | PPC_OPCODE_POWER7), -+ 0 }, - { "e500x2", (PPC_OPCODE_PPC | PPC_OPCODE_BOOKE | PPC_OPCODE_SPE - | PPC_OPCODE_ISEL | PPC_OPCODE_EFS | PPC_OPCODE_BRLOCK - | PPC_OPCODE_PMR | PPC_OPCODE_CACHELCK | PPC_OPCODE_RFMCI -diff -ruN binutils-2.21-20110211-e5500/opcodes/ppc-opc.c binutils-2.21-20110211-e6500/opcodes/ppc-opc.c ---- binutils-2.21-20110211-e5500/opcodes/ppc-opc.c 2011-02-11 10:58:12.000000000 -0600 -+++ binutils-2.21-20110211-e6500/opcodes/ppc-opc.c 2011-05-03 17:22:20.260813917 -0500 -@@ -53,6 +53,7 @@ - static long extract_boe (unsigned long, ppc_cpu_t, int *); - static unsigned long insert_fxm (unsigned long, long, ppc_cpu_t, const char **); - static long extract_fxm (unsigned long, ppc_cpu_t, int *); -+static unsigned long insert_ls (unsigned long, long, ppc_cpu_t, const char **); - static unsigned long insert_mbe (unsigned long, long, ppc_cpu_t, const char **); - static long extract_mbe (unsigned long, ppc_cpu_t, int *); - static unsigned long insert_mb6 (unsigned long, long, ppc_cpu_t, const char **); -@@ -450,6 +451,7 @@ - lower 5 bits are stored in the upper 5 and vice- versa. */ - #define SPR SISIGNOPT + 1 - #define PMR SPR -+#define TMR SPR - #define SPR_MASK (0x3ff << 11) - { 0x3ff, 11, insert_spr, extract_spr, 0 }, - -@@ -472,8 +474,12 @@ - #define T STRM - { 0x3, 21, NULL, NULL, 0 }, - -+ /* The ESYNC field in an X (sync) form instruction. */ -+#define ESYNC STRM + 1 -+ { 0xf, 16, insert_ls, NULL, PPC_OPERAND_OPTIONAL }, -+ - /* The SV field in a POWER SC form instruction. */ --#define SV STRM + 1 -+#define SV ESYNC + 1 - { 0x3fff, 2, NULL, NULL, 0 }, - - /* The TBR field in an XFX form instruction. This is like the SPR -@@ -515,6 +521,7 @@ - - /* The UIMM field in a VX form instruction. */ - #define UIMM SIMM + 1 -+#define DCTL UIMM - { 0x1f, 16, NULL, NULL, 0 }, - - /* The SHB field in a VA form instruction. */ -@@ -996,6 +1003,32 @@ - return mask; - } - -+/* The LS field in a sync instruction that accepts 2 operands -+ Values 2 and 3 are reserved, -+ must be treated as 0 for future compatibility -+ Values 0 and 1 can be accepted, if field ESYNC is zero -+ Otherwise L = complement of ESYNC-bit2 (1<<18) */ -+ -+static unsigned long -+insert_ls (unsigned long insn, -+ long value, -+ ppc_cpu_t dialect ATTRIBUTE_UNUSED, -+ const char **errmsg ATTRIBUTE_UNUSED) -+{ -+ unsigned long ls; -+ -+ ls = (insn >> 21) & 0x03; -+ if (value == 0) -+ { -+ if (ls > 1) -+ return insn & ~(0x3 << 21); -+ return insn; -+ } -+ if ((value & 0x2) != 0) -+ return (insn & ~(0x3 << 21)) | ((value & 0xf) << 16); -+ return (insn & ~(0x3 << 21)) | (0x1 << 21) | ((value & 0xf) << 16); -+} -+ - /* The MB and ME fields in an M form instruction expressed as a single - operand which is itself a bitmask. The extraction function always - marks it as invalid, since we never want to recognize an -@@ -1728,6 +1761,9 @@ - /* An X form sync instruction with everything filled in except the LS field. */ - #define XSYNC_MASK (0xff9fffff) - -+/* An X form sync instruction with everything filled in except the L and E fields. */ -+#define XSYNCLE_MASK (0xff90ffff) -+ - /* An X_MASK, but with the EH bit clear. */ - #define XEH_MASK (X_MASK & ~((unsigned long )1)) - -@@ -1922,6 +1958,7 @@ - #define PPC860 PPC - #define PPCPS PPC_OPCODE_PPCPS - #define PPCVEC PPC_OPCODE_ALTIVEC -+#define PPCVEC2 PPC_OPCODE_ALTIVEC2 - #define PPCVSX PPC_OPCODE_VSX - #define POWER PPC_OPCODE_POWER - #define POWER2 PPC_OPCODE_POWER | PPC_OPCODE_POWER2 -@@ -1940,6 +1977,7 @@ - #define PPCEFS PPC_OPCODE_EFS - #define PPCBRLK PPC_OPCODE_BRLOCK - #define PPCPMR PPC_OPCODE_PMR -+#define PPCTMR PPC_OPCODE_TMR - #define PPCCHLK PPC_OPCODE_CACHELCK - #define PPCRFMCI PPC_OPCODE_RFMCI - #define E500MC PPC_OPCODE_E500MC -@@ -1947,6 +1985,7 @@ - #define TITAN PPC_OPCODE_TITAN - #define MULHW PPC_OPCODE_405 | PPC_OPCODE_440 | TITAN - #define E500 PPC_OPCODE_E500 -+#define E6500 PPC_OPCODE_E6500 - - /* The opcode table. - -@@ -2112,12 +2151,14 @@ - {"machhwsu", XO (4, 76,0,0),XO_MASK, MULHW, PPCNONE, {RT, RA, RB}}, - {"machhwsu.", XO (4, 76,0,1),XO_MASK, MULHW, PPCNONE, {RT, RA, RB}}, - {"ps_cmpo1", X (4, 96), X_MASK|(3<<21), PPCPS, PPCNONE, {BF, FRA, FRB}}, -+{"vabsdub", VX (4, 192), VX_MASK, PPCVEC2, PPCNONE, {VD, VA, VB}}, - {"vcmpeqfp", VXR(4, 198,0), VXR_MASK, PPCVEC, PPCNONE, {VD, VA, VB}}, - {"vpkuwus", VX (4, 206), VX_MASK, PPCVEC, PPCNONE, {VD, VA, VB}}, - {"machhws", XO (4, 108,0,0),XO_MASK, MULHW, PPCNONE, {RT, RA, RB}}, - {"machhws.", XO (4, 108,0,1),XO_MASK, MULHW, PPCNONE, {RT, RA, RB}}, - {"nmachhws", XO (4, 110,0,0),XO_MASK, MULHW, PPCNONE, {RT, RA, RB}}, - {"nmachhws.", XO (4, 110,0,1),XO_MASK, MULHW, PPCNONE, {RT, RA, RB}}, -+{"vabsduh", VX (4, 256), VX_MASK, PPCVEC2, PPCNONE, {VD, VA, VB}}, - {"vmaxsb", VX (4, 258), VX_MASK, PPCVEC, PPCNONE, {VD, VA, VB}}, - {"vslb", VX (4, 260), VX_MASK, PPCVEC, PPCNONE, {VD, VA, VB}}, - {"vmulosb", VX (4, 264), VX_MASK, PPCVEC, PPCNONE, {VD, VA, VB}}, -@@ -2130,6 +2171,7 @@ - {"mulchwu.", XRC(4, 136,1), X_MASK, MULHW, PPCNONE, {RT, RA, RB}}, - {"macchwu", XO (4, 140,0,0),XO_MASK, MULHW, PPCNONE, {RT, RA, RB}}, - {"macchwu.", XO (4, 140,0,1),XO_MASK, MULHW, PPCNONE, {RT, RA, RB}}, -+{"vabsduw", VX (4, 320), VX_MASK, PPCVEC2, PPCNONE, {VD, VA, VB}}, - {"vmaxsh", VX (4, 322), VX_MASK, PPCVEC, PPCNONE, {VD, VA, VB}}, - {"vslh", VX (4, 324), VX_MASK, PPCVEC, PPCNONE, {VD, VA, VB}}, - {"vmulosh", VX (4, 328), VX_MASK, PPCVEC, PPCNONE, {VD, VA, VB}}, -@@ -3613,6 +3655,8 @@ - - {"lbepx", X(31,95), X_MASK, E500MC|PPCA2, PPCNONE, {RT, RA, RB}}, - -+{"dni", XRC(31,97,1), XRB_MASK, E6500, PPCNONE, {DUI, DCTL}}, -+ - {"lvx", X(31,103), X_MASK, PPCVEC, PPCNONE, {VD, RA, RB}}, - {"lqfcmx", APU(31,103,0), APU_MASK, PPC405, PPCNONE, {FCRT, RA, RB}}, - -@@ -3622,6 +3666,8 @@ - {"mul", XO(31,107,0,0), XO_MASK, M601, PPCNONE, {RT, RA, RB}}, - {"mul.", XO(31,107,0,1), XO_MASK, M601, PPCNONE, {RT, RA, RB}}, - -+{"mvidsplt", X(31,110), X_MASK, PPCVEC2, PPCNONE, {VD, RA, RB}}, -+ - {"mtsrdin", X(31,114), XRA_MASK, PPC64, PPCNONE, {RS, RB}}, - - {"lharx", X(31,116), XEH_MASK, POWER7, PPCNONE, {RT, RA0, RB, EH}}, -@@ -3656,6 +3702,8 @@ - {"adde.", XO(31,138,0,1), XO_MASK, PPCCOM, PPCNONE, {RT, RA, RB}}, - {"ae.", XO(31,138,0,1), XO_MASK, PWRCOM, PPCNONE, {RT, RA, RB}}, - -+{"mviwsplt", X(31,142), X_MASK, PPCVEC2, PPCNONE, {VD, RA, RB}}, -+ - {"dcbtstlse", X(31,142), X_MASK, PPCCHLK, PPCNONE, {CT, RA, RB}}, - - {"mtcr", XFXM(31,144,0xff,0), XRARB_MASK, COM, PPCNONE, {RS}}, -@@ -3711,6 +3759,8 @@ - - {"prtyd", X(31,186), XRB_MASK, POWER6|PPCA2, PPCNONE, {RA, RS}}, - -+{"icblq.", XRC(31,198,1), X_MASK, E6500, PPCNONE, {CT, RA0, RB}}, -+ - {"stvewx", X(31,199), X_MASK, PPCVEC, PPCNONE, {VS, RA, RB}}, - {"stwfcmx", APU(31,199,0), APU_MASK, PPC405, PPCNONE, {FCRT, RA, RB}}, - -@@ -3788,8 +3838,12 @@ - {"mfdcrx", X(31,259), X_MASK, BOOKE|PPCA2|PPC476, TITAN, {RS, RA}}, - {"mfdcrx.", XRC(31,259,1), X_MASK, PPCA2, PPCNONE, {RS, RA}}, - -+{"lvexbx", X(31,261), X_MASK, PPCVEC2, PPCNONE, {VD, RA0, RB}}, -+ - {"icbt", X(31,262), XRT_MASK, PPC403, PPCNONE, {RA, RB}}, - -+{"lvepxl", X(31,263), X_MASK, PPCVEC2, PPCNONE, {VD, RA0, RB}}, -+ - {"ldfcmx", APU(31,263,0), APU_MASK, PPC405, PPCNONE, {FCRT, RA, RB}}, - {"doz", XO(31,264,0,0), XO_MASK, M601, PPCNONE, {RT, RA, RB}}, - {"doz.", XO(31,264,0,1), XO_MASK, M601, PPCNONE, {RT, RA, RB}}, -@@ -3823,6 +3877,9 @@ - - {"mfdcrux", X(31,291), X_MASK, PPC464, PPCNONE, {RS, RA}}, - -+{"lvexhx", X(31,293), X_MASK, PPCVEC2, PPCNONE, {VD, RA0, RB}}, -+{"lvepx", X(31,295), X_MASK, PPCVEC2, PPCNONE, {VD, RA0, RB}}, -+ - {"tlbie", X(31,306), XRTLRA_MASK, PPC, TITAN, {RB, L}}, - {"tlbi", X(31,306), XRT_MASK, POWER, PPCNONE, {RA0, RB}}, - -@@ -3874,6 +3931,8 @@ - {"mfdcr", X(31,323), X_MASK, PPC403|BOOKE|PPCA2|PPC476, TITAN, {RT, SPR}}, - {"mfdcr.", XRC(31,323,1), X_MASK, PPCA2, PPCNONE, {RT, SPR}}, - -+{"lvexwx", X(31,325), X_MASK, PPCVEC2, PPCNONE, {VD, RA0, RB}}, -+ - {"dcread", X(31,326), X_MASK, PPC476|TITAN, PPCNONE, {RT, RA, RB}}, - - {"div", XO(31,331,0,0), XO_MASK, M601, PPCNONE, {RT, RA, RB}}, -@@ -3882,6 +3941,7 @@ - {"lxvdsx", X(31,332), XX1_MASK, PPCVSX, PPCNONE, {XT6, RA, RB}}, - - {"mfpmr", X(31,334), X_MASK, PPCPMR|PPCE300, PPCNONE, {RT, PMR}}, -+{"mftmr", X(31,366), X_MASK, PPCTMR|E6500, PPCNONE, {RT, TMR}}, - - {"mfmq", XSPR(31,339, 0), XSPR_MASK, M601, PPCNONE, {RT}}, - {"mfxer", XSPR(31,339, 1), XSPR_MASK, COM, PPCNONE, {RT}}, -@@ -4112,6 +4172,8 @@ - {"mtdcrx", X(31,387), X_MASK, BOOKE|PPCA2|PPC476, TITAN, {RA, RS}}, - {"mtdcrx.", XRC(31,387,1), X_MASK, PPCA2, PPCNONE, {RA, RS}}, - -+{"stvexbx", X(31,389), X_MASK, PPCVEC2, PPCNONE, {VS, RA0, RB}}, -+ - {"dcblc", X(31,390), X_MASK, PPCCHLK|PPC476|TITAN, PPCNONE, {CT, RA, RB}}, - {"stdfcmx", APU(31,391,0), APU_MASK, PPC405, PPCNONE, {FCRT, RA, RB}}, - -@@ -4136,6 +4198,10 @@ - - {"mtdcrux", X(31,419), X_MASK, PPC464, PPCNONE, {RA, RS}}, - -+{"stvexhx", X(31,421), X_MASK, PPCVEC2, PPCNONE, {VS, RA0, RB}}, -+ -+{"dcblq.", XRC(31,422,1), X_MASK, E6500, PPCNONE, {CT, RA0, RB}}, -+ - {"divde", XO(31,425,0,0), XO_MASK, POWER7|PPCA2, PPCNONE, {RT, RA, RB}}, - {"divde.", XO(31,425,0,1), XO_MASK, POWER7|PPCA2, PPCNONE, {RT, RA, RB}}, - {"divwe", XO(31,427,0,0), XO_MASK, POWER7|PPCA2, PPCNONE, {RT, RA, RB}}, -@@ -4149,6 +4215,8 @@ - - {"mdors", 0x7f9ce378, 0xffffffff, E500MC, PPCNONE, {0}}, - -+{"miso", 0x7f5ad378, 0xffffffff, E6500, PPCNONE, {0}}, -+ - {"mr", XRC(31,444,0), X_MASK, COM, PPCNONE, {RA, RS, RBS}}, - {"or", XRC(31,444,0), X_MASK, COM, PPCNONE, {RA, RS, RB}}, - {"mr.", XRC(31,444,1), X_MASK, COM, PPCNONE, {RA, RS, RBS}}, -@@ -4191,6 +4259,8 @@ - {"mtdcr", X(31,451), X_MASK, PPC403|BOOKE|PPCA2|PPC476, TITAN, {SPR, RS}}, - {"mtdcr.", XRC(31,451,1), X_MASK, PPCA2, PPCNONE, {SPR, RS}}, - -+{"stvexwx", X(31,453), X_MASK, PPCVEC2, PPCNONE, {VS, RA0, RB}}, -+ - {"dccci", X(31,454), XRT_MASK, PPC403|PPC440|TITAN|PPCA2, PPCNONE, {RAOPT, RBOPT}}, - {"dci", X(31,454), XRARB_MASK, PPCA2|PPC476, PPCNONE, {CT}}, - -@@ -4201,6 +4271,7 @@ - {"divwu.", XO(31,459,0,1), XO_MASK, PPC, PPCNONE, {RT, RA, RB}}, - - {"mtpmr", X(31,462), X_MASK, PPCPMR|PPCE300, PPCNONE, {PMR, RS}}, -+{"mttmr", X(31,494), X_MASK, PPCTMR|E6500, PPCNONE, {TMR, RS}}, - - {"mtmq", XSPR(31,467, 0), XSPR_MASK, M601, PPCNONE, {RS}}, - {"mtxer", XSPR(31,467, 1), XSPR_MASK, COM, PPCNONE, {RS}}, -@@ -4445,6 +4516,8 @@ - - {"lhdx", X(31,547), X_MASK, E500MC, PPCNONE, {RT, RA, RB}}, - -+{"lvrx", X(31,549), X_MASK, PPCVEC2, PPCNONE, {VD, RA0, RB}}, -+ - {"bbelr", X(31,550), X_MASK, PPCBRLK, PPCNONE, {0}}, - - {"lvrx", X(31,551), X_MASK, CELL, PPCNONE, {VD, RA0, RB}}, -@@ -4461,6 +4534,8 @@ - - {"lwdx", X(31,579), X_MASK, E500MC, PPCNONE, {RT, RA, RB}}, - -+{"lvlx", X(31,581), X_MASK, PPCVEC2, PPCNONE, {VD, RA0, RB}}, -+ - {"lwfcmux", APU(31,583,0), APU_MASK, PPC405, PPCNONE, {FCRT, RA, RB}}, - - {"lxsdx", X(31,588), XX1_MASK, PPCVSX, PPCNONE, {XT6, RA, RB}}, -@@ -4472,9 +4547,10 @@ - - {"lwsync", XSYNC(31,598,1), 0xffffffff, PPC, E500, {0}}, - {"ptesync", XSYNC(31,598,2), 0xffffffff, PPC64, PPCNONE, {0}}, -+{"sync", X(31,598), XSYNCLE_MASK,E6500, PPCNONE, {LS, ESYNC}}, - {"sync", X(31,598), XSYNC_MASK, PPCCOM, BOOKE|PPC476, {LS}}, - {"msync", X(31,598), 0xffffffff, BOOKE|PPCA2|PPC476, PPCNONE, {0}}, --{"sync", X(31,598), 0xffffffff, BOOKE|PPC476, PPCNONE, {0}}, -+{"sync", X(31,598), 0xffffffff, BOOKE|PPC476, E6500, {0}}, - {"lwsync", X(31,598), 0xffffffff, E500, PPCNONE, {0}}, - {"dcs", X(31,598), 0xffffffff, PWRCOM, PPCNONE, {0}}, - -@@ -4485,6 +4561,8 @@ - - {"lddx", X(31,611), X_MASK, E500MC, PPCNONE, {RT, RA, RB}}, - -+{"lvswx", X(31,613), X_MASK, PPCVEC2, PPCNONE, {VD, RA0, RB}}, -+ - {"lqfcmux", APU(31,615,0), APU_MASK, PPC405, PPCNONE, {FCRT, RA, RB}}, - - {"nego", XO(31,104,1,0), XORB_MASK, COM, PPCNONE, {RT, RA}}, -@@ -4534,6 +4612,8 @@ - - {"sthdx", X(31,675), X_MASK, E500MC, PPCNONE, {RS, RA, RB}}, - -+{"stvrx", X(31,677), X_MASK, PPCVEC2, PPCNONE, {VS, RA0, RB}}, -+ - {"stvrx", X(31,679), X_MASK, CELL, PPCNONE, {VS, RA0, RB}}, - {"sthfcmux", APU(31,679,0), APU_MASK, PPC405, PPCNONE, {FCRT, RA, RB}}, - -@@ -4546,6 +4626,8 @@ - - {"stwdx", X(31,707), X_MASK, E500MC, PPCNONE, {RS, RA, RB}}, - -+{"stvlx", X(31,709), X_MASK, PPCVEC2, PPCNONE, {VS, RA0, RB}}, -+ - {"stwfcmux", APU(31,711,0), APU_MASK, PPC405, PPCNONE, {FCRT, RA, RB}}, - - {"stxsdx", X(31,716), XX1_MASK, PPCVSX, PPCNONE, {XS6, RA, RB}}, -@@ -4578,6 +4660,8 @@ - - {"stddx", X(31,739), X_MASK, E500MC, PPCNONE, {RS, RA, RB}}, - -+{"stvswx", X(31,741), X_MASK, PPCVEC2, PPCNONE, {VS, RA0, RB}}, -+ - {"stqfcmux", APU(31,743,0), APU_MASK, PPC405, PPCNONE, {FCRT, RA, RB}}, - - {"subfmeo", XO(31,232,1,0), XORB_MASK, PPCCOM, PPCNONE, {RT, RA}}, -@@ -4606,6 +4690,8 @@ - {"srliq", XRC(31,760,0), X_MASK, M601, PPCNONE, {RA, RS, SH}}, - {"srliq.", XRC(31,760,1), X_MASK, M601, PPCNONE, {RA, RS, SH}}, - -+{"lvsm", X(31,773), X_MASK, PPCVEC2, PPCNONE, {VD, RA0, RB}}, -+{"stvepxl", X(31,775), X_MASK, PPCVEC2, PPCNONE, {VS, RA0, RB}}, - {"lvlxl", X(31,775), X_MASK, CELL, PPCNONE, {VD, RA0, RB}}, - {"ldfcmux", APU(31,775,0), APU_MASK, PPC405, PPCNONE, {FCRT, RA, RB}}, - -@@ -4638,6 +4724,8 @@ - - {"lfddx", X(31,803), X_MASK, E500MC, PPCNONE, {FRT, RA, RB}}, - -+{"lvrxl", X(31,805), X_MASK, PPCVEC2, PPCNONE, {VD, RA0, RB}}, -+{"stvepx", X(31,807), X_MASK, PPCVEC2, PPCNONE, {VS, RA0, RB}}, - {"lvrxl", X(31,807), X_MASK, CELL, PPCNONE, {VD, RA0, RB}}, - - {"rac", X(31,818), X_MASK, M601, PPCNONE, {RT, RA, RB}}, -@@ -4658,6 +4746,8 @@ - {"sradi", XS(31,413,0), XS_MASK, PPC64, PPCNONE, {RA, RS, SH6}}, - {"sradi.", XS(31,413,1), XS_MASK, PPC64, PPCNONE, {RA, RS, SH6}}, - -+{"lvlxl", X(31,837), X_MASK, PPCVEC2, PPCNONE, {VD, RA0, RB}}, -+ - {"divo", XO(31,331,1,0), XO_MASK, M601, PPCNONE, {RT, RA, RB}}, - {"divo.", XO(31,331,1,1), XO_MASK, M601, PPCNONE, {RT, RA, RB}}, - -@@ -4676,6 +4766,8 @@ - - {"lfiwax", X(31,855), X_MASK, POWER6|PPCA2|PPC476, PPCNONE, {FRT, RA0, RB}}, - -+{"lvswxl", X(31,869), X_MASK, PPCVEC2, PPCNONE, {VD, RA0, RB}}, -+ - {"abso", XO(31,360,1,0), XORB_MASK, M601, PPCNONE, {RT, RA}}, - {"abso.", XO(31,360,1,1), XORB_MASK, M601, PPCNONE, {RT, RA}}, - -@@ -4721,6 +4813,8 @@ - - {"stfddx", X(31,931), X_MASK, E500MC, PPCNONE, {FRS, RA, RB}}, - -+{"stvrxl", X(31,933), X_MASK, PPCVEC2, PPCNONE, {VS, RA0, RB}}, -+ - {"wclrone", XOPL2(31,934,2),XRT_MASK, PPCA2, PPCNONE, {RA0, RB}}, - {"wclrall", X(31,934), XRARB_MASK, PPCA2, PPCNONE, {L}}, - {"wclr", X(31,934), X_MASK, PPCA2, PPCNONE, {L, RA0, RB}}, -@@ -4749,6 +4843,8 @@ - {"extsb", XRC(31,954,0), XRB_MASK, PPC, PPCNONE, {RA, RS}}, - {"extsb.", XRC(31,954,1), XRB_MASK, PPC, PPCNONE, {RA, RS}}, - -+{"stvlxl", X(31,965), X_MASK, PPCVEC2, PPCNONE, {VS, RA0, RB}}, -+ - {"iccci", X(31,966), XRT_MASK, PPC403|PPC440|TITAN|PPCA2, PPCNONE, {RAOPT, RBOPT}}, - {"ici", X(31,966), XRARB_MASK, PPCA2|PPC476, PPCNONE, {CT}}, - -@@ -4776,6 +4872,8 @@ - - {"icbiep", XRT(31,991,0), XRT_MASK, E500MC|PPCA2, PPCNONE, {RA, RB}}, - -+{"stvswxl", X(31,997), X_MASK, PPCVEC2, PPCNONE, {VS, RA0, RB}}, -+ - {"icread", X(31,998), XRT_MASK, PPC403|PPC440|PPC476|TITAN, PPCNONE, {RA, RB}}, - - {"nabso", XO(31,488,1,0), XORB_MASK, M601, PPCNONE, {RT, RA}}, diff --git a/meta-fsl-ppc/recipes-devtools/binutils/files/libiberty_path_fix.patch b/meta-fsl-ppc/recipes-devtools/binutils/files/libiberty_path_fix.patch deleted file mode 100644 index 3772dfbe..00000000 --- a/meta-fsl-ppc/recipes-devtools/binutils/files/libiberty_path_fix.patch +++ /dev/null @@ -1,22 +0,0 @@ -Upstream-Status: Inappropriate [embedded specific] - -don't let the distro compiler point to the wrong installation location - -Thanks to RP for helping find the source code causing the issue. - -2010/08/13 -Nitin A Kamble -Index: binutils-2.20.1/libiberty/Makefile.in -=================================================================== ---- binutils-2.20.1.orig/libiberty/Makefile.in -+++ binutils-2.20.1/libiberty/Makefile.in -@@ -327,7 +327,8 @@ install: install_to_$(INSTALL_DEST) inst - # multilib-specific flags, it's overridden by FLAGS_TO_PASS from the - # default multilib, so we have to take CFLAGS into account as well, - # since it will be passed the multilib flags. --MULTIOSDIR = `$(CC) $(CFLAGS) -print-multi-os-directory` -+#MULTIOSDIR = `$(CC) $(CFLAGS) -print-multi-os-directory` -+MULTIOSDIR = "" - install_to_libdir: all - ${mkinstalldirs} $(DESTDIR)$(libdir)/$(MULTIOSDIR) - $(INSTALL_DATA) $(TARGETLIB) $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB)n diff --git a/meta-fsl-ppc/recipes-devtools/binutils/files/libtool-2.4-update_fsl.patch b/meta-fsl-ppc/recipes-devtools/binutils/files/libtool-2.4-update_fsl.patch deleted file mode 100644 index 039241f5..00000000 --- a/meta-fsl-ppc/recipes-devtools/binutils/files/libtool-2.4-update_fsl.patch +++ /dev/null @@ -1,18705 +0,0 @@ -Upstream-Status: Inappropriate [embedded specific] - -Index: binutils-2.21.1/libtool.m4 -=================================================================== ---- binutils-2.21.1.orig/libtool.m4 -+++ binutils-2.21.1/libtool.m4 -@@ -1,7 +1,8 @@ - # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- - # - # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, --# 2006, 2007, 2008, 2009 Free Software Foundation, Inc. -+# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, -+# Inc. - # Written by Gordon Matzigkeit, 1996 - # - # This file is free software; the Free Software Foundation gives -@@ -10,7 +11,8 @@ - - m4_define([_LT_COPYING], [dnl - # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, --# 2006, 2007, 2008, 2009 Free Software Foundation, Inc. -+# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, -+# Inc. - # Written by Gordon Matzigkeit, 1996 - # - # This file is part of GNU Libtool. -@@ -37,7 +39,7 @@ m4_define([_LT_COPYING], [dnl - # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - ]) - --# serial 56 LT_INIT -+# serial 57 LT_INIT - - - # LT_PREREQ(VERSION) -@@ -92,7 +94,8 @@ _LT_SET_OPTIONS([$0], [$1]) - LIBTOOL_DEPS="$ltmain" - - # Always use our own libtool. --LIBTOOL='$(SHELL) $(top_builddir)/libtool' -+LIBTOOL='$(SHELL) $(top_builddir)' -+LIBTOOL="$LIBTOOL/${host_alias}-libtool" - AC_SUBST(LIBTOOL)dnl - - _LT_SETUP -@@ -166,10 +169,13 @@ _LT_DECL([], [exeext], [0], [Executable - dnl - m4_require([_LT_FILEUTILS_DEFAULTS])dnl - m4_require([_LT_CHECK_SHELL_FEATURES])dnl -+m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl - m4_require([_LT_CMD_RELOAD])dnl - m4_require([_LT_CHECK_MAGIC_METHOD])dnl -+m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl - m4_require([_LT_CMD_OLD_ARCHIVE])dnl - m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl -+m4_require([_LT_WITH_SYSROOT])dnl - - _LT_CONFIG_LIBTOOL_INIT([ - # See if we are running on zsh, and set the options which allow our -@@ -199,7 +205,7 @@ aix3*) - esac - - # Global variables: --ofile=libtool -+ofile=${host_alias}-libtool - can_build_shared=yes - - # All known linkers require a `.a' archive for static linking (except MSVC, -@@ -632,7 +638,7 @@ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_ - m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) - configured by $[0], generated by m4_PACKAGE_STRING. - --Copyright (C) 2009 Free Software Foundation, Inc. -+Copyright (C) 2010 Free Software Foundation, Inc. - This config.lt script is free software; the Free Software Foundation - gives unlimited permision to copy, distribute and modify it." - -@@ -746,15 +752,12 @@ _LT_EOF - # if finds mixed CR/LF and LF-only lines. Since sed operates in - # text mode, it properly converts lines to CR/LF. This bash problem - # is reportedly fixed, but why not run on old versions too? -- sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ -- || (rm -f "$cfgfile"; exit 1) -+ sed '$q' "$ltmain" >> "$cfgfile" \ -+ || (rm -f "$cfgfile"; exit 1) - -- _LT_PROG_XSI_SHELLFNS -+ _LT_PROG_REPLACE_SHELLFNS - -- sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ -- || (rm -f "$cfgfile"; exit 1) -- -- mv -f "$cfgfile" "$ofile" || -+ mv -f "$cfgfile" "$ofile" || - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" - ], -@@ -980,6 +983,8 @@ _LT_EOF - $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD - echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD - $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD -+ echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD -+ $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD - cat > conftest.c << _LT_EOF - int main() { return 0;} - _LT_EOF -@@ -1069,30 +1074,41 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES], - fi - ]) - --# _LT_SYS_MODULE_PATH_AIX --# ----------------------- -+# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) -+# ---------------------------------- - # Links a minimal program and checks the executable - # for the system default hardcoded library path. In most cases, - # this is /usr/lib:/lib, but when the MPI compilers are used - # the location of the communication and MPI libs are included too. - # If we don't find anything, use the default library path according - # to the aix ld manual. -+# Store the results from the different compilers for each TAGNAME. -+# Allow to override them for all tags through lt_cv_aix_libpath. - m4_defun([_LT_SYS_MODULE_PATH_AIX], - [m4_require([_LT_DECL_SED])dnl --AC_LINK_IFELSE(AC_LANG_PROGRAM,[ --lt_aix_libpath_sed=' -- /Import File Strings/,/^$/ { -- /^0/ { -- s/^0 *\(.*\)$/\1/ -- p -- } -- }' --aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` --# Check for a 64-bit object if we didn't find anything. --if test -z "$aix_libpath"; then -- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` --fi],[]) --if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi -+if test "${lt_cv_aix_libpath+set}" = set; then -+ aix_libpath=$lt_cv_aix_libpath -+else -+ AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], -+ [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ -+ lt_aix_libpath_sed='[ -+ /Import File Strings/,/^$/ { -+ /^0/ { -+ s/^0 *\([^ ]*\) *$/\1/ -+ p -+ } -+ }]' -+ _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -+ # Check for a 64-bit object if we didn't find anything. -+ if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then -+ _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -+ fi],[]) -+ if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then -+ _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" -+ fi -+ ]) -+ aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) -+fi - ])# _LT_SYS_MODULE_PATH_AIX - - -@@ -1117,7 +1133,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO - - AC_MSG_CHECKING([how to print strings]) - # Test print first, because it will be a builtin if present. --if test "X`print -r -- -n 2>/dev/null`" = X-n && \ -+if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ - test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then - ECHO='print -r --' - elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then -@@ -1161,6 +1177,39 @@ _LT_DECL([], [ECHO], [1], [An echo progr - ])# _LT_PROG_ECHO_BACKSLASH - - -+# _LT_WITH_SYSROOT -+# ---------------- -+AC_DEFUN([_LT_WITH_SYSROOT], -+[AC_MSG_CHECKING([for sysroot]) -+AC_ARG_WITH([libtool-sysroot], -+[ --with-libtool-sysroot[=DIR] Search for dependent libraries within DIR -+ (or the compiler's sysroot if not specified).], -+[], [with_libtool_sysroot=no]) -+ -+dnl lt_sysroot will always be passed unquoted. We quote it here -+dnl in case the user passed a directory name. -+lt_sysroot= -+case ${with_libtool_sysroot} in #( -+ yes) -+ if test "$GCC" = yes; then -+ lt_sysroot=`$CC --print-sysroot 2>/dev/null` -+ fi -+ ;; #( -+ /*) -+ lt_sysroot=`echo "$with_libtool_sysroot" | sed -e "$sed_quote_subst"` -+ ;; #( -+ no|'') -+ ;; #( -+ *) -+ AC_MSG_RESULT([${with_libtool_sysroot}]) -+ AC_MSG_ERROR([The sysroot must be an absolute path.]) -+ ;; -+esac -+ -+ AC_MSG_RESULT([${lt_sysroot:-no}]) -+_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl -+[dependent libraries, and in which our libraries should be installed.])]) -+ - # _LT_ENABLE_LOCK - # --------------- - m4_defun([_LT_ENABLE_LOCK], -@@ -1307,14 +1356,47 @@ need_locks="$enable_libtool_lock" - ])# _LT_ENABLE_LOCK - - -+# _LT_PROG_AR -+# ----------- -+m4_defun([_LT_PROG_AR], -+[AC_CHECK_TOOLS(AR, [ar], false) -+: ${AR=ar} -+: ${AR_FLAGS=cru} -+_LT_DECL([], [AR], [1], [The archiver]) -+_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) -+ -+AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], -+ [lt_cv_ar_at_file=no -+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM], -+ [echo conftest.$ac_objext > conftest.lst -+ lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' -+ AC_TRY_EVAL([lt_ar_try]) -+ if test "$ac_status" -eq 0; then -+ # Ensure the archiver fails upon bogus file names. -+ rm -f conftest.$ac_objext libconftest.a -+ AC_TRY_EVAL([lt_ar_try]) -+ if test "$ac_status" -ne 0; then -+ lt_cv_ar_at_file=@ -+ fi -+ fi -+ rm -f conftest.* libconftest.a -+ ]) -+ ]) -+ -+if test "x$lt_cv_ar_at_file" = xno; then -+ archiver_list_spec= -+else -+ archiver_list_spec=$lt_cv_ar_at_file -+fi -+_LT_DECL([], [archiver_list_spec], [1], -+ [How to feed a file listing to the archiver]) -+])# _LT_PROG_AR -+ -+ - # _LT_CMD_OLD_ARCHIVE - # ------------------- - m4_defun([_LT_CMD_OLD_ARCHIVE], --[AC_CHECK_TOOL(AR, ar, false) --test -z "$AR" && AR=ar --test -z "$AR_FLAGS" && AR_FLAGS=cru --_LT_DECL([], [AR], [1], [The archiver]) --_LT_DECL([], [AR_FLAGS], [1]) -+[_LT_PROG_AR - - AC_CHECK_TOOL(STRIP, strip, :) - test -z "$STRIP" && STRIP=: -@@ -1610,7 +1692,7 @@ else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF --[#line __oline__ "configure" -+[#line $LINENO "configure" - #include "confdefs.h" - - #if HAVE_DLFCN_H -@@ -1654,10 +1736,10 @@ else - /* When -fvisbility=hidden is used, assume the code has been annotated - correspondingly for the symbols needed. */ - #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) --void fnord () __attribute__((visibility("default"))); -+int fnord () __attribute__((visibility("default"))); - #endif - --void fnord () { int i=42; } -+int fnord () { return 42; } - int main () - { - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); -@@ -2197,8 +2279,9 @@ cygwin* | mingw* | pw32* | cegcc*) - need_version=no - need_lib_prefix=no - -- case $GCC,$host_os in -- yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) -+ case $GCC,$cc_basename in -+ yes,*) -+ # gcc - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ -@@ -2231,13 +2314,71 @@ m4_if([$1], [],[ - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - ;; - esac -+ dynamic_linker='Win32 ld.exe' -+ ;; -+ -+ *,cl*) -+ # Native MSVC -+ libname_spec='$name' -+ soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' -+ library_names_spec='${libname}.dll.lib' -+ -+ case $build_os in -+ mingw*) -+ sys_lib_search_path_spec= -+ lt_save_ifs=$IFS -+ IFS=';' -+ for lt_path in $LIB -+ do -+ IFS=$lt_save_ifs -+ # Let DOS variable expansion print the short 8.3 style file name. -+ lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` -+ sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" -+ done -+ IFS=$lt_save_ifs -+ # Convert to MSYS style. -+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` -+ ;; -+ cygwin*) -+ # Convert to unix form, then to dos form, then back to unix form -+ # but this time dos style (no spaces!) so that the unix form looks -+ # like /cygdrive/c/PROGRA~1:/cygdr... -+ sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` -+ sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` -+ sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` -+ ;; -+ *) -+ sys_lib_search_path_spec="$LIB" -+ if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then -+ # It is most probably a Windows format PATH. -+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` -+ else -+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` -+ fi -+ # FIXME: find the short name or the path components, as spaces are -+ # common. (e.g. "Program Files" -> "PROGRA~1") -+ ;; -+ esac -+ -+ # DLL is installed to $(libdir)/../bin by postinstall_cmds -+ postinstall_cmds='base_file=`basename \${file}`~ -+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ -+ dldir=$destdir/`dirname \$dlpath`~ -+ test -d \$dldir || mkdir -p \$dldir~ -+ $install_prog $dir/$dlname \$dldir/$dlname' -+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ -+ dlpath=$dir/\$dldll~ -+ $RM \$dlpath' -+ shlibpath_overrides_runpath=yes -+ dynamic_linker='Win32 link.exe' - ;; - - *) -+ # Assume MSVC wrapper - library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' -+ dynamic_linker='Win32 ld.exe' - ;; - esac -- dynamic_linker='Win32 ld.exe' - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; -@@ -2333,7 +2474,7 @@ haiku*) - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LIBRARY_PATH - shlibpath_overrides_runpath=yes -- sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib' -+ sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' - hardcode_into_libs=yes - ;; - -@@ -2941,6 +3082,11 @@ case $reload_flag in - esac - reload_cmds='$LD$reload_flag -o $output$reload_objs' - case $host_os in -+ cygwin* | mingw* | pw32* | cegcc*) -+ if test "$GCC" != yes; then -+ reload_cmds=false -+ fi -+ ;; - darwin*) - if test "$GCC" = yes; then - reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' -@@ -3007,7 +3153,8 @@ mingw* | pw32*) - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - else -- lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' -+ # Keep this pattern in sync with the one in func_win32_libid. -+ lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' - lt_cv_file_magic_cmd='$OBJDUMP -f' - fi - ;; -@@ -3158,6 +3305,21 @@ tpf*) - ;; - esac - ]) -+ -+file_magic_glob= -+want_nocaseglob=no -+if test "$build" = "$host"; then -+ case $host_os in -+ mingw* | pw32*) -+ if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then -+ want_nocaseglob=yes -+ else -+ file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` -+ fi -+ ;; -+ esac -+fi -+ - file_magic_cmd=$lt_cv_file_magic_cmd - deplibs_check_method=$lt_cv_deplibs_check_method - test -z "$deplibs_check_method" && deplibs_check_method=unknown -@@ -3165,7 +3327,11 @@ test -z "$deplibs_check_method" && depli - _LT_DECL([], [deplibs_check_method], [1], - [Method to check whether dependent libraries are shared objects]) - _LT_DECL([], [file_magic_cmd], [1], -- [Command to use when deplibs_check_method == "file_magic"]) -+ [Command to use when deplibs_check_method = "file_magic"]) -+_LT_DECL([], [file_magic_glob], [1], -+ [How to find potential files when deplibs_check_method = "file_magic"]) -+_LT_DECL([], [want_nocaseglob], [1], -+ [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) - ])# _LT_CHECK_MAGIC_METHOD - - -@@ -3268,6 +3434,67 @@ dnl aclocal-1.4 backwards compatibility: - dnl AC_DEFUN([AM_PROG_NM], []) - dnl AC_DEFUN([AC_PROG_NM], []) - -+# _LT_CHECK_SHAREDLIB_FROM_LINKLIB -+# -------------------------------- -+# how to determine the name of the shared library -+# associated with a specific link library. -+# -- PORTME fill in with the dynamic library characteristics -+m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], -+[m4_require([_LT_DECL_EGREP]) -+m4_require([_LT_DECL_OBJDUMP]) -+m4_require([_LT_DECL_DLLTOOL]) -+AC_CACHE_CHECK([how to associate runtime and link libraries], -+lt_cv_sharedlib_from_linklib_cmd, -+[lt_cv_sharedlib_from_linklib_cmd='unknown' -+ -+case $host_os in -+cygwin* | mingw* | pw32* | cegcc*) -+ # two different shell functions defined in ltmain.sh -+ # decide which to use based on capabilities of $DLLTOOL -+ case `$DLLTOOL --help 2>&1` in -+ *--identify-strict*) -+ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib -+ ;; -+ *) -+ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback -+ ;; -+ esac -+ ;; -+*) -+ # fallback: assume linklib IS sharedlib -+ lt_cv_sharedlib_from_linklib_cmd="$ECHO" -+ ;; -+esac -+]) -+sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd -+test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO -+ -+_LT_DECL([], [sharedlib_from_linklib_cmd], [1], -+ [Command to associate shared and link libraries]) -+])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB -+ -+ -+# _LT_PATH_MANIFEST_TOOL -+# ---------------------- -+# locate the manifest tool -+m4_defun([_LT_PATH_MANIFEST_TOOL], -+[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) -+test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt -+AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], -+ [lt_cv_path_mainfest_tool=no -+ echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD -+ $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out -+ cat conftest.err >&AS_MESSAGE_LOG_FD -+ if $GREP 'Manifest Tool' conftest.out > /dev/null; then -+ lt_cv_path_mainfest_tool=yes -+ fi -+ rm -f conftest*]) -+if test "x$lt_cv_path_mainfest_tool" != xyes; then -+ MANIFEST_TOOL=: -+fi -+_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl -+])# _LT_PATH_MANIFEST_TOOL -+ - - # LT_LIB_M - # -------- -@@ -3394,8 +3621,8 @@ esac - lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" - - # Transform an extracted symbol line into symbol name and symbol address --lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" --lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" -+lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" -+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" - - # Handle CRLF in mingw tool chain - opt_cr= -@@ -3431,6 +3658,7 @@ for ac_symprfx in "" "_"; do - else - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" - fi -+ lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" - - # Check to see that the pipe works correctly. - pipe_works=no -@@ -3464,6 +3692,18 @@ _LT_EOF - if $GREP ' nm_test_var$' "$nlist" >/dev/null; then - if $GREP ' nm_test_func$' "$nlist" >/dev/null; then - cat <<_LT_EOF > conftest.$ac_ext -+/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ -+#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) -+/* DATA imports from DLLs on WIN32 con't be const, because runtime -+ relocations are performed -- see ld's documentation on pseudo-relocs. */ -+# define LT@&t@_DLSYM_CONST -+#elif defined(__osf__) -+/* This system does not cope well with relocations in const data. */ -+# define LT@&t@_DLSYM_CONST -+#else -+# define LT@&t@_DLSYM_CONST const -+#endif -+ - #ifdef __cplusplus - extern "C" { - #endif -@@ -3475,7 +3715,7 @@ _LT_EOF - cat <<_LT_EOF >> conftest.$ac_ext - - /* The mapping between symbol names and symbols. */ --const struct { -+LT@&t@_DLSYM_CONST struct { - const char *name; - void *address; - } -@@ -3501,15 +3741,15 @@ static const void *lt_preloaded_setup() - _LT_EOF - # Now try linking the two files. - mv conftest.$ac_objext conftstm.$ac_objext -- lt_save_LIBS="$LIBS" -- lt_save_CFLAGS="$CFLAGS" -+ lt_globsym_save_LIBS=$LIBS -+ lt_globsym_save_CFLAGS=$CFLAGS - LIBS="conftstm.$ac_objext" - CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" - if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then - pipe_works=yes - fi -- LIBS="$lt_save_LIBS" -- CFLAGS="$lt_save_CFLAGS" -+ LIBS=$lt_globsym_save_LIBS -+ CFLAGS=$lt_globsym_save_CFLAGS - else - echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD - fi -@@ -3542,6 +3782,13 @@ else - AC_MSG_RESULT(ok) - fi - -+# Response file support. -+if test "$lt_cv_nm_interface" = "MS dumpbin"; then -+ nm_file_list_spec='@' -+elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then -+ nm_file_list_spec='@' -+fi -+ - _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], - [Take the output of nm and produce a listing of raw symbols and C names]) - _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], -@@ -3552,6 +3799,8 @@ _LT_DECL([global_symbol_to_c_name_addres - _LT_DECL([global_symbol_to_c_name_address_lib_prefix], - [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], - [Transform the output of nm in a C name address pair when lib prefix is needed]) -+_LT_DECL([], [nm_file_list_spec], [1], -+ [Specify filename containing input files for $NM]) - ]) # _LT_CMD_GLOBAL_SYMBOLS - - -@@ -3563,7 +3812,6 @@ _LT_TAGVAR(lt_prog_compiler_wl, $1)= - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_TAGVAR(lt_prog_compiler_static, $1)= - --AC_MSG_CHECKING([for $compiler option to produce PIC]) - m4_if([$1], [CXX], [ - # C++ specific cases for pic, static, wl, etc. - if test "$GXX" = yes; then -@@ -3668,6 +3916,12 @@ m4_if([$1], [CXX], [ - ;; - esac - ;; -+ mingw* | cygwin* | os2* | pw32* | cegcc*) -+ # This hack is so that the source file can tell whether it is being -+ # built for inclusion in a dll (and should export symbols for example). -+ m4_if([$1], [GCJ], [], -+ [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) -+ ;; - dgux*) - case $cc_basename in - ec++*) -@@ -3820,7 +4074,7 @@ m4_if([$1], [CXX], [ - ;; - solaris*) - case $cc_basename in -- CC*) -+ CC* | sunCC*) - # Sun C++ 4.2, 5.x and Centerline C++ - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' -@@ -4042,6 +4296,12 @@ m4_if([$1], [CXX], [ - _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' - _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' - ;; -+ nagfor*) -+ # NAG Fortran compiler -+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' -+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' -+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' -+ ;; - pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) -@@ -4104,7 +4364,7 @@ m4_if([$1], [CXX], [ - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - case $cc_basename in -- f77* | f90* | f95*) -+ f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; - *) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; -@@ -4161,9 +4421,11 @@ case $host_os in - _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" - ;; - esac --AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) --_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], -- [How to pass a linker flag through the compiler]) -+ -+AC_CACHE_CHECK([for $compiler option to produce PIC], -+ [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], -+ [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) -+_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) - - # - # Check to make sure the PIC flag actually works. -@@ -4182,6 +4444,8 @@ fi - _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], - [Additional compiler flags for building library objects]) - -+_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], -+ [How to pass a linker flag through the compiler]) - # - # Check to make sure the static flag actually works. - # -@@ -4202,6 +4466,7 @@ _LT_TAGDECL([link_static_flag], [lt_prog - m4_defun([_LT_LINKER_SHLIBS], - [AC_REQUIRE([LT_PATH_LD])dnl - AC_REQUIRE([LT_PATH_NM])dnl -+m4_require([_LT_PATH_MANIFEST_TOOL])dnl - m4_require([_LT_FILEUTILS_DEFAULTS])dnl - m4_require([_LT_DECL_EGREP])dnl - m4_require([_LT_DECL_SED])dnl -@@ -4210,6 +4475,7 @@ m4_require([_LT_TAG_COMPILER])dnl - AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) - m4_if([$1], [CXX], [ - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' -+ _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] - case $host_os in - aix[[4-9]]*) - # If we're using GNU nm, then we don't want the "-C" option. -@@ -4224,15 +4490,20 @@ m4_if([$1], [CXX], [ - ;; - pw32*) - _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" -- ;; -+ ;; - cygwin* | mingw* | cegcc*) -- _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' -- ;; -+ case $cc_basename in -+ cl*) ;; -+ *) -+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' -+ _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] -+ ;; -+ esac -+ ;; - *) - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' -- ;; -+ ;; - esac -- _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] - ], [ - runpath_var= - _LT_TAGVAR(allow_undefined_flag, $1)= -@@ -4400,7 +4671,8 @@ _LT_EOF - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=no - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes -- _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' -+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' -+ _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' -@@ -4448,7 +4720,7 @@ _LT_EOF - if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ - && test "$tmp_diet" = no - then -- tmp_addflag= -+ tmp_addflag=' $pic_flag' - tmp_sharedflag='-shared' - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler -@@ -4499,12 +4771,12 @@ _LT_EOF - _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' -- _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' -+ _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ -- $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' -+ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' - fi - ;; - esac -@@ -4518,8 +4790,8 @@ _LT_EOF - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' -+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - -@@ -4537,8 +4809,8 @@ _LT_EOF - - _LT_EOF - elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' -+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi -@@ -4584,8 +4856,8 @@ _LT_EOF - - *) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' -+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi -@@ -4715,7 +4987,7 @@ _LT_EOF - _LT_TAGVAR(allow_undefined_flag, $1)='-berok' - # Determine the default libpath from the value encoded in an - # empty executable. -- _LT_SYS_MODULE_PATH_AIX -+ _LT_SYS_MODULE_PATH_AIX([$1]) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else -@@ -4726,7 +4998,7 @@ _LT_EOF - else - # Determine the default libpath from the value encoded in an - # empty executable. -- _LT_SYS_MODULE_PATH_AIX -+ _LT_SYS_MODULE_PATH_AIX([$1]) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. -@@ -4770,20 +5042,63 @@ _LT_EOF - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. -- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' -- _LT_TAGVAR(allow_undefined_flag, $1)=unsupported -- # Tell ltmain to make .lib files, not .a files. -- libext=lib -- # Tell ltmain to make .dll files, not .so files. -- shrext_cmds=".dll" -- # FIXME: Setting linknames here is a bad hack. -- _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' -- # The linker will automatically build a .lib file if we build a DLL. -- _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' -- # FIXME: Should let the user specify the lib program. -- _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' -- _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' -- _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes -+ case $cc_basename in -+ cl*) -+ # Native MSVC -+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' -+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported -+ _LT_TAGVAR(always_export_symbols, $1)=yes -+ _LT_TAGVAR(file_list_spec, $1)='@' -+ # Tell ltmain to make .lib files, not .a files. -+ libext=lib -+ # Tell ltmain to make .dll files, not .so files. -+ shrext_cmds=".dll" -+ # FIXME: Setting linknames here is a bad hack. -+ _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' -+ _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then -+ sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; -+ else -+ sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; -+ fi~ -+ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ -+ linknames=' -+ # The linker will not automatically build a static lib if we build a DLL. -+ # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' -+ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes -+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' -+ # Don't use ranlib -+ _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' -+ _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ -+ lt_tool_outputfile="@TOOL_OUTPUT@"~ -+ case $lt_outputfile in -+ *.exe|*.EXE) ;; -+ *) -+ lt_outputfile="$lt_outputfile.exe" -+ lt_tool_outputfile="$lt_tool_outputfile.exe" -+ ;; -+ esac~ -+ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then -+ $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; -+ $RM "$lt_outputfile.manifest"; -+ fi' -+ ;; -+ *) -+ # Assume MSVC wrapper -+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' -+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported -+ # Tell ltmain to make .lib files, not .a files. -+ libext=lib -+ # Tell ltmain to make .dll files, not .so files. -+ shrext_cmds=".dll" -+ # FIXME: Setting linknames here is a bad hack. -+ _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' -+ # The linker will automatically build a .lib file if we build a DLL. -+ _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' -+ # FIXME: Should let the user specify the lib program. -+ _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' -+ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes -+ ;; -+ esac - ;; - - darwin* | rhapsody*) -@@ -4821,7 +5136,7 @@ _LT_EOF - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' -+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no -@@ -4829,7 +5144,7 @@ _LT_EOF - - hpux9*) - if test "$GCC" = yes; then -- _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' -+ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - fi -@@ -4845,7 +5160,7 @@ _LT_EOF - - hpux10*) - if test "$GCC" = yes && test "$with_gnu_ld" = no; then -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' -+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi -@@ -4869,10 +5184,10 @@ _LT_EOF - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' -+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' -+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else -@@ -4919,16 +5234,31 @@ _LT_EOF - - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' -+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - # Try to use the -exported_symbol ld option, if it does not - # work, assume that -exports_file does not work either and - # implicitly export all symbols. -- save_LDFLAGS="$LDFLAGS" -- LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" -- AC_LINK_IFELSE(int foo(void) {}, -- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' -- ) -- LDFLAGS="$save_LDFLAGS" -+ # This should be the same for all languages, so no per-tag cache variable. -+ AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], -+ [lt_cv_irix_exported_symbol], -+ [save_LDFLAGS="$LDFLAGS" -+ LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" -+ AC_LINK_IFELSE( -+ [AC_LANG_SOURCE( -+ [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], -+ [C++], [[int foo (void) { return 0; }]], -+ [Fortran 77], [[ -+ subroutine foo -+ end]], -+ [Fortran], [[ -+ subroutine foo -+ end]])])], -+ [lt_cv_irix_exported_symbol=yes], -+ [lt_cv_irix_exported_symbol=no]) -+ LDFLAGS="$save_LDFLAGS"]) -+ if test "$lt_cv_irix_exported_symbol" = yes; then -+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' -+ fi - else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' -@@ -5013,7 +5343,7 @@ _LT_EOF - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' -+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - else - _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' -@@ -5032,9 +5362,9 @@ _LT_EOF - _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' - if test "$GCC" = yes; then - wlarc='${wl}' -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' -+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ -- $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' -+ $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - else - case `$CC -V 2>&1` in - *"Compilers 5.0"*) -@@ -5306,8 +5636,6 @@ _LT_TAGDECL([], [inherit_rpath], [0], - to runtime path list]) - _LT_TAGDECL([], [link_all_deplibs], [0], - [Whether libtool must link a program against all its dependency libraries]) --_LT_TAGDECL([], [fix_srcfile_path], [1], -- [Fix the shell variable $srcfile for the compiler]) - _LT_TAGDECL([], [always_export_symbols], [0], - [Set to "yes" if exported symbols are required]) - _LT_TAGDECL([], [export_symbols_cmds], [2], -@@ -5318,6 +5646,8 @@ _LT_TAGDECL([], [include_expsyms], [1], - [Symbols that must always be exported]) - _LT_TAGDECL([], [prelink_cmds], [2], - [Commands necessary for linking programs (against libraries) with templates]) -+_LT_TAGDECL([], [postlink_cmds], [2], -+ [Commands necessary for finishing linking programs]) - _LT_TAGDECL([], [file_list_spec], [1], - [Specify filename containing input files]) - dnl FIXME: Not yet implemented -@@ -5419,6 +5749,7 @@ CC="$lt_save_CC" - m4_defun([_LT_LANG_CXX_CONFIG], - [m4_require([_LT_FILEUTILS_DEFAULTS])dnl - m4_require([_LT_DECL_EGREP])dnl -+m4_require([_LT_PATH_MANIFEST_TOOL])dnl - if test -n "$CXX" && ( test "X$CXX" != "Xno" && - ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || - (test "X$CXX" != "Xg++"))) ; then -@@ -5480,6 +5811,7 @@ if test "$_lt_caught_CXX_error" != yes; - - # Allow CC to be a program name with arguments. - lt_save_CC=$CC -+ lt_save_CFLAGS=$CFLAGS - lt_save_LD=$LD - lt_save_GCC=$GCC - GCC=$GXX -@@ -5497,6 +5829,7 @@ if test "$_lt_caught_CXX_error" != yes; - fi - test -z "${LDCXX+set}" || LD=$LDCXX - CC=${CXX-"c++"} -+ CFLAGS=$CXXFLAGS - compiler=$CC - _LT_TAGVAR(compiler, $1)=$CC - _LT_CC_BASENAME([$compiler]) -@@ -5518,8 +5851,8 @@ if test "$_lt_caught_CXX_error" != yes; - # Check if GNU C++ uses GNU ld as the underlying linker, since the - # archiving commands below assume that GNU ld is being used. - if test "$with_gnu_ld" = yes; then -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' -- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' -+ _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' -+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' -@@ -5660,7 +5993,7 @@ if test "$_lt_caught_CXX_error" != yes; - _LT_TAGVAR(allow_undefined_flag, $1)='-berok' - # Determine the default libpath from the value encoded in an empty - # executable. -- _LT_SYS_MODULE_PATH_AIX -+ _LT_SYS_MODULE_PATH_AIX([$1]) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" -@@ -5672,7 +6005,7 @@ if test "$_lt_caught_CXX_error" != yes; - else - # Determine the default libpath from the value encoded in an - # empty executable. -- _LT_SYS_MODULE_PATH_AIX -+ _LT_SYS_MODULE_PATH_AIX([$1]) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. -@@ -5714,29 +6047,75 @@ if test "$_lt_caught_CXX_error" != yes; - ;; - - cygwin* | mingw* | pw32* | cegcc*) -- # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, -- # as there is no search path for DLLs. -- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' -- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' -- _LT_TAGVAR(allow_undefined_flag, $1)=unsupported -- _LT_TAGVAR(always_export_symbols, $1)=no -- _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes -- -- if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' -- # If the export-symbols file already is a .def file (1st line -- # is EXPORTS), use it as is; otherwise, prepend... -- _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then -- cp $export_symbols $output_objdir/$soname.def; -- else -- echo EXPORTS > $output_objdir/$soname.def; -- cat $export_symbols >> $output_objdir/$soname.def; -- fi~ -- $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' -- else -- _LT_TAGVAR(ld_shlibs, $1)=no -- fi -- ;; -+ case $GXX,$cc_basename in -+ ,cl* | no,cl*) -+ # Native MSVC -+ # hardcode_libdir_flag_spec is actually meaningless, as there is -+ # no search path for DLLs. -+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' -+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported -+ _LT_TAGVAR(always_export_symbols, $1)=yes -+ _LT_TAGVAR(file_list_spec, $1)='@' -+ # Tell ltmain to make .lib files, not .a files. -+ libext=lib -+ # Tell ltmain to make .dll files, not .so files. -+ shrext_cmds=".dll" -+ # FIXME: Setting linknames here is a bad hack. -+ _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' -+ _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then -+ $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; -+ else -+ $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; -+ fi~ -+ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ -+ linknames=' -+ # The linker will not automatically build a static lib if we build a DLL. -+ # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' -+ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes -+ # Don't use ranlib -+ _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' -+ _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ -+ lt_tool_outputfile="@TOOL_OUTPUT@"~ -+ case $lt_outputfile in -+ *.exe|*.EXE) ;; -+ *) -+ lt_outputfile="$lt_outputfile.exe" -+ lt_tool_outputfile="$lt_tool_outputfile.exe" -+ ;; -+ esac~ -+ func_to_tool_file "$lt_outputfile"~ -+ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then -+ $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; -+ $RM "$lt_outputfile.manifest"; -+ fi' -+ ;; -+ *) -+ # g++ -+ # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, -+ # as there is no search path for DLLs. -+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' -+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' -+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported -+ _LT_TAGVAR(always_export_symbols, $1)=no -+ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes -+ -+ if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then -+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' -+ # If the export-symbols file already is a .def file (1st line -+ # is EXPORTS), use it as is; otherwise, prepend... -+ _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then -+ cp $export_symbols $output_objdir/$soname.def; -+ else -+ echo EXPORTS > $output_objdir/$soname.def; -+ cat $export_symbols >> $output_objdir/$soname.def; -+ fi~ -+ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' -+ else -+ _LT_TAGVAR(ld_shlibs, $1)=no -+ fi -+ ;; -+ esac -+ ;; - darwin* | rhapsody*) - _LT_DARWIN_LINKER_FEATURES($1) - ;; -@@ -5811,7 +6190,7 @@ if test "$_lt_caught_CXX_error" != yes; - ;; - *) - if test "$GXX" = yes; then -- _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' -+ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no -@@ -5882,10 +6261,10 @@ if test "$_lt_caught_CXX_error" != yes; - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' -+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' -+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - fi -@@ -5926,9 +6305,9 @@ if test "$_lt_caught_CXX_error" != yes; - *) - if test "$GXX" = yes; then - if test "$with_gnu_ld" = no; then -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' -+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' -+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' - fi - fi - _LT_TAGVAR(link_all_deplibs, $1)=yes -@@ -5998,20 +6377,20 @@ if test "$_lt_caught_CXX_error" != yes; - _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ -- compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"' -+ compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' - _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ -- $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~ -+ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ - $RANLIB $oldlib' - _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ -- $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' -+ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ -- $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' -+ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' - ;; - *) # Version 6 and above use weak symbols - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' -@@ -6206,7 +6585,7 @@ if test "$_lt_caught_CXX_error" != yes; - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - ;; - *) -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' -+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - ;; - esac - -@@ -6252,7 +6631,7 @@ if test "$_lt_caught_CXX_error" != yes; - - solaris*) - case $cc_basename in -- CC*) -+ CC* | sunCC*) - # Sun C++ 4.2, 5.x and Centerline C++ - _LT_TAGVAR(archive_cmds_need_lc,$1)=yes - _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' -@@ -6293,9 +6672,9 @@ if test "$_lt_caught_CXX_error" != yes; - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' - if $CC --version | $GREP -v '^2\.7' > /dev/null; then -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' -+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ -- $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' -+ $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when -@@ -6424,6 +6803,7 @@ if test "$_lt_caught_CXX_error" != yes; - fi # test -n "$compiler" - - CC=$lt_save_CC -+ CFLAGS=$lt_save_CFLAGS - LDCXX=$LD - LD=$lt_save_LD - GCC=$lt_save_GCC -@@ -6438,6 +6818,29 @@ AC_LANG_POP - ])# _LT_LANG_CXX_CONFIG - - -+# _LT_FUNC_STRIPNAME_CNF -+# ---------------------- -+# func_stripname_cnf prefix suffix name -+# strip PREFIX and SUFFIX off of NAME. -+# PREFIX and SUFFIX must not contain globbing or regex special -+# characters, hashes, percent signs, but SUFFIX may contain a leading -+# dot (in which case that matches only a dot). -+# -+# This function is identical to the (non-XSI) version of func_stripname, -+# except this one can be used by m4 code that may be executed by configure, -+# rather than the libtool script. -+m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl -+AC_REQUIRE([_LT_DECL_SED]) -+AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) -+func_stripname_cnf () -+{ -+ case ${2} in -+ .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; -+ *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; -+ esac -+} # func_stripname_cnf -+])# _LT_FUNC_STRIPNAME_CNF -+ - # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) - # --------------------------------- - # Figure out "hidden" library dependencies from verbose -@@ -6446,6 +6849,7 @@ AC_LANG_POP - # objects, libraries and library flags. - m4_defun([_LT_SYS_HIDDEN_LIBDEPS], - [m4_require([_LT_FILEUTILS_DEFAULTS])dnl -+AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl - # Dependencies to place before and after the object being linked: - _LT_TAGVAR(predep_objects, $1)= - _LT_TAGVAR(postdep_objects, $1)= -@@ -6496,6 +6900,13 @@ public class foo { - }; - _LT_EOF - ]) -+ -+_lt_libdeps_save_CFLAGS=$CFLAGS -+case "$CC $CFLAGS " in #( -+*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; -+*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; -+esac -+ - dnl Parse the compiler output and extract the necessary - dnl objects, libraries and library flags. - if AC_TRY_EVAL(ac_compile); then -@@ -6507,7 +6918,7 @@ if AC_TRY_EVAL(ac_compile); then - pre_test_object_deps_done=no - - for p in `eval "$output_verbose_link_cmd"`; do -- case $p in -+ case ${prev}${p} in - - -L* | -R* | -l*) - # Some compilers place space between "-{L,R}" and the path. -@@ -6516,13 +6927,22 @@ if AC_TRY_EVAL(ac_compile); then - test $p = "-R"; then - prev=$p - continue -- else -- prev= - fi - -+ # Expand the sysroot to ease extracting the directories later. -+ if test -z "$prev"; then -+ case $p in -+ -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; -+ -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; -+ -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; -+ esac -+ fi -+ case $p in -+ =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; -+ esac - if test "$pre_test_object_deps_done" = no; then -- case $p in -- -L* | -R*) -+ case ${prev} in -+ -L | -R) - # Internal compiler library paths should come after those - # provided the user. The postdeps already come after the - # user supplied libs so there is no need to process them. -@@ -6542,8 +6962,10 @@ if AC_TRY_EVAL(ac_compile); then - _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" - fi - fi -+ prev= - ;; - -+ *.lto.$objext) ;; # Ignore GCC LTO objects - *.$objext) - # This assumes that the test object file only shows up - # once in the compiler output. -@@ -6579,6 +7001,7 @@ else - fi - - $RM -f confest.$objext -+CFLAGS=$_lt_libdeps_save_CFLAGS - - # PORTME: override above test on systems where it is broken - m4_if([$1], [CXX], -@@ -6615,7 +7038,7 @@ linux*) - - solaris*) - case $cc_basename in -- CC*) -+ CC* | sunCC*) - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as -@@ -6728,7 +7151,9 @@ if test "$_lt_disable_F77" != yes; then - # Allow CC to be a program name with arguments. - lt_save_CC="$CC" - lt_save_GCC=$GCC -+ lt_save_CFLAGS=$CFLAGS - CC=${F77-"f77"} -+ CFLAGS=$FFLAGS - compiler=$CC - _LT_TAGVAR(compiler, $1)=$CC - _LT_CC_BASENAME([$compiler]) -@@ -6782,6 +7207,7 @@ if test "$_lt_disable_F77" != yes; then - - GCC=$lt_save_GCC - CC="$lt_save_CC" -+ CFLAGS="$lt_save_CFLAGS" - fi # test "$_lt_disable_F77" != yes - - AC_LANG_POP -@@ -6858,7 +7284,9 @@ if test "$_lt_disable_FC" != yes; then - # Allow CC to be a program name with arguments. - lt_save_CC="$CC" - lt_save_GCC=$GCC -+ lt_save_CFLAGS=$CFLAGS - CC=${FC-"f95"} -+ CFLAGS=$FCFLAGS - compiler=$CC - GCC=$ac_cv_fc_compiler_gnu - -@@ -6914,7 +7342,8 @@ if test "$_lt_disable_FC" != yes; then - fi # test -n "$compiler" - - GCC=$lt_save_GCC -- CC="$lt_save_CC" -+ CC=$lt_save_CC -+ CFLAGS=$lt_save_CFLAGS - fi # test "$_lt_disable_FC" != yes - - AC_LANG_POP -@@ -6951,10 +7380,12 @@ _LT_COMPILER_BOILERPLATE - _LT_LINKER_BOILERPLATE - - # Allow CC to be a program name with arguments. --lt_save_CC="$CC" -+lt_save_CC=$CC -+lt_save_CFLAGS=$CFLAGS - lt_save_GCC=$GCC - GCC=yes - CC=${GCJ-"gcj"} -+CFLAGS=$GCJFLAGS - compiler=$CC - _LT_TAGVAR(compiler, $1)=$CC - _LT_TAGVAR(LD, $1)="$LD" -@@ -6985,7 +7416,8 @@ fi - AC_LANG_RESTORE - - GCC=$lt_save_GCC --CC="$lt_save_CC" -+CC=$lt_save_CC -+CFLAGS=$lt_save_CFLAGS - ])# _LT_LANG_GCJ_CONFIG - - -@@ -7020,9 +7452,11 @@ _LT_LINKER_BOILERPLATE - - # Allow CC to be a program name with arguments. - lt_save_CC="$CC" -+lt_save_CFLAGS=$CFLAGS - lt_save_GCC=$GCC - GCC= - CC=${RC-"windres"} -+CFLAGS= - compiler=$CC - _LT_TAGVAR(compiler, $1)=$CC - _LT_CC_BASENAME([$compiler]) -@@ -7035,7 +7469,8 @@ fi - - GCC=$lt_save_GCC - AC_LANG_RESTORE --CC="$lt_save_CC" -+CC=$lt_save_CC -+CFLAGS=$lt_save_CFLAGS - ])# _LT_LANG_RC_CONFIG - - -@@ -7094,6 +7529,15 @@ _LT_DECL([], [OBJDUMP], [1], [An object - AC_SUBST([OBJDUMP]) - ]) - -+# _LT_DECL_DLLTOOL -+# ---------------- -+# Ensure DLLTOOL variable is set. -+m4_defun([_LT_DECL_DLLTOOL], -+[AC_CHECK_TOOL(DLLTOOL, dlltool, false) -+test -z "$DLLTOOL" && DLLTOOL=dlltool -+_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) -+AC_SUBST([DLLTOOL]) -+]) - - # _LT_DECL_SED - # ------------ -@@ -7187,8 +7631,8 @@ m4_defun([_LT_CHECK_SHELL_FEATURES], - # Try some XSI features - xsi_shell=no - ( _lt_dummy="a/b/c" -- test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ -- = c,a/b,, \ -+ test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ -+ = c,a/b,b/c, \ - && eval 'test $(( 1 + 1 )) -eq 2 \ - && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ - && xsi_shell=yes -@@ -7227,206 +7671,162 @@ _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn - ])# _LT_CHECK_SHELL_FEATURES - - --# _LT_PROG_XSI_SHELLFNS --# --------------------- --# Bourne and XSI compatible variants of some useful shell functions. --m4_defun([_LT_PROG_XSI_SHELLFNS], --[case $xsi_shell in -- yes) -- cat << \_LT_EOF >> "$cfgfile" -- --# func_dirname file append nondir_replacement --# Compute the dirname of FILE. If nonempty, add APPEND to the result, --# otherwise set result to NONDIR_REPLACEMENT. --func_dirname () --{ -- case ${1} in -- */*) func_dirname_result="${1%/*}${2}" ;; -- * ) func_dirname_result="${3}" ;; -- esac --} -- --# func_basename file --func_basename () --{ -- func_basename_result="${1##*/}" --} -- --# func_dirname_and_basename file append nondir_replacement --# perform func_basename and func_dirname in a single function --# call: --# dirname: Compute the dirname of FILE. If nonempty, --# add APPEND to the result, otherwise set result --# to NONDIR_REPLACEMENT. --# value returned in "$func_dirname_result" --# basename: Compute filename of FILE. --# value retuned in "$func_basename_result" --# Implementation must be kept synchronized with func_dirname --# and func_basename. For efficiency, we do not delegate to --# those functions but instead duplicate the functionality here. --func_dirname_and_basename () --{ -- case ${1} in -- */*) func_dirname_result="${1%/*}${2}" ;; -- * ) func_dirname_result="${3}" ;; -- esac -- func_basename_result="${1##*/}" --} -- --# func_stripname prefix suffix name --# strip PREFIX and SUFFIX off of NAME. --# PREFIX and SUFFIX must not contain globbing or regex special --# characters, hashes, percent signs, but SUFFIX may contain a leading --# dot (in which case that matches only a dot). --func_stripname () --{ -- # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are -- # positional parameters, so assign one to ordinary parameter first. -- func_stripname_result=${3} -- func_stripname_result=${func_stripname_result#"${1}"} -- func_stripname_result=${func_stripname_result%"${2}"} --} -- --# func_opt_split --func_opt_split () --{ -- func_opt_split_opt=${1%%=*} -- func_opt_split_arg=${1#*=} --} -- --# func_lo2o object --func_lo2o () --{ -- case ${1} in -- *.lo) func_lo2o_result=${1%.lo}.${objext} ;; -- *) func_lo2o_result=${1} ;; -- esac --} -- --# func_xform libobj-or-source --func_xform () --{ -- func_xform_result=${1%.*}.lo --} -- --# func_arith arithmetic-term... --func_arith () --{ -- func_arith_result=$(( $[*] )) --} -- --# func_len string --# STRING may not start with a hyphen. --func_len () --{ -- func_len_result=${#1} --} -- --_LT_EOF -- ;; -- *) # Bourne compatible functions. -- cat << \_LT_EOF >> "$cfgfile" -- --# func_dirname file append nondir_replacement --# Compute the dirname of FILE. If nonempty, add APPEND to the result, --# otherwise set result to NONDIR_REPLACEMENT. --func_dirname () --{ -- # Extract subdirectory from the argument. -- func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` -- if test "X$func_dirname_result" = "X${1}"; then -- func_dirname_result="${3}" -- else -- func_dirname_result="$func_dirname_result${2}" -- fi --} -- --# func_basename file --func_basename () --{ -- func_basename_result=`$ECHO "${1}" | $SED "$basename"` --} -+# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) -+# ------------------------------------------------------ -+# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and -+# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. -+m4_defun([_LT_PROG_FUNCTION_REPLACE], -+[dnl { -+sed -e '/^$1 ()$/,/^} # $1 /c\ -+$1 ()\ -+{\ -+m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) -+} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+]) - --dnl func_dirname_and_basename --dnl A portable version of this function is already defined in general.m4sh --dnl so there is no need for it here. - --# func_stripname prefix suffix name --# strip PREFIX and SUFFIX off of NAME. --# PREFIX and SUFFIX must not contain globbing or regex special --# characters, hashes, percent signs, but SUFFIX may contain a leading --# dot (in which case that matches only a dot). --# func_strip_suffix prefix name --func_stripname () --{ -- case ${2} in -- .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; -- *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; -- esac --} -+# _LT_PROG_REPLACE_SHELLFNS -+# ------------------------- -+# Replace existing portable implementations of several shell functions with -+# equivalent extended shell implementations where those features are available.. -+m4_defun([_LT_PROG_REPLACE_SHELLFNS], -+[if test x"$xsi_shell" = xyes; then -+ _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl -+ case ${1} in -+ */*) func_dirname_result="${1%/*}${2}" ;; -+ * ) func_dirname_result="${3}" ;; -+ esac]) -+ -+ _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl -+ func_basename_result="${1##*/}"]) -+ -+ _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl -+ case ${1} in -+ */*) func_dirname_result="${1%/*}${2}" ;; -+ * ) func_dirname_result="${3}" ;; -+ esac -+ func_basename_result="${1##*/}"]) - --# sed scripts: --my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q' --my_sed_long_arg='1s/^-[[^=]]*=//' -+ _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl -+ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are -+ # positional parameters, so assign one to ordinary parameter first. -+ func_stripname_result=${3} -+ func_stripname_result=${func_stripname_result#"${1}"} -+ func_stripname_result=${func_stripname_result%"${2}"}]) -+ -+ _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl -+ func_split_long_opt_name=${1%%=*} -+ func_split_long_opt_arg=${1#*=}]) -+ -+ _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl -+ func_split_short_opt_arg=${1#??} -+ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) -+ -+ _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl -+ case ${1} in -+ *.lo) func_lo2o_result=${1%.lo}.${objext} ;; -+ *) func_lo2o_result=${1} ;; -+ esac]) - --# func_opt_split --func_opt_split () --{ -- func_opt_split_opt=`$ECHO "${1}" | $SED "$my_sed_long_opt"` -- func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"` --} -+ _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) - --# func_lo2o object --func_lo2o () --{ -- func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` --} -+ _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) - --# func_xform libobj-or-source --func_xform () --{ -- func_xform_result=`$ECHO "${1}" | $SED 's/\.[[^.]]*$/.lo/'` --} -+ _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) -+fi - --# func_arith arithmetic-term... --func_arith () --{ -- func_arith_result=`expr "$[@]"` --} -+if test x"$lt_shell_append" = xyes; then -+ _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) - --# func_len string --# STRING may not start with a hyphen. --func_len () --{ -- func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len` --} -+ _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl -+ func_quote_for_eval "${2}" -+dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ -+ eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) -+ -+ # Save a `func_append' function call where possible by direct use of '+=' -+ sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+ test 0 -eq $? || _lt_function_replace_fail=: -+else -+ # Save a `func_append' function call even when '+=' is not available -+ sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+ test 0 -eq $? || _lt_function_replace_fail=: -+fi - --_LT_EOF --esac -+if test x"$_lt_function_replace_fail" = x":"; then -+ AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) -+fi -+]) - --case $lt_shell_append in -- yes) -- cat << \_LT_EOF >> "$cfgfile" -- --# func_append var value --# Append VALUE to the end of shell variable VAR. --func_append () --{ -- eval "$[1]+=\$[2]" --} --_LT_EOF -+# _LT_PATH_CONVERSION_FUNCTIONS -+# ----------------------------- -+# Determine which file name conversion functions should be used by -+# func_to_host_file (and, implicitly, by func_to_host_path). These are needed -+# for certain cross-compile configurations and native mingw. -+m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], -+[AC_REQUIRE([AC_CANONICAL_HOST])dnl -+AC_REQUIRE([AC_CANONICAL_BUILD])dnl -+AC_MSG_CHECKING([how to convert $build file names to $host format]) -+AC_CACHE_VAL(lt_cv_to_host_file_cmd, -+[case $host in -+ *-*-mingw* ) -+ case $build in -+ *-*-mingw* ) # actually msys -+ lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 -+ ;; -+ *-*-cygwin* ) -+ lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 -+ ;; -+ * ) # otherwise, assume *nix -+ lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 -+ ;; -+ esac - ;; -- *) -- cat << \_LT_EOF >> "$cfgfile" -- --# func_append var value --# Append VALUE to the end of shell variable VAR. --func_append () --{ -- eval "$[1]=\$$[1]\$[2]" --} -- --_LT_EOF -+ *-*-cygwin* ) -+ case $build in -+ *-*-mingw* ) # actually msys -+ lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin -+ ;; -+ *-*-cygwin* ) -+ lt_cv_to_host_file_cmd=func_convert_file_noop -+ ;; -+ * ) # otherwise, assume *nix -+ lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin -+ ;; -+ esac - ;; -- esac -+ * ) # unhandled hosts (and "normal" native builds) -+ lt_cv_to_host_file_cmd=func_convert_file_noop -+ ;; -+esac -+]) -+to_host_file_cmd=$lt_cv_to_host_file_cmd -+AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) -+_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], -+ [0], [convert $build file names to $host format])dnl -+ -+AC_MSG_CHECKING([how to convert $build file names to toolchain format]) -+AC_CACHE_VAL(lt_cv_to_tool_file_cmd, -+[#assume ordinary cross tools, or native build. -+lt_cv_to_tool_file_cmd=func_convert_file_noop -+case $host in -+ *-*-mingw* ) -+ case $build in -+ *-*-mingw* ) # actually msys -+ lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 -+ ;; -+ esac -+ ;; -+esac - ]) -+to_tool_file_cmd=$lt_cv_to_tool_file_cmd -+AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) -+_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], -+ [0], [convert $build files to toolchain format])dnl -+])# _LT_PATH_CONVERSION_FUNCTIONS -Index: binutils-2.21.1/ltmain.sh -=================================================================== ---- binutils-2.21.1.orig/ltmain.sh -+++ binutils-2.21.1/ltmain.sh -@@ -1,10 +1,9 @@ --# Generated from ltmain.m4sh. - --# libtool (GNU libtool 1.3134 2009-11-29) 2.2.7a -+# libtool (GNU libtool) 2.4 - # Written by Gordon Matzigkeit , 1996 - - # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, --# 2007, 2008, 2009 Free Software Foundation, Inc. -+# 2007, 2008, 2009, 2010 Free Software Foundation, Inc. - # This is free software; see the source for copying conditions. There is NO - # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -@@ -38,7 +37,6 @@ - # -n, --dry-run display commands without modifying any files - # --features display basic configuration information and exit - # --mode=MODE use operation mode MODE --# --no-finish let install mode avoid finish commands - # --preserve-dup-deps don't remove duplicate dependency libraries - # --quiet, --silent don't print informational messages - # --no-quiet, --no-silent -@@ -71,17 +69,19 @@ - # compiler: $LTCC - # compiler flags: $LTCFLAGS - # linker: $LD (gnu? $with_gnu_ld) --# $progname: (GNU libtool 1.3134 2009-11-29) 2.2.7a -+# $progname: (GNU libtool) 2.4 - # automake: $automake_version - # autoconf: $autoconf_version - # - # Report bugs to . -+# GNU libtool home page: . -+# General help using GNU software: . - - PROGRAM=libtool - PACKAGE=libtool --VERSION=2.2.7a --TIMESTAMP=" 1.3134 2009-11-29" --package_revision=1.3134 -+VERSION=2.4 -+TIMESTAMP="" -+package_revision=1.3293 - - # Be Bourne compatible - if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then -@@ -106,9 +106,6 @@ _LTECHO_EOF' - } - - # NLS nuisances: We save the old values to restore during execute mode. --# Only set LANG and LC_ALL to C if already set. --# These must not be set unconditionally because not all systems understand --# e.g. LANG=C (notably SCO). - lt_user_locale= - lt_safe_locale= - for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES -@@ -121,15 +118,13 @@ do - lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" - fi" - done -+LC_ALL=C -+LANGUAGE=C -+export LANGUAGE LC_ALL - - $lt_unset CDPATH - - -- -- -- -- -- - # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh - # is ksh but when the shell is invoked as "sh" and the current value of - # the _XPG environment variable is not equal to 1 (one), the special -@@ -140,7 +135,7 @@ progpath="$0" - - - : ${CP="cp -f"} --: ${ECHO=$as_echo} -+test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'} - : ${EGREP="/bin/grep -E"} - : ${FGREP="/bin/grep -F"} - : ${GREP="/bin/grep"} -@@ -149,7 +144,7 @@ progpath="$0" - : ${MKDIR="mkdir"} - : ${MV="mv -f"} - : ${RM="rm -f"} --: ${SED="/mount/endor/wildenhu/local-x86_64/bin/sed"} -+: ${SED="/bin/sed"} - : ${SHELL="${CONFIG_SHELL-/bin/sh}"} - : ${Xsed="$SED -e 1s/^X//"} - -@@ -169,6 +164,27 @@ IFS=" $lt_nl" - dirname="s,/[^/]*$,," - basename="s,^.*/,," - -+# func_dirname file append nondir_replacement -+# Compute the dirname of FILE. If nonempty, add APPEND to the result, -+# otherwise set result to NONDIR_REPLACEMENT. -+func_dirname () -+{ -+ func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` -+ if test "X$func_dirname_result" = "X${1}"; then -+ func_dirname_result="${3}" -+ else -+ func_dirname_result="$func_dirname_result${2}" -+ fi -+} # func_dirname may be replaced by extended shell implementation -+ -+ -+# func_basename file -+func_basename () -+{ -+ func_basename_result=`$ECHO "${1}" | $SED "$basename"` -+} # func_basename may be replaced by extended shell implementation -+ -+ - # func_dirname_and_basename file append nondir_replacement - # perform func_basename and func_dirname in a single function - # call: -@@ -183,17 +199,31 @@ basename="s,^.*/,," - # those functions but instead duplicate the functionality here. - func_dirname_and_basename () - { -- # Extract subdirectory from the argument. -- func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"` -- if test "X$func_dirname_result" = "X${1}"; then -- func_dirname_result="${3}" -- else -- func_dirname_result="$func_dirname_result${2}" -- fi -- func_basename_result=`$ECHO "${1}" | $SED -e "$basename"` --} -+ # Extract subdirectory from the argument. -+ func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"` -+ if test "X$func_dirname_result" = "X${1}"; then -+ func_dirname_result="${3}" -+ else -+ func_dirname_result="$func_dirname_result${2}" -+ fi -+ func_basename_result=`$ECHO "${1}" | $SED -e "$basename"` -+} # func_dirname_and_basename may be replaced by extended shell implementation -+ -+ -+# func_stripname prefix suffix name -+# strip PREFIX and SUFFIX off of NAME. -+# PREFIX and SUFFIX must not contain globbing or regex special -+# characters, hashes, percent signs, but SUFFIX may contain a leading -+# dot (in which case that matches only a dot). -+# func_strip_suffix prefix name -+func_stripname () -+{ -+ case ${2} in -+ .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; -+ *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; -+ esac -+} # func_stripname may be replaced by extended shell implementation - --# Generated shell functions inserted here. - - # These SED scripts presuppose an absolute path with a trailing slash. - pathcar='s,^/\([^/]*\).*$,\1,' -@@ -376,6 +406,15 @@ sed_quote_subst='s/\([`"$\\]\)/\\\1/g' - # Same as above, but do not quote variable references. - double_quote_subst='s/\(["`\\]\)/\\\1/g' - -+# Sed substitution that turns a string into a regex matching for the -+# string literally. -+sed_make_literal_regex='s,[].[^$\\*\/],\\&,g' -+ -+# Sed substitution that converts a w32 file name or path -+# which contains forward slashes, into one that contains -+# (escaped) backslashes. A very naive implementation. -+lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' -+ - # Re-`\' parameter expansions in output of double_quote_subst that were - # `\'-ed in input to the same. If an odd number of `\' preceded a '$' - # in input to double_quote_subst, that '$' was protected from expansion. -@@ -404,7 +443,7 @@ opt_warning=: - # name if it has been set yet. - func_echo () - { -- $ECHO "$progname${mode+: }$mode: $*" -+ $ECHO "$progname: ${opt_mode+$opt_mode: }$*" - } - - # func_verbose arg... -@@ -430,14 +469,14 @@ func_echo_all () - # Echo program name prefixed message to standard error. - func_error () - { -- $ECHO "$progname${mode+: }$mode: "${1+"$@"} 1>&2 -+ $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2 - } - - # func_warning arg... - # Echo program name prefixed warning message to standard error. - func_warning () - { -- $opt_warning && $ECHO "$progname${mode+: }$mode: warning: "${1+"$@"} 1>&2 -+ $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2 - - # bash bug again: - : -@@ -656,19 +695,35 @@ func_show_eval_locale () - fi - } - -- -- -+# func_tr_sh -+# Turn $1 into a string suitable for a shell variable name. -+# Result is stored in $func_tr_sh_result. All characters -+# not in the set a-zA-Z0-9_ are replaced with '_'. Further, -+# if $1 begins with a digit, a '_' is prepended as well. -+func_tr_sh () -+{ -+ case $1 in -+ [0-9]* | *[!a-zA-Z0-9_]*) -+ func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'` -+ ;; -+ * ) -+ func_tr_sh_result=$1 -+ ;; -+ esac -+} - - - # func_version - # Echo version message to standard output and exit. - func_version () - { -+ $opt_debug -+ - $SED -n '/(C)/!b go - :more - /\./!{ - N -- s/\n# // -+ s/\n# / / - b more - } - :go -@@ -685,7 +740,9 @@ func_version () - # Echo short help message to standard output and exit. - func_usage () - { -- $SED -n '/^# Usage:/,/^# *-h/ { -+ $opt_debug -+ -+ $SED -n '/^# Usage:/,/^# *.*--help/ { - s/^# // - s/^# *$// - s/\$progname/'$progname'/ -@@ -701,7 +758,10 @@ func_usage () - # unless 'noexit' is passed as argument. - func_help () - { -+ $opt_debug -+ - $SED -n '/^# Usage:/,/# Report bugs to/ { -+ :print - s/^# // - s/^# *$// - s*\$progname*'$progname'* -@@ -714,7 +774,11 @@ func_help () - s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/ - s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/ - p -- }' < "$progpath" -+ d -+ } -+ /^# .* home page:/b print -+ /^# General help using/b print -+ ' < "$progpath" - ret=$? - if test -z "$1"; then - exit $ret -@@ -726,12 +790,39 @@ func_help () - # exit_cmd. - func_missing_arg () - { -- func_error "missing argument for $1" -+ $opt_debug -+ -+ func_error "missing argument for $1." - exit_cmd=exit - } - --exit_cmd=: - -+# func_split_short_opt shortopt -+# Set func_split_short_opt_name and func_split_short_opt_arg shell -+# variables after splitting SHORTOPT after the 2nd character. -+func_split_short_opt () -+{ -+ my_sed_short_opt='1s/^\(..\).*$/\1/;q' -+ my_sed_short_rest='1s/^..\(.*\)$/\1/;q' -+ -+ func_split_short_opt_name=`$ECHO "$1" | $SED "$my_sed_short_opt"` -+ func_split_short_opt_arg=`$ECHO "$1" | $SED "$my_sed_short_rest"` -+} # func_split_short_opt may be replaced by extended shell implementation -+ -+ -+# func_split_long_opt longopt -+# Set func_split_long_opt_name and func_split_long_opt_arg shell -+# variables after splitting LONGOPT at the `=' sign. -+func_split_long_opt () -+{ -+ my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q' -+ my_sed_long_arg='1s/^--[^=]*=//' -+ -+ func_split_long_opt_name=`$ECHO "$1" | $SED "$my_sed_long_opt"` -+ func_split_long_opt_arg=`$ECHO "$1" | $SED "$my_sed_long_arg"` -+} # func_split_long_opt may be replaced by extended shell implementation -+ -+exit_cmd=: - - - -@@ -741,26 +832,64 @@ magic="%%%MAGIC variable%%%" - magic_exe="%%%MAGIC EXE variable%%%" - - # Global variables. --# $mode is unset - nonopt= --execute_dlfiles= - preserve_args= - lo2o="s/\\.lo\$/.${objext}/" - o2lo="s/\\.${objext}\$/.lo/" - extracted_archives= - extracted_serial=0 - --opt_dry_run=false --opt_finish=: --opt_duplicate_deps=false --opt_silent=false --opt_debug=: -- - # If this variable is set in any of the actions, the command in it - # will be execed at the end. This prevents here-documents from being - # left over by shells. - exec_cmd= - -+# func_append var value -+# Append VALUE to the end of shell variable VAR. -+func_append () -+{ -+ eval "${1}=\$${1}\${2}" -+} # func_append may be replaced by extended shell implementation -+ -+# func_append_quoted var value -+# Quote VALUE and append to the end of shell variable VAR, separated -+# by a space. -+func_append_quoted () -+{ -+ func_quote_for_eval "${2}" -+ eval "${1}=\$${1}\\ \$func_quote_for_eval_result" -+} # func_append_quoted may be replaced by extended shell implementation -+ -+ -+# func_arith arithmetic-term... -+func_arith () -+{ -+ func_arith_result=`expr "${@}"` -+} # func_arith may be replaced by extended shell implementation -+ -+ -+# func_len string -+# STRING may not start with a hyphen. -+func_len () -+{ -+ func_len_result=`expr "${1}" : ".*" 2>/dev/null || echo $max_cmd_len` -+} # func_len may be replaced by extended shell implementation -+ -+ -+# func_lo2o object -+func_lo2o () -+{ -+ func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` -+} # func_lo2o may be replaced by extended shell implementation -+ -+ -+# func_xform libobj-or-source -+func_xform () -+{ -+ func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` -+} # func_xform may be replaced by extended shell implementation -+ -+ - # func_fatal_configuration arg... - # Echo program name prefixed message to standard error, followed by - # a configuration failure hint, and exit. -@@ -850,130 +979,204 @@ func_enable_tag () - esac - } - --# Parse options once, thoroughly. This comes as soon as possible in --# the script to make things like `libtool --version' happen quickly. -+# func_check_version_match -+# Ensure that we are using m4 macros, and libtool script from the same -+# release of libtool. -+func_check_version_match () - { -+ if test "$package_revision" != "$macro_revision"; then -+ if test "$VERSION" != "$macro_version"; then -+ if test -z "$macro_version"; then -+ cat >&2 <<_LT_EOF -+$progname: Version mismatch error. This is $PACKAGE $VERSION, but the -+$progname: definition of this LT_INIT comes from an older release. -+$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION -+$progname: and run autoconf again. -+_LT_EOF -+ else -+ cat >&2 <<_LT_EOF -+$progname: Version mismatch error. This is $PACKAGE $VERSION, but the -+$progname: definition of this LT_INIT comes from $PACKAGE $macro_version. -+$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION -+$progname: and run autoconf again. -+_LT_EOF -+ fi -+ else -+ cat >&2 <<_LT_EOF -+$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, -+$progname: but the definition of this LT_INIT comes from revision $macro_revision. -+$progname: You should recreate aclocal.m4 with macros from revision $package_revision -+$progname: of $PACKAGE $VERSION and run autoconf again. -+_LT_EOF -+ fi -+ -+ exit $EXIT_MISMATCH -+ fi -+} -+ -+ -+# Shorthand for --mode=foo, only valid as the first argument -+case $1 in -+clean|clea|cle|cl) -+ shift; set dummy --mode clean ${1+"$@"}; shift -+ ;; -+compile|compil|compi|comp|com|co|c) -+ shift; set dummy --mode compile ${1+"$@"}; shift -+ ;; -+execute|execut|execu|exec|exe|ex|e) -+ shift; set dummy --mode execute ${1+"$@"}; shift -+ ;; -+finish|finis|fini|fin|fi|f) -+ shift; set dummy --mode finish ${1+"$@"}; shift -+ ;; -+install|instal|insta|inst|ins|in|i) -+ shift; set dummy --mode install ${1+"$@"}; shift -+ ;; -+link|lin|li|l) -+ shift; set dummy --mode link ${1+"$@"}; shift -+ ;; -+uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) -+ shift; set dummy --mode uninstall ${1+"$@"}; shift -+ ;; -+esac - -- # Shorthand for --mode=foo, only valid as the first argument -- case $1 in -- clean|clea|cle|cl) -- shift; set dummy --mode clean ${1+"$@"}; shift -- ;; -- compile|compil|compi|comp|com|co|c) -- shift; set dummy --mode compile ${1+"$@"}; shift -- ;; -- execute|execut|execu|exec|exe|ex|e) -- shift; set dummy --mode execute ${1+"$@"}; shift -- ;; -- finish|finis|fini|fin|fi|f) -- shift; set dummy --mode finish ${1+"$@"}; shift -- ;; -- install|instal|insta|inst|ins|in|i) -- shift; set dummy --mode install ${1+"$@"}; shift -- ;; -- link|lin|li|l) -- shift; set dummy --mode link ${1+"$@"}; shift -- ;; -- uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) -- shift; set dummy --mode uninstall ${1+"$@"}; shift -- ;; -- esac - -- # Parse non-mode specific arguments: -- while test "$#" -gt 0; do -+ -+# Option defaults: -+opt_debug=: -+opt_dry_run=false -+opt_config=false -+opt_preserve_dup_deps=false -+opt_features=false -+opt_finish=false -+opt_help=false -+opt_help_all=false -+opt_silent=: -+opt_verbose=: -+opt_silent=false -+opt_verbose=false -+ -+ -+# Parse options once, thoroughly. This comes as soon as possible in the -+# script to make things like `--version' happen as quickly as we can. -+{ -+ # this just eases exit handling -+ while test $# -gt 0; do - opt="$1" - shift -- - case $opt in -- --config) func_config ;; -- -- --debug) preserve_args="$preserve_args $opt" -+ --debug|-x) opt_debug='set -x' - func_echo "enabling shell trace mode" -- opt_debug='set -x' - $opt_debug - ;; -- -- -dlopen) test "$#" -eq 0 && func_missing_arg "$opt" && break -- execute_dlfiles="$execute_dlfiles $1" -- shift -+ --dry-run|--dryrun|-n) -+ opt_dry_run=: - ;; -- -- --dry-run | -n) opt_dry_run=: ;; -- --features) func_features ;; -- --finish) mode="finish" ;; -- --no-finish) opt_finish=false ;; -- -- --mode) test "$#" -eq 0 && func_missing_arg "$opt" && break -- case $1 in -- # Valid mode arguments: -- clean) ;; -- compile) ;; -- execute) ;; -- finish) ;; -- install) ;; -- link) ;; -- relink) ;; -- uninstall) ;; -- -- # Catch anything else as an error -- *) func_error "invalid argument for $opt" -- exit_cmd=exit -- break -- ;; -- esac -- -- mode="$1" -+ --config) -+ opt_config=: -+func_config -+ ;; -+ --dlopen|-dlopen) -+ optarg="$1" -+ opt_dlopen="${opt_dlopen+$opt_dlopen -+}$optarg" - shift - ;; -- - --preserve-dup-deps) -- opt_duplicate_deps=: ;; -- -- --quiet|--silent) preserve_args="$preserve_args $opt" -- opt_silent=: -- opt_verbose=false -+ opt_preserve_dup_deps=: - ;; -- -- --no-quiet|--no-silent) -- preserve_args="$preserve_args $opt" -- opt_silent=false -+ --features) -+ opt_features=: -+func_features - ;; -- -- --verbose| -v) preserve_args="$preserve_args $opt" -+ --finish) -+ opt_finish=: -+set dummy --mode finish ${1+"$@"}; shift -+ ;; -+ --help) -+ opt_help=: -+ ;; -+ --help-all) -+ opt_help_all=: -+opt_help=': help-all' -+ ;; -+ --mode) -+ test $# = 0 && func_missing_arg $opt && break -+ optarg="$1" -+ opt_mode="$optarg" -+case $optarg in -+ # Valid mode arguments: -+ clean|compile|execute|finish|install|link|relink|uninstall) ;; -+ -+ # Catch anything else as an error -+ *) func_error "invalid argument for $opt" -+ exit_cmd=exit -+ break -+ ;; -+esac -+ shift -+ ;; -+ --no-silent|--no-quiet) - opt_silent=false -- opt_verbose=: -+func_append preserve_args " $opt" - ;; -- -- --no-verbose) preserve_args="$preserve_args $opt" -+ --no-verbose) - opt_verbose=false -+func_append preserve_args " $opt" - ;; -- -- --tag) test "$#" -eq 0 && func_missing_arg "$opt" && break -- preserve_args="$preserve_args $opt $1" -- func_enable_tag "$1" # tagname is set here -+ --silent|--quiet) -+ opt_silent=: -+func_append preserve_args " $opt" -+ opt_verbose=false -+ ;; -+ --verbose|-v) -+ opt_verbose=: -+func_append preserve_args " $opt" -+opt_silent=false -+ ;; -+ --tag) -+ test $# = 0 && func_missing_arg $opt && break -+ optarg="$1" -+ opt_tag="$optarg" -+func_append preserve_args " $opt $optarg" -+func_enable_tag "$optarg" - shift - ;; - -+ -\?|-h) func_usage ;; -+ --help) func_help ;; -+ --version) func_version ;; -+ - # Separate optargs to long options: -- -dlopen=*|--mode=*|--tag=*) -- func_opt_split "$opt" -- set dummy "$func_opt_split_opt" "$func_opt_split_arg" ${1+"$@"} -+ --*=*) -+ func_split_long_opt "$opt" -+ set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"} - shift - ;; - -- -\?|-h) func_usage ;; -- --help) opt_help=: ;; -- --help-all) opt_help=': help-all' ;; -- --version) func_version ;; -- -- -*) func_fatal_help "unrecognized option \`$opt'" ;; -- -- *) nonopt="$opt" -- break -+ # Separate non-argument short options: -+ -\?*|-h*|-n*|-v*) -+ func_split_short_opt "$opt" -+ set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"} -+ shift - ;; -+ -+ --) break ;; -+ -*) func_fatal_help "unrecognized option \`$opt'" ;; -+ *) set dummy "$opt" ${1+"$@"}; shift; break ;; - esac - done - -+ # Validate options: -+ -+ # save first non-option argument -+ if test "$#" -gt 0; then -+ nonopt="$opt" -+ shift -+ fi -+ -+ # preserve --debug -+ test "$opt_debug" = : || func_append preserve_args " --debug" - - case $host in - *cygwin* | *mingw* | *pw32* | *cegcc*) -@@ -981,82 +1184,44 @@ func_enable_tag () - opt_duplicate_compiler_generated_deps=: - ;; - *) -- opt_duplicate_compiler_generated_deps=$opt_duplicate_deps -+ opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps - ;; - esac - -- # Having warned about all mis-specified options, bail out if -- # anything was wrong. -- $exit_cmd $EXIT_FAILURE --} -+ $opt_help || { -+ # Sanity checks first: -+ func_check_version_match - --# func_check_version_match --# Ensure that we are using m4 macros, and libtool script from the same --# release of libtool. --func_check_version_match () --{ -- if test "$package_revision" != "$macro_revision"; then -- if test "$VERSION" != "$macro_version"; then -- if test -z "$macro_version"; then -- cat >&2 <<_LT_EOF --$progname: Version mismatch error. This is $PACKAGE $VERSION, but the --$progname: definition of this LT_INIT comes from an older release. --$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION --$progname: and run autoconf again. --_LT_EOF -- else -- cat >&2 <<_LT_EOF --$progname: Version mismatch error. This is $PACKAGE $VERSION, but the --$progname: definition of this LT_INIT comes from $PACKAGE $macro_version. --$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION --$progname: and run autoconf again. --_LT_EOF -- fi -- else -- cat >&2 <<_LT_EOF --$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, --$progname: but the definition of this LT_INIT comes from revision $macro_revision. --$progname: You should recreate aclocal.m4 with macros from revision $package_revision --$progname: of $PACKAGE $VERSION and run autoconf again. --_LT_EOF -+ if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then -+ func_fatal_configuration "not configured to build any kind of library" - fi - -- exit $EXIT_MISMATCH -- fi --} -- -+ # Darwin sucks -+ eval std_shrext=\"$shrext_cmds\" - --## ----------- ## --## Main. ## --## ----------- ## -- --$opt_help || { -- # Sanity checks first: -- func_check_version_match -- -- if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then -- func_fatal_configuration "not configured to build any kind of library" -- fi -+ # Only execute mode is allowed to have -dlopen flags. -+ if test -n "$opt_dlopen" && test "$opt_mode" != execute; then -+ func_error "unrecognized option \`-dlopen'" -+ $ECHO "$help" 1>&2 -+ exit $EXIT_FAILURE -+ fi - -- test -z "$mode" && func_fatal_error "error: you must specify a MODE." -+ # Change the help message to a mode-specific one. -+ generic_help="$help" -+ help="Try \`$progname --help --mode=$opt_mode' for more information." -+ } - - -- # Darwin sucks -- eval "std_shrext=\"$shrext_cmds\"" -+ # Bail if the options were screwed -+ $exit_cmd $EXIT_FAILURE -+} - - -- # Only execute mode is allowed to have -dlopen flags. -- if test -n "$execute_dlfiles" && test "$mode" != execute; then -- func_error "unrecognized option \`-dlopen'" -- $ECHO "$help" 1>&2 -- exit $EXIT_FAILURE -- fi - -- # Change the help message to a mode-specific one. -- generic_help="$help" -- help="Try \`$progname --help --mode=$mode' for more information." --} - -+## ----------- ## -+## Main. ## -+## ----------- ## - - # func_lalib_p file - # True iff FILE is a libtool `.la' library or `.lo' object file. -@@ -1121,12 +1286,9 @@ func_ltwrapper_executable_p () - # temporary ltwrapper_script. - func_ltwrapper_scriptname () - { -- func_ltwrapper_scriptname_result="" -- if func_ltwrapper_executable_p "$1"; then -- func_dirname_and_basename "$1" "" "." -- func_stripname '' '.exe' "$func_basename_result" -- func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" -- fi -+ func_dirname_and_basename "$1" "" "." -+ func_stripname '' '.exe' "$func_basename_result" -+ func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" - } - - # func_ltwrapper_p file -@@ -1149,7 +1311,7 @@ func_execute_cmds () - save_ifs=$IFS; IFS='~' - for cmd in $1; do - IFS=$save_ifs -- eval "cmd=\"$cmd\"" -+ eval cmd=\"$cmd\" - func_show_eval "$cmd" "${2-:}" - done - IFS=$save_ifs -@@ -1172,6 +1334,37 @@ func_source () - } - - -+# func_resolve_sysroot PATH -+# Replace a leading = in PATH with a sysroot. Store the result into -+# func_resolve_sysroot_result -+func_resolve_sysroot () -+{ -+ func_resolve_sysroot_result=$1 -+ case $func_resolve_sysroot_result in -+ =*) -+ func_stripname '=' '' "$func_resolve_sysroot_result" -+ func_resolve_sysroot_result=$lt_sysroot$func_stripname_result -+ ;; -+ esac -+} -+ -+# func_replace_sysroot PATH -+# If PATH begins with the sysroot, replace it with = and -+# store the result into func_replace_sysroot_result. -+func_replace_sysroot () -+{ -+ case "$lt_sysroot:$1" in -+ ?*:"$lt_sysroot"*) -+ func_stripname "$lt_sysroot" '' "$1" -+ func_replace_sysroot_result="=$func_stripname_result" -+ ;; -+ *) -+ # Including no sysroot. -+ func_replace_sysroot_result=$1 -+ ;; -+ esac -+} -+ - # func_infer_tag arg - # Infer tagged configuration to use if any are available and - # if one wasn't chosen via the "--tag" command line option. -@@ -1184,8 +1377,7 @@ func_infer_tag () - if test -n "$available_tags" && test -z "$tagname"; then - CC_quoted= - for arg in $CC; do -- func_quote_for_eval "$arg" -- CC_quoted="$CC_quoted $func_quote_for_eval_result" -+ func_append_quoted CC_quoted "$arg" - done - CC_expanded=`func_echo_all $CC` - CC_quoted_expanded=`func_echo_all $CC_quoted` -@@ -1204,8 +1396,7 @@ func_infer_tag () - CC_quoted= - for arg in $CC; do - # Double-quote args containing other shell metacharacters. -- func_quote_for_eval "$arg" -- CC_quoted="$CC_quoted $func_quote_for_eval_result" -+ func_append_quoted CC_quoted "$arg" - done - CC_expanded=`func_echo_all $CC` - CC_quoted_expanded=`func_echo_all $CC_quoted` -@@ -1274,6 +1465,486 @@ EOF - } - } - -+ -+################################################## -+# FILE NAME AND PATH CONVERSION HELPER FUNCTIONS # -+################################################## -+ -+# func_convert_core_file_wine_to_w32 ARG -+# Helper function used by file name conversion functions when $build is *nix, -+# and $host is mingw, cygwin, or some other w32 environment. Relies on a -+# correctly configured wine environment available, with the winepath program -+# in $build's $PATH. -+# -+# ARG is the $build file name to be converted to w32 format. -+# Result is available in $func_convert_core_file_wine_to_w32_result, and will -+# be empty on error (or when ARG is empty) -+func_convert_core_file_wine_to_w32 () -+{ -+ $opt_debug -+ func_convert_core_file_wine_to_w32_result="$1" -+ if test -n "$1"; then -+ # Unfortunately, winepath does not exit with a non-zero error code, so we -+ # are forced to check the contents of stdout. On the other hand, if the -+ # command is not found, the shell will set an exit code of 127 and print -+ # *an error message* to stdout. So we must check for both error code of -+ # zero AND non-empty stdout, which explains the odd construction: -+ func_convert_core_file_wine_to_w32_tmp=`winepath -w "$1" 2>/dev/null` -+ if test "$?" -eq 0 && test -n "${func_convert_core_file_wine_to_w32_tmp}"; then -+ func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" | -+ $SED -e "$lt_sed_naive_backslashify"` -+ else -+ func_convert_core_file_wine_to_w32_result= -+ fi -+ fi -+} -+# end: func_convert_core_file_wine_to_w32 -+ -+ -+# func_convert_core_path_wine_to_w32 ARG -+# Helper function used by path conversion functions when $build is *nix, and -+# $host is mingw, cygwin, or some other w32 environment. Relies on a correctly -+# configured wine environment available, with the winepath program in $build's -+# $PATH. Assumes ARG has no leading or trailing path separator characters. -+# -+# ARG is path to be converted from $build format to win32. -+# Result is available in $func_convert_core_path_wine_to_w32_result. -+# Unconvertible file (directory) names in ARG are skipped; if no directory names -+# are convertible, then the result may be empty. -+func_convert_core_path_wine_to_w32 () -+{ -+ $opt_debug -+ # unfortunately, winepath doesn't convert paths, only file names -+ func_convert_core_path_wine_to_w32_result="" -+ if test -n "$1"; then -+ oldIFS=$IFS -+ IFS=: -+ for func_convert_core_path_wine_to_w32_f in $1; do -+ IFS=$oldIFS -+ func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f" -+ if test -n "$func_convert_core_file_wine_to_w32_result" ; then -+ if test -z "$func_convert_core_path_wine_to_w32_result"; then -+ func_convert_core_path_wine_to_w32_result="$func_convert_core_file_wine_to_w32_result" -+ else -+ func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result" -+ fi -+ fi -+ done -+ IFS=$oldIFS -+ fi -+} -+# end: func_convert_core_path_wine_to_w32 -+ -+ -+# func_cygpath ARGS... -+# Wrapper around calling the cygpath program via LT_CYGPATH. This is used when -+# when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2) -+# $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or -+# (2), returns the Cygwin file name or path in func_cygpath_result (input -+# file name or path is assumed to be in w32 format, as previously converted -+# from $build's *nix or MSYS format). In case (3), returns the w32 file name -+# or path in func_cygpath_result (input file name or path is assumed to be in -+# Cygwin format). Returns an empty string on error. -+# -+# ARGS are passed to cygpath, with the last one being the file name or path to -+# be converted. -+# -+# Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH -+# environment variable; do not put it in $PATH. -+func_cygpath () -+{ -+ $opt_debug -+ if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then -+ func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null` -+ if test "$?" -ne 0; then -+ # on failure, ensure result is empty -+ func_cygpath_result= -+ fi -+ else -+ func_cygpath_result= -+ func_error "LT_CYGPATH is empty or specifies non-existent file: \`$LT_CYGPATH'" -+ fi -+} -+#end: func_cygpath -+ -+ -+# func_convert_core_msys_to_w32 ARG -+# Convert file name or path ARG from MSYS format to w32 format. Return -+# result in func_convert_core_msys_to_w32_result. -+func_convert_core_msys_to_w32 () -+{ -+ $opt_debug -+ # awkward: cmd appends spaces to result -+ func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | -+ $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"` -+} -+#end: func_convert_core_msys_to_w32 -+ -+ -+# func_convert_file_check ARG1 ARG2 -+# Verify that ARG1 (a file name in $build format) was converted to $host -+# format in ARG2. Otherwise, emit an error message, but continue (resetting -+# func_to_host_file_result to ARG1). -+func_convert_file_check () -+{ -+ $opt_debug -+ if test -z "$2" && test -n "$1" ; then -+ func_error "Could not determine host file name corresponding to" -+ func_error " \`$1'" -+ func_error "Continuing, but uninstalled executables may not work." -+ # Fallback: -+ func_to_host_file_result="$1" -+ fi -+} -+# end func_convert_file_check -+ -+ -+# func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH -+# Verify that FROM_PATH (a path in $build format) was converted to $host -+# format in TO_PATH. Otherwise, emit an error message, but continue, resetting -+# func_to_host_file_result to a simplistic fallback value (see below). -+func_convert_path_check () -+{ -+ $opt_debug -+ if test -z "$4" && test -n "$3"; then -+ func_error "Could not determine the host path corresponding to" -+ func_error " \`$3'" -+ func_error "Continuing, but uninstalled executables may not work." -+ # Fallback. This is a deliberately simplistic "conversion" and -+ # should not be "improved". See libtool.info. -+ if test "x$1" != "x$2"; then -+ lt_replace_pathsep_chars="s|$1|$2|g" -+ func_to_host_path_result=`echo "$3" | -+ $SED -e "$lt_replace_pathsep_chars"` -+ else -+ func_to_host_path_result="$3" -+ fi -+ fi -+} -+# end func_convert_path_check -+ -+ -+# func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG -+# Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT -+# and appending REPL if ORIG matches BACKPAT. -+func_convert_path_front_back_pathsep () -+{ -+ $opt_debug -+ case $4 in -+ $1 ) func_to_host_path_result="$3$func_to_host_path_result" -+ ;; -+ esac -+ case $4 in -+ $2 ) func_append func_to_host_path_result "$3" -+ ;; -+ esac -+} -+# end func_convert_path_front_back_pathsep -+ -+ -+################################################## -+# $build to $host FILE NAME CONVERSION FUNCTIONS # -+################################################## -+# invoked via `$to_host_file_cmd ARG' -+# -+# In each case, ARG is the path to be converted from $build to $host format. -+# Result will be available in $func_to_host_file_result. -+ -+ -+# func_to_host_file ARG -+# Converts the file name ARG from $build format to $host format. Return result -+# in func_to_host_file_result. -+func_to_host_file () -+{ -+ $opt_debug -+ $to_host_file_cmd "$1" -+} -+# end func_to_host_file -+ -+ -+# func_to_tool_file ARG LAZY -+# converts the file name ARG from $build format to toolchain format. Return -+# result in func_to_tool_file_result. If the conversion in use is listed -+# in (the comma separated) LAZY, no conversion takes place. -+func_to_tool_file () -+{ -+ $opt_debug -+ case ,$2, in -+ *,"$to_tool_file_cmd",*) -+ func_to_tool_file_result=$1 -+ ;; -+ *) -+ $to_tool_file_cmd "$1" -+ func_to_tool_file_result=$func_to_host_file_result -+ ;; -+ esac -+} -+# end func_to_tool_file -+ -+ -+# func_convert_file_noop ARG -+# Copy ARG to func_to_host_file_result. -+func_convert_file_noop () -+{ -+ func_to_host_file_result="$1" -+} -+# end func_convert_file_noop -+ -+ -+# func_convert_file_msys_to_w32 ARG -+# Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic -+# conversion to w32 is not available inside the cwrapper. Returns result in -+# func_to_host_file_result. -+func_convert_file_msys_to_w32 () -+{ -+ $opt_debug -+ func_to_host_file_result="$1" -+ if test -n "$1"; then -+ func_convert_core_msys_to_w32 "$1" -+ func_to_host_file_result="$func_convert_core_msys_to_w32_result" -+ fi -+ func_convert_file_check "$1" "$func_to_host_file_result" -+} -+# end func_convert_file_msys_to_w32 -+ -+ -+# func_convert_file_cygwin_to_w32 ARG -+# Convert file name ARG from Cygwin to w32 format. Returns result in -+# func_to_host_file_result. -+func_convert_file_cygwin_to_w32 () -+{ -+ $opt_debug -+ func_to_host_file_result="$1" -+ if test -n "$1"; then -+ # because $build is cygwin, we call "the" cygpath in $PATH; no need to use -+ # LT_CYGPATH in this case. -+ func_to_host_file_result=`cygpath -m "$1"` -+ fi -+ func_convert_file_check "$1" "$func_to_host_file_result" -+} -+# end func_convert_file_cygwin_to_w32 -+ -+ -+# func_convert_file_nix_to_w32 ARG -+# Convert file name ARG from *nix to w32 format. Requires a wine environment -+# and a working winepath. Returns result in func_to_host_file_result. -+func_convert_file_nix_to_w32 () -+{ -+ $opt_debug -+ func_to_host_file_result="$1" -+ if test -n "$1"; then -+ func_convert_core_file_wine_to_w32 "$1" -+ func_to_host_file_result="$func_convert_core_file_wine_to_w32_result" -+ fi -+ func_convert_file_check "$1" "$func_to_host_file_result" -+} -+# end func_convert_file_nix_to_w32 -+ -+ -+# func_convert_file_msys_to_cygwin ARG -+# Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. -+# Returns result in func_to_host_file_result. -+func_convert_file_msys_to_cygwin () -+{ -+ $opt_debug -+ func_to_host_file_result="$1" -+ if test -n "$1"; then -+ func_convert_core_msys_to_w32 "$1" -+ func_cygpath -u "$func_convert_core_msys_to_w32_result" -+ func_to_host_file_result="$func_cygpath_result" -+ fi -+ func_convert_file_check "$1" "$func_to_host_file_result" -+} -+# end func_convert_file_msys_to_cygwin -+ -+ -+# func_convert_file_nix_to_cygwin ARG -+# Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed -+# in a wine environment, working winepath, and LT_CYGPATH set. Returns result -+# in func_to_host_file_result. -+func_convert_file_nix_to_cygwin () -+{ -+ $opt_debug -+ func_to_host_file_result="$1" -+ if test -n "$1"; then -+ # convert from *nix to w32, then use cygpath to convert from w32 to cygwin. -+ func_convert_core_file_wine_to_w32 "$1" -+ func_cygpath -u "$func_convert_core_file_wine_to_w32_result" -+ func_to_host_file_result="$func_cygpath_result" -+ fi -+ func_convert_file_check "$1" "$func_to_host_file_result" -+} -+# end func_convert_file_nix_to_cygwin -+ -+ -+############################################# -+# $build to $host PATH CONVERSION FUNCTIONS # -+############################################# -+# invoked via `$to_host_path_cmd ARG' -+# -+# In each case, ARG is the path to be converted from $build to $host format. -+# The result will be available in $func_to_host_path_result. -+# -+# Path separators are also converted from $build format to $host format. If -+# ARG begins or ends with a path separator character, it is preserved (but -+# converted to $host format) on output. -+# -+# All path conversion functions are named using the following convention: -+# file name conversion function : func_convert_file_X_to_Y () -+# path conversion function : func_convert_path_X_to_Y () -+# where, for any given $build/$host combination the 'X_to_Y' value is the -+# same. If conversion functions are added for new $build/$host combinations, -+# the two new functions must follow this pattern, or func_init_to_host_path_cmd -+# will break. -+ -+ -+# func_init_to_host_path_cmd -+# Ensures that function "pointer" variable $to_host_path_cmd is set to the -+# appropriate value, based on the value of $to_host_file_cmd. -+to_host_path_cmd= -+func_init_to_host_path_cmd () -+{ -+ $opt_debug -+ if test -z "$to_host_path_cmd"; then -+ func_stripname 'func_convert_file_' '' "$to_host_file_cmd" -+ to_host_path_cmd="func_convert_path_${func_stripname_result}" -+ fi -+} -+ -+ -+# func_to_host_path ARG -+# Converts the path ARG from $build format to $host format. Return result -+# in func_to_host_path_result. -+func_to_host_path () -+{ -+ $opt_debug -+ func_init_to_host_path_cmd -+ $to_host_path_cmd "$1" -+} -+# end func_to_host_path -+ -+ -+# func_convert_path_noop ARG -+# Copy ARG to func_to_host_path_result. -+func_convert_path_noop () -+{ -+ func_to_host_path_result="$1" -+} -+# end func_convert_path_noop -+ -+ -+# func_convert_path_msys_to_w32 ARG -+# Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic -+# conversion to w32 is not available inside the cwrapper. Returns result in -+# func_to_host_path_result. -+func_convert_path_msys_to_w32 () -+{ -+ $opt_debug -+ func_to_host_path_result="$1" -+ if test -n "$1"; then -+ # Remove leading and trailing path separator characters from ARG. MSYS -+ # behavior is inconsistent here; cygpath turns them into '.;' and ';.'; -+ # and winepath ignores them completely. -+ func_stripname : : "$1" -+ func_to_host_path_tmp1=$func_stripname_result -+ func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" -+ func_to_host_path_result="$func_convert_core_msys_to_w32_result" -+ func_convert_path_check : ";" \ -+ "$func_to_host_path_tmp1" "$func_to_host_path_result" -+ func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" -+ fi -+} -+# end func_convert_path_msys_to_w32 -+ -+ -+# func_convert_path_cygwin_to_w32 ARG -+# Convert path ARG from Cygwin to w32 format. Returns result in -+# func_to_host_file_result. -+func_convert_path_cygwin_to_w32 () -+{ -+ $opt_debug -+ func_to_host_path_result="$1" -+ if test -n "$1"; then -+ # See func_convert_path_msys_to_w32: -+ func_stripname : : "$1" -+ func_to_host_path_tmp1=$func_stripname_result -+ func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"` -+ func_convert_path_check : ";" \ -+ "$func_to_host_path_tmp1" "$func_to_host_path_result" -+ func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" -+ fi -+} -+# end func_convert_path_cygwin_to_w32 -+ -+ -+# func_convert_path_nix_to_w32 ARG -+# Convert path ARG from *nix to w32 format. Requires a wine environment and -+# a working winepath. Returns result in func_to_host_file_result. -+func_convert_path_nix_to_w32 () -+{ -+ $opt_debug -+ func_to_host_path_result="$1" -+ if test -n "$1"; then -+ # See func_convert_path_msys_to_w32: -+ func_stripname : : "$1" -+ func_to_host_path_tmp1=$func_stripname_result -+ func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" -+ func_to_host_path_result="$func_convert_core_path_wine_to_w32_result" -+ func_convert_path_check : ";" \ -+ "$func_to_host_path_tmp1" "$func_to_host_path_result" -+ func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" -+ fi -+} -+# end func_convert_path_nix_to_w32 -+ -+ -+# func_convert_path_msys_to_cygwin ARG -+# Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. -+# Returns result in func_to_host_file_result. -+func_convert_path_msys_to_cygwin () -+{ -+ $opt_debug -+ func_to_host_path_result="$1" -+ if test -n "$1"; then -+ # See func_convert_path_msys_to_w32: -+ func_stripname : : "$1" -+ func_to_host_path_tmp1=$func_stripname_result -+ func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" -+ func_cygpath -u -p "$func_convert_core_msys_to_w32_result" -+ func_to_host_path_result="$func_cygpath_result" -+ func_convert_path_check : : \ -+ "$func_to_host_path_tmp1" "$func_to_host_path_result" -+ func_convert_path_front_back_pathsep ":*" "*:" : "$1" -+ fi -+} -+# end func_convert_path_msys_to_cygwin -+ -+ -+# func_convert_path_nix_to_cygwin ARG -+# Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a -+# a wine environment, working winepath, and LT_CYGPATH set. Returns result in -+# func_to_host_file_result. -+func_convert_path_nix_to_cygwin () -+{ -+ $opt_debug -+ func_to_host_path_result="$1" -+ if test -n "$1"; then -+ # Remove leading and trailing path separator characters from -+ # ARG. msys behavior is inconsistent here, cygpath turns them -+ # into '.;' and ';.', and winepath ignores them completely. -+ func_stripname : : "$1" -+ func_to_host_path_tmp1=$func_stripname_result -+ func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" -+ func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result" -+ func_to_host_path_result="$func_cygpath_result" -+ func_convert_path_check : : \ -+ "$func_to_host_path_tmp1" "$func_to_host_path_result" -+ func_convert_path_front_back_pathsep ":*" "*:" : "$1" -+ fi -+} -+# end func_convert_path_nix_to_cygwin -+ -+ - # func_mode_compile arg... - func_mode_compile () - { -@@ -1314,12 +1985,12 @@ func_mode_compile () - ;; - - -pie | -fpie | -fPIE) -- pie_flag="$pie_flag $arg" -+ func_append pie_flag " $arg" - continue - ;; - - -shared | -static | -prefer-pic | -prefer-non-pic) -- later="$later $arg" -+ func_append later " $arg" - continue - ;; - -@@ -1340,15 +2011,14 @@ func_mode_compile () - save_ifs="$IFS"; IFS=',' - for arg in $args; do - IFS="$save_ifs" -- func_quote_for_eval "$arg" -- lastarg="$lastarg $func_quote_for_eval_result" -+ func_append_quoted lastarg "$arg" - done - IFS="$save_ifs" - func_stripname ' ' '' "$lastarg" - lastarg=$func_stripname_result - - # Add the arguments to base_compile. -- base_compile="$base_compile $lastarg" -+ func_append base_compile " $lastarg" - continue - ;; - -@@ -1364,8 +2034,7 @@ func_mode_compile () - esac # case $arg_mode - - # Aesthetically quote the previous argument. -- func_quote_for_eval "$lastarg" -- base_compile="$base_compile $func_quote_for_eval_result" -+ func_append_quoted base_compile "$lastarg" - done # for arg - - case $arg_mode in -@@ -1496,17 +2165,16 @@ compiler." - $opt_dry_run || $RM $removelist - exit $EXIT_FAILURE - fi -- removelist="$removelist $output_obj" -+ func_append removelist " $output_obj" - $ECHO "$srcfile" > "$lockfile" - fi - - $opt_dry_run || $RM $removelist -- removelist="$removelist $lockfile" -+ func_append removelist " $lockfile" - trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 - -- if test -n "$fix_srcfile_path"; then -- eval "srcfile=\"$fix_srcfile_path\"" -- fi -+ func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 -+ srcfile=$func_to_tool_file_result - func_quote_for_eval "$srcfile" - qsrcfile=$func_quote_for_eval_result - -@@ -1526,7 +2194,7 @@ compiler." - - if test -z "$output_obj"; then - # Place PIC objects in $objdir -- command="$command -o $lobj" -+ func_append command " -o $lobj" - fi - - func_show_eval_locale "$command" \ -@@ -1573,11 +2241,11 @@ compiler." - command="$base_compile $qsrcfile $pic_flag" - fi - if test "$compiler_c_o" = yes; then -- command="$command -o $obj" -+ func_append command " -o $obj" - fi - - # Suppress compiler output if we already did a PIC compilation. -- command="$command$suppress_output" -+ func_append command "$suppress_output" - func_show_eval_locale "$command" \ - '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' - -@@ -1622,13 +2290,13 @@ compiler." - } - - $opt_help || { -- test "$mode" = compile && func_mode_compile ${1+"$@"} -+ test "$opt_mode" = compile && func_mode_compile ${1+"$@"} - } - - func_mode_help () - { - # We need to display help for each of the modes. -- case $mode in -+ case $opt_mode in - "") - # Generic help is extracted from the usage comments - # at the start of this file. -@@ -1659,8 +2327,8 @@ This mode accepts the following addition - - -o OUTPUT-FILE set the output file name to OUTPUT-FILE - -no-suppress do not suppress compiler output for multiple passes -- -prefer-pic try to building PIC objects only -- -prefer-non-pic try to building non-PIC objects only -+ -prefer-pic try to build PIC objects only -+ -prefer-non-pic try to build non-PIC objects only - -shared do not build a \`.o' file suitable for static linking - -static only build a \`.o' file suitable for static linking - -Wc,FLAG pass FLAG directly to the compiler -@@ -1804,7 +2472,7 @@ Otherwise, only FILE itself is deleted u - ;; - - *) -- func_fatal_help "invalid operation mode \`$mode'" -+ func_fatal_help "invalid operation mode \`$opt_mode'" - ;; - esac - -@@ -1819,13 +2487,13 @@ if $opt_help; then - else - { - func_help noexit -- for mode in compile link execute install finish uninstall clean; do -+ for opt_mode in compile link execute install finish uninstall clean; do - func_mode_help - done - } | sed -n '1p; 2,$s/^Usage:/ or: /p' - { - func_help noexit -- for mode in compile link execute install finish uninstall clean; do -+ for opt_mode in compile link execute install finish uninstall clean; do - echo - func_mode_help - done -@@ -1854,13 +2522,16 @@ func_mode_execute () - func_fatal_help "you must specify a COMMAND" - - # Handle -dlopen flags immediately. -- for file in $execute_dlfiles; do -+ for file in $opt_dlopen; do - test -f "$file" \ - || func_fatal_help "\`$file' is not a file" - - dir= - case $file in - *.la) -+ func_resolve_sysroot "$file" -+ file=$func_resolve_sysroot_result -+ - # Check to see that this really is a libtool archive. - func_lalib_unsafe_p "$file" \ - || func_fatal_help "\`$lib' is not a valid libtool archive" -@@ -1882,7 +2553,7 @@ func_mode_execute () - dir="$func_dirname_result" - - if test -f "$dir/$objdir/$dlname"; then -- dir="$dir/$objdir" -+ func_append dir "/$objdir" - else - if test ! -f "$dir/$dlname"; then - func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" -@@ -1907,10 +2578,10 @@ func_mode_execute () - test -n "$absdir" && dir="$absdir" - - # Now add the directory to shlibpath_var. -- if eval test -z \"\$$shlibpath_var\"; then -- eval $shlibpath_var=\$dir -+ if eval "test -z \"\$$shlibpath_var\""; then -+ eval "$shlibpath_var=\"\$dir\"" - else -- eval $shlibpath_var=\$dir:\$$shlibpath_var -+ eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" - fi - done - -@@ -1939,8 +2610,7 @@ func_mode_execute () - ;; - esac - # Quote arguments (to preserve shell metacharacters). -- func_quote_for_eval "$file" -- args="$args $func_quote_for_eval_result" -+ func_append_quoted args "$file" - done - - if test "X$opt_dry_run" = Xfalse; then -@@ -1972,22 +2642,59 @@ func_mode_execute () - fi - } - --test "$mode" = execute && func_mode_execute ${1+"$@"} -+test "$opt_mode" = execute && func_mode_execute ${1+"$@"} - - - # func_mode_finish arg... - func_mode_finish () - { - $opt_debug -- libdirs="$nonopt" -+ libs= -+ libdirs= - admincmds= - -- if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then -- for dir -- do -- libdirs="$libdirs $dir" -- done -+ for opt in "$nonopt" ${1+"$@"} -+ do -+ if test -d "$opt"; then -+ func_append libdirs " $opt" -+ -+ elif test -f "$opt"; then -+ if func_lalib_unsafe_p "$opt"; then -+ func_append libs " $opt" -+ else -+ func_warning "\`$opt' is not a valid libtool archive" -+ fi -+ -+ else -+ func_fatal_error "invalid argument \`$opt'" -+ fi -+ done -+ -+ if test -n "$libs"; then -+ if test -n "$lt_sysroot"; then -+ sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"` -+ sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;" -+ else -+ sysroot_cmd= -+ fi -+ -+ # Remove sysroot references -+ if $opt_dry_run; then -+ for lib in $libs; do -+ echo "removing references to $lt_sysroot and \`=' prefixes from $lib" -+ done -+ else -+ tmpdir=`func_mktempdir` -+ for lib in $libs; do -+ sed -e "${sysroot_cmd} s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ -+ > $tmpdir/tmp-la -+ mv -f $tmpdir/tmp-la $lib -+ done -+ ${RM}r "$tmpdir" -+ fi -+ fi - -+ if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then - for libdir in $libdirs; do - if test -n "$finish_cmds"; then - # Do each command in the finish commands. -@@ -1997,7 +2704,7 @@ func_mode_finish () - if test -n "$finish_eval"; then - # Do the single finish_eval. - eval cmds=\"$finish_eval\" -- $opt_dry_run || eval "$cmds" || admincmds="$admincmds -+ $opt_dry_run || eval "$cmds" || func_append admincmds " - $cmds" - fi - done -@@ -2006,53 +2713,55 @@ func_mode_finish () - # Exit here if they wanted silent mode. - $opt_silent && exit $EXIT_SUCCESS - -- echo "----------------------------------------------------------------------" -- echo "Libraries have been installed in:" -- for libdir in $libdirs; do -- $ECHO " $libdir" -- done -- echo -- echo "If you ever happen to want to link against installed libraries" -- echo "in a given directory, LIBDIR, you must either use libtool, and" -- echo "specify the full pathname of the library, or use the \`-LLIBDIR'" -- echo "flag during linking and do at least one of the following:" -- if test -n "$shlibpath_var"; then -- echo " - add LIBDIR to the \`$shlibpath_var' environment variable" -- echo " during execution" -- fi -- if test -n "$runpath_var"; then -- echo " - add LIBDIR to the \`$runpath_var' environment variable" -- echo " during linking" -- fi -- if test -n "$hardcode_libdir_flag_spec"; then -- libdir=LIBDIR -- eval "flag=\"$hardcode_libdir_flag_spec\"" -+ if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then -+ echo "----------------------------------------------------------------------" -+ echo "Libraries have been installed in:" -+ for libdir in $libdirs; do -+ $ECHO " $libdir" -+ done -+ echo -+ echo "If you ever happen to want to link against installed libraries" -+ echo "in a given directory, LIBDIR, you must either use libtool, and" -+ echo "specify the full pathname of the library, or use the \`-LLIBDIR'" -+ echo "flag during linking and do at least one of the following:" -+ if test -n "$shlibpath_var"; then -+ echo " - add LIBDIR to the \`$shlibpath_var' environment variable" -+ echo " during execution" -+ fi -+ if test -n "$runpath_var"; then -+ echo " - add LIBDIR to the \`$runpath_var' environment variable" -+ echo " during linking" -+ fi -+ if test -n "$hardcode_libdir_flag_spec"; then -+ libdir=LIBDIR -+ eval flag=\"$hardcode_libdir_flag_spec\" - -- $ECHO " - use the \`$flag' linker flag" -- fi -- if test -n "$admincmds"; then -- $ECHO " - have your system administrator run these commands:$admincmds" -- fi -- if test -f /etc/ld.so.conf; then -- echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" -- fi -- echo -+ $ECHO " - use the \`$flag' linker flag" -+ fi -+ if test -n "$admincmds"; then -+ $ECHO " - have your system administrator run these commands:$admincmds" -+ fi -+ if test -f /etc/ld.so.conf; then -+ echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" -+ fi -+ echo - -- echo "See any operating system documentation about shared libraries for" -- case $host in -- solaris2.[6789]|solaris2.1[0-9]) -- echo "more information, such as the ld(1), crle(1) and ld.so(8) manual" -- echo "pages." -- ;; -- *) -- echo "more information, such as the ld(1) and ld.so(8) manual pages." -- ;; -- esac -- echo "----------------------------------------------------------------------" -+ echo "See any operating system documentation about shared libraries for" -+ case $host in -+ solaris2.[6789]|solaris2.1[0-9]) -+ echo "more information, such as the ld(1), crle(1) and ld.so(8) manual" -+ echo "pages." -+ ;; -+ *) -+ echo "more information, such as the ld(1) and ld.so(8) manual pages." -+ ;; -+ esac -+ echo "----------------------------------------------------------------------" -+ fi - exit $EXIT_SUCCESS - } - --test "$mode" = finish && func_mode_finish ${1+"$@"} -+test "$opt_mode" = finish && func_mode_finish ${1+"$@"} - - - # func_mode_install arg... -@@ -2077,7 +2786,7 @@ func_mode_install () - # The real first argument should be the name of the installation program. - # Aesthetically quote it. - func_quote_for_eval "$arg" -- install_prog="$install_prog$func_quote_for_eval_result" -+ func_append install_prog "$func_quote_for_eval_result" - install_shared_prog=$install_prog - case " $install_prog " in - *[\\\ /]cp\ *) install_cp=: ;; -@@ -2097,7 +2806,7 @@ func_mode_install () - do - arg2= - if test -n "$dest"; then -- files="$files $dest" -+ func_append files " $dest" - dest=$arg - continue - fi -@@ -2135,11 +2844,11 @@ func_mode_install () - - # Aesthetically quote the argument. - func_quote_for_eval "$arg" -- install_prog="$install_prog $func_quote_for_eval_result" -+ func_append install_prog " $func_quote_for_eval_result" - if test -n "$arg2"; then - func_quote_for_eval "$arg2" - fi -- install_shared_prog="$install_shared_prog $func_quote_for_eval_result" -+ func_append install_shared_prog " $func_quote_for_eval_result" - done - - test -z "$install_prog" && \ -@@ -2151,7 +2860,7 @@ func_mode_install () - if test -n "$install_override_mode" && $no_mode; then - if $install_cp; then :; else - func_quote_for_eval "$install_override_mode" -- install_shared_prog="$install_shared_prog -m $func_quote_for_eval_result" -+ func_append install_shared_prog " -m $func_quote_for_eval_result" - fi - fi - -@@ -2209,10 +2918,13 @@ func_mode_install () - case $file in - *.$libext) - # Do the static libraries later. -- staticlibs="$staticlibs $file" -+ func_append staticlibs " $file" - ;; - - *.la) -+ func_resolve_sysroot "$file" -+ file=$func_resolve_sysroot_result -+ - # Check to see that this really is a libtool archive. - func_lalib_unsafe_p "$file" \ - || func_fatal_help "\`$file' is not a valid libtool archive" -@@ -2226,23 +2938,30 @@ func_mode_install () - if test "X$destdir" = "X$libdir"; then - case "$current_libdirs " in - *" $libdir "*) ;; -- *) current_libdirs="$current_libdirs $libdir" ;; -+ *) func_append current_libdirs " $libdir" ;; - esac - else - # Note the libdir as a future libdir. - case "$future_libdirs " in - *" $libdir "*) ;; -- *) future_libdirs="$future_libdirs $libdir" ;; -+ *) func_append future_libdirs " $libdir" ;; - esac - fi - - func_dirname "$file" "/" "" - dir="$func_dirname_result" -- dir="$dir$objdir" -+ func_append dir "$objdir" - - if test -n "$relink_command"; then -+ # Strip any trailing slash from the destination. -+ func_stripname '' '/' "$libdir" -+ destlibdir=$func_stripname_result -+ -+ func_stripname '' '/' "$destdir" -+ s_destdir=$func_stripname_result -+ - # Determine the prefix the user has applied to our future dir. -- inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"` -+ inst_prefix_dir=`$ECHO "X$s_destdir" | $Xsed -e "s%$destlibdir\$%%"` - - # Don't allow the user to place us outside of our expected - # location b/c this prevents finding dependent libraries that -@@ -2315,7 +3034,7 @@ func_mode_install () - func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' - - # Maybe install the static library, too. -- test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" -+ test -n "$old_library" && func_append staticlibs " $dir/$old_library" - ;; - - *.lo) -@@ -2503,7 +3222,7 @@ func_mode_install () - test -n "$future_libdirs" && \ - func_warning "remember to run \`$progname --finish$future_libdirs'" - -- if test -n "$current_libdirs" && $opt_finish; then -+ if test -n "$current_libdirs"; then - # Maybe just do a dry run. - $opt_dry_run && current_libdirs=" -n$current_libdirs" - exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' -@@ -2512,7 +3231,7 @@ func_mode_install () - fi - } - --test "$mode" = install && func_mode_install ${1+"$@"} -+test "$opt_mode" = install && func_mode_install ${1+"$@"} - - - # func_generate_dlsyms outputname originator pic_p -@@ -2559,6 +3278,18 @@ extern \"C\" { - #pragma GCC diagnostic ignored \"-Wstrict-prototypes\" - #endif - -+/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ -+#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) -+/* DATA imports from DLLs on WIN32 con't be const, because runtime -+ relocations are performed -- see ld's documentation on pseudo-relocs. */ -+# define LT_DLSYM_CONST -+#elif defined(__osf__) -+/* This system does not cope well with relocations in const data. */ -+# define LT_DLSYM_CONST -+#else -+# define LT_DLSYM_CONST const -+#endif -+ - /* External symbol declarations for the compiler. */\ - " - -@@ -2570,21 +3301,22 @@ extern \"C\" { - # Add our own program objects to the symbol list. - progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP` - for progfile in $progfiles; do -- func_verbose "extracting global C symbols from \`$progfile'" -- $opt_dry_run || eval "$NM $progfile | $global_symbol_pipe >> '$nlist'" -+ func_to_tool_file "$progfile" func_convert_file_msys_to_w32 -+ func_verbose "extracting global C symbols from \`$func_to_tool_file_result'" -+ $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'" - done - - if test -n "$exclude_expsyms"; then - $opt_dry_run || { -- $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T -- $MV "$nlist"T "$nlist" -+ eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' -+ eval '$MV "$nlist"T "$nlist"' - } - fi - - if test -n "$export_symbols_regex"; then - $opt_dry_run || { -- $EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T -- $MV "$nlist"T "$nlist" -+ eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' -+ eval '$MV "$nlist"T "$nlist"' - } - fi - -@@ -2593,23 +3325,23 @@ extern \"C\" { - export_symbols="$output_objdir/$outputname.exp" - $opt_dry_run || { - $RM $export_symbols -- ${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' < "$nlist" > "$export_symbols" -+ eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' - case $host in - *cygwin* | *mingw* | *cegcc* ) -- echo EXPORTS > "$output_objdir/$outputname.def" -- cat "$export_symbols" >> "$output_objdir/$outputname.def" -+ eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' -+ eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' - ;; - esac - } - else - $opt_dry_run || { -- ${SED} -e 's/\([].[*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/' < "$export_symbols" > "$output_objdir/$outputname.exp" -- $GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T -- $MV "$nlist"T "$nlist" -+ eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' -+ eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' -+ eval '$MV "$nlist"T "$nlist"' - case $host in - *cygwin* | *mingw* | *cegcc* ) -- echo EXPORTS > "$output_objdir/$outputname.def" -- cat "$nlist" >> "$output_objdir/$outputname.def" -+ eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' -+ eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' - ;; - esac - } -@@ -2620,10 +3352,52 @@ extern \"C\" { - func_verbose "extracting global C symbols from \`$dlprefile'" - func_basename "$dlprefile" - name="$func_basename_result" -- $opt_dry_run || { -- $ECHO ": $name " >> "$nlist" -- eval "$NM $dlprefile 2>/dev/null | $global_symbol_pipe >> '$nlist'" -- } -+ case $host in -+ *cygwin* | *mingw* | *cegcc* ) -+ # if an import library, we need to obtain dlname -+ if func_win32_import_lib_p "$dlprefile"; then -+ func_tr_sh "$dlprefile" -+ eval "curr_lafile=\$libfile_$func_tr_sh_result" -+ dlprefile_dlbasename="" -+ if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then -+ # Use subshell, to avoid clobbering current variable values -+ dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"` -+ if test -n "$dlprefile_dlname" ; then -+ func_basename "$dlprefile_dlname" -+ dlprefile_dlbasename="$func_basename_result" -+ else -+ # no lafile. user explicitly requested -dlpreopen . -+ $sharedlib_from_linklib_cmd "$dlprefile" -+ dlprefile_dlbasename=$sharedlib_from_linklib_result -+ fi -+ fi -+ $opt_dry_run || { -+ if test -n "$dlprefile_dlbasename" ; then -+ eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"' -+ else -+ func_warning "Could not compute DLL name from $name" -+ eval '$ECHO ": $name " >> "$nlist"' -+ fi -+ func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 -+ eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe | -+ $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'" -+ } -+ else # not an import lib -+ $opt_dry_run || { -+ eval '$ECHO ": $name " >> "$nlist"' -+ func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 -+ eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" -+ } -+ fi -+ ;; -+ *) -+ $opt_dry_run || { -+ eval '$ECHO ": $name " >> "$nlist"' -+ func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 -+ eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" -+ } -+ ;; -+ esac - done - - $opt_dry_run || { -@@ -2661,26 +3435,9 @@ typedef struct { - const char *name; - void *address; - } lt_dlsymlist; --" -- case $host in -- *cygwin* | *mingw* | *cegcc* ) -- echo >> "$output_objdir/$my_dlsyms" "\ --/* DATA imports from DLLs on WIN32 con't be const, because -- runtime relocations are performed -- see ld's documentation -- on pseudo-relocs. */" -- lt_dlsym_const= ;; -- *osf5*) -- echo >> "$output_objdir/$my_dlsyms" "\ --/* This system does not cope well with relocations in const data */" -- lt_dlsym_const= ;; -- *) -- lt_dlsym_const=const ;; -- esac -- -- echo >> "$output_objdir/$my_dlsyms" "\ --extern $lt_dlsym_const lt_dlsymlist -+extern LT_DLSYM_CONST lt_dlsymlist - lt_${my_prefix}_LTX_preloaded_symbols[]; --$lt_dlsym_const lt_dlsymlist -+LT_DLSYM_CONST lt_dlsymlist - lt_${my_prefix}_LTX_preloaded_symbols[] = - {\ - { \"$my_originator\", (void *) 0 }," -@@ -2736,7 +3493,7 @@ static const void *lt_preloaded_setup() - for arg in $LTCFLAGS; do - case $arg in - -pie | -fpie | -fPIE) ;; -- *) symtab_cflags="$symtab_cflags $arg" ;; -+ *) func_append symtab_cflags " $arg" ;; - esac - done - -@@ -2796,9 +3553,11 @@ func_win32_libid () - win32_libid_type="x86 archive import" - ;; - *ar\ archive*) # could be an import, or static -- if $OBJDUMP -f "$1" | $SED -e '10q' 2>/dev/null | -- $EGREP 'file format (pe-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then -- win32_nmres=`$NM -f posix -A "$1" | -+ # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. -+ if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | -+ $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then -+ func_to_tool_file "$1" func_convert_file_msys_to_w32 -+ win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | - $SED -n -e ' - 1,100{ - / I /{ -@@ -2827,6 +3586,131 @@ func_win32_libid () - $ECHO "$win32_libid_type" - } - -+# func_cygming_dll_for_implib ARG -+# -+# Platform-specific function to extract the -+# name of the DLL associated with the specified -+# import library ARG. -+# Invoked by eval'ing the libtool variable -+# $sharedlib_from_linklib_cmd -+# Result is available in the variable -+# $sharedlib_from_linklib_result -+func_cygming_dll_for_implib () -+{ -+ $opt_debug -+ sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"` -+} -+ -+# func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs -+# -+# The is the core of a fallback implementation of a -+# platform-specific function to extract the name of the -+# DLL associated with the specified import library LIBNAME. -+# -+# SECTION_NAME is either .idata$6 or .idata$7, depending -+# on the platform and compiler that created the implib. -+# -+# Echos the name of the DLL associated with the -+# specified import library. -+func_cygming_dll_for_implib_fallback_core () -+{ -+ $opt_debug -+ match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"` -+ $OBJDUMP -s --section "$1" "$2" 2>/dev/null | -+ $SED '/^Contents of section '"$match_literal"':/{ -+ # Place marker at beginning of archive member dllname section -+ s/.*/====MARK====/ -+ p -+ d -+ } -+ # These lines can sometimes be longer than 43 characters, but -+ # are always uninteresting -+ /:[ ]*file format pe[i]\{,1\}-/d -+ /^In archive [^:]*:/d -+ # Ensure marker is printed -+ /^====MARK====/p -+ # Remove all lines with less than 43 characters -+ /^.\{43\}/!d -+ # From remaining lines, remove first 43 characters -+ s/^.\{43\}//' | -+ $SED -n ' -+ # Join marker and all lines until next marker into a single line -+ /^====MARK====/ b para -+ H -+ $ b para -+ b -+ :para -+ x -+ s/\n//g -+ # Remove the marker -+ s/^====MARK====// -+ # Remove trailing dots and whitespace -+ s/[\. \t]*$// -+ # Print -+ /./p' | -+ # we now have a list, one entry per line, of the stringified -+ # contents of the appropriate section of all members of the -+ # archive which possess that section. Heuristic: eliminate -+ # all those which have a first or second character that is -+ # a '.' (that is, objdump's representation of an unprintable -+ # character.) This should work for all archives with less than -+ # 0x302f exports -- but will fail for DLLs whose name actually -+ # begins with a literal '.' or a single character followed by -+ # a '.'. -+ # -+ # Of those that remain, print the first one. -+ $SED -e '/^\./d;/^.\./d;q' -+} -+ -+# func_cygming_gnu_implib_p ARG -+# This predicate returns with zero status (TRUE) if -+# ARG is a GNU/binutils-style import library. Returns -+# with nonzero status (FALSE) otherwise. -+func_cygming_gnu_implib_p () -+{ -+ $opt_debug -+ func_to_tool_file "$1" func_convert_file_msys_to_w32 -+ func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'` -+ test -n "$func_cygming_gnu_implib_tmp" -+} -+ -+# func_cygming_ms_implib_p ARG -+# This predicate returns with zero status (TRUE) if -+# ARG is an MS-style import library. Returns -+# with nonzero status (FALSE) otherwise. -+func_cygming_ms_implib_p () -+{ -+ $opt_debug -+ func_to_tool_file "$1" func_convert_file_msys_to_w32 -+ func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` -+ test -n "$func_cygming_ms_implib_tmp" -+} -+ -+# func_cygming_dll_for_implib_fallback ARG -+# Platform-specific function to extract the -+# name of the DLL associated with the specified -+# import library ARG. -+# -+# This fallback implementation is for use when $DLLTOOL -+# does not support the --identify-strict option. -+# Invoked by eval'ing the libtool variable -+# $sharedlib_from_linklib_cmd -+# Result is available in the variable -+# $sharedlib_from_linklib_result -+func_cygming_dll_for_implib_fallback () -+{ -+ $opt_debug -+ if func_cygming_gnu_implib_p "$1" ; then -+ # binutils import library -+ sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"` -+ elif func_cygming_ms_implib_p "$1" ; then -+ # ms-generated import library -+ sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"` -+ else -+ # unknown -+ sharedlib_from_linklib_result="" -+ fi -+} - - - # func_extract_an_archive dir oldlib -@@ -2917,7 +3801,7 @@ func_extract_archives () - darwin_file= - darwin_files= - for darwin_file in $darwin_filelist; do -- darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP` -+ darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP` - $LIPO -create -output "$darwin_file" $darwin_files - done # $darwin_filelist - $RM -rf unfat-$$ -@@ -2932,7 +3816,7 @@ func_extract_archives () - func_extract_an_archive "$my_xdir" "$my_xabs" - ;; - esac -- my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` -+ my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP` - done - - func_extract_archives_result="$my_oldobjs" -@@ -3014,7 +3898,110 @@ func_fallback_echo () - _LTECHO_EOF' - } - ECHO=\"$qECHO\" -- fi\ -+ fi -+ -+# Very basic option parsing. These options are (a) specific to -+# the libtool wrapper, (b) are identical between the wrapper -+# /script/ and the wrapper /executable/ which is used only on -+# windows platforms, and (c) all begin with the string "--lt-" -+# (application programs are unlikely to have options which match -+# this pattern). -+# -+# There are only two supported options: --lt-debug and -+# --lt-dump-script. There is, deliberately, no --lt-help. -+# -+# The first argument to this parsing function should be the -+# script's $0 value, followed by "$@". -+lt_option_debug= -+func_parse_lt_options () -+{ -+ lt_script_arg0=\$0 -+ shift -+ for lt_opt -+ do -+ case \"\$lt_opt\" in -+ --lt-debug) lt_option_debug=1 ;; -+ --lt-dump-script) -+ lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\` -+ test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=. -+ lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\` -+ cat \"\$lt_dump_D/\$lt_dump_F\" -+ exit 0 -+ ;; -+ --lt-*) -+ \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2 -+ exit 1 -+ ;; -+ esac -+ done -+ -+ # Print the debug banner immediately: -+ if test -n \"\$lt_option_debug\"; then -+ echo \"${outputname}:${output}:\${LINENO}: libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\" 1>&2 -+ fi -+} -+ -+# Used when --lt-debug. Prints its arguments to stdout -+# (redirection is the responsibility of the caller) -+func_lt_dump_args () -+{ -+ lt_dump_args_N=1; -+ for lt_arg -+ do -+ \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[\$lt_dump_args_N]: \$lt_arg\" -+ lt_dump_args_N=\`expr \$lt_dump_args_N + 1\` -+ done -+} -+ -+# Core function for launching the target application -+func_exec_program_core () -+{ -+" -+ case $host in -+ # Backslashes separate directories on plain windows -+ *-*-mingw | *-*-os2* | *-cegcc*) -+ $ECHO "\ -+ if test -n \"\$lt_option_debug\"; then -+ \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir\\\\\$program\" 1>&2 -+ func_lt_dump_args \${1+\"\$@\"} 1>&2 -+ fi -+ exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} -+" -+ ;; -+ -+ *) -+ $ECHO "\ -+ if test -n \"\$lt_option_debug\"; then -+ \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir/\$program\" 1>&2 -+ func_lt_dump_args \${1+\"\$@\"} 1>&2 -+ fi -+ exec \"\$progdir/\$program\" \${1+\"\$@\"} -+" -+ ;; -+ esac -+ $ECHO "\ -+ \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 -+ exit 1 -+} -+ -+# A function to encapsulate launching the target application -+# Strips options in the --lt-* namespace from \$@ and -+# launches target application with the remaining arguments. -+func_exec_program () -+{ -+ for lt_wr_arg -+ do -+ case \$lt_wr_arg in -+ --lt-*) ;; -+ *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; -+ esac -+ shift -+ done -+ func_exec_program_core \${1+\"\$@\"} -+} -+ -+ # Parse options -+ func_parse_lt_options \"\$0\" \${1+\"\$@\"} - - # Find the directory that this script lives in. - thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\` -@@ -3078,7 +4065,7 @@ _LTECHO_EOF' - - # relink executable if necessary - if test -n \"\$relink_command\"; then -- if relink_command_output=\`eval \"\$relink_command\" 2>&1\`; then : -+ if relink_command_output=\`eval \$relink_command 2>&1\`; then : - else - $ECHO \"\$relink_command_output\" >&2 - $RM \"\$progdir/\$file\" -@@ -3102,6 +4089,18 @@ _LTECHO_EOF' - - if test -f \"\$progdir/\$program\"; then" - -+ # fixup the dll searchpath if we need to. -+ # -+ # Fix the DLL searchpath if we need to. Do this before prepending -+ # to shlibpath, because on Windows, both are PATH and uninstalled -+ # libraries must come first. -+ if test -n "$dllsearchpath"; then -+ $ECHO "\ -+ # Add the dll search path components to the executable PATH -+ PATH=$dllsearchpath:\$PATH -+" -+ fi -+ - # Export our shlibpath_var if we have one. - if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then - $ECHO "\ -@@ -3116,35 +4115,10 @@ _LTECHO_EOF' - " - fi - -- # fixup the dll searchpath if we need to. -- if test -n "$dllsearchpath"; then -- $ECHO "\ -- # Add the dll search path components to the executable PATH -- PATH=$dllsearchpath:\$PATH --" -- fi -- - $ECHO "\ - if test \"\$libtool_execute_magic\" != \"$magic\"; then - # Run the actual program with our arguments. --" -- case $host in -- # Backslashes separate directories on plain windows -- *-*-mingw | *-*-os2* | *-cegcc*) -- $ECHO "\ -- exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} --" -- ;; -- -- *) -- $ECHO "\ -- exec \"\$progdir/\$program\" \${1+\"\$@\"} --" -- ;; -- esac -- $ECHO "\ -- \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 -- exit 1 -+ func_exec_program \${1+\"\$@\"} - fi - else - # The program doesn't exist. -@@ -3158,166 +4132,6 @@ fi\ - } - - --# func_to_host_path arg --# --# Convert paths to host format when used with build tools. --# Intended for use with "native" mingw (where libtool itself --# is running under the msys shell), or in the following cross- --# build environments: --# $build $host --# mingw (msys) mingw [e.g. native] --# cygwin mingw --# *nix + wine mingw --# where wine is equipped with the `winepath' executable. --# In the native mingw case, the (msys) shell automatically --# converts paths for any non-msys applications it launches, --# but that facility isn't available from inside the cwrapper. --# Similar accommodations are necessary for $host mingw and --# $build cygwin. Calling this function does no harm for other --# $host/$build combinations not listed above. --# --# ARG is the path (on $build) that should be converted to --# the proper representation for $host. The result is stored --# in $func_to_host_path_result. --func_to_host_path () --{ -- func_to_host_path_result="$1" -- if test -n "$1"; then -- case $host in -- *mingw* ) -- lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' -- case $build in -- *mingw* ) # actually, msys -- # awkward: cmd appends spaces to result -- func_to_host_path_result=`( cmd //c echo "$1" ) 2>/dev/null | -- $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"` -- ;; -- *cygwin* ) -- func_to_host_path_result=`cygpath -w "$1" | -- $SED -e "$lt_sed_naive_backslashify"` -- ;; -- * ) -- # Unfortunately, winepath does not exit with a non-zero -- # error code, so we are forced to check the contents of -- # stdout. On the other hand, if the command is not -- # found, the shell will set an exit code of 127 and print -- # *an error message* to stdout. So we must check for both -- # error code of zero AND non-empty stdout, which explains -- # the odd construction: -- func_to_host_path_tmp1=`winepath -w "$1" 2>/dev/null` -- if test "$?" -eq 0 && test -n "${func_to_host_path_tmp1}"; then -- func_to_host_path_result=`$ECHO "$func_to_host_path_tmp1" | -- $SED -e "$lt_sed_naive_backslashify"` -- else -- # Allow warning below. -- func_to_host_path_result= -- fi -- ;; -- esac -- if test -z "$func_to_host_path_result" ; then -- func_error "Could not determine host path corresponding to" -- func_error " \`$1'" -- func_error "Continuing, but uninstalled executables may not work." -- # Fallback: -- func_to_host_path_result="$1" -- fi -- ;; -- esac -- fi --} --# end: func_to_host_path -- --# func_to_host_pathlist arg --# --# Convert pathlists to host format when used with build tools. --# See func_to_host_path(), above. This function supports the --# following $build/$host combinations (but does no harm for --# combinations not listed here): --# $build $host --# mingw (msys) mingw [e.g. native] --# cygwin mingw --# *nix + wine mingw --# --# Path separators are also converted from $build format to --# $host format. If ARG begins or ends with a path separator --# character, it is preserved (but converted to $host format) --# on output. --# --# ARG is a pathlist (on $build) that should be converted to --# the proper representation on $host. The result is stored --# in $func_to_host_pathlist_result. --func_to_host_pathlist () --{ -- func_to_host_pathlist_result="$1" -- if test -n "$1"; then -- case $host in -- *mingw* ) -- lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' -- # Remove leading and trailing path separator characters from -- # ARG. msys behavior is inconsistent here, cygpath turns them -- # into '.;' and ';.', and winepath ignores them completely. -- func_stripname : : "$1" -- func_to_host_pathlist_tmp1=$func_stripname_result -- case $build in -- *mingw* ) # Actually, msys. -- # Awkward: cmd appends spaces to result. -- func_to_host_pathlist_result=` -- ( cmd //c echo "$func_to_host_pathlist_tmp1" ) 2>/dev/null | -- $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"` -- ;; -- *cygwin* ) -- func_to_host_pathlist_result=`cygpath -w -p "$func_to_host_pathlist_tmp1" | -- $SED -e "$lt_sed_naive_backslashify"` -- ;; -- * ) -- # unfortunately, winepath doesn't convert pathlists -- func_to_host_pathlist_result="" -- func_to_host_pathlist_oldIFS=$IFS -- IFS=: -- for func_to_host_pathlist_f in $func_to_host_pathlist_tmp1 ; do -- IFS=$func_to_host_pathlist_oldIFS -- if test -n "$func_to_host_pathlist_f" ; then -- func_to_host_path "$func_to_host_pathlist_f" -- if test -n "$func_to_host_path_result" ; then -- if test -z "$func_to_host_pathlist_result" ; then -- func_to_host_pathlist_result="$func_to_host_path_result" -- else -- func_append func_to_host_pathlist_result ";$func_to_host_path_result" -- fi -- fi -- fi -- done -- IFS=$func_to_host_pathlist_oldIFS -- ;; -- esac -- if test -z "$func_to_host_pathlist_result"; then -- func_error "Could not determine the host path(s) corresponding to" -- func_error " \`$1'" -- func_error "Continuing, but uninstalled executables may not work." -- # Fallback. This may break if $1 contains DOS-style drive -- # specifications. The fix is not to complicate the expression -- # below, but for the user to provide a working wine installation -- # with winepath so that path translation in the cross-to-mingw -- # case works properly. -- lt_replace_pathsep_nix_to_dos="s|:|;|g" -- func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp1" |\ -- $SED -e "$lt_replace_pathsep_nix_to_dos"` -- fi -- # Now, add the leading and trailing path separators back -- case "$1" in -- :* ) func_to_host_pathlist_result=";$func_to_host_pathlist_result" -- ;; -- esac -- case "$1" in -- *: ) func_append func_to_host_pathlist_result ";" -- ;; -- esac -- ;; -- esac -- fi --} --# end: func_to_host_pathlist -- - # func_emit_cwrapperexe_src - # emit the source code for a wrapper executable on stdout - # Must ONLY be called from within func_mode_link because -@@ -3334,10 +4148,6 @@ func_emit_cwrapperexe_src () - - This wrapper executable should never be moved out of the build directory. - If it is, it will not operate correctly. -- -- Currently, it simply execs the wrapper *script* "$SHELL $output", -- but could eventually absorb all of the scripts functionality and -- exec $objdir/$outputname directly. - */ - EOF - cat <<"EOF" -@@ -3462,22 +4272,13 @@ int setenv (const char *, const char *, - if (stale) { free ((void *) stale); stale = 0; } \ - } while (0) - --#undef LTWRAPPER_DEBUGPRINTF --#if defined LT_DEBUGWRAPPER --# define LTWRAPPER_DEBUGPRINTF(args) ltwrapper_debugprintf args --static void --ltwrapper_debugprintf (const char *fmt, ...) --{ -- va_list args; -- va_start (args, fmt); -- (void) vfprintf (stderr, fmt, args); -- va_end (args); --} -+#if defined(LT_DEBUGWRAPPER) -+static int lt_debug = 1; - #else --# define LTWRAPPER_DEBUGPRINTF(args) -+static int lt_debug = 0; - #endif - --const char *program_name = NULL; -+const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */ - - void *xmalloc (size_t num); - char *xstrdup (const char *string); -@@ -3487,7 +4288,10 @@ char *chase_symlinks (const char *pathsp - int make_executable (const char *path); - int check_executable (const char *path); - char *strendzap (char *str, const char *pat); --void lt_fatal (const char *message, ...); -+void lt_debugprintf (const char *file, int line, const char *fmt, ...); -+void lt_fatal (const char *file, int line, const char *message, ...); -+static const char *nonnull (const char *s); -+static const char *nonempty (const char *s); - void lt_setenv (const char *name, const char *value); - char *lt_extend_str (const char *orig_value, const char *add, int to_end); - void lt_update_exe_path (const char *name, const char *value); -@@ -3497,14 +4301,14 @@ void lt_dump_script (FILE *f); - EOF - - cat <"))); -+ lt_debugprintf (__FILE__, __LINE__, "(main) lt_argv_zero: %s\n", -+ nonnull (lt_argv_zero)); - for (i = 0; i < newargc; i++) - { -- LTWRAPPER_DEBUGPRINTF (("(main) newargz[%d] : %s\n", i, (newargz[i] ? newargz[i] : ""))); -+ lt_debugprintf (__FILE__, __LINE__, "(main) newargz[%d]: %s\n", -+ i, nonnull (newargz[i])); - } - - EOF -@@ -3706,7 +4529,9 @@ EOF - if (rval == -1) - { - /* failed to start process */ -- LTWRAPPER_DEBUGPRINTF (("(main) failed to launch target \"%s\": errno = %d\n", lt_argv_zero, errno)); -+ lt_debugprintf (__FILE__, __LINE__, -+ "(main) failed to launch target \"%s\": %s\n", -+ lt_argv_zero, nonnull (strerror (errno))); - return 127; - } - return rval; -@@ -3728,7 +4553,7 @@ xmalloc (size_t num) - { - void *p = (void *) malloc (num); - if (!p) -- lt_fatal ("Memory exhausted"); -+ lt_fatal (__FILE__, __LINE__, "memory exhausted"); - - return p; - } -@@ -3762,8 +4587,8 @@ check_executable (const char *path) - { - struct stat st; - -- LTWRAPPER_DEBUGPRINTF (("(check_executable) : %s\n", -- path ? (*path ? path : "EMPTY!") : "NULL!")); -+ lt_debugprintf (__FILE__, __LINE__, "(check_executable): %s\n", -+ nonempty (path)); - if ((!path) || (!*path)) - return 0; - -@@ -3780,8 +4605,8 @@ make_executable (const char *path) - int rval = 0; - struct stat st; - -- LTWRAPPER_DEBUGPRINTF (("(make_executable) : %s\n", -- path ? (*path ? path : "EMPTY!") : "NULL!")); -+ lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n", -+ nonempty (path)); - if ((!path) || (!*path)) - return 0; - -@@ -3807,8 +4632,8 @@ find_executable (const char *wrapper) - int tmp_len; - char *concat_name; - -- LTWRAPPER_DEBUGPRINTF (("(find_executable) : %s\n", -- wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!")); -+ lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n", -+ nonempty (wrapper)); - - if ((wrapper == NULL) || (*wrapper == '\0')) - return NULL; -@@ -3861,7 +4686,8 @@ find_executable (const char *wrapper) - { - /* empty path: current directory */ - if (getcwd (tmp, LT_PATHMAX) == NULL) -- lt_fatal ("getcwd failed"); -+ lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", -+ nonnull (strerror (errno))); - tmp_len = strlen (tmp); - concat_name = - XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); -@@ -3886,7 +4712,8 @@ find_executable (const char *wrapper) - } - /* Relative path | not found in path: prepend cwd */ - if (getcwd (tmp, LT_PATHMAX) == NULL) -- lt_fatal ("getcwd failed"); -+ lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", -+ nonnull (strerror (errno))); - tmp_len = strlen (tmp); - concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); - memcpy (concat_name, tmp, tmp_len); -@@ -3912,8 +4739,9 @@ chase_symlinks (const char *pathspec) - int has_symlinks = 0; - while (strlen (tmp_pathspec) && !has_symlinks) - { -- LTWRAPPER_DEBUGPRINTF (("checking path component for symlinks: %s\n", -- tmp_pathspec)); -+ lt_debugprintf (__FILE__, __LINE__, -+ "checking path component for symlinks: %s\n", -+ tmp_pathspec); - if (lstat (tmp_pathspec, &s) == 0) - { - if (S_ISLNK (s.st_mode) != 0) -@@ -3935,8 +4763,9 @@ chase_symlinks (const char *pathspec) - } - else - { -- char *errstr = strerror (errno); -- lt_fatal ("Error accessing file %s (%s)", tmp_pathspec, errstr); -+ lt_fatal (__FILE__, __LINE__, -+ "error accessing file \"%s\": %s", -+ tmp_pathspec, nonnull (strerror (errno))); - } - } - XFREE (tmp_pathspec); -@@ -3949,7 +4778,8 @@ chase_symlinks (const char *pathspec) - tmp_pathspec = realpath (pathspec, buf); - if (tmp_pathspec == 0) - { -- lt_fatal ("Could not follow symlinks for %s", pathspec); -+ lt_fatal (__FILE__, __LINE__, -+ "could not follow symlinks for %s", pathspec); - } - return xstrdup (tmp_pathspec); - #endif -@@ -3975,11 +4805,25 @@ strendzap (char *str, const char *pat) - return str; - } - -+void -+lt_debugprintf (const char *file, int line, const char *fmt, ...) -+{ -+ va_list args; -+ if (lt_debug) -+ { -+ (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line); -+ va_start (args, fmt); -+ (void) vfprintf (stderr, fmt, args); -+ va_end (args); -+ } -+} -+ - static void --lt_error_core (int exit_status, const char *mode, -+lt_error_core (int exit_status, const char *file, -+ int line, const char *mode, - const char *message, va_list ap) - { -- fprintf (stderr, "%s: %s: ", program_name, mode); -+ fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode); - vfprintf (stderr, message, ap); - fprintf (stderr, ".\n"); - -@@ -3988,20 +4832,32 @@ lt_error_core (int exit_status, const ch - } - - void --lt_fatal (const char *message, ...) -+lt_fatal (const char *file, int line, const char *message, ...) - { - va_list ap; - va_start (ap, message); -- lt_error_core (EXIT_FAILURE, "FATAL", message, ap); -+ lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap); - va_end (ap); - } - -+static const char * -+nonnull (const char *s) -+{ -+ return s ? s : "(null)"; -+} -+ -+static const char * -+nonempty (const char *s) -+{ -+ return (s && !*s) ? "(empty)" : nonnull (s); -+} -+ - void - lt_setenv (const char *name, const char *value) - { -- LTWRAPPER_DEBUGPRINTF (("(lt_setenv) setting '%s' to '%s'\n", -- (name ? name : ""), -- (value ? value : ""))); -+ lt_debugprintf (__FILE__, __LINE__, -+ "(lt_setenv) setting '%s' to '%s'\n", -+ nonnull (name), nonnull (value)); - { - #ifdef HAVE_SETENV - /* always make a copy, for consistency with !HAVE_SETENV */ -@@ -4049,9 +4905,9 @@ lt_extend_str (const char *orig_value, c - void - lt_update_exe_path (const char *name, const char *value) - { -- LTWRAPPER_DEBUGPRINTF (("(lt_update_exe_path) modifying '%s' by prepending '%s'\n", -- (name ? name : ""), -- (value ? value : ""))); -+ lt_debugprintf (__FILE__, __LINE__, -+ "(lt_update_exe_path) modifying '%s' by prepending '%s'\n", -+ nonnull (name), nonnull (value)); - - if (name && *name && value && *value) - { -@@ -4070,9 +4926,9 @@ lt_update_exe_path (const char *name, co - void - lt_update_lib_path (const char *name, const char *value) - { -- LTWRAPPER_DEBUGPRINTF (("(lt_update_lib_path) modifying '%s' by prepending '%s'\n", -- (name ? name : ""), -- (value ? value : ""))); -+ lt_debugprintf (__FILE__, __LINE__, -+ "(lt_update_lib_path) modifying '%s' by prepending '%s'\n", -+ nonnull (name), nonnull (value)); - - if (name && *name && value && *value) - { -@@ -4222,7 +5078,7 @@ EOF - func_win32_import_lib_p () - { - $opt_debug -- case `eval "$file_magic_cmd \"\$1\" 2>/dev/null" | $SED -e 10q` in -+ case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in - *import*) : ;; - *) false ;; - esac -@@ -4401,9 +5257,9 @@ func_mode_link () - ;; - *) - if test "$prev" = dlfiles; then -- dlfiles="$dlfiles $arg" -+ func_append dlfiles " $arg" - else -- dlprefiles="$dlprefiles $arg" -+ func_append dlprefiles " $arg" - fi - prev= - continue -@@ -4427,7 +5283,7 @@ func_mode_link () - *-*-darwin*) - case "$deplibs " in - *" $qarg.ltframework "*) ;; -- *) deplibs="$deplibs $qarg.ltframework" # this is fixed later -+ *) func_append deplibs " $qarg.ltframework" # this is fixed later - ;; - esac - ;; -@@ -4446,7 +5302,7 @@ func_mode_link () - moreargs= - for fil in `cat "$save_arg"` - do --# moreargs="$moreargs $fil" -+# func_append moreargs " $fil" - arg=$fil - # A libtool-controlled object. - -@@ -4475,7 +5331,7 @@ func_mode_link () - - if test "$prev" = dlfiles; then - if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then -- dlfiles="$dlfiles $pic_object" -+ func_append dlfiles " $pic_object" - prev= - continue - else -@@ -4487,7 +5343,7 @@ func_mode_link () - # CHECK ME: I think I busted this. -Ossama - if test "$prev" = dlprefiles; then - # Preload the old-style object. -- dlprefiles="$dlprefiles $pic_object" -+ func_append dlprefiles " $pic_object" - prev= - fi - -@@ -4557,12 +5413,12 @@ func_mode_link () - if test "$prev" = rpath; then - case "$rpath " in - *" $arg "*) ;; -- *) rpath="$rpath $arg" ;; -+ *) func_append rpath " $arg" ;; - esac - else - case "$xrpath " in - *" $arg "*) ;; -- *) xrpath="$xrpath $arg" ;; -+ *) func_append xrpath " $arg" ;; - esac - fi - prev= -@@ -4574,28 +5430,28 @@ func_mode_link () - continue - ;; - weak) -- weak_libs="$weak_libs $arg" -+ func_append weak_libs " $arg" - prev= - continue - ;; - xcclinker) -- linker_flags="$linker_flags $qarg" -- compiler_flags="$compiler_flags $qarg" -+ func_append linker_flags " $qarg" -+ func_append compiler_flags " $qarg" - prev= - func_append compile_command " $qarg" - func_append finalize_command " $qarg" - continue - ;; - xcompiler) -- compiler_flags="$compiler_flags $qarg" -+ func_append compiler_flags " $qarg" - prev= - func_append compile_command " $qarg" - func_append finalize_command " $qarg" - continue - ;; - xlinker) -- linker_flags="$linker_flags $qarg" -- compiler_flags="$compiler_flags $wl$qarg" -+ func_append linker_flags " $qarg" -+ func_append compiler_flags " $wl$qarg" - prev= - func_append compile_command " $wl$qarg" - func_append finalize_command " $wl$qarg" -@@ -4686,15 +5542,16 @@ func_mode_link () - ;; - - -L*) -- func_stripname '-L' '' "$arg" -- dir=$func_stripname_result -- if test -z "$dir"; then -+ func_stripname "-L" '' "$arg" -+ if test -z "$func_stripname_result"; then - if test "$#" -gt 0; then - func_fatal_error "require no space between \`-L' and \`$1'" - else - func_fatal_error "need path for \`-L' option" - fi - fi -+ func_resolve_sysroot "$func_stripname_result" -+ dir=$func_resolve_sysroot_result - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) ;; -@@ -4706,10 +5563,16 @@ func_mode_link () - ;; - esac - case "$deplibs " in -- *" -L$dir "*) ;; -+ *" -L$dir "* | *" $arg "*) -+ # Will only happen for absolute or sysroot arguments -+ ;; - *) -- deplibs="$deplibs -L$dir" -- lib_search_path="$lib_search_path $dir" -+ # Preserve sysroot, but never include relative directories -+ case $dir in -+ [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;; -+ *) func_append deplibs " -L$dir" ;; -+ esac -+ func_append lib_search_path " $dir" - ;; - esac - case $host in -@@ -4718,12 +5581,12 @@ func_mode_link () - case :$dllsearchpath: in - *":$dir:"*) ;; - ::) dllsearchpath=$dir;; -- *) dllsearchpath="$dllsearchpath:$dir";; -+ *) func_append dllsearchpath ":$dir";; - esac - case :$dllsearchpath: in - *":$testbindir:"*) ;; - ::) dllsearchpath=$testbindir;; -- *) dllsearchpath="$dllsearchpath:$testbindir";; -+ *) func_append dllsearchpath ":$testbindir";; - esac - ;; - esac -@@ -4747,7 +5610,7 @@ func_mode_link () - ;; - *-*-rhapsody* | *-*-darwin1.[012]) - # Rhapsody C and math libraries are in the System framework -- deplibs="$deplibs System.ltframework" -+ func_append deplibs " System.ltframework" - continue - ;; - *-*-sco3.2v5* | *-*-sco5v6*) -@@ -4758,9 +5621,6 @@ func_mode_link () - # Compiler inserts libc in the correct place for threads to work - test "X$arg" = "X-lc" && continue - ;; -- *-*-linux*) -- test "X$arg" = "X-lc" && continue -- ;; - esac - elif test "X$arg" = "X-lc_r"; then - case $host in -@@ -4770,7 +5630,7 @@ func_mode_link () - ;; - esac - fi -- deplibs="$deplibs $arg" -+ func_append deplibs " $arg" - continue - ;; - -@@ -4782,8 +5642,8 @@ func_mode_link () - # Tru64 UNIX uses -model [arg] to determine the layout of C++ - # classes, name mangling, and exception handling. - # Darwin uses the -arch flag to determine output architecture. -- -model|-arch|-isysroot) -- compiler_flags="$compiler_flags $arg" -+ -model|-arch|-isysroot|--sysroot) -+ func_append compiler_flags " $arg" - func_append compile_command " $arg" - func_append finalize_command " $arg" - prev=xcompiler -@@ -4791,12 +5651,12 @@ func_mode_link () - ;; - - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) -- compiler_flags="$compiler_flags $arg" -+ func_append compiler_flags " $arg" - func_append compile_command " $arg" - func_append finalize_command " $arg" - case "$new_inherited_linker_flags " in - *" $arg "*) ;; -- * ) new_inherited_linker_flags="$new_inherited_linker_flags $arg" ;; -+ * ) func_append new_inherited_linker_flags " $arg" ;; - esac - continue - ;; -@@ -4863,13 +5723,17 @@ func_mode_link () - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) ;; -+ =*) -+ func_stripname '=' '' "$dir" -+ dir=$lt_sysroot$func_stripname_result -+ ;; - *) - func_fatal_error "only absolute run-paths are allowed" - ;; - esac - case "$xrpath " in - *" $dir "*) ;; -- *) xrpath="$xrpath $dir" ;; -+ *) func_append xrpath " $dir" ;; - esac - continue - ;; -@@ -4922,8 +5786,8 @@ func_mode_link () - for flag in $args; do - IFS="$save_ifs" - func_quote_for_eval "$flag" -- arg="$arg $func_quote_for_eval_result" -- compiler_flags="$compiler_flags $func_quote_for_eval_result" -+ func_append arg " $func_quote_for_eval_result" -+ func_append compiler_flags " $func_quote_for_eval_result" - done - IFS="$save_ifs" - func_stripname ' ' '' "$arg" -@@ -4938,9 +5802,9 @@ func_mode_link () - for flag in $args; do - IFS="$save_ifs" - func_quote_for_eval "$flag" -- arg="$arg $wl$func_quote_for_eval_result" -- compiler_flags="$compiler_flags $wl$func_quote_for_eval_result" -- linker_flags="$linker_flags $func_quote_for_eval_result" -+ func_append arg " $wl$func_quote_for_eval_result" -+ func_append compiler_flags " $wl$func_quote_for_eval_result" -+ func_append linker_flags " $func_quote_for_eval_result" - done - IFS="$save_ifs" - func_stripname ' ' '' "$arg" -@@ -4968,24 +5832,27 @@ func_mode_link () - arg="$func_quote_for_eval_result" - ;; - -- # -64, -mips[0-9] enable 64-bit mode on the SGI compiler -- # -r[0-9][0-9]* specifies the processor on the SGI compiler -- # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler -- # +DA*, +DD* enable 64-bit mode on the HP compiler -- # -q* pass through compiler args for the IBM compiler -- # -m*, -t[45]*, -txscale* pass through architecture-specific -- # compiler args for GCC -- # -F/path gives path to uninstalled frameworks, gcc on darwin -- # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC -- # @file GCC response files -- # -tp=* Portland pgcc target processor selection -+ # Flags to be passed through unchanged, with rationale: -+ # -64, -mips[0-9] enable 64-bit mode for the SGI compiler -+ # -r[0-9][0-9]* specify processor for the SGI compiler -+ # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler -+ # +DA*, +DD* enable 64-bit mode for the HP compiler -+ # -q* compiler args for the IBM compiler -+ # -m*, -t[45]*, -txscale* architecture-specific flags for GCC -+ # -F/path path to uninstalled frameworks, gcc on darwin -+ # -p, -pg, --coverage, -fprofile-* profiling flags for GCC -+ # @file GCC response files -+ # -tp=* Portland pgcc target processor selection -+ # --sysroot=* for sysroot support -+ # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization - -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -- -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*) -+ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ -+ -O*|-flto*|-fwhopr*|-fuse-linker-plugin) - func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" - func_append compile_command " $arg" - func_append finalize_command " $arg" -- compiler_flags="$compiler_flags $arg" -+ func_append compiler_flags " $arg" - continue - ;; - -@@ -4997,7 +5864,7 @@ func_mode_link () - - *.$objext) - # A standard object. -- objs="$objs $arg" -+ func_append objs " $arg" - ;; - - *.lo) -@@ -5028,7 +5895,7 @@ func_mode_link () - - if test "$prev" = dlfiles; then - if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then -- dlfiles="$dlfiles $pic_object" -+ func_append dlfiles " $pic_object" - prev= - continue - else -@@ -5040,7 +5907,7 @@ func_mode_link () - # CHECK ME: I think I busted this. -Ossama - if test "$prev" = dlprefiles; then - # Preload the old-style object. -- dlprefiles="$dlprefiles $pic_object" -+ func_append dlprefiles " $pic_object" - prev= - fi - -@@ -5085,24 +5952,25 @@ func_mode_link () - - *.$libext) - # An archive. -- deplibs="$deplibs $arg" -- old_deplibs="$old_deplibs $arg" -+ func_append deplibs " $arg" -+ func_append old_deplibs " $arg" - continue - ;; - - *.la) - # A libtool-controlled library. - -+ func_resolve_sysroot "$arg" - if test "$prev" = dlfiles; then - # This library was specified with -dlopen. -- dlfiles="$dlfiles $arg" -+ func_append dlfiles " $func_resolve_sysroot_result" - prev= - elif test "$prev" = dlprefiles; then - # The library was specified with -dlpreopen. -- dlprefiles="$dlprefiles $arg" -+ func_append dlprefiles " $func_resolve_sysroot_result" - prev= - else -- deplibs="$deplibs $arg" -+ func_append deplibs " $func_resolve_sysroot_result" - fi - continue - ;; -@@ -5127,7 +5995,7 @@ func_mode_link () - func_fatal_help "the \`$prevarg' option requires an argument" - - if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then -- eval "arg=\"$export_dynamic_flag_spec\"" -+ eval arg=\"$export_dynamic_flag_spec\" - func_append compile_command " $arg" - func_append finalize_command " $arg" - fi -@@ -5144,11 +6012,13 @@ func_mode_link () - else - shlib_search_path= - fi -- eval "sys_lib_search_path=\"$sys_lib_search_path_spec\"" -- eval "sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"" -+ eval sys_lib_search_path=\"$sys_lib_search_path_spec\" -+ eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" - - func_dirname "$output" "/" "" - output_objdir="$func_dirname_result$objdir" -+ func_to_tool_file "$output_objdir/" -+ tool_output_objdir=$func_to_tool_file_result - # Create the object directory. - func_mkdir_p "$output_objdir" - -@@ -5169,12 +6039,12 @@ func_mode_link () - # Find all interdependent deplibs by searching for libraries - # that are linked more than once (e.g. -la -lb -la) - for deplib in $deplibs; do -- if $opt_duplicate_deps ; then -+ if $opt_preserve_dup_deps ; then - case "$libs " in -- *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; -+ *" $deplib "*) func_append specialdeplibs " $deplib" ;; - esac - fi -- libs="$libs $deplib" -+ func_append libs " $deplib" - done - - if test "$linkmode" = lib; then -@@ -5187,9 +6057,9 @@ func_mode_link () - if $opt_duplicate_compiler_generated_deps; then - for pre_post_dep in $predeps $postdeps; do - case "$pre_post_deps " in -- *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; -+ *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;; - esac -- pre_post_deps="$pre_post_deps $pre_post_dep" -+ func_append pre_post_deps " $pre_post_dep" - done - fi - pre_post_deps= -@@ -5256,8 +6126,9 @@ func_mode_link () - for lib in $dlprefiles; do - # Ignore non-libtool-libs - dependency_libs= -+ func_resolve_sysroot "$lib" - case $lib in -- *.la) func_source "$lib" ;; -+ *.la) func_source "$func_resolve_sysroot_result" ;; - esac - - # Collect preopened libtool deplibs, except any this library -@@ -5267,7 +6138,7 @@ func_mode_link () - deplib_base=$func_basename_result - case " $weak_libs " in - *" $deplib_base "*) ;; -- *) deplibs="$deplibs $deplib" ;; -+ *) func_append deplibs " $deplib" ;; - esac - done - done -@@ -5288,11 +6159,11 @@ func_mode_link () - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else -- compiler_flags="$compiler_flags $deplib" -+ func_append compiler_flags " $deplib" - if test "$linkmode" = lib ; then - case "$new_inherited_linker_flags " in - *" $deplib "*) ;; -- * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;; -+ * ) func_append new_inherited_linker_flags " $deplib" ;; - esac - fi - fi -@@ -5377,7 +6248,7 @@ func_mode_link () - if test "$linkmode" = lib ; then - case "$new_inherited_linker_flags " in - *" $deplib "*) ;; -- * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;; -+ * ) func_append new_inherited_linker_flags " $deplib" ;; - esac - fi - fi -@@ -5390,7 +6261,8 @@ func_mode_link () - test "$pass" = conv && continue - newdependency_libs="$deplib $newdependency_libs" - func_stripname '-L' '' "$deplib" -- newlib_search_path="$newlib_search_path $func_stripname_result" -+ func_resolve_sysroot "$func_stripname_result" -+ func_append newlib_search_path " $func_resolve_sysroot_result" - ;; - prog) - if test "$pass" = conv; then -@@ -5404,7 +6276,8 @@ func_mode_link () - finalize_deplibs="$deplib $finalize_deplibs" - fi - func_stripname '-L' '' "$deplib" -- newlib_search_path="$newlib_search_path $func_stripname_result" -+ func_resolve_sysroot "$func_stripname_result" -+ func_append newlib_search_path " $func_resolve_sysroot_result" - ;; - *) - func_warning "\`-L' is ignored for archives/objects" -@@ -5415,17 +6288,21 @@ func_mode_link () - -R*) - if test "$pass" = link; then - func_stripname '-R' '' "$deplib" -- dir=$func_stripname_result -+ func_resolve_sysroot "$func_stripname_result" -+ dir=$func_resolve_sysroot_result - # Make sure the xrpath contains only unique directories. - case "$xrpath " in - *" $dir "*) ;; -- *) xrpath="$xrpath $dir" ;; -+ *) func_append xrpath " $dir" ;; - esac - fi - deplibs="$deplib $deplibs" - continue - ;; -- *.la) lib="$deplib" ;; -+ *.la) -+ func_resolve_sysroot "$deplib" -+ lib=$func_resolve_sysroot_result -+ ;; - *.$libext) - if test "$pass" = conv; then - deplibs="$deplib $deplibs" -@@ -5488,11 +6365,11 @@ func_mode_link () - if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then - # If there is no dlopen support or we're linking statically, - # we need to preload. -- newdlprefiles="$newdlprefiles $deplib" -+ func_append newdlprefiles " $deplib" - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else -- newdlfiles="$newdlfiles $deplib" -+ func_append newdlfiles " $deplib" - fi - fi - continue -@@ -5538,7 +6415,7 @@ func_mode_link () - for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do - case " $new_inherited_linker_flags " in - *" $tmp_inherited_linker_flag "*) ;; -- *) new_inherited_linker_flags="$new_inherited_linker_flags $tmp_inherited_linker_flag";; -+ *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";; - esac - done - fi -@@ -5546,8 +6423,8 @@ func_mode_link () - if test "$linkmode,$pass" = "lib,link" || - test "$linkmode,$pass" = "prog,scan" || - { test "$linkmode" != prog && test "$linkmode" != lib; }; then -- test -n "$dlopen" && dlfiles="$dlfiles $dlopen" -- test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" -+ test -n "$dlopen" && func_append dlfiles " $dlopen" -+ test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen" - fi - - if test "$pass" = conv; then -@@ -5558,20 +6435,20 @@ func_mode_link () - func_fatal_error "cannot find name of link library for \`$lib'" - fi - # It is a libtool convenience library, so add in its objects. -- convenience="$convenience $ladir/$objdir/$old_library" -- old_convenience="$old_convenience $ladir/$objdir/$old_library" -+ func_append convenience " $ladir/$objdir/$old_library" -+ func_append old_convenience " $ladir/$objdir/$old_library" - elif test "$linkmode" != prog && test "$linkmode" != lib; then - func_fatal_error "\`$lib' is not a convenience library" - fi - tmp_libs= - for deplib in $dependency_libs; do - deplibs="$deplib $deplibs" -- if $opt_duplicate_deps ; then -+ if $opt_preserve_dup_deps ; then - case "$tmp_libs " in -- *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; -+ *" $deplib "*) func_append specialdeplibs " $deplib" ;; - esac - fi -- tmp_libs="$tmp_libs $deplib" -+ func_append tmp_libs " $deplib" - done - continue - fi # $pass = conv -@@ -5579,9 +6456,15 @@ func_mode_link () - - # Get the name of the library we link against. - linklib= -- for l in $old_library $library_names; do -- linklib="$l" -- done -+ if test -n "$old_library" && -+ { test "$prefer_static_libs" = yes || -+ test "$prefer_static_libs,$installed" = "built,no"; }; then -+ linklib=$old_library -+ else -+ for l in $old_library $library_names; do -+ linklib="$l" -+ done -+ fi - if test -z "$linklib"; then - func_fatal_error "cannot find name of link library for \`$lib'" - fi -@@ -5598,9 +6481,9 @@ func_mode_link () - # statically, we need to preload. We also need to preload any - # dependent libraries so libltdl's deplib preloader doesn't - # bomb out in the load deplibs phase. -- dlprefiles="$dlprefiles $lib $dependency_libs" -+ func_append dlprefiles " $lib $dependency_libs" - else -- newdlfiles="$newdlfiles $lib" -+ func_append newdlfiles " $lib" - fi - continue - fi # $pass = dlopen -@@ -5622,14 +6505,14 @@ func_mode_link () - - # Find the relevant object directory and library name. - if test "X$installed" = Xyes; then -- if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then -+ if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then - func_warning "library \`$lib' was moved." - dir="$ladir" - absdir="$abs_ladir" - libdir="$abs_ladir" - else -- dir="$libdir" -- absdir="$libdir" -+ dir="$lt_sysroot$libdir" -+ absdir="$lt_sysroot$libdir" - fi - test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes - else -@@ -5637,12 +6520,12 @@ func_mode_link () - dir="$ladir" - absdir="$abs_ladir" - # Remove this search path later -- notinst_path="$notinst_path $abs_ladir" -+ func_append notinst_path " $abs_ladir" - else - dir="$ladir/$objdir" - absdir="$abs_ladir/$objdir" - # Remove this search path later -- notinst_path="$notinst_path $abs_ladir" -+ func_append notinst_path " $abs_ladir" - fi - fi # $installed = yes - func_stripname 'lib' '.la' "$laname" -@@ -5653,20 +6536,46 @@ func_mode_link () - if test -z "$libdir" && test "$linkmode" = prog; then - func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'" - fi -- # Prefer using a static library (so that no silly _DYNAMIC symbols -- # are required to link). -- if test -n "$old_library"; then -- newdlprefiles="$newdlprefiles $dir/$old_library" -- # Keep a list of preopened convenience libraries to check -- # that they are being used correctly in the link pass. -- test -z "$libdir" && \ -- dlpreconveniencelibs="$dlpreconveniencelibs $dir/$old_library" -- # Otherwise, use the dlname, so that lt_dlopen finds it. -- elif test -n "$dlname"; then -- newdlprefiles="$newdlprefiles $dir/$dlname" -- else -- newdlprefiles="$newdlprefiles $dir/$linklib" -- fi -+ case "$host" in -+ # special handling for platforms with PE-DLLs. -+ *cygwin* | *mingw* | *cegcc* ) -+ # Linker will automatically link against shared library if both -+ # static and shared are present. Therefore, ensure we extract -+ # symbols from the import library if a shared library is present -+ # (otherwise, the dlopen module name will be incorrect). We do -+ # this by putting the import library name into $newdlprefiles. -+ # We recover the dlopen module name by 'saving' the la file -+ # name in a special purpose variable, and (later) extracting the -+ # dlname from the la file. -+ if test -n "$dlname"; then -+ func_tr_sh "$dir/$linklib" -+ eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname" -+ func_append newdlprefiles " $dir/$linklib" -+ else -+ func_append newdlprefiles " $dir/$old_library" -+ # Keep a list of preopened convenience libraries to check -+ # that they are being used correctly in the link pass. -+ test -z "$libdir" && \ -+ func_append dlpreconveniencelibs " $dir/$old_library" -+ fi -+ ;; -+ * ) -+ # Prefer using a static library (so that no silly _DYNAMIC symbols -+ # are required to link). -+ if test -n "$old_library"; then -+ func_append newdlprefiles " $dir/$old_library" -+ # Keep a list of preopened convenience libraries to check -+ # that they are being used correctly in the link pass. -+ test -z "$libdir" && \ -+ func_append dlpreconveniencelibs " $dir/$old_library" -+ # Otherwise, use the dlname, so that lt_dlopen finds it. -+ elif test -n "$dlname"; then -+ func_append newdlprefiles " $dir/$dlname" -+ else -+ func_append newdlprefiles " $dir/$linklib" -+ fi -+ ;; -+ esac - fi # $pass = dlpreopen - - if test -z "$libdir"; then -@@ -5684,7 +6593,7 @@ func_mode_link () - - - if test "$linkmode" = prog && test "$pass" != link; then -- newlib_search_path="$newlib_search_path $ladir" -+ func_append newlib_search_path " $ladir" - deplibs="$lib $deplibs" - - linkalldeplibs=no -@@ -5697,7 +6606,8 @@ func_mode_link () - for deplib in $dependency_libs; do - case $deplib in - -L*) func_stripname '-L' '' "$deplib" -- newlib_search_path="$newlib_search_path $func_stripname_result" -+ func_resolve_sysroot "$func_stripname_result" -+ func_append newlib_search_path " $func_resolve_sysroot_result" - ;; - esac - # Need to link against all dependency_libs? -@@ -5708,12 +6618,12 @@ func_mode_link () - # or/and link against static libraries - newdependency_libs="$deplib $newdependency_libs" - fi -- if $opt_duplicate_deps ; then -+ if $opt_preserve_dup_deps ; then - case "$tmp_libs " in -- *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; -+ *" $deplib "*) func_append specialdeplibs " $deplib" ;; - esac - fi -- tmp_libs="$tmp_libs $deplib" -+ func_append tmp_libs " $deplib" - done # for deplib - continue - fi # $linkmode = prog... -@@ -5728,7 +6638,7 @@ func_mode_link () - # Make sure the rpath contains only unique directories. - case "$temp_rpath:" in - *"$absdir:"*) ;; -- *) temp_rpath="$temp_rpath$absdir:" ;; -+ *) func_append temp_rpath "$absdir:" ;; - esac - fi - -@@ -5740,7 +6650,7 @@ func_mode_link () - *) - case "$compile_rpath " in - *" $absdir "*) ;; -- *) compile_rpath="$compile_rpath $absdir" -+ *) func_append compile_rpath " $absdir" ;; - esac - ;; - esac -@@ -5749,7 +6659,7 @@ func_mode_link () - *) - case "$finalize_rpath " in - *" $libdir "*) ;; -- *) finalize_rpath="$finalize_rpath $libdir" -+ *) func_append finalize_rpath " $libdir" ;; - esac - ;; - esac -@@ -5774,12 +6684,12 @@ func_mode_link () - case $host in - *cygwin* | *mingw* | *cegcc*) - # No point in relinking DLLs because paths are not encoded -- notinst_deplibs="$notinst_deplibs $lib" -+ func_append notinst_deplibs " $lib" - need_relink=no - ;; - *) - if test "$installed" = no; then -- notinst_deplibs="$notinst_deplibs $lib" -+ func_append notinst_deplibs " $lib" - need_relink=yes - fi - ;; -@@ -5814,7 +6724,7 @@ func_mode_link () - *) - case "$compile_rpath " in - *" $absdir "*) ;; -- *) compile_rpath="$compile_rpath $absdir" -+ *) func_append compile_rpath " $absdir" ;; - esac - ;; - esac -@@ -5823,7 +6733,7 @@ func_mode_link () - *) - case "$finalize_rpath " in - *" $libdir "*) ;; -- *) finalize_rpath="$finalize_rpath $libdir" -+ *) func_append finalize_rpath " $libdir" ;; - esac - ;; - esac -@@ -5835,7 +6745,7 @@ func_mode_link () - shift - realname="$1" - shift -- eval "libname=\"$libname_spec\"" -+ libname=`eval "\\$ECHO \"$libname_spec\""` - # use dlname if we got it. it's perfectly good, no? - if test -n "$dlname"; then - soname="$dlname" -@@ -5848,7 +6758,7 @@ func_mode_link () - versuffix="-$major" - ;; - esac -- eval "soname=\"$soname_spec\"" -+ eval soname=\"$soname_spec\" - else - soname="$realname" - fi -@@ -5877,7 +6787,7 @@ func_mode_link () - linklib=$newlib - fi # test -n "$old_archive_from_expsyms_cmds" - -- if test "$linkmode" = prog || test "$mode" != relink; then -+ if test "$linkmode" = prog || test "$opt_mode" != relink; then - add_shlibpath= - add_dir= - add= -@@ -5933,7 +6843,7 @@ func_mode_link () - if test -n "$inst_prefix_dir"; then - case $libdir in - [\\/]*) -- add_dir="$add_dir -L$inst_prefix_dir$libdir" -+ func_append add_dir " -L$inst_prefix_dir$libdir" - ;; - esac - fi -@@ -5955,7 +6865,7 @@ func_mode_link () - if test -n "$add_shlibpath"; then - case :$compile_shlibpath: in - *":$add_shlibpath:"*) ;; -- *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; -+ *) func_append compile_shlibpath "$add_shlibpath:" ;; - esac - fi - if test "$linkmode" = prog; then -@@ -5969,13 +6879,13 @@ func_mode_link () - test "$hardcode_shlibpath_var" = yes; then - case :$finalize_shlibpath: in - *":$libdir:"*) ;; -- *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; -+ *) func_append finalize_shlibpath "$libdir:" ;; - esac - fi - fi - fi - -- if test "$linkmode" = prog || test "$mode" = relink; then -+ if test "$linkmode" = prog || test "$opt_mode" = relink; then - add_shlibpath= - add_dir= - add= -@@ -5989,7 +6899,7 @@ func_mode_link () - elif test "$hardcode_shlibpath_var" = yes; then - case :$finalize_shlibpath: in - *":$libdir:"*) ;; -- *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; -+ *) func_append finalize_shlibpath "$libdir:" ;; - esac - add="-l$name" - elif test "$hardcode_automatic" = yes; then -@@ -6001,12 +6911,12 @@ func_mode_link () - fi - else - # We cannot seem to hardcode it, guess we'll fake it. -- add_dir="-L$libdir" -+ add_dir="-L$lt_sysroot$libdir" - # Try looking first in the location we're being installed to. - if test -n "$inst_prefix_dir"; then - case $libdir in - [\\/]*) -- add_dir="$add_dir -L$inst_prefix_dir$libdir" -+ func_append add_dir " -L$inst_prefix_dir$libdir" - ;; - esac - fi -@@ -6083,27 +6993,33 @@ func_mode_link () - temp_xrpath=$func_stripname_result - case " $xrpath " in - *" $temp_xrpath "*) ;; -- *) xrpath="$xrpath $temp_xrpath";; -+ *) func_append xrpath " $temp_xrpath";; - esac;; -- *) temp_deplibs="$temp_deplibs $libdir";; -+ *) func_append temp_deplibs " $libdir";; - esac - done - dependency_libs="$temp_deplibs" - fi - -- newlib_search_path="$newlib_search_path $absdir" -+ func_append newlib_search_path " $absdir" - # Link against this library - test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" - # ... and its dependency_libs - tmp_libs= - for deplib in $dependency_libs; do - newdependency_libs="$deplib $newdependency_libs" -- if $opt_duplicate_deps ; then -+ case $deplib in -+ -L*) func_stripname '-L' '' "$deplib" -+ func_resolve_sysroot "$func_stripname_result";; -+ *) func_resolve_sysroot "$deplib" ;; -+ esac -+ if $opt_preserve_dup_deps ; then - case "$tmp_libs " in -- *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; -+ *" $func_resolve_sysroot_result "*) -+ func_append specialdeplibs " $func_resolve_sysroot_result" ;; - esac - fi -- tmp_libs="$tmp_libs $deplib" -+ func_append tmp_libs " $func_resolve_sysroot_result" - done - - if test "$link_all_deplibs" != no; then -@@ -6113,8 +7029,10 @@ func_mode_link () - case $deplib in - -L*) path="$deplib" ;; - *.la) -+ func_resolve_sysroot "$deplib" -+ deplib=$func_resolve_sysroot_result - func_dirname "$deplib" "" "." -- dir="$func_dirname_result" -+ dir=$func_dirname_result - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; -@@ -6130,7 +7048,7 @@ func_mode_link () - case $host in - *-*-darwin*) - depdepl= -- deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` -+ eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` - if test -n "$deplibrary_names" ; then - for tmp in $deplibrary_names ; do - depdepl=$tmp -@@ -6141,8 +7059,8 @@ func_mode_link () - if test -z "$darwin_install_name"; then - darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` - fi -- compiler_flags="$compiler_flags ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" -- linker_flags="$linker_flags -dylib_file ${darwin_install_name}:${depdepl}" -+ func_append compiler_flags " ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" -+ func_append linker_flags " -dylib_file ${darwin_install_name}:${depdepl}" - path= - fi - fi -@@ -6152,7 +7070,7 @@ func_mode_link () - ;; - esac - else -- libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` -+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` - test -z "$libdir" && \ - func_fatal_error "\`$deplib' is not a valid libtool archive" - test "$absdir" != "$libdir" && \ -@@ -6192,7 +7110,7 @@ func_mode_link () - for dir in $newlib_search_path; do - case "$lib_search_path " in - *" $dir "*) ;; -- *) lib_search_path="$lib_search_path $dir" ;; -+ *) func_append lib_search_path " $dir" ;; - esac - done - newlib_search_path= -@@ -6205,7 +7123,7 @@ func_mode_link () - fi - for var in $vars dependency_libs; do - # Add libraries to $var in reverse order -- eval tmp_libs=\$$var -+ eval tmp_libs=\"\$$var\" - new_libs= - for deplib in $tmp_libs; do - # FIXME: Pedantically, this is the right thing to do, so -@@ -6250,13 +7168,13 @@ func_mode_link () - -L*) - case " $tmp_libs " in - *" $deplib "*) ;; -- *) tmp_libs="$tmp_libs $deplib" ;; -+ *) func_append tmp_libs " $deplib" ;; - esac - ;; -- *) tmp_libs="$tmp_libs $deplib" ;; -+ *) func_append tmp_libs " $deplib" ;; - esac - done -- eval $var=\$tmp_libs -+ eval $var=\"$tmp_libs\" - done # for var - fi - # Last step: remove runtime libs from dependency_libs -@@ -6269,7 +7187,7 @@ func_mode_link () - ;; - esac - if test -n "$i" ; then -- tmp_libs="$tmp_libs $i" -+ func_append tmp_libs " $i" - fi - done - dependency_libs=$tmp_libs -@@ -6310,7 +7228,7 @@ func_mode_link () - # Now set the variables for building old libraries. - build_libtool_libs=no - oldlibs="$output" -- objs="$objs$old_deplibs" -+ func_append objs "$old_deplibs" - ;; - - lib) -@@ -6319,8 +7237,8 @@ func_mode_link () - lib*) - func_stripname 'lib' '.la' "$outputname" - name=$func_stripname_result -- eval "shared_ext=\"$shrext_cmds\"" -- eval "libname=\"$libname_spec\"" -+ eval shared_ext=\"$shrext_cmds\" -+ eval libname=\"$libname_spec\" - ;; - *) - test "$module" = no && \ -@@ -6330,8 +7248,8 @@ func_mode_link () - # Add the "lib" prefix for modules if required - func_stripname '' '.la' "$outputname" - name=$func_stripname_result -- eval "shared_ext=\"$shrext_cmds\"" -- eval "libname=\"$libname_spec\"" -+ eval shared_ext=\"$shrext_cmds\" -+ eval libname=\"$libname_spec\" - else - func_stripname '' '.la' "$outputname" - libname=$func_stripname_result -@@ -6346,7 +7264,7 @@ func_mode_link () - echo - $ECHO "*** Warning: Linking the shared library $output against the non-libtool" - $ECHO "*** objects $objs is not portable!" -- libobjs="$libobjs $objs" -+ func_append libobjs " $objs" - fi - fi - -@@ -6544,7 +7462,7 @@ func_mode_link () - done - - # Make executables depend on our current version. -- verstring="$verstring:${current}.0" -+ func_append verstring ":${current}.0" - ;; - - qnx) -@@ -6612,10 +7530,10 @@ func_mode_link () - fi - - func_generate_dlsyms "$libname" "$libname" "yes" -- libobjs="$libobjs $symfileobj" -+ func_append libobjs " $symfileobj" - test "X$libobjs" = "X " && libobjs= - -- if test "$mode" != relink; then -+ if test "$opt_mode" != relink; then - # Remove our outputs, but don't remove object files since they - # may have been created when compiling PIC objects. - removelist= -@@ -6631,7 +7549,7 @@ func_mode_link () - continue - fi - fi -- removelist="$removelist $p" -+ func_append removelist " $p" - ;; - *) ;; - esac -@@ -6642,7 +7560,7 @@ func_mode_link () - - # Now set the variables for building old libraries. - if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then -- oldlibs="$oldlibs $output_objdir/$libname.$libext" -+ func_append oldlibs " $output_objdir/$libname.$libext" - - # Transform .lo files to .o files. - oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP` -@@ -6659,10 +7577,11 @@ func_mode_link () - # If the user specified any rpath flags, then add them. - temp_xrpath= - for libdir in $xrpath; do -- temp_xrpath="$temp_xrpath -R$libdir" -+ func_replace_sysroot "$libdir" -+ func_append temp_xrpath " -R$func_replace_sysroot_result" - case "$finalize_rpath " in - *" $libdir "*) ;; -- *) finalize_rpath="$finalize_rpath $libdir" ;; -+ *) func_append finalize_rpath " $libdir" ;; - esac - done - if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then -@@ -6676,7 +7595,7 @@ func_mode_link () - for lib in $old_dlfiles; do - case " $dlprefiles $dlfiles " in - *" $lib "*) ;; -- *) dlfiles="$dlfiles $lib" ;; -+ *) func_append dlfiles " $lib" ;; - esac - done - -@@ -6686,7 +7605,7 @@ func_mode_link () - for lib in $old_dlprefiles; do - case "$dlprefiles " in - *" $lib "*) ;; -- *) dlprefiles="$dlprefiles $lib" ;; -+ *) func_append dlprefiles " $lib" ;; - esac - done - -@@ -6698,7 +7617,7 @@ func_mode_link () - ;; - *-*-rhapsody* | *-*-darwin1.[012]) - # Rhapsody C library is in the System framework -- deplibs="$deplibs System.ltframework" -+ func_append deplibs " System.ltframework" - ;; - *-*-netbsd*) - # Don't link with libc until the a.out ld.so is fixed. -@@ -6715,7 +7634,7 @@ func_mode_link () - *) - # Add libc to deplibs on all other systems if necessary. - if test "$build_libtool_need_lc" = "yes"; then -- deplibs="$deplibs -lc" -+ func_append deplibs " -lc" - fi - ;; - esac -@@ -6764,18 +7683,18 @@ EOF - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - case " $predeps $postdeps " in - *" $i "*) -- newdeplibs="$newdeplibs $i" -+ func_append newdeplibs " $i" - i="" - ;; - esac - fi - if test -n "$i" ; then -- eval "libname=\"$libname_spec\"" -- eval "deplib_matches=\"$library_names_spec\"" -+ libname=`eval "\\$ECHO \"$libname_spec\""` -+ deplib_matches=`eval "\\$ECHO \"$library_names_spec\""` - set dummy $deplib_matches; shift - deplib_match=$1 - if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then -- newdeplibs="$newdeplibs $i" -+ func_append newdeplibs " $i" - else - droppeddeps=yes - echo -@@ -6789,7 +7708,7 @@ EOF - fi - ;; - *) -- newdeplibs="$newdeplibs $i" -+ func_append newdeplibs " $i" - ;; - esac - done -@@ -6807,18 +7726,18 @@ EOF - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - case " $predeps $postdeps " in - *" $i "*) -- newdeplibs="$newdeplibs $i" -+ func_append newdeplibs " $i" - i="" - ;; - esac - fi - if test -n "$i" ; then -- eval "libname=\"$libname_spec\"" -- eval "deplib_matches=\"$library_names_spec\"" -+ libname=`eval "\\$ECHO \"$libname_spec\""` -+ deplib_matches=`eval "\\$ECHO \"$library_names_spec\""` - set dummy $deplib_matches; shift - deplib_match=$1 - if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then -- newdeplibs="$newdeplibs $i" -+ func_append newdeplibs " $i" - else - droppeddeps=yes - echo -@@ -6840,7 +7759,7 @@ EOF - fi - ;; - *) -- newdeplibs="$newdeplibs $i" -+ func_append newdeplibs " $i" - ;; - esac - done -@@ -6857,15 +7776,27 @@ EOF - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - case " $predeps $postdeps " in - *" $a_deplib "*) -- newdeplibs="$newdeplibs $a_deplib" -+ func_append newdeplibs " $a_deplib" - a_deplib="" - ;; - esac - fi - if test -n "$a_deplib" ; then -- eval "libname=\"$libname_spec\"" -+ libname=`eval "\\$ECHO \"$libname_spec\""` -+ if test -n "$file_magic_glob"; then -+ libnameglob=`func_echo_all "$libname" | $SED -e $file_magic_glob` -+ else -+ libnameglob=$libname -+ fi -+ test "$want_nocaseglob" = yes && nocaseglob=`shopt -p nocaseglob` - for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do -- potential_libs=`ls $i/$libname[.-]* 2>/dev/null` -+ if test "$want_nocaseglob" = yes; then -+ shopt -s nocaseglob -+ potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` -+ $nocaseglob -+ else -+ potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` -+ fi - for potent_lib in $potential_libs; do - # Follow soft links. - if ls -lLd "$potent_lib" 2>/dev/null | -@@ -6885,10 +7816,10 @@ EOF - *) potlib=`$ECHO "$potlib" | $SED 's,[^/]*$,,'`"$potliblink";; - esac - done -- if eval "$file_magic_cmd \"\$potlib\"" 2>/dev/null | -+ if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | - $SED -e 10q | - $EGREP "$file_magic_regex" > /dev/null; then -- newdeplibs="$newdeplibs $a_deplib" -+ func_append newdeplibs " $a_deplib" - a_deplib="" - break 2 - fi -@@ -6913,7 +7844,7 @@ EOF - ;; - *) - # Add a -L argument. -- newdeplibs="$newdeplibs $a_deplib" -+ func_append newdeplibs " $a_deplib" - ;; - esac - done # Gone through all deplibs. -@@ -6929,20 +7860,20 @@ EOF - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - case " $predeps $postdeps " in - *" $a_deplib "*) -- newdeplibs="$newdeplibs $a_deplib" -+ func_append newdeplibs " $a_deplib" - a_deplib="" - ;; - esac - fi - if test -n "$a_deplib" ; then -- eval "libname=\"$libname_spec\"" -+ libname=`eval "\\$ECHO \"$libname_spec\""` - for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do - potential_libs=`ls $i/$libname[.-]* 2>/dev/null` - for potent_lib in $potential_libs; do - potlib="$potent_lib" # see symlink-check above in file_magic test - if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \ - $EGREP "$match_pattern_regex" > /dev/null; then -- newdeplibs="$newdeplibs $a_deplib" -+ func_append newdeplibs " $a_deplib" - a_deplib="" - break 2 - fi -@@ -6967,7 +7898,7 @@ EOF - ;; - *) - # Add a -L argument. -- newdeplibs="$newdeplibs $a_deplib" -+ func_append newdeplibs " $a_deplib" - ;; - esac - done # Gone through all deplibs. -@@ -7071,7 +8002,7 @@ EOF - *) - case " $deplibs " in - *" -L$path/$objdir "*) -- new_libs="$new_libs -L$path/$objdir" ;; -+ func_append new_libs " -L$path/$objdir" ;; - esac - ;; - esac -@@ -7081,10 +8012,10 @@ EOF - -L*) - case " $new_libs " in - *" $deplib "*) ;; -- *) new_libs="$new_libs $deplib" ;; -+ *) func_append new_libs " $deplib" ;; - esac - ;; -- *) new_libs="$new_libs $deplib" ;; -+ *) func_append new_libs " $deplib" ;; - esac - done - deplibs="$new_libs" -@@ -7101,10 +8032,12 @@ EOF - hardcode_libdirs= - dep_rpath= - rpath="$finalize_rpath" -- test "$mode" != relink && rpath="$compile_rpath$rpath" -+ test "$opt_mode" != relink && rpath="$compile_rpath$rpath" - for libdir in $rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then -+ func_replace_sysroot "$libdir" -+ libdir=$func_replace_sysroot_result - if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" - else -@@ -7113,18 +8046,18 @@ EOF - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) -- hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" -+ func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" - ;; - esac - fi - else -- eval "flag=\"$hardcode_libdir_flag_spec\"" -- dep_rpath="$dep_rpath $flag" -+ eval flag=\"$hardcode_libdir_flag_spec\" -+ func_append dep_rpath " $flag" - fi - elif test -n "$runpath_var"; then - case "$perm_rpath " in - *" $libdir "*) ;; -- *) perm_rpath="$perm_rpath $libdir" ;; -+ *) func_apped perm_rpath " $libdir" ;; - esac - fi - done -@@ -7133,40 +8066,38 @@ EOF - test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" - if test -n "$hardcode_libdir_flag_spec_ld"; then -- eval "dep_rpath=\"$hardcode_libdir_flag_spec_ld\"" -+ eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" - else -- eval "dep_rpath=\"$hardcode_libdir_flag_spec\"" -+ eval dep_rpath=\"$hardcode_libdir_flag_spec\" - fi - fi - if test -n "$runpath_var" && test -n "$perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $perm_rpath; do -- rpath="$rpath$dir:" -+ func_append rpath "$dir:" - done -- eval $runpath_var=\$rpath\$$runpath_var -- export $runpath_var -+ eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" - fi - test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" - fi - - shlibpath="$finalize_shlibpath" -- test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" -+ test "$opt_mode" != relink && shlibpath="$compile_shlibpath$shlibpath" - if test -n "$shlibpath"; then -- eval $shlibpath_var=\$shlibpath\$$shlibpath_var -- export $shlibpath_var -+ eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" - fi - - # Get the real and link names of the library. -- eval "shared_ext=\"$shrext_cmds\"" -- eval "library_names=\"$library_names_spec\"" -+ eval shared_ext=\"$shrext_cmds\" -+ eval library_names=\"$library_names_spec\" - set dummy $library_names - shift - realname="$1" - shift - - if test -n "$soname_spec"; then -- eval "soname=\"$soname_spec\"" -+ eval soname=\"$soname_spec\" - else - soname="$realname" - fi -@@ -7178,7 +8109,7 @@ EOF - linknames= - for link - do -- linknames="$linknames $link" -+ func_append linknames " $link" - done - - # Use standard objects if they are pic -@@ -7189,7 +8120,7 @@ EOF - if test -n "$export_symbols" && test -n "$include_expsyms"; then - $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" - export_symbols="$output_objdir/$libname.uexp" -- delfiles="$delfiles $export_symbols" -+ func_append delfiles " $export_symbols" - fi - - orig_export_symbols= -@@ -7220,13 +8151,45 @@ EOF - $opt_dry_run || $RM $export_symbols - cmds=$export_symbols_cmds - save_ifs="$IFS"; IFS='~' -- for cmd in $cmds; do -+ for cmd1 in $cmds; do - IFS="$save_ifs" -- eval "cmd=\"$cmd\"" -- func_len " $cmd" -- len=$func_len_result -- if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then -+ # Take the normal branch if the nm_file_list_spec branch -+ # doesn't work or if tool conversion is not needed. -+ case $nm_file_list_spec~$to_tool_file_cmd in -+ *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*) -+ try_normal_branch=yes -+ eval cmd=\"$cmd1\" -+ func_len " $cmd" -+ len=$func_len_result -+ ;; -+ *) -+ try_normal_branch=no -+ ;; -+ esac -+ if test "$try_normal_branch" = yes \ -+ && { test "$len" -lt "$max_cmd_len" \ -+ || test "$max_cmd_len" -le -1; } -+ then -+ func_show_eval "$cmd" 'exit $?' -+ skipped_export=false -+ elif test -n "$nm_file_list_spec"; then -+ func_basename "$output" -+ output_la=$func_basename_result -+ save_libobjs=$libobjs -+ save_output=$output -+ output=${output_objdir}/${output_la}.nm -+ func_to_tool_file "$output" -+ libobjs=$nm_file_list_spec$func_to_tool_file_result -+ func_append delfiles " $output" -+ func_verbose "creating $NM input file list: $output" -+ for obj in $save_libobjs; do -+ func_to_tool_file "$obj" -+ $ECHO "$func_to_tool_file_result" -+ done > "$output" -+ eval cmd=\"$cmd1\" - func_show_eval "$cmd" 'exit $?' -+ output=$save_output -+ libobjs=$save_libobjs - skipped_export=false - else - # The command line is too long to execute in one step. -@@ -7248,7 +8211,7 @@ EOF - if test -n "$export_symbols" && test -n "$include_expsyms"; then - tmp_export_symbols="$export_symbols" - test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" -- $opt_dry_run || $ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols" -+ $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' - fi - - if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then -@@ -7260,7 +8223,7 @@ EOF - # global variables. join(1) would be nice here, but unfortunately - # isn't a blessed tool. - $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter -- delfiles="$delfiles $export_symbols $output_objdir/$libname.filter" -+ func_append delfiles " $export_symbols $output_objdir/$libname.filter" - export_symbols=$output_objdir/$libname.def - $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols - fi -@@ -7270,7 +8233,7 @@ EOF - case " $convenience " in - *" $test_deplib "*) ;; - *) -- tmp_deplibs="$tmp_deplibs $test_deplib" -+ func_append tmp_deplibs " $test_deplib" - ;; - esac - done -@@ -7286,43 +8249,43 @@ EOF - fi - if test -n "$whole_archive_flag_spec"; then - save_libobjs=$libobjs -- eval "libobjs=\"\$libobjs $whole_archive_flag_spec\"" -+ eval libobjs=\"\$libobjs $whole_archive_flag_spec\" - test "X$libobjs" = "X " && libobjs= - else - gentop="$output_objdir/${outputname}x" -- generated="$generated $gentop" -+ func_append generated " $gentop" - - func_extract_archives $gentop $convenience -- libobjs="$libobjs $func_extract_archives_result" -+ func_append libobjs " $func_extract_archives_result" - test "X$libobjs" = "X " && libobjs= - fi - fi - - if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then -- eval "flag=\"$thread_safe_flag_spec\"" -- linker_flags="$linker_flags $flag" -+ eval flag=\"$thread_safe_flag_spec\" -+ func_append linker_flags " $flag" - fi - - # Make a backup of the uninstalled library when relinking -- if test "$mode" = relink; then -- $opt_dry_run || (cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U) || exit $? -+ if test "$opt_mode" = relink; then -+ $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? - fi - - # Do each of the archive commands. - if test "$module" = yes && test -n "$module_cmds" ; then - if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then -- eval "test_cmds=\"$module_expsym_cmds\"" -+ eval test_cmds=\"$module_expsym_cmds\" - cmds=$module_expsym_cmds - else -- eval "test_cmds=\"$module_cmds\"" -+ eval test_cmds=\"$module_cmds\" - cmds=$module_cmds - fi - else - if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then -- eval "test_cmds=\"$archive_expsym_cmds\"" -+ eval test_cmds=\"$archive_expsym_cmds\" - cmds=$archive_expsym_cmds - else -- eval "test_cmds=\"$archive_cmds\"" -+ eval test_cmds=\"$archive_cmds\" - cmds=$archive_cmds - fi - fi -@@ -7366,10 +8329,13 @@ EOF - echo 'INPUT (' > $output - for obj in $save_libobjs - do -- $ECHO "$obj" >> $output -+ func_to_tool_file "$obj" -+ $ECHO "$func_to_tool_file_result" >> $output - done - echo ')' >> $output -- delfiles="$delfiles $output" -+ func_append delfiles " $output" -+ func_to_tool_file "$output" -+ output=$func_to_tool_file_result - elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then - output=${output_objdir}/${output_la}.lnk - func_verbose "creating linker input file list: $output" -@@ -7383,15 +8349,17 @@ EOF - fi - for obj - do -- $ECHO "$obj" >> $output -+ func_to_tool_file "$obj" -+ $ECHO "$func_to_tool_file_result" >> $output - done -- delfiles="$delfiles $output" -- output=$firstobj\"$file_list_spec$output\" -+ func_append delfiles " $output" -+ func_to_tool_file "$output" -+ output=$firstobj\"$file_list_spec$func_to_tool_file_result\" - else - if test -n "$save_libobjs"; then - func_verbose "creating reloadable object files..." - output=$output_objdir/$output_la-${k}.$objext -- eval "test_cmds=\"$reload_cmds\"" -+ eval test_cmds=\"$reload_cmds\" - func_len " $test_cmds" - len0=$func_len_result - len=$len0 -@@ -7411,12 +8379,12 @@ EOF - if test "$k" -eq 1 ; then - # The first file doesn't have a previous command to add. - reload_objs=$objlist -- eval "concat_cmds=\"$reload_cmds\"" -+ eval concat_cmds=\"$reload_cmds\" - else - # All subsequent reloadable object files will link in - # the last one created. - reload_objs="$objlist $last_robj" -- eval "concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\"" -+ eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\" - fi - last_robj=$output_objdir/$output_la-${k}.$objext - func_arith $k + 1 -@@ -7433,11 +8401,11 @@ EOF - # files will link in the last one created. - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - reload_objs="$objlist $last_robj" -- eval "concat_cmds=\"\${concat_cmds}$reload_cmds\"" -+ eval concat_cmds=\"\${concat_cmds}$reload_cmds\" - if test -n "$last_robj"; then -- eval "concat_cmds=\"\${concat_cmds}~\$RM $last_robj\"" -+ eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" - fi -- delfiles="$delfiles $output" -+ func_append delfiles " $output" - - else - output= -@@ -7450,9 +8418,9 @@ EOF - libobjs=$output - # Append the command to create the export file. - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ -- eval "concat_cmds=\"\$concat_cmds$export_symbols_cmds\"" -+ eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" - if test -n "$last_robj"; then -- eval "concat_cmds=\"\$concat_cmds~\$RM $last_robj\"" -+ eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" - fi - fi - -@@ -7471,7 +8439,7 @@ EOF - lt_exit=$? - - # Restore the uninstalled library and exit -- if test "$mode" = relink; then -+ if test "$opt_mode" = relink; then - ( cd "$output_objdir" && \ - $RM "${realname}T" && \ - $MV "${realname}U" "$realname" ) -@@ -7492,7 +8460,7 @@ EOF - if test -n "$export_symbols" && test -n "$include_expsyms"; then - tmp_export_symbols="$export_symbols" - test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" -- $opt_dry_run || $ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols" -+ $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' - fi - - if test -n "$orig_export_symbols"; then -@@ -7504,7 +8472,7 @@ EOF - # global variables. join(1) would be nice here, but unfortunately - # isn't a blessed tool. - $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter -- delfiles="$delfiles $export_symbols $output_objdir/$libname.filter" -+ func_append delfiles " $export_symbols $output_objdir/$libname.filter" - export_symbols=$output_objdir/$libname.def - $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols - fi -@@ -7515,7 +8483,7 @@ EOF - output=$save_output - - if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then -- eval "libobjs=\"\$libobjs $whole_archive_flag_spec\"" -+ eval libobjs=\"\$libobjs $whole_archive_flag_spec\" - test "X$libobjs" = "X " && libobjs= - fi - # Expand the library linking commands again to reset the -@@ -7539,23 +8507,23 @@ EOF - - if test -n "$delfiles"; then - # Append the command to remove temporary files to $cmds. -- eval "cmds=\"\$cmds~\$RM $delfiles\"" -+ eval cmds=\"\$cmds~\$RM $delfiles\" - fi - - # Add any objects from preloaded convenience libraries - if test -n "$dlprefiles"; then - gentop="$output_objdir/${outputname}x" -- generated="$generated $gentop" -+ func_append generated " $gentop" - - func_extract_archives $gentop $dlprefiles -- libobjs="$libobjs $func_extract_archives_result" -+ func_append libobjs " $func_extract_archives_result" - test "X$libobjs" = "X " && libobjs= - fi - - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" -- eval "cmd=\"$cmd\"" -+ eval cmd=\"$cmd\" - $opt_silent || { - func_quote_for_expand "$cmd" - eval "func_echo $func_quote_for_expand_result" -@@ -7564,7 +8532,7 @@ EOF - lt_exit=$? - - # Restore the uninstalled library and exit -- if test "$mode" = relink; then -+ if test "$opt_mode" = relink; then - ( cd "$output_objdir" && \ - $RM "${realname}T" && \ - $MV "${realname}U" "$realname" ) -@@ -7576,8 +8544,8 @@ EOF - IFS="$save_ifs" - - # Restore the uninstalled library and exit -- if test "$mode" = relink; then -- $opt_dry_run || (cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname) || exit $? -+ if test "$opt_mode" = relink; then -+ $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? - - if test -n "$convenience"; then - if test -z "$whole_archive_flag_spec"; then -@@ -7656,17 +8624,20 @@ EOF - - if test -n "$convenience"; then - if test -n "$whole_archive_flag_spec"; then -- eval "tmp_whole_archive_flags=\"$whole_archive_flag_spec\"" -+ eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" - reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` - else - gentop="$output_objdir/${obj}x" -- generated="$generated $gentop" -+ func_append generated " $gentop" - - func_extract_archives $gentop $convenience - reload_conv_objs="$reload_objs $func_extract_archives_result" - fi - fi - -+ # If we're not building shared, we need to use non_pic_objs -+ test "$build_libtool_libs" != yes && libobjs="$non_pic_objects" -+ - # Create the old-style object. - reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test - -@@ -7690,7 +8661,7 @@ EOF - # Create an invalid libtool object if no PIC, so that we don't - # accidentally link it into a program. - # $show "echo timestamp > $libobj" -- # $opt_dry_run || echo timestamp > $libobj || exit $? -+ # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? - exit $EXIT_SUCCESS - fi - -@@ -7740,8 +8711,8 @@ EOF - if test "$tagname" = CXX ; then - case ${MACOSX_DEPLOYMENT_TARGET-10.0} in - 10.[0123]) -- compile_command="$compile_command ${wl}-bind_at_load" -- finalize_command="$finalize_command ${wl}-bind_at_load" -+ func_append compile_command " ${wl}-bind_at_load" -+ func_append finalize_command " ${wl}-bind_at_load" - ;; - esac - fi -@@ -7761,7 +8732,7 @@ EOF - *) - case " $compile_deplibs " in - *" -L$path/$objdir "*) -- new_libs="$new_libs -L$path/$objdir" ;; -+ func_append new_libs " -L$path/$objdir" ;; - esac - ;; - esac -@@ -7771,17 +8742,17 @@ EOF - -L*) - case " $new_libs " in - *" $deplib "*) ;; -- *) new_libs="$new_libs $deplib" ;; -+ *) func_append new_libs " $deplib" ;; - esac - ;; -- *) new_libs="$new_libs $deplib" ;; -+ *) func_append new_libs " $deplib" ;; - esac - done - compile_deplibs="$new_libs" - - -- compile_command="$compile_command $compile_deplibs" -- finalize_command="$finalize_command $finalize_deplibs" -+ func_append compile_command " $compile_deplibs" -+ func_append finalize_command " $finalize_deplibs" - - if test -n "$rpath$xrpath"; then - # If the user specified any rpath flags, then add them. -@@ -7789,7 +8760,7 @@ EOF - # This is the magic to use -rpath. - case "$finalize_rpath " in - *" $libdir "*) ;; -- *) finalize_rpath="$finalize_rpath $libdir" ;; -+ *) func_append finalize_rpath " $libdir" ;; - esac - done - fi -@@ -7808,18 +8779,18 @@ EOF - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) -- hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" -+ func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" - ;; - esac - fi - else -- eval "flag=\"$hardcode_libdir_flag_spec\"" -- rpath="$rpath $flag" -+ eval flag=\"$hardcode_libdir_flag_spec\" -+ func_append rpath " $flag" - fi - elif test -n "$runpath_var"; then - case "$perm_rpath " in - *" $libdir "*) ;; -- *) perm_rpath="$perm_rpath $libdir" ;; -+ *) func_append perm_rpath " $libdir" ;; - esac - fi - case $host in -@@ -7828,12 +8799,12 @@ EOF - case :$dllsearchpath: in - *":$libdir:"*) ;; - ::) dllsearchpath=$libdir;; -- *) dllsearchpath="$dllsearchpath:$libdir";; -+ *) func_append dllsearchpath ":$libdir";; - esac - case :$dllsearchpath: in - *":$testbindir:"*) ;; - ::) dllsearchpath=$testbindir;; -- *) dllsearchpath="$dllsearchpath:$testbindir";; -+ *) func_append dllsearchpath ":$testbindir";; - esac - ;; - esac -@@ -7842,7 +8813,7 @@ EOF - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" -- eval "rpath=\" $hardcode_libdir_flag_spec\"" -+ eval rpath=\" $hardcode_libdir_flag_spec\" - fi - compile_rpath="$rpath" - -@@ -7859,18 +8830,18 @@ EOF - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) -- hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" -+ func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" - ;; - esac - fi - else -- eval "flag=\"$hardcode_libdir_flag_spec\"" -- rpath="$rpath $flag" -+ eval flag=\"$hardcode_libdir_flag_spec\" -+ func_append rpath " $flag" - fi - elif test -n "$runpath_var"; then - case "$finalize_perm_rpath " in - *" $libdir "*) ;; -- *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; -+ *) func_append finalize_perm_rpath " $libdir" ;; - esac - fi - done -@@ -7878,7 +8849,7 @@ EOF - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" -- eval "rpath=\" $hardcode_libdir_flag_spec\"" -+ eval rpath=\" $hardcode_libdir_flag_spec\" - fi - finalize_rpath="$rpath" - -@@ -7921,6 +8892,12 @@ EOF - exit_status=0 - func_show_eval "$link_command" 'exit_status=$?' - -+ if test -n "$postlink_cmds"; then -+ func_to_tool_file "$output" -+ postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` -+ func_execute_cmds "$postlink_cmds" 'exit $?' -+ fi -+ - # Delete the generated files. - if test -f "$output_objdir/${outputname}S.${objext}"; then - func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"' -@@ -7943,7 +8920,7 @@ EOF - # We should set the runpath_var. - rpath= - for dir in $perm_rpath; do -- rpath="$rpath$dir:" -+ func_append rpath "$dir:" - done - compile_var="$runpath_var=\"$rpath\$$runpath_var\" " - fi -@@ -7951,7 +8928,7 @@ EOF - # We should set the runpath_var. - rpath= - for dir in $finalize_perm_rpath; do -- rpath="$rpath$dir:" -+ func_append rpath "$dir:" - done - finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " - fi -@@ -7966,6 +8943,13 @@ EOF - $opt_dry_run || $RM $output - # Link the executable and exit - func_show_eval "$link_command" 'exit $?' -+ -+ if test -n "$postlink_cmds"; then -+ func_to_tool_file "$output" -+ postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` -+ func_execute_cmds "$postlink_cmds" 'exit $?' -+ fi -+ - exit $EXIT_SUCCESS - fi - -@@ -7999,6 +8983,12 @@ EOF - - func_show_eval "$link_command" 'exit $?' - -+ if test -n "$postlink_cmds"; then -+ func_to_tool_file "$output_objdir/$outputname" -+ postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` -+ func_execute_cmds "$postlink_cmds" 'exit $?' -+ fi -+ - # Now create the wrapper script. - func_verbose "creating $output" - -@@ -8096,7 +9086,7 @@ EOF - else - oldobjs="$old_deplibs $non_pic_objects" - if test "$preload" = yes && test -f "$symfileobj"; then -- oldobjs="$oldobjs $symfileobj" -+ func_append oldobjs " $symfileobj" - fi - fi - addlibs="$old_convenience" -@@ -8104,10 +9094,10 @@ EOF - - if test -n "$addlibs"; then - gentop="$output_objdir/${outputname}x" -- generated="$generated $gentop" -+ func_append generated " $gentop" - - func_extract_archives $gentop $addlibs -- oldobjs="$oldobjs $func_extract_archives_result" -+ func_append oldobjs " $func_extract_archives_result" - fi - - # Do each command in the archive commands. -@@ -8118,10 +9108,10 @@ EOF - # Add any objects from preloaded convenience libraries - if test -n "$dlprefiles"; then - gentop="$output_objdir/${outputname}x" -- generated="$generated $gentop" -+ func_append generated " $gentop" - - func_extract_archives $gentop $dlprefiles -- oldobjs="$oldobjs $func_extract_archives_result" -+ func_append oldobjs " $func_extract_archives_result" - fi - - # POSIX demands no paths to be encoded in archives. We have -@@ -8139,7 +9129,7 @@ EOF - else - echo "copying selected object files to avoid basename conflicts..." - gentop="$output_objdir/${outputname}x" -- generated="$generated $gentop" -+ func_append generated " $gentop" - func_mkdir_p "$gentop" - save_oldobjs=$oldobjs - oldobjs= -@@ -8163,18 +9153,28 @@ EOF - esac - done - func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" -- oldobjs="$oldobjs $gentop/$newobj" -+ func_append oldobjs " $gentop/$newobj" - ;; -- *) oldobjs="$oldobjs $obj" ;; -+ *) func_append oldobjs " $obj" ;; - esac - done - fi -- eval "cmds=\"$old_archive_cmds\"" -+ eval cmds=\"$old_archive_cmds\" - - func_len " $cmds" - len=$func_len_result - if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then - cmds=$old_archive_cmds -+ elif test -n "$archiver_list_spec"; then -+ func_verbose "using command file archive linking..." -+ for obj in $oldobjs -+ do -+ func_to_tool_file "$obj" -+ $ECHO "$func_to_tool_file_result" -+ done > $output_objdir/$libname.libcmd -+ func_to_tool_file "$output_objdir/$libname.libcmd" -+ oldobjs=" $archiver_list_spec$func_to_tool_file_result" -+ cmds=$old_archive_cmds - else - # the command line is too long to link in one step, link in parts - func_verbose "using piecewise archive linking..." -@@ -8189,7 +9189,7 @@ EOF - do - last_oldobj=$obj - done -- eval "test_cmds=\"$old_archive_cmds\"" -+ eval test_cmds=\"$old_archive_cmds\" - func_len " $test_cmds" - len0=$func_len_result - len=$len0 -@@ -8208,7 +9208,7 @@ EOF - RANLIB=$save_RANLIB - fi - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ -- eval "concat_cmds=\"\${concat_cmds}$old_archive_cmds\"" -+ eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" - objlist= - len=$len0 - fi -@@ -8216,9 +9216,9 @@ EOF - RANLIB=$save_RANLIB - oldobjs=$objlist - if test "X$oldobjs" = "X" ; then -- eval "cmds=\"\$concat_cmds\"" -+ eval cmds=\"\$concat_cmds\" - else -- eval "cmds=\"\$concat_cmds~\$old_archive_cmds\"" -+ eval cmds=\"\$concat_cmds~\$old_archive_cmds\" - fi - fi - fi -@@ -8268,12 +9268,23 @@ EOF - *.la) - func_basename "$deplib" - name="$func_basename_result" -- libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` -+ func_resolve_sysroot "$deplib" -+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` - test -z "$libdir" && \ - func_fatal_error "\`$deplib' is not a valid libtool archive" -- newdependency_libs="$newdependency_libs $libdir/$name" -+ func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" -+ ;; -+ -L*) -+ func_stripname -L '' "$deplib" -+ func_replace_sysroot "$func_stripname_result" -+ func_append newdependency_libs " -L$func_replace_sysroot_result" - ;; -- *) newdependency_libs="$newdependency_libs $deplib" ;; -+ -R*) -+ func_stripname -R '' "$deplib" -+ func_replace_sysroot "$func_stripname_result" -+ func_append newdependency_libs " -R$func_replace_sysroot_result" -+ ;; -+ *) func_append newdependency_libs " $deplib" ;; - esac - done - dependency_libs="$newdependency_libs" -@@ -8284,12 +9295,14 @@ EOF - *.la) - func_basename "$lib" - name="$func_basename_result" -- libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` -+ func_resolve_sysroot "$lib" -+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` -+ - test -z "$libdir" && \ - func_fatal_error "\`$lib' is not a valid libtool archive" -- newdlfiles="$newdlfiles $libdir/$name" -+ func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name" - ;; -- *) newdlfiles="$newdlfiles $lib" ;; -+ *) func_append newdlfiles " $lib" ;; - esac - done - dlfiles="$newdlfiles" -@@ -8303,10 +9316,11 @@ EOF - # the library: - func_basename "$lib" - name="$func_basename_result" -- libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` -+ func_resolve_sysroot "$lib" -+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` - test -z "$libdir" && \ - func_fatal_error "\`$lib' is not a valid libtool archive" -- newdlprefiles="$newdlprefiles $libdir/$name" -+ func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name" - ;; - esac - done -@@ -8318,7 +9332,7 @@ EOF - [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; - *) abs=`pwd`"/$lib" ;; - esac -- newdlfiles="$newdlfiles $abs" -+ func_append newdlfiles " $abs" - done - dlfiles="$newdlfiles" - newdlprefiles= -@@ -8327,7 +9341,7 @@ EOF - [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; - *) abs=`pwd`"/$lib" ;; - esac -- newdlprefiles="$newdlprefiles $abs" -+ func_append newdlprefiles " $abs" - done - dlprefiles="$newdlprefiles" - fi -@@ -8412,7 +9426,7 @@ relink_command=\"$relink_command\"" - exit $EXIT_SUCCESS - } - --{ test "$mode" = link || test "$mode" = relink; } && -+{ test "$opt_mode" = link || test "$opt_mode" = relink; } && - func_mode_link ${1+"$@"} - - -@@ -8432,9 +9446,9 @@ func_mode_uninstall () - for arg - do - case $arg in -- -f) RM="$RM $arg"; rmforce=yes ;; -- -*) RM="$RM $arg" ;; -- *) files="$files $arg" ;; -+ -f) func_append RM " $arg"; rmforce=yes ;; -+ -*) func_append RM " $arg" ;; -+ *) func_append files " $arg" ;; - esac - done - -@@ -8443,24 +9457,23 @@ func_mode_uninstall () - - rmdirs= - -- origobjdir="$objdir" - for file in $files; do - func_dirname "$file" "" "." - dir="$func_dirname_result" - if test "X$dir" = X.; then -- objdir="$origobjdir" -+ odir="$objdir" - else -- objdir="$dir/$origobjdir" -+ odir="$dir/$objdir" - fi - func_basename "$file" - name="$func_basename_result" -- test "$mode" = uninstall && objdir="$dir" -+ test "$opt_mode" = uninstall && odir="$dir" - -- # Remember objdir for removal later, being careful to avoid duplicates -- if test "$mode" = clean; then -+ # Remember odir for removal later, being careful to avoid duplicates -+ if test "$opt_mode" = clean; then - case " $rmdirs " in -- *" $objdir "*) ;; -- *) rmdirs="$rmdirs $objdir" ;; -+ *" $odir "*) ;; -+ *) func_append rmdirs " $odir" ;; - esac - fi - -@@ -8486,18 +9499,17 @@ func_mode_uninstall () - - # Delete the libtool libraries and symlinks. - for n in $library_names; do -- rmfiles="$rmfiles $objdir/$n" -+ func_append rmfiles " $odir/$n" - done -- test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" -+ test -n "$old_library" && func_append rmfiles " $odir/$old_library" - -- case "$mode" in -+ case "$opt_mode" in - clean) -- case " $library_names " in -- # " " in the beginning catches empty $dlname -+ case " $library_names " in - *" $dlname "*) ;; -- *) rmfiles="$rmfiles $objdir/$dlname" ;; -+ *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;; - esac -- test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" -+ test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i" - ;; - uninstall) - if test -n "$library_names"; then -@@ -8525,19 +9537,19 @@ func_mode_uninstall () - # Add PIC object to the list of files to remove. - if test -n "$pic_object" && - test "$pic_object" != none; then -- rmfiles="$rmfiles $dir/$pic_object" -+ func_append rmfiles " $dir/$pic_object" - fi - - # Add non-PIC object to the list of files to remove. - if test -n "$non_pic_object" && - test "$non_pic_object" != none; then -- rmfiles="$rmfiles $dir/$non_pic_object" -+ func_append rmfiles " $dir/$non_pic_object" - fi - fi - ;; - - *) -- if test "$mode" = clean ; then -+ if test "$opt_mode" = clean ; then - noexename=$name - case $file in - *.exe) -@@ -8547,7 +9559,7 @@ func_mode_uninstall () - noexename=$func_stripname_result - # $file with .exe has already been added to rmfiles, - # add $file without .exe -- rmfiles="$rmfiles $file" -+ func_append rmfiles " $file" - ;; - esac - # Do a test to see if this is a libtool program. -@@ -8556,7 +9568,7 @@ func_mode_uninstall () - func_ltwrapper_scriptname "$file" - relink_command= - func_source $func_ltwrapper_scriptname_result -- rmfiles="$rmfiles $func_ltwrapper_scriptname_result" -+ func_append rmfiles " $func_ltwrapper_scriptname_result" - else - relink_command= - func_source $dir/$noexename -@@ -8564,12 +9576,12 @@ func_mode_uninstall () - - # note $name still contains .exe if it was in $file originally - # as does the version of $file that was added into $rmfiles -- rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" -+ func_append rmfiles " $odir/$name $odir/${name}S.${objext}" - if test "$fast_install" = yes && test -n "$relink_command"; then -- rmfiles="$rmfiles $objdir/lt-$name" -+ func_append rmfiles " $odir/lt-$name" - fi - if test "X$noexename" != "X$name" ; then -- rmfiles="$rmfiles $objdir/lt-${noexename}.c" -+ func_append rmfiles " $odir/lt-${noexename}.c" - fi - fi - fi -@@ -8577,7 +9589,6 @@ func_mode_uninstall () - esac - func_show_eval "$RM $rmfiles" 'exit_status=1' - done -- objdir="$origobjdir" - - # Try to remove the ${objdir}s in the directories where we deleted files - for dir in $rmdirs; do -@@ -8589,16 +9600,16 @@ func_mode_uninstall () - exit $exit_status - } - --{ test "$mode" = uninstall || test "$mode" = clean; } && -+{ test "$opt_mode" = uninstall || test "$opt_mode" = clean; } && - func_mode_uninstall ${1+"$@"} - --test -z "$mode" && { -+test -z "$opt_mode" && { - help="$generic_help" - func_fatal_help "you must specify a MODE" - } - - test -z "$exec_cmd" && \ -- func_fatal_help "invalid operation mode \`$mode'" -+ func_fatal_help "invalid operation mode \`$opt_mode'" - - if test -n "$exec_cmd"; then - eval exec "$exec_cmd" -Index: binutils-2.21.1/ltoptions.m4 -=================================================================== ---- binutils-2.21.1.orig/ltoptions.m4 -+++ binutils-2.21.1/ltoptions.m4 -@@ -8,7 +8,7 @@ - # unlimited permission to copy and/or distribute it, with or without - # modifications, as long as this notice is preserved. - --# serial 6 ltoptions.m4 -+# serial 7 ltoptions.m4 - - # This is to help aclocal find these macros, as it can't see m4_define. - AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) -Index: binutils-2.21.1/ltversion.m4 -=================================================================== ---- binutils-2.21.1.orig/ltversion.m4 -+++ binutils-2.21.1/ltversion.m4 -@@ -7,17 +7,17 @@ - # unlimited permission to copy and/or distribute it, with or without - # modifications, as long as this notice is preserved. - --# Generated from ltversion.in. -+# @configure_input@ - --# serial 3134 ltversion.m4 -+# serial 3293 ltversion.m4 - # This file is part of GNU Libtool - --m4_define([LT_PACKAGE_VERSION], [2.2.7a]) --m4_define([LT_PACKAGE_REVISION], [1.3134]) -+m4_define([LT_PACKAGE_VERSION], [2.4]) -+m4_define([LT_PACKAGE_REVISION], [1.3293]) - - AC_DEFUN([LTVERSION_VERSION], --[macro_version='2.2.7a' --macro_revision='1.3134' -+[macro_version='2.4' -+macro_revision='1.3293' - _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) - _LT_DECL(, macro_revision, 0) - ]) -Index: binutils-2.21.1/lt~obsolete.m4 -=================================================================== ---- binutils-2.21.1.orig/lt~obsolete.m4 -+++ binutils-2.21.1/lt~obsolete.m4 -@@ -7,7 +7,7 @@ - # unlimited permission to copy and/or distribute it, with or without - # modifications, as long as this notice is preserved. - --# serial 4 lt~obsolete.m4 -+# serial 5 lt~obsolete.m4 - - # These exist entirely to fool aclocal when bootstrapping libtool. - # -Index: binutils-2.21.1/configure -=================================================================== ---- binutils-2.21.1.orig/configure -+++ binutils-2.21.1/configure -@@ -2670,7 +2670,7 @@ host_libs="intl mmalloc libiberty opcode - # binutils, gas and ld appear in that order because it makes sense to run - # "make check" in that particular order. - # If --enable-gold is used, "gold" may replace "ld". --host_tools="texinfo byacc flex bison binutils gas ld fixincludes gcc cgen sid sim gdb make patch prms send-pr gprof etc expect dejagnu ash bash bzip2 m4 autoconf automake libtool diff rcs fileutils shellutils time textutils wdiff find uudecode hello tar gzip indent recode release sed utils guile perl gawk findutils gettext zip fastjar gnattools" -+host_tools="byacc flex bison binutils gas ld fixincludes gcc cgen sid sim gdb make patch prms send-pr gprof etc expect dejagnu ash bash bzip2 m4 autoconf automake libtool diff rcs fileutils shellutils time textutils wdiff find uudecode hello tar gzip indent recode release sed utils guile perl gawk findutils gettext zip fastjar gnattools" - - # libgcj represents the runtime libraries only used by gcj. - libgcj="target-libffi \ -@@ -7597,7 +7597,7 @@ case " $build_configdirs " in - # For an installed makeinfo, we require it to be from texinfo 4.7 or - # higher, else we use the "missing" dummy. - if ${MAKEINFO} --version \ -- | egrep 'texinfo[^0-9]*(4\.([7-9]|[1-9][0-9])|[5-9]|[1-9][0-9])' >/dev/null 2>&1; then -+ | egrep 'texinfo[^0-9]*([1-3][0-9]|4.[4-9]|4.[1-9][0-9]+|[5-9])' >/dev/null 2>&1; then - : - else - MAKEINFO="$MISSING makeinfo" -Index: binutils-2.21.1/bfd/configure -=================================================================== ---- binutils-2.21.1.orig/bfd/configure -+++ binutils-2.21.1/bfd/configure -@@ -667,6 +667,9 @@ OTOOL - LIPO - NMEDIT - DSYMUTIL -+MANIFEST_TOOL -+ac_ct_AR -+DLLTOOL - OBJDUMP - LN_S - NM -@@ -779,6 +782,7 @@ enable_static - with_pic - enable_fast_install - with_gnu_ld -+with_libtool_sysroot - enable_libtool_lock - enable_plugins - enable_largefile -@@ -1453,6 +1457,8 @@ Optional Packages: - --with-pic try to use only PIC/non-PIC objects [default=use - both] - --with-gnu-ld assume the C compiler uses GNU ld [default=no] -+ --with-libtool-sysroot=DIR Search for dependent libraries within DIR -+ (or the compiler's sysroot if not specified). - --with-mmap try using mmap for BFD input files if available - --with-separate-debug-dir=DIR - Look for global separate debug info in DIR -@@ -5383,8 +5389,8 @@ esac - - - --macro_version='2.2.7a' --macro_revision='1.3134' -+macro_version='2.4' -+macro_revision='1.3293' - - - -@@ -5424,7 +5430,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 - $as_echo_n "checking how to print strings... " >&6; } - # Test print first, because it will be a builtin if present. --if test "X`print -r -- -n 2>/dev/null`" = X-n && \ -+if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ - test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then - ECHO='print -r --' - elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then -@@ -6110,8 +6116,8 @@ $as_echo_n "checking whether the shell u - # Try some XSI features - xsi_shell=no - ( _lt_dummy="a/b/c" -- test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ -- = c,a/b,, \ -+ test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ -+ = c,a/b,b/c, \ - && eval 'test $(( 1 + 1 )) -eq 2 \ - && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ - && xsi_shell=yes -@@ -6160,6 +6166,80 @@ esac - - - -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 -+$as_echo_n "checking how to convert $build file names to $host format... " >&6; } -+if test "${lt_cv_to_host_file_cmd+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ case $host in -+ *-*-mingw* ) -+ case $build in -+ *-*-mingw* ) # actually msys -+ lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 -+ ;; -+ *-*-cygwin* ) -+ lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 -+ ;; -+ * ) # otherwise, assume *nix -+ lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 -+ ;; -+ esac -+ ;; -+ *-*-cygwin* ) -+ case $build in -+ *-*-mingw* ) # actually msys -+ lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin -+ ;; -+ *-*-cygwin* ) -+ lt_cv_to_host_file_cmd=func_convert_file_noop -+ ;; -+ * ) # otherwise, assume *nix -+ lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin -+ ;; -+ esac -+ ;; -+ * ) # unhandled hosts (and "normal" native builds) -+ lt_cv_to_host_file_cmd=func_convert_file_noop -+ ;; -+esac -+ -+fi -+ -+to_host_file_cmd=$lt_cv_to_host_file_cmd -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 -+$as_echo "$lt_cv_to_host_file_cmd" >&6; } -+ -+ -+ -+ -+ -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 -+$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } -+if test "${lt_cv_to_tool_file_cmd+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ #assume ordinary cross tools, or native build. -+lt_cv_to_tool_file_cmd=func_convert_file_noop -+case $host in -+ *-*-mingw* ) -+ case $build in -+ *-*-mingw* ) # actually msys -+ lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 -+ ;; -+ esac -+ ;; -+esac -+ -+fi -+ -+to_tool_file_cmd=$lt_cv_to_tool_file_cmd -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 -+$as_echo "$lt_cv_to_tool_file_cmd" >&6; } -+ -+ -+ -+ -+ - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 - $as_echo_n "checking for $LD option to reload object files... " >&6; } - if test "${lt_cv_ld_reload_flag+set}" = set; then : -@@ -6176,6 +6256,11 @@ case $reload_flag in - esac - reload_cmds='$LD$reload_flag -o $output$reload_objs' - case $host_os in -+ cygwin* | mingw* | pw32* | cegcc*) -+ if test "$GCC" != yes; then -+ reload_cmds=false -+ fi -+ ;; - darwin*) - if test "$GCC" = yes; then - reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' -@@ -6344,7 +6429,8 @@ mingw* | pw32*) - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - else -- lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' -+ # Keep this pattern in sync with the one in func_win32_libid. -+ lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' - lt_cv_file_magic_cmd='$OBJDUMP -f' - fi - ;; -@@ -6498,6 +6584,21 @@ esac - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 - $as_echo "$lt_cv_deplibs_check_method" >&6; } -+ -+file_magic_glob= -+want_nocaseglob=no -+if test "$build" = "$host"; then -+ case $host_os in -+ mingw* | pw32*) -+ if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then -+ want_nocaseglob=yes -+ else -+ file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` -+ fi -+ ;; -+ esac -+fi -+ - file_magic_cmd=$lt_cv_file_magic_cmd - deplibs_check_method=$lt_cv_deplibs_check_method - test -z "$deplibs_check_method" && deplibs_check_method=unknown -@@ -6513,9 +6614,162 @@ test -z "$deplibs_check_method" && depli - - - -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ - if test -n "$ac_tool_prefix"; then -- # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. --set dummy ${ac_tool_prefix}ar; ac_word=$2 -+ # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. -+set dummy ${ac_tool_prefix}dlltool; ac_word=$2 -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -+$as_echo_n "checking for $ac_word... " >&6; } -+if test "${ac_cv_prog_DLLTOOL+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ if test -n "$DLLTOOL"; then -+ ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. -+else -+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -+ ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" -+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ break 2 -+ fi -+done -+ done -+IFS=$as_save_IFS -+ -+fi -+fi -+DLLTOOL=$ac_cv_prog_DLLTOOL -+if test -n "$DLLTOOL"; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 -+$as_echo "$DLLTOOL" >&6; } -+else -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } -+fi -+ -+ -+fi -+if test -z "$ac_cv_prog_DLLTOOL"; then -+ ac_ct_DLLTOOL=$DLLTOOL -+ # Extract the first word of "dlltool", so it can be a program name with args. -+set dummy dlltool; ac_word=$2 -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -+$as_echo_n "checking for $ac_word... " >&6; } -+if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ if test -n "$ac_ct_DLLTOOL"; then -+ ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. -+else -+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -+ ac_cv_prog_ac_ct_DLLTOOL="dlltool" -+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ break 2 -+ fi -+done -+ done -+IFS=$as_save_IFS -+ -+fi -+fi -+ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL -+if test -n "$ac_ct_DLLTOOL"; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 -+$as_echo "$ac_ct_DLLTOOL" >&6; } -+else -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } -+fi -+ -+ if test "x$ac_ct_DLLTOOL" = x; then -+ DLLTOOL="false" -+ else -+ case $cross_compiling:$ac_tool_warned in -+yes:) -+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -+ac_tool_warned=yes ;; -+esac -+ DLLTOOL=$ac_ct_DLLTOOL -+ fi -+else -+ DLLTOOL="$ac_cv_prog_DLLTOOL" -+fi -+ -+test -z "$DLLTOOL" && DLLTOOL=dlltool -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 -+$as_echo_n "checking how to associate runtime and link libraries... " >&6; } -+if test "${lt_cv_sharedlib_from_linklib_cmd+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ lt_cv_sharedlib_from_linklib_cmd='unknown' -+ -+case $host_os in -+cygwin* | mingw* | pw32* | cegcc*) -+ # two different shell functions defined in ltmain.sh -+ # decide which to use based on capabilities of $DLLTOOL -+ case `$DLLTOOL --help 2>&1` in -+ *--identify-strict*) -+ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib -+ ;; -+ *) -+ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback -+ ;; -+ esac -+ ;; -+*) -+ # fallback: assume linklib IS sharedlib -+ lt_cv_sharedlib_from_linklib_cmd="$ECHO" -+ ;; -+esac -+ -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 -+$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } -+sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd -+test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO -+ -+ -+ -+ -+ -+ -+ -+if test -n "$ac_tool_prefix"; then -+ for ac_prog in ar -+ do -+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -+set dummy $ac_tool_prefix$ac_prog; ac_word=$2 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 - $as_echo_n "checking for $ac_word... " >&6; } - if test "${ac_cv_prog_AR+set}" = set; then : -@@ -6531,7 +6785,7 @@ do - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -- ac_cv_prog_AR="${ac_tool_prefix}ar" -+ ac_cv_prog_AR="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -@@ -6551,11 +6805,15 @@ $as_echo "no" >&6; } - fi - - -+ test -n "$AR" && break -+ done - fi --if test -z "$ac_cv_prog_AR"; then -+if test -z "$AR"; then - ac_ct_AR=$AR -- # Extract the first word of "ar", so it can be a program name with args. --set dummy ar; ac_word=$2 -+ for ac_prog in ar -+do -+ # Extract the first word of "$ac_prog", so it can be a program name with args. -+set dummy $ac_prog; ac_word=$2 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 - $as_echo_n "checking for $ac_word... " >&6; } - if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : -@@ -6571,7 +6829,7 @@ do - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -- ac_cv_prog_ac_ct_AR="ar" -+ ac_cv_prog_ac_ct_AR="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -@@ -6590,6 +6848,10 @@ else - $as_echo "no" >&6; } - fi - -+ -+ test -n "$ac_ct_AR" && break -+done -+ - if test "x$ac_ct_AR" = x; then - AR="false" - else -@@ -6601,16 +6863,72 @@ ac_tool_warned=yes ;; - esac - AR=$ac_ct_AR - fi --else -- AR="$ac_cv_prog_AR" - fi - --test -z "$AR" && AR=ar --test -z "$AR_FLAGS" && AR_FLAGS=cru -+: ${AR=ar} -+: ${AR_FLAGS=cru} -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ - -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 -+$as_echo_n "checking for archiver @FILE support... " >&6; } -+if test "${lt_cv_ar_at_file+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ lt_cv_ar_at_file=no -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ - -+int -+main () -+{ - -+ ; -+ return 0; -+} -+_ACEOF -+if ac_fn_c_try_compile "$LINENO"; then : -+ echo conftest.$ac_objext > conftest.lst -+ lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' -+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 -+ (eval $lt_ar_try) 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -+ test $ac_status = 0; } -+ if test "$ac_status" -eq 0; then -+ # Ensure the archiver fails upon bogus file names. -+ rm -f conftest.$ac_objext libconftest.a -+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 -+ (eval $lt_ar_try) 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -+ test $ac_status = 0; } -+ if test "$ac_status" -ne 0; then -+ lt_cv_ar_at_file=@ -+ fi -+ fi -+ rm -f conftest.* libconftest.a - -+fi -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+ -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 -+$as_echo "$lt_cv_ar_at_file" >&6; } -+ -+if test "x$lt_cv_ar_at_file" = xno; then -+ archiver_list_spec= -+else -+ archiver_list_spec=$lt_cv_ar_at_file -+fi - - - -@@ -6952,8 +7270,8 @@ esac - lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" - - # Transform an extracted symbol line into symbol name and symbol address --lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" --lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" -+lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" -+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" - - # Handle CRLF in mingw tool chain - opt_cr= -@@ -6989,6 +7307,7 @@ for ac_symprfx in "" "_"; do - else - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" - fi -+ lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" - - # Check to see that the pipe works correctly. - pipe_works=no -@@ -7030,6 +7349,18 @@ _LT_EOF - if $GREP ' nm_test_var$' "$nlist" >/dev/null; then - if $GREP ' nm_test_func$' "$nlist" >/dev/null; then - cat <<_LT_EOF > conftest.$ac_ext -+/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ -+#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) -+/* DATA imports from DLLs on WIN32 con't be const, because runtime -+ relocations are performed -- see ld's documentation on pseudo-relocs. */ -+# define LT_DLSYM_CONST -+#elif defined(__osf__) -+/* This system does not cope well with relocations in const data. */ -+# define LT_DLSYM_CONST -+#else -+# define LT_DLSYM_CONST const -+#endif -+ - #ifdef __cplusplus - extern "C" { - #endif -@@ -7041,7 +7372,7 @@ _LT_EOF - cat <<_LT_EOF >> conftest.$ac_ext - - /* The mapping between symbol names and symbols. */ --const struct { -+LT_DLSYM_CONST struct { - const char *name; - void *address; - } -@@ -7067,8 +7398,8 @@ static const void *lt_preloaded_setup() - _LT_EOF - # Now try linking the two files. - mv conftest.$ac_objext conftstm.$ac_objext -- lt_save_LIBS="$LIBS" -- lt_save_CFLAGS="$CFLAGS" -+ lt_globsym_save_LIBS=$LIBS -+ lt_globsym_save_CFLAGS=$CFLAGS - LIBS="conftstm.$ac_objext" - CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 -@@ -7078,8 +7409,8 @@ _LT_EOF - test $ac_status = 0; } && test -s conftest${ac_exeext}; then - pipe_works=yes - fi -- LIBS="$lt_save_LIBS" -- CFLAGS="$lt_save_CFLAGS" -+ LIBS=$lt_globsym_save_LIBS -+ CFLAGS=$lt_globsym_save_CFLAGS - else - echo "cannot find nm_test_func in $nlist" >&5 - fi -@@ -7116,6 +7447,20 @@ else - $as_echo "ok" >&6; } - fi - -+# Response file support. -+if test "$lt_cv_nm_interface" = "MS dumpbin"; then -+ nm_file_list_spec='@' -+elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then -+ nm_file_list_spec='@' -+fi -+ -+ -+ -+ -+ -+ -+ -+ - - - -@@ -7135,6 +7480,41 @@ fi - - - -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 -+$as_echo_n "checking for sysroot... " >&6; } -+ -+# Check whether --with-libtool-sysroot was given. -+if test "${with_libtool_sysroot+set}" = set; then : -+ withval=$with_libtool_sysroot; -+else -+ with_libtool_sysroot=no -+fi -+ -+ -+lt_sysroot= -+case ${with_libtool_sysroot} in #( -+ yes) -+ if test "$GCC" = yes; then -+ lt_sysroot=`$CC --print-sysroot 2>/dev/null` -+ fi -+ ;; #( -+ /*) -+ lt_sysroot=`echo "$with_libtool_sysroot" | sed -e "$sed_quote_subst"` -+ ;; #( -+ no|'') -+ ;; #( -+ *) -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libtool_sysroot}" >&5 -+$as_echo "${with_libtool_sysroot}" >&6; } -+ as_fn_error "The sysroot must be an absolute path." "$LINENO" 5 -+ ;; -+esac -+ -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 -+$as_echo "${lt_sysroot:-no}" >&6; } -+ -+ -+ - - - # Check whether --enable-libtool-lock was given. -@@ -7330,6 +7710,123 @@ esac - - need_locks="$enable_libtool_lock" - -+if test -n "$ac_tool_prefix"; then -+ # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. -+set dummy ${ac_tool_prefix}mt; ac_word=$2 -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -+$as_echo_n "checking for $ac_word... " >&6; } -+if test "${ac_cv_prog_MANIFEST_TOOL+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ if test -n "$MANIFEST_TOOL"; then -+ ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. -+else -+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -+ ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" -+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ break 2 -+ fi -+done -+ done -+IFS=$as_save_IFS -+ -+fi -+fi -+MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL -+if test -n "$MANIFEST_TOOL"; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 -+$as_echo "$MANIFEST_TOOL" >&6; } -+else -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } -+fi -+ -+ -+fi -+if test -z "$ac_cv_prog_MANIFEST_TOOL"; then -+ ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL -+ # Extract the first word of "mt", so it can be a program name with args. -+set dummy mt; ac_word=$2 -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -+$as_echo_n "checking for $ac_word... " >&6; } -+if test "${ac_cv_prog_ac_ct_MANIFEST_TOOL+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ if test -n "$ac_ct_MANIFEST_TOOL"; then -+ ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. -+else -+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -+ ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" -+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ break 2 -+ fi -+done -+ done -+IFS=$as_save_IFS -+ -+fi -+fi -+ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL -+if test -n "$ac_ct_MANIFEST_TOOL"; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 -+$as_echo "$ac_ct_MANIFEST_TOOL" >&6; } -+else -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } -+fi -+ -+ if test "x$ac_ct_MANIFEST_TOOL" = x; then -+ MANIFEST_TOOL=":" -+ else -+ case $cross_compiling:$ac_tool_warned in -+yes:) -+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -+ac_tool_warned=yes ;; -+esac -+ MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL -+ fi -+else -+ MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" -+fi -+ -+test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 -+$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } -+if test "${lt_cv_path_mainfest_tool+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ lt_cv_path_mainfest_tool=no -+ echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 -+ $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out -+ cat conftest.err >&5 -+ if $GREP 'Manifest Tool' conftest.out > /dev/null; then -+ lt_cv_path_mainfest_tool=yes -+ fi -+ rm -f conftest* -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 -+$as_echo "$lt_cv_path_mainfest_tool" >&6; } -+if test "x$lt_cv_path_mainfest_tool" != xyes; then -+ MANIFEST_TOOL=: -+fi -+ -+ -+ -+ -+ - - case $host_os in - rhapsody* | darwin*) -@@ -7893,6 +8390,8 @@ _LT_EOF - $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 - echo "$AR cru libconftest.a conftest.o" >&5 - $AR cru libconftest.a conftest.o 2>&5 -+ echo "$RANLIB libconftest.a" >&5 -+ $RANLIB libconftest.a 2>&5 - cat > conftest.c << _LT_EOF - int main() { return 0;} - _LT_EOF -@@ -8057,7 +8556,8 @@ fi - LIBTOOL_DEPS="$ltmain" - - # Always use our own libtool. --LIBTOOL='$(SHELL) $(top_builddir)/libtool' -+LIBTOOL='$(SHELL) $(top_builddir)' -+LIBTOOL="$LIBTOOL/${host_alias}-libtool" - - - -@@ -8146,7 +8646,7 @@ aix3*) - esac - - # Global variables: --ofile=libtool -+ofile=${host_alias}-libtool - can_build_shared=yes - - # All known linkers require a `.a' archive for static linking (except MSVC, -@@ -8444,8 +8944,6 @@ fi - lt_prog_compiler_pic= - lt_prog_compiler_static= - --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 --$as_echo_n "checking for $compiler option to produce PIC... " >&6; } - - if test "$GCC" = yes; then - lt_prog_compiler_wl='-Wl,' -@@ -8610,6 +9108,12 @@ $as_echo_n "checking for $compiler optio - lt_prog_compiler_pic='--shared' - lt_prog_compiler_static='--static' - ;; -+ nagfor*) -+ # NAG Fortran compiler -+ lt_prog_compiler_wl='-Wl,-Wl,,' -+ lt_prog_compiler_pic='-PIC' -+ lt_prog_compiler_static='-Bstatic' -+ ;; - pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) -@@ -8672,7 +9176,7 @@ $as_echo_n "checking for $compiler optio - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - case $cc_basename in -- f77* | f90* | f95*) -+ f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) - lt_prog_compiler_wl='-Qoption ld ';; - *) - lt_prog_compiler_wl='-Wl,';; -@@ -8729,13 +9233,17 @@ case $host_os in - lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" - ;; - esac --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5 --$as_echo "$lt_prog_compiler_pic" >&6; } -- -- -- -- - -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -+$as_echo_n "checking for $compiler option to produce PIC... " >&6; } -+if test "${lt_cv_prog_compiler_pic+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ lt_cv_prog_compiler_pic=$lt_prog_compiler_pic -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 -+$as_echo "$lt_cv_prog_compiler_pic" >&6; } -+lt_prog_compiler_pic=$lt_cv_prog_compiler_pic - - # - # Check to make sure the PIC flag actually works. -@@ -8796,6 +9304,11 @@ fi - - - -+ -+ -+ -+ -+ - # - # Check to make sure the static flag actually works. - # -@@ -9146,7 +9659,8 @@ _LT_EOF - allow_undefined_flag=unsupported - always_export_symbols=no - enable_shared_with_static_runtimes=yes -- export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' -+ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' -+ exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' -@@ -9194,7 +9708,7 @@ _LT_EOF - if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ - && test "$tmp_diet" = no - then -- tmp_addflag= -+ tmp_addflag=' $pic_flag' - tmp_sharedflag='-shared' - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler -@@ -9245,12 +9759,12 @@ _LT_EOF - whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' - hardcode_libdir_flag_spec= - hardcode_libdir_flag_spec_ld='-rpath $libdir' -- archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' -+ archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then - archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ -- $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' -+ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' - fi - ;; - esac -@@ -9264,8 +9778,8 @@ _LT_EOF - archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else -- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' -+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - -@@ -9283,8 +9797,8 @@ _LT_EOF - - _LT_EOF - elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then -- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' -+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi -@@ -9330,8 +9844,8 @@ _LT_EOF - - *) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then -- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' -+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi -@@ -9461,7 +9975,13 @@ _LT_EOF - allow_undefined_flag='-berok' - # Determine the default libpath from the value encoded in an - # empty executable. -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+ if test "${lt_cv_aix_libpath+set}" = set; then -+ aix_libpath=$lt_cv_aix_libpath -+else -+ if test "${lt_cv_aix_libpath_+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - - int -@@ -9474,22 +9994,29 @@ main () - _ACEOF - if ac_fn_c_try_link "$LINENO"; then : - --lt_aix_libpath_sed=' -- /Import File Strings/,/^$/ { -- /^0/ { -- s/^0 *\(.*\)$/\1/ -- p -- } -- }' --aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` --# Check for a 64-bit object if we didn't find anything. --if test -z "$aix_libpath"; then -- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` --fi -+ lt_aix_libpath_sed=' -+ /Import File Strings/,/^$/ { -+ /^0/ { -+ s/^0 *\([^ ]*\) *$/\1/ -+ p -+ } -+ }' -+ lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -+ # Check for a 64-bit object if we didn't find anything. -+ if test -z "$lt_cv_aix_libpath_"; then -+ lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -+ fi - fi - rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext --if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi -+ if test -z "$lt_cv_aix_libpath_"; then -+ lt_cv_aix_libpath_="/usr/lib:/lib" -+ fi -+ -+fi -+ -+ aix_libpath=$lt_cv_aix_libpath_ -+fi - - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" -@@ -9501,7 +10028,13 @@ if test -z "$aix_libpath"; then aix_libp - else - # Determine the default libpath from the value encoded in an - # empty executable. -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+ if test "${lt_cv_aix_libpath+set}" = set; then -+ aix_libpath=$lt_cv_aix_libpath -+else -+ if test "${lt_cv_aix_libpath_+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - - int -@@ -9514,22 +10047,29 @@ main () - _ACEOF - if ac_fn_c_try_link "$LINENO"; then : - --lt_aix_libpath_sed=' -- /Import File Strings/,/^$/ { -- /^0/ { -- s/^0 *\(.*\)$/\1/ -- p -- } -- }' --aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` --# Check for a 64-bit object if we didn't find anything. --if test -z "$aix_libpath"; then -- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` --fi -+ lt_aix_libpath_sed=' -+ /Import File Strings/,/^$/ { -+ /^0/ { -+ s/^0 *\([^ ]*\) *$/\1/ -+ p -+ } -+ }' -+ lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -+ # Check for a 64-bit object if we didn't find anything. -+ if test -z "$lt_cv_aix_libpath_"; then -+ lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -+ fi - fi - rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext --if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi -+ if test -z "$lt_cv_aix_libpath_"; then -+ lt_cv_aix_libpath_="/usr/lib:/lib" -+ fi -+ -+fi -+ -+ aix_libpath=$lt_cv_aix_libpath_ -+fi - - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, -@@ -9574,20 +10114,63 @@ if test -z "$aix_libpath"; then aix_libp - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. -- hardcode_libdir_flag_spec=' ' -- allow_undefined_flag=unsupported -- # Tell ltmain to make .lib files, not .a files. -- libext=lib -- # Tell ltmain to make .dll files, not .so files. -- shrext_cmds=".dll" -- # FIXME: Setting linknames here is a bad hack. -- archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' -- # The linker will automatically build a .lib file if we build a DLL. -- old_archive_from_new_cmds='true' -- # FIXME: Should let the user specify the lib program. -- old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' -- fix_srcfile_path='`cygpath -w "$srcfile"`' -- enable_shared_with_static_runtimes=yes -+ case $cc_basename in -+ cl*) -+ # Native MSVC -+ hardcode_libdir_flag_spec=' ' -+ allow_undefined_flag=unsupported -+ always_export_symbols=yes -+ file_list_spec='@' -+ # Tell ltmain to make .lib files, not .a files. -+ libext=lib -+ # Tell ltmain to make .dll files, not .so files. -+ shrext_cmds=".dll" -+ # FIXME: Setting linknames here is a bad hack. -+ archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' -+ archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then -+ sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; -+ else -+ sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; -+ fi~ -+ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ -+ linknames=' -+ # The linker will not automatically build a static lib if we build a DLL. -+ # _LT_TAGVAR(old_archive_from_new_cmds, )='true' -+ enable_shared_with_static_runtimes=yes -+ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' -+ # Don't use ranlib -+ old_postinstall_cmds='chmod 644 $oldlib' -+ postlink_cmds='lt_outputfile="@OUTPUT@"~ -+ lt_tool_outputfile="@TOOL_OUTPUT@"~ -+ case $lt_outputfile in -+ *.exe|*.EXE) ;; -+ *) -+ lt_outputfile="$lt_outputfile.exe" -+ lt_tool_outputfile="$lt_tool_outputfile.exe" -+ ;; -+ esac~ -+ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then -+ $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; -+ $RM "$lt_outputfile.manifest"; -+ fi' -+ ;; -+ *) -+ # Assume MSVC wrapper -+ hardcode_libdir_flag_spec=' ' -+ allow_undefined_flag=unsupported -+ # Tell ltmain to make .lib files, not .a files. -+ libext=lib -+ # Tell ltmain to make .dll files, not .so files. -+ shrext_cmds=".dll" -+ # FIXME: Setting linknames here is a bad hack. -+ archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' -+ # The linker will automatically build a .lib file if we build a DLL. -+ old_archive_from_new_cmds='true' -+ # FIXME: Should let the user specify the lib program. -+ old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' -+ enable_shared_with_static_runtimes=yes -+ ;; -+ esac - ;; - - darwin* | rhapsody*) -@@ -9652,7 +10235,7 @@ if test -z "$aix_libpath"; then aix_libp - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) -- archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' -+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no -@@ -9660,7 +10243,7 @@ if test -z "$aix_libpath"; then aix_libp - - hpux9*) - if test "$GCC" = yes; then -- archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' -+ archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - fi -@@ -9676,7 +10259,7 @@ if test -z "$aix_libpath"; then aix_libp - - hpux10*) - if test "$GCC" = yes && test "$with_gnu_ld" = no; then -- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' -+ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi -@@ -9700,10 +10283,10 @@ if test -z "$aix_libpath"; then aix_libp - archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) -- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' -+ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) -- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' -+ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else -@@ -9782,23 +10365,36 @@ fi - - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then -- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' -+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - # Try to use the -exported_symbol ld option, if it does not - # work, assume that -exports_file does not work either and - # implicitly export all symbols. -- save_LDFLAGS="$LDFLAGS" -- LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+ # This should be the same for all languages, so no per-tag cache variable. -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 -+$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } -+if test "${lt_cv_irix_exported_symbol+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ save_LDFLAGS="$LDFLAGS" -+ LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ --int foo(void) {} -+int foo (void) { return 0; } - _ACEOF - if ac_fn_c_try_link "$LINENO"; then : -- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' -- -+ lt_cv_irix_exported_symbol=yes -+else -+ lt_cv_irix_exported_symbol=no - fi - rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -- LDFLAGS="$save_LDFLAGS" -+ LDFLAGS="$save_LDFLAGS" -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 -+$as_echo "$lt_cv_irix_exported_symbol" >&6; } -+ if test "$lt_cv_irix_exported_symbol" = yes; then -+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' -+ fi - else - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' -@@ -9883,7 +10479,7 @@ rm -f core conftest.err conftest.$ac_obj - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' -- archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' -+ archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - else - allow_undefined_flag=' -expect_unresolved \*' -@@ -9902,9 +10498,9 @@ rm -f core conftest.err conftest.$ac_obj - no_undefined_flag=' -z defs' - if test "$GCC" = yes; then - wlarc='${wl}' -- archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' -+ archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ -- $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' -+ $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - else - case `$CC -V 2>&1` in - *"Compilers 5.0"*) -@@ -10480,8 +11076,9 @@ cygwin* | mingw* | pw32* | cegcc*) - need_version=no - need_lib_prefix=no - -- case $GCC,$host_os in -- yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) -+ case $GCC,$cc_basename in -+ yes,*) -+ # gcc - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ -@@ -10514,13 +11111,71 @@ cygwin* | mingw* | pw32* | cegcc*) - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - ;; - esac -+ dynamic_linker='Win32 ld.exe' -+ ;; -+ -+ *,cl*) -+ # Native MSVC -+ libname_spec='$name' -+ soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' -+ library_names_spec='${libname}.dll.lib' -+ -+ case $build_os in -+ mingw*) -+ sys_lib_search_path_spec= -+ lt_save_ifs=$IFS -+ IFS=';' -+ for lt_path in $LIB -+ do -+ IFS=$lt_save_ifs -+ # Let DOS variable expansion print the short 8.3 style file name. -+ lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` -+ sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" -+ done -+ IFS=$lt_save_ifs -+ # Convert to MSYS style. -+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` -+ ;; -+ cygwin*) -+ # Convert to unix form, then to dos form, then back to unix form -+ # but this time dos style (no spaces!) so that the unix form looks -+ # like /cygdrive/c/PROGRA~1:/cygdr... -+ sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` -+ sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` -+ sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` -+ ;; -+ *) -+ sys_lib_search_path_spec="$LIB" -+ if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then -+ # It is most probably a Windows format PATH. -+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` -+ else -+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` -+ fi -+ # FIXME: find the short name or the path components, as spaces are -+ # common. (e.g. "Program Files" -> "PROGRA~1") -+ ;; -+ esac -+ -+ # DLL is installed to $(libdir)/../bin by postinstall_cmds -+ postinstall_cmds='base_file=`basename \${file}`~ -+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ -+ dldir=$destdir/`dirname \$dlpath`~ -+ test -d \$dldir || mkdir -p \$dldir~ -+ $install_prog $dir/$dlname \$dldir/$dlname' -+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ -+ dlpath=$dir/\$dldll~ -+ $RM \$dlpath' -+ shlibpath_overrides_runpath=yes -+ dynamic_linker='Win32 link.exe' - ;; - - *) -+ # Assume MSVC wrapper - library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' -+ dynamic_linker='Win32 ld.exe' - ;; - esac -- dynamic_linker='Win32 ld.exe' - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; -@@ -10616,7 +11271,7 @@ haiku*) - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LIBRARY_PATH - shlibpath_overrides_runpath=yes -- sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib' -+ sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' - hardcode_into_libs=yes - ;; - -@@ -11412,7 +12067,7 @@ else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF --#line 11415 "configure" -+#line $LINENO "configure" - #include "confdefs.h" - - #if HAVE_DLFCN_H -@@ -11456,10 +12111,10 @@ else - /* When -fvisbility=hidden is used, assume the code has been annotated - correspondingly for the symbols needed. */ - #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) --void fnord () __attribute__((visibility("default"))); -+int fnord () __attribute__((visibility("default"))); - #endif - --void fnord () { int i=42; } -+int fnord () { return 42; } - int main () - { - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); -@@ -11518,7 +12173,7 @@ else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF --#line 11521 "configure" -+#line $LINENO "configure" - #include "confdefs.h" - - #if HAVE_DLFCN_H -@@ -11562,10 +12217,10 @@ else - /* When -fvisbility=hidden is used, assume the code has been annotated - correspondingly for the symbols needed. */ - #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) --void fnord () __attribute__((visibility("default"))); -+int fnord () __attribute__((visibility("default"))); - #endif - --void fnord () { int i=42; } -+int fnord () { return 42; } - int main () - { - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); -@@ -15045,7 +15700,7 @@ SHARED_LDFLAGS= - if test "$enable_shared" = "yes"; then - x=`sed -n -e 's/^[ ]*PICFLAG[ ]*=[ ]*//p' < ../libiberty/Makefile | sed -n '$p'` - if test -n "$x"; then -- SHARED_LIBADD="-L`pwd`/../libiberty/pic -liberty" -+ SHARED_LIBADD="`pwd`/../libiberty/pic/libiberty.a" - fi - - # More hacks to build DLLs on Windows. -@@ -16619,13 +17274,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_ - lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' - lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' - lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' -+lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' -+lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' - reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' - reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' - OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' - deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' - file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' -+file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' -+want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' -+DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' -+sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' - AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' - AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' -+archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' - STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' - RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' - old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' -@@ -16640,14 +17302,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$l - lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' - lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' - lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' -+nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' -+lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' - objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' - MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' - lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' --lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' - lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' -+lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' - lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' - lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' - need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' -+MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' - DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' - NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' - LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' -@@ -16680,12 +17345,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcod - hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' - inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' - link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' --fix_srcfile_path='`$ECHO "$fix_srcfile_path" | $SED "$delay_single_quote_subst"`' - always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' - export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' - exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' - include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' - prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' -+postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' - file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' - variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' - need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' -@@ -16740,8 +17405,13 @@ reload_flag \ - OBJDUMP \ - deplibs_check_method \ - file_magic_cmd \ -+file_magic_glob \ -+want_nocaseglob \ -+DLLTOOL \ -+sharedlib_from_linklib_cmd \ - AR \ - AR_FLAGS \ -+archiver_list_spec \ - STRIP \ - RANLIB \ - CC \ -@@ -16751,12 +17421,14 @@ lt_cv_sys_global_symbol_pipe \ - lt_cv_sys_global_symbol_to_cdecl \ - lt_cv_sys_global_symbol_to_c_name_address \ - lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ -+nm_file_list_spec \ - lt_prog_compiler_no_builtin_flag \ --lt_prog_compiler_wl \ - lt_prog_compiler_pic \ -+lt_prog_compiler_wl \ - lt_prog_compiler_static \ - lt_cv_prog_compiler_c_o \ - need_locks \ -+MANIFEST_TOOL \ - DSYMUTIL \ - NMEDIT \ - LIPO \ -@@ -16772,7 +17444,6 @@ no_undefined_flag \ - hardcode_libdir_flag_spec \ - hardcode_libdir_flag_spec_ld \ - hardcode_libdir_separator \ --fix_srcfile_path \ - exclude_expsyms \ - include_expsyms \ - file_list_spec \ -@@ -16808,6 +17479,7 @@ module_cmds \ - module_expsym_cmds \ - export_symbols_cmds \ - prelink_cmds \ -+postlink_cmds \ - postinstall_cmds \ - postuninstall_cmds \ - finish_cmds \ -@@ -17587,7 +18259,8 @@ $as_echo X"$file" | - # NOTE: Changes made to this file will be lost: look at ltmain.sh. - # - # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, --# 2006, 2007, 2008, 2009 Free Software Foundation, Inc. -+# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, -+# Inc. - # Written by Gordon Matzigkeit, 1996 - # - # This file is part of GNU Libtool. -@@ -17690,19 +18363,42 @@ SP2NL=$lt_lt_SP2NL - # turn newlines into spaces. - NL2SP=$lt_lt_NL2SP - -+# convert \$build file names to \$host format. -+to_host_file_cmd=$lt_cv_to_host_file_cmd -+ -+# convert \$build files to toolchain format. -+to_tool_file_cmd=$lt_cv_to_tool_file_cmd -+ - # An object symbol dumper. - OBJDUMP=$lt_OBJDUMP - - # Method to check whether dependent libraries are shared objects. - deplibs_check_method=$lt_deplibs_check_method - --# Command to use when deplibs_check_method == "file_magic". -+# Command to use when deplibs_check_method = "file_magic". - file_magic_cmd=$lt_file_magic_cmd - -+# How to find potential files when deplibs_check_method = "file_magic". -+file_magic_glob=$lt_file_magic_glob -+ -+# Find potential files using nocaseglob when deplibs_check_method = "file_magic". -+want_nocaseglob=$lt_want_nocaseglob -+ -+# DLL creation program. -+DLLTOOL=$lt_DLLTOOL -+ -+# Command to associate shared and link libraries. -+sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd -+ - # The archiver. - AR=$lt_AR -+ -+# Flags to create an archive. - AR_FLAGS=$lt_AR_FLAGS - -+# How to feed a file listing to the archiver. -+archiver_list_spec=$lt_archiver_list_spec -+ - # A symbol stripping program. - STRIP=$lt_STRIP - -@@ -17732,6 +18428,12 @@ global_symbol_to_c_name_address=$lt_lt_c - # Transform the output of nm in a C name address pair when lib prefix is needed. - global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix - -+# Specify filename containing input files for \$NM. -+nm_file_list_spec=$lt_nm_file_list_spec -+ -+# The root where to search for dependent libraries,and in which our libraries should be installed. -+lt_sysroot=$lt_sysroot -+ - # The name of the directory that contains temporary libtool files. - objdir=$objdir - -@@ -17741,6 +18443,9 @@ MAGIC_CMD=$MAGIC_CMD - # Must we lock files when doing compilation? - need_locks=$lt_need_locks - -+# Manifest tool. -+MANIFEST_TOOL=$lt_MANIFEST_TOOL -+ - # Tool to manipulate archived DWARF debug symbol files on Mac OS X. - DSYMUTIL=$lt_DSYMUTIL - -@@ -17855,12 +18560,12 @@ with_gcc=$GCC - # Compiler flag to turn off builtin functions. - no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag - --# How to pass a linker flag through the compiler. --wl=$lt_lt_prog_compiler_wl -- - # Additional compiler flags for building library objects. - pic_flag=$lt_lt_prog_compiler_pic - -+# How to pass a linker flag through the compiler. -+wl=$lt_lt_prog_compiler_wl -+ - # Compiler flag to prevent dynamic linking. - link_static_flag=$lt_lt_prog_compiler_static - -@@ -17947,9 +18652,6 @@ inherit_rpath=$inherit_rpath - # Whether libtool must link a program against all its dependency libraries. - link_all_deplibs=$link_all_deplibs - --# Fix the shell variable \$srcfile for the compiler. --fix_srcfile_path=$lt_fix_srcfile_path -- - # Set to "yes" if exported symbols are required. - always_export_symbols=$always_export_symbols - -@@ -17965,6 +18667,9 @@ include_expsyms=$lt_include_expsyms - # Commands necessary for linking programs (against libraries) with templates. - prelink_cmds=$lt_prelink_cmds - -+# Commands necessary for finishing linking programs. -+postlink_cmds=$lt_postlink_cmds -+ - # Specify filename containing input files. - file_list_spec=$lt_file_list_spec - -@@ -17997,210 +18702,169 @@ ltmain="$ac_aux_dir/ltmain.sh" - # if finds mixed CR/LF and LF-only lines. Since sed operates in - # text mode, it properly converts lines to CR/LF. This bash problem - # is reportedly fixed, but why not run on old versions too? -- sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ -- || (rm -f "$cfgfile"; exit 1) -- -- case $xsi_shell in -- yes) -- cat << \_LT_EOF >> "$cfgfile" -- --# func_dirname file append nondir_replacement --# Compute the dirname of FILE. If nonempty, add APPEND to the result, --# otherwise set result to NONDIR_REPLACEMENT. --func_dirname () --{ -- case ${1} in -- */*) func_dirname_result="${1%/*}${2}" ;; -- * ) func_dirname_result="${3}" ;; -- esac --} -- --# func_basename file --func_basename () --{ -- func_basename_result="${1##*/}" --} -- --# func_dirname_and_basename file append nondir_replacement --# perform func_basename and func_dirname in a single function --# call: --# dirname: Compute the dirname of FILE. If nonempty, --# add APPEND to the result, otherwise set result --# to NONDIR_REPLACEMENT. --# value returned in "$func_dirname_result" --# basename: Compute filename of FILE. --# value retuned in "$func_basename_result" --# Implementation must be kept synchronized with func_dirname --# and func_basename. For efficiency, we do not delegate to --# those functions but instead duplicate the functionality here. --func_dirname_and_basename () --{ -- case ${1} in -- */*) func_dirname_result="${1%/*}${2}" ;; -- * ) func_dirname_result="${3}" ;; -- esac -- func_basename_result="${1##*/}" --} -- --# func_stripname prefix suffix name --# strip PREFIX and SUFFIX off of NAME. --# PREFIX and SUFFIX must not contain globbing or regex special --# characters, hashes, percent signs, but SUFFIX may contain a leading --# dot (in which case that matches only a dot). --func_stripname () --{ -- # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are -- # positional parameters, so assign one to ordinary parameter first. -- func_stripname_result=${3} -- func_stripname_result=${func_stripname_result#"${1}"} -- func_stripname_result=${func_stripname_result%"${2}"} --} -- --# func_opt_split --func_opt_split () --{ -- func_opt_split_opt=${1%%=*} -- func_opt_split_arg=${1#*=} --} -- --# func_lo2o object --func_lo2o () --{ -- case ${1} in -- *.lo) func_lo2o_result=${1%.lo}.${objext} ;; -- *) func_lo2o_result=${1} ;; -- esac --} -- --# func_xform libobj-or-source --func_xform () --{ -- func_xform_result=${1%.*}.lo --} -- --# func_arith arithmetic-term... --func_arith () --{ -- func_arith_result=$(( $* )) --} -- --# func_len string --# STRING may not start with a hyphen. --func_len () --{ -- func_len_result=${#1} --} -- --_LT_EOF -- ;; -- *) # Bourne compatible functions. -- cat << \_LT_EOF >> "$cfgfile" -- --# func_dirname file append nondir_replacement --# Compute the dirname of FILE. If nonempty, add APPEND to the result, --# otherwise set result to NONDIR_REPLACEMENT. --func_dirname () --{ -- # Extract subdirectory from the argument. -- func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` -- if test "X$func_dirname_result" = "X${1}"; then -- func_dirname_result="${3}" -- else -- func_dirname_result="$func_dirname_result${2}" -- fi --} -- --# func_basename file --func_basename () --{ -- func_basename_result=`$ECHO "${1}" | $SED "$basename"` --} -- -- --# func_stripname prefix suffix name --# strip PREFIX and SUFFIX off of NAME. --# PREFIX and SUFFIX must not contain globbing or regex special --# characters, hashes, percent signs, but SUFFIX may contain a leading --# dot (in which case that matches only a dot). --# func_strip_suffix prefix name --func_stripname () --{ -- case ${2} in -- .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; -- *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; -- esac --} -- --# sed scripts: --my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q' --my_sed_long_arg='1s/^-[^=]*=//' -- --# func_opt_split --func_opt_split () --{ -- func_opt_split_opt=`$ECHO "${1}" | $SED "$my_sed_long_opt"` -- func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"` --} -- --# func_lo2o object --func_lo2o () --{ -- func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` --} -- --# func_xform libobj-or-source --func_xform () --{ -- func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` --} -- --# func_arith arithmetic-term... --func_arith () --{ -- func_arith_result=`expr "$@"` --} -- --# func_len string --# STRING may not start with a hyphen. --func_len () --{ -- func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` --} -- --_LT_EOF --esac -- --case $lt_shell_append in -- yes) -- cat << \_LT_EOF >> "$cfgfile" -- --# func_append var value --# Append VALUE to the end of shell variable VAR. --func_append () --{ -- eval "$1+=\$2" --} --_LT_EOF -- ;; -- *) -- cat << \_LT_EOF >> "$cfgfile" -- --# func_append var value --# Append VALUE to the end of shell variable VAR. --func_append () --{ -- eval "$1=\$$1\$2" --} -- --_LT_EOF -- ;; -- esac -+ sed '$q' "$ltmain" >> "$cfgfile" \ -+ || (rm -f "$cfgfile"; exit 1) - -+ if test x"$xsi_shell" = xyes; then -+ sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ -+func_dirname ()\ -+{\ -+\ case ${1} in\ -+\ */*) func_dirname_result="${1%/*}${2}" ;;\ -+\ * ) func_dirname_result="${3}" ;;\ -+\ esac\ -+} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_basename ()$/,/^} # func_basename /c\ -+func_basename ()\ -+{\ -+\ func_basename_result="${1##*/}"\ -+} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ -+func_dirname_and_basename ()\ -+{\ -+\ case ${1} in\ -+\ */*) func_dirname_result="${1%/*}${2}" ;;\ -+\ * ) func_dirname_result="${3}" ;;\ -+\ esac\ -+\ func_basename_result="${1##*/}"\ -+} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ -+func_stripname ()\ -+{\ -+\ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ -+\ # positional parameters, so assign one to ordinary parameter first.\ -+\ func_stripname_result=${3}\ -+\ func_stripname_result=${func_stripname_result#"${1}"}\ -+\ func_stripname_result=${func_stripname_result%"${2}"}\ -+} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ -+func_split_long_opt ()\ -+{\ -+\ func_split_long_opt_name=${1%%=*}\ -+\ func_split_long_opt_arg=${1#*=}\ -+} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ -+func_split_short_opt ()\ -+{\ -+\ func_split_short_opt_arg=${1#??}\ -+\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ -+} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ -+func_lo2o ()\ -+{\ -+\ case ${1} in\ -+\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ -+\ *) func_lo2o_result=${1} ;;\ -+\ esac\ -+} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_xform ()$/,/^} # func_xform /c\ -+func_xform ()\ -+{\ -+ func_xform_result=${1%.*}.lo\ -+} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_arith ()$/,/^} # func_arith /c\ -+func_arith ()\ -+{\ -+ func_arith_result=$(( $* ))\ -+} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_len ()$/,/^} # func_len /c\ -+func_len ()\ -+{\ -+ func_len_result=${#1}\ -+} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+fi -+ -+if test x"$lt_shell_append" = xyes; then -+ sed -e '/^func_append ()$/,/^} # func_append /c\ -+func_append ()\ -+{\ -+ eval "${1}+=\\${2}"\ -+} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ -+func_append_quoted ()\ -+{\ -+\ func_quote_for_eval "${2}"\ -+\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ -+} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ # Save a `func_append' function call where possible by direct use of '+=' -+ sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+ test 0 -eq $? || _lt_function_replace_fail=: -+else -+ # Save a `func_append' function call even when '+=' is not available -+ sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+ test 0 -eq $? || _lt_function_replace_fail=: -+fi -+ -+if test x"$_lt_function_replace_fail" = x":"; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 -+$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} -+fi - -- sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ -- || (rm -f "$cfgfile"; exit 1) - -- mv -f "$cfgfile" "$ofile" || -+ mv -f "$cfgfile" "$ofile" || - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" - -Index: binutils-2.21.1/opcodes/configure -=================================================================== ---- binutils-2.21.1.orig/opcodes/configure -+++ binutils-2.21.1/opcodes/configure -@@ -647,6 +647,9 @@ OTOOL - LIPO - NMEDIT - DSYMUTIL -+MANIFEST_TOOL -+ac_ct_AR -+DLLTOOL - OBJDUMP - LN_S - NM -@@ -759,6 +762,7 @@ enable_static - with_pic - enable_fast_install - with_gnu_ld -+with_libtool_sysroot - enable_libtool_lock - enable_targets - enable_werror -@@ -1417,6 +1421,8 @@ Optional Packages: - --with-pic try to use only PIC/non-PIC objects [default=use - both] - --with-gnu-ld assume the C compiler uses GNU ld [default=no] -+ --with-libtool-sysroot=DIR Search for dependent libraries within DIR -+ (or the compiler's sysroot if not specified). - - Some influential environment variables: - CC C compiler command -@@ -5112,8 +5118,8 @@ esac - - - --macro_version='2.2.7a' --macro_revision='1.3134' -+macro_version='2.4' -+macro_revision='1.3293' - - - -@@ -5153,7 +5159,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 - $as_echo_n "checking how to print strings... " >&6; } - # Test print first, because it will be a builtin if present. --if test "X`print -r -- -n 2>/dev/null`" = X-n && \ -+if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ - test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then - ECHO='print -r --' - elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then -@@ -5839,8 +5845,8 @@ $as_echo_n "checking whether the shell u - # Try some XSI features - xsi_shell=no - ( _lt_dummy="a/b/c" -- test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ -- = c,a/b,, \ -+ test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ -+ = c,a/b,b/c, \ - && eval 'test $(( 1 + 1 )) -eq 2 \ - && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ - && xsi_shell=yes -@@ -5889,6 +5895,80 @@ esac - - - -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 -+$as_echo_n "checking how to convert $build file names to $host format... " >&6; } -+if test "${lt_cv_to_host_file_cmd+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ case $host in -+ *-*-mingw* ) -+ case $build in -+ *-*-mingw* ) # actually msys -+ lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 -+ ;; -+ *-*-cygwin* ) -+ lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 -+ ;; -+ * ) # otherwise, assume *nix -+ lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 -+ ;; -+ esac -+ ;; -+ *-*-cygwin* ) -+ case $build in -+ *-*-mingw* ) # actually msys -+ lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin -+ ;; -+ *-*-cygwin* ) -+ lt_cv_to_host_file_cmd=func_convert_file_noop -+ ;; -+ * ) # otherwise, assume *nix -+ lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin -+ ;; -+ esac -+ ;; -+ * ) # unhandled hosts (and "normal" native builds) -+ lt_cv_to_host_file_cmd=func_convert_file_noop -+ ;; -+esac -+ -+fi -+ -+to_host_file_cmd=$lt_cv_to_host_file_cmd -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 -+$as_echo "$lt_cv_to_host_file_cmd" >&6; } -+ -+ -+ -+ -+ -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 -+$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } -+if test "${lt_cv_to_tool_file_cmd+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ #assume ordinary cross tools, or native build. -+lt_cv_to_tool_file_cmd=func_convert_file_noop -+case $host in -+ *-*-mingw* ) -+ case $build in -+ *-*-mingw* ) # actually msys -+ lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 -+ ;; -+ esac -+ ;; -+esac -+ -+fi -+ -+to_tool_file_cmd=$lt_cv_to_tool_file_cmd -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 -+$as_echo "$lt_cv_to_tool_file_cmd" >&6; } -+ -+ -+ -+ -+ - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 - $as_echo_n "checking for $LD option to reload object files... " >&6; } - if test "${lt_cv_ld_reload_flag+set}" = set; then : -@@ -5905,6 +5985,11 @@ case $reload_flag in - esac - reload_cmds='$LD$reload_flag -o $output$reload_objs' - case $host_os in -+ cygwin* | mingw* | pw32* | cegcc*) -+ if test "$GCC" != yes; then -+ reload_cmds=false -+ fi -+ ;; - darwin*) - if test "$GCC" = yes; then - reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' -@@ -6073,7 +6158,8 @@ mingw* | pw32*) - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - else -- lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' -+ # Keep this pattern in sync with the one in func_win32_libid. -+ lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' - lt_cv_file_magic_cmd='$OBJDUMP -f' - fi - ;; -@@ -6227,6 +6313,21 @@ esac - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 - $as_echo "$lt_cv_deplibs_check_method" >&6; } -+ -+file_magic_glob= -+want_nocaseglob=no -+if test "$build" = "$host"; then -+ case $host_os in -+ mingw* | pw32*) -+ if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then -+ want_nocaseglob=yes -+ else -+ file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` -+ fi -+ ;; -+ esac -+fi -+ - file_magic_cmd=$lt_cv_file_magic_cmd - deplibs_check_method=$lt_cv_deplibs_check_method - test -z "$deplibs_check_method" && deplibs_check_method=unknown -@@ -6242,9 +6343,162 @@ test -z "$deplibs_check_method" && depli - - - -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ - if test -n "$ac_tool_prefix"; then -- # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. --set dummy ${ac_tool_prefix}ar; ac_word=$2 -+ # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. -+set dummy ${ac_tool_prefix}dlltool; ac_word=$2 -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -+$as_echo_n "checking for $ac_word... " >&6; } -+if test "${ac_cv_prog_DLLTOOL+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ if test -n "$DLLTOOL"; then -+ ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. -+else -+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -+ ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" -+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ break 2 -+ fi -+done -+ done -+IFS=$as_save_IFS -+ -+fi -+fi -+DLLTOOL=$ac_cv_prog_DLLTOOL -+if test -n "$DLLTOOL"; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 -+$as_echo "$DLLTOOL" >&6; } -+else -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } -+fi -+ -+ -+fi -+if test -z "$ac_cv_prog_DLLTOOL"; then -+ ac_ct_DLLTOOL=$DLLTOOL -+ # Extract the first word of "dlltool", so it can be a program name with args. -+set dummy dlltool; ac_word=$2 -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -+$as_echo_n "checking for $ac_word... " >&6; } -+if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ if test -n "$ac_ct_DLLTOOL"; then -+ ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. -+else -+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -+ ac_cv_prog_ac_ct_DLLTOOL="dlltool" -+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ break 2 -+ fi -+done -+ done -+IFS=$as_save_IFS -+ -+fi -+fi -+ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL -+if test -n "$ac_ct_DLLTOOL"; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 -+$as_echo "$ac_ct_DLLTOOL" >&6; } -+else -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } -+fi -+ -+ if test "x$ac_ct_DLLTOOL" = x; then -+ DLLTOOL="false" -+ else -+ case $cross_compiling:$ac_tool_warned in -+yes:) -+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -+ac_tool_warned=yes ;; -+esac -+ DLLTOOL=$ac_ct_DLLTOOL -+ fi -+else -+ DLLTOOL="$ac_cv_prog_DLLTOOL" -+fi -+ -+test -z "$DLLTOOL" && DLLTOOL=dlltool -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 -+$as_echo_n "checking how to associate runtime and link libraries... " >&6; } -+if test "${lt_cv_sharedlib_from_linklib_cmd+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ lt_cv_sharedlib_from_linklib_cmd='unknown' -+ -+case $host_os in -+cygwin* | mingw* | pw32* | cegcc*) -+ # two different shell functions defined in ltmain.sh -+ # decide which to use based on capabilities of $DLLTOOL -+ case `$DLLTOOL --help 2>&1` in -+ *--identify-strict*) -+ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib -+ ;; -+ *) -+ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback -+ ;; -+ esac -+ ;; -+*) -+ # fallback: assume linklib IS sharedlib -+ lt_cv_sharedlib_from_linklib_cmd="$ECHO" -+ ;; -+esac -+ -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 -+$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } -+sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd -+test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO -+ -+ -+ -+ -+ -+ -+ -+if test -n "$ac_tool_prefix"; then -+ for ac_prog in ar -+ do -+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -+set dummy $ac_tool_prefix$ac_prog; ac_word=$2 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 - $as_echo_n "checking for $ac_word... " >&6; } - if test "${ac_cv_prog_AR+set}" = set; then : -@@ -6260,7 +6514,7 @@ do - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -- ac_cv_prog_AR="${ac_tool_prefix}ar" -+ ac_cv_prog_AR="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -@@ -6280,11 +6534,15 @@ $as_echo "no" >&6; } - fi - - -+ test -n "$AR" && break -+ done - fi --if test -z "$ac_cv_prog_AR"; then -+if test -z "$AR"; then - ac_ct_AR=$AR -- # Extract the first word of "ar", so it can be a program name with args. --set dummy ar; ac_word=$2 -+ for ac_prog in ar -+do -+ # Extract the first word of "$ac_prog", so it can be a program name with args. -+set dummy $ac_prog; ac_word=$2 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 - $as_echo_n "checking for $ac_word... " >&6; } - if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : -@@ -6300,7 +6558,7 @@ do - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -- ac_cv_prog_ac_ct_AR="ar" -+ ac_cv_prog_ac_ct_AR="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -@@ -6319,6 +6577,10 @@ else - $as_echo "no" >&6; } - fi - -+ -+ test -n "$ac_ct_AR" && break -+done -+ - if test "x$ac_ct_AR" = x; then - AR="false" - else -@@ -6330,12 +6592,11 @@ ac_tool_warned=yes ;; - esac - AR=$ac_ct_AR - fi --else -- AR="$ac_cv_prog_AR" - fi - --test -z "$AR" && AR=ar --test -z "$AR_FLAGS" && AR_FLAGS=cru -+: ${AR=ar} -+: ${AR_FLAGS=cru} -+ - - - -@@ -6346,6 +6607,63 @@ test -z "$AR_FLAGS" && AR_FLAGS=cru - - - -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 -+$as_echo_n "checking for archiver @FILE support... " >&6; } -+if test "${lt_cv_ar_at_file+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ lt_cv_ar_at_file=no -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+ -+int -+main () -+{ -+ -+ ; -+ return 0; -+} -+_ACEOF -+if ac_fn_c_try_compile "$LINENO"; then : -+ echo conftest.$ac_objext > conftest.lst -+ lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' -+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 -+ (eval $lt_ar_try) 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -+ test $ac_status = 0; } -+ if test "$ac_status" -eq 0; then -+ # Ensure the archiver fails upon bogus file names. -+ rm -f conftest.$ac_objext libconftest.a -+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 -+ (eval $lt_ar_try) 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -+ test $ac_status = 0; } -+ if test "$ac_status" -ne 0; then -+ lt_cv_ar_at_file=@ -+ fi -+ fi -+ rm -f conftest.* libconftest.a -+ -+fi -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+ -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 -+$as_echo "$lt_cv_ar_at_file" >&6; } -+ -+if test "x$lt_cv_ar_at_file" = xno; then -+ archiver_list_spec= -+else -+ archiver_list_spec=$lt_cv_ar_at_file -+fi -+ -+ -+ -+ -+ -+ - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. -@@ -6681,8 +6999,8 @@ esac - lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" - - # Transform an extracted symbol line into symbol name and symbol address --lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" --lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" -+lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" -+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" - - # Handle CRLF in mingw tool chain - opt_cr= -@@ -6718,6 +7036,7 @@ for ac_symprfx in "" "_"; do - else - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" - fi -+ lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" - - # Check to see that the pipe works correctly. - pipe_works=no -@@ -6759,6 +7078,18 @@ _LT_EOF - if $GREP ' nm_test_var$' "$nlist" >/dev/null; then - if $GREP ' nm_test_func$' "$nlist" >/dev/null; then - cat <<_LT_EOF > conftest.$ac_ext -+/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ -+#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) -+/* DATA imports from DLLs on WIN32 con't be const, because runtime -+ relocations are performed -- see ld's documentation on pseudo-relocs. */ -+# define LT_DLSYM_CONST -+#elif defined(__osf__) -+/* This system does not cope well with relocations in const data. */ -+# define LT_DLSYM_CONST -+#else -+# define LT_DLSYM_CONST const -+#endif -+ - #ifdef __cplusplus - extern "C" { - #endif -@@ -6770,7 +7101,7 @@ _LT_EOF - cat <<_LT_EOF >> conftest.$ac_ext - - /* The mapping between symbol names and symbols. */ --const struct { -+LT_DLSYM_CONST struct { - const char *name; - void *address; - } -@@ -6796,8 +7127,8 @@ static const void *lt_preloaded_setup() - _LT_EOF - # Now try linking the two files. - mv conftest.$ac_objext conftstm.$ac_objext -- lt_save_LIBS="$LIBS" -- lt_save_CFLAGS="$CFLAGS" -+ lt_globsym_save_LIBS=$LIBS -+ lt_globsym_save_CFLAGS=$CFLAGS - LIBS="conftstm.$ac_objext" - CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 -@@ -6807,8 +7138,8 @@ _LT_EOF - test $ac_status = 0; } && test -s conftest${ac_exeext}; then - pipe_works=yes - fi -- LIBS="$lt_save_LIBS" -- CFLAGS="$lt_save_CFLAGS" -+ LIBS=$lt_globsym_save_LIBS -+ CFLAGS=$lt_globsym_save_CFLAGS - else - echo "cannot find nm_test_func in $nlist" >&5 - fi -@@ -6845,6 +7176,14 @@ else - $as_echo "ok" >&6; } - fi - -+# Response file support. -+if test "$lt_cv_nm_interface" = "MS dumpbin"; then -+ nm_file_list_spec='@' -+elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then -+ nm_file_list_spec='@' -+fi -+ -+ - - - -@@ -6866,6 +7205,47 @@ fi - - - -+ -+ -+ -+ -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 -+$as_echo_n "checking for sysroot... " >&6; } -+ -+# Check whether --with-libtool-sysroot was given. -+if test "${with_libtool_sysroot+set}" = set; then : -+ withval=$with_libtool_sysroot; -+else -+ with_libtool_sysroot=no -+fi -+ -+ -+lt_sysroot= -+case ${with_libtool_sysroot} in #( -+ yes) -+ if test "$GCC" = yes; then -+ lt_sysroot=`$CC --print-sysroot 2>/dev/null` -+ fi -+ ;; #( -+ /*) -+ lt_sysroot=`echo "$with_libtool_sysroot" | sed -e "$sed_quote_subst"` -+ ;; #( -+ no|'') -+ ;; #( -+ *) -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libtool_sysroot}" >&5 -+$as_echo "${with_libtool_sysroot}" >&6; } -+ as_fn_error "The sysroot must be an absolute path." "$LINENO" 5 -+ ;; -+esac -+ -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 -+$as_echo "${lt_sysroot:-no}" >&6; } -+ -+ -+ -+ -+ - # Check whether --enable-libtool-lock was given. - if test "${enable_libtool_lock+set}" = set; then : - enableval=$enable_libtool_lock; -@@ -7059,6 +7439,123 @@ esac - - need_locks="$enable_libtool_lock" - -+if test -n "$ac_tool_prefix"; then -+ # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. -+set dummy ${ac_tool_prefix}mt; ac_word=$2 -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -+$as_echo_n "checking for $ac_word... " >&6; } -+if test "${ac_cv_prog_MANIFEST_TOOL+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ if test -n "$MANIFEST_TOOL"; then -+ ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. -+else -+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -+ ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" -+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ break 2 -+ fi -+done -+ done -+IFS=$as_save_IFS -+ -+fi -+fi -+MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL -+if test -n "$MANIFEST_TOOL"; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 -+$as_echo "$MANIFEST_TOOL" >&6; } -+else -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } -+fi -+ -+ -+fi -+if test -z "$ac_cv_prog_MANIFEST_TOOL"; then -+ ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL -+ # Extract the first word of "mt", so it can be a program name with args. -+set dummy mt; ac_word=$2 -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -+$as_echo_n "checking for $ac_word... " >&6; } -+if test "${ac_cv_prog_ac_ct_MANIFEST_TOOL+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ if test -n "$ac_ct_MANIFEST_TOOL"; then -+ ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. -+else -+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -+ ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" -+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ break 2 -+ fi -+done -+ done -+IFS=$as_save_IFS -+ -+fi -+fi -+ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL -+if test -n "$ac_ct_MANIFEST_TOOL"; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 -+$as_echo "$ac_ct_MANIFEST_TOOL" >&6; } -+else -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } -+fi -+ -+ if test "x$ac_ct_MANIFEST_TOOL" = x; then -+ MANIFEST_TOOL=":" -+ else -+ case $cross_compiling:$ac_tool_warned in -+yes:) -+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -+ac_tool_warned=yes ;; -+esac -+ MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL -+ fi -+else -+ MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" -+fi -+ -+test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 -+$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } -+if test "${lt_cv_path_mainfest_tool+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ lt_cv_path_mainfest_tool=no -+ echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 -+ $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out -+ cat conftest.err >&5 -+ if $GREP 'Manifest Tool' conftest.out > /dev/null; then -+ lt_cv_path_mainfest_tool=yes -+ fi -+ rm -f conftest* -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 -+$as_echo "$lt_cv_path_mainfest_tool" >&6; } -+if test "x$lt_cv_path_mainfest_tool" != xyes; then -+ MANIFEST_TOOL=: -+fi -+ -+ -+ -+ -+ - - case $host_os in - rhapsody* | darwin*) -@@ -7622,6 +8119,8 @@ _LT_EOF - $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 - echo "$AR cru libconftest.a conftest.o" >&5 - $AR cru libconftest.a conftest.o 2>&5 -+ echo "$RANLIB libconftest.a" >&5 -+ $RANLIB libconftest.a 2>&5 - cat > conftest.c << _LT_EOF - int main() { return 0;} - _LT_EOF -@@ -7787,7 +8286,8 @@ fi - LIBTOOL_DEPS="$ltmain" - - # Always use our own libtool. --LIBTOOL='$(SHELL) $(top_builddir)/libtool' -+LIBTOOL='$(SHELL) $(top_builddir)' -+LIBTOOL="$LIBTOOL/${host_alias}-libtool" - - - -@@ -7876,7 +8376,7 @@ aix3*) - esac - - # Global variables: --ofile=libtool -+ofile=${host_alias}-libtool - can_build_shared=yes - - # All known linkers require a `.a' archive for static linking (except MSVC, -@@ -8174,8 +8674,6 @@ fi - lt_prog_compiler_pic= - lt_prog_compiler_static= - --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 --$as_echo_n "checking for $compiler option to produce PIC... " >&6; } - - if test "$GCC" = yes; then - lt_prog_compiler_wl='-Wl,' -@@ -8340,6 +8838,12 @@ $as_echo_n "checking for $compiler optio - lt_prog_compiler_pic='--shared' - lt_prog_compiler_static='--static' - ;; -+ nagfor*) -+ # NAG Fortran compiler -+ lt_prog_compiler_wl='-Wl,-Wl,,' -+ lt_prog_compiler_pic='-PIC' -+ lt_prog_compiler_static='-Bstatic' -+ ;; - pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) -@@ -8402,7 +8906,7 @@ $as_echo_n "checking for $compiler optio - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - case $cc_basename in -- f77* | f90* | f95*) -+ f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) - lt_prog_compiler_wl='-Qoption ld ';; - *) - lt_prog_compiler_wl='-Wl,';; -@@ -8459,13 +8963,17 @@ case $host_os in - lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" - ;; - esac --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5 --$as_echo "$lt_prog_compiler_pic" >&6; } -- -- -- -- - -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -+$as_echo_n "checking for $compiler option to produce PIC... " >&6; } -+if test "${lt_cv_prog_compiler_pic+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ lt_cv_prog_compiler_pic=$lt_prog_compiler_pic -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 -+$as_echo "$lt_cv_prog_compiler_pic" >&6; } -+lt_prog_compiler_pic=$lt_cv_prog_compiler_pic - - # - # Check to make sure the PIC flag actually works. -@@ -8526,6 +9034,11 @@ fi - - - -+ -+ -+ -+ -+ - # - # Check to make sure the static flag actually works. - # -@@ -8876,7 +9389,8 @@ _LT_EOF - allow_undefined_flag=unsupported - always_export_symbols=no - enable_shared_with_static_runtimes=yes -- export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' -+ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' -+ exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' -@@ -8924,7 +9438,7 @@ _LT_EOF - if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ - && test "$tmp_diet" = no - then -- tmp_addflag= -+ tmp_addflag=' $pic_flag' - tmp_sharedflag='-shared' - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler -@@ -8975,12 +9489,12 @@ _LT_EOF - whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' - hardcode_libdir_flag_spec= - hardcode_libdir_flag_spec_ld='-rpath $libdir' -- archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' -+ archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then - archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ -- $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' -+ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' - fi - ;; - esac -@@ -8994,8 +9508,8 @@ _LT_EOF - archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else -- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' -+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - -@@ -9013,8 +9527,8 @@ _LT_EOF - - _LT_EOF - elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then -- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' -+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi -@@ -9060,8 +9574,8 @@ _LT_EOF - - *) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then -- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' -+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi -@@ -9191,7 +9705,13 @@ _LT_EOF - allow_undefined_flag='-berok' - # Determine the default libpath from the value encoded in an - # empty executable. -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+ if test "${lt_cv_aix_libpath+set}" = set; then -+ aix_libpath=$lt_cv_aix_libpath -+else -+ if test "${lt_cv_aix_libpath_+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - - int -@@ -9204,22 +9724,29 @@ main () - _ACEOF - if ac_fn_c_try_link "$LINENO"; then : - --lt_aix_libpath_sed=' -- /Import File Strings/,/^$/ { -- /^0/ { -- s/^0 *\(.*\)$/\1/ -- p -- } -- }' --aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` --# Check for a 64-bit object if we didn't find anything. --if test -z "$aix_libpath"; then -- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` --fi -+ lt_aix_libpath_sed=' -+ /Import File Strings/,/^$/ { -+ /^0/ { -+ s/^0 *\([^ ]*\) *$/\1/ -+ p -+ } -+ }' -+ lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -+ # Check for a 64-bit object if we didn't find anything. -+ if test -z "$lt_cv_aix_libpath_"; then -+ lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -+ fi - fi - rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext --if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi -+ if test -z "$lt_cv_aix_libpath_"; then -+ lt_cv_aix_libpath_="/usr/lib:/lib" -+ fi -+ -+fi -+ -+ aix_libpath=$lt_cv_aix_libpath_ -+fi - - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" -@@ -9231,7 +9758,13 @@ if test -z "$aix_libpath"; then aix_libp - else - # Determine the default libpath from the value encoded in an - # empty executable. -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+ if test "${lt_cv_aix_libpath+set}" = set; then -+ aix_libpath=$lt_cv_aix_libpath -+else -+ if test "${lt_cv_aix_libpath_+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - - int -@@ -9244,22 +9777,29 @@ main () - _ACEOF - if ac_fn_c_try_link "$LINENO"; then : - --lt_aix_libpath_sed=' -- /Import File Strings/,/^$/ { -- /^0/ { -- s/^0 *\(.*\)$/\1/ -- p -- } -- }' --aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` --# Check for a 64-bit object if we didn't find anything. --if test -z "$aix_libpath"; then -- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` --fi -+ lt_aix_libpath_sed=' -+ /Import File Strings/,/^$/ { -+ /^0/ { -+ s/^0 *\([^ ]*\) *$/\1/ -+ p -+ } -+ }' -+ lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -+ # Check for a 64-bit object if we didn't find anything. -+ if test -z "$lt_cv_aix_libpath_"; then -+ lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -+ fi - fi - rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext --if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi -+ if test -z "$lt_cv_aix_libpath_"; then -+ lt_cv_aix_libpath_="/usr/lib:/lib" -+ fi -+ -+fi -+ -+ aix_libpath=$lt_cv_aix_libpath_ -+fi - - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, -@@ -9304,20 +9844,63 @@ if test -z "$aix_libpath"; then aix_libp - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. -- hardcode_libdir_flag_spec=' ' -- allow_undefined_flag=unsupported -- # Tell ltmain to make .lib files, not .a files. -- libext=lib -- # Tell ltmain to make .dll files, not .so files. -- shrext_cmds=".dll" -- # FIXME: Setting linknames here is a bad hack. -- archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' -- # The linker will automatically build a .lib file if we build a DLL. -- old_archive_from_new_cmds='true' -- # FIXME: Should let the user specify the lib program. -- old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' -- fix_srcfile_path='`cygpath -w "$srcfile"`' -- enable_shared_with_static_runtimes=yes -+ case $cc_basename in -+ cl*) -+ # Native MSVC -+ hardcode_libdir_flag_spec=' ' -+ allow_undefined_flag=unsupported -+ always_export_symbols=yes -+ file_list_spec='@' -+ # Tell ltmain to make .lib files, not .a files. -+ libext=lib -+ # Tell ltmain to make .dll files, not .so files. -+ shrext_cmds=".dll" -+ # FIXME: Setting linknames here is a bad hack. -+ archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' -+ archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then -+ sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; -+ else -+ sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; -+ fi~ -+ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ -+ linknames=' -+ # The linker will not automatically build a static lib if we build a DLL. -+ # _LT_TAGVAR(old_archive_from_new_cmds, )='true' -+ enable_shared_with_static_runtimes=yes -+ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' -+ # Don't use ranlib -+ old_postinstall_cmds='chmod 644 $oldlib' -+ postlink_cmds='lt_outputfile="@OUTPUT@"~ -+ lt_tool_outputfile="@TOOL_OUTPUT@"~ -+ case $lt_outputfile in -+ *.exe|*.EXE) ;; -+ *) -+ lt_outputfile="$lt_outputfile.exe" -+ lt_tool_outputfile="$lt_tool_outputfile.exe" -+ ;; -+ esac~ -+ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then -+ $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; -+ $RM "$lt_outputfile.manifest"; -+ fi' -+ ;; -+ *) -+ # Assume MSVC wrapper -+ hardcode_libdir_flag_spec=' ' -+ allow_undefined_flag=unsupported -+ # Tell ltmain to make .lib files, not .a files. -+ libext=lib -+ # Tell ltmain to make .dll files, not .so files. -+ shrext_cmds=".dll" -+ # FIXME: Setting linknames here is a bad hack. -+ archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' -+ # The linker will automatically build a .lib file if we build a DLL. -+ old_archive_from_new_cmds='true' -+ # FIXME: Should let the user specify the lib program. -+ old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' -+ enable_shared_with_static_runtimes=yes -+ ;; -+ esac - ;; - - darwin* | rhapsody*) -@@ -9382,7 +9965,7 @@ if test -z "$aix_libpath"; then aix_libp - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) -- archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' -+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no -@@ -9390,7 +9973,7 @@ if test -z "$aix_libpath"; then aix_libp - - hpux9*) - if test "$GCC" = yes; then -- archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' -+ archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - fi -@@ -9406,7 +9989,7 @@ if test -z "$aix_libpath"; then aix_libp - - hpux10*) - if test "$GCC" = yes && test "$with_gnu_ld" = no; then -- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' -+ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi -@@ -9430,10 +10013,10 @@ if test -z "$aix_libpath"; then aix_libp - archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) -- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' -+ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) -- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' -+ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else -@@ -9512,23 +10095,36 @@ fi - - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then -- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' -+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - # Try to use the -exported_symbol ld option, if it does not - # work, assume that -exports_file does not work either and - # implicitly export all symbols. -- save_LDFLAGS="$LDFLAGS" -- LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+ # This should be the same for all languages, so no per-tag cache variable. -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 -+$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } -+if test "${lt_cv_irix_exported_symbol+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ save_LDFLAGS="$LDFLAGS" -+ LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ --int foo(void) {} -+int foo (void) { return 0; } - _ACEOF - if ac_fn_c_try_link "$LINENO"; then : -- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' -- -+ lt_cv_irix_exported_symbol=yes -+else -+ lt_cv_irix_exported_symbol=no - fi - rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -- LDFLAGS="$save_LDFLAGS" -+ LDFLAGS="$save_LDFLAGS" -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 -+$as_echo "$lt_cv_irix_exported_symbol" >&6; } -+ if test "$lt_cv_irix_exported_symbol" = yes; then -+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' -+ fi - else - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' -@@ -9613,7 +10209,7 @@ rm -f core conftest.err conftest.$ac_obj - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' -- archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' -+ archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - else - allow_undefined_flag=' -expect_unresolved \*' -@@ -9632,9 +10228,9 @@ rm -f core conftest.err conftest.$ac_obj - no_undefined_flag=' -z defs' - if test "$GCC" = yes; then - wlarc='${wl}' -- archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' -+ archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ -- $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' -+ $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - else - case `$CC -V 2>&1` in - *"Compilers 5.0"*) -@@ -10210,8 +10806,9 @@ cygwin* | mingw* | pw32* | cegcc*) - need_version=no - need_lib_prefix=no - -- case $GCC,$host_os in -- yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) -+ case $GCC,$cc_basename in -+ yes,*) -+ # gcc - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ -@@ -10244,13 +10841,71 @@ cygwin* | mingw* | pw32* | cegcc*) - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - ;; - esac -+ dynamic_linker='Win32 ld.exe' -+ ;; -+ -+ *,cl*) -+ # Native MSVC -+ libname_spec='$name' -+ soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' -+ library_names_spec='${libname}.dll.lib' -+ -+ case $build_os in -+ mingw*) -+ sys_lib_search_path_spec= -+ lt_save_ifs=$IFS -+ IFS=';' -+ for lt_path in $LIB -+ do -+ IFS=$lt_save_ifs -+ # Let DOS variable expansion print the short 8.3 style file name. -+ lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` -+ sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" -+ done -+ IFS=$lt_save_ifs -+ # Convert to MSYS style. -+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` -+ ;; -+ cygwin*) -+ # Convert to unix form, then to dos form, then back to unix form -+ # but this time dos style (no spaces!) so that the unix form looks -+ # like /cygdrive/c/PROGRA~1:/cygdr... -+ sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` -+ sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` -+ sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` -+ ;; -+ *) -+ sys_lib_search_path_spec="$LIB" -+ if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then -+ # It is most probably a Windows format PATH. -+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` -+ else -+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` -+ fi -+ # FIXME: find the short name or the path components, as spaces are -+ # common. (e.g. "Program Files" -> "PROGRA~1") -+ ;; -+ esac -+ -+ # DLL is installed to $(libdir)/../bin by postinstall_cmds -+ postinstall_cmds='base_file=`basename \${file}`~ -+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ -+ dldir=$destdir/`dirname \$dlpath`~ -+ test -d \$dldir || mkdir -p \$dldir~ -+ $install_prog $dir/$dlname \$dldir/$dlname' -+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ -+ dlpath=$dir/\$dldll~ -+ $RM \$dlpath' -+ shlibpath_overrides_runpath=yes -+ dynamic_linker='Win32 link.exe' - ;; - - *) -+ # Assume MSVC wrapper - library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' -+ dynamic_linker='Win32 ld.exe' - ;; - esac -- dynamic_linker='Win32 ld.exe' - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; -@@ -10346,7 +11001,7 @@ haiku*) - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LIBRARY_PATH - shlibpath_overrides_runpath=yes -- sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib' -+ sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' - hardcode_into_libs=yes - ;; - -@@ -11142,7 +11797,7 @@ else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF --#line 11145 "configure" -+#line $LINENO "configure" - #include "confdefs.h" - - #if HAVE_DLFCN_H -@@ -11186,10 +11841,10 @@ else - /* When -fvisbility=hidden is used, assume the code has been annotated - correspondingly for the symbols needed. */ - #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) --void fnord () __attribute__((visibility("default"))); -+int fnord () __attribute__((visibility("default"))); - #endif - --void fnord () { int i=42; } -+int fnord () { return 42; } - int main () - { - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); -@@ -11248,7 +11903,7 @@ else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF --#line 11251 "configure" -+#line $LINENO "configure" - #include "confdefs.h" - - #if HAVE_DLFCN_H -@@ -11292,10 +11947,10 @@ else - /* When -fvisbility=hidden is used, assume the code has been annotated - correspondingly for the symbols needed. */ - #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) --void fnord () __attribute__((visibility("default"))); -+int fnord () __attribute__((visibility("default"))); - #endif - --void fnord () { int i=42; } -+int fnord () { return 42; } - int main () - { - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); -@@ -12328,7 +12983,7 @@ if test "$enable_shared" = "yes"; then - # since libbfd may not pull in the entirety of libiberty. - x=`sed -n -e 's/^[ ]*PICFLAG[ ]*=[ ]*//p' < ../libiberty/Makefile | sed -n '$p'` - if test -n "$x"; then -- SHARED_LIBADD="-L`pwd`/../libiberty/pic -liberty" -+ SHARED_LIBADD="`pwd`/../libiberty/pic/libiberty.a" - fi - - case "${host}" in -@@ -13289,13 +13944,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_ - lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' - lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' - lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' -+lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' -+lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' - reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' - reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' - OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' - deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' - file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' -+file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' -+want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' -+DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' -+sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' - AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' - AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' -+archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' - STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' - RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' - old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' -@@ -13310,14 +13972,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$l - lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' - lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' - lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' -+nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' -+lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' - objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' - MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' - lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' --lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' - lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' -+lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' - lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' - lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' - need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' -+MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' - DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' - NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' - LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' -@@ -13350,12 +14015,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcod - hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' - inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' - link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' --fix_srcfile_path='`$ECHO "$fix_srcfile_path" | $SED "$delay_single_quote_subst"`' - always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' - export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' - exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' - include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' - prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' -+postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' - file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' - variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' - need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' -@@ -13410,8 +14075,13 @@ reload_flag \ - OBJDUMP \ - deplibs_check_method \ - file_magic_cmd \ -+file_magic_glob \ -+want_nocaseglob \ -+DLLTOOL \ -+sharedlib_from_linklib_cmd \ - AR \ - AR_FLAGS \ -+archiver_list_spec \ - STRIP \ - RANLIB \ - CC \ -@@ -13421,12 +14091,14 @@ lt_cv_sys_global_symbol_pipe \ - lt_cv_sys_global_symbol_to_cdecl \ - lt_cv_sys_global_symbol_to_c_name_address \ - lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ -+nm_file_list_spec \ - lt_prog_compiler_no_builtin_flag \ --lt_prog_compiler_wl \ - lt_prog_compiler_pic \ -+lt_prog_compiler_wl \ - lt_prog_compiler_static \ - lt_cv_prog_compiler_c_o \ - need_locks \ -+MANIFEST_TOOL \ - DSYMUTIL \ - NMEDIT \ - LIPO \ -@@ -13442,7 +14114,6 @@ no_undefined_flag \ - hardcode_libdir_flag_spec \ - hardcode_libdir_flag_spec_ld \ - hardcode_libdir_separator \ --fix_srcfile_path \ - exclude_expsyms \ - include_expsyms \ - file_list_spec \ -@@ -13478,6 +14149,7 @@ module_cmds \ - module_expsym_cmds \ - export_symbols_cmds \ - prelink_cmds \ -+postlink_cmds \ - postinstall_cmds \ - postuninstall_cmds \ - finish_cmds \ -@@ -14234,7 +14906,8 @@ $as_echo X"$file" | - # NOTE: Changes made to this file will be lost: look at ltmain.sh. - # - # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, --# 2006, 2007, 2008, 2009 Free Software Foundation, Inc. -+# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, -+# Inc. - # Written by Gordon Matzigkeit, 1996 - # - # This file is part of GNU Libtool. -@@ -14337,19 +15010,42 @@ SP2NL=$lt_lt_SP2NL - # turn newlines into spaces. - NL2SP=$lt_lt_NL2SP - -+# convert \$build file names to \$host format. -+to_host_file_cmd=$lt_cv_to_host_file_cmd -+ -+# convert \$build files to toolchain format. -+to_tool_file_cmd=$lt_cv_to_tool_file_cmd -+ - # An object symbol dumper. - OBJDUMP=$lt_OBJDUMP - - # Method to check whether dependent libraries are shared objects. - deplibs_check_method=$lt_deplibs_check_method - --# Command to use when deplibs_check_method == "file_magic". -+# Command to use when deplibs_check_method = "file_magic". - file_magic_cmd=$lt_file_magic_cmd - -+# How to find potential files when deplibs_check_method = "file_magic". -+file_magic_glob=$lt_file_magic_glob -+ -+# Find potential files using nocaseglob when deplibs_check_method = "file_magic". -+want_nocaseglob=$lt_want_nocaseglob -+ -+# DLL creation program. -+DLLTOOL=$lt_DLLTOOL -+ -+# Command to associate shared and link libraries. -+sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd -+ - # The archiver. - AR=$lt_AR -+ -+# Flags to create an archive. - AR_FLAGS=$lt_AR_FLAGS - -+# How to feed a file listing to the archiver. -+archiver_list_spec=$lt_archiver_list_spec -+ - # A symbol stripping program. - STRIP=$lt_STRIP - -@@ -14379,6 +15075,12 @@ global_symbol_to_c_name_address=$lt_lt_c - # Transform the output of nm in a C name address pair when lib prefix is needed. - global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix - -+# Specify filename containing input files for \$NM. -+nm_file_list_spec=$lt_nm_file_list_spec -+ -+# The root where to search for dependent libraries,and in which our libraries should be installed. -+lt_sysroot=$lt_sysroot -+ - # The name of the directory that contains temporary libtool files. - objdir=$objdir - -@@ -14388,6 +15090,9 @@ MAGIC_CMD=$MAGIC_CMD - # Must we lock files when doing compilation? - need_locks=$lt_need_locks - -+# Manifest tool. -+MANIFEST_TOOL=$lt_MANIFEST_TOOL -+ - # Tool to manipulate archived DWARF debug symbol files on Mac OS X. - DSYMUTIL=$lt_DSYMUTIL - -@@ -14502,12 +15207,12 @@ with_gcc=$GCC - # Compiler flag to turn off builtin functions. - no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag - --# How to pass a linker flag through the compiler. --wl=$lt_lt_prog_compiler_wl -- - # Additional compiler flags for building library objects. - pic_flag=$lt_lt_prog_compiler_pic - -+# How to pass a linker flag through the compiler. -+wl=$lt_lt_prog_compiler_wl -+ - # Compiler flag to prevent dynamic linking. - link_static_flag=$lt_lt_prog_compiler_static - -@@ -14594,9 +15299,6 @@ inherit_rpath=$inherit_rpath - # Whether libtool must link a program against all its dependency libraries. - link_all_deplibs=$link_all_deplibs - --# Fix the shell variable \$srcfile for the compiler. --fix_srcfile_path=$lt_fix_srcfile_path -- - # Set to "yes" if exported symbols are required. - always_export_symbols=$always_export_symbols - -@@ -14612,6 +15314,9 @@ include_expsyms=$lt_include_expsyms - # Commands necessary for linking programs (against libraries) with templates. - prelink_cmds=$lt_prelink_cmds - -+# Commands necessary for finishing linking programs. -+postlink_cmds=$lt_postlink_cmds -+ - # Specify filename containing input files. - file_list_spec=$lt_file_list_spec - -@@ -14644,210 +15349,169 @@ ltmain="$ac_aux_dir/ltmain.sh" - # if finds mixed CR/LF and LF-only lines. Since sed operates in - # text mode, it properly converts lines to CR/LF. This bash problem - # is reportedly fixed, but why not run on old versions too? -- sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ -- || (rm -f "$cfgfile"; exit 1) -- -- case $xsi_shell in -- yes) -- cat << \_LT_EOF >> "$cfgfile" -- --# func_dirname file append nondir_replacement --# Compute the dirname of FILE. If nonempty, add APPEND to the result, --# otherwise set result to NONDIR_REPLACEMENT. --func_dirname () --{ -- case ${1} in -- */*) func_dirname_result="${1%/*}${2}" ;; -- * ) func_dirname_result="${3}" ;; -- esac --} -- --# func_basename file --func_basename () --{ -- func_basename_result="${1##*/}" --} -- --# func_dirname_and_basename file append nondir_replacement --# perform func_basename and func_dirname in a single function --# call: --# dirname: Compute the dirname of FILE. If nonempty, --# add APPEND to the result, otherwise set result --# to NONDIR_REPLACEMENT. --# value returned in "$func_dirname_result" --# basename: Compute filename of FILE. --# value retuned in "$func_basename_result" --# Implementation must be kept synchronized with func_dirname --# and func_basename. For efficiency, we do not delegate to --# those functions but instead duplicate the functionality here. --func_dirname_and_basename () --{ -- case ${1} in -- */*) func_dirname_result="${1%/*}${2}" ;; -- * ) func_dirname_result="${3}" ;; -- esac -- func_basename_result="${1##*/}" --} -- --# func_stripname prefix suffix name --# strip PREFIX and SUFFIX off of NAME. --# PREFIX and SUFFIX must not contain globbing or regex special --# characters, hashes, percent signs, but SUFFIX may contain a leading --# dot (in which case that matches only a dot). --func_stripname () --{ -- # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are -- # positional parameters, so assign one to ordinary parameter first. -- func_stripname_result=${3} -- func_stripname_result=${func_stripname_result#"${1}"} -- func_stripname_result=${func_stripname_result%"${2}"} --} -- --# func_opt_split --func_opt_split () --{ -- func_opt_split_opt=${1%%=*} -- func_opt_split_arg=${1#*=} --} -- --# func_lo2o object --func_lo2o () --{ -- case ${1} in -- *.lo) func_lo2o_result=${1%.lo}.${objext} ;; -- *) func_lo2o_result=${1} ;; -- esac --} -- --# func_xform libobj-or-source --func_xform () --{ -- func_xform_result=${1%.*}.lo --} -- --# func_arith arithmetic-term... --func_arith () --{ -- func_arith_result=$(( $* )) --} -- --# func_len string --# STRING may not start with a hyphen. --func_len () --{ -- func_len_result=${#1} --} -- --_LT_EOF -- ;; -- *) # Bourne compatible functions. -- cat << \_LT_EOF >> "$cfgfile" -- --# func_dirname file append nondir_replacement --# Compute the dirname of FILE. If nonempty, add APPEND to the result, --# otherwise set result to NONDIR_REPLACEMENT. --func_dirname () --{ -- # Extract subdirectory from the argument. -- func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` -- if test "X$func_dirname_result" = "X${1}"; then -- func_dirname_result="${3}" -- else -- func_dirname_result="$func_dirname_result${2}" -- fi --} -- --# func_basename file --func_basename () --{ -- func_basename_result=`$ECHO "${1}" | $SED "$basename"` --} -- -- --# func_stripname prefix suffix name --# strip PREFIX and SUFFIX off of NAME. --# PREFIX and SUFFIX must not contain globbing or regex special --# characters, hashes, percent signs, but SUFFIX may contain a leading --# dot (in which case that matches only a dot). --# func_strip_suffix prefix name --func_stripname () --{ -- case ${2} in -- .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; -- *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; -- esac --} -- --# sed scripts: --my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q' --my_sed_long_arg='1s/^-[^=]*=//' -- --# func_opt_split --func_opt_split () --{ -- func_opt_split_opt=`$ECHO "${1}" | $SED "$my_sed_long_opt"` -- func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"` --} -- --# func_lo2o object --func_lo2o () --{ -- func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` --} -- --# func_xform libobj-or-source --func_xform () --{ -- func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` --} -- --# func_arith arithmetic-term... --func_arith () --{ -- func_arith_result=`expr "$@"` --} -- --# func_len string --# STRING may not start with a hyphen. --func_len () --{ -- func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` --} -- --_LT_EOF --esac -- --case $lt_shell_append in -- yes) -- cat << \_LT_EOF >> "$cfgfile" -- --# func_append var value --# Append VALUE to the end of shell variable VAR. --func_append () --{ -- eval "$1+=\$2" --} --_LT_EOF -- ;; -- *) -- cat << \_LT_EOF >> "$cfgfile" -- --# func_append var value --# Append VALUE to the end of shell variable VAR. --func_append () --{ -- eval "$1=\$$1\$2" --} -- --_LT_EOF -- ;; -- esac -+ sed '$q' "$ltmain" >> "$cfgfile" \ -+ || (rm -f "$cfgfile"; exit 1) - -+ if test x"$xsi_shell" = xyes; then -+ sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ -+func_dirname ()\ -+{\ -+\ case ${1} in\ -+\ */*) func_dirname_result="${1%/*}${2}" ;;\ -+\ * ) func_dirname_result="${3}" ;;\ -+\ esac\ -+} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_basename ()$/,/^} # func_basename /c\ -+func_basename ()\ -+{\ -+\ func_basename_result="${1##*/}"\ -+} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ -+func_dirname_and_basename ()\ -+{\ -+\ case ${1} in\ -+\ */*) func_dirname_result="${1%/*}${2}" ;;\ -+\ * ) func_dirname_result="${3}" ;;\ -+\ esac\ -+\ func_basename_result="${1##*/}"\ -+} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ -+func_stripname ()\ -+{\ -+\ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ -+\ # positional parameters, so assign one to ordinary parameter first.\ -+\ func_stripname_result=${3}\ -+\ func_stripname_result=${func_stripname_result#"${1}"}\ -+\ func_stripname_result=${func_stripname_result%"${2}"}\ -+} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ -+func_split_long_opt ()\ -+{\ -+\ func_split_long_opt_name=${1%%=*}\ -+\ func_split_long_opt_arg=${1#*=}\ -+} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ -+func_split_short_opt ()\ -+{\ -+\ func_split_short_opt_arg=${1#??}\ -+\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ -+} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ -+func_lo2o ()\ -+{\ -+\ case ${1} in\ -+\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ -+\ *) func_lo2o_result=${1} ;;\ -+\ esac\ -+} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_xform ()$/,/^} # func_xform /c\ -+func_xform ()\ -+{\ -+ func_xform_result=${1%.*}.lo\ -+} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_arith ()$/,/^} # func_arith /c\ -+func_arith ()\ -+{\ -+ func_arith_result=$(( $* ))\ -+} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_len ()$/,/^} # func_len /c\ -+func_len ()\ -+{\ -+ func_len_result=${#1}\ -+} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+fi -+ -+if test x"$lt_shell_append" = xyes; then -+ sed -e '/^func_append ()$/,/^} # func_append /c\ -+func_append ()\ -+{\ -+ eval "${1}+=\\${2}"\ -+} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ -+func_append_quoted ()\ -+{\ -+\ func_quote_for_eval "${2}"\ -+\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ -+} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ # Save a `func_append' function call where possible by direct use of '+=' -+ sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+ test 0 -eq $? || _lt_function_replace_fail=: -+else -+ # Save a `func_append' function call even when '+=' is not available -+ sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+ test 0 -eq $? || _lt_function_replace_fail=: -+fi -+ -+if test x"$_lt_function_replace_fail" = x":"; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 -+$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} -+fi - -- sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ -- || (rm -f "$cfgfile"; exit 1) - -- mv -f "$cfgfile" "$ofile" || -+ mv -f "$cfgfile" "$ofile" || - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" - -Index: binutils-2.21.1/binutils/configure -=================================================================== ---- binutils-2.21.1.orig/binutils/configure -+++ binutils-2.21.1/binutils/configure -@@ -654,8 +654,11 @@ OTOOL - LIPO - NMEDIT - DSYMUTIL -+MANIFEST_TOOL - RANLIB -+ac_ct_AR - AR -+DLLTOOL - OBJDUMP - LN_S - NM -@@ -768,6 +771,7 @@ enable_static - with_pic - enable_fast_install - with_gnu_ld -+with_libtool_sysroot - enable_libtool_lock - enable_targets - enable_werror -@@ -1429,6 +1433,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-gnu-ld assume the C compiler uses GNU ld default=no - --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib - --without-libiconv-prefix don't search for libiconv in includedir and libdir -@@ -5146,8 +5152,8 @@ esac - - - --macro_version='2.2.7a' --macro_revision='1.3134' -+macro_version='2.4' -+macro_revision='1.3293' - - - -@@ -5187,7 +5193,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 - $as_echo_n "checking how to print strings... " >&6; } - # Test print first, because it will be a builtin if present. --if test "X`print -r -- -n 2>/dev/null`" = X-n && \ -+if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ - test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then - ECHO='print -r --' - elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then -@@ -5873,8 +5879,8 @@ $as_echo_n "checking whether the shell u - # Try some XSI features - xsi_shell=no - ( _lt_dummy="a/b/c" -- test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ -- = c,a/b,, \ -+ test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ -+ = c,a/b,b/c, \ - && eval 'test $(( 1 + 1 )) -eq 2 \ - && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ - && xsi_shell=yes -@@ -5923,6 +5929,80 @@ esac - - - -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 -+$as_echo_n "checking how to convert $build file names to $host format... " >&6; } -+if test "${lt_cv_to_host_file_cmd+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ case $host in -+ *-*-mingw* ) -+ case $build in -+ *-*-mingw* ) # actually msys -+ lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 -+ ;; -+ *-*-cygwin* ) -+ lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 -+ ;; -+ * ) # otherwise, assume *nix -+ lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 -+ ;; -+ esac -+ ;; -+ *-*-cygwin* ) -+ case $build in -+ *-*-mingw* ) # actually msys -+ lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin -+ ;; -+ *-*-cygwin* ) -+ lt_cv_to_host_file_cmd=func_convert_file_noop -+ ;; -+ * ) # otherwise, assume *nix -+ lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin -+ ;; -+ esac -+ ;; -+ * ) # unhandled hosts (and "normal" native builds) -+ lt_cv_to_host_file_cmd=func_convert_file_noop -+ ;; -+esac -+ -+fi -+ -+to_host_file_cmd=$lt_cv_to_host_file_cmd -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 -+$as_echo "$lt_cv_to_host_file_cmd" >&6; } -+ -+ -+ -+ -+ -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 -+$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } -+if test "${lt_cv_to_tool_file_cmd+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ #assume ordinary cross tools, or native build. -+lt_cv_to_tool_file_cmd=func_convert_file_noop -+case $host in -+ *-*-mingw* ) -+ case $build in -+ *-*-mingw* ) # actually msys -+ lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 -+ ;; -+ esac -+ ;; -+esac -+ -+fi -+ -+to_tool_file_cmd=$lt_cv_to_tool_file_cmd -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 -+$as_echo "$lt_cv_to_tool_file_cmd" >&6; } -+ -+ -+ -+ -+ - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 - $as_echo_n "checking for $LD option to reload object files... " >&6; } - if test "${lt_cv_ld_reload_flag+set}" = set; then : -@@ -5939,6 +6019,11 @@ case $reload_flag in - esac - reload_cmds='$LD$reload_flag -o $output$reload_objs' - case $host_os in -+ cygwin* | mingw* | pw32* | cegcc*) -+ if test "$GCC" != yes; then -+ reload_cmds=false -+ fi -+ ;; - darwin*) - if test "$GCC" = yes; then - reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' -@@ -6107,7 +6192,8 @@ mingw* | pw32*) - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - else -- lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' -+ # Keep this pattern in sync with the one in func_win32_libid. -+ lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' - lt_cv_file_magic_cmd='$OBJDUMP -f' - fi - ;; -@@ -6261,6 +6347,21 @@ esac - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 - $as_echo "$lt_cv_deplibs_check_method" >&6; } -+ -+file_magic_glob= -+want_nocaseglob=no -+if test "$build" = "$host"; then -+ case $host_os in -+ mingw* | pw32*) -+ if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then -+ want_nocaseglob=yes -+ else -+ file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` -+ fi -+ ;; -+ esac -+fi -+ - file_magic_cmd=$lt_cv_file_magic_cmd - deplibs_check_method=$lt_cv_deplibs_check_method - test -z "$deplibs_check_method" && deplibs_check_method=unknown -@@ -6276,9 +6377,162 @@ test -z "$deplibs_check_method" && depli - - - -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ - if test -n "$ac_tool_prefix"; then -- # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. --set dummy ${ac_tool_prefix}ar; ac_word=$2 -+ # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. -+set dummy ${ac_tool_prefix}dlltool; ac_word=$2 -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -+$as_echo_n "checking for $ac_word... " >&6; } -+if test "${ac_cv_prog_DLLTOOL+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ if test -n "$DLLTOOL"; then -+ ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. -+else -+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -+ ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" -+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ break 2 -+ fi -+done -+ done -+IFS=$as_save_IFS -+ -+fi -+fi -+DLLTOOL=$ac_cv_prog_DLLTOOL -+if test -n "$DLLTOOL"; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 -+$as_echo "$DLLTOOL" >&6; } -+else -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } -+fi -+ -+ -+fi -+if test -z "$ac_cv_prog_DLLTOOL"; then -+ ac_ct_DLLTOOL=$DLLTOOL -+ # Extract the first word of "dlltool", so it can be a program name with args. -+set dummy dlltool; ac_word=$2 -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -+$as_echo_n "checking for $ac_word... " >&6; } -+if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ if test -n "$ac_ct_DLLTOOL"; then -+ ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. -+else -+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -+ ac_cv_prog_ac_ct_DLLTOOL="dlltool" -+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ break 2 -+ fi -+done -+ done -+IFS=$as_save_IFS -+ -+fi -+fi -+ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL -+if test -n "$ac_ct_DLLTOOL"; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 -+$as_echo "$ac_ct_DLLTOOL" >&6; } -+else -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } -+fi -+ -+ if test "x$ac_ct_DLLTOOL" = x; then -+ DLLTOOL="false" -+ else -+ case $cross_compiling:$ac_tool_warned in -+yes:) -+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -+ac_tool_warned=yes ;; -+esac -+ DLLTOOL=$ac_ct_DLLTOOL -+ fi -+else -+ DLLTOOL="$ac_cv_prog_DLLTOOL" -+fi -+ -+test -z "$DLLTOOL" && DLLTOOL=dlltool -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 -+$as_echo_n "checking how to associate runtime and link libraries... " >&6; } -+if test "${lt_cv_sharedlib_from_linklib_cmd+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ lt_cv_sharedlib_from_linklib_cmd='unknown' -+ -+case $host_os in -+cygwin* | mingw* | pw32* | cegcc*) -+ # two different shell functions defined in ltmain.sh -+ # decide which to use based on capabilities of $DLLTOOL -+ case `$DLLTOOL --help 2>&1` in -+ *--identify-strict*) -+ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib -+ ;; -+ *) -+ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback -+ ;; -+ esac -+ ;; -+*) -+ # fallback: assume linklib IS sharedlib -+ lt_cv_sharedlib_from_linklib_cmd="$ECHO" -+ ;; -+esac -+ -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 -+$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } -+sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd -+test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO -+ -+ -+ -+ -+ -+ -+ -+if test -n "$ac_tool_prefix"; then -+ for ac_prog in ar -+ do -+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -+set dummy $ac_tool_prefix$ac_prog; ac_word=$2 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 - $as_echo_n "checking for $ac_word... " >&6; } - if test "${ac_cv_prog_AR+set}" = set; then : -@@ -6294,7 +6548,7 @@ do - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -- ac_cv_prog_AR="${ac_tool_prefix}ar" -+ ac_cv_prog_AR="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -@@ -6314,11 +6568,15 @@ $as_echo "no" >&6; } - fi - - -+ test -n "$AR" && break -+ done - fi --if test -z "$ac_cv_prog_AR"; then -+if test -z "$AR"; then - ac_ct_AR=$AR -- # Extract the first word of "ar", so it can be a program name with args. --set dummy ar; ac_word=$2 -+ for ac_prog in ar -+do -+ # Extract the first word of "$ac_prog", so it can be a program name with args. -+set dummy $ac_prog; ac_word=$2 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 - $as_echo_n "checking for $ac_word... " >&6; } - if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : -@@ -6334,7 +6592,7 @@ do - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -- ac_cv_prog_ac_ct_AR="ar" -+ ac_cv_prog_ac_ct_AR="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -@@ -6353,6 +6611,10 @@ else - $as_echo "no" >&6; } - fi - -+ -+ test -n "$ac_ct_AR" && break -+done -+ - if test "x$ac_ct_AR" = x; then - AR="false" - else -@@ -6364,12 +6626,10 @@ ac_tool_warned=yes ;; - esac - AR=$ac_ct_AR - fi --else -- AR="$ac_cv_prog_AR" - fi - --test -z "$AR" && AR=ar --test -z "$AR_FLAGS" && AR_FLAGS=cru -+: ${AR=ar} -+: ${AR_FLAGS=cru} - - - -@@ -6381,6 +6641,64 @@ test -z "$AR_FLAGS" && AR_FLAGS=cru - - - -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 -+$as_echo_n "checking for archiver @FILE support... " >&6; } -+if test "${lt_cv_ar_at_file+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ lt_cv_ar_at_file=no -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+ -+int -+main () -+{ -+ -+ ; -+ return 0; -+} -+_ACEOF -+if ac_fn_c_try_compile "$LINENO"; then : -+ echo conftest.$ac_objext > conftest.lst -+ lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' -+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 -+ (eval $lt_ar_try) 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -+ test $ac_status = 0; } -+ if test "$ac_status" -eq 0; then -+ # Ensure the archiver fails upon bogus file names. -+ rm -f conftest.$ac_objext libconftest.a -+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 -+ (eval $lt_ar_try) 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -+ test $ac_status = 0; } -+ if test "$ac_status" -ne 0; then -+ lt_cv_ar_at_file=@ -+ fi -+ fi -+ rm -f conftest.* libconftest.a -+ -+fi -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+ -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 -+$as_echo "$lt_cv_ar_at_file" >&6; } -+ -+if test "x$lt_cv_ar_at_file" = xno; then -+ archiver_list_spec= -+else -+ archiver_list_spec=$lt_cv_ar_at_file -+fi -+ -+ -+ -+ -+ -+ -+ - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. - set dummy ${ac_tool_prefix}strip; ac_word=$2 -@@ -6715,8 +7033,8 @@ esac - lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" - - # Transform an extracted symbol line into symbol name and symbol address --lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" --lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" -+lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" -+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" - - # Handle CRLF in mingw tool chain - opt_cr= -@@ -6752,6 +7070,7 @@ for ac_symprfx in "" "_"; do - else - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" - fi -+ lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" - - # Check to see that the pipe works correctly. - pipe_works=no -@@ -6793,6 +7112,18 @@ _LT_EOF - if $GREP ' nm_test_var$' "$nlist" >/dev/null; then - if $GREP ' nm_test_func$' "$nlist" >/dev/null; then - cat <<_LT_EOF > conftest.$ac_ext -+/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ -+#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) -+/* DATA imports from DLLs on WIN32 con't be const, because runtime -+ relocations are performed -- see ld's documentation on pseudo-relocs. */ -+# define LT_DLSYM_CONST -+#elif defined(__osf__) -+/* This system does not cope well with relocations in const data. */ -+# define LT_DLSYM_CONST -+#else -+# define LT_DLSYM_CONST const -+#endif -+ - #ifdef __cplusplus - extern "C" { - #endif -@@ -6804,7 +7135,7 @@ _LT_EOF - cat <<_LT_EOF >> conftest.$ac_ext - - /* The mapping between symbol names and symbols. */ --const struct { -+LT_DLSYM_CONST struct { - const char *name; - void *address; - } -@@ -6830,8 +7161,8 @@ static const void *lt_preloaded_setup() - _LT_EOF - # Now try linking the two files. - mv conftest.$ac_objext conftstm.$ac_objext -- lt_save_LIBS="$LIBS" -- lt_save_CFLAGS="$CFLAGS" -+ lt_globsym_save_LIBS=$LIBS -+ lt_globsym_save_CFLAGS=$CFLAGS - LIBS="conftstm.$ac_objext" - CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 -@@ -6841,8 +7172,8 @@ _LT_EOF - test $ac_status = 0; } && test -s conftest${ac_exeext}; then - pipe_works=yes - fi -- LIBS="$lt_save_LIBS" -- CFLAGS="$lt_save_CFLAGS" -+ LIBS=$lt_globsym_save_LIBS -+ CFLAGS=$lt_globsym_save_CFLAGS - else - echo "cannot find nm_test_func in $nlist" >&5 - fi -@@ -6879,6 +7210,19 @@ else - $as_echo "ok" >&6; } - fi - -+# Response file support. -+if test "$lt_cv_nm_interface" = "MS dumpbin"; then -+ nm_file_list_spec='@' -+elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then -+ nm_file_list_spec='@' -+fi -+ -+ -+ -+ -+ -+ -+ - - - -@@ -6899,6 +7243,42 @@ fi - - - -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 -+$as_echo_n "checking for sysroot... " >&6; } -+ -+# Check whether --with-libtool-sysroot was given. -+if test "${with_libtool_sysroot+set}" = set; then : -+ withval=$with_libtool_sysroot; -+else -+ with_libtool_sysroot=no -+fi -+ -+ -+lt_sysroot= -+case ${with_libtool_sysroot} in #( -+ yes) -+ if test "$GCC" = yes; then -+ lt_sysroot=`$CC --print-sysroot 2>/dev/null` -+ fi -+ ;; #( -+ /*) -+ lt_sysroot=`echo "$with_libtool_sysroot" | sed -e "$sed_quote_subst"` -+ ;; #( -+ no|'') -+ ;; #( -+ *) -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libtool_sysroot}" >&5 -+$as_echo "${with_libtool_sysroot}" >&6; } -+ as_fn_error "The sysroot must be an absolute path." "$LINENO" 5 -+ ;; -+esac -+ -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 -+$as_echo "${lt_sysroot:-no}" >&6; } -+ -+ -+ -+ - - # Check whether --enable-libtool-lock was given. - if test "${enable_libtool_lock+set}" = set; then : -@@ -7093,6 +7473,123 @@ esac - - need_locks="$enable_libtool_lock" - -+if test -n "$ac_tool_prefix"; then -+ # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. -+set dummy ${ac_tool_prefix}mt; ac_word=$2 -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -+$as_echo_n "checking for $ac_word... " >&6; } -+if test "${ac_cv_prog_MANIFEST_TOOL+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ if test -n "$MANIFEST_TOOL"; then -+ ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. -+else -+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -+ ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" -+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ break 2 -+ fi -+done -+ done -+IFS=$as_save_IFS -+ -+fi -+fi -+MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL -+if test -n "$MANIFEST_TOOL"; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 -+$as_echo "$MANIFEST_TOOL" >&6; } -+else -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } -+fi -+ -+ -+fi -+if test -z "$ac_cv_prog_MANIFEST_TOOL"; then -+ ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL -+ # Extract the first word of "mt", so it can be a program name with args. -+set dummy mt; ac_word=$2 -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -+$as_echo_n "checking for $ac_word... " >&6; } -+if test "${ac_cv_prog_ac_ct_MANIFEST_TOOL+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ if test -n "$ac_ct_MANIFEST_TOOL"; then -+ ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. -+else -+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -+ ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" -+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ break 2 -+ fi -+done -+ done -+IFS=$as_save_IFS -+ -+fi -+fi -+ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL -+if test -n "$ac_ct_MANIFEST_TOOL"; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 -+$as_echo "$ac_ct_MANIFEST_TOOL" >&6; } -+else -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } -+fi -+ -+ if test "x$ac_ct_MANIFEST_TOOL" = x; then -+ MANIFEST_TOOL=":" -+ else -+ case $cross_compiling:$ac_tool_warned in -+yes:) -+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -+ac_tool_warned=yes ;; -+esac -+ MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL -+ fi -+else -+ MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" -+fi -+ -+test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 -+$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } -+if test "${lt_cv_path_mainfest_tool+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ lt_cv_path_mainfest_tool=no -+ echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 -+ $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out -+ cat conftest.err >&5 -+ if $GREP 'Manifest Tool' conftest.out > /dev/null; then -+ lt_cv_path_mainfest_tool=yes -+ fi -+ rm -f conftest* -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 -+$as_echo "$lt_cv_path_mainfest_tool" >&6; } -+if test "x$lt_cv_path_mainfest_tool" != xyes; then -+ MANIFEST_TOOL=: -+fi -+ -+ -+ -+ -+ - - case $host_os in - rhapsody* | darwin*) -@@ -7656,6 +8153,8 @@ _LT_EOF - $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 - echo "$AR cru libconftest.a conftest.o" >&5 - $AR cru libconftest.a conftest.o 2>&5 -+ echo "$RANLIB libconftest.a" >&5 -+ $RANLIB libconftest.a 2>&5 - cat > conftest.c << _LT_EOF - int main() { return 0;} - _LT_EOF -@@ -7851,7 +8350,8 @@ fi - LIBTOOL_DEPS="$ltmain" - - # Always use our own libtool. --LIBTOOL='$(SHELL) $(top_builddir)/libtool' -+LIBTOOL='$(SHELL) $(top_builddir)' -+LIBTOOL="$LIBTOOL/${host_alias}-libtool" - - - -@@ -7940,7 +8440,7 @@ aix3*) - esac - - # Global variables: --ofile=libtool -+ofile=${host_alias}-libtool - can_build_shared=yes - - # All known linkers require a `.a' archive for static linking (except MSVC, -@@ -8238,8 +8738,6 @@ fi - lt_prog_compiler_pic= - lt_prog_compiler_static= - --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 --$as_echo_n "checking for $compiler option to produce PIC... " >&6; } - - if test "$GCC" = yes; then - lt_prog_compiler_wl='-Wl,' -@@ -8404,6 +8902,12 @@ $as_echo_n "checking for $compiler optio - lt_prog_compiler_pic='--shared' - lt_prog_compiler_static='--static' - ;; -+ nagfor*) -+ # NAG Fortran compiler -+ lt_prog_compiler_wl='-Wl,-Wl,,' -+ lt_prog_compiler_pic='-PIC' -+ lt_prog_compiler_static='-Bstatic' -+ ;; - pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) -@@ -8466,7 +8970,7 @@ $as_echo_n "checking for $compiler optio - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - case $cc_basename in -- f77* | f90* | f95*) -+ f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) - lt_prog_compiler_wl='-Qoption ld ';; - *) - lt_prog_compiler_wl='-Wl,';; -@@ -8523,13 +9027,17 @@ case $host_os in - lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" - ;; - esac --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5 --$as_echo "$lt_prog_compiler_pic" >&6; } -- -- -- -- - -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -+$as_echo_n "checking for $compiler option to produce PIC... " >&6; } -+if test "${lt_cv_prog_compiler_pic+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ lt_cv_prog_compiler_pic=$lt_prog_compiler_pic -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 -+$as_echo "$lt_cv_prog_compiler_pic" >&6; } -+lt_prog_compiler_pic=$lt_cv_prog_compiler_pic - - # - # Check to make sure the PIC flag actually works. -@@ -8590,6 +9098,11 @@ fi - - - -+ -+ -+ -+ -+ - # - # Check to make sure the static flag actually works. - # -@@ -8940,7 +9453,8 @@ _LT_EOF - allow_undefined_flag=unsupported - always_export_symbols=no - enable_shared_with_static_runtimes=yes -- export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' -+ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' -+ exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' -@@ -8988,7 +9502,7 @@ _LT_EOF - if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ - && test "$tmp_diet" = no - then -- tmp_addflag= -+ tmp_addflag=' $pic_flag' - tmp_sharedflag='-shared' - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler -@@ -9039,12 +9553,12 @@ _LT_EOF - whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' - hardcode_libdir_flag_spec= - hardcode_libdir_flag_spec_ld='-rpath $libdir' -- archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' -+ archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then - archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ -- $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' -+ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' - fi - ;; - esac -@@ -9058,8 +9572,8 @@ _LT_EOF - archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else -- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' -+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - -@@ -9077,8 +9591,8 @@ _LT_EOF - - _LT_EOF - elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then -- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' -+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi -@@ -9124,8 +9638,8 @@ _LT_EOF - - *) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then -- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' -+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi -@@ -9255,7 +9769,13 @@ _LT_EOF - allow_undefined_flag='-berok' - # Determine the default libpath from the value encoded in an - # empty executable. -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+ if test "${lt_cv_aix_libpath+set}" = set; then -+ aix_libpath=$lt_cv_aix_libpath -+else -+ if test "${lt_cv_aix_libpath_+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - - int -@@ -9268,22 +9788,29 @@ main () - _ACEOF - if ac_fn_c_try_link "$LINENO"; then : - --lt_aix_libpath_sed=' -- /Import File Strings/,/^$/ { -- /^0/ { -- s/^0 *\(.*\)$/\1/ -- p -- } -- }' --aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` --# Check for a 64-bit object if we didn't find anything. --if test -z "$aix_libpath"; then -- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` --fi -+ lt_aix_libpath_sed=' -+ /Import File Strings/,/^$/ { -+ /^0/ { -+ s/^0 *\([^ ]*\) *$/\1/ -+ p -+ } -+ }' -+ lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -+ # Check for a 64-bit object if we didn't find anything. -+ if test -z "$lt_cv_aix_libpath_"; then -+ lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -+ fi - fi - rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext --if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi -+ if test -z "$lt_cv_aix_libpath_"; then -+ lt_cv_aix_libpath_="/usr/lib:/lib" -+ fi -+ -+fi -+ -+ aix_libpath=$lt_cv_aix_libpath_ -+fi - - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" -@@ -9295,7 +9822,13 @@ if test -z "$aix_libpath"; then aix_libp - else - # Determine the default libpath from the value encoded in an - # empty executable. -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+ if test "${lt_cv_aix_libpath+set}" = set; then -+ aix_libpath=$lt_cv_aix_libpath -+else -+ if test "${lt_cv_aix_libpath_+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - - int -@@ -9308,22 +9841,29 @@ main () - _ACEOF - if ac_fn_c_try_link "$LINENO"; then : - --lt_aix_libpath_sed=' -- /Import File Strings/,/^$/ { -- /^0/ { -- s/^0 *\(.*\)$/\1/ -- p -- } -- }' --aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` --# Check for a 64-bit object if we didn't find anything. --if test -z "$aix_libpath"; then -- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` --fi -+ lt_aix_libpath_sed=' -+ /Import File Strings/,/^$/ { -+ /^0/ { -+ s/^0 *\([^ ]*\) *$/\1/ -+ p -+ } -+ }' -+ lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -+ # Check for a 64-bit object if we didn't find anything. -+ if test -z "$lt_cv_aix_libpath_"; then -+ lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -+ fi - fi - rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext --if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi -+ if test -z "$lt_cv_aix_libpath_"; then -+ lt_cv_aix_libpath_="/usr/lib:/lib" -+ fi -+ -+fi -+ -+ aix_libpath=$lt_cv_aix_libpath_ -+fi - - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, -@@ -9368,20 +9908,63 @@ if test -z "$aix_libpath"; then aix_libp - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. -- hardcode_libdir_flag_spec=' ' -- allow_undefined_flag=unsupported -- # Tell ltmain to make .lib files, not .a files. -- libext=lib -- # Tell ltmain to make .dll files, not .so files. -- shrext_cmds=".dll" -- # FIXME: Setting linknames here is a bad hack. -- archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' -- # The linker will automatically build a .lib file if we build a DLL. -- old_archive_from_new_cmds='true' -- # FIXME: Should let the user specify the lib program. -- old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' -- fix_srcfile_path='`cygpath -w "$srcfile"`' -- enable_shared_with_static_runtimes=yes -+ case $cc_basename in -+ cl*) -+ # Native MSVC -+ hardcode_libdir_flag_spec=' ' -+ allow_undefined_flag=unsupported -+ always_export_symbols=yes -+ file_list_spec='@' -+ # Tell ltmain to make .lib files, not .a files. -+ libext=lib -+ # Tell ltmain to make .dll files, not .so files. -+ shrext_cmds=".dll" -+ # FIXME: Setting linknames here is a bad hack. -+ archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' -+ archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then -+ sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; -+ else -+ sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; -+ fi~ -+ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ -+ linknames=' -+ # The linker will not automatically build a static lib if we build a DLL. -+ # _LT_TAGVAR(old_archive_from_new_cmds, )='true' -+ enable_shared_with_static_runtimes=yes -+ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' -+ # Don't use ranlib -+ old_postinstall_cmds='chmod 644 $oldlib' -+ postlink_cmds='lt_outputfile="@OUTPUT@"~ -+ lt_tool_outputfile="@TOOL_OUTPUT@"~ -+ case $lt_outputfile in -+ *.exe|*.EXE) ;; -+ *) -+ lt_outputfile="$lt_outputfile.exe" -+ lt_tool_outputfile="$lt_tool_outputfile.exe" -+ ;; -+ esac~ -+ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then -+ $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; -+ $RM "$lt_outputfile.manifest"; -+ fi' -+ ;; -+ *) -+ # Assume MSVC wrapper -+ hardcode_libdir_flag_spec=' ' -+ allow_undefined_flag=unsupported -+ # Tell ltmain to make .lib files, not .a files. -+ libext=lib -+ # Tell ltmain to make .dll files, not .so files. -+ shrext_cmds=".dll" -+ # FIXME: Setting linknames here is a bad hack. -+ archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' -+ # The linker will automatically build a .lib file if we build a DLL. -+ old_archive_from_new_cmds='true' -+ # FIXME: Should let the user specify the lib program. -+ old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' -+ enable_shared_with_static_runtimes=yes -+ ;; -+ esac - ;; - - darwin* | rhapsody*) -@@ -9446,7 +10029,7 @@ if test -z "$aix_libpath"; then aix_libp - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) -- archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' -+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no -@@ -9454,7 +10037,7 @@ if test -z "$aix_libpath"; then aix_libp - - hpux9*) - if test "$GCC" = yes; then -- archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' -+ archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - fi -@@ -9470,7 +10053,7 @@ if test -z "$aix_libpath"; then aix_libp - - hpux10*) - if test "$GCC" = yes && test "$with_gnu_ld" = no; then -- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' -+ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi -@@ -9494,10 +10077,10 @@ if test -z "$aix_libpath"; then aix_libp - archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) -- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' -+ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) -- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' -+ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else -@@ -9576,23 +10159,36 @@ fi - - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then -- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' -+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - # Try to use the -exported_symbol ld option, if it does not - # work, assume that -exports_file does not work either and - # implicitly export all symbols. -- save_LDFLAGS="$LDFLAGS" -- LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+ # This should be the same for all languages, so no per-tag cache variable. -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 -+$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } -+if test "${lt_cv_irix_exported_symbol+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ save_LDFLAGS="$LDFLAGS" -+ LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ --int foo(void) {} -+int foo (void) { return 0; } - _ACEOF - if ac_fn_c_try_link "$LINENO"; then : -- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' -- -+ lt_cv_irix_exported_symbol=yes -+else -+ lt_cv_irix_exported_symbol=no - fi - rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -- LDFLAGS="$save_LDFLAGS" -+ LDFLAGS="$save_LDFLAGS" -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 -+$as_echo "$lt_cv_irix_exported_symbol" >&6; } -+ if test "$lt_cv_irix_exported_symbol" = yes; then -+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' -+ fi - else - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' -@@ -9677,7 +10273,7 @@ rm -f core conftest.err conftest.$ac_obj - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' -- archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' -+ archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - else - allow_undefined_flag=' -expect_unresolved \*' -@@ -9696,9 +10292,9 @@ rm -f core conftest.err conftest.$ac_obj - no_undefined_flag=' -z defs' - if test "$GCC" = yes; then - wlarc='${wl}' -- archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' -+ archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ -- $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' -+ $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - else - case `$CC -V 2>&1` in - *"Compilers 5.0"*) -@@ -10274,8 +10870,9 @@ cygwin* | mingw* | pw32* | cegcc*) - need_version=no - need_lib_prefix=no - -- case $GCC,$host_os in -- yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) -+ case $GCC,$cc_basename in -+ yes,*) -+ # gcc - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ -@@ -10308,13 +10905,71 @@ cygwin* | mingw* | pw32* | cegcc*) - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - ;; - esac -+ dynamic_linker='Win32 ld.exe' -+ ;; -+ -+ *,cl*) -+ # Native MSVC -+ libname_spec='$name' -+ soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' -+ library_names_spec='${libname}.dll.lib' -+ -+ case $build_os in -+ mingw*) -+ sys_lib_search_path_spec= -+ lt_save_ifs=$IFS -+ IFS=';' -+ for lt_path in $LIB -+ do -+ IFS=$lt_save_ifs -+ # Let DOS variable expansion print the short 8.3 style file name. -+ lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` -+ sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" -+ done -+ IFS=$lt_save_ifs -+ # Convert to MSYS style. -+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` -+ ;; -+ cygwin*) -+ # Convert to unix form, then to dos form, then back to unix form -+ # but this time dos style (no spaces!) so that the unix form looks -+ # like /cygdrive/c/PROGRA~1:/cygdr... -+ sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` -+ sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` -+ sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` -+ ;; -+ *) -+ sys_lib_search_path_spec="$LIB" -+ if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then -+ # It is most probably a Windows format PATH. -+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` -+ else -+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` -+ fi -+ # FIXME: find the short name or the path components, as spaces are -+ # common. (e.g. "Program Files" -> "PROGRA~1") -+ ;; -+ esac -+ -+ # DLL is installed to $(libdir)/../bin by postinstall_cmds -+ postinstall_cmds='base_file=`basename \${file}`~ -+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ -+ dldir=$destdir/`dirname \$dlpath`~ -+ test -d \$dldir || mkdir -p \$dldir~ -+ $install_prog $dir/$dlname \$dldir/$dlname' -+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ -+ dlpath=$dir/\$dldll~ -+ $RM \$dlpath' -+ shlibpath_overrides_runpath=yes -+ dynamic_linker='Win32 link.exe' - ;; - - *) -+ # Assume MSVC wrapper - library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' -+ dynamic_linker='Win32 ld.exe' - ;; - esac -- dynamic_linker='Win32 ld.exe' - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; -@@ -10410,7 +11065,7 @@ haiku*) - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LIBRARY_PATH - shlibpath_overrides_runpath=yes -- sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib' -+ sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' - hardcode_into_libs=yes - ;; - -@@ -11206,7 +11861,7 @@ else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF --#line 11209 "configure" -+#line $LINENO "configure" - #include "confdefs.h" - - #if HAVE_DLFCN_H -@@ -11250,10 +11905,10 @@ else - /* When -fvisbility=hidden is used, assume the code has been annotated - correspondingly for the symbols needed. */ - #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) --void fnord () __attribute__((visibility("default"))); -+int fnord () __attribute__((visibility("default"))); - #endif - --void fnord () { int i=42; } -+int fnord () { return 42; } - int main () - { - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); -@@ -11312,7 +11967,7 @@ else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF --#line 11315 "configure" -+#line $LINENO "configure" - #include "confdefs.h" - - #if HAVE_DLFCN_H -@@ -11356,10 +12011,10 @@ else - /* When -fvisbility=hidden is used, assume the code has been annotated - correspondingly for the symbols needed. */ - #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) --void fnord () __attribute__((visibility("default"))); -+int fnord () __attribute__((visibility("default"))); - #endif - --void fnord () { int i=42; } -+int fnord () { return 42; } - int main () - { - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); -@@ -14754,13 +15409,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_ - lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' - lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' - lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' -+lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' -+lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' - reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' - reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' - OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' - deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' - file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' -+file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' -+want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' -+DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' -+sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' - AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' - AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' -+archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' - STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' - RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' - old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' -@@ -14775,14 +15437,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$l - lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' - lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' - lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' -+nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' -+lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' - objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' - MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' - lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' --lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' - lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' -+lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' - lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' - lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' - need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' -+MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' - DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' - NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' - LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' -@@ -14815,12 +15480,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcod - hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' - inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' - link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' --fix_srcfile_path='`$ECHO "$fix_srcfile_path" | $SED "$delay_single_quote_subst"`' - always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' - export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' - exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' - include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' - prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' -+postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' - file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' - variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' - need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' -@@ -14875,8 +15540,13 @@ reload_flag \ - OBJDUMP \ - deplibs_check_method \ - file_magic_cmd \ -+file_magic_glob \ -+want_nocaseglob \ -+DLLTOOL \ -+sharedlib_from_linklib_cmd \ - AR \ - AR_FLAGS \ -+archiver_list_spec \ - STRIP \ - RANLIB \ - CC \ -@@ -14886,12 +15556,14 @@ lt_cv_sys_global_symbol_pipe \ - lt_cv_sys_global_symbol_to_cdecl \ - lt_cv_sys_global_symbol_to_c_name_address \ - lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ -+nm_file_list_spec \ - lt_prog_compiler_no_builtin_flag \ --lt_prog_compiler_wl \ - lt_prog_compiler_pic \ -+lt_prog_compiler_wl \ - lt_prog_compiler_static \ - lt_cv_prog_compiler_c_o \ - need_locks \ -+MANIFEST_TOOL \ - DSYMUTIL \ - NMEDIT \ - LIPO \ -@@ -14907,7 +15579,6 @@ no_undefined_flag \ - hardcode_libdir_flag_spec \ - hardcode_libdir_flag_spec_ld \ - hardcode_libdir_separator \ --fix_srcfile_path \ - exclude_expsyms \ - include_expsyms \ - file_list_spec \ -@@ -14943,6 +15614,7 @@ module_cmds \ - module_expsym_cmds \ - export_symbols_cmds \ - prelink_cmds \ -+postlink_cmds \ - postinstall_cmds \ - postuninstall_cmds \ - finish_cmds \ -@@ -15700,7 +16372,8 @@ $as_echo X"$file" | - # NOTE: Changes made to this file will be lost: look at ltmain.sh. - # - # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, --# 2006, 2007, 2008, 2009 Free Software Foundation, Inc. -+# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, -+# Inc. - # Written by Gordon Matzigkeit, 1996 - # - # This file is part of GNU Libtool. -@@ -15803,19 +16476,42 @@ SP2NL=$lt_lt_SP2NL - # turn newlines into spaces. - NL2SP=$lt_lt_NL2SP - -+# convert \$build file names to \$host format. -+to_host_file_cmd=$lt_cv_to_host_file_cmd -+ -+# convert \$build files to toolchain format. -+to_tool_file_cmd=$lt_cv_to_tool_file_cmd -+ - # An object symbol dumper. - OBJDUMP=$lt_OBJDUMP - - # Method to check whether dependent libraries are shared objects. - deplibs_check_method=$lt_deplibs_check_method - --# Command to use when deplibs_check_method == "file_magic". -+# Command to use when deplibs_check_method = "file_magic". - file_magic_cmd=$lt_file_magic_cmd - -+# How to find potential files when deplibs_check_method = "file_magic". -+file_magic_glob=$lt_file_magic_glob -+ -+# Find potential files using nocaseglob when deplibs_check_method = "file_magic". -+want_nocaseglob=$lt_want_nocaseglob -+ -+# DLL creation program. -+DLLTOOL=$lt_DLLTOOL -+ -+# Command to associate shared and link libraries. -+sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd -+ - # The archiver. - AR=$lt_AR -+ -+# Flags to create an archive. - AR_FLAGS=$lt_AR_FLAGS - -+# How to feed a file listing to the archiver. -+archiver_list_spec=$lt_archiver_list_spec -+ - # A symbol stripping program. - STRIP=$lt_STRIP - -@@ -15845,6 +16541,12 @@ global_symbol_to_c_name_address=$lt_lt_c - # Transform the output of nm in a C name address pair when lib prefix is needed. - global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix - -+# Specify filename containing input files for \$NM. -+nm_file_list_spec=$lt_nm_file_list_spec -+ -+# The root where to search for dependent libraries,and in which our libraries should be installed. -+lt_sysroot=$lt_sysroot -+ - # The name of the directory that contains temporary libtool files. - objdir=$objdir - -@@ -15854,6 +16556,9 @@ MAGIC_CMD=$MAGIC_CMD - # Must we lock files when doing compilation? - need_locks=$lt_need_locks - -+# Manifest tool. -+MANIFEST_TOOL=$lt_MANIFEST_TOOL -+ - # Tool to manipulate archived DWARF debug symbol files on Mac OS X. - DSYMUTIL=$lt_DSYMUTIL - -@@ -15968,12 +16673,12 @@ with_gcc=$GCC - # Compiler flag to turn off builtin functions. - no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag - --# How to pass a linker flag through the compiler. --wl=$lt_lt_prog_compiler_wl -- - # Additional compiler flags for building library objects. - pic_flag=$lt_lt_prog_compiler_pic - -+# How to pass a linker flag through the compiler. -+wl=$lt_lt_prog_compiler_wl -+ - # Compiler flag to prevent dynamic linking. - link_static_flag=$lt_lt_prog_compiler_static - -@@ -16060,9 +16765,6 @@ inherit_rpath=$inherit_rpath - # Whether libtool must link a program against all its dependency libraries. - link_all_deplibs=$link_all_deplibs - --# Fix the shell variable \$srcfile for the compiler. --fix_srcfile_path=$lt_fix_srcfile_path -- - # Set to "yes" if exported symbols are required. - always_export_symbols=$always_export_symbols - -@@ -16078,6 +16780,9 @@ include_expsyms=$lt_include_expsyms - # Commands necessary for linking programs (against libraries) with templates. - prelink_cmds=$lt_prelink_cmds - -+# Commands necessary for finishing linking programs. -+postlink_cmds=$lt_postlink_cmds -+ - # Specify filename containing input files. - file_list_spec=$lt_file_list_spec - -@@ -16110,210 +16815,169 @@ ltmain="$ac_aux_dir/ltmain.sh" - # if finds mixed CR/LF and LF-only lines. Since sed operates in - # text mode, it properly converts lines to CR/LF. This bash problem - # is reportedly fixed, but why not run on old versions too? -- sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ -- || (rm -f "$cfgfile"; exit 1) -- -- case $xsi_shell in -- yes) -- cat << \_LT_EOF >> "$cfgfile" -- --# func_dirname file append nondir_replacement --# Compute the dirname of FILE. If nonempty, add APPEND to the result, --# otherwise set result to NONDIR_REPLACEMENT. --func_dirname () --{ -- case ${1} in -- */*) func_dirname_result="${1%/*}${2}" ;; -- * ) func_dirname_result="${3}" ;; -- esac --} -- --# func_basename file --func_basename () --{ -- func_basename_result="${1##*/}" --} -- --# func_dirname_and_basename file append nondir_replacement --# perform func_basename and func_dirname in a single function --# call: --# dirname: Compute the dirname of FILE. If nonempty, --# add APPEND to the result, otherwise set result --# to NONDIR_REPLACEMENT. --# value returned in "$func_dirname_result" --# basename: Compute filename of FILE. --# value retuned in "$func_basename_result" --# Implementation must be kept synchronized with func_dirname --# and func_basename. For efficiency, we do not delegate to --# those functions but instead duplicate the functionality here. --func_dirname_and_basename () --{ -- case ${1} in -- */*) func_dirname_result="${1%/*}${2}" ;; -- * ) func_dirname_result="${3}" ;; -- esac -- func_basename_result="${1##*/}" --} -- --# func_stripname prefix suffix name --# strip PREFIX and SUFFIX off of NAME. --# PREFIX and SUFFIX must not contain globbing or regex special --# characters, hashes, percent signs, but SUFFIX may contain a leading --# dot (in which case that matches only a dot). --func_stripname () --{ -- # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are -- # positional parameters, so assign one to ordinary parameter first. -- func_stripname_result=${3} -- func_stripname_result=${func_stripname_result#"${1}"} -- func_stripname_result=${func_stripname_result%"${2}"} --} -- --# func_opt_split --func_opt_split () --{ -- func_opt_split_opt=${1%%=*} -- func_opt_split_arg=${1#*=} --} -- --# func_lo2o object --func_lo2o () --{ -- case ${1} in -- *.lo) func_lo2o_result=${1%.lo}.${objext} ;; -- *) func_lo2o_result=${1} ;; -- esac --} -- --# func_xform libobj-or-source --func_xform () --{ -- func_xform_result=${1%.*}.lo --} -- --# func_arith arithmetic-term... --func_arith () --{ -- func_arith_result=$(( $* )) --} -- --# func_len string --# STRING may not start with a hyphen. --func_len () --{ -- func_len_result=${#1} --} -- --_LT_EOF -- ;; -- *) # Bourne compatible functions. -- cat << \_LT_EOF >> "$cfgfile" -- --# func_dirname file append nondir_replacement --# Compute the dirname of FILE. If nonempty, add APPEND to the result, --# otherwise set result to NONDIR_REPLACEMENT. --func_dirname () --{ -- # Extract subdirectory from the argument. -- func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` -- if test "X$func_dirname_result" = "X${1}"; then -- func_dirname_result="${3}" -- else -- func_dirname_result="$func_dirname_result${2}" -- fi --} -- --# func_basename file --func_basename () --{ -- func_basename_result=`$ECHO "${1}" | $SED "$basename"` --} -- -- --# func_stripname prefix suffix name --# strip PREFIX and SUFFIX off of NAME. --# PREFIX and SUFFIX must not contain globbing or regex special --# characters, hashes, percent signs, but SUFFIX may contain a leading --# dot (in which case that matches only a dot). --# func_strip_suffix prefix name --func_stripname () --{ -- case ${2} in -- .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; -- *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; -- esac --} -- --# sed scripts: --my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q' --my_sed_long_arg='1s/^-[^=]*=//' -- --# func_opt_split --func_opt_split () --{ -- func_opt_split_opt=`$ECHO "${1}" | $SED "$my_sed_long_opt"` -- func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"` --} -- --# func_lo2o object --func_lo2o () --{ -- func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` --} -- --# func_xform libobj-or-source --func_xform () --{ -- func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` --} -- --# func_arith arithmetic-term... --func_arith () --{ -- func_arith_result=`expr "$@"` --} -- --# func_len string --# STRING may not start with a hyphen. --func_len () --{ -- func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` --} -- --_LT_EOF --esac -- --case $lt_shell_append in -- yes) -- cat << \_LT_EOF >> "$cfgfile" -- --# func_append var value --# Append VALUE to the end of shell variable VAR. --func_append () --{ -- eval "$1+=\$2" --} --_LT_EOF -- ;; -- *) -- cat << \_LT_EOF >> "$cfgfile" -- --# func_append var value --# Append VALUE to the end of shell variable VAR. --func_append () --{ -- eval "$1=\$$1\$2" --} -- --_LT_EOF -- ;; -- esac -+ sed '$q' "$ltmain" >> "$cfgfile" \ -+ || (rm -f "$cfgfile"; exit 1) - -+ if test x"$xsi_shell" = xyes; then -+ sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ -+func_dirname ()\ -+{\ -+\ case ${1} in\ -+\ */*) func_dirname_result="${1%/*}${2}" ;;\ -+\ * ) func_dirname_result="${3}" ;;\ -+\ esac\ -+} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_basename ()$/,/^} # func_basename /c\ -+func_basename ()\ -+{\ -+\ func_basename_result="${1##*/}"\ -+} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ -+func_dirname_and_basename ()\ -+{\ -+\ case ${1} in\ -+\ */*) func_dirname_result="${1%/*}${2}" ;;\ -+\ * ) func_dirname_result="${3}" ;;\ -+\ esac\ -+\ func_basename_result="${1##*/}"\ -+} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ -+func_stripname ()\ -+{\ -+\ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ -+\ # positional parameters, so assign one to ordinary parameter first.\ -+\ func_stripname_result=${3}\ -+\ func_stripname_result=${func_stripname_result#"${1}"}\ -+\ func_stripname_result=${func_stripname_result%"${2}"}\ -+} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ -+func_split_long_opt ()\ -+{\ -+\ func_split_long_opt_name=${1%%=*}\ -+\ func_split_long_opt_arg=${1#*=}\ -+} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ -+func_split_short_opt ()\ -+{\ -+\ func_split_short_opt_arg=${1#??}\ -+\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ -+} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ -+func_lo2o ()\ -+{\ -+\ case ${1} in\ -+\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ -+\ *) func_lo2o_result=${1} ;;\ -+\ esac\ -+} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_xform ()$/,/^} # func_xform /c\ -+func_xform ()\ -+{\ -+ func_xform_result=${1%.*}.lo\ -+} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_arith ()$/,/^} # func_arith /c\ -+func_arith ()\ -+{\ -+ func_arith_result=$(( $* ))\ -+} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_len ()$/,/^} # func_len /c\ -+func_len ()\ -+{\ -+ func_len_result=${#1}\ -+} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+fi -+ -+if test x"$lt_shell_append" = xyes; then -+ sed -e '/^func_append ()$/,/^} # func_append /c\ -+func_append ()\ -+{\ -+ eval "${1}+=\\${2}"\ -+} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ -+func_append_quoted ()\ -+{\ -+\ func_quote_for_eval "${2}"\ -+\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ -+} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ # Save a `func_append' function call where possible by direct use of '+=' -+ sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+ test 0 -eq $? || _lt_function_replace_fail=: -+else -+ # Save a `func_append' function call even when '+=' is not available -+ sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+ test 0 -eq $? || _lt_function_replace_fail=: -+fi -+ -+if test x"$_lt_function_replace_fail" = x":"; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 -+$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} -+fi - -- sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ -- || (rm -f "$cfgfile"; exit 1) - -- mv -f "$cfgfile" "$ofile" || -+ mv -f "$cfgfile" "$ofile" || - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" - -Index: binutils-2.21.1/gas/configure -=================================================================== ---- binutils-2.21.1.orig/gas/configure -+++ binutils-2.21.1/gas/configure -@@ -645,8 +645,11 @@ OTOOL - LIPO - NMEDIT - DSYMUTIL -+MANIFEST_TOOL - RANLIB -+ac_ct_AR - AR -+DLLTOOL - OBJDUMP - LN_S - NM -@@ -759,6 +762,7 @@ enable_static - with_pic - enable_fast_install - with_gnu_ld -+with_libtool_sysroot - enable_libtool_lock - enable_targets - enable_checking -@@ -1420,6 +1424,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-zlib include zlib support (auto/yes/no) default=auto - - Some influential environment variables: -@@ -5135,8 +5141,8 @@ esac - - - --macro_version='2.2.7a' --macro_revision='1.3134' -+macro_version='2.4' -+macro_revision='1.3293' - - - -@@ -5176,7 +5182,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 - $as_echo_n "checking how to print strings... " >&6; } - # Test print first, because it will be a builtin if present. --if test "X`print -r -- -n 2>/dev/null`" = X-n && \ -+if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ - test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then - ECHO='print -r --' - elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then -@@ -5862,8 +5868,8 @@ $as_echo_n "checking whether the shell u - # Try some XSI features - xsi_shell=no - ( _lt_dummy="a/b/c" -- test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ -- = c,a/b,, \ -+ test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ -+ = c,a/b,b/c, \ - && eval 'test $(( 1 + 1 )) -eq 2 \ - && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ - && xsi_shell=yes -@@ -5912,6 +5918,80 @@ esac - - - -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 -+$as_echo_n "checking how to convert $build file names to $host format... " >&6; } -+if test "${lt_cv_to_host_file_cmd+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ case $host in -+ *-*-mingw* ) -+ case $build in -+ *-*-mingw* ) # actually msys -+ lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 -+ ;; -+ *-*-cygwin* ) -+ lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 -+ ;; -+ * ) # otherwise, assume *nix -+ lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 -+ ;; -+ esac -+ ;; -+ *-*-cygwin* ) -+ case $build in -+ *-*-mingw* ) # actually msys -+ lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin -+ ;; -+ *-*-cygwin* ) -+ lt_cv_to_host_file_cmd=func_convert_file_noop -+ ;; -+ * ) # otherwise, assume *nix -+ lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin -+ ;; -+ esac -+ ;; -+ * ) # unhandled hosts (and "normal" native builds) -+ lt_cv_to_host_file_cmd=func_convert_file_noop -+ ;; -+esac -+ -+fi -+ -+to_host_file_cmd=$lt_cv_to_host_file_cmd -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 -+$as_echo "$lt_cv_to_host_file_cmd" >&6; } -+ -+ -+ -+ -+ -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 -+$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } -+if test "${lt_cv_to_tool_file_cmd+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ #assume ordinary cross tools, or native build. -+lt_cv_to_tool_file_cmd=func_convert_file_noop -+case $host in -+ *-*-mingw* ) -+ case $build in -+ *-*-mingw* ) # actually msys -+ lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 -+ ;; -+ esac -+ ;; -+esac -+ -+fi -+ -+to_tool_file_cmd=$lt_cv_to_tool_file_cmd -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 -+$as_echo "$lt_cv_to_tool_file_cmd" >&6; } -+ -+ -+ -+ -+ - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 - $as_echo_n "checking for $LD option to reload object files... " >&6; } - if test "${lt_cv_ld_reload_flag+set}" = set; then : -@@ -5928,6 +6008,11 @@ case $reload_flag in - esac - reload_cmds='$LD$reload_flag -o $output$reload_objs' - case $host_os in -+ cygwin* | mingw* | pw32* | cegcc*) -+ if test "$GCC" != yes; then -+ reload_cmds=false -+ fi -+ ;; - darwin*) - if test "$GCC" = yes; then - reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' -@@ -6096,7 +6181,8 @@ mingw* | pw32*) - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - else -- lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' -+ # Keep this pattern in sync with the one in func_win32_libid. -+ lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' - lt_cv_file_magic_cmd='$OBJDUMP -f' - fi - ;; -@@ -6250,6 +6336,21 @@ esac - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 - $as_echo "$lt_cv_deplibs_check_method" >&6; } -+ -+file_magic_glob= -+want_nocaseglob=no -+if test "$build" = "$host"; then -+ case $host_os in -+ mingw* | pw32*) -+ if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then -+ want_nocaseglob=yes -+ else -+ file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` -+ fi -+ ;; -+ esac -+fi -+ - file_magic_cmd=$lt_cv_file_magic_cmd - deplibs_check_method=$lt_cv_deplibs_check_method - test -z "$deplibs_check_method" && deplibs_check_method=unknown -@@ -6265,9 +6366,162 @@ test -z "$deplibs_check_method" && depli - - - -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+if test -n "$ac_tool_prefix"; then -+ # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. -+set dummy ${ac_tool_prefix}dlltool; ac_word=$2 -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -+$as_echo_n "checking for $ac_word... " >&6; } -+if test "${ac_cv_prog_DLLTOOL+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ if test -n "$DLLTOOL"; then -+ ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. -+else -+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -+ ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" -+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ break 2 -+ fi -+done -+ done -+IFS=$as_save_IFS -+ -+fi -+fi -+DLLTOOL=$ac_cv_prog_DLLTOOL -+if test -n "$DLLTOOL"; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 -+$as_echo "$DLLTOOL" >&6; } -+else -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } -+fi -+ -+ -+fi -+if test -z "$ac_cv_prog_DLLTOOL"; then -+ ac_ct_DLLTOOL=$DLLTOOL -+ # Extract the first word of "dlltool", so it can be a program name with args. -+set dummy dlltool; ac_word=$2 -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -+$as_echo_n "checking for $ac_word... " >&6; } -+if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ if test -n "$ac_ct_DLLTOOL"; then -+ ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. -+else -+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -+ ac_cv_prog_ac_ct_DLLTOOL="dlltool" -+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ break 2 -+ fi -+done -+ done -+IFS=$as_save_IFS -+ -+fi -+fi -+ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL -+if test -n "$ac_ct_DLLTOOL"; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 -+$as_echo "$ac_ct_DLLTOOL" >&6; } -+else -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } -+fi -+ -+ if test "x$ac_ct_DLLTOOL" = x; then -+ DLLTOOL="false" -+ else -+ case $cross_compiling:$ac_tool_warned in -+yes:) -+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -+ac_tool_warned=yes ;; -+esac -+ DLLTOOL=$ac_ct_DLLTOOL -+ fi -+else -+ DLLTOOL="$ac_cv_prog_DLLTOOL" -+fi -+ -+test -z "$DLLTOOL" && DLLTOOL=dlltool -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 -+$as_echo_n "checking how to associate runtime and link libraries... " >&6; } -+if test "${lt_cv_sharedlib_from_linklib_cmd+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ lt_cv_sharedlib_from_linklib_cmd='unknown' -+ -+case $host_os in -+cygwin* | mingw* | pw32* | cegcc*) -+ # two different shell functions defined in ltmain.sh -+ # decide which to use based on capabilities of $DLLTOOL -+ case `$DLLTOOL --help 2>&1` in -+ *--identify-strict*) -+ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib -+ ;; -+ *) -+ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback -+ ;; -+ esac -+ ;; -+*) -+ # fallback: assume linklib IS sharedlib -+ lt_cv_sharedlib_from_linklib_cmd="$ECHO" -+ ;; -+esac -+ -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 -+$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } -+sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd -+test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO -+ -+ -+ -+ -+ -+ -+ - if test -n "$ac_tool_prefix"; then -- # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. --set dummy ${ac_tool_prefix}ar; ac_word=$2 -+ for ac_prog in ar -+ do -+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -+set dummy $ac_tool_prefix$ac_prog; ac_word=$2 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 - $as_echo_n "checking for $ac_word... " >&6; } - if test "${ac_cv_prog_AR+set}" = set; then : -@@ -6283,7 +6537,7 @@ do - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -- ac_cv_prog_AR="${ac_tool_prefix}ar" -+ ac_cv_prog_AR="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -@@ -6303,11 +6557,15 @@ $as_echo "no" >&6; } - fi - - -+ test -n "$AR" && break -+ done - fi --if test -z "$ac_cv_prog_AR"; then -+if test -z "$AR"; then - ac_ct_AR=$AR -- # Extract the first word of "ar", so it can be a program name with args. --set dummy ar; ac_word=$2 -+ for ac_prog in ar -+do -+ # Extract the first word of "$ac_prog", so it can be a program name with args. -+set dummy $ac_prog; ac_word=$2 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 - $as_echo_n "checking for $ac_word... " >&6; } - if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : -@@ -6323,7 +6581,7 @@ do - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -- ac_cv_prog_ac_ct_AR="ar" -+ ac_cv_prog_ac_ct_AR="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -@@ -6342,6 +6600,10 @@ else - $as_echo "no" >&6; } - fi - -+ -+ test -n "$ac_ct_AR" && break -+done -+ - if test "x$ac_ct_AR" = x; then - AR="false" - else -@@ -6353,16 +6615,72 @@ ac_tool_warned=yes ;; - esac - AR=$ac_ct_AR - fi --else -- AR="$ac_cv_prog_AR" - fi - --test -z "$AR" && AR=ar --test -z "$AR_FLAGS" && AR_FLAGS=cru -+: ${AR=ar} -+: ${AR_FLAGS=cru} -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 -+$as_echo_n "checking for archiver @FILE support... " >&6; } -+if test "${lt_cv_ar_at_file+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ lt_cv_ar_at_file=no -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+ -+int -+main () -+{ - -+ ; -+ return 0; -+} -+_ACEOF -+if ac_fn_c_try_compile "$LINENO"; then : -+ echo conftest.$ac_objext > conftest.lst -+ lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' -+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 -+ (eval $lt_ar_try) 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -+ test $ac_status = 0; } -+ if test "$ac_status" -eq 0; then -+ # Ensure the archiver fails upon bogus file names. -+ rm -f conftest.$ac_objext libconftest.a -+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 -+ (eval $lt_ar_try) 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -+ test $ac_status = 0; } -+ if test "$ac_status" -ne 0; then -+ lt_cv_ar_at_file=@ -+ fi -+ fi -+ rm -f conftest.* libconftest.a - -+fi -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 -+$as_echo "$lt_cv_ar_at_file" >&6; } - -+if test "x$lt_cv_ar_at_file" = xno; then -+ archiver_list_spec= -+else -+ archiver_list_spec=$lt_cv_ar_at_file -+fi - - - -@@ -6704,8 +7022,8 @@ esac - lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" - - # Transform an extracted symbol line into symbol name and symbol address --lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" --lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" -+lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" -+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" - - # Handle CRLF in mingw tool chain - opt_cr= -@@ -6741,6 +7059,7 @@ for ac_symprfx in "" "_"; do - else - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" - fi -+ lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" - - # Check to see that the pipe works correctly. - pipe_works=no -@@ -6782,6 +7101,18 @@ _LT_EOF - if $GREP ' nm_test_var$' "$nlist" >/dev/null; then - if $GREP ' nm_test_func$' "$nlist" >/dev/null; then - cat <<_LT_EOF > conftest.$ac_ext -+/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ -+#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) -+/* DATA imports from DLLs on WIN32 con't be const, because runtime -+ relocations are performed -- see ld's documentation on pseudo-relocs. */ -+# define LT_DLSYM_CONST -+#elif defined(__osf__) -+/* This system does not cope well with relocations in const data. */ -+# define LT_DLSYM_CONST -+#else -+# define LT_DLSYM_CONST const -+#endif -+ - #ifdef __cplusplus - extern "C" { - #endif -@@ -6793,7 +7124,7 @@ _LT_EOF - cat <<_LT_EOF >> conftest.$ac_ext - - /* The mapping between symbol names and symbols. */ --const struct { -+LT_DLSYM_CONST struct { - const char *name; - void *address; - } -@@ -6819,8 +7150,8 @@ static const void *lt_preloaded_setup() - _LT_EOF - # Now try linking the two files. - mv conftest.$ac_objext conftstm.$ac_objext -- lt_save_LIBS="$LIBS" -- lt_save_CFLAGS="$CFLAGS" -+ lt_globsym_save_LIBS=$LIBS -+ lt_globsym_save_CFLAGS=$CFLAGS - LIBS="conftstm.$ac_objext" - CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 -@@ -6830,8 +7161,8 @@ _LT_EOF - test $ac_status = 0; } && test -s conftest${ac_exeext}; then - pipe_works=yes - fi -- LIBS="$lt_save_LIBS" -- CFLAGS="$lt_save_CFLAGS" -+ LIBS=$lt_globsym_save_LIBS -+ CFLAGS=$lt_globsym_save_CFLAGS - else - echo "cannot find nm_test_func in $nlist" >&5 - fi -@@ -6868,6 +7199,19 @@ else - $as_echo "ok" >&6; } - fi - -+# Response file support. -+if test "$lt_cv_nm_interface" = "MS dumpbin"; then -+ nm_file_list_spec='@' -+elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then -+ nm_file_list_spec='@' -+fi -+ -+ -+ -+ -+ -+ -+ - - - -@@ -6888,6 +7232,42 @@ fi - - - -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 -+$as_echo_n "checking for sysroot... " >&6; } -+ -+# Check whether --with-libtool-sysroot was given. -+if test "${with_libtool_sysroot+set}" = set; then : -+ withval=$with_libtool_sysroot; -+else -+ with_libtool_sysroot=no -+fi -+ -+ -+lt_sysroot= -+case ${with_libtool_sysroot} in #( -+ yes) -+ if test "$GCC" = yes; then -+ lt_sysroot=`$CC --print-sysroot 2>/dev/null` -+ fi -+ ;; #( -+ /*) -+ lt_sysroot=`echo "$with_libtool_sysroot" | sed -e "$sed_quote_subst"` -+ ;; #( -+ no|'') -+ ;; #( -+ *) -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libtool_sysroot}" >&5 -+$as_echo "${with_libtool_sysroot}" >&6; } -+ as_fn_error "The sysroot must be an absolute path." "$LINENO" 5 -+ ;; -+esac -+ -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 -+$as_echo "${lt_sysroot:-no}" >&6; } -+ -+ -+ -+ - - # Check whether --enable-libtool-lock was given. - if test "${enable_libtool_lock+set}" = set; then : -@@ -7082,6 +7462,123 @@ esac - - need_locks="$enable_libtool_lock" - -+if test -n "$ac_tool_prefix"; then -+ # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. -+set dummy ${ac_tool_prefix}mt; ac_word=$2 -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -+$as_echo_n "checking for $ac_word... " >&6; } -+if test "${ac_cv_prog_MANIFEST_TOOL+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ if test -n "$MANIFEST_TOOL"; then -+ ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. -+else -+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -+ ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" -+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ break 2 -+ fi -+done -+ done -+IFS=$as_save_IFS -+ -+fi -+fi -+MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL -+if test -n "$MANIFEST_TOOL"; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 -+$as_echo "$MANIFEST_TOOL" >&6; } -+else -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } -+fi -+ -+ -+fi -+if test -z "$ac_cv_prog_MANIFEST_TOOL"; then -+ ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL -+ # Extract the first word of "mt", so it can be a program name with args. -+set dummy mt; ac_word=$2 -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -+$as_echo_n "checking for $ac_word... " >&6; } -+if test "${ac_cv_prog_ac_ct_MANIFEST_TOOL+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ if test -n "$ac_ct_MANIFEST_TOOL"; then -+ ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. -+else -+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -+ ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" -+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ break 2 -+ fi -+done -+ done -+IFS=$as_save_IFS -+ -+fi -+fi -+ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL -+if test -n "$ac_ct_MANIFEST_TOOL"; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 -+$as_echo "$ac_ct_MANIFEST_TOOL" >&6; } -+else -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } -+fi -+ -+ if test "x$ac_ct_MANIFEST_TOOL" = x; then -+ MANIFEST_TOOL=":" -+ else -+ case $cross_compiling:$ac_tool_warned in -+yes:) -+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -+ac_tool_warned=yes ;; -+esac -+ MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL -+ fi -+else -+ MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" -+fi -+ -+test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 -+$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } -+if test "${lt_cv_path_mainfest_tool+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ lt_cv_path_mainfest_tool=no -+ echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 -+ $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out -+ cat conftest.err >&5 -+ if $GREP 'Manifest Tool' conftest.out > /dev/null; then -+ lt_cv_path_mainfest_tool=yes -+ fi -+ rm -f conftest* -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 -+$as_echo "$lt_cv_path_mainfest_tool" >&6; } -+if test "x$lt_cv_path_mainfest_tool" != xyes; then -+ MANIFEST_TOOL=: -+fi -+ -+ -+ -+ -+ - - case $host_os in - rhapsody* | darwin*) -@@ -7645,6 +8142,8 @@ _LT_EOF - $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 - echo "$AR cru libconftest.a conftest.o" >&5 - $AR cru libconftest.a conftest.o 2>&5 -+ echo "$RANLIB libconftest.a" >&5 -+ $RANLIB libconftest.a 2>&5 - cat > conftest.c << _LT_EOF - int main() { return 0;} - _LT_EOF -@@ -7840,7 +8339,8 @@ fi - LIBTOOL_DEPS="$ltmain" - - # Always use our own libtool. --LIBTOOL='$(SHELL) $(top_builddir)/libtool' -+LIBTOOL='$(SHELL) $(top_builddir)' -+LIBTOOL="$LIBTOOL/${host_alias}-libtool" - - - -@@ -7929,7 +8429,7 @@ aix3*) - esac - - # Global variables: --ofile=libtool -+ofile=${host_alias}-libtool - can_build_shared=yes - - # All known linkers require a `.a' archive for static linking (except MSVC, -@@ -8227,8 +8727,6 @@ fi - lt_prog_compiler_pic= - lt_prog_compiler_static= - --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 --$as_echo_n "checking for $compiler option to produce PIC... " >&6; } - - if test "$GCC" = yes; then - lt_prog_compiler_wl='-Wl,' -@@ -8393,6 +8891,12 @@ $as_echo_n "checking for $compiler optio - lt_prog_compiler_pic='--shared' - lt_prog_compiler_static='--static' - ;; -+ nagfor*) -+ # NAG Fortran compiler -+ lt_prog_compiler_wl='-Wl,-Wl,,' -+ lt_prog_compiler_pic='-PIC' -+ lt_prog_compiler_static='-Bstatic' -+ ;; - pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) -@@ -8455,7 +8959,7 @@ $as_echo_n "checking for $compiler optio - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - case $cc_basename in -- f77* | f90* | f95*) -+ f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) - lt_prog_compiler_wl='-Qoption ld ';; - *) - lt_prog_compiler_wl='-Wl,';; -@@ -8512,13 +9016,17 @@ case $host_os in - lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" - ;; - esac --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5 --$as_echo "$lt_prog_compiler_pic" >&6; } -- -- -- -- - -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -+$as_echo_n "checking for $compiler option to produce PIC... " >&6; } -+if test "${lt_cv_prog_compiler_pic+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ lt_cv_prog_compiler_pic=$lt_prog_compiler_pic -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 -+$as_echo "$lt_cv_prog_compiler_pic" >&6; } -+lt_prog_compiler_pic=$lt_cv_prog_compiler_pic - - # - # Check to make sure the PIC flag actually works. -@@ -8579,6 +9087,11 @@ fi - - - -+ -+ -+ -+ -+ - # - # Check to make sure the static flag actually works. - # -@@ -8929,7 +9442,8 @@ _LT_EOF - allow_undefined_flag=unsupported - always_export_symbols=no - enable_shared_with_static_runtimes=yes -- export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' -+ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' -+ exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' -@@ -8977,7 +9491,7 @@ _LT_EOF - if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ - && test "$tmp_diet" = no - then -- tmp_addflag= -+ tmp_addflag=' $pic_flag' - tmp_sharedflag='-shared' - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler -@@ -9028,12 +9542,12 @@ _LT_EOF - whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' - hardcode_libdir_flag_spec= - hardcode_libdir_flag_spec_ld='-rpath $libdir' -- archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' -+ archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then - archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ -- $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' -+ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' - fi - ;; - esac -@@ -9047,8 +9561,8 @@ _LT_EOF - archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else -- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' -+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - -@@ -9066,8 +9580,8 @@ _LT_EOF - - _LT_EOF - elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then -- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' -+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi -@@ -9113,8 +9627,8 @@ _LT_EOF - - *) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then -- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' -+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi -@@ -9244,7 +9758,13 @@ _LT_EOF - allow_undefined_flag='-berok' - # Determine the default libpath from the value encoded in an - # empty executable. -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+ if test "${lt_cv_aix_libpath+set}" = set; then -+ aix_libpath=$lt_cv_aix_libpath -+else -+ if test "${lt_cv_aix_libpath_+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - - int -@@ -9257,22 +9777,29 @@ main () - _ACEOF - if ac_fn_c_try_link "$LINENO"; then : - --lt_aix_libpath_sed=' -- /Import File Strings/,/^$/ { -- /^0/ { -- s/^0 *\(.*\)$/\1/ -- p -- } -- }' --aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` --# Check for a 64-bit object if we didn't find anything. --if test -z "$aix_libpath"; then -- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` --fi -+ lt_aix_libpath_sed=' -+ /Import File Strings/,/^$/ { -+ /^0/ { -+ s/^0 *\([^ ]*\) *$/\1/ -+ p -+ } -+ }' -+ lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -+ # Check for a 64-bit object if we didn't find anything. -+ if test -z "$lt_cv_aix_libpath_"; then -+ lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -+ fi - fi - rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext --if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi -+ if test -z "$lt_cv_aix_libpath_"; then -+ lt_cv_aix_libpath_="/usr/lib:/lib" -+ fi -+ -+fi -+ -+ aix_libpath=$lt_cv_aix_libpath_ -+fi - - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" -@@ -9284,7 +9811,13 @@ if test -z "$aix_libpath"; then aix_libp - else - # Determine the default libpath from the value encoded in an - # empty executable. -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+ if test "${lt_cv_aix_libpath+set}" = set; then -+ aix_libpath=$lt_cv_aix_libpath -+else -+ if test "${lt_cv_aix_libpath_+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - - int -@@ -9297,22 +9830,29 @@ main () - _ACEOF - if ac_fn_c_try_link "$LINENO"; then : - --lt_aix_libpath_sed=' -- /Import File Strings/,/^$/ { -- /^0/ { -- s/^0 *\(.*\)$/\1/ -- p -- } -- }' --aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` --# Check for a 64-bit object if we didn't find anything. --if test -z "$aix_libpath"; then -- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` --fi -+ lt_aix_libpath_sed=' -+ /Import File Strings/,/^$/ { -+ /^0/ { -+ s/^0 *\([^ ]*\) *$/\1/ -+ p -+ } -+ }' -+ lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -+ # Check for a 64-bit object if we didn't find anything. -+ if test -z "$lt_cv_aix_libpath_"; then -+ lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -+ fi - fi - rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext --if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi -+ if test -z "$lt_cv_aix_libpath_"; then -+ lt_cv_aix_libpath_="/usr/lib:/lib" -+ fi -+ -+fi -+ -+ aix_libpath=$lt_cv_aix_libpath_ -+fi - - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, -@@ -9357,20 +9897,63 @@ if test -z "$aix_libpath"; then aix_libp - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. -- hardcode_libdir_flag_spec=' ' -- allow_undefined_flag=unsupported -- # Tell ltmain to make .lib files, not .a files. -- libext=lib -- # Tell ltmain to make .dll files, not .so files. -- shrext_cmds=".dll" -- # FIXME: Setting linknames here is a bad hack. -- archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' -- # The linker will automatically build a .lib file if we build a DLL. -- old_archive_from_new_cmds='true' -- # FIXME: Should let the user specify the lib program. -- old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' -- fix_srcfile_path='`cygpath -w "$srcfile"`' -- enable_shared_with_static_runtimes=yes -+ case $cc_basename in -+ cl*) -+ # Native MSVC -+ hardcode_libdir_flag_spec=' ' -+ allow_undefined_flag=unsupported -+ always_export_symbols=yes -+ file_list_spec='@' -+ # Tell ltmain to make .lib files, not .a files. -+ libext=lib -+ # Tell ltmain to make .dll files, not .so files. -+ shrext_cmds=".dll" -+ # FIXME: Setting linknames here is a bad hack. -+ archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' -+ archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then -+ sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; -+ else -+ sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; -+ fi~ -+ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ -+ linknames=' -+ # The linker will not automatically build a static lib if we build a DLL. -+ # _LT_TAGVAR(old_archive_from_new_cmds, )='true' -+ enable_shared_with_static_runtimes=yes -+ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' -+ # Don't use ranlib -+ old_postinstall_cmds='chmod 644 $oldlib' -+ postlink_cmds='lt_outputfile="@OUTPUT@"~ -+ lt_tool_outputfile="@TOOL_OUTPUT@"~ -+ case $lt_outputfile in -+ *.exe|*.EXE) ;; -+ *) -+ lt_outputfile="$lt_outputfile.exe" -+ lt_tool_outputfile="$lt_tool_outputfile.exe" -+ ;; -+ esac~ -+ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then -+ $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; -+ $RM "$lt_outputfile.manifest"; -+ fi' -+ ;; -+ *) -+ # Assume MSVC wrapper -+ hardcode_libdir_flag_spec=' ' -+ allow_undefined_flag=unsupported -+ # Tell ltmain to make .lib files, not .a files. -+ libext=lib -+ # Tell ltmain to make .dll files, not .so files. -+ shrext_cmds=".dll" -+ # FIXME: Setting linknames here is a bad hack. -+ archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' -+ # The linker will automatically build a .lib file if we build a DLL. -+ old_archive_from_new_cmds='true' -+ # FIXME: Should let the user specify the lib program. -+ old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' -+ enable_shared_with_static_runtimes=yes -+ ;; -+ esac - ;; - - darwin* | rhapsody*) -@@ -9435,7 +10018,7 @@ if test -z "$aix_libpath"; then aix_libp - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) -- archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' -+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no -@@ -9443,7 +10026,7 @@ if test -z "$aix_libpath"; then aix_libp - - hpux9*) - if test "$GCC" = yes; then -- archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' -+ archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - fi -@@ -9459,7 +10042,7 @@ if test -z "$aix_libpath"; then aix_libp - - hpux10*) - if test "$GCC" = yes && test "$with_gnu_ld" = no; then -- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' -+ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi -@@ -9483,10 +10066,10 @@ if test -z "$aix_libpath"; then aix_libp - archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) -- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' -+ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) -- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' -+ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else -@@ -9565,23 +10148,36 @@ fi - - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then -- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' -+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - # Try to use the -exported_symbol ld option, if it does not - # work, assume that -exports_file does not work either and - # implicitly export all symbols. -- save_LDFLAGS="$LDFLAGS" -- LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+ # This should be the same for all languages, so no per-tag cache variable. -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 -+$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } -+if test "${lt_cv_irix_exported_symbol+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ save_LDFLAGS="$LDFLAGS" -+ LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ --int foo(void) {} -+int foo (void) { return 0; } - _ACEOF - if ac_fn_c_try_link "$LINENO"; then : -- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' -- -+ lt_cv_irix_exported_symbol=yes -+else -+ lt_cv_irix_exported_symbol=no - fi - rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -- LDFLAGS="$save_LDFLAGS" -+ LDFLAGS="$save_LDFLAGS" -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 -+$as_echo "$lt_cv_irix_exported_symbol" >&6; } -+ if test "$lt_cv_irix_exported_symbol" = yes; then -+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' -+ fi - else - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' -@@ -9666,7 +10262,7 @@ rm -f core conftest.err conftest.$ac_obj - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' -- archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' -+ archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - else - allow_undefined_flag=' -expect_unresolved \*' -@@ -9685,9 +10281,9 @@ rm -f core conftest.err conftest.$ac_obj - no_undefined_flag=' -z defs' - if test "$GCC" = yes; then - wlarc='${wl}' -- archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' -+ archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ -- $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' -+ $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - else - case `$CC -V 2>&1` in - *"Compilers 5.0"*) -@@ -10263,8 +10859,9 @@ cygwin* | mingw* | pw32* | cegcc*) - need_version=no - need_lib_prefix=no - -- case $GCC,$host_os in -- yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) -+ case $GCC,$cc_basename in -+ yes,*) -+ # gcc - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ -@@ -10297,13 +10894,71 @@ cygwin* | mingw* | pw32* | cegcc*) - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - ;; - esac -+ dynamic_linker='Win32 ld.exe' -+ ;; -+ -+ *,cl*) -+ # Native MSVC -+ libname_spec='$name' -+ soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' -+ library_names_spec='${libname}.dll.lib' -+ -+ case $build_os in -+ mingw*) -+ sys_lib_search_path_spec= -+ lt_save_ifs=$IFS -+ IFS=';' -+ for lt_path in $LIB -+ do -+ IFS=$lt_save_ifs -+ # Let DOS variable expansion print the short 8.3 style file name. -+ lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` -+ sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" -+ done -+ IFS=$lt_save_ifs -+ # Convert to MSYS style. -+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` -+ ;; -+ cygwin*) -+ # Convert to unix form, then to dos form, then back to unix form -+ # but this time dos style (no spaces!) so that the unix form looks -+ # like /cygdrive/c/PROGRA~1:/cygdr... -+ sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` -+ sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` -+ sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` -+ ;; -+ *) -+ sys_lib_search_path_spec="$LIB" -+ if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then -+ # It is most probably a Windows format PATH. -+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` -+ else -+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` -+ fi -+ # FIXME: find the short name or the path components, as spaces are -+ # common. (e.g. "Program Files" -> "PROGRA~1") -+ ;; -+ esac -+ -+ # DLL is installed to $(libdir)/../bin by postinstall_cmds -+ postinstall_cmds='base_file=`basename \${file}`~ -+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ -+ dldir=$destdir/`dirname \$dlpath`~ -+ test -d \$dldir || mkdir -p \$dldir~ -+ $install_prog $dir/$dlname \$dldir/$dlname' -+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ -+ dlpath=$dir/\$dldll~ -+ $RM \$dlpath' -+ shlibpath_overrides_runpath=yes -+ dynamic_linker='Win32 link.exe' - ;; - - *) -+ # Assume MSVC wrapper - library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' -+ dynamic_linker='Win32 ld.exe' - ;; - esac -- dynamic_linker='Win32 ld.exe' - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; -@@ -10399,7 +11054,7 @@ haiku*) - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LIBRARY_PATH - shlibpath_overrides_runpath=yes -- sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib' -+ sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' - hardcode_into_libs=yes - ;; - -@@ -11195,7 +11850,7 @@ else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF --#line 11198 "configure" -+#line $LINENO "configure" - #include "confdefs.h" - - #if HAVE_DLFCN_H -@@ -11239,10 +11894,10 @@ else - /* When -fvisbility=hidden is used, assume the code has been annotated - correspondingly for the symbols needed. */ - #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) --void fnord () __attribute__((visibility("default"))); -+int fnord () __attribute__((visibility("default"))); - #endif - --void fnord () { int i=42; } -+int fnord () { return 42; } - int main () - { - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); -@@ -11301,7 +11956,7 @@ else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF --#line 11304 "configure" -+#line $LINENO "configure" - #include "confdefs.h" - - #if HAVE_DLFCN_H -@@ -11345,10 +12000,10 @@ else - /* When -fvisbility=hidden is used, assume the code has been annotated - correspondingly for the symbols needed. */ - #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) --void fnord () __attribute__((visibility("default"))); -+int fnord () __attribute__((visibility("default"))); - #endif - --void fnord () { int i=42; } -+int fnord () { return 42; } - int main () - { - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); -@@ -14941,13 +15596,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_ - lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' - lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' - lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' -+lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' -+lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' - reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' - reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' - OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' - deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' - file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' -+file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' -+want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' -+DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' -+sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' - AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' - AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' -+archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' - STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' - RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' - old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' -@@ -14962,14 +15624,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$l - lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' - lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' - lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' -+nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' -+lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' - objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' - MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' - lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' --lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' - lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' -+lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' - lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' - lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' - need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' -+MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' - DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' - NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' - LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' -@@ -15002,12 +15667,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcod - hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' - inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' - link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' --fix_srcfile_path='`$ECHO "$fix_srcfile_path" | $SED "$delay_single_quote_subst"`' - always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' - export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' - exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' - include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' - prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' -+postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' - file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' - variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' - need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' -@@ -15062,8 +15727,13 @@ reload_flag \ - OBJDUMP \ - deplibs_check_method \ - file_magic_cmd \ -+file_magic_glob \ -+want_nocaseglob \ -+DLLTOOL \ -+sharedlib_from_linklib_cmd \ - AR \ - AR_FLAGS \ -+archiver_list_spec \ - STRIP \ - RANLIB \ - CC \ -@@ -15073,12 +15743,14 @@ lt_cv_sys_global_symbol_pipe \ - lt_cv_sys_global_symbol_to_cdecl \ - lt_cv_sys_global_symbol_to_c_name_address \ - lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ -+nm_file_list_spec \ - lt_prog_compiler_no_builtin_flag \ --lt_prog_compiler_wl \ - lt_prog_compiler_pic \ -+lt_prog_compiler_wl \ - lt_prog_compiler_static \ - lt_cv_prog_compiler_c_o \ - need_locks \ -+MANIFEST_TOOL \ - DSYMUTIL \ - NMEDIT \ - LIPO \ -@@ -15094,7 +15766,6 @@ no_undefined_flag \ - hardcode_libdir_flag_spec \ - hardcode_libdir_flag_spec_ld \ - hardcode_libdir_separator \ --fix_srcfile_path \ - exclude_expsyms \ - include_expsyms \ - file_list_spec \ -@@ -15130,6 +15801,7 @@ module_cmds \ - module_expsym_cmds \ - export_symbols_cmds \ - prelink_cmds \ -+postlink_cmds \ - postinstall_cmds \ - postuninstall_cmds \ - finish_cmds \ -@@ -15894,7 +16566,8 @@ $as_echo X"$file" | - # NOTE: Changes made to this file will be lost: look at ltmain.sh. - # - # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, --# 2006, 2007, 2008, 2009 Free Software Foundation, Inc. -+# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, -+# Inc. - # Written by Gordon Matzigkeit, 1996 - # - # This file is part of GNU Libtool. -@@ -15997,19 +16670,42 @@ SP2NL=$lt_lt_SP2NL - # turn newlines into spaces. - NL2SP=$lt_lt_NL2SP - -+# convert \$build file names to \$host format. -+to_host_file_cmd=$lt_cv_to_host_file_cmd -+ -+# convert \$build files to toolchain format. -+to_tool_file_cmd=$lt_cv_to_tool_file_cmd -+ - # An object symbol dumper. - OBJDUMP=$lt_OBJDUMP - - # Method to check whether dependent libraries are shared objects. - deplibs_check_method=$lt_deplibs_check_method - --# Command to use when deplibs_check_method == "file_magic". -+# Command to use when deplibs_check_method = "file_magic". - file_magic_cmd=$lt_file_magic_cmd - -+# How to find potential files when deplibs_check_method = "file_magic". -+file_magic_glob=$lt_file_magic_glob -+ -+# Find potential files using nocaseglob when deplibs_check_method = "file_magic". -+want_nocaseglob=$lt_want_nocaseglob -+ -+# DLL creation program. -+DLLTOOL=$lt_DLLTOOL -+ -+# Command to associate shared and link libraries. -+sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd -+ - # The archiver. - AR=$lt_AR -+ -+# Flags to create an archive. - AR_FLAGS=$lt_AR_FLAGS - -+# How to feed a file listing to the archiver. -+archiver_list_spec=$lt_archiver_list_spec -+ - # A symbol stripping program. - STRIP=$lt_STRIP - -@@ -16039,6 +16735,12 @@ global_symbol_to_c_name_address=$lt_lt_c - # Transform the output of nm in a C name address pair when lib prefix is needed. - global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix - -+# Specify filename containing input files for \$NM. -+nm_file_list_spec=$lt_nm_file_list_spec -+ -+# The root where to search for dependent libraries,and in which our libraries should be installed. -+lt_sysroot=$lt_sysroot -+ - # The name of the directory that contains temporary libtool files. - objdir=$objdir - -@@ -16048,6 +16750,9 @@ MAGIC_CMD=$MAGIC_CMD - # Must we lock files when doing compilation? - need_locks=$lt_need_locks - -+# Manifest tool. -+MANIFEST_TOOL=$lt_MANIFEST_TOOL -+ - # Tool to manipulate archived DWARF debug symbol files on Mac OS X. - DSYMUTIL=$lt_DSYMUTIL - -@@ -16162,12 +16867,12 @@ with_gcc=$GCC - # Compiler flag to turn off builtin functions. - no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag - --# How to pass a linker flag through the compiler. --wl=$lt_lt_prog_compiler_wl -- - # Additional compiler flags for building library objects. - pic_flag=$lt_lt_prog_compiler_pic - -+# How to pass a linker flag through the compiler. -+wl=$lt_lt_prog_compiler_wl -+ - # Compiler flag to prevent dynamic linking. - link_static_flag=$lt_lt_prog_compiler_static - -@@ -16254,9 +16959,6 @@ inherit_rpath=$inherit_rpath - # Whether libtool must link a program against all its dependency libraries. - link_all_deplibs=$link_all_deplibs - --# Fix the shell variable \$srcfile for the compiler. --fix_srcfile_path=$lt_fix_srcfile_path -- - # Set to "yes" if exported symbols are required. - always_export_symbols=$always_export_symbols - -@@ -16272,6 +16974,9 @@ include_expsyms=$lt_include_expsyms - # Commands necessary for linking programs (against libraries) with templates. - prelink_cmds=$lt_prelink_cmds - -+# Commands necessary for finishing linking programs. -+postlink_cmds=$lt_postlink_cmds -+ - # Specify filename containing input files. - file_list_spec=$lt_file_list_spec - -@@ -16304,210 +17009,169 @@ ltmain="$ac_aux_dir/ltmain.sh" - # if finds mixed CR/LF and LF-only lines. Since sed operates in - # text mode, it properly converts lines to CR/LF. This bash problem - # is reportedly fixed, but why not run on old versions too? -- sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ -- || (rm -f "$cfgfile"; exit 1) -- -- case $xsi_shell in -- yes) -- cat << \_LT_EOF >> "$cfgfile" -- --# func_dirname file append nondir_replacement --# Compute the dirname of FILE. If nonempty, add APPEND to the result, --# otherwise set result to NONDIR_REPLACEMENT. --func_dirname () --{ -- case ${1} in -- */*) func_dirname_result="${1%/*}${2}" ;; -- * ) func_dirname_result="${3}" ;; -- esac --} -- --# func_basename file --func_basename () --{ -- func_basename_result="${1##*/}" --} -- --# func_dirname_and_basename file append nondir_replacement --# perform func_basename and func_dirname in a single function --# call: --# dirname: Compute the dirname of FILE. If nonempty, --# add APPEND to the result, otherwise set result --# to NONDIR_REPLACEMENT. --# value returned in "$func_dirname_result" --# basename: Compute filename of FILE. --# value retuned in "$func_basename_result" --# Implementation must be kept synchronized with func_dirname --# and func_basename. For efficiency, we do not delegate to --# those functions but instead duplicate the functionality here. --func_dirname_and_basename () --{ -- case ${1} in -- */*) func_dirname_result="${1%/*}${2}" ;; -- * ) func_dirname_result="${3}" ;; -- esac -- func_basename_result="${1##*/}" --} -- --# func_stripname prefix suffix name --# strip PREFIX and SUFFIX off of NAME. --# PREFIX and SUFFIX must not contain globbing or regex special --# characters, hashes, percent signs, but SUFFIX may contain a leading --# dot (in which case that matches only a dot). --func_stripname () --{ -- # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are -- # positional parameters, so assign one to ordinary parameter first. -- func_stripname_result=${3} -- func_stripname_result=${func_stripname_result#"${1}"} -- func_stripname_result=${func_stripname_result%"${2}"} --} -- --# func_opt_split --func_opt_split () --{ -- func_opt_split_opt=${1%%=*} -- func_opt_split_arg=${1#*=} --} -- --# func_lo2o object --func_lo2o () --{ -- case ${1} in -- *.lo) func_lo2o_result=${1%.lo}.${objext} ;; -- *) func_lo2o_result=${1} ;; -- esac --} -- --# func_xform libobj-or-source --func_xform () --{ -- func_xform_result=${1%.*}.lo --} -- --# func_arith arithmetic-term... --func_arith () --{ -- func_arith_result=$(( $* )) --} -- --# func_len string --# STRING may not start with a hyphen. --func_len () --{ -- func_len_result=${#1} --} -- --_LT_EOF -- ;; -- *) # Bourne compatible functions. -- cat << \_LT_EOF >> "$cfgfile" -- --# func_dirname file append nondir_replacement --# Compute the dirname of FILE. If nonempty, add APPEND to the result, --# otherwise set result to NONDIR_REPLACEMENT. --func_dirname () --{ -- # Extract subdirectory from the argument. -- func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` -- if test "X$func_dirname_result" = "X${1}"; then -- func_dirname_result="${3}" -- else -- func_dirname_result="$func_dirname_result${2}" -- fi --} -- --# func_basename file --func_basename () --{ -- func_basename_result=`$ECHO "${1}" | $SED "$basename"` --} -- -- --# func_stripname prefix suffix name --# strip PREFIX and SUFFIX off of NAME. --# PREFIX and SUFFIX must not contain globbing or regex special --# characters, hashes, percent signs, but SUFFIX may contain a leading --# dot (in which case that matches only a dot). --# func_strip_suffix prefix name --func_stripname () --{ -- case ${2} in -- .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; -- *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; -- esac --} -- --# sed scripts: --my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q' --my_sed_long_arg='1s/^-[^=]*=//' -- --# func_opt_split --func_opt_split () --{ -- func_opt_split_opt=`$ECHO "${1}" | $SED "$my_sed_long_opt"` -- func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"` --} -- --# func_lo2o object --func_lo2o () --{ -- func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` --} -- --# func_xform libobj-or-source --func_xform () --{ -- func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` --} -- --# func_arith arithmetic-term... --func_arith () --{ -- func_arith_result=`expr "$@"` --} -- --# func_len string --# STRING may not start with a hyphen. --func_len () --{ -- func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` --} -- --_LT_EOF --esac -- --case $lt_shell_append in -- yes) -- cat << \_LT_EOF >> "$cfgfile" -- --# func_append var value --# Append VALUE to the end of shell variable VAR. --func_append () --{ -- eval "$1+=\$2" --} --_LT_EOF -- ;; -- *) -- cat << \_LT_EOF >> "$cfgfile" -- --# func_append var value --# Append VALUE to the end of shell variable VAR. --func_append () --{ -- eval "$1=\$$1\$2" --} -- --_LT_EOF -- ;; -- esac -+ sed '$q' "$ltmain" >> "$cfgfile" \ -+ || (rm -f "$cfgfile"; exit 1) - -+ if test x"$xsi_shell" = xyes; then -+ sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ -+func_dirname ()\ -+{\ -+\ case ${1} in\ -+\ */*) func_dirname_result="${1%/*}${2}" ;;\ -+\ * ) func_dirname_result="${3}" ;;\ -+\ esac\ -+} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_basename ()$/,/^} # func_basename /c\ -+func_basename ()\ -+{\ -+\ func_basename_result="${1##*/}"\ -+} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ -+func_dirname_and_basename ()\ -+{\ -+\ case ${1} in\ -+\ */*) func_dirname_result="${1%/*}${2}" ;;\ -+\ * ) func_dirname_result="${3}" ;;\ -+\ esac\ -+\ func_basename_result="${1##*/}"\ -+} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ -+func_stripname ()\ -+{\ -+\ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ -+\ # positional parameters, so assign one to ordinary parameter first.\ -+\ func_stripname_result=${3}\ -+\ func_stripname_result=${func_stripname_result#"${1}"}\ -+\ func_stripname_result=${func_stripname_result%"${2}"}\ -+} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ -+func_split_long_opt ()\ -+{\ -+\ func_split_long_opt_name=${1%%=*}\ -+\ func_split_long_opt_arg=${1#*=}\ -+} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ -+func_split_short_opt ()\ -+{\ -+\ func_split_short_opt_arg=${1#??}\ -+\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ -+} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ -+func_lo2o ()\ -+{\ -+\ case ${1} in\ -+\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ -+\ *) func_lo2o_result=${1} ;;\ -+\ esac\ -+} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_xform ()$/,/^} # func_xform /c\ -+func_xform ()\ -+{\ -+ func_xform_result=${1%.*}.lo\ -+} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_arith ()$/,/^} # func_arith /c\ -+func_arith ()\ -+{\ -+ func_arith_result=$(( $* ))\ -+} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_len ()$/,/^} # func_len /c\ -+func_len ()\ -+{\ -+ func_len_result=${#1}\ -+} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+fi -+ -+if test x"$lt_shell_append" = xyes; then -+ sed -e '/^func_append ()$/,/^} # func_append /c\ -+func_append ()\ -+{\ -+ eval "${1}+=\\${2}"\ -+} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ -+func_append_quoted ()\ -+{\ -+\ func_quote_for_eval "${2}"\ -+\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ -+} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ # Save a `func_append' function call where possible by direct use of '+=' -+ sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+ test 0 -eq $? || _lt_function_replace_fail=: -+else -+ # Save a `func_append' function call even when '+=' is not available -+ sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+ test 0 -eq $? || _lt_function_replace_fail=: -+fi -+ -+if test x"$_lt_function_replace_fail" = x":"; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 -+$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} -+fi - -- sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ -- || (rm -f "$cfgfile"; exit 1) - -- mv -f "$cfgfile" "$ofile" || -+ mv -f "$cfgfile" "$ofile" || - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" - -Index: binutils-2.21.1/gprof/configure -=================================================================== ---- binutils-2.21.1.orig/gprof/configure -+++ binutils-2.21.1/gprof/configure -@@ -629,8 +629,11 @@ OTOOL - LIPO - NMEDIT - DSYMUTIL -+MANIFEST_TOOL - RANLIB -+ac_ct_AR - AR -+DLLTOOL - OBJDUMP - LN_S - NM -@@ -743,6 +746,7 @@ enable_static - with_pic - enable_fast_install - with_gnu_ld -+with_libtool_sysroot - enable_libtool_lock - enable_nls - enable_maintainer_mode -@@ -1397,6 +1401,8 @@ Optional Packages: - --with-pic try to use only PIC/non-PIC objects [default=use - both] - --with-gnu-ld assume the C compiler uses GNU ld [default=no] -+ --with-libtool-sysroot=DIR Search for dependent libraries within DIR -+ (or the compiler's sysroot if not specified). - - Some influential environment variables: - CC C compiler command -@@ -5065,8 +5071,8 @@ esac - - - --macro_version='2.2.7a' --macro_revision='1.3134' -+macro_version='2.4' -+macro_revision='1.3293' - - - -@@ -5106,7 +5112,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 - $as_echo_n "checking how to print strings... " >&6; } - # Test print first, because it will be a builtin if present. --if test "X`print -r -- -n 2>/dev/null`" = X-n && \ -+if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ - test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then - ECHO='print -r --' - elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then -@@ -5792,8 +5798,8 @@ $as_echo_n "checking whether the shell u - # Try some XSI features - xsi_shell=no - ( _lt_dummy="a/b/c" -- test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ -- = c,a/b,, \ -+ test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ -+ = c,a/b,b/c, \ - && eval 'test $(( 1 + 1 )) -eq 2 \ - && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ - && xsi_shell=yes -@@ -5842,6 +5848,80 @@ esac - - - -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 -+$as_echo_n "checking how to convert $build file names to $host format... " >&6; } -+if test "${lt_cv_to_host_file_cmd+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ case $host in -+ *-*-mingw* ) -+ case $build in -+ *-*-mingw* ) # actually msys -+ lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 -+ ;; -+ *-*-cygwin* ) -+ lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 -+ ;; -+ * ) # otherwise, assume *nix -+ lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 -+ ;; -+ esac -+ ;; -+ *-*-cygwin* ) -+ case $build in -+ *-*-mingw* ) # actually msys -+ lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin -+ ;; -+ *-*-cygwin* ) -+ lt_cv_to_host_file_cmd=func_convert_file_noop -+ ;; -+ * ) # otherwise, assume *nix -+ lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin -+ ;; -+ esac -+ ;; -+ * ) # unhandled hosts (and "normal" native builds) -+ lt_cv_to_host_file_cmd=func_convert_file_noop -+ ;; -+esac -+ -+fi -+ -+to_host_file_cmd=$lt_cv_to_host_file_cmd -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 -+$as_echo "$lt_cv_to_host_file_cmd" >&6; } -+ -+ -+ -+ -+ -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 -+$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } -+if test "${lt_cv_to_tool_file_cmd+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ #assume ordinary cross tools, or native build. -+lt_cv_to_tool_file_cmd=func_convert_file_noop -+case $host in -+ *-*-mingw* ) -+ case $build in -+ *-*-mingw* ) # actually msys -+ lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 -+ ;; -+ esac -+ ;; -+esac -+ -+fi -+ -+to_tool_file_cmd=$lt_cv_to_tool_file_cmd -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 -+$as_echo "$lt_cv_to_tool_file_cmd" >&6; } -+ -+ -+ -+ -+ - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 - $as_echo_n "checking for $LD option to reload object files... " >&6; } - if test "${lt_cv_ld_reload_flag+set}" = set; then : -@@ -5858,6 +5938,11 @@ case $reload_flag in - esac - reload_cmds='$LD$reload_flag -o $output$reload_objs' - case $host_os in -+ cygwin* | mingw* | pw32* | cegcc*) -+ if test "$GCC" != yes; then -+ reload_cmds=false -+ fi -+ ;; - darwin*) - if test "$GCC" = yes; then - reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' -@@ -6026,7 +6111,8 @@ mingw* | pw32*) - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - else -- lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' -+ # Keep this pattern in sync with the one in func_win32_libid. -+ lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' - lt_cv_file_magic_cmd='$OBJDUMP -f' - fi - ;; -@@ -6185,6 +6271,21 @@ esac - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 - $as_echo "$lt_cv_deplibs_check_method" >&6; } -+ -+file_magic_glob= -+want_nocaseglob=no -+if test "$build" = "$host"; then -+ case $host_os in -+ mingw* | pw32*) -+ if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then -+ want_nocaseglob=yes -+ else -+ file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` -+ fi -+ ;; -+ esac -+fi -+ - file_magic_cmd=$lt_cv_file_magic_cmd - deplibs_check_method=$lt_cv_deplibs_check_method - test -z "$deplibs_check_method" && deplibs_check_method=unknown -@@ -6200,9 +6301,162 @@ test -z "$deplibs_check_method" && depli - - - -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ - if test -n "$ac_tool_prefix"; then -- # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. --set dummy ${ac_tool_prefix}ar; ac_word=$2 -+ # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. -+set dummy ${ac_tool_prefix}dlltool; ac_word=$2 -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -+$as_echo_n "checking for $ac_word... " >&6; } -+if test "${ac_cv_prog_DLLTOOL+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ if test -n "$DLLTOOL"; then -+ ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. -+else -+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -+ ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" -+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ break 2 -+ fi -+done -+ done -+IFS=$as_save_IFS -+ -+fi -+fi -+DLLTOOL=$ac_cv_prog_DLLTOOL -+if test -n "$DLLTOOL"; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 -+$as_echo "$DLLTOOL" >&6; } -+else -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } -+fi -+ -+ -+fi -+if test -z "$ac_cv_prog_DLLTOOL"; then -+ ac_ct_DLLTOOL=$DLLTOOL -+ # Extract the first word of "dlltool", so it can be a program name with args. -+set dummy dlltool; ac_word=$2 -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -+$as_echo_n "checking for $ac_word... " >&6; } -+if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ if test -n "$ac_ct_DLLTOOL"; then -+ ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. -+else -+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -+ ac_cv_prog_ac_ct_DLLTOOL="dlltool" -+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ break 2 -+ fi -+done -+ done -+IFS=$as_save_IFS -+ -+fi -+fi -+ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL -+if test -n "$ac_ct_DLLTOOL"; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 -+$as_echo "$ac_ct_DLLTOOL" >&6; } -+else -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } -+fi -+ -+ if test "x$ac_ct_DLLTOOL" = x; then -+ DLLTOOL="false" -+ else -+ case $cross_compiling:$ac_tool_warned in -+yes:) -+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -+ac_tool_warned=yes ;; -+esac -+ DLLTOOL=$ac_ct_DLLTOOL -+ fi -+else -+ DLLTOOL="$ac_cv_prog_DLLTOOL" -+fi -+ -+test -z "$DLLTOOL" && DLLTOOL=dlltool -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 -+$as_echo_n "checking how to associate runtime and link libraries... " >&6; } -+if test "${lt_cv_sharedlib_from_linklib_cmd+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ lt_cv_sharedlib_from_linklib_cmd='unknown' -+ -+case $host_os in -+cygwin* | mingw* | pw32* | cegcc*) -+ # two different shell functions defined in ltmain.sh -+ # decide which to use based on capabilities of $DLLTOOL -+ case `$DLLTOOL --help 2>&1` in -+ *--identify-strict*) -+ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib -+ ;; -+ *) -+ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback -+ ;; -+ esac -+ ;; -+*) -+ # fallback: assume linklib IS sharedlib -+ lt_cv_sharedlib_from_linklib_cmd="$ECHO" -+ ;; -+esac -+ -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 -+$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } -+sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd -+test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO -+ -+ -+ -+ -+ -+ -+ -+if test -n "$ac_tool_prefix"; then -+ for ac_prog in ar -+ do -+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -+set dummy $ac_tool_prefix$ac_prog; ac_word=$2 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 - $as_echo_n "checking for $ac_word... " >&6; } - if test "${ac_cv_prog_AR+set}" = set; then : -@@ -6218,7 +6472,7 @@ do - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -- ac_cv_prog_AR="${ac_tool_prefix}ar" -+ ac_cv_prog_AR="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -@@ -6238,11 +6492,15 @@ $as_echo "no" >&6; } - fi - - -+ test -n "$AR" && break -+ done - fi --if test -z "$ac_cv_prog_AR"; then -+if test -z "$AR"; then - ac_ct_AR=$AR -- # Extract the first word of "ar", so it can be a program name with args. --set dummy ar; ac_word=$2 -+ for ac_prog in ar -+do -+ # Extract the first word of "$ac_prog", so it can be a program name with args. -+set dummy $ac_prog; ac_word=$2 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 - $as_echo_n "checking for $ac_word... " >&6; } - if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : -@@ -6258,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 -- ac_cv_prog_ac_ct_AR="ar" -+ ac_cv_prog_ac_ct_AR="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -@@ -6277,6 +6535,10 @@ else - $as_echo "no" >&6; } - fi - -+ -+ test -n "$ac_ct_AR" && break -+done -+ - if test "x$ac_ct_AR" = x; then - AR="false" - else -@@ -6288,12 +6550,10 @@ ac_tool_warned=yes ;; - esac - AR=$ac_ct_AR - fi --else -- AR="$ac_cv_prog_AR" - fi - --test -z "$AR" && AR=ar --test -z "$AR_FLAGS" && AR_FLAGS=cru -+: ${AR=ar} -+: ${AR_FLAGS=cru} - - - -@@ -6305,6 +6565,64 @@ test -z "$AR_FLAGS" && AR_FLAGS=cru - - - -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 -+$as_echo_n "checking for archiver @FILE support... " >&6; } -+if test "${lt_cv_ar_at_file+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ lt_cv_ar_at_file=no -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+ -+int -+main () -+{ -+ -+ ; -+ return 0; -+} -+_ACEOF -+if ac_fn_c_try_compile "$LINENO"; then : -+ echo conftest.$ac_objext > conftest.lst -+ lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' -+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 -+ (eval $lt_ar_try) 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -+ test $ac_status = 0; } -+ if test "$ac_status" -eq 0; then -+ # Ensure the archiver fails upon bogus file names. -+ rm -f conftest.$ac_objext libconftest.a -+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 -+ (eval $lt_ar_try) 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -+ test $ac_status = 0; } -+ if test "$ac_status" -ne 0; then -+ lt_cv_ar_at_file=@ -+ fi -+ fi -+ rm -f conftest.* libconftest.a -+ -+fi -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+ -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 -+$as_echo "$lt_cv_ar_at_file" >&6; } -+ -+if test "x$lt_cv_ar_at_file" = xno; then -+ archiver_list_spec= -+else -+ archiver_list_spec=$lt_cv_ar_at_file -+fi -+ -+ -+ -+ -+ -+ -+ - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. - set dummy ${ac_tool_prefix}strip; ac_word=$2 -@@ -6639,8 +6957,8 @@ esac - lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" - - # Transform an extracted symbol line into symbol name and symbol address --lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" --lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" -+lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" -+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" - - # Handle CRLF in mingw tool chain - opt_cr= -@@ -6676,6 +6994,7 @@ for ac_symprfx in "" "_"; do - else - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" - fi -+ lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" - - # Check to see that the pipe works correctly. - pipe_works=no -@@ -6717,6 +7036,18 @@ _LT_EOF - if $GREP ' nm_test_var$' "$nlist" >/dev/null; then - if $GREP ' nm_test_func$' "$nlist" >/dev/null; then - cat <<_LT_EOF > conftest.$ac_ext -+/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ -+#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) -+/* DATA imports from DLLs on WIN32 con't be const, because runtime -+ relocations are performed -- see ld's documentation on pseudo-relocs. */ -+# define LT_DLSYM_CONST -+#elif defined(__osf__) -+/* This system does not cope well with relocations in const data. */ -+# define LT_DLSYM_CONST -+#else -+# define LT_DLSYM_CONST const -+#endif -+ - #ifdef __cplusplus - extern "C" { - #endif -@@ -6728,7 +7059,7 @@ _LT_EOF - cat <<_LT_EOF >> conftest.$ac_ext - - /* The mapping between symbol names and symbols. */ --const struct { -+LT_DLSYM_CONST struct { - const char *name; - void *address; - } -@@ -6754,8 +7085,8 @@ static const void *lt_preloaded_setup() - _LT_EOF - # Now try linking the two files. - mv conftest.$ac_objext conftstm.$ac_objext -- lt_save_LIBS="$LIBS" -- lt_save_CFLAGS="$CFLAGS" -+ lt_globsym_save_LIBS=$LIBS -+ lt_globsym_save_CFLAGS=$CFLAGS - LIBS="conftstm.$ac_objext" - CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 -@@ -6765,8 +7096,8 @@ _LT_EOF - test $ac_status = 0; } && test -s conftest${ac_exeext}; then - pipe_works=yes - fi -- LIBS="$lt_save_LIBS" -- CFLAGS="$lt_save_CFLAGS" -+ LIBS=$lt_globsym_save_LIBS -+ CFLAGS=$lt_globsym_save_CFLAGS - else - echo "cannot find nm_test_func in $nlist" >&5 - fi -@@ -6803,6 +7134,19 @@ else - $as_echo "ok" >&6; } - fi - -+# Response file support. -+if test "$lt_cv_nm_interface" = "MS dumpbin"; then -+ nm_file_list_spec='@' -+elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then -+ nm_file_list_spec='@' -+fi -+ -+ -+ -+ -+ -+ -+ - - - -@@ -6823,6 +7167,42 @@ fi - - - -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 -+$as_echo_n "checking for sysroot... " >&6; } -+ -+# Check whether --with-libtool-sysroot was given. -+if test "${with_libtool_sysroot+set}" = set; then : -+ withval=$with_libtool_sysroot; -+else -+ with_libtool_sysroot=no -+fi -+ -+ -+lt_sysroot= -+case ${with_libtool_sysroot} in #( -+ yes) -+ if test "$GCC" = yes; then -+ lt_sysroot=`$CC --print-sysroot 2>/dev/null` -+ fi -+ ;; #( -+ /*) -+ lt_sysroot=`echo "$with_libtool_sysroot" | sed -e "$sed_quote_subst"` -+ ;; #( -+ no|'') -+ ;; #( -+ *) -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libtool_sysroot}" >&5 -+$as_echo "${with_libtool_sysroot}" >&6; } -+ as_fn_error "The sysroot must be an absolute path." "$LINENO" 5 -+ ;; -+esac -+ -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 -+$as_echo "${lt_sysroot:-no}" >&6; } -+ -+ -+ -+ - - # Check whether --enable-libtool-lock was given. - if test "${enable_libtool_lock+set}" = set; then : -@@ -7017,6 +7397,123 @@ esac - - need_locks="$enable_libtool_lock" - -+if test -n "$ac_tool_prefix"; then -+ # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. -+set dummy ${ac_tool_prefix}mt; ac_word=$2 -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -+$as_echo_n "checking for $ac_word... " >&6; } -+if test "${ac_cv_prog_MANIFEST_TOOL+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ if test -n "$MANIFEST_TOOL"; then -+ ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. -+else -+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -+ ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" -+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ break 2 -+ fi -+done -+ done -+IFS=$as_save_IFS -+ -+fi -+fi -+MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL -+if test -n "$MANIFEST_TOOL"; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 -+$as_echo "$MANIFEST_TOOL" >&6; } -+else -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } -+fi -+ -+ -+fi -+if test -z "$ac_cv_prog_MANIFEST_TOOL"; then -+ ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL -+ # Extract the first word of "mt", so it can be a program name with args. -+set dummy mt; ac_word=$2 -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -+$as_echo_n "checking for $ac_word... " >&6; } -+if test "${ac_cv_prog_ac_ct_MANIFEST_TOOL+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ if test -n "$ac_ct_MANIFEST_TOOL"; then -+ ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. -+else -+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -+ ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" -+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ break 2 -+ fi -+done -+ done -+IFS=$as_save_IFS -+ -+fi -+fi -+ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL -+if test -n "$ac_ct_MANIFEST_TOOL"; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 -+$as_echo "$ac_ct_MANIFEST_TOOL" >&6; } -+else -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } -+fi -+ -+ if test "x$ac_ct_MANIFEST_TOOL" = x; then -+ MANIFEST_TOOL=":" -+ else -+ case $cross_compiling:$ac_tool_warned in -+yes:) -+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -+ac_tool_warned=yes ;; -+esac -+ MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL -+ fi -+else -+ MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" -+fi -+ -+test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 -+$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } -+if test "${lt_cv_path_mainfest_tool+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ lt_cv_path_mainfest_tool=no -+ echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 -+ $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out -+ cat conftest.err >&5 -+ if $GREP 'Manifest Tool' conftest.out > /dev/null; then -+ lt_cv_path_mainfest_tool=yes -+ fi -+ rm -f conftest* -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 -+$as_echo "$lt_cv_path_mainfest_tool" >&6; } -+if test "x$lt_cv_path_mainfest_tool" != xyes; then -+ MANIFEST_TOOL=: -+fi -+ -+ -+ -+ -+ - - case $host_os in - rhapsody* | darwin*) -@@ -7580,6 +8077,8 @@ _LT_EOF - $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 - echo "$AR cru libconftest.a conftest.o" >&5 - $AR cru libconftest.a conftest.o 2>&5 -+ echo "$RANLIB libconftest.a" >&5 -+ $RANLIB libconftest.a 2>&5 - cat > conftest.c << _LT_EOF - int main() { return 0;} - _LT_EOF -@@ -7775,7 +8274,8 @@ fi - LIBTOOL_DEPS="$ltmain" - - # Always use our own libtool. --LIBTOOL='$(SHELL) $(top_builddir)/libtool' -+LIBTOOL='$(SHELL) $(top_builddir)' -+LIBTOOL="$LIBTOOL/${host_alias}-libtool" - - - -@@ -7864,7 +8364,7 @@ aix3*) - esac - - # Global variables: --ofile=libtool -+ofile=${host_alias}-libtool - can_build_shared=yes - - # All known linkers require a `.a' archive for static linking (except MSVC, -@@ -8162,8 +8662,6 @@ fi - lt_prog_compiler_pic= - lt_prog_compiler_static= - --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 --$as_echo_n "checking for $compiler option to produce PIC... " >&6; } - - if test "$GCC" = yes; then - lt_prog_compiler_wl='-Wl,' -@@ -8328,6 +8826,12 @@ $as_echo_n "checking for $compiler optio - lt_prog_compiler_pic='--shared' - lt_prog_compiler_static='--static' - ;; -+ nagfor*) -+ # NAG Fortran compiler -+ lt_prog_compiler_wl='-Wl,-Wl,,' -+ lt_prog_compiler_pic='-PIC' -+ lt_prog_compiler_static='-Bstatic' -+ ;; - pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) -@@ -8390,7 +8894,7 @@ $as_echo_n "checking for $compiler optio - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - case $cc_basename in -- f77* | f90* | f95*) -+ f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) - lt_prog_compiler_wl='-Qoption ld ';; - *) - lt_prog_compiler_wl='-Wl,';; -@@ -8447,13 +8951,17 @@ case $host_os in - lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" - ;; - esac --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5 --$as_echo "$lt_prog_compiler_pic" >&6; } -- -- -- -- - -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -+$as_echo_n "checking for $compiler option to produce PIC... " >&6; } -+if test "${lt_cv_prog_compiler_pic+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ lt_cv_prog_compiler_pic=$lt_prog_compiler_pic -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 -+$as_echo "$lt_cv_prog_compiler_pic" >&6; } -+lt_prog_compiler_pic=$lt_cv_prog_compiler_pic - - # - # Check to make sure the PIC flag actually works. -@@ -8514,6 +9022,11 @@ fi - - - -+ -+ -+ -+ -+ - # - # Check to make sure the static flag actually works. - # -@@ -8864,7 +9377,8 @@ _LT_EOF - allow_undefined_flag=unsupported - always_export_symbols=no - enable_shared_with_static_runtimes=yes -- export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' -+ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' -+ exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' -@@ -8912,7 +9426,7 @@ _LT_EOF - if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ - && test "$tmp_diet" = no - then -- tmp_addflag= -+ tmp_addflag=' $pic_flag' - tmp_sharedflag='-shared' - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler -@@ -8963,12 +9477,12 @@ _LT_EOF - whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' - hardcode_libdir_flag_spec= - hardcode_libdir_flag_spec_ld='-rpath $libdir' -- archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' -+ archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then - archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ -- $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' -+ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' - fi - ;; - esac -@@ -8982,8 +9496,8 @@ _LT_EOF - archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else -- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' -+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - -@@ -9001,8 +9515,8 @@ _LT_EOF - - _LT_EOF - elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then -- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' -+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi -@@ -9048,8 +9562,8 @@ _LT_EOF - - *) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then -- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' -+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi -@@ -9179,7 +9693,13 @@ _LT_EOF - allow_undefined_flag='-berok' - # Determine the default libpath from the value encoded in an - # empty executable. -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+ if test "${lt_cv_aix_libpath+set}" = set; then -+ aix_libpath=$lt_cv_aix_libpath -+else -+ if test "${lt_cv_aix_libpath_+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - - int -@@ -9192,22 +9712,29 @@ main () - _ACEOF - if ac_fn_c_try_link "$LINENO"; then : - --lt_aix_libpath_sed=' -- /Import File Strings/,/^$/ { -- /^0/ { -- s/^0 *\(.*\)$/\1/ -- p -- } -- }' --aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` --# Check for a 64-bit object if we didn't find anything. --if test -z "$aix_libpath"; then -- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` --fi -+ lt_aix_libpath_sed=' -+ /Import File Strings/,/^$/ { -+ /^0/ { -+ s/^0 *\([^ ]*\) *$/\1/ -+ p -+ } -+ }' -+ lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -+ # Check for a 64-bit object if we didn't find anything. -+ if test -z "$lt_cv_aix_libpath_"; then -+ lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -+ fi - fi - rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext --if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi -+ if test -z "$lt_cv_aix_libpath_"; then -+ lt_cv_aix_libpath_="/usr/lib:/lib" -+ fi -+ -+fi -+ -+ aix_libpath=$lt_cv_aix_libpath_ -+fi - - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" -@@ -9219,7 +9746,13 @@ if test -z "$aix_libpath"; then aix_libp - else - # Determine the default libpath from the value encoded in an - # empty executable. -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+ if test "${lt_cv_aix_libpath+set}" = set; then -+ aix_libpath=$lt_cv_aix_libpath -+else -+ if test "${lt_cv_aix_libpath_+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - - int -@@ -9232,22 +9765,29 @@ main () - _ACEOF - if ac_fn_c_try_link "$LINENO"; then : - --lt_aix_libpath_sed=' -- /Import File Strings/,/^$/ { -- /^0/ { -- s/^0 *\(.*\)$/\1/ -- p -- } -- }' --aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` --# Check for a 64-bit object if we didn't find anything. --if test -z "$aix_libpath"; then -- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` --fi -+ lt_aix_libpath_sed=' -+ /Import File Strings/,/^$/ { -+ /^0/ { -+ s/^0 *\([^ ]*\) *$/\1/ -+ p -+ } -+ }' -+ lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -+ # Check for a 64-bit object if we didn't find anything. -+ if test -z "$lt_cv_aix_libpath_"; then -+ lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -+ fi - fi - rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext --if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi -+ if test -z "$lt_cv_aix_libpath_"; then -+ lt_cv_aix_libpath_="/usr/lib:/lib" -+ fi -+ -+fi -+ -+ aix_libpath=$lt_cv_aix_libpath_ -+fi - - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, -@@ -9292,20 +9832,63 @@ if test -z "$aix_libpath"; then aix_libp - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. -- hardcode_libdir_flag_spec=' ' -- allow_undefined_flag=unsupported -- # Tell ltmain to make .lib files, not .a files. -- libext=lib -- # Tell ltmain to make .dll files, not .so files. -- shrext_cmds=".dll" -- # FIXME: Setting linknames here is a bad hack. -- archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' -- # The linker will automatically build a .lib file if we build a DLL. -- old_archive_from_new_cmds='true' -- # FIXME: Should let the user specify the lib program. -- old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' -- fix_srcfile_path='`cygpath -w "$srcfile"`' -- enable_shared_with_static_runtimes=yes -+ case $cc_basename in -+ cl*) -+ # Native MSVC -+ hardcode_libdir_flag_spec=' ' -+ allow_undefined_flag=unsupported -+ always_export_symbols=yes -+ file_list_spec='@' -+ # Tell ltmain to make .lib files, not .a files. -+ libext=lib -+ # Tell ltmain to make .dll files, not .so files. -+ shrext_cmds=".dll" -+ # FIXME: Setting linknames here is a bad hack. -+ archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' -+ archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then -+ sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; -+ else -+ sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; -+ fi~ -+ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ -+ linknames=' -+ # The linker will not automatically build a static lib if we build a DLL. -+ # _LT_TAGVAR(old_archive_from_new_cmds, )='true' -+ enable_shared_with_static_runtimes=yes -+ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' -+ # Don't use ranlib -+ old_postinstall_cmds='chmod 644 $oldlib' -+ postlink_cmds='lt_outputfile="@OUTPUT@"~ -+ lt_tool_outputfile="@TOOL_OUTPUT@"~ -+ case $lt_outputfile in -+ *.exe|*.EXE) ;; -+ *) -+ lt_outputfile="$lt_outputfile.exe" -+ lt_tool_outputfile="$lt_tool_outputfile.exe" -+ ;; -+ esac~ -+ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then -+ $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; -+ $RM "$lt_outputfile.manifest"; -+ fi' -+ ;; -+ *) -+ # Assume MSVC wrapper -+ hardcode_libdir_flag_spec=' ' -+ allow_undefined_flag=unsupported -+ # Tell ltmain to make .lib files, not .a files. -+ libext=lib -+ # Tell ltmain to make .dll files, not .so files. -+ shrext_cmds=".dll" -+ # FIXME: Setting linknames here is a bad hack. -+ archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' -+ # The linker will automatically build a .lib file if we build a DLL. -+ old_archive_from_new_cmds='true' -+ # FIXME: Should let the user specify the lib program. -+ old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' -+ enable_shared_with_static_runtimes=yes -+ ;; -+ esac - ;; - - darwin* | rhapsody*) -@@ -9370,7 +9953,7 @@ if test -z "$aix_libpath"; then aix_libp - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) -- archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' -+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no -@@ -9378,7 +9961,7 @@ if test -z "$aix_libpath"; then aix_libp - - hpux9*) - if test "$GCC" = yes; then -- archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' -+ archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - fi -@@ -9394,7 +9977,7 @@ if test -z "$aix_libpath"; then aix_libp - - hpux10*) - if test "$GCC" = yes && test "$with_gnu_ld" = no; then -- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' -+ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi -@@ -9418,10 +10001,10 @@ if test -z "$aix_libpath"; then aix_libp - archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) -- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' -+ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) -- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' -+ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else -@@ -9500,23 +10083,36 @@ fi - - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then -- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' -+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - # Try to use the -exported_symbol ld option, if it does not - # work, assume that -exports_file does not work either and - # implicitly export all symbols. -- save_LDFLAGS="$LDFLAGS" -- LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+ # This should be the same for all languages, so no per-tag cache variable. -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 -+$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } -+if test "${lt_cv_irix_exported_symbol+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ save_LDFLAGS="$LDFLAGS" -+ LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ --int foo(void) {} -+int foo (void) { return 0; } - _ACEOF - if ac_fn_c_try_link "$LINENO"; then : -- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' -- -+ lt_cv_irix_exported_symbol=yes -+else -+ lt_cv_irix_exported_symbol=no - fi - rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -- LDFLAGS="$save_LDFLAGS" -+ LDFLAGS="$save_LDFLAGS" -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 -+$as_echo "$lt_cv_irix_exported_symbol" >&6; } -+ if test "$lt_cv_irix_exported_symbol" = yes; then -+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' -+ fi - else - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' -@@ -9601,7 +10197,7 @@ rm -f core conftest.err conftest.$ac_obj - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' -- archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' -+ archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - else - allow_undefined_flag=' -expect_unresolved \*' -@@ -9620,9 +10216,9 @@ rm -f core conftest.err conftest.$ac_obj - no_undefined_flag=' -z defs' - if test "$GCC" = yes; then - wlarc='${wl}' -- archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' -+ archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ -- $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' -+ $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - else - case `$CC -V 2>&1` in - *"Compilers 5.0"*) -@@ -10198,8 +10794,9 @@ cygwin* | mingw* | pw32* | cegcc*) - need_version=no - need_lib_prefix=no - -- case $GCC,$host_os in -- yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) -+ case $GCC,$cc_basename in -+ yes,*) -+ # gcc - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ -@@ -10232,13 +10829,71 @@ cygwin* | mingw* | pw32* | cegcc*) - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - ;; - esac -+ dynamic_linker='Win32 ld.exe' -+ ;; -+ -+ *,cl*) -+ # Native MSVC -+ libname_spec='$name' -+ soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' -+ library_names_spec='${libname}.dll.lib' -+ -+ case $build_os in -+ mingw*) -+ sys_lib_search_path_spec= -+ lt_save_ifs=$IFS -+ IFS=';' -+ for lt_path in $LIB -+ do -+ IFS=$lt_save_ifs -+ # Let DOS variable expansion print the short 8.3 style file name. -+ lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` -+ sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" -+ done -+ IFS=$lt_save_ifs -+ # Convert to MSYS style. -+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` -+ ;; -+ cygwin*) -+ # Convert to unix form, then to dos form, then back to unix form -+ # but this time dos style (no spaces!) so that the unix form looks -+ # like /cygdrive/c/PROGRA~1:/cygdr... -+ sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` -+ sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` -+ sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` -+ ;; -+ *) -+ sys_lib_search_path_spec="$LIB" -+ if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then -+ # It is most probably a Windows format PATH. -+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` -+ else -+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` -+ fi -+ # FIXME: find the short name or the path components, as spaces are -+ # common. (e.g. "Program Files" -> "PROGRA~1") -+ ;; -+ esac -+ -+ # DLL is installed to $(libdir)/../bin by postinstall_cmds -+ postinstall_cmds='base_file=`basename \${file}`~ -+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ -+ dldir=$destdir/`dirname \$dlpath`~ -+ test -d \$dldir || mkdir -p \$dldir~ -+ $install_prog $dir/$dlname \$dldir/$dlname' -+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ -+ dlpath=$dir/\$dldll~ -+ $RM \$dlpath' -+ shlibpath_overrides_runpath=yes -+ dynamic_linker='Win32 link.exe' - ;; - - *) -+ # Assume MSVC wrapper - library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' -+ dynamic_linker='Win32 ld.exe' - ;; - esac -- dynamic_linker='Win32 ld.exe' - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; -@@ -10334,7 +10989,7 @@ haiku*) - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LIBRARY_PATH - shlibpath_overrides_runpath=yes -- sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib' -+ sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' - hardcode_into_libs=yes - ;; - -@@ -11130,7 +11785,7 @@ else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF --#line 11128 "configure" -+#line $LINENO "configure" - #include "confdefs.h" - - #if HAVE_DLFCN_H -@@ -11174,10 +11829,10 @@ else - /* When -fvisbility=hidden is used, assume the code has been annotated - correspondingly for the symbols needed. */ - #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) --void fnord () __attribute__((visibility("default"))); -+int fnord () __attribute__((visibility("default"))); - #endif - --void fnord () { int i=42; } -+int fnord () { return 42; } - int main () - { - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); -@@ -11236,7 +11891,7 @@ else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF --#line 11234 "configure" -+#line $LINENO "configure" - #include "confdefs.h" - - #if HAVE_DLFCN_H -@@ -11280,10 +11935,10 @@ else - /* When -fvisbility=hidden is used, assume the code has been annotated - correspondingly for the symbols needed. */ - #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) --void fnord () __attribute__((visibility("default"))); -+int fnord () __attribute__((visibility("default"))); - #endif - --void fnord () { int i=42; } -+int fnord () { return 42; } - int main () - { - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); -@@ -12825,13 +13480,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_ - lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' - lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' - lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' -+lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' -+lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' - reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' - reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' - OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' - deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' - file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' -+file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' -+want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' -+DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' -+sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' - AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' - AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' -+archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' - STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' - RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' - old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' -@@ -12846,14 +13508,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$l - lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' - lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' - lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' -+nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' -+lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' - objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' - MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' - lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' --lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' - lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' -+lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' - lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' - lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' - need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' -+MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' - DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' - NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' - LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' -@@ -12886,12 +13551,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcod - hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' - inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' - link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' --fix_srcfile_path='`$ECHO "$fix_srcfile_path" | $SED "$delay_single_quote_subst"`' - always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' - export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' - exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' - include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' - prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' -+postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' - file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' - variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' - need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' -@@ -12946,8 +13611,13 @@ reload_flag \ - OBJDUMP \ - deplibs_check_method \ - file_magic_cmd \ -+file_magic_glob \ -+want_nocaseglob \ -+DLLTOOL \ -+sharedlib_from_linklib_cmd \ - AR \ - AR_FLAGS \ -+archiver_list_spec \ - STRIP \ - RANLIB \ - CC \ -@@ -12957,12 +13627,14 @@ lt_cv_sys_global_symbol_pipe \ - lt_cv_sys_global_symbol_to_cdecl \ - lt_cv_sys_global_symbol_to_c_name_address \ - lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ -+nm_file_list_spec \ - lt_prog_compiler_no_builtin_flag \ --lt_prog_compiler_wl \ - lt_prog_compiler_pic \ -+lt_prog_compiler_wl \ - lt_prog_compiler_static \ - lt_cv_prog_compiler_c_o \ - need_locks \ -+MANIFEST_TOOL \ - DSYMUTIL \ - NMEDIT \ - LIPO \ -@@ -12978,7 +13650,6 @@ no_undefined_flag \ - hardcode_libdir_flag_spec \ - hardcode_libdir_flag_spec_ld \ - hardcode_libdir_separator \ --fix_srcfile_path \ - exclude_expsyms \ - include_expsyms \ - file_list_spec \ -@@ -13014,6 +13685,7 @@ module_cmds \ - module_expsym_cmds \ - export_symbols_cmds \ - prelink_cmds \ -+postlink_cmds \ - postinstall_cmds \ - postuninstall_cmds \ - finish_cmds \ -@@ -13770,7 +14442,8 @@ $as_echo X"$file" | - # NOTE: Changes made to this file will be lost: look at ltmain.sh. - # - # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, --# 2006, 2007, 2008, 2009 Free Software Foundation, Inc. -+# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, -+# Inc. - # Written by Gordon Matzigkeit, 1996 - # - # This file is part of GNU Libtool. -@@ -13873,19 +14546,42 @@ SP2NL=$lt_lt_SP2NL - # turn newlines into spaces. - NL2SP=$lt_lt_NL2SP - -+# convert \$build file names to \$host format. -+to_host_file_cmd=$lt_cv_to_host_file_cmd -+ -+# convert \$build files to toolchain format. -+to_tool_file_cmd=$lt_cv_to_tool_file_cmd -+ - # An object symbol dumper. - OBJDUMP=$lt_OBJDUMP - - # Method to check whether dependent libraries are shared objects. - deplibs_check_method=$lt_deplibs_check_method - --# Command to use when deplibs_check_method == "file_magic". -+# Command to use when deplibs_check_method = "file_magic". - file_magic_cmd=$lt_file_magic_cmd - -+# How to find potential files when deplibs_check_method = "file_magic". -+file_magic_glob=$lt_file_magic_glob -+ -+# Find potential files using nocaseglob when deplibs_check_method = "file_magic". -+want_nocaseglob=$lt_want_nocaseglob -+ -+# DLL creation program. -+DLLTOOL=$lt_DLLTOOL -+ -+# Command to associate shared and link libraries. -+sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd -+ - # The archiver. - AR=$lt_AR -+ -+# Flags to create an archive. - AR_FLAGS=$lt_AR_FLAGS - -+# How to feed a file listing to the archiver. -+archiver_list_spec=$lt_archiver_list_spec -+ - # A symbol stripping program. - STRIP=$lt_STRIP - -@@ -13915,6 +14611,12 @@ global_symbol_to_c_name_address=$lt_lt_c - # Transform the output of nm in a C name address pair when lib prefix is needed. - global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix - -+# Specify filename containing input files for \$NM. -+nm_file_list_spec=$lt_nm_file_list_spec -+ -+# The root where to search for dependent libraries,and in which our libraries should be installed. -+lt_sysroot=$lt_sysroot -+ - # The name of the directory that contains temporary libtool files. - objdir=$objdir - -@@ -13924,6 +14626,9 @@ MAGIC_CMD=$MAGIC_CMD - # Must we lock files when doing compilation? - need_locks=$lt_need_locks - -+# Manifest tool. -+MANIFEST_TOOL=$lt_MANIFEST_TOOL -+ - # Tool to manipulate archived DWARF debug symbol files on Mac OS X. - DSYMUTIL=$lt_DSYMUTIL - -@@ -14038,12 +14743,12 @@ with_gcc=$GCC - # Compiler flag to turn off builtin functions. - no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag - --# How to pass a linker flag through the compiler. --wl=$lt_lt_prog_compiler_wl -- - # Additional compiler flags for building library objects. - pic_flag=$lt_lt_prog_compiler_pic - -+# How to pass a linker flag through the compiler. -+wl=$lt_lt_prog_compiler_wl -+ - # Compiler flag to prevent dynamic linking. - link_static_flag=$lt_lt_prog_compiler_static - -@@ -14130,9 +14835,6 @@ inherit_rpath=$inherit_rpath - # Whether libtool must link a program against all its dependency libraries. - link_all_deplibs=$link_all_deplibs - --# Fix the shell variable \$srcfile for the compiler. --fix_srcfile_path=$lt_fix_srcfile_path -- - # Set to "yes" if exported symbols are required. - always_export_symbols=$always_export_symbols - -@@ -14148,6 +14850,9 @@ include_expsyms=$lt_include_expsyms - # Commands necessary for linking programs (against libraries) with templates. - prelink_cmds=$lt_prelink_cmds - -+# Commands necessary for finishing linking programs. -+postlink_cmds=$lt_postlink_cmds -+ - # Specify filename containing input files. - file_list_spec=$lt_file_list_spec - -@@ -14180,210 +14885,169 @@ ltmain="$ac_aux_dir/ltmain.sh" - # if finds mixed CR/LF and LF-only lines. Since sed operates in - # text mode, it properly converts lines to CR/LF. This bash problem - # is reportedly fixed, but why not run on old versions too? -- sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ -- || (rm -f "$cfgfile"; exit 1) -- -- case $xsi_shell in -- yes) -- cat << \_LT_EOF >> "$cfgfile" -- --# func_dirname file append nondir_replacement --# Compute the dirname of FILE. If nonempty, add APPEND to the result, --# otherwise set result to NONDIR_REPLACEMENT. --func_dirname () --{ -- case ${1} in -- */*) func_dirname_result="${1%/*}${2}" ;; -- * ) func_dirname_result="${3}" ;; -- esac --} -- --# func_basename file --func_basename () --{ -- func_basename_result="${1##*/}" --} -- --# func_dirname_and_basename file append nondir_replacement --# perform func_basename and func_dirname in a single function --# call: --# dirname: Compute the dirname of FILE. If nonempty, --# add APPEND to the result, otherwise set result --# to NONDIR_REPLACEMENT. --# value returned in "$func_dirname_result" --# basename: Compute filename of FILE. --# value retuned in "$func_basename_result" --# Implementation must be kept synchronized with func_dirname --# and func_basename. For efficiency, we do not delegate to --# those functions but instead duplicate the functionality here. --func_dirname_and_basename () --{ -- case ${1} in -- */*) func_dirname_result="${1%/*}${2}" ;; -- * ) func_dirname_result="${3}" ;; -- esac -- func_basename_result="${1##*/}" --} -- --# func_stripname prefix suffix name --# strip PREFIX and SUFFIX off of NAME. --# PREFIX and SUFFIX must not contain globbing or regex special --# characters, hashes, percent signs, but SUFFIX may contain a leading --# dot (in which case that matches only a dot). --func_stripname () --{ -- # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are -- # positional parameters, so assign one to ordinary parameter first. -- func_stripname_result=${3} -- func_stripname_result=${func_stripname_result#"${1}"} -- func_stripname_result=${func_stripname_result%"${2}"} --} -- --# func_opt_split --func_opt_split () --{ -- func_opt_split_opt=${1%%=*} -- func_opt_split_arg=${1#*=} --} -- --# func_lo2o object --func_lo2o () --{ -- case ${1} in -- *.lo) func_lo2o_result=${1%.lo}.${objext} ;; -- *) func_lo2o_result=${1} ;; -- esac --} -- --# func_xform libobj-or-source --func_xform () --{ -- func_xform_result=${1%.*}.lo --} -- --# func_arith arithmetic-term... --func_arith () --{ -- func_arith_result=$(( $* )) --} -- --# func_len string --# STRING may not start with a hyphen. --func_len () --{ -- func_len_result=${#1} --} -- --_LT_EOF -- ;; -- *) # Bourne compatible functions. -- cat << \_LT_EOF >> "$cfgfile" -- --# func_dirname file append nondir_replacement --# Compute the dirname of FILE. If nonempty, add APPEND to the result, --# otherwise set result to NONDIR_REPLACEMENT. --func_dirname () --{ -- # Extract subdirectory from the argument. -- func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` -- if test "X$func_dirname_result" = "X${1}"; then -- func_dirname_result="${3}" -- else -- func_dirname_result="$func_dirname_result${2}" -- fi --} -- --# func_basename file --func_basename () --{ -- func_basename_result=`$ECHO "${1}" | $SED "$basename"` --} -- -- --# func_stripname prefix suffix name --# strip PREFIX and SUFFIX off of NAME. --# PREFIX and SUFFIX must not contain globbing or regex special --# characters, hashes, percent signs, but SUFFIX may contain a leading --# dot (in which case that matches only a dot). --# func_strip_suffix prefix name --func_stripname () --{ -- case ${2} in -- .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; -- *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; -- esac --} -- --# sed scripts: --my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q' --my_sed_long_arg='1s/^-[^=]*=//' -- --# func_opt_split --func_opt_split () --{ -- func_opt_split_opt=`$ECHO "${1}" | $SED "$my_sed_long_opt"` -- func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"` --} -- --# func_lo2o object --func_lo2o () --{ -- func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` --} -- --# func_xform libobj-or-source --func_xform () --{ -- func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` --} -- --# func_arith arithmetic-term... --func_arith () --{ -- func_arith_result=`expr "$@"` --} -- --# func_len string --# STRING may not start with a hyphen. --func_len () --{ -- func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` --} -- --_LT_EOF --esac -- --case $lt_shell_append in -- yes) -- cat << \_LT_EOF >> "$cfgfile" -- --# func_append var value --# Append VALUE to the end of shell variable VAR. --func_append () --{ -- eval "$1+=\$2" --} --_LT_EOF -- ;; -- *) -- cat << \_LT_EOF >> "$cfgfile" -- --# func_append var value --# Append VALUE to the end of shell variable VAR. --func_append () --{ -- eval "$1=\$$1\$2" --} -- --_LT_EOF -- ;; -- esac -+ sed '$q' "$ltmain" >> "$cfgfile" \ -+ || (rm -f "$cfgfile"; exit 1) - -+ if test x"$xsi_shell" = xyes; then -+ sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ -+func_dirname ()\ -+{\ -+\ case ${1} in\ -+\ */*) func_dirname_result="${1%/*}${2}" ;;\ -+\ * ) func_dirname_result="${3}" ;;\ -+\ esac\ -+} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_basename ()$/,/^} # func_basename /c\ -+func_basename ()\ -+{\ -+\ func_basename_result="${1##*/}"\ -+} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ -+func_dirname_and_basename ()\ -+{\ -+\ case ${1} in\ -+\ */*) func_dirname_result="${1%/*}${2}" ;;\ -+\ * ) func_dirname_result="${3}" ;;\ -+\ esac\ -+\ func_basename_result="${1##*/}"\ -+} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ -+func_stripname ()\ -+{\ -+\ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ -+\ # positional parameters, so assign one to ordinary parameter first.\ -+\ func_stripname_result=${3}\ -+\ func_stripname_result=${func_stripname_result#"${1}"}\ -+\ func_stripname_result=${func_stripname_result%"${2}"}\ -+} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ -+func_split_long_opt ()\ -+{\ -+\ func_split_long_opt_name=${1%%=*}\ -+\ func_split_long_opt_arg=${1#*=}\ -+} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ -+func_split_short_opt ()\ -+{\ -+\ func_split_short_opt_arg=${1#??}\ -+\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ -+} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ -+func_lo2o ()\ -+{\ -+\ case ${1} in\ -+\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ -+\ *) func_lo2o_result=${1} ;;\ -+\ esac\ -+} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_xform ()$/,/^} # func_xform /c\ -+func_xform ()\ -+{\ -+ func_xform_result=${1%.*}.lo\ -+} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_arith ()$/,/^} # func_arith /c\ -+func_arith ()\ -+{\ -+ func_arith_result=$(( $* ))\ -+} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_len ()$/,/^} # func_len /c\ -+func_len ()\ -+{\ -+ func_len_result=${#1}\ -+} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+fi -+ -+if test x"$lt_shell_append" = xyes; then -+ sed -e '/^func_append ()$/,/^} # func_append /c\ -+func_append ()\ -+{\ -+ eval "${1}+=\\${2}"\ -+} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ -+func_append_quoted ()\ -+{\ -+\ func_quote_for_eval "${2}"\ -+\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ -+} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ # Save a `func_append' function call where possible by direct use of '+=' -+ sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+ test 0 -eq $? || _lt_function_replace_fail=: -+else -+ # Save a `func_append' function call even when '+=' is not available -+ sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+ test 0 -eq $? || _lt_function_replace_fail=: -+fi -+ -+if test x"$_lt_function_replace_fail" = x":"; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 -+$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} -+fi - -- sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ -- || (rm -f "$cfgfile"; exit 1) - -- mv -f "$cfgfile" "$ofile" || -+ mv -f "$cfgfile" "$ofile" || - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" - -Index: binutils-2.21.1/ld/configure -=================================================================== ---- binutils-2.21.1.orig/ld/configure -+++ binutils-2.21.1/ld/configure -@@ -644,8 +644,11 @@ OTOOL - LIPO - NMEDIT - DSYMUTIL -+MANIFEST_TOOL - RANLIB -+ac_ct_AR - AR -+DLLTOOL - OBJDUMP - LN_S - NM -@@ -783,6 +786,7 @@ enable_static - with_pic - enable_fast_install - with_gnu_ld -+with_libtool_sysroot - enable_libtool_lock - enable_nls - ' -@@ -1447,6 +1451,8 @@ Optional Packages: - --with-pic try to use only PIC/non-PIC objects [default=use - both] - --with-gnu-ld assume the C compiler uses GNU ld [default=no] -+ --with-libtool-sysroot=DIR Search for dependent libraries within DIR -+ (or the compiler's sysroot if not specified). - - Some influential environment variables: - CC C compiler command -@@ -6081,8 +6087,8 @@ esac - - - --macro_version='2.2.7a' --macro_revision='1.3134' -+macro_version='2.4' -+macro_revision='1.3293' - - - -@@ -6122,7 +6128,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 - $as_echo_n "checking how to print strings... " >&6; } - # Test print first, because it will be a builtin if present. --if test "X`print -r -- -n 2>/dev/null`" = X-n && \ -+if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ - test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then - ECHO='print -r --' - elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then -@@ -6808,8 +6814,8 @@ $as_echo_n "checking whether the shell u - # Try some XSI features - xsi_shell=no - ( _lt_dummy="a/b/c" -- test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ -- = c,a/b,, \ -+ test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ -+ = c,a/b,b/c, \ - && eval 'test $(( 1 + 1 )) -eq 2 \ - && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ - && xsi_shell=yes -@@ -6858,6 +6864,80 @@ esac - - - -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 -+$as_echo_n "checking how to convert $build file names to $host format... " >&6; } -+if test "${lt_cv_to_host_file_cmd+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ case $host in -+ *-*-mingw* ) -+ case $build in -+ *-*-mingw* ) # actually msys -+ lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 -+ ;; -+ *-*-cygwin* ) -+ lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 -+ ;; -+ * ) # otherwise, assume *nix -+ lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 -+ ;; -+ esac -+ ;; -+ *-*-cygwin* ) -+ case $build in -+ *-*-mingw* ) # actually msys -+ lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin -+ ;; -+ *-*-cygwin* ) -+ lt_cv_to_host_file_cmd=func_convert_file_noop -+ ;; -+ * ) # otherwise, assume *nix -+ lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin -+ ;; -+ esac -+ ;; -+ * ) # unhandled hosts (and "normal" native builds) -+ lt_cv_to_host_file_cmd=func_convert_file_noop -+ ;; -+esac -+ -+fi -+ -+to_host_file_cmd=$lt_cv_to_host_file_cmd -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 -+$as_echo "$lt_cv_to_host_file_cmd" >&6; } -+ -+ -+ -+ -+ -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 -+$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } -+if test "${lt_cv_to_tool_file_cmd+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ #assume ordinary cross tools, or native build. -+lt_cv_to_tool_file_cmd=func_convert_file_noop -+case $host in -+ *-*-mingw* ) -+ case $build in -+ *-*-mingw* ) # actually msys -+ lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 -+ ;; -+ esac -+ ;; -+esac -+ -+fi -+ -+to_tool_file_cmd=$lt_cv_to_tool_file_cmd -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 -+$as_echo "$lt_cv_to_tool_file_cmd" >&6; } -+ -+ -+ -+ -+ - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 - $as_echo_n "checking for $LD option to reload object files... " >&6; } - if test "${lt_cv_ld_reload_flag+set}" = set; then : -@@ -6874,6 +6954,11 @@ case $reload_flag in - esac - reload_cmds='$LD$reload_flag -o $output$reload_objs' - case $host_os in -+ cygwin* | mingw* | pw32* | cegcc*) -+ if test "$GCC" != yes; then -+ reload_cmds=false -+ fi -+ ;; - darwin*) - if test "$GCC" = yes; then - reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' -@@ -7042,7 +7127,8 @@ mingw* | pw32*) - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - else -- lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' -+ # Keep this pattern in sync with the one in func_win32_libid. -+ lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' - lt_cv_file_magic_cmd='$OBJDUMP -f' - fi - ;; -@@ -7196,6 +7282,21 @@ esac - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 - $as_echo "$lt_cv_deplibs_check_method" >&6; } -+ -+file_magic_glob= -+want_nocaseglob=no -+if test "$build" = "$host"; then -+ case $host_os in -+ mingw* | pw32*) -+ if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then -+ want_nocaseglob=yes -+ else -+ file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` -+ fi -+ ;; -+ esac -+fi -+ - file_magic_cmd=$lt_cv_file_magic_cmd - deplibs_check_method=$lt_cv_deplibs_check_method - test -z "$deplibs_check_method" && deplibs_check_method=unknown -@@ -7211,9 +7312,162 @@ test -z "$deplibs_check_method" && depli - - - -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ - if test -n "$ac_tool_prefix"; then -- # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. --set dummy ${ac_tool_prefix}ar; ac_word=$2 -+ # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. -+set dummy ${ac_tool_prefix}dlltool; ac_word=$2 -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -+$as_echo_n "checking for $ac_word... " >&6; } -+if test "${ac_cv_prog_DLLTOOL+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ if test -n "$DLLTOOL"; then -+ ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. -+else -+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -+ ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" -+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ break 2 -+ fi -+done -+ done -+IFS=$as_save_IFS -+ -+fi -+fi -+DLLTOOL=$ac_cv_prog_DLLTOOL -+if test -n "$DLLTOOL"; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 -+$as_echo "$DLLTOOL" >&6; } -+else -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } -+fi -+ -+ -+fi -+if test -z "$ac_cv_prog_DLLTOOL"; then -+ ac_ct_DLLTOOL=$DLLTOOL -+ # Extract the first word of "dlltool", so it can be a program name with args. -+set dummy dlltool; ac_word=$2 -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -+$as_echo_n "checking for $ac_word... " >&6; } -+if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ if test -n "$ac_ct_DLLTOOL"; then -+ ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. -+else -+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -+ ac_cv_prog_ac_ct_DLLTOOL="dlltool" -+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ break 2 -+ fi -+done -+ done -+IFS=$as_save_IFS -+ -+fi -+fi -+ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL -+if test -n "$ac_ct_DLLTOOL"; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 -+$as_echo "$ac_ct_DLLTOOL" >&6; } -+else -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } -+fi -+ -+ if test "x$ac_ct_DLLTOOL" = x; then -+ DLLTOOL="false" -+ else -+ case $cross_compiling:$ac_tool_warned in -+yes:) -+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -+ac_tool_warned=yes ;; -+esac -+ DLLTOOL=$ac_ct_DLLTOOL -+ fi -+else -+ DLLTOOL="$ac_cv_prog_DLLTOOL" -+fi -+ -+test -z "$DLLTOOL" && DLLTOOL=dlltool -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 -+$as_echo_n "checking how to associate runtime and link libraries... " >&6; } -+if test "${lt_cv_sharedlib_from_linklib_cmd+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ lt_cv_sharedlib_from_linklib_cmd='unknown' -+ -+case $host_os in -+cygwin* | mingw* | pw32* | cegcc*) -+ # two different shell functions defined in ltmain.sh -+ # decide which to use based on capabilities of $DLLTOOL -+ case `$DLLTOOL --help 2>&1` in -+ *--identify-strict*) -+ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib -+ ;; -+ *) -+ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback -+ ;; -+ esac -+ ;; -+*) -+ # fallback: assume linklib IS sharedlib -+ lt_cv_sharedlib_from_linklib_cmd="$ECHO" -+ ;; -+esac -+ -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 -+$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } -+sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd -+test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO -+ -+ -+ -+ -+ -+ -+ -+if test -n "$ac_tool_prefix"; then -+ for ac_prog in ar -+ do -+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -+set dummy $ac_tool_prefix$ac_prog; ac_word=$2 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 - $as_echo_n "checking for $ac_word... " >&6; } - if test "${ac_cv_prog_AR+set}" = set; then : -@@ -7229,7 +7483,7 @@ do - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -- ac_cv_prog_AR="${ac_tool_prefix}ar" -+ ac_cv_prog_AR="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -@@ -7249,11 +7503,15 @@ $as_echo "no" >&6; } - fi - - -+ test -n "$AR" && break -+ done - fi --if test -z "$ac_cv_prog_AR"; then -+if test -z "$AR"; then - ac_ct_AR=$AR -- # Extract the first word of "ar", so it can be a program name with args. --set dummy ar; ac_word=$2 -+ for ac_prog in ar -+do -+ # Extract the first word of "$ac_prog", so it can be a program name with args. -+set dummy $ac_prog; ac_word=$2 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 - $as_echo_n "checking for $ac_word... " >&6; } - if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : -@@ -7269,7 +7527,7 @@ do - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -- ac_cv_prog_ac_ct_AR="ar" -+ ac_cv_prog_ac_ct_AR="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -@@ -7288,6 +7546,10 @@ else - $as_echo "no" >&6; } - fi - -+ -+ test -n "$ac_ct_AR" && break -+done -+ - if test "x$ac_ct_AR" = x; then - AR="false" - else -@@ -7299,12 +7561,10 @@ ac_tool_warned=yes ;; - esac - AR=$ac_ct_AR - fi --else -- AR="$ac_cv_prog_AR" - fi - --test -z "$AR" && AR=ar --test -z "$AR_FLAGS" && AR_FLAGS=cru -+: ${AR=ar} -+: ${AR_FLAGS=cru} - - - -@@ -7316,6 +7576,64 @@ test -z "$AR_FLAGS" && AR_FLAGS=cru - - - -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 -+$as_echo_n "checking for archiver @FILE support... " >&6; } -+if test "${lt_cv_ar_at_file+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ lt_cv_ar_at_file=no -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+ -+int -+main () -+{ -+ -+ ; -+ return 0; -+} -+_ACEOF -+if ac_fn_c_try_compile "$LINENO"; then : -+ echo conftest.$ac_objext > conftest.lst -+ lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' -+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 -+ (eval $lt_ar_try) 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -+ test $ac_status = 0; } -+ if test "$ac_status" -eq 0; then -+ # Ensure the archiver fails upon bogus file names. -+ rm -f conftest.$ac_objext libconftest.a -+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 -+ (eval $lt_ar_try) 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -+ test $ac_status = 0; } -+ if test "$ac_status" -ne 0; then -+ lt_cv_ar_at_file=@ -+ fi -+ fi -+ rm -f conftest.* libconftest.a -+ -+fi -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+ -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 -+$as_echo "$lt_cv_ar_at_file" >&6; } -+ -+if test "x$lt_cv_ar_at_file" = xno; then -+ archiver_list_spec= -+else -+ archiver_list_spec=$lt_cv_ar_at_file -+fi -+ -+ -+ -+ -+ -+ -+ - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. - set dummy ${ac_tool_prefix}strip; ac_word=$2 -@@ -7650,8 +7968,8 @@ esac - lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" - - # Transform an extracted symbol line into symbol name and symbol address --lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" --lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" -+lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" -+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" - - # Handle CRLF in mingw tool chain - opt_cr= -@@ -7687,6 +8005,7 @@ for ac_symprfx in "" "_"; do - else - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" - fi -+ lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" - - # Check to see that the pipe works correctly. - pipe_works=no -@@ -7728,6 +8047,18 @@ _LT_EOF - if $GREP ' nm_test_var$' "$nlist" >/dev/null; then - if $GREP ' nm_test_func$' "$nlist" >/dev/null; then - cat <<_LT_EOF > conftest.$ac_ext -+/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ -+#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) -+/* DATA imports from DLLs on WIN32 con't be const, because runtime -+ relocations are performed -- see ld's documentation on pseudo-relocs. */ -+# define LT_DLSYM_CONST -+#elif defined(__osf__) -+/* This system does not cope well with relocations in const data. */ -+# define LT_DLSYM_CONST -+#else -+# define LT_DLSYM_CONST const -+#endif -+ - #ifdef __cplusplus - extern "C" { - #endif -@@ -7739,7 +8070,7 @@ _LT_EOF - cat <<_LT_EOF >> conftest.$ac_ext - - /* The mapping between symbol names and symbols. */ --const struct { -+LT_DLSYM_CONST struct { - const char *name; - void *address; - } -@@ -7765,8 +8096,8 @@ static const void *lt_preloaded_setup() - _LT_EOF - # Now try linking the two files. - mv conftest.$ac_objext conftstm.$ac_objext -- lt_save_LIBS="$LIBS" -- lt_save_CFLAGS="$CFLAGS" -+ lt_globsym_save_LIBS=$LIBS -+ lt_globsym_save_CFLAGS=$CFLAGS - LIBS="conftstm.$ac_objext" - CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 -@@ -7776,8 +8107,8 @@ _LT_EOF - test $ac_status = 0; } && test -s conftest${ac_exeext}; then - pipe_works=yes - fi -- LIBS="$lt_save_LIBS" -- CFLAGS="$lt_save_CFLAGS" -+ LIBS=$lt_globsym_save_LIBS -+ CFLAGS=$lt_globsym_save_CFLAGS - else - echo "cannot find nm_test_func in $nlist" >&5 - fi -@@ -7814,6 +8145,21 @@ else - $as_echo "ok" >&6; } - fi - -+# Response file support. -+if test "$lt_cv_nm_interface" = "MS dumpbin"; then -+ nm_file_list_spec='@' -+elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then -+ nm_file_list_spec='@' -+fi -+ -+ -+ -+ -+ -+ -+ -+ -+ - - - -@@ -7832,6 +8178,40 @@ fi - - - -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 -+$as_echo_n "checking for sysroot... " >&6; } -+ -+# Check whether --with-libtool-sysroot was given. -+if test "${with_libtool_sysroot+set}" = set; then : -+ withval=$with_libtool_sysroot; -+else -+ with_libtool_sysroot=no -+fi -+ -+ -+lt_sysroot= -+case ${with_libtool_sysroot} in #( -+ yes) -+ if test "$GCC" = yes; then -+ lt_sysroot=`$CC --print-sysroot 2>/dev/null` -+ fi -+ ;; #( -+ /*) -+ lt_sysroot=`echo "$with_libtool_sysroot" | sed -e "$sed_quote_subst"` -+ ;; #( -+ no|'') -+ ;; #( -+ *) -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libtool_sysroot}" >&5 -+$as_echo "${with_libtool_sysroot}" >&6; } -+ as_fn_error "The sysroot must be an absolute path." "$LINENO" 5 -+ ;; -+esac -+ -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 -+$as_echo "${lt_sysroot:-no}" >&6; } -+ -+ - - - -@@ -8022,11 +8402,128 @@ sparc*-*solaris*) - ;; - esac - fi -- rm -rf conftest* -- ;; -+ rm -rf conftest* -+ ;; -+esac -+ -+need_locks="$enable_libtool_lock" -+ -+if test -n "$ac_tool_prefix"; then -+ # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. -+set dummy ${ac_tool_prefix}mt; ac_word=$2 -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -+$as_echo_n "checking for $ac_word... " >&6; } -+if test "${ac_cv_prog_MANIFEST_TOOL+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ if test -n "$MANIFEST_TOOL"; then -+ ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. -+else -+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -+ ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" -+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ break 2 -+ fi -+done -+ done -+IFS=$as_save_IFS -+ -+fi -+fi -+MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL -+if test -n "$MANIFEST_TOOL"; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 -+$as_echo "$MANIFEST_TOOL" >&6; } -+else -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } -+fi -+ -+ -+fi -+if test -z "$ac_cv_prog_MANIFEST_TOOL"; then -+ ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL -+ # Extract the first word of "mt", so it can be a program name with args. -+set dummy mt; ac_word=$2 -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -+$as_echo_n "checking for $ac_word... " >&6; } -+if test "${ac_cv_prog_ac_ct_MANIFEST_TOOL+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ if test -n "$ac_ct_MANIFEST_TOOL"; then -+ ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. -+else -+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -+ ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" -+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ break 2 -+ fi -+done -+ done -+IFS=$as_save_IFS -+ -+fi -+fi -+ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL -+if test -n "$ac_ct_MANIFEST_TOOL"; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 -+$as_echo "$ac_ct_MANIFEST_TOOL" >&6; } -+else -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } -+fi -+ -+ if test "x$ac_ct_MANIFEST_TOOL" = x; then -+ MANIFEST_TOOL=":" -+ else -+ case $cross_compiling:$ac_tool_warned in -+yes:) -+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -+ac_tool_warned=yes ;; - esac -+ MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL -+ fi -+else -+ MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" -+fi -+ -+test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 -+$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } -+if test "${lt_cv_path_mainfest_tool+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ lt_cv_path_mainfest_tool=no -+ echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 -+ $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out -+ cat conftest.err >&5 -+ if $GREP 'Manifest Tool' conftest.out > /dev/null; then -+ lt_cv_path_mainfest_tool=yes -+ fi -+ rm -f conftest* -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 -+$as_echo "$lt_cv_path_mainfest_tool" >&6; } -+if test "x$lt_cv_path_mainfest_tool" != xyes; then -+ MANIFEST_TOOL=: -+fi -+ -+ -+ - --need_locks="$enable_libtool_lock" - - - case $host_os in -@@ -8591,6 +9088,8 @@ _LT_EOF - $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 - echo "$AR cru libconftest.a conftest.o" >&5 - $AR cru libconftest.a conftest.o 2>&5 -+ echo "$RANLIB libconftest.a" >&5 -+ $RANLIB libconftest.a 2>&5 - cat > conftest.c << _LT_EOF - int main() { return 0;} - _LT_EOF -@@ -8787,7 +9286,8 @@ fi - LIBTOOL_DEPS="$ltmain" - - # Always use our own libtool. --LIBTOOL='$(SHELL) $(top_builddir)/libtool' -+LIBTOOL='$(SHELL) $(top_builddir)' -+LIBTOOL="$LIBTOOL/${host_alias}-libtool" - - - -@@ -8876,7 +9376,7 @@ aix3*) - esac - - # Global variables: --ofile=libtool -+ofile=${host_alias}-libtool - can_build_shared=yes - - # All known linkers require a `.a' archive for static linking (except MSVC, -@@ -9174,8 +9674,6 @@ fi - lt_prog_compiler_pic= - lt_prog_compiler_static= - --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 --$as_echo_n "checking for $compiler option to produce PIC... " >&6; } - - if test "$GCC" = yes; then - lt_prog_compiler_wl='-Wl,' -@@ -9340,6 +9838,12 @@ $as_echo_n "checking for $compiler optio - lt_prog_compiler_pic='--shared' - lt_prog_compiler_static='--static' - ;; -+ nagfor*) -+ # NAG Fortran compiler -+ lt_prog_compiler_wl='-Wl,-Wl,,' -+ lt_prog_compiler_pic='-PIC' -+ lt_prog_compiler_static='-Bstatic' -+ ;; - pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) -@@ -9402,7 +9906,7 @@ $as_echo_n "checking for $compiler optio - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - case $cc_basename in -- f77* | f90* | f95*) -+ f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) - lt_prog_compiler_wl='-Qoption ld ';; - *) - lt_prog_compiler_wl='-Wl,';; -@@ -9459,13 +9963,17 @@ case $host_os in - lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" - ;; - esac --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5 --$as_echo "$lt_prog_compiler_pic" >&6; } -- -- -- -- - -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -+$as_echo_n "checking for $compiler option to produce PIC... " >&6; } -+if test "${lt_cv_prog_compiler_pic+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ lt_cv_prog_compiler_pic=$lt_prog_compiler_pic -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 -+$as_echo "$lt_cv_prog_compiler_pic" >&6; } -+lt_prog_compiler_pic=$lt_cv_prog_compiler_pic - - # - # Check to make sure the PIC flag actually works. -@@ -9526,6 +10034,11 @@ fi - - - -+ -+ -+ -+ -+ - # - # Check to make sure the static flag actually works. - # -@@ -9876,7 +10389,8 @@ _LT_EOF - allow_undefined_flag=unsupported - always_export_symbols=no - enable_shared_with_static_runtimes=yes -- export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' -+ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' -+ exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' -@@ -9924,7 +10438,7 @@ _LT_EOF - if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ - && test "$tmp_diet" = no - then -- tmp_addflag= -+ tmp_addflag=' $pic_flag' - tmp_sharedflag='-shared' - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler -@@ -9975,12 +10489,12 @@ _LT_EOF - whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' - hardcode_libdir_flag_spec= - hardcode_libdir_flag_spec_ld='-rpath $libdir' -- archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' -+ archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then - archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ -- $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' -+ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' - fi - ;; - esac -@@ -9994,8 +10508,8 @@ _LT_EOF - archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else -- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' -+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - -@@ -10013,8 +10527,8 @@ _LT_EOF - - _LT_EOF - elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then -- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' -+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi -@@ -10060,8 +10574,8 @@ _LT_EOF - - *) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then -- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' -+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi -@@ -10191,7 +10705,13 @@ _LT_EOF - allow_undefined_flag='-berok' - # Determine the default libpath from the value encoded in an - # empty executable. -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+ if test "${lt_cv_aix_libpath+set}" = set; then -+ aix_libpath=$lt_cv_aix_libpath -+else -+ if test "${lt_cv_aix_libpath_+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - - int -@@ -10204,22 +10724,29 @@ main () - _ACEOF - if ac_fn_c_try_link "$LINENO"; then : - --lt_aix_libpath_sed=' -- /Import File Strings/,/^$/ { -- /^0/ { -- s/^0 *\(.*\)$/\1/ -- p -- } -- }' --aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` --# Check for a 64-bit object if we didn't find anything. --if test -z "$aix_libpath"; then -- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` --fi -+ lt_aix_libpath_sed=' -+ /Import File Strings/,/^$/ { -+ /^0/ { -+ s/^0 *\([^ ]*\) *$/\1/ -+ p -+ } -+ }' -+ lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -+ # Check for a 64-bit object if we didn't find anything. -+ if test -z "$lt_cv_aix_libpath_"; then -+ lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -+ fi - fi - rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext --if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi -+ if test -z "$lt_cv_aix_libpath_"; then -+ lt_cv_aix_libpath_="/usr/lib:/lib" -+ fi -+ -+fi -+ -+ aix_libpath=$lt_cv_aix_libpath_ -+fi - - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" -@@ -10231,7 +10758,13 @@ if test -z "$aix_libpath"; then aix_libp - else - # Determine the default libpath from the value encoded in an - # empty executable. -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+ if test "${lt_cv_aix_libpath+set}" = set; then -+ aix_libpath=$lt_cv_aix_libpath -+else -+ if test "${lt_cv_aix_libpath_+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - - int -@@ -10244,22 +10777,29 @@ main () - _ACEOF - if ac_fn_c_try_link "$LINENO"; then : - --lt_aix_libpath_sed=' -- /Import File Strings/,/^$/ { -- /^0/ { -- s/^0 *\(.*\)$/\1/ -- p -- } -- }' --aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` --# Check for a 64-bit object if we didn't find anything. --if test -z "$aix_libpath"; then -- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` --fi -+ lt_aix_libpath_sed=' -+ /Import File Strings/,/^$/ { -+ /^0/ { -+ s/^0 *\([^ ]*\) *$/\1/ -+ p -+ } -+ }' -+ lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -+ # Check for a 64-bit object if we didn't find anything. -+ if test -z "$lt_cv_aix_libpath_"; then -+ lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -+ fi - fi - rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext --if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi -+ if test -z "$lt_cv_aix_libpath_"; then -+ lt_cv_aix_libpath_="/usr/lib:/lib" -+ fi -+ -+fi -+ -+ aix_libpath=$lt_cv_aix_libpath_ -+fi - - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, -@@ -10304,20 +10844,63 @@ if test -z "$aix_libpath"; then aix_libp - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. -- hardcode_libdir_flag_spec=' ' -- allow_undefined_flag=unsupported -- # Tell ltmain to make .lib files, not .a files. -- libext=lib -- # Tell ltmain to make .dll files, not .so files. -- shrext_cmds=".dll" -- # FIXME: Setting linknames here is a bad hack. -- archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' -- # The linker will automatically build a .lib file if we build a DLL. -- old_archive_from_new_cmds='true' -- # FIXME: Should let the user specify the lib program. -- old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' -- fix_srcfile_path='`cygpath -w "$srcfile"`' -- enable_shared_with_static_runtimes=yes -+ case $cc_basename in -+ cl*) -+ # Native MSVC -+ hardcode_libdir_flag_spec=' ' -+ allow_undefined_flag=unsupported -+ always_export_symbols=yes -+ file_list_spec='@' -+ # Tell ltmain to make .lib files, not .a files. -+ libext=lib -+ # Tell ltmain to make .dll files, not .so files. -+ shrext_cmds=".dll" -+ # FIXME: Setting linknames here is a bad hack. -+ archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' -+ archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then -+ sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; -+ else -+ sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; -+ fi~ -+ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ -+ linknames=' -+ # The linker will not automatically build a static lib if we build a DLL. -+ # _LT_TAGVAR(old_archive_from_new_cmds, )='true' -+ enable_shared_with_static_runtimes=yes -+ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' -+ # Don't use ranlib -+ old_postinstall_cmds='chmod 644 $oldlib' -+ postlink_cmds='lt_outputfile="@OUTPUT@"~ -+ lt_tool_outputfile="@TOOL_OUTPUT@"~ -+ case $lt_outputfile in -+ *.exe|*.EXE) ;; -+ *) -+ lt_outputfile="$lt_outputfile.exe" -+ lt_tool_outputfile="$lt_tool_outputfile.exe" -+ ;; -+ esac~ -+ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then -+ $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; -+ $RM "$lt_outputfile.manifest"; -+ fi' -+ ;; -+ *) -+ # Assume MSVC wrapper -+ hardcode_libdir_flag_spec=' ' -+ allow_undefined_flag=unsupported -+ # Tell ltmain to make .lib files, not .a files. -+ libext=lib -+ # Tell ltmain to make .dll files, not .so files. -+ shrext_cmds=".dll" -+ # FIXME: Setting linknames here is a bad hack. -+ archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' -+ # The linker will automatically build a .lib file if we build a DLL. -+ old_archive_from_new_cmds='true' -+ # FIXME: Should let the user specify the lib program. -+ old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' -+ enable_shared_with_static_runtimes=yes -+ ;; -+ esac - ;; - - darwin* | rhapsody*) -@@ -10382,7 +10965,7 @@ if test -z "$aix_libpath"; then aix_libp - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) -- archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' -+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no -@@ -10390,7 +10973,7 @@ if test -z "$aix_libpath"; then aix_libp - - hpux9*) - if test "$GCC" = yes; then -- archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' -+ archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - fi -@@ -10406,7 +10989,7 @@ if test -z "$aix_libpath"; then aix_libp - - hpux10*) - if test "$GCC" = yes && test "$with_gnu_ld" = no; then -- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' -+ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi -@@ -10430,10 +11013,10 @@ if test -z "$aix_libpath"; then aix_libp - archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) -- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' -+ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) -- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' -+ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else -@@ -10512,23 +11095,36 @@ fi - - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then -- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' -+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - # Try to use the -exported_symbol ld option, if it does not - # work, assume that -exports_file does not work either and - # implicitly export all symbols. -- save_LDFLAGS="$LDFLAGS" -- LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+ # This should be the same for all languages, so no per-tag cache variable. -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 -+$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } -+if test "${lt_cv_irix_exported_symbol+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ save_LDFLAGS="$LDFLAGS" -+ LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ --int foo(void) {} -+int foo (void) { return 0; } - _ACEOF - if ac_fn_c_try_link "$LINENO"; then : -- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' -- -+ lt_cv_irix_exported_symbol=yes -+else -+ lt_cv_irix_exported_symbol=no - fi - rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -- LDFLAGS="$save_LDFLAGS" -+ LDFLAGS="$save_LDFLAGS" -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 -+$as_echo "$lt_cv_irix_exported_symbol" >&6; } -+ if test "$lt_cv_irix_exported_symbol" = yes; then -+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' -+ fi - else - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' -@@ -10613,7 +11209,7 @@ rm -f core conftest.err conftest.$ac_obj - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' -- archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' -+ archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - else - allow_undefined_flag=' -expect_unresolved \*' -@@ -10632,9 +11228,9 @@ rm -f core conftest.err conftest.$ac_obj - no_undefined_flag=' -z defs' - if test "$GCC" = yes; then - wlarc='${wl}' -- archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' -+ archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ -- $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' -+ $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - else - case `$CC -V 2>&1` in - *"Compilers 5.0"*) -@@ -11210,8 +11806,9 @@ cygwin* | mingw* | pw32* | cegcc*) - need_version=no - need_lib_prefix=no - -- case $GCC,$host_os in -- yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) -+ case $GCC,$cc_basename in -+ yes,*) -+ # gcc - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ -@@ -11244,13 +11841,71 @@ cygwin* | mingw* | pw32* | cegcc*) - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - ;; - esac -+ dynamic_linker='Win32 ld.exe' -+ ;; -+ -+ *,cl*) -+ # Native MSVC -+ libname_spec='$name' -+ soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' -+ library_names_spec='${libname}.dll.lib' -+ -+ case $build_os in -+ mingw*) -+ sys_lib_search_path_spec= -+ lt_save_ifs=$IFS -+ IFS=';' -+ for lt_path in $LIB -+ do -+ IFS=$lt_save_ifs -+ # Let DOS variable expansion print the short 8.3 style file name. -+ lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` -+ sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" -+ done -+ IFS=$lt_save_ifs -+ # Convert to MSYS style. -+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` -+ ;; -+ cygwin*) -+ # Convert to unix form, then to dos form, then back to unix form -+ # but this time dos style (no spaces!) so that the unix form looks -+ # like /cygdrive/c/PROGRA~1:/cygdr... -+ sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` -+ sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` -+ sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` -+ ;; -+ *) -+ sys_lib_search_path_spec="$LIB" -+ if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then -+ # It is most probably a Windows format PATH. -+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` -+ else -+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` -+ fi -+ # FIXME: find the short name or the path components, as spaces are -+ # common. (e.g. "Program Files" -> "PROGRA~1") -+ ;; -+ esac -+ -+ # DLL is installed to $(libdir)/../bin by postinstall_cmds -+ postinstall_cmds='base_file=`basename \${file}`~ -+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ -+ dldir=$destdir/`dirname \$dlpath`~ -+ test -d \$dldir || mkdir -p \$dldir~ -+ $install_prog $dir/$dlname \$dldir/$dlname' -+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ -+ dlpath=$dir/\$dldll~ -+ $RM \$dlpath' -+ shlibpath_overrides_runpath=yes -+ dynamic_linker='Win32 link.exe' - ;; - - *) -+ # Assume MSVC wrapper - library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' -+ dynamic_linker='Win32 ld.exe' - ;; - esac -- dynamic_linker='Win32 ld.exe' - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; -@@ -11346,7 +12001,7 @@ haiku*) - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LIBRARY_PATH - shlibpath_overrides_runpath=yes -- sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib' -+ sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' - hardcode_into_libs=yes - ;; - -@@ -12142,7 +12797,7 @@ else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF --#line 12145 "configure" -+#line $LINENO "configure" - #include "confdefs.h" - - #if HAVE_DLFCN_H -@@ -12186,10 +12841,10 @@ else - /* When -fvisbility=hidden is used, assume the code has been annotated - correspondingly for the symbols needed. */ - #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) --void fnord () __attribute__((visibility("default"))); -+int fnord () __attribute__((visibility("default"))); - #endif - --void fnord () { int i=42; } -+int fnord () { return 42; } - int main () - { - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); -@@ -12248,7 +12903,7 @@ else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF --#line 12251 "configure" -+#line $LINENO "configure" - #include "confdefs.h" - - #if HAVE_DLFCN_H -@@ -12292,10 +12947,10 @@ else - /* When -fvisbility=hidden is used, assume the code has been annotated - correspondingly for the symbols needed. */ - #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) --void fnord () __attribute__((visibility("default"))); -+int fnord () __attribute__((visibility("default"))); - #endif - --void fnord () { int i=42; } -+int fnord () { return 42; } - int main () - { - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); -@@ -17606,13 +18261,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_ - lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' - lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' - lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' -+lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' -+lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' - reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' - reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' - OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' - deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' - file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' -+file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' -+want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' -+DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' -+sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' - AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' - AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' -+archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' - STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' - RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' - old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' -@@ -17627,14 +18289,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$l - lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' - lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' - lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' -+nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' -+lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' - objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' - MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' - lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' --lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' - lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' -+lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' - lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' - lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' - need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' -+MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' - DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' - NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' - LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' -@@ -17667,12 +18332,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcod - hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' - inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' - link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' --fix_srcfile_path='`$ECHO "$fix_srcfile_path" | $SED "$delay_single_quote_subst"`' - always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' - export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' - exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' - include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' - prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' -+postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' - file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' - variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' - need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' -@@ -17782,8 +18447,13 @@ reload_flag \ - OBJDUMP \ - deplibs_check_method \ - file_magic_cmd \ -+file_magic_glob \ -+want_nocaseglob \ -+DLLTOOL \ -+sharedlib_from_linklib_cmd \ - AR \ - AR_FLAGS \ -+archiver_list_spec \ - STRIP \ - RANLIB \ - CC \ -@@ -17793,12 +18463,14 @@ lt_cv_sys_global_symbol_pipe \ - lt_cv_sys_global_symbol_to_cdecl \ - lt_cv_sys_global_symbol_to_c_name_address \ - lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ -+nm_file_list_spec \ - lt_prog_compiler_no_builtin_flag \ --lt_prog_compiler_wl \ - lt_prog_compiler_pic \ -+lt_prog_compiler_wl \ - lt_prog_compiler_static \ - lt_cv_prog_compiler_c_o \ - need_locks \ -+MANIFEST_TOOL \ - DSYMUTIL \ - NMEDIT \ - LIPO \ -@@ -17814,7 +18486,6 @@ no_undefined_flag \ - hardcode_libdir_flag_spec \ - hardcode_libdir_flag_spec_ld \ - hardcode_libdir_separator \ --fix_srcfile_path \ - exclude_expsyms \ - include_expsyms \ - file_list_spec \ -@@ -17883,6 +18554,7 @@ module_cmds \ - module_expsym_cmds \ - export_symbols_cmds \ - prelink_cmds \ -+postlink_cmds \ - postinstall_cmds \ - postuninstall_cmds \ - finish_cmds \ -@@ -18690,7 +19362,8 @@ $as_echo X"$file" | - # NOTE: Changes made to this file will be lost: look at ltmain.sh. - # - # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, --# 2006, 2007, 2008, 2009 Free Software Foundation, Inc. -+# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, -+# Inc. - # Written by Gordon Matzigkeit, 1996 - # - # This file is part of GNU Libtool. -@@ -18793,19 +19466,42 @@ SP2NL=$lt_lt_SP2NL - # turn newlines into spaces. - NL2SP=$lt_lt_NL2SP - -+# convert \$build file names to \$host format. -+to_host_file_cmd=$lt_cv_to_host_file_cmd -+ -+# convert \$build files to toolchain format. -+to_tool_file_cmd=$lt_cv_to_tool_file_cmd -+ - # An object symbol dumper. - OBJDUMP=$lt_OBJDUMP - - # Method to check whether dependent libraries are shared objects. - deplibs_check_method=$lt_deplibs_check_method - --# Command to use when deplibs_check_method == "file_magic". -+# Command to use when deplibs_check_method = "file_magic". - file_magic_cmd=$lt_file_magic_cmd - -+# How to find potential files when deplibs_check_method = "file_magic". -+file_magic_glob=$lt_file_magic_glob -+ -+# Find potential files using nocaseglob when deplibs_check_method = "file_magic". -+want_nocaseglob=$lt_want_nocaseglob -+ -+# DLL creation program. -+DLLTOOL=$lt_DLLTOOL -+ -+# Command to associate shared and link libraries. -+sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd -+ - # The archiver. - AR=$lt_AR -+ -+# Flags to create an archive. - AR_FLAGS=$lt_AR_FLAGS - -+# How to feed a file listing to the archiver. -+archiver_list_spec=$lt_archiver_list_spec -+ - # A symbol stripping program. - STRIP=$lt_STRIP - -@@ -18835,6 +19531,12 @@ global_symbol_to_c_name_address=$lt_lt_c - # Transform the output of nm in a C name address pair when lib prefix is needed. - global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix - -+# Specify filename containing input files for \$NM. -+nm_file_list_spec=$lt_nm_file_list_spec -+ -+# The root where to search for dependent libraries,and in which our libraries should be installed. -+lt_sysroot=$lt_sysroot -+ - # The name of the directory that contains temporary libtool files. - objdir=$objdir - -@@ -18844,6 +19546,9 @@ MAGIC_CMD=$MAGIC_CMD - # Must we lock files when doing compilation? - need_locks=$lt_need_locks - -+# Manifest tool. -+MANIFEST_TOOL=$lt_MANIFEST_TOOL -+ - # Tool to manipulate archived DWARF debug symbol files on Mac OS X. - DSYMUTIL=$lt_DSYMUTIL - -@@ -18958,12 +19663,12 @@ with_gcc=$GCC - # Compiler flag to turn off builtin functions. - no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag - --# How to pass a linker flag through the compiler. --wl=$lt_lt_prog_compiler_wl -- - # Additional compiler flags for building library objects. - pic_flag=$lt_lt_prog_compiler_pic - -+# How to pass a linker flag through the compiler. -+wl=$lt_lt_prog_compiler_wl -+ - # Compiler flag to prevent dynamic linking. - link_static_flag=$lt_lt_prog_compiler_static - -@@ -19050,9 +19755,6 @@ inherit_rpath=$inherit_rpath - # Whether libtool must link a program against all its dependency libraries. - link_all_deplibs=$link_all_deplibs - --# Fix the shell variable \$srcfile for the compiler. --fix_srcfile_path=$lt_fix_srcfile_path -- - # Set to "yes" if exported symbols are required. - always_export_symbols=$always_export_symbols - -@@ -19068,6 +19770,9 @@ include_expsyms=$lt_include_expsyms - # Commands necessary for linking programs (against libraries) with templates. - prelink_cmds=$lt_prelink_cmds - -+# Commands necessary for finishing linking programs. -+postlink_cmds=$lt_postlink_cmds -+ - # Specify filename containing input files. - file_list_spec=$lt_file_list_spec - -@@ -19114,210 +19819,169 @@ ltmain="$ac_aux_dir/ltmain.sh" - # if finds mixed CR/LF and LF-only lines. Since sed operates in - # text mode, it properly converts lines to CR/LF. This bash problem - # is reportedly fixed, but why not run on old versions too? -- sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ -- || (rm -f "$cfgfile"; exit 1) -- -- case $xsi_shell in -- yes) -- cat << \_LT_EOF >> "$cfgfile" -- --# func_dirname file append nondir_replacement --# Compute the dirname of FILE. If nonempty, add APPEND to the result, --# otherwise set result to NONDIR_REPLACEMENT. --func_dirname () --{ -- case ${1} in -- */*) func_dirname_result="${1%/*}${2}" ;; -- * ) func_dirname_result="${3}" ;; -- esac --} -- --# func_basename file --func_basename () --{ -- func_basename_result="${1##*/}" --} -- --# func_dirname_and_basename file append nondir_replacement --# perform func_basename and func_dirname in a single function --# call: --# dirname: Compute the dirname of FILE. If nonempty, --# add APPEND to the result, otherwise set result --# to NONDIR_REPLACEMENT. --# value returned in "$func_dirname_result" --# basename: Compute filename of FILE. --# value retuned in "$func_basename_result" --# Implementation must be kept synchronized with func_dirname --# and func_basename. For efficiency, we do not delegate to --# those functions but instead duplicate the functionality here. --func_dirname_and_basename () --{ -- case ${1} in -- */*) func_dirname_result="${1%/*}${2}" ;; -- * ) func_dirname_result="${3}" ;; -- esac -- func_basename_result="${1##*/}" --} -- --# func_stripname prefix suffix name --# strip PREFIX and SUFFIX off of NAME. --# PREFIX and SUFFIX must not contain globbing or regex special --# characters, hashes, percent signs, but SUFFIX may contain a leading --# dot (in which case that matches only a dot). --func_stripname () --{ -- # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are -- # positional parameters, so assign one to ordinary parameter first. -- func_stripname_result=${3} -- func_stripname_result=${func_stripname_result#"${1}"} -- func_stripname_result=${func_stripname_result%"${2}"} --} -- --# func_opt_split --func_opt_split () --{ -- func_opt_split_opt=${1%%=*} -- func_opt_split_arg=${1#*=} --} -- --# func_lo2o object --func_lo2o () --{ -- case ${1} in -- *.lo) func_lo2o_result=${1%.lo}.${objext} ;; -- *) func_lo2o_result=${1} ;; -- esac --} -- --# func_xform libobj-or-source --func_xform () --{ -- func_xform_result=${1%.*}.lo --} -- --# func_arith arithmetic-term... --func_arith () --{ -- func_arith_result=$(( $* )) --} -- --# func_len string --# STRING may not start with a hyphen. --func_len () --{ -- func_len_result=${#1} --} -- --_LT_EOF -- ;; -- *) # Bourne compatible functions. -- cat << \_LT_EOF >> "$cfgfile" -- --# func_dirname file append nondir_replacement --# Compute the dirname of FILE. If nonempty, add APPEND to the result, --# otherwise set result to NONDIR_REPLACEMENT. --func_dirname () --{ -- # Extract subdirectory from the argument. -- func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` -- if test "X$func_dirname_result" = "X${1}"; then -- func_dirname_result="${3}" -- else -- func_dirname_result="$func_dirname_result${2}" -- fi --} -- --# func_basename file --func_basename () --{ -- func_basename_result=`$ECHO "${1}" | $SED "$basename"` --} -- -- --# func_stripname prefix suffix name --# strip PREFIX and SUFFIX off of NAME. --# PREFIX and SUFFIX must not contain globbing or regex special --# characters, hashes, percent signs, but SUFFIX may contain a leading --# dot (in which case that matches only a dot). --# func_strip_suffix prefix name --func_stripname () --{ -- case ${2} in -- .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; -- *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; -- esac --} -- --# sed scripts: --my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q' --my_sed_long_arg='1s/^-[^=]*=//' -- --# func_opt_split --func_opt_split () --{ -- func_opt_split_opt=`$ECHO "${1}" | $SED "$my_sed_long_opt"` -- func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"` --} -- --# func_lo2o object --func_lo2o () --{ -- func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` --} -- --# func_xform libobj-or-source --func_xform () --{ -- func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` --} -- --# func_arith arithmetic-term... --func_arith () --{ -- func_arith_result=`expr "$@"` --} -- --# func_len string --# STRING may not start with a hyphen. --func_len () --{ -- func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` --} -- --_LT_EOF --esac -- --case $lt_shell_append in -- yes) -- cat << \_LT_EOF >> "$cfgfile" -- --# func_append var value --# Append VALUE to the end of shell variable VAR. --func_append () --{ -- eval "$1+=\$2" --} --_LT_EOF -- ;; -- *) -- cat << \_LT_EOF >> "$cfgfile" -- --# func_append var value --# Append VALUE to the end of shell variable VAR. --func_append () --{ -- eval "$1=\$$1\$2" --} -- --_LT_EOF -- ;; -- esac -+ sed '$q' "$ltmain" >> "$cfgfile" \ -+ || (rm -f "$cfgfile"; exit 1) - -+ if test x"$xsi_shell" = xyes; then -+ sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ -+func_dirname ()\ -+{\ -+\ case ${1} in\ -+\ */*) func_dirname_result="${1%/*}${2}" ;;\ -+\ * ) func_dirname_result="${3}" ;;\ -+\ esac\ -+} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_basename ()$/,/^} # func_basename /c\ -+func_basename ()\ -+{\ -+\ func_basename_result="${1##*/}"\ -+} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ -+func_dirname_and_basename ()\ -+{\ -+\ case ${1} in\ -+\ */*) func_dirname_result="${1%/*}${2}" ;;\ -+\ * ) func_dirname_result="${3}" ;;\ -+\ esac\ -+\ func_basename_result="${1##*/}"\ -+} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ -+func_stripname ()\ -+{\ -+\ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ -+\ # positional parameters, so assign one to ordinary parameter first.\ -+\ func_stripname_result=${3}\ -+\ func_stripname_result=${func_stripname_result#"${1}"}\ -+\ func_stripname_result=${func_stripname_result%"${2}"}\ -+} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ -+func_split_long_opt ()\ -+{\ -+\ func_split_long_opt_name=${1%%=*}\ -+\ func_split_long_opt_arg=${1#*=}\ -+} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ -+func_split_short_opt ()\ -+{\ -+\ func_split_short_opt_arg=${1#??}\ -+\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ -+} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ -+func_lo2o ()\ -+{\ -+\ case ${1} in\ -+\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ -+\ *) func_lo2o_result=${1} ;;\ -+\ esac\ -+} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_xform ()$/,/^} # func_xform /c\ -+func_xform ()\ -+{\ -+ func_xform_result=${1%.*}.lo\ -+} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_arith ()$/,/^} # func_arith /c\ -+func_arith ()\ -+{\ -+ func_arith_result=$(( $* ))\ -+} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_len ()$/,/^} # func_len /c\ -+func_len ()\ -+{\ -+ func_len_result=${#1}\ -+} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+fi -+ -+if test x"$lt_shell_append" = xyes; then -+ sed -e '/^func_append ()$/,/^} # func_append /c\ -+func_append ()\ -+{\ -+ eval "${1}+=\\${2}"\ -+} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ -+func_append_quoted ()\ -+{\ -+\ func_quote_for_eval "${2}"\ -+\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ -+} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ # Save a `func_append' function call where possible by direct use of '+=' -+ sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+ test 0 -eq $? || _lt_function_replace_fail=: -+else -+ # Save a `func_append' function call even when '+=' is not available -+ sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+ test 0 -eq $? || _lt_function_replace_fail=: -+fi -+ -+if test x"$_lt_function_replace_fail" = x":"; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 -+$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} -+fi - -- sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ -- || (rm -f "$cfgfile"; exit 1) - -- mv -f "$cfgfile" "$ofile" || -+ mv -f "$cfgfile" "$ofile" || - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" - -Index: binutils-2.21.1/bfd/configure.in -=================================================================== ---- binutils-2.21.1.orig/bfd/configure.in -+++ binutils-2.21.1/bfd/configure.in -@@ -536,7 +536,7 @@ changequote(,)dnl - x=`sed -n -e 's/^[ ]*PICFLAG[ ]*=[ ]*//p' < ../libiberty/Makefile | sed -n '$p'` - changequote([,])dnl - if test -n "$x"; then -- SHARED_LIBADD="-L`pwd`/../libiberty/pic -liberty" -+ SHARED_LIBADD="`pwd`/../libiberty/pic/libiberty.a" - fi - - # More hacks to build DLLs on Windows. -Index: binutils-2.21.1/opcodes/configure.in -=================================================================== ---- binutils-2.21.1.orig/opcodes/configure.in -+++ binutils-2.21.1/opcodes/configure.in -@@ -134,7 +134,7 @@ changequote(,)dnl - x=`sed -n -e 's/^[ ]*PICFLAG[ ]*=[ ]*//p' < ../libiberty/Makefile | sed -n '$p'` - changequote([,])dnl - if test -n "$x"; then -- SHARED_LIBADD="-L`pwd`/../libiberty/pic -liberty" -+ SHARED_LIBADD="`pwd`/../libiberty/pic/libiberty.a" - fi - - case "${host}" in diff --git a/meta-fsl-ppc/recipes-devtools/eglibc/eglibc-fsl.inc b/meta-fsl-ppc/recipes-devtools/eglibc/eglibc-fsl.inc deleted file mode 100644 index 88876f04..00000000 --- a/meta-fsl-ppc/recipes-devtools/eglibc/eglibc-fsl.inc +++ /dev/null @@ -1,14 +0,0 @@ -SRC_URI_fsl = "svn://www.eglibc.org/svn/branches/;module=${EGLIBC_BRANCH};proto=http \ - file://glibc.undefined_static.patch \ - file://glibc.fixgcc4.6.patch \ - file://glibc.readv_proto.patch \ - file://glibc.fix_sqrt.patch \ - file://glibc.fix_prof.patch \ - file://glibc.e500mc_subspecies_of_powerpc_is_not_supported.patch \ - file://etc/ld.so.conf \ - file://generate-supported.mk \ -" - -FILESEXTRAPATHS_prepend := "${THISDIR}/files:" - -PR_append_fsl = "+${DISTRO}.0" diff --git a/meta-fsl-ppc/recipes-devtools/eglibc/eglibc-initial_2.13.bbappend b/meta-fsl-ppc/recipes-devtools/eglibc/eglibc-initial_2.13.bbappend deleted file mode 100644 index 4f61361b..00000000 --- a/meta-fsl-ppc/recipes-devtools/eglibc/eglibc-initial_2.13.bbappend +++ /dev/null @@ -1 +0,0 @@ -require eglibc-fsl.inc diff --git a/meta-fsl-ppc/recipes-devtools/eglibc/eglibc-locale_2.13.bbappend b/meta-fsl-ppc/recipes-devtools/eglibc/eglibc-locale_2.13.bbappend deleted file mode 100644 index 4f61361b..00000000 --- a/meta-fsl-ppc/recipes-devtools/eglibc/eglibc-locale_2.13.bbappend +++ /dev/null @@ -1 +0,0 @@ -require eglibc-fsl.inc diff --git a/meta-fsl-ppc/recipes-devtools/eglibc/eglibc_2.13.bbappend b/meta-fsl-ppc/recipes-devtools/eglibc/eglibc_2.13.bbappend deleted file mode 100644 index 4f61361b..00000000 --- a/meta-fsl-ppc/recipes-devtools/eglibc/eglibc_2.13.bbappend +++ /dev/null @@ -1 +0,0 @@ -require eglibc-fsl.inc diff --git a/meta-fsl-ppc/recipes-devtools/eglibc/files/etc/ld.so.conf b/meta-fsl-ppc/recipes-devtools/eglibc/files/etc/ld.so.conf deleted file mode 100644 index e69de29b..00000000 diff --git a/meta-fsl-ppc/recipes-devtools/eglibc/files/generate-supported.mk b/meta-fsl-ppc/recipes-devtools/eglibc/files/generate-supported.mk deleted file mode 100644 index d2a28c2d..00000000 --- a/meta-fsl-ppc/recipes-devtools/eglibc/files/generate-supported.mk +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/make - -include $(IN) - -all: - rm -f $(OUT) - touch $(OUT) - for locale in $(SUPPORTED-LOCALES); do \ - [ $$locale = true ] && continue; \ - echo $$locale | sed 's,/, ,' >> $(OUT); \ - done diff --git a/meta-fsl-ppc/recipes-devtools/eglibc/files/glibc.e500mc_subspecies_of_powerpc_is_not_supported.patch b/meta-fsl-ppc/recipes-devtools/eglibc/files/glibc.e500mc_subspecies_of_powerpc_is_not_supported.patch deleted file mode 100644 index 6feb76ef..00000000 --- a/meta-fsl-ppc/recipes-devtools/eglibc/files/glibc.e500mc_subspecies_of_powerpc_is_not_supported.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/configure 2012-03-05 07:00:49.600200254 -0600 -+++ b/configure 2012-03-05 07:01:13.249394037 -0600 -@@ -4581,7 +4581,7 @@ - if test -z "$submachine_used" && test -n "$submachine"; then - { { $as_echo "$as_me:$LINENO: error: The $submachine subspecies of $host_cpu is not supported." >&5 - $as_echo "$as_me: error: The $submachine subspecies of $host_cpu is not supported." >&2;} -- { (exit 1); exit 1; }; } -+ } - fi - - diff --git a/meta-fsl-ppc/recipes-devtools/eglibc/files/glibc.fix_prof.patch b/meta-fsl-ppc/recipes-devtools/eglibc/files/glibc.fix_prof.patch deleted file mode 100644 index 966e9e3c..00000000 --- a/meta-fsl-ppc/recipes-devtools/eglibc/files/glibc.fix_prof.patch +++ /dev/null @@ -1,38 +0,0 @@ -diff -ruN libc-orig/elf/dl-runtime.c libc-e5500/elf/dl-runtime.c ---- libc-orig/elf/dl-runtime.c 2011-12-08 04:25:09.201995061 -0600 -+++ libc-e5500/elf/dl-runtime.c 2011-12-08 04:26:12.760996794 -0600 -@@ -156,7 +156,7 @@ - } - #endif - --#if !defined PROF && !defined ELF_MACHINE_NO_PLT && !__BOUNDED_POINTERS__ -+#if !defined ELF_MACHINE_NO_PLT && !__BOUNDED_POINTERS__ - DL_FIXUP_VALUE_TYPE - __attribute ((noinline)) ARCH_FIXUP_ATTRIBUTE - _dl_profile_fixup ( -@@ -425,7 +425,7 @@ - return value; - } - --#endif /* PROF && ELF_MACHINE_NO_PLT */ -+#endif /* ELF_MACHINE_NO_PLT */ - - - #include -diff -ruN libc-orig/sysdeps/powerpc/powerpc32/dl-trampoline.S libc-e5500/sysdeps/powerpc/powerpc32/dl-trampoline.S ---- libc-orig/sysdeps/powerpc/powerpc32/dl-trampoline.S 2011-12-08 04:25:12.103998210 -0600 -+++ libc-e5500/sysdeps/powerpc/powerpc32/dl-trampoline.S 2011-12-08 04:26:19.310748350 -0600 -@@ -71,7 +71,6 @@ - cfi_endproc - .size _dl_runtime_resolve,.-_dl_runtime_resolve - --#ifndef PROF - .align 2 - .globl _dl_prof_resolve - .type _dl_prof_resolve,@function -@@ -183,4 +182,4 @@ - bctr - cfi_endproc - .size _dl_prof_resolve,.-_dl_prof_resolve --#endif -+ diff --git a/meta-fsl-ppc/recipes-devtools/eglibc/files/glibc.fix_sqrt.patch b/meta-fsl-ppc/recipes-devtools/eglibc/files/glibc.fix_sqrt.patch deleted file mode 100644 index a648b4ff..00000000 --- a/meta-fsl-ppc/recipes-devtools/eglibc/files/glibc.fix_sqrt.patch +++ /dev/null @@ -1,500 +0,0 @@ -Implements sqrt with fsqrte. -Adds functions for 603e (also used for e300c3, e600 and e500mc) -Adds functions for e5500 in 64 bit mode (also used for e6500) - -diff -ruN libc-orig/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c libc-e5500/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c ---- libc-orig/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c 1969-12-31 18:00:00.000000000 -0600 -+++ libc-e5500/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c 2011-05-18 13:00:40.423986787 -0500 -@@ -0,0 +1,134 @@ -+/* Double-precision floating point square root. -+ Copyright (C) 2010 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 -+#include -+#include -+#include -+ -+#include -+#include -+ -+static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 }; -+static const ieee_float_shape_type a_inf = {.word = 0x7f800000 }; -+static const float two108 = 3.245185536584267269e+32; -+static const float twom54 = 5.551115123125782702e-17; -+static const float half = 0.5; -+ -+/* The method is based on the descriptions in: -+ -+ _The Handbook of Floating-Pointer Arithmetic_ by Muller et al., chapter 5; -+ _IA-64 and Elementary Functions: Speed and Precision_ by Markstein, chapter 9 -+ -+ We find the actual square root and half of its reciprocal -+ simultaneously. */ -+ -+#ifdef __STDC__ -+double -+__ieee754_sqrt (double b) -+#else -+double -+__ieee754_sqrt (b) -+ double b; -+#endif -+{ -+ if (__builtin_expect (b > 0, 1)) -+ { -+ double y, g, h, d, r; -+ ieee_double_shape_type u; -+ -+ if (__builtin_expect (b != a_inf.value, 1)) -+ { -+ fenv_t fe; -+ -+ fe = fegetenv_register (); -+ -+ u.value = b; -+ -+ relax_fenv_state (); -+ -+ __asm__ ("frsqrte %[estimate], %[x]\n" -+ : [estimate] "=f" (y) : [x] "f" (b)); -+ -+ /* Following Muller et al, page 168, equation 5.20. -+ -+ h goes to 1/(2*sqrt(b)) -+ g goes to sqrt(b). -+ -+ We need three iterations to get within 1ulp. */ -+ -+ /* Indicate that these can be performed prior to the branch. GCC -+ insists on sinking them below the branch, however; it seems like -+ they'd be better before the branch so that we can cover any latency -+ from storing the argument and loading its high word. Oh well. */ -+ -+ g = b * y; -+ h = 0.5 * y; -+ -+ /* Handle small numbers by scaling. */ -+ if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0)) -+ return __ieee754_sqrt (b * two108) * twom54; -+ -+#define FMADD(a_, c_, b_) \ -+ ({ double __r; \ -+ __asm__ ("fmadd %[r], %[a], %[c], %[b]\n" \ -+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \ -+ __r;}) -+#define FNMSUB(a_, c_, b_) \ -+ ({ double __r; \ -+ __asm__ ("fnmsub %[r], %[a], %[c], %[b]\n" \ -+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \ -+ __r;}) -+ -+ r = FNMSUB (g, h, half); -+ g = FMADD (g, r, g); -+ h = FMADD (h, r, h); -+ -+ r = FNMSUB (g, h, half); -+ g = FMADD (g, r, g); -+ h = FMADD (h, r, h); -+ -+ r = FNMSUB (g, h, half); -+ g = FMADD (g, r, g); -+ h = FMADD (h, r, h); -+ -+ /* g is now +/- 1ulp, or exactly equal to, the square root of b. */ -+ -+ /* Final refinement. */ -+ d = FNMSUB (g, g, b); -+ -+ fesetenv_register (fe); -+ return FMADD (d, h, g); -+ } -+ } -+ else if (b < 0) -+ { -+ /* For some reason, some PowerPC32 processors don't implement -+ FE_INVALID_SQRT. */ -+#ifdef FE_INVALID_SQRT -+ feraiseexcept (FE_INVALID_SQRT); -+ -+ fenv_union_t u = { .fenv = fegetenv_register () }; -+ if ((u.l[1] & FE_INVALID) == 0) -+#endif -+ feraiseexcept (FE_INVALID); -+ b = a_nan.value; -+ } -+ return f_wash (b); -+} -diff -ruN libc-orig/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c libc-e5500/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c ---- libc-orig/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c 1969-12-31 18:00:00.000000000 -0600 -+++ libc-e5500/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c 2011-05-18 13:00:40.423986787 -0500 -@@ -0,0 +1,101 @@ -+/* Single-precision floating point square root. -+ Copyright (C) 2010 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 -+#include -+#include -+#include -+ -+#include -+#include -+ -+static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 }; -+static const ieee_float_shape_type a_inf = {.word = 0x7f800000 }; -+static const float threehalf = 1.5; -+ -+/* The method is based on the descriptions in: -+ -+ _The Handbook of Floating-Pointer Arithmetic_ by Muller et al., chapter 5; -+ _IA-64 and Elementary Functions: Speed and Precision_ by Markstein, chapter 9 -+ -+ We find the reciprocal square root and use that to compute the actual -+ square root. */ -+ -+#ifdef __STDC__ -+float -+__ieee754_sqrtf (float b) -+#else -+float -+__ieee754_sqrtf (b) -+ float b; -+#endif -+{ -+ if (__builtin_expect (b > 0, 1)) -+ { -+#define FMSUB(a_, c_, b_) \ -+ ({ double __r; \ -+ __asm__ ("fmsub %[r], %[a], %[c], %[b]\n" \ -+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \ -+ __r;}) -+#define FNMSUB(a_, c_, b_) \ -+ ({ double __r; \ -+ __asm__ ("fnmsub %[r], %[a], %[c], %[b]\n" \ -+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \ -+ __r;}) -+ -+ if (__builtin_expect (b != a_inf.value, 1)) -+ { -+ double y, x; -+ fenv_t fe; -+ -+ fe = fegetenv_register (); -+ -+ relax_fenv_state (); -+ -+ /* Compute y = 1.5 * b - b. Uses fewer constants than y = 0.5 * b. */ -+ y = FMSUB (threehalf, b, b); -+ -+ /* Initial estimate. */ -+ __asm__ ("frsqrte %[x], %[b]\n" : [x] "=f" (x) : [b] "f" (b)); -+ -+ /* Iterate. x_{n+1} = x_n * (1.5 - y * (x_n * x_n)). */ -+ x = x * FNMSUB (y, x * x, threehalf); -+ x = x * FNMSUB (y, x * x, threehalf); -+ x = x * FNMSUB (y, x * x, threehalf); -+ -+ /* All done. */ -+ fesetenv_register (fe); -+ return x * b; -+ } -+ } -+ else if (b < 0) -+ { -+ /* For some reason, some PowerPC32 processors don't implement -+ FE_INVALID_SQRT. */ -+#ifdef FE_INVALID_SQRT -+ feraiseexcept (FE_INVALID_SQRT); -+ -+ fenv_union_t u = { .fenv = fegetenv_register () }; -+ if ((u.l[1] & FE_INVALID) == 0) -+#endif -+ feraiseexcept (FE_INVALID); -+ b = a_nan.value; -+ } -+ return f_washf (b); -+} -diff -ruN libc-orig/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c libc-e5500/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c ---- libc-orig/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c 1969-12-31 18:00:00.000000000 -0600 -+++ libc-e5500/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c 2011-05-18 11:15:22.467987000 -0500 -@@ -0,0 +1,134 @@ -+/* Double-precision floating point square root. -+ Copyright (C) 2010 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 -+#include -+#include -+#include -+ -+#include -+#include -+ -+static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 }; -+static const ieee_float_shape_type a_inf = {.word = 0x7f800000 }; -+static const float two108 = 3.245185536584267269e+32; -+static const float twom54 = 5.551115123125782702e-17; -+static const float half = 0.5; -+ -+/* The method is based on the descriptions in: -+ -+ _The Handbook of Floating-Pointer Arithmetic_ by Muller et al., chapter 5; -+ _IA-64 and Elementary Functions: Speed and Precision_ by Markstein, chapter 9 -+ -+ We find the actual square root and half of its reciprocal -+ simultaneously. */ -+ -+#ifdef __STDC__ -+double -+__ieee754_sqrt (double b) -+#else -+double -+__ieee754_sqrt (b) -+ double b; -+#endif -+{ -+ if (__builtin_expect (b > 0, 1)) -+ { -+ double y, g, h, d, r; -+ ieee_double_shape_type u; -+ -+ if (__builtin_expect (b != a_inf.value, 1)) -+ { -+ fenv_t fe; -+ -+ fe = fegetenv_register (); -+ -+ u.value = b; -+ -+ relax_fenv_state (); -+ -+ __asm__ ("frsqrte %[estimate], %[x]\n" -+ : [estimate] "=f" (y) : [x] "f" (b)); -+ -+ /* Following Muller et al, page 168, equation 5.20. -+ -+ h goes to 1/(2*sqrt(b)) -+ g goes to sqrt(b). -+ -+ We need three iterations to get within 1ulp. */ -+ -+ /* Indicate that these can be performed prior to the branch. GCC -+ insists on sinking them below the branch, however; it seems like -+ they'd be better before the branch so that we can cover any latency -+ from storing the argument and loading its high word. Oh well. */ -+ -+ g = b * y; -+ h = 0.5 * y; -+ -+ /* Handle small numbers by scaling. */ -+ if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0)) -+ return __ieee754_sqrt (b * two108) * twom54; -+ -+#define FMADD(a_, c_, b_) \ -+ ({ double __r; \ -+ __asm__ ("fmadd %[r], %[a], %[c], %[b]\n" \ -+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \ -+ __r;}) -+#define FNMSUB(a_, c_, b_) \ -+ ({ double __r; \ -+ __asm__ ("fnmsub %[r], %[a], %[c], %[b]\n" \ -+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \ -+ __r;}) -+ -+ r = FNMSUB (g, h, half); -+ g = FMADD (g, r, g); -+ h = FMADD (h, r, h); -+ -+ r = FNMSUB (g, h, half); -+ g = FMADD (g, r, g); -+ h = FMADD (h, r, h); -+ -+ r = FNMSUB (g, h, half); -+ g = FMADD (g, r, g); -+ h = FMADD (h, r, h); -+ -+ /* g is now +/- 1ulp, or exactly equal to, the square root of b. */ -+ -+ /* Final refinement. */ -+ d = FNMSUB (g, g, b); -+ -+ fesetenv_register (fe); -+ return FMADD (d, h, g); -+ } -+ } -+ else if (b < 0) -+ { -+ /* For some reason, some PowerPC32 processors don't implement -+ FE_INVALID_SQRT. */ -+#ifdef FE_INVALID_SQRT -+ feraiseexcept (FE_INVALID_SQRT); -+ -+ fenv_union_t u = { .fenv = fegetenv_register () }; -+ if ((u.l[1] & FE_INVALID) == 0) -+#endif -+ feraiseexcept (FE_INVALID); -+ b = a_nan.value; -+ } -+ return f_wash (b); -+} -diff -ruN libc-orig/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c libc-e5500/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c ---- libc-orig/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c 1969-12-31 18:00:00.000000000 -0600 -+++ libc-e5500/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c 2011-05-18 11:15:22.467987000 -0500 -@@ -0,0 +1,101 @@ -+/* Single-precision floating point square root. -+ Copyright (C) 2010 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 -+#include -+#include -+#include -+ -+#include -+#include -+ -+static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 }; -+static const ieee_float_shape_type a_inf = {.word = 0x7f800000 }; -+static const float threehalf = 1.5; -+ -+/* The method is based on the descriptions in: -+ -+ _The Handbook of Floating-Pointer Arithmetic_ by Muller et al., chapter 5; -+ _IA-64 and Elementary Functions: Speed and Precision_ by Markstein, chapter 9 -+ -+ We find the reciprocal square root and use that to compute the actual -+ square root. */ -+ -+#ifdef __STDC__ -+float -+__ieee754_sqrtf (float b) -+#else -+float -+__ieee754_sqrtf (b) -+ float b; -+#endif -+{ -+ if (__builtin_expect (b > 0, 1)) -+ { -+#define FMSUB(a_, c_, b_) \ -+ ({ double __r; \ -+ __asm__ ("fmsub %[r], %[a], %[c], %[b]\n" \ -+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \ -+ __r;}) -+#define FNMSUB(a_, c_, b_) \ -+ ({ double __r; \ -+ __asm__ ("fnmsub %[r], %[a], %[c], %[b]\n" \ -+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \ -+ __r;}) -+ -+ if (__builtin_expect (b != a_inf.value, 1)) -+ { -+ double y, x; -+ fenv_t fe; -+ -+ fe = fegetenv_register (); -+ -+ relax_fenv_state (); -+ -+ /* Compute y = 1.5 * b - b. Uses fewer constants than y = 0.5 * b. */ -+ y = FMSUB (threehalf, b, b); -+ -+ /* Initial estimate. */ -+ __asm__ ("frsqrte %[x], %[b]\n" : [x] "=f" (x) : [b] "f" (b)); -+ -+ /* Iterate. x_{n+1} = x_n * (1.5 - y * (x_n * x_n)). */ -+ x = x * FNMSUB (y, x * x, threehalf); -+ x = x * FNMSUB (y, x * x, threehalf); -+ x = x * FNMSUB (y, x * x, threehalf); -+ -+ /* All done. */ -+ fesetenv_register (fe); -+ return x * b; -+ } -+ } -+ else if (b < 0) -+ { -+ /* For some reason, some PowerPC32 processors don't implement -+ FE_INVALID_SQRT. */ -+#ifdef FE_INVALID_SQRT -+ feraiseexcept (FE_INVALID_SQRT); -+ -+ fenv_union_t u = { .fenv = fegetenv_register () }; -+ if ((u.l[1] & FE_INVALID) == 0) -+#endif -+ feraiseexcept (FE_INVALID); -+ b = a_nan.value; -+ } -+ return f_washf (b); -+} -diff -ruN libc-orig/sysdeps/unix/sysv/linux/powerpc/powerpc32/603e/fpu/Implies libc-e5500/sysdeps/unix/sysv/linux/powerpc/powerpc32/603e/fpu/Implies ---- libc-orig/sysdeps/unix/sysv/linux/powerpc/powerpc32/603e/fpu/Implies 1969-12-31 18:00:00.000000000 -0600 -+++ libc-e5500/sysdeps/unix/sysv/linux/powerpc/powerpc32/603e/fpu/Implies 2011-05-18 13:01:33.987988922 -0500 -@@ -0,0 +1 @@ -+powerpc/powerpc32/603e/fpu -diff -ruN libc-orig/sysdeps/unix/sysv/linux/powerpc/powerpc64/e5500/fpu/Implies libc-e5500/sysdeps/unix/sysv/linux/powerpc/powerpc64/e5500/fpu/Implies ---- libc-orig/sysdeps/unix/sysv/linux/powerpc/powerpc64/e5500/fpu/Implies 1969-12-31 18:00:00.000000000 -0600 -+++ libc-e5500/sysdeps/unix/sysv/linux/powerpc/powerpc64/e5500/fpu/Implies 2011-05-18 11:15:22.412987000 -0500 -@@ -0,0 +1 @@ -+powerpc/powerpc64/e5500/fpu diff --git a/meta-fsl-ppc/recipes-devtools/eglibc/files/glibc.fixgcc4.6.patch b/meta-fsl-ppc/recipes-devtools/eglibc/files/glibc.fixgcc4.6.patch deleted file mode 100644 index 42887694..00000000 --- a/meta-fsl-ppc/recipes-devtools/eglibc/files/glibc.fixgcc4.6.patch +++ /dev/null @@ -1,29 +0,0 @@ -glibc.fixgcc4.6 - -Glibc build scripts relies on information given by "gcc -v --help". -With gcc-4.6 and latter, this information is not printed with "--help" -anymore, but with "--target-help". This patch should be used until -glibs sources catches up with gcc. - ---- libc/configure.in-orig 2010-06-07 11:11:01.000000000 -0500 -+++ libc/configure.in 2010-06-07 11:11:28.000000000 -0500 -@@ -1620,7 +1620,7 @@ - AC_CACHE_CHECK(for -z relro option, - libc_cv_z_relro, [dnl - libc_cv_z_relro=no -- if AC_TRY_COMMAND([${CC-cc} -v --help 2>&1|grep "z relro" 1>&AS_MESSAGE_LOG_FD]) -+ if AC_TRY_COMMAND([${CC-cc} -v --target-help 2>&1|grep "z relro" 1>&AS_MESSAGE_LOG_FD]) - then - if AC_TRY_COMMAND([${CC-cc} -Wl,--verbose 2>&1|grep DATA_SEGMENT_RELRO_END 1>&AS_MESSAGE_LOG_FD]) - then ---- libc/configure-orig 2010-06-07 11:11:13.000000000 -0500 -+++ libc/configure 2010-06-07 11:12:00.000000000 -0500 -@@ -6670,7 +6670,7 @@ - $as_echo_n "(cached) " >&6 - else - libc_cv_z_relro=no -- if { ac_try='${CC-cc} -v --help 2>&1|grep "z relro" 1>&5' -+ if { ac_try='${CC-cc} -v --target-help 2>&1|grep "z relro" 1>&5' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? diff --git a/meta-fsl-ppc/recipes-devtools/eglibc/files/glibc.readv_proto.patch b/meta-fsl-ppc/recipes-devtools/eglibc/files/glibc.readv_proto.patch deleted file mode 100644 index fbeee699..00000000 --- a/meta-fsl-ppc/recipes-devtools/eglibc/files/glibc.readv_proto.patch +++ /dev/null @@ -1,99 +0,0 @@ -glibc.readv_proto - -Unfortunate choice of variable names. Causes syntax errors on Altivec -enabled targets. - -diff -u libc-orig/sysdeps/unix/sysv/linux/readv.c libc/sysdeps/unix/sysv/linux/readv.c ---- libc-orig/sysdeps/unix/sysv/linux/readv.c 2011-05-11 11:01:36.625600000 -0500 -+++ libc/sysdeps/unix/sysv/linux/readv.c 2011-05-11 11:03:19.443599768 -0500 -@@ -40,20 +40,20 @@ - - - ssize_t --__libc_readv (fd, vector, count) -+__libc_readv (fd, vec_tor, count) - int fd; -- const struct iovec *vector; -+ const struct iovec *vec_tor; - int count; - { - ssize_t result; - - if (SINGLE_THREAD_P) -- result = INLINE_SYSCALL (readv, 3, fd, CHECK_N (vector, count), count); -+ result = INLINE_SYSCALL (readv, 3, fd, CHECK_N (vec_tor, count), count); - else - { - int oldtype = LIBC_CANCEL_ASYNC (); - -- result = INLINE_SYSCALL (readv, 3, fd, CHECK_N (vector, count), count); -+ result = INLINE_SYSCALL (readv, 3, fd, CHECK_N (vec_tor, count), count); - - LIBC_CANCEL_RESET (oldtype); - } -@@ -64,7 +64,7 @@ - if (result >= 0 || errno != EINVAL || count <= UIO_FASTIOV) - return result; - -- return __atomic_readv_replacement (fd, vector, count); -+ return __atomic_readv_replacement (fd, vec_tor, count); - #endif - } - strong_alias (__libc_readv, __readv) -diff -u libc-orig/sysdeps/unix/sysv/linux/writev.c libc/sysdeps/unix/sysv/linux/writev.c ---- libc-orig/sysdeps/unix/sysv/linux/writev.c 2011-05-11 11:01:36.577599548 -0500 -+++ libc/sysdeps/unix/sysv/linux/writev.c 2011-05-11 11:03:33.994599785 -0500 -@@ -40,20 +40,20 @@ - - - ssize_t --__libc_writev (fd, vector, count) -+__libc_writev (fd, vec_tor, count) - int fd; -- const struct iovec *vector; -+ const struct iovec *vec_tor; - int count; - { - ssize_t result; - - if (SINGLE_THREAD_P) -- result = INLINE_SYSCALL (writev, 3, fd, CHECK_N (vector, count), count); -+ result = INLINE_SYSCALL (writev, 3, fd, CHECK_N (vec_tor, count), count); - else - { - int oldtype = LIBC_CANCEL_ASYNC (); - -- result = INLINE_SYSCALL (writev, 3, fd, CHECK_N (vector, count), count); -+ result = INLINE_SYSCALL (writev, 3, fd, CHECK_N (vec_tor, count), count); - - LIBC_CANCEL_RESET (oldtype); - } -@@ -64,7 +64,7 @@ - if (result >= 0 || errno != EINVAL || count <= UIO_FASTIOV) - return result; - -- return __atomic_writev_replacement (fd, vector, count); -+ return __atomic_writev_replacement (fd, vec_tor, count); - #endif - } - strong_alias (__libc_writev, __writev) -diff -u libc-orig/include/sys/uio.h libc/include/sys/uio.h ---- libc-orig/include/sys/uio.h 2011-05-11 11:07:53.953602501 -0500 -+++ libc/include/sys/uio.h 2011-05-11 11:08:25.117599576 -0500 -@@ -2,12 +2,12 @@ - #include - - /* Now define the internal interfaces. */ --extern ssize_t __readv (int __fd, __const struct iovec *__vector, -+extern ssize_t __readv (int __fd, __const struct iovec *__vec_tor, - int __count); --extern ssize_t __libc_readv (int __fd, __const struct iovec *__vector, -+extern ssize_t __libc_readv (int __fd, __const struct iovec *__vec_tor, - int __count); --extern ssize_t __writev (int __fd, __const struct iovec *__vector, -+extern ssize_t __writev (int __fd, __const struct iovec *__vec_tor, - int __count); --extern ssize_t __libc_writev (int __fd, __const struct iovec *__vector, -+extern ssize_t __libc_writev (int __fd, __const struct iovec *__vec_tor, - int __count); - #endif diff --git a/meta-fsl-ppc/recipes-devtools/eglibc/files/glibc.undefined_static.patch b/meta-fsl-ppc/recipes-devtools/eglibc/files/glibc.undefined_static.patch deleted file mode 100644 index aba52855..00000000 --- a/meta-fsl-ppc/recipes-devtools/eglibc/files/glibc.undefined_static.patch +++ /dev/null @@ -1,37 +0,0 @@ -glibc.undefined_static - -This works around an old binutils bug, which would delete static -constants out of the code, thus causing undefined symbols. Not sure if -this patch is still needed. - -diff -rc libc-orig/stdio-common/psiginfo-define.h libc-new/stdio-common/psiginfo-define.h -*** libc-orig/stdio-common/psiginfo-define.h 2009-04-09 08:12:53.000000000 -0500 ---- libc-new/stdio-common/psiginfo-define.h 2009-04-09 08:20:36.000000000 -0500 -*************** -*** 1,4 **** -! static const union C(codestrs_t_, NOW) { - struct { - #define P(n, s) char MF(__LINE__)[sizeof (s)]; - #include "psiginfo-data.h" ---- 1,4 ---- -! const union C(codestrs_t_, NOW) { - struct { - #define P(n, s) char MF(__LINE__)[sizeof (s)]; - #include "psiginfo-data.h" -*************** -*** 8,14 **** - #define P(n, s) s, - #include "psiginfo-data.h" - } }; -! static const uint8_t C(codes_, NOW)[] = { - #define P(n, s) [(n) - 1] = offsetof (union C(codestrs_t_, NOW), MF(__LINE__)), - #include "psiginfo-data.h" - }; ---- 8,14 ---- - #define P(n, s) s, - #include "psiginfo-data.h" - } }; -! const uint8_t C(codes_, NOW)[] = { - #define P(n, s) [(n) - 1] = offsetof (union C(codestrs_t_, NOW), MF(__LINE__)), - #include "psiginfo-data.h" - }; diff --git a/meta-fsl-ppc/recipes-devtools/gcc/files/GPLUSPLUS_INCLUDE_DIR_with_sysroot_fsl.patch b/meta-fsl-ppc/recipes-devtools/gcc/files/GPLUSPLUS_INCLUDE_DIR_with_sysroot_fsl.patch deleted file mode 100644 index 6ae6190e..00000000 --- a/meta-fsl-ppc/recipes-devtools/gcc/files/GPLUSPLUS_INCLUDE_DIR_with_sysroot_fsl.patch +++ /dev/null @@ -1,186 +0,0 @@ -source: http://patchwork.ozlabs.org/patch/129800/ -Upstream-Status: Submitted - -ChangeLog - * Makefile.in (gcc_gxx_include_dir_add_sysroot): New. - (PREPROCESSOR_DEFINES): Define GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT. - - * cppdefault.c (cpp_include_defaults): replace hard coded "1" with - GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT for "add_sysroot" field. - - * configure.ac (AC_SUBST): Add gcc_gxx_include_dir_add_sysroot to - control whether sysroot should be prepended to gxx include dir. - - * configure: Regenerate. - -Hi, this is a follow up for issue "http://codereview.appspot.com/4641076". - -The rationale for the patch copied from previous thread: -======================================= -The setup: - -Configuring a toolchain targeting x86-64 GNU Linux (Ubuntu Lucid), as a -cross-compiler. Using a sysroot to provide the Lucid headers+libraries, -with the sysroot path being within the GCC install tree. Want to use the -Lucid system libstdc++ and headers, which means that I'm not -building/installing libstdc++-v3. - -So, configuring with: - --with-sysroot="$SYSROOT" - --disable-libstdc++-v3 \ - --with-gxx-include-dir="$SYSROOT/usr/include/c++/4.4" \ -(among other options). - -Hoping to support two usage models with this configuration, w.r.t. use of -the sysroot: - -(1) somebody installs the sysroot in the normal location relative to the -GCC install, and relocates the whole bundle (sysroot+GCC). This works -great AFAICT, GCC finds its includes (including the C++ includes) thanks -to the add_standard_paths iprefix handling. - -(2) somebody installs the sysroot in a non-standard location, and uses ---sysroot to try to access it. This works fine for the C headers, but -doesn't work. - -For the C headers, add_standard_paths prepends the sysroot location to -the /usr/include path (since that's what's specified in cppdefault.c for -that path). It doesn't do the same for the C++ include path, though -(again, as specified in cppdefault.c). - -add_standard_paths doesn't attempt to relocate built-in include paths that -start with the compiled-in sysroot location (e.g., the g++ include dir, in -this case). This isn't surprising really: normally you either prepend the -sysroot location or you don't (as specified by cppdefault.c); none of the -built-in paths normally *start* with the sysroot location and need to be -relocated. However, in this odd-ball case of trying to use the C++ headers -from the sysroot, one of the paths *does* need to be relocated in this way. -=========================== -Index: gcc-4_6-branch/gcc/Makefile.in -=================================================================== ---- gcc-4_6-branch.orig/gcc/Makefile.in -+++ gcc-4_6-branch/gcc/Makefile.in -@@ -587,6 +587,7 @@ slibdir = @slibdir@ - build_tooldir = $(exec_prefix)/$(target_noncanonical) - # Directory in which the compiler finds target-independent g++ includes. - gcc_gxx_include_dir = @gcc_gxx_include_dir@ -+gcc_gxx_include_dir_add_sysroot = @gcc_gxx_include_dir_add_sysroot@ - # Directory to search for site-specific includes. - local_includedir = $(local_prefix)/include - includedir = $(prefix)/include -@@ -3982,6 +3983,7 @@ PREPROCESSOR_DEFINES = \ - -DGCC_INCLUDE_DIR=\"$(libsubdir)/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) \ - -DGPLUSPLUS_TOOL_INCLUDE_DIR=\"$(gcc_gxx_include_dir)/$(target_noncanonical)\" \ - -DGPLUSPLUS_BACKWARD_INCLUDE_DIR=\"$(gcc_gxx_include_dir)/backward\" \ - -DLOCAL_INCLUDE_DIR=\"$(local_includedir)\" \ -Index: gcc-4_6-branch/gcc/configure.ac -=================================================================== ---- gcc-4_6-branch.orig/gcc/configure.ac -+++ gcc-4_6-branch/gcc/configure.ac -@@ -144,6 +144,15 @@ if test x${gcc_gxx_include_dir} = x; the - fi - fi - -+gcc_gxx_include_dir_add_sysroot=0 -+if test "${with_sysroot+set}" = set; then : -+ gcc_gxx_without_sysroot=`expr "${gcc_gxx_include_dir}" : "${with_sysroot}"'\(.*\)'` -+ if test "${gcc_gxx_without_sysroot}"; then : -+ gcc_gxx_include_dir="${gcc_gxx_without_sysroot}" -+ gcc_gxx_include_dir_add_sysroot=1 -+ fi -+fi -+ - AC_ARG_WITH(cpp_install_dir, - [ --with-cpp-install-dir=DIR - install the user visible C preprocessor in DIR -@@ -4732,6 +4741,7 @@ AC_SUBST(extra_programs) - AC_SUBST(float_h_file) - AC_SUBST(gcc_config_arguments) - AC_SUBST(gcc_gxx_include_dir) -+AC_SUBST(gcc_gxx_include_dir_add_sysroot) - AC_SUBST(host_exeext) - AC_SUBST(host_xm_file_list) - AC_SUBST(host_xm_include_list) -Index: gcc-4_6-branch/gcc/cppdefault.c -=================================================================== ---- gcc-4_6-branch.orig/gcc/cppdefault.c -+++ gcc-4_6-branch/gcc/cppdefault.c -@@ -48,15 +48,18 @@ const struct default_include cpp_include - = { - #ifdef GPLUSPLUS_INCLUDE_DIR - /* Pick up GNU C++ generic include files. */ -- { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1, 0, 0 }, -+ { GPLUSPLUS_INCLUDE_DIR, "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, 0, 1 }, -+ { GPLUSPLUS_TOOL_INCLUDE_DIR, "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, 0, 0 }, -+ { GPLUSPLUS_BACKWARD_INCLUDE_DIR, "G++", 1, 1, -+ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 }, - #endif - #ifdef GCC_INCLUDE_DIR - /* This is the dir for gcc's private headers. */ -Index: gcc-4_6-branch/gcc/configure -=================================================================== ---- gcc-4_6-branch.orig/gcc/configure -+++ gcc-4_6-branch/gcc/configure -@@ -636,6 +636,7 @@ host_xm_defines - host_xm_include_list - host_xm_file_list - host_exeext -+gcc_gxx_include_dir_add_sysroot - gcc_gxx_include_dir - gcc_config_arguments - float_h_file -@@ -3306,6 +3307,15 @@ if test x${gcc_gxx_include_dir} = x; the - fi - fi - -+gcc_gxx_include_dir_add_sysroot=0 -+if test "${with_sysroot+set}" = set; then : -+ gcc_gxx_without_sysroot=`expr "${gcc_gxx_include_dir}" : "${with_sysroot}"'\(.*\)'` -+ if test "${gcc_gxx_without_sysroot}"; then : -+ gcc_gxx_include_dir="${gcc_gxx_without_sysroot}" -+ gcc_gxx_include_dir_add_sysroot=1 -+ fi -+fi -+ - - # Check whether --with-cpp_install_dir was given. - if test "${with_cpp_install_dir+set}" = set; then : -@@ -17505,7 +17515,7 @@ else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF --#line 17508 "configure" -+#line 17518 "configure" - #include "confdefs.h" - - #if HAVE_DLFCN_H -@@ -17611,7 +17621,7 @@ else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF --#line 17614 "configure" -+#line 17624 "configure" - #include "confdefs.h" - - #if HAVE_DLFCN_H -@@ -26195,6 +26205,7 @@ fi - - - -+ - # Echo link setup. - if test x${build} = x${host} ; then - if test x${host} = x${target} ; then diff --git a/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.builtin_isel.patch b/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.builtin_isel.patch deleted file mode 100644 index 10e59999..00000000 --- a/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.builtin_isel.patch +++ /dev/null @@ -1,1059 +0,0 @@ -diff -ruN gcc-4.6.0-orig/gcc/config/rs6000/rs6000-builtin.def gcc-4.6.0-new/gcc/config/rs6000/rs6000-builtin.def ---- gcc-4.6.0-orig/gcc/config/rs6000/rs6000-builtin.def 2011-02-21 15:38:21.000000000 -0600 -+++ gcc-4.6.0-new/gcc/config/rs6000/rs6000-builtin.def 2011-07-25 12:32:26.626006000 -0500 -@@ -750,6 +750,71 @@ - RS6000_BUILTIN(SPE_BUILTIN_MFSPEFSCR, RS6000_BTC_MISC) - RS6000_BUILTIN(SPE_BUILTIN_BRINC, RS6000_BTC_MISC) - -+/* ISEL builtins. */ -+/* Generic versions that get resolved to specific builtins. */ -+RS6000_BUILTIN(RS6000_BUILTIN_ISELEQ, RS6000_BTC_PURE) -+RS6000_BUILTIN_EQUATE(ISEL_BUILTIN_OVERLOADED_FIRST, -+ RS6000_BUILTIN_ISELEQ) -+RS6000_BUILTIN(RS6000_BUILTIN_ISELGT, RS6000_BTC_PURE) -+RS6000_BUILTIN(RS6000_BUILTIN_ISELLT, RS6000_BTC_PURE) -+RS6000_BUILTIN(RS6000_BUILTIN_ISELGTU, RS6000_BTC_PURE) -+RS6000_BUILTIN(RS6000_BUILTIN_ISELLTU, RS6000_BTC_PURE) -+/* Same deal, but for 64-bit comparisons. */ -+RS6000_BUILTIN(RS6000_BUILTIN_ISELEQD, RS6000_BTC_PURE) -+RS6000_BUILTIN(RS6000_BUILTIN_ISELGTD, RS6000_BTC_PURE) -+RS6000_BUILTIN(RS6000_BUILTIN_ISELLTD, RS6000_BTC_PURE) -+RS6000_BUILTIN(RS6000_BUILTIN_ISELGTDU, RS6000_BTC_PURE) -+RS6000_BUILTIN(RS6000_BUILTIN_ISELLTDU, RS6000_BTC_PURE) -+RS6000_BUILTIN_EQUATE(ISEL_BUILTIN_OVERLOADED_LAST, -+ RS6000_BUILTIN_ISELLTDU) -+ -+/* Each set of arguments is polymorphic in selected arguments and return -+ value. */ -+#undef RS6000_ISEL_BASE -+#define RS6000_ISEL_BASE(ARG, PRED, CMP) \ -+ RS6000_BUILTIN(RS6000_BUILTIN_ISEL_##PRED##CMP##_##ARG##_SS, RS6000_BTC_PURE) \ -+ RS6000_BUILTIN(RS6000_BUILTIN_ISEL_##PRED##CMP##_##ARG##_PP, RS6000_BTC_PURE) \ -+ RS6000_BUILTIN(RS6000_BUILTIN_ISEL_##PRED##CMP##_##ARG##_UU, RS6000_BTC_PURE) -+#undef RS6000_ISEL_PTR_ARG -+#define RS6000_ISEL_PTR_ARG(PRED, CMP) RS6000_ISEL_BASE(PP, PRED, CMP) -+#undef RS6000_ISEL_SIGNED_ARG -+#define RS6000_ISEL_SIGNED_ARG(PRED, CMP) RS6000_ISEL_BASE(SS, PRED, CMP) -+#undef RS6000_ISEL_UNSIGNED_ARG -+#define RS6000_ISEL_UNSIGNED_ARG(PRED, CMP) RS6000_ISEL_BASE(UU, PRED, CMP) -+ -+#undef RS6000_ISEL_EQ -+#define RS6000_ISEL_EQ(CMP) \ -+ RS6000_ISEL_PTR_ARG(EQ, CMP) \ -+ RS6000_ISEL_SIGNED_ARG(EQ, CMP) \ -+ RS6000_ISEL_UNSIGNED_ARG(EQ, CMP) -+ -+#undef RS6000_ISEL_LT -+#define RS6000_ISEL_LT(CMP) RS6000_ISEL_SIGNED_ARG(LT, CMP) -+ -+#undef RS6000_ISEL_GT -+#define RS6000_ISEL_GT(CMP) RS6000_ISEL_SIGNED_ARG(GT, CMP) -+ -+#undef RS6000_ISEL_LTU -+#define RS6000_ISEL_LTU(CMP) \ -+ RS6000_ISEL_PTR_ARG(LTU, CMP) \ -+ RS6000_ISEL_UNSIGNED_ARG(LTU, CMP) -+ -+#undef RS6000_ISEL_GTU -+#define RS6000_ISEL_GTU(CMP) \ -+ RS6000_ISEL_PTR_ARG(GTU, CMP) \ -+ RS6000_ISEL_UNSIGNED_ARG(GTU, CMP) -+ -+RS6000_ISEL_EQ(CMPW) -+RS6000_ISEL_LT(CMPW) -+RS6000_ISEL_GT(CMPW) -+RS6000_ISEL_LTU(CMPW) -+RS6000_ISEL_GTU(CMPW) -+RS6000_ISEL_EQ(CMPD) -+RS6000_ISEL_LT(CMPD) -+RS6000_ISEL_GT(CMPD) -+RS6000_ISEL_LTU(CMPD) -+RS6000_ISEL_GTU(CMPD) -+ - /* PAIRED builtins. */ - RS6000_BUILTIN(PAIRED_BUILTIN_DIVV2SF3, RS6000_BTC_MISC) - RS6000_BUILTIN(PAIRED_BUILTIN_ABSV2SF2, RS6000_BTC_MISC) -diff -ruN gcc-4.6.0-orig/gcc/config/rs6000/rs6000.c gcc-4.6.0-new/gcc/config/rs6000/rs6000.c ---- gcc-4.6.0-orig/gcc/config/rs6000/rs6000.c 2011-03-15 07:57:37.000000000 -0500 -+++ gcc-4.6.0-new/gcc/config/rs6000/rs6000.c 2011-07-25 13:19:52.415921000 -0500 -@@ -12402,6 +12402,289 @@ - return target; - } - -+/* isel builtins are a bit funny, because we want the user to be able to do: -+ -+ char *p, *q, *r; -+ int x, y, z; -+ unsigned int a, b, c; -+ ... -+ p = __builtin_iseleq (i, j, q, r); -+ x = __builtin_iseleq (i, j, y, z); -+ a = __builtin_iseleq (i, j, b, c); -+ -+ and, of course, i and j may be of several different types depending on the -+ condition. -+ -+ We handle this by having generic builtins that -+ TARGET_RESOLVE_OVERLOADED_BUILTIN takes and turns into calls to our -+ specific builtins. */ -+ -+/* Macros to help constructing the isel_builtin_desc arrays. -+ These closely mirror the macros in rs6000-builtins.def. */ -+/* HACK: Use VOIDmode here as a constant approximation to Pmode and fix -+ at runtime. We can't use Pmode because in biarch its definition is -+ not constant. */ -+#define ISEL_Pmode VOIDmode -+#define ISEL_BASE(FLAGS, ARG, RESULT, PRED, CMP, MODE, RMODE) \ -+ { NULL, FLAGS, RS6000_BUILTIN_ISEL_##PRED##CMP##_##ARG##_##RESULT, \ -+ PRED, MODE, RMODE }, -+#define ISEL_P_RESULT(FLAGS, ARG, PRED, CMP, MODE, RMODE) \ -+ ISEL_BASE (FLAGS | ISEL_FLAG_SEL_PTR, ARG, PP, PRED, \ -+ CMP, MODE, ISEL_Pmode) -+#define ISEL_S_RESULT(FLAGS, ARG, PRED, CMP, MODE, RMODE) \ -+ ISEL_BASE (FLAGS | ISEL_FLAG_SEL_SIGNED, ARG, SS, PRED, \ -+ CMP, MODE, RMODE) -+#define ISEL_U_RESULT(FLAGS, ARG, PRED, CMP, MODE, RMODE) \ -+ ISEL_BASE (FLAGS | ISEL_FLAG_SEL_UNSIGNED, ARG, UU, PRED, \ -+ CMP, MODE, RMODE) -+ -+#define ISEL_EXPAND_ARG(FLAG, ARG, PRED, CMP, MODE, RMODE) \ -+ ISEL_P_RESULT (FLAG, ARG, PRED, CMP, MODE, RMODE) \ -+ ISEL_S_RESULT (FLAG, ARG, PRED, CMP, MODE, RMODE) \ -+ ISEL_U_RESULT (FLAG, ARG, PRED, CMP, MODE, RMODE) -+#define ISEL_PTR_ARG(PRED, CMP, MODE) \ -+ ISEL_EXPAND_ARG (ISEL_FLAG_CMP_PTR, PP, PRED, CMP, ISEL_Pmode, MODE) -+#define ISEL_SIGNED_ARG(PRED, CMP, MODE) \ -+ ISEL_EXPAND_ARG (ISEL_FLAG_CMP_SIGNED, SS, PRED, CMP, MODE, MODE) -+#define ISEL_UNSIGNED_ARG(PRED, CMP, MODE) \ -+ ISEL_EXPAND_ARG (ISEL_FLAG_CMP_UNSIGNED, UU, PRED, CMP, MODE, MODE) -+ -+#define ISEL_EQ(CMP, MODE) \ -+ ISEL_PTR_ARG (EQ, CMP, MODE) \ -+ ISEL_SIGNED_ARG (EQ, CMP, MODE) \ -+ ISEL_UNSIGNED_ARG (EQ, CMP, MODE) -+#define ISEL_LT(CMP, MODE) ISEL_SIGNED_ARG (LT, CMP, MODE) -+#define ISEL_GT(CMP, MODE) ISEL_SIGNED_ARG (GT, CMP, MODE) -+#define ISEL_LTU(CMP, MODE) \ -+ ISEL_PTR_ARG (LTU, CMP, MODE) \ -+ ISEL_UNSIGNED_ARG (LTU, CMP, MODE) -+#define ISEL_GTU(CMP, MODE) \ -+ ISEL_PTR_ARG (GTU, CMP, MODE) \ -+ ISEL_UNSIGNED_ARG (GTU, CMP, MODE) -+ -+const struct isel_builtin_desc builtin_iselw[32] = { -+ ISEL_EQ (CMPW, SImode) -+ ISEL_LT (CMPW, SImode) -+ ISEL_GT (CMPW, SImode) -+ ISEL_LTU (CMPW, SImode) -+ ISEL_GTU (CMPW, SImode) -+ { "__builtin_iseleq", 0, RS6000_BUILTIN_ISELEQ, EQ, SImode, SImode }, -+ { "__builtin_isellt", 0, RS6000_BUILTIN_ISELLT, LT, SImode, SImode }, -+ { "__builtin_iselgt", 0, RS6000_BUILTIN_ISELGT, GT, SImode, SImode }, -+ { "__builtin_iselltu", 0, RS6000_BUILTIN_ISELLTU, LTU, SImode, SImode }, -+ { "__builtin_iselgtu", 0, RS6000_BUILTIN_ISELGTU, GTU, SImode, SImode } -+}; -+ -+const struct isel_builtin_desc builtin_iseld[32] = { -+ ISEL_EQ (CMPD, DImode) -+ ISEL_LT (CMPD, DImode) -+ ISEL_GT (CMPD, DImode) -+ ISEL_LTU (CMPD, DImode) -+ ISEL_GTU (CMPD, DImode) -+ { "__builtin_isel64eq", 0, RS6000_BUILTIN_ISELEQD, EQ, DImode, DImode }, -+ { "__builtin_isel64lt", 0, RS6000_BUILTIN_ISELLTD, LT, DImode, DImode }, -+ { "__builtin_isel64gt", 0, RS6000_BUILTIN_ISELGTD, GT, DImode, DImode }, -+ { "__builtin_isel64ltu", 0, RS6000_BUILTIN_ISELLTDU, LTU, DImode, DImode }, -+ { "__builtin_isel64gtu", 0, RS6000_BUILTIN_ISELGTDU, GTU, DImode, DImode } -+}; -+ -+/* Return the mode which DESC uses for comparisons. */ -+ -+static enum machine_mode -+isel_cmp_mode (const struct isel_builtin_desc *desc) -+{ -+ enum machine_mode mode = (enum machine_mode) desc->cmp_mode; -+ -+ return (mode == VOIDmode ? Pmode : mode); -+} -+ -+/* Return the mode in which DESC selects arguments. */ -+ -+static enum machine_mode -+isel_sel_mode (const struct isel_builtin_desc *desc) -+{ -+ enum machine_mode mode = (enum machine_mode) desc->sel_mode; -+ -+ return (mode == VOIDmode ? Pmode : mode); -+} -+ -+/* Return a tree describing the arguments for DESC according to CMPP: -+ true for comparison arguments, false for select arguments. */ -+ -+static tree -+isel_argtype (const struct isel_builtin_desc *desc, bool cmpp) -+{ -+ switch (desc->arg_flags & (cmpp -+ ? ISEL_FLAG_CMP_MASK -+ : ISEL_FLAG_SEL_MASK)) -+ { -+ case ISEL_FLAG_CMP_PTR: -+ case ISEL_FLAG_SEL_PTR: -+ return ptr_type_node; -+ case ISEL_FLAG_CMP_SIGNED: -+ return (isel_cmp_mode (desc) == SImode -+ ? integer_type_node -+ : long_integer_type_node); -+ case ISEL_FLAG_SEL_SIGNED: -+ return (isel_sel_mode (desc) == SImode -+ ? integer_type_node -+ : long_integer_type_node); -+ case ISEL_FLAG_CMP_UNSIGNED: -+ return (isel_cmp_mode (desc) == SImode -+ ? unsigned_type_node -+ : long_unsigned_type_node); -+ case ISEL_FLAG_SEL_UNSIGNED: -+ default: -+ return (isel_sel_mode (desc) == SImode -+ ? unsigned_type_node -+ : long_unsigned_type_node); -+ } -+} -+ -+/* Return a mnemonic string describing the argument or result of FLAGS -+ depending on CMPP. */ -+ -+static const char * -+isel_strdesc (int flags, bool cmpp) -+{ -+ switch (flags & (cmpp ? ISEL_FLAG_CMP_MASK : ISEL_FLAG_SEL_MASK)) -+ { -+ case ISEL_FLAG_CMP_PTR: -+ case ISEL_FLAG_SEL_PTR: -+ return "p"; -+ case ISEL_FLAG_CMP_SIGNED: -+ case ISEL_FLAG_SEL_SIGNED: -+ return "s"; -+ case ISEL_FLAG_CMP_UNSIGNED: -+ case ISEL_FLAG_SEL_UNSIGNED: -+ return "u"; -+ default: -+ gcc_unreachable (); -+ } -+} -+ -+/* Initialize N_DESC isel builtins from DESC. SIGNED_TYPE holds the -+ basic type for signed variants of isel, UNSIGNED_TYPE the type for -+ unsigned variants. */ -+ -+static void -+rs6000_init_isel_builtins (const struct isel_builtin_desc *desc, int n_descs) -+{ -+ int i; -+ const char *is64 = (desc == &builtin_iselw[0] ? "32" : "64"); -+ -+ for (i = 0; i < n_descs; i++) -+ { -+ const struct isel_builtin_desc *d = &desc[i]; -+ tree cmptype, seltype, ftype; -+ -+ cmptype = isel_argtype (d, true); -+ seltype = isel_argtype (d, false); -+ -+ ftype = build_function_type_list (seltype, cmptype, cmptype, -+ seltype, seltype, NULL_TREE); -+ -+ if (d->name) -+ def_builtin (MASK_ISEL, d->name, ftype, d->code); -+ else -+ { -+ char builtin_name[40]; -+ -+ sprintf (builtin_name, "__builtin_isel%s%s%s%s%s%s", -+ is64, -+ GET_RTX_NAME (d->cmp_code), -+ GET_MODE_NAME (isel_cmp_mode (d)), -+ isel_strdesc (d->arg_flags, true), -+ isel_strdesc (d->arg_flags, false), -+ GET_MODE_NAME (isel_sel_mode (d))); -+ -+ def_builtin (MASK_ISEL, ggc_strdup (builtin_name), ftype, d->code); -+ } -+ } -+} -+ -+static rtx -+rs6000_expand_isel_builtin (const struct isel_builtin_desc *desc, -+ int n_descs, tree exp, rtx target, int fcode) -+{ -+ int i; -+ -+ for (i = 0; i < n_descs; i++) -+ { -+ const struct isel_builtin_desc *d = &desc[i]; -+ -+ if (fcode == (int) d->code) -+ { -+ int opidx; -+ unsigned int j; -+ rtx cmp; -+ rtx operands[4]; -+ enum insn_code icode; -+ enum machine_mode opmode; -+ enum machine_mode cmpmode = isel_cmp_mode (d); -+ enum machine_mode selmode = isel_sel_mode (d); -+ -+ /* Determine underlying isel insn. */ -+ switch (d->cmp_code) -+ { -+ case GTU: -+ case LTU: -+ icode = (Pmode == SImode -+ ? CODE_FOR_isel_unsigned_si -+ : CODE_FOR_isel_unsigned_di); -+ break; -+ default: -+ icode = (Pmode == SImode -+ ? CODE_FOR_isel_signed_si -+ : CODE_FOR_isel_signed_di); -+ break; -+ } -+ -+ for (j = 0; j < ARRAY_SIZE (operands); j++) -+ { -+ tree arg = CALL_EXPR_ARG (exp, j); -+ -+ /* If we got invalid arguments, bail out before generating -+ bad rtl. */ -+ if (arg == error_mark_node) -+ return const0_rtx; -+ -+ operands[j] = expand_normal (arg); -+ -+ /* Validate. */ -+ /* HACK: The isel pattern doesn't actually consume all the -+ operands to the builtin; it only consumes 2 and 3. The -+ other two will be handed off to a compare -+ insn. Unfortunately, said insn is not named, so we -+ can't directly access its insn_data here. Fake it by -+ validating operands 0 and 1 with the isel pattern; that -+ should be good enough. */ -+ opidx = (j < 2 ? 2 : j); -+ opmode = (j < 2 ? cmpmode : selmode); -+ if (! (*insn_data[icode].operand[opidx].predicate) (operands[j], -+ opmode)) -+ operands[j] = copy_to_mode_reg (opmode, operands[j]); -+ } -+ -+ /* Validate target. */ -+ if (target == NULL_RTX -+ || GET_MODE (target) != selmode -+ || ! (*insn_data[icode].operand[0].predicate) (target, selmode)) -+ target = gen_reg_rtx (selmode); -+ -+ /* Generate comparison. */ -+ cmp = gen_rtx_fmt_ee ((enum rtx_code)d->cmp_code, cmpmode, -+ operands[0], operands[1]); -+ -+ rs6000_emit_int_cmove (target, cmp, operands[2], operands[3]); -+ -+ return target; -+ } -+ } -+ -+ return NULL_RTX; -+} -+ - /* Expand an expression EXP that calls a built-in function, - with result going to TARGET if that's convenient - (and in mode MODE if that's convenient). -@@ -12520,6 +12803,24 @@ - if (success) - return ret; - } -+ if (TARGET_ISEL) -+ { -+ ret = rs6000_expand_isel_builtin (builtin_iselw, -+ ARRAY_SIZE (builtin_iselw), -+ exp, target, fcode); -+ -+ if (ret != NULL_RTX) -+ return ret; -+ } -+ if (TARGET_ISEL64) -+ { -+ ret = rs6000_expand_isel_builtin (builtin_iseld, -+ ARRAY_SIZE (builtin_iseld), -+ exp, target, fcode); -+ -+ if (ret != NULL_RTX) -+ return ret; -+ } - - gcc_assert (TARGET_ALTIVEC || TARGET_VSX || TARGET_SPE || TARGET_PAIRED_FLOAT); - -@@ -12738,6 +13039,10 @@ - spe_init_builtins (); - if (TARGET_ALTIVEC) - altivec_init_builtins (); -+ if (TARGET_ISEL) -+ rs6000_init_isel_builtins (builtin_iselw, ARRAY_SIZE (builtin_iselw)); -+ if (TARGET_ISEL64) -+ rs6000_init_isel_builtins (builtin_iseld, ARRAY_SIZE (builtin_iseld)); - if (TARGET_ALTIVEC || TARGET_SPE || TARGET_PAIRED_FLOAT || TARGET_VSX) - rs6000_common_init_builtins (); - if (TARGET_FRE) -diff -ruN gcc-4.6.0-orig/gcc/config/rs6000/rs6000-c.c gcc-4.6.0-new/gcc/config/rs6000/rs6000-c.c ---- gcc-4.6.0-orig/gcc/config/rs6000/rs6000-c.c 2011-02-02 23:42:19.000000000 -0600 -+++ gcc-4.6.0-new/gcc/config/rs6000/rs6000-c.c 2011-07-25 16:07:14.616209000 -0500 -@@ -3439,7 +3439,7 @@ - /* Implementation of the resolve_overloaded_builtin target hook, to - support Altivec's overloaded builtins. */ - --tree -+static tree - altivec_resolve_overloaded_builtin (location_t loc, tree fndecl, - void *passed_arglist) - { -@@ -3770,3 +3770,148 @@ - error ("invalid parameter combination for AltiVec intrinsic"); - return error_mark_node; - } -+ -+/* Return true if the pair of arguments in ARGS is acceptable according -+ to DECLTYPES and FLAGS. CMPP determines whether this is for the -+ comparison arguments. */ -+ -+static bool -+isel_arguments_valid (tree *args, tree *decltypes, int flags, bool cmpp) -+{ -+ tree type0 = TREE_TYPE (args[0]); -+ tree type1 = TREE_TYPE (args[1]); -+ tree decltype0 = decltypes[0]; -+ tree decltype1 = decltypes[1]; -+ -+ switch (flags & (cmpp ? ISEL_FLAG_CMP_MASK : ISEL_FLAG_SEL_MASK)) -+ { -+ /* For pointer arguments and results, we just need to make sure -+ we're receiving pointers, and they can be freely converted to -+ and from void *. For pointer results, we also need to ensure -+ that the types of the passed arguments are compatible: this is -+ similar to what the ?: construct would need to ensure. */ -+ case ISEL_FLAG_CMP_PTR: -+ case ISEL_FLAG_SEL_PTR: -+ { -+ /* Results compatible with each other? */ -+ if (!lang_hooks.types_compatible_p (type0, type1)) -+ return false; -+ -+ return (POINTER_TYPE_P (type0) -+ && POINTER_TYPE_P (type1)); -+ } -+ break; -+ /* For signed and unsigned arguments and results, we just need to -+ make sure that the argument types are compatible with the -+ declared types; we can insert conversions to make everything -+ match up. */ -+ case ISEL_FLAG_CMP_SIGNED: -+ case ISEL_FLAG_SEL_SIGNED: -+ case ISEL_FLAG_CMP_UNSIGNED: -+ case ISEL_FLAG_SEL_UNSIGNED: -+ return (lang_hooks.types_compatible_p (type0, decltype0) -+ && lang_hooks.types_compatible_p (type1, decltype1)); -+ default: -+ ; -+ } -+ -+ gcc_unreachable (); -+} -+ -+/* Determine if FNDECL is a generic isel intrinsic and if it can be -+ resolved to a non-generic version with a proper type using the -+ descriptions found in DESC. Return a call to the non-generic builtin -+ if so. */ -+ -+static tree -+rs6000_resolve_isel_builtin (location_t loc, tree fndecl, -+ void *passed_arglist, -+ const struct isel_builtin_desc *desc, -+ int n_descs) -+{ -+ VEC(tree,gc) *arglist = (VEC(tree,gc) *) passed_arglist; -+ unsigned int nargs = VEC_length (tree, arglist); -+ int i; -+ unsigned int fcode = DECL_FUNCTION_CODE (fndecl); -+ const struct isel_builtin_desc *generic = NULL; -+ -+ /* Is this even a builtin we care about? */ -+ if (fcode < ISEL_BUILTIN_OVERLOADED_FIRST -+ || fcode > ISEL_BUILTIN_OVERLOADED_LAST) -+ return NULL_TREE; -+ -+ if (nargs != 4) -+ { -+ error ("isel intrinsics only accept 4 arguments"); -+ return error_mark_node; -+ } -+ -+ /* Find the generic builtin we're resolving. */ -+ for (i = 0; i < n_descs; i++) -+ if (desc[i].code == fcode) -+ { -+ generic = &desc[i]; -+ break; -+ } -+ -+ /* Happens if we're looking for a 64-bit builtin in the 32-bit -+ descriptors. */ -+ if (generic == NULL) -+ return NULL_TREE; -+ -+ /* Try all the builtins whose comparison matches the generic one. */ -+ for (i = 0; i < n_descs; i++) -+ { -+ const struct isel_builtin_desc *d = &desc[i]; -+ int j; -+ tree *argp = VEC_address (tree, arglist); -+ tree impl_fndecl; -+ tree decltypes[4], t; -+ tree converted_args[4]; -+ -+ if (d == generic || d->cmp_code != generic->cmp_code) -+ continue; -+ -+ impl_fndecl = rs6000_builtin_decls[d->code]; -+ t = TYPE_ARG_TYPES (TREE_TYPE (impl_fndecl)); -+ for (j = 0 ; t != void_list_node; j++, t = TREE_CHAIN (t)) -+ decltypes[j] = TREE_VALUE (t); -+ -+ if (!isel_arguments_valid (argp, decltypes, d->arg_flags, true) -+ || !isel_arguments_valid (argp+2, decltypes+2, d->arg_flags, false)) -+ continue; -+ -+ /* We got here, we're ok. Build a new, resolved CALL_EXPR. */ -+ for (j = 0; j < 4; j++) -+ converted_args[j] = fold_convert (decltypes[j], argp[j]); -+ -+ return build_call_expr_loc (loc, impl_fndecl, 4, -+ converted_args[0], converted_args[1], -+ converted_args[2], converted_args[3]); -+ } -+ -+ error ("invalid parameter combination for isel intrinsic"); -+ return error_mark_node; -+} -+ -+tree -+rs6000_resolve_overloaded_builtin (location_t loc, tree fndecl, void *arglist) -+{ -+ tree t; -+ -+ t = altivec_resolve_overloaded_builtin (loc, fndecl, arglist); -+ if (t) -+ return t; -+ -+ t = rs6000_resolve_isel_builtin (loc, fndecl, arglist, -+ builtin_iselw, ARRAY_SIZE (builtin_iselw)); -+ if (t) -+ return t; -+ -+ t = rs6000_resolve_isel_builtin (loc, fndecl, arglist, -+ builtin_iseld, ARRAY_SIZE (builtin_iseld)); -+ if (t) -+ return t; -+ -+ return NULL_TREE; -+} -diff -ruN gcc-4.6.0-orig/gcc/config/rs6000/rs6000.h gcc-4.6.0-new/gcc/config/rs6000/rs6000.h ---- gcc-4.6.0-orig/gcc/config/rs6000/rs6000.h 2011-03-07 13:27:09.000000000 -0600 -+++ gcc-4.6.0-new/gcc/config/rs6000/rs6000.h 2011-07-25 16:07:04.045105000 -0500 -@@ -535,7 +535,7 @@ - #define REGISTER_TARGET_PRAGMAS() do { \ - c_register_pragma (0, "longcall", rs6000_pragma_longcall); \ - targetm.target_option.pragma_parse = rs6000_pragma_target_parse; \ -- targetm.resolve_overloaded_builtin = altivec_resolve_overloaded_builtin; \ -+ targetm.resolve_overloaded_builtin = rs6000_resolve_overloaded_builtin; \ - } while (0) - - /* Target #defines. */ -@@ -2446,3 +2446,41 @@ - extern GTY(()) tree rs6000_builtin_types[RS6000_BTI_MAX]; - extern GTY(()) tree rs6000_builtin_decls[RS6000_BUILTIN_COUNT]; - -+/* Values for struct isel_builtin_desc.arg_flags. */ -+enum { -+ ISEL_FLAG_CMP_PTR = 0x1, -+ ISEL_FLAG_CMP_SIGNED = 0x2, -+ ISEL_FLAG_CMP_UNSIGNED = 0x4, -+ ISEL_FLAG_CMP_MASK = 0x7, -+ ISEL_FLAG_SEL_PTR = 0x10, -+ ISEL_FLAG_SEL_SIGNED = 0x20, -+ ISEL_FLAG_SEL_UNSIGNED = 0x40, -+ ISEL_FLAG_SEL_MASK = 0x70 -+}; -+ -+struct isel_builtin_desc { -+ /* Name of this builtin. NULL if we should construct it. */ -+ const char *name; -+ -+ /* Flags for argument combinations accepted by the builtin. -+ Zero if this builtin is a generic builtin, to be resolved later. */ -+ int arg_flags; -+ -+ /* The code of the builtin. */ -+ enum rs6000_builtins code; -+ -+ /* rtx_code and machine_mode are not available here; use ints instead. */ -+ /* The comparison code the builtin uses. */ -+ int cmp_code; -+ -+ /* The mode the builtin does comparisons in. */ -+ int cmp_mode; -+ -+ /* The mode the builtin's selected arguments are in. -+ Also happens to be its result mode. */ -+ int sel_mode; -+}; -+ -+/* Arrays describing isel builtins. */ -+extern const struct isel_builtin_desc builtin_iselw[32]; -+extern const struct isel_builtin_desc builtin_iseld[32]; -diff -ruN gcc-4.6.0-orig/gcc/config/rs6000/rs6000-protos.h gcc-4.6.0-new/gcc/config/rs6000/rs6000-protos.h ---- gcc-4.6.0-orig/gcc/config/rs6000/rs6000-protos.h 2011-03-15 07:57:37.000000000 -0500 -+++ gcc-4.6.0-new/gcc/config/rs6000/rs6000-protos.h 2011-07-25 16:07:50.484773000 -0500 -@@ -142,7 +142,7 @@ - unsigned int); - extern unsigned int darwin_rs6000_special_round_type_align (tree, unsigned int, - unsigned int); --extern tree altivec_resolve_overloaded_builtin (location_t, tree, void *); -+extern tree rs6000_resolve_overloaded_builtin (location_t, tree, void *); - extern rtx rs6000_libcall_value (enum machine_mode); - extern rtx rs6000_va_arg (tree, tree); - extern int function_ok_for_sibcall (tree); -diff -ruN gcc-4.6.0-orig/gcc/testsuite/gcc.target/powerpc/builtin-isel64.c gcc-4.6.0-new/gcc/testsuite/gcc.target/powerpc/builtin-isel64.c ---- gcc-4.6.0-orig/gcc/testsuite/gcc.target/powerpc/builtin-isel64.c 1969-12-31 18:00:00.000000000 -0600 -+++ gcc-4.6.0-new/gcc/testsuite/gcc.target/powerpc/builtin-isel64.c 2011-07-25 12:27:55.343932000 -0500 -@@ -0,0 +1,75 @@ -+/* { dg-do compile { target { powerpc*-*-* && lp64 } } } */ -+/* { dg-options "-mcpu=e500mc64" } */ -+ -+#include "builtin-isel.h" -+ -+/* Equality comparisons. */ -+ -+#undef FUNCTION_NAME -+#define FUNCTION_NAME isel64eq -+ -+SIGNED64_PROTO -+{ -+ L = ISEL_BUILTIN (x, y, a, b); -+ U = ISEL_BUILTIN (x, y, (unsigned long) a, (unsigned long) b); -+ r = ISEL_BUILTIN (x, y, p, q); -+ r = ISEL_BUILTIN (x, y, (char *) p, (char *) q); -+ L = ISEL_BUILTIN (p, q, a, b); -+ /* Equality checks explicitly permit unsigned comparison operands. */ -+ L = ISEL_BUILTIN ((unsigned long) x, (unsigned long) y, a, b); -+ r = ISEL_BUILTIN ((unsigned long) x, (unsigned long) y, p, q); -+} -+ -+/* less-than, greater-than. */ -+ -+#undef FUNCTION_NAME -+#define FUNCTION_NAME isel64lt -+ -+SIGNED64_PROTO -+{ -+ L = ISEL_BUILTIN (x, y, a, b); -+ U = ISEL_BUILTIN (x, y, (unsigned long) a, (unsigned long) b); -+ r = ISEL_BUILTIN (x, y, p, q); -+ r = ISEL_BUILTIN (x, y, (char *) p, (char *) q); -+} -+ -+#undef FUNCTION_NAME -+#define FUNCTION_NAME isel64gt -+ -+SIGNED64_PROTO -+{ -+ L = ISEL_BUILTIN (x, y, a, b); -+ U = ISEL_BUILTIN (x, y, (unsigned long) a, (unsigned long) b); -+ r = ISEL_BUILTIN (x, y, p, q); -+ r = ISEL_BUILTIN (x, y, (char *) p, (char *) q); -+} -+ -+/* Unsigned variants. These permit unsigned and pointer operands for -+ comparison only. */ -+ -+#undef FUNCTION_NAME -+#define FUNCTION_NAME isel64ltu -+ -+UNSIGNED64_PROTO -+{ -+ L = ISEL_BUILTIN (x, y, a, b); -+ U = ISEL_BUILTIN (x, y, (unsigned long) a, (unsigned long) b); -+ r = ISEL_BUILTIN (x, y, p, q); -+ r = ISEL_BUILTIN (x, y, (char *) p, (char *) q); -+ L = ISEL_BUILTIN (p, q, a, b); -+} -+ -+#undef FUNCTION_NAME -+#define FUNCTION_NAME isel64gtu -+ -+UNSIGNED64_PROTO -+{ -+ L = ISEL_BUILTIN (x, y, a, b); -+ U = ISEL_BUILTIN (x, y, (unsigned long) a, (unsigned long) b); -+ r = ISEL_BUILTIN (x, y, p, q); -+ r = ISEL_BUILTIN (x, y, (char *) p, (char *) q); -+ L = ISEL_BUILTIN (p, q, a, b); -+} -+ -+/* Don't use bare isel, as that'll match function names and the like. */ -+/* { dg-final { scan-assembler-times "isel " 26 } } */ -diff -ruN gcc-4.6.0-orig/gcc/testsuite/gcc.target/powerpc/builtin-isel64-errors.c gcc-4.6.0-new/gcc/testsuite/gcc.target/powerpc/builtin-isel64-errors.c ---- gcc-4.6.0-orig/gcc/testsuite/gcc.target/powerpc/builtin-isel64-errors.c 1969-12-31 18:00:00.000000000 -0600 -+++ gcc-4.6.0-new/gcc/testsuite/gcc.target/powerpc/builtin-isel64-errors.c 2011-07-25 12:27:55.372965000 -0500 -@@ -0,0 +1,110 @@ -+/* Test rejection of invalid parameter combinations in isel builtins. */ -+/* { dg-do compile { target { powerpc*-*-* && lp64 } } } */ -+/* { dg-options "-mcpu=e5500" } */ -+ -+#include "builtin-isel.h" -+ -+ -+/* Equality comparisons. */ -+ -+#undef FUNCTION_NAME -+#define FUNCTION_NAME isel64eq -+ -+SIGNED64_PROTO -+{ -+ /* Mismatches in argument type. */ -+ ISEL_BUILTIN ((unsigned long) x, y, a, b); /* { dg-error "isel intrinsic" } */ -+ ISEL_BUILTIN (x, (unsigned long) y, a, b); /* { dg-error "isel intrinsic" } */ -+ ISEL_BUILTIN ((long *) p, q, a, b); /* { dg-error "isel intrinsic" } */ -+ ISEL_BUILTIN (p, (long *) q, a, b); /* { dg-error "isel intrinsic" } */ -+ /* Mismatches in return type. */ -+ ISEL_BUILTIN (x, y, (unsigned long) a, b); /* { dg-error "isel intrinsic" } */ -+ ISEL_BUILTIN (x, y, a, (unsigned long) b); /* { dg-error "isel intrinsic" } */ -+ ISEL_BUILTIN (x, y, (long *) p, q); /* { dg-error "isel intrinsic" } */ -+ ISEL_BUILTIN (x, y, p, (long *) q); /* { dg-error "isel intrinsic" } */ -+} -+ -+/* less-than, greater-than. */ -+ -+#undef FUNCTION_NAME -+#define FUNCTION_NAME isel64lt -+ -+SIGNED64_PROTO -+{ -+ /* Unsigned comparison should be done with the *u variants. */ -+ ISEL_BUILTIN ((unsigned long) x, (unsigned long) y, a, b); /* { dg-error "isel intrinsic" } */ -+ /* So should pointer comparison. */ -+ ISEL_BUILTIN (p, q, a, b); /* { dg-error "isel intrinsic" } */ -+ /* Mismatches in argument type. */ -+ ISEL_BUILTIN ((unsigned long) x, y, a, b); /* { dg-error "isel intrinsic" } */ -+ ISEL_BUILTIN (x, (unsigned long) y, a, b); /* { dg-error "isel intrinsic" } */ -+ ISEL_BUILTIN ((long *) p, q, a, b); /* { dg-error "isel intrinsic" } */ -+ ISEL_BUILTIN (p, (long *) q, a, b); /* { dg-error "isel intrinsic" } */ -+ /* Mismatches in return type. */ -+ ISEL_BUILTIN (x, y, (unsigned long) a, b); /* { dg-error "isel intrinsic" } */ -+ ISEL_BUILTIN (x, y, a, (unsigned long) b); /* { dg-error "isel intrinsic" } */ -+ ISEL_BUILTIN (x, y, (long *) p, q); /* { dg-error "isel intrinsic" } */ -+ ISEL_BUILTIN (x, y, p, (long *) q); /* { dg-error "isel intrinsic" } */ -+} -+ -+#undef FUNCTION_NAME -+#define FUNCTION_NAME isel64gt -+ -+SIGNED64_PROTO -+{ -+ /* Unsigned comparison should be done with the *u variants. */ -+ ISEL_BUILTIN ((unsigned long) x, (unsigned long) y, a, b); /* { dg-error "isel intrinsic" } */ -+ /* So should pointer comparison. */ -+ ISEL_BUILTIN (p, q, a, b); /* { dg-error "isel intrinsic" } */ -+ /* Mismatches in argument type. */ -+ ISEL_BUILTIN ((unsigned long) x, y, a, b); /* { dg-error "isel intrinsic" } */ -+ ISEL_BUILTIN (x, (unsigned long) y, a, b); /* { dg-error "isel intrinsic" } */ -+ ISEL_BUILTIN ((long *) p, q, a, b); /* { dg-error "isel intrinsic" } */ -+ ISEL_BUILTIN (p, (long *) q, a, b); /* { dg-error "isel intrinsic" } */ -+ /* Mismatches in return type. */ -+ ISEL_BUILTIN (x, y, (unsigned long) a, b); /* { dg-error "isel intrinsic" } */ -+ ISEL_BUILTIN (x, y, a, (unsigned long) b); /* { dg-error "isel intrinsic" } */ -+ ISEL_BUILTIN (x, y, (long *) p, q); /* { dg-error "isel intrinsic" } */ -+ ISEL_BUILTIN (x, y, p, (long *) q); /* { dg-error "isel intrinsic" } */ -+} -+ -+/* Unsigned variants. These permit unsigned and pointer operands for -+ comparison only. */ -+ -+#undef FUNCTION_NAME -+#define FUNCTION_NAME isel64ltu -+ -+UNSIGNED64_PROTO -+{ -+ /* Signed comparison should be done with the signed variants. */ -+ ISEL_BUILTIN ((long) x, (long) y, a, b); /* { dg-error "isel intrinsic" } */ -+ /* Mismatches in argument type. */ -+ ISEL_BUILTIN ((long) x, y, a, b); /* { dg-error "isel intrinsic" } */ -+ ISEL_BUILTIN (x, (long) y, a, b); /* { dg-error "isel intrinsic" } */ -+ ISEL_BUILTIN ((long *) p, q, a, b); /* { dg-error "isel intrinsic" } */ -+ ISEL_BUILTIN (p, (long *) q, a, b); /* { dg-error "isel intrinsic" } */ -+ /* Mismatches in return type. */ -+ ISEL_BUILTIN (x, y, (unsigned long) a, b); /* { dg-error "isel intrinsic" } */ -+ ISEL_BUILTIN (x, y, a, (unsigned long) b); /* { dg-error "isel intrinsic" } */ -+ ISEL_BUILTIN (x, y, (long *) p, q); /* { dg-error "isel intrinsic" } */ -+ ISEL_BUILTIN (x, y, p, (long *) q); /* { dg-error "isel intrinsic" } */ -+} -+ -+#undef FUNCTION_NAME -+#define FUNCTION_NAME isel64gtu -+ -+UNSIGNED64_PROTO -+{ -+ /* Signed comparison should be done with the signed variants. */ -+ ISEL_BUILTIN ((long) x, (long) y, a, b); /* { dg-error "isel intrinsic" } */ -+ /* Mismatches in argument type. */ -+ ISEL_BUILTIN ((long) x, y, a, b); /* { dg-error "isel intrinsic" } */ -+ ISEL_BUILTIN (x, (long) y, a, b); /* { dg-error "isel intrinsic" } */ -+ ISEL_BUILTIN ((long *) p, q, a, b); /* { dg-error "isel intrinsic" } */ -+ ISEL_BUILTIN (p, (long *) q, a, b); /* { dg-error "isel intrinsic" } */ -+ /* Mismatches in return type. */ -+ ISEL_BUILTIN (x, y, (unsigned long) a, b); /* { dg-error "isel intrinsic" } */ -+ ISEL_BUILTIN (x, y, a, (unsigned long) b); /* { dg-error "isel intrinsic" } */ -+ ISEL_BUILTIN (x, y, (long *) p, q); /* { dg-error "isel intrinsic" } */ -+ ISEL_BUILTIN (x, y, p, (long *) q); /* { dg-error "isel intrinsic" } */ -+} -diff -ruN gcc-4.6.0-orig/gcc/testsuite/gcc.target/powerpc/builtin-isel.c gcc-4.6.0-new/gcc/testsuite/gcc.target/powerpc/builtin-isel.c ---- gcc-4.6.0-orig/gcc/testsuite/gcc.target/powerpc/builtin-isel.c 1969-12-31 18:00:00.000000000 -0600 -+++ gcc-4.6.0-new/gcc/testsuite/gcc.target/powerpc/builtin-isel.c 2011-07-25 12:27:55.405959000 -0500 -@@ -0,0 +1,81 @@ -+/* { dg-do compile } */ -+/* { dg-options "-mcpu=e500mc" } */ -+ -+#include "builtin-isel.h" -+ -+/* We're not being clever with the preprocessor here because DejaGNU -+ will get confused. We do try to use it to eliminate what duplication -+ we can. */ -+ -+/* We check to see that the resolution permits polymorphic results. */ -+ -+/* Equality comparisons. */ -+ -+#undef FUNCTION_NAME -+#define FUNCTION_NAME iseleq -+ -+SIGNED_PROTO -+{ -+ i = ISEL_BUILTIN (x, y, a, b); -+ u = ISEL_BUILTIN (x, y, (unsigned int) a, (unsigned int) b); -+ r = ISEL_BUILTIN (x, y, p, q); -+ r = ISEL_BUILTIN (x, y, (char *) p, (char *) q); -+ i = ISEL_BUILTIN (p, q, a, b); -+ /* Equality checks explicitly permit unsigned comparison operands. */ -+ i = ISEL_BUILTIN ((unsigned int) x, (unsigned int) y, a, b); -+ r = ISEL_BUILTIN ((unsigned int) x, (unsigned int) y, p, q); -+} -+ -+/* less-than, greater-than. */ -+ -+#undef FUNCTION_NAME -+#define FUNCTION_NAME isellt -+ -+SIGNED_PROTO -+{ -+ i = ISEL_BUILTIN (x, y, a, b); -+ u = ISEL_BUILTIN (x, y, (unsigned int) a, (unsigned int) b); -+ r = ISEL_BUILTIN (x, y, p, q); -+ r = ISEL_BUILTIN (x, y, (char *) p, (char *) q); -+} -+ -+#undef FUNCTION_NAME -+#define FUNCTION_NAME iselgt -+ -+SIGNED_PROTO -+{ -+ i = ISEL_BUILTIN (x, y, a, b); -+ u = ISEL_BUILTIN (x, y, (unsigned int) a, (unsigned int) b); -+ r = ISEL_BUILTIN (x, y, p, q); -+ r = ISEL_BUILTIN (x, y, (char *) p, (char *) q); -+} -+ -+/* Unsigned variants. These permit unsigned and pointer operands for -+ comparison only. */ -+ -+#undef FUNCTION_NAME -+#define FUNCTION_NAME iselltu -+ -+UNSIGNED_PROTO -+{ -+ i = ISEL_BUILTIN (x, y, a, b); -+ u = ISEL_BUILTIN (x, y, (unsigned int) a, (unsigned int) b); -+ r = ISEL_BUILTIN (x, y, p, q); -+ r = ISEL_BUILTIN (x, y, (char *) p, (char *) q); -+ i = ISEL_BUILTIN (p, q, a, b); -+} -+ -+#undef FUNCTION_NAME -+#define FUNCTION_NAME iselgtu -+ -+UNSIGNED_PROTO -+{ -+ i = ISEL_BUILTIN (x, y, a, b); -+ u = ISEL_BUILTIN (x, y, (unsigned int) a, (unsigned int) b); -+ r = ISEL_BUILTIN (x, y, p, q); -+ r = ISEL_BUILTIN (x, y, (char *) p, (char *) q); -+ i = ISEL_BUILTIN (p, q, a, b); -+} -+ -+/* Don't use bare isel, as that'll match function names and the like. */ -+/* { dg-final { scan-assembler-times "isel " 26 } } */ -diff -ruN gcc-4.6.0-orig/gcc/testsuite/gcc.target/powerpc/builtin-isel-errors.c gcc-4.6.0-new/gcc/testsuite/gcc.target/powerpc/builtin-isel-errors.c ---- gcc-4.6.0-orig/gcc/testsuite/gcc.target/powerpc/builtin-isel-errors.c 1969-12-31 18:00:00.000000000 -0600 -+++ gcc-4.6.0-new/gcc/testsuite/gcc.target/powerpc/builtin-isel-errors.c 2011-07-25 12:27:55.443938000 -0500 -@@ -0,0 +1,117 @@ -+/* Test rejection of invalid parameter combinations in isel builtins. */ -+/* { dg-do compile } */ -+/* { dg-options "-mcpu=e500mc" } */ -+ -+#include "builtin-isel.h" -+ -+/* We're not being clever with the preprocessor here because DejaGNU -+ will get confused. We do try to use it to eliminate what duplication -+ we can. */ -+ -+/* We check basic resolution of each builtin. We also check to see that -+ the resolution permits polymorphic results. Argument type mismatches -+ and result type mismatches are not permitted, except where noted. */ -+ -+/* Equality comparisons. */ -+ -+#undef FUNCTION_NAME -+#define FUNCTION_NAME iseleq -+ -+SIGNED_PROTO -+{ -+ /* Mismatches in argument type. */ -+ ISEL_BUILTIN ((unsigned int) x, y, a, b); /* { dg-error "isel intrinsic" } */ -+ ISEL_BUILTIN (x, (unsigned int) y, a, b); /* { dg-error "isel intrinsic" } */ -+ ISEL_BUILTIN ((int *) p, q, a, b); /* { dg-error "isel intrinsic" } */ -+ ISEL_BUILTIN (p, (int *) q, a, b); /* { dg-error "isel intrinsic" } */ -+ /* Mismatches in return type. */ -+ ISEL_BUILTIN (x, y, (unsigned int) a, b); /* { dg-error "isel intrinsic" } */ -+ ISEL_BUILTIN (x, y, a, (unsigned int) b); /* { dg-error "isel intrinsic" } */ -+ ISEL_BUILTIN (x, y, (int *) p, q); /* { dg-error "isel intrinsic" } */ -+ ISEL_BUILTIN (x, y, p, (int *) q); /* { dg-error "isel intrinsic" } */ -+} -+ -+/* less-than, greater-than. */ -+ -+#undef FUNCTION_NAME -+#define FUNCTION_NAME isellt -+ -+SIGNED_PROTO -+{ -+ /* Unsigned comparison should be done with the *u variants. */ -+ ISEL_BUILTIN ((unsigned int) x, (unsigned int) y, a, b); /* { dg-error "isel intrinsic" } */ -+ /* So should pointer comparison. */ -+ ISEL_BUILTIN (p, q, a, b); /* { dg-error "isel intrinsic" } */ -+ /* Mismatches in argument type. */ -+ ISEL_BUILTIN ((unsigned int) x, y, a, b); /* { dg-error "isel intrinsic" } */ -+ ISEL_BUILTIN (x, (unsigned int) y, a, b); /* { dg-error "isel intrinsic" } */ -+ ISEL_BUILTIN ((int *) p, q, a, b); /* { dg-error "isel intrinsic" } */ -+ ISEL_BUILTIN (p, (int *) q, a, b); /* { dg-error "isel intrinsic" } */ -+ /* Mismatches in return type. */ -+ ISEL_BUILTIN (x, y, (unsigned int) a, b); /* { dg-error "isel intrinsic" } */ -+ ISEL_BUILTIN (x, y, a, (unsigned int) b); /* { dg-error "isel intrinsic" } */ -+ ISEL_BUILTIN (x, y, (int *) p, q); /* { dg-error "isel intrinsic" } */ -+ ISEL_BUILTIN (x, y, p, (int *) q); /* { dg-error "isel intrinsic" } */ -+} -+ -+#undef FUNCTION_NAME -+#define FUNCTION_NAME iselgt -+ -+SIGNED_PROTO -+{ -+ /* Unsigned comparison should be done with the *u variants. */ -+ ISEL_BUILTIN ((unsigned int) x, (unsigned int) y, a, b); /* { dg-error "isel intrinsic" } */ -+ /* So should pointer comparison. */ -+ ISEL_BUILTIN (p, q, a, b); /* { dg-error "isel intrinsic" } */ -+ /* Mismatches in argument type. */ -+ ISEL_BUILTIN ((unsigned int) x, y, a, b); /* { dg-error "isel intrinsic" } */ -+ ISEL_BUILTIN (x, (unsigned int) y, a, b); /* { dg-error "isel intrinsic" } */ -+ ISEL_BUILTIN ((int *) p, q, a, b); /* { dg-error "isel intrinsic" } */ -+ ISEL_BUILTIN (p, (int *) q, a, b); /* { dg-error "isel intrinsic" } */ -+ /* Mismatches in return type. */ -+ ISEL_BUILTIN (x, y, (unsigned int) a, b); /* { dg-error "isel intrinsic" } */ -+ ISEL_BUILTIN (x, y, a, (unsigned int) b); /* { dg-error "isel intrinsic" } */ -+ ISEL_BUILTIN (x, y, (int *) p, q); /* { dg-error "isel intrinsic" } */ -+ ISEL_BUILTIN (x, y, p, (int *) q); /* { dg-error "isel intrinsic" } */ -+} -+ -+/* Unsigned variants. These permit unsigned and pointer operands for -+ comparison only. */ -+ -+#undef FUNCTION_NAME -+#define FUNCTION_NAME iselltu -+ -+UNSIGNED_PROTO -+{ -+ /* Signed comparison should be done with the signed variants. */ -+ ISEL_BUILTIN ((int) x, (int) y, a, b); /* { dg-error "isel intrinsic" } */ -+ /* Mismatches in argument type. */ -+ ISEL_BUILTIN ((int) x, y, a, b); /* { dg-error "isel intrinsic" } */ -+ ISEL_BUILTIN (x, (int) y, a, b); /* { dg-error "isel intrinsic" } */ -+ ISEL_BUILTIN ((int *) p, q, a, b); /* { dg-error "isel intrinsic" } */ -+ ISEL_BUILTIN (p, (int *) q, a, b); /* { dg-error "isel intrinsic" } */ -+ /* Mismatches in return type. */ -+ ISEL_BUILTIN (x, y, (unsigned int) a, b); /* { dg-error "isel intrinsic" } */ -+ ISEL_BUILTIN (x, y, a, (unsigned int) b); /* { dg-error "isel intrinsic" } */ -+ ISEL_BUILTIN (x, y, (int *) p, q); /* { dg-error "isel intrinsic" } */ -+ ISEL_BUILTIN (x, y, p, (int *) q); /* { dg-error "isel intrinsic" } */ -+} -+ -+#undef FUNCTION_NAME -+#define FUNCTION_NAME iselgtu -+ -+UNSIGNED_PROTO -+{ -+ /* Signed comparison should be done with the signed variants. */ -+ ISEL_BUILTIN ((int) x, (int) y, a, b); /* { dg-error "isel intrinsic" } */ -+ /* Mismatches in argument type. */ -+ ISEL_BUILTIN ((int) x, y, a, b); /* { dg-error "isel intrinsic" } */ -+ ISEL_BUILTIN (x, (int) y, a, b); /* { dg-error "isel intrinsic" } */ -+ ISEL_BUILTIN ((int *) p, q, a, b); /* { dg-error "isel intrinsic" } */ -+ ISEL_BUILTIN (p, (int *) q, a, b); /* { dg-error "isel intrinsic" } */ -+ /* Mismatches in return type. */ -+ ISEL_BUILTIN (x, y, (unsigned int) a, b); /* { dg-error "isel intrinsic" } */ -+ ISEL_BUILTIN (x, y, a, (unsigned int) b); /* { dg-error "isel intrinsic" } */ -+ ISEL_BUILTIN (x, y, (int *) p, q); /* { dg-error "isel intrinsic" } */ -+ ISEL_BUILTIN (x, y, p, (int *) q); /* { dg-error "isel intrinsic" } */ -+} -diff -ruN gcc-4.6.0-orig/gcc/testsuite/gcc.target/powerpc/builtin-isel.h gcc-4.6.0-new/gcc/testsuite/gcc.target/powerpc/builtin-isel.h ---- gcc-4.6.0-orig/gcc/testsuite/gcc.target/powerpc/builtin-isel.h 1969-12-31 18:00:00.000000000 -0600 -+++ gcc-4.6.0-new/gcc/testsuite/gcc.target/powerpc/builtin-isel.h 2011-07-25 12:27:55.483942000 -0500 -@@ -0,0 +1,25 @@ -+/* Common definitions for builtin isel testing. */ -+ -+#define SIGNED_ARGLIST (int x, int y, int a, int b, void *p, void *q) -+#define UNSIGNED_ARGLIST (unsigned int x, unsigned int y, \ -+ int a, int b, void *p, void *q) -+ -+#define SIGNED_PROTO void FUNCTION_NAME SIGNED_ARGLIST -+#define UNSIGNED_PROTO void FUNCTION_NAME UNSIGNED_ARGLIST -+ -+#define SIGNED64_ARGLIST (long x, long y, long a, long b, void *p, void *q) -+#define UNSIGNED64_ARGLIST (unsigned long x, unsigned long y, \ -+ long a, long b, void *p, void *q) -+ -+#define SIGNED64_PROTO void FUNCTION_NAME SIGNED64_ARGLIST -+#define UNSIGNED64_PROTO void FUNCTION_NAME UNSIGNED64_ARGLIST -+ -+#define CONCAT2(X,Y) X##Y -+#define CONCAT(X,Y) CONCAT2(X, Y) -+#define ISEL_BUILTIN CONCAT(__builtin_, FUNCTION_NAME) -+ -+volatile int i; -+volatile unsigned int u; -+volatile void *r; -+volatile long L; -+volatile unsigned long U; diff --git a/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.case_values.patch b/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.case_values.patch deleted file mode 100644 index 5be766d9..00000000 --- a/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.case_values.patch +++ /dev/null @@ -1,65 +0,0 @@ ---- gcc-4.6.0/gcc/params.def-orig 2011-06-16 11:39:42.412634260 -0500 -+++ gcc-4.6.0/gcc/params.def 2011-06-16 11:41:29.457630886 -0500 -@@ -39,6 +39,11 @@ - - Be sure to add an entry to invoke.texi summarizing the parameter. */ - -+DEFPARAM (PARAM_CASE_VALUES_THRESHOLD, -+ "case-values-threshold", -+ "Minimum number of case statements for each a jump table will be used", -+ 4, 4, 1000) -+ - /* The threshold ratio between current and hottest structure counts. - We say that if the ratio of the current structure count, - calculated by profiling, to the hottest structure count ---- gcc-4.6.0/gcc/config/rs6000/rs6000.c-orig 2011-06-16 12:24:03.440630751 -0500 -+++ gcc-4.6.0/gcc/config/rs6000/rs6000.c 2011-06-16 12:24:51.450630163 -0500 -@@ -1282,6 +1282,7 @@ - struct cl_target_option *); - static bool rs6000_can_inline_p (tree, tree); - static void rs6000_set_current_function (tree); -+static unsigned int rs6000_case_values_threshold (void); - - - /* Default register names. */ ---- gcc-4.6.0/gcc/config/rs6000/rs6000.c-orig 2011-06-16 11:18:27.131631000 -0500 -+++ gcc-4.6.0/gcc/config/rs6000/rs6000.c 2011-06-16 11:38:15.225631714 -0500 -@@ -1704,6 +1704,9 @@ - #undef TARGET_SET_CURRENT_FUNCTION - #define TARGET_SET_CURRENT_FUNCTION rs6000_set_current_function - -+#undef TARGET_CASE_VALUES_THRESHOLD -+#define TARGET_CASE_VALUES_THRESHOLD rs6000_case_values_threshold -+ - struct gcc_target targetm = TARGET_INITIALIZER; - - -@@ -28179,6 +28182,12 @@ - } - - -+static unsigned int -+rs6000_case_values_threshold (void) -+{ -+ return PARAM_VALUE (PARAM_CASE_VALUES_THRESHOLD); -+} -+ - /* Save the current options */ - - static void ---- gcc-4.6.0/gcc/config/rs6000/rs6000.c-orig 2011-06-17 12:19:00.463631000 -0500 -+++ gcc-4.6.0/gcc/config/rs6000/rs6000.c 2011-06-17 12:06:28.904630840 -0500 -@@ -2906,6 +2906,13 @@ - if (rs6000_block_move_inline_limit < (TARGET_POWERPC64 ? 64 : 32)) - rs6000_block_move_inline_limit = (TARGET_POWERPC64 ? 64 : 32); - -+ if ((rs6000_cpu == PROCESSOR_PPC8540 -+ || rs6000_cpu == PROCESSOR_PPCE500MC -+ || rs6000_cpu == PROCESSOR_PPCE5500 -+ || rs6000_cpu == PROCESSOR_PPCE6500) -+ && global_options_set.x_param_values[(int) PARAM_CASE_VALUES_THRESHOLD] != true) -+ global_options.x_param_values[(int) PARAM_CASE_VALUES_THRESHOLD] = 8; -+ - if (global_init_p) - { - /* If the appropriate debug option is enabled, replace the target hooks diff --git a/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.check_path_validity.patch b/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.check_path_validity.patch deleted file mode 100644 index 5d70a397..00000000 --- a/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.check_path_validity.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- gcc-4_6-branch/gcc/Makefile.in.orig 2012-03-06 01:10:15.277196930 -0600 -+++ gcc-4_6-branch/gcc/Makefile.in 2012-03-06 01:10:54.083378912 -0600 -@@ -4170,6 +4170,9 @@ - else \ - set -e; for ml in `cat fixinc_list`; do \ - sysroot_headers_suffix=`echo $${ml} | sed -e 's/;.*$$//'`; \ -+ if test "x$${sysroot_headers_suffix}" = "x"; then \ -+ continue; \ -+ fi; \ - multi_dir=`echo $${ml} | sed -e 's/^[^;]*;//'`; \ - fix_dir=include-fixed$${multi_dir}; \ - if ! $(inhibit_libc) && test ! -d ${SYSTEM_HEADER_DIR}; then \ diff --git a/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.e5500_mfocr.patch b/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.e5500_mfocr.patch deleted file mode 100644 index 16b3538a..00000000 --- a/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.e5500_mfocr.patch +++ /dev/null @@ -1,181 +0,0 @@ -# Problem: Although gcc is prepared to avoid "mfocr" instructions - (which takes 5 cycles in our parts and 2 cycles on IBM parts). This - instruction is used on the mentioned program. What is suspicious - about it, is that the code compiled for 32 bits does not use the - instruction. So, it could be a omission in the previous - implementation, or a bug, or a new opportunity. -# Reported by: Performance team (PARC) -# Owned by: Ping Hu -# Action: - * 'mfocr' flag problem: that 'mfocr' flag was uncorrectly set for E5500, - which caused the 'mfocr' instructions generated even on E5500. - * avoid generating 'mfcr' and 'mfocr' instructions: due to the fact - that both instructions are expensive on Freescale processors. - * A target specific flag, -mslow-mfocr, can be used to avoid generating - 'mfcr' and 'mfocr' instructions in 64-bit mode, thus restoring legacy - operations if desired. - -diff -ruN gcc-4.6.2-clean/gcc/config/rs6000/rs6000.c gcc-4.6.2/gcc/config/rs6000/rs6000.c ---- gcc-4.6.2-clean/gcc/config/rs6000/rs6000.c 2011-11-22 11:11:47.479144000 -0600 -+++ gcc-4.6.2/gcc/config/rs6000/rs6000.c 2011-11-29 16:23:45.074279998 -0600 -@@ -1885,6 +1885,7 @@ - POWERPC_BASE_MASK | MASK_PPC_GFXOPT | MASK_POWERPC64} - }; - -+ - /* Look up a processor name for -mcpu=xxx and -mtune=xxx. Return -1 if the - name is invalid. */ - -@@ -2902,6 +2903,10 @@ - || rs6000_cpu == PROCESSOR_PPCE6500) - target_flags &= ~MASK_PPC_GPOPT; - -+ if (rs6000_cpu == PROCESSOR_PPCE5500) -+ target_flags &= ~MASK_MFCRF; -+ -+ - /* store_one_arg depends on expand_block_move to handle at least the - size of reg_parm_stack_space. */ - if (rs6000_block_move_inline_limit < (TARGET_POWERPC64 ? 64 : 32)) -diff -ruN gcc-4.6.2-clean/gcc/config/rs6000/rs6000.md gcc-4.6.2/gcc/config/rs6000/rs6000.md ---- gcc-4.6.2-clean/gcc/config/rs6000/rs6000.md 2011-11-22 11:11:47.036144001 -0600 -+++ gcc-4.6.2/gcc/config/rs6000/rs6000.md 2011-11-29 16:24:04.705280001 -0600 -@@ -215,6 +215,8 @@ - ; (one with a '.') will compare; and the size used for arithmetic carries. - (define_mode_iterator P [(SI "TARGET_32BIT") (DI "TARGET_64BIT")]) - -+(define_mode_iterator P2 [(SI "TARGET_32BIT || TARGET_SLOW_MFOCR") (DI "TARGET_64BIT")]) -+ - ; Any hardware-supported floating-point mode - (define_mode_iterator FP [ - (SF "TARGET_HARD_FLOAT -@@ -2208,9 +2210,9 @@ - - (define_insn "" - [(set (match_operand:CC 0 "cc_reg_operand" "=x,?y") -- (compare:CC (neg:P (match_operand:P 1 "gpc_reg_operand" "r,r")) -+ (compare:CC (neg:P2 (match_operand:P2 1 "gpc_reg_operand" "r,r")) - (const_int 0))) -- (clobber (match_scratch:P 2 "=r,r"))] -+ (clobber (match_scratch:P2 2 "=r,r"))] - "" - "@ - neg. %2,%1 -@@ -2220,12 +2222,12 @@ - - (define_split - [(set (match_operand:CC 0 "cc_reg_not_cr0_operand" "") -- (compare:CC (neg:P (match_operand:P 1 "gpc_reg_operand" "")) -+ (compare:CC (neg:P2 (match_operand:P2 1 "gpc_reg_operand" "")) - (const_int 0))) -- (clobber (match_scratch:P 2 ""))] -+ (clobber (match_scratch:P2 2 ""))] - "reload_completed" - [(set (match_dup 2) -- (neg:P (match_dup 1))) -+ (neg:P2 (match_dup 1))) - (set (match_dup 0) - (compare:CC (match_dup 2) - (const_int 0)))] -@@ -2233,10 +2235,10 @@ - - (define_insn "" - [(set (match_operand:CC 2 "cc_reg_operand" "=x,?y") -- (compare:CC (neg:P (match_operand:P 1 "gpc_reg_operand" "r,r")) -+ (compare:CC (neg:P2 (match_operand:P2 1 "gpc_reg_operand" "r,r")) - (const_int 0))) -- (set (match_operand:P 0 "gpc_reg_operand" "=r,r") -- (neg:P (match_dup 1)))] -+ (set (match_operand:P2 0 "gpc_reg_operand" "=r,r") -+ (neg:P2 (match_dup 1)))] - "" - "@ - neg. %0,%1 -@@ -2246,13 +2248,13 @@ - - (define_split - [(set (match_operand:CC 2 "cc_reg_not_cr0_operand" "") -- (compare:CC (neg:P (match_operand:P 1 "gpc_reg_operand" "")) -+ (compare:CC (neg:P2 (match_operand:P2 1 "gpc_reg_operand" "")) - (const_int 0))) -- (set (match_operand:P 0 "gpc_reg_operand" "") -- (neg:P (match_dup 1)))] -+ (set (match_operand:P2 0 "gpc_reg_operand" "") -+ (neg:P2 (match_dup 1)))] - "reload_completed" - [(set (match_dup 0) -- (neg:P (match_dup 1))) -+ (neg:P2 (match_dup 1))) - (set (match_dup 2) - (compare:CC (match_dup 0) - (const_int 0)))] -@@ -15286,31 +15288,31 @@ - [(set_attr "length" "12")]) - - (define_insn_and_split "*gtu" -- [(set (match_operand:P 0 "gpc_reg_operand" "=r") -- (gtu:P (match_operand:P 1 "gpc_reg_operand" "r") -- (match_operand:P 2 "reg_or_short_operand" "rI")))] -+ [(set (match_operand:P2 0 "gpc_reg_operand" "=r") -+ (gtu:P2 (match_operand:P2 1 "gpc_reg_operand" "r") -+ (match_operand:P2 2 "reg_or_short_operand" "rI")))] - "" - "#" - "" -- [(set (match_dup 0) (neg:P (gtu:P (match_dup 1) (match_dup 2)))) -- (set (match_dup 0) (neg:P (match_dup 0)))] -+ [(set (match_dup 0) (neg:P2 (gtu:P2 (match_dup 1) (match_dup 2)))) -+ (set (match_dup 0) (neg:P2 (match_dup 0)))] - "") - - (define_insn_and_split "*gtu_compare" - [(set (match_operand:CC 3 "cc_reg_operand" "=x,?y") - (compare:CC -- (gtu:P (match_operand:P 1 "gpc_reg_operand" "r,r") -- (match_operand:P 2 "reg_or_short_operand" "rI,rI")) -+ (gtu:P2 (match_operand:P2 1 "gpc_reg_operand" "r,r") -+ (match_operand:P2 2 "reg_or_short_operand" "rI,rI")) - (const_int 0))) -- (set (match_operand:P 0 "gpc_reg_operand" "=r,r") -- (gtu:P (match_dup 1) (match_dup 2)))] -+ (set (match_operand:P2 0 "gpc_reg_operand" "=r,r") -+ (gtu:P2 (match_dup 1) (match_dup 2)))] - "" - "#" - "" -- [(set (match_dup 0) (neg:P (gtu:P (match_dup 1) (match_dup 2)))) -+ [(set (match_dup 0) (neg:P2 (gtu:P2 (match_dup 1) (match_dup 2)))) - (parallel [(set (match_dup 3) -- (compare:CC (neg:P (match_dup 0)) (const_int 0))) -- (set (match_dup 0) (neg:P (match_dup 0)))])] -+ (compare:CC (neg:P2 (match_dup 0)) (const_int 0))) -+ (set (match_dup 0) (neg:P2 (match_dup 0)))])] - "") - - (define_insn_and_split "*plus_gtu" -@@ -15345,9 +15347,9 @@ - "") - - (define_insn "*neg_gtu" -- [(set (match_operand:P 0 "gpc_reg_operand" "=r") -- (neg:P (gtu:P (match_operand:P 1 "gpc_reg_operand" "r") -- (match_operand:P 2 "reg_or_short_operand" "rI"))))] -+ [(set (match_operand:P2 0 "gpc_reg_operand" "=r") -+ (neg:P2 (gtu:P2 (match_operand:P2 1 "gpc_reg_operand" "r") -+ (match_operand:P2 2 "reg_or_short_operand" "rI"))))] - "" - "{sf%I2|subf%I2c} %0,%1,%2\;{sfe|subfe} %0,%0,%0" - [(set_attr "type" "two") ---- gcc-4.6.2-clean/gcc/config/rs6000/rs6000.opt 2011-11-22 11:11:47.480143999 -0600 -+++ gcc-4.6.2/gcc/config/rs6000/rs6000.opt 2011-11-29 16:24:16.322280634 -0600 -@@ -381,6 +381,10 @@ - Target - Generate SPE SIMD instructions on E500 - -+mslow-mfocr -+Target Report Var(TARGET_SLOW_MFOCR) -+Generate slow mfocr instructions -+ - mpaired - Target Var(rs6000_paired_float) Save - Generate PPC750CL paired-single instructions diff --git a/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.e6500-FSF46.patch b/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.e6500-FSF46.patch deleted file mode 100644 index f9fa33de..00000000 --- a/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.e6500-FSF46.patch +++ /dev/null @@ -1,4011 +0,0 @@ -diff -ruN gcc-4.6.2-orig/gcc/config/rs6000/altivec.h gcc-4.6.2/gcc/config/rs6000/altivec.h ---- gcc-4.6.2-orig/gcc/config/rs6000/altivec.h 2011-02-02 23:42:19.000000000 -0600 -+++ gcc-4.6.2/gcc/config/rs6000/altivec.h 2012-03-06 12:33:43.943038996 -0600 -@@ -322,6 +322,30 @@ - #define vec_vsx_st __builtin_vec_vsx_st - #endif - -+#ifdef __ALTIVEC2__ -+/* New Altivec instructions */ -+#define vec_absd __builtin_vec_absd -+#define vec_lvexbx __builtin_vec_lvexbx -+#define vec_lvexhx __builtin_vec_lvexhx -+#define vec_lvexwx __builtin_vec_lvexwx -+#define vec_stvexbx __builtin_vec_stvexbx -+#define vec_stvexhx __builtin_vec_stvexhx -+#define vec_stvexwx __builtin_vec_stvexwx -+#define vec_lvswx __builtin_vec_lvswx -+#define vec_lvswxl __builtin_vec_lvswxl -+#define vec_stvswx __builtin_vec_stvswx -+#define vec_stvswxl __builtin_vec_stvswxl -+#define vec_lvsm __builtin_vec_lvsm -+#define vec_lvtlx __builtin_vec_lvtlx -+#define vec_lvtlxl __builtin_vec_lvtlxl -+#define vec_lvtrx __builtin_vec_lvtrx -+#define vec_lvtrxl __builtin_vec_lvtrxl -+#define vec_stvflx __builtin_vec_stvflx -+#define vec_stvflxl __builtin_vec_stvflxl -+#define vec_stvfrx __builtin_vec_stvfrx -+#define vec_stvfrxl __builtin_vec_stvfrxl -+#endif -+ - /* Predicates. - For C++, we use templates in order to allow non-parenthesized arguments. - For C, instead, we use macros since non-parenthesized arguments were -diff -ruN gcc-4.6.2-orig/gcc/config/rs6000/altivec.md gcc-4.6.2/gcc/config/rs6000/altivec.md ---- gcc-4.6.2-orig/gcc/config/rs6000/altivec.md 2011-07-08 15:10:18.000000000 -0500 -+++ gcc-4.6.2/gcc/config/rs6000/altivec.md 2012-03-06 12:24:35.058038999 -0600 -@@ -91,9 +91,11 @@ - (UNSPEC_LVSL 194) - (UNSPEC_LVSR 195) - (UNSPEC_LVE 196) -+ (UNSPEC_LVEX 197) - (UNSPEC_STVX 201) - (UNSPEC_STVXL 202) - (UNSPEC_STVE 203) -+ (UNSPEC_STVEX 204) - (UNSPEC_SET_VSCR 213) - (UNSPEC_GET_VRSAVE 214) - (UNSPEC_LVX 215) -@@ -123,6 +125,19 @@ - (UNSPEC_STVLXL 241) - (UNSPEC_STVRX 242) - (UNSPEC_STVRXL 243) -+ (UNSPEC_LVTLX 244) -+ (UNSPEC_LVTLXL 245) -+ (UNSPEC_LVTRX 246) -+ (UNSPEC_LVTRXL 247) -+ (UNSPEC_STVFLX 248) -+ (UNSPEC_STVFLXL 249) -+ (UNSPEC_STVFRX 250) -+ (UNSPEC_STVFRXL 251) -+ (UNSPEC_LVSWX 252) -+ (UNSPEC_LVSWXL 253) -+ (UNSPEC_LVSM 254) -+ (UNSPEC_STVSWX 255) -+ (UNSPEC_STVSWXL 256) - (UNSPEC_VMULWHUB 308) - (UNSPEC_VMULWLUB 309) - (UNSPEC_VMULWHSB 310) -@@ -143,6 +158,9 @@ - (UNSPEC_VUPKLS_V4SF 325) - (UNSPEC_VUPKHU_V4SF 326) - (UNSPEC_VUPKLU_V4SF 327) -+ (UNSPEC_VABSDUB 328) -+ (UNSPEC_VABSDUH 329) -+ (UNSPEC_VABSDUW 330) - ]) - - (define_constants -@@ -323,6 +341,34 @@ - - ;; Simple binary operations. - -+;; absd -+(define_insn "altivec_vabsduw" -+ [(set (match_operand:V4SI 0 "register_operand" "=v") -+ (unspec:V4SI [(match_operand:V4SI 1 "register_operand" "v") -+ (match_operand:V4SI 2 "register_operand" "v")] -+ UNSPEC_VABSDUW))] -+ "TARGET_ALTIVEC2" -+ "vabsduw %0,%1,%2" -+ [(set_attr "type" "vecsimple")]) -+ -+(define_insn "altivec_vabsduh" -+ [(set (match_operand:V8HI 0 "register_operand" "=v") -+ (unspec:V8HI [(match_operand:V8HI 1 "register_operand" "v") -+ (match_operand:V8HI 2 "register_operand" "v")] -+ UNSPEC_VABSDUH))] -+ "TARGET_ALTIVEC2" -+ "vabsduh %0,%1,%2" -+ [(set_attr "type" "vecsimple")]) -+ -+(define_insn "altivec_vabsdub" -+ [(set (match_operand:V16QI 0 "register_operand" "=v") -+ (unspec:V16QI [(match_operand:V16QI 1 "register_operand" "v") -+ (match_operand:V16QI 2 "register_operand" "v")] -+ UNSPEC_VABSDUB))] -+ "TARGET_ALTIVEC2" -+ "vabsdub %0,%1,%2" -+ [(set_attr "type" "vecsimple")]) -+ - ;; add - (define_insn "add3" - [(set (match_operand:VI 0 "register_operand" "=v") -@@ -1741,6 +1787,15 @@ - "lvewx %0,%y1" - [(set_attr "type" "vecload")]) - -+(define_insn "altivec_lvexx" -+ [(parallel -+ [(set (match_operand:VI 0 "register_operand" "=v") -+ (match_operand:VI 1 "memory_operand" "Z")) -+ (unspec [(const_int 0)] UNSPEC_LVEX)])] -+ "TARGET_ALTIVEC2" -+ "lvexx %0,%y1" -+ [(set_attr "type" "vecload")]) -+ - (define_insn "altivec_lvxl" - [(parallel - [(set (match_operand:V4SI 0 "register_operand" "=v") -@@ -1791,6 +1846,13 @@ - "stvewx %1,%y0" - [(set_attr "type" "vecstore")]) - -+(define_insn "altivec_stvexx" -+ [(set (match_operand: 0 "memory_operand" "=Z") -+ (unspec: [(match_operand:VI 1 "register_operand" "v")] UNSPEC_STVEX))] -+ "TARGET_ALTIVEC2" -+ "stvexx %1,%y0" -+ [(set_attr "type" "vecstore")]) -+ - ;; Generate - ;; vspltis? SCRATCH0,0 - ;; vsubu?m SCRATCH2,SCRATCH1,%1 -@@ -2358,7 +2420,7 @@ - DONE; - }") - --;; Vector SIMD PEM v2.06c defines LVLX, LVLXL, LVRX, LVRXL, -+;; Vector SIMD PEM v2.06c defines LVLX, LVLXL, LVRX1, LVRXL, - ;; STVLX, STVLXL, STVVRX, STVRXL are available only on Cell. - (define_insn "altivec_lvlx" - [(set (match_operand:V16QI 0 "register_operand" "=v") -@@ -2394,8 +2456,8 @@ - - (define_insn "altivec_stvlx" - [(parallel -- [(set (match_operand:V4SI 0 "memory_operand" "=Z") -- (match_operand:V4SI 1 "register_operand" "v")) -+ [(set (match_operand:V16QI 0 "memory_operand" "=Z") -+ (match_operand:V16QI 1 "register_operand" "v")) - (unspec [(const_int 0)] UNSPEC_STVLX)])] - "TARGET_ALTIVEC && rs6000_cpu == PROCESSOR_CELL" - "stvlx %1,%y0" -@@ -2403,8 +2465,8 @@ - - (define_insn "altivec_stvlxl" - [(parallel -- [(set (match_operand:V4SI 0 "memory_operand" "=Z") -- (match_operand:V4SI 1 "register_operand" "v")) -+ [(set (match_operand:V16QI 0 "memory_operand" "=Z") -+ (match_operand:V16QI 1 "register_operand" "v")) - (unspec [(const_int 0)] UNSPEC_STVLXL)])] - "TARGET_ALTIVEC && rs6000_cpu == PROCESSOR_CELL" - "stvlxl %1,%y0" -@@ -2412,8 +2474,8 @@ - - (define_insn "altivec_stvrx" - [(parallel -- [(set (match_operand:V4SI 0 "memory_operand" "=Z") -- (match_operand:V4SI 1 "register_operand" "v")) -+ [(set (match_operand:V16QI 0 "memory_operand" "=Z") -+ (match_operand:V16QI 1 "register_operand" "v")) - (unspec [(const_int 0)] UNSPEC_STVRX)])] - "TARGET_ALTIVEC && rs6000_cpu == PROCESSOR_CELL" - "stvrx %1,%y0" -@@ -2421,13 +2483,123 @@ - - (define_insn "altivec_stvrxl" - [(parallel -- [(set (match_operand:V4SI 0 "memory_operand" "=Z") -- (match_operand:V4SI 1 "register_operand" "v")) -+ [(set (match_operand:V16QI 0 "memory_operand" "=Z") -+ (match_operand:V16QI 1 "register_operand" "v")) - (unspec [(const_int 0)] UNSPEC_STVRXL)])] - "TARGET_ALTIVEC && rs6000_cpu == PROCESSOR_CELL" - "stvrxl %1,%y0" - [(set_attr "type" "vecstore")]) - -+(define_insn "altivec_lvtlx" -+ [(set (match_operand:V16QI 0 "register_operand" "=v") -+ (unspec:V16QI [(match_operand 1 "memory_operand" "Z")] -+ UNSPEC_LVTLX))] -+ "TARGET_ALTIVEC2" -+ "lvtlx %0,%y1" -+ [(set_attr "type" "vecload")]) -+ -+(define_insn "altivec_lvtlxl" -+ [(set (match_operand:V16QI 0 "register_operand" "=v") -+ (unspec:V16QI [(match_operand 1 "memory_operand" "Z")] -+ UNSPEC_LVTLXL))] -+ "TARGET_ALTIVEC2" -+ "lvtlxl %0,%y1" -+ [(set_attr "type" "vecload")]) -+ -+(define_insn "altivec_lvtrx" -+ [(set (match_operand:V16QI 0 "register_operand" "=v") -+ (unspec:V16QI [(match_operand 1 "memory_operand" "Z")] -+ UNSPEC_LVTRX))] -+ "TARGET_ALTIVEC2" -+ "lvtrx %0,%y1" -+ [(set_attr "type" "vecload")]) -+ -+(define_insn "altivec_lvtrxl" -+ [(set (match_operand:V16QI 0 "register_operand" "=v") -+ (unspec:V16QI [(match_operand 1 "memory_operand" "Z")] -+ UNSPEC_LVTRXL))] -+ "TARGET_ALTIVEC2" -+ "lvtrxl %0,%y1" -+ [(set_attr "type" "vecload")]) -+ -+(define_insn "altivec_stvflx" -+ [(parallel -+ [(set (match_operand:V16QI 0 "memory_operand" "=Z") -+ (match_operand:V16QI 1 "register_operand" "v")) -+ (unspec [(const_int 0)] UNSPEC_STVFLX)])] -+ "TARGET_ALTIVEC2" -+ "stvflx %1,%y0" -+ [(set_attr "type" "vecstore")]) -+ -+(define_insn "altivec_stvflxl" -+ [(parallel -+ [(set (match_operand:V16QI 0 "memory_operand" "=Z") -+ (match_operand:V16QI 1 "register_operand" "v")) -+ (unspec [(const_int 0)] UNSPEC_STVFLXL)])] -+ "TARGET_ALTIVEC2" -+ "stvflxl %1,%y0" -+ [(set_attr "type" "vecstore")]) -+ -+(define_insn "altivec_stvfrx" -+ [(parallel -+ [(set (match_operand:V16QI 0 "memory_operand" "=Z") -+ (match_operand:V16QI 1 "register_operand" "v")) -+ (unspec [(const_int 0)] UNSPEC_STVFRX)])] -+ "TARGET_ALTIVEC2" -+ "stvfrx %1,%y0" -+ [(set_attr "type" "vecstore")]) -+ -+(define_insn "altivec_stvfrxl" -+ [(parallel -+ [(set (match_operand:V16QI 0 "memory_operand" "=Z") -+ (match_operand:V16QI 1 "register_operand" "v")) -+ (unspec [(const_int 0)] UNSPEC_STVFRXL)])] -+ "TARGET_ALTIVEC2" -+ "stvfrxl %1,%y0" -+ [(set_attr "type" "vecstore")]) -+ -+(define_insn "altivec_lvswx" -+ [(set (match_operand:V16QI 0 "register_operand" "=v") -+ (unspec:V16QI [(match_operand 1 "memory_operand" "Z")] -+ UNSPEC_LVSWX))] -+ "TARGET_ALTIVEC2" -+ "lvswx %0,%y1" -+ [(set_attr "type" "vecload")]) -+ -+(define_insn "altivec_lvswxl" -+ [(set (match_operand:V16QI 0 "register_operand" "=v") -+ (unspec:V16QI [(match_operand 1 "memory_operand" "Z")] -+ UNSPEC_LVSWXL))] -+ "TARGET_ALTIVEC2" -+ "lvswxl %0,%y1" -+ [(set_attr "type" "vecload")]) -+ -+(define_insn "altivec_lvsm" -+ [(set (match_operand:V16QI 0 "register_operand" "=v") -+ (unspec:V16QI [(match_operand 1 "memory_operand" "Z")] -+ UNSPEC_LVSM))] -+ "TARGET_ALTIVEC2" -+ "lvsm %0,%y1" -+ [(set_attr "type" "vecload")]) -+ -+(define_insn "altivec_stvswx" -+ [(parallel -+ [(set (match_operand:V16QI 0 "memory_operand" "=Z") -+ (match_operand:V16QI 1 "register_operand" "v")) -+ (unspec [(const_int 0)] UNSPEC_STVSWX)])] -+ "TARGET_ALTIVEC2" -+ "stvswx %1,%y0" -+ [(set_attr "type" "vecstore")]) -+ -+(define_insn "altivec_stvswxl" -+ [(parallel -+ [(set (match_operand:V16QI 0 "memory_operand" "=Z") -+ (match_operand:V16QI 1 "register_operand" "v")) -+ (unspec [(const_int 0)] UNSPEC_STVSWXL)])] -+ "TARGET_ALTIVEC2" -+ "stvswxl %1,%y0" -+ [(set_attr "type" "vecstore")]) -+ - (define_expand "vec_extract_evenv4si" - [(set (match_operand:V4SI 0 "register_operand" "") - (unspec:V4SI [(match_operand:V4SI 1 "register_operand" "") -diff -ruN gcc-4.6.2-orig/gcc/config/rs6000/e5500.md gcc-4.6.2/gcc/config/rs6000/e5500.md ---- gcc-4.6.2-orig/gcc/config/rs6000/e5500.md 1969-12-31 18:00:00.000000000 -0600 -+++ gcc-4.6.2/gcc/config/rs6000/e5500.md 2012-03-06 12:16:07.590039001 -0600 -@@ -0,0 +1,176 @@ -+;; Pipeline description for Freescale PowerPC e5500 core. -+;; Copyright (C) 2011 Free Software Foundation, Inc. -+;; Contributed by Edmar Wienskoski (edmar@freescale.com) -+;; -+;; This file is part of GCC. -+;; -+;; GCC 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. -+;; -+;; GCC 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 GCC; see the file COPYING3. If not see -+;; . -+;; -+;; e5500 64-bit SFX(2), CFX, LSU, FPU, BU -+;; Max issue 3 insns/clock cycle (includes 1 branch) -+ -+(define_automaton "e5500_most,e5500_long") -+(define_cpu_unit "e5500_decode_0,e5500_decode_1" "e5500_most") -+ -+;; SFX. -+(define_cpu_unit "e5500_sfx_0,e5500_sfx_1" "e5500_most") -+ -+;; CFX. -+(define_cpu_unit "e5500_cfx_stage0,e5500_cfx_stage1" "e5500_most") -+ -+;; Non-pipelined division. -+(define_cpu_unit "e5500_cfx_div" "e5500_long") -+ -+;; LSU. -+(define_cpu_unit "e5500_lsu" "e5500_most") -+ -+;; FPU. -+(define_cpu_unit "e5500_fpu" "e5500_long") -+ -+;; BU. -+(define_cpu_unit "e5500_bu" "e5500_most") -+ -+;; The following units are used to make the automata deterministic. -+(define_cpu_unit "present_e5500_decode_0" "e5500_most") -+(define_cpu_unit "present_e5500_sfx_0" "e5500_most") -+(presence_set "present_e5500_decode_0" "e5500_decode_0") -+(presence_set "present_e5500_sfx_0" "e5500_sfx_0") -+ -+;; Some useful abbreviations. -+(define_reservation "e5500_decode" -+ "e5500_decode_0|e5500_decode_1+present_e5500_decode_0") -+(define_reservation "e5500_sfx" -+ "e5500_sfx_0|e5500_sfx_1+present_e5500_sfx_0") -+ -+;; SFX. -+(define_insn_reservation "e5500_sfx" 1 -+ (and (eq_attr "type" "integer,insert_word,insert_dword,delayed_compare,\ -+ shift,cntlz,exts") -+ (eq_attr "cpu" "ppce5500")) -+ "e5500_decode,e5500_sfx") -+ -+(define_insn_reservation "e5500_sfx2" 2 -+ (and (eq_attr "type" "cmp,compare,fast_compare,trap") -+ (eq_attr "cpu" "ppce5500")) -+ "e5500_decode,e5500_sfx") -+ -+(define_insn_reservation "e5500_delayed" 2 -+ (and (eq_attr "type" "var_shift_rotate,var_delayed_compare,popcnt") -+ (eq_attr "cpu" "ppce5500")) -+ "e5500_decode,e5500_sfx*2") -+ -+(define_insn_reservation "e5500_two" 2 -+ (and (eq_attr "type" "two") -+ (eq_attr "cpu" "ppce5500")) -+ "e5500_decode,e5500_decode+e5500_sfx,e5500_sfx") -+ -+(define_insn_reservation "e5500_three" 3 -+ (and (eq_attr "type" "three") -+ (eq_attr "cpu" "ppce5500")) -+ "e5500_decode,(e5500_decode+e5500_sfx)*2,e5500_sfx") -+ -+;; SFX - Mfcr. -+(define_insn_reservation "e5500_mfcr" 4 -+ (and (eq_attr "type" "mfcr") -+ (eq_attr "cpu" "ppce5500")) -+ "e5500_decode,e5500_sfx_0*4") -+ -+;; SFX - Mtcrf. -+(define_insn_reservation "e5500_mtcrf" 1 -+ (and (eq_attr "type" "mtcr") -+ (eq_attr "cpu" "ppce5500")) -+ "e5500_decode,e5500_sfx_0") -+ -+;; SFX - Mtjmpr. -+(define_insn_reservation "e5500_mtjmpr" 1 -+ (and (eq_attr "type" "mtjmpr,mfjmpr") -+ (eq_attr "cpu" "ppce5500")) -+ "e5500_decode,e5500_sfx") -+ -+;; CFX - Multiply. -+(define_insn_reservation "e5500_multiply" 4 -+ (and (eq_attr "type" "imul") -+ (eq_attr "cpu" "ppce5500")) -+ "e5500_decode,e5500_cfx_stage0,e5500_cfx_stage1") -+ -+(define_insn_reservation "e5500_multiply_i" 5 -+ (and (eq_attr "type" "imul2,imul3,imul_compare") -+ (eq_attr "cpu" "ppce5500")) -+ "e5500_decode,e5500_cfx_stage0,\ -+ e5500_cfx_stage0+e5500_cfx_stage1,e5500_cfx_stage1") -+ -+;; CFX - Divide. -+(define_insn_reservation "e5500_divide" 16 -+ (and (eq_attr "type" "idiv") -+ (eq_attr "cpu" "ppce5500")) -+ "e5500_decode,e5500_cfx_stage0+e5500_cfx_div,\ -+ e5500_cfx_div*15") -+ -+(define_insn_reservation "e5500_divide_d" 26 -+ (and (eq_attr "type" "ldiv") -+ (eq_attr "cpu" "ppce5500")) -+ "e5500_decode,e5500_cfx_stage0+e5500_cfx_div,\ -+ e5500_cfx_div*25") -+ -+;; LSU - Loads. -+(define_insn_reservation "e5500_load" 3 -+ (and (eq_attr "type" "load,load_ext,load_ext_u,load_ext_ux,load_ux,load_u,\ -+ load_l,sync") -+ (eq_attr "cpu" "ppce5500")) -+ "e5500_decode,e5500_lsu") -+ -+(define_insn_reservation "e5500_fpload" 4 -+ (and (eq_attr "type" "fpload,fpload_ux,fpload_u") -+ (eq_attr "cpu" "ppce5500")) -+ "e5500_decode,e5500_lsu") -+ -+;; LSU - Stores. -+(define_insn_reservation "e5500_store" 3 -+ (and (eq_attr "type" "store,store_ux,store_u,store_c") -+ (eq_attr "cpu" "ppce5500")) -+ "e5500_decode,e5500_lsu") -+ -+(define_insn_reservation "e5500_fpstore" 3 -+ (and (eq_attr "type" "fpstore,fpstore_ux,fpstore_u") -+ (eq_attr "cpu" "ppce5500")) -+ "e5500_decode,e5500_lsu") -+ -+;; FP. -+(define_insn_reservation "e5500_float" 7 -+ (and (eq_attr "type" "fpsimple,fp,fpcompare,dmul") -+ (eq_attr "cpu" "ppce5500")) -+ "e5500_decode,e5500_fpu") -+ -+(define_insn_reservation "e5500_sdiv" 20 -+ (and (eq_attr "type" "sdiv") -+ (eq_attr "cpu" "ppce5500")) -+ "e5500_decode,e5500_fpu*20") -+ -+(define_insn_reservation "e5500_ddiv" 35 -+ (and (eq_attr "type" "ddiv") -+ (eq_attr "cpu" "ppce5500")) -+ "e5500_decode,e5500_fpu*35") -+ -+;; BU. -+(define_insn_reservation "e5500_branch" 1 -+ (and (eq_attr "type" "jmpreg,branch,isync") -+ (eq_attr "cpu" "ppce5500")) -+ "e5500_decode,e5500_bu") -+ -+;; BU - CR logical. -+(define_insn_reservation "e5500_cr_logical" 1 -+ (and (eq_attr "type" "cr_logical,delayed_cr") -+ (eq_attr "cpu" "ppce5500")) -+ "e5500_decode,e5500_bu") -diff -ruN gcc-4.6.2-orig/gcc/config/rs6000/e6500.md gcc-4.6.2/gcc/config/rs6000/e6500.md ---- gcc-4.6.2-orig/gcc/config/rs6000/e6500.md 1969-12-31 18:00:00.000000000 -0600 -+++ gcc-4.6.2/gcc/config/rs6000/e6500.md 2012-03-06 12:16:25.573039002 -0600 -@@ -0,0 +1,213 @@ -+;; Pipeline description for Freescale PowerPC e6500 core. -+;; Copyright (C) 2011 Free Software Foundation, Inc. -+;; Contributed by Edmar Wienskoski (edmar@freescale.com) -+;; -+;; This file is part of GCC. -+;; -+;; GCC 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. -+;; -+;; GCC 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 GCC; see the file COPYING3. If not see -+;; . -+;; -+;; e6500 64-bit SFX(2), CFX, LSU, FPU, BU, VSFX, VCFX, VFPU, VPERM -+;; Max issue 3 insns/clock cycle (includes 1 branch) -+ -+(define_automaton "e6500_most,e6500_long,e6500_vec") -+(define_cpu_unit "e6500_decode_0,e6500_decode_1" "e6500_most") -+ -+;; SFX. -+(define_cpu_unit "e6500_sfx_0,e6500_sfx_1" "e6500_most") -+ -+;; CFX. -+(define_cpu_unit "e6500_cfx_stage0,e6500_cfx_stage1" "e6500_most") -+ -+;; Non-pipelined division. -+(define_cpu_unit "e6500_cfx_div" "e6500_long") -+ -+;; LSU. -+(define_cpu_unit "e6500_lsu" "e6500_most") -+ -+;; FPU. -+(define_cpu_unit "e6500_fpu" "e6500_long") -+ -+;; BU. -+(define_cpu_unit "e6500_bu" "e6500_most") -+ -+;; Altivec unit -+(define_cpu_unit "e6500_vec,e6500_vecperm" "e6500_vec") -+ -+;; The following units are used to make the automata deterministic. -+(define_cpu_unit "present_e6500_decode_0" "e6500_most") -+(define_cpu_unit "present_e6500_sfx_0" "e6500_most") -+(presence_set "present_e6500_decode_0" "e6500_decode_0") -+(presence_set "present_e6500_sfx_0" "e6500_sfx_0") -+ -+;; Some useful abbreviations. -+(define_reservation "e6500_decode" -+ "e6500_decode_0|e6500_decode_1+present_e6500_decode_0") -+(define_reservation "e6500_sfx" -+ "e6500_sfx_0|e6500_sfx_1+present_e6500_sfx_0") -+ -+;; SFX. -+(define_insn_reservation "e6500_sfx" 1 -+ (and (eq_attr "type" "integer,insert_word,insert_dword,delayed_compare,\ -+ shift,cntlz,exts") -+ (eq_attr "cpu" "ppce6500")) -+ "e6500_decode,e6500_sfx") -+ -+(define_insn_reservation "e6500_sfx2" 2 -+ (and (eq_attr "type" "cmp,compare,fast_compare,trap") -+ (eq_attr "cpu" "ppce6500")) -+ "e6500_decode,e6500_sfx") -+ -+(define_insn_reservation "e6500_delayed" 2 -+ (and (eq_attr "type" "var_shift_rotate,var_delayed_compare,popcnt") -+ (eq_attr "cpu" "ppce6500")) -+ "e6500_decode,e6500_sfx*2") -+ -+(define_insn_reservation "e6500_two" 2 -+ (and (eq_attr "type" "two") -+ (eq_attr "cpu" "ppce6500")) -+ "e6500_decode,e6500_decode+e6500_sfx,e6500_sfx") -+ -+(define_insn_reservation "e6500_three" 3 -+ (and (eq_attr "type" "three") -+ (eq_attr "cpu" "ppce6500")) -+ "e6500_decode,(e6500_decode+e6500_sfx)*2,e6500_sfx") -+ -+;; SFX - Mfcr. -+(define_insn_reservation "e6500_mfcr" 4 -+ (and (eq_attr "type" "mfcr") -+ (eq_attr "cpu" "ppce6500")) -+ "e6500_decode,e6500_sfx_0*4") -+ -+;; SFX - Mtcrf. -+(define_insn_reservation "e6500_mtcrf" 1 -+ (and (eq_attr "type" "mtcr") -+ (eq_attr "cpu" "ppce6500")) -+ "e6500_decode,e6500_sfx_0") -+ -+;; SFX - Mtjmpr. -+(define_insn_reservation "e6500_mtjmpr" 1 -+ (and (eq_attr "type" "mtjmpr,mfjmpr") -+ (eq_attr "cpu" "ppce6500")) -+ "e6500_decode,e6500_sfx") -+ -+;; CFX - Multiply. -+(define_insn_reservation "e6500_multiply" 4 -+ (and (eq_attr "type" "imul") -+ (eq_attr "cpu" "ppce6500")) -+ "e6500_decode,e6500_cfx_stage0,e6500_cfx_stage1") -+ -+(define_insn_reservation "e6500_multiply_i" 5 -+ (and (eq_attr "type" "imul2,imul3,imul_compare") -+ (eq_attr "cpu" "ppce6500")) -+ "e6500_decode,e6500_cfx_stage0,\ -+ e6500_cfx_stage0+e6500_cfx_stage1,e6500_cfx_stage1") -+ -+;; CFX - Divide. -+(define_insn_reservation "e6500_divide" 16 -+ (and (eq_attr "type" "idiv") -+ (eq_attr "cpu" "ppce6500")) -+ "e6500_decode,e6500_cfx_stage0+e6500_cfx_div,\ -+ e6500_cfx_div*15") -+ -+(define_insn_reservation "e6500_divide_d" 26 -+ (and (eq_attr "type" "ldiv") -+ (eq_attr "cpu" "ppce6500")) -+ "e6500_decode,e6500_cfx_stage0+e6500_cfx_div,\ -+ e6500_cfx_div*25") -+ -+;; LSU - Loads. -+(define_insn_reservation "e6500_load" 3 -+ (and (eq_attr "type" "load,load_ext,load_ext_u,load_ext_ux,load_ux,load_u,\ -+ load_l,sync") -+ (eq_attr "cpu" "ppce6500")) -+ "e6500_decode,e6500_lsu") -+ -+(define_insn_reservation "e6500_fpload" 4 -+ (and (eq_attr "type" "fpload,fpload_ux,fpload_u") -+ (eq_attr "cpu" "ppce6500")) -+ "e6500_decode,e6500_lsu") -+ -+(define_insn_reservation "e6500_vecload" 4 -+ (and (eq_attr "type" "vecload") -+ (eq_attr "cpu" "ppce6500")) -+ "e6500_decode,e6500_lsu") -+ -+;; LSU - Stores. -+(define_insn_reservation "e6500_store" 3 -+ (and (eq_attr "type" "store,store_ux,store_u,store_c") -+ (eq_attr "cpu" "ppce6500")) -+ "e6500_decode,e6500_lsu") -+ -+(define_insn_reservation "e6500_fpstore" 3 -+ (and (eq_attr "type" "fpstore,fpstore_ux,fpstore_u") -+ (eq_attr "cpu" "ppce6500")) -+ "e6500_decode,e6500_lsu") -+ -+(define_insn_reservation "e6500_vecstore" 4 -+ (and (eq_attr "type" "vecstore") -+ (eq_attr "cpu" "ppce6500")) -+ "e6500_decode,e6500_lsu") -+ -+;; FP. -+(define_insn_reservation "e6500_float" 7 -+ (and (eq_attr "type" "fpsimple,fp,fpcompare,dmul") -+ (eq_attr "cpu" "ppce6500")) -+ "e6500_decode,e6500_fpu") -+ -+(define_insn_reservation "e6500_sdiv" 20 -+ (and (eq_attr "type" "sdiv") -+ (eq_attr "cpu" "ppce6500")) -+ "e6500_decode,e6500_fpu*20") -+ -+(define_insn_reservation "e6500_ddiv" 35 -+ (and (eq_attr "type" "ddiv") -+ (eq_attr "cpu" "ppce6500")) -+ "e6500_decode,e6500_fpu*35") -+ -+;; BU. -+(define_insn_reservation "e6500_branch" 1 -+ (and (eq_attr "type" "jmpreg,branch,isync") -+ (eq_attr "cpu" "ppce6500")) -+ "e6500_decode,e6500_bu") -+ -+;; BU - CR logical. -+(define_insn_reservation "e6500_cr_logical" 1 -+ (and (eq_attr "type" "cr_logical,delayed_cr") -+ (eq_attr "cpu" "ppce6500")) -+ "e6500_decode,e6500_bu") -+ -+;; VSFX. -+(define_insn_reservation "e6500_vecsimple" 1 -+ (and (eq_attr "type" "vecsimple,veccmp") -+ (eq_attr "cpu" "ppce6500")) -+ "e6500_decode,e6500_vec") -+ -+;; VCFX. -+(define_insn_reservation "e6500_veccomplex" 4 -+ (and (eq_attr "type" "veccomplex") -+ (eq_attr "cpu" "ppce6500")) -+ "e6500_decode,e6500_vec") -+ -+;; VFPU. -+(define_insn_reservation "e6500_vecfloat" 6 -+ (and (eq_attr "type" "vecfloat") -+ (eq_attr "cpu" "ppce6500")) -+ "e6500_decode,e6500_vec") -+ -+;; VPERM. -+(define_insn_reservation "e6500_vecperm" 2 -+ (and (eq_attr "type" "vecperm") -+ (eq_attr "cpu" "ppce6500")) -+ "e6500_decode,e6500_vecperm") -diff -ruN gcc-4.6.2-orig/gcc/config/rs6000/rs6000-builtin.def gcc-4.6.2/gcc/config/rs6000/rs6000-builtin.def ---- gcc-4.6.2-orig/gcc/config/rs6000/rs6000-builtin.def 2011-02-21 15:38:21.000000000 -0600 -+++ gcc-4.6.2/gcc/config/rs6000/rs6000-builtin.def 2012-03-06 12:37:40.248039025 -0600 -@@ -224,6 +224,9 @@ - RS6000_BUILTIN(ALTIVEC_BUILTIN_LVEBX, RS6000_BTC_MEM) - RS6000_BUILTIN(ALTIVEC_BUILTIN_LVEHX, RS6000_BTC_MEM) - RS6000_BUILTIN(ALTIVEC_BUILTIN_LVEWX, RS6000_BTC_MEM) -+RS6000_BUILTIN(ALTIVEC_BUILTIN_LVEXBX, RS6000_BTC_MEM) -+RS6000_BUILTIN(ALTIVEC_BUILTIN_LVEXHX, RS6000_BTC_MEM) -+RS6000_BUILTIN(ALTIVEC_BUILTIN_LVEXWX, RS6000_BTC_MEM) - RS6000_BUILTIN(ALTIVEC_BUILTIN_LVXL, RS6000_BTC_MEM) - RS6000_BUILTIN(ALTIVEC_BUILTIN_LVX, RS6000_BTC_MEM) - RS6000_BUILTIN(ALTIVEC_BUILTIN_STVX, RS6000_BTC_MEM) -@@ -231,14 +234,30 @@ - RS6000_BUILTIN(ALTIVEC_BUILTIN_LVLXL, RS6000_BTC_MEM) - RS6000_BUILTIN(ALTIVEC_BUILTIN_LVRX, RS6000_BTC_MEM) - RS6000_BUILTIN(ALTIVEC_BUILTIN_LVRXL, RS6000_BTC_MEM) -+RS6000_BUILTIN(ALTIVEC_BUILTIN_LVTLX, RS6000_BTC_MEM) -+RS6000_BUILTIN(ALTIVEC_BUILTIN_LVTLXL, RS6000_BTC_MEM) -+RS6000_BUILTIN(ALTIVEC_BUILTIN_LVTRX, RS6000_BTC_MEM) -+RS6000_BUILTIN(ALTIVEC_BUILTIN_LVTRXL, RS6000_BTC_MEM) -+RS6000_BUILTIN(ALTIVEC_BUILTIN_LVSWX, RS6000_BTC_MEM) -+RS6000_BUILTIN(ALTIVEC_BUILTIN_LVSWXL, RS6000_BTC_MEM) -+RS6000_BUILTIN(ALTIVEC_BUILTIN_LVSM, RS6000_BTC_MEM) - RS6000_BUILTIN(ALTIVEC_BUILTIN_STVEBX, RS6000_BTC_MEM) - RS6000_BUILTIN(ALTIVEC_BUILTIN_STVEHX, RS6000_BTC_MEM) - RS6000_BUILTIN(ALTIVEC_BUILTIN_STVEWX, RS6000_BTC_MEM) -+RS6000_BUILTIN(ALTIVEC_BUILTIN_STVEXBX, RS6000_BTC_MEM) -+RS6000_BUILTIN(ALTIVEC_BUILTIN_STVEXHX, RS6000_BTC_MEM) -+RS6000_BUILTIN(ALTIVEC_BUILTIN_STVEXWX, RS6000_BTC_MEM) - RS6000_BUILTIN(ALTIVEC_BUILTIN_STVXL, RS6000_BTC_MEM) - RS6000_BUILTIN(ALTIVEC_BUILTIN_STVLX, RS6000_BTC_MEM) - RS6000_BUILTIN(ALTIVEC_BUILTIN_STVLXL, RS6000_BTC_MEM) - RS6000_BUILTIN(ALTIVEC_BUILTIN_STVRX, RS6000_BTC_MEM) - RS6000_BUILTIN(ALTIVEC_BUILTIN_STVRXL, RS6000_BTC_MEM) -+RS6000_BUILTIN(ALTIVEC_BUILTIN_STVFLX, RS6000_BTC_MEM) -+RS6000_BUILTIN(ALTIVEC_BUILTIN_STVFLXL, RS6000_BTC_MEM) -+RS6000_BUILTIN(ALTIVEC_BUILTIN_STVFRX, RS6000_BTC_MEM) -+RS6000_BUILTIN(ALTIVEC_BUILTIN_STVFRXL, RS6000_BTC_MEM) -+RS6000_BUILTIN(ALTIVEC_BUILTIN_STVSWX, RS6000_BTC_MEM) -+RS6000_BUILTIN(ALTIVEC_BUILTIN_STVSWXL, RS6000_BTC_MEM) - RS6000_BUILTIN(ALTIVEC_BUILTIN_VCMPBFP_P, RS6000_BTC_FP_PURE) - RS6000_BUILTIN(ALTIVEC_BUILTIN_VCMPEQFP_P, RS6000_BTC_FP_PURE) - RS6000_BUILTIN(ALTIVEC_BUILTIN_VCMPEQUB_P, RS6000_BTC_CONST) -@@ -275,6 +294,9 @@ - RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_EXT_V4SF, RS6000_BTC_CONST) - RS6000_BUILTIN(ALTIVEC_BUILTIN_COPYSIGN_V4SF, RS6000_BTC_CONST) - RS6000_BUILTIN(ALTIVEC_BUILTIN_VRECIPFP, RS6000_BTC_FP_PURE) -+RS6000_BUILTIN(ALTIVEC_BUILTIN_ABSDUB, RS6000_BTC_CONST) -+RS6000_BUILTIN(ALTIVEC_BUILTIN_ABSDUH, RS6000_BTC_CONST) -+RS6000_BUILTIN(ALTIVEC_BUILTIN_ABSDUW, RS6000_BTC_CONST) - - /* Altivec overloaded builtins. */ - /* For now, don't set the classification for overloaded functions. -@@ -286,6 +308,7 @@ - RS6000_BUILTIN(ALTIVEC_BUILTIN_VCMPGT_P, RS6000_BTC_MISC) - RS6000_BUILTIN(ALTIVEC_BUILTIN_VCMPGE_P, RS6000_BTC_MISC) - RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_ABS, RS6000_BTC_MISC) -+RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_ABSD, RS6000_BTC_MISC) - RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_ABSS, RS6000_BTC_MISC) - RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_ADD, RS6000_BTC_MISC) - RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_ADDC, RS6000_BTC_MISC) -@@ -321,10 +344,20 @@ - RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_LVEBX, RS6000_BTC_MISC) - RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_LVEHX, RS6000_BTC_MISC) - RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_LVEWX, RS6000_BTC_MISC) -+RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_LVEXBX, RS6000_BTC_MISC) -+RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_LVEXHX, RS6000_BTC_MISC) -+RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_LVEXWX, RS6000_BTC_MISC) - RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_LVLX, RS6000_BTC_MISC) - RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_LVLXL, RS6000_BTC_MISC) - RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_LVRX, RS6000_BTC_MISC) - RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_LVRXL, RS6000_BTC_MISC) -+RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_LVTLX, RS6000_BTC_MISC) -+RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_LVTLXL, RS6000_BTC_MISC) -+RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_LVTRX, RS6000_BTC_MISC) -+RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_LVTRXL, RS6000_BTC_MISC) -+RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_LVSWX, RS6000_BTC_MISC) -+RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_LVSWXL, RS6000_BTC_MISC) -+RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_LVSM, RS6000_BTC_MISC) - RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_LVSL, RS6000_BTC_MISC) - RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_LVSR, RS6000_BTC_MISC) - RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_MADD, RS6000_BTC_MISC) -@@ -389,10 +422,19 @@ - RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_STVEBX, RS6000_BTC_MISC) - RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_STVEHX, RS6000_BTC_MISC) - RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_STVEWX, RS6000_BTC_MISC) -+RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_STVEXBX, RS6000_BTC_MISC) -+RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_STVEXHX, RS6000_BTC_MISC) -+RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_STVEXWX, RS6000_BTC_MISC) - RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_STVLX, RS6000_BTC_MISC) - RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_STVLXL, RS6000_BTC_MISC) - RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_STVRX, RS6000_BTC_MISC) - RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_STVRXL, RS6000_BTC_MISC) -+RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_STVFLX, RS6000_BTC_MISC) -+RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_STVFLXL, RS6000_BTC_MISC) -+RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_STVFRX, RS6000_BTC_MISC) -+RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_STVFRXL, RS6000_BTC_MISC) -+RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_STVSWX, RS6000_BTC_MISC) -+RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_STVSWXL, RS6000_BTC_MISC) - RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_SUB, RS6000_BTC_MISC) - RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_SUBC, RS6000_BTC_MISC) - RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_SUBS, RS6000_BTC_MISC) -diff -ruN gcc-4.6.2-orig/gcc/config/rs6000/rs6000.c gcc-4.6.2/gcc/config/rs6000/rs6000.c ---- gcc-4.6.2-orig/gcc/config/rs6000/rs6000.c 2011-09-18 17:01:56.000000000 -0500 -+++ gcc-4.6.2/gcc/config/rs6000/rs6000.c 2012-03-06 12:44:04.689039002 -0600 -@@ -779,6 +779,44 @@ - 1, /* prefetch streams /*/ - }; - -+/* Instruction costs on PPCE5500 processors. */ -+static const -+struct processor_costs ppce5500_cost = { -+ COSTS_N_INSNS (5), /* mulsi */ -+ COSTS_N_INSNS (5), /* mulsi_const */ -+ COSTS_N_INSNS (5), /* mulsi_const9 */ -+ COSTS_N_INSNS (5), /* muldi */ -+ COSTS_N_INSNS (14), /* divsi */ -+ COSTS_N_INSNS (14), /* divdi */ -+ COSTS_N_INSNS (7), /* fp */ -+ COSTS_N_INSNS (10), /* dmul */ -+ COSTS_N_INSNS (36), /* sdiv */ -+ COSTS_N_INSNS (66), /* ddiv */ -+ 64, /* cache line size */ -+ 32, /* l1 cache */ -+ 128, /* l2 cache */ -+ 1, /* prefetch streams /*/ -+}; -+ -+/* Instruction costs on PPCE6500 processors. */ -+static const -+struct processor_costs ppce6500_cost = { -+ COSTS_N_INSNS (5), /* mulsi */ -+ COSTS_N_INSNS (5), /* mulsi_const */ -+ COSTS_N_INSNS (5), /* mulsi_const9 */ -+ COSTS_N_INSNS (5), /* muldi */ -+ COSTS_N_INSNS (14), /* divsi */ -+ COSTS_N_INSNS (14), /* divdi */ -+ COSTS_N_INSNS (7), /* fp */ -+ COSTS_N_INSNS (10), /* dmul */ -+ COSTS_N_INSNS (36), /* sdiv */ -+ COSTS_N_INSNS (66), /* ddiv */ -+ 64, /* cache line size */ -+ 32, /* l1 cache */ -+ 128, /* l2 cache */ -+ 1, /* prefetch streams /*/ -+}; -+ - /* Instruction costs on AppliedMicro Titan processors. */ - static const - struct processor_costs titan_cost = { -@@ -1690,7 +1728,7 @@ - | MASK_MFCRF | MASK_POPCNTB | MASK_FPRND | MASK_MULHW - | MASK_DLMZB | MASK_CMPB | MASK_MFPGPR | MASK_DFP - | MASK_POPCNTD | MASK_VSX | MASK_ISEL | MASK_NO_UPDATE -- | MASK_RECIP_PRECISION) -+ | MASK_RECIP_PRECISION | MASK_ALTIVEC2) - }; - - /* Masks for instructions set at various powerpc ISAs. */ -@@ -1785,6 +1823,12 @@ - | MASK_ISEL}, - {"e500mc64", PROCESSOR_PPCE500MC64, POWERPC_BASE_MASK | MASK_POWERPC64 - | MASK_PPC_GFXOPT | MASK_ISEL}, -+ {"e5500", PROCESSOR_PPCE5500, POWERPC_BASE_MASK | MASK_POWERPC64 -+ | MASK_PPC_GFXOPT | MASK_ISEL | MASK_CMPB | MASK_POPCNTB -+ | MASK_POPCNTD}, -+ {"e6500", PROCESSOR_PPCE6500, POWERPC_7400_MASK | MASK_POWERPC64 -+ | MASK_MFCRF | MASK_ISEL | MASK_CMPB | MASK_POPCNTB | MASK_POPCNTD -+ | MASK_ALTIVEC2}, - {"860", PROCESSOR_MPCCORE, POWERPC_BASE_MASK | MASK_SOFT_FLOAT}, - {"970", PROCESSOR_POWER4, - POWERPC_7400_MASK | MASK_PPC_GPOPT | MASK_MFCRF | MASK_POWERPC64}, -@@ -2742,13 +2786,19 @@ - : PROCESSOR_DEFAULT)); - - if (rs6000_cpu == PROCESSOR_PPCE300C2 || rs6000_cpu == PROCESSOR_PPCE300C3 -- || rs6000_cpu == PROCESSOR_PPCE500MC || rs6000_cpu == PROCESSOR_PPCE500MC64) -+ || rs6000_cpu == PROCESSOR_PPCE500MC || rs6000_cpu == PROCESSOR_PPCE500MC64 -+ || rs6000_cpu == PROCESSOR_PPCE5500) - { - if (TARGET_ALTIVEC) - error ("AltiVec not supported in this target"); - if (TARGET_SPE) - error ("SPE not supported in this target"); - } -+ if (rs6000_cpu == PROCESSOR_PPCE6500) -+ { -+ if (TARGET_SPE) -+ error ("SPE not supported in this target"); -+ } - - /* Disable Cell microcode if we are optimizing for the Cell - and not optimizing for size. */ -@@ -2843,9 +2893,16 @@ - user's opinion, though. */ - if (rs6000_block_move_inline_limit == 0 - && (rs6000_cpu == PROCESSOR_PPCE500MC -- || rs6000_cpu == PROCESSOR_PPCE500MC64)) -+ || rs6000_cpu == PROCESSOR_PPCE500MC64 -+ || rs6000_cpu == PROCESSOR_PPCE5500 -+ || rs6000_cpu == PROCESSOR_PPCE6500)) - rs6000_block_move_inline_limit = 128; - -+ /* Those machines does not have fsqrt instruction */ -+ if (rs6000_cpu == PROCESSOR_PPCE5500 -+ || rs6000_cpu == PROCESSOR_PPCE6500) -+ target_flags &= ~MASK_PPC_GPOPT; -+ - /* store_one_arg depends on expand_block_move to handle at least the - size of reg_parm_stack_space. */ - if (rs6000_block_move_inline_limit < (TARGET_POWERPC64 ? 64 : 32)) -@@ -2977,7 +3034,9 @@ - #endif - - if (TARGET_E500 || rs6000_cpu == PROCESSOR_PPCE500MC -- || rs6000_cpu == PROCESSOR_PPCE500MC64) -+ || rs6000_cpu == PROCESSOR_PPCE500MC64 -+ || rs6000_cpu == PROCESSOR_PPCE5500 -+ || rs6000_cpu == PROCESSOR_PPCE6500) - { - /* The e500 and e500mc do not have string instructions, and we set - MASK_STRING above when optimizing for size. */ -@@ -3024,7 +3083,9 @@ - || rs6000_cpu == PROCESSOR_POWER6 - || rs6000_cpu == PROCESSOR_POWER7 - || rs6000_cpu == PROCESSOR_PPCE500MC -- || rs6000_cpu == PROCESSOR_PPCE500MC64); -+ || rs6000_cpu == PROCESSOR_PPCE500MC64 -+ || rs6000_cpu == PROCESSOR_PPCE5500 -+ || rs6000_cpu == PROCESSOR_PPCE6500); - - /* Allow debug switches to override the above settings. These are set to -1 - in rs6000.opt to indicate the user hasn't directly set the switch. */ -@@ -3246,6 +3307,14 @@ - rs6000_cost = &ppce500mc64_cost; - break; - -+ case PROCESSOR_PPCE5500: -+ rs6000_cost = &ppce5500_cost; -+ break; -+ -+ case PROCESSOR_PPCE6500: -+ rs6000_cost = &ppce6500_cost; -+ break; -+ - case PROCESSOR_TITAN: - rs6000_cost = &titan_cost; - break; -@@ -10212,6 +10281,9 @@ - { MASK_ALTIVEC, CODE_FOR_addv8hi3, "__builtin_altivec_vadduhm", ALTIVEC_BUILTIN_VADDUHM }, - { MASK_ALTIVEC, CODE_FOR_addv4si3, "__builtin_altivec_vadduwm", ALTIVEC_BUILTIN_VADDUWM }, - { MASK_ALTIVEC, CODE_FOR_addv4sf3, "__builtin_altivec_vaddfp", ALTIVEC_BUILTIN_VADDFP }, -+ { MASK_ALTIVEC2, CODE_FOR_altivec_vabsdub, "__builtin_altivec_vabsdub", ALTIVEC_BUILTIN_ABSDUB }, -+ { MASK_ALTIVEC2, CODE_FOR_altivec_vabsduh, "__builtin_altivec_vabsduh", ALTIVEC_BUILTIN_ABSDUH }, -+ { MASK_ALTIVEC2, CODE_FOR_altivec_vabsduw, "__builtin_altivec_vabsduw", ALTIVEC_BUILTIN_ABSDUW }, - { MASK_ALTIVEC, CODE_FOR_altivec_vaddcuw, "__builtin_altivec_vaddcuw", ALTIVEC_BUILTIN_VADDCUW }, - { MASK_ALTIVEC, CODE_FOR_altivec_vaddubs, "__builtin_altivec_vaddubs", ALTIVEC_BUILTIN_VADDUBS }, - { MASK_ALTIVEC, CODE_FOR_altivec_vaddsbs, "__builtin_altivec_vaddsbs", ALTIVEC_BUILTIN_VADDSBS }, -@@ -10372,6 +10444,7 @@ - { MASK_VSX, CODE_FOR_vec_interleave_highv2df, "__builtin_vsx_mergeh_2df", VSX_BUILTIN_VEC_MERGEH_V2DF }, - { MASK_VSX, CODE_FOR_vec_interleave_highv2di, "__builtin_vsx_mergeh_2di", VSX_BUILTIN_VEC_MERGEH_V2DI }, - -+ { MASK_ALTIVEC2, CODE_FOR_nothing, "__builtin_vec_absd", ALTIVEC_BUILTIN_VEC_ABSD }, - { MASK_ALTIVEC|MASK_VSX, CODE_FOR_nothing, "__builtin_vec_add", ALTIVEC_BUILTIN_VEC_ADD }, - { MASK_ALTIVEC|MASK_VSX, CODE_FOR_nothing, "__builtin_vec_vaddfp", ALTIVEC_BUILTIN_VEC_VADDFP }, - { MASK_ALTIVEC, CODE_FOR_nothing, "__builtin_vec_vadduwm", ALTIVEC_BUILTIN_VEC_VADDUWM }, -@@ -11803,6 +11876,12 @@ - return altivec_expand_stv_builtin (CODE_FOR_altivec_stvehx, exp); - case ALTIVEC_BUILTIN_STVEWX: - return altivec_expand_stv_builtin (CODE_FOR_altivec_stvewx, exp); -+ case ALTIVEC_BUILTIN_STVEXBX: -+ return altivec_expand_stv_builtin (CODE_FOR_altivec_stvexbx, exp); -+ case ALTIVEC_BUILTIN_STVEXHX: -+ return altivec_expand_stv_builtin (CODE_FOR_altivec_stvexhx, exp); -+ case ALTIVEC_BUILTIN_STVEXWX: -+ return altivec_expand_stv_builtin (CODE_FOR_altivec_stvexwx, exp); - case ALTIVEC_BUILTIN_STVXL: - return altivec_expand_stv_builtin (CODE_FOR_altivec_stvxl, exp); - -@@ -11814,6 +11893,18 @@ - return altivec_expand_stv_builtin (CODE_FOR_altivec_stvrx, exp); - case ALTIVEC_BUILTIN_STVRXL: - return altivec_expand_stv_builtin (CODE_FOR_altivec_stvrxl, exp); -+ case ALTIVEC_BUILTIN_STVFLX: -+ return altivec_expand_stv_builtin (CODE_FOR_altivec_stvflx, exp); -+ case ALTIVEC_BUILTIN_STVFLXL: -+ return altivec_expand_stv_builtin (CODE_FOR_altivec_stvflxl, exp); -+ case ALTIVEC_BUILTIN_STVFRX: -+ return altivec_expand_stv_builtin (CODE_FOR_altivec_stvfrx, exp); -+ case ALTIVEC_BUILTIN_STVFRXL: -+ return altivec_expand_stv_builtin (CODE_FOR_altivec_stvfrxl, exp); -+ case ALTIVEC_BUILTIN_STVSWX: -+ return altivec_expand_stv_builtin (CODE_FOR_altivec_stvswx, exp); -+ case ALTIVEC_BUILTIN_STVSWXL: -+ return altivec_expand_stv_builtin (CODE_FOR_altivec_stvswxl, exp); - - case VSX_BUILTIN_STXVD2X_V2DF: - return altivec_expand_stv_builtin (CODE_FOR_vsx_store_v2df, exp); -@@ -11948,6 +12039,15 @@ - case ALTIVEC_BUILTIN_LVEWX: - return altivec_expand_lv_builtin (CODE_FOR_altivec_lvewx, - exp, target, false); -+ case ALTIVEC_BUILTIN_LVEXBX: -+ return altivec_expand_lv_builtin (CODE_FOR_altivec_lvexbx, -+ exp, target, false); -+ case ALTIVEC_BUILTIN_LVEXHX: -+ return altivec_expand_lv_builtin (CODE_FOR_altivec_lvexhx, -+ exp, target, false); -+ case ALTIVEC_BUILTIN_LVEXWX: -+ return altivec_expand_lv_builtin (CODE_FOR_altivec_lvexwx, -+ exp, target, false); - case ALTIVEC_BUILTIN_LVXL: - return altivec_expand_lv_builtin (CODE_FOR_altivec_lvxl, - exp, target, false); -@@ -11966,6 +12066,27 @@ - case ALTIVEC_BUILTIN_LVRXL: - return altivec_expand_lv_builtin (CODE_FOR_altivec_lvrxl, - exp, target, true); -+ case ALTIVEC_BUILTIN_LVTLX: -+ return altivec_expand_lv_builtin (CODE_FOR_altivec_lvtlx, -+ exp, target, true); -+ case ALTIVEC_BUILTIN_LVTLXL: -+ return altivec_expand_lv_builtin (CODE_FOR_altivec_lvtlxl, -+ exp, target, true); -+ case ALTIVEC_BUILTIN_LVTRX: -+ return altivec_expand_lv_builtin (CODE_FOR_altivec_lvtrx, -+ exp, target, true); -+ case ALTIVEC_BUILTIN_LVTRXL: -+ return altivec_expand_lv_builtin (CODE_FOR_altivec_lvtrxl, -+ exp, target, true); -+ case ALTIVEC_BUILTIN_LVSWX: -+ return altivec_expand_lv_builtin (CODE_FOR_altivec_lvswx, -+ exp, target, true); -+ case ALTIVEC_BUILTIN_LVSWXL: -+ return altivec_expand_lv_builtin (CODE_FOR_altivec_lvswxl, -+ exp, target, true); -+ case ALTIVEC_BUILTIN_LVSM: -+ return altivec_expand_lv_builtin (CODE_FOR_altivec_lvsm, -+ exp, target, true); - case VSX_BUILTIN_LXVD2X_V2DF: - return altivec_expand_lv_builtin (CODE_FOR_vsx_load_v2df, - exp, target, false); -@@ -13278,6 +13399,9 @@ - def_builtin (MASK_ALTIVEC, "__builtin_altivec_lvebx", v16qi_ftype_long_pcvoid, ALTIVEC_BUILTIN_LVEBX); - def_builtin (MASK_ALTIVEC, "__builtin_altivec_lvehx", v8hi_ftype_long_pcvoid, ALTIVEC_BUILTIN_LVEHX); - def_builtin (MASK_ALTIVEC, "__builtin_altivec_lvewx", v4si_ftype_long_pcvoid, ALTIVEC_BUILTIN_LVEWX); -+ def_builtin (MASK_ALTIVEC2, "__builtin_altivec_lvexbx", v16qi_ftype_long_pcvoid, ALTIVEC_BUILTIN_LVEXBX); -+ def_builtin (MASK_ALTIVEC2, "__builtin_altivec_lvexhx", v8hi_ftype_long_pcvoid, ALTIVEC_BUILTIN_LVEXHX); -+ def_builtin (MASK_ALTIVEC2, "__builtin_altivec_lvexwx", v4si_ftype_long_pcvoid, ALTIVEC_BUILTIN_LVEXWX); - def_builtin (MASK_ALTIVEC, "__builtin_altivec_lvxl", v4si_ftype_long_pcvoid, ALTIVEC_BUILTIN_LVXL); - def_builtin (MASK_ALTIVEC, "__builtin_altivec_lvx", v4si_ftype_long_pcvoid, ALTIVEC_BUILTIN_LVX); - def_builtin (MASK_ALTIVEC, "__builtin_altivec_stvx", void_ftype_v4si_long_pvoid, ALTIVEC_BUILTIN_STVX); -@@ -13285,6 +13409,9 @@ - def_builtin (MASK_ALTIVEC, "__builtin_altivec_stvxl", void_ftype_v4si_long_pvoid, ALTIVEC_BUILTIN_STVXL); - def_builtin (MASK_ALTIVEC, "__builtin_altivec_stvebx", void_ftype_v16qi_long_pvoid, ALTIVEC_BUILTIN_STVEBX); - def_builtin (MASK_ALTIVEC, "__builtin_altivec_stvehx", void_ftype_v8hi_long_pvoid, ALTIVEC_BUILTIN_STVEHX); -+ def_builtin (MASK_ALTIVEC2, "__builtin_altivec_stvexbx", void_ftype_v16qi_long_pvoid, ALTIVEC_BUILTIN_STVEXBX); -+ def_builtin (MASK_ALTIVEC2, "__builtin_altivec_stvexhx", void_ftype_v8hi_long_pvoid, ALTIVEC_BUILTIN_STVEXHX); -+ def_builtin (MASK_ALTIVEC2, "__builtin_altivec_stvexwx", void_ftype_v4si_long_pvoid, ALTIVEC_BUILTIN_STVEXWX); - def_builtin (MASK_ALTIVEC, "__builtin_vec_ld", opaque_ftype_long_pcvoid, ALTIVEC_BUILTIN_VEC_LD); - def_builtin (MASK_ALTIVEC, "__builtin_vec_lde", opaque_ftype_long_pcvoid, ALTIVEC_BUILTIN_VEC_LDE); - def_builtin (MASK_ALTIVEC, "__builtin_vec_ldl", opaque_ftype_long_pcvoid, ALTIVEC_BUILTIN_VEC_LDL); -@@ -13293,12 +13420,18 @@ - def_builtin (MASK_ALTIVEC, "__builtin_vec_lvebx", v16qi_ftype_long_pcvoid, ALTIVEC_BUILTIN_VEC_LVEBX); - def_builtin (MASK_ALTIVEC, "__builtin_vec_lvehx", v8hi_ftype_long_pcvoid, ALTIVEC_BUILTIN_VEC_LVEHX); - def_builtin (MASK_ALTIVEC, "__builtin_vec_lvewx", v4si_ftype_long_pcvoid, ALTIVEC_BUILTIN_VEC_LVEWX); -+ def_builtin (MASK_ALTIVEC2, "__builtin_vec_lvexbx", v16qi_ftype_long_pcvoid, ALTIVEC_BUILTIN_VEC_LVEXBX); -+ def_builtin (MASK_ALTIVEC2, "__builtin_vec_lvexhx", v8hi_ftype_long_pcvoid, ALTIVEC_BUILTIN_VEC_LVEXHX); -+ def_builtin (MASK_ALTIVEC2, "__builtin_vec_lvexwx", v4si_ftype_long_pcvoid, ALTIVEC_BUILTIN_VEC_LVEXWX); - def_builtin (MASK_ALTIVEC, "__builtin_vec_st", void_ftype_opaque_long_pvoid, ALTIVEC_BUILTIN_VEC_ST); - def_builtin (MASK_ALTIVEC, "__builtin_vec_ste", void_ftype_opaque_long_pvoid, ALTIVEC_BUILTIN_VEC_STE); - def_builtin (MASK_ALTIVEC, "__builtin_vec_stl", void_ftype_opaque_long_pvoid, ALTIVEC_BUILTIN_VEC_STL); - def_builtin (MASK_ALTIVEC, "__builtin_vec_stvewx", void_ftype_opaque_long_pvoid, ALTIVEC_BUILTIN_VEC_STVEWX); - def_builtin (MASK_ALTIVEC, "__builtin_vec_stvebx", void_ftype_opaque_long_pvoid, ALTIVEC_BUILTIN_VEC_STVEBX); - def_builtin (MASK_ALTIVEC, "__builtin_vec_stvehx", void_ftype_opaque_long_pvoid, ALTIVEC_BUILTIN_VEC_STVEHX); -+ def_builtin (MASK_ALTIVEC2, "__builtin_vec_stvexwx", void_ftype_opaque_long_pvoid, ALTIVEC_BUILTIN_VEC_STVEXWX); -+ def_builtin (MASK_ALTIVEC2, "__builtin_vec_stvexbx", void_ftype_opaque_long_pvoid, ALTIVEC_BUILTIN_VEC_STVEXBX); -+ def_builtin (MASK_ALTIVEC2, "__builtin_vec_stvexhx", void_ftype_opaque_long_pvoid, ALTIVEC_BUILTIN_VEC_STVEXHX); - - def_builtin (MASK_VSX, "__builtin_vsx_lxvd2x_v2df", v2df_ftype_long_pcvoid, - VSX_BUILTIN_LXVD2X_V2DF); -@@ -13351,6 +13484,33 @@ - def_builtin (MASK_ALTIVEC, "__builtin_vec_stvrx", void_ftype_v16qi_long_pvoid, ALTIVEC_BUILTIN_VEC_STVRX); - def_builtin (MASK_ALTIVEC, "__builtin_vec_stvrxl", void_ftype_v16qi_long_pvoid, ALTIVEC_BUILTIN_VEC_STVRXL); - } -+ def_builtin (MASK_ALTIVEC2, "__builtin_altivec_lvtlx", v16qi_ftype_long_pcvoid, ALTIVEC_BUILTIN_LVTLX); -+ def_builtin (MASK_ALTIVEC2, "__builtin_altivec_lvtlxl", v16qi_ftype_long_pcvoid, ALTIVEC_BUILTIN_LVTLXL); -+ def_builtin (MASK_ALTIVEC2, "__builtin_altivec_lvtrx", v16qi_ftype_long_pcvoid, ALTIVEC_BUILTIN_LVTRX); -+ def_builtin (MASK_ALTIVEC2, "__builtin_altivec_lvtrxl", v16qi_ftype_long_pcvoid, ALTIVEC_BUILTIN_LVTRXL); -+ def_builtin (MASK_ALTIVEC2, "__builtin_vec_lvtlx", v16qi_ftype_long_pcvoid, ALTIVEC_BUILTIN_VEC_LVTLX); -+ def_builtin (MASK_ALTIVEC2, "__builtin_vec_lvtlxl", v16qi_ftype_long_pcvoid, ALTIVEC_BUILTIN_VEC_LVTLXL); -+ def_builtin (MASK_ALTIVEC2, "__builtin_vec_lvtrx", v16qi_ftype_long_pcvoid, ALTIVEC_BUILTIN_VEC_LVTRX); -+ def_builtin (MASK_ALTIVEC2, "__builtin_vec_lvtrxl", v16qi_ftype_long_pcvoid, ALTIVEC_BUILTIN_VEC_LVTRXL); -+ def_builtin (MASK_ALTIVEC2, "__builtin_altivec_stvflx", void_ftype_v16qi_long_pvoid, ALTIVEC_BUILTIN_STVFLX); -+ def_builtin (MASK_ALTIVEC2, "__builtin_altivec_stvflxl", void_ftype_v16qi_long_pvoid, ALTIVEC_BUILTIN_STVFLXL); -+ def_builtin (MASK_ALTIVEC2, "__builtin_altivec_stvfrx", void_ftype_v16qi_long_pvoid, ALTIVEC_BUILTIN_STVFRX); -+ def_builtin (MASK_ALTIVEC2, "__builtin_altivec_stvfrxl", void_ftype_v16qi_long_pvoid, ALTIVEC_BUILTIN_STVFRXL); -+ def_builtin (MASK_ALTIVEC2, "__builtin_vec_stvflx", void_ftype_v16qi_long_pvoid, ALTIVEC_BUILTIN_VEC_STVFLX); -+ def_builtin (MASK_ALTIVEC2, "__builtin_vec_stvflxl", void_ftype_v16qi_long_pvoid, ALTIVEC_BUILTIN_VEC_STVFLXL); -+ def_builtin (MASK_ALTIVEC2, "__builtin_vec_stvfrx", void_ftype_v16qi_long_pvoid, ALTIVEC_BUILTIN_VEC_STVFRX); -+ def_builtin (MASK_ALTIVEC2, "__builtin_vec_stvfrxl", void_ftype_v16qi_long_pvoid, ALTIVEC_BUILTIN_VEC_STVFRXL); -+ def_builtin (MASK_ALTIVEC2, "__builtin_altivec_lvswx", v16qi_ftype_long_pcvoid, ALTIVEC_BUILTIN_LVSWX); -+ def_builtin (MASK_ALTIVEC2, "__builtin_altivec_lvswxl", v16qi_ftype_long_pcvoid, ALTIVEC_BUILTIN_LVSWXL); -+ def_builtin (MASK_ALTIVEC2, "__builtin_vec_lvswx", v16qi_ftype_long_pcvoid, ALTIVEC_BUILTIN_VEC_LVSWX); -+ def_builtin (MASK_ALTIVEC2, "__builtin_vec_lvswxl", v16qi_ftype_long_pcvoid, ALTIVEC_BUILTIN_VEC_LVSWXL); -+ def_builtin (MASK_ALTIVEC2, "__builtin_altivec_lvsm", v16qi_ftype_long_pcvoid, ALTIVEC_BUILTIN_LVSM); -+ def_builtin (MASK_ALTIVEC2, "__builtin_vec_lvsm", v16qi_ftype_long_pcvoid, ALTIVEC_BUILTIN_VEC_LVSM); -+ def_builtin (MASK_ALTIVEC2, "__builtin_altivec_stvswx", void_ftype_v16qi_long_pvoid, ALTIVEC_BUILTIN_STVSWX); -+ def_builtin (MASK_ALTIVEC2, "__builtin_altivec_stvswxl", void_ftype_v16qi_long_pvoid, ALTIVEC_BUILTIN_STVSWXL); -+ def_builtin (MASK_ALTIVEC2, "__builtin_vec_stvswx", void_ftype_v16qi_long_pvoid, ALTIVEC_BUILTIN_VEC_STVSWX); -+ def_builtin (MASK_ALTIVEC2, "__builtin_vec_stvswxl", void_ftype_v16qi_long_pvoid, ALTIVEC_BUILTIN_VEC_STVSWXL); -+ - def_builtin (MASK_ALTIVEC, "__builtin_vec_step", int_ftype_opaque, ALTIVEC_BUILTIN_VEC_STEP); - def_builtin (MASK_ALTIVEC, "__builtin_vec_splats", opaque_ftype_opaque, ALTIVEC_BUILTIN_VEC_SPLATS); - def_builtin (MASK_ALTIVEC, "__builtin_vec_promote", opaque_ftype_opaque, ALTIVEC_BUILTIN_VEC_PROMOTE); -@@ -13668,6 +13828,9 @@ - case ALTIVEC_BUILTIN_VMULEUH_UNS: - case ALTIVEC_BUILTIN_VMULOUB_UNS: - case ALTIVEC_BUILTIN_VMULOUH_UNS: -+ case ALTIVEC_BUILTIN_ABSDUB: -+ case ALTIVEC_BUILTIN_ABSDUH: -+ case ALTIVEC_BUILTIN_ABSDUW: - h.uns_p[0] = 1; - h.uns_p[1] = 1; - h.uns_p[2] = 1; -@@ -23250,6 +23413,7 @@ - || rs6000_cpu_attr == CPU_PPC750 - || rs6000_cpu_attr == CPU_PPC7400 - || rs6000_cpu_attr == CPU_PPC7450 -+ || rs6000_cpu_attr == CPU_PPCE5500 - || rs6000_cpu_attr == CPU_POWER4 - || rs6000_cpu_attr == CPU_POWER5 - || rs6000_cpu_attr == CPU_POWER7 -@@ -23794,6 +23958,8 @@ - case CPU_PPCE300C3: - case CPU_PPCE500MC: - case CPU_PPCE500MC64: -+ case CPU_PPCE5500: -+ case CPU_PPCE6500: - case CPU_TITAN: - return 2; - case CPU_RIOS2: -diff -ruN gcc-4.6.2-orig/gcc/config/rs6000/rs6000-c.c gcc-4.6.2/gcc/config/rs6000/rs6000-c.c ---- gcc-4.6.2-orig/gcc/config/rs6000/rs6000-c.c 2011-02-02 23:42:19.000000000 -0600 -+++ gcc-4.6.2/gcc/config/rs6000/rs6000-c.c 2012-03-06 12:54:55.964038969 -0600 -@@ -310,6 +310,8 @@ - /* Enable context-sensitive macros. */ - cpp_get_callbacks (pfile)->macro_to_expand = rs6000_macro_to_expand; - } -+ if (TARGET_ALTIVEC2) -+ builtin_define ("__ALTIVEC2__"); - } - if (rs6000_cpu == PROCESSOR_CELL) - builtin_define ("__PPU__"); -@@ -569,6 +571,24 @@ - RS6000_BTI_bool_V8HI, RS6000_BTI_bool_V16QI, 0, 0 }, - - /* Binary AltiVec/VSX builtins. */ -+ { ALTIVEC_BUILTIN_VEC_ABSD, ALTIVEC_BUILTIN_ABSDUB, -+ RS6000_BTI_unsigned_V16QI, RS6000_BTI_bool_V16QI, RS6000_BTI_unsigned_V16QI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_ABSD, ALTIVEC_BUILTIN_ABSDUB, -+ RS6000_BTI_unsigned_V16QI, RS6000_BTI_unsigned_V16QI, RS6000_BTI_unsigned_V16QI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_ABSD, ALTIVEC_BUILTIN_ABSDUB, -+ RS6000_BTI_unsigned_V16QI, RS6000_BTI_unsigned_V16QI, RS6000_BTI_bool_V16QI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_ABSD, ALTIVEC_BUILTIN_ABSDUH, -+ RS6000_BTI_unsigned_V8HI, RS6000_BTI_bool_V8HI, RS6000_BTI_unsigned_V8HI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_ABSD, ALTIVEC_BUILTIN_ABSDUH, -+ RS6000_BTI_unsigned_V8HI, RS6000_BTI_unsigned_V8HI, RS6000_BTI_unsigned_V8HI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_ABSD, ALTIVEC_BUILTIN_ABSDUH, -+ RS6000_BTI_unsigned_V8HI, RS6000_BTI_unsigned_V8HI, RS6000_BTI_bool_V8HI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_ABSD, ALTIVEC_BUILTIN_ABSDUW, -+ RS6000_BTI_unsigned_V4SI, RS6000_BTI_bool_V4SI, RS6000_BTI_unsigned_V4SI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_ABSD, ALTIVEC_BUILTIN_ABSDUW, -+ RS6000_BTI_unsigned_V4SI, RS6000_BTI_unsigned_V4SI, RS6000_BTI_unsigned_V4SI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_ABSD, ALTIVEC_BUILTIN_ABSDUW, -+ RS6000_BTI_unsigned_V4SI, RS6000_BTI_unsigned_V4SI, RS6000_BTI_bool_V4SI, 0 }, - { ALTIVEC_BUILTIN_VEC_ADD, ALTIVEC_BUILTIN_VADDUBM, - RS6000_BTI_V16QI, RS6000_BTI_bool_V16QI, RS6000_BTI_V16QI, 0 }, - { ALTIVEC_BUILTIN_VEC_ADD, ALTIVEC_BUILTIN_VADDUBM, -@@ -1084,6 +1104,24 @@ - RS6000_BTI_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_INTQI, 0 }, - { ALTIVEC_BUILTIN_VEC_LVEBX, ALTIVEC_BUILTIN_LVEBX, - RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTQI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVEXWX, ALTIVEC_BUILTIN_LVEXWX, -+ RS6000_BTI_V4SF, RS6000_BTI_INTSI, ~RS6000_BTI_float, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVEXWX, ALTIVEC_BUILTIN_LVEXWX, -+ RS6000_BTI_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_INTSI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVEXWX, ALTIVEC_BUILTIN_LVEXWX, -+ RS6000_BTI_unsigned_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTSI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVEXWX, ALTIVEC_BUILTIN_LVEXWX, -+ RS6000_BTI_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_long, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVEXWX, ALTIVEC_BUILTIN_LVEXWX, -+ RS6000_BTI_unsigned_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_long, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVEXHX, ALTIVEC_BUILTIN_LVEXHX, -+ RS6000_BTI_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_INTHI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVEXHX, ALTIVEC_BUILTIN_LVEXHX, -+ RS6000_BTI_unsigned_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTHI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVEXBX, ALTIVEC_BUILTIN_LVEXBX, -+ RS6000_BTI_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_INTQI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVEXBX, ALTIVEC_BUILTIN_LVEXBX, -+ RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTQI, 0 }, - { ALTIVEC_BUILTIN_VEC_LDL, ALTIVEC_BUILTIN_LVXL, - RS6000_BTI_V4SF, RS6000_BTI_INTSI, ~RS6000_BTI_V4SF, 0 }, - { ALTIVEC_BUILTIN_VEC_LDL, ALTIVEC_BUILTIN_LVXL, -@@ -1336,6 +1374,258 @@ - RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V16QI, 0 }, - { ALTIVEC_BUILTIN_VEC_LVRXL, ALTIVEC_BUILTIN_LVRXL, - RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTQI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVTLX, ALTIVEC_BUILTIN_LVTLX, -+ RS6000_BTI_V4SF, RS6000_BTI_INTSI, ~RS6000_BTI_V4SF, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVTLX, ALTIVEC_BUILTIN_LVTLX, -+ RS6000_BTI_V4SF, RS6000_BTI_INTSI, ~RS6000_BTI_float, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVTLX, ALTIVEC_BUILTIN_LVTLX, -+ RS6000_BTI_bool_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V4SI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVTLX, ALTIVEC_BUILTIN_LVTLX, -+ RS6000_BTI_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_V4SI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVTLX, ALTIVEC_BUILTIN_LVTLX, -+ RS6000_BTI_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_INTSI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVTLX, ALTIVEC_BUILTIN_LVTLX, -+ RS6000_BTI_unsigned_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V4SI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVTLX, ALTIVEC_BUILTIN_LVTLX, -+ RS6000_BTI_unsigned_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTSI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVTLX, ALTIVEC_BUILTIN_LVTLX, -+ RS6000_BTI_bool_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V8HI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVTLX, ALTIVEC_BUILTIN_LVTLX, -+ RS6000_BTI_pixel_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_pixel_V8HI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVTLX, ALTIVEC_BUILTIN_LVTLX, -+ RS6000_BTI_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_V8HI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVTLX, ALTIVEC_BUILTIN_LVTLX, -+ RS6000_BTI_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_INTHI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVTLX, ALTIVEC_BUILTIN_LVTLX, -+ RS6000_BTI_unsigned_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V8HI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVTLX, ALTIVEC_BUILTIN_LVTLX, -+ RS6000_BTI_unsigned_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTHI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVTLX, ALTIVEC_BUILTIN_LVTLX, -+ RS6000_BTI_bool_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V16QI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVTLX, ALTIVEC_BUILTIN_LVTLX, -+ RS6000_BTI_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_V16QI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVTLX, ALTIVEC_BUILTIN_LVTLX, -+ RS6000_BTI_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_INTQI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVTLX, ALTIVEC_BUILTIN_LVTLX, -+ RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V16QI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVTLX, ALTIVEC_BUILTIN_LVTLX, -+ RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTQI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVTLXL, ALTIVEC_BUILTIN_LVTLXL, -+ RS6000_BTI_V4SF, RS6000_BTI_INTSI, ~RS6000_BTI_V4SF, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVTLXL, ALTIVEC_BUILTIN_LVTLXL, -+ RS6000_BTI_V4SF, RS6000_BTI_INTSI, ~RS6000_BTI_float, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVTLXL, ALTIVEC_BUILTIN_LVTLXL, -+ RS6000_BTI_bool_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V4SI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVTLXL, ALTIVEC_BUILTIN_LVTLXL, -+ RS6000_BTI_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_V4SI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVTLXL, ALTIVEC_BUILTIN_LVTLXL, -+ RS6000_BTI_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_INTSI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVTLXL, ALTIVEC_BUILTIN_LVTLXL, -+ RS6000_BTI_unsigned_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V4SI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVTLXL, ALTIVEC_BUILTIN_LVTLXL, -+ RS6000_BTI_unsigned_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTSI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVTLXL, ALTIVEC_BUILTIN_LVTLXL, -+ RS6000_BTI_bool_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V8HI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVTLXL, ALTIVEC_BUILTIN_LVTLXL, -+ RS6000_BTI_pixel_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_pixel_V8HI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVTLXL, ALTIVEC_BUILTIN_LVTLXL, -+ RS6000_BTI_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_V8HI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVTLXL, ALTIVEC_BUILTIN_LVTLXL, -+ RS6000_BTI_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_INTHI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVTLXL, ALTIVEC_BUILTIN_LVTLXL, -+ RS6000_BTI_unsigned_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V8HI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVTLXL, ALTIVEC_BUILTIN_LVTLXL, -+ RS6000_BTI_unsigned_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTHI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVTLXL, ALTIVEC_BUILTIN_LVTLXL, -+ RS6000_BTI_bool_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V16QI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVTLXL, ALTIVEC_BUILTIN_LVTLXL, -+ RS6000_BTI_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_V16QI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVTLXL, ALTIVEC_BUILTIN_LVTLXL, -+ RS6000_BTI_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_INTQI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVTLXL, ALTIVEC_BUILTIN_LVTLXL, -+ RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V16QI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVTLXL, ALTIVEC_BUILTIN_LVTLXL, -+ RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTQI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVTRX, ALTIVEC_BUILTIN_LVTRX, -+ RS6000_BTI_V4SF, RS6000_BTI_INTSI, ~RS6000_BTI_V4SF, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVTRX, ALTIVEC_BUILTIN_LVTRX, -+ RS6000_BTI_V4SF, RS6000_BTI_INTSI, ~RS6000_BTI_float, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVTRX, ALTIVEC_BUILTIN_LVTRX, -+ RS6000_BTI_bool_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V4SI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVTRX, ALTIVEC_BUILTIN_LVTRX, -+ RS6000_BTI_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_V4SI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVTRX, ALTIVEC_BUILTIN_LVTRX, -+ RS6000_BTI_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_INTSI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVTRX, ALTIVEC_BUILTIN_LVTRX, -+ RS6000_BTI_unsigned_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V4SI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVTRX, ALTIVEC_BUILTIN_LVTRX, -+ RS6000_BTI_unsigned_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTSI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVTRX, ALTIVEC_BUILTIN_LVTRX, -+ RS6000_BTI_bool_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V8HI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVTRX, ALTIVEC_BUILTIN_LVTRX, -+ RS6000_BTI_pixel_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_pixel_V8HI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVTRX, ALTIVEC_BUILTIN_LVTRX, -+ RS6000_BTI_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_V8HI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVTRX, ALTIVEC_BUILTIN_LVTRX, -+ RS6000_BTI_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_INTHI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVTRX, ALTIVEC_BUILTIN_LVTRX, -+ RS6000_BTI_unsigned_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V8HI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVTRX, ALTIVEC_BUILTIN_LVTRX, -+ RS6000_BTI_unsigned_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTHI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVTRX, ALTIVEC_BUILTIN_LVTRX, -+ RS6000_BTI_bool_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V16QI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVTRX, ALTIVEC_BUILTIN_LVTRX, -+ RS6000_BTI_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_V16QI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVTRX, ALTIVEC_BUILTIN_LVTRX, -+ RS6000_BTI_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_INTQI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVTRX, ALTIVEC_BUILTIN_LVTRX, -+ RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V16QI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVTRX, ALTIVEC_BUILTIN_LVTRX, -+ RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTQI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVTRXL, ALTIVEC_BUILTIN_LVTRXL, -+ RS6000_BTI_V4SF, RS6000_BTI_INTSI, ~RS6000_BTI_V4SF, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVTRXL, ALTIVEC_BUILTIN_LVTRXL, -+ RS6000_BTI_V4SF, RS6000_BTI_INTSI, ~RS6000_BTI_float, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVTRXL, ALTIVEC_BUILTIN_LVTRXL, -+ RS6000_BTI_bool_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V4SI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVTRXL, ALTIVEC_BUILTIN_LVTRXL, -+ RS6000_BTI_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_V4SI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVTRXL, ALTIVEC_BUILTIN_LVTRXL, -+ RS6000_BTI_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_INTSI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVTRXL, ALTIVEC_BUILTIN_LVTRXL, -+ RS6000_BTI_unsigned_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V4SI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVTRXL, ALTIVEC_BUILTIN_LVTRXL, -+ RS6000_BTI_unsigned_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTSI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVTRXL, ALTIVEC_BUILTIN_LVTRXL, -+ RS6000_BTI_bool_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V8HI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVTRXL, ALTIVEC_BUILTIN_LVTRXL, -+ RS6000_BTI_pixel_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_pixel_V8HI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVTRXL, ALTIVEC_BUILTIN_LVTRXL, -+ RS6000_BTI_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_V8HI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVTRXL, ALTIVEC_BUILTIN_LVTRXL, -+ RS6000_BTI_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_INTHI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVTRXL, ALTIVEC_BUILTIN_LVTRXL, -+ RS6000_BTI_unsigned_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V8HI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVTRXL, ALTIVEC_BUILTIN_LVTRXL, -+ RS6000_BTI_unsigned_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTHI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVTRXL, ALTIVEC_BUILTIN_LVTRXL, -+ RS6000_BTI_bool_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V16QI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVTRXL, ALTIVEC_BUILTIN_LVTRXL, -+ RS6000_BTI_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_V16QI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVTRXL, ALTIVEC_BUILTIN_LVTRXL, -+ RS6000_BTI_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_INTQI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVTRXL, ALTIVEC_BUILTIN_LVTRXL, -+ RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V16QI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVTRXL, ALTIVEC_BUILTIN_LVTRXL, -+ RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTQI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVSWX, ALTIVEC_BUILTIN_LVSWX, -+ RS6000_BTI_V4SF, RS6000_BTI_INTSI, ~RS6000_BTI_V4SF, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVSWX, ALTIVEC_BUILTIN_LVSWX, -+ RS6000_BTI_V4SF, RS6000_BTI_INTSI, ~RS6000_BTI_float, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVSWX, ALTIVEC_BUILTIN_LVSWX, -+ RS6000_BTI_bool_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V4SI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVSWX, ALTIVEC_BUILTIN_LVSWX, -+ RS6000_BTI_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_V4SI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVSWX, ALTIVEC_BUILTIN_LVSWX, -+ RS6000_BTI_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_INTSI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVSWX, ALTIVEC_BUILTIN_LVSWX, -+ RS6000_BTI_unsigned_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V4SI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVSWX, ALTIVEC_BUILTIN_LVSWX, -+ RS6000_BTI_unsigned_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTSI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVSWX, ALTIVEC_BUILTIN_LVSWX, -+ RS6000_BTI_bool_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V8HI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVSWX, ALTIVEC_BUILTIN_LVSWX, -+ RS6000_BTI_pixel_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_pixel_V8HI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVSWX, ALTIVEC_BUILTIN_LVSWX, -+ RS6000_BTI_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_V8HI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVSWX, ALTIVEC_BUILTIN_LVSWX, -+ RS6000_BTI_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_INTHI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVSWX, ALTIVEC_BUILTIN_LVSWX, -+ RS6000_BTI_unsigned_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V8HI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVSWX, ALTIVEC_BUILTIN_LVSWX, -+ RS6000_BTI_unsigned_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTHI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVSWX, ALTIVEC_BUILTIN_LVSWX, -+ RS6000_BTI_bool_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V16QI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVSWX, ALTIVEC_BUILTIN_LVSWX, -+ RS6000_BTI_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_V16QI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVSWX, ALTIVEC_BUILTIN_LVSWX, -+ RS6000_BTI_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_INTQI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVSWX, ALTIVEC_BUILTIN_LVSWX, -+ RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V16QI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVSWX, ALTIVEC_BUILTIN_LVSWX, -+ RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTQI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVSWXL, ALTIVEC_BUILTIN_LVSWXL, -+ RS6000_BTI_V4SF, RS6000_BTI_INTSI, ~RS6000_BTI_V4SF, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVSWXL, ALTIVEC_BUILTIN_LVSWXL, -+ RS6000_BTI_V4SF, RS6000_BTI_INTSI, ~RS6000_BTI_float, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVSWXL, ALTIVEC_BUILTIN_LVSWXL, -+ RS6000_BTI_bool_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V4SI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVSWXL, ALTIVEC_BUILTIN_LVSWXL, -+ RS6000_BTI_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_V4SI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVSWXL, ALTIVEC_BUILTIN_LVSWXL, -+ RS6000_BTI_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_INTSI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVSWXL, ALTIVEC_BUILTIN_LVSWXL, -+ RS6000_BTI_unsigned_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V4SI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVSWXL, ALTIVEC_BUILTIN_LVSWXL, -+ RS6000_BTI_unsigned_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTSI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVSWXL, ALTIVEC_BUILTIN_LVSWXL, -+ RS6000_BTI_bool_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V8HI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVSWXL, ALTIVEC_BUILTIN_LVSWXL, -+ RS6000_BTI_pixel_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_pixel_V8HI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVSWXL, ALTIVEC_BUILTIN_LVSWXL, -+ RS6000_BTI_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_V8HI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVSWXL, ALTIVEC_BUILTIN_LVSWXL, -+ RS6000_BTI_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_INTHI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVSWXL, ALTIVEC_BUILTIN_LVSWXL, -+ RS6000_BTI_unsigned_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V8HI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVSWXL, ALTIVEC_BUILTIN_LVSWXL, -+ RS6000_BTI_unsigned_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTHI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVSWXL, ALTIVEC_BUILTIN_LVSWXL, -+ RS6000_BTI_bool_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V16QI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVSWXL, ALTIVEC_BUILTIN_LVSWXL, -+ RS6000_BTI_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_V16QI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVSWXL, ALTIVEC_BUILTIN_LVSWXL, -+ RS6000_BTI_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_INTQI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVSWXL, ALTIVEC_BUILTIN_LVSWXL, -+ RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V16QI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVSWXL, ALTIVEC_BUILTIN_LVSWXL, -+ RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTQI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVSM, ALTIVEC_BUILTIN_LVSM, -+ RS6000_BTI_V4SF, RS6000_BTI_INTSI, ~RS6000_BTI_V4SF, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVSM, ALTIVEC_BUILTIN_LVSM, -+ RS6000_BTI_V4SF, RS6000_BTI_INTSI, ~RS6000_BTI_float, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVSM, ALTIVEC_BUILTIN_LVSM, -+ RS6000_BTI_bool_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V4SI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVSM, ALTIVEC_BUILTIN_LVSM, -+ RS6000_BTI_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_V4SI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVSM, ALTIVEC_BUILTIN_LVSM, -+ RS6000_BTI_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_INTSI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVSM, ALTIVEC_BUILTIN_LVSM, -+ RS6000_BTI_unsigned_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V4SI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVSM, ALTIVEC_BUILTIN_LVSM, -+ RS6000_BTI_unsigned_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTSI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVSM, ALTIVEC_BUILTIN_LVSM, -+ RS6000_BTI_bool_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V8HI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVSM, ALTIVEC_BUILTIN_LVSM, -+ RS6000_BTI_pixel_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_pixel_V8HI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVSM, ALTIVEC_BUILTIN_LVSM, -+ RS6000_BTI_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_V8HI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVSM, ALTIVEC_BUILTIN_LVSM, -+ RS6000_BTI_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_INTHI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVSM, ALTIVEC_BUILTIN_LVSM, -+ RS6000_BTI_unsigned_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V8HI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVSM, ALTIVEC_BUILTIN_LVSM, -+ RS6000_BTI_unsigned_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTHI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVSM, ALTIVEC_BUILTIN_LVSM, -+ RS6000_BTI_bool_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V16QI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVSM, ALTIVEC_BUILTIN_LVSM, -+ RS6000_BTI_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_V16QI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVSM, ALTIVEC_BUILTIN_LVSM, -+ RS6000_BTI_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_INTQI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVSM, ALTIVEC_BUILTIN_LVSM, -+ RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V16QI, 0 }, -+ { ALTIVEC_BUILTIN_VEC_LVSM, ALTIVEC_BUILTIN_LVSM, -+ RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTQI, 0 }, - { ALTIVEC_BUILTIN_VEC_MAX, ALTIVEC_BUILTIN_VMAXUB, - RS6000_BTI_unsigned_V16QI, RS6000_BTI_bool_V16QI, RS6000_BTI_unsigned_V16QI, 0 }, - { ALTIVEC_BUILTIN_VEC_MAX, ALTIVEC_BUILTIN_VMAXUB, -@@ -2812,6 +3102,46 @@ - RS6000_BTI_void, RS6000_BTI_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_void }, - { ALTIVEC_BUILTIN_VEC_STVEBX, ALTIVEC_BUILTIN_STVEBX, - RS6000_BTI_void, RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_void }, -+ { ALTIVEC_BUILTIN_VEC_STVEXWX, ALTIVEC_BUILTIN_STVEXWX, -+ RS6000_BTI_void, RS6000_BTI_V4SF, RS6000_BTI_INTSI, ~RS6000_BTI_float }, -+ { ALTIVEC_BUILTIN_VEC_STVEXWX, ALTIVEC_BUILTIN_STVEXWX, -+ RS6000_BTI_void, RS6000_BTI_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_INTSI }, -+ { ALTIVEC_BUILTIN_VEC_STVEXWX, ALTIVEC_BUILTIN_STVEXWX, -+ RS6000_BTI_void, RS6000_BTI_unsigned_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTSI }, -+ { ALTIVEC_BUILTIN_VEC_STVEXWX, ALTIVEC_BUILTIN_STVEXWX, -+ RS6000_BTI_void, RS6000_BTI_bool_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_INTSI }, -+ { ALTIVEC_BUILTIN_VEC_STVEXWX, ALTIVEC_BUILTIN_STVEXWX, -+ RS6000_BTI_void, RS6000_BTI_bool_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTSI }, -+ { ALTIVEC_BUILTIN_VEC_STVEXWX, ALTIVEC_BUILTIN_STVEXWX, -+ RS6000_BTI_void, RS6000_BTI_V4SF, RS6000_BTI_INTSI, ~RS6000_BTI_void }, -+ { ALTIVEC_BUILTIN_VEC_STVEXWX, ALTIVEC_BUILTIN_STVEXWX, -+ RS6000_BTI_void, RS6000_BTI_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_void }, -+ { ALTIVEC_BUILTIN_VEC_STVEXWX, ALTIVEC_BUILTIN_STVEXWX, -+ RS6000_BTI_void, RS6000_BTI_unsigned_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_void }, -+ { ALTIVEC_BUILTIN_VEC_STVEXHX, ALTIVEC_BUILTIN_STVEXHX, -+ RS6000_BTI_void, RS6000_BTI_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_INTHI }, -+ { ALTIVEC_BUILTIN_VEC_STVEXHX, ALTIVEC_BUILTIN_STVEXHX, -+ RS6000_BTI_void, RS6000_BTI_unsigned_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTHI }, -+ { ALTIVEC_BUILTIN_VEC_STVEXHX, ALTIVEC_BUILTIN_STVEXHX, -+ RS6000_BTI_void, RS6000_BTI_bool_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_INTHI }, -+ { ALTIVEC_BUILTIN_VEC_STVEXHX, ALTIVEC_BUILTIN_STVEXHX, -+ RS6000_BTI_void, RS6000_BTI_bool_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTHI }, -+ { ALTIVEC_BUILTIN_VEC_STVEXHX, ALTIVEC_BUILTIN_STVEXHX, -+ RS6000_BTI_void, RS6000_BTI_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_void }, -+ { ALTIVEC_BUILTIN_VEC_STVEXHX, ALTIVEC_BUILTIN_STVEXHX, -+ RS6000_BTI_void, RS6000_BTI_unsigned_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_void }, -+ { ALTIVEC_BUILTIN_VEC_STVEXBX, ALTIVEC_BUILTIN_STVEXBX, -+ RS6000_BTI_void, RS6000_BTI_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_INTQI }, -+ { ALTIVEC_BUILTIN_VEC_STVEXBX, ALTIVEC_BUILTIN_STVEXBX, -+ RS6000_BTI_void, RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTQI }, -+ { ALTIVEC_BUILTIN_VEC_STVEXBX, ALTIVEC_BUILTIN_STVEXBX, -+ RS6000_BTI_void, RS6000_BTI_bool_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_INTQI }, -+ { ALTIVEC_BUILTIN_VEC_STVEXBX, ALTIVEC_BUILTIN_STVEXBX, -+ RS6000_BTI_void, RS6000_BTI_bool_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTQI }, -+ { ALTIVEC_BUILTIN_VEC_STVEXBX, ALTIVEC_BUILTIN_STVEXBX, -+ RS6000_BTI_void, RS6000_BTI_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_void }, -+ { ALTIVEC_BUILTIN_VEC_STVEXBX, ALTIVEC_BUILTIN_STVEXBX, -+ RS6000_BTI_void, RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_void }, - { ALTIVEC_BUILTIN_VEC_STL, ALTIVEC_BUILTIN_STVXL, - RS6000_BTI_void, RS6000_BTI_V4SF, RS6000_BTI_INTSI, ~RS6000_BTI_V4SF }, - { ALTIVEC_BUILTIN_VEC_STL, ALTIVEC_BUILTIN_STVXL, -@@ -3016,6 +3346,222 @@ - RS6000_BTI_void, RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V16QI }, - { ALTIVEC_BUILTIN_VEC_STVRXL, ALTIVEC_BUILTIN_STVRXL, - RS6000_BTI_void, RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTQI }, -+ { ALTIVEC_BUILTIN_VEC_STVFLX, ALTIVEC_BUILTIN_STVFLX, -+ RS6000_BTI_void, RS6000_BTI_V4SF, RS6000_BTI_INTSI, ~RS6000_BTI_V4SF }, -+ { ALTIVEC_BUILTIN_VEC_STVFLX, ALTIVEC_BUILTIN_STVFLX, -+ RS6000_BTI_void, RS6000_BTI_V4SF, RS6000_BTI_INTSI, ~RS6000_BTI_float }, -+ { ALTIVEC_BUILTIN_VEC_STVFLX, ALTIVEC_BUILTIN_STVFLX, -+ RS6000_BTI_void, RS6000_BTI_bool_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V4SI }, -+ { ALTIVEC_BUILTIN_VEC_STVFLX, ALTIVEC_BUILTIN_STVFLX, -+ RS6000_BTI_void, RS6000_BTI_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_V4SI }, -+ { ALTIVEC_BUILTIN_VEC_STVFLX, ALTIVEC_BUILTIN_STVFLX, -+ RS6000_BTI_void, RS6000_BTI_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_INTSI }, -+ { ALTIVEC_BUILTIN_VEC_STVFLX, ALTIVEC_BUILTIN_STVFLX, -+ RS6000_BTI_void, RS6000_BTI_unsigned_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V4SI }, -+ { ALTIVEC_BUILTIN_VEC_STVFLX, ALTIVEC_BUILTIN_STVFLX, -+ RS6000_BTI_void, RS6000_BTI_unsigned_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTSI }, -+ { ALTIVEC_BUILTIN_VEC_STVFLX, ALTIVEC_BUILTIN_STVFLX, -+ RS6000_BTI_void, RS6000_BTI_bool_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V8HI }, -+ { ALTIVEC_BUILTIN_VEC_STVFLX, ALTIVEC_BUILTIN_STVFLX, -+ RS6000_BTI_void, RS6000_BTI_pixel_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_pixel_V8HI }, -+ { ALTIVEC_BUILTIN_VEC_STVFLX, ALTIVEC_BUILTIN_STVFLX, -+ RS6000_BTI_void, RS6000_BTI_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_V8HI }, -+ { ALTIVEC_BUILTIN_VEC_STVFLX, ALTIVEC_BUILTIN_STVFLX, -+ RS6000_BTI_void, RS6000_BTI_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_INTHI }, -+ { ALTIVEC_BUILTIN_VEC_STVFLX, ALTIVEC_BUILTIN_STVFLX, -+ RS6000_BTI_void, RS6000_BTI_unsigned_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V8HI }, -+ { ALTIVEC_BUILTIN_VEC_STVFLX, ALTIVEC_BUILTIN_STVFLX, -+ RS6000_BTI_void, RS6000_BTI_unsigned_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTHI }, -+ { ALTIVEC_BUILTIN_VEC_STVFLX, ALTIVEC_BUILTIN_STVFLX, -+ RS6000_BTI_void, RS6000_BTI_bool_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V16QI }, -+ { ALTIVEC_BUILTIN_VEC_STVFLX, ALTIVEC_BUILTIN_STVFLX, -+ RS6000_BTI_void, RS6000_BTI_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_V16QI }, -+ { ALTIVEC_BUILTIN_VEC_STVFLX, ALTIVEC_BUILTIN_STVFLX, -+ RS6000_BTI_void, RS6000_BTI_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_INTQI }, -+ { ALTIVEC_BUILTIN_VEC_STVFLX, ALTIVEC_BUILTIN_STVFLX, -+ RS6000_BTI_void, RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V16QI }, -+ { ALTIVEC_BUILTIN_VEC_STVFLX, ALTIVEC_BUILTIN_STVFLX, -+ RS6000_BTI_void, RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTQI }, -+ { ALTIVEC_BUILTIN_VEC_STVFLXL, ALTIVEC_BUILTIN_STVFLXL, -+ RS6000_BTI_void, RS6000_BTI_V4SF, RS6000_BTI_INTSI, ~RS6000_BTI_V4SF }, -+ { ALTIVEC_BUILTIN_VEC_STVFLXL, ALTIVEC_BUILTIN_STVFLXL, -+ RS6000_BTI_void, RS6000_BTI_V4SF, RS6000_BTI_INTSI, ~RS6000_BTI_float }, -+ { ALTIVEC_BUILTIN_VEC_STVFLXL, ALTIVEC_BUILTIN_STVFLXL, -+ RS6000_BTI_void, RS6000_BTI_bool_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V4SI }, -+ { ALTIVEC_BUILTIN_VEC_STVFLXL, ALTIVEC_BUILTIN_STVFLXL, -+ RS6000_BTI_void, RS6000_BTI_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_V4SI }, -+ { ALTIVEC_BUILTIN_VEC_STVFLXL, ALTIVEC_BUILTIN_STVFLXL, -+ RS6000_BTI_void, RS6000_BTI_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_INTSI }, -+ { ALTIVEC_BUILTIN_VEC_STVFLXL, ALTIVEC_BUILTIN_STVFLXL, -+ RS6000_BTI_void, RS6000_BTI_unsigned_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V4SI }, -+ { ALTIVEC_BUILTIN_VEC_STVFLXL, ALTIVEC_BUILTIN_STVFLXL, -+ RS6000_BTI_void, RS6000_BTI_unsigned_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTSI }, -+ { ALTIVEC_BUILTIN_VEC_STVFLXL, ALTIVEC_BUILTIN_STVFLXL, -+ RS6000_BTI_void, RS6000_BTI_bool_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V8HI }, -+ { ALTIVEC_BUILTIN_VEC_STVFLXL, ALTIVEC_BUILTIN_STVFLXL, -+ RS6000_BTI_void, RS6000_BTI_pixel_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_pixel_V8HI }, -+ { ALTIVEC_BUILTIN_VEC_STVFLXL, ALTIVEC_BUILTIN_STVFLXL, -+ RS6000_BTI_void, RS6000_BTI_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_V8HI }, -+ { ALTIVEC_BUILTIN_VEC_STVFLXL, ALTIVEC_BUILTIN_STVFLXL, -+ RS6000_BTI_void, RS6000_BTI_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_INTHI }, -+ { ALTIVEC_BUILTIN_VEC_STVFLXL, ALTIVEC_BUILTIN_STVFLXL, -+ RS6000_BTI_void, RS6000_BTI_unsigned_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V8HI }, -+ { ALTIVEC_BUILTIN_VEC_STVFLXL, ALTIVEC_BUILTIN_STVFLXL, -+ RS6000_BTI_void, RS6000_BTI_unsigned_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTHI }, -+ { ALTIVEC_BUILTIN_VEC_STVFLXL, ALTIVEC_BUILTIN_STVFLXL, -+ RS6000_BTI_void, RS6000_BTI_bool_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V16QI }, -+ { ALTIVEC_BUILTIN_VEC_STVFLXL, ALTIVEC_BUILTIN_STVFLXL, -+ RS6000_BTI_void, RS6000_BTI_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_V16QI }, -+ { ALTIVEC_BUILTIN_VEC_STVFLXL, ALTIVEC_BUILTIN_STVFLXL, -+ RS6000_BTI_void, RS6000_BTI_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_INTQI }, -+ { ALTIVEC_BUILTIN_VEC_STVFLXL, ALTIVEC_BUILTIN_STVFLXL, -+ RS6000_BTI_void, RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V16QI }, -+ { ALTIVEC_BUILTIN_VEC_STVFLXL, ALTIVEC_BUILTIN_STVFLXL, -+ RS6000_BTI_void, RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTQI }, -+ { ALTIVEC_BUILTIN_VEC_STVFRX, ALTIVEC_BUILTIN_STVFRX, -+ RS6000_BTI_void, RS6000_BTI_V4SF, RS6000_BTI_INTSI, ~RS6000_BTI_V4SF }, -+ { ALTIVEC_BUILTIN_VEC_STVFRX, ALTIVEC_BUILTIN_STVFRX, -+ RS6000_BTI_void, RS6000_BTI_V4SF, RS6000_BTI_INTSI, ~RS6000_BTI_float }, -+ { ALTIVEC_BUILTIN_VEC_STVFRX, ALTIVEC_BUILTIN_STVFRX, -+ RS6000_BTI_void, RS6000_BTI_bool_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V4SI }, -+ { ALTIVEC_BUILTIN_VEC_STVFRX, ALTIVEC_BUILTIN_STVFRX, -+ RS6000_BTI_void, RS6000_BTI_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_V4SI }, -+ { ALTIVEC_BUILTIN_VEC_STVFRX, ALTIVEC_BUILTIN_STVFRX, -+ RS6000_BTI_void, RS6000_BTI_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_INTSI }, -+ { ALTIVEC_BUILTIN_VEC_STVFRX, ALTIVEC_BUILTIN_STVFRX, -+ RS6000_BTI_void, RS6000_BTI_unsigned_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V4SI }, -+ { ALTIVEC_BUILTIN_VEC_STVFRX, ALTIVEC_BUILTIN_STVFRX, -+ RS6000_BTI_void, RS6000_BTI_unsigned_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTSI }, -+ { ALTIVEC_BUILTIN_VEC_STVFRX, ALTIVEC_BUILTIN_STVFRX, -+ RS6000_BTI_void, RS6000_BTI_bool_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V8HI }, -+ { ALTIVEC_BUILTIN_VEC_STVFRX, ALTIVEC_BUILTIN_STVFRX, -+ RS6000_BTI_void, RS6000_BTI_pixel_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_pixel_V8HI }, -+ { ALTIVEC_BUILTIN_VEC_STVFRX, ALTIVEC_BUILTIN_STVFRX, -+ RS6000_BTI_void, RS6000_BTI_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_V8HI }, -+ { ALTIVEC_BUILTIN_VEC_STVFRX, ALTIVEC_BUILTIN_STVFRX, -+ RS6000_BTI_void, RS6000_BTI_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_INTHI }, -+ { ALTIVEC_BUILTIN_VEC_STVFRX, ALTIVEC_BUILTIN_STVFRX, -+ RS6000_BTI_void, RS6000_BTI_unsigned_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V8HI }, -+ { ALTIVEC_BUILTIN_VEC_STVFRX, ALTIVEC_BUILTIN_STVFRX, -+ RS6000_BTI_void, RS6000_BTI_unsigned_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTHI }, -+ { ALTIVEC_BUILTIN_VEC_STVFRX, ALTIVEC_BUILTIN_STVFRX, -+ RS6000_BTI_void, RS6000_BTI_bool_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V16QI }, -+ { ALTIVEC_BUILTIN_VEC_STVFRX, ALTIVEC_BUILTIN_STVFRX, -+ RS6000_BTI_void, RS6000_BTI_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_V16QI }, -+ { ALTIVEC_BUILTIN_VEC_STVFRX, ALTIVEC_BUILTIN_STVFRX, -+ RS6000_BTI_void, RS6000_BTI_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_INTQI }, -+ { ALTIVEC_BUILTIN_VEC_STVFRX, ALTIVEC_BUILTIN_STVFRX, -+ RS6000_BTI_void, RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V16QI }, -+ { ALTIVEC_BUILTIN_VEC_STVFRX, ALTIVEC_BUILTIN_STVFRX, -+ RS6000_BTI_void, RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTQI }, -+ { ALTIVEC_BUILTIN_VEC_STVFRXL, ALTIVEC_BUILTIN_STVFRXL, -+ RS6000_BTI_void, RS6000_BTI_V4SF, RS6000_BTI_INTSI, ~RS6000_BTI_V4SF }, -+ { ALTIVEC_BUILTIN_VEC_STVFRXL, ALTIVEC_BUILTIN_STVFRXL, -+ RS6000_BTI_void, RS6000_BTI_V4SF, RS6000_BTI_INTSI, ~RS6000_BTI_float }, -+ { ALTIVEC_BUILTIN_VEC_STVFRXL, ALTIVEC_BUILTIN_STVFRXL, -+ RS6000_BTI_void, RS6000_BTI_bool_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V4SI }, -+ { ALTIVEC_BUILTIN_VEC_STVFRXL, ALTIVEC_BUILTIN_STVFRXL, -+ RS6000_BTI_void, RS6000_BTI_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_V4SI }, -+ { ALTIVEC_BUILTIN_VEC_STVFRXL, ALTIVEC_BUILTIN_STVFRXL, -+ RS6000_BTI_void, RS6000_BTI_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_INTSI }, -+ { ALTIVEC_BUILTIN_VEC_STVFRXL, ALTIVEC_BUILTIN_STVFRXL, -+ RS6000_BTI_void, RS6000_BTI_unsigned_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V4SI }, -+ { ALTIVEC_BUILTIN_VEC_STVFRXL, ALTIVEC_BUILTIN_STVFRXL, -+ RS6000_BTI_void, RS6000_BTI_unsigned_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTSI }, -+ { ALTIVEC_BUILTIN_VEC_STVFRXL, ALTIVEC_BUILTIN_STVFRXL, -+ RS6000_BTI_void, RS6000_BTI_bool_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V8HI }, -+ { ALTIVEC_BUILTIN_VEC_STVFRXL, ALTIVEC_BUILTIN_STVFRXL, -+ RS6000_BTI_void, RS6000_BTI_pixel_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_pixel_V8HI }, -+ { ALTIVEC_BUILTIN_VEC_STVFRXL, ALTIVEC_BUILTIN_STVFRXL, -+ RS6000_BTI_void, RS6000_BTI_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_V8HI }, -+ { ALTIVEC_BUILTIN_VEC_STVFRXL, ALTIVEC_BUILTIN_STVFRXL, -+ RS6000_BTI_void, RS6000_BTI_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_INTHI }, -+ { ALTIVEC_BUILTIN_VEC_STVFRXL, ALTIVEC_BUILTIN_STVFRXL, -+ RS6000_BTI_void, RS6000_BTI_unsigned_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V8HI }, -+ { ALTIVEC_BUILTIN_VEC_STVFRXL, ALTIVEC_BUILTIN_STVFRXL, -+ RS6000_BTI_void, RS6000_BTI_unsigned_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTHI }, -+ { ALTIVEC_BUILTIN_VEC_STVFRXL, ALTIVEC_BUILTIN_STVFRXL, -+ RS6000_BTI_void, RS6000_BTI_bool_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V16QI }, -+ { ALTIVEC_BUILTIN_VEC_STVFRXL, ALTIVEC_BUILTIN_STVFRXL, -+ RS6000_BTI_void, RS6000_BTI_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_V16QI }, -+ { ALTIVEC_BUILTIN_VEC_STVFRXL, ALTIVEC_BUILTIN_STVFRXL, -+ RS6000_BTI_void, RS6000_BTI_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_INTQI }, -+ { ALTIVEC_BUILTIN_VEC_STVFRXL, ALTIVEC_BUILTIN_STVFRXL, -+ RS6000_BTI_void, RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V16QI }, -+ { ALTIVEC_BUILTIN_VEC_STVFRXL, ALTIVEC_BUILTIN_STVFRXL, -+ RS6000_BTI_void, RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTQI }, -+ { ALTIVEC_BUILTIN_VEC_STVSWX, ALTIVEC_BUILTIN_STVSWX, -+ RS6000_BTI_void, RS6000_BTI_V4SF, RS6000_BTI_INTSI, ~RS6000_BTI_V4SF }, -+ { ALTIVEC_BUILTIN_VEC_STVSWX, ALTIVEC_BUILTIN_STVSWX, -+ RS6000_BTI_void, RS6000_BTI_V4SF, RS6000_BTI_INTSI, ~RS6000_BTI_float }, -+ { ALTIVEC_BUILTIN_VEC_STVSWX, ALTIVEC_BUILTIN_STVSWX, -+ RS6000_BTI_void, RS6000_BTI_bool_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V4SI }, -+ { ALTIVEC_BUILTIN_VEC_STVSWX, ALTIVEC_BUILTIN_STVSWX, -+ RS6000_BTI_void, RS6000_BTI_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_V4SI }, -+ { ALTIVEC_BUILTIN_VEC_STVSWX, ALTIVEC_BUILTIN_STVSWX, -+ RS6000_BTI_void, RS6000_BTI_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_INTSI }, -+ { ALTIVEC_BUILTIN_VEC_STVSWX, ALTIVEC_BUILTIN_STVSWX, -+ RS6000_BTI_void, RS6000_BTI_unsigned_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V4SI }, -+ { ALTIVEC_BUILTIN_VEC_STVSWX, ALTIVEC_BUILTIN_STVSWX, -+ RS6000_BTI_void, RS6000_BTI_unsigned_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTSI }, -+ { ALTIVEC_BUILTIN_VEC_STVSWX, ALTIVEC_BUILTIN_STVSWX, -+ RS6000_BTI_void, RS6000_BTI_bool_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V8HI }, -+ { ALTIVEC_BUILTIN_VEC_STVSWX, ALTIVEC_BUILTIN_STVSWX, -+ RS6000_BTI_void, RS6000_BTI_pixel_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_pixel_V8HI }, -+ { ALTIVEC_BUILTIN_VEC_STVSWX, ALTIVEC_BUILTIN_STVSWX, -+ RS6000_BTI_void, RS6000_BTI_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_V8HI }, -+ { ALTIVEC_BUILTIN_VEC_STVSWX, ALTIVEC_BUILTIN_STVSWX, -+ RS6000_BTI_void, RS6000_BTI_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_INTHI }, -+ { ALTIVEC_BUILTIN_VEC_STVSWX, ALTIVEC_BUILTIN_STVSWX, -+ RS6000_BTI_void, RS6000_BTI_unsigned_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V8HI }, -+ { ALTIVEC_BUILTIN_VEC_STVSWX, ALTIVEC_BUILTIN_STVSWX, -+ RS6000_BTI_void, RS6000_BTI_unsigned_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTHI }, -+ { ALTIVEC_BUILTIN_VEC_STVSWX, ALTIVEC_BUILTIN_STVSWX, -+ RS6000_BTI_void, RS6000_BTI_bool_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V16QI }, -+ { ALTIVEC_BUILTIN_VEC_STVSWX, ALTIVEC_BUILTIN_STVSWX, -+ RS6000_BTI_void, RS6000_BTI_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_V16QI }, -+ { ALTIVEC_BUILTIN_VEC_STVSWX, ALTIVEC_BUILTIN_STVSWX, -+ RS6000_BTI_void, RS6000_BTI_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_INTQI }, -+ { ALTIVEC_BUILTIN_VEC_STVSWX, ALTIVEC_BUILTIN_STVSWX, -+ RS6000_BTI_void, RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V16QI }, -+ { ALTIVEC_BUILTIN_VEC_STVSWX, ALTIVEC_BUILTIN_STVSWX, -+ RS6000_BTI_void, RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTQI }, -+ { ALTIVEC_BUILTIN_VEC_STVSWXL, ALTIVEC_BUILTIN_STVSWXL, -+ RS6000_BTI_void, RS6000_BTI_V4SF, RS6000_BTI_INTSI, ~RS6000_BTI_V4SF }, -+ { ALTIVEC_BUILTIN_VEC_STVSWXL, ALTIVEC_BUILTIN_STVSWXL, -+ RS6000_BTI_void, RS6000_BTI_V4SF, RS6000_BTI_INTSI, ~RS6000_BTI_float }, -+ { ALTIVEC_BUILTIN_VEC_STVSWXL, ALTIVEC_BUILTIN_STVSWXL, -+ RS6000_BTI_void, RS6000_BTI_bool_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V4SI }, -+ { ALTIVEC_BUILTIN_VEC_STVSWXL, ALTIVEC_BUILTIN_STVSWXL, -+ RS6000_BTI_void, RS6000_BTI_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_V4SI }, -+ { ALTIVEC_BUILTIN_VEC_STVSWXL, ALTIVEC_BUILTIN_STVSWXL, -+ RS6000_BTI_void, RS6000_BTI_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_INTSI }, -+ { ALTIVEC_BUILTIN_VEC_STVSWXL, ALTIVEC_BUILTIN_STVSWXL, -+ RS6000_BTI_void, RS6000_BTI_unsigned_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V4SI }, -+ { ALTIVEC_BUILTIN_VEC_STVSWXL, ALTIVEC_BUILTIN_STVSWXL, -+ RS6000_BTI_void, RS6000_BTI_unsigned_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTSI }, -+ { ALTIVEC_BUILTIN_VEC_STVSWXL, ALTIVEC_BUILTIN_STVSWXL, -+ RS6000_BTI_void, RS6000_BTI_bool_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V8HI }, -+ { ALTIVEC_BUILTIN_VEC_STVSWXL, ALTIVEC_BUILTIN_STVSWXL, -+ RS6000_BTI_void, RS6000_BTI_pixel_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_pixel_V8HI }, -+ { ALTIVEC_BUILTIN_VEC_STVSWXL, ALTIVEC_BUILTIN_STVSWXL, -+ RS6000_BTI_void, RS6000_BTI_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_V8HI }, -+ { ALTIVEC_BUILTIN_VEC_STVSWXL, ALTIVEC_BUILTIN_STVSWXL, -+ RS6000_BTI_void, RS6000_BTI_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_INTHI }, -+ { ALTIVEC_BUILTIN_VEC_STVSWXL, ALTIVEC_BUILTIN_STVSWXL, -+ RS6000_BTI_void, RS6000_BTI_unsigned_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V8HI }, -+ { ALTIVEC_BUILTIN_VEC_STVSWXL, ALTIVEC_BUILTIN_STVSWXL, -+ RS6000_BTI_void, RS6000_BTI_unsigned_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTHI }, -+ { ALTIVEC_BUILTIN_VEC_STVSWXL, ALTIVEC_BUILTIN_STVSWXL, -+ RS6000_BTI_void, RS6000_BTI_bool_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V16QI }, -+ { ALTIVEC_BUILTIN_VEC_STVSWXL, ALTIVEC_BUILTIN_STVSWXL, -+ RS6000_BTI_void, RS6000_BTI_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_V16QI }, -+ { ALTIVEC_BUILTIN_VEC_STVSWXL, ALTIVEC_BUILTIN_STVSWXL, -+ RS6000_BTI_void, RS6000_BTI_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_INTQI }, -+ { ALTIVEC_BUILTIN_VEC_STVSWXL, ALTIVEC_BUILTIN_STVSWXL, -+ RS6000_BTI_void, RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V16QI }, -+ { ALTIVEC_BUILTIN_VEC_STVSWXL, ALTIVEC_BUILTIN_STVSWXL, -+ RS6000_BTI_void, RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTQI }, - { VSX_BUILTIN_VEC_XXSLDWI, VSX_BUILTIN_XXSLDWI_16QI, - RS6000_BTI_V16QI, RS6000_BTI_V16QI, RS6000_BTI_V16QI, RS6000_BTI_NOT_OPAQUE }, - { VSX_BUILTIN_VEC_XXSLDWI, VSX_BUILTIN_XXSLDWI_16QI, -diff -ruN gcc-4.6.2-orig/gcc/config/rs6000/rs6000.h gcc-4.6.2/gcc/config/rs6000/rs6000.h ---- gcc-4.6.2-orig/gcc/config/rs6000/rs6000.h 2011-07-27 13:17:15.000000000 -0500 -+++ gcc-4.6.2/gcc/config/rs6000/rs6000.h 2012-03-06 12:16:25.582039002 -0600 -@@ -168,6 +168,8 @@ - %{mcpu=e300c3: -me300} \ - %{mcpu=e500mc: -me500mc} \ - %{mcpu=e500mc64: -me500mc64} \ -+%{mcpu=e5500: -me5500} \ -+%{mcpu=e6500: -me6500} \ - %{maltivec: -maltivec} \ - %{mvsx: -mvsx %{!maltivec: -maltivec} %{!mcpu*: %(asm_cpu_power7)}} \ - -many" -@@ -477,13 +479,15 @@ - - #define TARGET_FCTIDZ TARGET_FCFID - #define TARGET_STFIWX TARGET_PPC_GFXOPT --#define TARGET_LFIWAX TARGET_CMPB --#define TARGET_LFIWZX TARGET_POPCNTD --#define TARGET_FCFIDS TARGET_POPCNTD --#define TARGET_FCFIDU TARGET_POPCNTD --#define TARGET_FCFIDUS TARGET_POPCNTD --#define TARGET_FCTIDUZ TARGET_POPCNTD --#define TARGET_FCTIWUZ TARGET_POPCNTD -+#define TARGET_LFIWAX (TARGET_CMPB && rs6000_cpu != PROCESSOR_PPCE5500 \ -+ && rs6000_cpu != PROCESSOR_PPCE6500) -+#define TARGET_LFIWZX (TARGET_POPCNTD && rs6000_cpu != PROCESSOR_PPCE5500 \ -+ && rs6000_cpu != PROCESSOR_PPCE6500) -+#define TARGET_FCFIDS TARGET_LFIWZX -+#define TARGET_FCFIDU TARGET_LFIWZX -+#define TARGET_FCFIDUS TARGET_LFIWZX -+#define TARGET_FCTIDUZ TARGET_LFIWZX -+#define TARGET_FCTIWUZ TARGET_LFIWZX - - /* E500 processors only support plain "sync", not lwsync. */ - #define TARGET_NO_LWSYNC TARGET_E500 -@@ -494,10 +498,14 @@ - - #define TARGET_FRE (TARGET_HARD_FLOAT && TARGET_FPRS \ - && TARGET_DOUBLE_FLOAT \ -- && (TARGET_POPCNTB || VECTOR_UNIT_VSX_P (DFmode))) -+ && (TARGET_POPCNTB || VECTOR_UNIT_VSX_P (DFmode)) \ -+ && rs6000_cpu != PROCESSOR_PPCE5500 \ -+ && rs6000_cpu != PROCESSOR_PPCE6500) - - #define TARGET_FRSQRTES (TARGET_HARD_FLOAT && TARGET_POPCNTB \ -- && TARGET_FPRS && TARGET_SINGLE_FLOAT) -+ && TARGET_FPRS && TARGET_SINGLE_FLOAT \ -+ && rs6000_cpu != PROCESSOR_PPCE5500 \ -+ && rs6000_cpu != PROCESSOR_PPCE6500) - - #define TARGET_FRSQRTE (TARGET_HARD_FLOAT && TARGET_FPRS \ - && TARGET_DOUBLE_FLOAT \ -diff -ruN gcc-4.6.2-orig/gcc/config/rs6000/rs6000.md gcc-4.6.2/gcc/config/rs6000/rs6000.md ---- gcc-4.6.2-orig/gcc/config/rs6000/rs6000.md 2011-09-19 11:41:20.000000000 -0500 -+++ gcc-4.6.2/gcc/config/rs6000/rs6000.md 2012-03-06 12:16:25.584039002 -0600 -@@ -126,7 +126,7 @@ - - ;; Define an insn type attribute. This is used in function unit delay - ;; computations. --(define_attr "type" "integer,two,three,load,load_ext,load_ext_u,load_ext_ux,load_ux,load_u,store,store_ux,store_u,fpload,fpload_ux,fpload_u,fpstore,fpstore_ux,fpstore_u,vecload,vecstore,imul,imul2,imul3,lmul,idiv,ldiv,insert_word,branch,cmp,fast_compare,compare,var_delayed_compare,delayed_compare,imul_compare,lmul_compare,fpcompare,cr_logical,delayed_cr,mfcr,mfcrf,mtcr,mfjmpr,mtjmpr,fp,fpsimple,dmul,sdiv,ddiv,ssqrt,dsqrt,jmpreg,brinc,vecsimple,veccomplex,vecdiv,veccmp,veccmpsimple,vecperm,vecfloat,vecfdiv,isync,sync,load_l,store_c,shift,trap,insert_dword,var_shift_rotate,cntlz,exts,mffgpr,mftgpr,isel" -+(define_attr "type" "integer,two,three,load,load_ext,load_ext_u,load_ext_ux,load_ux,load_u,store,store_ux,store_u,fpload,fpload_ux,fpload_u,fpstore,fpstore_ux,fpstore_u,vecload,vecstore,imul,imul2,imul3,lmul,idiv,ldiv,insert_word,branch,cmp,fast_compare,compare,var_delayed_compare,delayed_compare,imul_compare,lmul_compare,fpcompare,cr_logical,delayed_cr,mfcr,mfcrf,mtcr,mfjmpr,mtjmpr,fp,fpsimple,dmul,sdiv,ddiv,ssqrt,dsqrt,jmpreg,brinc,vecsimple,veccomplex,vecdiv,veccmp,veccmpsimple,vecperm,vecfloat,vecfdiv,isync,sync,load_l,store_c,shift,trap,insert_dword,var_shift_rotate,cntlz,exts,mffgpr,mftgpr,isel,popcnt" - (const_string "integer")) - - ;; Define floating point instruction sub-types for use with Xfpu.md -@@ -148,7 +148,7 @@ - ;; Processor type -- this attribute must exactly match the processor_type - ;; enumeration in rs6000.h. - --(define_attr "cpu" "rios1,rios2,rs64a,mpccore,ppc403,ppc405,ppc440,ppc476,ppc601,ppc603,ppc604,ppc604e,ppc620,ppc630,ppc750,ppc7400,ppc7450,ppc8540,ppce300c2,ppce300c3,ppce500mc,ppce500mc64,power4,power5,power6,power7,cell,ppca2,titan" -+(define_attr "cpu" "rios1,rios2,rs64a,mpccore,ppc403,ppc405,ppc440,ppc476,ppc601,ppc603,ppc604,ppc604e,ppc620,ppc630,ppc750,ppc7400,ppc7450,ppc8540,ppce300c2,ppce300c3,ppce500mc,ppce500mc64,ppce5500,ppce6500,power4,power5,power6,power7,cell,ppca2,titan" - (const (symbol_ref "rs6000_cpu_attr"))) - - -@@ -176,6 +176,8 @@ - (include "e300c2c3.md") - (include "e500mc.md") - (include "e500mc64.md") -+(include "e5500.md") -+(include "e6500.md") - (include "power4.md") - (include "power5.md") - (include "power6.md") -@@ -2302,13 +2304,17 @@ - (unspec:GPR [(match_operand:GPR 1 "gpc_reg_operand" "r")] - UNSPEC_POPCNTB))] - "TARGET_POPCNTB" -- "popcntb %0,%1") -+ "popcntb %0,%1" -+ [(set_attr "length" "4") -+ (set_attr "type" "popcnt")]) - - (define_insn "popcntd2" - [(set (match_operand:GPR 0 "gpc_reg_operand" "=r") - (popcount:GPR (match_operand:GPR 1 "gpc_reg_operand" "r")))] - "TARGET_POPCNTD" -- "popcnt %0,%1") -+ "popcnt %0,%1" -+ [(set_attr "length" "4") -+ (set_attr "type" "popcnt")]) - - (define_expand "popcount2" - [(set (match_operand:GPR 0 "gpc_reg_operand" "") -@@ -5957,10 +5963,10 @@ - && ((TARGET_PPC_GFXOPT - && !HONOR_NANS (mode) - && !HONOR_SIGNED_ZEROS (mode)) -- || TARGET_CMPB -+ || TARGET_LFIWAX - || VECTOR_UNIT_VSX_P (mode))" - { -- if (TARGET_CMPB || VECTOR_UNIT_VSX_P (mode)) -+ if (TARGET_LFIWAX || VECTOR_UNIT_VSX_P (mode)) - { - emit_insn (gen_copysign3_fcpsgn (operands[0], operands[1], - operands[2])); -@@ -5979,7 +5985,7 @@ - (unspec:SFDF [(match_operand:SFDF 1 "gpc_reg_operand" "") - (match_operand:SFDF 2 "gpc_reg_operand" "")] - UNSPEC_COPYSIGN))] -- "TARGET_CMPB && !VECTOR_UNIT_VSX_P (mode)" -+ "TARGET_LFIWAX && !VECTOR_UNIT_VSX_P (mode)" - "fcpsgn %0,%2,%1" - [(set_attr "type" "fp")]) - -diff -ruN gcc-4.6.2-orig/gcc/config/rs6000/rs6000.opt gcc-4.6.2/gcc/config/rs6000/rs6000.opt ---- gcc-4.6.2-orig/gcc/config/rs6000/rs6000.opt 2010-11-29 19:47:54.000000000 -0600 -+++ gcc-4.6.2/gcc/config/rs6000/rs6000.opt 2012-03-06 12:16:25.584039002 -0600 -@@ -179,6 +179,10 @@ - Target Report Mask(ALTIVEC) Save - Use AltiVec instructions - -+maltivec2 -+Target Report Mask(ALTIVEC2) Save -+Use AltiVec PowerPC V2.07 instructions -+ - mhard-dfp - Target Report Mask(DFP) Save - Use decimal floating point instructions -diff -ruN gcc-4.6.2-orig/gcc/config/rs6000/rs6000-opts.h gcc-4.6.2/gcc/config/rs6000/rs6000-opts.h ---- gcc-4.6.2-orig/gcc/config/rs6000/rs6000-opts.h 2010-11-19 11:27:18.000000000 -0600 -+++ gcc-4.6.2/gcc/config/rs6000/rs6000-opts.h 2012-03-06 12:16:25.584039002 -0600 -@@ -53,6 +53,8 @@ - PROCESSOR_PPCE300C3, - PROCESSOR_PPCE500MC, - PROCESSOR_PPCE500MC64, -+ PROCESSOR_PPCE5500, -+ PROCESSOR_PPCE6500, - PROCESSOR_POWER4, - PROCESSOR_POWER5, - PROCESSOR_POWER6, -diff -ruN gcc-4.6.2-orig/gcc/config.gcc gcc-4.6.2/gcc/config.gcc ---- gcc-4.6.2-orig/gcc/config.gcc 2011-07-22 11:44:50.000000000 -0500 -+++ gcc-4.6.2/gcc/config.gcc 2012-03-06 12:16:25.585039002 -0600 -@@ -396,7 +396,7 @@ - extra_headers="ppc-asm.h altivec.h spe.h ppu_intrinsics.h paired.h spu2vmx.h vec_types.h si2vmx.h" - need_64bit_hwint=yes - case x$with_cpu in -- xpowerpc64|xdefault64|x6[23]0|x970|xG5|xpower[34567]|xpower6x|xrs64a|xcell|xa2|xe500mc64) -+ xpowerpc64|xdefault64|x6[23]0|x970|xG5|xpower[34567]|xpower6x|xrs64a|xcell|xa2|xe500mc64|xe5500|Xe6500) - cpu_is_64bit=yes - ;; - esac -@@ -3501,8 +3501,8 @@ - | 401 | 403 | 405 | 405fp | 440 | 440fp | 464 | 464fp \ - | 476 | 476fp | 505 | 601 | 602 | 603 | 603e | ec603e \ - | 604 | 604e | 620 | 630 | 740 | 750 | 7400 | 7450 \ -- | a2 | e300c[23] | 854[08] | e500mc | e500mc64 | titan\ -- | 801 | 821 | 823 | 860 | 970 | G3 | G4 | G5 | cell) -+ | a2 | e300c[23] | 854[08] | e500mc | e500mc64 | e5500 | e6500 \ -+ | titan | 801 | 821 | 823 | 860 | 970 | G3 | G4 | G5 | cell) - # OK - ;; - *) -diff -ruN gcc-4.6.2-orig/gcc/doc/extend.texi gcc-4.6.2/gcc/doc/extend.texi ---- gcc-4.6.2-orig/gcc/doc/extend.texi 2011-10-24 09:55:45.000000000 -0500 -+++ gcc-4.6.2/gcc/doc/extend.texi 2012-03-06 12:56:49.399039002 -0600 -@@ -12509,6 +12509,291 @@ - @samp{vec_vsx_st} builtins will always generate the VSX @samp{LXVD2X}, - @samp{LXVW4X}, @samp{STXVD2X}, and @samp{STXVW4X} instructions. - -+Using @option{-maltivec2} will extend the Altivec interface with the -+following additional functions: -+ -+@smallexample -+vector unsigned char vec_absd (vector unsigned char, vector unsigned char); -+vector unsigned char vec_absd (vector bool char, vector unsigned char); -+vector unsigned char vec_absd (vector unsigned char, vector bool char); -+vector unsigned short vec_absd (vector unsigned short, vector unsigned short); -+vector unsigned short vec_absd (vector bool short, vector unsigned short); -+vector unsigned short vec_absd (vector unsigned short, vector bool short); -+vector unsigned int vec_absd (vector unsigned int, vector unsigned int); -+vector unsigned int vec_absd (vector bool int, vector unsigned int); -+vector unsigned int vec_absd (vector unsigned int, vector bool int); -+ -+vector signed char vec_lvexbx (long, signed char *); -+vector unsigned char vec_lvexbx (long, unsigned char *); -+vector signed short vec_lvexhx (long, signed short *); -+vector unsigned short vec_lvexhx (long, unsigned short *); -+vector float vec_lvexwx (long, float *); -+vector signed int vec_lvexwx (long, signed int *); -+vector unsigned int vec_lvexwx (long, unsigned int *); -+vector signed int vec_lvexwx (long, signed long *); -+vector unsigned int vec_lvexwx (long, unsigned long *); -+ -+void vec_stvexbx (vector signed char, long, signed char *); -+void vec_stvexbx (vector unsigned char, long, unsigned char *); -+void vec_stvexbx (vector bool char, long, signed char *); -+void vec_stvexbx (vector bool char, long, unsigned char *); -+void vec_stvexbx (vector signed char, long, void *); -+void vec_stvexbx (vector unsigned char, long, void *); -+void vec_stvexhx (vector signed short, long, signed short *); -+void vec_stvexhx (vector unsigned short, long, unsigned short *); -+void vec_stvexhx (vector bool short, long, signed short *); -+void vec_stvexhx (vector bool short, long, unsigned short *); -+void vec_stvexhx (vector signed short, long, void *); -+void vec_stvexhx (vector unsigned short, long, void *); -+void vec_stvexwx (vector float, long, float *); -+void vec_stvexwx (vector signed int, long, signed int *); -+void vec_stvexwx (vector unsigned int, long, unsigned int *); -+void vec_stvexwx (vector bool int, long, signed int *); -+void vec_stvexwx (vector bool int, long, unsigned int *); -+void vec_stvexwx (vector float, long, void *); -+void vec_stvexwx (vector signed int, long, void *); -+void vec_stvexwx (vector unsigned int, long, void *); -+ -+vector float vec_lvtlx (long, vector float *); -+vector float vec_lvtlx (long, float *); -+vector bool int vec_lvtlx (long, vector bool int *); -+vector signed int vec_lvtlx (long, vector signed int *); -+vector signed int vec_lvtlx (long, signed int *); -+vector unsigned int vec_lvtlx (long, vector unsigned int *); -+vector unsigned int vec_lvtlx (long, unsigned int *); -+vector bool short vec_lvtlx (long, vector bool short *); -+vector pixel vec_lvtlx (long, vector pixel *); -+vector signed short vec_lvtlx (long, vector signed short *); -+vector signed short vec_lvtlx (long, signed short *); -+vector unsigned short vec_lvtlx (long, vector unsigned short *); -+vector unsigned short vec_lvtlx (long, unsigned short *); -+vector bool char vec_lvtlx (long, vector bool char *); -+vector signed char vec_lvtlx (long, vector signed char *); -+vector signed char vec_lvtlx (long, signed char *); -+vector unsigned char vec_lvtlx (long, vector unsigned char *); -+vector unsigned char vec_lvtlx (long, unsigned char *); -+vector float vec_lvtlxl (long, vector float *); -+vector float vec_lvtlxl (long, float *); -+vector bool int vec_lvtlxl (long, vector bool int *); -+vector signed int vec_lvtlxl (long, vector signed int *); -+vector signed int vec_lvtlxl (long, signed int *); -+vector unsigned int vec_lvtlxl (long, vector unsigned int *); -+vector unsigned int vec_lvtlxl (long, unsigned int *); -+vector bool short vec_lvtlxl (long, vector bool short *); -+vector pixel vec_lvtlxl (long, vector pixel *); -+vector signed short vec_lvtlxl (long, vector signed short *); -+vector signed short vec_lvtlxl (long, signed short *); -+vector unsigned short vec_lvtlxl (long, vector unsigned short *); -+vector unsigned short vec_lvtlxl (long, unsigned short *); -+vector bool char vec_lvtlxl (long, vector bool char *); -+vector signed char vec_lvtlxl (long, vector signed char *); -+vector signed char vec_lvtlxl (long, signed char *); -+vector unsigned char vec_lvtlxl (long, vector unsigned char *); -+vector unsigned char vec_lvtlxl (long, unsigned char *); -+vector float vec_lvtrx (long, vector float *); -+vector float vec_lvtrx (long, float *); -+vector bool int vec_lvtrx (long, vector bool int *); -+vector signed int vec_lvtrx (long, vector signed int *); -+vector signed int vec_lvtrx (long, signed int *); -+vector unsigned int vec_lvtrx (long, vector unsigned int *); -+vector unsigned int vec_lvtrx (long, unsigned int *); -+vector bool short vec_lvtrx (long, vector bool short *); -+vector pixel vec_lvtrx (long, vector pixel *); -+vector signed short vec_lvtrx (long, vector signed short *); -+vector signed short vec_lvtrx (long, signed short *); -+vector unsigned short vec_lvtrx (long, vector unsigned short *); -+vector unsigned short vec_lvtrx (long, unsigned short *); -+vector bool char vec_lvtrx (long, vector bool char *); -+vector signed char vec_lvtrx (long, vector signed char *); -+vector signed char vec_lvtrx (long, signed char *); -+vector unsigned char vec_lvtrx (long, vector unsigned char *); -+vector unsigned char vec_lvtrx (long, unsigned char *); -+vector float vec_lvtrxl (long, vector float *); -+vector float vec_lvtrxl (long, float *); -+vector bool int vec_lvtrxl (long, vector bool int *); -+vector signed int vec_lvtrxl (long, vector signed int *); -+vector signed int vec_lvtrxl (long, signed int *); -+vector unsigned int vec_lvtrxl (long, vector unsigned int *); -+vector unsigned int vec_lvtrxl (long, unsigned int *); -+vector bool short vec_lvtrxl (long, vector bool short *); -+vector pixel vec_lvtrxl (long, vector pixel *); -+vector signed short vec_lvtrxl (long, vector signed short *); -+vector signed short vec_lvtrxl (long, signed short *); -+vector unsigned short vec_lvtrxl (long, vector unsigned short *); -+vector unsigned short vec_lvtrxl (long, unsigned short *); -+vector bool char vec_lvtrxl (long, vector bool char *); -+vector signed char vec_lvtrxl (long, vector signed char *); -+vector signed char vec_lvtrxl (long, signed char *); -+vector unsigned char vec_lvtrxl (long, vector unsigned char *); -+vector unsigned char vec_lvtrxl (long, unsigned char *); -+ -+void vec_stvflx (vector float, long, vector float *); -+void vec_stvflx (vector float, long, float *); -+void vec_stvflx (vector bool int, long, vector bool int *); -+void vec_stvflx (vector signed int, long, vector signed int *); -+void vec_stvflx (vector signed int, long, signed int *); -+void vec_stvflx (vector unsigned int, long, vector unsigned int *); -+void vec_stvflx (vector unsigned int, long, unsigned int *); -+void vec_stvflx (vector bool short, long, vector bool short *); -+void vec_stvflx (vector pixel, long, vector pixel *); -+void vec_stvflx (vector signed short, long, vector signed short *); -+void vec_stvflx (vector signed short, long, signed short *); -+void vec_stvflx (vector unsigned short, long, vector unsigned short *); -+void vec_stvflx (vector unsigned short, long, unsigned short *); -+void vec_stvflx (vector bool char, long, vector bool char *); -+void vec_stvflx (vector signed char, long, vector signed char *); -+void vec_stvflx (vector signed char, long, signed char *); -+void vec_stvflx (vector unsigned char, long, vector unsigned char *); -+void vec_stvflx (vector unsigned char, long, unsigned char *); -+void vec_stvflxl (vector float, long, vector float *); -+void vec_stvflxl (vector float, long, float *); -+void vec_stvflxl (vector bool int, long, vector bool int *); -+void vec_stvflxl (vector signed int, long, vector signed int *); -+void vec_stvflxl (vector signed int, long, signed int *); -+void vec_stvflxl (vector unsigned int, long, vector unsigned int *); -+void vec_stvflxl (vector unsigned int, long, unsigned int *); -+void vec_stvflxl (vector bool short, long, vector bool short *); -+void vec_stvflxl (vector pixel, long, vector pixel *); -+void vec_stvflxl (vector signed short, long, vector signed short *); -+void vec_stvflxl (vector signed short, long, signed short *); -+void vec_stvflxl (vector unsigned short, long, vector unsigned short *); -+void vec_stvflxl (vector unsigned short, long, unsigned short *); -+void vec_stvflxl (vector bool char, long, vector bool char *); -+void vec_stvflxl (vector signed char, long, vector signed char *); -+void vec_stvflxl (vector signed char, long, signed char *); -+void vec_stvflxl (vector unsigned char, long, vector unsigned char *); -+void vec_stvflxl (vector unsigned char, long, unsigned char *); -+void vec_stvfrx (vector float, long, vector float *); -+void vec_stvfrx (vector float, long, float *); -+void vec_stvfrx (vector bool int, long, vector bool int *); -+void vec_stvfrx (vector signed int, long, vector signed int *); -+void vec_stvfrx (vector signed int, long, signed int *); -+void vec_stvfrx (vector unsigned int, long, vector unsigned int *); -+void vec_stvfrx (vector unsigned int, long, unsigned int *); -+void vec_stvfrx (vector bool short, long, vector bool short *); -+void vec_stvfrx (vector pixel, long, vector pixel *); -+void vec_stvfrx (vector signed short, long, vector signed short *); -+void vec_stvfrx (vector signed short, long, signed short *); -+void vec_stvfrx (vector unsigned short, long, vector unsigned short *); -+void vec_stvfrx (vector unsigned short, long, unsigned short *); -+void vec_stvfrx (vector bool char, long, vector bool char *); -+void vec_stvfrx (vector signed char, long, vector signed char *); -+void vec_stvfrx (vector signed char, long, signed char *); -+void vec_stvfrx (vector unsigned char, long, vector unsigned char *); -+void vec_stvfrx (vector unsigned char, long, unsigned char *); -+void vec_stvfrxl (vector float, long, vector float *); -+void vec_stvfrxl (vector float, long, float *); -+void vec_stvfrxl (vector bool int, long, vector bool int *); -+void vec_stvfrxl (vector signed int, long, vector signed int *); -+void vec_stvfrxl (vector signed int, long, signed int *); -+void vec_stvfrxl (vector unsigned int, long, vector unsigned int *); -+void vec_stvfrxl (vector unsigned int, long, unsigned int *); -+void vec_stvfrxl (vector bool short, long, vector bool short *); -+void vec_stvfrxl (vector pixel, long, vector pixel *); -+void vec_stvfrxl (vector signed short, long, vector signed short *); -+void vec_stvfrxl (vector signed short, long, signed short *); -+void vec_stvfrxl (vector unsigned short, long, vector unsigned short *); -+void vec_stvfrxl (vector unsigned short, long, unsigned short *); -+void vec_stvfrxl (vector bool char, long, vector bool char *); -+void vec_stvfrxl (vector signed char, long, vector signed char *); -+void vec_stvfrxl (vector signed char, long, signed char *); -+void vec_stvfrxl (vector unsigned char, long, vector unsigned char *); -+void vec_stvfrxl (vector unsigned char, long, unsigned char *); -+ -+vector float vec_lvswx (long, vector float *); -+vector float vec_lvswx (long, float *); -+vector bool int vec_lvswx (long, vector bool int *); -+vector signed int vec_lvswx (long, vector signed int *); -+vector signed int vec_lvswx (long, signed int *); -+vector unsigned int vec_lvswx (long, vector unsigned int *); -+vector unsigned int vec_lvswx (long, unsigned int *); -+vector bool short vec_lvswx (long, vector bool short *); -+vector pixel vec_lvswx (long, vector pixel *); -+vector signed short vec_lvswx (long, vector signed short *); -+vector signed short vec_lvswx (long, signed short *); -+vector unsigned short vec_lvswx (long, vector unsigned short *); -+vector unsigned short vec_lvswx (long, unsigned short *); -+vector bool char vec_lvswx (long, vector bool char *); -+vector signed char vec_lvswx (long, vector signed char *); -+vector signed char vec_lvswx (long, signed char *); -+vector unsigned char vec_lvswx (long, vector unsigned char *); -+vector unsigned char vec_lvswx (long, unsigned char *); -+vector float vec_lvswxl (long, vector float *); -+vector float vec_lvswxl (long, float *); -+vector bool int vec_lvswxl (long, vector bool int *); -+vector signed int vec_lvswxl (long, vector signed int *); -+vector signed int vec_lvswxl (long, signed int *); -+vector unsigned int vec_lvswxl (long, vector unsigned int *); -+vector unsigned int vec_lvswxl (long, unsigned int *); -+vector bool short vec_lvswxl (long, vector bool short *); -+vector pixel vec_lvswxl (long, vector pixel *); -+vector signed short vec_lvswxl (long, vector signed short *); -+vector signed short vec_lvswxl (long, signed short *); -+vector unsigned short vec_lvswxl (long, vector unsigned short *); -+vector unsigned short vec_lvswxl (long, unsigned short *); -+vector bool char vec_lvswxl (long, vector bool char *); -+vector signed char vec_lvswxl (long, vector signed char *); -+vector signed char vec_lvswxl (long, signed char *); -+vector unsigned char vec_lvswxl (long, vector unsigned char *); -+vector unsigned char vec_lvswxl (long, unsigned char *); -+ -+void vec_stvswx (vector float, long, vector float *); -+void vec_stvswx (vector float, long, float *); -+void vec_stvswx (vector bool int, long, vector bool int *); -+void vec_stvswx (vector signed int, long, vector signed int *); -+void vec_stvswx (vector signed int, long, signed int *); -+void vec_stvswx (vector unsigned int, long, vector unsigned int *); -+void vec_stvswx (vector unsigned int, long, unsigned int *); -+void vec_stvswx (vector bool short, long, vector bool short *); -+void vec_stvswx (vector pixel, long, vector pixel *); -+void vec_stvswx (vector signed short, long, vector signed short *); -+void vec_stvswx (vector signed short, long, signed short *); -+void vec_stvswx (vector unsigned short, long, vector unsigned short *); -+void vec_stvswx (vector unsigned short, long, unsigned short *); -+void vec_stvswx (vector bool char, long, vector bool char *); -+void vec_stvswx (vector signed char, long, vector signed char *); -+void vec_stvswx (vector signed char, long, signed char *); -+void vec_stvswx (vector unsigned char, long, vector unsigned char *); -+void vec_stvswx (vector unsigned char, long, unsigned char *); -+void vec_stvswxl (vector float, long, vector float *); -+void vec_stvswxl (vector float, long, float *); -+void vec_stvswxl (vector bool int, long, vector bool int *); -+void vec_stvswxl (vector signed int, long, vector signed int *); -+void vec_stvswxl (vector signed int, long, signed int *); -+void vec_stvswxl (vector unsigned int, long, vector unsigned int *); -+void vec_stvswxl (vector unsigned int, long, unsigned int *); -+void vec_stvswxl (vector bool short, long, vector bool short *); -+void vec_stvswxl (vector pixel, long, vector pixel *); -+void vec_stvswxl (vector signed short, long, vector signed short *); -+void vec_stvswxl (vector signed short, long, signed short *); -+void vec_stvswxl (vector unsigned short, long, vector unsigned short *); -+void vec_stvswxl (vector unsigned short, long, unsigned short *); -+void vec_stvswxl (vector bool char, long, vector bool char *); -+void vec_stvswxl (vector signed char, long, vector signed char *); -+void vec_stvswxl (vector signed char, long, signed char *); -+void vec_stvswxl (vector unsigned char, long, vector unsigned char *); -+void vec_stvswxl (vector unsigned char, long, unsigned char *); -+ -+vector float vec_lvsm (long, vector float *); -+vector float vec_lvsm (long, float *); -+vector bool int vec_lvsm (long, vector bool int *); -+vector signed int vec_lvsm (long, vector signed int *); -+vector signed int vec_lvsm (long, signed int *); -+vector unsigned int vec_lvsm (long, vector unsigned int *); -+vector unsigned int vec_lvsm (long, unsigned int *); -+vector bool short vec_lvsm (long, vector bool short *); -+vector pixel vec_lvsm (long, vector pixel *); -+vector signed short vec_lvsm (long, vector signed short *); -+vector signed short vec_lvsm (long, signed short *); -+vector unsigned short vec_lvsm (long, vector unsigned short *); -+vector unsigned short vec_lvsm (long, unsigned short *); -+vector bool char vec_lvsm (long, vector bool char *); -+vector signed char vec_lvsm (long, vector signed char *); -+vector signed char vec_lvsm (long, signed char *); -+vector unsigned char vec_lvsm (long, vector unsigned char *); -+vector unsigned char vec_lvsm (long, unsigned char *); -+@end smallexample -+ - GCC provides a few other builtins on Powerpc to access certain instructions: - @smallexample - float __builtin_recipdivf (float, float); -diff -ruN gcc-4.6.2-orig/gcc/doc/invoke.texi gcc-4.6.2/gcc/doc/invoke.texi ---- gcc-4.6.2-orig/gcc/doc/invoke.texi 2011-10-24 07:22:21.000000000 -0500 -+++ gcc-4.6.2/gcc/doc/invoke.texi 2012-03-06 12:56:49.402039002 -0600 -@@ -770,7 +770,7 @@ - -mcmodel=@var{code-model} @gol - -mpower -mno-power -mpower2 -mno-power2 @gol - -mpowerpc -mpowerpc64 -mno-powerpc @gol ---maltivec -mno-altivec @gol -+-maltivec -mno-altivec -maltivec2 -mno-altivec2 @gol - -mpowerpc-gpopt -mno-powerpc-gpopt @gol - -mpowerpc-gfxopt -mno-powerpc-gfxopt @gol - -mmfcrf -mno-mfcrf -mpopcntb -mno-popcntb -mpopcntd -mno-popcntd @gol -@@ -15536,16 +15536,21 @@ - The @option{-mpopcntb} option allows GCC to generate the popcount and - double precision FP reciprocal estimate instruction implemented on the - POWER5 processor and other processors that support the PowerPC V2.02 --architecture. --The @option{-mpopcntd} option allows GCC to generate the popcount --instruction implemented on the POWER7 processor and other processors --that support the PowerPC V2.06 architecture. -+architecture. On the e5500 and e6500 processors, only the popcount -+instruction is generated. -+The @option{-mpopcntd} option allows GCC to generate the popcount and -+double word to FP conversion instructions implemented on the POWER7 -+processor and other processors that support the PowerPC V2.06 -+architecture. On the e5500 and e6500 processors, only the popcount -+instruction is generated. - The @option{-mfprnd} option allows GCC to generate the FP round to - integer instructions implemented on the POWER5+ processor and other - processors that support the PowerPC V2.03 architecture. - The @option{-mcmpb} option allows GCC to generate the compare bytes --instruction implemented on the POWER6 processor and other processors --that support the PowerPC V2.05 architecture. -+and copy sign instructions implemented on the POWER6 processor and -+other processors that support the PowerPC V2.05 architecture. On the -+e5500 and e6500 processors, only the compare bytes instruction is -+generated. - The @option{-mmfpgpr} option allows GCC to generate the FP move to/from - general purpose register instructions implemented on the POWER6X - processor and other processors that support the extended PowerPC V2.05 -@@ -15592,11 +15597,13 @@ - @samp{603e}, @samp{604}, @samp{604e}, @samp{620}, @samp{630}, @samp{740}, - @samp{7400}, @samp{7450}, @samp{750}, @samp{801}, @samp{821}, @samp{823}, - @samp{860}, @samp{970}, @samp{8540}, @samp{a2}, @samp{e300c2}, --@samp{e300c3}, @samp{e500mc}, @samp{e500mc64}, @samp{ec603e}, @samp{G3}, --@samp{G4}, @samp{G5}, @samp{titan}, @samp{power}, @samp{power2}, @samp{power3}, --@samp{power4}, @samp{power5}, @samp{power5+}, @samp{power6}, @samp{power6x}, --@samp{power7}, @samp{common}, @samp{powerpc}, @samp{powerpc64}, @samp{rios}, --@samp{rios1}, @samp{rios2}, @samp{rsc}, and @samp{rs64}. -+@samp{e300c3}, @samp{e500mc}, @samp{e500mc64}, @samp{e5500}, -+@samp{e6500}, @samp{ec603e}, @samp{G3}, @samp{G4}, @samp{G5}, -+@samp{titan}, @samp{power}, @samp{power2}, @samp{power3}, -+@samp{power4}, @samp{power5}, @samp{power5+}, @samp{power6}, -+@samp{power6x}, @samp{power7}, @samp{common}, @samp{powerpc}, -+@samp{powerpc64}, @samp{rios}, @samp{rios1}, @samp{rios2}, @samp{rsc}, -+and @samp{rs64}. - - @option{-mcpu=common} selects a completely generic processor. Code - generated under this option will run on any POWER or PowerPC processor. -@@ -15617,10 +15624,11 @@ - The @option{-mcpu} options automatically enable or disable the - following options: - --@gccoptlist{-maltivec -mfprnd -mhard-float -mmfcrf -mmultiple @gol ---mnew-mnemonics -mpopcntb -mpopcntd -mpower -mpower2 -mpowerpc64 @gol ---mpowerpc-gpopt -mpowerpc-gfxopt -msingle-float -mdouble-float @gol ---msimple-fpu -mstring -mmulhw -mdlmzb -mmfpgpr -mvsx} -+@gccoptlist{-maltivec -maltivec2 -mfprnd -mhard-float -mmfcrf -+-mmultiple @gol -mnew-mnemonics -mpopcntb -mpopcntd -mpower -mpower2 -+-mpowerpc64 @gol -mpowerpc-gpopt -mpowerpc-gfxopt -msingle-float -+-mdouble-float @gol -msimple-fpu -mstring -mmulhw -mdlmzb -mmfpgpr -+-mvsx} - - The particular options set for any particular CPU will vary between - compiler versions, depending on what setting seems to produce optimal -@@ -15671,6 +15679,16 @@ - @option{-mabi=altivec} to adjust the current ABI with AltiVec ABI - enhancements. - -+@item -maltivec2 -+@itemx -mno-altivec2 -+@opindex maltivec2 -+@opindex mno-altivec2 -+Generate code that uses (does not use) AltiVec2 instructions, and also -+enable the use of built-in functions that allow more direct access to -+the AltiVec2 instruction set. You may also need to set -+@option{-mabi=altivec} to adjust the current ABI with AltiVec ABI -+enhancements. -+ - @item -mvrsave - @itemx -mno-vrsave - @opindex mvrsave -diff -ruN gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-10.c gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-10.c ---- gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-10.c 1969-12-31 18:00:00.000000000 -0600 -+++ gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-10.c 2012-03-06 12:31:05.152039004 -0600 -@@ -0,0 +1,66 @@ -+/* { dg-do compile { target { powerpc*-*-* } } } */ -+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */ -+/* { dg-require-effective-target powerpc_altivec_ok } */ -+/* { dg-options "-O2 -maltivec -maltivec2" } */ -+/* { dg-final { scan-assembler-times "lvtlx" 37 } } */ -+ -+#include -+ -+typedef __vector signed char vsc; -+typedef __vector signed short vss; -+typedef __vector signed int vsi; -+typedef __vector unsigned char vuc; -+typedef __vector unsigned short vus; -+typedef __vector unsigned int vui; -+typedef __vector bool char vbc; -+typedef __vector bool short vbs; -+typedef __vector bool int vbi; -+typedef __vector float vsf; -+typedef __vector pixel vp; -+typedef signed char sc; -+typedef signed short ss; -+typedef signed int si; -+typedef signed long sl; -+typedef unsigned char uc; -+typedef unsigned short us; -+typedef unsigned int ui; -+typedef unsigned long ul; -+typedef float sf; -+ -+vsc lc1(long a, void *p) { return __builtin_altivec_lvtlx (a,p); } -+vsf llx01(long a, vsf *p) { return __builtin_vec_lvtlx (a,p); } -+vsf llx02(long a, sf *p) { return __builtin_vec_lvtlx (a,p); } -+vbi llx03(long a, vbi *p) { return __builtin_vec_lvtlx (a,p); } -+vsi llx04(long a, vsi *p) { return __builtin_vec_lvtlx (a,p); } -+vsi llx05(long a, si *p) { return __builtin_vec_lvtlx (a,p); } -+vui llx06(long a, vui *p) { return __builtin_vec_lvtlx (a,p); } -+vui llx07(long a, ui *p) { return __builtin_vec_lvtlx (a,p); } -+vbs llx08(long a, vbs *p) { return __builtin_vec_lvtlx (a,p); } -+vp llx09(long a, vp *p) { return __builtin_vec_lvtlx (a,p); } -+vss llx10(long a, vss *p) { return __builtin_vec_lvtlx (a,p); } -+vss llx11(long a, ss *p) { return __builtin_vec_lvtlx (a,p); } -+vus llx12(long a, vus *p) { return __builtin_vec_lvtlx (a,p); } -+vus llx13(long a, us *p) { return __builtin_vec_lvtlx (a,p); } -+vbc llx14(long a, vbc *p) { return __builtin_vec_lvtlx (a,p); } -+vsc llx15(long a, vsc *p) { return __builtin_vec_lvtlx (a,p); } -+vsc llx16(long a, sc *p) { return __builtin_vec_lvtlx (a,p); } -+vuc llx17(long a, vuc *p) { return __builtin_vec_lvtlx (a,p); } -+vuc llx18(long a, uc *p) { return __builtin_vec_lvtlx (a,p); } -+vsf Dllx01(long a, vsf *p) { return vec_lvtlx (a,p); } -+vsf Dllx02(long a, sf *p) { return vec_lvtlx (a,p); } -+vbi Dllx03(long a, vbi *p) { return vec_lvtlx (a,p); } -+vsi Dllx04(long a, vsi *p) { return vec_lvtlx (a,p); } -+vsi Dllx05(long a, si *p) { return vec_lvtlx (a,p); } -+vui Dllx06(long a, vui *p) { return vec_lvtlx (a,p); } -+vui Dllx07(long a, ui *p) { return vec_lvtlx (a,p); } -+vbs Dllx08(long a, vbs *p) { return vec_lvtlx (a,p); } -+vp Dllx09(long a, vp *p) { return vec_lvtlx (a,p); } -+vss Dllx10(long a, vss *p) { return vec_lvtlx (a,p); } -+vss Dllx11(long a, ss *p) { return vec_lvtlx (a,p); } -+vus Dllx12(long a, vus *p) { return vec_lvtlx (a,p); } -+vus Dllx13(long a, us *p) { return vec_lvtlx (a,p); } -+vbc Dllx14(long a, vbc *p) { return vec_lvtlx (a,p); } -+vsc Dllx15(long a, vsc *p) { return vec_lvtlx (a,p); } -+vsc Dllx16(long a, sc *p) { return vec_lvtlx (a,p); } -+vuc Dllx17(long a, vuc *p) { return vec_lvtlx (a,p); } -+vuc Dllx18(long a, uc *p) { return vec_lvtlx (a,p); } -diff -ruN gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-11.c gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-11.c ---- gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-11.c 1969-12-31 18:00:00.000000000 -0600 -+++ gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-11.c 2012-03-06 12:31:05.153039004 -0600 -@@ -0,0 +1,66 @@ -+/* { dg-do compile { target { powerpc*-*-* } } } */ -+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */ -+/* { dg-require-effective-target powerpc_altivec_ok } */ -+/* { dg-options "-O2 -maltivec -maltivec2" } */ -+/* { dg-final { scan-assembler-times "lvtlxl" 37 } } */ -+ -+#include -+ -+typedef __vector signed char vsc; -+typedef __vector signed short vss; -+typedef __vector signed int vsi; -+typedef __vector unsigned char vuc; -+typedef __vector unsigned short vus; -+typedef __vector unsigned int vui; -+typedef __vector bool char vbc; -+typedef __vector bool short vbs; -+typedef __vector bool int vbi; -+typedef __vector float vsf; -+typedef __vector pixel vp; -+typedef signed char sc; -+typedef signed short ss; -+typedef signed int si; -+typedef signed long sl; -+typedef unsigned char uc; -+typedef unsigned short us; -+typedef unsigned int ui; -+typedef unsigned long ul; -+typedef float sf; -+ -+vsc lc2(long a, void *p) { return __builtin_altivec_lvtlxl (a,p); } -+vsf llxl01(long a, vsf *p) { return __builtin_vec_lvtlxl (a,p); } -+vsf llxl02(long a, sf *p) { return __builtin_vec_lvtlxl (a,p); } -+vbi llxl03(long a, vbi *p) { return __builtin_vec_lvtlxl (a,p); } -+vsi llxl04(long a, vsi *p) { return __builtin_vec_lvtlxl (a,p); } -+vsi llxl05(long a, si *p) { return __builtin_vec_lvtlxl (a,p); } -+vui llxl06(long a, vui *p) { return __builtin_vec_lvtlxl (a,p); } -+vui llxl07(long a, ui *p) { return __builtin_vec_lvtlxl (a,p); } -+vbs llxl08(long a, vbs *p) { return __builtin_vec_lvtlxl (a,p); } -+vp llxl09(long a, vp *p) { return __builtin_vec_lvtlxl (a,p); } -+vss llxl10(long a, vss *p) { return __builtin_vec_lvtlxl (a,p); } -+vss llxl11(long a, ss *p) { return __builtin_vec_lvtlxl (a,p); } -+vus llxl12(long a, vus *p) { return __builtin_vec_lvtlxl (a,p); } -+vus llxl13(long a, us *p) { return __builtin_vec_lvtlxl (a,p); } -+vbc llxl14(long a, vbc *p) { return __builtin_vec_lvtlxl (a,p); } -+vsc llxl15(long a, vsc *p) { return __builtin_vec_lvtlxl (a,p); } -+vsc llxl16(long a, sc *p) { return __builtin_vec_lvtlxl (a,p); } -+vuc llxl17(long a, vuc *p) { return __builtin_vec_lvtlxl (a,p); } -+vuc llxl18(long a, uc *p) { return __builtin_vec_lvtlxl (a,p); } -+vsf Dllxl01(long a, vsf *p) { return vec_lvtlxl (a,p); } -+vsf Dllxl02(long a, sf *p) { return vec_lvtlxl (a,p); } -+vbi Dllxl03(long a, vbi *p) { return vec_lvtlxl (a,p); } -+vsi Dllxl04(long a, vsi *p) { return vec_lvtlxl (a,p); } -+vsi Dllxl05(long a, si *p) { return vec_lvtlxl (a,p); } -+vui Dllxl06(long a, vui *p) { return vec_lvtlxl (a,p); } -+vui Dllxl07(long a, ui *p) { return vec_lvtlxl (a,p); } -+vbs Dllxl08(long a, vbs *p) { return vec_lvtlxl (a,p); } -+vp Dllxl09(long a, vp *p) { return vec_lvtlxl (a,p); } -+vss Dllxl10(long a, vss *p) { return vec_lvtlxl (a,p); } -+vss Dllxl11(long a, ss *p) { return vec_lvtlxl (a,p); } -+vus Dllxl12(long a, vus *p) { return vec_lvtlxl (a,p); } -+vus Dllxl13(long a, us *p) { return vec_lvtlxl (a,p); } -+vbc Dllxl14(long a, vbc *p) { return vec_lvtlxl (a,p); } -+vsc Dllxl15(long a, vsc *p) { return vec_lvtlxl (a,p); } -+vsc Dllxl16(long a, sc *p) { return vec_lvtlxl (a,p); } -+vuc Dllxl17(long a, vuc *p) { return vec_lvtlxl (a,p); } -+vuc Dllxl18(long a, uc *p) { return vec_lvtlxl (a,p); } -diff -ruN gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-12.c gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-12.c ---- gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-12.c 1969-12-31 18:00:00.000000000 -0600 -+++ gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-12.c 2012-03-06 12:31:05.153039004 -0600 -@@ -0,0 +1,66 @@ -+/* { dg-do compile { target { powerpc*-*-* } } } */ -+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */ -+/* { dg-require-effective-target powerpc_altivec_ok } */ -+/* { dg-options "-O2 -maltivec -maltivec2" } */ -+/* { dg-final { scan-assembler-times "lvtrx" 37 } } */ -+ -+#include -+ -+typedef __vector signed char vsc; -+typedef __vector signed short vss; -+typedef __vector signed int vsi; -+typedef __vector unsigned char vuc; -+typedef __vector unsigned short vus; -+typedef __vector unsigned int vui; -+typedef __vector bool char vbc; -+typedef __vector bool short vbs; -+typedef __vector bool int vbi; -+typedef __vector float vsf; -+typedef __vector pixel vp; -+typedef signed char sc; -+typedef signed short ss; -+typedef signed int si; -+typedef signed long sl; -+typedef unsigned char uc; -+typedef unsigned short us; -+typedef unsigned int ui; -+typedef unsigned long ul; -+typedef float sf; -+ -+vsc lc3(long a, void *p) { return __builtin_altivec_lvtrx (a,p); } -+vsf lrx01(long a, vsf *p) { return __builtin_vec_lvtrx (a,p); } -+vsf lrx02(long a, sf *p) { return __builtin_vec_lvtrx (a,p); } -+vbi lrx03(long a, vbi *p) { return __builtin_vec_lvtrx (a,p); } -+vsi lrx04(long a, vsi *p) { return __builtin_vec_lvtrx (a,p); } -+vsi lrx05(long a, si *p) { return __builtin_vec_lvtrx (a,p); } -+vui lrx06(long a, vui *p) { return __builtin_vec_lvtrx (a,p); } -+vui lrx07(long a, ui *p) { return __builtin_vec_lvtrx (a,p); } -+vbs lrx08(long a, vbs *p) { return __builtin_vec_lvtrx (a,p); } -+vp lrx09(long a, vp *p) { return __builtin_vec_lvtrx (a,p); } -+vss lrx10(long a, vss *p) { return __builtin_vec_lvtrx (a,p); } -+vss lrx11(long a, ss *p) { return __builtin_vec_lvtrx (a,p); } -+vus lrx12(long a, vus *p) { return __builtin_vec_lvtrx (a,p); } -+vus lrx13(long a, us *p) { return __builtin_vec_lvtrx (a,p); } -+vbc lrx14(long a, vbc *p) { return __builtin_vec_lvtrx (a,p); } -+vsc lrx15(long a, vsc *p) { return __builtin_vec_lvtrx (a,p); } -+vsc lrx16(long a, sc *p) { return __builtin_vec_lvtrx (a,p); } -+vuc lrx17(long a, vuc *p) { return __builtin_vec_lvtrx (a,p); } -+vuc lrx18(long a, uc *p) { return __builtin_vec_lvtrx (a,p); } -+vsf Dlrx01(long a, vsf *p) { return vec_lvtrx (a,p); } -+vsf Dlrx02(long a, sf *p) { return vec_lvtrx (a,p); } -+vbi Dlrx03(long a, vbi *p) { return vec_lvtrx (a,p); } -+vsi Dlrx04(long a, vsi *p) { return vec_lvtrx (a,p); } -+vsi Dlrx05(long a, si *p) { return vec_lvtrx (a,p); } -+vui Dlrx06(long a, vui *p) { return vec_lvtrx (a,p); } -+vui Dlrx07(long a, ui *p) { return vec_lvtrx (a,p); } -+vbs Dlrx08(long a, vbs *p) { return vec_lvtrx (a,p); } -+vp Dlrx09(long a, vp *p) { return vec_lvtrx (a,p); } -+vss Dlrx10(long a, vss *p) { return vec_lvtrx (a,p); } -+vss Dlrx11(long a, ss *p) { return vec_lvtrx (a,p); } -+vus Dlrx12(long a, vus *p) { return vec_lvtrx (a,p); } -+vus Dlrx13(long a, us *p) { return vec_lvtrx (a,p); } -+vbc Dlrx14(long a, vbc *p) { return vec_lvtrx (a,p); } -+vsc Dlrx15(long a, vsc *p) { return vec_lvtrx (a,p); } -+vsc Dlrx16(long a, sc *p) { return vec_lvtrx (a,p); } -+vuc Dlrx17(long a, vuc *p) { return vec_lvtrx (a,p); } -+vuc Dlrx18(long a, uc *p) { return vec_lvtrx (a,p); } -diff -ruN gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-13.c gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-13.c ---- gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-13.c 1969-12-31 18:00:00.000000000 -0600 -+++ gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-13.c 2012-03-06 12:31:05.153039004 -0600 -@@ -0,0 +1,66 @@ -+/* { dg-do compile { target { powerpc*-*-* } } } */ -+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */ -+/* { dg-require-effective-target powerpc_altivec_ok } */ -+/* { dg-options "-O2 -maltivec -maltivec2" } */ -+/* { dg-final { scan-assembler-times "lvtrxl" 37 } } */ -+ -+#include -+ -+typedef __vector signed char vsc; -+typedef __vector signed short vss; -+typedef __vector signed int vsi; -+typedef __vector unsigned char vuc; -+typedef __vector unsigned short vus; -+typedef __vector unsigned int vui; -+typedef __vector bool char vbc; -+typedef __vector bool short vbs; -+typedef __vector bool int vbi; -+typedef __vector float vsf; -+typedef __vector pixel vp; -+typedef signed char sc; -+typedef signed short ss; -+typedef signed int si; -+typedef signed long sl; -+typedef unsigned char uc; -+typedef unsigned short us; -+typedef unsigned int ui; -+typedef unsigned long ul; -+typedef float sf; -+ -+vsc lc4(long a, void *p) { return __builtin_altivec_lvtrxl (a,p); } -+vsf lrxl01(long a, vsf *p) { return __builtin_vec_lvtrxl (a,p); } -+vsf lrxl02(long a, sf *p) { return __builtin_vec_lvtrxl (a,p); } -+vbi lrxl03(long a, vbi *p) { return __builtin_vec_lvtrxl (a,p); } -+vsi lrxl04(long a, vsi *p) { return __builtin_vec_lvtrxl (a,p); } -+vsi lrxl05(long a, si *p) { return __builtin_vec_lvtrxl (a,p); } -+vui lrxl06(long a, vui *p) { return __builtin_vec_lvtrxl (a,p); } -+vui lrxl07(long a, ui *p) { return __builtin_vec_lvtrxl (a,p); } -+vbs lrxl08(long a, vbs *p) { return __builtin_vec_lvtrxl (a,p); } -+vp lrxl09(long a, vp *p) { return __builtin_vec_lvtrxl (a,p); } -+vss lrxl10(long a, vss *p) { return __builtin_vec_lvtrxl (a,p); } -+vss lrxl11(long a, ss *p) { return __builtin_vec_lvtrxl (a,p); } -+vus lrxl12(long a, vus *p) { return __builtin_vec_lvtrxl (a,p); } -+vus lrxl13(long a, us *p) { return __builtin_vec_lvtrxl (a,p); } -+vbc lrxl14(long a, vbc *p) { return __builtin_vec_lvtrxl (a,p); } -+vsc lrxl15(long a, vsc *p) { return __builtin_vec_lvtrxl (a,p); } -+vsc lrxl16(long a, sc *p) { return __builtin_vec_lvtrxl (a,p); } -+vuc lrxl17(long a, vuc *p) { return __builtin_vec_lvtrxl (a,p); } -+vuc lrxl18(long a, uc *p) { return __builtin_vec_lvtrxl (a,p); } -+vsf Dlrxl01(long a, vsf *p) { return vec_lvtrxl (a,p); } -+vsf Dlrxl02(long a, sf *p) { return vec_lvtrxl (a,p); } -+vbi Dlrxl03(long a, vbi *p) { return vec_lvtrxl (a,p); } -+vsi Dlrxl04(long a, vsi *p) { return vec_lvtrxl (a,p); } -+vsi Dlrxl05(long a, si *p) { return vec_lvtrxl (a,p); } -+vui Dlrxl06(long a, vui *p) { return vec_lvtrxl (a,p); } -+vui Dlrxl07(long a, ui *p) { return vec_lvtrxl (a,p); } -+vbs Dlrxl08(long a, vbs *p) { return vec_lvtrxl (a,p); } -+vp Dlrxl09(long a, vp *p) { return vec_lvtrxl (a,p); } -+vss Dlrxl10(long a, vss *p) { return vec_lvtrxl (a,p); } -+vss Dlrxl11(long a, ss *p) { return vec_lvtrxl (a,p); } -+vus Dlrxl12(long a, vus *p) { return vec_lvtrxl (a,p); } -+vus Dlrxl13(long a, us *p) { return vec_lvtrxl (a,p); } -+vbc Dlrxl14(long a, vbc *p) { return vec_lvtrxl (a,p); } -+vsc Dlrxl15(long a, vsc *p) { return vec_lvtrxl (a,p); } -+vsc Dlrxl16(long a, sc *p) { return vec_lvtrxl (a,p); } -+vuc Dlrxl17(long a, vuc *p) { return vec_lvtrxl (a,p); } -+vuc Dlrxl18(long a, uc *p) { return vec_lvtrxl (a,p); } -diff -ruN gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-14.c gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-14.c ---- gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-14.c 1969-12-31 18:00:00.000000000 -0600 -+++ gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-14.c 2012-03-06 12:31:05.154039003 -0600 -@@ -0,0 +1,66 @@ -+/* { dg-do compile { target { powerpc*-*-* } } } */ -+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */ -+/* { dg-require-effective-target powerpc_altivec_ok } */ -+/* { dg-options "-O2 -maltivec -maltivec2" } */ -+/* { dg-final { scan-assembler-times "stvflx" 37 } } */ -+ -+#include -+ -+typedef __vector signed char vsc; -+typedef __vector signed short vss; -+typedef __vector signed int vsi; -+typedef __vector unsigned char vuc; -+typedef __vector unsigned short vus; -+typedef __vector unsigned int vui; -+typedef __vector bool char vbc; -+typedef __vector bool short vbs; -+typedef __vector bool int vbi; -+typedef __vector float vsf; -+typedef __vector pixel vp; -+typedef signed char sc; -+typedef signed short ss; -+typedef signed int si; -+typedef signed long sl; -+typedef unsigned char uc; -+typedef unsigned short us; -+typedef unsigned int ui; -+typedef unsigned long ul; -+typedef float sf; -+ -+void sc1(vsc v, long a, void *p) { __builtin_altivec_stvflx (v,a,p); } -+void slx01(vsf v, long a, vsf *p) { __builtin_vec_stvflx (v,a,p); } -+void slx02(vsf v, long a, sf *p) { __builtin_vec_stvflx (v,a,p); } -+void slx03(vbi v, long a, vbi *p) { __builtin_vec_stvflx (v,a,p); } -+void slx04(vsi v, long a, vsi *p) { __builtin_vec_stvflx (v,a,p); } -+void slx05(vsi v, long a, si *p) { __builtin_vec_stvflx (v,a,p); } -+void slx06(vui v, long a, vui *p) { __builtin_vec_stvflx (v,a,p); } -+void slx07(vui v, long a, ui *p) { __builtin_vec_stvflx (v,a,p); } -+void slx08(vbs v, long a, vbs *p) { __builtin_vec_stvflx (v,a,p); } -+void slx09(vp v, long a, vp *p) { __builtin_vec_stvflx (v,a,p); } -+void slx10(vss v, long a, vss *p) { __builtin_vec_stvflx (v,a,p); } -+void slx11(vss v, long a, ss *p) { __builtin_vec_stvflx (v,a,p); } -+void slx12(vus v, long a, vus *p) { __builtin_vec_stvflx (v,a,p); } -+void slx13(vus v, long a, us *p) { __builtin_vec_stvflx (v,a,p); } -+void slx14(vbc v, long a, vbc *p) { __builtin_vec_stvflx (v,a,p); } -+void slx15(vsc v, long a, vsc *p) { __builtin_vec_stvflx (v,a,p); } -+void slx16(vsc v, long a, sc *p) { __builtin_vec_stvflx (v,a,p); } -+void slx17(vuc v, long a, vuc *p) { __builtin_vec_stvflx (v,a,p); } -+void slx18(vuc v, long a, uc *p) { __builtin_vec_stvflx (v,a,p); } -+void Dslx01(vsf v, long a, vsf *p) { vec_stvflx (v,a,p); } -+void Dslx02(vsf v, long a, sf *p) { vec_stvflx (v,a,p); } -+void Dslx03(vbi v, long a, vbi *p) { vec_stvflx (v,a,p); } -+void Dslx04(vsi v, long a, vsi *p) { vec_stvflx (v,a,p); } -+void Dslx05(vsi v, long a, si *p) { vec_stvflx (v,a,p); } -+void Dslx06(vui v, long a, vui *p) { vec_stvflx (v,a,p); } -+void Dslx07(vui v, long a, ui *p) { vec_stvflx (v,a,p); } -+void Dslx08(vbs v, long a, vbs *p) { vec_stvflx (v,a,p); } -+void Dslx09(vp v, long a, vp *p) { vec_stvflx (v,a,p); } -+void Dslx10(vss v, long a, vss *p) { vec_stvflx (v,a,p); } -+void Dslx11(vss v, long a, ss *p) { vec_stvflx (v,a,p); } -+void Dslx12(vus v, long a, vus *p) { vec_stvflx (v,a,p); } -+void Dslx13(vus v, long a, us *p) { vec_stvflx (v,a,p); } -+void Dslx14(vbc v, long a, vbc *p) { vec_stvflx (v,a,p); } -+void Dslx15(vsc v, long a, vsc *p) { vec_stvflx (v,a,p); } -+void Dslx16(vsc v, long a, sc *p) { vec_stvflx (v,a,p); } -+void Dslx17(vuc v, long a, vuc *p) { vec_stvflx (v,a,p); } -+void Dslx18(vuc v, long a, uc *p) { vec_stvflx (v,a,p); } -diff -ruN gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-15.c gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-15.c ---- gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-15.c 1969-12-31 18:00:00.000000000 -0600 -+++ gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-15.c 2012-03-06 12:31:05.154039003 -0600 -@@ -0,0 +1,66 @@ -+/* { dg-do compile { target { powerpc*-*-* } } } */ -+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */ -+/* { dg-require-effective-target powerpc_altivec_ok } */ -+/* { dg-options "-O2 -maltivec -maltivec2" } */ -+/* { dg-final { scan-assembler-times "stvflxl" 37 } } */ -+ -+#include -+ -+typedef __vector signed char vsc; -+typedef __vector signed short vss; -+typedef __vector signed int vsi; -+typedef __vector unsigned char vuc; -+typedef __vector unsigned short vus; -+typedef __vector unsigned int vui; -+typedef __vector bool char vbc; -+typedef __vector bool short vbs; -+typedef __vector bool int vbi; -+typedef __vector float vsf; -+typedef __vector pixel vp; -+typedef signed char sc; -+typedef signed short ss; -+typedef signed int si; -+typedef signed long sl; -+typedef unsigned char uc; -+typedef unsigned short us; -+typedef unsigned int ui; -+typedef unsigned long ul; -+typedef float sf; -+ -+void sc2(vsc v, long a, void *p) { __builtin_altivec_stvflxl (v,a,p); } -+void slxl01(vsf v, long a, vsf *p) { __builtin_vec_stvflxl (v,a,p); } -+void slxl02(vsf v, long a, sf *p) { __builtin_vec_stvflxl (v,a,p); } -+void slxl03(vbi v, long a, vbi *p) { __builtin_vec_stvflxl (v,a,p); } -+void slxl04(vsi v, long a, vsi *p) { __builtin_vec_stvflxl (v,a,p); } -+void slxl05(vsi v, long a, si *p) { __builtin_vec_stvflxl (v,a,p); } -+void slxl06(vui v, long a, vui *p) { __builtin_vec_stvflxl (v,a,p); } -+void slxl07(vui v, long a, ui *p) { __builtin_vec_stvflxl (v,a,p); } -+void slxl08(vbs v, long a, vbs *p) { __builtin_vec_stvflxl (v,a,p); } -+void slxl09(vp v, long a, vp *p) { __builtin_vec_stvflxl (v,a,p); } -+void slxl10(vss v, long a, vss *p) { __builtin_vec_stvflxl (v,a,p); } -+void slxl11(vss v, long a, ss *p) { __builtin_vec_stvflxl (v,a,p); } -+void slxl12(vus v, long a, vus *p) { __builtin_vec_stvflxl (v,a,p); } -+void slxl13(vus v, long a, us *p) { __builtin_vec_stvflxl (v,a,p); } -+void slxl14(vbc v, long a, vbc *p) { __builtin_vec_stvflxl (v,a,p); } -+void slxl15(vsc v, long a, vsc *p) { __builtin_vec_stvflxl (v,a,p); } -+void slxl16(vsc v, long a, sc *p) { __builtin_vec_stvflxl (v,a,p); } -+void slxl17(vuc v, long a, vuc *p) { __builtin_vec_stvflxl (v,a,p); } -+void slxl18(vuc v, long a, uc *p) { __builtin_vec_stvflxl (v,a,p); } -+void Dslxl01(vsf v, long a, vsf *p) { vec_stvflxl (v,a,p); } -+void Dslxl02(vsf v, long a, sf *p) { vec_stvflxl (v,a,p); } -+void Dslxl03(vbi v, long a, vbi *p) { vec_stvflxl (v,a,p); } -+void Dslxl04(vsi v, long a, vsi *p) { vec_stvflxl (v,a,p); } -+void Dslxl05(vsi v, long a, si *p) { vec_stvflxl (v,a,p); } -+void Dslxl06(vui v, long a, vui *p) { vec_stvflxl (v,a,p); } -+void Dslxl07(vui v, long a, ui *p) { vec_stvflxl (v,a,p); } -+void Dslxl08(vbs v, long a, vbs *p) { vec_stvflxl (v,a,p); } -+void Dslxl09(vp v, long a, vp *p) { vec_stvflxl (v,a,p); } -+void Dslxl10(vss v, long a, vss *p) { vec_stvflxl (v,a,p); } -+void Dslxl11(vss v, long a, ss *p) { vec_stvflxl (v,a,p); } -+void Dslxl12(vus v, long a, vus *p) { vec_stvflxl (v,a,p); } -+void Dslxl13(vus v, long a, us *p) { vec_stvflxl (v,a,p); } -+void Dslxl14(vbc v, long a, vbc *p) { vec_stvflxl (v,a,p); } -+void Dslxl15(vsc v, long a, vsc *p) { vec_stvflxl (v,a,p); } -+void Dslxl16(vsc v, long a, sc *p) { vec_stvflxl (v,a,p); } -+void Dslxl17(vuc v, long a, vuc *p) { vec_stvflxl (v,a,p); } -+void Dslxl18(vuc v, long a, uc *p) { vec_stvflxl (v,a,p); } -diff -ruN gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-16.c gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-16.c ---- gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-16.c 1969-12-31 18:00:00.000000000 -0600 -+++ gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-16.c 2012-03-06 12:31:05.154039003 -0600 -@@ -0,0 +1,66 @@ -+/* { dg-do compile { target { powerpc*-*-* } } } */ -+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */ -+/* { dg-require-effective-target powerpc_altivec_ok } */ -+/* { dg-options "-O2 -maltivec -maltivec2" } */ -+/* { dg-final { scan-assembler-times "stvfrx" 37 } } */ -+ -+#include -+ -+typedef __vector signed char vsc; -+typedef __vector signed short vss; -+typedef __vector signed int vsi; -+typedef __vector unsigned char vuc; -+typedef __vector unsigned short vus; -+typedef __vector unsigned int vui; -+typedef __vector bool char vbc; -+typedef __vector bool short vbs; -+typedef __vector bool int vbi; -+typedef __vector float vsf; -+typedef __vector pixel vp; -+typedef signed char sc; -+typedef signed short ss; -+typedef signed int si; -+typedef signed long sl; -+typedef unsigned char uc; -+typedef unsigned short us; -+typedef unsigned int ui; -+typedef unsigned long ul; -+typedef float sf; -+ -+void sc3(vsc v, long a, void *p) { __builtin_altivec_stvfrx (v,a,p); } -+void srx01(vsf v, long a, vsf *p) { __builtin_vec_stvfrx (v,a,p); } -+void srx02(vsf v, long a, sf *p) { __builtin_vec_stvfrx (v,a,p); } -+void srx03(vbi v, long a, vbi *p) { __builtin_vec_stvfrx (v,a,p); } -+void srx04(vsi v, long a, vsi *p) { __builtin_vec_stvfrx (v,a,p); } -+void srx05(vsi v, long a, si *p) { __builtin_vec_stvfrx (v,a,p); } -+void srx06(vui v, long a, vui *p) { __builtin_vec_stvfrx (v,a,p); } -+void srx07(vui v, long a, ui *p) { __builtin_vec_stvfrx (v,a,p); } -+void srx08(vbs v, long a, vbs *p) { __builtin_vec_stvfrx (v,a,p); } -+void srx09(vp v, long a, vp *p) { __builtin_vec_stvfrx (v,a,p); } -+void srx10(vss v, long a, vss *p) { __builtin_vec_stvfrx (v,a,p); } -+void srx11(vss v, long a, ss *p) { __builtin_vec_stvfrx (v,a,p); } -+void srx12(vus v, long a, vus *p) { __builtin_vec_stvfrx (v,a,p); } -+void srx13(vus v, long a, us *p) { __builtin_vec_stvfrx (v,a,p); } -+void srx14(vbc v, long a, vbc *p) { __builtin_vec_stvfrx (v,a,p); } -+void srx15(vsc v, long a, vsc *p) { __builtin_vec_stvfrx (v,a,p); } -+void srx16(vsc v, long a, sc *p) { __builtin_vec_stvfrx (v,a,p); } -+void srx17(vuc v, long a, vuc *p) { __builtin_vec_stvfrx (v,a,p); } -+void srx18(vuc v, long a, uc *p) { __builtin_vec_stvfrx (v,a,p); } -+void Dsrx01(vsf v, long a, vsf *p) { vec_stvfrx (v,a,p); } -+void Dsrx02(vsf v, long a, sf *p) { vec_stvfrx (v,a,p); } -+void Dsrx03(vbi v, long a, vbi *p) { vec_stvfrx (v,a,p); } -+void Dsrx04(vsi v, long a, vsi *p) { vec_stvfrx (v,a,p); } -+void Dsrx05(vsi v, long a, si *p) { vec_stvfrx (v,a,p); } -+void Dsrx06(vui v, long a, vui *p) { vec_stvfrx (v,a,p); } -+void Dsrx07(vui v, long a, ui *p) { vec_stvfrx (v,a,p); } -+void Dsrx08(vbs v, long a, vbs *p) { vec_stvfrx (v,a,p); } -+void Dsrx09(vp v, long a, vp *p) { vec_stvfrx (v,a,p); } -+void Dsrx10(vss v, long a, vss *p) { vec_stvfrx (v,a,p); } -+void Dsrx11(vss v, long a, ss *p) { vec_stvfrx (v,a,p); } -+void Dsrx12(vus v, long a, vus *p) { vec_stvfrx (v,a,p); } -+void Dsrx13(vus v, long a, us *p) { vec_stvfrx (v,a,p); } -+void Dsrx14(vbc v, long a, vbc *p) { vec_stvfrx (v,a,p); } -+void Dsrx15(vsc v, long a, vsc *p) { vec_stvfrx (v,a,p); } -+void Dsrx16(vsc v, long a, sc *p) { vec_stvfrx (v,a,p); } -+void Dsrx17(vuc v, long a, vuc *p) { vec_stvfrx (v,a,p); } -+void Dsrx18(vuc v, long a, uc *p) { vec_stvfrx (v,a,p); } -diff -ruN gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-17.c gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-17.c ---- gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-17.c 1969-12-31 18:00:00.000000000 -0600 -+++ gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-17.c 2012-03-06 12:31:05.155039001 -0600 -@@ -0,0 +1,66 @@ -+/* { dg-do compile { target { powerpc*-*-* } } } */ -+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */ -+/* { dg-require-effective-target powerpc_altivec_ok } */ -+/* { dg-options "-O2 -maltivec -maltivec2" } */ -+/* { dg-final { scan-assembler-times "stvfrxl" 37 } } */ -+ -+#include -+ -+typedef __vector signed char vsc; -+typedef __vector signed short vss; -+typedef __vector signed int vsi; -+typedef __vector unsigned char vuc; -+typedef __vector unsigned short vus; -+typedef __vector unsigned int vui; -+typedef __vector bool char vbc; -+typedef __vector bool short vbs; -+typedef __vector bool int vbi; -+typedef __vector float vsf; -+typedef __vector pixel vp; -+typedef signed char sc; -+typedef signed short ss; -+typedef signed int si; -+typedef signed long sl; -+typedef unsigned char uc; -+typedef unsigned short us; -+typedef unsigned int ui; -+typedef unsigned long ul; -+typedef float sf; -+ -+void sc4(vsc v, long a, void *p) { __builtin_altivec_stvfrxl (v,a,p); } -+void srxl01(vsf v, long a, vsf *p) { __builtin_vec_stvfrxl (v,a,p); } -+void srxl02(vsf v, long a, sf *p) { __builtin_vec_stvfrxl (v,a,p); } -+void srxl03(vbi v, long a, vbi *p) { __builtin_vec_stvfrxl (v,a,p); } -+void srxl04(vsi v, long a, vsi *p) { __builtin_vec_stvfrxl (v,a,p); } -+void srxl05(vsi v, long a, si *p) { __builtin_vec_stvfrxl (v,a,p); } -+void srxl06(vui v, long a, vui *p) { __builtin_vec_stvfrxl (v,a,p); } -+void srxl07(vui v, long a, ui *p) { __builtin_vec_stvfrxl (v,a,p); } -+void srxl08(vbs v, long a, vbs *p) { __builtin_vec_stvfrxl (v,a,p); } -+void srxl09(vp v, long a, vp *p) { __builtin_vec_stvfrxl (v,a,p); } -+void srxl10(vss v, long a, vss *p) { __builtin_vec_stvfrxl (v,a,p); } -+void srxl11(vss v, long a, ss *p) { __builtin_vec_stvfrxl (v,a,p); } -+void srxl12(vus v, long a, vus *p) { __builtin_vec_stvfrxl (v,a,p); } -+void srxl13(vus v, long a, us *p) { __builtin_vec_stvfrxl (v,a,p); } -+void srxl14(vbc v, long a, vbc *p) { __builtin_vec_stvfrxl (v,a,p); } -+void srxl15(vsc v, long a, vsc *p) { __builtin_vec_stvfrxl (v,a,p); } -+void srxl16(vsc v, long a, sc *p) { __builtin_vec_stvfrxl (v,a,p); } -+void srxl17(vuc v, long a, vuc *p) { __builtin_vec_stvfrxl (v,a,p); } -+void srxl18(vuc v, long a, uc *p) { __builtin_vec_stvfrxl (v,a,p); } -+void Dsrxl01(vsf v, long a, vsf *p) { vec_stvfrxl (v,a,p); } -+void Dsrxl02(vsf v, long a, sf *p) { vec_stvfrxl (v,a,p); } -+void Dsrxl03(vbi v, long a, vbi *p) { vec_stvfrxl (v,a,p); } -+void Dsrxl04(vsi v, long a, vsi *p) { vec_stvfrxl (v,a,p); } -+void Dsrxl05(vsi v, long a, si *p) { vec_stvfrxl (v,a,p); } -+void Dsrxl06(vui v, long a, vui *p) { vec_stvfrxl (v,a,p); } -+void Dsrxl07(vui v, long a, ui *p) { vec_stvfrxl (v,a,p); } -+void Dsrxl08(vbs v, long a, vbs *p) { vec_stvfrxl (v,a,p); } -+void Dsrxl09(vp v, long a, vp *p) { vec_stvfrxl (v,a,p); } -+void Dsrxl10(vss v, long a, vss *p) { vec_stvfrxl (v,a,p); } -+void Dsrxl11(vss v, long a, ss *p) { vec_stvfrxl (v,a,p); } -+void Dsrxl12(vus v, long a, vus *p) { vec_stvfrxl (v,a,p); } -+void Dsrxl13(vus v, long a, us *p) { vec_stvfrxl (v,a,p); } -+void Dsrxl14(vbc v, long a, vbc *p) { vec_stvfrxl (v,a,p); } -+void Dsrxl15(vsc v, long a, vsc *p) { vec_stvfrxl (v,a,p); } -+void Dsrxl16(vsc v, long a, sc *p) { vec_stvfrxl (v,a,p); } -+void Dsrxl17(vuc v, long a, vuc *p) { vec_stvfrxl (v,a,p); } -+void Dsrxl18(vuc v, long a, uc *p) { vec_stvfrxl (v,a,p); } -diff -ruN gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-18.c gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-18.c ---- gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-18.c 1969-12-31 18:00:00.000000000 -0600 -+++ gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-18.c 2012-03-06 12:31:05.155039001 -0600 -@@ -0,0 +1,66 @@ -+/* { dg-do compile { target { powerpc*-*-* } } } */ -+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */ -+/* { dg-require-effective-target powerpc_altivec_ok } */ -+/* { dg-options "-O2 -maltivec -maltivec2" } */ -+/* { dg-final { scan-assembler-times "lvswx" 37 } } */ -+ -+#include -+ -+typedef __vector signed char vsc; -+typedef __vector signed short vss; -+typedef __vector signed int vsi; -+typedef __vector unsigned char vuc; -+typedef __vector unsigned short vus; -+typedef __vector unsigned int vui; -+typedef __vector bool char vbc; -+typedef __vector bool short vbs; -+typedef __vector bool int vbi; -+typedef __vector float vsf; -+typedef __vector pixel vp; -+typedef signed char sc; -+typedef signed short ss; -+typedef signed int si; -+typedef signed long sl; -+typedef unsigned char uc; -+typedef unsigned short us; -+typedef unsigned int ui; -+typedef unsigned long ul; -+typedef float sf; -+ -+vsc ls1(long a, void *p) { return __builtin_altivec_lvswx (a,p); } -+vsf ls01(long a, vsf *p) { return __builtin_vec_lvswx (a,p); } -+vsf ls02(long a, sf *p) { return __builtin_vec_lvswx (a,p); } -+vbi ls03(long a, vbi *p) { return __builtin_vec_lvswx (a,p); } -+vsi ls04(long a, vsi *p) { return __builtin_vec_lvswx (a,p); } -+vsi ls05(long a, si *p) { return __builtin_vec_lvswx (a,p); } -+vui ls06(long a, vui *p) { return __builtin_vec_lvswx (a,p); } -+vui ls07(long a, ui *p) { return __builtin_vec_lvswx (a,p); } -+vbs ls08(long a, vbs *p) { return __builtin_vec_lvswx (a,p); } -+vp ls09(long a, vp *p) { return __builtin_vec_lvswx (a,p); } -+vss ls10(long a, vss *p) { return __builtin_vec_lvswx (a,p); } -+vss ls11(long a, ss *p) { return __builtin_vec_lvswx (a,p); } -+vus ls12(long a, vus *p) { return __builtin_vec_lvswx (a,p); } -+vus ls13(long a, us *p) { return __builtin_vec_lvswx (a,p); } -+vbc ls14(long a, vbc *p) { return __builtin_vec_lvswx (a,p); } -+vsc ls15(long a, vsc *p) { return __builtin_vec_lvswx (a,p); } -+vsc ls16(long a, sc *p) { return __builtin_vec_lvswx (a,p); } -+vuc ls17(long a, vuc *p) { return __builtin_vec_lvswx (a,p); } -+vuc ls18(long a, uc *p) { return __builtin_vec_lvswx (a,p); } -+vsf Dls01(long a, vsf *p) { return vec_lvswx (a,p); } -+vsf Dls02(long a, sf *p) { return vec_lvswx (a,p); } -+vbi Dls03(long a, vbi *p) { return vec_lvswx (a,p); } -+vsi Dls04(long a, vsi *p) { return vec_lvswx (a,p); } -+vsi Dls05(long a, si *p) { return vec_lvswx (a,p); } -+vui Dls06(long a, vui *p) { return vec_lvswx (a,p); } -+vui Dls07(long a, ui *p) { return vec_lvswx (a,p); } -+vbs Dls08(long a, vbs *p) { return vec_lvswx (a,p); } -+vp Dls09(long a, vp *p) { return vec_lvswx (a,p); } -+vss Dls10(long a, vss *p) { return vec_lvswx (a,p); } -+vss Dls11(long a, ss *p) { return vec_lvswx (a,p); } -+vus Dls12(long a, vus *p) { return vec_lvswx (a,p); } -+vus Dls13(long a, us *p) { return vec_lvswx (a,p); } -+vbc Dls14(long a, vbc *p) { return vec_lvswx (a,p); } -+vsc Dls15(long a, vsc *p) { return vec_lvswx (a,p); } -+vsc Dls16(long a, sc *p) { return vec_lvswx (a,p); } -+vuc Dls17(long a, vuc *p) { return vec_lvswx (a,p); } -+vuc Dls18(long a, uc *p) { return vec_lvswx (a,p); } -diff -ruN gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-19.c gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-19.c ---- gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-19.c 1969-12-31 18:00:00.000000000 -0600 -+++ gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-19.c 2012-03-06 12:31:05.155039001 -0600 -@@ -0,0 +1,66 @@ -+/* { dg-do compile { target { powerpc*-*-* } } } */ -+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */ -+/* { dg-require-effective-target powerpc_altivec_ok } */ -+/* { dg-options "-O2 -maltivec -maltivec2" } */ -+/* { dg-final { scan-assembler-times "lvswxl" 37 } } */ -+ -+#include -+ -+typedef __vector signed char vsc; -+typedef __vector signed short vss; -+typedef __vector signed int vsi; -+typedef __vector unsigned char vuc; -+typedef __vector unsigned short vus; -+typedef __vector unsigned int vui; -+typedef __vector bool char vbc; -+typedef __vector bool short vbs; -+typedef __vector bool int vbi; -+typedef __vector float vsf; -+typedef __vector pixel vp; -+typedef signed char sc; -+typedef signed short ss; -+typedef signed int si; -+typedef signed long sl; -+typedef unsigned char uc; -+typedef unsigned short us; -+typedef unsigned int ui; -+typedef unsigned long ul; -+typedef float sf; -+ -+vsc ls2l(long a, void *p) { return __builtin_altivec_lvswxl (a,p); } -+vsf lsl01(long a, vsf *p) { return __builtin_vec_lvswxl (a,p); } -+vsf lsl02(long a, sf *p) { return __builtin_vec_lvswxl (a,p); } -+vbi lsl03(long a, vbi *p) { return __builtin_vec_lvswxl (a,p); } -+vsi lsl04(long a, vsi *p) { return __builtin_vec_lvswxl (a,p); } -+vsi lsl05(long a, si *p) { return __builtin_vec_lvswxl (a,p); } -+vui lsl06(long a, vui *p) { return __builtin_vec_lvswxl (a,p); } -+vui lsl07(long a, ui *p) { return __builtin_vec_lvswxl (a,p); } -+vbs lsl08(long a, vbs *p) { return __builtin_vec_lvswxl (a,p); } -+vp lsl09(long a, vp *p) { return __builtin_vec_lvswxl (a,p); } -+vss lsl10(long a, vss *p) { return __builtin_vec_lvswxl (a,p); } -+vss lsl11(long a, ss *p) { return __builtin_vec_lvswxl (a,p); } -+vus lsl12(long a, vus *p) { return __builtin_vec_lvswxl (a,p); } -+vus lsl13(long a, us *p) { return __builtin_vec_lvswxl (a,p); } -+vbc lsl14(long a, vbc *p) { return __builtin_vec_lvswxl (a,p); } -+vsc lsl15(long a, vsc *p) { return __builtin_vec_lvswxl (a,p); } -+vsc lsl16(long a, sc *p) { return __builtin_vec_lvswxl (a,p); } -+vuc lsl17(long a, vuc *p) { return __builtin_vec_lvswxl (a,p); } -+vuc lsl18(long a, uc *p) { return __builtin_vec_lvswxl (a,p); } -+vsf Dlsl01(long a, vsf *p) { return vec_lvswxl (a,p); } -+vsf Dlsl02(long a, sf *p) { return vec_lvswxl (a,p); } -+vbi Dlsl03(long a, vbi *p) { return vec_lvswxl (a,p); } -+vsi Dlsl04(long a, vsi *p) { return vec_lvswxl (a,p); } -+vsi Dlsl05(long a, si *p) { return vec_lvswxl (a,p); } -+vui Dlsl06(long a, vui *p) { return vec_lvswxl (a,p); } -+vui Dlsl07(long a, ui *p) { return vec_lvswxl (a,p); } -+vbs Dlsl08(long a, vbs *p) { return vec_lvswxl (a,p); } -+vp Dlsl09(long a, vp *p) { return vec_lvswxl (a,p); } -+vss Dlsl10(long a, vss *p) { return vec_lvswxl (a,p); } -+vss Dlsl11(long a, ss *p) { return vec_lvswxl (a,p); } -+vus Dlsl12(long a, vus *p) { return vec_lvswxl (a,p); } -+vus Dlsl13(long a, us *p) { return vec_lvswxl (a,p); } -+vbc Dlsl14(long a, vbc *p) { return vec_lvswxl (a,p); } -+vsc Dlsl15(long a, vsc *p) { return vec_lvswxl (a,p); } -+vsc Dlsl16(long a, sc *p) { return vec_lvswxl (a,p); } -+vuc Dlsl17(long a, vuc *p) { return vec_lvswxl (a,p); } -+vuc Dlsl18(long a, uc *p) { return vec_lvswxl (a,p); } -diff -ruN gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-1.c gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-1.c ---- gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-1.c 1969-12-31 18:00:00.000000000 -0600 -+++ gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-1.c 2012-03-06 12:31:05.156039000 -0600 -@@ -0,0 +1,36 @@ -+/* { dg-do compile { target { powerpc*-*-* } } } */ -+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */ -+/* { dg-require-effective-target powerpc_altivec_ok } */ -+/* { dg-options "-O2 -maltivec -maltivec2" } */ -+/* { dg-final { scan-assembler-times "vabsdub" 7 } } */ -+ -+#include -+ -+typedef __vector signed char vsc; -+typedef __vector signed short vss; -+typedef __vector signed int vsi; -+typedef __vector unsigned char vuc; -+typedef __vector unsigned short vus; -+typedef __vector unsigned int vui; -+typedef __vector bool char vbc; -+typedef __vector bool short vbs; -+typedef __vector bool int vbi; -+typedef __vector float vsf; -+typedef __vector pixel vp; -+typedef signed char sc; -+typedef signed short ss; -+typedef signed int si; -+typedef signed long sl; -+typedef unsigned char uc; -+typedef unsigned short us; -+typedef unsigned int ui; -+typedef unsigned long ul; -+typedef float sf; -+ -+vuc fa1b(vuc a, vuc b) { return __builtin_altivec_vabsdub (a,b); } -+vuc ad1(vuc a, vuc b) { return __builtin_vec_absd (a,b); } -+vuc ad2(vbc a, vuc b) { return __builtin_vec_absd (a,b); } -+vuc ad3(vuc a, vbc b) { return __builtin_vec_absd (a,b); } -+vuc Dad1(vuc a, vuc b) { return vec_absd (a,b); } -+vuc Dad2(vbc a, vuc b) { return vec_absd (a,b); } -+vuc Dad3(vuc a, vbc b) { return vec_absd (a,b); } -diff -ruN gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-20.c gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-20.c ---- gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-20.c 1969-12-31 18:00:00.000000000 -0600 -+++ gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-20.c 2012-03-06 12:31:05.156039000 -0600 -@@ -0,0 +1,66 @@ -+/* { dg-do compile { target { powerpc*-*-* } } } */ -+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */ -+/* { dg-require-effective-target powerpc_altivec_ok } */ -+/* { dg-options "-O2 -maltivec -maltivec2" } */ -+/* { dg-final { scan-assembler-times "stvswx" 37 } } */ -+ -+#include -+ -+typedef __vector signed char vsc; -+typedef __vector signed short vss; -+typedef __vector signed int vsi; -+typedef __vector unsigned char vuc; -+typedef __vector unsigned short vus; -+typedef __vector unsigned int vui; -+typedef __vector bool char vbc; -+typedef __vector bool short vbs; -+typedef __vector bool int vbi; -+typedef __vector float vsf; -+typedef __vector pixel vp; -+typedef signed char sc; -+typedef signed short ss; -+typedef signed int si; -+typedef signed long sl; -+typedef unsigned char uc; -+typedef unsigned short us; -+typedef unsigned int ui; -+typedef unsigned long ul; -+typedef float sf; -+ -+void ss1(vsc v, long a, vsc *p) { __builtin_altivec_stvswx (v,a,p); } -+void ssx01(vsf v, long a, vsf *p) { __builtin_vec_stvswx (v,a,p); } -+void ssx02(vsf v, long a, sf *p) { __builtin_vec_stvswx (v,a,p); } -+void ssx03(vbi v, long a, vbi *p) { __builtin_vec_stvswx (v,a,p); } -+void ssx04(vsi v, long a, vsi *p) { __builtin_vec_stvswx (v,a,p); } -+void ssx05(vsi v, long a, si *p) { __builtin_vec_stvswx (v,a,p); } -+void ssx06(vui v, long a, vui *p) { __builtin_vec_stvswx (v,a,p); } -+void ssx07(vui v, long a, ui *p) { __builtin_vec_stvswx (v,a,p); } -+void ssx08(vbs v, long a, vbs *p) { __builtin_vec_stvswx (v,a,p); } -+void ssx09(vp v, long a, vp *p) { __builtin_vec_stvswx (v,a,p); } -+void ssx10(vss v, long a, vss *p) { __builtin_vec_stvswx (v,a,p); } -+void ssx11(vss v, long a, ss *p) { __builtin_vec_stvswx (v,a,p); } -+void ssx12(vus v, long a, vus *p) { __builtin_vec_stvswx (v,a,p); } -+void ssx13(vus v, long a, us *p) { __builtin_vec_stvswx (v,a,p); } -+void ssx14(vbc v, long a, vbc *p) { __builtin_vec_stvswx (v,a,p); } -+void ssx15(vsc v, long a, vsc *p) { __builtin_vec_stvswx (v,a,p); } -+void ssx16(vsc v, long a, sc *p) { __builtin_vec_stvswx (v,a,p); } -+void ssx17(vuc v, long a, vuc *p) { __builtin_vec_stvswx (v,a,p); } -+void ssx18(vuc v, long a, uc *p) { __builtin_vec_stvswx (v,a,p); } -+void Dssx01(vsf v, long a, vsf *p) { vec_stvswx (v,a,p); } -+void Dssx02(vsf v, long a, sf *p) { vec_stvswx (v,a,p); } -+void Dssx03(vbi v, long a, vbi *p) { vec_stvswx (v,a,p); } -+void Dssx04(vsi v, long a, vsi *p) { vec_stvswx (v,a,p); } -+void Dssx05(vsi v, long a, si *p) { vec_stvswx (v,a,p); } -+void Dssx06(vui v, long a, vui *p) { vec_stvswx (v,a,p); } -+void Dssx07(vui v, long a, ui *p) { vec_stvswx (v,a,p); } -+void Dssx08(vbs v, long a, vbs *p) { vec_stvswx (v,a,p); } -+void Dssx09(vp v, long a, vp *p) { vec_stvswx (v,a,p); } -+void Dssx10(vss v, long a, vss *p) { vec_stvswx (v,a,p); } -+void Dssx11(vss v, long a, ss *p) { vec_stvswx (v,a,p); } -+void Dssx12(vus v, long a, vus *p) { vec_stvswx (v,a,p); } -+void Dssx13(vus v, long a, us *p) { vec_stvswx (v,a,p); } -+void Dssx14(vbc v, long a, vbc *p) { vec_stvswx (v,a,p); } -+void Dssx15(vsc v, long a, vsc *p) { vec_stvswx (v,a,p); } -+void Dssx16(vsc v, long a, sc *p) { vec_stvswx (v,a,p); } -+void Dssx17(vuc v, long a, vuc *p) { vec_stvswx (v,a,p); } -+void Dssx18(vuc v, long a, uc *p) { vec_stvswx (v,a,p); } -diff -ruN gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-21.c gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-21.c ---- gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-21.c 1969-12-31 18:00:00.000000000 -0600 -+++ gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-21.c 2012-03-06 12:31:05.156039000 -0600 -@@ -0,0 +1,66 @@ -+/* { dg-do compile { target { powerpc*-*-* } } } */ -+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */ -+/* { dg-require-effective-target powerpc_altivec_ok } */ -+/* { dg-options "-O2 -maltivec -maltivec2" } */ -+/* { dg-final { scan-assembler-times "stvswxl" 37 } } */ -+ -+#include -+ -+typedef __vector signed char vsc; -+typedef __vector signed short vss; -+typedef __vector signed int vsi; -+typedef __vector unsigned char vuc; -+typedef __vector unsigned short vus; -+typedef __vector unsigned int vui; -+typedef __vector bool char vbc; -+typedef __vector bool short vbs; -+typedef __vector bool int vbi; -+typedef __vector float vsf; -+typedef __vector pixel vp; -+typedef signed char sc; -+typedef signed short ss; -+typedef signed int si; -+typedef signed long sl; -+typedef unsigned char uc; -+typedef unsigned short us; -+typedef unsigned int ui; -+typedef unsigned long ul; -+typedef float sf; -+ -+void ss2l(vsc v, long a, vsc *p) { __builtin_altivec_stvswxl (v,a,p); } -+void ssxl01(vsf v, long a, vsf *p) { __builtin_vec_stvswxl (v,a,p); } -+void ssxl02(vsf v, long a, sf *p) { __builtin_vec_stvswxl (v,a,p); } -+void ssxl03(vbi v, long a, vbi *p) { __builtin_vec_stvswxl (v,a,p); } -+void ssxl04(vsi v, long a, vsi *p) { __builtin_vec_stvswxl (v,a,p); } -+void ssxl05(vsi v, long a, si *p) { __builtin_vec_stvswxl (v,a,p); } -+void ssxl06(vui v, long a, vui *p) { __builtin_vec_stvswxl (v,a,p); } -+void ssxl07(vui v, long a, ui *p) { __builtin_vec_stvswxl (v,a,p); } -+void ssxl08(vbs v, long a, vbs *p) { __builtin_vec_stvswxl (v,a,p); } -+void ssxl09(vp v, long a, vp *p) { __builtin_vec_stvswxl (v,a,p); } -+void ssxl10(vss v, long a, vss *p) { __builtin_vec_stvswxl (v,a,p); } -+void ssxl11(vss v, long a, ss *p) { __builtin_vec_stvswxl (v,a,p); } -+void ssxl12(vus v, long a, vus *p) { __builtin_vec_stvswxl (v,a,p); } -+void ssxl13(vus v, long a, us *p) { __builtin_vec_stvswxl (v,a,p); } -+void ssxl14(vbc v, long a, vbc *p) { __builtin_vec_stvswxl (v,a,p); } -+void ssxl15(vsc v, long a, vsc *p) { __builtin_vec_stvswxl (v,a,p); } -+void ssxl16(vsc v, long a, sc *p) { __builtin_vec_stvswxl (v,a,p); } -+void ssxl17(vuc v, long a, vuc *p) { __builtin_vec_stvswxl (v,a,p); } -+void ssxl18(vuc v, long a, uc *p) { __builtin_vec_stvswxl (v,a,p); } -+void Dssxl01(vsf v, long a, vsf *p) { vec_stvswxl (v,a,p); } -+void Dssxl02(vsf v, long a, sf *p) { vec_stvswxl (v,a,p); } -+void Dssxl03(vbi v, long a, vbi *p) { vec_stvswxl (v,a,p); } -+void Dssxl04(vsi v, long a, vsi *p) { vec_stvswxl (v,a,p); } -+void Dssxl05(vsi v, long a, si *p) { vec_stvswxl (v,a,p); } -+void Dssxl06(vui v, long a, vui *p) { vec_stvswxl (v,a,p); } -+void Dssxl07(vui v, long a, ui *p) { vec_stvswxl (v,a,p); } -+void Dssxl08(vbs v, long a, vbs *p) { vec_stvswxl (v,a,p); } -+void Dssxl09(vp v, long a, vp *p) { vec_stvswxl (v,a,p); } -+void Dssxl10(vss v, long a, vss *p) { vec_stvswxl (v,a,p); } -+void Dssxl11(vss v, long a, ss *p) { vec_stvswxl (v,a,p); } -+void Dssxl12(vus v, long a, vus *p) { vec_stvswxl (v,a,p); } -+void Dssxl13(vus v, long a, us *p) { vec_stvswxl (v,a,p); } -+void Dssxl14(vbc v, long a, vbc *p) { vec_stvswxl (v,a,p); } -+void Dssxl15(vsc v, long a, vsc *p) { vec_stvswxl (v,a,p); } -+void Dssxl16(vsc v, long a, sc *p) { vec_stvswxl (v,a,p); } -+void Dssxl17(vuc v, long a, vuc *p) { vec_stvswxl (v,a,p); } -+void Dssxl18(vuc v, long a, uc *p) { vec_stvswxl (v,a,p); } -diff -ruN gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-22.c gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-22.c ---- gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-22.c 1969-12-31 18:00:00.000000000 -0600 -+++ gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-22.c 2012-03-06 12:31:05.157039001 -0600 -@@ -0,0 +1,66 @@ -+/* { dg-do compile { target { powerpc*-*-* } } } */ -+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */ -+/* { dg-require-effective-target powerpc_altivec_ok } */ -+/* { dg-options "-O2 -maltivec -maltivec2" } */ -+/* { dg-final { scan-assembler-times "lvsm" 37 } } */ -+ -+#include -+ -+typedef __vector signed char vsc; -+typedef __vector signed short vss; -+typedef __vector signed int vsi; -+typedef __vector unsigned char vuc; -+typedef __vector unsigned short vus; -+typedef __vector unsigned int vui; -+typedef __vector bool char vbc; -+typedef __vector bool short vbs; -+typedef __vector bool int vbi; -+typedef __vector float vsf; -+typedef __vector pixel vp; -+typedef signed char sc; -+typedef signed short ss; -+typedef signed int si; -+typedef signed long sl; -+typedef unsigned char uc; -+typedef unsigned short us; -+typedef unsigned int ui; -+typedef unsigned long ul; -+typedef float sf; -+ -+vsc lsm(long a, void *p) { return __builtin_altivec_lvsm (a,p); } -+vsf lm01(long a, vsf *p) { return __builtin_vec_lvsm (a,p); } -+vsf lm02(long a, sf *p) { return __builtin_vec_lvsm (a,p); } -+vbi lm03(long a, vbi *p) { return __builtin_vec_lvsm (a,p); } -+vsi lm04(long a, vsi *p) { return __builtin_vec_lvsm (a,p); } -+vsi lm05(long a, si *p) { return __builtin_vec_lvsm (a,p); } -+vui lm06(long a, vui *p) { return __builtin_vec_lvsm (a,p); } -+vui lm07(long a, ui *p) { return __builtin_vec_lvsm (a,p); } -+vbs lm08(long a, vbs *p) { return __builtin_vec_lvsm (a,p); } -+vp lm09(long a, vp *p) { return __builtin_vec_lvsm (a,p); } -+vss lm10(long a, vss *p) { return __builtin_vec_lvsm (a,p); } -+vss lm11(long a, ss *p) { return __builtin_vec_lvsm (a,p); } -+vus lm12(long a, vus *p) { return __builtin_vec_lvsm (a,p); } -+vus lm13(long a, us *p) { return __builtin_vec_lvsm (a,p); } -+vbc lm14(long a, vbc *p) { return __builtin_vec_lvsm (a,p); } -+vsc lm15(long a, vsc *p) { return __builtin_vec_lvsm (a,p); } -+vsc lm16(long a, sc *p) { return __builtin_vec_lvsm (a,p); } -+vuc lm17(long a, vuc *p) { return __builtin_vec_lvsm (a,p); } -+vuc lm18(long a, uc *p) { return __builtin_vec_lvsm (a,p); } -+vsf Dlm01(long a, vsf *p) { return vec_lvsm (a,p); } -+vsf Dlm02(long a, sf *p) { return vec_lvsm (a,p); } -+vbi Dlm03(long a, vbi *p) { return vec_lvsm (a,p); } -+vsi Dlm04(long a, vsi *p) { return vec_lvsm (a,p); } -+vsi Dlm05(long a, si *p) { return vec_lvsm (a,p); } -+vui Dlm06(long a, vui *p) { return vec_lvsm (a,p); } -+vui Dlm07(long a, ui *p) { return vec_lvsm (a,p); } -+vbs Dlm08(long a, vbs *p) { return vec_lvsm (a,p); } -+vp Dlm09(long a, vp *p) { return vec_lvsm (a,p); } -+vss Dlm10(long a, vss *p) { return vec_lvsm (a,p); } -+vss Dlm11(long a, ss *p) { return vec_lvsm (a,p); } -+vus Dlm12(long a, vus *p) { return vec_lvsm (a,p); } -+vus Dlm13(long a, us *p) { return vec_lvsm (a,p); } -+vbc Dlm14(long a, vbc *p) { return vec_lvsm (a,p); } -+vsc Dlm15(long a, vsc *p) { return vec_lvsm (a,p); } -+vsc Dlm16(long a, sc *p) { return vec_lvsm (a,p); } -+vuc Dlm17(long a, vuc *p) { return vec_lvsm (a,p); } -+vuc Dlm18(long a, uc *p) { return vec_lvsm (a,p); } -diff -ruN gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-2.c gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-2.c ---- gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-2.c 1969-12-31 18:00:00.000000000 -0600 -+++ gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-2.c 2012-03-06 12:31:05.157039001 -0600 -@@ -0,0 +1,36 @@ -+/* { dg-do compile { target { powerpc*-*-* } } } */ -+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */ -+/* { dg-require-effective-target powerpc_altivec_ok } */ -+/* { dg-options "-O2 -maltivec -maltivec2" } */ -+/* { dg-final { scan-assembler-times "vabsduh" 7 } } */ -+ -+#include -+ -+typedef __vector signed char vsc; -+typedef __vector signed short vss; -+typedef __vector signed int vsi; -+typedef __vector unsigned char vuc; -+typedef __vector unsigned short vus; -+typedef __vector unsigned int vui; -+typedef __vector bool char vbc; -+typedef __vector bool short vbs; -+typedef __vector bool int vbi; -+typedef __vector float vsf; -+typedef __vector pixel vp; -+typedef signed char sc; -+typedef signed short ss; -+typedef signed int si; -+typedef signed long sl; -+typedef unsigned char uc; -+typedef unsigned short us; -+typedef unsigned int ui; -+typedef unsigned long ul; -+typedef float sf; -+ -+vus fa2h(vus a, vus b) { return __builtin_altivec_vabsduh (a,b); } -+vus ad4(vus a, vus b) { return __builtin_vec_absd (a,b); } -+vus ad5(vbs a, vus b) { return __builtin_vec_absd (a,b); } -+vus ad6(vus a, vbs b) { return __builtin_vec_absd (a,b); } -+vus Dad4(vus a, vus b) { return vec_absd (a,b); } -+vus Dad5(vbs a, vus b) { return vec_absd (a,b); } -+vus Dad6(vus a, vbs b) { return vec_absd (a,b); } -diff -ruN gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-3.c gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-3.c ---- gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-3.c 1969-12-31 18:00:00.000000000 -0600 -+++ gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-3.c 2012-03-06 12:31:05.157039001 -0600 -@@ -0,0 +1,36 @@ -+/* { dg-do compile { target { powerpc*-*-* } } } */ -+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */ -+/* { dg-require-effective-target powerpc_altivec_ok } */ -+/* { dg-options "-O2 -maltivec -maltivec2" } */ -+/* { dg-final { scan-assembler-times "vabsduw" 7 } } */ -+ -+#include -+ -+typedef __vector signed char vsc; -+typedef __vector signed short vss; -+typedef __vector signed int vsi; -+typedef __vector unsigned char vuc; -+typedef __vector unsigned short vus; -+typedef __vector unsigned int vui; -+typedef __vector bool char vbc; -+typedef __vector bool short vbs; -+typedef __vector bool int vbi; -+typedef __vector float vsf; -+typedef __vector pixel vp; -+typedef signed char sc; -+typedef signed short ss; -+typedef signed int si; -+typedef signed long sl; -+typedef unsigned char uc; -+typedef unsigned short us; -+typedef unsigned int ui; -+typedef unsigned long ul; -+typedef float sf; -+ -+vui fa3w(vui a, vui b) { return __builtin_altivec_vabsduw (a,b); } -+vui ad7(vui a, vui b) { return __builtin_vec_absd (a,b); } -+vui ad8(vbi a, vui b) { return __builtin_vec_absd (a,b); } -+vui ad9(vui a, vbi b) { return __builtin_vec_absd (a,b); } -+vui Dad7(vui a, vui b) { return vec_absd (a,b); } -+vui Dad8(vbi a, vui b) { return vec_absd (a,b); } -+vui Dad9(vui a, vbi b) { return vec_absd (a,b); } -diff -ruN gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-4.c gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-4.c ---- gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-4.c 1969-12-31 18:00:00.000000000 -0600 -+++ gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-4.c 2012-03-06 12:31:05.158039002 -0600 -@@ -0,0 +1,34 @@ -+/* { dg-do compile { target { powerpc*-*-* } } } */ -+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */ -+/* { dg-require-effective-target powerpc_altivec_ok } */ -+/* { dg-options "-O2 -maltivec -maltivec2" } */ -+/* { dg-final { scan-assembler-times "lvexbx" 5 } } */ -+ -+#include -+ -+typedef __vector signed char vsc; -+typedef __vector signed short vss; -+typedef __vector signed int vsi; -+typedef __vector unsigned char vuc; -+typedef __vector unsigned short vus; -+typedef __vector unsigned int vui; -+typedef __vector bool char vbc; -+typedef __vector bool short vbs; -+typedef __vector bool int vbi; -+typedef __vector float vsf; -+typedef __vector pixel vp; -+typedef signed char sc; -+typedef signed short ss; -+typedef signed int si; -+typedef signed long sl; -+typedef unsigned char uc; -+typedef unsigned short us; -+typedef unsigned int ui; -+typedef unsigned long ul; -+typedef float sf; -+ -+vsc le1b(long a, void *p) { return __builtin_altivec_lvexbx (a,p); } -+vsc leb1(long a, sc *p) { return __builtin_vec_lvexbx (a,p); } -+vuc leb2(long a, uc *p) { return __builtin_vec_lvexbx (a,p); } -+vsc Dleb1(long a, sc *p) { return vec_lvexbx (a,p); } -+vuc Dleb2(long a, uc *p) { return vec_lvexbx (a,p); } -diff -ruN gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-5.c gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-5.c ---- gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-5.c 1969-12-31 18:00:00.000000000 -0600 -+++ gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-5.c 2012-03-06 12:31:05.158039002 -0600 -@@ -0,0 +1,34 @@ -+/* { dg-do compile { target { powerpc*-*-* } } } */ -+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */ -+/* { dg-require-effective-target powerpc_altivec_ok } */ -+/* { dg-options "-O2 -maltivec -maltivec2" } */ -+/* { dg-final { scan-assembler-times "lvexhx" 5 } } */ -+ -+#include -+ -+typedef __vector signed char vsc; -+typedef __vector signed short vss; -+typedef __vector signed int vsi; -+typedef __vector unsigned char vuc; -+typedef __vector unsigned short vus; -+typedef __vector unsigned int vui; -+typedef __vector bool char vbc; -+typedef __vector bool short vbs; -+typedef __vector bool int vbi; -+typedef __vector float vsf; -+typedef __vector pixel vp; -+typedef signed char sc; -+typedef signed short ss; -+typedef signed int si; -+typedef signed long sl; -+typedef unsigned char uc; -+typedef unsigned short us; -+typedef unsigned int ui; -+typedef unsigned long ul; -+typedef float sf; -+ -+vss le2h(long a, void *p) { return __builtin_altivec_lvexhx (a,p); } -+vss leh1(long a, ss *p) { return __builtin_vec_lvexhx (a,p); } -+vus leh2(long a, us *p) { return __builtin_vec_lvexhx (a,p); } -+vss Dleh1(long a, ss *p) { return vec_lvexhx (a,p); } -+vus Dleh2(long a, us *p) { return vec_lvexhx (a,p); } -diff -ruN gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-6.c gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-6.c ---- gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-6.c 1969-12-31 18:00:00.000000000 -0600 -+++ gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-6.c 2012-03-06 12:31:05.158039002 -0600 -@@ -0,0 +1,40 @@ -+/* { dg-do compile { target { powerpc*-*-* } } } */ -+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */ -+/* { dg-require-effective-target powerpc_altivec_ok } */ -+/* { dg-options "-O2 -maltivec -maltivec2" } */ -+/* { dg-final { scan-assembler-times "lvexwx" 11 } } */ -+ -+#include -+ -+typedef __vector signed char vsc; -+typedef __vector signed short vss; -+typedef __vector signed int vsi; -+typedef __vector unsigned char vuc; -+typedef __vector unsigned short vus; -+typedef __vector unsigned int vui; -+typedef __vector bool char vbc; -+typedef __vector bool short vbs; -+typedef __vector bool int vbi; -+typedef __vector float vsf; -+typedef __vector pixel vp; -+typedef signed char sc; -+typedef signed short ss; -+typedef signed int si; -+typedef signed long sl; -+typedef unsigned char uc; -+typedef unsigned short us; -+typedef unsigned int ui; -+typedef unsigned long ul; -+typedef float sf; -+ -+vsi le3w(long a, void *p) { return __builtin_altivec_lvexwx (a,p); } -+vsf lew1(long a, sf *p) { return __builtin_vec_lvexwx (a,p); } -+vsi lew2(long a, si *p) { return __builtin_vec_lvexwx (a,p); } -+vui lew3(long a, ui *p) { return __builtin_vec_lvexwx (a,p); } -+vsi lew4(long a, sl *p) { return __builtin_vec_lvexwx (a,p); } -+vui lew5(long a, ul *p) { return __builtin_vec_lvexwx (a,p); } -+vsf Dlew1(long a, sf *p) { return vec_lvexwx (a,p); } -+vsi Dlew2(long a, si *p) { return vec_lvexwx (a,p); } -+vui Dlew3(long a, ui *p) { return vec_lvexwx (a,p); } -+vsi Dlew4(long a, sl *p) { return vec_lvexwx (a,p); } -+vui Dlew5(long a, ul *p) { return vec_lvexwx (a,p); } -diff -ruN gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-7.c gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-7.c ---- gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-7.c 1969-12-31 18:00:00.000000000 -0600 -+++ gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-7.c 2012-03-06 12:31:05.159039002 -0600 -@@ -0,0 +1,42 @@ -+/* { dg-do compile { target { powerpc*-*-* } } } */ -+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */ -+/* { dg-require-effective-target powerpc_altivec_ok } */ -+/* { dg-options "-O2 -maltivec -maltivec2" } */ -+/* { dg-final { scan-assembler-times "stvexbx" 13 } } */ -+ -+#include -+ -+typedef __vector signed char vsc; -+typedef __vector signed short vss; -+typedef __vector signed int vsi; -+typedef __vector unsigned char vuc; -+typedef __vector unsigned short vus; -+typedef __vector unsigned int vui; -+typedef __vector bool char vbc; -+typedef __vector bool short vbs; -+typedef __vector bool int vbi; -+typedef __vector float vsf; -+typedef __vector pixel vp; -+typedef signed char sc; -+typedef signed short ss; -+typedef signed int si; -+typedef signed long sl; -+typedef unsigned char uc; -+typedef unsigned short us; -+typedef unsigned int ui; -+typedef unsigned long ul; -+typedef float sf; -+ -+void se1b(vsc v, long a, vsc *p) { __builtin_altivec_stvexbx (v,a,p); } -+void seb1(vsc v, long a, sc *p) { __builtin_vec_stvexbx (v,a,p); } -+void seb2(vuc v, long a, uc *p) { __builtin_vec_stvexbx (v,a,p); } -+void seb3(vbc v, long a, sc *p) { __builtin_vec_stvexbx (v,a,p); } -+void seb4(vbc v, long a, uc *p) { __builtin_vec_stvexbx (v,a,p); } -+void seb5(vsc v, long a, void *p) { __builtin_vec_stvexbx (v,a,p); } -+void seb6(vuc v, long a, void *p) { __builtin_vec_stvexbx (v,a,p); } -+void Dseb1(vsc v, long a, sc *p) { vec_stvexbx (v,a,p); } -+void Dseb2(vuc v, long a, uc *p) { vec_stvexbx (v,a,p); } -+void Dseb3(vbc v, long a, sc *p) { vec_stvexbx (v,a,p); } -+void Dseb4(vbc v, long a, uc *p) { vec_stvexbx (v,a,p); } -+void Dseb5(vsc v, long a, void *p) { vec_stvexbx (v,a,p); } -+void Dseb6(vuc v, long a, void *p) { vec_stvexbx (v,a,p); } -diff -ruN gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-8.c gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-8.c ---- gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-8.c 1969-12-31 18:00:00.000000000 -0600 -+++ gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-8.c 2012-03-06 12:31:05.159039002 -0600 -@@ -0,0 +1,42 @@ -+/* { dg-do compile { target { powerpc*-*-* } } } */ -+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */ -+/* { dg-require-effective-target powerpc_altivec_ok } */ -+/* { dg-options "-O2 -maltivec -maltivec2" } */ -+/* { dg-final { scan-assembler-times "stvexhx" 13 } } */ -+ -+#include -+ -+typedef __vector signed char vsc; -+typedef __vector signed short vss; -+typedef __vector signed int vsi; -+typedef __vector unsigned char vuc; -+typedef __vector unsigned short vus; -+typedef __vector unsigned int vui; -+typedef __vector bool char vbc; -+typedef __vector bool short vbs; -+typedef __vector bool int vbi; -+typedef __vector float vsf; -+typedef __vector pixel vp; -+typedef signed char sc; -+typedef signed short ss; -+typedef signed int si; -+typedef signed long sl; -+typedef unsigned char uc; -+typedef unsigned short us; -+typedef unsigned int ui; -+typedef unsigned long ul; -+typedef float sf; -+ -+void se2h(vss v, long a, vss *p) { __builtin_altivec_stvexhx (v,a,p); } -+void seh1(vss v, long a, ss *p) { __builtin_vec_stvexhx (v,a,p); } -+void seh2(vus v, long a, us *p) { __builtin_vec_stvexhx (v,a,p); } -+void seh3(vbs v, long a, ss *p) { __builtin_vec_stvexhx (v,a,p); } -+void seh4(vbs v, long a, us *p) { __builtin_vec_stvexhx (v,a,p); } -+void seh5(vss v, long a, void *p) { __builtin_vec_stvexhx (v,a,p); } -+void seh6(vus v, long a, void *p) { __builtin_vec_stvexhx (v,a,p); } -+void Dseh1(vss v, long a, ss *p) { vec_stvexhx (v,a,p); } -+void Dseh2(vus v, long a, us *p) { vec_stvexhx (v,a,p); } -+void Dseh3(vbs v, long a, ss *p) { vec_stvexhx (v,a,p); } -+void Dseh4(vbs v, long a, us *p) { vec_stvexhx (v,a,p); } -+void Dseh5(vss v, long a, void *p) { vec_stvexhx (v,a,p); } -+void Dseh6(vus v, long a, void *p) { vec_stvexhx (v,a,p); } -diff -ruN gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-9.c gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-9.c ---- gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-9.c 1969-12-31 18:00:00.000000000 -0600 -+++ gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-9.c 2012-03-06 12:31:05.159039002 -0600 -@@ -0,0 +1,46 @@ -+/* { dg-do compile { target { powerpc*-*-* } } } */ -+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */ -+/* { dg-require-effective-target powerpc_altivec_ok } */ -+/* { dg-options "-O2 -maltivec -maltivec2" } */ -+/* { dg-final { scan-assembler-times "stvexwx" 17 } } */ -+ -+#include -+ -+typedef __vector signed char vsc; -+typedef __vector signed short vss; -+typedef __vector signed int vsi; -+typedef __vector unsigned char vuc; -+typedef __vector unsigned short vus; -+typedef __vector unsigned int vui; -+typedef __vector bool char vbc; -+typedef __vector bool short vbs; -+typedef __vector bool int vbi; -+typedef __vector float vsf; -+typedef __vector pixel vp; -+typedef signed char sc; -+typedef signed short ss; -+typedef signed int si; -+typedef signed long sl; -+typedef unsigned char uc; -+typedef unsigned short us; -+typedef unsigned int ui; -+typedef unsigned long ul; -+typedef float sf; -+ -+void se3w(vsi v, long a, vsi *p) { __builtin_altivec_stvexwx (v,a,p); } -+void sew1(vsf v, long a, sf *p) { __builtin_vec_stvexwx (v,a,p); } -+void sew2(vsi v, long a, si *p) { __builtin_vec_stvexwx (v,a,p); } -+void sew3(vui v, long a, ui *p) { __builtin_vec_stvexwx (v,a,p); } -+void sew4(vbi v, long a, si *p) { __builtin_vec_stvexwx (v,a,p); } -+void sew5(vbi v, long a, ui *p) { __builtin_vec_stvexwx (v,a,p); } -+void sew6(vsf v, long a, void *p) { __builtin_vec_stvexwx (v,a,p); } -+void sew7(vsi v, long a, void *p) { __builtin_vec_stvexwx (v,a,p); } -+void sew8(vui v, long a, void *p) { __builtin_vec_stvexwx (v,a,p); } -+void Dsew1(vsf v, long a, sf *p) { vec_stvexwx (v,a,p); } -+void Dsew2(vsi v, long a, si *p) { vec_stvexwx (v,a,p); } -+void Dsew3(vui v, long a, ui *p) { vec_stvexwx (v,a,p); } -+void Dsew4(vbi v, long a, si *p) { vec_stvexwx (v,a,p); } -+void Dsew5(vbi v, long a, ui *p) { vec_stvexwx (v,a,p); } -+void Dsew6(vsf v, long a, void *p) { vec_stvexwx (v,a,p); } -+void Dsew7(vsi v, long a, void *p) { vec_stvexwx (v,a,p); } -+void Dsew8(vui v, long a, void *p) { vec_stvexwx (v,a,p); } -diff -ruN gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/cell_builtin-1.c gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/cell_builtin-1.c ---- gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/cell_builtin-1.c 1969-12-31 18:00:00.000000000 -0600 -+++ gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/cell_builtin-1.c 2012-03-06 12:31:15.921038995 -0600 -@@ -0,0 +1,48 @@ -+/* { dg-do compile { target { powerpc*-*-* } } } */ -+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */ -+/* { dg-require-effective-target powerpc_altivec_ok } */ -+/* { dg-options "-O2 -maltivec -mcpu=cell" } */ -+/* { dg-final { scan-assembler-times "lvlx" 19 } } */ -+ -+#include -+ -+typedef __vector signed char vsc; -+typedef __vector signed short vss; -+typedef __vector signed int vsi; -+typedef __vector unsigned char vuc; -+typedef __vector unsigned short vus; -+typedef __vector unsigned int vui; -+typedef __vector bool char vbc; -+typedef __vector bool short vbs; -+typedef __vector bool int vbi; -+typedef __vector float vsf; -+typedef __vector pixel vp; -+typedef signed char sc; -+typedef signed short ss; -+typedef signed int si; -+typedef signed long sl; -+typedef unsigned char uc; -+typedef unsigned short us; -+typedef unsigned int ui; -+typedef unsigned long ul; -+typedef float sf; -+ -+vsc lc1(long a, void *p) { return __builtin_altivec_lvlx (a,p); } -+vsf llx01(long a, vsf *p) { return __builtin_vec_lvlx (a,p); } -+vsf llx02(long a, sf *p) { return __builtin_vec_lvlx (a,p); } -+vbi llx03(long a, vbi *p) { return __builtin_vec_lvlx (a,p); } -+vsi llx04(long a, vsi *p) { return __builtin_vec_lvlx (a,p); } -+vsi llx05(long a, si *p) { return __builtin_vec_lvlx (a,p); } -+vui llx06(long a, vui *p) { return __builtin_vec_lvlx (a,p); } -+vui llx07(long a, ui *p) { return __builtin_vec_lvlx (a,p); } -+vbs llx08(long a, vbs *p) { return __builtin_vec_lvlx (a,p); } -+vp llx09(long a, vp *p) { return __builtin_vec_lvlx (a,p); } -+vss llx10(long a, vss *p) { return __builtin_vec_lvlx (a,p); } -+vss llx11(long a, ss *p) { return __builtin_vec_lvlx (a,p); } -+vus llx12(long a, vus *p) { return __builtin_vec_lvlx (a,p); } -+vus llx13(long a, us *p) { return __builtin_vec_lvlx (a,p); } -+vbc llx14(long a, vbc *p) { return __builtin_vec_lvlx (a,p); } -+vsc llx15(long a, vsc *p) { return __builtin_vec_lvlx (a,p); } -+vsc llx16(long a, sc *p) { return __builtin_vec_lvlx (a,p); } -+vuc llx17(long a, vuc *p) { return __builtin_vec_lvlx (a,p); } -+vuc llx18(long a, uc *p) { return __builtin_vec_lvlx (a,p); } -diff -ruN gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/cell_builtin-2.c gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/cell_builtin-2.c ---- gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/cell_builtin-2.c 1969-12-31 18:00:00.000000000 -0600 -+++ gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/cell_builtin-2.c 2012-03-06 12:31:15.921038995 -0600 -@@ -0,0 +1,48 @@ -+/* { dg-do compile { target { powerpc*-*-* } } } */ -+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */ -+/* { dg-require-effective-target powerpc_altivec_ok } */ -+/* { dg-options "-O2 -maltivec -mcpu=cell" } */ -+/* { dg-final { scan-assembler-times "lvlxl" 19 } } */ -+ -+#include -+ -+typedef __vector signed char vsc; -+typedef __vector signed short vss; -+typedef __vector signed int vsi; -+typedef __vector unsigned char vuc; -+typedef __vector unsigned short vus; -+typedef __vector unsigned int vui; -+typedef __vector bool char vbc; -+typedef __vector bool short vbs; -+typedef __vector bool int vbi; -+typedef __vector float vsf; -+typedef __vector pixel vp; -+typedef signed char sc; -+typedef signed short ss; -+typedef signed int si; -+typedef signed long sl; -+typedef unsigned char uc; -+typedef unsigned short us; -+typedef unsigned int ui; -+typedef unsigned long ul; -+typedef float sf; -+ -+vsc lc2(long a, void *p) { return __builtin_altivec_lvlxl (a,p); } -+vsf llxl01(long a, vsf *p) { return __builtin_vec_lvlxl (a,p); } -+vsf llxl02(long a, sf *p) { return __builtin_vec_lvlxl (a,p); } -+vbi llxl03(long a, vbi *p) { return __builtin_vec_lvlxl (a,p); } -+vsi llxl04(long a, vsi *p) { return __builtin_vec_lvlxl (a,p); } -+vsi llxl05(long a, si *p) { return __builtin_vec_lvlxl (a,p); } -+vui llxl06(long a, vui *p) { return __builtin_vec_lvlxl (a,p); } -+vui llxl07(long a, ui *p) { return __builtin_vec_lvlxl (a,p); } -+vbs llxl08(long a, vbs *p) { return __builtin_vec_lvlxl (a,p); } -+vp llxl09(long a, vp *p) { return __builtin_vec_lvlxl (a,p); } -+vss llxl10(long a, vss *p) { return __builtin_vec_lvlxl (a,p); } -+vss llxl11(long a, ss *p) { return __builtin_vec_lvlxl (a,p); } -+vus llxl12(long a, vus *p) { return __builtin_vec_lvlxl (a,p); } -+vus llxl13(long a, us *p) { return __builtin_vec_lvlxl (a,p); } -+vbc llxl14(long a, vbc *p) { return __builtin_vec_lvlxl (a,p); } -+vsc llxl15(long a, vsc *p) { return __builtin_vec_lvlxl (a,p); } -+vsc llxl16(long a, sc *p) { return __builtin_vec_lvlxl (a,p); } -+vuc llxl17(long a, vuc *p) { return __builtin_vec_lvlxl (a,p); } -+vuc llxl18(long a, uc *p) { return __builtin_vec_lvlxl (a,p); } -diff -ruN gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/cell_builtin-3.c gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/cell_builtin-3.c ---- gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/cell_builtin-3.c 1969-12-31 18:00:00.000000000 -0600 -+++ gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/cell_builtin-3.c 2012-03-06 12:31:15.922038996 -0600 -@@ -0,0 +1,48 @@ -+/* { dg-do compile { target { powerpc*-*-* } } } */ -+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */ -+/* { dg-require-effective-target powerpc_altivec_ok } */ -+/* { dg-options "-O2 -maltivec -mcpu=cell" } */ -+/* { dg-final { scan-assembler-times "lvrx" 19 } } */ -+ -+#include -+ -+typedef __vector signed char vsc; -+typedef __vector signed short vss; -+typedef __vector signed int vsi; -+typedef __vector unsigned char vuc; -+typedef __vector unsigned short vus; -+typedef __vector unsigned int vui; -+typedef __vector bool char vbc; -+typedef __vector bool short vbs; -+typedef __vector bool int vbi; -+typedef __vector float vsf; -+typedef __vector pixel vp; -+typedef signed char sc; -+typedef signed short ss; -+typedef signed int si; -+typedef signed long sl; -+typedef unsigned char uc; -+typedef unsigned short us; -+typedef unsigned int ui; -+typedef unsigned long ul; -+typedef float sf; -+ -+vsc lc3(long a, void *p) { return __builtin_altivec_lvrx (a,p); } -+vsf lrx01(long a, vsf *p) { return __builtin_vec_lvrx (a,p); } -+vsf lrx02(long a, sf *p) { return __builtin_vec_lvrx (a,p); } -+vbi lrx03(long a, vbi *p) { return __builtin_vec_lvrx (a,p); } -+vsi lrx04(long a, vsi *p) { return __builtin_vec_lvrx (a,p); } -+vsi lrx05(long a, si *p) { return __builtin_vec_lvrx (a,p); } -+vui lrx06(long a, vui *p) { return __builtin_vec_lvrx (a,p); } -+vui lrx07(long a, ui *p) { return __builtin_vec_lvrx (a,p); } -+vbs lrx08(long a, vbs *p) { return __builtin_vec_lvrx (a,p); } -+vp lrx09(long a, vp *p) { return __builtin_vec_lvrx (a,p); } -+vss lrx10(long a, vss *p) { return __builtin_vec_lvrx (a,p); } -+vss lrx11(long a, ss *p) { return __builtin_vec_lvrx (a,p); } -+vus lrx12(long a, vus *p) { return __builtin_vec_lvrx (a,p); } -+vus lrx13(long a, us *p) { return __builtin_vec_lvrx (a,p); } -+vbc lrx14(long a, vbc *p) { return __builtin_vec_lvrx (a,p); } -+vsc lrx15(long a, vsc *p) { return __builtin_vec_lvrx (a,p); } -+vsc lrx16(long a, sc *p) { return __builtin_vec_lvrx (a,p); } -+vuc lrx17(long a, vuc *p) { return __builtin_vec_lvrx (a,p); } -+vuc lrx18(long a, uc *p) { return __builtin_vec_lvrx (a,p); } -diff -ruN gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/cell_builtin-4.c gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/cell_builtin-4.c ---- gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/cell_builtin-4.c 1969-12-31 18:00:00.000000000 -0600 -+++ gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/cell_builtin-4.c 2012-03-06 12:31:15.922038996 -0600 -@@ -0,0 +1,48 @@ -+/* { dg-do compile { target { powerpc*-*-* } } } */ -+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */ -+/* { dg-require-effective-target powerpc_altivec_ok } */ -+/* { dg-options "-O2 -maltivec -mcpu=cell" } */ -+/* { dg-final { scan-assembler-times "lvrxl" 19 } } */ -+ -+#include -+ -+typedef __vector signed char vsc; -+typedef __vector signed short vss; -+typedef __vector signed int vsi; -+typedef __vector unsigned char vuc; -+typedef __vector unsigned short vus; -+typedef __vector unsigned int vui; -+typedef __vector bool char vbc; -+typedef __vector bool short vbs; -+typedef __vector bool int vbi; -+typedef __vector float vsf; -+typedef __vector pixel vp; -+typedef signed char sc; -+typedef signed short ss; -+typedef signed int si; -+typedef signed long sl; -+typedef unsigned char uc; -+typedef unsigned short us; -+typedef unsigned int ui; -+typedef unsigned long ul; -+typedef float sf; -+ -+vsc lc4(long a, void *p) { return __builtin_altivec_lvrxl (a,p); } -+vsf lrxl01(long a, vsf *p) { return __builtin_vec_lvrxl (a,p); } -+vsf lrxl02(long a, sf *p) { return __builtin_vec_lvrxl (a,p); } -+vbi lrxl03(long a, vbi *p) { return __builtin_vec_lvrxl (a,p); } -+vsi lrxl04(long a, vsi *p) { return __builtin_vec_lvrxl (a,p); } -+vsi lrxl05(long a, si *p) { return __builtin_vec_lvrxl (a,p); } -+vui lrxl06(long a, vui *p) { return __builtin_vec_lvrxl (a,p); } -+vui lrxl07(long a, ui *p) { return __builtin_vec_lvrxl (a,p); } -+vbs lrxl08(long a, vbs *p) { return __builtin_vec_lvrxl (a,p); } -+vp lrxl09(long a, vp *p) { return __builtin_vec_lvrxl (a,p); } -+vss lrxl10(long a, vss *p) { return __builtin_vec_lvrxl (a,p); } -+vss lrxl11(long a, ss *p) { return __builtin_vec_lvrxl (a,p); } -+vus lrxl12(long a, vus *p) { return __builtin_vec_lvrxl (a,p); } -+vus lrxl13(long a, us *p) { return __builtin_vec_lvrxl (a,p); } -+vbc lrxl14(long a, vbc *p) { return __builtin_vec_lvrxl (a,p); } -+vsc lrxl15(long a, vsc *p) { return __builtin_vec_lvrxl (a,p); } -+vsc lrxl16(long a, sc *p) { return __builtin_vec_lvrxl (a,p); } -+vuc lrxl17(long a, vuc *p) { return __builtin_vec_lvrxl (a,p); } -+vuc lrxl18(long a, uc *p) { return __builtin_vec_lvrxl (a,p); } -diff -ruN gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/cell_builtin-5.c gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/cell_builtin-5.c ---- gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/cell_builtin-5.c 1969-12-31 18:00:00.000000000 -0600 -+++ gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/cell_builtin-5.c 2012-03-06 12:31:15.922038996 -0600 -@@ -0,0 +1,48 @@ -+/* { dg-do compile { target { powerpc*-*-* } } } */ -+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */ -+/* { dg-require-effective-target powerpc_altivec_ok } */ -+/* { dg-options "-O2 -maltivec -mcpu=cell" } */ -+/* { dg-final { scan-assembler-times "stvlx" 19 } } */ -+ -+#include -+ -+typedef __vector signed char vsc; -+typedef __vector signed short vss; -+typedef __vector signed int vsi; -+typedef __vector unsigned char vuc; -+typedef __vector unsigned short vus; -+typedef __vector unsigned int vui; -+typedef __vector bool char vbc; -+typedef __vector bool short vbs; -+typedef __vector bool int vbi; -+typedef __vector float vsf; -+typedef __vector pixel vp; -+typedef signed char sc; -+typedef signed short ss; -+typedef signed int si; -+typedef signed long sl; -+typedef unsigned char uc; -+typedef unsigned short us; -+typedef unsigned int ui; -+typedef unsigned long ul; -+typedef float sf; -+ -+void sc1(vsc v, long a, void *p) { __builtin_altivec_stvlx (v,a,p); } -+void slx01(vsf v, long a, vsf *p) { __builtin_vec_stvlx (v,a,p); } -+void slx02(vsf v, long a, sf *p) { __builtin_vec_stvlx (v,a,p); } -+void slx03(vbi v, long a, vbi *p) { __builtin_vec_stvlx (v,a,p); } -+void slx04(vsi v, long a, vsi *p) { __builtin_vec_stvlx (v,a,p); } -+void slx05(vsi v, long a, si *p) { __builtin_vec_stvlx (v,a,p); } -+void slx06(vui v, long a, vui *p) { __builtin_vec_stvlx (v,a,p); } -+void slx07(vui v, long a, ui *p) { __builtin_vec_stvlx (v,a,p); } -+void slx08(vbs v, long a, vbs *p) { __builtin_vec_stvlx (v,a,p); } -+void slx09(vp v, long a, vp *p) { __builtin_vec_stvlx (v,a,p); } -+void slx10(vss v, long a, vss *p) { __builtin_vec_stvlx (v,a,p); } -+void slx11(vss v, long a, ss *p) { __builtin_vec_stvlx (v,a,p); } -+void slx12(vus v, long a, vus *p) { __builtin_vec_stvlx (v,a,p); } -+void slx13(vus v, long a, us *p) { __builtin_vec_stvlx (v,a,p); } -+void slx14(vbc v, long a, vbc *p) { __builtin_vec_stvlx (v,a,p); } -+void slx15(vsc v, long a, vsc *p) { __builtin_vec_stvlx (v,a,p); } -+void slx16(vsc v, long a, sc *p) { __builtin_vec_stvlx (v,a,p); } -+void slx17(vuc v, long a, vuc *p) { __builtin_vec_stvlx (v,a,p); } -+void slx18(vuc v, long a, uc *p) { __builtin_vec_stvlx (v,a,p); } -diff -ruN gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/cell_builtin-6.c gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/cell_builtin-6.c ---- gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/cell_builtin-6.c 1969-12-31 18:00:00.000000000 -0600 -+++ gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/cell_builtin-6.c 2012-03-06 12:31:15.923039000 -0600 -@@ -0,0 +1,48 @@ -+/* { dg-do compile { target { powerpc*-*-* } } } */ -+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */ -+/* { dg-require-effective-target powerpc_altivec_ok } */ -+/* { dg-options "-O2 -maltivec -mcpu=cell" } */ -+/* { dg-final { scan-assembler-times "stvlxl" 19 } } */ -+ -+#include -+ -+typedef __vector signed char vsc; -+typedef __vector signed short vss; -+typedef __vector signed int vsi; -+typedef __vector unsigned char vuc; -+typedef __vector unsigned short vus; -+typedef __vector unsigned int vui; -+typedef __vector bool char vbc; -+typedef __vector bool short vbs; -+typedef __vector bool int vbi; -+typedef __vector float vsf; -+typedef __vector pixel vp; -+typedef signed char sc; -+typedef signed short ss; -+typedef signed int si; -+typedef signed long sl; -+typedef unsigned char uc; -+typedef unsigned short us; -+typedef unsigned int ui; -+typedef unsigned long ul; -+typedef float sf; -+ -+void sc2(vsc v, long a, void *p) { __builtin_altivec_stvlxl (v,a,p); } -+void slxl01(vsf v, long a, vsf *p) { __builtin_vec_stvlxl (v,a,p); } -+void slxl02(vsf v, long a, sf *p) { __builtin_vec_stvlxl (v,a,p); } -+void slxl03(vbi v, long a, vbi *p) { __builtin_vec_stvlxl (v,a,p); } -+void slxl04(vsi v, long a, vsi *p) { __builtin_vec_stvlxl (v,a,p); } -+void slxl05(vsi v, long a, si *p) { __builtin_vec_stvlxl (v,a,p); } -+void slxl06(vui v, long a, vui *p) { __builtin_vec_stvlxl (v,a,p); } -+void slxl07(vui v, long a, ui *p) { __builtin_vec_stvlxl (v,a,p); } -+void slxl08(vbs v, long a, vbs *p) { __builtin_vec_stvlxl (v,a,p); } -+void slxl09(vp v, long a, vp *p) { __builtin_vec_stvlxl (v,a,p); } -+void slxl10(vss v, long a, vss *p) { __builtin_vec_stvlxl (v,a,p); } -+void slxl11(vss v, long a, ss *p) { __builtin_vec_stvlxl (v,a,p); } -+void slxl12(vus v, long a, vus *p) { __builtin_vec_stvlxl (v,a,p); } -+void slxl13(vus v, long a, us *p) { __builtin_vec_stvlxl (v,a,p); } -+void slxl14(vbc v, long a, vbc *p) { __builtin_vec_stvlxl (v,a,p); } -+void slxl15(vsc v, long a, vsc *p) { __builtin_vec_stvlxl (v,a,p); } -+void slxl16(vsc v, long a, sc *p) { __builtin_vec_stvlxl (v,a,p); } -+void slxl17(vuc v, long a, vuc *p) { __builtin_vec_stvlxl (v,a,p); } -+void slxl18(vuc v, long a, uc *p) { __builtin_vec_stvlxl (v,a,p); } -diff -ruN gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/cell_builtin-7.c gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/cell_builtin-7.c ---- gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/cell_builtin-7.c 1969-12-31 18:00:00.000000000 -0600 -+++ gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/cell_builtin-7.c 2012-03-06 12:31:15.923039000 -0600 -@@ -0,0 +1,48 @@ -+/* { dg-do compile { target { powerpc*-*-* } } } */ -+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */ -+/* { dg-require-effective-target powerpc_altivec_ok } */ -+/* { dg-options "-O2 -maltivec -mcpu=cell" } */ -+/* { dg-final { scan-assembler-times "stvrx" 19 } } */ -+ -+#include -+ -+typedef __vector signed char vsc; -+typedef __vector signed short vss; -+typedef __vector signed int vsi; -+typedef __vector unsigned char vuc; -+typedef __vector unsigned short vus; -+typedef __vector unsigned int vui; -+typedef __vector bool char vbc; -+typedef __vector bool short vbs; -+typedef __vector bool int vbi; -+typedef __vector float vsf; -+typedef __vector pixel vp; -+typedef signed char sc; -+typedef signed short ss; -+typedef signed int si; -+typedef signed long sl; -+typedef unsigned char uc; -+typedef unsigned short us; -+typedef unsigned int ui; -+typedef unsigned long ul; -+typedef float sf; -+ -+void sc3(vsc v, long a, void *p) { __builtin_altivec_stvrx (v,a,p); } -+void srx01(vsf v, long a, vsf *p) { __builtin_vec_stvrx (v,a,p); } -+void srx02(vsf v, long a, sf *p) { __builtin_vec_stvrx (v,a,p); } -+void srx03(vbi v, long a, vbi *p) { __builtin_vec_stvrx (v,a,p); } -+void srx04(vsi v, long a, vsi *p) { __builtin_vec_stvrx (v,a,p); } -+void srx05(vsi v, long a, si *p) { __builtin_vec_stvrx (v,a,p); } -+void srx06(vui v, long a, vui *p) { __builtin_vec_stvrx (v,a,p); } -+void srx07(vui v, long a, ui *p) { __builtin_vec_stvrx (v,a,p); } -+void srx08(vbs v, long a, vbs *p) { __builtin_vec_stvrx (v,a,p); } -+void srx09(vp v, long a, vp *p) { __builtin_vec_stvrx (v,a,p); } -+void srx10(vss v, long a, vss *p) { __builtin_vec_stvrx (v,a,p); } -+void srx11(vss v, long a, ss *p) { __builtin_vec_stvrx (v,a,p); } -+void srx12(vus v, long a, vus *p) { __builtin_vec_stvrx (v,a,p); } -+void srx13(vus v, long a, us *p) { __builtin_vec_stvrx (v,a,p); } -+void srx14(vbc v, long a, vbc *p) { __builtin_vec_stvrx (v,a,p); } -+void srx15(vsc v, long a, vsc *p) { __builtin_vec_stvrx (v,a,p); } -+void srx16(vsc v, long a, sc *p) { __builtin_vec_stvrx (v,a,p); } -+void srx17(vuc v, long a, vuc *p) { __builtin_vec_stvrx (v,a,p); } -+void srx18(vuc v, long a, uc *p) { __builtin_vec_stvrx (v,a,p); } -diff -ruN gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/cell_builtin-8.c gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/cell_builtin-8.c ---- gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/cell_builtin-8.c 1969-12-31 18:00:00.000000000 -0600 -+++ gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/cell_builtin-8.c 2012-03-06 12:31:15.923039000 -0600 -@@ -0,0 +1,48 @@ -+/* { dg-do compile { target { powerpc*-*-* } } } */ -+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */ -+/* { dg-require-effective-target powerpc_altivec_ok } */ -+/* { dg-options "-O2 -maltivec -mcpu=cell" } */ -+/* { dg-final { scan-assembler-times "stvrxl" 19 } } */ -+ -+#include -+ -+typedef __vector signed char vsc; -+typedef __vector signed short vss; -+typedef __vector signed int vsi; -+typedef __vector unsigned char vuc; -+typedef __vector unsigned short vus; -+typedef __vector unsigned int vui; -+typedef __vector bool char vbc; -+typedef __vector bool short vbs; -+typedef __vector bool int vbi; -+typedef __vector float vsf; -+typedef __vector pixel vp; -+typedef signed char sc; -+typedef signed short ss; -+typedef signed int si; -+typedef signed long sl; -+typedef unsigned char uc; -+typedef unsigned short us; -+typedef unsigned int ui; -+typedef unsigned long ul; -+typedef float sf; -+ -+void sc4(vsc v, long a, void *p) { __builtin_altivec_stvrxl (v,a,p); } -+void srxl01(vsf v, long a, vsf *p) { __builtin_vec_stvrxl (v,a,p); } -+void srxl02(vsf v, long a, sf *p) { __builtin_vec_stvrxl (v,a,p); } -+void srxl03(vbi v, long a, vbi *p) { __builtin_vec_stvrxl (v,a,p); } -+void srxl04(vsi v, long a, vsi *p) { __builtin_vec_stvrxl (v,a,p); } -+void srxl05(vsi v, long a, si *p) { __builtin_vec_stvrxl (v,a,p); } -+void srxl06(vui v, long a, vui *p) { __builtin_vec_stvrxl (v,a,p); } -+void srxl07(vui v, long a, ui *p) { __builtin_vec_stvrxl (v,a,p); } -+void srxl08(vbs v, long a, vbs *p) { __builtin_vec_stvrxl (v,a,p); } -+void srxl09(vp v, long a, vp *p) { __builtin_vec_stvrxl (v,a,p); } -+void srxl10(vss v, long a, vss *p) { __builtin_vec_stvrxl (v,a,p); } -+void srxl11(vss v, long a, ss *p) { __builtin_vec_stvrxl (v,a,p); } -+void srxl12(vus v, long a, vus *p) { __builtin_vec_stvrxl (v,a,p); } -+void srxl13(vus v, long a, us *p) { __builtin_vec_stvrxl (v,a,p); } -+void srxl14(vbc v, long a, vbc *p) { __builtin_vec_stvrxl (v,a,p); } -+void srxl15(vsc v, long a, vsc *p) { __builtin_vec_stvrxl (v,a,p); } -+void srxl16(vsc v, long a, sc *p) { __builtin_vec_stvrxl (v,a,p); } -+void srxl17(vuc v, long a, vuc *p) { __builtin_vec_stvrxl (v,a,p); } -+void srxl18(vuc v, long a, uc *p) { __builtin_vec_stvrxl (v,a,p); } diff --git a/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.experimental_move.patch b/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.experimental_move.patch deleted file mode 100644 index b9642ed6..00000000 --- a/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.experimental_move.patch +++ /dev/null @@ -1,32 +0,0 @@ -diff -ruN gcc-4.4.0/gcc/config/rs6000/rs6000.c gcc-4.4.0-e500mc64/gcc/config/rs6000/rs6000.c ---- gcc-4.4.0/gcc/config/rs6000/rs6000.c 2009-03-17 15:18:21.000000000 -0500 -+++ gcc-4.4.0-e500mc64/gcc/config/rs6000/rs6000.c 2009-12-04 10:36:44.000000000 -0600 -@@ -11032,6 +11059,14 @@ - mode = SImode; - gen_func.mov = gen_movsi; - } -+ else if (TARGET_COPY_UNALIGNED && bytes == 3 && offset > 0) -+ { -+ /* We generate a single unaligned SI move instead of 2 (HI, QI) */ -+ move_bytes = 3; -+ mode = SImode; -+ gen_func.mov = gen_movsi; -+ offset--; -+ } - else if (bytes >= 2 && (align >= 16 || !STRICT_ALIGNMENT)) - { /* move 2 bytes */ - move_bytes = 2; -diff -ruN gcc-4.4.0/gcc/config/rs6000/rs6000.opt gcc-4.4.0-e500mc64/gcc/config/rs6000/rs6000.opt ---- gcc-4.4.0/gcc/config/rs6000/rs6000.opt 2009-02-20 09:20:38.000000000 -0600 -+++ gcc-4.4.0-e500mc64/gcc/config/rs6000/rs6000.opt 2009-09-30 13:51:17.000000000 -0500 -@@ -201,6 +201,10 @@ - Target RejectNegative Joined - -misel=yes/no Deprecated option. Use -misel/-mno-isel instead - -+mcopy-unaligned -+Target Report Var(TARGET_COPY_UNALIGNED) -+Generate unaligned word load and stores to move 3 bytes -+ - mspe - Target - Generate SPE SIMD instructions on E500 diff --git a/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.extelim-v3.patch b/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.extelim-v3.patch deleted file mode 100644 index e124b187..00000000 --- a/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.extelim-v3.patch +++ /dev/null @@ -1,3491 +0,0 @@ -Eliminate sign and zero extensions in PPC generated code -A new module is introduced 'extelim.c' and a new RTL pass is introduced. -The '-f[no-]extelim' flag controls this pass and is enabled at -O2 and above. -The algorithm is based on the paper "Effective Sign Extension Elimination", Kawahito, et. al. -More details on implementation in the extelim.c module. - ---- gcc-4.6-branch-clean/gcc/opts.c 2011-07-27 12:02:02.483850879 -0500 -+++ gcc-4.6-branch/gcc/opts.c 2011-07-25 17:59:00.911975444 -0500 -@@ -492,6 +492,7 @@ - { OPT_LEVELS_2_PLUS, OPT_falign_jumps, NULL, 1 }, - { OPT_LEVELS_2_PLUS, OPT_falign_labels, NULL, 1 }, - { OPT_LEVELS_2_PLUS, OPT_falign_functions, NULL, 1 }, -+ { OPT_LEVELS_2_PLUS, OPT_fextelim, NULL, 1 }, - - /* -O3 optimizations. */ - { OPT_LEVELS_3_PLUS, OPT_ftree_loop_distribute_patterns, NULL, 1 }, ---- gcc-4.6-branch-clean/gcc/tree-pass.h 2011-07-27 12:02:02.485981448 -0500 -+++ gcc-4.6-branch/gcc/tree-pass.h 2011-07-25 17:59:00.912976334 -0500 -@@ -483,6 +483,7 @@ - extern struct rtl_opt_pass pass_initial_value_sets; - extern struct rtl_opt_pass pass_unshare_all_rtl; - extern struct rtl_opt_pass pass_instantiate_virtual_regs; -+extern struct rtl_opt_pass pass_rtl_extelim; - extern struct rtl_opt_pass pass_rtl_fwprop; - extern struct rtl_opt_pass pass_rtl_fwprop_addr; - extern struct rtl_opt_pass pass_jump2; ---- gcc-4.6-branch-clean/gcc/timevar.def 2011-07-27 12:02:02.487999008 -0500 -+++ gcc-4.6-branch/gcc/timevar.def 2011-07-25 17:59:00.913979563 -0500 -@@ -180,6 +180,7 @@ - DEFTIMEVAR (TV_VARCONST , "varconst") - DEFTIMEVAR (TV_LOWER_SUBREG , "lower subreg") - DEFTIMEVAR (TV_JUMP , "jump") -+DEFTIMEVAR (TV_EXTELIM , "extension elimination") - DEFTIMEVAR (TV_FWPROP , "forward prop") - DEFTIMEVAR (TV_CSE , "CSE") - DEFTIMEVAR (TV_DCE , "dead code elimination") ---- gcc-4.6-branch-clean/gcc/common.opt 2011-07-27 12:02:02.490978128 -0500 -+++ gcc-4.6-branch/gcc/common.opt 2011-07-25 17:59:00.915979093 -0500 -@@ -996,6 +996,10 @@ - Common Report Var(flag_eliminate_dwarf2_dups) - Perform DWARF2 duplicate elimination - -+fextelim -+Common Report Var(flag_extelim) -+Perform zero/sign extension removal -+ - fipa-sra - Common Report Var(flag_ipa_sra) Init(0) Optimization - Perform interprocedural reduction of aggregates ---- gcc-4.6-branch-clean/gcc/Makefile.in 2011-07-27 12:02:02.498976606 -0500 -+++ gcc-4.6-branch/gcc/Makefile.in 2011-07-25 17:59:00.919975303 -0500 -@@ -1233,6 +1233,7 @@ - explow.o \ - expmed.o \ - expr.o \ -+ extelim.o \ - final.o \ - fixed-value.o \ - fold-const.o \ -@@ -2891,6 +2892,11 @@ - reload.h langhooks.h intl.h $(TM_P_H) $(TARGET_H) \ - tree-iterator.h gt-expr.h $(MACHMODE_H) $(TIMEVAR_H) $(TREE_FLOW_H) \ - $(TREE_PASS_H) $(DF_H) $(DIAGNOSTIC_H) vecprim.h $(SSAEXPAND_H) -+extelim.o : extelim.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ -+ $(TREE_H) $(TM_P_H) $(FLAGS_H) $(REGS_H) hard-reg-set.h $(BASIC_BLOCK_H) \ -+ insn-config.h $(FUNCTION_H) $(EXPR_H) $(INSN_ATTR_H) $(RECOG_H) \ -+ toplev.h $(TARGET_H) $(TIMEVAR_H) $(OPTABS_H) insn-codes.h \ -+ output.h $(PARAMS_H) $(TREE_PASS_H) $(CGRAPH_H) - dojump.o : dojump.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(TREE_H) \ - $(FLAGS_H) $(FUNCTION_H) $(EXPR_H) $(OPTABS_H) $(INSN_ATTR_H) insn-config.h \ - langhooks.h $(GGC_H) gt-dojump.h vecprim.h $(BASIC_BLOCK_H) output.h ---- gcc-4.6-branch-clean/gcc/passes.c 2011-07-27 12:02:02.502976386 -0500 -+++ gcc-4.6-branch/gcc/passes.c 2011-07-25 17:59:00.922975752 -0500 -@@ -990,6 +990,7 @@ - NEXT_PASS (pass_web); - NEXT_PASS (pass_rtl_cprop); - NEXT_PASS (pass_cse2); -+ NEXT_PASS (pass_rtl_extelim); - NEXT_PASS (pass_rtl_dse1); - NEXT_PASS (pass_rtl_fwprop_addr); - NEXT_PASS (pass_inc_dec); ---- gcc-4.6.1-clean/gcc/extelim.c 1969-12-31 18:00:00.000000000 -0600 -+++ gcc-4.6.1/gcc/extelim.c 2011-11-14 15:43:10.041143996 -0600 -@@ -0,0 +1,3407 @@ -+/* Redundant extension elimination -+ Copyright (C) 2010 Free Software Foundation, Inc. -+ Contributed by John Russo (john.russo@freescale.com) -+ -+This file is part of GCC. -+ -+GCC 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. -+ -+GCC 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 GCC; see the file COPYING3. If not see -+. */ -+ -+/* -+PURPOSE: Implement a method for eliminating redundant and superflous sign -+extension instructions from 64-bit PPC e5500 generated code. -+ -+MOTIVATING EXAMPLE: -+The Nullstone loop_6.c kernel looks like: -+ int i; -+ int a[100]; -+ -+ ref_int_p (&a[0]); -+ -+ for (i=2; i<100; i++) -+ a[i] = a[i-1] + a[i-2]; -+ -+The final, generated code for the loop body is: -+ -+32-bit 64-bit -+add r25,r11,r0 add r5,r5,r8 -+add r26,r0,r25 addi r4,r4,12 -+stw r25,0(r9) add r27,r5,r8 -+add r27,r25,r26 stw r5,0(r9) -+stw r26,4(r9) extsw r12,r27 <=== -+add r28,r26,r27 stw r27,4(r9) -+stw r27,8(r9) add r6,r5,r12 -+add r29,r27,r28 add r28,r6,r12 -+stw r28,12(r9) stw r6,8(r9) -+add r30,r28,r29 extsw r0,r28 <=== -+stw r29,16(r9) stw r28,12(r9) -+add r12,r29,r30 add r7,r6,r0 -+stw r30,20(r9) add r29,r7,r0 -+add r3,r30,r12 stw r7,16(r9) -+stw r12,24(r9) extsw r3,r29 <=== -+add r4,r12,r3 stw r29,20(r9) -+stw r3,28(r9) add r10,r7,r3 -+add r5,r3,r4 add r30,r10,r3 -+stw r4,32(r9) stw r10,24(r9) -+add r6,r4,r5 extsw r8,r30 <=== -+stw r5,36(r9) stw r30,28(r9) -+add r7,r5,r6 add r11,r10,r8 -+stw r6,40(r9) add r12,r11,r8 -+add r8,r6,r7 stw r11,32(r9) -+stw r7,44(r9) extsw r26,r12 <=== -+add r10,r7,r8 stw r12,36(r9) -+stw r8,48(r9) add r0,r11,r26 -+add r11,r8,r10 add r3,r0,r26 -+stw r10,52(r9) stw r0,40(r9) -+add r0,r10,r11 subfic r26,r4,100 -+stw r11,56(r9) stw r3,44(r9) -+stw r0,60(r9) extsw r5,r0 <=== -+addi r9,r9,64 extsw r8,r3 <=== -+bdnz+ 10000640 extsw r4,r4 <=== -+ clrldi r26,r26,32 -+ addi r9,r9,48 -+ bdnz+ 10000890 -+ -+GENERAL APPROACH: -+Consider a machine whose native register size is 64-bits -+ -+0 3132 63 -+|-----------||-----------| -+ -+where bit 63 is the LSB and bit 0 is the MSB of a long int -+and bit 63 is the LSB and bit 32 is the MSB of an int. -+ -+Sign and zero extension are inserted to RTL to preserve the -+operation's semantics when the operands used are not the -+native register size since normally the machine only performs -+the operation using a native register size. In practice, many -+of the inserted extensions are not necessary. -+ -+First, the extension may simply be redundant. That is, the -+same operation is performed on the same operands. The redundant -+extensions can be eliminated. -+ -+Secondly, if the extended portion of the register (the "upper" bits) -+are not essential to the calculations performed on the output of the -+extension, then the extension is not necessary. For example, given -+int (32-bit) inputs and outputs: -+ -+c = a + b -+d = sxt(c) -+e = d + 1; -+ -+The "upper" bits of d (bit 0-31) do not affect the calculation -+of e. It doesn't matter what the "upper" bits of d are, the int result -+e is the same regardless of the sxt instruction. -+ -+Thirdly, the extensions may not be necessary if the operands are -+already extended and the operation preserves the extended bits. -+ -+a = mem[&b] ; sign extending load -+c = a + 1 -+d = sxt(c) -+ -+Here, a is generated by a sign extending load, the operation -+does nothing to invalidate the extension to c, thus the extension -+on c to d is not necessary. -+ -+In each case, the redundant extension must be replaced by a copy, -+with the copy to be optimized out in later phases. -+ -+The three cases described above form the general idea behind the -+algorithms implemented here to eliminate redundant and unneccessary -+extensions. -+ -+Sign extensions do not have to be preserved for overflow conditions -+since signed overflow behavior is not defined in C. For example, -+take a 16-bit variable in a 32-bit register. It is ok -+for 0x0000_7fff to overflow to 0x0000_8000 and not 0xffff_8000. -+This implies that it is not necessary to preserve the sign -+extension. -+ -+Unsigned overflow extension need to be preserved because -+unsigned overflow is modulo. For example, a 16-bit unsigned -+overflow of 0x0000_FFFF must be 0x0000_0000 in a 32-bit register, -+not 0x0001_0000. In order to remove the unsigned zero extension, -+we would need to range check the variable to be sure it doesn't -+overflow. -+ -+RTL ANALYSIS: -+I looked at the RTL representation after RTL generation (.expand) and -+after the first forward propagation (.fwprop1). Since RTL is not compact -+when printing out, I reduced the .fwprop1 RTL to this pseudocode: -+ -+(note: sxt,zxt mean double word length, 64-bit, extension). -+ -+(1) r198 = m[r113+ #112] ; load a[0] -+(2) r174 = sxt(r198) -+(3) r199 = m[r113+ #116] ; load a[1] -+(4) r186 = sxt(r199) -+(5) r181 = r113 + #120 ; load &a[2] -+(6) r180 = 2 ; i = 2 -+(7) L1: -+(8) r200 = r174 + r186 ; t1 = a[i-1] + a[i-2] -+(9) r174 = sxt(r200) -+(10) m[r181] = r200 ; a[i] = t1 -+(11) r201 = r200 + r186 ; t2 = t1 + a[i-1] -+(12) r186 = sxt(r201) -+(13) m[r181+4] = r201 ; a[i+1] = t2 -+(14) r202 = r180 + 2 ; i += 2 -+(14.1) r180 = sxt(r202) -+(15) r203 = 100 - r202 ; used to calc loop remainder -+(16) r185 = zxt(r203) ; used to calc loop remainder -+(17) r181 = r181 + 8 ; address induction var -+(18) ccr204 = cmp(r202,#98) ; set CC -+(19) BNE ccr204,L1 ; branch -+ -+In the pseudo-code, you see several sign extension candidates: (2),(4), -+(9), (12), (14.1), (16). -+ -+ALGORITHM: -+To eliminate the extra sign ext you have to look at (1) the definitions -+of the source of the sign extensions and/or (2) look at the uses of the target -+of the sign extensions. In either case, if doing a global elimination -+pass, you'll need def-use chain information. -+ -+The algorithms are recursive. Using the use/def and def/use chains -+we attempt to find ultimately whether the extension is relevant -+or not. -+ -+ -+Example 1. -+Extensions (2) and (4) are not put in the candidate list because -+they are combined into a load/ext pair that is ultimately generated -+as sign extending loads. -+ -+Take the sign extension at (9), r174 = sxt(r200). -+Def analysis shows that r200 is defined by 2 registers, thus no -+further def analysis recursion can occur. -+Use analysis. Find all the uses of r174. There is 1 use at (8) r200 = r174 + r186. -+The extension does not affect the add operation results. Continuing, we look at -+the uses of r200 to see if the results of operations on r200 need the sign extended bits. -+We see 2 uses of r200 at (10) and (11). (10) is a 32-bit store of r200, -+so the sign extended bits are irrelevant. (11), however, is an unknown, -+so we must look that the uses of this result, r201. A similar sequence -+occurs for r201 when it defines r186. Looking at the uses of r186 at -+(8) and (11), we have already visited those statements so they have -+been covered already. So it appears that the sxt to r174 at (9) ultimately -+dead-ends to a store instruction that doesn't case about the sign extended -+bits. The sxt at (9) can be removed. -+ -+The remaining extensions are processed similarly. -+ -+PROGRAM STRUCTURE: -+ -+extension elimination -- main entry point -+ find extensions -- identify extension candidates -+ extension duplication -- insert extension at strategic points to -+ enable removal of extensions at more frequently -+ executed points. -+ find extensions -- recreate extension candidate list -+ sort extensions -- sort extension candidate list by loop depth -+ for each ext in list -- process each extension candidate -+ eliminate one extension -+ replace marked candidates with copy -- optimize the extension -+ -+PSEUDOCODE: -+ -+Create working list of sign extensions, sxt_list -+ -+For each insn, insn_sxt, in sxt_list -+ ext_needed = true -+ For all insns, insn_def, that DEFINE and REACH the SOURCE_REG(insn_sxt) -+ ext_needed = analyze_def(insn_def, insn_sxt) -+ if (ext_needed) -+ break; -+ end_loop -+ if (ext_needed) -+ For all insns, insn_use, that USE and are REACHED by the DEST_REG(insn_sxt) -+ ext_needed = analyze_use(insn_use, insn_sxt) -+ if (ext_needed) -+ break; -+ end_loop -+ -+ if (!ext_needed) -+ mark_for_replace_with_copy(I) -+end_loop -+ -+For each insn, insn_sxt, in sxt_list -+ if (insn_sxt is marked for replacement) -+ replace_insn_with_copy(insn_sxt) -+end_loop -+ -+-------------------------- -+function: analyze_def(def) -+--------------------------- -+return true if extension is needed, false otherwise. -+ -+destination_operand = defined operand of source -+source_operand = source operand of def -+ -+if (have_seen_this_insn_already (def)) -+ return true; -+ -+set_seen_this_insn_flag (def) -+ -+analysis_result = analyze_result_def (def) -+switch (analysis_result) -+ case source_operand_is_extended: -+ return false -+ case stop_recursion: -+ return true -+ case continue_recursion: -+ break; -+ -+ext_needed = true; -+ -+For all insns, insn_def, that USE and REACHED by the register of destination_operand -+ ext_needed = analyze_def(insn_def)) -+ if (ext_needed) -+ break; -+end_loop -+ -+return ext_needed -+ -+-------------------------- -+function: analyze_use(use) -+--------------------------- -+return true if extension is needed, false otherwise. -+ -+destination_operand = destination operand of use -+source_operand = source operand of use -+ -+if (have_seen_this_insn_already (use)) -+ return false; -+ -+set_seen_this_insn_flag (use) -+ -+analysis_result = analyze_result_use (use) -+switch (analysis_result) -+ case low_bits_not_affected_by_use: -+ return false -+ case low_bits_affected_by_use: -+ return true -+ case look_at_uses_of_destination_operand -+ break; -+ -+ext_needed = true; -+For all insns, insn_use, that USE the register of destination_operand -+ ext_needed = analyze_use(insn_use)) -+ if (ext_needed) -+ break; -+end_loop -+ -+return ext_needed -+ -+REFERENCES: -+ -+"Effective Sign Extension Elimination", Kawahito, Komatsu, Nakatani. -+IBM Tokyo Researc Laboratory. -+ -+"New sign/zero extension elimination pass", deVries. -+http://gcc.gnu.org/ml/gcc-patches/2010-10/msg01529.html -+*/ -+ -+/* -+Iteration 4: pre-ZERO_EXTEND version, duplicates sign_extend at uses -+Iteration 5: begin supporting ZERO_EXTEND, crashes on Coremark. -+Iteration 6: revert to 4, support SI:HI sign_extensions. -+Iteration 7: Add support for zero extend. This version deletes -+ "inserted" duplicate extensions when redundant and propagates -+ the copied value. This propagate fails in other_tests/test2.sh. -+ I am reverting back to replacing the "inserted" extension to a copy. -+ Copy propagation should always be able to eliminate this copy. -+ Coremark was stable, however. -+Iteration 8: Revert to change extensions to copy, regardless of whether -+ the extension was duplicated or not. -+ Refactor setting of dest,src in analyze_ext_use, analyze_ext_def, now -+ handled with a single function. -+Iteration 9: -+ Inserted redundant extensions at function return points. -+ Sorted the order that extensions are processed by loop depth. -+ Additional cases in upper_bits_do_not_affect_dest -+Iteration 10: -+ Fixes for test failures. A major problem was uncovered where -+ the "visited" flag was not properly cleared. This meant that -+ each time a new extension was processed, it appeared that some -+ extensions were visited already and there were not. The result -+ was false removals. This fix significantly affects the benchmark. -+ Another change was to comment out the duplicate_exts_at_uses. This -+ seemed to have little effect now that the visited flag issue is -+ fixed. -+Iteration 11: -+ Cleanup warnings during build. -+Iteration 12: -+ QImode support started. -+Iteration 13: -+ Redesign and refactor analyze_ext_use, analyze_ext_def -+Iteration 14: -+ Continue redesign and refactor of analyze_ext_use, analyze_ext_def -+ Debugging paper_example.c -+Iteration 15: -+ cond_c fix -+Iteration 16: (not tested) -+ Refactor check_compare code -+ Refactor action decision in PARALLEL -+ Allow pass-thru on insns that are marked for replace copy -+ instead of stopping recursion if we see a marked insn. -+ Examining lshiftrt.c program (signed and unsigned). -+Iteration 17: -+ Refactor mostly complete. Passed all local testing including -+ nas and perfect. Best coremark results so far. -+Iteration 18: -+ Oops. analyze_ext_def was disabled. Enabling it improves -+ Coremark. Passed coremark, perfect. -+Iteration 19: -+ Local tests are passing. Tested with glibc. -+ Added statistics. -+ Fixed elimination from CALL output in operand_is_extended. -+ This impacted Coremark went from 6300 to 6170. But is necessary. -+ More safety for used regs in analyze_ext_def. -+ More safety for the types of extensions. -+Iteration 20: -+ Fixes for various tests. -+Iteration 21: -+ pr43017 -funroll_loops fix. -+Iteration 22: -+ Fixes for AND immediate in operand_is_extended. -+ Cosmetic cleanup. -+Iteration 23: -+ Fixes for consumer-2,spec2k,spec2k6. Handle -+ SUBREG_PROMOTED_VAR_P flags on operands whose -+ dependent extension has been eliminated. -+Iteration 24: -+ Fixed problem in native build during bootstrapping. -+ Extelim was considering debug_insns and should have -+ ignored them. This resulted in a compare fail between -+ stage2 and stage3. -+Iteration 25: -+ - Post-release 4.6.1 development -+ - Full duplication of extensions at uses turned on. -+ - Recursion into original extension no longer kills optimization (analyze_ext_def only) -+ - Allow some duplication into the same block if it enables insn selection -+ - Allow CCmode and CCUNSmode into mode_supported_p -+Iteration 26: -+ - Solve ICEs due to null df-ref. -+Iteration 27: -+ - Fixed issue with duplication of extension at a self-assign. -+ - Some fixes for copying flags during duplication -+ - Some fixes for counting register uses. -+Iteration 28: -+ - Fixed issue with duplication of extension when use has multiple -+ reaching definitions. -+Iteration 29: -+ - Release candidate for Q42011 release iteration. -+Iteration 30: -+ - Turn off extension duplication - minimally effective -+ -+*/ -+ -+#include "config.h" -+#include "system.h" -+#include "coretypes.h" -+#include "tm.h" -+#include "rtl.h" -+#include "tree.h" -+#include "tm_p.h" -+#include "flags.h" -+#include "regs.h" -+#include "hard-reg-set.h" -+#include "basic-block.h" -+#include "insn-config.h" -+#include "function.h" -+#include "expr.h" -+#include "insn-attr.h" -+#include "recog.h" -+#include "toplev.h" -+#include "target.h" -+#include "timevar.h" -+#include "optabs.h" -+#include "insn-codes.h" -+#include "rtlhooks-def.h" -+#include "output.h" -+#include "params.h" -+#include "timevar.h" -+#include "tree-pass.h" -+#include "cgraph.h" -+#include "df.h" -+#include "vec.h" -+ -+/* Feature flags */ -+/* Duplicate extensions at each immediate use */ -+#define EXTELIM_DUPLICATE_EXTS_AT_USES 0 -+/* Dump DF information also in dump */ -+#define EXTELIM_DF_DUMP 0 -+ -+ -+/* Typedefs */ -+typedef unsigned int insn_flag_t; /* Insn flags type */ -+typedef int extelim_uid_t; /* UID type */ -+DEF_VEC_I (insn_flag_t); /* Define vector type and allocation type */ -+DEF_VEC_ALLOC_I (insn_flag_t, heap); -+ -+typedef struct GTY (()) ext_record -+{ -+ rtx ext; /* The extension insn */ -+ VEC (rtx, heap) * ext_uses; /* List of use records for this extension. For some -+ some extensions, we will duplicate the extension -+ at these use points. */ -+ VEC (rtx, heap) * ext_updates;/* List of rtx that need to be updated if the extension -+ is to be eliminated. For example, SUBREG_PROMOTED flags -+ on SUBREG uses defined by this extension should -+ be reset since the extension is eliminated. The PROMOTED -+ flag is no longer valid. */ -+} *ext_record_t; -+ -+typedef struct regspec_cb_data -+{ -+ unsigned int regno; -+ rtx exp; -+} regspec_cb_data_t; -+ -+/* Static variables */ -+DEF_VEC_P (ext_record_t); -+DEF_VEC_ALLOC_P (ext_record_t, heap); -+VEC (ext_record_t, heap) * extensions; /* Vector holding all extension records */ -+VEC (insn_flag_t, heap) * insn_flags; /* Vector holding flags for all insns */ -+VEC (rtx, heap) * returns; /* Vector holding return insns for this function */ -+ -+ static extelim_uid_t max_uid; /* Max UID insn value for insn_flags allocation */ -+ static ext_record_t current_ext_record; /* Current extension record being processed */ -+ -+/* Statistics */ -+ static int num_cand; /* Number of extensions detected */ -+ static int num_cand_ignored; /* Number of extensions ignored */ -+ static int num_cand_transformed; /* Number of extensions transformed to copy */ -+ -+/* Basic information about the extension being processed */ -+ enum machine_mode ext_to_mode; /* Mode extended to */ -+ enum machine_mode ext_from_mode; /* Mode extended from */ -+ enum rtx_code ext_code; /* Sign or zero extend */ -+ -+/* Insn use analysis possible results */ -+ enum insn_use_results -+ { -+ EXTELIM_ANALYSIS_RESULT_LOWBITS_NOT_AFFECTED, -+ EXTELIM_ANALYSIS_RESULT_LOWBITS_AFFECTED, -+ EXTELIM_ANALYSIS_RESULT_CONTINUE_RECURSION -+ }; -+ -+/* Insn def analysis possible results */ -+ enum insn_def_results -+ { -+ EXTELIM_ANALYSIS_RESULT_DEF_EXTENDED, -+ EXTELIM_ANALYSIS_RESULT_DEF_STOP_RECURSION, -+ EXTELIM_ANALYSIS_RESULT_DEF_CONTINUE_RECURSION -+ }; -+ -+/* Insn flags for this pass */ -+#define EXTELIM_NONE 0 -+#define EXTELIM_SEEN (1<<0) /* Mark insn as visited during DF traversal */ -+#define EXTELIM_REPLACE_COPY (1<<1) /* Mark ext insn as replace with copy */ -+#define EXTELIM_INSERTED (1<<2) /* Mark ext insn as algorithmically inserted */ -+#define EXTELIM_INSERTED_FOR (1<<3) /* Mark use insn for which ext has been inserted */ -+ -+ -+/* Query the insn flag */ -+ -+ static bool insn_flag_p (insn_flag_t set_p, extelim_uid_t uid) -+{ -+ insn_flag_t flags; -+ -+ if (((flags = VEC_index (insn_flag_t, insn_flags, uid)) & set_p) == set_p) -+ return true; -+ -+ return false; -+} -+ -+/* Set the insn flags */ -+ -+static void -+insn_flag_set (insn_flag_t flags, extelim_uid_t uid) -+{ -+ insn_flag_t set; -+ set = VEC_index (insn_flag_t, insn_flags, uid); -+ set |= flags; -+ VEC_replace (insn_flag_t, insn_flags, uid, set); -+} -+ -+/* Clear insn flags */ -+ -+static void -+insn_flag_clear (insn_flag_t flags, extelim_uid_t uid) -+{ -+ insn_flag_t clear; -+ clear = VEC_index (insn_flag_t, insn_flags, uid); -+ clear &= ~flags; -+ VEC_replace (insn_flag_t, insn_flags, uid, clear); -+} -+ -+/* Set static variable max_uid to the largest -+ insn uid found in the module plus 1. This will be the -+ size of the vector for insn flags. */ -+ -+static void -+set_max_uid (void) -+{ -+ basic_block bb; -+ rtx insn; -+ extelim_uid_t lmax_uid = 0; -+ -+ FOR_EACH_BB (bb) FOR_BB_INSNS (bb, insn) -+ { -+ if (INSN_P (insn)) -+ { -+ if (INSN_UID (insn) > lmax_uid) -+ lmax_uid = INSN_UID (insn); -+ } -+ } -+ max_uid = lmax_uid + 1; -+} -+ -+/* Re-initializes the requested insn flags to their reset state */ -+ -+static void -+reinit_insn_flags (insn_flag_t flags_to_be_reset) -+{ -+ extelim_uid_t i; -+ -+ /* Account for new insns */ -+ set_max_uid (); -+ -+ for (i = 0; i < max_uid; i++) -+ { -+ insn_flag_clear (flags_to_be_reset, i); -+ } -+} -+ -+/* Init the vector for insn flags. One -+ vector element per insn is created. -+ The flags are init'd to EXTELIM_NONE. */ -+ -+static void -+init_flags_vector (void) -+{ -+ extelim_uid_t i; -+ /* Get the maximum uid value. We'll use this -+ information to set up a vector of max_uid -+ length. Each element of the vector will hold -+ the pass-specific flags for each insn. */ -+ max_uid = 0; -+ set_max_uid (); -+ -+ /* Allocate the vector of insn flags */ -+ insn_flags = VEC_alloc (insn_flag_t, heap, max_uid); -+ -+ /* Initialize the insn flags vector */ -+ for (i = 0; i < max_uid; i++) -+ { -+ VEC_quick_insert (insn_flag_t, insn_flags, i, EXTELIM_NONE); -+ } -+} -+ -+/* Initialize this pass */ -+ -+static void -+init_pass (void) -+{ -+ /* Init insn flags vector */ -+ init_flags_vector (); -+ -+ /* This pass requires def-use chain information */ -+ df_chain_add_problem (DF_DU_CHAIN + DF_UD_CHAIN); -+ df_analyze (); -+} -+ -+static void -+free_extensions (void) -+{ -+ ext_record_t ext_record; -+ unsigned i; -+ -+ FOR_EACH_VEC_ELT (ext_record_t, extensions, i, ext_record) -+ { -+ if (!VEC_empty (rtx, ext_record->ext_uses)) -+ VEC_free (rtx, heap, ext_record->ext_uses); -+ -+ if (!VEC_empty (rtx, ext_record->ext_updates)) -+ VEC_free (rtx, heap, ext_record->ext_updates); -+ } -+ VEC_free (ext_record_t, heap, extensions); -+} -+ -+/* Clean up this pass */ -+ -+static void -+finish_pass (void) -+{ -+ free_extensions (); -+ VEC_free (insn_flag_t, heap, insn_flags); -+ VEC_free (rtx, heap, returns); -+} -+ -+static void -+update_uid_vectors (extelim_uid_t uid) -+{ -+ VEC_safe_grow_cleared (insn_flag_t, heap, insn_flags, uid + 1); -+} -+ -+/* Emit a insn before a given insn, update vector lengths -+ of those vectors that are indexed by uid. Return uid -+ of the inserted insn. */ -+ -+static extelim_uid_t -+extelim_emit_before (rtx new_insn, rtx before_insn) -+{ -+ rtx seq; -+ extelim_uid_t new_uid; -+ -+ start_sequence (); -+ emit_insn (new_insn); -+ seq = get_insns (); -+ end_sequence (); -+ new_insn = emit_insn_before (seq, before_insn); -+ -+ /* Expand the flags vector to hold the new insn and set the -+ inserted flag on the insn. */ -+ new_uid = INSN_UID (new_insn); -+ update_uid_vectors (new_uid); -+ return new_uid; -+} -+ -+/* Utility function to find the REG exp -+ given an rtx */ -+ -+static rtx -+register_exp (rtx exp) -+{ -+ if (REG_P (exp)) -+ { -+ return exp; -+ } -+ else if (GET_CODE (exp) == SUBREG) -+ { -+ return SUBREG_REG (exp); -+ } -+ else -+ return NULL; -+} -+ -+/* Check whether this is a sign extension. */ -+ -+static bool -+extension_p (rtx insn, rtx * dest, rtx * inner, int *preserved_size) -+{ -+ rtx src, op0; -+ -+ /* Detect set of reg. */ -+ if (GET_CODE (PATTERN (insn)) != SET) -+ return false; -+ -+ src = SET_SRC (PATTERN (insn)); -+ *dest = SET_DEST (PATTERN (insn)); -+ -+ if (!REG_P (*dest)) -+ return false; -+ -+ if (GET_CODE (src) == SIGN_EXTEND || GET_CODE (src) == ZERO_EXTEND) -+ { -+ op0 = XEXP (src, 0); -+ -+ /* Determine amount of least significant bits preserved by operation. */ -+ if (GET_CODE (src) == AND) -+ *preserved_size = ctz_hwi (~UINTVAL (XEXP (src, 1))); -+ else -+ *preserved_size = GET_MODE_BITSIZE (GET_MODE (op0)); -+ -+ if (GET_CODE (op0) == SUBREG) -+ { -+ if (subreg_lsb (op0) != 0) -+ return false; -+ -+ *inner = SUBREG_REG (op0); -+ return true; -+ } -+ else if (REG_P (op0)) -+ { -+ *inner = op0; -+ return true; -+ } -+ } -+ -+ return false; -+} -+ -+/* Return true if this is the last use of a -+ register, false otherwise. */ -+ -+static bool -+reg_is_dead_p (rtx insn, rtx reg_expr) -+{ -+ rtx link; -+ gcc_assert (REG_P (reg_expr)); -+ -+ for (link = REG_NOTES (insn); link; link = XEXP (link, 1)) -+ { -+ if (REG_NOTE_KIND (link) == REG_DEAD && REG_P (XEXP (link, 0))) -+ { -+ if (REGNO (XEXP (link, 0)) == REGNO (reg_expr)) -+ return true; -+ } -+ } -+ return false; -+} -+ -+/* Return true if we don't want to place this -+ extension in the candidate extensions list because of the -+ previous insn. Return false otherwise. */ -+ -+static bool -+ignore_extension_prev_p (rtx ext_insn, rtx prev_insn) -+{ -+ rtx prev_dest, prev_src, prev = PATTERN (prev_insn); -+ rtx ext_src, ext = PATTERN (ext_insn); -+ -+ /* It's OK to allow extension with no accompanying prev real insn */ -+ if (!NONDEBUG_INSN_P (prev_insn) || NOTE_P (prev_insn)) -+ return false; -+ -+ if (GET_CODE (prev) != SET) -+ return false; -+ -+ if (GET_CODE (ext) != SET) -+ return false; -+ -+ prev_dest = SET_DEST (prev); -+ prev_src = SET_SRC (prev); -+ -+ /* Source register of sign extension */ -+ ext_src = XEXP (SET_SRC (ext), 0); -+ -+ /* Check previous insns */ -+ -+ /* Previous insn is a load whose dest is the -+ extension's source and the dest reg is -+ dead */ -+ if (MEM_P (prev_src) && (prev_dest = register_exp (prev_dest))) -+ { -+ if ((ext_src = register_exp (ext_src))) -+ { -+ if ((REGNO (prev_dest) == REGNO (ext_src)) -+ && reg_is_dead_p (ext_insn, ext_src)) -+ return true; -+ } -+ } -+ return false; -+} -+ -+/* Return true if we don't want to place this -+ extension in the candidate extensions list because of the -+ next insn. Return false otherwise. */ -+ -+static bool -+ignore_extension_next_p (rtx ext_insn, rtx next_insn) -+{ -+ rtx next = PATTERN (next_insn); -+ rtx ext_src, ext = PATTERN (ext_insn); -+ -+ if (GET_CODE (ext) != SET) -+ return false; -+ -+ /* Check next insns */ -+ if (!NONDEBUG_INSN_P (next_insn) || NOTE_P (next_insn)) -+ return false; -+ -+ if (GET_CODE (next) != SET) -+ return false; -+ -+ /* zero-extend followed by left shift by 1 -- this sequence will be -+ detected by the insn selection. */ -+ if (GET_CODE (SET_SRC (ext)) == ZERO_EXTEND) -+ { -+ if (GET_CODE (SET_SRC (next)) == ASHIFT -+ && CONST_INT_P (XEXP (SET_SRC (next), 1)) -+ && UINTVAL (XEXP (SET_SRC (next), 1)) == 0x1) -+ return true; -+ } -+ -+ return false; -+} -+ -+/* Find extensions and store them in the extensions vector. */ -+ -+static bool -+find_extensions (void) -+{ -+ basic_block bb; -+ rtx insn, dest, inner; -+ int preserved_size; -+ ext_record_t extrec; -+ -+ /* For all insns, call note_use for each use in insn. */ -+ FOR_EACH_BB (bb) -+ { -+ FOR_BB_INSNS (bb, insn) -+ { -+ if (!NONDEBUG_INSN_P (insn)) -+ continue; -+ -+ if (!extension_p (insn, &dest, &inner, &preserved_size)) -+ { -+ continue; -+ } -+ -+ /* We do not consider extensions that follow a load for -+ this target, as the code selector optimizes the sequence -+ to a load with sign extend or load with zero extend. */ -+ if (PREV_INSN (insn) -+ && ignore_extension_prev_p (insn, PREV_INSN (insn))) -+ { -+ if (dump_file) -+ fprintf (dump_file, "extension at uid=%d ignored\n", -+ INSN_UID (insn)); -+ num_cand_ignored++; -+ continue; -+ } -+ /* We don't consider certain sequences that are picked up by -+ insn selection. */ -+ if (NEXT_INSN (insn) -+ && ignore_extension_next_p (insn, NEXT_INSN (insn))) -+ { -+ if (dump_file) -+ fprintf (dump_file, "extension at uid=%d ignored\n", -+ INSN_UID (insn)); -+ num_cand_ignored++; -+ continue; -+ } -+ -+ /* Only looking at sign extensions to DImode, SImode, or HImode */ -+ if (GET_MODE_BITSIZE (SImode) != preserved_size -+ && GET_MODE_BITSIZE (HImode) != preserved_size -+ && GET_MODE_BITSIZE (QImode) != preserved_size) -+ continue; -+ -+ extrec = (ext_record_t) xmalloc (sizeof (struct ext_record)); -+ extrec->ext = insn; -+ extrec->ext_uses = NULL; -+ extrec->ext_updates = NULL; -+ VEC_safe_push (ext_record_t, heap, extensions, extrec); -+ num_cand++; -+ } -+ } -+ -+ if (dump_file) -+ { -+ if (!VEC_empty (ext_record_t, extensions)) -+ fprintf (dump_file, "\n"); -+ else -+ fprintf (dump_file, "no extensions found.\n"); -+ } -+ -+ return !VEC_empty (ext_record_t, extensions); -+} -+ -+/* Return true if the rtx mode is a supported mode for -+ this optimization, false otherwise. */ -+ -+static bool -+mode_supported_p (rtx exp) -+{ -+ if (GET_MODE (exp) != QImode -+ && GET_MODE (exp) != HImode -+ && GET_MODE (exp) != SImode -+ && GET_MODE (exp) != DImode -+ && GET_MODE (exp) != CCmode -+ && GET_MODE (exp) != CCUNSmode) -+ return false; -+ -+ return true; -+} -+ -+/* Return true if the rtx is a function return expr, false otherwise */ -+ -+static bool -+return_val_p (rtx dest) -+{ -+ if ((REG_P (dest) || GET_CODE (dest) == PARALLEL) && -+ REG_FUNCTION_VALUE_P (dest)) -+ { -+ return true; -+ } -+ return false; -+} -+ -+ -+/* A 'for_each_rtx' callback returning 1 if the rtx is a -+ REG or SUBREG rtx. The first matching rtx found stops the -+ rtx traversal. */ -+ -+static int -+reg_or_subreg_rtx (rtx * x, void *data) -+{ -+ regspec_cb_data_t *ldata = (regspec_cb_data_t *) data; -+ -+ if (REG_P (*x)) -+ { -+ ldata->exp = *x; -+ return 1; -+ } -+ -+ if (GET_CODE (*x) == SUBREG) -+ { -+ ldata->exp = SUBREG_REG (*x); -+ return 1; -+ } -+ -+ return 0; -+} -+ -+/* A 'for_each_rtx' callback returning 1 if the rtx is a -+ REG or SUBREG rtx whose register number is that passed -+ in the data parameter. Data parameter's rtx value is -+ set to the matching rtx if found. */ -+ -+static int -+reg_or_subreg_rtx_regno (rtx * x, void *data) -+{ -+ regspec_cb_data_t *ldata = (regspec_cb_data_t *) data; -+ -+ if (REG_P (*x) && (REGNO (*x) == ldata->regno)) -+ { -+ ldata->exp = *x; -+ return 1; -+ } -+ if (GET_CODE (*x) == SUBREG && (REGNO (SUBREG_REG (*x)) == ldata->regno)) -+ { -+ ldata->exp = SUBREG_REG (*x); -+ return 1; -+ } -+ return 0; -+} -+ -+/* Callback that counts the number of register operands -+ in an expression. Return 0 to allow all rtxs to be -+ traversed. */ -+ -+static int -+count_reg_operands (rtx * x, void *data) -+{ -+ regspec_cb_data_t *ldata = (regspec_cb_data_t *) data; -+ -+ if (register_exp (*x) != NULL) -+ { -+ ldata->regno++; -+ } -+ return 0; -+} -+ -+/* Count the number of register operands in an expression. -+ We use the regspec_cb_data_t regno field as the number -+ of register operands we found in an expression. */ -+ -+static int -+num_reg_operands (rtx x) -+{ -+ int rv; -+ regspec_cb_data_t data; -+ data.regno = 0; -+ data.exp = NULL_RTX; -+ -+ if ((rv = for_each_rtx (&x, count_reg_operands, (void *) &data)) == 0) -+ return (data.regno); /* contains the count */ -+ else -+ return 0; -+} -+ -+/* Find the SUBREG or REG rtx corresponding to regno in the given rtx. -+ Return NULL_RTX if the regno rtx is not found. */ -+ -+static rtx -+find_regspec_regno (unsigned int regno, rtx x) -+{ -+ int rv; -+ regspec_cb_data_t data; -+ data.regno = regno; -+ data.exp = NULL_RTX; -+ -+ if ((rv = for_each_rtx (&x, reg_or_subreg_rtx_regno, (void *) &data)) != 0) -+ return (data.exp); -+ else -+ return NULL_RTX; -+} -+ -+/* Find a REG or SUBREG rtx, starting at expr x. -+ Return NULL_RTX if no REG or SUBREG rtx is found. -+ If found, the rtx returned is a REG (not SUBREG) */ -+ -+static rtx -+find_regspec (rtx x) -+{ -+ int rv; -+ regspec_cb_data_t data; -+ data.regno = -1; /* not used */ -+ data.exp = NULL_RTX; -+ -+ if ((rv = for_each_rtx (&x, reg_or_subreg_rtx, (void *) &data)) != 0) -+ return (data.exp); -+ else -+ return NULL_RTX; -+} -+ -+/* Return true if the expression defines single register, regno. */ -+ -+static bool -+expr_defines_regno_p (rtx insn, unsigned int regno) -+{ -+ rtx reg; -+ if (GET_CODE (insn) == SET) -+ { -+ reg = SET_DEST (insn); -+ if (find_regspec_regno (regno, reg) != NULL_RTX) -+ return true; -+ } -+ return false; -+} -+ -+/* Return true if the insn defines a single register, regno. -+ Return false otherwise */ -+ -+static bool -+defines_regno_p (rtx insn_insn, unsigned int regno, int indent) -+{ -+ extelim_uid_t uid = INSN_UID (insn_insn); -+ df_ref *p_def; -+ -+ /* Get the operands defined */ -+ p_def = DF_INSN_UID_DEFS (uid); -+ -+ if (!p_def) -+ return false; -+ -+ if (*(p_def + 1) != NULL) -+ { -+ if (dump_file) -+ fprintf (dump_file, "%*suid=%d defines multiple registers\n", -+ indent, " ", uid); -+ return false; -+ } -+ -+ if (DF_REF_REGNO (*p_def) != regno) -+ { -+ if (dump_file) -+ fprintf (dump_file, "%*suid=%d defines does not define %d\n", -+ indent, " ", uid, regno); -+ return false; -+ } -+ -+ return true; -+} -+ -+/* The operand is already extended and the extension is compatible with -+ the originating extension with respect to type and size. -+ E.g. zero_extend:HI meets and AND r,#0xffff. Another example -+ is LSHIFT:SI left or right and zero_extend:SI, because the -+ instruction selected is rlwinm and clears the upper 32 bits. -+ Other examples in the code. Return true if a compatible extension -+ is found, false otherwise. */ -+ -+static bool -+operand_is_extended (rtx dest, rtx srcexp, int indent) -+{ -+ /* Output of a CALL is already extended. -+ To ensure that the return value is not modified by the extend, -+ the extend from mode size must be at least the size of the CALL output. -+ Example - this is redundant since output of CALL is extended. -+ X:SI = CALL ... -+ Y:DI = sign_extend:DI (X:SI) */ -+ if (GET_CODE (srcexp) == CALL -+ && (GET_MODE_BITSIZE (ext_from_mode)) >= -+ GET_MODE_BITSIZE (GET_MODE (dest))) -+ { -+ if (dump_file) -+ fprintf (dump_file, -+ "%*s...is extended already (CALL insn output)\n", indent, -+ " "); -+ return true; -+ } -+ -+ /* Output is load immediate or load constant */ -+ if (CONST_INT_P (srcexp)) -+ { -+ bool is_extended; -+ if (ext_from_mode == QImode && (UINTVAL (srcexp) <= 0xff)) -+ is_extended = true; -+ else if (ext_from_mode == HImode && (UINTVAL (srcexp) <= 0xffff)) -+ is_extended = true; -+ else if (ext_from_mode == SImode && (UINTVAL (srcexp) <= 0xffffffff)) -+ is_extended = true; -+ else -+ is_extended = false; -+ -+ if (is_extended) -+ { -+ if (dump_file) -+ fprintf (dump_file, -+ "%*s... is extended already (CONST_INT load)\n", indent, -+ " "); -+ return true; -+ } -+ } -+ -+ /* Sign extension of the same type as the originating extension. -+ Here the candidate defines the register used in the originating extension. -+ The originating extension will be replaced by a copy if it is found to be -+ redundant with respect to the candidate extension. -+ The candidate (this extension dest,src) must write the at least the same bits as the -+ originating extension in order to be redundant. So, we follow these rules: -+ -+ cand_to_mode == machine mode of the destination for this candidate extension -+ cand_from_mode == machine mode of the source for this candidate extension -+ ext_to_mode == machine mode of the originating extension output -+ ext_from_mode == machine mode of the originating extension input -+ -+ SIZE(cand_to_mode) >= SIZE(extend_to_mode) && SIZE(cand_from_mode) <= SIZE(extend_from_mode) -+ -+ Example 1: -+ Candidate (HI->SI extension) -+ DI SI HI QI 0 -+ | |<---| | | -+ -+ Originating (SI->DI) -+ DI SI HI QI 0 -+ |<-------| | | | -+ -+ Not redundant, candidate does not cover the original bits: -+ SIZE(cand_to_mode)[SI] !>= SIZE(extend_to_mode)[DI] -+ -+ Example 2: -+ Candidate (QI->DI extension) -+ DI SI HI QI 0 -+ |<-------|----|--| | -+ -+ Originating (HI->SI) -+ DI SI HI QI 0 -+ | |<---| | | -+ -+ Redundant, candidate covers the original bits: -+ SIZE(cand_to_mode) [DI] >= SIZE(extend_to_mode) [SI] -+ AND -+ SIZE(cand_from_mode) [QI] <= SIZE(extend_from_mode) [HI] -+ */ -+ if (GET_CODE (srcexp) == ext_code) -+ { -+ enum machine_mode cand_from_mode = GET_MODE (XEXP (srcexp, 0)); -+ enum machine_mode cand_to_mode = GET_MODE (dest); -+ if ((GET_MODE_BITSIZE (cand_to_mode) >= GET_MODE_BITSIZE (ext_to_mode)) -+ && (GET_MODE_BITSIZE (cand_from_mode) <= -+ GET_MODE_BITSIZE (ext_from_mode))) -+ { -+ if (dump_file) -+ fprintf (dump_file, -+ "%*s...is already extended (redundant extension)\n", -+ indent, " "); -+ return true; -+ } -+ } -+ -+ /* Encountered an insn with the same effect as extension, e.g. -+ AND (regspec) (const_int). E.g. AND (reg:SI) (0x7fff) is equivalent -+ to ZERO_EXTEND:DI (reg:HI) or SIGN_EXTEND:DI (reg:HI). The code selection -+ for AND zero extends the entire register, so we don't have to -+ check that srcexp extends to at least ext_to_mode size. */ -+ if ((GET_CODE (srcexp) == AND) && CONST_INT_P (XEXP (srcexp, 1))) -+ { -+ if (ext_from_mode == QImode && (UINTVAL (XEXP (srcexp, 1)) <= 0x7f)) -+ return true; -+ else if (ext_from_mode == HImode -+ && (UINTVAL (XEXP (srcexp, 1)) <= 0x7fff)) -+ return true; -+ else if (ext_from_mode == SImode -+ && (UINTVAL (XEXP (srcexp, 1)) <= 0x7fffffff)) -+ return true; -+ } -+ -+ return false; -+} -+ -+/* Determine if the operation allows us to continue the propagation. -+ We kill the propagation for all operations except copy. This -+ ensures that the extended operand that we may find eventually -+ is not modified by insns in the def-use chain. It's harsh, -+ but it's safest eliminate all but the most benign (copy) operations -+ in the propagation chain. */ -+ -+static bool -+continue_def_propagation (rtx dest, rtx srcexp, rtx src_operand, int indent) -+{ -+ /* Only continue if its a copy -- that is, the srcexp is a register expression */ -+ if ( register_exp (srcexp) ) -+ return true; -+ -+ return false; -+} -+ -+/* Helper for insn_def_analysis_result. -+ The register operand, src is set here. Recall we -+ can only handle one register operand in the src expression. -+ We one of 3 states: -+ 1) Determine the operand is extended, ...DEF_EXTENDED returned. -+ 2) Determine the propagation can continue, ...DEF_CONTINUE_RECURSION returned. -+ 3) Otherwise, ...DEF_STOP_RECURSION is returned. */ -+static enum insn_def_results -+insn_def_analysis_result_1 (rtx insn, bool treat_as_copy, -+ unsigned int regno_def ATTRIBUTE_UNUSED, -+ rtx * src, int indent) -+{ -+ rtx dest, srcexp; -+ int num_operands; -+ -+ /* Insn has to be an expression we can analyze */ -+ if (GET_CODE (insn) != SET) -+ { -+ if (dump_file) -+ fprintf (dump_file, "%*s...is not a SET expression\n", indent, " "); -+ return EXTELIM_ANALYSIS_RESULT_DEF_STOP_RECURSION; -+ } -+ dest = SET_DEST (insn); -+ srcexp = SET_SRC (insn); -+ -+ /* Dest must be a reg, not expression */ -+ if (!REG_P (dest)) -+ { -+ if (dump_file) -+ fprintf (dump_file, -+ "%*s...dest is not a simple register\n", indent, " "); -+ return EXTELIM_ANALYSIS_RESULT_DEF_STOP_RECURSION; -+ } -+ -+ /* First check whether the operand is extended already. If so, -+ we can leave immediately successfully. */ -+ if (operand_is_extended (dest, srcexp, indent) && !treat_as_copy) -+ return (EXTELIM_ANALYSIS_RESULT_DEF_EXTENDED); -+ -+ -+ /* Failing to determine that the operand is already extended, -+ we have to validate that we have register operands to propagate. */ -+ num_operands = num_reg_operands (srcexp); -+ -+ /* At least one register operand required for propagation. */ -+ if (num_operands == 0) -+ { -+ if (dump_file) -+ fprintf (dump_file, -+ "%*s...no register operands in RHS\n", indent, " "); -+ return EXTELIM_ANALYSIS_RESULT_DEF_STOP_RECURSION; -+ } -+ -+ /* Only one register operand is allowed in the RHS since we can't -+ can't propagate more than one register. */ -+ if (num_operands > 1) -+ { -+ if (dump_file) -+ fprintf (dump_file, -+ "%*s...found multiple register operands in RHS\n", indent, -+ " "); -+ return EXTELIM_ANALYSIS_RESULT_DEF_STOP_RECURSION; -+ } -+ -+ /* Find the used operand in the src expression */ -+ *src = find_regspec (srcexp); -+ if (*src == NULL_RTX || !mode_supported_p (*src)) -+ { -+ if (dump_file) -+ fprintf (dump_file, -+ "%*s...src operand reg=%d cannot be found or is unsupported mode\n", -+ indent, " ", regno_def); -+ return EXTELIM_ANALYSIS_RESULT_DEF_STOP_RECURSION; -+ } -+ -+ /* This is an extension, but it is previously marked to be transformed to a copy. -+ We just treat it as a copy even though it hasn't been transformed yet. So -+ continue the propagation. */ -+ if (treat_as_copy) -+ { -+ if (dump_file) -+ fprintf (dump_file, -+ "%*s...%s is treated as a copy (marked for replace)\n", -+ indent, " ", GET_RTX_NAME (GET_CODE (srcexp))); -+ return (EXTELIM_ANALYSIS_RESULT_DEF_CONTINUE_RECURSION); -+ } -+ -+ /* Validate that it's ok to continue propagation with this operand. */ -+ if (continue_def_propagation (dest, srcexp, *src, indent)) -+ return (EXTELIM_ANALYSIS_RESULT_DEF_CONTINUE_RECURSION); -+ -+ /* Else we default to halting the search for a redundant extension */ -+ return (EXTELIM_ANALYSIS_RESULT_DEF_STOP_RECURSION); -+} -+ -+/* Determine if the insn extends it's destination register in -+ a manner such that the original extension is redundant. */ -+ -+static enum insn_def_results -+insn_def_analysis_result (rtx insn_insn, unsigned int regno_def, rtx * src, -+ int indent) -+{ -+ bool treat_as_copy = false; -+ -+ /* Insn must only define one output */ -+ if (!defines_regno_p (insn_insn, regno_def, indent)) -+ { -+ if (dump_file) -+ fprintf (dump_file, -+ "%*s...defines more than 1 output\n", indent, " "); -+ return EXTELIM_ANALYSIS_RESULT_DEF_STOP_RECURSION; -+ } -+ -+ /* We want to treat this extension as a copy and continue propagation. -+ Otherwise, it would be detected again as redundant. */ -+ if (insn_flag_p (EXTELIM_REPLACE_COPY, INSN_UID (insn_insn))) -+ { -+ if (dump_file) -+ fprintf (dump_file, -+ "%*suse at uid=%d is marked to transform to copy\n", indent, -+ " ", INSN_UID (insn_insn)); -+ treat_as_copy = true; -+ } -+ -+ /* Do the analysis */ -+ return (insn_def_analysis_result_1 -+ (PATTERN (insn_insn), treat_as_copy, regno_def, src, indent)); -+} -+ -+/* Analyze each of the expressions in a PARALLEL expression. As each of -+ the expressions may yield a different state, select the most conservative -+ state to return. */ -+ -+static enum insn_def_results -+insn_def_analysis_2 (rtx insn_def, unsigned int regno_def, rtx * src, -+ int indent) -+{ -+ int i; -+ rtx insn = PATTERN (insn_def); -+ enum insn_def_results action; -+ enum insn_def_results return_action = -+ EXTELIM_ANALYSIS_RESULT_DEF_STOP_RECURSION; -+ -+ gcc_assert (GET_CODE (insn) == PARALLEL); -+ -+ for (i = XVECLEN (insn, 0) - 1; i >= 0; i--) -+ { -+ rtx body = XVECEXP (insn, 0, i); -+ /* Only act on the expressions that define regno_def */ -+ if (!expr_defines_regno_p (body, regno_def)) -+ continue; -+ /* Determine the next action */ -+ action = insn_def_analysis_result_1 (body, false /* treat_as_copy */ , -+ regno_def, src, indent); -+ /* The result of this expression stops the recursion, i.e. no -+ longer reasonable to continue looking at further recursion. */ -+ if (action == EXTELIM_ANALYSIS_RESULT_DEF_STOP_RECURSION) -+ return action; -+ /* Only return EXTENDED if there are no other different actions -+ in the series. Otherwise, CONTINUE_RECURSION is returned. */ -+ if (action == EXTELIM_ANALYSIS_RESULT_DEF_CONTINUE_RECURSION) -+ return_action = action; -+ else if (return_action == -+ EXTELIM_ANALYSIS_RESULT_DEF_CONTINUE_RECURSION) -+ return_action = EXTELIM_ANALYSIS_RESULT_DEF_CONTINUE_RECURSION; -+ else -+ return_action = action; -+ } -+ return (return_action); -+} -+ -+/* Helper 1 for insn_def_analysis */ -+ -+static enum insn_def_results -+insn_def_analysis_1 (rtx insn_def, unsigned int regno_def, rtx * src, -+ int indent) -+{ -+ rtx def = PATTERN (insn_def); -+ enum insn_def_results action; -+ -+ switch (GET_CODE (def)) -+ { -+ case PARALLEL: -+ action = insn_def_analysis_2 (insn_def, regno_def, src, indent); -+ break; -+ default: -+ action = insn_def_analysis_result (insn_def, regno_def, src, indent); -+ break; -+ } -+ return action; -+} -+ -+/* We look at the definition of a register that is either the -+ sign or zero extend source register or a definition that that -+ has been propagated to here via analyze_ext_def. The objective -+ is to determine, by looking at the operation and operands, whether -+ the register is sign/zero extended by virtue of the operation and/or -+ operands. If so, the original extension is redundant. -+ The function returns one of 3 possible states after analyzing the -+ insn: -+ 1. EXTELIM_ANALYSIS_RESULT_DEF_EXTENDED - we determined that the -+ insn does indeed extend the original source extension register. -+ analyze_ext_def returns FALSE, therefore, ending the recursion -+ and propagation. -+ 2. EXTELIM_ANALYSIS_RESULT_DEF_STOP_RECURSION - we determined that -+ the insn does not meet the criteria to continue the recursive search. -+ Some conditions causing this may be multiple operands defining this -+ register (we only propagate on a single input operand) or the insn -+ defines more than one output or the operation does not allow -+ a previous extension to propagate, e.g. an arithmetic shift on -+ a SI value clears the upper bits using rlwinm. MUL, DIV, MOD -+ stop recursion because the result is longer than the input size, -+ thus impacting the possible previous extension. -+ 3. EXTELIM_ANALYSIS_RESULT_DEF_CONTINUE_RECURSION - we found an -+ operation with one register operand and the operation will not -+ affect a previous extension if one exists. ADD, SUB are examples. -+ We continue looking up the chain at the definition of the operand -+ for an extended result. -+ If we run into a previous extension marked for replacement during -+ recursion, we treat it as a copy (CONTINUE_RECURSION since the -+ extension is preserved by the copy). */ -+ -+static enum insn_def_results -+insn_def_analysis (rtx insn_def, unsigned int regno_def, rtx * src, -+ int indent) -+{ -+ return (insn_def_analysis_1 (insn_def, regno_def, src, indent)); -+} -+ -+/* Analyze the insn defining the source of the sign extension. -+ If it can be determined that the definition is already -+ sign extended, return false. Otherwise, return true if -+ extension is needed. */ -+ -+static bool -+analyze_ext_def (rtx insn_def, unsigned int regno_def, int indent) -+{ -+ extelim_uid_t uid; -+ rtx def = PATTERN (insn_def); -+ rtx src; -+ df_ref df_def, *p_use; -+ bool ext_needed, indent_once; -+ struct df_link *link; -+ enum insn_def_results analysis_result; -+ -+ gcc_assert (def != NULL); -+ -+ uid = INSN_UID (insn_def); -+ -+ /* If we seen the originating extension again, return false (ext not needed) */ -+ if (current_ext_record->ext == insn_def) -+ { -+ if (dump_file) -+ fprintf (dump_file, -+ "%*sdef at uid=%d is original extension\n", indent, " ", uid); -+ return false; -+ } -+ -+ /* The recursion has to definitively end with an operand being -+ extended (and compatible with the originating extension). If -+ we see the insn again, this could return a faulty positive (false), -+ so we return true here instead of false. See pr43017 (-funroll-loops) -+ as an example. */ -+ if (insn_flag_p (EXTELIM_SEEN, uid)) -+ { -+ if (dump_file) -+ fprintf (dump_file, -+ "%*sdef at uid=%d is visited already\n", indent, " ", uid); -+ return true; -+ } -+ -+ /* Mark this insn as seen */ -+ insn_flag_set (EXTELIM_SEEN, uid); -+ -+ analysis_result = insn_def_analysis (insn_def, regno_def, &src, indent); -+ switch (analysis_result) -+ { -+ /* We know conclusively that the register defined in this expression -+ is already extended. */ -+ case EXTELIM_ANALYSIS_RESULT_DEF_EXTENDED: -+ if (dump_file) -+ fprintf (dump_file, "%*sdef at uid=%d is extended\n", indent, " ", -+ uid); -+ return false; -+ break; -+ /* We know conclusively that we cannot continue the recursion. Perhaps -+ the expression defines multiple registers, etc. */ -+ case EXTELIM_ANALYSIS_RESULT_DEF_STOP_RECURSION: -+ if (dump_file) -+ fprintf (dump_file, "%*sdef at uid=%d cannot be propagated\n", indent, -+ " ", uid); -+ return true; -+ break; -+ /* Continue to look at the operands of this expression. They may be extended -+ already. */ -+ case EXTELIM_ANALYSIS_RESULT_DEF_CONTINUE_RECURSION: -+ break; -+ default: -+ gcc_unreachable (); -+ } -+ -+ /* This is the operand for which we want to find definitions. There should -+ only be one operand as we have previously checked for operations with only -+ one register operand as the src previously. */ -+ p_use = DF_INSN_UID_USES (uid); -+ gcc_assert (p_use != NULL); -+ -+ /* Make sure that this use is the one returned in src. Otherwise we simply -+ stop the propagation. Note the DF_INSN_UID_USES works at the insn -+ level, so a PARALLEL pattern may return many uses, hence the need -+ to validate the correct use here. */ -+ if ((*p_use == NULL) || (DF_REF_REGNO (*p_use) != REGNO (src))) -+ return true; -+ -+ ext_needed = true; -+ indent_once = true; -+ for (link = DF_REF_CHAIN (*p_use); link; link = link->next) -+ { -+ rtx insn_def; -+ df_def = link->ref; -+ if (!df_def) -+ continue; -+ /* Link must be to a definition of the use */ -+ if (!DF_REF_REG_DEF_P (df_def)) -+ continue; -+ /* Ignore ARTIFICIAL defs */ -+ if (DF_REF_IS_ARTIFICIAL (df_def)) -+ continue; -+ insn_def = DF_REF_INSN (df_def); -+ /* Don't consider debug_insns */ -+ if (!NONDEBUG_INSN_P (insn_def)) -+ continue; -+ if (dump_file) -+ fprintf (dump_file, -+ "%*sdef of reg=%d at uid=%d\n", indent, " ", -+ DF_REF_REGNO (df_def), INSN_UID (insn_def)); -+ /* Set indent for dump formatting */ -+ if (indent_once) -+ { -+ ++indent; -+ indent_once = false; -+ } -+ ext_needed = analyze_ext_def (insn_def, DF_REF_REGNO (df_def), indent); -+ if (ext_needed) -+ break; -+ } -+ -+ if (dump_file) -+ fprintf (dump_file, -+ "%*sext %s needed\n", indent, " ", ext_needed ? "" : "not"); -+ -+ return ext_needed; -+} -+ -+/* Determine whether the expression needs to be saved for this extension. -+ The expression will be updated in some way if the extension is ultimately -+ eliminated. */ -+ -+static bool -+exp_needs_update_p (rtx exp) -+{ -+ if (GET_CODE (exp) == SUBREG -+ && (SUBREG_PROMOTED_VAR_P (exp))) -+ { -+ return true; -+ } -+ return false; -+} -+ -+/* Some expressions may need to be updated if the originating extension -+ is eliminated. For example, SUBREG_PROMOTED flags on uses are no longer -+ valid if the extension is eliminated. Save the expression here. */ -+ -+static void -+save_ext_update (ext_record_t extrec, rtx exp) -+{ -+ /* Save this expression to be updated if the extension is eliminated. */ -+ VEC_safe_push (rtx, heap, extrec->ext_updates, exp); -+} -+ -+/* Check a compare operation to determine whether the operands -+ of the compare use the upper bits of the extension. Return -+ true if the upper bits are not relevant in the compare, false -+ otherwise. */ -+ -+static bool -+check_compare (rtx dest, rtx src) -+{ -+ /* Detect -+ (set (reg:CC r0) (compare:CC (REGSPEC) (REGSPEC))) -+ or -+ (set (reg:CC r0) (compare:CC (REGSPEC) (CONST))) -+ where REGSPEC is (reg:mm r) or (subreg:mm (reg:MM r) n) -+ CONST is a constant integer. -+ The mode size of compare ops must be less than the -+ mode of the original extension for the upper bits to -+ be irrelevant. -+ An exception is made for mode sizes less than a word size. -+ For our targets, there is no 'cmph' insn, so we bail out -+ if we see a comparison of sizes less than a word (SI). */ -+ if (REG_P (dest) -+ && (GET_MODE (dest) == CCmode || GET_MODE (dest) == CCUNSmode) -+ && GET_CODE (src) == COMPARE -+ && (GET_MODE (src) == CCmode || GET_MODE (src) == CCUNSmode)) -+ { -+ rtx compare_op0 = XEXP (src, 0); -+ rtx compare_op1 = XEXP (src, 1); -+ -+ /* Check the first operand, op0, size. */ -+ if ((REG_P (compare_op0) || GET_CODE (compare_op0) == SUBREG) -+ && (GET_MODE_BITSIZE (GET_MODE (compare_op0)) <= -+ GET_MODE_BITSIZE (ext_from_mode))) -+ { -+ /* Half word compares and smaller are performed as word compares, so upper bits are used. */ -+ if (GET_MODE_BITSIZE (GET_MODE (compare_op0)) < SImode) -+ return false; -+ -+ /* Now check the other operand, op1. */ -+ if ((REG_P (compare_op1) || GET_CODE (compare_op1) == SUBREG) -+ && (GET_MODE_BITSIZE (GET_MODE (compare_op1)) <= -+ GET_MODE_BITSIZE (ext_from_mode))) -+ return true; -+ -+ /* Compare to constant, we know op0 already meets size constraints. */ -+ if (CONST_INT_P (compare_op1)) -+ return true; -+ } -+ } -+ return false; -+} -+ -+/* Determine condition a, whether the upper bits are relevant to the operation. -+ Return false if we prove the upper bits are not relevant in the operation, -+ true otherwise. */ -+ -+static bool -+operation_uses_upper_bits (rtx dest, rtx src, unsigned int regno_use, -+ int indent ATTRIBUTE_UNUSED) -+{ -+ rtx regspec_src = find_regspec_regno (regno_use, src); -+ -+ if (check_compare (dest, src)) -+ return false; -+ -+ /* Store of regno to mem, size stored is the same or smaller than the extended from size */ -+ if (MEM_P (dest) -+ && (GET_MODE_BITSIZE (GET_MODE (dest)) <= -+ GET_MODE_BITSIZE (ext_from_mode)) -+ /* Ensure the used register is being stored and not used in another capacity, say, as a pointer. */ -+ && (regspec_src)) -+ return false; -+ -+ /* Operation operand size is the same or smaller than the extended from size */ -+ if (regspec_src) -+ { -+ if (GET_MODE_BITSIZE (GET_MODE (regspec_src)) <= -+ GET_MODE_BITSIZE (ext_from_mode)) -+ return false; -+ } -+ -+ /* Default to the safest result */ -+ return true; -+} -+ -+/* Determine if this insn also extends to the size or greater of the original extension. -+ Sign extend can propagate to zero extend and vice-versa because the upper bits -+ haven't affected the low bits up to now throughout the propagation. */ -+ -+static bool -+operation_extends_to_upper_bits_size (rtx src, int indent ATTRIBUTE_UNUSED) -+{ -+ /* Sign extension of the same type as the originating extension. -+ Here the candidate uses the register defined by the originating extension. -+ If the candidate is found to be redundant, the originating extension is -+ replaced with a copy. -+ -+ We follow these rules: -+ -+ dest_mode == machine mode of the destination for this candidate extension -+ (it's the same mode as the src, e,g, reg:DI = sign_extend:DI ...) -+ src_mode == machine mode of the source for this candidate extension -+ (the mode of the used register, SI in this case, e.g. reg:DI = sign_extend:DI (subreg:SI (reg:DI)) -+ ext_to_mode == machine mode of the originating extension output -+ ext_from_mode == machine mode of the originating extension input -+ -+ SIZE(cand_from_mode) >= SIZE(extend_from_mode) && SIZE(cand_to_mode) <= SIZE(extend_to_mode) -+ -+ Example 1: -+ Originating (SI->DI) -+ DI SI HI QI 0 -+ |<-------| | | | -+ -+ Candidate (HI->SI extension) -+ DI SI HI QI 0 -+ | |<---| | | -+ -+ Not redundant, candidate does not cover the original bits: -+ SIZE(dest_mode)[SI] !<= SIZE(extend_to_mode)[DI] -+ -+ Example 2: -+ Originating (HI->SI) -+ DI SI HI QI 0 -+ | |<---| | | -+ -+ Candidate (QI->DI extension) -+ DI SI HI QI 0 -+ |<-------|----|--| | -+ -+ Redundant, candidate covers the original bits: -+ SIZE(cand_to_mode) [DI] >= SIZE(extend_to_mode) [SI] -+ AND -+ SIZE(cand_from_mode) [QI] <= SIZE(extend_from_mode) [HI] */ -+ if (GET_CODE (src) == ext_code) -+ { -+ /* Extend is redundant if we don't overwrite the source of the -+ previous extension and extends to at least the extent of the original. */ -+ enum machine_mode cand_from_mode = GET_MODE (XEXP (src, 0)); -+ enum machine_mode cand_to_mode = GET_MODE (src); -+ if (GET_MODE_BITSIZE (cand_from_mode) >= -+ GET_MODE_BITSIZE (ext_from_mode) -+ && (GET_MODE_BITSIZE (cand_to_mode) <= -+ GET_MODE_BITSIZE (ext_to_mode))) -+ return true; -+ } -+ -+ /* Encountered an insn with the same effect as extension, e.g. -+ AND (regspec) (const_int). E.g. AND (reg:SI) (0xffff) is equivalent -+ to ZERO_EXTEND:DI (reg:HI) */ -+ if ((GET_CODE (src) == AND) && CONST_INT_P (XEXP (src, 1))) -+ { -+ /* Extends to at least the original extension size */ -+ if (GET_MODE_BITSIZE (GET_MODE (src)) >= GET_MODE_BITSIZE (ext_to_mode)) -+ { -+ if (ext_from_mode == QImode && (UINTVAL (XEXP (src, 1)) <= 0xff)) -+ return true; -+ else if (ext_from_mode == HImode -+ && (UINTVAL (XEXP (src, 1)) <= 0xffff)) -+ return true; -+ else if (ext_from_mode == SImode -+ && (UINTVAL (XEXP (src, 1)) <= 0xffffffff)) -+ return true; -+ else -+ return false; -+ } -+ } -+ return false; -+} -+ -+/* Determine whether the operation's upper bits subtly or overtly affects the low bits. */ -+ -+static bool -+operation_implicitly_affects_lowbits (rtx dest, rtx src, -+ unsigned int regno_use, int indent) -+{ -+ rtx regspec = find_regspec_regno (regno_use, src); -+ -+ /* First, a return expression must be assumed to affect the lowbits as the return value -+ must be extended properly. */ -+ if (return_val_p (dest)) -+ { -+ if (dump_file) -+ { -+ fprintf (dump_file, "%*sDestination is a return value\n", indent, -+ " "); -+ } -+ return true; -+ } -+ -+ /* These operations implicitly affect the lowbits, except where noted. */ -+ switch (GET_CODE (src)) -+ { -+ case MULT: -+ case DIV: -+ case UDIV: -+ case UMOD: -+ case MOD: -+ /* Normally, yes, these operations return true (affects low bits). But when the -+ the operand size is less than or equal to the "low bits" size AND the operation size -+ is the same as the operand size, the operation is performed only on the "low bits" -+ and the "upper bits" do not contribute to the output. */ -+ if (regspec -+ && (GET_MODE_BITSIZE (GET_MODE (regspec)) <= -+ GET_MODE_BITSIZE (ext_from_mode)) -+ && GET_MODE_BITSIZE (GET_MODE (src)) == -+ GET_MODE_BITSIZE (GET_MODE (regspec))) -+ return false; -+ return true; -+ -+ break; -+ /* Shift rights normally affect the low bits. There can be special cases where this -+ is not true, such a the operand size is smaller than the extended from size, e.g. -+ set (reg:SI Y) (zero_extend:SI (subreg:HI (reg:SI X))) -+ set (reg:QI Z) (lshiftrt (subreg:QI (reg:SI Y)) -+ The shift of the QI data is not affected by the extension of HI data unless the -+ shift is large enough to encroach into the QI bits. This seems rare and I do not -+ check for it. */ -+ case LSHIFTRT: -+ case ASHIFTRT: -+ return true; -+ break; -+ /* Other operations are known not to impact the low bits */ -+ default: -+ return false; -+ } -+ -+} -+ -+/* The operation directly defines a propagatable output. Several -+ operations do not define such output. E.g. MEM (loads) do not -+ define an output based on the operation. USE is another example, -+ as it isn't a real operation. */ -+ -+static bool -+operation_directly_defines_an_output (rtx dest, rtx src, -+ int indent ATTRIBUTE_UNUSED) -+{ -+ switch (GET_CODE (src)) -+ { -+ case REG: -+ case SUBREG: -+ case PLUS: -+ case MINUS: -+ case NEG: -+ case MULT: -+ case DIV: -+ case MOD: -+ case UDIV: -+ case UMOD: -+ case AND: -+ case IOR: -+ case XOR: -+ case NOT: -+ case ASHIFT: -+ case ROTATE: -+ case ASHIFTRT: -+ case LSHIFTRT: -+ case ROTATERT: -+ case SIGN_EXTEND: -+ case ZERO_EXTEND: -+ case TRUNCATE: -+ return true; -+ break; -+ /* OK to propagate if the output of IF_THEN_ELSE is a register */ -+ case IF_THEN_ELSE: -+ if (REG_P (dest)) -+ return true; -+ break; -+ /* All others are assumed not to generate a normal output */ -+ default: -+ break; -+ } -+ return false; -+} -+ -+/* Helper for insn_use_analysis_result */ -+ -+static enum insn_use_results -+insn_use_analysis_result_1 (rtx insn, bool treat_as_copy, -+ unsigned int regno_use, rtx * dest, int indent) -+{ -+ rtx src; -+ bool cond_a, cond_b, cond_c, cond_d; -+ -+ if (GET_CODE (insn) != SET) -+ return EXTELIM_ANALYSIS_RESULT_LOWBITS_AFFECTED; -+ -+ *dest = SET_DEST (insn); -+ src = SET_SRC (insn); -+ -+ /* Bail out on inline assembly also */ -+ if (GET_CODE (src) == ASM_INPUT || GET_CODE (src) == ASM_OPERANDS) -+ return EXTELIM_ANALYSIS_RESULT_LOWBITS_AFFECTED; -+ -+ /* Bail out on non supported types */ -+ if (!mode_supported_p (*dest)) -+ return EXTELIM_ANALYSIS_RESULT_LOWBITS_AFFECTED; -+ -+ /* First, we determine cond_c (is a redundant extension) because it gates the -+ other conditions. */ -+ if ((cond_c = operation_extends_to_upper_bits_size (src, indent))) -+ { -+ if (treat_as_copy) -+ { -+ if (dump_file) -+ fprintf (dump_file, -+ "%*s...%s is treated as a copy (marked for replace)\n", -+ indent, " ", GET_RTX_NAME (GET_CODE (src))); -+ return EXTELIM_ANALYSIS_RESULT_CONTINUE_RECURSION; -+ } -+ -+ if (dump_file) -+ fprintf (dump_file, -+ "%*s...%s is a redundant extension\n", -+ indent, " ", GET_RTX_NAME (GET_CODE (src))); -+ return EXTELIM_ANALYSIS_RESULT_LOWBITS_NOT_AFFECTED; -+ } -+ -+ cond_a = operation_uses_upper_bits (*dest, src, regno_use, indent); -+ -+ cond_b = -+ operation_implicitly_affects_lowbits (*dest, src, regno_use, indent); -+ -+ cond_d = operation_directly_defines_an_output (*dest, src, indent); -+ -+ /* Operation implicitly affects low bits */ -+ if (cond_b) -+ { -+ if (dump_file) -+ fprintf (dump_file, -+ "%*s...%s implicitly affects low bits\n", -+ indent, " ", GET_RTX_NAME (GET_CODE (src))); -+ return EXTELIM_ANALYSIS_RESULT_LOWBITS_AFFECTED; -+ } -+ -+ /* Neither cond_a nor cond_b affects the low bits */ -+ if (!cond_a) -+ { -+ if (dump_file) -+ fprintf (dump_file, -+ "%*s...%s does not use upper bits\n", -+ indent, " ", GET_RTX_NAME (GET_CODE (src))); -+ return EXTELIM_ANALYSIS_RESULT_LOWBITS_NOT_AFFECTED; -+ } -+ -+ /* To continue recursion, the operation must define a -+ meaningful output. */ -+ if (!cond_d) -+ { -+ if (dump_file) -+ fprintf (dump_file, -+ "%*s...%s does not define a propagatable output\n", -+ indent, " ", GET_RTX_NAME (GET_CODE (src))); -+ return EXTELIM_ANALYSIS_RESULT_LOWBITS_AFFECTED; -+ } -+ -+ /* This leaves cond_a, meaning we need to continue down the chain -+ to see if the low bits are ultimately affected by the upper bits. */ -+ return EXTELIM_ANALYSIS_RESULT_CONTINUE_RECURSION; -+} -+ -+/* Determine the action based on the insn conditions. The truth table is -+ simplified using if statements. Insns previously marked for replace by copy -+ are identified, these will be essentially be treated as copies now and not -+ be detected as redundant for this use. */ -+static enum insn_use_results -+insn_use_analysis_result (rtx insn_insn, unsigned int regno_use, rtx * dest, -+ int indent) -+{ -+ bool treat_as_copy = false; -+ if (insn_flag_p (EXTELIM_REPLACE_COPY, INSN_UID (insn_insn))) -+ { -+ if (dump_file) -+ fprintf (dump_file, -+ "%*suse at uid=%d is marked to transform to copy\n", indent, -+ " ", INSN_UID (insn_insn)); -+ treat_as_copy = true; -+ } -+ return (insn_use_analysis_result_1 -+ (PATTERN (insn_insn), treat_as_copy, regno_use, dest, indent)); -+} -+ -+/* We have to analyze each expression action in a PARALLEL series. -+ Return the appropriate action for a series of expressions in a PARALLEL insn. -+ LOWBITS_AFFECTED stops the loop. This leaves only CONTINUE_RECURSION -+ or LOWBITS_NOT_AFFECTED. LOWBITS_NOT_AFFECTED is only returned -+ if there are no other different actions in the series (no CONTINUE_RECURSION -+ states). For each CONTINUE_RECURSION action we encounter, the destination -+ registers must be identical since we can only propagate one use (one definition -+ of dest) should CONTINUE_RECURSION be returned. */ -+ -+static enum insn_use_results -+analyze_action (enum insn_use_results cur_action, -+ enum insn_use_results prev_action, -+ rtx * dest, rtx * prev_dest) -+{ -+ enum insn_use_results return_action; -+ -+ if (cur_action == EXTELIM_ANALYSIS_RESULT_LOWBITS_AFFECTED) -+ return cur_action; -+ -+ if (cur_action == EXTELIM_ANALYSIS_RESULT_CONTINUE_RECURSION) -+ return_action = cur_action; -+ else if (prev_action == EXTELIM_ANALYSIS_RESULT_CONTINUE_RECURSION) -+ return_action = EXTELIM_ANALYSIS_RESULT_CONTINUE_RECURSION; -+ else -+ return_action = cur_action; -+ -+ if (return_action == EXTELIM_ANALYSIS_RESULT_CONTINUE_RECURSION) -+ { -+ if (*prev_dest) -+ { -+ /* All bets off if the series defines multiple outputs */ -+ if (*prev_dest != *dest) -+ return_action = EXTELIM_ANALYSIS_RESULT_LOWBITS_AFFECTED; -+ } -+ } -+ /* Set prev_dest */ -+ *prev_dest = *dest; -+ -+ return return_action; -+} -+ -+/* Helper 2 for insn_use_analysis. Return the appropriate action -+ for a series of expressions in a PARALLEL insn. */ -+ -+static enum insn_use_results -+insn_use_analysis_2 (rtx insn_use, unsigned int regno_use, rtx * dest, -+ int indent) -+{ -+ int i; -+ rtx insn = PATTERN (insn_use); -+ rtx prev_dest = NULL_RTX; -+ enum insn_use_results action; -+ enum insn_use_results return_action = -+ EXTELIM_ANALYSIS_RESULT_LOWBITS_NOT_AFFECTED; -+ -+ gcc_assert (GET_CODE (insn) == PARALLEL); -+ -+ /* We make a quick decision about call_insns here. Since the use reached -+ a call, we assume it's an outgoing parameter and thus must be extended -+ as per the ABI. */ -+ if (CALL_P (insn_use)) -+ { -+ if (dump_file) -+ fprintf (dump_file, "%*s...is a call parameter\n", indent, " "); -+ return EXTELIM_ANALYSIS_RESULT_LOWBITS_AFFECTED; -+ } -+ -+ for (i = XVECLEN (insn, 0) - 1; i >= 0; i--) -+ { -+ rtx body = XVECEXP (insn, 0, i); -+ /* Only act on the expressions containing a use of regno_use. */ -+ if (regno_use_in (regno_use, body) == NULL_RTX) -+ continue; -+ -+ /* Determine the next action */ -+ action = insn_use_analysis_result_1 (body, false /* treat as copy */ , -+ regno_use, dest, indent); -+ -+ /* Here we make a decision on the return action based on the previous actions. -+ This is done to accomodate different actions from different elements in the -+ PARALLEL series of expressions. */ -+ return_action = -+ analyze_action (action, return_action, dest, &prev_dest); -+ -+ /* The result of this expression stops the recursion, i.e. "low bits" -+ are affected by the operation. */ -+ if (return_action == EXTELIM_ANALYSIS_RESULT_LOWBITS_AFFECTED) -+ break; -+ } -+ return (return_action); -+} -+ -+/* Helper 1 for insn_use_analysis */ -+ -+static enum insn_use_results -+insn_use_analysis_1 (rtx insn_use, unsigned int regno_use, rtx * dest, -+ int indent) -+{ -+ rtx use = PATTERN (insn_use); -+ enum insn_use_results action; -+ -+ switch (GET_CODE (use)) -+ { -+ case PARALLEL: -+ action = insn_use_analysis_2 (insn_use, regno_use, dest, indent); -+ break; -+ default: -+ action = insn_use_analysis_result (insn_use, regno_use, dest, indent); -+ break; -+ } -+ -+ return action; -+} -+ -+/* Analyze the insn and determine the next course of action in the -+ use analysis loop. -+ There are several conditions to consider: -+ -+ 1. The "extended from" mode. This is an enum machine_mode value -+ that determines what is the size extended. It is derived from the -+ source of the original extension. It is the "low bits" value. -+ It is these range of bits that cannot be affected by the operation's -+ "upper bits" in order to determine whether the extend is useful or not. -+ Examples: -+ (1) set (reg:DI Y (zero_extend:DI (subreg:QI (reg:DI X))) ==> low bits = QI -+ (2) set (reg:SI Y (sign_extend:SI (reg:HI X) ==> low bits = HI -+ -+ 2. The "extend to" mode. This is the size extended to in the original -+ extension. It is the "upper bits" value. The entire extended to size may -+ be used subsequently or it may be subreg'd to a smaller or larger sizes -+ later in the propagation. -+ For example (1) above, "upper bits" is DI, and (2) "upper bits" is SI. -+ -+ 3. The code, ext_code, of the original extension, either ZERO_EXTEND or SIGN_EXTEND. -+ -+ 4. Operation code. For an insn, the actual operation code corresponding to -+ a machine instruction. For certain codes, we know that the "low bits" of the -+ result are modified by the insn because of the values in the "upper bits" of the -+ input operand. We say the operation implicitly uses the "upper bits" to modify the -+ "low bits". For other codes, the "upper bits" do not affect the output result -+ in the "low bits". -+ -+ If the operation does implicitly use the "upper bits" to modify -+ the "low bits", it is instantly a deal killer. The original extension must be -+ preserved. -+ -+ If the operation does not implicitly use "upper bits" to modify the "low bits", -+ then the action to take depends on the operation operand size relative to -+ "low bits" size. -+ -+ We only want to deal with codes that map to real instructions, -+ like ADD, SUB, MULT, LSHIFTRT, etc. Codes such as PARALLEL, etc. do not map to -+ instruction and must be dissected to extract the real instructions. -+ -+ Furthermode, for recursion to continue, the operation and operand must define -+ an output related to the input operand (the use register). This doesn't happen -+ for operations such as "mem" where the output is indirectly related to the -+ input operand. -+ -+ 5. Operation mode. The operation mode of the operation code. This sometimes impacts -+ the effect of the operation. For example MULT:SI and MULT:DI map to two different -+ machine instructions and both may have operands of SI mode. However, the MULT:SI -+ results will be oblivious to the upper bits of the DI register whereas, SI part of -+ MULT:DI result will be affected by the upper bits of the DI register. -+ -+ Several conditions determine the action to take based on the various inputs. -+ -+ The truth table inputs are A, B, and C. The truth table output is the action to take. -+ -+ A. True if the used operand mode size is greater than the extended_from ("low bits") mode size. -+ B. True if the operation implicitly uses upper bits to define the low bits -+ C. True if the operation also extends the output to upper bits size -+ D. True if the operation and input operand directly define an output operand. -+ -+ Condition A. means the upper bits are in use in the operation. The extend _may_ be needed, -+ all things being equal, so the action would be to continue recursion to the use of the -+ defined operand, i.e. return CONTINUE_RECURSION. -+ -+ Condition B. means the "low bits" are modified by the extended portion of the register -+ by virtue of the operation. For example, logical shift right, where the extended -+ portion is shifted into the "low bits". Another example, multiply, where the machine -+ uses the extended portion implicitly to calculate the results, some of which are -+ reflected in the "low bits" of the result. The extension is definitely needed in these -+ cases for this use, so return LOWBITS_AFFECTED. Recursion is stopped and analysis of -+ this extension is halted. -+ -+ Condition C. means the operation and it's operands perform the same extension as -+ the originating extension. The operation must extend to the same size _or higher_ of -+ the original extension. In this case, the original extension is truly redundant and -+ we return LOWBITS_NOT_AFFECTED for this use. -+ -+ Condtion D. means the operation and operand directly define an output operand. For most -+ arithmetic and unary operations this is true. For mem and other internal operations, -+ e.g. USE, this is false. -+ -+ Condition Action Comments -+ ================================================================== -+ A. B. C. D. -+ ------------------------------------------------------------------ -+ X X true true LOW_BITS_NOT_AFFECTED extend is redundant -+ ------------------------------------------------------------------ -+ false false false X LOW_BITS_NOT_AFFECTED used operand is smaller than "low bits" -+ ------------------------------------------------------------------ -+ false true false true LOW_BITS_AFFECTED "low bits" modified implicitly by operation -+ ------------------------------------------------------------------ -+ true false false true CONTINUE_RECURSION "low bits" _may_ be impacted by next uses -+ ------------------------------------------------------------------ -+ true true false true LOW_BITS_AFFECTED "low bits" modified implicitly by operation */ -+ -+static enum insn_use_results -+insn_use_analysis (rtx insn_use, unsigned int regno_use, rtx * dest, -+ int indent) -+{ -+ return (insn_use_analysis_1 (insn_use, regno_use, dest, indent)); -+} -+ -+/* Analyze the operation and operands of this use of a sign extension -+ target register. If the target register's upper bits do not -+ affect the result of the operation, then the sign extension is -+ useless. Returns true if the extension is needed, false -+ otherwise. */ -+ -+static bool -+analyze_ext_use (rtx insn_use, unsigned int regno_use, int indent) -+{ -+ bool ext_needed, indent_once; -+ unsigned int dest_target_regno; -+ extelim_uid_t uid; -+ rtx use = PATTERN (insn_use), dest; -+ df_ref df_use, *p_def; -+ struct df_link *link; -+ enum insn_use_results analysis_result; -+ -+ gcc_assert (use != NULL); -+ -+ uid = INSN_UID (insn_use); -+ -+ if (insn_flag_p (EXTELIM_SEEN, uid)) -+ { -+ if (dump_file) -+ fprintf (dump_file, -+ "%*suse at uid=%d is visited already\n", indent, " ", uid); -+ return false; -+ } -+ -+ /* Mark this insn as seen */ -+ insn_flag_set (EXTELIM_SEEN, uid); -+ -+ analysis_result = insn_use_analysis (insn_use, regno_use, &dest, indent); -+ switch (analysis_result) -+ { -+ /* We know conclusively that the "upper bits" of the extended -+ entity do not impact the "low bits" of the output of the operation. */ -+ case EXTELIM_ANALYSIS_RESULT_LOWBITS_NOT_AFFECTED: -+ if (dump_file) -+ fprintf (dump_file, "%*suse at uid=%d is not affected\n", indent, " ", -+ uid); -+ return false; -+ break; -+ /* We know conclusively that the "upper bits" of the extended -+ entity _do_ impact the "low bits" of the output of the operation. */ -+ case EXTELIM_ANALYSIS_RESULT_LOWBITS_AFFECTED: -+ if (dump_file) -+ fprintf (dump_file, "%*suse at uid=%d is affected\n", indent, " ", -+ uid); -+ return true; -+ break; -+ /* Continue to look at the uses of the result to determine the impact -+ of the "upper bits" */ -+ case EXTELIM_ANALYSIS_RESULT_CONTINUE_RECURSION: -+ break; -+ default: -+ gcc_unreachable (); -+ } -+ -+ /* We reach here because the action taken is CONTINUE_RECURSION. -+ Continue to look at the uses of the destination register recursively. -+ If the propagation ultimately ends where the upper bits are not significant -+ to the final output, then the extension can be removed. */ -+ if (!REG_P (dest)) -+ { -+ if (dump_file) -+ fprintf (dump_file, -+ "%*sdest of uid=%d (SET) is not a register\n", indent, " ", -+ uid); -+ return true; -+ } -+ -+ dest_target_regno = REGNO (dest); -+ -+ /* What this insn defines */ -+ p_def = DF_INSN_UID_DEFS (uid); -+ -+ /* Ref must be valid and there must be only one definition and it must be the -+ destination */ -+ if ((*p_def == NULL) || (*(p_def + 1) != NULL)) -+ return true; -+ -+ gcc_assert (DF_REF_REGNO (*p_def) == dest_target_regno); -+ -+ ext_needed = true; -+ indent_once = true; -+ for (link = DF_REF_CHAIN (*p_def); link; link = link->next) -+ { -+ rtx insn_use, use_exp; -+ df_use = link->ref; -+ if (!df_use) -+ continue; -+ /* Link must be a USE of the DEF */ -+ if (!DF_REF_REG_USE_P (df_use)) -+ continue; -+ /* Ignore ARTIFICIAL USES */ -+ if (DF_REF_IS_ARTIFICIAL (df_use)) -+ continue; -+ insn_use = DF_REF_INSN (df_use); -+ /* Don't consider debug_insns */ -+ if (!NONDEBUG_INSN_P (insn_use)) -+ continue; -+ use_exp = DF_REF_REG (df_use); -+ -+ if (exp_needs_update_p (use_exp)) -+ { -+ if (dump_file) -+ fprintf (dump_file, -+ "%*ssaved reg=%d expression for update\n", indent, " ", DF_REF_REGNO (df_use)); -+ save_ext_update (current_ext_record, use_exp); -+ } -+ -+ if (dump_file) -+ fprintf (dump_file, -+ "%*suse at uid=%d of reg=%d\n", indent, " ", -+ INSN_UID (insn_use), DF_REF_REGNO (df_use)); -+ /* Set indent for dump formatting */ -+ if (indent_once) -+ { -+ ++indent; -+ indent_once = false; -+ } -+ ext_needed = analyze_ext_use (insn_use, DF_REF_REGNO (df_use), indent); -+ if (ext_needed) -+ break; -+ } -+ -+ if (dump_file) -+ fprintf (dump_file, -+ "%*sext %s needed\n", indent, " ", ext_needed ? "" : "not"); -+ -+ return ext_needed; -+} -+ -+/* Set a flag on an insn indicating that it is -+ marked for replacement by a copy insn or for -+ deletion. */ -+ -+static void -+mark_replace_with_copy (rtx ext) -+{ -+ extelim_uid_t uid = INSN_UID (ext); -+ insn_flag_set (EXTELIM_REPLACE_COPY, uid); -+} -+ -+/* Get the mode that we are sign/zero extending from */ -+ -+static enum machine_mode -+get_ext_from_mode (rtx src) -+{ -+ rtx regexp; -+ gcc_assert (GET_CODE (src) == ZERO_EXTEND || GET_CODE (src) == SIGN_EXTEND); -+ -+ /* The SUBREG or REG mode of the extend operand */ -+ regexp = XEXP (src, 0); -+ return (GET_MODE (regexp)); -+} -+ -+/* Perform the action on the expression. Return true -+ if any action performed, false otherwise. */ -+ -+static bool -+process_ext_update (rtx exp) -+{ -+ /* Reset SUBREG_PROMOTED state to false */ -+ if (GET_CODE (exp) == SUBREG -+ && SUBREG_PROMOTED_VAR_P (exp)) -+ { -+ SUBREG_PROMOTED_VAR_P (exp) = 0; -+ return true; -+ } -+ -+ return false; -+} -+ -+/* Process the current extension record, looking at all the -+ the expressions that need to be updated because this -+ extension will be replaced by a copy. */ -+ -+static void -+process_ext_updates (ext_record_t extrec) -+{ -+ unsigned i; -+ rtx exp; -+ bool updated=false; -+ -+ -+ FOR_EACH_VEC_ELT (rtx, extrec->ext_updates, i, exp) -+ { -+ updated |= process_ext_update (exp); -+ } -+ -+ if (dump_file && updated) -+ fprintf (dump_file, " updates processed for extension at uid=%d\n", -+ INSN_UID (extrec->ext)); -+} -+ -+/* Try to eliminate the sign extension by examining the -+ definitions of the extension source and the uses -+ of the extension destination. */ -+ -+static void -+eliminate_one_extend (rtx ext) -+{ -+ rtx src, dest, regexp; -+ df_ref df_use, df_def, *ext_use, *ext_def; -+ unsigned int ext_dest_regno, ext_src_regno, def_use_count = 1; -+ bool ext_needed = true; -+ extelim_uid_t uid = INSN_UID (ext); -+ struct df_link *link; -+ const char *inserted = -+ insn_flag_p (EXTELIM_INSERTED, uid) ? "inserted" : ""; -+ -+ /* Reset desired per insn flags for each extension analyzed */ -+ reinit_insn_flags (EXTELIM_SEEN); -+ -+ gcc_assert (GET_CODE (PATTERN (ext)) == SET); -+ src = SET_SRC (PATTERN (ext)); -+ dest = SET_DEST (PATTERN (ext)); -+ -+ /* Save the basic information about the extension in a file global */ -+ ext_to_mode = GET_MODE (dest); -+ ext_from_mode = get_ext_from_mode (src); -+ ext_code = GET_CODE (src); -+ -+ /* Also mark this original extension as "SEEN" so we don't recurse into it. */ -+ insn_flag_set (EXTELIM_SEEN, INSN_UID (ext)); -+ -+ /* Find the target of the extension */ -+ if (!REG_P (dest)) -+ return; -+ ext_dest_regno = REGNO (dest); -+ -+ /* Find the source of the extension: set (REG:MODE (sign_extend (REG|SUBREG:MODE ... */ -+ if ((regexp = register_exp (XEXP (src, 0))) == NULL) -+ return; -+ ext_src_regno = REGNO (regexp); -+ -+ /* Iterate through the reaching definitions of the source of the extension -+ recursively. If the source if already sign extended, mark the -+ extension for replacement with a copy or deletion (deletion if it was -+ inserted in the duplication pass). */ -+ ext_use = DF_INSN_UID_USES (uid); -+ /* There is only one use in a sign/zero extension insn and it must be the -+ source register */ -+ gcc_assert (*(ext_use + 1) == NULL); -+ gcc_assert (DF_REF_REGNO (*ext_use) == ext_src_regno); -+ -+ /* Now look at all the reaching definitions of this use */ -+ for (link = DF_REF_CHAIN (*ext_use); link; link = link->next) -+ { -+ rtx insn_def; -+ df_def = link->ref; -+ if (!df_def) -+ continue; -+ /* Link must be to a definition of the use */ -+ if (!DF_REF_REG_DEF_P (df_def)) -+ continue; -+ /* Ignore ARTIFICIAL defs */ -+ if (DF_REF_IS_ARTIFICIAL (df_def)) -+ continue; -+ insn_def = DF_REF_INSN (df_def); -+ /* Don't consider debug_insns */ -+ if (!NONDEBUG_INSN_P (insn_def)) -+ continue; -+ if (dump_file) -+ fprintf (dump_file, -+ " analyze def #%d of reg=%d at uid=%u\n", -+ def_use_count, DF_REF_REGNO (*ext_use), INSN_UID (insn_def)); -+ ext_needed = analyze_ext_def (insn_def, DF_REF_REGNO (*ext_use), 2); -+ if (ext_needed) -+ break; -+ def_use_count++; -+ } -+ -+ /* Try the def-use chains if the extension wasn't marked by the -+ previous pass. */ -+ if (ext_needed) -+ { -+ /* Defs of the sign extension */ -+ ext_def = DF_INSN_UID_DEFS (uid); -+ /* There is only one def in a sign extension insn and it must be the -+ destination */ -+ gcc_assert (*(ext_def + 1) == NULL); -+ gcc_assert (DF_REF_REGNO (*ext_def) == ext_dest_regno); -+ -+ /* Counter for debug dump */ -+ def_use_count = 1; -+ /* Reset desired per insn flags for each extension analyzed */ -+ reinit_insn_flags (EXTELIM_SEEN); -+ /* Also mark this original extension as "SEEN" so we don't recurse into it. */ -+ insn_flag_set (EXTELIM_SEEN, INSN_UID (ext)); -+ -+ /* Iterate over the reached uses of extension destination register recursively. -+ If the destination register's upper bits are ultimately not -+ relevant, the extension can be marked for replacement with a -+ copy. */ -+ for (link = DF_REF_CHAIN (*ext_def); link; link = link->next) -+ { -+ rtx insn_use, use_exp; -+ df_use = link->ref; -+ if (!df_use) -+ continue; -+ /* Link must be a USE of the DEF */ -+ if (!DF_REF_REG_USE_P (df_use)) -+ continue; -+ /* Ignore ARTIFICIAL USES */ -+ if (DF_REF_IS_ARTIFICIAL (df_use)) -+ continue; -+ insn_use = DF_REF_INSN (df_use); -+ /* Don't consider debug_insns */ -+ if (!NONDEBUG_INSN_P (insn_use)) -+ continue; -+ use_exp = DF_REF_REG (df_use); -+ -+ if (exp_needs_update_p (use_exp)) -+ { -+ if (dump_file) -+ fprintf (dump_file, -+ " saved reg=%d expression for update\n", DF_REF_REGNO (df_use)); -+ save_ext_update (current_ext_record, use_exp); -+ } -+ -+ if (dump_file) -+ fprintf (dump_file, -+ " analyze use #%d at uid=%u of reg=%d\n", -+ def_use_count, INSN_UID (insn_use), -+ DF_REF_REGNO (*ext_def)); -+ ext_needed = analyze_ext_use (insn_use, DF_REF_REGNO (*ext_def), 2); -+ if (ext_needed) -+ break; -+ def_use_count++; -+ } -+ } -+ -+ /* The extension is not needed. The rtl for the extension is marked -+ for replace by copy. */ -+ if (!ext_needed) -+ { -+ process_ext_updates (current_ext_record); -+ -+ if (dump_file) -+ fprintf (dump_file, -+ ":) mark %s extension insn uid=%d for copy replacement\n", -+ inserted, INSN_UID (ext)); -+ mark_replace_with_copy (ext); -+ num_cand_transformed++; -+ } -+ else -+ { -+ if (dump_file) -+ fprintf (dump_file, -+ ":( %s extension insn uid=%d is needed\n", inserted, -+ INSN_UID (ext)); -+ } -+} -+ -+/* Replace the sign extension with a copy instruction -+ -+ example 1: -+ from: -+ dest src -+ (set (reg:DI destreg) (sign_extend:DI (reg:SI srcreg))) -+ to: -+ (clobber (reg:DI destreg)) -+ (set (subreg:SI (reg:DI destreg) 4) (reg:SI srcreg)) -+ -+ or -+ -+ example 2: -+ from: -+ dest src -+ (set (reg:DI destreg) (sign_extend:DI (subreg:SI (reg:DI srcreg) 4))) -+ to: -+ (clobber (reg:DI destreg)) -+ (set (subreg:SI (reg:DI destreg) 4) (subreg:SI (reg:DI srcreg) 4)) -+ -+ or -+ -+ example 3: -+ from: -+ dest src -+ (set (reg:SI destreg) (sign_extend:SI (subreg:HI (reg:SI srcreg) 2))) -+ to: -+ (clobber (reg:SI destreg)) -+ (set (subreg:HI (reg:SI destreg) 2) (subreg:HI (reg:SI srcreg) 2)) */ -+ -+static void -+replace_with_copy (rtx ext) -+{ -+ rtx extension = PATTERN (ext); -+ rtx ext_op, src, dest, insns, cp_dest, cp_src; -+ enum machine_mode inner_mode; -+ gcc_assert (GET_CODE (extension) == SET); -+ -+ dest = SET_DEST (extension); -+ src = SET_SRC (extension); -+ -+ /* The sign extension operand */ -+ ext_op = XEXP (src, 0); -+ /* Get the inner mode */ -+ inner_mode = GET_MODE (ext_op); -+ gcc_assert (inner_mode == SImode || inner_mode == HImode -+ || inner_mode == QImode); -+ -+ /* Make dest a SUBREG:mm */ -+ cp_dest = gen_lowpart_SUBREG (inner_mode, dest); -+ -+ /* Copy src is the sign extension target register */ -+ cp_src = ext_op; -+ -+ /* ??? clobber is needed for rtl consistency, don't know why */ -+ start_sequence (); -+ emit_clobber (dest); -+ emit_move_insn (cp_dest, cp_src); -+ insns = get_insns (); -+ end_sequence (); -+ emit_insn_before (insns, ext); -+ -+ delete_insn (ext); -+} -+ -+/* Iterate through extensions, replace those extensions -+ that are marked as so with a copy insn. */ -+ -+static void -+replace_ext_with_copy (void) -+{ -+ ext_record_t extrec; -+ unsigned i; -+ -+ FOR_EACH_VEC_ELT (ext_record_t, extensions, i, extrec) -+ { -+ const char *inserted = insn_flag_p (EXTELIM_INSERTED, -+ INSN_UID (extrec-> -+ ext)) ? "inserted" : ""; -+ if (insn_flag_p (EXTELIM_REPLACE_COPY, INSN_UID (extrec->ext))) -+ { -+ if (dump_file) -+ fprintf (dump_file, -+ " replace %s extension uid=%d with a copy\n", inserted, -+ INSN_UID (extrec->ext)); -+ replace_with_copy (extrec->ext); -+ } -+ } -+} -+ -+ -+/* Copy the RTX flags from old to new */ -+ -+static void -+copy_flags (rtx oldrtx, rtx newrtx) -+{ -+ if (RTX_FLAG (oldrtx, in_struct)) -+ RTX_FLAG (newrtx, in_struct) = true; -+ -+ if (RTX_FLAG (oldrtx, volatil)) -+ RTX_FLAG (newrtx, volatil) = true; -+ -+ if (RTX_FLAG (oldrtx, unchanging)) -+ RTX_FLAG (newrtx, unchanging) = true; -+ -+ if (RTX_FLAG (oldrtx, frame_related)) -+ RTX_FLAG (newrtx, frame_related) = true; -+ -+ if (RTX_FLAG (oldrtx, jump)) -+ RTX_FLAG (newrtx, jump) = true; -+ -+ if (RTX_FLAG (oldrtx, call)) -+ RTX_FLAG (newrtx, call) = true; -+ -+ if (RTX_FLAG (oldrtx, return_val)) -+ RTX_FLAG (newrtx, return_val) = true; -+} -+ -+/* Iterate through the insn notes looking for 'kind'. If -+ found replace the register rtx with the new rtx. */ -+ -+static void -+update_notes (enum reg_note kind, rtx insn, rtx reg, rtx new_reg) -+{ -+ rtx link; -+ for (link = REG_NOTES (insn); link; link = XEXP (link, 1)) -+ if (REG_NOTE_KIND (link) == kind) -+ { -+ rtx op0 = XEXP (link, 0); -+ if (kind == REG_DEAD) -+ if (REG_P (op0) && op0 == reg) -+ XEXP (link, 0) = new_reg; -+ } -+} -+ -+ -+ -+#if EXTELIM_DUPLICATE_EXTS_AT_USES -+/* Insert a duplicate sign extension at the use point. -+ Add a flag indicating this extension is algorithmically -+ added. Since the "inserted" extensions have the form -+ regX = sign_extend (subreg:mm (reg:MM regX), offset), -+ they can simply be deleted if they are redundant since we -+ are at a reaching use of the original definition. We also -+ mark the use insn where the insert occurs so we don't insert -+ the same extension from another def at this use. */ -+ -+static void -+insert_duplicate_ext_at_use (rtx ext_insn, rtx use_insn) -+{ -+ rtx ext = PATTERN (ext_insn), ext_src, ext_dest; -+ rtx new_ext_src_inner, new_ext_src_outer, new_ext_part; -+ rtx new_ext_dest, new_ext_insn; -+ extelim_uid_t new_uid; -+ df_ref *p_df_uses; -+ unsigned int ext_dest_regno; -+ enum machine_mode inner_mode; -+ bool sign_extend_p = -+ GET_CODE (SET_SRC (PATTERN (ext_insn))) == SIGN_EXTEND ? true : false; -+ -+ /* This new extension must be of the form: -+ set (reg:MM X (sign_extend:MM (subreg:mm (reg:MM X)))) -+ where mm is smaller than MM. */ -+ ext_dest = SET_DEST (ext); -+ ext_src = SET_SRC (ext); -+ -+ gcc_assert (REG_P (register_exp (ext_dest))); -+ -+ /* A copy of the extend destination register to a new virtual register */ -+ new_ext_dest = gen_reg_rtx (GET_MODE (ext_dest)); -+ /* A copy of the extend source (same reg as dest), REG_P */ -+ new_ext_src_inner = copy_rtx (ext_dest); -+ /* Get inner mode, either mm for SUBREG:mm (REG:MM) or MM for (REG:MM) */ -+ if (GET_CODE (XEXP (ext_src, 0)) == SUBREG) -+ inner_mode = GET_MODE (XEXP (ext_src, 0)); -+ else if (REG_P (XEXP (ext_src, 0))) -+ inner_mode = GET_MODE (XEXP (ext_src, 0)); -+ else -+ /* Can't determine sign_extend operand */ -+ gcc_unreachable (); -+ -+ /* Make a subreg rtx */ -+ new_ext_src_outer = gen_lowpart_SUBREG (inner_mode, new_ext_src_inner); -+ /* Make a sign/zero extend insn */ -+ new_ext_part = sign_extend_p -+ ? gen_rtx_SIGN_EXTEND (GET_MODE (ext_dest), new_ext_src_outer) -+ : gen_rtx_ZERO_EXTEND (GET_MODE (ext_dest), new_ext_src_outer); -+ /* (set (new:MM (sign_extend:MM (subreg:mm (reg:MM ext_dest))))) */ -+ new_ext_insn = gen_rtx_SET (VOIDmode, new_ext_dest, new_ext_part); -+ -+ /* Now update the use */ -+ /* Operands used by this the use_insn */ -+ ext_dest_regno = REGNO (register_exp (ext_dest)); -+ for (p_df_uses = DF_INSN_UID_USES (INSN_UID (use_insn)); *p_df_uses; -+ p_df_uses++) -+ { -+ if (DF_REF_REGNO (*p_df_uses) == ext_dest_regno) -+ { -+ rtx use_reg = DF_REF_REG (*p_df_uses); -+ -+ /* Replace the register use in use_insn with the new register. If the use -+ is a subreg pattern, replace the innermost reg. */ -+ replace_rtx (PATTERN (use_insn), register_exp (use_reg), -+ new_ext_dest); -+ /* Update flags on new dest reg */ -+ copy_flags (register_exp (use_reg), new_ext_dest); -+ /* Update any notes associated with use reg and use_insn */ -+ update_notes (REG_DEAD, use_insn, register_exp (use_reg), new_ext_dest); -+ /* DF info must be updated since existing insn is changed */ -+ df_insn_rescan (use_insn); -+ } -+ } -+ -+ new_uid = extelim_emit_before (new_ext_insn, use_insn); -+ insn_flag_set (EXTELIM_INSERTED, new_uid); -+} -+ -+/* Allow the duplication of the extension even if the extension -+ and the duplication use are in the same block. */ -+ -+static bool -+allow_same_block_duplication_p (rtx ext_insn, rtx use_insn) -+{ -+ rtx ext = PATTERN (ext_insn); -+ rtx use = PATTERN (use_insn); -+ -+ if (GET_CODE (SET_SRC (use)) == ASHIFT && GET_CODE (SET_SRC (ext)) == ZERO_EXTEND) -+ return true; -+ return false; -+} -+ -+/* Determine if the extension should be duplicated at this use point. -+ Return true if yes, false otherwise. */ -+ -+static bool -+save_ext_use_p (ext_record_t extrec, rtx use_insn) -+{ -+ rtx ext_insn, ext, ext_dest, use = PATTERN (use_insn), use_src; -+ df_ref df_use; -+ -+ ext_insn = extrec->ext; -+ ext = PATTERN (ext_insn); -+ ext_dest = SET_DEST (ext); -+ -+ if (GET_CODE (use) != SET) -+ { -+ if (dump_file) -+ fprintf (dump_file, " no -- use is not a SET code\n"); -+ return false; -+ } -+ -+ /* Check for obviousness */ -+ /* 1. The use is only reached by the a single definition of the extension. -+ Otherwise, it wouldn't be legal to insert a duplicate extension -+ as other defs reaching this use may not need it. Certainly not all -+ other defs may reach here, but this is the conservative approximation. -+ Found in nof/muldf3.c */ -+ df_use = df_find_use (use_insn, ext_dest); -+ if ( df_use && DF_REF_CHAIN (df_use)->next) -+ { -+ if (dump_file) -+ fprintf (dump_file, -+ " no -- there are multiple definitions of reg=%d reaching this use\n", -+ (REGNO (register_exp (ext_dest)))); -+ return false; -+ } -+ -+ /* 2. The extension and use are in the same block. Since -+ this is a reached use, it's obvious we don't need another -+ extension. The exception is this -- we are trying to set -+ up a specific extension,insn pattern that will be recognized -+ by the insn selector. This pattern will also be ignored when -+ the next extension candidate list is created in the next pass. */ -+ if (INSN_P (ext_insn) && INSN_P (use_insn)) -+ { -+ if (BLOCK_FOR_INSN (ext_insn) == BLOCK_FOR_INSN (use_insn)) -+ { -+ if (allow_same_block_duplication_p (ext_insn, use_insn)) -+ ; -+ else -+ { -+ if (dump_file) -+ fprintf (dump_file, -+ " no -- ext and use are in the same block\n"); -+ return false; -+ } -+ } -+ } -+ -+ /* 3. The use is a sign extension of the extension destination reg */ -+ use_src = SET_SRC (use); -+ if (GET_CODE (use_src) == SIGN_EXTEND -+ && REG_P (register_exp (XEXP (use_src, 0))) -+ && REG_P (register_exp (ext_dest))) -+ if (GET_MODE (use_src) == GET_MODE (ext_dest) -+ && REGNO (register_exp (XEXP (use_src, 0))) == -+ REGNO (register_exp (ext_dest))) -+ { -+ if (dump_file) -+ fprintf (dump_file, -+ " no -- the use is a sign extension of reg=%d\n", -+ REGNO (register_exp (XEXP (use_src, 0)))); -+ return false; -+ } -+ -+ /* 4. The use already has an extension inserted and one of the use's operands -+ is a register matching the reaching definition. So don't reinsert the same -+ extension. */ -+ if (insn_flag_p (EXTELIM_INSERTED_FOR, INSN_UID (use_insn))) -+ { -+ df_ref *p_df_uses; -+ /* Operands used by this the use_insn */ -+ for (p_df_uses = DF_INSN_UID_USES (INSN_UID (use_insn)); *p_df_uses; -+ p_df_uses++) -+ { -+ if (REG_P (register_exp (ext_dest)) && -+ DF_REF_REGNO (*p_df_uses) == REGNO (register_exp (ext_dest))) -+ { -+ if (dump_file) -+ fprintf (dump_file, -+ " no -- this use is marked for sign extension insertion already\n"); -+ return false; -+ } -+ } -+ } -+ -+ /* 5. There is also a definition of the ext dest register at this use (as can occur in self assignment). */ -+ if (register_exp (SET_DEST (use)) && REG_P (ext_dest) -+ && REGNO (register_exp (SET_DEST (use))) == REGNO (ext_dest)) -+ { -+ if (dump_file) -+ fprintf (dump_file, -+ " no -- this use also assigns the used register\n"); -+ return false; -+ } -+ -+ -+ if (dump_file) -+ fprintf (dump_file, " yes\n"); -+ return true; -+} -+ -+/* Save the use insn in the extension records list of -+ uses. At the next phase, we will duplicate the extension -+ at these use points. */ -+ -+static void -+save_ext_use (ext_record_t extrec, rtx use_insn) -+{ -+ /* Mark the use insn, it will have a duplicate inserted */ -+ insn_flag_set (EXTELIM_INSERTED_FOR, INSN_UID (use_insn)); -+ /* Save use to the list of uses to be duplicated for this extension. */ -+ VEC_safe_push (rtx, heap, extrec->ext_uses, use_insn); -+} -+ -+ -+/* Save the qualified use of an extension to a list */ -+ -+static void -+gather_ext_uses_info (ext_record_t extrec) -+{ -+ rtx ext; -+ df_ref *ext_def, df_use; -+ unsigned int def_use_count = 1; -+ extelim_uid_t uid; -+ struct df_link *link; -+ -+ gcc_assert (extrec != NULL); -+ ext = extrec->ext; -+ uid = INSN_UID (ext); -+ -+ /* Insn level defs of the sign extension */ -+ ext_def = DF_INSN_UID_DEFS (uid); -+ /* There is only one def in a sign extension insn */ -+ gcc_assert (*(ext_def + 1) == NULL); -+ -+ /* Iterate over the reached uses of extension destination register. -+ Duplicate the extension at the use point. */ -+ for (link = DF_REF_CHAIN (*ext_def); link; link = link->next) -+ { -+ rtx insn_use; -+ df_use = link->ref; -+ if (!df_use) -+ continue; -+ /* Link must be a USE of the DEF */ -+ if (!DF_REF_REG_USE_P (df_use)) -+ continue; -+ /* Ignore ARTIFICIAL USES */ -+ if (DF_REF_IS_ARTIFICIAL (df_use)) -+ continue; -+ insn_use = DF_REF_INSN (df_use); -+ -+ /* Don't consider debug_insns */ -+ if (!NONDEBUG_INSN_P (insn_use)) -+ continue; -+ -+ if (dump_file) -+ fprintf (dump_file, -+ " use #%d duplicate ext of reg=%d at uid=%u?\n", -+ def_use_count, DF_REF_REGNO (*ext_def), INSN_UID (insn_use)); -+ if (save_ext_use_p (extrec, insn_use)) -+ save_ext_use (extrec, insn_use); -+ def_use_count++; -+ } -+} -+ -+/* At each use point of the sign extension, unless the -+ use is obviously already sign extended, insert a -+ sign extension insn before the use. We do this in two -+ passes to avoid confusing the dataflow information. */ -+ -+static void -+duplicate_exts_at_uses (void) -+{ -+ unsigned i, j; -+ ext_record_t extrec; -+ rtx use_insn; -+ -+ /* Get the uses where the extensions will be duplicated */ -+ FOR_EACH_VEC_ELT (ext_record_t, extensions, i, extrec) -+ { -+ if (dump_file) -+ fprintf (dump_file, "gathering extension uid=%u use information\n", -+ INSN_UID (extrec->ext)); -+ gather_ext_uses_info (extrec); -+ } -+ -+ /* Now duplicate the extensions at the appropriate use points */ -+ FOR_EACH_VEC_ELT (ext_record_t, extensions, i, extrec) -+ { -+ if (dump_file) -+ fprintf (dump_file, "extension uid=%u\n", INSN_UID (extrec->ext)); -+ -+ FOR_EACH_VEC_ELT (rtx, extrec->ext_uses, j, use_insn) -+ { -+ if (dump_file) -+ fprintf (dump_file, " duplicated at use uid=%u\n", -+ INSN_UID (use_insn)); -+ insert_duplicate_ext_at_use (extrec->ext, use_insn); -+ } -+ } -+} -+#endif /* EXTELIM_DUPLICATE_EXTS_AT_USES */ -+ -+/* Determine if an instruction is a return insn */ -+ -+static rtx -+return_p (rtx rtn_insn) -+{ -+ rtx rtn = PATTERN (rtn_insn), dest; -+ int i; -+ -+ if (GET_CODE (rtn) != SET) -+ return false; -+ -+ dest = SET_DEST (rtn); -+ -+ /* Is a return value? */ -+ if ((REG_P (dest) || GET_CODE (dest) == PARALLEL) && -+ REG_FUNCTION_VALUE_P (dest)) -+ { -+ /* Simple SET, return the insn */ -+ if (REG_P (dest)) -+ return rtn_insn; -+ /* PARALLEL, find the embedded rtx */ -+ if (GET_CODE (dest) == PARALLEL) -+ for (i = XVECLEN (rtn_insn, 0) - 1; i >= 0; i--) -+ { -+ rtx body = XVECEXP (rtn_insn, 0, i); -+ if (GET_CODE (body) == SET) -+ { -+ dest = SET_DEST (body); -+ if (REG_FUNCTION_VALUE_P (dest)) -+ return body; -+ } -+ } -+ } -+ /* Not a return */ -+ return NULL; -+} -+ -+/* Find all return RTLs in the function and save them in -+ a list. */ -+ -+static bool -+find_returns (void) -+{ -+ basic_block bb; -+ rtx insn, rtn_insn; -+ bool found = false; -+ -+ /* For all insns */ -+ FOR_EACH_BB (bb) -+ { -+ FOR_BB_INSNS (bb, insn) -+ { -+ if (!NONDEBUG_INSN_P (insn)) -+ continue; -+ -+ if ((rtn_insn = return_p (insn)) == NULL) -+ { -+ continue; -+ } -+ if (dump_file) -+ fprintf (dump_file, " found return at uid=%u\n", INSN_UID (rtn_insn)); -+ -+ VEC_safe_push (rtx, heap, returns, rtn_insn); -+ found = true; -+ } -+ } -+ -+ return (found); -+} -+ -+/* Get the signedness and machine mode of the function */ -+ -+static bool -+get_return_info (bool * signed_p, enum machine_mode *return_mode) -+{ -+ tree rtninfo; -+ -+ if ((rtninfo = DECL_RESULT (current_function_decl)) != NULL) -+ { -+ *signed_p = !TYPE_UNSIGNED (TREE_TYPE (rtninfo)); -+ *return_mode = DECL_MODE (rtninfo); -+ return true; -+ } -+ return false; -+} -+ -+/* If the dest mode of the return is larger than -+ the function return mode, we can subreg the return -+ insn to the return mode and extend to the destination. -+ E.g. unsigned, return mode: HImode -+ set (reg/i:DI Y) (reg:DI X) -+ becomes -+ set (reg:DI new) (zero_extend:DI (subreg:HI (reg:DI X))) -+ set (reg/i:DI Y) (reg:DI new) */ -+ -+static void -+make_ext_at_rtn (rtx rtn_insn, bool fun_signed_p, enum machine_mode fun_mode) -+{ -+ rtx rtn = PATTERN (rtn_insn); -+ rtx dest, src, new_ext_dest, new_ext_src, new_ext_outer, new_ext_part, -+ new_ext_insn; -+ extelim_uid_t new_uid; -+ gcc_assert (GET_CODE (rtn) == SET); -+ -+ dest = SET_DEST (rtn); -+ src = SET_SRC (rtn); -+ -+ /* Deal with scalar rtn values only */ -+ if (fun_mode != DImode -+ && fun_mode != SImode && fun_mode != HImode && fun_mode != QImode) -+ { -+ if (dump_file) -+ fprintf (dump_file, "failed-- not scalar return mode\n"); -+ return; -+ } -+ -+ /* Dest and src have to have the same mode. This should always be -+ true for well formed rtl, but we check anyway. */ -+ if (GET_MODE (dest) != GET_MODE (src)) -+ { -+ if (dump_file) -+ fprintf (dump_file, "failed-- dest and src modes differ\n"); -+ return; -+ } -+ -+ /* Also check that we are dealing with simple regs here. */ -+ if (!REG_P (dest) || !REG_P (src)) -+ { -+ if (dump_file) -+ fprintf (dump_file, "failed-- dest or src is not REG_P\n"); -+ return; -+ } -+ -+ /* The return reg mode should never be smaller than fun return mode. If the -+ same size, however, we can't subreg either, so return */ -+ if (GET_MODE_BITSIZE (GET_MODE (dest)) <= GET_MODE_BITSIZE (fun_mode)) -+ { -+ if (dump_file) -+ fprintf (dump_file, -+ "failed-- dest size mode is smaller or equal to function mode size\n"); -+ return; -+ } -+ -+ /* From here we should be able to build a subreg since the function return mode -+ size is smaller than the return register mode size */ -+ new_ext_dest = gen_reg_rtx (GET_MODE (src)); /* set (reg:MM new) */ -+ new_ext_src = copy_rtx (src); /* copy of X, copyX */ -+ new_ext_outer = gen_lowpart_SUBREG (fun_mode, new_ext_src); /* subreg:mm (reg:MM copyX) */ -+ new_ext_part = fun_signed_p /* extend:MM (subreg:mm (reg:MM copyX)) */ -+ ? gen_rtx_SIGN_EXTEND (GET_MODE (src), new_ext_outer) -+ : gen_rtx_ZERO_EXTEND (GET_MODE (src), new_ext_outer); -+ /* Put it together */ -+ new_ext_insn = gen_rtx_SET (VOIDmode, new_ext_dest, new_ext_part); -+ -+ /* Modify src of return insn to use new pseudo */ -+ replace_rtx (PATTERN (rtn_insn), src, new_ext_dest); -+ /* Update flags on new dest reg */ -+ copy_flags (src, new_ext_dest); -+ /* Update any notes associated with replaced register */ -+ update_notes (REG_DEAD, rtn_insn, src, new_ext_dest); -+ /* Rescan the modified insn */ -+ df_insn_rescan (rtn_insn); -+ /* Insert the new insn */ -+ new_uid = extelim_emit_before (new_ext_insn, rtn_insn); -+ -+ if (dump_file) -+ fprintf (dump_file, "success\n"); -+} -+ -+/* Insert extensions at return points. Scan the RTL -+ for the return statements. Determine if the RTL -+ can be modified to insert an extension. Modify the -+ return to insert the extension. */ -+ -+static void -+insert_ext_at_returns (void) -+{ -+ bool signed_p; -+ enum machine_mode return_mode; -+ rtx rtn_insn; -+ int i; -+ -+ /* Generate list of return rtls for the function */ -+ if (dump_file) -+ fprintf (dump_file, "gathering return insns...\n"); -+ -+ if (!find_returns ()) -+ return; -+ -+ if (!get_return_info (&signed_p, &return_mode)) -+ return; -+ -+ /* For each return instruction, generate a sign/zero extend -+ if the current return size is larger than the function -+ return mode. */ -+ FOR_EACH_VEC_ELT (rtx, returns, i, rtn_insn) -+ { -+ if (dump_file) -+ fprintf (dump_file, " making extension at return uid=%u...", -+ INSN_UID (rtn_insn)); -+ make_ext_at_rtn (rtn_insn, signed_p, return_mode); -+ } -+} -+ -+/* Compare two extension records by loop depth. -+ Used by VEC_qsort to sort the order in which extensions -+ are processed. */ -+ -+static int -+ext_record_compare (const void *p_er1, const void *p_er2) -+{ -+ const ext_record_t er1 = *(const ext_record_t *) p_er1; -+ const ext_record_t er2 = *(const ext_record_t *) p_er2; -+ basic_block bb1, bb2; -+ rtx ext1, ext2; -+ -+ if (er1 == er2) -+ return 0; -+ -+ ext1 = er1->ext; -+ ext2 = er2->ext; -+ -+ bb1 = BLOCK_FOR_INSN (ext1); -+ bb2 = BLOCK_FOR_INSN (ext2); -+ -+ /* Sort high to low */ -+ return (bb2->loop_depth - bb1->loop_depth); -+} -+ -+/* The main interface to this optimization. */ -+ -+static void -+extension_elimination (void) -+{ -+ ext_record_t ext; -+ unsigned i; -+ -+ init_pass (); -+ -+ /* Find initial sign extension candidates */ -+ if (!find_extensions ()) -+ { -+ finish_pass (); -+ return; -+ } -+ -+ /* Insert sign extension at return points in -+ the function. */ -+ insert_ext_at_returns (); -+ -+ /* Duplicate the sign extensions at their use -+ points unless the use is already obviously sign -+ extended or extension is already added. */ -+#if EXTELIM_DUPLICATE_EXTS_AT_USES -+ duplicate_exts_at_uses (); -+#endif -+ -+ /* Update DF information since now have new insns. */ -+ df_finish_pass (true); -+ df_chain_add_problem (DF_DU_CHAIN + DF_UD_CHAIN); -+ df_analyze (); -+ -+#if EXTELIM_DF_DUMP -+ if (dump_file) -+ df_dump (dump_file); -+#endif -+ -+ /* Init statistics */ -+ num_cand = 0; -+ num_cand_ignored = 0; -+ num_cand_transformed = 0; -+ -+ /* Free old extensions list, generate new one that includes -+ the new extensions. */ -+ free_extensions (); -+ -+ if (!find_extensions ()) -+ { -+ finish_pass (); -+ return; -+ } -+ -+ if (dump_file) -+ { -+ fprintf (dump_file, "\nRTL After Extension Duplication\n"); -+ print_rtl (dump_file, get_insns ()); -+ } -+ -+ if (dump_file) -+ fprintf (dump_file, "Begin extension elimination analysis\n"); -+ -+ /* Sort the extensions by loop depth. We want to try to eliminate -+ those in innermost loops (highest loop depth) first. */ -+ VEC_qsort (ext_record_t, extensions, ext_record_compare); -+ -+ /* Iterate through extension worklist */ -+ FOR_EACH_VEC_ELT (ext_record_t, extensions, i, ext) -+ { -+ rtx ext_insn = ext->ext; -+ rtx ext_src = SET_SRC (PATTERN (ext_insn)); -+ const char *ext_name = -+ GET_CODE (ext_src) == SIGN_EXTEND ? "sign" : "zero"; -+ const char *inserted = -+ insn_flag_p (EXTELIM_INSERTED, INSN_UID (ext_insn)) ? "inserted" : ""; -+ extelim_uid_t uid = INSN_UID (ext_insn); -+ -+ if (dump_file) -+ fprintf (dump_file, -+ " (loop_depth=%d)\n", -+ inserted, ext_name, uid, -+ BLOCK_FOR_INSN (ext_insn)->loop_depth); -+ -+ current_ext_record = ext; -+ eliminate_one_extend (ext->ext); -+ } -+ -+ if (dump_file) -+ fprintf (dump_file, "Begin extension elimination transformations\n"); -+ -+ replace_ext_with_copy (); -+ -+ if (dump_file) -+ fprintf (dump_file, "\nRTL After Extension Elimination\n"); -+ -+ finish_pass (); -+ -+ /* Print statistics */ -+ if (dump_file) -+ { -+ fprintf (dump_file, -+ "Number of extensions ignored: %d (of %d candidiates)\nDETECTION EFFECTIVENESS: %f%%\n", -+ num_cand_ignored, num_cand, -+ ((float) (num_cand - num_cand_ignored) / (float) num_cand) * -+ 100); -+ fprintf (dump_file, -+ "Number of extensions converted to copy: %d (of %d candidiates)\nCONVERSION EFFECTIVENESS: %f%%\n", -+ num_cand_transformed, num_cand, -+ ((float) num_cand_transformed / (float) num_cand) * 100); -+ } -+} -+ -+/* Remove redundant extensions. */ -+ -+static unsigned int -+rest_of_handle_extelim (void) -+{ -+ extension_elimination (); -+ return 0; -+} -+ -+/* Run extelim pass when flag_extelim is set at optimization level > 0. */ -+ -+static bool -+gate_handle_extelim (void) -+{ -+ return (optimize > 0 && flag_extelim); -+} -+ -+struct rtl_opt_pass pass_rtl_extelim = { -+ { -+ RTL_PASS, -+ "extelim", /* name */ -+ gate_handle_extelim, /* gate */ -+ rest_of_handle_extelim, /* execute */ -+ NULL, /* sub */ -+ NULL, /* next */ -+ 0, /* static_pass_number */ -+ TV_EXTELIM, /* tv_id */ -+ 0, /* properties_required */ -+ 0, /* properties_provided */ -+ 0, /* properties_destroyed */ -+ 0, /* todo_flags_start */ -+ TODO_ggc_collect | TODO_dump_func | TODO_df_finish | TODO_verify_rtl_sharing, /* todo_flags_finish */ -+ } -+}; diff --git a/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.fix_MTWX51204-dwarf-vector-reg.patch b/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.fix_MTWX51204-dwarf-vector-reg.patch deleted file mode 100644 index cb34859a..00000000 --- a/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.fix_MTWX51204-dwarf-vector-reg.patch +++ /dev/null @@ -1,9 +0,0 @@ -diff -Naur gcc-4.6.2/gcc/config/rs6000/sysv4.h gcc-4.6.2-MTWX51204-dwarf-vector-reg/gcc/config/rs6000/sysv4.h ---- gcc-4.6.2/gcc/config/rs6000/sysv4.h 2011-03-07 01:50:23.000000000 -0600 -+++ gcc-4.6.2-MTWX51204-dwarf-vector-reg/gcc/config/rs6000/sysv4.h 2011-12-16 09:44:18.469039002 -0600 -@@ -1035,5 +1035,3 @@ - - /* This target uses the sysv4.opt file. */ - #define TARGET_USES_SYSV4_OPT 1 -- --#undef DBX_REGISTER_NUMBER diff --git a/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.fix_SSIZE_MAX_undefine_issue.patch b/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.fix_SSIZE_MAX_undefine_issue.patch deleted file mode 100644 index 51dc5586..00000000 --- a/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.fix_SSIZE_MAX_undefine_issue.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- gcc-4_6-branch/gcc/config/host-linux.c.orig 2012-03-08 02:18:57.282190580 -0600 -+++ gcc-4_6-branch/gcc/config/host-linux.c 2012-03-08 02:19:30.930158694 -0600 -@@ -17,6 +17,8 @@ - along with GCC; see the file COPYING3. If not see - . */ - -+#include -+ - #include "config.h" - #include "system.h" - #include "coretypes.h" diff --git a/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.fix_build-with-cxx.patch b/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.fix_build-with-cxx.patch deleted file mode 100644 index cfceafd3..00000000 --- a/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.fix_build-with-cxx.patch +++ /dev/null @@ -1,39 +0,0 @@ -gcc.fix_build-with-cxx - -On native builds, when linking cc1 with static libraries (ppl cloog, -gmp, mpfr), there is c++ code brought in by libppl. Normally cc1 is -linked through "gcc", but in this case it should be linked with "g++". - -To work around this, gcc is configured with --enable-build-with-cxx, -which compiles and links the entire compiler with g++. Since g++ is -more rigorous about the use of the "const" keyword, there is a couple -of places that we get syntax errors. This patch fixes them. - ---- gcc-4.6.0/gcc/config/rs6000/rs6000.c-orig 2011-05-09 10:35:55.627190744 -0500 -+++ gcc-4.6.0/gcc/config/rs6000/rs6000.c 2011-05-09 10:39:09.232814653 -0500 -@@ -22502,11 +22502,12 @@ - rs6000_xcoff_strip_dollar (const char *name) - { - char *strip, *p; -+ const char *q; - int len; - -- p = strchr (name, '$'); -+ q = strchr (name, '$'); - -- if (p == 0 || p == name) -+ if (q == 0 || q == name) - return name; - - len = strlen (name); ---- gcc-4.6.0/gcc/objc/objc-next-runtime-abi-02.c-orig 2011-05-11 13:46:44.559065173 -0500 -+++ gcc-4.6.0/gcc/objc/objc-next-runtime-abi-02.c 2011-05-11 13:48:34.956939829 -0500 -@@ -1878,7 +1878,7 @@ - static const char * - newabi_append_ro (const char *name) - { -- char *dollar; -+ const char *dollar; - char *p; - static char string[BUFSIZE]; - dollar = strchr (name, '$'); diff --git a/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.fix_cloogstatic2.patch b/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.fix_cloogstatic2.patch deleted file mode 100644 index afa29d93..00000000 --- a/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.fix_cloogstatic2.patch +++ /dev/null @@ -1,18 +0,0 @@ -gcc.fix_cloogstatic2 - -When only static libraries are available (so we can build cc1 without -depending on extras libraries), we get a bunch of undefined symbols -that are defined in libpwl. This patch explicitly adds libpwl to the -linker command. - ---- gcc-trunk/configure.orig 2011-03-10 12:48:29.433528020 -0600 -+++ gcc-trunk/configure 2011-03-10 12:52:11.342145967 -0600 -@@ -5770,7 +5770,7 @@ - LDFLAGS="$saved_LDFLAGS" - fi - -- ppllibs="$ppllibs -lppl_c -lppl $pwllib -lgmpxx" -+ ppllibs="$ppllibs -lppl_c -lppl -lpwl $pwllib -lgmpxx" - - if test "$enable_ppl_version_check" != no; then - saved_CFLAGS="$CFLAGS" diff --git a/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.fix_constvector.patch b/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.fix_constvector.patch deleted file mode 100644 index c4a27766..00000000 --- a/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.fix_constvector.patch +++ /dev/null @@ -1,43 +0,0 @@ -For altivec targets, 32 bits, the spec2k-gap bmk does not build. The -reason is that at some point the vectorizer creates an CONST_VECTOR -rtl, where the elements are SYMBOL_REFs. - -Gcc ICE on simplify_immed_subreg, where it checks that CONST_VECTORS -can be only made of CONST_INT, CONST_DOUBLE, or CONST_FIXED. - -I really don't understand what that function does, but since the -vectorizer will bailout later anyway, I think it is safe to treat -SYMBOL_REFs as CONST_INT. (NOT for FSF submission, as I really don't -have a clue) - -This problem does not exists on gcc-4.5 - -This problem does not exists on 64 bits, since there is no altivec -type that can support 64bit elements. - -Here is a simplified test case: - -typedef void f_t (void); -extern f_t f; -extern f_t *A[12]; -extern f_t *B[12]; -void bad_vector () -{ - int i; - - for (i = 0; i < 12; i++ ) { - A[i] = f; - B[i] = f; - } -} - ---- gcc-4.6.2/gcc/simplify-rtx.c~ 2011-12-28 12:28:01.700039002 -0600 -+++ gcc-4.6.2/gcc/simplify-rtx.c 2011-12-28 12:38:22.287039002 -0600 -@@ -5001,6 +5001,7 @@ - switch (GET_CODE (el)) - { - case CONST_INT: -+ case SYMBOL_REF: - for (i = 0; - i < HOST_BITS_PER_WIDE_INT && i < elem_bitsize; - i += value_bit) diff --git a/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.fix_header_issue.patch b/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.fix_header_issue.patch deleted file mode 100644 index e2b9f7f2..00000000 --- a/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.fix_header_issue.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- gcc-4_6-branch/gcc/limitx.h.orig 2012-03-08 01:11:23.024440826 -0600 -+++ gcc-4_6-branch/gcc/limitx.h 2012-03-08 01:13:44.372515706 -0600 -@@ -30,6 +30,7 @@ - #define _GCC_LIMITS_H_ - - #ifndef _LIBC_LIMITS_H_ --/* Use "..." so that we find syslimits.h only in this same directory. */ --#include "syslimits.h" -+#define _GCC_NEXT_LIMITS_H /* tell gcc's limits.h to recurse */ -+#include_next -+#undef _GCC_NEXT_LIMITS_H - #endif diff --git a/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.fix_ira-loop-pressure.patch b/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.fix_ira-loop-pressure.patch deleted file mode 100644 index 86ad32a1..00000000 --- a/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.fix_ira-loop-pressure.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Naur gcc-4.6.2/gcc/config/rs6000/rs6000.c gcc-4.6.2-loop_invariant/gcc/config/rs6000/rs6000.c ---- gcc-4.6.2/gcc/config/rs6000/rs6000.c 2011-11-24 00:03:49.709144001 -0600 -+++ gcc-4.6.2-loop_invariant/gcc/config/rs6000/rs6000.c 2011-12-12 23:49:27.901487730 -0600 -@@ -2723,7 +2723,7 @@ - calculation works better for RTL loop invariant motion on targets - with enough (>= 32) registers. It is an expensive optimization. - So it is on only for peak performance. */ -- if (optimize >= 3 && global_init_p) -+ if (optimize >= 3 && global_init_p && !global_options_set.x_flag_ira_loop_pressure) - flag_ira_loop_pressure = 1; - - /* Set the pointer size. */ diff --git a/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.fix_longversionstring.patch b/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.fix_longversionstring.patch deleted file mode 100644 index 2d7fae78..00000000 --- a/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.fix_longversionstring.patch +++ /dev/null @@ -1,16 +0,0 @@ -gcc.fix_longversionstring - -Freescale version string is really long, and it can overflow a -buffer. This patch extends the size of the buffer. - ---- gcc-4.6.0/gcc/dwarf2out.c-orig 2011-03-18 11:22:01.000000000 -0500 -+++ gcc-4.6.0/gcc/dwarf2out.c 2011-05-06 10:24:24.114277925 -0500 -@@ -20005,7 +20005,7 @@ - gen_compile_unit_die (const char *filename) - { - dw_die_ref die; -- char producer[250]; -+ char producer[2500]; - const char *language_string = lang_hooks.name; - int language; - diff --git a/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.fix_min_max.patch b/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.fix_min_max.patch deleted file mode 100644 index 81167bec..00000000 --- a/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.fix_min_max.patch +++ /dev/null @@ -1,38 +0,0 @@ -diff -Naur gcc-4.6.2/gcc/config/rs6000/rs6000.c gcc-4.6.2-modified-office2-gs8-ice-fix/gcc/config/rs6000/rs6000.c ---- gcc-4.6.2/gcc/config/rs6000/rs6000.c 2011-09-18 17:01:56.000000000 -0500 -+++ gcc-4.6.2-modified-office2-gs8-ice-fix/gcc/config/rs6000/rs6000.c 2012-01-13 07:07:31.702487887 -0600 -@@ -17727,11 +17727,34 @@ - c = GEU; - - if (code == SMAX || code == UMAX) -+ { - target = emit_conditional_move (dest, c, op0, op1, mode, - op0, op1, mode, 0); -+ if(!target) -+ { -+ rtx tem; -+ tem = simplify_const_relational_operation (c, mode, op0, op1); -+ if(rtx_equal_p(tem,const0_rtx)) -+ target = op1; -+ else if(rtx_equal_p(tem,const1_rtx)) -+ target = op0; -+ } -+ -+ } - else -+ { - target = emit_conditional_move (dest, c, op0, op1, mode, - op1, op0, mode, 0); -+ if(!target) -+ { -+ rtx tem; -+ tem = simplify_const_relational_operation (c, mode, op0, op1); -+ if(rtx_equal_p(tem,const0_rtx)) -+ target = op0; -+ else if(rtx_equal_p(tem,const1_rtx)) -+ target = op1; -+ } -+ } - gcc_assert (target); - if (target != dest) - emit_move_insn (dest, target); diff --git a/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.fix_mingw32.patch b/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.fix_mingw32.patch deleted file mode 100644 index 0d8c00ef..00000000 --- a/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.fix_mingw32.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- gcc-4.6.0/gcc/configure~ 2011-02-28 09:36:37.000000000 -0600 -+++ gcc-4.6.0/gcc/configure 2011-06-28 10:07:22.430630818 -0500 -@@ -10898,7 +10898,7 @@ - saved_CFLAGS="${CFLAGS}" - CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \ - LDFLAGS="${LDFLAGS_FOR_BUILD}" \ -- ${realsrcdir}/configure \ -+ ${realsrcdir}/configure --with-gnu-ld --with-gnu-as --enable-targets=all \ - --enable-languages=${enable_languages-all} \ - --target=$target_alias --host=$build_alias --build=$build_alias - CFLAGS="${saved_CFLAGS}" diff --git a/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.ld_unaligned-460.patch b/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.ld_unaligned-460.patch deleted file mode 100644 index 2eb270eb..00000000 --- a/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.ld_unaligned-460.patch +++ /dev/null @@ -1,32 +0,0 @@ -gcc.ld_unaligned-460 - -Optimization: -Allows a "ld" of an address that is world aligned. There is a penalty -performance, but it still beats a pair of "lwz". - -Index: gcc-4.4-e500mc64-20090322/gcc/config/rs6000/rs6000.c -=================================================================== ---- gcc-4.4-e500mc64-20090322/gcc/config/rs6000/rs6000.c (revision 137727) -+++ gcc-4.4-e500mc64-20090322/gcc/config/rs6000/rs6000.c (working copy) -@@ -10640,7 +10667,9 @@ - else if (bytes >= 8 && TARGET_POWERPC64 - /* 64-bit loads and stores require word-aligned - displacements. */ -- && (align >= 64 || (!STRICT_ALIGNMENT && align >= 32))) -+ && (align >= 64 || (!STRICT_ALIGNMENT && align >= 32) -+ || rs6000_cpu == PROCESSOR_PPCE5500 -+ || rs6000_cpu == PROCESSOR_PPCE6500)) - { - clear_bytes = 8; - mode = DImode; -@@ -10775,7 +10808,9 @@ - else if (bytes >= 8 && TARGET_POWERPC64 - /* 64-bit loads and stores require word-aligned - displacements. */ -- && (align >= 64 || (!STRICT_ALIGNMENT && align >= 32))) -+ && (align >= 64 || (!STRICT_ALIGNMENT && align >= 32) -+ || rs6000_cpu == PROCESSOR_PPCE5500 -+ || rs6000_cpu == PROCESSOR_PPCE6500)) - { - move_bytes = 8; - mode = DImode; diff --git a/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.load_on_store_bypass-462.patch b/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.load_on_store_bypass-462.patch deleted file mode 100644 index a03a7ff2..00000000 --- a/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.load_on_store_bypass-462.patch +++ /dev/null @@ -1,138 +0,0 @@ - - This patch implements option -fbypass-load-on-store - - A load on store collision causes the load to to be replayed if the store has not completed. - Under -fbypass-load-on-store, GCC will attempt to avoid a load on store collision by trying - to space the load away from the store by scheduling upto 14 instructions in between, to - prevent the load from executing too early. - - -fbypass-load-on-store is enabled under -fschedule-insns - - Cores supported: e5500, e6500, e500mc - - Ref: Load-on-Store Collision Avoidance by Software Stall of Load. James Yang. May 18, 2010 - -diff -ruN fsl-gcc-4.6.2-sans-bypass/gcc/common.opt fsl-gcc-4.6.2-new-bypass/gcc/common.opt ---- fsl-gcc-4.6.2-sans-bypass/gcc/common.opt 2011-11-29 11:10:18.967872292 -0600 -+++ fsl-gcc-4.6.2-new-bypass/gcc/common.opt 2011-11-29 14:02:46.765994436 -0600 -@@ -840,6 +840,10 @@ - Common Report Var(flag_btr_bb_exclusive) Optimization - Restrict target load migration not to re-use registers in any basic block - -+fbypass-load-on-store -+Common Report Var(flag_bypass_load_on_store) Optimization -+Bypass load on store collision -+ - fcall-saved- - Common Joined RejectNegative Var(common_deferred_options) Defer - -fcall-saved- Mark as being preserved across functions -diff -ruN fsl-gcc-4.6.2-sans-bypass/gcc/config/rs6000/e500mc64.md fsl-gcc-4.6.2-new-bypass/gcc/config/rs6000/e500mc64.md ---- fsl-gcc-4.6.2-sans-bypass/gcc/config/rs6000/e500mc64.md 2011-11-29 11:11:38.454868780 -0600 -+++ fsl-gcc-4.6.2-new-bypass/gcc/config/rs6000/e500mc64.md 2011-11-29 17:10:39.849869060 -0600 -@@ -189,3 +189,5 @@ - (and (eq_attr "type" "ddiv") - (eq_attr "cpu" "ppce500mc64")) - "e500mc64_decode,e500mc64_issue+e500mc64_fpu,e500mc64_fpu*34") -+ -+(define_bypass 15 "e500mc64_store" "e500mc64_load" "rs6000_bypass_load_on_store_collision_p") -diff -ruN fsl-gcc-4.6.2-sans-bypass/gcc/config/rs6000/e500mc.md fsl-gcc-4.6.2-new-bypass/gcc/config/rs6000/e500mc.md ---- fsl-gcc-4.6.2-sans-bypass/gcc/config/rs6000/e500mc.md 2011-11-29 11:11:38.479869032 -0600 -+++ fsl-gcc-4.6.2-new-bypass/gcc/config/rs6000/e500mc.md 2011-11-29 17:10:27.810997020 -0600 -@@ -198,3 +198,5 @@ - (and (eq_attr "type" "ddiv") - (eq_attr "cpu" "ppce500mc")) - "e500mc_decode,e500mc_issue+e500mc_fpu,e500mc_fpu*65") -+ -+(define_bypass 15 "e500mc_store" "e500mc_load" "rs6000_bypass_load_on_store_collision_p") -diff -ruN fsl-gcc-4.6.2-sans-bypass/gcc/config/rs6000/e5500.md fsl-gcc-4.6.2-new-bypass/gcc/config/rs6000/e5500.md ---- fsl-gcc-4.6.2-sans-bypass/gcc/config/rs6000/e5500.md 2011-11-29 11:11:38.321744639 -0600 -+++ fsl-gcc-4.6.2-new-bypass/gcc/config/rs6000/e5500.md 2011-11-29 17:10:47.255997293 -0600 -@@ -174,3 +174,5 @@ - (and (eq_attr "type" "cr_logical,delayed_cr") - (eq_attr "cpu" "ppce5500")) - "e5500_decode,e5500_bu") -+ -+(define_bypass 15 "e5500_store" "e5500_load" "rs6000_bypass_load_on_store_collision_p") -diff -ruN fsl-gcc-4.6.2-sans-bypass/gcc/config/rs6000/e6500.md fsl-gcc-4.6.2-new-bypass/gcc/config/rs6000/e6500.md ---- fsl-gcc-4.6.2-sans-bypass/gcc/config/rs6000/e6500.md 2011-11-29 11:11:37.831996567 -0600 -+++ fsl-gcc-4.6.2-new-bypass/gcc/config/rs6000/e6500.md 2011-11-29 17:11:00.902869709 -0600 -@@ -211,3 +211,5 @@ - (and (eq_attr "type" "vecperm") - (eq_attr "cpu" "ppce6500")) - "e6500_decode,e6500_vecperm") -+ -+(define_bypass 15 "e6500_store" "e6500_load" "rs6000_bypass_load_on_store_collision_p") -diff -ruN fsl-gcc-4.6.2-sans-bypass/gcc/config/rs6000/rs6000.c fsl-gcc-4.6.2-new-bypass/gcc/config/rs6000/rs6000.c ---- fsl-gcc-4.6.2-sans-bypass/gcc/config/rs6000/rs6000.c 2011-11-29 11:11:38.393748363 -0600 -+++ fsl-gcc-4.6.2-new-bypass/gcc/config/rs6000/rs6000.c 2011-11-29 17:10:15.740745470 -0600 -@@ -28719,3 +28719,20 @@ - - - #include "gt-rs6000.h" -+ -+bool -+rs6000_bypass_load_on_store_collision_p (rtx out_insn, rtx in_insn) -+{ -+ /* The out_insn is a store and the in_insn is a load */ -+ if (flag_bypass_load_on_store && -+ (GET_CODE (PATTERN (out_insn)) == SET && -+ GET_CODE (SET_DEST (PATTERN (out_insn))) == MEM && -+ GET_CODE (SET_SRC (PATTERN (out_insn))) == REG) && -+ (GET_CODE (PATTERN (in_insn)) == SET && -+ GET_CODE (SET_DEST (PATTERN (in_insn))) == REG && -+ GET_CODE (SET_SRC (PATTERN (in_insn))) == MEM)) -+ return rtx_equal_p (SET_DEST (PATTERN (out_insn)), -+ SET_SRC (PATTERN (in_insn))); -+ else -+ return false; -+} -diff -ruN fsl-gcc-4.6.2-sans-bypass/gcc/config/rs6000/rs6000-protos.h fsl-gcc-4.6.2-new-bypass/gcc/config/rs6000/rs6000-protos.h ---- fsl-gcc-4.6.2-sans-bypass/gcc/config/rs6000/rs6000-protos.h 2011-11-29 11:11:37.783996630 -0600 -+++ fsl-gcc-4.6.2-new-bypass/gcc/config/rs6000/rs6000-protos.h 2011-11-29 17:42:51.443119385 -0600 -@@ -174,6 +174,8 @@ - - extern void rs6000_aix_asm_output_dwarf_table_ref (char *); - -+extern bool rs6000_bypass_load_on_store_collision_p (rtx out_insn, rtx in_insn); -+ - /* Declare functions in rs6000-c.c */ - - extern void rs6000_pragma_longcall (struct cpp_reader *); -diff -ruN fsl-gcc-4.6.2-sans-bypass/gcc/testsuite/gcc.target/powerpc/bypass-load-on-store.c fsl-gcc-4.6.2-new-bypass/gcc/testsuite/gcc.target/powerpc/bypass-load-on-store.c ---- fsl-gcc-4.6.2-sans-bypass/gcc/testsuite/gcc.target/powerpc/bypass-load-on-store.c 1969-12-31 18:00:00.000000000 -0600 -+++ fsl-gcc-4.6.2-new-bypass/gcc/testsuite/gcc.target/powerpc/bypass-load-on-store.c 2011-11-30 16:36:55.168869498 -0600 -@@ -0,0 +1,34 @@ -+/* { dg-do compile { target { powerpc*-*-* } } } */ -+/* { dg-options "-O0 -fschedule-insns -fbypass-load-on-store -fdump-rtl-sched1 -fsched-verbose=2" } */ -+ -+void nescaf(void) -+{ -+ long a, b, c, d, -+ e, f, g, h, -+ i, j, k, l, -+ m, n, o, p, -+ q, r, s, t, -+ -+ z, w; -+ -+ a = 41; b = 79; c = 20; d = 11; -+ e = 13; f = 43; g = 13; h = 21; -+ i = 12; j = 45; k = 55; l = 90; -+ m = 23; n = 61; o = 89; p = 53; -+ q = 83; r = 52; s = 76; t = 99; -+ -+ /* Now, we have a store followed by a load. The assignments to a-t are -+ * all independent of the store-load computation below. The question is: -+ * Under -fschedule-insns -fbypass-load-on-store, are 14 of the above -+ * instructions moved between the store-load? -+ */ -+ z = 121; -+ w = z; -+} -+ -+/* Note: There is going to be exactly one insn that will be assigned cost 15. -+ * Since its insn-number will likely change, we do not include the insn -+ * number in the scan - just the part of the dump that'll be invariant. -+ */ -+/* { dg-final { scan-rtl-dump "into queue with cost=15" "sched1" { target powerpc*-*-* } } } */ -+/* { dg-final { cleanup-rtl-dump "sched1" } } */ diff --git a/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.local_unaligned_altivec.patch b/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.local_unaligned_altivec.patch deleted file mode 100644 index feee54a1..00000000 --- a/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.local_unaligned_altivec.patch +++ /dev/null @@ -1,18 +0,0 @@ -gcc.local_unaligned_altivec - -Optimization: -On Altivec targets, make all char arrays 128 bits aligned (instead of -32 bits aligned) - ---- gcc-4.5.0/gcc/config/rs6000/rs6000.h-orig 2010-10-20 10:23:52.000000000 -0500 -+++ gcc-4.5.0/gcc/config/rs6000/rs6000.h 2010-10-20 10:39:14.000000000 -0500 -@@ -768,7 +768,8 @@ - ? 64 \ - : (TREE_CODE (TYPE) == ARRAY_TYPE \ - && TYPE_MODE (TREE_TYPE (TYPE)) == QImode \ -- && (ALIGN) < BITS_PER_WORD) ? BITS_PER_WORD : (ALIGN))) -+ && (ALIGN) < (TARGET_ALTIVEC ? 128 : BITS_PER_WORD)) \ -+ ? (TARGET_ALTIVEC ? 128 : BITS_PER_WORD) : (ALIGN))) - - /* Nonzero if move instructions will actually fail to work - when given unaligned data. */ diff --git a/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.opt-array-offset.patch b/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.opt-array-offset.patch deleted file mode 100644 index 7cdc6f79..00000000 --- a/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.opt-array-offset.patch +++ /dev/null @@ -1,350 +0,0 @@ -Implements a GIMPLE pass to optimize array access by factoring -out expressions that calculate address offset from -multiple array access. Controls with flag -fopt-array-offset - -diff -ruN XLMe500mc/gcc/common.opt XLMe5500/gcc/common.opt ---- XLMe500mc/gcc/common.opt 2011-10-18 14:49:23.026644000 -0500 -+++ XLMe5500/gcc/common.opt 2011-10-05 12:39:26.242644101 -0500 -@@ -1992,6 +1992,10 @@ - Common Report Var(flag_tree_vrp) Init(0) Optimization - Perform Value Range Propagation on trees - -+fopt-array-offset -+Common Report Var(flag_opt_array_offset) -+Expand array offset address calculations -+ - funit-at-a-time - Common Report Var(flag_unit_at_a_time) Init(1) Optimization - Compile whole compilation unit at a time -diff -ruN XLMe500mc/gcc/Makefile.in XLMe5500/gcc/Makefile.in ---- XLMe500mc/gcc/Makefile.in 2011-10-18 14:49:23.028644000 -0500 -+++ XLMe5500/gcc/Makefile.in 2011-10-05 12:08:28.104643898 -0500 -@@ -1306,6 +1306,7 @@ - omp-low.o \ - optabs.o \ - options.o \ -+ opt-array-offset.o \ - opts-common.o \ - opts-global.o \ - opts.o \ -@@ -2629,7 +2630,10 @@ - $(FLAGS_H) $(CGRAPH_H) $(PLUGIN_H) \ - $(TREE_INLINE_H) tree-mudflap.h $(GGC_H) graph.h $(CGRAPH_H) \ - $(TREE_PASS_H) $(CFGLOOP_H) $(EXCEPT_H) $(REGSET_H) -- -+opt-array-offset.o : opt-array-offset.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ -+ $(TM_H) $(FLAGS_H) $(TREE_H) $(TREE_FLOW_H) $(TIMEVAR_H) \ -+ $(TREE_PASS_H) alloc-pool.h $(BASIC_BLOCK_H) $(TARGET_H) \ -+ $(DIAGNOSTIC_H) gimple-pretty-print.h tree-pretty-print.h - widen-types.o : widen-types.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(GIMPLE_H) \ - $(DIAGNOSTIC_H) $(GIMPLE_H) $(TREE_INLINE_H) langhooks.h \ - $(LANGHOOKS_DEF_H) $(TREE_FLOW_H) $(CGRAPH_H) $(TIMEVAR_H) $(TM_H) \ -diff -ruN XLMe500mc/gcc/opt-array-offset.c XLMe5500/gcc/opt-array-offset.c ---- XLMe500mc/gcc/opt-array-offset.c 1969-12-31 18:00:00.000000000 -0600 -+++ XLMe5500/gcc/opt-array-offset.c 2011-11-01 15:24:21.746039000 -0500 -@@ -0,0 +1,283 @@ -+/* Optimizing array element access -+ Copyright (C) 2011 -+ Free Software Foundation, Inc. -+ -+This file is part of GCC. -+ -+GCC 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. -+ -+GCC 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 GCC; see the file COPYING3. If not see -+. */ -+ -+ -+/* This is a GIMPLE pass over basic block which coverts the stmts: -+ -+ a = b +/- c1; -+ c = a * c2; -+ -+ to: -+ -+ a = b * c2; -+ c = a +/- c1 * c2; -+ -+ in effect expanding the multiplication across addition/substraction. -+ -+ Motivating example: -+ Consider the following simple integer array access: -+ -+ a[i] = c; -+ a[i + 1] = c; -+ -+ The following GIMPLE equivalent will be generated: -+ -+ off_1 = i * 4; -+ a_i = a + off_1; -+ *a_i = c; -+ -+ off_1 = i + 1; -+ off_2 = off_1 * 4; -+ a_i1 = a + off_2; -+ *a_i1 = c; -+ -+ Notice that a_i1 could simply be a_i + 4. But the calcuation of i+1 -+ is preventing CSE to perform. This pass will essentially convert the -+ second expr into: -+ -+ off_1 = i * 4; -+ off_2 = off_1 + 4; -+ a_i1 = a + off_2; -+ .... -+ -+ Thus allowing the previous index i calculation to be reuse. off_1 + 4 -+ would also be combined into a_i if offset addressing mode is available. -+ This also have side effect of avoiding redundant sign extension on -+ i+1 for LP64 model where native integer size is different from pointer size. -+ -+ The algorithm iterates through all the basic blocks looking for -+ the above pattern. Care is taken to make sure off_1 only -+ has the single use otherwise the transformation cannot be perform. -+*/ -+ -+ -+#include "config.h" -+#include "system.h" -+#include "coretypes.h" -+#include "tm.h" -+#include "flags.h" -+#include "tree.h" -+#include "tree-flow.h" -+#include "timevar.h" -+#include "tree-pass.h" -+#include "alloc-pool.h" -+#include "basic-block.h" -+#include "target.h" -+#include "gimple-pretty-print.h" -+#include "tree-pretty-print.h" -+ -+ -+/* -+ We are looking for: -+ a = b +/- c1 -+ c = a * c2 (stmt incoming) -+ d = &arr + c -+*/ -+static bool -+is_candidate (gimple stmt) -+{ -+ tree mul_result = gimple_get_lhs (stmt); -+ tree rhs1, rhs2; -+ gimple rhs1_stmt, use_stmt; -+ use_operand_p use_p; -+ imm_use_iterator imm_iter; -+ -+ /* check for a * c2 */ -+ if (gimple_assign_rhs_code (stmt) != MULT_EXPR) -+ return false; -+ -+ rhs1 = gimple_assign_rhs1 (stmt); -+ rhs2 = gimple_assign_rhs2 (stmt); -+ -+ if (TREE_CODE (rhs2) != INTEGER_CST) -+ return false; -+ -+ /* check for b + c1 */ -+ if (TREE_CODE (rhs1) == SSA_NAME) -+ { -+ rhs1_stmt = SSA_NAME_DEF_STMT (rhs1); -+ if (is_gimple_assign (rhs1_stmt)) -+ { -+ tree rhs1_2; -+ tree plusminus_result; -+ -+ if (gimple_assign_rhs_code (rhs1_stmt) != PLUS_EXPR -+ && gimple_assign_rhs_code (rhs1_stmt) != MINUS_EXPR) -+ return false; -+ -+ rhs1_2 = gimple_assign_rhs2 (rhs1_stmt); -+ if (TREE_CODE (rhs1_2) != INTEGER_CST) -+ return false; -+ -+ /* make sure there are no other uses of a -+ e.g. if a is used as an indcution variable -+ we cannot modified it -+ */ -+ plusminus_result = gimple_get_lhs (rhs1_stmt); -+ FOR_EACH_IMM_USE_FAST (use_p, imm_iter, plusminus_result) -+ { -+ use_stmt = USE_STMT (use_p); -+ -+ /* ignore PHI node */ -+ if (is_gimple_assign (use_stmt) && -+ (gimple_assign_rhs_code (use_stmt) == GIMPLE_PHI)) -+ continue; -+ if (use_stmt != stmt) -+ return false; -+ } -+ -+#if 0 -+ if (gimple_bb(rhs1_stmt) != gimple_bb(stmt)) -+ return false; -+#endif -+ } -+ else -+ return false; -+ } -+ else -+ return false; -+ -+ /* now look for uses of c that is a pointer use */ -+ FOR_EACH_IMM_USE_FAST (use_p, imm_iter, mul_result) -+ { -+ enum tree_code use_code; -+ -+ use_stmt = USE_STMT (use_p); -+ -+ if (is_gimple_debug (use_stmt)) -+ continue; -+ -+ if (gimple_bb (use_stmt) != gimple_bb (stmt)) -+ return false; -+ -+ if (!is_gimple_assign (use_stmt)) -+ return false; -+ -+ use_code = gimple_assign_rhs_code (use_stmt); -+ if (use_code != POINTER_PLUS_EXPR) -+ return false; -+ } -+ -+ if (dump_file) -+ { -+ fprintf (dump_file, "Found candidate:\n"); -+ print_gimple_stmt (dump_file, rhs1_stmt, 0, TDF_SLIM); -+ print_gimple_stmt (dump_file, stmt, 0, TDF_SLIM); -+ print_gimple_stmt (dump_file, use_stmt, 0, TDF_SLIM); -+ } -+ -+ return true; -+} -+ -+/* Do the actual transformation: -+ a = b + c1 ==> a = b * c2 -+ c = a * c2 ==> c = a + c1*c2 -+*/ -+static bool -+expand_plusminus_mult (gimple stmt) -+{ -+ tree c1, c2, mul_result; -+ gimple rhs1_stmt; -+ -+ /* get c2 */ -+ c2 = gimple_assign_rhs2 (stmt); -+ -+ /* get c1 */ -+ rhs1_stmt = SSA_NAME_DEF_STMT (gimple_assign_rhs1 (stmt)); -+ c1 = gimple_assign_rhs2 (rhs1_stmt); -+ -+ /* form c1 * c2 */ -+ mul_result = double_int_to_tree (TREE_TYPE(c2), double_int_mul -+ (tree_to_double_int (c1), tree_to_double_int (c2))); -+ -+ /* a = b + c1 ==> a = b * c2 */ -+ gimple_assign_set_rhs2 (rhs1_stmt, c2); -+ gimple_assign_set_rhs_code (rhs1_stmt, MULT_EXPR); -+ update_stmt (rhs1_stmt); -+ -+ /* c = a * c2 ==> c = a + c1*c2 */ -+ gimple_assign_set_rhs2 (stmt, mul_result); -+ /* MINUS_EXPR has already been embedded into c1*c2 */ -+ gimple_assign_set_rhs_code (stmt, PLUS_EXPR); -+ update_stmt (stmt); -+ -+ return true; -+} -+ -+ -+static unsigned int -+execute_opt_array_offset (void) -+{ -+ basic_block bb; -+ tree fndecl; -+ -+ FOR_EACH_BB (bb) -+ { -+ gimple_stmt_iterator gsi; -+ -+ for (gsi = gsi_after_labels (bb); !gsi_end_p (gsi); gsi_next(&gsi)) -+ { -+ gimple stmt = gsi_stmt (gsi); -+ tree lhs,rhs1,rhs2,rhs3; -+ enum tree_code code; -+ -+ /* only interested in assign statement */ -+ if (is_gimple_assign (stmt)) -+ { -+ /* find stmts calculating array offset */ -+ if (is_candidate (stmt)) -+ /* convert stmt */ -+ expand_plusminus_mult(stmt); -+ -+ } -+ } -+ } -+ -+ return 0; -+} -+ -+static bool -+gate_opt_array_offset (void) -+{ -+ return flag_opt_array_offset && optimize; -+} -+ -+struct gimple_opt_pass pass_opt_array_offset = -+{ -+ { -+ GIMPLE_PASS, -+ "opt_array_offset", /* name */ -+ gate_opt_array_offset, /* gate */ -+ execute_opt_array_offset, /* execute */ -+ NULL, /* sub */ -+ NULL, /* next */ -+ 0, /* static_pass_number */ -+ TV_NONE, /* tv_id */ -+ PROP_ssa, /* properties_required */ -+ 0, /* properties_provided */ -+ 0, /* properties_destroyed */ -+ 0, /* todo_flags_start */ -+ TODO_verify_ssa -+ | TODO_verify_stmts -+ | TODO_update_ssa -+ | TODO_dump_func /* todo_flags_finish */ -+ } -+}; -+ -diff -ruN XLMe500mc/gcc/passes.c XLMe5500/gcc/passes.c ---- XLMe500mc/gcc/passes.c 2011-10-18 14:49:23.029644000 -0500 -+++ XLMe5500/gcc/passes.c 2011-10-05 11:19:01.168644127 -0500 -@@ -937,6 +937,7 @@ - NEXT_PASS (pass_phiopt); - NEXT_PASS (pass_fold_builtins); - NEXT_PASS (pass_optimize_widening_mul); -+ NEXT_PASS (pass_opt_array_offset); - NEXT_PASS (pass_tail_calls); - NEXT_PASS (pass_rename_ssa_copies); - NEXT_PASS (pass_uncprop); -diff -ruN XLMe500mc/gcc/tree-pass.h XLMe5500/gcc/tree-pass.h ---- XLMe500mc/gcc/tree-pass.h 2011-10-18 14:49:23.029644000 -0500 -+++ XLMe5500/gcc/tree-pass.h 2011-10-05 11:19:59.665643705 -0500 -@@ -421,6 +421,7 @@ - extern struct gimple_opt_pass pass_cse_sincos; - extern struct gimple_opt_pass pass_optimize_bswap; - extern struct gimple_opt_pass pass_optimize_widening_mul; -+extern struct gimple_opt_pass pass_opt_array_offset; - extern struct gimple_opt_pass pass_warn_function_return; - extern struct gimple_opt_pass pass_warn_function_noreturn; - extern struct gimple_opt_pass pass_cselim; diff --git a/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.remove_CCUNSmode_reference.patch b/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.remove_CCUNSmode_reference.patch deleted file mode 100644 index 03e3ce9c..00000000 --- a/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.remove_CCUNSmode_reference.patch +++ /dev/null @@ -1,24 +0,0 @@ ---- gcc-4_6-branch/gcc/extelim.c.orig 2012-03-05 21:42:53.984215949 -0600 -+++ gcc-4_6-branch/gcc/extelim.c 2012-03-05 21:43:27.884394659 -0600 -@@ -922,8 +922,7 @@ - && GET_MODE (exp) != HImode - && GET_MODE (exp) != SImode - && GET_MODE (exp) != DImode -- && GET_MODE (exp) != CCmode -- && GET_MODE (exp) != CCUNSmode) -+ && GET_MODE (exp) != CCmode) - return false; - - return true; -@@ -1653,9 +1652,9 @@ - For our targets, there is no 'cmph' insn, so we bail out - if we see a comparison of sizes less than a word (SI). */ - if (REG_P (dest) -- && (GET_MODE (dest) == CCmode || GET_MODE (dest) == CCUNSmode) -+ && (GET_MODE (dest) == CCmode) - && GET_CODE (src) == COMPARE -- && (GET_MODE (src) == CCmode || GET_MODE (src) == CCUNSmode)) -+ && (GET_MODE (src) == CCmode)) - { - rtx compare_op0 = XEXP (src, 0); - rtx compare_op1 = XEXP (src, 1); diff --git a/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.rm_slow_tests.patch b/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.rm_slow_tests.patch deleted file mode 100644 index b02b7555..00000000 --- a/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.rm_slow_tests.patch +++ /dev/null @@ -1,67 +0,0 @@ -diff -urN gcc-4.6.0/gcc/testsuite/gfortran.dg/cray_pointers_8.f90 gcc-4.6.0-fixed/gcc/testsuite/gfortran.dg/cray_pointers_8.f90 ---- gcc-4.6.0/gcc/testsuite/gfortran.dg/cray_pointers_8.f90 2009-02-13 15:12:34.000000000 -0600 -+++ gcc-4.6.0-fixed/gcc/testsuite/gfortran.dg/cray_pointers_8.f90 1969-12-31 18:00:00.000000000 -0600 -@@ -1,63 +0,0 @@ --! { dg-do run } --! { dg-options "-fcray-pointer" } --! --! Test the fix for PR36528 in which the Cray pointer was not passed --! correctly to 'euler' so that an undefined reference to fcn was --! generated by the linker. --! --! Reported by Tobias Burnus --! from http://groups.google.com/group/comp.lang.fortran/msg/86b65bad78e6af78 --! --real function p1(x) -- real, intent(in) :: x -- p1 = x --end -- --real function euler(xp,xk,dx,f) -- real, intent(in) :: xp, xk, dx -- interface -- real function f(x) -- real, intent(in) :: x -- end function -- end interface -- real x, y -- y = 0.0 -- x = xp -- do while (x .le. xk) -- y = y + f(x)*dx -- x = x + dx -- end do -- euler = y --end --program main -- interface -- real function p1 (x) -- real, intent(in) :: x -- end function -- real function fcn (x) -- real, intent(in) :: x -- end function -- real function euler (xp,xk,dx,f) -- real, intent(in) :: xp, xk ,dx -- interface -- real function f(x) -- real, intent(in) :: x -- end function -- end interface -- end function -- end interface -- real x, xp, xk, dx, y, z -- pointer (pfcn, fcn) -- pfcn = loc(p1) -- xp = 0.0 -- xk = 1.0 -- dx = 0.0005 -- y = 0.0 -- x = xp -- do while (x .le. xk) -- y = y + fcn(x)*dx -- x = x + dx -- end do -- z = euler(0.0,1.0,0.0005,fcn) -- if (abs (y - z) .gt. 1e-6) call abort --end diff --git a/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.soft_float-460.patch b/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.soft_float-460.patch deleted file mode 100644 index eafa6ab0..00000000 --- a/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.soft_float-460.patch +++ /dev/null @@ -1,190 +0,0 @@ -diff -u gcc-4.6.0-orig/libstdc++-v3/testsuite/ext/pb_ds/regression/hash_data_map_rand.cc gcc-4.6.0/libstdc++-v3/testsuite/ext/pb_ds/regression/hash_data_map_rand.cc ---- gcc-4.6.0-orig/libstdc++-v3/testsuite/ext/pb_ds/regression/hash_data_map_rand.cc 2011-05-11 20:01:58.000000000 -0500 -+++ gcc-4.6.0/libstdc++-v3/testsuite/ext/pb_ds/regression/hash_data_map_rand.cc 2011-05-11 20:03:39.000000000 -0500 -@@ -46,17 +46,17 @@ - - #ifndef ITERATIONS - # ifdef _GLIBCXX_DEBUG --# define ITERATIONS 100 -+# define ITERATIONS 2 - # else --# define ITERATIONS 5000 -+# define ITERATIONS 2 - #endif - #endif - - #ifndef KEYS - # ifdef _GLIBCXX_DEBUG --# define KEYS 200 -+# define KEYS 5 - # else --# define KEYS 10000 -+# define KEYS 5 - # endif - #endif - -diff -u gcc-4.6.0-orig/libstdc++-v3/testsuite/ext/pb_ds/regression/hash_no_data_map_rand.cc gcc-4.6.0/libstdc++-v3/testsuite/ext/pb_ds/regression/hash_no_data_map_rand.cc ---- gcc-4.6.0-orig/libstdc++-v3/testsuite/ext/pb_ds/regression/hash_no_data_map_rand.cc 2011-05-11 20:01:58.000000000 -0500 -+++ gcc-4.6.0/libstdc++-v3/testsuite/ext/pb_ds/regression/hash_no_data_map_rand.cc 2011-05-11 20:04:00.000000000 -0500 -@@ -46,17 +46,17 @@ - - #ifndef ITERATIONS - # ifdef _GLIBCXX_DEBUG --# define ITERATIONS 100 -+# define ITERATIONS 2 - # else --# define ITERATIONS 5000 -+# define ITERATIONS 2 - #endif - #endif - - #ifndef KEYS - # ifdef _GLIBCXX_DEBUG --# define KEYS 200 -+# define KEYS 5 - # else --# define KEYS 10000 -+# define KEYS 5 - # endif - #endif - -diff -u gcc-4.6.0-orig/libstdc++-v3/testsuite/ext/pb_ds/regression/list_update_data_map_rand.cc gcc-4.6.0/libstdc++-v3/testsuite/ext/pb_ds/regression/list_update_data_map_rand.cc ---- gcc-4.6.0-orig/libstdc++-v3/testsuite/ext/pb_ds/regression/list_update_data_map_rand.cc 2011-05-11 20:01:58.000000000 -0500 -+++ gcc-4.6.0/libstdc++-v3/testsuite/ext/pb_ds/regression/list_update_data_map_rand.cc 2011-05-11 20:02:23.000000000 -0500 -@@ -47,7 +47,7 @@ - using namespace __gnu_pbds::test; - typedef lu_map_tl_t map_tl_t; - -- return rand_regression_test(50, 10, -+ return rand_regression_test(2, 5, - "lu_data_map_rand_regression_test", - map_tl_t()); - } -diff -u gcc-4.6.0-orig/libstdc++-v3/testsuite/ext/pb_ds/regression/list_update_no_data_map_rand.cc gcc-4.6.0/libstdc++-v3/testsuite/ext/pb_ds/regression/list_update_no_data_map_rand.cc ---- gcc-4.6.0-orig/libstdc++-v3/testsuite/ext/pb_ds/regression/list_update_no_data_map_rand.cc 2011-05-11 20:01:58.000000000 -0500 -+++ gcc-4.6.0/libstdc++-v3/testsuite/ext/pb_ds/regression/list_update_no_data_map_rand.cc 2011-05-11 20:02:23.000000000 -0500 -@@ -47,7 +47,7 @@ - using namespace __gnu_pbds::test; - typedef lu_set_tl_t map_tl_t; - -- return rand_regression_test(50, 10, -+ return rand_regression_test(2, 5, - "lu_no_data_map_rand_regression_test", - map_tl_t()); - } -diff -u gcc-4.6.0-orig/libstdc++-v3/testsuite/ext/pb_ds/regression/priority_queue_rand.cc gcc-4.6.0/libstdc++-v3/testsuite/ext/pb_ds/regression/priority_queue_rand.cc ---- gcc-4.6.0-orig/libstdc++-v3/testsuite/ext/pb_ds/regression/priority_queue_rand.cc 2011-05-11 20:01:58.000000000 -0500 -+++ gcc-4.6.0/libstdc++-v3/testsuite/ext/pb_ds/regression/priority_queue_rand.cc 2011-05-11 20:02:23.000000000 -0500 -@@ -45,10 +45,10 @@ - #include - - #ifndef ITERATIONS --#define ITERATIONS 5000 -+#define ITERATIONS 2 - #endif - #ifndef KEYS --#define KEYS 10000 -+#define KEYS 5 - #endif - int - main(int argc, char* a_p_argv[]) -diff -u gcc-4.6.0-orig/libstdc++-v3/testsuite/ext/pb_ds/regression/tree_data_map_rand.cc gcc-4.6.0/libstdc++-v3/testsuite/ext/pb_ds/regression/tree_data_map_rand.cc ---- gcc-4.6.0-orig/libstdc++-v3/testsuite/ext/pb_ds/regression/tree_data_map_rand.cc 2011-05-11 20:01:58.000000000 -0500 -+++ gcc-4.6.0/libstdc++-v3/testsuite/ext/pb_ds/regression/tree_data_map_rand.cc 2011-05-11 20:04:21.000000000 -0500 -@@ -46,17 +46,17 @@ - - #ifndef ITERATIONS - # ifdef _GLIBCXX_DEBUG --# define ITERATIONS 100 -+# define ITERATIONS 2 - # else --# define ITERATIONS 5000 -+# define ITERATIONS 2 - #endif - #endif - - #ifndef KEYS - # ifdef _GLIBCXX_DEBUG --# define KEYS 200 -+# define KEYS 5 - # else --# define KEYS 10000 -+# define KEYS 5 - # endif - #endif - -diff -u gcc-4.6.0-orig/libstdc++-v3/testsuite/ext/pb_ds/regression/tree_no_data_map_rand.cc gcc-4.6.0/libstdc++-v3/testsuite/ext/pb_ds/regression/tree_no_data_map_rand.cc ---- gcc-4.6.0-orig/libstdc++-v3/testsuite/ext/pb_ds/regression/tree_no_data_map_rand.cc 2011-05-11 20:01:58.000000000 -0500 -+++ gcc-4.6.0/libstdc++-v3/testsuite/ext/pb_ds/regression/tree_no_data_map_rand.cc 2011-05-11 20:04:41.000000000 -0500 -@@ -47,17 +47,17 @@ - - #ifndef ITERATIONS - # ifdef _GLIBCXX_DEBUG --# define ITERATIONS 100 -+# define ITERATIONS 2 - # else --# define ITERATIONS 5000 -+# define ITERATIONS 2 - #endif - #endif - - #ifndef KEYS - # ifdef _GLIBCXX_DEBUG --# define KEYS 200 -+# define KEYS 5 - # else --# define KEYS 10000 -+# define KEYS 5 - # endif - #endif - -diff -u gcc-4.6.0-orig/libstdc++-v3/testsuite/ext/pb_ds/regression/trie_data_map_rand.cc gcc-4.6.0/libstdc++-v3/testsuite/ext/pb_ds/regression/trie_data_map_rand.cc ---- gcc-4.6.0-orig/libstdc++-v3/testsuite/ext/pb_ds/regression/trie_data_map_rand.cc 2011-05-11 20:01:58.000000000 -0500 -+++ gcc-4.6.0/libstdc++-v3/testsuite/ext/pb_ds/regression/trie_data_map_rand.cc 2011-05-11 20:05:34.000000000 -0500 -@@ -46,17 +46,17 @@ - - #ifndef ITERATIONS - # ifdef _GLIBCXX_DEBUG --# define ITERATIONS 100 -+# define ITERATIONS 2 - # else --# define ITERATIONS 5000 -+# define ITERATIONS 2 - #endif - #endif - - #ifndef KEYS - # ifdef _GLIBCXX_DEBUG --# define KEYS 200 -+# define KEYS 5 - # else --# define KEYS 10000 -+# define KEYS 5 - # endif - #endif - -diff -u gcc-4.6.0-orig/libstdc++-v3/testsuite/ext/pb_ds/regression/trie_no_data_map_rand.cc gcc-4.6.0/libstdc++-v3/testsuite/ext/pb_ds/regression/trie_no_data_map_rand.cc ---- gcc-4.6.0-orig/libstdc++-v3/testsuite/ext/pb_ds/regression/trie_no_data_map_rand.cc 2011-05-11 20:01:58.000000000 -0500 -+++ gcc-4.6.0/libstdc++-v3/testsuite/ext/pb_ds/regression/trie_no_data_map_rand.cc 2011-05-11 20:05:50.000000000 -0500 -@@ -46,17 +46,17 @@ - - #ifndef ITERATIONS - # ifdef _GLIBCXX_DEBUG --# define ITERATIONS 100 -+# define ITERATIONS 2 - # else --# define ITERATIONS 5000 -+# define ITERATIONS 2 - #endif - #endif - - #ifndef KEYS - # ifdef _GLIBCXX_DEBUG --# define KEYS 200 -+# define KEYS 5 - # else --# define KEYS 10000 -+# define KEYS 5 - # endif - #endif - diff --git a/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.widen_types-46.patch b/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.widen_types-46.patch deleted file mode 100644 index 05905607..00000000 --- a/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.widen_types-46.patch +++ /dev/null @@ -1,1534 +0,0 @@ -diff -ruN gcc-4.6.0-orig/gcc/common.opt gcc-4.6.0-new/gcc/common.opt ---- gcc-4.6.0-orig/gcc/common.opt 2011-03-05 18:38:13.000000000 -0600 -+++ gcc-4.6.0-new/gcc/common.opt 2011-08-25 13:16:36.408937475 -0500 -@@ -1797,6 +1797,10 @@ - Common Report Var(flag_strict_overflow) - Treat signed overflow as undefined - -+fwiden-types -+Common Report Var(flag_widen_types) -+Widen signed integral variables (local, whose address has not been taken, non-volatile and having precision less than that of long) to long (retaining original qualifiers) -+ - fsyntax-only - Common Report Var(flag_syntax_only) - Check for syntax errors, then stop -diff -ruN gcc-4.6.0-orig/gcc/Makefile.in gcc-4.6.0-new/gcc/Makefile.in ---- gcc-4.6.0-orig/gcc/Makefile.in 2011-01-25 22:19:58.000000000 -0600 -+++ gcc-4.6.0-new/gcc/Makefile.in 2011-08-25 13:16:36.411937390 -0500 -@@ -1245,6 +1245,7 @@ - gimple-fold.o \ - gimple-low.o \ - gimple-pretty-print.o \ -+ widen-types.o \ - gimplify.o \ - godump.o \ - graph.o \ -@@ -2628,6 +2629,12 @@ - $(TREE_INLINE_H) tree-mudflap.h $(GGC_H) graph.h $(CGRAPH_H) \ - $(TREE_PASS_H) $(CFGLOOP_H) $(EXCEPT_H) $(REGSET_H) - -+widen-types.o : widen-types.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(GIMPLE_H) \ -+ $(DIAGNOSTIC_H) $(GIMPLE_H) $(TREE_INLINE_H) langhooks.h \ -+ $(LANGHOOKS_DEF_H) $(TREE_FLOW_H) $(CGRAPH_H) $(TIMEVAR_H) $(TM_H) \ -+ coretypes.h $(EXCEPT_H) $(FLAGS_H) $(RTL_H) $(FUNCTION_H) $(EXPR_H) output.h \ -+ $(GGC_H) gt-gimplify.h $(HASHTAB_H) $(TARGET_H) $(DIAGNOSTIC_CORE_H) $(OPTABS_H) \ -+ $(SPLAY_TREE_H) $(VEC_H) tree-iterator.h tree-pass.h tree-pretty-print.h - gimplify.o : gimplify.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(GIMPLE_H) \ - $(DIAGNOSTIC_H) $(GIMPLE_H) $(TREE_INLINE_H) langhooks.h \ - $(LANGHOOKS_DEF_H) $(TREE_FLOW_H) $(CGRAPH_H) $(TIMEVAR_H) $(TM_H) \ -@@ -3733,6 +3740,7 @@ - $(srcdir)/tree-cfg.c \ - $(srcdir)/tree-dfa.c \ - $(srcdir)/tree-iterator.c $(srcdir)/gimplify.c \ -+ $(srcdir)/widen-types.c \ - $(srcdir)/tree-chrec.h \ - $(srcdir)/tree-scalar-evolution.c \ - $(srcdir)/tree-ssa-operands.h \ -diff -ruN gcc-4.6.0-orig/gcc/passes.c gcc-4.6.0-new/gcc/passes.c ---- gcc-4.6.0-orig/gcc/passes.c 2011-02-17 10:18:24.000000000 -0600 -+++ gcc-4.6.0-new/gcc/passes.c 2011-08-25 13:16:36.413937342 -0500 -@@ -719,6 +719,7 @@ - backend might produce already lowered functions that are not processed - by these passes. */ - p = &all_lowering_passes; -+ NEXT_PASS (pass_widen_types_stmts); - NEXT_PASS (pass_warn_unused_result); - NEXT_PASS (pass_diagnose_omp_blocks); - NEXT_PASS (pass_mudflap_1); -@@ -741,6 +742,7 @@ - NEXT_PASS (pass_fixup_cfg); - NEXT_PASS (pass_init_datastructures); - NEXT_PASS (pass_expand_omp); -+ NEXT_PASS (pass_widen_types_bbs); - - NEXT_PASS (pass_referenced_vars); - NEXT_PASS (pass_build_ssa); -diff -ruN gcc-4.6.0-orig/gcc/tree-pass.h gcc-4.6.0-new/gcc/tree-pass.h ---- gcc-4.6.0-orig/gcc/tree-pass.h 2011-02-01 09:12:26.000000000 -0600 -+++ gcc-4.6.0-new/gcc/tree-pass.h 2011-08-25 13:16:36.406937543 -0500 -@@ -349,6 +349,7 @@ - - extern void tree_lowering_passes (tree decl); - -+extern struct gimple_opt_pass pass_widen_types_stmts; - extern struct gimple_opt_pass pass_mudflap_1; - extern struct gimple_opt_pass pass_mudflap_2; - extern struct gimple_opt_pass pass_lower_cf; -@@ -409,6 +410,7 @@ - extern struct gimple_opt_pass pass_lower_omp; - extern struct gimple_opt_pass pass_diagnose_omp_blocks; - extern struct gimple_opt_pass pass_expand_omp; -+extern struct gimple_opt_pass pass_widen_types_bbs; - extern struct gimple_opt_pass pass_expand_omp_ssa; - extern struct gimple_opt_pass pass_object_sizes; - extern struct gimple_opt_pass pass_fold_builtins; -diff -ruN gcc-4.6.0-orig/gcc/widen-types.c gcc-4.6.0-new/gcc/widen-types.c ---- gcc-4.6.0-orig/gcc/widen-types.c 1969-12-31 18:00:00.000000000 -0600 -+++ gcc-4.6.0-new/gcc/widen-types.c 2011-08-25 17:27:31.372937392 -0500 -@@ -0,0 +1,1446 @@ -+/* -+ Type Widening: -+ -+ Locals and temporaries having signed integral types, whose address has -+ not been taken, are not volatile qualified, and having type precision -+ less than that of type long are widened to type long (with any other -+ qualifiers retained). -+ -+ Copyright (C) 2011 -+ Free Software Foundation, Inc. -+ -+This file is part of GCC. -+ -+GCC 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. -+ -+GCC 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 GCC; see the file COPYING3. If not see -+. */ -+ -+#include "config.h" -+#include "system.h" -+#include "coretypes.h" -+#include "tm.h" -+#include "tree.h" -+#include "tm_p.h" -+#include "gimple.h" -+#include "basic-block.h" -+#include "tree-iterator.h" -+#include "tree-inline.h" -+#include "langhooks.h" -+#include "tree-pretty-print.h" -+#include "gimple-pretty-print.h" -+#include "langhooks.h" -+#include "tree-flow.h" -+#include "cgraph.h" -+#include "timevar.h" -+#include "hashtab.h" -+#include "flags.h" -+#include "function.h" -+#include "output.h" -+#include "ggc.h" -+#include "tree-dump.h" -+#include "tree-pass.h" -+#include "diagnostic-core.h" -+#include "target.h" -+#include "pointer-set.h" -+#include "splay-tree.h" -+#include "vec.h" -+#include "gimple.h" -+#include "tree-pass.h" -+ -+#include "langhooks-def.h" -+#include "expr.h" -+ -+#include "except.h" -+#include "value-prof.h" -+#include "pointer-set.h" -+ -+/* define TW_FINALIZE_STMTS to 1, if you want to run the widening -+ * pass just after gimplification - over the sequence of statements. -+ */ -+#define TW_FINALIZE_STMTS 1 -+ -+#define TW_DEBUG 0 -+#if TW_DEBUG -+ -+#define TWDBG_STMT(stmt) fprintf (stderr, "%s: ", __FUNCTION__); \ -+ debug_gimple_stmt (stmt); -+ -+#define TWDBG_TREE(tree) \ -+{ \ -+ fprintf (stderr, "%s:\n", #tree); \ -+ debug_tree (tree); \ -+ fprintf (stderr, "\n"); \ -+} -+ -+#define TWDBG_MSG(fmt) \ -+fprintf (stderr, "%s: ", __FUNCTION__); \ -+fprintf (stderr, fmt) -+ -+#define TWDBG_MSG1(fmt, msg) \ -+fprintf (stderr, "%s: ", __FUNCTION__); \ -+fprintf (stderr, fmt, msg) -+ -+#else -+#define TWDBG_STMT(stmt) -+#define TWDBG_TREE(tree) -+#define TWDBG_MSG(fmt) -+#define TWDBG_MSG1(fmt, msg) -+#endif -+ -+#if TW_DEBUG -+static void tw_dump_candidate_list (void); -+static bool tw_debug_candidate (const void *t, void **candidacy, void *data); -+#endif -+static void tw_init (void); -+static void tw_reset (void); -+static long tw_candidate (tree node); -+static long tw_candidate_const (tree node); -+static long *tw_log_candidate (tree node); -+static long tw_candidacy_valid (tree node); -+static void tw_candidacy (tree node, long value); -+static long tw_in_candidate_list (tree node); -+static tree tw_widen_constant (tree node); -+static tree tw_widen_variable (tree node); -+#ifdef TW_FINALIZE_STMTS -+static long tw_fn_has_openmp (gimple_seq stmts); -+#endif -+static void tw_log_parms (tree fndecl); -+#ifdef TW_FINALIZE_STMTS -+static void tw_log_vars (gimple_seq stmts); -+#endif -+static void tw_log_local_decls (void); -+#ifdef TW_FINALIZE_STMTS -+static unsigned int tw_finalize_stmts (void); -+#endif -+static unsigned int tw_finalize_bbs (void); -+static long tw_gimple_in_seq (gimple_seq stmts, long widen); -+static long tw_gimple_in_bb (basic_block bb, long widen); -+static long tw_switch (gimple stmt, long widen); -+static long tw_gimple_stmt (gimple stmt, long widen); -+static long tw_gimple_assign (gimple stmt, long widen); -+static long tw_gimple_assign_single (gimple stmt, long widen); -+static long tw_gimple_assign_unary (gimple stmt, long widen); -+static long tw_gimple_assign_binary (gimple stmt, long widen); -+static long tw_gimple_assign_ternary (gimple stmt, long widen); -+static bool is_formatted_IO_fn (tree decl); -+static long tw_gimple_call (gimple stmt, long widen); -+static long tw_gimple_comparison (gimple stmt, long widen); -+static long tw_gimple_switch (gimple stmt, long widen); -+static long tw_gimple_return (gimple stmt, long widen); -+static long tw_gimple_asm (gimple stmt, long widen); -+static long tw_gimple_debug (gimple stmt, long widen); -+ -+static struct pointer_map_t *tw_candidate_list; -+ -+#if TW_DEBUG -+static void -+tw_dump_candidate_list (void) -+{ -+ TWDBG_MSG ("Dumping candidate list:\n"); -+ pointer_map_traverse (tw_candidate_list, tw_debug_candidate, NULL); -+ TWDBG_MSG ("Done dumping candidate list\n"); -+} -+ -+static -+bool tw_debug_candidate (const void *t, void **candidacy, void *data) -+{ -+ debug_tree (t); -+ fprintf(stderr, "candidacy: %ld\n data (ignore): %p", *((long *) candidacy), data); -+ return true; -+} -+#endif -+ -+static void -+tw_init (void) -+{ -+ gcc_assert (tw_candidate_list == NULL); -+ tw_candidate_list = pointer_map_create (); -+} -+ -+static void -+tw_reset (void) -+{ -+ if (tw_candidate_list) -+ { -+ pointer_map_destroy (tw_candidate_list); -+ tw_candidate_list = NULL; -+ } -+} -+ -+/* gcc.dg/torture/pr43879_[12].c -+ * Initialized statics should not be widened: -+ * -+ * void bar(int c) -+ * { -+ * static int x = 1; // if widened, x gets initialized to (2^32) -+ * if (c != x) __builtin_abort(); -+ * x--; -+ * } -+ * -+ * int main() -+ * { -+ * int c = 1; -+ * bar (1); -+ * return 0; -+ * } -+ * -+ * Likely, the initial value is laid out/translated to RTL way before -+ * the rest of the code is translated to GIMPLE; so when we widen the -+ * type, it's already too late. -+ */ -+ -+/* tw_candidate() has no way to tell if it was passed a local variable -+ * (or not) - so make sure it is passed local variables or parameters only. -+ */ -+static long -+tw_candidate (tree node) -+{ -+ long rv = 0; -+ -+ if (!node || TREE_TYPE (node) == error_mark_node) -+ return 0; -+ -+ if (node && TREE_TYPE (node) != error_mark_node && -+ ((TREE_CODE (node) == VAR_DECL && -+ /* See note: Initialized statics should not be widened. */ -+ (!TREE_STATIC (node) || !DECL_INITIAL (node))) || -+ TREE_CODE (node) == PARM_DECL || -+ TREE_CODE (node) == DEBUG_EXPR_DECL) && -+ !TYPE_VOLATILE (TREE_TYPE (node)) && -+ !TREE_ADDRESSABLE (node) && -+ !POINTER_TYPE_P (TREE_TYPE (node)) && -+ INTEGRAL_TYPE_P (TREE_TYPE (node)) && -+ !TYPE_UNSIGNED (TREE_TYPE (node)) && -+ (TYPE_PRECISION (TREE_TYPE (node)) < TYPE_PRECISION (long_integer_type_node))) -+ rv = 1; -+ return rv; -+} -+ -+static long -+tw_candidate_const (tree node) -+{ -+ long rv = 0; -+ -+ if (node && TREE_TYPE (node) != error_mark_node && -+ INTEGRAL_TYPE_P (TREE_TYPE (node)) && -+ TREE_CONSTANT (node) && -+ (TYPE_PRECISION (TREE_TYPE (node)) < TYPE_PRECISION (long_integer_type_node))) -+ rv = 1; -+ return rv; -+} -+ -+static long * -+tw_log_candidate (tree node) -+{ -+ long *pval = NULL; -+ -+ if (tw_candidate_list && node && TREE_TYPE (node) != error_mark_node) -+ { -+ pval = (long *) pointer_map_contains (tw_candidate_list, node); -+ if (!pval) -+ { -+ pval = (long *) pointer_map_insert (tw_candidate_list, node); -+ *pval = 1; -+ TWDBG_MSG ("Logged variable:\n"); -+ TWDBG_TREE (node); -+ } -+ } -+ return pval; -+} -+ -+static long -+tw_candidacy_valid (tree node) -+{ -+ long rval = 0; -+ long *pval = NULL; -+ -+ if (tw_candidate_list && node && TREE_TYPE (node) != error_mark_node) -+ pval = (long *) pointer_map_contains (tw_candidate_list, node); -+ if (pval) -+ rval = *pval ? 1 : 0; -+ return rval; -+} -+ -+static void -+tw_candidacy (tree node, long value) -+{ -+ long *pval; -+ -+ if (tw_candidate_list && node) -+ { -+ pval = (long *) pointer_map_contains (tw_candidate_list, node); -+ if (pval) -+ { -+ *pval = value; -+#if TW_DEBUG -+ fprintf (stderr, "Setting candidacy of node:\n"); -+ TWDBG_TREE (node); -+ fprintf (stderr, "to: %ld\n", value); -+#endif -+ } -+ } -+} -+ -+static long -+tw_in_candidate_list (tree node) -+{ -+ long *pval; -+ long rval = 0; -+ -+ if (tw_candidate_list && node && TREE_TYPE (node) != error_mark_node) -+ { -+ pval = (long *) pointer_map_contains (tw_candidate_list, node); -+ rval = pval ? 1 : 0; -+ } -+ return rval; -+} -+ -+static tree -+tw_widen_constant (tree node) -+{ -+ if (node && tw_candidate_const (node)) -+ node = build_int_cst (long_integer_type_node, TREE_INT_CST_LOW (node)); -+ -+ return node; -+} -+ -+static tree -+tw_widen_variable (tree node) -+{ -+ if (node && tw_candidacy_valid (node)) -+ { -+ TWDBG_MSG ("Widening:\n"); -+ TWDBG_TREE(node); -+ -+ TREE_TYPE (node) = build_qualified_type (long_integer_type_node, -+ TYPE_QUALS (TREE_TYPE (node))); -+ -+ if (TREE_CODE (node) != DEBUG_EXPR_DECL) -+ relayout_decl (node); -+ } -+ return node; -+} -+ -+#ifdef TW_FINALIZE_STMTS -+static long -+tw_fn_has_openmp (gimple_seq stmts) -+{ -+ gimple_stmt_iterator ittr; -+ long found_openmp = 0; -+ -+ for (ittr = gsi_start (stmts); !gsi_end_p (ittr) && !found_openmp; gsi_next (&ittr)) -+ { -+ gimple stmt = gsi_stmt (ittr); -+ -+ switch (gimple_code (stmt)) -+ { -+ case GIMPLE_BIND: -+ found_openmp = tw_fn_has_openmp (gimple_bind_body (stmt)); -+ break; -+ -+ case GIMPLE_TRY: -+ found_openmp = tw_fn_has_openmp (gimple_try_eval (stmt)); -+ found_openmp = tw_fn_has_openmp (gimple_try_cleanup (stmt)); -+ break; -+ -+ case GIMPLE_EH_FILTER: -+ found_openmp = tw_fn_has_openmp (gimple_eh_filter_failure (stmt)); -+ break; -+ -+ case GIMPLE_CATCH: -+ found_openmp = tw_fn_has_openmp (gimple_catch_handler (stmt)); -+ break; -+ -+ default: -+ switch (gimple_code (stmt)) -+ { -+ CASE_GIMPLE_OMP: -+ found_openmp = 1; -+ break; -+ default: -+ break; -+ } -+ } -+ } -+ return found_openmp; -+} -+#endif -+ -+/* Originally, we implemented type widening over the emitted GIMPLE -+ * sequence. Later on, we discovered that we needed to wait till -+ * after OpenMP expansion, so we implemented type widening over the -+ * CFG-BB form. -+ */ -+#ifdef TW_FINALIZE_STMTS -+struct gimple_opt_pass pass_widen_types_stmts = -+{ -+ { -+ GIMPLE_PASS, -+ "tw-stmts", /* name */ -+ NULL, /* gate */ -+ tw_finalize_stmts, /* execute */ -+ NULL, /* sub */ -+ NULL, /* next */ -+ 0, /* static_pass_number */ -+ TV_NONE, /* tv_id */ -+ PROP_gimple_any, /* properties_required */ -+ 0, /* properties_provided */ -+ 0, /* properties_destroyed */ -+ 0, /* todo_flags_start */ -+ TODO_dump_func /* todo_flags_finish */ -+ } -+}; -+#endif -+ -+struct gimple_opt_pass pass_widen_types_bbs = -+{ -+ { -+ GIMPLE_PASS, -+ "tw-bbs", /* name */ -+ NULL, /* gate */ -+ tw_finalize_bbs, /* execute */ -+ NULL, /* sub */ -+ NULL, /* next */ -+ 0, /* static_pass_number */ -+ TV_NONE, /* tv_id */ -+ PROP_gimple_any, /* properties_required */ -+ 0, /* properties_provided */ -+ 0, /* properties_destroyed */ -+ 0, /* todo_flags_start */ -+ TODO_dump_func /* todo_flags_finish */ -+ } -+}; -+ -+static -+void -+tw_log_parms (tree fndecl) -+{ -+ tree parm; -+ -+ if (!fndecl) -+ return; -+ for (parm = DECL_ARGUMENTS (fndecl); parm; parm = DECL_CHAIN (parm)) -+ if (tw_candidate (parm)) -+ tw_log_candidate (parm); -+ return; -+} -+ -+#ifdef TW_FINALIZE_STMTS -+static -+void -+tw_log_vars (gimple_seq stmts) -+{ -+ gimple_stmt_iterator ittr; -+ tree vars, vindex; -+ -+ if (!stmts) -+ return; -+ -+ gcc_assert (tw_candidate_list != NULL); -+ -+ for (ittr = gsi_start (stmts); !gsi_end_p (ittr); gsi_next (&ittr)) -+ { -+ gimple stmt = gsi_stmt (ittr); -+ -+ switch (gimple_code (stmt)) -+ { -+ case GIMPLE_BIND: -+ vars = gimple_bind_vars (stmt); -+ for (vindex = vars; vindex; vindex = DECL_CHAIN (vindex)) -+ if (tw_candidate (vindex)) -+ tw_log_candidate (vindex); -+ tw_log_vars (gimple_bind_body (stmt)); -+ break; -+ -+ case GIMPLE_TRY: -+ tw_log_vars (gimple_try_eval (stmt)); -+ tw_log_vars (gimple_try_cleanup (stmt)); -+ break; -+ -+ case GIMPLE_EH_FILTER: -+ tw_log_vars (gimple_eh_filter_failure (stmt)); -+ break; -+ -+ case GIMPLE_CATCH: -+ tw_log_vars (gimple_catch_handler (stmt)); -+ break; -+ -+ default: -+ break; -+ } -+ } -+ -+ return; -+} -+#endif -+ -+static -+void -+tw_log_local_decls (void) -+{ -+ tree decl; -+ unsigned ix; -+ -+ FOR_EACH_LOCAL_DECL (cfun, ix, decl) -+ { -+ TWDBG_MSG ("Testing decl:\n"); -+ TWDBG_TREE (decl); -+ if (tw_candidate (decl)) -+ tw_log_candidate (decl); -+ } -+} -+ -+/* Widen types. tw_finalize_stmts () can be run anytime immediately after -+ * gimplification but before the CFG pass (see comment * accompanying -+ * gimple_body ()). -+ * -+ * After gimplification has occurred, the emitted GIMPLE is -+ * scanned to check if these variables are only used among -+ * themselves (with the exception of being cast to unsigned long); -+ * invalidating the candidacy of any variable that is used with -+ * another outside this set (and so on recursively). The variables -+ * that remain after this process all occur in operations with other -+ * such candidate variables, (or with constants) - the type of all -+ * such residual candidate variables (and of constants that appear -+ * with these in operations) is changed to long (along with the -+ * original accompannying qualifiers on the type). -+ * -+ * void -+ * init_optimization_passes (void) -+ * -+ * p = &all_lowering_passes; -+ * NEXT_PASS (pass_widen_types_stmts); -+ * NEXT_PASS (pass_warn_unused_result); -+ */ -+#ifdef TW_FINALIZE_STMTS -+static -+unsigned int -+tw_finalize_stmts (void) -+{ -+ long iv = 0; -+ gimple_seq stmts; -+ tree fndecl = current_function_decl; -+ -+ if (strcmp (lang_hooks.name, "GNU C") != 0 || -+ seen_error () || -+ !flag_strict_overflow || -+ !flag_widen_types) -+ { -+ TWDBG_MSG ("Skipping: Language not C or seen error or -fno-strict-overflow or -fno-widen-types\n"); -+ return 0; -+ } -+ -+ /* gcc.dg/pr23518.c execution test */ -+ if (flag_wrapv) -+ { -+ TWDBG_MSG ("Skipping: -fwrapv specified.\n"); -+ return 0; -+ } -+ -+ if (debug_info_level == DINFO_LEVEL_NONE) -+ { -+ /* PS: That we cannot call relayout_decl () on DEBUG_EXPR_DECL is an -+ * issue: Debug information is generated after lowering from tree to -+ * GIMPLE; unless we widen before debug information is generated, the -+ * debug information will record pre-widening information - and that -+ * cannot be changed because relayout_decl () cannot be invoked on -+ * DEBUG_EXPR_DECL. expand_debug_locations () during cfgexpand will -+ * fail gcc_assert ()'s on the DEBUG_INSN's since e.g. the modes will -+ * not agree, etc. So if we are compiling -g, we ought to run the -+ * pass_widen_types_stmts. -+ * -+ * In short: pass_widen_types_stmts runs iff we're generating debug -+ * information. -+ */ -+ TWDBG_MSG ("Skipping: Debug level none.\n"); -+ return 0; -+ } -+ gcc_assert (debug_info_level != DINFO_LEVEL_NONE); -+ -+ if (!fndecl) -+ { -+ TWDBG_MSG ("Skipping: !fndecl.\n"); -+ return 0; -+ } -+ -+ TWDBG_MSG ("Widening function:\n"); -+ TWDBG_TREE (fndecl); -+ -+ stmts = gimple_body (fndecl); -+ -+ if (!stmts) -+ { -+ TWDBG_MSG ("Skipping: !stmts.\n"); -+ return 0; -+ } -+ -+ if (tw_fn_has_openmp (stmts)) -+ { -+ TWDBG_MSG ("Skipping: OpenMP stmts found.\n"); -+ return 0; -+ } -+ -+ /* Assume for now that we do not need to check for nested functions: -+ * (cgraph_get_node (fndecl) && cgraph_get_node (fndecl)->nested != NULL) || -+ * TREE_CODE (DECL_CONTEXT (fndecl)) != TRANSLATION_UNIT_DECL || -+ * Well, turns out that a nested function is processed only if it is -+ * actually invoked from within the function, so we are in good shape. -+ */ -+ -+ tw_init (); -+ tw_log_parms (fndecl); -+ tw_log_vars (stmts); -+#if TW_DEBUG -+ tw_dump_candidate_list (); -+#endif -+ -+ do -+ { -+ iv = tw_gimple_in_seq (stmts, 0); -+ } while (iv); -+ tw_gimple_in_seq (stmts, 1); -+ verify_types_in_gimple_seq (stmts); -+ -+ tw_reset (); -+ -+ return 0; -+} -+#endif -+ -+static -+unsigned int -+tw_finalize_bbs (void) -+{ -+ long iv = 0; -+ basic_block bb; -+ tree fndecl; -+ -+ if (strcmp (lang_hooks.name, "GNU C") != 0 || -+ seen_error () || -+ !flag_strict_overflow || -+ !flag_widen_types) -+ { -+ TWDBG_MSG ("Skipping: Language not C or seen error or -fno-strict-overflow or -fno-widen-types\n"); -+ return 0; -+ } -+ -+ /* gcc.dg/pr23518.c execution test */ -+ if (flag_wrapv) -+ { -+ TWDBG_MSG ("Skipping: -fwrapv specified.\n"); -+ return 0; -+ } -+ -+ if (debug_info_level != DINFO_LEVEL_NONE && flag_openmp) -+ { -+ /* Cannot run this pass as the debug information has already -+ * been recorded; If we type widen now, it'll lead to assert -+ * failures during RTL expansion in expandcfg.c since the -+ * debug information would all be prewidening and would -+ * mismatch with the postwidening information for the variables -+ * that got widened (but whoose debug information was already -+ * generated). This is all because we cannot call relayout_decl () -+ * on DEBUG_EXPR_DECL's - see note elsewhere. -+ */ -+ TWDBG_MSG ("Skipping: Non-zero debug level and -fopenmp specified.\n"); -+ return 0; -+ } -+ -+ if (!cfun || !(fndecl = cfun->decl) || !(cfun->cfg)) -+ { -+ TWDBG_MSG ("Skipping: !cfun or !fndecl or !(cfun->cfg).\n"); -+ return 0; -+ } -+ -+ TWDBG_MSG ("Widening function:\n"); -+ TWDBG_TREE (fndecl); -+ -+ /* Assume for now that we do not need to check for nested functions: -+ * (cgraph_get_node (fndecl) && cgraph_get_node (fndecl)->nested != NULL) || -+ * TREE_CODE (DECL_CONTEXT (fndecl)) != TRANSLATION_UNIT_DECL || -+ * Well, turns out that a nested function is processed only if it is -+ * actually invoked from within the function, so we are in good shape. -+ */ -+ -+ tw_init (); -+ tw_log_parms (fndecl); -+ tw_log_local_decls (); -+#if TW_DEBUG -+ tw_dump_candidate_list (); -+#endif -+ -+ do -+ { -+ iv = 0; -+ FOR_EACH_BB (bb) -+ iv += tw_gimple_in_bb (bb, 0); -+ } while (iv); -+ FOR_EACH_BB (bb) -+ tw_gimple_in_bb (bb, 1); -+ FOR_EACH_BB (bb) -+ verify_types_in_gimple_seq (bb_seq (bb)); -+ -+ tw_reset (); -+ -+ return 0; -+} -+ -+/* Assumes that we have run verify_gimple_in_seq (stmts) -+ * i.e. that we have valid gimple. -+ */ -+static long -+tw_gimple_in_seq (gimple_seq stmts, long widen) -+{ -+ gimple_stmt_iterator ittr; -+ long iv = 0; -+ -+ for (ittr = gsi_start (stmts); !gsi_end_p (ittr); gsi_next (&ittr)) -+ { -+ gimple stmt = gsi_stmt (ittr); -+ iv += tw_switch (stmt, widen); -+ } -+ return iv; -+} -+ -+static long -+tw_gimple_in_bb (basic_block bb, long widen) -+{ -+ gimple_stmt_iterator ittr; -+ long iv = 0; -+ -+#if TW_DEBUG -+ fprintf (stderr, "Dumping basic block (widen = %ld):\n", widen); -+ debug_bb (bb); -+ fprintf (stderr, "Done dumping basic block (widen = %ld)\n", widen); -+#endif -+ for (ittr = gsi_start_bb (bb); !gsi_end_p (ittr); gsi_next (&ittr)) -+ { -+ gimple stmt = gsi_stmt (ittr); -+ iv += tw_switch (stmt, widen); -+ } -+ return iv; -+} -+ -+static long -+tw_switch (gimple stmt, long widen) -+{ -+ long iv = 0; -+ -+ switch (gimple_code (stmt)) -+ { -+ case GIMPLE_BIND: -+ iv += tw_gimple_in_seq (gimple_bind_body (stmt), widen); -+ break; -+ -+ case GIMPLE_TRY: -+ iv += tw_gimple_in_seq (gimple_try_eval (stmt), widen); -+ iv += tw_gimple_in_seq (gimple_try_cleanup (stmt), widen); -+ break; -+ -+ case GIMPLE_EH_FILTER: -+ iv += tw_gimple_in_seq (gimple_eh_filter_failure (stmt), widen); -+ break; -+ -+ case GIMPLE_CATCH: -+ iv += tw_gimple_in_seq (gimple_catch_handler (stmt), widen); -+ break; -+ -+ default: -+ iv += tw_gimple_stmt (stmt, widen); -+ break; -+ } -+ return iv; -+} -+ -+/* tw_gimple_stmt () mimics verify_gimple_stmt () -+ */ -+static long -+tw_gimple_stmt (gimple stmt, long widen) -+{ -+ long iv = 0; -+ -+ switch (gimple_code (stmt)) -+ { -+ case GIMPLE_ASSIGN: -+ iv = tw_gimple_assign (stmt, widen); -+ break; -+ -+ case GIMPLE_CALL: -+ iv = tw_gimple_call (stmt, widen); -+ break; -+ -+ case GIMPLE_COND: -+ iv = tw_gimple_comparison (stmt, widen); -+ break; -+ -+ case GIMPLE_SWITCH: -+ iv = tw_gimple_switch (stmt, widen); -+ break; -+ -+ case GIMPLE_RETURN: -+ iv = tw_gimple_return (stmt, widen); -+ break; -+ -+ case GIMPLE_LABEL: -+ TWDBG_STMT(stmt); -+ break; -+ -+ case GIMPLE_GOTO: -+ TWDBG_STMT(stmt); -+ break; -+ -+ case GIMPLE_ASM: -+ iv = tw_gimple_asm (stmt, widen); -+ break; -+ -+ /* Tuples that do not have tree operands. */ -+ case GIMPLE_NOP: -+ case GIMPLE_PREDICT: -+ case GIMPLE_RESX: -+ case GIMPLE_EH_DISPATCH: -+ case GIMPLE_EH_MUST_NOT_THROW: -+ TWDBG_STMT(stmt); -+ break; -+ -+ CASE_GIMPLE_OMP: -+ TWDBG_STMT(stmt); -+ break; -+ -+ case GIMPLE_DEBUG: -+ iv = tw_gimple_debug (stmt, widen); -+ break; -+ -+ default: -+ gcc_unreachable (); -+ } -+ return iv; -+} -+ -+static long -+tw_gimple_assign (gimple stmt, long widen) -+{ -+ long iv = 0; -+ -+ switch (gimple_assign_rhs_class (stmt)) -+ { -+ case GIMPLE_SINGLE_RHS: -+ iv = tw_gimple_assign_single (stmt, widen); -+ break; -+ -+ case GIMPLE_UNARY_RHS: -+ iv = tw_gimple_assign_unary (stmt, widen); -+ break; -+ -+ case GIMPLE_BINARY_RHS: -+ iv = tw_gimple_assign_binary (stmt, widen); -+ break; -+ -+ case GIMPLE_TERNARY_RHS: -+ iv = tw_gimple_assign_ternary (stmt, widen); -+ break; -+ -+ default: -+ gcc_unreachable (); -+ } -+ return iv; -+} -+ -+static long -+tw_gimple_assign_single (gimple stmt, long widen) -+{ -+ tree lhs = gimple_assign_lhs (stmt); -+ tree rhs1 = gimple_assign_rhs1 (stmt); -+ tree value; -+ long iv = 0; -+ unsigned int idx; -+ -+ TWDBG_STMT(stmt); -+ TWDBG_TREE(lhs); -+ TWDBG_TREE(rhs1); -+ -+ if (widen) -+ { -+ TWDBG_MSG ("Widening run.\n"); -+ if (TREE_CODE (rhs1) == ARRAY_REF && -+ tw_candidacy_valid (TREE_OPERAND (rhs1, 1))) -+ { -+ /* Note that we are widening the array index, hence no -+ * gimple_assign_set_rhs1 () */ -+ tw_widen_variable (TREE_OPERAND (rhs1, 1)); -+ } -+ else if (TREE_CODE (lhs) == ARRAY_REF && -+ tw_candidacy_valid (TREE_OPERAND (lhs, 1))) -+ { -+ /* Note that we are widening the array index, hence no -+ * gimple_assign_set_lhs () */ -+ tw_widen_variable (TREE_OPERAND (lhs, 1)); -+ } -+ else if (tw_candidacy_valid (lhs) && tw_candidate_const (rhs1)) -+ { -+ gimple_assign_set_lhs (stmt, tw_widen_variable (lhs)); -+ gimple_assign_set_rhs1 (stmt, tw_widen_constant (rhs1)); -+ } -+ else if (tw_candidacy_valid (lhs) && tw_candidacy_valid (rhs1)) -+ { -+ gimple_assign_set_lhs (stmt, tw_widen_variable (lhs)); -+ gimple_assign_set_rhs1 (stmt, tw_widen_variable (rhs1)); -+ } -+ } -+ else -+ { -+ TWDBG_MSG ("Validating run.\n"); -+ if (tw_candidacy_valid (lhs) && tw_candidate_const (rhs1)) -+ return iv; -+ if (tw_candidacy_valid (lhs) && tw_candidacy_valid (rhs1)) -+ return iv; -+ if (TREE_CODE (lhs) == VAR_DECL && TREE_CODE (TREE_TYPE (lhs)) == VECTOR_TYPE && -+ TREE_CODE (rhs1) == CONSTRUCTOR && TREE_CODE (TREE_TYPE (rhs1)) == VECTOR_TYPE) -+ { -+ FOR_EACH_CONSTRUCTOR_VALUE (CONSTRUCTOR_ELTS (rhs1), idx, value) -+ { -+ if (tw_candidacy_valid (value)) -+ { -+ TWDBG_MSG ("Invalidating candidacy of constructor element:\n"); -+ TWDBG_TREE (value); -+ tw_candidacy (value, 0); -+ iv++; -+ } -+ } -+ } -+ if (tw_candidacy_valid (lhs)) -+ { -+ tw_candidacy (lhs, 0); -+ iv++; -+ } -+ if (tw_candidacy_valid (rhs1)) -+ { -+ tw_candidacy (rhs1, 0); -+ iv++; -+ } -+ } -+ return iv; -+} -+ -+static long -+tw_gimple_assign_unary (gimple stmt, long widen) -+{ -+ tree lhs = gimple_assign_lhs (stmt); -+ tree rhs1 = gimple_assign_rhs1 (stmt); -+ long iv = 0; -+ -+ TWDBG_STMT(stmt); -+ TWDBG_TREE(lhs); -+ TWDBG_TREE(rhs1); -+ -+ if (widen) -+ { -+ TWDBG_MSG ("Widening run.\n"); -+ if (gimple_assign_rhs_code (stmt) == NOP_EXPR && -+ tw_candidacy_valid (rhs1) && -+ (TREE_TYPE (lhs) == long_unsigned_type_node || -+ TREE_TYPE (lhs) == long_integer_type_node)) -+ gimple_assign_set_rhs1 (stmt, tw_widen_variable (rhs1)); -+ } -+ else -+ { -+ TWDBG_MSG ("Validating run.\n"); -+ if (gimple_assign_rhs_code (stmt) == NOP_EXPR && -+ tw_candidacy_valid (rhs1) && -+ (TREE_TYPE (lhs) == long_unsigned_type_node || -+ TREE_TYPE (lhs) == long_integer_type_node)) -+ return iv; -+ if (tw_candidacy_valid (lhs)) -+ { -+ tw_candidacy (lhs, 0); -+ iv++; -+ } -+ if (tw_candidacy_valid (rhs1)) -+ { -+ tw_candidacy (rhs1, 0); -+ iv++; -+ } -+ } -+ return iv; -+} -+ -+static long -+tw_gimple_assign_binary (gimple stmt, long widen) -+{ -+ tree lhs = gimple_assign_lhs (stmt); -+ tree rhs1 = gimple_assign_rhs1 (stmt); -+ tree rhs2 = gimple_assign_rhs2 (stmt); -+ long iv = 0; -+ -+ TWDBG_STMT(stmt); -+ TWDBG_TREE(lhs); -+ TWDBG_TREE(rhs1); -+ TWDBG_TREE(rhs2); -+ -+ if (widen) -+ { -+ TWDBG_MSG ("Widening run.\n"); -+ if (tw_candidacy_valid (lhs) && tw_candidacy_valid (rhs1) && tw_candidate_const (rhs2)) -+ { -+ gimple_assign_set_lhs (stmt, tw_widen_variable (lhs)); -+ gimple_assign_set_rhs1 (stmt, tw_widen_variable (rhs1)); -+ gimple_assign_set_rhs2 (stmt, tw_widen_constant (rhs2)); -+ } -+ else if (tw_candidacy_valid (lhs) && tw_candidacy_valid (rhs1) && tw_candidacy_valid (rhs2)) -+ { -+ gimple_assign_set_lhs (stmt, tw_widen_variable (lhs)); -+ gimple_assign_set_rhs1 (stmt, tw_widen_variable (rhs1)); -+ gimple_assign_set_rhs2 (stmt, tw_widen_variable (rhs2)); -+ } -+ } -+ else -+ { -+ TWDBG_MSG ("Validating run.\n"); -+ if (tw_candidacy_valid (lhs) && tw_candidacy_valid (rhs1) && tw_candidate_const (rhs2)) -+ return iv; -+ if (tw_candidacy_valid (lhs) && tw_candidacy_valid (rhs1) && tw_candidacy_valid (rhs2)) -+ return iv; -+ if (tw_candidacy_valid (lhs)) -+ { -+ tw_candidacy (lhs, 0); -+ iv++; -+ } -+ if (tw_candidacy_valid (rhs1)) -+ { -+ tw_candidacy (rhs1, 0); -+ iv++; -+ } -+ if (tw_candidacy_valid (rhs2)) -+ { -+ tw_candidacy (rhs2, 0); -+ iv++; -+ } -+ } -+ return iv; -+} -+ -+static long -+tw_gimple_assign_ternary (gimple stmt, long widen) -+{ -+ tree lhs = gimple_assign_lhs (stmt); -+ tree rhs1 = gimple_assign_rhs1 (stmt); -+ tree rhs2 = gimple_assign_rhs2 (stmt); -+ tree rhs3 = gimple_assign_rhs3 (stmt); -+ long iv = 0; -+ -+ TWDBG_STMT(stmt); -+ TWDBG_TREE(lhs); -+ TWDBG_TREE(rhs1); -+ TWDBG_TREE(rhs2); -+ TWDBG_TREE(rhs3); -+ -+ if (widen) -+ { -+ TWDBG_MSG ("Widening run.\n"); -+ return iv; -+ } -+ -+ TWDBG_MSG ("Validating run.\n"); -+ if (tw_candidacy_valid (lhs)) -+ { -+ tw_candidacy (lhs, 0); -+ iv++; -+ } -+ if (tw_candidacy_valid (rhs1)) -+ { -+ tw_candidacy (rhs1, 0); -+ iv++; -+ } -+ if (tw_candidacy_valid (rhs2)) -+ { -+ tw_candidacy (rhs2, 0); -+ iv++; -+ } -+ if (tw_candidacy_valid (rhs3)) -+ { -+ tw_candidacy (rhs3, 0); -+ iv++; -+ } -+ return iv; -+} -+ -+/* Ref. WG14/N1256 Committee Draft - September 7, 2007 ISO/IEC 9899:TC3 -+ * 7.19.6 Formatted input/output functions -+ * Sec. 17.19.6.[1 ... 14] -+ */ -+#define IO_FN_COUNT 14 -+static const char *IO_fn_names[IO_FN_COUNT] = -+{ -+ "fprintf", "fscanf", -+ "printf", "scanf", -+ "snprintf", -+ "sprintf", "sscanf", -+ "vfprintf", "vfscanf", -+ "vprintf", "vscanf", -+ "vsnprintf", -+ "vsprintf", "vsscanf", -+}; -+ -+static bool -+is_formatted_IO_fn (tree decl) -+{ -+ const char *fn_name; -+ long i; -+ -+ if (decl && TREE_CODE (decl) == FUNCTION_DECL && -+ DECL_NAME (decl) /* TREE_CODE (decl) == IDENTIFIER_NODE */ && -+ (fn_name = IDENTIFIER_POINTER (DECL_NAME (decl)))) -+ { -+ for (i = 0; i < IO_FN_COUNT; i++) -+ if (strcmp (IO_fn_names[i], fn_name) == 0) -+ return true; -+ } -+ return false; -+} -+ -+/* TODO: If you have: -+ * -+ * int i, n, f(); -+ * -+ * n = f(); -+ * -+ * for (i = 0; i < n; i++) -+ * // stuff -+ * -+ * then (after the candidate set stabilizes) do: -+ * -+ * int n, f(); -+ * long twl.n; -+ * -+ * n = f(); -+ * twl.n = (long) n; -+ * -+ * for (i = 0; i < twl.n; i++) -+ * // stuff -+ * -+ * only if adding twl.n does not decrease the size of the stabilized -+ * candidate set or "cause any other damage". -+ * -+ * This should help in benchmarks where parameters are set via function -+ * calls to prevent them from being optimized away. -+ * -+ */ -+static long -+tw_gimple_call (gimple stmt, long widen) -+{ -+#if TW_DEBUG -+ tree fn = gimple_call_fn (stmt); -+#endif -+ long iv = 0; -+ unsigned i; -+ tree arg; -+ -+ TWDBG_STMT(stmt); -+ TWDBG_TREE(fn); -+ TWDBG_TREE(gimple_call_fndecl (stmt)); -+ -+ if (widen) -+ { -+ TWDBG_MSG ("Widening run.\n"); -+ for (i = 0; i < gimple_call_num_args (stmt); i++) -+ { -+ arg = gimple_call_arg (stmt, i); -+ if (arg && tw_candidacy_valid (arg)) -+ gimple_call_set_arg (stmt, i, tw_widen_variable (arg)); -+ } -+ return iv; -+ } -+ -+ TWDBG_MSG ("Validating run.\n"); -+ if (gimple_call_lhs (stmt) && tw_candidacy_valid (gimple_call_lhs (stmt))) -+ { -+ tw_candidacy (gimple_call_lhs (stmt), 0); -+ iv++; -+ } -+ if (gimple_call_fndecl (stmt) && -+ (is_builtin_fn (gimple_call_fndecl (stmt)) || -+ is_formatted_IO_fn (gimple_call_fndecl (stmt)))) -+ { -+ /* Certain types of function (printf-scanf family, -+ * formatted IO functions, builtin functions) ought -+ * not to have their args widened. -+ * -+ * e.g. A call to printf () such as: -+ * int x; -+ * printf ("%d", x); -+ * because, we cannot change the %d to a %ld. -+ * -+ * or e.g. in: -+ * -+ * int D.2852; -+ * int si; -+ * -+ * si = 2; -+ * __builtin_altivec_dst (&vi, si, 0); -+ * D.2852 = 0; -+ * -+ * si should not be widened. -+ * -+ * PS: We could generate code for casts to their original types in the -+ * call, but that would slow-down performance and we do not expect -+ * a loop index to be used in a call to a formatted IO function. -+ */ -+ for (i = 0; i < gimple_call_num_args (stmt); i++) -+ { -+ arg = gimple_call_arg (stmt, i); -+ if (arg && tw_candidacy_valid (arg)) -+ { -+ tw_candidacy (arg, 0); -+ iv++; -+ } -+ } -+ } -+ return iv; -+} -+ -+static long -+tw_gimple_comparison (gimple stmt, long widen) -+{ -+ tree lhs = gimple_cond_lhs (stmt); -+ tree rhs = gimple_cond_rhs (stmt); -+ long iv = 0; -+ -+ TWDBG_STMT(stmt); -+ TWDBG_TREE(lhs); -+ TWDBG_TREE(rhs); -+ -+ if (widen) -+ { -+ TWDBG_MSG ("Widening run.\n"); -+ if (tw_candidacy_valid (lhs) && tw_candidate_const (rhs)) -+ { -+ gimple_cond_set_lhs (stmt, tw_widen_variable (lhs)); -+ gimple_cond_set_rhs (stmt, tw_widen_constant (rhs)); -+ } -+ else if (tw_candidate_const (lhs) && tw_candidacy_valid (rhs)) -+ { -+ gimple_cond_set_lhs (stmt, tw_widen_constant (lhs)); -+ gimple_cond_set_rhs (stmt, tw_widen_variable (rhs)); -+ } -+ else if (tw_candidacy_valid (lhs) && tw_candidacy_valid (rhs)) -+ { -+ gimple_cond_set_lhs (stmt, tw_widen_variable (lhs)); -+ gimple_cond_set_rhs (stmt, tw_widen_variable (rhs)); -+ } -+ } -+ else -+ { -+ TWDBG_MSG ("Validating run.\n"); -+ if (tw_candidacy_valid (lhs) && tw_candidate_const (rhs)) -+ return iv; -+ if (tw_candidate_const (lhs) && tw_candidacy_valid (rhs)) -+ return iv; -+ if (tw_candidacy_valid (lhs) && tw_candidacy_valid (rhs)) -+ return iv; -+ if (tw_candidacy_valid (lhs)) -+ { -+ tw_candidacy (lhs, 0); -+ iv++; -+ } -+ if (tw_candidacy_valid (rhs)) -+ { -+ tw_candidacy (rhs, 0); -+ iv++; -+ } -+ } -+ return iv; -+} -+ -+static long -+tw_gimple_switch (gimple stmt, long widen) -+{ -+ tree index = gimple_switch_index (stmt); -+ long iv = 0; -+ -+ TWDBG_STMT(stmt); -+ TWDBG_TREE(index); -+ -+ if (widen && tw_candidacy_valid (index)) -+ { -+ TWDBG_MSG ("Widening run.\n"); -+ gimple_switch_set_index (stmt, tw_widen_variable (index)); -+ return iv; -+ } -+ -+ TWDBG_MSG ("Validating run.\n"); -+ return iv; -+} -+ -+static long -+tw_gimple_return (gimple stmt, long widen) -+{ -+ tree op = gimple_return_retval (stmt); -+ long iv = 0; -+ -+ TWDBG_STMT(stmt); -+ TWDBG_TREE(op); -+ -+ if (widen) -+ { -+ TWDBG_MSG ("Widening run.\n"); -+ return iv; -+ } -+ -+ TWDBG_MSG ("Validating run.\n"); -+ if (tw_candidacy_valid (op)) -+ { -+ tw_candidacy (op, 0); -+ iv++; -+ } -+ return iv; -+} -+ -+static long -+tw_gimple_asm (gimple stmt, long widen) -+{ -+ long iv = 0; -+ unsigned int ninputs = gimple_asm_ninputs (stmt); -+ unsigned int noutputs = gimple_asm_noutputs (stmt); -+ unsigned int nclobbers = gimple_asm_nclobbers (stmt); -+ unsigned int i; -+ -+ TWDBG_STMT(stmt); -+ TWDBG_MSG("Inputs:\n"); -+ for (i = 0; i < ninputs; i++) -+ { -+ TWDBG_MSG1 ("input %d\n", i); -+ TWDBG_TREE (gimple_asm_input_op (stmt, i)); -+ } -+ TWDBG_MSG("Outputs:\n"); -+ for (i = 0; i < noutputs; i++) -+ { -+ TWDBG_MSG1 ("output %d\n", i); -+ TWDBG_TREE (gimple_asm_output_op (stmt, i)); -+ } -+ TWDBG_MSG("Clobbers:\n"); -+ for (i = 0; i < nclobbers; i++) -+ { -+ TWDBG_MSG1 ("clobber %d\n", i); -+ TWDBG_TREE (gimple_asm_clobber_op (stmt, i)); -+ } -+ if (widen) -+ { -+ TWDBG_MSG ("Widening run.\n"); -+ return iv; -+ } -+ TWDBG_MSG ("Validating run.\n"); -+ for (i = 0; i < ninputs; i++) -+ { -+ if (tw_candidacy_valid (gimple_asm_input_op (stmt, i))) -+ { -+ tw_candidacy (gimple_asm_input_op (stmt, i), 0); -+ iv++; -+ } -+ } -+ for (i = 0; i < noutputs; i++) -+ { -+ if (tw_candidacy_valid (gimple_asm_output_op (stmt, i))) -+ { -+ tw_candidacy (gimple_asm_output_op (stmt, i), 0); -+ iv++; -+ } -+ } -+ for (i = 0; i < nclobbers; i++) -+ { -+ if (tw_candidacy_valid (gimple_asm_clobber_op (stmt, i))) -+ { -+ tw_candidacy (gimple_asm_clobber_op (stmt, i), 0); -+ iv++; -+ } -+ } -+ return iv; -+} -+ -+static long -+tw_gimple_debug (gimple stmt, long widen) -+{ -+ long iv = 0; -+ tree var, value; -+ -+ var = gimple_debug_bind_get_var (stmt); -+ value = gimple_debug_bind_get_value (stmt); -+ -+ TWDBG_STMT(stmt); -+ TWDBG_TREE(var); -+ TWDBG_TREE(value); -+ -+ /* TODO: What if the value is a constant? */ -+ -+ if (widen) -+ { -+ TWDBG_MSG ("Widening run.\n"); -+ if (tw_candidacy_valid (var) && tw_candidacy_valid (value)) -+ { -+ gimple_debug_bind_set_var (stmt, tw_widen_variable (var)); -+ gimple_debug_bind_set_value (stmt, tw_widen_variable (value)); -+ } -+ else if (tw_candidacy_valid (var) && tw_candidate_const (value)) -+ { -+ gimple_debug_bind_set_var (stmt, tw_widen_variable (var)); -+ gimple_debug_bind_set_value (stmt, tw_widen_constant (value)); -+ } -+ } -+ else -+ { -+ TWDBG_MSG ("Validating run.\n"); -+ -+ if (var && !tw_in_candidate_list (var) && tw_candidate (var)) -+ tw_log_candidate (var); -+ if (value && !tw_in_candidate_list (value) && tw_candidate (value)) -+ tw_log_candidate (value); -+ if (tw_candidacy_valid (var) && tw_candidacy_valid (value)) -+ return iv; -+ if (tw_candidacy_valid (var)) -+ { -+ tw_candidacy (var, 0); -+ iv++; -+ } -+ if (tw_candidacy_valid (value)) -+ { -+ tw_candidacy (value, 0); -+ iv++; -+ } -+ } -+ -+ return iv; -+} -+ -+/* Notes: -+ * ------ -+ * -+ * Limitations to be documented: -+ * 0. -g -fopenmp not supported. -+ * -+ * Known DejaGNU failures: -+ * 0. FAIL: gcc.dg/pr38245-2.c scan-tree-dump-not optimized "link_error" -+ * This failure is because the optimization is dependent on the type of the variable; -+ * once the type of the variable has changed from int to long, the inequalities in -+ * this test case no longer hold and the code cannot be optimized anymore, consequently, -+ * the test fails. -+ * -+ * DejaGNU failures that are not due to type-widening: -+ * 0. gcc.dg/vect/vect-120.c scan-tree-dump-times vect "vectorized 1 loops" 1 -+ * 1.gcc.dg/vect/vect-120.c -flto scan-tree-dump-times vect "vectorized 1 loops" 1 -+ * -+ * DejaGNU PASS'es with -fwiden-types (but FAIL's in the baseline - the baseline needs -+ * to be fixed - it just so happens that the debug information happens to be better in -+ * the type-converted case. We have verified that the generated assembly is the same in -+ * either case (or has extsw eliminated)): -+ * gcc.dg/guality/pr45882.c -+ * gcc.dg/guality/pr43177.c -+ * -+ */ diff --git a/meta-fsl-ppc/recipes-devtools/gcc/files/optional_libstdc.patch b/meta-fsl-ppc/recipes-devtools/gcc/files/optional_libstdc.patch deleted file mode 100644 index fe157a89..00000000 --- a/meta-fsl-ppc/recipes-devtools/gcc/files/optional_libstdc.patch +++ /dev/null @@ -1,86 +0,0 @@ -Upstream-Status: Inappropriate [embedded specific] - -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 - -Index: gcc-4.6.0/gcc/cp/g++spec.c -=================================================================== ---- gcc-4.6.0.orig/gcc/cp/g++spec.c -+++ gcc-4.6.0/gcc/cp/g++spec.c -@@ -127,6 +127,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.6.0/gcc/doc/invoke.texi -=================================================================== ---- gcc-4.6.0.orig/gcc/doc/invoke.texi -+++ gcc-4.6.0/gcc/doc/invoke.texi -@@ -193,7 +193,7 @@ in the following sections. - -fno-pretty-templates @gol - -frepo -fno-rtti -fstats -ftemplate-depth=@var{n} @gol - -fno-threadsafe-statics -fuse-cxa-atexit -fno-weak -nostdinc++ @gol ---fno-default-inline -fvisibility-inlines-hidden @gol -+-nostdlib++ -fno-default-inline -fvisibility-inlines-hidden @gol - -fvisibility-ms-compat @gol - -Wabi -Wconversion-null -Wctor-dtor-privacy @gol - -Wnoexcept -Wnon-virtual-dtor -Wreorder @gol -@@ -431,7 +431,7 @@ Objective-C and Objective-C++ Dialects}. - @gccoptlist{@var{object-file-name} -l@var{library} @gol - -nostartfiles -nodefaultlibs -nostdlib -pie -rdynamic @gol - -s -static -static-libgcc -static-libstdc++ -shared @gol ---shared-libgcc -symbolic @gol -+-shared-libgcc -symbolic -nostdlib++ @gol - -T @var{script} -Wl,@var{option} -Xlinker @var{option} @gol - -u @var{symbol}} - -@@ -9069,6 +9069,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.6.0/gcc/c-family/c.opt -=================================================================== ---- gcc-4.6.0.orig/gcc/c-family/c.opt -+++ gcc-4.6.0/gcc/c-family/c.opt -@@ -1111,6 +1111,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.6.0/gcc/gcc.c -=================================================================== ---- gcc-4.6.0.orig/gcc/gcc.c -+++ gcc-4.6.0/gcc/gcc.c -@@ -666,6 +666,7 @@ proper position among the other output f - %(mflib) " STACK_SPLIT_SPEC "\ - %{fprofile-arcs|fprofile-generate*|coverage:-lgcov}\ - %{!nostdlib:%{!nodefaultlibs:%(link_ssp) %(link_gcc_c_sequence)}}\ -+ %{!nostdlib++:}\ - %{!nostdlib:%{!nostartfiles:%E}} %{T*} }}}}}}" - #endif - diff --git a/meta-fsl-ppc/recipes-devtools/gcc/gcc-cross-canadian_4.6.bbappend b/meta-fsl-ppc/recipes-devtools/gcc/gcc-cross-canadian_4.6.bbappend deleted file mode 100644 index 1c725f2f..00000000 --- a/meta-fsl-ppc/recipes-devtools/gcc/gcc-cross-canadian_4.6.bbappend +++ /dev/null @@ -1 +0,0 @@ -require gcc-fsl.inc diff --git a/meta-fsl-ppc/recipes-devtools/gcc/gcc-cross-initial_4.6.bbappend b/meta-fsl-ppc/recipes-devtools/gcc/gcc-cross-initial_4.6.bbappend deleted file mode 100644 index 1c725f2f..00000000 --- a/meta-fsl-ppc/recipes-devtools/gcc/gcc-cross-initial_4.6.bbappend +++ /dev/null @@ -1 +0,0 @@ -require gcc-fsl.inc diff --git a/meta-fsl-ppc/recipes-devtools/gcc/gcc-cross-intermediate_4.6.bbappend b/meta-fsl-ppc/recipes-devtools/gcc/gcc-cross-intermediate_4.6.bbappend deleted file mode 100644 index 1c725f2f..00000000 --- a/meta-fsl-ppc/recipes-devtools/gcc/gcc-cross-intermediate_4.6.bbappend +++ /dev/null @@ -1 +0,0 @@ -require gcc-fsl.inc diff --git a/meta-fsl-ppc/recipes-devtools/gcc/gcc-cross_4.6.bbappend b/meta-fsl-ppc/recipes-devtools/gcc/gcc-cross_4.6.bbappend deleted file mode 100644 index 1c725f2f..00000000 --- a/meta-fsl-ppc/recipes-devtools/gcc/gcc-cross_4.6.bbappend +++ /dev/null @@ -1 +0,0 @@ -require gcc-fsl.inc diff --git a/meta-fsl-ppc/recipes-devtools/gcc/gcc-fsl.inc b/meta-fsl-ppc/recipes-devtools/gcc/gcc-fsl.inc deleted file mode 100644 index b5ad200e..00000000 --- a/meta-fsl-ppc/recipes-devtools/gcc/gcc-fsl.inc +++ /dev/null @@ -1,46 +0,0 @@ -#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" - -BINV_fsl = "4.6.2" - -SRCREV_fsl = "180516" -# ignore linaro backports since we are changing the SRCREV -GCC-4_6-BRANCH-LINARO-BACKPORTS_fsl = "" - -SRC_URI_fsl = "svn://gcc.gnu.org/svn/gcc/branches;module=${BRANCH};proto=http \ - file://gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch \ - file://gcc.fix_longversionstring.patch \ - file://gcc.rm_slow_tests.patch \ - file://gcc.fix_mingw32.patch \ - file://gcc.fix_cloogstatic2.patch \ - file://gcc.fix_build-with-cxx.patch \ - file://gcc.e6500-FSF46.patch \ - file://gcc.ld_unaligned-460.patch \ - file://gcc.local_unaligned_altivec.patch \ - file://gcc.soft_float-460.patch \ - file://gcc.case_values.patch \ - file://gcc.builtin_isel.patch \ - file://gcc.experimental_move.patch \ - file://gcc.widen_types-46.patch \ - file://gcc.extelim-v3.patch \ - file://gcc.e5500_mfocr.patch \ - file://gcc.opt-array-offset.patch \ - file://gcc.load_on_store_bypass-462.patch \ - file://gcc.fix_constvector.patch \ - file://gcc.fix_MTWX51204-dwarf-vector-reg.patch \ - file://gcc.fix_ira-loop-pressure.patch \ - file://optional_libstdc.patch \ - file://gcc.remove_CCUNSmode_reference.patch \ - file://gcc.check_path_validity.patch \ - file://gcc.fix_header_issue.patch \ - file://gcc.fix_SSIZE_MAX_undefine_issue.patch \ - file://GPLUSPLUS_INCLUDE_DIR_with_sysroot_fsl.patch \ - file://gcc.fix_min_max.patch \ -" - -FILESEXTRAPATHS_prepend := "${THISDIR}/files:" - -PR_append_fsl = "+${DISTRO}.4" diff --git a/meta-fsl-ppc/recipes-devtools/gcc/gcc-runtime_4.6.bbappend b/meta-fsl-ppc/recipes-devtools/gcc/gcc-runtime_4.6.bbappend deleted file mode 100644 index 1c725f2f..00000000 --- a/meta-fsl-ppc/recipes-devtools/gcc/gcc-runtime_4.6.bbappend +++ /dev/null @@ -1 +0,0 @@ -require gcc-fsl.inc diff --git a/meta-fsl-ppc/recipes-devtools/gcc/gcc_4.6.bbappend b/meta-fsl-ppc/recipes-devtools/gcc/gcc_4.6.bbappend deleted file mode 100644 index 1c725f2f..00000000 --- a/meta-fsl-ppc/recipes-devtools/gcc/gcc_4.6.bbappend +++ /dev/null @@ -1 +0,0 @@ -require gcc-fsl.inc diff --git a/meta-fsl-ppc/recipes-devtools/gcc/libgcc_4.6.bbappend b/meta-fsl-ppc/recipes-devtools/gcc/libgcc_4.6.bbappend deleted file mode 100644 index 1c725f2f..00000000 --- a/meta-fsl-ppc/recipes-devtools/gcc/libgcc_4.6.bbappend +++ /dev/null @@ -1 +0,0 @@ -require gcc-fsl.inc -- cgit v1.2.3-54-g00ecf From 260f3899ae0bc9d3744a2e288eba2502aab1ab42 Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Tue, 15 May 2012 13:30:25 -0500 Subject: mtd-utils: remove extra patches Signed-off-by: Matthew McClintock --- ...t-cleanmarker-with-flash_erase--j-command.patch | 132 --------------------- .../recipes-devtools/mtd/mtd-utils_1.4.6.bbappend | 3 - 2 files changed, 135 deletions(-) delete mode 100644 meta-fsl-ppc/recipes-devtools/mtd/mtd-utils-1.4.6/mtd-utils-fix-corrupt-cleanmarker-with-flash_erase--j-command.patch delete mode 100644 meta-fsl-ppc/recipes-devtools/mtd/mtd-utils_1.4.6.bbappend diff --git a/meta-fsl-ppc/recipes-devtools/mtd/mtd-utils-1.4.6/mtd-utils-fix-corrupt-cleanmarker-with-flash_erase--j-command.patch b/meta-fsl-ppc/recipes-devtools/mtd/mtd-utils-1.4.6/mtd-utils-fix-corrupt-cleanmarker-with-flash_erase--j-command.patch deleted file mode 100644 index 2823c657..00000000 --- a/meta-fsl-ppc/recipes-devtools/mtd/mtd-utils-1.4.6/mtd-utils-fix-corrupt-cleanmarker-with-flash_erase--j-command.patch +++ /dev/null @@ -1,132 +0,0 @@ -From patchwork Mon Aug 8 08:16:43 2011 -Content-Type: text/plain; charset="utf-8" -MIME-Version: 1.0 -Content-Transfer-Encoding: 7bit -Subject: mtd-utils: fix corrupt cleanmarker with flash_erase -j command -Date: Sun, 07 Aug 2011 22:16:43 -0000 -From: b35362@freescale.com -X-Patchwork-Id: 108873 -Message-Id: <1312791403-13473-1-git-send-email-b35362@freescale.com> -To: -Cc: Liu Shuo , Artem.Bityutskiy@nokia.com, - Li Yang , linux-mtd@lists.infradead.org - -From: Liu Shuo - -Flash_erase -j should fill discrete freeoob areas with required bytes -of JFFS2 cleanmarker in jffs2_check_nand_cleanmarker(). Not just fill -the first freeoob area. - -The below is the result without this workaround: - -JFFS2: Erase block at 0x00000000 is not formatted. It will be erased -JFFS2: Erase block at 0x00004000 is not formatted. It will be erased -JFFS2: Erase block at 0x00008000 is not formatted. It will be erased -JFFS2: Erase block at 0x0000c000 is not formatted. It will be erased -JFFS2: Erase block at 0x00010000 is not formatted. It will be erased -JFFS2: Erase block at 0x00014000 is not formatted. It will be erased -JFFS2: Erase block at 0x00018000 is not formatted. It will be erased -JFFS2: Erase block at 0x0001c000 is not formatted. It will be erased -JFFS2: Erase block at 0x00020000 is not formatted. It will be erased -JFFS2: Erase block at 0x00024000 is not formatted. It will be erased -JFFS2: Erase block at 0x00028000 is not formatted. It will be erased -... - -Signed-off-by: Liu Shuo -Signed-off-by: Li Yang - ---- -v2 : get length of availble freeoob bytes from oobinfo information, - not use the ioctl ECCGETLAYOUT which is being deprecated. - - flash_erase.c | 46 +++++++++++++++++++++++++++++++++++++++------- - 1 files changed, 39 insertions(+), 7 deletions(-) - -diff --git a/flash_erase.c b/flash_erase.c -index fe2eaca..3e94495 100644 ---- a/flash_erase.c -+++ b/flash_erase.c -@@ -98,6 +98,7 @@ int main(int argc, char *argv[]) - int isNAND; - int error = 0; - uint64_t offset = 0; -+ void *oob_data = NULL; - - /* - * Process user arguments -@@ -197,15 +198,43 @@ int main(int argc, char *argv[]) - if (ioctl(fd, MEMGETOOBSEL, &oobinfo) != 0) - return sys_errmsg("%s: unable to get NAND oobinfo", mtd_device); - -+ cleanmarker.totlen = cpu_to_je32(8); - /* Check for autoplacement */ - if (oobinfo.useecc == MTD_NANDECC_AUTOPLACE) { -- /* Get the position of the free bytes */ -- if (!oobinfo.oobfree[0][1]) -+ struct nand_ecclayout_user ecclayout; -+ int i, oobavail; -+ -+ for (i = 0, oobavail = 0; oobinfo.oobfree[i][1]; i++) -+ oobavail += oobinfo.oobfree[i][1]; -+ -+ if (!oobavail) - return errmsg(" Eeep. Autoplacement selected and no empty space in oob"); -+ -+ /* Get the position of the free bytes */ - clmpos = oobinfo.oobfree[0][0]; -- clmlen = oobinfo.oobfree[0][1]; -- if (clmlen > 8) -- clmlen = 8; -+ clmlen = MIN(oobavail, 8); -+ -+ if (oobinfo.oobfree[0][1] < 8 && oobavail >= 8) { -+ int left, n, last = 0; -+ void *cm; -+ -+ oob_data = malloc(mtd.oob_size); -+ if (!oob_data) -+ return -ENOMEM; -+ -+ memset(oob_data, 0xff, mtd.oob_size); -+ cm = &cleanmarker; -+ for (i = 0, left = clmlen; left ; i++) { -+ n = MIN(left, oobinfo.oobfree[i][1]); -+ memcpy(oob_data + oobinfo.oobfree[i][0], -+ cm, n); -+ left -= n; -+ cm += n; -+ last = oobinfo.oobfree[i][0] + n; -+ } -+ -+ clmlen = last - clmpos; -+ } - } else { - /* Legacy mode */ - switch (mtd.oob_size) { -@@ -223,7 +252,6 @@ int main(int argc, char *argv[]) - break; - } - } -- cleanmarker.totlen = cpu_to_je32(8); - } - cleanmarker.hdr_crc = cpu_to_je32(mtd_crc32(0, &cleanmarker, sizeof(cleanmarker) - 4)); - } -@@ -272,7 +300,8 @@ int main(int argc, char *argv[]) - - /* write cleanmarker */ - if (isNAND) { -- if (mtd_write_oob(mtd_desc, &mtd, fd, offset + clmpos, clmlen, &cleanmarker) != 0) { -+ void *data = oob_data ? oob_data + clmpos : &cleanmarker; -+ if (mtd_write_oob(mtd_desc, &mtd, fd, offset + clmpos, clmlen, data) != 0) { - sys_errmsg("%s: MTD writeoob failure", mtd_device); - continue; - } -@@ -291,5 +320,8 @@ int main(int argc, char *argv[]) - show_progress(&mtd, offset, eb, eb_start, eb_cnt); - bareverbose(!quiet, "\n"); - -+ if (oob_data) -+ free(oob_data); -+ - return 0; - } diff --git a/meta-fsl-ppc/recipes-devtools/mtd/mtd-utils_1.4.6.bbappend b/meta-fsl-ppc/recipes-devtools/mtd/mtd-utils_1.4.6.bbappend deleted file mode 100644 index 2d963688..00000000 --- a/meta-fsl-ppc/recipes-devtools/mtd/mtd-utils_1.4.6.bbappend +++ /dev/null @@ -1,3 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/mtd-utils-1.4.6:" - -SRC_URI += "file://mtd-utils-fix-corrupt-cleanmarker-with-flash_erase--j-command.patch" -- cgit v1.2.3-54-g00ecf From 15172b6d28d85158850523ae7a48ed8d691566a6 Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Tue, 15 May 2012 13:31:06 -0500 Subject: netbase: update bbappends to new version Signed-off-by: Matthew McClintock --- meta-fsl-ppc/recipes-append/netbase/netbase_4.45.bbappend | 10 ---------- meta-fsl-ppc/recipes-append/netbase/netbase_4.47.bbappend | 10 ++++++++++ 2 files changed, 10 insertions(+), 10 deletions(-) delete mode 100644 meta-fsl-ppc/recipes-append/netbase/netbase_4.45.bbappend create mode 100644 meta-fsl-ppc/recipes-append/netbase/netbase_4.47.bbappend diff --git a/meta-fsl-ppc/recipes-append/netbase/netbase_4.45.bbappend b/meta-fsl-ppc/recipes-append/netbase/netbase_4.45.bbappend deleted file mode 100644 index 837cd204..00000000 --- a/meta-fsl-ppc/recipes-append/netbase/netbase_4.45.bbappend +++ /dev/null @@ -1,10 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/files:" - -SRC_URI += "file://71-fsl-dpaa-persistent-networking.rules" - -do_install_append () { - install -d ${D}${sysconfdir}/udev/rules.d/ - install -m 0644 ${WORKDIR}/71-fsl-dpaa-persistent-networking.rules ${D}${sysconfdir}/udev/rules.d -} - -PR .= "+${DISTRO}" diff --git a/meta-fsl-ppc/recipes-append/netbase/netbase_4.47.bbappend b/meta-fsl-ppc/recipes-append/netbase/netbase_4.47.bbappend new file mode 100644 index 00000000..837cd204 --- /dev/null +++ b/meta-fsl-ppc/recipes-append/netbase/netbase_4.47.bbappend @@ -0,0 +1,10 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/files:" + +SRC_URI += "file://71-fsl-dpaa-persistent-networking.rules" + +do_install_append () { + install -d ${D}${sysconfdir}/udev/rules.d/ + install -m 0644 ${WORKDIR}/71-fsl-dpaa-persistent-networking.rules ${D}${sysconfdir}/udev/rules.d +} + +PR .= "+${DISTRO}" -- cgit v1.2.3-54-g00ecf From c4386a1ef93bb22f494056be1eeba4cec8ceab3e Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Tue, 15 May 2012 13:33:15 -0500 Subject: oprofile: remove bbappends Signed-off-by: Matthew McClintock --- ...ile-0.9.6-add-e500mc-support-in-op_events.patch | 15 -- .../files/oprofile-0.9.6-e500mc-support-2.patch | 35 ----- .../files/oprofile-0.9.6-e500mc-support.patch | 169 --------------------- .../oprofile/oprofile_0.9.6.bbappend | 8 - 4 files changed, 227 deletions(-) delete mode 100644 meta-fsl-ppc/recipes-append/oprofile/files/oprofile-0.9.6-add-e500mc-support-in-op_events.patch delete mode 100644 meta-fsl-ppc/recipes-append/oprofile/files/oprofile-0.9.6-e500mc-support-2.patch delete mode 100644 meta-fsl-ppc/recipes-append/oprofile/files/oprofile-0.9.6-e500mc-support.patch delete mode 100644 meta-fsl-ppc/recipes-append/oprofile/oprofile_0.9.6.bbappend diff --git a/meta-fsl-ppc/recipes-append/oprofile/files/oprofile-0.9.6-add-e500mc-support-in-op_events.patch b/meta-fsl-ppc/recipes-append/oprofile/files/oprofile-0.9.6-add-e500mc-support-in-op_events.patch deleted file mode 100644 index aa220093..00000000 --- a/meta-fsl-ppc/recipes-append/oprofile/files/oprofile-0.9.6-add-e500mc-support-in-op_events.patch +++ /dev/null @@ -1,15 +0,0 @@ -Add e500mc support in libop/op_events.c - -Signed-off-by: Zhenhua Luo -=============================================================================== -diff -urN oprofile-0.9.6/libop/op_events.c oprofile-0.9.6-new/libop/op_events.c ---- oprofile-0.9.6/libop/op_events.c 2009-11-24 23:25:17.000000000 +0800 -+++ oprofile-0.9.6-new/libop/op_events.c 2010-08-19 11:13:15.000000000 +0800 -@@ -1062,6 +1062,7 @@ - - case CPU_PPC_E500: - case CPU_PPC_E500_2: -+ case CPU_PPC_E500MC: - case CPU_PPC_E300: - descr->name = "CPU_CLK"; - break; diff --git a/meta-fsl-ppc/recipes-append/oprofile/files/oprofile-0.9.6-e500mc-support-2.patch b/meta-fsl-ppc/recipes-append/oprofile/files/oprofile-0.9.6-e500mc-support-2.patch deleted file mode 100644 index 51288a57..00000000 --- a/meta-fsl-ppc/recipes-append/oprofile/files/oprofile-0.9.6-e500mc-support-2.patch +++ /dev/null @@ -1,35 +0,0 @@ -Add e500mc event in oprofile Makefile to add e500mc support - -Signed-off-by: Luo Zhenhua -=============================================================================== -diff -urN oprofile-0.9.6-old/events/Makefile.am oprofile-0.9.6/events/Makefile.am ---- oprofile-0.9.6-old/events/Makefile.am 2009-11-24 23:25:18.000000000 +0800 -+++ oprofile-0.9.6/events/Makefile.am 2010-08-13 15:23:24.000000000 +0800 -@@ -55,6 +55,7 @@ - mips/vr5500/events mips/vr5500/unit_masks \ - ppc/7450/events ppc/7450/unit_masks \ - ppc/e500/events ppc/e500/unit_masks \ -+ ppc/e500mc/events ppc/e500mc/unit_masks \ - ppc/e500v2/events ppc/e500v2/unit_masks \ - ppc/e300/events ppc/e300/unit_masks - -diff -urN oprofile-0.9.6-old/events/Makefile.in oprofile-0.9.6/events/Makefile.in ---- oprofile-0.9.6-old/events/Makefile.in 2009-11-24 23:25:48.000000000 +0800 -+++ oprofile-0.9.6/events/Makefile.in 2010-08-13 15:23:03.000000000 +0800 -@@ -258,6 +258,7 @@ - mips/vr5500/events mips/vr5500/unit_masks \ - ppc/7450/events ppc/7450/unit_masks \ - ppc/e500/events ppc/e500/unit_masks \ -+ ppc/e500mc/events ppc/e500mc/unit_masks \ - ppc/e500v2/events ppc/e500v2/unit_masks \ - ppc/e300/events ppc/e300/unit_masks - -@@ -312,7 +313,7 @@ - - - distdir: $(DISTFILES) -- $(mkdir_p) $(distdir)/alpha/ev4 $(distdir)/alpha/ev5 $(distdir)/alpha/ev6 $(distdir)/alpha/ev67 $(distdir)/alpha/pca56 $(distdir)/arm/armv6 $(distdir)/arm/armv7 $(distdir)/arm/mpcore $(distdir)/arm/xscale1 $(distdir)/arm/xscale2 $(distdir)/avr32 $(distdir)/i386/arch_perfmon $(distdir)/i386/athlon $(distdir)/i386/atom $(distdir)/i386/core $(distdir)/i386/core_2 $(distdir)/i386/core_i7 $(distdir)/i386/nehalem $(distdir)/i386/p4 $(distdir)/i386/p4-ht $(distdir)/i386/p6_mobile $(distdir)/i386/pii $(distdir)/i386/piii $(distdir)/i386/ppro $(distdir)/ia64/ia64 $(distdir)/ia64/itanium $(distdir)/ia64/itanium2 $(distdir)/mips/20K $(distdir)/mips/24K $(distdir)/mips/25K $(distdir)/mips/34K $(distdir)/mips/5K $(distdir)/mips/r10000 $(distdir)/mips/r12000 $(distdir)/mips/rm7000 $(distdir)/mips/rm9000 $(distdir)/mips/sb1 $(distdir)/mips/vr5432 $(distdir)/mips/vr5500 $(distdir)/ppc/7450 $(distdir)/ppc/e300 $(distdir)/ppc/e500 $(distdir)/ppc/e500v2 $(distdir)/ppc64/970 $(distdir)/ppc64/970MP $(distdir)/ppc64/cell-be $(distdir)/ppc64/ibm-compat-v1 $(distdir)/ppc64/pa6t $(distdir)/ppc64/power4 $(distdir)/ppc64/power5 $(distdir)/ppc64/power5+ $(distdir)/ppc64/power5++ $(distdir)/ppc64/power6 $(distdir)/ppc64/power7 $(distdir)/rtc $(distdir)/x86-64/family10 $(distdir)/x86-64/family11h $(distdir)/x86-64/hammer -+ $(mkdir_p) $(distdir)/alpha/ev4 $(distdir)/alpha/ev5 $(distdir)/alpha/ev6 $(distdir)/alpha/ev67 $(distdir)/alpha/pca56 $(distdir)/arm/armv6 $(distdir)/arm/armv7 $(distdir)/arm/mpcore $(distdir)/arm/xscale1 $(distdir)/arm/xscale2 $(distdir)/avr32 $(distdir)/i386/arch_perfmon $(distdir)/i386/athlon $(distdir)/i386/atom $(distdir)/i386/core $(distdir)/i386/core_2 $(distdir)/i386/core_i7 $(distdir)/i386/nehalem $(distdir)/i386/p4 $(distdir)/i386/p4-ht $(distdir)/i386/p6_mobile $(distdir)/i386/pii $(distdir)/i386/piii $(distdir)/i386/ppro $(distdir)/ia64/ia64 $(distdir)/ia64/itanium $(distdir)/ia64/itanium2 $(distdir)/mips/20K $(distdir)/mips/24K $(distdir)/mips/25K $(distdir)/mips/34K $(distdir)/mips/5K $(distdir)/mips/r10000 $(distdir)/mips/r12000 $(distdir)/mips/rm7000 $(distdir)/mips/rm9000 $(distdir)/mips/sb1 $(distdir)/mips/vr5432 $(distdir)/mips/vr5500 $(distdir)/ppc/7450 $(distdir)/ppc/e300 $(distdir)/ppc/e500 $(distdir)/ppc/e500mc $(distdir)/ppc/e500v2 $(distdir)/ppc64/970 $(distdir)/ppc64/970MP $(distdir)/ppc64/cell-be $(distdir)/ppc64/ibm-compat-v1 $(distdir)/ppc64/pa6t $(distdir)/ppc64/power4 $(distdir)/ppc64/power5 $(distdir)/ppc64/power5+ $(distdir)/ppc64/power5++ $(distdir)/ppc64/power6 $(distdir)/ppc64/power7 $(distdir)/rtc $(distdir)/x86-64/family10 $(distdir)/x86-64/family11h $(distdir)/x86-64/hammer - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ diff --git a/meta-fsl-ppc/recipes-append/oprofile/files/oprofile-0.9.6-e500mc-support.patch b/meta-fsl-ppc/recipes-append/oprofile/files/oprofile-0.9.6-e500mc-support.patch deleted file mode 100644 index e2aaf22b..00000000 --- a/meta-fsl-ppc/recipes-append/oprofile/files/oprofile-0.9.6-e500mc-support.patch +++ /dev/null @@ -1,169 +0,0 @@ -Add e500mc event in oprofile to add e500mc support - -Signed-off-by: George Stephen -=============================================================================== -diff -urN oprofile-0.9.6/events/ppc/e500mc/events oprofile-0.9.6-new/events/ppc/e500mc/events ---- oprofile-0.9.6/events/ppc/e500mc/events 1970-01-01 08:00:00.000000000 +0800 -+++ oprofile-0.9.6-new/events/ppc/e500mc/events 2010-08-16 17:57:49.000000000 +0800 -@@ -0,0 +1,120 @@ -+# e500mc Events -+# -+# Copyright (C) 2010 Freescale Semiconductor, Inc. -+# -+event:0x1 counters:0,1,2,3 um:zero minimum:100 name:CPU_CLK : Cycles -+event:0x2 counters:0,1,2,3 um:zero minimum:500 name:COMPLETED_INSNS : Completed Instructions (0, 1, or 2 per cycle) -+event:0x3 counters:0,1,2,3 um:zero minimum:500 name:COMPLETED_OPS : Completed Micro-ops (counts 2 for load/store w/update) -+event:0x4 counters:0,1,2,3 um:zero minimum:500 name:INSTRUCTION_FETCHES : Instruction fetches -+event:0x5 counters:0,1,2,3 um:zero minimum:500 name:DECODED_OPS : Micro-ops decoded -+event:0x8 counters:0,1,2,3 um:zero minimum:500 name:COMPLETED_BRANCHES : Branch Instructions completed -+event:0x9 counters:0,1,2,3 um:zero minimum:500 name:COMPLETED_LOAD_OPS : Load micro-ops completed -+event:0xa counters:0,1,2,3 um:zero minimum:500 name:COMPLETED_STORE_OPS : Store micro-ops completed -+event:0xb counters:0,1,2,3 um:zero minimum:500 name:COMPLETION_REDIRECTS : Number of completion buffer redirects -+event:0xc counters:0,1,2,3 um:zero minimum:500 name:BRANCHES_FINISHED : Branches finished -+event:0xd counters:0,1,2,3 um:zero minimum:500 name:TAKEN_BRANCHES_FINISHED : Taken branches finished -+event:0xe counters:0,1,2,3 um:zero minimum:500 name:BIFFED_BRANCHES_FINISHED : Biffed branches finished -+event:0xf counters:0,1,2,3 um:zero minimum:500 name:BRANCHES_MISPREDICTED : Branch instructions mispredicted due to direction, target, or IAB prediction -+event:0x10 counters:0,1,2,3 um:zero minimum:500 name:BRANCHES_MISPREDICTED_DIRECTION : Branches mispredicted due to direction prediction -+event:0x11 counters:0,1,2,3 um:zero minimum:500 name:BTB_HITS : Branches that hit in the BTB, or missed but are not taken -+event:0x12 counters:0,1,2,3 um:zero minimum:500 name:DECODE_STALLED : Cycles the instruction buffer was not empty, but 0 instructions decoded -+event:0x13 counters:0,1,2,3 um:zero minimum:500 name:ISSUE_STALLED : Cycles the issue buffer is not empty but 0 instructions issued -+event:0x14 counters:0,1,2,3 um:zero minimum:500 name:BRANCH_ISSUE_STALLED : Cycles the branch buffer is not empty but 0 instructions issued -+event:0x15 counters:0,1,2,3 um:zero minimum:500 name:SRS0_SCHEDULE_STALLED : Cycles SRS0 is not empty but 0 instructions scheduled -+event:0x16 counters:0,1,2,3 um:zero minimum:500 name:SRS1_SCHEDULE_STALLED : Cycles SRS1 is not empty but 0 instructions scheduled -+event:0x17 counters:0,1,2,3 um:zero minimum:500 name:VRS_SCHEDULE_STALLED : Cycles VRS is not empty but 0 instructions scheduled -+event:0x18 counters:0,1,2,3 um:zero minimum:500 name:LRS_SCHEDULE_STALLED : Cycles LRS is not empty but 0 instructions scheduled -+event:0x19 counters:0,1,2,3 um:zero minimum:500 name:BRS_SCHEDULE_STALLED : Cycles BRS is not empty but 0 instructions scheduled Load/Store, Data Cache, and dLFB Events -+event:0x1a counters:0,1,2,3 um:zero minimum:500 name:TOTAL_TRANSLATED : Total Ldst microops translated. -+event:0x1b counters:0,1,2,3 um:zero minimum:500 name:LOADS_TRANSLATED : Number of cacheable L* or EVL* microops translated. (This includes microops from load-multiple, load-update, and load-context instructions.) -+event:0x1c counters:0,1,2,3 um:zero minimum:500 name:STORES_TRANSLATED : Number of cacheable ST* or EVST* microops translated. (This includes microops from store-multiple, store-update, and save-context instructions.) -+event:0x1d counters:0,1,2,3 um:zero minimum:500 name:TOUCHES_TRANSLATED : Number of cacheable DCBT and DCBTST instructions translated (L1 only) (Does not count touches that are converted to nops i.e. exceptions, noncacheable, hid0[nopti] bit is set.) -+event:0x1e counters:0,1,2,3 um:zero minimum:500 name:CACHEOPS_TRANSLATED : Number of dcba, dcbf, dcbst, and dcbz instructions translated (e500 traps on dcbi) -+event:0x1f counters:0,1,2,3 um:zero minimum:500 name:CACHEINHIBITED_ACCESSES_TRANSLATED : Number of cache inhibited accesses translated -+event:0x20 counters:0,1,2,3 um:zero minimum:500 name:GUARDED_LOADS_TRANSLATED : Number of guarded loads translated -+event:0x21 counters:0,1,2,3 um:zero minimum:500 name:WRITETHROUGH_STORES_TRANSLATED : Number of write-through stores translated -+event:0x22 counters:0,1,2,3 um:zero minimum:500 name:MISALIGNED_ACCESSES_TRANSLATED : Number of misaligned load or store accesses translated. -+event:0x23 counters:0,1,2,3 um:zero minimum:500 name:TOTAL_ALLOCATED_DLFB : Total allocated to dLFB -+event:0x24 counters:0,1,2,3 um:zero minimum:500 name:LOADS_TRANSLATED_ALLOCATED_DLFB : Loads translated and allocated to dLFB (Applies to same class of instructions as loads translated.) -+event:0x25 counters:0,1,2,3 um:zero minimum:500 name:STORES_COMPLETED_ALLOCATED_DLFB : Stores completed and allocated to dLFB (Applies to same class of instructions as stores translated.) -+event:0x26 counters:0,1,2,3 um:zero minimum:500 name:TOUCHES_TRANSLATED_ALLOCATED_DLFB : Touches translated and allocated to dLFB (Applies to same class of instructions as touches translated.) -+event:0x27 counters:0,1,2,3 um:zero minimum:500 name:STORES_COMPLETED : Number of cacheable ST* or EVST* microops completed. (Applies to the same class of instructions as stores translated.) -+event:0x28 counters:0,1,2,3 um:zero minimum:500 name:DL1_LOCKS : Number of cache lines locked in the dL1. (Counts a lock even if an overlock condition is encountered.) -+event:0x29 counters:0,1,2,3 um:zero minimum:500 name:DL1_RELOADS : This is historically used to determine dcache miss rate (along with loads/stores completed). This counts dL1 reloads for any reason. -+event:0x2a counters:0,1,2,3 um:zero minimum:500 name:DL1_CASTOUTS : dL1 castouts. Does not count castouts due to DCBF. -+event:0x2b counters:0,1,2,3 um:zero minimum:500 name:DETECTED_REPLAYS : Times detected replay condition - Load miss with dLFB full. -+event:0x2c counters:0,1,2,3 um:zero minimum:500 name:LOAD_MISS_QUEUE_FULL_REPLAYS : Load miss with load queue full. -+event:0x2d counters:0,1,2,3 um:zero minimum:500 name:LOAD_GUARDED_MISS_NOT_LAST_REPLAYS : Load guarded miss when the load is not yet at the bottom of the completion buffer. -+event:0x2e counters:0,1,2,3 um:zero minimum:500 name:STORE_TRANSLATED_QUEUE_FULL_REPLAYS : Translate a store when the StQ is full. -+event:0x2f counters:0,1,2,3 um:zero minimum:500 name:ADDRESS_COLLISION_REPLAYS : Address collision. -+event:0x30 counters:0,1,2,3 um:zero minimum:500 name:DMMU_MISS_REPLAYS : DMMU_MISS_REPLAYS : DMMU miss. -+event:0x31 counters:0,1,2,3 um:zero minimum:500 name:DMMU_BUSY_REPLAYS : DMMU_BUSY_REPLAYS : DMMU busy. -+event:0x32 counters:0,1,2,3 um:zero minimum:500 name:SECOND_PART_MISALIGNED_AFTER_MISS_REPLAYS : Second part of misaligned access when first part missed in cache. -+event:0x33 counters:0,1,2,3 um:zero minimum:500 name:LOAD_MISS_DLFB_FULL_CYCLES : Cycles stalled on replay condition - Load miss with dLFB full. -+event:0x34 counters:0,1,2,3 um:zero minimum:500 name:LOAD_MISS_QUEUE_FULL_CYCLES : Cycles stalled on replay condition - Load miss with load queue full. -+event:0x35 counters:0,1,2,3 um:zero minimum:500 name:LOAD_GUARDED_MISS_NOT_LAST_CYCLES : Cycles stalled on replay condition - Load guarded miss when the load is not yet at the bottom of the completion buffer. -+event:0x36 counters:0,1,2,3 um:zero minimum:500 name:STORE_TRANSLATED_QUEUE_FULL_CYCLES : Cycles stalled on replay condition - Translate a store when the StQ is full. -+event:0x37 counters:0,1,2,3 um:zero minimum:500 name:ADDRESS_COLLISION_CYCLES : Cycles stalled on replay condition - Address collision. -+event:0x38 counters:0,1,2,3 um:zero minimum:500 name:DMMU_MISS_CYCLES : Cycles stalled on replay condition - DMMU miss. -+event:0x39 counters:0,1,2,3 um:zero minimum:500 name:DMMU_BUSY_CYCLES : Cycles stalled on replay condition - DMMU busy. -+event:0x3a counters:0,1,2,3 um:zero minimum:500 name:SECOND_PART_MISALIGNED_AFTER_MISS_CYCLES : Cycles stalled on replay condition - Second part of misaligned access when first part missed in cache. -+event:0x3b counters:0,1,2,3 um:zero minimum:500 name:IL1_LOCKS : Number of cache lines locked in the iL1. (Counts a lock even if an overlock condition is encountered.) -+event:0x3c counters:0,1,2,3 um:zero minimum:500 name:IL1_FETCH_RELOADS : This is historically used to determine icache miss rate (along with instructions completed) Reloads due to demand fetch. -+event:0x3d counters:0,1,2,3 um:zero minimum:500 name:FETCHES : Counts the number of fetches that write at least one instruction to the instruction buffer. (With instruction fetched, can used to compute instructions-per-fetch) -+event:0x3e counters:0,1,2,3 um:zero minimum:500 name:IMMU_TLB4K_RELOADS : iMMU TLB4K reloads -+event:0x3f counters:0,1,2,3 um:zero minimum:500 name:IMMU_VSP_RELOADS : iMMU VSP reloads -+event:0x40 counters:0,1,2,3 um:zero minimum:500 name:DMMU_TLB4K_RELOADS : dMMU TLB4K reloads -+event:0x41 counters:0,1,2,3 um:zero minimum:500 name:DMMU_VSP_RELOADS : dMMU VSP reloads -+event:0x42 counters:0,1,2,3 um:zero minimum:500 name:L2MMU_MISSES : Counts iTLB/dTLB error interrupt -+event:0x43 counters:0,1,2,3 um:zero minimum:500 name:BIU_MASTER_REQUESTS : Number of master transactions. (Number of master TSs.) -+event:0x44 counters:0,1,2,3 um:zero minimum:500 name:BIU_MASTER_I_REQUESTS : Number of master I-Side transactions. (Number of master I-Side TSs.) -+event:0x45 counters:0,1,2,3 um:zero minimum:500 name:BIU_MASTER_D_REQUESTS : Number of master D-Side transactions. (Number of master D-Side TSs.) -+event:0x46 counters:0,1,2,3 um:zero minimum:500 name:BIU_MASTER_D_CASTOUT_REQUESTS : Number of master D-Side non-program-demand castout transactions. This counts replacement pushes and snoop pushes. This does not count DCBF castouts. (Number of master D-side non-program-demand castout TSs.) -+event:0x48 counters:0,1,2,3 um:zero minimum:500 name:SNOOP_REQUESTS : Number of externally generated snoop requests. (Counts snoop TSs.) -+event:0x49 counters:0,1,2,3 um:zero minimum:500 name:SNOOP_HITS : Number of snoop hits on all D-side resources regardless of the cache state (modified, exclusive, or shared) -+event:0x4a counters:0,1,2,3 um:zero minimum:500 name:SNOOP_PUSHES : Number of snoop pushes from all D-side resources. (Counts snoop ARTRY/WOPs.) -+event:0x52 counters:0,1,2,3 um:zero minimum:500 name:PMC0_OVERFLOW : Counts the number of times PMC0[32] transitioned from 1 to 0. -+event:0x53 counters:0,1,2,3 um:zero minimum:500 name:PMC1_OVERFLOW : Counts the number of times PMC1[32] transitioned from 1 to 0. -+event:0x54 counters:0,1,2,3 um:zero minimum:500 name:PMC2_OVERFLOW : Counts the number of times PMC2[32] transitioned from 1 to 0. -+event:0x55 counters:0,1,2,3 um:zero minimum:500 name:PMC3_OVERFLOW : Counts the number of times PMC3[32] transitioned from 1 to 0. -+event:0x56 counters:0,1,2,3 um:zero minimum:500 name:INTERRUPTS : Number of interrupts taken -+event:0x57 counters:0,1,2,3 um:zero minimum:500 name:EXTERNAL_INTERRUPTS : Number of external input interrupts taken -+event:0x58 counters:0,1,2,3 um:zero minimum:500 name:CRITICAL_INTERRUPTS : Number of critical input interrupts taken -+event:0x59 counters:0,1,2,3 um:zero minimum:500 name:SC_TRAP_INTERRUPTS : Number of system call and trap interrupts -+event:0x5b counters:0,1,2,3 um:zero minimum:500 name:L2_LINEFILL_REQ : Number L2 Linefill requests -+event:0x5c counters:0,1,2,3 um:zero minimum:500 name:L2_VICTIM_SELECT : Number L2 Victim selects -+event:0x6e counters:0,1,2,3 um:zero minimum:500 name:L2_ACCESS : Number L2 cache accesses -+event:0x6f counters:0,1,2,3 um:zero minimum:500 name:L2_HIT_ACCESS : Number L2 hit cache accesses -+event:0x70 counters:0,1,2,3 um:zero minimum:500 name:L2_DATA_ACCESS : Number L2 data cache accesses -+event:0x71 counters:0,1,2,3 um:zero minimum:500 name:L2_HIT_DATA_ACCESS : Number L2 hit data cache accesses -+event:0x72 counters:0,1,2,3 um:zero minimum:500 name:L2_INST_ACCESS : Number L2 instruction cache accesses -+event:0x73 counters:0,1,2,3 um:zero minimum:500 name:L2_HIT_INST_ACCESS : Number L2 hit instruction cache accesses -+event:0x74 counters:0,1,2,3 um:zero minimum:500 name:L2_ALLOC : Number L2 cache allocations -+event:0x75 counters:0,1,2,3 um:zero minimum:500 name:L2_DATA_ALLOC : Number L2 data cache allocations -+event:0x76 counters:0,1,2,3 um:zero minimum:500 name:L2_DIRTY_DATA_ALLOC : Number L2 dirty data cache allocations -+event:0x77 counters:0,1,2,3 um:zero minimum:500 name:L2_INST_ALLOC : Number L2 instruction cache allocations -+event:0x78 counters:0,1,2,3 um:zero minimum:500 name:L2_UPDATE : Number L2 cache updates -+event:0x79 counters:0,1,2,3 um:zero minimum:500 name:L2_CLEAN_UPDATE : Number L2 cache clean updates -+event:0x7a counters:0,1,2,3 um:zero minimum:500 name:L2_DIRTY_UPDATE : Number L2 cache dirty updates -+event:0x7b counters:0,1,2,3 um:zero minimum:500 name:L2_CLEAN_REDU_UPDATE : Number L2 cache clean redundant updates -+event:0x7c counters:0,1,2,3 um:zero minimum:500 name:L2_DIRTY_REDU_UPDATE : Number L2 cache dirty redundant updates -+event:0x7d counters:0,1,2,3 um:zero minimum:500 name:L2_LOCKS : Number L2 cache locks -+event:0x7e counters:0,1,2,3 um:zero minimum:500 name:L2_CASTOUT : Number L2 cache castouts -+event:0x7f counters:0,1,2,3 um:zero minimum:500 name:L2_HIT_DATA_DIRTY : Number L2 cache data dirty hits -+event:0x82 counters:0,1,2,3 um:zero minimum:500 name:L2_INV_CLEAN : Number L2 cache invalidation of clean lines -+event:0x83 counters:0,1,2,3 um:zero minimum:500 name:L2_INV_INCOHER : Number L2 cache invalidation of incoherent lines -+event:0x84 counters:0,1,2,3 um:zero minimum:500 name:L2_INV_COHER : Number L2 cache invalidation of coherent lines -+event:0x94 counters:0,1,2,3 um:zero minimum:500 name:DVT0 : Detection of write to DEVENT with DVT0 set -+event:0x95 counters:0,1,2,3 um:zero minimum:500 name:DVT1 : Detection of write to DEVENT with DVT1 set -+event:0x96 counters:0,1,2,3 um:zero minimum:500 name:DVT2 : Detection of write to DEVENT with DVT2 set -+event:0x97 counters:0,1,2,3 um:zero minimum:500 name:DVT3 : Detection of write to DEVENT with DVT3 set -+event:0x98 counters:0,1,2,3 um:zero minimum:500 name:DVT4 : Detection of write to DEVENT with DVT4 set -+event:0x99 counters:0,1,2,3 um:zero minimum:500 name:DVT5 : Detection of write to DEVENT with DVT5 set -+event:0x9a counters:0,1,2,3 um:zero minimum:500 name:DVT6 : Detection of write to DEVENT with DVT6 set -+event:0x9b counters:0,1,2,3 um:zero minimum:500 name:DVT7 : Detection of write to DEVENT with DVT7 set -+event:0x9c counters:0,1,2,3 um:zero minimum:500 name:CYCLES_NEXUS_STALLED : Number of completion cycles stalled due to Nexus FIFO full -+event:0xb0 counters:0,1,2,3 um:zero minimum:500 name:DECORATED_LOAD : Number of decorated loads. -+event:0xb1 counters:0,1,2,3 um:zero minimum:500 name:DECORATED_STORE : Number of decorated stores -+event:0xb2 counters:0,1,2,3 um:zero minimum:500 name:LOAD_RETRY : Number of load retries -+event:0xb3 counters:0,1,2,3 um:zero minimum:500 name:STWCX_SUCCESS : Number of successful stwcx. instructions -+event:0xb4 counters:0,1,2,3 um:zero minimum:500 name:STWCX_UNSUCCESS : Number of unsuccessful stwcx. instructions -diff -urN oprofile-0.9.6/events/ppc/e500mc/unit_masks oprofile-0.9.6-new/events/ppc/e500mc/unit_masks ---- oprofile-0.9.6/events/ppc/e500mc/unit_masks 1970-01-01 08:00:00.000000000 +0800 -+++ oprofile-0.9.6-new/events/ppc/e500mc/unit_masks 2010-08-16 17:56:03.000000000 +0800 -@@ -0,0 +1,4 @@ -+# e500 possible unit masks -+# -+name:zero type:mandatory default:0x0 -+ 0x0 No unit mask -diff -urN oprofile-0.9.6/libop/op_cpu_type.c oprofile-0.9.6-new/libop/op_cpu_type.c ---- oprofile-0.9.6/libop/op_cpu_type.c 2009-11-24 23:25:17.000000000 +0800 -+++ oprofile-0.9.6-new/libop/op_cpu_type.c 2010-08-16 17:56:03.000000000 +0800 -@@ -82,6 +82,7 @@ - { "ppc64 compat version 1", "ppc64/ibm-compat-v1", CPU_PPC64_IBM_COMPAT_V1, 4 }, - { "Intel Core/i7", "i386/core_i7", CPU_CORE_I7, 4 }, - { "Intel Atom", "i386/atom", CPU_ATOM, 2 }, -+ { "e500mc", "ppc/e500mc", CPU_PPC_E500MC, 4 }, - }; - - static size_t const nr_cpu_descrs = sizeof(cpu_descrs) / sizeof(struct cpu_descr); -diff -urN oprofile-0.9.6/libop/op_cpu_type.h oprofile-0.9.6-new/libop/op_cpu_type.h ---- oprofile-0.9.6/libop/op_cpu_type.h 2009-11-24 23:25:17.000000000 +0800 -+++ oprofile-0.9.6-new/libop/op_cpu_type.h 2010-08-16 17:56:03.000000000 +0800 -@@ -79,6 +79,7 @@ - CPU_PPC64_IBM_COMPAT_V1, /**< IBM PPC64 processor compat mode version 1 */ - CPU_CORE_I7, /* Intel Core i7, Nehalem */ - CPU_ATOM, /* First generation Intel Atom */ -+ CPU_PPC_E500MC, /**< e500mc */ - MAX_CPU_TYPE - } op_cpu; - -diff -urN oprofile-0.9.6/utils/ophelp.c oprofile-0.9.6-new/utils/ophelp.c ---- oprofile-0.9.6/utils/ophelp.c 2009-11-24 23:25:17.000000000 +0800 -+++ oprofile-0.9.6-new/utils/ophelp.c 2010-08-16 17:56:03.000000000 +0800 -@@ -619,6 +619,7 @@ - - case CPU_PPC_E500: - case CPU_PPC_E500_2: -+ case CPU_PPC_E500MC: - event_doc = - "See PowerPC e500 Core Complex Reference Manual\n" - "Chapter 7: Performance Monitor\n" diff --git a/meta-fsl-ppc/recipes-append/oprofile/oprofile_0.9.6.bbappend b/meta-fsl-ppc/recipes-append/oprofile/oprofile_0.9.6.bbappend deleted file mode 100644 index 4feadf1d..00000000 --- a/meta-fsl-ppc/recipes-append/oprofile/oprofile_0.9.6.bbappend +++ /dev/null @@ -1,8 +0,0 @@ -PR .= "+${DISTRO}.0" - -FILESEXTRAPATHS_prepend := "${THISDIR}/files:" - -SRC_URI += "file://oprofile-0.9.6-e500mc-support.patch \ - file://oprofile-0.9.6-e500mc-support-2.patch \ - file://oprofile-0.9.6-add-e500mc-support-in-op_events.patch \ -" -- cgit v1.2.3-54-g00ecf From 90f9f22a8d3d6a87f376702f267decda18a7582e Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Tue, 15 May 2012 13:32:55 -0500 Subject: busybox: remove bbappends Signed-off-by: Matthew McClintock --- ...bbb.h-do-not-use-homegrown-struct-sysinfo.patch | 54 -- ...around-sysinfo.h-versus-linux-.h-problems.patch | 95 -- .../busybox/busybox-1.18.5/defconfig-maximum | 990 --------------------- .../recipes-append/busybox/busybox-1.18.5/inetd | 33 - .../busybox/busybox-1.18.5/inetd.conf | 20 - .../recipes-append/busybox/busybox_1.18.5.bbappend | 15 - 6 files changed, 1207 deletions(-) delete mode 100644 meta-fsl-ppc/recipes-append/busybox/busybox-1.18.5/0001-libbb.h-do-not-use-homegrown-struct-sysinfo.patch delete mode 100644 meta-fsl-ppc/recipes-append/busybox/busybox-1.18.5/0002-work-around-sysinfo.h-versus-linux-.h-problems.patch delete mode 100644 meta-fsl-ppc/recipes-append/busybox/busybox-1.18.5/defconfig-maximum delete mode 100644 meta-fsl-ppc/recipes-append/busybox/busybox-1.18.5/inetd delete mode 100644 meta-fsl-ppc/recipes-append/busybox/busybox-1.18.5/inetd.conf delete mode 100644 meta-fsl-ppc/recipes-append/busybox/busybox_1.18.5.bbappend diff --git a/meta-fsl-ppc/recipes-append/busybox/busybox-1.18.5/0001-libbb.h-do-not-use-homegrown-struct-sysinfo.patch b/meta-fsl-ppc/recipes-append/busybox/busybox-1.18.5/0001-libbb.h-do-not-use-homegrown-struct-sysinfo.patch deleted file mode 100644 index ab0c48f7..00000000 --- a/meta-fsl-ppc/recipes-append/busybox/busybox-1.18.5/0001-libbb.h-do-not-use-homegrown-struct-sysinfo.patch +++ /dev/null @@ -1,54 +0,0 @@ -From b87113587ed488ee10f621bde099766e13088923 Mon Sep 17 00:00:00 2001 -From: Denys Vlasenko -Date: Mon, 25 Jul 2011 09:05:43 +0000 -Subject: [PATCH 1/2] libbb.h: do not use homegrown struct sysinfo. - -Signed-off-by: Denys Vlasenko ---- - include/libbb.h | 23 ++++------------------- - 1 files changed, 4 insertions(+), 19 deletions(-) - -diff --git a/include/libbb.h b/include/libbb.h -index 7c1db3f..afe3b61 100644 ---- a/include/libbb.h -+++ b/include/libbb.h -@@ -44,6 +44,10 @@ - #ifdef HAVE_SYS_STATFS_H - # include - #endif -+/* struct sysinfo is linux-specific */ -+#ifdef __linux__ -+# include -+#endif - #if ENABLE_SELINUX - # include - # include -@@ -100,25 +104,6 @@ int klogctl(int type, char *b, int len); - #if !defined __FreeBSD__ - char *dirname(char *path); - #endif --/* Include our own copy of struct sysinfo to avoid binary compatibility -- * problems with Linux 2.4, which changed things. Grumble, grumble. */ --struct sysinfo { -- long uptime; /* Seconds since boot */ -- unsigned long loads[3]; /* 1, 5, and 15 minute load averages */ -- unsigned long totalram; /* Total usable main memory size */ -- unsigned long freeram; /* Available memory size */ -- unsigned long sharedram; /* Amount of shared memory */ -- unsigned long bufferram; /* Memory used by buffers */ -- unsigned long totalswap; /* Total swap space size */ -- unsigned long freeswap; /* swap space still available */ -- unsigned short procs; /* Number of current processes */ -- unsigned short pad; /* Padding needed for m68k */ -- unsigned long totalhigh; /* Total high memory size */ -- unsigned long freehigh; /* Available high memory size */ -- unsigned int mem_unit; /* Memory unit size in bytes */ -- char _f[20 - 2 * sizeof(long) - sizeof(int)]; /* Padding: libc5 uses this.. */ --}; --int sysinfo(struct sysinfo* info); - #ifndef PATH_MAX - # define PATH_MAX 256 - #endif --- -1.7.5 - diff --git a/meta-fsl-ppc/recipes-append/busybox/busybox-1.18.5/0002-work-around-sysinfo.h-versus-linux-.h-problems.patch b/meta-fsl-ppc/recipes-append/busybox/busybox-1.18.5/0002-work-around-sysinfo.h-versus-linux-.h-problems.patch deleted file mode 100644 index 4d4d1756..00000000 --- a/meta-fsl-ppc/recipes-append/busybox/busybox-1.18.5/0002-work-around-sysinfo.h-versus-linux-.h-problems.patch +++ /dev/null @@ -1,95 +0,0 @@ -From f0256fb16d37061e04ca966da9d51d8eb205bc89 Mon Sep 17 00:00:00 2001 -From: Denys Vlasenko -Date: Tue, 26 Jul 2011 11:42:12 +0000 -Subject: *: work around sysinfo.h versus linux/*.h problems - -Signed-off-by: Denys Vlasenko ---- - include/libbb.h | 10 ++++++---- - init/init.c | 3 ++- - procps/free.c | 3 +++ - procps/ps.c | 3 +++ - procps/uptime.c | 4 ++++ - 5 files changed, 18 insertions(+), 5 deletions(-) - -diff --git a/include/libbb.h b/include/libbb.h -index afe3b61..9fcd770 100644 ---- a/include/libbb.h -+++ b/include/libbb.h -@@ -44,10 +44,12 @@ - #ifdef HAVE_SYS_STATFS_H - # include - #endif --/* struct sysinfo is linux-specific */ --#ifdef __linux__ --# include --#endif -+/* Don't do this here: -+ * #include -+ * Some linux/ includes pull in conflicting definition -+ * of struct sysinfo (only in some toolchanins), which breaks build. -+ * Include sys/sysinfo.h only in those files which need it. -+ */ - #if ENABLE_SELINUX - # include - # include -diff --git a/init/init.c b/init/init.c -index 0a0d503..5121b94 100644 ---- a/init/init.c -+++ b/init/init.c -@@ -113,7 +113,8 @@ - #include - #include - #ifdef __linux__ --#include -+# include -+# include - #endif - #if ENABLE_FEATURE_UTMP - # include /* DEAD_PROCESS */ -diff --git a/procps/free.c b/procps/free.c -index efbac5b..706be1b 100644 ---- a/procps/free.c -+++ b/procps/free.c -@@ -10,6 +10,9 @@ - /* getopt not needed */ - - #include "libbb.h" -+#ifdef __linux__ -+# include -+#endif - - struct globals { - unsigned mem_unit; -diff --git a/procps/ps.c b/procps/ps.c -index 48b55a7..e9e6ca9 100644 ---- a/procps/ps.c -+++ b/procps/ps.c -@@ -16,6 +16,9 @@ enum { MAX_WIDTH = 2*1024 }; - - #if ENABLE_DESKTOP - -+#ifdef __linux__ -+# include -+#endif - #include /* for times() */ - #ifndef AT_CLKTCK - #define AT_CLKTCK 17 -diff --git a/procps/uptime.c b/procps/uptime.c -index 5c48795..eda782c 100644 ---- a/procps/uptime.c -+++ b/procps/uptime.c -@@ -16,6 +16,10 @@ - /* getopt not needed */ - - #include "libbb.h" -+#ifdef __linux__ -+# include -+#endif -+ - - #ifndef FSHIFT - # define FSHIFT 16 /* nr of bits of precision */ --- -1.7.5 - diff --git a/meta-fsl-ppc/recipes-append/busybox/busybox-1.18.5/defconfig-maximum b/meta-fsl-ppc/recipes-append/busybox/busybox-1.18.5/defconfig-maximum deleted file mode 100644 index 6073476b..00000000 --- a/meta-fsl-ppc/recipes-append/busybox/busybox-1.18.5/defconfig-maximum +++ /dev/null @@ -1,990 +0,0 @@ -# -# Automatically generated make config: don't edit -# Busybox version: 1.18.5 -# Wed Apr 11 09:06:27 2012 -# -CONFIG_HAVE_DOT_CONFIG=y - -# -# Busybox Settings -# - -# -# General Configuration -# -# CONFIG_DESKTOP is not set -# CONFIG_EXTRA_COMPAT is not set -CONFIG_INCLUDE_SUSv2=y -# CONFIG_USE_PORTABLE_CODE is not set -CONFIG_PLATFORM_LINUX=y -CONFIG_FEATURE_BUFFERS_USE_MALLOC=y -# CONFIG_FEATURE_BUFFERS_GO_ON_STACK is not set -# CONFIG_FEATURE_BUFFERS_GO_IN_BSS is not set -CONFIG_SHOW_USAGE=y -CONFIG_FEATURE_VERBOSE_USAGE=y -CONFIG_FEATURE_COMPRESS_USAGE=y -CONFIG_FEATURE_INSTALLER=y -# CONFIG_INSTALL_NO_USR is not set -CONFIG_LOCALE_SUPPORT=y -# CONFIG_UNICODE_SUPPORT is not set -# CONFIG_UNICODE_USING_LOCALE is not set -# CONFIG_FEATURE_CHECK_UNICODE_IN_ENV is not set -CONFIG_SUBST_WCHAR=0 -CONFIG_LAST_SUPPORTED_WCHAR=0 -# CONFIG_UNICODE_COMBINING_WCHARS is not set -# CONFIG_UNICODE_WIDE_WCHARS is not set -# CONFIG_UNICODE_BIDI_SUPPORT is not set -# CONFIG_UNICODE_NEUTRAL_TABLE is not set -# CONFIG_UNICODE_PRESERVE_BROKEN is not set -CONFIG_LONG_OPTS=y -CONFIG_FEATURE_DEVPTS=y -# CONFIG_FEATURE_CLEAN_UP is not set -CONFIG_FEATURE_WTMP=y -CONFIG_FEATURE_UTMP=y -CONFIG_FEATURE_PIDFILE=y -CONFIG_FEATURE_SUID=y -CONFIG_FEATURE_SUID_CONFIG=y -CONFIG_FEATURE_SUID_CONFIG_QUIET=y -# CONFIG_SELINUX is not set -# CONFIG_FEATURE_PREFER_APPLETS is not set -CONFIG_BUSYBOX_EXEC_PATH="/proc/self/exe" -CONFIG_FEATURE_SYSLOG=y -CONFIG_FEATURE_HAVE_RPC=y - -# -# Build Options -# -# CONFIG_STATIC is not set -# CONFIG_PIE is not set -# CONFIG_NOMMU is not set -# CONFIG_BUILD_LIBBUSYBOX is not set -# CONFIG_FEATURE_INDIVIDUAL is not set -# CONFIG_FEATURE_SHARED_BUSYBOX is not set -CONFIG_LFS=y -CONFIG_CROSS_COMPILER_PREFIX="" -CONFIG_EXTRA_CFLAGS="" - -# -# Debugging Options -# -# CONFIG_DEBUG is not set -# CONFIG_DEBUG_PESSIMIZE is not set -# CONFIG_WERROR is not set -CONFIG_NO_DEBUG_LIB=y -# CONFIG_DMALLOC is not set -# CONFIG_EFENCE is not set - -# -# Installation Options ("make install" behavior) -# -CONFIG_INSTALL_APPLET_SYMLINKS=y -# CONFIG_INSTALL_APPLET_HARDLINKS is not set -# CONFIG_INSTALL_APPLET_SCRIPT_WRAPPERS is not set -# CONFIG_INSTALL_APPLET_DONT is not set -# CONFIG_INSTALL_SH_APPLET_SYMLINK is not set -# CONFIG_INSTALL_SH_APPLET_HARDLINK is not set -# CONFIG_INSTALL_SH_APPLET_SCRIPT_WRAPPER is not set -CONFIG_PREFIX="./_install" - -# -# Busybox Library Tuning -# -CONFIG_PASSWORD_MINLEN=6 -CONFIG_MD5_SIZE_VS_SPEED=2 -CONFIG_FEATURE_FAST_TOP=y -# CONFIG_FEATURE_ETC_NETWORKS is not set -CONFIG_FEATURE_USE_TERMIOS=y -CONFIG_FEATURE_EDITING=y -CONFIG_FEATURE_EDITING_MAX_LEN=1024 -# CONFIG_FEATURE_EDITING_VI is not set -CONFIG_FEATURE_EDITING_HISTORY=255 -CONFIG_FEATURE_EDITING_SAVEHISTORY=y -CONFIG_FEATURE_TAB_COMPLETION=y -CONFIG_FEATURE_USERNAME_COMPLETION=y -CONFIG_FEATURE_EDITING_FANCY_PROMPT=y -# CONFIG_FEATURE_EDITING_ASK_TERMINAL is not set -CONFIG_FEATURE_NON_POSIX_CP=y -# CONFIG_FEATURE_VERBOSE_CP_MESSAGE is not set -CONFIG_FEATURE_COPYBUF_KB=4 -CONFIG_MONOTONIC_SYSCALL=y -CONFIG_IOCTL_HEX2STR_ERROR=y -CONFIG_FEATURE_HWIB=y - -# -# Applets -# - -# -# Archival Utilities -# -CONFIG_FEATURE_SEAMLESS_XZ=y -CONFIG_FEATURE_SEAMLESS_LZMA=y -CONFIG_FEATURE_SEAMLESS_BZ2=y -CONFIG_FEATURE_SEAMLESS_GZ=y -CONFIG_FEATURE_SEAMLESS_Z=y -CONFIG_AR=y -CONFIG_FEATURE_AR_LONG_FILENAMES=y -CONFIG_FEATURE_AR_CREATE=y -CONFIG_BUNZIP2=y -CONFIG_BZIP2=y -CONFIG_CPIO=y -CONFIG_FEATURE_CPIO_O=y -CONFIG_FEATURE_CPIO_P=y -# CONFIG_DPKG is not set -# CONFIG_DPKG_DEB is not set -# CONFIG_FEATURE_DPKG_DEB_EXTRACT_ONLY is not set -CONFIG_GUNZIP=y -CONFIG_GZIP=y -CONFIG_FEATURE_GZIP_LONG_OPTIONS=y -CONFIG_LZOP=y -# CONFIG_LZOP_COMPR_HIGH is not set -CONFIG_RPM2CPIO=y -CONFIG_RPM=y -CONFIG_TAR=y -CONFIG_FEATURE_TAR_CREATE=y -CONFIG_FEATURE_TAR_AUTODETECT=y -CONFIG_FEATURE_TAR_FROM=y -CONFIG_FEATURE_TAR_OLDGNU_COMPATIBILITY=y -CONFIG_FEATURE_TAR_OLDSUN_COMPATIBILITY=y -CONFIG_FEATURE_TAR_GNU_EXTENSIONS=y -CONFIG_FEATURE_TAR_LONG_OPTIONS=y -CONFIG_FEATURE_TAR_TO_COMMAND=y -CONFIG_FEATURE_TAR_UNAME_GNAME=y -CONFIG_FEATURE_TAR_NOPRESERVE_TIME=y -# CONFIG_FEATURE_TAR_SELINUX is not set -# CONFIG_UNCOMPRESS is not set -CONFIG_UNLZMA=y -CONFIG_FEATURE_LZMA_FAST=y -CONFIG_LZMA=y -CONFIG_UNXZ=y -CONFIG_XZ=y -CONFIG_UNZIP=y - -# -# Coreutils -# -CONFIG_BASENAME=y -CONFIG_CAT=y -CONFIG_DATE=y -CONFIG_FEATURE_DATE_ISOFMT=y -# CONFIG_FEATURE_DATE_NANO is not set -CONFIG_FEATURE_DATE_COMPAT=y -CONFIG_TEST=y -CONFIG_FEATURE_TEST_64=y -CONFIG_TR=y -CONFIG_FEATURE_TR_CLASSES=y -CONFIG_FEATURE_TR_EQUIV=y -CONFIG_BASE64=y -CONFIG_CAL=y -CONFIG_CATV=y -CONFIG_CHGRP=y -CONFIG_CHMOD=y -CONFIG_CHOWN=y -CONFIG_FEATURE_CHOWN_LONG_OPTIONS=y -CONFIG_CHROOT=y -CONFIG_CKSUM=y -CONFIG_COMM=y -CONFIG_CP=y -CONFIG_FEATURE_CP_LONG_OPTIONS=y -CONFIG_CUT=y -CONFIG_DD=y -CONFIG_FEATURE_DD_SIGNAL_HANDLING=y -CONFIG_FEATURE_DD_THIRD_STATUS_LINE=y -CONFIG_FEATURE_DD_IBS_OBS=y -CONFIG_DF=y -CONFIG_FEATURE_DF_FANCY=y -CONFIG_DIRNAME=y -CONFIG_DOS2UNIX=y -CONFIG_UNIX2DOS=y -CONFIG_DU=y -CONFIG_FEATURE_DU_DEFAULT_BLOCKSIZE_1K=y -CONFIG_ECHO=y -CONFIG_FEATURE_FANCY_ECHO=y -CONFIG_ENV=y -CONFIG_FEATURE_ENV_LONG_OPTIONS=y -CONFIG_EXPAND=y -CONFIG_FEATURE_EXPAND_LONG_OPTIONS=y -CONFIG_EXPR=y -CONFIG_EXPR_MATH_SUPPORT_64=y -CONFIG_FALSE=y -CONFIG_FOLD=y -CONFIG_FSYNC=y -CONFIG_HEAD=y -CONFIG_FEATURE_FANCY_HEAD=y -CONFIG_HOSTID=y -CONFIG_ID=y -CONFIG_INSTALL=y -CONFIG_FEATURE_INSTALL_LONG_OPTIONS=y -CONFIG_LENGTH=y -CONFIG_LN=y -CONFIG_LOGNAME=y -CONFIG_LS=y -CONFIG_FEATURE_LS_FILETYPES=y -CONFIG_FEATURE_LS_FOLLOWLINKS=y -CONFIG_FEATURE_LS_RECURSIVE=y -CONFIG_FEATURE_LS_SORTFILES=y -CONFIG_FEATURE_LS_TIMESTAMPS=y -CONFIG_FEATURE_LS_USERNAME=y -CONFIG_FEATURE_LS_COLOR=y -CONFIG_FEATURE_LS_COLOR_IS_DEFAULT=y -CONFIG_MD5SUM=y -CONFIG_MKDIR=y -CONFIG_FEATURE_MKDIR_LONG_OPTIONS=y -CONFIG_MKFIFO=y -CONFIG_MKNOD=y -CONFIG_MV=y -CONFIG_FEATURE_MV_LONG_OPTIONS=y -CONFIG_NICE=y -CONFIG_NOHUP=y -CONFIG_OD=y -CONFIG_PRINTENV=y -CONFIG_PRINTF=y -CONFIG_PWD=y -CONFIG_READLINK=y -CONFIG_FEATURE_READLINK_FOLLOW=y -CONFIG_REALPATH=y -CONFIG_RM=y -CONFIG_RMDIR=y -CONFIG_FEATURE_RMDIR_LONG_OPTIONS=y -CONFIG_SEQ=y -CONFIG_SHA1SUM=y -CONFIG_SHA256SUM=y -CONFIG_SHA512SUM=y -CONFIG_SLEEP=y -CONFIG_FEATURE_FANCY_SLEEP=y -CONFIG_FEATURE_FLOAT_SLEEP=y -CONFIG_SORT=y -CONFIG_FEATURE_SORT_BIG=y -CONFIG_SPLIT=y -CONFIG_FEATURE_SPLIT_FANCY=y -CONFIG_STAT=y -CONFIG_FEATURE_STAT_FORMAT=y -CONFIG_STTY=y -CONFIG_SUM=y -CONFIG_SYNC=y -CONFIG_TAC=y -CONFIG_TAIL=y -CONFIG_FEATURE_FANCY_TAIL=y -CONFIG_TEE=y -CONFIG_FEATURE_TEE_USE_BLOCK_IO=y -CONFIG_TOUCH=y -CONFIG_TRUE=y -CONFIG_TTY=y -CONFIG_UNAME=y -CONFIG_UNEXPAND=y -CONFIG_FEATURE_UNEXPAND_LONG_OPTIONS=y -CONFIG_UNIQ=y -CONFIG_USLEEP=y -CONFIG_UUDECODE=y -CONFIG_UUENCODE=y -CONFIG_WC=y -CONFIG_FEATURE_WC_LARGE=y -CONFIG_WHO=y -CONFIG_WHOAMI=y -CONFIG_YES=y - -# -# Common options for cp and mv -# -CONFIG_FEATURE_PRESERVE_HARDLINKS=y - -# -# Common options for ls, more and telnet -# -CONFIG_FEATURE_AUTOWIDTH=y - -# -# Common options for df, du, ls -# -CONFIG_FEATURE_HUMAN_READABLE=y - -# -# Common options for md5sum, sha1sum, sha256sum, sha512sum -# -CONFIG_FEATURE_MD5_SHA1_SUM_CHECK=y - -# -# Console Utilities -# -CONFIG_CHVT=y -CONFIG_FGCONSOLE=y -CONFIG_CLEAR=y -CONFIG_DEALLOCVT=y -CONFIG_DUMPKMAP=y -CONFIG_KBD_MODE=y -CONFIG_LOADFONT=y -CONFIG_LOADKMAP=y -CONFIG_OPENVT=y -CONFIG_RESET=y -CONFIG_RESIZE=y -CONFIG_FEATURE_RESIZE_PRINT=y -CONFIG_SETCONSOLE=y -CONFIG_FEATURE_SETCONSOLE_LONG_OPTIONS=y -CONFIG_SETFONT=y -CONFIG_FEATURE_SETFONT_TEXTUAL_MAP=y -CONFIG_DEFAULT_SETFONT_DIR="" -CONFIG_SETKEYCODES=y -CONFIG_SETLOGCONS=y -CONFIG_SHOWKEY=y - -# -# Common options for loadfont and setfont -# -CONFIG_FEATURE_LOADFONT_PSF2=y -CONFIG_FEATURE_LOADFONT_RAW=y - -# -# Debian Utilities -# -CONFIG_MKTEMP=y -CONFIG_PIPE_PROGRESS=y -CONFIG_RUN_PARTS=y -CONFIG_FEATURE_RUN_PARTS_LONG_OPTIONS=y -CONFIG_FEATURE_RUN_PARTS_FANCY=y -CONFIG_START_STOP_DAEMON=y -CONFIG_FEATURE_START_STOP_DAEMON_FANCY=y -CONFIG_FEATURE_START_STOP_DAEMON_LONG_OPTIONS=y -CONFIG_WHICH=y - -# -# Editors -# -CONFIG_PATCH=y -CONFIG_AWK=y -CONFIG_FEATURE_AWK_LIBM=y -CONFIG_CMP=y -CONFIG_DIFF=y -CONFIG_FEATURE_DIFF_LONG_OPTIONS=y -CONFIG_FEATURE_DIFF_DIR=y -CONFIG_ED=y -CONFIG_SED=y -CONFIG_VI=y -CONFIG_FEATURE_VI_MAX_LEN=4096 -CONFIG_FEATURE_VI_8BIT=y -CONFIG_FEATURE_VI_COLON=y -CONFIG_FEATURE_VI_YANKMARK=y -CONFIG_FEATURE_VI_SEARCH=y -CONFIG_FEATURE_VI_USE_SIGNALS=y -CONFIG_FEATURE_VI_DOT_CMD=y -CONFIG_FEATURE_VI_READONLY=y -CONFIG_FEATURE_VI_SETOPTS=y -CONFIG_FEATURE_VI_SET=y -CONFIG_FEATURE_VI_WIN_RESIZE=y -CONFIG_FEATURE_VI_ASK_TERMINAL=y -CONFIG_FEATURE_VI_OPTIMIZE_CURSOR=y -CONFIG_FEATURE_ALLOW_EXEC=y - -# -# Finding Utilities -# -CONFIG_FIND=y -CONFIG_FEATURE_FIND_PRINT0=y -CONFIG_FEATURE_FIND_MTIME=y -CONFIG_FEATURE_FIND_MMIN=y -CONFIG_FEATURE_FIND_PERM=y -CONFIG_FEATURE_FIND_TYPE=y -CONFIG_FEATURE_FIND_XDEV=y -CONFIG_FEATURE_FIND_MAXDEPTH=y -CONFIG_FEATURE_FIND_NEWER=y -CONFIG_FEATURE_FIND_INUM=y -CONFIG_FEATURE_FIND_EXEC=y -CONFIG_FEATURE_FIND_USER=y -CONFIG_FEATURE_FIND_GROUP=y -CONFIG_FEATURE_FIND_NOT=y -CONFIG_FEATURE_FIND_DEPTH=y -CONFIG_FEATURE_FIND_PAREN=y -CONFIG_FEATURE_FIND_SIZE=y -CONFIG_FEATURE_FIND_PRUNE=y -CONFIG_FEATURE_FIND_DELETE=y -CONFIG_FEATURE_FIND_PATH=y -CONFIG_FEATURE_FIND_REGEX=y -# CONFIG_FEATURE_FIND_CONTEXT is not set -CONFIG_FEATURE_FIND_LINKS=y -CONFIG_GREP=y -CONFIG_FEATURE_GREP_EGREP_ALIAS=y -CONFIG_FEATURE_GREP_FGREP_ALIAS=y -CONFIG_FEATURE_GREP_CONTEXT=y -CONFIG_XARGS=y -CONFIG_FEATURE_XARGS_SUPPORT_CONFIRMATION=y -CONFIG_FEATURE_XARGS_SUPPORT_QUOTES=y -CONFIG_FEATURE_XARGS_SUPPORT_TERMOPT=y -CONFIG_FEATURE_XARGS_SUPPORT_ZERO_TERM=y - -# -# Init Utilities -# -# CONFIG_BOOTCHARTD is not set -# CONFIG_FEATURE_BOOTCHARTD_BLOATED_HEADER is not set -# CONFIG_FEATURE_BOOTCHARTD_CONFIG_FILE is not set -CONFIG_HALT=y -# CONFIG_FEATURE_CALL_TELINIT is not set -CONFIG_TELINIT_PATH="" -# CONFIG_INIT is not set -# CONFIG_FEATURE_USE_INITTAB is not set -# CONFIG_FEATURE_KILL_REMOVED is not set -CONFIG_FEATURE_KILL_DELAY=0 -# CONFIG_FEATURE_INIT_SCTTY is not set -# CONFIG_FEATURE_INIT_SYSLOG is not set -# CONFIG_FEATURE_EXTRA_QUIET is not set -# CONFIG_FEATURE_INIT_COREDUMPS is not set -# CONFIG_FEATURE_INITRD is not set -CONFIG_INIT_TERMINAL_TYPE="" -# CONFIG_MESG is not set - -# -# Login/Password Management Utilities -# -# CONFIG_ADD_SHELL is not set -# CONFIG_REMOVE_SHELL is not set -# CONFIG_FEATURE_SHADOWPASSWDS is not set -# CONFIG_USE_BB_PWD_GRP is not set -# CONFIG_USE_BB_SHADOW is not set -CONFIG_USE_BB_CRYPT=y -CONFIG_USE_BB_CRYPT_SHA=y -# CONFIG_ADDUSER is not set -# CONFIG_FEATURE_ADDUSER_LONG_OPTIONS is not set -# CONFIG_FEATURE_CHECK_NAMES is not set -CONFIG_FIRST_SYSTEM_ID=0 -CONFIG_LAST_SYSTEM_ID=0 -# CONFIG_ADDGROUP is not set -# CONFIG_FEATURE_ADDGROUP_LONG_OPTIONS is not set -# CONFIG_FEATURE_ADDUSER_TO_GROUP is not set -# CONFIG_DELUSER is not set -# CONFIG_DELGROUP is not set -# CONFIG_FEATURE_DEL_USER_FROM_GROUP is not set -# CONFIG_GETTY is not set -# CONFIG_LOGIN is not set -# CONFIG_PAM is not set -# CONFIG_LOGIN_SCRIPTS is not set -# CONFIG_FEATURE_NOLOGIN is not set -# CONFIG_FEATURE_SECURETTY is not set -# CONFIG_PASSWD is not set -# CONFIG_FEATURE_PASSWD_WEAK_CHECK is not set -# CONFIG_CRYPTPW is not set -# CONFIG_CHPASSWD is not set -# CONFIG_SU is not set -# CONFIG_FEATURE_SU_SYSLOG is not set -# CONFIG_FEATURE_SU_CHECKS_SHELLS is not set -# CONFIG_SULOGIN is not set -# CONFIG_VLOCK is not set - -# -# Linux Ext2 FS Progs -# -CONFIG_CHATTR=y -CONFIG_FSCK=y -CONFIG_LSATTR=y -# CONFIG_TUNE2FS is not set - -# -# Linux Module Utilities -# -# CONFIG_MODINFO is not set -# CONFIG_MODPROBE_SMALL is not set -# CONFIG_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE is not set -# CONFIG_FEATURE_MODPROBE_SMALL_CHECK_ALREADY_LOADED is not set -CONFIG_INSMOD=y -CONFIG_RMMOD=y -CONFIG_LSMOD=y -# CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT is not set -CONFIG_MODPROBE=y -# CONFIG_FEATURE_MODPROBE_BLACKLIST is not set -# CONFIG_DEPMOD is not set - -# -# Options common to multiple modutils -# -# CONFIG_FEATURE_2_4_MODULES is not set -# CONFIG_FEATURE_INSMOD_TRY_MMAP is not set -# CONFIG_FEATURE_INSMOD_VERSION_CHECKING is not set -# CONFIG_FEATURE_INSMOD_KSYMOOPS_SYMBOLS is not set -# CONFIG_FEATURE_INSMOD_LOADINKMEM is not set -# CONFIG_FEATURE_INSMOD_LOAD_MAP is not set -# CONFIG_FEATURE_INSMOD_LOAD_MAP_FULL is not set -CONFIG_FEATURE_CHECK_TAINTED_MODULE=y -CONFIG_FEATURE_MODUTILS_ALIAS=y -CONFIG_FEATURE_MODUTILS_SYMBOLS=y -CONFIG_DEFAULT_MODULES_DIR="/lib/modules" -CONFIG_DEFAULT_DEPMOD_FILE="modules.dep" - -# -# Linux System Utilities -# -# CONFIG_BLOCKDEV is not set -# CONFIG_REV is not set -# CONFIG_ACPID is not set -# CONFIG_FEATURE_ACPID_COMPAT is not set -# CONFIG_BLKID is not set -CONFIG_DMESG=y -CONFIG_FEATURE_DMESG_PRETTY=y -CONFIG_FBSET=y -CONFIG_FEATURE_FBSET_FANCY=y -CONFIG_FEATURE_FBSET_READMODE=y -# CONFIG_FDFLUSH is not set -# CONFIG_FDFORMAT is not set -CONFIG_FDISK=y -CONFIG_FDISK_SUPPORT_LARGE_DISKS=y -CONFIG_FEATURE_FDISK_WRITABLE=y -# CONFIG_FEATURE_AIX_LABEL is not set -# CONFIG_FEATURE_SGI_LABEL is not set -# CONFIG_FEATURE_SUN_LABEL is not set -# CONFIG_FEATURE_OSF_LABEL is not set -# CONFIG_FEATURE_GPT_LABEL is not set -CONFIG_FEATURE_FDISK_ADVANCED=y -CONFIG_FINDFS=y -CONFIG_FLOCK=y -CONFIG_FREERAMDISK=y -CONFIG_FSCK_MINIX=y -CONFIG_MKFS_EXT2=y -CONFIG_MKFS_MINIX=y -CONFIG_FEATURE_MINIX2=y -# CONFIG_MKFS_REISER is not set -CONFIG_MKFS_VFAT=y -CONFIG_GETOPT=y -CONFIG_FEATURE_GETOPT_LONG=y -CONFIG_HEXDUMP=y -CONFIG_FEATURE_HEXDUMP_REVERSE=y -CONFIG_HD=y -CONFIG_HWCLOCK=y -CONFIG_FEATURE_HWCLOCK_LONG_OPTIONS=y -CONFIG_FEATURE_HWCLOCK_ADJTIME_FHS=y -CONFIG_IPCRM=y -CONFIG_IPCS=y -CONFIG_LOSETUP=y -CONFIG_LSPCI=y -CONFIG_LSUSB=y -# CONFIG_MDEV is not set -# CONFIG_FEATURE_MDEV_CONF is not set -# CONFIG_FEATURE_MDEV_RENAME is not set -# CONFIG_FEATURE_MDEV_RENAME_REGEXP is not set -# CONFIG_FEATURE_MDEV_EXEC is not set -# CONFIG_FEATURE_MDEV_LOAD_FIRMWARE is not set -CONFIG_MKSWAP=y -CONFIG_FEATURE_MKSWAP_UUID=y -CONFIG_MORE=y -CONFIG_MOUNT=y -CONFIG_FEATURE_MOUNT_FAKE=y -CONFIG_FEATURE_MOUNT_VERBOSE=y -# CONFIG_FEATURE_MOUNT_HELPERS is not set -CONFIG_FEATURE_MOUNT_LABEL=y -CONFIG_FEATURE_MOUNT_NFS=y -CONFIG_FEATURE_MOUNT_CIFS=y -CONFIG_FEATURE_MOUNT_FLAGS=y -CONFIG_FEATURE_MOUNT_FSTAB=y -CONFIG_PIVOT_ROOT=y -CONFIG_RDATE=y -# CONFIG_RDEV is not set -# CONFIG_READPROFILE is not set -# CONFIG_RTCWAKE is not set -# CONFIG_SCRIPT is not set -# CONFIG_SCRIPTREPLAY is not set -# CONFIG_SETARCH is not set -CONFIG_SWAPONOFF=y -CONFIG_FEATURE_SWAPON_PRI=y -CONFIG_SWITCH_ROOT=y -CONFIG_UMOUNT=y -CONFIG_FEATURE_UMOUNT_ALL=y - -# -# Common options for mount/umount -# -CONFIG_FEATURE_MOUNT_LOOP=y -CONFIG_FEATURE_MOUNT_LOOP_CREATE=y -# CONFIG_FEATURE_MTAB_SUPPORT is not set -CONFIG_VOLUMEID=y - -# -# Filesystem/Volume identification -# -# CONFIG_FEATURE_VOLUMEID_EXT is not set -# CONFIG_FEATURE_VOLUMEID_BTRFS is not set -# CONFIG_FEATURE_VOLUMEID_REISERFS is not set -# CONFIG_FEATURE_VOLUMEID_FAT is not set -# CONFIG_FEATURE_VOLUMEID_HFS is not set -# CONFIG_FEATURE_VOLUMEID_JFS is not set -# CONFIG_FEATURE_VOLUMEID_XFS is not set -# CONFIG_FEATURE_VOLUMEID_NTFS is not set -# CONFIG_FEATURE_VOLUMEID_ISO9660 is not set -# CONFIG_FEATURE_VOLUMEID_UDF is not set -# CONFIG_FEATURE_VOLUMEID_LUKS is not set -# CONFIG_FEATURE_VOLUMEID_LINUXSWAP is not set -# CONFIG_FEATURE_VOLUMEID_CRAMFS is not set -# CONFIG_FEATURE_VOLUMEID_ROMFS is not set -# CONFIG_FEATURE_VOLUMEID_SYSV is not set -# CONFIG_FEATURE_VOLUMEID_OCFS2 is not set -# CONFIG_FEATURE_VOLUMEID_LINUXRAID is not set - -# -# Miscellaneous Utilities -# -# CONFIG_CONSPY is not set -# CONFIG_NANDWRITE is not set -# CONFIG_NANDDUMP is not set -# CONFIG_UBIATTACH is not set -# CONFIG_UBIDETACH is not set -# CONFIG_ADJTIMEX is not set -# CONFIG_BBCONFIG is not set -# CONFIG_FEATURE_COMPRESS_BBCONFIG is not set -# CONFIG_BEEP is not set -CONFIG_FEATURE_BEEP_FREQ=0 -CONFIG_FEATURE_BEEP_LENGTH_MS=0 -# CONFIG_CHAT is not set -# CONFIG_FEATURE_CHAT_NOFAIL is not set -# CONFIG_FEATURE_CHAT_TTY_HIFI is not set -# CONFIG_FEATURE_CHAT_IMPLICIT_CR is not set -# CONFIG_FEATURE_CHAT_SWALLOW_OPTS is not set -# CONFIG_FEATURE_CHAT_SEND_ESCAPES is not set -# CONFIG_FEATURE_CHAT_VAR_ABORT_LEN is not set -# CONFIG_FEATURE_CHAT_CLR_ABORT is not set -CONFIG_CHRT=y -CONFIG_CROND=y -CONFIG_FEATURE_CROND_D=y -CONFIG_FEATURE_CROND_CALL_SENDMAIL=y -CONFIG_FEATURE_CROND_DIR="/var/spool/cron" -CONFIG_CRONTAB=y -CONFIG_DC=y -CONFIG_FEATURE_DC_LIBM=y -# CONFIG_DEVFSD is not set -# CONFIG_DEVFSD_MODLOAD is not set -# CONFIG_DEVFSD_FG_NP is not set -# CONFIG_DEVFSD_VERBOSE is not set -# CONFIG_FEATURE_DEVFS is not set -# CONFIG_DEVMEM is not set -# CONFIG_EJECT is not set -# CONFIG_FEATURE_EJECT_SCSI is not set -# CONFIG_FBSPLASH is not set -# CONFIG_FLASHCP is not set -# CONFIG_FLASH_LOCK is not set -# CONFIG_FLASH_UNLOCK is not set -# CONFIG_FLASH_ERASEALL is not set -# CONFIG_IONICE is not set -# CONFIG_INOTIFYD is not set -CONFIG_LAST=y -# CONFIG_FEATURE_LAST_SMALL is not set -CONFIG_FEATURE_LAST_FANCY=y -CONFIG_LESS=y -CONFIG_FEATURE_LESS_MAXLINES=9999999 -CONFIG_FEATURE_LESS_BRACKETS=y -CONFIG_FEATURE_LESS_FLAGS=y -CONFIG_FEATURE_LESS_MARKS=y -CONFIG_FEATURE_LESS_REGEXP=y -CONFIG_FEATURE_LESS_WINCH=y -CONFIG_FEATURE_LESS_DASHCMD=y -CONFIG_FEATURE_LESS_LINENUMS=y -CONFIG_HDPARM=y -CONFIG_FEATURE_HDPARM_GET_IDENTITY=y -CONFIG_FEATURE_HDPARM_HDIO_SCAN_HWIF=y -CONFIG_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF=y -CONFIG_FEATURE_HDPARM_HDIO_DRIVE_RESET=y -CONFIG_FEATURE_HDPARM_HDIO_TRISTATE_HWIF=y -CONFIG_FEATURE_HDPARM_HDIO_GETSET_DMA=y -# CONFIG_MAKEDEVS is not set -# CONFIG_FEATURE_MAKEDEVS_LEAF is not set -# CONFIG_FEATURE_MAKEDEVS_TABLE is not set -CONFIG_MAN=y -CONFIG_MICROCOM=y -CONFIG_MOUNTPOINT=y -# CONFIG_MT is not set -# CONFIG_RAIDAUTORUN is not set -# CONFIG_READAHEAD is not set -# CONFIG_RFKILL is not set -CONFIG_RUNLEVEL=y -CONFIG_RX=y -CONFIG_SETSID=y -CONFIG_STRINGS=y -# CONFIG_TASKSET is not set -# CONFIG_FEATURE_TASKSET_FANCY is not set -CONFIG_TIME=y -CONFIG_TIMEOUT=y -CONFIG_TTYSIZE=y -# CONFIG_VOLNAME is not set -CONFIG_WALL=y -CONFIG_WATCHDOG=y - -# -# Networking Utilities -# -CONFIG_NBDCLIENT=y -CONFIG_NC=y -CONFIG_NC_SERVER=y -CONFIG_NC_EXTRA=y -# CONFIG_NC_110_COMPAT is not set -CONFIG_FEATURE_IPV6=y -# CONFIG_FEATURE_UNIX_LOCAL is not set -CONFIG_FEATURE_PREFER_IPV4_ADDRESS=y -# CONFIG_VERBOSE_RESOLUTION_ERRORS is not set -CONFIG_ARP=y -CONFIG_ARPING=y -CONFIG_BRCTL=y -CONFIG_FEATURE_BRCTL_FANCY=y -CONFIG_FEATURE_BRCTL_SHOW=y -CONFIG_DNSD=y -CONFIG_ETHER_WAKE=y -CONFIG_FAKEIDENTD=y -CONFIG_FTPD=y -CONFIG_FEATURE_FTP_WRITE=y -CONFIG_FEATURE_FTPD_ACCEPT_BROKEN_LIST=y -CONFIG_FTPGET=y -CONFIG_FTPPUT=y -CONFIG_FEATURE_FTPGETPUT_LONG_OPTIONS=y -CONFIG_HOSTNAME=y -CONFIG_HTTPD=y -CONFIG_FEATURE_HTTPD_RANGES=y -CONFIG_FEATURE_HTTPD_USE_SENDFILE=y -CONFIG_FEATURE_HTTPD_SETUID=y -CONFIG_FEATURE_HTTPD_BASIC_AUTH=y -CONFIG_FEATURE_HTTPD_AUTH_MD5=y -CONFIG_FEATURE_HTTPD_CGI=y -CONFIG_FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR=y -CONFIG_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV=y -CONFIG_FEATURE_HTTPD_ENCODE_URL_STR=y -CONFIG_FEATURE_HTTPD_ERROR_PAGES=y -CONFIG_FEATURE_HTTPD_PROXY=y -CONFIG_FEATURE_HTTPD_GZIP=y -CONFIG_IFCONFIG=y -CONFIG_FEATURE_IFCONFIG_STATUS=y -CONFIG_FEATURE_IFCONFIG_SLIP=y -CONFIG_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ=y -CONFIG_FEATURE_IFCONFIG_HW=y -CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS=y -CONFIG_IFENSLAVE=y -CONFIG_IFPLUGD=y -CONFIG_IFUPDOWN=y -CONFIG_IFUPDOWN_IFSTATE_PATH="/var/run/ifstate" -# CONFIG_FEATURE_IFUPDOWN_IP is not set -# CONFIG_FEATURE_IFUPDOWN_IP_BUILTIN is not set -CONFIG_FEATURE_IFUPDOWN_IFCONFIG_BUILTIN=y -CONFIG_FEATURE_IFUPDOWN_IPV4=y -CONFIG_FEATURE_IFUPDOWN_IPV6=y -CONFIG_FEATURE_IFUPDOWN_MAPPING=y -# CONFIG_FEATURE_IFUPDOWN_EXTERNAL_DHCP is not set -CONFIG_INETD=y -CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_ECHO=y -CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DISCARD=y -CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_TIME=y -CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DAYTIME=y -CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_CHARGEN=y -CONFIG_FEATURE_INETD_RPC=y -CONFIG_IP=y -CONFIG_FEATURE_IP_ADDRESS=y -CONFIG_FEATURE_IP_LINK=y -CONFIG_FEATURE_IP_ROUTE=y -CONFIG_FEATURE_IP_TUNNEL=y -CONFIG_FEATURE_IP_RULE=y -CONFIG_FEATURE_IP_SHORT_FORMS=y -# CONFIG_FEATURE_IP_RARE_PROTOCOLS is not set -CONFIG_IPADDR=y -CONFIG_IPLINK=y -CONFIG_IPROUTE=y -CONFIG_IPTUNNEL=y -CONFIG_IPRULE=y -CONFIG_IPCALC=y -CONFIG_FEATURE_IPCALC_FANCY=y -CONFIG_FEATURE_IPCALC_LONG_OPTIONS=y -CONFIG_NAMEIF=y -CONFIG_FEATURE_NAMEIF_EXTENDED=y -CONFIG_NETSTAT=y -CONFIG_FEATURE_NETSTAT_WIDE=y -CONFIG_FEATURE_NETSTAT_PRG=y -CONFIG_NSLOOKUP=y -CONFIG_NTPD=y -CONFIG_FEATURE_NTPD_SERVER=y -CONFIG_PING=y -CONFIG_PING6=y -CONFIG_FEATURE_FANCY_PING=y -CONFIG_PSCAN=y -CONFIG_ROUTE=y -CONFIG_SLATTACH=y -CONFIG_TCPSVD=y -CONFIG_TELNET=y -CONFIG_FEATURE_TELNET_TTYPE=y -CONFIG_FEATURE_TELNET_AUTOLOGIN=y -CONFIG_TELNETD=y -CONFIG_FEATURE_TELNETD_STANDALONE=y -CONFIG_FEATURE_TELNETD_INETD_WAIT=y -CONFIG_TFTP=y -CONFIG_TFTPD=y - -# -# Common options for tftp/tftpd -# -CONFIG_FEATURE_TFTP_GET=y -CONFIG_FEATURE_TFTP_PUT=y -CONFIG_FEATURE_TFTP_BLOCKSIZE=y -CONFIG_FEATURE_TFTP_PROGRESS_BAR=y -# CONFIG_TFTP_DEBUG is not set -CONFIG_TRACEROUTE=y -CONFIG_TRACEROUTE6=y -CONFIG_FEATURE_TRACEROUTE_VERBOSE=y -# CONFIG_FEATURE_TRACEROUTE_SOURCE_ROUTE is not set -# CONFIG_FEATURE_TRACEROUTE_USE_ICMP is not set -CONFIG_TUNCTL=y -CONFIG_FEATURE_TUNCTL_UG=y -# CONFIG_UDHCPD is not set -# CONFIG_DHCPRELAY is not set -# CONFIG_DUMPLEASES is not set -# CONFIG_FEATURE_UDHCPD_WRITE_LEASES_EARLY is not set -CONFIG_DHCPD_LEASES_FILE="" -# CONFIG_UDHCPC is not set -# CONFIG_FEATURE_UDHCPC_ARPING is not set -# CONFIG_FEATURE_UDHCP_PORT is not set -CONFIG_UDHCP_DEBUG=0 -# CONFIG_FEATURE_UDHCP_RFC3397 is not set -CONFIG_UDHCPC_DEFAULT_SCRIPT="" -CONFIG_UDHCPC_SLACK_FOR_BUGGY_SERVERS=0 -CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS="" -CONFIG_UDPSVD=y -CONFIG_VCONFIG=y -CONFIG_WGET=y -CONFIG_FEATURE_WGET_STATUSBAR=y -CONFIG_FEATURE_WGET_AUTHENTICATION=y -CONFIG_FEATURE_WGET_LONG_OPTIONS=y -CONFIG_FEATURE_WGET_TIMEOUT=y -CONFIG_ZCIP=y - -# -# Print Utilities -# -# CONFIG_LPD is not set -# CONFIG_LPR is not set -# CONFIG_LPQ is not set - -# -# Mail Utilities -# -# CONFIG_MAKEMIME is not set -CONFIG_FEATURE_MIME_CHARSET="" -# CONFIG_POPMAILDIR is not set -# CONFIG_FEATURE_POPMAILDIR_DELIVERY is not set -# CONFIG_REFORMIME is not set -# CONFIG_FEATURE_REFORMIME_COMPAT is not set -# CONFIG_SENDMAIL is not set - -# -# Process Utilities -# -CONFIG_IOSTAT=y -CONFIG_MPSTAT=y -CONFIG_PMAP=y -CONFIG_POWERTOP=y -CONFIG_SMEMCAP=y -CONFIG_FREE=y -CONFIG_FUSER=y -CONFIG_KILL=y -CONFIG_KILLALL=y -CONFIG_KILLALL5=y -CONFIG_NMETER=y -CONFIG_PGREP=y -CONFIG_PIDOF=y -CONFIG_FEATURE_PIDOF_SINGLE=y -CONFIG_FEATURE_PIDOF_OMIT=y -CONFIG_PKILL=y -CONFIG_PS=y -CONFIG_FEATURE_PS_WIDE=y -# CONFIG_FEATURE_PS_TIME is not set -# CONFIG_FEATURE_PS_ADDITIONAL_COLUMNS is not set -# CONFIG_FEATURE_PS_UNUSUAL_SYSTEMS is not set -CONFIG_RENICE=y -CONFIG_BB_SYSCTL=y -CONFIG_TOP=y -CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE=y -CONFIG_FEATURE_TOP_CPU_GLOBAL_PERCENTS=y -CONFIG_FEATURE_TOP_SMP_CPU=y -CONFIG_FEATURE_TOP_DECIMALS=y -CONFIG_FEATURE_TOP_SMP_PROCESS=y -CONFIG_FEATURE_TOPMEM=y -CONFIG_FEATURE_SHOW_THREADS=y -CONFIG_UPTIME=y -CONFIG_WATCH=y - -# -# Runit Utilities -# -# CONFIG_RUNSV is not set -# CONFIG_RUNSVDIR is not set -# CONFIG_FEATURE_RUNSVDIR_LOG is not set -# CONFIG_SV is not set -CONFIG_SV_DEFAULT_SERVICE_DIR="" -# CONFIG_SVLOGD is not set -# CONFIG_CHPST is not set -# CONFIG_SETUIDGID is not set -# CONFIG_ENVUIDGID is not set -# CONFIG_ENVDIR is not set -# CONFIG_SOFTLIMIT is not set -# CONFIG_CHCON is not set -# CONFIG_FEATURE_CHCON_LONG_OPTIONS is not set -# CONFIG_GETENFORCE is not set -# CONFIG_GETSEBOOL is not set -# CONFIG_LOAD_POLICY is not set -# CONFIG_MATCHPATHCON is not set -# CONFIG_RESTORECON is not set -# CONFIG_RUNCON is not set -# CONFIG_FEATURE_RUNCON_LONG_OPTIONS is not set -# CONFIG_SELINUXENABLED is not set -# CONFIG_SETENFORCE is not set -# CONFIG_SETFILES is not set -# CONFIG_FEATURE_SETFILES_CHECK_OPTION is not set -# CONFIG_SETSEBOOL is not set -# CONFIG_SESTATUS is not set - -# -# Shells -# -CONFIG_ASH=y -CONFIG_ASH_BASH_COMPAT=y -CONFIG_ASH_JOB_CONTROL=y -CONFIG_ASH_ALIAS=y -CONFIG_ASH_GETOPTS=y -CONFIG_ASH_BUILTIN_ECHO=y -CONFIG_ASH_BUILTIN_PRINTF=y -CONFIG_ASH_BUILTIN_TEST=y -# CONFIG_ASH_CMDCMD is not set -# CONFIG_ASH_MAIL is not set -CONFIG_ASH_OPTIMIZE_FOR_SIZE=y -# CONFIG_ASH_RANDOM_SUPPORT is not set -CONFIG_ASH_EXPAND_PRMT=y -# CONFIG_CTTYHACK is not set -# CONFIG_HUSH is not set -# CONFIG_HUSH_BASH_COMPAT is not set -# CONFIG_HUSH_BRACE_EXPANSION is not set -# CONFIG_HUSH_HELP is not set -# CONFIG_HUSH_INTERACTIVE is not set -# CONFIG_HUSH_SAVEHISTORY is not set -# CONFIG_HUSH_JOB is not set -# CONFIG_HUSH_TICK is not set -# CONFIG_HUSH_IF is not set -# CONFIG_HUSH_LOOPS is not set -# CONFIG_HUSH_CASE is not set -# CONFIG_HUSH_FUNCTIONS is not set -# CONFIG_HUSH_LOCAL is not set -# CONFIG_HUSH_RANDOM_SUPPORT is not set -# CONFIG_HUSH_EXPORT_N is not set -# CONFIG_HUSH_MODE_X is not set -# CONFIG_MSH is not set -CONFIG_FEATURE_SH_IS_ASH=y -# CONFIG_FEATURE_SH_IS_HUSH is not set -# CONFIG_FEATURE_SH_IS_NONE is not set -# CONFIG_FEATURE_BASH_IS_ASH is not set -# CONFIG_FEATURE_BASH_IS_HUSH is not set -CONFIG_FEATURE_BASH_IS_NONE=y -CONFIG_SH_MATH_SUPPORT=y -CONFIG_SH_MATH_SUPPORT_64=y -CONFIG_FEATURE_SH_EXTRA_QUIET=y -# CONFIG_FEATURE_SH_STANDALONE is not set -# CONFIG_FEATURE_SH_NOFORK is not set - -# -# System Logging Utilities -# -CONFIG_SYSLOGD=y -CONFIG_FEATURE_ROTATE_LOGFILE=y -CONFIG_FEATURE_REMOTE_LOG=y -# CONFIG_FEATURE_SYSLOGD_DUP is not set -CONFIG_FEATURE_SYSLOGD_READ_BUFFER_SIZE=256 -CONFIG_FEATURE_IPC_SYSLOG=y -CONFIG_FEATURE_IPC_SYSLOG_BUFFER_SIZE=16 -CONFIG_LOGREAD=y -CONFIG_FEATURE_LOGREAD_REDUCED_LOCKING=y -CONFIG_KLOGD=y -# CONFIG_FEATURE_KLOGD_KLOGCTL is not set -CONFIG_LOGGER=y diff --git a/meta-fsl-ppc/recipes-append/busybox/busybox-1.18.5/inetd b/meta-fsl-ppc/recipes-append/busybox/busybox-1.18.5/inetd deleted file mode 100644 index cf50bcd5..00000000 --- a/meta-fsl-ppc/recipes-append/busybox/busybox-1.18.5/inetd +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/sh -# -# start/stop inetd super server. - -if ! [ -x /usr/sbin/inetd ]; then - exit 0 -fi - -case "$1" in - start) - echo -n "Starting internet superserver:" - echo -n " inetd" ; start-stop-daemon -S -x /usr/sbin/inetd > /dev/null - echo "." - ;; - stop) - echo -n "Stopping internet superserver:" - echo -n " inetd" ; start-stop-daemon -K -x /usr/sbin/inetd > /dev/null - echo "." - ;; - restart) - echo -n "Restarting internet superserver:" - echo -n " inetd " - killall -HUP inetd - echo "." - ;; - *) - echo "Usage: /etc/init.d/inetd {start|stop|restart}" - exit 1 - ;; -esac - -exit 0 - diff --git a/meta-fsl-ppc/recipes-append/busybox/busybox-1.18.5/inetd.conf b/meta-fsl-ppc/recipes-append/busybox/busybox-1.18.5/inetd.conf deleted file mode 100644 index b02fe850..00000000 --- a/meta-fsl-ppc/recipes-append/busybox/busybox-1.18.5/inetd.conf +++ /dev/null @@ -1,20 +0,0 @@ -# /etc/inetd.conf: see inetd(8) for further informations. -# -# Internet server configuration database -# -# If you want to disable an entry so it isn't touched during -# package updates just comment it out with a single '#' character. -# -# -# -#:INTERNAL: Internal services -#echo stream tcp nowait root internal -#echo dgram udp wait root internal -#chargen stream tcp nowait root internal -#chargen dgram udp wait root internal -#discard stream tcp nowait root internal -#discard dgram udp wait root internal -#daytime stream tcp nowait root internal -#daytime dgram udp wait root internal -#time stream tcp nowait root internal -#time dgram udp wait root internal diff --git a/meta-fsl-ppc/recipes-append/busybox/busybox_1.18.5.bbappend b/meta-fsl-ppc/recipes-append/busybox/busybox_1.18.5.bbappend deleted file mode 100644 index e35a65ee..00000000 --- a/meta-fsl-ppc/recipes-append/busybox/busybox_1.18.5.bbappend +++ /dev/null @@ -1,15 +0,0 @@ -PR .= "+${DISTRO}.0" - -FILESEXTRAPATHS_prepend := "${THISDIR}/busybox-1.18.5:" - -SRC_URI += "file://0001-libbb.h-do-not-use-homegrown-struct-sysinfo.patch \ - file://0002-work-around-sysinfo.h-versus-linux-.h-problems.patch \ - file://inetd \ - file://inetd.conf \ - file://defconfig-maximum \ -" - -do_configure_prepend () { - cp ${WORKDIR}/defconfig-maximum ${WORKDIR}/defconfig -} - -- cgit v1.2.3-54-g00ecf From 5dd6e23661d559bb8ea3ee3e3ad72dc7b889e675 Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Wed, 16 May 2012 12:43:23 -0500 Subject: remove reference to usdpaa files that are not in public git tree Signed-off-by: Matthew McClintock --- meta-fsl-ppc/conf/machine/p2041rdb.conf | 3 +-- meta-fsl-ppc/conf/machine/p3041ds.conf | 3 +-- meta-fsl-ppc/conf/machine/p4080ds.conf | 3 +-- meta-fsl-ppc/conf/machine/p5020ds-64b.conf | 3 +-- meta-fsl-ppc/conf/machine/p5020ds.conf | 3 +-- meta-fsl-ppc/conf/machine/p5040ds.conf | 3 +-- 6 files changed, 6 insertions(+), 12 deletions(-) diff --git a/meta-fsl-ppc/conf/machine/p2041rdb.conf b/meta-fsl-ppc/conf/machine/p2041rdb.conf index bc6b67a9..7ec7dfe8 100644 --- a/meta-fsl-ppc/conf/machine/p2041rdb.conf +++ b/meta-fsl-ppc/conf/machine/p2041rdb.conf @@ -4,8 +4,7 @@ require e500mc.inc UBOOT_MACHINES = "P2041RDB P2041RDB_SECURE_BOOT P2041RDB_SDCARD P2041RDB_SPIFLASH" -KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p2041rdb.dts \ - ${S}/arch/powerpc/boot/dts/p2041rdb-usdpaa.dts" +KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p2041rdb.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet32_smp_defconfig" JFFS2_ERASEBLOCK = "0x10000" diff --git a/meta-fsl-ppc/conf/machine/p3041ds.conf b/meta-fsl-ppc/conf/machine/p3041ds.conf index facfc4af..a948d392 100644 --- a/meta-fsl-ppc/conf/machine/p3041ds.conf +++ b/meta-fsl-ppc/conf/machine/p3041ds.conf @@ -4,8 +4,7 @@ require e500mc.inc UBOOT_MACHINES = "P3041DS P3041DS_NAND P3041DS_SECURE_BOOT P3041DS_SRIOBOOT_MASTER P3041DS_SRIOBOOT_SLAVE P3041DS_SDCARD P3041DS_SPIFLASH" -KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p3041ds.dts \ - ${S}/arch/powerpc/boot/dts/p3041ds-usdpaa.dts" +KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p3041ds.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet32_smp_defconfig" JFFS2_ERASEBLOCK = "0x10000" diff --git a/meta-fsl-ppc/conf/machine/p4080ds.conf b/meta-fsl-ppc/conf/machine/p4080ds.conf index cebedc98..c7121a8c 100644 --- a/meta-fsl-ppc/conf/machine/p4080ds.conf +++ b/meta-fsl-ppc/conf/machine/p4080ds.conf @@ -4,8 +4,7 @@ require e500mc.inc UBOOT_MACHINES = "P4080DS P4080DS_SECURE_BOOT P4080DS_SRIOBOOT_MASTER P4080DS_SRIOBOOT_SLAVE P4080DS_SDCARD P4080DS_SPIFLASH " -KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p4080ds.dts \ - ${S}/arch/powerpc/boot/dts/p4080ds-usdpaa.dts" +KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p4080ds.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet32_smp_defconfig" JFFS2_ERASEBLOCK = "0x10000" diff --git a/meta-fsl-ppc/conf/machine/p5020ds-64b.conf b/meta-fsl-ppc/conf/machine/p5020ds-64b.conf index e9e919df..1d169857 100644 --- a/meta-fsl-ppc/conf/machine/p5020ds-64b.conf +++ b/meta-fsl-ppc/conf/machine/p5020ds-64b.conf @@ -5,8 +5,7 @@ require e5500-64b.inc # TODO: fix 32bit build of u-boot for p5020ds-64b UBOOT_MACHINES = "P5020DS" -KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p5020ds.dts \ - ${S}/arch/powerpc/boot/dts/p5020ds-usdpaa.dts" +KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p5020ds.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet64_smp_defconfig" JFFS2_ERASEBLOCK = "0x10000" diff --git a/meta-fsl-ppc/conf/machine/p5020ds.conf b/meta-fsl-ppc/conf/machine/p5020ds.conf index ab640144..059296f5 100644 --- a/meta-fsl-ppc/conf/machine/p5020ds.conf +++ b/meta-fsl-ppc/conf/machine/p5020ds.conf @@ -4,8 +4,7 @@ require e5500.inc UBOOT_MACHINES = "P5020DS P5020DS_NAND P5020DS_SECURE_BOOT P5020DS_SRIOBOOT_MASTER P5020DS_SRIOBOOT_SLAVE P5020DS_SDCARD P5020DS_SPIFLASH " -KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p5020ds.dts \ - ${S}/arch/powerpc/boot/dts/p5020ds-usdpaa.dts" +KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p5020ds.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet32_smp_defconfig" JFFS2_ERASEBLOCK = "0x10000" diff --git a/meta-fsl-ppc/conf/machine/p5040ds.conf b/meta-fsl-ppc/conf/machine/p5040ds.conf index b8998cac..09634bc6 100644 --- a/meta-fsl-ppc/conf/machine/p5040ds.conf +++ b/meta-fsl-ppc/conf/machine/p5040ds.conf @@ -4,8 +4,7 @@ require e5500.inc UBOOT_MACHINES = "P5040DS" -KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p5040ds.dts \ - ${S}/arch/powerpc/boot/dts/p5040ds-usdpaa.dts" +KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p5040ds.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet32_smp_defconfig" JFFS2_ERASEBLOCK = "0x10000" -- cgit v1.2.3-54-g00ecf From 2c8608864e73f5b211b7c7321a6236245763d6ce Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Wed, 16 May 2012 15:39:00 -0500 Subject: remove reference to internal freescale machines Signed-off-by: Matthew McClintock --- meta-fsl-ppc/conf/distro/fsl.conf | 2 -- 1 file changed, 2 deletions(-) diff --git a/meta-fsl-ppc/conf/distro/fsl.conf b/meta-fsl-ppc/conf/distro/fsl.conf index 7cde60f2..6d4dc342 100644 --- a/meta-fsl-ppc/conf/distro/fsl.conf +++ b/meta-fsl-ppc/conf/distro/fsl.conf @@ -84,8 +84,6 @@ IMAGE_CLASSES = "image_types_uboot" PREFERRED_VERSION_u-boot-mkimage-native_powerpc = "2011.06" PREFERRED_PROVIDER_virtual/libx11 = "libx11" -FREESCALE_GIT = "git://git.am.freescale.net" - SYSVINIT_ENABLED_GETTYS = "" USE_VT = "" SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" -- cgit v1.2.3-54-g00ecf From 346c6c9edad2f98533da5876701c1ee1d0a6b818 Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Thu, 17 May 2012 12:54:04 -0500 Subject: linux-qoriq-sdk.inc: add patch to fix perf compiler issues Signed-off-by: Matthew McClintock --- ...Undef-before-redefining-__attribute_const.patch | 31 ++++++++++++++++++++++ .../recipes-kernel/linux/linux-qoriq-sdk.inc | 3 ++- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 meta-fsl-ppc/recipes-kernel/linux/files/0001-compiler.h-Undef-before-redefining-__attribute_const.patch diff --git a/meta-fsl-ppc/recipes-kernel/linux/files/0001-compiler.h-Undef-before-redefining-__attribute_const.patch b/meta-fsl-ppc/recipes-kernel/linux/files/0001-compiler.h-Undef-before-redefining-__attribute_const.patch new file mode 100644 index 00000000..bf2f6e77 --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/linux/files/0001-compiler.h-Undef-before-redefining-__attribute_const.patch @@ -0,0 +1,31 @@ +From 6f92ab6de9d8daeb575949bbbcbc7bcdcebc60af Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Thu, 5 Jan 2012 11:42:35 -0800 +Subject: [PATCH] compiler.h: Undef before redefining __attribute_const__ + +This is required to avoid warnings like +util/include/linux/compiler.h:8:0: error: "__attribute_const__" redefined [-Werror] + +Signed-off-by: Khem Raj + +Upstream-Status: Pending + +--- + tools/perf/util/include/linux/compiler.h | 4 +++- + 1 files changed, 3 insertions(+), 1 deletions(-) + +--- a/tools/perf/util/include/linux/compiler.h ++++ b/tools/perf/util/include/linux/compiler.h +@@ -4,9 +4,11 @@ + #ifndef __always_inline + #define __always_inline inline + #endif ++#undef __user + #define __user ++#undef __attribute_const__ + #define __attribute_const__ +- ++#undef __used + #define __used __attribute__((__unused__)) + + #endif diff --git a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc index f90d8949..dc650c06 100644 --- a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc +++ b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc @@ -1,12 +1,13 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7" PV = "3.0.6" -PR = "r2" +PR = "r3" SRCREV = "1e3e8ed15249d73a066ddfe2e80882935c35dcb7" SRC_URI = "git://git.freescale.com/ppc/sdk/linux.git \ file://add-no-unused-but-set-variable.patch \ file://add-no-error-array-bounds.patch \ + file://0001-compiler.h-Undef-before-redefining-__attribute_const.patch \ " KSRC ?= "" -- cgit v1.2.3-54-g00ecf From 11c1c40534d8e0b988829a60c1b19106f93409b2 Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Thu, 17 May 2012 15:28:45 -0500 Subject: p1022ds.conf: switch to using xserver-xorg-lite Signed-off-by: Matthew McClintock --- meta-fsl-ppc/conf/machine/p1022ds.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meta-fsl-ppc/conf/machine/p1022ds.conf b/meta-fsl-ppc/conf/machine/p1022ds.conf index 3071bae2..c12dc0aa 100644 --- a/meta-fsl-ppc/conf/machine/p1022ds.conf +++ b/meta-fsl-ppc/conf/machine/p1022ds.conf @@ -8,10 +8,10 @@ UBOOT_MACHINES = "P1022DS P1022DS_NAND P1022DS_SPIFLASH P1022DS_SDCARD P1022DS_3 KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p1022ds.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" -PREFERRED_PROVIDER_virtual/xserver = "xserver-xf86-lite" +PREFERRED_PROVIDER_virtual/xserver = "xserver-xorg-lite" XSERVER = " \ - xserver-xf86-lite \ + xserver-xorg-lite \ xf86-input-evdev \ xf86-input-mouse \ xf86-input-keyboard \ -- cgit v1.2.3-54-g00ecf From f5d59005581a7c54317e8597edaa07be08f85173 Mon Sep 17 00:00:00 2001 From: David Nyström Date: Thu, 31 May 2012 10:13:20 +0200 Subject: Removed references to SRIO u-boot configurations --- meta-fsl-ppc/conf/machine/p3041ds.conf | 2 +- meta-fsl-ppc/conf/machine/p4080ds.conf | 2 +- meta-fsl-ppc/conf/machine/p5020ds.conf | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/meta-fsl-ppc/conf/machine/p3041ds.conf b/meta-fsl-ppc/conf/machine/p3041ds.conf index a948d392..747d563b 100644 --- a/meta-fsl-ppc/conf/machine/p3041ds.conf +++ b/meta-fsl-ppc/conf/machine/p3041ds.conf @@ -3,7 +3,7 @@ require e500mc.inc -UBOOT_MACHINES = "P3041DS P3041DS_NAND P3041DS_SECURE_BOOT P3041DS_SRIOBOOT_MASTER P3041DS_SRIOBOOT_SLAVE P3041DS_SDCARD P3041DS_SPIFLASH" +UBOOT_MACHINES = "P3041DS P3041DS_NAND P3041DS_SECURE_BOOT P3041DS_SDCARD P3041DS_SPIFLASH" KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p3041ds.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet32_smp_defconfig" diff --git a/meta-fsl-ppc/conf/machine/p4080ds.conf b/meta-fsl-ppc/conf/machine/p4080ds.conf index c7121a8c..078774e2 100644 --- a/meta-fsl-ppc/conf/machine/p4080ds.conf +++ b/meta-fsl-ppc/conf/machine/p4080ds.conf @@ -3,7 +3,7 @@ require e500mc.inc -UBOOT_MACHINES = "P4080DS P4080DS_SECURE_BOOT P4080DS_SRIOBOOT_MASTER P4080DS_SRIOBOOT_SLAVE P4080DS_SDCARD P4080DS_SPIFLASH " +UBOOT_MACHINES = "P4080DS P4080DS_SECURE_BOOT P4080DS_SDCARD P4080DS_SPIFLASH " KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p4080ds.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet32_smp_defconfig" diff --git a/meta-fsl-ppc/conf/machine/p5020ds.conf b/meta-fsl-ppc/conf/machine/p5020ds.conf index 059296f5..10cbe81c 100644 --- a/meta-fsl-ppc/conf/machine/p5020ds.conf +++ b/meta-fsl-ppc/conf/machine/p5020ds.conf @@ -3,7 +3,7 @@ require e5500.inc -UBOOT_MACHINES = "P5020DS P5020DS_NAND P5020DS_SECURE_BOOT P5020DS_SRIOBOOT_MASTER P5020DS_SRIOBOOT_SLAVE P5020DS_SDCARD P5020DS_SPIFLASH " +UBOOT_MACHINES = "P5020DS P5020DS_NAND P5020DS_SECURE_BOOT P5020DS_SDCARD P5020DS_SPIFLASH " KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p5020ds.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet32_smp_defconfig" -- cgit v1.2.3-54-g00ecf From 9eca8c615465b3891b93e9f401bf999456a1dd6d Mon Sep 17 00:00:00 2001 From: David Nyström Date: Thu, 31 May 2012 10:13:20 +0200 Subject: Added ?= to PREFERRED provider in machines, and corrected linux PREFERRED_VERSION Signed-off-by: Matthew McClintock --- meta-fsl-ppc/conf/machine/e500mc.inc | 9 ++++----- meta-fsl-ppc/conf/machine/e500v2.inc | 8 ++++---- meta-fsl-ppc/conf/machine/e5500-64b.inc | 9 ++++----- meta-fsl-ppc/conf/machine/e5500.inc | 5 ++--- meta-fsl-ppc/conf/machine/p1022ds.conf | 2 +- 5 files changed, 15 insertions(+), 18 deletions(-) diff --git a/meta-fsl-ppc/conf/machine/e500mc.inc b/meta-fsl-ppc/conf/machine/e500mc.inc index a8eb16b3..479c513b 100644 --- a/meta-fsl-ppc/conf/machine/e500mc.inc +++ b/meta-fsl-ppc/conf/machine/e500mc.inc @@ -5,12 +5,11 @@ require conf/machine/include/tune-ppce500mc.inc MACHINE_FEATURES = "kernel26 keyboard pci ext2 ext3 serial" MACHINE_FEATURES_RRECOMMENDS = "" +PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" +PREFERRED_VERSION_virtual/kernel ?= "3.0.6" +PREFERRED_PROVIDER_linux-libc-headers ?= "linux-qoriq-sdk-headers" -PREFERRED_PROVIDER_virtual/kernel = "linux-qoriq-sdk" -PREFERRED_VERSION_virtual/kernel = "3.0.1" -PREFERRED_PROVIDER_linux-libc-headers = "linux-qoriq-sdk-headers" - -KERNEL_IMAGETYPE = "uImage" +KERNEL_IMAGETYPE ?= "uImage" # disable the images below for now # ext2.bz2 ext2.lzma \ # ext2.gz.u-boot ext2.bz2.u-boot ext2.lzma.u-boot" diff --git a/meta-fsl-ppc/conf/machine/e500v2.inc b/meta-fsl-ppc/conf/machine/e500v2.inc index d529b3f9..6e2eb493 100644 --- a/meta-fsl-ppc/conf/machine/e500v2.inc +++ b/meta-fsl-ppc/conf/machine/e500v2.inc @@ -5,11 +5,11 @@ require conf/machine/include/tune-ppce500v2.inc MACHINE_FEATURES = "kernel26 pci ext2 ext3 serial" MACHINE_EXTRA_RRECOMMENDS = "" -PREFERRED_PROVIDER_virtual/kernel = "linux-qoriq-sdk" -PREFERRED_VERSION_virtual/kernel = "3.0.1" -PREFERRED_PROVIDER_linux-libc-headers = "linux-qoriq-sdk-headers" +PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" +PREFERRED_VERSION_virtual/kernel ?= "3.0.6" +PREFERRED_PROVIDER_linux-libc-headers ?= "linux-qoriq-sdk-headers" -KERNEL_IMAGETYPE = "uImage" +KERNEL_IMAGETYPE ?= "uImage" # disable the images below for now # ext2.bz2 ext2.lzma \ # ext2.gz.u-boot ext2.bz2.u-boot ext2.lzma.u-boot" diff --git a/meta-fsl-ppc/conf/machine/e5500-64b.inc b/meta-fsl-ppc/conf/machine/e5500-64b.inc index 4e460531..1e5d92b6 100644 --- a/meta-fsl-ppc/conf/machine/e5500-64b.inc +++ b/meta-fsl-ppc/conf/machine/e5500-64b.inc @@ -6,12 +6,11 @@ require conf/machine/include/tune-ppce5500.inc MACHINE_FEATURES = "kernel26 keyboard pci ext2 ext3 serial" MACHINE_FEATURES_RRECOMMENDS = "" +PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" +PREFERRED_VERSION_virtual/kernel ?= "3.0.6" +PREFERRED_PROVIDER_linux-libc-headers ?= "linux-qoriq-sdk-headers" -PREFERRED_PROVIDER_virtual/kernel = "linux-qoriq-sdk" -PREFERRED_VERSION_virtual/kernel = "3.0.1" -PREFERRED_PROVIDER_linux-libc-headers = "linux-qoriq-sdk-headers" - -KERNEL_IMAGETYPE = "uImage" +KERNEL_IMAGETYPE ?= "uImage" # disable the images below for now # ext2.bz2 ext2.lzma \ # ext2.gz.u-boot ext2.bz2.u-boot ext2.lzma.u-boot" diff --git a/meta-fsl-ppc/conf/machine/e5500.inc b/meta-fsl-ppc/conf/machine/e5500.inc index 4ec51ce0..f34c2c0c 100644 --- a/meta-fsl-ppc/conf/machine/e5500.inc +++ b/meta-fsl-ppc/conf/machine/e5500.inc @@ -5,12 +5,11 @@ require conf/machine/include/tune-ppce5500.inc MACHINE_FEATURES = "kernel26 keyboard pci ext2 ext3 serial" MACHINE_FEATURES_RRECOMMENDS = "" - PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" -PREFERRED_VERSION_virtual/kernel ?= "3.0.1" +PREFERRED_VERSION_virtual/kernel ?= "3.0.6" PREFERRED_PROVIDER_linux-libc-headers ?= "linux-qoriq-sdk-headers" -KERNEL_IMAGETYPE = "uImage" +KERNEL_IMAGETYPE ?= "uImage" # disable the images below for now # ext2.bz2 ext2.lzma \ # ext2.gz.u-boot ext2.bz2.u-boot ext2.lzma.u-boot" diff --git a/meta-fsl-ppc/conf/machine/p1022ds.conf b/meta-fsl-ppc/conf/machine/p1022ds.conf index c12dc0aa..8a50bec9 100644 --- a/meta-fsl-ppc/conf/machine/p1022ds.conf +++ b/meta-fsl-ppc/conf/machine/p1022ds.conf @@ -8,7 +8,7 @@ UBOOT_MACHINES = "P1022DS P1022DS_NAND P1022DS_SPIFLASH P1022DS_SDCARD P1022DS_3 KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p1022ds.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" -PREFERRED_PROVIDER_virtual/xserver = "xserver-xorg-lite" +PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xorg-lite" XSERVER = " \ xserver-xorg-lite \ -- cgit v1.2.3-54-g00ecf From edae3bc3c0be439497ea668f5ae0145c4ca045eb Mon Sep 17 00:00:00 2001 From: David Nyström Date: Fri, 1 Jun 2012 15:46:01 +0000 Subject: Fixed meta-toolchain to include the proper linux-libc-headers-nativesdk --- meta-fsl-ppc/conf/machine/e500mc.inc | 1 + meta-fsl-ppc/conf/machine/e500v2.inc | 1 + meta-fsl-ppc/conf/machine/e5500-64b.inc | 1 + meta-fsl-ppc/conf/machine/e5500.inc | 1 + .../recipes-kernel/linux/linux-qoriq-sdk-headers.bb | 13 +++++++------ meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc | 3 --- 6 files changed, 11 insertions(+), 9 deletions(-) diff --git a/meta-fsl-ppc/conf/machine/e500mc.inc b/meta-fsl-ppc/conf/machine/e500mc.inc index 479c513b..bfac9e6d 100644 --- a/meta-fsl-ppc/conf/machine/e500mc.inc +++ b/meta-fsl-ppc/conf/machine/e500mc.inc @@ -8,6 +8,7 @@ MACHINE_FEATURES_RRECOMMENDS = "" PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" PREFERRED_VERSION_virtual/kernel ?= "3.0.6" PREFERRED_PROVIDER_linux-libc-headers ?= "linux-qoriq-sdk-headers" +PREFERRED_PROVIDER_linux-libc-headers-nativesdk ?= "linux-qoriq-sdk-headers-nativesdk" KERNEL_IMAGETYPE ?= "uImage" # disable the images below for now diff --git a/meta-fsl-ppc/conf/machine/e500v2.inc b/meta-fsl-ppc/conf/machine/e500v2.inc index 6e2eb493..cf8f36c8 100644 --- a/meta-fsl-ppc/conf/machine/e500v2.inc +++ b/meta-fsl-ppc/conf/machine/e500v2.inc @@ -8,6 +8,7 @@ MACHINE_EXTRA_RRECOMMENDS = "" PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" PREFERRED_VERSION_virtual/kernel ?= "3.0.6" PREFERRED_PROVIDER_linux-libc-headers ?= "linux-qoriq-sdk-headers" +PREFERRED_PROVIDER_linux-libc-headers-nativesdk ?= "linux-qoriq-sdk-headers-nativesdk" KERNEL_IMAGETYPE ?= "uImage" # disable the images below for now diff --git a/meta-fsl-ppc/conf/machine/e5500-64b.inc b/meta-fsl-ppc/conf/machine/e5500-64b.inc index 1e5d92b6..80dee5ca 100644 --- a/meta-fsl-ppc/conf/machine/e5500-64b.inc +++ b/meta-fsl-ppc/conf/machine/e5500-64b.inc @@ -9,6 +9,7 @@ MACHINE_FEATURES_RRECOMMENDS = "" PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" PREFERRED_VERSION_virtual/kernel ?= "3.0.6" PREFERRED_PROVIDER_linux-libc-headers ?= "linux-qoriq-sdk-headers" +PREFERRED_PROVIDER_linux-libc-headers-nativesdk ?= "linux-qoriq-sdk-headers-nativesdk" KERNEL_IMAGETYPE ?= "uImage" # disable the images below for now diff --git a/meta-fsl-ppc/conf/machine/e5500.inc b/meta-fsl-ppc/conf/machine/e5500.inc index f34c2c0c..965618e3 100644 --- a/meta-fsl-ppc/conf/machine/e5500.inc +++ b/meta-fsl-ppc/conf/machine/e5500.inc @@ -8,6 +8,7 @@ MACHINE_FEATURES_RRECOMMENDS = "" PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" PREFERRED_VERSION_virtual/kernel ?= "3.0.6" PREFERRED_PROVIDER_linux-libc-headers ?= "linux-qoriq-sdk-headers" +PREFERRED_PROVIDER_linux-libc-headers-nativesdk ?= "linux-qoriq-sdk-headers-nativesdk" KERNEL_IMAGETYPE ?= "uImage" # disable the images below for now diff --git a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk-headers.bb b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk-headers.bb index cf1ffeee..4be6c420 100644 --- a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk-headers.bb +++ b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk-headers.bb @@ -1,15 +1,16 @@ -PROVIDES = "linux-libc-headers" - DESCRIPTION = "Linux kernel headers for Freescale platforms" SECTION = "devel" LICENSE = "GPLv2" +PKGSUFFIX = "" +PKGSUFFIX_virtclass-nativesdk = "-nativesdk" + INHIBIT_DEFAULT_DEPS = "1" -PROVIDES = "linux-libc-headers linux-qoriq-sdk-headers" -RPROVIDES_${PN}-dev = "linux-libc-headers-dev" -RPROVIDES_${PN}-dbg = "linux-libc-headers-dbg" +PROVIDES = "linux-libc-headers${PKGSUFFIX} ${PN}" +RPROVIDES_${PN}-dev += "linux-libc-headers${PKGSUFFIX}-dev" +RPROVIDES_${PN}-dbg += "linux-libc-headers${PKGSUFFIX}-dbg" RDEPENDS_${PN}-dev = "" -RRECOMMENDS_${PN}-dbg = "${PN}-dev (= ${EXTENDPKGV})" +RRECOMMENDS_${PN}-dbg = "linux-libc-headers${PKGSUFFIX}-dev (= ${EXTENDPKGV})" require recipes-kernel/linux/linux-qoriq-sdk.inc diff --git a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc index dc650c06..7e5dbf4b 100644 --- a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc +++ b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc @@ -15,6 +15,3 @@ S = '${@base_conditional("KSRC", "", "${WORKDIR}/git", "${KSRC}", d)}' # make everything compatible for the time being COMPATIBLE_MACHINE_$MACHINE = "$MACHINE" - -# only powerpc and powerpc64 are compatible -COMPATIBLE_HOST = "(powerpc|powerpc64)" -- cgit v1.2.3-54-g00ecf From 106a34b8770150b7f42d7bfd238ac30aa681083c Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Thu, 5 Jul 2012 11:24:49 -0700 Subject: recipes: Bring bbappends in line with OE-Core/master Signed-off-by: Khem Raj --- meta-fsl-ppc/recipes-append/libxml/libxml2_2.7.8.bbappend | 3 --- meta-fsl-ppc/recipes-append/libxml/libxml2_2.8.0.bbappend | 3 +++ meta-fsl-ppc/recipes-append/netbase/netbase_4.47.bbappend | 10 ---------- meta-fsl-ppc/recipes-append/netbase/netbase_5.0.bbappend | 10 ++++++++++ meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.bb | 2 -- 5 files changed, 13 insertions(+), 15 deletions(-) delete mode 100644 meta-fsl-ppc/recipes-append/libxml/libxml2_2.7.8.bbappend create mode 100644 meta-fsl-ppc/recipes-append/libxml/libxml2_2.8.0.bbappend delete mode 100644 meta-fsl-ppc/recipes-append/netbase/netbase_4.47.bbappend create mode 100644 meta-fsl-ppc/recipes-append/netbase/netbase_5.0.bbappend diff --git a/meta-fsl-ppc/recipes-append/libxml/libxml2_2.7.8.bbappend b/meta-fsl-ppc/recipes-append/libxml/libxml2_2.7.8.bbappend deleted file mode 100644 index 9b3f7f64..00000000 --- a/meta-fsl-ppc/recipes-append/libxml/libxml2_2.7.8.bbappend +++ /dev/null @@ -1,3 +0,0 @@ -EXTRA_OECONF += "--with-fexceptions" - -PR .= "+${DISTRO}.0" diff --git a/meta-fsl-ppc/recipes-append/libxml/libxml2_2.8.0.bbappend b/meta-fsl-ppc/recipes-append/libxml/libxml2_2.8.0.bbappend new file mode 100644 index 00000000..9b3f7f64 --- /dev/null +++ b/meta-fsl-ppc/recipes-append/libxml/libxml2_2.8.0.bbappend @@ -0,0 +1,3 @@ +EXTRA_OECONF += "--with-fexceptions" + +PR .= "+${DISTRO}.0" diff --git a/meta-fsl-ppc/recipes-append/netbase/netbase_4.47.bbappend b/meta-fsl-ppc/recipes-append/netbase/netbase_4.47.bbappend deleted file mode 100644 index 837cd204..00000000 --- a/meta-fsl-ppc/recipes-append/netbase/netbase_4.47.bbappend +++ /dev/null @@ -1,10 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/files:" - -SRC_URI += "file://71-fsl-dpaa-persistent-networking.rules" - -do_install_append () { - install -d ${D}${sysconfdir}/udev/rules.d/ - install -m 0644 ${WORKDIR}/71-fsl-dpaa-persistent-networking.rules ${D}${sysconfdir}/udev/rules.d -} - -PR .= "+${DISTRO}" diff --git a/meta-fsl-ppc/recipes-append/netbase/netbase_5.0.bbappend b/meta-fsl-ppc/recipes-append/netbase/netbase_5.0.bbappend new file mode 100644 index 00000000..837cd204 --- /dev/null +++ b/meta-fsl-ppc/recipes-append/netbase/netbase_5.0.bbappend @@ -0,0 +1,10 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/files:" + +SRC_URI += "file://71-fsl-dpaa-persistent-networking.rules" + +do_install_append () { + install -d ${D}${sysconfdir}/udev/rules.d/ + install -m 0644 ${WORKDIR}/71-fsl-dpaa-persistent-networking.rules ${D}${sysconfdir}/udev/rules.d +} + +PR .= "+${DISTRO}" diff --git a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.bb b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.bb index 6784f458..fb2ff4a3 100644 --- a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.bb +++ b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.bb @@ -11,5 +11,3 @@ kernel_do_configure_prepend() { # copy desired defconfig so we pick it up for the real kernel_do_configure cp ${KERNEL_DEFCONFIG} ${B}/.config } - -require recipes-kernel/linux/linux-tools.inc -- cgit v1.2.3-54-g00ecf From 4f4997f6eb17e611e3841093405353e9d2f8e983 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Thu, 5 Jul 2012 21:45:11 -0700 Subject: machines: Dont lock linux-libc-headers-nativesdk preferred provider linux-libc-headers-nativesdk is for native bits in an SDK its not required to be locked in machine conf files since nothing depends on machine per se here. If its a mattetr of policy then this should be added to distro conf which in this layer is fsl.conf Signed-off-by: Khem Raj --- meta-fsl-ppc/conf/machine/e500mc.inc | 1 - meta-fsl-ppc/conf/machine/e500v2.inc | 1 - meta-fsl-ppc/conf/machine/e5500-64b.inc | 1 - meta-fsl-ppc/conf/machine/e5500.inc | 1 - 4 files changed, 4 deletions(-) diff --git a/meta-fsl-ppc/conf/machine/e500mc.inc b/meta-fsl-ppc/conf/machine/e500mc.inc index bfac9e6d..479c513b 100644 --- a/meta-fsl-ppc/conf/machine/e500mc.inc +++ b/meta-fsl-ppc/conf/machine/e500mc.inc @@ -8,7 +8,6 @@ MACHINE_FEATURES_RRECOMMENDS = "" PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" PREFERRED_VERSION_virtual/kernel ?= "3.0.6" PREFERRED_PROVIDER_linux-libc-headers ?= "linux-qoriq-sdk-headers" -PREFERRED_PROVIDER_linux-libc-headers-nativesdk ?= "linux-qoriq-sdk-headers-nativesdk" KERNEL_IMAGETYPE ?= "uImage" # disable the images below for now diff --git a/meta-fsl-ppc/conf/machine/e500v2.inc b/meta-fsl-ppc/conf/machine/e500v2.inc index cf8f36c8..6e2eb493 100644 --- a/meta-fsl-ppc/conf/machine/e500v2.inc +++ b/meta-fsl-ppc/conf/machine/e500v2.inc @@ -8,7 +8,6 @@ MACHINE_EXTRA_RRECOMMENDS = "" PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" PREFERRED_VERSION_virtual/kernel ?= "3.0.6" PREFERRED_PROVIDER_linux-libc-headers ?= "linux-qoriq-sdk-headers" -PREFERRED_PROVIDER_linux-libc-headers-nativesdk ?= "linux-qoriq-sdk-headers-nativesdk" KERNEL_IMAGETYPE ?= "uImage" # disable the images below for now diff --git a/meta-fsl-ppc/conf/machine/e5500-64b.inc b/meta-fsl-ppc/conf/machine/e5500-64b.inc index 80dee5ca..1e5d92b6 100644 --- a/meta-fsl-ppc/conf/machine/e5500-64b.inc +++ b/meta-fsl-ppc/conf/machine/e5500-64b.inc @@ -9,7 +9,6 @@ MACHINE_FEATURES_RRECOMMENDS = "" PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" PREFERRED_VERSION_virtual/kernel ?= "3.0.6" PREFERRED_PROVIDER_linux-libc-headers ?= "linux-qoriq-sdk-headers" -PREFERRED_PROVIDER_linux-libc-headers-nativesdk ?= "linux-qoriq-sdk-headers-nativesdk" KERNEL_IMAGETYPE ?= "uImage" # disable the images below for now diff --git a/meta-fsl-ppc/conf/machine/e5500.inc b/meta-fsl-ppc/conf/machine/e5500.inc index 965618e3..f34c2c0c 100644 --- a/meta-fsl-ppc/conf/machine/e5500.inc +++ b/meta-fsl-ppc/conf/machine/e5500.inc @@ -8,7 +8,6 @@ MACHINE_FEATURES_RRECOMMENDS = "" PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" PREFERRED_VERSION_virtual/kernel ?= "3.0.6" PREFERRED_PROVIDER_linux-libc-headers ?= "linux-qoriq-sdk-headers" -PREFERRED_PROVIDER_linux-libc-headers-nativesdk ?= "linux-qoriq-sdk-headers-nativesdk" KERNEL_IMAGETYPE ?= "uImage" # disable the images below for now -- cgit v1.2.3-54-g00ecf From a068d013022c04e81e531edc4c9d530496efaaf7 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Thu, 5 Jul 2012 21:48:28 -0700 Subject: fsl.conf: Let linux-qoriq-sdk-headers-nativesdk provide linux-libc-headers-nativesdk If not set by user then let distro policy be to use linux-qoriq-sdk-headers-nativesdk for linux-libc-headers-nativesdk Signed-off-by: Khem Raj --- meta-fsl-ppc/conf/distro/fsl.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/meta-fsl-ppc/conf/distro/fsl.conf b/meta-fsl-ppc/conf/distro/fsl.conf index 6d4dc342..8bfb272c 100644 --- a/meta-fsl-ppc/conf/distro/fsl.conf +++ b/meta-fsl-ppc/conf/distro/fsl.conf @@ -83,6 +83,7 @@ IMAGE_CLASSES = "image_types_uboot" PREFERRED_VERSION_u-boot-mkimage-native_powerpc = "2011.06" PREFERRED_PROVIDER_virtual/libx11 = "libx11" +PREFERRED_PROVIDER_linux-libc-headers-nativesdk ?= "linux-qoriq-sdk-headers-nativesdk" SYSVINIT_ENABLED_GETTYS = "" USE_VT = "" -- cgit v1.2.3-54-g00ecf From d4446f1aba528dbd065ea32ce5b051f508eb7805 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Mon, 9 Jul 2012 19:13:43 -0700 Subject: linux-qoriq-sdk: Update to latest 1.2 SDK release Signed-off-by: Khem Raj --- ...Undef-before-redefining-__attribute_const.patch | 31 ---------------------- .../linux/files/add-no-error-array-bounds.patch | 13 --------- .../files/add-no-unused-but-set-variable.patch | 13 --------- .../recipes-kernel/linux/linux-qoriq-sdk.inc | 7 ++--- 4 files changed, 2 insertions(+), 62 deletions(-) delete mode 100644 meta-fsl-ppc/recipes-kernel/linux/files/0001-compiler.h-Undef-before-redefining-__attribute_const.patch delete mode 100644 meta-fsl-ppc/recipes-kernel/linux/files/add-no-error-array-bounds.patch delete mode 100644 meta-fsl-ppc/recipes-kernel/linux/files/add-no-unused-but-set-variable.patch diff --git a/meta-fsl-ppc/recipes-kernel/linux/files/0001-compiler.h-Undef-before-redefining-__attribute_const.patch b/meta-fsl-ppc/recipes-kernel/linux/files/0001-compiler.h-Undef-before-redefining-__attribute_const.patch deleted file mode 100644 index bf2f6e77..00000000 --- a/meta-fsl-ppc/recipes-kernel/linux/files/0001-compiler.h-Undef-before-redefining-__attribute_const.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 6f92ab6de9d8daeb575949bbbcbc7bcdcebc60af Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Thu, 5 Jan 2012 11:42:35 -0800 -Subject: [PATCH] compiler.h: Undef before redefining __attribute_const__ - -This is required to avoid warnings like -util/include/linux/compiler.h:8:0: error: "__attribute_const__" redefined [-Werror] - -Signed-off-by: Khem Raj - -Upstream-Status: Pending - ---- - tools/perf/util/include/linux/compiler.h | 4 +++- - 1 files changed, 3 insertions(+), 1 deletions(-) - ---- a/tools/perf/util/include/linux/compiler.h -+++ b/tools/perf/util/include/linux/compiler.h -@@ -4,9 +4,11 @@ - #ifndef __always_inline - #define __always_inline inline - #endif -+#undef __user - #define __user -+#undef __attribute_const__ - #define __attribute_const__ -- -+#undef __used - #define __used __attribute__((__unused__)) - - #endif diff --git a/meta-fsl-ppc/recipes-kernel/linux/files/add-no-error-array-bounds.patch b/meta-fsl-ppc/recipes-kernel/linux/files/add-no-error-array-bounds.patch deleted file mode 100644 index 57b3974d..00000000 --- a/meta-fsl-ppc/recipes-kernel/linux/files/add-no-error-array-bounds.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: git/Makefile -=================================================================== ---- git.orig/Makefile -+++ git/Makefile -@@ -558,7 +558,7 @@ endif # $(dot-config) - # Defaults to vmlinux, but the arch makefile usually adds further targets - all: vmlinux - --KBUILD_CFLAGS += -Wno-unused-but-set-variable -+KBUILD_CFLAGS += -Wno-unused-but-set-variable -Wno-error=array-bounds - - ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE - KBUILD_CFLAGS += -Os diff --git a/meta-fsl-ppc/recipes-kernel/linux/files/add-no-unused-but-set-variable.patch b/meta-fsl-ppc/recipes-kernel/linux/files/add-no-unused-but-set-variable.patch deleted file mode 100644 index 51335294..00000000 --- a/meta-fsl-ppc/recipes-kernel/linux/files/add-no-unused-but-set-variable.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/Makefile b/Makefile -index e821f72..cb2fcba 100644 ---- a/Makefile -+++ b/Makefile -@@ -526,6 +526,8 @@ endif # $(dot-config) - # Defaults vmlinux but it is usually overridden in the arch makefile - all: vmlinux - -+KBUILD_CFLAGS += -Wno-unused-but-set-variable -+ - ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE - KBUILD_CFLAGS += -Os - else diff --git a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc index 7e5dbf4b..4b6505e4 100644 --- a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc +++ b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc @@ -1,13 +1,10 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7" -PV = "3.0.6" +PV = "3.0.34" PR = "r3" -SRCREV = "1e3e8ed15249d73a066ddfe2e80882935c35dcb7" +SRCREV = "fsl-sdk-v1.2" SRC_URI = "git://git.freescale.com/ppc/sdk/linux.git \ - file://add-no-unused-but-set-variable.patch \ - file://add-no-error-array-bounds.patch \ - file://0001-compiler.h-Undef-before-redefining-__attribute_const.patch \ " KSRC ?= "" -- cgit v1.2.3-54-g00ecf From d37d135656a85d90d0b8d132c35e5af90717318c Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Thu, 5 Jul 2012 16:34:15 -0500 Subject: testfloat_2a.bb: fix license field Signed-off-by: Matthew McClintock --- meta-fsl-ppc/recipes-test/testfloat/testfloat_2a.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-fsl-ppc/recipes-test/testfloat/testfloat_2a.bb b/meta-fsl-ppc/recipes-test/testfloat/testfloat_2a.bb index 740ad0f4..fd5a5e61 100644 --- a/meta-fsl-ppc/recipes-test/testfloat/testfloat_2a.bb +++ b/meta-fsl-ppc/recipes-test/testfloat/testfloat_2a.bb @@ -1,6 +1,6 @@ DESCRIPTION = "A program for testing floating-point implementation" SECTION = "test" -LICENSE = "Distributable: Hauser TestFloat" +LICENSE = "Hauser TestFloat" LIC_FILES_CHKSUM = "file://testfloat/testfloat.txt;beginline=87;endline=95;md5=bdb2e8111838a48015c29bd97f5b6145" -- cgit v1.2.3-54-g00ecf From 684547eaab363ee951bde91e28b7b6b26d997d11 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Wed, 6 Jun 2012 09:45:21 +0000 Subject: rcw: package images to rcw-image images are required to be included in full rootfs. Signed-off-by: Ting Liu --- meta-fsl-ppc/recipes-tools/rcw/rcw_git.bb | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/meta-fsl-ppc/recipes-tools/rcw/rcw_git.bb b/meta-fsl-ppc/recipes-tools/rcw/rcw_git.bb index af8db7d2..ff1b99f4 100644 --- a/meta-fsl-ppc/recipes-tools/rcw/rcw_git.bb +++ b/meta-fsl-ppc/recipes-tools/rcw/rcw_git.bb @@ -1,7 +1,7 @@ DESCRIPTION = "Reset Control Words (RCW)" SECTION = "rcw" LICENSE = "BSD" -PR = "r3" +PR = "r4" LIC_FILES_CHKSUM = " \ file://p2041rdb/LICENSE;md5=96dd72f26e9bb861de5c76c60e35e1bc \ @@ -21,13 +21,22 @@ SRC_URI = "git://git.freescale.com/ppc/sdk/rcw.git" S = "${WORKDIR}/git" -do_deploy () { +do_install () { make install + M=`echo ${MACHINE} | sed s/-64b//g` + install -d ${D}/boot/rcw + cp -r ${S}/${M}/${M}/* ${D}/boot/rcw +} + +do_deploy () { M=`echo ${MACHINE} | sed s/-64b//g` install -d ${DEPLOYDIR}/rcw cp -r ${S}/${M}/${M}/* ${DEPLOYDIR}/rcw } addtask deploy after do_install +PACKAGES += "${PN}-image" +FILES_${PN}-image += "/boot" + ALLOW_EMPTY_${PN} = "1" -- cgit v1.2.3-54-g00ecf From 32f30112f52b8a5b06e6f7c532aa05917be87311 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Wed, 6 Jun 2012 09:47:50 +0000 Subject: hv-cfg: package images to hv-cfg-image images are required to be included in full rootfs. Signed-off-by: Ting Liu --- meta-fsl-ppc/recipes-tools/hv-cfg/hv-cfg_git.bb | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/meta-fsl-ppc/recipes-tools/hv-cfg/hv-cfg_git.bb b/meta-fsl-ppc/recipes-tools/hv-cfg/hv-cfg_git.bb index 22c08a2f..60847f51 100644 --- a/meta-fsl-ppc/recipes-tools/hv-cfg/hv-cfg_git.bb +++ b/meta-fsl-ppc/recipes-tools/hv-cfg/hv-cfg_git.bb @@ -1,7 +1,7 @@ DESCRIPTION = "Hypervisor Config" SECTION = "hv-cfg" LICENSE = "BSD" -PR = "r4" +PR = "r5" LIC_FILES_CHKSUM = " \ file://p2041rdb/LICENSE;md5=96dd72f26e9bb861de5c76c60e35e1bc \ @@ -23,13 +23,22 @@ SRC_URI = "git://git.freescale.com/ppc/sdk/hv-cfg.git" S = "${WORKDIR}/git" -do_deploy () { +do_install () { make install + M=`echo ${MACHINE} | sed s/-64b//g` + install -d ${D}/boot/hv-cfg + cp -r ${S}/${M}/${M}/* ${D}/boot/hv-cfg +} + +do_deploy () { M=`echo ${MACHINE} | sed s/-64b//g` install -d ${DEPLOYDIR}/hv-cfg cp -r ${S}/${M}/${M}/* ${DEPLOYDIR}/hv-cfg } addtask deploy after do_install +PACKAGES += "${PN}-image" +FILES_${PN}-image += "/boot" + ALLOW_EMPTY_${PN} = "1" -- cgit v1.2.3-54-g00ecf From 5d6745d73b2003283851635b500a8ab5ef74830f Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Wed, 6 Jun 2012 16:23:05 +0000 Subject: add official mirror for source download Signed-off-by: Zhenhua Luo --- meta-fsl-ppc/conf/distro/fsl.conf | 3 +++ 1 file changed, 3 insertions(+) diff --git a/meta-fsl-ppc/conf/distro/fsl.conf b/meta-fsl-ppc/conf/distro/fsl.conf index 8bfb272c..bcadbc74 100644 --- a/meta-fsl-ppc/conf/distro/fsl.conf +++ b/meta-fsl-ppc/conf/distro/fsl.conf @@ -79,6 +79,9 @@ BB_SIGNATURE_HANDLER ?= 'OEBasicHash' # OELAYOUT_ABI = "8" +INHERIT += "own-mirrors" +SOURCE_MIRROR_URL ?= "http://autobuilder.yoctoproject.org/sources/" + IMAGE_CLASSES = "image_types_uboot" PREFERRED_VERSION_u-boot-mkimage-native_powerpc = "2011.06" -- cgit v1.2.3-54-g00ecf From 8aeffe2122f38a7a6f1415e7f90480af6e50875f Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Thu, 7 Jun 2012 14:17:37 +0000 Subject: testfloat: fix dos2unix not found issue during do_unpack2 On some distros such as Ubuntu 10.04, dos2unix is replaced by fromdos. Reference: http://www.virtualhelp.me/linux/164-dos2unix-missing-ubuntu-1004 Fix the following error: | NOTE: Applying patch 'TestFloat-powerpc-E500v2-SPE-1.patch' | (../meta-fsl-ppc/recipes-test/testfloat/files/TestFloat-powerpc-E500v2 | -SPE-1.patch) | ERROR: Error executing a python function in ../meta-fsl-ppc/recipes-test/testfloat/testfloat_2a.bb: | CmdError: Command Error: exit status: 1 Output: Signed-off-by: Ting Liu --- meta-fsl-ppc/recipes-test/testfloat/testfloat_2a.bb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/meta-fsl-ppc/recipes-test/testfloat/testfloat_2a.bb b/meta-fsl-ppc/recipes-test/testfloat/testfloat_2a.bb index fd5a5e61..ece8c185 100644 --- a/meta-fsl-ppc/recipes-test/testfloat/testfloat_2a.bb +++ b/meta-fsl-ppc/recipes-test/testfloat/testfloat_2a.bb @@ -20,7 +20,13 @@ S = "${WORKDIR}/TestFloat-2a" do_unpack2(){ mv ${WORKDIR}/SoftFloat-2b ${S}/SoftFloat-2b cd ${S} - find -type f -exec dos2unix {} \; + if [ -n "$(which fromdos)" ];then + find -type f -exec fromdos {} \; + elif [ -n "$(which dos2unix)" ];then + find -type f -exec dos2unix {} \; + else + echo -e "\nERROR: command dos2unix or fromdos not found\n" && return 1 + fi } addtask do_unpack2 after do_unpack before do_patch -- cgit v1.2.3-54-g00ecf From a5d38059231136503a2d222f2cb7c41122e65f30 Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Thu, 21 Jun 2012 15:49:20 +0800 Subject: update commit to the latest for rcw/hv-cfg Signed-off-by: Zhenhua Luo --- meta-fsl-ppc/recipes-tools/hv-cfg/hv-cfg_git.bb | 2 +- meta-fsl-ppc/recipes-tools/rcw/rcw_git.bb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/meta-fsl-ppc/recipes-tools/hv-cfg/hv-cfg_git.bb b/meta-fsl-ppc/recipes-tools/hv-cfg/hv-cfg_git.bb index 60847f51..e137575a 100644 --- a/meta-fsl-ppc/recipes-tools/hv-cfg/hv-cfg_git.bb +++ b/meta-fsl-ppc/recipes-tools/hv-cfg/hv-cfg_git.bb @@ -18,7 +18,7 @@ PACKAGE_ARCH = "${MACHINE_ARCH}" inherit deploy -SRCREV = "${AUTOREV}" +SRCREV = "102ab848d94f3c04f364ed273d0e00b21b0266f4" SRC_URI = "git://git.freescale.com/ppc/sdk/hv-cfg.git" S = "${WORKDIR}/git" diff --git a/meta-fsl-ppc/recipes-tools/rcw/rcw_git.bb b/meta-fsl-ppc/recipes-tools/rcw/rcw_git.bb index ff1b99f4..4487f9ec 100644 --- a/meta-fsl-ppc/recipes-tools/rcw/rcw_git.bb +++ b/meta-fsl-ppc/recipes-tools/rcw/rcw_git.bb @@ -16,7 +16,7 @@ PACKAGE_ARCH = "${MACHINE_ARCH}" inherit deploy -SRCREV = "${AUTOREV}" +SRCREV = "394db85c496f6e41dd7e29e54dab3db2b380b187" SRC_URI = "git://git.freescale.com/ppc/sdk/rcw.git" S = "${WORKDIR}/git" -- cgit v1.2.3-54-g00ecf From 575fd676e788dfa13e63e777de0b362bebcb9d7a Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Thu, 21 Jun 2012 16:06:59 +0800 Subject: update commit of u-boot for sdk 1.2 Signed-off-by: Zhenhua Luo Conflicts: recipes-kernel/u-boot/u-boot_git.bb Signed-off-by: Khem Raj --- meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb b/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb index 3d42aa8a..8ced1228 100644 --- a/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb +++ b/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb @@ -5,13 +5,13 @@ PROVIDES = "virtual/bootloader" LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=1707d6db1d42237583f50183a5651ecb" -PR = "r16" +PR = "r18" INHIBIT_DEFAULT_DEPS = "1" DEPENDS = "boot-format-native virtual/${TARGET_PREFIX}gcc" inherit deploy -SRCREV = "348d8fceba39e5622d315ffda7d72ff6bbcf05ec" +SRCREV = "bfb0c9a0ac732221ca78b5af37172b4f80ff9a6d" SRC_URI = "git://git.freescale.com/ppc/sdk/u-boot.git \ " DEPENDS_append_e5500-64b = " lib32-gcc-cross" -- cgit v1.2.3-54-g00ecf From fa5a31a9929262a05d97eeb02f4a28bd9373b844 Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Thu, 21 Jun 2012 16:39:30 +0800 Subject: correct dts file for targets Signed-off-by: Zhenhua Luo --- meta-fsl-ppc/conf/machine/mpc8548cds.conf | 2 +- meta-fsl-ppc/conf/machine/p1020mbg.conf | 2 +- meta-fsl-ppc/conf/machine/p1020rdb.conf | 3 ++- meta-fsl-ppc/conf/machine/p1020utm.conf | 2 +- meta-fsl-ppc/conf/machine/p1021rdb.conf | 2 +- meta-fsl-ppc/conf/machine/p1022ds.conf | 2 +- meta-fsl-ppc/conf/machine/p1024rdb.conf | 2 +- meta-fsl-ppc/conf/machine/p1025rdb.conf | 2 +- meta-fsl-ppc/conf/machine/p2020rdb.conf | 2 +- meta-fsl-ppc/conf/machine/p2041rdb.conf | 3 ++- meta-fsl-ppc/conf/machine/p3041ds.conf | 3 ++- meta-fsl-ppc/conf/machine/p4080ds.conf | 3 ++- meta-fsl-ppc/conf/machine/p5020ds-64b.conf | 3 ++- meta-fsl-ppc/conf/machine/p5020ds.conf | 3 ++- meta-fsl-ppc/conf/machine/p5040ds-64b.conf | 5 ++--- meta-fsl-ppc/conf/machine/p5040ds.conf | 3 ++- 16 files changed, 24 insertions(+), 18 deletions(-) diff --git a/meta-fsl-ppc/conf/machine/mpc8548cds.conf b/meta-fsl-ppc/conf/machine/mpc8548cds.conf index 0d0dcf18..821aac0e 100644 --- a/meta-fsl-ppc/conf/machine/mpc8548cds.conf +++ b/meta-fsl-ppc/conf/machine/mpc8548cds.conf @@ -5,7 +5,7 @@ require e500v2.inc UBOOT_MACHINES = "MPC8548CDS" -KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/mpc8548cds.dts" +KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/mpc8548cds_32b.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_defconfig" JFFS2_ERASEBLOCK = "0x20000" diff --git a/meta-fsl-ppc/conf/machine/p1020mbg.conf b/meta-fsl-ppc/conf/machine/p1020mbg.conf index f2b9eafd..da62c432 100644 --- a/meta-fsl-ppc/conf/machine/p1020mbg.conf +++ b/meta-fsl-ppc/conf/machine/p1020mbg.conf @@ -6,7 +6,7 @@ require e500v2.inc BOOTFORMAT_CONFIG = "config_ddr3_1gb_p1_p2_rdb_pc_800M.dat" UBOOT_MACHINES = "P1020MBG-PC P1020MBG-PC_SDCARD P1020MBG-PC_36BIT P1020MBG-PC_36BIT_SDCARD" -KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p1020mbg.dts" +KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p1020mbg-pc_32b.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" JFFS2_ERASEBLOCK = "0x20000" diff --git a/meta-fsl-ppc/conf/machine/p1020rdb.conf b/meta-fsl-ppc/conf/machine/p1020rdb.conf index 80d113e2..653533cf 100644 --- a/meta-fsl-ppc/conf/machine/p1020rdb.conf +++ b/meta-fsl-ppc/conf/machine/p1020rdb.conf @@ -6,7 +6,8 @@ require e500v2.inc BOOTFORMAT_CONFIG = "config_ddr3_1gb_p1_p2_rdb_pc_800M.dat" UBOOT_MACHINES = " P1020RDB-PC P1020RDB-PC_SPIFLASH P1020RDB-PC_NAND P1020RDB-PC_SDCARD P1020RDB-PC_36BIT P1020RDB-PC_36BIT_SPIFLASH P1020RDB-PC_36BIT_NAND P1020RDB-PC_36BIT_SDCARD" -KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p1020rdb.dts" +KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p1020rdb-pc_32b.dts" + KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" JFFS2_ERASEBLOCK = "0x20000" diff --git a/meta-fsl-ppc/conf/machine/p1020utm.conf b/meta-fsl-ppc/conf/machine/p1020utm.conf index 98b8ef36..79298413 100644 --- a/meta-fsl-ppc/conf/machine/p1020utm.conf +++ b/meta-fsl-ppc/conf/machine/p1020utm.conf @@ -6,7 +6,7 @@ require e500v2.inc BOOTFORMAT_CONFIG = "config_ddr3_1gb_p1_p2_rdb_pc_800M.dat" UBOOT_MACHINES = "P1020UTM-PC P1020UTM-PC_SDCARD P1020UTM-PC_36BIT P1020UTM-PC_36BIT_SDCARD" -KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p1020utm.dts" +KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p1020utm-pc_32b.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" JFFS2_ERASEBLOCK = "0x20000" diff --git a/meta-fsl-ppc/conf/machine/p1021rdb.conf b/meta-fsl-ppc/conf/machine/p1021rdb.conf index 6da8ef3b..8e807520 100644 --- a/meta-fsl-ppc/conf/machine/p1021rdb.conf +++ b/meta-fsl-ppc/conf/machine/p1021rdb.conf @@ -5,7 +5,7 @@ require e500v2.inc BOOTFORMAT_CONFIG = "config_ddr3_1gb_p1_p2_rdb_pc_800M.dat" UBOOT_MACHINES = "P1021RDB-PC P1021RDB-PC_NAND P1021RDB-PC_SDCARD P1021RDB-PC_SPIFLASH P1021RDB-PC_36BIT P1021RDB-PC_36BIT_SPIFLASH P1021RDB-PC_36BIT_NAND P1021RDB-PC_36BIT_SDCARD" -KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p1021rdb.dts" +KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p1021rdb-pc_32b.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" JFFS2_ERASEBLOCK = "0x20000" diff --git a/meta-fsl-ppc/conf/machine/p1022ds.conf b/meta-fsl-ppc/conf/machine/p1022ds.conf index 8a50bec9..1f15303c 100644 --- a/meta-fsl-ppc/conf/machine/p1022ds.conf +++ b/meta-fsl-ppc/conf/machine/p1022ds.conf @@ -5,7 +5,7 @@ require e500v2.inc BOOTFORMAT_CONFIG = "config_ddr3_2gb_p1022ds.dat" UBOOT_MACHINES = "P1022DS P1022DS_NAND P1022DS_SPIFLASH P1022DS_SDCARD P1022DS_36BIT P1022DS_36BIT_SPIFLASH P1022DS_36BIT_NAND P1022DS_36BIT_SDCARD" -KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p1022ds.dts" +KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p1022ds_32b.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xorg-lite" diff --git a/meta-fsl-ppc/conf/machine/p1024rdb.conf b/meta-fsl-ppc/conf/machine/p1024rdb.conf index aa6b22fe..1a7e315d 100644 --- a/meta-fsl-ppc/conf/machine/p1024rdb.conf +++ b/meta-fsl-ppc/conf/machine/p1024rdb.conf @@ -6,7 +6,7 @@ require e500v2.inc BOOTFORMAT_CONFIG = "config_ddr3_1gb_p1_p2_rdb_pc_667M.dat" UBOOT_MACHINES = "P1024RDB P1024RDB_36BIT P1024RDB_NAND P1024RDB_SDCARD P1024RDB_SPIFLASH" -KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p1024rdb.dts" +KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p1024rdb_32b.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" JFFS2_ERASEBLOCK = "0x20000" diff --git a/meta-fsl-ppc/conf/machine/p1025rdb.conf b/meta-fsl-ppc/conf/machine/p1025rdb.conf index 27e3fa47..bcb167ef 100644 --- a/meta-fsl-ppc/conf/machine/p1025rdb.conf +++ b/meta-fsl-ppc/conf/machine/p1025rdb.conf @@ -7,7 +7,7 @@ require e500v2.inc BOOTFORMAT_CONFIG = "config_ddr3_1gb_p1_p2_rdb_pc_667M.dat" UBOOT_MACHINES = "P1025RDB P1025RDB_36BIT P1025RDB_NAND P1025RDB_SDCARD P1025RDB_SPIFLASH" -KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p1025rdb.dts" +KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p1025rdb_32b.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" JFFS2_ERASEBLOCK = "0x20000" diff --git a/meta-fsl-ppc/conf/machine/p2020rdb.conf b/meta-fsl-ppc/conf/machine/p2020rdb.conf index 976134aa..188a6f2e 100644 --- a/meta-fsl-ppc/conf/machine/p2020rdb.conf +++ b/meta-fsl-ppc/conf/machine/p2020rdb.conf @@ -6,7 +6,7 @@ require e500v2.inc BOOTFORMAT_CONFIG = "config_ddr3_1gb_64bit_p2020rdb_pc.dat" UBOOT_MACHINES = " P2020RDB-PC P2020RDB-PC_NAND P2020RDB-PC_SDCARD P2020RDB-PC_SPIFLASH P2020RDB-PC_36BIT P2020RDB-PC_36BIT_SPIFLASH P2020RDB-PC_36BIT_NAND P2020RDB-PC_36BIT_SDCARD" -KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p2020rdb.dts" +KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p2020rdb-pc_32b.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" JFFS2_ERASEBLOCK = "0x20000" diff --git a/meta-fsl-ppc/conf/machine/p2041rdb.conf b/meta-fsl-ppc/conf/machine/p2041rdb.conf index 7ec7dfe8..e1614598 100644 --- a/meta-fsl-ppc/conf/machine/p2041rdb.conf +++ b/meta-fsl-ppc/conf/machine/p2041rdb.conf @@ -4,7 +4,8 @@ require e500mc.inc UBOOT_MACHINES = "P2041RDB P2041RDB_SECURE_BOOT P2041RDB_SDCARD P2041RDB_SPIFLASH" -KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p2041rdb.dts" +KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p2041rdb.dts \ + ${S}/arch/powerpc/boot/dts/p2041rdb-usdpaa.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet32_smp_defconfig" JFFS2_ERASEBLOCK = "0x10000" diff --git a/meta-fsl-ppc/conf/machine/p3041ds.conf b/meta-fsl-ppc/conf/machine/p3041ds.conf index 747d563b..909761e4 100644 --- a/meta-fsl-ppc/conf/machine/p3041ds.conf +++ b/meta-fsl-ppc/conf/machine/p3041ds.conf @@ -4,7 +4,8 @@ require e500mc.inc UBOOT_MACHINES = "P3041DS P3041DS_NAND P3041DS_SECURE_BOOT P3041DS_SDCARD P3041DS_SPIFLASH" -KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p3041ds.dts" +KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p3041ds.dts \ + ${S}/arch/powerpc/boot/dts/p3041ds-usdpaa.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet32_smp_defconfig" JFFS2_ERASEBLOCK = "0x10000" diff --git a/meta-fsl-ppc/conf/machine/p4080ds.conf b/meta-fsl-ppc/conf/machine/p4080ds.conf index 078774e2..6c90912e 100644 --- a/meta-fsl-ppc/conf/machine/p4080ds.conf +++ b/meta-fsl-ppc/conf/machine/p4080ds.conf @@ -4,7 +4,8 @@ require e500mc.inc UBOOT_MACHINES = "P4080DS P4080DS_SECURE_BOOT P4080DS_SDCARD P4080DS_SPIFLASH " -KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p4080ds.dts" +KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p4080ds.dts \ + ${S}/arch/powerpc/boot/dts/p4080ds-usdpaa.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet32_smp_defconfig" JFFS2_ERASEBLOCK = "0x10000" diff --git a/meta-fsl-ppc/conf/machine/p5020ds-64b.conf b/meta-fsl-ppc/conf/machine/p5020ds-64b.conf index 1d169857..e946076b 100644 --- a/meta-fsl-ppc/conf/machine/p5020ds-64b.conf +++ b/meta-fsl-ppc/conf/machine/p5020ds-64b.conf @@ -5,7 +5,8 @@ require e5500-64b.inc # TODO: fix 32bit build of u-boot for p5020ds-64b UBOOT_MACHINES = "P5020DS" -KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p5020ds.dts" +KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p5020ds.dts \ + ${S}/arch/powerpc/boot/dts/p5020ds-usdpaa.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet64_smp_defconfig" JFFS2_ERASEBLOCK = "0x10000" diff --git a/meta-fsl-ppc/conf/machine/p5020ds.conf b/meta-fsl-ppc/conf/machine/p5020ds.conf index 10cbe81c..3a5c6721 100644 --- a/meta-fsl-ppc/conf/machine/p5020ds.conf +++ b/meta-fsl-ppc/conf/machine/p5020ds.conf @@ -4,7 +4,8 @@ require e5500.inc UBOOT_MACHINES = "P5020DS P5020DS_NAND P5020DS_SECURE_BOOT P5020DS_SDCARD P5020DS_SPIFLASH " -KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p5020ds.dts" +KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p5020ds.dts \ + ${S}/arch/powerpc/boot/dts/p5020ds-usdpaa.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet32_smp_defconfig" JFFS2_ERASEBLOCK = "0x10000" diff --git a/meta-fsl-ppc/conf/machine/p5040ds-64b.conf b/meta-fsl-ppc/conf/machine/p5040ds-64b.conf index a0c56375..15604201 100644 --- a/meta-fsl-ppc/conf/machine/p5040ds-64b.conf +++ b/meta-fsl-ppc/conf/machine/p5040ds-64b.conf @@ -4,9 +4,8 @@ require e5500-64b.inc UBOOT_MACHINES = "P5040DS" - -KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p5040ds.dts " - +KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p5040ds.dts \ + ${S}/arch/powerpc/boot/dts/p5040ds-usdpaa.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet64_smp_defconfig" JFFS2_ERASEBLOCK = "0x10000" diff --git a/meta-fsl-ppc/conf/machine/p5040ds.conf b/meta-fsl-ppc/conf/machine/p5040ds.conf index 09634bc6..f3719c6e 100644 --- a/meta-fsl-ppc/conf/machine/p5040ds.conf +++ b/meta-fsl-ppc/conf/machine/p5040ds.conf @@ -4,7 +4,8 @@ require e5500.inc UBOOT_MACHINES = "P5040DS" -KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p5040ds.dts" +KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p5040ds.dts \ + ${S}/arch/powerpc/boot/dts/p5040ds-usdpaa.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet32_smp_defconfig" JFFS2_ERASEBLOCK = "0x10000" -- cgit v1.2.3-54-g00ecf From 877e4d40e0b9c2e1486c5a239a8fc3191fcce102 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 11 Jul 2012 10:56:44 -0700 Subject: machines: Move machine specific variable to machine conf These variables are machine specific and therefore they need to be in machine conf Signed-off-by: Khem Raj --- meta-fsl-ppc/conf/distro/fsl.conf | 6 ------ meta-fsl-ppc/conf/machine/mpc8536ds.conf | 3 +++ meta-fsl-ppc/conf/machine/mpc8544ds.conf | 3 +++ meta-fsl-ppc/conf/machine/mpc8548cds.conf | 3 +++ meta-fsl-ppc/conf/machine/mpc8572ds.conf | 3 +++ meta-fsl-ppc/conf/machine/p1010rdb.conf | 3 +++ meta-fsl-ppc/conf/machine/p1020mbg.conf | 3 +++ meta-fsl-ppc/conf/machine/p1020rdb.conf | 3 +++ meta-fsl-ppc/conf/machine/p1020utm.conf | 3 +++ meta-fsl-ppc/conf/machine/p1021rdb.conf | 3 +++ meta-fsl-ppc/conf/machine/p1022ds.conf | 3 +++ meta-fsl-ppc/conf/machine/p1023rds.conf | 3 +++ meta-fsl-ppc/conf/machine/p1024rdb.conf | 3 +++ meta-fsl-ppc/conf/machine/p1025rdb.conf | 3 +++ meta-fsl-ppc/conf/machine/p2020ds.conf | 3 +++ meta-fsl-ppc/conf/machine/p2020rdb.conf | 3 +++ meta-fsl-ppc/conf/machine/p2041rdb.conf | 3 +++ meta-fsl-ppc/conf/machine/p3041ds.conf | 3 +++ meta-fsl-ppc/conf/machine/p4080ds.conf | 3 +++ meta-fsl-ppc/conf/machine/p5020ds-64b.conf | 3 +++ meta-fsl-ppc/conf/machine/p5020ds.conf | 3 +++ meta-fsl-ppc/conf/machine/p5040ds-64b.conf | 3 +++ meta-fsl-ppc/conf/machine/p5040ds.conf | 3 +++ 23 files changed, 66 insertions(+), 6 deletions(-) diff --git a/meta-fsl-ppc/conf/distro/fsl.conf b/meta-fsl-ppc/conf/distro/fsl.conf index bcadbc74..2818b265 100644 --- a/meta-fsl-ppc/conf/distro/fsl.conf +++ b/meta-fsl-ppc/conf/distro/fsl.conf @@ -88,10 +88,4 @@ PREFERRED_VERSION_u-boot-mkimage-native_powerpc = "2011.06" PREFERRED_PROVIDER_virtual/libx11 = "libx11" PREFERRED_PROVIDER_linux-libc-headers-nativesdk ?= "linux-qoriq-sdk-headers-nativesdk" -SYSVINIT_ENABLED_GETTYS = "" -USE_VT = "" -SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" - CCACHE = "" - - diff --git a/meta-fsl-ppc/conf/machine/mpc8536ds.conf b/meta-fsl-ppc/conf/machine/mpc8536ds.conf index 21effbc9..bc74b8da 100644 --- a/meta-fsl-ppc/conf/machine/mpc8536ds.conf +++ b/meta-fsl-ppc/conf/machine/mpc8536ds.conf @@ -11,3 +11,6 @@ KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_defconfig" JFFS2_ERASEBLOCK = "0x20000" +SYSVINIT_ENABLED_GETTYS = "" +USE_VT = "" +SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" diff --git a/meta-fsl-ppc/conf/machine/mpc8544ds.conf b/meta-fsl-ppc/conf/machine/mpc8544ds.conf index a9cfadc3..2199dcc5 100644 --- a/meta-fsl-ppc/conf/machine/mpc8544ds.conf +++ b/meta-fsl-ppc/conf/machine/mpc8544ds.conf @@ -10,3 +10,6 @@ KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_defconfig" JFFS2_ERASEBLOCK = "0x20000" +SYSVINIT_ENABLED_GETTYS = "" +USE_VT = "" +SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" diff --git a/meta-fsl-ppc/conf/machine/mpc8548cds.conf b/meta-fsl-ppc/conf/machine/mpc8548cds.conf index 821aac0e..01a5cc61 100644 --- a/meta-fsl-ppc/conf/machine/mpc8548cds.conf +++ b/meta-fsl-ppc/conf/machine/mpc8548cds.conf @@ -10,3 +10,6 @@ KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_defconfig" JFFS2_ERASEBLOCK = "0x20000" +SYSVINIT_ENABLED_GETTYS = "" +USE_VT = "" +SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" diff --git a/meta-fsl-ppc/conf/machine/mpc8572ds.conf b/meta-fsl-ppc/conf/machine/mpc8572ds.conf index 277cdc41..65033ea2 100644 --- a/meta-fsl-ppc/conf/machine/mpc8572ds.conf +++ b/meta-fsl-ppc/conf/machine/mpc8572ds.conf @@ -9,3 +9,6 @@ KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" JFFS2_ERASEBLOCK = "0x20000" +SYSVINIT_ENABLED_GETTYS = "" +USE_VT = "" +SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" diff --git a/meta-fsl-ppc/conf/machine/p1010rdb.conf b/meta-fsl-ppc/conf/machine/p1010rdb.conf index 362acd21..85253000 100644 --- a/meta-fsl-ppc/conf/machine/p1010rdb.conf +++ b/meta-fsl-ppc/conf/machine/p1010rdb.conf @@ -10,3 +10,6 @@ KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_defconfig" JFFS2_ERASEBLOCK = "0x20000" +SYSVINIT_ENABLED_GETTYS = "" +USE_VT = "" +SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" diff --git a/meta-fsl-ppc/conf/machine/p1020mbg.conf b/meta-fsl-ppc/conf/machine/p1020mbg.conf index da62c432..57d826fd 100644 --- a/meta-fsl-ppc/conf/machine/p1020mbg.conf +++ b/meta-fsl-ppc/conf/machine/p1020mbg.conf @@ -11,3 +11,6 @@ KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" JFFS2_ERASEBLOCK = "0x20000" +SYSVINIT_ENABLED_GETTYS = "" +USE_VT = "" +SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" diff --git a/meta-fsl-ppc/conf/machine/p1020rdb.conf b/meta-fsl-ppc/conf/machine/p1020rdb.conf index 653533cf..c4cf9c5a 100644 --- a/meta-fsl-ppc/conf/machine/p1020rdb.conf +++ b/meta-fsl-ppc/conf/machine/p1020rdb.conf @@ -12,3 +12,6 @@ KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" JFFS2_ERASEBLOCK = "0x20000" +SYSVINIT_ENABLED_GETTYS = "" +USE_VT = "" +SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" diff --git a/meta-fsl-ppc/conf/machine/p1020utm.conf b/meta-fsl-ppc/conf/machine/p1020utm.conf index 79298413..af679869 100644 --- a/meta-fsl-ppc/conf/machine/p1020utm.conf +++ b/meta-fsl-ppc/conf/machine/p1020utm.conf @@ -11,3 +11,6 @@ KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" JFFS2_ERASEBLOCK = "0x20000" +SYSVINIT_ENABLED_GETTYS = "" +USE_VT = "" +SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" diff --git a/meta-fsl-ppc/conf/machine/p1021rdb.conf b/meta-fsl-ppc/conf/machine/p1021rdb.conf index 8e807520..0d9349ec 100644 --- a/meta-fsl-ppc/conf/machine/p1021rdb.conf +++ b/meta-fsl-ppc/conf/machine/p1021rdb.conf @@ -10,3 +10,6 @@ KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" JFFS2_ERASEBLOCK = "0x20000" +SYSVINIT_ENABLED_GETTYS = "" +USE_VT = "" +SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" diff --git a/meta-fsl-ppc/conf/machine/p1022ds.conf b/meta-fsl-ppc/conf/machine/p1022ds.conf index 1f15303c..7d7b6af7 100644 --- a/meta-fsl-ppc/conf/machine/p1022ds.conf +++ b/meta-fsl-ppc/conf/machine/p1022ds.conf @@ -20,3 +20,6 @@ XSERVER = " \ JFFS2_ERASEBLOCK = "0x20000" +SYSVINIT_ENABLED_GETTYS = "" +USE_VT = "" +SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" diff --git a/meta-fsl-ppc/conf/machine/p1023rds.conf b/meta-fsl-ppc/conf/machine/p1023rds.conf index 522bde6c..f2397ef2 100644 --- a/meta-fsl-ppc/conf/machine/p1023rds.conf +++ b/meta-fsl-ppc/conf/machine/p1023rds.conf @@ -9,3 +9,6 @@ KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/85xx/p1023rds_defconfig" JFFS2_ERASEBLOCK = "0x10000" +SYSVINIT_ENABLED_GETTYS = "" +USE_VT = "" +SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" diff --git a/meta-fsl-ppc/conf/machine/p1024rdb.conf b/meta-fsl-ppc/conf/machine/p1024rdb.conf index 1a7e315d..98b5ea24 100644 --- a/meta-fsl-ppc/conf/machine/p1024rdb.conf +++ b/meta-fsl-ppc/conf/machine/p1024rdb.conf @@ -11,3 +11,6 @@ KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" JFFS2_ERASEBLOCK = "0x20000" +SYSVINIT_ENABLED_GETTYS = "" +USE_VT = "" +SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" diff --git a/meta-fsl-ppc/conf/machine/p1025rdb.conf b/meta-fsl-ppc/conf/machine/p1025rdb.conf index bcb167ef..b5231fa2 100644 --- a/meta-fsl-ppc/conf/machine/p1025rdb.conf +++ b/meta-fsl-ppc/conf/machine/p1025rdb.conf @@ -12,3 +12,6 @@ KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" JFFS2_ERASEBLOCK = "0x20000" +SYSVINIT_ENABLED_GETTYS = "" +USE_VT = "" +SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" diff --git a/meta-fsl-ppc/conf/machine/p2020ds.conf b/meta-fsl-ppc/conf/machine/p2020ds.conf index 3059bdef..bedb3da3 100644 --- a/meta-fsl-ppc/conf/machine/p2020ds.conf +++ b/meta-fsl-ppc/conf/machine/p2020ds.conf @@ -10,3 +10,6 @@ KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" JFFS2_ERASEBLOCK = "0x20000" +SYSVINIT_ENABLED_GETTYS = "" +USE_VT = "" +SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" diff --git a/meta-fsl-ppc/conf/machine/p2020rdb.conf b/meta-fsl-ppc/conf/machine/p2020rdb.conf index 188a6f2e..52e2e11e 100644 --- a/meta-fsl-ppc/conf/machine/p2020rdb.conf +++ b/meta-fsl-ppc/conf/machine/p2020rdb.conf @@ -11,3 +11,6 @@ KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" JFFS2_ERASEBLOCK = "0x20000" +SYSVINIT_ENABLED_GETTYS = "" +USE_VT = "" +SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" diff --git a/meta-fsl-ppc/conf/machine/p2041rdb.conf b/meta-fsl-ppc/conf/machine/p2041rdb.conf index e1614598..6854da34 100644 --- a/meta-fsl-ppc/conf/machine/p2041rdb.conf +++ b/meta-fsl-ppc/conf/machine/p2041rdb.conf @@ -10,3 +10,6 @@ KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet32_smp_defconfig" JFFS2_ERASEBLOCK = "0x10000" +SYSVINIT_ENABLED_GETTYS = "" +USE_VT = "" +SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" diff --git a/meta-fsl-ppc/conf/machine/p3041ds.conf b/meta-fsl-ppc/conf/machine/p3041ds.conf index 909761e4..35b6feb4 100644 --- a/meta-fsl-ppc/conf/machine/p3041ds.conf +++ b/meta-fsl-ppc/conf/machine/p3041ds.conf @@ -10,3 +10,6 @@ KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet32_smp_defconfig" JFFS2_ERASEBLOCK = "0x10000" +SYSVINIT_ENABLED_GETTYS = "" +USE_VT = "" +SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" diff --git a/meta-fsl-ppc/conf/machine/p4080ds.conf b/meta-fsl-ppc/conf/machine/p4080ds.conf index 6c90912e..0de03042 100644 --- a/meta-fsl-ppc/conf/machine/p4080ds.conf +++ b/meta-fsl-ppc/conf/machine/p4080ds.conf @@ -10,3 +10,6 @@ KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet32_smp_defconfig" JFFS2_ERASEBLOCK = "0x10000" +SYSVINIT_ENABLED_GETTYS = "" +USE_VT = "" +SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" diff --git a/meta-fsl-ppc/conf/machine/p5020ds-64b.conf b/meta-fsl-ppc/conf/machine/p5020ds-64b.conf index e946076b..46b3187c 100644 --- a/meta-fsl-ppc/conf/machine/p5020ds-64b.conf +++ b/meta-fsl-ppc/conf/machine/p5020ds-64b.conf @@ -11,3 +11,6 @@ KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet64_smp_defconfig" JFFS2_ERASEBLOCK = "0x10000" +SYSVINIT_ENABLED_GETTYS = "" +USE_VT = "" +SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" diff --git a/meta-fsl-ppc/conf/machine/p5020ds.conf b/meta-fsl-ppc/conf/machine/p5020ds.conf index 3a5c6721..7b5ed832 100644 --- a/meta-fsl-ppc/conf/machine/p5020ds.conf +++ b/meta-fsl-ppc/conf/machine/p5020ds.conf @@ -10,3 +10,6 @@ KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet32_smp_defconfig" JFFS2_ERASEBLOCK = "0x10000" +SYSVINIT_ENABLED_GETTYS = "" +USE_VT = "" +SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" diff --git a/meta-fsl-ppc/conf/machine/p5040ds-64b.conf b/meta-fsl-ppc/conf/machine/p5040ds-64b.conf index 15604201..41f4ad2c 100644 --- a/meta-fsl-ppc/conf/machine/p5040ds-64b.conf +++ b/meta-fsl-ppc/conf/machine/p5040ds-64b.conf @@ -10,3 +10,6 @@ KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet64_smp_defconfig" JFFS2_ERASEBLOCK = "0x10000" +SYSVINIT_ENABLED_GETTYS = "" +USE_VT = "" +SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" diff --git a/meta-fsl-ppc/conf/machine/p5040ds.conf b/meta-fsl-ppc/conf/machine/p5040ds.conf index f3719c6e..dd09e341 100644 --- a/meta-fsl-ppc/conf/machine/p5040ds.conf +++ b/meta-fsl-ppc/conf/machine/p5040ds.conf @@ -10,3 +10,6 @@ KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet32_smp_defconfig" JFFS2_ERASEBLOCK = "0x10000" +SYSVINIT_ENABLED_GETTYS = "" +USE_VT = "" +SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" -- cgit v1.2.3-54-g00ecf From 516edf59a676cd0bf19b3339909d747ec48b2ee5 Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Wed, 11 Jul 2012 13:01:32 -0500 Subject: fsl.conf: check all the serial consoles if they are present at boot Signed-off-by: Matthew McClintock --- meta-fsl-ppc/conf/distro/fsl.conf | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/meta-fsl-ppc/conf/distro/fsl.conf b/meta-fsl-ppc/conf/distro/fsl.conf index 2818b265..ed04a062 100644 --- a/meta-fsl-ppc/conf/distro/fsl.conf +++ b/meta-fsl-ppc/conf/distro/fsl.conf @@ -88,4 +88,9 @@ PREFERRED_VERSION_u-boot-mkimage-native_powerpc = "2011.06" PREFERRED_PROVIDER_virtual/libx11 = "libx11" PREFERRED_PROVIDER_linux-libc-headers-nativesdk ?= "linux-qoriq-sdk-headers-nativesdk" +SYSVINIT_ENABLED_GETTYS = "" +USE_VT = "" +SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" +SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" + CCACHE = "" -- cgit v1.2.3-54-g00ecf From cc8a3e6d7334813d1bfd299052925b07a2f40132 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Tue, 17 Jul 2012 23:25:47 -0700 Subject: machine/e500v2.inc: Do not define TARGET_FPU This is nicely defined in tune-e500v2.inc from oe-core, if we also define it here then oe-core appends to it and it becomes a wrong string 'ppc-efdppc-efd' which then gcc fails to identify and configures itself without e500_double support Signed-off-by: Khem Raj --- meta-fsl-ppc/conf/machine/e500v2.inc | 2 -- 1 file changed, 2 deletions(-) diff --git a/meta-fsl-ppc/conf/machine/e500v2.inc b/meta-fsl-ppc/conf/machine/e500v2.inc index 6e2eb493..62698a9e 100644 --- a/meta-fsl-ppc/conf/machine/e500v2.inc +++ b/meta-fsl-ppc/conf/machine/e500v2.inc @@ -1,5 +1,3 @@ -TARGET_FPU = "ppc-efd" - require conf/machine/include/tune-ppce500v2.inc MACHINE_FEATURES = "kernel26 pci ext2 ext3 serial" -- cgit v1.2.3-54-g00ecf From b5a513d07b5fb54a90ccc06a9eb43c79e2379f37 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Mon, 23 Jul 2012 14:53:49 -0700 Subject: linux-qoriq-sdk-headers: Make it machine independent The linux libc headers should not be dependent on machine at all. These are generic enough that we can use an all purpose defconfig. Signed-off-by: Khem Raj --- .../linux/linux-qoriq-sdk-headers.bb | 41 +++++++--------------- 1 file changed, 12 insertions(+), 29 deletions(-) diff --git a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk-headers.bb b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk-headers.bb index 4be6c420..b1cbb8dc 100644 --- a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk-headers.bb +++ b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk-headers.bb @@ -2,46 +2,29 @@ DESCRIPTION = "Linux kernel headers for Freescale platforms" SECTION = "devel" LICENSE = "GPLv2" -PKGSUFFIX = "" -PKGSUFFIX_virtclass-nativesdk = "-nativesdk" - INHIBIT_DEFAULT_DEPS = "1" -PROVIDES = "linux-libc-headers${PKGSUFFIX} ${PN}" -RPROVIDES_${PN}-dev += "linux-libc-headers${PKGSUFFIX}-dev" -RPROVIDES_${PN}-dbg += "linux-libc-headers${PKGSUFFIX}-dbg" +PROVIDES = "linux-libc-headers ${PN}" +RPROVIDES_${PN}-dev += "linux-libc-headers-dev" +RPROVIDES_${PN}-dbg += "linux-libc-headers-dbg" RDEPENDS_${PN}-dev = "" -RRECOMMENDS_${PN}-dbg = "linux-libc-headers${PKGSUFFIX}-dev (= ${EXTENDPKGV})" +RRECOMMENDS_${PN}-dbg = "linux-libc-headers-dev (= ${EXTENDPKGV})" require recipes-kernel/linux/linux-qoriq-sdk.inc -set_arch() { - case ${TARGET_ARCH} in - arm*) ARCH=arm ;; - i*86*) ARCH=i386 ;; - ia64*) ARCH=ia64 ;; - mips*) ARCH=mips ;; - powerpc*) ARCH=powerpc ;; - x86_64*) ARCH=x86_64 ;; - esac -} +inherit kernel-arch -do_configure () { - set_arch - cp ${KERNEL_DEFCONFIG} ${B}/.config - oe_runmake oldconfig ARCH=${ARCH} +do_configure() { + oe_runmake allnoconfig } -do_configure[vardepsexclude] += "KERNEL_DEFCONFIG" do_compile () { } do_install() { - set_arch - cd ${S} - oe_runmake headers_install INSTALL_HDR_PATH=${D}${exec_prefix} ARCH=${ARCH} + oe_runmake headers_install INSTALL_HDR_PATH=${D}${exec_prefix} + # Kernel should not be exporting this header + rm -f ${D}${exec_prefix}/include/scsi/scsi.h - # The ..install.cmd conflicts between various configure runs - find ${D}${includedir} -name ..install.cmd | xargs rm -f + # The ..install.cmd conflicts between various configure runs + find ${D}${includedir} -name ..install.cmd | xargs rm -f } - -BBCLASSEXTEND = "nativesdk" -- cgit v1.2.3-54-g00ecf From 3bfdf807b7f48c6580c37def8d37b2d150419e4f Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Wed, 1 Aug 2012 18:34:33 -0500 Subject: linux-qoriq-sdk.inc: don't use tag in recipe, use git SHA This keeps us from hitting the network as well as assures the tag itself did not change Signed-off-by: Matthew McClintock --- meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc index 4b6505e4..66861fb1 100644 --- a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc +++ b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc @@ -3,7 +3,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7" PV = "3.0.34" PR = "r3" -SRCREV = "fsl-sdk-v1.2" +SRCREV = "1a395700fb4084c9179a8b20dca76a74e71dd833" SRC_URI = "git://git.freescale.com/ppc/sdk/linux.git \ " -- cgit v1.2.3-54-g00ecf From 96f27e97b91db16d434bc38e1c35a1b54a7bbd13 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 1 Aug 2012 20:44:15 -0700 Subject: linux-qoriq-sdk.bb: prepend to do_configure Instead of prepending to kernel_do_configure lets prepend to do_configure this gives another knob for users who want to insert between this prepend and do_configure_kernel. Typical usecase is to enable kconfig options on top of defconfig can be then appended to .config easliy in a bbappend. Signed-off-by: Khem Raj --- meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.bb b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.bb index fb2ff4a3..18e6e16e 100644 --- a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.bb +++ b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.bb @@ -7,7 +7,7 @@ LICENSE = "GPLv2" require recipes-kernel/linux/linux-qoriq-sdk.inc -kernel_do_configure_prepend() { +do_configure_prepend() { # copy desired defconfig so we pick it up for the real kernel_do_configure cp ${KERNEL_DEFCONFIG} ${B}/.config } -- cgit v1.2.3-54-g00ecf From 0d34e860868e9e200662be5c558a12db703e77f2 Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Mon, 6 Aug 2012 13:35:33 -0500 Subject: u-boot: change UBOOT_MACHINES to use ?= so they can be overridden Signed-off-by: Matthew McClintock --- meta-fsl-ppc/conf/machine/mpc8536ds.conf | 2 +- meta-fsl-ppc/conf/machine/mpc8544ds.conf | 2 +- meta-fsl-ppc/conf/machine/mpc8548cds.conf | 2 +- meta-fsl-ppc/conf/machine/mpc8572ds.conf | 2 +- meta-fsl-ppc/conf/machine/p1010rdb.conf | 2 +- meta-fsl-ppc/conf/machine/p1020mbg.conf | 2 +- meta-fsl-ppc/conf/machine/p1020rdb.conf | 2 +- meta-fsl-ppc/conf/machine/p1020utm.conf | 2 +- meta-fsl-ppc/conf/machine/p1021rdb.conf | 2 +- meta-fsl-ppc/conf/machine/p1022ds.conf | 2 +- meta-fsl-ppc/conf/machine/p1023rds.conf | 2 +- meta-fsl-ppc/conf/machine/p1024rdb.conf | 2 +- meta-fsl-ppc/conf/machine/p1025rdb.conf | 2 +- meta-fsl-ppc/conf/machine/p2020ds.conf | 2 +- meta-fsl-ppc/conf/machine/p2020rdb.conf | 2 +- meta-fsl-ppc/conf/machine/p2041rdb.conf | 2 +- meta-fsl-ppc/conf/machine/p3041ds.conf | 2 +- meta-fsl-ppc/conf/machine/p4080ds.conf | 2 +- meta-fsl-ppc/conf/machine/p5020ds-64b.conf | 2 +- meta-fsl-ppc/conf/machine/p5020ds.conf | 2 +- meta-fsl-ppc/conf/machine/p5040ds-64b.conf | 2 +- meta-fsl-ppc/conf/machine/p5040ds.conf | 2 +- 22 files changed, 22 insertions(+), 22 deletions(-) diff --git a/meta-fsl-ppc/conf/machine/mpc8536ds.conf b/meta-fsl-ppc/conf/machine/mpc8536ds.conf index bc74b8da..aef057ad 100644 --- a/meta-fsl-ppc/conf/machine/mpc8536ds.conf +++ b/meta-fsl-ppc/conf/machine/mpc8536ds.conf @@ -5,7 +5,7 @@ require e500v2.inc BOOTFORMAT_CONFIG = "config_ddr2_512m_mpc8536ds_667M.dat" -UBOOT_MACHINES = "MPC8536DS MPC8536DS_36BIT MPC8536DS_NAND MPC8536DS_SDCARD MPC8536DS_SPIFLASH" +UBOOT_MACHINES ?= "MPC8536DS MPC8536DS_36BIT MPC8536DS_NAND MPC8536DS_SDCARD MPC8536DS_SPIFLASH" KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/mpc8536ds.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_defconfig" diff --git a/meta-fsl-ppc/conf/machine/mpc8544ds.conf b/meta-fsl-ppc/conf/machine/mpc8544ds.conf index 2199dcc5..3d5d26ea 100644 --- a/meta-fsl-ppc/conf/machine/mpc8544ds.conf +++ b/meta-fsl-ppc/conf/machine/mpc8544ds.conf @@ -4,7 +4,7 @@ require e500v2.inc -UBOOT_MACHINES = "MPC8544DS" +UBOOT_MACHINES ?= "MPC8544DS" KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/mpc8544ds.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_defconfig" diff --git a/meta-fsl-ppc/conf/machine/mpc8548cds.conf b/meta-fsl-ppc/conf/machine/mpc8548cds.conf index 01a5cc61..007c3bc9 100644 --- a/meta-fsl-ppc/conf/machine/mpc8548cds.conf +++ b/meta-fsl-ppc/conf/machine/mpc8548cds.conf @@ -4,7 +4,7 @@ require e500v2.inc -UBOOT_MACHINES = "MPC8548CDS" +UBOOT_MACHINES ?= "MPC8548CDS" KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/mpc8548cds_32b.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_defconfig" diff --git a/meta-fsl-ppc/conf/machine/mpc8572ds.conf b/meta-fsl-ppc/conf/machine/mpc8572ds.conf index 65033ea2..cefcdcc0 100644 --- a/meta-fsl-ppc/conf/machine/mpc8572ds.conf +++ b/meta-fsl-ppc/conf/machine/mpc8572ds.conf @@ -3,7 +3,7 @@ require e500v2.inc -UBOOT_MACHINES = "MPC8572DS" +UBOOT_MACHINES ?= "MPC8572DS" KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/mpc8572ds.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" diff --git a/meta-fsl-ppc/conf/machine/p1010rdb.conf b/meta-fsl-ppc/conf/machine/p1010rdb.conf index 85253000..a56f7b7c 100644 --- a/meta-fsl-ppc/conf/machine/p1010rdb.conf +++ b/meta-fsl-ppc/conf/machine/p1010rdb.conf @@ -4,7 +4,7 @@ require e500v2.inc -UBOOT_MACHINES = "P1010RDB_NAND" +UBOOT_MACHINES ?= "P1010RDB_NAND" KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p1010rdb.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_defconfig" diff --git a/meta-fsl-ppc/conf/machine/p1020mbg.conf b/meta-fsl-ppc/conf/machine/p1020mbg.conf index 57d826fd..d7c41197 100644 --- a/meta-fsl-ppc/conf/machine/p1020mbg.conf +++ b/meta-fsl-ppc/conf/machine/p1020mbg.conf @@ -5,7 +5,7 @@ require e500v2.inc BOOTFORMAT_CONFIG = "config_ddr3_1gb_p1_p2_rdb_pc_800M.dat" -UBOOT_MACHINES = "P1020MBG-PC P1020MBG-PC_SDCARD P1020MBG-PC_36BIT P1020MBG-PC_36BIT_SDCARD" +UBOOT_MACHINES ?= "P1020MBG-PC P1020MBG-PC_SDCARD P1020MBG-PC_36BIT P1020MBG-PC_36BIT_SDCARD" KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p1020mbg-pc_32b.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" diff --git a/meta-fsl-ppc/conf/machine/p1020rdb.conf b/meta-fsl-ppc/conf/machine/p1020rdb.conf index c4cf9c5a..0ebe32c8 100644 --- a/meta-fsl-ppc/conf/machine/p1020rdb.conf +++ b/meta-fsl-ppc/conf/machine/p1020rdb.conf @@ -4,7 +4,7 @@ require e500v2.inc BOOTFORMAT_CONFIG = "config_ddr3_1gb_p1_p2_rdb_pc_800M.dat" -UBOOT_MACHINES = " P1020RDB-PC P1020RDB-PC_SPIFLASH P1020RDB-PC_NAND P1020RDB-PC_SDCARD P1020RDB-PC_36BIT P1020RDB-PC_36BIT_SPIFLASH P1020RDB-PC_36BIT_NAND P1020RDB-PC_36BIT_SDCARD" +UBOOT_MACHINES ?= " P1020RDB-PC P1020RDB-PC_SPIFLASH P1020RDB-PC_NAND P1020RDB-PC_SDCARD P1020RDB-PC_36BIT P1020RDB-PC_36BIT_SPIFLASH P1020RDB-PC_36BIT_NAND P1020RDB-PC_36BIT_SDCARD" KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p1020rdb-pc_32b.dts" diff --git a/meta-fsl-ppc/conf/machine/p1020utm.conf b/meta-fsl-ppc/conf/machine/p1020utm.conf index af679869..fc71ddd5 100644 --- a/meta-fsl-ppc/conf/machine/p1020utm.conf +++ b/meta-fsl-ppc/conf/machine/p1020utm.conf @@ -5,7 +5,7 @@ require e500v2.inc BOOTFORMAT_CONFIG = "config_ddr3_1gb_p1_p2_rdb_pc_800M.dat" -UBOOT_MACHINES = "P1020UTM-PC P1020UTM-PC_SDCARD P1020UTM-PC_36BIT P1020UTM-PC_36BIT_SDCARD" +UBOOT_MACHINES ?= "P1020UTM-PC P1020UTM-PC_SDCARD P1020UTM-PC_36BIT P1020UTM-PC_36BIT_SDCARD" KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p1020utm-pc_32b.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" diff --git a/meta-fsl-ppc/conf/machine/p1021rdb.conf b/meta-fsl-ppc/conf/machine/p1021rdb.conf index 0d9349ec..cecbf580 100644 --- a/meta-fsl-ppc/conf/machine/p1021rdb.conf +++ b/meta-fsl-ppc/conf/machine/p1021rdb.conf @@ -4,7 +4,7 @@ require e500v2.inc BOOTFORMAT_CONFIG = "config_ddr3_1gb_p1_p2_rdb_pc_800M.dat" -UBOOT_MACHINES = "P1021RDB-PC P1021RDB-PC_NAND P1021RDB-PC_SDCARD P1021RDB-PC_SPIFLASH P1021RDB-PC_36BIT P1021RDB-PC_36BIT_SPIFLASH P1021RDB-PC_36BIT_NAND P1021RDB-PC_36BIT_SDCARD" +UBOOT_MACHINES ?= "P1021RDB-PC P1021RDB-PC_NAND P1021RDB-PC_SDCARD P1021RDB-PC_SPIFLASH P1021RDB-PC_36BIT P1021RDB-PC_36BIT_SPIFLASH P1021RDB-PC_36BIT_NAND P1021RDB-PC_36BIT_SDCARD" KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p1021rdb-pc_32b.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" diff --git a/meta-fsl-ppc/conf/machine/p1022ds.conf b/meta-fsl-ppc/conf/machine/p1022ds.conf index 7d7b6af7..fa93d316 100644 --- a/meta-fsl-ppc/conf/machine/p1022ds.conf +++ b/meta-fsl-ppc/conf/machine/p1022ds.conf @@ -4,7 +4,7 @@ require e500v2.inc BOOTFORMAT_CONFIG = "config_ddr3_2gb_p1022ds.dat" -UBOOT_MACHINES = "P1022DS P1022DS_NAND P1022DS_SPIFLASH P1022DS_SDCARD P1022DS_36BIT P1022DS_36BIT_SPIFLASH P1022DS_36BIT_NAND P1022DS_36BIT_SDCARD" +UBOOT_MACHINES ?= "P1022DS P1022DS_NAND P1022DS_SPIFLASH P1022DS_SDCARD P1022DS_36BIT P1022DS_36BIT_SPIFLASH P1022DS_36BIT_NAND P1022DS_36BIT_SDCARD" KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p1022ds_32b.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" diff --git a/meta-fsl-ppc/conf/machine/p1023rds.conf b/meta-fsl-ppc/conf/machine/p1023rds.conf index f2397ef2..5f97c465 100644 --- a/meta-fsl-ppc/conf/machine/p1023rds.conf +++ b/meta-fsl-ppc/conf/machine/p1023rds.conf @@ -3,7 +3,7 @@ require e500v2.inc -UBOOT_MACHINES = "P1023RDS P1023RDS_NAND" +UBOOT_MACHINES ?= "P1023RDS P1023RDS_NAND" KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p1023rds.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/85xx/p1023rds_defconfig" diff --git a/meta-fsl-ppc/conf/machine/p1024rdb.conf b/meta-fsl-ppc/conf/machine/p1024rdb.conf index 98b5ea24..37b27177 100644 --- a/meta-fsl-ppc/conf/machine/p1024rdb.conf +++ b/meta-fsl-ppc/conf/machine/p1024rdb.conf @@ -5,7 +5,7 @@ require e500v2.inc BOOTFORMAT_CONFIG = "config_ddr3_1gb_p1_p2_rdb_pc_667M.dat" -UBOOT_MACHINES = "P1024RDB P1024RDB_36BIT P1024RDB_NAND P1024RDB_SDCARD P1024RDB_SPIFLASH" +UBOOT_MACHINES ?= "P1024RDB P1024RDB_36BIT P1024RDB_NAND P1024RDB_SDCARD P1024RDB_SPIFLASH" KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p1024rdb_32b.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" diff --git a/meta-fsl-ppc/conf/machine/p1025rdb.conf b/meta-fsl-ppc/conf/machine/p1025rdb.conf index b5231fa2..bc1b4246 100644 --- a/meta-fsl-ppc/conf/machine/p1025rdb.conf +++ b/meta-fsl-ppc/conf/machine/p1025rdb.conf @@ -6,7 +6,7 @@ require e500v2.inc BOOTFORMAT_CONFIG = "config_ddr3_1gb_p1_p2_rdb_pc_667M.dat" -UBOOT_MACHINES = "P1025RDB P1025RDB_36BIT P1025RDB_NAND P1025RDB_SDCARD P1025RDB_SPIFLASH" +UBOOT_MACHINES ?= "P1025RDB P1025RDB_36BIT P1025RDB_NAND P1025RDB_SDCARD P1025RDB_SPIFLASH" KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p1025rdb_32b.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" diff --git a/meta-fsl-ppc/conf/machine/p2020ds.conf b/meta-fsl-ppc/conf/machine/p2020ds.conf index bedb3da3..80c54cef 100644 --- a/meta-fsl-ppc/conf/machine/p2020ds.conf +++ b/meta-fsl-ppc/conf/machine/p2020ds.conf @@ -4,7 +4,7 @@ require e500v2.inc BOOTFORMAT_CONFIG = "config_sram_p2020ds.dat" -UBOOT_MACHINES = "P2020DS P2020DS_36BIT P2020DS_DDR2 P2020DS_SDCARD P2020DS_SPIFLASH" +UBOOT_MACHINES ?= "P2020DS P2020DS_36BIT P2020DS_DDR2 P2020DS_SDCARD P2020DS_SPIFLASH" KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p2020ds.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" diff --git a/meta-fsl-ppc/conf/machine/p2020rdb.conf b/meta-fsl-ppc/conf/machine/p2020rdb.conf index 52e2e11e..09e56804 100644 --- a/meta-fsl-ppc/conf/machine/p2020rdb.conf +++ b/meta-fsl-ppc/conf/machine/p2020rdb.conf @@ -5,7 +5,7 @@ require e500v2.inc BOOTFORMAT_CONFIG = "config_ddr3_1gb_64bit_p2020rdb_pc.dat" -UBOOT_MACHINES = " P2020RDB-PC P2020RDB-PC_NAND P2020RDB-PC_SDCARD P2020RDB-PC_SPIFLASH P2020RDB-PC_36BIT P2020RDB-PC_36BIT_SPIFLASH P2020RDB-PC_36BIT_NAND P2020RDB-PC_36BIT_SDCARD" +UBOOT_MACHINES ?= " P2020RDB-PC P2020RDB-PC_NAND P2020RDB-PC_SDCARD P2020RDB-PC_SPIFLASH P2020RDB-PC_36BIT P2020RDB-PC_36BIT_SPIFLASH P2020RDB-PC_36BIT_NAND P2020RDB-PC_36BIT_SDCARD" KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p2020rdb-pc_32b.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" diff --git a/meta-fsl-ppc/conf/machine/p2041rdb.conf b/meta-fsl-ppc/conf/machine/p2041rdb.conf index 6854da34..b4f12648 100644 --- a/meta-fsl-ppc/conf/machine/p2041rdb.conf +++ b/meta-fsl-ppc/conf/machine/p2041rdb.conf @@ -3,7 +3,7 @@ require e500mc.inc -UBOOT_MACHINES = "P2041RDB P2041RDB_SECURE_BOOT P2041RDB_SDCARD P2041RDB_SPIFLASH" +UBOOT_MACHINES ?= "P2041RDB P2041RDB_SECURE_BOOT P2041RDB_SDCARD P2041RDB_SPIFLASH" KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p2041rdb.dts \ ${S}/arch/powerpc/boot/dts/p2041rdb-usdpaa.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet32_smp_defconfig" diff --git a/meta-fsl-ppc/conf/machine/p3041ds.conf b/meta-fsl-ppc/conf/machine/p3041ds.conf index 35b6feb4..2f2c605b 100644 --- a/meta-fsl-ppc/conf/machine/p3041ds.conf +++ b/meta-fsl-ppc/conf/machine/p3041ds.conf @@ -3,7 +3,7 @@ require e500mc.inc -UBOOT_MACHINES = "P3041DS P3041DS_NAND P3041DS_SECURE_BOOT P3041DS_SDCARD P3041DS_SPIFLASH" +UBOOT_MACHINES ?= "P3041DS P3041DS_NAND P3041DS_SECURE_BOOT P3041DS_SDCARD P3041DS_SPIFLASH" KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p3041ds.dts \ ${S}/arch/powerpc/boot/dts/p3041ds-usdpaa.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet32_smp_defconfig" diff --git a/meta-fsl-ppc/conf/machine/p4080ds.conf b/meta-fsl-ppc/conf/machine/p4080ds.conf index 0de03042..0d29de27 100644 --- a/meta-fsl-ppc/conf/machine/p4080ds.conf +++ b/meta-fsl-ppc/conf/machine/p4080ds.conf @@ -3,7 +3,7 @@ require e500mc.inc -UBOOT_MACHINES = "P4080DS P4080DS_SECURE_BOOT P4080DS_SDCARD P4080DS_SPIFLASH " +UBOOT_MACHINES ?= "P4080DS P4080DS_SECURE_BOOT P4080DS_SDCARD P4080DS_SPIFLASH " KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p4080ds.dts \ ${S}/arch/powerpc/boot/dts/p4080ds-usdpaa.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet32_smp_defconfig" diff --git a/meta-fsl-ppc/conf/machine/p5020ds-64b.conf b/meta-fsl-ppc/conf/machine/p5020ds-64b.conf index 46b3187c..9ab47110 100644 --- a/meta-fsl-ppc/conf/machine/p5020ds-64b.conf +++ b/meta-fsl-ppc/conf/machine/p5020ds-64b.conf @@ -4,7 +4,7 @@ require e5500-64b.inc # TODO: fix 32bit build of u-boot for p5020ds-64b -UBOOT_MACHINES = "P5020DS" +UBOOT_MACHINES ?= "P5020DS" KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p5020ds.dts \ ${S}/arch/powerpc/boot/dts/p5020ds-usdpaa.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet64_smp_defconfig" diff --git a/meta-fsl-ppc/conf/machine/p5020ds.conf b/meta-fsl-ppc/conf/machine/p5020ds.conf index 7b5ed832..45d1ea71 100644 --- a/meta-fsl-ppc/conf/machine/p5020ds.conf +++ b/meta-fsl-ppc/conf/machine/p5020ds.conf @@ -3,7 +3,7 @@ require e5500.inc -UBOOT_MACHINES = "P5020DS P5020DS_NAND P5020DS_SECURE_BOOT P5020DS_SDCARD P5020DS_SPIFLASH " +UBOOT_MACHINES ?= "P5020DS P5020DS_NAND P5020DS_SECURE_BOOT P5020DS_SDCARD P5020DS_SPIFLASH " KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p5020ds.dts \ ${S}/arch/powerpc/boot/dts/p5020ds-usdpaa.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet32_smp_defconfig" diff --git a/meta-fsl-ppc/conf/machine/p5040ds-64b.conf b/meta-fsl-ppc/conf/machine/p5040ds-64b.conf index 41f4ad2c..091f81f7 100644 --- a/meta-fsl-ppc/conf/machine/p5040ds-64b.conf +++ b/meta-fsl-ppc/conf/machine/p5040ds-64b.conf @@ -3,7 +3,7 @@ require e5500-64b.inc -UBOOT_MACHINES = "P5040DS" +UBOOT_MACHINES ?= "P5040DS" KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p5040ds.dts \ ${S}/arch/powerpc/boot/dts/p5040ds-usdpaa.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet64_smp_defconfig" diff --git a/meta-fsl-ppc/conf/machine/p5040ds.conf b/meta-fsl-ppc/conf/machine/p5040ds.conf index dd09e341..f06b47a6 100644 --- a/meta-fsl-ppc/conf/machine/p5040ds.conf +++ b/meta-fsl-ppc/conf/machine/p5040ds.conf @@ -3,7 +3,7 @@ require e5500.inc -UBOOT_MACHINES = "P5040DS" +UBOOT_MACHINES ?= "P5040DS" KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p5040ds.dts \ ${S}/arch/powerpc/boot/dts/p5040ds-usdpaa.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet32_smp_defconfig" -- cgit v1.2.3-54-g00ecf From 011f7405554aba444e7610695a3f809ed9685cbc Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Wed, 8 Aug 2012 10:56:37 -0500 Subject: update preferred version for linux kernel Signed-off-by: Matthew McClintock --- meta-fsl-ppc/conf/machine/e500mc.inc | 2 +- meta-fsl-ppc/conf/machine/e500v2.inc | 2 +- meta-fsl-ppc/conf/machine/e5500-64b.inc | 2 +- meta-fsl-ppc/conf/machine/e5500.inc | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/meta-fsl-ppc/conf/machine/e500mc.inc b/meta-fsl-ppc/conf/machine/e500mc.inc index 479c513b..5cd74c78 100644 --- a/meta-fsl-ppc/conf/machine/e500mc.inc +++ b/meta-fsl-ppc/conf/machine/e500mc.inc @@ -6,7 +6,7 @@ MACHINE_FEATURES = "kernel26 keyboard pci ext2 ext3 serial" MACHINE_FEATURES_RRECOMMENDS = "" PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" -PREFERRED_VERSION_virtual/kernel ?= "3.0.6" +PREFERRED_VERSION_virtual/kernel ?= "3.0.34" PREFERRED_PROVIDER_linux-libc-headers ?= "linux-qoriq-sdk-headers" KERNEL_IMAGETYPE ?= "uImage" diff --git a/meta-fsl-ppc/conf/machine/e500v2.inc b/meta-fsl-ppc/conf/machine/e500v2.inc index 62698a9e..076158b2 100644 --- a/meta-fsl-ppc/conf/machine/e500v2.inc +++ b/meta-fsl-ppc/conf/machine/e500v2.inc @@ -4,7 +4,7 @@ MACHINE_FEATURES = "kernel26 pci ext2 ext3 serial" MACHINE_EXTRA_RRECOMMENDS = "" PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" -PREFERRED_VERSION_virtual/kernel ?= "3.0.6" +PREFERRED_VERSION_virtual/kernel ?= "3.0.34" PREFERRED_PROVIDER_linux-libc-headers ?= "linux-qoriq-sdk-headers" KERNEL_IMAGETYPE ?= "uImage" diff --git a/meta-fsl-ppc/conf/machine/e5500-64b.inc b/meta-fsl-ppc/conf/machine/e5500-64b.inc index 1e5d92b6..4e811593 100644 --- a/meta-fsl-ppc/conf/machine/e5500-64b.inc +++ b/meta-fsl-ppc/conf/machine/e5500-64b.inc @@ -7,7 +7,7 @@ MACHINE_FEATURES = "kernel26 keyboard pci ext2 ext3 serial" MACHINE_FEATURES_RRECOMMENDS = "" PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" -PREFERRED_VERSION_virtual/kernel ?= "3.0.6" +PREFERRED_VERSION_virtual/kernel ?= "3.0.34" PREFERRED_PROVIDER_linux-libc-headers ?= "linux-qoriq-sdk-headers" KERNEL_IMAGETYPE ?= "uImage" diff --git a/meta-fsl-ppc/conf/machine/e5500.inc b/meta-fsl-ppc/conf/machine/e5500.inc index f34c2c0c..46304c9f 100644 --- a/meta-fsl-ppc/conf/machine/e5500.inc +++ b/meta-fsl-ppc/conf/machine/e5500.inc @@ -6,7 +6,7 @@ MACHINE_FEATURES = "kernel26 keyboard pci ext2 ext3 serial" MACHINE_FEATURES_RRECOMMENDS = "" PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" -PREFERRED_VERSION_virtual/kernel ?= "3.0.6" +PREFERRED_VERSION_virtual/kernel ?= "3.0.34" PREFERRED_PROVIDER_linux-libc-headers ?= "linux-qoriq-sdk-headers" KERNEL_IMAGETYPE ?= "uImage" -- cgit v1.2.3-54-g00ecf From 69c31e487eb0b5ec2f7acc34284b3981abc6ce91 Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Mon, 16 Jul 2012 14:09:08 +0000 Subject: fsl-image-lsb-sdk.bb: replace POKY_BASE_INSTALL with CORE_IMAGE_BASE_INSTALL POKY_BASE_INSTALL is replaced by CORE_IMAGE_BASE_INSTALL Signed-off-by: Zhenhua Luo --- meta-fsl-ppc/images/fsl-image-lsb-sdk.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-fsl-ppc/images/fsl-image-lsb-sdk.bb b/meta-fsl-ppc/images/fsl-image-lsb-sdk.bb index 22332d2a..86bcb5aa 100644 --- a/meta-fsl-ppc/images/fsl-image-lsb-sdk.bb +++ b/meta-fsl-ppc/images/fsl-image-lsb-sdk.bb @@ -2,7 +2,7 @@ IMAGE_FEATURES += "apps-console-core tools-sdk dev-pkgs ssh-server-openssh" EXTRA_IMAGE_FEATURES = "tools-debug tools-profile tools-testapps debug-tweaks" IMAGE_INSTALL = "\ - ${POKY_BASE_INSTALL} \ + ${CORE_IMAGE_BASE_INSTALL} \ task-core-basic \ task-core-lsb \ git \ -- cgit v1.2.3-54-g00ecf From 32284693abeb582753af3ff3c01449f61f9a8d0a Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Tue, 24 Jul 2012 04:06:47 +0000 Subject: add NOR u-boot into the default build list of p1010rdb Signed-off-by: Zhenhua Luo --- meta-fsl-ppc/conf/machine/p1010rdb.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-fsl-ppc/conf/machine/p1010rdb.conf b/meta-fsl-ppc/conf/machine/p1010rdb.conf index a56f7b7c..908219f0 100644 --- a/meta-fsl-ppc/conf/machine/p1010rdb.conf +++ b/meta-fsl-ppc/conf/machine/p1010rdb.conf @@ -4,7 +4,7 @@ require e500v2.inc -UBOOT_MACHINES ?= "P1010RDB_NAND" +UBOOT_MACHINES ?= "P1010RDB_NAND P1010RDB_NOR" KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p1010rdb.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_defconfig" -- cgit v1.2.3-54-g00ecf From bd81c7bbea3940a2c811a7f3381785037359289b Mon Sep 17 00:00:00 2001 From: Vladimir Zapolskiy Date: Sat, 11 Aug 2012 01:48:37 +0300 Subject: u-boot: correct path to config files The trivial change fixes u-boot compilation task, boot_format utility installs board configuration files into a subdirectory of STAGING_DATADIR_NATIVE. Signed-off-by: Vladimir Zapolskiy Cc: Matthew McClintock --- meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb b/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb index 8ced1228..4dfb7233 100644 --- a/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb +++ b/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb @@ -59,7 +59,7 @@ do_compile () { cp ${S}/${board}/u-boot.bin ${S}/${board}/${UBOOT_TARGET}.bin else ${STAGING_BINDIR_NATIVE}/boot_format \ - ${STAGING_DATADIR_NATIVE}/${BOOTFORMAT_CONFIG} \ + ${STAGING_DATADIR_NATIVE}/boot_format/${BOOTFORMAT_CONFIG} \ ${S}/${board}/u-boot.bin -spi ${S}/${board}/${UBOOT_TARGET}.bin fi fi -- cgit v1.2.3-54-g00ecf From a266c832ec27cff645d682ece599a8cd7d1f2095 Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Mon, 13 Aug 2012 17:23:08 -0500 Subject: boot-format_git.bb: update to latest version Signed-off-by: Matthew McClintock --- meta-fsl-ppc/recipes-tools/boot-format/boot-format_git.bb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meta-fsl-ppc/recipes-tools/boot-format/boot-format_git.bb b/meta-fsl-ppc/recipes-tools/boot-format/boot-format_git.bb index a8b1bb53..63ae0ad2 100644 --- a/meta-fsl-ppc/recipes-tools/boot-format/boot-format_git.bb +++ b/meta-fsl-ppc/recipes-tools/boot-format/boot-format_git.bb @@ -1,11 +1,11 @@ DESCRIPTION = "Boot format utility for booting from eSDHC/eSPI" LICENSE = "GPL" -PR = "r2" +PR = "r3" LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" SRC_URI = "git://git.freescale.com/ppc/sdk/boot-format.git\ " -SRCREV = "aca17b98516ef1869e7f2d98e865bce9226e8bba" +SRCREV = "53cf657a7d034b8d71d53d5c241d0870836d8a72" S = "${WORKDIR}/git" EXTRA_OEMAKE = 'CC="${CC}"' -- cgit v1.2.3-54-g00ecf From d22a53ebedc57e2ac29adf6820d75d431770c3c8 Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Wed, 11 Jul 2012 17:26:51 -0500 Subject: move serial console definitions into machine.conf so they are available for all distros (e.g. poky and fsl) Signed-off-by: Matthew McClintock --- meta-fsl-ppc/conf/distro/fsl.conf | 3 --- meta-fsl-ppc/conf/machine/mpc8536ds.conf | 1 + meta-fsl-ppc/conf/machine/mpc8544ds.conf | 1 + meta-fsl-ppc/conf/machine/mpc8548cds.conf | 1 + meta-fsl-ppc/conf/machine/mpc8572ds.conf | 1 + meta-fsl-ppc/conf/machine/p1010rdb.conf | 1 + meta-fsl-ppc/conf/machine/p1020mbg.conf | 1 + meta-fsl-ppc/conf/machine/p1020rdb.conf | 1 + meta-fsl-ppc/conf/machine/p1020utm.conf | 1 + meta-fsl-ppc/conf/machine/p1021rdb.conf | 1 + meta-fsl-ppc/conf/machine/p1022ds.conf | 1 + meta-fsl-ppc/conf/machine/p1023rds.conf | 1 + meta-fsl-ppc/conf/machine/p1024rdb.conf | 1 + meta-fsl-ppc/conf/machine/p1025rdb.conf | 1 + meta-fsl-ppc/conf/machine/p2020ds.conf | 1 + meta-fsl-ppc/conf/machine/p2020rdb.conf | 1 + meta-fsl-ppc/conf/machine/p2041rdb.conf | 1 + meta-fsl-ppc/conf/machine/p3041ds.conf | 1 + meta-fsl-ppc/conf/machine/p4080ds.conf | 1 + meta-fsl-ppc/conf/machine/p5020ds-64b.conf | 1 + meta-fsl-ppc/conf/machine/p5020ds.conf | 1 + meta-fsl-ppc/conf/machine/p5040ds-64b.conf | 1 + meta-fsl-ppc/conf/machine/p5040ds.conf | 1 + 23 files changed, 22 insertions(+), 3 deletions(-) diff --git a/meta-fsl-ppc/conf/distro/fsl.conf b/meta-fsl-ppc/conf/distro/fsl.conf index ed04a062..87953762 100644 --- a/meta-fsl-ppc/conf/distro/fsl.conf +++ b/meta-fsl-ppc/conf/distro/fsl.conf @@ -90,7 +90,4 @@ PREFERRED_PROVIDER_linux-libc-headers-nativesdk ?= "linux-qoriq-sdk-headers-nati SYSVINIT_ENABLED_GETTYS = "" USE_VT = "" -SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" -SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" - CCACHE = "" diff --git a/meta-fsl-ppc/conf/machine/mpc8536ds.conf b/meta-fsl-ppc/conf/machine/mpc8536ds.conf index aef057ad..d573bc53 100644 --- a/meta-fsl-ppc/conf/machine/mpc8536ds.conf +++ b/meta-fsl-ppc/conf/machine/mpc8536ds.conf @@ -14,3 +14,4 @@ JFFS2_ERASEBLOCK = "0x20000" SYSVINIT_ENABLED_GETTYS = "" USE_VT = "" SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" +SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" diff --git a/meta-fsl-ppc/conf/machine/mpc8544ds.conf b/meta-fsl-ppc/conf/machine/mpc8544ds.conf index 3d5d26ea..e7b9afa4 100644 --- a/meta-fsl-ppc/conf/machine/mpc8544ds.conf +++ b/meta-fsl-ppc/conf/machine/mpc8544ds.conf @@ -13,3 +13,4 @@ JFFS2_ERASEBLOCK = "0x20000" SYSVINIT_ENABLED_GETTYS = "" USE_VT = "" SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" +SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" diff --git a/meta-fsl-ppc/conf/machine/mpc8548cds.conf b/meta-fsl-ppc/conf/machine/mpc8548cds.conf index 007c3bc9..96b0f940 100644 --- a/meta-fsl-ppc/conf/machine/mpc8548cds.conf +++ b/meta-fsl-ppc/conf/machine/mpc8548cds.conf @@ -13,3 +13,4 @@ JFFS2_ERASEBLOCK = "0x20000" SYSVINIT_ENABLED_GETTYS = "" USE_VT = "" SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" +SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" diff --git a/meta-fsl-ppc/conf/machine/mpc8572ds.conf b/meta-fsl-ppc/conf/machine/mpc8572ds.conf index cefcdcc0..3bdbea1b 100644 --- a/meta-fsl-ppc/conf/machine/mpc8572ds.conf +++ b/meta-fsl-ppc/conf/machine/mpc8572ds.conf @@ -12,3 +12,4 @@ JFFS2_ERASEBLOCK = "0x20000" SYSVINIT_ENABLED_GETTYS = "" USE_VT = "" SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" +SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" diff --git a/meta-fsl-ppc/conf/machine/p1010rdb.conf b/meta-fsl-ppc/conf/machine/p1010rdb.conf index 908219f0..f7c8885e 100644 --- a/meta-fsl-ppc/conf/machine/p1010rdb.conf +++ b/meta-fsl-ppc/conf/machine/p1010rdb.conf @@ -13,3 +13,4 @@ JFFS2_ERASEBLOCK = "0x20000" SYSVINIT_ENABLED_GETTYS = "" USE_VT = "" SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" +SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" diff --git a/meta-fsl-ppc/conf/machine/p1020mbg.conf b/meta-fsl-ppc/conf/machine/p1020mbg.conf index d7c41197..da3dde20 100644 --- a/meta-fsl-ppc/conf/machine/p1020mbg.conf +++ b/meta-fsl-ppc/conf/machine/p1020mbg.conf @@ -14,3 +14,4 @@ JFFS2_ERASEBLOCK = "0x20000" SYSVINIT_ENABLED_GETTYS = "" USE_VT = "" SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" +SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" diff --git a/meta-fsl-ppc/conf/machine/p1020rdb.conf b/meta-fsl-ppc/conf/machine/p1020rdb.conf index 0ebe32c8..83e34285 100644 --- a/meta-fsl-ppc/conf/machine/p1020rdb.conf +++ b/meta-fsl-ppc/conf/machine/p1020rdb.conf @@ -15,3 +15,4 @@ JFFS2_ERASEBLOCK = "0x20000" SYSVINIT_ENABLED_GETTYS = "" USE_VT = "" SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" +SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" diff --git a/meta-fsl-ppc/conf/machine/p1020utm.conf b/meta-fsl-ppc/conf/machine/p1020utm.conf index fc71ddd5..8b1478d1 100644 --- a/meta-fsl-ppc/conf/machine/p1020utm.conf +++ b/meta-fsl-ppc/conf/machine/p1020utm.conf @@ -14,3 +14,4 @@ JFFS2_ERASEBLOCK = "0x20000" SYSVINIT_ENABLED_GETTYS = "" USE_VT = "" SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" +SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" diff --git a/meta-fsl-ppc/conf/machine/p1021rdb.conf b/meta-fsl-ppc/conf/machine/p1021rdb.conf index cecbf580..e92f95e1 100644 --- a/meta-fsl-ppc/conf/machine/p1021rdb.conf +++ b/meta-fsl-ppc/conf/machine/p1021rdb.conf @@ -13,3 +13,4 @@ JFFS2_ERASEBLOCK = "0x20000" SYSVINIT_ENABLED_GETTYS = "" USE_VT = "" SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" +SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" diff --git a/meta-fsl-ppc/conf/machine/p1022ds.conf b/meta-fsl-ppc/conf/machine/p1022ds.conf index fa93d316..3485e1cd 100644 --- a/meta-fsl-ppc/conf/machine/p1022ds.conf +++ b/meta-fsl-ppc/conf/machine/p1022ds.conf @@ -23,3 +23,4 @@ JFFS2_ERASEBLOCK = "0x20000" SYSVINIT_ENABLED_GETTYS = "" USE_VT = "" SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" +SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" diff --git a/meta-fsl-ppc/conf/machine/p1023rds.conf b/meta-fsl-ppc/conf/machine/p1023rds.conf index 5f97c465..ed5d5ba4 100644 --- a/meta-fsl-ppc/conf/machine/p1023rds.conf +++ b/meta-fsl-ppc/conf/machine/p1023rds.conf @@ -12,3 +12,4 @@ JFFS2_ERASEBLOCK = "0x10000" SYSVINIT_ENABLED_GETTYS = "" USE_VT = "" SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" +SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" diff --git a/meta-fsl-ppc/conf/machine/p1024rdb.conf b/meta-fsl-ppc/conf/machine/p1024rdb.conf index 37b27177..44a20b31 100644 --- a/meta-fsl-ppc/conf/machine/p1024rdb.conf +++ b/meta-fsl-ppc/conf/machine/p1024rdb.conf @@ -14,3 +14,4 @@ JFFS2_ERASEBLOCK = "0x20000" SYSVINIT_ENABLED_GETTYS = "" USE_VT = "" SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" +SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" diff --git a/meta-fsl-ppc/conf/machine/p1025rdb.conf b/meta-fsl-ppc/conf/machine/p1025rdb.conf index bc1b4246..8e6b8683 100644 --- a/meta-fsl-ppc/conf/machine/p1025rdb.conf +++ b/meta-fsl-ppc/conf/machine/p1025rdb.conf @@ -15,3 +15,4 @@ JFFS2_ERASEBLOCK = "0x20000" SYSVINIT_ENABLED_GETTYS = "" USE_VT = "" SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" +SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" diff --git a/meta-fsl-ppc/conf/machine/p2020ds.conf b/meta-fsl-ppc/conf/machine/p2020ds.conf index 80c54cef..cfc5e455 100644 --- a/meta-fsl-ppc/conf/machine/p2020ds.conf +++ b/meta-fsl-ppc/conf/machine/p2020ds.conf @@ -13,3 +13,4 @@ JFFS2_ERASEBLOCK = "0x20000" SYSVINIT_ENABLED_GETTYS = "" USE_VT = "" SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" +SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" diff --git a/meta-fsl-ppc/conf/machine/p2020rdb.conf b/meta-fsl-ppc/conf/machine/p2020rdb.conf index 09e56804..da1c8155 100644 --- a/meta-fsl-ppc/conf/machine/p2020rdb.conf +++ b/meta-fsl-ppc/conf/machine/p2020rdb.conf @@ -14,3 +14,4 @@ JFFS2_ERASEBLOCK = "0x20000" SYSVINIT_ENABLED_GETTYS = "" USE_VT = "" SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" +SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" diff --git a/meta-fsl-ppc/conf/machine/p2041rdb.conf b/meta-fsl-ppc/conf/machine/p2041rdb.conf index b4f12648..5adb4f6b 100644 --- a/meta-fsl-ppc/conf/machine/p2041rdb.conf +++ b/meta-fsl-ppc/conf/machine/p2041rdb.conf @@ -13,3 +13,4 @@ JFFS2_ERASEBLOCK = "0x10000" SYSVINIT_ENABLED_GETTYS = "" USE_VT = "" SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" +SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" diff --git a/meta-fsl-ppc/conf/machine/p3041ds.conf b/meta-fsl-ppc/conf/machine/p3041ds.conf index 2f2c605b..efc372b3 100644 --- a/meta-fsl-ppc/conf/machine/p3041ds.conf +++ b/meta-fsl-ppc/conf/machine/p3041ds.conf @@ -13,3 +13,4 @@ JFFS2_ERASEBLOCK = "0x10000" SYSVINIT_ENABLED_GETTYS = "" USE_VT = "" SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" +SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" diff --git a/meta-fsl-ppc/conf/machine/p4080ds.conf b/meta-fsl-ppc/conf/machine/p4080ds.conf index 0d29de27..55b30af2 100644 --- a/meta-fsl-ppc/conf/machine/p4080ds.conf +++ b/meta-fsl-ppc/conf/machine/p4080ds.conf @@ -13,3 +13,4 @@ JFFS2_ERASEBLOCK = "0x10000" SYSVINIT_ENABLED_GETTYS = "" USE_VT = "" SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" +SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" diff --git a/meta-fsl-ppc/conf/machine/p5020ds-64b.conf b/meta-fsl-ppc/conf/machine/p5020ds-64b.conf index 9ab47110..60210b37 100644 --- a/meta-fsl-ppc/conf/machine/p5020ds-64b.conf +++ b/meta-fsl-ppc/conf/machine/p5020ds-64b.conf @@ -14,3 +14,4 @@ JFFS2_ERASEBLOCK = "0x10000" SYSVINIT_ENABLED_GETTYS = "" USE_VT = "" SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" +SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" diff --git a/meta-fsl-ppc/conf/machine/p5020ds.conf b/meta-fsl-ppc/conf/machine/p5020ds.conf index 45d1ea71..4f443dc6 100644 --- a/meta-fsl-ppc/conf/machine/p5020ds.conf +++ b/meta-fsl-ppc/conf/machine/p5020ds.conf @@ -13,3 +13,4 @@ JFFS2_ERASEBLOCK = "0x10000" SYSVINIT_ENABLED_GETTYS = "" USE_VT = "" SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" +SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" diff --git a/meta-fsl-ppc/conf/machine/p5040ds-64b.conf b/meta-fsl-ppc/conf/machine/p5040ds-64b.conf index 091f81f7..44c3b7d2 100644 --- a/meta-fsl-ppc/conf/machine/p5040ds-64b.conf +++ b/meta-fsl-ppc/conf/machine/p5040ds-64b.conf @@ -13,3 +13,4 @@ JFFS2_ERASEBLOCK = "0x10000" SYSVINIT_ENABLED_GETTYS = "" USE_VT = "" SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" +SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" diff --git a/meta-fsl-ppc/conf/machine/p5040ds.conf b/meta-fsl-ppc/conf/machine/p5040ds.conf index f06b47a6..df13fcc8 100644 --- a/meta-fsl-ppc/conf/machine/p5040ds.conf +++ b/meta-fsl-ppc/conf/machine/p5040ds.conf @@ -13,3 +13,4 @@ JFFS2_ERASEBLOCK = "0x10000" SYSVINIT_ENABLED_GETTYS = "" USE_VT = "" SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" +SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" -- cgit v1.2.3-54-g00ecf From dc70a62d3989c89842e16fcab185ade1a1918f0d Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Wed, 11 Jul 2012 17:37:56 -0500 Subject: disable extra inittab changes Signed-off-by: Matthew McClintock --- meta-fsl-ppc/conf/distro/fsl.conf | 2 -- meta-fsl-ppc/conf/machine/mpc8536ds.conf | 1 + meta-fsl-ppc/conf/machine/mpc8544ds.conf | 1 + meta-fsl-ppc/conf/machine/mpc8548cds.conf | 1 + meta-fsl-ppc/conf/machine/mpc8572ds.conf | 1 + meta-fsl-ppc/conf/machine/p1010rdb.conf | 1 + meta-fsl-ppc/conf/machine/p1020mbg.conf | 1 + meta-fsl-ppc/conf/machine/p1020rdb.conf | 1 + meta-fsl-ppc/conf/machine/p1020utm.conf | 1 + meta-fsl-ppc/conf/machine/p1021rdb.conf | 1 + meta-fsl-ppc/conf/machine/p1022ds.conf | 1 + meta-fsl-ppc/conf/machine/p1023rds.conf | 1 + meta-fsl-ppc/conf/machine/p1024rdb.conf | 1 + meta-fsl-ppc/conf/machine/p1025rdb.conf | 1 + meta-fsl-ppc/conf/machine/p2020ds.conf | 1 + meta-fsl-ppc/conf/machine/p2020rdb.conf | 1 + meta-fsl-ppc/conf/machine/p2041rdb.conf | 1 + meta-fsl-ppc/conf/machine/p3041ds.conf | 1 + meta-fsl-ppc/conf/machine/p4080ds.conf | 1 + meta-fsl-ppc/conf/machine/p5020ds-64b.conf | 1 + meta-fsl-ppc/conf/machine/p5020ds.conf | 1 + meta-fsl-ppc/conf/machine/p5040ds-64b.conf | 1 + meta-fsl-ppc/conf/machine/p5040ds.conf | 1 + 23 files changed, 22 insertions(+), 2 deletions(-) diff --git a/meta-fsl-ppc/conf/distro/fsl.conf b/meta-fsl-ppc/conf/distro/fsl.conf index 87953762..2818b265 100644 --- a/meta-fsl-ppc/conf/distro/fsl.conf +++ b/meta-fsl-ppc/conf/distro/fsl.conf @@ -88,6 +88,4 @@ PREFERRED_VERSION_u-boot-mkimage-native_powerpc = "2011.06" PREFERRED_PROVIDER_virtual/libx11 = "libx11" PREFERRED_PROVIDER_linux-libc-headers-nativesdk ?= "linux-qoriq-sdk-headers-nativesdk" -SYSVINIT_ENABLED_GETTYS = "" -USE_VT = "" CCACHE = "" diff --git a/meta-fsl-ppc/conf/machine/mpc8536ds.conf b/meta-fsl-ppc/conf/machine/mpc8536ds.conf index d573bc53..eac14ac7 100644 --- a/meta-fsl-ppc/conf/machine/mpc8536ds.conf +++ b/meta-fsl-ppc/conf/machine/mpc8536ds.conf @@ -15,3 +15,4 @@ SYSVINIT_ENABLED_GETTYS = "" USE_VT = "" SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" +USE_VT = "0" diff --git a/meta-fsl-ppc/conf/machine/mpc8544ds.conf b/meta-fsl-ppc/conf/machine/mpc8544ds.conf index e7b9afa4..89e1d898 100644 --- a/meta-fsl-ppc/conf/machine/mpc8544ds.conf +++ b/meta-fsl-ppc/conf/machine/mpc8544ds.conf @@ -14,3 +14,4 @@ SYSVINIT_ENABLED_GETTYS = "" USE_VT = "" SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" +USE_VT = "0" diff --git a/meta-fsl-ppc/conf/machine/mpc8548cds.conf b/meta-fsl-ppc/conf/machine/mpc8548cds.conf index 96b0f940..71f46690 100644 --- a/meta-fsl-ppc/conf/machine/mpc8548cds.conf +++ b/meta-fsl-ppc/conf/machine/mpc8548cds.conf @@ -14,3 +14,4 @@ SYSVINIT_ENABLED_GETTYS = "" USE_VT = "" SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" +USE_VT = "0" diff --git a/meta-fsl-ppc/conf/machine/mpc8572ds.conf b/meta-fsl-ppc/conf/machine/mpc8572ds.conf index 3bdbea1b..51d3c523 100644 --- a/meta-fsl-ppc/conf/machine/mpc8572ds.conf +++ b/meta-fsl-ppc/conf/machine/mpc8572ds.conf @@ -13,3 +13,4 @@ SYSVINIT_ENABLED_GETTYS = "" USE_VT = "" SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" +USE_VT = "0" diff --git a/meta-fsl-ppc/conf/machine/p1010rdb.conf b/meta-fsl-ppc/conf/machine/p1010rdb.conf index f7c8885e..9752cc40 100644 --- a/meta-fsl-ppc/conf/machine/p1010rdb.conf +++ b/meta-fsl-ppc/conf/machine/p1010rdb.conf @@ -14,3 +14,4 @@ SYSVINIT_ENABLED_GETTYS = "" USE_VT = "" SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" +USE_VT = "0" diff --git a/meta-fsl-ppc/conf/machine/p1020mbg.conf b/meta-fsl-ppc/conf/machine/p1020mbg.conf index da3dde20..1459698a 100644 --- a/meta-fsl-ppc/conf/machine/p1020mbg.conf +++ b/meta-fsl-ppc/conf/machine/p1020mbg.conf @@ -15,3 +15,4 @@ SYSVINIT_ENABLED_GETTYS = "" USE_VT = "" SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" +USE_VT = "0" diff --git a/meta-fsl-ppc/conf/machine/p1020rdb.conf b/meta-fsl-ppc/conf/machine/p1020rdb.conf index 83e34285..1a0e6722 100644 --- a/meta-fsl-ppc/conf/machine/p1020rdb.conf +++ b/meta-fsl-ppc/conf/machine/p1020rdb.conf @@ -16,3 +16,4 @@ SYSVINIT_ENABLED_GETTYS = "" USE_VT = "" SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" +USE_VT = "0" diff --git a/meta-fsl-ppc/conf/machine/p1020utm.conf b/meta-fsl-ppc/conf/machine/p1020utm.conf index 8b1478d1..26ff060c 100644 --- a/meta-fsl-ppc/conf/machine/p1020utm.conf +++ b/meta-fsl-ppc/conf/machine/p1020utm.conf @@ -15,3 +15,4 @@ SYSVINIT_ENABLED_GETTYS = "" USE_VT = "" SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" +USE_VT = "0" diff --git a/meta-fsl-ppc/conf/machine/p1021rdb.conf b/meta-fsl-ppc/conf/machine/p1021rdb.conf index e92f95e1..1a42a947 100644 --- a/meta-fsl-ppc/conf/machine/p1021rdb.conf +++ b/meta-fsl-ppc/conf/machine/p1021rdb.conf @@ -14,3 +14,4 @@ SYSVINIT_ENABLED_GETTYS = "" USE_VT = "" SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" +USE_VT = "0" diff --git a/meta-fsl-ppc/conf/machine/p1022ds.conf b/meta-fsl-ppc/conf/machine/p1022ds.conf index 3485e1cd..88770929 100644 --- a/meta-fsl-ppc/conf/machine/p1022ds.conf +++ b/meta-fsl-ppc/conf/machine/p1022ds.conf @@ -24,3 +24,4 @@ SYSVINIT_ENABLED_GETTYS = "" USE_VT = "" SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" +USE_VT = "0" diff --git a/meta-fsl-ppc/conf/machine/p1023rds.conf b/meta-fsl-ppc/conf/machine/p1023rds.conf index ed5d5ba4..e51e5f76 100644 --- a/meta-fsl-ppc/conf/machine/p1023rds.conf +++ b/meta-fsl-ppc/conf/machine/p1023rds.conf @@ -13,3 +13,4 @@ SYSVINIT_ENABLED_GETTYS = "" USE_VT = "" SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" +USE_VT = "0" diff --git a/meta-fsl-ppc/conf/machine/p1024rdb.conf b/meta-fsl-ppc/conf/machine/p1024rdb.conf index 44a20b31..2e47e4d0 100644 --- a/meta-fsl-ppc/conf/machine/p1024rdb.conf +++ b/meta-fsl-ppc/conf/machine/p1024rdb.conf @@ -15,3 +15,4 @@ SYSVINIT_ENABLED_GETTYS = "" USE_VT = "" SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" +USE_VT = "0" diff --git a/meta-fsl-ppc/conf/machine/p1025rdb.conf b/meta-fsl-ppc/conf/machine/p1025rdb.conf index 8e6b8683..c6258330 100644 --- a/meta-fsl-ppc/conf/machine/p1025rdb.conf +++ b/meta-fsl-ppc/conf/machine/p1025rdb.conf @@ -16,3 +16,4 @@ SYSVINIT_ENABLED_GETTYS = "" USE_VT = "" SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" +USE_VT = "0" diff --git a/meta-fsl-ppc/conf/machine/p2020ds.conf b/meta-fsl-ppc/conf/machine/p2020ds.conf index cfc5e455..dd2c9d10 100644 --- a/meta-fsl-ppc/conf/machine/p2020ds.conf +++ b/meta-fsl-ppc/conf/machine/p2020ds.conf @@ -14,3 +14,4 @@ SYSVINIT_ENABLED_GETTYS = "" USE_VT = "" SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" +USE_VT = "0" diff --git a/meta-fsl-ppc/conf/machine/p2020rdb.conf b/meta-fsl-ppc/conf/machine/p2020rdb.conf index da1c8155..7c0f573a 100644 --- a/meta-fsl-ppc/conf/machine/p2020rdb.conf +++ b/meta-fsl-ppc/conf/machine/p2020rdb.conf @@ -15,3 +15,4 @@ SYSVINIT_ENABLED_GETTYS = "" USE_VT = "" SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" +USE_VT = "0" diff --git a/meta-fsl-ppc/conf/machine/p2041rdb.conf b/meta-fsl-ppc/conf/machine/p2041rdb.conf index 5adb4f6b..5c72e0da 100644 --- a/meta-fsl-ppc/conf/machine/p2041rdb.conf +++ b/meta-fsl-ppc/conf/machine/p2041rdb.conf @@ -14,3 +14,4 @@ SYSVINIT_ENABLED_GETTYS = "" USE_VT = "" SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" +USE_VT = "0" diff --git a/meta-fsl-ppc/conf/machine/p3041ds.conf b/meta-fsl-ppc/conf/machine/p3041ds.conf index efc372b3..e4569aa7 100644 --- a/meta-fsl-ppc/conf/machine/p3041ds.conf +++ b/meta-fsl-ppc/conf/machine/p3041ds.conf @@ -14,3 +14,4 @@ SYSVINIT_ENABLED_GETTYS = "" USE_VT = "" SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" +USE_VT = "0" diff --git a/meta-fsl-ppc/conf/machine/p4080ds.conf b/meta-fsl-ppc/conf/machine/p4080ds.conf index 55b30af2..00a4e845 100644 --- a/meta-fsl-ppc/conf/machine/p4080ds.conf +++ b/meta-fsl-ppc/conf/machine/p4080ds.conf @@ -14,3 +14,4 @@ SYSVINIT_ENABLED_GETTYS = "" USE_VT = "" SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" +USE_VT = "0" diff --git a/meta-fsl-ppc/conf/machine/p5020ds-64b.conf b/meta-fsl-ppc/conf/machine/p5020ds-64b.conf index 60210b37..72730970 100644 --- a/meta-fsl-ppc/conf/machine/p5020ds-64b.conf +++ b/meta-fsl-ppc/conf/machine/p5020ds-64b.conf @@ -15,3 +15,4 @@ SYSVINIT_ENABLED_GETTYS = "" USE_VT = "" SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" +USE_VT = "0" diff --git a/meta-fsl-ppc/conf/machine/p5020ds.conf b/meta-fsl-ppc/conf/machine/p5020ds.conf index 4f443dc6..eb1d73da 100644 --- a/meta-fsl-ppc/conf/machine/p5020ds.conf +++ b/meta-fsl-ppc/conf/machine/p5020ds.conf @@ -14,3 +14,4 @@ SYSVINIT_ENABLED_GETTYS = "" USE_VT = "" SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" +USE_VT = "0" diff --git a/meta-fsl-ppc/conf/machine/p5040ds-64b.conf b/meta-fsl-ppc/conf/machine/p5040ds-64b.conf index 44c3b7d2..c73815b9 100644 --- a/meta-fsl-ppc/conf/machine/p5040ds-64b.conf +++ b/meta-fsl-ppc/conf/machine/p5040ds-64b.conf @@ -14,3 +14,4 @@ SYSVINIT_ENABLED_GETTYS = "" USE_VT = "" SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" +USE_VT = "0" diff --git a/meta-fsl-ppc/conf/machine/p5040ds.conf b/meta-fsl-ppc/conf/machine/p5040ds.conf index df13fcc8..b9f08a53 100644 --- a/meta-fsl-ppc/conf/machine/p5040ds.conf +++ b/meta-fsl-ppc/conf/machine/p5040ds.conf @@ -14,3 +14,4 @@ SYSVINIT_ENABLED_GETTYS = "" USE_VT = "" SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" +USE_VT = "0" -- cgit v1.2.3-54-g00ecf From 5fce614cb169e4a096b9c608fd69e4fe6722ba2d Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Wed, 1 Aug 2012 16:33:44 -0500 Subject: fsl.conf: clean up distro conf for master Signed-off-by: Matthew McClintock --- meta-fsl-ppc/conf/distro/fsl.conf | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/meta-fsl-ppc/conf/distro/fsl.conf b/meta-fsl-ppc/conf/distro/fsl.conf index 2818b265..68268a53 100644 --- a/meta-fsl-ppc/conf/distro/fsl.conf +++ b/meta-fsl-ppc/conf/distro/fsl.conf @@ -12,7 +12,7 @@ TARGET_VENDOR_virtclass-multilib-lib64 = "-fsl" LOCALCONF_VERSION = "1" -DISTRO_FEATURES_append = " largefile opengl" +DISTRO_FEATURES_append = " largefile" SDK_NAME = "${DISTRO}-${TCLIBC}-${SDK_ARCH}-${TUNE_PKGARCH}" SDKPATH = "/opt/${DISTRO}/${SDK_VERSION}" @@ -57,7 +57,8 @@ SANITY_TESTED_DISTROS ?= " \ Yocto (Built by Poky 7.0) 1.2 \n \ Ubuntu 10.04.4 LTS \n \ Ubuntu 11.10 \n \ - Ubuntu 12.04 \n \ + Ubuntu 12.04 LTS \n \ + Fedora release 13 (Goddard) \n \ Fedora release 15 (Lovelock) \n \ Fedora release 16 (Verne) \n \ Fedora release 17 (Beefy Miracle) \n \ -- cgit v1.2.3-54-g00ecf From f2b3f82626be679f768cc9ccb77e7d2160005b77 Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Wed, 8 Aug 2012 16:40:21 -0500 Subject: fsl.conf: add CentOS 5.8 as supported distro Signed-off-by: Matthew McClintock --- meta-fsl-ppc/conf/distro/fsl.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/meta-fsl-ppc/conf/distro/fsl.conf b/meta-fsl-ppc/conf/distro/fsl.conf index 68268a53..0b0e17f7 100644 --- a/meta-fsl-ppc/conf/distro/fsl.conf +++ b/meta-fsl-ppc/conf/distro/fsl.conf @@ -64,6 +64,7 @@ SANITY_TESTED_DISTROS ?= " \ Fedora release 17 (Beefy Miracle) \n \ CentOS release 5.6 (Final) \n \ CentOS release 5.7 (Final) \n \ + CentOS release 5.8 (Final) \n \ CentOS release 6.2 (Final) \n \ Debian GNU/Linux 6.0.4 (squeeze) \n \ openSUSE 11.4 \n \ -- cgit v1.2.3-54-g00ecf From 3c9c694e61db11831dc5963a6de883dc0b9dc7d8 Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Thu, 12 Jul 2012 14:32:07 -0500 Subject: images: change to forcibly set IMAGE_FSTYPES, user can add with _append Signed-off-by: Matthew McClintock --- meta-fsl-ppc/images/fsl-image-lsb-sdk.bb | 2 +- meta-fsl-ppc/images/fsl-image-minimal.bb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/meta-fsl-ppc/images/fsl-image-lsb-sdk.bb b/meta-fsl-ppc/images/fsl-image-lsb-sdk.bb index 86bcb5aa..cdd36a29 100644 --- a/meta-fsl-ppc/images/fsl-image-lsb-sdk.bb +++ b/meta-fsl-ppc/images/fsl-image-lsb-sdk.bb @@ -15,4 +15,4 @@ IMAGE_INSTALL = "\ inherit core-image -IMAGE_FSTYPES ?= "tar.gz" +IMAGE_FSTYPES = "tar.gz" diff --git a/meta-fsl-ppc/images/fsl-image-minimal.bb b/meta-fsl-ppc/images/fsl-image-minimal.bb index a290d8be..b8d3c774 100644 --- a/meta-fsl-ppc/images/fsl-image-minimal.bb +++ b/meta-fsl-ppc/images/fsl-image-minimal.bb @@ -13,4 +13,4 @@ IMAGE_ROOTFS_SIZE = "8192" # remove not needed ipkg informations ROOTFS_POSTPROCESS_COMMAND += "remove_packaging_data_files ; " -IMAGE_FSTYPES ?= "tar.gz ext2.gz.u-boot" +IMAGE_FSTYPES = "tar.gz ext2.gz.u-boot" -- cgit v1.2.3-54-g00ecf From bf3e85bceb42011927332972f5a9db390879bed2 Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Tue, 14 Aug 2012 13:58:09 -0500 Subject: update to latest released versions Signed-off-by: Matthew McClintock Conflicts: recipes-kernel/linux/linux-qoriq-sdk.inc --- meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc | 4 ++-- meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb | 4 ++-- meta-fsl-ppc/recipes-tools/boot-format/boot-format_git.bb | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc index 66861fb1..788eeb7d 100644 --- a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc +++ b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc @@ -1,9 +1,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7" PV = "3.0.34" -PR = "r3" +PR = "r4" -SRCREV = "1a395700fb4084c9179a8b20dca76a74e71dd833" +SRCREV = "fsl-sdk-v1.2.1" SRC_URI = "git://git.freescale.com/ppc/sdk/linux.git \ " diff --git a/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb b/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb index 4dfb7233..75f0a30f 100644 --- a/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb +++ b/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb @@ -5,13 +5,13 @@ PROVIDES = "virtual/bootloader" LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=1707d6db1d42237583f50183a5651ecb" -PR = "r18" +PR = "r19" INHIBIT_DEFAULT_DEPS = "1" DEPENDS = "boot-format-native virtual/${TARGET_PREFIX}gcc" inherit deploy -SRCREV = "bfb0c9a0ac732221ca78b5af37172b4f80ff9a6d" +SRCREV = "fsl-sdk-v1.2.1" SRC_URI = "git://git.freescale.com/ppc/sdk/u-boot.git \ " DEPENDS_append_e5500-64b = " lib32-gcc-cross" diff --git a/meta-fsl-ppc/recipes-tools/boot-format/boot-format_git.bb b/meta-fsl-ppc/recipes-tools/boot-format/boot-format_git.bb index 63ae0ad2..89d6784d 100644 --- a/meta-fsl-ppc/recipes-tools/boot-format/boot-format_git.bb +++ b/meta-fsl-ppc/recipes-tools/boot-format/boot-format_git.bb @@ -1,11 +1,11 @@ DESCRIPTION = "Boot format utility for booting from eSDHC/eSPI" LICENSE = "GPL" -PR = "r3" +PR = "r4" LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" SRC_URI = "git://git.freescale.com/ppc/sdk/boot-format.git\ " -SRCREV = "53cf657a7d034b8d71d53d5c241d0870836d8a72" +SRCREV = "fsl-sdk-v1.2.1" S = "${WORKDIR}/git" EXTRA_OEMAKE = 'CC="${CC}"' -- cgit v1.2.3-54-g00ecf From 44210ac98421e46a018c69ffba9f4e691c3c70f6 Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Tue, 14 Aug 2012 15:17:15 -0500 Subject: u-boot_git.bb: add default multilib compiler info Signed-off-by: Matthew McClintock --- meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb b/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb index 75f0a30f..49ed0871 100644 --- a/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb +++ b/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb @@ -5,7 +5,7 @@ PROVIDES = "virtual/bootloader" LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=1707d6db1d42237583f50183a5651ecb" -PR = "r19" +PR = "r20" INHIBIT_DEFAULT_DEPS = "1" DEPENDS = "boot-format-native virtual/${TARGET_PREFIX}gcc" @@ -17,6 +17,7 @@ SRC_URI = "git://git.freescale.com/ppc/sdk/u-boot.git \ DEPENDS_append_e5500-64b = " lib32-gcc-cross" PATH_append_e5500-64b = ":${STAGING_BINDIR_NATIVE}/${DEFAULTTUNE_virtclass-multilib-lib32}${TARGET_VENDOR_virtclass-multilib-lib32}-${HOST_OS}/" TOOLCHAIN_OPTIONS_append_e5500-64b = "/../lib32-${MACHINE}" +TARGET_VENDOR_virtclass-multilib-lib32 = "-${DISTRO}mllib32" WRAP_TARGET_PREFIX_e5500-64b = "powerpc${TARGET_VENDOR_virtclass-multilib-lib32}-${HOST_OS}-" WRAP_TARGET_PREFIX = "${TARGET_PREFIX}" -- cgit v1.2.3-54-g00ecf From a83f49cba18dd762d1b45647be153411b46c935f Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Tue, 28 Aug 2012 00:42:32 -0500 Subject: linux-qoriq-sdk.inc: add patch so perf builds Originally from Khem Raj Signed-off-by: Matthew McClintock --- ...Undef-before-redefining-__attribute_const.patch | 28 ++++++++++++++++++++++ .../recipes-kernel/linux/linux-qoriq-sdk.inc | 3 ++- 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 meta-fsl-ppc/recipes-kernel/linux/0001-compiler.h-Undef-before-redefining-__attribute_const.patch diff --git a/meta-fsl-ppc/recipes-kernel/linux/0001-compiler.h-Undef-before-redefining-__attribute_const.patch b/meta-fsl-ppc/recipes-kernel/linux/0001-compiler.h-Undef-before-redefining-__attribute_const.patch new file mode 100644 index 00000000..597fd3b4 --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/linux/0001-compiler.h-Undef-before-redefining-__attribute_const.patch @@ -0,0 +1,28 @@ +From 6f92ab6de9d8daeb575949bbbcbc7bcdcebc60af Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Thu, 5 Jan 2012 11:42:35 -0800 +Subject: [PATCH] compiler.h: Undef before redefining __attribute_const__ + +This is required to avoid warnings like +util/include/linux/compiler.h:8:0: error: "__attribute_const__" redefined [-Werror] + +Signed-off-by: Khem Raj +--- + tools/perf/util/include/linux/compiler.h | 4 +++- + 1 files changed, 3 insertions(+), 1 deletions(-) + +--- a/tools/perf/util/include/linux/compiler.h ++++ b/tools/perf/util/include/linux/compiler.h +@@ -4,9 +4,11 @@ + #ifndef __always_inline + #define __always_inline inline + #endif ++#undef __user + #define __user ++#undef __attribute_const__ + #define __attribute_const__ +- ++#undef __used + #define __used __attribute__((__unused__)) + + #endif diff --git a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc index 788eeb7d..708ae579 100644 --- a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc +++ b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc @@ -1,10 +1,11 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7" PV = "3.0.34" -PR = "r4" +PR = "r5" SRCREV = "fsl-sdk-v1.2.1" SRC_URI = "git://git.freescale.com/ppc/sdk/linux.git \ + file://0001-compiler.h-Undef-before-redefining-__attribute_const.patch \ " KSRC ?= "" -- cgit v1.2.3-54-g00ecf From 88dbfd7a26c4decd4c5038cd90d81cbabb1217ac Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Tue, 4 Sep 2012 10:03:25 -0700 Subject: fsl-image-lsb-sdk: Remove deprecated IMAGE_FEATURE apps-console-core Signed-off-by: Khem Raj --- meta-fsl-ppc/images/fsl-image-lsb-sdk.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-fsl-ppc/images/fsl-image-lsb-sdk.bb b/meta-fsl-ppc/images/fsl-image-lsb-sdk.bb index cdd36a29..fe93b538 100644 --- a/meta-fsl-ppc/images/fsl-image-lsb-sdk.bb +++ b/meta-fsl-ppc/images/fsl-image-lsb-sdk.bb @@ -1,4 +1,4 @@ -IMAGE_FEATURES += "apps-console-core tools-sdk dev-pkgs ssh-server-openssh" +IMAGE_FEATURES += "tools-sdk dev-pkgs ssh-server-openssh" EXTRA_IMAGE_FEATURES = "tools-debug tools-profile tools-testapps debug-tweaks" IMAGE_INSTALL = "\ -- cgit v1.2.3-54-g00ecf From 545d06b7aeccc8029b84ec27a2446b4dfb7d3ba6 Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Tue, 4 Sep 2012 15:35:33 -0500 Subject: update bbappends to only apply on our distro, as a precursor to moving to it's own layer Signed-off-by: Matthew McClintock --- meta-fsl-ppc/recipes-append/gettext/gettext_0.18.1.1.bbappend | 6 +++--- meta-fsl-ppc/recipes-append/libxml/libxml2_2.8.0.bbappend | 4 ++-- meta-fsl-ppc/recipes-append/netbase/netbase_5.0.bbappend | 8 ++++---- meta-fsl-ppc/recipes-append/procps/procps_3.2.8.bbappend | 4 ++-- meta-fsl-ppc/recipes-append/udev/udev_164.bbappend | 4 ++-- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/meta-fsl-ppc/recipes-append/gettext/gettext_0.18.1.1.bbappend b/meta-fsl-ppc/recipes-append/gettext/gettext_0.18.1.1.bbappend index 937be226..1a6d9f41 100644 --- a/meta-fsl-ppc/recipes-append/gettext/gettext_0.18.1.1.bbappend +++ b/meta-fsl-ppc/recipes-append/gettext/gettext_0.18.1.1.bbappend @@ -1,5 +1,5 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/files:" +FILESEXTRAPATHS_prepend_fsl := "${THISDIR}/files:" -SRC_URI += "file://gettext.fix_testcase.patch" +SRC_URI_fsl += "file://gettext.fix_testcase.patch" -PR .= "+${DISTRO}.0" +PR_fsl .= "+${DISTRO}.0" diff --git a/meta-fsl-ppc/recipes-append/libxml/libxml2_2.8.0.bbappend b/meta-fsl-ppc/recipes-append/libxml/libxml2_2.8.0.bbappend index 9b3f7f64..13c1fd70 100644 --- a/meta-fsl-ppc/recipes-append/libxml/libxml2_2.8.0.bbappend +++ b/meta-fsl-ppc/recipes-append/libxml/libxml2_2.8.0.bbappend @@ -1,3 +1,3 @@ -EXTRA_OECONF += "--with-fexceptions" +EXTRA_OECONF_fsl += "--with-fexceptions" -PR .= "+${DISTRO}.0" +PR_fsl .= "+${DISTRO}.0" diff --git a/meta-fsl-ppc/recipes-append/netbase/netbase_5.0.bbappend b/meta-fsl-ppc/recipes-append/netbase/netbase_5.0.bbappend index 837cd204..66600586 100644 --- a/meta-fsl-ppc/recipes-append/netbase/netbase_5.0.bbappend +++ b/meta-fsl-ppc/recipes-append/netbase/netbase_5.0.bbappend @@ -1,10 +1,10 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/files:" +FILESEXTRAPATHS_prepend_fsl := "${THISDIR}/files:" -SRC_URI += "file://71-fsl-dpaa-persistent-networking.rules" +SRC_URI_fsl += "file://71-fsl-dpaa-persistent-networking.rules" -do_install_append () { +do_install_append_fsl () { install -d ${D}${sysconfdir}/udev/rules.d/ install -m 0644 ${WORKDIR}/71-fsl-dpaa-persistent-networking.rules ${D}${sysconfdir}/udev/rules.d } -PR .= "+${DISTRO}" +PR_fsl .= "+${DISTRO}" diff --git a/meta-fsl-ppc/recipes-append/procps/procps_3.2.8.bbappend b/meta-fsl-ppc/recipes-append/procps/procps_3.2.8.bbappend index 7f993346..f5d4fd16 100644 --- a/meta-fsl-ppc/recipes-append/procps/procps_3.2.8.bbappend +++ b/meta-fsl-ppc/recipes-append/procps/procps_3.2.8.bbappend @@ -1,3 +1,3 @@ -PR .= "+${DISTRO}.0" +PR_fsl .= "+${DISTRO}.0" -FILESEXTRAPATHS_prepend := "${THISDIR}/files:" +FILESEXTRAPATHS_prepend_fsl := "${THISDIR}/files:" diff --git a/meta-fsl-ppc/recipes-append/udev/udev_164.bbappend b/meta-fsl-ppc/recipes-append/udev/udev_164.bbappend index 7277e475..17988f1f 100644 --- a/meta-fsl-ppc/recipes-append/udev/udev_164.bbappend +++ b/meta-fsl-ppc/recipes-append/udev/udev_164.bbappend @@ -1,4 +1,4 @@ -FILEXTRAPATHS_prepend := "${THISDIR}/files:" +FILEXTRAPATHS_prepend_fsl := "${THISDIR}/files:" -PR .= "+${DISTRO}.0" +PR_fsl .= "+${DISTRO}.0" -- cgit v1.2.3-54-g00ecf From 295db0bc44d068f488db856c08d9b249097686be Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Wed, 25 Jul 2012 15:57:24 -0500 Subject: add fslmachine overrides Signed-off-by: Matthew McClintock --- meta-fsl-ppc/conf/machine/e500mc.inc | 2 +- meta-fsl-ppc/conf/machine/e500v2.inc | 2 +- meta-fsl-ppc/conf/machine/e5500-64b.inc | 2 +- meta-fsl-ppc/conf/machine/e5500.inc | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/meta-fsl-ppc/conf/machine/e500mc.inc b/meta-fsl-ppc/conf/machine/e500mc.inc index 5cd74c78..acb55c35 100644 --- a/meta-fsl-ppc/conf/machine/e500mc.inc +++ b/meta-fsl-ppc/conf/machine/e500mc.inc @@ -14,4 +14,4 @@ KERNEL_IMAGETYPE ?= "uImage" # ext2.bz2 ext2.lzma \ # ext2.gz.u-boot ext2.bz2.u-boot ext2.lzma.u-boot" -MACHINEOVERRIDES .= ":e500mc" +MACHINEOVERRIDES .= ":e500mc:fslmachine" diff --git a/meta-fsl-ppc/conf/machine/e500v2.inc b/meta-fsl-ppc/conf/machine/e500v2.inc index 076158b2..2b837952 100644 --- a/meta-fsl-ppc/conf/machine/e500v2.inc +++ b/meta-fsl-ppc/conf/machine/e500v2.inc @@ -12,4 +12,4 @@ KERNEL_IMAGETYPE ?= "uImage" # ext2.bz2 ext2.lzma \ # ext2.gz.u-boot ext2.bz2.u-boot ext2.lzma.u-boot" -MACHINEOVERRIDES .= ":e500v2" +MACHINEOVERRIDES .= ":e500v2:fslmachine" diff --git a/meta-fsl-ppc/conf/machine/e5500-64b.inc b/meta-fsl-ppc/conf/machine/e5500-64b.inc index 4e811593..79639f66 100644 --- a/meta-fsl-ppc/conf/machine/e5500-64b.inc +++ b/meta-fsl-ppc/conf/machine/e5500-64b.inc @@ -15,4 +15,4 @@ KERNEL_IMAGETYPE ?= "uImage" # ext2.bz2 ext2.lzma \ # ext2.gz.u-boot ext2.bz2.u-boot ext2.lzma.u-boot" -MACHINEOVERRIDES .= ":e5500-64b" +MACHINEOVERRIDES .= ":e5500-64b:fslmachine" diff --git a/meta-fsl-ppc/conf/machine/e5500.inc b/meta-fsl-ppc/conf/machine/e5500.inc index 46304c9f..b89041b7 100644 --- a/meta-fsl-ppc/conf/machine/e5500.inc +++ b/meta-fsl-ppc/conf/machine/e5500.inc @@ -14,4 +14,4 @@ KERNEL_IMAGETYPE ?= "uImage" # ext2.bz2 ext2.lzma \ # ext2.gz.u-boot ext2.bz2.u-boot ext2.lzma.u-boot" -MACHINEOVERRIDES .= ":e5500" +MACHINEOVERRIDES .= ":e5500:fslmachine" -- cgit v1.2.3-54-g00ecf From a5cc2a34809def60fa44e2108840fb7abc8294f9 Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Wed, 25 Jul 2012 01:12:53 +0000 Subject: qemu: set preferred version for QEMU The preferred version needs to specify the QEMU version for our qemu_git recipe (overridden by the QEMU bbappends). Without this patch we will no pick up our qemu_git recipe. Signed-off-by: Matthew McClintock --- meta-fsl-ppc/conf/distro/fsl.conf | 2 -- meta-fsl-ppc/conf/machine/e500mc.inc | 1 + meta-fsl-ppc/conf/machine/e500v2.inc | 1 + meta-fsl-ppc/conf/machine/e5500-64b.inc | 1 + meta-fsl-ppc/conf/machine/e5500.inc | 1 + meta-fsl-ppc/recipes-devtools/qemu/qemu_1.0.bb | 39 ++++++++++++++++++++++++++ 6 files changed, 43 insertions(+), 2 deletions(-) create mode 100644 meta-fsl-ppc/recipes-devtools/qemu/qemu_1.0.bb diff --git a/meta-fsl-ppc/conf/distro/fsl.conf b/meta-fsl-ppc/conf/distro/fsl.conf index 0b0e17f7..b923415c 100644 --- a/meta-fsl-ppc/conf/distro/fsl.conf +++ b/meta-fsl-ppc/conf/distro/fsl.conf @@ -29,8 +29,6 @@ DISTRO_EXTRA_RDEPENDS_append_qemux86-64 = " ${POKYQEMUDEPS}" TCLIBCAPPEND = "" -QEMU_TARGETS ?= "ppc" - PREMIRRORS ?= "\ bzr://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \ cvs://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \ diff --git a/meta-fsl-ppc/conf/machine/e500mc.inc b/meta-fsl-ppc/conf/machine/e500mc.inc index acb55c35..9f7ed31e 100644 --- a/meta-fsl-ppc/conf/machine/e500mc.inc +++ b/meta-fsl-ppc/conf/machine/e500mc.inc @@ -8,6 +8,7 @@ MACHINE_FEATURES_RRECOMMENDS = "" PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" PREFERRED_VERSION_virtual/kernel ?= "3.0.34" PREFERRED_PROVIDER_linux-libc-headers ?= "linux-qoriq-sdk-headers" +PREFERRED_VERSION_qemu = "1.0+fsl" KERNEL_IMAGETYPE ?= "uImage" # disable the images below for now diff --git a/meta-fsl-ppc/conf/machine/e500v2.inc b/meta-fsl-ppc/conf/machine/e500v2.inc index 2b837952..da515da0 100644 --- a/meta-fsl-ppc/conf/machine/e500v2.inc +++ b/meta-fsl-ppc/conf/machine/e500v2.inc @@ -6,6 +6,7 @@ MACHINE_EXTRA_RRECOMMENDS = "" PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" PREFERRED_VERSION_virtual/kernel ?= "3.0.34" PREFERRED_PROVIDER_linux-libc-headers ?= "linux-qoriq-sdk-headers" +PREFERRED_VERSION_qemu = "1.0+fsl" KERNEL_IMAGETYPE ?= "uImage" # disable the images below for now diff --git a/meta-fsl-ppc/conf/machine/e5500-64b.inc b/meta-fsl-ppc/conf/machine/e5500-64b.inc index 79639f66..709880ec 100644 --- a/meta-fsl-ppc/conf/machine/e5500-64b.inc +++ b/meta-fsl-ppc/conf/machine/e5500-64b.inc @@ -9,6 +9,7 @@ MACHINE_FEATURES_RRECOMMENDS = "" PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" PREFERRED_VERSION_virtual/kernel ?= "3.0.34" PREFERRED_PROVIDER_linux-libc-headers ?= "linux-qoriq-sdk-headers" +PREFERRED_VERSION_qemu = "1.0+fsl" KERNEL_IMAGETYPE ?= "uImage" # disable the images below for now diff --git a/meta-fsl-ppc/conf/machine/e5500.inc b/meta-fsl-ppc/conf/machine/e5500.inc index b89041b7..75c333a9 100644 --- a/meta-fsl-ppc/conf/machine/e5500.inc +++ b/meta-fsl-ppc/conf/machine/e5500.inc @@ -8,6 +8,7 @@ MACHINE_FEATURES_RRECOMMENDS = "" PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" PREFERRED_VERSION_virtual/kernel ?= "3.0.34" PREFERRED_PROVIDER_linux-libc-headers ?= "linux-qoriq-sdk-headers" +PREFERRED_VERSION_qemu = "1.0+fsl" KERNEL_IMAGETYPE ?= "uImage" # disable the images below for now diff --git a/meta-fsl-ppc/recipes-devtools/qemu/qemu_1.0.bb b/meta-fsl-ppc/recipes-devtools/qemu/qemu_1.0.bb new file mode 100644 index 00000000..7a6e5450 --- /dev/null +++ b/meta-fsl-ppc/recipes-devtools/qemu/qemu_1.0.bb @@ -0,0 +1,39 @@ +require recipes-devtools/qemu/qemu.inc + +LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \ + file://COPYING.LIB;endline=24;md5=c04def7ae38850e7d3ef548588159913" + +# This means v1.0 with FSL specific patches applied +PV = "1.0+fsl" + +DEPENDS += "dtc" + +SRC_URI = "git://git.freescale.com/ppc/sdk/qemu.git" +SRCREV = "${AUTOREV}" + +S = "${WORKDIR}/git" + +QEMU_TARGETS = "ppc" +PPC_OECONF = '${SDL} --disable-werror --disable-vnc --audio-drv-list="" --audio-card-list="" --disable-bluez --disable-curl' +EXTRA_OECONF_powerpc = "--target-list=ppc-softmmu ${PPC_OECONF}" +EXTRA_OECONF_powerpc64 = "--target-list=ppc64-softmmu ${PPC_OECONF}" + +do_configure_append () { + grep 'CONFIG_FDT=y' config-host.mak +} + +# gets around qemu.inc trying to install powerpc_rom.bin +do_install_prepend() { + touch ${WORKDIR}/powerpc_rom.bin +} + +do_install_append() { + rm ${WORKDIR}/powerpc_rom.bin +} + +# This is only meant to be build to run on the target +# for the given arch types listed, otherwise don't let +# the package get built. COMPATIBLE_HOST would not work +# because it was too generic +COMPATIBLE_MACHINE = "a^" +COMPATIBLE_MACHINE_libc-glibc_fslmachine = ".*" -- cgit v1.2.3-54-g00ecf From 79affde544fc88653c4f78ff86149446287378a7 Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Thu, 6 Sep 2012 13:50:41 -0500 Subject: add kernel patch to fix parallel build failures Signed-off-by: Matthew McClintock --- ...-build-dependencies-for-c-files-requiring.patch | 44 ++++++++++++++++++++++ .../recipes-kernel/linux/linux-qoriq-sdk.inc | 3 +- 2 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 meta-fsl-ppc/recipes-kernel/linux/0001-powerpc-Fix-build-dependencies-for-c-files-requiring.patch diff --git a/meta-fsl-ppc/recipes-kernel/linux/0001-powerpc-Fix-build-dependencies-for-c-files-requiring.patch b/meta-fsl-ppc/recipes-kernel/linux/0001-powerpc-Fix-build-dependencies-for-c-files-requiring.patch new file mode 100644 index 00000000..d3464fb7 --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/linux/0001-powerpc-Fix-build-dependencies-for-c-files-requiring.patch @@ -0,0 +1,44 @@ +Upstream-Status: Pending + +From 2e7ffea0c0c09c6d9219d604e0351423f43844f4 Mon Sep 17 00:00:00 2001 +From: Matthew McClintock +Date: Thu, 6 Sep 2012 13:45:21 -0500 +Subject: powerpc: Fix build dependencies for c files requiring libfdt.h + +Several files in obj-plat depend on libfdt header file. Sometimes +when building one can see the following issue. This patch adds +libfdt as dependency to those object files + +| In file included from arch/powerpc/boot/treeboot-iss4xx.c:33:0: +| arch/powerpc/boot/libfdt.h:854:1: error: unterminated comment +| In file included from arch/powerpc/boot/treeboot-iss4xx.c:33:0: +| arch/powerpc/boot/libfdt.h:1:0: error: unterminated #ifndef +| BOOTCC arch/powerpc/boot/inffast.o +| make[1]: *** [arch/powerpc/boot/treeboot-iss4xx.o] Error 1 +| make[1]: *** Waiting for unfinished jobs.... +| BOOTCC arch/powerpc/boot/inflate.o +| make: *** [uImage] Error 2 +| ERROR: oe_runmake failed +| ERROR: Function failed: do_compile (see /srv/home/pokybuild/yocto-autobuilder/yocto-slave/p1022ds/build/build/tmp/work/p1022ds-poky-linux-gnuspe/linux-qoriq-sdk-3.0.34-r5/temp/log.do_compile.2167 for further information) +NOTE: recipe linux-qoriq-sdk-3.0.34-r5: task do_compile: Failed + +Signed-off-by: Matthew McClintock +--- + arch/powerpc/boot/Makefile | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile +index b7d8333..6a15c96 100644 +--- a/arch/powerpc/boot/Makefile ++++ b/arch/powerpc/boot/Makefile +@@ -107,6 +107,7 @@ src-boot := $(addprefix $(obj)/, $(src-boot)) + obj-boot := $(addsuffix .o, $(basename $(src-boot))) + obj-wlib := $(addsuffix .o, $(basename $(addprefix $(obj)/, $(src-wlib)))) + obj-plat := $(addsuffix .o, $(basename $(addprefix $(obj)/, $(src-plat)))) ++obj-plat: $(libfdt) + + quiet_cmd_copy_zlib = COPY $@ + cmd_copy_zlib = sed "s@__used@@;s@]*\).*@\"\1\"@" $< > $@ +-- +1.7.9.7 + diff --git a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc index 708ae579..563e916e 100644 --- a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc +++ b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc @@ -1,11 +1,12 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7" PV = "3.0.34" -PR = "r5" +PR = "r6" SRCREV = "fsl-sdk-v1.2.1" SRC_URI = "git://git.freescale.com/ppc/sdk/linux.git \ file://0001-compiler.h-Undef-before-redefining-__attribute_const.patch \ + file://0001-powerpc-Fix-build-dependencies-for-c-files-requiring.patch \ " KSRC ?= "" -- cgit v1.2.3-54-g00ecf From 90ad4282e5bc723f16b1fe9f4b8308f0c528b0bc Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Mon, 10 Sep 2012 11:29:21 -0500 Subject: p1022ds.conf: change to use non-lite version of xserver, lite version has been removed Signed-off-by: Matthew McClintock --- meta-fsl-ppc/conf/machine/p1022ds.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meta-fsl-ppc/conf/machine/p1022ds.conf b/meta-fsl-ppc/conf/machine/p1022ds.conf index 88770929..6445bdc5 100644 --- a/meta-fsl-ppc/conf/machine/p1022ds.conf +++ b/meta-fsl-ppc/conf/machine/p1022ds.conf @@ -8,10 +8,10 @@ UBOOT_MACHINES ?= "P1022DS P1022DS_NAND P1022DS_SPIFLASH P1022DS_SDCARD P1022DS_ KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p1022ds_32b.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" -PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xorg-lite" +PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xorg" XSERVER = " \ - xserver-xorg-lite \ + xserver-xorg \ xf86-input-evdev \ xf86-input-mouse \ xf86-input-keyboard \ -- cgit v1.2.3-54-g00ecf From 5aaf53220234592a77a81a23b0523ba797bc3350 Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Mon, 10 Sep 2012 11:53:37 -0500 Subject: fsl.conf: using our kernel tree for nativesdk is wrong, remove it Signed-off-by: Matthew McClintock --- meta-fsl-ppc/conf/distro/fsl.conf | 1 - 1 file changed, 1 deletion(-) diff --git a/meta-fsl-ppc/conf/distro/fsl.conf b/meta-fsl-ppc/conf/distro/fsl.conf index b923415c..939d6f36 100644 --- a/meta-fsl-ppc/conf/distro/fsl.conf +++ b/meta-fsl-ppc/conf/distro/fsl.conf @@ -86,6 +86,5 @@ IMAGE_CLASSES = "image_types_uboot" PREFERRED_VERSION_u-boot-mkimage-native_powerpc = "2011.06" PREFERRED_PROVIDER_virtual/libx11 = "libx11" -PREFERRED_PROVIDER_linux-libc-headers-nativesdk ?= "linux-qoriq-sdk-headers-nativesdk" CCACHE = "" -- cgit v1.2.3-54-g00ecf From b52f7d7bb53fef0f3c558125ceaa4240a2817496 Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Mon, 10 Sep 2012 15:37:55 -0500 Subject: lxc_0.8.0-rc1.bb: initial add of recipe Signed-off-by: Matthew McClintock --- meta-fsl-ppc/recipes-tools/lxc/lxc_0.8.0-rc1.bb | 34 +++++++++++++++++++++++++ meta-fsl-ppc/recipes-tools/lxc/noldconfig.patch | 29 +++++++++++++++++++++ 2 files changed, 63 insertions(+) create mode 100644 meta-fsl-ppc/recipes-tools/lxc/lxc_0.8.0-rc1.bb create mode 100644 meta-fsl-ppc/recipes-tools/lxc/noldconfig.patch diff --git a/meta-fsl-ppc/recipes-tools/lxc/lxc_0.8.0-rc1.bb b/meta-fsl-ppc/recipes-tools/lxc/lxc_0.8.0-rc1.bb new file mode 100644 index 00000000..d5e145f5 --- /dev/null +++ b/meta-fsl-ppc/recipes-tools/lxc/lxc_0.8.0-rc1.bb @@ -0,0 +1,34 @@ +DESCRIPTION = "lxc aims to use these new functionnalities to provide an userspace container object" +SECTION = "console/utils" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=fbc093901857fcd118f065f900982c24" +PRIORITY = "optional" +DEPENDS = "libxml2 libcap" +RDEPENDS_${PN} = " \ + rsync \ + gzip \ + libcap-bin \ + perl-module-strict \ + perl-module-getopt-long \ + perl-module-vars \ + perl-module-warnings-register \ + perl-module-exporter \ + perl-module-constant \ + perl-module-overload \ + perl-module-exporter-heavy \ +" + +SRC_URI = "http://lxc.sourceforge.net/download/lxc/${PN}-${PV}.tar.gz \ + file://noldconfig.patch \ + " + +SRC_URI[md5sum] ="06ceecf4dbe1be988fc903ad8dd34d29" +SRC_URI[sha256sum] = "32bf83902c07387646c55de440d6d12cf61bd54c97417109c2d1ac47d17cb911" + +S = "${WORKDIR}/${PN}-${PV}" + +EXTRA_OECONF = "--disable-doc --disable-rpath" + +inherit autotools + +FILES_${PN}-dbg += "${libexecdir}/lxc/.debug" diff --git a/meta-fsl-ppc/recipes-tools/lxc/noldconfig.patch b/meta-fsl-ppc/recipes-tools/lxc/noldconfig.patch new file mode 100644 index 00000000..5edff468 --- /dev/null +++ b/meta-fsl-ppc/recipes-tools/lxc/noldconfig.patch @@ -0,0 +1,29 @@ +From a8aa8d131a7140d5625c24c9f4c28c605213552c Mon Sep 17 00:00:00 2001 +From: Andrey Mazo +Date: Fri, 18 May 2012 21:11:22 +0400 +Subject: [PATCH] Avoid ldconfig due to cross-compilation problems. + +Make required symlinks manually. +Otherwise, it cases problems on cbuild endianness != ctarget endianness +setups because /sbin/ldconfig expects elf header in the wrong endianness. +--- + src/lxc/Makefile.am | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/src/lxc/Makefile.am b/src/lxc/Makefile.am +index 1c26952..3b84c1a 100644 +--- a/src/lxc/Makefile.am ++++ b/src/lxc/Makefile.am +@@ -125,8 +125,8 @@ lxc_kill_SOURCES = lxc_kill.c + + install-exec-local: install-soPROGRAMS + mv $(DESTDIR)$(libdir)/liblxc.so $(DESTDIR)$(libdir)/liblxc.so.$(VERSION) +- /sbin/ldconfig -l $(DESTDIR)$(libdir)/liblxc.so.$(VERSION) + cd $(DESTDIR)$(libdir); \ ++ ln -sf liblxc.so.$(VERSION) liblxc.so.$(firstword $(subst ., ,$(VERSION))); \ + ln -sf liblxc.so.$(firstword $(subst ., ,$(VERSION))) liblxc.so + + uninstall-local: +-- +1.7.3.4 + -- cgit v1.2.3-54-g00ecf From 14f386bfc20e6b3fe3336dddf80a2bb38865857f Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Wed, 12 Sep 2012 13:00:24 -0500 Subject: remove use of tags in SRCREV and replace with actual SHAs This was done because BB_NO_NETWORK only works with SHAs since the fetcher needs to check the tags each time Signed-off-by: Matthew McClintock --- meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc | 2 +- meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb | 2 +- meta-fsl-ppc/recipes-tools/boot-format/boot-format_git.bb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc index 563e916e..1b76a28c 100644 --- a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc +++ b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc @@ -3,7 +3,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7" PV = "3.0.34" PR = "r6" -SRCREV = "fsl-sdk-v1.2.1" +SRCREV = "058c67be272af9ab95b88c941f31fb3eda05a4d3" SRC_URI = "git://git.freescale.com/ppc/sdk/linux.git \ file://0001-compiler.h-Undef-before-redefining-__attribute_const.patch \ file://0001-powerpc-Fix-build-dependencies-for-c-files-requiring.patch \ diff --git a/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb b/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb index 49ed0871..1368509c 100644 --- a/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb +++ b/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb @@ -11,7 +11,7 @@ DEPENDS = "boot-format-native virtual/${TARGET_PREFIX}gcc" inherit deploy -SRCREV = "fsl-sdk-v1.2.1" +SRCREV = "6d1aef1c02ba9472215234696faa8ce8745a40a9" SRC_URI = "git://git.freescale.com/ppc/sdk/u-boot.git \ " DEPENDS_append_e5500-64b = " lib32-gcc-cross" diff --git a/meta-fsl-ppc/recipes-tools/boot-format/boot-format_git.bb b/meta-fsl-ppc/recipes-tools/boot-format/boot-format_git.bb index 89d6784d..d1cbdd31 100644 --- a/meta-fsl-ppc/recipes-tools/boot-format/boot-format_git.bb +++ b/meta-fsl-ppc/recipes-tools/boot-format/boot-format_git.bb @@ -5,7 +5,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" SRC_URI = "git://git.freescale.com/ppc/sdk/boot-format.git\ " -SRCREV = "fsl-sdk-v1.2.1" +SRCREV = "53cf657a7d034b8d71d53d5c241d0870836d8a72" S = "${WORKDIR}/git" EXTRA_OEMAKE = 'CC="${CC}"' -- cgit v1.2.3-54-g00ecf From dedbc58fb40c209b51e11e6d9b6b2dcd62b48573 Mon Sep 17 00:00:00 2001 From: Stuart Yoder Date: Thu, 13 Sep 2012 00:26:29 +0000 Subject: meta-fsl-ppc: lxc: add patch to fix 64-bit lib mount issue Signed-off-by: Stuart Yoder --- meta-fsl-ppc/recipes-tools/lxc/libmounts.patch | 48 +++++++++++++++++++++++++ meta-fsl-ppc/recipes-tools/lxc/lxc_0.8.0-rc1.bb | 2 ++ 2 files changed, 50 insertions(+) create mode 100644 meta-fsl-ppc/recipes-tools/lxc/libmounts.patch diff --git a/meta-fsl-ppc/recipes-tools/lxc/libmounts.patch b/meta-fsl-ppc/recipes-tools/lxc/libmounts.patch new file mode 100644 index 00000000..7e092f13 --- /dev/null +++ b/meta-fsl-ppc/recipes-tools/lxc/libmounts.patch @@ -0,0 +1,48 @@ +From dfef62f0334c65397254215f809a8f25364ea6ef Mon Sep 17 00:00:00 2001 +From: Stuart Yoder +Date: Wed, 12 Sep 2012 11:05:07 -0500 +Subject: [PATCH] create lib mounts only if the host directories exist + +Signed-off-by: Stuart Yoder +--- + templates/lxc-busybox.in | 24 +++++++++++------------- + 1 file changed, 11 insertions(+), 13 deletions(-) + +diff --git a/templates/lxc-busybox.in b/templates/lxc-busybox.in +index 720ceef..f6cb1ba 100644 +--- a/templates/lxc-busybox.in ++++ b/templates/lxc-busybox.in +@@ -235,19 +235,17 @@ lxc.pts = 1 + lxc.rootfs = $rootfs + EOF + +-if [ -d "$rootfs/lib" ]; then +-cat <> $path/config +-lxc.mount.entry=/lib $rootfs/lib none ro,bind 0 0 +-lxc.mount.entry=/usr/lib $rootfs/usr/lib none ro,bind 0 0 +-EOF +-fi +- +-if [ -d "/lib64" ] && [ -d "$rootfs/lib64" ]; then +-cat <> $path/config +-lxc.mount.entry=/lib64 $rootfs/lib64 none ro,bind 0 0 +-lxc.mount.entry=/usr/lib64 $rootfs/usr/lib64 none ro,bind 0 0 +-EOF +-fi ++ libdirs="\ ++ /lib \ ++ /usr/lib \ ++ /lib64 \ ++ /usr/lib64" ++ ++ for dir in $libdirs; do ++ if [ -d $dir ]; then ++ echo "lxc.mount.entry=$dir $rootfs$dir none ro,bind 0 0" >> $path/config ++ fi ++ done + } + + usage() +-- +1.7.9.7 + diff --git a/meta-fsl-ppc/recipes-tools/lxc/lxc_0.8.0-rc1.bb b/meta-fsl-ppc/recipes-tools/lxc/lxc_0.8.0-rc1.bb index d5e145f5..51a34f40 100644 --- a/meta-fsl-ppc/recipes-tools/lxc/lxc_0.8.0-rc1.bb +++ b/meta-fsl-ppc/recipes-tools/lxc/lxc_0.8.0-rc1.bb @@ -3,6 +3,7 @@ SECTION = "console/utils" LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=fbc093901857fcd118f065f900982c24" PRIORITY = "optional" +PR = "r1" DEPENDS = "libxml2 libcap" RDEPENDS_${PN} = " \ rsync \ @@ -20,6 +21,7 @@ RDEPENDS_${PN} = " \ SRC_URI = "http://lxc.sourceforge.net/download/lxc/${PN}-${PV}.tar.gz \ file://noldconfig.patch \ + file://libmounts.patch \ " SRC_URI[md5sum] ="06ceecf4dbe1be988fc903ad8dd34d29" -- cgit v1.2.3-54-g00ecf From 72d059e8e68d878f7f6475e62caf99db3f38a83d Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Wed, 12 Sep 2012 15:46:15 -0500 Subject: linux-qoriq-sdk.inc: add var to configure build for 64-bit kernel on 32-bit machine Signed-off-by: Matthew McClintock --- meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc index 1b76a28c..35ee5e32 100644 --- a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc +++ b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc @@ -14,3 +14,11 @@ S = '${@base_conditional("KSRC", "", "${WORKDIR}/git", "${KSRC}", d)}' # make everything compatible for the time being COMPATIBLE_MACHINE_$MACHINE = "$MACHINE" + +python () { + promote_kernel = d.getVar('BUILD_64BIT_KERNEL') + + if promote_kernel != 0: + d.setVar('KERNEL_CC_append', ' -m64') + d.setVar('KERNEL_LD_append', ' -melf64ppc') +} -- cgit v1.2.3-54-g00ecf From 44b1e3160d968387d2e590e13d3958bcf7c8c685 Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Mon, 10 Sep 2012 16:19:25 -0500 Subject: add new e6500 based machines (b4860qds and t4240qds) note: these machines build with a 64-bit kernel always, since optimal performance is with this kernel even if the rfs is still 32-bit Signed-off-by: Matthew McClintock --- meta-fsl-ppc/conf/machine/b4860qds-64b.conf | 17 +++++++++++++++++ meta-fsl-ppc/conf/machine/b4860qds.conf | 17 +++++++++++++++++ meta-fsl-ppc/conf/machine/e6500-64b.inc | 19 +++++++++++++++++++ meta-fsl-ppc/conf/machine/e6500.inc | 18 ++++++++++++++++++ meta-fsl-ppc/conf/machine/t4240qds-64b.conf | 17 +++++++++++++++++ meta-fsl-ppc/conf/machine/t4240qds.conf | 17 +++++++++++++++++ 6 files changed, 105 insertions(+) create mode 100644 meta-fsl-ppc/conf/machine/b4860qds-64b.conf create mode 100644 meta-fsl-ppc/conf/machine/b4860qds.conf create mode 100644 meta-fsl-ppc/conf/machine/e6500-64b.inc create mode 100644 meta-fsl-ppc/conf/machine/e6500.inc create mode 100644 meta-fsl-ppc/conf/machine/t4240qds-64b.conf create mode 100644 meta-fsl-ppc/conf/machine/t4240qds.conf diff --git a/meta-fsl-ppc/conf/machine/b4860qds-64b.conf b/meta-fsl-ppc/conf/machine/b4860qds-64b.conf new file mode 100644 index 00000000..5243c24b --- /dev/null +++ b/meta-fsl-ppc/conf/machine/b4860qds-64b.conf @@ -0,0 +1,17 @@ +#@TYPE: Machine +#@DESCRIPTION: Machine configuration for running B4860QDS in 64-bit mode + +require e6500-64b.inc + +# TODO: fix 32bit build of u-boot +UBOOT_MACHINES ?= "B4860QDS" +KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/b4860qds.dts" +KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet64_smp_defconfig" + +JFFS2_ERASEBLOCK = "0x10000" + +SYSVINIT_ENABLED_GETTYS = "" +USE_VT = "" +SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" +SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" +USE_VT = "0" diff --git a/meta-fsl-ppc/conf/machine/b4860qds.conf b/meta-fsl-ppc/conf/machine/b4860qds.conf new file mode 100644 index 00000000..6ba1e78f --- /dev/null +++ b/meta-fsl-ppc/conf/machine/b4860qds.conf @@ -0,0 +1,17 @@ +#@TYPE: Machine +#@DESCRIPTION: Machine configuration for running B4860QDS in 32-bit mode + +require e6500.inc + +UBOOT_MACHINES ?= "B4860QDS" +KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/b4860qds.dts" +KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet64_smp_defconfig" + +JFFS2_ERASEBLOCK = "0x10000" + +SYSVINIT_ENABLED_GETTYS = "" +USE_VT = "" +SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" +SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" +USE_VT = "0" +BUILD_64BIT_KERNEL = "1" diff --git a/meta-fsl-ppc/conf/machine/e6500-64b.inc b/meta-fsl-ppc/conf/machine/e6500-64b.inc new file mode 100644 index 00000000..32837b56 --- /dev/null +++ b/meta-fsl-ppc/conf/machine/e6500-64b.inc @@ -0,0 +1,19 @@ +TARGET_FPU = "hard" + +DEFAULTTUNE ?= "ppc64e6500" +require conf/machine/include/tune-ppce6500.inc + +MACHINE_FEATURES = "kernel26 keyboard pci ext2 ext3 serial" +MACHINE_FEATURES_RRECOMMENDS = "" + +PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" +PREFERRED_VERSION_virtual/kernel ?= "3.0.34" +PREFERRED_PROVIDER_linux-libc-headers ?= "linux-qoriq-sdk-headers" +PREFERRED_VERSION_qemu = "1.0+fsl" + +KERNEL_IMAGETYPE ?= "uImage" +# disable the images below for now +# ext2.bz2 ext2.lzma \ +# ext2.gz.u-boot ext2.bz2.u-boot ext2.lzma.u-boot" + +MACHINEOVERRIDES .= ":e6500-64b:fslmachine" diff --git a/meta-fsl-ppc/conf/machine/e6500.inc b/meta-fsl-ppc/conf/machine/e6500.inc new file mode 100644 index 00000000..46879726 --- /dev/null +++ b/meta-fsl-ppc/conf/machine/e6500.inc @@ -0,0 +1,18 @@ +TARGET_FPU = "hard" + +require conf/machine/include/tune-ppce6500.inc + +MACHINE_FEATURES = "kernel26 keyboard pci ext2 ext3 serial" +MACHINE_FEATURES_RRECOMMENDS = "" + +PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" +PREFERRED_VERSION_virtual/kernel ?= "3.0.34" +PREFERRED_PROVIDER_linux-libc-headers ?= "linux-qoriq-sdk-headers" +PREFERRED_VERSION_qemu = "1.0+fsl" + +KERNEL_IMAGETYPE ?= "uImage" +# disable the images below for now +# ext2.bz2 ext2.lzma \ +# ext2.gz.u-boot ext2.bz2.u-boot ext2.lzma.u-boot" + +MACHINEOVERRIDES .= ":e6500:fslmachine" diff --git a/meta-fsl-ppc/conf/machine/t4240qds-64b.conf b/meta-fsl-ppc/conf/machine/t4240qds-64b.conf new file mode 100644 index 00000000..48c58552 --- /dev/null +++ b/meta-fsl-ppc/conf/machine/t4240qds-64b.conf @@ -0,0 +1,17 @@ +#@TYPE: Machine +#@DESCRIPTION: Machine configuration for running T4240QDS in 64-bit mode + +require e6500-64b.inc + +# TODO: fix 32bit build of u-boot +UBOOT_MACHINES ?= "T4240QDS" +KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/t4240qds.dts" +KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet64_smp_defconfig" + +JFFS2_ERASEBLOCK = "0x10000" + +SYSVINIT_ENABLED_GETTYS = "" +USE_VT = "" +SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" +SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" +USE_VT = "0" diff --git a/meta-fsl-ppc/conf/machine/t4240qds.conf b/meta-fsl-ppc/conf/machine/t4240qds.conf new file mode 100644 index 00000000..3ad7ae20 --- /dev/null +++ b/meta-fsl-ppc/conf/machine/t4240qds.conf @@ -0,0 +1,17 @@ +#@TYPE: Machine +#@DESCRIPTION: Machine configuration for running T4240QDS in 32-bit mode + +require e6500.inc + +UBOOT_MACHINES ?= "T4240QDS" +KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/t4240.dts" +KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet64_smp_defconfig" + +JFFS2_ERASEBLOCK = "0x10000" + +SYSVINIT_ENABLED_GETTYS = "" +USE_VT = "" +SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" +SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" +USE_VT = "0" +BUILD_64BIT_KERNEL = "1" -- cgit v1.2.3-54-g00ecf From 60a2e60b42072beaa8af253f87b20654723ba739 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Wed, 12 Sep 2012 15:06:17 +0800 Subject: add additional u-boot and dts for mpc85xx Signed-off-by: Ting Liu --- meta-fsl-ppc/conf/machine/mpc8536ds.conf | 3 ++- meta-fsl-ppc/conf/machine/mpc8548cds.conf | 5 +++-- meta-fsl-ppc/conf/machine/mpc8572ds.conf | 5 +++-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/meta-fsl-ppc/conf/machine/mpc8536ds.conf b/meta-fsl-ppc/conf/machine/mpc8536ds.conf index eac14ac7..babca86e 100644 --- a/meta-fsl-ppc/conf/machine/mpc8536ds.conf +++ b/meta-fsl-ppc/conf/machine/mpc8536ds.conf @@ -6,7 +6,8 @@ require e500v2.inc BOOTFORMAT_CONFIG = "config_ddr2_512m_mpc8536ds_667M.dat" UBOOT_MACHINES ?= "MPC8536DS MPC8536DS_36BIT MPC8536DS_NAND MPC8536DS_SDCARD MPC8536DS_SPIFLASH" -KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/mpc8536ds.dts" +KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/mpc8536ds.dts \ + ${S}/arch/powerpc/boot/dts/mpc8536ds_36b.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_defconfig" JFFS2_ERASEBLOCK = "0x20000" diff --git a/meta-fsl-ppc/conf/machine/mpc8548cds.conf b/meta-fsl-ppc/conf/machine/mpc8548cds.conf index 71f46690..631c4cbc 100644 --- a/meta-fsl-ppc/conf/machine/mpc8548cds.conf +++ b/meta-fsl-ppc/conf/machine/mpc8548cds.conf @@ -4,8 +4,9 @@ require e500v2.inc -UBOOT_MACHINES ?= "MPC8548CDS" -KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/mpc8548cds_32b.dts" +UBOOT_MACHINES ?= "MPC8548CDS MPC8548CDS_36BIT" +KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/mpc8548cds_32b.dts \ + ${S}/arch/powerpc/boot/dts/mpc8548cds_36b.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_defconfig" JFFS2_ERASEBLOCK = "0x20000" diff --git a/meta-fsl-ppc/conf/machine/mpc8572ds.conf b/meta-fsl-ppc/conf/machine/mpc8572ds.conf index 51d3c523..1c06b536 100644 --- a/meta-fsl-ppc/conf/machine/mpc8572ds.conf +++ b/meta-fsl-ppc/conf/machine/mpc8572ds.conf @@ -3,8 +3,9 @@ require e500v2.inc -UBOOT_MACHINES ?= "MPC8572DS" -KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/mpc8572ds.dts" +UBOOT_MACHINES ?= "MPC8572DS MPC8572DS_36BIT MPC8572DS_NAND" +KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/mpc8572ds.dts \ + ${S}/arch/powerpc/boot/dts/mpc8572ds_36b.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" JFFS2_ERASEBLOCK = "0x20000" -- cgit v1.2.3-54-g00ecf From df37d128fd46176019318ff678fee57ba3789c95 Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Wed, 12 Sep 2012 15:06:15 +0800 Subject: add "CentOS release 5.5 (Final)" into SANITY_TESTED_DISTROS Signed-off-by: Zhenhua Luo --- meta-fsl-ppc/conf/distro/fsl.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/meta-fsl-ppc/conf/distro/fsl.conf b/meta-fsl-ppc/conf/distro/fsl.conf index 939d6f36..5a65cbe3 100644 --- a/meta-fsl-ppc/conf/distro/fsl.conf +++ b/meta-fsl-ppc/conf/distro/fsl.conf @@ -60,6 +60,7 @@ SANITY_TESTED_DISTROS ?= " \ Fedora release 15 (Lovelock) \n \ Fedora release 16 (Verne) \n \ Fedora release 17 (Beefy Miracle) \n \ + CentOS release 5.5 (Final) \n \ CentOS release 5.6 (Final) \n \ CentOS release 5.7 (Final) \n \ CentOS release 5.8 (Final) \n \ -- cgit v1.2.3-54-g00ecf From 58c5556e5d1dbfe795c8804a2d552aae69cc5d0f Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Wed, 12 Sep 2012 15:06:26 +0800 Subject: add nand u-boot in the default build list for p2041rdb Signed-off-by: Zhenhua Luo --- meta-fsl-ppc/conf/machine/p2041rdb.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-fsl-ppc/conf/machine/p2041rdb.conf b/meta-fsl-ppc/conf/machine/p2041rdb.conf index 5c72e0da..7cb449b2 100644 --- a/meta-fsl-ppc/conf/machine/p2041rdb.conf +++ b/meta-fsl-ppc/conf/machine/p2041rdb.conf @@ -3,7 +3,7 @@ require e500mc.inc -UBOOT_MACHINES ?= "P2041RDB P2041RDB_SECURE_BOOT P2041RDB_SDCARD P2041RDB_SPIFLASH" +UBOOT_MACHINES ?= "P2041RDB P2041RDB_NAND P2041RDB_SECURE_BOOT P2041RDB_SDCARD P2041RDB_SPIFLASH" KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p2041rdb.dts \ ${S}/arch/powerpc/boot/dts/p2041rdb-usdpaa.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet32_smp_defconfig" -- cgit v1.2.3-54-g00ecf From 09f8e9142e70e7d6b4d35ae9317b16f4a84312c2 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Wed, 12 Sep 2012 15:06:28 +0800 Subject: busybox: add fsl customized defconfig 1.use largest general-purpose configuration 2.add a patch to fix possible build issue with kernel 3.0 reference: http://www.gossamer-threads.com/lists/linux/kernel/1418363 Signed-off-by: Ting Liu --- .../busybox-1.19.4/busybox-1.19.4-ubi-user-h.patch | 419 ++++++++ .../busybox/busybox-1.19.4/defconfig-fsl | 1013 ++++++++++++++++++++ .../recipes-append/busybox/busybox-1.19.4/inetd | 33 + .../busybox/busybox-1.19.4/inetd.conf | 20 + .../recipes-append/busybox/busybox_1.19.4.bbappend | 15 + 5 files changed, 1500 insertions(+) create mode 100644 meta-fsl-ppc/recipes-append/busybox/busybox-1.19.4/busybox-1.19.4-ubi-user-h.patch create mode 100644 meta-fsl-ppc/recipes-append/busybox/busybox-1.19.4/defconfig-fsl create mode 100644 meta-fsl-ppc/recipes-append/busybox/busybox-1.19.4/inetd create mode 100644 meta-fsl-ppc/recipes-append/busybox/busybox-1.19.4/inetd.conf create mode 100644 meta-fsl-ppc/recipes-append/busybox/busybox_1.19.4.bbappend diff --git a/meta-fsl-ppc/recipes-append/busybox/busybox-1.19.4/busybox-1.19.4-ubi-user-h.patch b/meta-fsl-ppc/recipes-append/busybox/busybox-1.19.4/busybox-1.19.4-ubi-user-h.patch new file mode 100644 index 00000000..42bcfa92 --- /dev/null +++ b/meta-fsl-ppc/recipes-append/busybox/busybox-1.19.4/busybox-1.19.4-ubi-user-h.patch @@ -0,0 +1,419 @@ +20110926 Juergen Lambrecht +This patch add an include file from mtd-utils. + +diff --exclude CVS --exclude .git -uNr busybox-1.19.4/include/mtd/ubi-user.h busybox-1.19.4.modified/include/mtd/ubi-user.h +--- busybox-1.19.4/include/mtd/ubi-user.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.19.4.modified/include/mtd/ubi-user.h 2011-09-26 15:48:54.884088675 +0200 +@@ -0,0 +1,412 @@ ++/* ++ * Copyright (c) International Business Machines Corp., 2006 ++ * ++ * 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 2 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, write to the Free Software ++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ++ * ++ * Author: Artem Bityutskiy (???????? ?????) ++ */ ++ ++#ifndef __UBI_USER_H__ ++#define __UBI_USER_H__ ++ ++#include ++ ++/* ++ * UBI device creation (the same as MTD device attachment) ++ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++ * ++ * MTD devices may be attached using %UBI_IOCATT ioctl command of the UBI ++ * control device. The caller has to properly fill and pass ++ * &struct ubi_attach_req object - UBI will attach the MTD device specified in ++ * the request and return the newly created UBI device number as the ioctl ++ * return value. ++ * ++ * UBI device deletion (the same as MTD device detachment) ++ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++ * ++ * An UBI device maybe deleted with %UBI_IOCDET ioctl command of the UBI ++ * control device. ++ * ++ * UBI volume creation ++ * ~~~~~~~~~~~~~~~~~~~ ++ * ++ * UBI volumes are created via the %UBI_IOCMKVOL ioctl command of UBI character ++ * device. A &struct ubi_mkvol_req object has to be properly filled and a ++ * pointer to it has to be passed to the ioctl. ++ * ++ * UBI volume deletion ++ * ~~~~~~~~~~~~~~~~~~~ ++ * ++ * To delete a volume, the %UBI_IOCRMVOL ioctl command of the UBI character ++ * device should be used. A pointer to the 32-bit volume ID hast to be passed ++ * to the ioctl. ++ * ++ * UBI volume re-size ++ * ~~~~~~~~~~~~~~~~~~ ++ * ++ * To re-size a volume, the %UBI_IOCRSVOL ioctl command of the UBI character ++ * device should be used. A &struct ubi_rsvol_req object has to be properly ++ * filled and a pointer to it has to be passed to the ioctl. ++ * ++ * UBI volumes re-name ++ * ~~~~~~~~~~~~~~~~~~~ ++ * ++ * To re-name several volumes atomically at one go, the %UBI_IOCRNVOL command ++ * of the UBI character device should be used. A &struct ubi_rnvol_req object ++ * has to be properly filled and a pointer to it has to be passed to the ioctl. ++ * ++ * UBI volume update ++ * ~~~~~~~~~~~~~~~~~ ++ * ++ * Volume update should be done via the %UBI_IOCVOLUP ioctl command of the ++ * corresponding UBI volume character device. A pointer to a 64-bit update ++ * size should be passed to the ioctl. After this, UBI expects user to write ++ * this number of bytes to the volume character device. The update is finished ++ * when the claimed number of bytes is passed. So, the volume update sequence ++ * is something like: ++ * ++ * fd = open("/dev/my_volume"); ++ * ioctl(fd, UBI_IOCVOLUP, &image_size); ++ * write(fd, buf, image_size); ++ * close(fd); ++ * ++ * Logical eraseblock erase ++ * ~~~~~~~~~~~~~~~~~~~~~~~~ ++ * ++ * To erase a logical eraseblock, the %UBI_IOCEBER ioctl command of the ++ * corresponding UBI volume character device should be used. This command ++ * unmaps the requested logical eraseblock, makes sure the corresponding ++ * physical eraseblock is successfully erased, and returns. ++ * ++ * Atomic logical eraseblock change ++ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++ * ++ * Atomic logical eraseblock change operation is called using the %UBI_IOCEBCH ++ * ioctl command of the corresponding UBI volume character device. A pointer to ++ * a &struct ubi_leb_change_req object has to be passed to the ioctl. Then the ++ * user is expected to write the requested amount of bytes (similarly to what ++ * should be done in case of the "volume update" ioctl). ++ * ++ * Logical eraseblock map ++ * ~~~~~~~~~~~~~~~~~~~~~ ++ * ++ * To map a logical eraseblock to a physical eraseblock, the %UBI_IOCEBMAP ++ * ioctl command should be used. A pointer to a &struct ubi_map_req object is ++ * expected to be passed. The ioctl maps the requested logical eraseblock to ++ * a physical eraseblock and returns. Only non-mapped logical eraseblocks can ++ * be mapped. If the logical eraseblock specified in the request is already ++ * mapped to a physical eraseblock, the ioctl fails and returns error. ++ * ++ * Logical eraseblock unmap ++ * ~~~~~~~~~~~~~~~~~~~~~~~~ ++ * ++ * To unmap a logical eraseblock to a physical eraseblock, the %UBI_IOCEBUNMAP ++ * ioctl command should be used. The ioctl unmaps the logical eraseblocks, ++ * schedules corresponding physical eraseblock for erasure, and returns. Unlike ++ * the "LEB erase" command, it does not wait for the physical eraseblock being ++ * erased. Note, the side effect of this is that if an unclean reboot happens ++ * after the unmap ioctl returns, you may find the LEB mapped again to the same ++ * physical eraseblock after the UBI is run again. ++ * ++ * Check if logical eraseblock is mapped ++ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++ * ++ * To check if a logical eraseblock is mapped to a physical eraseblock, the ++ * %UBI_IOCEBISMAP ioctl command should be used. It returns %0 if the LEB is ++ * not mapped, and %1 if it is mapped. ++ * ++ * Set an UBI volume property ++ * ~~~~~~~~~~~~~~~~~~~~~~~~~ ++ * ++ * To set an UBI volume property the %UBI_IOCSETPROP ioctl command should be ++ * used. A pointer to a &struct ubi_set_prop_req object is expected to be ++ * passed. The object describes which property should be set, and to which value ++ * it should be set. ++ */ ++ ++/* ++ * When a new UBI volume or UBI device is created, users may either specify the ++ * volume/device number they want to create or to let UBI automatically assign ++ * the number using these constants. ++ */ ++#define UBI_VOL_NUM_AUTO (-1) ++#define UBI_DEV_NUM_AUTO (-1) ++ ++/* Maximum volume name length */ ++#define UBI_MAX_VOLUME_NAME 127 ++ ++/* ioctl commands of UBI character devices */ ++ ++#define UBI_IOC_MAGIC 'o' ++ ++/* Create an UBI volume */ ++#define UBI_IOCMKVOL _IOW(UBI_IOC_MAGIC, 0, struct ubi_mkvol_req) ++/* Remove an UBI volume */ ++#define UBI_IOCRMVOL _IOW(UBI_IOC_MAGIC, 1, __s32) ++/* Re-size an UBI volume */ ++#define UBI_IOCRSVOL _IOW(UBI_IOC_MAGIC, 2, struct ubi_rsvol_req) ++/* Re-name volumes */ ++#define UBI_IOCRNVOL _IOW(UBI_IOC_MAGIC, 3, struct ubi_rnvol_req) ++ ++/* ioctl commands of the UBI control character device */ ++ ++#define UBI_CTRL_IOC_MAGIC 'o' ++ ++/* Attach an MTD device */ ++#define UBI_IOCATT _IOW(UBI_CTRL_IOC_MAGIC, 64, struct ubi_attach_req) ++/* Detach an MTD device */ ++#define UBI_IOCDET _IOW(UBI_CTRL_IOC_MAGIC, 65, __s32) ++ ++/* ioctl commands of UBI volume character devices */ ++ ++#define UBI_VOL_IOC_MAGIC 'O' ++ ++/* Start UBI volume update */ ++#define UBI_IOCVOLUP _IOW(UBI_VOL_IOC_MAGIC, 0, __s64) ++/* LEB erasure command, used for debugging, disabled by default */ ++#define UBI_IOCEBER _IOW(UBI_VOL_IOC_MAGIC, 1, __s32) ++/* Atomic LEB change command */ ++#define UBI_IOCEBCH _IOW(UBI_VOL_IOC_MAGIC, 2, __s32) ++/* Map LEB command */ ++#define UBI_IOCEBMAP _IOW(UBI_VOL_IOC_MAGIC, 3, struct ubi_map_req) ++/* Unmap LEB command */ ++#define UBI_IOCEBUNMAP _IOW(UBI_VOL_IOC_MAGIC, 4, __s32) ++/* Check if LEB is mapped command */ ++#define UBI_IOCEBISMAP _IOR(UBI_VOL_IOC_MAGIC, 5, __s32) ++/* Set an UBI volume property */ ++#define UBI_IOCSETPROP _IOW(UBI_VOL_IOC_MAGIC, 6, struct ubi_set_prop_req) ++ ++/* Maximum MTD device name length supported by UBI */ ++#define MAX_UBI_MTD_NAME_LEN 127 ++ ++/* Maximum amount of UBI volumes that can be re-named at one go */ ++#define UBI_MAX_RNVOL 32 ++ ++/* ++ * UBI data type hint constants. ++ * ++ * UBI_LONGTERM: long-term data ++ * UBI_SHORTTERM: short-term data ++ * UBI_UNKNOWN: data persistence is unknown ++ * ++ * These constants are used when data is written to UBI volumes in order to ++ * help the UBI wear-leveling unit to find more appropriate physical ++ * eraseblocks. ++ */ ++enum { ++ UBI_LONGTERM = 1, ++ UBI_SHORTTERM = 2, ++ UBI_UNKNOWN = 3, ++}; ++ ++/* ++ * UBI volume type constants. ++ * ++ * @UBI_DYNAMIC_VOLUME: dynamic volume ++ * @UBI_STATIC_VOLUME: static volume ++ */ ++enum { ++ UBI_DYNAMIC_VOLUME = 3, ++ UBI_STATIC_VOLUME = 4, ++}; ++ ++/* ++ * UBI set property ioctl constants ++ * ++ * @UBI_PROP_DIRECT_WRITE: allow / disallow user to directly write and ++ * erase individual eraseblocks on dynamic volumes ++ */ ++enum { ++ UBI_PROP_DIRECT_WRITE = 1, ++}; ++ ++/** ++ * struct ubi_attach_req - attach MTD device request. ++ * @ubi_num: UBI device number to create ++ * @mtd_num: MTD device number to attach ++ * @vid_hdr_offset: VID header offset (use defaults if %0) ++ * @padding: reserved for future, not used, has to be zeroed ++ * ++ * This data structure is used to specify MTD device UBI has to attach and the ++ * parameters it has to use. The number which should be assigned to the new UBI ++ * device is passed in @ubi_num. UBI may automatically assign the number if ++ * @UBI_DEV_NUM_AUTO is passed. In this case, the device number is returned in ++ * @ubi_num. ++ * ++ * Most applications should pass %0 in @vid_hdr_offset to make UBI use default ++ * offset of the VID header within physical eraseblocks. The default offset is ++ * the next min. I/O unit after the EC header. For example, it will be offset ++ * 512 in case of a 512 bytes page NAND flash with no sub-page support. Or ++ * it will be 512 in case of a 2KiB page NAND flash with 4 512-byte sub-pages. ++ * ++ * But in rare cases, if this optimizes things, the VID header may be placed to ++ * a different offset. For example, the boot-loader might do things faster if ++ * the VID header sits at the end of the first 2KiB NAND page with 4 sub-pages. ++ * As the boot-loader would not normally need to read EC headers (unless it ++ * needs UBI in RW mode), it might be faster to calculate ECC. This is weird ++ * example, but it real-life example. So, in this example, @vid_hdr_offer would ++ * be 2KiB-64 bytes = 1984. Note, that this position is not even 512-bytes ++ * aligned, which is OK, as UBI is clever enough to realize this is 4th ++ * sub-page of the first page and add needed padding. ++ */ ++struct ubi_attach_req { ++ __s32 ubi_num; ++ __s32 mtd_num; ++ __s32 vid_hdr_offset; ++ __s8 padding[12]; ++}; ++ ++/** ++ * struct ubi_mkvol_req - volume description data structure used in ++ * volume creation requests. ++ * @vol_id: volume number ++ * @alignment: volume alignment ++ * @bytes: volume size in bytes ++ * @vol_type: volume type (%UBI_DYNAMIC_VOLUME or %UBI_STATIC_VOLUME) ++ * @padding1: reserved for future, not used, has to be zeroed ++ * @name_len: volume name length ++ * @padding2: reserved for future, not used, has to be zeroed ++ * @name: volume name ++ * ++ * This structure is used by user-space programs when creating new volumes. The ++ * @used_bytes field is only necessary when creating static volumes. ++ * ++ * The @alignment field specifies the required alignment of the volume logical ++ * eraseblock. This means, that the size of logical eraseblocks will be aligned ++ * to this number, i.e., ++ * (UBI device logical eraseblock size) mod (@alignment) = 0. ++ * ++ * To put it differently, the logical eraseblock of this volume may be slightly ++ * shortened in order to make it properly aligned. The alignment has to be ++ * multiple of the flash minimal input/output unit, or %1 to utilize the entire ++ * available space of logical eraseblocks. ++ * ++ * The @alignment field may be useful, for example, when one wants to maintain ++ * a block device on top of an UBI volume. In this case, it is desirable to fit ++ * an integer number of blocks in logical eraseblocks of this UBI volume. With ++ * alignment it is possible to update this volume using plane UBI volume image ++ * BLOBs, without caring about how to properly align them. ++ */ ++struct ubi_mkvol_req { ++ __s32 vol_id; ++ __s32 alignment; ++ __s64 bytes; ++ __s8 vol_type; ++ __s8 padding1; ++ __s16 name_len; ++ __s8 padding2[4]; ++ char name[UBI_MAX_VOLUME_NAME + 1]; ++} __attribute__ ((packed)); ++ ++/** ++ * struct ubi_rsvol_req - a data structure used in volume re-size requests. ++ * @vol_id: ID of the volume to re-size ++ * @bytes: new size of the volume in bytes ++ * ++ * Re-sizing is possible for both dynamic and static volumes. But while dynamic ++ * volumes may be re-sized arbitrarily, static volumes cannot be made to be ++ * smaller than the number of bytes they bear. To arbitrarily shrink a static ++ * volume, it must be wiped out first (by means of volume update operation with ++ * zero number of bytes). ++ */ ++struct ubi_rsvol_req { ++ __s64 bytes; ++ __s32 vol_id; ++} __attribute__ ((packed)); ++ ++/** ++ * struct ubi_rnvol_req - volumes re-name request. ++ * @count: count of volumes to re-name ++ * @padding1: reserved for future, not used, has to be zeroed ++ * @vol_id: ID of the volume to re-name ++ * @name_len: name length ++ * @padding2: reserved for future, not used, has to be zeroed ++ * @name: new volume name ++ * ++ * UBI allows to re-name up to %32 volumes at one go. The count of volumes to ++ * re-name is specified in the @count field. The ID of the volumes to re-name ++ * and the new names are specified in the @vol_id and @name fields. ++ * ++ * The UBI volume re-name operation is atomic, which means that should power cut ++ * happen, the volumes will have either old name or new name. So the possible ++ * use-cases of this command is atomic upgrade. Indeed, to upgrade, say, volumes ++ * A and B one may create temporary volumes %A1 and %B1 with the new contents, ++ * then atomically re-name A1->A and B1->B, in which case old %A and %B will ++ * be removed. ++ * ++ * If it is not desirable to remove old A and B, the re-name request has to ++ * contain 4 entries: A1->A, A->A1, B1->B, B->B1, in which case old A1 and B1 ++ * become A and B, and old A and B will become A1 and B1. ++ * ++ * It is also OK to request: A1->A, A1->X, B1->B, B->Y, in which case old A1 ++ * and B1 become A and B, and old A and B become X and Y. ++ * ++ * In other words, in case of re-naming into an existing volume name, the ++ * existing volume is removed, unless it is re-named as well at the same ++ * re-name request. ++ */ ++struct ubi_rnvol_req { ++ __s32 count; ++ __s8 padding1[12]; ++ struct { ++ __s32 vol_id; ++ __s16 name_len; ++ __s8 padding2[2]; ++ char name[UBI_MAX_VOLUME_NAME + 1]; ++ } ents[UBI_MAX_RNVOL]; ++} __attribute__ ((packed)); ++ ++/** ++ * struct ubi_leb_change_req - a data structure used in atomic LEB change ++ * requests. ++ * @lnum: logical eraseblock number to change ++ * @bytes: how many bytes will be written to the logical eraseblock ++ * @dtype: data type (%UBI_LONGTERM, %UBI_SHORTTERM, %UBI_UNKNOWN) ++ * @padding: reserved for future, not used, has to be zeroed ++ */ ++struct ubi_leb_change_req { ++ __s32 lnum; ++ __s32 bytes; ++ __s8 dtype; ++ __s8 padding[7]; ++} __attribute__ ((packed)); ++ ++/** ++ * struct ubi_map_req - a data structure used in map LEB requests. ++ * @lnum: logical eraseblock number to unmap ++ * @dtype: data type (%UBI_LONGTERM, %UBI_SHORTTERM, %UBI_UNKNOWN) ++ * @padding: reserved for future, not used, has to be zeroed ++ */ ++struct ubi_map_req { ++ __s32 lnum; ++ __s8 dtype; ++ __s8 padding[3]; ++} __attribute__ ((packed)); ++ ++ ++/** ++ * struct ubi_set_prop_req - a data structure used to set an ubi volume ++ * property. ++ * @property: property to set (%UBI_PROP_DIRECT_WRITE) ++ * @padding: reserved for future, not used, has to be zeroed ++ * @value: value to set ++ */ ++struct ubi_set_prop_req { ++ __u8 property; ++ __u8 padding[7]; ++ __u64 value; ++} __attribute__ ((packed)); ++ ++#endif /* __UBI_USER_H__ */ diff --git a/meta-fsl-ppc/recipes-append/busybox/busybox-1.19.4/defconfig-fsl b/meta-fsl-ppc/recipes-append/busybox/busybox-1.19.4/defconfig-fsl new file mode 100644 index 00000000..52d5bbfd --- /dev/null +++ b/meta-fsl-ppc/recipes-append/busybox/busybox-1.19.4/defconfig-fsl @@ -0,0 +1,1013 @@ +# +# Automatically generated make config: don't edit +# Busybox version: 1.19.4 +# Mon Aug 20 15:36:39 2012 +# +CONFIG_HAVE_DOT_CONFIG=y + +# +# Busybox Settings +# + +# +# General Configuration +# +# CONFIG_DESKTOP is not set +# CONFIG_EXTRA_COMPAT is not set +CONFIG_INCLUDE_SUSv2=y +# CONFIG_USE_PORTABLE_CODE is not set +CONFIG_PLATFORM_LINUX=y +CONFIG_FEATURE_BUFFERS_USE_MALLOC=y +# CONFIG_FEATURE_BUFFERS_GO_ON_STACK is not set +# CONFIG_FEATURE_BUFFERS_GO_IN_BSS is not set +CONFIG_SHOW_USAGE=y +# CONFIG_FEATURE_VERBOSE_USAGE is not set +CONFIG_FEATURE_COMPRESS_USAGE=y +# CONFIG_FEATURE_INSTALLER is not set +# CONFIG_INSTALL_NO_USR is not set +CONFIG_LOCALE_SUPPORT=y +# CONFIG_UNICODE_SUPPORT is not set +# CONFIG_UNICODE_USING_LOCALE is not set +# CONFIG_FEATURE_CHECK_UNICODE_IN_ENV is not set +CONFIG_SUBST_WCHAR=0 +CONFIG_LAST_SUPPORTED_WCHAR=0 +# CONFIG_UNICODE_COMBINING_WCHARS is not set +# CONFIG_UNICODE_WIDE_WCHARS is not set +# CONFIG_UNICODE_BIDI_SUPPORT is not set +# CONFIG_UNICODE_NEUTRAL_TABLE is not set +# CONFIG_UNICODE_PRESERVE_BROKEN is not set +CONFIG_LONG_OPTS=y +CONFIG_FEATURE_DEVPTS=y +# CONFIG_FEATURE_CLEAN_UP is not set +CONFIG_FEATURE_UTMP=y +CONFIG_FEATURE_WTMP=y +CONFIG_FEATURE_PIDFILE=y +CONFIG_FEATURE_SUID=y +CONFIG_FEATURE_SUID_CONFIG=y +CONFIG_FEATURE_SUID_CONFIG_QUIET=y +# CONFIG_SELINUX is not set +# CONFIG_FEATURE_PREFER_APPLETS is not set +CONFIG_BUSYBOX_EXEC_PATH="/proc/self/exe" +CONFIG_FEATURE_SYSLOG=y +CONFIG_FEATURE_HAVE_RPC=y + +# +# Build Options +# +# CONFIG_STATIC is not set +# CONFIG_PIE is not set +# CONFIG_NOMMU is not set +# CONFIG_BUILD_LIBBUSYBOX is not set +# CONFIG_FEATURE_INDIVIDUAL is not set +# CONFIG_FEATURE_SHARED_BUSYBOX is not set +CONFIG_LFS=y +CONFIG_CROSS_COMPILER_PREFIX="" +CONFIG_EXTRA_CFLAGS="" + +# +# Debugging Options +# +# CONFIG_DEBUG is not set +# CONFIG_DEBUG_PESSIMIZE is not set +# CONFIG_WERROR is not set +CONFIG_NO_DEBUG_LIB=y +# CONFIG_DMALLOC is not set +# CONFIG_EFENCE is not set + +# +# Installation Options ("make install" behavior) +# +CONFIG_INSTALL_APPLET_SYMLINKS=y +# CONFIG_INSTALL_APPLET_HARDLINKS is not set +# CONFIG_INSTALL_APPLET_SCRIPT_WRAPPERS is not set +# CONFIG_INSTALL_APPLET_DONT is not set +# CONFIG_INSTALL_SH_APPLET_SYMLINK is not set +# CONFIG_INSTALL_SH_APPLET_HARDLINK is not set +# CONFIG_INSTALL_SH_APPLET_SCRIPT_WRAPPER is not set +CONFIG_PREFIX="./_install" + +# +# Busybox Library Tuning +# +CONFIG_FEATURE_SYSTEMD=y +CONFIG_FEATURE_RTMINMAX=y +CONFIG_PASSWORD_MINLEN=6 +CONFIG_MD5_SIZE_VS_SPEED=2 +CONFIG_FEATURE_FAST_TOP=y +# CONFIG_FEATURE_ETC_NETWORKS is not set +CONFIG_FEATURE_USE_TERMIOS=y +CONFIG_FEATURE_EDITING=y +CONFIG_FEATURE_EDITING_MAX_LEN=1024 +# CONFIG_FEATURE_EDITING_VI is not set +CONFIG_FEATURE_EDITING_HISTORY=255 +CONFIG_FEATURE_EDITING_SAVEHISTORY=y +CONFIG_FEATURE_REVERSE_SEARCH=y +CONFIG_FEATURE_TAB_COMPLETION=y +# CONFIG_FEATURE_USERNAME_COMPLETION is not set +CONFIG_FEATURE_EDITING_FANCY_PROMPT=y +# CONFIG_FEATURE_EDITING_ASK_TERMINAL is not set +CONFIG_FEATURE_NON_POSIX_CP=y +# CONFIG_FEATURE_VERBOSE_CP_MESSAGE is not set +CONFIG_FEATURE_COPYBUF_KB=4 +CONFIG_FEATURE_SKIP_ROOTFS=y +CONFIG_MONOTONIC_SYSCALL=y +CONFIG_IOCTL_HEX2STR_ERROR=y +CONFIG_FEATURE_HWIB=y + +# +# Applets +# + +# +# Archival Utilities +# +CONFIG_FEATURE_SEAMLESS_XZ=y +CONFIG_FEATURE_SEAMLESS_LZMA=y +CONFIG_FEATURE_SEAMLESS_BZ2=y +CONFIG_FEATURE_SEAMLESS_GZ=y +CONFIG_FEATURE_SEAMLESS_Z=y +CONFIG_AR=y +CONFIG_FEATURE_AR_LONG_FILENAMES=y +CONFIG_FEATURE_AR_CREATE=y +CONFIG_BUNZIP2=y +CONFIG_BZIP2=y +CONFIG_CPIO=y +CONFIG_FEATURE_CPIO_O=y +CONFIG_FEATURE_CPIO_P=y +# CONFIG_DPKG is not set +# CONFIG_DPKG_DEB is not set +# CONFIG_FEATURE_DPKG_DEB_EXTRACT_ONLY is not set +CONFIG_GUNZIP=y +CONFIG_GZIP=y +CONFIG_FEATURE_GZIP_LONG_OPTIONS=y +CONFIG_LZOP=y +# CONFIG_LZOP_COMPR_HIGH is not set +CONFIG_RPM2CPIO=y +CONFIG_RPM=y +CONFIG_TAR=y +CONFIG_FEATURE_TAR_CREATE=y +CONFIG_FEATURE_TAR_AUTODETECT=y +CONFIG_FEATURE_TAR_FROM=y +CONFIG_FEATURE_TAR_OLDGNU_COMPATIBILITY=y +CONFIG_FEATURE_TAR_OLDSUN_COMPATIBILITY=y +CONFIG_FEATURE_TAR_GNU_EXTENSIONS=y +CONFIG_FEATURE_TAR_LONG_OPTIONS=y +CONFIG_FEATURE_TAR_TO_COMMAND=y +CONFIG_FEATURE_TAR_UNAME_GNAME=y +CONFIG_FEATURE_TAR_NOPRESERVE_TIME=y +# CONFIG_FEATURE_TAR_SELINUX is not set +# CONFIG_UNCOMPRESS is not set +CONFIG_UNLZMA=y +CONFIG_FEATURE_LZMA_FAST=y +CONFIG_LZMA=y +CONFIG_UNXZ=y +CONFIG_XZ=y +CONFIG_UNZIP=y + +# +# Coreutils +# +CONFIG_BASENAME=y +CONFIG_CAT=y +CONFIG_DATE=y +CONFIG_FEATURE_DATE_ISOFMT=y +# CONFIG_FEATURE_DATE_NANO is not set +CONFIG_FEATURE_DATE_COMPAT=y +CONFIG_ID=y +CONFIG_GROUPS=y +CONFIG_TEST=y +CONFIG_FEATURE_TEST_64=y +CONFIG_TOUCH=y +CONFIG_TR=y +CONFIG_FEATURE_TR_CLASSES=y +CONFIG_FEATURE_TR_EQUIV=y +CONFIG_BASE64=y +CONFIG_WHO=y +CONFIG_USERS=y +CONFIG_CAL=y +CONFIG_CATV=y +CONFIG_CHGRP=y +CONFIG_CHMOD=y +CONFIG_CHOWN=y +CONFIG_FEATURE_CHOWN_LONG_OPTIONS=y +CONFIG_CHROOT=y +CONFIG_CKSUM=y +CONFIG_COMM=y +CONFIG_CP=y +CONFIG_FEATURE_CP_LONG_OPTIONS=y +CONFIG_CUT=y +CONFIG_DD=y +CONFIG_FEATURE_DD_SIGNAL_HANDLING=y +CONFIG_FEATURE_DD_THIRD_STATUS_LINE=y +CONFIG_FEATURE_DD_IBS_OBS=y +CONFIG_DF=y +CONFIG_FEATURE_DF_FANCY=y +CONFIG_DIRNAME=y +CONFIG_DOS2UNIX=y +CONFIG_UNIX2DOS=y +CONFIG_DU=y +CONFIG_FEATURE_DU_DEFAULT_BLOCKSIZE_1K=y +CONFIG_ECHO=y +CONFIG_FEATURE_FANCY_ECHO=y +CONFIG_ENV=y +CONFIG_FEATURE_ENV_LONG_OPTIONS=y +CONFIG_EXPAND=y +CONFIG_FEATURE_EXPAND_LONG_OPTIONS=y +CONFIG_EXPR=y +CONFIG_EXPR_MATH_SUPPORT_64=y +CONFIG_FALSE=y +CONFIG_FOLD=y +CONFIG_FSYNC=y +CONFIG_HEAD=y +CONFIG_FEATURE_FANCY_HEAD=y +CONFIG_HOSTID=y +CONFIG_INSTALL=y +CONFIG_FEATURE_INSTALL_LONG_OPTIONS=y +CONFIG_LN=y +CONFIG_LOGNAME=y +CONFIG_LS=y +CONFIG_FEATURE_LS_FILETYPES=y +CONFIG_FEATURE_LS_FOLLOWLINKS=y +CONFIG_FEATURE_LS_RECURSIVE=y +CONFIG_FEATURE_LS_SORTFILES=y +CONFIG_FEATURE_LS_TIMESTAMPS=y +CONFIG_FEATURE_LS_USERNAME=y +CONFIG_FEATURE_LS_COLOR=y +CONFIG_FEATURE_LS_COLOR_IS_DEFAULT=y +CONFIG_MD5SUM=y +CONFIG_MKDIR=y +CONFIG_FEATURE_MKDIR_LONG_OPTIONS=y +CONFIG_MKFIFO=y +CONFIG_MKNOD=y +CONFIG_MV=y +CONFIG_FEATURE_MV_LONG_OPTIONS=y +CONFIG_NICE=y +CONFIG_NOHUP=y +CONFIG_OD=y +CONFIG_PRINTENV=y +CONFIG_PRINTF=y +CONFIG_PWD=y +CONFIG_READLINK=y +CONFIG_FEATURE_READLINK_FOLLOW=y +CONFIG_REALPATH=y +CONFIG_RM=y +CONFIG_RMDIR=y +CONFIG_FEATURE_RMDIR_LONG_OPTIONS=y +CONFIG_SEQ=y +CONFIG_SHA1SUM=y +CONFIG_SHA256SUM=y +CONFIG_SHA512SUM=y +CONFIG_SLEEP=y +CONFIG_FEATURE_FANCY_SLEEP=y +CONFIG_FEATURE_FLOAT_SLEEP=y +CONFIG_SORT=y +CONFIG_FEATURE_SORT_BIG=y +CONFIG_SPLIT=y +CONFIG_FEATURE_SPLIT_FANCY=y +CONFIG_STAT=y +CONFIG_FEATURE_STAT_FORMAT=y +CONFIG_STTY=y +CONFIG_SUM=y +CONFIG_SYNC=y +CONFIG_TAC=y +CONFIG_TAIL=y +CONFIG_FEATURE_FANCY_TAIL=y +CONFIG_TEE=y +CONFIG_FEATURE_TEE_USE_BLOCK_IO=y +CONFIG_TRUE=y +CONFIG_TTY=y +CONFIG_UNAME=y +CONFIG_UNEXPAND=y +CONFIG_FEATURE_UNEXPAND_LONG_OPTIONS=y +CONFIG_UNIQ=y +CONFIG_USLEEP=y +CONFIG_UUDECODE=y +CONFIG_UUENCODE=y +CONFIG_WC=y +CONFIG_FEATURE_WC_LARGE=y +CONFIG_WHOAMI=y +CONFIG_YES=y + +# +# Common options for cp and mv +# +CONFIG_FEATURE_PRESERVE_HARDLINKS=y + +# +# Common options for ls, more and telnet +# +CONFIG_FEATURE_AUTOWIDTH=y + +# +# Common options for df, du, ls +# +CONFIG_FEATURE_HUMAN_READABLE=y + +# +# Common options for md5sum, sha1sum, sha256sum, sha512sum +# +CONFIG_FEATURE_MD5_SHA1_SUM_CHECK=y + +# +# Console Utilities +# +CONFIG_CHVT=y +CONFIG_FGCONSOLE=y +CONFIG_CLEAR=y +CONFIG_DEALLOCVT=y +CONFIG_DUMPKMAP=y +CONFIG_KBD_MODE=y +CONFIG_LOADFONT=y +CONFIG_LOADKMAP=y +CONFIG_OPENVT=y +CONFIG_RESET=y +CONFIG_RESIZE=y +CONFIG_FEATURE_RESIZE_PRINT=y +CONFIG_SETCONSOLE=y +CONFIG_FEATURE_SETCONSOLE_LONG_OPTIONS=y +CONFIG_SETFONT=y +CONFIG_FEATURE_SETFONT_TEXTUAL_MAP=y +CONFIG_DEFAULT_SETFONT_DIR="" +CONFIG_SETKEYCODES=y +CONFIG_SETLOGCONS=y +CONFIG_SHOWKEY=y + +# +# Common options for loadfont and setfont +# +CONFIG_FEATURE_LOADFONT_PSF2=y +CONFIG_FEATURE_LOADFONT_RAW=y + +# +# Debian Utilities +# +CONFIG_MKTEMP=y +CONFIG_PIPE_PROGRESS=y +CONFIG_RUN_PARTS=y +CONFIG_FEATURE_RUN_PARTS_LONG_OPTIONS=y +CONFIG_FEATURE_RUN_PARTS_FANCY=y +CONFIG_START_STOP_DAEMON=y +CONFIG_FEATURE_START_STOP_DAEMON_FANCY=y +CONFIG_FEATURE_START_STOP_DAEMON_LONG_OPTIONS=y +CONFIG_WHICH=y + +# +# Editors +# +CONFIG_PATCH=y +CONFIG_VI=y +CONFIG_FEATURE_VI_MAX_LEN=4096 +CONFIG_FEATURE_VI_8BIT=y +CONFIG_FEATURE_VI_COLON=y +CONFIG_FEATURE_VI_YANKMARK=y +CONFIG_FEATURE_VI_SEARCH=y +# CONFIG_FEATURE_VI_REGEX_SEARCH is not set +CONFIG_FEATURE_VI_USE_SIGNALS=y +CONFIG_FEATURE_VI_DOT_CMD=y +CONFIG_FEATURE_VI_READONLY=y +CONFIG_FEATURE_VI_SETOPTS=y +CONFIG_FEATURE_VI_SET=y +CONFIG_FEATURE_VI_WIN_RESIZE=y +CONFIG_FEATURE_VI_ASK_TERMINAL=y +CONFIG_FEATURE_VI_OPTIMIZE_CURSOR=y +CONFIG_AWK=y +CONFIG_FEATURE_AWK_LIBM=y +CONFIG_CMP=y +CONFIG_DIFF=y +CONFIG_FEATURE_DIFF_LONG_OPTIONS=y +CONFIG_FEATURE_DIFF_DIR=y +CONFIG_ED=y +CONFIG_SED=y +CONFIG_FEATURE_ALLOW_EXEC=y + +# +# Finding Utilities +# +CONFIG_FIND=y +CONFIG_FEATURE_FIND_PRINT0=y +CONFIG_FEATURE_FIND_MTIME=y +CONFIG_FEATURE_FIND_MMIN=y +CONFIG_FEATURE_FIND_PERM=y +CONFIG_FEATURE_FIND_TYPE=y +CONFIG_FEATURE_FIND_XDEV=y +CONFIG_FEATURE_FIND_MAXDEPTH=y +CONFIG_FEATURE_FIND_NEWER=y +CONFIG_FEATURE_FIND_INUM=y +CONFIG_FEATURE_FIND_EXEC=y +CONFIG_FEATURE_FIND_USER=y +CONFIG_FEATURE_FIND_GROUP=y +CONFIG_FEATURE_FIND_NOT=y +CONFIG_FEATURE_FIND_DEPTH=y +CONFIG_FEATURE_FIND_PAREN=y +CONFIG_FEATURE_FIND_SIZE=y +CONFIG_FEATURE_FIND_PRUNE=y +CONFIG_FEATURE_FIND_DELETE=y +CONFIG_FEATURE_FIND_PATH=y +CONFIG_FEATURE_FIND_REGEX=y +# CONFIG_FEATURE_FIND_CONTEXT is not set +CONFIG_FEATURE_FIND_LINKS=y +CONFIG_GREP=y +CONFIG_FEATURE_GREP_EGREP_ALIAS=y +CONFIG_FEATURE_GREP_FGREP_ALIAS=y +CONFIG_FEATURE_GREP_CONTEXT=y +CONFIG_XARGS=y +CONFIG_FEATURE_XARGS_SUPPORT_CONFIRMATION=y +CONFIG_FEATURE_XARGS_SUPPORT_QUOTES=y +CONFIG_FEATURE_XARGS_SUPPORT_TERMOPT=y +CONFIG_FEATURE_XARGS_SUPPORT_ZERO_TERM=y + +# +# Init Utilities +# +CONFIG_BOOTCHARTD=y +CONFIG_FEATURE_BOOTCHARTD_BLOATED_HEADER=y +CONFIG_FEATURE_BOOTCHARTD_CONFIG_FILE=y +CONFIG_HALT=y +# CONFIG_FEATURE_CALL_TELINIT is not set +CONFIG_TELINIT_PATH="" +CONFIG_INIT=y +CONFIG_FEATURE_USE_INITTAB=y +# CONFIG_FEATURE_KILL_REMOVED is not set +CONFIG_FEATURE_KILL_DELAY=0 +CONFIG_FEATURE_INIT_SCTTY=y +CONFIG_FEATURE_INIT_SYSLOG=y +CONFIG_FEATURE_EXTRA_QUIET=y +CONFIG_FEATURE_INIT_COREDUMPS=y +CONFIG_FEATURE_INITRD=y +CONFIG_INIT_TERMINAL_TYPE="linux" +CONFIG_MESG=y +CONFIG_FEATURE_MESG_ENABLE_ONLY_GROUP=y + +# +# Login/Password Management Utilities +# +CONFIG_ADD_SHELL=y +CONFIG_REMOVE_SHELL=y +CONFIG_FEATURE_SHADOWPASSWDS=y +CONFIG_USE_BB_PWD_GRP=y +CONFIG_USE_BB_SHADOW=y +CONFIG_USE_BB_CRYPT=y +CONFIG_USE_BB_CRYPT_SHA=y +CONFIG_ADDUSER=y +CONFIG_FEATURE_ADDUSER_LONG_OPTIONS=y +# CONFIG_FEATURE_CHECK_NAMES is not set +CONFIG_FIRST_SYSTEM_ID=100 +CONFIG_LAST_SYSTEM_ID=999 +CONFIG_ADDGROUP=y +CONFIG_FEATURE_ADDGROUP_LONG_OPTIONS=y +CONFIG_FEATURE_ADDUSER_TO_GROUP=y +CONFIG_DELUSER=y +CONFIG_DELGROUP=y +CONFIG_FEATURE_DEL_USER_FROM_GROUP=y +CONFIG_GETTY=y +CONFIG_LOGIN=y +# CONFIG_PAM is not set +CONFIG_LOGIN_SCRIPTS=y +CONFIG_FEATURE_NOLOGIN=y +CONFIG_FEATURE_SECURETTY=y +CONFIG_PASSWD=y +CONFIG_FEATURE_PASSWD_WEAK_CHECK=y +CONFIG_CRYPTPW=y +CONFIG_CHPASSWD=y +CONFIG_SU=y +CONFIG_FEATURE_SU_SYSLOG=y +CONFIG_FEATURE_SU_CHECKS_SHELLS=y +CONFIG_SULOGIN=y +CONFIG_VLOCK=y + +# +# Linux Ext2 FS Progs +# +CONFIG_CHATTR=y +CONFIG_FSCK=y +CONFIG_LSATTR=y +# CONFIG_TUNE2FS is not set + +# +# Linux Module Utilities +# +# CONFIG_MODINFO is not set +# CONFIG_MODPROBE_SMALL is not set +# CONFIG_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE is not set +# CONFIG_FEATURE_MODPROBE_SMALL_CHECK_ALREADY_LOADED is not set +CONFIG_INSMOD=y +CONFIG_RMMOD=y +CONFIG_LSMOD=y +# CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT is not set +CONFIG_MODPROBE=y +# CONFIG_FEATURE_MODPROBE_BLACKLIST is not set +# CONFIG_DEPMOD is not set + +# +# Options common to multiple modutils +# +# CONFIG_FEATURE_2_4_MODULES is not set +# CONFIG_FEATURE_INSMOD_TRY_MMAP is not set +# CONFIG_FEATURE_INSMOD_VERSION_CHECKING is not set +# CONFIG_FEATURE_INSMOD_KSYMOOPS_SYMBOLS is not set +# CONFIG_FEATURE_INSMOD_LOADINKMEM is not set +# CONFIG_FEATURE_INSMOD_LOAD_MAP is not set +# CONFIG_FEATURE_INSMOD_LOAD_MAP_FULL is not set +CONFIG_FEATURE_CHECK_TAINTED_MODULE=y +CONFIG_FEATURE_MODUTILS_ALIAS=y +CONFIG_FEATURE_MODUTILS_SYMBOLS=y +CONFIG_DEFAULT_MODULES_DIR="/lib/modules" +CONFIG_DEFAULT_DEPMOD_FILE="modules.dep" + +# +# Linux System Utilities +# +CONFIG_BLOCKDEV=y +CONFIG_REV=y +CONFIG_ACPID=y +CONFIG_FEATURE_ACPID_COMPAT=y +CONFIG_BLKID=y +# CONFIG_FEATURE_BLKID_TYPE is not set +CONFIG_DMESG=y +CONFIG_FEATURE_DMESG_PRETTY=y +CONFIG_FBSET=y +CONFIG_FEATURE_FBSET_FANCY=y +CONFIG_FEATURE_FBSET_READMODE=y +CONFIG_FDFLUSH=y +CONFIG_FDFORMAT=y +CONFIG_FDISK=y +# CONFIG_FDISK_SUPPORT_LARGE_DISKS is not set +CONFIG_FEATURE_FDISK_WRITABLE=y +# CONFIG_FEATURE_AIX_LABEL is not set +# CONFIG_FEATURE_SGI_LABEL is not set +# CONFIG_FEATURE_SUN_LABEL is not set +# CONFIG_FEATURE_OSF_LABEL is not set +# CONFIG_FEATURE_GPT_LABEL is not set +CONFIG_FEATURE_FDISK_ADVANCED=y +CONFIG_FINDFS=y +CONFIG_FLOCK=y +CONFIG_FREERAMDISK=y +CONFIG_FSCK_MINIX=y +CONFIG_MKFS_EXT2=y +CONFIG_MKFS_MINIX=y +CONFIG_FEATURE_MINIX2=y +# CONFIG_MKFS_REISER is not set +CONFIG_MKFS_VFAT=y +CONFIG_GETOPT=y +CONFIG_FEATURE_GETOPT_LONG=y +CONFIG_HEXDUMP=y +CONFIG_FEATURE_HEXDUMP_REVERSE=y +CONFIG_HD=y +CONFIG_HWCLOCK=y +CONFIG_FEATURE_HWCLOCK_LONG_OPTIONS=y +CONFIG_FEATURE_HWCLOCK_ADJTIME_FHS=y +CONFIG_IPCRM=y +CONFIG_IPCS=y +CONFIG_LOSETUP=y +CONFIG_LSPCI=y +CONFIG_LSUSB=y +CONFIG_MDEV=y +CONFIG_FEATURE_MDEV_CONF=y +CONFIG_FEATURE_MDEV_RENAME=y +CONFIG_FEATURE_MDEV_RENAME_REGEXP=y +CONFIG_FEATURE_MDEV_EXEC=y +CONFIG_FEATURE_MDEV_LOAD_FIRMWARE=y +CONFIG_MKSWAP=y +CONFIG_FEATURE_MKSWAP_UUID=y +CONFIG_MORE=y +CONFIG_MOUNT=y +CONFIG_FEATURE_MOUNT_FAKE=y +CONFIG_FEATURE_MOUNT_VERBOSE=y +# CONFIG_FEATURE_MOUNT_HELPERS is not set +CONFIG_FEATURE_MOUNT_LABEL=y +CONFIG_FEATURE_MOUNT_NFS=y +CONFIG_FEATURE_MOUNT_CIFS=y +CONFIG_FEATURE_MOUNT_FLAGS=y +CONFIG_FEATURE_MOUNT_FSTAB=y +CONFIG_PIVOT_ROOT=y +CONFIG_RDATE=y +CONFIG_RDEV=y +CONFIG_READPROFILE=y +CONFIG_RTCWAKE=y +CONFIG_SCRIPT=y +CONFIG_SCRIPTREPLAY=y +CONFIG_SETARCH=y +CONFIG_SWAPONOFF=y +CONFIG_FEATURE_SWAPON_PRI=y +CONFIG_SWITCH_ROOT=y +CONFIG_UMOUNT=y +CONFIG_FEATURE_UMOUNT_ALL=y + +# +# Common options for mount/umount +# +CONFIG_FEATURE_MOUNT_LOOP=y +CONFIG_FEATURE_MOUNT_LOOP_CREATE=y +# CONFIG_FEATURE_MTAB_SUPPORT is not set +CONFIG_VOLUMEID=y + +# +# Filesystem/Volume identification +# +CONFIG_FEATURE_VOLUMEID_EXT=y +CONFIG_FEATURE_VOLUMEID_BTRFS=y +CONFIG_FEATURE_VOLUMEID_REISERFS=y +CONFIG_FEATURE_VOLUMEID_FAT=y +CONFIG_FEATURE_VOLUMEID_HFS=y +CONFIG_FEATURE_VOLUMEID_JFS=y +CONFIG_FEATURE_VOLUMEID_XFS=y +CONFIG_FEATURE_VOLUMEID_NTFS=y +CONFIG_FEATURE_VOLUMEID_ISO9660=y +CONFIG_FEATURE_VOLUMEID_UDF=y +CONFIG_FEATURE_VOLUMEID_LUKS=y +CONFIG_FEATURE_VOLUMEID_LINUXSWAP=y +CONFIG_FEATURE_VOLUMEID_CRAMFS=y +CONFIG_FEATURE_VOLUMEID_ROMFS=y +CONFIG_FEATURE_VOLUMEID_SYSV=y +CONFIG_FEATURE_VOLUMEID_OCFS2=y +CONFIG_FEATURE_VOLUMEID_LINUXRAID=y + +# +# Miscellaneous Utilities +# +# CONFIG_CONSPY is not set +CONFIG_LESS=y +CONFIG_FEATURE_LESS_MAXLINES=9999999 +CONFIG_FEATURE_LESS_BRACKETS=y +CONFIG_FEATURE_LESS_FLAGS=y +CONFIG_FEATURE_LESS_MARKS=y +CONFIG_FEATURE_LESS_REGEXP=y +CONFIG_FEATURE_LESS_WINCH=y +CONFIG_FEATURE_LESS_ASK_TERMINAL=y +CONFIG_FEATURE_LESS_DASHCMD=y +CONFIG_FEATURE_LESS_LINENUMS=y +# CONFIG_NANDWRITE is not set +# CONFIG_NANDDUMP is not set +CONFIG_SETSERIAL=y +CONFIG_UBIATTACH=y +CONFIG_UBIDETACH=y +CONFIG_UBIMKVOL=y +CONFIG_UBIRMVOL=y +CONFIG_UBIRSVOL=y +CONFIG_UBIUPDATEVOL=y +CONFIG_ADJTIMEX=y +# CONFIG_BBCONFIG is not set +# CONFIG_FEATURE_COMPRESS_BBCONFIG is not set +CONFIG_BEEP=y +CONFIG_FEATURE_BEEP_FREQ=4000 +CONFIG_FEATURE_BEEP_LENGTH_MS=30 +CONFIG_CHAT=y +CONFIG_FEATURE_CHAT_NOFAIL=y +# CONFIG_FEATURE_CHAT_TTY_HIFI is not set +CONFIG_FEATURE_CHAT_IMPLICIT_CR=y +CONFIG_FEATURE_CHAT_SWALLOW_OPTS=y +CONFIG_FEATURE_CHAT_SEND_ESCAPES=y +CONFIG_FEATURE_CHAT_VAR_ABORT_LEN=y +CONFIG_FEATURE_CHAT_CLR_ABORT=y +CONFIG_CHRT=y +CONFIG_CROND=y +CONFIG_FEATURE_CROND_D=y +CONFIG_FEATURE_CROND_CALL_SENDMAIL=y +CONFIG_FEATURE_CROND_DIR="/var/spool/cron" +CONFIG_CRONTAB=y +CONFIG_DC=y +CONFIG_FEATURE_DC_LIBM=y +# CONFIG_DEVFSD is not set +# CONFIG_DEVFSD_MODLOAD is not set +# CONFIG_DEVFSD_FG_NP is not set +# CONFIG_DEVFSD_VERBOSE is not set +# CONFIG_FEATURE_DEVFS is not set +CONFIG_DEVMEM=y +CONFIG_EJECT=y +CONFIG_FEATURE_EJECT_SCSI=y +CONFIG_FBSPLASH=y +# CONFIG_FLASHCP is not set +# CONFIG_FLASH_LOCK is not set +# CONFIG_FLASH_UNLOCK is not set +# CONFIG_FLASH_ERASEALL is not set +CONFIG_IONICE=y +# CONFIG_INOTIFYD is not set +CONFIG_LAST=y +# CONFIG_FEATURE_LAST_SMALL is not set +CONFIG_FEATURE_LAST_FANCY=y +CONFIG_HDPARM=y +CONFIG_FEATURE_HDPARM_GET_IDENTITY=y +CONFIG_FEATURE_HDPARM_HDIO_SCAN_HWIF=y +CONFIG_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF=y +CONFIG_FEATURE_HDPARM_HDIO_DRIVE_RESET=y +CONFIG_FEATURE_HDPARM_HDIO_TRISTATE_HWIF=y +CONFIG_FEATURE_HDPARM_HDIO_GETSET_DMA=y +CONFIG_MAKEDEVS=y +# CONFIG_FEATURE_MAKEDEVS_LEAF is not set +CONFIG_FEATURE_MAKEDEVS_TABLE=y +CONFIG_MAN=y +CONFIG_MICROCOM=y +CONFIG_MOUNTPOINT=y +CONFIG_MT=y +CONFIG_RAIDAUTORUN=y +CONFIG_READAHEAD=y +# CONFIG_RFKILL is not set +CONFIG_RUNLEVEL=y +CONFIG_RX=y +CONFIG_SETSID=y +CONFIG_STRINGS=y +# CONFIG_TASKSET is not set +# CONFIG_FEATURE_TASKSET_FANCY is not set +CONFIG_TIME=y +CONFIG_TIMEOUT=y +CONFIG_TTYSIZE=y +CONFIG_VOLNAME=y +CONFIG_WALL=y +CONFIG_WATCHDOG=y + +# +# Networking Utilities +# +CONFIG_NAMEIF=y +CONFIG_FEATURE_NAMEIF_EXTENDED=y +CONFIG_NBDCLIENT=y +CONFIG_NC=y +CONFIG_NC_SERVER=y +CONFIG_NC_EXTRA=y +# CONFIG_NC_110_COMPAT is not set +CONFIG_PING=y +CONFIG_PING6=y +CONFIG_FEATURE_FANCY_PING=y +CONFIG_WHOIS=y +CONFIG_FEATURE_IPV6=y +# CONFIG_FEATURE_UNIX_LOCAL is not set +CONFIG_FEATURE_PREFER_IPV4_ADDRESS=y +# CONFIG_VERBOSE_RESOLUTION_ERRORS is not set +CONFIG_ARP=y +CONFIG_ARPING=y +CONFIG_BRCTL=y +CONFIG_FEATURE_BRCTL_FANCY=y +CONFIG_FEATURE_BRCTL_SHOW=y +CONFIG_DNSD=y +CONFIG_ETHER_WAKE=y +CONFIG_FAKEIDENTD=y +CONFIG_FTPD=y +CONFIG_FEATURE_FTP_WRITE=y +CONFIG_FEATURE_FTPD_ACCEPT_BROKEN_LIST=y +CONFIG_FTPGET=y +CONFIG_FTPPUT=y +CONFIG_FEATURE_FTPGETPUT_LONG_OPTIONS=y +CONFIG_HOSTNAME=y +CONFIG_HTTPD=y +CONFIG_FEATURE_HTTPD_RANGES=y +CONFIG_FEATURE_HTTPD_USE_SENDFILE=y +CONFIG_FEATURE_HTTPD_SETUID=y +CONFIG_FEATURE_HTTPD_BASIC_AUTH=y +CONFIG_FEATURE_HTTPD_AUTH_MD5=y +CONFIG_FEATURE_HTTPD_CGI=y +CONFIG_FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR=y +CONFIG_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV=y +CONFIG_FEATURE_HTTPD_ENCODE_URL_STR=y +CONFIG_FEATURE_HTTPD_ERROR_PAGES=y +CONFIG_FEATURE_HTTPD_PROXY=y +CONFIG_FEATURE_HTTPD_GZIP=y +CONFIG_IFCONFIG=y +CONFIG_FEATURE_IFCONFIG_STATUS=y +CONFIG_FEATURE_IFCONFIG_SLIP=y +CONFIG_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ=y +CONFIG_FEATURE_IFCONFIG_HW=y +CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS=y +CONFIG_IFENSLAVE=y +CONFIG_IFPLUGD=y +CONFIG_IFUPDOWN=y +CONFIG_IFUPDOWN_IFSTATE_PATH="/var/run/ifstate" +# CONFIG_FEATURE_IFUPDOWN_IP is not set +# CONFIG_FEATURE_IFUPDOWN_IP_BUILTIN is not set +CONFIG_FEATURE_IFUPDOWN_IFCONFIG_BUILTIN=y +CONFIG_FEATURE_IFUPDOWN_IPV4=y +CONFIG_FEATURE_IFUPDOWN_IPV6=y +CONFIG_FEATURE_IFUPDOWN_MAPPING=y +# CONFIG_FEATURE_IFUPDOWN_EXTERNAL_DHCP is not set +CONFIG_INETD=y +CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_ECHO=y +CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DISCARD=y +CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_TIME=y +CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DAYTIME=y +CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_CHARGEN=y +CONFIG_FEATURE_INETD_RPC=y +CONFIG_IP=y +CONFIG_FEATURE_IP_ADDRESS=y +CONFIG_FEATURE_IP_LINK=y +CONFIG_FEATURE_IP_ROUTE=y +CONFIG_FEATURE_IP_TUNNEL=y +CONFIG_FEATURE_IP_RULE=y +CONFIG_FEATURE_IP_SHORT_FORMS=y +# CONFIG_FEATURE_IP_RARE_PROTOCOLS is not set +CONFIG_IPADDR=y +CONFIG_IPLINK=y +CONFIG_IPROUTE=y +CONFIG_IPTUNNEL=y +CONFIG_IPRULE=y +CONFIG_IPCALC=y +CONFIG_FEATURE_IPCALC_FANCY=y +CONFIG_FEATURE_IPCALC_LONG_OPTIONS=y +CONFIG_NETSTAT=y +CONFIG_FEATURE_NETSTAT_WIDE=y +CONFIG_FEATURE_NETSTAT_PRG=y +CONFIG_NSLOOKUP=y +CONFIG_NTPD=y +CONFIG_FEATURE_NTPD_SERVER=y +CONFIG_PSCAN=y +CONFIG_ROUTE=y +CONFIG_SLATTACH=y +CONFIG_TCPSVD=y +CONFIG_TELNET=y +CONFIG_FEATURE_TELNET_TTYPE=y +CONFIG_FEATURE_TELNET_AUTOLOGIN=y +CONFIG_TELNETD=y +CONFIG_FEATURE_TELNETD_STANDALONE=y +CONFIG_FEATURE_TELNETD_INETD_WAIT=y +CONFIG_TFTP=y +CONFIG_TFTPD=y + +# +# Common options for tftp/tftpd +# +CONFIG_FEATURE_TFTP_GET=y +CONFIG_FEATURE_TFTP_PUT=y +CONFIG_FEATURE_TFTP_BLOCKSIZE=y +CONFIG_FEATURE_TFTP_PROGRESS_BAR=y +# CONFIG_TFTP_DEBUG is not set +CONFIG_TRACEROUTE=y +CONFIG_TRACEROUTE6=y +CONFIG_FEATURE_TRACEROUTE_VERBOSE=y +# CONFIG_FEATURE_TRACEROUTE_SOURCE_ROUTE is not set +# CONFIG_FEATURE_TRACEROUTE_USE_ICMP is not set +CONFIG_TUNCTL=y +CONFIG_FEATURE_TUNCTL_UG=y +CONFIG_UDHCPD=y +CONFIG_DHCPRELAY=y +CONFIG_DUMPLEASES=y +CONFIG_FEATURE_UDHCPD_WRITE_LEASES_EARLY=y +# CONFIG_FEATURE_UDHCPD_BASE_IP_ON_MAC is not set +CONFIG_DHCPD_LEASES_FILE="/var/lib/misc/udhcpd.leases" +CONFIG_UDHCPC=y +CONFIG_FEATURE_UDHCPC_ARPING=y +# CONFIG_FEATURE_UDHCP_PORT is not set +CONFIG_UDHCP_DEBUG=9 +CONFIG_FEATURE_UDHCP_RFC3397=y +CONFIG_FEATURE_UDHCP_8021Q=y +CONFIG_UDHCPC_DEFAULT_SCRIPT="/usr/share/udhcpc/default.script" +CONFIG_UDHCPC_SLACK_FOR_BUGGY_SERVERS=80 +CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS="-R -n" +CONFIG_UDPSVD=y +CONFIG_VCONFIG=y +CONFIG_WGET=y +CONFIG_FEATURE_WGET_STATUSBAR=y +CONFIG_FEATURE_WGET_AUTHENTICATION=y +CONFIG_FEATURE_WGET_LONG_OPTIONS=y +CONFIG_FEATURE_WGET_TIMEOUT=y +CONFIG_ZCIP=y + +# +# Print Utilities +# +CONFIG_LPD=y +CONFIG_LPR=y +CONFIG_LPQ=y + +# +# Mail Utilities +# +CONFIG_MAKEMIME=y +CONFIG_FEATURE_MIME_CHARSET="us-ascii" +CONFIG_POPMAILDIR=y +CONFIG_FEATURE_POPMAILDIR_DELIVERY=y +CONFIG_REFORMIME=y +CONFIG_FEATURE_REFORMIME_COMPAT=y +CONFIG_SENDMAIL=y + +# +# Process Utilities +# +CONFIG_IOSTAT=y +CONFIG_MPSTAT=y +CONFIG_NMETER=y +CONFIG_PMAP=y +CONFIG_POWERTOP=y +CONFIG_PSTREE=y +CONFIG_PWDX=y +CONFIG_SMEMCAP=y +CONFIG_UPTIME=y +CONFIG_FEATURE_UPTIME_UTMP_SUPPORT=y +CONFIG_FREE=y +CONFIG_FUSER=y +CONFIG_KILL=y +CONFIG_KILLALL=y +CONFIG_KILLALL5=y +CONFIG_PGREP=y +CONFIG_PIDOF=y +CONFIG_FEATURE_PIDOF_SINGLE=y +CONFIG_FEATURE_PIDOF_OMIT=y +CONFIG_PKILL=y +CONFIG_PS=y +CONFIG_FEATURE_PS_WIDE=y +# CONFIG_FEATURE_PS_TIME is not set +# CONFIG_FEATURE_PS_ADDITIONAL_COLUMNS is not set +# CONFIG_FEATURE_PS_UNUSUAL_SYSTEMS is not set +CONFIG_RENICE=y +CONFIG_BB_SYSCTL=y +CONFIG_TOP=y +CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE=y +CONFIG_FEATURE_TOP_CPU_GLOBAL_PERCENTS=y +CONFIG_FEATURE_TOP_SMP_CPU=y +CONFIG_FEATURE_TOP_DECIMALS=y +CONFIG_FEATURE_TOP_SMP_PROCESS=y +CONFIG_FEATURE_TOPMEM=y +CONFIG_FEATURE_SHOW_THREADS=y +CONFIG_WATCH=y + +# +# Runit Utilities +# +CONFIG_RUNSV=y +CONFIG_RUNSVDIR=y +# CONFIG_FEATURE_RUNSVDIR_LOG is not set +CONFIG_SV=y +CONFIG_SV_DEFAULT_SERVICE_DIR="/var/service" +CONFIG_SVLOGD=y +CONFIG_CHPST=y +CONFIG_SETUIDGID=y +CONFIG_ENVUIDGID=y +CONFIG_ENVDIR=y +CONFIG_SOFTLIMIT=y +# CONFIG_CHCON is not set +# CONFIG_FEATURE_CHCON_LONG_OPTIONS is not set +# CONFIG_GETENFORCE is not set +# CONFIG_GETSEBOOL is not set +# CONFIG_LOAD_POLICY is not set +# CONFIG_MATCHPATHCON is not set +# CONFIG_RESTORECON is not set +# CONFIG_RUNCON is not set +# CONFIG_FEATURE_RUNCON_LONG_OPTIONS is not set +# CONFIG_SELINUXENABLED is not set +# CONFIG_SETENFORCE is not set +# CONFIG_SETFILES is not set +# CONFIG_FEATURE_SETFILES_CHECK_OPTION is not set +# CONFIG_SETSEBOOL is not set +# CONFIG_SESTATUS is not set + +# +# Shells +# +CONFIG_ASH=y +CONFIG_ASH_BASH_COMPAT=y +# CONFIG_ASH_IDLE_TIMEOUT is not set +CONFIG_ASH_JOB_CONTROL=y +CONFIG_ASH_ALIAS=y +CONFIG_ASH_GETOPTS=y +CONFIG_ASH_BUILTIN_ECHO=y +CONFIG_ASH_BUILTIN_PRINTF=y +CONFIG_ASH_BUILTIN_TEST=y +CONFIG_ASH_CMDCMD=y +# CONFIG_ASH_MAIL is not set +CONFIG_ASH_OPTIMIZE_FOR_SIZE=y +CONFIG_ASH_RANDOM_SUPPORT=y +CONFIG_ASH_EXPAND_PRMT=y +CONFIG_CTTYHACK=y +CONFIG_HUSH=y +CONFIG_HUSH_BASH_COMPAT=y +CONFIG_HUSH_BRACE_EXPANSION=y +CONFIG_HUSH_HELP=y +CONFIG_HUSH_INTERACTIVE=y +CONFIG_HUSH_SAVEHISTORY=y +CONFIG_HUSH_JOB=y +CONFIG_HUSH_TICK=y +CONFIG_HUSH_IF=y +CONFIG_HUSH_LOOPS=y +CONFIG_HUSH_CASE=y +CONFIG_HUSH_FUNCTIONS=y +CONFIG_HUSH_LOCAL=y +CONFIG_HUSH_RANDOM_SUPPORT=y +CONFIG_HUSH_EXPORT_N=y +CONFIG_HUSH_MODE_X=y +# CONFIG_MSH is not set +CONFIG_FEATURE_SH_IS_ASH=y +# CONFIG_FEATURE_SH_IS_HUSH is not set +# CONFIG_FEATURE_SH_IS_NONE is not set +# CONFIG_FEATURE_BASH_IS_ASH is not set +# CONFIG_FEATURE_BASH_IS_HUSH is not set +CONFIG_FEATURE_BASH_IS_NONE=y +CONFIG_SH_MATH_SUPPORT=y +CONFIG_SH_MATH_SUPPORT_64=y +CONFIG_FEATURE_SH_EXTRA_QUIET=y +# CONFIG_FEATURE_SH_STANDALONE is not set +# CONFIG_FEATURE_SH_NOFORK is not set +CONFIG_FEATURE_SH_HISTFILESIZE=y + +# +# System Logging Utilities +# +CONFIG_SYSLOGD=y +CONFIG_FEATURE_ROTATE_LOGFILE=y +CONFIG_FEATURE_REMOTE_LOG=y +CONFIG_FEATURE_SYSLOGD_DUP=y +CONFIG_FEATURE_SYSLOGD_CFG=y +CONFIG_FEATURE_SYSLOGD_READ_BUFFER_SIZE=256 +CONFIG_FEATURE_IPC_SYSLOG=y +CONFIG_FEATURE_IPC_SYSLOG_BUFFER_SIZE=16 +CONFIG_LOGREAD=y +CONFIG_FEATURE_LOGREAD_REDUCED_LOCKING=y +CONFIG_KLOGD=y +CONFIG_FEATURE_KLOGD_KLOGCTL=y +CONFIG_LOGGER=y diff --git a/meta-fsl-ppc/recipes-append/busybox/busybox-1.19.4/inetd b/meta-fsl-ppc/recipes-append/busybox/busybox-1.19.4/inetd new file mode 100644 index 00000000..cf50bcd5 --- /dev/null +++ b/meta-fsl-ppc/recipes-append/busybox/busybox-1.19.4/inetd @@ -0,0 +1,33 @@ +#!/bin/sh +# +# start/stop inetd super server. + +if ! [ -x /usr/sbin/inetd ]; then + exit 0 +fi + +case "$1" in + start) + echo -n "Starting internet superserver:" + echo -n " inetd" ; start-stop-daemon -S -x /usr/sbin/inetd > /dev/null + echo "." + ;; + stop) + echo -n "Stopping internet superserver:" + echo -n " inetd" ; start-stop-daemon -K -x /usr/sbin/inetd > /dev/null + echo "." + ;; + restart) + echo -n "Restarting internet superserver:" + echo -n " inetd " + killall -HUP inetd + echo "." + ;; + *) + echo "Usage: /etc/init.d/inetd {start|stop|restart}" + exit 1 + ;; +esac + +exit 0 + diff --git a/meta-fsl-ppc/recipes-append/busybox/busybox-1.19.4/inetd.conf b/meta-fsl-ppc/recipes-append/busybox/busybox-1.19.4/inetd.conf new file mode 100644 index 00000000..b02fe850 --- /dev/null +++ b/meta-fsl-ppc/recipes-append/busybox/busybox-1.19.4/inetd.conf @@ -0,0 +1,20 @@ +# /etc/inetd.conf: see inetd(8) for further informations. +# +# Internet server configuration database +# +# If you want to disable an entry so it isn't touched during +# package updates just comment it out with a single '#' character. +# +# +# +#:INTERNAL: Internal services +#echo stream tcp nowait root internal +#echo dgram udp wait root internal +#chargen stream tcp nowait root internal +#chargen dgram udp wait root internal +#discard stream tcp nowait root internal +#discard dgram udp wait root internal +#daytime stream tcp nowait root internal +#daytime dgram udp wait root internal +#time stream tcp nowait root internal +#time dgram udp wait root internal diff --git a/meta-fsl-ppc/recipes-append/busybox/busybox_1.19.4.bbappend b/meta-fsl-ppc/recipes-append/busybox/busybox_1.19.4.bbappend new file mode 100644 index 00000000..60d8b250 --- /dev/null +++ b/meta-fsl-ppc/recipes-append/busybox/busybox_1.19.4.bbappend @@ -0,0 +1,15 @@ +PR_append_fsl = "+${DISTRO}.0" + +FILESEXTRAPATHS_prepend_fsl := "${THISDIR}/busybox-1.19.4:" + +SRC_URI_append_fsl += "file://defconfig-fsl \ + file://busybox-1.19.4-ubi-user-h.patch \ + file://inetd \ + file://inetd.conf \ +" + +do_configure_prepend_fsl () { + cp ${WORKDIR}/defconfig-fsl ${WORKDIR}/defconfig +} + + -- cgit v1.2.3-54-g00ecf From 1bcf73dae1bae98b26c00d3d2f7a044fb5decdab Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Thu, 13 Sep 2012 11:38:52 -0500 Subject: Revert "busybox: add fsl customized defconfig" This version of busybox is not in this branch, needs to be updated for master This reverts commit cedbe9eb8e20b7de8c287dd9185934089e88ac0a. --- .../busybox-1.19.4/busybox-1.19.4-ubi-user-h.patch | 419 -------- .../busybox/busybox-1.19.4/defconfig-fsl | 1013 -------------------- .../recipes-append/busybox/busybox-1.19.4/inetd | 33 - .../busybox/busybox-1.19.4/inetd.conf | 20 - .../recipes-append/busybox/busybox_1.19.4.bbappend | 15 - 5 files changed, 1500 deletions(-) delete mode 100644 meta-fsl-ppc/recipes-append/busybox/busybox-1.19.4/busybox-1.19.4-ubi-user-h.patch delete mode 100644 meta-fsl-ppc/recipes-append/busybox/busybox-1.19.4/defconfig-fsl delete mode 100644 meta-fsl-ppc/recipes-append/busybox/busybox-1.19.4/inetd delete mode 100644 meta-fsl-ppc/recipes-append/busybox/busybox-1.19.4/inetd.conf delete mode 100644 meta-fsl-ppc/recipes-append/busybox/busybox_1.19.4.bbappend diff --git a/meta-fsl-ppc/recipes-append/busybox/busybox-1.19.4/busybox-1.19.4-ubi-user-h.patch b/meta-fsl-ppc/recipes-append/busybox/busybox-1.19.4/busybox-1.19.4-ubi-user-h.patch deleted file mode 100644 index 42bcfa92..00000000 --- a/meta-fsl-ppc/recipes-append/busybox/busybox-1.19.4/busybox-1.19.4-ubi-user-h.patch +++ /dev/null @@ -1,419 +0,0 @@ -20110926 Juergen Lambrecht -This patch add an include file from mtd-utils. - -diff --exclude CVS --exclude .git -uNr busybox-1.19.4/include/mtd/ubi-user.h busybox-1.19.4.modified/include/mtd/ubi-user.h ---- busybox-1.19.4/include/mtd/ubi-user.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.19.4.modified/include/mtd/ubi-user.h 2011-09-26 15:48:54.884088675 +0200 -@@ -0,0 +1,412 @@ -+/* -+ * Copyright (c) International Business Machines Corp., 2006 -+ * -+ * 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 2 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, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -+ * -+ * Author: Artem Bityutskiy (???????? ?????) -+ */ -+ -+#ifndef __UBI_USER_H__ -+#define __UBI_USER_H__ -+ -+#include -+ -+/* -+ * UBI device creation (the same as MTD device attachment) -+ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -+ * -+ * MTD devices may be attached using %UBI_IOCATT ioctl command of the UBI -+ * control device. The caller has to properly fill and pass -+ * &struct ubi_attach_req object - UBI will attach the MTD device specified in -+ * the request and return the newly created UBI device number as the ioctl -+ * return value. -+ * -+ * UBI device deletion (the same as MTD device detachment) -+ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -+ * -+ * An UBI device maybe deleted with %UBI_IOCDET ioctl command of the UBI -+ * control device. -+ * -+ * UBI volume creation -+ * ~~~~~~~~~~~~~~~~~~~ -+ * -+ * UBI volumes are created via the %UBI_IOCMKVOL ioctl command of UBI character -+ * device. A &struct ubi_mkvol_req object has to be properly filled and a -+ * pointer to it has to be passed to the ioctl. -+ * -+ * UBI volume deletion -+ * ~~~~~~~~~~~~~~~~~~~ -+ * -+ * To delete a volume, the %UBI_IOCRMVOL ioctl command of the UBI character -+ * device should be used. A pointer to the 32-bit volume ID hast to be passed -+ * to the ioctl. -+ * -+ * UBI volume re-size -+ * ~~~~~~~~~~~~~~~~~~ -+ * -+ * To re-size a volume, the %UBI_IOCRSVOL ioctl command of the UBI character -+ * device should be used. A &struct ubi_rsvol_req object has to be properly -+ * filled and a pointer to it has to be passed to the ioctl. -+ * -+ * UBI volumes re-name -+ * ~~~~~~~~~~~~~~~~~~~ -+ * -+ * To re-name several volumes atomically at one go, the %UBI_IOCRNVOL command -+ * of the UBI character device should be used. A &struct ubi_rnvol_req object -+ * has to be properly filled and a pointer to it has to be passed to the ioctl. -+ * -+ * UBI volume update -+ * ~~~~~~~~~~~~~~~~~ -+ * -+ * Volume update should be done via the %UBI_IOCVOLUP ioctl command of the -+ * corresponding UBI volume character device. A pointer to a 64-bit update -+ * size should be passed to the ioctl. After this, UBI expects user to write -+ * this number of bytes to the volume character device. The update is finished -+ * when the claimed number of bytes is passed. So, the volume update sequence -+ * is something like: -+ * -+ * fd = open("/dev/my_volume"); -+ * ioctl(fd, UBI_IOCVOLUP, &image_size); -+ * write(fd, buf, image_size); -+ * close(fd); -+ * -+ * Logical eraseblock erase -+ * ~~~~~~~~~~~~~~~~~~~~~~~~ -+ * -+ * To erase a logical eraseblock, the %UBI_IOCEBER ioctl command of the -+ * corresponding UBI volume character device should be used. This command -+ * unmaps the requested logical eraseblock, makes sure the corresponding -+ * physical eraseblock is successfully erased, and returns. -+ * -+ * Atomic logical eraseblock change -+ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -+ * -+ * Atomic logical eraseblock change operation is called using the %UBI_IOCEBCH -+ * ioctl command of the corresponding UBI volume character device. A pointer to -+ * a &struct ubi_leb_change_req object has to be passed to the ioctl. Then the -+ * user is expected to write the requested amount of bytes (similarly to what -+ * should be done in case of the "volume update" ioctl). -+ * -+ * Logical eraseblock map -+ * ~~~~~~~~~~~~~~~~~~~~~ -+ * -+ * To map a logical eraseblock to a physical eraseblock, the %UBI_IOCEBMAP -+ * ioctl command should be used. A pointer to a &struct ubi_map_req object is -+ * expected to be passed. The ioctl maps the requested logical eraseblock to -+ * a physical eraseblock and returns. Only non-mapped logical eraseblocks can -+ * be mapped. If the logical eraseblock specified in the request is already -+ * mapped to a physical eraseblock, the ioctl fails and returns error. -+ * -+ * Logical eraseblock unmap -+ * ~~~~~~~~~~~~~~~~~~~~~~~~ -+ * -+ * To unmap a logical eraseblock to a physical eraseblock, the %UBI_IOCEBUNMAP -+ * ioctl command should be used. The ioctl unmaps the logical eraseblocks, -+ * schedules corresponding physical eraseblock for erasure, and returns. Unlike -+ * the "LEB erase" command, it does not wait for the physical eraseblock being -+ * erased. Note, the side effect of this is that if an unclean reboot happens -+ * after the unmap ioctl returns, you may find the LEB mapped again to the same -+ * physical eraseblock after the UBI is run again. -+ * -+ * Check if logical eraseblock is mapped -+ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -+ * -+ * To check if a logical eraseblock is mapped to a physical eraseblock, the -+ * %UBI_IOCEBISMAP ioctl command should be used. It returns %0 if the LEB is -+ * not mapped, and %1 if it is mapped. -+ * -+ * Set an UBI volume property -+ * ~~~~~~~~~~~~~~~~~~~~~~~~~ -+ * -+ * To set an UBI volume property the %UBI_IOCSETPROP ioctl command should be -+ * used. A pointer to a &struct ubi_set_prop_req object is expected to be -+ * passed. The object describes which property should be set, and to which value -+ * it should be set. -+ */ -+ -+/* -+ * When a new UBI volume or UBI device is created, users may either specify the -+ * volume/device number they want to create or to let UBI automatically assign -+ * the number using these constants. -+ */ -+#define UBI_VOL_NUM_AUTO (-1) -+#define UBI_DEV_NUM_AUTO (-1) -+ -+/* Maximum volume name length */ -+#define UBI_MAX_VOLUME_NAME 127 -+ -+/* ioctl commands of UBI character devices */ -+ -+#define UBI_IOC_MAGIC 'o' -+ -+/* Create an UBI volume */ -+#define UBI_IOCMKVOL _IOW(UBI_IOC_MAGIC, 0, struct ubi_mkvol_req) -+/* Remove an UBI volume */ -+#define UBI_IOCRMVOL _IOW(UBI_IOC_MAGIC, 1, __s32) -+/* Re-size an UBI volume */ -+#define UBI_IOCRSVOL _IOW(UBI_IOC_MAGIC, 2, struct ubi_rsvol_req) -+/* Re-name volumes */ -+#define UBI_IOCRNVOL _IOW(UBI_IOC_MAGIC, 3, struct ubi_rnvol_req) -+ -+/* ioctl commands of the UBI control character device */ -+ -+#define UBI_CTRL_IOC_MAGIC 'o' -+ -+/* Attach an MTD device */ -+#define UBI_IOCATT _IOW(UBI_CTRL_IOC_MAGIC, 64, struct ubi_attach_req) -+/* Detach an MTD device */ -+#define UBI_IOCDET _IOW(UBI_CTRL_IOC_MAGIC, 65, __s32) -+ -+/* ioctl commands of UBI volume character devices */ -+ -+#define UBI_VOL_IOC_MAGIC 'O' -+ -+/* Start UBI volume update */ -+#define UBI_IOCVOLUP _IOW(UBI_VOL_IOC_MAGIC, 0, __s64) -+/* LEB erasure command, used for debugging, disabled by default */ -+#define UBI_IOCEBER _IOW(UBI_VOL_IOC_MAGIC, 1, __s32) -+/* Atomic LEB change command */ -+#define UBI_IOCEBCH _IOW(UBI_VOL_IOC_MAGIC, 2, __s32) -+/* Map LEB command */ -+#define UBI_IOCEBMAP _IOW(UBI_VOL_IOC_MAGIC, 3, struct ubi_map_req) -+/* Unmap LEB command */ -+#define UBI_IOCEBUNMAP _IOW(UBI_VOL_IOC_MAGIC, 4, __s32) -+/* Check if LEB is mapped command */ -+#define UBI_IOCEBISMAP _IOR(UBI_VOL_IOC_MAGIC, 5, __s32) -+/* Set an UBI volume property */ -+#define UBI_IOCSETPROP _IOW(UBI_VOL_IOC_MAGIC, 6, struct ubi_set_prop_req) -+ -+/* Maximum MTD device name length supported by UBI */ -+#define MAX_UBI_MTD_NAME_LEN 127 -+ -+/* Maximum amount of UBI volumes that can be re-named at one go */ -+#define UBI_MAX_RNVOL 32 -+ -+/* -+ * UBI data type hint constants. -+ * -+ * UBI_LONGTERM: long-term data -+ * UBI_SHORTTERM: short-term data -+ * UBI_UNKNOWN: data persistence is unknown -+ * -+ * These constants are used when data is written to UBI volumes in order to -+ * help the UBI wear-leveling unit to find more appropriate physical -+ * eraseblocks. -+ */ -+enum { -+ UBI_LONGTERM = 1, -+ UBI_SHORTTERM = 2, -+ UBI_UNKNOWN = 3, -+}; -+ -+/* -+ * UBI volume type constants. -+ * -+ * @UBI_DYNAMIC_VOLUME: dynamic volume -+ * @UBI_STATIC_VOLUME: static volume -+ */ -+enum { -+ UBI_DYNAMIC_VOLUME = 3, -+ UBI_STATIC_VOLUME = 4, -+}; -+ -+/* -+ * UBI set property ioctl constants -+ * -+ * @UBI_PROP_DIRECT_WRITE: allow / disallow user to directly write and -+ * erase individual eraseblocks on dynamic volumes -+ */ -+enum { -+ UBI_PROP_DIRECT_WRITE = 1, -+}; -+ -+/** -+ * struct ubi_attach_req - attach MTD device request. -+ * @ubi_num: UBI device number to create -+ * @mtd_num: MTD device number to attach -+ * @vid_hdr_offset: VID header offset (use defaults if %0) -+ * @padding: reserved for future, not used, has to be zeroed -+ * -+ * This data structure is used to specify MTD device UBI has to attach and the -+ * parameters it has to use. The number which should be assigned to the new UBI -+ * device is passed in @ubi_num. UBI may automatically assign the number if -+ * @UBI_DEV_NUM_AUTO is passed. In this case, the device number is returned in -+ * @ubi_num. -+ * -+ * Most applications should pass %0 in @vid_hdr_offset to make UBI use default -+ * offset of the VID header within physical eraseblocks. The default offset is -+ * the next min. I/O unit after the EC header. For example, it will be offset -+ * 512 in case of a 512 bytes page NAND flash with no sub-page support. Or -+ * it will be 512 in case of a 2KiB page NAND flash with 4 512-byte sub-pages. -+ * -+ * But in rare cases, if this optimizes things, the VID header may be placed to -+ * a different offset. For example, the boot-loader might do things faster if -+ * the VID header sits at the end of the first 2KiB NAND page with 4 sub-pages. -+ * As the boot-loader would not normally need to read EC headers (unless it -+ * needs UBI in RW mode), it might be faster to calculate ECC. This is weird -+ * example, but it real-life example. So, in this example, @vid_hdr_offer would -+ * be 2KiB-64 bytes = 1984. Note, that this position is not even 512-bytes -+ * aligned, which is OK, as UBI is clever enough to realize this is 4th -+ * sub-page of the first page and add needed padding. -+ */ -+struct ubi_attach_req { -+ __s32 ubi_num; -+ __s32 mtd_num; -+ __s32 vid_hdr_offset; -+ __s8 padding[12]; -+}; -+ -+/** -+ * struct ubi_mkvol_req - volume description data structure used in -+ * volume creation requests. -+ * @vol_id: volume number -+ * @alignment: volume alignment -+ * @bytes: volume size in bytes -+ * @vol_type: volume type (%UBI_DYNAMIC_VOLUME or %UBI_STATIC_VOLUME) -+ * @padding1: reserved for future, not used, has to be zeroed -+ * @name_len: volume name length -+ * @padding2: reserved for future, not used, has to be zeroed -+ * @name: volume name -+ * -+ * This structure is used by user-space programs when creating new volumes. The -+ * @used_bytes field is only necessary when creating static volumes. -+ * -+ * The @alignment field specifies the required alignment of the volume logical -+ * eraseblock. This means, that the size of logical eraseblocks will be aligned -+ * to this number, i.e., -+ * (UBI device logical eraseblock size) mod (@alignment) = 0. -+ * -+ * To put it differently, the logical eraseblock of this volume may be slightly -+ * shortened in order to make it properly aligned. The alignment has to be -+ * multiple of the flash minimal input/output unit, or %1 to utilize the entire -+ * available space of logical eraseblocks. -+ * -+ * The @alignment field may be useful, for example, when one wants to maintain -+ * a block device on top of an UBI volume. In this case, it is desirable to fit -+ * an integer number of blocks in logical eraseblocks of this UBI volume. With -+ * alignment it is possible to update this volume using plane UBI volume image -+ * BLOBs, without caring about how to properly align them. -+ */ -+struct ubi_mkvol_req { -+ __s32 vol_id; -+ __s32 alignment; -+ __s64 bytes; -+ __s8 vol_type; -+ __s8 padding1; -+ __s16 name_len; -+ __s8 padding2[4]; -+ char name[UBI_MAX_VOLUME_NAME + 1]; -+} __attribute__ ((packed)); -+ -+/** -+ * struct ubi_rsvol_req - a data structure used in volume re-size requests. -+ * @vol_id: ID of the volume to re-size -+ * @bytes: new size of the volume in bytes -+ * -+ * Re-sizing is possible for both dynamic and static volumes. But while dynamic -+ * volumes may be re-sized arbitrarily, static volumes cannot be made to be -+ * smaller than the number of bytes they bear. To arbitrarily shrink a static -+ * volume, it must be wiped out first (by means of volume update operation with -+ * zero number of bytes). -+ */ -+struct ubi_rsvol_req { -+ __s64 bytes; -+ __s32 vol_id; -+} __attribute__ ((packed)); -+ -+/** -+ * struct ubi_rnvol_req - volumes re-name request. -+ * @count: count of volumes to re-name -+ * @padding1: reserved for future, not used, has to be zeroed -+ * @vol_id: ID of the volume to re-name -+ * @name_len: name length -+ * @padding2: reserved for future, not used, has to be zeroed -+ * @name: new volume name -+ * -+ * UBI allows to re-name up to %32 volumes at one go. The count of volumes to -+ * re-name is specified in the @count field. The ID of the volumes to re-name -+ * and the new names are specified in the @vol_id and @name fields. -+ * -+ * The UBI volume re-name operation is atomic, which means that should power cut -+ * happen, the volumes will have either old name or new name. So the possible -+ * use-cases of this command is atomic upgrade. Indeed, to upgrade, say, volumes -+ * A and B one may create temporary volumes %A1 and %B1 with the new contents, -+ * then atomically re-name A1->A and B1->B, in which case old %A and %B will -+ * be removed. -+ * -+ * If it is not desirable to remove old A and B, the re-name request has to -+ * contain 4 entries: A1->A, A->A1, B1->B, B->B1, in which case old A1 and B1 -+ * become A and B, and old A and B will become A1 and B1. -+ * -+ * It is also OK to request: A1->A, A1->X, B1->B, B->Y, in which case old A1 -+ * and B1 become A and B, and old A and B become X and Y. -+ * -+ * In other words, in case of re-naming into an existing volume name, the -+ * existing volume is removed, unless it is re-named as well at the same -+ * re-name request. -+ */ -+struct ubi_rnvol_req { -+ __s32 count; -+ __s8 padding1[12]; -+ struct { -+ __s32 vol_id; -+ __s16 name_len; -+ __s8 padding2[2]; -+ char name[UBI_MAX_VOLUME_NAME + 1]; -+ } ents[UBI_MAX_RNVOL]; -+} __attribute__ ((packed)); -+ -+/** -+ * struct ubi_leb_change_req - a data structure used in atomic LEB change -+ * requests. -+ * @lnum: logical eraseblock number to change -+ * @bytes: how many bytes will be written to the logical eraseblock -+ * @dtype: data type (%UBI_LONGTERM, %UBI_SHORTTERM, %UBI_UNKNOWN) -+ * @padding: reserved for future, not used, has to be zeroed -+ */ -+struct ubi_leb_change_req { -+ __s32 lnum; -+ __s32 bytes; -+ __s8 dtype; -+ __s8 padding[7]; -+} __attribute__ ((packed)); -+ -+/** -+ * struct ubi_map_req - a data structure used in map LEB requests. -+ * @lnum: logical eraseblock number to unmap -+ * @dtype: data type (%UBI_LONGTERM, %UBI_SHORTTERM, %UBI_UNKNOWN) -+ * @padding: reserved for future, not used, has to be zeroed -+ */ -+struct ubi_map_req { -+ __s32 lnum; -+ __s8 dtype; -+ __s8 padding[3]; -+} __attribute__ ((packed)); -+ -+ -+/** -+ * struct ubi_set_prop_req - a data structure used to set an ubi volume -+ * property. -+ * @property: property to set (%UBI_PROP_DIRECT_WRITE) -+ * @padding: reserved for future, not used, has to be zeroed -+ * @value: value to set -+ */ -+struct ubi_set_prop_req { -+ __u8 property; -+ __u8 padding[7]; -+ __u64 value; -+} __attribute__ ((packed)); -+ -+#endif /* __UBI_USER_H__ */ diff --git a/meta-fsl-ppc/recipes-append/busybox/busybox-1.19.4/defconfig-fsl b/meta-fsl-ppc/recipes-append/busybox/busybox-1.19.4/defconfig-fsl deleted file mode 100644 index 52d5bbfd..00000000 --- a/meta-fsl-ppc/recipes-append/busybox/busybox-1.19.4/defconfig-fsl +++ /dev/null @@ -1,1013 +0,0 @@ -# -# Automatically generated make config: don't edit -# Busybox version: 1.19.4 -# Mon Aug 20 15:36:39 2012 -# -CONFIG_HAVE_DOT_CONFIG=y - -# -# Busybox Settings -# - -# -# General Configuration -# -# CONFIG_DESKTOP is not set -# CONFIG_EXTRA_COMPAT is not set -CONFIG_INCLUDE_SUSv2=y -# CONFIG_USE_PORTABLE_CODE is not set -CONFIG_PLATFORM_LINUX=y -CONFIG_FEATURE_BUFFERS_USE_MALLOC=y -# CONFIG_FEATURE_BUFFERS_GO_ON_STACK is not set -# CONFIG_FEATURE_BUFFERS_GO_IN_BSS is not set -CONFIG_SHOW_USAGE=y -# CONFIG_FEATURE_VERBOSE_USAGE is not set -CONFIG_FEATURE_COMPRESS_USAGE=y -# CONFIG_FEATURE_INSTALLER is not set -# CONFIG_INSTALL_NO_USR is not set -CONFIG_LOCALE_SUPPORT=y -# CONFIG_UNICODE_SUPPORT is not set -# CONFIG_UNICODE_USING_LOCALE is not set -# CONFIG_FEATURE_CHECK_UNICODE_IN_ENV is not set -CONFIG_SUBST_WCHAR=0 -CONFIG_LAST_SUPPORTED_WCHAR=0 -# CONFIG_UNICODE_COMBINING_WCHARS is not set -# CONFIG_UNICODE_WIDE_WCHARS is not set -# CONFIG_UNICODE_BIDI_SUPPORT is not set -# CONFIG_UNICODE_NEUTRAL_TABLE is not set -# CONFIG_UNICODE_PRESERVE_BROKEN is not set -CONFIG_LONG_OPTS=y -CONFIG_FEATURE_DEVPTS=y -# CONFIG_FEATURE_CLEAN_UP is not set -CONFIG_FEATURE_UTMP=y -CONFIG_FEATURE_WTMP=y -CONFIG_FEATURE_PIDFILE=y -CONFIG_FEATURE_SUID=y -CONFIG_FEATURE_SUID_CONFIG=y -CONFIG_FEATURE_SUID_CONFIG_QUIET=y -# CONFIG_SELINUX is not set -# CONFIG_FEATURE_PREFER_APPLETS is not set -CONFIG_BUSYBOX_EXEC_PATH="/proc/self/exe" -CONFIG_FEATURE_SYSLOG=y -CONFIG_FEATURE_HAVE_RPC=y - -# -# Build Options -# -# CONFIG_STATIC is not set -# CONFIG_PIE is not set -# CONFIG_NOMMU is not set -# CONFIG_BUILD_LIBBUSYBOX is not set -# CONFIG_FEATURE_INDIVIDUAL is not set -# CONFIG_FEATURE_SHARED_BUSYBOX is not set -CONFIG_LFS=y -CONFIG_CROSS_COMPILER_PREFIX="" -CONFIG_EXTRA_CFLAGS="" - -# -# Debugging Options -# -# CONFIG_DEBUG is not set -# CONFIG_DEBUG_PESSIMIZE is not set -# CONFIG_WERROR is not set -CONFIG_NO_DEBUG_LIB=y -# CONFIG_DMALLOC is not set -# CONFIG_EFENCE is not set - -# -# Installation Options ("make install" behavior) -# -CONFIG_INSTALL_APPLET_SYMLINKS=y -# CONFIG_INSTALL_APPLET_HARDLINKS is not set -# CONFIG_INSTALL_APPLET_SCRIPT_WRAPPERS is not set -# CONFIG_INSTALL_APPLET_DONT is not set -# CONFIG_INSTALL_SH_APPLET_SYMLINK is not set -# CONFIG_INSTALL_SH_APPLET_HARDLINK is not set -# CONFIG_INSTALL_SH_APPLET_SCRIPT_WRAPPER is not set -CONFIG_PREFIX="./_install" - -# -# Busybox Library Tuning -# -CONFIG_FEATURE_SYSTEMD=y -CONFIG_FEATURE_RTMINMAX=y -CONFIG_PASSWORD_MINLEN=6 -CONFIG_MD5_SIZE_VS_SPEED=2 -CONFIG_FEATURE_FAST_TOP=y -# CONFIG_FEATURE_ETC_NETWORKS is not set -CONFIG_FEATURE_USE_TERMIOS=y -CONFIG_FEATURE_EDITING=y -CONFIG_FEATURE_EDITING_MAX_LEN=1024 -# CONFIG_FEATURE_EDITING_VI is not set -CONFIG_FEATURE_EDITING_HISTORY=255 -CONFIG_FEATURE_EDITING_SAVEHISTORY=y -CONFIG_FEATURE_REVERSE_SEARCH=y -CONFIG_FEATURE_TAB_COMPLETION=y -# CONFIG_FEATURE_USERNAME_COMPLETION is not set -CONFIG_FEATURE_EDITING_FANCY_PROMPT=y -# CONFIG_FEATURE_EDITING_ASK_TERMINAL is not set -CONFIG_FEATURE_NON_POSIX_CP=y -# CONFIG_FEATURE_VERBOSE_CP_MESSAGE is not set -CONFIG_FEATURE_COPYBUF_KB=4 -CONFIG_FEATURE_SKIP_ROOTFS=y -CONFIG_MONOTONIC_SYSCALL=y -CONFIG_IOCTL_HEX2STR_ERROR=y -CONFIG_FEATURE_HWIB=y - -# -# Applets -# - -# -# Archival Utilities -# -CONFIG_FEATURE_SEAMLESS_XZ=y -CONFIG_FEATURE_SEAMLESS_LZMA=y -CONFIG_FEATURE_SEAMLESS_BZ2=y -CONFIG_FEATURE_SEAMLESS_GZ=y -CONFIG_FEATURE_SEAMLESS_Z=y -CONFIG_AR=y -CONFIG_FEATURE_AR_LONG_FILENAMES=y -CONFIG_FEATURE_AR_CREATE=y -CONFIG_BUNZIP2=y -CONFIG_BZIP2=y -CONFIG_CPIO=y -CONFIG_FEATURE_CPIO_O=y -CONFIG_FEATURE_CPIO_P=y -# CONFIG_DPKG is not set -# CONFIG_DPKG_DEB is not set -# CONFIG_FEATURE_DPKG_DEB_EXTRACT_ONLY is not set -CONFIG_GUNZIP=y -CONFIG_GZIP=y -CONFIG_FEATURE_GZIP_LONG_OPTIONS=y -CONFIG_LZOP=y -# CONFIG_LZOP_COMPR_HIGH is not set -CONFIG_RPM2CPIO=y -CONFIG_RPM=y -CONFIG_TAR=y -CONFIG_FEATURE_TAR_CREATE=y -CONFIG_FEATURE_TAR_AUTODETECT=y -CONFIG_FEATURE_TAR_FROM=y -CONFIG_FEATURE_TAR_OLDGNU_COMPATIBILITY=y -CONFIG_FEATURE_TAR_OLDSUN_COMPATIBILITY=y -CONFIG_FEATURE_TAR_GNU_EXTENSIONS=y -CONFIG_FEATURE_TAR_LONG_OPTIONS=y -CONFIG_FEATURE_TAR_TO_COMMAND=y -CONFIG_FEATURE_TAR_UNAME_GNAME=y -CONFIG_FEATURE_TAR_NOPRESERVE_TIME=y -# CONFIG_FEATURE_TAR_SELINUX is not set -# CONFIG_UNCOMPRESS is not set -CONFIG_UNLZMA=y -CONFIG_FEATURE_LZMA_FAST=y -CONFIG_LZMA=y -CONFIG_UNXZ=y -CONFIG_XZ=y -CONFIG_UNZIP=y - -# -# Coreutils -# -CONFIG_BASENAME=y -CONFIG_CAT=y -CONFIG_DATE=y -CONFIG_FEATURE_DATE_ISOFMT=y -# CONFIG_FEATURE_DATE_NANO is not set -CONFIG_FEATURE_DATE_COMPAT=y -CONFIG_ID=y -CONFIG_GROUPS=y -CONFIG_TEST=y -CONFIG_FEATURE_TEST_64=y -CONFIG_TOUCH=y -CONFIG_TR=y -CONFIG_FEATURE_TR_CLASSES=y -CONFIG_FEATURE_TR_EQUIV=y -CONFIG_BASE64=y -CONFIG_WHO=y -CONFIG_USERS=y -CONFIG_CAL=y -CONFIG_CATV=y -CONFIG_CHGRP=y -CONFIG_CHMOD=y -CONFIG_CHOWN=y -CONFIG_FEATURE_CHOWN_LONG_OPTIONS=y -CONFIG_CHROOT=y -CONFIG_CKSUM=y -CONFIG_COMM=y -CONFIG_CP=y -CONFIG_FEATURE_CP_LONG_OPTIONS=y -CONFIG_CUT=y -CONFIG_DD=y -CONFIG_FEATURE_DD_SIGNAL_HANDLING=y -CONFIG_FEATURE_DD_THIRD_STATUS_LINE=y -CONFIG_FEATURE_DD_IBS_OBS=y -CONFIG_DF=y -CONFIG_FEATURE_DF_FANCY=y -CONFIG_DIRNAME=y -CONFIG_DOS2UNIX=y -CONFIG_UNIX2DOS=y -CONFIG_DU=y -CONFIG_FEATURE_DU_DEFAULT_BLOCKSIZE_1K=y -CONFIG_ECHO=y -CONFIG_FEATURE_FANCY_ECHO=y -CONFIG_ENV=y -CONFIG_FEATURE_ENV_LONG_OPTIONS=y -CONFIG_EXPAND=y -CONFIG_FEATURE_EXPAND_LONG_OPTIONS=y -CONFIG_EXPR=y -CONFIG_EXPR_MATH_SUPPORT_64=y -CONFIG_FALSE=y -CONFIG_FOLD=y -CONFIG_FSYNC=y -CONFIG_HEAD=y -CONFIG_FEATURE_FANCY_HEAD=y -CONFIG_HOSTID=y -CONFIG_INSTALL=y -CONFIG_FEATURE_INSTALL_LONG_OPTIONS=y -CONFIG_LN=y -CONFIG_LOGNAME=y -CONFIG_LS=y -CONFIG_FEATURE_LS_FILETYPES=y -CONFIG_FEATURE_LS_FOLLOWLINKS=y -CONFIG_FEATURE_LS_RECURSIVE=y -CONFIG_FEATURE_LS_SORTFILES=y -CONFIG_FEATURE_LS_TIMESTAMPS=y -CONFIG_FEATURE_LS_USERNAME=y -CONFIG_FEATURE_LS_COLOR=y -CONFIG_FEATURE_LS_COLOR_IS_DEFAULT=y -CONFIG_MD5SUM=y -CONFIG_MKDIR=y -CONFIG_FEATURE_MKDIR_LONG_OPTIONS=y -CONFIG_MKFIFO=y -CONFIG_MKNOD=y -CONFIG_MV=y -CONFIG_FEATURE_MV_LONG_OPTIONS=y -CONFIG_NICE=y -CONFIG_NOHUP=y -CONFIG_OD=y -CONFIG_PRINTENV=y -CONFIG_PRINTF=y -CONFIG_PWD=y -CONFIG_READLINK=y -CONFIG_FEATURE_READLINK_FOLLOW=y -CONFIG_REALPATH=y -CONFIG_RM=y -CONFIG_RMDIR=y -CONFIG_FEATURE_RMDIR_LONG_OPTIONS=y -CONFIG_SEQ=y -CONFIG_SHA1SUM=y -CONFIG_SHA256SUM=y -CONFIG_SHA512SUM=y -CONFIG_SLEEP=y -CONFIG_FEATURE_FANCY_SLEEP=y -CONFIG_FEATURE_FLOAT_SLEEP=y -CONFIG_SORT=y -CONFIG_FEATURE_SORT_BIG=y -CONFIG_SPLIT=y -CONFIG_FEATURE_SPLIT_FANCY=y -CONFIG_STAT=y -CONFIG_FEATURE_STAT_FORMAT=y -CONFIG_STTY=y -CONFIG_SUM=y -CONFIG_SYNC=y -CONFIG_TAC=y -CONFIG_TAIL=y -CONFIG_FEATURE_FANCY_TAIL=y -CONFIG_TEE=y -CONFIG_FEATURE_TEE_USE_BLOCK_IO=y -CONFIG_TRUE=y -CONFIG_TTY=y -CONFIG_UNAME=y -CONFIG_UNEXPAND=y -CONFIG_FEATURE_UNEXPAND_LONG_OPTIONS=y -CONFIG_UNIQ=y -CONFIG_USLEEP=y -CONFIG_UUDECODE=y -CONFIG_UUENCODE=y -CONFIG_WC=y -CONFIG_FEATURE_WC_LARGE=y -CONFIG_WHOAMI=y -CONFIG_YES=y - -# -# Common options for cp and mv -# -CONFIG_FEATURE_PRESERVE_HARDLINKS=y - -# -# Common options for ls, more and telnet -# -CONFIG_FEATURE_AUTOWIDTH=y - -# -# Common options for df, du, ls -# -CONFIG_FEATURE_HUMAN_READABLE=y - -# -# Common options for md5sum, sha1sum, sha256sum, sha512sum -# -CONFIG_FEATURE_MD5_SHA1_SUM_CHECK=y - -# -# Console Utilities -# -CONFIG_CHVT=y -CONFIG_FGCONSOLE=y -CONFIG_CLEAR=y -CONFIG_DEALLOCVT=y -CONFIG_DUMPKMAP=y -CONFIG_KBD_MODE=y -CONFIG_LOADFONT=y -CONFIG_LOADKMAP=y -CONFIG_OPENVT=y -CONFIG_RESET=y -CONFIG_RESIZE=y -CONFIG_FEATURE_RESIZE_PRINT=y -CONFIG_SETCONSOLE=y -CONFIG_FEATURE_SETCONSOLE_LONG_OPTIONS=y -CONFIG_SETFONT=y -CONFIG_FEATURE_SETFONT_TEXTUAL_MAP=y -CONFIG_DEFAULT_SETFONT_DIR="" -CONFIG_SETKEYCODES=y -CONFIG_SETLOGCONS=y -CONFIG_SHOWKEY=y - -# -# Common options for loadfont and setfont -# -CONFIG_FEATURE_LOADFONT_PSF2=y -CONFIG_FEATURE_LOADFONT_RAW=y - -# -# Debian Utilities -# -CONFIG_MKTEMP=y -CONFIG_PIPE_PROGRESS=y -CONFIG_RUN_PARTS=y -CONFIG_FEATURE_RUN_PARTS_LONG_OPTIONS=y -CONFIG_FEATURE_RUN_PARTS_FANCY=y -CONFIG_START_STOP_DAEMON=y -CONFIG_FEATURE_START_STOP_DAEMON_FANCY=y -CONFIG_FEATURE_START_STOP_DAEMON_LONG_OPTIONS=y -CONFIG_WHICH=y - -# -# Editors -# -CONFIG_PATCH=y -CONFIG_VI=y -CONFIG_FEATURE_VI_MAX_LEN=4096 -CONFIG_FEATURE_VI_8BIT=y -CONFIG_FEATURE_VI_COLON=y -CONFIG_FEATURE_VI_YANKMARK=y -CONFIG_FEATURE_VI_SEARCH=y -# CONFIG_FEATURE_VI_REGEX_SEARCH is not set -CONFIG_FEATURE_VI_USE_SIGNALS=y -CONFIG_FEATURE_VI_DOT_CMD=y -CONFIG_FEATURE_VI_READONLY=y -CONFIG_FEATURE_VI_SETOPTS=y -CONFIG_FEATURE_VI_SET=y -CONFIG_FEATURE_VI_WIN_RESIZE=y -CONFIG_FEATURE_VI_ASK_TERMINAL=y -CONFIG_FEATURE_VI_OPTIMIZE_CURSOR=y -CONFIG_AWK=y -CONFIG_FEATURE_AWK_LIBM=y -CONFIG_CMP=y -CONFIG_DIFF=y -CONFIG_FEATURE_DIFF_LONG_OPTIONS=y -CONFIG_FEATURE_DIFF_DIR=y -CONFIG_ED=y -CONFIG_SED=y -CONFIG_FEATURE_ALLOW_EXEC=y - -# -# Finding Utilities -# -CONFIG_FIND=y -CONFIG_FEATURE_FIND_PRINT0=y -CONFIG_FEATURE_FIND_MTIME=y -CONFIG_FEATURE_FIND_MMIN=y -CONFIG_FEATURE_FIND_PERM=y -CONFIG_FEATURE_FIND_TYPE=y -CONFIG_FEATURE_FIND_XDEV=y -CONFIG_FEATURE_FIND_MAXDEPTH=y -CONFIG_FEATURE_FIND_NEWER=y -CONFIG_FEATURE_FIND_INUM=y -CONFIG_FEATURE_FIND_EXEC=y -CONFIG_FEATURE_FIND_USER=y -CONFIG_FEATURE_FIND_GROUP=y -CONFIG_FEATURE_FIND_NOT=y -CONFIG_FEATURE_FIND_DEPTH=y -CONFIG_FEATURE_FIND_PAREN=y -CONFIG_FEATURE_FIND_SIZE=y -CONFIG_FEATURE_FIND_PRUNE=y -CONFIG_FEATURE_FIND_DELETE=y -CONFIG_FEATURE_FIND_PATH=y -CONFIG_FEATURE_FIND_REGEX=y -# CONFIG_FEATURE_FIND_CONTEXT is not set -CONFIG_FEATURE_FIND_LINKS=y -CONFIG_GREP=y -CONFIG_FEATURE_GREP_EGREP_ALIAS=y -CONFIG_FEATURE_GREP_FGREP_ALIAS=y -CONFIG_FEATURE_GREP_CONTEXT=y -CONFIG_XARGS=y -CONFIG_FEATURE_XARGS_SUPPORT_CONFIRMATION=y -CONFIG_FEATURE_XARGS_SUPPORT_QUOTES=y -CONFIG_FEATURE_XARGS_SUPPORT_TERMOPT=y -CONFIG_FEATURE_XARGS_SUPPORT_ZERO_TERM=y - -# -# Init Utilities -# -CONFIG_BOOTCHARTD=y -CONFIG_FEATURE_BOOTCHARTD_BLOATED_HEADER=y -CONFIG_FEATURE_BOOTCHARTD_CONFIG_FILE=y -CONFIG_HALT=y -# CONFIG_FEATURE_CALL_TELINIT is not set -CONFIG_TELINIT_PATH="" -CONFIG_INIT=y -CONFIG_FEATURE_USE_INITTAB=y -# CONFIG_FEATURE_KILL_REMOVED is not set -CONFIG_FEATURE_KILL_DELAY=0 -CONFIG_FEATURE_INIT_SCTTY=y -CONFIG_FEATURE_INIT_SYSLOG=y -CONFIG_FEATURE_EXTRA_QUIET=y -CONFIG_FEATURE_INIT_COREDUMPS=y -CONFIG_FEATURE_INITRD=y -CONFIG_INIT_TERMINAL_TYPE="linux" -CONFIG_MESG=y -CONFIG_FEATURE_MESG_ENABLE_ONLY_GROUP=y - -# -# Login/Password Management Utilities -# -CONFIG_ADD_SHELL=y -CONFIG_REMOVE_SHELL=y -CONFIG_FEATURE_SHADOWPASSWDS=y -CONFIG_USE_BB_PWD_GRP=y -CONFIG_USE_BB_SHADOW=y -CONFIG_USE_BB_CRYPT=y -CONFIG_USE_BB_CRYPT_SHA=y -CONFIG_ADDUSER=y -CONFIG_FEATURE_ADDUSER_LONG_OPTIONS=y -# CONFIG_FEATURE_CHECK_NAMES is not set -CONFIG_FIRST_SYSTEM_ID=100 -CONFIG_LAST_SYSTEM_ID=999 -CONFIG_ADDGROUP=y -CONFIG_FEATURE_ADDGROUP_LONG_OPTIONS=y -CONFIG_FEATURE_ADDUSER_TO_GROUP=y -CONFIG_DELUSER=y -CONFIG_DELGROUP=y -CONFIG_FEATURE_DEL_USER_FROM_GROUP=y -CONFIG_GETTY=y -CONFIG_LOGIN=y -# CONFIG_PAM is not set -CONFIG_LOGIN_SCRIPTS=y -CONFIG_FEATURE_NOLOGIN=y -CONFIG_FEATURE_SECURETTY=y -CONFIG_PASSWD=y -CONFIG_FEATURE_PASSWD_WEAK_CHECK=y -CONFIG_CRYPTPW=y -CONFIG_CHPASSWD=y -CONFIG_SU=y -CONFIG_FEATURE_SU_SYSLOG=y -CONFIG_FEATURE_SU_CHECKS_SHELLS=y -CONFIG_SULOGIN=y -CONFIG_VLOCK=y - -# -# Linux Ext2 FS Progs -# -CONFIG_CHATTR=y -CONFIG_FSCK=y -CONFIG_LSATTR=y -# CONFIG_TUNE2FS is not set - -# -# Linux Module Utilities -# -# CONFIG_MODINFO is not set -# CONFIG_MODPROBE_SMALL is not set -# CONFIG_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE is not set -# CONFIG_FEATURE_MODPROBE_SMALL_CHECK_ALREADY_LOADED is not set -CONFIG_INSMOD=y -CONFIG_RMMOD=y -CONFIG_LSMOD=y -# CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT is not set -CONFIG_MODPROBE=y -# CONFIG_FEATURE_MODPROBE_BLACKLIST is not set -# CONFIG_DEPMOD is not set - -# -# Options common to multiple modutils -# -# CONFIG_FEATURE_2_4_MODULES is not set -# CONFIG_FEATURE_INSMOD_TRY_MMAP is not set -# CONFIG_FEATURE_INSMOD_VERSION_CHECKING is not set -# CONFIG_FEATURE_INSMOD_KSYMOOPS_SYMBOLS is not set -# CONFIG_FEATURE_INSMOD_LOADINKMEM is not set -# CONFIG_FEATURE_INSMOD_LOAD_MAP is not set -# CONFIG_FEATURE_INSMOD_LOAD_MAP_FULL is not set -CONFIG_FEATURE_CHECK_TAINTED_MODULE=y -CONFIG_FEATURE_MODUTILS_ALIAS=y -CONFIG_FEATURE_MODUTILS_SYMBOLS=y -CONFIG_DEFAULT_MODULES_DIR="/lib/modules" -CONFIG_DEFAULT_DEPMOD_FILE="modules.dep" - -# -# Linux System Utilities -# -CONFIG_BLOCKDEV=y -CONFIG_REV=y -CONFIG_ACPID=y -CONFIG_FEATURE_ACPID_COMPAT=y -CONFIG_BLKID=y -# CONFIG_FEATURE_BLKID_TYPE is not set -CONFIG_DMESG=y -CONFIG_FEATURE_DMESG_PRETTY=y -CONFIG_FBSET=y -CONFIG_FEATURE_FBSET_FANCY=y -CONFIG_FEATURE_FBSET_READMODE=y -CONFIG_FDFLUSH=y -CONFIG_FDFORMAT=y -CONFIG_FDISK=y -# CONFIG_FDISK_SUPPORT_LARGE_DISKS is not set -CONFIG_FEATURE_FDISK_WRITABLE=y -# CONFIG_FEATURE_AIX_LABEL is not set -# CONFIG_FEATURE_SGI_LABEL is not set -# CONFIG_FEATURE_SUN_LABEL is not set -# CONFIG_FEATURE_OSF_LABEL is not set -# CONFIG_FEATURE_GPT_LABEL is not set -CONFIG_FEATURE_FDISK_ADVANCED=y -CONFIG_FINDFS=y -CONFIG_FLOCK=y -CONFIG_FREERAMDISK=y -CONFIG_FSCK_MINIX=y -CONFIG_MKFS_EXT2=y -CONFIG_MKFS_MINIX=y -CONFIG_FEATURE_MINIX2=y -# CONFIG_MKFS_REISER is not set -CONFIG_MKFS_VFAT=y -CONFIG_GETOPT=y -CONFIG_FEATURE_GETOPT_LONG=y -CONFIG_HEXDUMP=y -CONFIG_FEATURE_HEXDUMP_REVERSE=y -CONFIG_HD=y -CONFIG_HWCLOCK=y -CONFIG_FEATURE_HWCLOCK_LONG_OPTIONS=y -CONFIG_FEATURE_HWCLOCK_ADJTIME_FHS=y -CONFIG_IPCRM=y -CONFIG_IPCS=y -CONFIG_LOSETUP=y -CONFIG_LSPCI=y -CONFIG_LSUSB=y -CONFIG_MDEV=y -CONFIG_FEATURE_MDEV_CONF=y -CONFIG_FEATURE_MDEV_RENAME=y -CONFIG_FEATURE_MDEV_RENAME_REGEXP=y -CONFIG_FEATURE_MDEV_EXEC=y -CONFIG_FEATURE_MDEV_LOAD_FIRMWARE=y -CONFIG_MKSWAP=y -CONFIG_FEATURE_MKSWAP_UUID=y -CONFIG_MORE=y -CONFIG_MOUNT=y -CONFIG_FEATURE_MOUNT_FAKE=y -CONFIG_FEATURE_MOUNT_VERBOSE=y -# CONFIG_FEATURE_MOUNT_HELPERS is not set -CONFIG_FEATURE_MOUNT_LABEL=y -CONFIG_FEATURE_MOUNT_NFS=y -CONFIG_FEATURE_MOUNT_CIFS=y -CONFIG_FEATURE_MOUNT_FLAGS=y -CONFIG_FEATURE_MOUNT_FSTAB=y -CONFIG_PIVOT_ROOT=y -CONFIG_RDATE=y -CONFIG_RDEV=y -CONFIG_READPROFILE=y -CONFIG_RTCWAKE=y -CONFIG_SCRIPT=y -CONFIG_SCRIPTREPLAY=y -CONFIG_SETARCH=y -CONFIG_SWAPONOFF=y -CONFIG_FEATURE_SWAPON_PRI=y -CONFIG_SWITCH_ROOT=y -CONFIG_UMOUNT=y -CONFIG_FEATURE_UMOUNT_ALL=y - -# -# Common options for mount/umount -# -CONFIG_FEATURE_MOUNT_LOOP=y -CONFIG_FEATURE_MOUNT_LOOP_CREATE=y -# CONFIG_FEATURE_MTAB_SUPPORT is not set -CONFIG_VOLUMEID=y - -# -# Filesystem/Volume identification -# -CONFIG_FEATURE_VOLUMEID_EXT=y -CONFIG_FEATURE_VOLUMEID_BTRFS=y -CONFIG_FEATURE_VOLUMEID_REISERFS=y -CONFIG_FEATURE_VOLUMEID_FAT=y -CONFIG_FEATURE_VOLUMEID_HFS=y -CONFIG_FEATURE_VOLUMEID_JFS=y -CONFIG_FEATURE_VOLUMEID_XFS=y -CONFIG_FEATURE_VOLUMEID_NTFS=y -CONFIG_FEATURE_VOLUMEID_ISO9660=y -CONFIG_FEATURE_VOLUMEID_UDF=y -CONFIG_FEATURE_VOLUMEID_LUKS=y -CONFIG_FEATURE_VOLUMEID_LINUXSWAP=y -CONFIG_FEATURE_VOLUMEID_CRAMFS=y -CONFIG_FEATURE_VOLUMEID_ROMFS=y -CONFIG_FEATURE_VOLUMEID_SYSV=y -CONFIG_FEATURE_VOLUMEID_OCFS2=y -CONFIG_FEATURE_VOLUMEID_LINUXRAID=y - -# -# Miscellaneous Utilities -# -# CONFIG_CONSPY is not set -CONFIG_LESS=y -CONFIG_FEATURE_LESS_MAXLINES=9999999 -CONFIG_FEATURE_LESS_BRACKETS=y -CONFIG_FEATURE_LESS_FLAGS=y -CONFIG_FEATURE_LESS_MARKS=y -CONFIG_FEATURE_LESS_REGEXP=y -CONFIG_FEATURE_LESS_WINCH=y -CONFIG_FEATURE_LESS_ASK_TERMINAL=y -CONFIG_FEATURE_LESS_DASHCMD=y -CONFIG_FEATURE_LESS_LINENUMS=y -# CONFIG_NANDWRITE is not set -# CONFIG_NANDDUMP is not set -CONFIG_SETSERIAL=y -CONFIG_UBIATTACH=y -CONFIG_UBIDETACH=y -CONFIG_UBIMKVOL=y -CONFIG_UBIRMVOL=y -CONFIG_UBIRSVOL=y -CONFIG_UBIUPDATEVOL=y -CONFIG_ADJTIMEX=y -# CONFIG_BBCONFIG is not set -# CONFIG_FEATURE_COMPRESS_BBCONFIG is not set -CONFIG_BEEP=y -CONFIG_FEATURE_BEEP_FREQ=4000 -CONFIG_FEATURE_BEEP_LENGTH_MS=30 -CONFIG_CHAT=y -CONFIG_FEATURE_CHAT_NOFAIL=y -# CONFIG_FEATURE_CHAT_TTY_HIFI is not set -CONFIG_FEATURE_CHAT_IMPLICIT_CR=y -CONFIG_FEATURE_CHAT_SWALLOW_OPTS=y -CONFIG_FEATURE_CHAT_SEND_ESCAPES=y -CONFIG_FEATURE_CHAT_VAR_ABORT_LEN=y -CONFIG_FEATURE_CHAT_CLR_ABORT=y -CONFIG_CHRT=y -CONFIG_CROND=y -CONFIG_FEATURE_CROND_D=y -CONFIG_FEATURE_CROND_CALL_SENDMAIL=y -CONFIG_FEATURE_CROND_DIR="/var/spool/cron" -CONFIG_CRONTAB=y -CONFIG_DC=y -CONFIG_FEATURE_DC_LIBM=y -# CONFIG_DEVFSD is not set -# CONFIG_DEVFSD_MODLOAD is not set -# CONFIG_DEVFSD_FG_NP is not set -# CONFIG_DEVFSD_VERBOSE is not set -# CONFIG_FEATURE_DEVFS is not set -CONFIG_DEVMEM=y -CONFIG_EJECT=y -CONFIG_FEATURE_EJECT_SCSI=y -CONFIG_FBSPLASH=y -# CONFIG_FLASHCP is not set -# CONFIG_FLASH_LOCK is not set -# CONFIG_FLASH_UNLOCK is not set -# CONFIG_FLASH_ERASEALL is not set -CONFIG_IONICE=y -# CONFIG_INOTIFYD is not set -CONFIG_LAST=y -# CONFIG_FEATURE_LAST_SMALL is not set -CONFIG_FEATURE_LAST_FANCY=y -CONFIG_HDPARM=y -CONFIG_FEATURE_HDPARM_GET_IDENTITY=y -CONFIG_FEATURE_HDPARM_HDIO_SCAN_HWIF=y -CONFIG_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF=y -CONFIG_FEATURE_HDPARM_HDIO_DRIVE_RESET=y -CONFIG_FEATURE_HDPARM_HDIO_TRISTATE_HWIF=y -CONFIG_FEATURE_HDPARM_HDIO_GETSET_DMA=y -CONFIG_MAKEDEVS=y -# CONFIG_FEATURE_MAKEDEVS_LEAF is not set -CONFIG_FEATURE_MAKEDEVS_TABLE=y -CONFIG_MAN=y -CONFIG_MICROCOM=y -CONFIG_MOUNTPOINT=y -CONFIG_MT=y -CONFIG_RAIDAUTORUN=y -CONFIG_READAHEAD=y -# CONFIG_RFKILL is not set -CONFIG_RUNLEVEL=y -CONFIG_RX=y -CONFIG_SETSID=y -CONFIG_STRINGS=y -# CONFIG_TASKSET is not set -# CONFIG_FEATURE_TASKSET_FANCY is not set -CONFIG_TIME=y -CONFIG_TIMEOUT=y -CONFIG_TTYSIZE=y -CONFIG_VOLNAME=y -CONFIG_WALL=y -CONFIG_WATCHDOG=y - -# -# Networking Utilities -# -CONFIG_NAMEIF=y -CONFIG_FEATURE_NAMEIF_EXTENDED=y -CONFIG_NBDCLIENT=y -CONFIG_NC=y -CONFIG_NC_SERVER=y -CONFIG_NC_EXTRA=y -# CONFIG_NC_110_COMPAT is not set -CONFIG_PING=y -CONFIG_PING6=y -CONFIG_FEATURE_FANCY_PING=y -CONFIG_WHOIS=y -CONFIG_FEATURE_IPV6=y -# CONFIG_FEATURE_UNIX_LOCAL is not set -CONFIG_FEATURE_PREFER_IPV4_ADDRESS=y -# CONFIG_VERBOSE_RESOLUTION_ERRORS is not set -CONFIG_ARP=y -CONFIG_ARPING=y -CONFIG_BRCTL=y -CONFIG_FEATURE_BRCTL_FANCY=y -CONFIG_FEATURE_BRCTL_SHOW=y -CONFIG_DNSD=y -CONFIG_ETHER_WAKE=y -CONFIG_FAKEIDENTD=y -CONFIG_FTPD=y -CONFIG_FEATURE_FTP_WRITE=y -CONFIG_FEATURE_FTPD_ACCEPT_BROKEN_LIST=y -CONFIG_FTPGET=y -CONFIG_FTPPUT=y -CONFIG_FEATURE_FTPGETPUT_LONG_OPTIONS=y -CONFIG_HOSTNAME=y -CONFIG_HTTPD=y -CONFIG_FEATURE_HTTPD_RANGES=y -CONFIG_FEATURE_HTTPD_USE_SENDFILE=y -CONFIG_FEATURE_HTTPD_SETUID=y -CONFIG_FEATURE_HTTPD_BASIC_AUTH=y -CONFIG_FEATURE_HTTPD_AUTH_MD5=y -CONFIG_FEATURE_HTTPD_CGI=y -CONFIG_FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR=y -CONFIG_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV=y -CONFIG_FEATURE_HTTPD_ENCODE_URL_STR=y -CONFIG_FEATURE_HTTPD_ERROR_PAGES=y -CONFIG_FEATURE_HTTPD_PROXY=y -CONFIG_FEATURE_HTTPD_GZIP=y -CONFIG_IFCONFIG=y -CONFIG_FEATURE_IFCONFIG_STATUS=y -CONFIG_FEATURE_IFCONFIG_SLIP=y -CONFIG_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ=y -CONFIG_FEATURE_IFCONFIG_HW=y -CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS=y -CONFIG_IFENSLAVE=y -CONFIG_IFPLUGD=y -CONFIG_IFUPDOWN=y -CONFIG_IFUPDOWN_IFSTATE_PATH="/var/run/ifstate" -# CONFIG_FEATURE_IFUPDOWN_IP is not set -# CONFIG_FEATURE_IFUPDOWN_IP_BUILTIN is not set -CONFIG_FEATURE_IFUPDOWN_IFCONFIG_BUILTIN=y -CONFIG_FEATURE_IFUPDOWN_IPV4=y -CONFIG_FEATURE_IFUPDOWN_IPV6=y -CONFIG_FEATURE_IFUPDOWN_MAPPING=y -# CONFIG_FEATURE_IFUPDOWN_EXTERNAL_DHCP is not set -CONFIG_INETD=y -CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_ECHO=y -CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DISCARD=y -CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_TIME=y -CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DAYTIME=y -CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_CHARGEN=y -CONFIG_FEATURE_INETD_RPC=y -CONFIG_IP=y -CONFIG_FEATURE_IP_ADDRESS=y -CONFIG_FEATURE_IP_LINK=y -CONFIG_FEATURE_IP_ROUTE=y -CONFIG_FEATURE_IP_TUNNEL=y -CONFIG_FEATURE_IP_RULE=y -CONFIG_FEATURE_IP_SHORT_FORMS=y -# CONFIG_FEATURE_IP_RARE_PROTOCOLS is not set -CONFIG_IPADDR=y -CONFIG_IPLINK=y -CONFIG_IPROUTE=y -CONFIG_IPTUNNEL=y -CONFIG_IPRULE=y -CONFIG_IPCALC=y -CONFIG_FEATURE_IPCALC_FANCY=y -CONFIG_FEATURE_IPCALC_LONG_OPTIONS=y -CONFIG_NETSTAT=y -CONFIG_FEATURE_NETSTAT_WIDE=y -CONFIG_FEATURE_NETSTAT_PRG=y -CONFIG_NSLOOKUP=y -CONFIG_NTPD=y -CONFIG_FEATURE_NTPD_SERVER=y -CONFIG_PSCAN=y -CONFIG_ROUTE=y -CONFIG_SLATTACH=y -CONFIG_TCPSVD=y -CONFIG_TELNET=y -CONFIG_FEATURE_TELNET_TTYPE=y -CONFIG_FEATURE_TELNET_AUTOLOGIN=y -CONFIG_TELNETD=y -CONFIG_FEATURE_TELNETD_STANDALONE=y -CONFIG_FEATURE_TELNETD_INETD_WAIT=y -CONFIG_TFTP=y -CONFIG_TFTPD=y - -# -# Common options for tftp/tftpd -# -CONFIG_FEATURE_TFTP_GET=y -CONFIG_FEATURE_TFTP_PUT=y -CONFIG_FEATURE_TFTP_BLOCKSIZE=y -CONFIG_FEATURE_TFTP_PROGRESS_BAR=y -# CONFIG_TFTP_DEBUG is not set -CONFIG_TRACEROUTE=y -CONFIG_TRACEROUTE6=y -CONFIG_FEATURE_TRACEROUTE_VERBOSE=y -# CONFIG_FEATURE_TRACEROUTE_SOURCE_ROUTE is not set -# CONFIG_FEATURE_TRACEROUTE_USE_ICMP is not set -CONFIG_TUNCTL=y -CONFIG_FEATURE_TUNCTL_UG=y -CONFIG_UDHCPD=y -CONFIG_DHCPRELAY=y -CONFIG_DUMPLEASES=y -CONFIG_FEATURE_UDHCPD_WRITE_LEASES_EARLY=y -# CONFIG_FEATURE_UDHCPD_BASE_IP_ON_MAC is not set -CONFIG_DHCPD_LEASES_FILE="/var/lib/misc/udhcpd.leases" -CONFIG_UDHCPC=y -CONFIG_FEATURE_UDHCPC_ARPING=y -# CONFIG_FEATURE_UDHCP_PORT is not set -CONFIG_UDHCP_DEBUG=9 -CONFIG_FEATURE_UDHCP_RFC3397=y -CONFIG_FEATURE_UDHCP_8021Q=y -CONFIG_UDHCPC_DEFAULT_SCRIPT="/usr/share/udhcpc/default.script" -CONFIG_UDHCPC_SLACK_FOR_BUGGY_SERVERS=80 -CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS="-R -n" -CONFIG_UDPSVD=y -CONFIG_VCONFIG=y -CONFIG_WGET=y -CONFIG_FEATURE_WGET_STATUSBAR=y -CONFIG_FEATURE_WGET_AUTHENTICATION=y -CONFIG_FEATURE_WGET_LONG_OPTIONS=y -CONFIG_FEATURE_WGET_TIMEOUT=y -CONFIG_ZCIP=y - -# -# Print Utilities -# -CONFIG_LPD=y -CONFIG_LPR=y -CONFIG_LPQ=y - -# -# Mail Utilities -# -CONFIG_MAKEMIME=y -CONFIG_FEATURE_MIME_CHARSET="us-ascii" -CONFIG_POPMAILDIR=y -CONFIG_FEATURE_POPMAILDIR_DELIVERY=y -CONFIG_REFORMIME=y -CONFIG_FEATURE_REFORMIME_COMPAT=y -CONFIG_SENDMAIL=y - -# -# Process Utilities -# -CONFIG_IOSTAT=y -CONFIG_MPSTAT=y -CONFIG_NMETER=y -CONFIG_PMAP=y -CONFIG_POWERTOP=y -CONFIG_PSTREE=y -CONFIG_PWDX=y -CONFIG_SMEMCAP=y -CONFIG_UPTIME=y -CONFIG_FEATURE_UPTIME_UTMP_SUPPORT=y -CONFIG_FREE=y -CONFIG_FUSER=y -CONFIG_KILL=y -CONFIG_KILLALL=y -CONFIG_KILLALL5=y -CONFIG_PGREP=y -CONFIG_PIDOF=y -CONFIG_FEATURE_PIDOF_SINGLE=y -CONFIG_FEATURE_PIDOF_OMIT=y -CONFIG_PKILL=y -CONFIG_PS=y -CONFIG_FEATURE_PS_WIDE=y -# CONFIG_FEATURE_PS_TIME is not set -# CONFIG_FEATURE_PS_ADDITIONAL_COLUMNS is not set -# CONFIG_FEATURE_PS_UNUSUAL_SYSTEMS is not set -CONFIG_RENICE=y -CONFIG_BB_SYSCTL=y -CONFIG_TOP=y -CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE=y -CONFIG_FEATURE_TOP_CPU_GLOBAL_PERCENTS=y -CONFIG_FEATURE_TOP_SMP_CPU=y -CONFIG_FEATURE_TOP_DECIMALS=y -CONFIG_FEATURE_TOP_SMP_PROCESS=y -CONFIG_FEATURE_TOPMEM=y -CONFIG_FEATURE_SHOW_THREADS=y -CONFIG_WATCH=y - -# -# Runit Utilities -# -CONFIG_RUNSV=y -CONFIG_RUNSVDIR=y -# CONFIG_FEATURE_RUNSVDIR_LOG is not set -CONFIG_SV=y -CONFIG_SV_DEFAULT_SERVICE_DIR="/var/service" -CONFIG_SVLOGD=y -CONFIG_CHPST=y -CONFIG_SETUIDGID=y -CONFIG_ENVUIDGID=y -CONFIG_ENVDIR=y -CONFIG_SOFTLIMIT=y -# CONFIG_CHCON is not set -# CONFIG_FEATURE_CHCON_LONG_OPTIONS is not set -# CONFIG_GETENFORCE is not set -# CONFIG_GETSEBOOL is not set -# CONFIG_LOAD_POLICY is not set -# CONFIG_MATCHPATHCON is not set -# CONFIG_RESTORECON is not set -# CONFIG_RUNCON is not set -# CONFIG_FEATURE_RUNCON_LONG_OPTIONS is not set -# CONFIG_SELINUXENABLED is not set -# CONFIG_SETENFORCE is not set -# CONFIG_SETFILES is not set -# CONFIG_FEATURE_SETFILES_CHECK_OPTION is not set -# CONFIG_SETSEBOOL is not set -# CONFIG_SESTATUS is not set - -# -# Shells -# -CONFIG_ASH=y -CONFIG_ASH_BASH_COMPAT=y -# CONFIG_ASH_IDLE_TIMEOUT is not set -CONFIG_ASH_JOB_CONTROL=y -CONFIG_ASH_ALIAS=y -CONFIG_ASH_GETOPTS=y -CONFIG_ASH_BUILTIN_ECHO=y -CONFIG_ASH_BUILTIN_PRINTF=y -CONFIG_ASH_BUILTIN_TEST=y -CONFIG_ASH_CMDCMD=y -# CONFIG_ASH_MAIL is not set -CONFIG_ASH_OPTIMIZE_FOR_SIZE=y -CONFIG_ASH_RANDOM_SUPPORT=y -CONFIG_ASH_EXPAND_PRMT=y -CONFIG_CTTYHACK=y -CONFIG_HUSH=y -CONFIG_HUSH_BASH_COMPAT=y -CONFIG_HUSH_BRACE_EXPANSION=y -CONFIG_HUSH_HELP=y -CONFIG_HUSH_INTERACTIVE=y -CONFIG_HUSH_SAVEHISTORY=y -CONFIG_HUSH_JOB=y -CONFIG_HUSH_TICK=y -CONFIG_HUSH_IF=y -CONFIG_HUSH_LOOPS=y -CONFIG_HUSH_CASE=y -CONFIG_HUSH_FUNCTIONS=y -CONFIG_HUSH_LOCAL=y -CONFIG_HUSH_RANDOM_SUPPORT=y -CONFIG_HUSH_EXPORT_N=y -CONFIG_HUSH_MODE_X=y -# CONFIG_MSH is not set -CONFIG_FEATURE_SH_IS_ASH=y -# CONFIG_FEATURE_SH_IS_HUSH is not set -# CONFIG_FEATURE_SH_IS_NONE is not set -# CONFIG_FEATURE_BASH_IS_ASH is not set -# CONFIG_FEATURE_BASH_IS_HUSH is not set -CONFIG_FEATURE_BASH_IS_NONE=y -CONFIG_SH_MATH_SUPPORT=y -CONFIG_SH_MATH_SUPPORT_64=y -CONFIG_FEATURE_SH_EXTRA_QUIET=y -# CONFIG_FEATURE_SH_STANDALONE is not set -# CONFIG_FEATURE_SH_NOFORK is not set -CONFIG_FEATURE_SH_HISTFILESIZE=y - -# -# System Logging Utilities -# -CONFIG_SYSLOGD=y -CONFIG_FEATURE_ROTATE_LOGFILE=y -CONFIG_FEATURE_REMOTE_LOG=y -CONFIG_FEATURE_SYSLOGD_DUP=y -CONFIG_FEATURE_SYSLOGD_CFG=y -CONFIG_FEATURE_SYSLOGD_READ_BUFFER_SIZE=256 -CONFIG_FEATURE_IPC_SYSLOG=y -CONFIG_FEATURE_IPC_SYSLOG_BUFFER_SIZE=16 -CONFIG_LOGREAD=y -CONFIG_FEATURE_LOGREAD_REDUCED_LOCKING=y -CONFIG_KLOGD=y -CONFIG_FEATURE_KLOGD_KLOGCTL=y -CONFIG_LOGGER=y diff --git a/meta-fsl-ppc/recipes-append/busybox/busybox-1.19.4/inetd b/meta-fsl-ppc/recipes-append/busybox/busybox-1.19.4/inetd deleted file mode 100644 index cf50bcd5..00000000 --- a/meta-fsl-ppc/recipes-append/busybox/busybox-1.19.4/inetd +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/sh -# -# start/stop inetd super server. - -if ! [ -x /usr/sbin/inetd ]; then - exit 0 -fi - -case "$1" in - start) - echo -n "Starting internet superserver:" - echo -n " inetd" ; start-stop-daemon -S -x /usr/sbin/inetd > /dev/null - echo "." - ;; - stop) - echo -n "Stopping internet superserver:" - echo -n " inetd" ; start-stop-daemon -K -x /usr/sbin/inetd > /dev/null - echo "." - ;; - restart) - echo -n "Restarting internet superserver:" - echo -n " inetd " - killall -HUP inetd - echo "." - ;; - *) - echo "Usage: /etc/init.d/inetd {start|stop|restart}" - exit 1 - ;; -esac - -exit 0 - diff --git a/meta-fsl-ppc/recipes-append/busybox/busybox-1.19.4/inetd.conf b/meta-fsl-ppc/recipes-append/busybox/busybox-1.19.4/inetd.conf deleted file mode 100644 index b02fe850..00000000 --- a/meta-fsl-ppc/recipes-append/busybox/busybox-1.19.4/inetd.conf +++ /dev/null @@ -1,20 +0,0 @@ -# /etc/inetd.conf: see inetd(8) for further informations. -# -# Internet server configuration database -# -# If you want to disable an entry so it isn't touched during -# package updates just comment it out with a single '#' character. -# -# -# -#:INTERNAL: Internal services -#echo stream tcp nowait root internal -#echo dgram udp wait root internal -#chargen stream tcp nowait root internal -#chargen dgram udp wait root internal -#discard stream tcp nowait root internal -#discard dgram udp wait root internal -#daytime stream tcp nowait root internal -#daytime dgram udp wait root internal -#time stream tcp nowait root internal -#time dgram udp wait root internal diff --git a/meta-fsl-ppc/recipes-append/busybox/busybox_1.19.4.bbappend b/meta-fsl-ppc/recipes-append/busybox/busybox_1.19.4.bbappend deleted file mode 100644 index 60d8b250..00000000 --- a/meta-fsl-ppc/recipes-append/busybox/busybox_1.19.4.bbappend +++ /dev/null @@ -1,15 +0,0 @@ -PR_append_fsl = "+${DISTRO}.0" - -FILESEXTRAPATHS_prepend_fsl := "${THISDIR}/busybox-1.19.4:" - -SRC_URI_append_fsl += "file://defconfig-fsl \ - file://busybox-1.19.4-ubi-user-h.patch \ - file://inetd \ - file://inetd.conf \ -" - -do_configure_prepend_fsl () { - cp ${WORKDIR}/defconfig-fsl ${WORKDIR}/defconfig -} - - -- cgit v1.2.3-54-g00ecf From 2e009079e47dc37bcc29748d58ed99eb259ee2a4 Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Thu, 13 Sep 2012 11:44:05 -0500 Subject: boot-format_git.bb: update GPL license to GPLv2 (no actually change in license) Signed-off-by: Matthew McClintock --- meta-fsl-ppc/recipes-tools/boot-format/boot-format_git.bb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meta-fsl-ppc/recipes-tools/boot-format/boot-format_git.bb b/meta-fsl-ppc/recipes-tools/boot-format/boot-format_git.bb index d1cbdd31..969136e3 100644 --- a/meta-fsl-ppc/recipes-tools/boot-format/boot-format_git.bb +++ b/meta-fsl-ppc/recipes-tools/boot-format/boot-format_git.bb @@ -1,6 +1,6 @@ DESCRIPTION = "Boot format utility for booting from eSDHC/eSPI" -LICENSE = "GPL" -PR = "r4" +LICENSE = "GPLv2" +PR = "r5" LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" SRC_URI = "git://git.freescale.com/ppc/sdk/boot-format.git\ -- cgit v1.2.3-54-g00ecf From 0cac2d5dcead6033d24f2bc332e6cd9b06ced0d3 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Wed, 12 Sep 2012 15:06:28 +0800 Subject: busybox: add fsl customized defconfig 1.use largest general-purpose configuration 2.add a patch to fix possible build issue with kernel 3.0 reference: http://www.gossamer-threads.com/lists/linux/kernel/1418363 Signed-off-by: Ting Liu --- .../busybox-1.20.2/busybox-1.19.4-ubi-user-h.patch | 419 ++++++++ .../busybox/busybox-1.20.2/defconfig-fsl | 1013 ++++++++++++++++++++ .../recipes-append/busybox/busybox-1.20.2/inetd | 33 + .../busybox/busybox-1.20.2/inetd.conf | 20 + .../recipes-append/busybox/busybox_1.20.2.bbappend | 15 + 5 files changed, 1500 insertions(+) create mode 100644 meta-fsl-ppc/recipes-append/busybox/busybox-1.20.2/busybox-1.19.4-ubi-user-h.patch create mode 100644 meta-fsl-ppc/recipes-append/busybox/busybox-1.20.2/defconfig-fsl create mode 100644 meta-fsl-ppc/recipes-append/busybox/busybox-1.20.2/inetd create mode 100644 meta-fsl-ppc/recipes-append/busybox/busybox-1.20.2/inetd.conf create mode 100644 meta-fsl-ppc/recipes-append/busybox/busybox_1.20.2.bbappend diff --git a/meta-fsl-ppc/recipes-append/busybox/busybox-1.20.2/busybox-1.19.4-ubi-user-h.patch b/meta-fsl-ppc/recipes-append/busybox/busybox-1.20.2/busybox-1.19.4-ubi-user-h.patch new file mode 100644 index 00000000..42bcfa92 --- /dev/null +++ b/meta-fsl-ppc/recipes-append/busybox/busybox-1.20.2/busybox-1.19.4-ubi-user-h.patch @@ -0,0 +1,419 @@ +20110926 Juergen Lambrecht +This patch add an include file from mtd-utils. + +diff --exclude CVS --exclude .git -uNr busybox-1.19.4/include/mtd/ubi-user.h busybox-1.19.4.modified/include/mtd/ubi-user.h +--- busybox-1.19.4/include/mtd/ubi-user.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.19.4.modified/include/mtd/ubi-user.h 2011-09-26 15:48:54.884088675 +0200 +@@ -0,0 +1,412 @@ ++/* ++ * Copyright (c) International Business Machines Corp., 2006 ++ * ++ * 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 2 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, write to the Free Software ++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ++ * ++ * Author: Artem Bityutskiy (???????? ?????) ++ */ ++ ++#ifndef __UBI_USER_H__ ++#define __UBI_USER_H__ ++ ++#include ++ ++/* ++ * UBI device creation (the same as MTD device attachment) ++ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++ * ++ * MTD devices may be attached using %UBI_IOCATT ioctl command of the UBI ++ * control device. The caller has to properly fill and pass ++ * &struct ubi_attach_req object - UBI will attach the MTD device specified in ++ * the request and return the newly created UBI device number as the ioctl ++ * return value. ++ * ++ * UBI device deletion (the same as MTD device detachment) ++ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++ * ++ * An UBI device maybe deleted with %UBI_IOCDET ioctl command of the UBI ++ * control device. ++ * ++ * UBI volume creation ++ * ~~~~~~~~~~~~~~~~~~~ ++ * ++ * UBI volumes are created via the %UBI_IOCMKVOL ioctl command of UBI character ++ * device. A &struct ubi_mkvol_req object has to be properly filled and a ++ * pointer to it has to be passed to the ioctl. ++ * ++ * UBI volume deletion ++ * ~~~~~~~~~~~~~~~~~~~ ++ * ++ * To delete a volume, the %UBI_IOCRMVOL ioctl command of the UBI character ++ * device should be used. A pointer to the 32-bit volume ID hast to be passed ++ * to the ioctl. ++ * ++ * UBI volume re-size ++ * ~~~~~~~~~~~~~~~~~~ ++ * ++ * To re-size a volume, the %UBI_IOCRSVOL ioctl command of the UBI character ++ * device should be used. A &struct ubi_rsvol_req object has to be properly ++ * filled and a pointer to it has to be passed to the ioctl. ++ * ++ * UBI volumes re-name ++ * ~~~~~~~~~~~~~~~~~~~ ++ * ++ * To re-name several volumes atomically at one go, the %UBI_IOCRNVOL command ++ * of the UBI character device should be used. A &struct ubi_rnvol_req object ++ * has to be properly filled and a pointer to it has to be passed to the ioctl. ++ * ++ * UBI volume update ++ * ~~~~~~~~~~~~~~~~~ ++ * ++ * Volume update should be done via the %UBI_IOCVOLUP ioctl command of the ++ * corresponding UBI volume character device. A pointer to a 64-bit update ++ * size should be passed to the ioctl. After this, UBI expects user to write ++ * this number of bytes to the volume character device. The update is finished ++ * when the claimed number of bytes is passed. So, the volume update sequence ++ * is something like: ++ * ++ * fd = open("/dev/my_volume"); ++ * ioctl(fd, UBI_IOCVOLUP, &image_size); ++ * write(fd, buf, image_size); ++ * close(fd); ++ * ++ * Logical eraseblock erase ++ * ~~~~~~~~~~~~~~~~~~~~~~~~ ++ * ++ * To erase a logical eraseblock, the %UBI_IOCEBER ioctl command of the ++ * corresponding UBI volume character device should be used. This command ++ * unmaps the requested logical eraseblock, makes sure the corresponding ++ * physical eraseblock is successfully erased, and returns. ++ * ++ * Atomic logical eraseblock change ++ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++ * ++ * Atomic logical eraseblock change operation is called using the %UBI_IOCEBCH ++ * ioctl command of the corresponding UBI volume character device. A pointer to ++ * a &struct ubi_leb_change_req object has to be passed to the ioctl. Then the ++ * user is expected to write the requested amount of bytes (similarly to what ++ * should be done in case of the "volume update" ioctl). ++ * ++ * Logical eraseblock map ++ * ~~~~~~~~~~~~~~~~~~~~~ ++ * ++ * To map a logical eraseblock to a physical eraseblock, the %UBI_IOCEBMAP ++ * ioctl command should be used. A pointer to a &struct ubi_map_req object is ++ * expected to be passed. The ioctl maps the requested logical eraseblock to ++ * a physical eraseblock and returns. Only non-mapped logical eraseblocks can ++ * be mapped. If the logical eraseblock specified in the request is already ++ * mapped to a physical eraseblock, the ioctl fails and returns error. ++ * ++ * Logical eraseblock unmap ++ * ~~~~~~~~~~~~~~~~~~~~~~~~ ++ * ++ * To unmap a logical eraseblock to a physical eraseblock, the %UBI_IOCEBUNMAP ++ * ioctl command should be used. The ioctl unmaps the logical eraseblocks, ++ * schedules corresponding physical eraseblock for erasure, and returns. Unlike ++ * the "LEB erase" command, it does not wait for the physical eraseblock being ++ * erased. Note, the side effect of this is that if an unclean reboot happens ++ * after the unmap ioctl returns, you may find the LEB mapped again to the same ++ * physical eraseblock after the UBI is run again. ++ * ++ * Check if logical eraseblock is mapped ++ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++ * ++ * To check if a logical eraseblock is mapped to a physical eraseblock, the ++ * %UBI_IOCEBISMAP ioctl command should be used. It returns %0 if the LEB is ++ * not mapped, and %1 if it is mapped. ++ * ++ * Set an UBI volume property ++ * ~~~~~~~~~~~~~~~~~~~~~~~~~ ++ * ++ * To set an UBI volume property the %UBI_IOCSETPROP ioctl command should be ++ * used. A pointer to a &struct ubi_set_prop_req object is expected to be ++ * passed. The object describes which property should be set, and to which value ++ * it should be set. ++ */ ++ ++/* ++ * When a new UBI volume or UBI device is created, users may either specify the ++ * volume/device number they want to create or to let UBI automatically assign ++ * the number using these constants. ++ */ ++#define UBI_VOL_NUM_AUTO (-1) ++#define UBI_DEV_NUM_AUTO (-1) ++ ++/* Maximum volume name length */ ++#define UBI_MAX_VOLUME_NAME 127 ++ ++/* ioctl commands of UBI character devices */ ++ ++#define UBI_IOC_MAGIC 'o' ++ ++/* Create an UBI volume */ ++#define UBI_IOCMKVOL _IOW(UBI_IOC_MAGIC, 0, struct ubi_mkvol_req) ++/* Remove an UBI volume */ ++#define UBI_IOCRMVOL _IOW(UBI_IOC_MAGIC, 1, __s32) ++/* Re-size an UBI volume */ ++#define UBI_IOCRSVOL _IOW(UBI_IOC_MAGIC, 2, struct ubi_rsvol_req) ++/* Re-name volumes */ ++#define UBI_IOCRNVOL _IOW(UBI_IOC_MAGIC, 3, struct ubi_rnvol_req) ++ ++/* ioctl commands of the UBI control character device */ ++ ++#define UBI_CTRL_IOC_MAGIC 'o' ++ ++/* Attach an MTD device */ ++#define UBI_IOCATT _IOW(UBI_CTRL_IOC_MAGIC, 64, struct ubi_attach_req) ++/* Detach an MTD device */ ++#define UBI_IOCDET _IOW(UBI_CTRL_IOC_MAGIC, 65, __s32) ++ ++/* ioctl commands of UBI volume character devices */ ++ ++#define UBI_VOL_IOC_MAGIC 'O' ++ ++/* Start UBI volume update */ ++#define UBI_IOCVOLUP _IOW(UBI_VOL_IOC_MAGIC, 0, __s64) ++/* LEB erasure command, used for debugging, disabled by default */ ++#define UBI_IOCEBER _IOW(UBI_VOL_IOC_MAGIC, 1, __s32) ++/* Atomic LEB change command */ ++#define UBI_IOCEBCH _IOW(UBI_VOL_IOC_MAGIC, 2, __s32) ++/* Map LEB command */ ++#define UBI_IOCEBMAP _IOW(UBI_VOL_IOC_MAGIC, 3, struct ubi_map_req) ++/* Unmap LEB command */ ++#define UBI_IOCEBUNMAP _IOW(UBI_VOL_IOC_MAGIC, 4, __s32) ++/* Check if LEB is mapped command */ ++#define UBI_IOCEBISMAP _IOR(UBI_VOL_IOC_MAGIC, 5, __s32) ++/* Set an UBI volume property */ ++#define UBI_IOCSETPROP _IOW(UBI_VOL_IOC_MAGIC, 6, struct ubi_set_prop_req) ++ ++/* Maximum MTD device name length supported by UBI */ ++#define MAX_UBI_MTD_NAME_LEN 127 ++ ++/* Maximum amount of UBI volumes that can be re-named at one go */ ++#define UBI_MAX_RNVOL 32 ++ ++/* ++ * UBI data type hint constants. ++ * ++ * UBI_LONGTERM: long-term data ++ * UBI_SHORTTERM: short-term data ++ * UBI_UNKNOWN: data persistence is unknown ++ * ++ * These constants are used when data is written to UBI volumes in order to ++ * help the UBI wear-leveling unit to find more appropriate physical ++ * eraseblocks. ++ */ ++enum { ++ UBI_LONGTERM = 1, ++ UBI_SHORTTERM = 2, ++ UBI_UNKNOWN = 3, ++}; ++ ++/* ++ * UBI volume type constants. ++ * ++ * @UBI_DYNAMIC_VOLUME: dynamic volume ++ * @UBI_STATIC_VOLUME: static volume ++ */ ++enum { ++ UBI_DYNAMIC_VOLUME = 3, ++ UBI_STATIC_VOLUME = 4, ++}; ++ ++/* ++ * UBI set property ioctl constants ++ * ++ * @UBI_PROP_DIRECT_WRITE: allow / disallow user to directly write and ++ * erase individual eraseblocks on dynamic volumes ++ */ ++enum { ++ UBI_PROP_DIRECT_WRITE = 1, ++}; ++ ++/** ++ * struct ubi_attach_req - attach MTD device request. ++ * @ubi_num: UBI device number to create ++ * @mtd_num: MTD device number to attach ++ * @vid_hdr_offset: VID header offset (use defaults if %0) ++ * @padding: reserved for future, not used, has to be zeroed ++ * ++ * This data structure is used to specify MTD device UBI has to attach and the ++ * parameters it has to use. The number which should be assigned to the new UBI ++ * device is passed in @ubi_num. UBI may automatically assign the number if ++ * @UBI_DEV_NUM_AUTO is passed. In this case, the device number is returned in ++ * @ubi_num. ++ * ++ * Most applications should pass %0 in @vid_hdr_offset to make UBI use default ++ * offset of the VID header within physical eraseblocks. The default offset is ++ * the next min. I/O unit after the EC header. For example, it will be offset ++ * 512 in case of a 512 bytes page NAND flash with no sub-page support. Or ++ * it will be 512 in case of a 2KiB page NAND flash with 4 512-byte sub-pages. ++ * ++ * But in rare cases, if this optimizes things, the VID header may be placed to ++ * a different offset. For example, the boot-loader might do things faster if ++ * the VID header sits at the end of the first 2KiB NAND page with 4 sub-pages. ++ * As the boot-loader would not normally need to read EC headers (unless it ++ * needs UBI in RW mode), it might be faster to calculate ECC. This is weird ++ * example, but it real-life example. So, in this example, @vid_hdr_offer would ++ * be 2KiB-64 bytes = 1984. Note, that this position is not even 512-bytes ++ * aligned, which is OK, as UBI is clever enough to realize this is 4th ++ * sub-page of the first page and add needed padding. ++ */ ++struct ubi_attach_req { ++ __s32 ubi_num; ++ __s32 mtd_num; ++ __s32 vid_hdr_offset; ++ __s8 padding[12]; ++}; ++ ++/** ++ * struct ubi_mkvol_req - volume description data structure used in ++ * volume creation requests. ++ * @vol_id: volume number ++ * @alignment: volume alignment ++ * @bytes: volume size in bytes ++ * @vol_type: volume type (%UBI_DYNAMIC_VOLUME or %UBI_STATIC_VOLUME) ++ * @padding1: reserved for future, not used, has to be zeroed ++ * @name_len: volume name length ++ * @padding2: reserved for future, not used, has to be zeroed ++ * @name: volume name ++ * ++ * This structure is used by user-space programs when creating new volumes. The ++ * @used_bytes field is only necessary when creating static volumes. ++ * ++ * The @alignment field specifies the required alignment of the volume logical ++ * eraseblock. This means, that the size of logical eraseblocks will be aligned ++ * to this number, i.e., ++ * (UBI device logical eraseblock size) mod (@alignment) = 0. ++ * ++ * To put it differently, the logical eraseblock of this volume may be slightly ++ * shortened in order to make it properly aligned. The alignment has to be ++ * multiple of the flash minimal input/output unit, or %1 to utilize the entire ++ * available space of logical eraseblocks. ++ * ++ * The @alignment field may be useful, for example, when one wants to maintain ++ * a block device on top of an UBI volume. In this case, it is desirable to fit ++ * an integer number of blocks in logical eraseblocks of this UBI volume. With ++ * alignment it is possible to update this volume using plane UBI volume image ++ * BLOBs, without caring about how to properly align them. ++ */ ++struct ubi_mkvol_req { ++ __s32 vol_id; ++ __s32 alignment; ++ __s64 bytes; ++ __s8 vol_type; ++ __s8 padding1; ++ __s16 name_len; ++ __s8 padding2[4]; ++ char name[UBI_MAX_VOLUME_NAME + 1]; ++} __attribute__ ((packed)); ++ ++/** ++ * struct ubi_rsvol_req - a data structure used in volume re-size requests. ++ * @vol_id: ID of the volume to re-size ++ * @bytes: new size of the volume in bytes ++ * ++ * Re-sizing is possible for both dynamic and static volumes. But while dynamic ++ * volumes may be re-sized arbitrarily, static volumes cannot be made to be ++ * smaller than the number of bytes they bear. To arbitrarily shrink a static ++ * volume, it must be wiped out first (by means of volume update operation with ++ * zero number of bytes). ++ */ ++struct ubi_rsvol_req { ++ __s64 bytes; ++ __s32 vol_id; ++} __attribute__ ((packed)); ++ ++/** ++ * struct ubi_rnvol_req - volumes re-name request. ++ * @count: count of volumes to re-name ++ * @padding1: reserved for future, not used, has to be zeroed ++ * @vol_id: ID of the volume to re-name ++ * @name_len: name length ++ * @padding2: reserved for future, not used, has to be zeroed ++ * @name: new volume name ++ * ++ * UBI allows to re-name up to %32 volumes at one go. The count of volumes to ++ * re-name is specified in the @count field. The ID of the volumes to re-name ++ * and the new names are specified in the @vol_id and @name fields. ++ * ++ * The UBI volume re-name operation is atomic, which means that should power cut ++ * happen, the volumes will have either old name or new name. So the possible ++ * use-cases of this command is atomic upgrade. Indeed, to upgrade, say, volumes ++ * A and B one may create temporary volumes %A1 and %B1 with the new contents, ++ * then atomically re-name A1->A and B1->B, in which case old %A and %B will ++ * be removed. ++ * ++ * If it is not desirable to remove old A and B, the re-name request has to ++ * contain 4 entries: A1->A, A->A1, B1->B, B->B1, in which case old A1 and B1 ++ * become A and B, and old A and B will become A1 and B1. ++ * ++ * It is also OK to request: A1->A, A1->X, B1->B, B->Y, in which case old A1 ++ * and B1 become A and B, and old A and B become X and Y. ++ * ++ * In other words, in case of re-naming into an existing volume name, the ++ * existing volume is removed, unless it is re-named as well at the same ++ * re-name request. ++ */ ++struct ubi_rnvol_req { ++ __s32 count; ++ __s8 padding1[12]; ++ struct { ++ __s32 vol_id; ++ __s16 name_len; ++ __s8 padding2[2]; ++ char name[UBI_MAX_VOLUME_NAME + 1]; ++ } ents[UBI_MAX_RNVOL]; ++} __attribute__ ((packed)); ++ ++/** ++ * struct ubi_leb_change_req - a data structure used in atomic LEB change ++ * requests. ++ * @lnum: logical eraseblock number to change ++ * @bytes: how many bytes will be written to the logical eraseblock ++ * @dtype: data type (%UBI_LONGTERM, %UBI_SHORTTERM, %UBI_UNKNOWN) ++ * @padding: reserved for future, not used, has to be zeroed ++ */ ++struct ubi_leb_change_req { ++ __s32 lnum; ++ __s32 bytes; ++ __s8 dtype; ++ __s8 padding[7]; ++} __attribute__ ((packed)); ++ ++/** ++ * struct ubi_map_req - a data structure used in map LEB requests. ++ * @lnum: logical eraseblock number to unmap ++ * @dtype: data type (%UBI_LONGTERM, %UBI_SHORTTERM, %UBI_UNKNOWN) ++ * @padding: reserved for future, not used, has to be zeroed ++ */ ++struct ubi_map_req { ++ __s32 lnum; ++ __s8 dtype; ++ __s8 padding[3]; ++} __attribute__ ((packed)); ++ ++ ++/** ++ * struct ubi_set_prop_req - a data structure used to set an ubi volume ++ * property. ++ * @property: property to set (%UBI_PROP_DIRECT_WRITE) ++ * @padding: reserved for future, not used, has to be zeroed ++ * @value: value to set ++ */ ++struct ubi_set_prop_req { ++ __u8 property; ++ __u8 padding[7]; ++ __u64 value; ++} __attribute__ ((packed)); ++ ++#endif /* __UBI_USER_H__ */ diff --git a/meta-fsl-ppc/recipes-append/busybox/busybox-1.20.2/defconfig-fsl b/meta-fsl-ppc/recipes-append/busybox/busybox-1.20.2/defconfig-fsl new file mode 100644 index 00000000..52d5bbfd --- /dev/null +++ b/meta-fsl-ppc/recipes-append/busybox/busybox-1.20.2/defconfig-fsl @@ -0,0 +1,1013 @@ +# +# Automatically generated make config: don't edit +# Busybox version: 1.19.4 +# Mon Aug 20 15:36:39 2012 +# +CONFIG_HAVE_DOT_CONFIG=y + +# +# Busybox Settings +# + +# +# General Configuration +# +# CONFIG_DESKTOP is not set +# CONFIG_EXTRA_COMPAT is not set +CONFIG_INCLUDE_SUSv2=y +# CONFIG_USE_PORTABLE_CODE is not set +CONFIG_PLATFORM_LINUX=y +CONFIG_FEATURE_BUFFERS_USE_MALLOC=y +# CONFIG_FEATURE_BUFFERS_GO_ON_STACK is not set +# CONFIG_FEATURE_BUFFERS_GO_IN_BSS is not set +CONFIG_SHOW_USAGE=y +# CONFIG_FEATURE_VERBOSE_USAGE is not set +CONFIG_FEATURE_COMPRESS_USAGE=y +# CONFIG_FEATURE_INSTALLER is not set +# CONFIG_INSTALL_NO_USR is not set +CONFIG_LOCALE_SUPPORT=y +# CONFIG_UNICODE_SUPPORT is not set +# CONFIG_UNICODE_USING_LOCALE is not set +# CONFIG_FEATURE_CHECK_UNICODE_IN_ENV is not set +CONFIG_SUBST_WCHAR=0 +CONFIG_LAST_SUPPORTED_WCHAR=0 +# CONFIG_UNICODE_COMBINING_WCHARS is not set +# CONFIG_UNICODE_WIDE_WCHARS is not set +# CONFIG_UNICODE_BIDI_SUPPORT is not set +# CONFIG_UNICODE_NEUTRAL_TABLE is not set +# CONFIG_UNICODE_PRESERVE_BROKEN is not set +CONFIG_LONG_OPTS=y +CONFIG_FEATURE_DEVPTS=y +# CONFIG_FEATURE_CLEAN_UP is not set +CONFIG_FEATURE_UTMP=y +CONFIG_FEATURE_WTMP=y +CONFIG_FEATURE_PIDFILE=y +CONFIG_FEATURE_SUID=y +CONFIG_FEATURE_SUID_CONFIG=y +CONFIG_FEATURE_SUID_CONFIG_QUIET=y +# CONFIG_SELINUX is not set +# CONFIG_FEATURE_PREFER_APPLETS is not set +CONFIG_BUSYBOX_EXEC_PATH="/proc/self/exe" +CONFIG_FEATURE_SYSLOG=y +CONFIG_FEATURE_HAVE_RPC=y + +# +# Build Options +# +# CONFIG_STATIC is not set +# CONFIG_PIE is not set +# CONFIG_NOMMU is not set +# CONFIG_BUILD_LIBBUSYBOX is not set +# CONFIG_FEATURE_INDIVIDUAL is not set +# CONFIG_FEATURE_SHARED_BUSYBOX is not set +CONFIG_LFS=y +CONFIG_CROSS_COMPILER_PREFIX="" +CONFIG_EXTRA_CFLAGS="" + +# +# Debugging Options +# +# CONFIG_DEBUG is not set +# CONFIG_DEBUG_PESSIMIZE is not set +# CONFIG_WERROR is not set +CONFIG_NO_DEBUG_LIB=y +# CONFIG_DMALLOC is not set +# CONFIG_EFENCE is not set + +# +# Installation Options ("make install" behavior) +# +CONFIG_INSTALL_APPLET_SYMLINKS=y +# CONFIG_INSTALL_APPLET_HARDLINKS is not set +# CONFIG_INSTALL_APPLET_SCRIPT_WRAPPERS is not set +# CONFIG_INSTALL_APPLET_DONT is not set +# CONFIG_INSTALL_SH_APPLET_SYMLINK is not set +# CONFIG_INSTALL_SH_APPLET_HARDLINK is not set +# CONFIG_INSTALL_SH_APPLET_SCRIPT_WRAPPER is not set +CONFIG_PREFIX="./_install" + +# +# Busybox Library Tuning +# +CONFIG_FEATURE_SYSTEMD=y +CONFIG_FEATURE_RTMINMAX=y +CONFIG_PASSWORD_MINLEN=6 +CONFIG_MD5_SIZE_VS_SPEED=2 +CONFIG_FEATURE_FAST_TOP=y +# CONFIG_FEATURE_ETC_NETWORKS is not set +CONFIG_FEATURE_USE_TERMIOS=y +CONFIG_FEATURE_EDITING=y +CONFIG_FEATURE_EDITING_MAX_LEN=1024 +# CONFIG_FEATURE_EDITING_VI is not set +CONFIG_FEATURE_EDITING_HISTORY=255 +CONFIG_FEATURE_EDITING_SAVEHISTORY=y +CONFIG_FEATURE_REVERSE_SEARCH=y +CONFIG_FEATURE_TAB_COMPLETION=y +# CONFIG_FEATURE_USERNAME_COMPLETION is not set +CONFIG_FEATURE_EDITING_FANCY_PROMPT=y +# CONFIG_FEATURE_EDITING_ASK_TERMINAL is not set +CONFIG_FEATURE_NON_POSIX_CP=y +# CONFIG_FEATURE_VERBOSE_CP_MESSAGE is not set +CONFIG_FEATURE_COPYBUF_KB=4 +CONFIG_FEATURE_SKIP_ROOTFS=y +CONFIG_MONOTONIC_SYSCALL=y +CONFIG_IOCTL_HEX2STR_ERROR=y +CONFIG_FEATURE_HWIB=y + +# +# Applets +# + +# +# Archival Utilities +# +CONFIG_FEATURE_SEAMLESS_XZ=y +CONFIG_FEATURE_SEAMLESS_LZMA=y +CONFIG_FEATURE_SEAMLESS_BZ2=y +CONFIG_FEATURE_SEAMLESS_GZ=y +CONFIG_FEATURE_SEAMLESS_Z=y +CONFIG_AR=y +CONFIG_FEATURE_AR_LONG_FILENAMES=y +CONFIG_FEATURE_AR_CREATE=y +CONFIG_BUNZIP2=y +CONFIG_BZIP2=y +CONFIG_CPIO=y +CONFIG_FEATURE_CPIO_O=y +CONFIG_FEATURE_CPIO_P=y +# CONFIG_DPKG is not set +# CONFIG_DPKG_DEB is not set +# CONFIG_FEATURE_DPKG_DEB_EXTRACT_ONLY is not set +CONFIG_GUNZIP=y +CONFIG_GZIP=y +CONFIG_FEATURE_GZIP_LONG_OPTIONS=y +CONFIG_LZOP=y +# CONFIG_LZOP_COMPR_HIGH is not set +CONFIG_RPM2CPIO=y +CONFIG_RPM=y +CONFIG_TAR=y +CONFIG_FEATURE_TAR_CREATE=y +CONFIG_FEATURE_TAR_AUTODETECT=y +CONFIG_FEATURE_TAR_FROM=y +CONFIG_FEATURE_TAR_OLDGNU_COMPATIBILITY=y +CONFIG_FEATURE_TAR_OLDSUN_COMPATIBILITY=y +CONFIG_FEATURE_TAR_GNU_EXTENSIONS=y +CONFIG_FEATURE_TAR_LONG_OPTIONS=y +CONFIG_FEATURE_TAR_TO_COMMAND=y +CONFIG_FEATURE_TAR_UNAME_GNAME=y +CONFIG_FEATURE_TAR_NOPRESERVE_TIME=y +# CONFIG_FEATURE_TAR_SELINUX is not set +# CONFIG_UNCOMPRESS is not set +CONFIG_UNLZMA=y +CONFIG_FEATURE_LZMA_FAST=y +CONFIG_LZMA=y +CONFIG_UNXZ=y +CONFIG_XZ=y +CONFIG_UNZIP=y + +# +# Coreutils +# +CONFIG_BASENAME=y +CONFIG_CAT=y +CONFIG_DATE=y +CONFIG_FEATURE_DATE_ISOFMT=y +# CONFIG_FEATURE_DATE_NANO is not set +CONFIG_FEATURE_DATE_COMPAT=y +CONFIG_ID=y +CONFIG_GROUPS=y +CONFIG_TEST=y +CONFIG_FEATURE_TEST_64=y +CONFIG_TOUCH=y +CONFIG_TR=y +CONFIG_FEATURE_TR_CLASSES=y +CONFIG_FEATURE_TR_EQUIV=y +CONFIG_BASE64=y +CONFIG_WHO=y +CONFIG_USERS=y +CONFIG_CAL=y +CONFIG_CATV=y +CONFIG_CHGRP=y +CONFIG_CHMOD=y +CONFIG_CHOWN=y +CONFIG_FEATURE_CHOWN_LONG_OPTIONS=y +CONFIG_CHROOT=y +CONFIG_CKSUM=y +CONFIG_COMM=y +CONFIG_CP=y +CONFIG_FEATURE_CP_LONG_OPTIONS=y +CONFIG_CUT=y +CONFIG_DD=y +CONFIG_FEATURE_DD_SIGNAL_HANDLING=y +CONFIG_FEATURE_DD_THIRD_STATUS_LINE=y +CONFIG_FEATURE_DD_IBS_OBS=y +CONFIG_DF=y +CONFIG_FEATURE_DF_FANCY=y +CONFIG_DIRNAME=y +CONFIG_DOS2UNIX=y +CONFIG_UNIX2DOS=y +CONFIG_DU=y +CONFIG_FEATURE_DU_DEFAULT_BLOCKSIZE_1K=y +CONFIG_ECHO=y +CONFIG_FEATURE_FANCY_ECHO=y +CONFIG_ENV=y +CONFIG_FEATURE_ENV_LONG_OPTIONS=y +CONFIG_EXPAND=y +CONFIG_FEATURE_EXPAND_LONG_OPTIONS=y +CONFIG_EXPR=y +CONFIG_EXPR_MATH_SUPPORT_64=y +CONFIG_FALSE=y +CONFIG_FOLD=y +CONFIG_FSYNC=y +CONFIG_HEAD=y +CONFIG_FEATURE_FANCY_HEAD=y +CONFIG_HOSTID=y +CONFIG_INSTALL=y +CONFIG_FEATURE_INSTALL_LONG_OPTIONS=y +CONFIG_LN=y +CONFIG_LOGNAME=y +CONFIG_LS=y +CONFIG_FEATURE_LS_FILETYPES=y +CONFIG_FEATURE_LS_FOLLOWLINKS=y +CONFIG_FEATURE_LS_RECURSIVE=y +CONFIG_FEATURE_LS_SORTFILES=y +CONFIG_FEATURE_LS_TIMESTAMPS=y +CONFIG_FEATURE_LS_USERNAME=y +CONFIG_FEATURE_LS_COLOR=y +CONFIG_FEATURE_LS_COLOR_IS_DEFAULT=y +CONFIG_MD5SUM=y +CONFIG_MKDIR=y +CONFIG_FEATURE_MKDIR_LONG_OPTIONS=y +CONFIG_MKFIFO=y +CONFIG_MKNOD=y +CONFIG_MV=y +CONFIG_FEATURE_MV_LONG_OPTIONS=y +CONFIG_NICE=y +CONFIG_NOHUP=y +CONFIG_OD=y +CONFIG_PRINTENV=y +CONFIG_PRINTF=y +CONFIG_PWD=y +CONFIG_READLINK=y +CONFIG_FEATURE_READLINK_FOLLOW=y +CONFIG_REALPATH=y +CONFIG_RM=y +CONFIG_RMDIR=y +CONFIG_FEATURE_RMDIR_LONG_OPTIONS=y +CONFIG_SEQ=y +CONFIG_SHA1SUM=y +CONFIG_SHA256SUM=y +CONFIG_SHA512SUM=y +CONFIG_SLEEP=y +CONFIG_FEATURE_FANCY_SLEEP=y +CONFIG_FEATURE_FLOAT_SLEEP=y +CONFIG_SORT=y +CONFIG_FEATURE_SORT_BIG=y +CONFIG_SPLIT=y +CONFIG_FEATURE_SPLIT_FANCY=y +CONFIG_STAT=y +CONFIG_FEATURE_STAT_FORMAT=y +CONFIG_STTY=y +CONFIG_SUM=y +CONFIG_SYNC=y +CONFIG_TAC=y +CONFIG_TAIL=y +CONFIG_FEATURE_FANCY_TAIL=y +CONFIG_TEE=y +CONFIG_FEATURE_TEE_USE_BLOCK_IO=y +CONFIG_TRUE=y +CONFIG_TTY=y +CONFIG_UNAME=y +CONFIG_UNEXPAND=y +CONFIG_FEATURE_UNEXPAND_LONG_OPTIONS=y +CONFIG_UNIQ=y +CONFIG_USLEEP=y +CONFIG_UUDECODE=y +CONFIG_UUENCODE=y +CONFIG_WC=y +CONFIG_FEATURE_WC_LARGE=y +CONFIG_WHOAMI=y +CONFIG_YES=y + +# +# Common options for cp and mv +# +CONFIG_FEATURE_PRESERVE_HARDLINKS=y + +# +# Common options for ls, more and telnet +# +CONFIG_FEATURE_AUTOWIDTH=y + +# +# Common options for df, du, ls +# +CONFIG_FEATURE_HUMAN_READABLE=y + +# +# Common options for md5sum, sha1sum, sha256sum, sha512sum +# +CONFIG_FEATURE_MD5_SHA1_SUM_CHECK=y + +# +# Console Utilities +# +CONFIG_CHVT=y +CONFIG_FGCONSOLE=y +CONFIG_CLEAR=y +CONFIG_DEALLOCVT=y +CONFIG_DUMPKMAP=y +CONFIG_KBD_MODE=y +CONFIG_LOADFONT=y +CONFIG_LOADKMAP=y +CONFIG_OPENVT=y +CONFIG_RESET=y +CONFIG_RESIZE=y +CONFIG_FEATURE_RESIZE_PRINT=y +CONFIG_SETCONSOLE=y +CONFIG_FEATURE_SETCONSOLE_LONG_OPTIONS=y +CONFIG_SETFONT=y +CONFIG_FEATURE_SETFONT_TEXTUAL_MAP=y +CONFIG_DEFAULT_SETFONT_DIR="" +CONFIG_SETKEYCODES=y +CONFIG_SETLOGCONS=y +CONFIG_SHOWKEY=y + +# +# Common options for loadfont and setfont +# +CONFIG_FEATURE_LOADFONT_PSF2=y +CONFIG_FEATURE_LOADFONT_RAW=y + +# +# Debian Utilities +# +CONFIG_MKTEMP=y +CONFIG_PIPE_PROGRESS=y +CONFIG_RUN_PARTS=y +CONFIG_FEATURE_RUN_PARTS_LONG_OPTIONS=y +CONFIG_FEATURE_RUN_PARTS_FANCY=y +CONFIG_START_STOP_DAEMON=y +CONFIG_FEATURE_START_STOP_DAEMON_FANCY=y +CONFIG_FEATURE_START_STOP_DAEMON_LONG_OPTIONS=y +CONFIG_WHICH=y + +# +# Editors +# +CONFIG_PATCH=y +CONFIG_VI=y +CONFIG_FEATURE_VI_MAX_LEN=4096 +CONFIG_FEATURE_VI_8BIT=y +CONFIG_FEATURE_VI_COLON=y +CONFIG_FEATURE_VI_YANKMARK=y +CONFIG_FEATURE_VI_SEARCH=y +# CONFIG_FEATURE_VI_REGEX_SEARCH is not set +CONFIG_FEATURE_VI_USE_SIGNALS=y +CONFIG_FEATURE_VI_DOT_CMD=y +CONFIG_FEATURE_VI_READONLY=y +CONFIG_FEATURE_VI_SETOPTS=y +CONFIG_FEATURE_VI_SET=y +CONFIG_FEATURE_VI_WIN_RESIZE=y +CONFIG_FEATURE_VI_ASK_TERMINAL=y +CONFIG_FEATURE_VI_OPTIMIZE_CURSOR=y +CONFIG_AWK=y +CONFIG_FEATURE_AWK_LIBM=y +CONFIG_CMP=y +CONFIG_DIFF=y +CONFIG_FEATURE_DIFF_LONG_OPTIONS=y +CONFIG_FEATURE_DIFF_DIR=y +CONFIG_ED=y +CONFIG_SED=y +CONFIG_FEATURE_ALLOW_EXEC=y + +# +# Finding Utilities +# +CONFIG_FIND=y +CONFIG_FEATURE_FIND_PRINT0=y +CONFIG_FEATURE_FIND_MTIME=y +CONFIG_FEATURE_FIND_MMIN=y +CONFIG_FEATURE_FIND_PERM=y +CONFIG_FEATURE_FIND_TYPE=y +CONFIG_FEATURE_FIND_XDEV=y +CONFIG_FEATURE_FIND_MAXDEPTH=y +CONFIG_FEATURE_FIND_NEWER=y +CONFIG_FEATURE_FIND_INUM=y +CONFIG_FEATURE_FIND_EXEC=y +CONFIG_FEATURE_FIND_USER=y +CONFIG_FEATURE_FIND_GROUP=y +CONFIG_FEATURE_FIND_NOT=y +CONFIG_FEATURE_FIND_DEPTH=y +CONFIG_FEATURE_FIND_PAREN=y +CONFIG_FEATURE_FIND_SIZE=y +CONFIG_FEATURE_FIND_PRUNE=y +CONFIG_FEATURE_FIND_DELETE=y +CONFIG_FEATURE_FIND_PATH=y +CONFIG_FEATURE_FIND_REGEX=y +# CONFIG_FEATURE_FIND_CONTEXT is not set +CONFIG_FEATURE_FIND_LINKS=y +CONFIG_GREP=y +CONFIG_FEATURE_GREP_EGREP_ALIAS=y +CONFIG_FEATURE_GREP_FGREP_ALIAS=y +CONFIG_FEATURE_GREP_CONTEXT=y +CONFIG_XARGS=y +CONFIG_FEATURE_XARGS_SUPPORT_CONFIRMATION=y +CONFIG_FEATURE_XARGS_SUPPORT_QUOTES=y +CONFIG_FEATURE_XARGS_SUPPORT_TERMOPT=y +CONFIG_FEATURE_XARGS_SUPPORT_ZERO_TERM=y + +# +# Init Utilities +# +CONFIG_BOOTCHARTD=y +CONFIG_FEATURE_BOOTCHARTD_BLOATED_HEADER=y +CONFIG_FEATURE_BOOTCHARTD_CONFIG_FILE=y +CONFIG_HALT=y +# CONFIG_FEATURE_CALL_TELINIT is not set +CONFIG_TELINIT_PATH="" +CONFIG_INIT=y +CONFIG_FEATURE_USE_INITTAB=y +# CONFIG_FEATURE_KILL_REMOVED is not set +CONFIG_FEATURE_KILL_DELAY=0 +CONFIG_FEATURE_INIT_SCTTY=y +CONFIG_FEATURE_INIT_SYSLOG=y +CONFIG_FEATURE_EXTRA_QUIET=y +CONFIG_FEATURE_INIT_COREDUMPS=y +CONFIG_FEATURE_INITRD=y +CONFIG_INIT_TERMINAL_TYPE="linux" +CONFIG_MESG=y +CONFIG_FEATURE_MESG_ENABLE_ONLY_GROUP=y + +# +# Login/Password Management Utilities +# +CONFIG_ADD_SHELL=y +CONFIG_REMOVE_SHELL=y +CONFIG_FEATURE_SHADOWPASSWDS=y +CONFIG_USE_BB_PWD_GRP=y +CONFIG_USE_BB_SHADOW=y +CONFIG_USE_BB_CRYPT=y +CONFIG_USE_BB_CRYPT_SHA=y +CONFIG_ADDUSER=y +CONFIG_FEATURE_ADDUSER_LONG_OPTIONS=y +# CONFIG_FEATURE_CHECK_NAMES is not set +CONFIG_FIRST_SYSTEM_ID=100 +CONFIG_LAST_SYSTEM_ID=999 +CONFIG_ADDGROUP=y +CONFIG_FEATURE_ADDGROUP_LONG_OPTIONS=y +CONFIG_FEATURE_ADDUSER_TO_GROUP=y +CONFIG_DELUSER=y +CONFIG_DELGROUP=y +CONFIG_FEATURE_DEL_USER_FROM_GROUP=y +CONFIG_GETTY=y +CONFIG_LOGIN=y +# CONFIG_PAM is not set +CONFIG_LOGIN_SCRIPTS=y +CONFIG_FEATURE_NOLOGIN=y +CONFIG_FEATURE_SECURETTY=y +CONFIG_PASSWD=y +CONFIG_FEATURE_PASSWD_WEAK_CHECK=y +CONFIG_CRYPTPW=y +CONFIG_CHPASSWD=y +CONFIG_SU=y +CONFIG_FEATURE_SU_SYSLOG=y +CONFIG_FEATURE_SU_CHECKS_SHELLS=y +CONFIG_SULOGIN=y +CONFIG_VLOCK=y + +# +# Linux Ext2 FS Progs +# +CONFIG_CHATTR=y +CONFIG_FSCK=y +CONFIG_LSATTR=y +# CONFIG_TUNE2FS is not set + +# +# Linux Module Utilities +# +# CONFIG_MODINFO is not set +# CONFIG_MODPROBE_SMALL is not set +# CONFIG_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE is not set +# CONFIG_FEATURE_MODPROBE_SMALL_CHECK_ALREADY_LOADED is not set +CONFIG_INSMOD=y +CONFIG_RMMOD=y +CONFIG_LSMOD=y +# CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT is not set +CONFIG_MODPROBE=y +# CONFIG_FEATURE_MODPROBE_BLACKLIST is not set +# CONFIG_DEPMOD is not set + +# +# Options common to multiple modutils +# +# CONFIG_FEATURE_2_4_MODULES is not set +# CONFIG_FEATURE_INSMOD_TRY_MMAP is not set +# CONFIG_FEATURE_INSMOD_VERSION_CHECKING is not set +# CONFIG_FEATURE_INSMOD_KSYMOOPS_SYMBOLS is not set +# CONFIG_FEATURE_INSMOD_LOADINKMEM is not set +# CONFIG_FEATURE_INSMOD_LOAD_MAP is not set +# CONFIG_FEATURE_INSMOD_LOAD_MAP_FULL is not set +CONFIG_FEATURE_CHECK_TAINTED_MODULE=y +CONFIG_FEATURE_MODUTILS_ALIAS=y +CONFIG_FEATURE_MODUTILS_SYMBOLS=y +CONFIG_DEFAULT_MODULES_DIR="/lib/modules" +CONFIG_DEFAULT_DEPMOD_FILE="modules.dep" + +# +# Linux System Utilities +# +CONFIG_BLOCKDEV=y +CONFIG_REV=y +CONFIG_ACPID=y +CONFIG_FEATURE_ACPID_COMPAT=y +CONFIG_BLKID=y +# CONFIG_FEATURE_BLKID_TYPE is not set +CONFIG_DMESG=y +CONFIG_FEATURE_DMESG_PRETTY=y +CONFIG_FBSET=y +CONFIG_FEATURE_FBSET_FANCY=y +CONFIG_FEATURE_FBSET_READMODE=y +CONFIG_FDFLUSH=y +CONFIG_FDFORMAT=y +CONFIG_FDISK=y +# CONFIG_FDISK_SUPPORT_LARGE_DISKS is not set +CONFIG_FEATURE_FDISK_WRITABLE=y +# CONFIG_FEATURE_AIX_LABEL is not set +# CONFIG_FEATURE_SGI_LABEL is not set +# CONFIG_FEATURE_SUN_LABEL is not set +# CONFIG_FEATURE_OSF_LABEL is not set +# CONFIG_FEATURE_GPT_LABEL is not set +CONFIG_FEATURE_FDISK_ADVANCED=y +CONFIG_FINDFS=y +CONFIG_FLOCK=y +CONFIG_FREERAMDISK=y +CONFIG_FSCK_MINIX=y +CONFIG_MKFS_EXT2=y +CONFIG_MKFS_MINIX=y +CONFIG_FEATURE_MINIX2=y +# CONFIG_MKFS_REISER is not set +CONFIG_MKFS_VFAT=y +CONFIG_GETOPT=y +CONFIG_FEATURE_GETOPT_LONG=y +CONFIG_HEXDUMP=y +CONFIG_FEATURE_HEXDUMP_REVERSE=y +CONFIG_HD=y +CONFIG_HWCLOCK=y +CONFIG_FEATURE_HWCLOCK_LONG_OPTIONS=y +CONFIG_FEATURE_HWCLOCK_ADJTIME_FHS=y +CONFIG_IPCRM=y +CONFIG_IPCS=y +CONFIG_LOSETUP=y +CONFIG_LSPCI=y +CONFIG_LSUSB=y +CONFIG_MDEV=y +CONFIG_FEATURE_MDEV_CONF=y +CONFIG_FEATURE_MDEV_RENAME=y +CONFIG_FEATURE_MDEV_RENAME_REGEXP=y +CONFIG_FEATURE_MDEV_EXEC=y +CONFIG_FEATURE_MDEV_LOAD_FIRMWARE=y +CONFIG_MKSWAP=y +CONFIG_FEATURE_MKSWAP_UUID=y +CONFIG_MORE=y +CONFIG_MOUNT=y +CONFIG_FEATURE_MOUNT_FAKE=y +CONFIG_FEATURE_MOUNT_VERBOSE=y +# CONFIG_FEATURE_MOUNT_HELPERS is not set +CONFIG_FEATURE_MOUNT_LABEL=y +CONFIG_FEATURE_MOUNT_NFS=y +CONFIG_FEATURE_MOUNT_CIFS=y +CONFIG_FEATURE_MOUNT_FLAGS=y +CONFIG_FEATURE_MOUNT_FSTAB=y +CONFIG_PIVOT_ROOT=y +CONFIG_RDATE=y +CONFIG_RDEV=y +CONFIG_READPROFILE=y +CONFIG_RTCWAKE=y +CONFIG_SCRIPT=y +CONFIG_SCRIPTREPLAY=y +CONFIG_SETARCH=y +CONFIG_SWAPONOFF=y +CONFIG_FEATURE_SWAPON_PRI=y +CONFIG_SWITCH_ROOT=y +CONFIG_UMOUNT=y +CONFIG_FEATURE_UMOUNT_ALL=y + +# +# Common options for mount/umount +# +CONFIG_FEATURE_MOUNT_LOOP=y +CONFIG_FEATURE_MOUNT_LOOP_CREATE=y +# CONFIG_FEATURE_MTAB_SUPPORT is not set +CONFIG_VOLUMEID=y + +# +# Filesystem/Volume identification +# +CONFIG_FEATURE_VOLUMEID_EXT=y +CONFIG_FEATURE_VOLUMEID_BTRFS=y +CONFIG_FEATURE_VOLUMEID_REISERFS=y +CONFIG_FEATURE_VOLUMEID_FAT=y +CONFIG_FEATURE_VOLUMEID_HFS=y +CONFIG_FEATURE_VOLUMEID_JFS=y +CONFIG_FEATURE_VOLUMEID_XFS=y +CONFIG_FEATURE_VOLUMEID_NTFS=y +CONFIG_FEATURE_VOLUMEID_ISO9660=y +CONFIG_FEATURE_VOLUMEID_UDF=y +CONFIG_FEATURE_VOLUMEID_LUKS=y +CONFIG_FEATURE_VOLUMEID_LINUXSWAP=y +CONFIG_FEATURE_VOLUMEID_CRAMFS=y +CONFIG_FEATURE_VOLUMEID_ROMFS=y +CONFIG_FEATURE_VOLUMEID_SYSV=y +CONFIG_FEATURE_VOLUMEID_OCFS2=y +CONFIG_FEATURE_VOLUMEID_LINUXRAID=y + +# +# Miscellaneous Utilities +# +# CONFIG_CONSPY is not set +CONFIG_LESS=y +CONFIG_FEATURE_LESS_MAXLINES=9999999 +CONFIG_FEATURE_LESS_BRACKETS=y +CONFIG_FEATURE_LESS_FLAGS=y +CONFIG_FEATURE_LESS_MARKS=y +CONFIG_FEATURE_LESS_REGEXP=y +CONFIG_FEATURE_LESS_WINCH=y +CONFIG_FEATURE_LESS_ASK_TERMINAL=y +CONFIG_FEATURE_LESS_DASHCMD=y +CONFIG_FEATURE_LESS_LINENUMS=y +# CONFIG_NANDWRITE is not set +# CONFIG_NANDDUMP is not set +CONFIG_SETSERIAL=y +CONFIG_UBIATTACH=y +CONFIG_UBIDETACH=y +CONFIG_UBIMKVOL=y +CONFIG_UBIRMVOL=y +CONFIG_UBIRSVOL=y +CONFIG_UBIUPDATEVOL=y +CONFIG_ADJTIMEX=y +# CONFIG_BBCONFIG is not set +# CONFIG_FEATURE_COMPRESS_BBCONFIG is not set +CONFIG_BEEP=y +CONFIG_FEATURE_BEEP_FREQ=4000 +CONFIG_FEATURE_BEEP_LENGTH_MS=30 +CONFIG_CHAT=y +CONFIG_FEATURE_CHAT_NOFAIL=y +# CONFIG_FEATURE_CHAT_TTY_HIFI is not set +CONFIG_FEATURE_CHAT_IMPLICIT_CR=y +CONFIG_FEATURE_CHAT_SWALLOW_OPTS=y +CONFIG_FEATURE_CHAT_SEND_ESCAPES=y +CONFIG_FEATURE_CHAT_VAR_ABORT_LEN=y +CONFIG_FEATURE_CHAT_CLR_ABORT=y +CONFIG_CHRT=y +CONFIG_CROND=y +CONFIG_FEATURE_CROND_D=y +CONFIG_FEATURE_CROND_CALL_SENDMAIL=y +CONFIG_FEATURE_CROND_DIR="/var/spool/cron" +CONFIG_CRONTAB=y +CONFIG_DC=y +CONFIG_FEATURE_DC_LIBM=y +# CONFIG_DEVFSD is not set +# CONFIG_DEVFSD_MODLOAD is not set +# CONFIG_DEVFSD_FG_NP is not set +# CONFIG_DEVFSD_VERBOSE is not set +# CONFIG_FEATURE_DEVFS is not set +CONFIG_DEVMEM=y +CONFIG_EJECT=y +CONFIG_FEATURE_EJECT_SCSI=y +CONFIG_FBSPLASH=y +# CONFIG_FLASHCP is not set +# CONFIG_FLASH_LOCK is not set +# CONFIG_FLASH_UNLOCK is not set +# CONFIG_FLASH_ERASEALL is not set +CONFIG_IONICE=y +# CONFIG_INOTIFYD is not set +CONFIG_LAST=y +# CONFIG_FEATURE_LAST_SMALL is not set +CONFIG_FEATURE_LAST_FANCY=y +CONFIG_HDPARM=y +CONFIG_FEATURE_HDPARM_GET_IDENTITY=y +CONFIG_FEATURE_HDPARM_HDIO_SCAN_HWIF=y +CONFIG_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF=y +CONFIG_FEATURE_HDPARM_HDIO_DRIVE_RESET=y +CONFIG_FEATURE_HDPARM_HDIO_TRISTATE_HWIF=y +CONFIG_FEATURE_HDPARM_HDIO_GETSET_DMA=y +CONFIG_MAKEDEVS=y +# CONFIG_FEATURE_MAKEDEVS_LEAF is not set +CONFIG_FEATURE_MAKEDEVS_TABLE=y +CONFIG_MAN=y +CONFIG_MICROCOM=y +CONFIG_MOUNTPOINT=y +CONFIG_MT=y +CONFIG_RAIDAUTORUN=y +CONFIG_READAHEAD=y +# CONFIG_RFKILL is not set +CONFIG_RUNLEVEL=y +CONFIG_RX=y +CONFIG_SETSID=y +CONFIG_STRINGS=y +# CONFIG_TASKSET is not set +# CONFIG_FEATURE_TASKSET_FANCY is not set +CONFIG_TIME=y +CONFIG_TIMEOUT=y +CONFIG_TTYSIZE=y +CONFIG_VOLNAME=y +CONFIG_WALL=y +CONFIG_WATCHDOG=y + +# +# Networking Utilities +# +CONFIG_NAMEIF=y +CONFIG_FEATURE_NAMEIF_EXTENDED=y +CONFIG_NBDCLIENT=y +CONFIG_NC=y +CONFIG_NC_SERVER=y +CONFIG_NC_EXTRA=y +# CONFIG_NC_110_COMPAT is not set +CONFIG_PING=y +CONFIG_PING6=y +CONFIG_FEATURE_FANCY_PING=y +CONFIG_WHOIS=y +CONFIG_FEATURE_IPV6=y +# CONFIG_FEATURE_UNIX_LOCAL is not set +CONFIG_FEATURE_PREFER_IPV4_ADDRESS=y +# CONFIG_VERBOSE_RESOLUTION_ERRORS is not set +CONFIG_ARP=y +CONFIG_ARPING=y +CONFIG_BRCTL=y +CONFIG_FEATURE_BRCTL_FANCY=y +CONFIG_FEATURE_BRCTL_SHOW=y +CONFIG_DNSD=y +CONFIG_ETHER_WAKE=y +CONFIG_FAKEIDENTD=y +CONFIG_FTPD=y +CONFIG_FEATURE_FTP_WRITE=y +CONFIG_FEATURE_FTPD_ACCEPT_BROKEN_LIST=y +CONFIG_FTPGET=y +CONFIG_FTPPUT=y +CONFIG_FEATURE_FTPGETPUT_LONG_OPTIONS=y +CONFIG_HOSTNAME=y +CONFIG_HTTPD=y +CONFIG_FEATURE_HTTPD_RANGES=y +CONFIG_FEATURE_HTTPD_USE_SENDFILE=y +CONFIG_FEATURE_HTTPD_SETUID=y +CONFIG_FEATURE_HTTPD_BASIC_AUTH=y +CONFIG_FEATURE_HTTPD_AUTH_MD5=y +CONFIG_FEATURE_HTTPD_CGI=y +CONFIG_FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR=y +CONFIG_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV=y +CONFIG_FEATURE_HTTPD_ENCODE_URL_STR=y +CONFIG_FEATURE_HTTPD_ERROR_PAGES=y +CONFIG_FEATURE_HTTPD_PROXY=y +CONFIG_FEATURE_HTTPD_GZIP=y +CONFIG_IFCONFIG=y +CONFIG_FEATURE_IFCONFIG_STATUS=y +CONFIG_FEATURE_IFCONFIG_SLIP=y +CONFIG_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ=y +CONFIG_FEATURE_IFCONFIG_HW=y +CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS=y +CONFIG_IFENSLAVE=y +CONFIG_IFPLUGD=y +CONFIG_IFUPDOWN=y +CONFIG_IFUPDOWN_IFSTATE_PATH="/var/run/ifstate" +# CONFIG_FEATURE_IFUPDOWN_IP is not set +# CONFIG_FEATURE_IFUPDOWN_IP_BUILTIN is not set +CONFIG_FEATURE_IFUPDOWN_IFCONFIG_BUILTIN=y +CONFIG_FEATURE_IFUPDOWN_IPV4=y +CONFIG_FEATURE_IFUPDOWN_IPV6=y +CONFIG_FEATURE_IFUPDOWN_MAPPING=y +# CONFIG_FEATURE_IFUPDOWN_EXTERNAL_DHCP is not set +CONFIG_INETD=y +CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_ECHO=y +CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DISCARD=y +CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_TIME=y +CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DAYTIME=y +CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_CHARGEN=y +CONFIG_FEATURE_INETD_RPC=y +CONFIG_IP=y +CONFIG_FEATURE_IP_ADDRESS=y +CONFIG_FEATURE_IP_LINK=y +CONFIG_FEATURE_IP_ROUTE=y +CONFIG_FEATURE_IP_TUNNEL=y +CONFIG_FEATURE_IP_RULE=y +CONFIG_FEATURE_IP_SHORT_FORMS=y +# CONFIG_FEATURE_IP_RARE_PROTOCOLS is not set +CONFIG_IPADDR=y +CONFIG_IPLINK=y +CONFIG_IPROUTE=y +CONFIG_IPTUNNEL=y +CONFIG_IPRULE=y +CONFIG_IPCALC=y +CONFIG_FEATURE_IPCALC_FANCY=y +CONFIG_FEATURE_IPCALC_LONG_OPTIONS=y +CONFIG_NETSTAT=y +CONFIG_FEATURE_NETSTAT_WIDE=y +CONFIG_FEATURE_NETSTAT_PRG=y +CONFIG_NSLOOKUP=y +CONFIG_NTPD=y +CONFIG_FEATURE_NTPD_SERVER=y +CONFIG_PSCAN=y +CONFIG_ROUTE=y +CONFIG_SLATTACH=y +CONFIG_TCPSVD=y +CONFIG_TELNET=y +CONFIG_FEATURE_TELNET_TTYPE=y +CONFIG_FEATURE_TELNET_AUTOLOGIN=y +CONFIG_TELNETD=y +CONFIG_FEATURE_TELNETD_STANDALONE=y +CONFIG_FEATURE_TELNETD_INETD_WAIT=y +CONFIG_TFTP=y +CONFIG_TFTPD=y + +# +# Common options for tftp/tftpd +# +CONFIG_FEATURE_TFTP_GET=y +CONFIG_FEATURE_TFTP_PUT=y +CONFIG_FEATURE_TFTP_BLOCKSIZE=y +CONFIG_FEATURE_TFTP_PROGRESS_BAR=y +# CONFIG_TFTP_DEBUG is not set +CONFIG_TRACEROUTE=y +CONFIG_TRACEROUTE6=y +CONFIG_FEATURE_TRACEROUTE_VERBOSE=y +# CONFIG_FEATURE_TRACEROUTE_SOURCE_ROUTE is not set +# CONFIG_FEATURE_TRACEROUTE_USE_ICMP is not set +CONFIG_TUNCTL=y +CONFIG_FEATURE_TUNCTL_UG=y +CONFIG_UDHCPD=y +CONFIG_DHCPRELAY=y +CONFIG_DUMPLEASES=y +CONFIG_FEATURE_UDHCPD_WRITE_LEASES_EARLY=y +# CONFIG_FEATURE_UDHCPD_BASE_IP_ON_MAC is not set +CONFIG_DHCPD_LEASES_FILE="/var/lib/misc/udhcpd.leases" +CONFIG_UDHCPC=y +CONFIG_FEATURE_UDHCPC_ARPING=y +# CONFIG_FEATURE_UDHCP_PORT is not set +CONFIG_UDHCP_DEBUG=9 +CONFIG_FEATURE_UDHCP_RFC3397=y +CONFIG_FEATURE_UDHCP_8021Q=y +CONFIG_UDHCPC_DEFAULT_SCRIPT="/usr/share/udhcpc/default.script" +CONFIG_UDHCPC_SLACK_FOR_BUGGY_SERVERS=80 +CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS="-R -n" +CONFIG_UDPSVD=y +CONFIG_VCONFIG=y +CONFIG_WGET=y +CONFIG_FEATURE_WGET_STATUSBAR=y +CONFIG_FEATURE_WGET_AUTHENTICATION=y +CONFIG_FEATURE_WGET_LONG_OPTIONS=y +CONFIG_FEATURE_WGET_TIMEOUT=y +CONFIG_ZCIP=y + +# +# Print Utilities +# +CONFIG_LPD=y +CONFIG_LPR=y +CONFIG_LPQ=y + +# +# Mail Utilities +# +CONFIG_MAKEMIME=y +CONFIG_FEATURE_MIME_CHARSET="us-ascii" +CONFIG_POPMAILDIR=y +CONFIG_FEATURE_POPMAILDIR_DELIVERY=y +CONFIG_REFORMIME=y +CONFIG_FEATURE_REFORMIME_COMPAT=y +CONFIG_SENDMAIL=y + +# +# Process Utilities +# +CONFIG_IOSTAT=y +CONFIG_MPSTAT=y +CONFIG_NMETER=y +CONFIG_PMAP=y +CONFIG_POWERTOP=y +CONFIG_PSTREE=y +CONFIG_PWDX=y +CONFIG_SMEMCAP=y +CONFIG_UPTIME=y +CONFIG_FEATURE_UPTIME_UTMP_SUPPORT=y +CONFIG_FREE=y +CONFIG_FUSER=y +CONFIG_KILL=y +CONFIG_KILLALL=y +CONFIG_KILLALL5=y +CONFIG_PGREP=y +CONFIG_PIDOF=y +CONFIG_FEATURE_PIDOF_SINGLE=y +CONFIG_FEATURE_PIDOF_OMIT=y +CONFIG_PKILL=y +CONFIG_PS=y +CONFIG_FEATURE_PS_WIDE=y +# CONFIG_FEATURE_PS_TIME is not set +# CONFIG_FEATURE_PS_ADDITIONAL_COLUMNS is not set +# CONFIG_FEATURE_PS_UNUSUAL_SYSTEMS is not set +CONFIG_RENICE=y +CONFIG_BB_SYSCTL=y +CONFIG_TOP=y +CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE=y +CONFIG_FEATURE_TOP_CPU_GLOBAL_PERCENTS=y +CONFIG_FEATURE_TOP_SMP_CPU=y +CONFIG_FEATURE_TOP_DECIMALS=y +CONFIG_FEATURE_TOP_SMP_PROCESS=y +CONFIG_FEATURE_TOPMEM=y +CONFIG_FEATURE_SHOW_THREADS=y +CONFIG_WATCH=y + +# +# Runit Utilities +# +CONFIG_RUNSV=y +CONFIG_RUNSVDIR=y +# CONFIG_FEATURE_RUNSVDIR_LOG is not set +CONFIG_SV=y +CONFIG_SV_DEFAULT_SERVICE_DIR="/var/service" +CONFIG_SVLOGD=y +CONFIG_CHPST=y +CONFIG_SETUIDGID=y +CONFIG_ENVUIDGID=y +CONFIG_ENVDIR=y +CONFIG_SOFTLIMIT=y +# CONFIG_CHCON is not set +# CONFIG_FEATURE_CHCON_LONG_OPTIONS is not set +# CONFIG_GETENFORCE is not set +# CONFIG_GETSEBOOL is not set +# CONFIG_LOAD_POLICY is not set +# CONFIG_MATCHPATHCON is not set +# CONFIG_RESTORECON is not set +# CONFIG_RUNCON is not set +# CONFIG_FEATURE_RUNCON_LONG_OPTIONS is not set +# CONFIG_SELINUXENABLED is not set +# CONFIG_SETENFORCE is not set +# CONFIG_SETFILES is not set +# CONFIG_FEATURE_SETFILES_CHECK_OPTION is not set +# CONFIG_SETSEBOOL is not set +# CONFIG_SESTATUS is not set + +# +# Shells +# +CONFIG_ASH=y +CONFIG_ASH_BASH_COMPAT=y +# CONFIG_ASH_IDLE_TIMEOUT is not set +CONFIG_ASH_JOB_CONTROL=y +CONFIG_ASH_ALIAS=y +CONFIG_ASH_GETOPTS=y +CONFIG_ASH_BUILTIN_ECHO=y +CONFIG_ASH_BUILTIN_PRINTF=y +CONFIG_ASH_BUILTIN_TEST=y +CONFIG_ASH_CMDCMD=y +# CONFIG_ASH_MAIL is not set +CONFIG_ASH_OPTIMIZE_FOR_SIZE=y +CONFIG_ASH_RANDOM_SUPPORT=y +CONFIG_ASH_EXPAND_PRMT=y +CONFIG_CTTYHACK=y +CONFIG_HUSH=y +CONFIG_HUSH_BASH_COMPAT=y +CONFIG_HUSH_BRACE_EXPANSION=y +CONFIG_HUSH_HELP=y +CONFIG_HUSH_INTERACTIVE=y +CONFIG_HUSH_SAVEHISTORY=y +CONFIG_HUSH_JOB=y +CONFIG_HUSH_TICK=y +CONFIG_HUSH_IF=y +CONFIG_HUSH_LOOPS=y +CONFIG_HUSH_CASE=y +CONFIG_HUSH_FUNCTIONS=y +CONFIG_HUSH_LOCAL=y +CONFIG_HUSH_RANDOM_SUPPORT=y +CONFIG_HUSH_EXPORT_N=y +CONFIG_HUSH_MODE_X=y +# CONFIG_MSH is not set +CONFIG_FEATURE_SH_IS_ASH=y +# CONFIG_FEATURE_SH_IS_HUSH is not set +# CONFIG_FEATURE_SH_IS_NONE is not set +# CONFIG_FEATURE_BASH_IS_ASH is not set +# CONFIG_FEATURE_BASH_IS_HUSH is not set +CONFIG_FEATURE_BASH_IS_NONE=y +CONFIG_SH_MATH_SUPPORT=y +CONFIG_SH_MATH_SUPPORT_64=y +CONFIG_FEATURE_SH_EXTRA_QUIET=y +# CONFIG_FEATURE_SH_STANDALONE is not set +# CONFIG_FEATURE_SH_NOFORK is not set +CONFIG_FEATURE_SH_HISTFILESIZE=y + +# +# System Logging Utilities +# +CONFIG_SYSLOGD=y +CONFIG_FEATURE_ROTATE_LOGFILE=y +CONFIG_FEATURE_REMOTE_LOG=y +CONFIG_FEATURE_SYSLOGD_DUP=y +CONFIG_FEATURE_SYSLOGD_CFG=y +CONFIG_FEATURE_SYSLOGD_READ_BUFFER_SIZE=256 +CONFIG_FEATURE_IPC_SYSLOG=y +CONFIG_FEATURE_IPC_SYSLOG_BUFFER_SIZE=16 +CONFIG_LOGREAD=y +CONFIG_FEATURE_LOGREAD_REDUCED_LOCKING=y +CONFIG_KLOGD=y +CONFIG_FEATURE_KLOGD_KLOGCTL=y +CONFIG_LOGGER=y diff --git a/meta-fsl-ppc/recipes-append/busybox/busybox-1.20.2/inetd b/meta-fsl-ppc/recipes-append/busybox/busybox-1.20.2/inetd new file mode 100644 index 00000000..cf50bcd5 --- /dev/null +++ b/meta-fsl-ppc/recipes-append/busybox/busybox-1.20.2/inetd @@ -0,0 +1,33 @@ +#!/bin/sh +# +# start/stop inetd super server. + +if ! [ -x /usr/sbin/inetd ]; then + exit 0 +fi + +case "$1" in + start) + echo -n "Starting internet superserver:" + echo -n " inetd" ; start-stop-daemon -S -x /usr/sbin/inetd > /dev/null + echo "." + ;; + stop) + echo -n "Stopping internet superserver:" + echo -n " inetd" ; start-stop-daemon -K -x /usr/sbin/inetd > /dev/null + echo "." + ;; + restart) + echo -n "Restarting internet superserver:" + echo -n " inetd " + killall -HUP inetd + echo "." + ;; + *) + echo "Usage: /etc/init.d/inetd {start|stop|restart}" + exit 1 + ;; +esac + +exit 0 + diff --git a/meta-fsl-ppc/recipes-append/busybox/busybox-1.20.2/inetd.conf b/meta-fsl-ppc/recipes-append/busybox/busybox-1.20.2/inetd.conf new file mode 100644 index 00000000..b02fe850 --- /dev/null +++ b/meta-fsl-ppc/recipes-append/busybox/busybox-1.20.2/inetd.conf @@ -0,0 +1,20 @@ +# /etc/inetd.conf: see inetd(8) for further informations. +# +# Internet server configuration database +# +# If you want to disable an entry so it isn't touched during +# package updates just comment it out with a single '#' character. +# +# +# +#:INTERNAL: Internal services +#echo stream tcp nowait root internal +#echo dgram udp wait root internal +#chargen stream tcp nowait root internal +#chargen dgram udp wait root internal +#discard stream tcp nowait root internal +#discard dgram udp wait root internal +#daytime stream tcp nowait root internal +#daytime dgram udp wait root internal +#time stream tcp nowait root internal +#time dgram udp wait root internal diff --git a/meta-fsl-ppc/recipes-append/busybox/busybox_1.20.2.bbappend b/meta-fsl-ppc/recipes-append/busybox/busybox_1.20.2.bbappend new file mode 100644 index 00000000..60d8b250 --- /dev/null +++ b/meta-fsl-ppc/recipes-append/busybox/busybox_1.20.2.bbappend @@ -0,0 +1,15 @@ +PR_append_fsl = "+${DISTRO}.0" + +FILESEXTRAPATHS_prepend_fsl := "${THISDIR}/busybox-1.19.4:" + +SRC_URI_append_fsl += "file://defconfig-fsl \ + file://busybox-1.19.4-ubi-user-h.patch \ + file://inetd \ + file://inetd.conf \ +" + +do_configure_prepend_fsl () { + cp ${WORKDIR}/defconfig-fsl ${WORKDIR}/defconfig +} + + -- cgit v1.2.3-54-g00ecf From c1d14a2b0b3f0bb2886c5662199ec7726fc7498a Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Thu, 13 Sep 2012 20:27:54 -0500 Subject: u-boot_git.bb: hack in support for building 32-bit u-boot with 64-bit machine Signed-off-by: Matthew McClintock --- meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb b/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb index 1368509c..b2544152 100644 --- a/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb +++ b/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb @@ -5,7 +5,7 @@ PROVIDES = "virtual/bootloader" LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=1707d6db1d42237583f50183a5651ecb" -PR = "r20" +PR = "r21" INHIBIT_DEFAULT_DEPS = "1" DEPENDS = "boot-format-native virtual/${TARGET_PREFIX}gcc" @@ -14,12 +14,19 @@ inherit deploy SRCREV = "6d1aef1c02ba9472215234696faa8ce8745a40a9" SRC_URI = "git://git.freescale.com/ppc/sdk/u-boot.git \ " + DEPENDS_append_e5500-64b = " lib32-gcc-cross" PATH_append_e5500-64b = ":${STAGING_BINDIR_NATIVE}/${DEFAULTTUNE_virtclass-multilib-lib32}${TARGET_VENDOR_virtclass-multilib-lib32}-${HOST_OS}/" TOOLCHAIN_OPTIONS_append_e5500-64b = "/../lib32-${MACHINE}" TARGET_VENDOR_virtclass-multilib-lib32 = "-${DISTRO}mllib32" WRAP_TARGET_PREFIX_e5500-64b = "powerpc${TARGET_VENDOR_virtclass-multilib-lib32}-${HOST_OS}-" +DEPENDS_append_e6500-64b = " lib32-gcc-cross" +PATH_append_e6500-64b = ":${STAGING_BINDIR_NATIVE}/${DEFAULTTUNE_virtclass-multilib-lib32}${TARGET_VENDOR_virtclass-multilib-lib32}-${HOST_OS}/" +TOOLCHAIN_OPTIONS_append_e6500-64b = "/../lib32-${MACHINE}" +TARGET_VENDOR_virtclass-multilib-lib32 = "-${DISTRO}mllib32" +WRAP_TARGET_PREFIX_e6500-64b = "powerpc${TARGET_VENDOR_virtclass-multilib-lib32}-${HOST_OS}-" + WRAP_TARGET_PREFIX = "${TARGET_PREFIX}" EXTRA_OEMAKE = 'CROSS_COMPILE=${WRAP_TARGET_PREFIX} CC="${WRAP_TARGET_PREFIX}gcc ${TOOLCHAIN_OPTIONS}"' -- cgit v1.2.3-54-g00ecf From 4f3043034dc26010f05156cc64ba5251e01784e3 Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Thu, 13 Sep 2012 22:11:21 -0500 Subject: e6500.inc: force biarch gcc for kernel build Signed-off-by: Matthew McClintock --- meta-fsl-ppc/conf/machine/e6500.inc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/meta-fsl-ppc/conf/machine/e6500.inc b/meta-fsl-ppc/conf/machine/e6500.inc index 46879726..b725d75c 100644 --- a/meta-fsl-ppc/conf/machine/e6500.inc +++ b/meta-fsl-ppc/conf/machine/e6500.inc @@ -16,3 +16,6 @@ KERNEL_IMAGETYPE ?= "uImage" # ext2.gz.u-boot ext2.bz2.u-boot ext2.lzma.u-boot" MACHINEOVERRIDES .= ":e6500:fslmachine" + +#not ideal but we require 64-bit support to build the kernel +DISTRO_FEATURES_append = " multiarch" -- cgit v1.2.3-54-g00ecf From 01f3e92be63c3723936c4bbb1e3fdcb5556d0609 Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Fri, 14 Sep 2012 10:55:42 -0500 Subject: u-boot_git.bb: u-boot depends on libgcc Fixes linker issues where we are missing symbols such as _restgpr_NN_x Signed-off-by: Matthew McClintock --- meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb b/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb index b2544152..86946b9c 100644 --- a/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb +++ b/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb @@ -5,9 +5,9 @@ PROVIDES = "virtual/bootloader" LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=1707d6db1d42237583f50183a5651ecb" -PR = "r21" +PR = "r22" INHIBIT_DEFAULT_DEPS = "1" -DEPENDS = "boot-format-native virtual/${TARGET_PREFIX}gcc" +DEPENDS = "boot-format-native virtual/${TARGET_PREFIX}gcc libgcc" inherit deploy -- cgit v1.2.3-54-g00ecf From a65dcf6bd8b83007c650201ba4e8e1036e6b80d9 Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Fri, 14 Sep 2012 13:19:46 -0500 Subject: Revert "e6500.inc: force biarch gcc for kernel build" We will just skip the kernel recipe if we don't have biarch enabled This reverts commit f3469d97cef7fcd6277dfab7326f7a8e0d5bb5bd. --- meta-fsl-ppc/conf/machine/e6500.inc | 3 --- 1 file changed, 3 deletions(-) diff --git a/meta-fsl-ppc/conf/machine/e6500.inc b/meta-fsl-ppc/conf/machine/e6500.inc index b725d75c..46879726 100644 --- a/meta-fsl-ppc/conf/machine/e6500.inc +++ b/meta-fsl-ppc/conf/machine/e6500.inc @@ -16,6 +16,3 @@ KERNEL_IMAGETYPE ?= "uImage" # ext2.gz.u-boot ext2.bz2.u-boot ext2.lzma.u-boot" MACHINEOVERRIDES .= ":e6500:fslmachine" - -#not ideal but we require 64-bit support to build the kernel -DISTRO_FEATURES_append = " multiarch" -- cgit v1.2.3-54-g00ecf From 2c01c2e9fbf1ca8b1a3777c98e908d69afb3ee2e Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Mon, 17 Sep 2012 14:58:15 -0500 Subject: fsl.conf: add multiarch to fsl distro Signed-off-by: Matthew McClintock --- meta-fsl-ppc/conf/distro/fsl.conf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/meta-fsl-ppc/conf/distro/fsl.conf b/meta-fsl-ppc/conf/distro/fsl.conf index 5a65cbe3..600972f9 100644 --- a/meta-fsl-ppc/conf/distro/fsl.conf +++ b/meta-fsl-ppc/conf/distro/fsl.conf @@ -11,8 +11,9 @@ TARGET_VENDOR_virtclass-multilib-lib32 = "-fsl" TARGET_VENDOR_virtclass-multilib-lib64 = "-fsl" LOCALCONF_VERSION = "1" +LAYER_CONF_VERSION ?= "6" -DISTRO_FEATURES_append = " largefile" +DISTRO_FEATURES_append = " largefile multiarch" SDK_NAME = "${DISTRO}-${TCLIBC}-${SDK_ARCH}-${TUNE_PKGARCH}" SDKPATH = "/opt/${DISTRO}/${SDK_VERSION}" -- cgit v1.2.3-54-g00ecf From 6734687fe8a1112d733f2aade193709c2353b24e Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Mon, 17 Sep 2012 14:59:03 -0500 Subject: u-boot_git.bb: libgcc is required for multilib builds too Signed-off-by: Matthew McClintock --- meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb b/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb index 86946b9c..40e317fc 100644 --- a/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb +++ b/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb @@ -5,7 +5,7 @@ PROVIDES = "virtual/bootloader" LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=1707d6db1d42237583f50183a5651ecb" -PR = "r22" +PR = "r23" INHIBIT_DEFAULT_DEPS = "1" DEPENDS = "boot-format-native virtual/${TARGET_PREFIX}gcc libgcc" @@ -15,13 +15,13 @@ SRCREV = "6d1aef1c02ba9472215234696faa8ce8745a40a9" SRC_URI = "git://git.freescale.com/ppc/sdk/u-boot.git \ " -DEPENDS_append_e5500-64b = " lib32-gcc-cross" +DEPENDS_append_e5500-64b = " lib32-gcc-cross lib32-libgcc" PATH_append_e5500-64b = ":${STAGING_BINDIR_NATIVE}/${DEFAULTTUNE_virtclass-multilib-lib32}${TARGET_VENDOR_virtclass-multilib-lib32}-${HOST_OS}/" TOOLCHAIN_OPTIONS_append_e5500-64b = "/../lib32-${MACHINE}" TARGET_VENDOR_virtclass-multilib-lib32 = "-${DISTRO}mllib32" WRAP_TARGET_PREFIX_e5500-64b = "powerpc${TARGET_VENDOR_virtclass-multilib-lib32}-${HOST_OS}-" -DEPENDS_append_e6500-64b = " lib32-gcc-cross" +DEPENDS_append_e6500-64b = " lib32-gcc-cross lib32-libgcc" PATH_append_e6500-64b = ":${STAGING_BINDIR_NATIVE}/${DEFAULTTUNE_virtclass-multilib-lib32}${TARGET_VENDOR_virtclass-multilib-lib32}-${HOST_OS}/" TOOLCHAIN_OPTIONS_append_e6500-64b = "/../lib32-${MACHINE}" TARGET_VENDOR_virtclass-multilib-lib32 = "-${DISTRO}mllib32" -- cgit v1.2.3-54-g00ecf From 0931ee073dd852ece58867bbdbdc02687c1709b4 Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Mon, 17 Sep 2012 15:01:11 -0500 Subject: linux-qoriq-sdk.inc: make sure we enabled biarch for our kernel builds Signed-off-by: Matthew McClintock --- meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc index 35ee5e32..d75ea4d6 100644 --- a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc +++ b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc @@ -16,6 +16,12 @@ S = '${@base_conditional("KSRC", "", "${WORKDIR}/git", "${KSRC}", d)}' COMPATIBLE_MACHINE_$MACHINE = "$MACHINE" python () { + ma = d.getVar("DISTRO_FEATURES", True) + arch = d.getVar("OVERRIDES", True) + + if not "multiarch" in ma and ("e5500" in arch or "e6500" in arch): + raise bb.parse.SkipPackage("Building the kernel for this arch requires multiarch to be in DISTRO_FEATURES") + promote_kernel = d.getVar('BUILD_64BIT_KERNEL') if promote_kernel != 0: -- cgit v1.2.3-54-g00ecf From cfc533a7f9fd461258257307de78d6f0b0210a65 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Tue, 18 Sep 2012 10:17:31 -0700 Subject: linux-qoriq-sdk: Correct the check for BUILD_64BIT_KERNEL Current comparision is returning false which is not 0 and hence KERNEL_CC and KERNEL_LD are getting 64bit options appended even when BUILD_64BIT_KERNEL is unset Signed-off-by: Khem Raj --- meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc index d75ea4d6..5f131cba 100644 --- a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc +++ b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc @@ -1,7 +1,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7" PV = "3.0.34" -PR = "r6" +PR = "r7" SRCREV = "058c67be272af9ab95b88c941f31fb3eda05a4d3" SRC_URI = "git://git.freescale.com/ppc/sdk/linux.git \ @@ -11,7 +11,6 @@ SRC_URI = "git://git.freescale.com/ppc/sdk/linux.git \ KSRC ?= "" S = '${@base_conditional("KSRC", "", "${WORKDIR}/git", "${KSRC}", d)}' - # make everything compatible for the time being COMPATIBLE_MACHINE_$MACHINE = "$MACHINE" @@ -24,7 +23,7 @@ python () { promote_kernel = d.getVar('BUILD_64BIT_KERNEL') - if promote_kernel != 0: + if promote_kernel == "1": d.setVar('KERNEL_CC_append', ' -m64') d.setVar('KERNEL_LD_append', ' -melf64ppc') } -- cgit v1.2.3-54-g00ecf From 449ae4b9abf9e2130c53df458602bd1ea7593441 Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Mon, 17 Sep 2012 16:34:58 -0500 Subject: gettext: remove bbappends since the patch it adds does not apply Signed-off-by: Matthew McClintock --- .../recipes-append/gettext/files/gettext.fix_testcase.patch | 13 ------------- .../recipes-append/gettext/gettext_0.18.1.1.bbappend | 5 ----- 2 files changed, 18 deletions(-) delete mode 100644 meta-fsl-ppc/recipes-append/gettext/files/gettext.fix_testcase.patch delete mode 100644 meta-fsl-ppc/recipes-append/gettext/gettext_0.18.1.1.bbappend diff --git a/meta-fsl-ppc/recipes-append/gettext/files/gettext.fix_testcase.patch b/meta-fsl-ppc/recipes-append/gettext/files/gettext.fix_testcase.patch deleted file mode 100644 index 135f2678..00000000 --- a/meta-fsl-ppc/recipes-append/gettext/files/gettext.fix_testcase.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- gettext-0.16.1/gettext-runtime/tests/test-lock.c-orig 2011-07-22 12:51:14.734334073 -0500 -+++ gettext-0.16.1/gettext-runtime/tests/test-lock.c 2011-07-22 12:43:59.962333864 -0500 -@@ -106,7 +106,9 @@ - } - static inline void * gl_thread_self (void) - { -- return (void *) pthread_self (); -+ pthread_t x; -+ x = pthread_self (); -+ return (void *)&x; - } - #endif - #if TEST_PTH_THREADS diff --git a/meta-fsl-ppc/recipes-append/gettext/gettext_0.18.1.1.bbappend b/meta-fsl-ppc/recipes-append/gettext/gettext_0.18.1.1.bbappend deleted file mode 100644 index 1a6d9f41..00000000 --- a/meta-fsl-ppc/recipes-append/gettext/gettext_0.18.1.1.bbappend +++ /dev/null @@ -1,5 +0,0 @@ -FILESEXTRAPATHS_prepend_fsl := "${THISDIR}/files:" - -SRC_URI_fsl += "file://gettext.fix_testcase.patch" - -PR_fsl .= "+${DISTRO}.0" -- cgit v1.2.3-54-g00ecf From b62585ed30226b688c2c1a3bbcc110dad0ab3710 Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Tue, 18 Sep 2012 13:39:59 -0500 Subject: u-boot_git.bb: only set variable if not set Signed-off-by: Matthew McClintock --- meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb b/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb index 40e317fc..d6a5885f 100644 --- a/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb +++ b/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb @@ -5,7 +5,7 @@ PROVIDES = "virtual/bootloader" LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=1707d6db1d42237583f50183a5651ecb" -PR = "r23" +PR = "r24" INHIBIT_DEFAULT_DEPS = "1" DEPENDS = "boot-format-native virtual/${TARGET_PREFIX}gcc libgcc" @@ -18,13 +18,13 @@ SRC_URI = "git://git.freescale.com/ppc/sdk/u-boot.git \ DEPENDS_append_e5500-64b = " lib32-gcc-cross lib32-libgcc" PATH_append_e5500-64b = ":${STAGING_BINDIR_NATIVE}/${DEFAULTTUNE_virtclass-multilib-lib32}${TARGET_VENDOR_virtclass-multilib-lib32}-${HOST_OS}/" TOOLCHAIN_OPTIONS_append_e5500-64b = "/../lib32-${MACHINE}" -TARGET_VENDOR_virtclass-multilib-lib32 = "-${DISTRO}mllib32" +TARGET_VENDOR_virtclass-multilib-lib32 ?= "-${DISTRO}mllib32" WRAP_TARGET_PREFIX_e5500-64b = "powerpc${TARGET_VENDOR_virtclass-multilib-lib32}-${HOST_OS}-" DEPENDS_append_e6500-64b = " lib32-gcc-cross lib32-libgcc" PATH_append_e6500-64b = ":${STAGING_BINDIR_NATIVE}/${DEFAULTTUNE_virtclass-multilib-lib32}${TARGET_VENDOR_virtclass-multilib-lib32}-${HOST_OS}/" TOOLCHAIN_OPTIONS_append_e6500-64b = "/../lib32-${MACHINE}" -TARGET_VENDOR_virtclass-multilib-lib32 = "-${DISTRO}mllib32" +TARGET_VENDOR_virtclass-multilib-lib32 ?= "-${DISTRO}mllib32" WRAP_TARGET_PREFIX_e6500-64b = "powerpc${TARGET_VENDOR_virtclass-multilib-lib32}-${HOST_OS}-" WRAP_TARGET_PREFIX = "${TARGET_PREFIX}" -- cgit v1.2.3-54-g00ecf From 6b8d1077234c49bf0e8b2dd1a41ca6e0db91d86d Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Tue, 18 Sep 2012 13:48:37 -0500 Subject: linux-qoriq-sdk.inc: only check for multiarch in eX500 not eX500-64b Signed-off-by: Matthew McClintock --- meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc index 5f131cba..f97a8c0c 100644 --- a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc +++ b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc @@ -18,7 +18,8 @@ python () { ma = d.getVar("DISTRO_FEATURES", True) arch = d.getVar("OVERRIDES", True) - if not "multiarch" in ma and ("e5500" in arch or "e6500" in arch): + # the : after the arch is to skip the message on 64b + if not "multiarch" in ma and ("e5500:" in arch or "e6500:" in arch): raise bb.parse.SkipPackage("Building the kernel for this arch requires multiarch to be in DISTRO_FEATURES") promote_kernel = d.getVar('BUILD_64BIT_KERNEL') -- cgit v1.2.3-54-g00ecf From 556159b450560173e00c862bacee71ab8a76fced Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Mon, 3 Sep 2012 16:37:16 +0000 Subject: fsl-image-minimal: IMAGE_FSTYPES add jffs2 Signed-off-by: Ting Liu --- meta-fsl-ppc/images/fsl-image-minimal.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-fsl-ppc/images/fsl-image-minimal.bb b/meta-fsl-ppc/images/fsl-image-minimal.bb index b8d3c774..f3d1ad4f 100644 --- a/meta-fsl-ppc/images/fsl-image-minimal.bb +++ b/meta-fsl-ppc/images/fsl-image-minimal.bb @@ -13,4 +13,4 @@ IMAGE_ROOTFS_SIZE = "8192" # remove not needed ipkg informations ROOTFS_POSTPROCESS_COMMAND += "remove_packaging_data_files ; " -IMAGE_FSTYPES = "tar.gz ext2.gz.u-boot" +IMAGE_FSTYPES = "tar.gz ext2.gz.u-boot jffs2" -- cgit v1.2.3-54-g00ecf From 46d43adaeec0533384c69d3bc65f1cf6a8b48b85 Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Thu, 30 Aug 2012 09:07:09 +0000 Subject: lio-utils: add lio-utils-4.0 Signed-off-by: Zhenhua Luo --- .../recipes-tools/lio-utils/lio-utils_4.0.bb | 48 ++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 meta-fsl-ppc/recipes-tools/lio-utils/lio-utils_4.0.bb diff --git a/meta-fsl-ppc/recipes-tools/lio-utils/lio-utils_4.0.bb b/meta-fsl-ppc/recipes-tools/lio-utils/lio-utils_4.0.bb new file mode 100644 index 00000000..d4613503 --- /dev/null +++ b/meta-fsl-ppc/recipes-tools/lio-utils/lio-utils_4.0.bb @@ -0,0 +1,48 @@ +SUMMARY = "lio-utils" +DESCRIPTION = "a simple low-level configuration tool set for the Target+iSCSI (LIO)" +HOMEPAGE = "http://linux-iscsi.org/index.php/Lio-utils" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://debian/copyright;md5=c3ea231a32635cbb5debedf3e88aa3df" + +SRC_URI = "git://risingtidesystems.com/lio-utils.git;protocal=git" +SRCREV = "lio-4.0" +S = "${WORKDIR}/git" + +inherit distutils + +EXTRA_OEMAKE += "-C ${S}/tools PREFIX=${prefix} DESTDIR=${D}" + +# pass LDFLAGS to linker to avoid missing GNU_HASH QA errors +TARGET_CC_ARCH += "${LDFLAGS}" +do_compile() { + cd ${S}/tcm-py + distutils_do_compile + + cd ${S}/lio-py + distutils_do_compile + + if test -d ${S}/tools; then + oe_runmake + fi +} + +do_install() { + cd ${S}/tcm-py + distutils_do_install + + cd ${S}/lio-py + distutils_do_install + + SITE_PACKAGES=${D}/${PYTHON_SITEPACKAGES_DIR} + [ ! -d ${D}/${sbindir} ] && install -d ${D}/${sbindir} + for var in tcm_node tcm_dump tcm_loop tcm_fabric lio_dump lio_node; do + chmod a+x ${SITE_PACKAGES}/${var}.py + [ ! -f ${D}/${sbindir}/${var} ] && ln -s ${PYTHON_SITEPACKAGES_DIR}/${var}.py ${D}/${sbindir}/${var} + done + + if test -d ${S}/tools; then + oe_runmake install + fi +} + +FILES_${PN} += "${sbindir}/*" -- cgit v1.2.3-54-g00ecf From 36c4145a2b77a2f0551947433d140f1fe86704ed Mon Sep 17 00:00:00 2001 From: Chunrong Guo Date: Fri, 14 Sep 2012 14:08:56 +0800 Subject: udev: do not automount block devices for fslmachines MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit kernel can’t boot up with extend partition in HDD FILESEXTRAPATHS_prepend is the right variable to extend file search path, this is applied for fsl ppc targets Signed-off-by: Chunrong Guo Signed-off-by: Zhenhua Luo --- meta-fsl-ppc/recipes-append/udev/files/local.rules | 3 +++ meta-fsl-ppc/recipes-append/udev/udev_164.bbappend | 5 ++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/meta-fsl-ppc/recipes-append/udev/files/local.rules b/meta-fsl-ppc/recipes-append/udev/files/local.rules index 9c134efa..43034b83 100644 --- a/meta-fsl-ppc/recipes-append/udev/files/local.rules +++ b/meta-fsl-ppc/recipes-append/udev/files/local.rules @@ -15,6 +15,8 @@ KERNEL=="nbd*", GOTO="persistent_storage_end" +SUBSYSTEM=="block", ENV{DEVTYPE}=="partition", GOTO="nomountblock" + # Media automounting SUBSYSTEM=="block", ACTION=="add" RUN+="/etc/udev/scripts/mount.sh" SUBSYSTEM=="block", ACTION=="remove" RUN+="/etc/udev/scripts/mount.sh" @@ -37,3 +39,4 @@ SUBSYSTEM=="input", KERNEL=="event[0-9]*", ATTRS{modalias}=="input:*-e0*,3,*a0,1 LABEL="persistent_storage_end" +LABEL="nomountblock" diff --git a/meta-fsl-ppc/recipes-append/udev/udev_164.bbappend b/meta-fsl-ppc/recipes-append/udev/udev_164.bbappend index 17988f1f..f15533ba 100644 --- a/meta-fsl-ppc/recipes-append/udev/udev_164.bbappend +++ b/meta-fsl-ppc/recipes-append/udev/udev_164.bbappend @@ -1,4 +1,3 @@ -FILEXTRAPATHS_prepend_fsl := "${THISDIR}/files:" - -PR_fsl .= "+${DISTRO}.0" +FILESEXTRAPATHS_prepend_fsl := "${THISDIR}/files:" +PR_fsl .= "+${DISTRO}.1" -- cgit v1.2.3-54-g00ecf From c2ea674023dab99514e517bc01d5f6dcfd48a7f1 Mon Sep 17 00:00:00 2001 From: Chunrong Guo Date: Thu, 23 Aug 2012 10:15:56 +0000 Subject: change the priority of packages which provide ifconfig to ifconfig link ifconfig.net-tools by default Signed-off-by: Chunrong Guo --- meta-fsl-ppc/recipes-append/net-tools/net-tools_1.60-23.bbappend | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 meta-fsl-ppc/recipes-append/net-tools/net-tools_1.60-23.bbappend diff --git a/meta-fsl-ppc/recipes-append/net-tools/net-tools_1.60-23.bbappend b/meta-fsl-ppc/recipes-append/net-tools/net-tools_1.60-23.bbappend new file mode 100644 index 00000000..b780bac6 --- /dev/null +++ b/meta-fsl-ppc/recipes-append/net-tools/net-tools_1.60-23.bbappend @@ -0,0 +1,9 @@ +PR_append_fsl = "+${DISTRO}.0" + +inherit update-alternatives + +ALTERNATIVE_NAME_fsl = "ifconfig" +ALTERNATIVE_LINK_fsl = "${base_sbindir}/ifconfig" +ALTERNATIVE_PATH_fsl = "${base_sbindir}/ifconfig.net-tools" +ALTERNATIVE_PRIORITY_fsl = "200" + -- cgit v1.2.3-54-g00ecf From a3900aa24fcc7aa3984110dca053a3ac3a9db1db Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Wed, 19 Sep 2012 15:47:15 -0500 Subject: rename task- to packagegroup- Signed-off-by: Matthew McClintock --- meta-fsl-ppc/conf/distro/fsl.conf | 2 +- meta-fsl-ppc/images/fsl-image-lsb-sdk.bb | 4 ++-- meta-fsl-ppc/images/fsl-image-minimal.bb | 2 +- meta-fsl-ppc/images/fsl-toolchain-bare.bb | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/meta-fsl-ppc/conf/distro/fsl.conf b/meta-fsl-ppc/conf/distro/fsl.conf index 600972f9..8f45d1a3 100644 --- a/meta-fsl-ppc/conf/distro/fsl.conf +++ b/meta-fsl-ppc/conf/distro/fsl.conf @@ -18,7 +18,7 @@ DISTRO_FEATURES_append = " largefile multiarch" SDK_NAME = "${DISTRO}-${TCLIBC}-${SDK_ARCH}-${TUNE_PKGARCH}" SDKPATH = "/opt/${DISTRO}/${SDK_VERSION}" -DISTRO_EXTRA_RDEPENDS += "task-core-boot" +DISTRO_EXTRA_RDEPENDS += "packagegroup-core-boot" DISTRO_EXTRA_RRECOMMENDS += "" POKYQEMUDEPS = "${@base_contains("INCOMPATIBLE_LICENSE", "GPLv3", "", "qemu-config",d)}" diff --git a/meta-fsl-ppc/images/fsl-image-lsb-sdk.bb b/meta-fsl-ppc/images/fsl-image-lsb-sdk.bb index fe93b538..1ba38d3f 100644 --- a/meta-fsl-ppc/images/fsl-image-lsb-sdk.bb +++ b/meta-fsl-ppc/images/fsl-image-lsb-sdk.bb @@ -3,8 +3,8 @@ EXTRA_IMAGE_FEATURES = "tools-debug tools-profile tools-testapps debug-tweaks" IMAGE_INSTALL = "\ ${CORE_IMAGE_BASE_INSTALL} \ - task-core-basic \ - task-core-lsb \ + packagegroup-core-basic \ + packagegroup-core-lsb \ git \ dtc \ flex \ diff --git a/meta-fsl-ppc/images/fsl-image-minimal.bb b/meta-fsl-ppc/images/fsl-image-minimal.bb index f3d1ad4f..17325851 100644 --- a/meta-fsl-ppc/images/fsl-image-minimal.bb +++ b/meta-fsl-ppc/images/fsl-image-minimal.bb @@ -1,7 +1,7 @@ # # Copyright (C) 2007 OpenedHand Ltd. # -IMAGE_INSTALL = "task-core-boot ${ROOTFS_PKGMANAGE_BOOTSTRAP} u-boot" +IMAGE_INSTALL = "packagegroup-core-boot ${ROOTFS_PKGMANAGE_BOOTSTRAP} u-boot" IMAGE_LINGUAS = " " LICENSE = "MIT" diff --git a/meta-fsl-ppc/images/fsl-toolchain-bare.bb b/meta-fsl-ppc/images/fsl-toolchain-bare.bb index 16f32981..74a3c4a9 100644 --- a/meta-fsl-ppc/images/fsl-toolchain-bare.bb +++ b/meta-fsl-ppc/images/fsl-toolchain-bare.bb @@ -3,6 +3,6 @@ PR = "r3" require recipes-core/meta/meta-toolchain.bb TOOLCHAIN_OUTPUTNAME = "${SDK_NAME}-toolchain-bare-${DISTRO_VERSION}" -TOOLCHAIN_TARGET_TASK = "task-core-standalone-sdk-target" -TOOLCHAIN_HOST_TASK = "task-cross-canadian-${TRANSLATED_TARGET_ARCH}" +TOOLCHAIN_TARGET_TASK = "packagegroup-core-standalone-sdk-target" +TOOLCHAIN_HOST_TASK = "packagegroup-cross-canadian-${TRANSLATED_TARGET_ARCH}" TOOLCHAIN_NEED_CONFIGSITE_CACHE += "zlib" -- cgit v1.2.3-54-g00ecf From 9a72ee5a51cefeac6a5d2c3733db6b382cf0ecad Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Thu, 20 Sep 2012 13:10:42 -0500 Subject: rcw_git.bb: update to latest and update LIC_FILES_CHECKSUM Signed-off-by: Matthew McClintock --- meta-fsl-ppc/recipes-tools/rcw/rcw_git.bb | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/meta-fsl-ppc/recipes-tools/rcw/rcw_git.bb b/meta-fsl-ppc/recipes-tools/rcw/rcw_git.bb index 4487f9ec..7451a9e2 100644 --- a/meta-fsl-ppc/recipes-tools/rcw/rcw_git.bb +++ b/meta-fsl-ppc/recipes-tools/rcw/rcw_git.bb @@ -1,14 +1,9 @@ DESCRIPTION = "Reset Control Words (RCW)" SECTION = "rcw" LICENSE = "BSD" -PR = "r4" +PR = "r5" -LIC_FILES_CHKSUM = " \ - file://p2041rdb/LICENSE;md5=96dd72f26e9bb861de5c76c60e35e1bc \ - file://p3041ds/LICENSE;md5=96dd72f26e9bb861de5c76c60e35e1bc \ - file://p4080ds/LICENSE;md5=96dd72f26e9bb861de5c76c60e35e1bc \ - file://p5020ds/LICENSE;md5=96dd72f26e9bb861de5c76c60e35e1bc \ -" +LIC_FILES_CHKSUM = "file://rcw.py;beginline=8;endline=28;md5=9ba0b28922dd187b06b6c8ebcfdd208e" # this package is specific to the machine itself INHIBIT_DEFAULT_DEPS = "1" @@ -16,7 +11,7 @@ PACKAGE_ARCH = "${MACHINE_ARCH}" inherit deploy -SRCREV = "394db85c496f6e41dd7e29e54dab3db2b380b187" +SRCREV = "a84434258ac4a1f0c7cb6e9ea709dc8c3267f788" SRC_URI = "git://git.freescale.com/ppc/sdk/rcw.git" S = "${WORKDIR}/git" -- cgit v1.2.3-54-g00ecf From bbec905faafd85e65df61da4b782bf86829a3941 Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Thu, 20 Sep 2012 14:09:54 -0500 Subject: Revert "change the priority of packages which provide ifconfig to ifconfig link ifconfig.net-tools by default" This reverts commit bbf7c8e9216c6844dd4c6e63e6432df8293fb4bc. --- meta-fsl-ppc/recipes-append/net-tools/net-tools_1.60-23.bbappend | 9 --------- 1 file changed, 9 deletions(-) delete mode 100644 meta-fsl-ppc/recipes-append/net-tools/net-tools_1.60-23.bbappend diff --git a/meta-fsl-ppc/recipes-append/net-tools/net-tools_1.60-23.bbappend b/meta-fsl-ppc/recipes-append/net-tools/net-tools_1.60-23.bbappend deleted file mode 100644 index b780bac6..00000000 --- a/meta-fsl-ppc/recipes-append/net-tools/net-tools_1.60-23.bbappend +++ /dev/null @@ -1,9 +0,0 @@ -PR_append_fsl = "+${DISTRO}.0" - -inherit update-alternatives - -ALTERNATIVE_NAME_fsl = "ifconfig" -ALTERNATIVE_LINK_fsl = "${base_sbindir}/ifconfig" -ALTERNATIVE_PATH_fsl = "${base_sbindir}/ifconfig.net-tools" -ALTERNATIVE_PRIORITY_fsl = "200" - -- cgit v1.2.3-54-g00ecf From 79d76f7289d32289b01f80d5c4f14c4e4baecd50 Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Tue, 25 Sep 2012 12:52:27 -0500 Subject: add u-boot as an extra image dep Signed-off-by: Matthew McClintock --- meta-fsl-ppc/conf/machine/e500mc.inc | 1 + meta-fsl-ppc/conf/machine/e500v2.inc | 1 + meta-fsl-ppc/conf/machine/e5500-64b.inc | 1 + meta-fsl-ppc/conf/machine/e5500.inc | 1 + meta-fsl-ppc/conf/machine/e6500-64b.inc | 1 + meta-fsl-ppc/conf/machine/e6500.inc | 1 + 6 files changed, 6 insertions(+) diff --git a/meta-fsl-ppc/conf/machine/e500mc.inc b/meta-fsl-ppc/conf/machine/e500mc.inc index 9f7ed31e..a72ea5fe 100644 --- a/meta-fsl-ppc/conf/machine/e500mc.inc +++ b/meta-fsl-ppc/conf/machine/e500mc.inc @@ -16,3 +16,4 @@ KERNEL_IMAGETYPE ?= "uImage" # ext2.gz.u-boot ext2.bz2.u-boot ext2.lzma.u-boot" MACHINEOVERRIDES .= ":e500mc:fslmachine" +EXTRA_IMAGEDEPENDS += "u-boot" diff --git a/meta-fsl-ppc/conf/machine/e500v2.inc b/meta-fsl-ppc/conf/machine/e500v2.inc index da515da0..23d1bb5a 100644 --- a/meta-fsl-ppc/conf/machine/e500v2.inc +++ b/meta-fsl-ppc/conf/machine/e500v2.inc @@ -14,3 +14,4 @@ KERNEL_IMAGETYPE ?= "uImage" # ext2.gz.u-boot ext2.bz2.u-boot ext2.lzma.u-boot" MACHINEOVERRIDES .= ":e500v2:fslmachine" +EXTRA_IMAGEDEPENDS += "u-boot" diff --git a/meta-fsl-ppc/conf/machine/e5500-64b.inc b/meta-fsl-ppc/conf/machine/e5500-64b.inc index 709880ec..d88e14fd 100644 --- a/meta-fsl-ppc/conf/machine/e5500-64b.inc +++ b/meta-fsl-ppc/conf/machine/e5500-64b.inc @@ -17,3 +17,4 @@ KERNEL_IMAGETYPE ?= "uImage" # ext2.gz.u-boot ext2.bz2.u-boot ext2.lzma.u-boot" MACHINEOVERRIDES .= ":e5500-64b:fslmachine" +EXTRA_IMAGEDEPENDS += "u-boot" diff --git a/meta-fsl-ppc/conf/machine/e5500.inc b/meta-fsl-ppc/conf/machine/e5500.inc index 75c333a9..05facead 100644 --- a/meta-fsl-ppc/conf/machine/e5500.inc +++ b/meta-fsl-ppc/conf/machine/e5500.inc @@ -16,3 +16,4 @@ KERNEL_IMAGETYPE ?= "uImage" # ext2.gz.u-boot ext2.bz2.u-boot ext2.lzma.u-boot" MACHINEOVERRIDES .= ":e5500:fslmachine" +EXTRA_IMAGEDEPENDS += "u-boot" diff --git a/meta-fsl-ppc/conf/machine/e6500-64b.inc b/meta-fsl-ppc/conf/machine/e6500-64b.inc index 32837b56..2b6632bd 100644 --- a/meta-fsl-ppc/conf/machine/e6500-64b.inc +++ b/meta-fsl-ppc/conf/machine/e6500-64b.inc @@ -17,3 +17,4 @@ KERNEL_IMAGETYPE ?= "uImage" # ext2.gz.u-boot ext2.bz2.u-boot ext2.lzma.u-boot" MACHINEOVERRIDES .= ":e6500-64b:fslmachine" +EXTRA_IMAGEDEPENDS += "u-boot" diff --git a/meta-fsl-ppc/conf/machine/e6500.inc b/meta-fsl-ppc/conf/machine/e6500.inc index 46879726..d18070e5 100644 --- a/meta-fsl-ppc/conf/machine/e6500.inc +++ b/meta-fsl-ppc/conf/machine/e6500.inc @@ -16,3 +16,4 @@ KERNEL_IMAGETYPE ?= "uImage" # ext2.gz.u-boot ext2.bz2.u-boot ext2.lzma.u-boot" MACHINEOVERRIDES .= ":e6500:fslmachine" +EXTRA_IMAGEDEPENDS += "u-boot" -- cgit v1.2.3-54-g00ecf From 3214c7e4c7e62d72c441d94c5b1d2a787000e1af Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Tue, 25 Sep 2012 14:23:16 -0500 Subject: u-boot_git.bb: don't try to built 32-bit u-boot on 64-bit machine Signed-off-by: Matthew McClintock --- meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb b/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb index d6a5885f..aa46bb1e 100644 --- a/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb +++ b/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb @@ -5,7 +5,7 @@ PROVIDES = "virtual/bootloader" LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=1707d6db1d42237583f50183a5651ecb" -PR = "r24" +PR = "r25" INHIBIT_DEFAULT_DEPS = "1" DEPENDS = "boot-format-native virtual/${TARGET_PREFIX}gcc libgcc" @@ -14,6 +14,13 @@ inherit deploy SRCREV = "6d1aef1c02ba9472215234696faa8ce8745a40a9" SRC_URI = "git://git.freescale.com/ppc/sdk/u-boot.git \ " +python () { + ml = d.getVar("MULTILIB_VARIANTS", True) + arch = d.getVar("OVERRIDES", True) + + if ("e5500-64b:" in arch or "e6500-64b:" in arch) and not "lib32" in ml: + raise bb.parse.SkipPackage("Building the u-boot for this arch requires multilib to be enabled") +} DEPENDS_append_e5500-64b = " lib32-gcc-cross lib32-libgcc" PATH_append_e5500-64b = ":${STAGING_BINDIR_NATIVE}/${DEFAULTTUNE_virtclass-multilib-lib32}${TARGET_VENDOR_virtclass-multilib-lib32}-${HOST_OS}/" -- cgit v1.2.3-54-g00ecf From 56c7dd2634e9fd22cfcf8b5f8c8c1714a2a155b6 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sun, 30 Sep 2012 11:07:53 -0700 Subject: machines: Recommend u-boot using MACHINE_EXTRA_RRECOMMENDS Delete unused MACHINE_FEATURES_RRECOMMENDS Signed-off-by: Khem Raj --- meta-fsl-ppc/conf/machine/e500mc.inc | 3 +-- meta-fsl-ppc/conf/machine/e500v2.inc | 3 +-- meta-fsl-ppc/conf/machine/e5500-64b.inc | 3 +-- meta-fsl-ppc/conf/machine/e5500.inc | 3 +-- meta-fsl-ppc/conf/machine/e6500-64b.inc | 3 +-- meta-fsl-ppc/conf/machine/e6500.inc | 3 +-- 6 files changed, 6 insertions(+), 12 deletions(-) diff --git a/meta-fsl-ppc/conf/machine/e500mc.inc b/meta-fsl-ppc/conf/machine/e500mc.inc index a72ea5fe..505d8051 100644 --- a/meta-fsl-ppc/conf/machine/e500mc.inc +++ b/meta-fsl-ppc/conf/machine/e500mc.inc @@ -3,7 +3,7 @@ TARGET_FPU = "hard" require conf/machine/include/tune-ppce500mc.inc MACHINE_FEATURES = "kernel26 keyboard pci ext2 ext3 serial" -MACHINE_FEATURES_RRECOMMENDS = "" +MACHINE_EXTRA_RRECOMMENDS = "u-boot" PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" PREFERRED_VERSION_virtual/kernel ?= "3.0.34" @@ -16,4 +16,3 @@ KERNEL_IMAGETYPE ?= "uImage" # ext2.gz.u-boot ext2.bz2.u-boot ext2.lzma.u-boot" MACHINEOVERRIDES .= ":e500mc:fslmachine" -EXTRA_IMAGEDEPENDS += "u-boot" diff --git a/meta-fsl-ppc/conf/machine/e500v2.inc b/meta-fsl-ppc/conf/machine/e500v2.inc index 23d1bb5a..12086f79 100644 --- a/meta-fsl-ppc/conf/machine/e500v2.inc +++ b/meta-fsl-ppc/conf/machine/e500v2.inc @@ -1,7 +1,7 @@ require conf/machine/include/tune-ppce500v2.inc MACHINE_FEATURES = "kernel26 pci ext2 ext3 serial" -MACHINE_EXTRA_RRECOMMENDS = "" +MACHINE_EXTRA_RRECOMMENDS = "u-boot" PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" PREFERRED_VERSION_virtual/kernel ?= "3.0.34" @@ -14,4 +14,3 @@ KERNEL_IMAGETYPE ?= "uImage" # ext2.gz.u-boot ext2.bz2.u-boot ext2.lzma.u-boot" MACHINEOVERRIDES .= ":e500v2:fslmachine" -EXTRA_IMAGEDEPENDS += "u-boot" diff --git a/meta-fsl-ppc/conf/machine/e5500-64b.inc b/meta-fsl-ppc/conf/machine/e5500-64b.inc index d88e14fd..650585f3 100644 --- a/meta-fsl-ppc/conf/machine/e5500-64b.inc +++ b/meta-fsl-ppc/conf/machine/e5500-64b.inc @@ -4,7 +4,7 @@ DEFAULTTUNE ?= "ppc64e5500" require conf/machine/include/tune-ppce5500.inc MACHINE_FEATURES = "kernel26 keyboard pci ext2 ext3 serial" -MACHINE_FEATURES_RRECOMMENDS = "" +MACHINE_EXTRA_RRECOMMENDS = "u-boot" PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" PREFERRED_VERSION_virtual/kernel ?= "3.0.34" @@ -17,4 +17,3 @@ KERNEL_IMAGETYPE ?= "uImage" # ext2.gz.u-boot ext2.bz2.u-boot ext2.lzma.u-boot" MACHINEOVERRIDES .= ":e5500-64b:fslmachine" -EXTRA_IMAGEDEPENDS += "u-boot" diff --git a/meta-fsl-ppc/conf/machine/e5500.inc b/meta-fsl-ppc/conf/machine/e5500.inc index 05facead..1a1bb20b 100644 --- a/meta-fsl-ppc/conf/machine/e5500.inc +++ b/meta-fsl-ppc/conf/machine/e5500.inc @@ -3,7 +3,7 @@ TARGET_FPU = "hard" require conf/machine/include/tune-ppce5500.inc MACHINE_FEATURES = "kernel26 keyboard pci ext2 ext3 serial" -MACHINE_FEATURES_RRECOMMENDS = "" +MACHINE_EXTRA_RRECOMMENDS = "u-boot" PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" PREFERRED_VERSION_virtual/kernel ?= "3.0.34" @@ -16,4 +16,3 @@ KERNEL_IMAGETYPE ?= "uImage" # ext2.gz.u-boot ext2.bz2.u-boot ext2.lzma.u-boot" MACHINEOVERRIDES .= ":e5500:fslmachine" -EXTRA_IMAGEDEPENDS += "u-boot" diff --git a/meta-fsl-ppc/conf/machine/e6500-64b.inc b/meta-fsl-ppc/conf/machine/e6500-64b.inc index 2b6632bd..85bcb392 100644 --- a/meta-fsl-ppc/conf/machine/e6500-64b.inc +++ b/meta-fsl-ppc/conf/machine/e6500-64b.inc @@ -4,7 +4,7 @@ DEFAULTTUNE ?= "ppc64e6500" require conf/machine/include/tune-ppce6500.inc MACHINE_FEATURES = "kernel26 keyboard pci ext2 ext3 serial" -MACHINE_FEATURES_RRECOMMENDS = "" +MACHINE_EXTRA_RRECOMMENDS = "u-boot" PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" PREFERRED_VERSION_virtual/kernel ?= "3.0.34" @@ -17,4 +17,3 @@ KERNEL_IMAGETYPE ?= "uImage" # ext2.gz.u-boot ext2.bz2.u-boot ext2.lzma.u-boot" MACHINEOVERRIDES .= ":e6500-64b:fslmachine" -EXTRA_IMAGEDEPENDS += "u-boot" diff --git a/meta-fsl-ppc/conf/machine/e6500.inc b/meta-fsl-ppc/conf/machine/e6500.inc index d18070e5..31c61a26 100644 --- a/meta-fsl-ppc/conf/machine/e6500.inc +++ b/meta-fsl-ppc/conf/machine/e6500.inc @@ -3,7 +3,7 @@ TARGET_FPU = "hard" require conf/machine/include/tune-ppce6500.inc MACHINE_FEATURES = "kernel26 keyboard pci ext2 ext3 serial" -MACHINE_FEATURES_RRECOMMENDS = "" +MACHINE_EXTRA_RRECOMMENDS = "u-boot" PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" PREFERRED_VERSION_virtual/kernel ?= "3.0.34" @@ -16,4 +16,3 @@ KERNEL_IMAGETYPE ?= "uImage" # ext2.gz.u-boot ext2.bz2.u-boot ext2.lzma.u-boot" MACHINEOVERRIDES .= ":e6500:fslmachine" -EXTRA_IMAGEDEPENDS += "u-boot" -- cgit v1.2.3-54-g00ecf From 833992ff473ed58f80b3060cb10ddc0441df82b2 Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Tue, 2 Oct 2012 14:23:42 -0500 Subject: linux-qoriq-sdk.inc: skip arch QA since kernel might not match for 64-bit kernels on 32-bit rfs Signed-off-by: Matthew McClintock --- meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc index f97a8c0c..6cd9cc41 100644 --- a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc +++ b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc @@ -1,7 +1,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7" + + PV = "3.0.34" -PR = "r7" +PR = "r8" SRCREV = "058c67be272af9ab95b88c941f31fb3eda05a4d3" SRC_URI = "git://git.freescale.com/ppc/sdk/linux.git \ @@ -27,4 +29,12 @@ python () { if promote_kernel == "1": d.setVar('KERNEL_CC_append', ' -m64') d.setVar('KERNEL_LD_append', ' -melf64ppc') + + error_qa = d.getVar('ERROR_QA', True) + if 'arch' in error_qa: + d.setVar('ERROR_QA', error_qa.replace(' arch', '')) + + all_qa = d.getVar('ALL_QA', True) + if 'arch' in all_qa: + d.setVar('ALL_QA', all_qa.replace(' arch', '')) } -- cgit v1.2.3-54-g00ecf From 1bb415d4b09f137a6ca1bd23a9b0c688aecafaf2 Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Tue, 16 Oct 2012 13:15:16 -0500 Subject: hypervisor_git.bb: initial add of embedded-hv to public layer Signed-off-by: Matthew McClintock --- .../embedded-hv/files/81-fsl-embedded-hv.rules | 2 + .../recipes-tools/embedded-hv/hypervisor_git.bb | 79 ++++++++++++++++++++++ 2 files changed, 81 insertions(+) create mode 100644 meta-fsl-ppc/recipes-tools/embedded-hv/files/81-fsl-embedded-hv.rules create mode 100644 meta-fsl-ppc/recipes-tools/embedded-hv/hypervisor_git.bb diff --git a/meta-fsl-ppc/recipes-tools/embedded-hv/files/81-fsl-embedded-hv.rules b/meta-fsl-ppc/recipes-tools/embedded-hv/files/81-fsl-embedded-hv.rules new file mode 100644 index 00000000..5edfa113 --- /dev/null +++ b/meta-fsl-ppc/recipes-tools/embedded-hv/files/81-fsl-embedded-hv.rules @@ -0,0 +1,2 @@ +# Add rule to handle setting up device node for FSL HV mgmt driver +SUBSYSTEM=="misc", KERNEL=="fsl-hv", NAME="fsl-hv" diff --git a/meta-fsl-ppc/recipes-tools/embedded-hv/hypervisor_git.bb b/meta-fsl-ppc/recipes-tools/embedded-hv/hypervisor_git.bb new file mode 100644 index 00000000..50697fc2 --- /dev/null +++ b/meta-fsl-ppc/recipes-tools/embedded-hv/hypervisor_git.bb @@ -0,0 +1,79 @@ +DESCRIPTION = "Freescale embedded hypervisor" +SECTION = "embedded-hv" +LICENSE = "BSD" +LIC_FILES_CHKSUM = "file://README;endline=22;md5=0655bbc3b7d7166c30c87208b4e23cf0" + +DEPENDS = "u-boot-mkimage-native" + +inherit deploy + +S = "${WORKDIR}/git" +SRCREV = "${AUTOREV}" + +# TODO: fix dtc to use the already built package +SRC_URI = " \ + git://git.freescale.com/ppc/sdk/hypervisor/hypervisor.git;name=hypervisor \ + git://git.freescale.com/ppc/sdk/hypervisor/kconfig.git;name=kconfig;destsuffix=git/kconfig \ + git://git.freescale.com/ppc/sdk/hypervisor/libos.git;name=libos;destsuffix=git/libos \ + git://git.freescale.com/ppc/sdk/hypervisor/mux_server.git;name=mux_server;destsuffix=git/mux_server \ + git://www.jdl.com/software/dtc.git;name=dtc;destsuffix=dtc \ + file://81-fsl-embedded-hv.rules \ + " + +SRCREV_FORMAT="hypervisor" +SRCREV_dtc = "033089f29099bdfd5c2d6986cdb9fd07b16cfde0" + +EXTRA_OEMAKE = 'CROSS_COMPILE=${TARGET_PREFIX} CC="${TARGET_PREFIX}gcc ${TOOLCHAIN_OPTIONS}"' + +DEFCONFIG = "defconfig" +DEFCONFIG_powerpc64 = "64bit_defconfig" + +do_create_link () { + cd ${S}/.. + if [ ! -e hv ]; then + ln -s ${S} hv + fi +} +addtask create_link before do_compile after do_configure + +inherit cml1 +do_configure () { + oe_runmake ${DEFCONFIG} +} + +do_compile () { + oe_runmake + oe_runmake partman +} + +do_install () { + install -d ${D}/${bindir} + install ${S}/output/bin/linux/partman ${D}/${bindir}/partman + + install -d ${D}${sysconfdir}/udev/rules.d + install -m 0644 ${WORKDIR}/81-fsl-embedded-hv.rules ${D}${sysconfdir}/udev/rules.d + + install -d ${D}/boot/hv + install ${S}/output/.config ${D}/boot/hv/hypervisor.config + install -m 644 ${S}/output/bin/hv ${S}/output/bin/hv.map \ + ${S}/output/bin/hv.uImage ${S}/output/bin/hv.bin \ + ${D}/boot/hv/ +} + +do_deploy () { + install -d ${DEPLOYDIR}/hv/ + install ${S}/output/.config ${DEPLOYDIR}/hv/hypervisor.config + install -m 644 ${S}/output/bin/hv ${S}/output/bin/hv.map \ + ${S}/output/bin/hv.uImage ${S}/output/bin/hv.bin \ + ${DEPLOYDIR}/hv/ +} +addtask deploy before do_build after do_install + +do_deploy_append() { + rm -f ${S}/../hv +} + +ALLOW_EMPTY_${PN} = "1" +PACKAGES_prepend = "${PN}-image ${PN}-partman" +FILES_${PN}-image = "/boot/" +FILES_${PN}-partman = "${bindir}/partman" -- cgit v1.2.3-54-g00ecf From 38650ca65d6225b10c5601ff43858b4f546024bc Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Wed, 17 Oct 2012 18:15:11 +0800 Subject: hypervisor: add missing space character for PACKAGES_prepend Signed-off-by: Zhenhua Luo --- meta-fsl-ppc/recipes-tools/embedded-hv/hypervisor_git.bb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/meta-fsl-ppc/recipes-tools/embedded-hv/hypervisor_git.bb b/meta-fsl-ppc/recipes-tools/embedded-hv/hypervisor_git.bb index 50697fc2..3a3f6058 100644 --- a/meta-fsl-ppc/recipes-tools/embedded-hv/hypervisor_git.bb +++ b/meta-fsl-ppc/recipes-tools/embedded-hv/hypervisor_git.bb @@ -3,6 +3,8 @@ SECTION = "embedded-hv" LICENSE = "BSD" LIC_FILES_CHKSUM = "file://README;endline=22;md5=0655bbc3b7d7166c30c87208b4e23cf0" +PR = "r1" + DEPENDS = "u-boot-mkimage-native" inherit deploy @@ -74,6 +76,6 @@ do_deploy_append() { } ALLOW_EMPTY_${PN} = "1" -PACKAGES_prepend = "${PN}-image ${PN}-partman" +PACKAGES_prepend = "${PN}-image ${PN}-partman " FILES_${PN}-image = "/boot/" FILES_${PN}-partman = "${bindir}/partman" -- cgit v1.2.3-54-g00ecf From 9f4574435e4a7ccd9428256b632cbeb1af0c9b73 Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Fri, 19 Oct 2012 13:48:52 -0500 Subject: hypervisor_git.bb: lock down SHAs to release versions Signed-off-by: Matthew McClintock --- meta-fsl-ppc/recipes-tools/embedded-hv/hypervisor_git.bb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/meta-fsl-ppc/recipes-tools/embedded-hv/hypervisor_git.bb b/meta-fsl-ppc/recipes-tools/embedded-hv/hypervisor_git.bb index 3a3f6058..d3e5b822 100644 --- a/meta-fsl-ppc/recipes-tools/embedded-hv/hypervisor_git.bb +++ b/meta-fsl-ppc/recipes-tools/embedded-hv/hypervisor_git.bb @@ -3,26 +3,27 @@ SECTION = "embedded-hv" LICENSE = "BSD" LIC_FILES_CHKSUM = "file://README;endline=22;md5=0655bbc3b7d7166c30c87208b4e23cf0" -PR = "r1" +PR = "r2" DEPENDS = "u-boot-mkimage-native" inherit deploy S = "${WORKDIR}/git" -SRCREV = "${AUTOREV}" # TODO: fix dtc to use the already built package SRC_URI = " \ git://git.freescale.com/ppc/sdk/hypervisor/hypervisor.git;name=hypervisor \ git://git.freescale.com/ppc/sdk/hypervisor/kconfig.git;name=kconfig;destsuffix=git/kconfig \ git://git.freescale.com/ppc/sdk/hypervisor/libos.git;name=libos;destsuffix=git/libos \ - git://git.freescale.com/ppc/sdk/hypervisor/mux_server.git;name=mux_server;destsuffix=git/mux_server \ git://www.jdl.com/software/dtc.git;name=dtc;destsuffix=dtc \ file://81-fsl-embedded-hv.rules \ " SRCREV_FORMAT="hypervisor" +SRCREV = "d3f8d79ca252fc17d4a9ca5f44f563c8a291a9a1" +SRCREV_kconfig = "47a6c4ac5e0621ecbc309bf1b7b588f08858b7e6" +SRCREV_libos = "8a88243d057c32c83595ba201eaf20fc5ec76190" SRCREV_dtc = "033089f29099bdfd5c2d6986cdb9fd07b16cfde0" EXTRA_OEMAKE = 'CROSS_COMPILE=${TARGET_PREFIX} CC="${TARGET_PREFIX}gcc ${TOOLCHAIN_OPTIONS}"' -- cgit v1.2.3-54-g00ecf From fb2f751cc91cd4c934984c5daee3d13ad0fe7f0e Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Mon, 29 Oct 2012 09:58:38 -0500 Subject: move udev bbappend to new version Signed-off-by: Matthew McClintock --- meta-fsl-ppc/recipes-append/udev/udev_164.bbappend | 3 --- meta-fsl-ppc/recipes-append/udev/udev_182.bbappend | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) delete mode 100644 meta-fsl-ppc/recipes-append/udev/udev_164.bbappend create mode 100644 meta-fsl-ppc/recipes-append/udev/udev_182.bbappend diff --git a/meta-fsl-ppc/recipes-append/udev/udev_164.bbappend b/meta-fsl-ppc/recipes-append/udev/udev_164.bbappend deleted file mode 100644 index f15533ba..00000000 --- a/meta-fsl-ppc/recipes-append/udev/udev_164.bbappend +++ /dev/null @@ -1,3 +0,0 @@ -FILESEXTRAPATHS_prepend_fsl := "${THISDIR}/files:" - -PR_fsl .= "+${DISTRO}.1" diff --git a/meta-fsl-ppc/recipes-append/udev/udev_182.bbappend b/meta-fsl-ppc/recipes-append/udev/udev_182.bbappend new file mode 100644 index 00000000..f15533ba --- /dev/null +++ b/meta-fsl-ppc/recipes-append/udev/udev_182.bbappend @@ -0,0 +1,3 @@ +FILESEXTRAPATHS_prepend_fsl := "${THISDIR}/files:" + +PR_fsl .= "+${DISTRO}.1" -- cgit v1.2.3-54-g00ecf From 6a2d7328aa9e12ddec801412e45d6b9399b79872 Mon Sep 17 00:00:00 2001 From: Chunrong Guo Date: Tue, 30 Oct 2012 01:17:04 -0500 Subject: netbase_5.0.bbappend: SRC_URI_append_fsl instead of SRC_URI_fsl Fixes issues were LIC_FILES_CHKSUM points to an invalid file. Also, it prevents overridding all other patches to netbase Signed-off-by: Chunrong Guo --- meta-fsl-ppc/recipes-append/netbase/netbase_5.0.bbappend | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-fsl-ppc/recipes-append/netbase/netbase_5.0.bbappend b/meta-fsl-ppc/recipes-append/netbase/netbase_5.0.bbappend index 66600586..dc0fd0a6 100644 --- a/meta-fsl-ppc/recipes-append/netbase/netbase_5.0.bbappend +++ b/meta-fsl-ppc/recipes-append/netbase/netbase_5.0.bbappend @@ -1,6 +1,6 @@ FILESEXTRAPATHS_prepend_fsl := "${THISDIR}/files:" -SRC_URI_fsl += "file://71-fsl-dpaa-persistent-networking.rules" +SRC_URI_append_fsl += "file://71-fsl-dpaa-persistent-networking.rules" do_install_append_fsl () { install -d ${D}${sysconfdir}/udev/rules.d/ -- cgit v1.2.3-54-g00ecf From 26ae078c6afd437166dc07b404064b7da1cacebc Mon Sep 17 00:00:00 2001 From: Chunrong Guo Date: Mon, 29 Oct 2012 23:36:49 -0500 Subject: busybox_1.20.2.bbappend:updated FILESEXTRAPATHS_prepend_fsl Fix Fetcher failure for URL: 'file://defconfig-fsl' Signed-off-by: Chunrong Guo --- meta-fsl-ppc/recipes-append/busybox/busybox_1.20.2.bbappend | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-fsl-ppc/recipes-append/busybox/busybox_1.20.2.bbappend b/meta-fsl-ppc/recipes-append/busybox/busybox_1.20.2.bbappend index 60d8b250..9c52eeb1 100644 --- a/meta-fsl-ppc/recipes-append/busybox/busybox_1.20.2.bbappend +++ b/meta-fsl-ppc/recipes-append/busybox/busybox_1.20.2.bbappend @@ -1,6 +1,6 @@ PR_append_fsl = "+${DISTRO}.0" -FILESEXTRAPATHS_prepend_fsl := "${THISDIR}/busybox-1.19.4:" +FILESEXTRAPATHS_prepend_fsl := "${THISDIR}/busybox-1.20.2:" SRC_URI_append_fsl += "file://defconfig-fsl \ file://busybox-1.19.4-ubi-user-h.patch \ -- cgit v1.2.3-54-g00ecf From 2cad95d3bfc34e8b8d342780b3cc42d4639f42f4 Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Mon, 12 Nov 2012 13:42:16 -0600 Subject: u-boot_git.bb: use upstream u-boot for e6500 parts for now We will publish a tested version at git.freescale.com soon, but for now since the upstream u-boot works let's use that one Signed-off-by: Matthew McClintock --- meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb b/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb index aa46bb1e..c0de2eca 100644 --- a/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb +++ b/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb @@ -5,15 +5,20 @@ PROVIDES = "virtual/bootloader" LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=1707d6db1d42237583f50183a5651ecb" -PR = "r25" +PR = "r26" INHIBIT_DEFAULT_DEPS = "1" DEPENDS = "boot-format-native virtual/${TARGET_PREFIX}gcc libgcc" inherit deploy SRCREV = "6d1aef1c02ba9472215234696faa8ce8745a40a9" -SRC_URI = "git://git.freescale.com/ppc/sdk/u-boot.git \ - " +SRC_URI = "git://git.freescale.com/ppc/sdk/u-boot.git" + +SRCREV_e6500 = "59852d03867108217fe88e3bfc3e1e9cedfe63c5" +SRCREV_e6500-64b = "59852d03867108217fe88e3bfc3e1e9cedfe63c5" +SRC_URI_e6500 = "git://git.denx.de/u-boot.git" +SRC_URI_e6500-64b = "git://git.denx.de/u-boot.git" + python () { ml = d.getVar("MULTILIB_VARIANTS", True) arch = d.getVar("OVERRIDES", True) -- cgit v1.2.3-54-g00ecf From f2768539284233df36c471b7cabb59a36b6b275f Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Thu, 9 Aug 2012 19:19:52 +0800 Subject: u-boot: fix nand image name issue for different core type Final nand u-boot image is named differently in u-boot source. That is: "u-boot-nand.bin" for e500v2 boards, "u-boot.bin" for other boards. Signed-off-by: Zhenhua Luo Signed-off-by: Ting Liu --- meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb b/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb index c0de2eca..207a6ffc 100644 --- a/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb +++ b/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb @@ -5,7 +5,7 @@ PROVIDES = "virtual/bootloader" LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=1707d6db1d42237583f50183a5651ecb" -PR = "r26" +PR = "r27" INHIBIT_DEFAULT_DEPS = "1" DEPENDS = "boot-format-native virtual/${TARGET_PREFIX}gcc libgcc" @@ -69,18 +69,20 @@ do_compile () { esac if [ "x${UBOOT_TARGET}" != "x" ]; then - if [ "${MACHINE_ARCH}" == "p1023rds" ] || \ - [ "${MACHINE_ARCH}" == "p2041rdb" ] || \ - [ "${MACHINE_ARCH}" == "p3041ds" ] || \ - [ "${MACHINE_ARCH}" == "p4080ds" ] || \ - [ "${MACHINE_ARCH}" == "p5020ds" ] || \ - [ "${UBOOT_TARGET}" == "u-boot-sd" ] || \ - [ "${UBOOT_TARGET}" == "u-boot-nand" ]; then + if [ "${UBOOT_TARGET}" == "u-boot-sd" ]; then cp ${S}/${board}/u-boot.bin ${S}/${board}/${UBOOT_TARGET}.bin + elif [ "${UBOOT_TARGET}" == "u-boot-nand" ];then + if [ "${DEFAULTTUNE}" != "ppce500v2" ];then + cp ${S}/${board}/u-boot.bin ${S}/${board}/${UBOOT_TARGET}.bin + fi else - ${STAGING_BINDIR_NATIVE}/boot_format \ + if [ -n "${BOOTFORMAT_CONFIG}" ];then + ${STAGING_BINDIR_NATIVE}/boot_format \ ${STAGING_DATADIR_NATIVE}/boot_format/${BOOTFORMAT_CONFIG} \ ${S}/${board}/u-boot.bin -spi ${S}/${board}/${UBOOT_TARGET}.bin + else + cp ${S}/${board}/u-boot.bin ${S}/${board}/${UBOOT_TARGET}.bin + fi fi fi done -- cgit v1.2.3-54-g00ecf From 2350090b4ef0e867d1d9261207dcbc0afec6aff7 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Thu, 13 Sep 2012 15:20:27 +0000 Subject: u-boot: add additional image for p5040ds Signed-off-by: Ting Liu --- meta-fsl-ppc/conf/machine/p5040ds-64b.conf | 2 +- meta-fsl-ppc/conf/machine/p5040ds.conf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/meta-fsl-ppc/conf/machine/p5040ds-64b.conf b/meta-fsl-ppc/conf/machine/p5040ds-64b.conf index c73815b9..9e6b7704 100644 --- a/meta-fsl-ppc/conf/machine/p5040ds-64b.conf +++ b/meta-fsl-ppc/conf/machine/p5040ds-64b.conf @@ -3,7 +3,7 @@ require e5500-64b.inc -UBOOT_MACHINES ?= "P5040DS" +UBOOT_MACHINES ?= "P5040DS P5040DS_NAND P5040DS_SECURE_BOOT" KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p5040ds.dts \ ${S}/arch/powerpc/boot/dts/p5040ds-usdpaa.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet64_smp_defconfig" diff --git a/meta-fsl-ppc/conf/machine/p5040ds.conf b/meta-fsl-ppc/conf/machine/p5040ds.conf index b9f08a53..7c982fd0 100644 --- a/meta-fsl-ppc/conf/machine/p5040ds.conf +++ b/meta-fsl-ppc/conf/machine/p5040ds.conf @@ -3,7 +3,7 @@ require e5500.inc -UBOOT_MACHINES ?= "P5040DS" +UBOOT_MACHINES ?= "P5040DS P5040DS_NAND P5040DS_SECURE_BOOT" KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p5040ds.dts \ ${S}/arch/powerpc/boot/dts/p5040ds-usdpaa.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet32_smp_defconfig" -- cgit v1.2.3-54-g00ecf From e6b3f270022fd09a5d2cf6970142862664ab0f9d Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Wed, 19 Sep 2012 15:33:28 +0000 Subject: sysvinit: move bbappend from meta-fsl-ppc-private to meta-fsl-ppc the bbappend is appled for fsl machines Signed-off-by: Zhenhua Luo --- .../sysvinit/files/auto-detect-hostname.patch | 16 ++++++++++++++++ .../recipes-append/sysvinit/sysvinit_2.88dsf.bbappend | 5 +++++ 2 files changed, 21 insertions(+) create mode 100644 meta-fsl-ppc/recipes-append/sysvinit/files/auto-detect-hostname.patch create mode 100644 meta-fsl-ppc/recipes-append/sysvinit/sysvinit_2.88dsf.bbappend diff --git a/meta-fsl-ppc/recipes-append/sysvinit/files/auto-detect-hostname.patch b/meta-fsl-ppc/recipes-append/sysvinit/files/auto-detect-hostname.patch new file mode 100644 index 00000000..da70184c --- /dev/null +++ b/meta-fsl-ppc/recipes-append/sysvinit/files/auto-detect-hostname.patch @@ -0,0 +1,16 @@ +diff --git a/rcS b/rcS +index 080b04f..51425ff 100755 +--- a/rcS ++++ b/rcS +@@ -22,6 +22,11 @@ export PATH runlevel prevlevel + . /etc/default/rcS + + # ++# Update the hostname according to actual board type ++# ++echo `cat /proc/cpuinfo | grep model | cut -d "," -f 2 | tr "[A-Z]" "[a-z]"` > /etc/hostname ++ ++# + # Trap CTRL-C &c only in this shell so we can interrupt subprocesses. + # + trap ":" INT QUIT TSTP diff --git a/meta-fsl-ppc/recipes-append/sysvinit/sysvinit_2.88dsf.bbappend b/meta-fsl-ppc/recipes-append/sysvinit/sysvinit_2.88dsf.bbappend new file mode 100644 index 00000000..9c9dc75a --- /dev/null +++ b/meta-fsl-ppc/recipes-append/sysvinit/sysvinit_2.88dsf.bbappend @@ -0,0 +1,5 @@ +FILESEXTRAPATHS_prepend_fsl := "${THISDIR}/files:" + +PR_fsl .= "+${DISTRO}.1" + +SRC_URI_append_fsl = " file://auto-detect-hostname.patch;patchdir=../" -- cgit v1.2.3-54-g00ecf From 4e71dfb1fad4d3cb978d6df4ae70e0abbce7d04e Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Wed, 19 Sep 2012 15:06:09 +0800 Subject: lm_sensors: added recipe for v3.3.2 the patch is generated based on http://patches.openembedded.org/patch/27213/ which is submitted by Jackie Huang * Adapted from the recipe for v3.2.0 * Added MANDIR in EXTRA_OEMAKE instead of the moving operation for manuals in do_install * put .a files in _staticdev package Signed-off-by: Zhenhua Luo --- .../lm_sensors/lmsensors-apps_3.3.2.bb | 48 ++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 meta-fsl-ppc/recipes-extended/lm_sensors/lmsensors-apps_3.3.2.bb diff --git a/meta-fsl-ppc/recipes-extended/lm_sensors/lmsensors-apps_3.3.2.bb b/meta-fsl-ppc/recipes-extended/lm_sensors/lmsensors-apps_3.3.2.bb new file mode 100644 index 00000000..57a6f3e7 --- /dev/null +++ b/meta-fsl-ppc/recipes-extended/lm_sensors/lmsensors-apps_3.3.2.bb @@ -0,0 +1,48 @@ +SUMMARY = "A hardware health monitoring package for Linux" +DESCRIPTION = "Lm-sensors is a hardware health monitoring package for Linux. \ + It allows you to access information from temperature, voltage, \ + and fan speed sensors." +HOMEPAGE = "http://www.lm-sensors.org/" +DEPENDS = "sysfsutils virtual/libiconv \ + bison-native flex-native" +LICENSE = "GPLv2 & LGPLv2.1" +LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \ + file://COPYING.LGPL;md5=4fbd65380cdd255951079008b364516c" + +PR = "r1" +PACKAGE_ARCH = "${MACHINE_ARCH}" + +SRC_URI = "http://dl.lm-sensors.org/lm-sensors/releases/lm_sensors-${PV}.tar.bz2" + +SRC_URI[md5sum] = "f357ba00b080ab102a170f7bf8bb2578" +SRC_URI[sha256sum] = "f13dd885406841a7352ccfb8b9ccb23c4c057abe3de4258da5444c149a9e3ae1" + +S = "${WORKDIR}/lm_sensors-${PV}" + +EXTRA_OEMAKE = 'LINUX=${STAGING_KERNEL_DIR} EXLDFLAGS="${LDFLAGS}" \ + MACHINE=${TARGET_ARCH} PREFIX=${prefix} CC="${CC}" \ + AR="${AR}" MANDIR=${mandir}' + +do_compile() { + oe_runmake user PROG_EXTRA=sensors +} + +do_install() { + oe_runmake user_install DESTDIR=${D} +} + +PACKAGES =+ "libsensors libsensors-dev libsensors-staticdev libsensors-dbg libsensors-doc" +PACKAGES =+ "lmsensors-sensors lmsensors-sensors-dbg lmsensors-sensors-doc" +PACKAGES =+ "lmsensors-scripts" + +FILES_lmsensors-scripts = "${bindir}/*.pl ${bindir}/ddcmon ${sbindir}/fancontrol* ${sbindir}/pwmconfig ${sbindir}/sensors-detect" +RDEPENDS_lmsensors-scripts += "lmsensors-sensors perl bash" + +FILES_lmsensors-sensors = "${bindir}/sensors ${sysconfdir}" +FILES_lmsensors-sensors-dbg += "${bindir}/.debug/sensors" +FILES_lmsensors-sensors-doc = "${mandir}/man1 ${mandir}/man5" +FILES_libsensors = "${libdir}/libsensors.so.*" +FILES_libsensors-dbg += "${libdir}/.debug" +FILES_libsensors-dev = "${libdir}/libsensors.so ${includedir}" +FILES_libsensors-staticdev = "${libdir}/libsensors.a" +FILES_libsensors-doc = "${mandir}/man3" -- cgit v1.2.3-54-g00ecf From b14c9b417245727d96bb679bcacb407bee00f26c Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Fri, 28 Sep 2012 12:40:33 +0000 Subject: lio-utils: fix runtime issue 1. add rumtime dependency for lio-utils 2. use commit ID to fix offline build issue 3. install rc.target Signed-off-by: Zhenhua Luo --- .../lio-utils/files/lio-utils-install-more-modules.patch | 15 +++++++++++++++ meta-fsl-ppc/recipes-tools/lio-utils/lio-utils_4.0.bb | 16 +++++++++++++--- 2 files changed, 28 insertions(+), 3 deletions(-) create mode 100644 meta-fsl-ppc/recipes-tools/lio-utils/files/lio-utils-install-more-modules.patch diff --git a/meta-fsl-ppc/recipes-tools/lio-utils/files/lio-utils-install-more-modules.patch b/meta-fsl-ppc/recipes-tools/lio-utils/files/lio-utils-install-more-modules.patch new file mode 100644 index 00000000..7f9b02dd --- /dev/null +++ b/meta-fsl-ppc/recipes-tools/lio-utils/files/lio-utils-install-more-modules.patch @@ -0,0 +1,15 @@ +Upstream-Status: Pending + +install tcm_snap module + +Signed-off-by: Zhenhua Luo +--- a/tcm-py/setup.py 2012-09-27 04:21:14.984705400 -0500 ++++ b/tcm-py/setup.py 2012-09-27 04:20:18.387604661 -0500 +@@ -12,6 +12,6 @@ + author_email='nab@linux-iscsi.org', + url='http://linux-iscsi.org', + license='GPL', +- py_modules=['tcm_dump', 'tcm_fileio','tcm_iblock','tcm_node','tcm_pscsi','tcm_ramdisk','tcm_loop','tcm_fabric'] ++ py_modules=['tcm_dump', 'tcm_fileio','tcm_iblock','tcm_node','tcm_pscsi','tcm_ramdisk','tcm_loop','tcm_fabric', 'tcm_snap'] + ) + diff --git a/meta-fsl-ppc/recipes-tools/lio-utils/lio-utils_4.0.bb b/meta-fsl-ppc/recipes-tools/lio-utils/lio-utils_4.0.bb index d4613503..31aa4fa0 100644 --- a/meta-fsl-ppc/recipes-tools/lio-utils/lio-utils_4.0.bb +++ b/meta-fsl-ppc/recipes-tools/lio-utils/lio-utils_4.0.bb @@ -4,8 +4,11 @@ HOMEPAGE = "http://linux-iscsi.org/index.php/Lio-utils" LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://debian/copyright;md5=c3ea231a32635cbb5debedf3e88aa3df" -SRC_URI = "git://risingtidesystems.com/lio-utils.git;protocal=git" -SRCREV = "lio-4.0" +PR = "r1" + +SRC_URI = "git://risingtidesystems.com/lio-utils.git;protocal=git \ + file://lio-utils-install-more-modules.patch " +SRCREV = "300d9df5e5fa29d7168fb8f0c84a4d9d57436fad" S = "${WORKDIR}/git" inherit distutils @@ -43,6 +46,13 @@ do_install() { if test -d ${S}/tools; then oe_runmake install fi + + install -d ${D}/etc/init.d/ + install -m 755 ${S}/scripts/rc.target ${D}/etc/init.d/ } -FILES_${PN} += "${sbindir}/*" +RDEPENDS_${PN} += "python-stringold python-subprocess python-shell \ + python-datetime python-textutils python-crypt python-netclient python-email" + + +FILES_${PN} += "${sbindir}/* /etc/init.d/*" -- cgit v1.2.3-54-g00ecf From 00621898e2b3f747e04c5ce3e897346d36dee9dc Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Fri, 28 Sep 2012 12:42:10 +0000 Subject: oprofile: add 0.9.6 oprofile-0.9.7 doesn't support e500mc, the patches of e500mc support are only available for oprofile-0.9.6 Signed-off-by: Zhenhua Luo --- ...ile-0.9.6-add-e500mc-support-in-op_events.patch | 17 ++ .../oprofile/oprofile-0.9.6-e500mc-support-2.patch | 37 ++++ .../oprofile/oprofile-0.9.6-e500mc-support.patch | 171 +++++++++++++++ .../oprofile/oprofile-no-query-modules.patch | 29 +++ .../recipes-kernel/oprofile/oprofile/opstart.patch | 237 +++++++++++++++++++++ .../recipes-kernel/oprofile/oprofile_0.9.6.bb | 35 +++ 6 files changed, 526 insertions(+) create mode 100644 meta-fsl-ppc/recipes-kernel/oprofile/oprofile/oprofile-0.9.6-add-e500mc-support-in-op_events.patch create mode 100644 meta-fsl-ppc/recipes-kernel/oprofile/oprofile/oprofile-0.9.6-e500mc-support-2.patch create mode 100644 meta-fsl-ppc/recipes-kernel/oprofile/oprofile/oprofile-0.9.6-e500mc-support.patch create mode 100644 meta-fsl-ppc/recipes-kernel/oprofile/oprofile/oprofile-no-query-modules.patch create mode 100644 meta-fsl-ppc/recipes-kernel/oprofile/oprofile/opstart.patch create mode 100644 meta-fsl-ppc/recipes-kernel/oprofile/oprofile_0.9.6.bb diff --git a/meta-fsl-ppc/recipes-kernel/oprofile/oprofile/oprofile-0.9.6-add-e500mc-support-in-op_events.patch b/meta-fsl-ppc/recipes-kernel/oprofile/oprofile/oprofile-0.9.6-add-e500mc-support-in-op_events.patch new file mode 100644 index 00000000..2409a63a --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/oprofile/oprofile/oprofile-0.9.6-add-e500mc-support-in-op_events.patch @@ -0,0 +1,17 @@ +Upstream-Status: Pending + +Add e500mc support in libop/op_events.c + +Signed-off-by: Zhenhua Luo +=============================================================================== +diff -urN oprofile-0.9.6/libop/op_events.c oprofile-0.9.6-new/libop/op_events.c +--- oprofile-0.9.6/libop/op_events.c 2009-11-24 23:25:17.000000000 +0800 ++++ oprofile-0.9.6-new/libop/op_events.c 2010-08-19 11:13:15.000000000 +0800 +@@ -1062,6 +1062,7 @@ + + case CPU_PPC_E500: + case CPU_PPC_E500_2: ++ case CPU_PPC_E500MC: + case CPU_PPC_E300: + descr->name = "CPU_CLK"; + break; diff --git a/meta-fsl-ppc/recipes-kernel/oprofile/oprofile/oprofile-0.9.6-e500mc-support-2.patch b/meta-fsl-ppc/recipes-kernel/oprofile/oprofile/oprofile-0.9.6-e500mc-support-2.patch new file mode 100644 index 00000000..297b954c --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/oprofile/oprofile/oprofile-0.9.6-e500mc-support-2.patch @@ -0,0 +1,37 @@ +Upstream-Status: Pending + +Add e500mc event in oprofile Makefile to add e500mc support + +Signed-off-by: Luo Zhenhua +=============================================================================== +diff -urN oprofile-0.9.6-old/events/Makefile.am oprofile-0.9.6/events/Makefile.am +--- oprofile-0.9.6-old/events/Makefile.am 2009-11-24 23:25:18.000000000 +0800 ++++ oprofile-0.9.6/events/Makefile.am 2010-08-13 15:23:24.000000000 +0800 +@@ -55,6 +55,7 @@ + mips/vr5500/events mips/vr5500/unit_masks \ + ppc/7450/events ppc/7450/unit_masks \ + ppc/e500/events ppc/e500/unit_masks \ ++ ppc/e500mc/events ppc/e500mc/unit_masks \ + ppc/e500v2/events ppc/e500v2/unit_masks \ + ppc/e300/events ppc/e300/unit_masks + +diff -urN oprofile-0.9.6-old/events/Makefile.in oprofile-0.9.6/events/Makefile.in +--- oprofile-0.9.6-old/events/Makefile.in 2009-11-24 23:25:48.000000000 +0800 ++++ oprofile-0.9.6/events/Makefile.in 2010-08-13 15:23:03.000000000 +0800 +@@ -258,6 +258,7 @@ + mips/vr5500/events mips/vr5500/unit_masks \ + ppc/7450/events ppc/7450/unit_masks \ + ppc/e500/events ppc/e500/unit_masks \ ++ ppc/e500mc/events ppc/e500mc/unit_masks \ + ppc/e500v2/events ppc/e500v2/unit_masks \ + ppc/e300/events ppc/e300/unit_masks + +@@ -312,7 +313,7 @@ + + + distdir: $(DISTFILES) +- $(mkdir_p) $(distdir)/alpha/ev4 $(distdir)/alpha/ev5 $(distdir)/alpha/ev6 $(distdir)/alpha/ev67 $(distdir)/alpha/pca56 $(distdir)/arm/armv6 $(distdir)/arm/armv7 $(distdir)/arm/mpcore $(distdir)/arm/xscale1 $(distdir)/arm/xscale2 $(distdir)/avr32 $(distdir)/i386/arch_perfmon $(distdir)/i386/athlon $(distdir)/i386/atom $(distdir)/i386/core $(distdir)/i386/core_2 $(distdir)/i386/core_i7 $(distdir)/i386/nehalem $(distdir)/i386/p4 $(distdir)/i386/p4-ht $(distdir)/i386/p6_mobile $(distdir)/i386/pii $(distdir)/i386/piii $(distdir)/i386/ppro $(distdir)/ia64/ia64 $(distdir)/ia64/itanium $(distdir)/ia64/itanium2 $(distdir)/mips/20K $(distdir)/mips/24K $(distdir)/mips/25K $(distdir)/mips/34K $(distdir)/mips/5K $(distdir)/mips/r10000 $(distdir)/mips/r12000 $(distdir)/mips/rm7000 $(distdir)/mips/rm9000 $(distdir)/mips/sb1 $(distdir)/mips/vr5432 $(distdir)/mips/vr5500 $(distdir)/ppc/7450 $(distdir)/ppc/e300 $(distdir)/ppc/e500 $(distdir)/ppc/e500v2 $(distdir)/ppc64/970 $(distdir)/ppc64/970MP $(distdir)/ppc64/cell-be $(distdir)/ppc64/ibm-compat-v1 $(distdir)/ppc64/pa6t $(distdir)/ppc64/power4 $(distdir)/ppc64/power5 $(distdir)/ppc64/power5+ $(distdir)/ppc64/power5++ $(distdir)/ppc64/power6 $(distdir)/ppc64/power7 $(distdir)/rtc $(distdir)/x86-64/family10 $(distdir)/x86-64/family11h $(distdir)/x86-64/hammer ++ $(mkdir_p) $(distdir)/alpha/ev4 $(distdir)/alpha/ev5 $(distdir)/alpha/ev6 $(distdir)/alpha/ev67 $(distdir)/alpha/pca56 $(distdir)/arm/armv6 $(distdir)/arm/armv7 $(distdir)/arm/mpcore $(distdir)/arm/xscale1 $(distdir)/arm/xscale2 $(distdir)/avr32 $(distdir)/i386/arch_perfmon $(distdir)/i386/athlon $(distdir)/i386/atom $(distdir)/i386/core $(distdir)/i386/core_2 $(distdir)/i386/core_i7 $(distdir)/i386/nehalem $(distdir)/i386/p4 $(distdir)/i386/p4-ht $(distdir)/i386/p6_mobile $(distdir)/i386/pii $(distdir)/i386/piii $(distdir)/i386/ppro $(distdir)/ia64/ia64 $(distdir)/ia64/itanium $(distdir)/ia64/itanium2 $(distdir)/mips/20K $(distdir)/mips/24K $(distdir)/mips/25K $(distdir)/mips/34K $(distdir)/mips/5K $(distdir)/mips/r10000 $(distdir)/mips/r12000 $(distdir)/mips/rm7000 $(distdir)/mips/rm9000 $(distdir)/mips/sb1 $(distdir)/mips/vr5432 $(distdir)/mips/vr5500 $(distdir)/ppc/7450 $(distdir)/ppc/e300 $(distdir)/ppc/e500 $(distdir)/ppc/e500mc $(distdir)/ppc/e500v2 $(distdir)/ppc64/970 $(distdir)/ppc64/970MP $(distdir)/ppc64/cell-be $(distdir)/ppc64/ibm-compat-v1 $(distdir)/ppc64/pa6t $(distdir)/ppc64/power4 $(distdir)/ppc64/power5 $(distdir)/ppc64/power5+ $(distdir)/ppc64/power5++ $(distdir)/ppc64/power6 $(distdir)/ppc64/power7 $(distdir)/rtc $(distdir)/x86-64/family10 $(distdir)/x86-64/family11h $(distdir)/x86-64/hammer + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ + list='$(DISTFILES)'; for file in $$list; do \ diff --git a/meta-fsl-ppc/recipes-kernel/oprofile/oprofile/oprofile-0.9.6-e500mc-support.patch b/meta-fsl-ppc/recipes-kernel/oprofile/oprofile/oprofile-0.9.6-e500mc-support.patch new file mode 100644 index 00000000..022b5bdb --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/oprofile/oprofile/oprofile-0.9.6-e500mc-support.patch @@ -0,0 +1,171 @@ +Upstream-Status: Pending + +Add e500mc event in oprofile to add e500mc support + +Signed-off-by: George Stephen +=============================================================================== +diff -urN oprofile-0.9.6/events/ppc/e500mc/events oprofile-0.9.6-new/events/ppc/e500mc/events +--- oprofile-0.9.6/events/ppc/e500mc/events 1970-01-01 08:00:00.000000000 +0800 ++++ oprofile-0.9.6-new/events/ppc/e500mc/events 2010-08-16 17:57:49.000000000 +0800 +@@ -0,0 +1,120 @@ ++# e500mc Events ++# ++# Copyright (C) 2010 Freescale Semiconductor, Inc. ++# ++event:0x1 counters:0,1,2,3 um:zero minimum:100 name:CPU_CLK : Cycles ++event:0x2 counters:0,1,2,3 um:zero minimum:500 name:COMPLETED_INSNS : Completed Instructions (0, 1, or 2 per cycle) ++event:0x3 counters:0,1,2,3 um:zero minimum:500 name:COMPLETED_OPS : Completed Micro-ops (counts 2 for load/store w/update) ++event:0x4 counters:0,1,2,3 um:zero minimum:500 name:INSTRUCTION_FETCHES : Instruction fetches ++event:0x5 counters:0,1,2,3 um:zero minimum:500 name:DECODED_OPS : Micro-ops decoded ++event:0x8 counters:0,1,2,3 um:zero minimum:500 name:COMPLETED_BRANCHES : Branch Instructions completed ++event:0x9 counters:0,1,2,3 um:zero minimum:500 name:COMPLETED_LOAD_OPS : Load micro-ops completed ++event:0xa counters:0,1,2,3 um:zero minimum:500 name:COMPLETED_STORE_OPS : Store micro-ops completed ++event:0xb counters:0,1,2,3 um:zero minimum:500 name:COMPLETION_REDIRECTS : Number of completion buffer redirects ++event:0xc counters:0,1,2,3 um:zero minimum:500 name:BRANCHES_FINISHED : Branches finished ++event:0xd counters:0,1,2,3 um:zero minimum:500 name:TAKEN_BRANCHES_FINISHED : Taken branches finished ++event:0xe counters:0,1,2,3 um:zero minimum:500 name:BIFFED_BRANCHES_FINISHED : Biffed branches finished ++event:0xf counters:0,1,2,3 um:zero minimum:500 name:BRANCHES_MISPREDICTED : Branch instructions mispredicted due to direction, target, or IAB prediction ++event:0x10 counters:0,1,2,3 um:zero minimum:500 name:BRANCHES_MISPREDICTED_DIRECTION : Branches mispredicted due to direction prediction ++event:0x11 counters:0,1,2,3 um:zero minimum:500 name:BTB_HITS : Branches that hit in the BTB, or missed but are not taken ++event:0x12 counters:0,1,2,3 um:zero minimum:500 name:DECODE_STALLED : Cycles the instruction buffer was not empty, but 0 instructions decoded ++event:0x13 counters:0,1,2,3 um:zero minimum:500 name:ISSUE_STALLED : Cycles the issue buffer is not empty but 0 instructions issued ++event:0x14 counters:0,1,2,3 um:zero minimum:500 name:BRANCH_ISSUE_STALLED : Cycles the branch buffer is not empty but 0 instructions issued ++event:0x15 counters:0,1,2,3 um:zero minimum:500 name:SRS0_SCHEDULE_STALLED : Cycles SRS0 is not empty but 0 instructions scheduled ++event:0x16 counters:0,1,2,3 um:zero minimum:500 name:SRS1_SCHEDULE_STALLED : Cycles SRS1 is not empty but 0 instructions scheduled ++event:0x17 counters:0,1,2,3 um:zero minimum:500 name:VRS_SCHEDULE_STALLED : Cycles VRS is not empty but 0 instructions scheduled ++event:0x18 counters:0,1,2,3 um:zero minimum:500 name:LRS_SCHEDULE_STALLED : Cycles LRS is not empty but 0 instructions scheduled ++event:0x19 counters:0,1,2,3 um:zero minimum:500 name:BRS_SCHEDULE_STALLED : Cycles BRS is not empty but 0 instructions scheduled Load/Store, Data Cache, and dLFB Events ++event:0x1a counters:0,1,2,3 um:zero minimum:500 name:TOTAL_TRANSLATED : Total Ldst microops translated. ++event:0x1b counters:0,1,2,3 um:zero minimum:500 name:LOADS_TRANSLATED : Number of cacheable L* or EVL* microops translated. (This includes microops from load-multiple, load-update, and load-context instructions.) ++event:0x1c counters:0,1,2,3 um:zero minimum:500 name:STORES_TRANSLATED : Number of cacheable ST* or EVST* microops translated. (This includes microops from store-multiple, store-update, and save-context instructions.) ++event:0x1d counters:0,1,2,3 um:zero minimum:500 name:TOUCHES_TRANSLATED : Number of cacheable DCBT and DCBTST instructions translated (L1 only) (Does not count touches that are converted to nops i.e. exceptions, noncacheable, hid0[nopti] bit is set.) ++event:0x1e counters:0,1,2,3 um:zero minimum:500 name:CACHEOPS_TRANSLATED : Number of dcba, dcbf, dcbst, and dcbz instructions translated (e500 traps on dcbi) ++event:0x1f counters:0,1,2,3 um:zero minimum:500 name:CACHEINHIBITED_ACCESSES_TRANSLATED : Number of cache inhibited accesses translated ++event:0x20 counters:0,1,2,3 um:zero minimum:500 name:GUARDED_LOADS_TRANSLATED : Number of guarded loads translated ++event:0x21 counters:0,1,2,3 um:zero minimum:500 name:WRITETHROUGH_STORES_TRANSLATED : Number of write-through stores translated ++event:0x22 counters:0,1,2,3 um:zero minimum:500 name:MISALIGNED_ACCESSES_TRANSLATED : Number of misaligned load or store accesses translated. ++event:0x23 counters:0,1,2,3 um:zero minimum:500 name:TOTAL_ALLOCATED_DLFB : Total allocated to dLFB ++event:0x24 counters:0,1,2,3 um:zero minimum:500 name:LOADS_TRANSLATED_ALLOCATED_DLFB : Loads translated and allocated to dLFB (Applies to same class of instructions as loads translated.) ++event:0x25 counters:0,1,2,3 um:zero minimum:500 name:STORES_COMPLETED_ALLOCATED_DLFB : Stores completed and allocated to dLFB (Applies to same class of instructions as stores translated.) ++event:0x26 counters:0,1,2,3 um:zero minimum:500 name:TOUCHES_TRANSLATED_ALLOCATED_DLFB : Touches translated and allocated to dLFB (Applies to same class of instructions as touches translated.) ++event:0x27 counters:0,1,2,3 um:zero minimum:500 name:STORES_COMPLETED : Number of cacheable ST* or EVST* microops completed. (Applies to the same class of instructions as stores translated.) ++event:0x28 counters:0,1,2,3 um:zero minimum:500 name:DL1_LOCKS : Number of cache lines locked in the dL1. (Counts a lock even if an overlock condition is encountered.) ++event:0x29 counters:0,1,2,3 um:zero minimum:500 name:DL1_RELOADS : This is historically used to determine dcache miss rate (along with loads/stores completed). This counts dL1 reloads for any reason. ++event:0x2a counters:0,1,2,3 um:zero minimum:500 name:DL1_CASTOUTS : dL1 castouts. Does not count castouts due to DCBF. ++event:0x2b counters:0,1,2,3 um:zero minimum:500 name:DETECTED_REPLAYS : Times detected replay condition - Load miss with dLFB full. ++event:0x2c counters:0,1,2,3 um:zero minimum:500 name:LOAD_MISS_QUEUE_FULL_REPLAYS : Load miss with load queue full. ++event:0x2d counters:0,1,2,3 um:zero minimum:500 name:LOAD_GUARDED_MISS_NOT_LAST_REPLAYS : Load guarded miss when the load is not yet at the bottom of the completion buffer. ++event:0x2e counters:0,1,2,3 um:zero minimum:500 name:STORE_TRANSLATED_QUEUE_FULL_REPLAYS : Translate a store when the StQ is full. ++event:0x2f counters:0,1,2,3 um:zero minimum:500 name:ADDRESS_COLLISION_REPLAYS : Address collision. ++event:0x30 counters:0,1,2,3 um:zero minimum:500 name:DMMU_MISS_REPLAYS : DMMU_MISS_REPLAYS : DMMU miss. ++event:0x31 counters:0,1,2,3 um:zero minimum:500 name:DMMU_BUSY_REPLAYS : DMMU_BUSY_REPLAYS : DMMU busy. ++event:0x32 counters:0,1,2,3 um:zero minimum:500 name:SECOND_PART_MISALIGNED_AFTER_MISS_REPLAYS : Second part of misaligned access when first part missed in cache. ++event:0x33 counters:0,1,2,3 um:zero minimum:500 name:LOAD_MISS_DLFB_FULL_CYCLES : Cycles stalled on replay condition - Load miss with dLFB full. ++event:0x34 counters:0,1,2,3 um:zero minimum:500 name:LOAD_MISS_QUEUE_FULL_CYCLES : Cycles stalled on replay condition - Load miss with load queue full. ++event:0x35 counters:0,1,2,3 um:zero minimum:500 name:LOAD_GUARDED_MISS_NOT_LAST_CYCLES : Cycles stalled on replay condition - Load guarded miss when the load is not yet at the bottom of the completion buffer. ++event:0x36 counters:0,1,2,3 um:zero minimum:500 name:STORE_TRANSLATED_QUEUE_FULL_CYCLES : Cycles stalled on replay condition - Translate a store when the StQ is full. ++event:0x37 counters:0,1,2,3 um:zero minimum:500 name:ADDRESS_COLLISION_CYCLES : Cycles stalled on replay condition - Address collision. ++event:0x38 counters:0,1,2,3 um:zero minimum:500 name:DMMU_MISS_CYCLES : Cycles stalled on replay condition - DMMU miss. ++event:0x39 counters:0,1,2,3 um:zero minimum:500 name:DMMU_BUSY_CYCLES : Cycles stalled on replay condition - DMMU busy. ++event:0x3a counters:0,1,2,3 um:zero minimum:500 name:SECOND_PART_MISALIGNED_AFTER_MISS_CYCLES : Cycles stalled on replay condition - Second part of misaligned access when first part missed in cache. ++event:0x3b counters:0,1,2,3 um:zero minimum:500 name:IL1_LOCKS : Number of cache lines locked in the iL1. (Counts a lock even if an overlock condition is encountered.) ++event:0x3c counters:0,1,2,3 um:zero minimum:500 name:IL1_FETCH_RELOADS : This is historically used to determine icache miss rate (along with instructions completed) Reloads due to demand fetch. ++event:0x3d counters:0,1,2,3 um:zero minimum:500 name:FETCHES : Counts the number of fetches that write at least one instruction to the instruction buffer. (With instruction fetched, can used to compute instructions-per-fetch) ++event:0x3e counters:0,1,2,3 um:zero minimum:500 name:IMMU_TLB4K_RELOADS : iMMU TLB4K reloads ++event:0x3f counters:0,1,2,3 um:zero minimum:500 name:IMMU_VSP_RELOADS : iMMU VSP reloads ++event:0x40 counters:0,1,2,3 um:zero minimum:500 name:DMMU_TLB4K_RELOADS : dMMU TLB4K reloads ++event:0x41 counters:0,1,2,3 um:zero minimum:500 name:DMMU_VSP_RELOADS : dMMU VSP reloads ++event:0x42 counters:0,1,2,3 um:zero minimum:500 name:L2MMU_MISSES : Counts iTLB/dTLB error interrupt ++event:0x43 counters:0,1,2,3 um:zero minimum:500 name:BIU_MASTER_REQUESTS : Number of master transactions. (Number of master TSs.) ++event:0x44 counters:0,1,2,3 um:zero minimum:500 name:BIU_MASTER_I_REQUESTS : Number of master I-Side transactions. (Number of master I-Side TSs.) ++event:0x45 counters:0,1,2,3 um:zero minimum:500 name:BIU_MASTER_D_REQUESTS : Number of master D-Side transactions. (Number of master D-Side TSs.) ++event:0x46 counters:0,1,2,3 um:zero minimum:500 name:BIU_MASTER_D_CASTOUT_REQUESTS : Number of master D-Side non-program-demand castout transactions. This counts replacement pushes and snoop pushes. This does not count DCBF castouts. (Number of master D-side non-program-demand castout TSs.) ++event:0x48 counters:0,1,2,3 um:zero minimum:500 name:SNOOP_REQUESTS : Number of externally generated snoop requests. (Counts snoop TSs.) ++event:0x49 counters:0,1,2,3 um:zero minimum:500 name:SNOOP_HITS : Number of snoop hits on all D-side resources regardless of the cache state (modified, exclusive, or shared) ++event:0x4a counters:0,1,2,3 um:zero minimum:500 name:SNOOP_PUSHES : Number of snoop pushes from all D-side resources. (Counts snoop ARTRY/WOPs.) ++event:0x52 counters:0,1,2,3 um:zero minimum:500 name:PMC0_OVERFLOW : Counts the number of times PMC0[32] transitioned from 1 to 0. ++event:0x53 counters:0,1,2,3 um:zero minimum:500 name:PMC1_OVERFLOW : Counts the number of times PMC1[32] transitioned from 1 to 0. ++event:0x54 counters:0,1,2,3 um:zero minimum:500 name:PMC2_OVERFLOW : Counts the number of times PMC2[32] transitioned from 1 to 0. ++event:0x55 counters:0,1,2,3 um:zero minimum:500 name:PMC3_OVERFLOW : Counts the number of times PMC3[32] transitioned from 1 to 0. ++event:0x56 counters:0,1,2,3 um:zero minimum:500 name:INTERRUPTS : Number of interrupts taken ++event:0x57 counters:0,1,2,3 um:zero minimum:500 name:EXTERNAL_INTERRUPTS : Number of external input interrupts taken ++event:0x58 counters:0,1,2,3 um:zero minimum:500 name:CRITICAL_INTERRUPTS : Number of critical input interrupts taken ++event:0x59 counters:0,1,2,3 um:zero minimum:500 name:SC_TRAP_INTERRUPTS : Number of system call and trap interrupts ++event:0x5b counters:0,1,2,3 um:zero minimum:500 name:L2_LINEFILL_REQ : Number L2 Linefill requests ++event:0x5c counters:0,1,2,3 um:zero minimum:500 name:L2_VICTIM_SELECT : Number L2 Victim selects ++event:0x6e counters:0,1,2,3 um:zero minimum:500 name:L2_ACCESS : Number L2 cache accesses ++event:0x6f counters:0,1,2,3 um:zero minimum:500 name:L2_HIT_ACCESS : Number L2 hit cache accesses ++event:0x70 counters:0,1,2,3 um:zero minimum:500 name:L2_DATA_ACCESS : Number L2 data cache accesses ++event:0x71 counters:0,1,2,3 um:zero minimum:500 name:L2_HIT_DATA_ACCESS : Number L2 hit data cache accesses ++event:0x72 counters:0,1,2,3 um:zero minimum:500 name:L2_INST_ACCESS : Number L2 instruction cache accesses ++event:0x73 counters:0,1,2,3 um:zero minimum:500 name:L2_HIT_INST_ACCESS : Number L2 hit instruction cache accesses ++event:0x74 counters:0,1,2,3 um:zero minimum:500 name:L2_ALLOC : Number L2 cache allocations ++event:0x75 counters:0,1,2,3 um:zero minimum:500 name:L2_DATA_ALLOC : Number L2 data cache allocations ++event:0x76 counters:0,1,2,3 um:zero minimum:500 name:L2_DIRTY_DATA_ALLOC : Number L2 dirty data cache allocations ++event:0x77 counters:0,1,2,3 um:zero minimum:500 name:L2_INST_ALLOC : Number L2 instruction cache allocations ++event:0x78 counters:0,1,2,3 um:zero minimum:500 name:L2_UPDATE : Number L2 cache updates ++event:0x79 counters:0,1,2,3 um:zero minimum:500 name:L2_CLEAN_UPDATE : Number L2 cache clean updates ++event:0x7a counters:0,1,2,3 um:zero minimum:500 name:L2_DIRTY_UPDATE : Number L2 cache dirty updates ++event:0x7b counters:0,1,2,3 um:zero minimum:500 name:L2_CLEAN_REDU_UPDATE : Number L2 cache clean redundant updates ++event:0x7c counters:0,1,2,3 um:zero minimum:500 name:L2_DIRTY_REDU_UPDATE : Number L2 cache dirty redundant updates ++event:0x7d counters:0,1,2,3 um:zero minimum:500 name:L2_LOCKS : Number L2 cache locks ++event:0x7e counters:0,1,2,3 um:zero minimum:500 name:L2_CASTOUT : Number L2 cache castouts ++event:0x7f counters:0,1,2,3 um:zero minimum:500 name:L2_HIT_DATA_DIRTY : Number L2 cache data dirty hits ++event:0x82 counters:0,1,2,3 um:zero minimum:500 name:L2_INV_CLEAN : Number L2 cache invalidation of clean lines ++event:0x83 counters:0,1,2,3 um:zero minimum:500 name:L2_INV_INCOHER : Number L2 cache invalidation of incoherent lines ++event:0x84 counters:0,1,2,3 um:zero minimum:500 name:L2_INV_COHER : Number L2 cache invalidation of coherent lines ++event:0x94 counters:0,1,2,3 um:zero minimum:500 name:DVT0 : Detection of write to DEVENT with DVT0 set ++event:0x95 counters:0,1,2,3 um:zero minimum:500 name:DVT1 : Detection of write to DEVENT with DVT1 set ++event:0x96 counters:0,1,2,3 um:zero minimum:500 name:DVT2 : Detection of write to DEVENT with DVT2 set ++event:0x97 counters:0,1,2,3 um:zero minimum:500 name:DVT3 : Detection of write to DEVENT with DVT3 set ++event:0x98 counters:0,1,2,3 um:zero minimum:500 name:DVT4 : Detection of write to DEVENT with DVT4 set ++event:0x99 counters:0,1,2,3 um:zero minimum:500 name:DVT5 : Detection of write to DEVENT with DVT5 set ++event:0x9a counters:0,1,2,3 um:zero minimum:500 name:DVT6 : Detection of write to DEVENT with DVT6 set ++event:0x9b counters:0,1,2,3 um:zero minimum:500 name:DVT7 : Detection of write to DEVENT with DVT7 set ++event:0x9c counters:0,1,2,3 um:zero minimum:500 name:CYCLES_NEXUS_STALLED : Number of completion cycles stalled due to Nexus FIFO full ++event:0xb0 counters:0,1,2,3 um:zero minimum:500 name:DECORATED_LOAD : Number of decorated loads. ++event:0xb1 counters:0,1,2,3 um:zero minimum:500 name:DECORATED_STORE : Number of decorated stores ++event:0xb2 counters:0,1,2,3 um:zero minimum:500 name:LOAD_RETRY : Number of load retries ++event:0xb3 counters:0,1,2,3 um:zero minimum:500 name:STWCX_SUCCESS : Number of successful stwcx. instructions ++event:0xb4 counters:0,1,2,3 um:zero minimum:500 name:STWCX_UNSUCCESS : Number of unsuccessful stwcx. instructions +diff -urN oprofile-0.9.6/events/ppc/e500mc/unit_masks oprofile-0.9.6-new/events/ppc/e500mc/unit_masks +--- oprofile-0.9.6/events/ppc/e500mc/unit_masks 1970-01-01 08:00:00.000000000 +0800 ++++ oprofile-0.9.6-new/events/ppc/e500mc/unit_masks 2010-08-16 17:56:03.000000000 +0800 +@@ -0,0 +1,4 @@ ++# e500 possible unit masks ++# ++name:zero type:mandatory default:0x0 ++ 0x0 No unit mask +diff -urN oprofile-0.9.6/libop/op_cpu_type.c oprofile-0.9.6-new/libop/op_cpu_type.c +--- oprofile-0.9.6/libop/op_cpu_type.c 2009-11-24 23:25:17.000000000 +0800 ++++ oprofile-0.9.6-new/libop/op_cpu_type.c 2010-08-16 17:56:03.000000000 +0800 +@@ -82,6 +82,7 @@ + { "ppc64 compat version 1", "ppc64/ibm-compat-v1", CPU_PPC64_IBM_COMPAT_V1, 4 }, + { "Intel Core/i7", "i386/core_i7", CPU_CORE_I7, 4 }, + { "Intel Atom", "i386/atom", CPU_ATOM, 2 }, ++ { "e500mc", "ppc/e500mc", CPU_PPC_E500MC, 4 }, + }; + + static size_t const nr_cpu_descrs = sizeof(cpu_descrs) / sizeof(struct cpu_descr); +diff -urN oprofile-0.9.6/libop/op_cpu_type.h oprofile-0.9.6-new/libop/op_cpu_type.h +--- oprofile-0.9.6/libop/op_cpu_type.h 2009-11-24 23:25:17.000000000 +0800 ++++ oprofile-0.9.6-new/libop/op_cpu_type.h 2010-08-16 17:56:03.000000000 +0800 +@@ -79,6 +79,7 @@ + CPU_PPC64_IBM_COMPAT_V1, /**< IBM PPC64 processor compat mode version 1 */ + CPU_CORE_I7, /* Intel Core i7, Nehalem */ + CPU_ATOM, /* First generation Intel Atom */ ++ CPU_PPC_E500MC, /**< e500mc */ + MAX_CPU_TYPE + } op_cpu; + +diff -urN oprofile-0.9.6/utils/ophelp.c oprofile-0.9.6-new/utils/ophelp.c +--- oprofile-0.9.6/utils/ophelp.c 2009-11-24 23:25:17.000000000 +0800 ++++ oprofile-0.9.6-new/utils/ophelp.c 2010-08-16 17:56:03.000000000 +0800 +@@ -619,6 +619,7 @@ + + case CPU_PPC_E500: + case CPU_PPC_E500_2: ++ case CPU_PPC_E500MC: + event_doc = + "See PowerPC e500 Core Complex Reference Manual\n" + "Chapter 7: Performance Monitor\n" diff --git a/meta-fsl-ppc/recipes-kernel/oprofile/oprofile/oprofile-no-query-modules.patch b/meta-fsl-ppc/recipes-kernel/oprofile/oprofile/oprofile-no-query-modules.patch new file mode 100644 index 00000000..c9d7cd63 --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/oprofile/oprofile/oprofile-no-query-modules.patch @@ -0,0 +1,29 @@ +disable portions which use query_module on 2.6 kernel this is not available +in OE we dont support 2.4 anyway + + +Upstream-Status: Pending +Signed-off-by: Khem Raj + +Index: oprofile-0.9.6/daemon/liblegacy/opd_kernel.c +=================================================================== +--- oprofile-0.9.6.orig/daemon/liblegacy/opd_kernel.c 2009-11-24 07:25:17.000000000 -0800 ++++ oprofile-0.9.6/daemon/liblegacy/opd_kernel.c 2011-07-18 10:08:39.863798825 -0700 +@@ -270,6 +270,9 @@ + */ + static void opd_drop_module_sample(unsigned long eip) + { ++ verbprintf(vmodule, "query_module not available on linux-2.6: %s\n", strerror(EPERM)); ++ ++#if 0 + char * module_names; + char * name; + size_t size = 1024; +@@ -307,6 +310,7 @@ + + if (module_names) + free(module_names); ++#endif + } + + diff --git a/meta-fsl-ppc/recipes-kernel/oprofile/oprofile/opstart.patch b/meta-fsl-ppc/recipes-kernel/oprofile/oprofile/opstart.patch new file mode 100644 index 00000000..c588deb3 --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/oprofile/oprofile/opstart.patch @@ -0,0 +1,237 @@ +Upstream-Status: Pending + +Index: oprofile/utils/Makefile.am +=================================================================== +--- oprofile.orig/utils/Makefile.am 2005-03-31 18:20:41.000000000 +0100 ++++ oprofile/utils/Makefile.am 2008-07-02 15:14:07.000000000 +0100 +@@ -3,8 +3,15 @@ + + LIBS=@POPT_LIBS@ @LIBERTY_LIBS@ + +-bin_PROGRAMS = ophelp ++bin_PROGRAMS = ophelp opstart + dist_bin_SCRIPTS = opcontrol + + ophelp_SOURCES = ophelp.c + ophelp_LDADD = ../libop/libop.a ../libutil/libutil.a ++ ++opstart_SOURCES = opstart.c ++ ++install-exec-local: ++ cd $(DESTDIR)/$(bindir) && \ ++ rm -f opstop && \ ++ $(LN_S) opstart opstop +Index: oprofile/utils/opstart.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ oprofile/utils/opstart.c 2008-07-02 15:14:07.000000000 +0100 +@@ -0,0 +1,110 @@ ++/** ++ * @file opstart.c ++ * Start/Stop oprofile ++ * ++ * @remark Copyright 2007 Openedhand Ltd. ++ * @remark Read the file COPYING ++ * ++ * @author Richard Purdie ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++int main(const int argc, const char* argv[]) ++{ ++ const char *enable = "/dev/oprofile/enable"; ++ const char *lockfile; ++ unsigned long dpid; ++ struct stat sbuf; ++ FILE *lfile, *efile; ++ int sig, enb, err; ++ ++ if (argc >= 2) { ++ printf("Error: Invalid options.\n"); ++ return 1; ++ } ++ ++ lockfile = getenv("LOCK_FILE"); ++ if (!lockfile) ++ lockfile = "/var/lib/oprofile/lock"; ++ ++ /* Add SESSION_DIR support? */ ++ ++ if (geteuid()) { ++ printf("Error: This program must be run as root.\n"); ++ return 1; ++ } ++ ++ if (stat(enable, &sbuf)) { ++ printf("Error: Could not find /dev/oprofile/enable, the" ++ " kernel module probably isn't loaded.\n"); ++ printf("This binary only works with 2.6 kernels and oprofile" ++ " must have been initialised with 'opcontrol --start-daemon'.\n"); ++ return 1; ++ } ++ ++ if (stat(lockfile, &sbuf)) { ++ printf("Error: Could not find lockfile %s.\n", lockfile); ++ printf("The oprofile daemon must be running (oprofile must" ++ " have been initialised with 'opcontrol --start-daemon').\n"); ++ return 1; ++ } ++ ++ lfile = fopen(lockfile, "r"); ++ if (!lfile) { ++ printf("Error opening lockfile %s.\n", lockfile); ++ return 1; ++ } ++ ++ err = fscanf(lfile, "%lud", (unsigned long *) &dpid); ++ if (err != 1) { ++ printf("Error reading pid from lockfile %s.\n", lockfile); ++ return 1; ++ } ++ fclose(lfile); ++ ++ efile = fopen(enable, "r"); ++ if (!efile) { ++ printf("Error opening %s.\n", enable); ++ return 1; ++ } ++ ++ if (strstr(argv[0], "opstart")) { ++ printf("Starting Profiler\n"); ++ sig = SIGUSR1; ++ enb = 1; ++ } else if (strstr(argv[0], "opstop")) { ++ printf("Stopping Oprofile.\n"); ++ printf("You need to run 'opcontrol --dump' when the session" ++ " is finished.\n"); ++ sig = SIGUSR2; ++ enb = 0; ++ } else { ++ printf("Error: Please call as 'opstart' or 'opstop'\n"); ++ return 1; ++ } ++ ++ err = kill(dpid, 0); ++ if (err) { ++ printf("Error sending signal to oprofiled. Stale lockfile" ++ " (%s) ?\n", lockfile); ++ return 1; ++ } ++ ++ fprintf(efile, "%d\n", enb); ++ err = kill(dpid, sig); ++ if (err) { ++ printf("Error sending signal to oprofiled. Stale lockfile" ++ " (%s) ?\n", lockfile); ++ return 1; ++ } ++ ++ return 0; ++} ++ +Index: oprofile/configure.in +=================================================================== +--- oprofile.orig/configure.in 2008-07-02 15:13:58.000000000 +0100 ++++ oprofile/configure.in 2008-07-02 15:17:37.000000000 +0100 +@@ -16,6 +16,7 @@ + AM_CONFIG_HEADER(config.h) + + AC_PROG_RANLIB ++AC_PROG_LN_S + AC_PROG_LIBTOOL + + dnl for the man page +@@ -241,6 +242,8 @@ + doc/xsl/catalog-1.xml \ + doc/oprofile.1 \ + doc/opcontrol.1 \ ++ doc/opstart.1 \ ++ doc/opstop.1 \ + doc/ophelp.1 \ + doc/opreport.1 \ + doc/opannotate.1 \ +Index: oprofile/doc/Makefile.am +=================================================================== +--- oprofile.orig/doc/Makefile.am 2008-07-02 15:13:59.000000000 +0100 ++++ oprofile/doc/Makefile.am 2008-07-02 15:14:07.000000000 +0100 +@@ -11,6 +11,8 @@ + man_MANS = \ + oprofile.1 \ + opcontrol.1 \ ++ opstart.1 \ ++ opstop.1 \ + opreport.1 \ + opannotate.1 \ + opgprof.1 \ +Index: oprofile/doc/opstart.1.in +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ oprofile/doc/opstart.1.in 2008-07-02 15:14:07.000000000 +0100 +@@ -0,0 +1,27 @@ ++.TH OPSTART 1 "@DATE@" "oprofile @VERSION@" ++.UC 4 ++.SH NAME ++opstart \- start OProfile profiling ++.SH SYNOPSIS ++.br ++.B opstart ++.SH DESCRIPTION ++.B opstart ++is a simple optimised command to start profiling with 2.6 Linux kernels. ++OProfile should have already been initialised by calling "opcontrol --start-daemon". ++ ++.SH ENVIRONMENT ++No special environment variables are recognised by opstart. ++ ++.SH FILES ++.TP ++.I /var/lib/oprofile/samples/ ++The location of the generated sample files. ++ ++.SH VERSION ++.TP ++This man page is current for @PACKAGE@-@VERSION@. ++ ++.SH SEE ALSO ++.BR @OP_DOCDIR@, ++.BR oprofile(1) +Index: oprofile/doc/opstop.1.in +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ oprofile/doc/opstop.1.in 2008-07-02 15:14:07.000000000 +0100 +@@ -0,0 +1,28 @@ ++.TH OPSTOP 1 "@DATE@" "oprofile @VERSION@" ++.UC 4 ++.SH NAME ++opstop \- stop OProfile profiling ++.SH SYNOPSIS ++.br ++.B opstop ++.SH DESCRIPTION ++.B opstop ++is a simple optimsed command to stop profiling with 2.6 Linux kernels. ++You need to run "opcontrol --dump" before being able to view a profile ++with opreport. ++ ++.SH ENVIRONMENT ++No special environment variables are recognised by opstop. ++ ++.SH FILES ++.TP ++.I /var/lib/oprofile/samples/ ++The location of the generated sample files. ++ ++.SH VERSION ++.TP ++This man page is current for @PACKAGE@-@VERSION@. ++ ++.SH SEE ALSO ++.BR @OP_DOCDIR@, ++.BR oprofile(1) diff --git a/meta-fsl-ppc/recipes-kernel/oprofile/oprofile_0.9.6.bb b/meta-fsl-ppc/recipes-kernel/oprofile/oprofile_0.9.6.bb new file mode 100644 index 00000000..6664c899 --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/oprofile/oprofile_0.9.6.bb @@ -0,0 +1,35 @@ +SUMMARY = "System-Wide Profiler" +DESCRIPTION = "OProfile is a system-wide profiler for Linux systems, capable \ +of profiling all running code at low overhead." +HOMEPAGE = "http://oprofile.sourceforge.net/news/" +BUGTRACKER = "http://sourceforge.net/tracker/?group_id=16191&atid=116191" + +LICENSE = "LGPLv2.1+ & GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ + file://libopagent/opagent.h;beginline=5;endline=26;md5=4f16f72c7a493d8a4704aa18d03d15c6 \ + file://daemon/liblegacy/p_module.h;beginline=2;endline=20;md5=fc23a43455edf185307274a99730b6e4" + +SECTION = "devel" + +DEPENDS = "popt binutils" +RDEPENDS_${PN} = "binutils-symlinks" +RRECOMMENDS_${PN} = "kernel-vmlinux" + +FILES_${PN} = "${bindir} ${libdir}/${BPN}/lib*.so.* ${datadir}/${BPN}" +FILES_${PN}-dev += "${libdir}/${BPN}/lib*.so ${libdir}/${BPN}/lib*.la" +FILES_${PN}-staticdev += "${libdir}/${BPN}/lib*.a" + +SRC_URI = "${SOURCEFORGE_MIRROR}/oprofile/oprofile-${PV}.tar.gz \ + file://opstart.patch \ + file://oprofile-no-query-modules.patch \ + file://oprofile-0.9.6-e500mc-support.patch \ + file://oprofile-0.9.6-e500mc-support-2.patch \ + file://oprofile-0.9.6-add-e500mc-support-in-op_events.patch" + +SRC_URI[md5sum] = "4e407093ac06200185d5a5e6437d7242" +SRC_URI[sha256sum] = "3f0dd40a7749fc650d25d79d42ebbff8f3b6db310c36e7c3839696cc09077880" +S = "${WORKDIR}/oprofile-${PV}" + +inherit autotools + +EXTRA_OECONF = "--with-kernel-support --without-x" -- cgit v1.2.3-54-g00ecf From 20e422290416244ac125dde16232fcb68e57845c Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Wed, 10 Oct 2012 09:05:29 +0000 Subject: set preferred version of oprofile to 0.9.6 for e500mc targets Signed-off-by: Zhenhua Luo --- meta-fsl-ppc/conf/machine/e500mc.inc | 1 + 1 file changed, 1 insertion(+) diff --git a/meta-fsl-ppc/conf/machine/e500mc.inc b/meta-fsl-ppc/conf/machine/e500mc.inc index 505d8051..9aa0b3e1 100644 --- a/meta-fsl-ppc/conf/machine/e500mc.inc +++ b/meta-fsl-ppc/conf/machine/e500mc.inc @@ -9,6 +9,7 @@ PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" PREFERRED_VERSION_virtual/kernel ?= "3.0.34" PREFERRED_PROVIDER_linux-libc-headers ?= "linux-qoriq-sdk-headers" PREFERRED_VERSION_qemu = "1.0+fsl" +PREFERRED_VERSION_oprofile = "0.9.6" KERNEL_IMAGETYPE ?= "uImage" # disable the images below for now -- cgit v1.2.3-54-g00ecf From 6315e46ab52bc49931bc9e788d05d378f2abd2c4 Mon Sep 17 00:00:00 2001 From: Stuart Yoder Date: Wed, 10 Oct 2012 03:28:27 +0000 Subject: lxc: remove dhcp from busybox template -the dhcp which is started by default in a container causes our default examples various issues..including vlans not working right, and screwing up host network interfaces if networking isn't virtualized -we do not know yet what the right upstream fix is for this with more testing and characterization needed Signed-off-by: Stuart Yoder --- meta-fsl-ppc/recipes-tools/lxc/busybox_remove_dhcp.patch | 12 ++++++++++++ meta-fsl-ppc/recipes-tools/lxc/lxc_0.8.0-rc1.bb | 3 ++- 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 meta-fsl-ppc/recipes-tools/lxc/busybox_remove_dhcp.patch diff --git a/meta-fsl-ppc/recipes-tools/lxc/busybox_remove_dhcp.patch b/meta-fsl-ppc/recipes-tools/lxc/busybox_remove_dhcp.patch new file mode 100644 index 00000000..d28fda8e --- /dev/null +++ b/meta-fsl-ppc/recipes-tools/lxc/busybox_remove_dhcp.patch @@ -0,0 +1,12 @@ +diff --git a/templates/lxc-busybox.in b/templates/lxc-busybox.in +index a94eaa3..29b87ce 100644 +--- a/templates/lxc-busybox.in ++++ b/templates/lxc-busybox.in +@@ -80,7 +80,6 @@ EOF + #!/bin/sh + /bin/syslogd + /bin/mount -a +-/bin/udhcpc + EOF + + # executable diff --git a/meta-fsl-ppc/recipes-tools/lxc/lxc_0.8.0-rc1.bb b/meta-fsl-ppc/recipes-tools/lxc/lxc_0.8.0-rc1.bb index 51a34f40..e6ed2d6b 100644 --- a/meta-fsl-ppc/recipes-tools/lxc/lxc_0.8.0-rc1.bb +++ b/meta-fsl-ppc/recipes-tools/lxc/lxc_0.8.0-rc1.bb @@ -3,7 +3,7 @@ SECTION = "console/utils" LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=fbc093901857fcd118f065f900982c24" PRIORITY = "optional" -PR = "r1" +PR = "r2" DEPENDS = "libxml2 libcap" RDEPENDS_${PN} = " \ rsync \ @@ -22,6 +22,7 @@ RDEPENDS_${PN} = " \ SRC_URI = "http://lxc.sourceforge.net/download/lxc/${PN}-${PV}.tar.gz \ file://noldconfig.patch \ file://libmounts.patch \ + file://busybox_remove_dhcp.patch \ " SRC_URI[md5sum] ="06ceecf4dbe1be988fc903ad8dd34d29" -- cgit v1.2.3-54-g00ecf From 7e0e2f500d7a933d8a5860eb37296692558a7450 Mon Sep 17 00:00:00 2001 From: Stuart Yoder Date: Wed, 10 Oct 2012 03:28:28 +0000 Subject: lxc: remove hwaddr from vlan config -to get vlan working with the FSL SDK we need to remove the hwaddr. This was found by trial and error. Upstream discussion is started as to when the hwaddr might be needed, but for now remove it Signed-off-by: Stuart Yoder --- meta-fsl-ppc/recipes-tools/lxc/lxc_0.8.0-rc1.bb | 3 ++- meta-fsl-ppc/recipes-tools/lxc/remove_vlan_hwaddr.patch | 11 +++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 meta-fsl-ppc/recipes-tools/lxc/remove_vlan_hwaddr.patch diff --git a/meta-fsl-ppc/recipes-tools/lxc/lxc_0.8.0-rc1.bb b/meta-fsl-ppc/recipes-tools/lxc/lxc_0.8.0-rc1.bb index e6ed2d6b..c8d90aea 100644 --- a/meta-fsl-ppc/recipes-tools/lxc/lxc_0.8.0-rc1.bb +++ b/meta-fsl-ppc/recipes-tools/lxc/lxc_0.8.0-rc1.bb @@ -3,7 +3,7 @@ SECTION = "console/utils" LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=fbc093901857fcd118f065f900982c24" PRIORITY = "optional" -PR = "r2" +PR = "r3" DEPENDS = "libxml2 libcap" RDEPENDS_${PN} = " \ rsync \ @@ -23,6 +23,7 @@ SRC_URI = "http://lxc.sourceforge.net/download/lxc/${PN}-${PV}.tar.gz \ file://noldconfig.patch \ file://libmounts.patch \ file://busybox_remove_dhcp.patch \ + file://remove_vlan_hwaddr.patch \ " SRC_URI[md5sum] ="06ceecf4dbe1be988fc903ad8dd34d29" diff --git a/meta-fsl-ppc/recipes-tools/lxc/remove_vlan_hwaddr.patch b/meta-fsl-ppc/recipes-tools/lxc/remove_vlan_hwaddr.patch new file mode 100644 index 00000000..d3883bd0 --- /dev/null +++ b/meta-fsl-ppc/recipes-tools/lxc/remove_vlan_hwaddr.patch @@ -0,0 +1,11 @@ +diff --git a/doc/examples/lxc-vlan.conf.in b/doc/examples/lxc-vlan.conf.in +index 4404439..231d618 100644 +--- a/doc/examples/lxc-vlan.conf.in ++++ b/doc/examples/lxc-vlan.conf.in +@@ -4,6 +4,5 @@ lxc.network.type = vlan + lxc.network.vlan.id = 1234 + lxc.network.flags = up + lxc.network.link = eth0 +-lxc.network.hwaddr = 4a:49:43:49:79:bd + lxc.network.ipv4 = 1.2.3.4/24 + lxc.network.ipv6 = 2003:db8:1:0:214:1234:fe0b:3596 -- cgit v1.2.3-54-g00ecf From 5e636803458e7f6aebbbc62e4429ad56890dd6c1 Mon Sep 17 00:00:00 2001 From: Stuart Yoder Date: Wed, 10 Oct 2012 03:28:29 +0000 Subject: lxc: create the /var/lib/lxc directory -lxc requires this directory to be present -this patch is a workaround for the issue, plan is to submit a patch upstream to fix this and see what feedback we receive Signed-off-by: Stuart Yoder --- meta-fsl-ppc/recipes-tools/lxc/lxc_0.8.0-rc1.bb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/meta-fsl-ppc/recipes-tools/lxc/lxc_0.8.0-rc1.bb b/meta-fsl-ppc/recipes-tools/lxc/lxc_0.8.0-rc1.bb index c8d90aea..64f36b3c 100644 --- a/meta-fsl-ppc/recipes-tools/lxc/lxc_0.8.0-rc1.bb +++ b/meta-fsl-ppc/recipes-tools/lxc/lxc_0.8.0-rc1.bb @@ -3,7 +3,7 @@ SECTION = "console/utils" LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=fbc093901857fcd118f065f900982c24" PRIORITY = "optional" -PR = "r3" +PR = "r4" DEPENDS = "libxml2 libcap" RDEPENDS_${PN} = " \ rsync \ @@ -36,3 +36,8 @@ EXTRA_OECONF = "--disable-doc --disable-rpath" inherit autotools FILES_${PN}-dbg += "${libexecdir}/lxc/.debug" + +# create empty dir needed by lxc +do_install_append() { + install -d ${D}${localstatedir}/lib/lxc +} -- cgit v1.2.3-54-g00ecf From 3bead4b5e6e4115061247ac3c9092777ede496a4 Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Fri, 12 Oct 2012 14:33:28 +0000 Subject: lmsensors-apps: Add required rdepends of perl modules to lmsensors-{apps,scripts} * lmsensors-apps: Add perl-module-strict perl-module-vars perl-module-warnings-register perl-module-warnings * lmsensors-scripts: perl-module-fcntl perl-module-exporter perl-module-xsloader perl-module-exporter-heavy perl-module-file-basename perl-module-constant Signed-off-by: Zhenhua Luo --- meta-fsl-ppc/recipes-extended/lm_sensors/lmsensors-apps_3.3.2.bb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/meta-fsl-ppc/recipes-extended/lm_sensors/lmsensors-apps_3.3.2.bb b/meta-fsl-ppc/recipes-extended/lm_sensors/lmsensors-apps_3.3.2.bb index 57a6f3e7..62da8146 100644 --- a/meta-fsl-ppc/recipes-extended/lm_sensors/lmsensors-apps_3.3.2.bb +++ b/meta-fsl-ppc/recipes-extended/lm_sensors/lmsensors-apps_3.3.2.bb @@ -9,7 +9,7 @@ LICENSE = "GPLv2 & LGPLv2.1" LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \ file://COPYING.LGPL;md5=4fbd65380cdd255951079008b364516c" -PR = "r1" +PR = "r2" PACKAGE_ARCH = "${MACHINE_ARCH}" SRC_URI = "http://dl.lm-sensors.org/lm-sensors/releases/lm_sensors-${PV}.tar.bz2" @@ -37,6 +37,8 @@ PACKAGES =+ "lmsensors-scripts" FILES_lmsensors-scripts = "${bindir}/*.pl ${bindir}/ddcmon ${sbindir}/fancontrol* ${sbindir}/pwmconfig ${sbindir}/sensors-detect" RDEPENDS_lmsensors-scripts += "lmsensors-sensors perl bash" +RDEPENDS_lmsensors-apps += "perl-module-strict perl-module-vars perl-module-warnings-register perl-module-warnings" +RDEPENDS_lmsensors-scripts += "perl-module-fcntl perl-module-exporter perl-module-xsloader perl-module-exporter-heavy perl-module-file-basename perl-module-constant" FILES_lmsensors-sensors = "${bindir}/sensors ${sysconfdir}" FILES_lmsensors-sensors-dbg += "${bindir}/.debug/sensors" -- cgit v1.2.3-54-g00ecf From 20edcba38aa60c207a1929ecff91688e638b53cb Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Tue, 16 Oct 2012 00:34:24 +0000 Subject: lxc_0.8.0-rc1.bb: point lxc at kernel source Fixes: | powerpc-fsl-linux-gcc: error: default/arch/powerpc/include/asm/unistd.h: No such file or directory | powerpc-fsl-linux-gcc: fatal error: no input files | compilation terminated. | attach.c:45:19: fatal error: setns.h: No such file or directory | compilation terminated. | make[3]: [setns.h] Error 1 (ignored) | powerpc-fsl-linux-gcc -E --sysroot=/opt/yocto/cache-build/p4080ds/build_p4080ds_release/tmp/sysroots/p4080ds -m32 -mhard-float -mcpu=e500mc -dM default/arch/powerpc/include/asm/unistd.h |grep setns > setns.h | make[3]: *** [liblxc_so-attach.o] Error 1 | make[3]: *** Waiting for unfinished jobs.... | powerpc-fsl-linux-gcc: error: default/arch/powerpc/include/asm/unistd.h: No such file or directory | powerpc-fsl-linux-gcc: fatal error: no input files | compilation terminated. | make[3]: [setns.h] Error 1 (ignored) | make[3]: Leaving directory `/opt/yocto/cache-build/p4080ds/build_p4080ds_release/tmp/work/ppce500mc-fsl-linux/lxc-0.8.0-rc1-r4/lxc-0.8.0-rc1/src/lxc' | make[2]: *** [all-recursive] Error 1 | make[2]: Leaving directory `/opt/yocto/cache-build/p4080ds/build_p4080ds_release/tmp/work/ppce500mc-fsl-linux/lxc-0.8.0-rc1-r4/lxc-0.8.0-rc1/src' | make[1]: *** [all] Error 2 | make[1]: Leaving directory `/opt/yocto/cache-build/p4080ds/build_p4080ds_release/tmp/work/ppce500mc-fsl-linux/lxc-0.8.0-rc1-r4/lxc-0.8.0-rc1/src' | make: *** [all-recursive] Error 1 | ERROR: oe_runmake failed Signed-off-by: Matthew McClintock --- meta-fsl-ppc/recipes-tools/lxc/lxc_0.8.0-rc1.bb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/meta-fsl-ppc/recipes-tools/lxc/lxc_0.8.0-rc1.bb b/meta-fsl-ppc/recipes-tools/lxc/lxc_0.8.0-rc1.bb index 64f36b3c..accc16f9 100644 --- a/meta-fsl-ppc/recipes-tools/lxc/lxc_0.8.0-rc1.bb +++ b/meta-fsl-ppc/recipes-tools/lxc/lxc_0.8.0-rc1.bb @@ -3,8 +3,8 @@ SECTION = "console/utils" LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=fbc093901857fcd118f065f900982c24" PRIORITY = "optional" -PR = "r4" -DEPENDS = "libxml2 libcap" +PR = "r5" +DEPENDS = "libxml2 libcap virtual/kernel" RDEPENDS_${PN} = " \ rsync \ gzip \ @@ -31,7 +31,7 @@ SRC_URI[sha256sum] = "32bf83902c07387646c55de440d6d12cf61bd54c97417109c2d1ac47d1 S = "${WORKDIR}/${PN}-${PV}" -EXTRA_OECONF = "--disable-doc --disable-rpath" +EXTRA_OECONF = "--disable-doc --disable-rpath --with-linuxdir=${STAGING_KERNEL_DIR}" inherit autotools -- cgit v1.2.3-54-g00ecf From 7782fcff2176c21cbf2404145c39b1c46125a3ef Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Mon, 22 Oct 2012 13:21:30 -0500 Subject: lxc_0.8.0-rc1.bb: fix parallel makefile issue Signed-off-by: Matthew McClintock --- meta-fsl-ppc/recipes-tools/lxc/files/fix_setns_deps.patch | 12 ++++++++++++ meta-fsl-ppc/recipes-tools/lxc/lxc_0.8.0-rc1.bb | 3 ++- 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 meta-fsl-ppc/recipes-tools/lxc/files/fix_setns_deps.patch diff --git a/meta-fsl-ppc/recipes-tools/lxc/files/fix_setns_deps.patch b/meta-fsl-ppc/recipes-tools/lxc/files/fix_setns_deps.patch new file mode 100644 index 00000000..7ec875ca --- /dev/null +++ b/meta-fsl-ppc/recipes-tools/lxc/files/fix_setns_deps.patch @@ -0,0 +1,12 @@ +Index: lxc-0.8.0-rc1/src/lxc/Makefile.am +=================================================================== +--- lxc-0.8.0-rc1.orig/src/lxc/Makefile.am ++++ lxc-0.8.0-rc1/src/lxc/Makefile.am +@@ -133,6 +133,7 @@ uninstall-local: + $(RM) $(DESTDIR)$(libdir)/liblxc.so* + + namespace.c: setns.h ++attach.c: setns.h + + setns.h: + -$(CC) $(CPPFLAGS) -M -MT$@ $(LINUX_DIR)/arch/$(LINUX_SRCARCH)/include/asm/unistd.h >setns.P diff --git a/meta-fsl-ppc/recipes-tools/lxc/lxc_0.8.0-rc1.bb b/meta-fsl-ppc/recipes-tools/lxc/lxc_0.8.0-rc1.bb index accc16f9..51009373 100644 --- a/meta-fsl-ppc/recipes-tools/lxc/lxc_0.8.0-rc1.bb +++ b/meta-fsl-ppc/recipes-tools/lxc/lxc_0.8.0-rc1.bb @@ -3,7 +3,7 @@ SECTION = "console/utils" LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=fbc093901857fcd118f065f900982c24" PRIORITY = "optional" -PR = "r5" +PR = "r6" DEPENDS = "libxml2 libcap virtual/kernel" RDEPENDS_${PN} = " \ rsync \ @@ -24,6 +24,7 @@ SRC_URI = "http://lxc.sourceforge.net/download/lxc/${PN}-${PV}.tar.gz \ file://libmounts.patch \ file://busybox_remove_dhcp.patch \ file://remove_vlan_hwaddr.patch \ + file://fix_setns_deps.patch \ " SRC_URI[md5sum] ="06ceecf4dbe1be988fc903ad8dd34d29" -- cgit v1.2.3-54-g00ecf From 00d03a97a2c93759faa30e14cb9d39072b494076 Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Mon, 22 Oct 2012 15:55:55 -0500 Subject: qemu_1.0.bb: lock down SHA Signed-off-by: Matthew McClintock --- meta-fsl-ppc/recipes-devtools/qemu/qemu_1.0.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-fsl-ppc/recipes-devtools/qemu/qemu_1.0.bb b/meta-fsl-ppc/recipes-devtools/qemu/qemu_1.0.bb index 7a6e5450..91a12dcb 100644 --- a/meta-fsl-ppc/recipes-devtools/qemu/qemu_1.0.bb +++ b/meta-fsl-ppc/recipes-devtools/qemu/qemu_1.0.bb @@ -9,7 +9,7 @@ PV = "1.0+fsl" DEPENDS += "dtc" SRC_URI = "git://git.freescale.com/ppc/sdk/qemu.git" -SRCREV = "${AUTOREV}" +SRCREV = "deccbc3b81951f826df805f10c0a0318a80af011" S = "${WORKDIR}/git" -- cgit v1.2.3-54-g00ecf From 87e0b56351ab5c07ac4749556f8a4fb3a5a9eef4 Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Fri, 26 Oct 2012 12:16:23 +0000 Subject: set preferred version of oprofile to 0.9.6 for e5500/e5500-64b targets the patches of e5500/e5500-64b support are only available for oprofile-0.9.6. Signed-off-by: Zhenhua Luo --- meta-fsl-ppc/conf/machine/e5500-64b.inc | 1 + meta-fsl-ppc/conf/machine/e5500.inc | 1 + 2 files changed, 2 insertions(+) diff --git a/meta-fsl-ppc/conf/machine/e5500-64b.inc b/meta-fsl-ppc/conf/machine/e5500-64b.inc index 650585f3..b3ed424c 100644 --- a/meta-fsl-ppc/conf/machine/e5500-64b.inc +++ b/meta-fsl-ppc/conf/machine/e5500-64b.inc @@ -10,6 +10,7 @@ PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" PREFERRED_VERSION_virtual/kernel ?= "3.0.34" PREFERRED_PROVIDER_linux-libc-headers ?= "linux-qoriq-sdk-headers" PREFERRED_VERSION_qemu = "1.0+fsl" +PREFERRED_VERSION_oprofile = "0.9.6" KERNEL_IMAGETYPE ?= "uImage" # disable the images below for now diff --git a/meta-fsl-ppc/conf/machine/e5500.inc b/meta-fsl-ppc/conf/machine/e5500.inc index 1a1bb20b..4e3e8dca 100644 --- a/meta-fsl-ppc/conf/machine/e5500.inc +++ b/meta-fsl-ppc/conf/machine/e5500.inc @@ -9,6 +9,7 @@ PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" PREFERRED_VERSION_virtual/kernel ?= "3.0.34" PREFERRED_PROVIDER_linux-libc-headers ?= "linux-qoriq-sdk-headers" PREFERRED_VERSION_qemu = "1.0+fsl" +PREFERRED_VERSION_oprofile = "0.9.6" KERNEL_IMAGETYPE ?= "uImage" # disable the images below for now -- cgit v1.2.3-54-g00ecf From 1218f8db3264c9c7019693684ec4ba4ca28b664f Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Wed, 31 Oct 2012 00:19:08 +0000 Subject: qemu_1.0.bb: lock down SHA for release Signed-off-by: Matthew McClintock --- meta-fsl-ppc/recipes-devtools/qemu/qemu_1.0.bb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/meta-fsl-ppc/recipes-devtools/qemu/qemu_1.0.bb b/meta-fsl-ppc/recipes-devtools/qemu/qemu_1.0.bb index 91a12dcb..ff4afde3 100644 --- a/meta-fsl-ppc/recipes-devtools/qemu/qemu_1.0.bb +++ b/meta-fsl-ppc/recipes-devtools/qemu/qemu_1.0.bb @@ -5,11 +5,12 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \ # This means v1.0 with FSL specific patches applied PV = "1.0+fsl" +PR = "r2" DEPENDS += "dtc" SRC_URI = "git://git.freescale.com/ppc/sdk/qemu.git" -SRCREV = "deccbc3b81951f826df805f10c0a0318a80af011" +SRCREV = "7feabd47a814214dc4bebfd97d0eaf30dc50a68f" S = "${WORKDIR}/git" -- cgit v1.2.3-54-g00ecf From 49d99cfd0126b58917af41851954a49ebcb77c5f Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Thu, 1 Nov 2012 22:11:12 +0000 Subject: rcw_git.bb: lock down SHA for release Signed-off-by: Matthew McClintock --- meta-fsl-ppc/recipes-tools/rcw/rcw_git.bb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meta-fsl-ppc/recipes-tools/rcw/rcw_git.bb b/meta-fsl-ppc/recipes-tools/rcw/rcw_git.bb index 7451a9e2..efccf4c3 100644 --- a/meta-fsl-ppc/recipes-tools/rcw/rcw_git.bb +++ b/meta-fsl-ppc/recipes-tools/rcw/rcw_git.bb @@ -1,7 +1,7 @@ DESCRIPTION = "Reset Control Words (RCW)" SECTION = "rcw" LICENSE = "BSD" -PR = "r5" +PR = "r6" LIC_FILES_CHKSUM = "file://rcw.py;beginline=8;endline=28;md5=9ba0b28922dd187b06b6c8ebcfdd208e" @@ -11,7 +11,7 @@ PACKAGE_ARCH = "${MACHINE_ARCH}" inherit deploy -SRCREV = "a84434258ac4a1f0c7cb6e9ea709dc8c3267f788" +SRCREV = "e9529eac512f7dc2ada3c6ff3ef1b934e5afae57" SRC_URI = "git://git.freescale.com/ppc/sdk/rcw.git" S = "${WORKDIR}/git" -- cgit v1.2.3-54-g00ecf From 2533a4e3a63c062408caf68df885fabaf3cfe20a Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Tue, 6 Nov 2012 09:51:36 +0000 Subject: u-boot_git.bb: lock down SHA for release Also update p5040 u-boot builds and add cst-native dep which is required by some machines Signed-off-by: Matthew McClintock --- meta-fsl-ppc/conf/machine/p5040ds-64b.conf | 2 +- meta-fsl-ppc/conf/machine/p5040ds.conf | 2 +- meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/meta-fsl-ppc/conf/machine/p5040ds-64b.conf b/meta-fsl-ppc/conf/machine/p5040ds-64b.conf index 9e6b7704..07ed3b2c 100644 --- a/meta-fsl-ppc/conf/machine/p5040ds-64b.conf +++ b/meta-fsl-ppc/conf/machine/p5040ds-64b.conf @@ -3,7 +3,7 @@ require e5500-64b.inc -UBOOT_MACHINES ?= "P5040DS P5040DS_NAND P5040DS_SECURE_BOOT" +UBOOT_MACHINES ?= "P5040DS P5040DS_NAND P5040DS_SECURE_BOOT P5040DS_SDCARD P5040DS_SPIFLASH" KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p5040ds.dts \ ${S}/arch/powerpc/boot/dts/p5040ds-usdpaa.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet64_smp_defconfig" diff --git a/meta-fsl-ppc/conf/machine/p5040ds.conf b/meta-fsl-ppc/conf/machine/p5040ds.conf index 7c982fd0..bda7facd 100644 --- a/meta-fsl-ppc/conf/machine/p5040ds.conf +++ b/meta-fsl-ppc/conf/machine/p5040ds.conf @@ -3,7 +3,7 @@ require e5500.inc -UBOOT_MACHINES ?= "P5040DS P5040DS_NAND P5040DS_SECURE_BOOT" +UBOOT_MACHINES ?= "P5040DS P5040DS_NAND P5040DS_SECURE_BOOT P5040DS_SDCARD P5040DS_SPIFLASH" KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p5040ds.dts \ ${S}/arch/powerpc/boot/dts/p5040ds-usdpaa.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet32_smp_defconfig" diff --git a/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb b/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb index 207a6ffc..9c4cf48e 100644 --- a/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb +++ b/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb @@ -5,13 +5,13 @@ PROVIDES = "virtual/bootloader" LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=1707d6db1d42237583f50183a5651ecb" -PR = "r27" +PR = "r28" INHIBIT_DEFAULT_DEPS = "1" DEPENDS = "boot-format-native virtual/${TARGET_PREFIX}gcc libgcc" inherit deploy -SRCREV = "6d1aef1c02ba9472215234696faa8ce8745a40a9" +SRCREV = "c6d9d502924ade8877f53eecdd5cf37e05d6d6b4" SRC_URI = "git://git.freescale.com/ppc/sdk/u-boot.git" SRCREV_e6500 = "59852d03867108217fe88e3bfc3e1e9cedfe63c5" -- cgit v1.2.3-54-g00ecf From ba6d8a1eb4922ef5e16c4ee8c8a04be5cb75b8d0 Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Tue, 6 Nov 2012 18:09:26 +0800 Subject: hv-cfg: lock down SHA for release Signed-off-by: Zhenhua Luo --- meta-fsl-ppc/recipes-tools/hv-cfg/hv-cfg_git.bb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meta-fsl-ppc/recipes-tools/hv-cfg/hv-cfg_git.bb b/meta-fsl-ppc/recipes-tools/hv-cfg/hv-cfg_git.bb index e137575a..31261388 100644 --- a/meta-fsl-ppc/recipes-tools/hv-cfg/hv-cfg_git.bb +++ b/meta-fsl-ppc/recipes-tools/hv-cfg/hv-cfg_git.bb @@ -1,7 +1,7 @@ DESCRIPTION = "Hypervisor Config" SECTION = "hv-cfg" LICENSE = "BSD" -PR = "r5" +PR = "r6" LIC_FILES_CHKSUM = " \ file://p2041rdb/LICENSE;md5=96dd72f26e9bb861de5c76c60e35e1bc \ @@ -18,7 +18,7 @@ PACKAGE_ARCH = "${MACHINE_ARCH}" inherit deploy -SRCREV = "102ab848d94f3c04f364ed273d0e00b21b0266f4" +SRCREV = "deb55b9564ef8fb9e1fda1112233f11ae2a12d4a" SRC_URI = "git://git.freescale.com/ppc/sdk/hv-cfg.git" S = "${WORKDIR}/git" -- cgit v1.2.3-54-g00ecf From e3ecf9887048895a27c57b68d34ca3cf609d3ea9 Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Tue, 6 Nov 2012 08:16:20 -0600 Subject: linux-qoriq-sdk: lock down SHA for release Signed-off-by: Matthew McClintock --- meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc index 6cd9cc41..8489ca2f 100644 --- a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc +++ b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc @@ -1,11 +1,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7" +PV = "3.0.48" +PR = "r9" - -PV = "3.0.34" -PR = "r8" - -SRCREV = "058c67be272af9ab95b88c941f31fb3eda05a4d3" +SRCREV = "dd5a5aac3e15b16a4bccbab29c736bda0e7d55e7" SRC_URI = "git://git.freescale.com/ppc/sdk/linux.git \ file://0001-compiler.h-Undef-before-redefining-__attribute_const.patch \ file://0001-powerpc-Fix-build-dependencies-for-c-files-requiring.patch \ -- cgit v1.2.3-54-g00ecf From 9d4d33b143ed87c0e192096c3f07e307b7a311e8 Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Wed, 7 Nov 2012 20:46:44 +0800 Subject: flib: add recipe to build external git tree Signed-off-by: Zhenhua Luo --- meta-fsl-ppc/recipes-tools/flib/flib_git.bb | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 meta-fsl-ppc/recipes-tools/flib/flib_git.bb diff --git a/meta-fsl-ppc/recipes-tools/flib/flib_git.bb b/meta-fsl-ppc/recipes-tools/flib/flib_git.bb new file mode 100644 index 00000000..78210dd4 --- /dev/null +++ b/meta-fsl-ppc/recipes-tools/flib/flib_git.bb @@ -0,0 +1,13 @@ +DESCRIPTION = "Foundation Library" +SECTION = "flib" +LICENSE = "BSD & GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=3f16fa8e677e45af3127c5c4bafc3c00" + +SRC_URI = "git://git.freescale.com/ppc/sdk/flib.git" +SRCREV = "110eef5dab66064580d6d8627421ea5a19decb80" + +S = "${WORKDIR}/git" + +do_install(){ + oe_runmake install DESTDIR=${D} +} -- cgit v1.2.3-54-g00ecf From 58842094acd47fdc06ab325884dab28fcd7abd3d Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Tue, 13 Nov 2012 12:37:27 -0600 Subject: update README Signed-off-by: Matthew McClintock --- meta-fsl-ppc/README | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/meta-fsl-ppc/README b/meta-fsl-ppc/README index 31ccba05..645afbb9 100644 --- a/meta-fsl-ppc/README +++ b/meta-fsl-ppc/README @@ -2,3 +2,35 @@ meta-fsl-ppc ========== This is the location for Freescale PowerPC maintained BSP's + +This layer depends on: +URI: git://git.openembedded.org/openembedded-core +branch: master +revision: HEAD + +It's testing to be working against YP 1.1 (edison) onwards after +checking out the appropriate branch + +Contributing +------------ + +To contribute to this layer you should the patches for review to the +mailing list. + +Mailing list: + + https://lists.yoctoproject.org/listinfo/meta-freescale + +Source code: + + git://git.yoctoproject.org/meta-fsl-ppc + http://git.yoctoproject.org/git/meta-fsl-ppc + +When sending patches, please use something like: + +git send-email --to meta-freescale@yoctoproject.org --subject-prefix='meta-fsl-ppc][PATCH' + +optionally include a branch if the patch applies to multiple branches, +otherwise master is assumed + +git send-email --to meta-freescale@yoctoproject.org --subject-prefix='meta-fsl-ppc][PATCH][denzil][danny][master' -- cgit v1.2.3-54-g00ecf From 5ede26e2101f70b41f2f5384e33a7603bade7cd7 Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Fri, 23 Nov 2012 18:10:37 +0800 Subject: libxml: update the version number to 2.9.0 to match the upgrade in poky upgrade the version to 2.9.0 to fix following version mismatch issue: ERROR: No recipes available for: /srv/home/pokybuild/yocto-autobuilder/yocto-slave/p1022ds/build/yocto/meta-fsl-ppc/recipes-append/libxml/libxml2_2.8.0.bbappend [YOCTO #3476] Signed-off-by: Zhenhua Luo --- meta-fsl-ppc/recipes-append/libxml/libxml2_2.8.0.bbappend | 3 --- meta-fsl-ppc/recipes-append/libxml/libxml2_2.9.0.bbappend | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) delete mode 100644 meta-fsl-ppc/recipes-append/libxml/libxml2_2.8.0.bbappend create mode 100644 meta-fsl-ppc/recipes-append/libxml/libxml2_2.9.0.bbappend diff --git a/meta-fsl-ppc/recipes-append/libxml/libxml2_2.8.0.bbappend b/meta-fsl-ppc/recipes-append/libxml/libxml2_2.8.0.bbappend deleted file mode 100644 index 13c1fd70..00000000 --- a/meta-fsl-ppc/recipes-append/libxml/libxml2_2.8.0.bbappend +++ /dev/null @@ -1,3 +0,0 @@ -EXTRA_OECONF_fsl += "--with-fexceptions" - -PR_fsl .= "+${DISTRO}.0" diff --git a/meta-fsl-ppc/recipes-append/libxml/libxml2_2.9.0.bbappend b/meta-fsl-ppc/recipes-append/libxml/libxml2_2.9.0.bbappend new file mode 100644 index 00000000..13c1fd70 --- /dev/null +++ b/meta-fsl-ppc/recipes-append/libxml/libxml2_2.9.0.bbappend @@ -0,0 +1,3 @@ +EXTRA_OECONF_fsl += "--with-fexceptions" + +PR_fsl .= "+${DISTRO}.0" -- cgit v1.2.3-54-g00ecf From 50265e58e9f8f1e87192042c2cda714050517d41 Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Mon, 26 Nov 2012 15:43:33 -0600 Subject: README: add message about git.freescale.com vs. git.yp.org Signed-off-by: Matthew McClintock --- meta-fsl-ppc/README | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/meta-fsl-ppc/README b/meta-fsl-ppc/README index 645afbb9..1c87788e 100644 --- a/meta-fsl-ppc/README +++ b/meta-fsl-ppc/README @@ -34,3 +34,12 @@ optionally include a branch if the patch applies to multiple branches, otherwise master is assumed git send-email --to meta-freescale@yoctoproject.org --subject-prefix='meta-fsl-ppc][PATCH][denzil][danny][master' + +git.yoctoproject.org vs. git.freescale.com: +------------------------------------------- + +git.yoctoproject.org hosts the official upstream work of Freescale's OE/YP repos, +for official SDK releases at times we need to do last minute fixes or include things +not supported upstream so we have a different repo on git.freescale.com for the +official release. git.freescale.com should be based off repos from git.yoctoproject.org + -- cgit v1.2.3-54-g00ecf From ba8d83e1efc6a6f51381c8bd61a7b1d516b72620 Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Mon, 26 Nov 2012 15:45:14 -0600 Subject: linux-qoriq-sdk: move patches to default search path Signed-off-by: Matthew McClintock --- ...Undef-before-redefining-__attribute_const.patch | 28 -------------- ...-build-dependencies-for-c-files-requiring.patch | 44 ---------------------- ...Undef-before-redefining-__attribute_const.patch | 28 ++++++++++++++ ...-build-dependencies-for-c-files-requiring.patch | 44 ++++++++++++++++++++++ 4 files changed, 72 insertions(+), 72 deletions(-) delete mode 100644 meta-fsl-ppc/recipes-kernel/linux/0001-compiler.h-Undef-before-redefining-__attribute_const.patch delete mode 100644 meta-fsl-ppc/recipes-kernel/linux/0001-powerpc-Fix-build-dependencies-for-c-files-requiring.patch create mode 100644 meta-fsl-ppc/recipes-kernel/linux/files/0001-compiler.h-Undef-before-redefining-__attribute_const.patch create mode 100644 meta-fsl-ppc/recipes-kernel/linux/files/0001-powerpc-Fix-build-dependencies-for-c-files-requiring.patch diff --git a/meta-fsl-ppc/recipes-kernel/linux/0001-compiler.h-Undef-before-redefining-__attribute_const.patch b/meta-fsl-ppc/recipes-kernel/linux/0001-compiler.h-Undef-before-redefining-__attribute_const.patch deleted file mode 100644 index 597fd3b4..00000000 --- a/meta-fsl-ppc/recipes-kernel/linux/0001-compiler.h-Undef-before-redefining-__attribute_const.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 6f92ab6de9d8daeb575949bbbcbc7bcdcebc60af Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Thu, 5 Jan 2012 11:42:35 -0800 -Subject: [PATCH] compiler.h: Undef before redefining __attribute_const__ - -This is required to avoid warnings like -util/include/linux/compiler.h:8:0: error: "__attribute_const__" redefined [-Werror] - -Signed-off-by: Khem Raj ---- - tools/perf/util/include/linux/compiler.h | 4 +++- - 1 files changed, 3 insertions(+), 1 deletions(-) - ---- a/tools/perf/util/include/linux/compiler.h -+++ b/tools/perf/util/include/linux/compiler.h -@@ -4,9 +4,11 @@ - #ifndef __always_inline - #define __always_inline inline - #endif -+#undef __user - #define __user -+#undef __attribute_const__ - #define __attribute_const__ -- -+#undef __used - #define __used __attribute__((__unused__)) - - #endif diff --git a/meta-fsl-ppc/recipes-kernel/linux/0001-powerpc-Fix-build-dependencies-for-c-files-requiring.patch b/meta-fsl-ppc/recipes-kernel/linux/0001-powerpc-Fix-build-dependencies-for-c-files-requiring.patch deleted file mode 100644 index d3464fb7..00000000 --- a/meta-fsl-ppc/recipes-kernel/linux/0001-powerpc-Fix-build-dependencies-for-c-files-requiring.patch +++ /dev/null @@ -1,44 +0,0 @@ -Upstream-Status: Pending - -From 2e7ffea0c0c09c6d9219d604e0351423f43844f4 Mon Sep 17 00:00:00 2001 -From: Matthew McClintock -Date: Thu, 6 Sep 2012 13:45:21 -0500 -Subject: powerpc: Fix build dependencies for c files requiring libfdt.h - -Several files in obj-plat depend on libfdt header file. Sometimes -when building one can see the following issue. This patch adds -libfdt as dependency to those object files - -| In file included from arch/powerpc/boot/treeboot-iss4xx.c:33:0: -| arch/powerpc/boot/libfdt.h:854:1: error: unterminated comment -| In file included from arch/powerpc/boot/treeboot-iss4xx.c:33:0: -| arch/powerpc/boot/libfdt.h:1:0: error: unterminated #ifndef -| BOOTCC arch/powerpc/boot/inffast.o -| make[1]: *** [arch/powerpc/boot/treeboot-iss4xx.o] Error 1 -| make[1]: *** Waiting for unfinished jobs.... -| BOOTCC arch/powerpc/boot/inflate.o -| make: *** [uImage] Error 2 -| ERROR: oe_runmake failed -| ERROR: Function failed: do_compile (see /srv/home/pokybuild/yocto-autobuilder/yocto-slave/p1022ds/build/build/tmp/work/p1022ds-poky-linux-gnuspe/linux-qoriq-sdk-3.0.34-r5/temp/log.do_compile.2167 for further information) -NOTE: recipe linux-qoriq-sdk-3.0.34-r5: task do_compile: Failed - -Signed-off-by: Matthew McClintock ---- - arch/powerpc/boot/Makefile | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile -index b7d8333..6a15c96 100644 ---- a/arch/powerpc/boot/Makefile -+++ b/arch/powerpc/boot/Makefile -@@ -107,6 +107,7 @@ src-boot := $(addprefix $(obj)/, $(src-boot)) - obj-boot := $(addsuffix .o, $(basename $(src-boot))) - obj-wlib := $(addsuffix .o, $(basename $(addprefix $(obj)/, $(src-wlib)))) - obj-plat := $(addsuffix .o, $(basename $(addprefix $(obj)/, $(src-plat)))) -+obj-plat: $(libfdt) - - quiet_cmd_copy_zlib = COPY $@ - cmd_copy_zlib = sed "s@__used@@;s@]*\).*@\"\1\"@" $< > $@ --- -1.7.9.7 - diff --git a/meta-fsl-ppc/recipes-kernel/linux/files/0001-compiler.h-Undef-before-redefining-__attribute_const.patch b/meta-fsl-ppc/recipes-kernel/linux/files/0001-compiler.h-Undef-before-redefining-__attribute_const.patch new file mode 100644 index 00000000..597fd3b4 --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/linux/files/0001-compiler.h-Undef-before-redefining-__attribute_const.patch @@ -0,0 +1,28 @@ +From 6f92ab6de9d8daeb575949bbbcbc7bcdcebc60af Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Thu, 5 Jan 2012 11:42:35 -0800 +Subject: [PATCH] compiler.h: Undef before redefining __attribute_const__ + +This is required to avoid warnings like +util/include/linux/compiler.h:8:0: error: "__attribute_const__" redefined [-Werror] + +Signed-off-by: Khem Raj +--- + tools/perf/util/include/linux/compiler.h | 4 +++- + 1 files changed, 3 insertions(+), 1 deletions(-) + +--- a/tools/perf/util/include/linux/compiler.h ++++ b/tools/perf/util/include/linux/compiler.h +@@ -4,9 +4,11 @@ + #ifndef __always_inline + #define __always_inline inline + #endif ++#undef __user + #define __user ++#undef __attribute_const__ + #define __attribute_const__ +- ++#undef __used + #define __used __attribute__((__unused__)) + + #endif diff --git a/meta-fsl-ppc/recipes-kernel/linux/files/0001-powerpc-Fix-build-dependencies-for-c-files-requiring.patch b/meta-fsl-ppc/recipes-kernel/linux/files/0001-powerpc-Fix-build-dependencies-for-c-files-requiring.patch new file mode 100644 index 00000000..d3464fb7 --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/linux/files/0001-powerpc-Fix-build-dependencies-for-c-files-requiring.patch @@ -0,0 +1,44 @@ +Upstream-Status: Pending + +From 2e7ffea0c0c09c6d9219d604e0351423f43844f4 Mon Sep 17 00:00:00 2001 +From: Matthew McClintock +Date: Thu, 6 Sep 2012 13:45:21 -0500 +Subject: powerpc: Fix build dependencies for c files requiring libfdt.h + +Several files in obj-plat depend on libfdt header file. Sometimes +when building one can see the following issue. This patch adds +libfdt as dependency to those object files + +| In file included from arch/powerpc/boot/treeboot-iss4xx.c:33:0: +| arch/powerpc/boot/libfdt.h:854:1: error: unterminated comment +| In file included from arch/powerpc/boot/treeboot-iss4xx.c:33:0: +| arch/powerpc/boot/libfdt.h:1:0: error: unterminated #ifndef +| BOOTCC arch/powerpc/boot/inffast.o +| make[1]: *** [arch/powerpc/boot/treeboot-iss4xx.o] Error 1 +| make[1]: *** Waiting for unfinished jobs.... +| BOOTCC arch/powerpc/boot/inflate.o +| make: *** [uImage] Error 2 +| ERROR: oe_runmake failed +| ERROR: Function failed: do_compile (see /srv/home/pokybuild/yocto-autobuilder/yocto-slave/p1022ds/build/build/tmp/work/p1022ds-poky-linux-gnuspe/linux-qoriq-sdk-3.0.34-r5/temp/log.do_compile.2167 for further information) +NOTE: recipe linux-qoriq-sdk-3.0.34-r5: task do_compile: Failed + +Signed-off-by: Matthew McClintock +--- + arch/powerpc/boot/Makefile | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile +index b7d8333..6a15c96 100644 +--- a/arch/powerpc/boot/Makefile ++++ b/arch/powerpc/boot/Makefile +@@ -107,6 +107,7 @@ src-boot := $(addprefix $(obj)/, $(src-boot)) + obj-boot := $(addsuffix .o, $(basename $(src-boot))) + obj-wlib := $(addsuffix .o, $(basename $(addprefix $(obj)/, $(src-wlib)))) + obj-plat := $(addsuffix .o, $(basename $(addprefix $(obj)/, $(src-plat)))) ++obj-plat: $(libfdt) + + quiet_cmd_copy_zlib = COPY $@ + cmd_copy_zlib = sed "s@__used@@;s@]*\).*@\"\1\"@" $< > $@ +-- +1.7.9.7 + -- cgit v1.2.3-54-g00ecf From 00cd4e5fdbec3e57543ae9d1ec91a0981c54e27d Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Tue, 4 Dec 2012 16:22:31 +0800 Subject: add Ubuntu 12.04.1 LTS in the supported Linux distros list Signed-off-by: Zhenhua Luo --- meta-fsl-ppc/conf/distro/fsl.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/meta-fsl-ppc/conf/distro/fsl.conf b/meta-fsl-ppc/conf/distro/fsl.conf index 8f45d1a3..e29cc545 100644 --- a/meta-fsl-ppc/conf/distro/fsl.conf +++ b/meta-fsl-ppc/conf/distro/fsl.conf @@ -57,6 +57,7 @@ SANITY_TESTED_DISTROS ?= " \ Ubuntu 10.04.4 LTS \n \ Ubuntu 11.10 \n \ Ubuntu 12.04 LTS \n \ + Ubuntu 12.04.1 LTS \n \ Fedora release 13 (Goddard) \n \ Fedora release 15 (Lovelock) \n \ Fedora release 16 (Verne) \n \ -- cgit v1.2.3-54-g00ecf From 5e7995957b5ff5c47121b4d720d1e1cc398b0bc0 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Tue, 4 Dec 2012 16:22:32 +0800 Subject: lxc: remove rdepend perl-module-warnings-register The module does not exist any more. Its content (warnings/register.pm) has been moved to the main perl package. Introduced by commit: (poky: 51cbb5ae76a22d465e2f6c5ef923ec2682624e3b) * File warnings/register.pm has been moved to package perl Fix: |error: Failed dependencies: |perl-module-warnings-register is needed by lxc-0.8.0+rc1-r6.ppce500mc |ERROR: Function failed: do_rootfs Signed-off-by: Ting Liu Signed-off-by: Chunrong Guo --- meta-fsl-ppc/recipes-tools/lxc/lxc_0.8.0-rc1.bb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/meta-fsl-ppc/recipes-tools/lxc/lxc_0.8.0-rc1.bb b/meta-fsl-ppc/recipes-tools/lxc/lxc_0.8.0-rc1.bb index 51009373..ee6b09eb 100644 --- a/meta-fsl-ppc/recipes-tools/lxc/lxc_0.8.0-rc1.bb +++ b/meta-fsl-ppc/recipes-tools/lxc/lxc_0.8.0-rc1.bb @@ -3,7 +3,7 @@ SECTION = "console/utils" LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=fbc093901857fcd118f065f900982c24" PRIORITY = "optional" -PR = "r6" +PR = "r7" DEPENDS = "libxml2 libcap virtual/kernel" RDEPENDS_${PN} = " \ rsync \ @@ -12,7 +12,6 @@ RDEPENDS_${PN} = " \ perl-module-strict \ perl-module-getopt-long \ perl-module-vars \ - perl-module-warnings-register \ perl-module-exporter \ perl-module-constant \ perl-module-overload \ -- cgit v1.2.3-54-g00ecf From 7837e67b9c0b74e3b146e40627be0b5881d1dbc7 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Tue, 4 Dec 2012 16:22:33 +0800 Subject: using nativesdk as a prefix, not a suffix Signed-off-by: Ting Liu --- meta-fsl-ppc/images/fsl-toolchain.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-fsl-ppc/images/fsl-toolchain.bb b/meta-fsl-ppc/images/fsl-toolchain.bb index 7f51cdc9..468db2b7 100644 --- a/meta-fsl-ppc/images/fsl-toolchain.bb +++ b/meta-fsl-ppc/images/fsl-toolchain.bb @@ -12,5 +12,5 @@ TOOLCHAIN_TARGET_TASK += " \ " TOOLCHAIN_HOST_TASK += " \ - dtc-nativesdk \ + nativesdk-dtc \ " -- cgit v1.2.3-54-g00ecf From 82733dd18984d63c9fa103d0361c58363a5e71ae Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Tue, 4 Dec 2012 16:22:34 +0800 Subject: add centos 6.3 in the supported Linux distros list Signed-off-by: Ting Liu --- meta-fsl-ppc/conf/distro/fsl.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/meta-fsl-ppc/conf/distro/fsl.conf b/meta-fsl-ppc/conf/distro/fsl.conf index e29cc545..a18c8cc5 100644 --- a/meta-fsl-ppc/conf/distro/fsl.conf +++ b/meta-fsl-ppc/conf/distro/fsl.conf @@ -67,6 +67,7 @@ SANITY_TESTED_DISTROS ?= " \ CentOS release 5.7 (Final) \n \ CentOS release 5.8 (Final) \n \ CentOS release 6.2 (Final) \n \ + CentOS release 6.3 (Final) \n \ Debian GNU/Linux 6.0.4 (squeeze) \n \ openSUSE 11.4 \n \ openSUSE 12.1 \n \ -- cgit v1.2.3-54-g00ecf From 8950687e578d78677b3ba53ff7b28d9189744589 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Tue, 4 Dec 2012 16:22:35 +0800 Subject: lxc: move patches to default search path Signed-off-by: Ting Liu --- .../recipes-tools/lxc/busybox_remove_dhcp.patch | 12 ------ .../lxc/files/busybox_remove_dhcp.patch | 12 ++++++ .../recipes-tools/lxc/files/libmounts.patch | 48 ++++++++++++++++++++++ .../recipes-tools/lxc/files/noldconfig.patch | 29 +++++++++++++ .../lxc/files/remove_vlan_hwaddr.patch | 11 +++++ meta-fsl-ppc/recipes-tools/lxc/libmounts.patch | 48 ---------------------- meta-fsl-ppc/recipes-tools/lxc/noldconfig.patch | 29 ------------- .../recipes-tools/lxc/remove_vlan_hwaddr.patch | 11 ----- 8 files changed, 100 insertions(+), 100 deletions(-) delete mode 100644 meta-fsl-ppc/recipes-tools/lxc/busybox_remove_dhcp.patch create mode 100644 meta-fsl-ppc/recipes-tools/lxc/files/busybox_remove_dhcp.patch create mode 100644 meta-fsl-ppc/recipes-tools/lxc/files/libmounts.patch create mode 100644 meta-fsl-ppc/recipes-tools/lxc/files/noldconfig.patch create mode 100644 meta-fsl-ppc/recipes-tools/lxc/files/remove_vlan_hwaddr.patch delete mode 100644 meta-fsl-ppc/recipes-tools/lxc/libmounts.patch delete mode 100644 meta-fsl-ppc/recipes-tools/lxc/noldconfig.patch delete mode 100644 meta-fsl-ppc/recipes-tools/lxc/remove_vlan_hwaddr.patch diff --git a/meta-fsl-ppc/recipes-tools/lxc/busybox_remove_dhcp.patch b/meta-fsl-ppc/recipes-tools/lxc/busybox_remove_dhcp.patch deleted file mode 100644 index d28fda8e..00000000 --- a/meta-fsl-ppc/recipes-tools/lxc/busybox_remove_dhcp.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/templates/lxc-busybox.in b/templates/lxc-busybox.in -index a94eaa3..29b87ce 100644 ---- a/templates/lxc-busybox.in -+++ b/templates/lxc-busybox.in -@@ -80,7 +80,6 @@ EOF - #!/bin/sh - /bin/syslogd - /bin/mount -a --/bin/udhcpc - EOF - - # executable diff --git a/meta-fsl-ppc/recipes-tools/lxc/files/busybox_remove_dhcp.patch b/meta-fsl-ppc/recipes-tools/lxc/files/busybox_remove_dhcp.patch new file mode 100644 index 00000000..d28fda8e --- /dev/null +++ b/meta-fsl-ppc/recipes-tools/lxc/files/busybox_remove_dhcp.patch @@ -0,0 +1,12 @@ +diff --git a/templates/lxc-busybox.in b/templates/lxc-busybox.in +index a94eaa3..29b87ce 100644 +--- a/templates/lxc-busybox.in ++++ b/templates/lxc-busybox.in +@@ -80,7 +80,6 @@ EOF + #!/bin/sh + /bin/syslogd + /bin/mount -a +-/bin/udhcpc + EOF + + # executable diff --git a/meta-fsl-ppc/recipes-tools/lxc/files/libmounts.patch b/meta-fsl-ppc/recipes-tools/lxc/files/libmounts.patch new file mode 100644 index 00000000..7e092f13 --- /dev/null +++ b/meta-fsl-ppc/recipes-tools/lxc/files/libmounts.patch @@ -0,0 +1,48 @@ +From dfef62f0334c65397254215f809a8f25364ea6ef Mon Sep 17 00:00:00 2001 +From: Stuart Yoder +Date: Wed, 12 Sep 2012 11:05:07 -0500 +Subject: [PATCH] create lib mounts only if the host directories exist + +Signed-off-by: Stuart Yoder +--- + templates/lxc-busybox.in | 24 +++++++++++------------- + 1 file changed, 11 insertions(+), 13 deletions(-) + +diff --git a/templates/lxc-busybox.in b/templates/lxc-busybox.in +index 720ceef..f6cb1ba 100644 +--- a/templates/lxc-busybox.in ++++ b/templates/lxc-busybox.in +@@ -235,19 +235,17 @@ lxc.pts = 1 + lxc.rootfs = $rootfs + EOF + +-if [ -d "$rootfs/lib" ]; then +-cat <> $path/config +-lxc.mount.entry=/lib $rootfs/lib none ro,bind 0 0 +-lxc.mount.entry=/usr/lib $rootfs/usr/lib none ro,bind 0 0 +-EOF +-fi +- +-if [ -d "/lib64" ] && [ -d "$rootfs/lib64" ]; then +-cat <> $path/config +-lxc.mount.entry=/lib64 $rootfs/lib64 none ro,bind 0 0 +-lxc.mount.entry=/usr/lib64 $rootfs/usr/lib64 none ro,bind 0 0 +-EOF +-fi ++ libdirs="\ ++ /lib \ ++ /usr/lib \ ++ /lib64 \ ++ /usr/lib64" ++ ++ for dir in $libdirs; do ++ if [ -d $dir ]; then ++ echo "lxc.mount.entry=$dir $rootfs$dir none ro,bind 0 0" >> $path/config ++ fi ++ done + } + + usage() +-- +1.7.9.7 + diff --git a/meta-fsl-ppc/recipes-tools/lxc/files/noldconfig.patch b/meta-fsl-ppc/recipes-tools/lxc/files/noldconfig.patch new file mode 100644 index 00000000..5edff468 --- /dev/null +++ b/meta-fsl-ppc/recipes-tools/lxc/files/noldconfig.patch @@ -0,0 +1,29 @@ +From a8aa8d131a7140d5625c24c9f4c28c605213552c Mon Sep 17 00:00:00 2001 +From: Andrey Mazo +Date: Fri, 18 May 2012 21:11:22 +0400 +Subject: [PATCH] Avoid ldconfig due to cross-compilation problems. + +Make required symlinks manually. +Otherwise, it cases problems on cbuild endianness != ctarget endianness +setups because /sbin/ldconfig expects elf header in the wrong endianness. +--- + src/lxc/Makefile.am | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/src/lxc/Makefile.am b/src/lxc/Makefile.am +index 1c26952..3b84c1a 100644 +--- a/src/lxc/Makefile.am ++++ b/src/lxc/Makefile.am +@@ -125,8 +125,8 @@ lxc_kill_SOURCES = lxc_kill.c + + install-exec-local: install-soPROGRAMS + mv $(DESTDIR)$(libdir)/liblxc.so $(DESTDIR)$(libdir)/liblxc.so.$(VERSION) +- /sbin/ldconfig -l $(DESTDIR)$(libdir)/liblxc.so.$(VERSION) + cd $(DESTDIR)$(libdir); \ ++ ln -sf liblxc.so.$(VERSION) liblxc.so.$(firstword $(subst ., ,$(VERSION))); \ + ln -sf liblxc.so.$(firstword $(subst ., ,$(VERSION))) liblxc.so + + uninstall-local: +-- +1.7.3.4 + diff --git a/meta-fsl-ppc/recipes-tools/lxc/files/remove_vlan_hwaddr.patch b/meta-fsl-ppc/recipes-tools/lxc/files/remove_vlan_hwaddr.patch new file mode 100644 index 00000000..d3883bd0 --- /dev/null +++ b/meta-fsl-ppc/recipes-tools/lxc/files/remove_vlan_hwaddr.patch @@ -0,0 +1,11 @@ +diff --git a/doc/examples/lxc-vlan.conf.in b/doc/examples/lxc-vlan.conf.in +index 4404439..231d618 100644 +--- a/doc/examples/lxc-vlan.conf.in ++++ b/doc/examples/lxc-vlan.conf.in +@@ -4,6 +4,5 @@ lxc.network.type = vlan + lxc.network.vlan.id = 1234 + lxc.network.flags = up + lxc.network.link = eth0 +-lxc.network.hwaddr = 4a:49:43:49:79:bd + lxc.network.ipv4 = 1.2.3.4/24 + lxc.network.ipv6 = 2003:db8:1:0:214:1234:fe0b:3596 diff --git a/meta-fsl-ppc/recipes-tools/lxc/libmounts.patch b/meta-fsl-ppc/recipes-tools/lxc/libmounts.patch deleted file mode 100644 index 7e092f13..00000000 --- a/meta-fsl-ppc/recipes-tools/lxc/libmounts.patch +++ /dev/null @@ -1,48 +0,0 @@ -From dfef62f0334c65397254215f809a8f25364ea6ef Mon Sep 17 00:00:00 2001 -From: Stuart Yoder -Date: Wed, 12 Sep 2012 11:05:07 -0500 -Subject: [PATCH] create lib mounts only if the host directories exist - -Signed-off-by: Stuart Yoder ---- - templates/lxc-busybox.in | 24 +++++++++++------------- - 1 file changed, 11 insertions(+), 13 deletions(-) - -diff --git a/templates/lxc-busybox.in b/templates/lxc-busybox.in -index 720ceef..f6cb1ba 100644 ---- a/templates/lxc-busybox.in -+++ b/templates/lxc-busybox.in -@@ -235,19 +235,17 @@ lxc.pts = 1 - lxc.rootfs = $rootfs - EOF - --if [ -d "$rootfs/lib" ]; then --cat <> $path/config --lxc.mount.entry=/lib $rootfs/lib none ro,bind 0 0 --lxc.mount.entry=/usr/lib $rootfs/usr/lib none ro,bind 0 0 --EOF --fi -- --if [ -d "/lib64" ] && [ -d "$rootfs/lib64" ]; then --cat <> $path/config --lxc.mount.entry=/lib64 $rootfs/lib64 none ro,bind 0 0 --lxc.mount.entry=/usr/lib64 $rootfs/usr/lib64 none ro,bind 0 0 --EOF --fi -+ libdirs="\ -+ /lib \ -+ /usr/lib \ -+ /lib64 \ -+ /usr/lib64" -+ -+ for dir in $libdirs; do -+ if [ -d $dir ]; then -+ echo "lxc.mount.entry=$dir $rootfs$dir none ro,bind 0 0" >> $path/config -+ fi -+ done - } - - usage() --- -1.7.9.7 - diff --git a/meta-fsl-ppc/recipes-tools/lxc/noldconfig.patch b/meta-fsl-ppc/recipes-tools/lxc/noldconfig.patch deleted file mode 100644 index 5edff468..00000000 --- a/meta-fsl-ppc/recipes-tools/lxc/noldconfig.patch +++ /dev/null @@ -1,29 +0,0 @@ -From a8aa8d131a7140d5625c24c9f4c28c605213552c Mon Sep 17 00:00:00 2001 -From: Andrey Mazo -Date: Fri, 18 May 2012 21:11:22 +0400 -Subject: [PATCH] Avoid ldconfig due to cross-compilation problems. - -Make required symlinks manually. -Otherwise, it cases problems on cbuild endianness != ctarget endianness -setups because /sbin/ldconfig expects elf header in the wrong endianness. ---- - src/lxc/Makefile.am | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/src/lxc/Makefile.am b/src/lxc/Makefile.am -index 1c26952..3b84c1a 100644 ---- a/src/lxc/Makefile.am -+++ b/src/lxc/Makefile.am -@@ -125,8 +125,8 @@ lxc_kill_SOURCES = lxc_kill.c - - install-exec-local: install-soPROGRAMS - mv $(DESTDIR)$(libdir)/liblxc.so $(DESTDIR)$(libdir)/liblxc.so.$(VERSION) -- /sbin/ldconfig -l $(DESTDIR)$(libdir)/liblxc.so.$(VERSION) - cd $(DESTDIR)$(libdir); \ -+ ln -sf liblxc.so.$(VERSION) liblxc.so.$(firstword $(subst ., ,$(VERSION))); \ - ln -sf liblxc.so.$(firstword $(subst ., ,$(VERSION))) liblxc.so - - uninstall-local: --- -1.7.3.4 - diff --git a/meta-fsl-ppc/recipes-tools/lxc/remove_vlan_hwaddr.patch b/meta-fsl-ppc/recipes-tools/lxc/remove_vlan_hwaddr.patch deleted file mode 100644 index d3883bd0..00000000 --- a/meta-fsl-ppc/recipes-tools/lxc/remove_vlan_hwaddr.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff --git a/doc/examples/lxc-vlan.conf.in b/doc/examples/lxc-vlan.conf.in -index 4404439..231d618 100644 ---- a/doc/examples/lxc-vlan.conf.in -+++ b/doc/examples/lxc-vlan.conf.in -@@ -4,6 +4,5 @@ lxc.network.type = vlan - lxc.network.vlan.id = 1234 - lxc.network.flags = up - lxc.network.link = eth0 --lxc.network.hwaddr = 4a:49:43:49:79:bd - lxc.network.ipv4 = 1.2.3.4/24 - lxc.network.ipv6 = 2003:db8:1:0:214:1234:fe0b:3596 -- cgit v1.2.3-54-g00ecf From 36c00d91e55649f33acf5ecbd74451e0faf5093a Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Fri, 4 Jan 2013 14:34:29 -0600 Subject: remove lxc since it's now in meta-virt Signed-off-by: Matthew McClintock --- .../lxc/files/busybox_remove_dhcp.patch | 12 ------ .../recipes-tools/lxc/files/fix_setns_deps.patch | 12 ------ .../recipes-tools/lxc/files/libmounts.patch | 48 ---------------------- .../recipes-tools/lxc/files/noldconfig.patch | 29 ------------- .../lxc/files/remove_vlan_hwaddr.patch | 11 ----- meta-fsl-ppc/recipes-tools/lxc/lxc_0.8.0-rc1.bb | 43 ------------------- 6 files changed, 155 deletions(-) delete mode 100644 meta-fsl-ppc/recipes-tools/lxc/files/busybox_remove_dhcp.patch delete mode 100644 meta-fsl-ppc/recipes-tools/lxc/files/fix_setns_deps.patch delete mode 100644 meta-fsl-ppc/recipes-tools/lxc/files/libmounts.patch delete mode 100644 meta-fsl-ppc/recipes-tools/lxc/files/noldconfig.patch delete mode 100644 meta-fsl-ppc/recipes-tools/lxc/files/remove_vlan_hwaddr.patch delete mode 100644 meta-fsl-ppc/recipes-tools/lxc/lxc_0.8.0-rc1.bb diff --git a/meta-fsl-ppc/recipes-tools/lxc/files/busybox_remove_dhcp.patch b/meta-fsl-ppc/recipes-tools/lxc/files/busybox_remove_dhcp.patch deleted file mode 100644 index d28fda8e..00000000 --- a/meta-fsl-ppc/recipes-tools/lxc/files/busybox_remove_dhcp.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/templates/lxc-busybox.in b/templates/lxc-busybox.in -index a94eaa3..29b87ce 100644 ---- a/templates/lxc-busybox.in -+++ b/templates/lxc-busybox.in -@@ -80,7 +80,6 @@ EOF - #!/bin/sh - /bin/syslogd - /bin/mount -a --/bin/udhcpc - EOF - - # executable diff --git a/meta-fsl-ppc/recipes-tools/lxc/files/fix_setns_deps.patch b/meta-fsl-ppc/recipes-tools/lxc/files/fix_setns_deps.patch deleted file mode 100644 index 7ec875ca..00000000 --- a/meta-fsl-ppc/recipes-tools/lxc/files/fix_setns_deps.patch +++ /dev/null @@ -1,12 +0,0 @@ -Index: lxc-0.8.0-rc1/src/lxc/Makefile.am -=================================================================== ---- lxc-0.8.0-rc1.orig/src/lxc/Makefile.am -+++ lxc-0.8.0-rc1/src/lxc/Makefile.am -@@ -133,6 +133,7 @@ uninstall-local: - $(RM) $(DESTDIR)$(libdir)/liblxc.so* - - namespace.c: setns.h -+attach.c: setns.h - - setns.h: - -$(CC) $(CPPFLAGS) -M -MT$@ $(LINUX_DIR)/arch/$(LINUX_SRCARCH)/include/asm/unistd.h >setns.P diff --git a/meta-fsl-ppc/recipes-tools/lxc/files/libmounts.patch b/meta-fsl-ppc/recipes-tools/lxc/files/libmounts.patch deleted file mode 100644 index 7e092f13..00000000 --- a/meta-fsl-ppc/recipes-tools/lxc/files/libmounts.patch +++ /dev/null @@ -1,48 +0,0 @@ -From dfef62f0334c65397254215f809a8f25364ea6ef Mon Sep 17 00:00:00 2001 -From: Stuart Yoder -Date: Wed, 12 Sep 2012 11:05:07 -0500 -Subject: [PATCH] create lib mounts only if the host directories exist - -Signed-off-by: Stuart Yoder ---- - templates/lxc-busybox.in | 24 +++++++++++------------- - 1 file changed, 11 insertions(+), 13 deletions(-) - -diff --git a/templates/lxc-busybox.in b/templates/lxc-busybox.in -index 720ceef..f6cb1ba 100644 ---- a/templates/lxc-busybox.in -+++ b/templates/lxc-busybox.in -@@ -235,19 +235,17 @@ lxc.pts = 1 - lxc.rootfs = $rootfs - EOF - --if [ -d "$rootfs/lib" ]; then --cat <> $path/config --lxc.mount.entry=/lib $rootfs/lib none ro,bind 0 0 --lxc.mount.entry=/usr/lib $rootfs/usr/lib none ro,bind 0 0 --EOF --fi -- --if [ -d "/lib64" ] && [ -d "$rootfs/lib64" ]; then --cat <> $path/config --lxc.mount.entry=/lib64 $rootfs/lib64 none ro,bind 0 0 --lxc.mount.entry=/usr/lib64 $rootfs/usr/lib64 none ro,bind 0 0 --EOF --fi -+ libdirs="\ -+ /lib \ -+ /usr/lib \ -+ /lib64 \ -+ /usr/lib64" -+ -+ for dir in $libdirs; do -+ if [ -d $dir ]; then -+ echo "lxc.mount.entry=$dir $rootfs$dir none ro,bind 0 0" >> $path/config -+ fi -+ done - } - - usage() --- -1.7.9.7 - diff --git a/meta-fsl-ppc/recipes-tools/lxc/files/noldconfig.patch b/meta-fsl-ppc/recipes-tools/lxc/files/noldconfig.patch deleted file mode 100644 index 5edff468..00000000 --- a/meta-fsl-ppc/recipes-tools/lxc/files/noldconfig.patch +++ /dev/null @@ -1,29 +0,0 @@ -From a8aa8d131a7140d5625c24c9f4c28c605213552c Mon Sep 17 00:00:00 2001 -From: Andrey Mazo -Date: Fri, 18 May 2012 21:11:22 +0400 -Subject: [PATCH] Avoid ldconfig due to cross-compilation problems. - -Make required symlinks manually. -Otherwise, it cases problems on cbuild endianness != ctarget endianness -setups because /sbin/ldconfig expects elf header in the wrong endianness. ---- - src/lxc/Makefile.am | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/src/lxc/Makefile.am b/src/lxc/Makefile.am -index 1c26952..3b84c1a 100644 ---- a/src/lxc/Makefile.am -+++ b/src/lxc/Makefile.am -@@ -125,8 +125,8 @@ lxc_kill_SOURCES = lxc_kill.c - - install-exec-local: install-soPROGRAMS - mv $(DESTDIR)$(libdir)/liblxc.so $(DESTDIR)$(libdir)/liblxc.so.$(VERSION) -- /sbin/ldconfig -l $(DESTDIR)$(libdir)/liblxc.so.$(VERSION) - cd $(DESTDIR)$(libdir); \ -+ ln -sf liblxc.so.$(VERSION) liblxc.so.$(firstword $(subst ., ,$(VERSION))); \ - ln -sf liblxc.so.$(firstword $(subst ., ,$(VERSION))) liblxc.so - - uninstall-local: --- -1.7.3.4 - diff --git a/meta-fsl-ppc/recipes-tools/lxc/files/remove_vlan_hwaddr.patch b/meta-fsl-ppc/recipes-tools/lxc/files/remove_vlan_hwaddr.patch deleted file mode 100644 index d3883bd0..00000000 --- a/meta-fsl-ppc/recipes-tools/lxc/files/remove_vlan_hwaddr.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff --git a/doc/examples/lxc-vlan.conf.in b/doc/examples/lxc-vlan.conf.in -index 4404439..231d618 100644 ---- a/doc/examples/lxc-vlan.conf.in -+++ b/doc/examples/lxc-vlan.conf.in -@@ -4,6 +4,5 @@ lxc.network.type = vlan - lxc.network.vlan.id = 1234 - lxc.network.flags = up - lxc.network.link = eth0 --lxc.network.hwaddr = 4a:49:43:49:79:bd - lxc.network.ipv4 = 1.2.3.4/24 - lxc.network.ipv6 = 2003:db8:1:0:214:1234:fe0b:3596 diff --git a/meta-fsl-ppc/recipes-tools/lxc/lxc_0.8.0-rc1.bb b/meta-fsl-ppc/recipes-tools/lxc/lxc_0.8.0-rc1.bb deleted file mode 100644 index ee6b09eb..00000000 --- a/meta-fsl-ppc/recipes-tools/lxc/lxc_0.8.0-rc1.bb +++ /dev/null @@ -1,43 +0,0 @@ -DESCRIPTION = "lxc aims to use these new functionnalities to provide an userspace container object" -SECTION = "console/utils" -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://COPYING;md5=fbc093901857fcd118f065f900982c24" -PRIORITY = "optional" -PR = "r7" -DEPENDS = "libxml2 libcap virtual/kernel" -RDEPENDS_${PN} = " \ - rsync \ - gzip \ - libcap-bin \ - perl-module-strict \ - perl-module-getopt-long \ - perl-module-vars \ - perl-module-exporter \ - perl-module-constant \ - perl-module-overload \ - perl-module-exporter-heavy \ -" - -SRC_URI = "http://lxc.sourceforge.net/download/lxc/${PN}-${PV}.tar.gz \ - file://noldconfig.patch \ - file://libmounts.patch \ - file://busybox_remove_dhcp.patch \ - file://remove_vlan_hwaddr.patch \ - file://fix_setns_deps.patch \ - " - -SRC_URI[md5sum] ="06ceecf4dbe1be988fc903ad8dd34d29" -SRC_URI[sha256sum] = "32bf83902c07387646c55de440d6d12cf61bd54c97417109c2d1ac47d17cb911" - -S = "${WORKDIR}/${PN}-${PV}" - -EXTRA_OECONF = "--disable-doc --disable-rpath --with-linuxdir=${STAGING_KERNEL_DIR}" - -inherit autotools - -FILES_${PN}-dbg += "${libexecdir}/lxc/.debug" - -# create empty dir needed by lxc -do_install_append() { - install -d ${D}${localstatedir}/lib/lxc -} -- cgit v1.2.3-54-g00ecf From 7307aa832fc5b93a47baf41ce5b8fd7598c2dab4 Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Thu, 17 Jan 2013 12:46:12 -0600 Subject: oprofile: remove from meta-fsl-ppc and use oe-core Signed-off-by: Matthew McClintock --- meta-fsl-ppc/conf/machine/e500mc.inc | 1 - meta-fsl-ppc/conf/machine/e5500-64b.inc | 1 - meta-fsl-ppc/conf/machine/e5500.inc | 1 - .../recipes-kernel/oprofile/oprofile_0.9.6.bb | 35 ---------------------- 4 files changed, 38 deletions(-) delete mode 100644 meta-fsl-ppc/recipes-kernel/oprofile/oprofile_0.9.6.bb diff --git a/meta-fsl-ppc/conf/machine/e500mc.inc b/meta-fsl-ppc/conf/machine/e500mc.inc index 9aa0b3e1..505d8051 100644 --- a/meta-fsl-ppc/conf/machine/e500mc.inc +++ b/meta-fsl-ppc/conf/machine/e500mc.inc @@ -9,7 +9,6 @@ PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" PREFERRED_VERSION_virtual/kernel ?= "3.0.34" PREFERRED_PROVIDER_linux-libc-headers ?= "linux-qoriq-sdk-headers" PREFERRED_VERSION_qemu = "1.0+fsl" -PREFERRED_VERSION_oprofile = "0.9.6" KERNEL_IMAGETYPE ?= "uImage" # disable the images below for now diff --git a/meta-fsl-ppc/conf/machine/e5500-64b.inc b/meta-fsl-ppc/conf/machine/e5500-64b.inc index b3ed424c..650585f3 100644 --- a/meta-fsl-ppc/conf/machine/e5500-64b.inc +++ b/meta-fsl-ppc/conf/machine/e5500-64b.inc @@ -10,7 +10,6 @@ PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" PREFERRED_VERSION_virtual/kernel ?= "3.0.34" PREFERRED_PROVIDER_linux-libc-headers ?= "linux-qoriq-sdk-headers" PREFERRED_VERSION_qemu = "1.0+fsl" -PREFERRED_VERSION_oprofile = "0.9.6" KERNEL_IMAGETYPE ?= "uImage" # disable the images below for now diff --git a/meta-fsl-ppc/conf/machine/e5500.inc b/meta-fsl-ppc/conf/machine/e5500.inc index 4e3e8dca..1a1bb20b 100644 --- a/meta-fsl-ppc/conf/machine/e5500.inc +++ b/meta-fsl-ppc/conf/machine/e5500.inc @@ -9,7 +9,6 @@ PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" PREFERRED_VERSION_virtual/kernel ?= "3.0.34" PREFERRED_PROVIDER_linux-libc-headers ?= "linux-qoriq-sdk-headers" PREFERRED_VERSION_qemu = "1.0+fsl" -PREFERRED_VERSION_oprofile = "0.9.6" KERNEL_IMAGETYPE ?= "uImage" # disable the images below for now diff --git a/meta-fsl-ppc/recipes-kernel/oprofile/oprofile_0.9.6.bb b/meta-fsl-ppc/recipes-kernel/oprofile/oprofile_0.9.6.bb deleted file mode 100644 index 6664c899..00000000 --- a/meta-fsl-ppc/recipes-kernel/oprofile/oprofile_0.9.6.bb +++ /dev/null @@ -1,35 +0,0 @@ -SUMMARY = "System-Wide Profiler" -DESCRIPTION = "OProfile is a system-wide profiler for Linux systems, capable \ -of profiling all running code at low overhead." -HOMEPAGE = "http://oprofile.sourceforge.net/news/" -BUGTRACKER = "http://sourceforge.net/tracker/?group_id=16191&atid=116191" - -LICENSE = "LGPLv2.1+ & GPLv2" -LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ - file://libopagent/opagent.h;beginline=5;endline=26;md5=4f16f72c7a493d8a4704aa18d03d15c6 \ - file://daemon/liblegacy/p_module.h;beginline=2;endline=20;md5=fc23a43455edf185307274a99730b6e4" - -SECTION = "devel" - -DEPENDS = "popt binutils" -RDEPENDS_${PN} = "binutils-symlinks" -RRECOMMENDS_${PN} = "kernel-vmlinux" - -FILES_${PN} = "${bindir} ${libdir}/${BPN}/lib*.so.* ${datadir}/${BPN}" -FILES_${PN}-dev += "${libdir}/${BPN}/lib*.so ${libdir}/${BPN}/lib*.la" -FILES_${PN}-staticdev += "${libdir}/${BPN}/lib*.a" - -SRC_URI = "${SOURCEFORGE_MIRROR}/oprofile/oprofile-${PV}.tar.gz \ - file://opstart.patch \ - file://oprofile-no-query-modules.patch \ - file://oprofile-0.9.6-e500mc-support.patch \ - file://oprofile-0.9.6-e500mc-support-2.patch \ - file://oprofile-0.9.6-add-e500mc-support-in-op_events.patch" - -SRC_URI[md5sum] = "4e407093ac06200185d5a5e6437d7242" -SRC_URI[sha256sum] = "3f0dd40a7749fc650d25d79d42ebbff8f3b6db310c36e7c3839696cc09077880" -S = "${WORKDIR}/oprofile-${PV}" - -inherit autotools - -EXTRA_OECONF = "--with-kernel-support --without-x" -- cgit v1.2.3-54-g00ecf From 87c0afef268269c47c23939c9ff887a7aff1cfce Mon Sep 17 00:00:00 2001 From: Noor Ahsan Date: Fri, 21 Dec 2012 17:24:55 +0500 Subject: linux-qoriq: Add a patch to fix perf compilation issue. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Perf gived compilation error CC builtin-sched.o builtin-sched.c: In function ‘get_cpu_usage_nsec_parent’: builtin-sched.c:399:16: error: storage size of ‘ru’ isn’t known * Added a patch from linux kernel git repo commit id 7b78f13603c6fcb64e020a0bbe31a651ea2b657b which include resource.h file in builtin-sched.c. * Bump PR. * Verified it on P4080DS machine. Signed-off-by: Noor Ahsan --- .../linux/files/fix_getrusage_for_perf.patch | 33 ++++++++++++++++++++++ .../recipes-kernel/linux/linux-qoriq-sdk.bb | 6 ++++ 2 files changed, 39 insertions(+) create mode 100644 meta-fsl-ppc/recipes-kernel/linux/files/fix_getrusage_for_perf.patch diff --git a/meta-fsl-ppc/recipes-kernel/linux/files/fix_getrusage_for_perf.patch b/meta-fsl-ppc/recipes-kernel/linux/files/fix_getrusage_for_perf.patch new file mode 100644 index 00000000..0029fdc9 --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/linux/files/fix_getrusage_for_perf.patch @@ -0,0 +1,33 @@ +commit 7b78f13603c6fcb64e020a0bbe31a651ea2b657b +Author: Markus Trippelsdorf +Date: Wed Apr 4 10:45:27 2012 +0200 + + perf tools: Fix getrusage() related build failure on glibc trunk + + On a system running glibc trunk perf doesn't build: + + CC builtin-sched.o + builtin-sched.c: In function ‘get_cpu_usage_nsec_parent’: builtin-sched.c:399:16: error: storage size of ‘ru’ isn’t known builtin-sched.c:403:2: error: implicit declaration of function ‘getrusage’ [-Werror=implicit-function-declaration] + [...] + + Fix it by including sys/resource.h. + + Signed-off-by: Markus Trippelsdorf + Cc: Peter Zijlstra + Link: http://lkml.kernel.org/r/20120404084527.GA294@x4 + Signed-off-by: Ingo Molnar + +Upstream-Status: Backport [3.4] + +diff --git a/tools/perf/builtin-sched.c b/tools/perf/builtin-sched.c +index fb8b5f8..1cad3af 100644 +--- a/tools/perf/builtin-sched.c ++++ b/tools/perf/builtin-sched.c +@@ -17,6 +17,7 @@ + #include "util/debug.h" + + #include ++#include + + #include + #include diff --git a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.bb b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.bb index 18e6e16e..1971f155 100644 --- a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.bb +++ b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.bb @@ -5,8 +5,14 @@ DESCRIPTION = "Linux kernel for Freescale platforms" SECTION = "kernel" LICENSE = "GPLv2" + require recipes-kernel/linux/linux-qoriq-sdk.inc +PR = "r9" + +SRC_URI += "file://fix_getrusage_for_perf.patch \ + " + do_configure_prepend() { # copy desired defconfig so we pick it up for the real kernel_do_configure cp ${KERNEL_DEFCONFIG} ${B}/.config -- cgit v1.2.3-54-g00ecf From 8520be51578dce76d8c9696beb99c522ff2dc0c3 Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Mon, 26 Nov 2012 15:45:54 -0600 Subject: libxml2_2.9.0.bbappend: remove a bbappends that's no longer required Signed-off-by: Matthew McClintock --- meta-fsl-ppc/recipes-append/libxml/libxml2_2.9.0.bbappend | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 meta-fsl-ppc/recipes-append/libxml/libxml2_2.9.0.bbappend diff --git a/meta-fsl-ppc/recipes-append/libxml/libxml2_2.9.0.bbappend b/meta-fsl-ppc/recipes-append/libxml/libxml2_2.9.0.bbappend deleted file mode 100644 index 13c1fd70..00000000 --- a/meta-fsl-ppc/recipes-append/libxml/libxml2_2.9.0.bbappend +++ /dev/null @@ -1,3 +0,0 @@ -EXTRA_OECONF_fsl += "--with-fexceptions" - -PR_fsl .= "+${DISTRO}.0" -- cgit v1.2.3-54-g00ecf From 14e0c3c4966c3e55851041f018696b2fc81845cb Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Wed, 24 Oct 2012 10:58:44 +0000 Subject: hypervisor_git.bb: remove unneeded create_link task Signed-off-by: Matthew McClintock --- meta-fsl-ppc/recipes-tools/embedded-hv/hypervisor_git.bb | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/meta-fsl-ppc/recipes-tools/embedded-hv/hypervisor_git.bb b/meta-fsl-ppc/recipes-tools/embedded-hv/hypervisor_git.bb index d3e5b822..25942ee0 100644 --- a/meta-fsl-ppc/recipes-tools/embedded-hv/hypervisor_git.bb +++ b/meta-fsl-ppc/recipes-tools/embedded-hv/hypervisor_git.bb @@ -3,7 +3,7 @@ SECTION = "embedded-hv" LICENSE = "BSD" LIC_FILES_CHKSUM = "file://README;endline=22;md5=0655bbc3b7d7166c30c87208b4e23cf0" -PR = "r2" +PR = "r3" DEPENDS = "u-boot-mkimage-native" @@ -31,14 +31,6 @@ EXTRA_OEMAKE = 'CROSS_COMPILE=${TARGET_PREFIX} CC="${TARGET_PREFIX}gcc ${TOOLCHA DEFCONFIG = "defconfig" DEFCONFIG_powerpc64 = "64bit_defconfig" -do_create_link () { - cd ${S}/.. - if [ ! -e hv ]; then - ln -s ${S} hv - fi -} -addtask create_link before do_compile after do_configure - inherit cml1 do_configure () { oe_runmake ${DEFCONFIG} -- cgit v1.2.3-54-g00ecf From 9d5facaa5677e2bc683332a77ac8549561c6504f Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Thu, 1 Nov 2012 14:31:46 +0800 Subject: correct the dts name for t4240qds t4240.dts => t4240qds.dts Signed-off-by: Zhenhua Luo --- meta-fsl-ppc/conf/machine/t4240qds.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-fsl-ppc/conf/machine/t4240qds.conf b/meta-fsl-ppc/conf/machine/t4240qds.conf index 3ad7ae20..934b5254 100644 --- a/meta-fsl-ppc/conf/machine/t4240qds.conf +++ b/meta-fsl-ppc/conf/machine/t4240qds.conf @@ -4,7 +4,7 @@ require e6500.inc UBOOT_MACHINES ?= "T4240QDS" -KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/t4240.dts" +KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/t4240qds.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet64_smp_defconfig" JFFS2_ERASEBLOCK = "0x10000" -- cgit v1.2.3-54-g00ecf From d14eb9ced00ffc143337a3553b6708c627d623da Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Fri, 2 Nov 2012 00:50:32 +0000 Subject: boot-format_git.bb: update to latest Signed-off-by: Matthew McClintock --- meta-fsl-ppc/recipes-tools/boot-format/boot-format_git.bb | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/meta-fsl-ppc/recipes-tools/boot-format/boot-format_git.bb b/meta-fsl-ppc/recipes-tools/boot-format/boot-format_git.bb index 969136e3..0abd286b 100644 --- a/meta-fsl-ppc/recipes-tools/boot-format/boot-format_git.bb +++ b/meta-fsl-ppc/recipes-tools/boot-format/boot-format_git.bb @@ -1,11 +1,10 @@ DESCRIPTION = "Boot format utility for booting from eSDHC/eSPI" LICENSE = "GPLv2" -PR = "r5" +PR = "r6" LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" -SRC_URI = "git://git.freescale.com/ppc/sdk/boot-format.git\ - " -SRCREV = "53cf657a7d034b8d71d53d5c241d0870836d8a72" +SRC_URI = "git://git.freescale.com/ppc/sdk/boot-format.git" +SRCREV = "7a837a487eb42f30cf3ada07ca44251ee11a2940" S = "${WORKDIR}/git" EXTRA_OEMAKE = 'CC="${CC}"' -- cgit v1.2.3-54-g00ecf From bd42e3d771db7e9ce866e4cc4b8c584577bf0e66 Mon Sep 17 00:00:00 2001 From: Yashpal Dutta Date: Mon, 26 Nov 2012 15:54:34 +0800 Subject: cryptodev kernel module recipe This is a /dev/crypto device driver, equivalent to those in OpenBSD or FreeBSD. The main idea is to access of existing ciphers in kernel space from userspace, thus enabling re-use of a hardware implementation of a cipher. Signed-off-by: Yashpal Dutta Signed-off-by: Zhenhua Luo --- .../recipes-kernel/cryptodev/cryptodev_1.5.bb | 17 ++++++++++++++ .../cryptodev/files/makefile_fixup.patch | 26 ++++++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev_1.5.bb create mode 100644 meta-fsl-ppc/recipes-kernel/cryptodev/files/makefile_fixup.patch diff --git a/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev_1.5.bb b/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev_1.5.bb new file mode 100644 index 00000000..0696e2a7 --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev_1.5.bb @@ -0,0 +1,17 @@ +SECTION = "devel" +SUMMARY = "Linux Cryptodev KERNEL MODULE" +DESCRIPTION = "The Cryptodev package contains the kernel /dev/crypto module" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" +RCONFLICTS_${PN} = "ocf-linux" + +inherit module + +SRCREV = "1c24a0aa996630518d47826a2e3fea129ea094c7" + +SRC_URI = "git://repo.or.cz/cryptodev-linux.git;protocol=git \ + file://makefile_fixup.patch" + +EXTRA_OEMAKE='KERNEL_DIR="${STAGING_KERNEL_DIR}" PREFIX="${D}"' + +S = "${WORKDIR}/git" diff --git a/meta-fsl-ppc/recipes-kernel/cryptodev/files/makefile_fixup.patch b/meta-fsl-ppc/recipes-kernel/cryptodev/files/makefile_fixup.patch new file mode 100644 index 00000000..323aacdf --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/cryptodev/files/makefile_fixup.patch @@ -0,0 +1,26 @@ +diff --git a/Makefile b/Makefile +index 2be8825..b36d68c 100644 +--- a/Makefile ++++ b/Makefile +@@ -1,6 +1,7 @@ + KBUILD_CFLAGS += -I$(src) + KERNEL_DIR = /lib/modules/$(shell uname -r)/build + VERSION = 1.5 ++PREFIX = + + cryptodev-objs = ioctl.o main.o cryptlib.o authenc.o zc.o util.o + +@@ -12,10 +13,10 @@ build: version.h + version.h: Makefile + @echo "#define VERSION \"$(VERSION)\"" > version.h + +-install: ++modules_install: + make -C $(KERNEL_DIR) SUBDIRS=`pwd` modules_install +- @echo "Installing cryptodev.h in /usr/include/crypto ..." +- @install -D crypto/cryptodev.h /usr/include/crypto/cryptodev.h ++ @echo "Installing cryptodev.h in $(PREFIX)/usr/include/crypto ..." ++ @install -D crypto/cryptodev.h $(PREFIX)/usr/include/crypto/cryptodev.h + + clean: + make -C $(KERNEL_DIR) SUBDIRS=`pwd` clean -- cgit v1.2.3-54-g00ecf From d23c3be660e6f246a5bd7a87b1579119fdb1b0e1 Mon Sep 17 00:00:00 2001 From: Yashpal Dutta Date: Thu, 29 Nov 2012 20:09:03 +0000 Subject: cryptodev: skip arch QA since kernel might not match for 64-bit kernels on 32-bit rfs Signed-off-by: Yashpal Dutta --- meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev_1.5.bb | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev_1.5.bb b/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev_1.5.bb index 0696e2a7..636bb544 100644 --- a/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev_1.5.bb +++ b/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev_1.5.bb @@ -15,3 +15,21 @@ SRC_URI = "git://repo.or.cz/cryptodev-linux.git;protocol=git \ EXTRA_OEMAKE='KERNEL_DIR="${STAGING_KERNEL_DIR}" PREFIX="${D}"' S = "${WORKDIR}/git" +python () { + ma = d.getVar("DISTRO_FEATURES", True) + arch = d.getVar("OVERRIDES", True) + + # the : after the arch is to skip the message on 64b + if not "multiarch" in ma and ("e5500:" in arch or "e6500:" in arch): + raise bb.parse.SkipPackage("Building the kernel for this arch requires multiarch to be in DISTRO_FEATURES") + + promote_kernel = d.getVar('BUILD_64BIT_KERNEL') + + if promote_kernel == "1": + d.setVar('KERNEL_CC_append', ' -m64') + d.setVar('KERNEL_LD_append', ' -melf64ppc') + + error_qa = d.getVar('ERROR_QA', True) + if 'arch' in error_qa: + d.setVar('ERROR_QA', error_qa.replace(' arch', '')) +} -- cgit v1.2.3-54-g00ecf From 70dee24722d43f262d5574270a5704e7d17dacfa Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Fri, 30 Nov 2012 13:42:57 +0000 Subject: fsl-toolchain: install static library Signed-off-by: Ting Liu --- meta-fsl-ppc/images/fsl-toolchain.bb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/meta-fsl-ppc/images/fsl-toolchain.bb b/meta-fsl-ppc/images/fsl-toolchain.bb index 468db2b7..696681c1 100644 --- a/meta-fsl-ppc/images/fsl-toolchain.bb +++ b/meta-fsl-ppc/images/fsl-toolchain.bb @@ -1,4 +1,4 @@ -PR = "r1" +PR = "r2" require fsl-toolchain-bare.bb @@ -9,6 +9,9 @@ TOOLCHAIN_TARGET_TASK += " \ dtc \ libgomp \ libgomp-dev \ + libgomp-staticdev \ + libstdc++-staticdev \ + ${TCLIBC}-staticdev \ " TOOLCHAIN_HOST_TASK += " \ -- cgit v1.2.3-54-g00ecf From 03c2840e22077a7934ef53e112af37dd217cd907 Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Thu, 1 Nov 2012 14:33:23 +0800 Subject: add usdpaa dts in the build list for b4860qds Signed-off-by: Zhenhua Luo --- meta-fsl-ppc/conf/machine/b4860qds-64b.conf | 3 ++- meta-fsl-ppc/conf/machine/b4860qds.conf | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/meta-fsl-ppc/conf/machine/b4860qds-64b.conf b/meta-fsl-ppc/conf/machine/b4860qds-64b.conf index 5243c24b..5751cd13 100644 --- a/meta-fsl-ppc/conf/machine/b4860qds-64b.conf +++ b/meta-fsl-ppc/conf/machine/b4860qds-64b.conf @@ -5,7 +5,8 @@ require e6500-64b.inc # TODO: fix 32bit build of u-boot UBOOT_MACHINES ?= "B4860QDS" -KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/b4860qds.dts" +KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/b4860qds.dts \ + ${S}/arch/powerpc/boot/dts/b4860qds-usdpaa.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet64_smp_defconfig" JFFS2_ERASEBLOCK = "0x10000" diff --git a/meta-fsl-ppc/conf/machine/b4860qds.conf b/meta-fsl-ppc/conf/machine/b4860qds.conf index 6ba1e78f..7787cc35 100644 --- a/meta-fsl-ppc/conf/machine/b4860qds.conf +++ b/meta-fsl-ppc/conf/machine/b4860qds.conf @@ -4,7 +4,8 @@ require e6500.inc UBOOT_MACHINES ?= "B4860QDS" -KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/b4860qds.dts" +KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/b4860qds.dts \ + ${S}/arch/powerpc/boot/dts/b4860qds-usdpaa.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet64_smp_defconfig" JFFS2_ERASEBLOCK = "0x10000" -- cgit v1.2.3-54-g00ecf From ae52b69325b9a4a206a74055560d2e4b00332490 Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Mon, 12 Nov 2012 10:37:16 +0000 Subject: e6500: replace corenet64_smp_defconfig with temp e6500rev1_defconfig for now Signed-off-by: Matthew McClintock --- meta-fsl-ppc/conf/machine/b4860qds-64b.conf | 2 +- meta-fsl-ppc/conf/machine/b4860qds.conf | 2 +- meta-fsl-ppc/conf/machine/t4240qds-64b.conf | 2 +- meta-fsl-ppc/conf/machine/t4240qds.conf | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/meta-fsl-ppc/conf/machine/b4860qds-64b.conf b/meta-fsl-ppc/conf/machine/b4860qds-64b.conf index 5751cd13..0bc1941b 100644 --- a/meta-fsl-ppc/conf/machine/b4860qds-64b.conf +++ b/meta-fsl-ppc/conf/machine/b4860qds-64b.conf @@ -7,7 +7,7 @@ require e6500-64b.inc UBOOT_MACHINES ?= "B4860QDS" KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/b4860qds.dts \ ${S}/arch/powerpc/boot/dts/b4860qds-usdpaa.dts" -KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet64_smp_defconfig" +KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/85xx/e6500rev1_defconfig" JFFS2_ERASEBLOCK = "0x10000" diff --git a/meta-fsl-ppc/conf/machine/b4860qds.conf b/meta-fsl-ppc/conf/machine/b4860qds.conf index 7787cc35..0da09100 100644 --- a/meta-fsl-ppc/conf/machine/b4860qds.conf +++ b/meta-fsl-ppc/conf/machine/b4860qds.conf @@ -6,7 +6,7 @@ require e6500.inc UBOOT_MACHINES ?= "B4860QDS" KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/b4860qds.dts \ ${S}/arch/powerpc/boot/dts/b4860qds-usdpaa.dts" -KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet64_smp_defconfig" +KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/85xx/e6500rev1_defconfig" JFFS2_ERASEBLOCK = "0x10000" diff --git a/meta-fsl-ppc/conf/machine/t4240qds-64b.conf b/meta-fsl-ppc/conf/machine/t4240qds-64b.conf index 48c58552..c3fa9dcc 100644 --- a/meta-fsl-ppc/conf/machine/t4240qds-64b.conf +++ b/meta-fsl-ppc/conf/machine/t4240qds-64b.conf @@ -6,7 +6,7 @@ require e6500-64b.inc # TODO: fix 32bit build of u-boot UBOOT_MACHINES ?= "T4240QDS" KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/t4240qds.dts" -KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet64_smp_defconfig" +KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/85xx/e6500rev1_defconfig" JFFS2_ERASEBLOCK = "0x10000" diff --git a/meta-fsl-ppc/conf/machine/t4240qds.conf b/meta-fsl-ppc/conf/machine/t4240qds.conf index 934b5254..28863ff7 100644 --- a/meta-fsl-ppc/conf/machine/t4240qds.conf +++ b/meta-fsl-ppc/conf/machine/t4240qds.conf @@ -5,7 +5,7 @@ require e6500.inc UBOOT_MACHINES ?= "T4240QDS" KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/t4240qds.dts" -KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet64_smp_defconfig" +KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/85xx/e6500rev1_defconfig" JFFS2_ERASEBLOCK = "0x10000" -- cgit v1.2.3-54-g00ecf From 60994ab1167068edd2a54cb075c525070094d070 Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Tue, 20 Nov 2012 12:31:12 +0000 Subject: t4240qds: add usdpaa dts in the build list Signed-off-by: Zhenhua Luo --- meta-fsl-ppc/conf/machine/t4240qds-64b.conf | 3 ++- meta-fsl-ppc/conf/machine/t4240qds.conf | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/meta-fsl-ppc/conf/machine/t4240qds-64b.conf b/meta-fsl-ppc/conf/machine/t4240qds-64b.conf index c3fa9dcc..7063f9e2 100644 --- a/meta-fsl-ppc/conf/machine/t4240qds-64b.conf +++ b/meta-fsl-ppc/conf/machine/t4240qds-64b.conf @@ -5,7 +5,8 @@ require e6500-64b.inc # TODO: fix 32bit build of u-boot UBOOT_MACHINES ?= "T4240QDS" -KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/t4240qds.dts" +KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/t4240qds.dts \ + ${S}/arch/powerpc/boot/dts/t4240qds-usdpaa.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/85xx/e6500rev1_defconfig" JFFS2_ERASEBLOCK = "0x10000" diff --git a/meta-fsl-ppc/conf/machine/t4240qds.conf b/meta-fsl-ppc/conf/machine/t4240qds.conf index 28863ff7..9cb3f82d 100644 --- a/meta-fsl-ppc/conf/machine/t4240qds.conf +++ b/meta-fsl-ppc/conf/machine/t4240qds.conf @@ -4,7 +4,8 @@ require e6500.inc UBOOT_MACHINES ?= "T4240QDS" -KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/t4240qds.dts" +KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/t4240qds.dts \ + ${S}/arch/powerpc/boot/dts/t4240qds-usdpaa.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/85xx/e6500rev1_defconfig" JFFS2_ERASEBLOCK = "0x10000" -- cgit v1.2.3-54-g00ecf From 530aff670cd6b03a4114965ab8161eea4df80ea2 Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Tue, 20 Nov 2012 13:34:57 +0000 Subject: add machine configure files for b4420qds add b4420qds and b4420qds-64b machine configure files Signed-off-by: Zhenhua Luo --- meta-fsl-ppc/conf/machine/b4420qds-64b.conf | 17 +++++++++++++++++ meta-fsl-ppc/conf/machine/b4420qds.conf | 17 +++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 meta-fsl-ppc/conf/machine/b4420qds-64b.conf create mode 100644 meta-fsl-ppc/conf/machine/b4420qds.conf diff --git a/meta-fsl-ppc/conf/machine/b4420qds-64b.conf b/meta-fsl-ppc/conf/machine/b4420qds-64b.conf new file mode 100644 index 00000000..10d162e4 --- /dev/null +++ b/meta-fsl-ppc/conf/machine/b4420qds-64b.conf @@ -0,0 +1,17 @@ +#@TYPE: Machine +#@DESCRIPTION: Machine configuration for running B4420QDS in 64-bit mode + +require e6500-64b.inc + +# TODO: fix 32bit build of u-boot +UBOOT_MACHINES ?= "B4420QDS" +KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/b4420qds.dts" +KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/85xx/e6500rev1_defconfig" + +JFFS2_ERASEBLOCK = "0x10000" + +SYSVINIT_ENABLED_GETTYS = "" +USE_VT = "" +SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" +SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" +USE_VT = "0" diff --git a/meta-fsl-ppc/conf/machine/b4420qds.conf b/meta-fsl-ppc/conf/machine/b4420qds.conf new file mode 100644 index 00000000..e4527d7e --- /dev/null +++ b/meta-fsl-ppc/conf/machine/b4420qds.conf @@ -0,0 +1,17 @@ +#@TYPE: Machine +#@DESCRIPTION: Machine configuration for running B4420QDS in 32-bit mode + +require e6500.inc + +UBOOT_MACHINES ?= "B4420QDS" +KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/b4420qds.dts" +KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/85xx/e6500rev1_defconfig" + +JFFS2_ERASEBLOCK = "0x10000" + +SYSVINIT_ENABLED_GETTYS = "" +USE_VT = "" +SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" +SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" +USE_VT = "0" +BUILD_64BIT_KERNEL = "1" -- cgit v1.2.3-54-g00ecf From 75ebc2b0e5c6bafd0b96b48458321445e50199ae Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Fri, 30 Nov 2012 09:55:31 +0000 Subject: add machine configure files for t4160qds and t4160qds-64b currently the only difference of t4160qds and t4240qds is u-boot configure, the others are shared. Signed-off-by: Zhenhua Luo --- meta-fsl-ppc/conf/machine/t4160qds-64b.conf | 18 ++++++++++++++++++ meta-fsl-ppc/conf/machine/t4160qds.conf | 18 ++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 meta-fsl-ppc/conf/machine/t4160qds-64b.conf create mode 100644 meta-fsl-ppc/conf/machine/t4160qds.conf diff --git a/meta-fsl-ppc/conf/machine/t4160qds-64b.conf b/meta-fsl-ppc/conf/machine/t4160qds-64b.conf new file mode 100644 index 00000000..aa186d4e --- /dev/null +++ b/meta-fsl-ppc/conf/machine/t4160qds-64b.conf @@ -0,0 +1,18 @@ +#@TYPE: Machine +#@DESCRIPTION: Machine configuration for running T4160QDS in 64-bit mode + +require e6500-64b.inc + +# TODO: fix 32bit build of u-boot +UBOOT_MACHINES ?= "T4160QDS" +KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/t4240qds.dts \ + ${S}/arch/powerpc/boot/dts/t4240qds-usdpaa.dts" +KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/85xx/e6500rev1_defconfig" + +JFFS2_ERASEBLOCK = "0x10000" + +SYSVINIT_ENABLED_GETTYS = "" +USE_VT = "" +SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" +SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" +USE_VT = "0" diff --git a/meta-fsl-ppc/conf/machine/t4160qds.conf b/meta-fsl-ppc/conf/machine/t4160qds.conf new file mode 100644 index 00000000..a8d6a7e4 --- /dev/null +++ b/meta-fsl-ppc/conf/machine/t4160qds.conf @@ -0,0 +1,18 @@ +#@TYPE: Machine +#@DESCRIPTION: Machine configuration for running T4160QDS in 32-bit mode + +require e6500.inc + +UBOOT_MACHINES ?= "T4160QDS" +KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/t4240qds.dts \ + ${S}/arch/powerpc/boot/dts/t4240qds-usdpaa.dts" +KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/85xx/e6500rev1_defconfig" + +JFFS2_ERASEBLOCK = "0x10000" + +SYSVINIT_ENABLED_GETTYS = "" +USE_VT = "" +SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" +SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" +USE_VT = "0" +BUILD_64BIT_KERNEL = "1" -- cgit v1.2.3-54-g00ecf From 6ddf61ff1c472734d234fb8f4c40bff72d484dd1 Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Wed, 5 Dec 2012 21:41:45 +0000 Subject: fmc: update the version for legacy targets fmc_git.bb is added for e6500 targets, the default fmc version is build from git, the version(0.9.23) of legacy targets should be specified explicitly. Signed-off-by: Zhenhua Luo --- meta-fsl-ppc/conf/machine/p1023rds.conf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/meta-fsl-ppc/conf/machine/p1023rds.conf b/meta-fsl-ppc/conf/machine/p1023rds.conf index e51e5f76..956f321f 100644 --- a/meta-fsl-ppc/conf/machine/p1023rds.conf +++ b/meta-fsl-ppc/conf/machine/p1023rds.conf @@ -7,6 +7,8 @@ UBOOT_MACHINES ?= "P1023RDS P1023RDS_NAND" KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p1023rds.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/85xx/p1023rds_defconfig" +PREFERRED_VERSION_fmc = "0.9.23" + JFFS2_ERASEBLOCK = "0x10000" SYSVINIT_ENABLED_GETTYS = "" -- cgit v1.2.3-54-g00ecf From c0b3ca10b426c864c058c86a2cf91553c49495b2 Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Sat, 8 Dec 2012 13:28:10 +0800 Subject: update the kernel version for t4/b4 boards change "3.0.48" to "3.0.51" Signed-off-by: Zhenhua Luo --- meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc index 8489ca2f..5408f5ac 100644 --- a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc +++ b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc @@ -1,13 +1,23 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7" PV = "3.0.48" -PR = "r9" +PV_e6500 = "3.0.51" +PV_e6500-64b = "3.0.51" +PR = "r10" SRCREV = "dd5a5aac3e15b16a4bccbab29c736bda0e7d55e7" +SRCREV_e6500 = "c294ca97427698b749c6fe4b768b9cc1dd37dc04" +SRCREV_e6500-64b = "c294ca97427698b749c6fe4b768b9cc1dd37dc04" SRC_URI = "git://git.freescale.com/ppc/sdk/linux.git \ file://0001-compiler.h-Undef-before-redefining-__attribute_const.patch \ file://0001-powerpc-Fix-build-dependencies-for-c-files-requiring.patch \ " +SRC_URI_e6500 = "git://git.freescale.com/ppc/sdk/linux.git \ + file://0001-compiler.h-Undef-before-redefining-__attribute_const.patch \ +" +SRC_URI_e6500-64b = "git://git.freescale.com/ppc/sdk/linux.git \ + file://0001-compiler.h-Undef-before-redefining-__attribute_const.patch \ +" KSRC ?= "" S = '${@base_conditional("KSRC", "", "${WORKDIR}/git", "${KSRC}", d)}' -- cgit v1.2.3-54-g00ecf From afd7f091380945f4b8309f04e5fa69b55a9246ff Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Fri, 14 Dec 2012 16:11:09 +0000 Subject: u-boot_git: add e6500 commit for 1.3.1 release Signed-off-by: Ting Liu --- meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb b/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb index 9c4cf48e..bc19bb4e 100644 --- a/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb +++ b/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb @@ -5,7 +5,7 @@ PROVIDES = "virtual/bootloader" LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=1707d6db1d42237583f50183a5651ecb" -PR = "r28" +PR = "r29" INHIBIT_DEFAULT_DEPS = "1" DEPENDS = "boot-format-native virtual/${TARGET_PREFIX}gcc libgcc" @@ -13,12 +13,8 @@ inherit deploy SRCREV = "c6d9d502924ade8877f53eecdd5cf37e05d6d6b4" SRC_URI = "git://git.freescale.com/ppc/sdk/u-boot.git" - -SRCREV_e6500 = "59852d03867108217fe88e3bfc3e1e9cedfe63c5" -SRCREV_e6500-64b = "59852d03867108217fe88e3bfc3e1e9cedfe63c5" -SRC_URI_e6500 = "git://git.denx.de/u-boot.git" -SRC_URI_e6500-64b = "git://git.denx.de/u-boot.git" - +SRCREV_e6500 = "9040d1ee41fc29fc7e9796bdfb59612f80bc1ee4" +SRCREV_e6500-64b = "9040d1ee41fc29fc7e9796bdfb59612f80bc1ee4" python () { ml = d.getVar("MULTILIB_VARIANTS", True) arch = d.getVar("OVERRIDES", True) -- cgit v1.2.3-54-g00ecf From bfe7fd6f548546e491c3db9481195a8a30666c53 Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Fri, 14 Dec 2012 20:18:13 +0000 Subject: usdpaa: add recipe use external git tree to build usdpaa for t4/b4 Signed-off-by: Zhenhua Luo --- meta-fsl-ppc/recipes-tools/usdpaa/usdpaa_git.bb | 33 +++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 meta-fsl-ppc/recipes-tools/usdpaa/usdpaa_git.bb diff --git a/meta-fsl-ppc/recipes-tools/usdpaa/usdpaa_git.bb b/meta-fsl-ppc/recipes-tools/usdpaa/usdpaa_git.bb new file mode 100644 index 00000000..697beade --- /dev/null +++ b/meta-fsl-ppc/recipes-tools/usdpaa/usdpaa_git.bb @@ -0,0 +1,33 @@ +DESCRIPTION = "User-Space Data-Path Acceleration Architecture drivers" +SECTION = "usdpaa" +LICENSE = "BSD & GPLv2" +LIC_FILES_CHKSUM = "file://Makefile;endline=30;md5=39e58bedc879163c9338596e52df5b1f" + +inherit pkgconfig + +DEPENDS = "libxml2 libedit ncurses readline flib" +RDEPENDS_${PN} = "libgcc" + +SRC_URI = "git://git.freescale.com/ppc/sdk/usdpaa.git" +SRCREV = "53c621f783c9d10d46828854120a3ebd58389779" + +S = "${WORKDIR}/git" + +EXTRA_OEMAKE = 'V=1 CC="${CC}" LD="${LD}" AR="${AR}"' + +do_compile_prepend () { + export ARCH=${TARGET_ARCH} + export LIBXML2_CFLAGS="$(pkg-config --cflags libxml-2.0)" + export LIBXML2_LDFLAGS="$(pkg-config --libs --static libxml-2.0)" + export LIBEDIT_CFLAGS="$(pkg-config --cflags libedit)" + export LIBEDIT_LDFLAGS="$(pkg-config --libs --static libedit)" +} + +do_install () { + oe_runmake ARCH=${TARGET_ARCH} install DESTDIR=${D} +} + +PARALLEL_MAKE_pn-${PN} = "" + +FILES_${PN} += "/root/SOURCE_THIS /usr/etc/" +RDEPENDS_${PN} += "bash" -- cgit v1.2.3-54-g00ecf From 7cfa1d52ddb12b2d65f6857bffc6b471c9810d7c Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Fri, 14 Dec 2012 17:14:30 +0000 Subject: fmlib: add recipe Signed-off-by: Ting Liu --- ...ake-the-library-install-path-configurable.patch | 43 ++++++++++++++++++++++ meta-fsl-ppc/recipes-ucode/fmlib/fmlib_git.bb | 39 ++++++++++++++++++++ 2 files changed, 82 insertions(+) create mode 100644 meta-fsl-ppc/recipes-ucode/fmlib/files/0001-fm-lib-make-the-library-install-path-configurable.patch create mode 100644 meta-fsl-ppc/recipes-ucode/fmlib/fmlib_git.bb diff --git a/meta-fsl-ppc/recipes-ucode/fmlib/files/0001-fm-lib-make-the-library-install-path-configurable.patch b/meta-fsl-ppc/recipes-ucode/fmlib/files/0001-fm-lib-make-the-library-install-path-configurable.patch new file mode 100644 index 00000000..4894ce3b --- /dev/null +++ b/meta-fsl-ppc/recipes-ucode/fmlib/files/0001-fm-lib-make-the-library-install-path-configurable.patch @@ -0,0 +1,43 @@ +From 67b539d256520f95f3c8101f4605ea6d496982df Mon Sep 17 00:00:00 2001 +From: Zhenhua Luo +Date: Thu, 18 Oct 2012 17:28:00 +0300 +Subject: [PATCH] fm-lib: make the library install path configurable + +currently library for both 32bit target and 64bit target +is installed in /usr/lib folder, add a variable to make the +install path configurable + +Signed-off-by: Zhenhua Luo +--- + Makefile | 8 +++++--- + 1 file changed, 5 insertions(+), 3 deletions(-) + +diff --git a/Makefile b/Makefile +index 06fe930..d59f44a 100644 +--- a/Makefile ++++ b/Makefile +@@ -59,6 +59,8 @@ endif + + INSTALL?=install + ++LIB_DEST_DIR?=$(PREFIX)/lib ++ + # Don't forget to increment .version before doing a new release! + FM_LIB_VERSION:=$(shell cat .version) + +@@ -118,9 +120,9 @@ archive: all .version + + install-%: %.a + @(echo "Installing...") +- @($(INSTALL) -d $(DESTDIR)$(PREFIX)/lib) +- @($(INSTALL) $< $(DESTDIR)$(PREFIX)/lib) +- @(ln -s $(DESTDIR)$(PREFIX)/lib/$< $(DESTDIR)$(PREFIX)/lib/libfm.a) ++ @($(INSTALL) -d $(DESTDIR)$(LIB_DEST_DIR)) ++ @($(INSTALL) $< $(DESTDIR)$(LIB_DEST_DIR)) ++ @(ln -s $(DESTDIR)$(LIB_DEST_DIR)/$< $(DESTDIR)$(LIB_DEST_DIR)/libfm.a) + @(cp -r -p ./include $(DESTDIR)$(PREFIX)) + @($(INSTALL) -d $(DESTDIR)$(PREFIX)/share/doc/fm-lib-$(FM_LIB_VERSION)) + @($(INSTALL) $(FM_LIB_DOCFILES) $(DESTDIR)$(PREFIX)/share/doc/fm-lib-$(FM_LIB_VERSION)) +-- +1.7.9.5 + diff --git a/meta-fsl-ppc/recipes-ucode/fmlib/fmlib_git.bb b/meta-fsl-ppc/recipes-ucode/fmlib/fmlib_git.bb new file mode 100644 index 00000000..74eb2047 --- /dev/null +++ b/meta-fsl-ppc/recipes-ucode/fmlib/fmlib_git.bb @@ -0,0 +1,39 @@ +DESCRIPTION = "Frame Manager User Space Library" +SECTION = "fman" +LICENSE = "BSD & GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=3f16fa8e677e45af3127c5c4bafc3c00" + +DEPENDS = "linux-libc-headers" +DEPENDS_virtclass-native = "" + +SRC_URI = "git://git.freescale.com/ppc/sdk/fmlib.git" +SRCREV = "5ebbf75c3108404b513198c9fd9b955b123680af" + +S = "${WORKDIR}/git" + +TARGET_ARCH_FMLIB = "${DEFAULTTUNE}" +TARGET_ARCH_FMLIB_e5500 = "ppc32e5500" +TARGET_ARCH_FMLIB_e6500 = "ppc32e6500" + +EXTRA_OEMAKE = "DESTDIR=${D} PREFIX=${prefix} LIB_DEST_DIR=${libdir} \ + CROSS_COMPILE=${TARGET_PREFIX} KERNEL_SRC=${STAGING_EXECPREFIXDIR}" + +do_compile () { + oe_runmake libfm-${TARGET_ARCH_FMLIB}.a +} + +do_compile_virtclass-native () { +} + +do_install () { + oe_runmake install-libfm-${TARGET_ARCH_FMLIB} +} + +do_install_virtclass-native () { + install -d ${D}/${includedir} + cp -rf ${S}/include/* ${D}/${includedir} +} + +ALLOW_EMPTY = "1" + +BBCLASSEXTEND = "native" -- cgit v1.2.3-54-g00ecf From ed02e74804e41d43254539e21d9265c258d97ebf Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Fri, 14 Dec 2012 17:14:29 +0000 Subject: fm-ucode: add recipe Signed-off-by: Ting Liu --- .../recipes-ucode/fm-ucode/fm-ucode_git.bb | 46 ++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 meta-fsl-ppc/recipes-ucode/fm-ucode/fm-ucode_git.bb diff --git a/meta-fsl-ppc/recipes-ucode/fm-ucode/fm-ucode_git.bb b/meta-fsl-ppc/recipes-ucode/fm-ucode/fm-ucode_git.bb new file mode 100644 index 00000000..89c43ba3 --- /dev/null +++ b/meta-fsl-ppc/recipes-ucode/fm-ucode/fm-ucode_git.bb @@ -0,0 +1,46 @@ +DESCRIPTION = "Fman microcode binary" +SECTION = "fm-ucode" +LICENSE = "Freescale EULA" +LIC_FILES_CHKSUM = "file://EULA;md5=60037ccba533a5995e8d1a838d85799c" + +FMAN_UCODE_INSTALL_FILE = "fsl_fman_ucode" +FMAN_UCODE_INSTALL_FILE_append_p2041rdb = "_P2041" +FMAN_UCODE_INSTALL_FILE_append_p4080ds= "_P4080" +FMAN_UCODE_INSTALL_FILE_append_p1023rds = "_*1023" +FMAN_UCODE_INSTALL_FILE_append_p5020ds = "_P5020" +FMAN_UCODE_INSTALL_FILE_append_p5020ds-64b = "_P5020" +FMAN_UCODE_INSTALL_FILE_append_p5040ds = "_P5040" +FMAN_UCODE_INSTALL_FILE_append_p5040ds-64b = "_P5040" +FMAN_UCODE_INSTALL_FILE_append_p3041ds = "_P3041" +FMAN_UCODE_INSTALL_FILE_append_b4420qds = "_B4860" +FMAN_UCODE_INSTALL_FILE_append_b4420qds-64b = "_B4860" +FMAN_UCODE_INSTALL_FILE_append_b4860qds = "_B4860" +FMAN_UCODE_INSTALL_FILE_append_b4860qds-64b = "_B4860" +FMAN_UCODE_INSTALL_FILE_append_t4160qds = "_T4240" +FMAN_UCODE_INSTALL_FILE_append_t4160qds-64b = "_T4240" +FMAN_UCODE_INSTALL_FILE_append_t4240qds = "_T4240" +FMAN_UCODE_INSTALL_FILE_append_t4240qds-64b = "_T4240" + +COMPATIBLE_MACHINE = "(p1023rds|p4080ds|p5020ds|p5040ds|p5020ds-64b|p5040ds-64b|p3041ds|p2041rdb|b4420qds|b4420qds-64b|b4860qds|b4860qds-64b|t4160qds|t4160qds-64b|t4240qds|t4240qds-64b)" +inherit deploy + +SRC_URI = "git://git.freescale.com/ppc/sdk/fm-ucode.git" +SRCREV = "f4a43e8ad6a6e5fdedff6e1484386f963bccfdff" + +S = "${WORKDIR}/git" + +ALLOW_EMPTY_${PN} = "1" +do_install () { + install -d ${D}/boot + install -m 644 ${FMAN_UCODE_INSTALL_FILE}*.bin ${D}/boot/ +} + +do_deploy () { + install -d ${DEPLOYDIR}/ + install -m 644 ${FMAN_UCODE_INSTALL_FILE}*.bin ${DEPLOYDIR}/ +} +addtask deploy before do_build after do_install + +PACKAGES += "${PN}-image" +FILES_${PN}-image += "/boot" + -- cgit v1.2.3-54-g00ecf From 3ed0eeaacd3db85324e8e463432062defa664009 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Fri, 14 Dec 2012 16:51:58 +0000 Subject: fmc_git: add recipe Signed-off-by: Ting Liu --- meta-fsl-ppc/recipes-ucode/fmc/fmc_git.bb | 45 +++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 meta-fsl-ppc/recipes-ucode/fmc/fmc_git.bb diff --git a/meta-fsl-ppc/recipes-ucode/fmc/fmc_git.bb b/meta-fsl-ppc/recipes-ucode/fmc/fmc_git.bb new file mode 100644 index 00000000..c5a3bc16 --- /dev/null +++ b/meta-fsl-ppc/recipes-ucode/fmc/fmc_git.bb @@ -0,0 +1,45 @@ +DESCRIPTION = "Frame Manager Configuration tool" +SECTION = "fmc" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://COPYING;md5=a504ab5a8ff235e67c7301214749346c" + +SRC_URI = "git://git.freescale.com/ppc/sdk/fmc.git" +SRCREV = "274ff60dd9d7dd9f881deeb86c2c4b8a342e55d1" + +DEPENDS = "libxml2 fmlib tclap" + +PACKAGE_ARCH = "${MACHINE_ARCH}" + +S = "${WORKDIR}/git" + +EXTRA_OEMAKE = 'FMD_USPACE_HEADER_PATH="${STAGING_INCDIR}/fmd" \ + FMD_USPACE_LIB_PATH="${STAGING_LIBDIR}" LIBXML2_HEADER_PATH="${STAGING_INCDIR}/libxml2" \ + TCLAP_HEADER_PATH="${STAGING_INCDIR}" ' +EXTRA_OEMAKE_virtclass-native = 'FMCHOSTMODE=1 FMD_USPACE_HEADER_PATH="${STAGING_INCDIR}/fmd" \ + FMD_USPACE_LIB_PATH="${STAGING_LIBDIR}" LIBXML2_HEADER_PATH="${STAGING_INCDIR}/libxml2" \ + TCLAP_HEADER_PATH="${STAGING_INCDIR}" ' + +do_compile () { + if [ "b4860qds" = "${MACHINE}" ] || [ "b4420qds" = "${MACHINE}" ];then + EXTRA_OEMAKE_PLATFORM="b4860qds" + elif [ "t4240qds" = "${MACHINE}" ] || [ "t4160qds" = "${MACHINE}" ];then + EXTRA_OEMAKE_PLATFORM="t4240qds" + elif [ "p1023rds" = "${MACHINE}" ];then + EXTRA_OEMAKE_PLATFORM="p1023rds" + else + EXTRA_OEMAKE_PLATFORM="" + fi + oe_runmake MACHINE=${EXTRA_OEMAKE_PLATFORM} -C source +} + +do_install () { + install -d ${D}/${bindir} + install -m 755 ${S}/source/fmc ${D}/${bindir}/fmc + + install -d ${D}/etc/fmc/config + install -m 644 ${S}/etc/fmc/config/hxs_pdl_v3.xml ${D}/etc/fmc/config +} + +PARALLEL_MAKE = "" + +BBCLASSEXTEND = "native" -- cgit v1.2.3-54-g00ecf From bbc9525b8890ed91abfaf6157e27f0e9a6486631 Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Sun, 16 Dec 2012 11:00:06 +0800 Subject: eth-config: add recipes use public git tree for eth-config build Signed-off-by: Zhenhua Luo --- .../recipes-tools/eth-config/eth-config_git.bb | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 meta-fsl-ppc/recipes-tools/eth-config/eth-config_git.bb diff --git a/meta-fsl-ppc/recipes-tools/eth-config/eth-config_git.bb b/meta-fsl-ppc/recipes-tools/eth-config/eth-config_git.bb new file mode 100644 index 00000000..19da8172 --- /dev/null +++ b/meta-fsl-ppc/recipes-tools/eth-config/eth-config_git.bb @@ -0,0 +1,22 @@ +DESCRIPTION = "Ethernet Configuration Files" +SECTION = "eth-config" +LICENSE = "Freescale EULA" +LIC_FILES_CHKSUM = "file://COPYING;md5=cf02dc8eb5ac4a76f3812826520dea87" + +SRC_URI = "git://git.freescale.com/ppc/sdk/eth-config.git" +SRCREV = "847191454aa557d19c19fdcd9e0a145da5d43c49" +SRCREV_e6500 = "c1400695e56aa80f2f4c88c4e0582028248ae06f" +SRCREV_e6500-64b = "c1400695e56aa80f2f4c88c4e0582028248ae06f" + +S = "${WORKDIR}/git" + +do_install() { + install -d ${D}/etc/fmc/config + install -m 644 ${S}/8c-128fq-p.xml ${D}/etc/fmc/config + install -m 644 ${S}/cfg-8c.xml ${D}/etc/fmc/config + install -d ${D}/etc/fmc/config/shared_mac + install -m 644 ${S}/shared_mac/hv2p_config_p4_shared_mac.xml ${D}/etc/fmc/config/shared_mac + install -m 644 ${S}/shared_mac/hv2p_policy_shared_mac.xml ${D}/etc/fmc/config/shared_mac + install -m 644 ${S}/shared_mac/hv2p_swparser_shared_mac.xml ${D}/etc/fmc/config/shared_mac + install -m 644 ${S}/shared_mac/README ${D}/etc/fmc/config/shared_mac +} -- cgit v1.2.3-54-g00ecf From 49d0ec0db4f025db6416428df1683670a748997f Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Sun, 16 Dec 2012 11:11:17 +0000 Subject: usdpaa: add non t4/b4 boards support commit for non t4/b4 boards was pushed to external git server too. Signed-off-by: Ting Liu --- meta-fsl-ppc/recipes-tools/usdpaa/usdpaa_git.bb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/meta-fsl-ppc/recipes-tools/usdpaa/usdpaa_git.bb b/meta-fsl-ppc/recipes-tools/usdpaa/usdpaa_git.bb index 697beade..731f01b9 100644 --- a/meta-fsl-ppc/recipes-tools/usdpaa/usdpaa_git.bb +++ b/meta-fsl-ppc/recipes-tools/usdpaa/usdpaa_git.bb @@ -2,6 +2,7 @@ DESCRIPTION = "User-Space Data-Path Acceleration Architecture drivers" SECTION = "usdpaa" LICENSE = "BSD & GPLv2" LIC_FILES_CHKSUM = "file://Makefile;endline=30;md5=39e58bedc879163c9338596e52df5b1f" +PR = "r1" inherit pkgconfig @@ -9,7 +10,9 @@ DEPENDS = "libxml2 libedit ncurses readline flib" RDEPENDS_${PN} = "libgcc" SRC_URI = "git://git.freescale.com/ppc/sdk/usdpaa.git" -SRCREV = "53c621f783c9d10d46828854120a3ebd58389779" +SRCREV = "2e21af59ea1eddd938404d29ee0864e6cfe936a8" +SRCREV_e6500 = "53c621f783c9d10d46828854120a3ebd58389779" +SRCREV_e6500-64b = "53c621f783c9d10d46828854120a3ebd58389779" S = "${WORKDIR}/git" -- cgit v1.2.3-54-g00ecf From 625d9cc79568ac9c0c3a74f7cec2b9a75b8842a1 Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Tue, 18 Dec 2012 09:23:36 +0800 Subject: rcw: update SHA for e6500 targets Signed-off-by: Zhenhua Luo --- meta-fsl-ppc/recipes-tools/rcw/rcw_git.bb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/meta-fsl-ppc/recipes-tools/rcw/rcw_git.bb b/meta-fsl-ppc/recipes-tools/rcw/rcw_git.bb index efccf4c3..2bbc0254 100644 --- a/meta-fsl-ppc/recipes-tools/rcw/rcw_git.bb +++ b/meta-fsl-ppc/recipes-tools/rcw/rcw_git.bb @@ -1,7 +1,7 @@ DESCRIPTION = "Reset Control Words (RCW)" SECTION = "rcw" LICENSE = "BSD" -PR = "r6" +PR = "r7" LIC_FILES_CHKSUM = "file://rcw.py;beginline=8;endline=28;md5=9ba0b28922dd187b06b6c8ebcfdd208e" @@ -12,6 +12,8 @@ PACKAGE_ARCH = "${MACHINE_ARCH}" inherit deploy SRCREV = "e9529eac512f7dc2ada3c6ff3ef1b934e5afae57" +SRCREV_e6500 = "356a8050298bad4a3c4e1237b5d8946738efe643" +SRCREV_e6500-64b = "356a8050298bad4a3c4e1237b5d8946738efe643" SRC_URI = "git://git.freescale.com/ppc/sdk/rcw.git" S = "${WORKDIR}/git" -- cgit v1.2.3-54-g00ecf From bb005ba22aecc91fbc36bbee0770e16a6a994d36 Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Tue, 22 Jan 2013 12:11:52 +0000 Subject: rename collection name from fsl to fsl-ppc Signed-off-by: Zhenhua Luo --- meta-fsl-ppc/conf/layer.conf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/meta-fsl-ppc/conf/layer.conf b/meta-fsl-ppc/conf/layer.conf index 9d2e54b9..ac08f27e 100644 --- a/meta-fsl-ppc/conf/layer.conf +++ b/meta-fsl-ppc/conf/layer.conf @@ -4,8 +4,8 @@ BBPATH := "${BBPATH}:${LAYERDIR}" BBFILES += "${LAYERDIR}/recipes-*/*/*.bb*" BBFILES += "${LAYERDIR}/images/*.bb*" -BBFILE_COLLECTIONS += "fsl" -BBFILE_PATTERN_fsl := "^${LAYERDIR}/" -BBFILE_PRIORITY_fsl = "5" +BBFILE_COLLECTIONS += "fsl-ppc" +BBFILE_PATTERN_fsl-ppc := "^${LAYERDIR}/" +BBFILE_PRIORITY_fsl-ppc = "5" BB_ENV_EXTRAWHITE := "KSRC USRC" -- cgit v1.2.3-54-g00ecf From 77b4bc4b49cf8f272e407f196b1b81e1711c2e03 Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Wed, 30 Jan 2013 14:39:15 +0800 Subject: Remove distro conf which are BSP/SDK specific Remove conf/distro/fsl.conf Signed-off-by: Zhenhua Luo --- meta-fsl-ppc/conf/distro/fsl.conf | 94 --------------------------------------- 1 file changed, 94 deletions(-) delete mode 100644 meta-fsl-ppc/conf/distro/fsl.conf diff --git a/meta-fsl-ppc/conf/distro/fsl.conf b/meta-fsl-ppc/conf/distro/fsl.conf deleted file mode 100644 index a18c8cc5..00000000 --- a/meta-fsl-ppc/conf/distro/fsl.conf +++ /dev/null @@ -1,94 +0,0 @@ -DISTRO = "fsl" -DISTRO_NAME = "Yocto (Built by Poky 7.0)" -DISTRO_VERSION = "1.2" -SDK_VENDOR = "-fslsdk" -SDK_VERSION := "${@'${DISTRO_VERSION}'.replace('snapshot-${DATE}','snapshot')}" - -MAINTAINER = "Matthew McClintock " - -TARGET_VENDOR = "-fsl" -TARGET_VENDOR_virtclass-multilib-lib32 = "-fsl" -TARGET_VENDOR_virtclass-multilib-lib64 = "-fsl" - -LOCALCONF_VERSION = "1" -LAYER_CONF_VERSION ?= "6" - -DISTRO_FEATURES_append = " largefile multiarch" - -SDK_NAME = "${DISTRO}-${TCLIBC}-${SDK_ARCH}-${TUNE_PKGARCH}" -SDKPATH = "/opt/${DISTRO}/${SDK_VERSION}" - -DISTRO_EXTRA_RDEPENDS += "packagegroup-core-boot" -DISTRO_EXTRA_RRECOMMENDS += "" - -POKYQEMUDEPS = "${@base_contains("INCOMPATIBLE_LICENSE", "GPLv3", "", "qemu-config",d)}" -DISTRO_EXTRA_RDEPENDS_append_qemuarm = " ${POKYQEMUDEPS}" -DISTRO_EXTRA_RDEPENDS_append_qemumips = " ${POKYQEMUDEPS}" -DISTRO_EXTRA_RDEPENDS_append_qemuppc = " ${POKYQEMUDEPS}" -DISTRO_EXTRA_RDEPENDS_append_qemux86 = " ${POKYQEMUDEPS}" -DISTRO_EXTRA_RDEPENDS_append_qemux86-64 = " ${POKYQEMUDEPS}" - -TCLIBCAPPEND = "" - -PREMIRRORS ?= "\ -bzr://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \ -cvs://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \ -git://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \ -hg://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \ -osc://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \ -p4://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \ -svk://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \ -svn://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n" - -MIRRORS =+ "\ -ftp://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \ -http://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \ -https://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n" - -# The CONNECTIVITY_CHECK_URI's are used to test whether we can succesfully -# fetch from the network (and warn you if not). To disable the test set -# the variable to be empty. -CONNECTIVITY_CHECK_URIS ?= "git://git.yoctoproject.org/yocto-firewall-test;protocol=git;rev=HEAD \ - https://eula-downloads.yoctoproject.org/index.php \ - http://bugzilla.yoctoproject.org/report.cgi" - -SANITY_TESTED_DISTROS ?= " \ - Yocto (Built by Poky 7.0) 1.2 \n \ - Ubuntu 10.04.4 LTS \n \ - Ubuntu 11.10 \n \ - Ubuntu 12.04 LTS \n \ - Ubuntu 12.04.1 LTS \n \ - Fedora release 13 (Goddard) \n \ - Fedora release 15 (Lovelock) \n \ - Fedora release 16 (Verne) \n \ - Fedora release 17 (Beefy Miracle) \n \ - CentOS release 5.5 (Final) \n \ - CentOS release 5.6 (Final) \n \ - CentOS release 5.7 (Final) \n \ - CentOS release 5.8 (Final) \n \ - CentOS release 6.2 (Final) \n \ - CentOS release 6.3 (Final) \n \ - Debian GNU/Linux 6.0.4 (squeeze) \n \ - openSUSE 11.4 \n \ - openSUSE 12.1 \n \ - " - -# Default hash policy for distro -BB_SIGNATURE_HANDLER ?= 'OEBasicHash' -# -# OELAYOUT_ABI allows us to notify users when the format of TMPDIR changes in -# an incompatible way. Such changes should usually be detailed in the commit -# that breaks the format and have been previously discussed on the mailing list -# with general agreement from the core team. -# -OELAYOUT_ABI = "8" - -INHERIT += "own-mirrors" -SOURCE_MIRROR_URL ?= "http://autobuilder.yoctoproject.org/sources/" - -IMAGE_CLASSES = "image_types_uboot" - -PREFERRED_VERSION_u-boot-mkimage-native_powerpc = "2011.06" -PREFERRED_PROVIDER_virtual/libx11 = "libx11" - -CCACHE = "" -- cgit v1.2.3-54-g00ecf From f45750725546a6b28565f45d320fa5eee705ada1 Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Wed, 30 Jan 2013 14:44:06 +0800 Subject: Remove recipes-append folder which are SDK specific The change in recipe-append is specific for FSL networking SDK, so move them from meta-fsl-ppc to meta-fsl-networking. Signed-off-by: Chunrong Guo Signed-off-by: Zhenhua Luo --- meta-fsl-ppc/images/fsl-image-lsb-sdk.bb | 18 ------------------ meta-fsl-ppc/images/fsl-image-minimal.bb | 16 ---------------- meta-fsl-ppc/images/fsl-toolchain-bare.bb | 8 -------- meta-fsl-ppc/images/fsl-toolchain.bb | 19 ------------------- 4 files changed, 61 deletions(-) delete mode 100644 meta-fsl-ppc/images/fsl-image-lsb-sdk.bb delete mode 100644 meta-fsl-ppc/images/fsl-image-minimal.bb delete mode 100644 meta-fsl-ppc/images/fsl-toolchain-bare.bb delete mode 100644 meta-fsl-ppc/images/fsl-toolchain.bb diff --git a/meta-fsl-ppc/images/fsl-image-lsb-sdk.bb b/meta-fsl-ppc/images/fsl-image-lsb-sdk.bb deleted file mode 100644 index 1ba38d3f..00000000 --- a/meta-fsl-ppc/images/fsl-image-lsb-sdk.bb +++ /dev/null @@ -1,18 +0,0 @@ -IMAGE_FEATURES += "tools-sdk dev-pkgs ssh-server-openssh" -EXTRA_IMAGE_FEATURES = "tools-debug tools-profile tools-testapps debug-tweaks" - -IMAGE_INSTALL = "\ - ${CORE_IMAGE_BASE_INSTALL} \ - packagegroup-core-basic \ - packagegroup-core-lsb \ - git \ - dtc \ - flex \ - bison \ - ccache \ - u-boot \ - " - -inherit core-image - -IMAGE_FSTYPES = "tar.gz" diff --git a/meta-fsl-ppc/images/fsl-image-minimal.bb b/meta-fsl-ppc/images/fsl-image-minimal.bb deleted file mode 100644 index 17325851..00000000 --- a/meta-fsl-ppc/images/fsl-image-minimal.bb +++ /dev/null @@ -1,16 +0,0 @@ -# -# Copyright (C) 2007 OpenedHand Ltd. -# -IMAGE_INSTALL = "packagegroup-core-boot ${ROOTFS_PKGMANAGE_BOOTSTRAP} u-boot" -IMAGE_LINGUAS = " " - -LICENSE = "MIT" - -inherit core-image - -IMAGE_ROOTFS_SIZE = "8192" - -# remove not needed ipkg informations -ROOTFS_POSTPROCESS_COMMAND += "remove_packaging_data_files ; " - -IMAGE_FSTYPES = "tar.gz ext2.gz.u-boot jffs2" diff --git a/meta-fsl-ppc/images/fsl-toolchain-bare.bb b/meta-fsl-ppc/images/fsl-toolchain-bare.bb deleted file mode 100644 index 74a3c4a9..00000000 --- a/meta-fsl-ppc/images/fsl-toolchain-bare.bb +++ /dev/null @@ -1,8 +0,0 @@ -PR = "r3" - -require recipes-core/meta/meta-toolchain.bb - -TOOLCHAIN_OUTPUTNAME = "${SDK_NAME}-toolchain-bare-${DISTRO_VERSION}" -TOOLCHAIN_TARGET_TASK = "packagegroup-core-standalone-sdk-target" -TOOLCHAIN_HOST_TASK = "packagegroup-cross-canadian-${TRANSLATED_TARGET_ARCH}" -TOOLCHAIN_NEED_CONFIGSITE_CACHE += "zlib" diff --git a/meta-fsl-ppc/images/fsl-toolchain.bb b/meta-fsl-ppc/images/fsl-toolchain.bb deleted file mode 100644 index 696681c1..00000000 --- a/meta-fsl-ppc/images/fsl-toolchain.bb +++ /dev/null @@ -1,19 +0,0 @@ -PR = "r2" - -require fsl-toolchain-bare.bb - -TOOLCHAIN_OUTPUTNAME = "${SDK_NAME}-toolchain-${DISTRO_VERSION}" -TOOLCHAIN_TARGET_TASK += " \ - glib-2.0 \ - glib-2.0-dev \ - dtc \ - libgomp \ - libgomp-dev \ - libgomp-staticdev \ - libstdc++-staticdev \ - ${TCLIBC}-staticdev \ - " - -TOOLCHAIN_HOST_TASK += " \ - nativesdk-dtc \ - " -- cgit v1.2.3-54-g00ecf From cc933ce11a7c4bc4bd2512e42420b73464c0cf05 Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Mon, 18 Feb 2013 14:47:59 -0600 Subject: conf/machines: update to use SOC_FAMILY Signed-off-by: Matthew McClintock --- meta-fsl-ppc/conf/machine/b4420qds-64b.conf | 3 +++ meta-fsl-ppc/conf/machine/b4420qds.conf | 2 ++ meta-fsl-ppc/conf/machine/b4860qds-64b.conf | 2 ++ meta-fsl-ppc/conf/machine/b4860qds.conf | 2 ++ meta-fsl-ppc/conf/machine/mpc8536ds.conf | 2 ++ meta-fsl-ppc/conf/machine/mpc8544ds.conf | 2 ++ meta-fsl-ppc/conf/machine/mpc8548cds.conf | 2 ++ meta-fsl-ppc/conf/machine/mpc8572ds.conf | 2 ++ meta-fsl-ppc/conf/machine/p1010rdb.conf | 2 ++ meta-fsl-ppc/conf/machine/p1020mbg.conf | 2 ++ meta-fsl-ppc/conf/machine/p1020rdb.conf | 2 ++ meta-fsl-ppc/conf/machine/p1020utm.conf | 2 ++ meta-fsl-ppc/conf/machine/p1021rdb.conf | 3 +++ meta-fsl-ppc/conf/machine/p1022ds.conf | 2 ++ meta-fsl-ppc/conf/machine/p1023rds.conf | 2 ++ meta-fsl-ppc/conf/machine/p1024rdb.conf | 2 ++ meta-fsl-ppc/conf/machine/p1025rdb.conf | 3 ++- meta-fsl-ppc/conf/machine/p2020ds.conf | 4 +++- meta-fsl-ppc/conf/machine/p2020rdb.conf | 2 ++ meta-fsl-ppc/conf/machine/p2041rdb.conf | 2 ++ meta-fsl-ppc/conf/machine/p3041ds.conf | 2 ++ meta-fsl-ppc/conf/machine/p4080ds.conf | 2 ++ meta-fsl-ppc/conf/machine/p5020ds-64b.conf | 2 ++ meta-fsl-ppc/conf/machine/p5020ds.conf | 2 ++ meta-fsl-ppc/conf/machine/p5040ds-64b.conf | 2 ++ meta-fsl-ppc/conf/machine/p5040ds.conf | 2 ++ meta-fsl-ppc/conf/machine/t4160qds-64b.conf | 2 ++ meta-fsl-ppc/conf/machine/t4160qds.conf | 2 ++ meta-fsl-ppc/conf/machine/t4240qds-64b.conf | 2 ++ meta-fsl-ppc/conf/machine/t4240qds.conf | 2 ++ 30 files changed, 63 insertions(+), 2 deletions(-) diff --git a/meta-fsl-ppc/conf/machine/b4420qds-64b.conf b/meta-fsl-ppc/conf/machine/b4420qds-64b.conf index 10d162e4..4e8ba850 100644 --- a/meta-fsl-ppc/conf/machine/b4420qds-64b.conf +++ b/meta-fsl-ppc/conf/machine/b4420qds-64b.conf @@ -2,6 +2,9 @@ #@DESCRIPTION: Machine configuration for running B4420QDS in 64-bit mode require e6500-64b.inc +require conf/machine/include/soc-family.inc + +SOC_FAMILY = "b4420" # TODO: fix 32bit build of u-boot UBOOT_MACHINES ?= "B4420QDS" diff --git a/meta-fsl-ppc/conf/machine/b4420qds.conf b/meta-fsl-ppc/conf/machine/b4420qds.conf index e4527d7e..233d0e77 100644 --- a/meta-fsl-ppc/conf/machine/b4420qds.conf +++ b/meta-fsl-ppc/conf/machine/b4420qds.conf @@ -2,7 +2,9 @@ #@DESCRIPTION: Machine configuration for running B4420QDS in 32-bit mode require e6500.inc +require conf/machine/include/soc-family.inc +SOC_FAMILY = "b4420" UBOOT_MACHINES ?= "B4420QDS" KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/b4420qds.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/85xx/e6500rev1_defconfig" diff --git a/meta-fsl-ppc/conf/machine/b4860qds-64b.conf b/meta-fsl-ppc/conf/machine/b4860qds-64b.conf index 0bc1941b..1d878ae2 100644 --- a/meta-fsl-ppc/conf/machine/b4860qds-64b.conf +++ b/meta-fsl-ppc/conf/machine/b4860qds-64b.conf @@ -2,7 +2,9 @@ #@DESCRIPTION: Machine configuration for running B4860QDS in 64-bit mode require e6500-64b.inc +require conf/machine/include/soc-family.inc +SOC_FAMILY = "b4860" # TODO: fix 32bit build of u-boot UBOOT_MACHINES ?= "B4860QDS" KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/b4860qds.dts \ diff --git a/meta-fsl-ppc/conf/machine/b4860qds.conf b/meta-fsl-ppc/conf/machine/b4860qds.conf index 0da09100..4cdbd229 100644 --- a/meta-fsl-ppc/conf/machine/b4860qds.conf +++ b/meta-fsl-ppc/conf/machine/b4860qds.conf @@ -2,7 +2,9 @@ #@DESCRIPTION: Machine configuration for running B4860QDS in 32-bit mode require e6500.inc +require conf/machine/include/soc-family.inc +SOC_FAMILY = "b4860" UBOOT_MACHINES ?= "B4860QDS" KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/b4860qds.dts \ ${S}/arch/powerpc/boot/dts/b4860qds-usdpaa.dts" diff --git a/meta-fsl-ppc/conf/machine/mpc8536ds.conf b/meta-fsl-ppc/conf/machine/mpc8536ds.conf index babca86e..e515566f 100644 --- a/meta-fsl-ppc/conf/machine/mpc8536ds.conf +++ b/meta-fsl-ppc/conf/machine/mpc8536ds.conf @@ -3,7 +3,9 @@ #@DESCRIPTION: Machine configuration for the Freescale MPC8536DS require e500v2.inc +require conf/machine/include/soc-family.inc +SOC_FAMILY = "mpc8536" BOOTFORMAT_CONFIG = "config_ddr2_512m_mpc8536ds_667M.dat" UBOOT_MACHINES ?= "MPC8536DS MPC8536DS_36BIT MPC8536DS_NAND MPC8536DS_SDCARD MPC8536DS_SPIFLASH" KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/mpc8536ds.dts \ diff --git a/meta-fsl-ppc/conf/machine/mpc8544ds.conf b/meta-fsl-ppc/conf/machine/mpc8544ds.conf index 89e1d898..2cacf357 100644 --- a/meta-fsl-ppc/conf/machine/mpc8544ds.conf +++ b/meta-fsl-ppc/conf/machine/mpc8544ds.conf @@ -3,7 +3,9 @@ #@DESCRIPTION: Machine configuration for the Freescale MPC8544DS require e500v2.inc +require conf/machine/include/soc-family.inc +SOC_FAMILY = "mpc8544" UBOOT_MACHINES ?= "MPC8544DS" KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/mpc8544ds.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_defconfig" diff --git a/meta-fsl-ppc/conf/machine/mpc8548cds.conf b/meta-fsl-ppc/conf/machine/mpc8548cds.conf index 631c4cbc..b3a91d91 100644 --- a/meta-fsl-ppc/conf/machine/mpc8548cds.conf +++ b/meta-fsl-ppc/conf/machine/mpc8548cds.conf @@ -3,7 +3,9 @@ #@DESCRIPTION: Machine configuration for the Freescale MPC8548CDS require e500v2.inc +require conf/machine/include/soc-family.inc +SOC_FAMILY = "mpc8548" UBOOT_MACHINES ?= "MPC8548CDS MPC8548CDS_36BIT" KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/mpc8548cds_32b.dts \ ${S}/arch/powerpc/boot/dts/mpc8548cds_36b.dts" diff --git a/meta-fsl-ppc/conf/machine/mpc8572ds.conf b/meta-fsl-ppc/conf/machine/mpc8572ds.conf index 1c06b536..7e598f00 100644 --- a/meta-fsl-ppc/conf/machine/mpc8572ds.conf +++ b/meta-fsl-ppc/conf/machine/mpc8572ds.conf @@ -2,7 +2,9 @@ #@DESCRIPTION: Machine configuration for running require e500v2.inc +require conf/machine/include/soc-family.inc +SOC_FAMILY = "mpc8572" UBOOT_MACHINES ?= "MPC8572DS MPC8572DS_36BIT MPC8572DS_NAND" KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/mpc8572ds.dts \ ${S}/arch/powerpc/boot/dts/mpc8572ds_36b.dts" diff --git a/meta-fsl-ppc/conf/machine/p1010rdb.conf b/meta-fsl-ppc/conf/machine/p1010rdb.conf index 9752cc40..bdca3c8c 100644 --- a/meta-fsl-ppc/conf/machine/p1010rdb.conf +++ b/meta-fsl-ppc/conf/machine/p1010rdb.conf @@ -3,7 +3,9 @@ #@DESCRIPTION: Machine configuration for the Freescale P1010RDB require e500v2.inc +require conf/machine/include/soc-family.inc +SOC_FAMILY = "p1010" UBOOT_MACHINES ?= "P1010RDB_NAND P1010RDB_NOR" KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p1010rdb.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_defconfig" diff --git a/meta-fsl-ppc/conf/machine/p1020mbg.conf b/meta-fsl-ppc/conf/machine/p1020mbg.conf index 1459698a..b6182bf2 100644 --- a/meta-fsl-ppc/conf/machine/p1020mbg.conf +++ b/meta-fsl-ppc/conf/machine/p1020mbg.conf @@ -3,7 +3,9 @@ #@DESCRIPTION: Machine configuration for the Freescale P1020MBG require e500v2.inc +require conf/machine/include/soc-family.inc +SOC_FAMILY = "p1020" BOOTFORMAT_CONFIG = "config_ddr3_1gb_p1_p2_rdb_pc_800M.dat" UBOOT_MACHINES ?= "P1020MBG-PC P1020MBG-PC_SDCARD P1020MBG-PC_36BIT P1020MBG-PC_36BIT_SDCARD" KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p1020mbg-pc_32b.dts" diff --git a/meta-fsl-ppc/conf/machine/p1020rdb.conf b/meta-fsl-ppc/conf/machine/p1020rdb.conf index 1a0e6722..3f4e819a 100644 --- a/meta-fsl-ppc/conf/machine/p1020rdb.conf +++ b/meta-fsl-ppc/conf/machine/p1020rdb.conf @@ -2,7 +2,9 @@ #@DESCRIPTION: Machine configuration for running require e500v2.inc +require conf/machine/include/soc-family.inc +SOC_FAMILY = "p1020" BOOTFORMAT_CONFIG = "config_ddr3_1gb_p1_p2_rdb_pc_800M.dat" UBOOT_MACHINES ?= " P1020RDB-PC P1020RDB-PC_SPIFLASH P1020RDB-PC_NAND P1020RDB-PC_SDCARD P1020RDB-PC_36BIT P1020RDB-PC_36BIT_SPIFLASH P1020RDB-PC_36BIT_NAND P1020RDB-PC_36BIT_SDCARD" diff --git a/meta-fsl-ppc/conf/machine/p1020utm.conf b/meta-fsl-ppc/conf/machine/p1020utm.conf index 26ff060c..5b8ea270 100644 --- a/meta-fsl-ppc/conf/machine/p1020utm.conf +++ b/meta-fsl-ppc/conf/machine/p1020utm.conf @@ -3,7 +3,9 @@ #@DESCRIPTION: Machine configuration for the Freescale P1020UTM require e500v2.inc +require conf/machine/include/soc-family.inc +SOC_FAMILY = "p1020" BOOTFORMAT_CONFIG = "config_ddr3_1gb_p1_p2_rdb_pc_800M.dat" UBOOT_MACHINES ?= "P1020UTM-PC P1020UTM-PC_SDCARD P1020UTM-PC_36BIT P1020UTM-PC_36BIT_SDCARD" KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p1020utm-pc_32b.dts" diff --git a/meta-fsl-ppc/conf/machine/p1021rdb.conf b/meta-fsl-ppc/conf/machine/p1021rdb.conf index 1a42a947..ad7e54fb 100644 --- a/meta-fsl-ppc/conf/machine/p1021rdb.conf +++ b/meta-fsl-ppc/conf/machine/p1021rdb.conf @@ -3,6 +3,9 @@ #@DESCRIPTION: Machine configuration for the Freescale P1021RDB require e500v2.inc +require conf/machine/include/soc-family.inc + +SOC_FAMILY = "p1021" BOOTFORMAT_CONFIG = "config_ddr3_1gb_p1_p2_rdb_pc_800M.dat" UBOOT_MACHINES ?= "P1021RDB-PC P1021RDB-PC_NAND P1021RDB-PC_SDCARD P1021RDB-PC_SPIFLASH P1021RDB-PC_36BIT P1021RDB-PC_36BIT_SPIFLASH P1021RDB-PC_36BIT_NAND P1021RDB-PC_36BIT_SDCARD" KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p1021rdb-pc_32b.dts" diff --git a/meta-fsl-ppc/conf/machine/p1022ds.conf b/meta-fsl-ppc/conf/machine/p1022ds.conf index 6445bdc5..20389a2c 100644 --- a/meta-fsl-ppc/conf/machine/p1022ds.conf +++ b/meta-fsl-ppc/conf/machine/p1022ds.conf @@ -2,7 +2,9 @@ #@DESCRIPTION: Machine configuration for running require e500v2.inc +require conf/machine/include/soc-family.inc +SOC_FAMILY = "p1022" BOOTFORMAT_CONFIG = "config_ddr3_2gb_p1022ds.dat" UBOOT_MACHINES ?= "P1022DS P1022DS_NAND P1022DS_SPIFLASH P1022DS_SDCARD P1022DS_36BIT P1022DS_36BIT_SPIFLASH P1022DS_36BIT_NAND P1022DS_36BIT_SDCARD" KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p1022ds_32b.dts" diff --git a/meta-fsl-ppc/conf/machine/p1023rds.conf b/meta-fsl-ppc/conf/machine/p1023rds.conf index 956f321f..189c5c04 100644 --- a/meta-fsl-ppc/conf/machine/p1023rds.conf +++ b/meta-fsl-ppc/conf/machine/p1023rds.conf @@ -2,7 +2,9 @@ #@DESCRIPTION: Machine configuration for running require e500v2.inc +require conf/machine/include/soc-family.inc +SOC_FAMILY = "p1023" UBOOT_MACHINES ?= "P1023RDS P1023RDS_NAND" KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p1023rds.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/85xx/p1023rds_defconfig" diff --git a/meta-fsl-ppc/conf/machine/p1024rdb.conf b/meta-fsl-ppc/conf/machine/p1024rdb.conf index 2e47e4d0..58c08653 100644 --- a/meta-fsl-ppc/conf/machine/p1024rdb.conf +++ b/meta-fsl-ppc/conf/machine/p1024rdb.conf @@ -3,7 +3,9 @@ #@DESCRIPTION: Machine configuration for the Freescale P1024RDB require e500v2.inc +require conf/machine/include/soc-family.inc +SOC_FAMILY = "p1024" BOOTFORMAT_CONFIG = "config_ddr3_1gb_p1_p2_rdb_pc_667M.dat" UBOOT_MACHINES ?= "P1024RDB P1024RDB_36BIT P1024RDB_NAND P1024RDB_SDCARD P1024RDB_SPIFLASH" KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p1024rdb_32b.dts" diff --git a/meta-fsl-ppc/conf/machine/p1025rdb.conf b/meta-fsl-ppc/conf/machine/p1025rdb.conf index c6258330..a7071cb4 100644 --- a/meta-fsl-ppc/conf/machine/p1025rdb.conf +++ b/meta-fsl-ppc/conf/machine/p1025rdb.conf @@ -3,8 +3,9 @@ #@DESCRIPTION: Machine configuration for the Freescale P1025RDB require e500v2.inc +require conf/machine/include/soc-family.inc - +SOC_FAMILY = "p1025" BOOTFORMAT_CONFIG = "config_ddr3_1gb_p1_p2_rdb_pc_667M.dat" UBOOT_MACHINES ?= "P1025RDB P1025RDB_36BIT P1025RDB_NAND P1025RDB_SDCARD P1025RDB_SPIFLASH" KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p1025rdb_32b.dts" diff --git a/meta-fsl-ppc/conf/machine/p2020ds.conf b/meta-fsl-ppc/conf/machine/p2020ds.conf index dd2c9d10..21f62de4 100644 --- a/meta-fsl-ppc/conf/machine/p2020ds.conf +++ b/meta-fsl-ppc/conf/machine/p2020ds.conf @@ -2,8 +2,10 @@ #@DESCRIPTION: Machine configuration for running require e500v2.inc -BOOTFORMAT_CONFIG = "config_sram_p2020ds.dat" +require conf/machine/include/soc-family.inc +SOC_FAMILY = "p2020" +BOOTFORMAT_CONFIG = "config_sram_p2020ds.dat" UBOOT_MACHINES ?= "P2020DS P2020DS_36BIT P2020DS_DDR2 P2020DS_SDCARD P2020DS_SPIFLASH" KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p2020ds.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" diff --git a/meta-fsl-ppc/conf/machine/p2020rdb.conf b/meta-fsl-ppc/conf/machine/p2020rdb.conf index 7c0f573a..67856b31 100644 --- a/meta-fsl-ppc/conf/machine/p2020rdb.conf +++ b/meta-fsl-ppc/conf/machine/p2020rdb.conf @@ -3,7 +3,9 @@ #@DESCRIPTION: Machine configuration for the Freescale P2020RDB require e500v2.inc +require conf/machine/include/soc-family.inc +SOC_FAMILY = "p2020" BOOTFORMAT_CONFIG = "config_ddr3_1gb_64bit_p2020rdb_pc.dat" UBOOT_MACHINES ?= " P2020RDB-PC P2020RDB-PC_NAND P2020RDB-PC_SDCARD P2020RDB-PC_SPIFLASH P2020RDB-PC_36BIT P2020RDB-PC_36BIT_SPIFLASH P2020RDB-PC_36BIT_NAND P2020RDB-PC_36BIT_SDCARD" KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p2020rdb-pc_32b.dts" diff --git a/meta-fsl-ppc/conf/machine/p2041rdb.conf b/meta-fsl-ppc/conf/machine/p2041rdb.conf index 7cb449b2..ea1594f9 100644 --- a/meta-fsl-ppc/conf/machine/p2041rdb.conf +++ b/meta-fsl-ppc/conf/machine/p2041rdb.conf @@ -2,7 +2,9 @@ #@DESCRIPTION: Machine configuration for running require e500mc.inc +require conf/machine/include/soc-family.inc +SOC_FAMILY = "p2041" UBOOT_MACHINES ?= "P2041RDB P2041RDB_NAND P2041RDB_SECURE_BOOT P2041RDB_SDCARD P2041RDB_SPIFLASH" KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p2041rdb.dts \ ${S}/arch/powerpc/boot/dts/p2041rdb-usdpaa.dts" diff --git a/meta-fsl-ppc/conf/machine/p3041ds.conf b/meta-fsl-ppc/conf/machine/p3041ds.conf index e4569aa7..bf036490 100644 --- a/meta-fsl-ppc/conf/machine/p3041ds.conf +++ b/meta-fsl-ppc/conf/machine/p3041ds.conf @@ -2,7 +2,9 @@ #@DESCRIPTION: Machine configuration for running require e500mc.inc +require conf/machine/include/soc-family.inc +SOC_FAMILY = "p3041" UBOOT_MACHINES ?= "P3041DS P3041DS_NAND P3041DS_SECURE_BOOT P3041DS_SDCARD P3041DS_SPIFLASH" KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p3041ds.dts \ ${S}/arch/powerpc/boot/dts/p3041ds-usdpaa.dts" diff --git a/meta-fsl-ppc/conf/machine/p4080ds.conf b/meta-fsl-ppc/conf/machine/p4080ds.conf index 00a4e845..332a39f4 100644 --- a/meta-fsl-ppc/conf/machine/p4080ds.conf +++ b/meta-fsl-ppc/conf/machine/p4080ds.conf @@ -2,7 +2,9 @@ #@DESCRIPTION: Machine configuration for running require e500mc.inc +require conf/machine/include/soc-family.inc +SOC_FAMILY = "p4080" UBOOT_MACHINES ?= "P4080DS P4080DS_SECURE_BOOT P4080DS_SDCARD P4080DS_SPIFLASH " KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p4080ds.dts \ ${S}/arch/powerpc/boot/dts/p4080ds-usdpaa.dts" diff --git a/meta-fsl-ppc/conf/machine/p5020ds-64b.conf b/meta-fsl-ppc/conf/machine/p5020ds-64b.conf index 72730970..75be7fdb 100644 --- a/meta-fsl-ppc/conf/machine/p5020ds-64b.conf +++ b/meta-fsl-ppc/conf/machine/p5020ds-64b.conf @@ -2,7 +2,9 @@ #@DESCRIPTION: Machine configuration for running require e5500-64b.inc +require conf/machine/include/soc-family.inc +SOC_FAMILY = "p5020" # TODO: fix 32bit build of u-boot for p5020ds-64b UBOOT_MACHINES ?= "P5020DS" KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p5020ds.dts \ diff --git a/meta-fsl-ppc/conf/machine/p5020ds.conf b/meta-fsl-ppc/conf/machine/p5020ds.conf index eb1d73da..06b4f7cc 100644 --- a/meta-fsl-ppc/conf/machine/p5020ds.conf +++ b/meta-fsl-ppc/conf/machine/p5020ds.conf @@ -2,7 +2,9 @@ #@DESCRIPTION: Machine configuration for running require e5500.inc +require conf/machine/include/soc-family.inc +SOC_FAMILY = "p5020" UBOOT_MACHINES ?= "P5020DS P5020DS_NAND P5020DS_SECURE_BOOT P5020DS_SDCARD P5020DS_SPIFLASH " KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p5020ds.dts \ ${S}/arch/powerpc/boot/dts/p5020ds-usdpaa.dts" diff --git a/meta-fsl-ppc/conf/machine/p5040ds-64b.conf b/meta-fsl-ppc/conf/machine/p5040ds-64b.conf index 07ed3b2c..68a5a32b 100644 --- a/meta-fsl-ppc/conf/machine/p5040ds-64b.conf +++ b/meta-fsl-ppc/conf/machine/p5040ds-64b.conf @@ -2,7 +2,9 @@ #@DESCRIPTION: Machine configuration for running require e5500-64b.inc +require conf/machine/include/soc-family.inc +SOC_FAMILY = "p5040" UBOOT_MACHINES ?= "P5040DS P5040DS_NAND P5040DS_SECURE_BOOT P5040DS_SDCARD P5040DS_SPIFLASH" KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p5040ds.dts \ ${S}/arch/powerpc/boot/dts/p5040ds-usdpaa.dts" diff --git a/meta-fsl-ppc/conf/machine/p5040ds.conf b/meta-fsl-ppc/conf/machine/p5040ds.conf index bda7facd..e1db0693 100644 --- a/meta-fsl-ppc/conf/machine/p5040ds.conf +++ b/meta-fsl-ppc/conf/machine/p5040ds.conf @@ -2,7 +2,9 @@ #@DESCRIPTION: Machine configuration for running require e5500.inc +require conf/machine/include/soc-family.inc +SOC_FAMILY = "p5040" UBOOT_MACHINES ?= "P5040DS P5040DS_NAND P5040DS_SECURE_BOOT P5040DS_SDCARD P5040DS_SPIFLASH" KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p5040ds.dts \ ${S}/arch/powerpc/boot/dts/p5040ds-usdpaa.dts" diff --git a/meta-fsl-ppc/conf/machine/t4160qds-64b.conf b/meta-fsl-ppc/conf/machine/t4160qds-64b.conf index aa186d4e..eceb0658 100644 --- a/meta-fsl-ppc/conf/machine/t4160qds-64b.conf +++ b/meta-fsl-ppc/conf/machine/t4160qds-64b.conf @@ -2,7 +2,9 @@ #@DESCRIPTION: Machine configuration for running T4160QDS in 64-bit mode require e6500-64b.inc +require conf/machine/include/soc-family.inc +SOC_FAMILY = "t4160" # TODO: fix 32bit build of u-boot UBOOT_MACHINES ?= "T4160QDS" KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/t4240qds.dts \ diff --git a/meta-fsl-ppc/conf/machine/t4160qds.conf b/meta-fsl-ppc/conf/machine/t4160qds.conf index a8d6a7e4..4ae03bcd 100644 --- a/meta-fsl-ppc/conf/machine/t4160qds.conf +++ b/meta-fsl-ppc/conf/machine/t4160qds.conf @@ -2,7 +2,9 @@ #@DESCRIPTION: Machine configuration for running T4160QDS in 32-bit mode require e6500.inc +require conf/machine/include/soc-family.inc +SOC_FAMILY = "t4160" UBOOT_MACHINES ?= "T4160QDS" KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/t4240qds.dts \ ${S}/arch/powerpc/boot/dts/t4240qds-usdpaa.dts" diff --git a/meta-fsl-ppc/conf/machine/t4240qds-64b.conf b/meta-fsl-ppc/conf/machine/t4240qds-64b.conf index 7063f9e2..8aae5288 100644 --- a/meta-fsl-ppc/conf/machine/t4240qds-64b.conf +++ b/meta-fsl-ppc/conf/machine/t4240qds-64b.conf @@ -2,7 +2,9 @@ #@DESCRIPTION: Machine configuration for running T4240QDS in 64-bit mode require e6500-64b.inc +require conf/machine/include/soc-family.inc +SOC_FAMILY = "t4240" # TODO: fix 32bit build of u-boot UBOOT_MACHINES ?= "T4240QDS" KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/t4240qds.dts \ diff --git a/meta-fsl-ppc/conf/machine/t4240qds.conf b/meta-fsl-ppc/conf/machine/t4240qds.conf index 9cb3f82d..4aa36a20 100644 --- a/meta-fsl-ppc/conf/machine/t4240qds.conf +++ b/meta-fsl-ppc/conf/machine/t4240qds.conf @@ -2,7 +2,9 @@ #@DESCRIPTION: Machine configuration for running T4240QDS in 32-bit mode require e6500.inc +require conf/machine/include/soc-family.inc +SOC_FAMILY = "t4240" UBOOT_MACHINES ?= "T4240QDS" KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/t4240qds.dts \ ${S}/arch/powerpc/boot/dts/t4240qds-usdpaa.dts" -- cgit v1.2.3-54-g00ecf From ee095aaa7514d19912a3533cb96d3f19ce13398d Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Fri, 1 Mar 2013 09:43:52 +0000 Subject: Remove DSTRO string from PR due to meta-fsl-ppc is not distro specific conf/distro/fsl.conf has been removed from this layer, meta-fsl-ppc is not distro specific. use PRINC := "${@int(PRINC) + 1}" Signed-off-by: Zhenhua Luo --- .../recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-fsl-ppc/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend b/meta-fsl-ppc/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend index 0291bb71..7ae4ec29 100644 --- a/meta-fsl-ppc/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend +++ b/meta-fsl-ppc/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend @@ -1,3 +1,3 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" -PR .= "+${DISTRO}" +PRINC := "${@int(PRINC) + 1}" -- cgit v1.2.3-54-g00ecf From 1f59a5f652ff240c6cfdf1098f456185e094537a Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Fri, 1 Mar 2013 06:14:32 +0000 Subject: Revert "Remove recipes-append folder which are SDK specific" This reverts commit ee364575803812dbbb2b103d468c66c54efcc7af. The intention of the patch is to remove the confusion commit(mismatched title and change). Signed-off-by: Zhenhua Luo --- meta-fsl-ppc/images/fsl-image-lsb-sdk.bb | 18 ++++++++++++++++++ meta-fsl-ppc/images/fsl-image-minimal.bb | 16 ++++++++++++++++ meta-fsl-ppc/images/fsl-toolchain-bare.bb | 8 ++++++++ meta-fsl-ppc/images/fsl-toolchain.bb | 19 +++++++++++++++++++ 4 files changed, 61 insertions(+) create mode 100644 meta-fsl-ppc/images/fsl-image-lsb-sdk.bb create mode 100644 meta-fsl-ppc/images/fsl-image-minimal.bb create mode 100644 meta-fsl-ppc/images/fsl-toolchain-bare.bb create mode 100644 meta-fsl-ppc/images/fsl-toolchain.bb diff --git a/meta-fsl-ppc/images/fsl-image-lsb-sdk.bb b/meta-fsl-ppc/images/fsl-image-lsb-sdk.bb new file mode 100644 index 00000000..1ba38d3f --- /dev/null +++ b/meta-fsl-ppc/images/fsl-image-lsb-sdk.bb @@ -0,0 +1,18 @@ +IMAGE_FEATURES += "tools-sdk dev-pkgs ssh-server-openssh" +EXTRA_IMAGE_FEATURES = "tools-debug tools-profile tools-testapps debug-tweaks" + +IMAGE_INSTALL = "\ + ${CORE_IMAGE_BASE_INSTALL} \ + packagegroup-core-basic \ + packagegroup-core-lsb \ + git \ + dtc \ + flex \ + bison \ + ccache \ + u-boot \ + " + +inherit core-image + +IMAGE_FSTYPES = "tar.gz" diff --git a/meta-fsl-ppc/images/fsl-image-minimal.bb b/meta-fsl-ppc/images/fsl-image-minimal.bb new file mode 100644 index 00000000..17325851 --- /dev/null +++ b/meta-fsl-ppc/images/fsl-image-minimal.bb @@ -0,0 +1,16 @@ +# +# Copyright (C) 2007 OpenedHand Ltd. +# +IMAGE_INSTALL = "packagegroup-core-boot ${ROOTFS_PKGMANAGE_BOOTSTRAP} u-boot" +IMAGE_LINGUAS = " " + +LICENSE = "MIT" + +inherit core-image + +IMAGE_ROOTFS_SIZE = "8192" + +# remove not needed ipkg informations +ROOTFS_POSTPROCESS_COMMAND += "remove_packaging_data_files ; " + +IMAGE_FSTYPES = "tar.gz ext2.gz.u-boot jffs2" diff --git a/meta-fsl-ppc/images/fsl-toolchain-bare.bb b/meta-fsl-ppc/images/fsl-toolchain-bare.bb new file mode 100644 index 00000000..74a3c4a9 --- /dev/null +++ b/meta-fsl-ppc/images/fsl-toolchain-bare.bb @@ -0,0 +1,8 @@ +PR = "r3" + +require recipes-core/meta/meta-toolchain.bb + +TOOLCHAIN_OUTPUTNAME = "${SDK_NAME}-toolchain-bare-${DISTRO_VERSION}" +TOOLCHAIN_TARGET_TASK = "packagegroup-core-standalone-sdk-target" +TOOLCHAIN_HOST_TASK = "packagegroup-cross-canadian-${TRANSLATED_TARGET_ARCH}" +TOOLCHAIN_NEED_CONFIGSITE_CACHE += "zlib" diff --git a/meta-fsl-ppc/images/fsl-toolchain.bb b/meta-fsl-ppc/images/fsl-toolchain.bb new file mode 100644 index 00000000..696681c1 --- /dev/null +++ b/meta-fsl-ppc/images/fsl-toolchain.bb @@ -0,0 +1,19 @@ +PR = "r2" + +require fsl-toolchain-bare.bb + +TOOLCHAIN_OUTPUTNAME = "${SDK_NAME}-toolchain-${DISTRO_VERSION}" +TOOLCHAIN_TARGET_TASK += " \ + glib-2.0 \ + glib-2.0-dev \ + dtc \ + libgomp \ + libgomp-dev \ + libgomp-staticdev \ + libstdc++-staticdev \ + ${TCLIBC}-staticdev \ + " + +TOOLCHAIN_HOST_TASK += " \ + nativesdk-dtc \ + " -- cgit v1.2.3-54-g00ecf From e8642ecdcf4a064ed41292cdac6a59880c45f44e Mon Sep 17 00:00:00 2001 From: Chunrong Guo Date: Thu, 28 Feb 2013 08:54:13 +0000 Subject: remove images folder the customized rootfs images is specific to fsl networking SDK, move them from this layer to meta-fsl-networking layer Signed-off-by: Chunrong Guo Signed-off-by: Zhenhua Luo Acked-by: Otavio Salvador --- meta-fsl-ppc/images/fsl-image-lsb-sdk.bb | 18 ------------------ meta-fsl-ppc/images/fsl-image-minimal.bb | 16 ---------------- meta-fsl-ppc/images/fsl-toolchain-bare.bb | 8 -------- meta-fsl-ppc/images/fsl-toolchain.bb | 19 ------------------- 4 files changed, 61 deletions(-) delete mode 100644 meta-fsl-ppc/images/fsl-image-lsb-sdk.bb delete mode 100644 meta-fsl-ppc/images/fsl-image-minimal.bb delete mode 100644 meta-fsl-ppc/images/fsl-toolchain-bare.bb delete mode 100644 meta-fsl-ppc/images/fsl-toolchain.bb diff --git a/meta-fsl-ppc/images/fsl-image-lsb-sdk.bb b/meta-fsl-ppc/images/fsl-image-lsb-sdk.bb deleted file mode 100644 index 1ba38d3f..00000000 --- a/meta-fsl-ppc/images/fsl-image-lsb-sdk.bb +++ /dev/null @@ -1,18 +0,0 @@ -IMAGE_FEATURES += "tools-sdk dev-pkgs ssh-server-openssh" -EXTRA_IMAGE_FEATURES = "tools-debug tools-profile tools-testapps debug-tweaks" - -IMAGE_INSTALL = "\ - ${CORE_IMAGE_BASE_INSTALL} \ - packagegroup-core-basic \ - packagegroup-core-lsb \ - git \ - dtc \ - flex \ - bison \ - ccache \ - u-boot \ - " - -inherit core-image - -IMAGE_FSTYPES = "tar.gz" diff --git a/meta-fsl-ppc/images/fsl-image-minimal.bb b/meta-fsl-ppc/images/fsl-image-minimal.bb deleted file mode 100644 index 17325851..00000000 --- a/meta-fsl-ppc/images/fsl-image-minimal.bb +++ /dev/null @@ -1,16 +0,0 @@ -# -# Copyright (C) 2007 OpenedHand Ltd. -# -IMAGE_INSTALL = "packagegroup-core-boot ${ROOTFS_PKGMANAGE_BOOTSTRAP} u-boot" -IMAGE_LINGUAS = " " - -LICENSE = "MIT" - -inherit core-image - -IMAGE_ROOTFS_SIZE = "8192" - -# remove not needed ipkg informations -ROOTFS_POSTPROCESS_COMMAND += "remove_packaging_data_files ; " - -IMAGE_FSTYPES = "tar.gz ext2.gz.u-boot jffs2" diff --git a/meta-fsl-ppc/images/fsl-toolchain-bare.bb b/meta-fsl-ppc/images/fsl-toolchain-bare.bb deleted file mode 100644 index 74a3c4a9..00000000 --- a/meta-fsl-ppc/images/fsl-toolchain-bare.bb +++ /dev/null @@ -1,8 +0,0 @@ -PR = "r3" - -require recipes-core/meta/meta-toolchain.bb - -TOOLCHAIN_OUTPUTNAME = "${SDK_NAME}-toolchain-bare-${DISTRO_VERSION}" -TOOLCHAIN_TARGET_TASK = "packagegroup-core-standalone-sdk-target" -TOOLCHAIN_HOST_TASK = "packagegroup-cross-canadian-${TRANSLATED_TARGET_ARCH}" -TOOLCHAIN_NEED_CONFIGSITE_CACHE += "zlib" diff --git a/meta-fsl-ppc/images/fsl-toolchain.bb b/meta-fsl-ppc/images/fsl-toolchain.bb deleted file mode 100644 index 696681c1..00000000 --- a/meta-fsl-ppc/images/fsl-toolchain.bb +++ /dev/null @@ -1,19 +0,0 @@ -PR = "r2" - -require fsl-toolchain-bare.bb - -TOOLCHAIN_OUTPUTNAME = "${SDK_NAME}-toolchain-${DISTRO_VERSION}" -TOOLCHAIN_TARGET_TASK += " \ - glib-2.0 \ - glib-2.0-dev \ - dtc \ - libgomp \ - libgomp-dev \ - libgomp-staticdev \ - libstdc++-staticdev \ - ${TCLIBC}-staticdev \ - " - -TOOLCHAIN_HOST_TASK += " \ - nativesdk-dtc \ - " -- cgit v1.2.3-54-g00ecf From 657143a96717defe421a052e913069835be0107d Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Fri, 8 Mar 2013 15:28:28 +0000 Subject: remove lm_sensor as it is already in meta-oe Signed-off-by: Ting Liu --- .../lm_sensors/lmsensors-apps_3.3.2.bb | 50 ---------------------- 1 file changed, 50 deletions(-) delete mode 100644 meta-fsl-ppc/recipes-extended/lm_sensors/lmsensors-apps_3.3.2.bb diff --git a/meta-fsl-ppc/recipes-extended/lm_sensors/lmsensors-apps_3.3.2.bb b/meta-fsl-ppc/recipes-extended/lm_sensors/lmsensors-apps_3.3.2.bb deleted file mode 100644 index 62da8146..00000000 --- a/meta-fsl-ppc/recipes-extended/lm_sensors/lmsensors-apps_3.3.2.bb +++ /dev/null @@ -1,50 +0,0 @@ -SUMMARY = "A hardware health monitoring package for Linux" -DESCRIPTION = "Lm-sensors is a hardware health monitoring package for Linux. \ - It allows you to access information from temperature, voltage, \ - and fan speed sensors." -HOMEPAGE = "http://www.lm-sensors.org/" -DEPENDS = "sysfsutils virtual/libiconv \ - bison-native flex-native" -LICENSE = "GPLv2 & LGPLv2.1" -LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \ - file://COPYING.LGPL;md5=4fbd65380cdd255951079008b364516c" - -PR = "r2" -PACKAGE_ARCH = "${MACHINE_ARCH}" - -SRC_URI = "http://dl.lm-sensors.org/lm-sensors/releases/lm_sensors-${PV}.tar.bz2" - -SRC_URI[md5sum] = "f357ba00b080ab102a170f7bf8bb2578" -SRC_URI[sha256sum] = "f13dd885406841a7352ccfb8b9ccb23c4c057abe3de4258da5444c149a9e3ae1" - -S = "${WORKDIR}/lm_sensors-${PV}" - -EXTRA_OEMAKE = 'LINUX=${STAGING_KERNEL_DIR} EXLDFLAGS="${LDFLAGS}" \ - MACHINE=${TARGET_ARCH} PREFIX=${prefix} CC="${CC}" \ - AR="${AR}" MANDIR=${mandir}' - -do_compile() { - oe_runmake user PROG_EXTRA=sensors -} - -do_install() { - oe_runmake user_install DESTDIR=${D} -} - -PACKAGES =+ "libsensors libsensors-dev libsensors-staticdev libsensors-dbg libsensors-doc" -PACKAGES =+ "lmsensors-sensors lmsensors-sensors-dbg lmsensors-sensors-doc" -PACKAGES =+ "lmsensors-scripts" - -FILES_lmsensors-scripts = "${bindir}/*.pl ${bindir}/ddcmon ${sbindir}/fancontrol* ${sbindir}/pwmconfig ${sbindir}/sensors-detect" -RDEPENDS_lmsensors-scripts += "lmsensors-sensors perl bash" -RDEPENDS_lmsensors-apps += "perl-module-strict perl-module-vars perl-module-warnings-register perl-module-warnings" -RDEPENDS_lmsensors-scripts += "perl-module-fcntl perl-module-exporter perl-module-xsloader perl-module-exporter-heavy perl-module-file-basename perl-module-constant" - -FILES_lmsensors-sensors = "${bindir}/sensors ${sysconfdir}" -FILES_lmsensors-sensors-dbg += "${bindir}/.debug/sensors" -FILES_lmsensors-sensors-doc = "${mandir}/man1 ${mandir}/man5" -FILES_libsensors = "${libdir}/libsensors.so.*" -FILES_libsensors-dbg += "${libdir}/.debug" -FILES_libsensors-dev = "${libdir}/libsensors.so ${includedir}" -FILES_libsensors-staticdev = "${libdir}/libsensors.a" -FILES_libsensors-doc = "${mandir}/man3" -- cgit v1.2.3-54-g00ecf From 6b607b728bdad4126b9af9fe62178b42fb77e555 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Fri, 8 Mar 2013 15:28:29 +0000 Subject: qemu: configure properly check if -lrt is needed -lrt is needed to avoid the error "undefined reference to `timer_settime'". add the check in configure. Backport from http://git.qemu.org/?p=qemu.git commit: 8bacde8d86a09699207d85d4bab06162aed18dc4 Fix the below build issue: | ../qemu-timer.o: In function `dynticks_rearm_timer': | .../qemu/1.0+fsl-r2/git/qemu-timer.c:597: undefined reference to `timer_gettime' | .../qemu/1.0+fsl-r2/git/qemu-timer.c:610: undefined reference to `timer_settime' | ../qemu-timer.o: In function `dynticks_stop_timer': | .../qemu/1.0+fsl-r2/git/qemu-timer.c:583: undefined reference to `timer_delete' | ../qemu-timer.o: In function `dynticks_start_timer': | .../qemu/1.0+fsl-r2/git/qemu-timer.c:565: undefined reference to `timer_create' | ivshmem.o: In function `pci_ivshmem_init': | .../qemu/1.0+fsl-r2/git/hw/ivshmem.c:720: undefined reference to `shm_open' | .../qemu/1.0+fsl-r2/git/hw/ivshmem.c:727: undefined reference to `shm_open' | collect2: error: ld returned 1 exit status | make[1]: *** [qemu-system-ppc] Error 1 | make: *** [subdir-ppc-softmmu] Error 2 | ERROR: oe_runmake failed | ERROR: Function failed: do_compile Yocto 1.4_M4 uses qemu 1.3.1 which includes this fix. So this issue only appeared to us. Signed-off-by: Ting Liu --- ...configure-properly-check-if-lrt-is-needed.patch | 43 ++++++++++++++++++++++ meta-fsl-ppc/recipes-devtools/qemu/qemu_1.0.bb | 6 ++- 2 files changed, 47 insertions(+), 2 deletions(-) create mode 100644 meta-fsl-ppc/recipes-devtools/qemu/files/0001-configure-properly-check-if-lrt-is-needed.patch diff --git a/meta-fsl-ppc/recipes-devtools/qemu/files/0001-configure-properly-check-if-lrt-is-needed.patch b/meta-fsl-ppc/recipes-devtools/qemu/files/0001-configure-properly-check-if-lrt-is-needed.patch new file mode 100644 index 00000000..d74ddb9d --- /dev/null +++ b/meta-fsl-ppc/recipes-devtools/qemu/files/0001-configure-properly-check-if-lrt-is-needed.patch @@ -0,0 +1,43 @@ +From e5906138d8042817cc3b49872dd181c66a11abdf Mon Sep 17 00:00:00 2001 +From: Ting Liu +Date: Wed, 6 Mar 2013 01:56:35 -0600 +Subject: [PATCH] configure: properly check if -lrt is needed + +Upstream-Status: Backport +commit 8bacde8d86a09699207d85d4bab06162aed18dc4 + +Signed-off-by: Natanael Copa +Signed-off-by: Blue Swirl +Signed-off-by: Ting Liu +--- + configure | 9 +++++++-- + 1 file changed, 7 insertions(+), 2 deletions(-) + +diff --git a/configure b/configure +index 999375a..29b3e30 100755 +--- a/configure ++++ b/configure +@@ -2444,13 +2444,18 @@ fi + cat > $TMPC < + #include +-int main(void) { clockid_t id; return clock_gettime(id, NULL); } ++int main(void) { ++ timer_create(CLOCK_REALTIME, NULL, NULL); ++ return clock_gettime(CLOCK_REALTIME, NULL); ++} + EOF + + if compile_prog "" "" ; then + : +-elif compile_prog "" "-lrt" ; then ++# we need pthread for static linking. use previous pthread test result ++elif compile_prog "" "-lrt $pthread_lib" ; then + LIBS="-lrt $LIBS" ++ libs_qga="-lrt $libs_qga" + fi + + if test "$darwin" != "yes" -a "$mingw32" != "yes" -a "$solaris" != yes -a \ +-- +1.7.9.7 + diff --git a/meta-fsl-ppc/recipes-devtools/qemu/qemu_1.0.bb b/meta-fsl-ppc/recipes-devtools/qemu/qemu_1.0.bb index ff4afde3..19efd9f2 100644 --- a/meta-fsl-ppc/recipes-devtools/qemu/qemu_1.0.bb +++ b/meta-fsl-ppc/recipes-devtools/qemu/qemu_1.0.bb @@ -5,11 +5,13 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \ # This means v1.0 with FSL specific patches applied PV = "1.0+fsl" -PR = "r2" +PR = "r3" DEPENDS += "dtc" -SRC_URI = "git://git.freescale.com/ppc/sdk/qemu.git" +SRC_URI = "git://git.freescale.com/ppc/sdk/qemu.git \ + file://0001-configure-properly-check-if-lrt-is-needed.patch \ +" SRCREV = "7feabd47a814214dc4bebfd97d0eaf30dc50a68f" S = "${WORKDIR}/git" -- cgit v1.2.3-54-g00ecf From a2afcbce2ef6ba07397a0be4f99705df99af2f4e Mon Sep 17 00:00:00 2001 From: Chunrong Guo Date: Fri, 8 Mar 2013 15:28:30 +0000 Subject: lio-utils: add tcm_start.sh and lio_start.sh to rootfs *following scripts had been added /etc/init.d/target /etc/target/tcm_start.sh /etc/target/lio_start.sh Signed-off-by: Chunrong Guo --- meta-fsl-ppc/recipes-tools/lio-utils/lio-utils_4.0.bb | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/meta-fsl-ppc/recipes-tools/lio-utils/lio-utils_4.0.bb b/meta-fsl-ppc/recipes-tools/lio-utils/lio-utils_4.0.bb index 31aa4fa0..98101b3b 100644 --- a/meta-fsl-ppc/recipes-tools/lio-utils/lio-utils_4.0.bb +++ b/meta-fsl-ppc/recipes-tools/lio-utils/lio-utils_4.0.bb @@ -4,7 +4,7 @@ HOMEPAGE = "http://linux-iscsi.org/index.php/Lio-utils" LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://debian/copyright;md5=c3ea231a32635cbb5debedf3e88aa3df" -PR = "r1" +PR = "r2" SRC_URI = "git://risingtidesystems.com/lio-utils.git;protocal=git \ file://lio-utils-install-more-modules.patch " @@ -46,13 +46,16 @@ do_install() { if test -d ${S}/tools; then oe_runmake install fi - + + install -d ${D}/etc/target/ install -d ${D}/etc/init.d/ install -m 755 ${S}/scripts/rc.target ${D}/etc/init.d/ + install -m 755 ${S}/conf/tcm_start.default ${D}/etc/target/tcm_start.sh + install -m 755 ${S}/conf/lio_start.default ${D}/etc/target/lio_start.sh } RDEPENDS_${PN} += "python-stringold python-subprocess python-shell \ python-datetime python-textutils python-crypt python-netclient python-email" -FILES_${PN} += "${sbindir}/* /etc/init.d/*" +FILES_${PN} += "${sbindir}/* /etc/init.d/* /etc/target/*" -- cgit v1.2.3-54-g00ecf From f953fb939318ecaf34fca102cb4caee9c0a1c2bc Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Fri, 8 Mar 2013 15:28:31 +0000 Subject: sysvinit: remove SDK specific bits This is fsl SDK specific, and was recommended to go to SDK layer: http://patches.openembedded.org/patch/34623/ Signed-off-by: Ting Liu --- .../sysvinit/files/auto-detect-hostname.patch | 16 ---------------- .../recipes-append/sysvinit/sysvinit_2.88dsf.bbappend | 5 +---- 2 files changed, 1 insertion(+), 20 deletions(-) delete mode 100644 meta-fsl-ppc/recipes-append/sysvinit/files/auto-detect-hostname.patch diff --git a/meta-fsl-ppc/recipes-append/sysvinit/files/auto-detect-hostname.patch b/meta-fsl-ppc/recipes-append/sysvinit/files/auto-detect-hostname.patch deleted file mode 100644 index da70184c..00000000 --- a/meta-fsl-ppc/recipes-append/sysvinit/files/auto-detect-hostname.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff --git a/rcS b/rcS -index 080b04f..51425ff 100755 ---- a/rcS -+++ b/rcS -@@ -22,6 +22,11 @@ export PATH runlevel prevlevel - . /etc/default/rcS - - # -+# Update the hostname according to actual board type -+# -+echo `cat /proc/cpuinfo | grep model | cut -d "," -f 2 | tr "[A-Z]" "[a-z]"` > /etc/hostname -+ -+# - # Trap CTRL-C &c only in this shell so we can interrupt subprocesses. - # - trap ":" INT QUIT TSTP diff --git a/meta-fsl-ppc/recipes-append/sysvinit/sysvinit_2.88dsf.bbappend b/meta-fsl-ppc/recipes-append/sysvinit/sysvinit_2.88dsf.bbappend index 9c9dc75a..8445337a 100644 --- a/meta-fsl-ppc/recipes-append/sysvinit/sysvinit_2.88dsf.bbappend +++ b/meta-fsl-ppc/recipes-append/sysvinit/sysvinit_2.88dsf.bbappend @@ -1,5 +1,2 @@ -FILESEXTRAPATHS_prepend_fsl := "${THISDIR}/files:" +PRINC := "${@int(PRINC) + 1}" -PR_fsl .= "+${DISTRO}.1" - -SRC_URI_append_fsl = " file://auto-detect-hostname.patch;patchdir=../" -- cgit v1.2.3-54-g00ecf From 3872f21327a2ae8736795052145da2f25d86d028 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Fri, 8 Mar 2013 15:28:32 +0000 Subject: procps: remove customized sysctl.conf which is SDK specific It was added to disable rp_filter to enhance ASF IP forward performance, which is really fsl SDK specific. Signed-off-by: Ting Liu --- .../recipes-append/procps/files/sysctl.conf | 64 ---------------------- .../recipes-append/procps/procps_3.2.8.bbappend | 3 +- 2 files changed, 1 insertion(+), 66 deletions(-) delete mode 100644 meta-fsl-ppc/recipes-append/procps/files/sysctl.conf diff --git a/meta-fsl-ppc/recipes-append/procps/files/sysctl.conf b/meta-fsl-ppc/recipes-append/procps/files/sysctl.conf deleted file mode 100644 index 6148472c..00000000 --- a/meta-fsl-ppc/recipes-append/procps/files/sysctl.conf +++ /dev/null @@ -1,64 +0,0 @@ -# This configuration file is taken from Debian. -# -# /etc/sysctl.conf - Configuration file for setting system variables -# See sysctl.conf (5) for information. -# - -#kernel.domainname = example.com - -# Uncomment the following to stop low-level messages on console -#kernel.printk = 4 4 1 7 - -##############################################################3 -# Functions previously found in netbase -# - -# Uncomment the next two lines to enable Spoof protection (reverse-path filter) -# Turn on Source Address Verification in all interfaces to -# prevent some spoofing attacks -net.ipv4.conf.default.rp_filter=0 -net.ipv4.conf.all.rp_filter=0 - -# Uncomment the next line to enable TCP/IP SYN cookies -#net.ipv4.tcp_syncookies=1 - -# Uncomment the next line to enable packet forwarding for IPv4 -#net.ipv4.ip_forward=1 - -# Uncomment the next line to enable packet forwarding for IPv6 -#net.ipv6.conf.all.forwarding=1 - - -################################################################### -# Additional settings - these settings can improve the network -# security of the host and prevent against some network attacks -# including spoofing attacks and man in the middle attacks through -# redirection. Some network environments, however, require that these -# settings are disabled so review and enable them as needed. -# -# Ignore ICMP broadcasts -#net.ipv4.icmp_echo_ignore_broadcasts = 1 -# -# Ignore bogus ICMP errors -#net.ipv4.icmp_ignore_bogus_error_responses = 1 -# -# Do not accept ICMP redirects (prevent MITM attacks) -#net.ipv4.conf.all.accept_redirects = 0 -#net.ipv6.conf.all.accept_redirects = 0 -# _or_ -# Accept ICMP redirects only for gateways listed in our default -# gateway list (enabled by default) -# net.ipv4.conf.all.secure_redirects = 1 -# -# Do not send ICMP redirects (we are not a router) -#net.ipv4.conf.all.send_redirects = 0 -# -# Do not accept IP source route packets (we are not a router) -#net.ipv4.conf.all.accept_source_route = 0 -#net.ipv6.conf.all.accept_source_route = 0 -# -# Log Martian Packets -#net.ipv4.conf.all.log_martians = 1 -# - -#kernel.shmmax = 141762560 diff --git a/meta-fsl-ppc/recipes-append/procps/procps_3.2.8.bbappend b/meta-fsl-ppc/recipes-append/procps/procps_3.2.8.bbappend index f5d4fd16..8445337a 100644 --- a/meta-fsl-ppc/recipes-append/procps/procps_3.2.8.bbappend +++ b/meta-fsl-ppc/recipes-append/procps/procps_3.2.8.bbappend @@ -1,3 +1,2 @@ -PR_fsl .= "+${DISTRO}.0" +PRINC := "${@int(PRINC) + 1}" -FILESEXTRAPATHS_prepend_fsl := "${THISDIR}/files:" -- cgit v1.2.3-54-g00ecf From e8973acd3a4fd93315707e4673c4428d8ab31260 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Sat, 9 Mar 2013 15:32:01 +0000 Subject: udev-extraconf: move rules from udev and netbase Signed-off-by: Ting Liu --- .../files/71-fsl-dpaa-persistent-networking.rules | 17 --------- .../recipes-append/netbase/netbase_5.0.bbappend | 10 +----- meta-fsl-ppc/recipes-append/udev/files/local.rules | 42 ---------------------- meta-fsl-ppc/recipes-append/udev/udev_182.bbappend | 3 +- .../71-fsl-dpaa-persistent-networking.rules | 17 +++++++++ .../recipes-core/udev/udev-extraconf/local.rules | 42 ++++++++++++++++++++++ .../recipes-core/udev/udev-extraconf_1.0.bbappend | 11 ++++++ 7 files changed, 72 insertions(+), 70 deletions(-) delete mode 100644 meta-fsl-ppc/recipes-append/netbase/files/71-fsl-dpaa-persistent-networking.rules delete mode 100644 meta-fsl-ppc/recipes-append/udev/files/local.rules create mode 100644 meta-fsl-ppc/recipes-core/udev/udev-extraconf/71-fsl-dpaa-persistent-networking.rules create mode 100644 meta-fsl-ppc/recipes-core/udev/udev-extraconf/local.rules create mode 100644 meta-fsl-ppc/recipes-core/udev/udev-extraconf_1.0.bbappend diff --git a/meta-fsl-ppc/recipes-append/netbase/files/71-fsl-dpaa-persistent-networking.rules b/meta-fsl-ppc/recipes-append/netbase/files/71-fsl-dpaa-persistent-networking.rules deleted file mode 100644 index 356c172f..00000000 --- a/meta-fsl-ppc/recipes-append/netbase/files/71-fsl-dpaa-persistent-networking.rules +++ /dev/null @@ -1,17 +0,0 @@ -# Rules for handling naming the DPAA FMan ethernet ports in a consistent way -SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe4e0000", NAME="fm1-gb0" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe4e2000", NAME="fm1-gb1" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe4e4000", NAME="fm1-gb2" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe4e6000", NAME="fm1-gb3" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe4e8000", NAME="fm1-gb4" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe4f0000", NAME="fm1-10g" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe5e0000", NAME="fm2-gb0" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe5e2000", NAME="fm2-gb1" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe5e4000", NAME="fm2-gb2" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe5e6000", NAME="fm2-gb3" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe5e8000", NAME="fm2-gb4" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe5f0000", NAME="fm2-10g" - -# P1023 has its Fman @ different offsets -SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ff7e0000", NAME="fm1-gb0" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ff7e2000", NAME="fm1-gb1" diff --git a/meta-fsl-ppc/recipes-append/netbase/netbase_5.0.bbappend b/meta-fsl-ppc/recipes-append/netbase/netbase_5.0.bbappend index dc0fd0a6..8445337a 100644 --- a/meta-fsl-ppc/recipes-append/netbase/netbase_5.0.bbappend +++ b/meta-fsl-ppc/recipes-append/netbase/netbase_5.0.bbappend @@ -1,10 +1,2 @@ -FILESEXTRAPATHS_prepend_fsl := "${THISDIR}/files:" +PRINC := "${@int(PRINC) + 1}" -SRC_URI_append_fsl += "file://71-fsl-dpaa-persistent-networking.rules" - -do_install_append_fsl () { - install -d ${D}${sysconfdir}/udev/rules.d/ - install -m 0644 ${WORKDIR}/71-fsl-dpaa-persistent-networking.rules ${D}${sysconfdir}/udev/rules.d -} - -PR_fsl .= "+${DISTRO}" diff --git a/meta-fsl-ppc/recipes-append/udev/files/local.rules b/meta-fsl-ppc/recipes-append/udev/files/local.rules deleted file mode 100644 index 43034b83..00000000 --- a/meta-fsl-ppc/recipes-append/udev/files/local.rules +++ /dev/null @@ -1,42 +0,0 @@ -# There are a number of modifiers that are allowed to be used in some -# of the different fields. They provide the following subsitutions: -# -# %n the "kernel number" of the device. -# For example, 'sda3' has a "kernel number" of '3' -# %e the smallest number for that name which does not matches an existing node -# %k the kernel name for the device -# %M the kernel major number for the device -# %m the kernel minor number for the device -# %b the bus id for the device -# %c the string returned by the PROGRAM -# %s{filename} the content of a sysfs attribute -# %% the '%' char itself -# - -KERNEL=="nbd*", GOTO="persistent_storage_end" - -SUBSYSTEM=="block", ENV{DEVTYPE}=="partition", GOTO="nomountblock" - -# Media automounting -SUBSYSTEM=="block", ACTION=="add" RUN+="/etc/udev/scripts/mount.sh" -SUBSYSTEM=="block", ACTION=="remove" RUN+="/etc/udev/scripts/mount.sh" - -# Handle network interface setup -SUBSYSTEM=="net", ACTION=="add" RUN+="/etc/udev/scripts/network.sh" -SUBSYSTEM=="net", ACTION=="remove" RUN+="/etc/udev/scripts/network.sh" - -# The first framebuffer is symlinked to /dev/fb -KERNEL=="fb0", SYMLINK+="fb" - -# The first rtc device is symlinked to /dev/rtc -KERNEL=="rtc0", SYMLINK+="rtc" - -# Try and modprobe for drivers for new hardware -ACTION=="add", DEVPATH=="/devices/*", ENV{MODALIAS}=="?*", RUN+="/sbin/modprobe $env{MODALIAS}" - -# Create a symlink to any touchscreen input device -SUBSYSTEM=="input", KERNEL=="event[0-9]*", ATTRS{modalias}=="input:*-e0*,3,*a0,1,*18,*", SYMLINK+="input/touchscreen0" - -LABEL="persistent_storage_end" - -LABEL="nomountblock" diff --git a/meta-fsl-ppc/recipes-append/udev/udev_182.bbappend b/meta-fsl-ppc/recipes-append/udev/udev_182.bbappend index f15533ba..8445337a 100644 --- a/meta-fsl-ppc/recipes-append/udev/udev_182.bbappend +++ b/meta-fsl-ppc/recipes-append/udev/udev_182.bbappend @@ -1,3 +1,2 @@ -FILESEXTRAPATHS_prepend_fsl := "${THISDIR}/files:" +PRINC := "${@int(PRINC) + 1}" -PR_fsl .= "+${DISTRO}.1" diff --git a/meta-fsl-ppc/recipes-core/udev/udev-extraconf/71-fsl-dpaa-persistent-networking.rules b/meta-fsl-ppc/recipes-core/udev/udev-extraconf/71-fsl-dpaa-persistent-networking.rules new file mode 100644 index 00000000..356c172f --- /dev/null +++ b/meta-fsl-ppc/recipes-core/udev/udev-extraconf/71-fsl-dpaa-persistent-networking.rules @@ -0,0 +1,17 @@ +# Rules for handling naming the DPAA FMan ethernet ports in a consistent way +SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe4e0000", NAME="fm1-gb0" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe4e2000", NAME="fm1-gb1" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe4e4000", NAME="fm1-gb2" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe4e6000", NAME="fm1-gb3" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe4e8000", NAME="fm1-gb4" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe4f0000", NAME="fm1-10g" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe5e0000", NAME="fm2-gb0" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe5e2000", NAME="fm2-gb1" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe5e4000", NAME="fm2-gb2" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe5e6000", NAME="fm2-gb3" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe5e8000", NAME="fm2-gb4" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe5f0000", NAME="fm2-10g" + +# P1023 has its Fman @ different offsets +SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ff7e0000", NAME="fm1-gb0" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ff7e2000", NAME="fm1-gb1" diff --git a/meta-fsl-ppc/recipes-core/udev/udev-extraconf/local.rules b/meta-fsl-ppc/recipes-core/udev/udev-extraconf/local.rules new file mode 100644 index 00000000..43034b83 --- /dev/null +++ b/meta-fsl-ppc/recipes-core/udev/udev-extraconf/local.rules @@ -0,0 +1,42 @@ +# There are a number of modifiers that are allowed to be used in some +# of the different fields. They provide the following subsitutions: +# +# %n the "kernel number" of the device. +# For example, 'sda3' has a "kernel number" of '3' +# %e the smallest number for that name which does not matches an existing node +# %k the kernel name for the device +# %M the kernel major number for the device +# %m the kernel minor number for the device +# %b the bus id for the device +# %c the string returned by the PROGRAM +# %s{filename} the content of a sysfs attribute +# %% the '%' char itself +# + +KERNEL=="nbd*", GOTO="persistent_storage_end" + +SUBSYSTEM=="block", ENV{DEVTYPE}=="partition", GOTO="nomountblock" + +# Media automounting +SUBSYSTEM=="block", ACTION=="add" RUN+="/etc/udev/scripts/mount.sh" +SUBSYSTEM=="block", ACTION=="remove" RUN+="/etc/udev/scripts/mount.sh" + +# Handle network interface setup +SUBSYSTEM=="net", ACTION=="add" RUN+="/etc/udev/scripts/network.sh" +SUBSYSTEM=="net", ACTION=="remove" RUN+="/etc/udev/scripts/network.sh" + +# The first framebuffer is symlinked to /dev/fb +KERNEL=="fb0", SYMLINK+="fb" + +# The first rtc device is symlinked to /dev/rtc +KERNEL=="rtc0", SYMLINK+="rtc" + +# Try and modprobe for drivers for new hardware +ACTION=="add", DEVPATH=="/devices/*", ENV{MODALIAS}=="?*", RUN+="/sbin/modprobe $env{MODALIAS}" + +# Create a symlink to any touchscreen input device +SUBSYSTEM=="input", KERNEL=="event[0-9]*", ATTRS{modalias}=="input:*-e0*,3,*a0,1,*18,*", SYMLINK+="input/touchscreen0" + +LABEL="persistent_storage_end" + +LABEL="nomountblock" diff --git a/meta-fsl-ppc/recipes-core/udev/udev-extraconf_1.0.bbappend b/meta-fsl-ppc/recipes-core/udev/udev-extraconf_1.0.bbappend new file mode 100644 index 00000000..3b662508 --- /dev/null +++ b/meta-fsl-ppc/recipes-core/udev/udev-extraconf_1.0.bbappend @@ -0,0 +1,11 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +PRINC := "${@int(PRINC) + 1}" + +SRC_URI_append = " file://71-fsl-dpaa-persistent-networking.rules" + +do_install_append () { + install -d ${D}${sysconfdir}/udev/rules.d/ + install -m 0644 ${WORKDIR}/71-fsl-dpaa-persistent-networking.rules ${D}${sysconfdir}/udev/rules.d +} + -- cgit v1.2.3-54-g00ecf From 67da3c9a7c1111727556d226740550980f0b086d Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Sat, 9 Mar 2013 15:32:02 +0000 Subject: udev-extraconf: added to the list of MACHINE_EXTRA_RRECOMMENDS It will then added into packagegroup-basic and packagegroup-base. Signed-off-by: Ting Liu --- meta-fsl-ppc/conf/machine/e500mc.inc | 2 +- meta-fsl-ppc/conf/machine/e500v2.inc | 2 +- meta-fsl-ppc/conf/machine/e5500-64b.inc | 2 +- meta-fsl-ppc/conf/machine/e5500.inc | 2 +- meta-fsl-ppc/conf/machine/e6500-64b.inc | 2 +- meta-fsl-ppc/conf/machine/e6500.inc | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/meta-fsl-ppc/conf/machine/e500mc.inc b/meta-fsl-ppc/conf/machine/e500mc.inc index 505d8051..e523a87a 100644 --- a/meta-fsl-ppc/conf/machine/e500mc.inc +++ b/meta-fsl-ppc/conf/machine/e500mc.inc @@ -3,7 +3,7 @@ TARGET_FPU = "hard" require conf/machine/include/tune-ppce500mc.inc MACHINE_FEATURES = "kernel26 keyboard pci ext2 ext3 serial" -MACHINE_EXTRA_RRECOMMENDS = "u-boot" +MACHINE_EXTRA_RRECOMMENDS = "u-boot udev-extraconf" PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" PREFERRED_VERSION_virtual/kernel ?= "3.0.34" diff --git a/meta-fsl-ppc/conf/machine/e500v2.inc b/meta-fsl-ppc/conf/machine/e500v2.inc index 12086f79..cb3d7ad7 100644 --- a/meta-fsl-ppc/conf/machine/e500v2.inc +++ b/meta-fsl-ppc/conf/machine/e500v2.inc @@ -1,7 +1,7 @@ require conf/machine/include/tune-ppce500v2.inc MACHINE_FEATURES = "kernel26 pci ext2 ext3 serial" -MACHINE_EXTRA_RRECOMMENDS = "u-boot" +MACHINE_EXTRA_RRECOMMENDS = "u-boot udev-extraconf" PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" PREFERRED_VERSION_virtual/kernel ?= "3.0.34" diff --git a/meta-fsl-ppc/conf/machine/e5500-64b.inc b/meta-fsl-ppc/conf/machine/e5500-64b.inc index 650585f3..d2fa078d 100644 --- a/meta-fsl-ppc/conf/machine/e5500-64b.inc +++ b/meta-fsl-ppc/conf/machine/e5500-64b.inc @@ -4,7 +4,7 @@ DEFAULTTUNE ?= "ppc64e5500" require conf/machine/include/tune-ppce5500.inc MACHINE_FEATURES = "kernel26 keyboard pci ext2 ext3 serial" -MACHINE_EXTRA_RRECOMMENDS = "u-boot" +MACHINE_EXTRA_RRECOMMENDS = "u-boot udev-extraconf" PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" PREFERRED_VERSION_virtual/kernel ?= "3.0.34" diff --git a/meta-fsl-ppc/conf/machine/e5500.inc b/meta-fsl-ppc/conf/machine/e5500.inc index 1a1bb20b..09870c96 100644 --- a/meta-fsl-ppc/conf/machine/e5500.inc +++ b/meta-fsl-ppc/conf/machine/e5500.inc @@ -3,7 +3,7 @@ TARGET_FPU = "hard" require conf/machine/include/tune-ppce5500.inc MACHINE_FEATURES = "kernel26 keyboard pci ext2 ext3 serial" -MACHINE_EXTRA_RRECOMMENDS = "u-boot" +MACHINE_EXTRA_RRECOMMENDS = "u-boot udev-extraconf" PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" PREFERRED_VERSION_virtual/kernel ?= "3.0.34" diff --git a/meta-fsl-ppc/conf/machine/e6500-64b.inc b/meta-fsl-ppc/conf/machine/e6500-64b.inc index 85bcb392..57e61b2f 100644 --- a/meta-fsl-ppc/conf/machine/e6500-64b.inc +++ b/meta-fsl-ppc/conf/machine/e6500-64b.inc @@ -4,7 +4,7 @@ DEFAULTTUNE ?= "ppc64e6500" require conf/machine/include/tune-ppce6500.inc MACHINE_FEATURES = "kernel26 keyboard pci ext2 ext3 serial" -MACHINE_EXTRA_RRECOMMENDS = "u-boot" +MACHINE_EXTRA_RRECOMMENDS = "u-boot udev-extraconf" PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" PREFERRED_VERSION_virtual/kernel ?= "3.0.34" diff --git a/meta-fsl-ppc/conf/machine/e6500.inc b/meta-fsl-ppc/conf/machine/e6500.inc index 31c61a26..b343742e 100644 --- a/meta-fsl-ppc/conf/machine/e6500.inc +++ b/meta-fsl-ppc/conf/machine/e6500.inc @@ -3,7 +3,7 @@ TARGET_FPU = "hard" require conf/machine/include/tune-ppce6500.inc MACHINE_FEATURES = "kernel26 keyboard pci ext2 ext3 serial" -MACHINE_EXTRA_RRECOMMENDS = "u-boot" +MACHINE_EXTRA_RRECOMMENDS = "u-boot udev-extraconf" PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" PREFERRED_VERSION_virtual/kernel ?= "3.0.34" -- cgit v1.2.3-54-g00ecf From 572c8e76d921c502c4d4ce37a1da46ddddd8b192 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Sat, 9 Mar 2013 15:32:03 +0000 Subject: udev-extraconf: add rule to rename network interfaces for t4/b4 Since on FManv3 a MEMAC can be configured either as 1G or 10G, rename all interfaces on T4/B4 to "fmX-macY", with X in the range 1..2 and Y in the range 1..10. Signed-off-by: Zhenhua Luo Signed-off-by: Ioana Radulescu Signed-off-by: Ting Liu --- .../72-fsl-dpaa-persistent-networking.rules | 21 +++++++++++++++++++++ .../recipes-core/udev/udev-extraconf_1.0.bbappend | 7 ++++--- 2 files changed, 25 insertions(+), 3 deletions(-) create mode 100644 meta-fsl-ppc/recipes-core/udev/udev-extraconf/72-fsl-dpaa-persistent-networking.rules diff --git a/meta-fsl-ppc/recipes-core/udev/udev-extraconf/72-fsl-dpaa-persistent-networking.rules b/meta-fsl-ppc/recipes-core/udev/udev-extraconf/72-fsl-dpaa-persistent-networking.rules new file mode 100644 index 00000000..34e72a39 --- /dev/null +++ b/meta-fsl-ppc/recipes-core/udev/udev-extraconf/72-fsl-dpaa-persistent-networking.rules @@ -0,0 +1,21 @@ +# Rules for handling naming the DPAA FMan ethernet ports in a consistent way +SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe4e0000", NAME="fm1-mac1" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe4e2000", NAME="fm1-mac2" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe4e4000", NAME="fm1-mac3" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe4e6000", NAME="fm1-mac4" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe4e8000", NAME="fm1-mac5" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe4ea000", NAME="fm1-mac6" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe4ec000", NAME="fm1-mac7" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe4ee000", NAME="fm1-mac8" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe4f0000", NAME="fm1-mac9" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe4f2000", NAME="fm1-mac10" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe5e0000", NAME="fm2-mac1" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe5e2000", NAME="fm2-mac2" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe5e4000", NAME="fm2-mac3" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe5e6000", NAME="fm2-mac4" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe5e8000", NAME="fm2-mac5" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe5ea000", NAME="fm2-mac6" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe5ec000", NAME="fm2-mac7" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe5ee000", NAME="fm2-mac8" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe5f0000", NAME="fm2-mac9" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe5f2000", NAME="fm2-mac10" diff --git a/meta-fsl-ppc/recipes-core/udev/udev-extraconf_1.0.bbappend b/meta-fsl-ppc/recipes-core/udev/udev-extraconf_1.0.bbappend index 3b662508..056d0378 100644 --- a/meta-fsl-ppc/recipes-core/udev/udev-extraconf_1.0.bbappend +++ b/meta-fsl-ppc/recipes-core/udev/udev-extraconf_1.0.bbappend @@ -1,11 +1,12 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" -PRINC := "${@int(PRINC) + 1}" +PRINC := "${@int(PRINC) + 2}" -SRC_URI_append = " file://71-fsl-dpaa-persistent-networking.rules" +SRC_URI_append = " file://${@bb.utils.contains("TUNE_FEATURES", "e6500", \ + "72-fsl-dpaa-persistent-networking.rules", "71-fsl-dpaa-persistent-networking.rules", d)}" do_install_append () { install -d ${D}${sysconfdir}/udev/rules.d/ - install -m 0644 ${WORKDIR}/71-fsl-dpaa-persistent-networking.rules ${D}${sysconfdir}/udev/rules.d + install -m 0644 ${WORKDIR}/*-fsl-dpaa-persistent-networking.rules ${D}${sysconfdir}/udev/rules.d } -- cgit v1.2.3-54-g00ecf From 3ef01d17a7618811a29912e993abaf3ee2fb12f1 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Tue, 12 Mar 2013 09:20:30 +0000 Subject: busybox: remove SDK specific bits There are three kinds of SDK specific bits: (1) deleted: busybox-1.20.2/busybox-1.19.4-ubi-user-h.patch This patch is just a workground to fix busybox 1.9 builds when enabling ubi applets (disabled by default in Yocto). The actual fix exists in kernel, but was not applied on fsl kernel git tree for SDK 1.3.x. This patch restored a compatible mtd/ubi-user.h into busybox. Now the kernel fix was already included in Yocto: http://git.yoctoproject.org/cgit/cgit.cgi/linux-yocto-3.2/commit/?id=f210735fe2f17a6225432ee3d1239bcf23a8659c http://git.yoctoproject.org/cgit/cgit.cgi/linux-yocto-3.4/commit/?id=f210735fe2f17a6225432ee3d1239bcf23a8659c http://git.yoctoproject.org/cgit/cgit.cgi/linux-yocto-3.8/commit/?id=f210735fe2f17a6225432ee3d1239bcf23a8659c commit f210735fe2f17a6225432ee3d1239bcf23a8659c headers_install: fix __packed in exported kernel headers And fsl SDK 1.4 will based on kernel 3.8 which also include this commit. So this patch can be dropped. (2) deleted: busybox-1.20.2/defconfig-fsl This defconfig is SDK specific. Remove it. (3) deleted: busybox-1.20.2/inetd{.conf} There is already submitted patches for this, but not applied: [PATCH] busybox: Add inetd related files http://patches.openembedded.org/patch/33233/ http://patches.openembedded.org/patch/33235/ The issue still exist and we will send new patches. Signed-off-by: Ting Liu --- .../busybox-1.20.2/busybox-1.19.4-ubi-user-h.patch | 419 -------- .../busybox/busybox-1.20.2/defconfig-fsl | 1013 -------------------- .../recipes-append/busybox/busybox-1.20.2/inetd | 33 - .../busybox/busybox-1.20.2/inetd.conf | 20 - .../recipes-append/busybox/busybox_1.20.2.bbappend | 15 +- 5 files changed, 1 insertion(+), 1499 deletions(-) delete mode 100644 meta-fsl-ppc/recipes-append/busybox/busybox-1.20.2/busybox-1.19.4-ubi-user-h.patch delete mode 100644 meta-fsl-ppc/recipes-append/busybox/busybox-1.20.2/defconfig-fsl delete mode 100644 meta-fsl-ppc/recipes-append/busybox/busybox-1.20.2/inetd delete mode 100644 meta-fsl-ppc/recipes-append/busybox/busybox-1.20.2/inetd.conf diff --git a/meta-fsl-ppc/recipes-append/busybox/busybox-1.20.2/busybox-1.19.4-ubi-user-h.patch b/meta-fsl-ppc/recipes-append/busybox/busybox-1.20.2/busybox-1.19.4-ubi-user-h.patch deleted file mode 100644 index 42bcfa92..00000000 --- a/meta-fsl-ppc/recipes-append/busybox/busybox-1.20.2/busybox-1.19.4-ubi-user-h.patch +++ /dev/null @@ -1,419 +0,0 @@ -20110926 Juergen Lambrecht -This patch add an include file from mtd-utils. - -diff --exclude CVS --exclude .git -uNr busybox-1.19.4/include/mtd/ubi-user.h busybox-1.19.4.modified/include/mtd/ubi-user.h ---- busybox-1.19.4/include/mtd/ubi-user.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.19.4.modified/include/mtd/ubi-user.h 2011-09-26 15:48:54.884088675 +0200 -@@ -0,0 +1,412 @@ -+/* -+ * Copyright (c) International Business Machines Corp., 2006 -+ * -+ * 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 2 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, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -+ * -+ * Author: Artem Bityutskiy (???????? ?????) -+ */ -+ -+#ifndef __UBI_USER_H__ -+#define __UBI_USER_H__ -+ -+#include -+ -+/* -+ * UBI device creation (the same as MTD device attachment) -+ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -+ * -+ * MTD devices may be attached using %UBI_IOCATT ioctl command of the UBI -+ * control device. The caller has to properly fill and pass -+ * &struct ubi_attach_req object - UBI will attach the MTD device specified in -+ * the request and return the newly created UBI device number as the ioctl -+ * return value. -+ * -+ * UBI device deletion (the same as MTD device detachment) -+ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -+ * -+ * An UBI device maybe deleted with %UBI_IOCDET ioctl command of the UBI -+ * control device. -+ * -+ * UBI volume creation -+ * ~~~~~~~~~~~~~~~~~~~ -+ * -+ * UBI volumes are created via the %UBI_IOCMKVOL ioctl command of UBI character -+ * device. A &struct ubi_mkvol_req object has to be properly filled and a -+ * pointer to it has to be passed to the ioctl. -+ * -+ * UBI volume deletion -+ * ~~~~~~~~~~~~~~~~~~~ -+ * -+ * To delete a volume, the %UBI_IOCRMVOL ioctl command of the UBI character -+ * device should be used. A pointer to the 32-bit volume ID hast to be passed -+ * to the ioctl. -+ * -+ * UBI volume re-size -+ * ~~~~~~~~~~~~~~~~~~ -+ * -+ * To re-size a volume, the %UBI_IOCRSVOL ioctl command of the UBI character -+ * device should be used. A &struct ubi_rsvol_req object has to be properly -+ * filled and a pointer to it has to be passed to the ioctl. -+ * -+ * UBI volumes re-name -+ * ~~~~~~~~~~~~~~~~~~~ -+ * -+ * To re-name several volumes atomically at one go, the %UBI_IOCRNVOL command -+ * of the UBI character device should be used. A &struct ubi_rnvol_req object -+ * has to be properly filled and a pointer to it has to be passed to the ioctl. -+ * -+ * UBI volume update -+ * ~~~~~~~~~~~~~~~~~ -+ * -+ * Volume update should be done via the %UBI_IOCVOLUP ioctl command of the -+ * corresponding UBI volume character device. A pointer to a 64-bit update -+ * size should be passed to the ioctl. After this, UBI expects user to write -+ * this number of bytes to the volume character device. The update is finished -+ * when the claimed number of bytes is passed. So, the volume update sequence -+ * is something like: -+ * -+ * fd = open("/dev/my_volume"); -+ * ioctl(fd, UBI_IOCVOLUP, &image_size); -+ * write(fd, buf, image_size); -+ * close(fd); -+ * -+ * Logical eraseblock erase -+ * ~~~~~~~~~~~~~~~~~~~~~~~~ -+ * -+ * To erase a logical eraseblock, the %UBI_IOCEBER ioctl command of the -+ * corresponding UBI volume character device should be used. This command -+ * unmaps the requested logical eraseblock, makes sure the corresponding -+ * physical eraseblock is successfully erased, and returns. -+ * -+ * Atomic logical eraseblock change -+ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -+ * -+ * Atomic logical eraseblock change operation is called using the %UBI_IOCEBCH -+ * ioctl command of the corresponding UBI volume character device. A pointer to -+ * a &struct ubi_leb_change_req object has to be passed to the ioctl. Then the -+ * user is expected to write the requested amount of bytes (similarly to what -+ * should be done in case of the "volume update" ioctl). -+ * -+ * Logical eraseblock map -+ * ~~~~~~~~~~~~~~~~~~~~~ -+ * -+ * To map a logical eraseblock to a physical eraseblock, the %UBI_IOCEBMAP -+ * ioctl command should be used. A pointer to a &struct ubi_map_req object is -+ * expected to be passed. The ioctl maps the requested logical eraseblock to -+ * a physical eraseblock and returns. Only non-mapped logical eraseblocks can -+ * be mapped. If the logical eraseblock specified in the request is already -+ * mapped to a physical eraseblock, the ioctl fails and returns error. -+ * -+ * Logical eraseblock unmap -+ * ~~~~~~~~~~~~~~~~~~~~~~~~ -+ * -+ * To unmap a logical eraseblock to a physical eraseblock, the %UBI_IOCEBUNMAP -+ * ioctl command should be used. The ioctl unmaps the logical eraseblocks, -+ * schedules corresponding physical eraseblock for erasure, and returns. Unlike -+ * the "LEB erase" command, it does not wait for the physical eraseblock being -+ * erased. Note, the side effect of this is that if an unclean reboot happens -+ * after the unmap ioctl returns, you may find the LEB mapped again to the same -+ * physical eraseblock after the UBI is run again. -+ * -+ * Check if logical eraseblock is mapped -+ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -+ * -+ * To check if a logical eraseblock is mapped to a physical eraseblock, the -+ * %UBI_IOCEBISMAP ioctl command should be used. It returns %0 if the LEB is -+ * not mapped, and %1 if it is mapped. -+ * -+ * Set an UBI volume property -+ * ~~~~~~~~~~~~~~~~~~~~~~~~~ -+ * -+ * To set an UBI volume property the %UBI_IOCSETPROP ioctl command should be -+ * used. A pointer to a &struct ubi_set_prop_req object is expected to be -+ * passed. The object describes which property should be set, and to which value -+ * it should be set. -+ */ -+ -+/* -+ * When a new UBI volume or UBI device is created, users may either specify the -+ * volume/device number they want to create or to let UBI automatically assign -+ * the number using these constants. -+ */ -+#define UBI_VOL_NUM_AUTO (-1) -+#define UBI_DEV_NUM_AUTO (-1) -+ -+/* Maximum volume name length */ -+#define UBI_MAX_VOLUME_NAME 127 -+ -+/* ioctl commands of UBI character devices */ -+ -+#define UBI_IOC_MAGIC 'o' -+ -+/* Create an UBI volume */ -+#define UBI_IOCMKVOL _IOW(UBI_IOC_MAGIC, 0, struct ubi_mkvol_req) -+/* Remove an UBI volume */ -+#define UBI_IOCRMVOL _IOW(UBI_IOC_MAGIC, 1, __s32) -+/* Re-size an UBI volume */ -+#define UBI_IOCRSVOL _IOW(UBI_IOC_MAGIC, 2, struct ubi_rsvol_req) -+/* Re-name volumes */ -+#define UBI_IOCRNVOL _IOW(UBI_IOC_MAGIC, 3, struct ubi_rnvol_req) -+ -+/* ioctl commands of the UBI control character device */ -+ -+#define UBI_CTRL_IOC_MAGIC 'o' -+ -+/* Attach an MTD device */ -+#define UBI_IOCATT _IOW(UBI_CTRL_IOC_MAGIC, 64, struct ubi_attach_req) -+/* Detach an MTD device */ -+#define UBI_IOCDET _IOW(UBI_CTRL_IOC_MAGIC, 65, __s32) -+ -+/* ioctl commands of UBI volume character devices */ -+ -+#define UBI_VOL_IOC_MAGIC 'O' -+ -+/* Start UBI volume update */ -+#define UBI_IOCVOLUP _IOW(UBI_VOL_IOC_MAGIC, 0, __s64) -+/* LEB erasure command, used for debugging, disabled by default */ -+#define UBI_IOCEBER _IOW(UBI_VOL_IOC_MAGIC, 1, __s32) -+/* Atomic LEB change command */ -+#define UBI_IOCEBCH _IOW(UBI_VOL_IOC_MAGIC, 2, __s32) -+/* Map LEB command */ -+#define UBI_IOCEBMAP _IOW(UBI_VOL_IOC_MAGIC, 3, struct ubi_map_req) -+/* Unmap LEB command */ -+#define UBI_IOCEBUNMAP _IOW(UBI_VOL_IOC_MAGIC, 4, __s32) -+/* Check if LEB is mapped command */ -+#define UBI_IOCEBISMAP _IOR(UBI_VOL_IOC_MAGIC, 5, __s32) -+/* Set an UBI volume property */ -+#define UBI_IOCSETPROP _IOW(UBI_VOL_IOC_MAGIC, 6, struct ubi_set_prop_req) -+ -+/* Maximum MTD device name length supported by UBI */ -+#define MAX_UBI_MTD_NAME_LEN 127 -+ -+/* Maximum amount of UBI volumes that can be re-named at one go */ -+#define UBI_MAX_RNVOL 32 -+ -+/* -+ * UBI data type hint constants. -+ * -+ * UBI_LONGTERM: long-term data -+ * UBI_SHORTTERM: short-term data -+ * UBI_UNKNOWN: data persistence is unknown -+ * -+ * These constants are used when data is written to UBI volumes in order to -+ * help the UBI wear-leveling unit to find more appropriate physical -+ * eraseblocks. -+ */ -+enum { -+ UBI_LONGTERM = 1, -+ UBI_SHORTTERM = 2, -+ UBI_UNKNOWN = 3, -+}; -+ -+/* -+ * UBI volume type constants. -+ * -+ * @UBI_DYNAMIC_VOLUME: dynamic volume -+ * @UBI_STATIC_VOLUME: static volume -+ */ -+enum { -+ UBI_DYNAMIC_VOLUME = 3, -+ UBI_STATIC_VOLUME = 4, -+}; -+ -+/* -+ * UBI set property ioctl constants -+ * -+ * @UBI_PROP_DIRECT_WRITE: allow / disallow user to directly write and -+ * erase individual eraseblocks on dynamic volumes -+ */ -+enum { -+ UBI_PROP_DIRECT_WRITE = 1, -+}; -+ -+/** -+ * struct ubi_attach_req - attach MTD device request. -+ * @ubi_num: UBI device number to create -+ * @mtd_num: MTD device number to attach -+ * @vid_hdr_offset: VID header offset (use defaults if %0) -+ * @padding: reserved for future, not used, has to be zeroed -+ * -+ * This data structure is used to specify MTD device UBI has to attach and the -+ * parameters it has to use. The number which should be assigned to the new UBI -+ * device is passed in @ubi_num. UBI may automatically assign the number if -+ * @UBI_DEV_NUM_AUTO is passed. In this case, the device number is returned in -+ * @ubi_num. -+ * -+ * Most applications should pass %0 in @vid_hdr_offset to make UBI use default -+ * offset of the VID header within physical eraseblocks. The default offset is -+ * the next min. I/O unit after the EC header. For example, it will be offset -+ * 512 in case of a 512 bytes page NAND flash with no sub-page support. Or -+ * it will be 512 in case of a 2KiB page NAND flash with 4 512-byte sub-pages. -+ * -+ * But in rare cases, if this optimizes things, the VID header may be placed to -+ * a different offset. For example, the boot-loader might do things faster if -+ * the VID header sits at the end of the first 2KiB NAND page with 4 sub-pages. -+ * As the boot-loader would not normally need to read EC headers (unless it -+ * needs UBI in RW mode), it might be faster to calculate ECC. This is weird -+ * example, but it real-life example. So, in this example, @vid_hdr_offer would -+ * be 2KiB-64 bytes = 1984. Note, that this position is not even 512-bytes -+ * aligned, which is OK, as UBI is clever enough to realize this is 4th -+ * sub-page of the first page and add needed padding. -+ */ -+struct ubi_attach_req { -+ __s32 ubi_num; -+ __s32 mtd_num; -+ __s32 vid_hdr_offset; -+ __s8 padding[12]; -+}; -+ -+/** -+ * struct ubi_mkvol_req - volume description data structure used in -+ * volume creation requests. -+ * @vol_id: volume number -+ * @alignment: volume alignment -+ * @bytes: volume size in bytes -+ * @vol_type: volume type (%UBI_DYNAMIC_VOLUME or %UBI_STATIC_VOLUME) -+ * @padding1: reserved for future, not used, has to be zeroed -+ * @name_len: volume name length -+ * @padding2: reserved for future, not used, has to be zeroed -+ * @name: volume name -+ * -+ * This structure is used by user-space programs when creating new volumes. The -+ * @used_bytes field is only necessary when creating static volumes. -+ * -+ * The @alignment field specifies the required alignment of the volume logical -+ * eraseblock. This means, that the size of logical eraseblocks will be aligned -+ * to this number, i.e., -+ * (UBI device logical eraseblock size) mod (@alignment) = 0. -+ * -+ * To put it differently, the logical eraseblock of this volume may be slightly -+ * shortened in order to make it properly aligned. The alignment has to be -+ * multiple of the flash minimal input/output unit, or %1 to utilize the entire -+ * available space of logical eraseblocks. -+ * -+ * The @alignment field may be useful, for example, when one wants to maintain -+ * a block device on top of an UBI volume. In this case, it is desirable to fit -+ * an integer number of blocks in logical eraseblocks of this UBI volume. With -+ * alignment it is possible to update this volume using plane UBI volume image -+ * BLOBs, without caring about how to properly align them. -+ */ -+struct ubi_mkvol_req { -+ __s32 vol_id; -+ __s32 alignment; -+ __s64 bytes; -+ __s8 vol_type; -+ __s8 padding1; -+ __s16 name_len; -+ __s8 padding2[4]; -+ char name[UBI_MAX_VOLUME_NAME + 1]; -+} __attribute__ ((packed)); -+ -+/** -+ * struct ubi_rsvol_req - a data structure used in volume re-size requests. -+ * @vol_id: ID of the volume to re-size -+ * @bytes: new size of the volume in bytes -+ * -+ * Re-sizing is possible for both dynamic and static volumes. But while dynamic -+ * volumes may be re-sized arbitrarily, static volumes cannot be made to be -+ * smaller than the number of bytes they bear. To arbitrarily shrink a static -+ * volume, it must be wiped out first (by means of volume update operation with -+ * zero number of bytes). -+ */ -+struct ubi_rsvol_req { -+ __s64 bytes; -+ __s32 vol_id; -+} __attribute__ ((packed)); -+ -+/** -+ * struct ubi_rnvol_req - volumes re-name request. -+ * @count: count of volumes to re-name -+ * @padding1: reserved for future, not used, has to be zeroed -+ * @vol_id: ID of the volume to re-name -+ * @name_len: name length -+ * @padding2: reserved for future, not used, has to be zeroed -+ * @name: new volume name -+ * -+ * UBI allows to re-name up to %32 volumes at one go. The count of volumes to -+ * re-name is specified in the @count field. The ID of the volumes to re-name -+ * and the new names are specified in the @vol_id and @name fields. -+ * -+ * The UBI volume re-name operation is atomic, which means that should power cut -+ * happen, the volumes will have either old name or new name. So the possible -+ * use-cases of this command is atomic upgrade. Indeed, to upgrade, say, volumes -+ * A and B one may create temporary volumes %A1 and %B1 with the new contents, -+ * then atomically re-name A1->A and B1->B, in which case old %A and %B will -+ * be removed. -+ * -+ * If it is not desirable to remove old A and B, the re-name request has to -+ * contain 4 entries: A1->A, A->A1, B1->B, B->B1, in which case old A1 and B1 -+ * become A and B, and old A and B will become A1 and B1. -+ * -+ * It is also OK to request: A1->A, A1->X, B1->B, B->Y, in which case old A1 -+ * and B1 become A and B, and old A and B become X and Y. -+ * -+ * In other words, in case of re-naming into an existing volume name, the -+ * existing volume is removed, unless it is re-named as well at the same -+ * re-name request. -+ */ -+struct ubi_rnvol_req { -+ __s32 count; -+ __s8 padding1[12]; -+ struct { -+ __s32 vol_id; -+ __s16 name_len; -+ __s8 padding2[2]; -+ char name[UBI_MAX_VOLUME_NAME + 1]; -+ } ents[UBI_MAX_RNVOL]; -+} __attribute__ ((packed)); -+ -+/** -+ * struct ubi_leb_change_req - a data structure used in atomic LEB change -+ * requests. -+ * @lnum: logical eraseblock number to change -+ * @bytes: how many bytes will be written to the logical eraseblock -+ * @dtype: data type (%UBI_LONGTERM, %UBI_SHORTTERM, %UBI_UNKNOWN) -+ * @padding: reserved for future, not used, has to be zeroed -+ */ -+struct ubi_leb_change_req { -+ __s32 lnum; -+ __s32 bytes; -+ __s8 dtype; -+ __s8 padding[7]; -+} __attribute__ ((packed)); -+ -+/** -+ * struct ubi_map_req - a data structure used in map LEB requests. -+ * @lnum: logical eraseblock number to unmap -+ * @dtype: data type (%UBI_LONGTERM, %UBI_SHORTTERM, %UBI_UNKNOWN) -+ * @padding: reserved for future, not used, has to be zeroed -+ */ -+struct ubi_map_req { -+ __s32 lnum; -+ __s8 dtype; -+ __s8 padding[3]; -+} __attribute__ ((packed)); -+ -+ -+/** -+ * struct ubi_set_prop_req - a data structure used to set an ubi volume -+ * property. -+ * @property: property to set (%UBI_PROP_DIRECT_WRITE) -+ * @padding: reserved for future, not used, has to be zeroed -+ * @value: value to set -+ */ -+struct ubi_set_prop_req { -+ __u8 property; -+ __u8 padding[7]; -+ __u64 value; -+} __attribute__ ((packed)); -+ -+#endif /* __UBI_USER_H__ */ diff --git a/meta-fsl-ppc/recipes-append/busybox/busybox-1.20.2/defconfig-fsl b/meta-fsl-ppc/recipes-append/busybox/busybox-1.20.2/defconfig-fsl deleted file mode 100644 index 52d5bbfd..00000000 --- a/meta-fsl-ppc/recipes-append/busybox/busybox-1.20.2/defconfig-fsl +++ /dev/null @@ -1,1013 +0,0 @@ -# -# Automatically generated make config: don't edit -# Busybox version: 1.19.4 -# Mon Aug 20 15:36:39 2012 -# -CONFIG_HAVE_DOT_CONFIG=y - -# -# Busybox Settings -# - -# -# General Configuration -# -# CONFIG_DESKTOP is not set -# CONFIG_EXTRA_COMPAT is not set -CONFIG_INCLUDE_SUSv2=y -# CONFIG_USE_PORTABLE_CODE is not set -CONFIG_PLATFORM_LINUX=y -CONFIG_FEATURE_BUFFERS_USE_MALLOC=y -# CONFIG_FEATURE_BUFFERS_GO_ON_STACK is not set -# CONFIG_FEATURE_BUFFERS_GO_IN_BSS is not set -CONFIG_SHOW_USAGE=y -# CONFIG_FEATURE_VERBOSE_USAGE is not set -CONFIG_FEATURE_COMPRESS_USAGE=y -# CONFIG_FEATURE_INSTALLER is not set -# CONFIG_INSTALL_NO_USR is not set -CONFIG_LOCALE_SUPPORT=y -# CONFIG_UNICODE_SUPPORT is not set -# CONFIG_UNICODE_USING_LOCALE is not set -# CONFIG_FEATURE_CHECK_UNICODE_IN_ENV is not set -CONFIG_SUBST_WCHAR=0 -CONFIG_LAST_SUPPORTED_WCHAR=0 -# CONFIG_UNICODE_COMBINING_WCHARS is not set -# CONFIG_UNICODE_WIDE_WCHARS is not set -# CONFIG_UNICODE_BIDI_SUPPORT is not set -# CONFIG_UNICODE_NEUTRAL_TABLE is not set -# CONFIG_UNICODE_PRESERVE_BROKEN is not set -CONFIG_LONG_OPTS=y -CONFIG_FEATURE_DEVPTS=y -# CONFIG_FEATURE_CLEAN_UP is not set -CONFIG_FEATURE_UTMP=y -CONFIG_FEATURE_WTMP=y -CONFIG_FEATURE_PIDFILE=y -CONFIG_FEATURE_SUID=y -CONFIG_FEATURE_SUID_CONFIG=y -CONFIG_FEATURE_SUID_CONFIG_QUIET=y -# CONFIG_SELINUX is not set -# CONFIG_FEATURE_PREFER_APPLETS is not set -CONFIG_BUSYBOX_EXEC_PATH="/proc/self/exe" -CONFIG_FEATURE_SYSLOG=y -CONFIG_FEATURE_HAVE_RPC=y - -# -# Build Options -# -# CONFIG_STATIC is not set -# CONFIG_PIE is not set -# CONFIG_NOMMU is not set -# CONFIG_BUILD_LIBBUSYBOX is not set -# CONFIG_FEATURE_INDIVIDUAL is not set -# CONFIG_FEATURE_SHARED_BUSYBOX is not set -CONFIG_LFS=y -CONFIG_CROSS_COMPILER_PREFIX="" -CONFIG_EXTRA_CFLAGS="" - -# -# Debugging Options -# -# CONFIG_DEBUG is not set -# CONFIG_DEBUG_PESSIMIZE is not set -# CONFIG_WERROR is not set -CONFIG_NO_DEBUG_LIB=y -# CONFIG_DMALLOC is not set -# CONFIG_EFENCE is not set - -# -# Installation Options ("make install" behavior) -# -CONFIG_INSTALL_APPLET_SYMLINKS=y -# CONFIG_INSTALL_APPLET_HARDLINKS is not set -# CONFIG_INSTALL_APPLET_SCRIPT_WRAPPERS is not set -# CONFIG_INSTALL_APPLET_DONT is not set -# CONFIG_INSTALL_SH_APPLET_SYMLINK is not set -# CONFIG_INSTALL_SH_APPLET_HARDLINK is not set -# CONFIG_INSTALL_SH_APPLET_SCRIPT_WRAPPER is not set -CONFIG_PREFIX="./_install" - -# -# Busybox Library Tuning -# -CONFIG_FEATURE_SYSTEMD=y -CONFIG_FEATURE_RTMINMAX=y -CONFIG_PASSWORD_MINLEN=6 -CONFIG_MD5_SIZE_VS_SPEED=2 -CONFIG_FEATURE_FAST_TOP=y -# CONFIG_FEATURE_ETC_NETWORKS is not set -CONFIG_FEATURE_USE_TERMIOS=y -CONFIG_FEATURE_EDITING=y -CONFIG_FEATURE_EDITING_MAX_LEN=1024 -# CONFIG_FEATURE_EDITING_VI is not set -CONFIG_FEATURE_EDITING_HISTORY=255 -CONFIG_FEATURE_EDITING_SAVEHISTORY=y -CONFIG_FEATURE_REVERSE_SEARCH=y -CONFIG_FEATURE_TAB_COMPLETION=y -# CONFIG_FEATURE_USERNAME_COMPLETION is not set -CONFIG_FEATURE_EDITING_FANCY_PROMPT=y -# CONFIG_FEATURE_EDITING_ASK_TERMINAL is not set -CONFIG_FEATURE_NON_POSIX_CP=y -# CONFIG_FEATURE_VERBOSE_CP_MESSAGE is not set -CONFIG_FEATURE_COPYBUF_KB=4 -CONFIG_FEATURE_SKIP_ROOTFS=y -CONFIG_MONOTONIC_SYSCALL=y -CONFIG_IOCTL_HEX2STR_ERROR=y -CONFIG_FEATURE_HWIB=y - -# -# Applets -# - -# -# Archival Utilities -# -CONFIG_FEATURE_SEAMLESS_XZ=y -CONFIG_FEATURE_SEAMLESS_LZMA=y -CONFIG_FEATURE_SEAMLESS_BZ2=y -CONFIG_FEATURE_SEAMLESS_GZ=y -CONFIG_FEATURE_SEAMLESS_Z=y -CONFIG_AR=y -CONFIG_FEATURE_AR_LONG_FILENAMES=y -CONFIG_FEATURE_AR_CREATE=y -CONFIG_BUNZIP2=y -CONFIG_BZIP2=y -CONFIG_CPIO=y -CONFIG_FEATURE_CPIO_O=y -CONFIG_FEATURE_CPIO_P=y -# CONFIG_DPKG is not set -# CONFIG_DPKG_DEB is not set -# CONFIG_FEATURE_DPKG_DEB_EXTRACT_ONLY is not set -CONFIG_GUNZIP=y -CONFIG_GZIP=y -CONFIG_FEATURE_GZIP_LONG_OPTIONS=y -CONFIG_LZOP=y -# CONFIG_LZOP_COMPR_HIGH is not set -CONFIG_RPM2CPIO=y -CONFIG_RPM=y -CONFIG_TAR=y -CONFIG_FEATURE_TAR_CREATE=y -CONFIG_FEATURE_TAR_AUTODETECT=y -CONFIG_FEATURE_TAR_FROM=y -CONFIG_FEATURE_TAR_OLDGNU_COMPATIBILITY=y -CONFIG_FEATURE_TAR_OLDSUN_COMPATIBILITY=y -CONFIG_FEATURE_TAR_GNU_EXTENSIONS=y -CONFIG_FEATURE_TAR_LONG_OPTIONS=y -CONFIG_FEATURE_TAR_TO_COMMAND=y -CONFIG_FEATURE_TAR_UNAME_GNAME=y -CONFIG_FEATURE_TAR_NOPRESERVE_TIME=y -# CONFIG_FEATURE_TAR_SELINUX is not set -# CONFIG_UNCOMPRESS is not set -CONFIG_UNLZMA=y -CONFIG_FEATURE_LZMA_FAST=y -CONFIG_LZMA=y -CONFIG_UNXZ=y -CONFIG_XZ=y -CONFIG_UNZIP=y - -# -# Coreutils -# -CONFIG_BASENAME=y -CONFIG_CAT=y -CONFIG_DATE=y -CONFIG_FEATURE_DATE_ISOFMT=y -# CONFIG_FEATURE_DATE_NANO is not set -CONFIG_FEATURE_DATE_COMPAT=y -CONFIG_ID=y -CONFIG_GROUPS=y -CONFIG_TEST=y -CONFIG_FEATURE_TEST_64=y -CONFIG_TOUCH=y -CONFIG_TR=y -CONFIG_FEATURE_TR_CLASSES=y -CONFIG_FEATURE_TR_EQUIV=y -CONFIG_BASE64=y -CONFIG_WHO=y -CONFIG_USERS=y -CONFIG_CAL=y -CONFIG_CATV=y -CONFIG_CHGRP=y -CONFIG_CHMOD=y -CONFIG_CHOWN=y -CONFIG_FEATURE_CHOWN_LONG_OPTIONS=y -CONFIG_CHROOT=y -CONFIG_CKSUM=y -CONFIG_COMM=y -CONFIG_CP=y -CONFIG_FEATURE_CP_LONG_OPTIONS=y -CONFIG_CUT=y -CONFIG_DD=y -CONFIG_FEATURE_DD_SIGNAL_HANDLING=y -CONFIG_FEATURE_DD_THIRD_STATUS_LINE=y -CONFIG_FEATURE_DD_IBS_OBS=y -CONFIG_DF=y -CONFIG_FEATURE_DF_FANCY=y -CONFIG_DIRNAME=y -CONFIG_DOS2UNIX=y -CONFIG_UNIX2DOS=y -CONFIG_DU=y -CONFIG_FEATURE_DU_DEFAULT_BLOCKSIZE_1K=y -CONFIG_ECHO=y -CONFIG_FEATURE_FANCY_ECHO=y -CONFIG_ENV=y -CONFIG_FEATURE_ENV_LONG_OPTIONS=y -CONFIG_EXPAND=y -CONFIG_FEATURE_EXPAND_LONG_OPTIONS=y -CONFIG_EXPR=y -CONFIG_EXPR_MATH_SUPPORT_64=y -CONFIG_FALSE=y -CONFIG_FOLD=y -CONFIG_FSYNC=y -CONFIG_HEAD=y -CONFIG_FEATURE_FANCY_HEAD=y -CONFIG_HOSTID=y -CONFIG_INSTALL=y -CONFIG_FEATURE_INSTALL_LONG_OPTIONS=y -CONFIG_LN=y -CONFIG_LOGNAME=y -CONFIG_LS=y -CONFIG_FEATURE_LS_FILETYPES=y -CONFIG_FEATURE_LS_FOLLOWLINKS=y -CONFIG_FEATURE_LS_RECURSIVE=y -CONFIG_FEATURE_LS_SORTFILES=y -CONFIG_FEATURE_LS_TIMESTAMPS=y -CONFIG_FEATURE_LS_USERNAME=y -CONFIG_FEATURE_LS_COLOR=y -CONFIG_FEATURE_LS_COLOR_IS_DEFAULT=y -CONFIG_MD5SUM=y -CONFIG_MKDIR=y -CONFIG_FEATURE_MKDIR_LONG_OPTIONS=y -CONFIG_MKFIFO=y -CONFIG_MKNOD=y -CONFIG_MV=y -CONFIG_FEATURE_MV_LONG_OPTIONS=y -CONFIG_NICE=y -CONFIG_NOHUP=y -CONFIG_OD=y -CONFIG_PRINTENV=y -CONFIG_PRINTF=y -CONFIG_PWD=y -CONFIG_READLINK=y -CONFIG_FEATURE_READLINK_FOLLOW=y -CONFIG_REALPATH=y -CONFIG_RM=y -CONFIG_RMDIR=y -CONFIG_FEATURE_RMDIR_LONG_OPTIONS=y -CONFIG_SEQ=y -CONFIG_SHA1SUM=y -CONFIG_SHA256SUM=y -CONFIG_SHA512SUM=y -CONFIG_SLEEP=y -CONFIG_FEATURE_FANCY_SLEEP=y -CONFIG_FEATURE_FLOAT_SLEEP=y -CONFIG_SORT=y -CONFIG_FEATURE_SORT_BIG=y -CONFIG_SPLIT=y -CONFIG_FEATURE_SPLIT_FANCY=y -CONFIG_STAT=y -CONFIG_FEATURE_STAT_FORMAT=y -CONFIG_STTY=y -CONFIG_SUM=y -CONFIG_SYNC=y -CONFIG_TAC=y -CONFIG_TAIL=y -CONFIG_FEATURE_FANCY_TAIL=y -CONFIG_TEE=y -CONFIG_FEATURE_TEE_USE_BLOCK_IO=y -CONFIG_TRUE=y -CONFIG_TTY=y -CONFIG_UNAME=y -CONFIG_UNEXPAND=y -CONFIG_FEATURE_UNEXPAND_LONG_OPTIONS=y -CONFIG_UNIQ=y -CONFIG_USLEEP=y -CONFIG_UUDECODE=y -CONFIG_UUENCODE=y -CONFIG_WC=y -CONFIG_FEATURE_WC_LARGE=y -CONFIG_WHOAMI=y -CONFIG_YES=y - -# -# Common options for cp and mv -# -CONFIG_FEATURE_PRESERVE_HARDLINKS=y - -# -# Common options for ls, more and telnet -# -CONFIG_FEATURE_AUTOWIDTH=y - -# -# Common options for df, du, ls -# -CONFIG_FEATURE_HUMAN_READABLE=y - -# -# Common options for md5sum, sha1sum, sha256sum, sha512sum -# -CONFIG_FEATURE_MD5_SHA1_SUM_CHECK=y - -# -# Console Utilities -# -CONFIG_CHVT=y -CONFIG_FGCONSOLE=y -CONFIG_CLEAR=y -CONFIG_DEALLOCVT=y -CONFIG_DUMPKMAP=y -CONFIG_KBD_MODE=y -CONFIG_LOADFONT=y -CONFIG_LOADKMAP=y -CONFIG_OPENVT=y -CONFIG_RESET=y -CONFIG_RESIZE=y -CONFIG_FEATURE_RESIZE_PRINT=y -CONFIG_SETCONSOLE=y -CONFIG_FEATURE_SETCONSOLE_LONG_OPTIONS=y -CONFIG_SETFONT=y -CONFIG_FEATURE_SETFONT_TEXTUAL_MAP=y -CONFIG_DEFAULT_SETFONT_DIR="" -CONFIG_SETKEYCODES=y -CONFIG_SETLOGCONS=y -CONFIG_SHOWKEY=y - -# -# Common options for loadfont and setfont -# -CONFIG_FEATURE_LOADFONT_PSF2=y -CONFIG_FEATURE_LOADFONT_RAW=y - -# -# Debian Utilities -# -CONFIG_MKTEMP=y -CONFIG_PIPE_PROGRESS=y -CONFIG_RUN_PARTS=y -CONFIG_FEATURE_RUN_PARTS_LONG_OPTIONS=y -CONFIG_FEATURE_RUN_PARTS_FANCY=y -CONFIG_START_STOP_DAEMON=y -CONFIG_FEATURE_START_STOP_DAEMON_FANCY=y -CONFIG_FEATURE_START_STOP_DAEMON_LONG_OPTIONS=y -CONFIG_WHICH=y - -# -# Editors -# -CONFIG_PATCH=y -CONFIG_VI=y -CONFIG_FEATURE_VI_MAX_LEN=4096 -CONFIG_FEATURE_VI_8BIT=y -CONFIG_FEATURE_VI_COLON=y -CONFIG_FEATURE_VI_YANKMARK=y -CONFIG_FEATURE_VI_SEARCH=y -# CONFIG_FEATURE_VI_REGEX_SEARCH is not set -CONFIG_FEATURE_VI_USE_SIGNALS=y -CONFIG_FEATURE_VI_DOT_CMD=y -CONFIG_FEATURE_VI_READONLY=y -CONFIG_FEATURE_VI_SETOPTS=y -CONFIG_FEATURE_VI_SET=y -CONFIG_FEATURE_VI_WIN_RESIZE=y -CONFIG_FEATURE_VI_ASK_TERMINAL=y -CONFIG_FEATURE_VI_OPTIMIZE_CURSOR=y -CONFIG_AWK=y -CONFIG_FEATURE_AWK_LIBM=y -CONFIG_CMP=y -CONFIG_DIFF=y -CONFIG_FEATURE_DIFF_LONG_OPTIONS=y -CONFIG_FEATURE_DIFF_DIR=y -CONFIG_ED=y -CONFIG_SED=y -CONFIG_FEATURE_ALLOW_EXEC=y - -# -# Finding Utilities -# -CONFIG_FIND=y -CONFIG_FEATURE_FIND_PRINT0=y -CONFIG_FEATURE_FIND_MTIME=y -CONFIG_FEATURE_FIND_MMIN=y -CONFIG_FEATURE_FIND_PERM=y -CONFIG_FEATURE_FIND_TYPE=y -CONFIG_FEATURE_FIND_XDEV=y -CONFIG_FEATURE_FIND_MAXDEPTH=y -CONFIG_FEATURE_FIND_NEWER=y -CONFIG_FEATURE_FIND_INUM=y -CONFIG_FEATURE_FIND_EXEC=y -CONFIG_FEATURE_FIND_USER=y -CONFIG_FEATURE_FIND_GROUP=y -CONFIG_FEATURE_FIND_NOT=y -CONFIG_FEATURE_FIND_DEPTH=y -CONFIG_FEATURE_FIND_PAREN=y -CONFIG_FEATURE_FIND_SIZE=y -CONFIG_FEATURE_FIND_PRUNE=y -CONFIG_FEATURE_FIND_DELETE=y -CONFIG_FEATURE_FIND_PATH=y -CONFIG_FEATURE_FIND_REGEX=y -# CONFIG_FEATURE_FIND_CONTEXT is not set -CONFIG_FEATURE_FIND_LINKS=y -CONFIG_GREP=y -CONFIG_FEATURE_GREP_EGREP_ALIAS=y -CONFIG_FEATURE_GREP_FGREP_ALIAS=y -CONFIG_FEATURE_GREP_CONTEXT=y -CONFIG_XARGS=y -CONFIG_FEATURE_XARGS_SUPPORT_CONFIRMATION=y -CONFIG_FEATURE_XARGS_SUPPORT_QUOTES=y -CONFIG_FEATURE_XARGS_SUPPORT_TERMOPT=y -CONFIG_FEATURE_XARGS_SUPPORT_ZERO_TERM=y - -# -# Init Utilities -# -CONFIG_BOOTCHARTD=y -CONFIG_FEATURE_BOOTCHARTD_BLOATED_HEADER=y -CONFIG_FEATURE_BOOTCHARTD_CONFIG_FILE=y -CONFIG_HALT=y -# CONFIG_FEATURE_CALL_TELINIT is not set -CONFIG_TELINIT_PATH="" -CONFIG_INIT=y -CONFIG_FEATURE_USE_INITTAB=y -# CONFIG_FEATURE_KILL_REMOVED is not set -CONFIG_FEATURE_KILL_DELAY=0 -CONFIG_FEATURE_INIT_SCTTY=y -CONFIG_FEATURE_INIT_SYSLOG=y -CONFIG_FEATURE_EXTRA_QUIET=y -CONFIG_FEATURE_INIT_COREDUMPS=y -CONFIG_FEATURE_INITRD=y -CONFIG_INIT_TERMINAL_TYPE="linux" -CONFIG_MESG=y -CONFIG_FEATURE_MESG_ENABLE_ONLY_GROUP=y - -# -# Login/Password Management Utilities -# -CONFIG_ADD_SHELL=y -CONFIG_REMOVE_SHELL=y -CONFIG_FEATURE_SHADOWPASSWDS=y -CONFIG_USE_BB_PWD_GRP=y -CONFIG_USE_BB_SHADOW=y -CONFIG_USE_BB_CRYPT=y -CONFIG_USE_BB_CRYPT_SHA=y -CONFIG_ADDUSER=y -CONFIG_FEATURE_ADDUSER_LONG_OPTIONS=y -# CONFIG_FEATURE_CHECK_NAMES is not set -CONFIG_FIRST_SYSTEM_ID=100 -CONFIG_LAST_SYSTEM_ID=999 -CONFIG_ADDGROUP=y -CONFIG_FEATURE_ADDGROUP_LONG_OPTIONS=y -CONFIG_FEATURE_ADDUSER_TO_GROUP=y -CONFIG_DELUSER=y -CONFIG_DELGROUP=y -CONFIG_FEATURE_DEL_USER_FROM_GROUP=y -CONFIG_GETTY=y -CONFIG_LOGIN=y -# CONFIG_PAM is not set -CONFIG_LOGIN_SCRIPTS=y -CONFIG_FEATURE_NOLOGIN=y -CONFIG_FEATURE_SECURETTY=y -CONFIG_PASSWD=y -CONFIG_FEATURE_PASSWD_WEAK_CHECK=y -CONFIG_CRYPTPW=y -CONFIG_CHPASSWD=y -CONFIG_SU=y -CONFIG_FEATURE_SU_SYSLOG=y -CONFIG_FEATURE_SU_CHECKS_SHELLS=y -CONFIG_SULOGIN=y -CONFIG_VLOCK=y - -# -# Linux Ext2 FS Progs -# -CONFIG_CHATTR=y -CONFIG_FSCK=y -CONFIG_LSATTR=y -# CONFIG_TUNE2FS is not set - -# -# Linux Module Utilities -# -# CONFIG_MODINFO is not set -# CONFIG_MODPROBE_SMALL is not set -# CONFIG_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE is not set -# CONFIG_FEATURE_MODPROBE_SMALL_CHECK_ALREADY_LOADED is not set -CONFIG_INSMOD=y -CONFIG_RMMOD=y -CONFIG_LSMOD=y -# CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT is not set -CONFIG_MODPROBE=y -# CONFIG_FEATURE_MODPROBE_BLACKLIST is not set -# CONFIG_DEPMOD is not set - -# -# Options common to multiple modutils -# -# CONFIG_FEATURE_2_4_MODULES is not set -# CONFIG_FEATURE_INSMOD_TRY_MMAP is not set -# CONFIG_FEATURE_INSMOD_VERSION_CHECKING is not set -# CONFIG_FEATURE_INSMOD_KSYMOOPS_SYMBOLS is not set -# CONFIG_FEATURE_INSMOD_LOADINKMEM is not set -# CONFIG_FEATURE_INSMOD_LOAD_MAP is not set -# CONFIG_FEATURE_INSMOD_LOAD_MAP_FULL is not set -CONFIG_FEATURE_CHECK_TAINTED_MODULE=y -CONFIG_FEATURE_MODUTILS_ALIAS=y -CONFIG_FEATURE_MODUTILS_SYMBOLS=y -CONFIG_DEFAULT_MODULES_DIR="/lib/modules" -CONFIG_DEFAULT_DEPMOD_FILE="modules.dep" - -# -# Linux System Utilities -# -CONFIG_BLOCKDEV=y -CONFIG_REV=y -CONFIG_ACPID=y -CONFIG_FEATURE_ACPID_COMPAT=y -CONFIG_BLKID=y -# CONFIG_FEATURE_BLKID_TYPE is not set -CONFIG_DMESG=y -CONFIG_FEATURE_DMESG_PRETTY=y -CONFIG_FBSET=y -CONFIG_FEATURE_FBSET_FANCY=y -CONFIG_FEATURE_FBSET_READMODE=y -CONFIG_FDFLUSH=y -CONFIG_FDFORMAT=y -CONFIG_FDISK=y -# CONFIG_FDISK_SUPPORT_LARGE_DISKS is not set -CONFIG_FEATURE_FDISK_WRITABLE=y -# CONFIG_FEATURE_AIX_LABEL is not set -# CONFIG_FEATURE_SGI_LABEL is not set -# CONFIG_FEATURE_SUN_LABEL is not set -# CONFIG_FEATURE_OSF_LABEL is not set -# CONFIG_FEATURE_GPT_LABEL is not set -CONFIG_FEATURE_FDISK_ADVANCED=y -CONFIG_FINDFS=y -CONFIG_FLOCK=y -CONFIG_FREERAMDISK=y -CONFIG_FSCK_MINIX=y -CONFIG_MKFS_EXT2=y -CONFIG_MKFS_MINIX=y -CONFIG_FEATURE_MINIX2=y -# CONFIG_MKFS_REISER is not set -CONFIG_MKFS_VFAT=y -CONFIG_GETOPT=y -CONFIG_FEATURE_GETOPT_LONG=y -CONFIG_HEXDUMP=y -CONFIG_FEATURE_HEXDUMP_REVERSE=y -CONFIG_HD=y -CONFIG_HWCLOCK=y -CONFIG_FEATURE_HWCLOCK_LONG_OPTIONS=y -CONFIG_FEATURE_HWCLOCK_ADJTIME_FHS=y -CONFIG_IPCRM=y -CONFIG_IPCS=y -CONFIG_LOSETUP=y -CONFIG_LSPCI=y -CONFIG_LSUSB=y -CONFIG_MDEV=y -CONFIG_FEATURE_MDEV_CONF=y -CONFIG_FEATURE_MDEV_RENAME=y -CONFIG_FEATURE_MDEV_RENAME_REGEXP=y -CONFIG_FEATURE_MDEV_EXEC=y -CONFIG_FEATURE_MDEV_LOAD_FIRMWARE=y -CONFIG_MKSWAP=y -CONFIG_FEATURE_MKSWAP_UUID=y -CONFIG_MORE=y -CONFIG_MOUNT=y -CONFIG_FEATURE_MOUNT_FAKE=y -CONFIG_FEATURE_MOUNT_VERBOSE=y -# CONFIG_FEATURE_MOUNT_HELPERS is not set -CONFIG_FEATURE_MOUNT_LABEL=y -CONFIG_FEATURE_MOUNT_NFS=y -CONFIG_FEATURE_MOUNT_CIFS=y -CONFIG_FEATURE_MOUNT_FLAGS=y -CONFIG_FEATURE_MOUNT_FSTAB=y -CONFIG_PIVOT_ROOT=y -CONFIG_RDATE=y -CONFIG_RDEV=y -CONFIG_READPROFILE=y -CONFIG_RTCWAKE=y -CONFIG_SCRIPT=y -CONFIG_SCRIPTREPLAY=y -CONFIG_SETARCH=y -CONFIG_SWAPONOFF=y -CONFIG_FEATURE_SWAPON_PRI=y -CONFIG_SWITCH_ROOT=y -CONFIG_UMOUNT=y -CONFIG_FEATURE_UMOUNT_ALL=y - -# -# Common options for mount/umount -# -CONFIG_FEATURE_MOUNT_LOOP=y -CONFIG_FEATURE_MOUNT_LOOP_CREATE=y -# CONFIG_FEATURE_MTAB_SUPPORT is not set -CONFIG_VOLUMEID=y - -# -# Filesystem/Volume identification -# -CONFIG_FEATURE_VOLUMEID_EXT=y -CONFIG_FEATURE_VOLUMEID_BTRFS=y -CONFIG_FEATURE_VOLUMEID_REISERFS=y -CONFIG_FEATURE_VOLUMEID_FAT=y -CONFIG_FEATURE_VOLUMEID_HFS=y -CONFIG_FEATURE_VOLUMEID_JFS=y -CONFIG_FEATURE_VOLUMEID_XFS=y -CONFIG_FEATURE_VOLUMEID_NTFS=y -CONFIG_FEATURE_VOLUMEID_ISO9660=y -CONFIG_FEATURE_VOLUMEID_UDF=y -CONFIG_FEATURE_VOLUMEID_LUKS=y -CONFIG_FEATURE_VOLUMEID_LINUXSWAP=y -CONFIG_FEATURE_VOLUMEID_CRAMFS=y -CONFIG_FEATURE_VOLUMEID_ROMFS=y -CONFIG_FEATURE_VOLUMEID_SYSV=y -CONFIG_FEATURE_VOLUMEID_OCFS2=y -CONFIG_FEATURE_VOLUMEID_LINUXRAID=y - -# -# Miscellaneous Utilities -# -# CONFIG_CONSPY is not set -CONFIG_LESS=y -CONFIG_FEATURE_LESS_MAXLINES=9999999 -CONFIG_FEATURE_LESS_BRACKETS=y -CONFIG_FEATURE_LESS_FLAGS=y -CONFIG_FEATURE_LESS_MARKS=y -CONFIG_FEATURE_LESS_REGEXP=y -CONFIG_FEATURE_LESS_WINCH=y -CONFIG_FEATURE_LESS_ASK_TERMINAL=y -CONFIG_FEATURE_LESS_DASHCMD=y -CONFIG_FEATURE_LESS_LINENUMS=y -# CONFIG_NANDWRITE is not set -# CONFIG_NANDDUMP is not set -CONFIG_SETSERIAL=y -CONFIG_UBIATTACH=y -CONFIG_UBIDETACH=y -CONFIG_UBIMKVOL=y -CONFIG_UBIRMVOL=y -CONFIG_UBIRSVOL=y -CONFIG_UBIUPDATEVOL=y -CONFIG_ADJTIMEX=y -# CONFIG_BBCONFIG is not set -# CONFIG_FEATURE_COMPRESS_BBCONFIG is not set -CONFIG_BEEP=y -CONFIG_FEATURE_BEEP_FREQ=4000 -CONFIG_FEATURE_BEEP_LENGTH_MS=30 -CONFIG_CHAT=y -CONFIG_FEATURE_CHAT_NOFAIL=y -# CONFIG_FEATURE_CHAT_TTY_HIFI is not set -CONFIG_FEATURE_CHAT_IMPLICIT_CR=y -CONFIG_FEATURE_CHAT_SWALLOW_OPTS=y -CONFIG_FEATURE_CHAT_SEND_ESCAPES=y -CONFIG_FEATURE_CHAT_VAR_ABORT_LEN=y -CONFIG_FEATURE_CHAT_CLR_ABORT=y -CONFIG_CHRT=y -CONFIG_CROND=y -CONFIG_FEATURE_CROND_D=y -CONFIG_FEATURE_CROND_CALL_SENDMAIL=y -CONFIG_FEATURE_CROND_DIR="/var/spool/cron" -CONFIG_CRONTAB=y -CONFIG_DC=y -CONFIG_FEATURE_DC_LIBM=y -# CONFIG_DEVFSD is not set -# CONFIG_DEVFSD_MODLOAD is not set -# CONFIG_DEVFSD_FG_NP is not set -# CONFIG_DEVFSD_VERBOSE is not set -# CONFIG_FEATURE_DEVFS is not set -CONFIG_DEVMEM=y -CONFIG_EJECT=y -CONFIG_FEATURE_EJECT_SCSI=y -CONFIG_FBSPLASH=y -# CONFIG_FLASHCP is not set -# CONFIG_FLASH_LOCK is not set -# CONFIG_FLASH_UNLOCK is not set -# CONFIG_FLASH_ERASEALL is not set -CONFIG_IONICE=y -# CONFIG_INOTIFYD is not set -CONFIG_LAST=y -# CONFIG_FEATURE_LAST_SMALL is not set -CONFIG_FEATURE_LAST_FANCY=y -CONFIG_HDPARM=y -CONFIG_FEATURE_HDPARM_GET_IDENTITY=y -CONFIG_FEATURE_HDPARM_HDIO_SCAN_HWIF=y -CONFIG_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF=y -CONFIG_FEATURE_HDPARM_HDIO_DRIVE_RESET=y -CONFIG_FEATURE_HDPARM_HDIO_TRISTATE_HWIF=y -CONFIG_FEATURE_HDPARM_HDIO_GETSET_DMA=y -CONFIG_MAKEDEVS=y -# CONFIG_FEATURE_MAKEDEVS_LEAF is not set -CONFIG_FEATURE_MAKEDEVS_TABLE=y -CONFIG_MAN=y -CONFIG_MICROCOM=y -CONFIG_MOUNTPOINT=y -CONFIG_MT=y -CONFIG_RAIDAUTORUN=y -CONFIG_READAHEAD=y -# CONFIG_RFKILL is not set -CONFIG_RUNLEVEL=y -CONFIG_RX=y -CONFIG_SETSID=y -CONFIG_STRINGS=y -# CONFIG_TASKSET is not set -# CONFIG_FEATURE_TASKSET_FANCY is not set -CONFIG_TIME=y -CONFIG_TIMEOUT=y -CONFIG_TTYSIZE=y -CONFIG_VOLNAME=y -CONFIG_WALL=y -CONFIG_WATCHDOG=y - -# -# Networking Utilities -# -CONFIG_NAMEIF=y -CONFIG_FEATURE_NAMEIF_EXTENDED=y -CONFIG_NBDCLIENT=y -CONFIG_NC=y -CONFIG_NC_SERVER=y -CONFIG_NC_EXTRA=y -# CONFIG_NC_110_COMPAT is not set -CONFIG_PING=y -CONFIG_PING6=y -CONFIG_FEATURE_FANCY_PING=y -CONFIG_WHOIS=y -CONFIG_FEATURE_IPV6=y -# CONFIG_FEATURE_UNIX_LOCAL is not set -CONFIG_FEATURE_PREFER_IPV4_ADDRESS=y -# CONFIG_VERBOSE_RESOLUTION_ERRORS is not set -CONFIG_ARP=y -CONFIG_ARPING=y -CONFIG_BRCTL=y -CONFIG_FEATURE_BRCTL_FANCY=y -CONFIG_FEATURE_BRCTL_SHOW=y -CONFIG_DNSD=y -CONFIG_ETHER_WAKE=y -CONFIG_FAKEIDENTD=y -CONFIG_FTPD=y -CONFIG_FEATURE_FTP_WRITE=y -CONFIG_FEATURE_FTPD_ACCEPT_BROKEN_LIST=y -CONFIG_FTPGET=y -CONFIG_FTPPUT=y -CONFIG_FEATURE_FTPGETPUT_LONG_OPTIONS=y -CONFIG_HOSTNAME=y -CONFIG_HTTPD=y -CONFIG_FEATURE_HTTPD_RANGES=y -CONFIG_FEATURE_HTTPD_USE_SENDFILE=y -CONFIG_FEATURE_HTTPD_SETUID=y -CONFIG_FEATURE_HTTPD_BASIC_AUTH=y -CONFIG_FEATURE_HTTPD_AUTH_MD5=y -CONFIG_FEATURE_HTTPD_CGI=y -CONFIG_FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR=y -CONFIG_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV=y -CONFIG_FEATURE_HTTPD_ENCODE_URL_STR=y -CONFIG_FEATURE_HTTPD_ERROR_PAGES=y -CONFIG_FEATURE_HTTPD_PROXY=y -CONFIG_FEATURE_HTTPD_GZIP=y -CONFIG_IFCONFIG=y -CONFIG_FEATURE_IFCONFIG_STATUS=y -CONFIG_FEATURE_IFCONFIG_SLIP=y -CONFIG_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ=y -CONFIG_FEATURE_IFCONFIG_HW=y -CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS=y -CONFIG_IFENSLAVE=y -CONFIG_IFPLUGD=y -CONFIG_IFUPDOWN=y -CONFIG_IFUPDOWN_IFSTATE_PATH="/var/run/ifstate" -# CONFIG_FEATURE_IFUPDOWN_IP is not set -# CONFIG_FEATURE_IFUPDOWN_IP_BUILTIN is not set -CONFIG_FEATURE_IFUPDOWN_IFCONFIG_BUILTIN=y -CONFIG_FEATURE_IFUPDOWN_IPV4=y -CONFIG_FEATURE_IFUPDOWN_IPV6=y -CONFIG_FEATURE_IFUPDOWN_MAPPING=y -# CONFIG_FEATURE_IFUPDOWN_EXTERNAL_DHCP is not set -CONFIG_INETD=y -CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_ECHO=y -CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DISCARD=y -CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_TIME=y -CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DAYTIME=y -CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_CHARGEN=y -CONFIG_FEATURE_INETD_RPC=y -CONFIG_IP=y -CONFIG_FEATURE_IP_ADDRESS=y -CONFIG_FEATURE_IP_LINK=y -CONFIG_FEATURE_IP_ROUTE=y -CONFIG_FEATURE_IP_TUNNEL=y -CONFIG_FEATURE_IP_RULE=y -CONFIG_FEATURE_IP_SHORT_FORMS=y -# CONFIG_FEATURE_IP_RARE_PROTOCOLS is not set -CONFIG_IPADDR=y -CONFIG_IPLINK=y -CONFIG_IPROUTE=y -CONFIG_IPTUNNEL=y -CONFIG_IPRULE=y -CONFIG_IPCALC=y -CONFIG_FEATURE_IPCALC_FANCY=y -CONFIG_FEATURE_IPCALC_LONG_OPTIONS=y -CONFIG_NETSTAT=y -CONFIG_FEATURE_NETSTAT_WIDE=y -CONFIG_FEATURE_NETSTAT_PRG=y -CONFIG_NSLOOKUP=y -CONFIG_NTPD=y -CONFIG_FEATURE_NTPD_SERVER=y -CONFIG_PSCAN=y -CONFIG_ROUTE=y -CONFIG_SLATTACH=y -CONFIG_TCPSVD=y -CONFIG_TELNET=y -CONFIG_FEATURE_TELNET_TTYPE=y -CONFIG_FEATURE_TELNET_AUTOLOGIN=y -CONFIG_TELNETD=y -CONFIG_FEATURE_TELNETD_STANDALONE=y -CONFIG_FEATURE_TELNETD_INETD_WAIT=y -CONFIG_TFTP=y -CONFIG_TFTPD=y - -# -# Common options for tftp/tftpd -# -CONFIG_FEATURE_TFTP_GET=y -CONFIG_FEATURE_TFTP_PUT=y -CONFIG_FEATURE_TFTP_BLOCKSIZE=y -CONFIG_FEATURE_TFTP_PROGRESS_BAR=y -# CONFIG_TFTP_DEBUG is not set -CONFIG_TRACEROUTE=y -CONFIG_TRACEROUTE6=y -CONFIG_FEATURE_TRACEROUTE_VERBOSE=y -# CONFIG_FEATURE_TRACEROUTE_SOURCE_ROUTE is not set -# CONFIG_FEATURE_TRACEROUTE_USE_ICMP is not set -CONFIG_TUNCTL=y -CONFIG_FEATURE_TUNCTL_UG=y -CONFIG_UDHCPD=y -CONFIG_DHCPRELAY=y -CONFIG_DUMPLEASES=y -CONFIG_FEATURE_UDHCPD_WRITE_LEASES_EARLY=y -# CONFIG_FEATURE_UDHCPD_BASE_IP_ON_MAC is not set -CONFIG_DHCPD_LEASES_FILE="/var/lib/misc/udhcpd.leases" -CONFIG_UDHCPC=y -CONFIG_FEATURE_UDHCPC_ARPING=y -# CONFIG_FEATURE_UDHCP_PORT is not set -CONFIG_UDHCP_DEBUG=9 -CONFIG_FEATURE_UDHCP_RFC3397=y -CONFIG_FEATURE_UDHCP_8021Q=y -CONFIG_UDHCPC_DEFAULT_SCRIPT="/usr/share/udhcpc/default.script" -CONFIG_UDHCPC_SLACK_FOR_BUGGY_SERVERS=80 -CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS="-R -n" -CONFIG_UDPSVD=y -CONFIG_VCONFIG=y -CONFIG_WGET=y -CONFIG_FEATURE_WGET_STATUSBAR=y -CONFIG_FEATURE_WGET_AUTHENTICATION=y -CONFIG_FEATURE_WGET_LONG_OPTIONS=y -CONFIG_FEATURE_WGET_TIMEOUT=y -CONFIG_ZCIP=y - -# -# Print Utilities -# -CONFIG_LPD=y -CONFIG_LPR=y -CONFIG_LPQ=y - -# -# Mail Utilities -# -CONFIG_MAKEMIME=y -CONFIG_FEATURE_MIME_CHARSET="us-ascii" -CONFIG_POPMAILDIR=y -CONFIG_FEATURE_POPMAILDIR_DELIVERY=y -CONFIG_REFORMIME=y -CONFIG_FEATURE_REFORMIME_COMPAT=y -CONFIG_SENDMAIL=y - -# -# Process Utilities -# -CONFIG_IOSTAT=y -CONFIG_MPSTAT=y -CONFIG_NMETER=y -CONFIG_PMAP=y -CONFIG_POWERTOP=y -CONFIG_PSTREE=y -CONFIG_PWDX=y -CONFIG_SMEMCAP=y -CONFIG_UPTIME=y -CONFIG_FEATURE_UPTIME_UTMP_SUPPORT=y -CONFIG_FREE=y -CONFIG_FUSER=y -CONFIG_KILL=y -CONFIG_KILLALL=y -CONFIG_KILLALL5=y -CONFIG_PGREP=y -CONFIG_PIDOF=y -CONFIG_FEATURE_PIDOF_SINGLE=y -CONFIG_FEATURE_PIDOF_OMIT=y -CONFIG_PKILL=y -CONFIG_PS=y -CONFIG_FEATURE_PS_WIDE=y -# CONFIG_FEATURE_PS_TIME is not set -# CONFIG_FEATURE_PS_ADDITIONAL_COLUMNS is not set -# CONFIG_FEATURE_PS_UNUSUAL_SYSTEMS is not set -CONFIG_RENICE=y -CONFIG_BB_SYSCTL=y -CONFIG_TOP=y -CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE=y -CONFIG_FEATURE_TOP_CPU_GLOBAL_PERCENTS=y -CONFIG_FEATURE_TOP_SMP_CPU=y -CONFIG_FEATURE_TOP_DECIMALS=y -CONFIG_FEATURE_TOP_SMP_PROCESS=y -CONFIG_FEATURE_TOPMEM=y -CONFIG_FEATURE_SHOW_THREADS=y -CONFIG_WATCH=y - -# -# Runit Utilities -# -CONFIG_RUNSV=y -CONFIG_RUNSVDIR=y -# CONFIG_FEATURE_RUNSVDIR_LOG is not set -CONFIG_SV=y -CONFIG_SV_DEFAULT_SERVICE_DIR="/var/service" -CONFIG_SVLOGD=y -CONFIG_CHPST=y -CONFIG_SETUIDGID=y -CONFIG_ENVUIDGID=y -CONFIG_ENVDIR=y -CONFIG_SOFTLIMIT=y -# CONFIG_CHCON is not set -# CONFIG_FEATURE_CHCON_LONG_OPTIONS is not set -# CONFIG_GETENFORCE is not set -# CONFIG_GETSEBOOL is not set -# CONFIG_LOAD_POLICY is not set -# CONFIG_MATCHPATHCON is not set -# CONFIG_RESTORECON is not set -# CONFIG_RUNCON is not set -# CONFIG_FEATURE_RUNCON_LONG_OPTIONS is not set -# CONFIG_SELINUXENABLED is not set -# CONFIG_SETENFORCE is not set -# CONFIG_SETFILES is not set -# CONFIG_FEATURE_SETFILES_CHECK_OPTION is not set -# CONFIG_SETSEBOOL is not set -# CONFIG_SESTATUS is not set - -# -# Shells -# -CONFIG_ASH=y -CONFIG_ASH_BASH_COMPAT=y -# CONFIG_ASH_IDLE_TIMEOUT is not set -CONFIG_ASH_JOB_CONTROL=y -CONFIG_ASH_ALIAS=y -CONFIG_ASH_GETOPTS=y -CONFIG_ASH_BUILTIN_ECHO=y -CONFIG_ASH_BUILTIN_PRINTF=y -CONFIG_ASH_BUILTIN_TEST=y -CONFIG_ASH_CMDCMD=y -# CONFIG_ASH_MAIL is not set -CONFIG_ASH_OPTIMIZE_FOR_SIZE=y -CONFIG_ASH_RANDOM_SUPPORT=y -CONFIG_ASH_EXPAND_PRMT=y -CONFIG_CTTYHACK=y -CONFIG_HUSH=y -CONFIG_HUSH_BASH_COMPAT=y -CONFIG_HUSH_BRACE_EXPANSION=y -CONFIG_HUSH_HELP=y -CONFIG_HUSH_INTERACTIVE=y -CONFIG_HUSH_SAVEHISTORY=y -CONFIG_HUSH_JOB=y -CONFIG_HUSH_TICK=y -CONFIG_HUSH_IF=y -CONFIG_HUSH_LOOPS=y -CONFIG_HUSH_CASE=y -CONFIG_HUSH_FUNCTIONS=y -CONFIG_HUSH_LOCAL=y -CONFIG_HUSH_RANDOM_SUPPORT=y -CONFIG_HUSH_EXPORT_N=y -CONFIG_HUSH_MODE_X=y -# CONFIG_MSH is not set -CONFIG_FEATURE_SH_IS_ASH=y -# CONFIG_FEATURE_SH_IS_HUSH is not set -# CONFIG_FEATURE_SH_IS_NONE is not set -# CONFIG_FEATURE_BASH_IS_ASH is not set -# CONFIG_FEATURE_BASH_IS_HUSH is not set -CONFIG_FEATURE_BASH_IS_NONE=y -CONFIG_SH_MATH_SUPPORT=y -CONFIG_SH_MATH_SUPPORT_64=y -CONFIG_FEATURE_SH_EXTRA_QUIET=y -# CONFIG_FEATURE_SH_STANDALONE is not set -# CONFIG_FEATURE_SH_NOFORK is not set -CONFIG_FEATURE_SH_HISTFILESIZE=y - -# -# System Logging Utilities -# -CONFIG_SYSLOGD=y -CONFIG_FEATURE_ROTATE_LOGFILE=y -CONFIG_FEATURE_REMOTE_LOG=y -CONFIG_FEATURE_SYSLOGD_DUP=y -CONFIG_FEATURE_SYSLOGD_CFG=y -CONFIG_FEATURE_SYSLOGD_READ_BUFFER_SIZE=256 -CONFIG_FEATURE_IPC_SYSLOG=y -CONFIG_FEATURE_IPC_SYSLOG_BUFFER_SIZE=16 -CONFIG_LOGREAD=y -CONFIG_FEATURE_LOGREAD_REDUCED_LOCKING=y -CONFIG_KLOGD=y -CONFIG_FEATURE_KLOGD_KLOGCTL=y -CONFIG_LOGGER=y diff --git a/meta-fsl-ppc/recipes-append/busybox/busybox-1.20.2/inetd b/meta-fsl-ppc/recipes-append/busybox/busybox-1.20.2/inetd deleted file mode 100644 index cf50bcd5..00000000 --- a/meta-fsl-ppc/recipes-append/busybox/busybox-1.20.2/inetd +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/sh -# -# start/stop inetd super server. - -if ! [ -x /usr/sbin/inetd ]; then - exit 0 -fi - -case "$1" in - start) - echo -n "Starting internet superserver:" - echo -n " inetd" ; start-stop-daemon -S -x /usr/sbin/inetd > /dev/null - echo "." - ;; - stop) - echo -n "Stopping internet superserver:" - echo -n " inetd" ; start-stop-daemon -K -x /usr/sbin/inetd > /dev/null - echo "." - ;; - restart) - echo -n "Restarting internet superserver:" - echo -n " inetd " - killall -HUP inetd - echo "." - ;; - *) - echo "Usage: /etc/init.d/inetd {start|stop|restart}" - exit 1 - ;; -esac - -exit 0 - diff --git a/meta-fsl-ppc/recipes-append/busybox/busybox-1.20.2/inetd.conf b/meta-fsl-ppc/recipes-append/busybox/busybox-1.20.2/inetd.conf deleted file mode 100644 index b02fe850..00000000 --- a/meta-fsl-ppc/recipes-append/busybox/busybox-1.20.2/inetd.conf +++ /dev/null @@ -1,20 +0,0 @@ -# /etc/inetd.conf: see inetd(8) for further informations. -# -# Internet server configuration database -# -# If you want to disable an entry so it isn't touched during -# package updates just comment it out with a single '#' character. -# -# -# -#:INTERNAL: Internal services -#echo stream tcp nowait root internal -#echo dgram udp wait root internal -#chargen stream tcp nowait root internal -#chargen dgram udp wait root internal -#discard stream tcp nowait root internal -#discard dgram udp wait root internal -#daytime stream tcp nowait root internal -#daytime dgram udp wait root internal -#time stream tcp nowait root internal -#time dgram udp wait root internal diff --git a/meta-fsl-ppc/recipes-append/busybox/busybox_1.20.2.bbappend b/meta-fsl-ppc/recipes-append/busybox/busybox_1.20.2.bbappend index 9c52eeb1..8445337a 100644 --- a/meta-fsl-ppc/recipes-append/busybox/busybox_1.20.2.bbappend +++ b/meta-fsl-ppc/recipes-append/busybox/busybox_1.20.2.bbappend @@ -1,15 +1,2 @@ -PR_append_fsl = "+${DISTRO}.0" - -FILESEXTRAPATHS_prepend_fsl := "${THISDIR}/busybox-1.20.2:" - -SRC_URI_append_fsl += "file://defconfig-fsl \ - file://busybox-1.19.4-ubi-user-h.patch \ - file://inetd \ - file://inetd.conf \ -" - -do_configure_prepend_fsl () { - cp ${WORKDIR}/defconfig-fsl ${WORKDIR}/defconfig -} - +PRINC := "${@int(PRINC) + 1}" -- cgit v1.2.3-54-g00ecf From 7a468bfdd445ffede011a0a91032e0c7065612e5 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Tue, 12 Mar 2013 09:30:45 +0000 Subject: oprofile: remove useless patches There patches is useless since bb file had been removed in commit: commit 330e7d07a6c6881ea47038dc7c9d0a588d5218c8 Author: Matthew McClintock Date: Thu Jan 17 12:46:12 2013 -0600 oprofile: remove from meta-fsl-ppc and use oe-core Signed-off-by: Ting Liu --- ...ile-0.9.6-add-e500mc-support-in-op_events.patch | 17 -- .../oprofile/oprofile-0.9.6-e500mc-support-2.patch | 37 ---- .../oprofile/oprofile-0.9.6-e500mc-support.patch | 171 --------------- .../oprofile/oprofile-no-query-modules.patch | 29 --- .../recipes-kernel/oprofile/oprofile/opstart.patch | 237 --------------------- 5 files changed, 491 deletions(-) delete mode 100644 meta-fsl-ppc/recipes-kernel/oprofile/oprofile/oprofile-0.9.6-add-e500mc-support-in-op_events.patch delete mode 100644 meta-fsl-ppc/recipes-kernel/oprofile/oprofile/oprofile-0.9.6-e500mc-support-2.patch delete mode 100644 meta-fsl-ppc/recipes-kernel/oprofile/oprofile/oprofile-0.9.6-e500mc-support.patch delete mode 100644 meta-fsl-ppc/recipes-kernel/oprofile/oprofile/oprofile-no-query-modules.patch delete mode 100644 meta-fsl-ppc/recipes-kernel/oprofile/oprofile/opstart.patch diff --git a/meta-fsl-ppc/recipes-kernel/oprofile/oprofile/oprofile-0.9.6-add-e500mc-support-in-op_events.patch b/meta-fsl-ppc/recipes-kernel/oprofile/oprofile/oprofile-0.9.6-add-e500mc-support-in-op_events.patch deleted file mode 100644 index 2409a63a..00000000 --- a/meta-fsl-ppc/recipes-kernel/oprofile/oprofile/oprofile-0.9.6-add-e500mc-support-in-op_events.patch +++ /dev/null @@ -1,17 +0,0 @@ -Upstream-Status: Pending - -Add e500mc support in libop/op_events.c - -Signed-off-by: Zhenhua Luo -=============================================================================== -diff -urN oprofile-0.9.6/libop/op_events.c oprofile-0.9.6-new/libop/op_events.c ---- oprofile-0.9.6/libop/op_events.c 2009-11-24 23:25:17.000000000 +0800 -+++ oprofile-0.9.6-new/libop/op_events.c 2010-08-19 11:13:15.000000000 +0800 -@@ -1062,6 +1062,7 @@ - - case CPU_PPC_E500: - case CPU_PPC_E500_2: -+ case CPU_PPC_E500MC: - case CPU_PPC_E300: - descr->name = "CPU_CLK"; - break; diff --git a/meta-fsl-ppc/recipes-kernel/oprofile/oprofile/oprofile-0.9.6-e500mc-support-2.patch b/meta-fsl-ppc/recipes-kernel/oprofile/oprofile/oprofile-0.9.6-e500mc-support-2.patch deleted file mode 100644 index 297b954c..00000000 --- a/meta-fsl-ppc/recipes-kernel/oprofile/oprofile/oprofile-0.9.6-e500mc-support-2.patch +++ /dev/null @@ -1,37 +0,0 @@ -Upstream-Status: Pending - -Add e500mc event in oprofile Makefile to add e500mc support - -Signed-off-by: Luo Zhenhua -=============================================================================== -diff -urN oprofile-0.9.6-old/events/Makefile.am oprofile-0.9.6/events/Makefile.am ---- oprofile-0.9.6-old/events/Makefile.am 2009-11-24 23:25:18.000000000 +0800 -+++ oprofile-0.9.6/events/Makefile.am 2010-08-13 15:23:24.000000000 +0800 -@@ -55,6 +55,7 @@ - mips/vr5500/events mips/vr5500/unit_masks \ - ppc/7450/events ppc/7450/unit_masks \ - ppc/e500/events ppc/e500/unit_masks \ -+ ppc/e500mc/events ppc/e500mc/unit_masks \ - ppc/e500v2/events ppc/e500v2/unit_masks \ - ppc/e300/events ppc/e300/unit_masks - -diff -urN oprofile-0.9.6-old/events/Makefile.in oprofile-0.9.6/events/Makefile.in ---- oprofile-0.9.6-old/events/Makefile.in 2009-11-24 23:25:48.000000000 +0800 -+++ oprofile-0.9.6/events/Makefile.in 2010-08-13 15:23:03.000000000 +0800 -@@ -258,6 +258,7 @@ - mips/vr5500/events mips/vr5500/unit_masks \ - ppc/7450/events ppc/7450/unit_masks \ - ppc/e500/events ppc/e500/unit_masks \ -+ ppc/e500mc/events ppc/e500mc/unit_masks \ - ppc/e500v2/events ppc/e500v2/unit_masks \ - ppc/e300/events ppc/e300/unit_masks - -@@ -312,7 +313,7 @@ - - - distdir: $(DISTFILES) -- $(mkdir_p) $(distdir)/alpha/ev4 $(distdir)/alpha/ev5 $(distdir)/alpha/ev6 $(distdir)/alpha/ev67 $(distdir)/alpha/pca56 $(distdir)/arm/armv6 $(distdir)/arm/armv7 $(distdir)/arm/mpcore $(distdir)/arm/xscale1 $(distdir)/arm/xscale2 $(distdir)/avr32 $(distdir)/i386/arch_perfmon $(distdir)/i386/athlon $(distdir)/i386/atom $(distdir)/i386/core $(distdir)/i386/core_2 $(distdir)/i386/core_i7 $(distdir)/i386/nehalem $(distdir)/i386/p4 $(distdir)/i386/p4-ht $(distdir)/i386/p6_mobile $(distdir)/i386/pii $(distdir)/i386/piii $(distdir)/i386/ppro $(distdir)/ia64/ia64 $(distdir)/ia64/itanium $(distdir)/ia64/itanium2 $(distdir)/mips/20K $(distdir)/mips/24K $(distdir)/mips/25K $(distdir)/mips/34K $(distdir)/mips/5K $(distdir)/mips/r10000 $(distdir)/mips/r12000 $(distdir)/mips/rm7000 $(distdir)/mips/rm9000 $(distdir)/mips/sb1 $(distdir)/mips/vr5432 $(distdir)/mips/vr5500 $(distdir)/ppc/7450 $(distdir)/ppc/e300 $(distdir)/ppc/e500 $(distdir)/ppc/e500v2 $(distdir)/ppc64/970 $(distdir)/ppc64/970MP $(distdir)/ppc64/cell-be $(distdir)/ppc64/ibm-compat-v1 $(distdir)/ppc64/pa6t $(distdir)/ppc64/power4 $(distdir)/ppc64/power5 $(distdir)/ppc64/power5+ $(distdir)/ppc64/power5++ $(distdir)/ppc64/power6 $(distdir)/ppc64/power7 $(distdir)/rtc $(distdir)/x86-64/family10 $(distdir)/x86-64/family11h $(distdir)/x86-64/hammer -+ $(mkdir_p) $(distdir)/alpha/ev4 $(distdir)/alpha/ev5 $(distdir)/alpha/ev6 $(distdir)/alpha/ev67 $(distdir)/alpha/pca56 $(distdir)/arm/armv6 $(distdir)/arm/armv7 $(distdir)/arm/mpcore $(distdir)/arm/xscale1 $(distdir)/arm/xscale2 $(distdir)/avr32 $(distdir)/i386/arch_perfmon $(distdir)/i386/athlon $(distdir)/i386/atom $(distdir)/i386/core $(distdir)/i386/core_2 $(distdir)/i386/core_i7 $(distdir)/i386/nehalem $(distdir)/i386/p4 $(distdir)/i386/p4-ht $(distdir)/i386/p6_mobile $(distdir)/i386/pii $(distdir)/i386/piii $(distdir)/i386/ppro $(distdir)/ia64/ia64 $(distdir)/ia64/itanium $(distdir)/ia64/itanium2 $(distdir)/mips/20K $(distdir)/mips/24K $(distdir)/mips/25K $(distdir)/mips/34K $(distdir)/mips/5K $(distdir)/mips/r10000 $(distdir)/mips/r12000 $(distdir)/mips/rm7000 $(distdir)/mips/rm9000 $(distdir)/mips/sb1 $(distdir)/mips/vr5432 $(distdir)/mips/vr5500 $(distdir)/ppc/7450 $(distdir)/ppc/e300 $(distdir)/ppc/e500 $(distdir)/ppc/e500mc $(distdir)/ppc/e500v2 $(distdir)/ppc64/970 $(distdir)/ppc64/970MP $(distdir)/ppc64/cell-be $(distdir)/ppc64/ibm-compat-v1 $(distdir)/ppc64/pa6t $(distdir)/ppc64/power4 $(distdir)/ppc64/power5 $(distdir)/ppc64/power5+ $(distdir)/ppc64/power5++ $(distdir)/ppc64/power6 $(distdir)/ppc64/power7 $(distdir)/rtc $(distdir)/x86-64/family10 $(distdir)/x86-64/family11h $(distdir)/x86-64/hammer - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ diff --git a/meta-fsl-ppc/recipes-kernel/oprofile/oprofile/oprofile-0.9.6-e500mc-support.patch b/meta-fsl-ppc/recipes-kernel/oprofile/oprofile/oprofile-0.9.6-e500mc-support.patch deleted file mode 100644 index 022b5bdb..00000000 --- a/meta-fsl-ppc/recipes-kernel/oprofile/oprofile/oprofile-0.9.6-e500mc-support.patch +++ /dev/null @@ -1,171 +0,0 @@ -Upstream-Status: Pending - -Add e500mc event in oprofile to add e500mc support - -Signed-off-by: George Stephen -=============================================================================== -diff -urN oprofile-0.9.6/events/ppc/e500mc/events oprofile-0.9.6-new/events/ppc/e500mc/events ---- oprofile-0.9.6/events/ppc/e500mc/events 1970-01-01 08:00:00.000000000 +0800 -+++ oprofile-0.9.6-new/events/ppc/e500mc/events 2010-08-16 17:57:49.000000000 +0800 -@@ -0,0 +1,120 @@ -+# e500mc Events -+# -+# Copyright (C) 2010 Freescale Semiconductor, Inc. -+# -+event:0x1 counters:0,1,2,3 um:zero minimum:100 name:CPU_CLK : Cycles -+event:0x2 counters:0,1,2,3 um:zero minimum:500 name:COMPLETED_INSNS : Completed Instructions (0, 1, or 2 per cycle) -+event:0x3 counters:0,1,2,3 um:zero minimum:500 name:COMPLETED_OPS : Completed Micro-ops (counts 2 for load/store w/update) -+event:0x4 counters:0,1,2,3 um:zero minimum:500 name:INSTRUCTION_FETCHES : Instruction fetches -+event:0x5 counters:0,1,2,3 um:zero minimum:500 name:DECODED_OPS : Micro-ops decoded -+event:0x8 counters:0,1,2,3 um:zero minimum:500 name:COMPLETED_BRANCHES : Branch Instructions completed -+event:0x9 counters:0,1,2,3 um:zero minimum:500 name:COMPLETED_LOAD_OPS : Load micro-ops completed -+event:0xa counters:0,1,2,3 um:zero minimum:500 name:COMPLETED_STORE_OPS : Store micro-ops completed -+event:0xb counters:0,1,2,3 um:zero minimum:500 name:COMPLETION_REDIRECTS : Number of completion buffer redirects -+event:0xc counters:0,1,2,3 um:zero minimum:500 name:BRANCHES_FINISHED : Branches finished -+event:0xd counters:0,1,2,3 um:zero minimum:500 name:TAKEN_BRANCHES_FINISHED : Taken branches finished -+event:0xe counters:0,1,2,3 um:zero minimum:500 name:BIFFED_BRANCHES_FINISHED : Biffed branches finished -+event:0xf counters:0,1,2,3 um:zero minimum:500 name:BRANCHES_MISPREDICTED : Branch instructions mispredicted due to direction, target, or IAB prediction -+event:0x10 counters:0,1,2,3 um:zero minimum:500 name:BRANCHES_MISPREDICTED_DIRECTION : Branches mispredicted due to direction prediction -+event:0x11 counters:0,1,2,3 um:zero minimum:500 name:BTB_HITS : Branches that hit in the BTB, or missed but are not taken -+event:0x12 counters:0,1,2,3 um:zero minimum:500 name:DECODE_STALLED : Cycles the instruction buffer was not empty, but 0 instructions decoded -+event:0x13 counters:0,1,2,3 um:zero minimum:500 name:ISSUE_STALLED : Cycles the issue buffer is not empty but 0 instructions issued -+event:0x14 counters:0,1,2,3 um:zero minimum:500 name:BRANCH_ISSUE_STALLED : Cycles the branch buffer is not empty but 0 instructions issued -+event:0x15 counters:0,1,2,3 um:zero minimum:500 name:SRS0_SCHEDULE_STALLED : Cycles SRS0 is not empty but 0 instructions scheduled -+event:0x16 counters:0,1,2,3 um:zero minimum:500 name:SRS1_SCHEDULE_STALLED : Cycles SRS1 is not empty but 0 instructions scheduled -+event:0x17 counters:0,1,2,3 um:zero minimum:500 name:VRS_SCHEDULE_STALLED : Cycles VRS is not empty but 0 instructions scheduled -+event:0x18 counters:0,1,2,3 um:zero minimum:500 name:LRS_SCHEDULE_STALLED : Cycles LRS is not empty but 0 instructions scheduled -+event:0x19 counters:0,1,2,3 um:zero minimum:500 name:BRS_SCHEDULE_STALLED : Cycles BRS is not empty but 0 instructions scheduled Load/Store, Data Cache, and dLFB Events -+event:0x1a counters:0,1,2,3 um:zero minimum:500 name:TOTAL_TRANSLATED : Total Ldst microops translated. -+event:0x1b counters:0,1,2,3 um:zero minimum:500 name:LOADS_TRANSLATED : Number of cacheable L* or EVL* microops translated. (This includes microops from load-multiple, load-update, and load-context instructions.) -+event:0x1c counters:0,1,2,3 um:zero minimum:500 name:STORES_TRANSLATED : Number of cacheable ST* or EVST* microops translated. (This includes microops from store-multiple, store-update, and save-context instructions.) -+event:0x1d counters:0,1,2,3 um:zero minimum:500 name:TOUCHES_TRANSLATED : Number of cacheable DCBT and DCBTST instructions translated (L1 only) (Does not count touches that are converted to nops i.e. exceptions, noncacheable, hid0[nopti] bit is set.) -+event:0x1e counters:0,1,2,3 um:zero minimum:500 name:CACHEOPS_TRANSLATED : Number of dcba, dcbf, dcbst, and dcbz instructions translated (e500 traps on dcbi) -+event:0x1f counters:0,1,2,3 um:zero minimum:500 name:CACHEINHIBITED_ACCESSES_TRANSLATED : Number of cache inhibited accesses translated -+event:0x20 counters:0,1,2,3 um:zero minimum:500 name:GUARDED_LOADS_TRANSLATED : Number of guarded loads translated -+event:0x21 counters:0,1,2,3 um:zero minimum:500 name:WRITETHROUGH_STORES_TRANSLATED : Number of write-through stores translated -+event:0x22 counters:0,1,2,3 um:zero minimum:500 name:MISALIGNED_ACCESSES_TRANSLATED : Number of misaligned load or store accesses translated. -+event:0x23 counters:0,1,2,3 um:zero minimum:500 name:TOTAL_ALLOCATED_DLFB : Total allocated to dLFB -+event:0x24 counters:0,1,2,3 um:zero minimum:500 name:LOADS_TRANSLATED_ALLOCATED_DLFB : Loads translated and allocated to dLFB (Applies to same class of instructions as loads translated.) -+event:0x25 counters:0,1,2,3 um:zero minimum:500 name:STORES_COMPLETED_ALLOCATED_DLFB : Stores completed and allocated to dLFB (Applies to same class of instructions as stores translated.) -+event:0x26 counters:0,1,2,3 um:zero minimum:500 name:TOUCHES_TRANSLATED_ALLOCATED_DLFB : Touches translated and allocated to dLFB (Applies to same class of instructions as touches translated.) -+event:0x27 counters:0,1,2,3 um:zero minimum:500 name:STORES_COMPLETED : Number of cacheable ST* or EVST* microops completed. (Applies to the same class of instructions as stores translated.) -+event:0x28 counters:0,1,2,3 um:zero minimum:500 name:DL1_LOCKS : Number of cache lines locked in the dL1. (Counts a lock even if an overlock condition is encountered.) -+event:0x29 counters:0,1,2,3 um:zero minimum:500 name:DL1_RELOADS : This is historically used to determine dcache miss rate (along with loads/stores completed). This counts dL1 reloads for any reason. -+event:0x2a counters:0,1,2,3 um:zero minimum:500 name:DL1_CASTOUTS : dL1 castouts. Does not count castouts due to DCBF. -+event:0x2b counters:0,1,2,3 um:zero minimum:500 name:DETECTED_REPLAYS : Times detected replay condition - Load miss with dLFB full. -+event:0x2c counters:0,1,2,3 um:zero minimum:500 name:LOAD_MISS_QUEUE_FULL_REPLAYS : Load miss with load queue full. -+event:0x2d counters:0,1,2,3 um:zero minimum:500 name:LOAD_GUARDED_MISS_NOT_LAST_REPLAYS : Load guarded miss when the load is not yet at the bottom of the completion buffer. -+event:0x2e counters:0,1,2,3 um:zero minimum:500 name:STORE_TRANSLATED_QUEUE_FULL_REPLAYS : Translate a store when the StQ is full. -+event:0x2f counters:0,1,2,3 um:zero minimum:500 name:ADDRESS_COLLISION_REPLAYS : Address collision. -+event:0x30 counters:0,1,2,3 um:zero minimum:500 name:DMMU_MISS_REPLAYS : DMMU_MISS_REPLAYS : DMMU miss. -+event:0x31 counters:0,1,2,3 um:zero minimum:500 name:DMMU_BUSY_REPLAYS : DMMU_BUSY_REPLAYS : DMMU busy. -+event:0x32 counters:0,1,2,3 um:zero minimum:500 name:SECOND_PART_MISALIGNED_AFTER_MISS_REPLAYS : Second part of misaligned access when first part missed in cache. -+event:0x33 counters:0,1,2,3 um:zero minimum:500 name:LOAD_MISS_DLFB_FULL_CYCLES : Cycles stalled on replay condition - Load miss with dLFB full. -+event:0x34 counters:0,1,2,3 um:zero minimum:500 name:LOAD_MISS_QUEUE_FULL_CYCLES : Cycles stalled on replay condition - Load miss with load queue full. -+event:0x35 counters:0,1,2,3 um:zero minimum:500 name:LOAD_GUARDED_MISS_NOT_LAST_CYCLES : Cycles stalled on replay condition - Load guarded miss when the load is not yet at the bottom of the completion buffer. -+event:0x36 counters:0,1,2,3 um:zero minimum:500 name:STORE_TRANSLATED_QUEUE_FULL_CYCLES : Cycles stalled on replay condition - Translate a store when the StQ is full. -+event:0x37 counters:0,1,2,3 um:zero minimum:500 name:ADDRESS_COLLISION_CYCLES : Cycles stalled on replay condition - Address collision. -+event:0x38 counters:0,1,2,3 um:zero minimum:500 name:DMMU_MISS_CYCLES : Cycles stalled on replay condition - DMMU miss. -+event:0x39 counters:0,1,2,3 um:zero minimum:500 name:DMMU_BUSY_CYCLES : Cycles stalled on replay condition - DMMU busy. -+event:0x3a counters:0,1,2,3 um:zero minimum:500 name:SECOND_PART_MISALIGNED_AFTER_MISS_CYCLES : Cycles stalled on replay condition - Second part of misaligned access when first part missed in cache. -+event:0x3b counters:0,1,2,3 um:zero minimum:500 name:IL1_LOCKS : Number of cache lines locked in the iL1. (Counts a lock even if an overlock condition is encountered.) -+event:0x3c counters:0,1,2,3 um:zero minimum:500 name:IL1_FETCH_RELOADS : This is historically used to determine icache miss rate (along with instructions completed) Reloads due to demand fetch. -+event:0x3d counters:0,1,2,3 um:zero minimum:500 name:FETCHES : Counts the number of fetches that write at least one instruction to the instruction buffer. (With instruction fetched, can used to compute instructions-per-fetch) -+event:0x3e counters:0,1,2,3 um:zero minimum:500 name:IMMU_TLB4K_RELOADS : iMMU TLB4K reloads -+event:0x3f counters:0,1,2,3 um:zero minimum:500 name:IMMU_VSP_RELOADS : iMMU VSP reloads -+event:0x40 counters:0,1,2,3 um:zero minimum:500 name:DMMU_TLB4K_RELOADS : dMMU TLB4K reloads -+event:0x41 counters:0,1,2,3 um:zero minimum:500 name:DMMU_VSP_RELOADS : dMMU VSP reloads -+event:0x42 counters:0,1,2,3 um:zero minimum:500 name:L2MMU_MISSES : Counts iTLB/dTLB error interrupt -+event:0x43 counters:0,1,2,3 um:zero minimum:500 name:BIU_MASTER_REQUESTS : Number of master transactions. (Number of master TSs.) -+event:0x44 counters:0,1,2,3 um:zero minimum:500 name:BIU_MASTER_I_REQUESTS : Number of master I-Side transactions. (Number of master I-Side TSs.) -+event:0x45 counters:0,1,2,3 um:zero minimum:500 name:BIU_MASTER_D_REQUESTS : Number of master D-Side transactions. (Number of master D-Side TSs.) -+event:0x46 counters:0,1,2,3 um:zero minimum:500 name:BIU_MASTER_D_CASTOUT_REQUESTS : Number of master D-Side non-program-demand castout transactions. This counts replacement pushes and snoop pushes. This does not count DCBF castouts. (Number of master D-side non-program-demand castout TSs.) -+event:0x48 counters:0,1,2,3 um:zero minimum:500 name:SNOOP_REQUESTS : Number of externally generated snoop requests. (Counts snoop TSs.) -+event:0x49 counters:0,1,2,3 um:zero minimum:500 name:SNOOP_HITS : Number of snoop hits on all D-side resources regardless of the cache state (modified, exclusive, or shared) -+event:0x4a counters:0,1,2,3 um:zero minimum:500 name:SNOOP_PUSHES : Number of snoop pushes from all D-side resources. (Counts snoop ARTRY/WOPs.) -+event:0x52 counters:0,1,2,3 um:zero minimum:500 name:PMC0_OVERFLOW : Counts the number of times PMC0[32] transitioned from 1 to 0. -+event:0x53 counters:0,1,2,3 um:zero minimum:500 name:PMC1_OVERFLOW : Counts the number of times PMC1[32] transitioned from 1 to 0. -+event:0x54 counters:0,1,2,3 um:zero minimum:500 name:PMC2_OVERFLOW : Counts the number of times PMC2[32] transitioned from 1 to 0. -+event:0x55 counters:0,1,2,3 um:zero minimum:500 name:PMC3_OVERFLOW : Counts the number of times PMC3[32] transitioned from 1 to 0. -+event:0x56 counters:0,1,2,3 um:zero minimum:500 name:INTERRUPTS : Number of interrupts taken -+event:0x57 counters:0,1,2,3 um:zero minimum:500 name:EXTERNAL_INTERRUPTS : Number of external input interrupts taken -+event:0x58 counters:0,1,2,3 um:zero minimum:500 name:CRITICAL_INTERRUPTS : Number of critical input interrupts taken -+event:0x59 counters:0,1,2,3 um:zero minimum:500 name:SC_TRAP_INTERRUPTS : Number of system call and trap interrupts -+event:0x5b counters:0,1,2,3 um:zero minimum:500 name:L2_LINEFILL_REQ : Number L2 Linefill requests -+event:0x5c counters:0,1,2,3 um:zero minimum:500 name:L2_VICTIM_SELECT : Number L2 Victim selects -+event:0x6e counters:0,1,2,3 um:zero minimum:500 name:L2_ACCESS : Number L2 cache accesses -+event:0x6f counters:0,1,2,3 um:zero minimum:500 name:L2_HIT_ACCESS : Number L2 hit cache accesses -+event:0x70 counters:0,1,2,3 um:zero minimum:500 name:L2_DATA_ACCESS : Number L2 data cache accesses -+event:0x71 counters:0,1,2,3 um:zero minimum:500 name:L2_HIT_DATA_ACCESS : Number L2 hit data cache accesses -+event:0x72 counters:0,1,2,3 um:zero minimum:500 name:L2_INST_ACCESS : Number L2 instruction cache accesses -+event:0x73 counters:0,1,2,3 um:zero minimum:500 name:L2_HIT_INST_ACCESS : Number L2 hit instruction cache accesses -+event:0x74 counters:0,1,2,3 um:zero minimum:500 name:L2_ALLOC : Number L2 cache allocations -+event:0x75 counters:0,1,2,3 um:zero minimum:500 name:L2_DATA_ALLOC : Number L2 data cache allocations -+event:0x76 counters:0,1,2,3 um:zero minimum:500 name:L2_DIRTY_DATA_ALLOC : Number L2 dirty data cache allocations -+event:0x77 counters:0,1,2,3 um:zero minimum:500 name:L2_INST_ALLOC : Number L2 instruction cache allocations -+event:0x78 counters:0,1,2,3 um:zero minimum:500 name:L2_UPDATE : Number L2 cache updates -+event:0x79 counters:0,1,2,3 um:zero minimum:500 name:L2_CLEAN_UPDATE : Number L2 cache clean updates -+event:0x7a counters:0,1,2,3 um:zero minimum:500 name:L2_DIRTY_UPDATE : Number L2 cache dirty updates -+event:0x7b counters:0,1,2,3 um:zero minimum:500 name:L2_CLEAN_REDU_UPDATE : Number L2 cache clean redundant updates -+event:0x7c counters:0,1,2,3 um:zero minimum:500 name:L2_DIRTY_REDU_UPDATE : Number L2 cache dirty redundant updates -+event:0x7d counters:0,1,2,3 um:zero minimum:500 name:L2_LOCKS : Number L2 cache locks -+event:0x7e counters:0,1,2,3 um:zero minimum:500 name:L2_CASTOUT : Number L2 cache castouts -+event:0x7f counters:0,1,2,3 um:zero minimum:500 name:L2_HIT_DATA_DIRTY : Number L2 cache data dirty hits -+event:0x82 counters:0,1,2,3 um:zero minimum:500 name:L2_INV_CLEAN : Number L2 cache invalidation of clean lines -+event:0x83 counters:0,1,2,3 um:zero minimum:500 name:L2_INV_INCOHER : Number L2 cache invalidation of incoherent lines -+event:0x84 counters:0,1,2,3 um:zero minimum:500 name:L2_INV_COHER : Number L2 cache invalidation of coherent lines -+event:0x94 counters:0,1,2,3 um:zero minimum:500 name:DVT0 : Detection of write to DEVENT with DVT0 set -+event:0x95 counters:0,1,2,3 um:zero minimum:500 name:DVT1 : Detection of write to DEVENT with DVT1 set -+event:0x96 counters:0,1,2,3 um:zero minimum:500 name:DVT2 : Detection of write to DEVENT with DVT2 set -+event:0x97 counters:0,1,2,3 um:zero minimum:500 name:DVT3 : Detection of write to DEVENT with DVT3 set -+event:0x98 counters:0,1,2,3 um:zero minimum:500 name:DVT4 : Detection of write to DEVENT with DVT4 set -+event:0x99 counters:0,1,2,3 um:zero minimum:500 name:DVT5 : Detection of write to DEVENT with DVT5 set -+event:0x9a counters:0,1,2,3 um:zero minimum:500 name:DVT6 : Detection of write to DEVENT with DVT6 set -+event:0x9b counters:0,1,2,3 um:zero minimum:500 name:DVT7 : Detection of write to DEVENT with DVT7 set -+event:0x9c counters:0,1,2,3 um:zero minimum:500 name:CYCLES_NEXUS_STALLED : Number of completion cycles stalled due to Nexus FIFO full -+event:0xb0 counters:0,1,2,3 um:zero minimum:500 name:DECORATED_LOAD : Number of decorated loads. -+event:0xb1 counters:0,1,2,3 um:zero minimum:500 name:DECORATED_STORE : Number of decorated stores -+event:0xb2 counters:0,1,2,3 um:zero minimum:500 name:LOAD_RETRY : Number of load retries -+event:0xb3 counters:0,1,2,3 um:zero minimum:500 name:STWCX_SUCCESS : Number of successful stwcx. instructions -+event:0xb4 counters:0,1,2,3 um:zero minimum:500 name:STWCX_UNSUCCESS : Number of unsuccessful stwcx. instructions -diff -urN oprofile-0.9.6/events/ppc/e500mc/unit_masks oprofile-0.9.6-new/events/ppc/e500mc/unit_masks ---- oprofile-0.9.6/events/ppc/e500mc/unit_masks 1970-01-01 08:00:00.000000000 +0800 -+++ oprofile-0.9.6-new/events/ppc/e500mc/unit_masks 2010-08-16 17:56:03.000000000 +0800 -@@ -0,0 +1,4 @@ -+# e500 possible unit masks -+# -+name:zero type:mandatory default:0x0 -+ 0x0 No unit mask -diff -urN oprofile-0.9.6/libop/op_cpu_type.c oprofile-0.9.6-new/libop/op_cpu_type.c ---- oprofile-0.9.6/libop/op_cpu_type.c 2009-11-24 23:25:17.000000000 +0800 -+++ oprofile-0.9.6-new/libop/op_cpu_type.c 2010-08-16 17:56:03.000000000 +0800 -@@ -82,6 +82,7 @@ - { "ppc64 compat version 1", "ppc64/ibm-compat-v1", CPU_PPC64_IBM_COMPAT_V1, 4 }, - { "Intel Core/i7", "i386/core_i7", CPU_CORE_I7, 4 }, - { "Intel Atom", "i386/atom", CPU_ATOM, 2 }, -+ { "e500mc", "ppc/e500mc", CPU_PPC_E500MC, 4 }, - }; - - static size_t const nr_cpu_descrs = sizeof(cpu_descrs) / sizeof(struct cpu_descr); -diff -urN oprofile-0.9.6/libop/op_cpu_type.h oprofile-0.9.6-new/libop/op_cpu_type.h ---- oprofile-0.9.6/libop/op_cpu_type.h 2009-11-24 23:25:17.000000000 +0800 -+++ oprofile-0.9.6-new/libop/op_cpu_type.h 2010-08-16 17:56:03.000000000 +0800 -@@ -79,6 +79,7 @@ - CPU_PPC64_IBM_COMPAT_V1, /**< IBM PPC64 processor compat mode version 1 */ - CPU_CORE_I7, /* Intel Core i7, Nehalem */ - CPU_ATOM, /* First generation Intel Atom */ -+ CPU_PPC_E500MC, /**< e500mc */ - MAX_CPU_TYPE - } op_cpu; - -diff -urN oprofile-0.9.6/utils/ophelp.c oprofile-0.9.6-new/utils/ophelp.c ---- oprofile-0.9.6/utils/ophelp.c 2009-11-24 23:25:17.000000000 +0800 -+++ oprofile-0.9.6-new/utils/ophelp.c 2010-08-16 17:56:03.000000000 +0800 -@@ -619,6 +619,7 @@ - - case CPU_PPC_E500: - case CPU_PPC_E500_2: -+ case CPU_PPC_E500MC: - event_doc = - "See PowerPC e500 Core Complex Reference Manual\n" - "Chapter 7: Performance Monitor\n" diff --git a/meta-fsl-ppc/recipes-kernel/oprofile/oprofile/oprofile-no-query-modules.patch b/meta-fsl-ppc/recipes-kernel/oprofile/oprofile/oprofile-no-query-modules.patch deleted file mode 100644 index c9d7cd63..00000000 --- a/meta-fsl-ppc/recipes-kernel/oprofile/oprofile/oprofile-no-query-modules.patch +++ /dev/null @@ -1,29 +0,0 @@ -disable portions which use query_module on 2.6 kernel this is not available -in OE we dont support 2.4 anyway - - -Upstream-Status: Pending -Signed-off-by: Khem Raj - -Index: oprofile-0.9.6/daemon/liblegacy/opd_kernel.c -=================================================================== ---- oprofile-0.9.6.orig/daemon/liblegacy/opd_kernel.c 2009-11-24 07:25:17.000000000 -0800 -+++ oprofile-0.9.6/daemon/liblegacy/opd_kernel.c 2011-07-18 10:08:39.863798825 -0700 -@@ -270,6 +270,9 @@ - */ - static void opd_drop_module_sample(unsigned long eip) - { -+ verbprintf(vmodule, "query_module not available on linux-2.6: %s\n", strerror(EPERM)); -+ -+#if 0 - char * module_names; - char * name; - size_t size = 1024; -@@ -307,6 +310,7 @@ - - if (module_names) - free(module_names); -+#endif - } - - diff --git a/meta-fsl-ppc/recipes-kernel/oprofile/oprofile/opstart.patch b/meta-fsl-ppc/recipes-kernel/oprofile/oprofile/opstart.patch deleted file mode 100644 index c588deb3..00000000 --- a/meta-fsl-ppc/recipes-kernel/oprofile/oprofile/opstart.patch +++ /dev/null @@ -1,237 +0,0 @@ -Upstream-Status: Pending - -Index: oprofile/utils/Makefile.am -=================================================================== ---- oprofile.orig/utils/Makefile.am 2005-03-31 18:20:41.000000000 +0100 -+++ oprofile/utils/Makefile.am 2008-07-02 15:14:07.000000000 +0100 -@@ -3,8 +3,15 @@ - - LIBS=@POPT_LIBS@ @LIBERTY_LIBS@ - --bin_PROGRAMS = ophelp -+bin_PROGRAMS = ophelp opstart - dist_bin_SCRIPTS = opcontrol - - ophelp_SOURCES = ophelp.c - ophelp_LDADD = ../libop/libop.a ../libutil/libutil.a -+ -+opstart_SOURCES = opstart.c -+ -+install-exec-local: -+ cd $(DESTDIR)/$(bindir) && \ -+ rm -f opstop && \ -+ $(LN_S) opstart opstop -Index: oprofile/utils/opstart.c -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ oprofile/utils/opstart.c 2008-07-02 15:14:07.000000000 +0100 -@@ -0,0 +1,110 @@ -+/** -+ * @file opstart.c -+ * Start/Stop oprofile -+ * -+ * @remark Copyright 2007 Openedhand Ltd. -+ * @remark Read the file COPYING -+ * -+ * @author Richard Purdie -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+int main(const int argc, const char* argv[]) -+{ -+ const char *enable = "/dev/oprofile/enable"; -+ const char *lockfile; -+ unsigned long dpid; -+ struct stat sbuf; -+ FILE *lfile, *efile; -+ int sig, enb, err; -+ -+ if (argc >= 2) { -+ printf("Error: Invalid options.\n"); -+ return 1; -+ } -+ -+ lockfile = getenv("LOCK_FILE"); -+ if (!lockfile) -+ lockfile = "/var/lib/oprofile/lock"; -+ -+ /* Add SESSION_DIR support? */ -+ -+ if (geteuid()) { -+ printf("Error: This program must be run as root.\n"); -+ return 1; -+ } -+ -+ if (stat(enable, &sbuf)) { -+ printf("Error: Could not find /dev/oprofile/enable, the" -+ " kernel module probably isn't loaded.\n"); -+ printf("This binary only works with 2.6 kernels and oprofile" -+ " must have been initialised with 'opcontrol --start-daemon'.\n"); -+ return 1; -+ } -+ -+ if (stat(lockfile, &sbuf)) { -+ printf("Error: Could not find lockfile %s.\n", lockfile); -+ printf("The oprofile daemon must be running (oprofile must" -+ " have been initialised with 'opcontrol --start-daemon').\n"); -+ return 1; -+ } -+ -+ lfile = fopen(lockfile, "r"); -+ if (!lfile) { -+ printf("Error opening lockfile %s.\n", lockfile); -+ return 1; -+ } -+ -+ err = fscanf(lfile, "%lud", (unsigned long *) &dpid); -+ if (err != 1) { -+ printf("Error reading pid from lockfile %s.\n", lockfile); -+ return 1; -+ } -+ fclose(lfile); -+ -+ efile = fopen(enable, "r"); -+ if (!efile) { -+ printf("Error opening %s.\n", enable); -+ return 1; -+ } -+ -+ if (strstr(argv[0], "opstart")) { -+ printf("Starting Profiler\n"); -+ sig = SIGUSR1; -+ enb = 1; -+ } else if (strstr(argv[0], "opstop")) { -+ printf("Stopping Oprofile.\n"); -+ printf("You need to run 'opcontrol --dump' when the session" -+ " is finished.\n"); -+ sig = SIGUSR2; -+ enb = 0; -+ } else { -+ printf("Error: Please call as 'opstart' or 'opstop'\n"); -+ return 1; -+ } -+ -+ err = kill(dpid, 0); -+ if (err) { -+ printf("Error sending signal to oprofiled. Stale lockfile" -+ " (%s) ?\n", lockfile); -+ return 1; -+ } -+ -+ fprintf(efile, "%d\n", enb); -+ err = kill(dpid, sig); -+ if (err) { -+ printf("Error sending signal to oprofiled. Stale lockfile" -+ " (%s) ?\n", lockfile); -+ return 1; -+ } -+ -+ return 0; -+} -+ -Index: oprofile/configure.in -=================================================================== ---- oprofile.orig/configure.in 2008-07-02 15:13:58.000000000 +0100 -+++ oprofile/configure.in 2008-07-02 15:17:37.000000000 +0100 -@@ -16,6 +16,7 @@ - AM_CONFIG_HEADER(config.h) - - AC_PROG_RANLIB -+AC_PROG_LN_S - AC_PROG_LIBTOOL - - dnl for the man page -@@ -241,6 +242,8 @@ - doc/xsl/catalog-1.xml \ - doc/oprofile.1 \ - doc/opcontrol.1 \ -+ doc/opstart.1 \ -+ doc/opstop.1 \ - doc/ophelp.1 \ - doc/opreport.1 \ - doc/opannotate.1 \ -Index: oprofile/doc/Makefile.am -=================================================================== ---- oprofile.orig/doc/Makefile.am 2008-07-02 15:13:59.000000000 +0100 -+++ oprofile/doc/Makefile.am 2008-07-02 15:14:07.000000000 +0100 -@@ -11,6 +11,8 @@ - man_MANS = \ - oprofile.1 \ - opcontrol.1 \ -+ opstart.1 \ -+ opstop.1 \ - opreport.1 \ - opannotate.1 \ - opgprof.1 \ -Index: oprofile/doc/opstart.1.in -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ oprofile/doc/opstart.1.in 2008-07-02 15:14:07.000000000 +0100 -@@ -0,0 +1,27 @@ -+.TH OPSTART 1 "@DATE@" "oprofile @VERSION@" -+.UC 4 -+.SH NAME -+opstart \- start OProfile profiling -+.SH SYNOPSIS -+.br -+.B opstart -+.SH DESCRIPTION -+.B opstart -+is a simple optimised command to start profiling with 2.6 Linux kernels. -+OProfile should have already been initialised by calling "opcontrol --start-daemon". -+ -+.SH ENVIRONMENT -+No special environment variables are recognised by opstart. -+ -+.SH FILES -+.TP -+.I /var/lib/oprofile/samples/ -+The location of the generated sample files. -+ -+.SH VERSION -+.TP -+This man page is current for @PACKAGE@-@VERSION@. -+ -+.SH SEE ALSO -+.BR @OP_DOCDIR@, -+.BR oprofile(1) -Index: oprofile/doc/opstop.1.in -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ oprofile/doc/opstop.1.in 2008-07-02 15:14:07.000000000 +0100 -@@ -0,0 +1,28 @@ -+.TH OPSTOP 1 "@DATE@" "oprofile @VERSION@" -+.UC 4 -+.SH NAME -+opstop \- stop OProfile profiling -+.SH SYNOPSIS -+.br -+.B opstop -+.SH DESCRIPTION -+.B opstop -+is a simple optimsed command to stop profiling with 2.6 Linux kernels. -+You need to run "opcontrol --dump" before being able to view a profile -+with opreport. -+ -+.SH ENVIRONMENT -+No special environment variables are recognised by opstop. -+ -+.SH FILES -+.TP -+.I /var/lib/oprofile/samples/ -+The location of the generated sample files. -+ -+.SH VERSION -+.TP -+This man page is current for @PACKAGE@-@VERSION@. -+ -+.SH SEE ALSO -+.BR @OP_DOCDIR@, -+.BR oprofile(1) -- cgit v1.2.3-54-g00ecf From 6cb4386d17252ef13510fda77efe21756649c20c Mon Sep 17 00:00:00 2001 From: Christopher Larson Date: Tue, 19 Mar 2013 01:22:28 +0000 Subject: layer.conf: avoid unnecessary early expansion with := bitbake handles immediate expansions of LAYERDIR for us automatically. Signed-off-by: Christopher Larson --- meta-fsl-ppc/conf/layer.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meta-fsl-ppc/conf/layer.conf b/meta-fsl-ppc/conf/layer.conf index ac08f27e..ea7f02dd 100644 --- a/meta-fsl-ppc/conf/layer.conf +++ b/meta-fsl-ppc/conf/layer.conf @@ -1,11 +1,11 @@ # We have a packages directory, add to BBFILES -BBPATH := "${BBPATH}:${LAYERDIR}" +BBPATH .= ":${LAYERDIR}" BBFILES += "${LAYERDIR}/recipes-*/*/*.bb*" BBFILES += "${LAYERDIR}/images/*.bb*" BBFILE_COLLECTIONS += "fsl-ppc" -BBFILE_PATTERN_fsl-ppc := "^${LAYERDIR}/" +BBFILE_PATTERN_fsl-ppc = "^${LAYERDIR}/" BBFILE_PRIORITY_fsl-ppc = "5" BB_ENV_EXTRAWHITE := "KSRC USRC" -- cgit v1.2.3-54-g00ecf From 7ddb61b5b4ae3384f83ac7a300bf667d560633cf Mon Sep 17 00:00:00 2001 From: chunrong guo Date: Thu, 21 Mar 2013 03:09:53 +0000 Subject: fmc: update to the commit for sdk 1.3.2 Signed-off-by: Chunrong Guo --- meta-fsl-ppc/recipes-ucode/fmc/fmc_git.bb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/meta-fsl-ppc/recipes-ucode/fmc/fmc_git.bb b/meta-fsl-ppc/recipes-ucode/fmc/fmc_git.bb index c5a3bc16..4f852166 100644 --- a/meta-fsl-ppc/recipes-ucode/fmc/fmc_git.bb +++ b/meta-fsl-ppc/recipes-ucode/fmc/fmc_git.bb @@ -3,8 +3,10 @@ SECTION = "fmc" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://COPYING;md5=a504ab5a8ff235e67c7301214749346c" +PR = "r1" + SRC_URI = "git://git.freescale.com/ppc/sdk/fmc.git" -SRCREV = "274ff60dd9d7dd9f881deeb86c2c4b8a342e55d1" +SRCREV = "6db53fae9dfe72db0312a383733e0d3598aad3f2" DEPENDS = "libxml2 fmlib tclap" -- cgit v1.2.3-54-g00ecf From 97c900017ae8728a573f3e6d2a4d11cbe70fc533 Mon Sep 17 00:00:00 2001 From: chunrong guo Date: Thu, 21 Mar 2013 03:16:26 +0000 Subject: fmlib: update to the commit for sdk 1.3.2 Signed-off-by: Chunrong Guo --- meta-fsl-ppc/recipes-ucode/fmlib/fmlib_git.bb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/meta-fsl-ppc/recipes-ucode/fmlib/fmlib_git.bb b/meta-fsl-ppc/recipes-ucode/fmlib/fmlib_git.bb index 74eb2047..038f8997 100644 --- a/meta-fsl-ppc/recipes-ucode/fmlib/fmlib_git.bb +++ b/meta-fsl-ppc/recipes-ucode/fmlib/fmlib_git.bb @@ -3,11 +3,13 @@ SECTION = "fman" LICENSE = "BSD & GPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=3f16fa8e677e45af3127c5c4bafc3c00" +PR = "r1" + DEPENDS = "linux-libc-headers" DEPENDS_virtclass-native = "" SRC_URI = "git://git.freescale.com/ppc/sdk/fmlib.git" -SRCREV = "5ebbf75c3108404b513198c9fd9b955b123680af" +SRCREV = "e80c0625d4f2671ac4f15cabfdd1b334143eb515" S = "${WORKDIR}/git" @@ -34,6 +36,6 @@ do_install_virtclass-native () { cp -rf ${S}/include/* ${D}/${includedir} } -ALLOW_EMPTY = "1" +ALLOW_EMPTY_${PN} = "1" BBCLASSEXTEND = "native" -- cgit v1.2.3-54-g00ecf From a12fecfd38b5c7883061da98ad55b05dfeb0b19b Mon Sep 17 00:00:00 2001 From: chunrong guo Date: Thu, 21 Mar 2013 03:20:33 +0000 Subject: fm-ucode: update to the commit for sdk 1.3.2 Signed-off-by: Chunrong Guo --- .../recipes-ucode/fm-ucode/fm-ucode_git.bb | 50 +++++++++++----------- 1 file changed, 26 insertions(+), 24 deletions(-) diff --git a/meta-fsl-ppc/recipes-ucode/fm-ucode/fm-ucode_git.bb b/meta-fsl-ppc/recipes-ucode/fm-ucode/fm-ucode_git.bb index 89c43ba3..c2c3de05 100644 --- a/meta-fsl-ppc/recipes-ucode/fm-ucode/fm-ucode_git.bb +++ b/meta-fsl-ppc/recipes-ucode/fm-ucode/fm-ucode_git.bb @@ -3,41 +3,43 @@ SECTION = "fm-ucode" LICENSE = "Freescale EULA" LIC_FILES_CHKSUM = "file://EULA;md5=60037ccba533a5995e8d1a838d85799c" -FMAN_UCODE_INSTALL_FILE = "fsl_fman_ucode" -FMAN_UCODE_INSTALL_FILE_append_p2041rdb = "_P2041" -FMAN_UCODE_INSTALL_FILE_append_p4080ds= "_P4080" -FMAN_UCODE_INSTALL_FILE_append_p1023rds = "_*1023" -FMAN_UCODE_INSTALL_FILE_append_p5020ds = "_P5020" -FMAN_UCODE_INSTALL_FILE_append_p5020ds-64b = "_P5020" -FMAN_UCODE_INSTALL_FILE_append_p5040ds = "_P5040" -FMAN_UCODE_INSTALL_FILE_append_p5040ds-64b = "_P5040" -FMAN_UCODE_INSTALL_FILE_append_p3041ds = "_P3041" -FMAN_UCODE_INSTALL_FILE_append_b4420qds = "_B4860" -FMAN_UCODE_INSTALL_FILE_append_b4420qds-64b = "_B4860" -FMAN_UCODE_INSTALL_FILE_append_b4860qds = "_B4860" -FMAN_UCODE_INSTALL_FILE_append_b4860qds-64b = "_B4860" -FMAN_UCODE_INSTALL_FILE_append_t4160qds = "_T4240" -FMAN_UCODE_INSTALL_FILE_append_t4160qds-64b = "_T4240" -FMAN_UCODE_INSTALL_FILE_append_t4240qds = "_T4240" -FMAN_UCODE_INSTALL_FILE_append_t4240qds-64b = "_T4240" - -COMPATIBLE_MACHINE = "(p1023rds|p4080ds|p5020ds|p5040ds|p5020ds-64b|p5040ds-64b|p3041ds|p2041rdb|b4420qds|b4420qds-64b|b4860qds|b4860qds-64b|t4160qds|t4160qds-64b|t4240qds|t4240qds-64b)" +PR = "r1" + +COMPATIBLE_MACHINE = "(p1023rds|p2041rdb|p3041ds|p4080ds|p5020ds|p5040ds|p5020ds-64b|p5040ds-64b|b4420qds|b4420qds-64b|b4860qds|b4860qds-64b|t4160qds|t4160qds-64b|t4240qds|t4240qds-64b)" inherit deploy SRC_URI = "git://git.freescale.com/ppc/sdk/fm-ucode.git" -SRCREV = "f4a43e8ad6a6e5fdedff6e1484386f963bccfdff" +SRCREV = "219bb2c6aaa1e040fb849a771a9bdf3e8dbc49e9" S = "${WORKDIR}/git" ALLOW_EMPTY_${PN} = "1" do_install () { - install -d ${D}/boot - install -m 644 ${FMAN_UCODE_INSTALL_FILE}*.bin ${D}/boot/ + case ${MACHINE} in + b4420qds|b4420qds-64b|b4860qds|b4860qds-64b) UCODE=b4860qds;; + t4240qds|t4240qds-64b|t4160qds|t4160qds-64b) UCODE=t4240qds;; + p5020ds|p5020ds-64b) UCODE=p5020ds;; + p5040ds|p5040ds-64b) UCODE=p5040ds;; + p1023rds) UCODE=P1023RDS;; + *) UCODE=${MACHINE};; + esac + UCODE=`echo $UCODE | sed -e 's,[a-zA-Z]*$,,'` + install -d ${D}/boot + install -m 644 fsl_fman_ucode_${UCODE}*.bin ${D}/boot/ } do_deploy () { - install -d ${DEPLOYDIR}/ - install -m 644 ${FMAN_UCODE_INSTALL_FILE}*.bin ${DEPLOYDIR}/ + case ${MACHINE} in + b4420qds|b4420qds-64b|b4860qds|b4860qds-64b) UCODE=b4860qds;; + t4240qds|t4240qds-64b|t4160qds|t4160qds-64b) UCODE=t4240qds;; + p5020ds|p5020ds-64b) UCODE=p5020ds;; + p5040ds|p5040ds-64b) UCODE=p5040ds;; + p1023rds) UCODE=P1023RDS;; + *) UCODE=${MACHINE};; + esac + UCODE=`echo $UCODE | sed -e 's,[a-zA-Z]*$,,'` + install -d ${DEPLOYDIR}/ + install -m 644 fsl_fman_ucode_${UCODE}*.bin ${DEPLOYDIR}/ } addtask deploy before do_build after do_install -- cgit v1.2.3-54-g00ecf From f9835a0f6f2b15bb3d106a600853307e7761a0f0 Mon Sep 17 00:00:00 2001 From: chunrong guo Date: Thu, 21 Mar 2013 03:37:49 +0000 Subject: rcw: update to the commit for sdk 1.3.2 Signed-off-by: Chunrong Guo --- meta-fsl-ppc/recipes-tools/rcw/rcw_git.bb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/meta-fsl-ppc/recipes-tools/rcw/rcw_git.bb b/meta-fsl-ppc/recipes-tools/rcw/rcw_git.bb index 2bbc0254..625bd600 100644 --- a/meta-fsl-ppc/recipes-tools/rcw/rcw_git.bb +++ b/meta-fsl-ppc/recipes-tools/rcw/rcw_git.bb @@ -1,7 +1,7 @@ DESCRIPTION = "Reset Control Words (RCW)" SECTION = "rcw" LICENSE = "BSD" -PR = "r7" +PR = "r8" LIC_FILES_CHKSUM = "file://rcw.py;beginline=8;endline=28;md5=9ba0b28922dd187b06b6c8ebcfdd208e" @@ -11,9 +11,7 @@ PACKAGE_ARCH = "${MACHINE_ARCH}" inherit deploy -SRCREV = "e9529eac512f7dc2ada3c6ff3ef1b934e5afae57" -SRCREV_e6500 = "356a8050298bad4a3c4e1237b5d8946738efe643" -SRCREV_e6500-64b = "356a8050298bad4a3c4e1237b5d8946738efe643" +SRCREV = "c66f5fcbc1ecd2ae7c504bcbf5ddf7973496a94e" SRC_URI = "git://git.freescale.com/ppc/sdk/rcw.git" S = "${WORKDIR}/git" -- cgit v1.2.3-54-g00ecf From 7180e566d219fac3139c3910d5e20503c47d0c96 Mon Sep 17 00:00:00 2001 From: chunrong guo Date: Thu, 21 Mar 2013 03:42:16 +0000 Subject: eth-config: update to the commit for sdk 1.3.2 Signed-off-by: Chunrong Guo --- meta-fsl-ppc/recipes-tools/eth-config/eth-config_git.bb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/meta-fsl-ppc/recipes-tools/eth-config/eth-config_git.bb b/meta-fsl-ppc/recipes-tools/eth-config/eth-config_git.bb index 19da8172..f1e957cf 100644 --- a/meta-fsl-ppc/recipes-tools/eth-config/eth-config_git.bb +++ b/meta-fsl-ppc/recipes-tools/eth-config/eth-config_git.bb @@ -3,10 +3,10 @@ SECTION = "eth-config" LICENSE = "Freescale EULA" LIC_FILES_CHKSUM = "file://COPYING;md5=cf02dc8eb5ac4a76f3812826520dea87" +PR = "r1" + SRC_URI = "git://git.freescale.com/ppc/sdk/eth-config.git" -SRCREV = "847191454aa557d19c19fdcd9e0a145da5d43c49" -SRCREV_e6500 = "c1400695e56aa80f2f4c88c4e0582028248ae06f" -SRCREV_e6500-64b = "c1400695e56aa80f2f4c88c4e0582028248ae06f" +SRCREV = "c1400695e56aa80f2f4c88c4e0582028248ae06f" S = "${WORKDIR}/git" -- cgit v1.2.3-54-g00ecf From 86c832befc9032f1074c8eb89aaf45e4cde31f1f Mon Sep 17 00:00:00 2001 From: chunrong guo Date: Thu, 21 Mar 2013 03:45:31 +0000 Subject: usdpaa: update to the commit for sdk 1.3.2 Signed-off-by: Chunrong Guo --- meta-fsl-ppc/recipes-tools/usdpaa/usdpaa_git.bb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/meta-fsl-ppc/recipes-tools/usdpaa/usdpaa_git.bb b/meta-fsl-ppc/recipes-tools/usdpaa/usdpaa_git.bb index 731f01b9..7125716b 100644 --- a/meta-fsl-ppc/recipes-tools/usdpaa/usdpaa_git.bb +++ b/meta-fsl-ppc/recipes-tools/usdpaa/usdpaa_git.bb @@ -2,7 +2,7 @@ DESCRIPTION = "User-Space Data-Path Acceleration Architecture drivers" SECTION = "usdpaa" LICENSE = "BSD & GPLv2" LIC_FILES_CHKSUM = "file://Makefile;endline=30;md5=39e58bedc879163c9338596e52df5b1f" -PR = "r1" +PR = "r2" inherit pkgconfig @@ -10,9 +10,7 @@ DEPENDS = "libxml2 libedit ncurses readline flib" RDEPENDS_${PN} = "libgcc" SRC_URI = "git://git.freescale.com/ppc/sdk/usdpaa.git" -SRCREV = "2e21af59ea1eddd938404d29ee0864e6cfe936a8" -SRCREV_e6500 = "53c621f783c9d10d46828854120a3ebd58389779" -SRCREV_e6500-64b = "53c621f783c9d10d46828854120a3ebd58389779" +SRCREV = "670ad8827fd83169ccb54a008c638dbb497b1c61" S = "${WORKDIR}/git" -- cgit v1.2.3-54-g00ecf From b145646be55af72cd0c63404e12f96f1938911a6 Mon Sep 17 00:00:00 2001 From: chunrong guo Date: Thu, 21 Mar 2013 03:49:13 +0000 Subject: u-boot: update to the commit for sdk 1.3.2 Signed-off-by: Chunrong Guo --- meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb | 29 +++++++++++++----------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb b/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb index bc19bb4e..e322ab7f 100644 --- a/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb +++ b/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb @@ -5,16 +5,15 @@ PROVIDES = "virtual/bootloader" LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=1707d6db1d42237583f50183a5651ecb" -PR = "r29" +PR = "r30" INHIBIT_DEFAULT_DEPS = "1" DEPENDS = "boot-format-native virtual/${TARGET_PREFIX}gcc libgcc" inherit deploy -SRCREV = "c6d9d502924ade8877f53eecdd5cf37e05d6d6b4" -SRC_URI = "git://git.freescale.com/ppc/sdk/u-boot.git" -SRCREV_e6500 = "9040d1ee41fc29fc7e9796bdfb59612f80bc1ee4" -SRCREV_e6500-64b = "9040d1ee41fc29fc7e9796bdfb59612f80bc1ee4" +SRCREV = "7bcd7f45c8974978f8eb73ae4d32e71cb6a49b77" +SRC_URI = "git://git.freescale.com/ppc/sdk/u-boot.git \ + " python () { ml = d.getVar("MULTILIB_VARIANTS", True) arch = d.getVar("OVERRIDES", True) @@ -68,17 +67,21 @@ do_compile () { if [ "${UBOOT_TARGET}" == "u-boot-sd" ]; then cp ${S}/${board}/u-boot.bin ${S}/${board}/${UBOOT_TARGET}.bin elif [ "${UBOOT_TARGET}" == "u-boot-nand" ];then - if [ "${DEFAULTTUNE}" != "ppce500v2" ];then + if [ "${DEFAULTTUNE}" = "ppce500v2" ];then + if echo $board |egrep "(P1020RDB|P1021RDB|P1024RDB|P2020RDB|P1022DS|P1025RDB)" 2>&1 >/dev/null;then + cp ${S}/${board}/u-boot-with-spl.bin ${S}/${board}/${UBOOT_TARGET}.bin + fi + else cp ${S}/${board}/u-boot.bin ${S}/${board}/${UBOOT_TARGET}.bin fi else if [ -n "${BOOTFORMAT_CONFIG}" ];then - ${STAGING_BINDIR_NATIVE}/boot_format \ - ${STAGING_DATADIR_NATIVE}/boot_format/${BOOTFORMAT_CONFIG} \ - ${S}/${board}/u-boot.bin -spi ${S}/${board}/${UBOOT_TARGET}.bin - else - cp ${S}/${board}/u-boot.bin ${S}/${board}/${UBOOT_TARGET}.bin - fi + ${STAGING_BINDIR_NATIVE}/boot_format \ + ${STAGING_DATADIR_NATIVE}/boot_format/${BOOTFORMAT_CONFIG} \ + ${S}/${board}/u-boot.bin -spi ${S}/${board}/${UBOOT_TARGET}.bin + else + cp ${S}/${board}/u-boot.bin ${S}/${board}/${UBOOT_TARGET}.bin + fi fi fi done @@ -133,4 +136,4 @@ addtask deploy after do_install PACKAGES += "${PN}-images" FILES_${PN}-images += "/boot" -ALLOW_EMPTY = "1" +ALLOW_EMPTY_${PN} = "1" -- cgit v1.2.3-54-g00ecf From 49b845151e5a9f350bfae42fcc72b2a5ade8c52f Mon Sep 17 00:00:00 2001 From: chunrong guo Date: Thu, 21 Mar 2013 03:52:07 +0000 Subject: linux: update to the commit for sdk 1.3.2 Signed-off-by: Chunrong Guo --- meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc index 5408f5ac..f77543ea 100644 --- a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc +++ b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc @@ -1,23 +1,12 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7" -PV = "3.0.48" -PV_e6500 = "3.0.51" -PV_e6500-64b = "3.0.51" -PR = "r10" - -SRCREV = "dd5a5aac3e15b16a4bccbab29c736bda0e7d55e7" -SRCREV_e6500 = "c294ca97427698b749c6fe4b768b9cc1dd37dc04" -SRCREV_e6500-64b = "c294ca97427698b749c6fe4b768b9cc1dd37dc04" +PV = "3.0.51" +PR = "r11" + +SRCREV = "faac5211f398f25e2be44ac996895335d5218516" SRC_URI = "git://git.freescale.com/ppc/sdk/linux.git \ file://0001-compiler.h-Undef-before-redefining-__attribute_const.patch \ - file://0001-powerpc-Fix-build-dependencies-for-c-files-requiring.patch \ " -SRC_URI_e6500 = "git://git.freescale.com/ppc/sdk/linux.git \ - file://0001-compiler.h-Undef-before-redefining-__attribute_const.patch \ -" -SRC_URI_e6500-64b = "git://git.freescale.com/ppc/sdk/linux.git \ - file://0001-compiler.h-Undef-before-redefining-__attribute_const.patch \ -" KSRC ?= "" S = '${@base_conditional("KSRC", "", "${WORKDIR}/git", "${KSRC}", d)}' -- cgit v1.2.3-54-g00ecf From 9e9c8b08b3f41831abd9138a36be963ca85dfbb7 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Sun, 7 Apr 2013 07:39:52 +0000 Subject: lio-utils: remove v4.0 as v4.1 has been added in meta-oe Signed-off-by: Ting Liu Acked-by: Otavio Salvador --- .../files/lio-utils-install-more-modules.patch | 15 ------ .../recipes-tools/lio-utils/lio-utils_4.0.bb | 61 ---------------------- 2 files changed, 76 deletions(-) delete mode 100644 meta-fsl-ppc/recipes-tools/lio-utils/files/lio-utils-install-more-modules.patch delete mode 100644 meta-fsl-ppc/recipes-tools/lio-utils/lio-utils_4.0.bb diff --git a/meta-fsl-ppc/recipes-tools/lio-utils/files/lio-utils-install-more-modules.patch b/meta-fsl-ppc/recipes-tools/lio-utils/files/lio-utils-install-more-modules.patch deleted file mode 100644 index 7f9b02dd..00000000 --- a/meta-fsl-ppc/recipes-tools/lio-utils/files/lio-utils-install-more-modules.patch +++ /dev/null @@ -1,15 +0,0 @@ -Upstream-Status: Pending - -install tcm_snap module - -Signed-off-by: Zhenhua Luo ---- a/tcm-py/setup.py 2012-09-27 04:21:14.984705400 -0500 -+++ b/tcm-py/setup.py 2012-09-27 04:20:18.387604661 -0500 -@@ -12,6 +12,6 @@ - author_email='nab@linux-iscsi.org', - url='http://linux-iscsi.org', - license='GPL', -- py_modules=['tcm_dump', 'tcm_fileio','tcm_iblock','tcm_node','tcm_pscsi','tcm_ramdisk','tcm_loop','tcm_fabric'] -+ py_modules=['tcm_dump', 'tcm_fileio','tcm_iblock','tcm_node','tcm_pscsi','tcm_ramdisk','tcm_loop','tcm_fabric', 'tcm_snap'] - ) - diff --git a/meta-fsl-ppc/recipes-tools/lio-utils/lio-utils_4.0.bb b/meta-fsl-ppc/recipes-tools/lio-utils/lio-utils_4.0.bb deleted file mode 100644 index 98101b3b..00000000 --- a/meta-fsl-ppc/recipes-tools/lio-utils/lio-utils_4.0.bb +++ /dev/null @@ -1,61 +0,0 @@ -SUMMARY = "lio-utils" -DESCRIPTION = "a simple low-level configuration tool set for the Target+iSCSI (LIO)" -HOMEPAGE = "http://linux-iscsi.org/index.php/Lio-utils" -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://debian/copyright;md5=c3ea231a32635cbb5debedf3e88aa3df" - -PR = "r2" - -SRC_URI = "git://risingtidesystems.com/lio-utils.git;protocal=git \ - file://lio-utils-install-more-modules.patch " -SRCREV = "300d9df5e5fa29d7168fb8f0c84a4d9d57436fad" -S = "${WORKDIR}/git" - -inherit distutils - -EXTRA_OEMAKE += "-C ${S}/tools PREFIX=${prefix} DESTDIR=${D}" - -# pass LDFLAGS to linker to avoid missing GNU_HASH QA errors -TARGET_CC_ARCH += "${LDFLAGS}" -do_compile() { - cd ${S}/tcm-py - distutils_do_compile - - cd ${S}/lio-py - distutils_do_compile - - if test -d ${S}/tools; then - oe_runmake - fi -} - -do_install() { - cd ${S}/tcm-py - distutils_do_install - - cd ${S}/lio-py - distutils_do_install - - SITE_PACKAGES=${D}/${PYTHON_SITEPACKAGES_DIR} - [ ! -d ${D}/${sbindir} ] && install -d ${D}/${sbindir} - for var in tcm_node tcm_dump tcm_loop tcm_fabric lio_dump lio_node; do - chmod a+x ${SITE_PACKAGES}/${var}.py - [ ! -f ${D}/${sbindir}/${var} ] && ln -s ${PYTHON_SITEPACKAGES_DIR}/${var}.py ${D}/${sbindir}/${var} - done - - if test -d ${S}/tools; then - oe_runmake install - fi - - install -d ${D}/etc/target/ - install -d ${D}/etc/init.d/ - install -m 755 ${S}/scripts/rc.target ${D}/etc/init.d/ - install -m 755 ${S}/conf/tcm_start.default ${D}/etc/target/tcm_start.sh - install -m 755 ${S}/conf/lio_start.default ${D}/etc/target/lio_start.sh -} - -RDEPENDS_${PN} += "python-stringold python-subprocess python-shell \ - python-datetime python-textutils python-crypt python-netclient python-email" - - -FILES_${PN} += "${sbindir}/* /etc/init.d/* /etc/target/*" -- cgit v1.2.3-54-g00ecf From fff4769e040f908b3020dbe95ae2efb9ab918e46 Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Wed, 10 Apr 2013 07:02:37 +0000 Subject: Remove unnecessary variables from machine conf 1. USE_VT = "" is duplicated with USE_VT = "0" and is removed. 2. SYSVINIT_ENABLED_GETTYS is useful when USE_VT = "1", so remove it. Signed-off-by: Zhenhua Luo --- meta-fsl-ppc/conf/machine/b4420qds-64b.conf | 2 -- meta-fsl-ppc/conf/machine/b4420qds.conf | 2 -- meta-fsl-ppc/conf/machine/b4860qds-64b.conf | 2 -- meta-fsl-ppc/conf/machine/b4860qds.conf | 2 -- meta-fsl-ppc/conf/machine/mpc8536ds.conf | 2 -- meta-fsl-ppc/conf/machine/mpc8544ds.conf | 2 -- meta-fsl-ppc/conf/machine/mpc8548cds.conf | 2 -- meta-fsl-ppc/conf/machine/mpc8572ds.conf | 2 -- meta-fsl-ppc/conf/machine/p1010rdb.conf | 2 -- meta-fsl-ppc/conf/machine/p1020mbg.conf | 2 -- meta-fsl-ppc/conf/machine/p1020rdb.conf | 2 -- meta-fsl-ppc/conf/machine/p1020utm.conf | 2 -- meta-fsl-ppc/conf/machine/p1021rdb.conf | 2 -- meta-fsl-ppc/conf/machine/p1022ds.conf | 2 -- meta-fsl-ppc/conf/machine/p1023rds.conf | 2 -- meta-fsl-ppc/conf/machine/p1024rdb.conf | 2 -- meta-fsl-ppc/conf/machine/p1025rdb.conf | 2 -- meta-fsl-ppc/conf/machine/p2020ds.conf | 2 -- meta-fsl-ppc/conf/machine/p2020rdb.conf | 2 -- meta-fsl-ppc/conf/machine/p2041rdb.conf | 2 -- meta-fsl-ppc/conf/machine/p3041ds.conf | 2 -- meta-fsl-ppc/conf/machine/p4080ds.conf | 2 -- meta-fsl-ppc/conf/machine/p5020ds-64b.conf | 2 -- meta-fsl-ppc/conf/machine/p5020ds.conf | 2 -- meta-fsl-ppc/conf/machine/p5040ds-64b.conf | 2 -- meta-fsl-ppc/conf/machine/p5040ds.conf | 2 -- meta-fsl-ppc/conf/machine/t4160qds-64b.conf | 2 -- meta-fsl-ppc/conf/machine/t4160qds.conf | 2 -- meta-fsl-ppc/conf/machine/t4240qds-64b.conf | 2 -- meta-fsl-ppc/conf/machine/t4240qds.conf | 2 -- 30 files changed, 60 deletions(-) diff --git a/meta-fsl-ppc/conf/machine/b4420qds-64b.conf b/meta-fsl-ppc/conf/machine/b4420qds-64b.conf index 4e8ba850..8ab1d292 100644 --- a/meta-fsl-ppc/conf/machine/b4420qds-64b.conf +++ b/meta-fsl-ppc/conf/machine/b4420qds-64b.conf @@ -13,8 +13,6 @@ KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/85xx/e6500rev1_defconfig" JFFS2_ERASEBLOCK = "0x10000" -SYSVINIT_ENABLED_GETTYS = "" -USE_VT = "" SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" USE_VT = "0" diff --git a/meta-fsl-ppc/conf/machine/b4420qds.conf b/meta-fsl-ppc/conf/machine/b4420qds.conf index 233d0e77..fe1a44ef 100644 --- a/meta-fsl-ppc/conf/machine/b4420qds.conf +++ b/meta-fsl-ppc/conf/machine/b4420qds.conf @@ -11,8 +11,6 @@ KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/85xx/e6500rev1_defconfig" JFFS2_ERASEBLOCK = "0x10000" -SYSVINIT_ENABLED_GETTYS = "" -USE_VT = "" SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" USE_VT = "0" diff --git a/meta-fsl-ppc/conf/machine/b4860qds-64b.conf b/meta-fsl-ppc/conf/machine/b4860qds-64b.conf index 1d878ae2..7cd18f9e 100644 --- a/meta-fsl-ppc/conf/machine/b4860qds-64b.conf +++ b/meta-fsl-ppc/conf/machine/b4860qds-64b.conf @@ -13,8 +13,6 @@ KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/85xx/e6500rev1_defconfig" JFFS2_ERASEBLOCK = "0x10000" -SYSVINIT_ENABLED_GETTYS = "" -USE_VT = "" SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" USE_VT = "0" diff --git a/meta-fsl-ppc/conf/machine/b4860qds.conf b/meta-fsl-ppc/conf/machine/b4860qds.conf index 4cdbd229..1143a657 100644 --- a/meta-fsl-ppc/conf/machine/b4860qds.conf +++ b/meta-fsl-ppc/conf/machine/b4860qds.conf @@ -12,8 +12,6 @@ KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/85xx/e6500rev1_defconfig" JFFS2_ERASEBLOCK = "0x10000" -SYSVINIT_ENABLED_GETTYS = "" -USE_VT = "" SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" USE_VT = "0" diff --git a/meta-fsl-ppc/conf/machine/mpc8536ds.conf b/meta-fsl-ppc/conf/machine/mpc8536ds.conf index e515566f..a72de6e6 100644 --- a/meta-fsl-ppc/conf/machine/mpc8536ds.conf +++ b/meta-fsl-ppc/conf/machine/mpc8536ds.conf @@ -14,8 +14,6 @@ KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_defconfig" JFFS2_ERASEBLOCK = "0x20000" -SYSVINIT_ENABLED_GETTYS = "" -USE_VT = "" SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" USE_VT = "0" diff --git a/meta-fsl-ppc/conf/machine/mpc8544ds.conf b/meta-fsl-ppc/conf/machine/mpc8544ds.conf index 2cacf357..71a139a9 100644 --- a/meta-fsl-ppc/conf/machine/mpc8544ds.conf +++ b/meta-fsl-ppc/conf/machine/mpc8544ds.conf @@ -12,8 +12,6 @@ KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_defconfig" JFFS2_ERASEBLOCK = "0x20000" -SYSVINIT_ENABLED_GETTYS = "" -USE_VT = "" SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" USE_VT = "0" diff --git a/meta-fsl-ppc/conf/machine/mpc8548cds.conf b/meta-fsl-ppc/conf/machine/mpc8548cds.conf index b3a91d91..c18da1fe 100644 --- a/meta-fsl-ppc/conf/machine/mpc8548cds.conf +++ b/meta-fsl-ppc/conf/machine/mpc8548cds.conf @@ -13,8 +13,6 @@ KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_defconfig" JFFS2_ERASEBLOCK = "0x20000" -SYSVINIT_ENABLED_GETTYS = "" -USE_VT = "" SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" USE_VT = "0" diff --git a/meta-fsl-ppc/conf/machine/mpc8572ds.conf b/meta-fsl-ppc/conf/machine/mpc8572ds.conf index 7e598f00..eb915bbe 100644 --- a/meta-fsl-ppc/conf/machine/mpc8572ds.conf +++ b/meta-fsl-ppc/conf/machine/mpc8572ds.conf @@ -12,8 +12,6 @@ KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" JFFS2_ERASEBLOCK = "0x20000" -SYSVINIT_ENABLED_GETTYS = "" -USE_VT = "" SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" USE_VT = "0" diff --git a/meta-fsl-ppc/conf/machine/p1010rdb.conf b/meta-fsl-ppc/conf/machine/p1010rdb.conf index bdca3c8c..ccc5053c 100644 --- a/meta-fsl-ppc/conf/machine/p1010rdb.conf +++ b/meta-fsl-ppc/conf/machine/p1010rdb.conf @@ -12,8 +12,6 @@ KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_defconfig" JFFS2_ERASEBLOCK = "0x20000" -SYSVINIT_ENABLED_GETTYS = "" -USE_VT = "" SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" USE_VT = "0" diff --git a/meta-fsl-ppc/conf/machine/p1020mbg.conf b/meta-fsl-ppc/conf/machine/p1020mbg.conf index b6182bf2..b83af81d 100644 --- a/meta-fsl-ppc/conf/machine/p1020mbg.conf +++ b/meta-fsl-ppc/conf/machine/p1020mbg.conf @@ -13,8 +13,6 @@ KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" JFFS2_ERASEBLOCK = "0x20000" -SYSVINIT_ENABLED_GETTYS = "" -USE_VT = "" SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" USE_VT = "0" diff --git a/meta-fsl-ppc/conf/machine/p1020rdb.conf b/meta-fsl-ppc/conf/machine/p1020rdb.conf index 3f4e819a..70132c56 100644 --- a/meta-fsl-ppc/conf/machine/p1020rdb.conf +++ b/meta-fsl-ppc/conf/machine/p1020rdb.conf @@ -14,8 +14,6 @@ KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" JFFS2_ERASEBLOCK = "0x20000" -SYSVINIT_ENABLED_GETTYS = "" -USE_VT = "" SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" USE_VT = "0" diff --git a/meta-fsl-ppc/conf/machine/p1020utm.conf b/meta-fsl-ppc/conf/machine/p1020utm.conf index 5b8ea270..6751cd80 100644 --- a/meta-fsl-ppc/conf/machine/p1020utm.conf +++ b/meta-fsl-ppc/conf/machine/p1020utm.conf @@ -13,8 +13,6 @@ KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" JFFS2_ERASEBLOCK = "0x20000" -SYSVINIT_ENABLED_GETTYS = "" -USE_VT = "" SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" USE_VT = "0" diff --git a/meta-fsl-ppc/conf/machine/p1021rdb.conf b/meta-fsl-ppc/conf/machine/p1021rdb.conf index ad7e54fb..c1657a41 100644 --- a/meta-fsl-ppc/conf/machine/p1021rdb.conf +++ b/meta-fsl-ppc/conf/machine/p1021rdb.conf @@ -13,8 +13,6 @@ KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" JFFS2_ERASEBLOCK = "0x20000" -SYSVINIT_ENABLED_GETTYS = "" -USE_VT = "" SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" USE_VT = "0" diff --git a/meta-fsl-ppc/conf/machine/p1022ds.conf b/meta-fsl-ppc/conf/machine/p1022ds.conf index 20389a2c..f604ea1f 100644 --- a/meta-fsl-ppc/conf/machine/p1022ds.conf +++ b/meta-fsl-ppc/conf/machine/p1022ds.conf @@ -22,8 +22,6 @@ XSERVER = " \ JFFS2_ERASEBLOCK = "0x20000" -SYSVINIT_ENABLED_GETTYS = "" -USE_VT = "" SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" USE_VT = "0" diff --git a/meta-fsl-ppc/conf/machine/p1023rds.conf b/meta-fsl-ppc/conf/machine/p1023rds.conf index 189c5c04..fd79a1e8 100644 --- a/meta-fsl-ppc/conf/machine/p1023rds.conf +++ b/meta-fsl-ppc/conf/machine/p1023rds.conf @@ -13,8 +13,6 @@ PREFERRED_VERSION_fmc = "0.9.23" JFFS2_ERASEBLOCK = "0x10000" -SYSVINIT_ENABLED_GETTYS = "" -USE_VT = "" SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" USE_VT = "0" diff --git a/meta-fsl-ppc/conf/machine/p1024rdb.conf b/meta-fsl-ppc/conf/machine/p1024rdb.conf index 58c08653..524b9d12 100644 --- a/meta-fsl-ppc/conf/machine/p1024rdb.conf +++ b/meta-fsl-ppc/conf/machine/p1024rdb.conf @@ -13,8 +13,6 @@ KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" JFFS2_ERASEBLOCK = "0x20000" -SYSVINIT_ENABLED_GETTYS = "" -USE_VT = "" SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" USE_VT = "0" diff --git a/meta-fsl-ppc/conf/machine/p1025rdb.conf b/meta-fsl-ppc/conf/machine/p1025rdb.conf index a7071cb4..18ccd2eb 100644 --- a/meta-fsl-ppc/conf/machine/p1025rdb.conf +++ b/meta-fsl-ppc/conf/machine/p1025rdb.conf @@ -13,8 +13,6 @@ KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" JFFS2_ERASEBLOCK = "0x20000" -SYSVINIT_ENABLED_GETTYS = "" -USE_VT = "" SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" USE_VT = "0" diff --git a/meta-fsl-ppc/conf/machine/p2020ds.conf b/meta-fsl-ppc/conf/machine/p2020ds.conf index 21f62de4..9ca16174 100644 --- a/meta-fsl-ppc/conf/machine/p2020ds.conf +++ b/meta-fsl-ppc/conf/machine/p2020ds.conf @@ -12,8 +12,6 @@ KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" JFFS2_ERASEBLOCK = "0x20000" -SYSVINIT_ENABLED_GETTYS = "" -USE_VT = "" SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" USE_VT = "0" diff --git a/meta-fsl-ppc/conf/machine/p2020rdb.conf b/meta-fsl-ppc/conf/machine/p2020rdb.conf index 67856b31..b703b9f5 100644 --- a/meta-fsl-ppc/conf/machine/p2020rdb.conf +++ b/meta-fsl-ppc/conf/machine/p2020rdb.conf @@ -13,8 +13,6 @@ KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" JFFS2_ERASEBLOCK = "0x20000" -SYSVINIT_ENABLED_GETTYS = "" -USE_VT = "" SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" USE_VT = "0" diff --git a/meta-fsl-ppc/conf/machine/p2041rdb.conf b/meta-fsl-ppc/conf/machine/p2041rdb.conf index ea1594f9..2f96ce6b 100644 --- a/meta-fsl-ppc/conf/machine/p2041rdb.conf +++ b/meta-fsl-ppc/conf/machine/p2041rdb.conf @@ -12,8 +12,6 @@ KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet32_smp_defconfig" JFFS2_ERASEBLOCK = "0x10000" -SYSVINIT_ENABLED_GETTYS = "" -USE_VT = "" SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" USE_VT = "0" diff --git a/meta-fsl-ppc/conf/machine/p3041ds.conf b/meta-fsl-ppc/conf/machine/p3041ds.conf index bf036490..6fb80e14 100644 --- a/meta-fsl-ppc/conf/machine/p3041ds.conf +++ b/meta-fsl-ppc/conf/machine/p3041ds.conf @@ -12,8 +12,6 @@ KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet32_smp_defconfig" JFFS2_ERASEBLOCK = "0x10000" -SYSVINIT_ENABLED_GETTYS = "" -USE_VT = "" SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" USE_VT = "0" diff --git a/meta-fsl-ppc/conf/machine/p4080ds.conf b/meta-fsl-ppc/conf/machine/p4080ds.conf index 332a39f4..daa929a1 100644 --- a/meta-fsl-ppc/conf/machine/p4080ds.conf +++ b/meta-fsl-ppc/conf/machine/p4080ds.conf @@ -12,8 +12,6 @@ KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet32_smp_defconfig" JFFS2_ERASEBLOCK = "0x10000" -SYSVINIT_ENABLED_GETTYS = "" -USE_VT = "" SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" USE_VT = "0" diff --git a/meta-fsl-ppc/conf/machine/p5020ds-64b.conf b/meta-fsl-ppc/conf/machine/p5020ds-64b.conf index 75be7fdb..e67ad1ed 100644 --- a/meta-fsl-ppc/conf/machine/p5020ds-64b.conf +++ b/meta-fsl-ppc/conf/machine/p5020ds-64b.conf @@ -13,8 +13,6 @@ KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet64_smp_defconfig" JFFS2_ERASEBLOCK = "0x10000" -SYSVINIT_ENABLED_GETTYS = "" -USE_VT = "" SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" USE_VT = "0" diff --git a/meta-fsl-ppc/conf/machine/p5020ds.conf b/meta-fsl-ppc/conf/machine/p5020ds.conf index 06b4f7cc..d4ce3d39 100644 --- a/meta-fsl-ppc/conf/machine/p5020ds.conf +++ b/meta-fsl-ppc/conf/machine/p5020ds.conf @@ -12,8 +12,6 @@ KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet32_smp_defconfig" JFFS2_ERASEBLOCK = "0x10000" -SYSVINIT_ENABLED_GETTYS = "" -USE_VT = "" SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" USE_VT = "0" diff --git a/meta-fsl-ppc/conf/machine/p5040ds-64b.conf b/meta-fsl-ppc/conf/machine/p5040ds-64b.conf index 68a5a32b..2a885b7c 100644 --- a/meta-fsl-ppc/conf/machine/p5040ds-64b.conf +++ b/meta-fsl-ppc/conf/machine/p5040ds-64b.conf @@ -12,8 +12,6 @@ KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet64_smp_defconfig" JFFS2_ERASEBLOCK = "0x10000" -SYSVINIT_ENABLED_GETTYS = "" -USE_VT = "" SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" USE_VT = "0" diff --git a/meta-fsl-ppc/conf/machine/p5040ds.conf b/meta-fsl-ppc/conf/machine/p5040ds.conf index e1db0693..c7d253ff 100644 --- a/meta-fsl-ppc/conf/machine/p5040ds.conf +++ b/meta-fsl-ppc/conf/machine/p5040ds.conf @@ -12,8 +12,6 @@ KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet32_smp_defconfig" JFFS2_ERASEBLOCK = "0x10000" -SYSVINIT_ENABLED_GETTYS = "" -USE_VT = "" SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" USE_VT = "0" diff --git a/meta-fsl-ppc/conf/machine/t4160qds-64b.conf b/meta-fsl-ppc/conf/machine/t4160qds-64b.conf index eceb0658..e8d4475a 100644 --- a/meta-fsl-ppc/conf/machine/t4160qds-64b.conf +++ b/meta-fsl-ppc/conf/machine/t4160qds-64b.conf @@ -13,8 +13,6 @@ KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/85xx/e6500rev1_defconfig" JFFS2_ERASEBLOCK = "0x10000" -SYSVINIT_ENABLED_GETTYS = "" -USE_VT = "" SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" USE_VT = "0" diff --git a/meta-fsl-ppc/conf/machine/t4160qds.conf b/meta-fsl-ppc/conf/machine/t4160qds.conf index 4ae03bcd..71b4efb7 100644 --- a/meta-fsl-ppc/conf/machine/t4160qds.conf +++ b/meta-fsl-ppc/conf/machine/t4160qds.conf @@ -12,8 +12,6 @@ KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/85xx/e6500rev1_defconfig" JFFS2_ERASEBLOCK = "0x10000" -SYSVINIT_ENABLED_GETTYS = "" -USE_VT = "" SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" USE_VT = "0" diff --git a/meta-fsl-ppc/conf/machine/t4240qds-64b.conf b/meta-fsl-ppc/conf/machine/t4240qds-64b.conf index 8aae5288..31345b1e 100644 --- a/meta-fsl-ppc/conf/machine/t4240qds-64b.conf +++ b/meta-fsl-ppc/conf/machine/t4240qds-64b.conf @@ -13,8 +13,6 @@ KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/85xx/e6500rev1_defconfig" JFFS2_ERASEBLOCK = "0x10000" -SYSVINIT_ENABLED_GETTYS = "" -USE_VT = "" SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" USE_VT = "0" diff --git a/meta-fsl-ppc/conf/machine/t4240qds.conf b/meta-fsl-ppc/conf/machine/t4240qds.conf index 4aa36a20..a348fe1d 100644 --- a/meta-fsl-ppc/conf/machine/t4240qds.conf +++ b/meta-fsl-ppc/conf/machine/t4240qds.conf @@ -12,8 +12,6 @@ KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/85xx/e6500rev1_defconfig" JFFS2_ERASEBLOCK = "0x10000" -SYSVINIT_ENABLED_GETTYS = "" -USE_VT = "" SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" USE_VT = "0" -- cgit v1.2.3-54-g00ecf From cef5295fed0f2830e4e7e29e47308ea0f4b435be Mon Sep 17 00:00:00 2001 From: Chunrong Guo Date: Fri, 12 Apr 2013 05:47:42 +0000 Subject: linux-qoriq-sdk: enable CONFIG_DEVTMPFS_MOUNT to ensure /dev can be mounted correctly * The udev is upgraded to 182, the /dev mount requires CONFIG_DEVTMPFS_MOUNT is enabled in Kernel, so enable the option for QorIQ SDK targets. Signed-off-by: Chunrong Guo --- ...option-Automount-devtmpfs-at-dev-in-kerne.patch | 78 ++++++++++++++++++++++ .../recipes-kernel/linux/linux-qoriq-sdk.bb | 3 +- 2 files changed, 80 insertions(+), 1 deletion(-) create mode 100644 meta-fsl-ppc/recipes-kernel/linux/files/0001-Enable-the-option-Automount-devtmpfs-at-dev-in-kerne.patch diff --git a/meta-fsl-ppc/recipes-kernel/linux/files/0001-Enable-the-option-Automount-devtmpfs-at-dev-in-kerne.patch b/meta-fsl-ppc/recipes-kernel/linux/files/0001-Enable-the-option-Automount-devtmpfs-at-dev-in-kerne.patch new file mode 100644 index 00000000..39783efc --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/linux/files/0001-Enable-the-option-Automount-devtmpfs-at-dev-in-kerne.patch @@ -0,0 +1,78 @@ +From 3179602e581b6fe8797a5677d5ac4ecfab065cc6 Mon Sep 17 00:00:00 2001 +From: Chunrong Guo +Date: Thu, 11 Apr 2013 01:52:48 -0500 +Subject: [PATCH] Enable "the option Automount devtmpfs at /dev" in kernel + +Upstream-Status:Pending +Signed-off-by: Chunrong Guo +--- + arch/powerpc/configs/85xx/e6500rev1_defconfig | 1 + + arch/powerpc/configs/corenet32_smp_defconfig | 1 + + arch/powerpc/configs/corenet64_smp_defconfig | 1 + + arch/powerpc/configs/mpc85xx_defconfig | 1 + + arch/powerpc/configs/mpc85xx_smp_defconfig | 1 + + 5 files changed, 5 insertions(+) + +diff --git a/arch/powerpc/configs/85xx/e6500rev1_defconfig b/arch/powerpc/configs/85xx/e6500rev1_defconfig +index 4b5866d..32ebb50 100644 +--- a/arch/powerpc/configs/85xx/e6500rev1_defconfig ++++ b/arch/powerpc/configs/85xx/e6500rev1_defconfig +@@ -72,6 +72,7 @@ CONFIG_IPV6=y + CONFIG_IP_SCTP=m + CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" + CONFIG_DEVTMPFS=y ++CONFIG_DEVTMPFS_MOUNT=y + CONFIG_MTD=y + CONFIG_MTD_CMDLINE_PARTS=y + CONFIG_MTD_CHAR=y +diff --git a/arch/powerpc/configs/corenet32_smp_defconfig b/arch/powerpc/configs/corenet32_smp_defconfig +index b43d4b6..3fe10e5 100644 +--- a/arch/powerpc/configs/corenet32_smp_defconfig ++++ b/arch/powerpc/configs/corenet32_smp_defconfig +@@ -71,6 +71,7 @@ CONFIG_IPV6=y + CONFIG_IP_SCTP=m + CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" + CONFIG_DEVTMPFS=y ++CONFIG_DEVTMPFS_MOUNT=y + CONFIG_MTD=y + CONFIG_MTD_CMDLINE_PARTS=y + CONFIG_MTD_CHAR=y +diff --git a/arch/powerpc/configs/corenet64_smp_defconfig b/arch/powerpc/configs/corenet64_smp_defconfig +index 13b032b..74cc46a 100644 +--- a/arch/powerpc/configs/corenet64_smp_defconfig ++++ b/arch/powerpc/configs/corenet64_smp_defconfig +@@ -66,6 +66,7 @@ CONFIG_IPV6=y + CONFIG_IP_SCTP=m + CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" + CONFIG_DEVTMPFS=y ++CONFIG_DEVTMPFS_MOUNT=y + CONFIG_MTD=y + CONFIG_MTD_CMDLINE_PARTS=y + CONFIG_MTD_CHAR=y +diff --git a/arch/powerpc/configs/mpc85xx_defconfig b/arch/powerpc/configs/mpc85xx_defconfig +index 8fb742d..f353a6e 100644 +--- a/arch/powerpc/configs/mpc85xx_defconfig ++++ b/arch/powerpc/configs/mpc85xx_defconfig +@@ -75,6 +75,7 @@ CONFIG_IPV6=y + CONFIG_IP_SCTP=m + CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" + CONFIG_DEVTMPFS=y ++CONFIG_DEVTMPFS_MOUNT=y + CONFIG_MTD=y + CONFIG_MTD_CHAR=y + CONFIG_MTD_BLOCK=y +diff --git a/arch/powerpc/configs/mpc85xx_smp_defconfig b/arch/powerpc/configs/mpc85xx_smp_defconfig +index b31c8ac..cdc2c87 100644 +--- a/arch/powerpc/configs/mpc85xx_smp_defconfig ++++ b/arch/powerpc/configs/mpc85xx_smp_defconfig +@@ -77,6 +77,7 @@ CONFIG_IPV6=y + CONFIG_IP_SCTP=m + CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" + CONFIG_DEVTMPFS=y ++CONFIG_DEVTMPFS_MOUNT=y + CONFIG_MTD=y + CONFIG_MTD_CHAR=y + CONFIG_MTD_BLOCK=y +-- +1.7.9.7 + diff --git a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.bb b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.bb index 1971f155..45f615fe 100644 --- a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.bb +++ b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.bb @@ -8,9 +8,10 @@ LICENSE = "GPLv2" require recipes-kernel/linux/linux-qoriq-sdk.inc -PR = "r9" +PR = "r10" SRC_URI += "file://fix_getrusage_for_perf.patch \ + file://0001-Enable-the-option-Automount-devtmpfs-at-dev-in-kerne.patch \ " do_configure_prepend() { -- cgit v1.2.3-54-g00ecf From 306af6d6078d69f4d60a2c525228ee7b570a2b0c Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Wed, 24 Apr 2013 13:20:01 +0000 Subject: Update README Signed-off-by: Zhenhua Luo --- meta-fsl-ppc/README | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/meta-fsl-ppc/README b/meta-fsl-ppc/README index 1c87788e..39a54bf4 100644 --- a/meta-fsl-ppc/README +++ b/meta-fsl-ppc/README @@ -1,16 +1,15 @@ -meta-fsl-ppc -========== +OpenEmbedded/Yocto BSP layer for Freescale's PPC platforms +========================================================== -This is the location for Freescale PowerPC maintained BSP's +This layer provides support for Freescale's PPC platforms for use with +OpenEmbedded and/or Yocto. This layer depends on: + URI: git://git.openembedded.org/openembedded-core branch: master revision: HEAD -It's testing to be working against YP 1.1 (edison) onwards after -checking out the appropriate branch - Contributing ------------ @@ -26,14 +25,15 @@ Source code: git://git.yoctoproject.org/meta-fsl-ppc http://git.yoctoproject.org/git/meta-fsl-ppc -When sending patches, please use something like: - -git send-email --to meta-freescale@yoctoproject.org --subject-prefix='meta-fsl-ppc][PATCH' +When creating patches, please use something like: + git format-patch -s --subject-prefix='meta-fsl-ppc dylan][PATCH' origin optionally include a branch if the patch applies to multiple branches, otherwise master is assumed -git send-email --to meta-freescale@yoctoproject.org --subject-prefix='meta-fsl-ppc][PATCH][denzil][danny][master' +When sending patches, please use something like: + + git send-email --to meta-freescale@yoctoproject.org git.yoctoproject.org vs. git.freescale.com: ------------------------------------------- -- cgit v1.2.3-54-g00ecf From dcc7ba9d339c0fcb338d7182788c816a6220cd9d Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Fri, 3 May 2013 22:01:41 +0800 Subject: fmc: deploy header and library into sysroot fmc.h and libfmc.a might be depended by other packages Signed-off-by: Zhenhua Luo --- meta-fsl-ppc/recipes-ucode/fmc/fmc_git.bb | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/meta-fsl-ppc/recipes-ucode/fmc/fmc_git.bb b/meta-fsl-ppc/recipes-ucode/fmc/fmc_git.bb index 4f852166..fd238967 100644 --- a/meta-fsl-ppc/recipes-ucode/fmc/fmc_git.bb +++ b/meta-fsl-ppc/recipes-ucode/fmc/fmc_git.bb @@ -3,7 +3,7 @@ SECTION = "fmc" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://COPYING;md5=a504ab5a8ff235e67c7301214749346c" -PR = "r1" +PR = "r2" SRC_URI = "git://git.freescale.com/ppc/sdk/fmc.git" SRCREV = "6db53fae9dfe72db0312a383733e0d3598aad3f2" @@ -21,6 +21,8 @@ EXTRA_OEMAKE_virtclass-native = 'FMCHOSTMODE=1 FMD_USPACE_HEADER_PATH="${STAGING FMD_USPACE_LIB_PATH="${STAGING_LIBDIR}" LIBXML2_HEADER_PATH="${STAGING_INCDIR}/libxml2" \ TCLAP_HEADER_PATH="${STAGING_INCDIR}" ' +PARALLEL_MAKE = "" + do_compile () { if [ "b4860qds" = "${MACHINE}" ] || [ "b4420qds" = "${MACHINE}" ];then EXTRA_OEMAKE_PLATFORM="b4860qds" @@ -40,8 +42,12 @@ do_install () { install -d ${D}/etc/fmc/config install -m 644 ${S}/etc/fmc/config/hxs_pdl_v3.xml ${D}/etc/fmc/config -} -PARALLEL_MAKE = "" + install -d ${D}/${includedir}/fmc + install ${S}/source/fmc.h ${D}/${includedir}/fmc + + install -d ${D}/${libdir} + install ${S}/source/libfmc.a ${D}/${libdir} +} BBCLASSEXTEND = "native" -- cgit v1.2.3-54-g00ecf From 3b8fd264e4549852600dbf5c0eb2ad087e2a74f0 Mon Sep 17 00:00:00 2001 From: Chunrong Guo Date: Mon, 6 May 2013 08:14:22 +0000 Subject: netbase: remove netbase bbappend * netbase was updated from 5.0 to 5.1 in oe-core, so as our bbappend only contained a PRINC, we can drop it now without breaking upgrade path Signed-off-by: Chunrong Guo --- meta-fsl-ppc/recipes-append/netbase/netbase_5.0.bbappend | 2 -- 1 file changed, 2 deletions(-) delete mode 100644 meta-fsl-ppc/recipes-append/netbase/netbase_5.0.bbappend diff --git a/meta-fsl-ppc/recipes-append/netbase/netbase_5.0.bbappend b/meta-fsl-ppc/recipes-append/netbase/netbase_5.0.bbappend deleted file mode 100644 index 8445337a..00000000 --- a/meta-fsl-ppc/recipes-append/netbase/netbase_5.0.bbappend +++ /dev/null @@ -1,2 +0,0 @@ -PRINC := "${@int(PRINC) + 1}" - -- cgit v1.2.3-54-g00ecf From c94ea264d0b6ac68422882a670d179d038b6d09b Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Mon, 20 May 2013 13:12:05 +0000 Subject: eth-config: use pattern match for xml files installation Use pattern match to install xml files and no need to update recipe if xml files are added, renamed or deleted. Signed-off-by: Zhenhua Luo --- meta-fsl-ppc/recipes-tools/eth-config/eth-config_git.bb | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/meta-fsl-ppc/recipes-tools/eth-config/eth-config_git.bb b/meta-fsl-ppc/recipes-tools/eth-config/eth-config_git.bb index f1e957cf..3ed50a5c 100644 --- a/meta-fsl-ppc/recipes-tools/eth-config/eth-config_git.bb +++ b/meta-fsl-ppc/recipes-tools/eth-config/eth-config_git.bb @@ -3,7 +3,7 @@ SECTION = "eth-config" LICENSE = "Freescale EULA" LIC_FILES_CHKSUM = "file://COPYING;md5=cf02dc8eb5ac4a76f3812826520dea87" -PR = "r1" +PR = "r2" SRC_URI = "git://git.freescale.com/ppc/sdk/eth-config.git" SRCREV = "c1400695e56aa80f2f4c88c4e0582028248ae06f" @@ -12,11 +12,8 @@ S = "${WORKDIR}/git" do_install() { install -d ${D}/etc/fmc/config - install -m 644 ${S}/8c-128fq-p.xml ${D}/etc/fmc/config - install -m 644 ${S}/cfg-8c.xml ${D}/etc/fmc/config + install -m 644 ${S}/*.xml ${D}/etc/fmc/config install -d ${D}/etc/fmc/config/shared_mac - install -m 644 ${S}/shared_mac/hv2p_config_p4_shared_mac.xml ${D}/etc/fmc/config/shared_mac - install -m 644 ${S}/shared_mac/hv2p_policy_shared_mac.xml ${D}/etc/fmc/config/shared_mac - install -m 644 ${S}/shared_mac/hv2p_swparser_shared_mac.xml ${D}/etc/fmc/config/shared_mac + install -m 644 ${S}/shared_mac/*.xml ${D}/etc/fmc/config/shared_mac install -m 644 ${S}/shared_mac/README ${D}/etc/fmc/config/shared_mac } -- cgit v1.2.3-54-g00ecf From 4cc307d7eab6823bf89e8469ac2ef03e91bb6653 Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Tue, 21 May 2013 06:21:07 +0000 Subject: linux-qoriq-sdk: append SDK version to kernel version if SDK_VERSION is defined, append the sdk version string to kernel version, this can make make the sdk version is explicit for users, expecially when same kernel verison is used for different releases. Signed-off-by: Zhenhua Luo --- meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.bb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.bb b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.bb index 45f615fe..a015e499 100644 --- a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.bb +++ b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.bb @@ -5,10 +5,9 @@ DESCRIPTION = "Linux kernel for Freescale platforms" SECTION = "kernel" LICENSE = "GPLv2" - require recipes-kernel/linux/linux-qoriq-sdk.inc -PR = "r10" +PR = "r11" SRC_URI += "file://fix_getrusage_for_perf.patch \ file://0001-Enable-the-option-Automount-devtmpfs-at-dev-in-kerne.patch \ @@ -17,4 +16,9 @@ SRC_URI += "file://fix_getrusage_for_perf.patch \ do_configure_prepend() { # copy desired defconfig so we pick it up for the real kernel_do_configure cp ${KERNEL_DEFCONFIG} ${B}/.config + + # append sdk version in kernel version if SDK_VERSION is defined + if [ -n "${SDK_VERSION}" ]; then + echo "CONFIG_LOCALVERSION=\"-${SDK_VERSION}\"" >> ${S}/.config + fi } -- cgit v1.2.3-54-g00ecf From 3b3f257ea5f4205ccdd117a7af12ba4d0f0897a0 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Tue, 21 May 2013 18:18:38 +0000 Subject: hypervisor: Compile only for fsl machines Signed-off-by: Khem Raj --- meta-fsl-ppc/recipes-tools/embedded-hv/hypervisor_git.bb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/meta-fsl-ppc/recipes-tools/embedded-hv/hypervisor_git.bb b/meta-fsl-ppc/recipes-tools/embedded-hv/hypervisor_git.bb index 25942ee0..5e9e442a 100644 --- a/meta-fsl-ppc/recipes-tools/embedded-hv/hypervisor_git.bb +++ b/meta-fsl-ppc/recipes-tools/embedded-hv/hypervisor_git.bb @@ -31,6 +31,9 @@ EXTRA_OEMAKE = 'CROSS_COMPILE=${TARGET_PREFIX} CC="${TARGET_PREFIX}gcc ${TOOLCHA DEFCONFIG = "defconfig" DEFCONFIG_powerpc64 = "64bit_defconfig" +COMPATIBLE_HOST_fslmachine = ".*" +COMPATIBLE_HOST ?= "(none)" + inherit cml1 do_configure () { oe_runmake ${DEFCONFIG} -- cgit v1.2.3-54-g00ecf From aa1588d2eb3f9baa6c0392ae5d19f6153e96f5aa Mon Sep 17 00:00:00 2001 From: Vakul Garg Date: Sun, 9 Jun 2013 04:50:49 +0000 Subject: usdpaa: Added fmc in usdpaa dependency list. Signed-off-by: Vakul Garg --- meta-fsl-ppc/recipes-tools/usdpaa/usdpaa_git.bb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meta-fsl-ppc/recipes-tools/usdpaa/usdpaa_git.bb b/meta-fsl-ppc/recipes-tools/usdpaa/usdpaa_git.bb index 7125716b..914d35a5 100644 --- a/meta-fsl-ppc/recipes-tools/usdpaa/usdpaa_git.bb +++ b/meta-fsl-ppc/recipes-tools/usdpaa/usdpaa_git.bb @@ -2,11 +2,11 @@ DESCRIPTION = "User-Space Data-Path Acceleration Architecture drivers" SECTION = "usdpaa" LICENSE = "BSD & GPLv2" LIC_FILES_CHKSUM = "file://Makefile;endline=30;md5=39e58bedc879163c9338596e52df5b1f" -PR = "r2" +PR = "r3" inherit pkgconfig -DEPENDS = "libxml2 libedit ncurses readline flib" +DEPENDS = "libxml2 libedit ncurses readline flib fmc" RDEPENDS_${PN} = "libgcc" SRC_URI = "git://git.freescale.com/ppc/sdk/usdpaa.git" -- cgit v1.2.3-54-g00ecf From ec42341aef91bd99b3d82a1b1a158843785cff24 Mon Sep 17 00:00:00 2001 From: Zongchun Yu Date: Sun, 9 Jun 2013 04:50:50 +0000 Subject: usdpaa: export ARCH for all tasks ARCH environment variable is needed for do_{compile,install,clean}. This fixes the issue: when run command "make clean" under devshell, the obj files was not be cleaned. Signed-off-by: Zongchun Yu --- meta-fsl-ppc/recipes-tools/usdpaa/usdpaa_git.bb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/meta-fsl-ppc/recipes-tools/usdpaa/usdpaa_git.bb b/meta-fsl-ppc/recipes-tools/usdpaa/usdpaa_git.bb index 914d35a5..3138675f 100644 --- a/meta-fsl-ppc/recipes-tools/usdpaa/usdpaa_git.bb +++ b/meta-fsl-ppc/recipes-tools/usdpaa/usdpaa_git.bb @@ -2,7 +2,7 @@ DESCRIPTION = "User-Space Data-Path Acceleration Architecture drivers" SECTION = "usdpaa" LICENSE = "BSD & GPLv2" LIC_FILES_CHKSUM = "file://Makefile;endline=30;md5=39e58bedc879163c9338596e52df5b1f" -PR = "r3" +PR = "r4" inherit pkgconfig @@ -15,9 +15,9 @@ SRCREV = "670ad8827fd83169ccb54a008c638dbb497b1c61" S = "${WORKDIR}/git" EXTRA_OEMAKE = 'V=1 CC="${CC}" LD="${LD}" AR="${AR}"' +export ARCH="${TARGET_ARCH}" do_compile_prepend () { - export ARCH=${TARGET_ARCH} export LIBXML2_CFLAGS="$(pkg-config --cflags libxml-2.0)" export LIBXML2_LDFLAGS="$(pkg-config --libs --static libxml-2.0)" export LIBEDIT_CFLAGS="$(pkg-config --cflags libedit)" @@ -25,7 +25,7 @@ do_compile_prepend () { } do_install () { - oe_runmake ARCH=${TARGET_ARCH} install DESTDIR=${D} + oe_runmake install DESTDIR=${D} } PARALLEL_MAKE_pn-${PN} = "" -- cgit v1.2.3-54-g00ecf From 0c92a5f7a780a6be0c6aaebc4ef8bf84974f8f40 Mon Sep 17 00:00:00 2001 From: Zongchun Yu Date: Sun, 9 Jun 2013 04:50:51 +0000 Subject: cryptodev: compile testprogs and package them to ${PN}-tests Also add missing openssl dependency. Signed-off-by: Zongchun Yu --- .../recipes-kernel/cryptodev/cryptodev_1.5.bb | 18 +++++- ...pile-and-install-rules-for-cryptodev-test.patch | 69 ++++++++++++++++++++++ 2 files changed, 86 insertions(+), 1 deletion(-) create mode 100644 meta-fsl-ppc/recipes-kernel/cryptodev/files/Add-the-compile-and-install-rules-for-cryptodev-test.patch diff --git a/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev_1.5.bb b/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev_1.5.bb index 636bb544..4c1dadeb 100644 --- a/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev_1.5.bb +++ b/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev_1.5.bb @@ -7,10 +7,14 @@ RCONFLICTS_${PN} = "ocf-linux" inherit module +PR = "r1" +DEPENDS += "openssl" + SRCREV = "1c24a0aa996630518d47826a2e3fea129ea094c7" SRC_URI = "git://repo.or.cz/cryptodev-linux.git;protocol=git \ - file://makefile_fixup.patch" + file://makefile_fixup.patch \ + file://Add-the-compile-and-install-rules-for-cryptodev-test.patch" EXTRA_OEMAKE='KERNEL_DIR="${STAGING_KERNEL_DIR}" PREFIX="${D}"' @@ -33,3 +37,15 @@ python () { if 'arch' in error_qa: d.setVar('ERROR_QA', error_qa.replace(' arch', '')) } + +do_compile_append() { + oe_runmake testprogs +} + +do_install_append() { + oe_runmake install_tests +} + +PACKAGES += "${PN}-tests" +FILES_${PN}-dbg += "${bindir}/tests_cryptodev/.debug" +FILES_${PN}-tests = "${bindir}/tests_cryptodev/*" diff --git a/meta-fsl-ppc/recipes-kernel/cryptodev/files/Add-the-compile-and-install-rules-for-cryptodev-test.patch b/meta-fsl-ppc/recipes-kernel/cryptodev/files/Add-the-compile-and-install-rules-for-cryptodev-test.patch new file mode 100644 index 00000000..cb871f6b --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/cryptodev/files/Add-the-compile-and-install-rules-for-cryptodev-test.patch @@ -0,0 +1,69 @@ +From 1980a8f4779a955e73285e7a0d86549b69bea5c8 Mon Sep 17 00:00:00 2001 +From: Yu Zongchun +Date: Sun, 28 Apr 2013 14:39:22 +0800 +Subject: [PATCH] Add the compile and install rules for cryptodev tests folder + +This is required to install the cryptodev tests folder to rootfs + +Signed-off-by: Yu Zongchun + +Upstream-Status: Pending + +--- + Makefile | 6 ++++++ + tests/Makefile | 8 ++++++++ + 2 files changed, 14 insertions(+), 0 deletions(-) + +diff --git a/Makefile b/Makefile +index 2be8825..4cbb865 100644 +--- a/Makefile ++++ b/Makefile +@@ -17,6 +17,9 @@ install: + @echo "Installing cryptodev.h in /usr/include/crypto ..." + @install -D crypto/cryptodev.h /usr/include/crypto/cryptodev.h + ++install_tests: ++ make -C tests install DESTDIR=$(PREFIX) ++ + clean: + make -C $(KERNEL_DIR) SUBDIRS=`pwd` clean + rm -f $(hostprogs) *~ +@@ -25,6 +28,9 @@ clean: + check: + KERNEL_DIR=$(KERNEL_DIR) make -C tests check + ++testprogs: ++ KERNEL_DIR=$(KERNEL_DIR) make -C tests testprogs ++ + FILEBASE = cryptodev-linux-$(VERSION) + TMPDIR ?= /tmp + OUTPUT = $(FILEBASE).tar.gz +diff --git a/tests/Makefile b/tests/Makefile +index 87ca3c7..0488cf6 100644 +--- a/tests/Makefile ++++ b/tests/Makefile +@@ -19,6 +19,12 @@ example-async-hmac-objs := async_hmac.o + example-async-speed-objs := async_speed.o + example-hashcrypt-speed-objs := hashcrypt_speed.c + ++install: ++ install -d $(DESTDIR)/usr/bin/tests_cryptodev ++ for bin in $(hostprogs); do \ ++ install -m 755 $${bin} $(DESTDIR)/usr/bin/tests_cryptodev/; \ ++ done ++ + check: $(hostprogs) + ./cipher + ./hmac +@@ -28,6 +34,8 @@ check: $(hostprogs) + ./cipher-gcm + ./cipher-aead + ++testprogs: $(hostprogs) ++ + clean: + rm -f *.o *~ $(hostprogs) + +-- +1.7.5.4 + -- cgit v1.2.3-54-g00ecf From f65accb38566a8a50ac18615dd08df60a4529aa7 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Mon, 24 Jun 2013 06:59:30 +0000 Subject: recipes: make meta-fsl-ppc play with other layers Some recipes are specific to fsl machines but arent marked so. When building images for other machines while including meta-fsl-ppc in bblayers exposes the build failures on these recipes. Lets mark them fsl machine specific Signed-off-by: Khem Raj --- meta-fsl-ppc/recipes-test/testfloat/testfloat_2a.bb | 5 +++-- meta-fsl-ppc/recipes-tools/hv-cfg/hv-cfg_git.bb | 2 ++ meta-fsl-ppc/recipes-tools/rcw/rcw_git.bb | 2 ++ meta-fsl-ppc/recipes-tools/usdpaa/usdpaa_git.bb | 3 +++ meta-fsl-ppc/recipes-ucode/fmlib/fmlib_git.bb | 4 +++- 5 files changed, 13 insertions(+), 3 deletions(-) diff --git a/meta-fsl-ppc/recipes-test/testfloat/testfloat_2a.bb b/meta-fsl-ppc/recipes-test/testfloat/testfloat_2a.bb index ece8c185..8db41b8f 100644 --- a/meta-fsl-ppc/recipes-test/testfloat/testfloat_2a.bb +++ b/meta-fsl-ppc/recipes-test/testfloat/testfloat_2a.bb @@ -6,10 +6,11 @@ LIC_FILES_CHKSUM = "file://testfloat/testfloat.txt;beginline=87;endline=95;md5=b SRC_URI = " http://www.jhauser.us/arithmetic/TestFloat-2a.tar.Z;name=TestFloat \ http://www.jhauser.us/arithmetic/SoftFloat-2b.tar.Z;name=SoftFloat \ - file://SoftFloat-powerpc-1.patch \ - file://TestFloat-powerpc-E500v2-SPE-1.patch \ file://Yocto-replace-COMPILE_PREFIX-gcc.patch \ " +SRC_URI_append_fslmachine = " file://SoftFloat-powerpc-1.patch \ + file://TestFloat-powerpc-E500v2-SPE-1.patch \ + " SRC_URI[TestFloat.md5sum] = "4dc889319ae1e0c5381ec511f784553a" SRC_URI[TestFloat.sha256sum] = "84d14aa42adefbda2ec9708b42946f7fa59f93689b042684bd027863481f8e4e" SRC_URI[SoftFloat.md5sum] = "b4a58b5c941f1a2317e4c2500086e3fa" diff --git a/meta-fsl-ppc/recipes-tools/hv-cfg/hv-cfg_git.bb b/meta-fsl-ppc/recipes-tools/hv-cfg/hv-cfg_git.bb index 31261388..d675a41b 100644 --- a/meta-fsl-ppc/recipes-tools/hv-cfg/hv-cfg_git.bb +++ b/meta-fsl-ppc/recipes-tools/hv-cfg/hv-cfg_git.bb @@ -15,6 +15,8 @@ DEPENDS += "dtc-native" # this package is specific to the machine itself INHIBIT_DEFAULT_DEPS = "1" PACKAGE_ARCH = "${MACHINE_ARCH}" +COMPATIBLE_HOST_fslmachine = ".*" +COMPATIBLE_HOST ?= "(none)" inherit deploy diff --git a/meta-fsl-ppc/recipes-tools/rcw/rcw_git.bb b/meta-fsl-ppc/recipes-tools/rcw/rcw_git.bb index 625bd600..f33685d8 100644 --- a/meta-fsl-ppc/recipes-tools/rcw/rcw_git.bb +++ b/meta-fsl-ppc/recipes-tools/rcw/rcw_git.bb @@ -8,6 +8,8 @@ LIC_FILES_CHKSUM = "file://rcw.py;beginline=8;endline=28;md5=9ba0b28922dd187b06b # this package is specific to the machine itself INHIBIT_DEFAULT_DEPS = "1" PACKAGE_ARCH = "${MACHINE_ARCH}" +COMPATIBLE_HOST_fslmachine = ".*" +COMPATIBLE_HOST ?= "(none)" inherit deploy diff --git a/meta-fsl-ppc/recipes-tools/usdpaa/usdpaa_git.bb b/meta-fsl-ppc/recipes-tools/usdpaa/usdpaa_git.bb index 3138675f..f76ee1d7 100644 --- a/meta-fsl-ppc/recipes-tools/usdpaa/usdpaa_git.bb +++ b/meta-fsl-ppc/recipes-tools/usdpaa/usdpaa_git.bb @@ -12,6 +12,9 @@ RDEPENDS_${PN} = "libgcc" SRC_URI = "git://git.freescale.com/ppc/sdk/usdpaa.git" SRCREV = "670ad8827fd83169ccb54a008c638dbb497b1c61" +COMPATIBLE_HOST_fslmachine = ".*" +COMPATIBLE_HOST ?= "(none)" + S = "${WORKDIR}/git" EXTRA_OEMAKE = 'V=1 CC="${CC}" LD="${LD}" AR="${AR}"' diff --git a/meta-fsl-ppc/recipes-ucode/fmlib/fmlib_git.bb b/meta-fsl-ppc/recipes-ucode/fmlib/fmlib_git.bb index 038f8997..dd67b7bf 100644 --- a/meta-fsl-ppc/recipes-ucode/fmlib/fmlib_git.bb +++ b/meta-fsl-ppc/recipes-ucode/fmlib/fmlib_git.bb @@ -16,9 +16,11 @@ S = "${WORKDIR}/git" TARGET_ARCH_FMLIB = "${DEFAULTTUNE}" TARGET_ARCH_FMLIB_e5500 = "ppc32e5500" TARGET_ARCH_FMLIB_e6500 = "ppc32e6500" +COMPATIBLE_HOST_fslmachine = ".*" +COMPATIBLE_HOST ?= "(none)" EXTRA_OEMAKE = "DESTDIR=${D} PREFIX=${prefix} LIB_DEST_DIR=${libdir} \ - CROSS_COMPILE=${TARGET_PREFIX} KERNEL_SRC=${STAGING_EXECPREFIXDIR}" + CROSS_COMPILE=${TARGET_PREFIX} KERNEL_SRC=${STAGING_EXECPREFIXDIR}" do_compile () { oe_runmake libfm-${TARGET_ARCH_FMLIB}.a -- cgit v1.2.3-54-g00ecf From ee9e3044fcd953c71a9bf52be01af67645cec9a6 Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Thu, 27 Jun 2013 09:19:56 +0000 Subject: qemu: upgrade to the version of sdk-1.4 Signed-off-by: Zhenhua Luo --- meta-fsl-ppc/conf/machine/e500mc.inc | 2 +- meta-fsl-ppc/conf/machine/e500v2.inc | 2 +- meta-fsl-ppc/conf/machine/e5500-64b.inc | 2 +- meta-fsl-ppc/conf/machine/e5500.inc | 2 +- meta-fsl-ppc/conf/machine/e6500-64b.inc | 2 +- meta-fsl-ppc/conf/machine/e6500.inc | 2 +- ...configure-properly-check-if-lrt-is-needed.patch | 43 ----------- .../fix-libcap-header-issue-on-some-distro.patch | 84 ++++++++++++++++++++++ .../qemu/files/relocatable_sdk.patch | 34 +++++++++ meta-fsl-ppc/recipes-devtools/qemu/qemu_1.0.bb | 42 ----------- meta-fsl-ppc/recipes-devtools/qemu/qemu_fslgit.bb | 47 ++++++++++++ 11 files changed, 171 insertions(+), 91 deletions(-) delete mode 100644 meta-fsl-ppc/recipes-devtools/qemu/files/0001-configure-properly-check-if-lrt-is-needed.patch create mode 100644 meta-fsl-ppc/recipes-devtools/qemu/files/fix-libcap-header-issue-on-some-distro.patch create mode 100644 meta-fsl-ppc/recipes-devtools/qemu/files/relocatable_sdk.patch delete mode 100644 meta-fsl-ppc/recipes-devtools/qemu/qemu_1.0.bb create mode 100644 meta-fsl-ppc/recipes-devtools/qemu/qemu_fslgit.bb diff --git a/meta-fsl-ppc/conf/machine/e500mc.inc b/meta-fsl-ppc/conf/machine/e500mc.inc index e523a87a..268942ae 100644 --- a/meta-fsl-ppc/conf/machine/e500mc.inc +++ b/meta-fsl-ppc/conf/machine/e500mc.inc @@ -8,7 +8,7 @@ MACHINE_EXTRA_RRECOMMENDS = "u-boot udev-extraconf" PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" PREFERRED_VERSION_virtual/kernel ?= "3.0.34" PREFERRED_PROVIDER_linux-libc-headers ?= "linux-qoriq-sdk-headers" -PREFERRED_VERSION_qemu = "1.0+fsl" +PREFERRED_VERSION_qemu = "1.4+fsl" KERNEL_IMAGETYPE ?= "uImage" # disable the images below for now diff --git a/meta-fsl-ppc/conf/machine/e500v2.inc b/meta-fsl-ppc/conf/machine/e500v2.inc index cb3d7ad7..96887845 100644 --- a/meta-fsl-ppc/conf/machine/e500v2.inc +++ b/meta-fsl-ppc/conf/machine/e500v2.inc @@ -6,7 +6,7 @@ MACHINE_EXTRA_RRECOMMENDS = "u-boot udev-extraconf" PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" PREFERRED_VERSION_virtual/kernel ?= "3.0.34" PREFERRED_PROVIDER_linux-libc-headers ?= "linux-qoriq-sdk-headers" -PREFERRED_VERSION_qemu = "1.0+fsl" +PREFERRED_VERSION_qemu = "1.4+fsl" KERNEL_IMAGETYPE ?= "uImage" # disable the images below for now diff --git a/meta-fsl-ppc/conf/machine/e5500-64b.inc b/meta-fsl-ppc/conf/machine/e5500-64b.inc index d2fa078d..3230d518 100644 --- a/meta-fsl-ppc/conf/machine/e5500-64b.inc +++ b/meta-fsl-ppc/conf/machine/e5500-64b.inc @@ -9,7 +9,7 @@ MACHINE_EXTRA_RRECOMMENDS = "u-boot udev-extraconf" PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" PREFERRED_VERSION_virtual/kernel ?= "3.0.34" PREFERRED_PROVIDER_linux-libc-headers ?= "linux-qoriq-sdk-headers" -PREFERRED_VERSION_qemu = "1.0+fsl" +PREFERRED_VERSION_qemu = "1.4+fsl" KERNEL_IMAGETYPE ?= "uImage" # disable the images below for now diff --git a/meta-fsl-ppc/conf/machine/e5500.inc b/meta-fsl-ppc/conf/machine/e5500.inc index 09870c96..ae40896f 100644 --- a/meta-fsl-ppc/conf/machine/e5500.inc +++ b/meta-fsl-ppc/conf/machine/e5500.inc @@ -8,7 +8,7 @@ MACHINE_EXTRA_RRECOMMENDS = "u-boot udev-extraconf" PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" PREFERRED_VERSION_virtual/kernel ?= "3.0.34" PREFERRED_PROVIDER_linux-libc-headers ?= "linux-qoriq-sdk-headers" -PREFERRED_VERSION_qemu = "1.0+fsl" +PREFERRED_VERSION_qemu = "1.4+fsl" KERNEL_IMAGETYPE ?= "uImage" # disable the images below for now diff --git a/meta-fsl-ppc/conf/machine/e6500-64b.inc b/meta-fsl-ppc/conf/machine/e6500-64b.inc index 57e61b2f..b8766df6 100644 --- a/meta-fsl-ppc/conf/machine/e6500-64b.inc +++ b/meta-fsl-ppc/conf/machine/e6500-64b.inc @@ -9,7 +9,7 @@ MACHINE_EXTRA_RRECOMMENDS = "u-boot udev-extraconf" PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" PREFERRED_VERSION_virtual/kernel ?= "3.0.34" PREFERRED_PROVIDER_linux-libc-headers ?= "linux-qoriq-sdk-headers" -PREFERRED_VERSION_qemu = "1.0+fsl" +PREFERRED_VERSION_qemu = "1.4+fsl" KERNEL_IMAGETYPE ?= "uImage" # disable the images below for now diff --git a/meta-fsl-ppc/conf/machine/e6500.inc b/meta-fsl-ppc/conf/machine/e6500.inc index b343742e..9968230c 100644 --- a/meta-fsl-ppc/conf/machine/e6500.inc +++ b/meta-fsl-ppc/conf/machine/e6500.inc @@ -8,7 +8,7 @@ MACHINE_EXTRA_RRECOMMENDS = "u-boot udev-extraconf" PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" PREFERRED_VERSION_virtual/kernel ?= "3.0.34" PREFERRED_PROVIDER_linux-libc-headers ?= "linux-qoriq-sdk-headers" -PREFERRED_VERSION_qemu = "1.0+fsl" +PREFERRED_VERSION_qemu = "1.4+fsl" KERNEL_IMAGETYPE ?= "uImage" # disable the images below for now diff --git a/meta-fsl-ppc/recipes-devtools/qemu/files/0001-configure-properly-check-if-lrt-is-needed.patch b/meta-fsl-ppc/recipes-devtools/qemu/files/0001-configure-properly-check-if-lrt-is-needed.patch deleted file mode 100644 index d74ddb9d..00000000 --- a/meta-fsl-ppc/recipes-devtools/qemu/files/0001-configure-properly-check-if-lrt-is-needed.patch +++ /dev/null @@ -1,43 +0,0 @@ -From e5906138d8042817cc3b49872dd181c66a11abdf Mon Sep 17 00:00:00 2001 -From: Ting Liu -Date: Wed, 6 Mar 2013 01:56:35 -0600 -Subject: [PATCH] configure: properly check if -lrt is needed - -Upstream-Status: Backport -commit 8bacde8d86a09699207d85d4bab06162aed18dc4 - -Signed-off-by: Natanael Copa -Signed-off-by: Blue Swirl -Signed-off-by: Ting Liu ---- - configure | 9 +++++++-- - 1 file changed, 7 insertions(+), 2 deletions(-) - -diff --git a/configure b/configure -index 999375a..29b3e30 100755 ---- a/configure -+++ b/configure -@@ -2444,13 +2444,18 @@ fi - cat > $TMPC < - #include --int main(void) { clockid_t id; return clock_gettime(id, NULL); } -+int main(void) { -+ timer_create(CLOCK_REALTIME, NULL, NULL); -+ return clock_gettime(CLOCK_REALTIME, NULL); -+} - EOF - - if compile_prog "" "" ; then - : --elif compile_prog "" "-lrt" ; then -+# we need pthread for static linking. use previous pthread test result -+elif compile_prog "" "-lrt $pthread_lib" ; then - LIBS="-lrt $LIBS" -+ libs_qga="-lrt $libs_qga" - fi - - if test "$darwin" != "yes" -a "$mingw32" != "yes" -a "$solaris" != yes -a \ --- -1.7.9.7 - diff --git a/meta-fsl-ppc/recipes-devtools/qemu/files/fix-libcap-header-issue-on-some-distro.patch b/meta-fsl-ppc/recipes-devtools/qemu/files/fix-libcap-header-issue-on-some-distro.patch new file mode 100644 index 00000000..13a6ea23 --- /dev/null +++ b/meta-fsl-ppc/recipes-devtools/qemu/files/fix-libcap-header-issue-on-some-distro.patch @@ -0,0 +1,84 @@ +fix libcap header issue on some distro + +1, When build qemu-native on SLED 11.2, there is an error: +... +| In file included from /usr/include/bits/sigcontext.h:28, +| from /usr/include/signal.h:339, +| from /buildarea2/tmp/work/i686-linux/qemu-native/1.4.0-r0/ +qemu-1.4.0/include/qemu-common.h:42, +| from fsdev/virtfs-proxy-helper.c:23: +| /usr/include/asm/sigcontext.h:28: error: expected specifier- +qualifier-list before '__u64' +| /usr/include/asm/sigcontext.h:191: error: expected specifier- +qualifier-list before '__u64' +... + +2, The virtfs-proxy-helper.c includes and +qemu-common.h in sequence. The header include map is: +(`-->' presents `include') +... +"virtfs-proxy-helper.c" --> +... +"virtfs-proxy-helper.c" --> "qemu-common.h" --> --> + --> --> --> + --> --> +... + +3, The bug is found on SLED 11.2 x86. In libcap header file +/usr/include/sys/capability.h, it does evil stuff like this: +... + 25 /* + 26 * Make sure we can be included from userland by preventing + 27 * capability.h from including other kernel headers + 28 */ + 29 #define _LINUX_TYPES_H + 30 #define _LINUX_FS_H + 31 #define __LINUX_COMPILER_H + 32 #define __user + 33 + 34 typedef unsigned int __u32; + 35 typedef __u32 __le32; +... +This completely prevents including /usr/include/linux/types.h. +The above ` --> ' is prevented, +and '__u64' is defined in . + +4, Modify virtfs-proxy-helper.c to include +last to workaround the issue. + +http://www.linuxtv.org/pipermail/vdr/2009-August/021194.html +http://patchwork.linuxtv.org/patch/12748/ + +Upstream-Status: Pending +Signed-off-by: Hongxu Jia +--- + fsdev/virtfs-proxy-helper.c | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +diff --git a/fsdev/virtfs-proxy-helper.c b/fsdev/virtfs-proxy-helper.c +--- a/fsdev/virtfs-proxy-helper.c ++++ b/fsdev/virtfs-proxy-helper.c +@@ -12,7 +12,6 @@ + #include + #include + #include +-#include + #include + #include + #include +@@ -26,7 +25,11 @@ + #include "virtio-9p-marshal.h" + #include "hw/9pfs/virtio-9p-proxy.h" + #include "fsdev/virtio-9p-marshal.h" +- ++/* ++ * Include this one last due to some versions of it being buggy: ++ * http://www.linuxtv.org/pipermail/vdr/2009-August/021194.html ++ */ ++#include + #define PROGNAME "virtfs-proxy-helper" + + #ifndef XFS_SUPER_MAGIC +-- +1.7.10.4 + diff --git a/meta-fsl-ppc/recipes-devtools/qemu/files/relocatable_sdk.patch b/meta-fsl-ppc/recipes-devtools/qemu/files/relocatable_sdk.patch new file mode 100644 index 00000000..774a49c7 --- /dev/null +++ b/meta-fsl-ppc/recipes-devtools/qemu/files/relocatable_sdk.patch @@ -0,0 +1,34 @@ +Upstream-Status: Inappropriate [SDK specific] + +In order to be able to change the dynamic loader path when relocating +binaries, the interp section has to be made big enough to accomodate +the new path (4096 is the maximum path length in Linux). + +Signed-off-by: Laurentiu Palcu + +Index: qemu-1.4.0/ldscripts/i386.ld +=================================================================== +--- qemu-1.4.0.orig/ldscripts/i386.ld 2013-02-15 15:05:35.000000000 -0800 ++++ qemu-1.4.0/ldscripts/i386.ld 2013-02-28 22:55:36.138816418 -0800 +@@ -8,7 +8,7 @@ + { + /* Read-only sections, merged into text segment: */ + . = 0x60000000 + SIZEOF_HEADERS; +- .interp : { *(.interp) } ++ .interp : { *(.interp); . = 0x1000; } + .hash : { *(.hash) } + .dynsym : { *(.dynsym) } + .dynstr : { *(.dynstr) } +Index: qemu-1.4.0/ldscripts/x86_64.ld +=================================================================== +--- qemu-1.4.0.orig/ldscripts/x86_64.ld 2013-02-15 15:05:35.000000000 -0800 ++++ qemu-1.4.0/ldscripts/x86_64.ld 2013-02-28 22:55:36.138816418 -0800 +@@ -6,7 +6,7 @@ + { + /* Read-only sections, merged into text segment: */ + . = 0x60000000 + SIZEOF_HEADERS; +- .interp : { *(.interp) } ++ .interp : { *(.interp); . = 0x1000; } + .hash : { *(.hash) } + .dynsym : { *(.dynsym) } + .dynstr : { *(.dynstr) } diff --git a/meta-fsl-ppc/recipes-devtools/qemu/qemu_1.0.bb b/meta-fsl-ppc/recipes-devtools/qemu/qemu_1.0.bb deleted file mode 100644 index 19efd9f2..00000000 --- a/meta-fsl-ppc/recipes-devtools/qemu/qemu_1.0.bb +++ /dev/null @@ -1,42 +0,0 @@ -require recipes-devtools/qemu/qemu.inc - -LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \ - file://COPYING.LIB;endline=24;md5=c04def7ae38850e7d3ef548588159913" - -# This means v1.0 with FSL specific patches applied -PV = "1.0+fsl" -PR = "r3" - -DEPENDS += "dtc" - -SRC_URI = "git://git.freescale.com/ppc/sdk/qemu.git \ - file://0001-configure-properly-check-if-lrt-is-needed.patch \ -" -SRCREV = "7feabd47a814214dc4bebfd97d0eaf30dc50a68f" - -S = "${WORKDIR}/git" - -QEMU_TARGETS = "ppc" -PPC_OECONF = '${SDL} --disable-werror --disable-vnc --audio-drv-list="" --audio-card-list="" --disable-bluez --disable-curl' -EXTRA_OECONF_powerpc = "--target-list=ppc-softmmu ${PPC_OECONF}" -EXTRA_OECONF_powerpc64 = "--target-list=ppc64-softmmu ${PPC_OECONF}" - -do_configure_append () { - grep 'CONFIG_FDT=y' config-host.mak -} - -# gets around qemu.inc trying to install powerpc_rom.bin -do_install_prepend() { - touch ${WORKDIR}/powerpc_rom.bin -} - -do_install_append() { - rm ${WORKDIR}/powerpc_rom.bin -} - -# This is only meant to be build to run on the target -# for the given arch types listed, otherwise don't let -# the package get built. COMPATIBLE_HOST would not work -# because it was too generic -COMPATIBLE_MACHINE = "a^" -COMPATIBLE_MACHINE_libc-glibc_fslmachine = ".*" diff --git a/meta-fsl-ppc/recipes-devtools/qemu/qemu_fslgit.bb b/meta-fsl-ppc/recipes-devtools/qemu/qemu_fslgit.bb new file mode 100644 index 00000000..ac40fb50 --- /dev/null +++ b/meta-fsl-ppc/recipes-devtools/qemu/qemu_fslgit.bb @@ -0,0 +1,47 @@ +require recipes-devtools/qemu/qemu.inc + +LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \ + file://COPYING.LIB;endline=24;md5=c04def7ae38850e7d3ef548588159913" + +# This means v1.4 with FSL specific patches applied +PV = "1.4+fsl" + +SRC_URI = "git://git.freescale.com/ppc/sdk/qemu.git" +SRCREV = "8713c58725df407dbbedb48fa315248d0100720c" + +S = "${WORKDIR}/git" + +QEMU_TARGETS = "ppc" +PPC_OECONF = '${SDL} --cross-prefix=${TARGET_PREFIX} --disable-werror --disable-vnc --audio-drv-list="" --audio-card-list="" --disable-bluez --disable-curl' +EXTRA_OECONF_e5500-64b = "--target-list=ppc64-softmmu ${PPC_OECONF}" +EXTRA_OECONF_e6500-64b = "--target-list=ppc64-softmmu ${PPC_OECONF}" +EXTRA_OECONF_e6500 = "--target-list=ppc64-softmmu ${PPC_OECONF}" +EXTRA_OECONF_e5500 = "--target-list=ppc64-softmmu ${PPC_OECONF}" +EXTRA_OECONF_e500v2 = "--target-list=ppc-softmmu ${PPC_OECONF}" +EXTRA_OECONF_e500mc = "--target-list=ppc-softmmu ${PPC_OECONF}" + +do_configure_prepend() { + export PKG_CONFIG=${STAGING_DIR_NATIVE}${bindir_native}/pkg-config +} + +do_configure_append () { + grep 'CONFIG_FDT=y' config-host.mak +} + +# gets around qemu.inc trying to install powerpc_rom.bin +do_install_prepend() { + touch ${WORKDIR}/powerpc_rom.bin +} + +do_install_append() { + rm ${WORKDIR}/powerpc_rom.bin +} + +INSANE_SKIP_${PN} += "dev-deps" + +# This is only meant to be build to run on the target +# for the given arch types listed, otherwise don't let +# the package get built. COMPATIBLE_HOST would not work +# because it was too generic +COMPATIBLE_MACHINE = "a^" +COMPATIBLE_MACHINE_libc-glibc_fslmachine = ".*" -- cgit v1.2.3-54-g00ecf From 65700d164f37bb0ece0a52ad2f0314315d63036d Mon Sep 17 00:00:00 2001 From: Chunrong Guo Date: Thu, 27 Jun 2013 09:19:58 +0000 Subject: add p1023rdb support Change-Id:Ic42311e8619e5fbcf6f53f9f661439f6776dd760 Signed-off-by: Chunrong Guo --- meta-fsl-ppc/conf/machine/p1023rdb.conf | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 meta-fsl-ppc/conf/machine/p1023rdb.conf diff --git a/meta-fsl-ppc/conf/machine/p1023rdb.conf b/meta-fsl-ppc/conf/machine/p1023rdb.conf new file mode 100644 index 00000000..e591e094 --- /dev/null +++ b/meta-fsl-ppc/conf/machine/p1023rdb.conf @@ -0,0 +1,16 @@ +#@TYPE: Machine +#@DESCRIPTION: Machine configuration for running + +require e500v2.inc +require conf/machine/include/soc-family.inc + +SOC_FAMILY = "p1023" +UBOOT_MACHINES ?= "P1023RDB" +KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p1023rdb.dts" +KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/85xx/p1023rds_defconfig" + +JFFS2_ERASEBLOCK = "0x10000" + +SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" +SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" +USE_VT = "0" -- cgit v1.2.3-54-g00ecf From a82c0a5f943aeec2a3f9cd5409c679dd9a3fbc8d Mon Sep 17 00:00:00 2001 From: Chunrong Guo Date: Thu, 27 Jun 2013 09:19:59 +0000 Subject: Add P1025TWR support Signed-off-by: Chunrong Guo --- meta-fsl-ppc/conf/machine/p1025twr.conf | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 meta-fsl-ppc/conf/machine/p1025twr.conf diff --git a/meta-fsl-ppc/conf/machine/p1025twr.conf b/meta-fsl-ppc/conf/machine/p1025twr.conf new file mode 100644 index 00000000..d1d1db0d --- /dev/null +++ b/meta-fsl-ppc/conf/machine/p1025twr.conf @@ -0,0 +1,18 @@ +#@TYPE: Machine +#@Name: Freescale P1025TWR +#@DESCRIPTION: Machine configuration for the Freescale P1025TWR + +require e500v2.inc +require conf/machine/include/soc-family.inc + +SOC_FAMILY = "p1025" +BOOTFORMAT_CONFIG = "config_ddr3_1gb_p1_p2_rdb_pc_667M.dat" +UBOOT_MACHINES ?= "TWR-P1025" +KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p1025twr_32b.dts" +KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" + +JFFS2_ERASEBLOCK = "0x20000" + +SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" +SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" +USE_VT = "0" -- cgit v1.2.3-54-g00ecf From d3ab425e1b3a0675c74d616d94c4b4a04e169fc7 Mon Sep 17 00:00:00 2001 From: Chunrong Guo Date: Thu, 27 Jun 2013 09:20:00 +0000 Subject: Add BSC9131RDB support Signed-off-by: Chunrong Guo --- meta-fsl-ppc/conf/machine/bsc9131rdb.conf | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 meta-fsl-ppc/conf/machine/bsc9131rdb.conf diff --git a/meta-fsl-ppc/conf/machine/bsc9131rdb.conf b/meta-fsl-ppc/conf/machine/bsc9131rdb.conf new file mode 100644 index 00000000..39a73e59 --- /dev/null +++ b/meta-fsl-ppc/conf/machine/bsc9131rdb.conf @@ -0,0 +1,16 @@ +#@TYPE: Machine +#@DESCRIPTION: Machine configuration for running + +require e500v2.inc +require conf/machine/include/soc-family.inc + +SOC_FAMILY = "bsc9131" +UBOOT_MACHINES ?= "BSC9131RDB_SPIFLASH BSC9131RDB_NAND BSC9131RDB_NAND_SYSCLK100 BSC9131RDB_SPIFLASH_SYSCLK100" +KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/bsc9131rdb.dts" +KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/85xx/bsc913x_defconfig" + +JFFS2_ERASEBLOCK = "0x10000" + +SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" +SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" +USE_VT = "0" -- cgit v1.2.3-54-g00ecf From 2200df1f0bfacdf9d4ab373c8a2c186f78d38188 Mon Sep 17 00:00:00 2001 From: Chunrong Guo Date: Thu, 27 Jun 2013 09:20:01 +0000 Subject: Add BSC9132QDS support Signed-off-by: Chunrong Guo --- meta-fsl-ppc/conf/machine/bsc9132qds.conf | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 meta-fsl-ppc/conf/machine/bsc9132qds.conf diff --git a/meta-fsl-ppc/conf/machine/bsc9132qds.conf b/meta-fsl-ppc/conf/machine/bsc9132qds.conf new file mode 100644 index 00000000..90131a97 --- /dev/null +++ b/meta-fsl-ppc/conf/machine/bsc9132qds.conf @@ -0,0 +1,16 @@ +#@TYPE: Machine +#@DESCRIPTION: Machine configuration for running + +require e500v2.inc +require conf/machine/include/soc-family.inc + +SOC_FAMILY = "bsc9132" +UBOOT_MACHINES ?= " BSC9132QDS_NAND_DDRCLK133 BSC9132QDS_NAND_DDRCLK100 BSC9132QDS_NOR_DDRCLK100 BSC9132QDS_NOR_DDRCLK133 BSC9132QDS_SDCARD_DDRCLK100 BSC9132QDS_SDCARD_DDRCLK133 BSC9132QDS_SPIFLASH_DDRCLK100 BSC9132QDS_SPIFLASH_DDRCLK133" +KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/bsc9132qds.dts" +KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/85xx/bsc913x_smp_defconfig" + +JFFS2_ERASEBLOCK = "0x10000" + +SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" +SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" +USE_VT = "0" -- cgit v1.2.3-54-g00ecf From 19e9d1ee9a5f8083a0b2a172f17a3f0a6c87efeb Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Thu, 27 Jun 2013 09:20:02 +0000 Subject: udev-extraconf: unify the name of PCIe Ethernet port for DPAA targets In kernel-3.8, PCIe Ethernet port is the last one to be brought up, so the name of PCIe Ethernet card is ethN(N is variant) instead of eth0. The udev rules update is to unify the PCIe Ethernet port of DPAA targets: Ethernet card in PCIe slot0: eth0 Ethernet card in PCIe slot1: eth1 Ethernet card in PCIe slot2: eth2 Ethernet card in PCIe slot3: eth3 Signed-off-by: Zhenhua Luo Change-Id: Ia2a9cc3eb5b6c49e911bb6cc067a2d2d3cfaec0a --- .../udev/udev-extraconf/71-fsl-dpaa-persistent-networking.rules | 6 ++++++ .../udev/udev-extraconf/72-fsl-dpaa-persistent-networking.rules | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/meta-fsl-ppc/recipes-core/udev/udev-extraconf/71-fsl-dpaa-persistent-networking.rules b/meta-fsl-ppc/recipes-core/udev/udev-extraconf/71-fsl-dpaa-persistent-networking.rules index 356c172f..50bc4462 100644 --- a/meta-fsl-ppc/recipes-core/udev/udev-extraconf/71-fsl-dpaa-persistent-networking.rules +++ b/meta-fsl-ppc/recipes-core/udev/udev-extraconf/71-fsl-dpaa-persistent-networking.rules @@ -15,3 +15,9 @@ SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe5f0000", NAME="fm2- # P1023 has its Fman @ different offsets SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ff7e0000", NAME="fm1-gb0" SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ff7e2000", NAME="fm1-gb1" + +# Unify the PCIe Etherenet port -maxinum PCIe slots is 4 +SUBSYSTEM=="net", KERNEL=="eth*", KERNELS=="ffe200000.pcie", DRIVERS=="fsl-pci", NAME="eth0" +SUBSYSTEM=="net", KERNEL=="eth*", KERNELS=="ffe201000.pcie", DRIVERS=="fsl-pci", NAME="eth1" +SUBSYSTEM=="net", KERNEL=="eth*", KERNELS=="ffe202000.pcie", DRIVERS=="fsl-pci", NAME="eth2" +SUBSYSTEM=="net", KERNEL=="eth*", KERNELS=="ffe203000.pcie", DRIVERS=="fsl-pci", NAME="eth3" diff --git a/meta-fsl-ppc/recipes-core/udev/udev-extraconf/72-fsl-dpaa-persistent-networking.rules b/meta-fsl-ppc/recipes-core/udev/udev-extraconf/72-fsl-dpaa-persistent-networking.rules index 34e72a39..cfc2853e 100644 --- a/meta-fsl-ppc/recipes-core/udev/udev-extraconf/72-fsl-dpaa-persistent-networking.rules +++ b/meta-fsl-ppc/recipes-core/udev/udev-extraconf/72-fsl-dpaa-persistent-networking.rules @@ -19,3 +19,9 @@ SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe5ec000", NAME="fm2- SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe5ee000", NAME="fm2-mac8" SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe5f0000", NAME="fm2-mac9" SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe5f2000", NAME="fm2-mac10" + +# Unify the PCIe Etherenet port -maxinum PCIe slots is 4 +SUBSYSTEM=="net", KERNEL=="eth*", KERNELS=="ffe240000.pcie", DRIVERS=="fsl-pci", NAME="eth0" +SUBSYSTEM=="net", KERNEL=="eth*", KERNELS=="ffe250000.pcie", DRIVERS=="fsl-pci", NAME="eth1" +SUBSYSTEM=="net", KERNEL=="eth*", KERNELS=="ffe260000.pcie", DRIVERS=="fsl-pci", NAME="eth2" +SUBSYSTEM=="net", KERNEL=="eth*", KERNELS=="ffe270000.pcie", DRIVERS=="fsl-pci", NAME="eth3" -- cgit v1.2.3-54-g00ecf From eff0c46ac917430cfdfa0007b752b9eef26e7ea3 Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Thu, 27 Jun 2013 09:24:58 +0000 Subject: udev-extraconf: fix the name conflict of macless and PCIe Ethernet port in slot3 Currently both macless0 port and PCIe Ethernet port in slot3 use "eth2", update udev rules to rename macless0 to eth4. Signed-off-by: Zhenhua Luo --- .../udev/udev-extraconf/71-fsl-dpaa-persistent-networking.rules | 5 ++++- .../udev/udev-extraconf/72-fsl-dpaa-persistent-networking.rules | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/meta-fsl-ppc/recipes-core/udev/udev-extraconf/71-fsl-dpaa-persistent-networking.rules b/meta-fsl-ppc/recipes-core/udev/udev-extraconf/71-fsl-dpaa-persistent-networking.rules index 50bc4462..9bd67858 100644 --- a/meta-fsl-ppc/recipes-core/udev/udev-extraconf/71-fsl-dpaa-persistent-networking.rules +++ b/meta-fsl-ppc/recipes-core/udev/udev-extraconf/71-fsl-dpaa-persistent-networking.rules @@ -16,8 +16,11 @@ SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe5f0000", NAME="fm2- SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ff7e0000", NAME="fm1-gb0" SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ff7e2000", NAME="fm1-gb1" -# Unify the PCIe Etherenet port -maxinum PCIe slots is 4 +# Unify the PCIe Etherenet port, maxinum PCIe slots is 4 SUBSYSTEM=="net", KERNEL=="eth*", KERNELS=="ffe200000.pcie", DRIVERS=="fsl-pci", NAME="eth0" SUBSYSTEM=="net", KERNEL=="eth*", KERNELS=="ffe201000.pcie", DRIVERS=="fsl-pci", NAME="eth1" SUBSYSTEM=="net", KERNEL=="eth*", KERNELS=="ffe202000.pcie", DRIVERS=="fsl-pci", NAME="eth2" SUBSYSTEM=="net", KERNEL=="eth*", KERNELS=="ffe203000.pcie", DRIVERS=="fsl-pci", NAME="eth3" + +# Rename macless0 port to "eth4" +SUBSYSTEM=="net", ATTR{device_type}=="macless0", NAME="eth4" diff --git a/meta-fsl-ppc/recipes-core/udev/udev-extraconf/72-fsl-dpaa-persistent-networking.rules b/meta-fsl-ppc/recipes-core/udev/udev-extraconf/72-fsl-dpaa-persistent-networking.rules index cfc2853e..3529bc41 100644 --- a/meta-fsl-ppc/recipes-core/udev/udev-extraconf/72-fsl-dpaa-persistent-networking.rules +++ b/meta-fsl-ppc/recipes-core/udev/udev-extraconf/72-fsl-dpaa-persistent-networking.rules @@ -20,8 +20,11 @@ SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe5ee000", NAME="fm2- SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe5f0000", NAME="fm2-mac9" SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe5f2000", NAME="fm2-mac10" -# Unify the PCIe Etherenet port -maxinum PCIe slots is 4 +# Unify the PCIe Etherenet port, maxinum PCIe slots is 4 SUBSYSTEM=="net", KERNEL=="eth*", KERNELS=="ffe240000.pcie", DRIVERS=="fsl-pci", NAME="eth0" SUBSYSTEM=="net", KERNEL=="eth*", KERNELS=="ffe250000.pcie", DRIVERS=="fsl-pci", NAME="eth1" SUBSYSTEM=="net", KERNEL=="eth*", KERNELS=="ffe260000.pcie", DRIVERS=="fsl-pci", NAME="eth2" SUBSYSTEM=="net", KERNEL=="eth*", KERNELS=="ffe270000.pcie", DRIVERS=="fsl-pci", NAME="eth3" + +# Rename macless0 to "eth4" +SUBSYSTEM=="net", ATTR{device_type}=="macless0", NAME="eth4" -- cgit v1.2.3-54-g00ecf From 580b0f08be5ea70a10fbcfd89eaccf31f228b17a Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Thu, 27 Jun 2013 09:25:01 +0000 Subject: flib: upgrade to the SHA of sdk-1.4 Signed-off-by: Zhenhua Luo --- meta-fsl-ppc/recipes-tools/flib/flib_git.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-fsl-ppc/recipes-tools/flib/flib_git.bb b/meta-fsl-ppc/recipes-tools/flib/flib_git.bb index 78210dd4..590f7246 100644 --- a/meta-fsl-ppc/recipes-tools/flib/flib_git.bb +++ b/meta-fsl-ppc/recipes-tools/flib/flib_git.bb @@ -4,7 +4,7 @@ LICENSE = "BSD & GPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=3f16fa8e677e45af3127c5c4bafc3c00" SRC_URI = "git://git.freescale.com/ppc/sdk/flib.git" -SRCREV = "110eef5dab66064580d6d8627421ea5a19decb80" +SRCREV = "ff692ad3c286a07717c6677177825889fe17d450" S = "${WORKDIR}/git" -- cgit v1.2.3-54-g00ecf From 692b21d891010da7089f4460d4865d55ff5f0e49 Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Thu, 27 Jun 2013 09:25:09 +0000 Subject: asf: add recipe asf is software Application Specific Fast-path for Freescale non-dpaa targets. Signed-off-by: Zhenhua Luo --- meta-fsl-ppc/recipes-kernel/asf/asf_git.bb | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 meta-fsl-ppc/recipes-kernel/asf/asf_git.bb diff --git a/meta-fsl-ppc/recipes-kernel/asf/asf_git.bb b/meta-fsl-ppc/recipes-kernel/asf/asf_git.bb new file mode 100644 index 00000000..6a6917fa --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/asf/asf_git.bb @@ -0,0 +1,25 @@ +DESCRIPTION = "Non-DPAA software Application Specific Fast-path" +SECTION = "asf" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=9960b017720861b8c50c8c08723e57aa" + +SRC_URI = "git://git.freescale.com/ppc/sdk/asf.git" +SRCREV = "0b80c1df6a7490486d5106b28103598906793da0" + +DEPENDS="virtual/kernel" + +inherit module + +S = "${WORKDIR}/git/asfmodule" + +EXTRA_OEMAKE = "CROSS_COMPILE=${TARGET_PREFIX} KERNEL_PATH=${STAGING_KERNEL_DIR}" + +do_install(){ + mkdir -p ${D}/usr/driver/asf + cp -rf ${S}/bin/full ${D}/usr/driver/asf + cp -rf ${S}/bin/min ${D}/usr/driver/asf + cp -rf ${S}/../scripts ${D}/usr/driver/asf/. +} + +FILES_${PN} += "/usr/driver/asf" +INHIBIT_PACKAGE_STRIP = "1" -- cgit v1.2.3-54-g00ecf From 7ec18867230d9803ef2e95509784a325707a9354 Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Thu, 27 Jun 2013 09:25:10 +0000 Subject: cst: add recipe cst is the utility for security boot. Signed-off-by: Zhenhua Luo --- meta-fsl-ppc/recipes-tools/cst/cst_git.bb | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 meta-fsl-ppc/recipes-tools/cst/cst_git.bb diff --git a/meta-fsl-ppc/recipes-tools/cst/cst_git.bb b/meta-fsl-ppc/recipes-tools/cst/cst_git.bb new file mode 100644 index 00000000..177f23ce --- /dev/null +++ b/meta-fsl-ppc/recipes-tools/cst/cst_git.bb @@ -0,0 +1,29 @@ +DESCRIPTION = "CST Tool" +SECTION = "cst" +LICENSE = "BSD" + +# TODO: fix license - this file is not a license +LIC_FILES_CHKSUM = "file://RELEASENOTES;beginline=8;endline=43;md5=5a7b22a2c96b5f94e0498c5f413aa8d3" + +DEPENDS += "openssl" + +SRC_URI = "git://git.freescale.com/ppc/sdk/cst.git" +SRCREV = "e4035cbf54ed481147c6ae65c741ef75dc9ec37f" + +S = "${WORKDIR}/git" + +EXTRA_OEMAKE = 'OPENSSL_LIB_PATH=${STAGING_LIBDIR} OPENSSL_INC_PATH=${STAGING_INCDIR} CC="${CC}" LD="${CC}" LDFLAGS="${LDFLAGS}"' + +do_install () { + install -d ${D}/${bindir}/cst + install -m 755 ${S}/gen_keys ${D}/${bindir}/cst/ + install -m 755 ${S}/gen_otpmk ${D}/${bindir}/cst/ + install -m 755 ${S}/uni_cfsign ${D}/${bindir}/cst/ + install -m 755 ${S}/uni_sign ${D}/${bindir}/cst/ + cp -rf ${S}/input_files ${D}/${bindir}/cst +} + +BBCLASSEXTEND = "native nativesdk" +PARALLEL_MAKE = "" + +FILES_${PN}-dbg += "${bindir}/cst/.debug" -- cgit v1.2.3-54-g00ecf From 51c63a3f85e84c31287f20d4e5ab37f4a842b24d Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Thu, 27 Jun 2013 09:25:11 +0000 Subject: mux-server: add recipe mux_server is a Linux-based utility supporting console multiplexing and demultiplexing. It is part of Embedded Hypervisor. Signed-off-by: Zhenhua Luo --- .../mux-server/files/mux-server-1.02.tar.gz | Bin 0 -> 10021 bytes .../recipes-tools/mux-server/mux-server_1.02.bb | 16 ++++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 meta-fsl-ppc/recipes-tools/mux-server/files/mux-server-1.02.tar.gz create mode 100644 meta-fsl-ppc/recipes-tools/mux-server/mux-server_1.02.bb diff --git a/meta-fsl-ppc/recipes-tools/mux-server/files/mux-server-1.02.tar.gz b/meta-fsl-ppc/recipes-tools/mux-server/files/mux-server-1.02.tar.gz new file mode 100644 index 00000000..d8f20147 Binary files /dev/null and b/meta-fsl-ppc/recipes-tools/mux-server/files/mux-server-1.02.tar.gz differ diff --git a/meta-fsl-ppc/recipes-tools/mux-server/mux-server_1.02.bb b/meta-fsl-ppc/recipes-tools/mux-server/mux-server_1.02.bb new file mode 100644 index 00000000..ab9cce1c --- /dev/null +++ b/meta-fsl-ppc/recipes-tools/mux-server/mux-server_1.02.bb @@ -0,0 +1,16 @@ +DESCRIPTION = "A Linux-based utility supporting console multiplexing and demultiplexing" +SECTION = "mux-server" +LICENSE = "LGPL-2.1" +# TODO: add a dedicated COPYING file +LIC_FILES_CHKSUM = "file://mux_server.c;endline=9;md5=e59eeb0812bb88b7af2d932f2dc22aed" + +SRC_URI = "file://mux-server-${PV}.tar.gz;name=mux_server" + +EXTRA_OEMAKE='HOSTCC="${CC}"' + +do_install () { + install -d ${D}${bindir} + install -m 755 mux_server ${D}${bindir} +} + +BBCLASSEXTEND = "native nativesdk" -- cgit v1.2.3-54-g00ecf From 75f3a64365d60c2357e4816a9fac363435ef11e4 Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Thu, 27 Jun 2013 09:25:12 +0000 Subject: qoriq-debug: add recipe QorIQ Debug File System Module Signed-off-by: Zhenhua Luo --- .../recipes-kernel/qoriq-debug/qoriq-debug_git.bb | 34 ++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 meta-fsl-ppc/recipes-kernel/qoriq-debug/qoriq-debug_git.bb diff --git a/meta-fsl-ppc/recipes-kernel/qoriq-debug/qoriq-debug_git.bb b/meta-fsl-ppc/recipes-kernel/qoriq-debug/qoriq-debug_git.bb new file mode 100644 index 00000000..a8d2e963 --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/qoriq-debug/qoriq-debug_git.bb @@ -0,0 +1,34 @@ +DESCRIPTION = "QorIQ Debug File System Module" +SECTION = "qoriq-debug" +LICENSE = "GPLv2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=e29234dd5d40dc352cc60cc0c93437ba" + +inherit module autotools + +SRC_URI = "git://git.freescale.com/ppc/sdk/qoriq-debug.git" +SRCREV = "08de2902af9a79ba9e436a284b8d7754b351f608" + +S = "${WORKDIR}/git" + +EXTRA_OECONF += "--with-linux=${STAGING_KERNEL_DIR}" +EXTRA_OEMAKE += 'SYSROOT="${D}"' + +python () { + ma = d.getVar("DISTRO_FEATURES", True) + arch = d.getVar("OVERRIDES", True) + + # the : after the arch is to skip the message on 64b + if not "multiarch" in ma and ("e5500:" in arch or "e6500:" in arch): + raise bb.parse.SkipPackage("Building the kernel for this arch requires multiarch to be in DISTRO_FEATURES") + + promote_kernel = d.getVar('BUILD_64BIT_KERNEL') + + if promote_kernel == "1": + d.setVar('KERNEL_CC_append', ' -m64') + d.setVar('KERNEL_LD_append', ' -melf64ppc') + + error_qa = d.getVar('ERROR_QA', True) + if 'arch' in error_qa: + d.setVar('ERROR_QA', error_qa.replace(' arch', '')) +} + -- cgit v1.2.3-54-g00ecf From c9c2aa22a11b1396ce61f3fd8d21c0535d8f2165 Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Thu, 27 Jun 2013 09:25:13 +0000 Subject: skmm: add recipe SKMM is the application for PCIe endpoint. Signed-off-by: Zhenhua Luo --- meta-fsl-ppc/recipes-tools/skmm/skmm_git.bb | 33 +++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 meta-fsl-ppc/recipes-tools/skmm/skmm_git.bb diff --git a/meta-fsl-ppc/recipes-tools/skmm/skmm_git.bb b/meta-fsl-ppc/recipes-tools/skmm/skmm_git.bb new file mode 100644 index 00000000..224e5564 --- /dev/null +++ b/meta-fsl-ppc/recipes-tools/skmm/skmm_git.bb @@ -0,0 +1,33 @@ +DESCRIPTION = "SKMM application for PCIe endpoint" +SECTION = "skmm" +LICENSE = "BSD & GPLv2" +LIC_FILES_CHKSUM = "file://Makefile;endline=30;md5=39e58bedc879163c9338596e52df5b1f" + +DEPENDS = "libedit" + +SRC_URI = "git://git.freescale.com/ppc/sdk/skmm-ep.git" +SRCREV = "80d8393a2033b3b0cc8f885702d7b288956f3a37" + +COMPATIBLE_MACHINE = "(p4080ds|t4240qds)" + +S = "${WORKDIR}/git" + +EXTRA_OEMAKE = 'MACHINE=${MACHINE}' + +export LIBEDIT_CFLAGS="$(pkg-config --cflags libedit)" +export LIBEDIT_LDFLAGS="$(pkg-config --libs --static libedit)" + +do_compile () { + export ARCH=${TARGET_ARCH} + oe_runmake HOST=x86_64 clean + oe_runmake HOST=x86_64 + oe_runmake HOST=powerpc clean + oe_runmake HOST=powerpc +} + +do_install () { + oe_runmake ARCH=${TARGET_ARCH} HOST=x86_64 install DESTDIR=${D} + oe_runmake ARCH=${TARGET_ARCH} HOST=powerpc install DESTDIR=${D} +} + +FILES_${PN} += "/home/root/.skmm/*" -- cgit v1.2.3-54-g00ecf From 6185963d1664a768e234c452ab2f02c950a33d8e Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Thu, 27 Jun 2013 09:25:14 +0000 Subject: web-sysmon: add recipe This package contains shell and cgi scripts which maintain a database of sensor data and generate web pages containing graphs of sensor data. Signed-off-by: Zhenhua Luo --- .../recipes-tools/web-sysmon/web-sysmon_git.bb | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 meta-fsl-ppc/recipes-tools/web-sysmon/web-sysmon_git.bb diff --git a/meta-fsl-ppc/recipes-tools/web-sysmon/web-sysmon_git.bb b/meta-fsl-ppc/recipes-tools/web-sysmon/web-sysmon_git.bb new file mode 100644 index 00000000..1b2e070d --- /dev/null +++ b/meta-fsl-ppc/recipes-tools/web-sysmon/web-sysmon_git.bb @@ -0,0 +1,21 @@ +DESCRIPTION = "Web System Monitor Files" +SECTION = "web-sysmon" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e" + +SRC_URI = "git://git.freescale.com/ppc/sdk/web-sysmon.git" +SRCREV = "40b47611378ef5c07d98f0f691bb146ae52dcdc1" + +S = "${WORKDIR}/git" + +FILES_${PN} += "/" + +RDEPENDS_${PN} = "lighttpd" + +do_install() { + install -d ${D}/etc + install -m 644 ${S}/lighttpd.conf ${D}/etc + install -d ${D}/usr/local/bin + install -m 755 ${S}/rrd/sens_update_rrd ${D}/usr/local/bin + cp -r ${S}/rrd ${D}/usr +} -- cgit v1.2.3-54-g00ecf From a6b4de91d9cd50dec56d00d1954855fcaecd89db Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Mon, 1 Jul 2013 13:47:10 +0800 Subject: linux-qoriq-sdk(-headers): upgrade to the version of sdk-1.4 1.Update kernel version to 3.8. 2.add DEPENDS libgcc and append TOOLCHAIN_OPTIONS to KERNEL_{CC,LD}. kernel in sdk 1.4 need run-time support libraries 'libgcc.a', added in file arch/powerpc/Makefile: LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name) Without passing the TOOLCHAIN_OPTIONS (define --sysroot parameter), it will fail to find the libgcc.a. 3.Also remove the patches which were already merged on git tree. Signed-off-by: Zhenhua Luo Signed-off-by: Ting Liu --- ...option-Automount-devtmpfs-at-dev-in-kerne.patch | 78 ---------------------- ...Undef-before-redefining-__attribute_const.patch | 28 -------- ...-build-dependencies-for-c-files-requiring.patch | 44 ------------ .../linux/files/fix_getrusage_for_perf.patch | 33 --------- ...efile.headersinst-install-headers-from-sc.patch | 46 +++++++++++++ .../linux/linux-qoriq-sdk-headers.bb | 4 ++ .../recipes-kernel/linux/linux-qoriq-sdk.bb | 8 +-- .../recipes-kernel/linux/linux-qoriq-sdk.inc | 7 +- 8 files changed, 57 insertions(+), 191 deletions(-) delete mode 100644 meta-fsl-ppc/recipes-kernel/linux/files/0001-Enable-the-option-Automount-devtmpfs-at-dev-in-kerne.patch delete mode 100644 meta-fsl-ppc/recipes-kernel/linux/files/0001-compiler.h-Undef-before-redefining-__attribute_const.patch delete mode 100644 meta-fsl-ppc/recipes-kernel/linux/files/0001-powerpc-Fix-build-dependencies-for-c-files-requiring.patch delete mode 100644 meta-fsl-ppc/recipes-kernel/linux/files/fix_getrusage_for_perf.patch create mode 100644 meta-fsl-ppc/recipes-kernel/linux/files/scripts-Makefile.headersinst-install-headers-from-sc.patch diff --git a/meta-fsl-ppc/recipes-kernel/linux/files/0001-Enable-the-option-Automount-devtmpfs-at-dev-in-kerne.patch b/meta-fsl-ppc/recipes-kernel/linux/files/0001-Enable-the-option-Automount-devtmpfs-at-dev-in-kerne.patch deleted file mode 100644 index 39783efc..00000000 --- a/meta-fsl-ppc/recipes-kernel/linux/files/0001-Enable-the-option-Automount-devtmpfs-at-dev-in-kerne.patch +++ /dev/null @@ -1,78 +0,0 @@ -From 3179602e581b6fe8797a5677d5ac4ecfab065cc6 Mon Sep 17 00:00:00 2001 -From: Chunrong Guo -Date: Thu, 11 Apr 2013 01:52:48 -0500 -Subject: [PATCH] Enable "the option Automount devtmpfs at /dev" in kernel - -Upstream-Status:Pending -Signed-off-by: Chunrong Guo ---- - arch/powerpc/configs/85xx/e6500rev1_defconfig | 1 + - arch/powerpc/configs/corenet32_smp_defconfig | 1 + - arch/powerpc/configs/corenet64_smp_defconfig | 1 + - arch/powerpc/configs/mpc85xx_defconfig | 1 + - arch/powerpc/configs/mpc85xx_smp_defconfig | 1 + - 5 files changed, 5 insertions(+) - -diff --git a/arch/powerpc/configs/85xx/e6500rev1_defconfig b/arch/powerpc/configs/85xx/e6500rev1_defconfig -index 4b5866d..32ebb50 100644 ---- a/arch/powerpc/configs/85xx/e6500rev1_defconfig -+++ b/arch/powerpc/configs/85xx/e6500rev1_defconfig -@@ -72,6 +72,7 @@ CONFIG_IPV6=y - CONFIG_IP_SCTP=m - CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" - CONFIG_DEVTMPFS=y -+CONFIG_DEVTMPFS_MOUNT=y - CONFIG_MTD=y - CONFIG_MTD_CMDLINE_PARTS=y - CONFIG_MTD_CHAR=y -diff --git a/arch/powerpc/configs/corenet32_smp_defconfig b/arch/powerpc/configs/corenet32_smp_defconfig -index b43d4b6..3fe10e5 100644 ---- a/arch/powerpc/configs/corenet32_smp_defconfig -+++ b/arch/powerpc/configs/corenet32_smp_defconfig -@@ -71,6 +71,7 @@ CONFIG_IPV6=y - CONFIG_IP_SCTP=m - CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" - CONFIG_DEVTMPFS=y -+CONFIG_DEVTMPFS_MOUNT=y - CONFIG_MTD=y - CONFIG_MTD_CMDLINE_PARTS=y - CONFIG_MTD_CHAR=y -diff --git a/arch/powerpc/configs/corenet64_smp_defconfig b/arch/powerpc/configs/corenet64_smp_defconfig -index 13b032b..74cc46a 100644 ---- a/arch/powerpc/configs/corenet64_smp_defconfig -+++ b/arch/powerpc/configs/corenet64_smp_defconfig -@@ -66,6 +66,7 @@ CONFIG_IPV6=y - CONFIG_IP_SCTP=m - CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" - CONFIG_DEVTMPFS=y -+CONFIG_DEVTMPFS_MOUNT=y - CONFIG_MTD=y - CONFIG_MTD_CMDLINE_PARTS=y - CONFIG_MTD_CHAR=y -diff --git a/arch/powerpc/configs/mpc85xx_defconfig b/arch/powerpc/configs/mpc85xx_defconfig -index 8fb742d..f353a6e 100644 ---- a/arch/powerpc/configs/mpc85xx_defconfig -+++ b/arch/powerpc/configs/mpc85xx_defconfig -@@ -75,6 +75,7 @@ CONFIG_IPV6=y - CONFIG_IP_SCTP=m - CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" - CONFIG_DEVTMPFS=y -+CONFIG_DEVTMPFS_MOUNT=y - CONFIG_MTD=y - CONFIG_MTD_CHAR=y - CONFIG_MTD_BLOCK=y -diff --git a/arch/powerpc/configs/mpc85xx_smp_defconfig b/arch/powerpc/configs/mpc85xx_smp_defconfig -index b31c8ac..cdc2c87 100644 ---- a/arch/powerpc/configs/mpc85xx_smp_defconfig -+++ b/arch/powerpc/configs/mpc85xx_smp_defconfig -@@ -77,6 +77,7 @@ CONFIG_IPV6=y - CONFIG_IP_SCTP=m - CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" - CONFIG_DEVTMPFS=y -+CONFIG_DEVTMPFS_MOUNT=y - CONFIG_MTD=y - CONFIG_MTD_CHAR=y - CONFIG_MTD_BLOCK=y --- -1.7.9.7 - diff --git a/meta-fsl-ppc/recipes-kernel/linux/files/0001-compiler.h-Undef-before-redefining-__attribute_const.patch b/meta-fsl-ppc/recipes-kernel/linux/files/0001-compiler.h-Undef-before-redefining-__attribute_const.patch deleted file mode 100644 index 597fd3b4..00000000 --- a/meta-fsl-ppc/recipes-kernel/linux/files/0001-compiler.h-Undef-before-redefining-__attribute_const.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 6f92ab6de9d8daeb575949bbbcbc7bcdcebc60af Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Thu, 5 Jan 2012 11:42:35 -0800 -Subject: [PATCH] compiler.h: Undef before redefining __attribute_const__ - -This is required to avoid warnings like -util/include/linux/compiler.h:8:0: error: "__attribute_const__" redefined [-Werror] - -Signed-off-by: Khem Raj ---- - tools/perf/util/include/linux/compiler.h | 4 +++- - 1 files changed, 3 insertions(+), 1 deletions(-) - ---- a/tools/perf/util/include/linux/compiler.h -+++ b/tools/perf/util/include/linux/compiler.h -@@ -4,9 +4,11 @@ - #ifndef __always_inline - #define __always_inline inline - #endif -+#undef __user - #define __user -+#undef __attribute_const__ - #define __attribute_const__ -- -+#undef __used - #define __used __attribute__((__unused__)) - - #endif diff --git a/meta-fsl-ppc/recipes-kernel/linux/files/0001-powerpc-Fix-build-dependencies-for-c-files-requiring.patch b/meta-fsl-ppc/recipes-kernel/linux/files/0001-powerpc-Fix-build-dependencies-for-c-files-requiring.patch deleted file mode 100644 index d3464fb7..00000000 --- a/meta-fsl-ppc/recipes-kernel/linux/files/0001-powerpc-Fix-build-dependencies-for-c-files-requiring.patch +++ /dev/null @@ -1,44 +0,0 @@ -Upstream-Status: Pending - -From 2e7ffea0c0c09c6d9219d604e0351423f43844f4 Mon Sep 17 00:00:00 2001 -From: Matthew McClintock -Date: Thu, 6 Sep 2012 13:45:21 -0500 -Subject: powerpc: Fix build dependencies for c files requiring libfdt.h - -Several files in obj-plat depend on libfdt header file. Sometimes -when building one can see the following issue. This patch adds -libfdt as dependency to those object files - -| In file included from arch/powerpc/boot/treeboot-iss4xx.c:33:0: -| arch/powerpc/boot/libfdt.h:854:1: error: unterminated comment -| In file included from arch/powerpc/boot/treeboot-iss4xx.c:33:0: -| arch/powerpc/boot/libfdt.h:1:0: error: unterminated #ifndef -| BOOTCC arch/powerpc/boot/inffast.o -| make[1]: *** [arch/powerpc/boot/treeboot-iss4xx.o] Error 1 -| make[1]: *** Waiting for unfinished jobs.... -| BOOTCC arch/powerpc/boot/inflate.o -| make: *** [uImage] Error 2 -| ERROR: oe_runmake failed -| ERROR: Function failed: do_compile (see /srv/home/pokybuild/yocto-autobuilder/yocto-slave/p1022ds/build/build/tmp/work/p1022ds-poky-linux-gnuspe/linux-qoriq-sdk-3.0.34-r5/temp/log.do_compile.2167 for further information) -NOTE: recipe linux-qoriq-sdk-3.0.34-r5: task do_compile: Failed - -Signed-off-by: Matthew McClintock ---- - arch/powerpc/boot/Makefile | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile -index b7d8333..6a15c96 100644 ---- a/arch/powerpc/boot/Makefile -+++ b/arch/powerpc/boot/Makefile -@@ -107,6 +107,7 @@ src-boot := $(addprefix $(obj)/, $(src-boot)) - obj-boot := $(addsuffix .o, $(basename $(src-boot))) - obj-wlib := $(addsuffix .o, $(basename $(addprefix $(obj)/, $(src-wlib)))) - obj-plat := $(addsuffix .o, $(basename $(addprefix $(obj)/, $(src-plat)))) -+obj-plat: $(libfdt) - - quiet_cmd_copy_zlib = COPY $@ - cmd_copy_zlib = sed "s@__used@@;s@]*\).*@\"\1\"@" $< > $@ --- -1.7.9.7 - diff --git a/meta-fsl-ppc/recipes-kernel/linux/files/fix_getrusage_for_perf.patch b/meta-fsl-ppc/recipes-kernel/linux/files/fix_getrusage_for_perf.patch deleted file mode 100644 index 0029fdc9..00000000 --- a/meta-fsl-ppc/recipes-kernel/linux/files/fix_getrusage_for_perf.patch +++ /dev/null @@ -1,33 +0,0 @@ -commit 7b78f13603c6fcb64e020a0bbe31a651ea2b657b -Author: Markus Trippelsdorf -Date: Wed Apr 4 10:45:27 2012 +0200 - - perf tools: Fix getrusage() related build failure on glibc trunk - - On a system running glibc trunk perf doesn't build: - - CC builtin-sched.o - builtin-sched.c: In function ‘get_cpu_usage_nsec_parent’: builtin-sched.c:399:16: error: storage size of ‘ru’ isn’t known builtin-sched.c:403:2: error: implicit declaration of function ‘getrusage’ [-Werror=implicit-function-declaration] - [...] - - Fix it by including sys/resource.h. - - Signed-off-by: Markus Trippelsdorf - Cc: Peter Zijlstra - Link: http://lkml.kernel.org/r/20120404084527.GA294@x4 - Signed-off-by: Ingo Molnar - -Upstream-Status: Backport [3.4] - -diff --git a/tools/perf/builtin-sched.c b/tools/perf/builtin-sched.c -index fb8b5f8..1cad3af 100644 ---- a/tools/perf/builtin-sched.c -+++ b/tools/perf/builtin-sched.c -@@ -17,6 +17,7 @@ - #include "util/debug.h" - - #include -+#include - - #include - #include diff --git a/meta-fsl-ppc/recipes-kernel/linux/files/scripts-Makefile.headersinst-install-headers-from-sc.patch b/meta-fsl-ppc/recipes-kernel/linux/files/scripts-Makefile.headersinst-install-headers-from-sc.patch new file mode 100644 index 00000000..0f28d3d8 --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/linux/files/scripts-Makefile.headersinst-install-headers-from-sc.patch @@ -0,0 +1,46 @@ +From e60cc1b011bf0f1acdb7e5168b7bed4ebb78c91f Mon Sep 17 00:00:00 2001 +From: Bruce Ashfield +Date: Wed, 9 Jan 2013 16:24:39 -0500 +Subject: [PATCH] scripts/Makefile.headersinst: install headers from scratch file + +If headers_install is executed from a deep/long directory structure, the +shell's maximum argument length can be execeeded, which breaks the operation +with: + +| make[2]: execvp: /bin/sh: Argument list too long +| make[2]: *** + +By dumping the input files to a scratch file and using xargs to read the +input list from the scratch file, we can avoid blowing out the maximum +argument size and install headers in a long path name environment. + +Signed-off-by: Bruce Ashfield +--- + scripts/Makefile.headersinst | 4 +++- + 1 files changed, 3 insertions(+), 1 deletions(-) + +diff --git a/scripts/Makefile.headersinst b/scripts/Makefile.headersinst +index 06ba4a7..536d722 100644 +--- a/scripts/Makefile.headersinst ++++ b/scripts/Makefile.headersinst +@@ -71,7 +71,7 @@ printdir = $(patsubst $(INSTALL_HDR_PATH)/%/,%,$(dir $@)) + quiet_cmd_install = INSTALL $(printdir) ($(words $(all-files))\ + file$(if $(word 2, $(all-files)),s)) + cmd_install = \ +- $(PERL) $< $(installdir) $(SRCARCH) $(input-files); \ ++ xargs $(PERL) $< $(installdir) $(SRCARCH) < $(INSTALL_HDR_PATH)/.input-files; \ + for F in $(wrapper-files); do \ + echo "\#include " > $(installdir)/$$F; \ + done; \ +@@ -100,7 +100,9 @@ targets += $(install-file) + $(install-file): scripts/headers_install.pl $(input-files) FORCE + $(if $(unwanted),$(call cmd,remove),) + $(if $(wildcard $(dir $@)),,$(shell mkdir -p $(dir $@))) ++ @echo $(input-files) > $(INSTALL_HDR_PATH)/.input-files + $(call if_changed,install) ++ @rm $(INSTALL_HDR_PATH)/.input-files + + else + __headerscheck: $(subdirs) $(check-file) +-- +1.7.0.4 diff --git a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk-headers.bb b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk-headers.bb index b1cbb8dc..0ee4fc1d 100644 --- a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk-headers.bb +++ b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk-headers.bb @@ -2,6 +2,8 @@ DESCRIPTION = "Linux kernel headers for Freescale platforms" SECTION = "devel" LICENSE = "GPLv2" +PR = "${INC_PR}.1" + INHIBIT_DEFAULT_DEPS = "1" PROVIDES = "linux-libc-headers ${PN}" RPROVIDES_${PN}-dev += "linux-libc-headers-dev" @@ -11,6 +13,8 @@ RRECOMMENDS_${PN}-dbg = "linux-libc-headers-dev (= ${EXTENDPKGV})" require recipes-kernel/linux/linux-qoriq-sdk.inc +SRC_URI_append += " file://scripts-Makefile.headersinst-install-headers-from-sc.patch" + inherit kernel-arch do_configure() { diff --git a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.bb b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.bb index a015e499..502132f5 100644 --- a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.bb +++ b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.bb @@ -7,11 +7,11 @@ LICENSE = "GPLv2" require recipes-kernel/linux/linux-qoriq-sdk.inc -PR = "r11" +PR = "${INC_PR}.1" -SRC_URI += "file://fix_getrusage_for_perf.patch \ - file://0001-Enable-the-option-Automount-devtmpfs-at-dev-in-kerne.patch \ - " +DEPENDS_append = " libgcc" +KERNEL_CC_append = " ${TOOLCHAIN_OPTIONS}" +KERNEL_LD_append = " ${TOOLCHAIN_OPTIONS}" do_configure_prepend() { # copy desired defconfig so we pick it up for the real kernel_do_configure diff --git a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc index f77543ea..1c66f9bc 100644 --- a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc +++ b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc @@ -1,11 +1,10 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7" -PV = "3.0.51" -PR = "r11" +PV = "3.8" +INC_PR = "r11" -SRCREV = "faac5211f398f25e2be44ac996895335d5218516" +SRCREV = "4b66366af2d77de68f4bd6548d07421e13d3df05" SRC_URI = "git://git.freescale.com/ppc/sdk/linux.git \ - file://0001-compiler.h-Undef-before-redefining-__attribute_const.patch \ " KSRC ?= "" -- cgit v1.2.3-54-g00ecf From ad8ddc6ee52a1582d477c1878dd02c21cdfbf605 Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Fri, 28 Jun 2013 03:38:30 +0000 Subject: u-boot: upgrade to the version of sdk1.4 install the right nand-uboot for p1010rdb and bsc913x. u-boot-with-spl.bin is the right nand-uboot image. Signed-off-by: Zhenhua Luo Signed-off-by: Ting Liu --- meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb b/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb index e322ab7f..7427dfc8 100644 --- a/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb +++ b/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb @@ -11,9 +11,9 @@ DEPENDS = "boot-format-native virtual/${TARGET_PREFIX}gcc libgcc" inherit deploy -SRCREV = "7bcd7f45c8974978f8eb73ae4d32e71cb6a49b77" -SRC_URI = "git://git.freescale.com/ppc/sdk/u-boot.git \ - " +SRC_URI = "git://git.freescale.com/ppc/sdk/u-boot.git" +SRCREV = "831b30de4b768f0b3b7dbfa11739b14cea612d7e" + python () { ml = d.getVar("MULTILIB_VARIANTS", True) arch = d.getVar("OVERRIDES", True) @@ -68,7 +68,7 @@ do_compile () { cp ${S}/${board}/u-boot.bin ${S}/${board}/${UBOOT_TARGET}.bin elif [ "${UBOOT_TARGET}" == "u-boot-nand" ];then if [ "${DEFAULTTUNE}" = "ppce500v2" ];then - if echo $board |egrep "(P1020RDB|P1021RDB|P1024RDB|P2020RDB|P1022DS|P1025RDB)" 2>&1 >/dev/null;then + if echo $board |egrep "(P1010RDB|P1020RDB|P1021RDB|P1024RDB|P2020RDB|P1022DS|P1025RDB|BSC9131RDB|BSC9132QDS)" 2>&1 >/dev/null;then cp ${S}/${board}/u-boot-with-spl.bin ${S}/${board}/${UBOOT_TARGET}.bin fi else -- cgit v1.2.3-54-g00ecf From ea0bc2a1a62436912a4cd5e5e8ee9302b1c9f603 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Fri, 28 Jun 2013 03:38:31 +0000 Subject: p1020rdb: update machine conf to use new -pd revision Signed-off-by: Ting Liu --- meta-fsl-ppc/conf/machine/p1020rdb.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meta-fsl-ppc/conf/machine/p1020rdb.conf b/meta-fsl-ppc/conf/machine/p1020rdb.conf index 70132c56..b17213c0 100644 --- a/meta-fsl-ppc/conf/machine/p1020rdb.conf +++ b/meta-fsl-ppc/conf/machine/p1020rdb.conf @@ -6,9 +6,9 @@ require conf/machine/include/soc-family.inc SOC_FAMILY = "p1020" BOOTFORMAT_CONFIG = "config_ddr3_1gb_p1_p2_rdb_pc_800M.dat" -UBOOT_MACHINES ?= " P1020RDB-PC P1020RDB-PC_SPIFLASH P1020RDB-PC_NAND P1020RDB-PC_SDCARD P1020RDB-PC_36BIT P1020RDB-PC_36BIT_SPIFLASH P1020RDB-PC_36BIT_NAND P1020RDB-PC_36BIT_SDCARD" +UBOOT_MACHINES ?= " P1020RDB-PD P1020RDB-PD_NAND P1020RDB-PD_SDCARD P1020RDB-PD_SPIFLASH" -KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p1020rdb-pc_32b.dts" +KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p1020rdb-pd_32b.dts" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" -- cgit v1.2.3-54-g00ecf From 244ef665df285c27cffc61824a01dec19dfc319d Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Fri, 28 Jun 2013 03:38:32 +0000 Subject: boot-format: update SHA for sdk-1.4 Signed-off-by: Zhenhua Luo --- meta-fsl-ppc/recipes-tools/boot-format/boot-format_git.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-fsl-ppc/recipes-tools/boot-format/boot-format_git.bb b/meta-fsl-ppc/recipes-tools/boot-format/boot-format_git.bb index 0abd286b..ac1504d4 100644 --- a/meta-fsl-ppc/recipes-tools/boot-format/boot-format_git.bb +++ b/meta-fsl-ppc/recipes-tools/boot-format/boot-format_git.bb @@ -4,7 +4,7 @@ PR = "r6" LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" SRC_URI = "git://git.freescale.com/ppc/sdk/boot-format.git" -SRCREV = "7a837a487eb42f30cf3ada07ca44251ee11a2940" +SRCREV = "d9bbfaba0c9316ae33455099c47bae429479e530" S = "${WORKDIR}/git" EXTRA_OEMAKE = 'CC="${CC}"' -- cgit v1.2.3-54-g00ecf From 560990dd46c236b38fa8d832c635294a8a88a669 Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Fri, 28 Jun 2013 03:38:33 +0000 Subject: eth-config: upgrade to sha of sdk-1.4 Signed-off-by: Zhenhua Luo --- meta-fsl-ppc/recipes-tools/eth-config/eth-config_git.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-fsl-ppc/recipes-tools/eth-config/eth-config_git.bb b/meta-fsl-ppc/recipes-tools/eth-config/eth-config_git.bb index 3ed50a5c..606937b9 100644 --- a/meta-fsl-ppc/recipes-tools/eth-config/eth-config_git.bb +++ b/meta-fsl-ppc/recipes-tools/eth-config/eth-config_git.bb @@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=cf02dc8eb5ac4a76f3812826520dea87" PR = "r2" SRC_URI = "git://git.freescale.com/ppc/sdk/eth-config.git" -SRCREV = "c1400695e56aa80f2f4c88c4e0582028248ae06f" +SRCREV = "c255231fb606bff18390da3b26e1ee9fca55e4e6" S = "${WORKDIR}/git" -- cgit v1.2.3-54-g00ecf From e42ab25571177bf21f1f95c80204871b02a690c0 Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Fri, 28 Jun 2013 03:38:34 +0000 Subject: hv-cfg: upgrade to the SHA of sdk-1.4 Signed-off-by: Zhenhua Luo --- meta-fsl-ppc/recipes-tools/hv-cfg/hv-cfg_git.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-fsl-ppc/recipes-tools/hv-cfg/hv-cfg_git.bb b/meta-fsl-ppc/recipes-tools/hv-cfg/hv-cfg_git.bb index d675a41b..2c6bb85a 100644 --- a/meta-fsl-ppc/recipes-tools/hv-cfg/hv-cfg_git.bb +++ b/meta-fsl-ppc/recipes-tools/hv-cfg/hv-cfg_git.bb @@ -20,7 +20,7 @@ COMPATIBLE_HOST ?= "(none)" inherit deploy -SRCREV = "deb55b9564ef8fb9e1fda1112233f11ae2a12d4a" +SRCREV = "d037ab9d5b9ecd58e10a7dac2b601d781ed9b5bf" SRC_URI = "git://git.freescale.com/ppc/sdk/hv-cfg.git" S = "${WORKDIR}/git" -- cgit v1.2.3-54-g00ecf From e9f0fb96b0f0a0b09eaca9df2465b5f6f9e54d3d Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Fri, 28 Jun 2013 03:38:35 +0000 Subject: fmlib: upgrade to the SHA of sdk-1.4 Signed-off-by: Zhenhua Luo --- meta-fsl-ppc/recipes-ucode/fmlib/fmlib_git.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-fsl-ppc/recipes-ucode/fmlib/fmlib_git.bb b/meta-fsl-ppc/recipes-ucode/fmlib/fmlib_git.bb index dd67b7bf..7a7b8f26 100644 --- a/meta-fsl-ppc/recipes-ucode/fmlib/fmlib_git.bb +++ b/meta-fsl-ppc/recipes-ucode/fmlib/fmlib_git.bb @@ -9,7 +9,7 @@ DEPENDS = "linux-libc-headers" DEPENDS_virtclass-native = "" SRC_URI = "git://git.freescale.com/ppc/sdk/fmlib.git" -SRCREV = "e80c0625d4f2671ac4f15cabfdd1b334143eb515" +SRCREV = "7d843485bdac963d98f81773c0f3cb15936e09da" S = "${WORKDIR}/git" -- cgit v1.2.3-54-g00ecf From d8025ab076bf6c09936657305b631de382a22a61 Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Fri, 28 Jun 2013 03:38:36 +0000 Subject: fmc: upgrade to the SHA of sdk-1.4 Signed-off-by: Zhenhua Luo --- meta-fsl-ppc/recipes-ucode/fmc/fmc_git.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-fsl-ppc/recipes-ucode/fmc/fmc_git.bb b/meta-fsl-ppc/recipes-ucode/fmc/fmc_git.bb index fd238967..20f93f65 100644 --- a/meta-fsl-ppc/recipes-ucode/fmc/fmc_git.bb +++ b/meta-fsl-ppc/recipes-ucode/fmc/fmc_git.bb @@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=a504ab5a8ff235e67c7301214749346c" PR = "r2" SRC_URI = "git://git.freescale.com/ppc/sdk/fmc.git" -SRCREV = "6db53fae9dfe72db0312a383733e0d3598aad3f2" +SRCREV = "f2e1a831a96f1d04d3d5a5970d2e54c38098cf39" DEPENDS = "libxml2 fmlib tclap" -- cgit v1.2.3-54-g00ecf From c6a9321ea82f7270926f2a04819914e9dacd0ca8 Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Fri, 28 Jun 2013 03:38:37 +0000 Subject: fm-ucode: upgrade to the SHA of sdk-1.4 Also update regex to match new ucode binaries (106.9.x) Signed-off-by: Zhenhua Luo --- meta-fsl-ppc/recipes-ucode/fm-ucode/fm-ucode_git.bb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/meta-fsl-ppc/recipes-ucode/fm-ucode/fm-ucode_git.bb b/meta-fsl-ppc/recipes-ucode/fm-ucode/fm-ucode_git.bb index c2c3de05..f71fcd63 100644 --- a/meta-fsl-ppc/recipes-ucode/fm-ucode/fm-ucode_git.bb +++ b/meta-fsl-ppc/recipes-ucode/fm-ucode/fm-ucode_git.bb @@ -5,11 +5,11 @@ LIC_FILES_CHKSUM = "file://EULA;md5=60037ccba533a5995e8d1a838d85799c" PR = "r1" -COMPATIBLE_MACHINE = "(p1023rds|p2041rdb|p3041ds|p4080ds|p5020ds|p5040ds|p5020ds-64b|p5040ds-64b|b4420qds|b4420qds-64b|b4860qds|b4860qds-64b|t4160qds|t4160qds-64b|t4240qds|t4240qds-64b)" +COMPATIBLE_MACHINE = "(p1023rdb|p2041rdb|p3041ds|p4080ds|p5020ds|p5040ds|p5020ds-64b|p5040ds-64b|b4420qds|b4420qds-64b|b4860qds|b4860qds-64b|t4160qds|t4160qds-64b|t4240qds|t4240qds-64b)" inherit deploy SRC_URI = "git://git.freescale.com/ppc/sdk/fm-ucode.git" -SRCREV = "219bb2c6aaa1e040fb849a771a9bdf3e8dbc49e9" +SRCREV = "4ca0e41de225b34962e1517c2c75bbb31a381e1a" S = "${WORKDIR}/git" @@ -20,7 +20,6 @@ do_install () { t4240qds|t4240qds-64b|t4160qds|t4160qds-64b) UCODE=t4240qds;; p5020ds|p5020ds-64b) UCODE=p5020ds;; p5040ds|p5040ds-64b) UCODE=p5040ds;; - p1023rds) UCODE=P1023RDS;; *) UCODE=${MACHINE};; esac UCODE=`echo $UCODE | sed -e 's,[a-zA-Z]*$,,'` @@ -34,7 +33,6 @@ do_deploy () { t4240qds|t4240qds-64b|t4160qds|t4160qds-64b) UCODE=t4240qds;; p5020ds|p5020ds-64b) UCODE=p5020ds;; p5040ds|p5040ds-64b) UCODE=p5040ds;; - p1023rds) UCODE=P1023RDS;; *) UCODE=${MACHINE};; esac UCODE=`echo $UCODE | sed -e 's,[a-zA-Z]*$,,'` -- cgit v1.2.3-54-g00ecf From 14557beb45c8cf21595bac2a830ded30760ea7d8 Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Fri, 28 Jun 2013 03:38:38 +0000 Subject: hypervisor: upgrade to the SHA of sdk-1.4 and add hypertrk submodule Signed-off-by: Zhenhua Luo --- .../recipes-tools/embedded-hv/hypervisor_git.bb | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/meta-fsl-ppc/recipes-tools/embedded-hv/hypervisor_git.bb b/meta-fsl-ppc/recipes-tools/embedded-hv/hypervisor_git.bb index 5e9e442a..dc864066 100644 --- a/meta-fsl-ppc/recipes-tools/embedded-hv/hypervisor_git.bb +++ b/meta-fsl-ppc/recipes-tools/embedded-hv/hypervisor_git.bb @@ -17,14 +17,16 @@ SRC_URI = " \ git://git.freescale.com/ppc/sdk/hypervisor/kconfig.git;name=kconfig;destsuffix=git/kconfig \ git://git.freescale.com/ppc/sdk/hypervisor/libos.git;name=libos;destsuffix=git/libos \ git://www.jdl.com/software/dtc.git;name=dtc;destsuffix=dtc \ + git://git.freescale.com/ppc/sdk/hypertrk.git;name=hypertrk;destsuffix=git/hypertrk \ file://81-fsl-embedded-hv.rules \ " SRCREV_FORMAT="hypervisor" -SRCREV = "d3f8d79ca252fc17d4a9ca5f44f563c8a291a9a1" -SRCREV_kconfig = "47a6c4ac5e0621ecbc309bf1b7b588f08858b7e6" -SRCREV_libos = "8a88243d057c32c83595ba201eaf20fc5ec76190" +SRCREV = "e6092cdf2a225c66c1ea46b1151eb828da29d139" +SRCREV_kconfig = "a56025d4da992b856796b0eccac2e410d751dbac" +SRCREV_libos = "5268371581f3ef3959be2a53235edfa6a8c6aa7c" SRCREV_dtc = "033089f29099bdfd5c2d6986cdb9fd07b16cfde0" +SRCREV_hypertrk = "975c98b562186afbd3bbf103ae54b96cf9b3e533" EXTRA_OEMAKE = 'CROSS_COMPILE=${TARGET_PREFIX} CC="${TARGET_PREFIX}gcc ${TOOLCHAIN_OPTIONS}"' @@ -39,7 +41,17 @@ do_configure () { oe_runmake ${DEFCONFIG} } +PKG_HV_HYPERTRK_SUPPORT = "n" do_compile () { + if [ "${PKG_HV_HYPERTRK_SUPPORT}" = "y" ] + then + oe_runmake silentoldconfig + export HV_DIR=$PWD + cd hypertrk + oe_runmake deploy + cd .. + fi + oe_runmake oe_runmake partman } @@ -71,6 +83,7 @@ do_deploy_append() { rm -f ${S}/../hv } +INHIBIT_PACKAGE_DEBUG_SPLIT = "1" ALLOW_EMPTY_${PN} = "1" PACKAGES_prepend = "${PN}-image ${PN}-partman " FILES_${PN}-image = "/boot/" -- cgit v1.2.3-54-g00ecf From 3f01141a025a49704d075e4d3cb0f8a171f2f011 Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Fri, 28 Jun 2013 03:38:39 +0000 Subject: rcw: upgrade to the version of sdk-1.4 Signed-off-by: Zhenhua Luo --- meta-fsl-ppc/recipes-tools/rcw/rcw_git.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-fsl-ppc/recipes-tools/rcw/rcw_git.bb b/meta-fsl-ppc/recipes-tools/rcw/rcw_git.bb index f33685d8..c532a9d8 100644 --- a/meta-fsl-ppc/recipes-tools/rcw/rcw_git.bb +++ b/meta-fsl-ppc/recipes-tools/rcw/rcw_git.bb @@ -13,8 +13,8 @@ COMPATIBLE_HOST ?= "(none)" inherit deploy -SRCREV = "c66f5fcbc1ecd2ae7c504bcbf5ddf7973496a94e" SRC_URI = "git://git.freescale.com/ppc/sdk/rcw.git" +SRCREV = "5d3c819bcca6d09dcf7b52b3f2855dda304a5997" S = "${WORKDIR}/git" -- cgit v1.2.3-54-g00ecf From 0cbb40bf90044e4d479260abb4ee03ff4b50d90b Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Fri, 28 Jun 2013 03:38:40 +0000 Subject: usdpaa: upgrade to the version of sdk-1.4 Signed-off-by: Zhenhua Luo --- meta-fsl-ppc/recipes-tools/usdpaa/usdpaa_git.bb | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/meta-fsl-ppc/recipes-tools/usdpaa/usdpaa_git.bb b/meta-fsl-ppc/recipes-tools/usdpaa/usdpaa_git.bb index f76ee1d7..cb7b76bc 100644 --- a/meta-fsl-ppc/recipes-tools/usdpaa/usdpaa_git.bb +++ b/meta-fsl-ppc/recipes-tools/usdpaa/usdpaa_git.bb @@ -10,17 +10,29 @@ DEPENDS = "libxml2 libedit ncurses readline flib fmc" RDEPENDS_${PN} = "libgcc" SRC_URI = "git://git.freescale.com/ppc/sdk/usdpaa.git" -SRCREV = "670ad8827fd83169ccb54a008c638dbb497b1c61" +SRCREV = "97fe45d9697ef339e10a1885539b23fa7fcb113e" COMPATIBLE_HOST_fslmachine = ".*" COMPATIBLE_HOST ?= "(none)" S = "${WORKDIR}/git" -EXTRA_OEMAKE = 'V=1 CC="${CC}" LD="${LD}" AR="${AR}"' +EXTRA_OEMAKE = 'CC="${CC}" LD="${LD}" AR="${AR}"' export ARCH="${TARGET_ARCH}" do_compile_prepend () { + case ${MACHINE} in + b4420qds|b4420qds-64b|b4860qds|b4860qds-64b) SOC=B4860;; + t4240qds|t4240qds-64b) SOC=T4240;; + p1023rdb) SOC=P1023;; + *) SOC=P4080;; + esac + export FMC_EXTRA_CFLAGS="-I ${STAGING_INCDIR}/fmc" + export FMLIB_EXTRA_CFLAGS="-I ${STAGING_INCDIR}/fmd \ + -I ${STAGING_INCDIR}/fmd/Peripherals \ + -I ${STAGING_INCDIR}/fmd/integrations \ + -D $SOC" + export LIBXML2_CFLAGS="$(pkg-config --cflags libxml-2.0)" export LIBXML2_LDFLAGS="$(pkg-config --libs --static libxml-2.0)" export LIBEDIT_CFLAGS="$(pkg-config --cflags libedit)" -- cgit v1.2.3-54-g00ecf From 81a71f1e2a8b802e3e1f60dedb870c71aea076a8 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Tue, 2 Jul 2013 03:39:02 +0000 Subject: u-boot: not use == to compatible with dash Signed-off-by: Ting Liu Tested-by: Luo Zhenhua-B19537 --- meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb b/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb index 7427dfc8..c3aa1053 100644 --- a/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb +++ b/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb @@ -47,7 +47,7 @@ do_compile () { unset CFLAGS unset CPPFLAGS - if [ "x${UBOOT_MACHINES}" == "x" ]; then + if [ "x${UBOOT_MACHINES}" = "x" ]; then UBOOT_MACHINES=${UBOOT_MACHINE} fi @@ -64,9 +64,9 @@ do_compile () { esac if [ "x${UBOOT_TARGET}" != "x" ]; then - if [ "${UBOOT_TARGET}" == "u-boot-sd" ]; then + if [ "${UBOOT_TARGET}" = "u-boot-sd" ]; then cp ${S}/${board}/u-boot.bin ${S}/${board}/${UBOOT_TARGET}.bin - elif [ "${UBOOT_TARGET}" == "u-boot-nand" ];then + elif [ "${UBOOT_TARGET}" = "u-boot-nand" ];then if [ "${DEFAULTTUNE}" = "ppce500v2" ];then if echo $board |egrep "(P1010RDB|P1020RDB|P1021RDB|P1024RDB|P2020RDB|P1022DS|P1025RDB|BSC9131RDB|BSC9132QDS)" 2>&1 >/dev/null;then cp ${S}/${board}/u-boot-with-spl.bin ${S}/${board}/${UBOOT_TARGET}.bin @@ -88,7 +88,7 @@ do_compile () { } do_install(){ - if [ "x${UBOOT_MACHINES}" == "x" ]; then + if [ "x${UBOOT_MACHINES}" = "x" ]; then UBOOT_MACHINES=${UBOOT_MACHINE} fi @@ -109,7 +109,7 @@ do_install(){ } do_deploy(){ - if [ "x${UBOOT_MACHINES}" == "x" ]; then + if [ "x${UBOOT_MACHINES}" = "x" ]; then UBOOT_MACHINES=${UBOOT_MACHINE} fi -- cgit v1.2.3-54-g00ecf From 297a78124bbaf0d84597dda921291f67e323ba9c Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Wed, 3 Jul 2013 02:12:10 +0000 Subject: usdpaa: set MACHINE_ARCH specific, same with dependency fmc Signed-off-by: Ting Liu Tested-by: Luo Zhenhua-B19537 --- meta-fsl-ppc/recipes-tools/usdpaa/usdpaa_git.bb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/meta-fsl-ppc/recipes-tools/usdpaa/usdpaa_git.bb b/meta-fsl-ppc/recipes-tools/usdpaa/usdpaa_git.bb index cb7b76bc..48e860f7 100644 --- a/meta-fsl-ppc/recipes-tools/usdpaa/usdpaa_git.bb +++ b/meta-fsl-ppc/recipes-tools/usdpaa/usdpaa_git.bb @@ -1,5 +1,4 @@ DESCRIPTION = "User-Space Data-Path Acceleration Architecture drivers" -SECTION = "usdpaa" LICENSE = "BSD & GPLv2" LIC_FILES_CHKSUM = "file://Makefile;endline=30;md5=39e58bedc879163c9338596e52df5b1f" PR = "r4" @@ -7,14 +6,11 @@ PR = "r4" inherit pkgconfig DEPENDS = "libxml2 libedit ncurses readline flib fmc" -RDEPENDS_${PN} = "libgcc" +RDEPENDS_${PN} = "libgcc bash" SRC_URI = "git://git.freescale.com/ppc/sdk/usdpaa.git" SRCREV = "97fe45d9697ef339e10a1885539b23fa7fcb113e" -COMPATIBLE_HOST_fslmachine = ".*" -COMPATIBLE_HOST ?= "(none)" - S = "${WORKDIR}/git" EXTRA_OEMAKE = 'CC="${CC}" LD="${LD}" AR="${AR}"' @@ -44,6 +40,10 @@ do_install () { } PARALLEL_MAKE_pn-${PN} = "" - FILES_${PN} += "/root/SOURCE_THIS /usr/etc/" -RDEPENDS_${PN} += "bash" + +PACKAGE_ARCH = "${MACHINE_ARCH}" + +COMPATIBLE_HOST_fslmachine = ".*" +COMPATIBLE_HOST ?= "(none)" + -- cgit v1.2.3-54-g00ecf From 36279871e26a583c73086a9709ff679e8f6cd273 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Tue, 2 Jul 2013 11:49:10 +0800 Subject: add custom-licenses dir for freescale EULA Signed-off-by: Ting Liu --- meta-fsl-ppc/conf/layer.conf | 3 + meta-fsl-ppc/custom-licenses/Freescale-EULA | 214 ++++++++++++++++++++++++++++ 2 files changed, 217 insertions(+) create mode 100644 meta-fsl-ppc/custom-licenses/Freescale-EULA diff --git a/meta-fsl-ppc/conf/layer.conf b/meta-fsl-ppc/conf/layer.conf index ea7f02dd..0f81db04 100644 --- a/meta-fsl-ppc/conf/layer.conf +++ b/meta-fsl-ppc/conf/layer.conf @@ -9,3 +9,6 @@ BBFILE_PATTERN_fsl-ppc = "^${LAYERDIR}/" BBFILE_PRIORITY_fsl-ppc = "5" BB_ENV_EXTRAWHITE := "KSRC USRC" + +LICENSE_PATH += "${LAYERDIR}/custom-licenses" + diff --git a/meta-fsl-ppc/custom-licenses/Freescale-EULA b/meta-fsl-ppc/custom-licenses/Freescale-EULA new file mode 100644 index 00000000..6a9b42d8 --- /dev/null +++ b/meta-fsl-ppc/custom-licenses/Freescale-EULA @@ -0,0 +1,214 @@ +IMPORTANT. Read the following Freescale Software License Agreement ("Agreement") +completely. By selecting the "I Accept" button at the end of this page, you +indicate that you accept the terms of the Freescale Proprietary Software License +Agreement and you also acknowledge that you have the authority, on behalf of your +company, to bind your company to such terms. You may then download or install the +file. + +FREESCALE PROPRIETARY SOFTWARE LICENSE AGREEMENT +This is a license agreement ("Agreement") between you (either as an individual +or as an authorized representative acting on behalf of your employer) and Freescale +Semiconductor, Inc. ("Freescale"). It concerns your rights to use the software +provided to you in binary or source code form and any accompanying written materials +(the "Software"). The Software may include any updates or error corrections or +documentation relating to the Software provided to you by Freescale under this +License. In consideration for Freescale allowing you to access the Software, you are +agreeing to be bound by the terms of this Agreement. If you do not agree to all of +the terms of this Agreement, do not download or install the Software. If you change +your mind later, stop using the Software and delete all copies of the Software in +your possession or control. Any copies of the Software that you have already +distributed, where permitted, and do not destroy will continue to be governed by +this Agreement. Your prior use will also continue to be governed by this Agreement. + +1. LICENSE GRANT. Freescale grants to you, free of charge, the non-exclusive, +non-transferable, non-sublicensable right (1) to use the Software, (2) to reproduce +the Software, (3) to prepare derivative works of the Software, (4) to distribute the +Software and derivative works thereof in object (machine¨Creadable) form as part of +a programmable processing unit (e.g. a microprocessor, microcontroller, or digital +signal processor) supplied directly or indirectly from Freescale ("Freescale +System") and (5) to sublicense to others the right to use the distributed Software, +provided that any and all such sublicenses include the same terms and conditions of +this Agreement. Notwithstanding the limitation on damages in Section 8, Licensee +will indemnify, defend, and hold harmless Freescale against any and all claims, +costs, damages, liabilities, judgments and attorneys' fees resulting from or +arising out of any breach by the sublicensee, or resulting from or arising out of +any action by the sublicensee inconsistent with this Agreement. +You must notify Freescale, in writing, any time you create a derivative of the +Software. Freescale owns all derivatives created from the Software, and derivatives +are licensed to you under the same terms as the Software under this Agreement. Upon +request, you must provide Freescale the source code of any derivative of the Software. +If you violate any of the terms or restrictions of this Agreement, Freescale may +immediately terminate this Agreement, and require that you stop using and delete all +copies of the Software and any derivative in your possession or control. Any license +granted above only extends to Freescale's intellectual property rights that would +be necessarily infringed by the Software as provided to you by Freescale and as used +within the scope of the licenses granted. You must advise Freescale of any results +obtained including any problems or suggested improvements thereof. Freescale retains +the right to use such results and related information in any manner it deems +appropriate. + +2. OTHER RESTRICTIONS. Subject to the license grant above, the following restrictions + apply: + +a. Freescale reserves all rights not expressly granted herein. +b. You may not rent, lease, sublicense, lend or encumber the Software, unless + otherwise expressly agreed to within this Agreement +c. You may not distribute, manufacture, have manufactured, sublicense or otherwise + reproduce the Software for purposes other than intended in this Agreement. +d. You may not remove or alter any proprietary legends, notices, or trademarks + contained in the Licensed Software, +e. The terms and conditions of this Agreement will apply to any Software updates, + provided to you at Freescale's discretion, that replace and/or supplement the + original Software, unless such update contains a separate license. +f. You may not translate, reverse engineer, decompile, or disassemble the Software + provided to you solely in object code format (machine readable) except to the + extent applicable law specifically prohibits such restriction. You will prohibit + your sublicensees from translating, reverse engineering, decompiling, or + disassembling the Software except to the extent applicable law specifically + prohibits such restriction. + +3. OPEN SOURCE. You are about to download or install certain software that is +subject to various open source licenses such as the Apache License, the BSD license, +the Free Software Foundation General Public License and Lesser General Public +License, the Mozilla Public License and others. Your use of such open source +software is subject to the terms of each applicable license. You must agree to the +terms of each such applicable license, or you should not use the open source software. +Any open source license that is incompatible with the terms of this Agreement +supersedes the terms of this Agreement. + +4. COPYRIGHT. The Software is licensed to you, not sold. Freescale owns the +Software, and United States copyright laws and international treaty provisions +protect the Software. Therefore, you must treat the Software like any other +copyrighted material (e.g. a book or musical recording). You may not use or +copy the Software for any other purpose than what is described in this Agreement. +Except as expressly provided herein, Freescale does not grant to you any express or +implied rights under any Freescale or third party patents, copyrights, trademarks, +or trade secrets. Additionally, you must reproduce and apply any copyright or other +proprietary rights notices included on or embedded in the Software to any copies +made thereof, in whole or in part, if any. You may not remove any copyright +notices of Freescale incorporated in the Software. + +5. TERM AND TERMINATION. The term of this Agreement shall commence on the date +of installation or download and shall continue perpetually, unless earlier +terminated in accordance with this Agreement. Freescale has the right to terminate +this Agreement without notice and require that you stop using and delete all copies +of the Software in your possession or control if you violate any of the terms or +restrictions of this Agreement. Freescale may terminate this Agreement should any +of the Software become, or in Freescale's reasonable opinion is likely to become, +the subject of a claim of intellectual infringement or trade secret misappropriation. +Upon termination, you must cease use of and destroy, the Software and confirm +compliance in writing to Freescale. Upon termination, the license granted pursuant +to this Agreement immediately terminates and the provisions of Sections 4 through +18 will survive any termination of this Agreement. + +6. SUPPORT. Freescale is NOT obligated to provide any support, upgrades or new +releases of the Software. If you wish, you may contact Freescale and report problems +and provide suggestions regarding the Software. Freescale has no obligation +whatsoever to respond in any way to such a problem report or suggestion. Freescale +may make changes to the Software at any time, without any obligation to notify or +provide updated versions of the Software to you. + +7. NO WARRANTY. TO THE MAXIMUM EXTENT PERMITTED BY LAW, FREESCALE EXPRESSLY +DISCLAIMS ANY WARRANTY FOR THE SOFTWARE. THE SOFTWARE IS PROVIDED "AS IS", +WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, WITHOUT +LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +PURPOSE, OR NON-INFRINGEMENT. YOU ASSUME THE ENTIRE RISK ARISING OUT OF THE USE +OR PERFORMANCE OF THE SOFTWARE, OR ANY SYSTEMS YOU DESIGN USING THE SOFTWARE (IF +ANY). NOTHING IN THIS AGREEMENT MAY BE CONSTRUED AS A WARRANTY OR REPRESENTATION +BY FREESCALE THAT THE SOFTWARE OR ANY DERIVATIVE WORK DEVELOPED WITH OR INCORPORATING +THE SOFTWARE WILL BE FREE FROM INFRINGEMENT OF THE INTELLECTUAL PROPERTY RIGHTS OF +THIRD PARTIES. + +8. INDEMNITY. You agree to fully defend and indemnify Freescale from any and all +claims, liabilities, and costs (including reasonable attorney's fees) related to +(1) your use (including your sublicensee's use, if permitted) of the Software or +(2) your violation of the terms and conditions of this Agreement. + +9. LIMITATION OF LIABILITY. IN NO EVENT WILL FREESCALE BE LIABLE, WHETHER IN +CONTRACT, TORT, OR OTHERWISE, FOR ANY INCIDENTAL, SPECIAL, INDIRECT, CONSEQUENTIAL +OR PUNITIVE DAMAGES, INCLUDING, BUT NOT LIMITED TO, DAMAGES FOR ANY LOSS OF USE, +LOSS OF TIME, INCONVENIENCE, COMMERCIAL LOSS, OR LOST PROFITS, SAVINGS, OR REVENUES +TO THE FULL EXTENT SUCH MAY BE DISCLAIMED BY LAW EVEN IF INFORMED IN ADVANCE OF THE +POSSIBILITY OF SUCH DAMAGES. FREESCALE'S LIABILITY WILL IN ANY EVENT AND UNDER ANY +THEORY OF RECOVERY BE LIMITED TO THE TOTAL AMOUNT RECEIVED BY FREESCALE UNDER THIS +AGREEMENT. + +10. COMPLIANCE WITH LAWS; EXPORT RESTRICTIONS. You must not resell, re-export, or +provide, directly or indirectly, the licensed software or direct product thereof, +in any form without obtaining appropriate export or re-export licenses from the +United States Government and from the country from which the export or re-export +is to occur. An export occurs when products, technology, or software is transferred +from one country to another by any means, including physical shipments, FTP file +transfers, E-mails, faxes, remote server access, conversations, and the like. An +export also occurs when technology or software is transferred to a foreign national +in the United States, or foreign national of the country in which the business +activity is taking place. A foreign national is any person who is neither a citizen +nor permanent resident of the United States, or the country in which the business +activity is taking place. Furthermore, if an export/import license, permit or other +government required authority (collectively referred to as "government +authorization") is required to transfer technology, software, hardware or other +Freescale property to non- Freescale party(ies) and is not approved, then Freescale +is not obligated to transfer the Software under this Agreement until such +"government authorization" is granted.. + +11. GOVERNMENT RIGHTS. The Licensed Software is a "Commercial Item as defined in +48 C.F.R. $2.101, consisting of "Commercial Computer Software" and "Commercial +Computer Software Documentation," as such terms are used in 48 C.F.R. $ 12.212 or +48 C.F.R. $227.7202, as applicable and are only licensed to U.S. Government end +users with the rights as are set forth herein.. + +12. HIGH RISK ACTIVITIES. You acknowledge that the Software is not fault tolerant +and is not designed, manufactured or intended by Freescale for incorporation into +products intended for use or resale in on-line control equipment in hazardous, +dangerous to life or potentially life-threatening environments requiring fail-safe + performance, such as in the operation of nuclear facilities, aircraft navigation + or communication systems, air traffic control, direct life support machines or +weapons systems, in which the failure of products could lead directly to death, +personal injury or severe physical or environmental damage ("High Risk Activities"). + You specifically represent and warrant that you will not use the Software or any +derivative work of the Software for High Risk Activities. + +13. CHOICE OF LAW; VENUE; LIMITATIONS. You agree that the statutes and laws of the +United States and the State of Texas, USA, without regard to conflicts of laws +principles, will apply to all matters relating to this Agreement or the Software, +and you agree that any litigation will be subject to the exclusive jurisdiction of +the state or federal courts in Texas, USA. You agree that regardless of any +statute or law to the contrary, any claim or cause of action arising out of or +related to this Agreement or the Software must be filed within one (1) year after +such claim or cause of action arose or be forever barred. + +14. CONFIDENTIAL INFORMATION. You must treat the Software as confidential +information and you agree to retain the Software in confidence perpetually, with +respect to Software in source code form (human readable), or for a period of five +(5) years from the date of termination of this Agreement, with respect to all other +parts of the Software. During this period you may not disclose any part of the +Software to anyone other than employees who have a need to know of the Software and + who have executed written agreements obligating them to protect such Licensed +Software to at least the same degree of care as in this Agreement. You agree to use + the same degree of care, but no less than a reasonable degree of care, with the +Software as you do with your own confidential information. You may disclose Software + to the extent required by a court or under operation of law or order provided that + you notify Freescale of such requirement prior to disclosure, which you only +disclose information required, and that you allow Freescale the opportunity to +object to such court or other legal body requiring such disclosure. + +15. PRODUCT LABELING. You are not authorized to use any Freescale trademarks, +brand names, or logos. + +16. ENTIRE AGREEMENT. This Agreement constitutes the entire agreement between you +and Freescale regarding the subject matter of this Agreement, and supersedes all +prior communications, negotiations, understandings, agreements or representations, +either written or oral, if any. This Agreement may only be amended in written form, +executed by you and Freescale. + +17. SEVERABILITY. If any provision of this Agreement is held for any reason to be +invalid or unenforceable, then the remaining provisions of this Agreement will be +unimpaired and, unless a modification or replacement of the invalid or unenforceable +provision is further held to deprive you or Freescale of a material benefit, in +which case the Agreement will immediately terminate, the invalid or unenforceable +provision will be replaced with a provision that is valid and enforceable and that +comes closest to the intention underlying the invalid or unenforceable provision. + +18. NO WAIVER. The waiver by Freescale of any breach of any provision of this +Agreement will not operate or be construed as a waiver of any other or a subsequent +breach of the same or a different provision. -- cgit v1.2.3-54-g00ecf From a39334d4148d1d1eb7e94cca721417c95bf94c6d Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Tue, 2 Jul 2013 04:09:20 +0000 Subject: fix Freescale EULA warning This takes care of this build warning: WARNING: eth-config: No generic license file exists for: Freescale in any provider WARNING: eth-config: No generic license file exists for: EULA in any provider Signed-off-by: Ting Liu --- meta-fsl-ppc/recipes-tools/eth-config/eth-config_git.bb | 2 +- meta-fsl-ppc/recipes-ucode/fm-ucode/fm-ucode_git.bb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/meta-fsl-ppc/recipes-tools/eth-config/eth-config_git.bb b/meta-fsl-ppc/recipes-tools/eth-config/eth-config_git.bb index 606937b9..ac25013a 100644 --- a/meta-fsl-ppc/recipes-tools/eth-config/eth-config_git.bb +++ b/meta-fsl-ppc/recipes-tools/eth-config/eth-config_git.bb @@ -1,6 +1,6 @@ DESCRIPTION = "Ethernet Configuration Files" SECTION = "eth-config" -LICENSE = "Freescale EULA" +LICENSE = "Freescale-EULA" LIC_FILES_CHKSUM = "file://COPYING;md5=cf02dc8eb5ac4a76f3812826520dea87" PR = "r2" diff --git a/meta-fsl-ppc/recipes-ucode/fm-ucode/fm-ucode_git.bb b/meta-fsl-ppc/recipes-ucode/fm-ucode/fm-ucode_git.bb index f71fcd63..76d00b99 100644 --- a/meta-fsl-ppc/recipes-ucode/fm-ucode/fm-ucode_git.bb +++ b/meta-fsl-ppc/recipes-ucode/fm-ucode/fm-ucode_git.bb @@ -1,6 +1,6 @@ DESCRIPTION = "Fman microcode binary" SECTION = "fm-ucode" -LICENSE = "Freescale EULA" +LICENSE = "Freescale-EULA" LIC_FILES_CHKSUM = "file://EULA;md5=60037ccba533a5995e8d1a838d85799c" PR = "r1" -- cgit v1.2.3-54-g00ecf From 3256676fac8eb18d368ea693caa1e36a27bec298 Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Wed, 3 Jul 2013 02:12:11 +0000 Subject: libedit: pull in from meta-oe as it is needed by usdpaa meta-fsl-ppc should not depends on meta-oe to run, so keep a copy of libedit in this layer. libedit commit history in meta-oe: d5bb26f libedit: upgrade to 20121213 and fix download d9619f6 libedit: update to latest version d248ea6 libedit: Remove files folder as no patch was being used 4d2d164 libedit: Adds version 20110802 (initial recipe) Signed-off-by: Zhenhua Luo --- .../recipes-devtools/libedit/libedit_20121213.bb | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 meta-fsl-ppc/recipes-devtools/libedit/libedit_20121213.bb diff --git a/meta-fsl-ppc/recipes-devtools/libedit/libedit_20121213.bb b/meta-fsl-ppc/recipes-devtools/libedit/libedit_20121213.bb new file mode 100644 index 00000000..35e619ca --- /dev/null +++ b/meta-fsl-ppc/recipes-devtools/libedit/libedit_20121213.bb @@ -0,0 +1,18 @@ +DESCRIPTION = "BSD replacement for libreadline" +HOMEPAGE = "http://www.thrysoee.dk/editline/" +SECTION = "libs" +LICENSE = "BSD" +LIC_FILES_CHKSUM = "file://COPYING;md5=1e4228d0c5a9093b01aeaaeae6641533" + +DEPENDS = "ncurses" + +inherit autotools + +# upstream site does not allow wget's User-Agent +FETCHCMD_wget += "-U bitbake" +SRC_URI = "http://www.thrysoee.dk/editline/${PN}-${PV}-3.0.tar.gz" + +S = "${WORKDIR}/${PN}-${PV}-3.0" + +SRC_URI[md5sum] = "f475f50fe7467c1074c0fbae8b5bca1a" +SRC_URI[sha256sum] = "0379e4a73c219f260e6d16adbc2e87635532ebb4c5a83a7399f231dc40108d1f" -- cgit v1.2.3-54-g00ecf From 897207754fb058972e9b3c39b8d3ab4bd748b744 Mon Sep 17 00:00:00 2001 From: Chunrong Guo Date: Wed, 3 Jul 2013 09:32:54 +0000 Subject: Remove 85xx NPI/Boards, P102x combo board and P1023RDS board These boards were not tested with latest released sdk 1.4 codes (kernel, u-boot, etc.). To avoid confusion and potential error, detete these machines from master/dylan branch of this layer. If anyone want to use them, please use danny/denzil/edison branch. Signed-off-by: Chunrong Guo --- meta-fsl-ppc/conf/machine/mpc8536ds.conf | 19 ------------------- meta-fsl-ppc/conf/machine/mpc8544ds.conf | 17 ----------------- meta-fsl-ppc/conf/machine/mpc8548cds.conf | 18 ------------------ meta-fsl-ppc/conf/machine/mpc8572ds.conf | 17 ----------------- meta-fsl-ppc/conf/machine/p1020mbg.conf | 18 ------------------ meta-fsl-ppc/conf/machine/p1020utm.conf | 18 ------------------ meta-fsl-ppc/conf/machine/p1023rds.conf | 18 ------------------ meta-fsl-ppc/conf/machine/p1024rdb.conf | 18 ------------------ meta-fsl-ppc/conf/machine/p1025rdb.conf | 18 ------------------ 9 files changed, 161 deletions(-) delete mode 100644 meta-fsl-ppc/conf/machine/mpc8536ds.conf delete mode 100644 meta-fsl-ppc/conf/machine/mpc8544ds.conf delete mode 100644 meta-fsl-ppc/conf/machine/mpc8548cds.conf delete mode 100644 meta-fsl-ppc/conf/machine/mpc8572ds.conf delete mode 100644 meta-fsl-ppc/conf/machine/p1020mbg.conf delete mode 100644 meta-fsl-ppc/conf/machine/p1020utm.conf delete mode 100644 meta-fsl-ppc/conf/machine/p1023rds.conf delete mode 100644 meta-fsl-ppc/conf/machine/p1024rdb.conf delete mode 100644 meta-fsl-ppc/conf/machine/p1025rdb.conf diff --git a/meta-fsl-ppc/conf/machine/mpc8536ds.conf b/meta-fsl-ppc/conf/machine/mpc8536ds.conf deleted file mode 100644 index a72de6e6..00000000 --- a/meta-fsl-ppc/conf/machine/mpc8536ds.conf +++ /dev/null @@ -1,19 +0,0 @@ -#@TYPE: Machine -#@Name: Freescale MPC8536DS -#@DESCRIPTION: Machine configuration for the Freescale MPC8536DS - -require e500v2.inc -require conf/machine/include/soc-family.inc - -SOC_FAMILY = "mpc8536" -BOOTFORMAT_CONFIG = "config_ddr2_512m_mpc8536ds_667M.dat" -UBOOT_MACHINES ?= "MPC8536DS MPC8536DS_36BIT MPC8536DS_NAND MPC8536DS_SDCARD MPC8536DS_SPIFLASH" -KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/mpc8536ds.dts \ - ${S}/arch/powerpc/boot/dts/mpc8536ds_36b.dts" -KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_defconfig" - -JFFS2_ERASEBLOCK = "0x20000" - -SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" -SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" -USE_VT = "0" diff --git a/meta-fsl-ppc/conf/machine/mpc8544ds.conf b/meta-fsl-ppc/conf/machine/mpc8544ds.conf deleted file mode 100644 index 71a139a9..00000000 --- a/meta-fsl-ppc/conf/machine/mpc8544ds.conf +++ /dev/null @@ -1,17 +0,0 @@ -#@TYPE: Machine -#@Name: Freescale MPC8544DS -#@DESCRIPTION: Machine configuration for the Freescale MPC8544DS - -require e500v2.inc -require conf/machine/include/soc-family.inc - -SOC_FAMILY = "mpc8544" -UBOOT_MACHINES ?= "MPC8544DS" -KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/mpc8544ds.dts" -KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_defconfig" - -JFFS2_ERASEBLOCK = "0x20000" - -SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" -SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" -USE_VT = "0" diff --git a/meta-fsl-ppc/conf/machine/mpc8548cds.conf b/meta-fsl-ppc/conf/machine/mpc8548cds.conf deleted file mode 100644 index c18da1fe..00000000 --- a/meta-fsl-ppc/conf/machine/mpc8548cds.conf +++ /dev/null @@ -1,18 +0,0 @@ -#@TYPE: Machine -#@Name: Freescale MPC8548CDS -#@DESCRIPTION: Machine configuration for the Freescale MPC8548CDS - -require e500v2.inc -require conf/machine/include/soc-family.inc - -SOC_FAMILY = "mpc8548" -UBOOT_MACHINES ?= "MPC8548CDS MPC8548CDS_36BIT" -KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/mpc8548cds_32b.dts \ - ${S}/arch/powerpc/boot/dts/mpc8548cds_36b.dts" -KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_defconfig" - -JFFS2_ERASEBLOCK = "0x20000" - -SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" -SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" -USE_VT = "0" diff --git a/meta-fsl-ppc/conf/machine/mpc8572ds.conf b/meta-fsl-ppc/conf/machine/mpc8572ds.conf deleted file mode 100644 index eb915bbe..00000000 --- a/meta-fsl-ppc/conf/machine/mpc8572ds.conf +++ /dev/null @@ -1,17 +0,0 @@ -#@TYPE: Machine -#@DESCRIPTION: Machine configuration for running - -require e500v2.inc -require conf/machine/include/soc-family.inc - -SOC_FAMILY = "mpc8572" -UBOOT_MACHINES ?= "MPC8572DS MPC8572DS_36BIT MPC8572DS_NAND" -KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/mpc8572ds.dts \ - ${S}/arch/powerpc/boot/dts/mpc8572ds_36b.dts" -KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" - -JFFS2_ERASEBLOCK = "0x20000" - -SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" -SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" -USE_VT = "0" diff --git a/meta-fsl-ppc/conf/machine/p1020mbg.conf b/meta-fsl-ppc/conf/machine/p1020mbg.conf deleted file mode 100644 index b83af81d..00000000 --- a/meta-fsl-ppc/conf/machine/p1020mbg.conf +++ /dev/null @@ -1,18 +0,0 @@ -#@TYPE: Machine -#@Name: Freescale P1020MBG -#@DESCRIPTION: Machine configuration for the Freescale P1020MBG - -require e500v2.inc -require conf/machine/include/soc-family.inc - -SOC_FAMILY = "p1020" -BOOTFORMAT_CONFIG = "config_ddr3_1gb_p1_p2_rdb_pc_800M.dat" -UBOOT_MACHINES ?= "P1020MBG-PC P1020MBG-PC_SDCARD P1020MBG-PC_36BIT P1020MBG-PC_36BIT_SDCARD" -KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p1020mbg-pc_32b.dts" -KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" - -JFFS2_ERASEBLOCK = "0x20000" - -SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" -SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" -USE_VT = "0" diff --git a/meta-fsl-ppc/conf/machine/p1020utm.conf b/meta-fsl-ppc/conf/machine/p1020utm.conf deleted file mode 100644 index 6751cd80..00000000 --- a/meta-fsl-ppc/conf/machine/p1020utm.conf +++ /dev/null @@ -1,18 +0,0 @@ -#@TYPE: Machine -#@Name: Freescale P1020UTM -#@DESCRIPTION: Machine configuration for the Freescale P1020UTM - -require e500v2.inc -require conf/machine/include/soc-family.inc - -SOC_FAMILY = "p1020" -BOOTFORMAT_CONFIG = "config_ddr3_1gb_p1_p2_rdb_pc_800M.dat" -UBOOT_MACHINES ?= "P1020UTM-PC P1020UTM-PC_SDCARD P1020UTM-PC_36BIT P1020UTM-PC_36BIT_SDCARD" -KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p1020utm-pc_32b.dts" -KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" - -JFFS2_ERASEBLOCK = "0x20000" - -SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" -SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" -USE_VT = "0" diff --git a/meta-fsl-ppc/conf/machine/p1023rds.conf b/meta-fsl-ppc/conf/machine/p1023rds.conf deleted file mode 100644 index fd79a1e8..00000000 --- a/meta-fsl-ppc/conf/machine/p1023rds.conf +++ /dev/null @@ -1,18 +0,0 @@ -#@TYPE: Machine -#@DESCRIPTION: Machine configuration for running - -require e500v2.inc -require conf/machine/include/soc-family.inc - -SOC_FAMILY = "p1023" -UBOOT_MACHINES ?= "P1023RDS P1023RDS_NAND" -KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p1023rds.dts" -KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/85xx/p1023rds_defconfig" - -PREFERRED_VERSION_fmc = "0.9.23" - -JFFS2_ERASEBLOCK = "0x10000" - -SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" -SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" -USE_VT = "0" diff --git a/meta-fsl-ppc/conf/machine/p1024rdb.conf b/meta-fsl-ppc/conf/machine/p1024rdb.conf deleted file mode 100644 index 524b9d12..00000000 --- a/meta-fsl-ppc/conf/machine/p1024rdb.conf +++ /dev/null @@ -1,18 +0,0 @@ -#@TYPE: Machine -#@Name: Freescale P1024RDB -#@DESCRIPTION: Machine configuration for the Freescale P1024RDB - -require e500v2.inc -require conf/machine/include/soc-family.inc - -SOC_FAMILY = "p1024" -BOOTFORMAT_CONFIG = "config_ddr3_1gb_p1_p2_rdb_pc_667M.dat" -UBOOT_MACHINES ?= "P1024RDB P1024RDB_36BIT P1024RDB_NAND P1024RDB_SDCARD P1024RDB_SPIFLASH" -KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p1024rdb_32b.dts" -KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" - -JFFS2_ERASEBLOCK = "0x20000" - -SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" -SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" -USE_VT = "0" diff --git a/meta-fsl-ppc/conf/machine/p1025rdb.conf b/meta-fsl-ppc/conf/machine/p1025rdb.conf deleted file mode 100644 index 18ccd2eb..00000000 --- a/meta-fsl-ppc/conf/machine/p1025rdb.conf +++ /dev/null @@ -1,18 +0,0 @@ -#@TYPE: Machine -#@Name: Freescale P1025RDB -#@DESCRIPTION: Machine configuration for the Freescale P1025RDB - -require e500v2.inc -require conf/machine/include/soc-family.inc - -SOC_FAMILY = "p1025" -BOOTFORMAT_CONFIG = "config_ddr3_1gb_p1_p2_rdb_pc_667M.dat" -UBOOT_MACHINES ?= "P1025RDB P1025RDB_36BIT P1025RDB_NAND P1025RDB_SDCARD P1025RDB_SPIFLASH" -KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p1025rdb_32b.dts" -KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" - -JFFS2_ERASEBLOCK = "0x20000" - -SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" -SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" -USE_VT = "0" -- cgit v1.2.3-54-g00ecf From 5298ebc306e25f26236a5fddfde490666e56fb93 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Thu, 4 Jul 2013 02:12:24 +0000 Subject: testfloat: mark as fsl e500v2 machine only The customized do_{compile,install} tasks are only available after applying the three patches which are e500v2 specific. Signed-off-by: Ting Liu Reviewed-by: Otavio Salvador --- meta-fsl-ppc/recipes-test/testfloat/testfloat_2a.bb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/meta-fsl-ppc/recipes-test/testfloat/testfloat_2a.bb b/meta-fsl-ppc/recipes-test/testfloat/testfloat_2a.bb index 8db41b8f..3fbb2070 100644 --- a/meta-fsl-ppc/recipes-test/testfloat/testfloat_2a.bb +++ b/meta-fsl-ppc/recipes-test/testfloat/testfloat_2a.bb @@ -6,10 +6,10 @@ LIC_FILES_CHKSUM = "file://testfloat/testfloat.txt;beginline=87;endline=95;md5=b SRC_URI = " http://www.jhauser.us/arithmetic/TestFloat-2a.tar.Z;name=TestFloat \ http://www.jhauser.us/arithmetic/SoftFloat-2b.tar.Z;name=SoftFloat \ - file://Yocto-replace-COMPILE_PREFIX-gcc.patch \ " SRC_URI_append_fslmachine = " file://SoftFloat-powerpc-1.patch \ file://TestFloat-powerpc-E500v2-SPE-1.patch \ + file://Yocto-replace-COMPILE_PREFIX-gcc.patch \ " SRC_URI[TestFloat.md5sum] = "4dc889319ae1e0c5381ec511f784553a" SRC_URI[TestFloat.sha256sum] = "84d14aa42adefbda2ec9708b42946f7fa59f93689b042684bd027863481f8e4e" @@ -41,3 +41,6 @@ do_install(){ install testfloat/powerpc-linux-gcc/testsoftfloat ${D}/${bindir} } +COMPATIBLE_HOST_e500v2 = ".*" +COMPATIBLE_HOST ?= "(none)" + -- cgit v1.2.3-54-g00ecf From c92255b9b5f443cc2b3d68104ba20675fe9aac9f Mon Sep 17 00:00:00 2001 From: Zongchun Yu Date: Thu, 4 Jul 2013 09:42:52 +0000 Subject: flib:Fix flib not found in the base feeds error To avoid error caused by empty package when build flib into rootfs. add ALLOW_EMPTY Signed-off-by: Zongchun Yu --- meta-fsl-ppc/recipes-tools/flib/flib_git.bb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/meta-fsl-ppc/recipes-tools/flib/flib_git.bb b/meta-fsl-ppc/recipes-tools/flib/flib_git.bb index 590f7246..fb3f6987 100644 --- a/meta-fsl-ppc/recipes-tools/flib/flib_git.bb +++ b/meta-fsl-ppc/recipes-tools/flib/flib_git.bb @@ -11,3 +11,5 @@ S = "${WORKDIR}/git" do_install(){ oe_runmake install DESTDIR=${D} } + +ALLOW_EMPTY_${PN} = "1" -- cgit v1.2.3-54-g00ecf From 78a2e463e9f5ee97b5d2cf1c91d4a4531eaa82d8 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Sat, 6 Jul 2013 02:27:37 +0000 Subject: busybox: drop bbappend (only set PRINC) as oe-core upgrade Signed-off-by: Ting Liu --- meta-fsl-ppc/recipes-append/busybox/busybox_1.20.2.bbappend | 2 -- 1 file changed, 2 deletions(-) delete mode 100644 meta-fsl-ppc/recipes-append/busybox/busybox_1.20.2.bbappend diff --git a/meta-fsl-ppc/recipes-append/busybox/busybox_1.20.2.bbappend b/meta-fsl-ppc/recipes-append/busybox/busybox_1.20.2.bbappend deleted file mode 100644 index 8445337a..00000000 --- a/meta-fsl-ppc/recipes-append/busybox/busybox_1.20.2.bbappend +++ /dev/null @@ -1,2 +0,0 @@ -PRINC := "${@int(PRINC) + 1}" - -- cgit v1.2.3-54-g00ecf From 4121c7b01546ad072383d92946cd54d0f87259a8 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Mon, 8 Jul 2013 11:08:16 +0800 Subject: change layout to follow oe-core guidelines of recipes Follow the rules defined in: http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/recipes.txt recipes-bsp - Anything with links to specific hardware or hardware configuration information recipes-connectivity - Libraries and applications related to communication with other devices recipes-core - What's needed to build a basic working Linux image including commonly used dependencies recipes-devtools - Tools primarily used by the build system (but can also be used on targets) recipes-extended - Applications which whilst not essential add features compared to the alternatives in core. May be needed for full tool functionality or LSB compliance. recipes-gnome - All things related to the GTK+ application framework recipes-graphics - X and other graphically related system libraries recipes-kernel - The kernel and generic applications/libraries with strong kernel dependencies recipes-lsb4 - Recipes added for the sole purpose of supporting the Linux Standard Base (LSB) 4.x recipes-multimedia - Codecs and support utilties for audio, images and video recipes-rt - Provides package and image recipes for using and testing the PREEMPT_RT kernel recipes-qt - All things related to the Qt application framework recipes-sato - The Sato demo/reference UI/UX, its associated apps and configuration recipes-support - Recipes used by other recipes but that are not directly included in images recipes-dpaa - recipes related to fsl dpaa feature recipes-virtualization - recipes related to fsl virtualization feature Signed-off-by: Ting Liu --- .../recipes-append/procps/procps_3.2.8.bbappend | 2 - .../sysvinit/sysvinit_2.88dsf.bbappend | 2 - meta-fsl-ppc/recipes-append/udev/udev_182.bbappend | 2 - .../recipes-bsp/boot-format/boot-format_git.bb | 19 + meta-fsl-ppc/recipes-bsp/rcw/rcw_git.bb | 39 + meta-fsl-ppc/recipes-bsp/u-boot/u-boot_git.bb | 139 ++ .../sysvinit/sysvinit_2.88dsf.bbappend | 2 + meta-fsl-ppc/recipes-core/udev/udev_182.bbappend | 2 + .../recipes-dpaa/eth-config/eth-config_git.bb | 19 + meta-fsl-ppc/recipes-dpaa/flib/flib_git.bb | 15 + meta-fsl-ppc/recipes-dpaa/fm-ucode/fm-ucode_git.bb | 46 + meta-fsl-ppc/recipes-dpaa/fmc/fmc_git.bb | 53 + ...ake-the-library-install-path-configurable.patch | 43 + meta-fsl-ppc/recipes-dpaa/fmlib/fmlib_git.bb | 43 + meta-fsl-ppc/recipes-dpaa/usdpaa/usdpaa_git.bb | 49 + meta-fsl-ppc/recipes-extended/cst/cst_git.bb | 29 + .../recipes-extended/procps/procps_3.2.8.bbappend | 2 + .../testfloat/files/SoftFloat-powerpc-1.patch | 1427 +++++++++++++++++ .../files/TestFloat-powerpc-E500v2-SPE-1.patch | 1644 ++++++++++++++++++++ .../files/Yocto-replace-COMPILE_PREFIX-gcc.patch | 67 + .../recipes-extended/testfloat/testfloat_2a.bb | 46 + .../recipes-extended/web-sysmon/web-sysmon_git.bb | 21 + meta-fsl-ppc/recipes-kernel/skmm/skmm_git.bb | 33 + meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb | 139 -- .../testfloat/files/SoftFloat-powerpc-1.patch | 1427 ----------------- .../files/TestFloat-powerpc-E500v2-SPE-1.patch | 1644 -------------------- .../files/Yocto-replace-COMPILE_PREFIX-gcc.patch | 67 - .../recipes-test/testfloat/testfloat_2a.bb | 46 - .../recipes-tools/boot-format/boot-format_git.bb | 19 - meta-fsl-ppc/recipes-tools/cst/cst_git.bb | 29 - .../embedded-hv/files/81-fsl-embedded-hv.rules | 2 - .../recipes-tools/embedded-hv/hypervisor_git.bb | 90 -- .../recipes-tools/eth-config/eth-config_git.bb | 19 - meta-fsl-ppc/recipes-tools/flib/flib_git.bb | 15 - meta-fsl-ppc/recipes-tools/hv-cfg/hv-cfg_git.bb | 46 - .../mux-server/files/mux-server-1.02.tar.gz | Bin 10021 -> 0 bytes .../recipes-tools/mux-server/mux-server_1.02.bb | 16 - meta-fsl-ppc/recipes-tools/rcw/rcw_git.bb | 39 - meta-fsl-ppc/recipes-tools/skmm/skmm_git.bb | 33 - meta-fsl-ppc/recipes-tools/usdpaa/usdpaa_git.bb | 49 - .../recipes-tools/web-sysmon/web-sysmon_git.bb | 21 - .../recipes-ucode/fm-ucode/fm-ucode_git.bb | 46 - meta-fsl-ppc/recipes-ucode/fmc/fmc_git.bb | 53 - ...ake-the-library-install-path-configurable.patch | 43 - meta-fsl-ppc/recipes-ucode/fmlib/fmlib_git.bb | 43 - .../recipes-virtualization/hv-cfg/hv-cfg_git.bb | 46 + .../hypervisor/files/81-fsl-embedded-hv.rules | 2 + .../hypervisor/hypervisor_git.bb | 90 ++ .../mux-server/files/mux-server-1.02.tar.gz | Bin 0 -> 10021 bytes .../mux-server/mux-server_1.02.bb | 16 + 50 files changed, 3892 insertions(+), 3892 deletions(-) delete mode 100644 meta-fsl-ppc/recipes-append/procps/procps_3.2.8.bbappend delete mode 100644 meta-fsl-ppc/recipes-append/sysvinit/sysvinit_2.88dsf.bbappend delete mode 100644 meta-fsl-ppc/recipes-append/udev/udev_182.bbappend create mode 100644 meta-fsl-ppc/recipes-bsp/boot-format/boot-format_git.bb create mode 100644 meta-fsl-ppc/recipes-bsp/rcw/rcw_git.bb create mode 100644 meta-fsl-ppc/recipes-bsp/u-boot/u-boot_git.bb create mode 100644 meta-fsl-ppc/recipes-core/sysvinit/sysvinit_2.88dsf.bbappend create mode 100644 meta-fsl-ppc/recipes-core/udev/udev_182.bbappend create mode 100644 meta-fsl-ppc/recipes-dpaa/eth-config/eth-config_git.bb create mode 100644 meta-fsl-ppc/recipes-dpaa/flib/flib_git.bb create mode 100644 meta-fsl-ppc/recipes-dpaa/fm-ucode/fm-ucode_git.bb create mode 100644 meta-fsl-ppc/recipes-dpaa/fmc/fmc_git.bb create mode 100644 meta-fsl-ppc/recipes-dpaa/fmlib/files/0001-fm-lib-make-the-library-install-path-configurable.patch create mode 100644 meta-fsl-ppc/recipes-dpaa/fmlib/fmlib_git.bb create mode 100644 meta-fsl-ppc/recipes-dpaa/usdpaa/usdpaa_git.bb create mode 100644 meta-fsl-ppc/recipes-extended/cst/cst_git.bb create mode 100644 meta-fsl-ppc/recipes-extended/procps/procps_3.2.8.bbappend create mode 100644 meta-fsl-ppc/recipes-extended/testfloat/files/SoftFloat-powerpc-1.patch create mode 100644 meta-fsl-ppc/recipes-extended/testfloat/files/TestFloat-powerpc-E500v2-SPE-1.patch create mode 100644 meta-fsl-ppc/recipes-extended/testfloat/files/Yocto-replace-COMPILE_PREFIX-gcc.patch create mode 100644 meta-fsl-ppc/recipes-extended/testfloat/testfloat_2a.bb create mode 100644 meta-fsl-ppc/recipes-extended/web-sysmon/web-sysmon_git.bb create mode 100644 meta-fsl-ppc/recipes-kernel/skmm/skmm_git.bb delete mode 100644 meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb delete mode 100644 meta-fsl-ppc/recipes-test/testfloat/files/SoftFloat-powerpc-1.patch delete mode 100644 meta-fsl-ppc/recipes-test/testfloat/files/TestFloat-powerpc-E500v2-SPE-1.patch delete mode 100644 meta-fsl-ppc/recipes-test/testfloat/files/Yocto-replace-COMPILE_PREFIX-gcc.patch delete mode 100644 meta-fsl-ppc/recipes-test/testfloat/testfloat_2a.bb delete mode 100644 meta-fsl-ppc/recipes-tools/boot-format/boot-format_git.bb delete mode 100644 meta-fsl-ppc/recipes-tools/cst/cst_git.bb delete mode 100644 meta-fsl-ppc/recipes-tools/embedded-hv/files/81-fsl-embedded-hv.rules delete mode 100644 meta-fsl-ppc/recipes-tools/embedded-hv/hypervisor_git.bb delete mode 100644 meta-fsl-ppc/recipes-tools/eth-config/eth-config_git.bb delete mode 100644 meta-fsl-ppc/recipes-tools/flib/flib_git.bb delete mode 100644 meta-fsl-ppc/recipes-tools/hv-cfg/hv-cfg_git.bb delete mode 100644 meta-fsl-ppc/recipes-tools/mux-server/files/mux-server-1.02.tar.gz delete mode 100644 meta-fsl-ppc/recipes-tools/mux-server/mux-server_1.02.bb delete mode 100644 meta-fsl-ppc/recipes-tools/rcw/rcw_git.bb delete mode 100644 meta-fsl-ppc/recipes-tools/skmm/skmm_git.bb delete mode 100644 meta-fsl-ppc/recipes-tools/usdpaa/usdpaa_git.bb delete mode 100644 meta-fsl-ppc/recipes-tools/web-sysmon/web-sysmon_git.bb delete mode 100644 meta-fsl-ppc/recipes-ucode/fm-ucode/fm-ucode_git.bb delete mode 100644 meta-fsl-ppc/recipes-ucode/fmc/fmc_git.bb delete mode 100644 meta-fsl-ppc/recipes-ucode/fmlib/files/0001-fm-lib-make-the-library-install-path-configurable.patch delete mode 100644 meta-fsl-ppc/recipes-ucode/fmlib/fmlib_git.bb create mode 100644 meta-fsl-ppc/recipes-virtualization/hv-cfg/hv-cfg_git.bb create mode 100644 meta-fsl-ppc/recipes-virtualization/hypervisor/files/81-fsl-embedded-hv.rules create mode 100644 meta-fsl-ppc/recipes-virtualization/hypervisor/hypervisor_git.bb create mode 100644 meta-fsl-ppc/recipes-virtualization/mux-server/files/mux-server-1.02.tar.gz create mode 100644 meta-fsl-ppc/recipes-virtualization/mux-server/mux-server_1.02.bb diff --git a/meta-fsl-ppc/recipes-append/procps/procps_3.2.8.bbappend b/meta-fsl-ppc/recipes-append/procps/procps_3.2.8.bbappend deleted file mode 100644 index 8445337a..00000000 --- a/meta-fsl-ppc/recipes-append/procps/procps_3.2.8.bbappend +++ /dev/null @@ -1,2 +0,0 @@ -PRINC := "${@int(PRINC) + 1}" - diff --git a/meta-fsl-ppc/recipes-append/sysvinit/sysvinit_2.88dsf.bbappend b/meta-fsl-ppc/recipes-append/sysvinit/sysvinit_2.88dsf.bbappend deleted file mode 100644 index 8445337a..00000000 --- a/meta-fsl-ppc/recipes-append/sysvinit/sysvinit_2.88dsf.bbappend +++ /dev/null @@ -1,2 +0,0 @@ -PRINC := "${@int(PRINC) + 1}" - diff --git a/meta-fsl-ppc/recipes-append/udev/udev_182.bbappend b/meta-fsl-ppc/recipes-append/udev/udev_182.bbappend deleted file mode 100644 index 8445337a..00000000 --- a/meta-fsl-ppc/recipes-append/udev/udev_182.bbappend +++ /dev/null @@ -1,2 +0,0 @@ -PRINC := "${@int(PRINC) + 1}" - diff --git a/meta-fsl-ppc/recipes-bsp/boot-format/boot-format_git.bb b/meta-fsl-ppc/recipes-bsp/boot-format/boot-format_git.bb new file mode 100644 index 00000000..ac1504d4 --- /dev/null +++ b/meta-fsl-ppc/recipes-bsp/boot-format/boot-format_git.bb @@ -0,0 +1,19 @@ +DESCRIPTION = "Boot format utility for booting from eSDHC/eSPI" +LICENSE = "GPLv2" +PR = "r6" +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" + +SRC_URI = "git://git.freescale.com/ppc/sdk/boot-format.git" +SRCREV = "d9bbfaba0c9316ae33455099c47bae429479e530" + +S = "${WORKDIR}/git" +EXTRA_OEMAKE = 'CC="${CC}"' + +do_install(){ + oe_runmake DESTDIR=${D} PREFIX=${prefix} install +} + +PACKAGES =+ "${PN}-config" +FILES_${PN}-config += "${datadir}/*" + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta-fsl-ppc/recipes-bsp/rcw/rcw_git.bb b/meta-fsl-ppc/recipes-bsp/rcw/rcw_git.bb new file mode 100644 index 00000000..c532a9d8 --- /dev/null +++ b/meta-fsl-ppc/recipes-bsp/rcw/rcw_git.bb @@ -0,0 +1,39 @@ +DESCRIPTION = "Reset Control Words (RCW)" +SECTION = "rcw" +LICENSE = "BSD" +PR = "r8" + +LIC_FILES_CHKSUM = "file://rcw.py;beginline=8;endline=28;md5=9ba0b28922dd187b06b6c8ebcfdd208e" + +# this package is specific to the machine itself +INHIBIT_DEFAULT_DEPS = "1" +PACKAGE_ARCH = "${MACHINE_ARCH}" +COMPATIBLE_HOST_fslmachine = ".*" +COMPATIBLE_HOST ?= "(none)" + +inherit deploy + +SRC_URI = "git://git.freescale.com/ppc/sdk/rcw.git" +SRCREV = "5d3c819bcca6d09dcf7b52b3f2855dda304a5997" + +S = "${WORKDIR}/git" + +do_install () { + make install + + M=`echo ${MACHINE} | sed s/-64b//g` + install -d ${D}/boot/rcw + cp -r ${S}/${M}/${M}/* ${D}/boot/rcw +} + +do_deploy () { + M=`echo ${MACHINE} | sed s/-64b//g` + install -d ${DEPLOYDIR}/rcw + cp -r ${S}/${M}/${M}/* ${DEPLOYDIR}/rcw +} +addtask deploy after do_install + +PACKAGES += "${PN}-image" +FILES_${PN}-image += "/boot" + +ALLOW_EMPTY_${PN} = "1" diff --git a/meta-fsl-ppc/recipes-bsp/u-boot/u-boot_git.bb b/meta-fsl-ppc/recipes-bsp/u-boot/u-boot_git.bb new file mode 100644 index 00000000..c3aa1053 --- /dev/null +++ b/meta-fsl-ppc/recipes-bsp/u-boot/u-boot_git.bb @@ -0,0 +1,139 @@ +DESCRIPTION = "U-boot bootloader" +HOMEPAGE = "http://u-boot.sf.net" +SECTION = "bootloaders" +PROVIDES = "virtual/bootloader" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=1707d6db1d42237583f50183a5651ecb" + +PR = "r30" +INHIBIT_DEFAULT_DEPS = "1" +DEPENDS = "boot-format-native virtual/${TARGET_PREFIX}gcc libgcc" + +inherit deploy + +SRC_URI = "git://git.freescale.com/ppc/sdk/u-boot.git" +SRCREV = "831b30de4b768f0b3b7dbfa11739b14cea612d7e" + +python () { + ml = d.getVar("MULTILIB_VARIANTS", True) + arch = d.getVar("OVERRIDES", True) + + if ("e5500-64b:" in arch or "e6500-64b:" in arch) and not "lib32" in ml: + raise bb.parse.SkipPackage("Building the u-boot for this arch requires multilib to be enabled") +} + +DEPENDS_append_e5500-64b = " lib32-gcc-cross lib32-libgcc" +PATH_append_e5500-64b = ":${STAGING_BINDIR_NATIVE}/${DEFAULTTUNE_virtclass-multilib-lib32}${TARGET_VENDOR_virtclass-multilib-lib32}-${HOST_OS}/" +TOOLCHAIN_OPTIONS_append_e5500-64b = "/../lib32-${MACHINE}" +TARGET_VENDOR_virtclass-multilib-lib32 ?= "-${DISTRO}mllib32" +WRAP_TARGET_PREFIX_e5500-64b = "powerpc${TARGET_VENDOR_virtclass-multilib-lib32}-${HOST_OS}-" + +DEPENDS_append_e6500-64b = " lib32-gcc-cross lib32-libgcc" +PATH_append_e6500-64b = ":${STAGING_BINDIR_NATIVE}/${DEFAULTTUNE_virtclass-multilib-lib32}${TARGET_VENDOR_virtclass-multilib-lib32}-${HOST_OS}/" +TOOLCHAIN_OPTIONS_append_e6500-64b = "/../lib32-${MACHINE}" +TARGET_VENDOR_virtclass-multilib-lib32 ?= "-${DISTRO}mllib32" +WRAP_TARGET_PREFIX_e6500-64b = "powerpc${TARGET_VENDOR_virtclass-multilib-lib32}-${HOST_OS}-" + +WRAP_TARGET_PREFIX = "${TARGET_PREFIX}" +EXTRA_OEMAKE = 'CROSS_COMPILE=${WRAP_TARGET_PREFIX} CC="${WRAP_TARGET_PREFIX}gcc ${TOOLCHAIN_OPTIONS}"' + +PACKAGE_ARCH = "${MACHINE_ARCH}" + +USRC ?= "" +S = '${@base_conditional("USRC", "", "${WORKDIR}/git", "${USRC}", d)}' + +do_compile () { + unset LDFLAGS + unset CFLAGS + unset CPPFLAGS + + if [ "x${UBOOT_MACHINES}" = "x" ]; then + UBOOT_MACHINES=${UBOOT_MACHINE} + fi + + for board in ${UBOOT_MACHINES}; do + oe_runmake O=${board} distclean + oe_runmake O=${board} ${board} + oe_runmake O=${board} all + + case "${board}" in + *SDCARD*) UBOOT_TARGET="u-boot-sd";; + *SPIFLASH*) UBOOT_TARGET="u-boot-spi";; + *NAND*) UBOOT_TARGET="u-boot-nand";; + *) UBOOT_TARGET="";; + esac + + if [ "x${UBOOT_TARGET}" != "x" ]; then + if [ "${UBOOT_TARGET}" = "u-boot-sd" ]; then + cp ${S}/${board}/u-boot.bin ${S}/${board}/${UBOOT_TARGET}.bin + elif [ "${UBOOT_TARGET}" = "u-boot-nand" ];then + if [ "${DEFAULTTUNE}" = "ppce500v2" ];then + if echo $board |egrep "(P1010RDB|P1020RDB|P1021RDB|P1024RDB|P2020RDB|P1022DS|P1025RDB|BSC9131RDB|BSC9132QDS)" 2>&1 >/dev/null;then + cp ${S}/${board}/u-boot-with-spl.bin ${S}/${board}/${UBOOT_TARGET}.bin + fi + else + cp ${S}/${board}/u-boot.bin ${S}/${board}/${UBOOT_TARGET}.bin + fi + else + if [ -n "${BOOTFORMAT_CONFIG}" ];then + ${STAGING_BINDIR_NATIVE}/boot_format \ + ${STAGING_DATADIR_NATIVE}/boot_format/${BOOTFORMAT_CONFIG} \ + ${S}/${board}/u-boot.bin -spi ${S}/${board}/${UBOOT_TARGET}.bin + else + cp ${S}/${board}/u-boot.bin ${S}/${board}/${UBOOT_TARGET}.bin + fi + fi + fi + done +} + +do_install(){ + if [ "x${UBOOT_MACHINES}" = "x" ]; then + UBOOT_MACHINES=${UBOOT_MACHINE} + fi + + for board in ${UBOOT_MACHINES}; do + case "${board}" in + *SDCARD*) UBOOT_TARGET="u-boot-sd";; + *SPIFLASH*) UBOOT_TARGET="u-boot-spi";; + *NAND*) UBOOT_TARGET="u-boot-nand";; + *) UBOOT_TARGET="u-boot";; + esac + + if [ -f ${S}/${board}/${UBOOT_TARGET}.bin ]; then + mkdir -p ${D}/boot/ + install ${S}/${board}/${UBOOT_TARGET}.bin ${D}/boot/${UBOOT_TARGET}-${board}-${PV}-${PR}.bin + ln -sf ${UBOOT_TARGET}-${board}-${PV}-${PR}.bin ${D}/boot/${UBOOT_TARGET}.bin + fi + done +} + +do_deploy(){ + if [ "x${UBOOT_MACHINES}" = "x" ]; then + UBOOT_MACHINES=${UBOOT_MACHINE} + fi + + for board in ${UBOOT_MACHINES}; do + case "${board}" in + *SDCARD*) UBOOT_TARGET="u-boot-sd";; + *SPIFLASH*) UBOOT_TARGET="u-boot-spi";; + *NAND*) UBOOT_TARGET="u-boot-nand";; + *) UBOOT_TARGET="u-boot";; + esac + + if [ -f ${S}/${board}/${UBOOT_TARGET}.bin ]; then + mkdir -p ${DEPLOYDIR} + install ${S}/${board}/${UBOOT_TARGET}.bin ${DEPLOYDIR}/${UBOOT_TARGET}-${board}-${PV}-${PR}.bin + + cd ${DEPLOYDIR} + rm -f ${UBOOT_TARGET}-${board}.bin + ln -sf ${UBOOT_TARGET}-${board}-${PV}-${PR}.bin ${UBOOT_TARGET}-${board}.bin + fi + done +} +addtask deploy after do_install + +PACKAGES += "${PN}-images" +FILES_${PN}-images += "/boot" + +ALLOW_EMPTY_${PN} = "1" diff --git a/meta-fsl-ppc/recipes-core/sysvinit/sysvinit_2.88dsf.bbappend b/meta-fsl-ppc/recipes-core/sysvinit/sysvinit_2.88dsf.bbappend new file mode 100644 index 00000000..8445337a --- /dev/null +++ b/meta-fsl-ppc/recipes-core/sysvinit/sysvinit_2.88dsf.bbappend @@ -0,0 +1,2 @@ +PRINC := "${@int(PRINC) + 1}" + diff --git a/meta-fsl-ppc/recipes-core/udev/udev_182.bbappend b/meta-fsl-ppc/recipes-core/udev/udev_182.bbappend new file mode 100644 index 00000000..8445337a --- /dev/null +++ b/meta-fsl-ppc/recipes-core/udev/udev_182.bbappend @@ -0,0 +1,2 @@ +PRINC := "${@int(PRINC) + 1}" + diff --git a/meta-fsl-ppc/recipes-dpaa/eth-config/eth-config_git.bb b/meta-fsl-ppc/recipes-dpaa/eth-config/eth-config_git.bb new file mode 100644 index 00000000..ac25013a --- /dev/null +++ b/meta-fsl-ppc/recipes-dpaa/eth-config/eth-config_git.bb @@ -0,0 +1,19 @@ +DESCRIPTION = "Ethernet Configuration Files" +SECTION = "eth-config" +LICENSE = "Freescale-EULA" +LIC_FILES_CHKSUM = "file://COPYING;md5=cf02dc8eb5ac4a76f3812826520dea87" + +PR = "r2" + +SRC_URI = "git://git.freescale.com/ppc/sdk/eth-config.git" +SRCREV = "c255231fb606bff18390da3b26e1ee9fca55e4e6" + +S = "${WORKDIR}/git" + +do_install() { + install -d ${D}/etc/fmc/config + install -m 644 ${S}/*.xml ${D}/etc/fmc/config + install -d ${D}/etc/fmc/config/shared_mac + install -m 644 ${S}/shared_mac/*.xml ${D}/etc/fmc/config/shared_mac + install -m 644 ${S}/shared_mac/README ${D}/etc/fmc/config/shared_mac +} diff --git a/meta-fsl-ppc/recipes-dpaa/flib/flib_git.bb b/meta-fsl-ppc/recipes-dpaa/flib/flib_git.bb new file mode 100644 index 00000000..fb3f6987 --- /dev/null +++ b/meta-fsl-ppc/recipes-dpaa/flib/flib_git.bb @@ -0,0 +1,15 @@ +DESCRIPTION = "Foundation Library" +SECTION = "flib" +LICENSE = "BSD & GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=3f16fa8e677e45af3127c5c4bafc3c00" + +SRC_URI = "git://git.freescale.com/ppc/sdk/flib.git" +SRCREV = "ff692ad3c286a07717c6677177825889fe17d450" + +S = "${WORKDIR}/git" + +do_install(){ + oe_runmake install DESTDIR=${D} +} + +ALLOW_EMPTY_${PN} = "1" diff --git a/meta-fsl-ppc/recipes-dpaa/fm-ucode/fm-ucode_git.bb b/meta-fsl-ppc/recipes-dpaa/fm-ucode/fm-ucode_git.bb new file mode 100644 index 00000000..76d00b99 --- /dev/null +++ b/meta-fsl-ppc/recipes-dpaa/fm-ucode/fm-ucode_git.bb @@ -0,0 +1,46 @@ +DESCRIPTION = "Fman microcode binary" +SECTION = "fm-ucode" +LICENSE = "Freescale-EULA" +LIC_FILES_CHKSUM = "file://EULA;md5=60037ccba533a5995e8d1a838d85799c" + +PR = "r1" + +COMPATIBLE_MACHINE = "(p1023rdb|p2041rdb|p3041ds|p4080ds|p5020ds|p5040ds|p5020ds-64b|p5040ds-64b|b4420qds|b4420qds-64b|b4860qds|b4860qds-64b|t4160qds|t4160qds-64b|t4240qds|t4240qds-64b)" +inherit deploy + +SRC_URI = "git://git.freescale.com/ppc/sdk/fm-ucode.git" +SRCREV = "4ca0e41de225b34962e1517c2c75bbb31a381e1a" + +S = "${WORKDIR}/git" + +ALLOW_EMPTY_${PN} = "1" +do_install () { + case ${MACHINE} in + b4420qds|b4420qds-64b|b4860qds|b4860qds-64b) UCODE=b4860qds;; + t4240qds|t4240qds-64b|t4160qds|t4160qds-64b) UCODE=t4240qds;; + p5020ds|p5020ds-64b) UCODE=p5020ds;; + p5040ds|p5040ds-64b) UCODE=p5040ds;; + *) UCODE=${MACHINE};; + esac + UCODE=`echo $UCODE | sed -e 's,[a-zA-Z]*$,,'` + install -d ${D}/boot + install -m 644 fsl_fman_ucode_${UCODE}*.bin ${D}/boot/ +} + +do_deploy () { + case ${MACHINE} in + b4420qds|b4420qds-64b|b4860qds|b4860qds-64b) UCODE=b4860qds;; + t4240qds|t4240qds-64b|t4160qds|t4160qds-64b) UCODE=t4240qds;; + p5020ds|p5020ds-64b) UCODE=p5020ds;; + p5040ds|p5040ds-64b) UCODE=p5040ds;; + *) UCODE=${MACHINE};; + esac + UCODE=`echo $UCODE | sed -e 's,[a-zA-Z]*$,,'` + install -d ${DEPLOYDIR}/ + install -m 644 fsl_fman_ucode_${UCODE}*.bin ${DEPLOYDIR}/ +} +addtask deploy before do_build after do_install + +PACKAGES += "${PN}-image" +FILES_${PN}-image += "/boot" + diff --git a/meta-fsl-ppc/recipes-dpaa/fmc/fmc_git.bb b/meta-fsl-ppc/recipes-dpaa/fmc/fmc_git.bb new file mode 100644 index 00000000..20f93f65 --- /dev/null +++ b/meta-fsl-ppc/recipes-dpaa/fmc/fmc_git.bb @@ -0,0 +1,53 @@ +DESCRIPTION = "Frame Manager Configuration tool" +SECTION = "fmc" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://COPYING;md5=a504ab5a8ff235e67c7301214749346c" + +PR = "r2" + +SRC_URI = "git://git.freescale.com/ppc/sdk/fmc.git" +SRCREV = "f2e1a831a96f1d04d3d5a5970d2e54c38098cf39" + +DEPENDS = "libxml2 fmlib tclap" + +PACKAGE_ARCH = "${MACHINE_ARCH}" + +S = "${WORKDIR}/git" + +EXTRA_OEMAKE = 'FMD_USPACE_HEADER_PATH="${STAGING_INCDIR}/fmd" \ + FMD_USPACE_LIB_PATH="${STAGING_LIBDIR}" LIBXML2_HEADER_PATH="${STAGING_INCDIR}/libxml2" \ + TCLAP_HEADER_PATH="${STAGING_INCDIR}" ' +EXTRA_OEMAKE_virtclass-native = 'FMCHOSTMODE=1 FMD_USPACE_HEADER_PATH="${STAGING_INCDIR}/fmd" \ + FMD_USPACE_LIB_PATH="${STAGING_LIBDIR}" LIBXML2_HEADER_PATH="${STAGING_INCDIR}/libxml2" \ + TCLAP_HEADER_PATH="${STAGING_INCDIR}" ' + +PARALLEL_MAKE = "" + +do_compile () { + if [ "b4860qds" = "${MACHINE}" ] || [ "b4420qds" = "${MACHINE}" ];then + EXTRA_OEMAKE_PLATFORM="b4860qds" + elif [ "t4240qds" = "${MACHINE}" ] || [ "t4160qds" = "${MACHINE}" ];then + EXTRA_OEMAKE_PLATFORM="t4240qds" + elif [ "p1023rds" = "${MACHINE}" ];then + EXTRA_OEMAKE_PLATFORM="p1023rds" + else + EXTRA_OEMAKE_PLATFORM="" + fi + oe_runmake MACHINE=${EXTRA_OEMAKE_PLATFORM} -C source +} + +do_install () { + install -d ${D}/${bindir} + install -m 755 ${S}/source/fmc ${D}/${bindir}/fmc + + install -d ${D}/etc/fmc/config + install -m 644 ${S}/etc/fmc/config/hxs_pdl_v3.xml ${D}/etc/fmc/config + + install -d ${D}/${includedir}/fmc + install ${S}/source/fmc.h ${D}/${includedir}/fmc + + install -d ${D}/${libdir} + install ${S}/source/libfmc.a ${D}/${libdir} +} + +BBCLASSEXTEND = "native" diff --git a/meta-fsl-ppc/recipes-dpaa/fmlib/files/0001-fm-lib-make-the-library-install-path-configurable.patch b/meta-fsl-ppc/recipes-dpaa/fmlib/files/0001-fm-lib-make-the-library-install-path-configurable.patch new file mode 100644 index 00000000..4894ce3b --- /dev/null +++ b/meta-fsl-ppc/recipes-dpaa/fmlib/files/0001-fm-lib-make-the-library-install-path-configurable.patch @@ -0,0 +1,43 @@ +From 67b539d256520f95f3c8101f4605ea6d496982df Mon Sep 17 00:00:00 2001 +From: Zhenhua Luo +Date: Thu, 18 Oct 2012 17:28:00 +0300 +Subject: [PATCH] fm-lib: make the library install path configurable + +currently library for both 32bit target and 64bit target +is installed in /usr/lib folder, add a variable to make the +install path configurable + +Signed-off-by: Zhenhua Luo +--- + Makefile | 8 +++++--- + 1 file changed, 5 insertions(+), 3 deletions(-) + +diff --git a/Makefile b/Makefile +index 06fe930..d59f44a 100644 +--- a/Makefile ++++ b/Makefile +@@ -59,6 +59,8 @@ endif + + INSTALL?=install + ++LIB_DEST_DIR?=$(PREFIX)/lib ++ + # Don't forget to increment .version before doing a new release! + FM_LIB_VERSION:=$(shell cat .version) + +@@ -118,9 +120,9 @@ archive: all .version + + install-%: %.a + @(echo "Installing...") +- @($(INSTALL) -d $(DESTDIR)$(PREFIX)/lib) +- @($(INSTALL) $< $(DESTDIR)$(PREFIX)/lib) +- @(ln -s $(DESTDIR)$(PREFIX)/lib/$< $(DESTDIR)$(PREFIX)/lib/libfm.a) ++ @($(INSTALL) -d $(DESTDIR)$(LIB_DEST_DIR)) ++ @($(INSTALL) $< $(DESTDIR)$(LIB_DEST_DIR)) ++ @(ln -s $(DESTDIR)$(LIB_DEST_DIR)/$< $(DESTDIR)$(LIB_DEST_DIR)/libfm.a) + @(cp -r -p ./include $(DESTDIR)$(PREFIX)) + @($(INSTALL) -d $(DESTDIR)$(PREFIX)/share/doc/fm-lib-$(FM_LIB_VERSION)) + @($(INSTALL) $(FM_LIB_DOCFILES) $(DESTDIR)$(PREFIX)/share/doc/fm-lib-$(FM_LIB_VERSION)) +-- +1.7.9.5 + diff --git a/meta-fsl-ppc/recipes-dpaa/fmlib/fmlib_git.bb b/meta-fsl-ppc/recipes-dpaa/fmlib/fmlib_git.bb new file mode 100644 index 00000000..7a7b8f26 --- /dev/null +++ b/meta-fsl-ppc/recipes-dpaa/fmlib/fmlib_git.bb @@ -0,0 +1,43 @@ +DESCRIPTION = "Frame Manager User Space Library" +SECTION = "fman" +LICENSE = "BSD & GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=3f16fa8e677e45af3127c5c4bafc3c00" + +PR = "r1" + +DEPENDS = "linux-libc-headers" +DEPENDS_virtclass-native = "" + +SRC_URI = "git://git.freescale.com/ppc/sdk/fmlib.git" +SRCREV = "7d843485bdac963d98f81773c0f3cb15936e09da" + +S = "${WORKDIR}/git" + +TARGET_ARCH_FMLIB = "${DEFAULTTUNE}" +TARGET_ARCH_FMLIB_e5500 = "ppc32e5500" +TARGET_ARCH_FMLIB_e6500 = "ppc32e6500" +COMPATIBLE_HOST_fslmachine = ".*" +COMPATIBLE_HOST ?= "(none)" + +EXTRA_OEMAKE = "DESTDIR=${D} PREFIX=${prefix} LIB_DEST_DIR=${libdir} \ + CROSS_COMPILE=${TARGET_PREFIX} KERNEL_SRC=${STAGING_EXECPREFIXDIR}" + +do_compile () { + oe_runmake libfm-${TARGET_ARCH_FMLIB}.a +} + +do_compile_virtclass-native () { +} + +do_install () { + oe_runmake install-libfm-${TARGET_ARCH_FMLIB} +} + +do_install_virtclass-native () { + install -d ${D}/${includedir} + cp -rf ${S}/include/* ${D}/${includedir} +} + +ALLOW_EMPTY_${PN} = "1" + +BBCLASSEXTEND = "native" diff --git a/meta-fsl-ppc/recipes-dpaa/usdpaa/usdpaa_git.bb b/meta-fsl-ppc/recipes-dpaa/usdpaa/usdpaa_git.bb new file mode 100644 index 00000000..48e860f7 --- /dev/null +++ b/meta-fsl-ppc/recipes-dpaa/usdpaa/usdpaa_git.bb @@ -0,0 +1,49 @@ +DESCRIPTION = "User-Space Data-Path Acceleration Architecture drivers" +LICENSE = "BSD & GPLv2" +LIC_FILES_CHKSUM = "file://Makefile;endline=30;md5=39e58bedc879163c9338596e52df5b1f" +PR = "r4" + +inherit pkgconfig + +DEPENDS = "libxml2 libedit ncurses readline flib fmc" +RDEPENDS_${PN} = "libgcc bash" + +SRC_URI = "git://git.freescale.com/ppc/sdk/usdpaa.git" +SRCREV = "97fe45d9697ef339e10a1885539b23fa7fcb113e" + +S = "${WORKDIR}/git" + +EXTRA_OEMAKE = 'CC="${CC}" LD="${LD}" AR="${AR}"' +export ARCH="${TARGET_ARCH}" + +do_compile_prepend () { + case ${MACHINE} in + b4420qds|b4420qds-64b|b4860qds|b4860qds-64b) SOC=B4860;; + t4240qds|t4240qds-64b) SOC=T4240;; + p1023rdb) SOC=P1023;; + *) SOC=P4080;; + esac + export FMC_EXTRA_CFLAGS="-I ${STAGING_INCDIR}/fmc" + export FMLIB_EXTRA_CFLAGS="-I ${STAGING_INCDIR}/fmd \ + -I ${STAGING_INCDIR}/fmd/Peripherals \ + -I ${STAGING_INCDIR}/fmd/integrations \ + -D $SOC" + + export LIBXML2_CFLAGS="$(pkg-config --cflags libxml-2.0)" + export LIBXML2_LDFLAGS="$(pkg-config --libs --static libxml-2.0)" + export LIBEDIT_CFLAGS="$(pkg-config --cflags libedit)" + export LIBEDIT_LDFLAGS="$(pkg-config --libs --static libedit)" +} + +do_install () { + oe_runmake install DESTDIR=${D} +} + +PARALLEL_MAKE_pn-${PN} = "" +FILES_${PN} += "/root/SOURCE_THIS /usr/etc/" + +PACKAGE_ARCH = "${MACHINE_ARCH}" + +COMPATIBLE_HOST_fslmachine = ".*" +COMPATIBLE_HOST ?= "(none)" + diff --git a/meta-fsl-ppc/recipes-extended/cst/cst_git.bb b/meta-fsl-ppc/recipes-extended/cst/cst_git.bb new file mode 100644 index 00000000..177f23ce --- /dev/null +++ b/meta-fsl-ppc/recipes-extended/cst/cst_git.bb @@ -0,0 +1,29 @@ +DESCRIPTION = "CST Tool" +SECTION = "cst" +LICENSE = "BSD" + +# TODO: fix license - this file is not a license +LIC_FILES_CHKSUM = "file://RELEASENOTES;beginline=8;endline=43;md5=5a7b22a2c96b5f94e0498c5f413aa8d3" + +DEPENDS += "openssl" + +SRC_URI = "git://git.freescale.com/ppc/sdk/cst.git" +SRCREV = "e4035cbf54ed481147c6ae65c741ef75dc9ec37f" + +S = "${WORKDIR}/git" + +EXTRA_OEMAKE = 'OPENSSL_LIB_PATH=${STAGING_LIBDIR} OPENSSL_INC_PATH=${STAGING_INCDIR} CC="${CC}" LD="${CC}" LDFLAGS="${LDFLAGS}"' + +do_install () { + install -d ${D}/${bindir}/cst + install -m 755 ${S}/gen_keys ${D}/${bindir}/cst/ + install -m 755 ${S}/gen_otpmk ${D}/${bindir}/cst/ + install -m 755 ${S}/uni_cfsign ${D}/${bindir}/cst/ + install -m 755 ${S}/uni_sign ${D}/${bindir}/cst/ + cp -rf ${S}/input_files ${D}/${bindir}/cst +} + +BBCLASSEXTEND = "native nativesdk" +PARALLEL_MAKE = "" + +FILES_${PN}-dbg += "${bindir}/cst/.debug" diff --git a/meta-fsl-ppc/recipes-extended/procps/procps_3.2.8.bbappend b/meta-fsl-ppc/recipes-extended/procps/procps_3.2.8.bbappend new file mode 100644 index 00000000..8445337a --- /dev/null +++ b/meta-fsl-ppc/recipes-extended/procps/procps_3.2.8.bbappend @@ -0,0 +1,2 @@ +PRINC := "${@int(PRINC) + 1}" + diff --git a/meta-fsl-ppc/recipes-extended/testfloat/files/SoftFloat-powerpc-1.patch b/meta-fsl-ppc/recipes-extended/testfloat/files/SoftFloat-powerpc-1.patch new file mode 100644 index 00000000..b6db2de2 --- /dev/null +++ b/meta-fsl-ppc/recipes-extended/testfloat/files/SoftFloat-powerpc-1.patch @@ -0,0 +1,1427 @@ +This patch adds PowerPC support in SoftFloat. + +Signed-off-by: Ebony Zhu +Signed-off-by: Liu Yu +--- + SoftFloat-2b/processors/powerpc-GCC.h | 87 ++++ + SoftFloat-2b/softfloat/bits32/powerpc-GCC/Makefile | 26 ++ + SoftFloat-2b/softfloat/bits32/powerpc-GCC/milieu.h | 55 +++ + .../bits32/powerpc-GCC/softfloat-specialize | 252 ++++++++++++ + .../softfloat/bits32/powerpc-GCC/softfloat.h | 155 +++++++ + SoftFloat-2b/softfloat/bits64/powerpc-GCC/Makefile | 24 ++ + SoftFloat-2b/softfloat/bits64/powerpc-GCC/milieu.h | 55 +++ + .../bits64/powerpc-GCC/softfloat-specialize | 422 ++++++++++++++++++++ + .../softfloat/bits64/powerpc-GCC/softfloat.h | 269 +++++++++++++ + 9 files changed, 1345 insertions(+), 0 deletions(-) + create mode 100644 SoftFloat-2b/processors/powerpc-GCC.h + create mode 100644 SoftFloat-2b/softfloat/bits32/powerpc-GCC/Makefile + create mode 100644 SoftFloat-2b/softfloat/bits32/powerpc-GCC/milieu.h + create mode 100644 SoftFloat-2b/softfloat/bits32/powerpc-GCC/softfloat-specialize + create mode 100644 SoftFloat-2b/softfloat/bits32/powerpc-GCC/softfloat.h + create mode 100644 SoftFloat-2b/softfloat/bits64/powerpc-GCC/Makefile + create mode 100644 SoftFloat-2b/softfloat/bits64/powerpc-GCC/milieu.h + create mode 100644 SoftFloat-2b/softfloat/bits64/powerpc-GCC/softfloat-specialize + create mode 100644 SoftFloat-2b/softfloat/bits64/powerpc-GCC/softfloat.h + +diff --git a/SoftFloat-2b/processors/powerpc-GCC.h b/SoftFloat-2b/processors/powerpc-GCC.h +new file mode 100644 +index 0000000..002a786 +--- /dev/null ++++ b/SoftFloat-2b/processors/powerpc-GCC.h +@@ -0,0 +1,87 @@ ++/* ++ * This file is derived from processors/386-gcc.h, ++ * the copyright for that material belongs to the original owners. ++ * ++ * Additional material and changes where applicable is: ++ * Copyright (C) 2008 Freescale Semiconductor, Inc. All rights reserved. ++ * ++ * Author: Ebony Zhu, ++ * Yu Liu, ++ * ++ * THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort has ++ * been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT TIMES ++ * RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO PERSONS ++ * AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ALL LOSSES, ++ * COSTS, OR OTHER PROBLEMS THEY INCUR DUE TO THE SOFTWARE, AND WHO FURTHERMORE ++ * EFFECTIVELY INDEMNIFY JOHN HAUSER AND THE INTERNATIONAL COMPUTER SCIENCE ++ * INSTITUTE (possibly via similar legal warning) AGAINST ALL LOSSES, COSTS, OR ++ * OTHER PROBLEMS INCURRED BY THEIR CUSTOMERS AND CLIENTS DUE TO THE SOFTWARE. ++ */ ++ ++/*---------------------------------------------------------------------------- ++| One of the macros `BIGENDIAN' or `LITTLEENDIAN' must be defined. ++*----------------------------------------------------------------------------*/ ++#define BIGENDIAN ++ ++/*---------------------------------------------------------------------------- ++| The macro `BITS64' can be defined to indicate that 64-bit integer types are ++| supported by the compiler. ++*----------------------------------------------------------------------------*/ ++#define BITS32 ++ ++/*---------------------------------------------------------------------------- ++| Each of the following `typedef's defines the most convenient type that holds ++| integers of at least as many bits as specified. For example, `uint8' should ++| be the most convenient type that can hold unsigned integers of as many as ++| 8 bits. The `flag' type must be able to hold either a 0 or 1. For most ++| implementations of C, `flag', `uint8', and `int8' should all be `typedef'ed ++| to the same as `int'. ++*----------------------------------------------------------------------------*/ ++typedef int flag; ++typedef int uint8; ++typedef int int8; ++typedef int uint16; ++typedef int int16; ++typedef unsigned int uint32; ++typedef signed int int32; ++#ifdef BITS64 ++typedef unsigned long long int uint64; ++typedef signed long long int int64; ++#endif ++ ++/*---------------------------------------------------------------------------- ++| Each of the following `typedef's defines a type that holds integers ++| of _exactly_ the number of bits specified. For instance, for most ++| implementation of C, `bits16' and `sbits16' should be `typedef'ed to ++| `unsigned short int' and `signed short int' (or `short int'), respectively. ++*----------------------------------------------------------------------------*/ ++typedef unsigned char bits8; ++typedef signed char sbits8; ++typedef unsigned short int bits16; ++typedef signed short int sbits16; ++typedef unsigned int bits32; ++typedef signed int sbits32; ++#ifdef BITS64 ++typedef unsigned long long int bits64; ++typedef signed long long int sbits64; ++#endif ++ ++#ifdef BITS64 ++/*---------------------------------------------------------------------------- ++| The `LIT64' macro takes as its argument a textual integer literal and ++| if necessary ``marks'' the literal as having a 64-bit integer type. ++| For example, the GNU C Compiler (`gcc') requires that 64-bit literals be ++| appended with the letters `LL' standing for `long long', which is `gcc's ++| name for the 64-bit integer type. Some compilers may allow `LIT64' to be ++| defined as the identity macro: `#define LIT64( a ) a'. ++*----------------------------------------------------------------------------*/ ++#define LIT64( a ) a##LL ++#endif ++ ++/*---------------------------------------------------------------------------- ++| The macro `INLINE' can be used before functions that should be inlined. If ++| a compiler does not support explicit inlining, this macro should be defined ++| to be `static'. ++*----------------------------------------------------------------------------*/ ++#define INLINE extern inline ++ +diff --git a/SoftFloat-2b/softfloat/bits32/powerpc-GCC/Makefile b/SoftFloat-2b/softfloat/bits32/powerpc-GCC/Makefile +new file mode 100644 +index 0000000..28f1e33 +--- /dev/null ++++ b/SoftFloat-2b/softfloat/bits32/powerpc-GCC/Makefile +@@ -0,0 +1,26 @@ ++ ++PROCESSOR_H = ../../../processors/powerpc-GCC.h ++SOFTFLOAT_MACROS = ../softfloat-macros ++ ++OBJ = .o ++EXE = ++INCLUDES = -I. -I.. ++COMPILE_C = $(COMPILE_PREFIX)gcc -msoft-float -c -o $@ $(INCLUDES) -I- -O2 ++LINK = $(COMPILE_PREFIX)gcc -o $@ ++ ++ALL: softfloat$(OBJ) timesoftfloat$(EXE) ++ ++milieu.h: $(PROCESSOR_H) ++ touch milieu.h ++ ++softfloat$(OBJ): milieu.h softfloat.h softfloat-specialize $(SOFTFLOAT_MACROS) ../softfloat.c ++ $(COMPILE_C) ../softfloat.c ++ ++timesoftfloat$(OBJ): milieu.h softfloat.h ../timesoftfloat.c ++ $(COMPILE_C) ../timesoftfloat.c ++ ++timesoftfloat$(EXE): softfloat$(OBJ) timesoftfloat$(OBJ) ++ $(LINK) softfloat$(OBJ) timesoftfloat$(OBJ) ++ ++clean: ++ rm -f *.o timesoftfloat$(EXE) +diff --git a/SoftFloat-2b/softfloat/bits32/powerpc-GCC/milieu.h b/SoftFloat-2b/softfloat/bits32/powerpc-GCC/milieu.h +new file mode 100644 +index 0000000..d8b6012 +--- /dev/null ++++ b/SoftFloat-2b/softfloat/bits32/powerpc-GCC/milieu.h +@@ -0,0 +1,55 @@ ++/* ++ * This file is derived from softfloat/bits32/386-Win32-GCC/milieu.h, ++ * the copyright for that material belongs to the original owners. ++ * ++ * Additional material and changes where applicable is: ++ * Copyright (C) 2008 Freescale Semiconductor, Inc. All rights reserved. ++ * ++ * Author: Ebony Zhu, ++ * Yu Liu, ++ */ ++ ++/*============================================================================ ++ ++This C header file is part of the SoftFloat IEC/IEEE Floating-point Arithmetic ++Package, Release 2b. ++ ++Written by John R. Hauser. This work was made possible in part by the ++International Computer Science Institute, located at Suite 600, 1947 Center ++Street, Berkeley, California 94704. Funding was partially provided by the ++National Science Foundation under grant MIP-9311980. The original version ++of this code was written as part of a project to build a fixed-point vector ++processor in collaboration with the University of California at Berkeley, ++overseen by Profs. Nelson Morgan and John Wawrzynek. More information ++is available through the Web page `http://www.cs.berkeley.edu/~jhauser/ ++arithmetic/SoftFloat.html'. ++ ++THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort has ++been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT TIMES ++RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO PERSONS ++AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ALL LOSSES, ++COSTS, OR OTHER PROBLEMS THEY INCUR DUE TO THE SOFTWARE, AND WHO FURTHERMORE ++EFFECTIVELY INDEMNIFY JOHN HAUSER AND THE INTERNATIONAL COMPUTER SCIENCE ++INSTITUTE (possibly via similar legal warning) AGAINST ALL LOSSES, COSTS, OR ++OTHER PROBLEMS INCURRED BY THEIR CUSTOMERS AND CLIENTS DUE TO THE SOFTWARE. ++ ++Derivative works are acceptable, even for commercial purposes, so long as ++(1) the source code for the derivative work includes prominent notice that ++the work is derivative, and (2) the source code includes prominent notice with ++these four paragraphs for those parts of this code that are retained. ++ ++=============================================================================*/ ++ ++/*---------------------------------------------------------------------------- ++| Include common integer types and flags. ++*----------------------------------------------------------------------------*/ ++#include "../../../processors/powerpc-GCC.h" ++ ++/*---------------------------------------------------------------------------- ++| Symbolic Boolean literals. ++*----------------------------------------------------------------------------*/ ++enum { ++ FALSE = 0, ++ TRUE = 1 ++}; ++ +diff --git a/SoftFloat-2b/softfloat/bits32/powerpc-GCC/softfloat-specialize b/SoftFloat-2b/softfloat/bits32/powerpc-GCC/softfloat-specialize +new file mode 100644 +index 0000000..fd2caa4 +--- /dev/null ++++ b/SoftFloat-2b/softfloat/bits32/powerpc-GCC/softfloat-specialize +@@ -0,0 +1,252 @@ ++/* ++ * This file is derived from softfloat/bits32/386-Win32-GCC/softfloat-specialize, ++ * the copyright for that material belongs to the original owners. ++ * ++ * Additional material and changes where applicable is: ++ * Copyright (C) 2008 Freescale Semiconductor, Inc. All rights reserved. ++ * ++ * Author: Ebony Zhu, ++ * Yu Liu, ++ */ ++ ++/*============================================================================ ++ ++This C source fragment is part of the SoftFloat IEC/IEEE Floating-point ++Arithmetic Package, Release 2b. ++ ++Written by John R. Hauser. This work was made possible in part by the ++International Computer Science Institute, located at Suite 600, 1947 Center ++Street, Berkeley, California 94704. Funding was partially provided by the ++National Science Foundation under grant MIP-9311980. The original version ++of this code was written as part of a project to build a fixed-point vector ++processor in collaboration with the University of California at Berkeley, ++overseen by Profs. Nelson Morgan and John Wawrzynek. More information ++is available through the Web page `http://www.cs.berkeley.edu/~jhauser/ ++arithmetic/SoftFloat.html'. ++ ++THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort has ++been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT TIMES ++RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO PERSONS ++AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ALL LOSSES, ++COSTS, OR OTHER PROBLEMS THEY INCUR DUE TO THE SOFTWARE, AND WHO FURTHERMORE ++EFFECTIVELY INDEMNIFY JOHN HAUSER AND THE INTERNATIONAL COMPUTER SCIENCE ++INSTITUTE (possibly via similar legal warning) AGAINST ALL LOSSES, COSTS, OR ++OTHER PROBLEMS INCURRED BY THEIR CUSTOMERS AND CLIENTS DUE TO THE SOFTWARE. ++ ++Derivative works are acceptable, even for commercial purposes, so long as ++(1) the source code for the derivative work includes prominent notice that ++the work is derivative, and (2) the source code includes prominent notice with ++these four paragraphs for those parts of this code that are retained. ++ ++=============================================================================*/ ++ ++/*---------------------------------------------------------------------------- ++| Underflow tininess-detection mode, statically initialized to default value. ++| (The declaration in `softfloat.h' must match the `int8' type here.) ++*----------------------------------------------------------------------------*/ ++int8 float_detect_tininess = float_tininess_after_rounding; ++ ++/*---------------------------------------------------------------------------- ++| Raises the exceptions specified by `flags'. Floating-point traps can be ++| defined here if desired. It is currently not possible for such a trap ++| to substitute a result value. If traps are not implemented, this routine ++| should be simply `float_exception_flags |= flags;'. ++*----------------------------------------------------------------------------*/ ++ ++void float_raise( int8 flags ) ++{ ++ ++ float_exception_flags |= flags; ++ ++} ++ ++/*---------------------------------------------------------------------------- ++| Internal canonical NaN format. ++*----------------------------------------------------------------------------*/ ++typedef struct { ++ flag sign; ++ bits32 high, low; ++} commonNaNT; ++ ++/*---------------------------------------------------------------------------- ++| The pattern for a default generated single-precision NaN. ++*----------------------------------------------------------------------------*/ ++enum { ++ float32_default_nan = 0xFFFFFFFF ++}; ++ ++/*---------------------------------------------------------------------------- ++| Returns 1 if the single-precision floating-point value `a' is a NaN; ++| otherwise returns 0. ++*----------------------------------------------------------------------------*/ ++ ++flag float32_is_nan( float32 a ) ++{ ++ ++ return ( 0xFF000000 < (bits32) ( a<<1 ) ); ++ ++} ++ ++/*---------------------------------------------------------------------------- ++| Returns 1 if the single-precision floating-point value `a' is a signaling ++| NaN; otherwise returns 0. ++*----------------------------------------------------------------------------*/ ++ ++flag float32_is_signaling_nan( float32 a ) ++{ ++ ++ return ( ( ( a>>22 ) & 0x1FF ) == 0x1FE ) && ( a & 0x003FFFFF ); ++ ++} ++ ++/*---------------------------------------------------------------------------- ++| Returns the result of converting the single-precision floating-point NaN ++| `a' to the canonical NaN format. If `a' is a signaling NaN, the invalid ++| exception is raised. ++*----------------------------------------------------------------------------*/ ++ ++static commonNaNT float32ToCommonNaN( float32 a ) ++{ ++ commonNaNT z; ++ ++ if ( float32_is_signaling_nan( a ) ) float_raise( float_flag_invalid ); ++ z.sign = a>>31; ++ z.low = 0; ++ z.high = a<<9; ++ return z; ++ ++} ++ ++/*---------------------------------------------------------------------------- ++| Returns the result of converting the canonical NaN `a' to the single- ++| precision floating-point format. ++*----------------------------------------------------------------------------*/ ++ ++static float32 commonNaNToFloat32( commonNaNT a ) ++{ ++ ++ return ( ( (bits32) a.sign )<<31 ) | 0x7FC00000 | ( a.high>>9 ); ++ ++} ++ ++/*---------------------------------------------------------------------------- ++| Takes two single-precision floating-point values `a' and `b', one of which ++| is a NaN, and returns the appropriate NaN result. If either `a' or `b' is a ++| signaling NaN, the invalid exception is raised. ++*----------------------------------------------------------------------------*/ ++ ++static float32 propagateFloat32NaN( float32 a, float32 b ) ++{ ++ flag aIsNaN, aIsSignalingNaN, bIsNaN, bIsSignalingNaN; ++ ++ aIsNaN = float32_is_nan( a ); ++ aIsSignalingNaN = float32_is_signaling_nan( a ); ++ bIsNaN = float32_is_nan( b ); ++ bIsSignalingNaN = float32_is_signaling_nan( b ); ++ a |= 0x00400000; ++ b |= 0x00400000; ++ if ( aIsSignalingNaN | bIsSignalingNaN ) float_raise( float_flag_invalid ); ++ if ( aIsNaN ) { ++ return ( aIsSignalingNaN & bIsNaN ) ? b : a; ++ } ++ else { ++ return b; ++ } ++ ++} ++ ++/*---------------------------------------------------------------------------- ++| The pattern for a default generated double-precision NaN. The `high' and ++| `low' values hold the most- and least-significant bits, respectively. ++*----------------------------------------------------------------------------*/ ++enum { ++ float64_default_nan_high = 0xFFFFFFFF, ++ float64_default_nan_low = 0xFFFFFFFF ++}; ++ ++/*---------------------------------------------------------------------------- ++| Returns 1 if the double-precision floating-point value `a' is a NaN; ++| otherwise returns 0. ++*----------------------------------------------------------------------------*/ ++ ++flag float64_is_nan( float64 a ) ++{ ++ ++ return ++ ( 0xFFE00000 <= (bits32) ( a.high<<1 ) ) ++ && ( a.low || ( a.high & 0x000FFFFF ) ); ++ ++} ++ ++/*---------------------------------------------------------------------------- ++| Returns 1 if the double-precision floating-point value `a' is a signaling ++| NaN; otherwise returns 0. ++*----------------------------------------------------------------------------*/ ++ ++flag float64_is_signaling_nan( float64 a ) ++{ ++ ++ return ++ ( ( ( a.high>>19 ) & 0xFFF ) == 0xFFE ) ++ && ( a.low || ( a.high & 0x0007FFFF ) ); ++ ++} ++ ++/*---------------------------------------------------------------------------- ++| Returns the result of converting the double-precision floating-point NaN ++| `a' to the canonical NaN format. If `a' is a signaling NaN, the invalid ++| exception is raised. ++*----------------------------------------------------------------------------*/ ++ ++static commonNaNT float64ToCommonNaN( float64 a ) ++{ ++ commonNaNT z; ++ ++ if ( float64_is_signaling_nan( a ) ) float_raise( float_flag_invalid ); ++ z.sign = a.high>>31; ++ shortShift64Left( a.high, a.low, 12, &z.high, &z.low ); ++ return z; ++ ++} ++ ++/*---------------------------------------------------------------------------- ++| Returns the result of converting the canonical NaN `a' to the double- ++| precision floating-point format. ++*----------------------------------------------------------------------------*/ ++ ++static float64 commonNaNToFloat64( commonNaNT a ) ++{ ++ float64 z; ++ ++ shift64Right( a.high, a.low, 12, &z.high, &z.low ); ++ z.high |= ( ( (bits32) a.sign )<<31 ) | 0x7FF80000; ++ return z; ++ ++} ++ ++/*---------------------------------------------------------------------------- ++| Takes two double-precision floating-point values `a' and `b', one of which ++| is a NaN, and returns the appropriate NaN result. If either `a' or `b' is a ++| signaling NaN, the invalid exception is raised. ++*----------------------------------------------------------------------------*/ ++ ++static float64 propagateFloat64NaN( float64 a, float64 b ) ++{ ++ flag aIsNaN, aIsSignalingNaN, bIsNaN, bIsSignalingNaN; ++ ++ aIsNaN = float64_is_nan( a ); ++ aIsSignalingNaN = float64_is_signaling_nan( a ); ++ bIsNaN = float64_is_nan( b ); ++ bIsSignalingNaN = float64_is_signaling_nan( b ); ++ a.high |= 0x00080000; ++ b.high |= 0x00080000; ++ if ( aIsSignalingNaN | bIsSignalingNaN ) float_raise( float_flag_invalid ); ++ if ( aIsNaN ) { ++ return ( aIsSignalingNaN & bIsNaN ) ? b : a; ++ } ++ else { ++ return b; ++ } ++ ++} ++ +diff --git a/SoftFloat-2b/softfloat/bits32/powerpc-GCC/softfloat.h b/SoftFloat-2b/softfloat/bits32/powerpc-GCC/softfloat.h +new file mode 100644 +index 0000000..0015b8e +--- /dev/null ++++ b/SoftFloat-2b/softfloat/bits32/powerpc-GCC/softfloat.h +@@ -0,0 +1,155 @@ ++/* ++ * This file is derived from softfloat/bits32/386-Win32-GCC/softfloat.h, ++ * the copyright for that material belongs to the original owners. ++ * ++ * Additional material and changes where applicable is: ++ * Copyright (C) 2008 Freescale Semiconductor, Inc. All rights reserved. ++ * ++ * Author: Ebony Zhu, ++ * Yu Liu, ++ */ ++ ++/*============================================================================ ++ ++This C header file is part of the SoftFloat IEC/IEEE Floating-point Arithmetic ++Package, Release 2b. ++ ++Written by John R. Hauser. This work was made possible in part by the ++International Computer Science Institute, located at Suite 600, 1947 Center ++Street, Berkeley, California 94704. Funding was partially provided by the ++National Science Foundation under grant MIP-9311980. The original version ++of this code was written as part of a project to build a fixed-point vector ++processor in collaboration with the University of California at Berkeley, ++overseen by Profs. Nelson Morgan and John Wawrzynek. More information ++is available through the Web page `http://www.cs.berkeley.edu/~jhauser/ ++arithmetic/SoftFloat.html'. ++ ++THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort has ++been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT TIMES ++RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO PERSONS ++AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ALL LOSSES, ++COSTS, OR OTHER PROBLEMS THEY INCUR DUE TO THE SOFTWARE, AND WHO FURTHERMORE ++EFFECTIVELY INDEMNIFY JOHN HAUSER AND THE INTERNATIONAL COMPUTER SCIENCE ++INSTITUTE (possibly via similar legal warning) AGAINST ALL LOSSES, COSTS, OR ++OTHER PROBLEMS INCURRED BY THEIR CUSTOMERS AND CLIENTS DUE TO THE SOFTWARE. ++ ++Derivative works are acceptable, even for commercial purposes, so long as ++(1) the source code for the derivative work includes prominent notice that ++the work is derivative, and (2) the source code includes prominent notice with ++these four paragraphs for those parts of this code that are retained. ++ ++=============================================================================*/ ++ ++/*---------------------------------------------------------------------------- ++| Software IEC/IEEE floating-point types. ++*----------------------------------------------------------------------------*/ ++typedef bits32 float32; ++typedef struct { ++ bits32 high, low; ++} float64; ++ ++/*---------------------------------------------------------------------------- ++| Software IEC/IEEE floating-point underflow tininess-detection mode. ++*----------------------------------------------------------------------------*/ ++extern int8 float_detect_tininess; ++enum { ++ float_tininess_after_rounding = 0, ++ float_tininess_before_rounding = 1 ++}; ++ ++/*---------------------------------------------------------------------------- ++| Software IEC/IEEE floating-point rounding mode. ++*----------------------------------------------------------------------------*/ ++extern int8 float_rounding_mode; ++enum { ++ float_round_nearest_even = 0, ++ float_round_to_zero = 1, ++ float_round_up = 2, ++ float_round_down = 3 ++}; ++ ++/*---------------------------------------------------------------------------- ++| Software IEC/IEEE floating-point exception flags. ++*----------------------------------------------------------------------------*/ ++/* ++extern int8 float_exception_flags; ++enum { ++ float_flag_inexact = 1, ++ float_flag_underflow = 2, ++ float_flag_overflow = 4, ++ float_flag_divbyzero = 8, ++ float_flag_invalid = 16 ++}; ++*/ ++ ++extern int8 float_exception_flags; ++enum { ++ float_flag_inexact = 16, ++ float_flag_underflow = 2, ++ float_flag_overflow = 1, ++ float_flag_divbyzero = 4, ++ float_flag_invalid = 8 ++}; ++ ++/*---------------------------------------------------------------------------- ++| Routine to raise any or all of the software IEC/IEEE floating-point ++| exception flags. ++*----------------------------------------------------------------------------*/ ++void float_raise( int8 ); ++ ++/*---------------------------------------------------------------------------- ++| Software IEC/IEEE integer-to-floating-point conversion routines. ++*----------------------------------------------------------------------------*/ ++float32 int32_to_float32( int32 ); ++float64 int32_to_float64( int32 ); ++ ++/*---------------------------------------------------------------------------- ++| Software IEC/IEEE single-precision conversion routines. ++*----------------------------------------------------------------------------*/ ++int32 float32_to_int32( float32 ); ++int32 float32_to_int32_round_to_zero( float32 ); ++float64 float32_to_float64( float32 ); ++ ++/*---------------------------------------------------------------------------- ++| Software IEC/IEEE single-precision operations. ++*----------------------------------------------------------------------------*/ ++float32 float32_round_to_int( float32 ); ++float32 float32_add( float32, float32 ); ++float32 float32_sub( float32, float32 ); ++float32 float32_mul( float32, float32 ); ++float32 float32_div( float32, float32 ); ++float32 float32_rem( float32, float32 ); ++float32 float32_sqrt( float32 ); ++flag float32_eq( float32, float32 ); ++flag float32_le( float32, float32 ); ++flag float32_lt( float32, float32 ); ++flag float32_eq_signaling( float32, float32 ); ++flag float32_le_quiet( float32, float32 ); ++flag float32_lt_quiet( float32, float32 ); ++flag float32_is_signaling_nan( float32 ); ++ ++/*---------------------------------------------------------------------------- ++| Software IEC/IEEE double-precision conversion routines. ++*----------------------------------------------------------------------------*/ ++int32 float64_to_int32( float64 ); ++int32 float64_to_int32_round_to_zero( float64 ); ++float32 float64_to_float32( float64 ); ++ ++/*---------------------------------------------------------------------------- ++| Software IEC/IEEE double-precision operations. ++*----------------------------------------------------------------------------*/ ++float64 float64_round_to_int( float64 ); ++float64 float64_add( float64, float64 ); ++float64 float64_sub( float64, float64 ); ++float64 float64_mul( float64, float64 ); ++float64 float64_div( float64, float64 ); ++float64 float64_rem( float64, float64 ); ++float64 float64_sqrt( float64 ); ++flag float64_eq( float64, float64 ); ++flag float64_le( float64, float64 ); ++flag float64_lt( float64, float64 ); ++flag float64_eq_signaling( float64, float64 ); ++flag float64_le_quiet( float64, float64 ); ++flag float64_lt_quiet( float64, float64 ); ++flag float64_is_signaling_nan( float64 ); ++ +diff --git a/SoftFloat-2b/softfloat/bits64/powerpc-GCC/Makefile b/SoftFloat-2b/softfloat/bits64/powerpc-GCC/Makefile +new file mode 100644 +index 0000000..a5e2cc7 +--- /dev/null ++++ b/SoftFloat-2b/softfloat/bits64/powerpc-GCC/Makefile +@@ -0,0 +1,24 @@ ++ ++PROCESSOR_H = ../../../processors/powerpc-GCC.h ++SOFTFLOAT_MACROS = ../softfloat-macros ++ ++OBJ = .o ++EXE = ++INCLUDES = -I. -I.. ++COMPILE_C = $(COMPILE_PREFIX) -mcpu=8548 -mhard-float -mfloat-gprs=double -o $@ $(INCLUDES) -I- -O2 ++LINK = $(COMPILE_PREFIX) -o $@ ++ ++ALL: softfloat$(OBJ) timesoftfloat$(EXE) ++ ++milieu.h: $(PROCESSOR_H) ++ touch milieu.h ++ ++softfloat$(OBJ): milieu.h softfloat.h softfloat-specialize $(SOFTFLOAT_MACROS) ../softfloat.c ++ $(COMPILE_C) ../softfloat.c ++ ++timesoftfloat$(OBJ): milieu.h softfloat.h ../timesoftfloat.c ++ $(COMPILE_C) ../timesoftfloat.c ++ ++timesoftfloat$(EXE): softfloat$(OBJ) timesoftfloat$(OBJ) ++ $(LINK) softfloat$(OBJ) timesoftfloat$(OBJ) ++ +diff --git a/SoftFloat-2b/softfloat/bits64/powerpc-GCC/milieu.h b/SoftFloat-2b/softfloat/bits64/powerpc-GCC/milieu.h +new file mode 100644 +index 0000000..1b66490 +--- /dev/null ++++ b/SoftFloat-2b/softfloat/bits64/powerpc-GCC/milieu.h +@@ -0,0 +1,55 @@ ++/* ++ * This file is derived from softfloat/bits64/386-Win32-GCC/milieu.h, ++ * the copyright for that material belongs to the original owners. ++ * ++ * Additional material and changes where applicable is: ++ * Copyright (C) 2008 Freescale Semiconductor, Inc. All rights reserved. ++ * ++ * Author: Ebony Zhu, ++ * Yu Liu, ++ */ ++ ++/*============================================================================ ++ ++This C header file is part of the SoftFloat IEC/IEEE Floating-point Arithmetic ++Package, Release 2b. ++ ++Written by John R. Hauser. This work was made possible in part by the ++International Computer Science Institute, located at Suite 600, 1947 Center ++Street, Berkeley, California 94704. Funding was partially provided by the ++National Science Foundation under grant MIP-9311980. The original version ++of this code was written as part of a project to build a fixed-point vector ++processor in collaboration with the University of California at Berkeley, ++overseen by Profs. Nelson Morgan and John Wawrzynek. More information ++is available through the Web page `http://www.cs.berkeley.edu/~jhauser/ ++arithmetic/SoftFloat.html'. ++ ++THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort has ++been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT TIMES ++RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO PERSONS ++AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ALL LOSSES, ++COSTS, OR OTHER PROBLEMS THEY INCUR DUE TO THE SOFTWARE, AND WHO FURTHERMORE ++EFFECTIVELY INDEMNIFY JOHN HAUSER AND THE INTERNATIONAL COMPUTER SCIENCE ++INSTITUTE (possibly via similar legal warning) AGAINST ALL LOSSES, COSTS, OR ++OTHER PROBLEMS INCURRED BY THEIR CUSTOMERS AND CLIENTS DUE TO THE SOFTWARE. ++ ++Derivative works are acceptable, even for commercial purposes, so long as ++(1) the source code for the derivative work includes prominent notice that ++the work is derivative, and (2) the source code includes prominent notice with ++these four paragraphs for those parts of this code that are retained. ++ ++=============================================================================*/ ++ ++/*---------------------------------------------------------------------------- ++| Include common integer types and flags. ++*----------------------------------------------------------------------------*/ ++#include "../../../processors/SPARC-GCC.h" ++ ++/*---------------------------------------------------------------------------- ++| Symbolic Boolean literals. ++*----------------------------------------------------------------------------*/ ++enum { ++ FALSE = 0, ++ TRUE = 1 ++}; ++ +diff --git a/SoftFloat-2b/softfloat/bits64/powerpc-GCC/softfloat-specialize b/SoftFloat-2b/softfloat/bits64/powerpc-GCC/softfloat-specialize +new file mode 100644 +index 0000000..b1d0bc8 +--- /dev/null ++++ b/SoftFloat-2b/softfloat/bits64/powerpc-GCC/softfloat-specialize +@@ -0,0 +1,422 @@ ++/* ++ * This file is derived from softfloat/bits64/386-Win32-GCC/softfloat-specialize, ++ * the copyright for that material belongs to the original owners. ++ * ++ * Additional material and changes where applicable is: ++ * Copyright (C) 2008 Freescale Semiconductor, Inc. All rights reserved. ++ * ++ * Author: Ebony Zhu, ++ * Yu Liu, ++ */ ++ ++/*============================================================================ ++ ++This C source fragment is part of the SoftFloat IEC/IEEE Floating-point ++Arithmetic Package, Release 2b. ++ ++Written by John R. Hauser. This work was made possible in part by the ++International Computer Science Institute, located at Suite 600, 1947 Center ++Street, Berkeley, California 94704. Funding was partially provided by the ++National Science Foundation under grant MIP-9311980. The original version ++of this code was written as part of a project to build a fixed-point vector ++processor in collaboration with the University of California at Berkeley, ++overseen by Profs. Nelson Morgan and John Wawrzynek. More information ++is available through the Web page `http://www.cs.berkeley.edu/~jhauser/ ++arithmetic/SoftFloat.html'. ++ ++THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort has ++been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT TIMES ++RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO PERSONS ++AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ALL LOSSES, ++COSTS, OR OTHER PROBLEMS THEY INCUR DUE TO THE SOFTWARE, AND WHO FURTHERMORE ++EFFECTIVELY INDEMNIFY JOHN HAUSER AND THE INTERNATIONAL COMPUTER SCIENCE ++INSTITUTE (possibly via similar legal warning) AGAINST ALL LOSSES, COSTS, OR ++OTHER PROBLEMS INCURRED BY THEIR CUSTOMERS AND CLIENTS DUE TO THE SOFTWARE. ++ ++Derivative works are acceptable, even for commercial purposes, so long as ++(1) the source code for the derivative work includes prominent notice that ++the work is derivative, and (2) the source code includes prominent notice with ++these four paragraphs for those parts of this code that are retained. ++ ++=============================================================================*/ ++ ++/*---------------------------------------------------------------------------- ++| Underflow tininess-detection mode, statically initialized to default value. ++| (The declaration in `softfloat.h' must match the `int8' type here.) ++*----------------------------------------------------------------------------*/ ++int8 float_detect_tininess = float_tininess_before_rounding; ++ ++/*---------------------------------------------------------------------------- ++| Raises the exceptions specified by `flags'. Floating-point traps can be ++| defined here if desired. It is currently not possible for such a trap ++| to substitute a result value. If traps are not implemented, this routine ++| should be simply `float_exception_flags |= flags;'. ++*----------------------------------------------------------------------------*/ ++ ++void float_raise( int8 flags ) ++{ ++ ++ float_exception_flags |= flags; ++ ++} ++ ++/*---------------------------------------------------------------------------- ++| Internal canonical NaN format. ++*----------------------------------------------------------------------------*/ ++typedef struct { ++ flag sign; ++ bits64 high, low; ++} commonNaNT; ++ ++/*---------------------------------------------------------------------------- ++| The pattern for a default generated single-precision NaN. ++*----------------------------------------------------------------------------*/ ++#define float32_default_nan 0x7FFFFFFF ++ ++/*---------------------------------------------------------------------------- ++| Returns 1 if the single-precision floating-point value `a' is a NaN; ++| otherwise returns 0. ++*----------------------------------------------------------------------------*/ ++ ++flag float32_is_nan( float32 a ) ++{ ++ ++ return ( 0xFF000000 < (bits32) ( a<<1 ) ); ++ ++} ++ ++/*---------------------------------------------------------------------------- ++| Returns 1 if the single-precision floating-point value `a' is a signaling ++| NaN; otherwise returns 0. ++*----------------------------------------------------------------------------*/ ++ ++flag float32_is_signaling_nan( float32 a ) ++{ ++ ++ return ( ( ( a>>22 ) & 0x1FF ) == 0x1FE ) && ( a & 0x003FFFFF ); ++ ++} ++ ++/*---------------------------------------------------------------------------- ++| Returns the result of converting the single-precision floating-point NaN ++| `a' to the canonical NaN format. If `a' is a signaling NaN, the invalid ++| exception is raised. ++*----------------------------------------------------------------------------*/ ++ ++static commonNaNT float32ToCommonNaN( float32 a ) ++{ ++ commonNaNT z; ++ ++ if ( float32_is_signaling_nan( a ) ) float_raise( float_flag_invalid ); ++ z.sign = a>>31; ++ z.low = 0; ++ z.high = ( (bits64) a )<<41; ++ return z; ++ ++} ++ ++/*---------------------------------------------------------------------------- ++| Returns the result of converting the canonical NaN `a' to the single- ++| precision floating-point format. ++*----------------------------------------------------------------------------*/ ++ ++static float32 commonNaNToFloat32( commonNaNT a ) ++{ ++ ++ return ( ( (bits32) a.sign )<<31 ) | 0x7FC00000 | ( a.high>>41 ); ++ ++} ++ ++/*---------------------------------------------------------------------------- ++| Takes two single-precision floating-point values `a' and `b', one of which ++| is a NaN, and returns the appropriate NaN result. If either `a' or `b' is a ++| signaling NaN, the invalid exception is raised. ++*----------------------------------------------------------------------------*/ ++ ++static float32 propagateFloat32NaN( float32 a, float32 b ) ++{ ++ flag aIsNaN, aIsSignalingNaN, bIsNaN, bIsSignalingNaN; ++ ++ aIsNaN = float32_is_nan( a ); ++ aIsSignalingNaN = float32_is_signaling_nan( a ); ++ bIsNaN = float32_is_nan( b ); ++ bIsSignalingNaN = float32_is_signaling_nan( b ); ++ a |= 0x00400000; ++ b |= 0x00400000; ++ if ( aIsSignalingNaN | bIsSignalingNaN ) float_raise( float_flag_invalid ); ++ return bIsSignalingNaN ? b : aIsSignalingNaN ? a : bIsNaN ? b : a; ++ ++} ++ ++/*---------------------------------------------------------------------------- ++| The pattern for a default generated double-precision NaN. ++*----------------------------------------------------------------------------*/ ++#define float64_default_nan LIT64( 0x7FFFFFFFFFFFFFFF ) ++ ++/*---------------------------------------------------------------------------- ++| Returns 1 if the double-precision floating-point value `a' is a NaN; ++| otherwise returns 0. ++*----------------------------------------------------------------------------*/ ++ ++flag float64_is_nan( float64 a ) ++{ ++ ++ return ( LIT64( 0xFFE0000000000000 ) < (bits64) ( a<<1 ) ); ++ ++} ++ ++/*---------------------------------------------------------------------------- ++| Returns 1 if the double-precision floating-point value `a' is a signaling ++| NaN; otherwise returns 0. ++*----------------------------------------------------------------------------*/ ++ ++flag float64_is_signaling_nan( float64 a ) ++{ ++ ++ return ++ ( ( ( a>>51 ) & 0xFFF ) == 0xFFE ) ++ && ( a & LIT64( 0x0007FFFFFFFFFFFF ) ); ++ ++} ++ ++/*---------------------------------------------------------------------------- ++| Returns the result of converting the double-precision floating-point NaN ++| `a' to the canonical NaN format. If `a' is a signaling NaN, the invalid ++| exception is raised. ++*----------------------------------------------------------------------------*/ ++ ++static commonNaNT float64ToCommonNaN( float64 a ) ++{ ++ commonNaNT z; ++ ++ if ( float64_is_signaling_nan( a ) ) float_raise( float_flag_invalid ); ++ z.sign = a>>63; ++ z.low = 0; ++ z.high = a<<12; ++ return z; ++ ++} ++ ++/*---------------------------------------------------------------------------- ++| Returns the result of converting the canonical NaN `a' to the double- ++| precision floating-point format. ++*----------------------------------------------------------------------------*/ ++ ++static float64 commonNaNToFloat64( commonNaNT a ) ++{ ++ ++ return ++ ( ( (bits64) a.sign )<<63 ) ++ | LIT64( 0x7FF8000000000000 ) ++ | ( a.high>>12 ); ++ ++} ++ ++/*---------------------------------------------------------------------------- ++| Takes two double-precision floating-point values `a' and `b', one of which ++| is a NaN, and returns the appropriate NaN result. If either `a' or `b' is a ++| signaling NaN, the invalid exception is raised. ++*----------------------------------------------------------------------------*/ ++ ++static float64 propagateFloat64NaN( float64 a, float64 b ) ++{ ++ flag aIsNaN, aIsSignalingNaN, bIsNaN, bIsSignalingNaN; ++ ++ aIsNaN = float64_is_nan( a ); ++ aIsSignalingNaN = float64_is_signaling_nan( a ); ++ bIsNaN = float64_is_nan( b ); ++ bIsSignalingNaN = float64_is_signaling_nan( b ); ++ a |= LIT64( 0x0008000000000000 ); ++ b |= LIT64( 0x0008000000000000 ); ++ if ( aIsSignalingNaN | bIsSignalingNaN ) float_raise( float_flag_invalid ); ++ return bIsSignalingNaN ? b : aIsSignalingNaN ? a : bIsNaN ? b : a; ++ ++} ++ ++#ifdef FLOATX80 ++ ++/*---------------------------------------------------------------------------- ++| The pattern for a default generated extended double-precision NaN. The ++| `high' and `low' values hold the most- and least-significant bits, ++| respectively. ++*----------------------------------------------------------------------------*/ ++#define floatx80_default_nan_high 0x7FFF ++#define floatx80_default_nan_low LIT64( 0xFFFFFFFFFFFFFFFF ) ++ ++/*---------------------------------------------------------------------------- ++| Returns 1 if the extended double-precision floating-point value `a' is a ++| NaN; otherwise returns 0. ++*----------------------------------------------------------------------------*/ ++ ++flag floatx80_is_nan( floatx80 a ) ++{ ++ ++ return ( ( a.high & 0x7FFF ) == 0x7FFF ) && (bits64) ( a.low<<1 ); ++ ++} ++ ++/*---------------------------------------------------------------------------- ++| Returns 1 if the extended double-precision floating-point value `a' is a ++| signaling NaN; otherwise returns 0. ++*----------------------------------------------------------------------------*/ ++ ++flag floatx80_is_signaling_nan( floatx80 a ) ++{ ++ bits64 aLow; ++ ++ aLow = a.low & ~ LIT64( 0x4000000000000000 ); ++ return ++ ( ( a.high & 0x7FFF ) == 0x7FFF ) ++ && (bits64) ( aLow<<1 ) ++ && ( a.low == aLow ); ++ ++} ++ ++/*---------------------------------------------------------------------------- ++| Returns the result of converting the extended double-precision floating- ++| point NaN `a' to the canonical NaN format. If `a' is a signaling NaN, the ++| invalid exception is raised. ++*----------------------------------------------------------------------------*/ ++ ++static commonNaNT floatx80ToCommonNaN( floatx80 a ) ++{ ++ commonNaNT z; ++ ++ if ( floatx80_is_signaling_nan( a ) ) float_raise( float_flag_invalid ); ++ z.sign = a.high>>15; ++ z.low = 0; ++ z.high = a.low<<1; ++ return z; ++ ++} ++ ++/*---------------------------------------------------------------------------- ++| Returns the result of converting the canonical NaN `a' to the extended ++| double-precision floating-point format. ++*----------------------------------------------------------------------------*/ ++ ++static floatx80 commonNaNToFloatx80( commonNaNT a ) ++{ ++ floatx80 z; ++ ++ z.low = LIT64( 0xC000000000000000 ) | ( a.high>>1 ); ++ z.high = ( ( (bits16) a.sign )<<15 ) | 0x7FFF; ++ return z; ++ ++} ++ ++/*---------------------------------------------------------------------------- ++| Takes two extended double-precision floating-point values `a' and `b', one ++| of which is a NaN, and returns the appropriate NaN result. If either `a' or ++| `b' is a signaling NaN, the invalid exception is raised. ++*----------------------------------------------------------------------------*/ ++ ++static floatx80 propagateFloatx80NaN( floatx80 a, floatx80 b ) ++{ ++ flag aIsNaN, aIsSignalingNaN, bIsNaN, bIsSignalingNaN; ++ ++ aIsNaN = floatx80_is_nan( a ); ++ aIsSignalingNaN = floatx80_is_signaling_nan( a ); ++ bIsNaN = floatx80_is_nan( b ); ++ bIsSignalingNaN = floatx80_is_signaling_nan( b ); ++ a.low |= LIT64( 0xC000000000000000 ); ++ b.low |= LIT64( 0xC000000000000000 ); ++ if ( aIsSignalingNaN | bIsSignalingNaN ) float_raise( float_flag_invalid ); ++ return bIsSignalingNaN ? b : aIsSignalingNaN ? a : bIsNaN ? b : a; ++ ++} ++ ++#endif ++ ++#ifdef FLOAT128 ++ ++/*---------------------------------------------------------------------------- ++| The pattern for a default generated quadruple-precision NaN. The `high' and ++| `low' values hold the most- and least-significant bits, respectively. ++*----------------------------------------------------------------------------*/ ++#define float128_default_nan_high LIT64( 0x7FFFFFFFFFFFFFFF ) ++#define float128_default_nan_low LIT64( 0xFFFFFFFFFFFFFFFF ) ++ ++/*---------------------------------------------------------------------------- ++| Returns 1 if the quadruple-precision floating-point value `a' is a NaN; ++| otherwise returns 0. ++*----------------------------------------------------------------------------*/ ++ ++flag float128_is_nan( float128 a ) ++{ ++ ++ return ++ ( LIT64( 0xFFFE000000000000 ) <= (bits64) ( a.high<<1 ) ) ++ && ( a.low || ( a.high & LIT64( 0x0000FFFFFFFFFFFF ) ) ); ++ ++} ++ ++/*---------------------------------------------------------------------------- ++| Returns 1 if the quadruple-precision floating-point value `a' is a ++| signaling NaN; otherwise returns 0. ++*----------------------------------------------------------------------------*/ ++ ++flag float128_is_signaling_nan( float128 a ) ++{ ++ ++ return ++ ( ( ( a.high>>47 ) & 0xFFFF ) == 0xFFFE ) ++ && ( a.low || ( a.high & LIT64( 0x00007FFFFFFFFFFF ) ) ); ++ ++} ++ ++/*---------------------------------------------------------------------------- ++| Returns the result of converting the quadruple-precision floating-point NaN ++| `a' to the canonical NaN format. If `a' is a signaling NaN, the invalid ++| exception is raised. ++*----------------------------------------------------------------------------*/ ++ ++static commonNaNT float128ToCommonNaN( float128 a ) ++{ ++ commonNaNT z; ++ ++ if ( float128_is_signaling_nan( a ) ) float_raise( float_flag_invalid ); ++ z.sign = a.high>>63; ++ shortShift128Left( a.high, a.low, 16, &z.high, &z.low ); ++ return z; ++ ++} ++ ++/*---------------------------------------------------------------------------- ++| Returns the result of converting the canonical NaN `a' to the quadruple- ++| precision floating-point format. ++*----------------------------------------------------------------------------*/ ++ ++static float128 commonNaNToFloat128( commonNaNT a ) ++{ ++ float128 z; ++ ++ shift128Right( a.high, a.low, 16, &z.high, &z.low ); ++ z.high |= ( ( (bits64) a.sign )<<63 ) | LIT64( 0x7FFF800000000000 ); ++ return z; ++ ++} ++ ++/*---------------------------------------------------------------------------- ++| Takes two quadruple-precision floating-point values `a' and `b', one of ++| which is a NaN, and returns the appropriate NaN result. If either `a' or ++| `b' is a signaling NaN, the invalid exception is raised. ++*----------------------------------------------------------------------------*/ ++ ++static float128 propagateFloat128NaN( float128 a, float128 b ) ++{ ++ flag aIsNaN, aIsSignalingNaN, bIsNaN, bIsSignalingNaN; ++ ++ aIsNaN = float128_is_nan( a ); ++ aIsSignalingNaN = float128_is_signaling_nan( a ); ++ bIsNaN = float128_is_nan( b ); ++ bIsSignalingNaN = float128_is_signaling_nan( b ); ++ a.high |= LIT64( 0x0000800000000000 ); ++ b.high |= LIT64( 0x0000800000000000 ); ++ if ( aIsSignalingNaN | bIsSignalingNaN ) float_raise( float_flag_invalid ); ++ return bIsSignalingNaN ? b : aIsSignalingNaN ? a : bIsNaN ? b : a; ++ ++} ++ ++#endif ++ +diff --git a/SoftFloat-2b/softfloat/bits64/powerpc-GCC/softfloat.h b/SoftFloat-2b/softfloat/bits64/powerpc-GCC/softfloat.h +new file mode 100644 +index 0000000..5b7cb1c +--- /dev/null ++++ b/SoftFloat-2b/softfloat/bits64/powerpc-GCC/softfloat.h +@@ -0,0 +1,269 @@ ++/* ++ * This file is derived from softfloat/bits64/386-Win32-GCC/softfloat.h, ++ * the copyright for that material belongs to the original owners. ++ * ++ * Additional material and changes where applicable is: ++ * Copyright (C) 2008 Freescale Semiconductor, Inc. All rights reserved. ++ * ++ * Author: Ebony Zhu, ++ * Yu Liu, ++ */ ++ ++/*============================================================================ ++ ++This C header file is part of the SoftFloat IEC/IEEE Floating-point Arithmetic ++Package, Release 2b. ++ ++Written by John R. Hauser. This work was made possible in part by the ++International Computer Science Institute, located at Suite 600, 1947 Center ++Street, Berkeley, California 94704. Funding was partially provided by the ++National Science Foundation under grant MIP-9311980. The original version ++of this code was written as part of a project to build a fixed-point vector ++processor in collaboration with the University of California at Berkeley, ++overseen by Profs. Nelson Morgan and John Wawrzynek. More information ++is available through the Web page `http://www.cs.berkeley.edu/~jhauser/ ++arithmetic/SoftFloat.html'. ++ ++THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort has ++been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT TIMES ++RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO PERSONS ++AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ALL LOSSES, ++COSTS, OR OTHER PROBLEMS THEY INCUR DUE TO THE SOFTWARE, AND WHO FURTHERMORE ++EFFECTIVELY INDEMNIFY JOHN HAUSER AND THE INTERNATIONAL COMPUTER SCIENCE ++INSTITUTE (possibly via similar legal warning) AGAINST ALL LOSSES, COSTS, OR ++OTHER PROBLEMS INCURRED BY THEIR CUSTOMERS AND CLIENTS DUE TO THE SOFTWARE. ++ ++Derivative works are acceptable, even for commercial purposes, so long as ++(1) the source code for the derivative work includes prominent notice that ++the work is derivative, and (2) the source code includes prominent notice with ++these four paragraphs for those parts of this code that are retained. ++ ++=============================================================================*/ ++ ++/*---------------------------------------------------------------------------- ++| The macro `FLOATX80' must be defined to enable the extended double-precision ++| floating-point format `floatx80'. If this macro is not defined, the ++| `floatx80' type will not be defined, and none of the functions that either ++| input or output the `floatx80' type will be defined. The same applies to ++| the `FLOAT128' macro and the quadruple-precision format `float128'. ++*----------------------------------------------------------------------------*/ ++#define FLOATX80 ++#define FLOAT128 ++ ++/*---------------------------------------------------------------------------- ++| Software IEC/IEEE floating-point types. ++*----------------------------------------------------------------------------*/ ++typedef unsigned int float32; ++typedef unsigned long long float64; ++#ifdef FLOATX80 ++typedef struct { ++ unsigned short high; ++ unsigned long long low; ++} floatx80; ++#endif ++#ifdef FLOAT128 ++typedef struct { ++ unsigned long long high, low; ++} float128; ++#endif ++ ++/*---------------------------------------------------------------------------- ++| Software IEC/IEEE floating-point underflow tininess-detection mode. ++*----------------------------------------------------------------------------*/ ++extern int float_detect_tininess; ++enum { ++ float_tininess_after_rounding = 0, ++ float_tininess_before_rounding = 1 ++}; ++ ++/*---------------------------------------------------------------------------- ++| Software IEC/IEEE floating-point rounding mode. ++*----------------------------------------------------------------------------*/ ++extern int float_rounding_mode; ++enum { ++ float_round_nearest_even = 0, ++ float_round_to_zero = 1, ++ float_round_up = 2, ++ float_round_down = 3 ++}; ++ ++/*---------------------------------------------------------------------------- ++| Software IEC/IEEE floating-point exception flags. ++*----------------------------------------------------------------------------*/ ++extern int float_exception_flags; ++enum { ++ float_flag_inexact = 1, ++ float_flag_divbyzero = 2, ++ float_flag_underflow = 4, ++ float_flag_overflow = 8, ++ float_flag_invalid = 16 ++}; ++ ++/*---------------------------------------------------------------------------- ++| Routine to raise any or all of the software IEC/IEEE floating-point ++| exception flags. ++*----------------------------------------------------------------------------*/ ++void float_raise( int ); ++ ++/*---------------------------------------------------------------------------- ++| Software IEC/IEEE integer-to-floating-point conversion routines. ++*----------------------------------------------------------------------------*/ ++float32 int32_to_float32( int ); ++float64 int32_to_float64( int ); ++#ifdef FLOATX80 ++floatx80 int32_to_floatx80( int ); ++#endif ++#ifdef FLOAT128 ++float128 int32_to_float128( int ); ++#endif ++float32 int64_to_float32( long long ); ++float64 int64_to_float64( long long ); ++#ifdef FLOATX80 ++floatx80 int64_to_floatx80( long long ); ++#endif ++#ifdef FLOAT128 ++float128 int64_to_float128( long long ); ++#endif ++ ++/*---------------------------------------------------------------------------- ++| Software IEC/IEEE single-precision conversion routines. ++*----------------------------------------------------------------------------*/ ++int float32_to_int32( float32 ); ++int float32_to_int32_round_to_zero( float32 ); ++long long float32_to_int64( float32 ); ++long long float32_to_int64_round_to_zero( float32 ); ++float64 float32_to_float64( float32 ); ++#ifdef FLOATX80 ++floatx80 float32_to_floatx80( float32 ); ++#endif ++#ifdef FLOAT128 ++float128 float32_to_float128( float32 ); ++#endif ++ ++/*---------------------------------------------------------------------------- ++| Software IEC/IEEE single-precision operations. ++*----------------------------------------------------------------------------*/ ++float32 float32_round_to_int( float32 ); ++float32 float32_add( float32, float32 ); ++float32 float32_sub( float32, float32 ); ++float32 float32_mul( float32, float32 ); ++float32 float32_div( float32, float32 ); ++float32 float32_rem( float32, float32 ); ++float32 float32_sqrt( float32 ); ++int float32_eq( float32, float32 ); ++int float32_le( float32, float32 ); ++int float32_lt( float32, float32 ); ++int float32_eq_signaling( float32, float32 ); ++int float32_le_quiet( float32, float32 ); ++int float32_lt_quiet( float32, float32 ); ++int float32_is_signaling_nan( float32 ); ++ ++/*---------------------------------------------------------------------------- ++| Software IEC/IEEE double-precision conversion routines. ++*----------------------------------------------------------------------------*/ ++int float64_to_int32( float64 ); ++int float64_to_int32_round_to_zero( float64 ); ++long long float64_to_int64( float64 ); ++long long float64_to_int64_round_to_zero( float64 ); ++float32 float64_to_float32( float64 ); ++#ifdef FLOATX80 ++floatx80 float64_to_floatx80( float64 ); ++#endif ++#ifdef FLOAT128 ++float128 float64_to_float128( float64 ); ++#endif ++ ++/*---------------------------------------------------------------------------- ++| Software IEC/IEEE double-precision operations. ++*----------------------------------------------------------------------------*/ ++float64 float64_round_to_int( float64 ); ++float64 float64_add( float64, float64 ); ++float64 float64_sub( float64, float64 ); ++float64 float64_mul( float64, float64 ); ++float64 float64_div( float64, float64 ); ++float64 float64_rem( float64, float64 ); ++float64 float64_sqrt( float64 ); ++int float64_eq( float64, float64 ); ++int float64_le( float64, float64 ); ++int float64_lt( float64, float64 ); ++int float64_eq_signaling( float64, float64 ); ++int float64_le_quiet( float64, float64 ); ++int float64_lt_quiet( float64, float64 ); ++int float64_is_signaling_nan( float64 ); ++ ++#ifdef FLOATX80 ++ ++/*---------------------------------------------------------------------------- ++| Software IEC/IEEE extended double-precision conversion routines. ++*----------------------------------------------------------------------------*/ ++int floatx80_to_int32( floatx80 ); ++int floatx80_to_int32_round_to_zero( floatx80 ); ++long long floatx80_to_int64( floatx80 ); ++long long floatx80_to_int64_round_to_zero( floatx80 ); ++float32 floatx80_to_float32( floatx80 ); ++float64 floatx80_to_float64( floatx80 ); ++#ifdef FLOAT128 ++float128 floatx80_to_float128( floatx80 ); ++#endif ++ ++/*---------------------------------------------------------------------------- ++| Software IEC/IEEE extended double-precision rounding precision. Valid ++| values are 32, 64, and 80. ++*----------------------------------------------------------------------------*/ ++extern int floatx80_rounding_precision; ++ ++/*---------------------------------------------------------------------------- ++| Software IEC/IEEE extended double-precision operations. ++*----------------------------------------------------------------------------*/ ++floatx80 floatx80_round_to_int( floatx80 ); ++floatx80 floatx80_add( floatx80, floatx80 ); ++floatx80 floatx80_sub( floatx80, floatx80 ); ++floatx80 floatx80_mul( floatx80, floatx80 ); ++floatx80 floatx80_div( floatx80, floatx80 ); ++floatx80 floatx80_rem( floatx80, floatx80 ); ++floatx80 floatx80_sqrt( floatx80 ); ++int floatx80_eq( floatx80, floatx80 ); ++int floatx80_le( floatx80, floatx80 ); ++int floatx80_lt( floatx80, floatx80 ); ++int floatx80_eq_signaling( floatx80, floatx80 ); ++int floatx80_le_quiet( floatx80, floatx80 ); ++int floatx80_lt_quiet( floatx80, floatx80 ); ++int floatx80_is_signaling_nan( floatx80 ); ++ ++#endif ++ ++#ifdef FLOAT128 ++ ++/*---------------------------------------------------------------------------- ++| Software IEC/IEEE quadruple-precision conversion routines. ++*----------------------------------------------------------------------------*/ ++int float128_to_int32( float128 ); ++int float128_to_int32_round_to_zero( float128 ); ++long long float128_to_int64( float128 ); ++long long float128_to_int64_round_to_zero( float128 ); ++float32 float128_to_float32( float128 ); ++float64 float128_to_float64( float128 ); ++#ifdef FLOATX80 ++floatx80 float128_to_floatx80( float128 ); ++#endif ++ ++/*---------------------------------------------------------------------------- ++| Software IEC/IEEE quadruple-precision operations. ++*----------------------------------------------------------------------------*/ ++float128 float128_round_to_int( float128 ); ++float128 float128_add( float128, float128 ); ++float128 float128_sub( float128, float128 ); ++float128 float128_mul( float128, float128 ); ++float128 float128_div( float128, float128 ); ++float128 float128_rem( float128, float128 ); ++float128 float128_sqrt( float128 ); ++int float128_eq( float128, float128 ); ++int float128_le( float128, float128 ); ++int float128_lt( float128, float128 ); ++int float128_eq_signaling( float128, float128 ); ++int float128_le_quiet( float128, float128 ); ++int float128_lt_quiet( float128, float128 ); ++int float128_is_signaling_nan( float128 ); ++ ++#endif ++ +-- +1.5.4 + diff --git a/meta-fsl-ppc/recipes-extended/testfloat/files/TestFloat-powerpc-E500v2-SPE-1.patch b/meta-fsl-ppc/recipes-extended/testfloat/files/TestFloat-powerpc-E500v2-SPE-1.patch new file mode 100644 index 00000000..c34421cf --- /dev/null +++ b/meta-fsl-ppc/recipes-extended/testfloat/files/TestFloat-powerpc-E500v2-SPE-1.patch @@ -0,0 +1,1644 @@ +This patch adds PowerPC E500v2 SPE support in TestFloat. +And it disables the testing for hardware that can not trigger SPE interrupt. + +Signed-off-by: Ebony Zhu +Signed-off-by: Liu Yu +--- + processors/POWERPC-gcc.h | 99 +++++ + testfloat/powerpc-linux-gcc/Makefile | 83 +++++ + testfloat/powerpc-linux-gcc/milieu.h | 71 ++++ + testfloat/powerpc-linux-gcc/systflags.c | 107 ++++++ + testfloat/powerpc-linux-gcc/systfloat.c | 595 +++++++++++++++++++++++++++++++ + testfloat/powerpc-linux-gcc/systmodes.c | 67 ++++ + testfloat/templates/Makefile | 18 +- + testfloat/templates/milieu.h | 2 +- + testfloat/testFunction.h | 2 +- + testfloat/testLoops.c | 216 +++++++++++ + 10 files changed, 1252 insertions(+), 8 deletions(-) + create mode 100644 processors/POWERPC-gcc.h + create mode 100644 testfloat/powerpc-linux-gcc/Makefile + create mode 100644 testfloat/powerpc-linux-gcc/milieu.h + create mode 100644 testfloat/powerpc-linux-gcc/systflags.c + create mode 100644 testfloat/powerpc-linux-gcc/systfloat.c + create mode 100644 testfloat/powerpc-linux-gcc/systmodes.c + +diff --git a/processors/POWERPC-gcc.h b/processors/POWERPC-gcc.h +new file mode 100644 +index 0000000..4201faa +--- /dev/null ++++ b/processors/POWERPC-gcc.h +@@ -0,0 +1,99 @@ ++/* ++ * This file is derived from processors/i386-GCC.h, ++ * the copyright for that material belongs to the original owners. ++ * ++ * Additional material and changes where applicable is: ++ * Copyright (C) 2008 Freescale Semiconductor, Inc. All rights reserved. ++ * ++ * Author: Ebony Zhu, ++ * Yu Liu, ++ * ++ * THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort has ++ * been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT TIMES ++ * RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO PERSONS ++ * AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ALL LOSSES, ++ * COSTS, OR OTHER PROBLEMS THEY INCUR DUE TO THE SOFTWARE, AND WHO FURTHERMORE ++ * EFFECTIVELY INDEMNIFY JOHN HAUSER AND THE INTERNATIONAL COMPUTER SCIENCE ++ * INSTITUTE (possibly via similar legal warning) AGAINST ALL LOSSES, COSTS, OR ++ * OTHER PROBLEMS INCURRED BY THEIR CUSTOMERS AND CLIENTS DUE TO THE SOFTWARE. ++ */ ++ ++/* ++------------------------------------------------------------------------------- ++One of the macros `BIGENDIAN' or `LITTLEENDIAN' must be defined. ++------------------------------------------------------------------------------- ++*/ ++#define BIGENDIAN ++ ++/* ++------------------------------------------------------------------------------- ++The macro `BITS64' can be defined to indicate that 64-bit integer types are ++supported by the compiler. ++------------------------------------------------------------------------------- ++*/ ++#undef BITS64 ++ ++/* ++------------------------------------------------------------------------------- ++Each of the following `typedef's defines the most convenient type that holds ++integers of at least as many bits as specified. For example, `uint8' should ++be the most convenient type that can hold unsigned integers of as many as ++8 bits. The `flag' type must be able to hold either a 0 or 1. For most ++implementations of C, `flag', `uint8', and `int8' should all be `typedef'ed ++to the same as `int'. ++------------------------------------------------------------------------------- ++*/ ++typedef int flag; ++typedef int uint8; ++typedef int int8; ++typedef int uint16; ++typedef int int16; ++typedef unsigned int uint32; ++typedef signed int int32; ++#ifdef BITS64 ++typedef unsigned long long int uint64; ++typedef signed long long int int64; ++#endif ++ ++/* ++------------------------------------------------------------------------------- ++Each of the following `typedef's defines a type that holds integers ++of _exactly_ the number of bits specified. For instance, for most ++implementation of C, `bits16' and `sbits16' should be `typedef'ed to ++`unsigned short int' and `signed short int' (or `short int'), respectively. ++------------------------------------------------------------------------------- ++*/ ++typedef unsigned char bits8; ++typedef signed char sbits8; ++typedef unsigned short int bits16; ++typedef signed short int sbits16; ++typedef unsigned int bits32; ++typedef signed int sbits32; ++#ifdef BITS64 ++typedef unsigned long long int bits64; ++typedef signed long long int sbits64; ++#endif ++ ++#ifdef BITS64 ++/* ++------------------------------------------------------------------------------- ++The `LIT64' macro takes as its argument a textual integer literal and ++if necessary ``marks'' the literal as having a 64-bit integer type. ++For example, the GNU C Compiler (`gcc') requires that 64-bit literals be ++appended with the letters `LL' standing for `long long', which is `gcc's ++name for the 64-bit integer type. Some compilers may allow `LIT64' to be ++defined as the identity macro: `#define LIT64( a ) a'. ++------------------------------------------------------------------------------- ++*/ ++#define LIT64( a ) a##LL ++#endif ++ ++/* ++------------------------------------------------------------------------------- ++The macro `INLINE' can be used before functions that should be inlined. If ++a compiler does not support explicit inlining, this macro should be defined ++to be `static'. ++------------------------------------------------------------------------------- ++*/ ++#define INLINE extern inline ++ +diff --git a/testfloat/powerpc-linux-gcc/Makefile b/testfloat/powerpc-linux-gcc/Makefile +new file mode 100644 +index 0000000..de50aad +--- /dev/null ++++ b/testfloat/powerpc-linux-gcc/Makefile +@@ -0,0 +1,83 @@ ++ ++PROCESSOR_H = ../../processors/POWERPC-gcc.h ++SOFTFLOAT_VERSION = bits32 ++TARGET = powerpc-GCC ++SOFTFLOAT_DIR = ../../SoftFloat-2b/softfloat/$(SOFTFLOAT_VERSION)/$(TARGET) ++ ++OBJ = .o ++EXE = ++INCLUDES = -I. -I.. -I$(SOFTFLOAT_DIR) ++ ++COMPILE_C = $(COMPILE_PREFIX)gcc -c -o $@ $(INCLUDES) -I- -O $(EXTRA_CFLAGS) ++ ++COMPILE_C_HARD = $(COMPILE_PREFIX)gcc -c -te500v2 -o $@ $(INCLUDES) ++ ++COMPILE_SLOWFLOAT_C = $(COMPILE_PREFIX)gcc -c -o $@ $(INCLUDES) -I- -O ++ ++LINK = $(COMPILE_PREFIX)gcc -lm -o $@ ++ ++SOFTFLOAT_H = $(SOFTFLOAT_DIR)/softfloat.h ++SOFTFLOAT_OBJ = $(SOFTFLOAT_DIR)/softfloat$(OBJ) ++ ++ALL: testsoftfloat$(EXE) testfloat$(EXE) ++ ++systmodes$(OBJ): milieu.h systmodes.c ++ $(COMPILE_C) systmodes.c ++ ++systflags$(OBJ): milieu.h ../systflags.h systflags.c ++ $(COMPILE_C) systflags.c ++ ++systfloat$(OBJ): milieu.h $(SOFTFLOAT_H) ../systfloat.h systfloat.c ++ $(COMPILE_C_HARD) systfloat.c ++ ++#------------------------------------------------------------------------------ ++# Probably O.K. below here. ++#------------------------------------------------------------------------------ ++ ++milieu.h: $(PROCESSOR_H) ++ touch milieu.h ++ ++fail$(OBJ): milieu.h ../fail.h ++ $(COMPILE_C) ../fail.c ++ ++random$(OBJ): milieu.h ../random.h ++ $(COMPILE_C) ../random.c ++ ++testCases$(OBJ): milieu.h ../fail.h ../random.h $(SOFTFLOAT_H) ../testCases.h ../testCases.c ++ $(COMPILE_C) ../testCases.c ++ ++writeHex$(OBJ): milieu.h $(SOFTFLOAT_H) ../writeHex.h ../writeHex.c ++ $(COMPILE_C) ../writeHex.c ++ ++testLoops$(OBJ): milieu.h $(SOFTFLOAT_H) ../testCases.h ../writeHex.h ../testLoops.h ../testLoops.c ++ $(COMPILE_C) ../testLoops.c ++ ++slowfloat$(OBJ): milieu.h $(SOFTFLOAT_H) ../slowfloat.h ../slowfloat-32.c ../slowfloat-64.c ../slowfloat.c ++ $(COMPILE_SLOWFLOAT_C) ../slowfloat.c ++ ++testsoftfloat$(OBJ): milieu.h ../fail.h $(SOFTFLOAT_H) ../testCases.h ../testLoops.h ../slowfloat.h ../testsoftfloat.c ++ $(COMPILE_C) ../testsoftfloat.c ++ ++testsoftfloat$(EXE): fail$(OBJ) random$(OBJ) $(SOFTFLOAT_OBJ) testCases$(OBJ) writeHex$(OBJ) testLoops$(OBJ) slowfloat$(OBJ) testsoftfloat$(OBJ) systflags$(OBJ) systmodes$(OBJ) ++ $(LINK) fail$(OBJ) random$(OBJ) $(SOFTFLOAT_OBJ) testCases$(OBJ) writeHex$(OBJ) testLoops$(OBJ) slowfloat$(OBJ) testsoftfloat$(OBJ) systflags$(OBJ) systmodes$(OBJ) ++ ++testFunction$(OBJ): milieu.h $(SOFTFLOAT_H) ../testCases.h ../testLoops.h ../systmodes.h ../systflags.h ../systfloat.h ../testFunction.h ../testFunction.c ++ $(COMPILE_C) ../testFunction.c ++ ++testfloat$(OBJ): milieu.h ../fail.h $(SOFTFLOAT_H) ../testCases.h ../testLoops.h ../systflags.h ../testFunction.h ../testfloat.c ++ $(COMPILE_C) ../testfloat.c ++ ++testfloat$(EXE): fail$(OBJ) random$(OBJ) $(SOFTFLOAT_OBJ) testCases$(OBJ) writeHex$(OBJ) testLoops$(OBJ) systmodes$(OBJ) systflags$(OBJ) systfloat$(OBJ) testFunction$(OBJ) testfloat$(OBJ) ++ $(LINK) fail$(OBJ) random$(OBJ) $(SOFTFLOAT_OBJ) testCases$(OBJ) writeHex$(OBJ) testLoops$(OBJ) systmodes$(OBJ) systflags$(OBJ) systfloat$(OBJ) testFunction$(OBJ) testfloat$(OBJ) ++ ++$(SOFTFLOAT_OBJ): ++ make -C $(SOFTFLOAT_DIR) ++ ++cp: ALL ++ cp testsoftfloat$(EXE) ../../test_softfloat$(EXE) ++ cp testfloat$(EXE) ../../test_float$(EXE) ++ ++clean: ++ make -C $(SOFTFLOAT_DIR) clean ++ rm -f *.o testfloat$(EXE) testsoftfloat$(EXE) ++ rm -f ../../test_softfloat$(EXE) ../../test_float$(EXE) +diff --git a/testfloat/powerpc-linux-gcc/milieu.h b/testfloat/powerpc-linux-gcc/milieu.h +new file mode 100644 +index 0000000..29d2b18 +--- /dev/null ++++ b/testfloat/powerpc-linux-gcc/milieu.h +@@ -0,0 +1,71 @@ ++/* ++ * This file is derived from testfloat/386-Win32-gcc/milieu.h, ++ * the copyright for that material belongs to the original owners. ++ * ++ * Additional material and changes where applicable is: ++ * Copyright (C) 2008 Freescale Semiconductor, Inc. All rights reserved. ++ * ++ * Author: Ebony Zhu, ++ * Yu Liu, ++ */ ++ ++/* ++=============================================================================== ++ ++This C header file is part of TestFloat, Release 2a, a package of programs ++for testing the correctness of floating-point arithmetic complying to the ++IEC/IEEE Standard for Floating-Point. ++ ++Written by John R. Hauser. More information is available through the Web ++page `http://HTTP.CS.Berkeley.EDU/~jhauser/arithmetic/TestFloat.html'. ++ ++THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort ++has been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT ++TIMES RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO ++PERSONS AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ANY ++AND ALL LOSSES, COSTS, OR OTHER PROBLEMS ARISING FROM ITS USE. ++ ++Derivative works are acceptable, even for commercial purposes, so long as ++(1) they include prominent notice that the work is derivative, and (2) they ++include prominent notice akin to these four paragraphs for those parts of ++this code that are retained. ++ ++=============================================================================== ++*/ ++ ++/* ++------------------------------------------------------------------------------- ++Include common integer types and flags. ++------------------------------------------------------------------------------- ++*/ ++#include "../../processors/POWERPC-gcc.h" ++/* ++------------------------------------------------------------------------------- ++If the `BITS64' macro is defined by the processor header file but the ++version of SoftFloat being used/tested is the 32-bit one (`bits32'), the ++`BITS64' macro must be undefined here. ++------------------------------------------------------------------------------- ++*/ ++ ++#undef BITS64 ++/* ++------------------------------------------------------------------------------- ++The macro `LONG_DOUBLE_IS_FLOATX80' can be defined to indicate that the ++C compiler supports the type `long double' as an extended double-precision ++format. Alternatively, the macro `LONG_DOUBLE_IS_FLOAT128' can be defined ++to indicate that `long double' is a quadruple-precision format. If neither ++of these macros is defined, `long double' will be ignored. ++------------------------------------------------------------------------------- ++#define LONG_DOUBLE_IS_FLOATX80 ++*/ ++ ++/* ++------------------------------------------------------------------------------- ++Symbolic Boolean literals. ++------------------------------------------------------------------------------- ++*/ ++enum { ++ FALSE = 0, ++ TRUE = 1 ++}; ++ +diff --git a/testfloat/powerpc-linux-gcc/systflags.c b/testfloat/powerpc-linux-gcc/systflags.c +new file mode 100644 +index 0000000..c382442 +--- /dev/null ++++ b/testfloat/powerpc-linux-gcc/systflags.c +@@ -0,0 +1,107 @@ ++/* ++ * This file is derived from testfloat/386-Win32-gcc/systflags.c, ++ * the copyright for that material belongs to the original owners. ++ * ++ * Additional material and changes where applicable is: ++ * Copyright (C) 2008 Freescale Semiconductor, Inc. All rights reserved. ++ * ++ * Author: Ebony Zhu, ++ * Yu Liu, ++ */ ++ ++/* ++=============================================================================== ++ ++This C source file is part of TestFloat, Release 2a, a package of programs ++for testing the correctness of floating-point arithmetic complying to the ++IEC/IEEE Standard for Floating-Point. ++ ++Written by John R. Hauser. More information is available through the Web ++page `http://HTTP.CS.Berkeley.EDU/~jhauser/arithmetic/TestFloat.html'. ++ ++THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort ++has been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT ++TIMES RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO ++PERSONS AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ANY ++AND ALL LOSSES, COSTS, OR OTHER PROBLEMS ARISING FROM ITS USE. ++ ++Derivative works are acceptable, even for commercial purposes, so long as ++(1) they include prominent notice that the work is derivative, and (2) they ++include prominent notice akin to these four paragraphs for those parts of ++this code that are retained. ++ ++=============================================================================== ++*/ ++ ++#include "milieu.h" ++#include "systflags.h" ++#include ++#include ++#include ++#include ++#include ++ ++#ifdef __SPE__ ++ ++#include ++ ++ ++#define SPE_FINV_ENABLE (1UL << 5) ++#define SPE_FDBZ_ENABLE (1UL << 4) ++#define SPE_FUNF_ENABLE (1UL << 3) ++#define SPE_FOVF_ENABLE (1UL << 2) ++ ++#define SPE_FG (1UL << 13) ++#define SPE_FX (1UL << 12) ++#define SPE_FINV (1UL << 11) ++#define SPE_FDBZ (1UL << 10) ++#define SPE_FUNF (1UL << 9) ++#define SPE_FOVF (1UL << 8) ++ ++#define SPE_FG_H (1UL << 29) ++#define SPE_FX_H (1UL << 28) ++#define SPE_FINV_H (1UL << 27) ++#define SPE_FDBZ_H (1UL << 26) ++#define SPE_FUNF_H (1UL << 25) ++#define SPE_FOVF_H (1UL << 24) ++ ++static int is_soft_emu = 0; ++ ++#endif ++/* ++------------------------------------------------------------------------------- ++Clears the system's IEC/IEEE floating-point exception flags. Returns the ++previous value of the flags. ++------------------------------------------------------------------------------- ++*/ ++extern int rounding; ++unsigned int spefscr = 0; ++ ++int8 syst_float_flags_clear( void ) ++{ ++#ifdef TEST_KERNEL_EMU ++ if( (spefscr & (SPE_FINV | SPE_FINV_H)) ++ || (spefscr & (SPE_FDBZ | SPE_FDBZ_H)) ++ || (spefscr & (SPE_FUNF | SPE_FUNF_H)) ++ || (spefscr & (SPE_FOVF | SPE_FOVF_H)) ++ || (spefscr & (SPE_FX | SPE_FG | SPE_FX_H | SPE_FG_H))){ ++ is_soft_emu = 1; ++ } else { ++ is_soft_emu = 0; ++ } ++#endif ++ __builtin_spe_mtspefscr(0x3c|(rounding & 0x3)); ++ ++ return ((spefscr>>17) & 0x1f); ++} ++ ++int syst_float_is_soft_emu(void) ++{ ++ int ret = 0; ++#ifdef TEST_KERNEL_EMU ++ ret = is_soft_emu; ++#endif ++ return ret; ++} ++ ++ +diff --git a/testfloat/powerpc-linux-gcc/systfloat.c b/testfloat/powerpc-linux-gcc/systfloat.c +new file mode 100644 +index 0000000..8d06f9f +--- /dev/null ++++ b/testfloat/powerpc-linux-gcc/systfloat.c +@@ -0,0 +1,595 @@ ++/* ++ * This file is derived from testfloat/systfloat.c, ++ * the copyright for that material belongs to the original owners. ++ * ++ * Additional material and changes where applicable is: ++ * Copyright (C) 2008 Freescale Semiconductor, Inc. All rights reserved. ++ * ++ * Author: Ebony Zhu, ++ * Yu Liu, ++ */ ++ ++/* ++=============================================================================== ++ ++This C source file is part of TestFloat, Release 2a, a package of programs ++for testing the correctness of floating-point arithmetic complying to the ++IEC/IEEE Standard for Floating-Point. ++ ++Written by John R. Hauser. More information is available through the Web ++page `http://HTTP.CS.Berkeley.EDU/~jhauser/arithmetic/TestFloat.html'. ++ ++THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort ++has been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT ++TIMES RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO ++PERSONS AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ANY ++AND ALL LOSSES, COSTS, OR OTHER PROBLEMS ARISING FROM ITS USE. ++ ++Derivative works are acceptable, even for commercial purposes, so long as ++(1) they include prominent notice that the work is derivative, and (2) they ++include prominent notice akin to these four paragraphs for those parts of ++this code that are retained. ++ ++=============================================================================== ++*/ ++ ++#include ++#include "milieu.h" ++#include "softfloat.h" ++#include "systfloat.h" ++ ++extern unsigned int spefscr; ++ ++float32 syst_int32_to_float32( int32 a ) ++{ ++ float32 z; ++ ++ *( (float *) &z ) = a; ++ spefscr = __builtin_spe_mfspefscr(); ++ return z; ++ ++} ++ ++float64 syst_int32_to_float64( int32 a ) ++{ ++ float64 z; ++ ++ *( (double *) &z ) = a; ++ spefscr = __builtin_spe_mfspefscr(); ++ return z; ++ ++} ++ ++#if defined( FLOATX80 ) && defined( LONG_DOUBLE_IS_FLOATX80 ) ++ ++floatx80 syst_int32_to_floatx80( int32 a ) ++{ ++ floatx80 z; ++ ++ *( (long double *) &z ) = a; ++ return z; ++ ++} ++ ++#endif ++ ++#if defined( FLOAT128 ) && defined( LONG_DOUBLE_IS_FLOAT128 ) ++ ++float128 syst_int32_to_float128( int32 a ) ++{ ++ float128 z; ++ ++ *( (long double *) &z ) = a; ++ return z; ++ ++} ++ ++#endif ++ ++#ifdef BITS64 ++ ++float32 syst_int64_to_float32( int64 a ) ++{ ++ float32 z; ++ ++ *( (float *) &z ) = a; ++ spefscr = __builtin_spe_mfspefscr(); ++ return z; ++ ++} ++ ++float64 syst_int64_to_float64( int64 a ) ++{ ++ float64 z; ++ ++ *( (double *) &z ) = a; ++ spefscr = __builtin_spe_mfspefscr(); ++ return z; ++ ++} ++ ++#if defined( FLOATX80 ) && defined( LONG_DOUBLE_IS_FLOATX80 ) ++ ++floatx80 syst_int64_to_floatx80( int64 a ) ++{ ++ floatx80 z; ++ ++ *( (long double *) &z ) = a; ++ return z; ++ ++} ++ ++#endif ++ ++#if defined( FLOAT128 ) && defined( LONG_DOUBLE_IS_FLOAT128 ) ++ ++float128 syst_int64_to_float128( int64 a ) ++{ ++ float128 z; ++ ++ *( (long double *) &z ) = a; ++ return z; ++ ++} ++ ++#endif ++ ++#endif ++ ++int32 syst_float32_to_int32_round_to_zero( float32 a ) ++{ ++ int32 z = *( (float *) &a ); ++ spefscr = __builtin_spe_mfspefscr(); ++ ++ return z; ++ ++} ++ ++#ifdef BITS64 ++ ++int64 syst_float32_to_int64_round_to_zero( float32 a ) ++{ ++ int64 z = *( (float *) &a ); ++ spefscr = __builtin_spe_mfspefscr(); ++ return z; ++ ++} ++ ++#endif ++ ++float64 syst_float32_to_float64( float32 a ) ++{ ++ float64 z; ++ ++ *( (double *) &z ) = *( (float *) &a ); ++ spefscr = __builtin_spe_mfspefscr(); ++ return z; ++ ++} ++ ++#if defined( FLOATX80 ) && defined( LONG_DOUBLE_IS_FLOATX80 ) ++ ++floatx80 syst_float32_to_floatx80( float32 a ) ++{ ++ floatx80 z; ++ ++ *( (long double *) &z ) = *( (float *) &a ); ++ return z; ++ ++} ++ ++#endif ++ ++#if defined( FLOAT128 ) && defined( LONG_DOUBLE_IS_FLOAT128 ) ++ ++float128 syst_float32_to_float128( float32 a ) ++{ ++ float128 z; ++ ++ *( (long double *) &z ) = *( (float *) &a ); ++ return z; ++ ++} ++ ++#endif ++ ++float32 syst_float32_add( float32 a, float32 b ) ++{ ++ float32 z; ++ ++ *( (float *) &z ) = *( (float *) &a ) + *( (float *) &b ); ++ spefscr = __builtin_spe_mfspefscr(); ++ return z; ++ ++} ++ ++float32 syst_float32_sub( float32 a, float32 b ) ++{ ++ float32 z; ++ ++ *( (float *) &z ) = *( (float *) &a ) - *( (float *) &b ); ++ spefscr = __builtin_spe_mfspefscr(); ++ return z; ++ ++} ++ ++float32 syst_float32_mul( float32 a, float32 b ) ++{ ++ float32 z; ++ ++ *( (float *) &z ) = *( (float *) &a ) * *( (float *) &b ); ++ spefscr = __builtin_spe_mfspefscr(); ++ return z; ++ ++} ++ ++float32 syst_float32_div( float32 a, float32 b ) ++{ ++ float32 z; ++ ++ *( (float *) &z ) = *( (float *) &a ) / *( (float *) &b ); ++ spefscr = __builtin_spe_mfspefscr(); ++ return z; ++ ++} ++ ++flag syst_float32_eq( float32 a, float32 b ) ++{ ++ flag f = ( *( (float *) &a ) == *( (float *) &b ) ); ++ spefscr = __builtin_spe_mfspefscr(); ++ return f; ++ ++} ++ ++flag syst_float32_le( float32 a, float32 b ) ++{ ++ flag f = ( *( (float *) &a ) <= *( (float *) &b ) ); ++ spefscr = __builtin_spe_mfspefscr(); ++ return f; ++ ++} ++ ++flag syst_float32_lt( float32 a, float32 b ) ++{ ++ flag f = ( *( (float *) &a ) < *( (float *) &b ) ); ++ spefscr = __builtin_spe_mfspefscr(); ++ return f; ++ ++} ++ ++int32 syst_float64_to_int32_round_to_zero( float64 a ) ++{ ++ int32 z = *( (double *) &a ); ++ spefscr = __builtin_spe_mfspefscr(); ++ return z; ++ ++} ++ ++#ifdef BITS64 ++ ++int64 syst_float64_to_int64_round_to_zero( float64 a ) ++{ ++ int64 z = *( (double *) &a ); ++ spefscr = __builtin_spe_mfspefscr(); ++ return z; ++ ++} ++ ++#endif ++ ++float32 syst_float64_to_float32( float64 a ) ++{ ++ float32 z; ++ ++ *( (float *) &z ) = *( (double *) &a ); ++ spefscr = __builtin_spe_mfspefscr(); ++ return z; ++ ++} ++ ++#if defined( FLOATX80 ) && defined( LONG_DOUBLE_IS_FLOATX80 ) ++ ++floatx80 syst_float64_to_floatx80( float64 a ) ++{ ++ floatx80 z; ++ ++ *( (long double *) &z ) = *( (double *) &a ); ++ return z; ++ ++} ++ ++#endif ++ ++#if defined( FLOAT128 ) && defined( LONG_DOUBLE_IS_FLOAT128 ) ++ ++float128 syst_float64_to_float128( float64 a ) ++{ ++ float128 z; ++ ++ *( (long double *) &z ) = *( (double *) &a ); ++ return z; ++ ++} ++ ++#endif ++ ++float64 syst_float64_add( float64 a, float64 b ) ++{ ++ float64 z; ++ ++ *( (double *) &z ) = *( (double *) &a ) + *( (double *) &b ); ++ spefscr = __builtin_spe_mfspefscr(); ++ return z; ++ ++} ++ ++float64 syst_float64_sub( float64 a, float64 b ) ++{ ++ float64 z; ++ ++ *( (double *) &z ) = *( (double *) &a ) - *( (double *) &b ); ++ spefscr = __builtin_spe_mfspefscr(); ++ return z; ++ ++} ++ ++float64 syst_float64_mul( float64 a, float64 b ) ++{ ++ float64 z; ++ ++ *( (double *) &z ) = *( (double *) &a ) * *( (double *) &b ); ++ spefscr = __builtin_spe_mfspefscr(); ++ return z; ++ ++} ++ ++float64 syst_float64_div( float64 a, float64 b ) ++{ ++ float64 z; ++ ++ *( (double *) &z ) = *( (double *) &a ) / *( (double *) &b ); ++ spefscr = __builtin_spe_mfspefscr(); ++ return z; ++ ++} ++ ++float64 syst_float64_sqrt( float64 a ) ++{ ++ /* Ebony ++ float64 z; ++ ++ *( (double *) &z ) = sqrt( *( (double *) &a ) ); ++ spefscr = __builtin_spe_mfspefscr(); ++ return z; ++ */ ++ ++} ++ ++flag syst_float64_eq( float64 a, float64 b ) ++{ ++ flag f = ( *( (double *) &a ) == *( (double *) &b ) ); ++ spefscr = __builtin_spe_mfspefscr(); ++ return f; ++ ++} ++ ++flag syst_float64_le( float64 a, float64 b ) ++{ ++ flag f = ( *( (double *) &a ) <= *( (double *) &b ) ); ++ spefscr = __builtin_spe_mfspefscr(); ++ return f; ++ ++} ++ ++flag syst_float64_lt( float64 a, float64 b ) ++{ ++ flag f = ( *( (double *) &a ) < *( (double *) &b ) ); ++ spefscr = __builtin_spe_mfspefscr(); ++ return f; ++ ++} ++ ++#if defined( FLOATX80 ) && defined( LONG_DOUBLE_IS_FLOATX80 ) ++ ++int32 syst_floatx80_to_int32_round_to_zero( floatx80 a ) ++{ ++ ++ return *( (long double *) &a ); ++ ++} ++ ++#ifdef BITS64 ++ ++int64 syst_floatx80_to_int64_round_to_zero( floatx80 a ) ++{ ++ ++ return *( (long double *) &a ); ++ ++} ++ ++#endif ++ ++float32 syst_floatx80_to_float32( floatx80 a ) ++{ ++ float32 z; ++ ++ *( (float *) &z ) = *( (long double *) &a ); ++ return z; ++ ++} ++ ++float64 syst_floatx80_to_float64( floatx80 a ) ++{ ++ float64 z; ++ ++ *( (double *) &z ) = *( (long double *) &a ); ++ return z; ++ ++} ++ ++floatx80 syst_floatx80_add( floatx80 a, floatx80 b ) ++{ ++ floatx80 z; ++ ++ *( (long double *) &z ) = ++ *( (long double *) &a ) + *( (long double *) &b ); ++ return z; ++ ++} ++ ++floatx80 syst_floatx80_sub( floatx80 a, floatx80 b ) ++{ ++ floatx80 z; ++ ++ *( (long double *) &z ) = ++ *( (long double *) &a ) - *( (long double *) &b ); ++ return z; ++ ++} ++ ++floatx80 syst_floatx80_mul( floatx80 a, floatx80 b ) ++{ ++ floatx80 z; ++ ++ *( (long double *) &z ) = ++ *( (long double *) &a ) * *( (long double *) &b ); ++ return z; ++ ++} ++ ++floatx80 syst_floatx80_div( floatx80 a, floatx80 b ) ++{ ++ floatx80 z; ++ ++ *( (long double *) &z ) = ++ *( (long double *) &a ) / *( (long double *) &b ); ++ spefscr = __builtin_spe_mfspefscr(); ++ return z; ++ ++} ++ ++flag syst_floatx80_eq( floatx80 a, floatx80 b ) ++{ ++ ++ return ( *( (long double *) &a ) == *( (long double *) &b ) ); ++ ++} ++ ++flag syst_floatx80_le( floatx80 a, floatx80 b ) ++{ ++ ++ return ( *( (long double *) &a ) <= *( (long double *) &b ) ); ++ ++} ++ ++flag syst_floatx80_lt( floatx80 a, floatx80 b ) ++{ ++ ++ return ( *( (long double *) &a ) < *( (long double *) &b ) ); ++ ++} ++ ++#endif ++ ++#if defined( FLOAT128 ) && defined( LONG_DOUBLE_IS_FLOAT128 ) ++ ++int32 syst_float128_to_int32_round_to_zero( float128 a ) ++{ ++ ++ return *( (long double *) &a ); ++ ++} ++ ++#ifdef BITS64 ++ ++int64 syst_float128_to_int64_round_to_zero( float128 a ) ++{ ++ ++ return *( (long double *) &a ); ++ ++} ++ ++#endif ++ ++float32 syst_float128_to_float32( float128 a ) ++{ ++ float32 z; ++ ++ *( (float *) &z ) = *( (long double *) &a ); ++ return z; ++ ++} ++ ++float64 syst_float128_to_float64( float128 a ) ++{ ++ float64 z; ++ ++ *( (double *) &z ) = *( (long double *) &a ); ++ return z; ++ ++} ++ ++float128 syst_float128_add( float128 a, float128 b ) ++{ ++ float128 z; ++ ++ *( (long double *) &z ) = ++ *( (long double *) &a ) + *( (long double *) &b ); ++ return z; ++ ++} ++ ++float128 syst_float128_sub( float128 a, float128 b ) ++{ ++ float128 z; ++ ++ *( (long double *) &z ) = ++ *( (long double *) &a ) - *( (long double *) &b ); ++ return z; ++ ++} ++ ++float128 syst_float128_mul( float128 a, float128 b ) ++{ ++ float128 z; ++ ++ *( (long double *) &z ) = ++ *( (long double *) &a ) * *( (long double *) &b ); ++ return z; ++ ++} ++ ++float128 syst_float128_div( float128 a, float128 b ) ++{ ++ float128 z; ++ ++ *( (long double *) &z ) = ++ *( (long double *) &a ) / *( (long double *) &b ); ++ spefscr = __builtin_spe_mfspefscr(); ++ return z; ++ ++} ++ ++flag syst_float128_eq( float128 a, float128 b ) ++{ ++ ++ return ( *( (long double *) &a ) == *( (long double *) &b ) ); ++ ++} ++ ++flag syst_float128_le( float128 a, float128 b ) ++{ ++ ++ return ( *( (long double *) &a ) <= *( (long double *) &b ) ); ++ ++} ++ ++flag syst_float128_lt( float128 a, float128 b ) ++{ ++ ++ return ( *( (long double *) &a ) < *( (long double *) &b ) ); ++ ++} ++ ++#endif ++ +diff --git a/testfloat/powerpc-linux-gcc/systmodes.c b/testfloat/powerpc-linux-gcc/systmodes.c +new file mode 100644 +index 0000000..143cdea +--- /dev/null ++++ b/testfloat/powerpc-linux-gcc/systmodes.c +@@ -0,0 +1,67 @@ ++/* ++ * This file is derived from testfloat/386-Win32-gcc/systmodes.S, ++ * the copyright for that material belongs to the original owners. ++ * ++ * Additional material and changes where applicable is: ++ * Copyright (C) 2008 Freescale Semiconductor, Inc. All rights reserved. ++ * ++ * Author: Ebony Zhu, ++ * Yu Liu, ++ */ ++ ++/* ++=============================================================================== ++ ++This C source file is part of TestFloat, Release 2a, a package of programs ++for testing the correctness of floating-point arithmetic complying to the ++IEC/IEEE Standard for Floating-Point. ++ ++Written by John R. Hauser. More information is available through the Web ++page `http://HTTP.CS.Berkeley.EDU/~jhauser/arithmetic/TestFloat.html'. ++ ++THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort ++has been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT ++TIMES RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO ++PERSONS AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ANY ++AND ALL LOSSES, COSTS, OR OTHER PROBLEMS ARISING FROM ITS USE. ++ ++Derivative works are acceptable, even for commercial purposes, so long as ++(1) they include prominent notice that the work is derivative, and (2) they ++include prominent notice akin to these four paragraphs for those parts of ++this code that are retained. ++ ++=============================================================================== ++*/ ++ ++#include ++#include "milieu.h" ++#include "systmodes.h" ++/* ++------------------------------------------------------------------------------- ++Sets the system's IEC/IEEE floating-point rounding mode. Also disables all ++system exception traps. ++------------------------------------------------------------------------------- ++*/ ++int rounding; ++ ++void syst_float_set_rounding_mode( int8 roundingMode ) ++{ ++ (void) fesetround ( roundingMode ); ++ rounding = roundingMode; ++} ++ ++/* ++------------------------------------------------------------------------------- ++Sets the rounding precision of subsequent extended double-precision ++operations. The `precision' argument should be one of 0, 32, 64, or 80. ++If `precision' is 32, the rounding precision is set equivalent to single ++precision; else if `precision' is 64, the rounding precision is set ++equivalent to double precision; else the rounding precision is set to full ++extended double precision. ++------------------------------------------------------------------------------- ++*/ ++void syst_float_set_rounding_precision( int8 precision ) ++{ ++ ++} ++ +diff --git a/testfloat/templates/Makefile b/testfloat/templates/Makefile +index f5f3cde..18cffe0 100644 +--- a/testfloat/templates/Makefile ++++ b/testfloat/templates/Makefile +@@ -1,15 +1,21 @@ + +-PROCESSOR_H = ../../processors/!!!processor.h ++#PROCESSOR_H = ../../processors/!!!processor.h ++PROCESSOR_H = ../../processors/POWERPC-gcc.h + SOFTFLOAT_VERSION = bits64 +-TARGET = !!!target +-SOFTFLOAT_DIR = ../../softfloat/$(SOFTFLOAT_VERSION)/$(TARGET) ++ ++#TARGET = !!!target ++TARGET = powerpc-GCC ++SOFTFLOAT_DIR = ../../../SoftFloat-2b/softfloat/$(SOFTFLOAT_VERSION)/$(TARGET) + + OBJ = .o + EXE = + INCLUDES = -I. -I.. -I$(SOFTFLOAT_DIR) +-COMPILE_C = gcc -c -o $@ $(INCLUDES) -I- -O2 +-COMPILE_SLOWFLOAT_C = gcc -c -o $@ $(INCLUDES) -I- -O3 +-LINK = gcc -o $@ ++#COMPILE_C = gcc -c -o $@ $(INCLUDES) -I- -O2 ++#COMPILE_SLOWFLOAT_C = gcc -c -o $@ $(INCLUDES) -I- -O3 ++#LINK = gcc -o $@ ++COMPILE_C = /opt/mtwk/usr/local/gcc-3_4-e500-glibc-2.3.4-dp/powerpc-linux-gnuspe/bin/powerpc-linux-gnuspe-gcc -c -o $@ $(INCLUDES) -I- -O2 ++COMPILE_SLOWFLOAT_C = /opt/mtwk/usr/local/gcc-3_4-e500-glibc-2.3.4-dp/powerpc-linux-gnuspe/bin/powerpc-linux-gnuspe-gcc -c -o $@ $(INCLUDES) -I- -O3 ++LINK = /opt/mtwk/usr/local/gcc-3_4-e500-glibc-2.3.4-dp/powerpc-linux-gnuspe/bin/powerpc-linux-gnuspe-gcc -o $@ + + SOFTFLOAT_H = $(SOFTFLOAT_DIR)/softfloat.h + SOFTFLOAT_OBJ = $(SOFTFLOAT_DIR)/softfloat$(OBJ) +diff --git a/testfloat/templates/milieu.h b/testfloat/templates/milieu.h +index 56d3ac4..3214ca8 100644 +--- a/testfloat/templates/milieu.h ++++ b/testfloat/templates/milieu.h +@@ -28,7 +28,7 @@ this code that are retained. + Include common integer types and flags. + ------------------------------------------------------------------------------- + */ +-#include "../../processors/!!!processor.h" ++#include "../../processors/SPARC-gcc.h" + + /* + ------------------------------------------------------------------------------- +diff --git a/testfloat/testFunction.h b/testfloat/testFunction.h +index 04bf856..00139a7 100644 +--- a/testfloat/testFunction.h ++++ b/testfloat/testFunction.h +@@ -126,8 +126,8 @@ extern const flag functionExists[ NUM_FUNCTIONS ]; + enum { + ROUND_NEAREST_EVEN = 1, + ROUND_TO_ZERO, +- ROUND_DOWN, + ROUND_UP, ++ ROUND_DOWN, + NUM_ROUNDINGMODES + }; + +diff --git a/testfloat/testLoops.c b/testfloat/testLoops.c +index 8ba92f3..ba05548 100644 +--- a/testfloat/testLoops.c ++++ b/testfloat/testLoops.c +@@ -488,6 +488,11 @@ void + (void) testFlagsFunctionPtr(); + testZ = testFunction( testCases_a_int32 ); + testFlags = testFlagsFunctionPtr(); ++#ifdef TEST_KERNEL_EMU ++ if (! syst_float_is_soft_emu()){ ++ continue; ++ } ++#endif + --count; + if ( count == 0 ) { + checkEarlyExit(); +@@ -539,6 +544,11 @@ void + (void) testFlagsFunctionPtr(); + testZ = testFunction( testCases_a_int32 ); + testFlags = testFlagsFunctionPtr(); ++#ifdef TEST_KERNEL_EMU ++ if (! syst_float_is_soft_emu()){ ++ continue; ++ } ++#endif + --count; + if ( count == 0 ) { + checkEarlyExit(); +@@ -592,6 +602,11 @@ void + (void) testFlagsFunctionPtr(); + testZ = testFunction( testCases_a_int32 ); + testFlags = testFlagsFunctionPtr(); ++#ifdef TEST_KERNEL_EMU ++ if (! syst_float_is_soft_emu()){ ++ continue; ++ } ++#endif + --count; + if ( count == 0 ) { + checkEarlyExit(); +@@ -647,6 +662,11 @@ void + (void) testFlagsFunctionPtr(); + testZ = testFunction( testCases_a_int32 ); + testFlags = testFlagsFunctionPtr(); ++#ifdef TEST_KERNEL_EMU ++ if (! syst_float_is_soft_emu()){ ++ continue; ++ } ++#endif + --count; + if ( count == 0 ) { + checkEarlyExit(); +@@ -702,6 +722,11 @@ void + (void) testFlagsFunctionPtr(); + testZ = testFunction( testCases_a_int64 ); + testFlags = testFlagsFunctionPtr(); ++#ifdef TEST_KERNEL_EMU ++ if (! syst_float_is_soft_emu()){ ++ continue; ++ } ++#endif + --count; + if ( count == 0 ) { + checkEarlyExit(); +@@ -753,6 +778,11 @@ void + (void) testFlagsFunctionPtr(); + testZ = testFunction( testCases_a_int64 ); + testFlags = testFlagsFunctionPtr(); ++#ifdef TEST_KERNEL_EMU ++ if (! syst_float_is_soft_emu()){ ++ continue; ++ } ++#endif + --count; + if ( count == 0 ) { + checkEarlyExit(); +@@ -806,6 +836,11 @@ void + (void) testFlagsFunctionPtr(); + testZ = testFunction( testCases_a_int64 ); + testFlags = testFlagsFunctionPtr(); ++#ifdef TEST_KERNEL_EMU ++ if (! syst_float_is_soft_emu()){ ++ continue; ++ } ++#endif + --count; + if ( count == 0 ) { + checkEarlyExit(); +@@ -861,6 +896,11 @@ void + (void) testFlagsFunctionPtr(); + testZ = testFunction( testCases_a_int64 ); + testFlags = testFlagsFunctionPtr(); ++#ifdef TEST_KERNEL_EMU ++ if (! syst_float_is_soft_emu()){ ++ continue; ++ } ++#endif + --count; + if ( count == 0 ) { + checkEarlyExit(); +@@ -916,6 +956,11 @@ void + (void) testFlagsFunctionPtr(); + testZ = testFunction( testCases_a_float32 ); + testFlags = testFlagsFunctionPtr(); ++#ifdef TEST_KERNEL_EMU ++ if (! syst_float_is_soft_emu()){ ++ continue; ++ } ++#endif + --count; + if ( count == 0 ) { + checkEarlyExit(); +@@ -973,6 +1018,11 @@ void + (void) testFlagsFunctionPtr(); + testZ = testFunction( testCases_a_float32 ); + testFlags = testFlagsFunctionPtr(); ++#ifdef TEST_KERNEL_EMU ++ if (! syst_float_is_soft_emu()){ ++ continue; ++ } ++#endif + --count; + if ( count == 0 ) { + checkEarlyExit(); +@@ -1030,6 +1080,11 @@ void + (void) testFlagsFunctionPtr(); + testZ = testFunction( testCases_a_float32 ); + testFlags = testFlagsFunctionPtr(); ++#ifdef TEST_KERNEL_EMU ++ if (! syst_float_is_soft_emu()){ ++ continue; ++ } ++#endif + --count; + if ( count == 0 ) { + checkEarlyExit(); +@@ -1087,6 +1142,11 @@ void + (void) testFlagsFunctionPtr(); + testZ = testFunction( testCases_a_float32 ); + testFlags = testFlagsFunctionPtr(); ++#ifdef TEST_KERNEL_EMU ++ if (! syst_float_is_soft_emu()){ ++ continue; ++ } ++#endif + --count; + if ( count == 0 ) { + checkEarlyExit(); +@@ -1146,6 +1206,11 @@ void + (void) testFlagsFunctionPtr(); + testZ = testFunction( testCases_a_float32 ); + testFlags = testFlagsFunctionPtr(); ++#ifdef TEST_KERNEL_EMU ++ if (! syst_float_is_soft_emu()){ ++ continue; ++ } ++#endif + --count; + if ( count == 0 ) { + checkEarlyExit(); +@@ -1203,6 +1268,11 @@ void + (void) testFlagsFunctionPtr(); + testZ = testFunction( testCases_a_float32 ); + testFlags = testFlagsFunctionPtr(); ++#ifdef TEST_KERNEL_EMU ++ if (! syst_float_is_soft_emu()){ ++ continue; ++ } ++#endif + --count; + if ( count == 0 ) { + checkEarlyExit(); +@@ -1260,6 +1330,11 @@ void + (void) testFlagsFunctionPtr(); + testZ = testFunction( testCases_a_float32, testCases_b_float32 ); + testFlags = testFlagsFunctionPtr(); ++#ifdef TEST_KERNEL_EMU ++ if (! syst_float_is_soft_emu()){ ++ continue; ++ } ++#endif + --count; + if ( count == 0 ) { + checkEarlyExit(); +@@ -1312,6 +1387,25 @@ void + (void) testFlagsFunctionPtr(); + testZ = testFunction( testCases_a_float32, testCases_b_float32 ); + testFlags = testFlagsFunctionPtr(); ++ ++if(testCases_a_float32 == 0x7ffffe && testCases_b_float32 == 0x3f7ffffe) ++{ ++ ++ writeErrorFound( 10000 - count ); ++ writeInputs_ab_float32(); ++ fputs( " ", stdout ); ++ writeOutputs_z_float32( trueZ, trueFlags, testZ, testFlags ); ++ fflush( stdout ); ++ if (! syst_float_is_soft_emu()){ ++ exit(-1); ++ } ++} ++#ifdef TEST_KERNEL_EMU ++ if (! syst_float_is_soft_emu()){ ++ continue; ++ } ++#endif ++ + --count; + if ( count == 0 ) { + checkEarlyExit(); +@@ -1370,6 +1464,11 @@ void + (void) testFlagsFunctionPtr(); + testZ = testFunction( testCases_a_float64 ); + testFlags = testFlagsFunctionPtr(); ++#ifdef TEST_KERNEL_EMU ++ if (! syst_float_is_soft_emu()){ ++ continue; ++ } ++#endif + --count; + if ( count == 0 ) { + checkEarlyExit(); +@@ -1427,6 +1526,11 @@ void + (void) testFlagsFunctionPtr(); + testZ = testFunction( testCases_a_float64 ); + testFlags = testFlagsFunctionPtr(); ++#ifdef TEST_KERNEL_EMU ++ if (! syst_float_is_soft_emu()){ ++ continue; ++ } ++#endif + --count; + if ( count == 0 ) { + checkEarlyExit(); +@@ -1484,6 +1588,11 @@ void + (void) testFlagsFunctionPtr(); + testZ = testFunction( testCases_a_float64 ); + testFlags = testFlagsFunctionPtr(); ++#ifdef TEST_KERNEL_EMU ++ if (! syst_float_is_soft_emu()){ ++ continue; ++ } ++#endif + --count; + if ( count == 0 ) { + checkEarlyExit(); +@@ -1541,6 +1650,11 @@ void + (void) testFlagsFunctionPtr(); + testZ = testFunction( testCases_a_float64 ); + testFlags = testFlagsFunctionPtr(); ++#ifdef TEST_KERNEL_EMU ++ if (! syst_float_is_soft_emu()){ ++ continue; ++ } ++#endif + --count; + if ( count == 0 ) { + checkEarlyExit(); +@@ -1600,6 +1714,11 @@ void + (void) testFlagsFunctionPtr(); + testZ = testFunction( testCases_a_float64 ); + testFlags = testFlagsFunctionPtr(); ++#ifdef TEST_KERNEL_EMU ++ if (! syst_float_is_soft_emu()){ ++ continue; ++ } ++#endif + --count; + if ( count == 0 ) { + checkEarlyExit(); +@@ -1657,6 +1776,11 @@ void + (void) testFlagsFunctionPtr(); + testZ = testFunction( testCases_a_float64 ); + testFlags = testFlagsFunctionPtr(); ++#ifdef TEST_KERNEL_EMU ++ if (! syst_float_is_soft_emu()){ ++ continue; ++ } ++#endif + --count; + if ( count == 0 ) { + checkEarlyExit(); +@@ -1714,6 +1838,11 @@ void + (void) testFlagsFunctionPtr(); + testZ = testFunction( testCases_a_float64, testCases_b_float64 ); + testFlags = testFlagsFunctionPtr(); ++#ifdef TEST_KERNEL_EMU ++ if (! syst_float_is_soft_emu()){ ++ continue; ++ } ++#endif + --count; + if ( count == 0 ) { + checkEarlyExit(); +@@ -1766,6 +1895,13 @@ void + (void) testFlagsFunctionPtr(); + testZ = testFunction( testCases_a_float64, testCases_b_float64 ); + testFlags = testFlagsFunctionPtr(); ++ ++#ifdef TEST_KERNEL_EMU ++ if (! syst_float_is_soft_emu()){ ++ continue; ++ } ++#endif ++ + --count; + if ( count == 0 ) { + checkEarlyExit(); +@@ -1826,6 +1962,11 @@ void + (void) testFlagsFunctionPtr(); + testZ = testFunction( testCases_a_floatx80 ); + testFlags = testFlagsFunctionPtr(); ++#ifdef TEST_KERNEL_EMU ++ if (! syst_float_is_soft_emu()){ ++ continue; ++ } ++#endif + --count; + if ( count == 0 ) { + checkEarlyExit(); +@@ -1883,6 +2024,11 @@ void + (void) testFlagsFunctionPtr(); + testZ = testFunction( testCases_a_floatx80 ); + testFlags = testFlagsFunctionPtr(); ++#ifdef TEST_KERNEL_EMU ++ if (! syst_float_is_soft_emu()){ ++ continue; ++ } ++#endif + --count; + if ( count == 0 ) { + checkEarlyExit(); +@@ -1940,6 +2086,11 @@ void + (void) testFlagsFunctionPtr(); + testZ = testFunction( testCases_a_floatx80 ); + testFlags = testFlagsFunctionPtr(); ++#ifdef TEST_KERNEL_EMU ++ if (! syst_float_is_soft_emu()){ ++ continue; ++ } ++#endif + --count; + if ( count == 0 ) { + checkEarlyExit(); +@@ -1995,6 +2146,11 @@ void + (void) testFlagsFunctionPtr(); + testZ = testFunction( testCases_a_floatx80 ); + testFlags = testFlagsFunctionPtr(); ++#ifdef TEST_KERNEL_EMU ++ if (! syst_float_is_soft_emu()){ ++ continue; ++ } ++#endif + --count; + if ( count == 0 ) { + checkEarlyExit(); +@@ -2052,6 +2208,11 @@ void + (void) testFlagsFunctionPtr(); + testZ = testFunction( testCases_a_floatx80 ); + testFlags = testFlagsFunctionPtr(); ++#ifdef TEST_KERNEL_EMU ++ if (! syst_float_is_soft_emu()){ ++ continue; ++ } ++#endif + --count; + if ( count == 0 ) { + checkEarlyExit(); +@@ -2109,6 +2270,11 @@ void + (void) testFlagsFunctionPtr(); + testZ = testFunction( testCases_a_floatx80 ); + testFlags = testFlagsFunctionPtr(); ++#ifdef TEST_KERNEL_EMU ++ if (! syst_float_is_soft_emu()){ ++ continue; ++ } ++#endif + --count; + if ( count == 0 ) { + checkEarlyExit(); +@@ -2166,6 +2332,11 @@ void + (void) testFlagsFunctionPtr(); + testZ = testFunction( testCases_a_floatx80, testCases_b_floatx80 ); + testFlags = testFlagsFunctionPtr(); ++#ifdef TEST_KERNEL_EMU ++ if (! syst_float_is_soft_emu()){ ++ continue; ++ } ++#endif + --count; + if ( count == 0 ) { + checkEarlyExit(); +@@ -2218,6 +2389,11 @@ void + (void) testFlagsFunctionPtr(); + testZ = testFunction( testCases_a_floatx80, testCases_b_floatx80 ); + testFlags = testFlagsFunctionPtr(); ++#ifdef TEST_KERNEL_EMU ++ if (! syst_float_is_soft_emu()){ ++ continue; ++ } ++#endif + --count; + if ( count == 0 ) { + checkEarlyExit(); +@@ -2280,6 +2456,11 @@ void + (void) testFlagsFunctionPtr(); + testZ = testFunction( testCases_a_float128 ); + testFlags = testFlagsFunctionPtr(); ++#ifdef TEST_KERNEL_EMU ++ if (! syst_float_is_soft_emu()){ ++ continue; ++ } ++#endif + --count; + if ( count == 0 ) { + checkEarlyExit(); +@@ -2337,6 +2518,11 @@ void + (void) testFlagsFunctionPtr(); + testZ = testFunction( testCases_a_float128 ); + testFlags = testFlagsFunctionPtr(); ++#ifdef TEST_KERNEL_EMU ++ if (! syst_float_is_soft_emu()){ ++ continue; ++ } ++#endif + --count; + if ( count == 0 ) { + checkEarlyExit(); +@@ -2394,6 +2580,11 @@ void + (void) testFlagsFunctionPtr(); + testZ = testFunction( testCases_a_float128 ); + testFlags = testFlagsFunctionPtr(); ++#ifdef TEST_KERNEL_EMU ++ if (! syst_float_is_soft_emu()){ ++ continue; ++ } ++#endif + --count; + if ( count == 0 ) { + checkEarlyExit(); +@@ -2449,6 +2640,11 @@ void + (void) testFlagsFunctionPtr(); + testZ = testFunction( testCases_a_float128 ); + testFlags = testFlagsFunctionPtr(); ++#ifdef TEST_KERNEL_EMU ++ if (! syst_float_is_soft_emu()){ ++ continue; ++ } ++#endif + --count; + if ( count == 0 ) { + checkEarlyExit(); +@@ -2506,6 +2702,11 @@ void + (void) testFlagsFunctionPtr(); + testZ = testFunction( testCases_a_float128 ); + testFlags = testFlagsFunctionPtr(); ++#ifdef TEST_KERNEL_EMU ++ if (! syst_float_is_soft_emu()){ ++ continue; ++ } ++#endif + --count; + if ( count == 0 ) { + checkEarlyExit(); +@@ -2563,6 +2764,11 @@ void + (void) testFlagsFunctionPtr(); + testZ = testFunction( testCases_a_float128 ); + testFlags = testFlagsFunctionPtr(); ++#ifdef TEST_KERNEL_EMU ++ if (! syst_float_is_soft_emu()){ ++ continue; ++ } ++#endif + --count; + if ( count == 0 ) { + checkEarlyExit(); +@@ -2620,6 +2826,11 @@ void + (void) testFlagsFunctionPtr(); + testZ = testFunction( testCases_a_float128, testCases_b_float128 ); + testFlags = testFlagsFunctionPtr(); ++#ifdef TEST_KERNEL_EMU ++ if (! syst_float_is_soft_emu()){ ++ continue; ++ } ++#endif + --count; + if ( count == 0 ) { + checkEarlyExit(); +@@ -2672,6 +2883,11 @@ void + (void) testFlagsFunctionPtr(); + testZ = testFunction( testCases_a_float128, testCases_b_float128 ); + testFlags = testFlagsFunctionPtr(); ++#ifdef TEST_KERNEL_EMU ++ if (! syst_float_is_soft_emu()){ ++ continue; ++ } ++#endif + --count; + if ( count == 0 ) { + checkEarlyExit(); +-- +1.5.4 + diff --git a/meta-fsl-ppc/recipes-extended/testfloat/files/Yocto-replace-COMPILE_PREFIX-gcc.patch b/meta-fsl-ppc/recipes-extended/testfloat/files/Yocto-replace-COMPILE_PREFIX-gcc.patch new file mode 100644 index 00000000..42de56d3 --- /dev/null +++ b/meta-fsl-ppc/recipes-extended/testfloat/files/Yocto-replace-COMPILE_PREFIX-gcc.patch @@ -0,0 +1,67 @@ +From 6c7567e05c28b8cb6c7dc68c278950a32feb6f64 Mon Sep 17 00:00:00 2001 +From: Ting Liu +Date: Wed, 9 May 2012 02:42:57 -0500 +Subject: [PATCH] Yocto: replace $(COMPILE_PREFIX)gcc with $(CC) and remove -te500v2 flags + +Signed-off-by: Ting Liu +--- + SoftFloat-2b/softfloat/bits32/powerpc-GCC/Makefile | 4 ++-- + SoftFloat-2b/softfloat/bits64/powerpc-GCC/Makefile | 4 ++-- + testfloat/powerpc-linux-gcc/Makefile | 8 ++++---- + 3 files changed, 8 insertions(+), 8 deletions(-) + +diff --git a/SoftFloat-2b/softfloat/bits32/powerpc-GCC/Makefile b/SoftFloat-2b/softfloat/bits32/powerpc-GCC/Makefile +index 28f1e33..4098048 100644 +--- a/SoftFloat-2b/softfloat/bits32/powerpc-GCC/Makefile ++++ b/SoftFloat-2b/softfloat/bits32/powerpc-GCC/Makefile +@@ -5,8 +5,8 @@ SOFTFLOAT_MACROS = ../softfloat-macros + OBJ = .o + EXE = + INCLUDES = -I. -I.. +-COMPILE_C = $(COMPILE_PREFIX)gcc -msoft-float -c -o $@ $(INCLUDES) -I- -O2 +-LINK = $(COMPILE_PREFIX)gcc -o $@ ++COMPILE_C = $(CC) -msoft-float -c -o $@ $(INCLUDES) -I- -O2 ++LINK = $(CC) -o $@ + + ALL: softfloat$(OBJ) timesoftfloat$(EXE) + +diff --git a/SoftFloat-2b/softfloat/bits64/powerpc-GCC/Makefile b/SoftFloat-2b/softfloat/bits64/powerpc-GCC/Makefile +index a5e2cc7..c34e16e 100644 +--- a/SoftFloat-2b/softfloat/bits64/powerpc-GCC/Makefile ++++ b/SoftFloat-2b/softfloat/bits64/powerpc-GCC/Makefile +@@ -5,8 +5,8 @@ SOFTFLOAT_MACROS = ../softfloat-macros + OBJ = .o + EXE = + INCLUDES = -I. -I.. +-COMPILE_C = $(COMPILE_PREFIX) -mcpu=8548 -mhard-float -mfloat-gprs=double -o $@ $(INCLUDES) -I- -O2 +-LINK = $(COMPILE_PREFIX) -o $@ ++COMPILE_C = $(CC) -mcpu=8548 -mhard-float -mfloat-gprs=double -o $@ $(INCLUDES) -I- -O2 ++LINK = $(CC) -o $@ + + ALL: softfloat$(OBJ) timesoftfloat$(EXE) + +diff --git a/testfloat/powerpc-linux-gcc/Makefile b/testfloat/powerpc-linux-gcc/Makefile +index de50aad..1a8b5f7 100644 +--- a/testfloat/powerpc-linux-gcc/Makefile ++++ b/testfloat/powerpc-linux-gcc/Makefile +@@ -8,13 +8,13 @@ OBJ = .o + EXE = + INCLUDES = -I. -I.. -I$(SOFTFLOAT_DIR) + +-COMPILE_C = $(COMPILE_PREFIX)gcc -c -o $@ $(INCLUDES) -I- -O $(EXTRA_CFLAGS) ++COMPILE_C = $(CC) -c -o $@ $(INCLUDES) -I- -O $(EXTRA_CFLAGS) + +-COMPILE_C_HARD = $(COMPILE_PREFIX)gcc -c -te500v2 -o $@ $(INCLUDES) ++COMPILE_C_HARD = $(CC) -c -o $@ $(INCLUDES) + +-COMPILE_SLOWFLOAT_C = $(COMPILE_PREFIX)gcc -c -o $@ $(INCLUDES) -I- -O ++COMPILE_SLOWFLOAT_C = $(CC) -c -o $@ $(INCLUDES) -I- -O + +-LINK = $(COMPILE_PREFIX)gcc -lm -o $@ ++LINK = $(CC) -lm -o $@ + + SOFTFLOAT_H = $(SOFTFLOAT_DIR)/softfloat.h + SOFTFLOAT_OBJ = $(SOFTFLOAT_DIR)/softfloat$(OBJ) +-- +1.7.3.4 + diff --git a/meta-fsl-ppc/recipes-extended/testfloat/testfloat_2a.bb b/meta-fsl-ppc/recipes-extended/testfloat/testfloat_2a.bb new file mode 100644 index 00000000..3fbb2070 --- /dev/null +++ b/meta-fsl-ppc/recipes-extended/testfloat/testfloat_2a.bb @@ -0,0 +1,46 @@ +DESCRIPTION = "A program for testing floating-point implementation" +SECTION = "test" +LICENSE = "Hauser TestFloat" + +LIC_FILES_CHKSUM = "file://testfloat/testfloat.txt;beginline=87;endline=95;md5=bdb2e8111838a48015c29bd97f5b6145" + +SRC_URI = " http://www.jhauser.us/arithmetic/TestFloat-2a.tar.Z;name=TestFloat \ + http://www.jhauser.us/arithmetic/SoftFloat-2b.tar.Z;name=SoftFloat \ + " +SRC_URI_append_fslmachine = " file://SoftFloat-powerpc-1.patch \ + file://TestFloat-powerpc-E500v2-SPE-1.patch \ + file://Yocto-replace-COMPILE_PREFIX-gcc.patch \ + " +SRC_URI[TestFloat.md5sum] = "4dc889319ae1e0c5381ec511f784553a" +SRC_URI[TestFloat.sha256sum] = "84d14aa42adefbda2ec9708b42946f7fa59f93689b042684bd027863481f8e4e" +SRC_URI[SoftFloat.md5sum] = "b4a58b5c941f1a2317e4c2500086e3fa" +SRC_URI[SoftFloat.sha256sum] = "89d14b55113a2ba8cbda7011443ba1d298d381c89d939515d56c5f18f2febf81" + +S = "${WORKDIR}/TestFloat-2a" + +do_unpack2(){ + mv ${WORKDIR}/SoftFloat-2b ${S}/SoftFloat-2b + cd ${S} + if [ -n "$(which fromdos)" ];then + find -type f -exec fromdos {} \; + elif [ -n "$(which dos2unix)" ];then + find -type f -exec dos2unix {} \; + else + echo -e "\nERROR: command dos2unix or fromdos not found\n" && return 1 + fi +} +addtask do_unpack2 after do_unpack before do_patch + +do_compile(){ + oe_runmake -C testfloat/powerpc-linux-gcc/ CC="${CC}" EXTRA_CFLAGS="-DTEST_KERNEL_EMU" +} + +do_install(){ + install -d ${D}/${bindir} + install testfloat/powerpc-linux-gcc/testfloat ${D}/${bindir} + install testfloat/powerpc-linux-gcc/testsoftfloat ${D}/${bindir} +} + +COMPATIBLE_HOST_e500v2 = ".*" +COMPATIBLE_HOST ?= "(none)" + diff --git a/meta-fsl-ppc/recipes-extended/web-sysmon/web-sysmon_git.bb b/meta-fsl-ppc/recipes-extended/web-sysmon/web-sysmon_git.bb new file mode 100644 index 00000000..1b2e070d --- /dev/null +++ b/meta-fsl-ppc/recipes-extended/web-sysmon/web-sysmon_git.bb @@ -0,0 +1,21 @@ +DESCRIPTION = "Web System Monitor Files" +SECTION = "web-sysmon" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e" + +SRC_URI = "git://git.freescale.com/ppc/sdk/web-sysmon.git" +SRCREV = "40b47611378ef5c07d98f0f691bb146ae52dcdc1" + +S = "${WORKDIR}/git" + +FILES_${PN} += "/" + +RDEPENDS_${PN} = "lighttpd" + +do_install() { + install -d ${D}/etc + install -m 644 ${S}/lighttpd.conf ${D}/etc + install -d ${D}/usr/local/bin + install -m 755 ${S}/rrd/sens_update_rrd ${D}/usr/local/bin + cp -r ${S}/rrd ${D}/usr +} diff --git a/meta-fsl-ppc/recipes-kernel/skmm/skmm_git.bb b/meta-fsl-ppc/recipes-kernel/skmm/skmm_git.bb new file mode 100644 index 00000000..224e5564 --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/skmm/skmm_git.bb @@ -0,0 +1,33 @@ +DESCRIPTION = "SKMM application for PCIe endpoint" +SECTION = "skmm" +LICENSE = "BSD & GPLv2" +LIC_FILES_CHKSUM = "file://Makefile;endline=30;md5=39e58bedc879163c9338596e52df5b1f" + +DEPENDS = "libedit" + +SRC_URI = "git://git.freescale.com/ppc/sdk/skmm-ep.git" +SRCREV = "80d8393a2033b3b0cc8f885702d7b288956f3a37" + +COMPATIBLE_MACHINE = "(p4080ds|t4240qds)" + +S = "${WORKDIR}/git" + +EXTRA_OEMAKE = 'MACHINE=${MACHINE}' + +export LIBEDIT_CFLAGS="$(pkg-config --cflags libedit)" +export LIBEDIT_LDFLAGS="$(pkg-config --libs --static libedit)" + +do_compile () { + export ARCH=${TARGET_ARCH} + oe_runmake HOST=x86_64 clean + oe_runmake HOST=x86_64 + oe_runmake HOST=powerpc clean + oe_runmake HOST=powerpc +} + +do_install () { + oe_runmake ARCH=${TARGET_ARCH} HOST=x86_64 install DESTDIR=${D} + oe_runmake ARCH=${TARGET_ARCH} HOST=powerpc install DESTDIR=${D} +} + +FILES_${PN} += "/home/root/.skmm/*" diff --git a/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb b/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb deleted file mode 100644 index c3aa1053..00000000 --- a/meta-fsl-ppc/recipes-kernel/u-boot/u-boot_git.bb +++ /dev/null @@ -1,139 +0,0 @@ -DESCRIPTION = "U-boot bootloader" -HOMEPAGE = "http://u-boot.sf.net" -SECTION = "bootloaders" -PROVIDES = "virtual/bootloader" -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://COPYING;md5=1707d6db1d42237583f50183a5651ecb" - -PR = "r30" -INHIBIT_DEFAULT_DEPS = "1" -DEPENDS = "boot-format-native virtual/${TARGET_PREFIX}gcc libgcc" - -inherit deploy - -SRC_URI = "git://git.freescale.com/ppc/sdk/u-boot.git" -SRCREV = "831b30de4b768f0b3b7dbfa11739b14cea612d7e" - -python () { - ml = d.getVar("MULTILIB_VARIANTS", True) - arch = d.getVar("OVERRIDES", True) - - if ("e5500-64b:" in arch or "e6500-64b:" in arch) and not "lib32" in ml: - raise bb.parse.SkipPackage("Building the u-boot for this arch requires multilib to be enabled") -} - -DEPENDS_append_e5500-64b = " lib32-gcc-cross lib32-libgcc" -PATH_append_e5500-64b = ":${STAGING_BINDIR_NATIVE}/${DEFAULTTUNE_virtclass-multilib-lib32}${TARGET_VENDOR_virtclass-multilib-lib32}-${HOST_OS}/" -TOOLCHAIN_OPTIONS_append_e5500-64b = "/../lib32-${MACHINE}" -TARGET_VENDOR_virtclass-multilib-lib32 ?= "-${DISTRO}mllib32" -WRAP_TARGET_PREFIX_e5500-64b = "powerpc${TARGET_VENDOR_virtclass-multilib-lib32}-${HOST_OS}-" - -DEPENDS_append_e6500-64b = " lib32-gcc-cross lib32-libgcc" -PATH_append_e6500-64b = ":${STAGING_BINDIR_NATIVE}/${DEFAULTTUNE_virtclass-multilib-lib32}${TARGET_VENDOR_virtclass-multilib-lib32}-${HOST_OS}/" -TOOLCHAIN_OPTIONS_append_e6500-64b = "/../lib32-${MACHINE}" -TARGET_VENDOR_virtclass-multilib-lib32 ?= "-${DISTRO}mllib32" -WRAP_TARGET_PREFIX_e6500-64b = "powerpc${TARGET_VENDOR_virtclass-multilib-lib32}-${HOST_OS}-" - -WRAP_TARGET_PREFIX = "${TARGET_PREFIX}" -EXTRA_OEMAKE = 'CROSS_COMPILE=${WRAP_TARGET_PREFIX} CC="${WRAP_TARGET_PREFIX}gcc ${TOOLCHAIN_OPTIONS}"' - -PACKAGE_ARCH = "${MACHINE_ARCH}" - -USRC ?= "" -S = '${@base_conditional("USRC", "", "${WORKDIR}/git", "${USRC}", d)}' - -do_compile () { - unset LDFLAGS - unset CFLAGS - unset CPPFLAGS - - if [ "x${UBOOT_MACHINES}" = "x" ]; then - UBOOT_MACHINES=${UBOOT_MACHINE} - fi - - for board in ${UBOOT_MACHINES}; do - oe_runmake O=${board} distclean - oe_runmake O=${board} ${board} - oe_runmake O=${board} all - - case "${board}" in - *SDCARD*) UBOOT_TARGET="u-boot-sd";; - *SPIFLASH*) UBOOT_TARGET="u-boot-spi";; - *NAND*) UBOOT_TARGET="u-boot-nand";; - *) UBOOT_TARGET="";; - esac - - if [ "x${UBOOT_TARGET}" != "x" ]; then - if [ "${UBOOT_TARGET}" = "u-boot-sd" ]; then - cp ${S}/${board}/u-boot.bin ${S}/${board}/${UBOOT_TARGET}.bin - elif [ "${UBOOT_TARGET}" = "u-boot-nand" ];then - if [ "${DEFAULTTUNE}" = "ppce500v2" ];then - if echo $board |egrep "(P1010RDB|P1020RDB|P1021RDB|P1024RDB|P2020RDB|P1022DS|P1025RDB|BSC9131RDB|BSC9132QDS)" 2>&1 >/dev/null;then - cp ${S}/${board}/u-boot-with-spl.bin ${S}/${board}/${UBOOT_TARGET}.bin - fi - else - cp ${S}/${board}/u-boot.bin ${S}/${board}/${UBOOT_TARGET}.bin - fi - else - if [ -n "${BOOTFORMAT_CONFIG}" ];then - ${STAGING_BINDIR_NATIVE}/boot_format \ - ${STAGING_DATADIR_NATIVE}/boot_format/${BOOTFORMAT_CONFIG} \ - ${S}/${board}/u-boot.bin -spi ${S}/${board}/${UBOOT_TARGET}.bin - else - cp ${S}/${board}/u-boot.bin ${S}/${board}/${UBOOT_TARGET}.bin - fi - fi - fi - done -} - -do_install(){ - if [ "x${UBOOT_MACHINES}" = "x" ]; then - UBOOT_MACHINES=${UBOOT_MACHINE} - fi - - for board in ${UBOOT_MACHINES}; do - case "${board}" in - *SDCARD*) UBOOT_TARGET="u-boot-sd";; - *SPIFLASH*) UBOOT_TARGET="u-boot-spi";; - *NAND*) UBOOT_TARGET="u-boot-nand";; - *) UBOOT_TARGET="u-boot";; - esac - - if [ -f ${S}/${board}/${UBOOT_TARGET}.bin ]; then - mkdir -p ${D}/boot/ - install ${S}/${board}/${UBOOT_TARGET}.bin ${D}/boot/${UBOOT_TARGET}-${board}-${PV}-${PR}.bin - ln -sf ${UBOOT_TARGET}-${board}-${PV}-${PR}.bin ${D}/boot/${UBOOT_TARGET}.bin - fi - done -} - -do_deploy(){ - if [ "x${UBOOT_MACHINES}" = "x" ]; then - UBOOT_MACHINES=${UBOOT_MACHINE} - fi - - for board in ${UBOOT_MACHINES}; do - case "${board}" in - *SDCARD*) UBOOT_TARGET="u-boot-sd";; - *SPIFLASH*) UBOOT_TARGET="u-boot-spi";; - *NAND*) UBOOT_TARGET="u-boot-nand";; - *) UBOOT_TARGET="u-boot";; - esac - - if [ -f ${S}/${board}/${UBOOT_TARGET}.bin ]; then - mkdir -p ${DEPLOYDIR} - install ${S}/${board}/${UBOOT_TARGET}.bin ${DEPLOYDIR}/${UBOOT_TARGET}-${board}-${PV}-${PR}.bin - - cd ${DEPLOYDIR} - rm -f ${UBOOT_TARGET}-${board}.bin - ln -sf ${UBOOT_TARGET}-${board}-${PV}-${PR}.bin ${UBOOT_TARGET}-${board}.bin - fi - done -} -addtask deploy after do_install - -PACKAGES += "${PN}-images" -FILES_${PN}-images += "/boot" - -ALLOW_EMPTY_${PN} = "1" diff --git a/meta-fsl-ppc/recipes-test/testfloat/files/SoftFloat-powerpc-1.patch b/meta-fsl-ppc/recipes-test/testfloat/files/SoftFloat-powerpc-1.patch deleted file mode 100644 index b6db2de2..00000000 --- a/meta-fsl-ppc/recipes-test/testfloat/files/SoftFloat-powerpc-1.patch +++ /dev/null @@ -1,1427 +0,0 @@ -This patch adds PowerPC support in SoftFloat. - -Signed-off-by: Ebony Zhu -Signed-off-by: Liu Yu ---- - SoftFloat-2b/processors/powerpc-GCC.h | 87 ++++ - SoftFloat-2b/softfloat/bits32/powerpc-GCC/Makefile | 26 ++ - SoftFloat-2b/softfloat/bits32/powerpc-GCC/milieu.h | 55 +++ - .../bits32/powerpc-GCC/softfloat-specialize | 252 ++++++++++++ - .../softfloat/bits32/powerpc-GCC/softfloat.h | 155 +++++++ - SoftFloat-2b/softfloat/bits64/powerpc-GCC/Makefile | 24 ++ - SoftFloat-2b/softfloat/bits64/powerpc-GCC/milieu.h | 55 +++ - .../bits64/powerpc-GCC/softfloat-specialize | 422 ++++++++++++++++++++ - .../softfloat/bits64/powerpc-GCC/softfloat.h | 269 +++++++++++++ - 9 files changed, 1345 insertions(+), 0 deletions(-) - create mode 100644 SoftFloat-2b/processors/powerpc-GCC.h - create mode 100644 SoftFloat-2b/softfloat/bits32/powerpc-GCC/Makefile - create mode 100644 SoftFloat-2b/softfloat/bits32/powerpc-GCC/milieu.h - create mode 100644 SoftFloat-2b/softfloat/bits32/powerpc-GCC/softfloat-specialize - create mode 100644 SoftFloat-2b/softfloat/bits32/powerpc-GCC/softfloat.h - create mode 100644 SoftFloat-2b/softfloat/bits64/powerpc-GCC/Makefile - create mode 100644 SoftFloat-2b/softfloat/bits64/powerpc-GCC/milieu.h - create mode 100644 SoftFloat-2b/softfloat/bits64/powerpc-GCC/softfloat-specialize - create mode 100644 SoftFloat-2b/softfloat/bits64/powerpc-GCC/softfloat.h - -diff --git a/SoftFloat-2b/processors/powerpc-GCC.h b/SoftFloat-2b/processors/powerpc-GCC.h -new file mode 100644 -index 0000000..002a786 ---- /dev/null -+++ b/SoftFloat-2b/processors/powerpc-GCC.h -@@ -0,0 +1,87 @@ -+/* -+ * This file is derived from processors/386-gcc.h, -+ * the copyright for that material belongs to the original owners. -+ * -+ * Additional material and changes where applicable is: -+ * Copyright (C) 2008 Freescale Semiconductor, Inc. All rights reserved. -+ * -+ * Author: Ebony Zhu, -+ * Yu Liu, -+ * -+ * THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort has -+ * been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT TIMES -+ * RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO PERSONS -+ * AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ALL LOSSES, -+ * COSTS, OR OTHER PROBLEMS THEY INCUR DUE TO THE SOFTWARE, AND WHO FURTHERMORE -+ * EFFECTIVELY INDEMNIFY JOHN HAUSER AND THE INTERNATIONAL COMPUTER SCIENCE -+ * INSTITUTE (possibly via similar legal warning) AGAINST ALL LOSSES, COSTS, OR -+ * OTHER PROBLEMS INCURRED BY THEIR CUSTOMERS AND CLIENTS DUE TO THE SOFTWARE. -+ */ -+ -+/*---------------------------------------------------------------------------- -+| One of the macros `BIGENDIAN' or `LITTLEENDIAN' must be defined. -+*----------------------------------------------------------------------------*/ -+#define BIGENDIAN -+ -+/*---------------------------------------------------------------------------- -+| The macro `BITS64' can be defined to indicate that 64-bit integer types are -+| supported by the compiler. -+*----------------------------------------------------------------------------*/ -+#define BITS32 -+ -+/*---------------------------------------------------------------------------- -+| Each of the following `typedef's defines the most convenient type that holds -+| integers of at least as many bits as specified. For example, `uint8' should -+| be the most convenient type that can hold unsigned integers of as many as -+| 8 bits. The `flag' type must be able to hold either a 0 or 1. For most -+| implementations of C, `flag', `uint8', and `int8' should all be `typedef'ed -+| to the same as `int'. -+*----------------------------------------------------------------------------*/ -+typedef int flag; -+typedef int uint8; -+typedef int int8; -+typedef int uint16; -+typedef int int16; -+typedef unsigned int uint32; -+typedef signed int int32; -+#ifdef BITS64 -+typedef unsigned long long int uint64; -+typedef signed long long int int64; -+#endif -+ -+/*---------------------------------------------------------------------------- -+| Each of the following `typedef's defines a type that holds integers -+| of _exactly_ the number of bits specified. For instance, for most -+| implementation of C, `bits16' and `sbits16' should be `typedef'ed to -+| `unsigned short int' and `signed short int' (or `short int'), respectively. -+*----------------------------------------------------------------------------*/ -+typedef unsigned char bits8; -+typedef signed char sbits8; -+typedef unsigned short int bits16; -+typedef signed short int sbits16; -+typedef unsigned int bits32; -+typedef signed int sbits32; -+#ifdef BITS64 -+typedef unsigned long long int bits64; -+typedef signed long long int sbits64; -+#endif -+ -+#ifdef BITS64 -+/*---------------------------------------------------------------------------- -+| The `LIT64' macro takes as its argument a textual integer literal and -+| if necessary ``marks'' the literal as having a 64-bit integer type. -+| For example, the GNU C Compiler (`gcc') requires that 64-bit literals be -+| appended with the letters `LL' standing for `long long', which is `gcc's -+| name for the 64-bit integer type. Some compilers may allow `LIT64' to be -+| defined as the identity macro: `#define LIT64( a ) a'. -+*----------------------------------------------------------------------------*/ -+#define LIT64( a ) a##LL -+#endif -+ -+/*---------------------------------------------------------------------------- -+| The macro `INLINE' can be used before functions that should be inlined. If -+| a compiler does not support explicit inlining, this macro should be defined -+| to be `static'. -+*----------------------------------------------------------------------------*/ -+#define INLINE extern inline -+ -diff --git a/SoftFloat-2b/softfloat/bits32/powerpc-GCC/Makefile b/SoftFloat-2b/softfloat/bits32/powerpc-GCC/Makefile -new file mode 100644 -index 0000000..28f1e33 ---- /dev/null -+++ b/SoftFloat-2b/softfloat/bits32/powerpc-GCC/Makefile -@@ -0,0 +1,26 @@ -+ -+PROCESSOR_H = ../../../processors/powerpc-GCC.h -+SOFTFLOAT_MACROS = ../softfloat-macros -+ -+OBJ = .o -+EXE = -+INCLUDES = -I. -I.. -+COMPILE_C = $(COMPILE_PREFIX)gcc -msoft-float -c -o $@ $(INCLUDES) -I- -O2 -+LINK = $(COMPILE_PREFIX)gcc -o $@ -+ -+ALL: softfloat$(OBJ) timesoftfloat$(EXE) -+ -+milieu.h: $(PROCESSOR_H) -+ touch milieu.h -+ -+softfloat$(OBJ): milieu.h softfloat.h softfloat-specialize $(SOFTFLOAT_MACROS) ../softfloat.c -+ $(COMPILE_C) ../softfloat.c -+ -+timesoftfloat$(OBJ): milieu.h softfloat.h ../timesoftfloat.c -+ $(COMPILE_C) ../timesoftfloat.c -+ -+timesoftfloat$(EXE): softfloat$(OBJ) timesoftfloat$(OBJ) -+ $(LINK) softfloat$(OBJ) timesoftfloat$(OBJ) -+ -+clean: -+ rm -f *.o timesoftfloat$(EXE) -diff --git a/SoftFloat-2b/softfloat/bits32/powerpc-GCC/milieu.h b/SoftFloat-2b/softfloat/bits32/powerpc-GCC/milieu.h -new file mode 100644 -index 0000000..d8b6012 ---- /dev/null -+++ b/SoftFloat-2b/softfloat/bits32/powerpc-GCC/milieu.h -@@ -0,0 +1,55 @@ -+/* -+ * This file is derived from softfloat/bits32/386-Win32-GCC/milieu.h, -+ * the copyright for that material belongs to the original owners. -+ * -+ * Additional material and changes where applicable is: -+ * Copyright (C) 2008 Freescale Semiconductor, Inc. All rights reserved. -+ * -+ * Author: Ebony Zhu, -+ * Yu Liu, -+ */ -+ -+/*============================================================================ -+ -+This C header file is part of the SoftFloat IEC/IEEE Floating-point Arithmetic -+Package, Release 2b. -+ -+Written by John R. Hauser. This work was made possible in part by the -+International Computer Science Institute, located at Suite 600, 1947 Center -+Street, Berkeley, California 94704. Funding was partially provided by the -+National Science Foundation under grant MIP-9311980. The original version -+of this code was written as part of a project to build a fixed-point vector -+processor in collaboration with the University of California at Berkeley, -+overseen by Profs. Nelson Morgan and John Wawrzynek. More information -+is available through the Web page `http://www.cs.berkeley.edu/~jhauser/ -+arithmetic/SoftFloat.html'. -+ -+THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort has -+been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT TIMES -+RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO PERSONS -+AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ALL LOSSES, -+COSTS, OR OTHER PROBLEMS THEY INCUR DUE TO THE SOFTWARE, AND WHO FURTHERMORE -+EFFECTIVELY INDEMNIFY JOHN HAUSER AND THE INTERNATIONAL COMPUTER SCIENCE -+INSTITUTE (possibly via similar legal warning) AGAINST ALL LOSSES, COSTS, OR -+OTHER PROBLEMS INCURRED BY THEIR CUSTOMERS AND CLIENTS DUE TO THE SOFTWARE. -+ -+Derivative works are acceptable, even for commercial purposes, so long as -+(1) the source code for the derivative work includes prominent notice that -+the work is derivative, and (2) the source code includes prominent notice with -+these four paragraphs for those parts of this code that are retained. -+ -+=============================================================================*/ -+ -+/*---------------------------------------------------------------------------- -+| Include common integer types and flags. -+*----------------------------------------------------------------------------*/ -+#include "../../../processors/powerpc-GCC.h" -+ -+/*---------------------------------------------------------------------------- -+| Symbolic Boolean literals. -+*----------------------------------------------------------------------------*/ -+enum { -+ FALSE = 0, -+ TRUE = 1 -+}; -+ -diff --git a/SoftFloat-2b/softfloat/bits32/powerpc-GCC/softfloat-specialize b/SoftFloat-2b/softfloat/bits32/powerpc-GCC/softfloat-specialize -new file mode 100644 -index 0000000..fd2caa4 ---- /dev/null -+++ b/SoftFloat-2b/softfloat/bits32/powerpc-GCC/softfloat-specialize -@@ -0,0 +1,252 @@ -+/* -+ * This file is derived from softfloat/bits32/386-Win32-GCC/softfloat-specialize, -+ * the copyright for that material belongs to the original owners. -+ * -+ * Additional material and changes where applicable is: -+ * Copyright (C) 2008 Freescale Semiconductor, Inc. All rights reserved. -+ * -+ * Author: Ebony Zhu, -+ * Yu Liu, -+ */ -+ -+/*============================================================================ -+ -+This C source fragment is part of the SoftFloat IEC/IEEE Floating-point -+Arithmetic Package, Release 2b. -+ -+Written by John R. Hauser. This work was made possible in part by the -+International Computer Science Institute, located at Suite 600, 1947 Center -+Street, Berkeley, California 94704. Funding was partially provided by the -+National Science Foundation under grant MIP-9311980. The original version -+of this code was written as part of a project to build a fixed-point vector -+processor in collaboration with the University of California at Berkeley, -+overseen by Profs. Nelson Morgan and John Wawrzynek. More information -+is available through the Web page `http://www.cs.berkeley.edu/~jhauser/ -+arithmetic/SoftFloat.html'. -+ -+THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort has -+been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT TIMES -+RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO PERSONS -+AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ALL LOSSES, -+COSTS, OR OTHER PROBLEMS THEY INCUR DUE TO THE SOFTWARE, AND WHO FURTHERMORE -+EFFECTIVELY INDEMNIFY JOHN HAUSER AND THE INTERNATIONAL COMPUTER SCIENCE -+INSTITUTE (possibly via similar legal warning) AGAINST ALL LOSSES, COSTS, OR -+OTHER PROBLEMS INCURRED BY THEIR CUSTOMERS AND CLIENTS DUE TO THE SOFTWARE. -+ -+Derivative works are acceptable, even for commercial purposes, so long as -+(1) the source code for the derivative work includes prominent notice that -+the work is derivative, and (2) the source code includes prominent notice with -+these four paragraphs for those parts of this code that are retained. -+ -+=============================================================================*/ -+ -+/*---------------------------------------------------------------------------- -+| Underflow tininess-detection mode, statically initialized to default value. -+| (The declaration in `softfloat.h' must match the `int8' type here.) -+*----------------------------------------------------------------------------*/ -+int8 float_detect_tininess = float_tininess_after_rounding; -+ -+/*---------------------------------------------------------------------------- -+| Raises the exceptions specified by `flags'. Floating-point traps can be -+| defined here if desired. It is currently not possible for such a trap -+| to substitute a result value. If traps are not implemented, this routine -+| should be simply `float_exception_flags |= flags;'. -+*----------------------------------------------------------------------------*/ -+ -+void float_raise( int8 flags ) -+{ -+ -+ float_exception_flags |= flags; -+ -+} -+ -+/*---------------------------------------------------------------------------- -+| Internal canonical NaN format. -+*----------------------------------------------------------------------------*/ -+typedef struct { -+ flag sign; -+ bits32 high, low; -+} commonNaNT; -+ -+/*---------------------------------------------------------------------------- -+| The pattern for a default generated single-precision NaN. -+*----------------------------------------------------------------------------*/ -+enum { -+ float32_default_nan = 0xFFFFFFFF -+}; -+ -+/*---------------------------------------------------------------------------- -+| Returns 1 if the single-precision floating-point value `a' is a NaN; -+| otherwise returns 0. -+*----------------------------------------------------------------------------*/ -+ -+flag float32_is_nan( float32 a ) -+{ -+ -+ return ( 0xFF000000 < (bits32) ( a<<1 ) ); -+ -+} -+ -+/*---------------------------------------------------------------------------- -+| Returns 1 if the single-precision floating-point value `a' is a signaling -+| NaN; otherwise returns 0. -+*----------------------------------------------------------------------------*/ -+ -+flag float32_is_signaling_nan( float32 a ) -+{ -+ -+ return ( ( ( a>>22 ) & 0x1FF ) == 0x1FE ) && ( a & 0x003FFFFF ); -+ -+} -+ -+/*---------------------------------------------------------------------------- -+| Returns the result of converting the single-precision floating-point NaN -+| `a' to the canonical NaN format. If `a' is a signaling NaN, the invalid -+| exception is raised. -+*----------------------------------------------------------------------------*/ -+ -+static commonNaNT float32ToCommonNaN( float32 a ) -+{ -+ commonNaNT z; -+ -+ if ( float32_is_signaling_nan( a ) ) float_raise( float_flag_invalid ); -+ z.sign = a>>31; -+ z.low = 0; -+ z.high = a<<9; -+ return z; -+ -+} -+ -+/*---------------------------------------------------------------------------- -+| Returns the result of converting the canonical NaN `a' to the single- -+| precision floating-point format. -+*----------------------------------------------------------------------------*/ -+ -+static float32 commonNaNToFloat32( commonNaNT a ) -+{ -+ -+ return ( ( (bits32) a.sign )<<31 ) | 0x7FC00000 | ( a.high>>9 ); -+ -+} -+ -+/*---------------------------------------------------------------------------- -+| Takes two single-precision floating-point values `a' and `b', one of which -+| is a NaN, and returns the appropriate NaN result. If either `a' or `b' is a -+| signaling NaN, the invalid exception is raised. -+*----------------------------------------------------------------------------*/ -+ -+static float32 propagateFloat32NaN( float32 a, float32 b ) -+{ -+ flag aIsNaN, aIsSignalingNaN, bIsNaN, bIsSignalingNaN; -+ -+ aIsNaN = float32_is_nan( a ); -+ aIsSignalingNaN = float32_is_signaling_nan( a ); -+ bIsNaN = float32_is_nan( b ); -+ bIsSignalingNaN = float32_is_signaling_nan( b ); -+ a |= 0x00400000; -+ b |= 0x00400000; -+ if ( aIsSignalingNaN | bIsSignalingNaN ) float_raise( float_flag_invalid ); -+ if ( aIsNaN ) { -+ return ( aIsSignalingNaN & bIsNaN ) ? b : a; -+ } -+ else { -+ return b; -+ } -+ -+} -+ -+/*---------------------------------------------------------------------------- -+| The pattern for a default generated double-precision NaN. The `high' and -+| `low' values hold the most- and least-significant bits, respectively. -+*----------------------------------------------------------------------------*/ -+enum { -+ float64_default_nan_high = 0xFFFFFFFF, -+ float64_default_nan_low = 0xFFFFFFFF -+}; -+ -+/*---------------------------------------------------------------------------- -+| Returns 1 if the double-precision floating-point value `a' is a NaN; -+| otherwise returns 0. -+*----------------------------------------------------------------------------*/ -+ -+flag float64_is_nan( float64 a ) -+{ -+ -+ return -+ ( 0xFFE00000 <= (bits32) ( a.high<<1 ) ) -+ && ( a.low || ( a.high & 0x000FFFFF ) ); -+ -+} -+ -+/*---------------------------------------------------------------------------- -+| Returns 1 if the double-precision floating-point value `a' is a signaling -+| NaN; otherwise returns 0. -+*----------------------------------------------------------------------------*/ -+ -+flag float64_is_signaling_nan( float64 a ) -+{ -+ -+ return -+ ( ( ( a.high>>19 ) & 0xFFF ) == 0xFFE ) -+ && ( a.low || ( a.high & 0x0007FFFF ) ); -+ -+} -+ -+/*---------------------------------------------------------------------------- -+| Returns the result of converting the double-precision floating-point NaN -+| `a' to the canonical NaN format. If `a' is a signaling NaN, the invalid -+| exception is raised. -+*----------------------------------------------------------------------------*/ -+ -+static commonNaNT float64ToCommonNaN( float64 a ) -+{ -+ commonNaNT z; -+ -+ if ( float64_is_signaling_nan( a ) ) float_raise( float_flag_invalid ); -+ z.sign = a.high>>31; -+ shortShift64Left( a.high, a.low, 12, &z.high, &z.low ); -+ return z; -+ -+} -+ -+/*---------------------------------------------------------------------------- -+| Returns the result of converting the canonical NaN `a' to the double- -+| precision floating-point format. -+*----------------------------------------------------------------------------*/ -+ -+static float64 commonNaNToFloat64( commonNaNT a ) -+{ -+ float64 z; -+ -+ shift64Right( a.high, a.low, 12, &z.high, &z.low ); -+ z.high |= ( ( (bits32) a.sign )<<31 ) | 0x7FF80000; -+ return z; -+ -+} -+ -+/*---------------------------------------------------------------------------- -+| Takes two double-precision floating-point values `a' and `b', one of which -+| is a NaN, and returns the appropriate NaN result. If either `a' or `b' is a -+| signaling NaN, the invalid exception is raised. -+*----------------------------------------------------------------------------*/ -+ -+static float64 propagateFloat64NaN( float64 a, float64 b ) -+{ -+ flag aIsNaN, aIsSignalingNaN, bIsNaN, bIsSignalingNaN; -+ -+ aIsNaN = float64_is_nan( a ); -+ aIsSignalingNaN = float64_is_signaling_nan( a ); -+ bIsNaN = float64_is_nan( b ); -+ bIsSignalingNaN = float64_is_signaling_nan( b ); -+ a.high |= 0x00080000; -+ b.high |= 0x00080000; -+ if ( aIsSignalingNaN | bIsSignalingNaN ) float_raise( float_flag_invalid ); -+ if ( aIsNaN ) { -+ return ( aIsSignalingNaN & bIsNaN ) ? b : a; -+ } -+ else { -+ return b; -+ } -+ -+} -+ -diff --git a/SoftFloat-2b/softfloat/bits32/powerpc-GCC/softfloat.h b/SoftFloat-2b/softfloat/bits32/powerpc-GCC/softfloat.h -new file mode 100644 -index 0000000..0015b8e ---- /dev/null -+++ b/SoftFloat-2b/softfloat/bits32/powerpc-GCC/softfloat.h -@@ -0,0 +1,155 @@ -+/* -+ * This file is derived from softfloat/bits32/386-Win32-GCC/softfloat.h, -+ * the copyright for that material belongs to the original owners. -+ * -+ * Additional material and changes where applicable is: -+ * Copyright (C) 2008 Freescale Semiconductor, Inc. All rights reserved. -+ * -+ * Author: Ebony Zhu, -+ * Yu Liu, -+ */ -+ -+/*============================================================================ -+ -+This C header file is part of the SoftFloat IEC/IEEE Floating-point Arithmetic -+Package, Release 2b. -+ -+Written by John R. Hauser. This work was made possible in part by the -+International Computer Science Institute, located at Suite 600, 1947 Center -+Street, Berkeley, California 94704. Funding was partially provided by the -+National Science Foundation under grant MIP-9311980. The original version -+of this code was written as part of a project to build a fixed-point vector -+processor in collaboration with the University of California at Berkeley, -+overseen by Profs. Nelson Morgan and John Wawrzynek. More information -+is available through the Web page `http://www.cs.berkeley.edu/~jhauser/ -+arithmetic/SoftFloat.html'. -+ -+THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort has -+been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT TIMES -+RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO PERSONS -+AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ALL LOSSES, -+COSTS, OR OTHER PROBLEMS THEY INCUR DUE TO THE SOFTWARE, AND WHO FURTHERMORE -+EFFECTIVELY INDEMNIFY JOHN HAUSER AND THE INTERNATIONAL COMPUTER SCIENCE -+INSTITUTE (possibly via similar legal warning) AGAINST ALL LOSSES, COSTS, OR -+OTHER PROBLEMS INCURRED BY THEIR CUSTOMERS AND CLIENTS DUE TO THE SOFTWARE. -+ -+Derivative works are acceptable, even for commercial purposes, so long as -+(1) the source code for the derivative work includes prominent notice that -+the work is derivative, and (2) the source code includes prominent notice with -+these four paragraphs for those parts of this code that are retained. -+ -+=============================================================================*/ -+ -+/*---------------------------------------------------------------------------- -+| Software IEC/IEEE floating-point types. -+*----------------------------------------------------------------------------*/ -+typedef bits32 float32; -+typedef struct { -+ bits32 high, low; -+} float64; -+ -+/*---------------------------------------------------------------------------- -+| Software IEC/IEEE floating-point underflow tininess-detection mode. -+*----------------------------------------------------------------------------*/ -+extern int8 float_detect_tininess; -+enum { -+ float_tininess_after_rounding = 0, -+ float_tininess_before_rounding = 1 -+}; -+ -+/*---------------------------------------------------------------------------- -+| Software IEC/IEEE floating-point rounding mode. -+*----------------------------------------------------------------------------*/ -+extern int8 float_rounding_mode; -+enum { -+ float_round_nearest_even = 0, -+ float_round_to_zero = 1, -+ float_round_up = 2, -+ float_round_down = 3 -+}; -+ -+/*---------------------------------------------------------------------------- -+| Software IEC/IEEE floating-point exception flags. -+*----------------------------------------------------------------------------*/ -+/* -+extern int8 float_exception_flags; -+enum { -+ float_flag_inexact = 1, -+ float_flag_underflow = 2, -+ float_flag_overflow = 4, -+ float_flag_divbyzero = 8, -+ float_flag_invalid = 16 -+}; -+*/ -+ -+extern int8 float_exception_flags; -+enum { -+ float_flag_inexact = 16, -+ float_flag_underflow = 2, -+ float_flag_overflow = 1, -+ float_flag_divbyzero = 4, -+ float_flag_invalid = 8 -+}; -+ -+/*---------------------------------------------------------------------------- -+| Routine to raise any or all of the software IEC/IEEE floating-point -+| exception flags. -+*----------------------------------------------------------------------------*/ -+void float_raise( int8 ); -+ -+/*---------------------------------------------------------------------------- -+| Software IEC/IEEE integer-to-floating-point conversion routines. -+*----------------------------------------------------------------------------*/ -+float32 int32_to_float32( int32 ); -+float64 int32_to_float64( int32 ); -+ -+/*---------------------------------------------------------------------------- -+| Software IEC/IEEE single-precision conversion routines. -+*----------------------------------------------------------------------------*/ -+int32 float32_to_int32( float32 ); -+int32 float32_to_int32_round_to_zero( float32 ); -+float64 float32_to_float64( float32 ); -+ -+/*---------------------------------------------------------------------------- -+| Software IEC/IEEE single-precision operations. -+*----------------------------------------------------------------------------*/ -+float32 float32_round_to_int( float32 ); -+float32 float32_add( float32, float32 ); -+float32 float32_sub( float32, float32 ); -+float32 float32_mul( float32, float32 ); -+float32 float32_div( float32, float32 ); -+float32 float32_rem( float32, float32 ); -+float32 float32_sqrt( float32 ); -+flag float32_eq( float32, float32 ); -+flag float32_le( float32, float32 ); -+flag float32_lt( float32, float32 ); -+flag float32_eq_signaling( float32, float32 ); -+flag float32_le_quiet( float32, float32 ); -+flag float32_lt_quiet( float32, float32 ); -+flag float32_is_signaling_nan( float32 ); -+ -+/*---------------------------------------------------------------------------- -+| Software IEC/IEEE double-precision conversion routines. -+*----------------------------------------------------------------------------*/ -+int32 float64_to_int32( float64 ); -+int32 float64_to_int32_round_to_zero( float64 ); -+float32 float64_to_float32( float64 ); -+ -+/*---------------------------------------------------------------------------- -+| Software IEC/IEEE double-precision operations. -+*----------------------------------------------------------------------------*/ -+float64 float64_round_to_int( float64 ); -+float64 float64_add( float64, float64 ); -+float64 float64_sub( float64, float64 ); -+float64 float64_mul( float64, float64 ); -+float64 float64_div( float64, float64 ); -+float64 float64_rem( float64, float64 ); -+float64 float64_sqrt( float64 ); -+flag float64_eq( float64, float64 ); -+flag float64_le( float64, float64 ); -+flag float64_lt( float64, float64 ); -+flag float64_eq_signaling( float64, float64 ); -+flag float64_le_quiet( float64, float64 ); -+flag float64_lt_quiet( float64, float64 ); -+flag float64_is_signaling_nan( float64 ); -+ -diff --git a/SoftFloat-2b/softfloat/bits64/powerpc-GCC/Makefile b/SoftFloat-2b/softfloat/bits64/powerpc-GCC/Makefile -new file mode 100644 -index 0000000..a5e2cc7 ---- /dev/null -+++ b/SoftFloat-2b/softfloat/bits64/powerpc-GCC/Makefile -@@ -0,0 +1,24 @@ -+ -+PROCESSOR_H = ../../../processors/powerpc-GCC.h -+SOFTFLOAT_MACROS = ../softfloat-macros -+ -+OBJ = .o -+EXE = -+INCLUDES = -I. -I.. -+COMPILE_C = $(COMPILE_PREFIX) -mcpu=8548 -mhard-float -mfloat-gprs=double -o $@ $(INCLUDES) -I- -O2 -+LINK = $(COMPILE_PREFIX) -o $@ -+ -+ALL: softfloat$(OBJ) timesoftfloat$(EXE) -+ -+milieu.h: $(PROCESSOR_H) -+ touch milieu.h -+ -+softfloat$(OBJ): milieu.h softfloat.h softfloat-specialize $(SOFTFLOAT_MACROS) ../softfloat.c -+ $(COMPILE_C) ../softfloat.c -+ -+timesoftfloat$(OBJ): milieu.h softfloat.h ../timesoftfloat.c -+ $(COMPILE_C) ../timesoftfloat.c -+ -+timesoftfloat$(EXE): softfloat$(OBJ) timesoftfloat$(OBJ) -+ $(LINK) softfloat$(OBJ) timesoftfloat$(OBJ) -+ -diff --git a/SoftFloat-2b/softfloat/bits64/powerpc-GCC/milieu.h b/SoftFloat-2b/softfloat/bits64/powerpc-GCC/milieu.h -new file mode 100644 -index 0000000..1b66490 ---- /dev/null -+++ b/SoftFloat-2b/softfloat/bits64/powerpc-GCC/milieu.h -@@ -0,0 +1,55 @@ -+/* -+ * This file is derived from softfloat/bits64/386-Win32-GCC/milieu.h, -+ * the copyright for that material belongs to the original owners. -+ * -+ * Additional material and changes where applicable is: -+ * Copyright (C) 2008 Freescale Semiconductor, Inc. All rights reserved. -+ * -+ * Author: Ebony Zhu, -+ * Yu Liu, -+ */ -+ -+/*============================================================================ -+ -+This C header file is part of the SoftFloat IEC/IEEE Floating-point Arithmetic -+Package, Release 2b. -+ -+Written by John R. Hauser. This work was made possible in part by the -+International Computer Science Institute, located at Suite 600, 1947 Center -+Street, Berkeley, California 94704. Funding was partially provided by the -+National Science Foundation under grant MIP-9311980. The original version -+of this code was written as part of a project to build a fixed-point vector -+processor in collaboration with the University of California at Berkeley, -+overseen by Profs. Nelson Morgan and John Wawrzynek. More information -+is available through the Web page `http://www.cs.berkeley.edu/~jhauser/ -+arithmetic/SoftFloat.html'. -+ -+THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort has -+been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT TIMES -+RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO PERSONS -+AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ALL LOSSES, -+COSTS, OR OTHER PROBLEMS THEY INCUR DUE TO THE SOFTWARE, AND WHO FURTHERMORE -+EFFECTIVELY INDEMNIFY JOHN HAUSER AND THE INTERNATIONAL COMPUTER SCIENCE -+INSTITUTE (possibly via similar legal warning) AGAINST ALL LOSSES, COSTS, OR -+OTHER PROBLEMS INCURRED BY THEIR CUSTOMERS AND CLIENTS DUE TO THE SOFTWARE. -+ -+Derivative works are acceptable, even for commercial purposes, so long as -+(1) the source code for the derivative work includes prominent notice that -+the work is derivative, and (2) the source code includes prominent notice with -+these four paragraphs for those parts of this code that are retained. -+ -+=============================================================================*/ -+ -+/*---------------------------------------------------------------------------- -+| Include common integer types and flags. -+*----------------------------------------------------------------------------*/ -+#include "../../../processors/SPARC-GCC.h" -+ -+/*---------------------------------------------------------------------------- -+| Symbolic Boolean literals. -+*----------------------------------------------------------------------------*/ -+enum { -+ FALSE = 0, -+ TRUE = 1 -+}; -+ -diff --git a/SoftFloat-2b/softfloat/bits64/powerpc-GCC/softfloat-specialize b/SoftFloat-2b/softfloat/bits64/powerpc-GCC/softfloat-specialize -new file mode 100644 -index 0000000..b1d0bc8 ---- /dev/null -+++ b/SoftFloat-2b/softfloat/bits64/powerpc-GCC/softfloat-specialize -@@ -0,0 +1,422 @@ -+/* -+ * This file is derived from softfloat/bits64/386-Win32-GCC/softfloat-specialize, -+ * the copyright for that material belongs to the original owners. -+ * -+ * Additional material and changes where applicable is: -+ * Copyright (C) 2008 Freescale Semiconductor, Inc. All rights reserved. -+ * -+ * Author: Ebony Zhu, -+ * Yu Liu, -+ */ -+ -+/*============================================================================ -+ -+This C source fragment is part of the SoftFloat IEC/IEEE Floating-point -+Arithmetic Package, Release 2b. -+ -+Written by John R. Hauser. This work was made possible in part by the -+International Computer Science Institute, located at Suite 600, 1947 Center -+Street, Berkeley, California 94704. Funding was partially provided by the -+National Science Foundation under grant MIP-9311980. The original version -+of this code was written as part of a project to build a fixed-point vector -+processor in collaboration with the University of California at Berkeley, -+overseen by Profs. Nelson Morgan and John Wawrzynek. More information -+is available through the Web page `http://www.cs.berkeley.edu/~jhauser/ -+arithmetic/SoftFloat.html'. -+ -+THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort has -+been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT TIMES -+RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO PERSONS -+AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ALL LOSSES, -+COSTS, OR OTHER PROBLEMS THEY INCUR DUE TO THE SOFTWARE, AND WHO FURTHERMORE -+EFFECTIVELY INDEMNIFY JOHN HAUSER AND THE INTERNATIONAL COMPUTER SCIENCE -+INSTITUTE (possibly via similar legal warning) AGAINST ALL LOSSES, COSTS, OR -+OTHER PROBLEMS INCURRED BY THEIR CUSTOMERS AND CLIENTS DUE TO THE SOFTWARE. -+ -+Derivative works are acceptable, even for commercial purposes, so long as -+(1) the source code for the derivative work includes prominent notice that -+the work is derivative, and (2) the source code includes prominent notice with -+these four paragraphs for those parts of this code that are retained. -+ -+=============================================================================*/ -+ -+/*---------------------------------------------------------------------------- -+| Underflow tininess-detection mode, statically initialized to default value. -+| (The declaration in `softfloat.h' must match the `int8' type here.) -+*----------------------------------------------------------------------------*/ -+int8 float_detect_tininess = float_tininess_before_rounding; -+ -+/*---------------------------------------------------------------------------- -+| Raises the exceptions specified by `flags'. Floating-point traps can be -+| defined here if desired. It is currently not possible for such a trap -+| to substitute a result value. If traps are not implemented, this routine -+| should be simply `float_exception_flags |= flags;'. -+*----------------------------------------------------------------------------*/ -+ -+void float_raise( int8 flags ) -+{ -+ -+ float_exception_flags |= flags; -+ -+} -+ -+/*---------------------------------------------------------------------------- -+| Internal canonical NaN format. -+*----------------------------------------------------------------------------*/ -+typedef struct { -+ flag sign; -+ bits64 high, low; -+} commonNaNT; -+ -+/*---------------------------------------------------------------------------- -+| The pattern for a default generated single-precision NaN. -+*----------------------------------------------------------------------------*/ -+#define float32_default_nan 0x7FFFFFFF -+ -+/*---------------------------------------------------------------------------- -+| Returns 1 if the single-precision floating-point value `a' is a NaN; -+| otherwise returns 0. -+*----------------------------------------------------------------------------*/ -+ -+flag float32_is_nan( float32 a ) -+{ -+ -+ return ( 0xFF000000 < (bits32) ( a<<1 ) ); -+ -+} -+ -+/*---------------------------------------------------------------------------- -+| Returns 1 if the single-precision floating-point value `a' is a signaling -+| NaN; otherwise returns 0. -+*----------------------------------------------------------------------------*/ -+ -+flag float32_is_signaling_nan( float32 a ) -+{ -+ -+ return ( ( ( a>>22 ) & 0x1FF ) == 0x1FE ) && ( a & 0x003FFFFF ); -+ -+} -+ -+/*---------------------------------------------------------------------------- -+| Returns the result of converting the single-precision floating-point NaN -+| `a' to the canonical NaN format. If `a' is a signaling NaN, the invalid -+| exception is raised. -+*----------------------------------------------------------------------------*/ -+ -+static commonNaNT float32ToCommonNaN( float32 a ) -+{ -+ commonNaNT z; -+ -+ if ( float32_is_signaling_nan( a ) ) float_raise( float_flag_invalid ); -+ z.sign = a>>31; -+ z.low = 0; -+ z.high = ( (bits64) a )<<41; -+ return z; -+ -+} -+ -+/*---------------------------------------------------------------------------- -+| Returns the result of converting the canonical NaN `a' to the single- -+| precision floating-point format. -+*----------------------------------------------------------------------------*/ -+ -+static float32 commonNaNToFloat32( commonNaNT a ) -+{ -+ -+ return ( ( (bits32) a.sign )<<31 ) | 0x7FC00000 | ( a.high>>41 ); -+ -+} -+ -+/*---------------------------------------------------------------------------- -+| Takes two single-precision floating-point values `a' and `b', one of which -+| is a NaN, and returns the appropriate NaN result. If either `a' or `b' is a -+| signaling NaN, the invalid exception is raised. -+*----------------------------------------------------------------------------*/ -+ -+static float32 propagateFloat32NaN( float32 a, float32 b ) -+{ -+ flag aIsNaN, aIsSignalingNaN, bIsNaN, bIsSignalingNaN; -+ -+ aIsNaN = float32_is_nan( a ); -+ aIsSignalingNaN = float32_is_signaling_nan( a ); -+ bIsNaN = float32_is_nan( b ); -+ bIsSignalingNaN = float32_is_signaling_nan( b ); -+ a |= 0x00400000; -+ b |= 0x00400000; -+ if ( aIsSignalingNaN | bIsSignalingNaN ) float_raise( float_flag_invalid ); -+ return bIsSignalingNaN ? b : aIsSignalingNaN ? a : bIsNaN ? b : a; -+ -+} -+ -+/*---------------------------------------------------------------------------- -+| The pattern for a default generated double-precision NaN. -+*----------------------------------------------------------------------------*/ -+#define float64_default_nan LIT64( 0x7FFFFFFFFFFFFFFF ) -+ -+/*---------------------------------------------------------------------------- -+| Returns 1 if the double-precision floating-point value `a' is a NaN; -+| otherwise returns 0. -+*----------------------------------------------------------------------------*/ -+ -+flag float64_is_nan( float64 a ) -+{ -+ -+ return ( LIT64( 0xFFE0000000000000 ) < (bits64) ( a<<1 ) ); -+ -+} -+ -+/*---------------------------------------------------------------------------- -+| Returns 1 if the double-precision floating-point value `a' is a signaling -+| NaN; otherwise returns 0. -+*----------------------------------------------------------------------------*/ -+ -+flag float64_is_signaling_nan( float64 a ) -+{ -+ -+ return -+ ( ( ( a>>51 ) & 0xFFF ) == 0xFFE ) -+ && ( a & LIT64( 0x0007FFFFFFFFFFFF ) ); -+ -+} -+ -+/*---------------------------------------------------------------------------- -+| Returns the result of converting the double-precision floating-point NaN -+| `a' to the canonical NaN format. If `a' is a signaling NaN, the invalid -+| exception is raised. -+*----------------------------------------------------------------------------*/ -+ -+static commonNaNT float64ToCommonNaN( float64 a ) -+{ -+ commonNaNT z; -+ -+ if ( float64_is_signaling_nan( a ) ) float_raise( float_flag_invalid ); -+ z.sign = a>>63; -+ z.low = 0; -+ z.high = a<<12; -+ return z; -+ -+} -+ -+/*---------------------------------------------------------------------------- -+| Returns the result of converting the canonical NaN `a' to the double- -+| precision floating-point format. -+*----------------------------------------------------------------------------*/ -+ -+static float64 commonNaNToFloat64( commonNaNT a ) -+{ -+ -+ return -+ ( ( (bits64) a.sign )<<63 ) -+ | LIT64( 0x7FF8000000000000 ) -+ | ( a.high>>12 ); -+ -+} -+ -+/*---------------------------------------------------------------------------- -+| Takes two double-precision floating-point values `a' and `b', one of which -+| is a NaN, and returns the appropriate NaN result. If either `a' or `b' is a -+| signaling NaN, the invalid exception is raised. -+*----------------------------------------------------------------------------*/ -+ -+static float64 propagateFloat64NaN( float64 a, float64 b ) -+{ -+ flag aIsNaN, aIsSignalingNaN, bIsNaN, bIsSignalingNaN; -+ -+ aIsNaN = float64_is_nan( a ); -+ aIsSignalingNaN = float64_is_signaling_nan( a ); -+ bIsNaN = float64_is_nan( b ); -+ bIsSignalingNaN = float64_is_signaling_nan( b ); -+ a |= LIT64( 0x0008000000000000 ); -+ b |= LIT64( 0x0008000000000000 ); -+ if ( aIsSignalingNaN | bIsSignalingNaN ) float_raise( float_flag_invalid ); -+ return bIsSignalingNaN ? b : aIsSignalingNaN ? a : bIsNaN ? b : a; -+ -+} -+ -+#ifdef FLOATX80 -+ -+/*---------------------------------------------------------------------------- -+| The pattern for a default generated extended double-precision NaN. The -+| `high' and `low' values hold the most- and least-significant bits, -+| respectively. -+*----------------------------------------------------------------------------*/ -+#define floatx80_default_nan_high 0x7FFF -+#define floatx80_default_nan_low LIT64( 0xFFFFFFFFFFFFFFFF ) -+ -+/*---------------------------------------------------------------------------- -+| Returns 1 if the extended double-precision floating-point value `a' is a -+| NaN; otherwise returns 0. -+*----------------------------------------------------------------------------*/ -+ -+flag floatx80_is_nan( floatx80 a ) -+{ -+ -+ return ( ( a.high & 0x7FFF ) == 0x7FFF ) && (bits64) ( a.low<<1 ); -+ -+} -+ -+/*---------------------------------------------------------------------------- -+| Returns 1 if the extended double-precision floating-point value `a' is a -+| signaling NaN; otherwise returns 0. -+*----------------------------------------------------------------------------*/ -+ -+flag floatx80_is_signaling_nan( floatx80 a ) -+{ -+ bits64 aLow; -+ -+ aLow = a.low & ~ LIT64( 0x4000000000000000 ); -+ return -+ ( ( a.high & 0x7FFF ) == 0x7FFF ) -+ && (bits64) ( aLow<<1 ) -+ && ( a.low == aLow ); -+ -+} -+ -+/*---------------------------------------------------------------------------- -+| Returns the result of converting the extended double-precision floating- -+| point NaN `a' to the canonical NaN format. If `a' is a signaling NaN, the -+| invalid exception is raised. -+*----------------------------------------------------------------------------*/ -+ -+static commonNaNT floatx80ToCommonNaN( floatx80 a ) -+{ -+ commonNaNT z; -+ -+ if ( floatx80_is_signaling_nan( a ) ) float_raise( float_flag_invalid ); -+ z.sign = a.high>>15; -+ z.low = 0; -+ z.high = a.low<<1; -+ return z; -+ -+} -+ -+/*---------------------------------------------------------------------------- -+| Returns the result of converting the canonical NaN `a' to the extended -+| double-precision floating-point format. -+*----------------------------------------------------------------------------*/ -+ -+static floatx80 commonNaNToFloatx80( commonNaNT a ) -+{ -+ floatx80 z; -+ -+ z.low = LIT64( 0xC000000000000000 ) | ( a.high>>1 ); -+ z.high = ( ( (bits16) a.sign )<<15 ) | 0x7FFF; -+ return z; -+ -+} -+ -+/*---------------------------------------------------------------------------- -+| Takes two extended double-precision floating-point values `a' and `b', one -+| of which is a NaN, and returns the appropriate NaN result. If either `a' or -+| `b' is a signaling NaN, the invalid exception is raised. -+*----------------------------------------------------------------------------*/ -+ -+static floatx80 propagateFloatx80NaN( floatx80 a, floatx80 b ) -+{ -+ flag aIsNaN, aIsSignalingNaN, bIsNaN, bIsSignalingNaN; -+ -+ aIsNaN = floatx80_is_nan( a ); -+ aIsSignalingNaN = floatx80_is_signaling_nan( a ); -+ bIsNaN = floatx80_is_nan( b ); -+ bIsSignalingNaN = floatx80_is_signaling_nan( b ); -+ a.low |= LIT64( 0xC000000000000000 ); -+ b.low |= LIT64( 0xC000000000000000 ); -+ if ( aIsSignalingNaN | bIsSignalingNaN ) float_raise( float_flag_invalid ); -+ return bIsSignalingNaN ? b : aIsSignalingNaN ? a : bIsNaN ? b : a; -+ -+} -+ -+#endif -+ -+#ifdef FLOAT128 -+ -+/*---------------------------------------------------------------------------- -+| The pattern for a default generated quadruple-precision NaN. The `high' and -+| `low' values hold the most- and least-significant bits, respectively. -+*----------------------------------------------------------------------------*/ -+#define float128_default_nan_high LIT64( 0x7FFFFFFFFFFFFFFF ) -+#define float128_default_nan_low LIT64( 0xFFFFFFFFFFFFFFFF ) -+ -+/*---------------------------------------------------------------------------- -+| Returns 1 if the quadruple-precision floating-point value `a' is a NaN; -+| otherwise returns 0. -+*----------------------------------------------------------------------------*/ -+ -+flag float128_is_nan( float128 a ) -+{ -+ -+ return -+ ( LIT64( 0xFFFE000000000000 ) <= (bits64) ( a.high<<1 ) ) -+ && ( a.low || ( a.high & LIT64( 0x0000FFFFFFFFFFFF ) ) ); -+ -+} -+ -+/*---------------------------------------------------------------------------- -+| Returns 1 if the quadruple-precision floating-point value `a' is a -+| signaling NaN; otherwise returns 0. -+*----------------------------------------------------------------------------*/ -+ -+flag float128_is_signaling_nan( float128 a ) -+{ -+ -+ return -+ ( ( ( a.high>>47 ) & 0xFFFF ) == 0xFFFE ) -+ && ( a.low || ( a.high & LIT64( 0x00007FFFFFFFFFFF ) ) ); -+ -+} -+ -+/*---------------------------------------------------------------------------- -+| Returns the result of converting the quadruple-precision floating-point NaN -+| `a' to the canonical NaN format. If `a' is a signaling NaN, the invalid -+| exception is raised. -+*----------------------------------------------------------------------------*/ -+ -+static commonNaNT float128ToCommonNaN( float128 a ) -+{ -+ commonNaNT z; -+ -+ if ( float128_is_signaling_nan( a ) ) float_raise( float_flag_invalid ); -+ z.sign = a.high>>63; -+ shortShift128Left( a.high, a.low, 16, &z.high, &z.low ); -+ return z; -+ -+} -+ -+/*---------------------------------------------------------------------------- -+| Returns the result of converting the canonical NaN `a' to the quadruple- -+| precision floating-point format. -+*----------------------------------------------------------------------------*/ -+ -+static float128 commonNaNToFloat128( commonNaNT a ) -+{ -+ float128 z; -+ -+ shift128Right( a.high, a.low, 16, &z.high, &z.low ); -+ z.high |= ( ( (bits64) a.sign )<<63 ) | LIT64( 0x7FFF800000000000 ); -+ return z; -+ -+} -+ -+/*---------------------------------------------------------------------------- -+| Takes two quadruple-precision floating-point values `a' and `b', one of -+| which is a NaN, and returns the appropriate NaN result. If either `a' or -+| `b' is a signaling NaN, the invalid exception is raised. -+*----------------------------------------------------------------------------*/ -+ -+static float128 propagateFloat128NaN( float128 a, float128 b ) -+{ -+ flag aIsNaN, aIsSignalingNaN, bIsNaN, bIsSignalingNaN; -+ -+ aIsNaN = float128_is_nan( a ); -+ aIsSignalingNaN = float128_is_signaling_nan( a ); -+ bIsNaN = float128_is_nan( b ); -+ bIsSignalingNaN = float128_is_signaling_nan( b ); -+ a.high |= LIT64( 0x0000800000000000 ); -+ b.high |= LIT64( 0x0000800000000000 ); -+ if ( aIsSignalingNaN | bIsSignalingNaN ) float_raise( float_flag_invalid ); -+ return bIsSignalingNaN ? b : aIsSignalingNaN ? a : bIsNaN ? b : a; -+ -+} -+ -+#endif -+ -diff --git a/SoftFloat-2b/softfloat/bits64/powerpc-GCC/softfloat.h b/SoftFloat-2b/softfloat/bits64/powerpc-GCC/softfloat.h -new file mode 100644 -index 0000000..5b7cb1c ---- /dev/null -+++ b/SoftFloat-2b/softfloat/bits64/powerpc-GCC/softfloat.h -@@ -0,0 +1,269 @@ -+/* -+ * This file is derived from softfloat/bits64/386-Win32-GCC/softfloat.h, -+ * the copyright for that material belongs to the original owners. -+ * -+ * Additional material and changes where applicable is: -+ * Copyright (C) 2008 Freescale Semiconductor, Inc. All rights reserved. -+ * -+ * Author: Ebony Zhu, -+ * Yu Liu, -+ */ -+ -+/*============================================================================ -+ -+This C header file is part of the SoftFloat IEC/IEEE Floating-point Arithmetic -+Package, Release 2b. -+ -+Written by John R. Hauser. This work was made possible in part by the -+International Computer Science Institute, located at Suite 600, 1947 Center -+Street, Berkeley, California 94704. Funding was partially provided by the -+National Science Foundation under grant MIP-9311980. The original version -+of this code was written as part of a project to build a fixed-point vector -+processor in collaboration with the University of California at Berkeley, -+overseen by Profs. Nelson Morgan and John Wawrzynek. More information -+is available through the Web page `http://www.cs.berkeley.edu/~jhauser/ -+arithmetic/SoftFloat.html'. -+ -+THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort has -+been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT TIMES -+RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO PERSONS -+AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ALL LOSSES, -+COSTS, OR OTHER PROBLEMS THEY INCUR DUE TO THE SOFTWARE, AND WHO FURTHERMORE -+EFFECTIVELY INDEMNIFY JOHN HAUSER AND THE INTERNATIONAL COMPUTER SCIENCE -+INSTITUTE (possibly via similar legal warning) AGAINST ALL LOSSES, COSTS, OR -+OTHER PROBLEMS INCURRED BY THEIR CUSTOMERS AND CLIENTS DUE TO THE SOFTWARE. -+ -+Derivative works are acceptable, even for commercial purposes, so long as -+(1) the source code for the derivative work includes prominent notice that -+the work is derivative, and (2) the source code includes prominent notice with -+these four paragraphs for those parts of this code that are retained. -+ -+=============================================================================*/ -+ -+/*---------------------------------------------------------------------------- -+| The macro `FLOATX80' must be defined to enable the extended double-precision -+| floating-point format `floatx80'. If this macro is not defined, the -+| `floatx80' type will not be defined, and none of the functions that either -+| input or output the `floatx80' type will be defined. The same applies to -+| the `FLOAT128' macro and the quadruple-precision format `float128'. -+*----------------------------------------------------------------------------*/ -+#define FLOATX80 -+#define FLOAT128 -+ -+/*---------------------------------------------------------------------------- -+| Software IEC/IEEE floating-point types. -+*----------------------------------------------------------------------------*/ -+typedef unsigned int float32; -+typedef unsigned long long float64; -+#ifdef FLOATX80 -+typedef struct { -+ unsigned short high; -+ unsigned long long low; -+} floatx80; -+#endif -+#ifdef FLOAT128 -+typedef struct { -+ unsigned long long high, low; -+} float128; -+#endif -+ -+/*---------------------------------------------------------------------------- -+| Software IEC/IEEE floating-point underflow tininess-detection mode. -+*----------------------------------------------------------------------------*/ -+extern int float_detect_tininess; -+enum { -+ float_tininess_after_rounding = 0, -+ float_tininess_before_rounding = 1 -+}; -+ -+/*---------------------------------------------------------------------------- -+| Software IEC/IEEE floating-point rounding mode. -+*----------------------------------------------------------------------------*/ -+extern int float_rounding_mode; -+enum { -+ float_round_nearest_even = 0, -+ float_round_to_zero = 1, -+ float_round_up = 2, -+ float_round_down = 3 -+}; -+ -+/*---------------------------------------------------------------------------- -+| Software IEC/IEEE floating-point exception flags. -+*----------------------------------------------------------------------------*/ -+extern int float_exception_flags; -+enum { -+ float_flag_inexact = 1, -+ float_flag_divbyzero = 2, -+ float_flag_underflow = 4, -+ float_flag_overflow = 8, -+ float_flag_invalid = 16 -+}; -+ -+/*---------------------------------------------------------------------------- -+| Routine to raise any or all of the software IEC/IEEE floating-point -+| exception flags. -+*----------------------------------------------------------------------------*/ -+void float_raise( int ); -+ -+/*---------------------------------------------------------------------------- -+| Software IEC/IEEE integer-to-floating-point conversion routines. -+*----------------------------------------------------------------------------*/ -+float32 int32_to_float32( int ); -+float64 int32_to_float64( int ); -+#ifdef FLOATX80 -+floatx80 int32_to_floatx80( int ); -+#endif -+#ifdef FLOAT128 -+float128 int32_to_float128( int ); -+#endif -+float32 int64_to_float32( long long ); -+float64 int64_to_float64( long long ); -+#ifdef FLOATX80 -+floatx80 int64_to_floatx80( long long ); -+#endif -+#ifdef FLOAT128 -+float128 int64_to_float128( long long ); -+#endif -+ -+/*---------------------------------------------------------------------------- -+| Software IEC/IEEE single-precision conversion routines. -+*----------------------------------------------------------------------------*/ -+int float32_to_int32( float32 ); -+int float32_to_int32_round_to_zero( float32 ); -+long long float32_to_int64( float32 ); -+long long float32_to_int64_round_to_zero( float32 ); -+float64 float32_to_float64( float32 ); -+#ifdef FLOATX80 -+floatx80 float32_to_floatx80( float32 ); -+#endif -+#ifdef FLOAT128 -+float128 float32_to_float128( float32 ); -+#endif -+ -+/*---------------------------------------------------------------------------- -+| Software IEC/IEEE single-precision operations. -+*----------------------------------------------------------------------------*/ -+float32 float32_round_to_int( float32 ); -+float32 float32_add( float32, float32 ); -+float32 float32_sub( float32, float32 ); -+float32 float32_mul( float32, float32 ); -+float32 float32_div( float32, float32 ); -+float32 float32_rem( float32, float32 ); -+float32 float32_sqrt( float32 ); -+int float32_eq( float32, float32 ); -+int float32_le( float32, float32 ); -+int float32_lt( float32, float32 ); -+int float32_eq_signaling( float32, float32 ); -+int float32_le_quiet( float32, float32 ); -+int float32_lt_quiet( float32, float32 ); -+int float32_is_signaling_nan( float32 ); -+ -+/*---------------------------------------------------------------------------- -+| Software IEC/IEEE double-precision conversion routines. -+*----------------------------------------------------------------------------*/ -+int float64_to_int32( float64 ); -+int float64_to_int32_round_to_zero( float64 ); -+long long float64_to_int64( float64 ); -+long long float64_to_int64_round_to_zero( float64 ); -+float32 float64_to_float32( float64 ); -+#ifdef FLOATX80 -+floatx80 float64_to_floatx80( float64 ); -+#endif -+#ifdef FLOAT128 -+float128 float64_to_float128( float64 ); -+#endif -+ -+/*---------------------------------------------------------------------------- -+| Software IEC/IEEE double-precision operations. -+*----------------------------------------------------------------------------*/ -+float64 float64_round_to_int( float64 ); -+float64 float64_add( float64, float64 ); -+float64 float64_sub( float64, float64 ); -+float64 float64_mul( float64, float64 ); -+float64 float64_div( float64, float64 ); -+float64 float64_rem( float64, float64 ); -+float64 float64_sqrt( float64 ); -+int float64_eq( float64, float64 ); -+int float64_le( float64, float64 ); -+int float64_lt( float64, float64 ); -+int float64_eq_signaling( float64, float64 ); -+int float64_le_quiet( float64, float64 ); -+int float64_lt_quiet( float64, float64 ); -+int float64_is_signaling_nan( float64 ); -+ -+#ifdef FLOATX80 -+ -+/*---------------------------------------------------------------------------- -+| Software IEC/IEEE extended double-precision conversion routines. -+*----------------------------------------------------------------------------*/ -+int floatx80_to_int32( floatx80 ); -+int floatx80_to_int32_round_to_zero( floatx80 ); -+long long floatx80_to_int64( floatx80 ); -+long long floatx80_to_int64_round_to_zero( floatx80 ); -+float32 floatx80_to_float32( floatx80 ); -+float64 floatx80_to_float64( floatx80 ); -+#ifdef FLOAT128 -+float128 floatx80_to_float128( floatx80 ); -+#endif -+ -+/*---------------------------------------------------------------------------- -+| Software IEC/IEEE extended double-precision rounding precision. Valid -+| values are 32, 64, and 80. -+*----------------------------------------------------------------------------*/ -+extern int floatx80_rounding_precision; -+ -+/*---------------------------------------------------------------------------- -+| Software IEC/IEEE extended double-precision operations. -+*----------------------------------------------------------------------------*/ -+floatx80 floatx80_round_to_int( floatx80 ); -+floatx80 floatx80_add( floatx80, floatx80 ); -+floatx80 floatx80_sub( floatx80, floatx80 ); -+floatx80 floatx80_mul( floatx80, floatx80 ); -+floatx80 floatx80_div( floatx80, floatx80 ); -+floatx80 floatx80_rem( floatx80, floatx80 ); -+floatx80 floatx80_sqrt( floatx80 ); -+int floatx80_eq( floatx80, floatx80 ); -+int floatx80_le( floatx80, floatx80 ); -+int floatx80_lt( floatx80, floatx80 ); -+int floatx80_eq_signaling( floatx80, floatx80 ); -+int floatx80_le_quiet( floatx80, floatx80 ); -+int floatx80_lt_quiet( floatx80, floatx80 ); -+int floatx80_is_signaling_nan( floatx80 ); -+ -+#endif -+ -+#ifdef FLOAT128 -+ -+/*---------------------------------------------------------------------------- -+| Software IEC/IEEE quadruple-precision conversion routines. -+*----------------------------------------------------------------------------*/ -+int float128_to_int32( float128 ); -+int float128_to_int32_round_to_zero( float128 ); -+long long float128_to_int64( float128 ); -+long long float128_to_int64_round_to_zero( float128 ); -+float32 float128_to_float32( float128 ); -+float64 float128_to_float64( float128 ); -+#ifdef FLOATX80 -+floatx80 float128_to_floatx80( float128 ); -+#endif -+ -+/*---------------------------------------------------------------------------- -+| Software IEC/IEEE quadruple-precision operations. -+*----------------------------------------------------------------------------*/ -+float128 float128_round_to_int( float128 ); -+float128 float128_add( float128, float128 ); -+float128 float128_sub( float128, float128 ); -+float128 float128_mul( float128, float128 ); -+float128 float128_div( float128, float128 ); -+float128 float128_rem( float128, float128 ); -+float128 float128_sqrt( float128 ); -+int float128_eq( float128, float128 ); -+int float128_le( float128, float128 ); -+int float128_lt( float128, float128 ); -+int float128_eq_signaling( float128, float128 ); -+int float128_le_quiet( float128, float128 ); -+int float128_lt_quiet( float128, float128 ); -+int float128_is_signaling_nan( float128 ); -+ -+#endif -+ --- -1.5.4 - diff --git a/meta-fsl-ppc/recipes-test/testfloat/files/TestFloat-powerpc-E500v2-SPE-1.patch b/meta-fsl-ppc/recipes-test/testfloat/files/TestFloat-powerpc-E500v2-SPE-1.patch deleted file mode 100644 index c34421cf..00000000 --- a/meta-fsl-ppc/recipes-test/testfloat/files/TestFloat-powerpc-E500v2-SPE-1.patch +++ /dev/null @@ -1,1644 +0,0 @@ -This patch adds PowerPC E500v2 SPE support in TestFloat. -And it disables the testing for hardware that can not trigger SPE interrupt. - -Signed-off-by: Ebony Zhu -Signed-off-by: Liu Yu ---- - processors/POWERPC-gcc.h | 99 +++++ - testfloat/powerpc-linux-gcc/Makefile | 83 +++++ - testfloat/powerpc-linux-gcc/milieu.h | 71 ++++ - testfloat/powerpc-linux-gcc/systflags.c | 107 ++++++ - testfloat/powerpc-linux-gcc/systfloat.c | 595 +++++++++++++++++++++++++++++++ - testfloat/powerpc-linux-gcc/systmodes.c | 67 ++++ - testfloat/templates/Makefile | 18 +- - testfloat/templates/milieu.h | 2 +- - testfloat/testFunction.h | 2 +- - testfloat/testLoops.c | 216 +++++++++++ - 10 files changed, 1252 insertions(+), 8 deletions(-) - create mode 100644 processors/POWERPC-gcc.h - create mode 100644 testfloat/powerpc-linux-gcc/Makefile - create mode 100644 testfloat/powerpc-linux-gcc/milieu.h - create mode 100644 testfloat/powerpc-linux-gcc/systflags.c - create mode 100644 testfloat/powerpc-linux-gcc/systfloat.c - create mode 100644 testfloat/powerpc-linux-gcc/systmodes.c - -diff --git a/processors/POWERPC-gcc.h b/processors/POWERPC-gcc.h -new file mode 100644 -index 0000000..4201faa ---- /dev/null -+++ b/processors/POWERPC-gcc.h -@@ -0,0 +1,99 @@ -+/* -+ * This file is derived from processors/i386-GCC.h, -+ * the copyright for that material belongs to the original owners. -+ * -+ * Additional material and changes where applicable is: -+ * Copyright (C) 2008 Freescale Semiconductor, Inc. All rights reserved. -+ * -+ * Author: Ebony Zhu, -+ * Yu Liu, -+ * -+ * THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort has -+ * been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT TIMES -+ * RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO PERSONS -+ * AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ALL LOSSES, -+ * COSTS, OR OTHER PROBLEMS THEY INCUR DUE TO THE SOFTWARE, AND WHO FURTHERMORE -+ * EFFECTIVELY INDEMNIFY JOHN HAUSER AND THE INTERNATIONAL COMPUTER SCIENCE -+ * INSTITUTE (possibly via similar legal warning) AGAINST ALL LOSSES, COSTS, OR -+ * OTHER PROBLEMS INCURRED BY THEIR CUSTOMERS AND CLIENTS DUE TO THE SOFTWARE. -+ */ -+ -+/* -+------------------------------------------------------------------------------- -+One of the macros `BIGENDIAN' or `LITTLEENDIAN' must be defined. -+------------------------------------------------------------------------------- -+*/ -+#define BIGENDIAN -+ -+/* -+------------------------------------------------------------------------------- -+The macro `BITS64' can be defined to indicate that 64-bit integer types are -+supported by the compiler. -+------------------------------------------------------------------------------- -+*/ -+#undef BITS64 -+ -+/* -+------------------------------------------------------------------------------- -+Each of the following `typedef's defines the most convenient type that holds -+integers of at least as many bits as specified. For example, `uint8' should -+be the most convenient type that can hold unsigned integers of as many as -+8 bits. The `flag' type must be able to hold either a 0 or 1. For most -+implementations of C, `flag', `uint8', and `int8' should all be `typedef'ed -+to the same as `int'. -+------------------------------------------------------------------------------- -+*/ -+typedef int flag; -+typedef int uint8; -+typedef int int8; -+typedef int uint16; -+typedef int int16; -+typedef unsigned int uint32; -+typedef signed int int32; -+#ifdef BITS64 -+typedef unsigned long long int uint64; -+typedef signed long long int int64; -+#endif -+ -+/* -+------------------------------------------------------------------------------- -+Each of the following `typedef's defines a type that holds integers -+of _exactly_ the number of bits specified. For instance, for most -+implementation of C, `bits16' and `sbits16' should be `typedef'ed to -+`unsigned short int' and `signed short int' (or `short int'), respectively. -+------------------------------------------------------------------------------- -+*/ -+typedef unsigned char bits8; -+typedef signed char sbits8; -+typedef unsigned short int bits16; -+typedef signed short int sbits16; -+typedef unsigned int bits32; -+typedef signed int sbits32; -+#ifdef BITS64 -+typedef unsigned long long int bits64; -+typedef signed long long int sbits64; -+#endif -+ -+#ifdef BITS64 -+/* -+------------------------------------------------------------------------------- -+The `LIT64' macro takes as its argument a textual integer literal and -+if necessary ``marks'' the literal as having a 64-bit integer type. -+For example, the GNU C Compiler (`gcc') requires that 64-bit literals be -+appended with the letters `LL' standing for `long long', which is `gcc's -+name for the 64-bit integer type. Some compilers may allow `LIT64' to be -+defined as the identity macro: `#define LIT64( a ) a'. -+------------------------------------------------------------------------------- -+*/ -+#define LIT64( a ) a##LL -+#endif -+ -+/* -+------------------------------------------------------------------------------- -+The macro `INLINE' can be used before functions that should be inlined. If -+a compiler does not support explicit inlining, this macro should be defined -+to be `static'. -+------------------------------------------------------------------------------- -+*/ -+#define INLINE extern inline -+ -diff --git a/testfloat/powerpc-linux-gcc/Makefile b/testfloat/powerpc-linux-gcc/Makefile -new file mode 100644 -index 0000000..de50aad ---- /dev/null -+++ b/testfloat/powerpc-linux-gcc/Makefile -@@ -0,0 +1,83 @@ -+ -+PROCESSOR_H = ../../processors/POWERPC-gcc.h -+SOFTFLOAT_VERSION = bits32 -+TARGET = powerpc-GCC -+SOFTFLOAT_DIR = ../../SoftFloat-2b/softfloat/$(SOFTFLOAT_VERSION)/$(TARGET) -+ -+OBJ = .o -+EXE = -+INCLUDES = -I. -I.. -I$(SOFTFLOAT_DIR) -+ -+COMPILE_C = $(COMPILE_PREFIX)gcc -c -o $@ $(INCLUDES) -I- -O $(EXTRA_CFLAGS) -+ -+COMPILE_C_HARD = $(COMPILE_PREFIX)gcc -c -te500v2 -o $@ $(INCLUDES) -+ -+COMPILE_SLOWFLOAT_C = $(COMPILE_PREFIX)gcc -c -o $@ $(INCLUDES) -I- -O -+ -+LINK = $(COMPILE_PREFIX)gcc -lm -o $@ -+ -+SOFTFLOAT_H = $(SOFTFLOAT_DIR)/softfloat.h -+SOFTFLOAT_OBJ = $(SOFTFLOAT_DIR)/softfloat$(OBJ) -+ -+ALL: testsoftfloat$(EXE) testfloat$(EXE) -+ -+systmodes$(OBJ): milieu.h systmodes.c -+ $(COMPILE_C) systmodes.c -+ -+systflags$(OBJ): milieu.h ../systflags.h systflags.c -+ $(COMPILE_C) systflags.c -+ -+systfloat$(OBJ): milieu.h $(SOFTFLOAT_H) ../systfloat.h systfloat.c -+ $(COMPILE_C_HARD) systfloat.c -+ -+#------------------------------------------------------------------------------ -+# Probably O.K. below here. -+#------------------------------------------------------------------------------ -+ -+milieu.h: $(PROCESSOR_H) -+ touch milieu.h -+ -+fail$(OBJ): milieu.h ../fail.h -+ $(COMPILE_C) ../fail.c -+ -+random$(OBJ): milieu.h ../random.h -+ $(COMPILE_C) ../random.c -+ -+testCases$(OBJ): milieu.h ../fail.h ../random.h $(SOFTFLOAT_H) ../testCases.h ../testCases.c -+ $(COMPILE_C) ../testCases.c -+ -+writeHex$(OBJ): milieu.h $(SOFTFLOAT_H) ../writeHex.h ../writeHex.c -+ $(COMPILE_C) ../writeHex.c -+ -+testLoops$(OBJ): milieu.h $(SOFTFLOAT_H) ../testCases.h ../writeHex.h ../testLoops.h ../testLoops.c -+ $(COMPILE_C) ../testLoops.c -+ -+slowfloat$(OBJ): milieu.h $(SOFTFLOAT_H) ../slowfloat.h ../slowfloat-32.c ../slowfloat-64.c ../slowfloat.c -+ $(COMPILE_SLOWFLOAT_C) ../slowfloat.c -+ -+testsoftfloat$(OBJ): milieu.h ../fail.h $(SOFTFLOAT_H) ../testCases.h ../testLoops.h ../slowfloat.h ../testsoftfloat.c -+ $(COMPILE_C) ../testsoftfloat.c -+ -+testsoftfloat$(EXE): fail$(OBJ) random$(OBJ) $(SOFTFLOAT_OBJ) testCases$(OBJ) writeHex$(OBJ) testLoops$(OBJ) slowfloat$(OBJ) testsoftfloat$(OBJ) systflags$(OBJ) systmodes$(OBJ) -+ $(LINK) fail$(OBJ) random$(OBJ) $(SOFTFLOAT_OBJ) testCases$(OBJ) writeHex$(OBJ) testLoops$(OBJ) slowfloat$(OBJ) testsoftfloat$(OBJ) systflags$(OBJ) systmodes$(OBJ) -+ -+testFunction$(OBJ): milieu.h $(SOFTFLOAT_H) ../testCases.h ../testLoops.h ../systmodes.h ../systflags.h ../systfloat.h ../testFunction.h ../testFunction.c -+ $(COMPILE_C) ../testFunction.c -+ -+testfloat$(OBJ): milieu.h ../fail.h $(SOFTFLOAT_H) ../testCases.h ../testLoops.h ../systflags.h ../testFunction.h ../testfloat.c -+ $(COMPILE_C) ../testfloat.c -+ -+testfloat$(EXE): fail$(OBJ) random$(OBJ) $(SOFTFLOAT_OBJ) testCases$(OBJ) writeHex$(OBJ) testLoops$(OBJ) systmodes$(OBJ) systflags$(OBJ) systfloat$(OBJ) testFunction$(OBJ) testfloat$(OBJ) -+ $(LINK) fail$(OBJ) random$(OBJ) $(SOFTFLOAT_OBJ) testCases$(OBJ) writeHex$(OBJ) testLoops$(OBJ) systmodes$(OBJ) systflags$(OBJ) systfloat$(OBJ) testFunction$(OBJ) testfloat$(OBJ) -+ -+$(SOFTFLOAT_OBJ): -+ make -C $(SOFTFLOAT_DIR) -+ -+cp: ALL -+ cp testsoftfloat$(EXE) ../../test_softfloat$(EXE) -+ cp testfloat$(EXE) ../../test_float$(EXE) -+ -+clean: -+ make -C $(SOFTFLOAT_DIR) clean -+ rm -f *.o testfloat$(EXE) testsoftfloat$(EXE) -+ rm -f ../../test_softfloat$(EXE) ../../test_float$(EXE) -diff --git a/testfloat/powerpc-linux-gcc/milieu.h b/testfloat/powerpc-linux-gcc/milieu.h -new file mode 100644 -index 0000000..29d2b18 ---- /dev/null -+++ b/testfloat/powerpc-linux-gcc/milieu.h -@@ -0,0 +1,71 @@ -+/* -+ * This file is derived from testfloat/386-Win32-gcc/milieu.h, -+ * the copyright for that material belongs to the original owners. -+ * -+ * Additional material and changes where applicable is: -+ * Copyright (C) 2008 Freescale Semiconductor, Inc. All rights reserved. -+ * -+ * Author: Ebony Zhu, -+ * Yu Liu, -+ */ -+ -+/* -+=============================================================================== -+ -+This C header file is part of TestFloat, Release 2a, a package of programs -+for testing the correctness of floating-point arithmetic complying to the -+IEC/IEEE Standard for Floating-Point. -+ -+Written by John R. Hauser. More information is available through the Web -+page `http://HTTP.CS.Berkeley.EDU/~jhauser/arithmetic/TestFloat.html'. -+ -+THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort -+has been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT -+TIMES RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO -+PERSONS AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ANY -+AND ALL LOSSES, COSTS, OR OTHER PROBLEMS ARISING FROM ITS USE. -+ -+Derivative works are acceptable, even for commercial purposes, so long as -+(1) they include prominent notice that the work is derivative, and (2) they -+include prominent notice akin to these four paragraphs for those parts of -+this code that are retained. -+ -+=============================================================================== -+*/ -+ -+/* -+------------------------------------------------------------------------------- -+Include common integer types and flags. -+------------------------------------------------------------------------------- -+*/ -+#include "../../processors/POWERPC-gcc.h" -+/* -+------------------------------------------------------------------------------- -+If the `BITS64' macro is defined by the processor header file but the -+version of SoftFloat being used/tested is the 32-bit one (`bits32'), the -+`BITS64' macro must be undefined here. -+------------------------------------------------------------------------------- -+*/ -+ -+#undef BITS64 -+/* -+------------------------------------------------------------------------------- -+The macro `LONG_DOUBLE_IS_FLOATX80' can be defined to indicate that the -+C compiler supports the type `long double' as an extended double-precision -+format. Alternatively, the macro `LONG_DOUBLE_IS_FLOAT128' can be defined -+to indicate that `long double' is a quadruple-precision format. If neither -+of these macros is defined, `long double' will be ignored. -+------------------------------------------------------------------------------- -+#define LONG_DOUBLE_IS_FLOATX80 -+*/ -+ -+/* -+------------------------------------------------------------------------------- -+Symbolic Boolean literals. -+------------------------------------------------------------------------------- -+*/ -+enum { -+ FALSE = 0, -+ TRUE = 1 -+}; -+ -diff --git a/testfloat/powerpc-linux-gcc/systflags.c b/testfloat/powerpc-linux-gcc/systflags.c -new file mode 100644 -index 0000000..c382442 ---- /dev/null -+++ b/testfloat/powerpc-linux-gcc/systflags.c -@@ -0,0 +1,107 @@ -+/* -+ * This file is derived from testfloat/386-Win32-gcc/systflags.c, -+ * the copyright for that material belongs to the original owners. -+ * -+ * Additional material and changes where applicable is: -+ * Copyright (C) 2008 Freescale Semiconductor, Inc. All rights reserved. -+ * -+ * Author: Ebony Zhu, -+ * Yu Liu, -+ */ -+ -+/* -+=============================================================================== -+ -+This C source file is part of TestFloat, Release 2a, a package of programs -+for testing the correctness of floating-point arithmetic complying to the -+IEC/IEEE Standard for Floating-Point. -+ -+Written by John R. Hauser. More information is available through the Web -+page `http://HTTP.CS.Berkeley.EDU/~jhauser/arithmetic/TestFloat.html'. -+ -+THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort -+has been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT -+TIMES RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO -+PERSONS AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ANY -+AND ALL LOSSES, COSTS, OR OTHER PROBLEMS ARISING FROM ITS USE. -+ -+Derivative works are acceptable, even for commercial purposes, so long as -+(1) they include prominent notice that the work is derivative, and (2) they -+include prominent notice akin to these four paragraphs for those parts of -+this code that are retained. -+ -+=============================================================================== -+*/ -+ -+#include "milieu.h" -+#include "systflags.h" -+#include -+#include -+#include -+#include -+#include -+ -+#ifdef __SPE__ -+ -+#include -+ -+ -+#define SPE_FINV_ENABLE (1UL << 5) -+#define SPE_FDBZ_ENABLE (1UL << 4) -+#define SPE_FUNF_ENABLE (1UL << 3) -+#define SPE_FOVF_ENABLE (1UL << 2) -+ -+#define SPE_FG (1UL << 13) -+#define SPE_FX (1UL << 12) -+#define SPE_FINV (1UL << 11) -+#define SPE_FDBZ (1UL << 10) -+#define SPE_FUNF (1UL << 9) -+#define SPE_FOVF (1UL << 8) -+ -+#define SPE_FG_H (1UL << 29) -+#define SPE_FX_H (1UL << 28) -+#define SPE_FINV_H (1UL << 27) -+#define SPE_FDBZ_H (1UL << 26) -+#define SPE_FUNF_H (1UL << 25) -+#define SPE_FOVF_H (1UL << 24) -+ -+static int is_soft_emu = 0; -+ -+#endif -+/* -+------------------------------------------------------------------------------- -+Clears the system's IEC/IEEE floating-point exception flags. Returns the -+previous value of the flags. -+------------------------------------------------------------------------------- -+*/ -+extern int rounding; -+unsigned int spefscr = 0; -+ -+int8 syst_float_flags_clear( void ) -+{ -+#ifdef TEST_KERNEL_EMU -+ if( (spefscr & (SPE_FINV | SPE_FINV_H)) -+ || (spefscr & (SPE_FDBZ | SPE_FDBZ_H)) -+ || (spefscr & (SPE_FUNF | SPE_FUNF_H)) -+ || (spefscr & (SPE_FOVF | SPE_FOVF_H)) -+ || (spefscr & (SPE_FX | SPE_FG | SPE_FX_H | SPE_FG_H))){ -+ is_soft_emu = 1; -+ } else { -+ is_soft_emu = 0; -+ } -+#endif -+ __builtin_spe_mtspefscr(0x3c|(rounding & 0x3)); -+ -+ return ((spefscr>>17) & 0x1f); -+} -+ -+int syst_float_is_soft_emu(void) -+{ -+ int ret = 0; -+#ifdef TEST_KERNEL_EMU -+ ret = is_soft_emu; -+#endif -+ return ret; -+} -+ -+ -diff --git a/testfloat/powerpc-linux-gcc/systfloat.c b/testfloat/powerpc-linux-gcc/systfloat.c -new file mode 100644 -index 0000000..8d06f9f ---- /dev/null -+++ b/testfloat/powerpc-linux-gcc/systfloat.c -@@ -0,0 +1,595 @@ -+/* -+ * This file is derived from testfloat/systfloat.c, -+ * the copyright for that material belongs to the original owners. -+ * -+ * Additional material and changes where applicable is: -+ * Copyright (C) 2008 Freescale Semiconductor, Inc. All rights reserved. -+ * -+ * Author: Ebony Zhu, -+ * Yu Liu, -+ */ -+ -+/* -+=============================================================================== -+ -+This C source file is part of TestFloat, Release 2a, a package of programs -+for testing the correctness of floating-point arithmetic complying to the -+IEC/IEEE Standard for Floating-Point. -+ -+Written by John R. Hauser. More information is available through the Web -+page `http://HTTP.CS.Berkeley.EDU/~jhauser/arithmetic/TestFloat.html'. -+ -+THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort -+has been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT -+TIMES RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO -+PERSONS AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ANY -+AND ALL LOSSES, COSTS, OR OTHER PROBLEMS ARISING FROM ITS USE. -+ -+Derivative works are acceptable, even for commercial purposes, so long as -+(1) they include prominent notice that the work is derivative, and (2) they -+include prominent notice akin to these four paragraphs for those parts of -+this code that are retained. -+ -+=============================================================================== -+*/ -+ -+#include -+#include "milieu.h" -+#include "softfloat.h" -+#include "systfloat.h" -+ -+extern unsigned int spefscr; -+ -+float32 syst_int32_to_float32( int32 a ) -+{ -+ float32 z; -+ -+ *( (float *) &z ) = a; -+ spefscr = __builtin_spe_mfspefscr(); -+ return z; -+ -+} -+ -+float64 syst_int32_to_float64( int32 a ) -+{ -+ float64 z; -+ -+ *( (double *) &z ) = a; -+ spefscr = __builtin_spe_mfspefscr(); -+ return z; -+ -+} -+ -+#if defined( FLOATX80 ) && defined( LONG_DOUBLE_IS_FLOATX80 ) -+ -+floatx80 syst_int32_to_floatx80( int32 a ) -+{ -+ floatx80 z; -+ -+ *( (long double *) &z ) = a; -+ return z; -+ -+} -+ -+#endif -+ -+#if defined( FLOAT128 ) && defined( LONG_DOUBLE_IS_FLOAT128 ) -+ -+float128 syst_int32_to_float128( int32 a ) -+{ -+ float128 z; -+ -+ *( (long double *) &z ) = a; -+ return z; -+ -+} -+ -+#endif -+ -+#ifdef BITS64 -+ -+float32 syst_int64_to_float32( int64 a ) -+{ -+ float32 z; -+ -+ *( (float *) &z ) = a; -+ spefscr = __builtin_spe_mfspefscr(); -+ return z; -+ -+} -+ -+float64 syst_int64_to_float64( int64 a ) -+{ -+ float64 z; -+ -+ *( (double *) &z ) = a; -+ spefscr = __builtin_spe_mfspefscr(); -+ return z; -+ -+} -+ -+#if defined( FLOATX80 ) && defined( LONG_DOUBLE_IS_FLOATX80 ) -+ -+floatx80 syst_int64_to_floatx80( int64 a ) -+{ -+ floatx80 z; -+ -+ *( (long double *) &z ) = a; -+ return z; -+ -+} -+ -+#endif -+ -+#if defined( FLOAT128 ) && defined( LONG_DOUBLE_IS_FLOAT128 ) -+ -+float128 syst_int64_to_float128( int64 a ) -+{ -+ float128 z; -+ -+ *( (long double *) &z ) = a; -+ return z; -+ -+} -+ -+#endif -+ -+#endif -+ -+int32 syst_float32_to_int32_round_to_zero( float32 a ) -+{ -+ int32 z = *( (float *) &a ); -+ spefscr = __builtin_spe_mfspefscr(); -+ -+ return z; -+ -+} -+ -+#ifdef BITS64 -+ -+int64 syst_float32_to_int64_round_to_zero( float32 a ) -+{ -+ int64 z = *( (float *) &a ); -+ spefscr = __builtin_spe_mfspefscr(); -+ return z; -+ -+} -+ -+#endif -+ -+float64 syst_float32_to_float64( float32 a ) -+{ -+ float64 z; -+ -+ *( (double *) &z ) = *( (float *) &a ); -+ spefscr = __builtin_spe_mfspefscr(); -+ return z; -+ -+} -+ -+#if defined( FLOATX80 ) && defined( LONG_DOUBLE_IS_FLOATX80 ) -+ -+floatx80 syst_float32_to_floatx80( float32 a ) -+{ -+ floatx80 z; -+ -+ *( (long double *) &z ) = *( (float *) &a ); -+ return z; -+ -+} -+ -+#endif -+ -+#if defined( FLOAT128 ) && defined( LONG_DOUBLE_IS_FLOAT128 ) -+ -+float128 syst_float32_to_float128( float32 a ) -+{ -+ float128 z; -+ -+ *( (long double *) &z ) = *( (float *) &a ); -+ return z; -+ -+} -+ -+#endif -+ -+float32 syst_float32_add( float32 a, float32 b ) -+{ -+ float32 z; -+ -+ *( (float *) &z ) = *( (float *) &a ) + *( (float *) &b ); -+ spefscr = __builtin_spe_mfspefscr(); -+ return z; -+ -+} -+ -+float32 syst_float32_sub( float32 a, float32 b ) -+{ -+ float32 z; -+ -+ *( (float *) &z ) = *( (float *) &a ) - *( (float *) &b ); -+ spefscr = __builtin_spe_mfspefscr(); -+ return z; -+ -+} -+ -+float32 syst_float32_mul( float32 a, float32 b ) -+{ -+ float32 z; -+ -+ *( (float *) &z ) = *( (float *) &a ) * *( (float *) &b ); -+ spefscr = __builtin_spe_mfspefscr(); -+ return z; -+ -+} -+ -+float32 syst_float32_div( float32 a, float32 b ) -+{ -+ float32 z; -+ -+ *( (float *) &z ) = *( (float *) &a ) / *( (float *) &b ); -+ spefscr = __builtin_spe_mfspefscr(); -+ return z; -+ -+} -+ -+flag syst_float32_eq( float32 a, float32 b ) -+{ -+ flag f = ( *( (float *) &a ) == *( (float *) &b ) ); -+ spefscr = __builtin_spe_mfspefscr(); -+ return f; -+ -+} -+ -+flag syst_float32_le( float32 a, float32 b ) -+{ -+ flag f = ( *( (float *) &a ) <= *( (float *) &b ) ); -+ spefscr = __builtin_spe_mfspefscr(); -+ return f; -+ -+} -+ -+flag syst_float32_lt( float32 a, float32 b ) -+{ -+ flag f = ( *( (float *) &a ) < *( (float *) &b ) ); -+ spefscr = __builtin_spe_mfspefscr(); -+ return f; -+ -+} -+ -+int32 syst_float64_to_int32_round_to_zero( float64 a ) -+{ -+ int32 z = *( (double *) &a ); -+ spefscr = __builtin_spe_mfspefscr(); -+ return z; -+ -+} -+ -+#ifdef BITS64 -+ -+int64 syst_float64_to_int64_round_to_zero( float64 a ) -+{ -+ int64 z = *( (double *) &a ); -+ spefscr = __builtin_spe_mfspefscr(); -+ return z; -+ -+} -+ -+#endif -+ -+float32 syst_float64_to_float32( float64 a ) -+{ -+ float32 z; -+ -+ *( (float *) &z ) = *( (double *) &a ); -+ spefscr = __builtin_spe_mfspefscr(); -+ return z; -+ -+} -+ -+#if defined( FLOATX80 ) && defined( LONG_DOUBLE_IS_FLOATX80 ) -+ -+floatx80 syst_float64_to_floatx80( float64 a ) -+{ -+ floatx80 z; -+ -+ *( (long double *) &z ) = *( (double *) &a ); -+ return z; -+ -+} -+ -+#endif -+ -+#if defined( FLOAT128 ) && defined( LONG_DOUBLE_IS_FLOAT128 ) -+ -+float128 syst_float64_to_float128( float64 a ) -+{ -+ float128 z; -+ -+ *( (long double *) &z ) = *( (double *) &a ); -+ return z; -+ -+} -+ -+#endif -+ -+float64 syst_float64_add( float64 a, float64 b ) -+{ -+ float64 z; -+ -+ *( (double *) &z ) = *( (double *) &a ) + *( (double *) &b ); -+ spefscr = __builtin_spe_mfspefscr(); -+ return z; -+ -+} -+ -+float64 syst_float64_sub( float64 a, float64 b ) -+{ -+ float64 z; -+ -+ *( (double *) &z ) = *( (double *) &a ) - *( (double *) &b ); -+ spefscr = __builtin_spe_mfspefscr(); -+ return z; -+ -+} -+ -+float64 syst_float64_mul( float64 a, float64 b ) -+{ -+ float64 z; -+ -+ *( (double *) &z ) = *( (double *) &a ) * *( (double *) &b ); -+ spefscr = __builtin_spe_mfspefscr(); -+ return z; -+ -+} -+ -+float64 syst_float64_div( float64 a, float64 b ) -+{ -+ float64 z; -+ -+ *( (double *) &z ) = *( (double *) &a ) / *( (double *) &b ); -+ spefscr = __builtin_spe_mfspefscr(); -+ return z; -+ -+} -+ -+float64 syst_float64_sqrt( float64 a ) -+{ -+ /* Ebony -+ float64 z; -+ -+ *( (double *) &z ) = sqrt( *( (double *) &a ) ); -+ spefscr = __builtin_spe_mfspefscr(); -+ return z; -+ */ -+ -+} -+ -+flag syst_float64_eq( float64 a, float64 b ) -+{ -+ flag f = ( *( (double *) &a ) == *( (double *) &b ) ); -+ spefscr = __builtin_spe_mfspefscr(); -+ return f; -+ -+} -+ -+flag syst_float64_le( float64 a, float64 b ) -+{ -+ flag f = ( *( (double *) &a ) <= *( (double *) &b ) ); -+ spefscr = __builtin_spe_mfspefscr(); -+ return f; -+ -+} -+ -+flag syst_float64_lt( float64 a, float64 b ) -+{ -+ flag f = ( *( (double *) &a ) < *( (double *) &b ) ); -+ spefscr = __builtin_spe_mfspefscr(); -+ return f; -+ -+} -+ -+#if defined( FLOATX80 ) && defined( LONG_DOUBLE_IS_FLOATX80 ) -+ -+int32 syst_floatx80_to_int32_round_to_zero( floatx80 a ) -+{ -+ -+ return *( (long double *) &a ); -+ -+} -+ -+#ifdef BITS64 -+ -+int64 syst_floatx80_to_int64_round_to_zero( floatx80 a ) -+{ -+ -+ return *( (long double *) &a ); -+ -+} -+ -+#endif -+ -+float32 syst_floatx80_to_float32( floatx80 a ) -+{ -+ float32 z; -+ -+ *( (float *) &z ) = *( (long double *) &a ); -+ return z; -+ -+} -+ -+float64 syst_floatx80_to_float64( floatx80 a ) -+{ -+ float64 z; -+ -+ *( (double *) &z ) = *( (long double *) &a ); -+ return z; -+ -+} -+ -+floatx80 syst_floatx80_add( floatx80 a, floatx80 b ) -+{ -+ floatx80 z; -+ -+ *( (long double *) &z ) = -+ *( (long double *) &a ) + *( (long double *) &b ); -+ return z; -+ -+} -+ -+floatx80 syst_floatx80_sub( floatx80 a, floatx80 b ) -+{ -+ floatx80 z; -+ -+ *( (long double *) &z ) = -+ *( (long double *) &a ) - *( (long double *) &b ); -+ return z; -+ -+} -+ -+floatx80 syst_floatx80_mul( floatx80 a, floatx80 b ) -+{ -+ floatx80 z; -+ -+ *( (long double *) &z ) = -+ *( (long double *) &a ) * *( (long double *) &b ); -+ return z; -+ -+} -+ -+floatx80 syst_floatx80_div( floatx80 a, floatx80 b ) -+{ -+ floatx80 z; -+ -+ *( (long double *) &z ) = -+ *( (long double *) &a ) / *( (long double *) &b ); -+ spefscr = __builtin_spe_mfspefscr(); -+ return z; -+ -+} -+ -+flag syst_floatx80_eq( floatx80 a, floatx80 b ) -+{ -+ -+ return ( *( (long double *) &a ) == *( (long double *) &b ) ); -+ -+} -+ -+flag syst_floatx80_le( floatx80 a, floatx80 b ) -+{ -+ -+ return ( *( (long double *) &a ) <= *( (long double *) &b ) ); -+ -+} -+ -+flag syst_floatx80_lt( floatx80 a, floatx80 b ) -+{ -+ -+ return ( *( (long double *) &a ) < *( (long double *) &b ) ); -+ -+} -+ -+#endif -+ -+#if defined( FLOAT128 ) && defined( LONG_DOUBLE_IS_FLOAT128 ) -+ -+int32 syst_float128_to_int32_round_to_zero( float128 a ) -+{ -+ -+ return *( (long double *) &a ); -+ -+} -+ -+#ifdef BITS64 -+ -+int64 syst_float128_to_int64_round_to_zero( float128 a ) -+{ -+ -+ return *( (long double *) &a ); -+ -+} -+ -+#endif -+ -+float32 syst_float128_to_float32( float128 a ) -+{ -+ float32 z; -+ -+ *( (float *) &z ) = *( (long double *) &a ); -+ return z; -+ -+} -+ -+float64 syst_float128_to_float64( float128 a ) -+{ -+ float64 z; -+ -+ *( (double *) &z ) = *( (long double *) &a ); -+ return z; -+ -+} -+ -+float128 syst_float128_add( float128 a, float128 b ) -+{ -+ float128 z; -+ -+ *( (long double *) &z ) = -+ *( (long double *) &a ) + *( (long double *) &b ); -+ return z; -+ -+} -+ -+float128 syst_float128_sub( float128 a, float128 b ) -+{ -+ float128 z; -+ -+ *( (long double *) &z ) = -+ *( (long double *) &a ) - *( (long double *) &b ); -+ return z; -+ -+} -+ -+float128 syst_float128_mul( float128 a, float128 b ) -+{ -+ float128 z; -+ -+ *( (long double *) &z ) = -+ *( (long double *) &a ) * *( (long double *) &b ); -+ return z; -+ -+} -+ -+float128 syst_float128_div( float128 a, float128 b ) -+{ -+ float128 z; -+ -+ *( (long double *) &z ) = -+ *( (long double *) &a ) / *( (long double *) &b ); -+ spefscr = __builtin_spe_mfspefscr(); -+ return z; -+ -+} -+ -+flag syst_float128_eq( float128 a, float128 b ) -+{ -+ -+ return ( *( (long double *) &a ) == *( (long double *) &b ) ); -+ -+} -+ -+flag syst_float128_le( float128 a, float128 b ) -+{ -+ -+ return ( *( (long double *) &a ) <= *( (long double *) &b ) ); -+ -+} -+ -+flag syst_float128_lt( float128 a, float128 b ) -+{ -+ -+ return ( *( (long double *) &a ) < *( (long double *) &b ) ); -+ -+} -+ -+#endif -+ -diff --git a/testfloat/powerpc-linux-gcc/systmodes.c b/testfloat/powerpc-linux-gcc/systmodes.c -new file mode 100644 -index 0000000..143cdea ---- /dev/null -+++ b/testfloat/powerpc-linux-gcc/systmodes.c -@@ -0,0 +1,67 @@ -+/* -+ * This file is derived from testfloat/386-Win32-gcc/systmodes.S, -+ * the copyright for that material belongs to the original owners. -+ * -+ * Additional material and changes where applicable is: -+ * Copyright (C) 2008 Freescale Semiconductor, Inc. All rights reserved. -+ * -+ * Author: Ebony Zhu, -+ * Yu Liu, -+ */ -+ -+/* -+=============================================================================== -+ -+This C source file is part of TestFloat, Release 2a, a package of programs -+for testing the correctness of floating-point arithmetic complying to the -+IEC/IEEE Standard for Floating-Point. -+ -+Written by John R. Hauser. More information is available through the Web -+page `http://HTTP.CS.Berkeley.EDU/~jhauser/arithmetic/TestFloat.html'. -+ -+THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort -+has been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT -+TIMES RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO -+PERSONS AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ANY -+AND ALL LOSSES, COSTS, OR OTHER PROBLEMS ARISING FROM ITS USE. -+ -+Derivative works are acceptable, even for commercial purposes, so long as -+(1) they include prominent notice that the work is derivative, and (2) they -+include prominent notice akin to these four paragraphs for those parts of -+this code that are retained. -+ -+=============================================================================== -+*/ -+ -+#include -+#include "milieu.h" -+#include "systmodes.h" -+/* -+------------------------------------------------------------------------------- -+Sets the system's IEC/IEEE floating-point rounding mode. Also disables all -+system exception traps. -+------------------------------------------------------------------------------- -+*/ -+int rounding; -+ -+void syst_float_set_rounding_mode( int8 roundingMode ) -+{ -+ (void) fesetround ( roundingMode ); -+ rounding = roundingMode; -+} -+ -+/* -+------------------------------------------------------------------------------- -+Sets the rounding precision of subsequent extended double-precision -+operations. The `precision' argument should be one of 0, 32, 64, or 80. -+If `precision' is 32, the rounding precision is set equivalent to single -+precision; else if `precision' is 64, the rounding precision is set -+equivalent to double precision; else the rounding precision is set to full -+extended double precision. -+------------------------------------------------------------------------------- -+*/ -+void syst_float_set_rounding_precision( int8 precision ) -+{ -+ -+} -+ -diff --git a/testfloat/templates/Makefile b/testfloat/templates/Makefile -index f5f3cde..18cffe0 100644 ---- a/testfloat/templates/Makefile -+++ b/testfloat/templates/Makefile -@@ -1,15 +1,21 @@ - --PROCESSOR_H = ../../processors/!!!processor.h -+#PROCESSOR_H = ../../processors/!!!processor.h -+PROCESSOR_H = ../../processors/POWERPC-gcc.h - SOFTFLOAT_VERSION = bits64 --TARGET = !!!target --SOFTFLOAT_DIR = ../../softfloat/$(SOFTFLOAT_VERSION)/$(TARGET) -+ -+#TARGET = !!!target -+TARGET = powerpc-GCC -+SOFTFLOAT_DIR = ../../../SoftFloat-2b/softfloat/$(SOFTFLOAT_VERSION)/$(TARGET) - - OBJ = .o - EXE = - INCLUDES = -I. -I.. -I$(SOFTFLOAT_DIR) --COMPILE_C = gcc -c -o $@ $(INCLUDES) -I- -O2 --COMPILE_SLOWFLOAT_C = gcc -c -o $@ $(INCLUDES) -I- -O3 --LINK = gcc -o $@ -+#COMPILE_C = gcc -c -o $@ $(INCLUDES) -I- -O2 -+#COMPILE_SLOWFLOAT_C = gcc -c -o $@ $(INCLUDES) -I- -O3 -+#LINK = gcc -o $@ -+COMPILE_C = /opt/mtwk/usr/local/gcc-3_4-e500-glibc-2.3.4-dp/powerpc-linux-gnuspe/bin/powerpc-linux-gnuspe-gcc -c -o $@ $(INCLUDES) -I- -O2 -+COMPILE_SLOWFLOAT_C = /opt/mtwk/usr/local/gcc-3_4-e500-glibc-2.3.4-dp/powerpc-linux-gnuspe/bin/powerpc-linux-gnuspe-gcc -c -o $@ $(INCLUDES) -I- -O3 -+LINK = /opt/mtwk/usr/local/gcc-3_4-e500-glibc-2.3.4-dp/powerpc-linux-gnuspe/bin/powerpc-linux-gnuspe-gcc -o $@ - - SOFTFLOAT_H = $(SOFTFLOAT_DIR)/softfloat.h - SOFTFLOAT_OBJ = $(SOFTFLOAT_DIR)/softfloat$(OBJ) -diff --git a/testfloat/templates/milieu.h b/testfloat/templates/milieu.h -index 56d3ac4..3214ca8 100644 ---- a/testfloat/templates/milieu.h -+++ b/testfloat/templates/milieu.h -@@ -28,7 +28,7 @@ this code that are retained. - Include common integer types and flags. - ------------------------------------------------------------------------------- - */ --#include "../../processors/!!!processor.h" -+#include "../../processors/SPARC-gcc.h" - - /* - ------------------------------------------------------------------------------- -diff --git a/testfloat/testFunction.h b/testfloat/testFunction.h -index 04bf856..00139a7 100644 ---- a/testfloat/testFunction.h -+++ b/testfloat/testFunction.h -@@ -126,8 +126,8 @@ extern const flag functionExists[ NUM_FUNCTIONS ]; - enum { - ROUND_NEAREST_EVEN = 1, - ROUND_TO_ZERO, -- ROUND_DOWN, - ROUND_UP, -+ ROUND_DOWN, - NUM_ROUNDINGMODES - }; - -diff --git a/testfloat/testLoops.c b/testfloat/testLoops.c -index 8ba92f3..ba05548 100644 ---- a/testfloat/testLoops.c -+++ b/testfloat/testLoops.c -@@ -488,6 +488,11 @@ void - (void) testFlagsFunctionPtr(); - testZ = testFunction( testCases_a_int32 ); - testFlags = testFlagsFunctionPtr(); -+#ifdef TEST_KERNEL_EMU -+ if (! syst_float_is_soft_emu()){ -+ continue; -+ } -+#endif - --count; - if ( count == 0 ) { - checkEarlyExit(); -@@ -539,6 +544,11 @@ void - (void) testFlagsFunctionPtr(); - testZ = testFunction( testCases_a_int32 ); - testFlags = testFlagsFunctionPtr(); -+#ifdef TEST_KERNEL_EMU -+ if (! syst_float_is_soft_emu()){ -+ continue; -+ } -+#endif - --count; - if ( count == 0 ) { - checkEarlyExit(); -@@ -592,6 +602,11 @@ void - (void) testFlagsFunctionPtr(); - testZ = testFunction( testCases_a_int32 ); - testFlags = testFlagsFunctionPtr(); -+#ifdef TEST_KERNEL_EMU -+ if (! syst_float_is_soft_emu()){ -+ continue; -+ } -+#endif - --count; - if ( count == 0 ) { - checkEarlyExit(); -@@ -647,6 +662,11 @@ void - (void) testFlagsFunctionPtr(); - testZ = testFunction( testCases_a_int32 ); - testFlags = testFlagsFunctionPtr(); -+#ifdef TEST_KERNEL_EMU -+ if (! syst_float_is_soft_emu()){ -+ continue; -+ } -+#endif - --count; - if ( count == 0 ) { - checkEarlyExit(); -@@ -702,6 +722,11 @@ void - (void) testFlagsFunctionPtr(); - testZ = testFunction( testCases_a_int64 ); - testFlags = testFlagsFunctionPtr(); -+#ifdef TEST_KERNEL_EMU -+ if (! syst_float_is_soft_emu()){ -+ continue; -+ } -+#endif - --count; - if ( count == 0 ) { - checkEarlyExit(); -@@ -753,6 +778,11 @@ void - (void) testFlagsFunctionPtr(); - testZ = testFunction( testCases_a_int64 ); - testFlags = testFlagsFunctionPtr(); -+#ifdef TEST_KERNEL_EMU -+ if (! syst_float_is_soft_emu()){ -+ continue; -+ } -+#endif - --count; - if ( count == 0 ) { - checkEarlyExit(); -@@ -806,6 +836,11 @@ void - (void) testFlagsFunctionPtr(); - testZ = testFunction( testCases_a_int64 ); - testFlags = testFlagsFunctionPtr(); -+#ifdef TEST_KERNEL_EMU -+ if (! syst_float_is_soft_emu()){ -+ continue; -+ } -+#endif - --count; - if ( count == 0 ) { - checkEarlyExit(); -@@ -861,6 +896,11 @@ void - (void) testFlagsFunctionPtr(); - testZ = testFunction( testCases_a_int64 ); - testFlags = testFlagsFunctionPtr(); -+#ifdef TEST_KERNEL_EMU -+ if (! syst_float_is_soft_emu()){ -+ continue; -+ } -+#endif - --count; - if ( count == 0 ) { - checkEarlyExit(); -@@ -916,6 +956,11 @@ void - (void) testFlagsFunctionPtr(); - testZ = testFunction( testCases_a_float32 ); - testFlags = testFlagsFunctionPtr(); -+#ifdef TEST_KERNEL_EMU -+ if (! syst_float_is_soft_emu()){ -+ continue; -+ } -+#endif - --count; - if ( count == 0 ) { - checkEarlyExit(); -@@ -973,6 +1018,11 @@ void - (void) testFlagsFunctionPtr(); - testZ = testFunction( testCases_a_float32 ); - testFlags = testFlagsFunctionPtr(); -+#ifdef TEST_KERNEL_EMU -+ if (! syst_float_is_soft_emu()){ -+ continue; -+ } -+#endif - --count; - if ( count == 0 ) { - checkEarlyExit(); -@@ -1030,6 +1080,11 @@ void - (void) testFlagsFunctionPtr(); - testZ = testFunction( testCases_a_float32 ); - testFlags = testFlagsFunctionPtr(); -+#ifdef TEST_KERNEL_EMU -+ if (! syst_float_is_soft_emu()){ -+ continue; -+ } -+#endif - --count; - if ( count == 0 ) { - checkEarlyExit(); -@@ -1087,6 +1142,11 @@ void - (void) testFlagsFunctionPtr(); - testZ = testFunction( testCases_a_float32 ); - testFlags = testFlagsFunctionPtr(); -+#ifdef TEST_KERNEL_EMU -+ if (! syst_float_is_soft_emu()){ -+ continue; -+ } -+#endif - --count; - if ( count == 0 ) { - checkEarlyExit(); -@@ -1146,6 +1206,11 @@ void - (void) testFlagsFunctionPtr(); - testZ = testFunction( testCases_a_float32 ); - testFlags = testFlagsFunctionPtr(); -+#ifdef TEST_KERNEL_EMU -+ if (! syst_float_is_soft_emu()){ -+ continue; -+ } -+#endif - --count; - if ( count == 0 ) { - checkEarlyExit(); -@@ -1203,6 +1268,11 @@ void - (void) testFlagsFunctionPtr(); - testZ = testFunction( testCases_a_float32 ); - testFlags = testFlagsFunctionPtr(); -+#ifdef TEST_KERNEL_EMU -+ if (! syst_float_is_soft_emu()){ -+ continue; -+ } -+#endif - --count; - if ( count == 0 ) { - checkEarlyExit(); -@@ -1260,6 +1330,11 @@ void - (void) testFlagsFunctionPtr(); - testZ = testFunction( testCases_a_float32, testCases_b_float32 ); - testFlags = testFlagsFunctionPtr(); -+#ifdef TEST_KERNEL_EMU -+ if (! syst_float_is_soft_emu()){ -+ continue; -+ } -+#endif - --count; - if ( count == 0 ) { - checkEarlyExit(); -@@ -1312,6 +1387,25 @@ void - (void) testFlagsFunctionPtr(); - testZ = testFunction( testCases_a_float32, testCases_b_float32 ); - testFlags = testFlagsFunctionPtr(); -+ -+if(testCases_a_float32 == 0x7ffffe && testCases_b_float32 == 0x3f7ffffe) -+{ -+ -+ writeErrorFound( 10000 - count ); -+ writeInputs_ab_float32(); -+ fputs( " ", stdout ); -+ writeOutputs_z_float32( trueZ, trueFlags, testZ, testFlags ); -+ fflush( stdout ); -+ if (! syst_float_is_soft_emu()){ -+ exit(-1); -+ } -+} -+#ifdef TEST_KERNEL_EMU -+ if (! syst_float_is_soft_emu()){ -+ continue; -+ } -+#endif -+ - --count; - if ( count == 0 ) { - checkEarlyExit(); -@@ -1370,6 +1464,11 @@ void - (void) testFlagsFunctionPtr(); - testZ = testFunction( testCases_a_float64 ); - testFlags = testFlagsFunctionPtr(); -+#ifdef TEST_KERNEL_EMU -+ if (! syst_float_is_soft_emu()){ -+ continue; -+ } -+#endif - --count; - if ( count == 0 ) { - checkEarlyExit(); -@@ -1427,6 +1526,11 @@ void - (void) testFlagsFunctionPtr(); - testZ = testFunction( testCases_a_float64 ); - testFlags = testFlagsFunctionPtr(); -+#ifdef TEST_KERNEL_EMU -+ if (! syst_float_is_soft_emu()){ -+ continue; -+ } -+#endif - --count; - if ( count == 0 ) { - checkEarlyExit(); -@@ -1484,6 +1588,11 @@ void - (void) testFlagsFunctionPtr(); - testZ = testFunction( testCases_a_float64 ); - testFlags = testFlagsFunctionPtr(); -+#ifdef TEST_KERNEL_EMU -+ if (! syst_float_is_soft_emu()){ -+ continue; -+ } -+#endif - --count; - if ( count == 0 ) { - checkEarlyExit(); -@@ -1541,6 +1650,11 @@ void - (void) testFlagsFunctionPtr(); - testZ = testFunction( testCases_a_float64 ); - testFlags = testFlagsFunctionPtr(); -+#ifdef TEST_KERNEL_EMU -+ if (! syst_float_is_soft_emu()){ -+ continue; -+ } -+#endif - --count; - if ( count == 0 ) { - checkEarlyExit(); -@@ -1600,6 +1714,11 @@ void - (void) testFlagsFunctionPtr(); - testZ = testFunction( testCases_a_float64 ); - testFlags = testFlagsFunctionPtr(); -+#ifdef TEST_KERNEL_EMU -+ if (! syst_float_is_soft_emu()){ -+ continue; -+ } -+#endif - --count; - if ( count == 0 ) { - checkEarlyExit(); -@@ -1657,6 +1776,11 @@ void - (void) testFlagsFunctionPtr(); - testZ = testFunction( testCases_a_float64 ); - testFlags = testFlagsFunctionPtr(); -+#ifdef TEST_KERNEL_EMU -+ if (! syst_float_is_soft_emu()){ -+ continue; -+ } -+#endif - --count; - if ( count == 0 ) { - checkEarlyExit(); -@@ -1714,6 +1838,11 @@ void - (void) testFlagsFunctionPtr(); - testZ = testFunction( testCases_a_float64, testCases_b_float64 ); - testFlags = testFlagsFunctionPtr(); -+#ifdef TEST_KERNEL_EMU -+ if (! syst_float_is_soft_emu()){ -+ continue; -+ } -+#endif - --count; - if ( count == 0 ) { - checkEarlyExit(); -@@ -1766,6 +1895,13 @@ void - (void) testFlagsFunctionPtr(); - testZ = testFunction( testCases_a_float64, testCases_b_float64 ); - testFlags = testFlagsFunctionPtr(); -+ -+#ifdef TEST_KERNEL_EMU -+ if (! syst_float_is_soft_emu()){ -+ continue; -+ } -+#endif -+ - --count; - if ( count == 0 ) { - checkEarlyExit(); -@@ -1826,6 +1962,11 @@ void - (void) testFlagsFunctionPtr(); - testZ = testFunction( testCases_a_floatx80 ); - testFlags = testFlagsFunctionPtr(); -+#ifdef TEST_KERNEL_EMU -+ if (! syst_float_is_soft_emu()){ -+ continue; -+ } -+#endif - --count; - if ( count == 0 ) { - checkEarlyExit(); -@@ -1883,6 +2024,11 @@ void - (void) testFlagsFunctionPtr(); - testZ = testFunction( testCases_a_floatx80 ); - testFlags = testFlagsFunctionPtr(); -+#ifdef TEST_KERNEL_EMU -+ if (! syst_float_is_soft_emu()){ -+ continue; -+ } -+#endif - --count; - if ( count == 0 ) { - checkEarlyExit(); -@@ -1940,6 +2086,11 @@ void - (void) testFlagsFunctionPtr(); - testZ = testFunction( testCases_a_floatx80 ); - testFlags = testFlagsFunctionPtr(); -+#ifdef TEST_KERNEL_EMU -+ if (! syst_float_is_soft_emu()){ -+ continue; -+ } -+#endif - --count; - if ( count == 0 ) { - checkEarlyExit(); -@@ -1995,6 +2146,11 @@ void - (void) testFlagsFunctionPtr(); - testZ = testFunction( testCases_a_floatx80 ); - testFlags = testFlagsFunctionPtr(); -+#ifdef TEST_KERNEL_EMU -+ if (! syst_float_is_soft_emu()){ -+ continue; -+ } -+#endif - --count; - if ( count == 0 ) { - checkEarlyExit(); -@@ -2052,6 +2208,11 @@ void - (void) testFlagsFunctionPtr(); - testZ = testFunction( testCases_a_floatx80 ); - testFlags = testFlagsFunctionPtr(); -+#ifdef TEST_KERNEL_EMU -+ if (! syst_float_is_soft_emu()){ -+ continue; -+ } -+#endif - --count; - if ( count == 0 ) { - checkEarlyExit(); -@@ -2109,6 +2270,11 @@ void - (void) testFlagsFunctionPtr(); - testZ = testFunction( testCases_a_floatx80 ); - testFlags = testFlagsFunctionPtr(); -+#ifdef TEST_KERNEL_EMU -+ if (! syst_float_is_soft_emu()){ -+ continue; -+ } -+#endif - --count; - if ( count == 0 ) { - checkEarlyExit(); -@@ -2166,6 +2332,11 @@ void - (void) testFlagsFunctionPtr(); - testZ = testFunction( testCases_a_floatx80, testCases_b_floatx80 ); - testFlags = testFlagsFunctionPtr(); -+#ifdef TEST_KERNEL_EMU -+ if (! syst_float_is_soft_emu()){ -+ continue; -+ } -+#endif - --count; - if ( count == 0 ) { - checkEarlyExit(); -@@ -2218,6 +2389,11 @@ void - (void) testFlagsFunctionPtr(); - testZ = testFunction( testCases_a_floatx80, testCases_b_floatx80 ); - testFlags = testFlagsFunctionPtr(); -+#ifdef TEST_KERNEL_EMU -+ if (! syst_float_is_soft_emu()){ -+ continue; -+ } -+#endif - --count; - if ( count == 0 ) { - checkEarlyExit(); -@@ -2280,6 +2456,11 @@ void - (void) testFlagsFunctionPtr(); - testZ = testFunction( testCases_a_float128 ); - testFlags = testFlagsFunctionPtr(); -+#ifdef TEST_KERNEL_EMU -+ if (! syst_float_is_soft_emu()){ -+ continue; -+ } -+#endif - --count; - if ( count == 0 ) { - checkEarlyExit(); -@@ -2337,6 +2518,11 @@ void - (void) testFlagsFunctionPtr(); - testZ = testFunction( testCases_a_float128 ); - testFlags = testFlagsFunctionPtr(); -+#ifdef TEST_KERNEL_EMU -+ if (! syst_float_is_soft_emu()){ -+ continue; -+ } -+#endif - --count; - if ( count == 0 ) { - checkEarlyExit(); -@@ -2394,6 +2580,11 @@ void - (void) testFlagsFunctionPtr(); - testZ = testFunction( testCases_a_float128 ); - testFlags = testFlagsFunctionPtr(); -+#ifdef TEST_KERNEL_EMU -+ if (! syst_float_is_soft_emu()){ -+ continue; -+ } -+#endif - --count; - if ( count == 0 ) { - checkEarlyExit(); -@@ -2449,6 +2640,11 @@ void - (void) testFlagsFunctionPtr(); - testZ = testFunction( testCases_a_float128 ); - testFlags = testFlagsFunctionPtr(); -+#ifdef TEST_KERNEL_EMU -+ if (! syst_float_is_soft_emu()){ -+ continue; -+ } -+#endif - --count; - if ( count == 0 ) { - checkEarlyExit(); -@@ -2506,6 +2702,11 @@ void - (void) testFlagsFunctionPtr(); - testZ = testFunction( testCases_a_float128 ); - testFlags = testFlagsFunctionPtr(); -+#ifdef TEST_KERNEL_EMU -+ if (! syst_float_is_soft_emu()){ -+ continue; -+ } -+#endif - --count; - if ( count == 0 ) { - checkEarlyExit(); -@@ -2563,6 +2764,11 @@ void - (void) testFlagsFunctionPtr(); - testZ = testFunction( testCases_a_float128 ); - testFlags = testFlagsFunctionPtr(); -+#ifdef TEST_KERNEL_EMU -+ if (! syst_float_is_soft_emu()){ -+ continue; -+ } -+#endif - --count; - if ( count == 0 ) { - checkEarlyExit(); -@@ -2620,6 +2826,11 @@ void - (void) testFlagsFunctionPtr(); - testZ = testFunction( testCases_a_float128, testCases_b_float128 ); - testFlags = testFlagsFunctionPtr(); -+#ifdef TEST_KERNEL_EMU -+ if (! syst_float_is_soft_emu()){ -+ continue; -+ } -+#endif - --count; - if ( count == 0 ) { - checkEarlyExit(); -@@ -2672,6 +2883,11 @@ void - (void) testFlagsFunctionPtr(); - testZ = testFunction( testCases_a_float128, testCases_b_float128 ); - testFlags = testFlagsFunctionPtr(); -+#ifdef TEST_KERNEL_EMU -+ if (! syst_float_is_soft_emu()){ -+ continue; -+ } -+#endif - --count; - if ( count == 0 ) { - checkEarlyExit(); --- -1.5.4 - diff --git a/meta-fsl-ppc/recipes-test/testfloat/files/Yocto-replace-COMPILE_PREFIX-gcc.patch b/meta-fsl-ppc/recipes-test/testfloat/files/Yocto-replace-COMPILE_PREFIX-gcc.patch deleted file mode 100644 index 42de56d3..00000000 --- a/meta-fsl-ppc/recipes-test/testfloat/files/Yocto-replace-COMPILE_PREFIX-gcc.patch +++ /dev/null @@ -1,67 +0,0 @@ -From 6c7567e05c28b8cb6c7dc68c278950a32feb6f64 Mon Sep 17 00:00:00 2001 -From: Ting Liu -Date: Wed, 9 May 2012 02:42:57 -0500 -Subject: [PATCH] Yocto: replace $(COMPILE_PREFIX)gcc with $(CC) and remove -te500v2 flags - -Signed-off-by: Ting Liu ---- - SoftFloat-2b/softfloat/bits32/powerpc-GCC/Makefile | 4 ++-- - SoftFloat-2b/softfloat/bits64/powerpc-GCC/Makefile | 4 ++-- - testfloat/powerpc-linux-gcc/Makefile | 8 ++++---- - 3 files changed, 8 insertions(+), 8 deletions(-) - -diff --git a/SoftFloat-2b/softfloat/bits32/powerpc-GCC/Makefile b/SoftFloat-2b/softfloat/bits32/powerpc-GCC/Makefile -index 28f1e33..4098048 100644 ---- a/SoftFloat-2b/softfloat/bits32/powerpc-GCC/Makefile -+++ b/SoftFloat-2b/softfloat/bits32/powerpc-GCC/Makefile -@@ -5,8 +5,8 @@ SOFTFLOAT_MACROS = ../softfloat-macros - OBJ = .o - EXE = - INCLUDES = -I. -I.. --COMPILE_C = $(COMPILE_PREFIX)gcc -msoft-float -c -o $@ $(INCLUDES) -I- -O2 --LINK = $(COMPILE_PREFIX)gcc -o $@ -+COMPILE_C = $(CC) -msoft-float -c -o $@ $(INCLUDES) -I- -O2 -+LINK = $(CC) -o $@ - - ALL: softfloat$(OBJ) timesoftfloat$(EXE) - -diff --git a/SoftFloat-2b/softfloat/bits64/powerpc-GCC/Makefile b/SoftFloat-2b/softfloat/bits64/powerpc-GCC/Makefile -index a5e2cc7..c34e16e 100644 ---- a/SoftFloat-2b/softfloat/bits64/powerpc-GCC/Makefile -+++ b/SoftFloat-2b/softfloat/bits64/powerpc-GCC/Makefile -@@ -5,8 +5,8 @@ SOFTFLOAT_MACROS = ../softfloat-macros - OBJ = .o - EXE = - INCLUDES = -I. -I.. --COMPILE_C = $(COMPILE_PREFIX) -mcpu=8548 -mhard-float -mfloat-gprs=double -o $@ $(INCLUDES) -I- -O2 --LINK = $(COMPILE_PREFIX) -o $@ -+COMPILE_C = $(CC) -mcpu=8548 -mhard-float -mfloat-gprs=double -o $@ $(INCLUDES) -I- -O2 -+LINK = $(CC) -o $@ - - ALL: softfloat$(OBJ) timesoftfloat$(EXE) - -diff --git a/testfloat/powerpc-linux-gcc/Makefile b/testfloat/powerpc-linux-gcc/Makefile -index de50aad..1a8b5f7 100644 ---- a/testfloat/powerpc-linux-gcc/Makefile -+++ b/testfloat/powerpc-linux-gcc/Makefile -@@ -8,13 +8,13 @@ OBJ = .o - EXE = - INCLUDES = -I. -I.. -I$(SOFTFLOAT_DIR) - --COMPILE_C = $(COMPILE_PREFIX)gcc -c -o $@ $(INCLUDES) -I- -O $(EXTRA_CFLAGS) -+COMPILE_C = $(CC) -c -o $@ $(INCLUDES) -I- -O $(EXTRA_CFLAGS) - --COMPILE_C_HARD = $(COMPILE_PREFIX)gcc -c -te500v2 -o $@ $(INCLUDES) -+COMPILE_C_HARD = $(CC) -c -o $@ $(INCLUDES) - --COMPILE_SLOWFLOAT_C = $(COMPILE_PREFIX)gcc -c -o $@ $(INCLUDES) -I- -O -+COMPILE_SLOWFLOAT_C = $(CC) -c -o $@ $(INCLUDES) -I- -O - --LINK = $(COMPILE_PREFIX)gcc -lm -o $@ -+LINK = $(CC) -lm -o $@ - - SOFTFLOAT_H = $(SOFTFLOAT_DIR)/softfloat.h - SOFTFLOAT_OBJ = $(SOFTFLOAT_DIR)/softfloat$(OBJ) --- -1.7.3.4 - diff --git a/meta-fsl-ppc/recipes-test/testfloat/testfloat_2a.bb b/meta-fsl-ppc/recipes-test/testfloat/testfloat_2a.bb deleted file mode 100644 index 3fbb2070..00000000 --- a/meta-fsl-ppc/recipes-test/testfloat/testfloat_2a.bb +++ /dev/null @@ -1,46 +0,0 @@ -DESCRIPTION = "A program for testing floating-point implementation" -SECTION = "test" -LICENSE = "Hauser TestFloat" - -LIC_FILES_CHKSUM = "file://testfloat/testfloat.txt;beginline=87;endline=95;md5=bdb2e8111838a48015c29bd97f5b6145" - -SRC_URI = " http://www.jhauser.us/arithmetic/TestFloat-2a.tar.Z;name=TestFloat \ - http://www.jhauser.us/arithmetic/SoftFloat-2b.tar.Z;name=SoftFloat \ - " -SRC_URI_append_fslmachine = " file://SoftFloat-powerpc-1.patch \ - file://TestFloat-powerpc-E500v2-SPE-1.patch \ - file://Yocto-replace-COMPILE_PREFIX-gcc.patch \ - " -SRC_URI[TestFloat.md5sum] = "4dc889319ae1e0c5381ec511f784553a" -SRC_URI[TestFloat.sha256sum] = "84d14aa42adefbda2ec9708b42946f7fa59f93689b042684bd027863481f8e4e" -SRC_URI[SoftFloat.md5sum] = "b4a58b5c941f1a2317e4c2500086e3fa" -SRC_URI[SoftFloat.sha256sum] = "89d14b55113a2ba8cbda7011443ba1d298d381c89d939515d56c5f18f2febf81" - -S = "${WORKDIR}/TestFloat-2a" - -do_unpack2(){ - mv ${WORKDIR}/SoftFloat-2b ${S}/SoftFloat-2b - cd ${S} - if [ -n "$(which fromdos)" ];then - find -type f -exec fromdos {} \; - elif [ -n "$(which dos2unix)" ];then - find -type f -exec dos2unix {} \; - else - echo -e "\nERROR: command dos2unix or fromdos not found\n" && return 1 - fi -} -addtask do_unpack2 after do_unpack before do_patch - -do_compile(){ - oe_runmake -C testfloat/powerpc-linux-gcc/ CC="${CC}" EXTRA_CFLAGS="-DTEST_KERNEL_EMU" -} - -do_install(){ - install -d ${D}/${bindir} - install testfloat/powerpc-linux-gcc/testfloat ${D}/${bindir} - install testfloat/powerpc-linux-gcc/testsoftfloat ${D}/${bindir} -} - -COMPATIBLE_HOST_e500v2 = ".*" -COMPATIBLE_HOST ?= "(none)" - diff --git a/meta-fsl-ppc/recipes-tools/boot-format/boot-format_git.bb b/meta-fsl-ppc/recipes-tools/boot-format/boot-format_git.bb deleted file mode 100644 index ac1504d4..00000000 --- a/meta-fsl-ppc/recipes-tools/boot-format/boot-format_git.bb +++ /dev/null @@ -1,19 +0,0 @@ -DESCRIPTION = "Boot format utility for booting from eSDHC/eSPI" -LICENSE = "GPLv2" -PR = "r6" -LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" - -SRC_URI = "git://git.freescale.com/ppc/sdk/boot-format.git" -SRCREV = "d9bbfaba0c9316ae33455099c47bae429479e530" - -S = "${WORKDIR}/git" -EXTRA_OEMAKE = 'CC="${CC}"' - -do_install(){ - oe_runmake DESTDIR=${D} PREFIX=${prefix} install -} - -PACKAGES =+ "${PN}-config" -FILES_${PN}-config += "${datadir}/*" - -BBCLASSEXTEND = "native nativesdk" diff --git a/meta-fsl-ppc/recipes-tools/cst/cst_git.bb b/meta-fsl-ppc/recipes-tools/cst/cst_git.bb deleted file mode 100644 index 177f23ce..00000000 --- a/meta-fsl-ppc/recipes-tools/cst/cst_git.bb +++ /dev/null @@ -1,29 +0,0 @@ -DESCRIPTION = "CST Tool" -SECTION = "cst" -LICENSE = "BSD" - -# TODO: fix license - this file is not a license -LIC_FILES_CHKSUM = "file://RELEASENOTES;beginline=8;endline=43;md5=5a7b22a2c96b5f94e0498c5f413aa8d3" - -DEPENDS += "openssl" - -SRC_URI = "git://git.freescale.com/ppc/sdk/cst.git" -SRCREV = "e4035cbf54ed481147c6ae65c741ef75dc9ec37f" - -S = "${WORKDIR}/git" - -EXTRA_OEMAKE = 'OPENSSL_LIB_PATH=${STAGING_LIBDIR} OPENSSL_INC_PATH=${STAGING_INCDIR} CC="${CC}" LD="${CC}" LDFLAGS="${LDFLAGS}"' - -do_install () { - install -d ${D}/${bindir}/cst - install -m 755 ${S}/gen_keys ${D}/${bindir}/cst/ - install -m 755 ${S}/gen_otpmk ${D}/${bindir}/cst/ - install -m 755 ${S}/uni_cfsign ${D}/${bindir}/cst/ - install -m 755 ${S}/uni_sign ${D}/${bindir}/cst/ - cp -rf ${S}/input_files ${D}/${bindir}/cst -} - -BBCLASSEXTEND = "native nativesdk" -PARALLEL_MAKE = "" - -FILES_${PN}-dbg += "${bindir}/cst/.debug" diff --git a/meta-fsl-ppc/recipes-tools/embedded-hv/files/81-fsl-embedded-hv.rules b/meta-fsl-ppc/recipes-tools/embedded-hv/files/81-fsl-embedded-hv.rules deleted file mode 100644 index 5edfa113..00000000 --- a/meta-fsl-ppc/recipes-tools/embedded-hv/files/81-fsl-embedded-hv.rules +++ /dev/null @@ -1,2 +0,0 @@ -# Add rule to handle setting up device node for FSL HV mgmt driver -SUBSYSTEM=="misc", KERNEL=="fsl-hv", NAME="fsl-hv" diff --git a/meta-fsl-ppc/recipes-tools/embedded-hv/hypervisor_git.bb b/meta-fsl-ppc/recipes-tools/embedded-hv/hypervisor_git.bb deleted file mode 100644 index dc864066..00000000 --- a/meta-fsl-ppc/recipes-tools/embedded-hv/hypervisor_git.bb +++ /dev/null @@ -1,90 +0,0 @@ -DESCRIPTION = "Freescale embedded hypervisor" -SECTION = "embedded-hv" -LICENSE = "BSD" -LIC_FILES_CHKSUM = "file://README;endline=22;md5=0655bbc3b7d7166c30c87208b4e23cf0" - -PR = "r3" - -DEPENDS = "u-boot-mkimage-native" - -inherit deploy - -S = "${WORKDIR}/git" - -# TODO: fix dtc to use the already built package -SRC_URI = " \ - git://git.freescale.com/ppc/sdk/hypervisor/hypervisor.git;name=hypervisor \ - git://git.freescale.com/ppc/sdk/hypervisor/kconfig.git;name=kconfig;destsuffix=git/kconfig \ - git://git.freescale.com/ppc/sdk/hypervisor/libos.git;name=libos;destsuffix=git/libos \ - git://www.jdl.com/software/dtc.git;name=dtc;destsuffix=dtc \ - git://git.freescale.com/ppc/sdk/hypertrk.git;name=hypertrk;destsuffix=git/hypertrk \ - file://81-fsl-embedded-hv.rules \ - " - -SRCREV_FORMAT="hypervisor" -SRCREV = "e6092cdf2a225c66c1ea46b1151eb828da29d139" -SRCREV_kconfig = "a56025d4da992b856796b0eccac2e410d751dbac" -SRCREV_libos = "5268371581f3ef3959be2a53235edfa6a8c6aa7c" -SRCREV_dtc = "033089f29099bdfd5c2d6986cdb9fd07b16cfde0" -SRCREV_hypertrk = "975c98b562186afbd3bbf103ae54b96cf9b3e533" - -EXTRA_OEMAKE = 'CROSS_COMPILE=${TARGET_PREFIX} CC="${TARGET_PREFIX}gcc ${TOOLCHAIN_OPTIONS}"' - -DEFCONFIG = "defconfig" -DEFCONFIG_powerpc64 = "64bit_defconfig" - -COMPATIBLE_HOST_fslmachine = ".*" -COMPATIBLE_HOST ?= "(none)" - -inherit cml1 -do_configure () { - oe_runmake ${DEFCONFIG} -} - -PKG_HV_HYPERTRK_SUPPORT = "n" -do_compile () { - if [ "${PKG_HV_HYPERTRK_SUPPORT}" = "y" ] - then - oe_runmake silentoldconfig - export HV_DIR=$PWD - cd hypertrk - oe_runmake deploy - cd .. - fi - - oe_runmake - oe_runmake partman -} - -do_install () { - install -d ${D}/${bindir} - install ${S}/output/bin/linux/partman ${D}/${bindir}/partman - - install -d ${D}${sysconfdir}/udev/rules.d - install -m 0644 ${WORKDIR}/81-fsl-embedded-hv.rules ${D}${sysconfdir}/udev/rules.d - - install -d ${D}/boot/hv - install ${S}/output/.config ${D}/boot/hv/hypervisor.config - install -m 644 ${S}/output/bin/hv ${S}/output/bin/hv.map \ - ${S}/output/bin/hv.uImage ${S}/output/bin/hv.bin \ - ${D}/boot/hv/ -} - -do_deploy () { - install -d ${DEPLOYDIR}/hv/ - install ${S}/output/.config ${DEPLOYDIR}/hv/hypervisor.config - install -m 644 ${S}/output/bin/hv ${S}/output/bin/hv.map \ - ${S}/output/bin/hv.uImage ${S}/output/bin/hv.bin \ - ${DEPLOYDIR}/hv/ -} -addtask deploy before do_build after do_install - -do_deploy_append() { - rm -f ${S}/../hv -} - -INHIBIT_PACKAGE_DEBUG_SPLIT = "1" -ALLOW_EMPTY_${PN} = "1" -PACKAGES_prepend = "${PN}-image ${PN}-partman " -FILES_${PN}-image = "/boot/" -FILES_${PN}-partman = "${bindir}/partman" diff --git a/meta-fsl-ppc/recipes-tools/eth-config/eth-config_git.bb b/meta-fsl-ppc/recipes-tools/eth-config/eth-config_git.bb deleted file mode 100644 index ac25013a..00000000 --- a/meta-fsl-ppc/recipes-tools/eth-config/eth-config_git.bb +++ /dev/null @@ -1,19 +0,0 @@ -DESCRIPTION = "Ethernet Configuration Files" -SECTION = "eth-config" -LICENSE = "Freescale-EULA" -LIC_FILES_CHKSUM = "file://COPYING;md5=cf02dc8eb5ac4a76f3812826520dea87" - -PR = "r2" - -SRC_URI = "git://git.freescale.com/ppc/sdk/eth-config.git" -SRCREV = "c255231fb606bff18390da3b26e1ee9fca55e4e6" - -S = "${WORKDIR}/git" - -do_install() { - install -d ${D}/etc/fmc/config - install -m 644 ${S}/*.xml ${D}/etc/fmc/config - install -d ${D}/etc/fmc/config/shared_mac - install -m 644 ${S}/shared_mac/*.xml ${D}/etc/fmc/config/shared_mac - install -m 644 ${S}/shared_mac/README ${D}/etc/fmc/config/shared_mac -} diff --git a/meta-fsl-ppc/recipes-tools/flib/flib_git.bb b/meta-fsl-ppc/recipes-tools/flib/flib_git.bb deleted file mode 100644 index fb3f6987..00000000 --- a/meta-fsl-ppc/recipes-tools/flib/flib_git.bb +++ /dev/null @@ -1,15 +0,0 @@ -DESCRIPTION = "Foundation Library" -SECTION = "flib" -LICENSE = "BSD & GPLv2" -LIC_FILES_CHKSUM = "file://COPYING;md5=3f16fa8e677e45af3127c5c4bafc3c00" - -SRC_URI = "git://git.freescale.com/ppc/sdk/flib.git" -SRCREV = "ff692ad3c286a07717c6677177825889fe17d450" - -S = "${WORKDIR}/git" - -do_install(){ - oe_runmake install DESTDIR=${D} -} - -ALLOW_EMPTY_${PN} = "1" diff --git a/meta-fsl-ppc/recipes-tools/hv-cfg/hv-cfg_git.bb b/meta-fsl-ppc/recipes-tools/hv-cfg/hv-cfg_git.bb deleted file mode 100644 index 2c6bb85a..00000000 --- a/meta-fsl-ppc/recipes-tools/hv-cfg/hv-cfg_git.bb +++ /dev/null @@ -1,46 +0,0 @@ -DESCRIPTION = "Hypervisor Config" -SECTION = "hv-cfg" -LICENSE = "BSD" -PR = "r6" - -LIC_FILES_CHKSUM = " \ - file://p2041rdb/LICENSE;md5=96dd72f26e9bb861de5c76c60e35e1bc \ - file://p3041ds/LICENSE;md5=96dd72f26e9bb861de5c76c60e35e1bc \ - file://p4080ds/LICENSE;md5=96dd72f26e9bb861de5c76c60e35e1bc \ - file://p5020ds/LICENSE;md5=96dd72f26e9bb861de5c76c60e35e1bc \ -" - -DEPENDS += "dtc-native" - -# this package is specific to the machine itself -INHIBIT_DEFAULT_DEPS = "1" -PACKAGE_ARCH = "${MACHINE_ARCH}" -COMPATIBLE_HOST_fslmachine = ".*" -COMPATIBLE_HOST ?= "(none)" - -inherit deploy - -SRCREV = "d037ab9d5b9ecd58e10a7dac2b601d781ed9b5bf" -SRC_URI = "git://git.freescale.com/ppc/sdk/hv-cfg.git" - -S = "${WORKDIR}/git" - -do_install () { - make install - - M=`echo ${MACHINE} | sed s/-64b//g` - install -d ${D}/boot/hv-cfg - cp -r ${S}/${M}/${M}/* ${D}/boot/hv-cfg -} - -do_deploy () { - M=`echo ${MACHINE} | sed s/-64b//g` - install -d ${DEPLOYDIR}/hv-cfg - cp -r ${S}/${M}/${M}/* ${DEPLOYDIR}/hv-cfg -} -addtask deploy after do_install - -PACKAGES += "${PN}-image" -FILES_${PN}-image += "/boot" - -ALLOW_EMPTY_${PN} = "1" diff --git a/meta-fsl-ppc/recipes-tools/mux-server/files/mux-server-1.02.tar.gz b/meta-fsl-ppc/recipes-tools/mux-server/files/mux-server-1.02.tar.gz deleted file mode 100644 index d8f20147..00000000 Binary files a/meta-fsl-ppc/recipes-tools/mux-server/files/mux-server-1.02.tar.gz and /dev/null differ diff --git a/meta-fsl-ppc/recipes-tools/mux-server/mux-server_1.02.bb b/meta-fsl-ppc/recipes-tools/mux-server/mux-server_1.02.bb deleted file mode 100644 index ab9cce1c..00000000 --- a/meta-fsl-ppc/recipes-tools/mux-server/mux-server_1.02.bb +++ /dev/null @@ -1,16 +0,0 @@ -DESCRIPTION = "A Linux-based utility supporting console multiplexing and demultiplexing" -SECTION = "mux-server" -LICENSE = "LGPL-2.1" -# TODO: add a dedicated COPYING file -LIC_FILES_CHKSUM = "file://mux_server.c;endline=9;md5=e59eeb0812bb88b7af2d932f2dc22aed" - -SRC_URI = "file://mux-server-${PV}.tar.gz;name=mux_server" - -EXTRA_OEMAKE='HOSTCC="${CC}"' - -do_install () { - install -d ${D}${bindir} - install -m 755 mux_server ${D}${bindir} -} - -BBCLASSEXTEND = "native nativesdk" diff --git a/meta-fsl-ppc/recipes-tools/rcw/rcw_git.bb b/meta-fsl-ppc/recipes-tools/rcw/rcw_git.bb deleted file mode 100644 index c532a9d8..00000000 --- a/meta-fsl-ppc/recipes-tools/rcw/rcw_git.bb +++ /dev/null @@ -1,39 +0,0 @@ -DESCRIPTION = "Reset Control Words (RCW)" -SECTION = "rcw" -LICENSE = "BSD" -PR = "r8" - -LIC_FILES_CHKSUM = "file://rcw.py;beginline=8;endline=28;md5=9ba0b28922dd187b06b6c8ebcfdd208e" - -# this package is specific to the machine itself -INHIBIT_DEFAULT_DEPS = "1" -PACKAGE_ARCH = "${MACHINE_ARCH}" -COMPATIBLE_HOST_fslmachine = ".*" -COMPATIBLE_HOST ?= "(none)" - -inherit deploy - -SRC_URI = "git://git.freescale.com/ppc/sdk/rcw.git" -SRCREV = "5d3c819bcca6d09dcf7b52b3f2855dda304a5997" - -S = "${WORKDIR}/git" - -do_install () { - make install - - M=`echo ${MACHINE} | sed s/-64b//g` - install -d ${D}/boot/rcw - cp -r ${S}/${M}/${M}/* ${D}/boot/rcw -} - -do_deploy () { - M=`echo ${MACHINE} | sed s/-64b//g` - install -d ${DEPLOYDIR}/rcw - cp -r ${S}/${M}/${M}/* ${DEPLOYDIR}/rcw -} -addtask deploy after do_install - -PACKAGES += "${PN}-image" -FILES_${PN}-image += "/boot" - -ALLOW_EMPTY_${PN} = "1" diff --git a/meta-fsl-ppc/recipes-tools/skmm/skmm_git.bb b/meta-fsl-ppc/recipes-tools/skmm/skmm_git.bb deleted file mode 100644 index 224e5564..00000000 --- a/meta-fsl-ppc/recipes-tools/skmm/skmm_git.bb +++ /dev/null @@ -1,33 +0,0 @@ -DESCRIPTION = "SKMM application for PCIe endpoint" -SECTION = "skmm" -LICENSE = "BSD & GPLv2" -LIC_FILES_CHKSUM = "file://Makefile;endline=30;md5=39e58bedc879163c9338596e52df5b1f" - -DEPENDS = "libedit" - -SRC_URI = "git://git.freescale.com/ppc/sdk/skmm-ep.git" -SRCREV = "80d8393a2033b3b0cc8f885702d7b288956f3a37" - -COMPATIBLE_MACHINE = "(p4080ds|t4240qds)" - -S = "${WORKDIR}/git" - -EXTRA_OEMAKE = 'MACHINE=${MACHINE}' - -export LIBEDIT_CFLAGS="$(pkg-config --cflags libedit)" -export LIBEDIT_LDFLAGS="$(pkg-config --libs --static libedit)" - -do_compile () { - export ARCH=${TARGET_ARCH} - oe_runmake HOST=x86_64 clean - oe_runmake HOST=x86_64 - oe_runmake HOST=powerpc clean - oe_runmake HOST=powerpc -} - -do_install () { - oe_runmake ARCH=${TARGET_ARCH} HOST=x86_64 install DESTDIR=${D} - oe_runmake ARCH=${TARGET_ARCH} HOST=powerpc install DESTDIR=${D} -} - -FILES_${PN} += "/home/root/.skmm/*" diff --git a/meta-fsl-ppc/recipes-tools/usdpaa/usdpaa_git.bb b/meta-fsl-ppc/recipes-tools/usdpaa/usdpaa_git.bb deleted file mode 100644 index 48e860f7..00000000 --- a/meta-fsl-ppc/recipes-tools/usdpaa/usdpaa_git.bb +++ /dev/null @@ -1,49 +0,0 @@ -DESCRIPTION = "User-Space Data-Path Acceleration Architecture drivers" -LICENSE = "BSD & GPLv2" -LIC_FILES_CHKSUM = "file://Makefile;endline=30;md5=39e58bedc879163c9338596e52df5b1f" -PR = "r4" - -inherit pkgconfig - -DEPENDS = "libxml2 libedit ncurses readline flib fmc" -RDEPENDS_${PN} = "libgcc bash" - -SRC_URI = "git://git.freescale.com/ppc/sdk/usdpaa.git" -SRCREV = "97fe45d9697ef339e10a1885539b23fa7fcb113e" - -S = "${WORKDIR}/git" - -EXTRA_OEMAKE = 'CC="${CC}" LD="${LD}" AR="${AR}"' -export ARCH="${TARGET_ARCH}" - -do_compile_prepend () { - case ${MACHINE} in - b4420qds|b4420qds-64b|b4860qds|b4860qds-64b) SOC=B4860;; - t4240qds|t4240qds-64b) SOC=T4240;; - p1023rdb) SOC=P1023;; - *) SOC=P4080;; - esac - export FMC_EXTRA_CFLAGS="-I ${STAGING_INCDIR}/fmc" - export FMLIB_EXTRA_CFLAGS="-I ${STAGING_INCDIR}/fmd \ - -I ${STAGING_INCDIR}/fmd/Peripherals \ - -I ${STAGING_INCDIR}/fmd/integrations \ - -D $SOC" - - export LIBXML2_CFLAGS="$(pkg-config --cflags libxml-2.0)" - export LIBXML2_LDFLAGS="$(pkg-config --libs --static libxml-2.0)" - export LIBEDIT_CFLAGS="$(pkg-config --cflags libedit)" - export LIBEDIT_LDFLAGS="$(pkg-config --libs --static libedit)" -} - -do_install () { - oe_runmake install DESTDIR=${D} -} - -PARALLEL_MAKE_pn-${PN} = "" -FILES_${PN} += "/root/SOURCE_THIS /usr/etc/" - -PACKAGE_ARCH = "${MACHINE_ARCH}" - -COMPATIBLE_HOST_fslmachine = ".*" -COMPATIBLE_HOST ?= "(none)" - diff --git a/meta-fsl-ppc/recipes-tools/web-sysmon/web-sysmon_git.bb b/meta-fsl-ppc/recipes-tools/web-sysmon/web-sysmon_git.bb deleted file mode 100644 index 1b2e070d..00000000 --- a/meta-fsl-ppc/recipes-tools/web-sysmon/web-sysmon_git.bb +++ /dev/null @@ -1,21 +0,0 @@ -DESCRIPTION = "Web System Monitor Files" -SECTION = "web-sysmon" -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e" - -SRC_URI = "git://git.freescale.com/ppc/sdk/web-sysmon.git" -SRCREV = "40b47611378ef5c07d98f0f691bb146ae52dcdc1" - -S = "${WORKDIR}/git" - -FILES_${PN} += "/" - -RDEPENDS_${PN} = "lighttpd" - -do_install() { - install -d ${D}/etc - install -m 644 ${S}/lighttpd.conf ${D}/etc - install -d ${D}/usr/local/bin - install -m 755 ${S}/rrd/sens_update_rrd ${D}/usr/local/bin - cp -r ${S}/rrd ${D}/usr -} diff --git a/meta-fsl-ppc/recipes-ucode/fm-ucode/fm-ucode_git.bb b/meta-fsl-ppc/recipes-ucode/fm-ucode/fm-ucode_git.bb deleted file mode 100644 index 76d00b99..00000000 --- a/meta-fsl-ppc/recipes-ucode/fm-ucode/fm-ucode_git.bb +++ /dev/null @@ -1,46 +0,0 @@ -DESCRIPTION = "Fman microcode binary" -SECTION = "fm-ucode" -LICENSE = "Freescale-EULA" -LIC_FILES_CHKSUM = "file://EULA;md5=60037ccba533a5995e8d1a838d85799c" - -PR = "r1" - -COMPATIBLE_MACHINE = "(p1023rdb|p2041rdb|p3041ds|p4080ds|p5020ds|p5040ds|p5020ds-64b|p5040ds-64b|b4420qds|b4420qds-64b|b4860qds|b4860qds-64b|t4160qds|t4160qds-64b|t4240qds|t4240qds-64b)" -inherit deploy - -SRC_URI = "git://git.freescale.com/ppc/sdk/fm-ucode.git" -SRCREV = "4ca0e41de225b34962e1517c2c75bbb31a381e1a" - -S = "${WORKDIR}/git" - -ALLOW_EMPTY_${PN} = "1" -do_install () { - case ${MACHINE} in - b4420qds|b4420qds-64b|b4860qds|b4860qds-64b) UCODE=b4860qds;; - t4240qds|t4240qds-64b|t4160qds|t4160qds-64b) UCODE=t4240qds;; - p5020ds|p5020ds-64b) UCODE=p5020ds;; - p5040ds|p5040ds-64b) UCODE=p5040ds;; - *) UCODE=${MACHINE};; - esac - UCODE=`echo $UCODE | sed -e 's,[a-zA-Z]*$,,'` - install -d ${D}/boot - install -m 644 fsl_fman_ucode_${UCODE}*.bin ${D}/boot/ -} - -do_deploy () { - case ${MACHINE} in - b4420qds|b4420qds-64b|b4860qds|b4860qds-64b) UCODE=b4860qds;; - t4240qds|t4240qds-64b|t4160qds|t4160qds-64b) UCODE=t4240qds;; - p5020ds|p5020ds-64b) UCODE=p5020ds;; - p5040ds|p5040ds-64b) UCODE=p5040ds;; - *) UCODE=${MACHINE};; - esac - UCODE=`echo $UCODE | sed -e 's,[a-zA-Z]*$,,'` - install -d ${DEPLOYDIR}/ - install -m 644 fsl_fman_ucode_${UCODE}*.bin ${DEPLOYDIR}/ -} -addtask deploy before do_build after do_install - -PACKAGES += "${PN}-image" -FILES_${PN}-image += "/boot" - diff --git a/meta-fsl-ppc/recipes-ucode/fmc/fmc_git.bb b/meta-fsl-ppc/recipes-ucode/fmc/fmc_git.bb deleted file mode 100644 index 20f93f65..00000000 --- a/meta-fsl-ppc/recipes-ucode/fmc/fmc_git.bb +++ /dev/null @@ -1,53 +0,0 @@ -DESCRIPTION = "Frame Manager Configuration tool" -SECTION = "fmc" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://COPYING;md5=a504ab5a8ff235e67c7301214749346c" - -PR = "r2" - -SRC_URI = "git://git.freescale.com/ppc/sdk/fmc.git" -SRCREV = "f2e1a831a96f1d04d3d5a5970d2e54c38098cf39" - -DEPENDS = "libxml2 fmlib tclap" - -PACKAGE_ARCH = "${MACHINE_ARCH}" - -S = "${WORKDIR}/git" - -EXTRA_OEMAKE = 'FMD_USPACE_HEADER_PATH="${STAGING_INCDIR}/fmd" \ - FMD_USPACE_LIB_PATH="${STAGING_LIBDIR}" LIBXML2_HEADER_PATH="${STAGING_INCDIR}/libxml2" \ - TCLAP_HEADER_PATH="${STAGING_INCDIR}" ' -EXTRA_OEMAKE_virtclass-native = 'FMCHOSTMODE=1 FMD_USPACE_HEADER_PATH="${STAGING_INCDIR}/fmd" \ - FMD_USPACE_LIB_PATH="${STAGING_LIBDIR}" LIBXML2_HEADER_PATH="${STAGING_INCDIR}/libxml2" \ - TCLAP_HEADER_PATH="${STAGING_INCDIR}" ' - -PARALLEL_MAKE = "" - -do_compile () { - if [ "b4860qds" = "${MACHINE}" ] || [ "b4420qds" = "${MACHINE}" ];then - EXTRA_OEMAKE_PLATFORM="b4860qds" - elif [ "t4240qds" = "${MACHINE}" ] || [ "t4160qds" = "${MACHINE}" ];then - EXTRA_OEMAKE_PLATFORM="t4240qds" - elif [ "p1023rds" = "${MACHINE}" ];then - EXTRA_OEMAKE_PLATFORM="p1023rds" - else - EXTRA_OEMAKE_PLATFORM="" - fi - oe_runmake MACHINE=${EXTRA_OEMAKE_PLATFORM} -C source -} - -do_install () { - install -d ${D}/${bindir} - install -m 755 ${S}/source/fmc ${D}/${bindir}/fmc - - install -d ${D}/etc/fmc/config - install -m 644 ${S}/etc/fmc/config/hxs_pdl_v3.xml ${D}/etc/fmc/config - - install -d ${D}/${includedir}/fmc - install ${S}/source/fmc.h ${D}/${includedir}/fmc - - install -d ${D}/${libdir} - install ${S}/source/libfmc.a ${D}/${libdir} -} - -BBCLASSEXTEND = "native" diff --git a/meta-fsl-ppc/recipes-ucode/fmlib/files/0001-fm-lib-make-the-library-install-path-configurable.patch b/meta-fsl-ppc/recipes-ucode/fmlib/files/0001-fm-lib-make-the-library-install-path-configurable.patch deleted file mode 100644 index 4894ce3b..00000000 --- a/meta-fsl-ppc/recipes-ucode/fmlib/files/0001-fm-lib-make-the-library-install-path-configurable.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 67b539d256520f95f3c8101f4605ea6d496982df Mon Sep 17 00:00:00 2001 -From: Zhenhua Luo -Date: Thu, 18 Oct 2012 17:28:00 +0300 -Subject: [PATCH] fm-lib: make the library install path configurable - -currently library for both 32bit target and 64bit target -is installed in /usr/lib folder, add a variable to make the -install path configurable - -Signed-off-by: Zhenhua Luo ---- - Makefile | 8 +++++--- - 1 file changed, 5 insertions(+), 3 deletions(-) - -diff --git a/Makefile b/Makefile -index 06fe930..d59f44a 100644 ---- a/Makefile -+++ b/Makefile -@@ -59,6 +59,8 @@ endif - - INSTALL?=install - -+LIB_DEST_DIR?=$(PREFIX)/lib -+ - # Don't forget to increment .version before doing a new release! - FM_LIB_VERSION:=$(shell cat .version) - -@@ -118,9 +120,9 @@ archive: all .version - - install-%: %.a - @(echo "Installing...") -- @($(INSTALL) -d $(DESTDIR)$(PREFIX)/lib) -- @($(INSTALL) $< $(DESTDIR)$(PREFIX)/lib) -- @(ln -s $(DESTDIR)$(PREFIX)/lib/$< $(DESTDIR)$(PREFIX)/lib/libfm.a) -+ @($(INSTALL) -d $(DESTDIR)$(LIB_DEST_DIR)) -+ @($(INSTALL) $< $(DESTDIR)$(LIB_DEST_DIR)) -+ @(ln -s $(DESTDIR)$(LIB_DEST_DIR)/$< $(DESTDIR)$(LIB_DEST_DIR)/libfm.a) - @(cp -r -p ./include $(DESTDIR)$(PREFIX)) - @($(INSTALL) -d $(DESTDIR)$(PREFIX)/share/doc/fm-lib-$(FM_LIB_VERSION)) - @($(INSTALL) $(FM_LIB_DOCFILES) $(DESTDIR)$(PREFIX)/share/doc/fm-lib-$(FM_LIB_VERSION)) --- -1.7.9.5 - diff --git a/meta-fsl-ppc/recipes-ucode/fmlib/fmlib_git.bb b/meta-fsl-ppc/recipes-ucode/fmlib/fmlib_git.bb deleted file mode 100644 index 7a7b8f26..00000000 --- a/meta-fsl-ppc/recipes-ucode/fmlib/fmlib_git.bb +++ /dev/null @@ -1,43 +0,0 @@ -DESCRIPTION = "Frame Manager User Space Library" -SECTION = "fman" -LICENSE = "BSD & GPLv2" -LIC_FILES_CHKSUM = "file://COPYING;md5=3f16fa8e677e45af3127c5c4bafc3c00" - -PR = "r1" - -DEPENDS = "linux-libc-headers" -DEPENDS_virtclass-native = "" - -SRC_URI = "git://git.freescale.com/ppc/sdk/fmlib.git" -SRCREV = "7d843485bdac963d98f81773c0f3cb15936e09da" - -S = "${WORKDIR}/git" - -TARGET_ARCH_FMLIB = "${DEFAULTTUNE}" -TARGET_ARCH_FMLIB_e5500 = "ppc32e5500" -TARGET_ARCH_FMLIB_e6500 = "ppc32e6500" -COMPATIBLE_HOST_fslmachine = ".*" -COMPATIBLE_HOST ?= "(none)" - -EXTRA_OEMAKE = "DESTDIR=${D} PREFIX=${prefix} LIB_DEST_DIR=${libdir} \ - CROSS_COMPILE=${TARGET_PREFIX} KERNEL_SRC=${STAGING_EXECPREFIXDIR}" - -do_compile () { - oe_runmake libfm-${TARGET_ARCH_FMLIB}.a -} - -do_compile_virtclass-native () { -} - -do_install () { - oe_runmake install-libfm-${TARGET_ARCH_FMLIB} -} - -do_install_virtclass-native () { - install -d ${D}/${includedir} - cp -rf ${S}/include/* ${D}/${includedir} -} - -ALLOW_EMPTY_${PN} = "1" - -BBCLASSEXTEND = "native" diff --git a/meta-fsl-ppc/recipes-virtualization/hv-cfg/hv-cfg_git.bb b/meta-fsl-ppc/recipes-virtualization/hv-cfg/hv-cfg_git.bb new file mode 100644 index 00000000..2c6bb85a --- /dev/null +++ b/meta-fsl-ppc/recipes-virtualization/hv-cfg/hv-cfg_git.bb @@ -0,0 +1,46 @@ +DESCRIPTION = "Hypervisor Config" +SECTION = "hv-cfg" +LICENSE = "BSD" +PR = "r6" + +LIC_FILES_CHKSUM = " \ + file://p2041rdb/LICENSE;md5=96dd72f26e9bb861de5c76c60e35e1bc \ + file://p3041ds/LICENSE;md5=96dd72f26e9bb861de5c76c60e35e1bc \ + file://p4080ds/LICENSE;md5=96dd72f26e9bb861de5c76c60e35e1bc \ + file://p5020ds/LICENSE;md5=96dd72f26e9bb861de5c76c60e35e1bc \ +" + +DEPENDS += "dtc-native" + +# this package is specific to the machine itself +INHIBIT_DEFAULT_DEPS = "1" +PACKAGE_ARCH = "${MACHINE_ARCH}" +COMPATIBLE_HOST_fslmachine = ".*" +COMPATIBLE_HOST ?= "(none)" + +inherit deploy + +SRCREV = "d037ab9d5b9ecd58e10a7dac2b601d781ed9b5bf" +SRC_URI = "git://git.freescale.com/ppc/sdk/hv-cfg.git" + +S = "${WORKDIR}/git" + +do_install () { + make install + + M=`echo ${MACHINE} | sed s/-64b//g` + install -d ${D}/boot/hv-cfg + cp -r ${S}/${M}/${M}/* ${D}/boot/hv-cfg +} + +do_deploy () { + M=`echo ${MACHINE} | sed s/-64b//g` + install -d ${DEPLOYDIR}/hv-cfg + cp -r ${S}/${M}/${M}/* ${DEPLOYDIR}/hv-cfg +} +addtask deploy after do_install + +PACKAGES += "${PN}-image" +FILES_${PN}-image += "/boot" + +ALLOW_EMPTY_${PN} = "1" diff --git a/meta-fsl-ppc/recipes-virtualization/hypervisor/files/81-fsl-embedded-hv.rules b/meta-fsl-ppc/recipes-virtualization/hypervisor/files/81-fsl-embedded-hv.rules new file mode 100644 index 00000000..5edfa113 --- /dev/null +++ b/meta-fsl-ppc/recipes-virtualization/hypervisor/files/81-fsl-embedded-hv.rules @@ -0,0 +1,2 @@ +# Add rule to handle setting up device node for FSL HV mgmt driver +SUBSYSTEM=="misc", KERNEL=="fsl-hv", NAME="fsl-hv" diff --git a/meta-fsl-ppc/recipes-virtualization/hypervisor/hypervisor_git.bb b/meta-fsl-ppc/recipes-virtualization/hypervisor/hypervisor_git.bb new file mode 100644 index 00000000..dc864066 --- /dev/null +++ b/meta-fsl-ppc/recipes-virtualization/hypervisor/hypervisor_git.bb @@ -0,0 +1,90 @@ +DESCRIPTION = "Freescale embedded hypervisor" +SECTION = "embedded-hv" +LICENSE = "BSD" +LIC_FILES_CHKSUM = "file://README;endline=22;md5=0655bbc3b7d7166c30c87208b4e23cf0" + +PR = "r3" + +DEPENDS = "u-boot-mkimage-native" + +inherit deploy + +S = "${WORKDIR}/git" + +# TODO: fix dtc to use the already built package +SRC_URI = " \ + git://git.freescale.com/ppc/sdk/hypervisor/hypervisor.git;name=hypervisor \ + git://git.freescale.com/ppc/sdk/hypervisor/kconfig.git;name=kconfig;destsuffix=git/kconfig \ + git://git.freescale.com/ppc/sdk/hypervisor/libos.git;name=libos;destsuffix=git/libos \ + git://www.jdl.com/software/dtc.git;name=dtc;destsuffix=dtc \ + git://git.freescale.com/ppc/sdk/hypertrk.git;name=hypertrk;destsuffix=git/hypertrk \ + file://81-fsl-embedded-hv.rules \ + " + +SRCREV_FORMAT="hypervisor" +SRCREV = "e6092cdf2a225c66c1ea46b1151eb828da29d139" +SRCREV_kconfig = "a56025d4da992b856796b0eccac2e410d751dbac" +SRCREV_libos = "5268371581f3ef3959be2a53235edfa6a8c6aa7c" +SRCREV_dtc = "033089f29099bdfd5c2d6986cdb9fd07b16cfde0" +SRCREV_hypertrk = "975c98b562186afbd3bbf103ae54b96cf9b3e533" + +EXTRA_OEMAKE = 'CROSS_COMPILE=${TARGET_PREFIX} CC="${TARGET_PREFIX}gcc ${TOOLCHAIN_OPTIONS}"' + +DEFCONFIG = "defconfig" +DEFCONFIG_powerpc64 = "64bit_defconfig" + +COMPATIBLE_HOST_fslmachine = ".*" +COMPATIBLE_HOST ?= "(none)" + +inherit cml1 +do_configure () { + oe_runmake ${DEFCONFIG} +} + +PKG_HV_HYPERTRK_SUPPORT = "n" +do_compile () { + if [ "${PKG_HV_HYPERTRK_SUPPORT}" = "y" ] + then + oe_runmake silentoldconfig + export HV_DIR=$PWD + cd hypertrk + oe_runmake deploy + cd .. + fi + + oe_runmake + oe_runmake partman +} + +do_install () { + install -d ${D}/${bindir} + install ${S}/output/bin/linux/partman ${D}/${bindir}/partman + + install -d ${D}${sysconfdir}/udev/rules.d + install -m 0644 ${WORKDIR}/81-fsl-embedded-hv.rules ${D}${sysconfdir}/udev/rules.d + + install -d ${D}/boot/hv + install ${S}/output/.config ${D}/boot/hv/hypervisor.config + install -m 644 ${S}/output/bin/hv ${S}/output/bin/hv.map \ + ${S}/output/bin/hv.uImage ${S}/output/bin/hv.bin \ + ${D}/boot/hv/ +} + +do_deploy () { + install -d ${DEPLOYDIR}/hv/ + install ${S}/output/.config ${DEPLOYDIR}/hv/hypervisor.config + install -m 644 ${S}/output/bin/hv ${S}/output/bin/hv.map \ + ${S}/output/bin/hv.uImage ${S}/output/bin/hv.bin \ + ${DEPLOYDIR}/hv/ +} +addtask deploy before do_build after do_install + +do_deploy_append() { + rm -f ${S}/../hv +} + +INHIBIT_PACKAGE_DEBUG_SPLIT = "1" +ALLOW_EMPTY_${PN} = "1" +PACKAGES_prepend = "${PN}-image ${PN}-partman " +FILES_${PN}-image = "/boot/" +FILES_${PN}-partman = "${bindir}/partman" diff --git a/meta-fsl-ppc/recipes-virtualization/mux-server/files/mux-server-1.02.tar.gz b/meta-fsl-ppc/recipes-virtualization/mux-server/files/mux-server-1.02.tar.gz new file mode 100644 index 00000000..d8f20147 Binary files /dev/null and b/meta-fsl-ppc/recipes-virtualization/mux-server/files/mux-server-1.02.tar.gz differ diff --git a/meta-fsl-ppc/recipes-virtualization/mux-server/mux-server_1.02.bb b/meta-fsl-ppc/recipes-virtualization/mux-server/mux-server_1.02.bb new file mode 100644 index 00000000..ab9cce1c --- /dev/null +++ b/meta-fsl-ppc/recipes-virtualization/mux-server/mux-server_1.02.bb @@ -0,0 +1,16 @@ +DESCRIPTION = "A Linux-based utility supporting console multiplexing and demultiplexing" +SECTION = "mux-server" +LICENSE = "LGPL-2.1" +# TODO: add a dedicated COPYING file +LIC_FILES_CHKSUM = "file://mux_server.c;endline=9;md5=e59eeb0812bb88b7af2d932f2dc22aed" + +SRC_URI = "file://mux-server-${PV}.tar.gz;name=mux_server" + +EXTRA_OEMAKE='HOSTCC="${CC}"' + +do_install () { + install -d ${D}${bindir} + install -m 755 mux_server ${D}${bindir} +} + +BBCLASSEXTEND = "native nativesdk" -- cgit v1.2.3-54-g00ecf From 811b8944616e03f109038a127aec8aa2cdb9b8b6 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Wed, 10 Jul 2013 03:45:00 +0000 Subject: hypervisor: fix sizeof-pointer-memaccess error Fix the below build error: | build: src/livetree.c | .../hypervisor/git-r3/git/src/devtree.c: In function 'read_intmap': | .../hypervisor/git-r3/git/src/devtree.c:1513:25: error: argument to | 'sizeof' in 'memset' call is the same expression as the destination; | did you mean to dereference it? [-Werror=sizeof-pointer-memaccess] | memset(ent, 0, sizeof(ent)); | ^ | cc1: all warnings being treated as errors | build: src/ipi_doorbell.c | make[1]: *** [bin/devtree.o] Error 1 | make[1]: *** Waiting for unfinished jobs.... | make[1]: Leaving directory `.../hypervisor/git-r3/git/output' | make: *** [all] Error 2 | ERROR: oe_runmake failed Signed-off-by: Ting Liu --- .../0001-fix-sizeof-pointer-memaccess-error.patch | 39 ++++++++++++++++++++++ .../hypervisor/hypervisor_git.bb | 1 + 2 files changed, 40 insertions(+) create mode 100644 meta-fsl-ppc/recipes-virtualization/hypervisor/files/0001-fix-sizeof-pointer-memaccess-error.patch diff --git a/meta-fsl-ppc/recipes-virtualization/hypervisor/files/0001-fix-sizeof-pointer-memaccess-error.patch b/meta-fsl-ppc/recipes-virtualization/hypervisor/files/0001-fix-sizeof-pointer-memaccess-error.patch new file mode 100644 index 00000000..a5622732 --- /dev/null +++ b/meta-fsl-ppc/recipes-virtualization/hypervisor/files/0001-fix-sizeof-pointer-memaccess-error.patch @@ -0,0 +1,39 @@ +From 59e68351114a65a1f315ded1ee92f4370b8547e2 Mon Sep 17 00:00:00 2001 +From: Ting Liu +Date: Mon, 8 Jul 2013 17:03:43 +0800 +Subject: [PATCH] fix sizeof-pointer-memaccess error + +build: src/livetree.c +.../hypervisor/git-r3/git/src/devtree.c: In function 'read_intmap': +.../hypervisor/git-r3/git/src/devtree.c:1513:25: error: argument to 'sizeof' in 'memset' call is the same expression as the destination; did you mean to dereference it? [-Werror=sizeof-pointer-memaccess] + memset(ent, 0, sizeof(ent)); + ^ +cc1: all warnings being treated as errors +build: src/ipi_doorbell.c +make[1]: *** [bin/devtree.o] Error 1 +make[1]: *** Waiting for unfinished jobs.... +make[1]: Leaving directory `.../hypervisor/git-r3/git/output' +make: *** [all] Error 2 +ERROR: oe_runmake failed + +Signed-off-by: Ting Liu +--- + src/devtree.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/src/devtree.c b/src/devtree.c +index f3710e4..3295e20 100644 +--- a/src/devtree.c ++++ b/src/devtree.c +@@ -1510,7 +1510,7 @@ static void read_intmap(dt_node_t *node) + } + + if (imap + ent->parent_naddr + ent->parent_nint > imap_end) { +- memset(ent, 0, sizeof(ent)); ++ memset(ent, 0, sizeof(intmap_entry_t)); + break; + } + +-- +1.7.5.4 + diff --git a/meta-fsl-ppc/recipes-virtualization/hypervisor/hypervisor_git.bb b/meta-fsl-ppc/recipes-virtualization/hypervisor/hypervisor_git.bb index dc864066..ff89bfa2 100644 --- a/meta-fsl-ppc/recipes-virtualization/hypervisor/hypervisor_git.bb +++ b/meta-fsl-ppc/recipes-virtualization/hypervisor/hypervisor_git.bb @@ -18,6 +18,7 @@ SRC_URI = " \ git://git.freescale.com/ppc/sdk/hypervisor/libos.git;name=libos;destsuffix=git/libos \ git://www.jdl.com/software/dtc.git;name=dtc;destsuffix=dtc \ git://git.freescale.com/ppc/sdk/hypertrk.git;name=hypertrk;destsuffix=git/hypertrk \ + file://0001-fix-sizeof-pointer-memaccess-error.patch \ file://81-fsl-embedded-hv.rules \ " -- cgit v1.2.3-54-g00ecf From 36ec9b6e5cca3d140ceb579193c5913485445a06 Mon Sep 17 00:00:00 2001 From: Chunrong Guo Date: Wed, 10 Jul 2013 03:45:01 +0000 Subject: u-boot: append sdk version into uboot version Signed-off-by: Chunrong Guo --- meta-fsl-ppc/recipes-bsp/u-boot/u-boot_git.bb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/meta-fsl-ppc/recipes-bsp/u-boot/u-boot_git.bb b/meta-fsl-ppc/recipes-bsp/u-boot/u-boot_git.bb index c3aa1053..008e253d 100644 --- a/meta-fsl-ppc/recipes-bsp/u-boot/u-boot_git.bb +++ b/meta-fsl-ppc/recipes-bsp/u-boot/u-boot_git.bb @@ -39,6 +39,8 @@ EXTRA_OEMAKE = 'CROSS_COMPILE=${WRAP_TARGET_PREFIX} CC="${WRAP_TARGET_PREFIX}gcc PACKAGE_ARCH = "${MACHINE_ARCH}" +UBOOT_LOCALVERSION = "${@d.getVar('SDK_VERSION', True).partition(' ')[0]}" + USRC ?= "" S = '${@base_conditional("USRC", "", "${WORKDIR}/git", "${USRC}", d)}' @@ -47,6 +49,12 @@ do_compile () { unset CFLAGS unset CPPFLAGS + if [ ! -e ${B}/.scmversion -a ! -e ${S}/.scmversion ] + then + echo ${UBOOT_LOCALVERSION} > ${B}/.scmversion + echo ${UBOOT_LOCALVERSION} > ${S}/.scmversion + fi + if [ "x${UBOOT_MACHINES}" = "x" ]; then UBOOT_MACHINES=${UBOOT_MACHINE} fi -- cgit v1.2.3-54-g00ecf From 8a89189003b7c2d9245c6dc179e131d81c5e78e4 Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Tue, 16 Jul 2013 10:14:29 +0000 Subject: e500v2: workaround for ICE of gcc-4.8.x [Issue] ICE appears when passing -mfloat-gprs=double for e500v2 target build with gcc-4.8.1, the bug url is: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57717#c1 [Workaround] Replace double-float with single-float for e500v2 build until the ICE is fixed [TODO] Revert the commit when the ICE bug is fixed. Signed-off-by: Zhenhua Luo Acked-by: Otavio Salvador --- meta-fsl-ppc/conf/machine/e500v2.inc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/meta-fsl-ppc/conf/machine/e500v2.inc b/meta-fsl-ppc/conf/machine/e500v2.inc index 96887845..aabca6e2 100644 --- a/meta-fsl-ppc/conf/machine/e500v2.inc +++ b/meta-fsl-ppc/conf/machine/e500v2.inc @@ -3,6 +3,12 @@ require conf/machine/include/tune-ppce500v2.inc MACHINE_FEATURES = "kernel26 pci ext2 ext3 serial" MACHINE_EXTRA_RRECOMMENDS = "u-boot udev-extraconf" +# FIXME +# Workaround for ICE of gcc-4.8.x when passing -mfloat-gprs=double +# Bug: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57717#c1 +# Replace double-float with single-float, revert the commit when above bug is fixed +TUNE_CCARGS := "${@d.getVar('TUNE_CCARGS', True).replace('-mfloat-gprs=double', '-mfloat-gprs=single')}" + PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" PREFERRED_VERSION_virtual/kernel ?= "3.0.34" PREFERRED_PROVIDER_linux-libc-headers ?= "linux-qoriq-sdk-headers" -- cgit v1.2.3-54-g00ecf From 41e0e8d7e2f5d9df76c84da35dcfadede120776d Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Tue, 16 Jul 2013 09:34:27 +0000 Subject: qemu_fslgit: backport a patch from oe-core to define fdt_t types Fix the error: usr/include/fdt.h:58:2: error: unknown type name 'fdt32_t' Backport a patch from oe-core. Commit: http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id= ea6e7975964c75e0c8224205e0c1fd04ba37ed4a Signed-off-by: Ting Liu --- .../recipes-devtools/qemu/files/fdt_header.patch | 39 ++++++++++++++++++++++ meta-fsl-ppc/recipes-devtools/qemu/qemu_fslgit.bb | 2 ++ 2 files changed, 41 insertions(+) create mode 100644 meta-fsl-ppc/recipes-devtools/qemu/files/fdt_header.patch diff --git a/meta-fsl-ppc/recipes-devtools/qemu/files/fdt_header.patch b/meta-fsl-ppc/recipes-devtools/qemu/files/fdt_header.patch new file mode 100644 index 00000000..dccfe531 --- /dev/null +++ b/meta-fsl-ppc/recipes-devtools/qemu/files/fdt_header.patch @@ -0,0 +1,39 @@ +Upstream-Status: Pending + +qemu: define fdt types in libfdt_env.h from qemu + + * fixes + In file included from /home/oe/setup-scripts/build/tmp-angstrom_next-uclibc/sysroots/x86_64-linux/usr/include/libfdt.h:55:0, + from /home/oe/setup-scripts/build/tmp-angstrom_next-uclibc/work/x86_64-linux/qemu-native/1.4.0-r0/qemu-1.4.0/hw/arm/../../device_tree.c:28: + /home/oe/setup-scripts/build/tmp-angstrom_next-uclibc/sysroots/x86_64-linux/usr/include/fdt.h:58:2: error: unknown type name 'fdt32_t' + /home/oe/setup-scripts/build/tmp-angstrom_next-uclibc/sysroots/x86_64-linux/usr/include/fdt.h:59:2: error: unknown type name 'fdt32_t' + /home/oe/setup-scripts/build/tmp-angstrom_next-uclibc/sysroots/x86_64-linux/usr/include/fdt.h:60:2: error: unknown type name 'fdt32_t' + /home/oe/setup-scripts/build/tmp-angstrom_next-uclibc/sysroots/x86_64-linux/usr/include/fdt.h:61:2: error: unknown type name 'fdt32_t' + /home/oe/setup-scripts/build/tmp-angstrom_next-uclibc/sysroots/x86_64-linux/usr/include/fdt.h:62:2: error: unknown type name 'fdt32_t' + /home/oe/setup-scripts/build/tmp-angstrom_next-uclibc/sysroots/x86_64-linux/usr/include/fdt.h:63:2: error: unknown type name 'fdt32_t' + /home/oe/setup-scripts/build/tmp-angstrom_next-uclibc/sysroots/x86_64-linux/usr/include/fdt.h:64:2: error: unknown type name 'fdt32_t' + /home/oe/setup-scripts/build/tmp-angstrom_next-uclibc/sysroots/x86_64-linux/usr/include/fdt.h:67:2: error: unknown type name 'fdt32_t' + /home/oe/setup-scripts/build/tmp-angstrom_next-uclibc/sysroots/x86_64-linux/usr/include/fdt.h:70:2: error: unknown type name 'fdt32_t' + /home/oe/setup-scripts/build/tmp-angstrom_next-uclibc/sysroots/x86_64-linux/usr/include/fdt.h:73:2: error: unknown type name 'fdt32_t' + /home/oe/setup-scripts/build/tmp-angstrom_next-uclibc/sysroots/x86_64-linux/usr/include/fdt.h:77:2: error: unknown type name 'fdt64_t' + /home/oe/setup-scripts/build/tmp-angstrom_next-uclibc/sysroots/x86_64-linux/usr/include/fdt.h:78:2: error: unknown type name 'fdt64_t' + /home/oe/setup-scripts/build/tmp-angstrom_next-uclibc/sysroots/x86_64-linux/usr/include/fdt.h:82:2: error: unknown type name 'fdt32_t' + /home/oe/setup-scripts/build/tmp-angstrom_next-uclibc/sysroots/x86_64-linux/usr/include/fdt.h:87:2: error: unknown type name 'fdt32_t' + /home/oe/setup-scripts/build/tmp-angstrom_next-uclibc/sysroots/x86_64-linux/usr/include/fdt.h:88:2: error: unknown type name 'fdt32_t' + /home/oe/setup-scripts/build/tmp-angstrom_next-uclibc/sysroots/x86_64-linux/usr/include/fdt.h:89:2: error: unknown type name 'fdt32_t' + +Index: qemu-1.4.0/include/libfdt_env.h +=================================================================== +--- qemu-1.4.0.orig/include/libfdt_env.h 2013-02-15 23:05:35.000000000 +0000 ++++ qemu-1.4.0/include/libfdt_env.h 2013-04-13 14:17:27.918885225 +0000 +@@ -21,6 +21,10 @@ + + #include "qemu/bswap.h" + ++typedef uint16_t fdt16_t; ++typedef uint32_t fdt32_t; ++typedef uint64_t fdt64_t; ++ + #ifdef HOST_WORDS_BIGENDIAN + #define fdt32_to_cpu(x) (x) + #define cpu_to_fdt32(x) (x) diff --git a/meta-fsl-ppc/recipes-devtools/qemu/qemu_fslgit.bb b/meta-fsl-ppc/recipes-devtools/qemu/qemu_fslgit.bb index ac40fb50..e3bb2760 100644 --- a/meta-fsl-ppc/recipes-devtools/qemu/qemu_fslgit.bb +++ b/meta-fsl-ppc/recipes-devtools/qemu/qemu_fslgit.bb @@ -9,6 +9,8 @@ PV = "1.4+fsl" SRC_URI = "git://git.freescale.com/ppc/sdk/qemu.git" SRCREV = "8713c58725df407dbbedb48fa315248d0100720c" +SRC_URI += "file://fdt_header.patch" + S = "${WORKDIR}/git" QEMU_TARGETS = "ppc" -- cgit v1.2.3-54-g00ecf From c307b7e7a6cbcb2d2d8db2dc78246d568930b735 Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Wed, 17 Jul 2013 05:51:13 -0500 Subject: perf: Remove hard coded include to /usr/local/include in Makefile Having /usr/local/include hardcoded into the makefile is not necessary as this is automatically included by GCC. It also infects cross-compile builds with the host systems includes. Signed-off-by: Zhenhua Luo --- ...-include-to-usr-local-include-in-Makefile.patch | 36 ++++++++++++++++++++++ .../recipes-kernel/linux/linux-qoriq-sdk.bb | 2 ++ 2 files changed, 38 insertions(+) create mode 100644 meta-fsl-ppc/recipes-kernel/linux/files/libtraceevent-Remove-hard-coded-include-to-usr-local-include-in-Makefile.patch diff --git a/meta-fsl-ppc/recipes-kernel/linux/files/libtraceevent-Remove-hard-coded-include-to-usr-local-include-in-Makefile.patch b/meta-fsl-ppc/recipes-kernel/linux/files/libtraceevent-Remove-hard-coded-include-to-usr-local-include-in-Makefile.patch new file mode 100644 index 00000000..15c397dc --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/linux/files/libtraceevent-Remove-hard-coded-include-to-usr-local-include-in-Makefile.patch @@ -0,0 +1,36 @@ +Upstream-Status: Backport + +From b9e8c37220c80e78289a1e87b50c09418eb59a7e Mon Sep 17 00:00:00 2001 +From: Jack Mitchell +Date: Fri, 08 Mar 2013 11:21:52 +0000 +Subject: libtraceevent: Remove hard coded include to /usr/local/include in Makefile + +having /usr/local/include hardcoded into the makefile is not necessary +as this is automatically included by GCC. It also infects cross-compile +builds with the host systems includes. + +Signed-off-by: Jack Mitchell +Acked-by: Namhyung Kim +Cc: Ingo Molnar +Cc: Paul Mackerras +Cc: Peter Zijlstra +Link: http://lkml.kernel.org/r/1362741712-21308-1-git-send-email-ml@communistcode.co.uk +Signed-off-by: Arnaldo Carvalho de Melo +--- +(limited to 'tools/lib/traceevent/Makefile') + +diff --git a/tools/lib/traceevent/Makefile b/tools/lib/traceevent/Makefile +index a20e320..0b0a907 100644 +--- a/tools/lib/traceevent/Makefile ++++ b/tools/lib/traceevent/Makefile +@@ -122,7 +122,7 @@ export Q VERBOSE + + EVENT_PARSE_VERSION = $(EP_VERSION).$(EP_PATCHLEVEL).$(EP_EXTRAVERSION) + +-INCLUDES = -I. -I/usr/local/include $(CONFIG_INCLUDES) ++INCLUDES = -I. $(CONFIG_INCLUDES) + + # Set compile option CFLAGS if not set elsewhere + CFLAGS ?= -g -Wall +-- +cgit v0.9.2 diff --git a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.bb b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.bb index 502132f5..7dd70595 100644 --- a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.bb +++ b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.bb @@ -7,6 +7,8 @@ LICENSE = "GPLv2" require recipes-kernel/linux/linux-qoriq-sdk.inc +SRC_URI += "file://libtraceevent-Remove-hard-coded-include-to-usr-local-include-in-Makefile.patch" + PR = "${INC_PR}.1" DEPENDS_append = " libgcc" -- cgit v1.2.3-54-g00ecf From a447c7093ae91f10511d4e7ab0789a180e567aa8 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Fri, 19 Jul 2013 03:21:28 +0000 Subject: qemu_fslgit: backport 2 patches to fix build with texinfo-5 (From OE-Core rev: af65260dbf17fcd47b6630db473d95f2f3225d68) Fix the below error: |./qemu-options.texi:1521: unknown command `list' |./qemu-options.texi:1521: table requires an argument: the formatter for @item |./qemu-options.texi:1521: warning: @table has text but no @item Signed-off-by: Ting Liu --- ...x-texinfo-table-markup-in-qemu-options.hx.patch | 201 +++++++++++++++++++++ ...x-generating-qemu-doc.html-with-texinfo-5.patch | 54 ++++++ meta-fsl-ppc/recipes-devtools/qemu/qemu_fslgit.bb | 6 +- 3 files changed, 260 insertions(+), 1 deletion(-) create mode 100644 meta-fsl-ppc/recipes-devtools/qemu/files/0001-doc-Fix-texinfo-table-markup-in-qemu-options.hx.patch create mode 100644 meta-fsl-ppc/recipes-devtools/qemu/files/0002-docs-Fix-generating-qemu-doc.html-with-texinfo-5.patch diff --git a/meta-fsl-ppc/recipes-devtools/qemu/files/0001-doc-Fix-texinfo-table-markup-in-qemu-options.hx.patch b/meta-fsl-ppc/recipes-devtools/qemu/files/0001-doc-Fix-texinfo-table-markup-in-qemu-options.hx.patch new file mode 100644 index 00000000..30daf29f --- /dev/null +++ b/meta-fsl-ppc/recipes-devtools/qemu/files/0001-doc-Fix-texinfo-table-markup-in-qemu-options.hx.patch @@ -0,0 +1,201 @@ +From 9a7146ca91c04d05af36684d8b3ca79c1254abc2 Mon Sep 17 00:00:00 2001 +From: Markus Armbruster +Date: Wed, 13 Feb 2013 19:49:40 +0100 +Subject: [PATCH 1/2] doc: Fix texinfo @table markup in qemu-options.hx + +End tables before headings, start new ones afterwards. Fixes +incorrect indentation of headings "File system options" and "Virtual +File system pass-through options" in manual page and qemu-doc. + +Normalize markup some to increase chances it survives future edits. + +Upstream-Status: Backport + +Signed-off-by: Martin Jansa +Signed-off-by: Markus Armbruster +Reviewed-by: Stefan Hajnoczi +Message-id: 1360781383-28635-5-git-send-email-armbru@redhat.com +Signed-off-by: Anthony Liguori +--- + qemu-options.hx | 56 +++++++++++++++++++++++++++++++++++++------------------- + 1 file changed, 37 insertions(+), 19 deletions(-) + +diff --git a/qemu-options.hx b/qemu-options.hx +index 9d7131a..54bd92a 100644 +--- a/qemu-options.hx ++++ b/qemu-options.hx +@@ -537,13 +537,15 @@ STEXI + @end table + ETEXI + +-DEF("usb", 0, QEMU_OPTION_usb, +- "-usb enable the USB driver (will be the default soon)\n", +- QEMU_ARCH_ALL) + STEXI + USB options: + @table @option ++ETEXI + ++DEF("usb", 0, QEMU_OPTION_usb, ++ "-usb enable the USB driver (will be the default soon)\n", ++ QEMU_ARCH_ALL) ++STEXI + @item -usb + @findex -usb + Enable the USB driver (will be the default soon) +@@ -610,9 +612,15 @@ possible drivers and properties, use @code{-device help} and + @code{-device @var{driver},help}. + ETEXI + ++STEXI ++@end table ++ETEXI + DEFHEADING() + + DEFHEADING(File system options:) ++STEXI ++@table @option ++ETEXI + + DEF("fsdev", HAS_ARG, QEMU_OPTION_fsdev, + "-fsdev fsdriver,id=id[,path=path,][security_model={mapped-xattr|mapped-file|passthrough|none}]\n" +@@ -676,9 +684,15 @@ Specifies the tag name to be used by the guest to mount this export point + + ETEXI + ++STEXI ++@end table ++ETEXI + DEFHEADING() + + DEFHEADING(Virtual File system pass-through options:) ++STEXI ++@table @option ++ETEXI + + DEF("virtfs", HAS_ARG, QEMU_OPTION_virtfs, + "-virtfs local,path=path,mount_tag=tag,security_model=[mapped-xattr|mapped-file|passthrough|none]\n" +@@ -769,11 +783,9 @@ ETEXI + STEXI + @end table + ETEXI +- + DEFHEADING() + + DEFHEADING(Display options:) +- + STEXI + @table @option + ETEXI +@@ -1215,7 +1227,6 @@ ETEXI + STEXI + @end table + ETEXI +- + ARCHHEADING(, QEMU_ARCH_I386) + + ARCHHEADING(i386 target only:, QEMU_ARCH_I386) +@@ -1301,10 +1312,10 @@ Specify SMBIOS type 0 fields + Specify SMBIOS type 1 fields + ETEXI + +-DEFHEADING() + STEXI + @end table + ETEXI ++DEFHEADING() + + DEFHEADING(Network options:) + STEXI +@@ -1718,13 +1729,19 @@ libpcap, so it can be analyzed with tools such as tcpdump or Wireshark. + Indicate that no network devices should be configured. It is used to + override the default configuration (@option{-net nic -net user}) which + is activated if no @option{-net} options are provided. ++ETEXI + ++STEXI + @end table + ETEXI +- + DEFHEADING() + + DEFHEADING(Character device options:) ++STEXI ++ ++The general form of a character device option is: ++@table @option ++ETEXI + + DEF("chardev", HAS_ARG, QEMU_OPTION_chardev, + "-chardev null,id=id[,mux=on|off]\n" +@@ -1766,10 +1783,6 @@ DEF("chardev", HAS_ARG, QEMU_OPTION_chardev, + ) + + STEXI +- +-The general form of a character device option is: +-@table @option +- + @item -chardev @var{backend} ,id=@var{id} [,mux=on|off] [,@var{options}] + @findex -chardev + Backend is one of: +@@ -1990,14 +2003,15 @@ Connect to a spice virtual machine channel, such as vdiport. + + Connect to a spice port, allowing a Spice client to handle the traffic + identified by a name (preferably a fqdn). ++ETEXI + ++STEXI + @end table + ETEXI +- + DEFHEADING() + +-STEXI + DEFHEADING(Device URL Syntax:) ++STEXI + + In addition to using normal file images for the emulated storage devices, + QEMU can also use networked resources such as iSCSI devices. These are +@@ -2113,10 +2127,16 @@ qemu-system-x86_84 --drive file=gluster://192.0.2.1/testvol/a.img + @end example + + See also @url{http://www.gluster.org}. ++ETEXI ++ ++STEXI + @end table + ETEXI + + DEFHEADING(Bluetooth(R) options:) ++STEXI ++@table @option ++ETEXI + + DEF("bt", HAS_ARG, QEMU_OPTION_bt, \ + "-bt hci,null dumb bluetooth HCI - doesn't respond to commands\n" \ +@@ -2130,8 +2150,6 @@ DEF("bt", HAS_ARG, QEMU_OPTION_bt, \ + " emulate a bluetooth device 'dev' in scatternet 'n'\n", + QEMU_ARCH_ALL) + STEXI +-@table @option +- + @item -bt hci[...] + @findex -bt + Defines the function of the corresponding Bluetooth HCI. -bt options +@@ -2183,9 +2201,11 @@ currently: + @item keyboard + Virtual wireless keyboard implementing the HIDP bluetooth profile. + @end table +-@end table + ETEXI + ++STEXI ++@end table ++ETEXI + DEFHEADING() + + DEFHEADING(Linux/Multiboot boot specific:) +-- +1.8.1.5 + diff --git a/meta-fsl-ppc/recipes-devtools/qemu/files/0002-docs-Fix-generating-qemu-doc.html-with-texinfo-5.patch b/meta-fsl-ppc/recipes-devtools/qemu/files/0002-docs-Fix-generating-qemu-doc.html-with-texinfo-5.patch new file mode 100644 index 00000000..cabbf0ea --- /dev/null +++ b/meta-fsl-ppc/recipes-devtools/qemu/files/0002-docs-Fix-generating-qemu-doc.html-with-texinfo-5.patch @@ -0,0 +1,54 @@ +From f983d4978e1c49ee936ad52bf2de0c531420f5f8 Mon Sep 17 00:00:00 2001 +From: Cole Robinson +Date: Wed, 20 Feb 2013 07:20:31 +0000 +Subject: [PATCH 2/2] docs: Fix generating qemu-doc.html with texinfo 5 + +LC_ALL=C makeinfo --no-headers --no-split --number-sections --html qemu-doc.texi -o qemu-doc.html +./qemu-options.texi:1521: unknown command `list' +./qemu-options.texi:1521: table requires an argument: the formatter for @item +./qemu-options.texi:1521: warning: @table has text but no @item + +Upstream-Status: Pending +http://patchwork.ozlabs.org/patch/222131/ + +CC: qemu-stable@nongnu.org +Signed-off-by: Cole Robinson +Signed-off-by: Martin Jansa +Reviewed-by: Markus Armbruster +--- + qemu-options.hx | 19 +++++++------------ + 1 file changed, 7 insertions(+), 12 deletions(-) + +diff --git a/qemu-options.hx b/qemu-options.hx +index 54bd92a..5d2d9b8 100644 +--- a/qemu-options.hx ++++ b/qemu-options.hx +@@ -2089,18 +2089,13 @@ QEMU supports using either local sheepdog devices or remote networked + devices. + + Syntax for specifying a sheepdog device +-@table @list +-``sheepdog:'' +- +-``sheepdog::'' +- +-``sheepdog::'' +- +-``sheepdog:::'' +- +-``sheepdog::::'' +- +-``sheepdog::::'' ++@table @code ++@item sheepdog: ++@item sheepdog:: ++@item sheepdog:: ++@item sheepdog::: ++@item sheepdog:::: ++@item sheepdog:::: + @end table + + Example +-- +1.8.1.5 + diff --git a/meta-fsl-ppc/recipes-devtools/qemu/qemu_fslgit.bb b/meta-fsl-ppc/recipes-devtools/qemu/qemu_fslgit.bb index e3bb2760..921bf2fb 100644 --- a/meta-fsl-ppc/recipes-devtools/qemu/qemu_fslgit.bb +++ b/meta-fsl-ppc/recipes-devtools/qemu/qemu_fslgit.bb @@ -9,7 +9,11 @@ PV = "1.4+fsl" SRC_URI = "git://git.freescale.com/ppc/sdk/qemu.git" SRCREV = "8713c58725df407dbbedb48fa315248d0100720c" -SRC_URI += "file://fdt_header.patch" +SRC_URI += " \ + file://0001-doc-Fix-texinfo-table-markup-in-qemu-options.hx.patch \ + file://0002-docs-Fix-generating-qemu-doc.html-with-texinfo-5.patch \ + file://fdt_header.patch \ +" S = "${WORKDIR}/git" -- cgit v1.2.3-54-g00ecf From 560f137437c6e56d92b63ccc9b6eb946d8f3c66a Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Thu, 25 Jul 2013 06:26:27 +0000 Subject: add license file for TestFloat Signed-off-by: Ting Liu --- meta-fsl-ppc/custom-licenses/TestFloat | 24 ++++++++++++++++++++++ .../recipes-extended/testfloat/testfloat_2a.bb | 3 +-- 2 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 meta-fsl-ppc/custom-licenses/TestFloat diff --git a/meta-fsl-ppc/custom-licenses/TestFloat b/meta-fsl-ppc/custom-licenses/TestFloat new file mode 100644 index 00000000..1a1a23fe --- /dev/null +++ b/meta-fsl-ppc/custom-licenses/TestFloat @@ -0,0 +1,24 @@ +Written by John R. Hauser. This work was made possible in part by the +International Computer Science Institute, located at Suite 600, 1947 Center +Street, Berkeley, California 94704. Funding was partially provided by the +National Science Foundation under grant MIP-9311980. The original version +of this code was written as part of a project to build a fixed-point vector +processor in collaboration with the University of California at Berkeley, +overseen by Profs. Nelson Morgan and John Wawrzynek. More information +is available through the Web page `http://www.cs.berkeley.edu/~jhauser/ +arithmetic/SoftFloat.html'. + +THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort has +been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT TIMES +RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO PERSONS +AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ALL LOSSES, +COSTS, OR OTHER PROBLEMS THEY INCUR DUE TO THE SOFTWARE, AND WHO FURTHERMORE +EFFECTIVELY INDEMNIFY JOHN HAUSER AND THE INTERNATIONAL COMPUTER SCIENCE +INSTITUTE (possibly via similar legal warning) AGAINST ALL LOSSES, COSTS, OR +OTHER PROBLEMS INCURRED BY THEIR CUSTOMERS AND CLIENTS DUE TO THE SOFTWARE. + +Derivative works are acceptable, even for commercial purposes, so long as +(1) the source code for the derivative work includes prominent notice that +the work is derivative, and (2) the source code includes prominent notice with +these four paragraphs for those parts of this code that are retained. + diff --git a/meta-fsl-ppc/recipes-extended/testfloat/testfloat_2a.bb b/meta-fsl-ppc/recipes-extended/testfloat/testfloat_2a.bb index 3fbb2070..fb89e263 100644 --- a/meta-fsl-ppc/recipes-extended/testfloat/testfloat_2a.bb +++ b/meta-fsl-ppc/recipes-extended/testfloat/testfloat_2a.bb @@ -1,6 +1,5 @@ DESCRIPTION = "A program for testing floating-point implementation" -SECTION = "test" -LICENSE = "Hauser TestFloat" +LICENSE = "TestFloat" LIC_FILES_CHKSUM = "file://testfloat/testfloat.txt;beginline=87;endline=95;md5=bdb2e8111838a48015c29bd97f5b6145" -- cgit v1.2.3-54-g00ecf From 3b6efdad9e033414f84da8757ae2c41785ed8e53 Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Mon, 19 Aug 2013 09:16:55 +0000 Subject: coreutils: fix the segfault issue of dd on e500v2 targets Since double-float is disabled for e500v2 targets build due to ICE of gcc-4.8.1, accordingly %Ld format of sprintf is disabled. Address Bug 4910 - [p1022ds]urandom: segmentation fault Signed-off-by: Zhenhua Luo --- .../recipes-core/coreutils/coreutils_8.21.bbappend | 4 +++ .../coreutils-fix-dd-segfault-for-e500v2.patch | 37 ++++++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 meta-fsl-ppc/recipes-core/coreutils/coreutils_8.21.bbappend create mode 100644 meta-fsl-ppc/recipes-core/coreutils/files/coreutils-fix-dd-segfault-for-e500v2.patch diff --git a/meta-fsl-ppc/recipes-core/coreutils/coreutils_8.21.bbappend b/meta-fsl-ppc/recipes-core/coreutils/coreutils_8.21.bbappend new file mode 100644 index 00000000..37d3ce26 --- /dev/null +++ b/meta-fsl-ppc/recipes-core/coreutils/coreutils_8.21.bbappend @@ -0,0 +1,4 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/files:" + +SRC_URI_append_e500v2 = " file://coreutils-fix-dd-segfault-for-e500v2.patch \ +" diff --git a/meta-fsl-ppc/recipes-core/coreutils/files/coreutils-fix-dd-segfault-for-e500v2.patch b/meta-fsl-ppc/recipes-core/coreutils/files/coreutils-fix-dd-segfault-for-e500v2.patch new file mode 100644 index 00000000..dbeb9b2c --- /dev/null +++ b/meta-fsl-ppc/recipes-core/coreutils/files/coreutils-fix-dd-segfault-for-e500v2.patch @@ -0,0 +1,37 @@ +Upstream-Status: Pending + +Fix the segmentation fault issue when using dd on e500v2 targets, +use %f instead of $Lf, since single-float is used for e500v2 due to +an ICE of gcc-4.8.1. + +Signed-off-by: Zhenhua Luo + +--- coreutils-8.21/lib/human.c.orig 2013-08-16 05:17:24.466225177 -0500 ++++ coreutils-8.21/lib/human.c 2013-08-16 05:17:52.007225123 -0500 +@@ -228,7 +228,7 @@ + + if (! (opts & human_autoscale)) + { +- sprintf (buf, "%.0Lf", adjust_value (inexact_style, damt)); ++ sprintf (buf, "%.0f", adjust_value (inexact_style, damt)); + buflen = strlen (buf); + nonintegerlen = 0; + } +@@ -246,7 +246,7 @@ + + damt /= e; + +- sprintf (buf, "%.1Lf", adjust_value (inexact_style, damt)); ++ sprintf (buf, "%.1f", adjust_value (inexact_style, damt)); + buflen = strlen (buf); + nonintegerlen = decimal_pointlen + 1; + +@@ -254,7 +254,7 @@ + || ((opts & human_suppress_point_zero) + && buf[buflen - 1] == '0')) + { +- sprintf (buf, "%.0Lf", ++ sprintf (buf, "%.0f", + adjust_value (inexact_style, damt * 10) / 10); + buflen = strlen (buf); + nonintegerlen = 0; -- cgit v1.2.3-54-g00ecf From 096e096c5bea6eb9348ee117d7862fcbae334e61 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Tue, 20 Aug 2013 07:14:19 +0000 Subject: rework machines to use dtb file in KERNEL_DEVICETREE variable The linux-dtb.inc has been rework to use the Linux kernel build system to generate the DeviceTree binaries so now KERNEL_DEVICETREE variable should has the /target/ name, not the file path. Signed-off-by: Ting Liu --- meta-fsl-ppc/conf/machine/b4420qds-64b.conf | 2 +- meta-fsl-ppc/conf/machine/b4420qds.conf | 2 +- meta-fsl-ppc/conf/machine/b4860qds-64b.conf | 3 +-- meta-fsl-ppc/conf/machine/b4860qds.conf | 3 +-- meta-fsl-ppc/conf/machine/bsc9131rdb.conf | 2 +- meta-fsl-ppc/conf/machine/bsc9132qds.conf | 2 +- meta-fsl-ppc/conf/machine/p1010rdb.conf | 2 +- meta-fsl-ppc/conf/machine/p1020rdb.conf | 2 +- meta-fsl-ppc/conf/machine/p1021rdb.conf | 2 +- meta-fsl-ppc/conf/machine/p1022ds.conf | 2 +- meta-fsl-ppc/conf/machine/p1023rdb.conf | 2 +- meta-fsl-ppc/conf/machine/p1025twr.conf | 2 +- meta-fsl-ppc/conf/machine/p2020ds.conf | 2 +- meta-fsl-ppc/conf/machine/p2020rdb.conf | 2 +- meta-fsl-ppc/conf/machine/p2041rdb.conf | 3 +-- meta-fsl-ppc/conf/machine/p3041ds.conf | 3 +-- meta-fsl-ppc/conf/machine/p4080ds.conf | 3 +-- meta-fsl-ppc/conf/machine/p5020ds-64b.conf | 3 +-- meta-fsl-ppc/conf/machine/p5020ds.conf | 3 +-- meta-fsl-ppc/conf/machine/p5040ds-64b.conf | 3 +-- meta-fsl-ppc/conf/machine/p5040ds.conf | 3 +-- meta-fsl-ppc/conf/machine/t4160qds-64b.conf | 3 +-- meta-fsl-ppc/conf/machine/t4160qds.conf | 3 +-- meta-fsl-ppc/conf/machine/t4240qds-64b.conf | 3 +-- meta-fsl-ppc/conf/machine/t4240qds.conf | 3 +-- 25 files changed, 25 insertions(+), 38 deletions(-) diff --git a/meta-fsl-ppc/conf/machine/b4420qds-64b.conf b/meta-fsl-ppc/conf/machine/b4420qds-64b.conf index 8ab1d292..9b4973e5 100644 --- a/meta-fsl-ppc/conf/machine/b4420qds-64b.conf +++ b/meta-fsl-ppc/conf/machine/b4420qds-64b.conf @@ -8,7 +8,7 @@ SOC_FAMILY = "b4420" # TODO: fix 32bit build of u-boot UBOOT_MACHINES ?= "B4420QDS" -KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/b4420qds.dts" +KERNEL_DEVICETREE = "b4420qds.dtb" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/85xx/e6500rev1_defconfig" JFFS2_ERASEBLOCK = "0x10000" diff --git a/meta-fsl-ppc/conf/machine/b4420qds.conf b/meta-fsl-ppc/conf/machine/b4420qds.conf index fe1a44ef..ef8f9771 100644 --- a/meta-fsl-ppc/conf/machine/b4420qds.conf +++ b/meta-fsl-ppc/conf/machine/b4420qds.conf @@ -6,7 +6,7 @@ require conf/machine/include/soc-family.inc SOC_FAMILY = "b4420" UBOOT_MACHINES ?= "B4420QDS" -KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/b4420qds.dts" +KERNEL_DEVICETREE = "b4420qds.dtb" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/85xx/e6500rev1_defconfig" JFFS2_ERASEBLOCK = "0x10000" diff --git a/meta-fsl-ppc/conf/machine/b4860qds-64b.conf b/meta-fsl-ppc/conf/machine/b4860qds-64b.conf index 7cd18f9e..06268efb 100644 --- a/meta-fsl-ppc/conf/machine/b4860qds-64b.conf +++ b/meta-fsl-ppc/conf/machine/b4860qds-64b.conf @@ -7,8 +7,7 @@ require conf/machine/include/soc-family.inc SOC_FAMILY = "b4860" # TODO: fix 32bit build of u-boot UBOOT_MACHINES ?= "B4860QDS" -KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/b4860qds.dts \ - ${S}/arch/powerpc/boot/dts/b4860qds-usdpaa.dts" +KERNEL_DEVICETREE = "b4860qds.dtb b4860qds-usdpaa.dtb" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/85xx/e6500rev1_defconfig" JFFS2_ERASEBLOCK = "0x10000" diff --git a/meta-fsl-ppc/conf/machine/b4860qds.conf b/meta-fsl-ppc/conf/machine/b4860qds.conf index 1143a657..6ca29e38 100644 --- a/meta-fsl-ppc/conf/machine/b4860qds.conf +++ b/meta-fsl-ppc/conf/machine/b4860qds.conf @@ -6,8 +6,7 @@ require conf/machine/include/soc-family.inc SOC_FAMILY = "b4860" UBOOT_MACHINES ?= "B4860QDS" -KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/b4860qds.dts \ - ${S}/arch/powerpc/boot/dts/b4860qds-usdpaa.dts" +KERNEL_DEVICETREE = "b4860qds.dtb b4860qds-usdpaa.dtb" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/85xx/e6500rev1_defconfig" JFFS2_ERASEBLOCK = "0x10000" diff --git a/meta-fsl-ppc/conf/machine/bsc9131rdb.conf b/meta-fsl-ppc/conf/machine/bsc9131rdb.conf index 39a73e59..766d5d22 100644 --- a/meta-fsl-ppc/conf/machine/bsc9131rdb.conf +++ b/meta-fsl-ppc/conf/machine/bsc9131rdb.conf @@ -6,7 +6,7 @@ require conf/machine/include/soc-family.inc SOC_FAMILY = "bsc9131" UBOOT_MACHINES ?= "BSC9131RDB_SPIFLASH BSC9131RDB_NAND BSC9131RDB_NAND_SYSCLK100 BSC9131RDB_SPIFLASH_SYSCLK100" -KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/bsc9131rdb.dts" +KERNEL_DEVICETREE = "bsc9131rdb.dtb" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/85xx/bsc913x_defconfig" JFFS2_ERASEBLOCK = "0x10000" diff --git a/meta-fsl-ppc/conf/machine/bsc9132qds.conf b/meta-fsl-ppc/conf/machine/bsc9132qds.conf index 90131a97..9baa49b5 100644 --- a/meta-fsl-ppc/conf/machine/bsc9132qds.conf +++ b/meta-fsl-ppc/conf/machine/bsc9132qds.conf @@ -6,7 +6,7 @@ require conf/machine/include/soc-family.inc SOC_FAMILY = "bsc9132" UBOOT_MACHINES ?= " BSC9132QDS_NAND_DDRCLK133 BSC9132QDS_NAND_DDRCLK100 BSC9132QDS_NOR_DDRCLK100 BSC9132QDS_NOR_DDRCLK133 BSC9132QDS_SDCARD_DDRCLK100 BSC9132QDS_SDCARD_DDRCLK133 BSC9132QDS_SPIFLASH_DDRCLK100 BSC9132QDS_SPIFLASH_DDRCLK133" -KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/bsc9132qds.dts" +KERNEL_DEVICETREE = "bsc9132qds.dtb" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/85xx/bsc913x_smp_defconfig" JFFS2_ERASEBLOCK = "0x10000" diff --git a/meta-fsl-ppc/conf/machine/p1010rdb.conf b/meta-fsl-ppc/conf/machine/p1010rdb.conf index ccc5053c..2ee53fce 100644 --- a/meta-fsl-ppc/conf/machine/p1010rdb.conf +++ b/meta-fsl-ppc/conf/machine/p1010rdb.conf @@ -7,7 +7,7 @@ require conf/machine/include/soc-family.inc SOC_FAMILY = "p1010" UBOOT_MACHINES ?= "P1010RDB_NAND P1010RDB_NOR" -KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p1010rdb.dts" +KERNEL_DEVICETREE = "p1010rdb.dtb" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_defconfig" JFFS2_ERASEBLOCK = "0x20000" diff --git a/meta-fsl-ppc/conf/machine/p1020rdb.conf b/meta-fsl-ppc/conf/machine/p1020rdb.conf index b17213c0..ced2d375 100644 --- a/meta-fsl-ppc/conf/machine/p1020rdb.conf +++ b/meta-fsl-ppc/conf/machine/p1020rdb.conf @@ -8,7 +8,7 @@ SOC_FAMILY = "p1020" BOOTFORMAT_CONFIG = "config_ddr3_1gb_p1_p2_rdb_pc_800M.dat" UBOOT_MACHINES ?= " P1020RDB-PD P1020RDB-PD_NAND P1020RDB-PD_SDCARD P1020RDB-PD_SPIFLASH" -KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p1020rdb-pd_32b.dts" +KERNEL_DEVICETREE = "p1020rdb-pd_32b.dtb" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" diff --git a/meta-fsl-ppc/conf/machine/p1021rdb.conf b/meta-fsl-ppc/conf/machine/p1021rdb.conf index c1657a41..2e62adb6 100644 --- a/meta-fsl-ppc/conf/machine/p1021rdb.conf +++ b/meta-fsl-ppc/conf/machine/p1021rdb.conf @@ -8,7 +8,7 @@ require conf/machine/include/soc-family.inc SOC_FAMILY = "p1021" BOOTFORMAT_CONFIG = "config_ddr3_1gb_p1_p2_rdb_pc_800M.dat" UBOOT_MACHINES ?= "P1021RDB-PC P1021RDB-PC_NAND P1021RDB-PC_SDCARD P1021RDB-PC_SPIFLASH P1021RDB-PC_36BIT P1021RDB-PC_36BIT_SPIFLASH P1021RDB-PC_36BIT_NAND P1021RDB-PC_36BIT_SDCARD" -KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p1021rdb-pc_32b.dts" +KERNEL_DEVICETREE = "p1021rdb-pc_32b.dtb" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" JFFS2_ERASEBLOCK = "0x20000" diff --git a/meta-fsl-ppc/conf/machine/p1022ds.conf b/meta-fsl-ppc/conf/machine/p1022ds.conf index f604ea1f..624353fb 100644 --- a/meta-fsl-ppc/conf/machine/p1022ds.conf +++ b/meta-fsl-ppc/conf/machine/p1022ds.conf @@ -7,7 +7,7 @@ require conf/machine/include/soc-family.inc SOC_FAMILY = "p1022" BOOTFORMAT_CONFIG = "config_ddr3_2gb_p1022ds.dat" UBOOT_MACHINES ?= "P1022DS P1022DS_NAND P1022DS_SPIFLASH P1022DS_SDCARD P1022DS_36BIT P1022DS_36BIT_SPIFLASH P1022DS_36BIT_NAND P1022DS_36BIT_SDCARD" -KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p1022ds_32b.dts" +KERNEL_DEVICETREE = "p1022ds_32b.dtb" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xorg" diff --git a/meta-fsl-ppc/conf/machine/p1023rdb.conf b/meta-fsl-ppc/conf/machine/p1023rdb.conf index e591e094..3422cbfd 100644 --- a/meta-fsl-ppc/conf/machine/p1023rdb.conf +++ b/meta-fsl-ppc/conf/machine/p1023rdb.conf @@ -6,7 +6,7 @@ require conf/machine/include/soc-family.inc SOC_FAMILY = "p1023" UBOOT_MACHINES ?= "P1023RDB" -KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p1023rdb.dts" +KERNEL_DEVICETREE = "p1023rdb.dtb" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/85xx/p1023rds_defconfig" JFFS2_ERASEBLOCK = "0x10000" diff --git a/meta-fsl-ppc/conf/machine/p1025twr.conf b/meta-fsl-ppc/conf/machine/p1025twr.conf index d1d1db0d..286ec693 100644 --- a/meta-fsl-ppc/conf/machine/p1025twr.conf +++ b/meta-fsl-ppc/conf/machine/p1025twr.conf @@ -8,7 +8,7 @@ require conf/machine/include/soc-family.inc SOC_FAMILY = "p1025" BOOTFORMAT_CONFIG = "config_ddr3_1gb_p1_p2_rdb_pc_667M.dat" UBOOT_MACHINES ?= "TWR-P1025" -KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p1025twr_32b.dts" +KERNEL_DEVICETREE = "p1025twr_32b.dtb" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" JFFS2_ERASEBLOCK = "0x20000" diff --git a/meta-fsl-ppc/conf/machine/p2020ds.conf b/meta-fsl-ppc/conf/machine/p2020ds.conf index 9ca16174..a69e62cd 100644 --- a/meta-fsl-ppc/conf/machine/p2020ds.conf +++ b/meta-fsl-ppc/conf/machine/p2020ds.conf @@ -7,7 +7,7 @@ require conf/machine/include/soc-family.inc SOC_FAMILY = "p2020" BOOTFORMAT_CONFIG = "config_sram_p2020ds.dat" UBOOT_MACHINES ?= "P2020DS P2020DS_36BIT P2020DS_DDR2 P2020DS_SDCARD P2020DS_SPIFLASH" -KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p2020ds.dts" +KERNEL_DEVICETREE = "p2020ds.dtb" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" JFFS2_ERASEBLOCK = "0x20000" diff --git a/meta-fsl-ppc/conf/machine/p2020rdb.conf b/meta-fsl-ppc/conf/machine/p2020rdb.conf index b703b9f5..b9d95903 100644 --- a/meta-fsl-ppc/conf/machine/p2020rdb.conf +++ b/meta-fsl-ppc/conf/machine/p2020rdb.conf @@ -8,7 +8,7 @@ require conf/machine/include/soc-family.inc SOC_FAMILY = "p2020" BOOTFORMAT_CONFIG = "config_ddr3_1gb_64bit_p2020rdb_pc.dat" UBOOT_MACHINES ?= " P2020RDB-PC P2020RDB-PC_NAND P2020RDB-PC_SDCARD P2020RDB-PC_SPIFLASH P2020RDB-PC_36BIT P2020RDB-PC_36BIT_SPIFLASH P2020RDB-PC_36BIT_NAND P2020RDB-PC_36BIT_SDCARD" -KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p2020rdb-pc_32b.dts" +KERNEL_DEVICETREE = "p2020rdb-pc_32b.dtb" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" JFFS2_ERASEBLOCK = "0x20000" diff --git a/meta-fsl-ppc/conf/machine/p2041rdb.conf b/meta-fsl-ppc/conf/machine/p2041rdb.conf index 2f96ce6b..bc6764f8 100644 --- a/meta-fsl-ppc/conf/machine/p2041rdb.conf +++ b/meta-fsl-ppc/conf/machine/p2041rdb.conf @@ -6,8 +6,7 @@ require conf/machine/include/soc-family.inc SOC_FAMILY = "p2041" UBOOT_MACHINES ?= "P2041RDB P2041RDB_NAND P2041RDB_SECURE_BOOT P2041RDB_SDCARD P2041RDB_SPIFLASH" -KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p2041rdb.dts \ - ${S}/arch/powerpc/boot/dts/p2041rdb-usdpaa.dts" +KERNEL_DEVICETREE = "p2041rdb.dtb p2041rdb-usdpaa.dtb" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet32_smp_defconfig" JFFS2_ERASEBLOCK = "0x10000" diff --git a/meta-fsl-ppc/conf/machine/p3041ds.conf b/meta-fsl-ppc/conf/machine/p3041ds.conf index 6fb80e14..ced95906 100644 --- a/meta-fsl-ppc/conf/machine/p3041ds.conf +++ b/meta-fsl-ppc/conf/machine/p3041ds.conf @@ -6,8 +6,7 @@ require conf/machine/include/soc-family.inc SOC_FAMILY = "p3041" UBOOT_MACHINES ?= "P3041DS P3041DS_NAND P3041DS_SECURE_BOOT P3041DS_SDCARD P3041DS_SPIFLASH" -KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p3041ds.dts \ - ${S}/arch/powerpc/boot/dts/p3041ds-usdpaa.dts" +KERNEL_DEVICETREE = "p3041ds.dtb p3041ds-usdpaa.dtb" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet32_smp_defconfig" JFFS2_ERASEBLOCK = "0x10000" diff --git a/meta-fsl-ppc/conf/machine/p4080ds.conf b/meta-fsl-ppc/conf/machine/p4080ds.conf index daa929a1..6f4a89e1 100644 --- a/meta-fsl-ppc/conf/machine/p4080ds.conf +++ b/meta-fsl-ppc/conf/machine/p4080ds.conf @@ -6,8 +6,7 @@ require conf/machine/include/soc-family.inc SOC_FAMILY = "p4080" UBOOT_MACHINES ?= "P4080DS P4080DS_SECURE_BOOT P4080DS_SDCARD P4080DS_SPIFLASH " -KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p4080ds.dts \ - ${S}/arch/powerpc/boot/dts/p4080ds-usdpaa.dts" +KERNEL_DEVICETREE = "p4080ds.dtb p4080ds-usdpaa.dtb" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet32_smp_defconfig" JFFS2_ERASEBLOCK = "0x10000" diff --git a/meta-fsl-ppc/conf/machine/p5020ds-64b.conf b/meta-fsl-ppc/conf/machine/p5020ds-64b.conf index e67ad1ed..968deaa7 100644 --- a/meta-fsl-ppc/conf/machine/p5020ds-64b.conf +++ b/meta-fsl-ppc/conf/machine/p5020ds-64b.conf @@ -7,8 +7,7 @@ require conf/machine/include/soc-family.inc SOC_FAMILY = "p5020" # TODO: fix 32bit build of u-boot for p5020ds-64b UBOOT_MACHINES ?= "P5020DS" -KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p5020ds.dts \ - ${S}/arch/powerpc/boot/dts/p5020ds-usdpaa.dts" +KERNEL_DEVICETREE = "p5020ds.dtb p5020ds-usdpaa.dtb" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet64_smp_defconfig" JFFS2_ERASEBLOCK = "0x10000" diff --git a/meta-fsl-ppc/conf/machine/p5020ds.conf b/meta-fsl-ppc/conf/machine/p5020ds.conf index d4ce3d39..1a4055a0 100644 --- a/meta-fsl-ppc/conf/machine/p5020ds.conf +++ b/meta-fsl-ppc/conf/machine/p5020ds.conf @@ -6,8 +6,7 @@ require conf/machine/include/soc-family.inc SOC_FAMILY = "p5020" UBOOT_MACHINES ?= "P5020DS P5020DS_NAND P5020DS_SECURE_BOOT P5020DS_SDCARD P5020DS_SPIFLASH " -KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p5020ds.dts \ - ${S}/arch/powerpc/boot/dts/p5020ds-usdpaa.dts" +KERNEL_DEVICETREE = "p5020ds.dtb p5020ds-usdpaa.dtb" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet32_smp_defconfig" JFFS2_ERASEBLOCK = "0x10000" diff --git a/meta-fsl-ppc/conf/machine/p5040ds-64b.conf b/meta-fsl-ppc/conf/machine/p5040ds-64b.conf index 2a885b7c..4fdc3d6e 100644 --- a/meta-fsl-ppc/conf/machine/p5040ds-64b.conf +++ b/meta-fsl-ppc/conf/machine/p5040ds-64b.conf @@ -6,8 +6,7 @@ require conf/machine/include/soc-family.inc SOC_FAMILY = "p5040" UBOOT_MACHINES ?= "P5040DS P5040DS_NAND P5040DS_SECURE_BOOT P5040DS_SDCARD P5040DS_SPIFLASH" -KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p5040ds.dts \ - ${S}/arch/powerpc/boot/dts/p5040ds-usdpaa.dts" +KERNEL_DEVICETREE = "p5040ds.dtb p5040ds-usdpaa.dtb" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet64_smp_defconfig" JFFS2_ERASEBLOCK = "0x10000" diff --git a/meta-fsl-ppc/conf/machine/p5040ds.conf b/meta-fsl-ppc/conf/machine/p5040ds.conf index c7d253ff..53a3f095 100644 --- a/meta-fsl-ppc/conf/machine/p5040ds.conf +++ b/meta-fsl-ppc/conf/machine/p5040ds.conf @@ -6,8 +6,7 @@ require conf/machine/include/soc-family.inc SOC_FAMILY = "p5040" UBOOT_MACHINES ?= "P5040DS P5040DS_NAND P5040DS_SECURE_BOOT P5040DS_SDCARD P5040DS_SPIFLASH" -KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/p5040ds.dts \ - ${S}/arch/powerpc/boot/dts/p5040ds-usdpaa.dts" +KERNEL_DEVICETREE = "p5040ds.dtb p5040ds-usdpaa.dtb" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet32_smp_defconfig" JFFS2_ERASEBLOCK = "0x10000" diff --git a/meta-fsl-ppc/conf/machine/t4160qds-64b.conf b/meta-fsl-ppc/conf/machine/t4160qds-64b.conf index e8d4475a..af07526b 100644 --- a/meta-fsl-ppc/conf/machine/t4160qds-64b.conf +++ b/meta-fsl-ppc/conf/machine/t4160qds-64b.conf @@ -7,8 +7,7 @@ require conf/machine/include/soc-family.inc SOC_FAMILY = "t4160" # TODO: fix 32bit build of u-boot UBOOT_MACHINES ?= "T4160QDS" -KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/t4240qds.dts \ - ${S}/arch/powerpc/boot/dts/t4240qds-usdpaa.dts" +KERNEL_DEVICETREE = "t4240qds.dtb t4240qds-usdpaa.dtb" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/85xx/e6500rev1_defconfig" JFFS2_ERASEBLOCK = "0x10000" diff --git a/meta-fsl-ppc/conf/machine/t4160qds.conf b/meta-fsl-ppc/conf/machine/t4160qds.conf index 71b4efb7..150bbcd3 100644 --- a/meta-fsl-ppc/conf/machine/t4160qds.conf +++ b/meta-fsl-ppc/conf/machine/t4160qds.conf @@ -6,8 +6,7 @@ require conf/machine/include/soc-family.inc SOC_FAMILY = "t4160" UBOOT_MACHINES ?= "T4160QDS" -KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/t4240qds.dts \ - ${S}/arch/powerpc/boot/dts/t4240qds-usdpaa.dts" +KERNEL_DEVICETREE = "t4240qds.dtb t4240qds-usdpaa.dtb" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/85xx/e6500rev1_defconfig" JFFS2_ERASEBLOCK = "0x10000" diff --git a/meta-fsl-ppc/conf/machine/t4240qds-64b.conf b/meta-fsl-ppc/conf/machine/t4240qds-64b.conf index 31345b1e..24a53dda 100644 --- a/meta-fsl-ppc/conf/machine/t4240qds-64b.conf +++ b/meta-fsl-ppc/conf/machine/t4240qds-64b.conf @@ -7,8 +7,7 @@ require conf/machine/include/soc-family.inc SOC_FAMILY = "t4240" # TODO: fix 32bit build of u-boot UBOOT_MACHINES ?= "T4240QDS" -KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/t4240qds.dts \ - ${S}/arch/powerpc/boot/dts/t4240qds-usdpaa.dts" +KERNEL_DEVICETREE = "t4240qds.dtb t4240qds-usdpaa.dtb" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/85xx/e6500rev1_defconfig" JFFS2_ERASEBLOCK = "0x10000" diff --git a/meta-fsl-ppc/conf/machine/t4240qds.conf b/meta-fsl-ppc/conf/machine/t4240qds.conf index a348fe1d..8066e284 100644 --- a/meta-fsl-ppc/conf/machine/t4240qds.conf +++ b/meta-fsl-ppc/conf/machine/t4240qds.conf @@ -6,8 +6,7 @@ require conf/machine/include/soc-family.inc SOC_FAMILY = "t4240" UBOOT_MACHINES ?= "T4240QDS" -KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/t4240qds.dts \ - ${S}/arch/powerpc/boot/dts/t4240qds-usdpaa.dts" +KERNEL_DEVICETREE = "t4240qds.dtb t4240qds-usdpaa.dtb" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/85xx/e6500rev1_defconfig" JFFS2_ERASEBLOCK = "0x10000" -- cgit v1.2.3-54-g00ecf From 0eb052b1852c4c4c83cdf56ec0c0d868ccfdfcd8 Mon Sep 17 00:00:00 2001 From: chunrong guo Date: Wed, 28 Aug 2013 09:29:43 +0000 Subject: Revert "e500v2: workaround for ICE of gcc-4.8.x" *This reverts commit 93c57323edc118eb8905980348ad3888664f2382 and commit efd344473c277eab8c1bae56120779983aba6176 *The reason for reverting this is: the below patch fix this problem. the patch url is : http://patches.openembedded.org/patch/56803/ Signed-off-by: Chunrong Guo --- meta-fsl-ppc/conf/machine/e500v2.inc | 6 ---- .../recipes-core/coreutils/coreutils_8.21.bbappend | 4 --- .../coreutils-fix-dd-segfault-for-e500v2.patch | 37 ---------------------- 3 files changed, 47 deletions(-) delete mode 100644 meta-fsl-ppc/recipes-core/coreutils/coreutils_8.21.bbappend delete mode 100644 meta-fsl-ppc/recipes-core/coreutils/files/coreutils-fix-dd-segfault-for-e500v2.patch diff --git a/meta-fsl-ppc/conf/machine/e500v2.inc b/meta-fsl-ppc/conf/machine/e500v2.inc index aabca6e2..96887845 100644 --- a/meta-fsl-ppc/conf/machine/e500v2.inc +++ b/meta-fsl-ppc/conf/machine/e500v2.inc @@ -3,12 +3,6 @@ require conf/machine/include/tune-ppce500v2.inc MACHINE_FEATURES = "kernel26 pci ext2 ext3 serial" MACHINE_EXTRA_RRECOMMENDS = "u-boot udev-extraconf" -# FIXME -# Workaround for ICE of gcc-4.8.x when passing -mfloat-gprs=double -# Bug: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57717#c1 -# Replace double-float with single-float, revert the commit when above bug is fixed -TUNE_CCARGS := "${@d.getVar('TUNE_CCARGS', True).replace('-mfloat-gprs=double', '-mfloat-gprs=single')}" - PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" PREFERRED_VERSION_virtual/kernel ?= "3.0.34" PREFERRED_PROVIDER_linux-libc-headers ?= "linux-qoriq-sdk-headers" diff --git a/meta-fsl-ppc/recipes-core/coreutils/coreutils_8.21.bbappend b/meta-fsl-ppc/recipes-core/coreutils/coreutils_8.21.bbappend deleted file mode 100644 index 37d3ce26..00000000 --- a/meta-fsl-ppc/recipes-core/coreutils/coreutils_8.21.bbappend +++ /dev/null @@ -1,4 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/files:" - -SRC_URI_append_e500v2 = " file://coreutils-fix-dd-segfault-for-e500v2.patch \ -" diff --git a/meta-fsl-ppc/recipes-core/coreutils/files/coreutils-fix-dd-segfault-for-e500v2.patch b/meta-fsl-ppc/recipes-core/coreutils/files/coreutils-fix-dd-segfault-for-e500v2.patch deleted file mode 100644 index dbeb9b2c..00000000 --- a/meta-fsl-ppc/recipes-core/coreutils/files/coreutils-fix-dd-segfault-for-e500v2.patch +++ /dev/null @@ -1,37 +0,0 @@ -Upstream-Status: Pending - -Fix the segmentation fault issue when using dd on e500v2 targets, -use %f instead of $Lf, since single-float is used for e500v2 due to -an ICE of gcc-4.8.1. - -Signed-off-by: Zhenhua Luo - ---- coreutils-8.21/lib/human.c.orig 2013-08-16 05:17:24.466225177 -0500 -+++ coreutils-8.21/lib/human.c 2013-08-16 05:17:52.007225123 -0500 -@@ -228,7 +228,7 @@ - - if (! (opts & human_autoscale)) - { -- sprintf (buf, "%.0Lf", adjust_value (inexact_style, damt)); -+ sprintf (buf, "%.0f", adjust_value (inexact_style, damt)); - buflen = strlen (buf); - nonintegerlen = 0; - } -@@ -246,7 +246,7 @@ - - damt /= e; - -- sprintf (buf, "%.1Lf", adjust_value (inexact_style, damt)); -+ sprintf (buf, "%.1f", adjust_value (inexact_style, damt)); - buflen = strlen (buf); - nonintegerlen = decimal_pointlen + 1; - -@@ -254,7 +254,7 @@ - || ((opts & human_suppress_point_zero) - && buf[buflen - 1] == '0')) - { -- sprintf (buf, "%.0Lf", -+ sprintf (buf, "%.0f", - adjust_value (inexact_style, damt * 10) / 10); - buflen = strlen (buf); - nonintegerlen = 0; -- cgit v1.2.3-54-g00ecf From 4a09f7b300fddc40d22d569347919d8017ed0ff6 Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Tue, 24 Sep 2013 21:07:37 +0800 Subject: u-boot: fix depend race issue of u-boot-NAND.bin build | /srv/home/pokybuild/yocto-autobuilder-new/yocto-slave/nightly-fsl-ppc/build/build/tmp/work/p1022ds-poky-linux-gnuspe/u-boot/git-r30/git/P1022DS_NAND/spl/arch/powerpc/cpu/mpc85xx/.depend:125: *** missing separator. Stop. | make[3]: Leaving directory `/srv/home/pokybuild/yocto-autobuilder-new/yocto-slave/nightly-fsl-ppc/build/build/tmp/work/p1022ds-poky-linux-gnuspe/u-boot/git-r30/git/arch/powerpc/cpu/mpc85xx' | make[2]: *** [/srv/home/pokybuild/yocto-autobuilder-new/yocto-slave/nightly-fsl-ppc/build/build/tmp/work/p1022ds-poky-linux-gnuspe/u-boot/git-r30/git/P1022DS_NAND/spl/arch/powerpc/cpu/mpc85xx/start.o] Error 2 Fixed [Bug 5239]. Signed-off-by: Zhenhua Luo --- .../u-boot/files/Fix-the-depend-race-issue.patch | 38 ++++++++++++++++++++++ meta-fsl-ppc/recipes-bsp/u-boot/u-boot_git.bb | 3 +- 2 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 meta-fsl-ppc/recipes-bsp/u-boot/files/Fix-the-depend-race-issue.patch diff --git a/meta-fsl-ppc/recipes-bsp/u-boot/files/Fix-the-depend-race-issue.patch b/meta-fsl-ppc/recipes-bsp/u-boot/files/Fix-the-depend-race-issue.patch new file mode 100644 index 00000000..1ddc6675 --- /dev/null +++ b/meta-fsl-ppc/recipes-bsp/u-boot/files/Fix-the-depend-race-issue.patch @@ -0,0 +1,38 @@ +Upstream-Status: Pending + +From 301832414369b749918e0d5db850eed19b81c0fc Mon Sep 17 00:00:00 2001 +From: Zhenhua Luo +Date: Tue, 24 Sep 2013 00:54:40 -0500 +Subject: [PATCH] Fix the depend race issue + +| make[3]: Entering directory `/srv/home/pokybuild/yocto-autobuilder-new/yocto-slave/nightly-fsl-ppc/build/build/tmp/work/p1022ds-poky-linux-gnuspe/u-boot/git-r30/git/arch/powerpc/cpu/mpc85xx' +| /srv/home/pokybuild/yocto-autobuilder-new/yocto-slave/nightly-fsl-ppc/build/build/tmp/work/p1022ds-poky-linux-gnuspe/u-boot/git-r30/git/P1022DS_NAND/spl/arch/powerpc/cpu/mpc85xx/.depend:125: *** missing separator. Stop. +| make[3]: Leaving directory `/srv/home/pokybuild/yocto-autobuilder-new/yocto-slave/nightly-fsl-ppc/build/build/tmp/work/p1022ds-poky-linux-gnuspe/u-boot/git-r30/git/arch/powerpc/cpu/mpc85xx' +| make[2]: *** [/srv/home/pokybuild/yocto-autobuilder-new/yocto-slave/nightly-fsl-ppc/build/build/tmp/work/p1022ds-poky-linux-gnuspe/u-boot/git-r30/git/P1022DS_NAND/spl/arch/powerpc/cpu/mpc85xx/start.o] Error 2 +| make[2]: *** Waiting for unfinished jobs.... + +Signed-off-by: Zhenhua Luo +--- + spl/Makefile | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/spl/Makefile b/spl/Makefile +index 6dbb105..3156d87 100644 +--- a/spl/Makefile ++++ b/spl/Makefile +@@ -185,7 +185,11 @@ $(eval $(call make_u_boot_list, $(obj)u-boot.lst, $(LIBS))) + $(obj)u-boot-spl.lds: $(LDSCRIPT) $(obj)u-boot.lst depend + $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -I$(obj). -ansi -D__ASSEMBLY__ -P - < $< > $@ + +-depend: $(obj).depend ++# Explicitly make _depend in subdirs containing multiple targets to prevent ++# parallel sub-makes creating .depend files simultaneously. ++depend dep: $(obj).depend ++ for dir in $(SUBDIRS) $(CPUDIR) $(LDSCRIPT_MAKEFILE_DIR) ; do \ ++ $(MAKE) -C $(SRCTREE)/$$dir _depend ; done + .PHONY: depend + + # defines $(obj).depend target +-- +1.8.2.1 + diff --git a/meta-fsl-ppc/recipes-bsp/u-boot/u-boot_git.bb b/meta-fsl-ppc/recipes-bsp/u-boot/u-boot_git.bb index 008e253d..3479b231 100644 --- a/meta-fsl-ppc/recipes-bsp/u-boot/u-boot_git.bb +++ b/meta-fsl-ppc/recipes-bsp/u-boot/u-boot_git.bb @@ -11,7 +11,8 @@ DEPENDS = "boot-format-native virtual/${TARGET_PREFIX}gcc libgcc" inherit deploy -SRC_URI = "git://git.freescale.com/ppc/sdk/u-boot.git" +SRC_URI = "git://git.freescale.com/ppc/sdk/u-boot.git \ + file://Fix-the-depend-race-issue.patch" SRCREV = "831b30de4b768f0b3b7dbfa11739b14cea612d7e" python () { -- cgit v1.2.3-54-g00ecf From 5fa6f85f5bf75842f7d75531186be3cea92f3876 Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Tue, 24 Sep 2013 21:08:35 +0800 Subject: Remove overriding linux-libc-headers Layers should never need to be overriding linux-libc-headers. Refer to http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=babbf7a46acaefd9b36031483cafce053f607e66 for the reason. Fixed [Bug 5249]. Signed-off-by: Zhenhua Luo --- meta-fsl-ppc/conf/machine/e500mc.inc | 1 - meta-fsl-ppc/conf/machine/e500v2.inc | 1 - meta-fsl-ppc/conf/machine/e5500-64b.inc | 1 - meta-fsl-ppc/conf/machine/e5500.inc | 1 - meta-fsl-ppc/conf/machine/e6500-64b.inc | 1 - meta-fsl-ppc/conf/machine/e6500.inc | 1 - ...efile.headersinst-install-headers-from-sc.patch | 46 ---------------------- .../linux/linux-qoriq-sdk-headers.bb | 34 ---------------- 8 files changed, 86 deletions(-) delete mode 100644 meta-fsl-ppc/recipes-kernel/linux/files/scripts-Makefile.headersinst-install-headers-from-sc.patch delete mode 100644 meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk-headers.bb diff --git a/meta-fsl-ppc/conf/machine/e500mc.inc b/meta-fsl-ppc/conf/machine/e500mc.inc index 268942ae..57952e74 100644 --- a/meta-fsl-ppc/conf/machine/e500mc.inc +++ b/meta-fsl-ppc/conf/machine/e500mc.inc @@ -7,7 +7,6 @@ MACHINE_EXTRA_RRECOMMENDS = "u-boot udev-extraconf" PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" PREFERRED_VERSION_virtual/kernel ?= "3.0.34" -PREFERRED_PROVIDER_linux-libc-headers ?= "linux-qoriq-sdk-headers" PREFERRED_VERSION_qemu = "1.4+fsl" KERNEL_IMAGETYPE ?= "uImage" diff --git a/meta-fsl-ppc/conf/machine/e500v2.inc b/meta-fsl-ppc/conf/machine/e500v2.inc index 96887845..befc2962 100644 --- a/meta-fsl-ppc/conf/machine/e500v2.inc +++ b/meta-fsl-ppc/conf/machine/e500v2.inc @@ -5,7 +5,6 @@ MACHINE_EXTRA_RRECOMMENDS = "u-boot udev-extraconf" PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" PREFERRED_VERSION_virtual/kernel ?= "3.0.34" -PREFERRED_PROVIDER_linux-libc-headers ?= "linux-qoriq-sdk-headers" PREFERRED_VERSION_qemu = "1.4+fsl" KERNEL_IMAGETYPE ?= "uImage" diff --git a/meta-fsl-ppc/conf/machine/e5500-64b.inc b/meta-fsl-ppc/conf/machine/e5500-64b.inc index 3230d518..0ce7f116 100644 --- a/meta-fsl-ppc/conf/machine/e5500-64b.inc +++ b/meta-fsl-ppc/conf/machine/e5500-64b.inc @@ -8,7 +8,6 @@ MACHINE_EXTRA_RRECOMMENDS = "u-boot udev-extraconf" PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" PREFERRED_VERSION_virtual/kernel ?= "3.0.34" -PREFERRED_PROVIDER_linux-libc-headers ?= "linux-qoriq-sdk-headers" PREFERRED_VERSION_qemu = "1.4+fsl" KERNEL_IMAGETYPE ?= "uImage" diff --git a/meta-fsl-ppc/conf/machine/e5500.inc b/meta-fsl-ppc/conf/machine/e5500.inc index ae40896f..ae66342d 100644 --- a/meta-fsl-ppc/conf/machine/e5500.inc +++ b/meta-fsl-ppc/conf/machine/e5500.inc @@ -7,7 +7,6 @@ MACHINE_EXTRA_RRECOMMENDS = "u-boot udev-extraconf" PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" PREFERRED_VERSION_virtual/kernel ?= "3.0.34" -PREFERRED_PROVIDER_linux-libc-headers ?= "linux-qoriq-sdk-headers" PREFERRED_VERSION_qemu = "1.4+fsl" KERNEL_IMAGETYPE ?= "uImage" diff --git a/meta-fsl-ppc/conf/machine/e6500-64b.inc b/meta-fsl-ppc/conf/machine/e6500-64b.inc index b8766df6..2007353a 100644 --- a/meta-fsl-ppc/conf/machine/e6500-64b.inc +++ b/meta-fsl-ppc/conf/machine/e6500-64b.inc @@ -8,7 +8,6 @@ MACHINE_EXTRA_RRECOMMENDS = "u-boot udev-extraconf" PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" PREFERRED_VERSION_virtual/kernel ?= "3.0.34" -PREFERRED_PROVIDER_linux-libc-headers ?= "linux-qoriq-sdk-headers" PREFERRED_VERSION_qemu = "1.4+fsl" KERNEL_IMAGETYPE ?= "uImage" diff --git a/meta-fsl-ppc/conf/machine/e6500.inc b/meta-fsl-ppc/conf/machine/e6500.inc index 9968230c..23adf152 100644 --- a/meta-fsl-ppc/conf/machine/e6500.inc +++ b/meta-fsl-ppc/conf/machine/e6500.inc @@ -7,7 +7,6 @@ MACHINE_EXTRA_RRECOMMENDS = "u-boot udev-extraconf" PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" PREFERRED_VERSION_virtual/kernel ?= "3.0.34" -PREFERRED_PROVIDER_linux-libc-headers ?= "linux-qoriq-sdk-headers" PREFERRED_VERSION_qemu = "1.4+fsl" KERNEL_IMAGETYPE ?= "uImage" diff --git a/meta-fsl-ppc/recipes-kernel/linux/files/scripts-Makefile.headersinst-install-headers-from-sc.patch b/meta-fsl-ppc/recipes-kernel/linux/files/scripts-Makefile.headersinst-install-headers-from-sc.patch deleted file mode 100644 index 0f28d3d8..00000000 --- a/meta-fsl-ppc/recipes-kernel/linux/files/scripts-Makefile.headersinst-install-headers-from-sc.patch +++ /dev/null @@ -1,46 +0,0 @@ -From e60cc1b011bf0f1acdb7e5168b7bed4ebb78c91f Mon Sep 17 00:00:00 2001 -From: Bruce Ashfield -Date: Wed, 9 Jan 2013 16:24:39 -0500 -Subject: [PATCH] scripts/Makefile.headersinst: install headers from scratch file - -If headers_install is executed from a deep/long directory structure, the -shell's maximum argument length can be execeeded, which breaks the operation -with: - -| make[2]: execvp: /bin/sh: Argument list too long -| make[2]: *** - -By dumping the input files to a scratch file and using xargs to read the -input list from the scratch file, we can avoid blowing out the maximum -argument size and install headers in a long path name environment. - -Signed-off-by: Bruce Ashfield ---- - scripts/Makefile.headersinst | 4 +++- - 1 files changed, 3 insertions(+), 1 deletions(-) - -diff --git a/scripts/Makefile.headersinst b/scripts/Makefile.headersinst -index 06ba4a7..536d722 100644 ---- a/scripts/Makefile.headersinst -+++ b/scripts/Makefile.headersinst -@@ -71,7 +71,7 @@ printdir = $(patsubst $(INSTALL_HDR_PATH)/%/,%,$(dir $@)) - quiet_cmd_install = INSTALL $(printdir) ($(words $(all-files))\ - file$(if $(word 2, $(all-files)),s)) - cmd_install = \ -- $(PERL) $< $(installdir) $(SRCARCH) $(input-files); \ -+ xargs $(PERL) $< $(installdir) $(SRCARCH) < $(INSTALL_HDR_PATH)/.input-files; \ - for F in $(wrapper-files); do \ - echo "\#include " > $(installdir)/$$F; \ - done; \ -@@ -100,7 +100,9 @@ targets += $(install-file) - $(install-file): scripts/headers_install.pl $(input-files) FORCE - $(if $(unwanted),$(call cmd,remove),) - $(if $(wildcard $(dir $@)),,$(shell mkdir -p $(dir $@))) -+ @echo $(input-files) > $(INSTALL_HDR_PATH)/.input-files - $(call if_changed,install) -+ @rm $(INSTALL_HDR_PATH)/.input-files - - else - __headerscheck: $(subdirs) $(check-file) --- -1.7.0.4 diff --git a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk-headers.bb b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk-headers.bb deleted file mode 100644 index 0ee4fc1d..00000000 --- a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk-headers.bb +++ /dev/null @@ -1,34 +0,0 @@ -DESCRIPTION = "Linux kernel headers for Freescale platforms" -SECTION = "devel" -LICENSE = "GPLv2" - -PR = "${INC_PR}.1" - -INHIBIT_DEFAULT_DEPS = "1" -PROVIDES = "linux-libc-headers ${PN}" -RPROVIDES_${PN}-dev += "linux-libc-headers-dev" -RPROVIDES_${PN}-dbg += "linux-libc-headers-dbg" -RDEPENDS_${PN}-dev = "" -RRECOMMENDS_${PN}-dbg = "linux-libc-headers-dev (= ${EXTENDPKGV})" - -require recipes-kernel/linux/linux-qoriq-sdk.inc - -SRC_URI_append += " file://scripts-Makefile.headersinst-install-headers-from-sc.patch" - -inherit kernel-arch - -do_configure() { - oe_runmake allnoconfig -} - -do_compile () { -} - -do_install() { - oe_runmake headers_install INSTALL_HDR_PATH=${D}${exec_prefix} - # Kernel should not be exporting this header - rm -f ${D}${exec_prefix}/include/scsi/scsi.h - - # The ..install.cmd conflicts between various configure runs - find ${D}${includedir} -name ..install.cmd | xargs rm -f -} -- cgit v1.2.3-54-g00ecf From bdb88749911cd00b7ea7f99f295ed7a424485219 Mon Sep 17 00:00:00 2001 From: Chunrong Guo Date: Mon, 30 Sep 2013 05:31:06 +0000 Subject: fmlib: fix compile error with linux-libc-headers * fix the below error | NOTE: make -j 48 DESTDIR=/poky/build/tmp/work/ppce500mc-poky-linux/fmlib/git-r1/image PREFIX=/usr LIB_DEST_DIR=/usr/lib | CROSS_COMPILE=powerpc-poky-linux- KERNEL_SRC=/poky/build/tmp/sysroots/p4080ds/usr libfm-ppce500mc.a | (CC) libfm-ppce500mc.o | src/fm_lib.c:56:23: fatal error: fm_ioctls.h: No such file or directory Signed-off-by: Chunrong Guo --- meta-fsl-ppc/recipes-dpaa/fmlib/fmlib_git.bb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/meta-fsl-ppc/recipes-dpaa/fmlib/fmlib_git.bb b/meta-fsl-ppc/recipes-dpaa/fmlib/fmlib_git.bb index 7a7b8f26..9d34fcc4 100644 --- a/meta-fsl-ppc/recipes-dpaa/fmlib/fmlib_git.bb +++ b/meta-fsl-ppc/recipes-dpaa/fmlib/fmlib_git.bb @@ -5,7 +5,6 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=3f16fa8e677e45af3127c5c4bafc3c00" PR = "r1" -DEPENDS = "linux-libc-headers" DEPENDS_virtclass-native = "" SRC_URI = "git://git.freescale.com/ppc/sdk/fmlib.git" @@ -20,7 +19,7 @@ COMPATIBLE_HOST_fslmachine = ".*" COMPATIBLE_HOST ?= "(none)" EXTRA_OEMAKE = "DESTDIR=${D} PREFIX=${prefix} LIB_DEST_DIR=${libdir} \ - CROSS_COMPILE=${TARGET_PREFIX} KERNEL_SRC=${STAGING_EXECPREFIXDIR}" + CROSS_COMPILE=${TARGET_PREFIX} KERNEL_SRC=${STAGING_KERNEL_DIR}" do_compile () { oe_runmake libfm-${TARGET_ARCH_FMLIB}.a -- cgit v1.2.3-54-g00ecf From 884642fbefae69ef8d9d9b3addc2ee877124fe33 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Wed, 9 Oct 2013 07:33:06 +0000 Subject: fmlib: add depends on virtual/kernel fmlib defines KERNEL_SRC=${STAGING_KERNEL_DIR} to get kerenl headers. Signed-off-by: Ting Liu --- meta-fsl-ppc/recipes-dpaa/fmlib/fmlib_git.bb | 1 + 1 file changed, 1 insertion(+) diff --git a/meta-fsl-ppc/recipes-dpaa/fmlib/fmlib_git.bb b/meta-fsl-ppc/recipes-dpaa/fmlib/fmlib_git.bb index 9d34fcc4..0426caf3 100644 --- a/meta-fsl-ppc/recipes-dpaa/fmlib/fmlib_git.bb +++ b/meta-fsl-ppc/recipes-dpaa/fmlib/fmlib_git.bb @@ -5,6 +5,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=3f16fa8e677e45af3127c5c4bafc3c00" PR = "r1" +DEPENDS += "virtual/kernel" DEPENDS_virtclass-native = "" SRC_URI = "git://git.freescale.com/ppc/sdk/fmlib.git" -- cgit v1.2.3-54-g00ecf From 994d7fc9645d5d81c516f99112034fb755bc45f3 Mon Sep 17 00:00:00 2001 From: Zongchun Yu Date: Wed, 9 Oct 2013 07:33:07 +0000 Subject: build b4420qds-usdpaa dts by default Signed-off-by: Zongchun Yu --- meta-fsl-ppc/conf/machine/b4420qds-64b.conf | 2 +- meta-fsl-ppc/conf/machine/b4420qds.conf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/meta-fsl-ppc/conf/machine/b4420qds-64b.conf b/meta-fsl-ppc/conf/machine/b4420qds-64b.conf index 9b4973e5..ec697abf 100644 --- a/meta-fsl-ppc/conf/machine/b4420qds-64b.conf +++ b/meta-fsl-ppc/conf/machine/b4420qds-64b.conf @@ -8,7 +8,7 @@ SOC_FAMILY = "b4420" # TODO: fix 32bit build of u-boot UBOOT_MACHINES ?= "B4420QDS" -KERNEL_DEVICETREE = "b4420qds.dtb" +KERNEL_DEVICETREE = "b4420qds.dtb b4420qds-usdpaa.dtb" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/85xx/e6500rev1_defconfig" JFFS2_ERASEBLOCK = "0x10000" diff --git a/meta-fsl-ppc/conf/machine/b4420qds.conf b/meta-fsl-ppc/conf/machine/b4420qds.conf index ef8f9771..2ae5b5ba 100644 --- a/meta-fsl-ppc/conf/machine/b4420qds.conf +++ b/meta-fsl-ppc/conf/machine/b4420qds.conf @@ -6,7 +6,7 @@ require conf/machine/include/soc-family.inc SOC_FAMILY = "b4420" UBOOT_MACHINES ?= "B4420QDS" -KERNEL_DEVICETREE = "b4420qds.dtb" +KERNEL_DEVICETREE = "b4420qds.dtb b4420qds-usdpaa.dtb" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/85xx/e6500rev1_defconfig" JFFS2_ERASEBLOCK = "0x10000" -- cgit v1.2.3-54-g00ecf From 893acbf19588ab35d6969d37069f74903fbf9f05 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Wed, 9 Oct 2013 07:33:08 +0000 Subject: asf: build as 64-bit kernel module on e6500 e6500 is built with 32b rootfs/64b kernel, build asf as 64bit too. Fix the below build issue on e6500 core: | DEBUG: Executing shell function do_make_scripts | make: Entering directory `.../tmp/sysroots/t4240qds/usr/src/kernel' | CC scripts/mod/empty.o | scripts/mod/empty.c:1:0: error: -mcmodel not supported in this configuration | make[2]: *** [scripts/mod/empty.o] Error 1 | make[1]: *** [scripts/mod] Error 2 | make: *** [scripts] Error 2 Signed-off-by: Ting Liu --- meta-fsl-ppc/recipes-kernel/asf/asf_git.bb | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/meta-fsl-ppc/recipes-kernel/asf/asf_git.bb b/meta-fsl-ppc/recipes-kernel/asf/asf_git.bb index 6a6917fa..e3fa8962 100644 --- a/meta-fsl-ppc/recipes-kernel/asf/asf_git.bb +++ b/meta-fsl-ppc/recipes-kernel/asf/asf_git.bb @@ -14,6 +14,25 @@ S = "${WORKDIR}/git/asfmodule" EXTRA_OEMAKE = "CROSS_COMPILE=${TARGET_PREFIX} KERNEL_PATH=${STAGING_KERNEL_DIR}" +python () { + ma = d.getVar("DISTRO_FEATURES", True) + arch = d.getVar("OVERRIDES", True) + + # the : after the arch is to skip the message on 64b + if not "multiarch" in ma and "e6500:" in arch: + raise bb.parse.SkipPackage("Building the kernel for this arch requires multiarch to be in DISTRO_FEATURES") + + promote_kernel = d.getVar('BUILD_64BIT_KERNEL') + + if promote_kernel == "1": + d.setVar('KERNEL_CC_append', ' -m64') + d.setVar('KERNEL_LD_append', ' -melf64ppc') + + error_qa = d.getVar('ERROR_QA', True) + if 'arch' in error_qa: + d.setVar('ERROR_QA', error_qa.replace(' arch', '')) +} + do_install(){ mkdir -p ${D}/usr/driver/asf cp -rf ${S}/bin/full ${D}/usr/driver/asf -- cgit v1.2.3-54-g00ecf From e9cb731f0d4afa5e33bc9f475e32368e059db4d1 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Wed, 9 Oct 2013 07:33:09 +0000 Subject: asf: export KERNEL_PATH as it is needed by all tasks Avoid the below error: | DEBUG: Executing python function sysroot_cleansstate | DEBUG: Python function sysroot_cleansstate finished | DEBUG: Executing shell function do_configure | Makefile:12: /.config: No such file or directory | asfconfig.mk:15: *** ASF is Disabled in Kernel. Try to fix. Stop. | ERROR: Function failed: do_configure Signed-off-by: Ting Liu --- meta-fsl-ppc/recipes-kernel/asf/asf_git.bb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/meta-fsl-ppc/recipes-kernel/asf/asf_git.bb b/meta-fsl-ppc/recipes-kernel/asf/asf_git.bb index e3fa8962..7cc23cdc 100644 --- a/meta-fsl-ppc/recipes-kernel/asf/asf_git.bb +++ b/meta-fsl-ppc/recipes-kernel/asf/asf_git.bb @@ -12,7 +12,8 @@ inherit module S = "${WORKDIR}/git/asfmodule" -EXTRA_OEMAKE = "CROSS_COMPILE=${TARGET_PREFIX} KERNEL_PATH=${STAGING_KERNEL_DIR}" +EXTRA_OEMAKE = "CROSS_COMPILE=${TARGET_PREFIX}" +export KERNEL_PATH = "${STAGING_KERNEL_DIR}" python () { ma = d.getVar("DISTRO_FEATURES", True) -- cgit v1.2.3-54-g00ecf From 93096ea01ed956753fea583bfa7b856d4e96b08f Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Wed, 9 Oct 2013 07:33:10 +0000 Subject: udev-extraconf: update udev rules for fsl dpaa board * For PCIe ports, renaming breaks the ability to look at the PCIe driver's boot output to determine what its ethN is, disable it. * For macless ports, rename to maclessN instead of ethN * extend renaming rules to fsl_dpa* as shared-mac driver may be named as fsl_dpa_shared. macless interfaces will not match on this rule as they do not have device address. legacy interfaces' names are not affected by this change. Signed-off-by: Zhenhua Luo Signed-off-by: Cristian Sovaiala --- .../71-fsl-dpaa-persistent-networking.rules | 38 +++++++--------- .../72-fsl-dpaa-persistent-networking.rules | 50 ++++++++++------------ 2 files changed, 38 insertions(+), 50 deletions(-) diff --git a/meta-fsl-ppc/recipes-core/udev/udev-extraconf/71-fsl-dpaa-persistent-networking.rules b/meta-fsl-ppc/recipes-core/udev/udev-extraconf/71-fsl-dpaa-persistent-networking.rules index 9bd67858..6c6dc354 100644 --- a/meta-fsl-ppc/recipes-core/udev/udev-extraconf/71-fsl-dpaa-persistent-networking.rules +++ b/meta-fsl-ppc/recipes-core/udev/udev-extraconf/71-fsl-dpaa-persistent-networking.rules @@ -1,26 +1,20 @@ # Rules for handling naming the DPAA FMan ethernet ports in a consistent way -SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe4e0000", NAME="fm1-gb0" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe4e2000", NAME="fm1-gb1" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe4e4000", NAME="fm1-gb2" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe4e6000", NAME="fm1-gb3" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe4e8000", NAME="fm1-gb4" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe4f0000", NAME="fm1-10g" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe5e0000", NAME="fm2-gb0" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe5e2000", NAME="fm2-gb1" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe5e4000", NAME="fm2-gb2" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe5e6000", NAME="fm2-gb3" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe5e8000", NAME="fm2-gb4" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe5f0000", NAME="fm2-10g" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe4e0000", NAME="fm1-gb0" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe4e2000", NAME="fm1-gb1" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe4e4000", NAME="fm1-gb2" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe4e6000", NAME="fm1-gb3" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe4e8000", NAME="fm1-gb4" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe4f0000", NAME="fm1-10g" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe5e0000", NAME="fm2-gb0" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe5e2000", NAME="fm2-gb1" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe5e4000", NAME="fm2-gb2" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe5e6000", NAME="fm2-gb3" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe5e8000", NAME="fm2-gb4" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe5f0000", NAME="fm2-10g" # P1023 has its Fman @ different offsets -SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ff7e0000", NAME="fm1-gb0" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ff7e2000", NAME="fm1-gb1" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ff7e0000", NAME="fm1-gb0" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ff7e2000", NAME="fm1-gb1" -# Unify the PCIe Etherenet port, maxinum PCIe slots is 4 -SUBSYSTEM=="net", KERNEL=="eth*", KERNELS=="ffe200000.pcie", DRIVERS=="fsl-pci", NAME="eth0" -SUBSYSTEM=="net", KERNEL=="eth*", KERNELS=="ffe201000.pcie", DRIVERS=="fsl-pci", NAME="eth1" -SUBSYSTEM=="net", KERNEL=="eth*", KERNELS=="ffe202000.pcie", DRIVERS=="fsl-pci", NAME="eth2" -SUBSYSTEM=="net", KERNEL=="eth*", KERNELS=="ffe203000.pcie", DRIVERS=="fsl-pci", NAME="eth3" - -# Rename macless0 port to "eth4" -SUBSYSTEM=="net", ATTR{device_type}=="macless0", NAME="eth4" +# Rename macless0 port to "macless0" +SUBSYSTEM=="net", ATTR{device_type}=="macless0", NAME="macless0" diff --git a/meta-fsl-ppc/recipes-core/udev/udev-extraconf/72-fsl-dpaa-persistent-networking.rules b/meta-fsl-ppc/recipes-core/udev/udev-extraconf/72-fsl-dpaa-persistent-networking.rules index 3529bc41..d0eec9ce 100644 --- a/meta-fsl-ppc/recipes-core/udev/udev-extraconf/72-fsl-dpaa-persistent-networking.rules +++ b/meta-fsl-ppc/recipes-core/udev/udev-extraconf/72-fsl-dpaa-persistent-networking.rules @@ -1,30 +1,24 @@ # Rules for handling naming the DPAA FMan ethernet ports in a consistent way -SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe4e0000", NAME="fm1-mac1" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe4e2000", NAME="fm1-mac2" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe4e4000", NAME="fm1-mac3" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe4e6000", NAME="fm1-mac4" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe4e8000", NAME="fm1-mac5" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe4ea000", NAME="fm1-mac6" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe4ec000", NAME="fm1-mac7" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe4ee000", NAME="fm1-mac8" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe4f0000", NAME="fm1-mac9" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe4f2000", NAME="fm1-mac10" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe5e0000", NAME="fm2-mac1" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe5e2000", NAME="fm2-mac2" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe5e4000", NAME="fm2-mac3" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe5e6000", NAME="fm2-mac4" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe5e8000", NAME="fm2-mac5" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe5ea000", NAME="fm2-mac6" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe5ec000", NAME="fm2-mac7" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe5ee000", NAME="fm2-mac8" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe5f0000", NAME="fm2-mac9" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe5f2000", NAME="fm2-mac10" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe4e0000", NAME="fm1-mac1" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe4e2000", NAME="fm1-mac2" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe4e4000", NAME="fm1-mac3" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe4e6000", NAME="fm1-mac4" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe4e8000", NAME="fm1-mac5" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe4ea000", NAME="fm1-mac6" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe4ec000", NAME="fm1-mac7" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe4ee000", NAME="fm1-mac8" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe4f0000", NAME="fm1-mac9" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe4f2000", NAME="fm1-mac10" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe5e0000", NAME="fm2-mac1" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe5e2000", NAME="fm2-mac2" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe5e4000", NAME="fm2-mac3" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe5e6000", NAME="fm2-mac4" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe5e8000", NAME="fm2-mac5" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe5ea000", NAME="fm2-mac6" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe5ec000", NAME="fm2-mac7" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe5ee000", NAME="fm2-mac8" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe5f0000", NAME="fm2-mac9" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe5f2000", NAME="fm2-mac10" -# Unify the PCIe Etherenet port, maxinum PCIe slots is 4 -SUBSYSTEM=="net", KERNEL=="eth*", KERNELS=="ffe240000.pcie", DRIVERS=="fsl-pci", NAME="eth0" -SUBSYSTEM=="net", KERNEL=="eth*", KERNELS=="ffe250000.pcie", DRIVERS=="fsl-pci", NAME="eth1" -SUBSYSTEM=="net", KERNEL=="eth*", KERNELS=="ffe260000.pcie", DRIVERS=="fsl-pci", NAME="eth2" -SUBSYSTEM=="net", KERNEL=="eth*", KERNELS=="ffe270000.pcie", DRIVERS=="fsl-pci", NAME="eth3" - -# Rename macless0 to "eth4" -SUBSYSTEM=="net", ATTR{device_type}=="macless0", NAME="eth4" +# Rename macless0 to "macless0" +SUBSYSTEM=="net", ATTR{device_type}=="macless0", NAME="macless0" -- cgit v1.2.3-54-g00ecf From 9013b405eead065d3757bacc9c71de6674c468df Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Wed, 9 Oct 2013 07:33:11 +0000 Subject: rcw: export PYTHON to override the assignment in Makefile As RCW compiler is supported only with Python 2.6.x and 2.7.x, and currently Yocto uses python 2.7.3 or later, export PYTHON to directly use Yocto's python which can work with rcw.py definitely for now. Signed-off-by: Ting Liu Reviewed-by: Emilian Medve Tested-by: Emilian Medve --- meta-fsl-ppc/recipes-bsp/rcw/rcw_git.bb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/meta-fsl-ppc/recipes-bsp/rcw/rcw_git.bb b/meta-fsl-ppc/recipes-bsp/rcw/rcw_git.bb index c532a9d8..7d87783c 100644 --- a/meta-fsl-ppc/recipes-bsp/rcw/rcw_git.bb +++ b/meta-fsl-ppc/recipes-bsp/rcw/rcw_git.bb @@ -18,6 +18,8 @@ SRCREV = "5d3c819bcca6d09dcf7b52b3f2855dda304a5997" S = "${WORKDIR}/git" +export PYTHON + do_install () { make install -- cgit v1.2.3-54-g00ecf From dc1bcaf55fec2cdaa725f81aa34706103b833fae Mon Sep 17 00:00:00 2001 From: Chunrong Guo Date: Wed, 16 Oct 2013 06:03:57 +0000 Subject: linux-qoriq-sdk : add config fragments Signed-off-by: Chunrong Guo --- meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.bb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.bb b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.bb index 7dd70595..b7ca7210 100644 --- a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.bb +++ b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.bb @@ -11,13 +11,18 @@ SRC_URI += "file://libtraceevent-Remove-hard-coded-include-to-usr-local-include- PR = "${INC_PR}.1" -DEPENDS_append = " libgcc" +DEPENDS_append = " libgcc kern-tools-native" KERNEL_CC_append = " ${TOOLCHAIN_OPTIONS}" KERNEL_LD_append = " ${TOOLCHAIN_OPTIONS}" do_configure_prepend() { # copy desired defconfig so we pick it up for the real kernel_do_configure cp ${KERNEL_DEFCONFIG} ${B}/.config + + # add config fragments + if [ -a "${DELTA_KERNEL_DEFCONFIG}" ]; then + merge_config.sh -m .config ${DELTA_KERNEL_DEFCONFIG} + fi # append sdk version in kernel version if SDK_VERSION is defined if [ -n "${SDK_VERSION}" ]; then -- cgit v1.2.3-54-g00ecf From 88af4f36b2e7567610a0bbfa9cec3128e6bc8165 Mon Sep 17 00:00:00 2001 From: Chunrong Guo Date: Fri, 18 Oct 2013 06:23:44 +0000 Subject: linux-qoriq-sdk : add config fragments with merge_config.sh from kernel tree Signed-off-by: Chunrong Guo --- meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.bb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.bb b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.bb index b7ca7210..df18cfe1 100644 --- a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.bb +++ b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.bb @@ -11,7 +11,7 @@ SRC_URI += "file://libtraceevent-Remove-hard-coded-include-to-usr-local-include- PR = "${INC_PR}.1" -DEPENDS_append = " libgcc kern-tools-native" +DEPENDS_append = " libgcc" KERNEL_CC_append = " ${TOOLCHAIN_OPTIONS}" KERNEL_LD_append = " ${TOOLCHAIN_OPTIONS}" @@ -20,8 +20,8 @@ do_configure_prepend() { cp ${KERNEL_DEFCONFIG} ${B}/.config # add config fragments - if [ -a "${DELTA_KERNEL_DEFCONFIG}" ]; then - merge_config.sh -m .config ${DELTA_KERNEL_DEFCONFIG} + if [ -f "${DELTA_KERNEL_DEFCONFIG}" ]; then + ${S}/scripts/kconfig/merge_config.sh -m .config ${DELTA_KERNEL_DEFCONFIG} fi # append sdk version in kernel version if SDK_VERSION is defined -- cgit v1.2.3-54-g00ecf From 5851b9f1114cb142debb7ce263a7319bffd49627 Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Thu, 24 Oct 2013 07:50:18 +0000 Subject: libedit: fix the multilib build issue Signed-off-by: Zhenhua Luo --- meta-fsl-ppc/recipes-devtools/libedit/libedit_20121213.bb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meta-fsl-ppc/recipes-devtools/libedit/libedit_20121213.bb b/meta-fsl-ppc/recipes-devtools/libedit/libedit_20121213.bb index 35e619ca..08dba440 100644 --- a/meta-fsl-ppc/recipes-devtools/libedit/libedit_20121213.bb +++ b/meta-fsl-ppc/recipes-devtools/libedit/libedit_20121213.bb @@ -10,9 +10,9 @@ inherit autotools # upstream site does not allow wget's User-Agent FETCHCMD_wget += "-U bitbake" -SRC_URI = "http://www.thrysoee.dk/editline/${PN}-${PV}-3.0.tar.gz" +SRC_URI = "http://www.thrysoee.dk/editline/${BPN}-${PV}-3.0.tar.gz" -S = "${WORKDIR}/${PN}-${PV}-3.0" +S = "${WORKDIR}/${BPN}-${PV}-3.0" SRC_URI[md5sum] = "f475f50fe7467c1074c0fbae8b5bca1a" SRC_URI[sha256sum] = "0379e4a73c219f260e6d16adbc2e87635532ebb4c5a83a7399f231dc40108d1f" -- cgit v1.2.3-54-g00ecf From 359b3a8c2d548791a827eebce57e4d0a5a885ca2 Mon Sep 17 00:00:00 2001 From: Chunrong Guo Date: Wed, 11 Dec 2013 17:09:36 +0800 Subject: Fix git branch references *Ensure the right branches are set in SRC_URI to match the revisions used. This resolves certain fetch failures. Signed-off-by: Chunrong Guo --- meta-fsl-ppc/recipes-bsp/boot-format/boot-format_git.bb | 3 ++- meta-fsl-ppc/recipes-bsp/rcw/rcw_git.bb | 3 ++- meta-fsl-ppc/recipes-bsp/u-boot/u-boot_git.bb | 3 ++- meta-fsl-ppc/recipes-devtools/qemu/qemu_fslgit.bb | 3 ++- meta-fsl-ppc/recipes-dpaa/fmc/fmc_git.bb | 3 ++- meta-fsl-ppc/recipes-extended/cst/cst_git.bb | 3 ++- meta-fsl-ppc/recipes-extended/web-sysmon/web-sysmon_git.bb | 3 ++- meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc | 3 ++- meta-fsl-ppc/recipes-kernel/qoriq-debug/qoriq-debug_git.bb | 3 ++- meta-fsl-ppc/recipes-kernel/skmm/skmm_git.bb | 3 ++- 10 files changed, 20 insertions(+), 10 deletions(-) diff --git a/meta-fsl-ppc/recipes-bsp/boot-format/boot-format_git.bb b/meta-fsl-ppc/recipes-bsp/boot-format/boot-format_git.bb index ac1504d4..9259e78f 100644 --- a/meta-fsl-ppc/recipes-bsp/boot-format/boot-format_git.bb +++ b/meta-fsl-ppc/recipes-bsp/boot-format/boot-format_git.bb @@ -3,7 +3,8 @@ LICENSE = "GPLv2" PR = "r6" LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" -SRC_URI = "git://git.freescale.com/ppc/sdk/boot-format.git" +SRCBRANCH = "sdk-v1.4.x" +SRC_URI = "git://git.freescale.com/ppc/sdk/boot-format.git;branch=${SRCBRANCH}" SRCREV = "d9bbfaba0c9316ae33455099c47bae429479e530" S = "${WORKDIR}/git" diff --git a/meta-fsl-ppc/recipes-bsp/rcw/rcw_git.bb b/meta-fsl-ppc/recipes-bsp/rcw/rcw_git.bb index 7d87783c..8da72ea8 100644 --- a/meta-fsl-ppc/recipes-bsp/rcw/rcw_git.bb +++ b/meta-fsl-ppc/recipes-bsp/rcw/rcw_git.bb @@ -13,7 +13,8 @@ COMPATIBLE_HOST ?= "(none)" inherit deploy -SRC_URI = "git://git.freescale.com/ppc/sdk/rcw.git" +SRCBRANCH = "sdk-v1.4.x" +SRC_URI = "git://git.freescale.com/ppc/sdk/rcw.git;branch=${SRCBRANCH}" SRCREV = "5d3c819bcca6d09dcf7b52b3f2855dda304a5997" S = "${WORKDIR}/git" diff --git a/meta-fsl-ppc/recipes-bsp/u-boot/u-boot_git.bb b/meta-fsl-ppc/recipes-bsp/u-boot/u-boot_git.bb index 3479b231..e5820f70 100644 --- a/meta-fsl-ppc/recipes-bsp/u-boot/u-boot_git.bb +++ b/meta-fsl-ppc/recipes-bsp/u-boot/u-boot_git.bb @@ -11,7 +11,8 @@ DEPENDS = "boot-format-native virtual/${TARGET_PREFIX}gcc libgcc" inherit deploy -SRC_URI = "git://git.freescale.com/ppc/sdk/u-boot.git \ +SRCBRANCH = "sdk-v1.4.x" +SRC_URI = "git://git.freescale.com/ppc/sdk/u-boot.git;branch=${SRCBRANCH} \ file://Fix-the-depend-race-issue.patch" SRCREV = "831b30de4b768f0b3b7dbfa11739b14cea612d7e" diff --git a/meta-fsl-ppc/recipes-devtools/qemu/qemu_fslgit.bb b/meta-fsl-ppc/recipes-devtools/qemu/qemu_fslgit.bb index 921bf2fb..356103d4 100644 --- a/meta-fsl-ppc/recipes-devtools/qemu/qemu_fslgit.bb +++ b/meta-fsl-ppc/recipes-devtools/qemu/qemu_fslgit.bb @@ -6,7 +6,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \ # This means v1.4 with FSL specific patches applied PV = "1.4+fsl" -SRC_URI = "git://git.freescale.com/ppc/sdk/qemu.git" +SRCBRANCH = "sdk-v1.4.x" +SRC_URI = "git://git.freescale.com/ppc/sdk/qemu.git;branch=${SRCBRANCH}" SRCREV = "8713c58725df407dbbedb48fa315248d0100720c" SRC_URI += " \ diff --git a/meta-fsl-ppc/recipes-dpaa/fmc/fmc_git.bb b/meta-fsl-ppc/recipes-dpaa/fmc/fmc_git.bb index 20f93f65..01690626 100644 --- a/meta-fsl-ppc/recipes-dpaa/fmc/fmc_git.bb +++ b/meta-fsl-ppc/recipes-dpaa/fmc/fmc_git.bb @@ -5,7 +5,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=a504ab5a8ff235e67c7301214749346c" PR = "r2" -SRC_URI = "git://git.freescale.com/ppc/sdk/fmc.git" +SRCBRANCH = "sdk-v1.4.x" +SRC_URI = "git://git.freescale.com/ppc/sdk/fmc.git;branch=${SRCBRANCH}" SRCREV = "f2e1a831a96f1d04d3d5a5970d2e54c38098cf39" DEPENDS = "libxml2 fmlib tclap" diff --git a/meta-fsl-ppc/recipes-extended/cst/cst_git.bb b/meta-fsl-ppc/recipes-extended/cst/cst_git.bb index 177f23ce..9d2d2974 100644 --- a/meta-fsl-ppc/recipes-extended/cst/cst_git.bb +++ b/meta-fsl-ppc/recipes-extended/cst/cst_git.bb @@ -7,7 +7,8 @@ LIC_FILES_CHKSUM = "file://RELEASENOTES;beginline=8;endline=43;md5=5a7b22a2c96b5 DEPENDS += "openssl" -SRC_URI = "git://git.freescale.com/ppc/sdk/cst.git" +SRCBRANCH = "sdk-v1.4.x" +SRC_URI = "git://git.freescale.com/ppc/sdk/cst.git;branch=${SRCBRANCH}" SRCREV = "e4035cbf54ed481147c6ae65c741ef75dc9ec37f" S = "${WORKDIR}/git" diff --git a/meta-fsl-ppc/recipes-extended/web-sysmon/web-sysmon_git.bb b/meta-fsl-ppc/recipes-extended/web-sysmon/web-sysmon_git.bb index 1b2e070d..d9df8e43 100644 --- a/meta-fsl-ppc/recipes-extended/web-sysmon/web-sysmon_git.bb +++ b/meta-fsl-ppc/recipes-extended/web-sysmon/web-sysmon_git.bb @@ -3,7 +3,8 @@ SECTION = "web-sysmon" LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e" -SRC_URI = "git://git.freescale.com/ppc/sdk/web-sysmon.git" +SRCBRANCH = "sdk-v1.4.x" +SRC_URI = "git://git.freescale.com/ppc/sdk/web-sysmon.git;branch=${SRCBRANCH}" SRCREV = "40b47611378ef5c07d98f0f691bb146ae52dcdc1" S = "${WORKDIR}/git" diff --git a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc index 1c66f9bc..0be61090 100644 --- a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc +++ b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc @@ -3,8 +3,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7" PV = "3.8" INC_PR = "r11" +SRCBRANCH = "sdk-v1.4.x" SRCREV = "4b66366af2d77de68f4bd6548d07421e13d3df05" -SRC_URI = "git://git.freescale.com/ppc/sdk/linux.git \ +SRC_URI = "git://git.freescale.com/ppc/sdk/linux.git;branch=${SRCBRANCH} \ " KSRC ?= "" diff --git a/meta-fsl-ppc/recipes-kernel/qoriq-debug/qoriq-debug_git.bb b/meta-fsl-ppc/recipes-kernel/qoriq-debug/qoriq-debug_git.bb index a8d2e963..5b0256f4 100644 --- a/meta-fsl-ppc/recipes-kernel/qoriq-debug/qoriq-debug_git.bb +++ b/meta-fsl-ppc/recipes-kernel/qoriq-debug/qoriq-debug_git.bb @@ -5,7 +5,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=e29234dd5d40dc352cc60cc0c93437ba" inherit module autotools -SRC_URI = "git://git.freescale.com/ppc/sdk/qoriq-debug.git" +SRCBRANCH = "sdk-v1.4.x" +SRC_URI = "git://git.freescale.com/ppc/sdk/qoriq-debug.git;branch=${SRCBRANCH}" SRCREV = "08de2902af9a79ba9e436a284b8d7754b351f608" S = "${WORKDIR}/git" diff --git a/meta-fsl-ppc/recipes-kernel/skmm/skmm_git.bb b/meta-fsl-ppc/recipes-kernel/skmm/skmm_git.bb index 224e5564..31e4489f 100644 --- a/meta-fsl-ppc/recipes-kernel/skmm/skmm_git.bb +++ b/meta-fsl-ppc/recipes-kernel/skmm/skmm_git.bb @@ -5,7 +5,8 @@ LIC_FILES_CHKSUM = "file://Makefile;endline=30;md5=39e58bedc879163c9338596e52df5 DEPENDS = "libedit" -SRC_URI = "git://git.freescale.com/ppc/sdk/skmm-ep.git" +SRCBRANCH = "sdk-v1.4.x" +SRC_URI = "git://git.freescale.com/ppc/sdk/skmm-ep.git;branch=${SRCBRANCH}" SRCREV = "80d8393a2033b3b0cc8f885702d7b288956f3a37" COMPATIBLE_MACHINE = "(p4080ds|t4240qds)" -- cgit v1.2.3-54-g00ecf From a3389597a82dbe2c62b4d56c24de435cda342c2d Mon Sep 17 00:00:00 2001 From: Chunrong Guo Date: Thu, 12 Dec 2013 11:59:59 +0800 Subject: qemu: add gtk options in configure * fix the following error: |ERROR: unknown option --disable-gtk Signed-off-by: Chunrong Guo --- .../recipes-devtools/qemu/files/add-gtk-options.patch | 13 +++++++++++++ meta-fsl-ppc/recipes-devtools/qemu/qemu_fslgit.bb | 1 + 2 files changed, 14 insertions(+) create mode 100644 meta-fsl-ppc/recipes-devtools/qemu/files/add-gtk-options.patch diff --git a/meta-fsl-ppc/recipes-devtools/qemu/files/add-gtk-options.patch b/meta-fsl-ppc/recipes-devtools/qemu/files/add-gtk-options.patch new file mode 100644 index 00000000..d8522deb --- /dev/null +++ b/meta-fsl-ppc/recipes-devtools/qemu/files/add-gtk-options.patch @@ -0,0 +1,13 @@ +--- a/configure.old 2013-12-11 21:24:44.422276752 -0600 ++++ b/configure 2013-12-11 21:27:26.954335983 -0600 +@@ -897,6 +897,10 @@ + ;; + --enable-virtio-blk-data-plane) virtio_blk_data_plane="yes" + ;; ++ --disable-gtk) gtk="no" ++ ;; ++ --enable-gtk) gtk="yes" ++ ;; + *) echo "ERROR: unknown option $opt"; show_help="yes" + ;; + esac diff --git a/meta-fsl-ppc/recipes-devtools/qemu/qemu_fslgit.bb b/meta-fsl-ppc/recipes-devtools/qemu/qemu_fslgit.bb index 356103d4..98c67ca1 100644 --- a/meta-fsl-ppc/recipes-devtools/qemu/qemu_fslgit.bb +++ b/meta-fsl-ppc/recipes-devtools/qemu/qemu_fslgit.bb @@ -14,6 +14,7 @@ SRC_URI += " \ file://0001-doc-Fix-texinfo-table-markup-in-qemu-options.hx.patch \ file://0002-docs-Fix-generating-qemu-doc.html-with-texinfo-5.patch \ file://fdt_header.patch \ + file://add-gtk-options.patch \ " S = "${WORKDIR}/git" -- cgit v1.2.3-54-g00ecf From 0517fe49809ad7fa5a55bca5a00a8fe41d17833a Mon Sep 17 00:00:00 2001 From: Chunrong Guo Date: Fri, 13 Dec 2013 15:47:44 +0800 Subject: lttng-modules: build as 64-bit kernel module on e6500 *e6500 is built with 32b rootfs/64b kernel, build asf as 64bit too. *Fix the below build issue on e6500 core: | DEBUG: Executing shell function do_make_scripts | make: Entering directory `.../tmp/sysroots/t4240qds/usr/src/kernel' | CC scripts/mod/empty.o | scripts/mod/empty.c:1:0: error: -mcmodel not supported in this configuration | make[2]: *** [scripts/mod/empty.o] Error 1 | make[1]: *** [scripts/mod] Error 2 | make: *** [scripts] Error 2 Signed-off-by: Chunrong Guo --- .../lttng/lttng-modules_2.3.3.bbappend | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 meta-fsl-ppc/recipes-kernel/lttng/lttng-modules_2.3.3.bbappend diff --git a/meta-fsl-ppc/recipes-kernel/lttng/lttng-modules_2.3.3.bbappend b/meta-fsl-ppc/recipes-kernel/lttng/lttng-modules_2.3.3.bbappend new file mode 100644 index 00000000..0452d7c3 --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/lttng/lttng-modules_2.3.3.bbappend @@ -0,0 +1,21 @@ +PRINC := "${@int(PRINC) + 1}" + +python () { + ma = d.getVar("DISTRO_FEATURES", True) + arch = d.getVar("OVERRIDES", True) + + # the : after the arch is to skip the message on 64b + if not "multiarch" in ma and "e6500:" in arch: + raise bb.parse.SkipPackage("Building the kernel for this arch requires multiarch to be in DISTRO_FEATURES") + + promote_kernel = d.getVar('BUILD_64BIT_KERNEL') + + if promote_kernel == "1": + d.setVar('KERNEL_CC_append', ' -m64') + d.setVar('KERNEL_LD_append', ' -melf64ppc') + + error_qa = d.getVar('ERROR_QA', True) + if 'arch' in error_qa: + d.setVar('ERROR_QA', error_qa.replace(' arch', '')) +} + -- cgit v1.2.3-54-g00ecf From e762c77e8df690b22257b59e445b0af8020c8aeb Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Mon, 16 Dec 2013 13:44:32 +0800 Subject: Revert "lttng-modules: build as 64-bit kernel module on e6500" This reverts commit a2789b3edf0f3fa4a14279e5d0d4c01d40962353. --- .../lttng/lttng-modules_2.3.3.bbappend | 21 --------------------- 1 file changed, 21 deletions(-) delete mode 100644 meta-fsl-ppc/recipes-kernel/lttng/lttng-modules_2.3.3.bbappend diff --git a/meta-fsl-ppc/recipes-kernel/lttng/lttng-modules_2.3.3.bbappend b/meta-fsl-ppc/recipes-kernel/lttng/lttng-modules_2.3.3.bbappend deleted file mode 100644 index 0452d7c3..00000000 --- a/meta-fsl-ppc/recipes-kernel/lttng/lttng-modules_2.3.3.bbappend +++ /dev/null @@ -1,21 +0,0 @@ -PRINC := "${@int(PRINC) + 1}" - -python () { - ma = d.getVar("DISTRO_FEATURES", True) - arch = d.getVar("OVERRIDES", True) - - # the : after the arch is to skip the message on 64b - if not "multiarch" in ma and "e6500:" in arch: - raise bb.parse.SkipPackage("Building the kernel for this arch requires multiarch to be in DISTRO_FEATURES") - - promote_kernel = d.getVar('BUILD_64BIT_KERNEL') - - if promote_kernel == "1": - d.setVar('KERNEL_CC_append', ' -m64') - d.setVar('KERNEL_LD_append', ' -melf64ppc') - - error_qa = d.getVar('ERROR_QA', True) - if 'arch' in error_qa: - d.setVar('ERROR_QA', error_qa.replace(' arch', '')) -} - -- cgit v1.2.3-54-g00ecf From ca5492c8edf68c85956ee5b2c694973727147180 Mon Sep 17 00:00:00 2001 From: Chunrong Guo Date: Mon, 16 Dec 2013 14:07:12 +0800 Subject: asf: Fix git branch references *Ensure the right branches are set in SRC_URI to match the revisions used. This resolves certain fetch failures. Signed-off-by: Chunrong Guo --- meta-fsl-ppc/recipes-kernel/asf/asf_git.bb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/meta-fsl-ppc/recipes-kernel/asf/asf_git.bb b/meta-fsl-ppc/recipes-kernel/asf/asf_git.bb index 7cc23cdc..1576722e 100644 --- a/meta-fsl-ppc/recipes-kernel/asf/asf_git.bb +++ b/meta-fsl-ppc/recipes-kernel/asf/asf_git.bb @@ -3,7 +3,8 @@ SECTION = "asf" LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=9960b017720861b8c50c8c08723e57aa" -SRC_URI = "git://git.freescale.com/ppc/sdk/asf.git" +SRCBRANCH = "sdk-v1.4.x" +SRC_URI = "git://git.freescale.com/ppc/sdk/asf.git;branch=${SRCBRANCH}" SRCREV = "0b80c1df6a7490486d5106b28103598906793da0" DEPENDS="virtual/kernel" -- cgit v1.2.3-54-g00ecf From e8dd8e8d69289405c83e58274c079b0f28f61815 Mon Sep 17 00:00:00 2001 From: Chunrong Guo Date: Mon, 16 Dec 2013 17:16:05 +0800 Subject: lttng-modules: build as 64-bit kernel module on e6500 *e6500 is built with 32b rootfs/64b kernel, build asf as 64bit too. *Fix the below build issue on e6500 core: | DEBUG: Executing shell function do_make_scripts | make: Entering directory `.../tmp/sysroots/t4240qds/usr/src/kernel' | CC scripts/mod/empty.o | scripts/mod/empty.c:1:0: error: -mcmodel not supported in this configuration | make[2]: *** [scripts/mod/empty.o] Error 1 | make[1]: *** [scripts/mod] Error 2 | make: *** [scripts] Error 2 Signed-off-by: Chunrong Guo --- .../recipes-kernel/lttng/lttng-modules_2.3.3.bbappend | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 meta-fsl-ppc/recipes-kernel/lttng/lttng-modules_2.3.3.bbappend diff --git a/meta-fsl-ppc/recipes-kernel/lttng/lttng-modules_2.3.3.bbappend b/meta-fsl-ppc/recipes-kernel/lttng/lttng-modules_2.3.3.bbappend new file mode 100644 index 00000000..5415f16e --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/lttng/lttng-modules_2.3.3.bbappend @@ -0,0 +1,18 @@ +inherit distro_features_check + +REQUIRED_DISTRO_FEATURES_append_e6500 ?= "multiarch" + +python () { + + promote_kernel = d.getVar('BUILD_64BIT_KERNEL') + + if promote_kernel == "1": + d.appendVar('KERNEL_CC', ' -m64') + d.appendVar('KERNEL_LD', ' -melf64ppc') + + + error_qa = d.getVar('ERROR_QA', True) + if 'arch' in error_qa: + d.setVar('ERROR_QA', error_qa.replace(' arch', '')) + +} -- cgit v1.2.3-54-g00ecf From 02784ff4bb4e114e8f2a0d3cd593ba8ce86220b7 Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Sat, 14 Dec 2013 09:34:56 +0800 Subject: asf: update the SHA for SDK 1.5 Signed-off-by: Zhenhua Luo --- meta-fsl-ppc/recipes-kernel/asf/asf_git.bb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/meta-fsl-ppc/recipes-kernel/asf/asf_git.bb b/meta-fsl-ppc/recipes-kernel/asf/asf_git.bb index 1576722e..ff2788dd 100644 --- a/meta-fsl-ppc/recipes-kernel/asf/asf_git.bb +++ b/meta-fsl-ppc/recipes-kernel/asf/asf_git.bb @@ -3,9 +3,8 @@ SECTION = "asf" LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=9960b017720861b8c50c8c08723e57aa" -SRCBRANCH = "sdk-v1.4.x" -SRC_URI = "git://git.freescale.com/ppc/sdk/asf.git;branch=${SRCBRANCH}" -SRCREV = "0b80c1df6a7490486d5106b28103598906793da0" +SRC_URI = "git://git.freescale.com/ppc/sdk/asf.git;nobranch=1" +SRCREV = "c262d7701af325b50cae54279a021ae7b5081e24" DEPENDS="virtual/kernel" -- cgit v1.2.3-54-g00ecf From 82f18e7cadcbe7a979a9d4b33b1f4981c637dd04 Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Sat, 14 Dec 2013 09:38:51 +0800 Subject: boot-format: update the SHA for SDK 1.5 Signed-off-by: Zhenhua Luo --- meta-fsl-ppc/recipes-bsp/boot-format/boot-format_git.bb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/meta-fsl-ppc/recipes-bsp/boot-format/boot-format_git.bb b/meta-fsl-ppc/recipes-bsp/boot-format/boot-format_git.bb index 9259e78f..5e1719b4 100644 --- a/meta-fsl-ppc/recipes-bsp/boot-format/boot-format_git.bb +++ b/meta-fsl-ppc/recipes-bsp/boot-format/boot-format_git.bb @@ -3,9 +3,8 @@ LICENSE = "GPLv2" PR = "r6" LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" -SRCBRANCH = "sdk-v1.4.x" -SRC_URI = "git://git.freescale.com/ppc/sdk/boot-format.git;branch=${SRCBRANCH}" -SRCREV = "d9bbfaba0c9316ae33455099c47bae429479e530" +SRC_URI = "git://git.freescale.com/ppc/sdk/boot-format.git;nobranch=1" +SRCREV = "3d5f5ae1461eb14927a89eea12a841983e151ec7" S = "${WORKDIR}/git" EXTRA_OEMAKE = 'CC="${CC}"' -- cgit v1.2.3-54-g00ecf From efd06f9be5b144a6f711be72d57e9dcdb550ec89 Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Sat, 14 Dec 2013 10:02:17 +0800 Subject: flib: update SHA for SDK 1.5 Signed-off-by: Zhenhua Luo --- meta-fsl-ppc/recipes-dpaa/flib/flib_git.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-fsl-ppc/recipes-dpaa/flib/flib_git.bb b/meta-fsl-ppc/recipes-dpaa/flib/flib_git.bb index fb3f6987..9ef4b9fe 100644 --- a/meta-fsl-ppc/recipes-dpaa/flib/flib_git.bb +++ b/meta-fsl-ppc/recipes-dpaa/flib/flib_git.bb @@ -4,7 +4,7 @@ LICENSE = "BSD & GPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=3f16fa8e677e45af3127c5c4bafc3c00" SRC_URI = "git://git.freescale.com/ppc/sdk/flib.git" -SRCREV = "ff692ad3c286a07717c6677177825889fe17d450" +SRCREV = "bb6162efa0767fc515c87a51191a9edba4750426" S = "${WORKDIR}/git" -- cgit v1.2.3-54-g00ecf From ef388da1f990727dee014315651dc4d7666e8a14 Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Sat, 14 Dec 2013 10:10:40 +0800 Subject: fm-ucode: update SHA for SDK 1.5 Signed-off-by: Zhenhua Luo --- meta-fsl-ppc/recipes-dpaa/fm-ucode/fm-ucode_git.bb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meta-fsl-ppc/recipes-dpaa/fm-ucode/fm-ucode_git.bb b/meta-fsl-ppc/recipes-dpaa/fm-ucode/fm-ucode_git.bb index 76d00b99..0925d80a 100644 --- a/meta-fsl-ppc/recipes-dpaa/fm-ucode/fm-ucode_git.bb +++ b/meta-fsl-ppc/recipes-dpaa/fm-ucode/fm-ucode_git.bb @@ -8,8 +8,8 @@ PR = "r1" COMPATIBLE_MACHINE = "(p1023rdb|p2041rdb|p3041ds|p4080ds|p5020ds|p5040ds|p5020ds-64b|p5040ds-64b|b4420qds|b4420qds-64b|b4860qds|b4860qds-64b|t4160qds|t4160qds-64b|t4240qds|t4240qds-64b)" inherit deploy -SRC_URI = "git://git.freescale.com/ppc/sdk/fm-ucode.git" -SRCREV = "4ca0e41de225b34962e1517c2c75bbb31a381e1a" +SRC_URI = "git://git.freescale.com/ppc/sdk/fm-ucode.git;nobranch=1" +SRCREV = "c8fe73d734ed733f39c80aa3a8f167808ba3913c" S = "${WORKDIR}/git" -- cgit v1.2.3-54-g00ecf From 3de629e21543e2ad6c360c4a80c64664bafade89 Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Sat, 14 Dec 2013 10:13:44 +0800 Subject: fmc: update SHA for SDK 1.5 Signed-off-by: Zhenhua Luo --- meta-fsl-ppc/recipes-dpaa/fmc/fmc_git.bb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/meta-fsl-ppc/recipes-dpaa/fmc/fmc_git.bb b/meta-fsl-ppc/recipes-dpaa/fmc/fmc_git.bb index 01690626..c4a16a7a 100644 --- a/meta-fsl-ppc/recipes-dpaa/fmc/fmc_git.bb +++ b/meta-fsl-ppc/recipes-dpaa/fmc/fmc_git.bb @@ -5,9 +5,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=a504ab5a8ff235e67c7301214749346c" PR = "r2" -SRCBRANCH = "sdk-v1.4.x" -SRC_URI = "git://git.freescale.com/ppc/sdk/fmc.git;branch=${SRCBRANCH}" -SRCREV = "f2e1a831a96f1d04d3d5a5970d2e54c38098cf39" +SRC_URI = "git://git.freescale.com/ppc/sdk/fmc.git;nobranch=1" +SRCREV = "363f8497cf04d242c477b12a21f679b2ec9e3fa4" DEPENDS = "libxml2 fmlib tclap" -- cgit v1.2.3-54-g00ecf From e9fd2127936fa76e5b228078e5a1b97d5f42f6f8 Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Sat, 14 Dec 2013 10:17:45 +0800 Subject: fmlib: remove unused patch Signed-off-by: Zhenhua Luo --- ...ake-the-library-install-path-configurable.patch | 43 ---------------------- 1 file changed, 43 deletions(-) delete mode 100644 meta-fsl-ppc/recipes-dpaa/fmlib/files/0001-fm-lib-make-the-library-install-path-configurable.patch diff --git a/meta-fsl-ppc/recipes-dpaa/fmlib/files/0001-fm-lib-make-the-library-install-path-configurable.patch b/meta-fsl-ppc/recipes-dpaa/fmlib/files/0001-fm-lib-make-the-library-install-path-configurable.patch deleted file mode 100644 index 4894ce3b..00000000 --- a/meta-fsl-ppc/recipes-dpaa/fmlib/files/0001-fm-lib-make-the-library-install-path-configurable.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 67b539d256520f95f3c8101f4605ea6d496982df Mon Sep 17 00:00:00 2001 -From: Zhenhua Luo -Date: Thu, 18 Oct 2012 17:28:00 +0300 -Subject: [PATCH] fm-lib: make the library install path configurable - -currently library for both 32bit target and 64bit target -is installed in /usr/lib folder, add a variable to make the -install path configurable - -Signed-off-by: Zhenhua Luo ---- - Makefile | 8 +++++--- - 1 file changed, 5 insertions(+), 3 deletions(-) - -diff --git a/Makefile b/Makefile -index 06fe930..d59f44a 100644 ---- a/Makefile -+++ b/Makefile -@@ -59,6 +59,8 @@ endif - - INSTALL?=install - -+LIB_DEST_DIR?=$(PREFIX)/lib -+ - # Don't forget to increment .version before doing a new release! - FM_LIB_VERSION:=$(shell cat .version) - -@@ -118,9 +120,9 @@ archive: all .version - - install-%: %.a - @(echo "Installing...") -- @($(INSTALL) -d $(DESTDIR)$(PREFIX)/lib) -- @($(INSTALL) $< $(DESTDIR)$(PREFIX)/lib) -- @(ln -s $(DESTDIR)$(PREFIX)/lib/$< $(DESTDIR)$(PREFIX)/lib/libfm.a) -+ @($(INSTALL) -d $(DESTDIR)$(LIB_DEST_DIR)) -+ @($(INSTALL) $< $(DESTDIR)$(LIB_DEST_DIR)) -+ @(ln -s $(DESTDIR)$(LIB_DEST_DIR)/$< $(DESTDIR)$(LIB_DEST_DIR)/libfm.a) - @(cp -r -p ./include $(DESTDIR)$(PREFIX)) - @($(INSTALL) -d $(DESTDIR)$(PREFIX)/share/doc/fm-lib-$(FM_LIB_VERSION)) - @($(INSTALL) $(FM_LIB_DOCFILES) $(DESTDIR)$(PREFIX)/share/doc/fm-lib-$(FM_LIB_VERSION)) --- -1.7.9.5 - -- cgit v1.2.3-54-g00ecf From 78fdc20c276fbabaebd1526134c9e32dde95658a Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Sat, 14 Dec 2013 10:31:28 +0800 Subject: hv-cfg: update SHA for SDK 1.5 Signed-off-by: Zhenhua Luo --- meta-fsl-ppc/recipes-virtualization/hv-cfg/hv-cfg_git.bb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/meta-fsl-ppc/recipes-virtualization/hv-cfg/hv-cfg_git.bb b/meta-fsl-ppc/recipes-virtualization/hv-cfg/hv-cfg_git.bb index 2c6bb85a..a92ef335 100644 --- a/meta-fsl-ppc/recipes-virtualization/hv-cfg/hv-cfg_git.bb +++ b/meta-fsl-ppc/recipes-virtualization/hv-cfg/hv-cfg_git.bb @@ -15,13 +15,11 @@ DEPENDS += "dtc-native" # this package is specific to the machine itself INHIBIT_DEFAULT_DEPS = "1" PACKAGE_ARCH = "${MACHINE_ARCH}" -COMPATIBLE_HOST_fslmachine = ".*" -COMPATIBLE_HOST ?= "(none)" inherit deploy -SRCREV = "d037ab9d5b9ecd58e10a7dac2b601d781ed9b5bf" -SRC_URI = "git://git.freescale.com/ppc/sdk/hv-cfg.git" +SRC_URI = "git://git.freescale.com/ppc/sdk/hv-cfg.git;nobranch=1" +SRCREV = "39f1e585e0a70634e009b2e720407b27f787ace1" S = "${WORKDIR}/git" @@ -43,4 +41,6 @@ addtask deploy after do_install PACKAGES += "${PN}-image" FILES_${PN}-image += "/boot" +COMPATIBLE_HOST_fslmachine = ".*" +COMPATIBLE_HOST ?= "(none)" ALLOW_EMPTY_${PN} = "1" -- cgit v1.2.3-54-g00ecf From c8c0d00cb34b6d4520058e3e7c0c61d5ac67321c Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Sat, 14 Dec 2013 10:45:58 +0800 Subject: hypervisor: update SHA for SDK 1.5 Signed-off-by: Zhenhua Luo --- .../recipes-virtualization/hypervisor/hypervisor_git.bb | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/meta-fsl-ppc/recipes-virtualization/hypervisor/hypervisor_git.bb b/meta-fsl-ppc/recipes-virtualization/hypervisor/hypervisor_git.bb index ff89bfa2..61ecbc17 100644 --- a/meta-fsl-ppc/recipes-virtualization/hypervisor/hypervisor_git.bb +++ b/meta-fsl-ppc/recipes-virtualization/hypervisor/hypervisor_git.bb @@ -13,19 +13,18 @@ S = "${WORKDIR}/git" # TODO: fix dtc to use the already built package SRC_URI = " \ - git://git.freescale.com/ppc/sdk/hypervisor/hypervisor.git;name=hypervisor \ - git://git.freescale.com/ppc/sdk/hypervisor/kconfig.git;name=kconfig;destsuffix=git/kconfig \ - git://git.freescale.com/ppc/sdk/hypervisor/libos.git;name=libos;destsuffix=git/libos \ + git://git.freescale.com/ppc/sdk/hypervisor/hypervisor.git;name=hypervisor;nobranch=1 \ + git://git.freescale.com/ppc/sdk/hypervisor/kconfig.git;name=kconfig;destsuffix=git/kconfig;nobranch=1 \ + git://git.freescale.com/ppc/sdk/hypervisor/libos.git;name=libos;destsuffix=git/libos;nobranch=1 \ git://www.jdl.com/software/dtc.git;name=dtc;destsuffix=dtc \ - git://git.freescale.com/ppc/sdk/hypertrk.git;name=hypertrk;destsuffix=git/hypertrk \ - file://0001-fix-sizeof-pointer-memaccess-error.patch \ + git://git.freescale.com/ppc/sdk/hypertrk.git;name=hypertrk;destsuffix=git/hypertrk;nobranch=1 \ file://81-fsl-embedded-hv.rules \ " SRCREV_FORMAT="hypervisor" -SRCREV = "e6092cdf2a225c66c1ea46b1151eb828da29d139" +SRCREV = "acbde15272d46a80bcf4a00d7d18ca4a86e49c16" SRCREV_kconfig = "a56025d4da992b856796b0eccac2e410d751dbac" -SRCREV_libos = "5268371581f3ef3959be2a53235edfa6a8c6aa7c" +SRCREV_libos = "4691387e15be78d140142104f30b3f356281c46a" SRCREV_dtc = "033089f29099bdfd5c2d6986cdb9fd07b16cfde0" SRCREV_hypertrk = "975c98b562186afbd3bbf103ae54b96cf9b3e533" -- cgit v1.2.3-54-g00ecf From 5c05d26bd5ac4c8dce5d33a00cbf4c9794481b16 Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Sat, 14 Dec 2013 10:58:49 +0800 Subject: linux: update SHA for SDK 1.5 Signed-off-by: Zhenhua Luo --- meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.bb | 2 -- meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc | 6 ++---- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.bb b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.bb index df18cfe1..0ff68ced 100644 --- a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.bb +++ b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.bb @@ -7,8 +7,6 @@ LICENSE = "GPLv2" require recipes-kernel/linux/linux-qoriq-sdk.inc -SRC_URI += "file://libtraceevent-Remove-hard-coded-include-to-usr-local-include-in-Makefile.patch" - PR = "${INC_PR}.1" DEPENDS_append = " libgcc" diff --git a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc index 0be61090..30a0378d 100644 --- a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc +++ b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc @@ -3,10 +3,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7" PV = "3.8" INC_PR = "r11" -SRCBRANCH = "sdk-v1.4.x" -SRCREV = "4b66366af2d77de68f4bd6548d07421e13d3df05" -SRC_URI = "git://git.freescale.com/ppc/sdk/linux.git;branch=${SRCBRANCH} \ - " +SRC_URI = "git://git.freescale.com/ppc/sdk/linux.git;nobranch=1" +SRCREV = "3edd71eeb4e4ae27baf539e0a5f0c8e8261bf65b" KSRC ?= "" S = '${@base_conditional("KSRC", "", "${WORKDIR}/git", "${KSRC}", d)}' -- cgit v1.2.3-54-g00ecf From f228b05f6ab43303eab20c28563395d4c2b4d220 Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Sat, 14 Dec 2013 11:03:03 +0800 Subject: qemu: update SHA for SDK 1.5 Signed-off-by: Zhenhua Luo --- meta-fsl-ppc/recipes-devtools/qemu/qemu_fslgit.bb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/meta-fsl-ppc/recipes-devtools/qemu/qemu_fslgit.bb b/meta-fsl-ppc/recipes-devtools/qemu/qemu_fslgit.bb index 98c67ca1..810794d5 100644 --- a/meta-fsl-ppc/recipes-devtools/qemu/qemu_fslgit.bb +++ b/meta-fsl-ppc/recipes-devtools/qemu/qemu_fslgit.bb @@ -6,9 +6,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \ # This means v1.4 with FSL specific patches applied PV = "1.4+fsl" -SRCBRANCH = "sdk-v1.4.x" -SRC_URI = "git://git.freescale.com/ppc/sdk/qemu.git;branch=${SRCBRANCH}" -SRCREV = "8713c58725df407dbbedb48fa315248d0100720c" +SRC_URI = "git://git.freescale.com/ppc/sdk/qemu.git;nobranch=1" +SRCREV = "99231018edf75522aea2630e4089c9163566fb73" SRC_URI += " \ file://0001-doc-Fix-texinfo-table-markup-in-qemu-options.hx.patch \ -- cgit v1.2.3-54-g00ecf From 8eee6a62e5ec6f000bb750af51782e34fc8e0bcf Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Sat, 14 Dec 2013 11:06:48 +0800 Subject: rcw: update SHA for SDK 1.5 Signed-off-by: Zhenhua Luo --- meta-fsl-ppc/recipes-bsp/rcw/rcw_git.bb | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/meta-fsl-ppc/recipes-bsp/rcw/rcw_git.bb b/meta-fsl-ppc/recipes-bsp/rcw/rcw_git.bb index 8da72ea8..f2d0164f 100644 --- a/meta-fsl-ppc/recipes-bsp/rcw/rcw_git.bb +++ b/meta-fsl-ppc/recipes-bsp/rcw/rcw_git.bb @@ -8,14 +8,11 @@ LIC_FILES_CHKSUM = "file://rcw.py;beginline=8;endline=28;md5=9ba0b28922dd187b06b # this package is specific to the machine itself INHIBIT_DEFAULT_DEPS = "1" PACKAGE_ARCH = "${MACHINE_ARCH}" -COMPATIBLE_HOST_fslmachine = ".*" -COMPATIBLE_HOST ?= "(none)" inherit deploy -SRCBRANCH = "sdk-v1.4.x" -SRC_URI = "git://git.freescale.com/ppc/sdk/rcw.git;branch=${SRCBRANCH}" -SRCREV = "5d3c819bcca6d09dcf7b52b3f2855dda304a5997" +SRC_URI = "git://git.freescale.com/ppc/sdk/rcw.git;nobranch=1" +SRCREV = "bc38737b5cb08336a075cb38481881f87b33b7a1" S = "${WORKDIR}/git" @@ -39,4 +36,6 @@ addtask deploy after do_install PACKAGES += "${PN}-image" FILES_${PN}-image += "/boot" +COMPATIBLE_HOST_fslmachine = ".*" +COMPATIBLE_HOST ?= "(none)" ALLOW_EMPTY_${PN} = "1" -- cgit v1.2.3-54-g00ecf From f14d491bfa41651eff063042be0b868240fd47e7 Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Sat, 14 Dec 2013 11:08:25 +0800 Subject: skmm: remove obsolete recipe Signed-off-by: Zhenhua Luo --- meta-fsl-ppc/recipes-kernel/skmm/skmm_git.bb | 34 ---------------------------- 1 file changed, 34 deletions(-) delete mode 100644 meta-fsl-ppc/recipes-kernel/skmm/skmm_git.bb diff --git a/meta-fsl-ppc/recipes-kernel/skmm/skmm_git.bb b/meta-fsl-ppc/recipes-kernel/skmm/skmm_git.bb deleted file mode 100644 index 31e4489f..00000000 --- a/meta-fsl-ppc/recipes-kernel/skmm/skmm_git.bb +++ /dev/null @@ -1,34 +0,0 @@ -DESCRIPTION = "SKMM application for PCIe endpoint" -SECTION = "skmm" -LICENSE = "BSD & GPLv2" -LIC_FILES_CHKSUM = "file://Makefile;endline=30;md5=39e58bedc879163c9338596e52df5b1f" - -DEPENDS = "libedit" - -SRCBRANCH = "sdk-v1.4.x" -SRC_URI = "git://git.freescale.com/ppc/sdk/skmm-ep.git;branch=${SRCBRANCH}" -SRCREV = "80d8393a2033b3b0cc8f885702d7b288956f3a37" - -COMPATIBLE_MACHINE = "(p4080ds|t4240qds)" - -S = "${WORKDIR}/git" - -EXTRA_OEMAKE = 'MACHINE=${MACHINE}' - -export LIBEDIT_CFLAGS="$(pkg-config --cflags libedit)" -export LIBEDIT_LDFLAGS="$(pkg-config --libs --static libedit)" - -do_compile () { - export ARCH=${TARGET_ARCH} - oe_runmake HOST=x86_64 clean - oe_runmake HOST=x86_64 - oe_runmake HOST=powerpc clean - oe_runmake HOST=powerpc -} - -do_install () { - oe_runmake ARCH=${TARGET_ARCH} HOST=x86_64 install DESTDIR=${D} - oe_runmake ARCH=${TARGET_ARCH} HOST=powerpc install DESTDIR=${D} -} - -FILES_${PN} += "/home/root/.skmm/*" -- cgit v1.2.3-54-g00ecf From a4e5ae34e54612f7c3edc2ff7c2291901a120660 Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Sat, 14 Dec 2013 11:12:13 +0800 Subject: skmm-ep: add recipe Signed-off-by: Zhenhua Luo --- .../recipes-extended/skmm-ep/skmm-ep_git.bb | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 meta-fsl-ppc/recipes-extended/skmm-ep/skmm-ep_git.bb diff --git a/meta-fsl-ppc/recipes-extended/skmm-ep/skmm-ep_git.bb b/meta-fsl-ppc/recipes-extended/skmm-ep/skmm-ep_git.bb new file mode 100644 index 00000000..65659b9a --- /dev/null +++ b/meta-fsl-ppc/recipes-extended/skmm-ep/skmm-ep_git.bb @@ -0,0 +1,27 @@ +DESCRIPTION = "SKMM application for PCIe endpoint" +SECTION = "skmm-ep" +LICENSE = "BSD & GPLv2" +LIC_FILES_CHKSUM = "file://Makefile;endline=30;md5=39e58bedc879163c9338596e52df5b1f" + +DEPENDS = "libedit openssl" + +SRC_URI = "git://git.freescale.com/ppc/sdk/skmm-ep.git;nobranch=1" +SRCREV = "448522aa1ba3f0c4a1481631dc1c3b168d410a61" + +COMPATIBLE_MACHINE = "(p4080ds|t4240qds|c293pcie)" + +S = "${WORKDIR}/git" + +EXTRA_OEMAKE = 'MACHINE=${MACHINE}' + +export LIBEDIT_CFLAGS="$(pkg-config --cflags libedit)" +export LIBEDIT_LDFLAGS="$(pkg-config --libs --static libedit)" + +do_compile () { + export ARCH=${TARGET_ARCH} + oe_runmake +} + +do_install () { + oe_runmake ARCH=${TARGET_ARCH} install DESTDIR=${D} +} -- cgit v1.2.3-54-g00ecf From 17e098c80ba8923fd2626172872b6b11f75b4fb2 Mon Sep 17 00:00:00 2001 From: Zongchun Yu Date: Wed, 9 Oct 2013 15:35:30 +0800 Subject: u-boot:add support for fsl external toolchain Signed-off-by: Zongchun Yu Tested-by: Zhenhua Luo --- meta-fsl-ppc/recipes-bsp/u-boot/u-boot_git.bb | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/meta-fsl-ppc/recipes-bsp/u-boot/u-boot_git.bb b/meta-fsl-ppc/recipes-bsp/u-boot/u-boot_git.bb index e5820f70..fecdd71d 100644 --- a/meta-fsl-ppc/recipes-bsp/u-boot/u-boot_git.bb +++ b/meta-fsl-ppc/recipes-bsp/u-boot/u-boot_git.bb @@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=1707d6db1d42237583f50183a5651ecb" PR = "r30" INHIBIT_DEFAULT_DEPS = "1" -DEPENDS = "boot-format-native virtual/${TARGET_PREFIX}gcc libgcc" +DEPENDS = "boot-format-native libgcc ${@base_contains('TCMODE', 'external-fsl', '', 'virtual/${TARGET_PREFIX}gcc', d)}" inherit deploy @@ -17,6 +17,9 @@ SRC_URI = "git://git.freescale.com/ppc/sdk/u-boot.git;branch=${SRCBRANCH} \ SRCREV = "831b30de4b768f0b3b7dbfa11739b14cea612d7e" python () { + if d.getVar("TCMODE", True) == "external-fsl": + return + ml = d.getVar("MULTILIB_VARIANTS", True) arch = d.getVar("OVERRIDES", True) @@ -24,20 +27,18 @@ python () { raise bb.parse.SkipPackage("Building the u-boot for this arch requires multilib to be enabled") } -DEPENDS_append_e5500-64b = " lib32-gcc-cross lib32-libgcc" +DEPENDS_append_e5500-64b = "${@base_contains('TCMODE', 'external-fsl', '', ' lib32-gcc-cross lib32-libgcc', d)}" PATH_append_e5500-64b = ":${STAGING_BINDIR_NATIVE}/${DEFAULTTUNE_virtclass-multilib-lib32}${TARGET_VENDOR_virtclass-multilib-lib32}-${HOST_OS}/" -TOOLCHAIN_OPTIONS_append_e5500-64b = "/../lib32-${MACHINE}" -TARGET_VENDOR_virtclass-multilib-lib32 ?= "-${DISTRO}mllib32" -WRAP_TARGET_PREFIX_e5500-64b = "powerpc${TARGET_VENDOR_virtclass-multilib-lib32}-${HOST_OS}-" +TOOLCHAIN_OPTIONS_append_e5500-64b = "${@base_contains('TCMODE', 'external-fsl', '', '/../lib32-${MACHINE}', d)}" +TARGET_VENDOR_virtclass-multilib-lib32 ?= "${@base_contains('TCMODE', 'external-fsl', '', '-${DISTRO}mllib32', d)}" +WRAP_TARGET_PREFIX_e5500-64b := "powerpc${TARGET_VENDOR_virtclass-multilib-lib32}-${HOST_OS}-" -DEPENDS_append_e6500-64b = " lib32-gcc-cross lib32-libgcc" +DEPENDS_append_e6500-64b = "${@base_contains('TCMODE', 'external-fsl', '', ' lib32-gcc-cross lib32-libgcc', d)}" PATH_append_e6500-64b = ":${STAGING_BINDIR_NATIVE}/${DEFAULTTUNE_virtclass-multilib-lib32}${TARGET_VENDOR_virtclass-multilib-lib32}-${HOST_OS}/" -TOOLCHAIN_OPTIONS_append_e6500-64b = "/../lib32-${MACHINE}" -TARGET_VENDOR_virtclass-multilib-lib32 ?= "-${DISTRO}mllib32" -WRAP_TARGET_PREFIX_e6500-64b = "powerpc${TARGET_VENDOR_virtclass-multilib-lib32}-${HOST_OS}-" - +TOOLCHAIN_OPTIONS_append_e6500-64b = "${@base_contains('TCMODE', 'external-fsl', '', '/../lib32-${MACHINE}', d)}" +TARGET_VENDOR_virtclass-multilib-lib32 ?= "${@base_contains('TCMODE', 'external-fsl', '', '-${DISTRO}mllib32', d)}" +WRAP_TARGET_PREFIX_e6500-64b := "powerpc${TARGET_VENDOR_virtclass-multilib-lib32}-${HOST_OS}-" WRAP_TARGET_PREFIX = "${TARGET_PREFIX}" -EXTRA_OEMAKE = 'CROSS_COMPILE=${WRAP_TARGET_PREFIX} CC="${WRAP_TARGET_PREFIX}gcc ${TOOLCHAIN_OPTIONS}"' PACKAGE_ARCH = "${MACHINE_ARCH}" @@ -46,6 +47,9 @@ UBOOT_LOCALVERSION = "${@d.getVar('SDK_VERSION', True).partition(' ')[0]}" USRC ?= "" S = '${@base_conditional("USRC", "", "${WORKDIR}/git", "${USRC}", d)}' +CROSS_COMPILE = '${@base_conditional("TCMODE", "external-fsl", "${TARGET_PREFIX}", "${WRAP_TARGET_PREFIX}", d)}' +EXTRA_OEMAKE = 'CROSS_COMPILE=${CROSS_COMPILE} CC="${CROSS_COMPILE}gcc ${TOOLCHAIN_OPTIONS}"' + do_compile () { unset LDFLAGS unset CFLAGS -- cgit v1.2.3-54-g00ecf From 2d8eca07de612c1dfc8b8780c2da7773ad17a9eb Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Tue, 29 Oct 2013 16:19:19 +0800 Subject: u-boot: replace tab with 4 spaces Signed-off-by: Ting Liu --- meta-fsl-ppc/recipes-bsp/u-boot/u-boot_git.bb | 174 +++++++++++++------------- 1 file changed, 87 insertions(+), 87 deletions(-) diff --git a/meta-fsl-ppc/recipes-bsp/u-boot/u-boot_git.bb b/meta-fsl-ppc/recipes-bsp/u-boot/u-boot_git.bb index fecdd71d..f4f2dcac 100644 --- a/meta-fsl-ppc/recipes-bsp/u-boot/u-boot_git.bb +++ b/meta-fsl-ppc/recipes-bsp/u-boot/u-boot_git.bb @@ -17,14 +17,14 @@ SRC_URI = "git://git.freescale.com/ppc/sdk/u-boot.git;branch=${SRCBRANCH} \ SRCREV = "831b30de4b768f0b3b7dbfa11739b14cea612d7e" python () { - if d.getVar("TCMODE", True) == "external-fsl": - return + if d.getVar("TCMODE", True) == "external-fsl": + return - ml = d.getVar("MULTILIB_VARIANTS", True) - arch = d.getVar("OVERRIDES", True) + ml = d.getVar("MULTILIB_VARIANTS", True) + arch = d.getVar("OVERRIDES", True) - if ("e5500-64b:" in arch or "e6500-64b:" in arch) and not "lib32" in ml: - raise bb.parse.SkipPackage("Building the u-boot for this arch requires multilib to be enabled") + if ("e5500-64b:" in arch or "e6500-64b:" in arch) and not "lib32" in ml: + raise bb.parse.SkipPackage("Building the u-boot for this arch requires multilib to be enabled") } DEPENDS_append_e5500-64b = "${@base_contains('TCMODE', 'external-fsl', '', ' lib32-gcc-cross lib32-libgcc', d)}" @@ -51,99 +51,99 @@ CROSS_COMPILE = '${@base_conditional("TCMODE", "external-fsl", "${TARGET_PREFIX} EXTRA_OEMAKE = 'CROSS_COMPILE=${CROSS_COMPILE} CC="${CROSS_COMPILE}gcc ${TOOLCHAIN_OPTIONS}"' do_compile () { - unset LDFLAGS - unset CFLAGS - unset CPPFLAGS - - if [ ! -e ${B}/.scmversion -a ! -e ${S}/.scmversion ] - then - echo ${UBOOT_LOCALVERSION} > ${B}/.scmversion - echo ${UBOOT_LOCALVERSION} > ${S}/.scmversion - fi - - if [ "x${UBOOT_MACHINES}" = "x" ]; then - UBOOT_MACHINES=${UBOOT_MACHINE} - fi - - for board in ${UBOOT_MACHINES}; do - oe_runmake O=${board} distclean - oe_runmake O=${board} ${board} - oe_runmake O=${board} all - - case "${board}" in - *SDCARD*) UBOOT_TARGET="u-boot-sd";; - *SPIFLASH*) UBOOT_TARGET="u-boot-spi";; - *NAND*) UBOOT_TARGET="u-boot-nand";; - *) UBOOT_TARGET="";; - esac - - if [ "x${UBOOT_TARGET}" != "x" ]; then - if [ "${UBOOT_TARGET}" = "u-boot-sd" ]; then - cp ${S}/${board}/u-boot.bin ${S}/${board}/${UBOOT_TARGET}.bin + unset LDFLAGS + unset CFLAGS + unset CPPFLAGS + + if [ ! -e ${B}/.scmversion -a ! -e ${S}/.scmversion ] + then + echo ${UBOOT_LOCALVERSION} > ${B}/.scmversion + echo ${UBOOT_LOCALVERSION} > ${S}/.scmversion + fi + + if [ "x${UBOOT_MACHINES}" = "x" ]; then + UBOOT_MACHINES=${UBOOT_MACHINE} + fi + + for board in ${UBOOT_MACHINES}; do + oe_runmake O=${board} distclean + oe_runmake O=${board} ${board} + oe_runmake O=${board} all + + case "${board}" in + *SDCARD*) UBOOT_TARGET="u-boot-sd";; + *SPIFLASH*) UBOOT_TARGET="u-boot-spi";; + *NAND*) UBOOT_TARGET="u-boot-nand";; + *) UBOOT_TARGET="";; + esac + + if [ "x${UBOOT_TARGET}" != "x" ]; then + if [ "${UBOOT_TARGET}" = "u-boot-sd" ]; then + cp ${S}/${board}/u-boot.bin ${S}/${board}/${UBOOT_TARGET}.bin elif [ "${UBOOT_TARGET}" = "u-boot-nand" ];then - if [ "${DEFAULTTUNE}" = "ppce500v2" ];then - if echo $board |egrep "(P1010RDB|P1020RDB|P1021RDB|P1024RDB|P2020RDB|P1022DS|P1025RDB|BSC9131RDB|BSC9132QDS)" 2>&1 >/dev/null;then + if [ "${DEFAULTTUNE}" = "ppce500v2" ];then + if echo $board |egrep -q "(P1010RDB|P1020RDB|P1021RDB|P1024RDB|P2020RDB|P1022DS|P1025RDB|BSC9131)";then cp ${S}/${board}/u-boot-with-spl.bin ${S}/${board}/${UBOOT_TARGET}.bin fi else cp ${S}/${board}/u-boot.bin ${S}/${board}/${UBOOT_TARGET}.bin fi - else - if [ -n "${BOOTFORMAT_CONFIG}" ];then - ${STAGING_BINDIR_NATIVE}/boot_format \ - ${STAGING_DATADIR_NATIVE}/boot_format/${BOOTFORMAT_CONFIG} \ - ${S}/${board}/u-boot.bin -spi ${S}/${board}/${UBOOT_TARGET}.bin - else - cp ${S}/${board}/u-boot.bin ${S}/${board}/${UBOOT_TARGET}.bin - fi - fi - fi - done + else + if [ -n "${BOOTFORMAT_CONFIG}" ];then + ${STAGING_BINDIR_NATIVE}/boot_format \ + ${STAGING_DATADIR_NATIVE}/boot_format/${BOOTFORMAT_CONFIG} \ + ${S}/${board}/u-boot.bin -spi ${S}/${board}/${UBOOT_TARGET}.bin + else + cp ${S}/${board}/u-boot.bin ${S}/${board}/${UBOOT_TARGET}.bin + fi + fi + fi + done } do_install(){ - if [ "x${UBOOT_MACHINES}" = "x" ]; then - UBOOT_MACHINES=${UBOOT_MACHINE} - fi - - for board in ${UBOOT_MACHINES}; do - case "${board}" in - *SDCARD*) UBOOT_TARGET="u-boot-sd";; - *SPIFLASH*) UBOOT_TARGET="u-boot-spi";; - *NAND*) UBOOT_TARGET="u-boot-nand";; - *) UBOOT_TARGET="u-boot";; - esac - - if [ -f ${S}/${board}/${UBOOT_TARGET}.bin ]; then - mkdir -p ${D}/boot/ - install ${S}/${board}/${UBOOT_TARGET}.bin ${D}/boot/${UBOOT_TARGET}-${board}-${PV}-${PR}.bin - ln -sf ${UBOOT_TARGET}-${board}-${PV}-${PR}.bin ${D}/boot/${UBOOT_TARGET}.bin - fi - done + if [ "x${UBOOT_MACHINES}" = "x" ]; then + UBOOT_MACHINES=${UBOOT_MACHINE} + fi + + for board in ${UBOOT_MACHINES}; do + case "${board}" in + *SDCARD*) UBOOT_TARGET="u-boot-sd";; + *SPIFLASH*) UBOOT_TARGET="u-boot-spi";; + *NAND*) UBOOT_TARGET="u-boot-nand";; + *) UBOOT_TARGET="u-boot";; + esac + + if [ -f ${S}/${board}/${UBOOT_TARGET}.bin ]; then + mkdir -p ${D}/boot/ + install ${S}/${board}/${UBOOT_TARGET}.bin ${D}/boot/${UBOOT_TARGET}-${board}-${PV}-${PR}.bin + ln -sf ${UBOOT_TARGET}-${board}-${PV}-${PR}.bin ${D}/boot/${UBOOT_TARGET}.bin + fi + done } do_deploy(){ - if [ "x${UBOOT_MACHINES}" = "x" ]; then - UBOOT_MACHINES=${UBOOT_MACHINE} - fi - - for board in ${UBOOT_MACHINES}; do - case "${board}" in - *SDCARD*) UBOOT_TARGET="u-boot-sd";; - *SPIFLASH*) UBOOT_TARGET="u-boot-spi";; - *NAND*) UBOOT_TARGET="u-boot-nand";; - *) UBOOT_TARGET="u-boot";; - esac - - if [ -f ${S}/${board}/${UBOOT_TARGET}.bin ]; then - mkdir -p ${DEPLOYDIR} - install ${S}/${board}/${UBOOT_TARGET}.bin ${DEPLOYDIR}/${UBOOT_TARGET}-${board}-${PV}-${PR}.bin - - cd ${DEPLOYDIR} - rm -f ${UBOOT_TARGET}-${board}.bin - ln -sf ${UBOOT_TARGET}-${board}-${PV}-${PR}.bin ${UBOOT_TARGET}-${board}.bin - fi - done + if [ "x${UBOOT_MACHINES}" = "x" ]; then + UBOOT_MACHINES=${UBOOT_MACHINE} + fi + + for board in ${UBOOT_MACHINES}; do + case "${board}" in + *SDCARD*) UBOOT_TARGET="u-boot-sd";; + *SPIFLASH*) UBOOT_TARGET="u-boot-spi";; + *NAND*) UBOOT_TARGET="u-boot-nand";; + *) UBOOT_TARGET="u-boot";; + esac + + if [ -f ${S}/${board}/${UBOOT_TARGET}.bin ]; then + mkdir -p ${DEPLOYDIR} + install ${S}/${board}/${UBOOT_TARGET}.bin ${DEPLOYDIR}/${UBOOT_TARGET}-${board}-${PV}-${PR}.bin + + cd ${DEPLOYDIR} + rm -f ${UBOOT_TARGET}-${board}.bin + ln -sf ${UBOOT_TARGET}-${board}-${PV}-${PR}.bin ${UBOOT_TARGET}-${board}.bin + fi + done } addtask deploy after do_install -- cgit v1.2.3-54-g00ecf From 423137ea3e94ad6281dd14467076f4d308006edd Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Tue, 29 Oct 2013 16:58:23 +0800 Subject: u-boot: simplify the compile steps Signed-off-by: Ting Liu --- meta-fsl-ppc/recipes-bsp/u-boot/u-boot_git.bb | 31 ++++++++++++--------------- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/meta-fsl-ppc/recipes-bsp/u-boot/u-boot_git.bb b/meta-fsl-ppc/recipes-bsp/u-boot/u-boot_git.bb index f4f2dcac..bfd2d79c 100644 --- a/meta-fsl-ppc/recipes-bsp/u-boot/u-boot_git.bb +++ b/meta-fsl-ppc/recipes-bsp/u-boot/u-boot_git.bb @@ -77,26 +77,23 @@ do_compile () { *) UBOOT_TARGET="";; esac + # deal with sd/spi/nand image + UBOOT_SOURCE=u-boot if [ "x${UBOOT_TARGET}" != "x" ]; then - if [ "${UBOOT_TARGET}" = "u-boot-sd" ]; then - cp ${S}/${board}/u-boot.bin ${S}/${board}/${UBOOT_TARGET}.bin - elif [ "${UBOOT_TARGET}" = "u-boot-nand" ];then - if [ "${DEFAULTTUNE}" = "ppce500v2" ];then - if echo $board |egrep -q "(P1010RDB|P1020RDB|P1021RDB|P1024RDB|P2020RDB|P1022DS|P1025RDB|BSC9131)";then - cp ${S}/${board}/u-boot-with-spl.bin ${S}/${board}/${UBOOT_TARGET}.bin - fi - else - cp ${S}/${board}/u-boot.bin ${S}/${board}/${UBOOT_TARGET}.bin - fi - else - if [ -n "${BOOTFORMAT_CONFIG}" ];then - ${STAGING_BINDIR_NATIVE}/boot_format \ - ${STAGING_DATADIR_NATIVE}/boot_format/${BOOTFORMAT_CONFIG} \ - ${S}/${board}/u-boot.bin -spi ${S}/${board}/${UBOOT_TARGET}.bin - else - cp ${S}/${board}/u-boot.bin ${S}/${board}/${UBOOT_TARGET}.bin + # some boards' nand image was named as u-boot-with-spl + if [ "${UBOOT_TARGET}" = "u-boot-nand" ];then + if echo $board |egrep -q "(P1010RDB|P1020RDB|P1021RDB|P1024RDB|P2020RDB|P1022DS|P1025RDB|BSC913)";then + UBOOT_SOURCE=u-boot-with-spl fi fi + cp ${S}/${board}/${UBOOT_SOURCE}.bin ${S}/${board}/${UBOOT_TARGET}.bin + + # use boot-format to regenerate spi image if BOOTFORMAT_CONFIG is not empty + if [ "${UBOOT_TARGET}" = "u-boot-spi" ] && [ -n "${BOOTFORMAT_CONFIG}" ];then + ${STAGING_BINDIR_NATIVE}/boot_format \ + ${STAGING_DATADIR_NATIVE}/boot_format/${BOOTFORMAT_CONFIG} \ + ${S}/${board}/${UBOOT_SOURCE}.bin -spi ${S}/${board}/${UBOOT_TARGET}.bin + fi fi done } -- cgit v1.2.3-54-g00ecf From 3dcd4c00ee3fef292a0fcbcacc70f5d8539b5eef Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Tue, 29 Oct 2013 14:21:04 +0800 Subject: u-boot: use spl version for sd and spi image Signed-off-by: Ting Liu --- meta-fsl-ppc/recipes-bsp/u-boot/u-boot_git.bb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/meta-fsl-ppc/recipes-bsp/u-boot/u-boot_git.bb b/meta-fsl-ppc/recipes-bsp/u-boot/u-boot_git.bb index bfd2d79c..2b6f1a01 100644 --- a/meta-fsl-ppc/recipes-bsp/u-boot/u-boot_git.bb +++ b/meta-fsl-ppc/recipes-bsp/u-boot/u-boot_git.bb @@ -85,6 +85,14 @@ do_compile () { if echo $board |egrep -q "(P1010RDB|P1020RDB|P1021RDB|P1024RDB|P2020RDB|P1022DS|P1025RDB|BSC913)";then UBOOT_SOURCE=u-boot-with-spl fi + elif [ "${UBOOT_TARGET}" = "u-boot-spi" ];then + if echo $board |egrep -q "(P1020RDB|P1021RDB|P2020RDB|P1022DS)";then + UBOOT_SOURCE=u-boot-with-spl + fi + elif [ "${UBOOT_TARGET}" = "u-boot-sd" ];then + if echo $board |egrep -q "(P1020RDB|P1021RDB|P2020RDB|P1022DS)";then + UBOOT_SOURCE=u-boot-with-spl + fi fi cp ${S}/${board}/${UBOOT_SOURCE}.bin ${S}/${board}/${UBOOT_TARGET}.bin -- cgit v1.2.3-54-g00ecf From 0951d698e070046f05f65dc1f88f2e806dcbf5d3 Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Fri, 18 Oct 2013 13:43:10 +0800 Subject: u-boot: update SHA for SDK 1.5 Signed-off-by: Zhenhua Luo Signed-off-by: Ting Liu --- meta-fsl-ppc/recipes-bsp/u-boot/u-boot_git.bb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/meta-fsl-ppc/recipes-bsp/u-boot/u-boot_git.bb b/meta-fsl-ppc/recipes-bsp/u-boot/u-boot_git.bb index 2b6f1a01..4f1c61f3 100644 --- a/meta-fsl-ppc/recipes-bsp/u-boot/u-boot_git.bb +++ b/meta-fsl-ppc/recipes-bsp/u-boot/u-boot_git.bb @@ -11,10 +11,10 @@ DEPENDS = "boot-format-native libgcc ${@base_contains('TCMODE', 'external-fsl', inherit deploy -SRCBRANCH = "sdk-v1.4.x" +SRCBRANCH = "sdk-v1.5.x" SRC_URI = "git://git.freescale.com/ppc/sdk/u-boot.git;branch=${SRCBRANCH} \ file://Fix-the-depend-race-issue.patch" -SRCREV = "831b30de4b768f0b3b7dbfa11739b14cea612d7e" +SRCREV = "5438fc1ca159c8f5724272efd1289e6d49771e69" python () { if d.getVar("TCMODE", True) == "external-fsl": @@ -82,15 +82,15 @@ do_compile () { if [ "x${UBOOT_TARGET}" != "x" ]; then # some boards' nand image was named as u-boot-with-spl if [ "${UBOOT_TARGET}" = "u-boot-nand" ];then - if echo $board |egrep -q "(P1010RDB|P1020RDB|P1021RDB|P1024RDB|P2020RDB|P1022DS|P1025RDB|BSC913)";then + if echo $board |egrep -q "(P1010RDB|P1020RDB|P1021RDB|P2020RDB|P1022DS|BSC913)";then UBOOT_SOURCE=u-boot-with-spl fi elif [ "${UBOOT_TARGET}" = "u-boot-spi" ];then - if echo $board |egrep -q "(P1020RDB|P1021RDB|P2020RDB|P1022DS)";then + if echo $board |egrep -q "(P1010RDB|P1020RDB|P1021RDB|P2020RDB|P1022DS)";then UBOOT_SOURCE=u-boot-with-spl fi elif [ "${UBOOT_TARGET}" = "u-boot-sd" ];then - if echo $board |egrep -q "(P1020RDB|P1021RDB|P2020RDB|P1022DS)";then + if echo $board |egrep -q "(P1010RDB|P1020RDB|P1021RDB|P2020RDB|P1022DS)";then UBOOT_SOURCE=u-boot-with-spl fi fi -- cgit v1.2.3-54-g00ecf From 5bcf7978691e878c26c81d81c0aadeb8733e355a Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Fri, 18 Oct 2013 13:44:46 +0800 Subject: usdpaa: update SHA for SDK 1.5 Signed-off-by: Zhenhua Luo --- meta-fsl-ppc/recipes-dpaa/usdpaa/usdpaa_git.bb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/meta-fsl-ppc/recipes-dpaa/usdpaa/usdpaa_git.bb b/meta-fsl-ppc/recipes-dpaa/usdpaa/usdpaa_git.bb index 48e860f7..e61989a0 100644 --- a/meta-fsl-ppc/recipes-dpaa/usdpaa/usdpaa_git.bb +++ b/meta-fsl-ppc/recipes-dpaa/usdpaa/usdpaa_git.bb @@ -5,11 +5,13 @@ PR = "r4" inherit pkgconfig +PACKAGE_ARCH = "${MACHINE_ARCH}" + DEPENDS = "libxml2 libedit ncurses readline flib fmc" RDEPENDS_${PN} = "libgcc bash" -SRC_URI = "git://git.freescale.com/ppc/sdk/usdpaa.git" -SRCREV = "97fe45d9697ef339e10a1885539b23fa7fcb113e" +SRC_URI = "git://git.freescale.com/ppc/sdk/usdpaa.git;nobranch=1" +SRCREV = "cc8e332c64e5840ea2037624159801284434caba" S = "${WORKDIR}/git" @@ -42,8 +44,6 @@ do_install () { PARALLEL_MAKE_pn-${PN} = "" FILES_${PN} += "/root/SOURCE_THIS /usr/etc/" -PACKAGE_ARCH = "${MACHINE_ARCH}" - COMPATIBLE_HOST_fslmachine = ".*" COMPATIBLE_HOST ?= "(none)" -- cgit v1.2.3-54-g00ecf From be47c1b76fce7d964eeb5866b3243e4827dfb26f Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Sun, 15 Dec 2013 10:08:15 +0800 Subject: cst: update SHA for SDK 1.5 Signed-off-by: Zhenhua Luo --- meta-fsl-ppc/recipes-extended/cst/cst_git.bb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/meta-fsl-ppc/recipes-extended/cst/cst_git.bb b/meta-fsl-ppc/recipes-extended/cst/cst_git.bb index 9d2d2974..82594c22 100644 --- a/meta-fsl-ppc/recipes-extended/cst/cst_git.bb +++ b/meta-fsl-ppc/recipes-extended/cst/cst_git.bb @@ -7,9 +7,8 @@ LIC_FILES_CHKSUM = "file://RELEASENOTES;beginline=8;endline=43;md5=5a7b22a2c96b5 DEPENDS += "openssl" -SRCBRANCH = "sdk-v1.4.x" -SRC_URI = "git://git.freescale.com/ppc/sdk/cst.git;branch=${SRCBRANCH}" -SRCREV = "e4035cbf54ed481147c6ae65c741ef75dc9ec37f" +SRC_URI = "git://git.freescale.com/ppc/sdk/cst.git;nobranch=1" +SRCREV = "55223ed64404ee57c55416017a8d65b28314282e" S = "${WORKDIR}/git" -- cgit v1.2.3-54-g00ecf From b3c59e4bcb5fa7fb0f57acf461676aa8d3dd0ab4 Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Fri, 25 Oct 2013 09:55:43 +0800 Subject: eth-config: update SHA for SDK 1.5 Signed-off-by: Zhenhua Luo --- meta-fsl-ppc/recipes-dpaa/eth-config/eth-config_git.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-fsl-ppc/recipes-dpaa/eth-config/eth-config_git.bb b/meta-fsl-ppc/recipes-dpaa/eth-config/eth-config_git.bb index ac25013a..85c3b784 100644 --- a/meta-fsl-ppc/recipes-dpaa/eth-config/eth-config_git.bb +++ b/meta-fsl-ppc/recipes-dpaa/eth-config/eth-config_git.bb @@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=cf02dc8eb5ac4a76f3812826520dea87" PR = "r2" SRC_URI = "git://git.freescale.com/ppc/sdk/eth-config.git" -SRCREV = "c255231fb606bff18390da3b26e1ee9fca55e4e6" +SRCREV = "96ac356dbe77948318c3806764f4a68862e30ac4" S = "${WORKDIR}/git" -- cgit v1.2.3-54-g00ecf From 4e351d1b37aab5b5a76ab48d438226f2470e7ceb Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Wed, 23 Oct 2013 13:54:29 +0800 Subject: fmlib: update SHA for SDK 1.5 Signed-off-by: Zhenhua Luo --- meta-fsl-ppc/recipes-dpaa/fmlib/fmlib_git.bb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meta-fsl-ppc/recipes-dpaa/fmlib/fmlib_git.bb b/meta-fsl-ppc/recipes-dpaa/fmlib/fmlib_git.bb index 0426caf3..fc3cc596 100644 --- a/meta-fsl-ppc/recipes-dpaa/fmlib/fmlib_git.bb +++ b/meta-fsl-ppc/recipes-dpaa/fmlib/fmlib_git.bb @@ -8,8 +8,8 @@ PR = "r1" DEPENDS += "virtual/kernel" DEPENDS_virtclass-native = "" -SRC_URI = "git://git.freescale.com/ppc/sdk/fmlib.git" -SRCREV = "7d843485bdac963d98f81773c0f3cb15936e09da" +SRC_URI = "git://git.freescale.com/ppc/sdk/fmlib.git;nobranch=1" +SRCREV = "1fce11f17a102820a20cdbf80f557d74b169fc4c" S = "${WORKDIR}/git" -- cgit v1.2.3-54-g00ecf From 62b032ee9d5406f2c4cdb811daaf8401dc5007b3 Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Thu, 1 Aug 2013 13:01:38 +0800 Subject: b4/t4: use e6500rev2_defconfig as default config Signed-off-by: Zhenhua Luo Signed-off-by: Ting Liu --- meta-fsl-ppc/conf/machine/b4420qds-64b.conf | 2 +- meta-fsl-ppc/conf/machine/b4420qds.conf | 2 +- meta-fsl-ppc/conf/machine/b4860qds-64b.conf | 2 +- meta-fsl-ppc/conf/machine/b4860qds.conf | 2 +- meta-fsl-ppc/conf/machine/t4160qds-64b.conf | 2 +- meta-fsl-ppc/conf/machine/t4160qds.conf | 2 +- meta-fsl-ppc/conf/machine/t4240qds-64b.conf | 2 +- meta-fsl-ppc/conf/machine/t4240qds.conf | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/meta-fsl-ppc/conf/machine/b4420qds-64b.conf b/meta-fsl-ppc/conf/machine/b4420qds-64b.conf index ec697abf..3a01dfaf 100644 --- a/meta-fsl-ppc/conf/machine/b4420qds-64b.conf +++ b/meta-fsl-ppc/conf/machine/b4420qds-64b.conf @@ -9,7 +9,7 @@ SOC_FAMILY = "b4420" # TODO: fix 32bit build of u-boot UBOOT_MACHINES ?= "B4420QDS" KERNEL_DEVICETREE = "b4420qds.dtb b4420qds-usdpaa.dtb" -KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/85xx/e6500rev1_defconfig" +KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/85xx/e6500rev2_defconfig" JFFS2_ERASEBLOCK = "0x10000" diff --git a/meta-fsl-ppc/conf/machine/b4420qds.conf b/meta-fsl-ppc/conf/machine/b4420qds.conf index 2ae5b5ba..84b7c9c9 100644 --- a/meta-fsl-ppc/conf/machine/b4420qds.conf +++ b/meta-fsl-ppc/conf/machine/b4420qds.conf @@ -7,7 +7,7 @@ require conf/machine/include/soc-family.inc SOC_FAMILY = "b4420" UBOOT_MACHINES ?= "B4420QDS" KERNEL_DEVICETREE = "b4420qds.dtb b4420qds-usdpaa.dtb" -KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/85xx/e6500rev1_defconfig" +KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/85xx/e6500rev2_defconfig" JFFS2_ERASEBLOCK = "0x10000" diff --git a/meta-fsl-ppc/conf/machine/b4860qds-64b.conf b/meta-fsl-ppc/conf/machine/b4860qds-64b.conf index 06268efb..e9eacfe2 100644 --- a/meta-fsl-ppc/conf/machine/b4860qds-64b.conf +++ b/meta-fsl-ppc/conf/machine/b4860qds-64b.conf @@ -8,7 +8,7 @@ SOC_FAMILY = "b4860" # TODO: fix 32bit build of u-boot UBOOT_MACHINES ?= "B4860QDS" KERNEL_DEVICETREE = "b4860qds.dtb b4860qds-usdpaa.dtb" -KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/85xx/e6500rev1_defconfig" +KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/85xx/e6500rev2_defconfig" JFFS2_ERASEBLOCK = "0x10000" diff --git a/meta-fsl-ppc/conf/machine/b4860qds.conf b/meta-fsl-ppc/conf/machine/b4860qds.conf index 6ca29e38..17446c75 100644 --- a/meta-fsl-ppc/conf/machine/b4860qds.conf +++ b/meta-fsl-ppc/conf/machine/b4860qds.conf @@ -7,7 +7,7 @@ require conf/machine/include/soc-family.inc SOC_FAMILY = "b4860" UBOOT_MACHINES ?= "B4860QDS" KERNEL_DEVICETREE = "b4860qds.dtb b4860qds-usdpaa.dtb" -KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/85xx/e6500rev1_defconfig" +KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/85xx/e6500rev2_defconfig" JFFS2_ERASEBLOCK = "0x10000" diff --git a/meta-fsl-ppc/conf/machine/t4160qds-64b.conf b/meta-fsl-ppc/conf/machine/t4160qds-64b.conf index af07526b..67d8ba50 100644 --- a/meta-fsl-ppc/conf/machine/t4160qds-64b.conf +++ b/meta-fsl-ppc/conf/machine/t4160qds-64b.conf @@ -8,7 +8,7 @@ SOC_FAMILY = "t4160" # TODO: fix 32bit build of u-boot UBOOT_MACHINES ?= "T4160QDS" KERNEL_DEVICETREE = "t4240qds.dtb t4240qds-usdpaa.dtb" -KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/85xx/e6500rev1_defconfig" +KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/85xx/e6500rev2_defconfig" JFFS2_ERASEBLOCK = "0x10000" diff --git a/meta-fsl-ppc/conf/machine/t4160qds.conf b/meta-fsl-ppc/conf/machine/t4160qds.conf index 150bbcd3..9e4b10a8 100644 --- a/meta-fsl-ppc/conf/machine/t4160qds.conf +++ b/meta-fsl-ppc/conf/machine/t4160qds.conf @@ -7,7 +7,7 @@ require conf/machine/include/soc-family.inc SOC_FAMILY = "t4160" UBOOT_MACHINES ?= "T4160QDS" KERNEL_DEVICETREE = "t4240qds.dtb t4240qds-usdpaa.dtb" -KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/85xx/e6500rev1_defconfig" +KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/85xx/e6500rev2_defconfig" JFFS2_ERASEBLOCK = "0x10000" diff --git a/meta-fsl-ppc/conf/machine/t4240qds-64b.conf b/meta-fsl-ppc/conf/machine/t4240qds-64b.conf index 24a53dda..ac5cd4a0 100644 --- a/meta-fsl-ppc/conf/machine/t4240qds-64b.conf +++ b/meta-fsl-ppc/conf/machine/t4240qds-64b.conf @@ -8,7 +8,7 @@ SOC_FAMILY = "t4240" # TODO: fix 32bit build of u-boot UBOOT_MACHINES ?= "T4240QDS" KERNEL_DEVICETREE = "t4240qds.dtb t4240qds-usdpaa.dtb" -KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/85xx/e6500rev1_defconfig" +KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/85xx/e6500rev2_defconfig" JFFS2_ERASEBLOCK = "0x10000" diff --git a/meta-fsl-ppc/conf/machine/t4240qds.conf b/meta-fsl-ppc/conf/machine/t4240qds.conf index 8066e284..dc41e402 100644 --- a/meta-fsl-ppc/conf/machine/t4240qds.conf +++ b/meta-fsl-ppc/conf/machine/t4240qds.conf @@ -7,7 +7,7 @@ require conf/machine/include/soc-family.inc SOC_FAMILY = "t4240" UBOOT_MACHINES ?= "T4240QDS" KERNEL_DEVICETREE = "t4240qds.dtb t4240qds-usdpaa.dtb" -KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/85xx/e6500rev1_defconfig" +KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/85xx/e6500rev2_defconfig" JFFS2_ERASEBLOCK = "0x10000" -- cgit v1.2.3-54-g00ecf From 52af59cb2a83619c01a9684a2fbe244959946cca Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Sun, 22 Sep 2013 18:23:10 +0800 Subject: p1010rdb: update machine conf to support P1010RDB-PB Signed-off-by: Zhenhua Luo Signed-off-by: Ting Liu --- meta-fsl-ppc/conf/machine/p1010rdb.conf | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/meta-fsl-ppc/conf/machine/p1010rdb.conf b/meta-fsl-ppc/conf/machine/p1010rdb.conf index 2ee53fce..be576561 100644 --- a/meta-fsl-ppc/conf/machine/p1010rdb.conf +++ b/meta-fsl-ppc/conf/machine/p1010rdb.conf @@ -6,8 +6,11 @@ require e500v2.inc require conf/machine/include/soc-family.inc SOC_FAMILY = "p1010" -UBOOT_MACHINES ?= "P1010RDB_NAND P1010RDB_NOR" -KERNEL_DEVICETREE = "p1010rdb.dtb" +BOOTFORMAT_CONFIG = "config_sram_p1010rdb.dat" +UBOOT_MACHINES ?= "P1010RDB-PB_NAND P1010RDB-PB_NOR \ + P1010RDB-PB_SPIFLASH P1010RDB-PB_36BIT_NOR P1010RDB-PB_36BIT_NAND \ + P1010RDB-PB_36BIT_SPIFLASH" +KERNEL_DEVICETREE ?= "p1010rdb-pa.dtb p1010rdb-pb.dtb" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_defconfig" JFFS2_ERASEBLOCK = "0x20000" -- cgit v1.2.3-54-g00ecf From ccae7f8c6d84a6d53fe0c57655a3866ec13ddc5c Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Mon, 28 Oct 2013 17:38:21 +0800 Subject: update BOOTFORMAT_CONFIG for p1/p2 rdb boards Signed-off-by: Ting Liu --- meta-fsl-ppc/conf/machine/p1020rdb.conf | 2 +- meta-fsl-ppc/conf/machine/p1021rdb.conf | 2 +- meta-fsl-ppc/conf/machine/p1022ds.conf | 2 +- meta-fsl-ppc/conf/machine/p2020rdb.conf | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/meta-fsl-ppc/conf/machine/p1020rdb.conf b/meta-fsl-ppc/conf/machine/p1020rdb.conf index ced2d375..927efc3d 100644 --- a/meta-fsl-ppc/conf/machine/p1020rdb.conf +++ b/meta-fsl-ppc/conf/machine/p1020rdb.conf @@ -5,7 +5,7 @@ require e500v2.inc require conf/machine/include/soc-family.inc SOC_FAMILY = "p1020" -BOOTFORMAT_CONFIG = "config_ddr3_1gb_p1_p2_rdb_pc_800M.dat" +BOOTFORMAT_CONFIG = "config_sram_p1022ds.dat" UBOOT_MACHINES ?= " P1020RDB-PD P1020RDB-PD_NAND P1020RDB-PD_SDCARD P1020RDB-PD_SPIFLASH" KERNEL_DEVICETREE = "p1020rdb-pd_32b.dtb" diff --git a/meta-fsl-ppc/conf/machine/p1021rdb.conf b/meta-fsl-ppc/conf/machine/p1021rdb.conf index 2e62adb6..896e541a 100644 --- a/meta-fsl-ppc/conf/machine/p1021rdb.conf +++ b/meta-fsl-ppc/conf/machine/p1021rdb.conf @@ -6,7 +6,7 @@ require e500v2.inc require conf/machine/include/soc-family.inc SOC_FAMILY = "p1021" -BOOTFORMAT_CONFIG = "config_ddr3_1gb_p1_p2_rdb_pc_800M.dat" +BOOTFORMAT_CONFIG = "config_sram_p1022ds.dat" UBOOT_MACHINES ?= "P1021RDB-PC P1021RDB-PC_NAND P1021RDB-PC_SDCARD P1021RDB-PC_SPIFLASH P1021RDB-PC_36BIT P1021RDB-PC_36BIT_SPIFLASH P1021RDB-PC_36BIT_NAND P1021RDB-PC_36BIT_SDCARD" KERNEL_DEVICETREE = "p1021rdb-pc_32b.dtb" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" diff --git a/meta-fsl-ppc/conf/machine/p1022ds.conf b/meta-fsl-ppc/conf/machine/p1022ds.conf index 624353fb..ba45dd0b 100644 --- a/meta-fsl-ppc/conf/machine/p1022ds.conf +++ b/meta-fsl-ppc/conf/machine/p1022ds.conf @@ -5,7 +5,7 @@ require e500v2.inc require conf/machine/include/soc-family.inc SOC_FAMILY = "p1022" -BOOTFORMAT_CONFIG = "config_ddr3_2gb_p1022ds.dat" +BOOTFORMAT_CONFIG = "config_sram_p1022ds.dat" UBOOT_MACHINES ?= "P1022DS P1022DS_NAND P1022DS_SPIFLASH P1022DS_SDCARD P1022DS_36BIT P1022DS_36BIT_SPIFLASH P1022DS_36BIT_NAND P1022DS_36BIT_SDCARD" KERNEL_DEVICETREE = "p1022ds_32b.dtb" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" diff --git a/meta-fsl-ppc/conf/machine/p2020rdb.conf b/meta-fsl-ppc/conf/machine/p2020rdb.conf index b9d95903..0abb39ca 100644 --- a/meta-fsl-ppc/conf/machine/p2020rdb.conf +++ b/meta-fsl-ppc/conf/machine/p2020rdb.conf @@ -6,7 +6,7 @@ require e500v2.inc require conf/machine/include/soc-family.inc SOC_FAMILY = "p2020" -BOOTFORMAT_CONFIG = "config_ddr3_1gb_64bit_p2020rdb_pc.dat" +BOOTFORMAT_CONFIG = "config_sram_p1022ds.dat" UBOOT_MACHINES ?= " P2020RDB-PC P2020RDB-PC_NAND P2020RDB-PC_SDCARD P2020RDB-PC_SPIFLASH P2020RDB-PC_36BIT P2020RDB-PC_36BIT_SPIFLASH P2020RDB-PC_36BIT_NAND P2020RDB-PC_36BIT_SDCARD" KERNEL_DEVICETREE = "p2020rdb-pc_32b.dtb" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" -- cgit v1.2.3-54-g00ecf From 92ba600c317d86b1d1cb640a74f38a3f33b56c62 Mon Sep 17 00:00:00 2001 From: Chunrong Guo Date: Tue, 3 Sep 2013 15:47:47 +0800 Subject: c293pcie: add machine configure file Signed-off-by: Chunrong Guo Signed-off-by: Zhenhua Luo --- meta-fsl-ppc/conf/machine/c293pcie.conf | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 meta-fsl-ppc/conf/machine/c293pcie.conf diff --git a/meta-fsl-ppc/conf/machine/c293pcie.conf b/meta-fsl-ppc/conf/machine/c293pcie.conf new file mode 100644 index 00000000..9e7252a1 --- /dev/null +++ b/meta-fsl-ppc/conf/machine/c293pcie.conf @@ -0,0 +1,17 @@ +#@TYPE: Machine +#@DESCRIPTION: Machine configuration for running C293PCIE in 36-bit mode + +require e500v2.inc +require conf/machine/include/soc-family.inc + +SOC_FAMILY = "c293pcie" +BOOTFORMAT_CONFIG = "config_ddr3_512m_c29xpcie_800M.dat" +UBOOT_MACHINES ?= "C293PCIE C293PCIE_NAND C293PCIE_SPIFLASH C293PCIE_SECBOOT C293PCIE_SPIFLASH_SECBOOT" +KERNEL_DEVICETREE ?= "c293pcie_36b.dtb" +KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/mpc85xx_defconfig" + +JFFS2_ERASEBLOCK = "0x10000" + +SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" +SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" +USE_VT = "0" -- cgit v1.2.3-54-g00ecf From 5d358f25406ba5bd14a1d922d1350931c3345e0e Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Wed, 30 Oct 2013 14:35:27 +0800 Subject: asf: update license to dual GPL/BSD Signed-off-by: Ting Liu --- meta-fsl-ppc/recipes-kernel/asf/asf_git.bb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meta-fsl-ppc/recipes-kernel/asf/asf_git.bb b/meta-fsl-ppc/recipes-kernel/asf/asf_git.bb index ff2788dd..bbe57173 100644 --- a/meta-fsl-ppc/recipes-kernel/asf/asf_git.bb +++ b/meta-fsl-ppc/recipes-kernel/asf/asf_git.bb @@ -1,7 +1,7 @@ DESCRIPTION = "Non-DPAA software Application Specific Fast-path" SECTION = "asf" -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://COPYING;md5=9960b017720861b8c50c8c08723e57aa" +LICENSE = "GPLv2 & GPLv2+ & BSD" +LIC_FILES_CHKSUM = "file://COPYING;md5=b5881ecf398da8a03a3f4c501e29d287" SRC_URI = "git://git.freescale.com/ppc/sdk/asf.git;nobranch=1" SRCREV = "c262d7701af325b50cae54279a021ae7b5081e24" -- cgit v1.2.3-54-g00ecf From ad72d1dacad1f181f8089fa6d4115fdbc1481714 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Wed, 23 Oct 2013 14:57:16 +0800 Subject: asf: add rdepend on ipsec-tools Fix the below issue: | Computing transaction...error: Can't install asf-git-r0@t4240qds_64b: | no package provides /usr/sbin/setkey Signed-off-by: Ting Liu --- meta-fsl-ppc/recipes-kernel/asf/asf_git.bb | 1 + 1 file changed, 1 insertion(+) diff --git a/meta-fsl-ppc/recipes-kernel/asf/asf_git.bb b/meta-fsl-ppc/recipes-kernel/asf/asf_git.bb index bbe57173..3dc8f908 100644 --- a/meta-fsl-ppc/recipes-kernel/asf/asf_git.bb +++ b/meta-fsl-ppc/recipes-kernel/asf/asf_git.bb @@ -7,6 +7,7 @@ SRC_URI = "git://git.freescale.com/ppc/sdk/asf.git;nobranch=1" SRCREV = "c262d7701af325b50cae54279a021ae7b5081e24" DEPENDS="virtual/kernel" +RDEPENDS_${PN} += "ipsec-tools" inherit module -- cgit v1.2.3-54-g00ecf From 3bc743ee250b54ad615c371a63a5282cb06c4b18 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Fri, 1 Nov 2013 23:12:14 +0800 Subject: conf/machine/*: make KERNEL_DEVICETREE overridable Signed-off-by: Ting Liu --- meta-fsl-ppc/conf/machine/b4420qds-64b.conf | 2 +- meta-fsl-ppc/conf/machine/b4420qds.conf | 2 +- meta-fsl-ppc/conf/machine/b4860qds-64b.conf | 2 +- meta-fsl-ppc/conf/machine/b4860qds.conf | 2 +- meta-fsl-ppc/conf/machine/bsc9131rdb.conf | 2 +- meta-fsl-ppc/conf/machine/bsc9132qds.conf | 2 +- meta-fsl-ppc/conf/machine/p1020rdb.conf | 2 +- meta-fsl-ppc/conf/machine/p1021rdb.conf | 2 +- meta-fsl-ppc/conf/machine/p1022ds.conf | 2 +- meta-fsl-ppc/conf/machine/p1023rdb.conf | 2 +- meta-fsl-ppc/conf/machine/p1025twr.conf | 2 +- meta-fsl-ppc/conf/machine/p2020ds.conf | 2 +- meta-fsl-ppc/conf/machine/p2020rdb.conf | 2 +- meta-fsl-ppc/conf/machine/p2041rdb.conf | 2 +- meta-fsl-ppc/conf/machine/p3041ds.conf | 2 +- meta-fsl-ppc/conf/machine/p4080ds.conf | 2 +- meta-fsl-ppc/conf/machine/p5020ds-64b.conf | 2 +- meta-fsl-ppc/conf/machine/p5020ds.conf | 2 +- meta-fsl-ppc/conf/machine/p5040ds-64b.conf | 2 +- meta-fsl-ppc/conf/machine/p5040ds.conf | 2 +- meta-fsl-ppc/conf/machine/t4160qds-64b.conf | 2 +- meta-fsl-ppc/conf/machine/t4160qds.conf | 2 +- meta-fsl-ppc/conf/machine/t4240qds-64b.conf | 2 +- meta-fsl-ppc/conf/machine/t4240qds.conf | 2 +- 24 files changed, 24 insertions(+), 24 deletions(-) diff --git a/meta-fsl-ppc/conf/machine/b4420qds-64b.conf b/meta-fsl-ppc/conf/machine/b4420qds-64b.conf index 3a01dfaf..b8c4f5a3 100644 --- a/meta-fsl-ppc/conf/machine/b4420qds-64b.conf +++ b/meta-fsl-ppc/conf/machine/b4420qds-64b.conf @@ -8,7 +8,7 @@ SOC_FAMILY = "b4420" # TODO: fix 32bit build of u-boot UBOOT_MACHINES ?= "B4420QDS" -KERNEL_DEVICETREE = "b4420qds.dtb b4420qds-usdpaa.dtb" +KERNEL_DEVICETREE ?= "b4420qds.dtb b4420qds-usdpaa.dtb" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/85xx/e6500rev2_defconfig" JFFS2_ERASEBLOCK = "0x10000" diff --git a/meta-fsl-ppc/conf/machine/b4420qds.conf b/meta-fsl-ppc/conf/machine/b4420qds.conf index 84b7c9c9..6119330b 100644 --- a/meta-fsl-ppc/conf/machine/b4420qds.conf +++ b/meta-fsl-ppc/conf/machine/b4420qds.conf @@ -6,7 +6,7 @@ require conf/machine/include/soc-family.inc SOC_FAMILY = "b4420" UBOOT_MACHINES ?= "B4420QDS" -KERNEL_DEVICETREE = "b4420qds.dtb b4420qds-usdpaa.dtb" +KERNEL_DEVICETREE ?= "b4420qds.dtb b4420qds-usdpaa.dtb" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/85xx/e6500rev2_defconfig" JFFS2_ERASEBLOCK = "0x10000" diff --git a/meta-fsl-ppc/conf/machine/b4860qds-64b.conf b/meta-fsl-ppc/conf/machine/b4860qds-64b.conf index e9eacfe2..6cf2fce8 100644 --- a/meta-fsl-ppc/conf/machine/b4860qds-64b.conf +++ b/meta-fsl-ppc/conf/machine/b4860qds-64b.conf @@ -7,7 +7,7 @@ require conf/machine/include/soc-family.inc SOC_FAMILY = "b4860" # TODO: fix 32bit build of u-boot UBOOT_MACHINES ?= "B4860QDS" -KERNEL_DEVICETREE = "b4860qds.dtb b4860qds-usdpaa.dtb" +KERNEL_DEVICETREE ?= "b4860qds.dtb b4860qds-usdpaa.dtb" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/85xx/e6500rev2_defconfig" JFFS2_ERASEBLOCK = "0x10000" diff --git a/meta-fsl-ppc/conf/machine/b4860qds.conf b/meta-fsl-ppc/conf/machine/b4860qds.conf index 17446c75..e8c88972 100644 --- a/meta-fsl-ppc/conf/machine/b4860qds.conf +++ b/meta-fsl-ppc/conf/machine/b4860qds.conf @@ -6,7 +6,7 @@ require conf/machine/include/soc-family.inc SOC_FAMILY = "b4860" UBOOT_MACHINES ?= "B4860QDS" -KERNEL_DEVICETREE = "b4860qds.dtb b4860qds-usdpaa.dtb" +KERNEL_DEVICETREE ?= "b4860qds.dtb b4860qds-usdpaa.dtb" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/85xx/e6500rev2_defconfig" JFFS2_ERASEBLOCK = "0x10000" diff --git a/meta-fsl-ppc/conf/machine/bsc9131rdb.conf b/meta-fsl-ppc/conf/machine/bsc9131rdb.conf index 766d5d22..9c08af4b 100644 --- a/meta-fsl-ppc/conf/machine/bsc9131rdb.conf +++ b/meta-fsl-ppc/conf/machine/bsc9131rdb.conf @@ -6,7 +6,7 @@ require conf/machine/include/soc-family.inc SOC_FAMILY = "bsc9131" UBOOT_MACHINES ?= "BSC9131RDB_SPIFLASH BSC9131RDB_NAND BSC9131RDB_NAND_SYSCLK100 BSC9131RDB_SPIFLASH_SYSCLK100" -KERNEL_DEVICETREE = "bsc9131rdb.dtb" +KERNEL_DEVICETREE ?= "bsc9131rdb.dtb" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/85xx/bsc913x_defconfig" JFFS2_ERASEBLOCK = "0x10000" diff --git a/meta-fsl-ppc/conf/machine/bsc9132qds.conf b/meta-fsl-ppc/conf/machine/bsc9132qds.conf index 9baa49b5..7ca4e127 100644 --- a/meta-fsl-ppc/conf/machine/bsc9132qds.conf +++ b/meta-fsl-ppc/conf/machine/bsc9132qds.conf @@ -6,7 +6,7 @@ require conf/machine/include/soc-family.inc SOC_FAMILY = "bsc9132" UBOOT_MACHINES ?= " BSC9132QDS_NAND_DDRCLK133 BSC9132QDS_NAND_DDRCLK100 BSC9132QDS_NOR_DDRCLK100 BSC9132QDS_NOR_DDRCLK133 BSC9132QDS_SDCARD_DDRCLK100 BSC9132QDS_SDCARD_DDRCLK133 BSC9132QDS_SPIFLASH_DDRCLK100 BSC9132QDS_SPIFLASH_DDRCLK133" -KERNEL_DEVICETREE = "bsc9132qds.dtb" +KERNEL_DEVICETREE ?= "bsc9132qds.dtb" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/85xx/bsc913x_smp_defconfig" JFFS2_ERASEBLOCK = "0x10000" diff --git a/meta-fsl-ppc/conf/machine/p1020rdb.conf b/meta-fsl-ppc/conf/machine/p1020rdb.conf index 927efc3d..1e9f14e7 100644 --- a/meta-fsl-ppc/conf/machine/p1020rdb.conf +++ b/meta-fsl-ppc/conf/machine/p1020rdb.conf @@ -8,7 +8,7 @@ SOC_FAMILY = "p1020" BOOTFORMAT_CONFIG = "config_sram_p1022ds.dat" UBOOT_MACHINES ?= " P1020RDB-PD P1020RDB-PD_NAND P1020RDB-PD_SDCARD P1020RDB-PD_SPIFLASH" -KERNEL_DEVICETREE = "p1020rdb-pd_32b.dtb" +KERNEL_DEVICETREE ?= "p1020rdb-pd_32b.dtb" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" diff --git a/meta-fsl-ppc/conf/machine/p1021rdb.conf b/meta-fsl-ppc/conf/machine/p1021rdb.conf index 896e541a..fe783447 100644 --- a/meta-fsl-ppc/conf/machine/p1021rdb.conf +++ b/meta-fsl-ppc/conf/machine/p1021rdb.conf @@ -8,7 +8,7 @@ require conf/machine/include/soc-family.inc SOC_FAMILY = "p1021" BOOTFORMAT_CONFIG = "config_sram_p1022ds.dat" UBOOT_MACHINES ?= "P1021RDB-PC P1021RDB-PC_NAND P1021RDB-PC_SDCARD P1021RDB-PC_SPIFLASH P1021RDB-PC_36BIT P1021RDB-PC_36BIT_SPIFLASH P1021RDB-PC_36BIT_NAND P1021RDB-PC_36BIT_SDCARD" -KERNEL_DEVICETREE = "p1021rdb-pc_32b.dtb" +KERNEL_DEVICETREE ?= "p1021rdb-pc_32b.dtb" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" JFFS2_ERASEBLOCK = "0x20000" diff --git a/meta-fsl-ppc/conf/machine/p1022ds.conf b/meta-fsl-ppc/conf/machine/p1022ds.conf index ba45dd0b..64df2f84 100644 --- a/meta-fsl-ppc/conf/machine/p1022ds.conf +++ b/meta-fsl-ppc/conf/machine/p1022ds.conf @@ -7,7 +7,7 @@ require conf/machine/include/soc-family.inc SOC_FAMILY = "p1022" BOOTFORMAT_CONFIG = "config_sram_p1022ds.dat" UBOOT_MACHINES ?= "P1022DS P1022DS_NAND P1022DS_SPIFLASH P1022DS_SDCARD P1022DS_36BIT P1022DS_36BIT_SPIFLASH P1022DS_36BIT_NAND P1022DS_36BIT_SDCARD" -KERNEL_DEVICETREE = "p1022ds_32b.dtb" +KERNEL_DEVICETREE ?= "p1022ds_32b.dtb" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xorg" diff --git a/meta-fsl-ppc/conf/machine/p1023rdb.conf b/meta-fsl-ppc/conf/machine/p1023rdb.conf index 3422cbfd..13eff250 100644 --- a/meta-fsl-ppc/conf/machine/p1023rdb.conf +++ b/meta-fsl-ppc/conf/machine/p1023rdb.conf @@ -6,7 +6,7 @@ require conf/machine/include/soc-family.inc SOC_FAMILY = "p1023" UBOOT_MACHINES ?= "P1023RDB" -KERNEL_DEVICETREE = "p1023rdb.dtb" +KERNEL_DEVICETREE ?= "p1023rdb.dtb" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/85xx/p1023rds_defconfig" JFFS2_ERASEBLOCK = "0x10000" diff --git a/meta-fsl-ppc/conf/machine/p1025twr.conf b/meta-fsl-ppc/conf/machine/p1025twr.conf index 286ec693..acfac25f 100644 --- a/meta-fsl-ppc/conf/machine/p1025twr.conf +++ b/meta-fsl-ppc/conf/machine/p1025twr.conf @@ -8,7 +8,7 @@ require conf/machine/include/soc-family.inc SOC_FAMILY = "p1025" BOOTFORMAT_CONFIG = "config_ddr3_1gb_p1_p2_rdb_pc_667M.dat" UBOOT_MACHINES ?= "TWR-P1025" -KERNEL_DEVICETREE = "p1025twr_32b.dtb" +KERNEL_DEVICETREE ?= "p1025twr_32b.dtb" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" JFFS2_ERASEBLOCK = "0x20000" diff --git a/meta-fsl-ppc/conf/machine/p2020ds.conf b/meta-fsl-ppc/conf/machine/p2020ds.conf index a69e62cd..b7d1a1dc 100644 --- a/meta-fsl-ppc/conf/machine/p2020ds.conf +++ b/meta-fsl-ppc/conf/machine/p2020ds.conf @@ -7,7 +7,7 @@ require conf/machine/include/soc-family.inc SOC_FAMILY = "p2020" BOOTFORMAT_CONFIG = "config_sram_p2020ds.dat" UBOOT_MACHINES ?= "P2020DS P2020DS_36BIT P2020DS_DDR2 P2020DS_SDCARD P2020DS_SPIFLASH" -KERNEL_DEVICETREE = "p2020ds.dtb" +KERNEL_DEVICETREE ?= "p2020ds.dtb" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" JFFS2_ERASEBLOCK = "0x20000" diff --git a/meta-fsl-ppc/conf/machine/p2020rdb.conf b/meta-fsl-ppc/conf/machine/p2020rdb.conf index 0abb39ca..13698593 100644 --- a/meta-fsl-ppc/conf/machine/p2020rdb.conf +++ b/meta-fsl-ppc/conf/machine/p2020rdb.conf @@ -8,7 +8,7 @@ require conf/machine/include/soc-family.inc SOC_FAMILY = "p2020" BOOTFORMAT_CONFIG = "config_sram_p1022ds.dat" UBOOT_MACHINES ?= " P2020RDB-PC P2020RDB-PC_NAND P2020RDB-PC_SDCARD P2020RDB-PC_SPIFLASH P2020RDB-PC_36BIT P2020RDB-PC_36BIT_SPIFLASH P2020RDB-PC_36BIT_NAND P2020RDB-PC_36BIT_SDCARD" -KERNEL_DEVICETREE = "p2020rdb-pc_32b.dtb" +KERNEL_DEVICETREE ?= "p2020rdb-pc_32b.dtb" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" JFFS2_ERASEBLOCK = "0x20000" diff --git a/meta-fsl-ppc/conf/machine/p2041rdb.conf b/meta-fsl-ppc/conf/machine/p2041rdb.conf index bc6764f8..73210279 100644 --- a/meta-fsl-ppc/conf/machine/p2041rdb.conf +++ b/meta-fsl-ppc/conf/machine/p2041rdb.conf @@ -6,7 +6,7 @@ require conf/machine/include/soc-family.inc SOC_FAMILY = "p2041" UBOOT_MACHINES ?= "P2041RDB P2041RDB_NAND P2041RDB_SECURE_BOOT P2041RDB_SDCARD P2041RDB_SPIFLASH" -KERNEL_DEVICETREE = "p2041rdb.dtb p2041rdb-usdpaa.dtb" +KERNEL_DEVICETREE ?= "p2041rdb.dtb p2041rdb-usdpaa.dtb" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet32_smp_defconfig" JFFS2_ERASEBLOCK = "0x10000" diff --git a/meta-fsl-ppc/conf/machine/p3041ds.conf b/meta-fsl-ppc/conf/machine/p3041ds.conf index ced95906..5dd10838 100644 --- a/meta-fsl-ppc/conf/machine/p3041ds.conf +++ b/meta-fsl-ppc/conf/machine/p3041ds.conf @@ -6,7 +6,7 @@ require conf/machine/include/soc-family.inc SOC_FAMILY = "p3041" UBOOT_MACHINES ?= "P3041DS P3041DS_NAND P3041DS_SECURE_BOOT P3041DS_SDCARD P3041DS_SPIFLASH" -KERNEL_DEVICETREE = "p3041ds.dtb p3041ds-usdpaa.dtb" +KERNEL_DEVICETREE ?= "p3041ds.dtb p3041ds-usdpaa.dtb" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet32_smp_defconfig" JFFS2_ERASEBLOCK = "0x10000" diff --git a/meta-fsl-ppc/conf/machine/p4080ds.conf b/meta-fsl-ppc/conf/machine/p4080ds.conf index 6f4a89e1..461044bb 100644 --- a/meta-fsl-ppc/conf/machine/p4080ds.conf +++ b/meta-fsl-ppc/conf/machine/p4080ds.conf @@ -6,7 +6,7 @@ require conf/machine/include/soc-family.inc SOC_FAMILY = "p4080" UBOOT_MACHINES ?= "P4080DS P4080DS_SECURE_BOOT P4080DS_SDCARD P4080DS_SPIFLASH " -KERNEL_DEVICETREE = "p4080ds.dtb p4080ds-usdpaa.dtb" +KERNEL_DEVICETREE ?= "p4080ds.dtb p4080ds-usdpaa.dtb" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet32_smp_defconfig" JFFS2_ERASEBLOCK = "0x10000" diff --git a/meta-fsl-ppc/conf/machine/p5020ds-64b.conf b/meta-fsl-ppc/conf/machine/p5020ds-64b.conf index 968deaa7..8a45958b 100644 --- a/meta-fsl-ppc/conf/machine/p5020ds-64b.conf +++ b/meta-fsl-ppc/conf/machine/p5020ds-64b.conf @@ -7,7 +7,7 @@ require conf/machine/include/soc-family.inc SOC_FAMILY = "p5020" # TODO: fix 32bit build of u-boot for p5020ds-64b UBOOT_MACHINES ?= "P5020DS" -KERNEL_DEVICETREE = "p5020ds.dtb p5020ds-usdpaa.dtb" +KERNEL_DEVICETREE ?= "p5020ds.dtb p5020ds-usdpaa.dtb" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet64_smp_defconfig" JFFS2_ERASEBLOCK = "0x10000" diff --git a/meta-fsl-ppc/conf/machine/p5020ds.conf b/meta-fsl-ppc/conf/machine/p5020ds.conf index 1a4055a0..9951c770 100644 --- a/meta-fsl-ppc/conf/machine/p5020ds.conf +++ b/meta-fsl-ppc/conf/machine/p5020ds.conf @@ -6,7 +6,7 @@ require conf/machine/include/soc-family.inc SOC_FAMILY = "p5020" UBOOT_MACHINES ?= "P5020DS P5020DS_NAND P5020DS_SECURE_BOOT P5020DS_SDCARD P5020DS_SPIFLASH " -KERNEL_DEVICETREE = "p5020ds.dtb p5020ds-usdpaa.dtb" +KERNEL_DEVICETREE ?= "p5020ds.dtb p5020ds-usdpaa.dtb" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet32_smp_defconfig" JFFS2_ERASEBLOCK = "0x10000" diff --git a/meta-fsl-ppc/conf/machine/p5040ds-64b.conf b/meta-fsl-ppc/conf/machine/p5040ds-64b.conf index 4fdc3d6e..3f16d6ea 100644 --- a/meta-fsl-ppc/conf/machine/p5040ds-64b.conf +++ b/meta-fsl-ppc/conf/machine/p5040ds-64b.conf @@ -6,7 +6,7 @@ require conf/machine/include/soc-family.inc SOC_FAMILY = "p5040" UBOOT_MACHINES ?= "P5040DS P5040DS_NAND P5040DS_SECURE_BOOT P5040DS_SDCARD P5040DS_SPIFLASH" -KERNEL_DEVICETREE = "p5040ds.dtb p5040ds-usdpaa.dtb" +KERNEL_DEVICETREE ?= "p5040ds.dtb p5040ds-usdpaa.dtb" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet64_smp_defconfig" JFFS2_ERASEBLOCK = "0x10000" diff --git a/meta-fsl-ppc/conf/machine/p5040ds.conf b/meta-fsl-ppc/conf/machine/p5040ds.conf index 53a3f095..bb61fd93 100644 --- a/meta-fsl-ppc/conf/machine/p5040ds.conf +++ b/meta-fsl-ppc/conf/machine/p5040ds.conf @@ -6,7 +6,7 @@ require conf/machine/include/soc-family.inc SOC_FAMILY = "p5040" UBOOT_MACHINES ?= "P5040DS P5040DS_NAND P5040DS_SECURE_BOOT P5040DS_SDCARD P5040DS_SPIFLASH" -KERNEL_DEVICETREE = "p5040ds.dtb p5040ds-usdpaa.dtb" +KERNEL_DEVICETREE ?= "p5040ds.dtb p5040ds-usdpaa.dtb" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet32_smp_defconfig" JFFS2_ERASEBLOCK = "0x10000" diff --git a/meta-fsl-ppc/conf/machine/t4160qds-64b.conf b/meta-fsl-ppc/conf/machine/t4160qds-64b.conf index 67d8ba50..0e4ee086 100644 --- a/meta-fsl-ppc/conf/machine/t4160qds-64b.conf +++ b/meta-fsl-ppc/conf/machine/t4160qds-64b.conf @@ -7,7 +7,7 @@ require conf/machine/include/soc-family.inc SOC_FAMILY = "t4160" # TODO: fix 32bit build of u-boot UBOOT_MACHINES ?= "T4160QDS" -KERNEL_DEVICETREE = "t4240qds.dtb t4240qds-usdpaa.dtb" +KERNEL_DEVICETREE ?= "t4240qds.dtb t4240qds-usdpaa.dtb" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/85xx/e6500rev2_defconfig" JFFS2_ERASEBLOCK = "0x10000" diff --git a/meta-fsl-ppc/conf/machine/t4160qds.conf b/meta-fsl-ppc/conf/machine/t4160qds.conf index 9e4b10a8..cf3a3049 100644 --- a/meta-fsl-ppc/conf/machine/t4160qds.conf +++ b/meta-fsl-ppc/conf/machine/t4160qds.conf @@ -6,7 +6,7 @@ require conf/machine/include/soc-family.inc SOC_FAMILY = "t4160" UBOOT_MACHINES ?= "T4160QDS" -KERNEL_DEVICETREE = "t4240qds.dtb t4240qds-usdpaa.dtb" +KERNEL_DEVICETREE ?= "t4240qds.dtb t4240qds-usdpaa.dtb" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/85xx/e6500rev2_defconfig" JFFS2_ERASEBLOCK = "0x10000" diff --git a/meta-fsl-ppc/conf/machine/t4240qds-64b.conf b/meta-fsl-ppc/conf/machine/t4240qds-64b.conf index ac5cd4a0..4ea62c57 100644 --- a/meta-fsl-ppc/conf/machine/t4240qds-64b.conf +++ b/meta-fsl-ppc/conf/machine/t4240qds-64b.conf @@ -7,7 +7,7 @@ require conf/machine/include/soc-family.inc SOC_FAMILY = "t4240" # TODO: fix 32bit build of u-boot UBOOT_MACHINES ?= "T4240QDS" -KERNEL_DEVICETREE = "t4240qds.dtb t4240qds-usdpaa.dtb" +KERNEL_DEVICETREE ?= "t4240qds.dtb t4240qds-usdpaa.dtb" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/85xx/e6500rev2_defconfig" JFFS2_ERASEBLOCK = "0x10000" diff --git a/meta-fsl-ppc/conf/machine/t4240qds.conf b/meta-fsl-ppc/conf/machine/t4240qds.conf index dc41e402..099be470 100644 --- a/meta-fsl-ppc/conf/machine/t4240qds.conf +++ b/meta-fsl-ppc/conf/machine/t4240qds.conf @@ -6,7 +6,7 @@ require conf/machine/include/soc-family.inc SOC_FAMILY = "t4240" UBOOT_MACHINES ?= "T4240QDS" -KERNEL_DEVICETREE = "t4240qds.dtb t4240qds-usdpaa.dtb" +KERNEL_DEVICETREE ?= "t4240qds.dtb t4240qds-usdpaa.dtb" KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/85xx/e6500rev2_defconfig" JFFS2_ERASEBLOCK = "0x10000" -- cgit v1.2.3-54-g00ecf From 9610c9f877d940b55d3ae241dc42492eff736fbf Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Fri, 1 Nov 2013 23:13:23 +0800 Subject: conf/machine/*: make KERNEL_DEFCONFIG overridable Signed-off-by: Ting Liu --- meta-fsl-ppc/conf/machine/b4420qds-64b.conf | 2 +- meta-fsl-ppc/conf/machine/b4420qds.conf | 2 +- meta-fsl-ppc/conf/machine/b4860qds-64b.conf | 2 +- meta-fsl-ppc/conf/machine/b4860qds.conf | 2 +- meta-fsl-ppc/conf/machine/bsc9131rdb.conf | 2 +- meta-fsl-ppc/conf/machine/bsc9132qds.conf | 2 +- meta-fsl-ppc/conf/machine/p1010rdb.conf | 2 +- meta-fsl-ppc/conf/machine/p1020rdb.conf | 2 +- meta-fsl-ppc/conf/machine/p1021rdb.conf | 2 +- meta-fsl-ppc/conf/machine/p1022ds.conf | 2 +- meta-fsl-ppc/conf/machine/p1023rdb.conf | 2 +- meta-fsl-ppc/conf/machine/p1025twr.conf | 2 +- meta-fsl-ppc/conf/machine/p2020ds.conf | 2 +- meta-fsl-ppc/conf/machine/p2020rdb.conf | 2 +- meta-fsl-ppc/conf/machine/p2041rdb.conf | 2 +- meta-fsl-ppc/conf/machine/p3041ds.conf | 2 +- meta-fsl-ppc/conf/machine/p4080ds.conf | 2 +- meta-fsl-ppc/conf/machine/p5020ds-64b.conf | 2 +- meta-fsl-ppc/conf/machine/p5020ds.conf | 2 +- meta-fsl-ppc/conf/machine/p5040ds-64b.conf | 2 +- meta-fsl-ppc/conf/machine/p5040ds.conf | 2 +- meta-fsl-ppc/conf/machine/t4160qds-64b.conf | 2 +- meta-fsl-ppc/conf/machine/t4160qds.conf | 2 +- meta-fsl-ppc/conf/machine/t4240qds-64b.conf | 2 +- meta-fsl-ppc/conf/machine/t4240qds.conf | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/meta-fsl-ppc/conf/machine/b4420qds-64b.conf b/meta-fsl-ppc/conf/machine/b4420qds-64b.conf index b8c4f5a3..0bb959cb 100644 --- a/meta-fsl-ppc/conf/machine/b4420qds-64b.conf +++ b/meta-fsl-ppc/conf/machine/b4420qds-64b.conf @@ -9,7 +9,7 @@ SOC_FAMILY = "b4420" # TODO: fix 32bit build of u-boot UBOOT_MACHINES ?= "B4420QDS" KERNEL_DEVICETREE ?= "b4420qds.dtb b4420qds-usdpaa.dtb" -KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/85xx/e6500rev2_defconfig" +KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/85xx/e6500rev2_defconfig" JFFS2_ERASEBLOCK = "0x10000" diff --git a/meta-fsl-ppc/conf/machine/b4420qds.conf b/meta-fsl-ppc/conf/machine/b4420qds.conf index 6119330b..b07ab5d2 100644 --- a/meta-fsl-ppc/conf/machine/b4420qds.conf +++ b/meta-fsl-ppc/conf/machine/b4420qds.conf @@ -7,7 +7,7 @@ require conf/machine/include/soc-family.inc SOC_FAMILY = "b4420" UBOOT_MACHINES ?= "B4420QDS" KERNEL_DEVICETREE ?= "b4420qds.dtb b4420qds-usdpaa.dtb" -KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/85xx/e6500rev2_defconfig" +KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/85xx/e6500rev2_defconfig" JFFS2_ERASEBLOCK = "0x10000" diff --git a/meta-fsl-ppc/conf/machine/b4860qds-64b.conf b/meta-fsl-ppc/conf/machine/b4860qds-64b.conf index 6cf2fce8..86596106 100644 --- a/meta-fsl-ppc/conf/machine/b4860qds-64b.conf +++ b/meta-fsl-ppc/conf/machine/b4860qds-64b.conf @@ -8,7 +8,7 @@ SOC_FAMILY = "b4860" # TODO: fix 32bit build of u-boot UBOOT_MACHINES ?= "B4860QDS" KERNEL_DEVICETREE ?= "b4860qds.dtb b4860qds-usdpaa.dtb" -KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/85xx/e6500rev2_defconfig" +KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/85xx/e6500rev2_defconfig" JFFS2_ERASEBLOCK = "0x10000" diff --git a/meta-fsl-ppc/conf/machine/b4860qds.conf b/meta-fsl-ppc/conf/machine/b4860qds.conf index e8c88972..2aa471ef 100644 --- a/meta-fsl-ppc/conf/machine/b4860qds.conf +++ b/meta-fsl-ppc/conf/machine/b4860qds.conf @@ -7,7 +7,7 @@ require conf/machine/include/soc-family.inc SOC_FAMILY = "b4860" UBOOT_MACHINES ?= "B4860QDS" KERNEL_DEVICETREE ?= "b4860qds.dtb b4860qds-usdpaa.dtb" -KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/85xx/e6500rev2_defconfig" +KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/85xx/e6500rev2_defconfig" JFFS2_ERASEBLOCK = "0x10000" diff --git a/meta-fsl-ppc/conf/machine/bsc9131rdb.conf b/meta-fsl-ppc/conf/machine/bsc9131rdb.conf index 9c08af4b..c145a047 100644 --- a/meta-fsl-ppc/conf/machine/bsc9131rdb.conf +++ b/meta-fsl-ppc/conf/machine/bsc9131rdb.conf @@ -7,7 +7,7 @@ require conf/machine/include/soc-family.inc SOC_FAMILY = "bsc9131" UBOOT_MACHINES ?= "BSC9131RDB_SPIFLASH BSC9131RDB_NAND BSC9131RDB_NAND_SYSCLK100 BSC9131RDB_SPIFLASH_SYSCLK100" KERNEL_DEVICETREE ?= "bsc9131rdb.dtb" -KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/85xx/bsc913x_defconfig" +KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/85xx/bsc913x_defconfig" JFFS2_ERASEBLOCK = "0x10000" diff --git a/meta-fsl-ppc/conf/machine/bsc9132qds.conf b/meta-fsl-ppc/conf/machine/bsc9132qds.conf index 7ca4e127..5b9a1006 100644 --- a/meta-fsl-ppc/conf/machine/bsc9132qds.conf +++ b/meta-fsl-ppc/conf/machine/bsc9132qds.conf @@ -7,7 +7,7 @@ require conf/machine/include/soc-family.inc SOC_FAMILY = "bsc9132" UBOOT_MACHINES ?= " BSC9132QDS_NAND_DDRCLK133 BSC9132QDS_NAND_DDRCLK100 BSC9132QDS_NOR_DDRCLK100 BSC9132QDS_NOR_DDRCLK133 BSC9132QDS_SDCARD_DDRCLK100 BSC9132QDS_SDCARD_DDRCLK133 BSC9132QDS_SPIFLASH_DDRCLK100 BSC9132QDS_SPIFLASH_DDRCLK133" KERNEL_DEVICETREE ?= "bsc9132qds.dtb" -KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/85xx/bsc913x_smp_defconfig" +KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/85xx/bsc913x_smp_defconfig" JFFS2_ERASEBLOCK = "0x10000" diff --git a/meta-fsl-ppc/conf/machine/p1010rdb.conf b/meta-fsl-ppc/conf/machine/p1010rdb.conf index be576561..a9217472 100644 --- a/meta-fsl-ppc/conf/machine/p1010rdb.conf +++ b/meta-fsl-ppc/conf/machine/p1010rdb.conf @@ -11,7 +11,7 @@ UBOOT_MACHINES ?= "P1010RDB-PB_NAND P1010RDB-PB_NOR \ P1010RDB-PB_SPIFLASH P1010RDB-PB_36BIT_NOR P1010RDB-PB_36BIT_NAND \ P1010RDB-PB_36BIT_SPIFLASH" KERNEL_DEVICETREE ?= "p1010rdb-pa.dtb p1010rdb-pb.dtb" -KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_defconfig" +KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/mpc85xx_defconfig" JFFS2_ERASEBLOCK = "0x20000" diff --git a/meta-fsl-ppc/conf/machine/p1020rdb.conf b/meta-fsl-ppc/conf/machine/p1020rdb.conf index 1e9f14e7..9adac799 100644 --- a/meta-fsl-ppc/conf/machine/p1020rdb.conf +++ b/meta-fsl-ppc/conf/machine/p1020rdb.conf @@ -10,7 +10,7 @@ UBOOT_MACHINES ?= " P1020RDB-PD P1020RDB-PD_NAND P1020RDB-PD_SDCARD P1020RDB-PD_ KERNEL_DEVICETREE ?= "p1020rdb-pd_32b.dtb" -KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" +KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" JFFS2_ERASEBLOCK = "0x20000" diff --git a/meta-fsl-ppc/conf/machine/p1021rdb.conf b/meta-fsl-ppc/conf/machine/p1021rdb.conf index fe783447..37c17a4c 100644 --- a/meta-fsl-ppc/conf/machine/p1021rdb.conf +++ b/meta-fsl-ppc/conf/machine/p1021rdb.conf @@ -9,7 +9,7 @@ SOC_FAMILY = "p1021" BOOTFORMAT_CONFIG = "config_sram_p1022ds.dat" UBOOT_MACHINES ?= "P1021RDB-PC P1021RDB-PC_NAND P1021RDB-PC_SDCARD P1021RDB-PC_SPIFLASH P1021RDB-PC_36BIT P1021RDB-PC_36BIT_SPIFLASH P1021RDB-PC_36BIT_NAND P1021RDB-PC_36BIT_SDCARD" KERNEL_DEVICETREE ?= "p1021rdb-pc_32b.dtb" -KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" +KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" JFFS2_ERASEBLOCK = "0x20000" diff --git a/meta-fsl-ppc/conf/machine/p1022ds.conf b/meta-fsl-ppc/conf/machine/p1022ds.conf index 64df2f84..b06da815 100644 --- a/meta-fsl-ppc/conf/machine/p1022ds.conf +++ b/meta-fsl-ppc/conf/machine/p1022ds.conf @@ -8,7 +8,7 @@ SOC_FAMILY = "p1022" BOOTFORMAT_CONFIG = "config_sram_p1022ds.dat" UBOOT_MACHINES ?= "P1022DS P1022DS_NAND P1022DS_SPIFLASH P1022DS_SDCARD P1022DS_36BIT P1022DS_36BIT_SPIFLASH P1022DS_36BIT_NAND P1022DS_36BIT_SDCARD" KERNEL_DEVICETREE ?= "p1022ds_32b.dtb" -KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" +KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xorg" diff --git a/meta-fsl-ppc/conf/machine/p1023rdb.conf b/meta-fsl-ppc/conf/machine/p1023rdb.conf index 13eff250..ece7e3f8 100644 --- a/meta-fsl-ppc/conf/machine/p1023rdb.conf +++ b/meta-fsl-ppc/conf/machine/p1023rdb.conf @@ -7,7 +7,7 @@ require conf/machine/include/soc-family.inc SOC_FAMILY = "p1023" UBOOT_MACHINES ?= "P1023RDB" KERNEL_DEVICETREE ?= "p1023rdb.dtb" -KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/85xx/p1023rds_defconfig" +KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/85xx/p1023rds_defconfig" JFFS2_ERASEBLOCK = "0x10000" diff --git a/meta-fsl-ppc/conf/machine/p1025twr.conf b/meta-fsl-ppc/conf/machine/p1025twr.conf index acfac25f..eb7c439a 100644 --- a/meta-fsl-ppc/conf/machine/p1025twr.conf +++ b/meta-fsl-ppc/conf/machine/p1025twr.conf @@ -9,7 +9,7 @@ SOC_FAMILY = "p1025" BOOTFORMAT_CONFIG = "config_ddr3_1gb_p1_p2_rdb_pc_667M.dat" UBOOT_MACHINES ?= "TWR-P1025" KERNEL_DEVICETREE ?= "p1025twr_32b.dtb" -KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" +KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" JFFS2_ERASEBLOCK = "0x20000" diff --git a/meta-fsl-ppc/conf/machine/p2020ds.conf b/meta-fsl-ppc/conf/machine/p2020ds.conf index b7d1a1dc..cb0b65ef 100644 --- a/meta-fsl-ppc/conf/machine/p2020ds.conf +++ b/meta-fsl-ppc/conf/machine/p2020ds.conf @@ -8,7 +8,7 @@ SOC_FAMILY = "p2020" BOOTFORMAT_CONFIG = "config_sram_p2020ds.dat" UBOOT_MACHINES ?= "P2020DS P2020DS_36BIT P2020DS_DDR2 P2020DS_SDCARD P2020DS_SPIFLASH" KERNEL_DEVICETREE ?= "p2020ds.dtb" -KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" +KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" JFFS2_ERASEBLOCK = "0x20000" diff --git a/meta-fsl-ppc/conf/machine/p2020rdb.conf b/meta-fsl-ppc/conf/machine/p2020rdb.conf index 13698593..6e45ebec 100644 --- a/meta-fsl-ppc/conf/machine/p2020rdb.conf +++ b/meta-fsl-ppc/conf/machine/p2020rdb.conf @@ -9,7 +9,7 @@ SOC_FAMILY = "p2020" BOOTFORMAT_CONFIG = "config_sram_p1022ds.dat" UBOOT_MACHINES ?= " P2020RDB-PC P2020RDB-PC_NAND P2020RDB-PC_SDCARD P2020RDB-PC_SPIFLASH P2020RDB-PC_36BIT P2020RDB-PC_36BIT_SPIFLASH P2020RDB-PC_36BIT_NAND P2020RDB-PC_36BIT_SDCARD" KERNEL_DEVICETREE ?= "p2020rdb-pc_32b.dtb" -KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" +KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" JFFS2_ERASEBLOCK = "0x20000" diff --git a/meta-fsl-ppc/conf/machine/p2041rdb.conf b/meta-fsl-ppc/conf/machine/p2041rdb.conf index 73210279..14b602cf 100644 --- a/meta-fsl-ppc/conf/machine/p2041rdb.conf +++ b/meta-fsl-ppc/conf/machine/p2041rdb.conf @@ -7,7 +7,7 @@ require conf/machine/include/soc-family.inc SOC_FAMILY = "p2041" UBOOT_MACHINES ?= "P2041RDB P2041RDB_NAND P2041RDB_SECURE_BOOT P2041RDB_SDCARD P2041RDB_SPIFLASH" KERNEL_DEVICETREE ?= "p2041rdb.dtb p2041rdb-usdpaa.dtb" -KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet32_smp_defconfig" +KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/corenet32_smp_defconfig" JFFS2_ERASEBLOCK = "0x10000" diff --git a/meta-fsl-ppc/conf/machine/p3041ds.conf b/meta-fsl-ppc/conf/machine/p3041ds.conf index 5dd10838..0116ab52 100644 --- a/meta-fsl-ppc/conf/machine/p3041ds.conf +++ b/meta-fsl-ppc/conf/machine/p3041ds.conf @@ -7,7 +7,7 @@ require conf/machine/include/soc-family.inc SOC_FAMILY = "p3041" UBOOT_MACHINES ?= "P3041DS P3041DS_NAND P3041DS_SECURE_BOOT P3041DS_SDCARD P3041DS_SPIFLASH" KERNEL_DEVICETREE ?= "p3041ds.dtb p3041ds-usdpaa.dtb" -KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet32_smp_defconfig" +KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/corenet32_smp_defconfig" JFFS2_ERASEBLOCK = "0x10000" diff --git a/meta-fsl-ppc/conf/machine/p4080ds.conf b/meta-fsl-ppc/conf/machine/p4080ds.conf index 461044bb..5ea1d4f5 100644 --- a/meta-fsl-ppc/conf/machine/p4080ds.conf +++ b/meta-fsl-ppc/conf/machine/p4080ds.conf @@ -7,7 +7,7 @@ require conf/machine/include/soc-family.inc SOC_FAMILY = "p4080" UBOOT_MACHINES ?= "P4080DS P4080DS_SECURE_BOOT P4080DS_SDCARD P4080DS_SPIFLASH " KERNEL_DEVICETREE ?= "p4080ds.dtb p4080ds-usdpaa.dtb" -KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet32_smp_defconfig" +KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/corenet32_smp_defconfig" JFFS2_ERASEBLOCK = "0x10000" diff --git a/meta-fsl-ppc/conf/machine/p5020ds-64b.conf b/meta-fsl-ppc/conf/machine/p5020ds-64b.conf index 8a45958b..144781bf 100644 --- a/meta-fsl-ppc/conf/machine/p5020ds-64b.conf +++ b/meta-fsl-ppc/conf/machine/p5020ds-64b.conf @@ -8,7 +8,7 @@ SOC_FAMILY = "p5020" # TODO: fix 32bit build of u-boot for p5020ds-64b UBOOT_MACHINES ?= "P5020DS" KERNEL_DEVICETREE ?= "p5020ds.dtb p5020ds-usdpaa.dtb" -KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet64_smp_defconfig" +KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/corenet64_smp_defconfig" JFFS2_ERASEBLOCK = "0x10000" diff --git a/meta-fsl-ppc/conf/machine/p5020ds.conf b/meta-fsl-ppc/conf/machine/p5020ds.conf index 9951c770..8c263d8e 100644 --- a/meta-fsl-ppc/conf/machine/p5020ds.conf +++ b/meta-fsl-ppc/conf/machine/p5020ds.conf @@ -7,7 +7,7 @@ require conf/machine/include/soc-family.inc SOC_FAMILY = "p5020" UBOOT_MACHINES ?= "P5020DS P5020DS_NAND P5020DS_SECURE_BOOT P5020DS_SDCARD P5020DS_SPIFLASH " KERNEL_DEVICETREE ?= "p5020ds.dtb p5020ds-usdpaa.dtb" -KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet32_smp_defconfig" +KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/corenet32_smp_defconfig" JFFS2_ERASEBLOCK = "0x10000" diff --git a/meta-fsl-ppc/conf/machine/p5040ds-64b.conf b/meta-fsl-ppc/conf/machine/p5040ds-64b.conf index 3f16d6ea..e3f6ce16 100644 --- a/meta-fsl-ppc/conf/machine/p5040ds-64b.conf +++ b/meta-fsl-ppc/conf/machine/p5040ds-64b.conf @@ -7,7 +7,7 @@ require conf/machine/include/soc-family.inc SOC_FAMILY = "p5040" UBOOT_MACHINES ?= "P5040DS P5040DS_NAND P5040DS_SECURE_BOOT P5040DS_SDCARD P5040DS_SPIFLASH" KERNEL_DEVICETREE ?= "p5040ds.dtb p5040ds-usdpaa.dtb" -KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet64_smp_defconfig" +KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/corenet64_smp_defconfig" JFFS2_ERASEBLOCK = "0x10000" diff --git a/meta-fsl-ppc/conf/machine/p5040ds.conf b/meta-fsl-ppc/conf/machine/p5040ds.conf index bb61fd93..5692ab0c 100644 --- a/meta-fsl-ppc/conf/machine/p5040ds.conf +++ b/meta-fsl-ppc/conf/machine/p5040ds.conf @@ -7,7 +7,7 @@ require conf/machine/include/soc-family.inc SOC_FAMILY = "p5040" UBOOT_MACHINES ?= "P5040DS P5040DS_NAND P5040DS_SECURE_BOOT P5040DS_SDCARD P5040DS_SPIFLASH" KERNEL_DEVICETREE ?= "p5040ds.dtb p5040ds-usdpaa.dtb" -KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/corenet32_smp_defconfig" +KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/corenet32_smp_defconfig" JFFS2_ERASEBLOCK = "0x10000" diff --git a/meta-fsl-ppc/conf/machine/t4160qds-64b.conf b/meta-fsl-ppc/conf/machine/t4160qds-64b.conf index 0e4ee086..83696d54 100644 --- a/meta-fsl-ppc/conf/machine/t4160qds-64b.conf +++ b/meta-fsl-ppc/conf/machine/t4160qds-64b.conf @@ -8,7 +8,7 @@ SOC_FAMILY = "t4160" # TODO: fix 32bit build of u-boot UBOOT_MACHINES ?= "T4160QDS" KERNEL_DEVICETREE ?= "t4240qds.dtb t4240qds-usdpaa.dtb" -KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/85xx/e6500rev2_defconfig" +KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/85xx/e6500rev2_defconfig" JFFS2_ERASEBLOCK = "0x10000" diff --git a/meta-fsl-ppc/conf/machine/t4160qds.conf b/meta-fsl-ppc/conf/machine/t4160qds.conf index cf3a3049..34b2b2e0 100644 --- a/meta-fsl-ppc/conf/machine/t4160qds.conf +++ b/meta-fsl-ppc/conf/machine/t4160qds.conf @@ -7,7 +7,7 @@ require conf/machine/include/soc-family.inc SOC_FAMILY = "t4160" UBOOT_MACHINES ?= "T4160QDS" KERNEL_DEVICETREE ?= "t4240qds.dtb t4240qds-usdpaa.dtb" -KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/85xx/e6500rev2_defconfig" +KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/85xx/e6500rev2_defconfig" JFFS2_ERASEBLOCK = "0x10000" diff --git a/meta-fsl-ppc/conf/machine/t4240qds-64b.conf b/meta-fsl-ppc/conf/machine/t4240qds-64b.conf index 4ea62c57..ffdf6589 100644 --- a/meta-fsl-ppc/conf/machine/t4240qds-64b.conf +++ b/meta-fsl-ppc/conf/machine/t4240qds-64b.conf @@ -8,7 +8,7 @@ SOC_FAMILY = "t4240" # TODO: fix 32bit build of u-boot UBOOT_MACHINES ?= "T4240QDS" KERNEL_DEVICETREE ?= "t4240qds.dtb t4240qds-usdpaa.dtb" -KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/85xx/e6500rev2_defconfig" +KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/85xx/e6500rev2_defconfig" JFFS2_ERASEBLOCK = "0x10000" diff --git a/meta-fsl-ppc/conf/machine/t4240qds.conf b/meta-fsl-ppc/conf/machine/t4240qds.conf index 099be470..c2c31dde 100644 --- a/meta-fsl-ppc/conf/machine/t4240qds.conf +++ b/meta-fsl-ppc/conf/machine/t4240qds.conf @@ -7,7 +7,7 @@ require conf/machine/include/soc-family.inc SOC_FAMILY = "t4240" UBOOT_MACHINES ?= "T4240QDS" KERNEL_DEVICETREE ?= "t4240qds.dtb t4240qds-usdpaa.dtb" -KERNEL_DEFCONFIG = "${S}/arch/powerpc/configs/85xx/e6500rev2_defconfig" +KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/85xx/e6500rev2_defconfig" JFFS2_ERASEBLOCK = "0x10000" -- cgit v1.2.3-54-g00ecf From e2b6aa03074389dd720ab0c2dc80021b7cd03fd7 Mon Sep 17 00:00:00 2001 From: Zongchun Yu Date: Wed, 22 Jan 2014 14:59:16 +0800 Subject: t2080qds: add machine configure files Signed-off-by: Zongchun Yu --- meta-fsl-ppc/conf/machine/t2080qds-64b.conf | 17 +++++++++++++++++ meta-fsl-ppc/conf/machine/t2080qds.conf | 17 +++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 meta-fsl-ppc/conf/machine/t2080qds-64b.conf create mode 100644 meta-fsl-ppc/conf/machine/t2080qds.conf diff --git a/meta-fsl-ppc/conf/machine/t2080qds-64b.conf b/meta-fsl-ppc/conf/machine/t2080qds-64b.conf new file mode 100644 index 00000000..d149b6e2 --- /dev/null +++ b/meta-fsl-ppc/conf/machine/t2080qds-64b.conf @@ -0,0 +1,17 @@ +#@TYPE: Machine +#@DESCRIPTION: Machine configuration for running T2080QDS in 64-bit mode + +require e6500-64b.inc +require conf/machine/include/soc-family.inc + +SOC_FAMILY = "t2080" +# TODO: fix 32bit build of u-boot +UBOOT_MACHINES ?= "T2080QDS T2080QDS_SDCARD T2080QDS_SPIFLASH T2080QDS_NAND T2080QDS_SRIO_PCIE_BOOT" +KERNEL_DEVICETREE ?= "t2080qds.dtb t2080qds-usdpaa.dtb" +KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/85xx/e6500rev2_defconfig" + +JFFS2_ERASEBLOCK = "0x10000" + +SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" +SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" +USE_VT = "0" diff --git a/meta-fsl-ppc/conf/machine/t2080qds.conf b/meta-fsl-ppc/conf/machine/t2080qds.conf new file mode 100644 index 00000000..a9874b58 --- /dev/null +++ b/meta-fsl-ppc/conf/machine/t2080qds.conf @@ -0,0 +1,17 @@ +#@TYPE: Machine +#@DESCRIPTION: Machine configuration for running T2080QDS in 32-bit mode + +require e6500.inc +require conf/machine/include/soc-family.inc + +SOC_FAMILY = "t2080" +UBOOT_MACHINES ?= "T2080QDS T2080QDS_SDCARD T2080QDS_SPIFLASH T2080QDS_NAND T2080QDS_SRIO_PCIE_BOOT" +KERNEL_DEVICETREE ?= "t2080qds.dtb t2080qds-usdpaa.dtb" +KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/85xx/e6500rev2_defconfig" + +JFFS2_ERASEBLOCK = "0x10000" + +SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" +SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" +USE_VT = "0" +BUILD_64BIT_KERNEL = "1" -- cgit v1.2.3-54-g00ecf From 2039c5c1825c3245e72a7b963f13b0ccf602c713 Mon Sep 17 00:00:00 2001 From: Zongchun Yu Date: Wed, 22 Jan 2014 23:41:26 +0800 Subject: fm-ucode: add support for t2080qds and t2080qds-64b Signed-off-by: Zongchun Yu --- meta-fsl-ppc/recipes-dpaa/fm-ucode/fm-ucode_git.bb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/meta-fsl-ppc/recipes-dpaa/fm-ucode/fm-ucode_git.bb b/meta-fsl-ppc/recipes-dpaa/fm-ucode/fm-ucode_git.bb index 0925d80a..3840e233 100644 --- a/meta-fsl-ppc/recipes-dpaa/fm-ucode/fm-ucode_git.bb +++ b/meta-fsl-ppc/recipes-dpaa/fm-ucode/fm-ucode_git.bb @@ -5,7 +5,7 @@ LIC_FILES_CHKSUM = "file://EULA;md5=60037ccba533a5995e8d1a838d85799c" PR = "r1" -COMPATIBLE_MACHINE = "(p1023rdb|p2041rdb|p3041ds|p4080ds|p5020ds|p5040ds|p5020ds-64b|p5040ds-64b|b4420qds|b4420qds-64b|b4860qds|b4860qds-64b|t4160qds|t4160qds-64b|t4240qds|t4240qds-64b)" +COMPATIBLE_MACHINE = "(p1023rdb|p2041rdb|p3041ds|p4080ds|p5020ds|p5040ds|p5020ds-64b|p5040ds-64b|b4420qds|b4420qds-64b|b4860qds|b4860qds-64b|t4160qds|t4160qds-64b|t2080qds|t2080qds-64b|t4240qds|t4240qds-64b)" inherit deploy SRC_URI = "git://git.freescale.com/ppc/sdk/fm-ucode.git;nobranch=1" @@ -20,6 +20,7 @@ do_install () { t4240qds|t4240qds-64b|t4160qds|t4160qds-64b) UCODE=t4240qds;; p5020ds|p5020ds-64b) UCODE=p5020ds;; p5040ds|p5040ds-64b) UCODE=p5040ds;; + t2080qds|t2080qds-64b) UCODE=t2080qds;; *) UCODE=${MACHINE};; esac UCODE=`echo $UCODE | sed -e 's,[a-zA-Z]*$,,'` @@ -33,6 +34,7 @@ do_deploy () { t4240qds|t4240qds-64b|t4160qds|t4160qds-64b) UCODE=t4240qds;; p5020ds|p5020ds-64b) UCODE=p5020ds;; p5040ds|p5040ds-64b) UCODE=p5040ds;; + t2080qds|t2080qds-64b) UCODE=t2080qds;; *) UCODE=${MACHINE};; esac UCODE=`echo $UCODE | sed -e 's,[a-zA-Z]*$,,'` -- cgit v1.2.3-54-g00ecf From 5f708cb0b01ee2718bacc86e751ed06f565887f9 Mon Sep 17 00:00:00 2001 From: Zongchun Yu Date: Thu, 28 Nov 2013 14:30:13 +0800 Subject: u-boot:add srio image support Signed-off-by: Zongchun Yu --- meta-fsl-ppc/recipes-bsp/u-boot/u-boot_git.bb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/meta-fsl-ppc/recipes-bsp/u-boot/u-boot_git.bb b/meta-fsl-ppc/recipes-bsp/u-boot/u-boot_git.bb index 4f1c61f3..3939ef7e 100644 --- a/meta-fsl-ppc/recipes-bsp/u-boot/u-boot_git.bb +++ b/meta-fsl-ppc/recipes-bsp/u-boot/u-boot_git.bb @@ -74,10 +74,11 @@ do_compile () { *SDCARD*) UBOOT_TARGET="u-boot-sd";; *SPIFLASH*) UBOOT_TARGET="u-boot-spi";; *NAND*) UBOOT_TARGET="u-boot-nand";; + *SRIO*) UBOOT_TARGET="u-boot-srio";; *) UBOOT_TARGET="";; esac - # deal with sd/spi/nand image + # deal with sd/spi/nand/srio image UBOOT_SOURCE=u-boot if [ "x${UBOOT_TARGET}" != "x" ]; then # some boards' nand image was named as u-boot-with-spl @@ -116,6 +117,7 @@ do_install(){ *SDCARD*) UBOOT_TARGET="u-boot-sd";; *SPIFLASH*) UBOOT_TARGET="u-boot-spi";; *NAND*) UBOOT_TARGET="u-boot-nand";; + *SRIO*) UBOOT_TARGET="u-boot-srio";; *) UBOOT_TARGET="u-boot";; esac @@ -137,6 +139,7 @@ do_deploy(){ *SDCARD*) UBOOT_TARGET="u-boot-sd";; *SPIFLASH*) UBOOT_TARGET="u-boot-spi";; *NAND*) UBOOT_TARGET="u-boot-nand";; + *SRIO*) UBOOT_TARGET="u-boot-srio";; *) UBOOT_TARGET="u-boot";; esac -- cgit v1.2.3-54-g00ecf From 1f8628bde4df2f1b3a6f9cad0ebc27213f72e096 Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Tue, 31 Dec 2013 10:17:24 +0800 Subject: fmc: add t2080qds support Signed-off-by: Zhenhua Luo --- meta-fsl-ppc/recipes-dpaa/fmc/fmc_git.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-fsl-ppc/recipes-dpaa/fmc/fmc_git.bb b/meta-fsl-ppc/recipes-dpaa/fmc/fmc_git.bb index c4a16a7a..9d98fec6 100644 --- a/meta-fsl-ppc/recipes-dpaa/fmc/fmc_git.bb +++ b/meta-fsl-ppc/recipes-dpaa/fmc/fmc_git.bb @@ -24,7 +24,7 @@ EXTRA_OEMAKE_virtclass-native = 'FMCHOSTMODE=1 FMD_USPACE_HEADER_PATH="${STAGING PARALLEL_MAKE = "" do_compile () { - if [ "b4860qds" = "${MACHINE}" ] || [ "b4420qds" = "${MACHINE}" ];then + if [ "b4860qds" = "${MACHINE}" ] || [ "t2080qds" = "${MACHINE}" ] || [ "b4420qds" = "${MACHINE}" ];then EXTRA_OEMAKE_PLATFORM="b4860qds" elif [ "t4240qds" = "${MACHINE}" ] || [ "t4160qds" = "${MACHINE}" ];then EXTRA_OEMAKE_PLATFORM="t4240qds" -- cgit v1.2.3-54-g00ecf From c7d22e3bb820e9dedb42f0cd4f8054d65b651cc2 Mon Sep 17 00:00:00 2001 From: Zongchun Yu Date: Fri, 24 Jan 2014 10:17:27 +0800 Subject: u-boot: update license according the source code Signed-off-by: Zongchun Yu --- meta-fsl-ppc/recipes-bsp/u-boot/u-boot_git.bb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/meta-fsl-ppc/recipes-bsp/u-boot/u-boot_git.bb b/meta-fsl-ppc/recipes-bsp/u-boot/u-boot_git.bb index 3939ef7e..068c6f41 100644 --- a/meta-fsl-ppc/recipes-bsp/u-boot/u-boot_git.bb +++ b/meta-fsl-ppc/recipes-bsp/u-boot/u-boot_git.bb @@ -4,6 +4,22 @@ SECTION = "bootloaders" PROVIDES = "virtual/bootloader" LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=1707d6db1d42237583f50183a5651ecb" +LICENSE_t2080qds = "GPLv2 & BSD-3-Clause & BSD-2-Clause & LGPL-2.0 & LGPL-2.1" +LIC_FILES_CHKSUM_t2080qds = " \ + file://Licenses/gpl-2.0.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://Licenses/bsd-2-clause.txt;md5=6a31f076f5773aabd8ff86191ad6fdd5 \ + file://Licenses/bsd-3-clause.txt;md5=4a1190eac56a9db675d58ebe86eaf50c \ + file://Licenses/lgpl-2.0.txt;md5=5f30f0716dfdd0d91eb439ebec522ec2 \ + file://Licenses/lgpl-2.1.txt;md5=4fbd65380cdd255951079008b364516c \ +" +LICENSE_t2080qds-64b = "GPLv2 & BSD-3-Clause & BSD-2-Clause & LGPL-2.0 & LGPL-2.1" +LIC_FILES_CHKSUM_t2080qds-64b = " \ + file://Licenses/gpl-2.0.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://Licenses/bsd-2-clause.txt;md5=6a31f076f5773aabd8ff86191ad6fdd5 \ + file://Licenses/bsd-3-clause.txt;md5=4a1190eac56a9db675d58ebe86eaf50c \ + file://Licenses/lgpl-2.0.txt;md5=5f30f0716dfdd0d91eb439ebec522ec2 \ + file://Licenses/lgpl-2.1.txt;md5=4fbd65380cdd255951079008b364516c \ +" PR = "r30" INHIBIT_DEFAULT_DEPS = "1" -- cgit v1.2.3-54-g00ecf From a481f51761d225aa675a7c72640c2a46892670ba Mon Sep 17 00:00:00 2001 From: Zongchun Yu Date: Thu, 23 Jan 2014 11:41:19 +0800 Subject: asf: update the SHA for SDK T2080QDS Signed-off-by: Zongchun Yu --- meta-fsl-ppc/recipes-kernel/asf/asf_git.bb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/meta-fsl-ppc/recipes-kernel/asf/asf_git.bb b/meta-fsl-ppc/recipes-kernel/asf/asf_git.bb index 3dc8f908..c9948eeb 100644 --- a/meta-fsl-ppc/recipes-kernel/asf/asf_git.bb +++ b/meta-fsl-ppc/recipes-kernel/asf/asf_git.bb @@ -5,6 +5,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b5881ecf398da8a03a3f4c501e29d287" SRC_URI = "git://git.freescale.com/ppc/sdk/asf.git;nobranch=1" SRCREV = "c262d7701af325b50cae54279a021ae7b5081e24" +SRCREV_t2080qds = "6af9df06e2747bdee91c21d1626b5b53b97849c5" +SRCREV_t2080qds-64b = "6af9df06e2747bdee91c21d1626b5b53b97849c5" DEPENDS="virtual/kernel" RDEPENDS_${PN} += "ipsec-tools" -- cgit v1.2.3-54-g00ecf From bee23cda14f83592460d4c57e91bf39dcac129af Mon Sep 17 00:00:00 2001 From: Zongchun Yu Date: Thu, 23 Jan 2014 11:44:11 +0800 Subject: cst: update SHA for SDK T2080QDS Signed-off-by: Zongchun Yu --- meta-fsl-ppc/recipes-extended/cst/cst_git.bb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/meta-fsl-ppc/recipes-extended/cst/cst_git.bb b/meta-fsl-ppc/recipes-extended/cst/cst_git.bb index 82594c22..a9d41ac9 100644 --- a/meta-fsl-ppc/recipes-extended/cst/cst_git.bb +++ b/meta-fsl-ppc/recipes-extended/cst/cst_git.bb @@ -9,6 +9,8 @@ DEPENDS += "openssl" SRC_URI = "git://git.freescale.com/ppc/sdk/cst.git;nobranch=1" SRCREV = "55223ed64404ee57c55416017a8d65b28314282e" +SRCREV_t2080qds = "fd8f47ed97bc9a878a203e77ca74b2b8eda86a66" +SRCREV_t2080qds-64b = "fd8f47ed97bc9a878a203e77ca74b2b8eda86a66" S = "${WORKDIR}/git" -- cgit v1.2.3-54-g00ecf From 8d67145a13a25b7468573badb93f22f7f0f91b26 Mon Sep 17 00:00:00 2001 From: Zongchun Yu Date: Thu, 23 Jan 2014 11:49:21 +0800 Subject: hv-cfg: update SHA for SDK T2080QDS Signed-off-by: Zongchun Yu --- meta-fsl-ppc/recipes-virtualization/hv-cfg/hv-cfg_git.bb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/meta-fsl-ppc/recipes-virtualization/hv-cfg/hv-cfg_git.bb b/meta-fsl-ppc/recipes-virtualization/hv-cfg/hv-cfg_git.bb index a92ef335..a9135247 100644 --- a/meta-fsl-ppc/recipes-virtualization/hv-cfg/hv-cfg_git.bb +++ b/meta-fsl-ppc/recipes-virtualization/hv-cfg/hv-cfg_git.bb @@ -20,6 +20,8 @@ inherit deploy SRC_URI = "git://git.freescale.com/ppc/sdk/hv-cfg.git;nobranch=1" SRCREV = "39f1e585e0a70634e009b2e720407b27f787ace1" +SRCREV_t2080qds = "46065e277a853ca3fa80040d3b00d7582b619a47" +SRCREV_t2080qds-64b = "46065e277a853ca3fa80040d3b00d7582b619a47" S = "${WORKDIR}/git" -- cgit v1.2.3-54-g00ecf From 8b969135ee81ee536d73967e462e0a5bdc8a8beb Mon Sep 17 00:00:00 2001 From: Zongchun Yu Date: Thu, 23 Jan 2014 11:55:56 +0800 Subject: hypervisor: update SHA for SDK T2080QDS Signed-off-by: Zongchun Yu --- meta-fsl-ppc/recipes-virtualization/hypervisor/hypervisor_git.bb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/meta-fsl-ppc/recipes-virtualization/hypervisor/hypervisor_git.bb b/meta-fsl-ppc/recipes-virtualization/hypervisor/hypervisor_git.bb index 61ecbc17..318c9422 100644 --- a/meta-fsl-ppc/recipes-virtualization/hypervisor/hypervisor_git.bb +++ b/meta-fsl-ppc/recipes-virtualization/hypervisor/hypervisor_git.bb @@ -23,6 +23,8 @@ SRC_URI = " \ SRCREV_FORMAT="hypervisor" SRCREV = "acbde15272d46a80bcf4a00d7d18ca4a86e49c16" +SRCREV_t2080qds = "2a430ebaa59841fdb49c0c87f8766cc2ef99123b" +SRCREV_t2080qds-64b = "2a430ebaa59841fdb49c0c87f8766cc2ef99123b" SRCREV_kconfig = "a56025d4da992b856796b0eccac2e410d751dbac" SRCREV_libos = "4691387e15be78d140142104f30b3f356281c46a" SRCREV_dtc = "033089f29099bdfd5c2d6986cdb9fd07b16cfde0" -- cgit v1.2.3-54-g00ecf From 0d5525cba70409bf11d46a028f0cd9bd14c22f12 Mon Sep 17 00:00:00 2001 From: Zongchun Yu Date: Thu, 23 Jan 2014 12:23:50 +0800 Subject: fmlib: update SHA for SDK T2080QDS Signed-off-by: Zongchun Yu --- meta-fsl-ppc/recipes-dpaa/fmlib/fmlib_git.bb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/meta-fsl-ppc/recipes-dpaa/fmlib/fmlib_git.bb b/meta-fsl-ppc/recipes-dpaa/fmlib/fmlib_git.bb index fc3cc596..df7caf87 100644 --- a/meta-fsl-ppc/recipes-dpaa/fmlib/fmlib_git.bb +++ b/meta-fsl-ppc/recipes-dpaa/fmlib/fmlib_git.bb @@ -10,6 +10,8 @@ DEPENDS_virtclass-native = "" SRC_URI = "git://git.freescale.com/ppc/sdk/fmlib.git;nobranch=1" SRCREV = "1fce11f17a102820a20cdbf80f557d74b169fc4c" +SRCREV_t2080qds = "49f50a4bf4f0e34708003d7b49ce629630b68489" +SRCREV_t2080qds-64b = "49f50a4bf4f0e34708003d7b49ce629630b68489" S = "${WORKDIR}/git" -- cgit v1.2.3-54-g00ecf From 2ed93b4b44c396572a2a64ec062859af4c3d3688 Mon Sep 17 00:00:00 2001 From: Zongchun Yu Date: Thu, 23 Jan 2014 13:26:19 +0800 Subject: flib: update SHA for SDK T2080QDS Signed-off-by: Zongchun Yu --- meta-fsl-ppc/recipes-dpaa/flib/flib_git.bb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/meta-fsl-ppc/recipes-dpaa/flib/flib_git.bb b/meta-fsl-ppc/recipes-dpaa/flib/flib_git.bb index 9ef4b9fe..3f259997 100644 --- a/meta-fsl-ppc/recipes-dpaa/flib/flib_git.bb +++ b/meta-fsl-ppc/recipes-dpaa/flib/flib_git.bb @@ -3,8 +3,10 @@ SECTION = "flib" LICENSE = "BSD & GPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=3f16fa8e677e45af3127c5c4bafc3c00" -SRC_URI = "git://git.freescale.com/ppc/sdk/flib.git" +SRC_URI = "git://git.freescale.com/ppc/sdk/flib.git;nobranch=1" SRCREV = "bb6162efa0767fc515c87a51191a9edba4750426" +SRCREV_t2080qds = "64a3233ae426f36119268381c62100b02f7fe7e1" +SRCREV_t2080qds-64b = "64a3233ae426f36119268381c62100b02f7fe7e1" S = "${WORKDIR}/git" -- cgit v1.2.3-54-g00ecf From 66d138fe4b48eeb0df741c5d4af30c88bbff5e8d Mon Sep 17 00:00:00 2001 From: Zongchun Yu Date: Thu, 23 Jan 2014 13:33:16 +0800 Subject: linux: update SHA for SDK T2080QDS Signed-off-by: Zongchun Yu --- meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc index 30a0378d..83c632e3 100644 --- a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc +++ b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc @@ -5,6 +5,8 @@ INC_PR = "r11" SRC_URI = "git://git.freescale.com/ppc/sdk/linux.git;nobranch=1" SRCREV = "3edd71eeb4e4ae27baf539e0a5f0c8e8261bf65b" +SRCREV_t2080qds = "47914f6cf77197921c648c6ea8977974fa54d03a" +SRCREV_t2080qds-64b = "47914f6cf77197921c648c6ea8977974fa54d03a" KSRC ?= "" S = '${@base_conditional("KSRC", "", "${WORKDIR}/git", "${KSRC}", d)}' -- cgit v1.2.3-54-g00ecf From a5e9679373fdaac6c6464e5a117142eb0c159225 Mon Sep 17 00:00:00 2001 From: Zongchun Yu Date: Thu, 23 Jan 2014 13:41:58 +0800 Subject: rcw: update SHA for SDK T2080QDS Signed-off-by: Zongchun Yu --- meta-fsl-ppc/recipes-bsp/rcw/rcw_git.bb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/meta-fsl-ppc/recipes-bsp/rcw/rcw_git.bb b/meta-fsl-ppc/recipes-bsp/rcw/rcw_git.bb index f2d0164f..ad961ed8 100644 --- a/meta-fsl-ppc/recipes-bsp/rcw/rcw_git.bb +++ b/meta-fsl-ppc/recipes-bsp/rcw/rcw_git.bb @@ -13,6 +13,8 @@ inherit deploy SRC_URI = "git://git.freescale.com/ppc/sdk/rcw.git;nobranch=1" SRCREV = "bc38737b5cb08336a075cb38481881f87b33b7a1" +SRCREV_t2080qds = "a694a89f4b57ce700b5b2ea84302c8618ece2f0f" +SRCREV_t2080qds-64b = "a694a89f4b57ce700b5b2ea84302c8618ece2f0f" S = "${WORKDIR}/git" -- cgit v1.2.3-54-g00ecf From c277d92824fcb9a8c7223aba0ffd7a03c8f05560 Mon Sep 17 00:00:00 2001 From: Zongchun Yu Date: Thu, 23 Jan 2014 13:46:35 +0800 Subject: usdpaa: update the SHA for SDK T2080QDS Signed-off-by: Zongchun Yu --- meta-fsl-ppc/recipes-dpaa/usdpaa/usdpaa_git.bb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/meta-fsl-ppc/recipes-dpaa/usdpaa/usdpaa_git.bb b/meta-fsl-ppc/recipes-dpaa/usdpaa/usdpaa_git.bb index e61989a0..8288b2a1 100644 --- a/meta-fsl-ppc/recipes-dpaa/usdpaa/usdpaa_git.bb +++ b/meta-fsl-ppc/recipes-dpaa/usdpaa/usdpaa_git.bb @@ -12,6 +12,8 @@ RDEPENDS_${PN} = "libgcc bash" SRC_URI = "git://git.freescale.com/ppc/sdk/usdpaa.git;nobranch=1" SRCREV = "cc8e332c64e5840ea2037624159801284434caba" +SRCREV_t2080qds = "e6659c7a473fbaa64313c941d5fb10c723c64731" +SRCREV_t2080qds-64b = "e6659c7a473fbaa64313c941d5fb10c723c64731" S = "${WORKDIR}/git" -- cgit v1.2.3-54-g00ecf From 8caffd0a3a402ea98d2d313f1c7f7d72a15d9bb2 Mon Sep 17 00:00:00 2001 From: Zongchun Yu Date: Thu, 23 Jan 2014 14:05:31 +0800 Subject: u-boot: update SHA for SDK T2080QDS Signed-off-by: Zongchun Yu --- meta-fsl-ppc/recipes-bsp/u-boot/u-boot_git.bb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/meta-fsl-ppc/recipes-bsp/u-boot/u-boot_git.bb b/meta-fsl-ppc/recipes-bsp/u-boot/u-boot_git.bb index 068c6f41..4f8690c2 100644 --- a/meta-fsl-ppc/recipes-bsp/u-boot/u-boot_git.bb +++ b/meta-fsl-ppc/recipes-bsp/u-boot/u-boot_git.bb @@ -27,10 +27,11 @@ DEPENDS = "boot-format-native libgcc ${@base_contains('TCMODE', 'external-fsl', inherit deploy -SRCBRANCH = "sdk-v1.5.x" -SRC_URI = "git://git.freescale.com/ppc/sdk/u-boot.git;branch=${SRCBRANCH} \ +SRC_URI = "git://git.freescale.com/ppc/sdk/u-boot.git;nobranch=1 \ file://Fix-the-depend-race-issue.patch" SRCREV = "5438fc1ca159c8f5724272efd1289e6d49771e69" +SRCREV_t2080qds = "fc03874549668c1a10f97c10b3a77cb0f236df19" +SRCREV_t2080qds-64b = "fc03874549668c1a10f97c10b3a77cb0f236df19" python () { if d.getVar("TCMODE", True) == "external-fsl": -- cgit v1.2.3-54-g00ecf From 2aa3a1ccfa820c8dd3188567a1fbc04ccef21a15 Mon Sep 17 00:00:00 2001 From: Chunrong Guo Date: Thu, 27 Mar 2014 13:46:20 +0800 Subject: u-boot: add git revision to the local version Signed-off-by: Chunrong Guo --- meta-fsl-ppc/recipes-bsp/u-boot/u-boot_git.bb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/meta-fsl-ppc/recipes-bsp/u-boot/u-boot_git.bb b/meta-fsl-ppc/recipes-bsp/u-boot/u-boot_git.bb index 4f8690c2..406914cb 100644 --- a/meta-fsl-ppc/recipes-bsp/u-boot/u-boot_git.bb +++ b/meta-fsl-ppc/recipes-bsp/u-boot/u-boot_git.bb @@ -74,8 +74,9 @@ do_compile () { if [ ! -e ${B}/.scmversion -a ! -e ${S}/.scmversion ] then - echo ${UBOOT_LOCALVERSION} > ${B}/.scmversion - echo ${UBOOT_LOCALVERSION} > ${S}/.scmversion + head=`git rev-parse --verify --short HEAD 2> /dev/null` + printf "%s%s%s" ${UBOOT_LOCALVERSION} +g $head > ${B}/.scmversion + printf "%s%s%s" ${UBOOT_LOCALVERSION} +g $head > ${S}/.scmversion fi if [ "x${UBOOT_MACHINES}" = "x" ]; then -- cgit v1.2.3-54-g00ecf From 18eb1a43e33ec477ba7ec3a4a8f0bdb427206ed5 Mon Sep 17 00:00:00 2001 From: Chunrong Guo Date: Thu, 27 Mar 2014 13:41:02 +0800 Subject: linux-qoriq-sdk: add git revision to the local version Signed-off-by: Chunrong Guo --- meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.bb | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.bb b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.bb index 0ff68ced..275691ab 100644 --- a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.bb +++ b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.bb @@ -9,6 +9,8 @@ require recipes-kernel/linux/linux-qoriq-sdk.inc PR = "${INC_PR}.1" +SCMVERSION ?= "y" + DEPENDS_append = " libgcc" KERNEL_CC_append = " ${TOOLCHAIN_OPTIONS}" KERNEL_LD_append = " ${TOOLCHAIN_OPTIONS}" @@ -23,7 +25,13 @@ do_configure_prepend() { fi # append sdk version in kernel version if SDK_VERSION is defined - if [ -n "${SDK_VERSION}" ]; then - echo "CONFIG_LOCALVERSION=\"-${SDK_VERSION}\"" >> ${S}/.config - fi + if [ -n "${SDK_VERSION}" ]; then + echo "CONFIG_LOCALVERSION=\"-${SDK_VERSION}\"" >> ${S}/.config + fi + + # Add GIT revision to the local version + if [ "${SCMVERSION}" = "y" ]; then + head=`git rev-parse --verify --short HEAD 2> /dev/null` + printf "%s%s" +g $head > ${S}/.scmversion + fi } -- cgit v1.2.3-54-g00ecf From d70a372d98422816f88cc434c1e538cfb5ed5e8c Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Tue, 22 Apr 2014 20:02:56 +0800 Subject: Freescale-EULA: fix awq weird character Signed-off-by: Ting Liu Signed-off-by: Zhenhua Luo --- meta-fsl-ppc/custom-licenses/Freescale-EULA | 2 +- meta-fsl-ppc/recipes-dpaa/eth-config/eth-config_git.bb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/meta-fsl-ppc/custom-licenses/Freescale-EULA b/meta-fsl-ppc/custom-licenses/Freescale-EULA index 6a9b42d8..2122a1fd 100644 --- a/meta-fsl-ppc/custom-licenses/Freescale-EULA +++ b/meta-fsl-ppc/custom-licenses/Freescale-EULA @@ -23,7 +23,7 @@ this Agreement. Your prior use will also continue to be governed by this Agreeme 1. LICENSE GRANT. Freescale grants to you, free of charge, the non-exclusive, non-transferable, non-sublicensable right (1) to use the Software, (2) to reproduce the Software, (3) to prepare derivative works of the Software, (4) to distribute the -Software and derivative works thereof in object (machine¨Creadable) form as part of +Software and derivative works thereof in object (machine-readable) form as part of a programmable processing unit (e.g. a microprocessor, microcontroller, or digital signal processor) supplied directly or indirectly from Freescale ("Freescale System") and (5) to sublicense to others the right to use the distributed Software, diff --git a/meta-fsl-ppc/recipes-dpaa/eth-config/eth-config_git.bb b/meta-fsl-ppc/recipes-dpaa/eth-config/eth-config_git.bb index 85c3b784..882fa692 100644 --- a/meta-fsl-ppc/recipes-dpaa/eth-config/eth-config_git.bb +++ b/meta-fsl-ppc/recipes-dpaa/eth-config/eth-config_git.bb @@ -1,7 +1,7 @@ DESCRIPTION = "Ethernet Configuration Files" SECTION = "eth-config" LICENSE = "Freescale-EULA" -LIC_FILES_CHKSUM = "file://COPYING;md5=cf02dc8eb5ac4a76f3812826520dea87" +LIC_FILES_CHKSUM = "file://COPYING;md5=ee9cce4f1b396a50469f4dbde064e866" PR = "r2" -- cgit v1.2.3-54-g00ecf From 0ab957031270d88edf9f2e9ae248d6389bc71933 Mon Sep 17 00:00:00 2001 From: Otavio Salvador Date: Tue, 22 Apr 2014 10:00:33 -0300 Subject: Use generic bbappend files This uses the % wildcard for recipe matching, this easy the update of recipe versions and maintenance. - udev-extraconf_1.0.bbappend - xserver-xf86-config_0.1.bbappend - lttng-modules_2.3.3.bbappend Signed-off-by: Otavio Salvador --- .../recipes-core/udev/udev-extraconf_%.bbappend | 12 ++++++++++++ .../recipes-core/udev/udev-extraconf_1.0.bbappend | 12 ------------ .../xorg-xserver/xserver-xf86-config_%.bbappend | 3 +++ .../xorg-xserver/xserver-xf86-config_0.1.bbappend | 3 --- .../recipes-kernel/lttng/lttng-modules_%.bbappend | 18 ++++++++++++++++++ .../recipes-kernel/lttng/lttng-modules_2.3.3.bbappend | 18 ------------------ 6 files changed, 33 insertions(+), 33 deletions(-) create mode 100644 meta-fsl-ppc/recipes-core/udev/udev-extraconf_%.bbappend delete mode 100644 meta-fsl-ppc/recipes-core/udev/udev-extraconf_1.0.bbappend create mode 100644 meta-fsl-ppc/recipes-graphics/xorg-xserver/xserver-xf86-config_%.bbappend delete mode 100644 meta-fsl-ppc/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend create mode 100644 meta-fsl-ppc/recipes-kernel/lttng/lttng-modules_%.bbappend delete mode 100644 meta-fsl-ppc/recipes-kernel/lttng/lttng-modules_2.3.3.bbappend diff --git a/meta-fsl-ppc/recipes-core/udev/udev-extraconf_%.bbappend b/meta-fsl-ppc/recipes-core/udev/udev-extraconf_%.bbappend new file mode 100644 index 00000000..056d0378 --- /dev/null +++ b/meta-fsl-ppc/recipes-core/udev/udev-extraconf_%.bbappend @@ -0,0 +1,12 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +PRINC := "${@int(PRINC) + 2}" + +SRC_URI_append = " file://${@bb.utils.contains("TUNE_FEATURES", "e6500", \ + "72-fsl-dpaa-persistent-networking.rules", "71-fsl-dpaa-persistent-networking.rules", d)}" + +do_install_append () { + install -d ${D}${sysconfdir}/udev/rules.d/ + install -m 0644 ${WORKDIR}/*-fsl-dpaa-persistent-networking.rules ${D}${sysconfdir}/udev/rules.d +} + diff --git a/meta-fsl-ppc/recipes-core/udev/udev-extraconf_1.0.bbappend b/meta-fsl-ppc/recipes-core/udev/udev-extraconf_1.0.bbappend deleted file mode 100644 index 056d0378..00000000 --- a/meta-fsl-ppc/recipes-core/udev/udev-extraconf_1.0.bbappend +++ /dev/null @@ -1,12 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" - -PRINC := "${@int(PRINC) + 2}" - -SRC_URI_append = " file://${@bb.utils.contains("TUNE_FEATURES", "e6500", \ - "72-fsl-dpaa-persistent-networking.rules", "71-fsl-dpaa-persistent-networking.rules", d)}" - -do_install_append () { - install -d ${D}${sysconfdir}/udev/rules.d/ - install -m 0644 ${WORKDIR}/*-fsl-dpaa-persistent-networking.rules ${D}${sysconfdir}/udev/rules.d -} - diff --git a/meta-fsl-ppc/recipes-graphics/xorg-xserver/xserver-xf86-config_%.bbappend b/meta-fsl-ppc/recipes-graphics/xorg-xserver/xserver-xf86-config_%.bbappend new file mode 100644 index 00000000..7ae4ec29 --- /dev/null +++ b/meta-fsl-ppc/recipes-graphics/xorg-xserver/xserver-xf86-config_%.bbappend @@ -0,0 +1,3 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +PRINC := "${@int(PRINC) + 1}" diff --git a/meta-fsl-ppc/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend b/meta-fsl-ppc/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend deleted file mode 100644 index 7ae4ec29..00000000 --- a/meta-fsl-ppc/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend +++ /dev/null @@ -1,3 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" - -PRINC := "${@int(PRINC) + 1}" diff --git a/meta-fsl-ppc/recipes-kernel/lttng/lttng-modules_%.bbappend b/meta-fsl-ppc/recipes-kernel/lttng/lttng-modules_%.bbappend new file mode 100644 index 00000000..5415f16e --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/lttng/lttng-modules_%.bbappend @@ -0,0 +1,18 @@ +inherit distro_features_check + +REQUIRED_DISTRO_FEATURES_append_e6500 ?= "multiarch" + +python () { + + promote_kernel = d.getVar('BUILD_64BIT_KERNEL') + + if promote_kernel == "1": + d.appendVar('KERNEL_CC', ' -m64') + d.appendVar('KERNEL_LD', ' -melf64ppc') + + + error_qa = d.getVar('ERROR_QA', True) + if 'arch' in error_qa: + d.setVar('ERROR_QA', error_qa.replace(' arch', '')) + +} diff --git a/meta-fsl-ppc/recipes-kernel/lttng/lttng-modules_2.3.3.bbappend b/meta-fsl-ppc/recipes-kernel/lttng/lttng-modules_2.3.3.bbappend deleted file mode 100644 index 5415f16e..00000000 --- a/meta-fsl-ppc/recipes-kernel/lttng/lttng-modules_2.3.3.bbappend +++ /dev/null @@ -1,18 +0,0 @@ -inherit distro_features_check - -REQUIRED_DISTRO_FEATURES_append_e6500 ?= "multiarch" - -python () { - - promote_kernel = d.getVar('BUILD_64BIT_KERNEL') - - if promote_kernel == "1": - d.appendVar('KERNEL_CC', ' -m64') - d.appendVar('KERNEL_LD', ' -melf64ppc') - - - error_qa = d.getVar('ERROR_QA', True) - if 'arch' in error_qa: - d.setVar('ERROR_QA', error_qa.replace(' arch', '')) - -} -- cgit v1.2.3-54-g00ecf From 3251bddb3099d18b819eaa45cd59bc31f767d097 Mon Sep 17 00:00:00 2001 From: Chunrong Guo Date: Fri, 25 Apr 2014 12:02:09 +0800 Subject: remove PRINC use in meta-fsl-ppc Signed-off-by: Chunrong Guo --- meta-fsl-ppc/recipes-core/sysvinit/sysvinit_2.88dsf.bbappend | 3 +-- meta-fsl-ppc/recipes-core/udev/udev-extraconf_%.bbappend | 2 -- meta-fsl-ppc/recipes-core/udev/udev_182.bbappend | 3 +-- meta-fsl-ppc/recipes-extended/procps/procps_3.2.8.bbappend | 3 +-- .../recipes-graphics/xorg-xserver/xserver-xf86-config_%.bbappend | 1 - 5 files changed, 3 insertions(+), 9 deletions(-) diff --git a/meta-fsl-ppc/recipes-core/sysvinit/sysvinit_2.88dsf.bbappend b/meta-fsl-ppc/recipes-core/sysvinit/sysvinit_2.88dsf.bbappend index 8445337a..72d991c7 100644 --- a/meta-fsl-ppc/recipes-core/sysvinit/sysvinit_2.88dsf.bbappend +++ b/meta-fsl-ppc/recipes-core/sysvinit/sysvinit_2.88dsf.bbappend @@ -1,2 +1 @@ -PRINC := "${@int(PRINC) + 1}" - +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" diff --git a/meta-fsl-ppc/recipes-core/udev/udev-extraconf_%.bbappend b/meta-fsl-ppc/recipes-core/udev/udev-extraconf_%.bbappend index 056d0378..db74aacb 100644 --- a/meta-fsl-ppc/recipes-core/udev/udev-extraconf_%.bbappend +++ b/meta-fsl-ppc/recipes-core/udev/udev-extraconf_%.bbappend @@ -1,7 +1,5 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" -PRINC := "${@int(PRINC) + 2}" - SRC_URI_append = " file://${@bb.utils.contains("TUNE_FEATURES", "e6500", \ "72-fsl-dpaa-persistent-networking.rules", "71-fsl-dpaa-persistent-networking.rules", d)}" diff --git a/meta-fsl-ppc/recipes-core/udev/udev_182.bbappend b/meta-fsl-ppc/recipes-core/udev/udev_182.bbappend index 8445337a..72d991c7 100644 --- a/meta-fsl-ppc/recipes-core/udev/udev_182.bbappend +++ b/meta-fsl-ppc/recipes-core/udev/udev_182.bbappend @@ -1,2 +1 @@ -PRINC := "${@int(PRINC) + 1}" - +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" diff --git a/meta-fsl-ppc/recipes-extended/procps/procps_3.2.8.bbappend b/meta-fsl-ppc/recipes-extended/procps/procps_3.2.8.bbappend index 8445337a..72d991c7 100644 --- a/meta-fsl-ppc/recipes-extended/procps/procps_3.2.8.bbappend +++ b/meta-fsl-ppc/recipes-extended/procps/procps_3.2.8.bbappend @@ -1,2 +1 @@ -PRINC := "${@int(PRINC) + 1}" - +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" diff --git a/meta-fsl-ppc/recipes-graphics/xorg-xserver/xserver-xf86-config_%.bbappend b/meta-fsl-ppc/recipes-graphics/xorg-xserver/xserver-xf86-config_%.bbappend index 7ae4ec29..6d4804d1 100644 --- a/meta-fsl-ppc/recipes-graphics/xorg-xserver/xserver-xf86-config_%.bbappend +++ b/meta-fsl-ppc/recipes-graphics/xorg-xserver/xserver-xf86-config_%.bbappend @@ -1,3 +1,2 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" -PRINC := "${@int(PRINC) + 1}" -- cgit v1.2.3-54-g00ecf From c2e03250a48d136b5b487877fb34e40032c7c6c4 Mon Sep 17 00:00:00 2001 From: Chunrong Guo Date: Wed, 28 May 2014 17:28:20 +0800 Subject: conf/machine/*.conf: Rework information header *Rework the information header to include a proper name, SoC and maintainer fields. This change has been done for follow boards: - b4420qds-64b - b4420qds - b4860qds-64b - b4860qds - bsc9131rdb - bsc9132qds - c293pcie - p1010rdb - p1020rdb - p1021rdb - p1022ds - p1023rdb - p1025twr - p2020ds - p2020rdb - p2041rdb - p3041ds - p4080ds - p5020ds-64b - p5020ds - p5040ds-64b - p5040ds - t2080qds-64b - t2080qds - t4160qds-64b - t4160qds - t4240qds-64b - t4240qds Signed-off-by: Chunrong Guo Acked-by: Otavio Salvador --- meta-fsl-ppc/conf/machine/b4420qds-64b.conf | 3 +++ meta-fsl-ppc/conf/machine/b4420qds.conf | 3 +++ meta-fsl-ppc/conf/machine/b4860qds-64b.conf | 3 +++ meta-fsl-ppc/conf/machine/b4860qds.conf | 3 +++ meta-fsl-ppc/conf/machine/bsc9131rdb.conf | 5 ++++- meta-fsl-ppc/conf/machine/bsc9132qds.conf | 5 ++++- meta-fsl-ppc/conf/machine/c293pcie.conf | 3 +++ meta-fsl-ppc/conf/machine/p1010rdb.conf | 4 +++- meta-fsl-ppc/conf/machine/p1020rdb.conf | 5 ++++- meta-fsl-ppc/conf/machine/p1021rdb.conf | 4 +++- meta-fsl-ppc/conf/machine/p1022ds.conf | 5 ++++- meta-fsl-ppc/conf/machine/p1023rdb.conf | 5 ++++- meta-fsl-ppc/conf/machine/p1025twr.conf | 4 +++- meta-fsl-ppc/conf/machine/p2020ds.conf | 5 ++++- meta-fsl-ppc/conf/machine/p2020rdb.conf | 4 +++- meta-fsl-ppc/conf/machine/p2041rdb.conf | 5 ++++- meta-fsl-ppc/conf/machine/p3041ds.conf | 5 ++++- meta-fsl-ppc/conf/machine/p4080ds.conf | 5 ++++- meta-fsl-ppc/conf/machine/p5020ds-64b.conf | 5 ++++- meta-fsl-ppc/conf/machine/p5020ds.conf | 5 ++++- meta-fsl-ppc/conf/machine/p5040ds-64b.conf | 5 ++++- meta-fsl-ppc/conf/machine/p5040ds.conf | 5 ++++- meta-fsl-ppc/conf/machine/t2080qds-64b.conf | 3 +++ meta-fsl-ppc/conf/machine/t2080qds.conf | 3 +++ meta-fsl-ppc/conf/machine/t4160qds-64b.conf | 3 +++ meta-fsl-ppc/conf/machine/t4160qds.conf | 3 +++ meta-fsl-ppc/conf/machine/t4240qds-64b.conf | 3 +++ meta-fsl-ppc/conf/machine/t4240qds.conf | 3 +++ 28 files changed, 97 insertions(+), 17 deletions(-) diff --git a/meta-fsl-ppc/conf/machine/b4420qds-64b.conf b/meta-fsl-ppc/conf/machine/b4420qds-64b.conf index 0bb959cb..ea51fe4e 100644 --- a/meta-fsl-ppc/conf/machine/b4420qds-64b.conf +++ b/meta-fsl-ppc/conf/machine/b4420qds-64b.conf @@ -1,5 +1,8 @@ #@TYPE: Machine +#@NAME: Freescale B4420QDS-64B +#@SOC: b4420 #@DESCRIPTION: Machine configuration for running B4420QDS in 64-bit mode +#@MAINTAINER: Chunrong Guo require e6500-64b.inc require conf/machine/include/soc-family.inc diff --git a/meta-fsl-ppc/conf/machine/b4420qds.conf b/meta-fsl-ppc/conf/machine/b4420qds.conf index b07ab5d2..66526124 100644 --- a/meta-fsl-ppc/conf/machine/b4420qds.conf +++ b/meta-fsl-ppc/conf/machine/b4420qds.conf @@ -1,5 +1,8 @@ #@TYPE: Machine +#@NAME: Freescale B4420QDS +#@SOC: b4420 #@DESCRIPTION: Machine configuration for running B4420QDS in 32-bit mode +#@MAINTAINER: Chunrong Guo require e6500.inc require conf/machine/include/soc-family.inc diff --git a/meta-fsl-ppc/conf/machine/b4860qds-64b.conf b/meta-fsl-ppc/conf/machine/b4860qds-64b.conf index 86596106..07770e81 100644 --- a/meta-fsl-ppc/conf/machine/b4860qds-64b.conf +++ b/meta-fsl-ppc/conf/machine/b4860qds-64b.conf @@ -1,5 +1,8 @@ #@TYPE: Machine +#@NAME: Freescale B4860QDS-64B +#@SOC: b4860 #@DESCRIPTION: Machine configuration for running B4860QDS in 64-bit mode +#@MAINTAINER: Chunrong Guo require e6500-64b.inc require conf/machine/include/soc-family.inc diff --git a/meta-fsl-ppc/conf/machine/b4860qds.conf b/meta-fsl-ppc/conf/machine/b4860qds.conf index 2aa471ef..5fafafdd 100644 --- a/meta-fsl-ppc/conf/machine/b4860qds.conf +++ b/meta-fsl-ppc/conf/machine/b4860qds.conf @@ -1,5 +1,8 @@ #@TYPE: Machine +#@NAME: Freescale B4860QDS +#@SOC: b4860 #@DESCRIPTION: Machine configuration for running B4860QDS in 32-bit mode +#@MAINTAINER: Chunrong Guo require e6500.inc require conf/machine/include/soc-family.inc diff --git a/meta-fsl-ppc/conf/machine/bsc9131rdb.conf b/meta-fsl-ppc/conf/machine/bsc9131rdb.conf index c145a047..58c9f5b5 100644 --- a/meta-fsl-ppc/conf/machine/bsc9131rdb.conf +++ b/meta-fsl-ppc/conf/machine/bsc9131rdb.conf @@ -1,5 +1,8 @@ #@TYPE: Machine -#@DESCRIPTION: Machine configuration for running +#@NAME: Freescale BSC9131RDB +#@SOC: bsc9131 +#@DESCRIPTION: Machine configuration for running BSC9131RDB +#@MAINTAINER: Chunrong Guo require e500v2.inc require conf/machine/include/soc-family.inc diff --git a/meta-fsl-ppc/conf/machine/bsc9132qds.conf b/meta-fsl-ppc/conf/machine/bsc9132qds.conf index 5b9a1006..fc056326 100644 --- a/meta-fsl-ppc/conf/machine/bsc9132qds.conf +++ b/meta-fsl-ppc/conf/machine/bsc9132qds.conf @@ -1,5 +1,8 @@ #@TYPE: Machine -#@DESCRIPTION: Machine configuration for running +#@NAME: Freescale BSC9132QDS +#@SOC: bsc9132 +#@DESCRIPTION: Machine configuration for running BSC9132QDS +#@MAINTAINER: Chunrong Guo require e500v2.inc require conf/machine/include/soc-family.inc diff --git a/meta-fsl-ppc/conf/machine/c293pcie.conf b/meta-fsl-ppc/conf/machine/c293pcie.conf index 9e7252a1..0583611a 100644 --- a/meta-fsl-ppc/conf/machine/c293pcie.conf +++ b/meta-fsl-ppc/conf/machine/c293pcie.conf @@ -1,5 +1,8 @@ #@TYPE: Machine +#@NAME: Freescale C293PCIE +#@SOC: c293pcie #@DESCRIPTION: Machine configuration for running C293PCIE in 36-bit mode +#@MAINTAINER: Chunrong Guo require e500v2.inc require conf/machine/include/soc-family.inc diff --git a/meta-fsl-ppc/conf/machine/p1010rdb.conf b/meta-fsl-ppc/conf/machine/p1010rdb.conf index a9217472..53655c42 100644 --- a/meta-fsl-ppc/conf/machine/p1010rdb.conf +++ b/meta-fsl-ppc/conf/machine/p1010rdb.conf @@ -1,6 +1,8 @@ #@TYPE: Machine #@Name: Freescale P1010RDB -#@DESCRIPTION: Machine configuration for the Freescale P1010RDB +#@SOC: p1010 +#@DESCRIPTION: Machine configuration for running P1010RDB +#@MAINTAINER: Chunrong Guo require e500v2.inc require conf/machine/include/soc-family.inc diff --git a/meta-fsl-ppc/conf/machine/p1020rdb.conf b/meta-fsl-ppc/conf/machine/p1020rdb.conf index 9adac799..24f9d975 100644 --- a/meta-fsl-ppc/conf/machine/p1020rdb.conf +++ b/meta-fsl-ppc/conf/machine/p1020rdb.conf @@ -1,5 +1,8 @@ #@TYPE: Machine -#@DESCRIPTION: Machine configuration for running +#@NAME: Freescale P1020RDB +#@SOC: p1020 +#@DESCRIPTION: Machine configuration for running P1020RDB +#@MAINTAINER: Chunrong Guo require e500v2.inc require conf/machine/include/soc-family.inc diff --git a/meta-fsl-ppc/conf/machine/p1021rdb.conf b/meta-fsl-ppc/conf/machine/p1021rdb.conf index 37c17a4c..3d21175b 100644 --- a/meta-fsl-ppc/conf/machine/p1021rdb.conf +++ b/meta-fsl-ppc/conf/machine/p1021rdb.conf @@ -1,6 +1,8 @@ #@TYPE: Machine #@Name: Freescale P1021RDB -#@DESCRIPTION: Machine configuration for the Freescale P1021RDB +#@SOC: p1021 +#@DESCRIPTION: Machine configuration for running P1021RDB +#@MAINTAINER: Chunrong Guo require e500v2.inc require conf/machine/include/soc-family.inc diff --git a/meta-fsl-ppc/conf/machine/p1022ds.conf b/meta-fsl-ppc/conf/machine/p1022ds.conf index b06da815..0895d6d8 100644 --- a/meta-fsl-ppc/conf/machine/p1022ds.conf +++ b/meta-fsl-ppc/conf/machine/p1022ds.conf @@ -1,5 +1,8 @@ #@TYPE: Machine -#@DESCRIPTION: Machine configuration for running +#@NAME: Freescale P1022DS +#@SOC: p1022 +#@DESCRIPTION: Machine configuration for running P1022DS +#@MAINTAINER: Chunrong Guo require e500v2.inc require conf/machine/include/soc-family.inc diff --git a/meta-fsl-ppc/conf/machine/p1023rdb.conf b/meta-fsl-ppc/conf/machine/p1023rdb.conf index ece7e3f8..5cfb2149 100644 --- a/meta-fsl-ppc/conf/machine/p1023rdb.conf +++ b/meta-fsl-ppc/conf/machine/p1023rdb.conf @@ -1,5 +1,8 @@ #@TYPE: Machine -#@DESCRIPTION: Machine configuration for running +#@NAME: Freescale P1023RDB +#@SOC: p1023 +#@DESCRIPTION: Machine configuration for running P1023RDB +#@MAINTAINER: Chunrong Guo require e500v2.inc require conf/machine/include/soc-family.inc diff --git a/meta-fsl-ppc/conf/machine/p1025twr.conf b/meta-fsl-ppc/conf/machine/p1025twr.conf index eb7c439a..7eab3429 100644 --- a/meta-fsl-ppc/conf/machine/p1025twr.conf +++ b/meta-fsl-ppc/conf/machine/p1025twr.conf @@ -1,6 +1,8 @@ #@TYPE: Machine #@Name: Freescale P1025TWR -#@DESCRIPTION: Machine configuration for the Freescale P1025TWR +#@SOC: p1025 +#@DESCRIPTION: Machine configuration for running P1025TWR +#@MAINTAINER: Chunrong Guo require e500v2.inc require conf/machine/include/soc-family.inc diff --git a/meta-fsl-ppc/conf/machine/p2020ds.conf b/meta-fsl-ppc/conf/machine/p2020ds.conf index cb0b65ef..84f792cb 100644 --- a/meta-fsl-ppc/conf/machine/p2020ds.conf +++ b/meta-fsl-ppc/conf/machine/p2020ds.conf @@ -1,5 +1,8 @@ #@TYPE: Machine -#@DESCRIPTION: Machine configuration for running +#@NAME: Freescale P2020DS +#@SOC: p2020 +#@DESCRIPTION: Machine configuration for running P2020DS +#@MAINTAINER: Chunrong Guo require e500v2.inc require conf/machine/include/soc-family.inc diff --git a/meta-fsl-ppc/conf/machine/p2020rdb.conf b/meta-fsl-ppc/conf/machine/p2020rdb.conf index 6e45ebec..740df882 100644 --- a/meta-fsl-ppc/conf/machine/p2020rdb.conf +++ b/meta-fsl-ppc/conf/machine/p2020rdb.conf @@ -1,6 +1,8 @@ #@TYPE: Machine #@Name: Freescale P2020RDB -#@DESCRIPTION: Machine configuration for the Freescale P2020RDB +#@SOC: p2020 +#@DESCRIPTION: Machine configuration for running P2020RDB +#@MAINTAINER: Chunrong Guo require e500v2.inc require conf/machine/include/soc-family.inc diff --git a/meta-fsl-ppc/conf/machine/p2041rdb.conf b/meta-fsl-ppc/conf/machine/p2041rdb.conf index 14b602cf..69889228 100644 --- a/meta-fsl-ppc/conf/machine/p2041rdb.conf +++ b/meta-fsl-ppc/conf/machine/p2041rdb.conf @@ -1,5 +1,8 @@ #@TYPE: Machine -#@DESCRIPTION: Machine configuration for running +#@NAME: Freescale P2041RDB +#@SOC: p2041 +#@DESCRIPTION: Machine configuration for running P2041RDB +#@MAINTAINER: Chunrong Guo require e500mc.inc require conf/machine/include/soc-family.inc diff --git a/meta-fsl-ppc/conf/machine/p3041ds.conf b/meta-fsl-ppc/conf/machine/p3041ds.conf index 0116ab52..939d18d5 100644 --- a/meta-fsl-ppc/conf/machine/p3041ds.conf +++ b/meta-fsl-ppc/conf/machine/p3041ds.conf @@ -1,5 +1,8 @@ #@TYPE: Machine -#@DESCRIPTION: Machine configuration for running +#@NAME: Freescale P3041DS +#@SOC: p3041 +#@DESCRIPTION: Machine configuration for running P3041DS +#@MAINTAINER: Chunrong Guo require e500mc.inc require conf/machine/include/soc-family.inc diff --git a/meta-fsl-ppc/conf/machine/p4080ds.conf b/meta-fsl-ppc/conf/machine/p4080ds.conf index 5ea1d4f5..c3a1519e 100644 --- a/meta-fsl-ppc/conf/machine/p4080ds.conf +++ b/meta-fsl-ppc/conf/machine/p4080ds.conf @@ -1,5 +1,8 @@ #@TYPE: Machine -#@DESCRIPTION: Machine configuration for running +#@NAME: Freescale P4080DS +#@SOC: p4080 +#@DESCRIPTION: Machine configuration for running P4080DS +#@MAINTAINER: Chunrong Guo require e500mc.inc require conf/machine/include/soc-family.inc diff --git a/meta-fsl-ppc/conf/machine/p5020ds-64b.conf b/meta-fsl-ppc/conf/machine/p5020ds-64b.conf index 144781bf..5f82dba9 100644 --- a/meta-fsl-ppc/conf/machine/p5020ds-64b.conf +++ b/meta-fsl-ppc/conf/machine/p5020ds-64b.conf @@ -1,5 +1,8 @@ #@TYPE: Machine -#@DESCRIPTION: Machine configuration for running +#@NAME: Freescale P5020DS-64B +#@SOC: p5020 +#@DESCRIPTION: Machine configuration for running P5020DS in 64-bit mode +#@MAINTAINER: Chunrong Guo require e5500-64b.inc require conf/machine/include/soc-family.inc diff --git a/meta-fsl-ppc/conf/machine/p5020ds.conf b/meta-fsl-ppc/conf/machine/p5020ds.conf index 8c263d8e..72effb10 100644 --- a/meta-fsl-ppc/conf/machine/p5020ds.conf +++ b/meta-fsl-ppc/conf/machine/p5020ds.conf @@ -1,5 +1,8 @@ #@TYPE: Machine -#@DESCRIPTION: Machine configuration for running +#@NAME: Freescale P5020DS +#@SOC: p5020 +#@DESCRIPTION: Machine configuration for running P5020DS in 32-bit mode +#@MAINTAINER: Chunrong Guo require e5500.inc require conf/machine/include/soc-family.inc diff --git a/meta-fsl-ppc/conf/machine/p5040ds-64b.conf b/meta-fsl-ppc/conf/machine/p5040ds-64b.conf index e3f6ce16..70508a44 100644 --- a/meta-fsl-ppc/conf/machine/p5040ds-64b.conf +++ b/meta-fsl-ppc/conf/machine/p5040ds-64b.conf @@ -1,5 +1,8 @@ #@TYPE: Machine -#@DESCRIPTION: Machine configuration for running +#@NAME: Freescale P5040DS-64B +#@SOC: p5040 +#@DESCRIPTION: Machine configuration for running P5040DS in 64-bit mode +#@MAINTAINER: Chunrong Guo require e5500-64b.inc require conf/machine/include/soc-family.inc diff --git a/meta-fsl-ppc/conf/machine/p5040ds.conf b/meta-fsl-ppc/conf/machine/p5040ds.conf index 5692ab0c..27782180 100644 --- a/meta-fsl-ppc/conf/machine/p5040ds.conf +++ b/meta-fsl-ppc/conf/machine/p5040ds.conf @@ -1,5 +1,8 @@ #@TYPE: Machine -#@DESCRIPTION: Machine configuration for running +#@NAME: Freescale P5040DS +#@SOC: p5040 +#@DESCRIPTION: Machine configuration for running P5040DS in 32-bit mode +#@MAINTAINER: Chunrong Guo require e5500.inc require conf/machine/include/soc-family.inc diff --git a/meta-fsl-ppc/conf/machine/t2080qds-64b.conf b/meta-fsl-ppc/conf/machine/t2080qds-64b.conf index d149b6e2..18749026 100644 --- a/meta-fsl-ppc/conf/machine/t2080qds-64b.conf +++ b/meta-fsl-ppc/conf/machine/t2080qds-64b.conf @@ -1,5 +1,8 @@ #@TYPE: Machine +#@NAME: Freescale T2080QDS-64B +#@SOC: t2080 #@DESCRIPTION: Machine configuration for running T2080QDS in 64-bit mode +#@MAINTAINER: Chunrong Guo require e6500-64b.inc require conf/machine/include/soc-family.inc diff --git a/meta-fsl-ppc/conf/machine/t2080qds.conf b/meta-fsl-ppc/conf/machine/t2080qds.conf index a9874b58..aa19307a 100644 --- a/meta-fsl-ppc/conf/machine/t2080qds.conf +++ b/meta-fsl-ppc/conf/machine/t2080qds.conf @@ -1,5 +1,8 @@ #@TYPE: Machine +#@NAME: Freescale T2080QDS +#@SOC: t2080 #@DESCRIPTION: Machine configuration for running T2080QDS in 32-bit mode +#@MAINTAINER: Chunrong Guo require e6500.inc require conf/machine/include/soc-family.inc diff --git a/meta-fsl-ppc/conf/machine/t4160qds-64b.conf b/meta-fsl-ppc/conf/machine/t4160qds-64b.conf index 83696d54..778f554c 100644 --- a/meta-fsl-ppc/conf/machine/t4160qds-64b.conf +++ b/meta-fsl-ppc/conf/machine/t4160qds-64b.conf @@ -1,5 +1,8 @@ #@TYPE: Machine +#@NAME: Freescale T4160QDS-64B +#@SOC: t4160 #@DESCRIPTION: Machine configuration for running T4160QDS in 64-bit mode +#@MAINTAINER: Chunrong Guo require e6500-64b.inc require conf/machine/include/soc-family.inc diff --git a/meta-fsl-ppc/conf/machine/t4160qds.conf b/meta-fsl-ppc/conf/machine/t4160qds.conf index 34b2b2e0..62157d2b 100644 --- a/meta-fsl-ppc/conf/machine/t4160qds.conf +++ b/meta-fsl-ppc/conf/machine/t4160qds.conf @@ -1,5 +1,8 @@ #@TYPE: Machine +#@NAME: Freescale T4160QDS +#@SOC: t4160 #@DESCRIPTION: Machine configuration for running T4160QDS in 32-bit mode +#@MAINTAINER: Chunrong Guo require e6500.inc require conf/machine/include/soc-family.inc diff --git a/meta-fsl-ppc/conf/machine/t4240qds-64b.conf b/meta-fsl-ppc/conf/machine/t4240qds-64b.conf index ffdf6589..dc77770a 100644 --- a/meta-fsl-ppc/conf/machine/t4240qds-64b.conf +++ b/meta-fsl-ppc/conf/machine/t4240qds-64b.conf @@ -1,5 +1,8 @@ #@TYPE: Machine +#@NAME: Freescale T4240QDS-64B +#@SOC: t4240 #@DESCRIPTION: Machine configuration for running T4240QDS in 64-bit mode +#@MAINTAINER: Chunrong Guo require e6500-64b.inc require conf/machine/include/soc-family.inc diff --git a/meta-fsl-ppc/conf/machine/t4240qds.conf b/meta-fsl-ppc/conf/machine/t4240qds.conf index c2c31dde..8f515005 100644 --- a/meta-fsl-ppc/conf/machine/t4240qds.conf +++ b/meta-fsl-ppc/conf/machine/t4240qds.conf @@ -1,5 +1,8 @@ #@TYPE: Machine +#@NAME: Freescale T4240QDS +#@SOC: t4240 #@DESCRIPTION: Machine configuration for running T4240QDS in 32-bit mode +#@MAINTAINER: Chunrong Guo require e6500.inc require conf/machine/include/soc-family.inc -- cgit v1.2.3-54-g00ecf From c6f9a95ace920a2c0b51191d08f3cd2b9443e669 Mon Sep 17 00:00:00 2001 From: chunrong guo Date: Thu, 29 May 2014 03:25:28 +0000 Subject: qemu: add libssh2 options in configure Hello all, Fsl qemu will update 1.7 in July or June. Fsl qemu 1.7 configure options support libssh2. This patch will be retired when fsl qemu updates 1.7 . thanks, chunrong -----Original Message----- From: b40290@freescale.com [mailto:b40290@freescale.com] Sent: Wednesday, May 28, 2014 6:08 PM To: meta-freescale@yoctoproject.org Cc: Liu Ting-B28495; Luo Zhenhua-B19537; Guo Chunrong-B40290 Subject: [meta-fsl-ppc][PATCH v2 ] qemu: add libssh2 options in configure From: Chunrong Guo * fix the following error: |ERROR: unknown option --disable-libssh2 Signed-off-by: Chunrong Guo Acked-by: Otavio Salvador --- .../qemu/files/add-libssh2-options.patch | 22 ++++++++++++++++++++++ meta-fsl-ppc/recipes-devtools/qemu/qemu_fslgit.bb | 1 + 2 files changed, 23 insertions(+) create mode 100644 meta-fsl-ppc/recipes-devtools/qemu/files/add-libssh2-options.patch diff --git a/meta-fsl-ppc/recipes-devtools/qemu/files/add-libssh2-options.patch b/meta-fsl-ppc/recipes-devtools/qemu/files/add-libssh2-options.patch new file mode 100644 index 00000000..07b9350e --- /dev/null +++ b/meta-fsl-ppc/recipes-devtools/qemu/files/add-libssh2-options.patch @@ -0,0 +1,22 @@ +Upstream-Status: Inappropriate [configuration] + +Freescale qemu configure do not include libssh2 options. +In order to configure pass , dummy libssh2 options is added to +freescale qemu configure + +Signed-off-by: Chunrong Guo + + +--- a/configure.old 2014-05-26 12:08:09.000000000 +0800 ++++ b/configure 2014-05-26 12:10:23.000000000 +0800 +@@ -897,6 +897,10 @@ + ;; + --enable-virtio-blk-data-plane) virtio_blk_data_plane="yes" + ;; ++ --disable-libssh2) libssh2="no" ++ ;; ++ --enable-libssh2) libssh2="yes" ++ ;; + --disable-gtk) gtk="no" + ;; + --enable-gtk) gtk="yes" diff --git a/meta-fsl-ppc/recipes-devtools/qemu/qemu_fslgit.bb b/meta-fsl-ppc/recipes-devtools/qemu/qemu_fslgit.bb index 810794d5..eab3db5d 100644 --- a/meta-fsl-ppc/recipes-devtools/qemu/qemu_fslgit.bb +++ b/meta-fsl-ppc/recipes-devtools/qemu/qemu_fslgit.bb @@ -14,6 +14,7 @@ SRC_URI += " \ file://0002-docs-Fix-generating-qemu-doc.html-with-texinfo-5.patch \ file://fdt_header.patch \ file://add-gtk-options.patch \ + file://add-libssh2-options.patch \ " S = "${WORKDIR}/git" -- cgit v1.2.3-54-g00ecf From df174f67fef9b2012f49612f4347d7e25190cba4 Mon Sep 17 00:00:00 2001 From: Fahad Arslan Date: Fri, 30 May 2014 21:59:16 +0500 Subject: conf/machine/*.inc: install kernel-modules package for FSL PPC targets Following boards are affected: - b4420qds-64b - b4420qds - b4860qds-64b - b4860qds - bsc9131rdb - bsc9132qds - c293pcie - p1010rdb - p1020rdb - p1021rdb - p1022ds - p1023rdb - p1025twr - p2020ds - p2020rdb - p2041rdb - p3041ds - p4080ds - p5020ds-64b - p5020ds - p5040ds-64b - p5040ds - t2080qds-64b - t2080qds - t4160qds-64b - t4160qds - t4240qds-64b - t4240qds Signed-off-by: Fahad Arslan --- meta-fsl-ppc/conf/machine/e500mc.inc | 2 +- meta-fsl-ppc/conf/machine/e500v2.inc | 2 +- meta-fsl-ppc/conf/machine/e5500-64b.inc | 2 +- meta-fsl-ppc/conf/machine/e5500.inc | 2 +- meta-fsl-ppc/conf/machine/e6500-64b.inc | 2 +- meta-fsl-ppc/conf/machine/e6500.inc | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/meta-fsl-ppc/conf/machine/e500mc.inc b/meta-fsl-ppc/conf/machine/e500mc.inc index 57952e74..c6571ea0 100644 --- a/meta-fsl-ppc/conf/machine/e500mc.inc +++ b/meta-fsl-ppc/conf/machine/e500mc.inc @@ -3,7 +3,7 @@ TARGET_FPU = "hard" require conf/machine/include/tune-ppce500mc.inc MACHINE_FEATURES = "kernel26 keyboard pci ext2 ext3 serial" -MACHINE_EXTRA_RRECOMMENDS = "u-boot udev-extraconf" +MACHINE_EXTRA_RRECOMMENDS = "u-boot udev-extraconf kernel-modules" PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" PREFERRED_VERSION_virtual/kernel ?= "3.0.34" diff --git a/meta-fsl-ppc/conf/machine/e500v2.inc b/meta-fsl-ppc/conf/machine/e500v2.inc index befc2962..107c9a7a 100644 --- a/meta-fsl-ppc/conf/machine/e500v2.inc +++ b/meta-fsl-ppc/conf/machine/e500v2.inc @@ -1,7 +1,7 @@ require conf/machine/include/tune-ppce500v2.inc MACHINE_FEATURES = "kernel26 pci ext2 ext3 serial" -MACHINE_EXTRA_RRECOMMENDS = "u-boot udev-extraconf" +MACHINE_EXTRA_RRECOMMENDS = "u-boot udev-extraconf kernel-modules" PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" PREFERRED_VERSION_virtual/kernel ?= "3.0.34" diff --git a/meta-fsl-ppc/conf/machine/e5500-64b.inc b/meta-fsl-ppc/conf/machine/e5500-64b.inc index 0ce7f116..7dd1a473 100644 --- a/meta-fsl-ppc/conf/machine/e5500-64b.inc +++ b/meta-fsl-ppc/conf/machine/e5500-64b.inc @@ -4,7 +4,7 @@ DEFAULTTUNE ?= "ppc64e5500" require conf/machine/include/tune-ppce5500.inc MACHINE_FEATURES = "kernel26 keyboard pci ext2 ext3 serial" -MACHINE_EXTRA_RRECOMMENDS = "u-boot udev-extraconf" +MACHINE_EXTRA_RRECOMMENDS = "u-boot udev-extraconf kernel-modules" PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" PREFERRED_VERSION_virtual/kernel ?= "3.0.34" diff --git a/meta-fsl-ppc/conf/machine/e5500.inc b/meta-fsl-ppc/conf/machine/e5500.inc index ae66342d..198aa986 100644 --- a/meta-fsl-ppc/conf/machine/e5500.inc +++ b/meta-fsl-ppc/conf/machine/e5500.inc @@ -3,7 +3,7 @@ TARGET_FPU = "hard" require conf/machine/include/tune-ppce5500.inc MACHINE_FEATURES = "kernel26 keyboard pci ext2 ext3 serial" -MACHINE_EXTRA_RRECOMMENDS = "u-boot udev-extraconf" +MACHINE_EXTRA_RRECOMMENDS = "u-boot udev-extraconf kernel-modules" PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" PREFERRED_VERSION_virtual/kernel ?= "3.0.34" diff --git a/meta-fsl-ppc/conf/machine/e6500-64b.inc b/meta-fsl-ppc/conf/machine/e6500-64b.inc index 2007353a..9bbfa9ef 100644 --- a/meta-fsl-ppc/conf/machine/e6500-64b.inc +++ b/meta-fsl-ppc/conf/machine/e6500-64b.inc @@ -4,7 +4,7 @@ DEFAULTTUNE ?= "ppc64e6500" require conf/machine/include/tune-ppce6500.inc MACHINE_FEATURES = "kernel26 keyboard pci ext2 ext3 serial" -MACHINE_EXTRA_RRECOMMENDS = "u-boot udev-extraconf" +MACHINE_EXTRA_RRECOMMENDS = "u-boot udev-extraconf kernel-modules" PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" PREFERRED_VERSION_virtual/kernel ?= "3.0.34" diff --git a/meta-fsl-ppc/conf/machine/e6500.inc b/meta-fsl-ppc/conf/machine/e6500.inc index 23adf152..2d8a859a 100644 --- a/meta-fsl-ppc/conf/machine/e6500.inc +++ b/meta-fsl-ppc/conf/machine/e6500.inc @@ -3,7 +3,7 @@ TARGET_FPU = "hard" require conf/machine/include/tune-ppce6500.inc MACHINE_FEATURES = "kernel26 keyboard pci ext2 ext3 serial" -MACHINE_EXTRA_RRECOMMENDS = "u-boot udev-extraconf" +MACHINE_EXTRA_RRECOMMENDS = "u-boot udev-extraconf kernel-modules" PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" PREFERRED_VERSION_virtual/kernel ?= "3.0.34" -- cgit v1.2.3-54-g00ecf From e129330972e00e0675698b061383c3dafc6960fd Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Tue, 18 Feb 2014 16:47:44 +0800 Subject: linux: update to sdk v1.6 release 1.move more generic bits to linux-qoriq-sdk.inc file 2.add support for multiple kernel delta config files 3.Append SDK_VERSION to .scmversion, and use the same version format with u-boot. For exmaple: 3.12.17-rt25-QorIQ-SDK-V1.6+gfae7d11 4.add linux-qoirq-sdk_3.12.bb to use latest released codes in sdk v1.6, detailed changes can be viewed at: http://git.freescale.com/git/cgit.cgi/ppc/sdk/linux.git/log/?qt=range&q=c29fe1a733308cbe592b3af054a97be1b91cf2dd Signed-off-by: Ting Liu --- .../recipes-kernel/linux/linux-qoriq-sdk.bb | 37 --------------- .../recipes-kernel/linux/linux-qoriq-sdk.inc | 52 +++++++++++++++++----- .../recipes-kernel/linux/linux-qoriq-sdk_3.12.bb | 5 +++ 3 files changed, 47 insertions(+), 47 deletions(-) delete mode 100644 meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.bb create mode 100644 meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk_3.12.bb diff --git a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.bb b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.bb deleted file mode 100644 index 275691ab..00000000 --- a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.bb +++ /dev/null @@ -1,37 +0,0 @@ -inherit kernel -require recipes-kernel/linux/linux-dtb.inc - -DESCRIPTION = "Linux kernel for Freescale platforms" -SECTION = "kernel" -LICENSE = "GPLv2" - -require recipes-kernel/linux/linux-qoriq-sdk.inc - -PR = "${INC_PR}.1" - -SCMVERSION ?= "y" - -DEPENDS_append = " libgcc" -KERNEL_CC_append = " ${TOOLCHAIN_OPTIONS}" -KERNEL_LD_append = " ${TOOLCHAIN_OPTIONS}" - -do_configure_prepend() { - # copy desired defconfig so we pick it up for the real kernel_do_configure - cp ${KERNEL_DEFCONFIG} ${B}/.config - - # add config fragments - if [ -f "${DELTA_KERNEL_DEFCONFIG}" ]; then - ${S}/scripts/kconfig/merge_config.sh -m .config ${DELTA_KERNEL_DEFCONFIG} - fi - - # append sdk version in kernel version if SDK_VERSION is defined - if [ -n "${SDK_VERSION}" ]; then - echo "CONFIG_LOCALVERSION=\"-${SDK_VERSION}\"" >> ${S}/.config - fi - - # Add GIT revision to the local version - if [ "${SCMVERSION}" = "y" ]; then - head=`git rev-parse --verify --short HEAD 2> /dev/null` - printf "%s%s" +g $head > ${S}/.scmversion - fi -} diff --git a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc index 83c632e3..00fe526f 100644 --- a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc +++ b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc @@ -1,17 +1,13 @@ -LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7" - -PV = "3.8" -INC_PR = "r11" +inherit kernel +require recipes-kernel/linux/linux-dtb.inc -SRC_URI = "git://git.freescale.com/ppc/sdk/linux.git;nobranch=1" -SRCREV = "3edd71eeb4e4ae27baf539e0a5f0c8e8261bf65b" -SRCREV_t2080qds = "47914f6cf77197921c648c6ea8977974fa54d03a" -SRCREV_t2080qds-64b = "47914f6cf77197921c648c6ea8977974fa54d03a" +DESCRIPTION = "Linux kernel for Freescale platforms" +SECTION = "kernel" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7" KSRC ?= "" S = '${@base_conditional("KSRC", "", "${WORKDIR}/git", "${KSRC}", d)}' -# make everything compatible for the time being -COMPATIBLE_MACHINE_$MACHINE = "$MACHINE" python () { ma = d.getVar("DISTRO_FEATURES", True) @@ -35,3 +31,39 @@ python () { if 'arch' in all_qa: d.setVar('ALL_QA', all_qa.replace(' arch', '')) } + +DEPENDS_append = " libgcc" +KERNEL_CC_append = " ${TOOLCHAIN_OPTIONS}" +KERNEL_LD_append = " ${TOOLCHAIN_OPTIONS}" + +SCMVERSION ?= "y" +DELTA_KERNEL_DEFCONFIG ?= "" +do_configure_prepend() { + # copy desired defconfig so we pick it up for the real kernel_do_configure + cp ${KERNEL_DEFCONFIG} ${B}/.config + + # add config fragments + for deltacfg in ${DELTA_KERNEL_DEFCONFIG}; do + if [ -f "${deltacfg}" ]; then + ${S}/scripts/kconfig/merge_config.sh -m .config ${deltacfg} + elif [ -f "${S}/arch/powerpc/configs/${deltacfg}" ]; then + ${S}/scripts/kconfig/merge_config.sh -m .config \ + ${S}/arch/powerpc/configs/${deltacfg} + fi + done + + #add git revision to the local version + if [ "${SCMVERSION}" = "y" ]; then + # append sdk version if SDK_VERSION is defined + sdkversion='' + if [ -n "${SDK_VERSION}" ]; then + sdkversion="-${SDK_VERSION}" + fi + head=`git rev-parse --verify --short HEAD 2> /dev/null` + printf "%s%s%s" $sdkversion +g $head > ${S}/.scmversion + fi +} + +# make everything compatible for the time being +COMPATIBLE_MACHINE_$MACHINE = "$MACHINE" + diff --git a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk_3.12.bb b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk_3.12.bb new file mode 100644 index 00000000..5fa66028 --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk_3.12.bb @@ -0,0 +1,5 @@ +require recipes-kernel/linux/linux-qoriq-sdk.inc + +SRC_URI = "git://git.freescale.com/ppc/sdk/linux.git;nobranch=1" +SRCREV = "c29fe1a733308cbe592b3af054a97be1b91cf2dd" + -- cgit v1.2.3-54-g00ecf From 4a12cfa3038aa9b699ce1a414eda6b41f4d47280 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Tue, 1 Jul 2014 04:59:20 -0500 Subject: linux: fix 64bit kernel builds with binutils 2.24 upstream commit: 7998eb3dc700aaf499f93f50b3d77da834ef9e1d Signed-off-by: Ting Liu --- ...erpc-Fix-64-bit-builds-with-binutils-2.24.patch | 80 ++++++++++++++++++++++ .../recipes-kernel/linux/linux-qoriq-sdk_3.12.bb | 4 +- 2 files changed, 83 insertions(+), 1 deletion(-) create mode 100644 meta-fsl-ppc/recipes-kernel/linux/files/powerpc-Fix-64-bit-builds-with-binutils-2.24.patch diff --git a/meta-fsl-ppc/recipes-kernel/linux/files/powerpc-Fix-64-bit-builds-with-binutils-2.24.patch b/meta-fsl-ppc/recipes-kernel/linux/files/powerpc-Fix-64-bit-builds-with-binutils-2.24.patch new file mode 100644 index 00000000..2fdcc9fb --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/linux/files/powerpc-Fix-64-bit-builds-with-binutils-2.24.patch @@ -0,0 +1,80 @@ +From 7998eb3dc700aaf499f93f50b3d77da834ef9e1d Mon Sep 17 00:00:00 2001 +From: Guenter Roeck +Date: Thu, 15 May 2014 09:33:42 -0700 +Subject: powerpc: Fix 64 bit builds with binutils 2.24 + +Upstream-Status: Backport + +With binutils 2.24, various 64 bit builds fail with relocation errors +such as + +arch/powerpc/kernel/built-in.o: In function `exc_debug_crit_book3e': + (.text+0x165ee): relocation truncated to fit: R_PPC64_ADDR16_HI + against symbol `interrupt_base_book3e' defined in .text section + in arch/powerpc/kernel/built-in.o +arch/powerpc/kernel/built-in.o: In function `exc_debug_crit_book3e': + (.text+0x16602): relocation truncated to fit: R_PPC64_ADDR16_HI + against symbol `interrupt_end_book3e' defined in .text section + in arch/powerpc/kernel/built-in.o + +The assembler maintainer says: + + I changed the ABI, something that had to be done but unfortunately + happens to break the booke kernel code. When building up a 64-bit + value with lis, ori, shl, oris, ori or similar sequences, you now + should use @high and @higha in place of @h and @ha. @h and @ha + (and their associated relocs R_PPC64_ADDR16_HI and R_PPC64_ADDR16_HA) + now report overflow if the value is out of 32-bit signed range. + ie. @h and @ha assume you're building a 32-bit value. This is needed + to report out-of-range -mcmodel=medium toc pointer offsets in @toc@h + and @toc@ha expressions, and for consistency I did the same for all + other @h and @ha relocs. + +Replacing @h with @high in one strategic location fixes the relocation +errors. This has to be done conditionally since the assembler either +supports @h or @high but not both. + +Cc: +Signed-off-by: Guenter Roeck +Signed-off-by: Benjamin Herrenschmidt + +diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile +index 4c0cedf..ce4c68a 100644 +--- a/arch/powerpc/Makefile ++++ b/arch/powerpc/Makefile +@@ -150,7 +150,9 @@ endif + + CFLAGS-$(CONFIG_TUNE_CELL) += $(call cc-option,-mtune=cell) + +-KBUILD_CPPFLAGS += -Iarch/$(ARCH) ++asinstr := $(call as-instr,lis 9$(comma)foo@high,-DHAVE_AS_ATHIGH=1) ++ ++KBUILD_CPPFLAGS += -Iarch/$(ARCH) $(asinstr) + KBUILD_AFLAGS += -Iarch/$(ARCH) + KBUILD_CFLAGS += -msoft-float -pipe -Iarch/$(ARCH) $(CFLAGS-y) + CPP = $(CC) -E $(KBUILD_CFLAGS) +diff --git a/arch/powerpc/include/asm/ppc_asm.h b/arch/powerpc/include/asm/ppc_asm.h +index 6586a40..cded7c1 100644 +--- a/arch/powerpc/include/asm/ppc_asm.h ++++ b/arch/powerpc/include/asm/ppc_asm.h +@@ -318,11 +318,16 @@ n: + addi reg,reg,(name - 0b)@l; + + #ifdef __powerpc64__ ++#ifdef HAVE_AS_ATHIGH ++#define __AS_ATHIGH high ++#else ++#define __AS_ATHIGH h ++#endif + #define LOAD_REG_IMMEDIATE(reg,expr) \ + lis reg,(expr)@highest; \ + ori reg,reg,(expr)@higher; \ + rldicr reg,reg,32,31; \ +- oris reg,reg,(expr)@h; \ ++ oris reg,reg,(expr)@__AS_ATHIGH; \ + ori reg,reg,(expr)@l; + + #define LOAD_REG_ADDR(reg,name) \ +-- +cgit v0.10.1 + diff --git a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk_3.12.bb b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk_3.12.bb index 5fa66028..881180a5 100644 --- a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk_3.12.bb +++ b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk_3.12.bb @@ -1,5 +1,7 @@ require recipes-kernel/linux/linux-qoriq-sdk.inc -SRC_URI = "git://git.freescale.com/ppc/sdk/linux.git;nobranch=1" +SRC_URI = "git://git.freescale.com/ppc/sdk/linux.git;nobranch=1 \ + file://powerpc-Fix-64-bit-builds-with-binutils-2.24.patch \ +" SRCREV = "c29fe1a733308cbe592b3af054a97be1b91cf2dd" -- cgit v1.2.3-54-g00ecf From d4b78db8a581c5bb0f0bb11b0acb9d8450dfa794 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Fri, 17 Jan 2014 17:33:38 +0800 Subject: u-boot: update to sdk v1.6 release 1.u-boot released in sdk v1.6 was based on 2014.01, set PV to 2014.01+fslgit 2.all the license files was put to Licenses/ directory now, update LIC_FILES_CHKSUM 3.not break if the u-boot config not supported 4.nand u-boot was named as u-boot-with-spl.bin, copy the right binary Signed-off-by: Ting Liu --- meta-fsl-ppc/recipes-bsp/u-boot/u-boot_git.bb | 38 +++++++++++++-------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/meta-fsl-ppc/recipes-bsp/u-boot/u-boot_git.bb b/meta-fsl-ppc/recipes-bsp/u-boot/u-boot_git.bb index 406914cb..ec744f52 100644 --- a/meta-fsl-ppc/recipes-bsp/u-boot/u-boot_git.bb +++ b/meta-fsl-ppc/recipes-bsp/u-boot/u-boot_git.bb @@ -2,18 +2,8 @@ DESCRIPTION = "U-boot bootloader" HOMEPAGE = "http://u-boot.sf.net" SECTION = "bootloaders" PROVIDES = "virtual/bootloader" -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://COPYING;md5=1707d6db1d42237583f50183a5651ecb" -LICENSE_t2080qds = "GPLv2 & BSD-3-Clause & BSD-2-Clause & LGPL-2.0 & LGPL-2.1" -LIC_FILES_CHKSUM_t2080qds = " \ - file://Licenses/gpl-2.0.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - file://Licenses/bsd-2-clause.txt;md5=6a31f076f5773aabd8ff86191ad6fdd5 \ - file://Licenses/bsd-3-clause.txt;md5=4a1190eac56a9db675d58ebe86eaf50c \ - file://Licenses/lgpl-2.0.txt;md5=5f30f0716dfdd0d91eb439ebec522ec2 \ - file://Licenses/lgpl-2.1.txt;md5=4fbd65380cdd255951079008b364516c \ -" -LICENSE_t2080qds-64b = "GPLv2 & BSD-3-Clause & BSD-2-Clause & LGPL-2.0 & LGPL-2.1" -LIC_FILES_CHKSUM_t2080qds-64b = " \ +LICENSE = "GPLv2 & BSD-3-Clause & BSD-2-Clause & LGPL-2.0 & LGPL-2.1" +LIC_FILES_CHKSUM = " \ file://Licenses/gpl-2.0.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ file://Licenses/bsd-2-clause.txt;md5=6a31f076f5773aabd8ff86191ad6fdd5 \ file://Licenses/bsd-3-clause.txt;md5=4a1190eac56a9db675d58ebe86eaf50c \ @@ -21,17 +11,14 @@ LIC_FILES_CHKSUM_t2080qds-64b = " \ file://Licenses/lgpl-2.1.txt;md5=4fbd65380cdd255951079008b364516c \ " -PR = "r30" +PV = "2014.01+fslgit" INHIBIT_DEFAULT_DEPS = "1" DEPENDS = "boot-format-native libgcc ${@base_contains('TCMODE', 'external-fsl', '', 'virtual/${TARGET_PREFIX}gcc', d)}" inherit deploy -SRC_URI = "git://git.freescale.com/ppc/sdk/u-boot.git;nobranch=1 \ - file://Fix-the-depend-race-issue.patch" -SRCREV = "5438fc1ca159c8f5724272efd1289e6d49771e69" -SRCREV_t2080qds = "fc03874549668c1a10f97c10b3a77cb0f236df19" -SRCREV_t2080qds-64b = "fc03874549668c1a10f97c10b3a77cb0f236df19" +SRC_URI = "git://git.freescale.com/ppc/sdk/u-boot.git;nobranch=1" +SRCREV = "fe1d4f5739e752ad45ada6227a9fb19590af7194" python () { if d.getVar("TCMODE", True) == "external-fsl": @@ -84,6 +71,11 @@ do_compile () { fi for board in ${UBOOT_MACHINES}; do + if ! grep -wq $board ${S}/boards.cfg;then + echo "WARNING: $board not supported in boards.cfg" + continue + fi + oe_runmake O=${board} distclean oe_runmake O=${board} ${board} oe_runmake O=${board} all @@ -101,7 +93,7 @@ do_compile () { if [ "x${UBOOT_TARGET}" != "x" ]; then # some boards' nand image was named as u-boot-with-spl if [ "${UBOOT_TARGET}" = "u-boot-nand" ];then - if echo $board |egrep -q "(P1010RDB|P1020RDB|P1021RDB|P2020RDB|P1022DS|BSC913)";then + if echo $board |egrep -q "(P1010RDB|P1020RDB|P1021RDB|P2020RDB|P1022DS|BSC913|C293)";then UBOOT_SOURCE=u-boot-with-spl fi elif [ "${UBOOT_TARGET}" = "u-boot-spi" ];then @@ -131,6 +123,10 @@ do_install(){ fi for board in ${UBOOT_MACHINES}; do + if ! grep -wq $board ${S}/boards.cfg;then + continue + fi + case "${board}" in *SDCARD*) UBOOT_TARGET="u-boot-sd";; *SPIFLASH*) UBOOT_TARGET="u-boot-spi";; @@ -153,6 +149,10 @@ do_deploy(){ fi for board in ${UBOOT_MACHINES}; do + if ! grep -wq $board ${S}/boards.cfg;then + continue + fi + case "${board}" in *SDCARD*) UBOOT_TARGET="u-boot-sd";; *SPIFLASH*) UBOOT_TARGET="u-boot-spi";; -- cgit v1.2.3-54-g00ecf From 61e6eeb56e5a48bc1379c9acca01176450e577a5 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Tue, 1 Jul 2014 04:03:46 -0500 Subject: u-boot: adjust DEPENDS and PATH setting for multilib build all cross tools were put into the native sysroot per target arch instead of tune arch now: commit e078edbf99f733c04ec8ca50ff10d2200b6d14d4 binutils/gcc/gdb: Add TARGET_ARCH to PN for all cross recipes adjust DEPENDS and PATH setting for multilib build Signed-off-by: Ting Liu --- meta-fsl-ppc/recipes-bsp/u-boot/u-boot_git.bb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/meta-fsl-ppc/recipes-bsp/u-boot/u-boot_git.bb b/meta-fsl-ppc/recipes-bsp/u-boot/u-boot_git.bb index ec744f52..bd3053ff 100644 --- a/meta-fsl-ppc/recipes-bsp/u-boot/u-boot_git.bb +++ b/meta-fsl-ppc/recipes-bsp/u-boot/u-boot_git.bb @@ -31,14 +31,14 @@ python () { raise bb.parse.SkipPackage("Building the u-boot for this arch requires multilib to be enabled") } -DEPENDS_append_e5500-64b = "${@base_contains('TCMODE', 'external-fsl', '', ' lib32-gcc-cross lib32-libgcc', d)}" -PATH_append_e5500-64b = ":${STAGING_BINDIR_NATIVE}/${DEFAULTTUNE_virtclass-multilib-lib32}${TARGET_VENDOR_virtclass-multilib-lib32}-${HOST_OS}/" +DEPENDS_append_e5500-64b = "${@base_contains('TCMODE', 'external-fsl', '', ' lib32-gcc-cross-powerpc lib32-libgcc', d)}" +PATH_append_e5500-64b = ":${STAGING_BINDIR_NATIVE}/powerpc${TARGET_VENDOR_virtclass-multilib-lib32}-${HOST_OS}/" TOOLCHAIN_OPTIONS_append_e5500-64b = "${@base_contains('TCMODE', 'external-fsl', '', '/../lib32-${MACHINE}', d)}" TARGET_VENDOR_virtclass-multilib-lib32 ?= "${@base_contains('TCMODE', 'external-fsl', '', '-${DISTRO}mllib32', d)}" WRAP_TARGET_PREFIX_e5500-64b := "powerpc${TARGET_VENDOR_virtclass-multilib-lib32}-${HOST_OS}-" -DEPENDS_append_e6500-64b = "${@base_contains('TCMODE', 'external-fsl', '', ' lib32-gcc-cross lib32-libgcc', d)}" -PATH_append_e6500-64b = ":${STAGING_BINDIR_NATIVE}/${DEFAULTTUNE_virtclass-multilib-lib32}${TARGET_VENDOR_virtclass-multilib-lib32}-${HOST_OS}/" +DEPENDS_append_e6500-64b = "${@base_contains('TCMODE', 'external-fsl', '', ' lib32-gcc-cross-powerpc lib32-libgcc', d)}" +PATH_append_e6500-64b = ":${STAGING_BINDIR_NATIVE}/powerpc${TARGET_VENDOR_virtclass-multilib-lib32}-${HOST_OS}/" TOOLCHAIN_OPTIONS_append_e6500-64b = "${@base_contains('TCMODE', 'external-fsl', '', '/../lib32-${MACHINE}', d)}" TARGET_VENDOR_virtclass-multilib-lib32 ?= "${@base_contains('TCMODE', 'external-fsl', '', '-${DISTRO}mllib32', d)}" WRAP_TARGET_PREFIX_e6500-64b := "powerpc${TARGET_VENDOR_virtclass-multilib-lib32}-${HOST_OS}-" -- cgit v1.2.3-54-g00ecf From c825cb2866a37e6d7c6dfb13637a2cc1ab55938d Mon Sep 17 00:00:00 2001 From: Zongchun Yu Date: Mon, 25 Nov 2013 10:00:46 +0800 Subject: add machine configure file for new boards based on latest kernel/u-boot codes, add following boards: t1040rdb-64b t1040rdb t1042rdb-64b t1042rdb t2080rdb-64b t2080rdb t4240rdb-64b t4240rdb Signed-off-by: Ting Liu --- meta-fsl-ppc/conf/machine/t1040rdb-64b.conf | 19 +++++++++++++++++++ meta-fsl-ppc/conf/machine/t1040rdb.conf | 19 +++++++++++++++++++ meta-fsl-ppc/conf/machine/t1042rdb-64b.conf | 29 +++++++++++++++++++++++++++++ meta-fsl-ppc/conf/machine/t1042rdb.conf | 28 ++++++++++++++++++++++++++++ meta-fsl-ppc/conf/machine/t2080rdb-64b.conf | 20 ++++++++++++++++++++ meta-fsl-ppc/conf/machine/t2080rdb.conf | 20 ++++++++++++++++++++ meta-fsl-ppc/conf/machine/t4240rdb-64b.conf | 20 ++++++++++++++++++++ meta-fsl-ppc/conf/machine/t4240rdb.conf | 20 ++++++++++++++++++++ 8 files changed, 175 insertions(+) create mode 100644 meta-fsl-ppc/conf/machine/t1040rdb-64b.conf create mode 100644 meta-fsl-ppc/conf/machine/t1040rdb.conf create mode 100644 meta-fsl-ppc/conf/machine/t1042rdb-64b.conf create mode 100644 meta-fsl-ppc/conf/machine/t1042rdb.conf create mode 100644 meta-fsl-ppc/conf/machine/t2080rdb-64b.conf create mode 100644 meta-fsl-ppc/conf/machine/t2080rdb.conf create mode 100644 meta-fsl-ppc/conf/machine/t4240rdb-64b.conf create mode 100644 meta-fsl-ppc/conf/machine/t4240rdb.conf diff --git a/meta-fsl-ppc/conf/machine/t1040rdb-64b.conf b/meta-fsl-ppc/conf/machine/t1040rdb-64b.conf new file mode 100644 index 00000000..0f0a6859 --- /dev/null +++ b/meta-fsl-ppc/conf/machine/t1040rdb-64b.conf @@ -0,0 +1,19 @@ +#@TYPE: Machine +#@NAME: Freescale T1040RDB +#@SOC: t1040 +#@DESCRIPTION: Machine configuration for running T1040RDB in 64-bit mode +#@MAINTAINER: Chunrong Guo + +require e5500-64b.inc +require conf/machine/include/soc-family.inc + +SOC_FAMILY = "t1040" +UBOOT_MACHINES ?= "T1040RDB" +KERNEL_DEVICETREE ?= "t1040rdb.dtb t1040rdb-usdpaa.dtb" +KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/t1040_64bit_smp_defconfig" + +JFFS2_ERASEBLOCK = "0x10000" + +SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" +SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" +USE_VT = "0" diff --git a/meta-fsl-ppc/conf/machine/t1040rdb.conf b/meta-fsl-ppc/conf/machine/t1040rdb.conf new file mode 100644 index 00000000..4532c49a --- /dev/null +++ b/meta-fsl-ppc/conf/machine/t1040rdb.conf @@ -0,0 +1,19 @@ +#@TYPE: Machine +#@NAME: Freescale T1040RDB +#@SOC: t1040 +#@DESCRIPTION: Machine configuration for running T1040RDB in 32-bit mode +#@MAINTAINER: Chunrong Guo + +require e5500.inc +require conf/machine/include/soc-family.inc + +SOC_FAMILY = "t1040" +UBOOT_MACHINES ?= "T1040RDB" +KERNEL_DEVICETREE ?= "t1040rdb.dtb t1040rdb-usdpaa.dtb" +KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/t1040_32bit_smp_defconfig" + +JFFS2_ERASEBLOCK = "0x10000" + +SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" +SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" +USE_VT = "0" diff --git a/meta-fsl-ppc/conf/machine/t1042rdb-64b.conf b/meta-fsl-ppc/conf/machine/t1042rdb-64b.conf new file mode 100644 index 00000000..52be355b --- /dev/null +++ b/meta-fsl-ppc/conf/machine/t1042rdb-64b.conf @@ -0,0 +1,29 @@ +#@TYPE: Machine +#@NAME: Freescale T1042RDB +#@SOC: t1042 +#@DESCRIPTION: Machine configuration for running T1042RDB in 64-bit mode +#@MAINTAINER: Chunrong Guo + +require e5500-64b.inc +require conf/machine/include/soc-family.inc + +SOC_FAMILY = "t1042" +UBOOT_MACHINES ?= "T1042RDB_PI" +KERNEL_DEVICETREE ?= "t1042rdb_pi.dtb" +KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/t1040_64bit_smp_defconfig" + +JFFS2_ERASEBLOCK = "0x10000" + +SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" +SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" +USE_VT = "0" + +PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xorg" +XSERVER = " \ + xserver-xorg \ + xf86-input-evdev \ + xf86-input-mouse \ + xf86-input-keyboard \ + xf86-video-fbdev \ +" + diff --git a/meta-fsl-ppc/conf/machine/t1042rdb.conf b/meta-fsl-ppc/conf/machine/t1042rdb.conf new file mode 100644 index 00000000..ce877c70 --- /dev/null +++ b/meta-fsl-ppc/conf/machine/t1042rdb.conf @@ -0,0 +1,28 @@ +#@TYPE: Machine +#@NAME: Freescale T1042RDB +#@SOC: t1042 +#@DESCRIPTION: Machine configuration for running T1042RDB in 32-bit mode +#@MAINTAINER: Chunrong Guo + +require e5500.inc +require conf/machine/include/soc-family.inc + +SOC_FAMILY = "t1042" +UBOOT_MACHINES ?= "T1042RDB_PI" +KERNEL_DEVICETREE ?= "t1042rdb_pi.dtb" +KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/t1040_32bit_smp_defconfig" + +JFFS2_ERASEBLOCK = "0x10000" + +SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" +SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" +USE_VT = "0" + +PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xorg" +XSERVER = " \ + xserver-xorg \ + xf86-input-evdev \ + xf86-input-mouse \ + xf86-input-keyboard \ + xf86-video-fbdev \ +" diff --git a/meta-fsl-ppc/conf/machine/t2080rdb-64b.conf b/meta-fsl-ppc/conf/machine/t2080rdb-64b.conf new file mode 100644 index 00000000..e5dfb33c --- /dev/null +++ b/meta-fsl-ppc/conf/machine/t2080rdb-64b.conf @@ -0,0 +1,20 @@ +#@TYPE: Machine +#@NAME: Freescale T2080RDB +#@SOC: t2080 +#@DESCRIPTION: Machine configuration for running T2080RDB in 64-bit mode +#@MAINTAINER: Chunrong Guo + +require e6500-64b.inc +require conf/machine/include/soc-family.inc + +SOC_FAMILY = "t2080" +# TODO: fix 32bit build of u-boot +UBOOT_MACHINES ?= "T2080RDB T2080RDB_SDCARD T2080RDB_SPIFLASH T2080RDB_NAND T2080RDB_SRIO_PCIE_BOOT" +KERNEL_DEVICETREE ?= "t2080rdb.dtb t2080rdb-usdpaa.dtb" +KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/85xx/e6500rev2_defconfig" + +JFFS2_ERASEBLOCK = "0x10000" + +SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" +SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" +USE_VT = "0" diff --git a/meta-fsl-ppc/conf/machine/t2080rdb.conf b/meta-fsl-ppc/conf/machine/t2080rdb.conf new file mode 100644 index 00000000..5030588a --- /dev/null +++ b/meta-fsl-ppc/conf/machine/t2080rdb.conf @@ -0,0 +1,20 @@ +#@TYPE: Machine +#@NAME: Freescale T2080RDB +#@SOC: t2080 +#@DESCRIPTION: Machine configuration for running T2080RDB in 32-bit mode +#@MAINTAINER: Chunrong Guo + +require e6500.inc +require conf/machine/include/soc-family.inc + +SOC_FAMILY = "t2080" +UBOOT_MACHINES ?= "T2080RDB T2080RDB_SDCARD T2080RDB_SPIFLASH T2080RDB_NAND T2080RDB_SRIO_PCIE_BOOT" +KERNEL_DEVICETREE ?= "t2080rdb.dtb t2080rdb-usdpaa.dtb" +KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/85xx/e6500rev2_defconfig" + +JFFS2_ERASEBLOCK = "0x10000" + +SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" +SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" +USE_VT = "0" +BUILD_64BIT_KERNEL = "1" diff --git a/meta-fsl-ppc/conf/machine/t4240rdb-64b.conf b/meta-fsl-ppc/conf/machine/t4240rdb-64b.conf new file mode 100644 index 00000000..ab7870bd --- /dev/null +++ b/meta-fsl-ppc/conf/machine/t4240rdb-64b.conf @@ -0,0 +1,20 @@ +#@TYPE: Machine +#@NAME: Freescale T4240RDB +#@SOC: t4240 +#@DESCRIPTION: Machine configuration for running T4240RDB in 64-bit mode +#@MAINTAINER: Chunrong Guo + +require e6500-64b.inc +require conf/machine/include/soc-family.inc + +SOC_FAMILY = "t4240" +# TODO: fix 32bit build of u-boot +UBOOT_MACHINES ?= "T4240RDB" +KERNEL_DEVICETREE ?= "t4240rdb.dtb t4240rdb-usdpaa.dtb t4240rdb-usdpaa-shared-interfaces.dtb" +KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/85xx/e6500rev2_defconfig" + +JFFS2_ERASEBLOCK = "0x10000" + +SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" +SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" +USE_VT = "0" diff --git a/meta-fsl-ppc/conf/machine/t4240rdb.conf b/meta-fsl-ppc/conf/machine/t4240rdb.conf new file mode 100644 index 00000000..dc51e654 --- /dev/null +++ b/meta-fsl-ppc/conf/machine/t4240rdb.conf @@ -0,0 +1,20 @@ +#@TYPE: Machine +#@NAME: Freescale T4240RDB +#@SOC: t4240 +#@DESCRIPTION: Machine configuration for running T4240RDB in 32-bit mode +#@MAINTAINER: Chunrong Guo + +require e6500.inc +require conf/machine/include/soc-family.inc + +SOC_FAMILY = "t4240" +UBOOT_MACHINES ?= "T4240RDB" +KERNEL_DEVICETREE ?= "t4240rdb.dtb t4240rdb-usdpaa.dtb t4240rdb-usdpaa-shared-interfaces.dtb" +KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/85xx/e6500rev2_defconfig" + +JFFS2_ERASEBLOCK = "0x10000" + +SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" +SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" +USE_VT = "0" +BUILD_64BIT_KERNEL = "1" -- cgit v1.2.3-54-g00ecf From 65319d59428e8fd15da6d5e2a37f1d4f4a284f9d Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Wed, 22 Jan 2014 17:05:38 +0800 Subject: update machine configure file for old boards 1.c293pcie: remove C293PCIE_NAND from UBOOT_MACHINE list 2.p1023rdb: update defconfig to p1023_defconfig Signed-off-by: Ting Liu --- meta-fsl-ppc/conf/machine/c293pcie.conf | 2 +- meta-fsl-ppc/conf/machine/p1023rdb.conf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/meta-fsl-ppc/conf/machine/c293pcie.conf b/meta-fsl-ppc/conf/machine/c293pcie.conf index 0583611a..88009ace 100644 --- a/meta-fsl-ppc/conf/machine/c293pcie.conf +++ b/meta-fsl-ppc/conf/machine/c293pcie.conf @@ -9,7 +9,7 @@ require conf/machine/include/soc-family.inc SOC_FAMILY = "c293pcie" BOOTFORMAT_CONFIG = "config_ddr3_512m_c29xpcie_800M.dat" -UBOOT_MACHINES ?= "C293PCIE C293PCIE_NAND C293PCIE_SPIFLASH C293PCIE_SECBOOT C293PCIE_SPIFLASH_SECBOOT" +UBOOT_MACHINES ?= "C29XPCIE C29XPCIE_SPIFLASH C29XPCIE_SECBOOT C29XPCIE_SPIFLASH_SECBOOT" KERNEL_DEVICETREE ?= "c293pcie_36b.dtb" KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/mpc85xx_defconfig" diff --git a/meta-fsl-ppc/conf/machine/p1023rdb.conf b/meta-fsl-ppc/conf/machine/p1023rdb.conf index 5cfb2149..4c180834 100644 --- a/meta-fsl-ppc/conf/machine/p1023rdb.conf +++ b/meta-fsl-ppc/conf/machine/p1023rdb.conf @@ -10,7 +10,7 @@ require conf/machine/include/soc-family.inc SOC_FAMILY = "p1023" UBOOT_MACHINES ?= "P1023RDB" KERNEL_DEVICETREE ?= "p1023rdb.dtb" -KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/85xx/p1023rds_defconfig" +KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/85xx/p1023_defconfig" JFFS2_ERASEBLOCK = "0x10000" -- cgit v1.2.3-54-g00ecf From bd68b8336e6c82863def3d87d49997581f86f294 Mon Sep 17 00:00:00 2001 From: Zongchun Yu Date: Tue, 26 Nov 2013 18:22:39 +0800 Subject: fm-ucode: update to sdk v1.6 release 1. add support for new added boards 2. simplify the definition of compatible_machine Signed-off-by: Ting Liu --- meta-fsl-ppc/recipes-dpaa/fm-ucode/fm-ucode_git.bb | 26 ++++++++++++---------- 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/meta-fsl-ppc/recipes-dpaa/fm-ucode/fm-ucode_git.bb b/meta-fsl-ppc/recipes-dpaa/fm-ucode/fm-ucode_git.bb index 3840e233..ef9cae03 100644 --- a/meta-fsl-ppc/recipes-dpaa/fm-ucode/fm-ucode_git.bb +++ b/meta-fsl-ppc/recipes-dpaa/fm-ucode/fm-ucode_git.bb @@ -5,22 +5,22 @@ LIC_FILES_CHKSUM = "file://EULA;md5=60037ccba533a5995e8d1a838d85799c" PR = "r1" -COMPATIBLE_MACHINE = "(p1023rdb|p2041rdb|p3041ds|p4080ds|p5020ds|p5040ds|p5020ds-64b|p5040ds-64b|b4420qds|b4420qds-64b|b4860qds|b4860qds-64b|t4160qds|t4160qds-64b|t2080qds|t2080qds-64b|t4240qds|t4240qds-64b)" inherit deploy SRC_URI = "git://git.freescale.com/ppc/sdk/fm-ucode.git;nobranch=1" -SRCREV = "c8fe73d734ed733f39c80aa3a8f167808ba3913c" +SRCREV = "517267e5f9ca9ab13cb2e94e0a20f555f73885ee" S = "${WORKDIR}/git" ALLOW_EMPTY_${PN} = "1" do_install () { case ${MACHINE} in - b4420qds|b4420qds-64b|b4860qds|b4860qds-64b) UCODE=b4860qds;; - t4240qds|t4240qds-64b|t4160qds|t4160qds-64b) UCODE=t4240qds;; - p5020ds|p5020ds-64b) UCODE=p5020ds;; - p5040ds|p5040ds-64b) UCODE=p5040ds;; - t2080qds|t2080qds-64b) UCODE=t2080qds;; + t1040qds|t1040qds-64b|t1040rdb|t1040rdb-64b|t1042rdb|t1042rdb-64b) UCODE=t1040;; + t2080qds|t2080qds-64b|t2080rdb|t2080rdb-64b) UCODE=t2080;; + b4420qds|b4420qds-64b|b4860qds|b4860qds-64b) UCODE=b4860;; + t4240qds|t4240qds-64b|t4240rdb|t4240rdb-64b|t4160qds|t4160qds-64b) UCODE=t4240;; + p5020ds|p5020ds-64b) UCODE=p5020;; + p5040ds|p5040ds-64b) UCODE=p5040;; *) UCODE=${MACHINE};; esac UCODE=`echo $UCODE | sed -e 's,[a-zA-Z]*$,,'` @@ -30,11 +30,12 @@ do_install () { do_deploy () { case ${MACHINE} in - b4420qds|b4420qds-64b|b4860qds|b4860qds-64b) UCODE=b4860qds;; - t4240qds|t4240qds-64b|t4160qds|t4160qds-64b) UCODE=t4240qds;; - p5020ds|p5020ds-64b) UCODE=p5020ds;; - p5040ds|p5040ds-64b) UCODE=p5040ds;; - t2080qds|t2080qds-64b) UCODE=t2080qds;; + t1040qds|t1040qds-64b|t1040rdb|t1040rdb-64b|t1042rdb|t1042rdb-64b) UCODE=t1040;; + t2080qds|t2080qds-64b|t2080rdb|t2080rdb-64b) UCODE=t2080;; + b4420qds|b4420qds-64b|b4860qds|b4860qds-64b) UCODE=b4860;; + t4240qds|t4240qds-64b|t4240rdb|t4240rdb-64b|t4160qds|t4160qds-64b) UCODE=t4240;; + p5020ds|p5020ds-64b) UCODE=p5020;; + p5040ds|p5040ds-64b) UCODE=p5040;; *) UCODE=${MACHINE};; esac UCODE=`echo $UCODE | sed -e 's,[a-zA-Z]*$,,'` @@ -45,4 +46,5 @@ addtask deploy before do_build after do_install PACKAGES += "${PN}-image" FILES_${PN}-image += "/boot" +COMPATIBLE_MACHINE = "(p1023rdb|e500mc|e5500|e5500-64b|e6500|e6500-64b)" -- cgit v1.2.3-54-g00ecf From 84c704dd15f082763f42e502e17351e750560b7b Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Wed, 19 Feb 2014 10:14:32 +0800 Subject: fmc: update to sdk v1.6 release add support for new added boards Signed-off-by: Ting Liu --- meta-fsl-ppc/recipes-dpaa/fmc/fmc_git.bb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/meta-fsl-ppc/recipes-dpaa/fmc/fmc_git.bb b/meta-fsl-ppc/recipes-dpaa/fmc/fmc_git.bb index 9d98fec6..9a8af271 100644 --- a/meta-fsl-ppc/recipes-dpaa/fmc/fmc_git.bb +++ b/meta-fsl-ppc/recipes-dpaa/fmc/fmc_git.bb @@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=a504ab5a8ff235e67c7301214749346c" PR = "r2" SRC_URI = "git://git.freescale.com/ppc/sdk/fmc.git;nobranch=1" -SRCREV = "363f8497cf04d242c477b12a21f679b2ec9e3fa4" +SRCREV = "021f7206cd80eb2e85dde1fc1bc79e8fea272de4" DEPENDS = "libxml2 fmlib tclap" @@ -24,10 +24,8 @@ EXTRA_OEMAKE_virtclass-native = 'FMCHOSTMODE=1 FMD_USPACE_HEADER_PATH="${STAGING PARALLEL_MAKE = "" do_compile () { - if [ "b4860qds" = "${MACHINE}" ] || [ "t2080qds" = "${MACHINE}" ] || [ "b4420qds" = "${MACHINE}" ];then + if echo ${MACHINE} | egrep -q "^(b4|t1|t2|t4)"; then EXTRA_OEMAKE_PLATFORM="b4860qds" - elif [ "t4240qds" = "${MACHINE}" ] || [ "t4160qds" = "${MACHINE}" ];then - EXTRA_OEMAKE_PLATFORM="t4240qds" elif [ "p1023rds" = "${MACHINE}" ];then EXTRA_OEMAKE_PLATFORM="p1023rds" else -- cgit v1.2.3-54-g00ecf From d22b96dc834a528ce92abffead973f424d0951af Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Fri, 21 Feb 2014 15:13:16 +0800 Subject: rcw: update to sdk v1.6 release add support for new added boards Signed-off-by: Ting Liu --- meta-fsl-ppc/recipes-bsp/rcw/rcw_git.bb | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/meta-fsl-ppc/recipes-bsp/rcw/rcw_git.bb b/meta-fsl-ppc/recipes-bsp/rcw/rcw_git.bb index ad961ed8..5e751b8c 100644 --- a/meta-fsl-ppc/recipes-bsp/rcw/rcw_git.bb +++ b/meta-fsl-ppc/recipes-bsp/rcw/rcw_git.bb @@ -12,26 +12,30 @@ PACKAGE_ARCH = "${MACHINE_ARCH}" inherit deploy SRC_URI = "git://git.freescale.com/ppc/sdk/rcw.git;nobranch=1" -SRCREV = "bc38737b5cb08336a075cb38481881f87b33b7a1" -SRCREV_t2080qds = "a694a89f4b57ce700b5b2ea84302c8618ece2f0f" -SRCREV_t2080qds-64b = "a694a89f4b57ce700b5b2ea84302c8618ece2f0f" +SRCREV = "261b2355e9936ecb37b61e6f58dfc48dcfb805b3" S = "${WORKDIR}/git" export PYTHON do_install () { - make install - - M=`echo ${MACHINE} | sed s/-64b//g` - install -d ${D}/boot/rcw - cp -r ${S}/${M}/${M}/* ${D}/boot/rcw + make install + + M=`echo ${MACHINE} | sed s/-64b//g` + if [ "t1042rdb" = "${M}" ];then + M=${M}_pi + fi + install -d ${D}/boot/rcw + cp -r ${S}/${M}/${M}/* ${D}/boot/rcw } do_deploy () { - M=`echo ${MACHINE} | sed s/-64b//g` - install -d ${DEPLOYDIR}/rcw - cp -r ${S}/${M}/${M}/* ${DEPLOYDIR}/rcw + M=`echo ${MACHINE} | sed s/-64b//g` + if [ "t1042rdb" = "${M}" ];then + M=${M}_pi + fi + install -d ${DEPLOYDIR}/rcw + cp -r ${S}/${M}/${M}/* ${DEPLOYDIR}/rcw } addtask deploy after do_install -- cgit v1.2.3-54-g00ecf From f017177387570e35ce423e461a9553b77e1934ea Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Fri, 21 Feb 2014 15:34:07 +0800 Subject: fmlib: update to sdk v1.6 release add support for new added boards Signed-off-by: Ting Liu --- meta-fsl-ppc/recipes-dpaa/fmlib/fmlib_git.bb | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/meta-fsl-ppc/recipes-dpaa/fmlib/fmlib_git.bb b/meta-fsl-ppc/recipes-dpaa/fmlib/fmlib_git.bb index df7caf87..04ca515a 100644 --- a/meta-fsl-ppc/recipes-dpaa/fmlib/fmlib_git.bb +++ b/meta-fsl-ppc/recipes-dpaa/fmlib/fmlib_git.bb @@ -9,9 +9,7 @@ DEPENDS += "virtual/kernel" DEPENDS_virtclass-native = "" SRC_URI = "git://git.freescale.com/ppc/sdk/fmlib.git;nobranch=1" -SRCREV = "1fce11f17a102820a20cdbf80f557d74b169fc4c" -SRCREV_t2080qds = "49f50a4bf4f0e34708003d7b49ce629630b68489" -SRCREV_t2080qds-64b = "49f50a4bf4f0e34708003d7b49ce629630b68489" +SRCREV = "6efc100cf470f271a312860c06717928554e3492" S = "${WORKDIR}/git" @@ -25,19 +23,27 @@ EXTRA_OEMAKE = "DESTDIR=${D} PREFIX=${prefix} LIB_DEST_DIR=${libdir} \ CROSS_COMPILE=${TARGET_PREFIX} KERNEL_SRC=${STAGING_KERNEL_DIR}" do_compile () { - oe_runmake libfm-${TARGET_ARCH_FMLIB}.a + if [ "t1040" = "${SOC_FAMILY}" -o "t1042" = "${SOC_FAMILY}" ];then + oe_runmake libfm-${TARGET_ARCH_FMLIB}-fmv3.a + else + oe_runmake libfm-${TARGET_ARCH_FMLIB}.a + fi } do_compile_virtclass-native () { } do_install () { - oe_runmake install-libfm-${TARGET_ARCH_FMLIB} + if [ "t1040" = "${SOC_FAMILY}" -o "t1042" = "${SOC_FAMILY}" ];then + oe_runmake install-libfm-${TARGET_ARCH_FMLIB}-fmv3 + else + oe_runmake install-libfm-${TARGET_ARCH_FMLIB} + fi } do_install_virtclass-native () { - install -d ${D}/${includedir} - cp -rf ${S}/include/* ${D}/${includedir} + install -d ${D}/${includedir} + cp -rf ${S}/include/* ${D}/${includedir} } ALLOW_EMPTY_${PN} = "1" -- cgit v1.2.3-54-g00ecf From ad1c9eccdffffa4cbd66127da170c559adc2c878 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Sat, 14 Jun 2014 12:48:01 +0800 Subject: add recipes for ipc kernel module and userspace tool Signed-off-by: Ting Liu --- .../recipes-bsp/ipc/ipc-modules-multi_git.bb | 11 +++++ .../recipes-bsp/ipc/ipc-modules-single_git.bb | 11 +++++ meta-fsl-ppc/recipes-bsp/ipc/ipc-modules.inc | 39 +++++++++++++++++ meta-fsl-ppc/recipes-bsp/ipc/ipc-ust_git.bb | 50 ++++++++++++++++++++++ meta-fsl-ppc/recipes-bsp/ipc/ipc.inc | 7 +++ 5 files changed, 118 insertions(+) create mode 100644 meta-fsl-ppc/recipes-bsp/ipc/ipc-modules-multi_git.bb create mode 100644 meta-fsl-ppc/recipes-bsp/ipc/ipc-modules-single_git.bb create mode 100644 meta-fsl-ppc/recipes-bsp/ipc/ipc-modules.inc create mode 100644 meta-fsl-ppc/recipes-bsp/ipc/ipc-ust_git.bb create mode 100644 meta-fsl-ppc/recipes-bsp/ipc/ipc.inc diff --git a/meta-fsl-ppc/recipes-bsp/ipc/ipc-modules-multi_git.bb b/meta-fsl-ppc/recipes-bsp/ipc/ipc-modules-multi_git.bb new file mode 100644 index 00000000..e5dc1151 --- /dev/null +++ b/meta-fsl-ppc/recipes-bsp/ipc/ipc-modules-multi_git.bb @@ -0,0 +1,11 @@ +require ipc-modules.inc + +EXTRA_OEMAKE ="KERNEL_DIR=${STAGING_KERNEL_DIR} ${SOC}=1 CONFIG_MULTI_RAT=1" + +do_install(){ + install -d ${D}/usr/driver/IPC/multi_rat + install -m 755 ${S}/kernel/*.ko ${D}/usr/driver/IPC/multi_rat +} + +FILES_${PN} += "/usr/driver/IPC/multi_rat/*.ko" +FILES_${PN}-dbg += "/usr/driver/IPC/multi_rat/.debug" diff --git a/meta-fsl-ppc/recipes-bsp/ipc/ipc-modules-single_git.bb b/meta-fsl-ppc/recipes-bsp/ipc/ipc-modules-single_git.bb new file mode 100644 index 00000000..03817e0e --- /dev/null +++ b/meta-fsl-ppc/recipes-bsp/ipc/ipc-modules-single_git.bb @@ -0,0 +1,11 @@ +require ipc-modules.inc + +EXTRA_OEMAKE ="KERNEL_DIR=${STAGING_KERNEL_DIR} ${SOC}=1" + +do_install(){ + install -d ${D}/usr/driver/IPC/single_rat + install -m 755 ${S}/kernel/*.ko ${D}/usr/driver/IPC/single_rat +} + +FILES_${PN} += "/usr/driver/IPC/single_rat/*.ko" +FILES_${PN}-dbg += "/usr/driver/IPC/single_rat/.debug" diff --git a/meta-fsl-ppc/recipes-bsp/ipc/ipc-modules.inc b/meta-fsl-ppc/recipes-bsp/ipc/ipc-modules.inc new file mode 100644 index 00000000..015a91bc --- /dev/null +++ b/meta-fsl-ppc/recipes-bsp/ipc/ipc-modules.inc @@ -0,0 +1,39 @@ +SUMMARY = "Linux IPC KERNEL MODULE " +DESCRIPTION = "DSP boot application and ipc test application" +LICENSE = "BSD" +LIC_FILES_CHKSUM = "file://COPYING;md5=fa38cd73d71527dc6efb546474f64d10" + +require ipc.inc + +inherit module + +S = "${WORKDIR}/git" +python () { + ma = d.getVar("DISTRO_FEATURES", True) + arch = d.getVar("OVERRIDES", True) + + # the : after the arch is to skip the message on 64b + if not "multiarch" in ma and ("e5500:" in arch or "e6500:" in arch): + raise bb.parse.SkipPackage("Building the kernel for this arch requires multiarch to be in DISTRO_FEATURES") + + promote_kernel = d.getVar('BUILD_64BIT_KERNEL') + + if promote_kernel == "1": + d.setVar('KERNEL_CC_append', ' -m64') + d.setVar('KERNEL_LD_append', ' -melf64ppc') + + error_qa = d.getVar('ERROR_QA', True) + if 'arch' in error_qa: + d.setVar('ERROR_QA', error_qa.replace(' arch', '')) +} + +do_compile_prepend () { + cd ${S}/kernel + case ${MACHINE} in + bsc9132qds|bsc9131rdb) SOC=B913x;; + b4860qds|b4420qds) SOC=B4860;; + esac +} + +INHIBIT_PACKAGE_STRIP = "1" + diff --git a/meta-fsl-ppc/recipes-bsp/ipc/ipc-ust_git.bb b/meta-fsl-ppc/recipes-bsp/ipc/ipc-ust_git.bb new file mode 100644 index 00000000..c6b3cfe6 --- /dev/null +++ b/meta-fsl-ppc/recipes-bsp/ipc/ipc-ust_git.bb @@ -0,0 +1,50 @@ +SUMMARY = "Linux IPC Userspace Tool" +DESCRIPTION = "DSP boot application and ipc test application" +LICENSE = "BSD" +LIC_FILES_CHKSUM = "file://COPYING;md5=fa38cd73d71527dc6efb546474f64d10" + +require ipc.inc + +S = "${WORKDIR}/git" + +# workaround for issue of parallel build, required a actual fix in ipc source +PARALLEL_MAKE = "" + +EXTRA_OEMAKE = 'CROSS_COMPILE="${TARGET_PREFIX}" CC="${CC}" AR="${AR}"' + +do_compile () { + case ${MACHINE} in + bsc9132qds|bsc9131rdb) SOC=B913x;; + b4860qds|b4420qds|b4860qds-64b) SOC=B4860;; + esac + oe_runmake ${SOC}=1 +} + +do_install () { + install -d ${D}${bindir} + install -d ${D}${includedir} + install -d ${D}/ipc + install -m 755 ${S}/dsp_boot/dsp_bt ${D}/ipc + install -m 755 ${S}/ipc/ipc_test ${D}/ipc + install -m 755 ${S}/ipc/ipc_test67 ${D}/ipc + install -m 755 ${S}/ipc/l1d_app ${D}/ipc + install -m 755 ${S}/fsl_shm/app ${D}${bindir}/lg_shm_test + install -d ${D}${base_libdir} + install -m 755 ${S}/ipc/libipc.so ${D}${base_libdir} + install -m 755 ${S}/ipc/libmem.so ${D}${base_libdir} + install -m 755 ${S}/ipc/libdspboot.so ${D}${base_libdir} + install -d ${D}${includedir}/ipc + install -d ${D}${includedir}/ipc/ipc/include + install -d ${D}${includedir}/ipc/fsl_shm/lib + install ${S}/ipc/include/*.h ${D}${includedir}/ipc/ipc/include + install ${S}/dsp_boot/*.h ${D}${includedir}/ipc/ipc/include + install ${S}/kernel/fsl_ipc_types.h ${D}${includedir}/ipc/ipc/include + install ${S}/kernel/fsl_heterogeneous_common.h ${D}${includedir}/ipc/ipc/include + install ${S}/kernel/fsl_heterogeneous_l1_defense.h ${D}${includedir}/ipc/ipc/include + install ${S}/fsl_shm/include/*.h ${D}${includedir}/ipc/ipc/include + install ${S}/fsl_shm/lib/*.h ${D}${includedir}/ipc/fsl_shm/lib +} + +FILES_${PN} += "/ipc/*" +FILES_${PN}-dbg += "/ipc/.debug" + diff --git a/meta-fsl-ppc/recipes-bsp/ipc/ipc.inc b/meta-fsl-ppc/recipes-bsp/ipc/ipc.inc new file mode 100644 index 00000000..22ab1e32 --- /dev/null +++ b/meta-fsl-ppc/recipes-bsp/ipc/ipc.inc @@ -0,0 +1,7 @@ +DEPENDS = "virtual/kernel" + +SRC_URI = "git://git.freescale.com/ppc/sdk/ipc.git;nobranch=1" +SRCREV = "7e36edbbc5ac5271c85d45745b3e70f47771f262" + +COMPATIBLE_MACHINE = "(bsc9132qds|bsc9131rdb|b4860qds|b4420qds)" + -- cgit v1.2.3-54-g00ecf From 2be696ea607dd338f7e262cc3b6a3eafe41e6052 Mon Sep 17 00:00:00 2001 From: Vakul Garg Date: Wed, 19 Mar 2014 12:33:21 -0400 Subject: usdpaa: update to sdk v1.6 release 1. Added a new variable for the FMan version so that the usdpaa applications to correctly use the fmlib interface. 2. Unify the indentation character, replace tab with space 4 character 3. add support for new added boards Signed-off-by: Ting Liu --- meta-fsl-ppc/recipes-dpaa/usdpaa/usdpaa_git.bb | 65 ++++++++++++++++++-------- 1 file changed, 45 insertions(+), 20 deletions(-) diff --git a/meta-fsl-ppc/recipes-dpaa/usdpaa/usdpaa_git.bb b/meta-fsl-ppc/recipes-dpaa/usdpaa/usdpaa_git.bb index 8288b2a1..9c7e3882 100644 --- a/meta-fsl-ppc/recipes-dpaa/usdpaa/usdpaa_git.bb +++ b/meta-fsl-ppc/recipes-dpaa/usdpaa/usdpaa_git.bb @@ -8,12 +8,13 @@ inherit pkgconfig PACKAGE_ARCH = "${MACHINE_ARCH}" DEPENDS = "libxml2 libedit ncurses readline flib fmc" +DEPENDS_append_b4860qds = " ipc-ust" +DEPENDS_append_b4420qds = " ipc-ust" + RDEPENDS_${PN} = "libgcc bash" SRC_URI = "git://git.freescale.com/ppc/sdk/usdpaa.git;nobranch=1" -SRCREV = "cc8e332c64e5840ea2037624159801284434caba" -SRCREV_t2080qds = "e6659c7a473fbaa64313c941d5fb10c723c64731" -SRCREV_t2080qds-64b = "e6659c7a473fbaa64313c941d5fb10c723c64731" +SRCREV = "db3534f4d21892bc7f9fbe973f4e4cf8de924c75" S = "${WORKDIR}/git" @@ -21,26 +22,50 @@ EXTRA_OEMAKE = 'CC="${CC}" LD="${LD}" AR="${AR}"' export ARCH="${TARGET_ARCH}" do_compile_prepend () { - case ${MACHINE} in - b4420qds|b4420qds-64b|b4860qds|b4860qds-64b) SOC=B4860;; - t4240qds|t4240qds-64b) SOC=T4240;; - p1023rdb) SOC=P1023;; - *) SOC=P4080;; - esac - export FMC_EXTRA_CFLAGS="-I ${STAGING_INCDIR}/fmc" - export FMLIB_EXTRA_CFLAGS="-I ${STAGING_INCDIR}/fmd \ - -I ${STAGING_INCDIR}/fmd/Peripherals \ - -I ${STAGING_INCDIR}/fmd/integrations \ - -D $SOC" - - export LIBXML2_CFLAGS="$(pkg-config --cflags libxml-2.0)" - export LIBXML2_LDFLAGS="$(pkg-config --libs --static libxml-2.0)" - export LIBEDIT_CFLAGS="$(pkg-config --cflags libedit)" - export LIBEDIT_LDFLAGS="$(pkg-config --libs --static libedit)" + case ${MACHINE} in + b4420qds|b4420qds-64b|b4860qds|b4860qds-64b) + SOC=B4860; + FMAN_VARIANT=B4860;; + t1040qds|t1040qds-64b|t1040rdb|t1040rdb-64b) + SOC=T1040; + FMAN_VARIANT=B4860;; + t2080qds|t2080qds-64b|t2080rdb|t2080rdb-64b) + SOC=T2080; + FMAN_VARIANT=B4860;; + t4240qds|t4240qds-64b|t4240rdb|t4240rdb-64b) + SOC=T4240; + FMAN_VARIANT=B4860;; + p1023rdb) + SOC=P1023; + FMAN_VARIANT=P1023;; + *) + SOC=P4080; + FMAN_VARIANT=P4080;; + esac + export SOC=$SOC + export FMC_EXTRA_CFLAGS="-I ${STAGING_INCDIR}/fmc" + export FMLIB_EXTRA_CFLAGS="-I ${STAGING_INCDIR}/fmd \ + -I ${STAGING_INCDIR}/fmd/Peripherals \ + -I ${STAGING_INCDIR}/fmd/integrations \ + -D$FMAN_VARIANT" + + export LIBXML2_CFLAGS="$(pkg-config --cflags libxml-2.0)" + export LIBXML2_LDFLAGS="$(pkg-config --libs --static libxml-2.0)" + export LIBEDIT_CFLAGS="$(pkg-config --cflags libedit)" + export LIBEDIT_LDFLAGS="$(pkg-config --libs --static libedit)" } do_install () { - oe_runmake install DESTDIR=${D} + case ${MACHINE} in + b4420qds|b4420qds-64b|b4860qds|b4860qds-64b) SOC=B4860;; + t1040qds|t1040qds-64b|t1040rdb|t1040rdb-64b) SOC=T1040;; + t2080qds|t2080qds-64b|t2080rdb|t2080rdb-64b) SOC=T2080;; + t4240qds|t4240qds-64b|t4240rdb|t4240rdb-64b) SOC=T4240;; + p1023rdb) SOC=P1023;; + *) SOC=P4080;; + esac + export SOC=$SOC + oe_runmake install DESTDIR=${D} } PARALLEL_MAKE_pn-${PN} = "" -- cgit v1.2.3-54-g00ecf From 4c85bda8c2d122d3a4685f230e6393e42812e6be Mon Sep 17 00:00:00 2001 From: Stuart Yoder Date: Tue, 8 Apr 2014 18:11:38 -0500 Subject: qemu: update to QEMU 1.7 Signed-off-by: Stuart Yoder --- meta-fsl-ppc/conf/machine/e500mc.inc | 2 +- meta-fsl-ppc/conf/machine/e500v2.inc | 2 +- meta-fsl-ppc/conf/machine/e5500-64b.inc | 2 +- meta-fsl-ppc/conf/machine/e5500.inc | 2 +- meta-fsl-ppc/conf/machine/e6500-64b.inc | 2 +- meta-fsl-ppc/conf/machine/e6500.inc | 2 +- ...x-texinfo-table-markup-in-qemu-options.hx.patch | 201 --------------------- ...x-generating-qemu-doc.html-with-texinfo-5.patch | 54 ------ .../qemu/files/add-gtk-options.patch | 13 -- .../qemu/files/add-libssh2-options.patch | 22 --- .../recipes-devtools/qemu/files/fdt_header.patch | 39 ---- .../fix-libcap-header-issue-on-some-distro.patch | 84 --------- .../qemu/files/relocatable_sdk.patch | 34 ---- meta-fsl-ppc/recipes-devtools/qemu/qemu_fslgit.bb | 16 +- 14 files changed, 10 insertions(+), 465 deletions(-) delete mode 100644 meta-fsl-ppc/recipes-devtools/qemu/files/0001-doc-Fix-texinfo-table-markup-in-qemu-options.hx.patch delete mode 100644 meta-fsl-ppc/recipes-devtools/qemu/files/0002-docs-Fix-generating-qemu-doc.html-with-texinfo-5.patch delete mode 100644 meta-fsl-ppc/recipes-devtools/qemu/files/add-gtk-options.patch delete mode 100644 meta-fsl-ppc/recipes-devtools/qemu/files/add-libssh2-options.patch delete mode 100644 meta-fsl-ppc/recipes-devtools/qemu/files/fdt_header.patch delete mode 100644 meta-fsl-ppc/recipes-devtools/qemu/files/fix-libcap-header-issue-on-some-distro.patch delete mode 100644 meta-fsl-ppc/recipes-devtools/qemu/files/relocatable_sdk.patch diff --git a/meta-fsl-ppc/conf/machine/e500mc.inc b/meta-fsl-ppc/conf/machine/e500mc.inc index c6571ea0..2b06fd1d 100644 --- a/meta-fsl-ppc/conf/machine/e500mc.inc +++ b/meta-fsl-ppc/conf/machine/e500mc.inc @@ -7,7 +7,7 @@ MACHINE_EXTRA_RRECOMMENDS = "u-boot udev-extraconf kernel-modules" PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" PREFERRED_VERSION_virtual/kernel ?= "3.0.34" -PREFERRED_VERSION_qemu = "1.4+fsl" +PREFERRED_VERSION_qemu = "1.7+fsl" KERNEL_IMAGETYPE ?= "uImage" # disable the images below for now diff --git a/meta-fsl-ppc/conf/machine/e500v2.inc b/meta-fsl-ppc/conf/machine/e500v2.inc index 107c9a7a..cbdf3d95 100644 --- a/meta-fsl-ppc/conf/machine/e500v2.inc +++ b/meta-fsl-ppc/conf/machine/e500v2.inc @@ -5,7 +5,7 @@ MACHINE_EXTRA_RRECOMMENDS = "u-boot udev-extraconf kernel-modules" PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" PREFERRED_VERSION_virtual/kernel ?= "3.0.34" -PREFERRED_VERSION_qemu = "1.4+fsl" +PREFERRED_VERSION_qemu = "1.7+fsl" KERNEL_IMAGETYPE ?= "uImage" # disable the images below for now diff --git a/meta-fsl-ppc/conf/machine/e5500-64b.inc b/meta-fsl-ppc/conf/machine/e5500-64b.inc index 7dd1a473..c11c3c12 100644 --- a/meta-fsl-ppc/conf/machine/e5500-64b.inc +++ b/meta-fsl-ppc/conf/machine/e5500-64b.inc @@ -8,7 +8,7 @@ MACHINE_EXTRA_RRECOMMENDS = "u-boot udev-extraconf kernel-modules" PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" PREFERRED_VERSION_virtual/kernel ?= "3.0.34" -PREFERRED_VERSION_qemu = "1.4+fsl" +PREFERRED_VERSION_qemu = "1.7+fsl" KERNEL_IMAGETYPE ?= "uImage" # disable the images below for now diff --git a/meta-fsl-ppc/conf/machine/e5500.inc b/meta-fsl-ppc/conf/machine/e5500.inc index 198aa986..db51aa86 100644 --- a/meta-fsl-ppc/conf/machine/e5500.inc +++ b/meta-fsl-ppc/conf/machine/e5500.inc @@ -7,7 +7,7 @@ MACHINE_EXTRA_RRECOMMENDS = "u-boot udev-extraconf kernel-modules" PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" PREFERRED_VERSION_virtual/kernel ?= "3.0.34" -PREFERRED_VERSION_qemu = "1.4+fsl" +PREFERRED_VERSION_qemu = "1.7+fsl" KERNEL_IMAGETYPE ?= "uImage" # disable the images below for now diff --git a/meta-fsl-ppc/conf/machine/e6500-64b.inc b/meta-fsl-ppc/conf/machine/e6500-64b.inc index 9bbfa9ef..80251038 100644 --- a/meta-fsl-ppc/conf/machine/e6500-64b.inc +++ b/meta-fsl-ppc/conf/machine/e6500-64b.inc @@ -8,7 +8,7 @@ MACHINE_EXTRA_RRECOMMENDS = "u-boot udev-extraconf kernel-modules" PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" PREFERRED_VERSION_virtual/kernel ?= "3.0.34" -PREFERRED_VERSION_qemu = "1.4+fsl" +PREFERRED_VERSION_qemu = "1.7+fsl" KERNEL_IMAGETYPE ?= "uImage" # disable the images below for now diff --git a/meta-fsl-ppc/conf/machine/e6500.inc b/meta-fsl-ppc/conf/machine/e6500.inc index 2d8a859a..4401eb67 100644 --- a/meta-fsl-ppc/conf/machine/e6500.inc +++ b/meta-fsl-ppc/conf/machine/e6500.inc @@ -7,7 +7,7 @@ MACHINE_EXTRA_RRECOMMENDS = "u-boot udev-extraconf kernel-modules" PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" PREFERRED_VERSION_virtual/kernel ?= "3.0.34" -PREFERRED_VERSION_qemu = "1.4+fsl" +PREFERRED_VERSION_qemu = "1.7+fsl" KERNEL_IMAGETYPE ?= "uImage" # disable the images below for now diff --git a/meta-fsl-ppc/recipes-devtools/qemu/files/0001-doc-Fix-texinfo-table-markup-in-qemu-options.hx.patch b/meta-fsl-ppc/recipes-devtools/qemu/files/0001-doc-Fix-texinfo-table-markup-in-qemu-options.hx.patch deleted file mode 100644 index 30daf29f..00000000 --- a/meta-fsl-ppc/recipes-devtools/qemu/files/0001-doc-Fix-texinfo-table-markup-in-qemu-options.hx.patch +++ /dev/null @@ -1,201 +0,0 @@ -From 9a7146ca91c04d05af36684d8b3ca79c1254abc2 Mon Sep 17 00:00:00 2001 -From: Markus Armbruster -Date: Wed, 13 Feb 2013 19:49:40 +0100 -Subject: [PATCH 1/2] doc: Fix texinfo @table markup in qemu-options.hx - -End tables before headings, start new ones afterwards. Fixes -incorrect indentation of headings "File system options" and "Virtual -File system pass-through options" in manual page and qemu-doc. - -Normalize markup some to increase chances it survives future edits. - -Upstream-Status: Backport - -Signed-off-by: Martin Jansa -Signed-off-by: Markus Armbruster -Reviewed-by: Stefan Hajnoczi -Message-id: 1360781383-28635-5-git-send-email-armbru@redhat.com -Signed-off-by: Anthony Liguori ---- - qemu-options.hx | 56 +++++++++++++++++++++++++++++++++++++------------------- - 1 file changed, 37 insertions(+), 19 deletions(-) - -diff --git a/qemu-options.hx b/qemu-options.hx -index 9d7131a..54bd92a 100644 ---- a/qemu-options.hx -+++ b/qemu-options.hx -@@ -537,13 +537,15 @@ STEXI - @end table - ETEXI - --DEF("usb", 0, QEMU_OPTION_usb, -- "-usb enable the USB driver (will be the default soon)\n", -- QEMU_ARCH_ALL) - STEXI - USB options: - @table @option -+ETEXI - -+DEF("usb", 0, QEMU_OPTION_usb, -+ "-usb enable the USB driver (will be the default soon)\n", -+ QEMU_ARCH_ALL) -+STEXI - @item -usb - @findex -usb - Enable the USB driver (will be the default soon) -@@ -610,9 +612,15 @@ possible drivers and properties, use @code{-device help} and - @code{-device @var{driver},help}. - ETEXI - -+STEXI -+@end table -+ETEXI - DEFHEADING() - - DEFHEADING(File system options:) -+STEXI -+@table @option -+ETEXI - - DEF("fsdev", HAS_ARG, QEMU_OPTION_fsdev, - "-fsdev fsdriver,id=id[,path=path,][security_model={mapped-xattr|mapped-file|passthrough|none}]\n" -@@ -676,9 +684,15 @@ Specifies the tag name to be used by the guest to mount this export point - - ETEXI - -+STEXI -+@end table -+ETEXI - DEFHEADING() - - DEFHEADING(Virtual File system pass-through options:) -+STEXI -+@table @option -+ETEXI - - DEF("virtfs", HAS_ARG, QEMU_OPTION_virtfs, - "-virtfs local,path=path,mount_tag=tag,security_model=[mapped-xattr|mapped-file|passthrough|none]\n" -@@ -769,11 +783,9 @@ ETEXI - STEXI - @end table - ETEXI -- - DEFHEADING() - - DEFHEADING(Display options:) -- - STEXI - @table @option - ETEXI -@@ -1215,7 +1227,6 @@ ETEXI - STEXI - @end table - ETEXI -- - ARCHHEADING(, QEMU_ARCH_I386) - - ARCHHEADING(i386 target only:, QEMU_ARCH_I386) -@@ -1301,10 +1312,10 @@ Specify SMBIOS type 0 fields - Specify SMBIOS type 1 fields - ETEXI - --DEFHEADING() - STEXI - @end table - ETEXI -+DEFHEADING() - - DEFHEADING(Network options:) - STEXI -@@ -1718,13 +1729,19 @@ libpcap, so it can be analyzed with tools such as tcpdump or Wireshark. - Indicate that no network devices should be configured. It is used to - override the default configuration (@option{-net nic -net user}) which - is activated if no @option{-net} options are provided. -+ETEXI - -+STEXI - @end table - ETEXI -- - DEFHEADING() - - DEFHEADING(Character device options:) -+STEXI -+ -+The general form of a character device option is: -+@table @option -+ETEXI - - DEF("chardev", HAS_ARG, QEMU_OPTION_chardev, - "-chardev null,id=id[,mux=on|off]\n" -@@ -1766,10 +1783,6 @@ DEF("chardev", HAS_ARG, QEMU_OPTION_chardev, - ) - - STEXI -- --The general form of a character device option is: --@table @option -- - @item -chardev @var{backend} ,id=@var{id} [,mux=on|off] [,@var{options}] - @findex -chardev - Backend is one of: -@@ -1990,14 +2003,15 @@ Connect to a spice virtual machine channel, such as vdiport. - - Connect to a spice port, allowing a Spice client to handle the traffic - identified by a name (preferably a fqdn). -+ETEXI - -+STEXI - @end table - ETEXI -- - DEFHEADING() - --STEXI - DEFHEADING(Device URL Syntax:) -+STEXI - - In addition to using normal file images for the emulated storage devices, - QEMU can also use networked resources such as iSCSI devices. These are -@@ -2113,10 +2127,16 @@ qemu-system-x86_84 --drive file=gluster://192.0.2.1/testvol/a.img - @end example - - See also @url{http://www.gluster.org}. -+ETEXI -+ -+STEXI - @end table - ETEXI - - DEFHEADING(Bluetooth(R) options:) -+STEXI -+@table @option -+ETEXI - - DEF("bt", HAS_ARG, QEMU_OPTION_bt, \ - "-bt hci,null dumb bluetooth HCI - doesn't respond to commands\n" \ -@@ -2130,8 +2150,6 @@ DEF("bt", HAS_ARG, QEMU_OPTION_bt, \ - " emulate a bluetooth device 'dev' in scatternet 'n'\n", - QEMU_ARCH_ALL) - STEXI --@table @option -- - @item -bt hci[...] - @findex -bt - Defines the function of the corresponding Bluetooth HCI. -bt options -@@ -2183,9 +2201,11 @@ currently: - @item keyboard - Virtual wireless keyboard implementing the HIDP bluetooth profile. - @end table --@end table - ETEXI - -+STEXI -+@end table -+ETEXI - DEFHEADING() - - DEFHEADING(Linux/Multiboot boot specific:) --- -1.8.1.5 - diff --git a/meta-fsl-ppc/recipes-devtools/qemu/files/0002-docs-Fix-generating-qemu-doc.html-with-texinfo-5.patch b/meta-fsl-ppc/recipes-devtools/qemu/files/0002-docs-Fix-generating-qemu-doc.html-with-texinfo-5.patch deleted file mode 100644 index cabbf0ea..00000000 --- a/meta-fsl-ppc/recipes-devtools/qemu/files/0002-docs-Fix-generating-qemu-doc.html-with-texinfo-5.patch +++ /dev/null @@ -1,54 +0,0 @@ -From f983d4978e1c49ee936ad52bf2de0c531420f5f8 Mon Sep 17 00:00:00 2001 -From: Cole Robinson -Date: Wed, 20 Feb 2013 07:20:31 +0000 -Subject: [PATCH 2/2] docs: Fix generating qemu-doc.html with texinfo 5 - -LC_ALL=C makeinfo --no-headers --no-split --number-sections --html qemu-doc.texi -o qemu-doc.html -./qemu-options.texi:1521: unknown command `list' -./qemu-options.texi:1521: table requires an argument: the formatter for @item -./qemu-options.texi:1521: warning: @table has text but no @item - -Upstream-Status: Pending -http://patchwork.ozlabs.org/patch/222131/ - -CC: qemu-stable@nongnu.org -Signed-off-by: Cole Robinson -Signed-off-by: Martin Jansa -Reviewed-by: Markus Armbruster ---- - qemu-options.hx | 19 +++++++------------ - 1 file changed, 7 insertions(+), 12 deletions(-) - -diff --git a/qemu-options.hx b/qemu-options.hx -index 54bd92a..5d2d9b8 100644 ---- a/qemu-options.hx -+++ b/qemu-options.hx -@@ -2089,18 +2089,13 @@ QEMU supports using either local sheepdog devices or remote networked - devices. - - Syntax for specifying a sheepdog device --@table @list --``sheepdog:'' -- --``sheepdog::'' -- --``sheepdog::'' -- --``sheepdog:::'' -- --``sheepdog::::'' -- --``sheepdog::::'' -+@table @code -+@item sheepdog: -+@item sheepdog:: -+@item sheepdog:: -+@item sheepdog::: -+@item sheepdog:::: -+@item sheepdog:::: - @end table - - Example --- -1.8.1.5 - diff --git a/meta-fsl-ppc/recipes-devtools/qemu/files/add-gtk-options.patch b/meta-fsl-ppc/recipes-devtools/qemu/files/add-gtk-options.patch deleted file mode 100644 index d8522deb..00000000 --- a/meta-fsl-ppc/recipes-devtools/qemu/files/add-gtk-options.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/configure.old 2013-12-11 21:24:44.422276752 -0600 -+++ b/configure 2013-12-11 21:27:26.954335983 -0600 -@@ -897,6 +897,10 @@ - ;; - --enable-virtio-blk-data-plane) virtio_blk_data_plane="yes" - ;; -+ --disable-gtk) gtk="no" -+ ;; -+ --enable-gtk) gtk="yes" -+ ;; - *) echo "ERROR: unknown option $opt"; show_help="yes" - ;; - esac diff --git a/meta-fsl-ppc/recipes-devtools/qemu/files/add-libssh2-options.patch b/meta-fsl-ppc/recipes-devtools/qemu/files/add-libssh2-options.patch deleted file mode 100644 index 07b9350e..00000000 --- a/meta-fsl-ppc/recipes-devtools/qemu/files/add-libssh2-options.patch +++ /dev/null @@ -1,22 +0,0 @@ -Upstream-Status: Inappropriate [configuration] - -Freescale qemu configure do not include libssh2 options. -In order to configure pass , dummy libssh2 options is added to -freescale qemu configure - -Signed-off-by: Chunrong Guo - - ---- a/configure.old 2014-05-26 12:08:09.000000000 +0800 -+++ b/configure 2014-05-26 12:10:23.000000000 +0800 -@@ -897,6 +897,10 @@ - ;; - --enable-virtio-blk-data-plane) virtio_blk_data_plane="yes" - ;; -+ --disable-libssh2) libssh2="no" -+ ;; -+ --enable-libssh2) libssh2="yes" -+ ;; - --disable-gtk) gtk="no" - ;; - --enable-gtk) gtk="yes" diff --git a/meta-fsl-ppc/recipes-devtools/qemu/files/fdt_header.patch b/meta-fsl-ppc/recipes-devtools/qemu/files/fdt_header.patch deleted file mode 100644 index dccfe531..00000000 --- a/meta-fsl-ppc/recipes-devtools/qemu/files/fdt_header.patch +++ /dev/null @@ -1,39 +0,0 @@ -Upstream-Status: Pending - -qemu: define fdt types in libfdt_env.h from qemu - - * fixes - In file included from /home/oe/setup-scripts/build/tmp-angstrom_next-uclibc/sysroots/x86_64-linux/usr/include/libfdt.h:55:0, - from /home/oe/setup-scripts/build/tmp-angstrom_next-uclibc/work/x86_64-linux/qemu-native/1.4.0-r0/qemu-1.4.0/hw/arm/../../device_tree.c:28: - /home/oe/setup-scripts/build/tmp-angstrom_next-uclibc/sysroots/x86_64-linux/usr/include/fdt.h:58:2: error: unknown type name 'fdt32_t' - /home/oe/setup-scripts/build/tmp-angstrom_next-uclibc/sysroots/x86_64-linux/usr/include/fdt.h:59:2: error: unknown type name 'fdt32_t' - /home/oe/setup-scripts/build/tmp-angstrom_next-uclibc/sysroots/x86_64-linux/usr/include/fdt.h:60:2: error: unknown type name 'fdt32_t' - /home/oe/setup-scripts/build/tmp-angstrom_next-uclibc/sysroots/x86_64-linux/usr/include/fdt.h:61:2: error: unknown type name 'fdt32_t' - /home/oe/setup-scripts/build/tmp-angstrom_next-uclibc/sysroots/x86_64-linux/usr/include/fdt.h:62:2: error: unknown type name 'fdt32_t' - /home/oe/setup-scripts/build/tmp-angstrom_next-uclibc/sysroots/x86_64-linux/usr/include/fdt.h:63:2: error: unknown type name 'fdt32_t' - /home/oe/setup-scripts/build/tmp-angstrom_next-uclibc/sysroots/x86_64-linux/usr/include/fdt.h:64:2: error: unknown type name 'fdt32_t' - /home/oe/setup-scripts/build/tmp-angstrom_next-uclibc/sysroots/x86_64-linux/usr/include/fdt.h:67:2: error: unknown type name 'fdt32_t' - /home/oe/setup-scripts/build/tmp-angstrom_next-uclibc/sysroots/x86_64-linux/usr/include/fdt.h:70:2: error: unknown type name 'fdt32_t' - /home/oe/setup-scripts/build/tmp-angstrom_next-uclibc/sysroots/x86_64-linux/usr/include/fdt.h:73:2: error: unknown type name 'fdt32_t' - /home/oe/setup-scripts/build/tmp-angstrom_next-uclibc/sysroots/x86_64-linux/usr/include/fdt.h:77:2: error: unknown type name 'fdt64_t' - /home/oe/setup-scripts/build/tmp-angstrom_next-uclibc/sysroots/x86_64-linux/usr/include/fdt.h:78:2: error: unknown type name 'fdt64_t' - /home/oe/setup-scripts/build/tmp-angstrom_next-uclibc/sysroots/x86_64-linux/usr/include/fdt.h:82:2: error: unknown type name 'fdt32_t' - /home/oe/setup-scripts/build/tmp-angstrom_next-uclibc/sysroots/x86_64-linux/usr/include/fdt.h:87:2: error: unknown type name 'fdt32_t' - /home/oe/setup-scripts/build/tmp-angstrom_next-uclibc/sysroots/x86_64-linux/usr/include/fdt.h:88:2: error: unknown type name 'fdt32_t' - /home/oe/setup-scripts/build/tmp-angstrom_next-uclibc/sysroots/x86_64-linux/usr/include/fdt.h:89:2: error: unknown type name 'fdt32_t' - -Index: qemu-1.4.0/include/libfdt_env.h -=================================================================== ---- qemu-1.4.0.orig/include/libfdt_env.h 2013-02-15 23:05:35.000000000 +0000 -+++ qemu-1.4.0/include/libfdt_env.h 2013-04-13 14:17:27.918885225 +0000 -@@ -21,6 +21,10 @@ - - #include "qemu/bswap.h" - -+typedef uint16_t fdt16_t; -+typedef uint32_t fdt32_t; -+typedef uint64_t fdt64_t; -+ - #ifdef HOST_WORDS_BIGENDIAN - #define fdt32_to_cpu(x) (x) - #define cpu_to_fdt32(x) (x) diff --git a/meta-fsl-ppc/recipes-devtools/qemu/files/fix-libcap-header-issue-on-some-distro.patch b/meta-fsl-ppc/recipes-devtools/qemu/files/fix-libcap-header-issue-on-some-distro.patch deleted file mode 100644 index 13a6ea23..00000000 --- a/meta-fsl-ppc/recipes-devtools/qemu/files/fix-libcap-header-issue-on-some-distro.patch +++ /dev/null @@ -1,84 +0,0 @@ -fix libcap header issue on some distro - -1, When build qemu-native on SLED 11.2, there is an error: -... -| In file included from /usr/include/bits/sigcontext.h:28, -| from /usr/include/signal.h:339, -| from /buildarea2/tmp/work/i686-linux/qemu-native/1.4.0-r0/ -qemu-1.4.0/include/qemu-common.h:42, -| from fsdev/virtfs-proxy-helper.c:23: -| /usr/include/asm/sigcontext.h:28: error: expected specifier- -qualifier-list before '__u64' -| /usr/include/asm/sigcontext.h:191: error: expected specifier- -qualifier-list before '__u64' -... - -2, The virtfs-proxy-helper.c includes and -qemu-common.h in sequence. The header include map is: -(`-->' presents `include') -... -"virtfs-proxy-helper.c" --> -... -"virtfs-proxy-helper.c" --> "qemu-common.h" --> --> - --> --> --> - --> --> -... - -3, The bug is found on SLED 11.2 x86. In libcap header file -/usr/include/sys/capability.h, it does evil stuff like this: -... - 25 /* - 26 * Make sure we can be included from userland by preventing - 27 * capability.h from including other kernel headers - 28 */ - 29 #define _LINUX_TYPES_H - 30 #define _LINUX_FS_H - 31 #define __LINUX_COMPILER_H - 32 #define __user - 33 - 34 typedef unsigned int __u32; - 35 typedef __u32 __le32; -... -This completely prevents including /usr/include/linux/types.h. -The above ` --> ' is prevented, -and '__u64' is defined in . - -4, Modify virtfs-proxy-helper.c to include -last to workaround the issue. - -http://www.linuxtv.org/pipermail/vdr/2009-August/021194.html -http://patchwork.linuxtv.org/patch/12748/ - -Upstream-Status: Pending -Signed-off-by: Hongxu Jia ---- - fsdev/virtfs-proxy-helper.c | 7 +++++-- - 1 file changed, 5 insertions(+), 2 deletions(-) - -diff --git a/fsdev/virtfs-proxy-helper.c b/fsdev/virtfs-proxy-helper.c ---- a/fsdev/virtfs-proxy-helper.c -+++ b/fsdev/virtfs-proxy-helper.c -@@ -12,7 +12,6 @@ - #include - #include - #include --#include - #include - #include - #include -@@ -26,7 +25,11 @@ - #include "virtio-9p-marshal.h" - #include "hw/9pfs/virtio-9p-proxy.h" - #include "fsdev/virtio-9p-marshal.h" -- -+/* -+ * Include this one last due to some versions of it being buggy: -+ * http://www.linuxtv.org/pipermail/vdr/2009-August/021194.html -+ */ -+#include - #define PROGNAME "virtfs-proxy-helper" - - #ifndef XFS_SUPER_MAGIC --- -1.7.10.4 - diff --git a/meta-fsl-ppc/recipes-devtools/qemu/files/relocatable_sdk.patch b/meta-fsl-ppc/recipes-devtools/qemu/files/relocatable_sdk.patch deleted file mode 100644 index 774a49c7..00000000 --- a/meta-fsl-ppc/recipes-devtools/qemu/files/relocatable_sdk.patch +++ /dev/null @@ -1,34 +0,0 @@ -Upstream-Status: Inappropriate [SDK specific] - -In order to be able to change the dynamic loader path when relocating -binaries, the interp section has to be made big enough to accomodate -the new path (4096 is the maximum path length in Linux). - -Signed-off-by: Laurentiu Palcu - -Index: qemu-1.4.0/ldscripts/i386.ld -=================================================================== ---- qemu-1.4.0.orig/ldscripts/i386.ld 2013-02-15 15:05:35.000000000 -0800 -+++ qemu-1.4.0/ldscripts/i386.ld 2013-02-28 22:55:36.138816418 -0800 -@@ -8,7 +8,7 @@ - { - /* Read-only sections, merged into text segment: */ - . = 0x60000000 + SIZEOF_HEADERS; -- .interp : { *(.interp) } -+ .interp : { *(.interp); . = 0x1000; } - .hash : { *(.hash) } - .dynsym : { *(.dynsym) } - .dynstr : { *(.dynstr) } -Index: qemu-1.4.0/ldscripts/x86_64.ld -=================================================================== ---- qemu-1.4.0.orig/ldscripts/x86_64.ld 2013-02-15 15:05:35.000000000 -0800 -+++ qemu-1.4.0/ldscripts/x86_64.ld 2013-02-28 22:55:36.138816418 -0800 -@@ -6,7 +6,7 @@ - { - /* Read-only sections, merged into text segment: */ - . = 0x60000000 + SIZEOF_HEADERS; -- .interp : { *(.interp) } -+ .interp : { *(.interp); . = 0x1000; } - .hash : { *(.hash) } - .dynsym : { *(.dynsym) } - .dynstr : { *(.dynstr) } diff --git a/meta-fsl-ppc/recipes-devtools/qemu/qemu_fslgit.bb b/meta-fsl-ppc/recipes-devtools/qemu/qemu_fslgit.bb index eab3db5d..e76f350d 100644 --- a/meta-fsl-ppc/recipes-devtools/qemu/qemu_fslgit.bb +++ b/meta-fsl-ppc/recipes-devtools/qemu/qemu_fslgit.bb @@ -3,24 +3,16 @@ require recipes-devtools/qemu/qemu.inc LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \ file://COPYING.LIB;endline=24;md5=c04def7ae38850e7d3ef548588159913" -# This means v1.4 with FSL specific patches applied -PV = "1.4+fsl" +# This means QEMU v1.7 with FSL specific patches applied +PV = "1.7+fsl" SRC_URI = "git://git.freescale.com/ppc/sdk/qemu.git;nobranch=1" -SRCREV = "99231018edf75522aea2630e4089c9163566fb73" - -SRC_URI += " \ - file://0001-doc-Fix-texinfo-table-markup-in-qemu-options.hx.patch \ - file://0002-docs-Fix-generating-qemu-doc.html-with-texinfo-5.patch \ - file://fdt_header.patch \ - file://add-gtk-options.patch \ - file://add-libssh2-options.patch \ -" +SRCREV = "9e38e640275beabf6468a04cec5c403b2ac566ad" S = "${WORKDIR}/git" QEMU_TARGETS = "ppc" -PPC_OECONF = '${SDL} --cross-prefix=${TARGET_PREFIX} --disable-werror --disable-vnc --audio-drv-list="" --audio-card-list="" --disable-bluez --disable-curl' +PPC_OECONF = '${SDL} --cross-prefix=${TARGET_PREFIX} --disable-werror --disable-vnc --disable-bluez --disable-curl --enable-libusb' EXTRA_OECONF_e5500-64b = "--target-list=ppc64-softmmu ${PPC_OECONF}" EXTRA_OECONF_e6500-64b = "--target-list=ppc64-softmmu ${PPC_OECONF}" EXTRA_OECONF_e6500 = "--target-list=ppc64-softmmu ${PPC_OECONF}" -- cgit v1.2.3-54-g00ecf From ad18b996adf16e52142c7e48dbe7d5cacee62548 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Tue, 1 Jul 2014 08:48:56 -0500 Subject: qemu: Prevent QA warnings about /run Signed-off-by: Ting Liu --- meta-fsl-ppc/recipes-devtools/qemu/qemu_fslgit.bb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/meta-fsl-ppc/recipes-devtools/qemu/qemu_fslgit.bb b/meta-fsl-ppc/recipes-devtools/qemu/qemu_fslgit.bb index e76f350d..30f27d60 100644 --- a/meta-fsl-ppc/recipes-devtools/qemu/qemu_fslgit.bb +++ b/meta-fsl-ppc/recipes-devtools/qemu/qemu_fslgit.bb @@ -35,6 +35,8 @@ do_install_prepend() { do_install_append() { rm ${WORKDIR}/powerpc_rom.bin + # Prevent QA warnings about installed ${localstatedir}/run + if [ -d ${D}${localstatedir}/run ]; then rmdir ${D}${localstatedir}/run; fi } INSANE_SKIP_${PN} += "dev-deps" -- cgit v1.2.3-54-g00ecf From 42c28f6012548be9838d21e41be24994dc619fad Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Tue, 27 May 2014 00:56:34 -0500 Subject: hypervisor: use seperate folder for 32/64b output Signed-off-by: Ting Liu --- .../hypervisor/hypervisor_git.bb | 25 ++++++++++++---------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/meta-fsl-ppc/recipes-virtualization/hypervisor/hypervisor_git.bb b/meta-fsl-ppc/recipes-virtualization/hypervisor/hypervisor_git.bb index 318c9422..14aaedf3 100644 --- a/meta-fsl-ppc/recipes-virtualization/hypervisor/hypervisor_git.bb +++ b/meta-fsl-ppc/recipes-virtualization/hypervisor/hypervisor_git.bb @@ -9,8 +9,6 @@ DEPENDS = "u-boot-mkimage-native" inherit deploy -S = "${WORKDIR}/git" - # TODO: fix dtc to use the already built package SRC_URI = " \ git://git.freescale.com/ppc/sdk/hypervisor/hypervisor.git;name=hypervisor;nobranch=1 \ @@ -30,7 +28,12 @@ SRCREV_libos = "4691387e15be78d140142104f30b3f356281c46a" SRCREV_dtc = "033089f29099bdfd5c2d6986cdb9fd07b16cfde0" SRCREV_hypertrk = "975c98b562186afbd3bbf103ae54b96cf9b3e533" -EXTRA_OEMAKE = 'CROSS_COMPILE=${TARGET_PREFIX} CC="${TARGET_PREFIX}gcc ${TOOLCHAIN_OPTIONS}"' +S = "${WORKDIR}/git" + +OUTPUT ?= "output32" +OUTPUT_powerpc64 = "output64" + +EXTRA_OEMAKE = 'CROSS_COMPILE=${TARGET_PREFIX} CC="${TARGET_PREFIX}gcc ${TOOLCHAIN_OPTIONS}" O="${OUTPUT}"' DEFCONFIG = "defconfig" DEFCONFIG_powerpc64 = "64bit_defconfig" @@ -60,29 +63,29 @@ do_compile () { do_install () { install -d ${D}/${bindir} - install ${S}/output/bin/linux/partman ${D}/${bindir}/partman + install ${B}/${OUTPUT}/bin/linux/partman ${D}/${bindir}/partman install -d ${D}${sysconfdir}/udev/rules.d install -m 0644 ${WORKDIR}/81-fsl-embedded-hv.rules ${D}${sysconfdir}/udev/rules.d install -d ${D}/boot/hv - install ${S}/output/.config ${D}/boot/hv/hypervisor.config - install -m 644 ${S}/output/bin/hv ${S}/output/bin/hv.map \ - ${S}/output/bin/hv.uImage ${S}/output/bin/hv.bin \ + install ${B}/${OUTPUT}/.config ${D}/boot/hv/hypervisor.config + install -m 644 ${B}/${OUTPUT}/bin/hv ${B}/${OUTPUT}/bin/hv.map \ + ${B}/${OUTPUT}/bin/hv.uImage ${B}/${OUTPUT}/bin/hv.bin \ ${D}/boot/hv/ } do_deploy () { install -d ${DEPLOYDIR}/hv/ - install ${S}/output/.config ${DEPLOYDIR}/hv/hypervisor.config - install -m 644 ${S}/output/bin/hv ${S}/output/bin/hv.map \ - ${S}/output/bin/hv.uImage ${S}/output/bin/hv.bin \ + install ${B}/${OUTPUT}/.config ${DEPLOYDIR}/hv/hypervisor.config + install -m 644 ${B}/${OUTPUT}/bin/hv ${B}/${OUTPUT}/bin/hv.map \ + ${B}/${OUTPUT}/bin/hv.uImage ${B}/${OUTPUT}/bin/hv.bin \ ${DEPLOYDIR}/hv/ } addtask deploy before do_build after do_install do_deploy_append() { - rm -f ${S}/../hv + rm -f ${B}/../hv } INHIBIT_PACKAGE_DEBUG_SPLIT = "1" -- cgit v1.2.3-54-g00ecf From ef3eea28c4973d35cd7edae935b245c001e5bd18 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Sat, 14 Jun 2014 11:55:54 +0800 Subject: hypervisor: update to v1.3-009 release v1.3-009 bug fixes and changes -introducing "fast tlb1 feature" - the performance of TLB1 emulation is significantly improved by implementing a shorter code path for non-IPROT TLB1 entries. This is particularly useful for guests making heavy use of tlb1, for example when using indirect tlb1 entries. The feature is controlled by a Kconfig option and is enabled by default. -EPCR[DGTMI] (disable guest tlb management instructions) is now dynamically controlled -workaround A-006958 time-base erratum -workaround A-007907 l1 stash on e6500 erratum -workaround A-008007 t1040 pvr erratum -workaround A-00598 pamu erratum -workaround t1040 uart fifo erratum -other misc fixes Signed-off-by: Ting Liu --- meta-fsl-ppc/recipes-virtualization/hypervisor/hypervisor_git.bb | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/meta-fsl-ppc/recipes-virtualization/hypervisor/hypervisor_git.bb b/meta-fsl-ppc/recipes-virtualization/hypervisor/hypervisor_git.bb index 14aaedf3..2fc2f25e 100644 --- a/meta-fsl-ppc/recipes-virtualization/hypervisor/hypervisor_git.bb +++ b/meta-fsl-ppc/recipes-virtualization/hypervisor/hypervisor_git.bb @@ -20,12 +20,10 @@ SRC_URI = " \ " SRCREV_FORMAT="hypervisor" -SRCREV = "acbde15272d46a80bcf4a00d7d18ca4a86e49c16" -SRCREV_t2080qds = "2a430ebaa59841fdb49c0c87f8766cc2ef99123b" -SRCREV_t2080qds-64b = "2a430ebaa59841fdb49c0c87f8766cc2ef99123b" +SRCREV = "175984b6f07d9b407efc10b781cf6a05c2f3a24f" SRCREV_kconfig = "a56025d4da992b856796b0eccac2e410d751dbac" -SRCREV_libos = "4691387e15be78d140142104f30b3f356281c46a" -SRCREV_dtc = "033089f29099bdfd5c2d6986cdb9fd07b16cfde0" +SRCREV_libos = "99b4fb59192412ddbad27196fd5617e61cff895d" +SRCREV_dtc = "a6d55e039fd22048687fe061b4609e2807efe764" SRCREV_hypertrk = "975c98b562186afbd3bbf103ae54b96cf9b3e533" S = "${WORKDIR}/git" -- cgit v1.2.3-54-g00ecf From 08f46cc537ed8b53522643cd998b06b95ae9e154 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Tue, 1 Jul 2014 05:05:45 -0500 Subject: hypervisor: skip already-stripped check partman binary was set to be stripped in source code Signed-off-by: Ting Liu --- meta-fsl-ppc/recipes-virtualization/hypervisor/hypervisor_git.bb | 1 + 1 file changed, 1 insertion(+) diff --git a/meta-fsl-ppc/recipes-virtualization/hypervisor/hypervisor_git.bb b/meta-fsl-ppc/recipes-virtualization/hypervisor/hypervisor_git.bb index 2fc2f25e..4add9f30 100644 --- a/meta-fsl-ppc/recipes-virtualization/hypervisor/hypervisor_git.bb +++ b/meta-fsl-ppc/recipes-virtualization/hypervisor/hypervisor_git.bb @@ -86,6 +86,7 @@ do_deploy_append() { rm -f ${B}/../hv } +INSANE_SKIP_${PN} = 'already-stripped' INHIBIT_PACKAGE_DEBUG_SPLIT = "1" ALLOW_EMPTY_${PN} = "1" PACKAGES_prepend = "${PN}-image ${PN}-partman " -- cgit v1.2.3-54-g00ecf From a46967bbced1c5bac8657f213b6f68c8403eea99 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Sat, 14 Jun 2014 11:40:06 +0800 Subject: qoriq-debug: update to sdk v1.6 release Changes: Corrected char buffer overrun error Added suport for Linux kernel 3.12 Corrected memory map for QMAN and BMAN for T4/B4 Added Device Config support for Gen 1 processors. Support for additional T4240rev2 and B4860rev2 debug components Signed-off-by: Ting Liu --- meta-fsl-ppc/recipes-kernel/qoriq-debug/qoriq-debug_git.bb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/meta-fsl-ppc/recipes-kernel/qoriq-debug/qoriq-debug_git.bb b/meta-fsl-ppc/recipes-kernel/qoriq-debug/qoriq-debug_git.bb index 5b0256f4..65caa502 100644 --- a/meta-fsl-ppc/recipes-kernel/qoriq-debug/qoriq-debug_git.bb +++ b/meta-fsl-ppc/recipes-kernel/qoriq-debug/qoriq-debug_git.bb @@ -5,9 +5,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=e29234dd5d40dc352cc60cc0c93437ba" inherit module autotools -SRCBRANCH = "sdk-v1.4.x" -SRC_URI = "git://git.freescale.com/ppc/sdk/qoriq-debug.git;branch=${SRCBRANCH}" -SRCREV = "08de2902af9a79ba9e436a284b8d7754b351f608" +SRC_URI = "git://git.freescale.com/ppc/sdk/qoriq-debug.git;nobranch=1" +SRCREV = "20615c1ea332102635f8314cee5787c48c1a4254" S = "${WORKDIR}/git" -- cgit v1.2.3-54-g00ecf From 07956d3435cd654dbe5882dd8b2405dd8bc34eaa Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Tue, 1 Jul 2014 09:40:14 -0500 Subject: qoriq-debug: use autotools-brokensep Currently it does not support S!=B build, workaround it now Signed-off-by: Ting Liu --- meta-fsl-ppc/recipes-kernel/qoriq-debug/qoriq-debug_git.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-fsl-ppc/recipes-kernel/qoriq-debug/qoriq-debug_git.bb b/meta-fsl-ppc/recipes-kernel/qoriq-debug/qoriq-debug_git.bb index 65caa502..5dd2468d 100644 --- a/meta-fsl-ppc/recipes-kernel/qoriq-debug/qoriq-debug_git.bb +++ b/meta-fsl-ppc/recipes-kernel/qoriq-debug/qoriq-debug_git.bb @@ -3,7 +3,7 @@ SECTION = "qoriq-debug" LICENSE = "GPLv2+" LIC_FILES_CHKSUM = "file://COPYING;md5=e29234dd5d40dc352cc60cc0c93437ba" -inherit module autotools +inherit module autotools-brokensep SRC_URI = "git://git.freescale.com/ppc/sdk/qoriq-debug.git;nobranch=1" SRCREV = "20615c1ea332102635f8314cee5787c48c1a4254" -- cgit v1.2.3-54-g00ecf From 3c9103d680185772f6c429031a5fb31d959e56ae Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Sat, 14 Jun 2014 11:57:16 +0800 Subject: hv-cfg: update to sdk v1.6 release changes: t1040: move hv pma lower t1040: assign scfg node to part1 e6500: Enable direct guest tlb management for several chips Revert "b4rev2: Disable direct guest tlb management" Revert "t4rev2: Disable direct guest tlb management" t4240rdb: Add missing ports t2080rdb: initial hv-2p scenario t4240rdb: update pci nodes to match the rcw t4240qds: add missing "dce" and "rman" devices t4240rdb: add missing "dce" and "rman" devices t4240rdb: initial hv-2p scenario pme : add missing device nodes Add several experimental hv config files p5020ds: initial hv-2p scenario t1040rdb: initial hv-2p scenario t1040qds: initial hv-2p scenario t2080qds: Add two more ports in the first partition t2080qds: add a few missing devices t2080qds: Renamed hv-cfg folder to match the proper rcw t2080qds: Add DPAA ports t2080qds: initial hv-2p scenario Signed-off-by: Ting Liu --- meta-fsl-ppc/recipes-virtualization/hv-cfg/hv-cfg_git.bb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/meta-fsl-ppc/recipes-virtualization/hv-cfg/hv-cfg_git.bb b/meta-fsl-ppc/recipes-virtualization/hv-cfg/hv-cfg_git.bb index a9135247..304b78f8 100644 --- a/meta-fsl-ppc/recipes-virtualization/hv-cfg/hv-cfg_git.bb +++ b/meta-fsl-ppc/recipes-virtualization/hv-cfg/hv-cfg_git.bb @@ -19,9 +19,7 @@ PACKAGE_ARCH = "${MACHINE_ARCH}" inherit deploy SRC_URI = "git://git.freescale.com/ppc/sdk/hv-cfg.git;nobranch=1" -SRCREV = "39f1e585e0a70634e009b2e720407b27f787ace1" -SRCREV_t2080qds = "46065e277a853ca3fa80040d3b00d7582b619a47" -SRCREV_t2080qds-64b = "46065e277a853ca3fa80040d3b00d7582b619a47" +SRCREV = "f79080739851b3a3dfcd435f2ef1572459a4313c" S = "${WORKDIR}/git" -- cgit v1.2.3-54-g00ecf From 6215a6f806f14ce2d14e1a850188887cb7ee3747 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Sat, 14 Jun 2014 12:06:26 +0800 Subject: flib: update to sdk v1.6 release changes: fix ZUC-E + SNOW f9 decapsulation fix PDCP Control Plane AES-CTR + SNOW f9 decapsulation WiMAX: wait to update the header on encap era4 WiMAX: invalidate prefetch buffer on encap (era5+) fix invalid offset in PDCP MOVE commands fix RLC PDB comment fix WiFi for SEC ERA > 5 remove nonsensical comment for MBMS descriptor creation function fix RLC encap descriptor add WCDMA RLC protocol descriptors MBMS processing should be done only on devices with SEC ERA >= 5 MOVE - fix (#2) support for selecting offset in MATH Regs using AUX field MOVE - fix support for selecting offset in MATH Regs using AUX field fix MBMS statistics writeback add MBMS statistics retrieval function fix PATCH_RAW and PATCH_RAW_NON_LOCAL beautify MBMS descriptor creation functions add PATCH_RAW and PATCH_RAW_NON_LOCAL support fix IFB in MBMS Type 1 & 3 descriptors remove compiler warnings from descriptors remove compiler warnings from RTA library core add MBMS SYNC protocol processing support SEQ IN PTR - don't generate pointer field when SOP is used fix PDCP Control Plane AES-CTR + SNOW f9 decapsulation for SEC ERA >=6 PROTOCOL - add ODF and DFV HMO bits for IPsec protocol fix PDCP Control Plane with ZUC encryption & NULL integrity Job descriptor - fix usage of Make Trusted Descriptor (MTD) enable SEC Era 6 support Extended job descriptor - add support for FTD bit add JUMP_INC and JUMP_DEC commands MOVE - add support for selecting offset in MATH Regs using AUX field SEQFIFOLOAD - add support for AIDF bit SEQKEY - add support for VLF and AIDF bits WAITCOMP is a MOVE-specific flag, not a generic flag LOAD - fix length mask for the case when dst is DCTRL SEQ OUT PTR - add support for RST and EWS bits Job descriptor - do not allow TD and MTD options in the same time Job descriptor - add support for Extended Header - JOB_HDR_EXT refactoring - add __rta_out* for writing in the descriptor buffer LOAD command fix - always return the insertion offset in the desc buffer add defines needed for Linux kernel integration add helper macros for finding out descriptor length move platform dependencies to compat.h whitespace fixes add Class Context src/dst for the LOAD/STORE commands add defines for SEC commands rename MATH src/dst PROT to MATH DPOVRD add support for RNG4 bits PS, AI rename FIFOLD_TYPE_DFIFO to FIFOLD_TYPE_NOINFOFIFO rename LD/ST DECO descriptor buffers src/dst sync pdb.h with Linux kernel counterpart prepare sync of pdb.h with Linux kernel counterpart fix test_load DXLT golden pattern Update RSA descriptors add DES-CBC/3DES-CBC & AES-XCBC-MAC-96 IPsec descriptors add TLS family descriptor for cipher block suites add RSA protocol descriptors fix AES-CTR + SNOW f9 decapsulation Signed-off-by: Ting Liu --- meta-fsl-ppc/recipes-dpaa/flib/flib_git.bb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/meta-fsl-ppc/recipes-dpaa/flib/flib_git.bb b/meta-fsl-ppc/recipes-dpaa/flib/flib_git.bb index 3f259997..56737180 100644 --- a/meta-fsl-ppc/recipes-dpaa/flib/flib_git.bb +++ b/meta-fsl-ppc/recipes-dpaa/flib/flib_git.bb @@ -4,9 +4,7 @@ LICENSE = "BSD & GPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=3f16fa8e677e45af3127c5c4bafc3c00" SRC_URI = "git://git.freescale.com/ppc/sdk/flib.git;nobranch=1" -SRCREV = "bb6162efa0767fc515c87a51191a9edba4750426" -SRCREV_t2080qds = "64a3233ae426f36119268381c62100b02f7fe7e1" -SRCREV_t2080qds-64b = "64a3233ae426f36119268381c62100b02f7fe7e1" +SRCREV = "6918b5d4ff24a5e7ab4803c849570d45f359a8d7" S = "${WORKDIR}/git" -- cgit v1.2.3-54-g00ecf From 4281355bb5d9295fb094bfff0e2299de6b04f156 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Sat, 14 Jun 2014 12:13:44 +0800 Subject: boot-format: update to sdk v1.6 release changes: p2020rdb: Add L2/SRAM boot support powerpc: update dat files to take care 768KB u-boot Signed-off-by: Ting Liu --- meta-fsl-ppc/recipes-bsp/boot-format/boot-format_git.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-fsl-ppc/recipes-bsp/boot-format/boot-format_git.bb b/meta-fsl-ppc/recipes-bsp/boot-format/boot-format_git.bb index 5e1719b4..eb7c6de8 100644 --- a/meta-fsl-ppc/recipes-bsp/boot-format/boot-format_git.bb +++ b/meta-fsl-ppc/recipes-bsp/boot-format/boot-format_git.bb @@ -4,7 +4,7 @@ PR = "r6" LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" SRC_URI = "git://git.freescale.com/ppc/sdk/boot-format.git;nobranch=1" -SRCREV = "3d5f5ae1461eb14927a89eea12a841983e151ec7" +SRCREV = "4eb81a6797ef4e58bf7d9b2d58afb37a21c1f550" S = "${WORKDIR}/git" EXTRA_OEMAKE = 'CC="${CC}"' -- cgit v1.2.3-54-g00ecf From 7de845357d205fa4db7105f99a42bd5b554930bf Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Sat, 14 Jun 2014 12:16:45 +0800 Subject: cst: update to sdk v1.6 release changes: KEY_SELECT removed from input file for u-boot -LS1 Input files added for LS1 (group 5) Added proper address of u-boot for u-boot header LS1021: unisign fixed for group5 code clean up code cleanup Added sample input file for legacy boot feature in dir: input_files/legacy_cfsign/ Added legacy boot feature code clean up Entry point and address changed for increased U-boot Size add support for SDHC in CSF(ESBC) Header input files modified for c29x Signed-off-by: Ting Liu --- meta-fsl-ppc/recipes-extended/cst/cst_git.bb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/meta-fsl-ppc/recipes-extended/cst/cst_git.bb b/meta-fsl-ppc/recipes-extended/cst/cst_git.bb index a9d41ac9..0ec883b2 100644 --- a/meta-fsl-ppc/recipes-extended/cst/cst_git.bb +++ b/meta-fsl-ppc/recipes-extended/cst/cst_git.bb @@ -8,9 +8,7 @@ LIC_FILES_CHKSUM = "file://RELEASENOTES;beginline=8;endline=43;md5=5a7b22a2c96b5 DEPENDS += "openssl" SRC_URI = "git://git.freescale.com/ppc/sdk/cst.git;nobranch=1" -SRCREV = "55223ed64404ee57c55416017a8d65b28314282e" -SRCREV_t2080qds = "fd8f47ed97bc9a878a203e77ca74b2b8eda86a66" -SRCREV_t2080qds-64b = "fd8f47ed97bc9a878a203e77ca74b2b8eda86a66" +SRCREV = "321b798b84cb5fe6564dfb233dea046e779d6f74" S = "${WORKDIR}/git" -- cgit v1.2.3-54-g00ecf From 74a3f697bb91dbbfe6958ee1c33d067a2e000b79 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Sat, 14 Jun 2014 11:37:54 +0800 Subject: web-sysmon: update to sdk v1.6 release changes: Add T4240QDS case, monitor.conf is an example based on T4240QDS Add power consumption monitoring support Adjust monitoring duration: 20mins->10mins, 4hours->1hour Update copyright Update refresh rate as every 10 senconds Disable error logging for lighttpd Signed-off-by: Ting Liu --- meta-fsl-ppc/recipes-extended/web-sysmon/web-sysmon_git.bb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/meta-fsl-ppc/recipes-extended/web-sysmon/web-sysmon_git.bb b/meta-fsl-ppc/recipes-extended/web-sysmon/web-sysmon_git.bb index d9df8e43..506c0e10 100644 --- a/meta-fsl-ppc/recipes-extended/web-sysmon/web-sysmon_git.bb +++ b/meta-fsl-ppc/recipes-extended/web-sysmon/web-sysmon_git.bb @@ -3,9 +3,8 @@ SECTION = "web-sysmon" LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e" -SRCBRANCH = "sdk-v1.4.x" -SRC_URI = "git://git.freescale.com/ppc/sdk/web-sysmon.git;branch=${SRCBRANCH}" -SRCREV = "40b47611378ef5c07d98f0f691bb146ae52dcdc1" +SRC_URI = "git://git.freescale.com/ppc/sdk/web-sysmon-dev.git;nobranch=1" +SRCREV = "d8fafc6f223054a4129d5623e89d3dcf42ac8147" S = "${WORKDIR}/git" -- cgit v1.2.3-54-g00ecf From 619e8de0bf9d7943aa28d41e45a2a46d8bcfcfc5 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Sat, 14 Jun 2014 12:25:46 +0800 Subject: ceetm: add recipe for sdk v1.6 release Signed-off-by: Ting Liu --- meta-fsl-ppc/recipes-kernel/ceetm/ceetm_git.bb | 44 ++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 meta-fsl-ppc/recipes-kernel/ceetm/ceetm_git.bb diff --git a/meta-fsl-ppc/recipes-kernel/ceetm/ceetm_git.bb b/meta-fsl-ppc/recipes-kernel/ceetm/ceetm_git.bb new file mode 100644 index 00000000..7620cdbc --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/ceetm/ceetm_git.bb @@ -0,0 +1,44 @@ +DESCRIPTION = "CEETM TC QDISC" +LICENSE = "GPLv2 & BSD" +LIC_FILES_CHKSUM = "file://COPYING;md5=b5881ecf398da8a03a3f4c501e29d287" + +DEPENDS="virtual/kernel" + +inherit module + +SRC_URI = "git://git.freescale.com/ppc/sdk/ceetm.git;nobranch=1" +SRCREV = "ecf55c9ca0cd42a212653e1f99c19cd611e3a008" + +S = "${WORKDIR}/git" + +EXTRA_OEMAKE = "CROSS_COMPILE=${TARGET_PREFIX} SYSROOT=${STAGING_DIR_TARGET}" +export KERNEL_PATH = "${STAGING_KERNEL_DIR}" + +python () { + ma = d.getVar("DISTRO_FEATURES", True) + arch = d.getVar("OVERRIDES", True) + + # the : after the arch is to skip the message on 64b + if not "multiarch" in ma and "e6500:" in arch: + raise bb.parse.SkipPackage("Building the kernel for this arch requires multiarch to be in DISTRO_FEATURES") + + promote_kernel = d.getVar('BUILD_64BIT_KERNEL') + + if promote_kernel == "1": + d.setVar('KERNEL_CC_append', ' -m64') + d.setVar('KERNEL_LD_append', ' -melf64ppc') + + error_qa = d.getVar('ERROR_QA', True) + if 'arch' in error_qa: + d.setVar('ERROR_QA', error_qa.replace(' arch', '')) +} + +do_install(){ + mkdir -p ${D}/usr/driver/ceetm + mkdir -p ${D}/${libdir}/tc + cp ${S}/bin/ceetm.ko ${D}/usr/driver/ceetm + cp ${S}/bin/q_ceetm.so ${D}/${libdir}/tc/. +} + +FILES_${PN} += "/usr/driver/ceetm ${libdir}/tc" +INHIBIT_PACKAGE_STRIP = "1" -- cgit v1.2.3-54-g00ecf From da827a544a72a4459c8ee022bf55992c357c5493 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Sat, 14 Jun 2014 12:56:41 +0800 Subject: uio-seville: add recipe for sdk v1.6 Signed-off-by: Ting Liu --- meta-fsl-ppc/recipes-kernel/uio-seville/uio-seville_0.1.bb | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 meta-fsl-ppc/recipes-kernel/uio-seville/uio-seville_0.1.bb diff --git a/meta-fsl-ppc/recipes-kernel/uio-seville/uio-seville_0.1.bb b/meta-fsl-ppc/recipes-kernel/uio-seville/uio-seville_0.1.bb new file mode 100755 index 00000000..0307a6dd --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/uio-seville/uio-seville_0.1.bb @@ -0,0 +1,12 @@ +DESCRIPTION = "UIO driver for T1040 L2 Switch" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e" + +SRC_URI = "git://git.freescale.com/ppc/sdk/l2switch-uio.git" +SRCREV = "1077880ff3557d44dc5dd9fe5e2f4ee1474fb25f" + +inherit module + +S = "${WORKDIR}/git/uio-driver" + +COMPATIBLE_MACHINE = "(t1040qds|t1040rdb|t1040rdb-64b)" -- cgit v1.2.3-54-g00ecf From 0a281bbb079a5c88fe04cbaae91c9814ee4f3df1 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Sat, 14 Jun 2014 12:20:41 +0800 Subject: apptrk: add recipe for sdk v1.6 release Signed-off-by: Ting Liu --- meta-fsl-ppc/recipes-bsp/apptrk/apptrk_git.bb | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 meta-fsl-ppc/recipes-bsp/apptrk/apptrk_git.bb diff --git a/meta-fsl-ppc/recipes-bsp/apptrk/apptrk_git.bb b/meta-fsl-ppc/recipes-bsp/apptrk/apptrk_git.bb new file mode 100644 index 00000000..09d5de59 --- /dev/null +++ b/meta-fsl-ppc/recipes-bsp/apptrk/apptrk_git.bb @@ -0,0 +1,20 @@ +DESCRIPTION = "Userspace debug agent for PA CodeWarrior" +LICENSE = "Freescale-EULA" +LIC_FILES_CHKSUM = "file://COPYING;md5=95560debfde180684364319811cc1421" + +DEPENDS = "elfutils" + +SRC_URI = "git://git.freescale.com/ppc/sdk/apptrk.git;nobranch=1" +SRCREV = "cbed10997c5e2a4aaa004fb0e1efec858bf1bbe1" + +S = "${WORKDIR}/git" + +CFLAGS += " -I${STAGING_INCDIR} -ISource/Linux -ISource/Portable \ + -ISource/Linux_PA -ISource/PA -DPPC \ +" +CFLAGS_append_powerpc64 = " -DENABLE_64BIT_SUPPORT" + +do_install() { + install -d ${D}/usr/bin + oe_runmake install DESTDIR=${D} +} -- cgit v1.2.3-54-g00ecf From 4edef803fbd945c6180fd739ef68b3ba34015f3a Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Sat, 14 Jun 2014 14:40:50 +0800 Subject: qe-ucode: add recipe for sdk v1.6 Signed-off-by: Zhenhua Luo --- meta-fsl-ppc/recipes-bsp/qe-ucode/qe-ucode_git.bb | 38 +++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 meta-fsl-ppc/recipes-bsp/qe-ucode/qe-ucode_git.bb diff --git a/meta-fsl-ppc/recipes-bsp/qe-ucode/qe-ucode_git.bb b/meta-fsl-ppc/recipes-bsp/qe-ucode/qe-ucode_git.bb new file mode 100644 index 00000000..71897dc9 --- /dev/null +++ b/meta-fsl-ppc/recipes-bsp/qe-ucode/qe-ucode_git.bb @@ -0,0 +1,38 @@ +DESCRIPTION = "qe microcode binary" +SECTION = "qe-ucode" +LICENSE = "Freescale-EULA" +LIC_FILES_CHKSUM = "file://EULA;md5=60037ccba533a5995e8d1a838d85799c" + +inherit deploy + +SRC_URI = "git://git.freescale.com/ppc/sdk/qe-ucode.git;nobranch=1" +SRCREV= "10bef345397ba303cca0e900ec1acc09cf05928e" + +S = "${WORKDIR}/git" + +do_install () { + case ${MACHINE} in + p1025rdb|p1021rdb|p1025twr) QE_UCODE="fsl_qe_ucode_1021_10_A.bin";; + t1040rdb|t1040rdb-64b) QE_UCODE="iram_Type_A_T1040_r1.0.bin";; + *) QE_UCODE="";; + esac + install -d ${D}/ + install -m 644 ${QE_UCODE} ${D}/ +} + +do_deploy () { + case ${MACHINE} in + p1025rdb|p1021rdb|p1025twr) QE_UCODE="fsl_qe_ucode_1021_10_A.bin";; + t1040rdb|t1040rdb-64b) QE_UCODE="iram_Type_A_T1040_r1.0.bin";; + *) QE_UCODE="";; + esac + install -d ${DEPLOYDIR}/ + install -m 644 ${QE_UCODE} ${DEPLOYDIR}/ +} +addtask deploy before do_build after do_install + +PACKAGES += "${PN}-image" +FILES_${PN}-image += "/*" +ALLOW_EMPTY_${PN} = "1" +COMPATIBLE_MACHINE = "(p1025rdb|p1021rdb|p1025twr|t1040rdb|t1040rdb-64b)" + -- cgit v1.2.3-54-g00ecf From 7f1929057d384e883ac2a68d1074dc0f98c1e0f1 Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Sat, 14 Jun 2014 14:34:33 +0800 Subject: asf: update to sdk v1.6 release changes: ASFIPSEC: Fix for IPV6 crash dump when L2blob is not resolved. ASFIPSEC: Patch to fix P1010/P9131 IPSEC. ASF: Fix - Reassembly cleanCB not getting called. ASF: Giving fragmented non TCP/UDP/AH/ESP packet back to linux. ASFIPSEC:Patch to Fix ICV error in IPv6 case. asf: handle memory leak due to software buffer counter. AH-SHA1 does not work with ASF fmc scripts : 48G fmc config file for T4240RDB ASFIPSEC: Patch to fix crash when IPSEC traffic is initiated. Patch to fix klocwork issues Crash during ping6 test for varied sizes across the tunnel. FMC : Adding new config file to support 22G ports for T2080QDS ASF : Porting ASF to kernel 3.13 asf_ipsec: Patch to fix the MD5 issue. ASF: Memory leaks observed. asf_ipsec: Patch to fix the issue in AH for 64 bits. ASF_IPSEC:Same SA is getting added twice under stress traffic ASF_IPSEC:Multiple times of Addition and deletion of SPD and SAs causing linkage problem. ASF_IPEC: Unable to delete SPD from ASF. ASF-IPSEC:SA flush with traffic through the DUT causing crash. ipsec_scripts: Patch to add scripts for all algorithmic combinations for IPsec. asf_ipfrag: Patch to fix the issue of crash on P5040RDB. ASF : Patch to decrement software buffer pool counter when packet send to linux. ASFCTRL : Patch to reflect back the changes made in linux to netdev_notifier_info_to_dev() of asfctrl. ASF : update CONFIG_FSL_DPAA_TX_RECYCLE to CONFIG_FMAN_T4240 asf_ipsec: Patch to fix the compilation error. asf_qos: Patch to fix the compilation error in asf_qos. ASFIPSEC: Integeration with DPAA eth SG driver asf_proc: Patch to update the procfs code. ASFIPSEC : Large size self-generated ping packet crash resolved. ASF: Patch to fix traffic halt issue in IPSEC fragmentation case. ASFIPSEC: Patch to fix the crash seen while deleting SA. ASFCTRL: Patch to check for loopback packet and do not offload it. ASFIPSEC: invalidate magic number while offloading policy in asfctrl_xfrm_enc_hook ASFIPSEC: Patch to fix IPSEC fragmented traffic issues. MODULE_LICENSE is changed to dual(BSD/GPL) ASF: FMC: Adding 1G port entries for T4240QDS boards. ASF: Defining flag in ASF for FSL_DPAA_TX_RECYCLE framework ASF: Adding debug module to create a loopback framawork on DPAA platform ASF:FMC: Extra line is removed from the file. Removing make error when ASF is disabled in Kernel Signed-off-by: Zhenhua Luo --- meta-fsl-ppc/recipes-kernel/asf/asf_git.bb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/meta-fsl-ppc/recipes-kernel/asf/asf_git.bb b/meta-fsl-ppc/recipes-kernel/asf/asf_git.bb index c9948eeb..743ce62e 100644 --- a/meta-fsl-ppc/recipes-kernel/asf/asf_git.bb +++ b/meta-fsl-ppc/recipes-kernel/asf/asf_git.bb @@ -4,9 +4,7 @@ LICENSE = "GPLv2 & GPLv2+ & BSD" LIC_FILES_CHKSUM = "file://COPYING;md5=b5881ecf398da8a03a3f4c501e29d287" SRC_URI = "git://git.freescale.com/ppc/sdk/asf.git;nobranch=1" -SRCREV = "c262d7701af325b50cae54279a021ae7b5081e24" -SRCREV_t2080qds = "6af9df06e2747bdee91c21d1626b5b53b97849c5" -SRCREV_t2080qds-64b = "6af9df06e2747bdee91c21d1626b5b53b97849c5" +SRCREV = "f107bc7dac7fe74d765dc09f66dca84951921d2c" DEPENDS="virtual/kernel" RDEPENDS_${PN} += "ipsec-tools" -- cgit v1.2.3-54-g00ecf From 76c363ab2c2491c8f706a01ceaa2213a1910bf29 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Sat, 14 Jun 2014 13:14:06 +0800 Subject: cs4315-firmware: add recipe for sdk v1.6 Signed-off-by: Ting Liu --- .../cs4315-firmware/cs4315-firmware_git.bb | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 meta-fsl-ppc/recipes-bsp/cs4315-firmware/cs4315-firmware_git.bb diff --git a/meta-fsl-ppc/recipes-bsp/cs4315-firmware/cs4315-firmware_git.bb b/meta-fsl-ppc/recipes-bsp/cs4315-firmware/cs4315-firmware_git.bb new file mode 100644 index 00000000..153e8f85 --- /dev/null +++ b/meta-fsl-ppc/recipes-bsp/cs4315-firmware/cs4315-firmware_git.bb @@ -0,0 +1,26 @@ +DESCRIPTION = "Firmware image for the Cortina CS4315 PHY" +LICENSE = "Cortina" +LIC_FILES_CHKSUM = "file://Cortina-EULA;md5=ef3a0b9eaf40547d263a4f67040dc56e" + +inherit deploy + +SRC_URI = "git://git.freescale.com/ppc/sdk/firmware.git;nobranch=1" +SRCREV = "ad5a3108f9ede39ea41fde18d4ac0cc7680cf650" + +S = "${WORKDIR}/git" + +do_install () { + install -d ${D}/boot + install -m 644 ${S}/cs4315-cs4340-PHY-ucode.txt ${D}/boot/ +} + +do_deploy () { + install -d ${DEPLOYDIR}/ + install -m 644 ${S}/cs4315-cs4340-PHY-ucode.txt ${DEPLOYDIR}/ +} +addtask deploy before do_build after do_install + +PACKAGES += "${PN}-image" +FILES_${PN}-image += "/boot" +COMPATIBLE_MACHINE = "(t2080rdb|t2080rdb-64b|t4240rdb|t4240rdb-64b)" +ALLOW_EMPTY_${PN} = "1" -- cgit v1.2.3-54-g00ecf From 06a7e728aef358adc949c39e054ed96cda35827a Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Sat, 14 Jun 2014 14:25:22 +0800 Subject: pkc-firmware: add recipe for sdk v1.6 Signed-off-by: Zhenhua Luo --- .../recipes-bsp/pkc-firmware/pkc-firmware_git.bb | 41 ++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 meta-fsl-ppc/recipes-bsp/pkc-firmware/pkc-firmware_git.bb diff --git a/meta-fsl-ppc/recipes-bsp/pkc-firmware/pkc-firmware_git.bb b/meta-fsl-ppc/recipes-bsp/pkc-firmware/pkc-firmware_git.bb new file mode 100644 index 00000000..3cc5d446 --- /dev/null +++ b/meta-fsl-ppc/recipes-bsp/pkc-firmware/pkc-firmware_git.bb @@ -0,0 +1,41 @@ +DESCRIPTION = "U-boot firmware for c293pcie support " +HOMEPAGE = "http://u-boot.sf.net" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=1707d6db1d42237583f50183a5651ecb" + +INHIBIT_DEFAULT_DEPS = "1" +DEPENDS = "virtual/${TARGET_PREFIX}gcc libgcc" + +inherit deploy + +PACKAGE_ARCH = "${MACHINE_ARCH}" + +SRC_URI = "git://git.freescale.com/ppc/sdk/pkc-firmware.git;nobranch=1" +SRCREV = "b891873c1eea7a7d53f9472ea601712897cb17b7" + +S = "${WORKDIR}/git" + +EXTRA_OEMAKE = 'CROSS_COMPILE=${TARGET_PREFIX} CC="${TARGET_PREFIX}gcc ${TOOLCHAIN_OPTIONS}"' + +do_compile () { + unset LDFLAGS + unset CFLAGS + unset CPPFLAGS + oe_runmake C293QDS_36BIT_SDCARD +} + +do_install(){ + install -d ${D}${sysconfdir}/crypto/ + install ${S}/u-boot.bin ${D}${sysconfdir}/crypto/pkc-firmware.bin +} + +do_deploy(){ + install -d ${DEPLOYDIR}/pkc-firmware + install ${S}/u-boot.bin ${DEPLOYDIR}/pkc-firmware/pkc-firmware.bin +} + +addtask deploy after do_install + +FILES_{PN} += "/etc/crypto/pkc-firmware.bin" +COMPATIBLE_MACHINE = "(c293pcie)" + -- cgit v1.2.3-54-g00ecf From 98dd4d3c5ce0d5efee5fbdeb34c4466f43b15564 Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Sat, 14 Jun 2014 14:26:28 +0800 Subject: pkc-host: add recipe for sdk v1.6 Signed-off-by: Zhenhua Luo --- .../recipes-kernel/pkc-host/pkc-host_git.bb | 47 ++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 meta-fsl-ppc/recipes-kernel/pkc-host/pkc-host_git.bb diff --git a/meta-fsl-ppc/recipes-kernel/pkc-host/pkc-host_git.bb b/meta-fsl-ppc/recipes-kernel/pkc-host/pkc-host_git.bb new file mode 100644 index 00000000..9535005d --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/pkc-host/pkc-host_git.bb @@ -0,0 +1,47 @@ +DESCRIPTION = "pkc host driver" +SECTION = "pkc-host" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://Makefile;endline=30;md5=6a26ed8e76a8ea2e019c525369ed0f03" + +inherit module + +SRC_URI = "git://git.freescale.com/ppc/sdk/pkc-host.git;nobranch=1" +SRCREV = "cae512c94e2a26cc6b0d6393d307cdea2d7282c9" + +S = "${WORKDIR}/git" + +EXTRA_OEMAKE='KERNEL_DIR="${STAGING_KERNEL_DIR}" PREFIX="${D}"' + +python () { + ma = d.getVar("DISTRO_FEATURES", True) + arch = d.getVar("OVERRIDES", True) + + # the : after the arch is to skip the message on 64b + if not "multiarch" in ma and ("e5500:" in arch or "e6500:" in arch): + raise bb.parse.SkipPackage("Building the kernel for this arch requires multiarch to be in DISTRO_FEATURES") + + promote_kernel = d.getVar('BUILD_64BIT_KERNEL') + + if promote_kernel == "1": + d.setVar('KERNEL_CC_append', ' -m64') + d.setVar('KERNEL_LD_append', ' -melf64ppc') + + error_qa = d.getVar('ERROR_QA', True) + if 'arch' in error_qa: + d.setVar('ERROR_QA', error_qa.replace(' arch', '')) +} + +do_install() { + install -d ${D}/lib/modules/c2x0 + install -d ${D}/etc/crypto + install -d ${D}/${bindir} + cp ${S}/*.ko ${D}/lib/modules/c2x0 + cp ${S}/crypto.cfg ${D}/etc/crypto + cp ${S}/images/pkc-firmware.bin ${D}/etc/crypto + cp ${S}/perf/mini_calc/mini_calc ${D}/${bindir} + cp ${S}/apps/cli/cli ${D}/${bindir} + cp ${S}/perf/c29x_driver_perf_profile.sh ${D}/${bindir} +} + + +FILES_${PN} += "${bindir}/mini_calc ${bindir}/cli ${bindir}/c29x_driver_perf_profile.sh /etc/crypto/crypto.cfg /etc/crypto/pkc-firmware.bin" -- cgit v1.2.3-54-g00ecf From f1f2984d6c0b37d514df97dca6d1647b7749a028 Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Sat, 14 Jun 2014 14:29:07 +0800 Subject: skmm-host: add recipe for sdk v1.6 Signed-off-by: Zhenhua Luo --- .../recipes-kernel/skmm-host/skmm-host_git.bb | 34 ++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 meta-fsl-ppc/recipes-kernel/skmm-host/skmm-host_git.bb diff --git a/meta-fsl-ppc/recipes-kernel/skmm-host/skmm-host_git.bb b/meta-fsl-ppc/recipes-kernel/skmm-host/skmm-host_git.bb new file mode 100644 index 00000000..9ce8a1dd --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/skmm-host/skmm-host_git.bb @@ -0,0 +1,34 @@ +DESCRIPTION = "skmm host driver offload data to PCIe EP and push the data en-decrypted back to application" +SECTION = "c293-skmm-host" +LICENSE = "Freescale-EULA" +LIC_FILES_CHKSUM = "file://Makefile;endline=7;md5=edffaac1da9e809ade0d2fcfcc18d8df" + +inherit module + +SRC_URI = "git://git.freescale.com/ppc/sdk/skmm-host.git;nobranch=1" +SRCREV = "97c9241a359edccdf8913cb9accbfe4ceb511523" + +S = "${WORKDIR}/git" + +EXTRA_OEMAKE='KERNEL_DIR="${STAGING_KERNEL_DIR}" PREFIX="${D}"' + +python () { + ma = d.getVar("DISTRO_FEATURES", True) + arch = d.getVar("OVERRIDES", True) + + # the : after the arch is to skip the message on 64b + if not "multiarch" in ma and ("e5500:" in arch or "e6500:" in arch): + raise bb.parse.SkipPackage("Building the kernel for this arch requires multiarch to be in DISTRO_FEATURES") + + promote_kernel = d.getVar('BUILD_64BIT_KERNEL') + + if promote_kernel == "1": + d.setVar('KERNEL_CC_append', ' -m64') + d.setVar('KERNEL_LD_append', ' -melf64ppc') + + error_qa = d.getVar('ERROR_QA', True) + if 'arch' in error_qa: + d.setVar('ERROR_QA', error_qa.replace(' arch', '')) +} + +FILES_${PN} += "/etc/skmm/" -- cgit v1.2.3-54-g00ecf From 2b6d5a87cb228bfd37d2eb6160fd9cf8e722329e Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Sat, 14 Jun 2014 14:30:59 +0800 Subject: uspdcp: add recipe for sdk v1.6 Signed-off-by: Zhenhua Luo --- meta-fsl-ppc/recipes-extended/uspdcp/uspdcp_git.bb | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 meta-fsl-ppc/recipes-extended/uspdcp/uspdcp_git.bb diff --git a/meta-fsl-ppc/recipes-extended/uspdcp/uspdcp_git.bb b/meta-fsl-ppc/recipes-extended/uspdcp/uspdcp_git.bb new file mode 100644 index 00000000..035aab59 --- /dev/null +++ b/meta-fsl-ppc/recipes-extended/uspdcp/uspdcp_git.bb @@ -0,0 +1,18 @@ +DESCRIPTION = "SEC user space driver package" +LICENSE = "BSD GPLv2" + +DEPENDS += "flib usdpaa" + +# no COPYING file in current git tree, need to be fixed +LIC_FILES_CHKSUM = "file://Makefile;endline=30;md5=83b6209ab517640a7390536a08d33609" + +SRC_URI = "git://git.freescale.com/ppc/sdk/uspdcp.git;nobranch=1" +SRCREV = "30016cdf36553c14f7143ef005a4925edd901fb0" + +S = "${WORKDIR}/git" + +EXTRA_OEMAKE="ARCH=${TARGET_ARCH} EXTRA_DEFINE='USDPAA CONFIG_PHYS_64BIT' CROSS_COMPILE=${TARGET_PREFIX} SDK_DIR=${STAGING_DIR}/${MACHINE}" + +do_install(){ + oe_runmake install DESTDIR=${D} +} -- cgit v1.2.3-54-g00ecf From d6fbda6719533f717295e47d46cab079f26e37e1 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Tue, 1 Jul 2014 05:01:26 -0500 Subject: eth-config: fix wrong md5sum of license file license file has no changes. Signed-off-by: Ting Liu --- meta-fsl-ppc/recipes-dpaa/eth-config/eth-config_git.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-fsl-ppc/recipes-dpaa/eth-config/eth-config_git.bb b/meta-fsl-ppc/recipes-dpaa/eth-config/eth-config_git.bb index 882fa692..85c3b784 100644 --- a/meta-fsl-ppc/recipes-dpaa/eth-config/eth-config_git.bb +++ b/meta-fsl-ppc/recipes-dpaa/eth-config/eth-config_git.bb @@ -1,7 +1,7 @@ DESCRIPTION = "Ethernet Configuration Files" SECTION = "eth-config" LICENSE = "Freescale-EULA" -LIC_FILES_CHKSUM = "file://COPYING;md5=ee9cce4f1b396a50469f4dbde064e866" +LIC_FILES_CHKSUM = "file://COPYING;md5=cf02dc8eb5ac4a76f3812826520dea87" PR = "r2" -- cgit v1.2.3-54-g00ecf From dd090e688cf7987eff8906e3750cfbb1c285941c Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Thu, 3 Jul 2014 02:32:04 -0500 Subject: openssl: downgrade to 1.0.1g openssl released in fsl sdk v1.6 was based on 1.0.1g, so downgrade for fsl boards. the imported recipes were based on daisy-11.0.0 which FSL SDK based on. Signed-off-by: Ting Liu --- .../recipes-connectivity/openssl/openssl.inc | 173 + .../openssl/openssl/configure-targets.patch | 34 + .../openssl/openssl/debian/c_rehash-compat.patch | 45 + .../openssl/openssl/debian/ca.patch | 22 + .../openssl/openssl/debian/debian-targets.patch | 66 + .../openssl/openssl/debian/make-targets.patch | 15 + .../openssl/openssl/debian/man-dir.patch | 15 + .../openssl/openssl/debian/man-section.patch | 34 + .../openssl/openssl/debian/no-rpath.patch | 15 + .../openssl/openssl/debian/no-symbolic.patch | 15 + .../openssl/openssl/debian/pic.patch | 177 + .../openssl/openssl/debian/version-script.patch | 4670 ++++++++++++++++++++ .../openssl/engines-install-in-libdir-ssl.patch | 56 + .../recipes-connectivity/openssl/openssl/find.pl | 54 + .../openssl/openssl/fix-cipher-des-ede3-cfb1.patch | 22 + .../openssl/openssl/initial-aarch64-bits.patch | 119 + .../openssl/openssl/oe-ldflags.patch | 24 + ...-pointer-dereference-in-EVP_DigestInit_ex.patch | 21 + ...NULL-pointer-dereference-in-dh_pub_encode.patch | 39 + .../openssl/openssl-fix-des.pod-error.patch | 19 + .../openssl/openssl/openssl-fix-doc.patch | 401 ++ .../openssl/openssl/openssl-fix-link.patch | 35 + .../openssl/openssl/openssl_fix_for_x32.patch | 90 + .../openssl/openssl/shared-libs.patch | 41 + .../recipes-connectivity/openssl/openssl_1.0.1g.bb | 55 + 25 files changed, 6257 insertions(+) create mode 100644 meta-fsl-ppc/recipes-connectivity/openssl/openssl.inc create mode 100644 meta-fsl-ppc/recipes-connectivity/openssl/openssl/configure-targets.patch create mode 100644 meta-fsl-ppc/recipes-connectivity/openssl/openssl/debian/c_rehash-compat.patch create mode 100644 meta-fsl-ppc/recipes-connectivity/openssl/openssl/debian/ca.patch create mode 100644 meta-fsl-ppc/recipes-connectivity/openssl/openssl/debian/debian-targets.patch create mode 100644 meta-fsl-ppc/recipes-connectivity/openssl/openssl/debian/make-targets.patch create mode 100644 meta-fsl-ppc/recipes-connectivity/openssl/openssl/debian/man-dir.patch create mode 100644 meta-fsl-ppc/recipes-connectivity/openssl/openssl/debian/man-section.patch create mode 100644 meta-fsl-ppc/recipes-connectivity/openssl/openssl/debian/no-rpath.patch create mode 100644 meta-fsl-ppc/recipes-connectivity/openssl/openssl/debian/no-symbolic.patch create mode 100644 meta-fsl-ppc/recipes-connectivity/openssl/openssl/debian/pic.patch create mode 100644 meta-fsl-ppc/recipes-connectivity/openssl/openssl/debian/version-script.patch create mode 100644 meta-fsl-ppc/recipes-connectivity/openssl/openssl/engines-install-in-libdir-ssl.patch create mode 100644 meta-fsl-ppc/recipes-connectivity/openssl/openssl/find.pl create mode 100644 meta-fsl-ppc/recipes-connectivity/openssl/openssl/fix-cipher-des-ede3-cfb1.patch create mode 100644 meta-fsl-ppc/recipes-connectivity/openssl/openssl/initial-aarch64-bits.patch create mode 100644 meta-fsl-ppc/recipes-connectivity/openssl/openssl/oe-ldflags.patch create mode 100644 meta-fsl-ppc/recipes-connectivity/openssl/openssl/openssl-avoid-NULL-pointer-dereference-in-EVP_DigestInit_ex.patch create mode 100644 meta-fsl-ppc/recipes-connectivity/openssl/openssl/openssl-avoid-NULL-pointer-dereference-in-dh_pub_encode.patch create mode 100644 meta-fsl-ppc/recipes-connectivity/openssl/openssl/openssl-fix-des.pod-error.patch create mode 100644 meta-fsl-ppc/recipes-connectivity/openssl/openssl/openssl-fix-doc.patch create mode 100644 meta-fsl-ppc/recipes-connectivity/openssl/openssl/openssl-fix-link.patch create mode 100644 meta-fsl-ppc/recipes-connectivity/openssl/openssl/openssl_fix_for_x32.patch create mode 100644 meta-fsl-ppc/recipes-connectivity/openssl/openssl/shared-libs.patch create mode 100644 meta-fsl-ppc/recipes-connectivity/openssl/openssl_1.0.1g.bb diff --git a/meta-fsl-ppc/recipes-connectivity/openssl/openssl.inc b/meta-fsl-ppc/recipes-connectivity/openssl/openssl.inc new file mode 100644 index 00000000..ee02fb79 --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/openssl/openssl.inc @@ -0,0 +1,173 @@ +SUMMARY = "Secure Socket Layer" +DESCRIPTION = "Secure Socket Layer (SSL) binary and related cryptographic tools." +HOMEPAGE = "http://www.openssl.org/" +BUGTRACKER = "http://www.openssl.org/news/vulnerabilities.html" +SECTION = "libs/network" + +# "openssl | SSLeay" dual license +LICENSE = "openssl" +LIC_FILES_CHKSUM = "file://LICENSE;md5=f9a8f968107345e0b75aa8c2ecaa7ec8" + +DEPENDS = "perl-native-runtime" + +SRC_URI = "http://www.openssl.org/source/openssl-${PV}.tar.gz \ + " +S = "${WORKDIR}/openssl-${PV}" + +PACKAGECONFIG[perl] = ",,," + +AR_append = " r" +# Avoid binaries being marked as requiring an executable stack since it +# doesn't(which causes and this causes issues with SELinux +CFLAG = "${@base_conditional('SITEINFO_ENDIANNESS', 'le', '-DL_ENDIAN', '-DB_ENDIAN', d)} \ + -DTERMIO ${CFLAGS} -Wall -Wa,--noexecstack" + +# -02 does not work on mipsel: ssh hangs when it tries to read /dev/urandom +CFLAG_mtx-1 := "${@'${CFLAG}'.replace('-O2', '')}" +CFLAG_mtx-2 := "${@'${CFLAG}'.replace('-O2', '')}" + +export DIRS = "crypto ssl apps" +export EX_LIBS = "-lgcc -ldl" +export AS = "${CC} -c" + +inherit pkgconfig siteinfo multilib_header + +PACKAGES =+ "libcrypto libssl ${PN}-misc openssl-conf" +FILES_libcrypto = "${base_libdir}/libcrypto${SOLIBS}" +FILES_libssl = "${libdir}/libssl.so.*" +FILES_${PN} =+ " ${libdir}/ssl/*" +FILES_${PN}-misc = "${libdir}/ssl/misc ${bindir}/c_rehash" +RDEPENDS_${PN}-misc = "${@base_contains('PACKAGECONFIG', 'perl', 'perl', '', d)}" +FILES_${PN}-dev += "${base_libdir}/libcrypto${SOLIBSDEV}" + +# 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" +RRECOMMENDS_libcrypto += "openssl-conf" + +do_configure_prepend_darwin () { + sed -i -e '/version-script=openssl\.ld/d' Configure +} + +do_configure () { + cd util + perl perlpath.pl ${STAGING_BINDIR_NATIVE} + cd .. + ln -sf apps/openssl.pod crypto/crypto.pod ssl/ssl.pod doc/ + + os=${HOST_OS} + if [ "x$os" = "xlinux-uclibc" ]; then + os=linux + elif [ "x$os" = "xlinux-uclibceabi" ]; then + os=linux + elif [ "x$os" = "xlinux-uclibcspe" ]; then + os=linux + elif [ "x$os" = "xlinux-gnuspe" ]; then + os=linux + elif [ "x$os" = "xlinux-gnueabi" ]; then + os=linux + fi + target="$os-${HOST_ARCH}" + case $target in + linux-arm) + target=linux-armv4 + ;; + linux-armeb) + target=linux-elf-armeb + ;; + linux-aarch64*) + target=linux-generic64 + ;; + linux-sh3) + target=debian-sh3 + ;; + linux-sh4) + target=debian-sh4 + ;; + linux-i486) + target=debian-i386-i486 + ;; + linux-i586 | linux-viac3) + target=debian-i386-i586 + ;; + linux-i686) + target=debian-i386-i686/cmov + ;; + linux-gnux32-x86_64) + target=linux-x32 + ;; + linux-gnu64-x86_64) + target=linux-x86_64 + ;; + linux-mips) + target=debian-mips + ;; + linux-mipsel) + target=debian-mipsel + ;; + linux-*-mips64) + target=linux-mips + ;; + linux-powerpc) + target=linux-ppc + ;; + linux-powerpc64) + target=linux-ppc64 + ;; + linux-supersparc) + target=linux-sparcv8 + ;; + linux-sparc) + target=linux-sparcv8 + ;; + darwin-i386) + target=darwin-i386-cc + ;; + esac + # inject machine-specific flags + sed -i -e "s|^\(\"$target\",\s*\"[^:]\+\):\([^:]\+\)|\1:${CFLAG}|g" Configure + useprefix=${prefix} + if [ "x$useprefix" = "x" ]; then + useprefix=/ + fi + perl ./Configure ${EXTRA_OECONF} shared --prefix=$useprefix --openssldir=${libdir}/ssl --libdir=`basename ${libdir}` $target +} + +do_compile () { + oe_runmake +} + +do_install () { + oe_runmake INSTALL_PREFIX="${D}" MANDIR="${mandir}" install + + oe_libinstall -so libcrypto ${D}${libdir} + oe_libinstall -so libssl ${D}${libdir} + + # Moving libcrypto to /lib + if [ ! ${D}${libdir} -ef ${D}${base_libdir} ]; then + mkdir -p ${D}/${base_libdir}/ + mv ${D}${libdir}/libcrypto* ${D}${base_libdir}/ + sed -i s#libdir=\$\{exec_prefix\}\/lib#libdir=${base_libdir}# ${D}/${libdir}/pkgconfig/libcrypto.pc + fi + + install -d ${D}${includedir} + cp --dereference -R include/openssl ${D}${includedir} + + oe_multilib_header openssl/opensslconf.h + if [ "${@base_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 +} + +BBCLASSEXTEND = "native nativesdk" + diff --git a/meta-fsl-ppc/recipes-connectivity/openssl/openssl/configure-targets.patch b/meta-fsl-ppc/recipes-connectivity/openssl/openssl/configure-targets.patch new file mode 100644 index 00000000..c1f3d087 --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/openssl/openssl/configure-targets.patch @@ -0,0 +1,34 @@ +Upstream-Status: Inappropriate [embedded specific] + +The number of colons are important :) + + +--- + Configure | 16 ++++++++++++++++ + 1 file changed, 16 insertions(+) + +--- a/Configure ++++ b/Configure +@@ -403,6 +403,22 @@ my %table=( + "linux-alpha-ccc","ccc:-fast -readonly_strings -DL_ENDIAN -DTERMIO::-D_REENTRANT:::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL:${alpha_asm}", + "linux-alpha+bwx-ccc","ccc:-fast -readonly_strings -DL_ENDIAN -DTERMIO::-D_REENTRANT:::SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL:${alpha_asm}", + ++ # Linux on ARM ++"linux-elf-arm","$ENV{'CC'}:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", ++"linux-elf-armeb","$ENV{'CC'}:-DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", ++"linux-gnueabi-arm","$ENV{'CC'}:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", ++"linux-gnueabi-armeb","$ENV{'CC'}:-DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", ++"linux-uclibceabi-arm","$ENV{'CC'}:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", ++"linux-uclibceabi-armeb","$ENV{'CC'}:-DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", ++ ++"linux-avr32","$ENV{'CC'}:-DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).", ++ ++#### Linux on MIPS/MIPS64 ++"linux-mips","$ENV{'CC'}:-DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL DES_RISC2:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", ++"linux-mips64","$ENV{'CC'}:-DB_ENDIAN -DTERMIO -mabi=64 -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL DES_RISC2:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", ++"linux-mips64el","$ENV{'CC'}:-DL_ENDIAN -DTERMIO -mabi=64 -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL DES_RISC2:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", ++"linux-mipsel","$ENV{'CC'}:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL DES_RISC2:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", ++ + # Android: linux-* but without -DTERMIO and pointers to headers and libs. + "android","gcc:-mandroid -I\$(ANDROID_DEV)/include -B\$(ANDROID_DEV)/lib -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", + "android-x86","gcc:-mandroid -I\$(ANDROID_DEV)/include -B\$(ANDROID_DEV)/lib -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:".eval{my $asm=${x86_elf_asm};$asm=~s/:elf/:android/;$asm}.":dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", diff --git a/meta-fsl-ppc/recipes-connectivity/openssl/openssl/debian/c_rehash-compat.patch b/meta-fsl-ppc/recipes-connectivity/openssl/openssl/debian/c_rehash-compat.patch new file mode 100644 index 00000000..ac1b19b9 --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/openssl/openssl/debian/c_rehash-compat.patch @@ -0,0 +1,45 @@ +Upstream-Status: Backport [debian] + +From 83f318d68bbdab1ca898c94576a838cc97df4700 Mon Sep 17 00:00:00 2001 +From: Ludwig Nussel +Date: Wed, 21 Apr 2010 15:52:10 +0200 +Subject: [PATCH] also create old hash for compatibility + +--- + tools/c_rehash.in | 8 +++++++- + 1 files changed, 7 insertions(+), 1 deletions(-) + +Index: openssl-1.0.0d/tools/c_rehash.in +=================================================================== +--- openssl-1.0.0d.orig/tools/c_rehash.in 2011-04-13 20:41:28.000000000 +0000 ++++ openssl-1.0.0d/tools/c_rehash.in 2011-04-13 20:41:28.000000000 +0000 +@@ -86,6 +86,7 @@ + } + } + link_hash_cert($fname) if($cert); ++ link_hash_cert_old($fname) if($cert); + link_hash_crl($fname) if($crl); + } + } +@@ -119,8 +120,9 @@ + + sub link_hash_cert { + my $fname = $_[0]; ++ my $hashopt = $_[1] || '-subject_hash'; + $fname =~ s/'/'\\''/g; +- my ($hash, $fprint) = `"$openssl" x509 -hash -fingerprint -noout -in "$fname"`; ++ my ($hash, $fprint) = `"$openssl" x509 $hashopt -fingerprint -noout -in "$fname"`; + chomp $hash; + chomp $fprint; + $fprint =~ s/^.*=//; +@@ -150,6 +152,10 @@ + $hashlist{$hash} = $fprint; + } + ++sub link_hash_cert_old { ++ link_hash_cert($_[0], '-subject_hash_old'); ++} ++ + # Same as above except for a CRL. CRL links are of the form .r + + sub link_hash_crl { diff --git a/meta-fsl-ppc/recipes-connectivity/openssl/openssl/debian/ca.patch b/meta-fsl-ppc/recipes-connectivity/openssl/openssl/debian/ca.patch new file mode 100644 index 00000000..aba4d429 --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/openssl/openssl/debian/ca.patch @@ -0,0 +1,22 @@ +Upstream-Status: Backport [debian] + +Index: openssl-0.9.8m/apps/CA.pl.in +=================================================================== +--- openssl-0.9.8m.orig/apps/CA.pl.in 2006-04-28 00:28:51.000000000 +0000 ++++ openssl-0.9.8m/apps/CA.pl.in 2010-02-27 00:36:51.000000000 +0000 +@@ -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 -signcert certfile keyfile|-newcert|-newreq|-newca|-sign|-verify\n"; + exit 0; + } elsif (/^-newcert$/) { + # create a certificate +@@ -165,6 +166,7 @@ + } else { + print STDERR "Unknown arg $_\n"; + print STDERR "usage: CA -newcert|-newreq|-newreq-nodes|-newca|-sign|-verify\n"; ++ print STDERR "usage: CA -signcert certfile keyfile|-newcert|-newreq|-newca|-sign|-verify\n"; + exit 1; + } + } diff --git a/meta-fsl-ppc/recipes-connectivity/openssl/openssl/debian/debian-targets.patch b/meta-fsl-ppc/recipes-connectivity/openssl/openssl/debian/debian-targets.patch new file mode 100644 index 00000000..8101edf0 --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/openssl/openssl/debian/debian-targets.patch @@ -0,0 +1,66 @@ +Upstream-Status: Backport [debian] + +Index: openssl-1.0.1/Configure +=================================================================== +--- openssl-1.0.1.orig/Configure 2012-03-17 15:37:54.000000000 +0000 ++++ openssl-1.0.1/Configure 2012-03-17 16:13:49.000000000 +0000 +@@ -105,6 +105,10 @@ + + my $gcc_devteam_warn = "-Wall -pedantic -DPEDANTIC -Wno-long-long -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Werror -DCRYPTO_MDEBUG_ALL -DCRYPTO_MDEBUG_ABORT -DREF_CHECK -DOPENSSL_NO_DEPRECATED"; + ++# There are no separate CFLAGS/CPPFLAGS/LDFLAGS, set everything in CFLAGS ++my $debian_cflags = `dpkg-buildflags --get CFLAGS` . `dpkg-buildflags --get CPPFLAGS` . `dpkg-buildflags --get LDFLAGS` . "-Wa,--noexecstack -Wall"; ++$debian_cflags =~ s/\n/ /g; ++ + my $strict_warnings = 0; + + my $x86_gcc_des="DES_PTR DES_RISC1 DES_UNROLL"; +@@ -338,6 +342,48 @@ + "osf1-alpha-cc", "cc:-std1 -tune host -O4 -readonly_strings::(unknown):::SIXTY_FOUR_BIT_LONG RC4_CHUNK:${alpha_asm}:dlfcn:alpha-osf1-shared:::.so", + "tru64-alpha-cc", "cc:-std1 -tune host -fast -readonly_strings::-pthread:::SIXTY_FOUR_BIT_LONG RC4_CHUNK:${alpha_asm}:dlfcn:alpha-osf1-shared::-msym:.so", + ++# Debian GNU/* (various architectures) ++"debian-alpha","gcc:-DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_RISC1 DES_UNROLL:${alpha_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", ++"debian-alpha-ev4","gcc:-DTERMIO ${debian_cflags} -mcpu=ev4::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_RISC1 DES_UNROLL:${alpha_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", ++"debian-alpha-ev5","gcc:-DTERMIO ${debian_cflags} -mcpu=ev5::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_RISC1 DES_UNROLL:${alpha_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", ++"debian-armeb","gcc:-DB_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", ++"debian-armel","gcc:-DL_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", ++"debian-armhf","gcc:-DL_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", ++"debian-amd64", "gcc:-m64 -DL_ENDIAN -DTERMIO ${debian_cflags} -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::", ++"debian-avr32", "gcc:-DB_ENDIAN -DTERMIO ${debian_cflags} -fomit-frame-pointer::-D_REENTRANT::-ldl:BN_LLONG_BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", ++"debian-kfreebsd-amd64","gcc:-m64 -DL_ENDIAN -DTERMIOS ${debian_cflags} -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", ++"debian-kfreebsd-i386","gcc:-DL_ENDIAN -DTERMIOS ${debian_cflags} -march=i486::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", ++"debian-hppa","gcc:-DB_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG MD2_CHAR RC4_INDEX:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", ++"debian-hurd-i386","gcc:-DL_ENDIAN -DTERMIOS -O3 -Wa,--noexecstack -g -mtune=i486 -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", ++"debian-ia64","gcc:-DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_UNROLL DES_INT:${ia64_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", ++"debian-i386","gcc:-DL_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", ++"debian-i386-i486","gcc:-DL_ENDIAN -DTERMIO ${debian_cflags} -march=i486::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", ++"debian-i386-i586","gcc:-DL_ENDIAN -DTERMIO ${debian_cflags} -march=i586::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", ++"debian-i386-i686/cmov","gcc:-DL_ENDIAN -DTERMIO ${debian_cflags} -march=i686::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", ++"debian-m68k","gcc:-DB_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG MD2_CHAR RC4_INDEX:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", ++"debian-mips", "gcc:-DB_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL DES_RISC2:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", ++"debian-mipsel", "gcc:-DL_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL DES_RISC2:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", ++"debian-netbsd-i386", "gcc:-DL_ENDIAN -DTERMIOS ${debian_cflags} -m486::(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${no_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", ++"debian-netbsd-m68k", "gcc:-DB_ENDIAN -DTERMIOS ${debian_cflags}::(unknown):::BN_LLONG MD2_CHAR RC4_INDEX DES_UNROLL:${no_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", ++"debian-netbsd-sparc", "gcc:-DB_ENDIAN -DTERMIOS ${debian_cflags} -mv8::(unknown):::BN_LLONG MD2_CHAR RC4_INDEX DES_UNROLL:${no_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", ++"debian-openbsd-alpha","gcc:-DTERMIOS ${debian_cflags}::(unknown):::SIXTY_FOUR_BIT_LONG DES_INT DES_PTR DES_RISC2:${no_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", ++"debian-openbsd-i386", "gcc:-DL_ENDIAN -DTERMIOS ${debian_cflags} -m486::(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_asm}:a.out:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", ++"debian-openbsd-mips","gcc:-DL_ENDIAN ${debian_cflags}::(unknown)::BN_LLONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC2 DES_PTR BF_PTR:${no_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", ++"debian-powerpc","gcc:-DB_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL:${ppc32_asm}:linux32:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", ++"debian-powerpcspe","gcc:-DB_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL:${ppc32_asm}:linux32:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", ++"debian-ppc64","gcc:-m64 -DB_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL:${ppc64_asm}:linux64:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", ++"debian-s390","gcc:-DB_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", ++"debian-s390x","gcc:-DB_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", ++"debian-sh3", "gcc:-DL_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", ++"debian-sh4", "gcc:-DL_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", ++"debian-sh3eb", "gcc:-DB_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", ++"debian-sh4eb", "gcc:-DB_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", ++"debian-m32r","gcc:-DB_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", ++"debian-sparc","gcc:-DB_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${sparcv9_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", ++"debian-sparc-v8","gcc:-DB_ENDIAN -DTERMIO ${debian_cflags} -mcpu=v8 -DBN_DIV2W::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${sparcv8_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", ++"debian-sparc-v9","gcc:-DB_ENDIAN -DTERMIO ${debian_cflags} -mcpu=v9 -Wa,-Av8plus -DULTRASPARC -DBN_DIV2W::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${sparcv9_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", ++"debian-sparc64","gcc:-m64 -DB_ENDIAN -DTERMIO ${debian_cflags} -DULTRASPARC -DBN_DIV2W::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL BF_PTR:${sparcv9_asm}:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", ++ + #### + #### Variety of LINUX:-) + #### diff --git a/meta-fsl-ppc/recipes-connectivity/openssl/openssl/debian/make-targets.patch b/meta-fsl-ppc/recipes-connectivity/openssl/openssl/debian/make-targets.patch new file mode 100644 index 00000000..ee0a62c3 --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/openssl/openssl/debian/make-targets.patch @@ -0,0 +1,15 @@ +Upstream-Status: Backport [debian] + +Index: openssl-1.0.1/Makefile.org +=================================================================== +--- openssl-1.0.1.orig/Makefile.org 2012-03-17 09:41:07.000000000 +0000 ++++ openssl-1.0.1/Makefile.org 2012-03-17 09:41:21.000000000 +0000 +@@ -135,7 +135,7 @@ + + BASEADDR= + +-DIRS= crypto ssl engines apps test tools ++DIRS= crypto ssl engines apps tools + ENGDIRS= ccgost + SHLIBDIRS= crypto ssl + diff --git a/meta-fsl-ppc/recipes-connectivity/openssl/openssl/debian/man-dir.patch b/meta-fsl-ppc/recipes-connectivity/openssl/openssl/debian/man-dir.patch new file mode 100644 index 00000000..4085e3b1 --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/openssl/openssl/debian/man-dir.patch @@ -0,0 +1,15 @@ +Upstream-Status: Backport [debian] + +Index: openssl-1.0.0c/Makefile.org +=================================================================== +--- openssl-1.0.0c.orig/Makefile.org 2010-12-12 16:11:27.000000000 +0100 ++++ openssl-1.0.0c/Makefile.org 2010-12-12 16:11:37.000000000 +0100 +@@ -131,7 +131,7 @@ + + MAKEFILE= Makefile + +-MANDIR=$(OPENSSLDIR)/man ++MANDIR=/usr/share/man + MAN1=1 + MAN3=3 + MANSUFFIX= diff --git a/meta-fsl-ppc/recipes-connectivity/openssl/openssl/debian/man-section.patch b/meta-fsl-ppc/recipes-connectivity/openssl/openssl/debian/man-section.patch new file mode 100644 index 00000000..21c1d1a4 --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/openssl/openssl/debian/man-section.patch @@ -0,0 +1,34 @@ +Upstream-Status: Backport [debian] + +Index: openssl-1.0.0c/Makefile.org +=================================================================== +--- openssl-1.0.0c.orig/Makefile.org 2010-12-12 16:11:37.000000000 +0100 ++++ openssl-1.0.0c/Makefile.org 2010-12-12 16:13:28.000000000 +0100 +@@ -160,7 +160,8 @@ + MANDIR=/usr/share/man + MAN1=1 + MAN3=3 +-MANSUFFIX= ++MANSUFFIX=ssl ++MANSECTION=SSL + HTMLSUFFIX=html + HTMLDIR=$(OPENSSLDIR)/html + SHELL=/bin/sh +@@ -651,7 +652,7 @@ + echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \ + (cd `$(PERL) util/dirname.pl $$i`; \ + sh -c "$$pod2man \ +- --section=$$sec --center=OpenSSL \ ++ --section=$${sec}$(MANSECTION) --center=OpenSSL \ + --release=$(VERSION) `basename $$i`") \ + > $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \ + $(PERL) util/extract-names.pl < $$i | \ +@@ -668,7 +669,7 @@ + echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \ + (cd `$(PERL) util/dirname.pl $$i`; \ + sh -c "$$pod2man \ +- --section=$$sec --center=OpenSSL \ ++ --section=$${sec}$(MANSECTION) --center=OpenSSL \ + --release=$(VERSION) `basename $$i`") \ + > $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \ + $(PERL) util/extract-names.pl < $$i | \ diff --git a/meta-fsl-ppc/recipes-connectivity/openssl/openssl/debian/no-rpath.patch b/meta-fsl-ppc/recipes-connectivity/openssl/openssl/debian/no-rpath.patch new file mode 100644 index 00000000..1ccb3b86 --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/openssl/openssl/debian/no-rpath.patch @@ -0,0 +1,15 @@ +Upstream-Status: Backport [debian] + +Index: openssl-1.0.0c/Makefile.shared +=================================================================== +--- openssl-1.0.0c.orig/Makefile.shared 2010-08-21 13:36:49.000000000 +0200 ++++ openssl-1.0.0c/Makefile.shared 2010-12-12 16:13:36.000000000 +0100 +@@ -153,7 +153,7 @@ + NOALLSYMSFLAGS='-Wl,--no-whole-archive'; \ + SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared -Wl,-Bsymbolic -Wl,-soname=$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX" + +-DO_GNU_APP=LDFLAGS="$(CFLAGS) -Wl,-rpath,$(LIBRPATH)" ++DO_GNU_APP=LDFLAGS="$(CFLAGS)" + + #This is rather special. It's a special target with which one can link + #applications without bothering with any features that have anything to diff --git a/meta-fsl-ppc/recipes-connectivity/openssl/openssl/debian/no-symbolic.patch b/meta-fsl-ppc/recipes-connectivity/openssl/openssl/debian/no-symbolic.patch new file mode 100644 index 00000000..cc4408ab --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/openssl/openssl/debian/no-symbolic.patch @@ -0,0 +1,15 @@ +Upstream-Status: Backport [debian] + +Index: openssl-1.0.0c/Makefile.shared +=================================================================== +--- openssl-1.0.0c.orig/Makefile.shared 2010-12-12 16:13:36.000000000 +0100 ++++ openssl-1.0.0c/Makefile.shared 2010-12-12 16:13:44.000000000 +0100 +@@ -151,7 +151,7 @@ + SHLIB_SUFFIX=; \ + ALLSYMSFLAGS='-Wl,--whole-archive'; \ + NOALLSYMSFLAGS='-Wl,--no-whole-archive'; \ +- SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared -Wl,-Bsymbolic -Wl,-soname=$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX" ++ SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared -Wl,-soname=$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX" + + DO_GNU_APP=LDFLAGS="$(CFLAGS)" + diff --git a/meta-fsl-ppc/recipes-connectivity/openssl/openssl/debian/pic.patch b/meta-fsl-ppc/recipes-connectivity/openssl/openssl/debian/pic.patch new file mode 100644 index 00000000..bfda3888 --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/openssl/openssl/debian/pic.patch @@ -0,0 +1,177 @@ +Upstream-Status: Backport [debian] + +Index: openssl-1.0.1c/crypto/des/asm/desboth.pl +=================================================================== +--- openssl-1.0.1c.orig/crypto/des/asm/desboth.pl 2001-10-24 23:20:56.000000000 +0200 ++++ openssl-1.0.1c/crypto/des/asm/desboth.pl 2012-07-29 14:15:26.000000000 +0200 +@@ -16,6 +16,11 @@ + + &push("edi"); + ++ &call (&label("pic_point0")); ++ &set_label("pic_point0"); ++ &blindpop("ebp"); ++ &add ("ebp", "\$_GLOBAL_OFFSET_TABLE_+[.-" . &label("pic_point0") . "]"); ++ + &comment(""); + &comment("Load the data words"); + &mov($L,&DWP(0,"ebx","",0)); +@@ -47,15 +52,21 @@ + &mov(&swtmp(2), (DWC(($enc)?"1":"0"))); + &mov(&swtmp(1), "eax"); + &mov(&swtmp(0), "ebx"); +- &call("DES_encrypt2"); ++ &exch("ebx", "ebp"); ++ &call("DES_encrypt2\@PLT"); ++ &exch("ebx", "ebp"); + &mov(&swtmp(2), (DWC(($enc)?"0":"1"))); + &mov(&swtmp(1), "edi"); + &mov(&swtmp(0), "ebx"); +- &call("DES_encrypt2"); ++ &exch("ebx", "ebp"); ++ &call("DES_encrypt2\@PLT"); ++ &exch("ebx", "ebp"); + &mov(&swtmp(2), (DWC(($enc)?"1":"0"))); + &mov(&swtmp(1), "esi"); + &mov(&swtmp(0), "ebx"); +- &call("DES_encrypt2"); ++ &exch("ebx", "ebp"); ++ &call("DES_encrypt2\@PLT"); ++ &exch("ebx", "ebp"); + + &stack_pop(3); + &mov($L,&DWP(0,"ebx","",0)); +Index: openssl-1.0.1c/crypto/perlasm/cbc.pl +=================================================================== +--- openssl-1.0.1c.orig/crypto/perlasm/cbc.pl 2011-07-13 08:22:46.000000000 +0200 ++++ openssl-1.0.1c/crypto/perlasm/cbc.pl 2012-07-29 14:15:26.000000000 +0200 +@@ -122,7 +122,11 @@ + &mov(&DWP($data_off,"esp","",0), "eax"); # put in array for call + &mov(&DWP($data_off+4,"esp","",0), "ebx"); # + +- &call($enc_func); ++ &call (&label("pic_point0")); ++ &set_label("pic_point0"); ++ &blindpop("ebx"); ++ &add ("ebx", "\$_GLOBAL_OFFSET_TABLE_+[.-" . &label("pic_point0") . "]"); ++ &call("$enc_func\@PLT"); + + &mov("eax", &DWP($data_off,"esp","",0)); + &mov("ebx", &DWP($data_off+4,"esp","",0)); +@@ -185,7 +189,11 @@ + &mov(&DWP($data_off,"esp","",0), "eax"); # put in array for call + &mov(&DWP($data_off+4,"esp","",0), "ebx"); # + +- &call($enc_func); ++ &call (&label("pic_point1")); ++ &set_label("pic_point1"); ++ &blindpop("ebx"); ++ &add ("ebx", "\$_GLOBAL_OFFSET_TABLE_+[.-" . &label("pic_point1") . "]"); ++ &call("$enc_func\@PLT"); + + &mov("eax", &DWP($data_off,"esp","",0)); + &mov("ebx", &DWP($data_off+4,"esp","",0)); +@@ -218,7 +226,11 @@ + &mov(&DWP($data_off,"esp","",0), "eax"); # put back + &mov(&DWP($data_off+4,"esp","",0), "ebx"); # + +- &call($dec_func); ++ &call (&label("pic_point2")); ++ &set_label("pic_point2"); ++ &blindpop("ebx"); ++ &add ("ebx", "\$_GLOBAL_OFFSET_TABLE_+[.-" . &label("pic_point2") . "]"); ++ &call("$dec_func\@PLT"); + + &mov("eax", &DWP($data_off,"esp","",0)); # get return + &mov("ebx", &DWP($data_off+4,"esp","",0)); # +@@ -261,7 +273,11 @@ + &mov(&DWP($data_off,"esp","",0), "eax"); # put back + &mov(&DWP($data_off+4,"esp","",0), "ebx"); # + +- &call($dec_func); ++ &call (&label("pic_point3")); ++ &set_label("pic_point3"); ++ &blindpop("ebx"); ++ &add ("ebx", "\$_GLOBAL_OFFSET_TABLE_+[.-" . &label("pic_point3") . "]"); ++ &call("$dec_func\@PLT"); + + &mov("eax", &DWP($data_off,"esp","",0)); # get return + &mov("ebx", &DWP($data_off+4,"esp","",0)); # +Index: openssl-1.0.1c/crypto/perlasm/x86gas.pl +=================================================================== +--- openssl-1.0.1c.orig/crypto/perlasm/x86gas.pl 2011-12-09 20:16:35.000000000 +0100 ++++ openssl-1.0.1c/crypto/perlasm/x86gas.pl 2012-07-29 14:15:26.000000000 +0200 +@@ -161,6 +161,7 @@ + if ($::macosx) { push (@out,"$tmp,2\n"); } + elsif ($::elf) { push (@out,"$tmp,4\n"); } + else { push (@out,"$tmp\n"); } ++ if ($::elf) { push (@out,".hidden\tOPENSSL_ia32cap_P\n"); } + } + push(@out,$initseg) if ($initseg); + } +@@ -218,8 +219,23 @@ + elsif ($::elf) + { $initseg.=<<___; + .section .init ++___ ++ if ($::pic) ++ { $initseg.=<<___; ++ pushl %ebx ++ call .pic_point0 ++.pic_point0: ++ popl %ebx ++ addl \$_GLOBAL_OFFSET_TABLE_+[.-.pic_point0],%ebx ++ call $f\@PLT ++ popl %ebx ++___ ++ } ++ else ++ { $initseg.=<<___; + call $f + ___ ++ } + } + elsif ($::coff) + { $initseg.=<<___; # applies to both Cygwin and Mingw +Index: openssl-1.0.1c/crypto/x86cpuid.pl +=================================================================== +--- openssl-1.0.1c.orig/crypto/x86cpuid.pl 2012-02-28 15:20:34.000000000 +0100 ++++ openssl-1.0.1c/crypto/x86cpuid.pl 2012-07-29 14:15:26.000000000 +0200 +@@ -8,6 +8,8 @@ + + for (@ARGV) { $sse2=1 if (/-DOPENSSL_IA32_SSE2/); } + ++push(@out, ".hidden OPENSSL_ia32cap_P\n"); ++ + &function_begin("OPENSSL_ia32_cpuid"); + &xor ("edx","edx"); + &pushf (); +@@ -139,9 +141,7 @@ + &set_label("nocpuid"); + &function_end("OPENSSL_ia32_cpuid"); + +-&external_label("OPENSSL_ia32cap_P"); +- +-&function_begin_B("OPENSSL_rdtsc","EXTRN\t_OPENSSL_ia32cap_P:DWORD"); ++&function_begin_B("OPENSSL_rdtsc"); + &xor ("eax","eax"); + &xor ("edx","edx"); + &picmeup("ecx","OPENSSL_ia32cap_P"); +@@ -155,7 +155,7 @@ + # This works in Ring 0 only [read DJGPP+MS-DOS+privileged DPMI host], + # but it's safe to call it on any [supported] 32-bit platform... + # Just check for [non-]zero return value... +-&function_begin_B("OPENSSL_instrument_halt","EXTRN\t_OPENSSL_ia32cap_P:DWORD"); ++&function_begin_B("OPENSSL_instrument_halt"); + &picmeup("ecx","OPENSSL_ia32cap_P"); + &bt (&DWP(0,"ecx"),4); + &jnc (&label("nohalt")); # no TSC +@@ -222,7 +222,7 @@ + &ret (); + &function_end_B("OPENSSL_far_spin"); + +-&function_begin_B("OPENSSL_wipe_cpu","EXTRN\t_OPENSSL_ia32cap_P:DWORD"); ++&function_begin_B("OPENSSL_wipe_cpu"); + &xor ("eax","eax"); + &xor ("edx","edx"); + &picmeup("ecx","OPENSSL_ia32cap_P"); diff --git a/meta-fsl-ppc/recipes-connectivity/openssl/openssl/debian/version-script.patch b/meta-fsl-ppc/recipes-connectivity/openssl/openssl/debian/version-script.patch new file mode 100644 index 00000000..ece8b9b4 --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/openssl/openssl/debian/version-script.patch @@ -0,0 +1,4670 @@ +Upstream-Status: Backport [debian] + +Index: openssl-1.0.1d/Configure +=================================================================== +--- openssl-1.0.1d.orig/Configure 2013-02-06 19:41:43.000000000 +0100 ++++ openssl-1.0.1d/Configure 2013-02-06 19:41:43.000000000 +0100 +@@ -1621,6 +1621,8 @@ + } + } + ++$shared_ldflag .= " -Wl,--version-script=openssl.ld"; ++ + open(IN,'$Makefile.new") || die "unable to create $Makefile.new:$!\n"; +Index: openssl-1.0.1d/openssl.ld +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ openssl-1.0.1d/openssl.ld 2013-02-06 19:44:25.000000000 +0100 +@@ -0,0 +1,4620 @@ ++OPENSSL_1.0.0 { ++ global: ++ BIO_f_ssl; ++ BIO_new_buffer_ssl_connect; ++ BIO_new_ssl; ++ BIO_new_ssl_connect; ++ BIO_proxy_ssl_copy_session_id; ++ BIO_ssl_copy_session_id; ++ BIO_ssl_shutdown; ++ d2i_SSL_SESSION; ++ DTLSv1_client_method; ++ DTLSv1_method; ++ DTLSv1_server_method; ++ ERR_load_SSL_strings; ++ i2d_SSL_SESSION; ++ kssl_build_principal_2; ++ kssl_cget_tkt; ++ kssl_check_authent; ++ kssl_ctx_free; ++ kssl_ctx_new; ++ kssl_ctx_setkey; ++ kssl_ctx_setprinc; ++ kssl_ctx_setstring; ++ kssl_ctx_show; ++ kssl_err_set; ++ kssl_krb5_free_data_contents; ++ kssl_sget_tkt; ++ kssl_skip_confound; ++ kssl_validate_times; ++ PEM_read_bio_SSL_SESSION; ++ PEM_read_SSL_SESSION; ++ PEM_write_bio_SSL_SESSION; ++ PEM_write_SSL_SESSION; ++ SSL_accept; ++ SSL_add_client_CA; ++ SSL_add_dir_cert_subjects_to_stack; ++ SSL_add_dir_cert_subjs_to_stk; ++ SSL_add_file_cert_subjects_to_stack; ++ SSL_add_file_cert_subjs_to_stk; ++ SSL_alert_desc_string; ++ SSL_alert_desc_string_long; ++ SSL_alert_type_string; ++ SSL_alert_type_string_long; ++ SSL_callback_ctrl; ++ SSL_check_private_key; ++ SSL_CIPHER_description; ++ SSL_CIPHER_get_bits; ++ SSL_CIPHER_get_name; ++ SSL_CIPHER_get_version; ++ SSL_clear; ++ SSL_COMP_add_compression_method; ++ SSL_COMP_get_compression_methods; ++ SSL_COMP_get_compress_methods; ++ SSL_COMP_get_name; ++ SSL_connect; ++ SSL_copy_session_id; ++ SSL_ctrl; ++ SSL_CTX_add_client_CA; ++ SSL_CTX_add_session; ++ SSL_CTX_callback_ctrl; ++ SSL_CTX_check_private_key; ++ SSL_CTX_ctrl; ++ SSL_CTX_flush_sessions; ++ SSL_CTX_free; ++ SSL_CTX_get_cert_store; ++ SSL_CTX_get_client_CA_list; ++ SSL_CTX_get_client_cert_cb; ++ SSL_CTX_get_ex_data; ++ SSL_CTX_get_ex_new_index; ++ SSL_CTX_get_info_callback; ++ SSL_CTX_get_quiet_shutdown; ++ SSL_CTX_get_timeout; ++ SSL_CTX_get_verify_callback; ++ SSL_CTX_get_verify_depth; ++ SSL_CTX_get_verify_mode; ++ SSL_CTX_load_verify_locations; ++ SSL_CTX_new; ++ SSL_CTX_remove_session; ++ SSL_CTX_sess_get_get_cb; ++ SSL_CTX_sess_get_new_cb; ++ SSL_CTX_sess_get_remove_cb; ++ SSL_CTX_sessions; ++ SSL_CTX_sess_set_get_cb; ++ SSL_CTX_sess_set_new_cb; ++ SSL_CTX_sess_set_remove_cb; ++ SSL_CTX_set1_param; ++ SSL_CTX_set_cert_store; ++ SSL_CTX_set_cert_verify_callback; ++ SSL_CTX_set_cert_verify_cb; ++ SSL_CTX_set_cipher_list; ++ SSL_CTX_set_client_CA_list; ++ SSL_CTX_set_client_cert_cb; ++ SSL_CTX_set_client_cert_engine; ++ SSL_CTX_set_cookie_generate_cb; ++ SSL_CTX_set_cookie_verify_cb; ++ SSL_CTX_set_default_passwd_cb; ++ SSL_CTX_set_default_passwd_cb_userdata; ++ SSL_CTX_set_default_verify_paths; ++ SSL_CTX_set_def_passwd_cb_ud; ++ SSL_CTX_set_def_verify_paths; ++ SSL_CTX_set_ex_data; ++ SSL_CTX_set_generate_session_id; ++ SSL_CTX_set_info_callback; ++ SSL_CTX_set_msg_callback; ++ SSL_CTX_set_psk_client_callback; ++ SSL_CTX_set_psk_server_callback; ++ SSL_CTX_set_purpose; ++ SSL_CTX_set_quiet_shutdown; ++ SSL_CTX_set_session_id_context; ++ SSL_CTX_set_ssl_version; ++ SSL_CTX_set_timeout; ++ SSL_CTX_set_tmp_dh_callback; ++ SSL_CTX_set_tmp_ecdh_callback; ++ SSL_CTX_set_tmp_rsa_callback; ++ SSL_CTX_set_trust; ++ SSL_CTX_set_verify; ++ SSL_CTX_set_verify_depth; ++ SSL_CTX_use_cert_chain_file; ++ SSL_CTX_use_certificate; ++ SSL_CTX_use_certificate_ASN1; ++ SSL_CTX_use_certificate_chain_file; ++ SSL_CTX_use_certificate_file; ++ SSL_CTX_use_PrivateKey; ++ SSL_CTX_use_PrivateKey_ASN1; ++ SSL_CTX_use_PrivateKey_file; ++ SSL_CTX_use_psk_identity_hint; ++ SSL_CTX_use_RSAPrivateKey; ++ SSL_CTX_use_RSAPrivateKey_ASN1; ++ SSL_CTX_use_RSAPrivateKey_file; ++ SSL_do_handshake; ++ SSL_dup; ++ SSL_dup_CA_list; ++ SSLeay_add_ssl_algorithms; ++ SSL_free; ++ SSL_get1_session; ++ SSL_get_certificate; ++ SSL_get_cipher_list; ++ SSL_get_ciphers; ++ SSL_get_client_CA_list; ++ SSL_get_current_cipher; ++ SSL_get_current_compression; ++ SSL_get_current_expansion; ++ SSL_get_default_timeout; ++ SSL_get_error; ++ SSL_get_ex_data; ++ SSL_get_ex_data_X509_STORE_CTX_idx; ++ SSL_get_ex_d_X509_STORE_CTX_idx; ++ SSL_get_ex_new_index; ++ SSL_get_fd; ++ SSL_get_finished; ++ SSL_get_info_callback; ++ SSL_get_peer_cert_chain; ++ SSL_get_peer_certificate; ++ SSL_get_peer_finished; ++ SSL_get_privatekey; ++ SSL_get_psk_identity; ++ SSL_get_psk_identity_hint; ++ SSL_get_quiet_shutdown; ++ SSL_get_rbio; ++ SSL_get_read_ahead; ++ SSL_get_rfd; ++ SSL_get_servername; ++ SSL_get_servername_type; ++ SSL_get_session; ++ SSL_get_shared_ciphers; ++ SSL_get_shutdown; ++ SSL_get_SSL_CTX; ++ SSL_get_ssl_method; ++ SSL_get_verify_callback; ++ SSL_get_verify_depth; ++ SSL_get_verify_mode; ++ SSL_get_verify_result; ++ SSL_get_version; ++ SSL_get_wbio; ++ SSL_get_wfd; ++ SSL_has_matching_session_id; ++ SSL_library_init; ++ SSL_load_client_CA_file; ++ SSL_load_error_strings; ++ SSL_new; ++ SSL_peek; ++ SSL_pending; ++ SSL_read; ++ SSL_renegotiate; ++ SSL_renegotiate_pending; ++ SSL_rstate_string; ++ SSL_rstate_string_long; ++ SSL_SESSION_cmp; ++ SSL_SESSION_free; ++ SSL_SESSION_get_ex_data; ++ SSL_SESSION_get_ex_new_index; ++ SSL_SESSION_get_id; ++ SSL_SESSION_get_time; ++ SSL_SESSION_get_timeout; ++ SSL_SESSION_hash; ++ SSL_SESSION_new; ++ SSL_SESSION_print; ++ SSL_SESSION_print_fp; ++ SSL_SESSION_set_ex_data; ++ SSL_SESSION_set_time; ++ SSL_SESSION_set_timeout; ++ SSL_set1_param; ++ SSL_set_accept_state; ++ SSL_set_bio; ++ SSL_set_cipher_list; ++ SSL_set_client_CA_list; ++ SSL_set_connect_state; ++ SSL_set_ex_data; ++ SSL_set_fd; ++ SSL_set_generate_session_id; ++ SSL_set_info_callback; ++ SSL_set_msg_callback; ++ SSL_set_psk_client_callback; ++ SSL_set_psk_server_callback; ++ SSL_set_purpose; ++ SSL_set_quiet_shutdown; ++ SSL_set_read_ahead; ++ SSL_set_rfd; ++ SSL_set_session; ++ SSL_set_session_id_context; ++ SSL_set_session_secret_cb; ++ SSL_set_session_ticket_ext; ++ SSL_set_session_ticket_ext_cb; ++ SSL_set_shutdown; ++ SSL_set_SSL_CTX; ++ SSL_set_ssl_method; ++ SSL_set_tmp_dh_callback; ++ SSL_set_tmp_ecdh_callback; ++ SSL_set_tmp_rsa_callback; ++ SSL_set_trust; ++ SSL_set_verify; ++ SSL_set_verify_depth; ++ SSL_set_verify_result; ++ SSL_set_wfd; ++ SSL_shutdown; ++ SSL_state; ++ SSL_state_string; ++ SSL_state_string_long; ++ SSL_use_certificate; ++ SSL_use_certificate_ASN1; ++ SSL_use_certificate_file; ++ SSL_use_PrivateKey; ++ SSL_use_PrivateKey_ASN1; ++ SSL_use_PrivateKey_file; ++ SSL_use_psk_identity_hint; ++ SSL_use_RSAPrivateKey; ++ SSL_use_RSAPrivateKey_ASN1; ++ SSL_use_RSAPrivateKey_file; ++ SSLv23_client_method; ++ SSLv23_method; ++ SSLv23_server_method; ++ SSLv2_client_method; ++ SSLv2_method; ++ SSLv2_server_method; ++ SSLv3_client_method; ++ SSLv3_method; ++ SSLv3_server_method; ++ SSL_version; ++ SSL_want; ++ SSL_write; ++ TLSv1_client_method; ++ TLSv1_method; ++ TLSv1_server_method; ++ ++ ++ SSLeay; ++ SSLeay_version; ++ ASN1_BIT_STRING_asn1_meth; ++ ASN1_HEADER_free; ++ ASN1_HEADER_new; ++ ASN1_IA5STRING_asn1_meth; ++ ASN1_INTEGER_get; ++ ASN1_INTEGER_set; ++ ASN1_INTEGER_to_BN; ++ ASN1_OBJECT_create; ++ ASN1_OBJECT_free; ++ ASN1_OBJECT_new; ++ ASN1_PRINTABLE_type; ++ ASN1_STRING_cmp; ++ ASN1_STRING_dup; ++ ASN1_STRING_free; ++ ASN1_STRING_new; ++ ASN1_STRING_print; ++ ASN1_STRING_set; ++ ASN1_STRING_type_new; ++ ASN1_TYPE_free; ++ ASN1_TYPE_new; ++ ASN1_UNIVERSALSTRING_to_string; ++ ASN1_UTCTIME_check; ++ ASN1_UTCTIME_print; ++ ASN1_UTCTIME_set; ++ ASN1_check_infinite_end; ++ ASN1_d2i_bio; ++ ASN1_d2i_fp; ++ ASN1_digest; ++ ASN1_dup; ++ ASN1_get_object; ++ ASN1_i2d_bio; ++ ASN1_i2d_fp; ++ ASN1_object_size; ++ ASN1_parse; ++ ASN1_put_object; ++ ASN1_sign; ++ ASN1_verify; ++ BF_cbc_encrypt; ++ BF_cfb64_encrypt; ++ BF_ecb_encrypt; ++ BF_encrypt; ++ BF_ofb64_encrypt; ++ BF_options; ++ BF_set_key; ++ BIO_CONNECT_free; ++ BIO_CONNECT_new; ++ BIO_accept; ++ BIO_ctrl; ++ BIO_int_ctrl; ++ BIO_debug_callback; ++ BIO_dump; ++ BIO_dup_chain; ++ BIO_f_base64; ++ BIO_f_buffer; ++ BIO_f_cipher; ++ BIO_f_md; ++ BIO_f_null; ++ BIO_f_proxy_server; ++ BIO_fd_non_fatal_error; ++ BIO_fd_should_retry; ++ BIO_find_type; ++ BIO_free; ++ BIO_free_all; ++ BIO_get_accept_socket; ++ BIO_get_filter_bio; ++ BIO_get_host_ip; ++ BIO_get_port; ++ BIO_get_retry_BIO; ++ BIO_get_retry_reason; ++ BIO_gethostbyname; ++ BIO_gets; ++ BIO_new; ++ BIO_new_accept; ++ BIO_new_connect; ++ BIO_new_fd; ++ BIO_new_file; ++ BIO_new_fp; ++ BIO_new_socket; ++ BIO_pop; ++ BIO_printf; ++ BIO_push; ++ BIO_puts; ++ BIO_read; ++ BIO_s_accept; ++ BIO_s_connect; ++ BIO_s_fd; ++ BIO_s_file; ++ BIO_s_mem; ++ BIO_s_null; ++ BIO_s_proxy_client; ++ BIO_s_socket; ++ BIO_set; ++ BIO_set_cipher; ++ BIO_set_tcp_ndelay; ++ BIO_sock_cleanup; ++ BIO_sock_error; ++ BIO_sock_init; ++ BIO_sock_non_fatal_error; ++ BIO_sock_should_retry; ++ BIO_socket_ioctl; ++ BIO_write; ++ BN_CTX_free; ++ BN_CTX_new; ++ BN_MONT_CTX_free; ++ BN_MONT_CTX_new; ++ BN_MONT_CTX_set; ++ BN_add; ++ BN_add_word; ++ BN_hex2bn; ++ BN_bin2bn; ++ BN_bn2hex; ++ BN_bn2bin; ++ BN_clear; ++ BN_clear_bit; ++ BN_clear_free; ++ BN_cmp; ++ BN_copy; ++ BN_div; ++ BN_div_word; ++ BN_dup; ++ BN_free; ++ BN_from_montgomery; ++ BN_gcd; ++ BN_generate_prime; ++ BN_get_word; ++ BN_is_bit_set; ++ BN_is_prime; ++ BN_lshift; ++ BN_lshift1; ++ BN_mask_bits; ++ BN_mod; ++ BN_mod_exp; ++ BN_mod_exp_mont; ++ BN_mod_exp_simple; ++ BN_mod_inverse; ++ BN_mod_mul; ++ BN_mod_mul_montgomery; ++ BN_mod_word; ++ BN_mul; ++ BN_new; ++ BN_num_bits; ++ BN_num_bits_word; ++ BN_options; ++ BN_print; ++ BN_print_fp; ++ BN_rand; ++ BN_reciprocal; ++ BN_rshift; ++ BN_rshift1; ++ BN_set_bit; ++ BN_set_word; ++ BN_sqr; ++ BN_sub; ++ BN_to_ASN1_INTEGER; ++ BN_ucmp; ++ BN_value_one; ++ BUF_MEM_free; ++ BUF_MEM_grow; ++ BUF_MEM_new; ++ BUF_strdup; ++ CONF_free; ++ CONF_get_number; ++ CONF_get_section; ++ CONF_get_string; ++ CONF_load; ++ CRYPTO_add_lock; ++ CRYPTO_dbg_free; ++ CRYPTO_dbg_malloc; ++ CRYPTO_dbg_realloc; ++ CRYPTO_dbg_remalloc; ++ CRYPTO_free; ++ CRYPTO_get_add_lock_callback; ++ CRYPTO_get_id_callback; ++ CRYPTO_get_lock_name; ++ CRYPTO_get_locking_callback; ++ CRYPTO_get_mem_functions; ++ CRYPTO_lock; ++ CRYPTO_malloc; ++ CRYPTO_mem_ctrl; ++ CRYPTO_mem_leaks; ++ CRYPTO_mem_leaks_cb; ++ CRYPTO_mem_leaks_fp; ++ CRYPTO_realloc; ++ CRYPTO_remalloc; ++ CRYPTO_set_add_lock_callback; ++ CRYPTO_set_id_callback; ++ CRYPTO_set_locking_callback; ++ CRYPTO_set_mem_functions; ++ CRYPTO_thread_id; ++ DH_check; ++ DH_compute_key; ++ DH_free; ++ DH_generate_key; ++ DH_generate_parameters; ++ DH_new; ++ DH_size; ++ DHparams_print; ++ DHparams_print_fp; ++ DSA_free; ++ DSA_generate_key; ++ DSA_generate_parameters; ++ DSA_is_prime; ++ DSA_new; ++ DSA_print; ++ DSA_print_fp; ++ DSA_sign; ++ DSA_sign_setup; ++ DSA_size; ++ DSA_verify; ++ DSAparams_print; ++ DSAparams_print_fp; ++ ERR_clear_error; ++ ERR_error_string; ++ ERR_free_strings; ++ ERR_func_error_string; ++ ERR_get_err_state_table; ++ ERR_get_error; ++ ERR_get_error_line; ++ ERR_get_state; ++ ERR_get_string_table; ++ ERR_lib_error_string; ++ ERR_load_ASN1_strings; ++ ERR_load_BIO_strings; ++ ERR_load_BN_strings; ++ ERR_load_BUF_strings; ++ ERR_load_CONF_strings; ++ ERR_load_DH_strings; ++ ERR_load_DSA_strings; ++ ERR_load_ERR_strings; ++ ERR_load_EVP_strings; ++ ERR_load_OBJ_strings; ++ ERR_load_PEM_strings; ++ ERR_load_PROXY_strings; ++ ERR_load_RSA_strings; ++ ERR_load_X509_strings; ++ ERR_load_crypto_strings; ++ ERR_load_strings; ++ ERR_peek_error; ++ ERR_peek_error_line; ++ ERR_print_errors; ++ ERR_print_errors_fp; ++ ERR_put_error; ++ ERR_reason_error_string; ++ ERR_remove_state; ++ EVP_BytesToKey; ++ EVP_CIPHER_CTX_cleanup; ++ EVP_CipherFinal; ++ EVP_CipherInit; ++ EVP_CipherUpdate; ++ EVP_DecodeBlock; ++ EVP_DecodeFinal; ++ EVP_DecodeInit; ++ EVP_DecodeUpdate; ++ EVP_DecryptFinal; ++ EVP_DecryptInit; ++ EVP_DecryptUpdate; ++ EVP_DigestFinal; ++ EVP_DigestInit; ++ EVP_DigestUpdate; ++ EVP_EncodeBlock; ++ EVP_EncodeFinal; ++ EVP_EncodeInit; ++ EVP_EncodeUpdate; ++ EVP_EncryptFinal; ++ EVP_EncryptInit; ++ EVP_EncryptUpdate; ++ EVP_OpenFinal; ++ EVP_OpenInit; ++ EVP_PKEY_assign; ++ EVP_PKEY_copy_parameters; ++ EVP_PKEY_free; ++ EVP_PKEY_missing_parameters; ++ EVP_PKEY_new; ++ EVP_PKEY_save_parameters; ++ EVP_PKEY_size; ++ EVP_PKEY_type; ++ EVP_SealFinal; ++ EVP_SealInit; ++ EVP_SignFinal; ++ EVP_VerifyFinal; ++ EVP_add_alias; ++ EVP_add_cipher; ++ EVP_add_digest; ++ EVP_bf_cbc; ++ EVP_bf_cfb64; ++ EVP_bf_ecb; ++ EVP_bf_ofb; ++ EVP_cleanup; ++ EVP_des_cbc; ++ EVP_des_cfb64; ++ EVP_des_ecb; ++ EVP_des_ede; ++ EVP_des_ede3; ++ EVP_des_ede3_cbc; ++ EVP_des_ede3_cfb64; ++ EVP_des_ede3_ofb; ++ EVP_des_ede_cbc; ++ EVP_des_ede_cfb64; ++ EVP_des_ede_ofb; ++ EVP_des_ofb; ++ EVP_desx_cbc; ++ EVP_dss; ++ EVP_dss1; ++ EVP_enc_null; ++ EVP_get_cipherbyname; ++ EVP_get_digestbyname; ++ EVP_get_pw_prompt; ++ EVP_idea_cbc; ++ EVP_idea_cfb64; ++ EVP_idea_ecb; ++ EVP_idea_ofb; ++ EVP_md2; ++ EVP_md5; ++ EVP_md_null; ++ EVP_rc2_cbc; ++ EVP_rc2_cfb64; ++ EVP_rc2_ecb; ++ EVP_rc2_ofb; ++ EVP_rc4; ++ EVP_read_pw_string; ++ EVP_set_pw_prompt; ++ EVP_sha; ++ EVP_sha1; ++ MD2; ++ MD2_Final; ++ MD2_Init; ++ MD2_Update; ++ MD2_options; ++ MD5; ++ MD5_Final; ++ MD5_Init; ++ MD5_Update; ++ MDC2; ++ MDC2_Final; ++ MDC2_Init; ++ MDC2_Update; ++ NETSCAPE_SPKAC_free; ++ NETSCAPE_SPKAC_new; ++ NETSCAPE_SPKI_free; ++ NETSCAPE_SPKI_new; ++ NETSCAPE_SPKI_sign; ++ NETSCAPE_SPKI_verify; ++ OBJ_add_object; ++ OBJ_bsearch; ++ OBJ_cleanup; ++ OBJ_cmp; ++ OBJ_create; ++ OBJ_dup; ++ OBJ_ln2nid; ++ OBJ_new_nid; ++ OBJ_nid2ln; ++ OBJ_nid2obj; ++ OBJ_nid2sn; ++ OBJ_obj2nid; ++ OBJ_sn2nid; ++ OBJ_txt2nid; ++ PEM_ASN1_read; ++ PEM_ASN1_read_bio; ++ PEM_ASN1_write; ++ PEM_ASN1_write_bio; ++ PEM_SealFinal; ++ PEM_SealInit; ++ PEM_SealUpdate; ++ PEM_SignFinal; ++ PEM_SignInit; ++ PEM_SignUpdate; ++ PEM_X509_INFO_read; ++ PEM_X509_INFO_read_bio; ++ PEM_X509_INFO_write_bio; ++ PEM_dek_info; ++ PEM_do_header; ++ PEM_get_EVP_CIPHER_INFO; ++ PEM_proc_type; ++ PEM_read; ++ PEM_read_DHparams; ++ PEM_read_DSAPrivateKey; ++ PEM_read_DSAparams; ++ PEM_read_PKCS7; ++ PEM_read_PrivateKey; ++ PEM_read_RSAPrivateKey; ++ PEM_read_X509; ++ PEM_read_X509_CRL; ++ PEM_read_X509_REQ; ++ PEM_read_bio; ++ PEM_read_bio_DHparams; ++ PEM_read_bio_DSAPrivateKey; ++ PEM_read_bio_DSAparams; ++ PEM_read_bio_PKCS7; ++ PEM_read_bio_PrivateKey; ++ PEM_read_bio_RSAPrivateKey; ++ PEM_read_bio_X509; ++ PEM_read_bio_X509_CRL; ++ PEM_read_bio_X509_REQ; ++ PEM_write; ++ PEM_write_DHparams; ++ PEM_write_DSAPrivateKey; ++ PEM_write_DSAparams; ++ PEM_write_PKCS7; ++ PEM_write_PrivateKey; ++ PEM_write_RSAPrivateKey; ++ PEM_write_X509; ++ PEM_write_X509_CRL; ++ PEM_write_X509_REQ; ++ PEM_write_bio; ++ PEM_write_bio_DHparams; ++ PEM_write_bio_DSAPrivateKey; ++ PEM_write_bio_DSAparams; ++ PEM_write_bio_PKCS7; ++ PEM_write_bio_PrivateKey; ++ PEM_write_bio_RSAPrivateKey; ++ PEM_write_bio_X509; ++ PEM_write_bio_X509_CRL; ++ PEM_write_bio_X509_REQ; ++ PKCS7_DIGEST_free; ++ PKCS7_DIGEST_new; ++ PKCS7_ENCRYPT_free; ++ PKCS7_ENCRYPT_new; ++ PKCS7_ENC_CONTENT_free; ++ PKCS7_ENC_CONTENT_new; ++ PKCS7_ENVELOPE_free; ++ PKCS7_ENVELOPE_new; ++ PKCS7_ISSUER_AND_SERIAL_digest; ++ PKCS7_ISSUER_AND_SERIAL_free; ++ PKCS7_ISSUER_AND_SERIAL_new; ++ PKCS7_RECIP_INFO_free; ++ PKCS7_RECIP_INFO_new; ++ PKCS7_SIGNED_free; ++ PKCS7_SIGNED_new; ++ PKCS7_SIGNER_INFO_free; ++ PKCS7_SIGNER_INFO_new; ++ PKCS7_SIGN_ENVELOPE_free; ++ PKCS7_SIGN_ENVELOPE_new; ++ PKCS7_dup; ++ PKCS7_free; ++ PKCS7_new; ++ PROXY_ENTRY_add_noproxy; ++ PROXY_ENTRY_clear_noproxy; ++ PROXY_ENTRY_free; ++ PROXY_ENTRY_get_noproxy; ++ PROXY_ENTRY_new; ++ PROXY_ENTRY_set_server; ++ PROXY_add_noproxy; ++ PROXY_add_server; ++ PROXY_check_by_host; ++ PROXY_check_url; ++ PROXY_clear_noproxy; ++ PROXY_free; ++ PROXY_get_noproxy; ++ PROXY_get_proxies; ++ PROXY_get_proxy_entry; ++ PROXY_load_conf; ++ PROXY_new; ++ PROXY_print; ++ RAND_bytes; ++ RAND_cleanup; ++ RAND_file_name; ++ RAND_load_file; ++ RAND_screen; ++ RAND_seed; ++ RAND_write_file; ++ RC2_cbc_encrypt; ++ RC2_cfb64_encrypt; ++ RC2_ecb_encrypt; ++ RC2_encrypt; ++ RC2_ofb64_encrypt; ++ RC2_set_key; ++ RC4; ++ RC4_options; ++ RC4_set_key; ++ RSAPrivateKey_asn1_meth; ++ RSAPrivateKey_dup; ++ RSAPublicKey_dup; ++ RSA_PKCS1_SSLeay; ++ RSA_free; ++ RSA_generate_key; ++ RSA_new; ++ RSA_new_method; ++ RSA_print; ++ RSA_print_fp; ++ RSA_private_decrypt; ++ RSA_private_encrypt; ++ RSA_public_decrypt; ++ RSA_public_encrypt; ++ RSA_set_default_method; ++ RSA_sign; ++ RSA_sign_ASN1_OCTET_STRING; ++ RSA_size; ++ RSA_verify; ++ RSA_verify_ASN1_OCTET_STRING; ++ SHA; ++ SHA1; ++ SHA1_Final; ++ SHA1_Init; ++ SHA1_Update; ++ SHA_Final; ++ SHA_Init; ++ SHA_Update; ++ OpenSSL_add_all_algorithms; ++ OpenSSL_add_all_ciphers; ++ OpenSSL_add_all_digests; ++ TXT_DB_create_index; ++ TXT_DB_free; ++ TXT_DB_get_by_index; ++ TXT_DB_insert; ++ TXT_DB_read; ++ TXT_DB_write; ++ X509_ALGOR_free; ++ X509_ALGOR_new; ++ X509_ATTRIBUTE_free; ++ X509_ATTRIBUTE_new; ++ X509_CINF_free; ++ X509_CINF_new; ++ X509_CRL_INFO_free; ++ X509_CRL_INFO_new; ++ X509_CRL_add_ext; ++ X509_CRL_cmp; ++ X509_CRL_delete_ext; ++ X509_CRL_dup; ++ X509_CRL_free; ++ X509_CRL_get_ext; ++ X509_CRL_get_ext_by_NID; ++ X509_CRL_get_ext_by_OBJ; ++ X509_CRL_get_ext_by_critical; ++ X509_CRL_get_ext_count; ++ X509_CRL_new; ++ X509_CRL_sign; ++ X509_CRL_verify; ++ X509_EXTENSION_create_by_NID; ++ X509_EXTENSION_create_by_OBJ; ++ X509_EXTENSION_dup; ++ X509_EXTENSION_free; ++ X509_EXTENSION_get_critical; ++ X509_EXTENSION_get_data; ++ X509_EXTENSION_get_object; ++ X509_EXTENSION_new; ++ X509_EXTENSION_set_critical; ++ X509_EXTENSION_set_data; ++ X509_EXTENSION_set_object; ++ X509_INFO_free; ++ X509_INFO_new; ++ X509_LOOKUP_by_alias; ++ X509_LOOKUP_by_fingerprint; ++ X509_LOOKUP_by_issuer_serial; ++ X509_LOOKUP_by_subject; ++ X509_LOOKUP_ctrl; ++ X509_LOOKUP_file; ++ X509_LOOKUP_free; ++ X509_LOOKUP_hash_dir; ++ X509_LOOKUP_init; ++ X509_LOOKUP_new; ++ X509_LOOKUP_shutdown; ++ X509_NAME_ENTRY_create_by_NID; ++ X509_NAME_ENTRY_create_by_OBJ; ++ X509_NAME_ENTRY_dup; ++ X509_NAME_ENTRY_free; ++ X509_NAME_ENTRY_get_data; ++ X509_NAME_ENTRY_get_object; ++ X509_NAME_ENTRY_new; ++ X509_NAME_ENTRY_set_data; ++ X509_NAME_ENTRY_set_object; ++ X509_NAME_add_entry; ++ X509_NAME_cmp; ++ X509_NAME_delete_entry; ++ X509_NAME_digest; ++ X509_NAME_dup; ++ X509_NAME_entry_count; ++ X509_NAME_free; ++ X509_NAME_get_entry; ++ X509_NAME_get_index_by_NID; ++ X509_NAME_get_index_by_OBJ; ++ X509_NAME_get_text_by_NID; ++ X509_NAME_get_text_by_OBJ; ++ X509_NAME_hash; ++ X509_NAME_new; ++ X509_NAME_oneline; ++ X509_NAME_print; ++ X509_NAME_set; ++ X509_OBJECT_free_contents; ++ X509_OBJECT_retrieve_by_subject; ++ X509_OBJECT_up_ref_count; ++ X509_PKEY_free; ++ X509_PKEY_new; ++ X509_PUBKEY_free; ++ X509_PUBKEY_get; ++ X509_PUBKEY_new; ++ X509_PUBKEY_set; ++ X509_REQ_INFO_free; ++ X509_REQ_INFO_new; ++ X509_REQ_dup; ++ X509_REQ_free; ++ X509_REQ_get_pubkey; ++ X509_REQ_new; ++ X509_REQ_print; ++ X509_REQ_print_fp; ++ X509_REQ_set_pubkey; ++ X509_REQ_set_subject_name; ++ X509_REQ_set_version; ++ X509_REQ_sign; ++ X509_REQ_to_X509; ++ X509_REQ_verify; ++ X509_REVOKED_add_ext; ++ X509_REVOKED_delete_ext; ++ X509_REVOKED_free; ++ X509_REVOKED_get_ext; ++ X509_REVOKED_get_ext_by_NID; ++ X509_REVOKED_get_ext_by_OBJ; ++ X509_REVOKED_get_ext_by_critical; ++ X509_REVOKED_get_ext_by_critic; ++ X509_REVOKED_get_ext_count; ++ X509_REVOKED_new; ++ X509_SIG_free; ++ X509_SIG_new; ++ X509_STORE_CTX_cleanup; ++ X509_STORE_CTX_init; ++ X509_STORE_add_cert; ++ X509_STORE_add_lookup; ++ X509_STORE_free; ++ X509_STORE_get_by_subject; ++ X509_STORE_load_locations; ++ X509_STORE_new; ++ X509_STORE_set_default_paths; ++ X509_VAL_free; ++ X509_VAL_new; ++ X509_add_ext; ++ X509_asn1_meth; ++ X509_certificate_type; ++ X509_check_private_key; ++ X509_cmp_current_time; ++ X509_delete_ext; ++ X509_digest; ++ X509_dup; ++ X509_free; ++ X509_get_default_cert_area; ++ X509_get_default_cert_dir; ++ X509_get_default_cert_dir_env; ++ X509_get_default_cert_file; ++ X509_get_default_cert_file_env; ++ X509_get_default_private_dir; ++ X509_get_ext; ++ X509_get_ext_by_NID; ++ X509_get_ext_by_OBJ; ++ X509_get_ext_by_critical; ++ X509_get_ext_count; ++ X509_get_issuer_name; ++ X509_get_pubkey; ++ X509_get_pubkey_parameters; ++ X509_get_serialNumber; ++ X509_get_subject_name; ++ X509_gmtime_adj; ++ X509_issuer_and_serial_cmp; ++ X509_issuer_and_serial_hash; ++ X509_issuer_name_cmp; ++ X509_issuer_name_hash; ++ X509_load_cert_file; ++ X509_new; ++ X509_print; ++ X509_print_fp; ++ X509_set_issuer_name; ++ X509_set_notAfter; ++ X509_set_notBefore; ++ X509_set_pubkey; ++ X509_set_serialNumber; ++ X509_set_subject_name; ++ X509_set_version; ++ X509_sign; ++ X509_subject_name_cmp; ++ X509_subject_name_hash; ++ X509_to_X509_REQ; ++ X509_verify; ++ X509_verify_cert; ++ X509_verify_cert_error_string; ++ X509v3_add_ext; ++ X509v3_add_extension; ++ X509v3_add_netscape_extensions; ++ X509v3_add_standard_extensions; ++ X509v3_cleanup_extensions; ++ X509v3_data_type_by_NID; ++ X509v3_data_type_by_OBJ; ++ X509v3_delete_ext; ++ X509v3_get_ext; ++ X509v3_get_ext_by_NID; ++ X509v3_get_ext_by_OBJ; ++ X509v3_get_ext_by_critical; ++ X509v3_get_ext_count; ++ X509v3_pack_string; ++ X509v3_pack_type_by_NID; ++ X509v3_pack_type_by_OBJ; ++ X509v3_unpack_string; ++ _des_crypt; ++ a2d_ASN1_OBJECT; ++ a2i_ASN1_INTEGER; ++ a2i_ASN1_STRING; ++ asn1_Finish; ++ asn1_GetSequence; ++ bn_div_words; ++ bn_expand2; ++ bn_mul_add_words; ++ bn_mul_words; ++ BN_uadd; ++ BN_usub; ++ bn_sqr_words; ++ _ossl_old_crypt; ++ d2i_ASN1_BIT_STRING; ++ d2i_ASN1_BOOLEAN; ++ d2i_ASN1_HEADER; ++ d2i_ASN1_IA5STRING; ++ d2i_ASN1_INTEGER; ++ d2i_ASN1_OBJECT; ++ d2i_ASN1_OCTET_STRING; ++ d2i_ASN1_PRINTABLE; ++ d2i_ASN1_PRINTABLESTRING; ++ d2i_ASN1_SET; ++ d2i_ASN1_T61STRING; ++ d2i_ASN1_TYPE; ++ d2i_ASN1_UTCTIME; ++ d2i_ASN1_bytes; ++ d2i_ASN1_type_bytes; ++ d2i_DHparams; ++ d2i_DSAPrivateKey; ++ d2i_DSAPrivateKey_bio; ++ d2i_DSAPrivateKey_fp; ++ d2i_DSAPublicKey; ++ d2i_DSAparams; ++ d2i_NETSCAPE_SPKAC; ++ d2i_NETSCAPE_SPKI; ++ d2i_Netscape_RSA; ++ d2i_PKCS7; ++ d2i_PKCS7_DIGEST; ++ d2i_PKCS7_ENCRYPT; ++ d2i_PKCS7_ENC_CONTENT; ++ d2i_PKCS7_ENVELOPE; ++ d2i_PKCS7_ISSUER_AND_SERIAL; ++ d2i_PKCS7_RECIP_INFO; ++ d2i_PKCS7_SIGNED; ++ d2i_PKCS7_SIGNER_INFO; ++ d2i_PKCS7_SIGN_ENVELOPE; ++ d2i_PKCS7_bio; ++ d2i_PKCS7_fp; ++ d2i_PrivateKey; ++ d2i_PublicKey; ++ d2i_RSAPrivateKey; ++ d2i_RSAPrivateKey_bio; ++ d2i_RSAPrivateKey_fp; ++ d2i_RSAPublicKey; ++ d2i_X509; ++ d2i_X509_ALGOR; ++ d2i_X509_ATTRIBUTE; ++ d2i_X509_CINF; ++ d2i_X509_CRL; ++ d2i_X509_CRL_INFO; ++ d2i_X509_CRL_bio; ++ d2i_X509_CRL_fp; ++ d2i_X509_EXTENSION; ++ d2i_X509_NAME; ++ d2i_X509_NAME_ENTRY; ++ d2i_X509_PKEY; ++ d2i_X509_PUBKEY; ++ d2i_X509_REQ; ++ d2i_X509_REQ_INFO; ++ d2i_X509_REQ_bio; ++ d2i_X509_REQ_fp; ++ d2i_X509_REVOKED; ++ d2i_X509_SIG; ++ d2i_X509_VAL; ++ d2i_X509_bio; ++ d2i_X509_fp; ++ DES_cbc_cksum; ++ DES_cbc_encrypt; ++ DES_cblock_print_file; ++ DES_cfb64_encrypt; ++ DES_cfb_encrypt; ++ DES_decrypt3; ++ DES_ecb3_encrypt; ++ DES_ecb_encrypt; ++ DES_ede3_cbc_encrypt; ++ DES_ede3_cfb64_encrypt; ++ DES_ede3_ofb64_encrypt; ++ DES_enc_read; ++ DES_enc_write; ++ DES_encrypt1; ++ DES_encrypt2; ++ DES_encrypt3; ++ DES_fcrypt; ++ DES_is_weak_key; ++ DES_key_sched; ++ DES_ncbc_encrypt; ++ DES_ofb64_encrypt; ++ DES_ofb_encrypt; ++ DES_options; ++ DES_pcbc_encrypt; ++ DES_quad_cksum; ++ DES_random_key; ++ _ossl_old_des_random_seed; ++ _ossl_old_des_read_2passwords; ++ _ossl_old_des_read_password; ++ _ossl_old_des_read_pw; ++ _ossl_old_des_read_pw_string; ++ DES_set_key; ++ DES_set_odd_parity; ++ DES_string_to_2keys; ++ DES_string_to_key; ++ DES_xcbc_encrypt; ++ DES_xwhite_in2out; ++ fcrypt_body; ++ i2a_ASN1_INTEGER; ++ i2a_ASN1_OBJECT; ++ i2a_ASN1_STRING; ++ i2d_ASN1_BIT_STRING; ++ i2d_ASN1_BOOLEAN; ++ i2d_ASN1_HEADER; ++ i2d_ASN1_IA5STRING; ++ i2d_ASN1_INTEGER; ++ i2d_ASN1_OBJECT; ++ i2d_ASN1_OCTET_STRING; ++ i2d_ASN1_PRINTABLE; ++ i2d_ASN1_SET; ++ i2d_ASN1_TYPE; ++ i2d_ASN1_UTCTIME; ++ i2d_ASN1_bytes; ++ i2d_DHparams; ++ i2d_DSAPrivateKey; ++ i2d_DSAPrivateKey_bio; ++ i2d_DSAPrivateKey_fp; ++ i2d_DSAPublicKey; ++ i2d_DSAparams; ++ i2d_NETSCAPE_SPKAC; ++ i2d_NETSCAPE_SPKI; ++ i2d_Netscape_RSA; ++ i2d_PKCS7; ++ i2d_PKCS7_DIGEST; ++ i2d_PKCS7_ENCRYPT; ++ i2d_PKCS7_ENC_CONTENT; ++ i2d_PKCS7_ENVELOPE; ++ i2d_PKCS7_ISSUER_AND_SERIAL; ++ i2d_PKCS7_RECIP_INFO; ++ i2d_PKCS7_SIGNED; ++ i2d_PKCS7_SIGNER_INFO; ++ i2d_PKCS7_SIGN_ENVELOPE; ++ i2d_PKCS7_bio; ++ i2d_PKCS7_fp; ++ i2d_PrivateKey; ++ i2d_PublicKey; ++ i2d_RSAPrivateKey; ++ i2d_RSAPrivateKey_bio; ++ i2d_RSAPrivateKey_fp; ++ i2d_RSAPublicKey; ++ i2d_X509; ++ i2d_X509_ALGOR; ++ i2d_X509_ATTRIBUTE; ++ i2d_X509_CINF; ++ i2d_X509_CRL; ++ i2d_X509_CRL_INFO; ++ i2d_X509_CRL_bio; ++ i2d_X509_CRL_fp; ++ i2d_X509_EXTENSION; ++ i2d_X509_NAME; ++ i2d_X509_NAME_ENTRY; ++ i2d_X509_PKEY; ++ i2d_X509_PUBKEY; ++ i2d_X509_REQ; ++ i2d_X509_REQ_INFO; ++ i2d_X509_REQ_bio; ++ i2d_X509_REQ_fp; ++ i2d_X509_REVOKED; ++ i2d_X509_SIG; ++ i2d_X509_VAL; ++ i2d_X509_bio; ++ i2d_X509_fp; ++ idea_cbc_encrypt; ++ idea_cfb64_encrypt; ++ idea_ecb_encrypt; ++ idea_encrypt; ++ idea_ofb64_encrypt; ++ idea_options; ++ idea_set_decrypt_key; ++ idea_set_encrypt_key; ++ lh_delete; ++ lh_doall; ++ lh_doall_arg; ++ lh_free; ++ lh_insert; ++ lh_new; ++ lh_node_stats; ++ lh_node_stats_bio; ++ lh_node_usage_stats; ++ lh_node_usage_stats_bio; ++ lh_retrieve; ++ lh_stats; ++ lh_stats_bio; ++ lh_strhash; ++ sk_delete; ++ sk_delete_ptr; ++ sk_dup; ++ sk_find; ++ sk_free; ++ sk_insert; ++ sk_new; ++ sk_pop; ++ sk_pop_free; ++ sk_push; ++ sk_set_cmp_func; ++ sk_shift; ++ sk_unshift; ++ sk_zero; ++ BIO_f_nbio_test; ++ ASN1_TYPE_get; ++ ASN1_TYPE_set; ++ PKCS7_content_free; ++ ERR_load_PKCS7_strings; ++ X509_find_by_issuer_and_serial; ++ X509_find_by_subject; ++ PKCS7_ctrl; ++ PKCS7_set_type; ++ PKCS7_set_content; ++ PKCS7_SIGNER_INFO_set; ++ PKCS7_add_signer; ++ PKCS7_add_certificate; ++ PKCS7_add_crl; ++ PKCS7_content_new; ++ PKCS7_dataSign; ++ PKCS7_dataVerify; ++ PKCS7_dataInit; ++ PKCS7_add_signature; ++ PKCS7_cert_from_signer_info; ++ PKCS7_get_signer_info; ++ EVP_delete_alias; ++ EVP_mdc2; ++ PEM_read_bio_RSAPublicKey; ++ PEM_write_bio_RSAPublicKey; ++ d2i_RSAPublicKey_bio; ++ i2d_RSAPublicKey_bio; ++ PEM_read_RSAPublicKey; ++ PEM_write_RSAPublicKey; ++ d2i_RSAPublicKey_fp; ++ i2d_RSAPublicKey_fp; ++ BIO_copy_next_retry; ++ RSA_flags; ++ X509_STORE_add_crl; ++ X509_load_crl_file; ++ EVP_rc2_40_cbc; ++ EVP_rc4_40; ++ EVP_CIPHER_CTX_init; ++ HMAC; ++ HMAC_Init; ++ HMAC_Update; ++ HMAC_Final; ++ ERR_get_next_error_library; ++ EVP_PKEY_cmp_parameters; ++ HMAC_cleanup; ++ BIO_ptr_ctrl; ++ BIO_new_file_internal; ++ BIO_new_fp_internal; ++ BIO_s_file_internal; ++ BN_BLINDING_convert; ++ BN_BLINDING_invert; ++ BN_BLINDING_update; ++ RSA_blinding_on; ++ RSA_blinding_off; ++ i2t_ASN1_OBJECT; ++ BN_BLINDING_new; ++ BN_BLINDING_free; ++ EVP_cast5_cbc; ++ EVP_cast5_cfb64; ++ EVP_cast5_ecb; ++ EVP_cast5_ofb; ++ BF_decrypt; ++ CAST_set_key; ++ CAST_encrypt; ++ CAST_decrypt; ++ CAST_ecb_encrypt; ++ CAST_cbc_encrypt; ++ CAST_cfb64_encrypt; ++ CAST_ofb64_encrypt; ++ RC2_decrypt; ++ OBJ_create_objects; ++ BN_exp; ++ BN_mul_word; ++ BN_sub_word; ++ BN_dec2bn; ++ BN_bn2dec; ++ BIO_ghbn_ctrl; ++ CRYPTO_free_ex_data; ++ CRYPTO_get_ex_data; ++ CRYPTO_set_ex_data; ++ ERR_load_CRYPTO_strings; ++ ERR_load_CRYPTOlib_strings; ++ EVP_PKEY_bits; ++ MD5_Transform; ++ SHA1_Transform; ++ SHA_Transform; ++ X509_STORE_CTX_get_chain; ++ X509_STORE_CTX_get_current_cert; ++ X509_STORE_CTX_get_error; ++ X509_STORE_CTX_get_error_depth; ++ X509_STORE_CTX_get_ex_data; ++ X509_STORE_CTX_set_cert; ++ X509_STORE_CTX_set_chain; ++ X509_STORE_CTX_set_error; ++ X509_STORE_CTX_set_ex_data; ++ CRYPTO_dup_ex_data; ++ CRYPTO_get_new_lockid; ++ CRYPTO_new_ex_data; ++ RSA_set_ex_data; ++ RSA_get_ex_data; ++ RSA_get_ex_new_index; ++ RSA_padding_add_PKCS1_type_1; ++ RSA_padding_add_PKCS1_type_2; ++ RSA_padding_add_SSLv23; ++ RSA_padding_add_none; ++ RSA_padding_check_PKCS1_type_1; ++ RSA_padding_check_PKCS1_type_2; ++ RSA_padding_check_SSLv23; ++ RSA_padding_check_none; ++ bn_add_words; ++ d2i_Netscape_RSA_2; ++ CRYPTO_get_ex_new_index; ++ RIPEMD160_Init; ++ RIPEMD160_Update; ++ RIPEMD160_Final; ++ RIPEMD160; ++ RIPEMD160_Transform; ++ RC5_32_set_key; ++ RC5_32_ecb_encrypt; ++ RC5_32_encrypt; ++ RC5_32_decrypt; ++ RC5_32_cbc_encrypt; ++ RC5_32_cfb64_encrypt; ++ RC5_32_ofb64_encrypt; ++ BN_bn2mpi; ++ BN_mpi2bn; ++ ASN1_BIT_STRING_get_bit; ++ ASN1_BIT_STRING_set_bit; ++ BIO_get_ex_data; ++ BIO_get_ex_new_index; ++ BIO_set_ex_data; ++ X509v3_get_key_usage; ++ X509v3_set_key_usage; ++ a2i_X509v3_key_usage; ++ i2a_X509v3_key_usage; ++ EVP_PKEY_decrypt; ++ EVP_PKEY_encrypt; ++ PKCS7_RECIP_INFO_set; ++ PKCS7_add_recipient; ++ PKCS7_add_recipient_info; ++ PKCS7_set_cipher; ++ ASN1_TYPE_get_int_octetstring; ++ ASN1_TYPE_get_octetstring; ++ ASN1_TYPE_set_int_octetstring; ++ ASN1_TYPE_set_octetstring; ++ ASN1_UTCTIME_set_string; ++ ERR_add_error_data; ++ ERR_set_error_data; ++ EVP_CIPHER_asn1_to_param; ++ EVP_CIPHER_param_to_asn1; ++ EVP_CIPHER_get_asn1_iv; ++ EVP_CIPHER_set_asn1_iv; ++ EVP_rc5_32_12_16_cbc; ++ EVP_rc5_32_12_16_cfb64; ++ EVP_rc5_32_12_16_ecb; ++ EVP_rc5_32_12_16_ofb; ++ asn1_add_error; ++ d2i_ASN1_BMPSTRING; ++ i2d_ASN1_BMPSTRING; ++ BIO_f_ber; ++ BN_init; ++ COMP_CTX_new; ++ COMP_CTX_free; ++ COMP_CTX_compress_block; ++ COMP_CTX_expand_block; ++ X509_STORE_CTX_get_ex_new_index; ++ OBJ_NAME_add; ++ BIO_socket_nbio; ++ EVP_rc2_64_cbc; ++ OBJ_NAME_cleanup; ++ OBJ_NAME_get; ++ OBJ_NAME_init; ++ OBJ_NAME_new_index; ++ OBJ_NAME_remove; ++ BN_MONT_CTX_copy; ++ BIO_new_socks4a_connect; ++ BIO_s_socks4a_connect; ++ PROXY_set_connect_mode; ++ RAND_SSLeay; ++ RAND_set_rand_method; ++ RSA_memory_lock; ++ bn_sub_words; ++ bn_mul_normal; ++ bn_mul_comba8; ++ bn_mul_comba4; ++ bn_sqr_normal; ++ bn_sqr_comba8; ++ bn_sqr_comba4; ++ bn_cmp_words; ++ bn_mul_recursive; ++ bn_mul_part_recursive; ++ bn_sqr_recursive; ++ bn_mul_low_normal; ++ BN_RECP_CTX_init; ++ BN_RECP_CTX_new; ++ BN_RECP_CTX_free; ++ BN_RECP_CTX_set; ++ BN_mod_mul_reciprocal; ++ BN_mod_exp_recp; ++ BN_div_recp; ++ BN_CTX_init; ++ BN_MONT_CTX_init; ++ RAND_get_rand_method; ++ PKCS7_add_attribute; ++ PKCS7_add_signed_attribute; ++ PKCS7_digest_from_attributes; ++ PKCS7_get_attribute; ++ PKCS7_get_issuer_and_serial; ++ PKCS7_get_signed_attribute; ++ COMP_compress_block; ++ COMP_expand_block; ++ COMP_rle; ++ COMP_zlib; ++ ms_time_diff; ++ ms_time_new; ++ ms_time_free; ++ ms_time_cmp; ++ ms_time_get; ++ PKCS7_set_attributes; ++ PKCS7_set_signed_attributes; ++ X509_ATTRIBUTE_create; ++ X509_ATTRIBUTE_dup; ++ ASN1_GENERALIZEDTIME_check; ++ ASN1_GENERALIZEDTIME_print; ++ ASN1_GENERALIZEDTIME_set; ++ ASN1_GENERALIZEDTIME_set_string; ++ ASN1_TIME_print; ++ BASIC_CONSTRAINTS_free; ++ BASIC_CONSTRAINTS_new; ++ ERR_load_X509V3_strings; ++ NETSCAPE_CERT_SEQUENCE_free; ++ NETSCAPE_CERT_SEQUENCE_new; ++ OBJ_txt2obj; ++ PEM_read_NETSCAPE_CERT_SEQUENCE; ++ PEM_read_NS_CERT_SEQ; ++ PEM_read_bio_NETSCAPE_CERT_SEQUENCE; ++ PEM_read_bio_NS_CERT_SEQ; ++ PEM_write_NETSCAPE_CERT_SEQUENCE; ++ PEM_write_NS_CERT_SEQ; ++ PEM_write_bio_NETSCAPE_CERT_SEQUENCE; ++ PEM_write_bio_NS_CERT_SEQ; ++ X509V3_EXT_add; ++ X509V3_EXT_add_alias; ++ X509V3_EXT_add_conf; ++ X509V3_EXT_cleanup; ++ X509V3_EXT_conf; ++ X509V3_EXT_conf_nid; ++ X509V3_EXT_get; ++ X509V3_EXT_get_nid; ++ X509V3_EXT_print; ++ X509V3_EXT_print_fp; ++ X509V3_add_standard_extensions; ++ X509V3_add_value; ++ X509V3_add_value_bool; ++ X509V3_add_value_int; ++ X509V3_conf_free; ++ X509V3_get_value_bool; ++ X509V3_get_value_int; ++ X509V3_parse_list; ++ d2i_ASN1_GENERALIZEDTIME; ++ d2i_ASN1_TIME; ++ d2i_BASIC_CONSTRAINTS; ++ d2i_NETSCAPE_CERT_SEQUENCE; ++ d2i_ext_ku; ++ ext_ku_free; ++ ext_ku_new; ++ i2d_ASN1_GENERALIZEDTIME; ++ i2d_ASN1_TIME; ++ i2d_BASIC_CONSTRAINTS; ++ i2d_NETSCAPE_CERT_SEQUENCE; ++ i2d_ext_ku; ++ EVP_MD_CTX_copy; ++ i2d_ASN1_ENUMERATED; ++ d2i_ASN1_ENUMERATED; ++ ASN1_ENUMERATED_set; ++ ASN1_ENUMERATED_get; ++ BN_to_ASN1_ENUMERATED; ++ ASN1_ENUMERATED_to_BN; ++ i2a_ASN1_ENUMERATED; ++ a2i_ASN1_ENUMERATED; ++ i2d_GENERAL_NAME; ++ d2i_GENERAL_NAME; ++ GENERAL_NAME_new; ++ GENERAL_NAME_free; ++ GENERAL_NAMES_new; ++ GENERAL_NAMES_free; ++ d2i_GENERAL_NAMES; ++ i2d_GENERAL_NAMES; ++ i2v_GENERAL_NAMES; ++ i2s_ASN1_OCTET_STRING; ++ s2i_ASN1_OCTET_STRING; ++ X509V3_EXT_check_conf; ++ hex_to_string; ++ string_to_hex; ++ DES_ede3_cbcm_encrypt; ++ RSA_padding_add_PKCS1_OAEP; ++ RSA_padding_check_PKCS1_OAEP; ++ X509_CRL_print_fp; ++ X509_CRL_print; ++ i2v_GENERAL_NAME; ++ v2i_GENERAL_NAME; ++ i2d_PKEY_USAGE_PERIOD; ++ d2i_PKEY_USAGE_PERIOD; ++ PKEY_USAGE_PERIOD_new; ++ PKEY_USAGE_PERIOD_free; ++ v2i_GENERAL_NAMES; ++ i2s_ASN1_INTEGER; ++ X509V3_EXT_d2i; ++ name_cmp; ++ str_dup; ++ i2s_ASN1_ENUMERATED; ++ i2s_ASN1_ENUMERATED_TABLE; ++ BIO_s_log; ++ BIO_f_reliable; ++ PKCS7_dataFinal; ++ PKCS7_dataDecode; ++ X509V3_EXT_CRL_add_conf; ++ BN_set_params; ++ BN_get_params; ++ BIO_get_ex_num; ++ BIO_set_ex_free_func; ++ EVP_ripemd160; ++ ASN1_TIME_set; ++ i2d_AUTHORITY_KEYID; ++ d2i_AUTHORITY_KEYID; ++ AUTHORITY_KEYID_new; ++ AUTHORITY_KEYID_free; ++ ASN1_seq_unpack; ++ ASN1_seq_pack; ++ ASN1_unpack_string; ++ ASN1_pack_string; ++ PKCS12_pack_safebag; ++ PKCS12_MAKE_KEYBAG; ++ PKCS8_encrypt; ++ PKCS12_MAKE_SHKEYBAG; ++ PKCS12_pack_p7data; ++ PKCS12_pack_p7encdata; ++ PKCS12_add_localkeyid; ++ PKCS12_add_friendlyname_asc; ++ PKCS12_add_friendlyname_uni; ++ PKCS12_get_friendlyname; ++ PKCS12_pbe_crypt; ++ PKCS12_decrypt_d2i; ++ PKCS12_i2d_encrypt; ++ PKCS12_init; ++ PKCS12_key_gen_asc; ++ PKCS12_key_gen_uni; ++ PKCS12_gen_mac; ++ PKCS12_verify_mac; ++ PKCS12_set_mac; ++ PKCS12_setup_mac; ++ OPENSSL_asc2uni; ++ OPENSSL_uni2asc; ++ i2d_PKCS12_BAGS; ++ PKCS12_BAGS_new; ++ d2i_PKCS12_BAGS; ++ PKCS12_BAGS_free; ++ i2d_PKCS12; ++ d2i_PKCS12; ++ PKCS12_new; ++ PKCS12_free; ++ i2d_PKCS12_MAC_DATA; ++ PKCS12_MAC_DATA_new; ++ d2i_PKCS12_MAC_DATA; ++ PKCS12_MAC_DATA_free; ++ i2d_PKCS12_SAFEBAG; ++ PKCS12_SAFEBAG_new; ++ d2i_PKCS12_SAFEBAG; ++ PKCS12_SAFEBAG_free; ++ ERR_load_PKCS12_strings; ++ PKCS12_PBE_add; ++ PKCS8_add_keyusage; ++ PKCS12_get_attr_gen; ++ PKCS12_parse; ++ PKCS12_create; ++ i2d_PKCS12_bio; ++ i2d_PKCS12_fp; ++ d2i_PKCS12_bio; ++ d2i_PKCS12_fp; ++ i2d_PBEPARAM; ++ PBEPARAM_new; ++ d2i_PBEPARAM; ++ PBEPARAM_free; ++ i2d_PKCS8_PRIV_KEY_INFO; ++ PKCS8_PRIV_KEY_INFO_new; ++ d2i_PKCS8_PRIV_KEY_INFO; ++ PKCS8_PRIV_KEY_INFO_free; ++ EVP_PKCS82PKEY; ++ EVP_PKEY2PKCS8; ++ PKCS8_set_broken; ++ EVP_PBE_ALGOR_CipherInit; ++ EVP_PBE_alg_add; ++ PKCS5_pbe_set; ++ EVP_PBE_cleanup; ++ i2d_SXNET; ++ d2i_SXNET; ++ SXNET_new; ++ SXNET_free; ++ i2d_SXNETID; ++ d2i_SXNETID; ++ SXNETID_new; ++ SXNETID_free; ++ DSA_SIG_new; ++ DSA_SIG_free; ++ DSA_do_sign; ++ DSA_do_verify; ++ d2i_DSA_SIG; ++ i2d_DSA_SIG; ++ i2d_ASN1_VISIBLESTRING; ++ d2i_ASN1_VISIBLESTRING; ++ i2d_ASN1_UTF8STRING; ++ d2i_ASN1_UTF8STRING; ++ i2d_DIRECTORYSTRING; ++ d2i_DIRECTORYSTRING; ++ i2d_DISPLAYTEXT; ++ d2i_DISPLAYTEXT; ++ d2i_ASN1_SET_OF_X509; ++ i2d_ASN1_SET_OF_X509; ++ i2d_PBKDF2PARAM; ++ PBKDF2PARAM_new; ++ d2i_PBKDF2PARAM; ++ PBKDF2PARAM_free; ++ i2d_PBE2PARAM; ++ PBE2PARAM_new; ++ d2i_PBE2PARAM; ++ PBE2PARAM_free; ++ d2i_ASN1_SET_OF_GENERAL_NAME; ++ i2d_ASN1_SET_OF_GENERAL_NAME; ++ d2i_ASN1_SET_OF_SXNETID; ++ i2d_ASN1_SET_OF_SXNETID; ++ d2i_ASN1_SET_OF_POLICYQUALINFO; ++ i2d_ASN1_SET_OF_POLICYQUALINFO; ++ d2i_ASN1_SET_OF_POLICYINFO; ++ i2d_ASN1_SET_OF_POLICYINFO; ++ SXNET_add_id_asc; ++ SXNET_add_id_ulong; ++ SXNET_add_id_INTEGER; ++ SXNET_get_id_asc; ++ SXNET_get_id_ulong; ++ SXNET_get_id_INTEGER; ++ X509V3_set_conf_lhash; ++ i2d_CERTIFICATEPOLICIES; ++ CERTIFICATEPOLICIES_new; ++ CERTIFICATEPOLICIES_free; ++ d2i_CERTIFICATEPOLICIES; ++ i2d_POLICYINFO; ++ POLICYINFO_new; ++ d2i_POLICYINFO; ++ POLICYINFO_free; ++ i2d_POLICYQUALINFO; ++ POLICYQUALINFO_new; ++ d2i_POLICYQUALINFO; ++ POLICYQUALINFO_free; ++ i2d_USERNOTICE; ++ USERNOTICE_new; ++ d2i_USERNOTICE; ++ USERNOTICE_free; ++ i2d_NOTICEREF; ++ NOTICEREF_new; ++ d2i_NOTICEREF; ++ NOTICEREF_free; ++ X509V3_get_string; ++ X509V3_get_section; ++ X509V3_string_free; ++ X509V3_section_free; ++ X509V3_set_ctx; ++ s2i_ASN1_INTEGER; ++ CRYPTO_set_locked_mem_functions; ++ CRYPTO_get_locked_mem_functions; ++ CRYPTO_malloc_locked; ++ CRYPTO_free_locked; ++ BN_mod_exp2_mont; ++ ERR_get_error_line_data; ++ ERR_peek_error_line_data; ++ PKCS12_PBE_keyivgen; ++ X509_ALGOR_dup; ++ d2i_ASN1_SET_OF_DIST_POINT; ++ i2d_ASN1_SET_OF_DIST_POINT; ++ i2d_CRL_DIST_POINTS; ++ CRL_DIST_POINTS_new; ++ CRL_DIST_POINTS_free; ++ d2i_CRL_DIST_POINTS; ++ i2d_DIST_POINT; ++ DIST_POINT_new; ++ d2i_DIST_POINT; ++ DIST_POINT_free; ++ i2d_DIST_POINT_NAME; ++ DIST_POINT_NAME_new; ++ DIST_POINT_NAME_free; ++ d2i_DIST_POINT_NAME; ++ X509V3_add_value_uchar; ++ d2i_ASN1_SET_OF_X509_ATTRIBUTE; ++ i2d_ASN1_SET_OF_ASN1_TYPE; ++ d2i_ASN1_SET_OF_X509_EXTENSION; ++ d2i_ASN1_SET_OF_X509_NAME_ENTRY; ++ d2i_ASN1_SET_OF_ASN1_TYPE; ++ i2d_ASN1_SET_OF_X509_ATTRIBUTE; ++ i2d_ASN1_SET_OF_X509_EXTENSION; ++ i2d_ASN1_SET_OF_X509_NAME_ENTRY; ++ X509V3_EXT_i2d; ++ X509V3_EXT_val_prn; ++ X509V3_EXT_add_list; ++ EVP_CIPHER_type; ++ EVP_PBE_CipherInit; ++ X509V3_add_value_bool_nf; ++ d2i_ASN1_UINTEGER; ++ sk_value; ++ sk_num; ++ sk_set; ++ i2d_ASN1_SET_OF_X509_REVOKED; ++ sk_sort; ++ d2i_ASN1_SET_OF_X509_REVOKED; ++ i2d_ASN1_SET_OF_X509_ALGOR; ++ i2d_ASN1_SET_OF_X509_CRL; ++ d2i_ASN1_SET_OF_X509_ALGOR; ++ d2i_ASN1_SET_OF_X509_CRL; ++ i2d_ASN1_SET_OF_PKCS7_SIGNER_INFO; ++ i2d_ASN1_SET_OF_PKCS7_RECIP_INFO; ++ d2i_ASN1_SET_OF_PKCS7_SIGNER_INFO; ++ d2i_ASN1_SET_OF_PKCS7_RECIP_INFO; ++ PKCS5_PBE_add; ++ PEM_write_bio_PKCS8; ++ i2d_PKCS8_fp; ++ PEM_read_bio_PKCS8_PRIV_KEY_INFO; ++ PEM_read_bio_P8_PRIV_KEY_INFO; ++ d2i_PKCS8_bio; ++ d2i_PKCS8_PRIV_KEY_INFO_fp; ++ PEM_write_bio_PKCS8_PRIV_KEY_INFO; ++ PEM_write_bio_P8_PRIV_KEY_INFO; ++ PEM_read_PKCS8; ++ d2i_PKCS8_PRIV_KEY_INFO_bio; ++ d2i_PKCS8_fp; ++ PEM_write_PKCS8; ++ PEM_read_PKCS8_PRIV_KEY_INFO; ++ PEM_read_P8_PRIV_KEY_INFO; ++ PEM_read_bio_PKCS8; ++ PEM_write_PKCS8_PRIV_KEY_INFO; ++ PEM_write_P8_PRIV_KEY_INFO; ++ PKCS5_PBE_keyivgen; ++ i2d_PKCS8_bio; ++ i2d_PKCS8_PRIV_KEY_INFO_fp; ++ i2d_PKCS8_PRIV_KEY_INFO_bio; ++ BIO_s_bio; ++ PKCS5_pbe2_set; ++ PKCS5_PBKDF2_HMAC_SHA1; ++ PKCS5_v2_PBE_keyivgen; ++ PEM_write_bio_PKCS8PrivateKey; ++ PEM_write_PKCS8PrivateKey; ++ BIO_ctrl_get_read_request; ++ BIO_ctrl_pending; ++ BIO_ctrl_wpending; ++ BIO_new_bio_pair; ++ BIO_ctrl_get_write_guarantee; ++ CRYPTO_num_locks; ++ CONF_load_bio; ++ CONF_load_fp; ++ i2d_ASN1_SET_OF_ASN1_OBJECT; ++ d2i_ASN1_SET_OF_ASN1_OBJECT; ++ PKCS7_signatureVerify; ++ RSA_set_method; ++ RSA_get_method; ++ RSA_get_default_method; ++ RSA_check_key; ++ OBJ_obj2txt; ++ DSA_dup_DH; ++ X509_REQ_get_extensions; ++ X509_REQ_set_extension_nids; ++ BIO_nwrite; ++ X509_REQ_extension_nid; ++ BIO_nread; ++ X509_REQ_get_extension_nids; ++ BIO_nwrite0; ++ X509_REQ_add_extensions_nid; ++ BIO_nread0; ++ X509_REQ_add_extensions; ++ BIO_new_mem_buf; ++ DH_set_ex_data; ++ DH_set_method; ++ DSA_OpenSSL; ++ DH_get_ex_data; ++ DH_get_ex_new_index; ++ DSA_new_method; ++ DH_new_method; ++ DH_OpenSSL; ++ DSA_get_ex_new_index; ++ DH_get_default_method; ++ DSA_set_ex_data; ++ DH_set_default_method; ++ DSA_get_ex_data; ++ X509V3_EXT_REQ_add_conf; ++ NETSCAPE_SPKI_print; ++ NETSCAPE_SPKI_set_pubkey; ++ NETSCAPE_SPKI_b64_encode; ++ NETSCAPE_SPKI_get_pubkey; ++ NETSCAPE_SPKI_b64_decode; ++ UTF8_putc; ++ UTF8_getc; ++ RSA_null_method; ++ ASN1_tag2str; ++ BIO_ctrl_reset_read_request; ++ DISPLAYTEXT_new; ++ ASN1_GENERALIZEDTIME_free; ++ X509_REVOKED_get_ext_d2i; ++ X509_set_ex_data; ++ X509_reject_set_bit_asc; ++ X509_NAME_add_entry_by_txt; ++ X509_NAME_add_entry_by_NID; ++ X509_PURPOSE_get0; ++ PEM_read_X509_AUX; ++ d2i_AUTHORITY_INFO_ACCESS; ++ PEM_write_PUBKEY; ++ ACCESS_DESCRIPTION_new; ++ X509_CERT_AUX_free; ++ d2i_ACCESS_DESCRIPTION; ++ X509_trust_clear; ++ X509_TRUST_add; ++ ASN1_VISIBLESTRING_new; ++ X509_alias_set1; ++ ASN1_PRINTABLESTRING_free; ++ EVP_PKEY_get1_DSA; ++ ASN1_BMPSTRING_new; ++ ASN1_mbstring_copy; ++ ASN1_UTF8STRING_new; ++ DSA_get_default_method; ++ i2d_ASN1_SET_OF_ACCESS_DESCRIPTION; ++ ASN1_T61STRING_free; ++ DSA_set_method; ++ X509_get_ex_data; ++ ASN1_STRING_type; ++ X509_PURPOSE_get_by_sname; ++ ASN1_TIME_free; ++ ASN1_OCTET_STRING_cmp; ++ ASN1_BIT_STRING_new; ++ X509_get_ext_d2i; ++ PEM_read_bio_X509_AUX; ++ ASN1_STRING_set_default_mask_asc; ++ ASN1_STRING_set_def_mask_asc; ++ PEM_write_bio_RSA_PUBKEY; ++ ASN1_INTEGER_cmp; ++ d2i_RSA_PUBKEY_fp; ++ X509_trust_set_bit_asc; ++ PEM_write_bio_DSA_PUBKEY; ++ X509_STORE_CTX_free; ++ EVP_PKEY_set1_DSA; ++ i2d_DSA_PUBKEY_fp; ++ X509_load_cert_crl_file; ++ ASN1_TIME_new; ++ i2d_RSA_PUBKEY; ++ X509_STORE_CTX_purpose_inherit; ++ PEM_read_RSA_PUBKEY; ++ d2i_X509_AUX; ++ i2d_DSA_PUBKEY; ++ X509_CERT_AUX_print; ++ PEM_read_DSA_PUBKEY; ++ i2d_RSA_PUBKEY_bio; ++ ASN1_BIT_STRING_num_asc; ++ i2d_PUBKEY; ++ ASN1_UTCTIME_free; ++ DSA_set_default_method; ++ X509_PURPOSE_get_by_id; ++ ACCESS_DESCRIPTION_free; ++ PEM_read_bio_PUBKEY; ++ ASN1_STRING_set_by_NID; ++ X509_PURPOSE_get_id; ++ DISPLAYTEXT_free; ++ OTHERNAME_new; ++ X509_CERT_AUX_new; ++ X509_TRUST_cleanup; ++ X509_NAME_add_entry_by_OBJ; ++ X509_CRL_get_ext_d2i; ++ X509_PURPOSE_get0_name; ++ PEM_read_PUBKEY; ++ i2d_DSA_PUBKEY_bio; ++ i2d_OTHERNAME; ++ ASN1_OCTET_STRING_free; ++ ASN1_BIT_STRING_set_asc; ++ X509_get_ex_new_index; ++ ASN1_STRING_TABLE_cleanup; ++ X509_TRUST_get_by_id; ++ X509_PURPOSE_get_trust; ++ ASN1_STRING_length; ++ d2i_ASN1_SET_OF_ACCESS_DESCRIPTION; ++ ASN1_PRINTABLESTRING_new; ++ X509V3_get_d2i; ++ ASN1_ENUMERATED_free; ++ i2d_X509_CERT_AUX; ++ X509_STORE_CTX_set_trust; ++ ASN1_STRING_set_default_mask; ++ X509_STORE_CTX_new; ++ EVP_PKEY_get1_RSA; ++ DIRECTORYSTRING_free; ++ PEM_write_X509_AUX; ++ ASN1_OCTET_STRING_set; ++ d2i_DSA_PUBKEY_fp; ++ d2i_RSA_PUBKEY; ++ X509_TRUST_get0_name; ++ X509_TRUST_get0; ++ AUTHORITY_INFO_ACCESS_free; ++ ASN1_IA5STRING_new; ++ d2i_DSA_PUBKEY; ++ X509_check_purpose; ++ ASN1_ENUMERATED_new; ++ d2i_RSA_PUBKEY_bio; ++ d2i_PUBKEY; ++ X509_TRUST_get_trust; ++ X509_TRUST_get_flags; ++ ASN1_BMPSTRING_free; ++ ASN1_T61STRING_new; ++ ASN1_UTCTIME_new; ++ i2d_AUTHORITY_INFO_ACCESS; ++ EVP_PKEY_set1_RSA; ++ X509_STORE_CTX_set_purpose; ++ ASN1_IA5STRING_free; ++ PEM_write_bio_X509_AUX; ++ X509_PURPOSE_get_count; ++ CRYPTO_add_info; ++ X509_NAME_ENTRY_create_by_txt; ++ ASN1_STRING_get_default_mask; ++ X509_alias_get0; ++ ASN1_STRING_data; ++ i2d_ACCESS_DESCRIPTION; ++ X509_trust_set_bit; ++ ASN1_BIT_STRING_free; ++ PEM_read_bio_RSA_PUBKEY; ++ X509_add1_reject_object; ++ X509_check_trust; ++ PEM_read_bio_DSA_PUBKEY; ++ X509_PURPOSE_add; ++ ASN1_STRING_TABLE_get; ++ ASN1_UTF8STRING_free; ++ d2i_DSA_PUBKEY_bio; ++ PEM_write_RSA_PUBKEY; ++ d2i_OTHERNAME; ++ X509_reject_set_bit; ++ PEM_write_DSA_PUBKEY; ++ X509_PURPOSE_get0_sname; ++ EVP_PKEY_set1_DH; ++ ASN1_OCTET_STRING_dup; ++ ASN1_BIT_STRING_set; ++ X509_TRUST_get_count; ++ ASN1_INTEGER_free; ++ OTHERNAME_free; ++ i2d_RSA_PUBKEY_fp; ++ ASN1_INTEGER_dup; ++ d2i_X509_CERT_AUX; ++ PEM_write_bio_PUBKEY; ++ ASN1_VISIBLESTRING_free; ++ X509_PURPOSE_cleanup; ++ ASN1_mbstring_ncopy; ++ ASN1_GENERALIZEDTIME_new; ++ EVP_PKEY_get1_DH; ++ ASN1_OCTET_STRING_new; ++ ASN1_INTEGER_new; ++ i2d_X509_AUX; ++ ASN1_BIT_STRING_name_print; ++ X509_cmp; ++ ASN1_STRING_length_set; ++ DIRECTORYSTRING_new; ++ X509_add1_trust_object; ++ PKCS12_newpass; ++ SMIME_write_PKCS7; ++ SMIME_read_PKCS7; ++ DES_set_key_checked; ++ PKCS7_verify; ++ PKCS7_encrypt; ++ DES_set_key_unchecked; ++ SMIME_crlf_copy; ++ i2d_ASN1_PRINTABLESTRING; ++ PKCS7_get0_signers; ++ PKCS7_decrypt; ++ SMIME_text; ++ PKCS7_simple_smimecap; ++ PKCS7_get_smimecap; ++ PKCS7_sign; ++ PKCS7_add_attrib_smimecap; ++ CRYPTO_dbg_set_options; ++ CRYPTO_remove_all_info; ++ CRYPTO_get_mem_debug_functions; ++ CRYPTO_is_mem_check_on; ++ CRYPTO_set_mem_debug_functions; ++ CRYPTO_pop_info; ++ CRYPTO_push_info_; ++ CRYPTO_set_mem_debug_options; ++ PEM_write_PKCS8PrivateKey_nid; ++ PEM_write_bio_PKCS8PrivateKey_nid; ++ PEM_write_bio_PKCS8PrivKey_nid; ++ d2i_PKCS8PrivateKey_bio; ++ ASN1_NULL_free; ++ d2i_ASN1_NULL; ++ ASN1_NULL_new; ++ i2d_PKCS8PrivateKey_bio; ++ i2d_PKCS8PrivateKey_fp; ++ i2d_ASN1_NULL; ++ i2d_PKCS8PrivateKey_nid_fp; ++ d2i_PKCS8PrivateKey_fp; ++ i2d_PKCS8PrivateKey_nid_bio; ++ i2d_PKCS8PrivateKeyInfo_fp; ++ i2d_PKCS8PrivateKeyInfo_bio; ++ PEM_cb; ++ i2d_PrivateKey_fp; ++ d2i_PrivateKey_bio; ++ d2i_PrivateKey_fp; ++ i2d_PrivateKey_bio; ++ X509_reject_clear; ++ X509_TRUST_set_default; ++ d2i_AutoPrivateKey; ++ X509_ATTRIBUTE_get0_type; ++ X509_ATTRIBUTE_set1_data; ++ X509at_get_attr; ++ X509at_get_attr_count; ++ X509_ATTRIBUTE_create_by_NID; ++ X509_ATTRIBUTE_set1_object; ++ X509_ATTRIBUTE_count; ++ X509_ATTRIBUTE_create_by_OBJ; ++ X509_ATTRIBUTE_get0_object; ++ X509at_get_attr_by_NID; ++ X509at_add1_attr; ++ X509_ATTRIBUTE_get0_data; ++ X509at_delete_attr; ++ X509at_get_attr_by_OBJ; ++ RAND_add; ++ BIO_number_written; ++ BIO_number_read; ++ X509_STORE_CTX_get1_chain; ++ ERR_load_RAND_strings; ++ RAND_pseudo_bytes; ++ X509_REQ_get_attr_by_NID; ++ X509_REQ_get_attr; ++ X509_REQ_add1_attr_by_NID; ++ X509_REQ_get_attr_by_OBJ; ++ X509at_add1_attr_by_NID; ++ X509_REQ_add1_attr_by_OBJ; ++ X509_REQ_get_attr_count; ++ X509_REQ_add1_attr; ++ X509_REQ_delete_attr; ++ X509at_add1_attr_by_OBJ; ++ X509_REQ_add1_attr_by_txt; ++ X509_ATTRIBUTE_create_by_txt; ++ X509at_add1_attr_by_txt; ++ BN_pseudo_rand; ++ BN_is_prime_fasttest; ++ BN_CTX_end; ++ BN_CTX_start; ++ BN_CTX_get; ++ EVP_PKEY2PKCS8_broken; ++ ASN1_STRING_TABLE_add; ++ CRYPTO_dbg_get_options; ++ AUTHORITY_INFO_ACCESS_new; ++ CRYPTO_get_mem_debug_options; ++ DES_crypt; ++ PEM_write_bio_X509_REQ_NEW; ++ PEM_write_X509_REQ_NEW; ++ BIO_callback_ctrl; ++ RAND_egd; ++ RAND_status; ++ bn_dump1; ++ DES_check_key_parity; ++ lh_num_items; ++ RAND_event; ++ DSO_new; ++ DSO_new_method; ++ DSO_free; ++ DSO_flags; ++ DSO_up; ++ DSO_set_default_method; ++ DSO_get_default_method; ++ DSO_get_method; ++ DSO_set_method; ++ DSO_load; ++ DSO_bind_var; ++ DSO_METHOD_null; ++ DSO_METHOD_openssl; ++ DSO_METHOD_dlfcn; ++ DSO_METHOD_win32; ++ ERR_load_DSO_strings; ++ DSO_METHOD_dl; ++ NCONF_load; ++ NCONF_load_fp; ++ NCONF_new; ++ NCONF_get_string; ++ NCONF_free; ++ NCONF_get_number; ++ CONF_dump_fp; ++ NCONF_load_bio; ++ NCONF_dump_fp; ++ NCONF_get_section; ++ NCONF_dump_bio; ++ CONF_dump_bio; ++ NCONF_free_data; ++ CONF_set_default_method; ++ ERR_error_string_n; ++ BIO_snprintf; ++ DSO_ctrl; ++ i2d_ASN1_SET_OF_ASN1_INTEGER; ++ i2d_ASN1_SET_OF_PKCS12_SAFEBAG; ++ i2d_ASN1_SET_OF_PKCS7; ++ BIO_vfree; ++ d2i_ASN1_SET_OF_ASN1_INTEGER; ++ d2i_ASN1_SET_OF_PKCS12_SAFEBAG; ++ ASN1_UTCTIME_get; ++ X509_REQ_digest; ++ X509_CRL_digest; ++ d2i_ASN1_SET_OF_PKCS7; ++ EVP_CIPHER_CTX_set_key_length; ++ EVP_CIPHER_CTX_ctrl; ++ BN_mod_exp_mont_word; ++ RAND_egd_bytes; ++ X509_REQ_get1_email; ++ X509_get1_email; ++ X509_email_free; ++ i2d_RSA_NET; ++ d2i_RSA_NET_2; ++ d2i_RSA_NET; ++ DSO_bind_func; ++ CRYPTO_get_new_dynlockid; ++ sk_new_null; ++ CRYPTO_set_dynlock_destroy_callback; ++ CRYPTO_set_dynlock_destroy_cb; ++ CRYPTO_destroy_dynlockid; ++ CRYPTO_set_dynlock_size; ++ CRYPTO_set_dynlock_create_callback; ++ CRYPTO_set_dynlock_create_cb; ++ CRYPTO_set_dynlock_lock_callback; ++ CRYPTO_set_dynlock_lock_cb; ++ CRYPTO_get_dynlock_lock_callback; ++ CRYPTO_get_dynlock_lock_cb; ++ CRYPTO_get_dynlock_destroy_callback; ++ CRYPTO_get_dynlock_destroy_cb; ++ CRYPTO_get_dynlock_value; ++ CRYPTO_get_dynlock_create_callback; ++ CRYPTO_get_dynlock_create_cb; ++ c2i_ASN1_BIT_STRING; ++ i2c_ASN1_BIT_STRING; ++ RAND_poll; ++ c2i_ASN1_INTEGER; ++ i2c_ASN1_INTEGER; ++ BIO_dump_indent; ++ ASN1_parse_dump; ++ c2i_ASN1_OBJECT; ++ X509_NAME_print_ex_fp; ++ ASN1_STRING_print_ex_fp; ++ X509_NAME_print_ex; ++ ASN1_STRING_print_ex; ++ MD4; ++ MD4_Transform; ++ MD4_Final; ++ MD4_Update; ++ MD4_Init; ++ EVP_md4; ++ i2d_PUBKEY_bio; ++ i2d_PUBKEY_fp; ++ d2i_PUBKEY_bio; ++ ASN1_STRING_to_UTF8; ++ BIO_vprintf; ++ BIO_vsnprintf; ++ d2i_PUBKEY_fp; ++ X509_cmp_time; ++ X509_STORE_CTX_set_time; ++ X509_STORE_CTX_get1_issuer; ++ X509_OBJECT_retrieve_match; ++ X509_OBJECT_idx_by_subject; ++ X509_STORE_CTX_set_flags; ++ X509_STORE_CTX_trusted_stack; ++ X509_time_adj; ++ X509_check_issued; ++ ASN1_UTCTIME_cmp_time_t; ++ DES_set_weak_key_flag; ++ DES_check_key; ++ DES_rw_mode; ++ RSA_PKCS1_RSAref; ++ X509_keyid_set1; ++ BIO_next; ++ DSO_METHOD_vms; ++ BIO_f_linebuffer; ++ BN_bntest_rand; ++ OPENSSL_issetugid; ++ BN_rand_range; ++ ERR_load_ENGINE_strings; ++ ENGINE_set_DSA; ++ ENGINE_get_finish_function; ++ ENGINE_get_default_RSA; ++ ENGINE_get_BN_mod_exp; ++ DSA_get_default_openssl_method; ++ ENGINE_set_DH; ++ ENGINE_set_def_BN_mod_exp_crt; ++ ENGINE_set_default_BN_mod_exp_crt; ++ ENGINE_init; ++ DH_get_default_openssl_method; ++ RSA_set_default_openssl_method; ++ ENGINE_finish; ++ ENGINE_load_public_key; ++ ENGINE_get_DH; ++ ENGINE_ctrl; ++ ENGINE_get_init_function; ++ ENGINE_set_init_function; ++ ENGINE_set_default_DSA; ++ ENGINE_get_name; ++ ENGINE_get_last; ++ ENGINE_get_prev; ++ ENGINE_get_default_DH; ++ ENGINE_get_RSA; ++ ENGINE_set_default; ++ ENGINE_get_RAND; ++ ENGINE_get_first; ++ ENGINE_by_id; ++ ENGINE_set_finish_function; ++ ENGINE_get_def_BN_mod_exp_crt; ++ ENGINE_get_default_BN_mod_exp_crt; ++ RSA_get_default_openssl_method; ++ ENGINE_set_RSA; ++ ENGINE_load_private_key; ++ ENGINE_set_default_RAND; ++ ENGINE_set_BN_mod_exp; ++ ENGINE_remove; ++ ENGINE_free; ++ ENGINE_get_BN_mod_exp_crt; ++ ENGINE_get_next; ++ ENGINE_set_name; ++ ENGINE_get_default_DSA; ++ ENGINE_set_default_BN_mod_exp; ++ ENGINE_set_default_RSA; ++ ENGINE_get_default_RAND; ++ ENGINE_get_default_BN_mod_exp; ++ ENGINE_set_RAND; ++ ENGINE_set_id; ++ ENGINE_set_BN_mod_exp_crt; ++ ENGINE_set_default_DH; ++ ENGINE_new; ++ ENGINE_get_id; ++ DSA_set_default_openssl_method; ++ ENGINE_add; ++ DH_set_default_openssl_method; ++ ENGINE_get_DSA; ++ ENGINE_get_ctrl_function; ++ ENGINE_set_ctrl_function; ++ BN_pseudo_rand_range; ++ X509_STORE_CTX_set_verify_cb; ++ ERR_load_COMP_strings; ++ PKCS12_item_decrypt_d2i; ++ ASN1_UTF8STRING_it; ++ ASN1_UTF8STRING_it; ++ ENGINE_unregister_ciphers; ++ ENGINE_get_ciphers; ++ d2i_OCSP_BASICRESP; ++ KRB5_CHECKSUM_it; ++ KRB5_CHECKSUM_it; ++ EC_POINT_add; ++ ASN1_item_ex_i2d; ++ OCSP_CERTID_it; ++ OCSP_CERTID_it; ++ d2i_OCSP_RESPBYTES; ++ X509V3_add1_i2d; ++ PKCS7_ENVELOPE_it; ++ PKCS7_ENVELOPE_it; ++ UI_add_input_boolean; ++ ENGINE_unregister_RSA; ++ X509V3_EXT_nconf; ++ ASN1_GENERALSTRING_free; ++ d2i_OCSP_CERTSTATUS; ++ X509_REVOKED_set_serialNumber; ++ X509_print_ex; ++ OCSP_ONEREQ_get1_ext_d2i; ++ ENGINE_register_all_RAND; ++ ENGINE_load_dynamic; ++ PBKDF2PARAM_it; ++ PBKDF2PARAM_it; ++ EXTENDED_KEY_USAGE_new; ++ EC_GROUP_clear_free; ++ OCSP_sendreq_bio; ++ ASN1_item_digest; ++ OCSP_BASICRESP_delete_ext; ++ OCSP_SIGNATURE_it; ++ OCSP_SIGNATURE_it; ++ X509_CRL_it; ++ X509_CRL_it; ++ OCSP_BASICRESP_add_ext; ++ KRB5_ENCKEY_it; ++ KRB5_ENCKEY_it; ++ UI_method_set_closer; ++ X509_STORE_set_purpose; ++ i2d_ASN1_GENERALSTRING; ++ OCSP_response_status; ++ i2d_OCSP_SERVICELOC; ++ ENGINE_get_digest_engine; ++ EC_GROUP_set_curve_GFp; ++ OCSP_REQUEST_get_ext_by_OBJ; ++ _ossl_old_des_random_key; ++ ASN1_T61STRING_it; ++ ASN1_T61STRING_it; ++ EC_GROUP_method_of; ++ i2d_KRB5_APREQ; ++ _ossl_old_des_encrypt; ++ ASN1_PRINTABLE_new; ++ HMAC_Init_ex; ++ d2i_KRB5_AUTHENT; ++ OCSP_archive_cutoff_new; ++ EC_POINT_set_Jprojective_coordinates_GFp; ++ EC_POINT_set_Jproj_coords_GFp; ++ _ossl_old_des_is_weak_key; ++ OCSP_BASICRESP_get_ext_by_OBJ; ++ EC_POINT_oct2point; ++ OCSP_SINGLERESP_get_ext_count; ++ UI_ctrl; ++ _shadow_DES_rw_mode; ++ _shadow_DES_rw_mode; ++ asn1_do_adb; ++ ASN1_template_i2d; ++ ENGINE_register_DH; ++ UI_construct_prompt; ++ X509_STORE_set_trust; ++ UI_dup_input_string; ++ d2i_KRB5_APREQ; ++ EVP_MD_CTX_copy_ex; ++ OCSP_request_is_signed; ++ i2d_OCSP_REQINFO; ++ KRB5_ENCKEY_free; ++ OCSP_resp_get0; ++ GENERAL_NAME_it; ++ GENERAL_NAME_it; ++ ASN1_GENERALIZEDTIME_it; ++ ASN1_GENERALIZEDTIME_it; ++ X509_STORE_set_flags; ++ EC_POINT_set_compressed_coordinates_GFp; ++ EC_POINT_set_compr_coords_GFp; ++ OCSP_response_status_str; ++ d2i_OCSP_REVOKEDINFO; ++ OCSP_basic_add1_cert; ++ ERR_get_implementation; ++ EVP_CipherFinal_ex; ++ OCSP_CERTSTATUS_new; ++ CRYPTO_cleanup_all_ex_data; ++ OCSP_resp_find; ++ BN_nnmod; ++ X509_CRL_sort; ++ X509_REVOKED_set_revocationDate; ++ ENGINE_register_RAND; ++ OCSP_SERVICELOC_new; ++ EC_POINT_set_affine_coordinates_GFp; ++ EC_POINT_set_affine_coords_GFp; ++ _ossl_old_des_options; ++ SXNET_it; ++ SXNET_it; ++ UI_dup_input_boolean; ++ PKCS12_add_CSPName_asc; ++ EC_POINT_is_at_infinity; ++ ENGINE_load_cryptodev; ++ DSO_convert_filename; ++ POLICYQUALINFO_it; ++ POLICYQUALINFO_it; ++ ENGINE_register_ciphers; ++ BN_mod_lshift_quick; ++ DSO_set_filename; ++ ASN1_item_free; ++ KRB5_TKTBODY_free; ++ AUTHORITY_KEYID_it; ++ AUTHORITY_KEYID_it; ++ KRB5_APREQBODY_new; ++ X509V3_EXT_REQ_add_nconf; ++ ENGINE_ctrl_cmd_string; ++ i2d_OCSP_RESPDATA; ++ EVP_MD_CTX_init; ++ EXTENDED_KEY_USAGE_free; ++ PKCS7_ATTR_SIGN_it; ++ PKCS7_ATTR_SIGN_it; ++ UI_add_error_string; ++ KRB5_CHECKSUM_free; ++ OCSP_REQUEST_get_ext; ++ ENGINE_load_ubsec; ++ ENGINE_register_all_digests; ++ PKEY_USAGE_PERIOD_it; ++ PKEY_USAGE_PERIOD_it; ++ PKCS12_unpack_authsafes; ++ ASN1_item_unpack; ++ NETSCAPE_SPKAC_it; ++ NETSCAPE_SPKAC_it; ++ X509_REVOKED_it; ++ X509_REVOKED_it; ++ ASN1_STRING_encode; ++ EVP_aes_128_ecb; ++ KRB5_AUTHENT_free; ++ OCSP_BASICRESP_get_ext_by_critical; ++ OCSP_BASICRESP_get_ext_by_crit; ++ OCSP_cert_status_str; ++ d2i_OCSP_REQUEST; ++ UI_dup_info_string; ++ _ossl_old_des_xwhite_in2out; ++ PKCS12_it; ++ PKCS12_it; ++ OCSP_SINGLERESP_get_ext_by_critical; ++ OCSP_SINGLERESP_get_ext_by_crit; ++ OCSP_CERTSTATUS_free; ++ _ossl_old_des_crypt; ++ ASN1_item_i2d; ++ EVP_DecryptFinal_ex; ++ ENGINE_load_openssl; ++ ENGINE_get_cmd_defns; ++ ENGINE_set_load_privkey_function; ++ ENGINE_set_load_privkey_fn; ++ EVP_EncryptFinal_ex; ++ ENGINE_set_default_digests; ++ X509_get0_pubkey_bitstr; ++ asn1_ex_i2c; ++ ENGINE_register_RSA; ++ ENGINE_unregister_DSA; ++ _ossl_old_des_key_sched; ++ X509_EXTENSION_it; ++ X509_EXTENSION_it; ++ i2d_KRB5_AUTHENT; ++ SXNETID_it; ++ SXNETID_it; ++ d2i_OCSP_SINGLERESP; ++ EDIPARTYNAME_new; ++ PKCS12_certbag2x509; ++ _ossl_old_des_ofb64_encrypt; ++ d2i_EXTENDED_KEY_USAGE; ++ ERR_print_errors_cb; ++ ENGINE_set_ciphers; ++ d2i_KRB5_APREQBODY; ++ UI_method_get_flusher; ++ X509_PUBKEY_it; ++ X509_PUBKEY_it; ++ _ossl_old_des_enc_read; ++ PKCS7_ENCRYPT_it; ++ PKCS7_ENCRYPT_it; ++ i2d_OCSP_RESPONSE; ++ EC_GROUP_get_cofactor; ++ PKCS12_unpack_p7data; ++ d2i_KRB5_AUTHDATA; ++ OCSP_copy_nonce; ++ KRB5_AUTHDATA_new; ++ OCSP_RESPDATA_new; ++ EC_GFp_mont_method; ++ OCSP_REVOKEDINFO_free; ++ UI_get_ex_data; ++ KRB5_APREQBODY_free; ++ EC_GROUP_get0_generator; ++ UI_get_default_method; ++ X509V3_set_nconf; ++ PKCS12_item_i2d_encrypt; ++ X509_add1_ext_i2d; ++ PKCS7_SIGNER_INFO_it; ++ PKCS7_SIGNER_INFO_it; ++ KRB5_PRINCNAME_new; ++ PKCS12_SAFEBAG_it; ++ PKCS12_SAFEBAG_it; ++ EC_GROUP_get_order; ++ d2i_OCSP_RESPID; ++ OCSP_request_verify; ++ NCONF_get_number_e; ++ _ossl_old_des_decrypt3; ++ X509_signature_print; ++ OCSP_SINGLERESP_free; ++ ENGINE_load_builtin_engines; ++ i2d_OCSP_ONEREQ; ++ OCSP_REQUEST_add_ext; ++ OCSP_RESPBYTES_new; ++ EVP_MD_CTX_create; ++ OCSP_resp_find_status; ++ X509_ALGOR_it; ++ X509_ALGOR_it; ++ ASN1_TIME_it; ++ ASN1_TIME_it; ++ OCSP_request_set1_name; ++ OCSP_ONEREQ_get_ext_count; ++ UI_get0_result; ++ PKCS12_AUTHSAFES_it; ++ PKCS12_AUTHSAFES_it; ++ EVP_aes_256_ecb; ++ PKCS12_pack_authsafes; ++ ASN1_IA5STRING_it; ++ ASN1_IA5STRING_it; ++ UI_get_input_flags; ++ EC_GROUP_set_generator; ++ _ossl_old_des_string_to_2keys; ++ OCSP_CERTID_free; ++ X509_CERT_AUX_it; ++ X509_CERT_AUX_it; ++ CERTIFICATEPOLICIES_it; ++ CERTIFICATEPOLICIES_it; ++ _ossl_old_des_ede3_cbc_encrypt; ++ RAND_set_rand_engine; ++ DSO_get_loaded_filename; ++ X509_ATTRIBUTE_it; ++ X509_ATTRIBUTE_it; ++ OCSP_ONEREQ_get_ext_by_NID; ++ PKCS12_decrypt_skey; ++ KRB5_AUTHENT_it; ++ KRB5_AUTHENT_it; ++ UI_dup_error_string; ++ RSAPublicKey_it; ++ RSAPublicKey_it; ++ i2d_OCSP_REQUEST; ++ PKCS12_x509crl2certbag; ++ OCSP_SERVICELOC_it; ++ OCSP_SERVICELOC_it; ++ ASN1_item_sign; ++ X509_CRL_set_issuer_name; ++ OBJ_NAME_do_all_sorted; ++ i2d_OCSP_BASICRESP; ++ i2d_OCSP_RESPBYTES; ++ PKCS12_unpack_p7encdata; ++ HMAC_CTX_init; ++ ENGINE_get_digest; ++ OCSP_RESPONSE_print; ++ KRB5_TKTBODY_it; ++ KRB5_TKTBODY_it; ++ ACCESS_DESCRIPTION_it; ++ ACCESS_DESCRIPTION_it; ++ PKCS7_ISSUER_AND_SERIAL_it; ++ PKCS7_ISSUER_AND_SERIAL_it; ++ PBE2PARAM_it; ++ PBE2PARAM_it; ++ PKCS12_certbag2x509crl; ++ PKCS7_SIGNED_it; ++ PKCS7_SIGNED_it; ++ ENGINE_get_cipher; ++ i2d_OCSP_CRLID; ++ OCSP_SINGLERESP_new; ++ ENGINE_cmd_is_executable; ++ RSA_up_ref; ++ ASN1_GENERALSTRING_it; ++ ASN1_GENERALSTRING_it; ++ ENGINE_register_DSA; ++ X509V3_EXT_add_nconf_sk; ++ ENGINE_set_load_pubkey_function; ++ PKCS8_decrypt; ++ PEM_bytes_read_bio; ++ DIRECTORYSTRING_it; ++ DIRECTORYSTRING_it; ++ d2i_OCSP_CRLID; ++ EC_POINT_is_on_curve; ++ CRYPTO_set_locked_mem_ex_functions; ++ CRYPTO_set_locked_mem_ex_funcs; ++ d2i_KRB5_CHECKSUM; ++ ASN1_item_dup; ++ X509_it; ++ X509_it; ++ BN_mod_add; ++ KRB5_AUTHDATA_free; ++ _ossl_old_des_cbc_cksum; ++ ASN1_item_verify; ++ CRYPTO_set_mem_ex_functions; ++ EC_POINT_get_Jprojective_coordinates_GFp; ++ EC_POINT_get_Jproj_coords_GFp; ++ ZLONG_it; ++ ZLONG_it; ++ CRYPTO_get_locked_mem_ex_functions; ++ CRYPTO_get_locked_mem_ex_funcs; ++ ASN1_TIME_check; ++ UI_get0_user_data; ++ HMAC_CTX_cleanup; ++ DSA_up_ref; ++ _ossl_old_des_ede3_cfb64_encrypt; ++ _ossl_odes_ede3_cfb64_encrypt; ++ ASN1_BMPSTRING_it; ++ ASN1_BMPSTRING_it; ++ ASN1_tag2bit; ++ UI_method_set_flusher; ++ X509_ocspid_print; ++ KRB5_ENCDATA_it; ++ KRB5_ENCDATA_it; ++ ENGINE_get_load_pubkey_function; ++ UI_add_user_data; ++ OCSP_REQUEST_delete_ext; ++ UI_get_method; ++ OCSP_ONEREQ_free; ++ ASN1_PRINTABLESTRING_it; ++ ASN1_PRINTABLESTRING_it; ++ X509_CRL_set_nextUpdate; ++ OCSP_REQUEST_it; ++ OCSP_REQUEST_it; ++ OCSP_BASICRESP_it; ++ OCSP_BASICRESP_it; ++ AES_ecb_encrypt; ++ BN_mod_sqr; ++ NETSCAPE_CERT_SEQUENCE_it; ++ NETSCAPE_CERT_SEQUENCE_it; ++ GENERAL_NAMES_it; ++ GENERAL_NAMES_it; ++ AUTHORITY_INFO_ACCESS_it; ++ AUTHORITY_INFO_ACCESS_it; ++ ASN1_FBOOLEAN_it; ++ ASN1_FBOOLEAN_it; ++ UI_set_ex_data; ++ _ossl_old_des_string_to_key; ++ ENGINE_register_all_RSA; ++ d2i_KRB5_PRINCNAME; ++ OCSP_RESPBYTES_it; ++ OCSP_RESPBYTES_it; ++ X509_CINF_it; ++ X509_CINF_it; ++ ENGINE_unregister_digests; ++ d2i_EDIPARTYNAME; ++ d2i_OCSP_SERVICELOC; ++ ENGINE_get_digests; ++ _ossl_old_des_set_odd_parity; ++ OCSP_RESPDATA_free; ++ d2i_KRB5_TICKET; ++ OTHERNAME_it; ++ OTHERNAME_it; ++ EVP_MD_CTX_cleanup; ++ d2i_ASN1_GENERALSTRING; ++ X509_CRL_set_version; ++ BN_mod_sub; ++ OCSP_SINGLERESP_get_ext_by_NID; ++ ENGINE_get_ex_new_index; ++ OCSP_REQUEST_free; ++ OCSP_REQUEST_add1_ext_i2d; ++ X509_VAL_it; ++ X509_VAL_it; ++ EC_POINTs_make_affine; ++ EC_POINT_mul; ++ X509V3_EXT_add_nconf; ++ X509_TRUST_set; ++ X509_CRL_add1_ext_i2d; ++ _ossl_old_des_fcrypt; ++ DISPLAYTEXT_it; ++ DISPLAYTEXT_it; ++ X509_CRL_set_lastUpdate; ++ OCSP_BASICRESP_free; ++ OCSP_BASICRESP_add1_ext_i2d; ++ d2i_KRB5_AUTHENTBODY; ++ CRYPTO_set_ex_data_implementation; ++ CRYPTO_set_ex_data_impl; ++ KRB5_ENCDATA_new; ++ DSO_up_ref; ++ OCSP_crl_reason_str; ++ UI_get0_result_string; ++ ASN1_GENERALSTRING_new; ++ X509_SIG_it; ++ X509_SIG_it; ++ ERR_set_implementation; ++ ERR_load_EC_strings; ++ UI_get0_action_string; ++ OCSP_ONEREQ_get_ext; ++ EC_POINT_method_of; ++ i2d_KRB5_APREQBODY; ++ _ossl_old_des_ecb3_encrypt; ++ CRYPTO_get_mem_ex_functions; ++ ENGINE_get_ex_data; ++ UI_destroy_method; ++ ASN1_item_i2d_bio; ++ OCSP_ONEREQ_get_ext_by_OBJ; ++ ASN1_primitive_new; ++ ASN1_PRINTABLE_it; ++ ASN1_PRINTABLE_it; ++ EVP_aes_192_ecb; ++ OCSP_SIGNATURE_new; ++ LONG_it; ++ LONG_it; ++ ASN1_VISIBLESTRING_it; ++ ASN1_VISIBLESTRING_it; ++ OCSP_SINGLERESP_add1_ext_i2d; ++ d2i_OCSP_CERTID; ++ ASN1_item_d2i_fp; ++ CRL_DIST_POINTS_it; ++ CRL_DIST_POINTS_it; ++ GENERAL_NAME_print; ++ OCSP_SINGLERESP_delete_ext; ++ PKCS12_SAFEBAGS_it; ++ PKCS12_SAFEBAGS_it; ++ d2i_OCSP_SIGNATURE; ++ OCSP_request_add1_nonce; ++ ENGINE_set_cmd_defns; ++ OCSP_SERVICELOC_free; ++ EC_GROUP_free; ++ ASN1_BIT_STRING_it; ++ ASN1_BIT_STRING_it; ++ X509_REQ_it; ++ X509_REQ_it; ++ _ossl_old_des_cbc_encrypt; ++ ERR_unload_strings; ++ PKCS7_SIGN_ENVELOPE_it; ++ PKCS7_SIGN_ENVELOPE_it; ++ EDIPARTYNAME_free; ++ OCSP_REQINFO_free; ++ EC_GROUP_new_curve_GFp; ++ OCSP_REQUEST_get1_ext_d2i; ++ PKCS12_item_pack_safebag; ++ asn1_ex_c2i; ++ ENGINE_register_digests; ++ i2d_OCSP_REVOKEDINFO; ++ asn1_enc_restore; ++ UI_free; ++ UI_new_method; ++ EVP_EncryptInit_ex; ++ X509_pubkey_digest; ++ EC_POINT_invert; ++ OCSP_basic_sign; ++ i2d_OCSP_RESPID; ++ OCSP_check_nonce; ++ ENGINE_ctrl_cmd; ++ d2i_KRB5_ENCKEY; ++ OCSP_parse_url; ++ OCSP_SINGLERESP_get_ext; ++ OCSP_CRLID_free; ++ OCSP_BASICRESP_get1_ext_d2i; ++ RSAPrivateKey_it; ++ RSAPrivateKey_it; ++ ENGINE_register_all_DH; ++ i2d_EDIPARTYNAME; ++ EC_POINT_get_affine_coordinates_GFp; ++ EC_POINT_get_affine_coords_GFp; ++ OCSP_CRLID_new; ++ ENGINE_get_flags; ++ OCSP_ONEREQ_it; ++ OCSP_ONEREQ_it; ++ UI_process; ++ ASN1_INTEGER_it; ++ ASN1_INTEGER_it; ++ EVP_CipherInit_ex; ++ UI_get_string_type; ++ ENGINE_unregister_DH; ++ ENGINE_register_all_DSA; ++ OCSP_ONEREQ_get_ext_by_critical; ++ bn_dup_expand; ++ OCSP_cert_id_new; ++ BASIC_CONSTRAINTS_it; ++ BASIC_CONSTRAINTS_it; ++ BN_mod_add_quick; ++ EC_POINT_new; ++ EVP_MD_CTX_destroy; ++ OCSP_RESPBYTES_free; ++ EVP_aes_128_cbc; ++ OCSP_SINGLERESP_get1_ext_d2i; ++ EC_POINT_free; ++ DH_up_ref; ++ X509_NAME_ENTRY_it; ++ X509_NAME_ENTRY_it; ++ UI_get_ex_new_index; ++ BN_mod_sub_quick; ++ OCSP_ONEREQ_add_ext; ++ OCSP_request_sign; ++ EVP_DigestFinal_ex; ++ ENGINE_set_digests; ++ OCSP_id_issuer_cmp; ++ OBJ_NAME_do_all; ++ EC_POINTs_mul; ++ ENGINE_register_complete; ++ X509V3_EXT_nconf_nid; ++ ASN1_SEQUENCE_it; ++ ASN1_SEQUENCE_it; ++ UI_set_default_method; ++ RAND_query_egd_bytes; ++ UI_method_get_writer; ++ UI_OpenSSL; ++ PEM_def_callback; ++ ENGINE_cleanup; ++ DIST_POINT_it; ++ DIST_POINT_it; ++ OCSP_SINGLERESP_it; ++ OCSP_SINGLERESP_it; ++ d2i_KRB5_TKTBODY; ++ EC_POINT_cmp; ++ OCSP_REVOKEDINFO_new; ++ i2d_OCSP_CERTSTATUS; ++ OCSP_basic_add1_nonce; ++ ASN1_item_ex_d2i; ++ BN_mod_lshift1_quick; ++ UI_set_method; ++ OCSP_id_get0_info; ++ BN_mod_sqrt; ++ EC_GROUP_copy; ++ KRB5_ENCDATA_free; ++ _ossl_old_des_cfb_encrypt; ++ OCSP_SINGLERESP_get_ext_by_OBJ; ++ OCSP_cert_to_id; ++ OCSP_RESPID_new; ++ OCSP_RESPDATA_it; ++ OCSP_RESPDATA_it; ++ d2i_OCSP_RESPDATA; ++ ENGINE_register_all_complete; ++ OCSP_check_validity; ++ PKCS12_BAGS_it; ++ PKCS12_BAGS_it; ++ OCSP_url_svcloc_new; ++ ASN1_template_free; ++ OCSP_SINGLERESP_add_ext; ++ KRB5_AUTHENTBODY_it; ++ KRB5_AUTHENTBODY_it; ++ X509_supported_extension; ++ i2d_KRB5_AUTHDATA; ++ UI_method_get_opener; ++ ENGINE_set_ex_data; ++ OCSP_REQUEST_print; ++ CBIGNUM_it; ++ CBIGNUM_it; ++ KRB5_TICKET_new; ++ KRB5_APREQ_new; ++ EC_GROUP_get_curve_GFp; ++ KRB5_ENCKEY_new; ++ ASN1_template_d2i; ++ _ossl_old_des_quad_cksum; ++ OCSP_single_get0_status; ++ BN_swap; ++ POLICYINFO_it; ++ POLICYINFO_it; ++ ENGINE_set_destroy_function; ++ asn1_enc_free; ++ OCSP_RESPID_it; ++ OCSP_RESPID_it; ++ EC_GROUP_new; ++ EVP_aes_256_cbc; ++ i2d_KRB5_PRINCNAME; ++ _ossl_old_des_encrypt2; ++ _ossl_old_des_encrypt3; ++ PKCS8_PRIV_KEY_INFO_it; ++ PKCS8_PRIV_KEY_INFO_it; ++ OCSP_REQINFO_it; ++ OCSP_REQINFO_it; ++ PBEPARAM_it; ++ PBEPARAM_it; ++ KRB5_AUTHENTBODY_new; ++ X509_CRL_add0_revoked; ++ EDIPARTYNAME_it; ++ EDIPARTYNAME_it; ++ NETSCAPE_SPKI_it; ++ NETSCAPE_SPKI_it; ++ UI_get0_test_string; ++ ENGINE_get_cipher_engine; ++ ENGINE_register_all_ciphers; ++ EC_POINT_copy; ++ BN_kronecker; ++ _ossl_old_des_ede3_ofb64_encrypt; ++ _ossl_odes_ede3_ofb64_encrypt; ++ UI_method_get_reader; ++ OCSP_BASICRESP_get_ext_count; ++ ASN1_ENUMERATED_it; ++ ASN1_ENUMERATED_it; ++ UI_set_result; ++ i2d_KRB5_TICKET; ++ X509_print_ex_fp; ++ EVP_CIPHER_CTX_set_padding; ++ d2i_OCSP_RESPONSE; ++ ASN1_UTCTIME_it; ++ ASN1_UTCTIME_it; ++ _ossl_old_des_enc_write; ++ OCSP_RESPONSE_new; ++ AES_set_encrypt_key; ++ OCSP_resp_count; ++ KRB5_CHECKSUM_new; ++ ENGINE_load_cswift; ++ OCSP_onereq_get0_id; ++ ENGINE_set_default_ciphers; ++ NOTICEREF_it; ++ NOTICEREF_it; ++ X509V3_EXT_CRL_add_nconf; ++ OCSP_REVOKEDINFO_it; ++ OCSP_REVOKEDINFO_it; ++ AES_encrypt; ++ OCSP_REQUEST_new; ++ ASN1_ANY_it; ++ ASN1_ANY_it; ++ CRYPTO_ex_data_new_class; ++ _ossl_old_des_ncbc_encrypt; ++ i2d_KRB5_TKTBODY; ++ EC_POINT_clear_free; ++ AES_decrypt; ++ asn1_enc_init; ++ UI_get_result_maxsize; ++ OCSP_CERTID_new; ++ ENGINE_unregister_RAND; ++ UI_method_get_closer; ++ d2i_KRB5_ENCDATA; ++ OCSP_request_onereq_count; ++ OCSP_basic_verify; ++ KRB5_AUTHENTBODY_free; ++ ASN1_item_d2i; ++ ASN1_primitive_free; ++ i2d_EXTENDED_KEY_USAGE; ++ i2d_OCSP_SIGNATURE; ++ asn1_enc_save; ++ ENGINE_load_nuron; ++ _ossl_old_des_pcbc_encrypt; ++ PKCS12_MAC_DATA_it; ++ PKCS12_MAC_DATA_it; ++ OCSP_accept_responses_new; ++ asn1_do_lock; ++ PKCS7_ATTR_VERIFY_it; ++ PKCS7_ATTR_VERIFY_it; ++ KRB5_APREQBODY_it; ++ KRB5_APREQBODY_it; ++ i2d_OCSP_SINGLERESP; ++ ASN1_item_ex_new; ++ UI_add_verify_string; ++ _ossl_old_des_set_key; ++ KRB5_PRINCNAME_it; ++ KRB5_PRINCNAME_it; ++ EVP_DecryptInit_ex; ++ i2d_OCSP_CERTID; ++ ASN1_item_d2i_bio; ++ EC_POINT_dbl; ++ asn1_get_choice_selector; ++ i2d_KRB5_CHECKSUM; ++ ENGINE_set_table_flags; ++ AES_options; ++ ENGINE_load_chil; ++ OCSP_id_cmp; ++ OCSP_BASICRESP_new; ++ OCSP_REQUEST_get_ext_by_NID; ++ KRB5_APREQ_it; ++ KRB5_APREQ_it; ++ ENGINE_get_destroy_function; ++ CONF_set_nconf; ++ ASN1_PRINTABLE_free; ++ OCSP_BASICRESP_get_ext_by_NID; ++ DIST_POINT_NAME_it; ++ DIST_POINT_NAME_it; ++ X509V3_extensions_print; ++ _ossl_old_des_cfb64_encrypt; ++ X509_REVOKED_add1_ext_i2d; ++ _ossl_old_des_ofb_encrypt; ++ KRB5_TKTBODY_new; ++ ASN1_OCTET_STRING_it; ++ ASN1_OCTET_STRING_it; ++ ERR_load_UI_strings; ++ i2d_KRB5_ENCKEY; ++ ASN1_template_new; ++ OCSP_SIGNATURE_free; ++ ASN1_item_i2d_fp; ++ KRB5_PRINCNAME_free; ++ PKCS7_RECIP_INFO_it; ++ PKCS7_RECIP_INFO_it; ++ EXTENDED_KEY_USAGE_it; ++ EXTENDED_KEY_USAGE_it; ++ EC_GFp_simple_method; ++ EC_GROUP_precompute_mult; ++ OCSP_request_onereq_get0; ++ UI_method_set_writer; ++ KRB5_AUTHENT_new; ++ X509_CRL_INFO_it; ++ X509_CRL_INFO_it; ++ DSO_set_name_converter; ++ AES_set_decrypt_key; ++ PKCS7_DIGEST_it; ++ PKCS7_DIGEST_it; ++ PKCS12_x5092certbag; ++ EVP_DigestInit_ex; ++ i2a_ACCESS_DESCRIPTION; ++ OCSP_RESPONSE_it; ++ OCSP_RESPONSE_it; ++ PKCS7_ENC_CONTENT_it; ++ PKCS7_ENC_CONTENT_it; ++ OCSP_request_add0_id; ++ EC_POINT_make_affine; ++ DSO_get_filename; ++ OCSP_CERTSTATUS_it; ++ OCSP_CERTSTATUS_it; ++ OCSP_request_add1_cert; ++ UI_get0_output_string; ++ UI_dup_verify_string; ++ BN_mod_lshift; ++ KRB5_AUTHDATA_it; ++ KRB5_AUTHDATA_it; ++ asn1_set_choice_selector; ++ OCSP_basic_add1_status; ++ OCSP_RESPID_free; ++ asn1_get_field_ptr; ++ UI_add_input_string; ++ OCSP_CRLID_it; ++ OCSP_CRLID_it; ++ i2d_KRB5_AUTHENTBODY; ++ OCSP_REQUEST_get_ext_count; ++ ENGINE_load_atalla; ++ X509_NAME_it; ++ X509_NAME_it; ++ USERNOTICE_it; ++ USERNOTICE_it; ++ OCSP_REQINFO_new; ++ OCSP_BASICRESP_get_ext; ++ CRYPTO_get_ex_data_implementation; ++ CRYPTO_get_ex_data_impl; ++ ASN1_item_pack; ++ i2d_KRB5_ENCDATA; ++ X509_PURPOSE_set; ++ X509_REQ_INFO_it; ++ X509_REQ_INFO_it; ++ UI_method_set_opener; ++ ASN1_item_ex_free; ++ ASN1_BOOLEAN_it; ++ ASN1_BOOLEAN_it; ++ ENGINE_get_table_flags; ++ UI_create_method; ++ OCSP_ONEREQ_add1_ext_i2d; ++ _shadow_DES_check_key; ++ _shadow_DES_check_key; ++ d2i_OCSP_REQINFO; ++ UI_add_info_string; ++ UI_get_result_minsize; ++ ASN1_NULL_it; ++ ASN1_NULL_it; ++ BN_mod_lshift1; ++ d2i_OCSP_ONEREQ; ++ OCSP_ONEREQ_new; ++ KRB5_TICKET_it; ++ KRB5_TICKET_it; ++ EVP_aes_192_cbc; ++ KRB5_TICKET_free; ++ UI_new; ++ OCSP_response_create; ++ _ossl_old_des_xcbc_encrypt; ++ PKCS7_it; ++ PKCS7_it; ++ OCSP_REQUEST_get_ext_by_critical; ++ OCSP_REQUEST_get_ext_by_crit; ++ ENGINE_set_flags; ++ _ossl_old_des_ecb_encrypt; ++ OCSP_response_get1_basic; ++ EVP_Digest; ++ OCSP_ONEREQ_delete_ext; ++ ASN1_TBOOLEAN_it; ++ ASN1_TBOOLEAN_it; ++ ASN1_item_new; ++ ASN1_TIME_to_generalizedtime; ++ BIGNUM_it; ++ BIGNUM_it; ++ AES_cbc_encrypt; ++ ENGINE_get_load_privkey_function; ++ ENGINE_get_load_privkey_fn; ++ OCSP_RESPONSE_free; ++ UI_method_set_reader; ++ i2d_ASN1_T61STRING; ++ EC_POINT_set_to_infinity; ++ ERR_load_OCSP_strings; ++ EC_POINT_point2oct; ++ KRB5_APREQ_free; ++ ASN1_OBJECT_it; ++ ASN1_OBJECT_it; ++ OCSP_crlID_new; ++ OCSP_crlID2_new; ++ CONF_modules_load_file; ++ CONF_imodule_set_usr_data; ++ ENGINE_set_default_string; ++ CONF_module_get_usr_data; ++ ASN1_add_oid_module; ++ CONF_modules_finish; ++ OPENSSL_config; ++ CONF_modules_unload; ++ CONF_imodule_get_value; ++ CONF_module_set_usr_data; ++ CONF_parse_list; ++ CONF_module_add; ++ CONF_get1_default_config_file; ++ CONF_imodule_get_flags; ++ CONF_imodule_get_module; ++ CONF_modules_load; ++ CONF_imodule_get_name; ++ ERR_peek_top_error; ++ CONF_imodule_get_usr_data; ++ CONF_imodule_set_flags; ++ ENGINE_add_conf_module; ++ ERR_peek_last_error_line; ++ ERR_peek_last_error_line_data; ++ ERR_peek_last_error; ++ DES_read_2passwords; ++ DES_read_password; ++ UI_UTIL_read_pw; ++ UI_UTIL_read_pw_string; ++ ENGINE_load_aep; ++ ENGINE_load_sureware; ++ OPENSSL_add_all_algorithms_noconf; ++ OPENSSL_add_all_algo_noconf; ++ OPENSSL_add_all_algorithms_conf; ++ OPENSSL_add_all_algo_conf; ++ OPENSSL_load_builtin_modules; ++ AES_ofb128_encrypt; ++ AES_ctr128_encrypt; ++ AES_cfb128_encrypt; ++ ENGINE_load_4758cca; ++ _ossl_096_des_random_seed; ++ EVP_aes_256_ofb; ++ EVP_aes_192_ofb; ++ EVP_aes_128_cfb128; ++ EVP_aes_256_cfb128; ++ EVP_aes_128_ofb; ++ EVP_aes_192_cfb128; ++ CONF_modules_free; ++ NCONF_default; ++ OPENSSL_no_config; ++ NCONF_WIN32; ++ ASN1_UNIVERSALSTRING_new; ++ EVP_des_ede_ecb; ++ i2d_ASN1_UNIVERSALSTRING; ++ ASN1_UNIVERSALSTRING_free; ++ ASN1_UNIVERSALSTRING_it; ++ ASN1_UNIVERSALSTRING_it; ++ d2i_ASN1_UNIVERSALSTRING; ++ EVP_des_ede3_ecb; ++ X509_REQ_print_ex; ++ ENGINE_up_ref; ++ BUF_MEM_grow_clean; ++ CRYPTO_realloc_clean; ++ BUF_strlcat; ++ BIO_indent; ++ BUF_strlcpy; ++ OpenSSLDie; ++ OPENSSL_cleanse; ++ ENGINE_setup_bsd_cryptodev; ++ ERR_release_err_state_table; ++ EVP_aes_128_cfb8; ++ FIPS_corrupt_rsa; ++ FIPS_selftest_des; ++ EVP_aes_128_cfb1; ++ EVP_aes_192_cfb8; ++ FIPS_mode_set; ++ FIPS_selftest_dsa; ++ EVP_aes_256_cfb8; ++ FIPS_allow_md5; ++ DES_ede3_cfb_encrypt; ++ EVP_des_ede3_cfb8; ++ FIPS_rand_seeded; ++ AES_cfbr_encrypt_block; ++ AES_cfb8_encrypt; ++ FIPS_rand_seed; ++ FIPS_corrupt_des; ++ EVP_aes_192_cfb1; ++ FIPS_selftest_aes; ++ FIPS_set_prng_key; ++ EVP_des_cfb8; ++ FIPS_corrupt_dsa; ++ FIPS_test_mode; ++ FIPS_rand_method; ++ EVP_aes_256_cfb1; ++ ERR_load_FIPS_strings; ++ FIPS_corrupt_aes; ++ FIPS_selftest_sha1; ++ FIPS_selftest_rsa; ++ FIPS_corrupt_sha1; ++ EVP_des_cfb1; ++ FIPS_dsa_check; ++ AES_cfb1_encrypt; ++ EVP_des_ede3_cfb1; ++ FIPS_rand_check; ++ FIPS_md5_allowed; ++ FIPS_mode; ++ FIPS_selftest_failed; ++ sk_is_sorted; ++ X509_check_ca; ++ HMAC_CTX_set_flags; ++ d2i_PROXY_CERT_INFO_EXTENSION; ++ PROXY_POLICY_it; ++ PROXY_POLICY_it; ++ i2d_PROXY_POLICY; ++ i2d_PROXY_CERT_INFO_EXTENSION; ++ d2i_PROXY_POLICY; ++ PROXY_CERT_INFO_EXTENSION_new; ++ PROXY_CERT_INFO_EXTENSION_free; ++ PROXY_CERT_INFO_EXTENSION_it; ++ PROXY_CERT_INFO_EXTENSION_it; ++ PROXY_POLICY_free; ++ PROXY_POLICY_new; ++ BN_MONT_CTX_set_locked; ++ FIPS_selftest_rng; ++ EVP_sha384; ++ EVP_sha512; ++ EVP_sha224; ++ EVP_sha256; ++ FIPS_selftest_hmac; ++ FIPS_corrupt_rng; ++ BN_mod_exp_mont_consttime; ++ RSA_X931_hash_id; ++ RSA_padding_check_X931; ++ RSA_verify_PKCS1_PSS; ++ RSA_padding_add_X931; ++ RSA_padding_add_PKCS1_PSS; ++ PKCS1_MGF1; ++ BN_X931_generate_Xpq; ++ RSA_X931_generate_key; ++ BN_X931_derive_prime; ++ BN_X931_generate_prime; ++ RSA_X931_derive; ++ BIO_new_dgram; ++ BN_get0_nist_prime_384; ++ ERR_set_mark; ++ X509_STORE_CTX_set0_crls; ++ ENGINE_set_STORE; ++ ENGINE_register_ECDSA; ++ STORE_meth_set_list_start_fn; ++ STORE_method_set_list_start_function; ++ BN_BLINDING_invert_ex; ++ NAME_CONSTRAINTS_free; ++ STORE_ATTR_INFO_set_number; ++ BN_BLINDING_get_thread_id; ++ X509_STORE_CTX_set0_param; ++ POLICY_MAPPING_it; ++ POLICY_MAPPING_it; ++ STORE_parse_attrs_start; ++ POLICY_CONSTRAINTS_free; ++ EVP_PKEY_add1_attr_by_NID; ++ BN_nist_mod_192; ++ EC_GROUP_get_trinomial_basis; ++ STORE_set_method; ++ GENERAL_SUBTREE_free; ++ NAME_CONSTRAINTS_it; ++ NAME_CONSTRAINTS_it; ++ ECDH_get_default_method; ++ PKCS12_add_safe; ++ EC_KEY_new_by_curve_name; ++ STORE_meth_get_update_store_fn; ++ STORE_method_get_update_store_function; ++ ENGINE_register_ECDH; ++ SHA512_Update; ++ i2d_ECPrivateKey; ++ BN_get0_nist_prime_192; ++ STORE_modify_certificate; ++ EC_POINT_set_affine_coordinates_GF2m; ++ EC_POINT_set_affine_coords_GF2m; ++ BN_GF2m_mod_exp_arr; ++ STORE_ATTR_INFO_modify_number; ++ X509_keyid_get0; ++ ENGINE_load_gmp; ++ pitem_new; ++ BN_GF2m_mod_mul_arr; ++ STORE_list_public_key_endp; ++ o2i_ECPublicKey; ++ EC_KEY_copy; ++ BIO_dump_fp; ++ X509_policy_node_get0_parent; ++ EC_GROUP_check_discriminant; ++ i2o_ECPublicKey; ++ EC_KEY_precompute_mult; ++ a2i_IPADDRESS; ++ STORE_meth_set_initialise_fn; ++ STORE_method_set_initialise_function; ++ X509_STORE_CTX_set_depth; ++ X509_VERIFY_PARAM_inherit; ++ EC_POINT_point2bn; ++ STORE_ATTR_INFO_set_dn; ++ X509_policy_tree_get0_policies; ++ EC_GROUP_new_curve_GF2m; ++ STORE_destroy_method; ++ ENGINE_unregister_STORE; ++ EVP_PKEY_get1_EC_KEY; ++ STORE_ATTR_INFO_get0_number; ++ ENGINE_get_default_ECDH; ++ EC_KEY_get_conv_form; ++ ASN1_OCTET_STRING_NDEF_it; ++ ASN1_OCTET_STRING_NDEF_it; ++ STORE_delete_public_key; ++ STORE_get_public_key; ++ STORE_modify_arbitrary; ++ ENGINE_get_static_state; ++ pqueue_iterator; ++ ECDSA_SIG_new; ++ OPENSSL_DIR_end; ++ BN_GF2m_mod_sqr; ++ EC_POINT_bn2point; ++ X509_VERIFY_PARAM_set_depth; ++ EC_KEY_set_asn1_flag; ++ STORE_get_method; ++ EC_KEY_get_key_method_data; ++ ECDSA_sign_ex; ++ STORE_parse_attrs_end; ++ EC_GROUP_get_point_conversion_form; ++ EC_GROUP_get_point_conv_form; ++ STORE_method_set_store_function; ++ STORE_ATTR_INFO_in; ++ PEM_read_bio_ECPKParameters; ++ EC_GROUP_get_pentanomial_basis; ++ EVP_PKEY_add1_attr_by_txt; ++ BN_BLINDING_set_flags; ++ X509_VERIFY_PARAM_set1_policies; ++ X509_VERIFY_PARAM_set1_name; ++ X509_VERIFY_PARAM_set_purpose; ++ STORE_get_number; ++ ECDSA_sign_setup; ++ BN_GF2m_mod_solve_quad_arr; ++ EC_KEY_up_ref; ++ POLICY_MAPPING_free; ++ BN_GF2m_mod_div; ++ X509_VERIFY_PARAM_set_flags; ++ EC_KEY_free; ++ STORE_meth_set_list_next_fn; ++ STORE_method_set_list_next_function; ++ PEM_write_bio_ECPrivateKey; ++ d2i_EC_PUBKEY; ++ STORE_meth_get_generate_fn; ++ STORE_method_get_generate_function; ++ STORE_meth_set_list_end_fn; ++ STORE_method_set_list_end_function; ++ pqueue_print; ++ EC_GROUP_have_precompute_mult; ++ EC_KEY_print_fp; ++ BN_GF2m_mod_arr; ++ PEM_write_bio_X509_CERT_PAIR; ++ EVP_PKEY_cmp; ++ X509_policy_level_node_count; ++ STORE_new_engine; ++ STORE_list_public_key_start; ++ X509_VERIFY_PARAM_new; ++ ECDH_get_ex_data; ++ EVP_PKEY_get_attr; ++ ECDSA_do_sign; ++ ENGINE_unregister_ECDH; ++ ECDH_OpenSSL; ++ EC_KEY_set_conv_form; ++ EC_POINT_dup; ++ GENERAL_SUBTREE_new; ++ STORE_list_crl_endp; ++ EC_get_builtin_curves; ++ X509_policy_node_get0_qualifiers; ++ X509_pcy_node_get0_qualifiers; ++ STORE_list_crl_end; ++ EVP_PKEY_set1_EC_KEY; ++ BN_GF2m_mod_sqrt_arr; ++ i2d_ECPrivateKey_bio; ++ ECPKParameters_print_fp; ++ pqueue_find; ++ ECDSA_SIG_free; ++ PEM_write_bio_ECPKParameters; ++ STORE_method_set_ctrl_function; ++ STORE_list_public_key_end; ++ EC_KEY_set_private_key; ++ pqueue_peek; ++ STORE_get_arbitrary; ++ STORE_store_crl; ++ X509_policy_node_get0_policy; ++ PKCS12_add_safes; ++ BN_BLINDING_convert_ex; ++ X509_policy_tree_free; ++ OPENSSL_ia32cap_loc; ++ BN_GF2m_poly2arr; ++ STORE_ctrl; ++ STORE_ATTR_INFO_compare; ++ BN_get0_nist_prime_224; ++ i2d_ECParameters; ++ i2d_ECPKParameters; ++ BN_GENCB_call; ++ d2i_ECPKParameters; ++ STORE_meth_set_generate_fn; ++ STORE_method_set_generate_function; ++ ENGINE_set_ECDH; ++ NAME_CONSTRAINTS_new; ++ SHA256_Init; ++ EC_KEY_get0_public_key; ++ PEM_write_bio_EC_PUBKEY; ++ STORE_ATTR_INFO_set_cstr; ++ STORE_list_crl_next; ++ STORE_ATTR_INFO_in_range; ++ ECParameters_print; ++ STORE_meth_set_delete_fn; ++ STORE_method_set_delete_function; ++ STORE_list_certificate_next; ++ ASN1_generate_nconf; ++ BUF_memdup; ++ BN_GF2m_mod_mul; ++ STORE_meth_get_list_next_fn; ++ STORE_method_get_list_next_function; ++ STORE_ATTR_INFO_get0_dn; ++ STORE_list_private_key_next; ++ EC_GROUP_set_seed; ++ X509_VERIFY_PARAM_set_trust; ++ STORE_ATTR_INFO_free; ++ STORE_get_private_key; ++ EVP_PKEY_get_attr_count; ++ STORE_ATTR_INFO_new; ++ EC_GROUP_get_curve_GF2m; ++ STORE_meth_set_revoke_fn; ++ STORE_method_set_revoke_function; ++ STORE_store_number; ++ BN_is_prime_ex; ++ STORE_revoke_public_key; ++ X509_STORE_CTX_get0_param; ++ STORE_delete_arbitrary; ++ PEM_read_X509_CERT_PAIR; ++ X509_STORE_set_depth; ++ ECDSA_get_ex_data; ++ SHA224; ++ BIO_dump_indent_fp; ++ EC_KEY_set_group; ++ BUF_strndup; ++ STORE_list_certificate_start; ++ BN_GF2m_mod; ++ X509_REQ_check_private_key; ++ EC_GROUP_get_seed_len; ++ ERR_load_STORE_strings; ++ PEM_read_bio_EC_PUBKEY; ++ STORE_list_private_key_end; ++ i2d_EC_PUBKEY; ++ ECDSA_get_default_method; ++ ASN1_put_eoc; ++ X509_STORE_CTX_get_explicit_policy; ++ X509_STORE_CTX_get_expl_policy; ++ X509_VERIFY_PARAM_table_cleanup; ++ STORE_modify_private_key; ++ X509_VERIFY_PARAM_free; ++ EC_METHOD_get_field_type; ++ EC_GFp_nist_method; ++ STORE_meth_set_modify_fn; ++ STORE_method_set_modify_function; ++ STORE_parse_attrs_next; ++ ENGINE_load_padlock; ++ EC_GROUP_set_curve_name; ++ X509_CERT_PAIR_it; ++ X509_CERT_PAIR_it; ++ STORE_meth_get_revoke_fn; ++ STORE_method_get_revoke_function; ++ STORE_method_set_get_function; ++ STORE_modify_number; ++ STORE_method_get_store_function; ++ STORE_store_private_key; ++ BN_GF2m_mod_sqr_arr; ++ RSA_setup_blinding; ++ BIO_s_datagram; ++ STORE_Memory; ++ sk_find_ex; ++ EC_GROUP_set_curve_GF2m; ++ ENGINE_set_default_ECDSA; ++ POLICY_CONSTRAINTS_new; ++ BN_GF2m_mod_sqrt; ++ ECDH_set_default_method; ++ EC_KEY_generate_key; ++ SHA384_Update; ++ BN_GF2m_arr2poly; ++ STORE_method_get_get_function; ++ STORE_meth_set_cleanup_fn; ++ STORE_method_set_cleanup_function; ++ EC_GROUP_check; ++ d2i_ECPrivateKey_bio; ++ EC_KEY_insert_key_method_data; ++ STORE_meth_get_lock_store_fn; ++ STORE_method_get_lock_store_function; ++ X509_VERIFY_PARAM_get_depth; ++ SHA224_Final; ++ STORE_meth_set_update_store_fn; ++ STORE_method_set_update_store_function; ++ SHA224_Update; ++ d2i_ECPrivateKey; ++ ASN1_item_ndef_i2d; ++ STORE_delete_private_key; ++ ERR_pop_to_mark; ++ ENGINE_register_all_STORE; ++ X509_policy_level_get0_node; ++ i2d_PKCS7_NDEF; ++ EC_GROUP_get_degree; ++ ASN1_generate_v3; ++ STORE_ATTR_INFO_modify_cstr; ++ X509_policy_tree_level_count; ++ BN_GF2m_add; ++ EC_KEY_get0_group; ++ STORE_generate_crl; ++ STORE_store_public_key; ++ X509_CERT_PAIR_free; ++ STORE_revoke_private_key; ++ BN_nist_mod_224; ++ SHA512_Final; ++ STORE_ATTR_INFO_modify_dn; ++ STORE_meth_get_initialise_fn; ++ STORE_method_get_initialise_function; ++ STORE_delete_number; ++ i2d_EC_PUBKEY_bio; ++ BIO_dgram_non_fatal_error; ++ EC_GROUP_get_asn1_flag; ++ STORE_ATTR_INFO_in_ex; ++ STORE_list_crl_start; ++ ECDH_get_ex_new_index; ++ STORE_meth_get_modify_fn; ++ STORE_method_get_modify_function; ++ v2i_ASN1_BIT_STRING; ++ STORE_store_certificate; ++ OBJ_bsearch_ex; ++ X509_STORE_CTX_set_default; ++ STORE_ATTR_INFO_set_sha1str; ++ BN_GF2m_mod_inv; ++ BN_GF2m_mod_exp; ++ STORE_modify_public_key; ++ STORE_meth_get_list_start_fn; ++ STORE_method_get_list_start_function; ++ EC_GROUP_get0_seed; ++ STORE_store_arbitrary; ++ STORE_meth_set_unlock_store_fn; ++ STORE_method_set_unlock_store_function; ++ BN_GF2m_mod_div_arr; ++ ENGINE_set_ECDSA; ++ STORE_create_method; ++ ECPKParameters_print; ++ EC_KEY_get0_private_key; ++ PEM_write_EC_PUBKEY; ++ X509_VERIFY_PARAM_set1; ++ ECDH_set_method; ++ v2i_GENERAL_NAME_ex; ++ ECDH_set_ex_data; ++ STORE_generate_key; ++ BN_nist_mod_521; ++ X509_policy_tree_get0_level; ++ EC_GROUP_set_point_conversion_form; ++ EC_GROUP_set_point_conv_form; ++ PEM_read_EC_PUBKEY; ++ i2d_ECDSA_SIG; ++ ECDSA_OpenSSL; ++ STORE_delete_crl; ++ EC_KEY_get_enc_flags; ++ ASN1_const_check_infinite_end; ++ EVP_PKEY_delete_attr; ++ ECDSA_set_default_method; ++ EC_POINT_set_compressed_coordinates_GF2m; ++ EC_POINT_set_compr_coords_GF2m; ++ EC_GROUP_cmp; ++ STORE_revoke_certificate; ++ BN_get0_nist_prime_256; ++ STORE_meth_get_delete_fn; ++ STORE_method_get_delete_function; ++ SHA224_Init; ++ PEM_read_ECPrivateKey; ++ SHA512_Init; ++ STORE_parse_attrs_endp; ++ BN_set_negative; ++ ERR_load_ECDSA_strings; ++ EC_GROUP_get_basis_type; ++ STORE_list_public_key_next; ++ i2v_ASN1_BIT_STRING; ++ STORE_OBJECT_free; ++ BN_nist_mod_384; ++ i2d_X509_CERT_PAIR; ++ PEM_write_ECPKParameters; ++ ECDH_compute_key; ++ STORE_ATTR_INFO_get0_sha1str; ++ ENGINE_register_all_ECDH; ++ pqueue_pop; ++ STORE_ATTR_INFO_get0_cstr; ++ POLICY_CONSTRAINTS_it; ++ POLICY_CONSTRAINTS_it; ++ STORE_get_ex_new_index; ++ EVP_PKEY_get_attr_by_OBJ; ++ X509_VERIFY_PARAM_add0_policy; ++ BN_GF2m_mod_solve_quad; ++ SHA256; ++ i2d_ECPrivateKey_fp; ++ X509_policy_tree_get0_user_policies; ++ X509_pcy_tree_get0_usr_policies; ++ OPENSSL_DIR_read; ++ ENGINE_register_all_ECDSA; ++ X509_VERIFY_PARAM_lookup; ++ EC_POINT_get_affine_coordinates_GF2m; ++ EC_POINT_get_affine_coords_GF2m; ++ EC_GROUP_dup; ++ ENGINE_get_default_ECDSA; ++ EC_KEY_new; ++ SHA256_Transform; ++ EC_KEY_set_enc_flags; ++ ECDSA_verify; ++ EC_POINT_point2hex; ++ ENGINE_get_STORE; ++ SHA512; ++ STORE_get_certificate; ++ ECDSA_do_sign_ex; ++ ECDSA_do_verify; ++ d2i_ECPrivateKey_fp; ++ STORE_delete_certificate; ++ SHA512_Transform; ++ X509_STORE_set1_param; ++ STORE_method_get_ctrl_function; ++ STORE_free; ++ PEM_write_ECPrivateKey; ++ STORE_meth_get_unlock_store_fn; ++ STORE_method_get_unlock_store_function; ++ STORE_get_ex_data; ++ EC_KEY_set_public_key; ++ PEM_read_ECPKParameters; ++ X509_CERT_PAIR_new; ++ ENGINE_register_STORE; ++ RSA_generate_key_ex; ++ DSA_generate_parameters_ex; ++ ECParameters_print_fp; ++ X509V3_NAME_from_section; ++ EVP_PKEY_add1_attr; ++ STORE_modify_crl; ++ STORE_list_private_key_start; ++ POLICY_MAPPINGS_it; ++ POLICY_MAPPINGS_it; ++ GENERAL_SUBTREE_it; ++ GENERAL_SUBTREE_it; ++ EC_GROUP_get_curve_name; ++ PEM_write_X509_CERT_PAIR; ++ BIO_dump_indent_cb; ++ d2i_X509_CERT_PAIR; ++ STORE_list_private_key_endp; ++ asn1_const_Finish; ++ i2d_EC_PUBKEY_fp; ++ BN_nist_mod_256; ++ X509_VERIFY_PARAM_add0_table; ++ pqueue_free; ++ BN_BLINDING_create_param; ++ ECDSA_size; ++ d2i_EC_PUBKEY_bio; ++ BN_get0_nist_prime_521; ++ STORE_ATTR_INFO_modify_sha1str; ++ BN_generate_prime_ex; ++ EC_GROUP_new_by_curve_name; ++ SHA256_Final; ++ DH_generate_parameters_ex; ++ PEM_read_bio_ECPrivateKey; ++ STORE_meth_get_cleanup_fn; ++ STORE_method_get_cleanup_function; ++ ENGINE_get_ECDH; ++ d2i_ECDSA_SIG; ++ BN_is_prime_fasttest_ex; ++ ECDSA_sign; ++ X509_policy_check; ++ EVP_PKEY_get_attr_by_NID; ++ STORE_set_ex_data; ++ ENGINE_get_ECDSA; ++ EVP_ecdsa; ++ BN_BLINDING_get_flags; ++ PKCS12_add_cert; ++ STORE_OBJECT_new; ++ ERR_load_ECDH_strings; ++ EC_KEY_dup; ++ EVP_CIPHER_CTX_rand_key; ++ ECDSA_set_method; ++ a2i_IPADDRESS_NC; ++ d2i_ECParameters; ++ STORE_list_certificate_end; ++ STORE_get_crl; ++ X509_POLICY_NODE_print; ++ SHA384_Init; ++ EC_GF2m_simple_method; ++ ECDSA_set_ex_data; ++ SHA384_Final; ++ PKCS7_set_digest; ++ EC_KEY_print; ++ STORE_meth_set_lock_store_fn; ++ STORE_method_set_lock_store_function; ++ ECDSA_get_ex_new_index; ++ SHA384; ++ POLICY_MAPPING_new; ++ STORE_list_certificate_endp; ++ X509_STORE_CTX_get0_policy_tree; ++ EC_GROUP_set_asn1_flag; ++ EC_KEY_check_key; ++ d2i_EC_PUBKEY_fp; ++ PKCS7_set0_type_other; ++ PEM_read_bio_X509_CERT_PAIR; ++ pqueue_next; ++ STORE_meth_get_list_end_fn; ++ STORE_method_get_list_end_function; ++ EVP_PKEY_add1_attr_by_OBJ; ++ X509_VERIFY_PARAM_set_time; ++ pqueue_new; ++ ENGINE_set_default_ECDH; ++ STORE_new_method; ++ PKCS12_add_key; ++ DSO_merge; ++ EC_POINT_hex2point; ++ BIO_dump_cb; ++ SHA256_Update; ++ pqueue_insert; ++ pitem_free; ++ BN_GF2m_mod_inv_arr; ++ ENGINE_unregister_ECDSA; ++ BN_BLINDING_set_thread_id; ++ get_rfc3526_prime_8192; ++ X509_VERIFY_PARAM_clear_flags; ++ get_rfc2409_prime_1024; ++ DH_check_pub_key; ++ get_rfc3526_prime_2048; ++ get_rfc3526_prime_6144; ++ get_rfc3526_prime_1536; ++ get_rfc3526_prime_3072; ++ get_rfc3526_prime_4096; ++ get_rfc2409_prime_768; ++ X509_VERIFY_PARAM_get_flags; ++ EVP_CIPHER_CTX_new; ++ EVP_CIPHER_CTX_free; ++ Camellia_cbc_encrypt; ++ Camellia_cfb128_encrypt; ++ Camellia_cfb1_encrypt; ++ Camellia_cfb8_encrypt; ++ Camellia_ctr128_encrypt; ++ Camellia_cfbr_encrypt_block; ++ Camellia_decrypt; ++ Camellia_ecb_encrypt; ++ Camellia_encrypt; ++ Camellia_ofb128_encrypt; ++ Camellia_set_key; ++ EVP_camellia_128_cbc; ++ EVP_camellia_128_cfb128; ++ EVP_camellia_128_cfb1; ++ EVP_camellia_128_cfb8; ++ EVP_camellia_128_ecb; ++ EVP_camellia_128_ofb; ++ EVP_camellia_192_cbc; ++ EVP_camellia_192_cfb128; ++ EVP_camellia_192_cfb1; ++ EVP_camellia_192_cfb8; ++ EVP_camellia_192_ecb; ++ EVP_camellia_192_ofb; ++ EVP_camellia_256_cbc; ++ EVP_camellia_256_cfb128; ++ EVP_camellia_256_cfb1; ++ EVP_camellia_256_cfb8; ++ EVP_camellia_256_ecb; ++ EVP_camellia_256_ofb; ++ a2i_ipadd; ++ ASIdentifiers_free; ++ i2d_ASIdOrRange; ++ EVP_CIPHER_block_size; ++ v3_asid_is_canonical; ++ IPAddressChoice_free; ++ EVP_CIPHER_CTX_set_app_data; ++ BIO_set_callback_arg; ++ v3_addr_add_prefix; ++ IPAddressOrRange_it; ++ IPAddressOrRange_it; ++ BIO_set_flags; ++ ASIdentifiers_it; ++ ASIdentifiers_it; ++ v3_addr_get_range; ++ BIO_method_type; ++ v3_addr_inherits; ++ IPAddressChoice_it; ++ IPAddressChoice_it; ++ AES_ige_encrypt; ++ v3_addr_add_range; ++ EVP_CIPHER_CTX_nid; ++ d2i_ASRange; ++ v3_addr_add_inherit; ++ v3_asid_add_id_or_range; ++ v3_addr_validate_resource_set; ++ EVP_CIPHER_iv_length; ++ EVP_MD_type; ++ v3_asid_canonize; ++ IPAddressRange_free; ++ v3_asid_add_inherit; ++ EVP_CIPHER_CTX_key_length; ++ IPAddressRange_new; ++ ASIdOrRange_new; ++ EVP_MD_size; ++ EVP_MD_CTX_test_flags; ++ BIO_clear_flags; ++ i2d_ASRange; ++ IPAddressRange_it; ++ IPAddressRange_it; ++ IPAddressChoice_new; ++ ASIdentifierChoice_new; ++ ASRange_free; ++ EVP_MD_pkey_type; ++ EVP_MD_CTX_clear_flags; ++ IPAddressFamily_free; ++ i2d_IPAddressFamily; ++ IPAddressOrRange_new; ++ EVP_CIPHER_flags; ++ v3_asid_validate_resource_set; ++ d2i_IPAddressRange; ++ AES_bi_ige_encrypt; ++ BIO_get_callback; ++ IPAddressOrRange_free; ++ v3_addr_subset; ++ d2i_IPAddressFamily; ++ v3_asid_subset; ++ BIO_test_flags; ++ i2d_ASIdentifierChoice; ++ ASRange_it; ++ ASRange_it; ++ d2i_ASIdentifiers; ++ ASRange_new; ++ d2i_IPAddressChoice; ++ v3_addr_get_afi; ++ EVP_CIPHER_key_length; ++ EVP_Cipher; ++ i2d_IPAddressOrRange; ++ ASIdOrRange_it; ++ ASIdOrRange_it; ++ EVP_CIPHER_nid; ++ i2d_IPAddressChoice; ++ EVP_CIPHER_CTX_block_size; ++ ASIdentifiers_new; ++ v3_addr_validate_path; ++ IPAddressFamily_new; ++ EVP_MD_CTX_set_flags; ++ v3_addr_is_canonical; ++ i2d_IPAddressRange; ++ IPAddressFamily_it; ++ IPAddressFamily_it; ++ v3_asid_inherits; ++ EVP_CIPHER_CTX_cipher; ++ EVP_CIPHER_CTX_get_app_data; ++ EVP_MD_block_size; ++ EVP_CIPHER_CTX_flags; ++ v3_asid_validate_path; ++ d2i_IPAddressOrRange; ++ v3_addr_canonize; ++ ASIdentifierChoice_it; ++ ASIdentifierChoice_it; ++ EVP_MD_CTX_md; ++ d2i_ASIdentifierChoice; ++ BIO_method_name; ++ EVP_CIPHER_CTX_iv_length; ++ ASIdOrRange_free; ++ ASIdentifierChoice_free; ++ BIO_get_callback_arg; ++ BIO_set_callback; ++ d2i_ASIdOrRange; ++ i2d_ASIdentifiers; ++ SEED_decrypt; ++ SEED_encrypt; ++ SEED_cbc_encrypt; ++ EVP_seed_ofb; ++ SEED_cfb128_encrypt; ++ SEED_ofb128_encrypt; ++ EVP_seed_cbc; ++ SEED_ecb_encrypt; ++ EVP_seed_ecb; ++ SEED_set_key; ++ EVP_seed_cfb128; ++ X509_EXTENSIONS_it; ++ X509_EXTENSIONS_it; ++ X509_get1_ocsp; ++ OCSP_REQ_CTX_free; ++ i2d_X509_EXTENSIONS; ++ OCSP_sendreq_nbio; ++ OCSP_sendreq_new; ++ d2i_X509_EXTENSIONS; ++ X509_ALGORS_it; ++ X509_ALGORS_it; ++ X509_ALGOR_get0; ++ X509_ALGOR_set0; ++ AES_unwrap_key; ++ AES_wrap_key; ++ X509at_get0_data_by_OBJ; ++ ASN1_TYPE_set1; ++ ASN1_STRING_set0; ++ i2d_X509_ALGORS; ++ BIO_f_zlib; ++ COMP_zlib_cleanup; ++ d2i_X509_ALGORS; ++ CMS_ReceiptRequest_free; ++ PEM_write_CMS; ++ CMS_add0_CertificateChoices; ++ CMS_unsigned_add1_attr_by_OBJ; ++ ERR_load_CMS_strings; ++ CMS_sign_receipt; ++ i2d_CMS_ContentInfo; ++ CMS_signed_delete_attr; ++ d2i_CMS_bio; ++ CMS_unsigned_get_attr_by_NID; ++ CMS_verify; ++ SMIME_read_CMS; ++ CMS_decrypt_set1_key; ++ CMS_SignerInfo_get0_algs; ++ CMS_add1_cert; ++ CMS_set_detached; ++ CMS_encrypt; ++ CMS_EnvelopedData_create; ++ CMS_uncompress; ++ CMS_add0_crl; ++ CMS_SignerInfo_verify_content; ++ CMS_unsigned_get0_data_by_OBJ; ++ PEM_write_bio_CMS; ++ CMS_unsigned_get_attr; ++ CMS_RecipientInfo_ktri_cert_cmp; ++ CMS_RecipientInfo_ktri_get0_algs; ++ CMS_RecipInfo_ktri_get0_algs; ++ CMS_ContentInfo_free; ++ CMS_final; ++ CMS_add_simple_smimecap; ++ CMS_SignerInfo_verify; ++ CMS_data; ++ CMS_ContentInfo_it; ++ CMS_ContentInfo_it; ++ d2i_CMS_ReceiptRequest; ++ CMS_compress; ++ CMS_digest_create; ++ CMS_SignerInfo_cert_cmp; ++ CMS_SignerInfo_sign; ++ CMS_data_create; ++ i2d_CMS_bio; ++ CMS_EncryptedData_set1_key; ++ CMS_decrypt; ++ int_smime_write_ASN1; ++ CMS_unsigned_delete_attr; ++ CMS_unsigned_get_attr_count; ++ CMS_add_smimecap; ++ PEM_read_CMS; ++ CMS_signed_get_attr_by_OBJ; ++ d2i_CMS_ContentInfo; ++ CMS_add_standard_smimecap; ++ CMS_ContentInfo_new; ++ CMS_RecipientInfo_type; ++ CMS_get0_type; ++ CMS_is_detached; ++ CMS_sign; ++ CMS_signed_add1_attr; ++ CMS_unsigned_get_attr_by_OBJ; ++ SMIME_write_CMS; ++ CMS_EncryptedData_decrypt; ++ CMS_get0_RecipientInfos; ++ CMS_add0_RevocationInfoChoice; ++ CMS_decrypt_set1_pkey; ++ CMS_SignerInfo_set1_signer_cert; ++ CMS_get0_signers; ++ CMS_ReceiptRequest_get0_values; ++ CMS_signed_get0_data_by_OBJ; ++ CMS_get0_SignerInfos; ++ CMS_add0_cert; ++ CMS_EncryptedData_encrypt; ++ CMS_digest_verify; ++ CMS_set1_signers_certs; ++ CMS_signed_get_attr; ++ CMS_RecipientInfo_set0_key; ++ CMS_SignedData_init; ++ CMS_RecipientInfo_kekri_get0_id; ++ CMS_verify_receipt; ++ CMS_ReceiptRequest_it; ++ CMS_ReceiptRequest_it; ++ PEM_read_bio_CMS; ++ CMS_get1_crls; ++ CMS_add0_recipient_key; ++ SMIME_read_ASN1; ++ CMS_ReceiptRequest_new; ++ CMS_get0_content; ++ CMS_get1_ReceiptRequest; ++ CMS_signed_add1_attr_by_OBJ; ++ CMS_RecipientInfo_kekri_id_cmp; ++ CMS_add1_ReceiptRequest; ++ CMS_SignerInfo_get0_signer_id; ++ CMS_unsigned_add1_attr_by_NID; ++ CMS_unsigned_add1_attr; ++ CMS_signed_get_attr_by_NID; ++ CMS_get1_certs; ++ CMS_signed_add1_attr_by_NID; ++ CMS_unsigned_add1_attr_by_txt; ++ CMS_dataFinal; ++ CMS_RecipientInfo_ktri_get0_signer_id; ++ CMS_RecipInfo_ktri_get0_sigr_id; ++ i2d_CMS_ReceiptRequest; ++ CMS_add1_recipient_cert; ++ CMS_dataInit; ++ CMS_signed_add1_attr_by_txt; ++ CMS_RecipientInfo_decrypt; ++ CMS_signed_get_attr_count; ++ CMS_get0_eContentType; ++ CMS_set1_eContentType; ++ CMS_ReceiptRequest_create0; ++ CMS_add1_signer; ++ CMS_RecipientInfo_set0_pkey; ++ ENGINE_set_load_ssl_client_cert_function; ++ ENGINE_set_ld_ssl_clnt_cert_fn; ++ ENGINE_get_ssl_client_cert_function; ++ ENGINE_get_ssl_client_cert_fn; ++ ENGINE_load_ssl_client_cert; ++ ENGINE_load_capi; ++ OPENSSL_isservice; ++ FIPS_dsa_sig_decode; ++ EVP_CIPHER_CTX_clear_flags; ++ FIPS_rand_status; ++ FIPS_rand_set_key; ++ CRYPTO_set_mem_info_functions; ++ RSA_X931_generate_key_ex; ++ int_ERR_set_state_func; ++ int_EVP_MD_set_engine_callbacks; ++ int_CRYPTO_set_do_dynlock_callback; ++ FIPS_rng_stick; ++ EVP_CIPHER_CTX_set_flags; ++ BN_X931_generate_prime_ex; ++ FIPS_selftest_check; ++ FIPS_rand_set_dt; ++ CRYPTO_dbg_pop_info; ++ FIPS_dsa_free; ++ RSA_X931_derive_ex; ++ FIPS_rsa_new; ++ FIPS_rand_bytes; ++ fips_cipher_test; ++ EVP_CIPHER_CTX_test_flags; ++ CRYPTO_malloc_debug_init; ++ CRYPTO_dbg_push_info; ++ FIPS_corrupt_rsa_keygen; ++ FIPS_dh_new; ++ FIPS_corrupt_dsa_keygen; ++ FIPS_dh_free; ++ fips_pkey_signature_test; ++ EVP_add_alg_module; ++ int_RAND_init_engine_callbacks; ++ int_EVP_CIPHER_set_engine_callbacks; ++ int_EVP_MD_init_engine_callbacks; ++ FIPS_rand_test_mode; ++ FIPS_rand_reset; ++ FIPS_dsa_new; ++ int_RAND_set_callbacks; ++ BN_X931_derive_prime_ex; ++ int_ERR_lib_init; ++ int_EVP_CIPHER_init_engine_callbacks; ++ FIPS_rsa_free; ++ FIPS_dsa_sig_encode; ++ CRYPTO_dbg_remove_all_info; ++ OPENSSL_init; ++ CRYPTO_strdup; ++ JPAKE_STEP3A_process; ++ JPAKE_STEP1_release; ++ JPAKE_get_shared_key; ++ JPAKE_STEP3B_init; ++ JPAKE_STEP1_generate; ++ JPAKE_STEP1_init; ++ JPAKE_STEP3B_process; ++ JPAKE_STEP2_generate; ++ JPAKE_CTX_new; ++ JPAKE_CTX_free; ++ JPAKE_STEP3B_release; ++ JPAKE_STEP3A_release; ++ JPAKE_STEP2_process; ++ JPAKE_STEP3B_generate; ++ JPAKE_STEP1_process; ++ JPAKE_STEP3A_generate; ++ JPAKE_STEP2_release; ++ JPAKE_STEP3A_init; ++ ERR_load_JPAKE_strings; ++ JPAKE_STEP2_init; ++ pqueue_size; ++ i2d_TS_ACCURACY; ++ i2d_TS_MSG_IMPRINT_fp; ++ i2d_TS_MSG_IMPRINT; ++ EVP_PKEY_print_public; ++ EVP_PKEY_CTX_new; ++ i2d_TS_TST_INFO; ++ EVP_PKEY_asn1_find; ++ DSO_METHOD_beos; ++ TS_CONF_load_cert; ++ TS_REQ_get_ext; ++ EVP_PKEY_sign_init; ++ ASN1_item_print; ++ TS_TST_INFO_set_nonce; ++ TS_RESP_dup; ++ ENGINE_register_pkey_meths; ++ EVP_PKEY_asn1_add0; ++ PKCS7_add0_attrib_signing_time; ++ i2d_TS_TST_INFO_fp; ++ BIO_asn1_get_prefix; ++ TS_TST_INFO_set_time; ++ EVP_PKEY_meth_set_decrypt; ++ EVP_PKEY_set_type_str; ++ EVP_PKEY_CTX_get_keygen_info; ++ TS_REQ_set_policy_id; ++ d2i_TS_RESP_fp; ++ ENGINE_get_pkey_asn1_meth_engine; ++ ENGINE_get_pkey_asn1_meth_eng; ++ WHIRLPOOL_Init; ++ TS_RESP_set_status_info; ++ EVP_PKEY_keygen; ++ EVP_DigestSignInit; ++ TS_ACCURACY_set_millis; ++ TS_REQ_dup; ++ GENERAL_NAME_dup; ++ ASN1_SEQUENCE_ANY_it; ++ ASN1_SEQUENCE_ANY_it; ++ WHIRLPOOL; ++ X509_STORE_get1_crls; ++ ENGINE_get_pkey_asn1_meth; ++ EVP_PKEY_asn1_new; ++ BIO_new_NDEF; ++ ENGINE_get_pkey_meth; ++ TS_MSG_IMPRINT_set_algo; ++ i2d_TS_TST_INFO_bio; ++ TS_TST_INFO_set_ordering; ++ TS_TST_INFO_get_ext_by_OBJ; ++ CRYPTO_THREADID_set_pointer; ++ TS_CONF_get_tsa_section; ++ SMIME_write_ASN1; ++ TS_RESP_CTX_set_signer_key; ++ EVP_PKEY_encrypt_old; ++ EVP_PKEY_encrypt_init; ++ CRYPTO_THREADID_cpy; ++ ASN1_PCTX_get_cert_flags; ++ i2d_ESS_SIGNING_CERT; ++ TS_CONF_load_key; ++ i2d_ASN1_SEQUENCE_ANY; ++ d2i_TS_MSG_IMPRINT_bio; ++ EVP_PKEY_asn1_set_public; ++ b2i_PublicKey_bio; ++ BIO_asn1_set_prefix; ++ EVP_PKEY_new_mac_key; ++ BIO_new_CMS; ++ CRYPTO_THREADID_cmp; ++ TS_REQ_ext_free; ++ EVP_PKEY_asn1_set_free; ++ EVP_PKEY_get0_asn1; ++ d2i_NETSCAPE_X509; ++ EVP_PKEY_verify_recover_init; ++ EVP_PKEY_CTX_set_data; ++ EVP_PKEY_keygen_init; ++ TS_RESP_CTX_set_status_info; ++ TS_MSG_IMPRINT_get_algo; ++ TS_REQ_print_bio; ++ EVP_PKEY_CTX_ctrl_str; ++ EVP_PKEY_get_default_digest_nid; ++ PEM_write_bio_PKCS7_stream; ++ TS_MSG_IMPRINT_print_bio; ++ BN_asc2bn; ++ TS_REQ_get_policy_id; ++ ENGINE_set_default_pkey_asn1_meths; ++ ENGINE_set_def_pkey_asn1_meths; ++ d2i_TS_ACCURACY; ++ DSO_global_lookup; ++ TS_CONF_set_tsa_name; ++ i2d_ASN1_SET_ANY; ++ ENGINE_load_gost; ++ WHIRLPOOL_BitUpdate; ++ ASN1_PCTX_get_flags; ++ TS_TST_INFO_get_ext_by_NID; ++ TS_RESP_new; ++ ESS_CERT_ID_dup; ++ TS_STATUS_INFO_dup; ++ TS_REQ_delete_ext; ++ EVP_DigestVerifyFinal; ++ EVP_PKEY_print_params; ++ i2d_CMS_bio_stream; ++ TS_REQ_get_msg_imprint; ++ OBJ_find_sigid_by_algs; ++ TS_TST_INFO_get_serial; ++ TS_REQ_get_nonce; ++ X509_PUBKEY_set0_param; ++ EVP_PKEY_CTX_set0_keygen_info; ++ DIST_POINT_set_dpname; ++ i2d_ISSUING_DIST_POINT; ++ ASN1_SET_ANY_it; ++ ASN1_SET_ANY_it; ++ EVP_PKEY_CTX_get_data; ++ TS_STATUS_INFO_print_bio; ++ EVP_PKEY_derive_init; ++ d2i_TS_TST_INFO; ++ EVP_PKEY_asn1_add_alias; ++ d2i_TS_RESP_bio; ++ OTHERNAME_cmp; ++ GENERAL_NAME_set0_value; ++ PKCS7_RECIP_INFO_get0_alg; ++ TS_RESP_CTX_new; ++ TS_RESP_set_tst_info; ++ PKCS7_final; ++ EVP_PKEY_base_id; ++ TS_RESP_CTX_set_signer_cert; ++ TS_REQ_set_msg_imprint; ++ EVP_PKEY_CTX_ctrl; ++ TS_CONF_set_digests; ++ d2i_TS_MSG_IMPRINT; ++ EVP_PKEY_meth_set_ctrl; ++ TS_REQ_get_ext_by_NID; ++ PKCS5_pbe_set0_algor; ++ BN_BLINDING_thread_id; ++ TS_ACCURACY_new; ++ X509_CRL_METHOD_free; ++ ASN1_PCTX_get_nm_flags; ++ EVP_PKEY_meth_set_sign; ++ CRYPTO_THREADID_current; ++ EVP_PKEY_decrypt_init; ++ NETSCAPE_X509_free; ++ i2b_PVK_bio; ++ EVP_PKEY_print_private; ++ GENERAL_NAME_get0_value; ++ b2i_PVK_bio; ++ ASN1_UTCTIME_adj; ++ TS_TST_INFO_new; ++ EVP_MD_do_all_sorted; ++ TS_CONF_set_default_engine; ++ TS_ACCURACY_set_seconds; ++ TS_TST_INFO_get_time; ++ PKCS8_pkey_get0; ++ EVP_PKEY_asn1_get0; ++ OBJ_add_sigid; ++ PKCS7_SIGNER_INFO_sign; ++ EVP_PKEY_paramgen_init; ++ EVP_PKEY_sign; ++ OBJ_sigid_free; ++ EVP_PKEY_meth_set_init; ++ d2i_ESS_ISSUER_SERIAL; ++ ISSUING_DIST_POINT_new; ++ ASN1_TIME_adj; ++ TS_OBJ_print_bio; ++ EVP_PKEY_meth_set_verify_recover; ++ EVP_PKEY_meth_set_vrfy_recover; ++ TS_RESP_get_status_info; ++ CMS_stream; ++ EVP_PKEY_CTX_set_cb; ++ PKCS7_to_TS_TST_INFO; ++ ASN1_PCTX_get_oid_flags; ++ TS_TST_INFO_add_ext; ++ EVP_PKEY_meth_set_derive; ++ i2d_TS_RESP_fp; ++ i2d_TS_MSG_IMPRINT_bio; ++ TS_RESP_CTX_set_accuracy; ++ TS_REQ_set_nonce; ++ ESS_CERT_ID_new; ++ ENGINE_pkey_asn1_find_str; ++ TS_REQ_get_ext_count; ++ BUF_reverse; ++ TS_TST_INFO_print_bio; ++ d2i_ISSUING_DIST_POINT; ++ ENGINE_get_pkey_meths; ++ i2b_PrivateKey_bio; ++ i2d_TS_RESP; ++ b2i_PublicKey; ++ TS_VERIFY_CTX_cleanup; ++ TS_STATUS_INFO_free; ++ TS_RESP_verify_token; ++ OBJ_bsearch_ex_; ++ ASN1_bn_print; ++ EVP_PKEY_asn1_get_count; ++ ENGINE_register_pkey_asn1_meths; ++ ASN1_PCTX_set_nm_flags; ++ EVP_DigestVerifyInit; ++ ENGINE_set_default_pkey_meths; ++ TS_TST_INFO_get_policy_id; ++ TS_REQ_get_cert_req; ++ X509_CRL_set_meth_data; ++ PKCS8_pkey_set0; ++ ASN1_STRING_copy; ++ d2i_TS_TST_INFO_fp; ++ X509_CRL_match; ++ EVP_PKEY_asn1_set_private; ++ TS_TST_INFO_get_ext_d2i; ++ TS_RESP_CTX_add_policy; ++ d2i_TS_RESP; ++ TS_CONF_load_certs; ++ TS_TST_INFO_get_msg_imprint; ++ ERR_load_TS_strings; ++ TS_TST_INFO_get_version; ++ EVP_PKEY_CTX_dup; ++ EVP_PKEY_meth_set_verify; ++ i2b_PublicKey_bio; ++ TS_CONF_set_certs; ++ EVP_PKEY_asn1_get0_info; ++ TS_VERIFY_CTX_free; ++ TS_REQ_get_ext_by_critical; ++ TS_RESP_CTX_set_serial_cb; ++ X509_CRL_get_meth_data; ++ TS_RESP_CTX_set_time_cb; ++ TS_MSG_IMPRINT_get_msg; ++ TS_TST_INFO_ext_free; ++ TS_REQ_get_version; ++ TS_REQ_add_ext; ++ EVP_PKEY_CTX_set_app_data; ++ OBJ_bsearch_; ++ EVP_PKEY_meth_set_verifyctx; ++ i2d_PKCS7_bio_stream; ++ CRYPTO_THREADID_set_numeric; ++ PKCS7_sign_add_signer; ++ d2i_TS_TST_INFO_bio; ++ TS_TST_INFO_get_ordering; ++ TS_RESP_print_bio; ++ TS_TST_INFO_get_exts; ++ HMAC_CTX_copy; ++ PKCS5_pbe2_set_iv; ++ ENGINE_get_pkey_asn1_meths; ++ b2i_PrivateKey; ++ EVP_PKEY_CTX_get_app_data; ++ TS_REQ_set_cert_req; ++ CRYPTO_THREADID_set_callback; ++ TS_CONF_set_serial; ++ TS_TST_INFO_free; ++ d2i_TS_REQ_fp; ++ TS_RESP_verify_response; ++ i2d_ESS_ISSUER_SERIAL; ++ TS_ACCURACY_get_seconds; ++ EVP_CIPHER_do_all; ++ b2i_PrivateKey_bio; ++ OCSP_CERTID_dup; ++ X509_PUBKEY_get0_param; ++ TS_MSG_IMPRINT_dup; ++ PKCS7_print_ctx; ++ i2d_TS_REQ_bio; ++ EVP_whirlpool; ++ EVP_PKEY_asn1_set_param; ++ EVP_PKEY_meth_set_encrypt; ++ ASN1_PCTX_set_flags; ++ i2d_ESS_CERT_ID; ++ TS_VERIFY_CTX_new; ++ TS_RESP_CTX_set_extension_cb; ++ ENGINE_register_all_pkey_meths; ++ TS_RESP_CTX_set_status_info_cond; ++ TS_RESP_CTX_set_stat_info_cond; ++ EVP_PKEY_verify; ++ WHIRLPOOL_Final; ++ X509_CRL_METHOD_new; ++ EVP_DigestSignFinal; ++ TS_RESP_CTX_set_def_policy; ++ NETSCAPE_X509_it; ++ NETSCAPE_X509_it; ++ TS_RESP_create_response; ++ PKCS7_SIGNER_INFO_get0_algs; ++ TS_TST_INFO_get_nonce; ++ EVP_PKEY_decrypt_old; ++ TS_TST_INFO_set_policy_id; ++ TS_CONF_set_ess_cert_id_chain; ++ EVP_PKEY_CTX_get0_pkey; ++ d2i_TS_REQ; ++ EVP_PKEY_asn1_find_str; ++ BIO_f_asn1; ++ ESS_SIGNING_CERT_new; ++ EVP_PBE_find; ++ X509_CRL_get0_by_cert; ++ EVP_PKEY_derive; ++ i2d_TS_REQ; ++ TS_TST_INFO_delete_ext; ++ ESS_ISSUER_SERIAL_free; ++ ASN1_PCTX_set_str_flags; ++ ENGINE_get_pkey_asn1_meth_str; ++ TS_CONF_set_signer_key; ++ TS_ACCURACY_get_millis; ++ TS_RESP_get_token; ++ TS_ACCURACY_dup; ++ ENGINE_register_all_pkey_asn1_meths; ++ ENGINE_reg_all_pkey_asn1_meths; ++ X509_CRL_set_default_method; ++ CRYPTO_THREADID_hash; ++ CMS_ContentInfo_print_ctx; ++ TS_RESP_free; ++ ISSUING_DIST_POINT_free; ++ ESS_ISSUER_SERIAL_new; ++ CMS_add1_crl; ++ PKCS7_add1_attrib_digest; ++ TS_RESP_CTX_add_md; ++ TS_TST_INFO_dup; ++ ENGINE_set_pkey_asn1_meths; ++ PEM_write_bio_Parameters; ++ TS_TST_INFO_get_accuracy; ++ X509_CRL_get0_by_serial; ++ TS_TST_INFO_set_version; ++ TS_RESP_CTX_get_tst_info; ++ TS_RESP_verify_signature; ++ CRYPTO_THREADID_get_callback; ++ TS_TST_INFO_get_tsa; ++ TS_STATUS_INFO_new; ++ EVP_PKEY_CTX_get_cb; ++ TS_REQ_get_ext_d2i; ++ GENERAL_NAME_set0_othername; ++ TS_TST_INFO_get_ext_count; ++ TS_RESP_CTX_get_request; ++ i2d_NETSCAPE_X509; ++ ENGINE_get_pkey_meth_engine; ++ EVP_PKEY_meth_set_signctx; ++ EVP_PKEY_asn1_copy; ++ ASN1_TYPE_cmp; ++ EVP_CIPHER_do_all_sorted; ++ EVP_PKEY_CTX_free; ++ ISSUING_DIST_POINT_it; ++ ISSUING_DIST_POINT_it; ++ d2i_TS_MSG_IMPRINT_fp; ++ X509_STORE_get1_certs; ++ EVP_PKEY_CTX_get_operation; ++ d2i_ESS_SIGNING_CERT; ++ TS_CONF_set_ordering; ++ EVP_PBE_alg_add_type; ++ TS_REQ_set_version; ++ EVP_PKEY_get0; ++ BIO_asn1_set_suffix; ++ i2d_TS_STATUS_INFO; ++ EVP_MD_do_all; ++ TS_TST_INFO_set_accuracy; ++ PKCS7_add_attrib_content_type; ++ ERR_remove_thread_state; ++ EVP_PKEY_meth_add0; ++ TS_TST_INFO_set_tsa; ++ EVP_PKEY_meth_new; ++ WHIRLPOOL_Update; ++ TS_CONF_set_accuracy; ++ ASN1_PCTX_set_oid_flags; ++ ESS_SIGNING_CERT_dup; ++ d2i_TS_REQ_bio; ++ X509_time_adj_ex; ++ TS_RESP_CTX_add_flags; ++ d2i_TS_STATUS_INFO; ++ TS_MSG_IMPRINT_set_msg; ++ BIO_asn1_get_suffix; ++ TS_REQ_free; ++ EVP_PKEY_meth_free; ++ TS_REQ_get_exts; ++ TS_RESP_CTX_set_clock_precision_digits; ++ TS_RESP_CTX_set_clk_prec_digits; ++ TS_RESP_CTX_add_failure_info; ++ i2d_TS_RESP_bio; ++ EVP_PKEY_CTX_get0_peerkey; ++ PEM_write_bio_CMS_stream; ++ TS_REQ_new; ++ TS_MSG_IMPRINT_new; ++ EVP_PKEY_meth_find; ++ EVP_PKEY_id; ++ TS_TST_INFO_set_serial; ++ a2i_GENERAL_NAME; ++ TS_CONF_set_crypto_device; ++ EVP_PKEY_verify_init; ++ TS_CONF_set_policies; ++ ASN1_PCTX_new; ++ ESS_CERT_ID_free; ++ ENGINE_unregister_pkey_meths; ++ TS_MSG_IMPRINT_free; ++ TS_VERIFY_CTX_init; ++ PKCS7_stream; ++ TS_RESP_CTX_set_certs; ++ TS_CONF_set_def_policy; ++ ASN1_GENERALIZEDTIME_adj; ++ NETSCAPE_X509_new; ++ TS_ACCURACY_free; ++ TS_RESP_get_tst_info; ++ EVP_PKEY_derive_set_peer; ++ PEM_read_bio_Parameters; ++ TS_CONF_set_clock_precision_digits; ++ TS_CONF_set_clk_prec_digits; ++ ESS_ISSUER_SERIAL_dup; ++ TS_ACCURACY_get_micros; ++ ASN1_PCTX_get_str_flags; ++ NAME_CONSTRAINTS_check; ++ ASN1_BIT_STRING_check; ++ X509_check_akid; ++ ENGINE_unregister_pkey_asn1_meths; ++ ENGINE_unreg_pkey_asn1_meths; ++ ASN1_PCTX_free; ++ PEM_write_bio_ASN1_stream; ++ i2d_ASN1_bio_stream; ++ TS_X509_ALGOR_print_bio; ++ EVP_PKEY_meth_set_cleanup; ++ EVP_PKEY_asn1_free; ++ ESS_SIGNING_CERT_free; ++ TS_TST_INFO_set_msg_imprint; ++ GENERAL_NAME_cmp; ++ d2i_ASN1_SET_ANY; ++ ENGINE_set_pkey_meths; ++ i2d_TS_REQ_fp; ++ d2i_ASN1_SEQUENCE_ANY; ++ GENERAL_NAME_get0_otherName; ++ d2i_ESS_CERT_ID; ++ OBJ_find_sigid_algs; ++ EVP_PKEY_meth_set_keygen; ++ PKCS5_PBKDF2_HMAC; ++ EVP_PKEY_paramgen; ++ EVP_PKEY_meth_set_paramgen; ++ BIO_new_PKCS7; ++ EVP_PKEY_verify_recover; ++ TS_ext_print_bio; ++ TS_ASN1_INTEGER_print_bio; ++ check_defer; ++ DSO_pathbyaddr; ++ EVP_PKEY_set_type; ++ TS_ACCURACY_set_micros; ++ TS_REQ_to_TS_VERIFY_CTX; ++ EVP_PKEY_meth_set_copy; ++ ASN1_PCTX_set_cert_flags; ++ TS_TST_INFO_get_ext; ++ EVP_PKEY_asn1_set_ctrl; ++ TS_TST_INFO_get_ext_by_critical; ++ EVP_PKEY_CTX_new_id; ++ TS_REQ_get_ext_by_OBJ; ++ TS_CONF_set_signer_cert; ++ X509_NAME_hash_old; ++ ASN1_TIME_set_string; ++ EVP_MD_flags; ++ TS_RESP_CTX_free; ++ DSAparams_dup; ++ DHparams_dup; ++ OCSP_REQ_CTX_add1_header; ++ OCSP_REQ_CTX_set1_req; ++ X509_STORE_set_verify_cb; ++ X509_STORE_CTX_get0_current_crl; ++ X509_STORE_CTX_get0_parent_ctx; ++ X509_STORE_CTX_get0_current_issuer; ++ X509_STORE_CTX_get0_cur_issuer; ++ X509_issuer_name_hash_old; ++ X509_subject_name_hash_old; ++ EVP_CIPHER_CTX_copy; ++ UI_method_get_prompt_constructor; ++ UI_method_get_prompt_constructr; ++ UI_method_set_prompt_constructor; ++ UI_method_set_prompt_constructr; ++ EVP_read_pw_string_min; ++ CRYPTO_cts128_encrypt; ++ CRYPTO_cts128_decrypt_block; ++ CRYPTO_cfb128_1_encrypt; ++ CRYPTO_cbc128_encrypt; ++ CRYPTO_ctr128_encrypt; ++ CRYPTO_ofb128_encrypt; ++ CRYPTO_cts128_decrypt; ++ CRYPTO_cts128_encrypt_block; ++ CRYPTO_cbc128_decrypt; ++ CRYPTO_cfb128_encrypt; ++ CRYPTO_cfb128_8_encrypt; ++ ++ local: ++ *; ++}; ++ ++ ++OPENSSL_1.0.1 { ++ global: ++ SSL_renegotiate_abbreviated; ++ TLSv1_1_method; ++ TLSv1_1_client_method; ++ TLSv1_1_server_method; ++ SSL_CTX_set_srp_client_pwd_callback; ++ SSL_CTX_set_srp_client_pwd_cb; ++ SSL_get_srp_g; ++ SSL_CTX_set_srp_username_callback; ++ SSL_CTX_set_srp_un_cb; ++ SSL_get_srp_userinfo; ++ SSL_set_srp_server_param; ++ SSL_set_srp_server_param_pw; ++ SSL_get_srp_N; ++ SSL_get_srp_username; ++ SSL_CTX_set_srp_password; ++ SSL_CTX_set_srp_strength; ++ SSL_CTX_set_srp_verify_param_callback; ++ SSL_CTX_set_srp_vfy_param_cb; ++ SSL_CTX_set_srp_cb_arg; ++ SSL_CTX_set_srp_username; ++ SSL_CTX_SRP_CTX_init; ++ SSL_SRP_CTX_init; ++ SRP_Calc_A_param; ++ SRP_generate_server_master_secret; ++ SRP_gen_server_master_secret; ++ SSL_CTX_SRP_CTX_free; ++ SRP_generate_client_master_secret; ++ SRP_gen_client_master_secret; ++ SSL_srp_server_param_with_username; ++ SSL_srp_server_param_with_un; ++ SSL_SRP_CTX_free; ++ SSL_set_debug; ++ SSL_SESSION_get0_peer; ++ TLSv1_2_client_method; ++ SSL_SESSION_set1_id_context; ++ TLSv1_2_server_method; ++ SSL_cache_hit; ++ SSL_get0_kssl_ctx; ++ SSL_set0_kssl_ctx; ++ SSL_set_state; ++ SSL_CIPHER_get_id; ++ TLSv1_2_method; ++ kssl_ctx_get0_client_princ; ++ SSL_export_keying_material; ++ SSL_set_tlsext_use_srtp; ++ SSL_CTX_set_next_protos_advertised_cb; ++ SSL_CTX_set_next_protos_adv_cb; ++ SSL_get0_next_proto_negotiated; ++ SSL_get_selected_srtp_profile; ++ SSL_CTX_set_tlsext_use_srtp; ++ SSL_select_next_proto; ++ SSL_get_srtp_profiles; ++ SSL_CTX_set_next_proto_select_cb; ++ SSL_CTX_set_next_proto_sel_cb; ++ SSL_SESSION_get_compress_id; ++ ++ SRP_VBASE_get_by_user; ++ SRP_Calc_server_key; ++ SRP_create_verifier; ++ SRP_create_verifier_BN; ++ SRP_Calc_u; ++ SRP_VBASE_free; ++ SRP_Calc_client_key; ++ SRP_get_default_gN; ++ SRP_Calc_x; ++ SRP_Calc_B; ++ SRP_VBASE_new; ++ SRP_check_known_gN_param; ++ SRP_Calc_A; ++ SRP_Verify_A_mod_N; ++ SRP_VBASE_init; ++ SRP_Verify_B_mod_N; ++ EC_KEY_set_public_key_affine_coordinates; ++ EC_KEY_set_pub_key_aff_coords; ++ EVP_aes_192_ctr; ++ EVP_PKEY_meth_get0_info; ++ EVP_PKEY_meth_copy; ++ ERR_add_error_vdata; ++ EVP_aes_128_ctr; ++ EVP_aes_256_ctr; ++ EC_GFp_nistp224_method; ++ EC_KEY_get_flags; ++ RSA_padding_add_PKCS1_PSS_mgf1; ++ EVP_aes_128_xts; ++ EVP_aes_256_xts; ++ EVP_aes_128_gcm; ++ EC_KEY_clear_flags; ++ EC_KEY_set_flags; ++ EVP_aes_256_ccm; ++ RSA_verify_PKCS1_PSS_mgf1; ++ EVP_aes_128_ccm; ++ EVP_aes_192_gcm; ++ X509_ALGOR_set_md; ++ RAND_init_fips; ++ EVP_aes_256_gcm; ++ EVP_aes_192_ccm; ++ CMAC_CTX_copy; ++ CMAC_CTX_free; ++ CMAC_CTX_get0_cipher_ctx; ++ CMAC_CTX_cleanup; ++ CMAC_Init; ++ CMAC_Update; ++ CMAC_resume; ++ CMAC_CTX_new; ++ CMAC_Final; ++ CRYPTO_ctr128_encrypt_ctr32; ++ CRYPTO_gcm128_release; ++ CRYPTO_ccm128_decrypt_ccm64; ++ CRYPTO_ccm128_encrypt; ++ CRYPTO_gcm128_encrypt; ++ CRYPTO_xts128_encrypt; ++ EVP_rc4_hmac_md5; ++ CRYPTO_nistcts128_decrypt_block; ++ CRYPTO_gcm128_setiv; ++ CRYPTO_nistcts128_encrypt; ++ EVP_aes_128_cbc_hmac_sha1; ++ CRYPTO_gcm128_tag; ++ CRYPTO_ccm128_encrypt_ccm64; ++ ENGINE_load_rdrand; ++ CRYPTO_ccm128_setiv; ++ CRYPTO_nistcts128_encrypt_block; ++ CRYPTO_gcm128_aad; ++ CRYPTO_ccm128_init; ++ CRYPTO_nistcts128_decrypt; ++ CRYPTO_gcm128_new; ++ CRYPTO_ccm128_tag; ++ CRYPTO_ccm128_decrypt; ++ CRYPTO_ccm128_aad; ++ CRYPTO_gcm128_init; ++ CRYPTO_gcm128_decrypt; ++ ENGINE_load_rsax; ++ CRYPTO_gcm128_decrypt_ctr32; ++ CRYPTO_gcm128_encrypt_ctr32; ++ CRYPTO_gcm128_finish; ++ EVP_aes_256_cbc_hmac_sha1; ++ PKCS5_pbkdf2_set; ++ CMS_add0_recipient_password; ++ CMS_decrypt_set1_password; ++ CMS_RecipientInfo_set0_password; ++ RAND_set_fips_drbg_type; ++ X509_REQ_sign_ctx; ++ RSA_PSS_PARAMS_new; ++ X509_CRL_sign_ctx; ++ X509_signature_dump; ++ d2i_RSA_PSS_PARAMS; ++ RSA_PSS_PARAMS_it; ++ RSA_PSS_PARAMS_it; ++ RSA_PSS_PARAMS_free; ++ X509_sign_ctx; ++ i2d_RSA_PSS_PARAMS; ++ ASN1_item_sign_ctx; ++ EC_GFp_nistp521_method; ++ EC_GFp_nistp256_method; ++ OPENSSL_stderr; ++ OPENSSL_cpuid_setup; ++ OPENSSL_showfatal; ++ BIO_new_dgram_sctp; ++ BIO_dgram_sctp_msg_waiting; ++ BIO_dgram_sctp_wait_for_dry; ++ BIO_s_datagram_sctp; ++ BIO_dgram_is_sctp; ++ BIO_dgram_sctp_notification_cb; ++} OPENSSL_1.0.0; ++ ++OPENSSL_1.0.1d { ++ global: ++ CRYPTO_memcmp; ++} OPENSSL_1.0.1; ++ +Index: openssl-1.0.1d/engines/openssl.ld +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ openssl-1.0.1d/engines/openssl.ld 2013-02-06 19:41:43.000000000 +0100 +@@ -0,0 +1,10 @@ ++OPENSSL_1.0.0 { ++ global: ++ bind_engine; ++ v_check; ++ OPENSSL_init; ++ OPENSSL_finish; ++ local: ++ *; ++}; ++ +Index: openssl-1.0.1d/engines/ccgost/openssl.ld +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ openssl-1.0.1d/engines/ccgost/openssl.ld 2013-02-06 19:41:43.000000000 +0100 +@@ -0,0 +1,10 @@ ++OPENSSL_1.0.0 { ++ global: ++ bind_engine; ++ v_check; ++ OPENSSL_init; ++ OPENSSL_finish; ++ local: ++ *; ++}; ++ diff --git a/meta-fsl-ppc/recipes-connectivity/openssl/openssl/engines-install-in-libdir-ssl.patch b/meta-fsl-ppc/recipes-connectivity/openssl/openssl/engines-install-in-libdir-ssl.patch new file mode 100644 index 00000000..d8a6f1a2 --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/openssl/openssl/engines-install-in-libdir-ssl.patch @@ -0,0 +1,56 @@ +Upstream-Status: Inappropriate [configuration] + + +Index: openssl-1.0.0/engines/Makefile +=================================================================== +--- openssl-1.0.0.orig/engines/Makefile ++++ openssl-1.0.0/engines/Makefile +@@ -107,7 +107,7 @@ + @[ -n "$(INSTALLTOP)" ] # should be set by top Makefile... + @if [ -n "$(SHARED_LIBS)" ]; then \ + set -e; \ +- $(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines; \ ++ $(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/ssl/engines; \ + for l in $(LIBNAMES); do \ + ( echo installing $$l; \ + pfx=lib; \ +@@ -119,13 +119,13 @@ + *DSO_WIN32*) sfx="eay32.dll"; pfx=;; \ + *) sfx=".bad";; \ + esac; \ +- cp $$pfx$$l$$sfx $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx.new; \ ++ cp $$pfx$$l$$sfx $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/ssl/engines/$$pfx$$l$$sfx.new; \ + else \ + sfx=".so"; \ +- cp cyg$$l.dll $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx.new; \ ++ cp cyg$$l.dll $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/ssl/engines/$$pfx$$l$$sfx.new; \ + fi; \ +- chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx.new; \ +- mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx ); \ ++ chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/ssl/engines/$$pfx$$l$$sfx.new; \ ++ mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/ssl/engines/$$pfx$$l$$sfx.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/ssl/engines/$$pfx$$l$$sfx ); \ + done; \ + fi + @target=install; $(RECURSIVE_MAKE) +Index: openssl-1.0.0/engines/ccgost/Makefile +=================================================================== +--- openssl-1.0.0.orig/engines/ccgost/Makefile ++++ openssl-1.0.0/engines/ccgost/Makefile +@@ -53,13 +53,13 @@ + *DSO_WIN32*) sfx="eay32.dll"; pfx=;; \ + *) sfx=".bad";; \ + esac; \ +- cp $${pfx}$(LIBNAME)$$sfx $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$${pfx}$(LIBNAME)$$sfx.new; \ ++ cp $${pfx}$(LIBNAME)$$sfx $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/ssl/engines/$${pfx}$(LIBNAME)$$sfx.new; \ + else \ + sfx=".so"; \ +- cp cyg$(LIBNAME).dll $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$${pfx}$(LIBNAME)$$sfx.new; \ ++ cp cyg$(LIBNAME).dll $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/ssl/engines/$${pfx}$(LIBNAME)$$sfx.new; \ + fi; \ +- chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$${pfx}$(LIBNAME)$$sfx.new; \ +- mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$${pfx}$(LIBNAME)$$sfx.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$${pfx}$(LIBNAME)$$sfx; \ ++ chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/ssl/engines/$${pfx}$(LIBNAME)$$sfx.new; \ ++ mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/ssl/engines/$${pfx}$(LIBNAME)$$sfx.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/ssl/engines/$${pfx}$(LIBNAME)$$sfx; \ + fi + + links: diff --git a/meta-fsl-ppc/recipes-connectivity/openssl/openssl/find.pl b/meta-fsl-ppc/recipes-connectivity/openssl/openssl/find.pl new file mode 100644 index 00000000..8e1b42c8 --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/openssl/openssl/find.pl @@ -0,0 +1,54 @@ +warn "Legacy library @{[(caller(0))[6]]} will be removed from the Perl core distribution in the next major release. Please install it from the CPAN distribution Perl4::CoreLibs. It is being used at @{[(caller)[1]]}, line @{[(caller)[2]]}.\n"; + +# This library is deprecated and unmaintained. It is included for +# compatibility with Perl 4 scripts which may use it, but it will be +# removed in a future version of Perl. Please use the File::Find module +# instead. + +# Usage: +# require "find.pl"; +# +# &find('/foo','/bar'); +# +# sub wanted { ... } +# where wanted does whatever you want. $dir contains the +# current directory name, and $_ the current filename within +# that directory. $name contains "$dir/$_". You are cd'ed +# to $dir when the function is called. The function may +# set $prune to prune the tree. +# +# For example, +# +# find / -name .nfs\* -mtime +7 -exec rm -f {} \; -o -fstype nfs -prune +# +# corresponds to this +# +# sub wanted { +# /^\.nfs.*$/ && +# (($dev,$ino,$mode,$nlink,$uid,$gid) = lstat($_)) && +# int(-M _) > 7 && +# unlink($_) +# || +# ($nlink || (($dev,$ino,$mode,$nlink,$uid,$gid) = lstat($_))) && +# $dev < 0 && +# ($prune = 1); +# } +# +# Set the variable $dont_use_nlink if you're using AFS, since AFS cheats. + +use File::Find (); + +*name = *File::Find::name; +*prune = *File::Find::prune; +*dir = *File::Find::dir; +*topdir = *File::Find::topdir; +*topdev = *File::Find::topdev; +*topino = *File::Find::topino; +*topmode = *File::Find::topmode; +*topnlink = *File::Find::topnlink; + +sub find { + &File::Find::find(\&wanted, @_); +} + +1; diff --git a/meta-fsl-ppc/recipes-connectivity/openssl/openssl/fix-cipher-des-ede3-cfb1.patch b/meta-fsl-ppc/recipes-connectivity/openssl/openssl/fix-cipher-des-ede3-cfb1.patch new file mode 100644 index 00000000..f0e17784 --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/openssl/openssl/fix-cipher-des-ede3-cfb1.patch @@ -0,0 +1,22 @@ +Upstream-Status: Submitted + +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 + +diff --git a/crypto/evp/e_des3.c b/crypto/evp/e_des3.c +index 3232cfe..df84922 100644 +=================================================================== +--- a/crypto/evp/e_des3.c ++++ b/crypto/evp/e_des3.c +@@ -173,7 +173,7 @@ static int des_ede3_cfb1_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, + size_t n; + unsigned char c[1],d[1]; + +- for(n=0 ; n < inl ; ++n) ++ for(n=0 ; n < inl*8 ; ++n) + { + c[0]=(in[n/8]&(1 << (7-n%8))) ? 0x80 : 0; + DES_ede3_cfb_encrypt(c,d,1,1, diff --git a/meta-fsl-ppc/recipes-connectivity/openssl/openssl/initial-aarch64-bits.patch b/meta-fsl-ppc/recipes-connectivity/openssl/openssl/initial-aarch64-bits.patch new file mode 100644 index 00000000..2185ff8a --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/openssl/openssl/initial-aarch64-bits.patch @@ -0,0 +1,119 @@ +From: Andy Polyakov +Date: Sun, 13 Oct 2013 17:15:15 +0000 (+0200) +Subject: Initial aarch64 bits. +X-Git-Url: http://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff_plain;h=039081b80977e2a5de84e1f88f8b4d025b559956 + +Initial aarch64 bits. +--- + crypto/bn/bn_lcl.h | 9 +++++++++ + crypto/md32_common.h | 18 ++++++++++++++++++ + crypto/modes/modes_lcl.h | 8 ++++++++ + crypto/sha/sha512.c | 13 +++++++++++++ + 4 files changed, 48 insertions(+) + +Index: openssl-1.0.1f/crypto/bn/bn_lcl.h +=================================================================== +--- openssl-1.0.1f.orig/crypto/bn/bn_lcl.h 2014-01-06 15:47:42.000000000 +0200 ++++ openssl-1.0.1f/crypto/bn/bn_lcl.h 2014-02-28 10:37:55.495979037 +0200 +@@ -300,6 +300,15 @@ + : "r"(a), "r"(b)); + # endif + # endif ++# elif defined(__aarch64__) && defined(SIXTY_FOUR_BIT_LONG) ++# if defined(__GNUC__) && __GNUC__>=2 ++# define BN_UMULT_HIGH(a,b) ({ \ ++ register BN_ULONG ret; \ ++ asm ("umulh %0,%1,%2" \ ++ : "=r"(ret) \ ++ : "r"(a), "r"(b)); \ ++ ret; }) ++# endif + # endif /* cpu */ + #endif /* OPENSSL_NO_ASM */ + +Index: openssl-1.0.1f/crypto/md32_common.h +=================================================================== +--- openssl-1.0.1f.orig/crypto/md32_common.h 2014-01-06 15:47:42.000000000 +0200 ++++ openssl-1.0.1f/crypto/md32_common.h 2014-02-28 10:39:21.751979107 +0200 +@@ -213,6 +213,24 @@ + asm ("bswapl %0":"=r"(r):"0"(r)); \ + *((unsigned int *)(c))=r; (c)+=4; r; }) + # endif ++# elif defined(__aarch64__) ++# if defined(__BYTE_ORDER__) ++# if defined(__ORDER_LITTLE_ENDIAN__) && __BYTE_ORDER__==__ORDER_LITTLE_ENDIAN__ ++# define HOST_c2l(c,l) ({ unsigned int r; \ ++ asm ("rev %w0,%w1" \ ++ :"=r"(r) \ ++ :"r"(*((const unsigned int *)(c))));\ ++ (c)+=4; (l)=r; }) ++# define HOST_l2c(l,c) ({ unsigned int r; \ ++ asm ("rev %w0,%w1" \ ++ :"=r"(r) \ ++ :"r"((unsigned int)(l)));\ ++ *((unsigned int *)(c))=r; (c)+=4; r; }) ++# elif defined(__ORDER_BIG_ENDIAN__) && __BYTE_ORDER__==__ORDER_BIG_ENDIAN__ ++# define HOST_c2l(c,l) ((l)=*((const unsigned int *)(c)), (c)+=4, (l)) ++# define HOST_l2c(l,c) (*((unsigned int *)(c))=(l), (c)+=4, (l)) ++# endif ++# endif + # endif + # endif + #endif +Index: openssl-1.0.1f/crypto/modes/modes_lcl.h +=================================================================== +--- openssl-1.0.1f.orig/crypto/modes/modes_lcl.h 2014-02-28 10:47:48.731979011 +0200 ++++ openssl-1.0.1f/crypto/modes/modes_lcl.h 2014-02-28 10:48:49.707978919 +0200 +@@ -29,6 +29,7 @@ + #if defined(__i386) || defined(__i386__) || \ + defined(__x86_64) || defined(__x86_64__) || \ + defined(_M_IX86) || defined(_M_AMD64) || defined(_M_X64) || \ ++ defined(__aarch64__) || \ + defined(__s390__) || defined(__s390x__) + # undef STRICT_ALIGNMENT + #endif +@@ -50,6 +51,13 @@ + # define BSWAP4(x) ({ u32 ret=(x); \ + asm ("bswapl %0" \ + : "+r"(ret)); ret; }) ++# elif defined(__aarch64__) ++# define BSWAP8(x) ({ u64 ret; \ ++ asm ("rev %0,%1" \ ++ : "=r"(ret) : "r"(x)); ret; }) ++# define BSWAP4(x) ({ u32 ret; \ ++ asm ("rev %w0,%w1" \ ++ : "=r"(ret) : "r"(x)); ret; }) + # elif (defined(__arm__) || defined(__arm)) && !defined(STRICT_ALIGNMENT) + # define BSWAP8(x) ({ u32 lo=(u64)(x)>>32,hi=(x); \ + asm ("rev %0,%0; rev %1,%1" \ +Index: openssl-1.0.1f/crypto/sha/sha512.c +=================================================================== +--- openssl-1.0.1f.orig/crypto/sha/sha512.c 2014-01-06 15:47:42.000000000 +0200 ++++ openssl-1.0.1f/crypto/sha/sha512.c 2014-02-28 10:52:14.579978981 +0200 +@@ -55,6 +55,7 @@ + #if defined(__i386) || defined(__i386__) || defined(_M_IX86) || \ + defined(__x86_64) || defined(_M_AMD64) || defined(_M_X64) || \ + defined(__s390__) || defined(__s390x__) || \ ++ defined(__aarch64__) || \ + defined(SHA512_ASM) + #define SHA512_BLOCK_CAN_MANAGE_UNALIGNED_DATA + #endif +@@ -347,6 +348,18 @@ + asm ("rotrdi %0,%1,%2" \ + : "=r"(ret) \ + : "r"(a),"K"(n)); ret; }) ++# elif defined(__aarch64__) ++# define ROTR(a,n) ({ SHA_LONG64 ret; \ ++ asm ("ror %0,%1,%2" \ ++ : "=r"(ret) \ ++ : "r"(a),"I"(n)); ret; }) ++# if defined(__BYTE_ORDER__) && defined(__ORDER_LITTLE_ENDIAN__) && \ ++ __BYTE_ORDER__==__ORDER_LITTLE_ENDIAN__ ++# define PULL64(x) ({ SHA_LONG64 ret; \ ++ asm ("rev %0,%1" \ ++ : "=r"(ret) \ ++ : "r"(*((const SHA_LONG64 *)(&(x))))); ret; }) ++# endif + # endif + # elif defined(_MSC_VER) + # if defined(_WIN64) /* applies to both IA-64 and AMD64 */ diff --git a/meta-fsl-ppc/recipes-connectivity/openssl/openssl/oe-ldflags.patch b/meta-fsl-ppc/recipes-connectivity/openssl/openssl/oe-ldflags.patch new file mode 100644 index 00000000..292e13dc --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/openssl/openssl/oe-ldflags.patch @@ -0,0 +1,24 @@ +Upstream-Status: Inappropriate [open-embedded] + +Index: openssl-1.0.0/Makefile.shared +=================================================================== +--- openssl-1.0.0.orig/Makefile.shared ++++ openssl-1.0.0/Makefile.shared +@@ -92,7 +92,7 @@ + LINK_APP= \ + ( $(SET_X); \ + LIBDEPS="$${LIBDEPS:-$(LIBDEPS)}"; \ +- LDCMD="$${LDCMD:-$(CC)}"; LDFLAGS="$${LDFLAGS:-$(CFLAGS)}"; \ ++ LDCMD="$${LDCMD:-$(CC)}"; LDFLAGS="$(OE_LDFLAGS) $${LDFLAGS:-$(CFLAGS)}"; \ + LIBPATH=`for x in $$LIBDEPS; do echo $$x; done | sed -e 's/^ *-L//;t' -e d | uniq`; \ + LIBPATH=`echo $$LIBPATH | sed -e 's/ /:/g'`; \ + LD_LIBRARY_PATH=$$LIBPATH:$$LD_LIBRARY_PATH \ +@@ -102,7 +102,7 @@ + ( $(SET_X); \ + LIBDEPS="$${LIBDEPS:-$(LIBDEPS)}"; \ + SHAREDCMD="$${SHAREDCMD:-$(CC)}"; \ +- SHAREDFLAGS="$${SHAREDFLAGS:-$(CFLAGS) $(SHARED_LDFLAGS)}"; \ ++ SHAREDFLAGS="$(OE_LDFLAGS) $${SHAREDFLAGS:-$(CFLAGS) $(SHARED_LDFLAGS)}"; \ + LIBPATH=`for x in $$LIBDEPS; do echo $$x; done | sed -e 's/^ *-L//;t' -e d | uniq`; \ + LIBPATH=`echo $$LIBPATH | sed -e 's/ /:/g'`; \ + LD_LIBRARY_PATH=$$LIBPATH:$$LD_LIBRARY_PATH \ diff --git a/meta-fsl-ppc/recipes-connectivity/openssl/openssl/openssl-avoid-NULL-pointer-dereference-in-EVP_DigestInit_ex.patch b/meta-fsl-ppc/recipes-connectivity/openssl/openssl/openssl-avoid-NULL-pointer-dereference-in-EVP_DigestInit_ex.patch new file mode 100644 index 00000000..c161e62f --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/openssl/openssl/openssl-avoid-NULL-pointer-dereference-in-EVP_DigestInit_ex.patch @@ -0,0 +1,21 @@ +openssl: avoid NULL pointer dereference in EVP_DigestInit_ex() + +We should avoid accessing the type pointer if it's NULL, +this could happen if ctx->digest is not NULL. + +Upstream-Status: Submitted +http://www.mail-archive.com/openssl-dev@openssl.org/msg32860.html + +Signed-off-by: Xufeng Zhang +--- +--- a/crypto/evp/digest.c ++++ b/crypto/evp/digest.c +@@ -199,7 +199,7 @@ + return 0; + } + #endif +- if (ctx->digest != type) ++ if (type && (ctx->digest != type)) + { + if (ctx->digest && ctx->digest->ctx_size) + OPENSSL_free(ctx->md_data); diff --git a/meta-fsl-ppc/recipes-connectivity/openssl/openssl/openssl-avoid-NULL-pointer-dereference-in-dh_pub_encode.patch b/meta-fsl-ppc/recipes-connectivity/openssl/openssl/openssl-avoid-NULL-pointer-dereference-in-dh_pub_encode.patch new file mode 100644 index 00000000..3e93fe4e --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/openssl/openssl/openssl-avoid-NULL-pointer-dereference-in-dh_pub_encode.patch @@ -0,0 +1,39 @@ +openssl: avoid NULL pointer dereference in dh_pub_encode()/dsa_pub_encode() + +We should avoid accessing the pointer if ASN1_STRING_new() +allocates memory failed. + +Upstream-Status: Submitted +http://www.mail-archive.com/openssl-dev@openssl.org/msg32859.html + +Signed-off-by: Xufeng Zhang +--- +--- a/crypto/dh/dh_ameth.c ++++ b/crypto/dh/dh_ameth.c +@@ -139,6 +139,12 @@ + dh=pkey->pkey.dh; + + str = ASN1_STRING_new(); ++ if (!str) ++ { ++ DHerr(DH_F_DH_PUB_ENCODE, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ + str->length = i2d_DHparams(dh, &str->data); + if (str->length <= 0) + { +--- a/crypto/dsa/dsa_ameth.c ++++ b/crypto/dsa/dsa_ameth.c +@@ -148,6 +148,11 @@ + { + ASN1_STRING *str; + str = ASN1_STRING_new(); ++ if (!str) ++ { ++ DSAerr(DSA_F_DSA_PUB_ENCODE, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } + str->length = i2d_DSAparams(dsa, &str->data); + if (str->length <= 0) + { diff --git a/meta-fsl-ppc/recipes-connectivity/openssl/openssl/openssl-fix-des.pod-error.patch b/meta-fsl-ppc/recipes-connectivity/openssl/openssl/openssl-fix-des.pod-error.patch new file mode 100644 index 00000000..de49729e --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/openssl/openssl/openssl-fix-des.pod-error.patch @@ -0,0 +1,19 @@ +openssl: Fix pod2man des.pod error on Ubuntu 12.04 + +This is a formatting fix, '=back' is required before +'=head1' on Ubuntu 12.04. + +Upstream-Status: Pending +Signed-off-by: Baogen Shang +diff -urpN a_origin/des.pod b_modify/des.pod +--- a_origin/crypto/des/des.pod 2013-08-15 15:02:56.211674589 +0800 ++++ b_modify/crypto/des/des.pod 2013-08-15 15:04:14.439674580 +0800 +@@ -181,6 +181,8 @@ the uuencoded file to embed in the begin + output. If there is no name specified after the B<-u>, the name text.des + will be embedded in the header. + ++=back ++ + =head1 SEE ALSO + + ps(1), diff --git a/meta-fsl-ppc/recipes-connectivity/openssl/openssl/openssl-fix-doc.patch b/meta-fsl-ppc/recipes-connectivity/openssl/openssl/openssl-fix-doc.patch new file mode 100644 index 00000000..451256ea --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/openssl/openssl/openssl-fix-doc.patch @@ -0,0 +1,401 @@ +Fix documentation build errors with Perl 5.18 pod2man + +This fixes errors building man pages with newer versions of pod2man +included with Perl 5.18. + +Upstream-Status: Submitted +Signed-off-by: Jonathan Liu + +Index: openssl-1.0.1f/doc/apps/cms.pod +=================================================================== +--- openssl-1.0.1f.orig/doc/apps/cms.pod 2014-01-06 15:47:42.000000000 +0200 ++++ openssl-1.0.1f/doc/apps/cms.pod 2014-02-28 10:13:51.899979213 +0200 +@@ -450,28 +450,28 @@ + + =over 4 + +-=item 0 ++=item Z<>0 + + the operation was completely successfully. + +-=item 1 ++=item Z<>1 + + an error occurred parsing the command options. + +-=item 2 ++=item Z<>2 + + one of the input files could not be read. + +-=item 3 ++=item Z<>3 + + an error occurred creating the CMS file or when reading the MIME + message. + +-=item 4 ++=item Z<>4 + + an error occurred decrypting or verifying the message. + +-=item 5 ++=item Z<>5 + + the message was verified correctly but an error occurred writing out + the signers certificates. +Index: openssl-1.0.1f/doc/apps/smime.pod +=================================================================== +--- openssl-1.0.1f.orig/doc/apps/smime.pod 2014-01-06 15:47:42.000000000 +0200 ++++ openssl-1.0.1f/doc/apps/smime.pod 2014-02-28 10:16:57.795979233 +0200 +@@ -308,28 +308,28 @@ + + =over 4 + +-=item 0 ++=item Z<>0 + + the operation was completely successfully. + +-=item 1 ++=item Z<>1 + + an error occurred parsing the command options. + +-=item 2 ++=item Z<>2 + + one of the input files could not be read. + +-=item 3 ++=item Z<>3 + + an error occurred creating the PKCS#7 file or when reading the MIME + message. + +-=item 4 ++=item Z<>4 + + an error occurred decrypting or verifying the message. + +-=item 5 ++=item Z<>5 + + the message was verified correctly but an error occurred writing out + the signers certificates. +Index: openssl-1.0.1f/doc/ssl/SSL_COMP_add_compression_method.pod +=================================================================== +--- openssl-1.0.1f.orig/doc/ssl/SSL_COMP_add_compression_method.pod 2014-01-06 15:47:42.000000000 +0200 ++++ openssl-1.0.1f/doc/ssl/SSL_COMP_add_compression_method.pod 2014-02-28 10:18:09.679979225 +0200 +@@ -53,11 +53,11 @@ + + =over 4 + +-=item 0 ++=item Z<>0 + + The operation succeeded. + +-=item 1 ++=item Z<>1 + + The operation failed. Check the error queue to find out the reason. + +Index: openssl-1.0.1f/doc/ssl/SSL_CTX_add_session.pod +=================================================================== +--- openssl-1.0.1f.orig/doc/ssl/SSL_CTX_add_session.pod 2014-01-06 15:47:42.000000000 +0200 ++++ openssl-1.0.1f/doc/ssl/SSL_CTX_add_session.pod 2014-02-28 10:18:42.687979221 +0200 +@@ -52,13 +52,13 @@ + + =over 4 + +-=item 0 ++=item Z<>0 + + The operation failed. In case of the add operation, it was tried to add + the same (identical) session twice. In case of the remove operation, the + session was not found in the cache. + +-=item 1 ++=item Z<>1 + + The operation succeeded. + +Index: openssl-1.0.1f/doc/ssl/SSL_CTX_load_verify_locations.pod +=================================================================== +--- openssl-1.0.1f.orig/doc/ssl/SSL_CTX_load_verify_locations.pod 2014-01-06 15:47:42.000000000 +0200 ++++ openssl-1.0.1f/doc/ssl/SSL_CTX_load_verify_locations.pod 2014-02-28 10:19:09.079979218 +0200 +@@ -100,13 +100,13 @@ + + =over 4 + +-=item 0 ++=item Z<>0 + + The operation failed because B and B are NULL or the + processing at one of the locations specified failed. Check the error + stack to find out the reason. + +-=item 1 ++=item Z<>1 + + The operation succeeded. + +Index: openssl-1.0.1f/doc/ssl/SSL_CTX_set_client_CA_list.pod +=================================================================== +--- openssl-1.0.1f.orig/doc/ssl/SSL_CTX_set_client_CA_list.pod 2014-01-06 15:47:42.000000000 +0200 ++++ openssl-1.0.1f/doc/ssl/SSL_CTX_set_client_CA_list.pod 2014-02-28 10:19:42.999979220 +0200 +@@ -66,13 +66,13 @@ + + =over 4 + +-=item 0 ++=item Z<>0 + + A failure while manipulating the STACK_OF(X509_NAME) object occurred or + the X509_NAME could not be extracted from B. Check the error stack + to find out the reason. + +-=item 1 ++=item Z<>1 + + The operation succeeded. + +Index: openssl-1.0.1f/doc/ssl/SSL_CTX_set_session_id_context.pod +=================================================================== +--- openssl-1.0.1f.orig/doc/ssl/SSL_CTX_set_session_id_context.pod 2014-01-06 15:47:42.000000000 +0200 ++++ openssl-1.0.1f/doc/ssl/SSL_CTX_set_session_id_context.pod 2014-02-28 10:20:06.495979211 +0200 +@@ -64,13 +64,13 @@ + + =over 4 + +-=item 0 ++=item Z<>0 + + The length B of the session id context B exceeded + the maximum allowed length of B. The error + is logged to the error stack. + +-=item 1 ++=item Z<>1 + + The operation succeeded. + +Index: openssl-1.0.1f/doc/ssl/SSL_CTX_set_ssl_version.pod +=================================================================== +--- openssl-1.0.1f.orig/doc/ssl/SSL_CTX_set_ssl_version.pod 2014-01-06 15:47:42.000000000 +0200 ++++ openssl-1.0.1f/doc/ssl/SSL_CTX_set_ssl_version.pod 2014-02-28 10:20:32.111979208 +0200 +@@ -42,11 +42,11 @@ + + =over 4 + +-=item 0 ++=item Z<>0 + + The new choice failed, check the error stack to find out the reason. + +-=item 1 ++=item Z<>1 + + The operation succeeded. + +Index: openssl-1.0.1f/doc/ssl/SSL_CTX_use_psk_identity_hint.pod +=================================================================== +--- openssl-1.0.1f.orig/doc/ssl/SSL_CTX_use_psk_identity_hint.pod 2014-01-06 15:47:42.000000000 +0200 ++++ openssl-1.0.1f/doc/ssl/SSL_CTX_use_psk_identity_hint.pod 2014-02-28 10:21:12.351979203 +0200 +@@ -96,7 +96,7 @@ + connection will fail with decryption_error before it will be finished + completely. + +-=item 0 ++=item Z<>0 + + PSK identity was not found. An "unknown_psk_identity" alert message + will be sent and the connection setup fails. +Index: openssl-1.0.1f/doc/ssl/SSL_accept.pod +=================================================================== +--- openssl-1.0.1f.orig/doc/ssl/SSL_accept.pod 2014-01-06 15:47:42.000000000 +0200 ++++ openssl-1.0.1f/doc/ssl/SSL_accept.pod 2014-02-28 10:21:51.535979215 +0200 +@@ -44,13 +44,13 @@ + + =over 4 + +-=item 0 ++=item Z<>0 + + The TLS/SSL handshake was not successful but was shut down controlled and + by the specifications of the TLS/SSL protocol. Call SSL_get_error() with the + return value B to find out the reason. + +-=item 1 ++=item Z<>1 + + The TLS/SSL handshake was successfully completed, a TLS/SSL connection has been + established. +Index: openssl-1.0.1f/doc/ssl/SSL_clear.pod +=================================================================== +--- openssl-1.0.1f.orig/doc/ssl/SSL_clear.pod 2014-01-06 15:47:42.000000000 +0200 ++++ openssl-1.0.1f/doc/ssl/SSL_clear.pod 2014-02-28 10:22:13.087979196 +0200 +@@ -56,12 +56,12 @@ + + =over 4 + +-=item 0 ++=item Z<>0 + + The SSL_clear() operation could not be performed. Check the error stack to + find out the reason. + +-=item 1 ++=item Z<>1 + + The SSL_clear() operation was successful. + +Index: openssl-1.0.1f/doc/ssl/SSL_connect.pod +=================================================================== +--- openssl-1.0.1f.orig/doc/ssl/SSL_connect.pod 2014-01-06 15:47:42.000000000 +0200 ++++ openssl-1.0.1f/doc/ssl/SSL_connect.pod 2014-02-28 10:22:33.991979193 +0200 +@@ -41,13 +41,13 @@ + + =over 4 + +-=item 0 ++=item Z<>0 + + The TLS/SSL handshake was not successful but was shut down controlled and + by the specifications of the TLS/SSL protocol. Call SSL_get_error() with the + return value B to find out the reason. + +-=item 1 ++=item Z<>1 + + The TLS/SSL handshake was successfully completed, a TLS/SSL connection has been + established. +Index: openssl-1.0.1f/doc/ssl/SSL_do_handshake.pod +=================================================================== +--- openssl-1.0.1f.orig/doc/ssl/SSL_do_handshake.pod 2014-01-06 15:47:42.000000000 +0200 ++++ openssl-1.0.1f/doc/ssl/SSL_do_handshake.pod 2014-02-28 10:22:56.887979159 +0200 +@@ -45,13 +45,13 @@ + + =over 4 + +-=item 0 ++=item Z<>0 + + The TLS/SSL handshake was not successful but was shut down controlled and + by the specifications of the TLS/SSL protocol. Call SSL_get_error() with the + return value B to find out the reason. + +-=item 1 ++=item Z<>1 + + The TLS/SSL handshake was successfully completed, a TLS/SSL connection has been + established. +Index: openssl-1.0.1f/doc/ssl/SSL_read.pod +=================================================================== +--- openssl-1.0.1f.orig/doc/ssl/SSL_read.pod 2014-01-06 15:47:42.000000000 +0200 ++++ openssl-1.0.1f/doc/ssl/SSL_read.pod 2014-02-28 10:23:15.303979188 +0200 +@@ -86,7 +86,7 @@ + The read operation was successful; the return value is the number of + bytes actually read from the TLS/SSL connection. + +-=item 0 ++=item Z<>0 + + The read operation was not successful. The reason may either be a clean + shutdown due to a "close notify" alert sent by the peer (in which case +Index: openssl-1.0.1f/doc/ssl/SSL_session_reused.pod +=================================================================== +--- openssl-1.0.1f.orig/doc/ssl/SSL_session_reused.pod 2014-01-06 15:47:42.000000000 +0200 ++++ openssl-1.0.1f/doc/ssl/SSL_session_reused.pod 2014-02-28 10:23:36.615979186 +0200 +@@ -27,11 +27,11 @@ + + =over 4 + +-=item 0 ++=item Z<>0 + + A new session was negotiated. + +-=item 1 ++=item Z<>1 + + A session was reused. + +Index: openssl-1.0.1f/doc/ssl/SSL_set_fd.pod +=================================================================== +--- openssl-1.0.1f.orig/doc/ssl/SSL_set_fd.pod 2014-01-06 15:47:42.000000000 +0200 ++++ openssl-1.0.1f/doc/ssl/SSL_set_fd.pod 2014-02-28 10:23:57.599979183 +0200 +@@ -35,11 +35,11 @@ + + =over 4 + +-=item 0 ++=item Z<>0 + + The operation failed. Check the error stack to find out why. + +-=item 1 ++=item Z<>1 + + The operation succeeded. + +Index: openssl-1.0.1f/doc/ssl/SSL_set_session.pod +=================================================================== +--- openssl-1.0.1f.orig/doc/ssl/SSL_set_session.pod 2014-01-06 15:47:42.000000000 +0200 ++++ openssl-1.0.1f/doc/ssl/SSL_set_session.pod 2014-02-28 10:24:16.943979181 +0200 +@@ -37,11 +37,11 @@ + + =over 4 + +-=item 0 ++=item Z<>0 + + The operation failed; check the error stack to find out the reason. + +-=item 1 ++=item Z<>1 + + The operation succeeded. + +Index: openssl-1.0.1f/doc/ssl/SSL_shutdown.pod +=================================================================== +--- openssl-1.0.1f.orig/doc/ssl/SSL_shutdown.pod 2014-01-06 15:47:42.000000000 +0200 ++++ openssl-1.0.1f/doc/ssl/SSL_shutdown.pod 2014-02-28 10:25:03.623979175 +0200 +@@ -92,19 +92,19 @@ + + =over 4 + +-=item 0 ++=item Z<>0 + + The shutdown is not yet finished. Call SSL_shutdown() for a second time, + if a bidirectional shutdown shall be performed. + The output of L may be misleading, as an + erroneous SSL_ERROR_SYSCALL may be flagged even though no error occurred. + +-=item 1 ++=item Z<>1 + + The shutdown was successfully completed. The "close notify" alert was sent + and the peer's "close notify" alert was received. + +-=item -1 ++=item Z<>-1 + + The shutdown was not successful because a fatal error occurred either + at the protocol level or a connection failure occurred. It can also occur if +Index: openssl-1.0.1f/doc/ssl/SSL_write.pod +=================================================================== +--- openssl-1.0.1f.orig/doc/ssl/SSL_write.pod 2014-01-06 15:47:42.000000000 +0200 ++++ openssl-1.0.1f/doc/ssl/SSL_write.pod 2014-02-28 10:25:36.031979168 +0200 +@@ -79,7 +79,7 @@ + The write operation was successful, the return value is the number of + bytes actually written to the TLS/SSL connection. + +-=item 0 ++=item Z<>0 + + The write operation was not successful. Probably the underlying connection + was closed. Call SSL_get_error() with the return value B to find out, diff --git a/meta-fsl-ppc/recipes-connectivity/openssl/openssl/openssl-fix-link.patch b/meta-fsl-ppc/recipes-connectivity/openssl/openssl/openssl-fix-link.patch new file mode 100644 index 00000000..154106cb --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/openssl/openssl/openssl-fix-link.patch @@ -0,0 +1,35 @@ +From aabfb6f78af8e337d3239142117ba303fce55e7e Mon Sep 17 00:00:00 2001 +From: Dmitry Eremin-Solenikov +Date: Thu, 22 Sep 2011 08:55:26 +0200 +Subject: [PATCH] fix the parallel build regarding shared libraries. + +Upstream-Status: Pending +--- + .../openssl-1.0.0e/Makefile.org | 8 ++++---- + 1 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/Makefile.org +index 3c7aea1..6326cd6 100644 +--- a/Makefile.org ++++ b/Makefile.org +@@ -243,13 +243,13 @@ build_libs: build_crypto build_ssl build_engines + + build_crypto: + @dir=crypto; target=all; $(BUILD_ONE_CMD) +-build_ssl: ++build_ssl: build_crypto + @dir=ssl; target=all; $(BUILD_ONE_CMD) +-build_engines: ++build_engines: build_crypto + @dir=engines; target=all; $(BUILD_ONE_CMD) +-build_apps: ++build_apps: build_crypto build_ssl + @dir=apps; target=all; $(BUILD_ONE_CMD) +-build_tests: ++build_tests: build_crypto build_ssl + @dir=test; target=all; $(BUILD_ONE_CMD) + build_tools: + @dir=tools; target=all; $(BUILD_ONE_CMD) +-- +1.6.6.1 + diff --git a/meta-fsl-ppc/recipes-connectivity/openssl/openssl/openssl_fix_for_x32.patch b/meta-fsl-ppc/recipes-connectivity/openssl/openssl/openssl_fix_for_x32.patch new file mode 100644 index 00000000..93ce0343 --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/openssl/openssl/openssl_fix_for_x32.patch @@ -0,0 +1,90 @@ +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 2011/07/13 + +ported the patch to the 1.0.0e version +Signed-Off-By: Nitin A Kamble 2011/12/01 +Index: openssl-1.0.1e/Configure +=================================================================== +--- openssl-1.0.1e.orig/Configure ++++ openssl-1.0.1e/Configure +@@ -402,6 +402,7 @@ my %table=( + "linux-ia64-ecc","ecc:-DL_ENDIAN -DTERMIO -O2 -Wall -no_cpprt::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT:${ia64_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", + "linux-ia64-icc","icc:-DL_ENDIAN -DTERMIO -O2 -Wall -no_cpprt::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_RISC1 DES_INT:${ia64_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", + "linux-x86_64", "gcc:-m64 -DL_ENDIAN -DTERMIO -O3 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64", ++"linux-x32", "gcc:-mx32 -DL_ENDIAN -DTERMIO -O3 -Wall -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-mx32:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::x32", + "linux64-s390x", "gcc:-m64 -DB_ENDIAN -DTERMIO -O3 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL:${s390x_asm}:64:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64", + #### So called "highgprs" target for z/Architecture CPUs + # "Highgprs" is kernel feature first implemented in Linux 2.6.32, see +Index: openssl-1.0.1e/crypto/bn/asm/x86_64-gcc.c +=================================================================== +--- openssl-1.0.1e.orig/crypto/bn/asm/x86_64-gcc.c ++++ openssl-1.0.1e/crypto/bn/asm/x86_64-gcc.c +@@ -55,7 +55,7 @@ + * machine. + */ + +-#ifdef _WIN64 ++#if defined _WIN64 || !defined __LP64__ + #define BN_ULONG unsigned long long + #else + #define BN_ULONG unsigned long +@@ -192,9 +192,9 @@ BN_ULONG bn_add_words (BN_ULONG *rp, con + asm ( + " subq %2,%2 \n" + ".p2align 4 \n" +- "1: movq (%4,%2,8),%0 \n" +- " adcq (%5,%2,8),%0 \n" +- " movq %0,(%3,%2,8) \n" ++ "1: movq (%q4,%2,8),%0 \n" ++ " adcq (%q5,%2,8),%0 \n" ++ " movq %0,(%q3,%2,8) \n" + " leaq 1(%2),%2 \n" + " loop 1b \n" + " sbbq %0,%0 \n" +@@ -215,9 +215,9 @@ BN_ULONG bn_sub_words (BN_ULONG *rp, con + asm ( + " subq %2,%2 \n" + ".p2align 4 \n" +- "1: movq (%4,%2,8),%0 \n" +- " sbbq (%5,%2,8),%0 \n" +- " movq %0,(%3,%2,8) \n" ++ "1: movq (%q4,%2,8),%0 \n" ++ " sbbq (%q5,%2,8),%0 \n" ++ " movq %0,(%q3,%2,8) \n" + " leaq 1(%2),%2 \n" + " loop 1b \n" + " sbbq %0,%0 \n" +Index: openssl-1.0.1e/crypto/bn/bn.h +=================================================================== +--- openssl-1.0.1e.orig/crypto/bn/bn.h ++++ openssl-1.0.1e/crypto/bn/bn.h +@@ -172,6 +172,13 @@ extern "C" { + # endif + #endif + ++/* Address type. */ ++#ifdef _WIN64 ++#define BN_ADDR unsigned long long ++#else ++#define BN_ADDR unsigned long ++#endif ++ + /* assuming long is 64bit - this is the DEC Alpha + * unsigned long long is only 64 bits :-(, don't define + * BN_LLONG for the DEC Alpha */ +Index: openssl-1.0.1e/crypto/bn/bn_exp.c +=================================================================== +--- openssl-1.0.1e.orig/crypto/bn/bn_exp.c ++++ openssl-1.0.1e/crypto/bn/bn_exp.c +@@ -567,7 +567,7 @@ static int MOD_EXP_CTIME_COPY_FROM_PREBU + + /* Given a pointer value, compute the next address that is a cache line multiple. */ + #define MOD_EXP_CTIME_ALIGN(x_) \ +- ((unsigned char*)(x_) + (MOD_EXP_CTIME_MIN_CACHE_LINE_WIDTH - (((size_t)(x_)) & (MOD_EXP_CTIME_MIN_CACHE_LINE_MASK)))) ++ ((unsigned char*)(x_) + (MOD_EXP_CTIME_MIN_CACHE_LINE_WIDTH - (((BN_ADDR)(x_)) & (MOD_EXP_CTIME_MIN_CACHE_LINE_MASK)))) + + /* This variant of BN_mod_exp_mont() uses fixed windows and the special + * precomputation memory layout to limit data-dependency to a minimum diff --git a/meta-fsl-ppc/recipes-connectivity/openssl/openssl/shared-libs.patch b/meta-fsl-ppc/recipes-connectivity/openssl/openssl/shared-libs.patch new file mode 100644 index 00000000..a7ca0a30 --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/openssl/openssl/shared-libs.patch @@ -0,0 +1,41 @@ +Upstream-Status: Inappropriate [configuration] + +Index: openssl-1.0.1e/crypto/Makefile +=================================================================== +--- openssl-1.0.1e.orig/crypto/Makefile ++++ openssl-1.0.1e/crypto/Makefile +@@ -108,7 +108,7 @@ $(LIB): $(LIBOBJ) + + shared: buildinf.h lib subdirs + if [ -n "$(SHARED_LIBS)" ]; then \ +- (cd ..; $(MAKE) $(SHARED_LIB)); \ ++ (cd ..; $(MAKE) -e $(SHARED_LIB)); \ + fi + + libs: +Index: openssl-1.0.1e/Makefile.org +=================================================================== +--- openssl-1.0.1e.orig/Makefile.org ++++ openssl-1.0.1e/Makefile.org +@@ -310,7 +310,7 @@ libcrypto$(SHLIB_EXT): libcrypto.a fips_ + + libssl$(SHLIB_EXT): libcrypto$(SHLIB_EXT) libssl.a + @if [ "$(SHLIB_TARGET)" != "" ]; then \ +- $(MAKE) SHLIBDIRS=ssl SHLIBDEPS='-lcrypto' build-shared; \ ++ $(MAKE) -e SHLIBDIRS=ssl SHLIBDEPS='-lcrypto' build-shared; \ + else \ + echo "There's no support for shared libraries on this platform" >&2; \ + exit 1; \ +Index: openssl-1.0.1e/ssl/Makefile +=================================================================== +--- openssl-1.0.1e.orig/ssl/Makefile ++++ openssl-1.0.1e/ssl/Makefile +@@ -62,7 +62,7 @@ lib: $(LIBOBJ) + + shared: lib + if [ -n "$(SHARED_LIBS)" ]; then \ +- (cd ..; $(MAKE) $(SHARED_LIB)); \ ++ (cd ..; $(MAKE) -e $(SHARED_LIB)); \ + fi + + files: diff --git a/meta-fsl-ppc/recipes-connectivity/openssl/openssl_1.0.1g.bb b/meta-fsl-ppc/recipes-connectivity/openssl/openssl_1.0.1g.bb new file mode 100644 index 00000000..f3c20e8c --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/openssl/openssl_1.0.1g.bb @@ -0,0 +1,55 @@ +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=f9a8f968107345e0b75aa8c2ecaa7ec8" + +export DIRS = "crypto ssl apps engines" +export OE_LDFLAGS="${LDFLAGS}" + +SRC_URI += "file://configure-targets.patch \ + file://shared-libs.patch \ + file://oe-ldflags.patch \ + file://engines-install-in-libdir-ssl.patch \ + file://openssl-fix-link.patch \ + file://debian/version-script.patch \ + file://debian/pic.patch \ + file://debian/c_rehash-compat.patch \ + file://debian/ca.patch \ + file://debian/make-targets.patch \ + file://debian/no-rpath.patch \ + file://debian/man-dir.patch \ + file://debian/man-section.patch \ + file://debian/no-symbolic.patch \ + file://debian/debian-targets.patch \ + file://openssl_fix_for_x32.patch \ + file://openssl-fix-doc.patch \ + file://fix-cipher-des-ede3-cfb1.patch \ + file://openssl-avoid-NULL-pointer-dereference-in-EVP_DigestInit_ex.patch \ + file://openssl-avoid-NULL-pointer-dereference-in-dh_pub_encode.patch \ + file://initial-aarch64-bits.patch \ + file://find.pl \ + file://openssl-fix-des.pod-error.patch \ + " + +SRC_URI[md5sum] = "de62b43dfcd858e66a74bee1c834e959" +SRC_URI[sha256sum] = "53cb818c3b90e507a8348f4f5eaedb05d8bfe5358aabb508b7263cc670c3e028" + +PACKAGES =+ " \ + ${PN}-engines \ + ${PN}-engines-dbg \ + " + +FILES_${PN}-engines = "${libdir}/ssl/engines/*.so ${libdir}/engines" +FILES_${PN}-engines-dbg = "${libdir}/ssl/engines/.debug" + +PARALLEL_MAKE = "" +PARALLEL_MAKEINST = "" + +do_configure_prepend() { + cp ${WORKDIR}/find.pl ${S}/util/find.pl +} -- cgit v1.2.3-54-g00ecf From 8443b0288c81073d9b9095c1d638e2673ae5f739 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Wed, 9 Jul 2014 01:43:21 -0500 Subject: openssl: set preferred version to 1.0.1g Signed-off-by: Ting Liu --- meta-fsl-ppc/conf/machine/e500mc.inc | 1 + meta-fsl-ppc/conf/machine/e500v2.inc | 1 + meta-fsl-ppc/conf/machine/e5500-64b.inc | 1 + meta-fsl-ppc/conf/machine/e5500.inc | 1 + meta-fsl-ppc/conf/machine/e6500-64b.inc | 1 + meta-fsl-ppc/conf/machine/e6500.inc | 1 + 6 files changed, 6 insertions(+) diff --git a/meta-fsl-ppc/conf/machine/e500mc.inc b/meta-fsl-ppc/conf/machine/e500mc.inc index 2b06fd1d..f5b419d6 100644 --- a/meta-fsl-ppc/conf/machine/e500mc.inc +++ b/meta-fsl-ppc/conf/machine/e500mc.inc @@ -8,6 +8,7 @@ MACHINE_EXTRA_RRECOMMENDS = "u-boot udev-extraconf kernel-modules" PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" PREFERRED_VERSION_virtual/kernel ?= "3.0.34" PREFERRED_VERSION_qemu = "1.7+fsl" +PREFERRED_VERSION_openssl = "1.0.1g" KERNEL_IMAGETYPE ?= "uImage" # disable the images below for now diff --git a/meta-fsl-ppc/conf/machine/e500v2.inc b/meta-fsl-ppc/conf/machine/e500v2.inc index cbdf3d95..23b5091d 100644 --- a/meta-fsl-ppc/conf/machine/e500v2.inc +++ b/meta-fsl-ppc/conf/machine/e500v2.inc @@ -6,6 +6,7 @@ MACHINE_EXTRA_RRECOMMENDS = "u-boot udev-extraconf kernel-modules" PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" PREFERRED_VERSION_virtual/kernel ?= "3.0.34" PREFERRED_VERSION_qemu = "1.7+fsl" +PREFERRED_VERSION_openssl = "1.0.1g" KERNEL_IMAGETYPE ?= "uImage" # disable the images below for now diff --git a/meta-fsl-ppc/conf/machine/e5500-64b.inc b/meta-fsl-ppc/conf/machine/e5500-64b.inc index c11c3c12..b34be91b 100644 --- a/meta-fsl-ppc/conf/machine/e5500-64b.inc +++ b/meta-fsl-ppc/conf/machine/e5500-64b.inc @@ -9,6 +9,7 @@ MACHINE_EXTRA_RRECOMMENDS = "u-boot udev-extraconf kernel-modules" PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" PREFERRED_VERSION_virtual/kernel ?= "3.0.34" PREFERRED_VERSION_qemu = "1.7+fsl" +PREFERRED_VERSION_openssl = "1.0.1g" KERNEL_IMAGETYPE ?= "uImage" # disable the images below for now diff --git a/meta-fsl-ppc/conf/machine/e5500.inc b/meta-fsl-ppc/conf/machine/e5500.inc index db51aa86..0b4a9a3b 100644 --- a/meta-fsl-ppc/conf/machine/e5500.inc +++ b/meta-fsl-ppc/conf/machine/e5500.inc @@ -8,6 +8,7 @@ MACHINE_EXTRA_RRECOMMENDS = "u-boot udev-extraconf kernel-modules" PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" PREFERRED_VERSION_virtual/kernel ?= "3.0.34" PREFERRED_VERSION_qemu = "1.7+fsl" +PREFERRED_VERSION_openssl = "1.0.1g" KERNEL_IMAGETYPE ?= "uImage" # disable the images below for now diff --git a/meta-fsl-ppc/conf/machine/e6500-64b.inc b/meta-fsl-ppc/conf/machine/e6500-64b.inc index 80251038..a37d1dd2 100644 --- a/meta-fsl-ppc/conf/machine/e6500-64b.inc +++ b/meta-fsl-ppc/conf/machine/e6500-64b.inc @@ -9,6 +9,7 @@ MACHINE_EXTRA_RRECOMMENDS = "u-boot udev-extraconf kernel-modules" PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" PREFERRED_VERSION_virtual/kernel ?= "3.0.34" PREFERRED_VERSION_qemu = "1.7+fsl" +PREFERRED_VERSION_openssl = "1.0.1g" KERNEL_IMAGETYPE ?= "uImage" # disable the images below for now diff --git a/meta-fsl-ppc/conf/machine/e6500.inc b/meta-fsl-ppc/conf/machine/e6500.inc index 4401eb67..dd259fc7 100644 --- a/meta-fsl-ppc/conf/machine/e6500.inc +++ b/meta-fsl-ppc/conf/machine/e6500.inc @@ -8,6 +8,7 @@ MACHINE_EXTRA_RRECOMMENDS = "u-boot udev-extraconf kernel-modules" PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" PREFERRED_VERSION_virtual/kernel ?= "3.0.34" PREFERRED_VERSION_qemu = "1.7+fsl" +PREFERRED_VERSION_openssl = "1.0.1g" KERNEL_IMAGETYPE ?= "uImage" # disable the images below for now -- cgit v1.2.3-54-g00ecf From a5a824944072c9cfec826a76ba788e6674ab7fdd Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Sat, 14 Jun 2014 13:25:20 +0800 Subject: openssl: use fsl maintained source add bbappend to use fsl own openssl source code which was tested Signed-off-by: Ting Liu --- ...double-initialization-of-cryptodev-engine.patch | 83 + ...2-ECC-Support-header-for-Cryptodev-Engine.patch | 318 +++ ...03-add-support-for-TLS-algorithms-offload.patch | 296 +++ .../0004-Fixed-private-key-support-for-DH.patch | 33 + .../0005-Fixed-private-key-support-for-DH.patch | 35 + ...itial-support-for-PKC-in-cryptodev-engine.patch | 1563 +++++++++++++++ ...007-Added-hwrng-dev-file-as-source-of-RNG.patch | 28 + ...s-interface-added-for-PKC-cryptodev-inter.patch | 2039 ++++++++++++++++++++ ...ev-extend-TLS-offload-with-new-algorithms.patch | 106 + ...gen-operation-and-support-gendsa-command-.patch | 153 ++ .../openssl/openssl-fsl/0011-RSA-Keygen-Fix.patch | 64 + .../0012-Removed-local-copy-of-curve_t-type.patch | 164 ++ ...us-parameter-is-not-populated-by-dhparams.patch | 43 + .../0014-SW-Backoff-mechanism-for-dsa-keygen.patch | 53 + .../0015-Fixed-DH-keygen-pair-generator.patch | 100 + .../openssl/openssl_1.0.1g.bbappend | 59 + 16 files changed, 5137 insertions(+) create mode 100644 meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0001-remove-double-initialization-of-cryptodev-engine.patch create mode 100644 meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0002-ECC-Support-header-for-Cryptodev-Engine.patch create mode 100644 meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0003-add-support-for-TLS-algorithms-offload.patch create mode 100644 meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0004-Fixed-private-key-support-for-DH.patch create mode 100644 meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0005-Fixed-private-key-support-for-DH.patch create mode 100644 meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0006-Initial-support-for-PKC-in-cryptodev-engine.patch create mode 100644 meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0007-Added-hwrng-dev-file-as-source-of-RNG.patch create mode 100644 meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0008-Asynchronous-interface-added-for-PKC-cryptodev-inter.patch create mode 100644 meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0009-eng_cryptodev-extend-TLS-offload-with-new-algorithms.patch create mode 100644 meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0010-Add-RSA-keygen-operation-and-support-gendsa-command-.patch create mode 100644 meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0011-RSA-Keygen-Fix.patch create mode 100644 meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0012-Removed-local-copy-of-curve_t-type.patch create mode 100644 meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0013-Modulus-parameter-is-not-populated-by-dhparams.patch create mode 100644 meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0014-SW-Backoff-mechanism-for-dsa-keygen.patch create mode 100644 meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0015-Fixed-DH-keygen-pair-generator.patch create mode 100644 meta-fsl-ppc/recipes-connectivity/openssl/openssl_1.0.1g.bbappend diff --git a/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0001-remove-double-initialization-of-cryptodev-engine.patch b/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0001-remove-double-initialization-of-cryptodev-engine.patch new file mode 100644 index 00000000..eae68780 --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0001-remove-double-initialization-of-cryptodev-engine.patch @@ -0,0 +1,83 @@ +From f174dd904fb4995a89eed53be3e2ebf7bee25a9b Mon Sep 17 00:00:00 2001 +From: Cristian Stoica +Date: Tue, 10 Sep 2013 12:46:46 +0300 +Subject: [PATCH][fsl 01/15] remove double initialization of cryptodev engine + +Upstream-status: Pending + +cryptodev engine is initialized together with the other engines in +ENGINE_load_builtin_engines. The initialization done through +OpenSSL_add_all_algorithms is redundant. + +Signed-off-by: Cristian Stoica +--- + crypto/engine/eng_all.c | 11 ----------- + crypto/engine/engine.h | 4 ---- + crypto/evp/c_all.c | 5 ----- + util/libeay.num | 2 +- + 4 files changed, 1 insertion(+), 21 deletions(-) + +diff --git a/crypto/engine/eng_all.c b/crypto/engine/eng_all.c +index 6093376..f16c043 100644 +--- a/crypto/engine/eng_all.c ++++ b/crypto/engine/eng_all.c +@@ -122,14 +122,3 @@ void ENGINE_load_builtin_engines(void) + #endif + ENGINE_register_all_complete(); + } +- +-#if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(HAVE_CRYPTODEV) +-void ENGINE_setup_bsd_cryptodev(void) { +- static int bsd_cryptodev_default_loaded = 0; +- if (!bsd_cryptodev_default_loaded) { +- ENGINE_load_cryptodev(); +- ENGINE_register_all_complete(); +- } +- bsd_cryptodev_default_loaded=1; +-} +-#endif +diff --git a/crypto/engine/engine.h b/crypto/engine/engine.h +index f8be497..237a6c9 100644 +--- a/crypto/engine/engine.h ++++ b/crypto/engine/engine.h +@@ -740,10 +740,6 @@ typedef int (*dynamic_bind_engine)(ENGINE *e, const char *id, + * values. */ + void *ENGINE_get_static_state(void); + +-#if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(HAVE_CRYPTODEV) +-void ENGINE_setup_bsd_cryptodev(void); +-#endif +- + /* BEGIN ERROR CODES */ + /* The following lines are auto generated by the script mkerr.pl. Any changes + * made after this point may be overwritten when the script is next run. +diff --git a/crypto/evp/c_all.c b/crypto/evp/c_all.c +index 766c4ce..5d6c21b 100644 +--- a/crypto/evp/c_all.c ++++ b/crypto/evp/c_all.c +@@ -82,9 +82,4 @@ void OPENSSL_add_all_algorithms_noconf(void) + OPENSSL_cpuid_setup(); + OpenSSL_add_all_ciphers(); + OpenSSL_add_all_digests(); +-#ifndef OPENSSL_NO_ENGINE +-# if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(HAVE_CRYPTODEV) +- ENGINE_setup_bsd_cryptodev(); +-# endif +-#endif + } +diff --git a/util/libeay.num b/util/libeay.num +index aa86b2b..ae50040 100755 +--- a/util/libeay.num ++++ b/util/libeay.num +@@ -2801,7 +2801,7 @@ BIO_indent 3242 EXIST::FUNCTION: + BUF_strlcpy 3243 EXIST::FUNCTION: + OpenSSLDie 3244 EXIST::FUNCTION: + OPENSSL_cleanse 3245 EXIST::FUNCTION: +-ENGINE_setup_bsd_cryptodev 3246 EXIST:__FreeBSD__:FUNCTION:ENGINE ++ENGINE_setup_bsd_cryptodev 3246 NOEXIST::FUNCTION: + ERR_release_err_state_table 3247 EXIST::FUNCTION:LHASH + EVP_aes_128_cfb8 3248 EXIST::FUNCTION:AES + FIPS_corrupt_rsa 3249 NOEXIST::FUNCTION: +-- +1.7.9.7 + diff --git a/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0002-ECC-Support-header-for-Cryptodev-Engine.patch b/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0002-ECC-Support-header-for-Cryptodev-Engine.patch new file mode 100644 index 00000000..717a345a --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0002-ECC-Support-header-for-Cryptodev-Engine.patch @@ -0,0 +1,318 @@ +From 154601fba4907a7eb3f98e670d62cfa15a767500 Mon Sep 17 00:00:00 2001 +From: Yashpal Dutta +Date: Tue, 11 Mar 2014 05:56:54 +0545 +Subject: [PATCH][fsl 02/15] ECC Support header for Cryptodev Engine + +Upstream-status: Pending + +Signed-off-by: Yashpal Dutta +--- + crypto/engine/eng_cryptodev_ec.h | 296 ++++++++++++++++++++++++++++++++++++++ + 1 file changed, 296 insertions(+) + create mode 100644 crypto/engine/eng_cryptodev_ec.h + +diff --git a/crypto/engine/eng_cryptodev_ec.h b/crypto/engine/eng_cryptodev_ec.h +new file mode 100644 +index 0000000..77aee71 +--- /dev/null ++++ b/crypto/engine/eng_cryptodev_ec.h +@@ -0,0 +1,296 @@ ++/* ++ * Copyright (C) 2012 Freescale Semiconductor, Inc. ++ * ++ * 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. ++ * ++ * 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 __ENG_EC_H ++#define __ENG_EC_H ++ ++#define SPCF_CPARAM_INIT(X,...) \ ++static unsigned char X##_c[] = {__VA_ARGS__} \ ++ ++#define SPCF_FREE_BN(X) do { if(X) { BN_clear_free(X); X = NULL; } } while (0) ++ ++#define SPCF_COPY_CPARAMS(NIDBUF) \ ++ do { \ ++ memcpy (buf, NIDBUF, buf_len); \ ++ } while (0) ++ ++#define SPCF_CPARAM_CASE(X) \ ++ case NID_##X: \ ++ SPCF_COPY_CPARAMS(X##_c); \ ++ break ++ ++SPCF_CPARAM_INIT(sect113r1, 0x01, 0x73, 0xE8, 0x34, 0xAF, 0x28, 0xEC, 0x76, ++ 0xCB, 0x83, 0xBD, 0x8D, 0xFE, 0xB2, 0xD5); ++SPCF_CPARAM_INIT(sect113r2, 0x00, 0x54, 0xD9, 0xF0, 0x39, 0x57, 0x17, 0x4A, ++ 0x32, 0x32, 0x91, 0x67, 0xD7, 0xFE, 0x71); ++SPCF_CPARAM_INIT(sect131r1, 0x03, 0xDB, 0x89, 0xB4, 0x05, 0xE4, 0x91, 0x16, ++ 0x0E, 0x3B, 0x2F, 0x07, 0xB0, 0xCE, 0x20, 0xB3, 0x7E); ++SPCF_CPARAM_INIT(sect131r2, 0x07, 0xCB, 0xB9, 0x92, 0x0D, 0x71, 0xA4, 0x8E, ++ 0x09, 0x9C, 0x38, 0xD7, 0x1D, 0xA6, 0x49, 0x0E, 0xB1); ++SPCF_CPARAM_INIT(sect163k1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ++ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ++ 0x00, 0x00, 0x01); ++SPCF_CPARAM_INIT(sect163r1, 0x05, 0xED, 0x40, 0x3E, 0xD5, 0x8E, 0xB4, 0x5B, ++ 0x1C, 0xCE, 0xCA, 0x0F, 0x4F, 0x61, 0x65, 0x55, 0x49, 0x86, ++ 0x1B, 0xE0, 0x52); ++SPCF_CPARAM_INIT(sect163r2, 0x07, 0x2C, 0x4E, 0x1E, 0xF7, 0xCB, 0x2F, 0x3A, ++ 0x03, 0x5D, 0x33, 0x10, 0x42, 0x94, 0x15, 0x96, 0x09, 0x13, ++ 0x8B, 0xB4, 0x04); ++SPCF_CPARAM_INIT(sect193r1, 0x01, 0x67, 0xB3, 0x5E, 0xB4, 0x31, 0x3F, 0x26, ++ 0x3D, 0x0F, 0x7A, 0x3D, 0x50, 0x36, 0xF0, 0xA0, 0xA3, 0xC9, ++ 0x80, 0xD4, 0x0E, 0x5A, 0x05, 0x3E, 0xD2); ++SPCF_CPARAM_INIT(sect193r2, 0x00, 0x69, 0x89, 0xFE, 0x6B, 0xFE, 0x30, 0xED, ++ 0xDC, 0x32, 0x44, 0x26, 0x9F, 0x3A, 0xAD, 0x18, 0xD6, 0x6C, ++ 0xF3, 0xDB, 0x3E, 0x33, 0x02, 0xFA, 0xA8); ++SPCF_CPARAM_INIT(sect233k1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ++ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ++ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ++ 0x00, 0x01); ++SPCF_CPARAM_INIT(sect233r1, 0x00, 0x07, 0xD5, 0xEF, 0x43, 0x89, 0xDF, 0xF1, ++ 0x1E, 0xCD, 0xBA, 0x39, 0xC3, 0x09, 0x70, 0xD3, 0xCE, 0x35, ++ 0xCE, 0xBB, 0xA5, 0x84, 0x73, 0xF6, 0x4B, 0x4D, 0xC0, 0xF2, ++ 0x68, 0x6C); ++SPCF_CPARAM_INIT(sect239k1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ++ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ++ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ++ 0x00, 0x01); ++SPCF_CPARAM_INIT(sect283k1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ++ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ++ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ++ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01); ++SPCF_CPARAM_INIT(sect283r1, 0x03, 0xD8, 0xC9, 0x3D, 0x3B, 0x0E, 0xA8, 0x1D, ++ 0x92, 0x94, 0x03, 0x4D, 0x7E, 0xE3, 0x13, 0x5D, 0x0A, 0xC5, ++ 0xFC, 0x8D, 0x9C, 0xB0, 0x27, 0x6F, 0x72, 0x11, 0xF8, 0x80, ++ 0xF0, 0xD8, 0x1C, 0xA4, 0xC6, 0xE8, 0x7B, 0x38); ++SPCF_CPARAM_INIT(sect409k1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ++ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ++ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ++ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ++ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ++ 0x00, 0x00, 0x00, 0x01); ++SPCF_CPARAM_INIT(sect409r1, 0x01, 0x49, 0xB8, 0xB7, 0xBE, 0xBD, 0x9B, 0x63, ++ 0x65, 0x3E, 0xF1, 0xCD, 0x8C, 0x6A, 0x5D, 0xD1, 0x05, 0xA2, ++ 0xAA, 0xAC, 0x36, 0xFE, 0x2E, 0xAE, 0x43, 0xCF, 0x28, 0xCE, ++ 0x1C, 0xB7, 0xC8, 0x30, 0xC1, 0xEC, 0xDB, 0xFA, 0x41, 0x3A, ++ 0xB0, 0x7F, 0xE3, 0x5A, 0x57, 0x81, 0x1A, 0xE4, 0xF8, 0x8D, ++ 0x30, 0xAC, 0x63, 0xFB); ++SPCF_CPARAM_INIT(sect571k1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ++ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ++ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ++ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ++ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ++ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ++ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ++ 0x00, 0x00, 0x00, 0x01); ++SPCF_CPARAM_INIT(sect571r1, 0x06, 0x39, 0x5D, 0xB2, 0x2A, 0xB5, 0x94, 0xB1, ++ 0x86, 0x8C, 0xED, 0x95, 0x25, 0x78, 0xB6, 0x53, 0x9F, 0xAB, ++ 0xA6, 0x94, 0x06, 0xD9, 0xB2, 0x98, 0x61, 0x23, 0xA1, 0x85, ++ 0xC8, 0x58, 0x32, 0xE2, 0x5F, 0xD5, 0xB6, 0x38, 0x33, 0xD5, ++ 0x14, 0x42, 0xAB, 0xF1, 0xA9, 0xC0, 0x5F, 0xF0, 0xEC, 0xBD, ++ 0x88, 0xD7, 0xF7, 0x79, 0x97, 0xF4, 0xDC, 0x91, 0x56, 0xAA, ++ 0xF1, 0xCE, 0x08, 0x16, 0x46, 0x86, 0xDD, 0xFF, 0x75, 0x11, ++ 0x6F, 0xBC, 0x9A, 0x7A); ++SPCF_CPARAM_INIT(X9_62_c2pnb163v1, 0x04, 0x53, 0xE1, 0xE4, 0xB7, 0x29, 0x1F, ++ 0x5C, 0x2D, 0x53, 0xCE, 0x18, 0x48, 0x3F, 0x00, 0x70, 0x81, ++ 0xE7, 0xEA, 0x26, 0xEC); ++SPCF_CPARAM_INIT(X9_62_c2pnb163v2, 0x04, 0x35, 0xC0, 0x19, 0x66, 0x0E, 0x01, ++ 0x01, 0xBA, 0x87, 0x0C, 0xA3, 0x9F, 0xD9, 0xA7, 0x76, 0x86, ++ 0x50, 0x9D, 0x28, 0x13); ++SPCF_CPARAM_INIT(X9_62_c2pnb163v3, 0x06, 0x55, 0xC4, 0x54, 0xE4, 0x1E, 0x38, ++ 0x0C, 0x7A, 0x60, 0xB6, 0x67, 0x9A, 0x5B, 0x7A, 0x3F, 0x3A, ++ 0xF6, 0x8E, 0x22, 0xC5); ++SPCF_CPARAM_INIT(X9_62_c2pnb176v1, 0x00, 0x69, 0xF7, 0xDA, 0x36, 0x19, 0xA7, ++ 0x42, 0xA3, 0x82, 0xFF, 0x05, 0x08, 0x8F, 0xD3, 0x99, 0x42, ++ 0xCA, 0x0F, 0x1D, 0x90, 0xB6, 0x5B); ++SPCF_CPARAM_INIT(X9_62_c2tnb191v1, 0x4C, 0x45, 0x25, 0xAB, 0x0B, 0x68, 0x4A, ++ 0x64, 0x44, 0x62, 0x0A, 0x86, 0x45, 0xEF, 0x54, 0x6D, 0x54, ++ 0x69, 0x39, 0x68, 0xC2, 0xAE, 0x84, 0xAC); ++SPCF_CPARAM_INIT(X9_62_c2tnb191v2, 0x03, 0x7C, 0x8F, 0x57, 0xA2, 0x25, 0xC7, ++ 0xB3, 0xD4, 0xED, 0xD5, 0x88, 0x0F, 0x38, 0x0A, 0xCC, 0x55, ++ 0x74, 0xEC, 0xB3, 0x6C, 0x9F, 0x51, 0x21); ++SPCF_CPARAM_INIT(X9_62_c2tnb191v3, 0x37, 0x39, 0xFF, 0x98, 0xB4, 0xD1, 0x69, ++ 0x3E, 0xCF, 0x52, 0x7A, 0x98, 0x51, 0xED, 0xCF, 0x99, 0x9D, ++ 0x9E, 0x75, 0x05, 0x43, 0x33, 0x43, 0x24); ++SPCF_CPARAM_INIT(X9_62_c2pnb208w1, 0x00, 0xDB, 0x05, 0x3C, 0x41, 0x76, 0xCC, ++ 0x1D, 0xA1, 0x27, 0x85, 0x2C, 0xA6, 0xD9, 0x88, 0xBE, 0x1A, ++ 0xCC, 0xD1, 0x5B, 0x2A, 0xC1, 0xC1, 0x07, 0x42, 0x57, 0x34); ++SPCF_CPARAM_INIT(X9_62_c2tnb239v1, 0x24, 0x59, 0xFC, 0xF4, 0x51, 0x7B, 0xC5, ++ 0xA6, 0xB9, 0x9B, 0xE5, 0xC6, 0xC5, 0x62, 0x85, 0xC0, 0x21, ++ 0xFE, 0x32, 0xEE, 0x2B, 0x6F, 0x1C, 0x22, 0xEA, 0x5B, 0xE1, ++ 0xB8, 0x4B, 0x93); ++SPCF_CPARAM_INIT(X9_62_c2tnb239v2, 0x64, 0x98, 0x84, 0x19, 0x3B, 0x56, 0x2D, ++ 0x4A, 0x50, 0xB4, 0xFA, 0x56, 0x34, 0xE0, 0x34, 0x41, 0x3F, ++ 0x94, 0xC4, 0x59, 0xDA, 0x7C, 0xDB, 0x16, 0x64, 0x9D, 0xDD, ++ 0xF7, 0xE6, 0x0A); ++SPCF_CPARAM_INIT(X9_62_c2tnb239v3, 0x32, 0x63, 0x2E, 0x65, 0x2B, 0xEE, 0x91, ++ 0xC2, 0xE4, 0xA2, 0xF5, 0x42, 0xA3, 0x2D, 0x67, 0xA8, 0xB5, ++ 0xB4, 0x5F, 0x21, 0xA0, 0x81, 0x02, 0xFB, 0x1F, 0x2A, 0xFB, ++ 0xB6, 0xAC, 0xDA); ++SPCF_CPARAM_INIT(X9_62_c2pnb272w1, 0x00, 0xDA, 0x7B, 0x60, 0x28, 0xF4, 0xC8, ++ 0x09, 0xA0, 0xB9, 0x78, 0x81, 0xC3, 0xA5, 0x7E, 0x4D, 0x71, ++ 0x81, 0x34, 0xD1, 0x3F, 0xEC, 0xE0, 0x90, 0x85, 0x8A, 0xC3, ++ 0x1A, 0xE2, 0xDC, 0x2E, 0xDF, 0x8E, 0x3C, 0x8B); ++SPCF_CPARAM_INIT(X9_62_c2pnb304w1, 0x00, 0x3C, 0x67, 0xB4, 0x07, 0xC6, 0xF3, ++ 0x3F, 0x81, 0x0B, 0x17, 0xDC, 0x16, 0xE2, 0x14, 0x8A, 0x2C, ++ 0x9C, 0xE2, 0x9D, 0x56, 0x05, 0x23, 0x69, 0x6A, 0x55, 0x93, ++ 0x8A, 0x15, 0x40, 0x81, 0xE3, 0xE3, 0xAE, 0xFB, 0xCE, 0x45, ++ 0x70, 0xC9); ++SPCF_CPARAM_INIT(X9_62_c2tnb359v1, 0x22, 0x39, 0xAA, 0x58, 0x4A, 0xC5, 0x9A, ++ 0xF9, 0x61, 0xD0, 0xFA, 0x2D, 0x52, 0x85, 0xB6, 0xFD, 0xF7, ++ 0x34, 0x9B, 0xC6, 0x0E, 0x91, 0xE3, 0x20, 0xF4, 0x71, 0x64, ++ 0xCE, 0x11, 0xF5, 0x18, 0xEF, 0xB4, 0xC0, 0x8B, 0x9B, 0xDA, ++ 0x99, 0x9A, 0x8A, 0x37, 0xF8, 0x2A, 0x22, 0x61); ++SPCF_CPARAM_INIT(X9_62_c2pnb368w1, 0x00, 0xC0, 0x6C, 0xCF, 0x42, 0x89, 0x3A, ++ 0x8A, 0xAA, 0x00, 0x1E, 0x0B, 0xC0, 0xD2, 0xA2, 0x27, 0x66, ++ 0xEF, 0x3E, 0x41, 0x88, 0x7C, 0xC6, 0x77, 0x6F, 0x4A, 0x04, ++ 0x1E, 0xE4, 0x45, 0x14, 0xB2, 0x0A, 0xFC, 0x4E, 0x5C, 0x30, ++ 0x40, 0x60, 0x06, 0x5B, 0xC8, 0xD6, 0xCF, 0x04, 0xD3, 0x25); ++SPCF_CPARAM_INIT(X9_62_c2tnb431r1, 0x64, 0xF5, 0xBB, 0xE9, 0xBB, 0x31, 0x66, ++ 0xA3, 0xA0, 0x2F, 0x2F, 0x22, 0xBF, 0x05, 0xD9, 0xF7, 0xDA, ++ 0x43, 0xEE, 0x70, 0xC1, 0x79, 0x03, 0x15, 0x2B, 0x70, 0xA0, ++ 0xB4, 0x25, 0x9B, 0xD2, 0xFC, 0xB2, 0x20, 0x3B, 0x7F, 0xB8, ++ 0xD3, 0x39, 0x4E, 0x20, 0xEB, 0x0E, 0xA9, 0x84, 0xDD, 0xB1, ++ 0xE1, 0xF1, 0x4C, 0x67, 0xB1, 0x36, 0x2B); ++SPCF_CPARAM_INIT(wap_wsg_idm_ecid_wtls1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ++ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01); ++SPCF_CPARAM_INIT(wap_wsg_idm_ecid_wtls3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ++ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ++ 0x00, 0x00, 0x00, 0x00, 0x01); ++SPCF_CPARAM_INIT(wap_wsg_idm_ecid_wtls4, 0x01, 0x73, 0xE8, 0x34, 0xAF, 0x28, ++ 0xEC, 0x76, 0xCB, 0x83, 0xBD, 0x8D, 0xFE, 0xB2, 0xD5); ++SPCF_CPARAM_INIT(wap_wsg_idm_ecid_wtls5, 0x04, 0x53, 0xE1, 0xE4, 0xB7, 0x29, ++ 0x1F, 0x5C, 0x2D, 0x53, 0xCE, 0x18, 0x48, 0x3F, 0x00, 0x70, ++ 0x81, 0xE7, 0xEA, 0x26, 0xEC); ++SPCF_CPARAM_INIT(wap_wsg_idm_ecid_wtls10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ++ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ++ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ++ 0x00, 0x00, 0x00, 0x01); ++SPCF_CPARAM_INIT(wap_wsg_idm_ecid_wtls11, 0x00, 0x07, 0xD5, 0xEF, 0x43, 0x89, ++ 0xDF, 0xF1, 0x1E, 0xCD, 0xBA, 0x39, 0xC3, 0x09, 0x70, 0xD3, ++ 0xCE, 0x35, 0xCE, 0xBB, 0xA5, 0x84, 0x73, 0xF6, 0x4B, 0x4D, ++ 0xC0, 0xF2, 0x68, 0x6C); ++/* Oakley curve #3 over 155 bit binary filed */ ++SPCF_CPARAM_INIT(ipsec3, 0x00, 0x31, 0x10, 0x00, 0x00, 0x02, 0x23, 0xA0, 0x00, ++ 0xC4, 0x47, 0x40, 0x00, 0x08, 0x8E, 0x80, 0x00, 0x11, 0x1D, ++ 0x1D); ++/* Oakley curve #4 over 185 bit binary filed */ ++SPCF_CPARAM_INIT(ipsec4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, ++ 0x01, 0x80, 0x00, 0xC0, 0x0C, 0x00, 0x00, 0x00, 0x63, 0x80, ++ 0x30, 0x00, 0x1C, 0x00, 0x09); ++ ++static inline int ++eng_ec_get_cparam(int nid, unsigned char *buf, unsigned int buf_len) ++{ ++ int ret = 0; ++ switch (nid) { ++ SPCF_CPARAM_CASE(sect113r1); ++ SPCF_CPARAM_CASE(sect113r2); ++ SPCF_CPARAM_CASE(sect131r1); ++ SPCF_CPARAM_CASE(sect131r2); ++ SPCF_CPARAM_CASE(sect163k1); ++ SPCF_CPARAM_CASE(sect163r1); ++ SPCF_CPARAM_CASE(sect163r2); ++ SPCF_CPARAM_CASE(sect193r1); ++ SPCF_CPARAM_CASE(sect193r2); ++ SPCF_CPARAM_CASE(sect233k1); ++ SPCF_CPARAM_CASE(sect233r1); ++ SPCF_CPARAM_CASE(sect239k1); ++ SPCF_CPARAM_CASE(sect283k1); ++ SPCF_CPARAM_CASE(sect283r1); ++ SPCF_CPARAM_CASE(sect409k1); ++ SPCF_CPARAM_CASE(sect409r1); ++ SPCF_CPARAM_CASE(sect571k1); ++ SPCF_CPARAM_CASE(sect571r1); ++ SPCF_CPARAM_CASE(X9_62_c2pnb163v1); ++ SPCF_CPARAM_CASE(X9_62_c2pnb163v2); ++ SPCF_CPARAM_CASE(X9_62_c2pnb163v3); ++ SPCF_CPARAM_CASE(X9_62_c2pnb176v1); ++ SPCF_CPARAM_CASE(X9_62_c2tnb191v1); ++ SPCF_CPARAM_CASE(X9_62_c2tnb191v2); ++ SPCF_CPARAM_CASE(X9_62_c2tnb191v3); ++ SPCF_CPARAM_CASE(X9_62_c2pnb208w1); ++ SPCF_CPARAM_CASE(X9_62_c2tnb239v1); ++ SPCF_CPARAM_CASE(X9_62_c2tnb239v2); ++ SPCF_CPARAM_CASE(X9_62_c2tnb239v3); ++ SPCF_CPARAM_CASE(X9_62_c2pnb272w1); ++ SPCF_CPARAM_CASE(X9_62_c2pnb304w1); ++ SPCF_CPARAM_CASE(X9_62_c2tnb359v1); ++ SPCF_CPARAM_CASE(X9_62_c2pnb368w1); ++ SPCF_CPARAM_CASE(X9_62_c2tnb431r1); ++ SPCF_CPARAM_CASE(wap_wsg_idm_ecid_wtls1); ++ SPCF_CPARAM_CASE(wap_wsg_idm_ecid_wtls3); ++ SPCF_CPARAM_CASE(wap_wsg_idm_ecid_wtls4); ++ SPCF_CPARAM_CASE(wap_wsg_idm_ecid_wtls5); ++ SPCF_CPARAM_CASE(wap_wsg_idm_ecid_wtls10); ++ SPCF_CPARAM_CASE(wap_wsg_idm_ecid_wtls11); ++ /* Oakley curve #3 over 155 bit binary filed */ ++ SPCF_CPARAM_CASE(ipsec3); ++ /* Oakley curve #4 over 185 bit binary filed */ ++ SPCF_CPARAM_CASE(ipsec4); ++ default: ++ ret = -EINVAL; ++ break; ++ } ++ return ret; ++} ++ ++/* Copies the curve points to a flat buffer with appropriate padding */ ++static inline unsigned char *eng_copy_curve_points(BIGNUM * x, BIGNUM * y, ++ int xy_len, int crv_len) ++{ ++ unsigned char *xy = NULL; ++ int len1 = 0, len2 = 0; ++ ++ len1 = BN_num_bytes(x); ++ len2 = BN_num_bytes(y); ++ ++ if (!(xy = malloc(xy_len))) { ++ return NULL; ++ } ++ ++ memset(xy, 0, xy_len); ++ ++ if (len1 < crv_len) { ++ if (!BN_is_zero(x)) ++ BN_bn2bin(x, xy + (crv_len - len1)); ++ } else { ++ BN_bn2bin(x, xy); ++ } ++ ++ if (len2 < crv_len) { ++ if (!BN_is_zero(y)) ++ BN_bn2bin(y, xy+crv_len+(crv_len-len2)); ++ } else { ++ BN_bn2bin(y, xy+crv_len); ++ } ++ ++ return xy; ++} ++ ++enum curve_t { ++ DISCRETE_LOG, ++ ECC_PRIME, ++ ECC_BINARY, ++ MAX_ECC_TYPE ++}; ++#endif +-- +1.7.9.7 + diff --git a/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0003-add-support-for-TLS-algorithms-offload.patch b/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0003-add-support-for-TLS-algorithms-offload.patch new file mode 100644 index 00000000..dd99ca9f --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0003-add-support-for-TLS-algorithms-offload.patch @@ -0,0 +1,296 @@ +From 1a8886909afc7e4c9e8539644c815baee8ee4816 Mon Sep 17 00:00:00 2001 +From: Cristian Stoica +Date: Thu, 29 Aug 2013 16:51:18 +0300 +Subject: [PATCH][fsl 03/15] add support for TLS algorithms offload + +Upstream-status: Pending + +Requires TLS patches on cryptodev and TLS algorithm support in Linux +kernel driver. + +Signed-off-by: Cristian Stoica +--- + crypto/engine/eng_cryptodev.c | 204 ++++++++++++++++++++++++++++++++++++++--- + 1 file changed, 193 insertions(+), 11 deletions(-) + +diff --git a/crypto/engine/eng_cryptodev.c b/crypto/engine/eng_cryptodev.c +index 5a715ac..123613d 100644 +--- a/crypto/engine/eng_cryptodev.c ++++ b/crypto/engine/eng_cryptodev.c +@@ -72,6 +72,9 @@ ENGINE_load_cryptodev(void) + struct dev_crypto_state { + struct session_op d_sess; + int d_fd; ++ unsigned char *aad; ++ unsigned int aad_len; ++ unsigned int len; + + #ifdef USE_CRYPTODEV_DIGESTS + char dummy_mac_key[HASH_MAX_LEN]; +@@ -140,17 +143,19 @@ static struct { + int nid; + int ivmax; + int keylen; ++ int mackeylen; + } ciphers[] = { +- { CRYPTO_ARC4, NID_rc4, 0, 16, }, +- { CRYPTO_DES_CBC, NID_des_cbc, 8, 8, }, +- { CRYPTO_3DES_CBC, NID_des_ede3_cbc, 8, 24, }, +- { CRYPTO_AES_CBC, NID_aes_128_cbc, 16, 16, }, +- { CRYPTO_AES_CBC, NID_aes_192_cbc, 16, 24, }, +- { CRYPTO_AES_CBC, NID_aes_256_cbc, 16, 32, }, +- { CRYPTO_BLF_CBC, NID_bf_cbc, 8, 16, }, +- { CRYPTO_CAST_CBC, NID_cast5_cbc, 8, 16, }, +- { CRYPTO_SKIPJACK_CBC, NID_undef, 0, 0, }, +- { 0, NID_undef, 0, 0, }, ++ { CRYPTO_ARC4, NID_rc4, 0, 16, 0}, ++ { CRYPTO_DES_CBC, NID_des_cbc, 8, 8, 0}, ++ { CRYPTO_3DES_CBC, NID_des_ede3_cbc, 8, 24, 0}, ++ { CRYPTO_AES_CBC, NID_aes_128_cbc, 16, 16, 0}, ++ { CRYPTO_AES_CBC, NID_aes_192_cbc, 16, 24, 0}, ++ { CRYPTO_AES_CBC, NID_aes_256_cbc, 16, 32, 0}, ++ { CRYPTO_BLF_CBC, NID_bf_cbc, 8, 16, 0}, ++ { CRYPTO_CAST_CBC, NID_cast5_cbc, 8, 16, 0}, ++ { CRYPTO_SKIPJACK_CBC, NID_undef, 0, 0, 0}, ++ { CRYPTO_TLS10_AES_CBC_HMAC_SHA1, NID_aes_128_cbc_hmac_sha1, 16, 16, 20}, ++ { 0, NID_undef, 0, 0, 0}, + }; + + #ifdef USE_CRYPTODEV_DIGESTS +@@ -250,13 +255,15 @@ get_cryptodev_ciphers(const int **cnids) + } + memset(&sess, 0, sizeof(sess)); + sess.key = (caddr_t)"123456789abcdefghijklmno"; ++ sess.mackey = (caddr_t)"123456789ABCDEFGHIJKLMNO"; + + for (i = 0; ciphers[i].id && count < CRYPTO_ALGORITHM_MAX; i++) { + if (ciphers[i].nid == NID_undef) + continue; + sess.cipher = ciphers[i].id; + sess.keylen = ciphers[i].keylen; +- sess.mac = 0; ++ sess.mackeylen = ciphers[i].mackeylen; ++ + if (ioctl(fd, CIOCGSESSION, &sess) != -1 && + ioctl(fd, CIOCFSESSION, &sess.ses) != -1) + nids[count++] = ciphers[i].nid; +@@ -414,6 +421,67 @@ cryptodev_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, + return (1); + } + ++ ++static int cryptodev_aead_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, ++ const unsigned char *in, size_t len) ++{ ++ struct crypt_auth_op cryp; ++ struct dev_crypto_state *state = ctx->cipher_data; ++ struct session_op *sess = &state->d_sess; ++ const void *iiv; ++ unsigned char save_iv[EVP_MAX_IV_LENGTH]; ++ ++ if (state->d_fd < 0) ++ return (0); ++ if (!len) ++ return (1); ++ if ((len % ctx->cipher->block_size) != 0) ++ return (0); ++ ++ memset(&cryp, 0, sizeof(cryp)); ++ ++ /* TODO: make a seamless integration with cryptodev flags */ ++ switch (ctx->cipher->nid) { ++ case NID_aes_128_cbc_hmac_sha1: ++ cryp.flags = COP_FLAG_AEAD_TLS_TYPE; ++ } ++ cryp.ses = sess->ses; ++ cryp.len = state->len; ++ cryp.dst_len = len; ++ cryp.src = (caddr_t) in; ++ cryp.dst = (caddr_t) out; ++ cryp.auth_src = state->aad; ++ cryp.auth_len = state->aad_len; ++ ++ cryp.op = ctx->encrypt ? COP_ENCRYPT : COP_DECRYPT; ++ ++ if (ctx->cipher->iv_len) { ++ cryp.iv = (caddr_t) ctx->iv; ++ if (!ctx->encrypt) { ++ iiv = in + len - ctx->cipher->iv_len; ++ memcpy(save_iv, iiv, ctx->cipher->iv_len); ++ } ++ } else ++ cryp.iv = NULL; ++ ++ if (ioctl(state->d_fd, CIOCAUTHCRYPT, &cryp) == -1) { ++ /* XXX need better errror handling ++ * this can fail for a number of different reasons. ++ */ ++ return (0); ++ } ++ ++ if (ctx->cipher->iv_len) { ++ if (ctx->encrypt) ++ iiv = out + len - ctx->cipher->iv_len; ++ else ++ iiv = save_iv; ++ memcpy(ctx->iv, iiv, ctx->cipher->iv_len); ++ } ++ return (1); ++} ++ ++ + static int + cryptodev_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, + const unsigned char *iv, int enc) +@@ -452,6 +520,45 @@ cryptodev_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, + return (1); + } + ++/* Save the encryption key provided by upper layers. ++ * ++ * This function is called by EVP_CipherInit_ex to initialize the algorithm's ++ * extra data. We can't do much here because the mac key is not available. ++ * The next call should/will be to cryptodev_cbc_hmac_sha1_ctrl with parameter ++ * EVP_CTRL_AEAD_SET_MAC_KEY, to set the hmac key. There we call CIOCGSESSION ++ * with both the crypto and hmac keys. ++ */ ++static int cryptodev_init_aead_key(EVP_CIPHER_CTX *ctx, ++ const unsigned char *key, const unsigned char *iv, int enc) ++{ ++ struct dev_crypto_state *state = ctx->cipher_data; ++ struct session_op *sess = &state->d_sess; ++ int cipher = -1, i; ++ ++ for (i = 0; ciphers[i].id; i++) ++ if (ctx->cipher->nid == ciphers[i].nid && ++ ctx->cipher->iv_len <= ciphers[i].ivmax && ++ ctx->key_len == ciphers[i].keylen) { ++ cipher = ciphers[i].id; ++ break; ++ } ++ ++ if (!ciphers[i].id) { ++ state->d_fd = -1; ++ return (0); ++ } ++ ++ memset(sess, 0, sizeof(struct session_op)); ++ ++ sess->key = (caddr_t)key; ++ sess->keylen = ctx->key_len; ++ sess->cipher = cipher; ++ ++ /* for whatever reason, (1) means success */ ++ return (1); ++} ++ ++ + /* + * free anything we allocated earlier when initting a + * session, and close the session. +@@ -488,6 +595,63 @@ cryptodev_cleanup(EVP_CIPHER_CTX *ctx) + return (ret); + } + ++static int cryptodev_cbc_hmac_sha1_ctrl(EVP_CIPHER_CTX *ctx, int type, int arg, ++ void *ptr) ++{ ++ switch (type) { ++ case EVP_CTRL_AEAD_SET_MAC_KEY: ++ { ++ /* TODO: what happens with hmac keys larger than 64 bytes? */ ++ struct dev_crypto_state *state = ctx->cipher_data; ++ struct session_op *sess = &state->d_sess; ++ ++ if ((state->d_fd = get_dev_crypto()) < 0) ++ return (0); ++ ++ /* the rest should have been set in cryptodev_init_aead_key */ ++ sess->mackey = ptr; ++ sess->mackeylen = arg; ++ ++ if (ioctl(state->d_fd, CIOCGSESSION, sess) == -1) { ++ put_dev_crypto(state->d_fd); ++ state->d_fd = -1; ++ return (0); ++ } ++ return (1); ++ } ++ case EVP_CTRL_AEAD_TLS1_AAD: ++ { ++ /* ptr points to the associated data buffer of 13 bytes */ ++ struct dev_crypto_state *state = ctx->cipher_data; ++ unsigned char *p = ptr; ++ unsigned int cryptlen = p[arg - 2] << 8 | p[arg - 1]; ++ unsigned int maclen, padlen; ++ unsigned int bs = ctx->cipher->block_size; ++ int j; ++ ++ state->aad = ptr; ++ state->aad_len = arg; ++ state->len = cryptlen; ++ ++ /* TODO: this should be an extension of EVP_CIPHER struct */ ++ switch (ctx->cipher->nid) { ++ case NID_aes_128_cbc_hmac_sha1: ++ maclen = SHA_DIGEST_LENGTH; ++ } ++ ++ /* space required for encryption (not only TLS padding) */ ++ padlen = maclen; ++ if (ctx->encrypt) { ++ cryptlen += maclen; ++ padlen += bs - (cryptlen % bs); ++ } ++ return padlen; ++ } ++ default: ++ return -1; ++ } ++} ++ + /* + * libcrypto EVP stuff - this is how we get wired to EVP so the engine + * gets called when libcrypto requests a cipher NID. +@@ -600,6 +764,20 @@ const EVP_CIPHER cryptodev_aes_256_cbc = { + NULL + }; + ++const EVP_CIPHER cryptodev_aes_128_cbc_hmac_sha1 = { ++ NID_aes_128_cbc_hmac_sha1, ++ 16, 16, 16, ++ EVP_CIPH_CBC_MODE | EVP_CIPH_FLAG_AEAD_CIPHER, ++ cryptodev_init_aead_key, ++ cryptodev_aead_cipher, ++ cryptodev_cleanup, ++ sizeof(struct dev_crypto_state), ++ EVP_CIPHER_set_asn1_iv, ++ EVP_CIPHER_get_asn1_iv, ++ cryptodev_cbc_hmac_sha1_ctrl, ++ NULL ++}; ++ + /* + * Registered by the ENGINE when used to find out how to deal with + * a particular NID in the ENGINE. this says what we'll do at the +@@ -637,6 +815,9 @@ cryptodev_engine_ciphers(ENGINE *e, const EVP_CIPHER **cipher, + case NID_aes_256_cbc: + *cipher = &cryptodev_aes_256_cbc; + break; ++ case NID_aes_128_cbc_hmac_sha1: ++ *cipher = &cryptodev_aes_128_cbc_hmac_sha1; ++ break; + default: + *cipher = NULL; + break; +@@ -1384,6 +1565,7 @@ ENGINE_load_cryptodev(void) + } + put_dev_crypto(fd); + ++ EVP_add_cipher(&cryptodev_aes_128_cbc_hmac_sha1); + if (!ENGINE_set_id(engine, "cryptodev") || + !ENGINE_set_name(engine, "BSD cryptodev engine") || + !ENGINE_set_ciphers(engine, cryptodev_engine_ciphers) || +-- +1.7.9.7 + diff --git a/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0004-Fixed-private-key-support-for-DH.patch b/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0004-Fixed-private-key-support-for-DH.patch new file mode 100644 index 00000000..607f6035 --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0004-Fixed-private-key-support-for-DH.patch @@ -0,0 +1,33 @@ +From c994fa6c5eb9b684dd6aff45dd5e8eb98237c31e Mon Sep 17 00:00:00 2001 +From: Yashpal Dutta +Date: Tue, 11 Mar 2014 05:57:47 +0545 +Subject: [PATCH][fsl 04/15] Fixed private key support for DH + +Upstream-status: Pending + +Signed-off-by: Yashpal Dutta +--- + crypto/dh/dh_ameth.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/crypto/dh/dh_ameth.c b/crypto/dh/dh_ameth.c +index 02ec2d4..ed32004 100644 +--- a/crypto/dh/dh_ameth.c ++++ b/crypto/dh/dh_ameth.c +@@ -422,6 +422,13 @@ static int dh_copy_parameters(EVP_PKEY *to, const EVP_PKEY *from) + if (to->pkey.dh->g != NULL) + BN_free(to->pkey.dh->g); + to->pkey.dh->g=a; ++ if ((a=BN_dup(from->pkey.dh->q)) != NULL) { ++ if (to->pkey.dh->q != NULL) ++ BN_free(to->pkey.dh->q); ++ to->pkey.dh->q=a; ++ } ++ ++ to->pkey.dh->length = from->pkey.dh->length; + + return 1; + } +-- +1.7.9.7 + diff --git a/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0005-Fixed-private-key-support-for-DH.patch b/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0005-Fixed-private-key-support-for-DH.patch new file mode 100644 index 00000000..06dff881 --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0005-Fixed-private-key-support-for-DH.patch @@ -0,0 +1,35 @@ +From 408bdb2a3971edd6a949f5a93bd44d0a6f3eb823 Mon Sep 17 00:00:00 2001 +From: Yashpal Dutta +Date: Thu, 20 Mar 2014 19:55:51 -0500 +Subject: [PATCH][fsl 05/15] Fixed private key support for DH + +Upstream-status: Pending + +Required Length of the DH result is not returned in dh method in openssl + +Tested-by: Yashpal Dutta +--- + crypto/dh/dh_ameth.c | 7 ------- + 1 file changed, 7 deletions(-) + +diff --git a/crypto/dh/dh_ameth.c b/crypto/dh/dh_ameth.c +index ed32004..02ec2d4 100644 +--- a/crypto/dh/dh_ameth.c ++++ b/crypto/dh/dh_ameth.c +@@ -422,13 +422,6 @@ static int dh_copy_parameters(EVP_PKEY *to, const EVP_PKEY *from) + if (to->pkey.dh->g != NULL) + BN_free(to->pkey.dh->g); + to->pkey.dh->g=a; +- if ((a=BN_dup(from->pkey.dh->q)) != NULL) { +- if (to->pkey.dh->q != NULL) +- BN_free(to->pkey.dh->q); +- to->pkey.dh->q=a; +- } +- +- to->pkey.dh->length = from->pkey.dh->length; + + return 1; + } +-- +1.7.9.7 + diff --git a/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0006-Initial-support-for-PKC-in-cryptodev-engine.patch b/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0006-Initial-support-for-PKC-in-cryptodev-engine.patch new file mode 100644 index 00000000..b5ac55db --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0006-Initial-support-for-PKC-in-cryptodev-engine.patch @@ -0,0 +1,1563 @@ +From 8e9a39aab2fce48c117460eb1d14bcc02be6de6c Mon Sep 17 00:00:00 2001 +From: Yashpal Dutta +Date: Tue, 11 Mar 2014 06:29:52 +0545 +Subject: [PATCH][fsl 06/15] Initial support for PKC in cryptodev engine + +Upstream-status: Pending + +Signed-off-by: Yashpal Dutta +--- + crypto/engine/eng_cryptodev.c | 1343 ++++++++++++++++++++++++++++++++++++----- + 1 file changed, 1183 insertions(+), 160 deletions(-) + +diff --git a/crypto/engine/eng_cryptodev.c b/crypto/engine/eng_cryptodev.c +index 123613d..88caec1 100644 +--- a/crypto/engine/eng_cryptodev.c ++++ b/crypto/engine/eng_cryptodev.c +@@ -54,11 +54,14 @@ ENGINE_load_cryptodev(void) + #else + + #include +-#include + #include + #include + #include + #include ++#include ++#include ++#include ++#include + #include + #include + #include +@@ -68,6 +71,8 @@ ENGINE_load_cryptodev(void) + #include + #include + #include ++#include "eng_cryptodev_ec.h" ++#include + + struct dev_crypto_state { + struct session_op d_sess; +@@ -116,24 +121,112 @@ static int cryptodev_bn_mod_exp(BIGNUM *r, const BIGNUM *a, + static int cryptodev_rsa_nocrt_mod_exp(BIGNUM *r0, const BIGNUM *I, + RSA *rsa, BN_CTX *ctx); + static int cryptodev_rsa_mod_exp(BIGNUM *r0, const BIGNUM *I, RSA *rsa, BN_CTX *ctx); +-static int cryptodev_dsa_bn_mod_exp(DSA *dsa, BIGNUM *r, BIGNUM *a, +- const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx); +-static int cryptodev_dsa_dsa_mod_exp(DSA *dsa, BIGNUM *t1, BIGNUM *g, +- BIGNUM *u1, BIGNUM *pub_key, BIGNUM *u2, BIGNUM *p, +- BN_CTX *ctx, BN_MONT_CTX *mont); + static DSA_SIG *cryptodev_dsa_do_sign(const unsigned char *dgst, + int dlen, DSA *dsa); + static int cryptodev_dsa_verify(const unsigned char *dgst, int dgst_len, + DSA_SIG *sig, DSA *dsa); +-static int cryptodev_mod_exp_dh(const DH *dh, BIGNUM *r, const BIGNUM *a, +- const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx, +- BN_MONT_CTX *m_ctx); + static int cryptodev_dh_compute_key(unsigned char *key, + const BIGNUM *pub_key, DH *dh); + static int cryptodev_ctrl(ENGINE *e, int cmd, long i, void *p, + void (*f)(void)); + void ENGINE_load_cryptodev(void); + ++inline int spcf_bn2bin(BIGNUM *bn, unsigned char **bin, int *bin_len) ++{ ++ int len; ++ unsigned char *p; ++ ++ len = BN_num_bytes(bn); ++ ++ if (!len) ++ return -1; ++ ++ p = malloc(len); ++ if (!p) ++ return -1; ++ ++ BN_bn2bin(bn,p); ++ ++ *bin = p; ++ *bin_len = len; ++ ++ return 0; ++} ++ ++inline int spcf_bn2bin_ex(BIGNUM *bn, unsigned char **bin, int *bin_len) ++{ ++ int len; ++ unsigned char *p; ++ ++ len = BN_num_bytes(bn); ++ ++ if (!len) ++ return -1; ++ ++ if (len < *bin_len) ++ p = malloc(*bin_len); ++ else ++ p = malloc(len); ++ ++ if (!p) ++ return -ENOMEM; ++ ++ if (len < *bin_len) { ++ /* place padding */ ++ memset(p, 0, (*bin_len - len)); ++ BN_bn2bin(bn,p+(*bin_len-len)); ++ } else { ++ BN_bn2bin(bn,p); ++ } ++ ++ *bin = p; ++ if (len >= *bin_len) ++ *bin_len = len; ++ ++ return 0; ++} ++ ++/** ++ * Convert an ECC F2m 'b' parameter into the 'c' parameter. ++ *Inputs: ++ * q, the curve's modulus ++ * b, the curve's b parameter ++ * (a bignum for b, a buffer for c) ++ * Output: ++ * c, written into bin, right-adjusted to fill q_len bytes. ++ */ ++static int ++eng_ec_compute_cparam(const BIGNUM* b, const BIGNUM* q, ++ unsigned char **bin, int *bin_len) ++{ ++ BIGNUM* c = BN_new(); ++ BIGNUM* exp = BN_new(); ++ BN_CTX *ctx = BN_CTX_new(); ++ int m = BN_num_bits(q) - 1; ++ int ok = 0; ++ ++ if (!c || !exp || !ctx || *bin) ++ goto err; ++ ++ /* ++ * We have to compute c, where b = c^4, i.e., the fourth root of b. ++ * The equation for c is c = b^(2^(m-2)) ++ * Compute exp = 2^(m-2) ++ * (1 << x) == 2^x ++ * and then compute c = b^exp ++ */ ++ BN_lshift(exp, BN_value_one(), m-2); ++ BN_GF2m_mod_exp(c, b, exp, q, ctx); ++ /* Store c */ ++ spcf_bn2bin_ex(c, bin, bin_len); ++ ok = 1; ++err: ++ if (ctx) BN_CTX_free(ctx); ++ if (c) BN_free(c); ++ if (exp) BN_free(exp); ++ return ok; ++} ++ + static const ENGINE_CMD_DEFN cryptodev_defns[] = { + { 0, NULL, NULL, 0 } + }; +@@ -1106,7 +1199,6 @@ cryptodev_engine_digests(ENGINE *e, const EVP_MD **digest, + static int + bn2crparam(const BIGNUM *a, struct crparam *crp) + { +- int i, j, k; + ssize_t bytes, bits; + u_char *b; + +@@ -1123,15 +1215,7 @@ bn2crparam(const BIGNUM *a, struct crparam *crp) + + crp->crp_p = (caddr_t) b; + crp->crp_nbits = bits; +- +- for (i = 0, j = 0; i < a->top; i++) { +- for (k = 0; k < BN_BITS2 / 8; k++) { +- if ((j + k) >= bytes) +- return (0); +- b[j + k] = a->d[i] >> (k * 8); +- } +- j += BN_BITS2 / 8; +- } ++ BN_bn2bin(a, crp->crp_p); + return (0); + } + +@@ -1139,22 +1223,14 @@ bn2crparam(const BIGNUM *a, struct crparam *crp) + static int + crparam2bn(struct crparam *crp, BIGNUM *a) + { +- u_int8_t *pd; +- int i, bytes; ++ int bytes; + + bytes = (crp->crp_nbits + 7) / 8; + + if (bytes == 0) + return (-1); + +- if ((pd = (u_int8_t *) malloc(bytes)) == NULL) +- return (-1); +- +- for (i = 0; i < bytes; i++) +- pd[i] = crp->crp_p[bytes - i - 1]; +- +- BN_bin2bn(pd, bytes, a); +- free(pd); ++ BN_bin2bn(crp->crp_p, bytes, a); + + return (0); + } +@@ -1202,6 +1278,32 @@ cryptodev_asym(struct crypt_kop *kop, int rlen, BIGNUM *r, int slen, BIGNUM *s) + return (ret); + } + ++/* Close an opened instance of cryptodev engine */ ++void cryptodev_close_instance(void *handle) ++{ ++ int fd; ++ ++ if (handle) { ++ fd = *(int *)handle; ++ close(fd); ++ free(handle); ++ } ++} ++ ++/* Create an instance of cryptodev for asynchronous interface */ ++void *cryptodev_init_instance(void) ++{ ++ int *fd = malloc(sizeof(int)); ++ ++ if (fd) { ++ if ((*fd = open("/dev/crypto", O_RDWR, 0)) == -1) { ++ free(fd); ++ return NULL; ++ } ++ } ++ return fd; ++} ++ + static int + cryptodev_bn_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, + const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *in_mont) +@@ -1217,9 +1319,9 @@ cryptodev_bn_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, + return (ret); + } + +- memset(&kop, 0, sizeof kop); + kop.crk_op = CRK_MOD_EXP; +- ++ kop.crk_oparams = 0; ++ kop.crk_status = 0; + /* inputs: a^p % m */ + if (bn2crparam(a, &kop.crk_param[0])) + goto err; +@@ -1260,28 +1362,38 @@ static int + cryptodev_rsa_mod_exp(BIGNUM *r0, const BIGNUM *I, RSA *rsa, BN_CTX *ctx) + { + struct crypt_kop kop; +- int ret = 1; ++ int ret = 1, f_len, p_len, q_len; ++ unsigned char *f = NULL, *p = NULL, *q = NULL, *dp = NULL, *dq = NULL, *c = NULL; + + if (!rsa->p || !rsa->q || !rsa->dmp1 || !rsa->dmq1 || !rsa->iqmp) { + /* XXX 0 means failure?? */ + return (0); + } + +- memset(&kop, 0, sizeof kop); ++ kop.crk_oparams = 0; ++ kop.crk_status = 0; + kop.crk_op = CRK_MOD_EXP_CRT; ++ f_len = BN_num_bytes(rsa->n); ++ spcf_bn2bin_ex(I, &f, &f_len); ++ spcf_bn2bin(rsa->p, &p, &p_len); ++ spcf_bn2bin(rsa->q, &q, &q_len); ++ spcf_bn2bin_ex(rsa->dmp1, &dp, &p_len); ++ spcf_bn2bin_ex(rsa->iqmp, &c, &p_len); ++ spcf_bn2bin_ex(rsa->dmq1, &dq, &q_len); + /* inputs: rsa->p rsa->q I rsa->dmp1 rsa->dmq1 rsa->iqmp */ +- if (bn2crparam(rsa->p, &kop.crk_param[0])) +- goto err; +- if (bn2crparam(rsa->q, &kop.crk_param[1])) +- goto err; +- if (bn2crparam(I, &kop.crk_param[2])) +- goto err; +- if (bn2crparam(rsa->dmp1, &kop.crk_param[3])) +- goto err; +- if (bn2crparam(rsa->dmq1, &kop.crk_param[4])) +- goto err; +- if (bn2crparam(rsa->iqmp, &kop.crk_param[5])) +- goto err; ++ kop.crk_param[0].crp_p = p; ++ kop.crk_param[0].crp_nbits = p_len * 8; ++ kop.crk_param[1].crp_p = q; ++ kop.crk_param[1].crp_nbits = q_len * 8; ++ kop.crk_param[2].crp_p = f; ++ kop.crk_param[2].crp_nbits = f_len * 8; ++ kop.crk_param[3].crp_p = dp; ++ kop.crk_param[3].crp_nbits = p_len * 8; ++ /* dq must of length q, rest all of length p*/ ++ kop.crk_param[4].crp_p = dq; ++ kop.crk_param[4].crp_nbits = q_len * 8; ++ kop.crk_param[5].crp_p = c; ++ kop.crk_param[5].crp_nbits = p_len * 8; + kop.crk_iparams = 6; + + if (cryptodev_asym(&kop, BN_num_bytes(rsa->n), r0, 0, NULL)) { +@@ -1317,90 +1429,117 @@ static RSA_METHOD cryptodev_rsa = { + NULL /* rsa_verify */ + }; + +-static int +-cryptodev_dsa_bn_mod_exp(DSA *dsa, BIGNUM *r, BIGNUM *a, const BIGNUM *p, +- const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx) +-{ +- return (cryptodev_bn_mod_exp(r, a, p, m, ctx, m_ctx)); +-} +- +-static int +-cryptodev_dsa_dsa_mod_exp(DSA *dsa, BIGNUM *t1, BIGNUM *g, +- BIGNUM *u1, BIGNUM *pub_key, BIGNUM *u2, BIGNUM *p, +- BN_CTX *ctx, BN_MONT_CTX *mont) ++static DSA_SIG * ++cryptodev_dsa_do_sign(const unsigned char *dgst, int dlen, DSA *dsa) + { +- BIGNUM t2; +- int ret = 0; +- +- BN_init(&t2); +- +- /* v = ( g^u1 * y^u2 mod p ) mod q */ +- /* let t1 = g ^ u1 mod p */ +- ret = 0; ++ struct crypt_kop kop; ++ BIGNUM *c = NULL, *d = NULL; ++ DSA_SIG *dsaret = NULL; ++ int q_len = 0, r_len = 0, g_len = 0; ++ int priv_key_len = 0, ret; ++ unsigned char *q = NULL, *r = NULL, *g = NULL, *priv_key = NULL, *f = NULL; + +- if (!dsa->meth->bn_mod_exp(dsa,t1,dsa->g,u1,dsa->p,ctx,mont)) ++ memset(&kop, 0, sizeof kop); ++ if ((c = BN_new()) == NULL) { ++ DSAerr(DSA_F_DSA_DO_SIGN, ERR_R_MALLOC_FAILURE); + goto err; ++ } + +- /* let t2 = y ^ u2 mod p */ +- if (!dsa->meth->bn_mod_exp(dsa,&t2,dsa->pub_key,u2,dsa->p,ctx,mont)) ++ if ((d = BN_new()) == NULL) { ++ BN_free(c); ++ DSAerr(DSA_F_DSA_DO_SIGN, ERR_R_MALLOC_FAILURE); + goto err; +- /* let u1 = t1 * t2 mod p */ +- if (!BN_mod_mul(u1,t1,&t2,dsa->p,ctx)) ++ } ++ ++ if (spcf_bn2bin(dsa->p, &q, &q_len)) { ++ DSAerr(DSA_F_DSA_DO_SIGN, DSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE); + goto err; ++ } + +- BN_copy(t1,u1); ++ /* Get order of the field of private keys into plain buffer */ ++ if (spcf_bn2bin (dsa->q, &r, &r_len)) { ++ DSAerr(DSA_F_DSA_DO_SIGN, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } + +- ret = 1; +-err: +- BN_free(&t2); +- return(ret); +-} ++ /* sanity test */ ++ if (dlen > r_len) { ++ DSAerr(DSA_F_DSA_DO_SIGN, DSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE); ++ goto err; ++ } + +-static DSA_SIG * +-cryptodev_dsa_do_sign(const unsigned char *dgst, int dlen, DSA *dsa) +-{ +- struct crypt_kop kop; +- BIGNUM *r = NULL, *s = NULL; +- DSA_SIG *dsaret = NULL; ++ g_len = q_len; ++ /** ++ * Get generator into a plain buffer. If length is less than ++ * q_len then add leading padding bytes. ++ */ ++ if (spcf_bn2bin_ex(dsa->g, &g, &g_len)) { ++ DSAerr(DSA_F_DSA_DO_SIGN, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } + +- if ((r = BN_new()) == NULL) ++ priv_key_len = r_len; ++ /** ++ * Get private key into a plain buffer. If length is less than ++ * r_len then add leading padding bytes. ++ */ ++ if (spcf_bn2bin_ex(dsa->priv_key, &priv_key, &priv_key_len)) { ++ DSAerr(DSA_F_DSA_DO_SIGN, ERR_R_MALLOC_FAILURE); + goto err; +- if ((s = BN_new()) == NULL) { +- BN_free(r); ++ } ++ ++ /* Allocate memory to store hash. */ ++ f = OPENSSL_malloc (r_len); ++ if (!f) { ++ DSAerr(DSA_F_DSA_DO_SIGN, ERR_R_MALLOC_FAILURE); + goto err; + } + +- memset(&kop, 0, sizeof kop); ++ /* Add padding, since SEC expects hash to of size r_len */ ++ if (dlen < r_len) ++ memset(f, 0, r_len - dlen); ++ ++ /* Skip leading bytes if dgst_len < r_len */ ++ memcpy(f + r_len - dlen, dgst, dlen); ++ + kop.crk_op = CRK_DSA_SIGN; + + /* inputs: dgst dsa->p dsa->q dsa->g dsa->priv_key */ +- kop.crk_param[0].crp_p = (caddr_t)dgst; +- kop.crk_param[0].crp_nbits = dlen * 8; +- if (bn2crparam(dsa->p, &kop.crk_param[1])) +- goto err; +- if (bn2crparam(dsa->q, &kop.crk_param[2])) +- goto err; +- if (bn2crparam(dsa->g, &kop.crk_param[3])) +- goto err; +- if (bn2crparam(dsa->priv_key, &kop.crk_param[4])) +- goto err; ++ kop.crk_param[0].crp_p = (void*)f; ++ kop.crk_param[0].crp_nbits = r_len * 8; ++ kop.crk_param[1].crp_p = (void*)q; ++ kop.crk_param[1].crp_nbits = q_len * 8; ++ kop.crk_param[2].crp_p = (void*)r; ++ kop.crk_param[2].crp_nbits = r_len * 8; ++ kop.crk_param[3].crp_p = (void*)g; ++ kop.crk_param[3].crp_nbits = g_len * 8; ++ kop.crk_param[4].crp_p = (void*)priv_key; ++ kop.crk_param[4].crp_nbits = priv_key_len * 8; + kop.crk_iparams = 5; + +- if (cryptodev_asym(&kop, BN_num_bytes(dsa->q), r, +- BN_num_bytes(dsa->q), s) == 0) { +- dsaret = DSA_SIG_new(); +- dsaret->r = r; +- dsaret->s = s; +- } else { +- const DSA_METHOD *meth = DSA_OpenSSL(); +- BN_free(r); +- BN_free(s); +- dsaret = (meth->dsa_do_sign)(dgst, dlen, dsa); ++ ret = cryptodev_asym(&kop, r_len, c, r_len, d); ++ ++ if (ret) { ++ DSAerr(DSA_F_DSA_DO_SIGN, DSA_R_DECODE_ERROR); ++ goto err; + } +-err: +- kop.crk_param[0].crp_p = NULL; ++ ++ dsaret = DSA_SIG_new(); ++ dsaret->r = c; ++ dsaret->s = d; ++ + zapparams(&kop); + return (dsaret); ++err: ++ { ++ const DSA_METHOD *meth = DSA_OpenSSL(); ++ if (c) ++ BN_free(c); ++ if (d) ++ BN_free(d); ++ dsaret = (meth->dsa_do_sign)(dgst, dlen, dsa); ++ return (dsaret); ++ } + } + + static int +@@ -1408,42 +1547,179 @@ cryptodev_dsa_verify(const unsigned char *dgst, int dlen, + DSA_SIG *sig, DSA *dsa) + { + struct crypt_kop kop; +- int dsaret = 1; ++ int dsaret = 1, q_len = 0, r_len = 0, g_len = 0; ++ int w_len = 0 ,c_len = 0, d_len = 0, ret = -1; ++ unsigned char * q = NULL, * r = NULL, * w = NULL, * g = NULL; ++ unsigned char * c = NULL, * d = NULL, *f = NULL; + + memset(&kop, 0, sizeof kop); + kop.crk_op = CRK_DSA_VERIFY; + +- /* inputs: dgst dsa->p dsa->q dsa->g dsa->pub_key sig->r sig->s */ +- kop.crk_param[0].crp_p = (caddr_t)dgst; +- kop.crk_param[0].crp_nbits = dlen * 8; +- if (bn2crparam(dsa->p, &kop.crk_param[1])) ++ if (spcf_bn2bin(dsa->p, &q, &q_len)) { ++ DSAerr(DSA_F_DSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); ++ return ret; ++ } ++ ++ /* Get Order of field of private keys */ ++ if (spcf_bn2bin(dsa->q, &r, &r_len)) { ++ DSAerr(DSA_F_DSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); + goto err; +- if (bn2crparam(dsa->q, &kop.crk_param[2])) ++ } ++ ++ g_len = q_len; ++ /** ++ * Get generator into a plain buffer. If length is less than ++ * q_len then add leading padding bytes. ++ */ ++ if (spcf_bn2bin_ex(dsa->g, &g, &g_len)) { ++ DSAerr(DSA_F_DSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); + goto err; +- if (bn2crparam(dsa->g, &kop.crk_param[3])) ++ } ++ w_len = q_len; ++ /** ++ * Get public key into a plain buffer. If length is less than ++ * q_len then add leading padding bytes. ++ */ ++ if (spcf_bn2bin_ex(dsa->pub_key, &w, &w_len)) { ++ DSAerr(DSA_F_DSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ /** ++ * Get the 1st part of signature into a flat buffer with ++ * appropriate padding ++ */ ++ c_len = r_len; ++ ++ if (spcf_bn2bin_ex(sig->r, &c, &c_len)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); + goto err; +- if (bn2crparam(dsa->pub_key, &kop.crk_param[4])) ++ } ++ ++ /** ++ * Get the 2nd part of signature into a flat buffer with ++ * appropriate padding ++ */ ++ d_len = r_len; ++ ++ if (spcf_bn2bin_ex(sig->s, &d, &d_len)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); + goto err; +- if (bn2crparam(sig->r, &kop.crk_param[5])) ++ } ++ ++ ++ /* Sanity test */ ++ if (dlen > r_len) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); + goto err; +- if (bn2crparam(sig->s, &kop.crk_param[6])) ++ } ++ ++ /* Allocate memory to store hash. */ ++ f = OPENSSL_malloc (r_len); ++ if (!f) { ++ DSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); + goto err; ++ } ++ ++ /* Add padding, since SEC expects hash to of size r_len */ ++ if (dlen < r_len) ++ memset(f, 0, r_len - dlen); ++ ++ /* Skip leading bytes if dgst_len < r_len */ ++ memcpy(f + r_len - dlen, dgst, dlen); ++ ++ /* inputs: dgst dsa->p dsa->q dsa->g dsa->pub_key sig->r sig->s */ ++ kop.crk_param[0].crp_p = (void*)f; ++ kop.crk_param[0].crp_nbits = r_len * 8; ++ kop.crk_param[1].crp_p = q; ++ kop.crk_param[1].crp_nbits = q_len * 8; ++ kop.crk_param[2].crp_p = r; ++ kop.crk_param[2].crp_nbits = r_len * 8; ++ kop.crk_param[3].crp_p = g; ++ kop.crk_param[3].crp_nbits = g_len * 8; ++ kop.crk_param[4].crp_p = w; ++ kop.crk_param[4].crp_nbits = w_len * 8; ++ kop.crk_param[5].crp_p = c; ++ kop.crk_param[5].crp_nbits = c_len * 8; ++ kop.crk_param[6].crp_p = d; ++ kop.crk_param[6].crp_nbits = d_len * 8; + kop.crk_iparams = 7; + +- if (cryptodev_asym(&kop, 0, NULL, 0, NULL) == 0) { +-/*OCF success value is 0, if not zero, change dsaret to fail*/ +- if(0 != kop.crk_status) dsaret = 0; +- } else { +- const DSA_METHOD *meth = DSA_OpenSSL(); ++ if ((cryptodev_asym(&kop, 0, NULL, 0, NULL))) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, DSA_R_DECODE_ERROR); ++ goto err; ++ } + +- dsaret = (meth->dsa_do_verify)(dgst, dlen, sig, dsa); ++ /*OCF success value is 0, if not zero, change dsaret to fail*/ ++ if(0 != kop.crk_status) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, DSA_R_DECODE_ERROR); ++ goto err; + } +-err: +- kop.crk_param[0].crp_p = NULL; ++ + zapparams(&kop); + return (dsaret); ++err: ++ { ++ const DSA_METHOD *meth = DSA_OpenSSL(); ++ ++ dsaret = (meth->dsa_do_verify)(dgst, dlen, sig, dsa); ++ } ++ return dsaret; + } + ++/* Cryptodev DSA Key Gen routine */ ++static int cryptodev_dsa_keygen(DSA *dsa) ++{ ++ struct crypt_kop kop; ++ int ret = 1, g_len; ++ unsigned char *g = NULL; ++ ++ if (dsa->priv_key == NULL) { ++ if ((dsa->priv_key=BN_new()) == NULL) ++ goto sw_try; ++ } ++ ++ if (dsa->pub_key == NULL) { ++ if ((dsa->pub_key=BN_new()) == NULL) ++ goto sw_try; ++ } ++ ++ g_len = BN_num_bytes(dsa->p); ++ /** ++ * Get generator into a plain buffer. If length is less than ++ * p_len then add leading padding bytes. ++ */ ++ if (spcf_bn2bin_ex(dsa->g, &g, &g_len)) { ++ DSAerr(DSA_F_DSA_GENERATE_KEY, ERR_R_MALLOC_FAILURE); ++ goto sw_try; ++ } ++ ++ memset(&kop, 0, sizeof kop); ++ ++ kop.crk_op = CRK_DSA_GENERATE_KEY; ++ if (bn2crparam(dsa->p, &kop.crk_param[0])) ++ goto sw_try; ++ if (bn2crparam(dsa->q, &kop.crk_param[1])) ++ goto sw_try; ++ kop.crk_param[2].crp_p = g; ++ kop.crk_param[2].crp_nbits = g_len * 8; ++ kop.crk_iparams = 3; ++ ++ /* pub_key is or prime length while priv key is of length of order */ ++ if (cryptodev_asym(&kop, BN_num_bytes(dsa->p), dsa->pub_key, ++ BN_num_bytes(dsa->q), dsa->priv_key)) ++ goto sw_try; ++ ++ return ret; ++sw_try: ++ { ++ const DSA_METHOD *meth = DSA_OpenSSL(); ++ ret = (meth->dsa_keygen)(dsa); ++ } ++ return ret; ++} ++ ++ ++ + static DSA_METHOD cryptodev_dsa = { + "cryptodev DSA method", + NULL, +@@ -1457,12 +1733,543 @@ static DSA_METHOD cryptodev_dsa = { + NULL /* app_data */ + }; + +-static int +-cryptodev_mod_exp_dh(const DH *dh, BIGNUM *r, const BIGNUM *a, +- const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx, +- BN_MONT_CTX *m_ctx) ++static ECDSA_METHOD cryptodev_ecdsa = { ++ "cryptodev ECDSA method", ++ NULL, ++ NULL, /* ecdsa_sign_setup */ ++ NULL, ++ NULL, ++ 0, /* flags */ ++ NULL /* app_data */ ++}; ++ ++typedef enum ec_curve_s ++{ ++ EC_PRIME, ++ EC_BINARY ++} ec_curve_t; ++ ++/* ENGINE handler for ECDSA Sign */ ++static ECDSA_SIG *cryptodev_ecdsa_do_sign( const unsigned char *dgst, ++ int dgst_len, const BIGNUM *in_kinv, const BIGNUM *in_r, EC_KEY *eckey) + { +- return (cryptodev_bn_mod_exp(r, a, p, m, ctx, m_ctx)); ++ BIGNUM *m = NULL, *p = NULL, *a = NULL; ++ BIGNUM *b = NULL, *x = NULL, *y = NULL; ++ BN_CTX *ctx = NULL; ++ ECDSA_SIG *ret = NULL; ++ ECDSA_DATA *ecdsa = NULL; ++ unsigned char * q = NULL, *r = NULL, *ab = NULL, *g_xy = NULL; ++ unsigned char * s = NULL, *c = NULL, *d = NULL, *f = NULL, *tmp_dgst = NULL; ++ int i = 0, q_len = 0, priv_key_len = 0, r_len = 0; ++ int g_len = 0, d_len = 0, ab_len = 0; ++ const BIGNUM *order = NULL, *priv_key=NULL; ++ const EC_GROUP *group = NULL; ++ struct crypt_kop kop; ++ ec_curve_t ec_crv = EC_PRIME; ++ ++ memset(&kop, 0, sizeof(kop)); ++ ecdsa = ecdsa_check(eckey); ++ if (!ecdsa) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_PASSED_NULL_PARAMETER); ++ return NULL; ++ } ++ ++ group = EC_KEY_get0_group(eckey); ++ priv_key = EC_KEY_get0_private_key(eckey); ++ ++ if (!group || !priv_key) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_PASSED_NULL_PARAMETER); ++ return NULL; ++ } ++ ++ if ((ctx = BN_CTX_new()) == NULL || (m = BN_new()) == NULL || ++ (a = BN_new()) == NULL || (b = BN_new()) == NULL || ++ (p = BN_new()) == NULL || (x = BN_new()) == NULL || ++ (y = BN_new()) == NULL) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ ++ order = &group->order; ++ if (!order || BN_is_zero(order)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ECDSA_R_MISSING_PARAMETERS); ++ goto err; ++ } ++ ++ i = BN_num_bits(order); ++ /* Need to truncate digest if it is too long: first truncate whole ++ bytes */ ++ if (8 * dgst_len > i) ++ dgst_len = (i + 7)/8; ++ ++ if (!BN_bin2bn(dgst, dgst_len, m)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_BN_LIB); ++ goto err; ++ } ++ ++ /* If still too long truncate remaining bits with a shift */ ++ if ((8 * dgst_len > i) && !BN_rshift(m, m, 8 - (i & 0x7))) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_BN_LIB); ++ goto err; ++ } ++ ++ /* copy the truncated bits into plain buffer */ ++ if (spcf_bn2bin(m, &tmp_dgst, &dgst_len)) { ++ fprintf(stderr, "%s:%d: OPENSSL_malloc failec\n", __FUNCTION__, __LINE__); ++ goto err; ++ } ++ ++ ret = ECDSA_SIG_new(); ++ if (!ret) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_BN_LIB); ++ goto err; ++ } ++ ++ /* check if this is prime or binary EC request */ ++ if (EC_METHOD_get_field_type(EC_GROUP_method_of(group)) == NID_X9_62_prime_field) { ++ ec_crv = EC_PRIME; ++ /* get the generator point pair */ ++ if (!EC_POINT_get_affine_coordinates_GFp (group, EC_GROUP_get0_generator(group), ++ x, y,ctx)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_EC_LIB); ++ goto err; ++ } ++ ++ /* get the ECC curve parameters */ ++ if (!EC_GROUP_get_curve_GFp(group, p, a, b , ctx)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_EC_LIB); ++ goto err; ++ } ++ } else if (EC_METHOD_get_field_type(EC_GROUP_method_of(group)) == NID_X9_62_characteristic_two_field) { ++ ec_crv = EC_BINARY; ++ /* get the ECC curve parameters */ ++ if (!EC_GROUP_get_curve_GF2m(group, p, a, b , ctx)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_EC_LIB); ++ goto err; ++ } ++ ++ /* get the generator point pair */ ++ if (!EC_POINT_get_affine_coordinates_GF2m(group, ++ EC_GROUP_get0_generator(group), x, y,ctx)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_EC_LIB); ++ goto err; ++ } ++ } else { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_EC_LIB); ++ goto err; ++ } ++ ++ if (spcf_bn2bin(order, &r, &r_len)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ ++ if (spcf_bn2bin(p, &q, &q_len)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ ++ priv_key_len = r_len; ++ ++ /** ++ * If BN_num_bytes of priv_key returns less then r_len then ++ * add padding bytes before the key ++ */ ++ if (spcf_bn2bin_ex(priv_key, &s, &priv_key_len)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ ++ /* Generation of ECC curve parameters */ ++ ab_len = 2*q_len; ++ ab = eng_copy_curve_points(a, b, ab_len, q_len); ++ if (!ab) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ ++ if (ec_crv == EC_BINARY) { ++ if (eng_ec_get_cparam(EC_GROUP_get_curve_name(group), ab+q_len, q_len)) ++ { ++ unsigned char *c_temp = NULL; ++ int c_temp_len = q_len; ++ if (eng_ec_compute_cparam(b, p, &c_temp, &c_temp_len)) ++ memcpy(ab+q_len, c_temp, q_len); ++ else ++ goto err; ++ } ++ kop.curve_type = ECC_BINARY; ++ } ++ ++ /* Calculation of Generator point */ ++ g_len = 2*q_len; ++ g_xy = eng_copy_curve_points(x, y, g_len, q_len); ++ if (!g_xy) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ ++ /* Memory allocation for first part of digital signature */ ++ c = malloc(r_len); ++ if (!c) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ ++ d_len = r_len; ++ ++ /* Memory allocation for second part of digital signature */ ++ d = malloc(d_len); ++ if (!d) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ ++ /* memory for message representative */ ++ f = malloc(r_len); ++ if (!f) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ ++ /* Add padding, since SEC expects hash to of size r_len */ ++ memset(f, 0, r_len - dgst_len); ++ ++ /* Skip leading bytes if dgst_len < r_len */ ++ memcpy(f + r_len - dgst_len, tmp_dgst, dgst_len); ++ ++ dgst_len += r_len - dgst_len; ++ kop.crk_op = CRK_DSA_SIGN; ++ /* inputs: dgst dsa->p dsa->q dsa->g dsa->priv_key */ ++ kop.crk_param[0].crp_p = f; ++ kop.crk_param[0].crp_nbits = dgst_len * 8; ++ kop.crk_param[1].crp_p = q; ++ kop.crk_param[1].crp_nbits = q_len * 8; ++ kop.crk_param[2].crp_p = r; ++ kop.crk_param[2].crp_nbits = r_len * 8; ++ kop.crk_param[3].crp_p = g_xy; ++ kop.crk_param[3].crp_nbits = g_len * 8; ++ kop.crk_param[4].crp_p = s; ++ kop.crk_param[4].crp_nbits = priv_key_len * 8; ++ kop.crk_param[5].crp_p = ab; ++ kop.crk_param[5].crp_nbits = ab_len * 8; ++ kop.crk_iparams = 6; ++ kop.crk_param[6].crp_p = c; ++ kop.crk_param[6].crp_nbits = d_len * 8; ++ kop.crk_param[7].crp_p = d; ++ kop.crk_param[7].crp_nbits = d_len * 8; ++ kop.crk_oparams = 2; ++ ++ if (cryptodev_asym(&kop, 0, NULL, 0, NULL) == 0) { ++ /* Check if ret->r and s needs to allocated */ ++ crparam2bn(&kop.crk_param[6], ret->r); ++ crparam2bn(&kop.crk_param[7], ret->s); ++ } else { ++ const ECDSA_METHOD *meth = ECDSA_OpenSSL(); ++ ret = (meth->ecdsa_do_sign)(dgst, dgst_len, in_kinv, in_r, eckey); ++ } ++ kop.crk_param[0].crp_p = NULL; ++ zapparams(&kop); ++err: ++ if (!ret) { ++ ECDSA_SIG_free(ret); ++ ret = NULL; ++ } ++ return ret; ++} ++ ++static int cryptodev_ecdsa_verify(const unsigned char *dgst, int dgst_len, ++ ECDSA_SIG *sig, EC_KEY *eckey) ++{ ++ BIGNUM *m = NULL, *p = NULL, *a = NULL, *b = NULL; ++ BIGNUM *x = NULL, *y = NULL, *w_x = NULL, *w_y = NULL; ++ BN_CTX *ctx = NULL; ++ ECDSA_DATA *ecdsa = NULL; ++ unsigned char *q = NULL, *r = NULL, *ab = NULL, *g_xy = NULL, *w_xy = NULL; ++ unsigned char *c = NULL, *d = NULL, *f = NULL, *tmp_dgst = NULL; ++ int i = 0, q_len = 0, pub_key_len = 0, r_len = 0, c_len = 0, g_len = 0; ++ int d_len = 0, ab_len = 0, ret = -1; ++ const EC_POINT *pub_key = NULL; ++ const BIGNUM *order = NULL; ++ const EC_GROUP *group=NULL; ++ ec_curve_t ec_crv = EC_PRIME; ++ struct crypt_kop kop; ++ ++ memset(&kop, 0, sizeof kop); ++ ecdsa = ecdsa_check(eckey); ++ if (!ecdsa) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_PASSED_NULL_PARAMETER); ++ return ret; ++ } ++ ++ group = EC_KEY_get0_group(eckey); ++ pub_key = EC_KEY_get0_public_key(eckey); ++ ++ if (!group || !pub_key) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_PASSED_NULL_PARAMETER); ++ return ret; ++ } ++ ++ if ((ctx = BN_CTX_new()) == NULL || (m = BN_new()) == NULL || ++ (a = BN_new()) == NULL || (b = BN_new()) == NULL || ++ (p = BN_new()) == NULL || (x = BN_new()) == NULL || ++ (y = BN_new()) == NULL || (w_x = BN_new()) == NULL || ++ (w_y = BN_new()) == NULL) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ ++ order = &group->order; ++ if (!order || BN_is_zero(order)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ECDSA_R_MISSING_PARAMETERS); ++ goto err; ++ } ++ ++ i = BN_num_bits(order); ++ /* Need to truncate digest if it is too long: first truncate whole ++ * bytes */ ++ if (8 * dgst_len > i) ++ dgst_len = (i + 7)/8; ++ ++ if (!BN_bin2bn(dgst, dgst_len, m)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_BN_LIB); ++ goto err; ++ } ++ ++ /* If still too long truncate remaining bits with a shift */ ++ if ((8 * dgst_len > i) && !BN_rshift(m, m, 8 - (i & 0x7))) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_BN_LIB); ++ goto err; ++ } ++ /* copy the truncated bits into plain buffer */ ++ if (spcf_bn2bin(m, &tmp_dgst, &dgst_len)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ ++ /* check if this is prime or binary EC request */ ++ if (EC_METHOD_get_field_type(EC_GROUP_method_of(group)) == NID_X9_62_prime_field) { ++ ec_crv = EC_PRIME; ++ ++ /* get the generator point pair */ ++ if (!EC_POINT_get_affine_coordinates_GFp (group, ++ EC_GROUP_get0_generator(group), x, y,ctx)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_EC_LIB); ++ goto err; ++ } ++ ++ /* get the public key pair for prime curve */ ++ if (!EC_POINT_get_affine_coordinates_GFp (group, ++ pub_key, w_x, w_y,ctx)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_EC_LIB); ++ goto err; ++ } ++ ++ /* get the ECC curve parameters */ ++ if (!EC_GROUP_get_curve_GFp(group, p, a, b, ctx)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_EC_LIB); ++ goto err; ++ } ++ } else if (EC_METHOD_get_field_type(EC_GROUP_method_of(group)) == NID_X9_62_characteristic_two_field){ ++ ec_crv = EC_BINARY; ++ /* get the ECC curve parameters */ ++ if (!EC_GROUP_get_curve_GF2m(group, p, a, b , ctx)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_EC_LIB); ++ goto err; ++ } ++ ++ /* get the generator point pair */ ++ if (!EC_POINT_get_affine_coordinates_GF2m(group, ++ EC_GROUP_get0_generator(group),x, y,ctx)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_EC_LIB); ++ goto err; ++ } ++ ++ /* get the public key pair for binary curve */ ++ if (!EC_POINT_get_affine_coordinates_GF2m(group, ++ pub_key, w_x, w_y,ctx)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_EC_LIB); ++ goto err; ++ } ++ }else { ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_EC_LIB); ++ goto err; ++ } ++ ++ /* Get the order of the subgroup of private keys */ ++ if (spcf_bn2bin((BIGNUM*)order, &r, &r_len)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ ++ /* Get the irreducible polynomial that creates the field */ ++ if (spcf_bn2bin(p, &q, &q_len)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ ++ /* Get the public key into a flat buffer with appropriate padding */ ++ pub_key_len = 2 * q_len; ++ ++ w_xy = eng_copy_curve_points (w_x, w_y, pub_key_len, q_len); ++ if (!w_xy) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ ++ /* Generation of ECC curve parameters */ ++ ab_len = 2*q_len; ++ ++ ab = eng_copy_curve_points (a, b, ab_len, q_len); ++ if (!ab) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ ++ if (ec_crv == EC_BINARY) { ++ /* copy b' i.e c(b), instead of only b */ ++ if (eng_ec_get_cparam(EC_GROUP_get_curve_name(group), ab+q_len, q_len)) ++ { ++ unsigned char *c_temp = NULL; ++ int c_temp_len = q_len; ++ if (eng_ec_compute_cparam(b, p, &c_temp, &c_temp_len)) ++ memcpy(ab+q_len, c_temp, q_len); ++ else ++ goto err; ++ } ++ kop.curve_type = ECC_BINARY; ++ } ++ ++ /* Calculation of Generator point */ ++ g_len = 2 * q_len; ++ ++ g_xy = eng_copy_curve_points (x, y, g_len, q_len); ++ if (!g_xy) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ ++ /** ++ * Get the 1st part of signature into a flat buffer with ++ * appropriate padding ++ */ ++ if (BN_num_bytes(sig->r) < r_len) ++ c_len = r_len; ++ ++ if (spcf_bn2bin_ex(sig->r, &c, &c_len)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ ++ /** ++ * Get the 2nd part of signature into a flat buffer with ++ * appropriate padding ++ */ ++ if (BN_num_bytes(sig->s) < r_len) ++ d_len = r_len; ++ ++ if (spcf_bn2bin_ex(sig->s, &d, &d_len)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ ++ /* memory for message representative */ ++ f = malloc(r_len); ++ if (!f) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ ++ /* Add padding, since SEC expects hash to of size r_len */ ++ memset(f, 0, r_len-dgst_len); ++ ++ /* Skip leading bytes if dgst_len < r_len */ ++ memcpy(f + r_len-dgst_len, tmp_dgst, dgst_len); ++ dgst_len += r_len-dgst_len; ++ kop.crk_op = CRK_DSA_VERIFY; ++ /* inputs: dgst dsa->p dsa->q dsa->g dsa->priv_key */ ++ kop.crk_param[0].crp_p = f; ++ kop.crk_param[0].crp_nbits = dgst_len * 8; ++ kop.crk_param[1].crp_p = q; ++ kop.crk_param[1].crp_nbits = q_len * 8; ++ kop.crk_param[2].crp_p = r; ++ kop.crk_param[2].crp_nbits = r_len * 8; ++ kop.crk_param[3].crp_p = g_xy; ++ kop.crk_param[3].crp_nbits = g_len * 8; ++ kop.crk_param[4].crp_p = w_xy; ++ kop.crk_param[4].crp_nbits = pub_key_len * 8; ++ kop.crk_param[5].crp_p = ab; ++ kop.crk_param[5].crp_nbits = ab_len * 8; ++ kop.crk_param[6].crp_p = c; ++ kop.crk_param[6].crp_nbits = d_len * 8; ++ kop.crk_param[7].crp_p = d; ++ kop.crk_param[7].crp_nbits = d_len * 8; ++ kop.crk_iparams = 8; ++ ++ if (cryptodev_asym(&kop, 0, NULL, 0, NULL) == 0) { ++ /*OCF success value is 0, if not zero, change ret to fail*/ ++ if(0 == kop.crk_status) ++ ret = 1; ++ } else { ++ const ECDSA_METHOD *meth = ECDSA_OpenSSL(); ++ ++ ret = (meth->ecdsa_do_verify)(dgst, dgst_len, sig, eckey); ++ } ++ kop.crk_param[0].crp_p = NULL; ++ zapparams(&kop); ++ ++err: ++ return ret; ++} ++ ++static int cryptodev_dh_keygen(DH *dh) ++{ ++ struct crypt_kop kop; ++ int ret = 1, g_len; ++ unsigned char *g = NULL; ++ ++ if (dh->priv_key == NULL) { ++ if ((dh->priv_key=BN_new()) == NULL) ++ goto sw_try; ++ } ++ ++ if (dh->pub_key == NULL) { ++ if ((dh->pub_key=BN_new()) == NULL) ++ goto sw_try; ++ } ++ ++ g_len = BN_num_bytes(dh->p); ++ /** ++ * Get generator into a plain buffer. If length is less than ++ * q_len then add leading padding bytes. ++ */ ++ if (spcf_bn2bin_ex(dh->g, &g, &g_len)) { ++ DSAerr(DH_F_DH_GENERATE_KEY, ERR_R_MALLOC_FAILURE); ++ goto sw_try; ++ } ++ ++ memset(&kop, 0, sizeof kop); ++ kop.crk_op = CRK_DH_GENERATE_KEY; ++ if (bn2crparam(dh->p, &kop.crk_param[0])) ++ goto sw_try; ++ if (bn2crparam(dh->q, &kop.crk_param[1])) ++ goto sw_try; ++ kop.crk_param[2].crp_p = g; ++ kop.crk_param[2].crp_nbits = g_len * 8; ++ kop.crk_iparams = 3; ++ ++ /* pub_key is or prime length while priv key is of length of order */ ++ if (cryptodev_asym(&kop, BN_num_bytes(dh->p), dh->pub_key, ++ BN_num_bytes(dh->q), dh->priv_key)) ++ goto sw_try; ++ ++ return ret; ++sw_try: ++ { ++ const DH_METHOD *meth = DH_OpenSSL(); ++ ret = (meth->generate_key)(dh); ++ } ++ return ret; + } + + static int +@@ -1470,43 +2277,234 @@ cryptodev_dh_compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh) + { + struct crypt_kop kop; + int dhret = 1; +- int fd, keylen; ++ int fd, p_len; ++ BIGNUM *temp = NULL; ++ unsigned char *padded_pub_key = NULL, *p = NULL; ++ ++ if ((fd = get_asym_dev_crypto()) < 0) ++ goto sw_try; ++ ++ memset(&kop, 0, sizeof kop); ++ kop.crk_op = CRK_DH_COMPUTE_KEY; ++ /* inputs: dh->priv_key pub_key dh->p key */ ++ spcf_bn2bin(dh->p, &p, &p_len); ++ spcf_bn2bin_ex(pub_key, &padded_pub_key, &p_len); ++ if (bn2crparam(dh->priv_key, &kop.crk_param[0])) ++ goto sw_try; ++ ++ kop.crk_param[1].crp_p = padded_pub_key; ++ kop.crk_param[1].crp_nbits = p_len * 8; ++ kop.crk_param[2].crp_p = p; ++ kop.crk_param[2].crp_nbits = p_len * 8; ++ kop.crk_iparams = 3; ++ kop.crk_param[3].crp_p = (void*) key; ++ kop.crk_param[3].crp_nbits = p_len * 8; ++ kop.crk_oparams = 1; ++ dhret = p_len; ++ ++ if (ioctl(fd, CIOCKEY, &kop)) ++ goto sw_try; + +- if ((fd = get_asym_dev_crypto()) < 0) { ++ if ((temp = BN_new())) { ++ if (!BN_bin2bn(key, p_len, temp)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_BN_LIB); ++ goto sw_try; ++ } ++ if (dhret > BN_num_bytes(temp)) ++ dhret=BN_bn2bin(temp,key); ++ BN_free(temp); ++ } ++ ++ kop.crk_param[3].crp_p = NULL; ++ zapparams(&kop); ++ return (dhret); ++sw_try: ++ { + const DH_METHOD *meth = DH_OpenSSL(); + +- return ((meth->compute_key)(key, pub_key, dh)); ++ dhret = (meth->compute_key)(key, pub_key, dh); + } ++ return (dhret); ++} + +- keylen = BN_num_bits(dh->p); ++int cryptodev_ecdh_compute_key(void *out, size_t outlen, ++ const EC_POINT *pub_key, EC_KEY *ecdh, void *(*KDF)(const void *in, size_t inlen, ++ void *out, size_t *outlen)) ++{ ++ ec_curve_t ec_crv = EC_PRIME; ++ unsigned char * q = NULL, *w_xy = NULL, *ab = NULL, *s = NULL, *r = NULL; ++ BIGNUM * w_x = NULL, *w_y = NULL; ++ int q_len = 0, ab_len = 0, pub_key_len = 0, r_len = 0, priv_key_len = 0; ++ BIGNUM * p = NULL, *a = NULL, *b = NULL; ++ BN_CTX *ctx; ++ EC_POINT *tmp=NULL; ++ BIGNUM *x=NULL, *y=NULL; ++ const BIGNUM *priv_key; ++ const EC_GROUP* group = NULL; ++ int ret = -1; ++ size_t buflen, len; ++ struct crypt_kop kop; + + memset(&kop, 0, sizeof kop); +- kop.crk_op = CRK_DH_COMPUTE_KEY; + +- /* inputs: dh->priv_key pub_key dh->p key */ +- if (bn2crparam(dh->priv_key, &kop.crk_param[0])) ++ if ((ctx = BN_CTX_new()) == NULL) goto err; ++ BN_CTX_start(ctx); ++ x = BN_CTX_get(ctx); ++ y = BN_CTX_get(ctx); ++ p = BN_CTX_get(ctx); ++ a = BN_CTX_get(ctx); ++ b = BN_CTX_get(ctx); ++ w_x = BN_CTX_get(ctx); ++ w_y = BN_CTX_get(ctx); ++ ++ if (!x || !y || !p || !a || !b || !w_x || !w_y) { ++ ECDHerr(ECDH_F_ECDH_COMPUTE_KEY,ERR_R_MALLOC_FAILURE); + goto err; +- if (bn2crparam(pub_key, &kop.crk_param[1])) ++ } ++ ++ priv_key = EC_KEY_get0_private_key(ecdh); ++ if (priv_key == NULL) { ++ ECDHerr(ECDH_F_ECDH_COMPUTE_KEY,ECDH_R_NO_PRIVATE_VALUE); + goto err; +- if (bn2crparam(dh->p, &kop.crk_param[2])) ++ } ++ ++ group = EC_KEY_get0_group(ecdh); ++ if ((tmp=EC_POINT_new(group)) == NULL) { ++ ECDHerr(ECDH_F_ECDH_COMPUTE_KEY,ERR_R_MALLOC_FAILURE); + goto err; +- kop.crk_iparams = 3; ++ } + +- kop.crk_param[3].crp_p = (caddr_t) key; +- kop.crk_param[3].crp_nbits = keylen * 8; +- kop.crk_oparams = 1; ++ if (EC_METHOD_get_field_type(EC_GROUP_method_of(group)) == ++ NID_X9_62_prime_field) { ++ ec_crv = EC_PRIME; + +- if (ioctl(fd, CIOCKEY, &kop) == -1) { +- const DH_METHOD *meth = DH_OpenSSL(); ++ if (!EC_POINT_get_affine_coordinates_GFp(group, ++ EC_GROUP_get0_generator(group), x, y, ctx)) { ++ ECDHerr(ECDH_F_ECDH_COMPUTE_KEY,ECDH_R_POINT_ARITHMETIC_FAILURE); ++ goto err; ++ } + +- dhret = (meth->compute_key)(key, pub_key, dh); ++ /* get the ECC curve parameters */ ++ if (!EC_GROUP_get_curve_GFp(group, p, a, b, ctx)) { ++ ECDHerr(ECDH_F_ECDH_COMPUTE_KEY,ERR_R_BN_LIB); ++ goto err; ++ } ++ ++ /* get the public key pair for prime curve */ ++ if (!EC_POINT_get_affine_coordinates_GFp (group, pub_key, w_x, w_y,ctx)) { ++ ECDHerr(ECDH_F_ECDH_COMPUTE_KEY,ERR_R_BN_LIB); ++ goto err; ++ } ++ } else { ++ ec_crv = EC_BINARY; ++ ++ if (!EC_POINT_get_affine_coordinates_GF2m(group, ++ EC_GROUP_get0_generator(group), x, y, ctx)) { ++ ECDHerr(ECDH_F_ECDH_COMPUTE_KEY,ECDH_R_POINT_ARITHMETIC_FAILURE); ++ goto err; ++ } ++ ++ /* get the ECC curve parameters */ ++ if (!EC_GROUP_get_curve_GF2m(group, p, a, b , ctx)) { ++ ECDHerr(ECDH_F_ECDH_COMPUTE_KEY,ERR_R_BN_LIB); ++ goto err; ++ } ++ ++ /* get the public key pair for binary curve */ ++ if (!EC_POINT_get_affine_coordinates_GF2m(group, ++ pub_key, w_x, w_y,ctx)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_EC_LIB); ++ goto err; ++ } ++ } ++ ++ /* irreducible polynomial that creates the field */ ++ if (spcf_bn2bin((BIGNUM*)&group->order, &r, &r_len)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ ++ /* Get the irreducible polynomial that creates the field */ ++ if (spcf_bn2bin(p, &q, &q_len)) { ++ ECDHerr(ECDH_F_ECDH_COMPUTE_KEY,ERR_R_BN_LIB); ++ goto err; + } ++ ++ /* Get the public key into a flat buffer with appropriate padding */ ++ pub_key_len = 2 * q_len; ++ w_xy = eng_copy_curve_points (w_x, w_y, pub_key_len, q_len); ++ if (!w_xy) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ ++ /* Generation of ECC curve parameters */ ++ ab_len = 2*q_len; ++ ab = eng_copy_curve_points (a, b, ab_len, q_len); ++ if (!ab) { ++ ECDHerr(ECDH_F_ECDH_COMPUTE_KEY,ERR_R_BN_LIB); ++ goto err; ++ } ++ ++ if (ec_crv == EC_BINARY) { ++ /* copy b' i.e c(b), instead of only b */ ++ if (eng_ec_get_cparam(EC_GROUP_get_curve_name(group), ab+q_len, q_len)) ++ { ++ unsigned char *c_temp = NULL; ++ int c_temp_len = q_len; ++ if (eng_ec_compute_cparam(b, p, &c_temp, &c_temp_len)) ++ memcpy(ab+q_len, c_temp, q_len); ++ else ++ goto err; ++ } ++ kop.curve_type = ECC_BINARY; ++ } else ++ kop.curve_type = ECC_PRIME; ++ ++ priv_key_len = r_len; ++ ++ /* ++ * If BN_num_bytes of priv_key returns less then r_len then ++ * add padding bytes before the key ++ */ ++ if (spcf_bn2bin_ex((BIGNUM *)priv_key, &s, &priv_key_len)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ ++ buflen = (EC_GROUP_get_degree(group) + 7)/8; ++ len = BN_num_bytes(x); ++ if (len > buflen || q_len < buflen) { ++ ECDHerr(ECDH_F_ECDH_COMPUTE_KEY,ERR_R_INTERNAL_ERROR); ++ goto err; ++ } ++ ++ kop.crk_op = CRK_DH_COMPUTE_KEY; ++ kop.crk_param[0].crp_p = (void*) s; ++ kop.crk_param[0].crp_nbits = priv_key_len*8; ++ kop.crk_param[1].crp_p = (void*) w_xy; ++ kop.crk_param[1].crp_nbits = pub_key_len*8; ++ kop.crk_param[2].crp_p = (void*) q; ++ kop.crk_param[2].crp_nbits = q_len*8; ++ kop.crk_param[3].crp_p = (void*) ab; ++ kop.crk_param[3].crp_nbits = ab_len*8; ++ kop.crk_iparams = 4; ++ kop.crk_param[4].crp_p = (void*) out; ++ kop.crk_param[4].crp_nbits = q_len*8; ++ kop.crk_oparams = 1; ++ ret = q_len; ++ if (cryptodev_asym(&kop, 0, NULL, 0, NULL)) { ++ const ECDH_METHOD *meth = ECDH_OpenSSL(); ++ ret = (meth->compute_key)(out, outlen, pub_key, ecdh, KDF); ++ } else ++ ret = q_len; + err: +- kop.crk_param[3].crp_p = NULL; ++ kop.crk_param[4].crp_p = NULL; + zapparams(&kop); +- return (dhret); ++ return ret; + } + ++ + static DH_METHOD cryptodev_dh = { + "cryptodev DH method", + NULL, /* cryptodev_dh_generate_key */ +@@ -1518,6 +2516,14 @@ static DH_METHOD cryptodev_dh = { + NULL /* app_data */ + }; + ++static ECDH_METHOD cryptodev_ecdh = { ++ "cryptodev ECDH method", ++ NULL, /* cryptodev_ecdh_compute_key */ ++ NULL, ++ 0, /* flags */ ++ NULL /* app_data */ ++}; ++ + /* + * ctrl right now is just a wrapper that doesn't do much + * but I expect we'll want some options soon. +@@ -1602,25 +2608,42 @@ ENGINE_load_cryptodev(void) + memcpy(&cryptodev_dsa, meth, sizeof(DSA_METHOD)); + if (cryptodev_asymfeat & CRF_DSA_SIGN) + cryptodev_dsa.dsa_do_sign = cryptodev_dsa_do_sign; +- if (cryptodev_asymfeat & CRF_MOD_EXP) { +- cryptodev_dsa.bn_mod_exp = cryptodev_dsa_bn_mod_exp; +- cryptodev_dsa.dsa_mod_exp = cryptodev_dsa_dsa_mod_exp; +- } + if (cryptodev_asymfeat & CRF_DSA_VERIFY) + cryptodev_dsa.dsa_do_verify = cryptodev_dsa_verify; ++ if (cryptodev_asymfeat & CRF_DSA_GENERATE_KEY) ++ cryptodev_dsa.dsa_keygen = cryptodev_dsa_keygen; + } + + if (ENGINE_set_DH(engine, &cryptodev_dh)){ + const DH_METHOD *dh_meth = DH_OpenSSL(); ++ memcpy(&cryptodev_dh, dh_meth, sizeof(DH_METHOD)); ++ if (cryptodev_asymfeat & CRF_DH_COMPUTE_KEY) { ++ cryptodev_dh.compute_key = ++ cryptodev_dh_compute_key; ++ } ++ if (cryptodev_asymfeat & CRF_DH_GENERATE_KEY) { ++ cryptodev_dh.generate_key = ++ cryptodev_dh_keygen; ++ } ++ } + +- cryptodev_dh.generate_key = dh_meth->generate_key; +- cryptodev_dh.compute_key = dh_meth->compute_key; +- cryptodev_dh.bn_mod_exp = dh_meth->bn_mod_exp; +- if (cryptodev_asymfeat & CRF_MOD_EXP) { +- cryptodev_dh.bn_mod_exp = cryptodev_mod_exp_dh; +- if (cryptodev_asymfeat & CRF_DH_COMPUTE_KEY) +- cryptodev_dh.compute_key = +- cryptodev_dh_compute_key; ++ if (ENGINE_set_ECDSA(engine, &cryptodev_ecdsa)) { ++ const ECDSA_METHOD *meth = ECDSA_OpenSSL(); ++ memcpy(&cryptodev_ecdsa, meth, sizeof(ECDSA_METHOD)); ++ if (cryptodev_asymfeat & CRF_DSA_SIGN) { ++ cryptodev_ecdsa.ecdsa_do_sign = cryptodev_ecdsa_do_sign; ++ } ++ if (cryptodev_asymfeat & CRF_DSA_VERIFY) { ++ cryptodev_ecdsa.ecdsa_do_verify = ++ cryptodev_ecdsa_verify; ++ } ++ } ++ ++ if (ENGINE_set_ECDH(engine, &cryptodev_ecdh)) { ++ const ECDH_METHOD *ecdh_meth = ECDH_OpenSSL(); ++ memcpy(&cryptodev_ecdh, ecdh_meth, sizeof(ECDH_METHOD)); ++ if (cryptodev_asymfeat & CRF_DH_COMPUTE_KEY) { ++ cryptodev_ecdh.compute_key = cryptodev_ecdh_compute_key; + } + } + +-- +1.7.9.7 + diff --git a/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0007-Added-hwrng-dev-file-as-source-of-RNG.patch b/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0007-Added-hwrng-dev-file-as-source-of-RNG.patch new file mode 100644 index 00000000..afe9f7cf --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0007-Added-hwrng-dev-file-as-source-of-RNG.patch @@ -0,0 +1,28 @@ +From 6ee6f7acad9824244b32ac23248f1d12f2c2b201 Mon Sep 17 00:00:00 2001 +From: Yashpal Dutta +Date: Tue, 11 Mar 2014 06:42:59 +0545 +Subject: [PATCH][fsl 07/15] Added hwrng dev file as source of RNG + +Upstream-status: Pending + +Signed-off-by: Yashpal Dutta +--- + e_os.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/e_os.h b/e_os.h +index 6a0aad1..57c0563 100644 +--- a/e_os.h ++++ b/e_os.h +@@ -79,7 +79,7 @@ extern "C" { + #ifndef DEVRANDOM + /* set this to a comma-separated list of 'random' device files to try out. + * My default, we will try to read at least one of these files */ +-#define DEVRANDOM "/dev/urandom","/dev/random","/dev/srandom" ++#define DEVRANDOM "/dev/hwrng","/dev/urandom","/dev/random","/dev/srandom" + #endif + #ifndef DEVRANDOM_EGD + /* set this to a comma-seperated list of 'egd' sockets to try out. These +-- +1.7.9.7 + diff --git a/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0008-Asynchronous-interface-added-for-PKC-cryptodev-inter.patch b/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0008-Asynchronous-interface-added-for-PKC-cryptodev-inter.patch new file mode 100644 index 00000000..d8b5d952 --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0008-Asynchronous-interface-added-for-PKC-cryptodev-inter.patch @@ -0,0 +1,2039 @@ +From 68f8054c5a1f72e40884782d2d548892406d6049 Mon Sep 17 00:00:00 2001 +From: Yashpal Dutta +Date: Tue, 11 Mar 2014 07:14:30 +0545 +Subject: [PATCH][fsl 08/15] Asynchronous interface added for PKC cryptodev + interface + +Upstream-status: Pending + +Signed-off-by: Yashpal Dutta +--- + crypto/crypto.h | 16 + + crypto/dh/dh.h | 4 +- + crypto/dsa/dsa.h | 5 + + crypto/ecdh/ech_locl.h | 3 + + crypto/ecdsa/ecs_locl.h | 5 + + crypto/engine/eng_cryptodev.c | 1578 +++++++++++++++++++++++++++++++++++++---- + crypto/engine/eng_int.h | 24 +- + crypto/engine/eng_lib.c | 46 ++ + crypto/engine/engine.h | 24 + + crypto/rsa/rsa.h | 23 + + 10 files changed, 1582 insertions(+), 146 deletions(-) + +diff --git a/crypto/crypto.h b/crypto/crypto.h +index f92fc51..ce12731 100644 +--- a/crypto/crypto.h ++++ b/crypto/crypto.h +@@ -605,6 +605,22 @@ void ERR_load_CRYPTO_strings(void); + #define CRYPTO_R_FIPS_MODE_NOT_SUPPORTED 101 + #define CRYPTO_R_NO_DYNLOCK_CREATE_CALLBACK 100 + ++/* Additions for Asynchronous PKC Infrastructure */ ++struct pkc_cookie_s { ++ void *cookie; /* To be filled by openssl library primitive method function caller */ ++ void *eng_cookie; /* To be filled by Engine */ ++ /* ++ * Callback handler to be provided by caller. Ensure to pass a ++ * handler which takes the crypto operation to completion. ++ * cookie: Container cookie from library ++ * status: Status of the crypto Job completion. ++ * 0: Job handled without any issue ++ * -EINVAL: Parameters Invalid ++ */ ++ void (*pkc_callback)(struct pkc_cookie_s *cookie, int status); ++ void *eng_handle; ++}; ++ + #ifdef __cplusplus + } + #endif +diff --git a/crypto/dh/dh.h b/crypto/dh/dh.h +index ea59e61..20ffad2 100644 +--- a/crypto/dh/dh.h ++++ b/crypto/dh/dh.h +@@ -118,7 +118,9 @@ struct dh_method + int (*bn_mod_exp)(const DH *dh, BIGNUM *r, const BIGNUM *a, + const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx, + BN_MONT_CTX *m_ctx); /* Can be null */ +- ++ int (*compute_key_async)(unsigned char *key,const BIGNUM *pub_key,DH *dh, ++ struct pkc_cookie_s *cookie); ++ int (*generate_key_async)(DH *dh, struct pkc_cookie_s *cookie); + int (*init)(DH *dh); + int (*finish)(DH *dh); + int flags; +diff --git a/crypto/dsa/dsa.h b/crypto/dsa/dsa.h +index a6f6d0b..b04a029 100644 +--- a/crypto/dsa/dsa.h ++++ b/crypto/dsa/dsa.h +@@ -140,6 +140,10 @@ struct dsa_method + int (*bn_mod_exp)(DSA *dsa, BIGNUM *r, BIGNUM *a, const BIGNUM *p, + const BIGNUM *m, BN_CTX *ctx, + BN_MONT_CTX *m_ctx); /* Can be null */ ++ int (*dsa_do_sign_async)(const unsigned char *dgst, int dlen, DSA *dsa, ++ DSA_SIG *sig, struct pkc_cookie_s *cookie); ++ int (*dsa_do_verify_async)(const unsigned char *dgst, int dgst_len, ++ DSA_SIG *sig, DSA *dsa, struct pkc_cookie_s *cookie); + int (*init)(DSA *dsa); + int (*finish)(DSA *dsa); + int flags; +@@ -151,6 +155,7 @@ struct dsa_method + BN_GENCB *cb); + /* If this is non-NULL, it is used to generate DSA keys */ + int (*dsa_keygen)(DSA *dsa); ++ int (*dsa_keygen_async)(DSA *dsa, struct pkc_cookie_s *cookie); + }; + + struct dsa_st +diff --git a/crypto/ecdh/ech_locl.h b/crypto/ecdh/ech_locl.h +index f6cad6a..adce6b3 100644 +--- a/crypto/ecdh/ech_locl.h ++++ b/crypto/ecdh/ech_locl.h +@@ -67,6 +67,9 @@ struct ecdh_method + const char *name; + int (*compute_key)(void *key, size_t outlen, const EC_POINT *pub_key, EC_KEY *ecdh, + void *(*KDF)(const void *in, size_t inlen, void *out, size_t *outlen)); ++ int (*compute_key_async)(void *key, size_t outlen, const EC_POINT *pub_key, EC_KEY *ecdh, ++ void *(*KDF)(const void *in, size_t inlen, void *out, size_t *outlen), ++ struct pkc_cookie_s *cookie); + #if 0 + int (*init)(EC_KEY *eckey); + int (*finish)(EC_KEY *eckey); +diff --git a/crypto/ecdsa/ecs_locl.h b/crypto/ecdsa/ecs_locl.h +index cb3be13..eb0ebe0 100644 +--- a/crypto/ecdsa/ecs_locl.h ++++ b/crypto/ecdsa/ecs_locl.h +@@ -74,6 +74,11 @@ struct ecdsa_method + BIGNUM **r); + int (*ecdsa_do_verify)(const unsigned char *dgst, int dgst_len, + const ECDSA_SIG *sig, EC_KEY *eckey); ++ int (*ecdsa_do_sign_async)(const unsigned char *dgst, int dgst_len, ++ const BIGNUM *inv, const BIGNUM *rp, EC_KEY *eckey, ++ ECDSA_SIG *sig, struct pkc_cookie_s *cookie); ++ int (*ecdsa_do_verify_async)(const unsigned char *dgst, int dgst_len, ++ const ECDSA_SIG *sig, EC_KEY *eckey, struct pkc_cookie_s *cookie); + #if 0 + int (*init)(EC_KEY *eckey); + int (*finish)(EC_KEY *eckey); +diff --git a/crypto/engine/eng_cryptodev.c b/crypto/engine/eng_cryptodev.c +index 88caec1..c5e8fb3 100644 +--- a/crypto/engine/eng_cryptodev.c ++++ b/crypto/engine/eng_cryptodev.c +@@ -1248,6 +1248,56 @@ zapparams(struct crypt_kop *kop) + } + } + ++/* Any PKC request has at max 2 output parameters and they are stored here to ++be used while copying in the check availability */ ++struct cryptodev_cookie_s { ++ BIGNUM *r; ++ struct crparam r_param; ++ BIGNUM *s; ++ struct crparam s_param; ++ struct crypt_kop *kop; ++}; ++ ++static int ++cryptodev_asym_async(struct crypt_kop *kop, int rlen, BIGNUM *r, int slen, ++ BIGNUM *s) ++{ ++ int fd; ++ struct pkc_cookie_s *cookie = kop->cookie; ++ struct cryptodev_cookie_s *eng_cookie; ++ ++ fd = *(int *)cookie->eng_handle; ++ ++ eng_cookie = malloc(sizeof(struct cryptodev_cookie_s)); ++ ++ if (eng_cookie) { ++ memset(eng_cookie, 0, sizeof(struct cryptodev_cookie_s)); ++ if (r) { ++ kop->crk_param[kop->crk_iparams].crp_p = calloc(rlen, sizeof(char)); ++ if (!kop->crk_param[kop->crk_iparams].crp_p) ++ return -ENOMEM; ++ kop->crk_param[kop->crk_iparams].crp_nbits = rlen * 8; ++ kop->crk_oparams++; ++ eng_cookie->r = r; ++ eng_cookie->r_param = kop->crk_param[kop->crk_iparams]; ++ } ++ if (s) { ++ kop->crk_param[kop->crk_iparams+1].crp_p = calloc(slen, sizeof(char)); ++ if (!kop->crk_param[kop->crk_iparams+1].crp_p) ++ return -ENOMEM; ++ kop->crk_param[kop->crk_iparams+1].crp_nbits = slen * 8; ++ kop->crk_oparams++; ++ eng_cookie->s = s; ++ eng_cookie->s_param = kop->crk_param[kop->crk_iparams + 1]; ++ } ++ } else ++ return -ENOMEM; ++ ++ eng_cookie->kop = kop; ++ cookie->eng_cookie = eng_cookie; ++ return ioctl(fd, CIOCASYMASYNCRYPT, kop); ++} ++ + static int + cryptodev_asym(struct crypt_kop *kop, int rlen, BIGNUM *r, int slen, BIGNUM *s) + { +@@ -1304,6 +1354,44 @@ void *cryptodev_init_instance(void) + return fd; + } + ++#include ++ ++/* Return 0 on success and 1 on failure */ ++int cryptodev_check_availability(void *eng_handle) ++{ ++ int fd = *(int *)eng_handle; ++ struct pkc_cookie_list_s cookie_list; ++ struct pkc_cookie_s *cookie; ++ int i; ++ ++ /* FETCH COOKIE returns number of cookies extracted */ ++ if (ioctl(fd, CIOCASYMFETCHCOOKIE, &cookie_list) <= 0) ++ return 1; ++ ++ for (i = 0; i < cookie_list.cookie_available; i++) { ++ cookie = cookie_list.cookie[i]; ++ if (cookie) { ++ struct cryptodev_cookie_s *eng_cookie = cookie->eng_cookie; ++ if (eng_cookie) { ++ struct crypt_kop *kop = eng_cookie->kop; ++ ++ if (eng_cookie->r) ++ crparam2bn(&eng_cookie->r_param, eng_cookie->r); ++ if (eng_cookie->s) ++ crparam2bn(&eng_cookie->s_param, eng_cookie->s); ++ if (kop->crk_op == CRK_DH_COMPUTE_KEY) ++ kop->crk_oparams = 0; ++ ++ zapparams(eng_cookie->kop); ++ free(eng_cookie->kop); ++ free (eng_cookie); ++ } ++ cookie->pkc_callback(cookie, cookie_list.status[i]); ++ } ++ } ++ return 0; ++} ++ + static int + cryptodev_bn_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, + const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *in_mont) +@@ -1349,6 +1437,63 @@ err: + } + + static int ++cryptodev_bn_mod_exp_async(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, ++ const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *in_mont, struct pkc_cookie_s *cookie) ++{ ++ struct crypt_kop *kop = malloc(sizeof(struct crypt_kop)); ++ int ret = 1; ++ ++ /* Currently, we know we can do mod exp iff we can do any ++ * asymmetric operations at all. ++ */ ++ if (cryptodev_asymfeat == 0 || !kop) { ++ ret = BN_mod_exp(r, a, p, m, ctx); ++ return (ret); ++ } ++ ++ kop->crk_oparams = 0; ++ kop->crk_status = 0; ++ kop->crk_op = CRK_MOD_EXP; ++ kop->cookie = cookie; ++ /* inputs: a^p % m */ ++ if (bn2crparam(a, &kop->crk_param[0])) ++ goto err; ++ if (bn2crparam(p, &kop->crk_param[1])) ++ goto err; ++ if (bn2crparam(m, &kop->crk_param[2])) ++ goto err; ++ ++ kop->crk_iparams = 3; ++ if (cryptodev_asym_async(kop, BN_num_bytes(m), r, 0, NULL)) ++ goto err; ++ ++ return ret; ++err: ++ { ++ const RSA_METHOD *meth = RSA_PKCS1_SSLeay(); ++ ++ if (kop) ++ free(kop); ++ ret = meth->bn_mod_exp(r, a, p, m, ctx, in_mont); ++ if (ret) ++ /* Call the completion handler immediately */ ++ cookie->pkc_callback(cookie, 0); ++ } ++ return ret; ++} ++ ++static int ++cryptodev_rsa_nocrt_mod_exp_async(BIGNUM *r0, const BIGNUM *I, ++ RSA *rsa, BN_CTX *ctx, struct pkc_cookie_s *cookie) ++{ ++ int r; ++ ctx = BN_CTX_new(); ++ r = cryptodev_bn_mod_exp_async(r0, I, rsa->d, rsa->n, ctx, NULL, cookie); ++ BN_CTX_free(ctx); ++ return r; ++} ++ ++static int + cryptodev_rsa_nocrt_mod_exp(BIGNUM *r0, const BIGNUM *I, RSA *rsa, BN_CTX *ctx) + { + int r; +@@ -1413,6 +1558,62 @@ err: + return (ret); + } + ++static int ++cryptodev_rsa_mod_exp_async(BIGNUM *r0, const BIGNUM *I, RSA *rsa, BN_CTX *ctx, ++ struct pkc_cookie_s *cookie) ++{ ++ struct crypt_kop *kop = malloc(sizeof(struct crypt_kop)); ++ int ret = 1, f_len, p_len, q_len; ++ unsigned char *f = NULL, *p = NULL, *q = NULL, *dp = NULL, *dq = NULL, *c = NULL; ++ ++ if (!rsa->p || !rsa->q || !rsa->dmp1 || !rsa->dmq1 || !rsa->iqmp || !kop) { ++ return (0); ++ } ++ ++ kop->crk_oparams = 0; ++ kop->crk_status = 0; ++ kop->crk_op = CRK_MOD_EXP_CRT; ++ f_len = BN_num_bytes(rsa->n); ++ spcf_bn2bin_ex(I, &f, &f_len); ++ spcf_bn2bin(rsa->p, &p, &p_len); ++ spcf_bn2bin(rsa->q, &q, &q_len); ++ spcf_bn2bin_ex(rsa->dmp1, &dp, &p_len); ++ spcf_bn2bin_ex(rsa->iqmp, &c, &p_len); ++ spcf_bn2bin_ex(rsa->dmq1, &dq, &q_len); ++ /* inputs: rsa->p rsa->q I rsa->dmp1 rsa->dmq1 rsa->iqmp */ ++ kop->crk_param[0].crp_p = p; ++ kop->crk_param[0].crp_nbits = p_len * 8; ++ kop->crk_param[1].crp_p = q; ++ kop->crk_param[1].crp_nbits = q_len * 8; ++ kop->crk_param[2].crp_p = f; ++ kop->crk_param[2].crp_nbits = f_len * 8; ++ kop->crk_param[3].crp_p = dp; ++ kop->crk_param[3].crp_nbits = p_len * 8; ++ /* dq must of length q, rest all of length p*/ ++ kop->crk_param[4].crp_p = dq; ++ kop->crk_param[4].crp_nbits = q_len * 8; ++ kop->crk_param[5].crp_p = c; ++ kop->crk_param[5].crp_nbits = p_len * 8; ++ kop->crk_iparams = 6; ++ kop->cookie = cookie; ++ if (cryptodev_asym_async(kop, BN_num_bytes(rsa->n), r0, 0, NULL)) ++ goto err; ++ ++ return ret; ++err: ++ { ++ const RSA_METHOD *meth = RSA_PKCS1_SSLeay(); ++ ++ if (kop) ++ free(kop); ++ ret = (*meth->rsa_mod_exp)(r0, I, rsa, ctx); ++ if (ret) ++ /* Call user completion handler immediately */ ++ cookie->pkc_callback(cookie, 0); ++ } ++ return (ret); ++} ++ + static RSA_METHOD cryptodev_rsa = { + "cryptodev RSA method", + NULL, /* rsa_pub_enc */ +@@ -1421,6 +1622,12 @@ static RSA_METHOD cryptodev_rsa = { + NULL, /* rsa_priv_dec */ + NULL, + NULL, ++ NULL, /* rsa_pub_enc */ ++ NULL, /* rsa_pub_dec */ ++ NULL, /* rsa_priv_enc */ ++ NULL, /* rsa_priv_dec */ ++ NULL, ++ NULL, + NULL, /* init */ + NULL, /* finish */ + 0, /* flags */ +@@ -1718,126 +1925,424 @@ sw_try: + return ret; + } + ++/* Cryptodev DSA Key Gen routine */ ++static int cryptodev_dsa_keygen_async(DSA *dsa, struct pkc_cookie_s *cookie) ++{ ++ struct crypt_kop *kop = malloc(sizeof(struct crypt_kop)); ++ int ret = 1, g_len; ++ unsigned char *g = NULL; + ++ if (!kop) ++ goto sw_try; + +-static DSA_METHOD cryptodev_dsa = { +- "cryptodev DSA method", +- NULL, +- NULL, /* dsa_sign_setup */ +- NULL, +- NULL, /* dsa_mod_exp */ +- NULL, +- NULL, /* init */ +- NULL, /* finish */ +- 0, /* flags */ +- NULL /* app_data */ +-}; ++ if (dsa->priv_key == NULL) { ++ if ((dsa->priv_key=BN_new()) == NULL) ++ goto sw_try; ++ } + +-static ECDSA_METHOD cryptodev_ecdsa = { +- "cryptodev ECDSA method", +- NULL, +- NULL, /* ecdsa_sign_setup */ +- NULL, +- NULL, +- 0, /* flags */ +- NULL /* app_data */ +-}; ++ if (dsa->pub_key == NULL) { ++ if ((dsa->pub_key=BN_new()) == NULL) ++ goto sw_try; ++ } + +-typedef enum ec_curve_s +-{ +- EC_PRIME, +- EC_BINARY +-} ec_curve_t; ++ g_len = BN_num_bytes(dsa->p); ++ /** ++ * Get generator into a plain buffer. If length is less than ++ * q_len then add leading padding bytes. ++ */ ++ if (spcf_bn2bin_ex(dsa->g, &g, &g_len)) { ++ DSAerr(DSA_F_DSA_GENERATE_KEY, ERR_R_MALLOC_FAILURE); ++ goto sw_try; ++ } + +-/* ENGINE handler for ECDSA Sign */ +-static ECDSA_SIG *cryptodev_ecdsa_do_sign( const unsigned char *dgst, +- int dgst_len, const BIGNUM *in_kinv, const BIGNUM *in_r, EC_KEY *eckey) +-{ +- BIGNUM *m = NULL, *p = NULL, *a = NULL; +- BIGNUM *b = NULL, *x = NULL, *y = NULL; +- BN_CTX *ctx = NULL; +- ECDSA_SIG *ret = NULL; +- ECDSA_DATA *ecdsa = NULL; +- unsigned char * q = NULL, *r = NULL, *ab = NULL, *g_xy = NULL; +- unsigned char * s = NULL, *c = NULL, *d = NULL, *f = NULL, *tmp_dgst = NULL; +- int i = 0, q_len = 0, priv_key_len = 0, r_len = 0; +- int g_len = 0, d_len = 0, ab_len = 0; +- const BIGNUM *order = NULL, *priv_key=NULL; +- const EC_GROUP *group = NULL; +- struct crypt_kop kop; +- ec_curve_t ec_crv = EC_PRIME; ++ memset(kop, 0, sizeof(struct crypt_kop)); ++ kop->crk_op = CRK_DSA_GENERATE_KEY; ++ if (bn2crparam(dsa->p, &kop->crk_param[0])) ++ goto sw_try; ++ if (bn2crparam(dsa->q, &kop->crk_param[1])) ++ goto sw_try; ++ kop->crk_param[2].crp_p = g; ++ kop->crk_param[2].crp_nbits = g_len * 8; ++ kop->crk_iparams = 3; ++ kop->cookie = cookie; + +- memset(&kop, 0, sizeof(kop)); +- ecdsa = ecdsa_check(eckey); +- if (!ecdsa) { +- ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_PASSED_NULL_PARAMETER); +- return NULL; ++ /* pub_key is or prime length while priv key is of length of order */ ++ if (cryptodev_asym_async(kop, BN_num_bytes(dsa->p), dsa->pub_key, ++ BN_num_bytes(dsa->q), dsa->priv_key)) ++ goto sw_try; ++ ++ return ret; ++sw_try: ++ { ++ const DSA_METHOD *meth = DSA_OpenSSL(); ++ ++ if (kop) ++ free(kop); ++ ret = (meth->dsa_keygen)(dsa); ++ cookie->pkc_callback(cookie, 0); + } ++ return ret; ++} + +- group = EC_KEY_get0_group(eckey); +- priv_key = EC_KEY_get0_private_key(eckey); ++static int ++cryptodev_dsa_do_sign_async(const unsigned char *dgst, int dlen, DSA *dsa, ++ DSA_SIG *sig, struct pkc_cookie_s *cookie) ++{ ++ struct crypt_kop *kop = malloc(sizeof(struct crypt_kop)); ++ DSA_SIG *dsaret = NULL; ++ int q_len = 0, r_len = 0, g_len = 0; ++ int priv_key_len = 0, ret = 1; ++ unsigned char *q = NULL, *r = NULL, *g = NULL, *priv_key = NULL, *f = NULL; + +- if (!group || !priv_key) { +- ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_PASSED_NULL_PARAMETER); +- return NULL; ++ if (((sig->r = BN_new()) == NULL) || !kop) { ++ DSAerr(DSA_F_DSA_DO_SIGN, ERR_R_MALLOC_FAILURE); ++ goto err; + } + +- if ((ctx = BN_CTX_new()) == NULL || (m = BN_new()) == NULL || +- (a = BN_new()) == NULL || (b = BN_new()) == NULL || +- (p = BN_new()) == NULL || (x = BN_new()) == NULL || +- (y = BN_new()) == NULL) { +- ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_MALLOC_FAILURE); ++ if ((sig->s = BN_new()) == NULL) { ++ BN_free(sig->r); ++ DSAerr(DSA_F_DSA_DO_SIGN, ERR_R_MALLOC_FAILURE); + goto err; + } + +- order = &group->order; +- if (!order || BN_is_zero(order)) { +- ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ECDSA_R_MISSING_PARAMETERS); ++ if (spcf_bn2bin(dsa->p, &q, &q_len)) { ++ DSAerr(DSA_F_DSA_DO_SIGN, DSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE); + goto err; + } + +- i = BN_num_bits(order); +- /* Need to truncate digest if it is too long: first truncate whole +- bytes */ +- if (8 * dgst_len > i) +- dgst_len = (i + 7)/8; ++ /* Get order of the field of private keys into plain buffer */ ++ if (spcf_bn2bin (dsa->q, &r, &r_len)) { ++ DSAerr(DSA_F_DSA_DO_SIGN, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } + +- if (!BN_bin2bn(dgst, dgst_len, m)) { +- ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_BN_LIB); ++ /* sanity test */ ++ if (dlen > r_len) { ++ DSAerr(DSA_F_DSA_DO_SIGN, DSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE); + goto err; + } + +- /* If still too long truncate remaining bits with a shift */ +- if ((8 * dgst_len > i) && !BN_rshift(m, m, 8 - (i & 0x7))) { +- ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_BN_LIB); ++ g_len = q_len; ++ /** ++ * Get generator into a plain buffer. If length is less than ++ * q_len then add leading padding bytes. ++ */ ++ if (spcf_bn2bin_ex(dsa->g, &g, &g_len)) { ++ DSAerr(DSA_F_DSA_DO_SIGN, ERR_R_MALLOC_FAILURE); + goto err; + } + +- /* copy the truncated bits into plain buffer */ +- if (spcf_bn2bin(m, &tmp_dgst, &dgst_len)) { +- fprintf(stderr, "%s:%d: OPENSSL_malloc failec\n", __FUNCTION__, __LINE__); ++ priv_key_len = r_len; ++ /** ++ * Get private key into a plain buffer. If length is less than ++ * r_len then add leading padding bytes. ++ */ ++ if (spcf_bn2bin_ex(dsa->priv_key, &priv_key, &priv_key_len)) { ++ DSAerr(DSA_F_DSA_DO_SIGN, ERR_R_MALLOC_FAILURE); + goto err; + } + +- ret = ECDSA_SIG_new(); +- if (!ret) { +- ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_BN_LIB); ++ /* Allocate memory to store hash. */ ++ f = OPENSSL_malloc (r_len); ++ if (!f) { ++ DSAerr(DSA_F_DSA_DO_SIGN, ERR_R_MALLOC_FAILURE); + goto err; + } + +- /* check if this is prime or binary EC request */ +- if (EC_METHOD_get_field_type(EC_GROUP_method_of(group)) == NID_X9_62_prime_field) { +- ec_crv = EC_PRIME; +- /* get the generator point pair */ +- if (!EC_POINT_get_affine_coordinates_GFp (group, EC_GROUP_get0_generator(group), +- x, y,ctx)) { +- ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_EC_LIB); +- goto err; +- } ++ /* Add padding, since SEC expects hash to of size r_len */ ++ if (dlen < r_len) ++ memset(f, 0, r_len - dlen); + +- /* get the ECC curve parameters */ +- if (!EC_GROUP_get_curve_GFp(group, p, a, b , ctx)) { +- ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_EC_LIB); ++ /* Skip leading bytes if dgst_len < r_len */ ++ memcpy(f + r_len - dlen, dgst, dlen); ++ ++ dlen = r_len; ++ ++ memset(kop, 0, sizeof( struct crypt_kop)); ++ kop->crk_op = CRK_DSA_SIGN; ++ ++ /* inputs: dgst dsa->p dsa->q dsa->g dsa->priv_key */ ++ kop->crk_param[0].crp_p = (void*)f; ++ kop->crk_param[0].crp_nbits = dlen * 8; ++ kop->crk_param[1].crp_p = (void*)q; ++ kop->crk_param[1].crp_nbits = q_len * 8; ++ kop->crk_param[2].crp_p = (void*)r; ++ kop->crk_param[2].crp_nbits = r_len * 8; ++ kop->crk_param[3].crp_p = (void*)g; ++ kop->crk_param[3].crp_nbits = g_len * 8; ++ kop->crk_param[4].crp_p = (void*)priv_key; ++ kop->crk_param[4].crp_nbits = priv_key_len * 8; ++ kop->crk_iparams = 5; ++ kop->cookie = cookie; ++ ++ if (cryptodev_asym_async(kop, r_len, sig->r, r_len, sig->s)) ++ goto err; ++ ++ return ret; ++err: ++ { ++ const DSA_METHOD *meth = DSA_OpenSSL(); ++ ++ if (kop) ++ free(kop); ++ BN_free(sig->r); ++ BN_free(sig->s); ++ dsaret = (meth->dsa_do_sign)(dgst, dlen, dsa); ++ sig->r = dsaret->r; ++ sig->s = dsaret->s; ++ /* Call user callback immediately */ ++ cookie->pkc_callback(cookie, 0); ++ ret = dsaret; ++ } ++ return ret; ++} ++ ++static int ++cryptodev_dsa_verify_async(const unsigned char *dgst, int dlen, ++ DSA_SIG *sig, DSA *dsa, struct pkc_cookie_s *cookie) ++{ ++ struct crypt_kop *kop = malloc(sizeof(struct crypt_kop)); ++ int q_len = 0, r_len = 0, g_len = 0; ++ int w_len = 0 ,c_len = 0, d_len = 0, ret = 1; ++ unsigned char * q = NULL, * r = NULL, * w = NULL, * g = NULL; ++ unsigned char *c = NULL, * d = NULL, *f = NULL; ++ ++ if (!kop) ++ goto err; ++ ++ if (spcf_bn2bin(dsa->p, &q, &q_len)) { ++ DSAerr(DSA_F_DSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); ++ return ret; ++ } ++ ++ /* Get Order of field of private keys */ ++ if (spcf_bn2bin(dsa->q, &r, &r_len)) { ++ DSAerr(DSA_F_DSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ ++ g_len = q_len; ++ /** ++ * Get generator into a plain buffer. If length is less than ++ * q_len then add leading padding bytes. ++ */ ++ if (spcf_bn2bin_ex(dsa->g, &g, &g_len)) { ++ DSAerr(DSA_F_DSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ w_len = q_len; ++ /** ++ * Get public key into a plain buffer. If length is less than ++ * q_len then add leading padding bytes. ++ */ ++ if (spcf_bn2bin_ex(dsa->pub_key, &w, &w_len)) { ++ DSAerr(DSA_F_DSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ /** ++ * Get the 1st part of signature into a flat buffer with ++ * appropriate padding ++ */ ++ c_len = r_len; ++ ++ if (spcf_bn2bin_ex(sig->r, &c, &c_len)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ ++ /** ++ * Get the 2nd part of signature into a flat buffer with ++ * appropriate padding ++ */ ++ d_len = r_len; ++ ++ if (spcf_bn2bin_ex(sig->s, &d, &d_len)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ ++ ++ /* Sanity test */ ++ if (dlen > r_len) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ ++ /* Allocate memory to store hash. */ ++ f = OPENSSL_malloc (r_len); ++ if (!f) { ++ DSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ ++ /* Add padding, since SEC expects hash to of size r_len */ ++ if (dlen < r_len) ++ memset(f, 0, r_len - dlen); ++ ++ /* Skip leading bytes if dgst_len < r_len */ ++ memcpy(f + r_len - dlen, dgst, dlen); ++ ++ dlen = r_len; ++ memset(kop, 0, sizeof(struct crypt_kop)); ++ ++ /* inputs: dgst dsa->p dsa->q dsa->g dsa->pub_key sig->r sig->s */ ++ kop->crk_param[0].crp_p = (void*)f; ++ kop->crk_param[0].crp_nbits = dlen * 8; ++ kop->crk_param[1].crp_p = q; ++ kop->crk_param[1].crp_nbits = q_len * 8; ++ kop->crk_param[2].crp_p = r; ++ kop->crk_param[2].crp_nbits = r_len * 8; ++ kop->crk_param[3].crp_p = g; ++ kop->crk_param[3].crp_nbits = g_len * 8; ++ kop->crk_param[4].crp_p = w; ++ kop->crk_param[4].crp_nbits = w_len * 8; ++ kop->crk_param[5].crp_p = c; ++ kop->crk_param[5].crp_nbits = c_len * 8; ++ kop->crk_param[6].crp_p = d; ++ kop->crk_param[6].crp_nbits = d_len * 8; ++ kop->crk_iparams = 7; ++ kop->crk_op = CRK_DSA_VERIFY; ++ kop->cookie = cookie; ++ if (cryptodev_asym_async(kop, 0, NULL, 0, NULL)) ++ goto err; ++ ++ return ret; ++err: ++ { ++ const DSA_METHOD *meth = DSA_OpenSSL(); ++ ++ if (kop) ++ free(kop); ++ ++ ret = (meth->dsa_do_verify)(dgst, dlen, sig, dsa); ++ cookie->pkc_callback(cookie, 0); ++ } ++ return ret; ++} ++ ++static DSA_METHOD cryptodev_dsa = { ++ "cryptodev DSA method", ++ NULL, ++ NULL, /* dsa_sign_setup */ ++ NULL, ++ NULL, /* dsa_mod_exp */ ++ NULL, ++ NULL, ++ NULL, ++ NULL, ++ NULL, /* init */ ++ NULL, /* finish */ ++ 0, /* flags */ ++ NULL /* app_data */ ++}; ++ ++static ECDSA_METHOD cryptodev_ecdsa = { ++ "cryptodev ECDSA method", ++ NULL, ++ NULL, /* ecdsa_sign_setup */ ++ NULL, ++ NULL, ++ NULL, ++ NULL, ++ 0, /* flags */ ++ NULL /* app_data */ ++}; ++ ++typedef enum ec_curve_s ++{ ++ EC_PRIME, ++ EC_BINARY ++} ec_curve_t; ++ ++/* ENGINE handler for ECDSA Sign */ ++static ECDSA_SIG *cryptodev_ecdsa_do_sign( const unsigned char *dgst, ++ int dgst_len, const BIGNUM *in_kinv, const BIGNUM *in_r, EC_KEY *eckey) ++{ ++ BIGNUM *m = NULL, *p = NULL, *a = NULL; ++ BIGNUM *b = NULL, *x = NULL, *y = NULL; ++ BN_CTX *ctx = NULL; ++ ECDSA_SIG *ret = NULL; ++ ECDSA_DATA *ecdsa = NULL; ++ unsigned char * q = NULL, *r = NULL, *ab = NULL, *g_xy = NULL; ++ unsigned char * s = NULL, *c = NULL, *d = NULL, *f = NULL, *tmp_dgst = NULL; ++ int i = 0, q_len = 0, priv_key_len = 0, r_len = 0; ++ int g_len = 0, d_len = 0, ab_len = 0; ++ const BIGNUM *order = NULL, *priv_key=NULL; ++ const EC_GROUP *group = NULL; ++ struct crypt_kop kop; ++ ec_curve_t ec_crv = EC_PRIME; ++ ++ memset(&kop, 0, sizeof(kop)); ++ ecdsa = ecdsa_check(eckey); ++ if (!ecdsa) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_PASSED_NULL_PARAMETER); ++ return NULL; ++ } ++ ++ group = EC_KEY_get0_group(eckey); ++ priv_key = EC_KEY_get0_private_key(eckey); ++ ++ if (!group || !priv_key) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_PASSED_NULL_PARAMETER); ++ return NULL; ++ } ++ ++ if ((ctx = BN_CTX_new()) == NULL || (m = BN_new()) == NULL || ++ (a = BN_new()) == NULL || (b = BN_new()) == NULL || ++ (p = BN_new()) == NULL || (x = BN_new()) == NULL || ++ (y = BN_new()) == NULL) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ ++ order = &group->order; ++ if (!order || BN_is_zero(order)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ECDSA_R_MISSING_PARAMETERS); ++ goto err; ++ } ++ ++ i = BN_num_bits(order); ++ /* Need to truncate digest if it is too long: first truncate whole ++ bytes */ ++ if (8 * dgst_len > i) ++ dgst_len = (i + 7)/8; ++ ++ if (!BN_bin2bn(dgst, dgst_len, m)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_BN_LIB); ++ goto err; ++ } ++ ++ /* If still too long truncate remaining bits with a shift */ ++ if ((8 * dgst_len > i) && !BN_rshift(m, m, 8 - (i & 0x7))) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_BN_LIB); ++ goto err; ++ } ++ ++ /* copy the truncated bits into plain buffer */ ++ if (spcf_bn2bin(m, &tmp_dgst, &dgst_len)) { ++ fprintf(stderr, "%s:%d: OPENSSL_malloc failec\n", __FUNCTION__, __LINE__); ++ goto err; ++ } ++ ++ ret = ECDSA_SIG_new(); ++ if (!ret) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_BN_LIB); ++ goto err; ++ } ++ ++ /* check if this is prime or binary EC request */ ++ if (EC_METHOD_get_field_type(EC_GROUP_method_of(group)) == NID_X9_62_prime_field) { ++ ec_crv = EC_PRIME; ++ /* get the generator point pair */ ++ if (!EC_POINT_get_affine_coordinates_GFp (group, EC_GROUP_get0_generator(group), ++ x, y,ctx)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_EC_LIB); ++ goto err; ++ } ++ ++ /* get the ECC curve parameters */ ++ if (!EC_GROUP_get_curve_GFp(group, p, a, b , ctx)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_EC_LIB); + goto err; + } + } else if (EC_METHOD_get_field_type(EC_GROUP_method_of(group)) == NID_X9_62_characteristic_two_field) { +@@ -2162,63 +2667,581 @@ static int cryptodev_ecdsa_verify(const unsigned char *dgst, int dgst_len, + } + + /** +- * Get the 2nd part of signature into a flat buffer with +- * appropriate padding ++ * Get the 2nd part of signature into a flat buffer with ++ * appropriate padding ++ */ ++ if (BN_num_bytes(sig->s) < r_len) ++ d_len = r_len; ++ ++ if (spcf_bn2bin_ex(sig->s, &d, &d_len)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ ++ /* memory for message representative */ ++ f = malloc(r_len); ++ if (!f) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ ++ /* Add padding, since SEC expects hash to of size r_len */ ++ memset(f, 0, r_len-dgst_len); ++ ++ /* Skip leading bytes if dgst_len < r_len */ ++ memcpy(f + r_len-dgst_len, tmp_dgst, dgst_len); ++ dgst_len += r_len-dgst_len; ++ kop.crk_op = CRK_DSA_VERIFY; ++ /* inputs: dgst dsa->p dsa->q dsa->g dsa->priv_key */ ++ kop.crk_param[0].crp_p = f; ++ kop.crk_param[0].crp_nbits = dgst_len * 8; ++ kop.crk_param[1].crp_p = q; ++ kop.crk_param[1].crp_nbits = q_len * 8; ++ kop.crk_param[2].crp_p = r; ++ kop.crk_param[2].crp_nbits = r_len * 8; ++ kop.crk_param[3].crp_p = g_xy; ++ kop.crk_param[3].crp_nbits = g_len * 8; ++ kop.crk_param[4].crp_p = w_xy; ++ kop.crk_param[4].crp_nbits = pub_key_len * 8; ++ kop.crk_param[5].crp_p = ab; ++ kop.crk_param[5].crp_nbits = ab_len * 8; ++ kop.crk_param[6].crp_p = c; ++ kop.crk_param[6].crp_nbits = d_len * 8; ++ kop.crk_param[7].crp_p = d; ++ kop.crk_param[7].crp_nbits = d_len * 8; ++ kop.crk_iparams = 8; ++ ++ if (cryptodev_asym(&kop, 0, NULL, 0, NULL) == 0) { ++ /*OCF success value is 0, if not zero, change ret to fail*/ ++ if(0 == kop.crk_status) ++ ret = 1; ++ } else { ++ const ECDSA_METHOD *meth = ECDSA_OpenSSL(); ++ ++ ret = (meth->ecdsa_do_verify)(dgst, dgst_len, sig, eckey); ++ } ++ kop.crk_param[0].crp_p = NULL; ++ zapparams(&kop); ++ ++err: ++ return ret; ++} ++ ++static int cryptodev_ecdsa_do_sign_async( const unsigned char *dgst, ++ int dgst_len, const BIGNUM *in_kinv, const BIGNUM *in_r, EC_KEY *eckey, ++ ECDSA_SIG *sig, struct pkc_cookie_s *cookie) ++{ ++ BIGNUM *m = NULL, *p = NULL, *a = NULL; ++ BIGNUM *b = NULL, *x = NULL, *y = NULL; ++ BN_CTX *ctx = NULL; ++ ECDSA_SIG *sig_ret = NULL; ++ ECDSA_DATA *ecdsa = NULL; ++ unsigned char * q = NULL, *r = NULL, *ab = NULL, *g_xy = NULL; ++ unsigned char * s = NULL, *f = NULL, *tmp_dgst = NULL; ++ int i = 0, q_len = 0, priv_key_len = 0, r_len = 0; ++ int g_len = 0, ab_len = 0, ret = 1; ++ const BIGNUM *order = NULL, *priv_key=NULL; ++ const EC_GROUP *group = NULL; ++ struct crypt_kop *kop = malloc(sizeof(struct crypt_kop)); ++ ec_curve_t ec_crv = EC_PRIME; ++ ++ if (!(sig->r = BN_new()) || !kop) ++ goto err; ++ if ((sig->s = BN_new()) == NULL) { ++ BN_free(r); ++ goto err; ++ } ++ ++ memset(kop, 0, sizeof(struct crypt_kop)); ++ ecdsa = ecdsa_check(eckey); ++ if (!ecdsa) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_PASSED_NULL_PARAMETER); ++ goto err; ++ } ++ ++ group = EC_KEY_get0_group(eckey); ++ priv_key = EC_KEY_get0_private_key(eckey); ++ ++ if (!group || !priv_key) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_PASSED_NULL_PARAMETER); ++ goto err; ++ } ++ ++ if ((ctx = BN_CTX_new()) == NULL || (m = BN_new()) == NULL || ++ (a = BN_new()) == NULL || (b = BN_new()) == NULL || ++ (p = BN_new()) == NULL || (x = BN_new()) == NULL || ++ (y = BN_new()) == NULL) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ ++ order = &group->order; ++ if (!order || BN_is_zero(order)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ECDSA_R_MISSING_PARAMETERS); ++ goto err; ++ } ++ ++ i = BN_num_bits(order); ++ /* Need to truncate digest if it is too long: first truncate whole ++ bytes */ ++ if (8 * dgst_len > i) ++ dgst_len = (i + 7)/8; ++ ++ if (!BN_bin2bn(dgst, dgst_len, m)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_BN_LIB); ++ goto err; ++ } ++ ++ /* If still too long truncate remaining bits with a shift */ ++ if ((8 * dgst_len > i) && !BN_rshift(m, m, 8 - (i & 0x7))) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_BN_LIB); ++ goto err; ++ } ++ ++ /* copy the truncated bits into plain buffer */ ++ if (spcf_bn2bin(m, &tmp_dgst, &dgst_len)) { ++ fprintf(stderr, "%s:%d: OPENSSL_malloc failec\n", __FUNCTION__, __LINE__); ++ goto err; ++ } ++ ++ /* check if this is prime or binary EC request */ ++ if (EC_METHOD_get_field_type(EC_GROUP_method_of(group)) ++ == NID_X9_62_prime_field) { ++ ec_crv = EC_PRIME; ++ /* get the generator point pair */ ++ if (!EC_POINT_get_affine_coordinates_GFp (group, ++ EC_GROUP_get0_generator(group), x, y,ctx)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_EC_LIB); ++ goto err; ++ } ++ ++ /* get the ECC curve parameters */ ++ if (!EC_GROUP_get_curve_GFp(group, p, a, b , ctx)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_EC_LIB); ++ goto err; ++ } ++ } else if (EC_METHOD_get_field_type(EC_GROUP_method_of(group)) == NID_X9_62_characteristic_two_field) { ++ ec_crv = EC_BINARY; ++ /* get the ECC curve parameters */ ++ if (!EC_GROUP_get_curve_GF2m(group, p, a, b , ctx)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_EC_LIB); ++ goto err; ++ } ++ ++ /* get the generator point pair */ ++ if (!EC_POINT_get_affine_coordinates_GF2m(group, ++ EC_GROUP_get0_generator(group), x, y,ctx)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_EC_LIB); ++ goto err; ++ } ++ } else { ++ printf("Unsupported Curve\n"); ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_EC_LIB); ++ goto err; ++ } ++ ++ if (spcf_bn2bin(order, &r, &r_len)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ ++ if (spcf_bn2bin(p, &q, &q_len)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ ++ priv_key_len = r_len; ++ ++ /** ++ * If BN_num_bytes of priv_key returns less then r_len then ++ * add padding bytes before the key ++ */ ++ if (spcf_bn2bin_ex(priv_key, &s, &priv_key_len)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ ++ /* Generation of ECC curve parameters */ ++ ab_len = 2*q_len; ++ ab = eng_copy_curve_points(a, b, ab_len, q_len); ++ if (!ab) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ ++ if (ec_crv == EC_BINARY) { ++ if (eng_ec_get_cparam(EC_GROUP_get_curve_name(group), ab+q_len, q_len)) ++ { ++ unsigned char *c_temp = NULL; ++ int c_temp_len = q_len; ++ if (eng_ec_compute_cparam(b, p, &c_temp, &c_temp_len)) ++ memcpy(ab+q_len, c_temp, q_len); ++ else ++ goto err; ++ } ++ kop->curve_type = ECC_BINARY; ++ } ++ ++ /* Calculation of Generator point */ ++ g_len = 2*q_len; ++ g_xy = eng_copy_curve_points(x, y, g_len, q_len); ++ if (!g_xy) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ ++ /* memory for message representative */ ++ f = malloc(r_len); ++ if (!f) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ ++ /* Add padding, since SEC expects hash to of size r_len */ ++ memset(f, 0, r_len - dgst_len); ++ ++ /* Skip leading bytes if dgst_len < r_len */ ++ memcpy(f + r_len - dgst_len, tmp_dgst, dgst_len); ++ ++ dgst_len += r_len - dgst_len; ++ ++ kop->crk_op = CRK_DSA_SIGN; ++ /* inputs: dgst dsa->p dsa->q dsa->g dsa->priv_key */ ++ kop->crk_param[0].crp_p = f; ++ kop->crk_param[0].crp_nbits = dgst_len * 8; ++ kop->crk_param[1].crp_p = q; ++ kop->crk_param[1].crp_nbits = q_len * 8; ++ kop->crk_param[2].crp_p = r; ++ kop->crk_param[2].crp_nbits = r_len * 8; ++ kop->crk_param[3].crp_p = g_xy; ++ kop->crk_param[3].crp_nbits = g_len * 8; ++ kop->crk_param[4].crp_p = s; ++ kop->crk_param[4].crp_nbits = priv_key_len * 8; ++ kop->crk_param[5].crp_p = ab; ++ kop->crk_param[5].crp_nbits = ab_len * 8; ++ kop->crk_iparams = 6; ++ kop->cookie = cookie; ++ ++ if (cryptodev_asym_async(kop, r_len, sig->r , r_len, sig->s)) ++ goto err; ++ ++ return ret; ++err: ++ { ++ const ECDSA_METHOD *meth = ECDSA_OpenSSL(); ++ BN_free(sig->r); ++ BN_free(sig->s); ++ if (kop) ++ free(kop); ++ sig_ret = (meth->ecdsa_do_sign)(dgst, dgst_len, in_kinv, in_r, eckey); ++ sig->r = sig_ret->r; ++ sig->s = sig_ret->s; ++ cookie->pkc_callback(cookie, 0); ++ } ++ return ret; ++} ++ ++static int cryptodev_ecdsa_verify_async(const unsigned char *dgst, int dgst_len, ++ const ECDSA_SIG *sig, EC_KEY *eckey, struct pkc_cookie_s *cookie) ++{ ++ BIGNUM *m = NULL, *p = NULL, *a = NULL, *b = NULL; ++ BIGNUM *x = NULL, *y = NULL, *w_x = NULL, *w_y = NULL; ++ BN_CTX *ctx = NULL; ++ ECDSA_DATA *ecdsa = NULL; ++ unsigned char *q = NULL, *r = NULL, *ab = NULL, *g_xy = NULL, *w_xy = NULL; ++ unsigned char *c = NULL, *d = NULL, *f = NULL, *tmp_dgst = NULL; ++ int i = 0, q_len = 0, pub_key_len = 0, r_len = 0, c_len = 0, g_len = 0; ++ int d_len = 0, ab_len = 0, ret = 1; ++ const EC_POINT *pub_key = NULL; ++ const BIGNUM *order = NULL; ++ const EC_GROUP *group=NULL; ++ ec_curve_t ec_crv = EC_PRIME; ++ struct crypt_kop *kop = malloc(sizeof(struct crypt_kop)); ++ ++ if (!kop) ++ goto err; ++ ++ memset(kop, 0, sizeof(struct crypt_kop)); ++ ecdsa = ecdsa_check(eckey); ++ if (!ecdsa) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_PASSED_NULL_PARAMETER); ++ goto err; ++ } ++ ++ group = EC_KEY_get0_group(eckey); ++ pub_key = EC_KEY_get0_public_key(eckey); ++ ++ if (!group || !pub_key) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_PASSED_NULL_PARAMETER); ++ goto err; ++ } ++ ++ if ((ctx = BN_CTX_new()) == NULL || (m = BN_new()) == NULL || ++ (a = BN_new()) == NULL || (b = BN_new()) == NULL || ++ (p = BN_new()) == NULL || (x = BN_new()) == NULL || ++ (y = BN_new()) == NULL || (w_x = BN_new()) == NULL || ++ (w_y = BN_new()) == NULL) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ ++ order = &group->order; ++ if (!order || BN_is_zero(order)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ECDSA_R_MISSING_PARAMETERS); ++ goto err; ++ } ++ ++ i = BN_num_bits(order); ++ /* Need to truncate digest if it is too long: first truncate whole ++ * bytes */ ++ if (8 * dgst_len > i) ++ dgst_len = (i + 7)/8; ++ ++ if (!BN_bin2bn(dgst, dgst_len, m)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_BN_LIB); ++ goto err; ++ } ++ ++ /* If still too long truncate remaining bits with a shift */ ++ if ((8 * dgst_len > i) && !BN_rshift(m, m, 8 - (i & 0x7))) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_BN_LIB); ++ goto err; ++ } ++ /* copy the truncated bits into plain buffer */ ++ if (spcf_bn2bin(m, &tmp_dgst, &dgst_len)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ ++ /* check if this is prime or binary EC request */ ++ if (EC_METHOD_get_field_type(EC_GROUP_method_of(group)) == NID_X9_62_prime_field) { ++ ec_crv = EC_PRIME; ++ ++ /* get the generator point pair */ ++ if (!EC_POINT_get_affine_coordinates_GFp (group, ++ EC_GROUP_get0_generator(group), x, y,ctx)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_EC_LIB); ++ goto err; ++ } ++ ++ /* get the public key pair for prime curve */ ++ if (!EC_POINT_get_affine_coordinates_GFp (group, ++ pub_key, w_x, w_y,ctx)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_EC_LIB); ++ goto err; ++ } ++ ++ /* get the ECC curve parameters */ ++ if (!EC_GROUP_get_curve_GFp(group, p, a, b, ctx)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_EC_LIB); ++ goto err; ++ } ++ } else if (EC_METHOD_get_field_type(EC_GROUP_method_of(group)) == NID_X9_62_characteristic_two_field){ ++ ec_crv = EC_BINARY; ++ /* get the ECC curve parameters */ ++ if (!EC_GROUP_get_curve_GF2m(group, p, a, b , ctx)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_EC_LIB); ++ goto err; ++ } ++ ++ /* get the generator point pair */ ++ if (!EC_POINT_get_affine_coordinates_GF2m(group, ++ EC_GROUP_get0_generator(group),x, y,ctx)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_EC_LIB); ++ goto err; ++ } ++ ++ /* get the public key pair for binary curve */ ++ if (!EC_POINT_get_affine_coordinates_GF2m(group, ++ pub_key, w_x, w_y,ctx)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_EC_LIB); ++ goto err; ++ } ++ }else { ++ printf("Unsupported Curve\n"); ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_EC_LIB); ++ goto err; ++ } ++ ++ /* Get the order of the subgroup of private keys */ ++ if (spcf_bn2bin((BIGNUM*)order, &r, &r_len)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ ++ /* Get the irreducible polynomial that creates the field */ ++ if (spcf_bn2bin(p, &q, &q_len)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ ++ /* Get the public key into a flat buffer with appropriate padding */ ++ pub_key_len = 2 * q_len; ++ ++ w_xy = eng_copy_curve_points (w_x, w_y, pub_key_len, q_len); ++ if (!w_xy) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ ++ /* Generation of ECC curve parameters */ ++ ab_len = 2*q_len; ++ ++ ab = eng_copy_curve_points (a, b, ab_len, q_len); ++ if (!ab) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ ++ if (ec_crv == EC_BINARY) { ++ /* copy b' i.e c(b), instead of only b */ ++ eng_ec_get_cparam (EC_GROUP_get_curve_name(group), ++ ab+q_len, q_len); ++ kop->curve_type = ECC_BINARY; ++ } ++ ++ /* Calculation of Generator point */ ++ g_len = 2 * q_len; ++ ++ g_xy = eng_copy_curve_points (x, y, g_len, q_len); ++ if (!g_xy) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ ++ /** ++ * Get the 1st part of signature into a flat buffer with ++ * appropriate padding ++ */ ++ if (BN_num_bytes(sig->r) < r_len) ++ c_len = r_len; ++ ++ if (spcf_bn2bin_ex(sig->r, &c, &c_len)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ ++ /** ++ * Get the 2nd part of signature into a flat buffer with ++ * appropriate padding ++ */ ++ if (BN_num_bytes(sig->s) < r_len) ++ d_len = r_len; ++ ++ if (spcf_bn2bin_ex(sig->s, &d, &d_len)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ ++ /* memory for message representative */ ++ f = malloc(r_len); ++ if (!f) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ ++ /* Add padding, since SEC expects hash to of size r_len */ ++ memset(f, 0, r_len-dgst_len); ++ ++ /* Skip leading bytes if dgst_len < r_len */ ++ memcpy(f + r_len-dgst_len, tmp_dgst, dgst_len); ++ ++ dgst_len += r_len-dgst_len; ++ ++ kop->crk_op = CRK_DSA_VERIFY; ++ /* inputs: dgst dsa->p dsa->q dsa->g dsa->priv_key */ ++ kop->crk_param[0].crp_p = f; ++ kop->crk_param[0].crp_nbits = dgst_len * 8; ++ kop->crk_param[1].crp_p = q; ++ kop->crk_param[1].crp_nbits = q_len * 8; ++ kop->crk_param[2].crp_p = r; ++ kop->crk_param[2].crp_nbits = r_len * 8; ++ kop->crk_param[3].crp_p = g_xy; ++ kop->crk_param[3].crp_nbits = g_len * 8; ++ kop->crk_param[4].crp_p = w_xy; ++ kop->crk_param[4].crp_nbits = pub_key_len * 8; ++ kop->crk_param[5].crp_p = ab; ++ kop->crk_param[5].crp_nbits = ab_len * 8; ++ kop->crk_param[6].crp_p = c; ++ kop->crk_param[6].crp_nbits = d_len * 8; ++ kop->crk_param[7].crp_p = d; ++ kop->crk_param[7].crp_nbits = d_len * 8; ++ kop->crk_iparams = 8; ++ kop->cookie = cookie; ++ ++ if (cryptodev_asym_async(kop, 0, NULL, 0, NULL)) ++ goto err; ++ ++ return ret; ++err: ++ { ++ const ECDSA_METHOD *meth = ECDSA_OpenSSL(); ++ ++ if (kop) ++ free(kop); ++ ret = (meth->ecdsa_do_verify)(dgst, dgst_len, sig, eckey); ++ cookie->pkc_callback(cookie, 0); ++ } ++ ++ return ret; ++} ++ ++/* Cryptodev DH Key Gen routine */ ++static int cryptodev_dh_keygen_async(DH *dh, struct pkc_cookie_s *cookie) ++{ ++ struct crypt_kop *kop = malloc(sizeof(struct crypt_kop)); ++ int ret = 1, g_len; ++ unsigned char *g = NULL; ++ ++ if (!kop) ++ goto sw_try; ++ ++ if (dh->priv_key == NULL) { ++ if ((dh->priv_key=BN_new()) == NULL) ++ goto sw_try; ++ } ++ ++ if (dh->pub_key == NULL) { ++ if ((dh->pub_key=BN_new()) == NULL) ++ goto sw_try; ++ } ++ ++ g_len = BN_num_bytes(dh->p); ++ /** ++ * Get generator into a plain buffer. If length is less than ++ * q_len then add leading padding bytes. + */ +- if (BN_num_bytes(sig->s) < r_len) +- d_len = r_len; +- +- if (spcf_bn2bin_ex(sig->s, &d, &d_len)) { +- ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); +- goto err; +- } +- +- /* memory for message representative */ +- f = malloc(r_len); +- if (!f) { +- ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); +- goto err; ++ if (spcf_bn2bin_ex(dh->g, &g, &g_len)) { ++ DSAerr(DH_F_DH_GENERATE_KEY, ERR_R_MALLOC_FAILURE); ++ goto sw_try; + } + +- /* Add padding, since SEC expects hash to of size r_len */ +- memset(f, 0, r_len-dgst_len); ++ memset(kop, 0, sizeof(struct crypt_kop)); ++ kop->crk_op = CRK_DH_GENERATE_KEY; ++ if (bn2crparam(dh->p, &kop->crk_param[0])) ++ goto sw_try; ++ if (bn2crparam(dh->q, &kop->crk_param[1])) ++ goto sw_try; ++ kop->crk_param[2].crp_p = g; ++ kop->crk_param[2].crp_nbits = g_len * 8; ++ kop->crk_iparams = 3; ++ kop->cookie = cookie; + +- /* Skip leading bytes if dgst_len < r_len */ +- memcpy(f + r_len-dgst_len, tmp_dgst, dgst_len); +- dgst_len += r_len-dgst_len; +- kop.crk_op = CRK_DSA_VERIFY; +- /* inputs: dgst dsa->p dsa->q dsa->g dsa->priv_key */ +- kop.crk_param[0].crp_p = f; +- kop.crk_param[0].crp_nbits = dgst_len * 8; +- kop.crk_param[1].crp_p = q; +- kop.crk_param[1].crp_nbits = q_len * 8; +- kop.crk_param[2].crp_p = r; +- kop.crk_param[2].crp_nbits = r_len * 8; +- kop.crk_param[3].crp_p = g_xy; +- kop.crk_param[3].crp_nbits = g_len * 8; +- kop.crk_param[4].crp_p = w_xy; +- kop.crk_param[4].crp_nbits = pub_key_len * 8; +- kop.crk_param[5].crp_p = ab; +- kop.crk_param[5].crp_nbits = ab_len * 8; +- kop.crk_param[6].crp_p = c; +- kop.crk_param[6].crp_nbits = d_len * 8; +- kop.crk_param[7].crp_p = d; +- kop.crk_param[7].crp_nbits = d_len * 8; +- kop.crk_iparams = 8; ++ /* pub_key is or prime length while priv key is of length of order */ ++ if (cryptodev_asym_async(kop, BN_num_bytes(dh->p), dh->pub_key, ++ BN_num_bytes(dh->q), dh->priv_key)) ++ goto sw_try; + +- if (cryptodev_asym(&kop, 0, NULL, 0, NULL) == 0) { +- /*OCF success value is 0, if not zero, change ret to fail*/ +- if(0 == kop.crk_status) +- ret = 1; +- } else { +- const ECDSA_METHOD *meth = ECDSA_OpenSSL(); ++ return ret; ++sw_try: ++ { ++ const DH_METHOD *meth = DH_OpenSSL(); + +- ret = (meth->ecdsa_do_verify)(dgst, dgst_len, sig, eckey); ++ if (kop) ++ free(kop); ++ ret = (meth->generate_key)(dh); ++ cookie->pkc_callback(cookie, 0); + } +- kop.crk_param[0].crp_p = NULL; +- zapparams(&kop); +- +-err: + return ret; + } + +@@ -2327,6 +3350,54 @@ sw_try: + return (dhret); + } + ++/* Return Length if successful and 0 on failure */ ++static int ++cryptodev_dh_compute_key_async(unsigned char *key, const BIGNUM *pub_key, ++ DH *dh, struct pkc_cookie_s *cookie) ++{ ++ struct crypt_kop *kop = malloc(sizeof(struct crypt_kop)); ++ int ret = 1; ++ int fd, p_len; ++ unsigned char *padded_pub_key = NULL, *p = NULL; ++ ++ fd = *(int *)cookie->eng_handle; ++ ++ memset(kop, 0, sizeof(struct crypt_kop)); ++ kop->crk_op = CRK_DH_COMPUTE_KEY; ++ /* inputs: dh->priv_key pub_key dh->p key */ ++ spcf_bn2bin(dh->p, &p, &p_len); ++ spcf_bn2bin_ex(pub_key, &padded_pub_key, &p_len); ++ ++ if (bn2crparam(dh->priv_key, &kop->crk_param[0])) ++ goto err; ++ kop->crk_param[1].crp_p = padded_pub_key; ++ kop->crk_param[1].crp_nbits = p_len * 8; ++ kop->crk_param[2].crp_p = p; ++ kop->crk_param[2].crp_nbits = p_len * 8; ++ kop->crk_iparams = 3; ++ ++ kop->cookie = cookie; ++ kop->crk_param[3].crp_p = (void*) key; ++ kop->crk_param[3].crp_nbits = p_len * 8; ++ kop->crk_oparams = 1; ++ ++ if (cryptodev_asym_async(kop, 0, NULL, 0, NULL)) ++ goto err; ++ ++ return p_len; ++err: ++ { ++ const DH_METHOD *meth = DH_OpenSSL(); ++ ++ if (kop) ++ free(kop); ++ ret = (meth->compute_key)(key, pub_key, dh); ++ /* Call user cookie handler */ ++ cookie->pkc_callback(cookie, 0); ++ } ++ return (ret); ++} ++ + int cryptodev_ecdh_compute_key(void *out, size_t outlen, + const EC_POINT *pub_key, EC_KEY *ecdh, void *(*KDF)(const void *in, size_t inlen, + void *out, size_t *outlen)) +@@ -2504,6 +3575,190 @@ err: + return ret; + } + ++int cryptodev_ecdh_compute_key_async(void *out, size_t outlen, ++ const EC_POINT *pub_key, EC_KEY *ecdh, void *(*KDF)(const void *in, size_t inlen, ++ void *out, size_t *outlen), struct pkc_cookie_s *cookie) ++{ ++ ec_curve_t ec_crv = EC_PRIME; ++ unsigned char * q = NULL, *w_xy = NULL, *ab = NULL, *s = NULL, *r = NULL; ++ BIGNUM * w_x = NULL, *w_y = NULL; ++ int q_len = 0, ab_len = 0, pub_key_len = 0, r_len = 0, priv_key_len = 0; ++ BIGNUM * p = NULL, *a = NULL, *b = NULL; ++ BN_CTX *ctx; ++ EC_POINT *tmp=NULL; ++ BIGNUM *x=NULL, *y=NULL; ++ const BIGNUM *priv_key; ++ const EC_GROUP* group = NULL; ++ int ret = 1; ++ size_t buflen, len; ++ struct crypt_kop *kop = malloc(sizeof(struct crypt_kop)); ++ ++ if (!(ctx = BN_CTX_new()) || !kop) ++ goto err; ++ ++ memset(kop, 0, sizeof(struct crypt_kop)); ++ ++ BN_CTX_start(ctx); ++ x = BN_CTX_get(ctx); ++ y = BN_CTX_get(ctx); ++ p = BN_CTX_get(ctx); ++ a = BN_CTX_get(ctx); ++ b = BN_CTX_get(ctx); ++ w_x = BN_CTX_get(ctx); ++ w_y = BN_CTX_get(ctx); ++ ++ if (!x || !y || !p || !a || !b || !w_x || !w_y) { ++ ECDHerr(ECDH_F_ECDH_COMPUTE_KEY,ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ ++ priv_key = EC_KEY_get0_private_key(ecdh); ++ if (priv_key == NULL) { ++ ECDHerr(ECDH_F_ECDH_COMPUTE_KEY,ECDH_R_NO_PRIVATE_VALUE); ++ goto err; ++ } ++ ++ group = EC_KEY_get0_group(ecdh); ++ if ((tmp=EC_POINT_new(group)) == NULL) { ++ ECDHerr(ECDH_F_ECDH_COMPUTE_KEY,ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ ++ if (EC_METHOD_get_field_type(EC_GROUP_method_of(group)) == ++ NID_X9_62_prime_field) { ++ ec_crv = EC_PRIME; ++ ++ if (!EC_POINT_get_affine_coordinates_GFp(group, ++ EC_GROUP_get0_generator(group), x, y, ctx)) { ++ ECDHerr(ECDH_F_ECDH_COMPUTE_KEY,ECDH_R_POINT_ARITHMETIC_FAILURE); ++ goto err; ++ } ++ ++ /* get the ECC curve parameters */ ++ if (!EC_GROUP_get_curve_GFp(group, p, a, b, ctx)) { ++ ECDHerr(ECDH_F_ECDH_COMPUTE_KEY,ERR_R_BN_LIB); ++ goto err; ++ } ++ ++ /* get the public key pair for prime curve */ ++ if (!EC_POINT_get_affine_coordinates_GFp (group, pub_key, w_x, w_y,ctx)) { ++ ECDHerr(ECDH_F_ECDH_COMPUTE_KEY,ERR_R_BN_LIB); ++ goto err; ++ } ++ } else { ++ ec_crv = EC_BINARY; ++ ++ if (!EC_POINT_get_affine_coordinates_GF2m(group, ++ EC_GROUP_get0_generator(group), x, y, ctx)) { ++ ECDHerr(ECDH_F_ECDH_COMPUTE_KEY,ECDH_R_POINT_ARITHMETIC_FAILURE); ++ goto err; ++ } ++ ++ /* get the ECC curve parameters */ ++ if (!EC_GROUP_get_curve_GF2m(group, p, a, b , ctx)) { ++ ECDHerr(ECDH_F_ECDH_COMPUTE_KEY,ERR_R_BN_LIB); ++ goto err; ++ } ++ ++ /* get the public key pair for binary curve */ ++ if (!EC_POINT_get_affine_coordinates_GF2m(group, ++ pub_key, w_x, w_y,ctx)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_EC_LIB); ++ goto err; ++ } ++ } ++ ++ /* irreducible polynomial that creates the field */ ++ if (spcf_bn2bin((BIGNUM*)&group->order, &r, &r_len)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ ++ /* Get the irreducible polynomial that creates the field */ ++ if (spcf_bn2bin(p, &q, &q_len)) { ++ ECDHerr(ECDH_F_ECDH_COMPUTE_KEY,ERR_R_BN_LIB); ++ goto err; ++ } ++ ++ /* Get the public key into a flat buffer with appropriate padding */ ++ pub_key_len = 2 * q_len; ++ w_xy = eng_copy_curve_points (w_x, w_y, pub_key_len, q_len); ++ if (!w_xy) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ ++ /* Generation of ECC curve parameters */ ++ ab_len = 2*q_len; ++ ab = eng_copy_curve_points (a, b, ab_len, q_len); ++ if (!ab) { ++ ECDHerr(ECDH_F_ECDH_COMPUTE_KEY,ERR_R_BN_LIB); ++ goto err; ++ } ++ ++ if (ec_crv == EC_BINARY) { ++ /* copy b' i.e c(b), instead of only b */ ++ if (eng_ec_get_cparam(EC_GROUP_get_curve_name(group), ab+q_len, q_len)) ++ { ++ unsigned char *c_temp = NULL; ++ int c_temp_len = q_len; ++ if (eng_ec_compute_cparam(b, p, &c_temp, &c_temp_len)) ++ memcpy(ab+q_len, c_temp, q_len); ++ else ++ goto err; ++ } ++ kop->curve_type = ECC_BINARY; ++ } else ++ kop->curve_type = ECC_PRIME; ++ ++ priv_key_len = r_len; ++ ++ /* ++ * If BN_num_bytes of priv_key returns less then r_len then ++ * add padding bytes before the key ++ */ ++ if (spcf_bn2bin_ex((BIGNUM *)priv_key, &s, &priv_key_len)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ ++ buflen = (EC_GROUP_get_degree(group) + 7)/8; ++ len = BN_num_bytes(x); ++ if (len > buflen || q_len < buflen) { ++ ECDHerr(ECDH_F_ECDH_COMPUTE_KEY, ERR_R_INTERNAL_ERROR); ++ goto err; ++ } ++ ++ kop->crk_op = CRK_DH_COMPUTE_KEY; ++ kop->crk_param[0].crp_p = (void *) s; ++ kop->crk_param[0].crp_nbits = priv_key_len*8; ++ kop->crk_param[1].crp_p = (void *) w_xy; ++ kop->crk_param[1].crp_nbits = pub_key_len*8; ++ kop->crk_param[2].crp_p = (void *) q; ++ kop->crk_param[2].crp_nbits = q_len*8; ++ kop->crk_param[3].crp_p = (void *) ab; ++ kop->crk_param[3].crp_nbits = ab_len*8; ++ kop->crk_iparams = 4; ++ kop->crk_param[4].crp_p = (void *) out; ++ kop->crk_param[4].crp_nbits = q_len*8; ++ kop->crk_oparams = 1; ++ kop->cookie = cookie; ++ if (cryptodev_asym_async(kop, 0, NULL, 0, NULL)) ++ goto err; ++ ++ return q_len; ++err: ++ { ++ const ECDH_METHOD *meth = ECDH_OpenSSL(); ++ ++ if (kop) ++ free(kop); ++ ret = (meth->compute_key)(out, outlen, pub_key, ecdh, KDF); ++ /* Call user cookie handler */ ++ cookie->pkc_callback(cookie, 0); ++ } ++ return ret; ++} + + static DH_METHOD cryptodev_dh = { + "cryptodev DH method", +@@ -2512,6 +3767,8 @@ static DH_METHOD cryptodev_dh = { + NULL, + NULL, + NULL, ++ NULL, ++ NULL, + 0, /* flags */ + NULL /* app_data */ + }; +@@ -2520,6 +3777,7 @@ static ECDH_METHOD cryptodev_ecdh = { + "cryptodev ECDH method", + NULL, /* cryptodev_ecdh_compute_key */ + NULL, ++ NULL, + 0, /* flags */ + NULL /* app_data */ + }; +@@ -2593,12 +3851,19 @@ ENGINE_load_cryptodev(void) + cryptodev_rsa.rsa_priv_dec = rsa_meth->rsa_priv_dec; + if (cryptodev_asymfeat & CRF_MOD_EXP) { + cryptodev_rsa.bn_mod_exp = cryptodev_bn_mod_exp; +- if (cryptodev_asymfeat & CRF_MOD_EXP_CRT) ++ cryptodev_rsa.bn_mod_exp_async = ++ cryptodev_bn_mod_exp_async; ++ if (cryptodev_asymfeat & CRF_MOD_EXP_CRT) { + cryptodev_rsa.rsa_mod_exp = + cryptodev_rsa_mod_exp; +- else ++ cryptodev_rsa.rsa_mod_exp_async = ++ cryptodev_rsa_mod_exp_async; ++ } else { + cryptodev_rsa.rsa_mod_exp = + cryptodev_rsa_nocrt_mod_exp; ++ cryptodev_rsa.rsa_mod_exp_async = ++ cryptodev_rsa_nocrt_mod_exp_async; ++ } + } + } + +@@ -2606,12 +3871,21 @@ ENGINE_load_cryptodev(void) + const DSA_METHOD *meth = DSA_OpenSSL(); + + memcpy(&cryptodev_dsa, meth, sizeof(DSA_METHOD)); +- if (cryptodev_asymfeat & CRF_DSA_SIGN) ++ if (cryptodev_asymfeat & CRF_DSA_SIGN) { + cryptodev_dsa.dsa_do_sign = cryptodev_dsa_do_sign; +- if (cryptodev_asymfeat & CRF_DSA_VERIFY) ++ cryptodev_dsa.dsa_do_sign_async = ++ cryptodev_dsa_do_sign_async; ++ } ++ if (cryptodev_asymfeat & CRF_DSA_VERIFY) { + cryptodev_dsa.dsa_do_verify = cryptodev_dsa_verify; +- if (cryptodev_asymfeat & CRF_DSA_GENERATE_KEY) ++ cryptodev_dsa.dsa_do_verify_async = ++ cryptodev_dsa_verify_async; ++ } ++ if (cryptodev_asymfeat & CRF_DSA_GENERATE_KEY) { + cryptodev_dsa.dsa_keygen = cryptodev_dsa_keygen; ++ cryptodev_dsa.dsa_keygen_async = ++ cryptodev_dsa_keygen_async; ++ } + } + + if (ENGINE_set_DH(engine, &cryptodev_dh)){ +@@ -2620,10 +3894,15 @@ ENGINE_load_cryptodev(void) + if (cryptodev_asymfeat & CRF_DH_COMPUTE_KEY) { + cryptodev_dh.compute_key = + cryptodev_dh_compute_key; ++ cryptodev_dh.compute_key_async = ++ cryptodev_dh_compute_key_async; + } + if (cryptodev_asymfeat & CRF_DH_GENERATE_KEY) { + cryptodev_dh.generate_key = + cryptodev_dh_keygen; ++ cryptodev_dh.generate_key_async = ++ cryptodev_dh_keygen_async; ++ + } + } + +@@ -2632,10 +3911,14 @@ ENGINE_load_cryptodev(void) + memcpy(&cryptodev_ecdsa, meth, sizeof(ECDSA_METHOD)); + if (cryptodev_asymfeat & CRF_DSA_SIGN) { + cryptodev_ecdsa.ecdsa_do_sign = cryptodev_ecdsa_do_sign; ++ cryptodev_ecdsa.ecdsa_do_sign_async = ++ cryptodev_ecdsa_do_sign_async; + } + if (cryptodev_asymfeat & CRF_DSA_VERIFY) { + cryptodev_ecdsa.ecdsa_do_verify = + cryptodev_ecdsa_verify; ++ cryptodev_ecdsa.ecdsa_do_verify_async = ++ cryptodev_ecdsa_verify_async; + } + } + +@@ -2644,9 +3927,16 @@ ENGINE_load_cryptodev(void) + memcpy(&cryptodev_ecdh, ecdh_meth, sizeof(ECDH_METHOD)); + if (cryptodev_asymfeat & CRF_DH_COMPUTE_KEY) { + cryptodev_ecdh.compute_key = cryptodev_ecdh_compute_key; ++ cryptodev_ecdh.compute_key_async = ++ cryptodev_ecdh_compute_key_async; + } + } + ++ ENGINE_set_check_pkc_availability(engine, cryptodev_check_availability); ++ ENGINE_set_close_instance(engine, cryptodev_close_instance); ++ ENGINE_set_init_instance(engine, cryptodev_init_instance); ++ ENGINE_set_async_map(engine, ENGINE_ALLPKC_ASYNC); ++ + ENGINE_add(engine); + ENGINE_free(engine); + ERR_clear_error(); +diff --git a/crypto/engine/eng_int.h b/crypto/engine/eng_int.h +index 451ef8f..8fc3077 100644 +--- a/crypto/engine/eng_int.h ++++ b/crypto/engine/eng_int.h +@@ -181,7 +181,29 @@ struct engine_st + ENGINE_LOAD_KEY_PTR load_pubkey; + + ENGINE_SSL_CLIENT_CERT_PTR load_ssl_client_cert; +- ++ /* ++ * Instantiate Engine handle to be passed in check_pkc_availability ++ * Ensure that Engine is instantiated before any pkc asynchronous call. ++ */ ++ void *(*engine_init_instance)(void); ++ /* ++ * Instantiated Engine handle will be closed with this call. ++ * Ensure that no pkc asynchronous call is made after this call ++ */ ++ void (*engine_close_instance)(void *handle); ++ /* ++ * Check availability will extract the data from kernel. ++ * eng_handle: This is the Engine handle corresponds to which ++ * the cookies needs to be polled. ++ * return 0 if cookie available else 1 ++ */ ++ int (*check_pkc_availability)(void *eng_handle); ++ /* ++ * The following map is used to check if the engine supports asynchronous implementation ++ * ENGINE_ASYNC_FLAG* for available bitmap. Any application checking for asynchronous ++ * implementation need to check this features using "int ENGINE_get_async_map(engine *)"; ++ */ ++ int async_map; + const ENGINE_CMD_DEFN *cmd_defns; + int flags; + /* reference count on the structure itself */ +diff --git a/crypto/engine/eng_lib.c b/crypto/engine/eng_lib.c +index 18a6664..6fa621c 100644 +--- a/crypto/engine/eng_lib.c ++++ b/crypto/engine/eng_lib.c +@@ -98,7 +98,11 @@ void engine_set_all_null(ENGINE *e) + e->ctrl = NULL; + e->load_privkey = NULL; + e->load_pubkey = NULL; ++ e->check_pkc_availability = NULL; ++ e->engine_init_instance = NULL; ++ e->engine_close_instance = NULL; + e->cmd_defns = NULL; ++ e->async_map = 0; + e->flags = 0; + } + +@@ -233,6 +237,48 @@ int ENGINE_set_id(ENGINE *e, const char *id) + return 1; + } + ++void ENGINE_set_init_instance(ENGINE *e, void *(*engine_init_instance)(void)) ++ { ++ e->engine_init_instance = engine_init_instance; ++ } ++ ++void ENGINE_set_close_instance(ENGINE *e, ++ void (*engine_close_instance)(void *)) ++ { ++ e->engine_close_instance = engine_close_instance; ++ } ++ ++void ENGINE_set_async_map(ENGINE *e, int async_map) ++ { ++ e->async_map = async_map; ++ } ++ ++void *ENGINE_init_instance(ENGINE *e) ++ { ++ return e->engine_init_instance(); ++ } ++ ++void ENGINE_close_instance(ENGINE *e, void *eng_handle) ++ { ++ e->engine_close_instance(eng_handle); ++ } ++ ++int ENGINE_get_async_map(ENGINE *e) ++ { ++ return e->async_map; ++ } ++ ++void ENGINE_set_check_pkc_availability(ENGINE *e, ++ int (*check_pkc_availability)(void *eng_handle)) ++ { ++ e->check_pkc_availability = check_pkc_availability; ++ } ++ ++int ENGINE_check_pkc_availability(ENGINE *e, void *eng_handle) ++ { ++ return e->check_pkc_availability(eng_handle); ++ } ++ + int ENGINE_set_name(ENGINE *e, const char *name) + { + if(name == NULL) +diff --git a/crypto/engine/engine.h b/crypto/engine/engine.h +index 237a6c9..ccff86a 100644 +--- a/crypto/engine/engine.h ++++ b/crypto/engine/engine.h +@@ -473,6 +473,30 @@ ENGINE *ENGINE_new(void); + int ENGINE_free(ENGINE *e); + int ENGINE_up_ref(ENGINE *e); + int ENGINE_set_id(ENGINE *e, const char *id); ++void ENGINE_set_init_instance(ENGINE *e, void *(*engine_init_instance)(void)); ++void ENGINE_set_close_instance(ENGINE *e, ++ void (*engine_free_instance)(void *)); ++/* ++ * Following FLAGS are bitmap store in async_map to set asynchronous interface capability ++ *of the engine ++ */ ++#define ENGINE_RSA_ASYNC 0x0001 ++#define ENGINE_DSA_ASYNC 0x0002 ++#define ENGINE_DH_ASYNC 0x0004 ++#define ENGINE_ECDSA_ASYNC 0x0008 ++#define ENGINE_ECDH_ASYNC 0x0010 ++#define ENGINE_ALLPKC_ASYNC 0x001F ++/* Engine implementation will set the bitmap based on above flags using following API */ ++void ENGINE_set_async_map(ENGINE *e, int async_map); ++ /* Application need to check the bitmap based on above flags using following API ++ * to confirm asynchronous methods supported ++ */ ++int ENGINE_get_async_map(ENGINE *e); ++void *ENGINE_init_instance(ENGINE *e); ++void ENGINE_close_instance(ENGINE *e, void *eng_handle); ++void ENGINE_set_check_pkc_availability(ENGINE *e, ++ int (*check_pkc_availability)(void *eng_handle)); ++int ENGINE_check_pkc_availability(ENGINE *e, void *eng_handle); + int ENGINE_set_name(ENGINE *e, const char *name); + int ENGINE_set_RSA(ENGINE *e, const RSA_METHOD *rsa_meth); + int ENGINE_set_DSA(ENGINE *e, const DSA_METHOD *dsa_meth); +diff --git a/crypto/rsa/rsa.h b/crypto/rsa/rsa.h +index 5f269e5..6ef1b15 100644 +--- a/crypto/rsa/rsa.h ++++ b/crypto/rsa/rsa.h +@@ -101,6 +101,29 @@ struct rsa_meth_st + int (*bn_mod_exp)(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, + const BIGNUM *m, BN_CTX *ctx, + BN_MONT_CTX *m_ctx); /* Can be null */ ++ /* ++ * Cookie in the following _async variant must be allocated before ++ * submission and can be freed once its corresponding callback ++ * handler is called ++ */ ++ int (*rsa_pub_enc_asyn)(int flen,const unsigned char *from, ++ unsigned char *to, RSA *rsa, int padding, ++ struct pkc_cookie_s *cookie); ++ int (*rsa_pub_dec_async)(int flen,const unsigned char *from, ++ unsigned char *to, RSA *rsa, int padding, ++ struct pkc_cookie_s *cookie); ++ int (*rsa_priv_enc_async)(int flen,const unsigned char *from, ++ unsigned char *to, RSA *rsa, int padding, ++ struct pkc_cookie_s *cookie); ++ int (*rsa_priv_dec_async)(int flen,const unsigned char *from, ++ unsigned char *to, RSA *rsa, int padding, ++ struct pkc_cookie_s *cookie); ++ int (*rsa_mod_exp_async)(BIGNUM *r0, const BIGNUM *I, RSA *rsa, ++ BN_CTX *ctx, struct pkc_cookie_s *cookie); ++ int (*bn_mod_exp_async)(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, ++ const BIGNUM *m, BN_CTX *ctx, ++ BN_MONT_CTX *m_ctx, struct pkc_cookie_s *cookie); ++ + int (*init)(RSA *rsa); /* called at new */ + int (*finish)(RSA *rsa); /* called at free */ + int flags; /* RSA_METHOD_FLAG_* things */ +-- +1.7.9.7 + diff --git a/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0009-eng_cryptodev-extend-TLS-offload-with-new-algorithms.patch b/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0009-eng_cryptodev-extend-TLS-offload-with-new-algorithms.patch new file mode 100644 index 00000000..a4178841 --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0009-eng_cryptodev-extend-TLS-offload-with-new-algorithms.patch @@ -0,0 +1,106 @@ +From 6555c11c9f62fc37c60bb335cfeb5c9d641e493a Mon Sep 17 00:00:00 2001 +From: Cristian Stoica +Date: Fri, 21 Mar 2014 16:22:27 +0200 +Subject: [PATCH][fsl 09/15] eng_cryptodev: extend TLS offload with new + algorithms + +Upstream-status: Pending + +- aes-192-cbc-hmac-sha1 +- aes-256-cbc-hmac-sha1 + +Signed-off-by: Cristian Stoica +--- + crypto/engine/eng_cryptodev.c | 41 +++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 41 insertions(+) + +diff --git a/crypto/engine/eng_cryptodev.c b/crypto/engine/eng_cryptodev.c +index c5e8fb3..e2d4c53 100644 +--- a/crypto/engine/eng_cryptodev.c ++++ b/crypto/engine/eng_cryptodev.c +@@ -248,6 +248,8 @@ static struct { + { CRYPTO_CAST_CBC, NID_cast5_cbc, 8, 16, 0}, + { CRYPTO_SKIPJACK_CBC, NID_undef, 0, 0, 0}, + { CRYPTO_TLS10_AES_CBC_HMAC_SHA1, NID_aes_128_cbc_hmac_sha1, 16, 16, 20}, ++ { CRYPTO_TLS10_AES_CBC_HMAC_SHA1, NID_aes_192_cbc_hmac_sha1, 16, 24, 20}, ++ { CRYPTO_TLS10_AES_CBC_HMAC_SHA1, NID_aes_256_cbc_hmac_sha1, 16, 32, 20}, + { 0, NID_undef, 0, 0, 0}, + }; + +@@ -536,6 +538,8 @@ static int cryptodev_aead_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, + /* TODO: make a seamless integration with cryptodev flags */ + switch (ctx->cipher->nid) { + case NID_aes_128_cbc_hmac_sha1: ++ case NID_aes_192_cbc_hmac_sha1: ++ case NID_aes_256_cbc_hmac_sha1: + cryp.flags = COP_FLAG_AEAD_TLS_TYPE; + } + cryp.ses = sess->ses; +@@ -729,6 +733,8 @@ static int cryptodev_cbc_hmac_sha1_ctrl(EVP_CIPHER_CTX *ctx, int type, int arg, + /* TODO: this should be an extension of EVP_CIPHER struct */ + switch (ctx->cipher->nid) { + case NID_aes_128_cbc_hmac_sha1: ++ case NID_aes_192_cbc_hmac_sha1: ++ case NID_aes_256_cbc_hmac_sha1: + maclen = SHA_DIGEST_LENGTH; + } + +@@ -871,6 +877,33 @@ const EVP_CIPHER cryptodev_aes_128_cbc_hmac_sha1 = { + NULL + }; + ++const EVP_CIPHER cryptodev_aes_192_cbc_hmac_sha1 = { ++ NID_aes_192_cbc_hmac_sha1, ++ 16, 24, 16, ++ EVP_CIPH_CBC_MODE | EVP_CIPH_FLAG_AEAD_CIPHER, ++ cryptodev_init_aead_key, ++ cryptodev_aead_cipher, ++ cryptodev_cleanup, ++ sizeof(struct dev_crypto_state), ++ EVP_CIPHER_set_asn1_iv, ++ EVP_CIPHER_get_asn1_iv, ++ cryptodev_cbc_hmac_sha1_ctrl, ++ NULL ++}; ++ ++const EVP_CIPHER cryptodev_aes_256_cbc_hmac_sha1 = { ++ NID_aes_256_cbc_hmac_sha1, ++ 16, 32, 16, ++ EVP_CIPH_CBC_MODE | EVP_CIPH_FLAG_AEAD_CIPHER, ++ cryptodev_init_aead_key, ++ cryptodev_aead_cipher, ++ cryptodev_cleanup, ++ sizeof(struct dev_crypto_state), ++ EVP_CIPHER_set_asn1_iv, ++ EVP_CIPHER_get_asn1_iv, ++ cryptodev_cbc_hmac_sha1_ctrl, ++ NULL ++}; + /* + * Registered by the ENGINE when used to find out how to deal with + * a particular NID in the ENGINE. this says what we'll do at the +@@ -911,6 +944,12 @@ cryptodev_engine_ciphers(ENGINE *e, const EVP_CIPHER **cipher, + case NID_aes_128_cbc_hmac_sha1: + *cipher = &cryptodev_aes_128_cbc_hmac_sha1; + break; ++ case NID_aes_192_cbc_hmac_sha1: ++ *cipher = &cryptodev_aes_192_cbc_hmac_sha1; ++ break; ++ case NID_aes_256_cbc_hmac_sha1: ++ *cipher = &cryptodev_aes_256_cbc_hmac_sha1; ++ break; + default: + *cipher = NULL; + break; +@@ -3830,6 +3869,8 @@ ENGINE_load_cryptodev(void) + put_dev_crypto(fd); + + EVP_add_cipher(&cryptodev_aes_128_cbc_hmac_sha1); ++ EVP_add_cipher(&cryptodev_aes_192_cbc_hmac_sha1); ++ EVP_add_cipher(&cryptodev_aes_256_cbc_hmac_sha1); + if (!ENGINE_set_id(engine, "cryptodev") || + !ENGINE_set_name(engine, "BSD cryptodev engine") || + !ENGINE_set_ciphers(engine, cryptodev_engine_ciphers) || +-- +1.7.9.7 + diff --git a/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0010-Add-RSA-keygen-operation-and-support-gendsa-command-.patch b/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0010-Add-RSA-keygen-operation-and-support-gendsa-command-.patch new file mode 100644 index 00000000..4eaaeaaa --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0010-Add-RSA-keygen-operation-and-support-gendsa-command-.patch @@ -0,0 +1,153 @@ +From a08f27a22d2c78f058b63dd2565925ca92ad08b2 Mon Sep 17 00:00:00 2001 +From: Hou Zhiqiang +Date: Wed, 2 Apr 2014 16:10:43 +0800 +Subject: [PATCH][fsl 10/15] Add RSA keygen operation and support gendsa + command with hardware engine + +Upstream-status: Pending + +Signed-off-by: Hou Zhiqiang +Tested-by: Cristian Stoica +--- + crypto/engine/eng_cryptodev.c | 118 +++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 118 insertions(+) + +diff --git a/crypto/engine/eng_cryptodev.c b/crypto/engine/eng_cryptodev.c +index e2d4c53..0a6567c 100644 +--- a/crypto/engine/eng_cryptodev.c ++++ b/crypto/engine/eng_cryptodev.c +@@ -1912,6 +1912,121 @@ err: + return dsaret; + } + ++/* Cryptodev RSA Key Gen routine */ ++static int cryptodev_rsa_keygen(RSA *rsa, int bits, BIGNUM *e, BN_GENCB *cb) ++{ ++ struct crypt_kop kop; ++ int ret, fd; ++ int p_len, q_len; ++ int i; ++ ++ if ((fd = get_asym_dev_crypto()) < 0) ++ return fd; ++ ++ if(!rsa->n && ((rsa->n=BN_new()) == NULL)) goto err; ++ if(!rsa->d && ((rsa->d=BN_new()) == NULL)) goto err; ++ if(!rsa->e && ((rsa->e=BN_new()) == NULL)) goto err; ++ if(!rsa->p && ((rsa->p=BN_new()) == NULL)) goto err; ++ if(!rsa->q && ((rsa->q=BN_new()) == NULL)) goto err; ++ if(!rsa->dmp1 && ((rsa->dmp1=BN_new()) == NULL)) goto err; ++ if(!rsa->dmq1 && ((rsa->dmq1=BN_new()) == NULL)) goto err; ++ if(!rsa->iqmp && ((rsa->iqmp=BN_new()) == NULL)) goto err; ++ ++ BN_copy(rsa->e, e); ++ ++ p_len = (bits+1) / (2 * 8); ++ q_len = (bits - p_len * 8) / 8; ++ memset(&kop, 0, sizeof kop); ++ kop.crk_op = CRK_RSA_GENERATE_KEY; ++ ++ /* p length */ ++ kop.crk_param[kop.crk_iparams].crp_p = calloc(p_len + 1, sizeof(char)); ++ if (!kop.crk_param[kop.crk_iparams].crp_p) ++ goto err; ++ kop.crk_param[kop.crk_iparams].crp_nbits = p_len * 8; ++ memset(kop.crk_param[kop.crk_iparams].crp_p, 0xff, p_len + 1); ++ kop.crk_iparams++; ++ kop.crk_oparams++; ++ /* q length */ ++ kop.crk_param[kop.crk_iparams].crp_p = calloc(q_len + 1, sizeof(char)); ++ if (!kop.crk_param[kop.crk_iparams].crp_p) ++ goto err; ++ kop.crk_param[kop.crk_iparams].crp_nbits = q_len * 8; ++ memset(kop.crk_param[kop.crk_iparams].crp_p, 0xff, q_len + 1); ++ kop.crk_iparams++; ++ kop.crk_oparams++; ++ /* n length */ ++ kop.crk_param[kop.crk_iparams].crp_p = calloc(p_len + q_len + 1, sizeof(char)); ++ if (!kop.crk_param[kop.crk_iparams].crp_p) ++ goto err; ++ kop.crk_param[kop.crk_iparams].crp_nbits = bits; ++ memset(kop.crk_param[kop.crk_iparams].crp_p, 0x00, p_len + q_len + 1); ++ kop.crk_iparams++; ++ kop.crk_oparams++; ++ /* d length */ ++ kop.crk_param[kop.crk_iparams].crp_p = calloc(p_len + q_len + 1, sizeof(char)); ++ if (!kop.crk_param[kop.crk_iparams].crp_p) ++ goto err; ++ kop.crk_param[kop.crk_iparams].crp_nbits = bits; ++ memset(kop.crk_param[kop.crk_iparams].crp_p, 0xff, p_len + q_len + 1); ++ kop.crk_iparams++; ++ kop.crk_oparams++; ++ /* dp1 length */ ++ kop.crk_param[kop.crk_iparams].crp_p = calloc(p_len + 1, sizeof(char)); ++ if (!kop.crk_param[kop.crk_iparams].crp_p) ++ goto err; ++ kop.crk_param[kop.crk_iparams].crp_nbits = p_len * 8; ++ memset(kop.crk_param[kop.crk_iparams].crp_p, 0xff, p_len + 1); ++ kop.crk_iparams++; ++ kop.crk_oparams++; ++ /* dq1 length */ ++ kop.crk_param[kop.crk_iparams].crp_p = calloc(q_len + 1, sizeof(char)); ++ if (!kop.crk_param[kop.crk_iparams].crp_p) ++ goto err; ++ kop.crk_param[kop.crk_iparams].crp_nbits = q_len * 8; ++ memset(kop.crk_param[kop.crk_iparams].crp_p, 0xff, q_len + 1); ++ kop.crk_iparams++; ++ kop.crk_oparams++; ++ /* i length */ ++ kop.crk_param[kop.crk_iparams].crp_p = calloc(p_len + 1, sizeof(char)); ++ if (!kop.crk_param[kop.crk_iparams].crp_p) ++ goto err; ++ kop.crk_param[kop.crk_iparams].crp_nbits = p_len * 8; ++ memset(kop.crk_param[kop.crk_iparams].crp_p, 0xff, p_len + 1); ++ kop.crk_iparams++; ++ kop.crk_oparams++; ++ ++ if (ioctl(fd, CIOCKEY, &kop) == 0) { ++ BN_bin2bn(kop.crk_param[0].crp_p, ++ p_len, rsa->p); ++ BN_bin2bn(kop.crk_param[1].crp_p, ++ q_len, rsa->q); ++ BN_bin2bn(kop.crk_param[2].crp_p, ++ bits / 8, rsa->n); ++ BN_bin2bn(kop.crk_param[3].crp_p, ++ bits / 8, rsa->d); ++ BN_bin2bn(kop.crk_param[4].crp_p, ++ p_len, rsa->dmp1); ++ BN_bin2bn(kop.crk_param[5].crp_p, ++ q_len, rsa->dmq1); ++ BN_bin2bn(kop.crk_param[6].crp_p, ++ p_len, rsa->iqmp); ++ return 1; ++ } ++sw_try: ++ { ++ const RSA_METHOD *meth = RSA_PKCS1_SSLeay(); ++ ret = (meth->rsa_keygen)(rsa, bits, e, cb); ++ } ++ return ret; ++ ++err: ++ for (i = 0; i < CRK_MAXPARAM; i++) ++ free(kop.crk_param[i].crp_p); ++ return 0; ++ ++} ++ + /* Cryptodev DSA Key Gen routine */ + static int cryptodev_dsa_keygen(DSA *dsa) + { +@@ -3905,6 +4020,9 @@ ENGINE_load_cryptodev(void) + cryptodev_rsa.rsa_mod_exp_async = + cryptodev_rsa_nocrt_mod_exp_async; + } ++ if (cryptodev_asymfeat & CRF_RSA_GENERATE_KEY) ++ cryptodev_rsa.rsa_keygen = ++ cryptodev_rsa_keygen; + } + } + +-- +1.7.9.7 + diff --git a/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0011-RSA-Keygen-Fix.patch b/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0011-RSA-Keygen-Fix.patch new file mode 100644 index 00000000..b2d636a4 --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0011-RSA-Keygen-Fix.patch @@ -0,0 +1,64 @@ +From f44fc935d5bc601cd625a64a366e64b19f2bb730 Mon Sep 17 00:00:00 2001 +From: Yashpal Dutta +Date: Wed, 16 Apr 2014 22:53:04 +0545 +Subject: [PATCH][fsl 11/15] RSA Keygen Fix + +Upstream-status: Pending + +If Kernel driver doesn't support RSA Keygen or same returns +error handling the keygen operation, the keygen is gracefully +handled by software supported rsa_keygen handler + +Signed-off-by: Yashpal Dutta +Tested-by: Cristian Stoica +--- + crypto/engine/eng_cryptodev.c | 12 +++++++----- + 1 file changed, 7 insertions(+), 5 deletions(-) + +diff --git a/crypto/engine/eng_cryptodev.c b/crypto/engine/eng_cryptodev.c +index 0a6567c..5d54f7e 100644 +--- a/crypto/engine/eng_cryptodev.c ++++ b/crypto/engine/eng_cryptodev.c +@@ -1921,7 +1921,7 @@ static int cryptodev_rsa_keygen(RSA *rsa, int bits, BIGNUM *e, BN_GENCB *cb) + int i; + + if ((fd = get_asym_dev_crypto()) < 0) +- return fd; ++ goto sw_try; + + if(!rsa->n && ((rsa->n=BN_new()) == NULL)) goto err; + if(!rsa->d && ((rsa->d=BN_new()) == NULL)) goto err; +@@ -1942,7 +1942,7 @@ static int cryptodev_rsa_keygen(RSA *rsa, int bits, BIGNUM *e, BN_GENCB *cb) + /* p length */ + kop.crk_param[kop.crk_iparams].crp_p = calloc(p_len + 1, sizeof(char)); + if (!kop.crk_param[kop.crk_iparams].crp_p) +- goto err; ++ goto sw_try; + kop.crk_param[kop.crk_iparams].crp_nbits = p_len * 8; + memset(kop.crk_param[kop.crk_iparams].crp_p, 0xff, p_len + 1); + kop.crk_iparams++; +@@ -1950,7 +1950,7 @@ static int cryptodev_rsa_keygen(RSA *rsa, int bits, BIGNUM *e, BN_GENCB *cb) + /* q length */ + kop.crk_param[kop.crk_iparams].crp_p = calloc(q_len + 1, sizeof(char)); + if (!kop.crk_param[kop.crk_iparams].crp_p) +- goto err; ++ goto sw_try; + kop.crk_param[kop.crk_iparams].crp_nbits = q_len * 8; + memset(kop.crk_param[kop.crk_iparams].crp_p, 0xff, q_len + 1); + kop.crk_iparams++; +@@ -2015,8 +2015,10 @@ static int cryptodev_rsa_keygen(RSA *rsa, int bits, BIGNUM *e, BN_GENCB *cb) + } + sw_try: + { +- const RSA_METHOD *meth = RSA_PKCS1_SSLeay(); +- ret = (meth->rsa_keygen)(rsa, bits, e, cb); ++ const RSA_METHOD *meth = rsa->meth; ++ rsa->meth = RSA_PKCS1_SSLeay(); ++ ret = RSA_generate_key_ex(rsa, bits, e, cb); ++ rsa->meth = meth; + } + return ret; + +-- +1.7.9.7 + diff --git a/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0012-Removed-local-copy-of-curve_t-type.patch b/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0012-Removed-local-copy-of-curve_t-type.patch new file mode 100644 index 00000000..077b08e7 --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0012-Removed-local-copy-of-curve_t-type.patch @@ -0,0 +1,164 @@ +From 7a6848210c3b2f42aed4de60646e0e63c0e35fcb Mon Sep 17 00:00:00 2001 +From: Yashpal Dutta +Date: Thu, 17 Apr 2014 06:57:59 +0545 +Subject: [PATCH][fsl 12/15] Removed local copy of curve_t type + +Upstream-status: Pending + +Signed-off-by: Yashpal Dutta +Tested-by: Cristian Stoica +--- + crypto/engine/eng_cryptodev.c | 34 ++++++++++++++-------------------- + crypto/engine/eng_cryptodev_ec.h | 7 ------- + 2 files changed, 14 insertions(+), 27 deletions(-) + +diff --git a/crypto/engine/eng_cryptodev.c b/crypto/engine/eng_cryptodev.c +index 5d54f7e..33447c8 100644 +--- a/crypto/engine/eng_cryptodev.c ++++ b/crypto/engine/eng_cryptodev.c +@@ -2404,12 +2404,6 @@ static ECDSA_METHOD cryptodev_ecdsa = { + NULL /* app_data */ + }; + +-typedef enum ec_curve_s +-{ +- EC_PRIME, +- EC_BINARY +-} ec_curve_t; +- + /* ENGINE handler for ECDSA Sign */ + static ECDSA_SIG *cryptodev_ecdsa_do_sign( const unsigned char *dgst, + int dgst_len, const BIGNUM *in_kinv, const BIGNUM *in_r, EC_KEY *eckey) +@@ -2426,7 +2420,7 @@ static ECDSA_SIG *cryptodev_ecdsa_do_sign( const unsigned char *dgst, + const BIGNUM *order = NULL, *priv_key=NULL; + const EC_GROUP *group = NULL; + struct crypt_kop kop; +- ec_curve_t ec_crv = EC_PRIME; ++ enum ec_curve_t ec_crv = EC_PRIME; + + memset(&kop, 0, sizeof(kop)); + ecdsa = ecdsa_check(eckey); +@@ -2559,7 +2553,7 @@ static ECDSA_SIG *cryptodev_ecdsa_do_sign( const unsigned char *dgst, + else + goto err; + } +- kop.curve_type = ECC_BINARY; ++ kop.curve_type = EC_BINARY; + } + + /* Calculation of Generator point */ +@@ -2653,7 +2647,7 @@ static int cryptodev_ecdsa_verify(const unsigned char *dgst, int dgst_len, + const EC_POINT *pub_key = NULL; + const BIGNUM *order = NULL; + const EC_GROUP *group=NULL; +- ec_curve_t ec_crv = EC_PRIME; ++ enum ec_curve_t ec_crv = EC_PRIME; + struct crypt_kop kop; + + memset(&kop, 0, sizeof kop); +@@ -2798,7 +2792,7 @@ static int cryptodev_ecdsa_verify(const unsigned char *dgst, int dgst_len, + else + goto err; + } +- kop.curve_type = ECC_BINARY; ++ kop.curve_type = EC_BINARY; + } + + /* Calculation of Generator point */ +@@ -2899,7 +2893,7 @@ static int cryptodev_ecdsa_do_sign_async( const unsigned char *dgst, + const BIGNUM *order = NULL, *priv_key=NULL; + const EC_GROUP *group = NULL; + struct crypt_kop *kop = malloc(sizeof(struct crypt_kop)); +- ec_curve_t ec_crv = EC_PRIME; ++ enum ec_curve_t ec_crv = EC_PRIME; + + if (!(sig->r = BN_new()) || !kop) + goto err; +@@ -3035,7 +3029,7 @@ static int cryptodev_ecdsa_do_sign_async( const unsigned char *dgst, + else + goto err; + } +- kop->curve_type = ECC_BINARY; ++ kop->curve_type = EC_BINARY; + } + + /* Calculation of Generator point */ +@@ -3111,7 +3105,7 @@ static int cryptodev_ecdsa_verify_async(const unsigned char *dgst, int dgst_len, + const EC_POINT *pub_key = NULL; + const BIGNUM *order = NULL; + const EC_GROUP *group=NULL; +- ec_curve_t ec_crv = EC_PRIME; ++ enum ec_curve_t ec_crv = EC_PRIME; + struct crypt_kop *kop = malloc(sizeof(struct crypt_kop)); + + if (!kop) +@@ -3253,7 +3247,7 @@ static int cryptodev_ecdsa_verify_async(const unsigned char *dgst, int dgst_len, + /* copy b' i.e c(b), instead of only b */ + eng_ec_get_cparam (EC_GROUP_get_curve_name(group), + ab+q_len, q_len); +- kop->curve_type = ECC_BINARY; ++ kop->curve_type = EC_BINARY; + } + + /* Calculation of Generator point */ +@@ -3558,7 +3552,7 @@ int cryptodev_ecdh_compute_key(void *out, size_t outlen, + const EC_POINT *pub_key, EC_KEY *ecdh, void *(*KDF)(const void *in, size_t inlen, + void *out, size_t *outlen)) + { +- ec_curve_t ec_crv = EC_PRIME; ++ enum ec_curve_t ec_crv = EC_PRIME; + unsigned char * q = NULL, *w_xy = NULL, *ab = NULL, *s = NULL, *r = NULL; + BIGNUM * w_x = NULL, *w_y = NULL; + int q_len = 0, ab_len = 0, pub_key_len = 0, r_len = 0, priv_key_len = 0; +@@ -3684,9 +3678,9 @@ int cryptodev_ecdh_compute_key(void *out, size_t outlen, + else + goto err; + } +- kop.curve_type = ECC_BINARY; ++ kop.curve_type = EC_BINARY; + } else +- kop.curve_type = ECC_PRIME; ++ kop.curve_type = EC_PRIME; + + priv_key_len = r_len; + +@@ -3735,7 +3729,7 @@ int cryptodev_ecdh_compute_key_async(void *out, size_t outlen, + const EC_POINT *pub_key, EC_KEY *ecdh, void *(*KDF)(const void *in, size_t inlen, + void *out, size_t *outlen), struct pkc_cookie_s *cookie) + { +- ec_curve_t ec_crv = EC_PRIME; ++ enum ec_curve_t ec_crv = EC_PRIME; + unsigned char * q = NULL, *w_xy = NULL, *ab = NULL, *s = NULL, *r = NULL; + BIGNUM * w_x = NULL, *w_y = NULL; + int q_len = 0, ab_len = 0, pub_key_len = 0, r_len = 0, priv_key_len = 0; +@@ -3863,9 +3857,9 @@ int cryptodev_ecdh_compute_key_async(void *out, size_t outlen, + else + goto err; + } +- kop->curve_type = ECC_BINARY; ++ kop->curve_type = EC_BINARY; + } else +- kop->curve_type = ECC_PRIME; ++ kop->curve_type = EC_PRIME; + + priv_key_len = r_len; + +diff --git a/crypto/engine/eng_cryptodev_ec.h b/crypto/engine/eng_cryptodev_ec.h +index 77aee71..a4b8da5 100644 +--- a/crypto/engine/eng_cryptodev_ec.h ++++ b/crypto/engine/eng_cryptodev_ec.h +@@ -286,11 +286,4 @@ static inline unsigned char *eng_copy_curve_points(BIGNUM * x, BIGNUM * y, + + return xy; + } +- +-enum curve_t { +- DISCRETE_LOG, +- ECC_PRIME, +- ECC_BINARY, +- MAX_ECC_TYPE +-}; + #endif +-- +1.7.9.7 + diff --git a/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0013-Modulus-parameter-is-not-populated-by-dhparams.patch b/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0013-Modulus-parameter-is-not-populated-by-dhparams.patch new file mode 100644 index 00000000..11f06226 --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0013-Modulus-parameter-is-not-populated-by-dhparams.patch @@ -0,0 +1,43 @@ +From 8aabfeb1308188a46d3f370cd757de130e73eb9b Mon Sep 17 00:00:00 2001 +From: Yashpal Dutta +Date: Tue, 22 Apr 2014 22:58:33 +0545 +Subject: [PATCH][fsl 13/15] Modulus parameter is not populated by dhparams + +Upstream-status: Pending + +When dhparams are created, modulus parameter required for +private key generation is not populated. So, falling back +to software for proper population of modulus parameters followed +by private key generation + +Signed-off-by: Yashpal Dutta +Tested-by: Cristian Stoica +--- + crypto/engine/eng_cryptodev.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/crypto/engine/eng_cryptodev.c b/crypto/engine/eng_cryptodev.c +index 33447c8..8de8f09 100644 +--- a/crypto/engine/eng_cryptodev.c ++++ b/crypto/engine/eng_cryptodev.c +@@ -3370,7 +3370,7 @@ static int cryptodev_dh_keygen_async(DH *dh, struct pkc_cookie_s *cookie) + kop->crk_op = CRK_DH_GENERATE_KEY; + if (bn2crparam(dh->p, &kop->crk_param[0])) + goto sw_try; +- if (bn2crparam(dh->q, &kop->crk_param[1])) ++ if (!dh->q || bn2crparam(dh->q, &kop->crk_param[1])) + goto sw_try; + kop->crk_param[2].crp_p = g; + kop->crk_param[2].crp_nbits = g_len * 8; +@@ -3425,7 +3425,7 @@ static int cryptodev_dh_keygen(DH *dh) + kop.crk_op = CRK_DH_GENERATE_KEY; + if (bn2crparam(dh->p, &kop.crk_param[0])) + goto sw_try; +- if (bn2crparam(dh->q, &kop.crk_param[1])) ++ if (!dh->q || bn2crparam(dh->q, &kop.crk_param[1])) + goto sw_try; + kop.crk_param[2].crp_p = g; + kop.crk_param[2].crp_nbits = g_len * 8; +-- +1.7.9.7 + diff --git a/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0014-SW-Backoff-mechanism-for-dsa-keygen.patch b/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0014-SW-Backoff-mechanism-for-dsa-keygen.patch new file mode 100644 index 00000000..e5aa1baa --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0014-SW-Backoff-mechanism-for-dsa-keygen.patch @@ -0,0 +1,53 @@ +From 8b1ed323d08dce8b6e303ce63a82337543e9187f Mon Sep 17 00:00:00 2001 +From: Yashpal Dutta +Date: Thu, 24 Apr 2014 00:35:34 +0545 +Subject: [PATCH][fsl 14/15] SW Backoff mechanism for dsa keygen + +Upstream-status: Pending + +DSA Keygen is not handled in default openssl dsa method. Due to +same null function pointer in SW DSA method, the backoff for dsa +keygen gives segmentation fault. + +Signed-off-by: Yashpal Dutta +Tested-by: Cristian Stoica +--- + crypto/engine/eng_cryptodev.c | 12 ++++++++---- + 1 file changed, 8 insertions(+), 4 deletions(-) + +diff --git a/crypto/engine/eng_cryptodev.c b/crypto/engine/eng_cryptodev.c +index 8de8f09..7c2661f 100644 +--- a/crypto/engine/eng_cryptodev.c ++++ b/crypto/engine/eng_cryptodev.c +@@ -2075,8 +2075,10 @@ static int cryptodev_dsa_keygen(DSA *dsa) + return ret; + sw_try: + { +- const DSA_METHOD *meth = DSA_OpenSSL(); +- ret = (meth->dsa_keygen)(dsa); ++ const DSA_METHOD *meth = dsa->meth; ++ dsa->meth = DSA_OpenSSL(); ++ ret = DSA_generate_key(dsa); ++ dsa->meth = meth; + } + return ret; + } +@@ -2130,11 +2132,13 @@ static int cryptodev_dsa_keygen_async(DSA *dsa, struct pkc_cookie_s *cookie) + return ret; + sw_try: + { +- const DSA_METHOD *meth = DSA_OpenSSL(); ++ const DSA_METHOD *meth = dsa->meth; + ++ dsa->meth = DSA_OpenSSL(); + if (kop) + free(kop); +- ret = (meth->dsa_keygen)(dsa); ++ ret = DSA_generate_key(dsa); ++ dsa->meth = meth; + cookie->pkc_callback(cookie, 0); + } + return ret; +-- +1.7.9.7 + diff --git a/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0015-Fixed-DH-keygen-pair-generator.patch b/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0015-Fixed-DH-keygen-pair-generator.patch new file mode 100644 index 00000000..99e6094f --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0015-Fixed-DH-keygen-pair-generator.patch @@ -0,0 +1,100 @@ +From 9dfc18846063a110070782ede699c513b30257e5 Mon Sep 17 00:00:00 2001 +From: Yashpal Dutta +Date: Thu, 1 May 2014 06:35:45 +0545 +Subject: [PATCH][fsl 15/15] Fixed DH keygen pair generator + +Upstream-status: Pending + +Wrong Padding results into keygen length error + +Signed-off-by: Yashpal Dutta +Tested-by: Cristian Stoica +--- + crypto/engine/eng_cryptodev.c | 50 +++++++++++++++++++++++++++-------------- + 1 file changed, 33 insertions(+), 17 deletions(-) + +diff --git a/crypto/engine/eng_cryptodev.c b/crypto/engine/eng_cryptodev.c +index 7c2661f..703eee4 100644 +--- a/crypto/engine/eng_cryptodev.c ++++ b/crypto/engine/eng_cryptodev.c +@@ -3402,44 +3402,60 @@ sw_try: + static int cryptodev_dh_keygen(DH *dh) + { + struct crypt_kop kop; +- int ret = 1, g_len; +- unsigned char *g = NULL; ++ int ret = 1, q_len = 0; ++ unsigned char *q = NULL, *g = NULL, *s = NULL, *w = NULL; ++ BIGNUM *pub_key = NULL, *priv_key = NULL; ++ int generate_new_key = 1; + +- if (dh->priv_key == NULL) { +- if ((dh->priv_key=BN_new()) == NULL) +- goto sw_try; +- } ++ if (dh->priv_key) ++ priv_key = dh->priv_key; + +- if (dh->pub_key == NULL) { +- if ((dh->pub_key=BN_new()) == NULL) +- goto sw_try; +- } ++ if (dh->pub_key) ++ pub_key = dh->pub_key; + +- g_len = BN_num_bytes(dh->p); ++ q_len = BN_num_bytes(dh->p); + /** + * Get generator into a plain buffer. If length is less than + * q_len then add leading padding bytes. + */ +- if (spcf_bn2bin_ex(dh->g, &g, &g_len)) { ++ if (spcf_bn2bin_ex(dh->g, &g, &q_len)) { ++ DSAerr(DH_F_DH_GENERATE_KEY, ERR_R_MALLOC_FAILURE); ++ goto sw_try; ++ } ++ ++ if (spcf_bn2bin_ex(dh->p, &q, &q_len)) { + DSAerr(DH_F_DH_GENERATE_KEY, ERR_R_MALLOC_FAILURE); + goto sw_try; + } + + memset(&kop, 0, sizeof kop); + kop.crk_op = CRK_DH_GENERATE_KEY; +- if (bn2crparam(dh->p, &kop.crk_param[0])) +- goto sw_try; ++ kop.crk_param[0].crp_p = q; ++ kop.crk_param[0].crp_nbits = q_len * 8; + if (!dh->q || bn2crparam(dh->q, &kop.crk_param[1])) + goto sw_try; + kop.crk_param[2].crp_p = g; +- kop.crk_param[2].crp_nbits = g_len * 8; ++ kop.crk_param[2].crp_nbits = q_len * 8; + kop.crk_iparams = 3; + ++ s = OPENSSL_malloc (q_len); ++ if (!s) { ++ DSAerr(DH_F_DH_GENERATE_KEY, ERR_R_MALLOC_FAILURE); ++ goto sw_try; ++ } ++ ++ w = OPENSSL_malloc (q_len); ++ if (!w) { ++ DSAerr(DH_F_DH_GENERATE_KEY, ERR_R_MALLOC_FAILURE); ++ goto sw_try; ++ } ++ + /* pub_key is or prime length while priv key is of length of order */ +- if (cryptodev_asym(&kop, BN_num_bytes(dh->p), dh->pub_key, +- BN_num_bytes(dh->q), dh->priv_key)) ++ if (cryptodev_asym(&kop, q_len, w, q_len, s)) + goto sw_try; + ++ dh->pub_key = BN_bin2bn(w, q_len, pub_key); ++ dh->pub_key = BN_bin2bn(s, q_len, priv_key); + return ret; + sw_try: + { +-- +1.7.9.7 + diff --git a/meta-fsl-ppc/recipes-connectivity/openssl/openssl_1.0.1g.bbappend b/meta-fsl-ppc/recipes-connectivity/openssl/openssl_1.0.1g.bbappend new file mode 100644 index 00000000..f3e49aeb --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/openssl/openssl_1.0.1g.bbappend @@ -0,0 +1,59 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/openssl-fsl" + +RDEPENDS_${PN}_class-target += "cryptodev-module" + +# base package is taken from Freescale repository +SRCBRANCH = "OpenSSL_1_0_1-stable" +SRC_URI = "git://git.openssl.org/openssl.git;branch=${SRCBRANCH} \ + file://0001-remove-double-initialization-of-cryptodev-engine.patch \ + file://0002-ECC-Support-header-for-Cryptodev-Engine.patch \ + file://0003-add-support-for-TLS-algorithms-offload.patch \ + file://0004-Fixed-private-key-support-for-DH.patch \ + file://0005-Fixed-private-key-support-for-DH.patch \ + file://0006-Initial-support-for-PKC-in-cryptodev-engine.patch \ + file://0007-Added-hwrng-dev-file-as-source-of-RNG.patch \ + file://0008-Asynchronous-interface-added-for-PKC-cryptodev-inter.patch \ + file://0009-eng_cryptodev-extend-TLS-offload-with-new-algorithms.patch \ + file://0010-Add-RSA-keygen-operation-and-support-gendsa-command-.patch \ + file://0011-RSA-Keygen-Fix.patch \ + file://0012-Removed-local-copy-of-curve_t-type.patch \ + file://0013-Modulus-parameter-is-not-populated-by-dhparams.patch \ + file://0014-SW-Backoff-mechanism-for-dsa-keygen.patch \ + file://0015-Fixed-DH-keygen-pair-generator.patch \ +" +SRCREV = "b2d951e4232d2f90168f9a3dd0b7df9ecf2d81a8" + +SRC_URI += "file://configure-targets.patch \ + file://shared-libs.patch \ + file://oe-ldflags.patch \ + file://engines-install-in-libdir-ssl.patch \ + file://openssl-fix-link.patch \ + file://debian/version-script.patch \ + file://debian/pic.patch \ + file://debian/c_rehash-compat.patch \ + file://debian/ca.patch \ + file://debian/make-targets.patch \ + file://debian/no-rpath.patch \ + file://debian/man-dir.patch \ + file://debian/man-section.patch \ + file://debian/no-symbolic.patch \ + file://debian/debian-targets.patch \ + file://openssl_fix_for_x32.patch \ + file://openssl-fix-doc.patch \ + file://fix-cipher-des-ede3-cfb1.patch \ + file://openssl-avoid-NULL-pointer-dereference-in-EVP_DigestInit_ex.patch \ + file://openssl-avoid-NULL-pointer-dereference-in-dh_pub_encode.patch \ + file://initial-aarch64-bits.patch \ + file://find.pl \ + file://openssl-fix-des.pod-error.patch \ + " +S = "${WORKDIR}/git" + +# Digest offloading through cryptodev is not recommended because of the +# performance penalty of the Openssl engine interface. Openssl generates a huge +# number of calls to digest functions for even a small amount of work data. +# For example there are 70 calls to cipher code and over 10000 to digest code +# when downloading only 10 files of 700 bytes each. +# Do not build OpenSSL with cryptodev digest support until engine digest +# interface gets some rework: +CFLAG := "${@'${CFLAG}'.replace('-DUSE_CRYPTODEV_DIGESTS', '')}" -- cgit v1.2.3-54-g00ecf From 53d64ed665d482eeaf642523523800071624f1c6 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Thu, 10 Jul 2014 04:23:50 -0500 Subject: qoriq_build_64bit_kernel.bbclass: add for ppce6500 ppce6500 is a specific core which only support 64bit kernel, introduce qoriq_build_64bit_kernel.bbclass to do this Signed-off-by: Ting Liu --- meta-fsl-ppc/classes/qoriq_build_64bit_kernel.bbclass | 18 ++++++++++++++++++ meta-fsl-ppc/conf/layer.conf | 1 + 2 files changed, 19 insertions(+) create mode 100644 meta-fsl-ppc/classes/qoriq_build_64bit_kernel.bbclass diff --git a/meta-fsl-ppc/classes/qoriq_build_64bit_kernel.bbclass b/meta-fsl-ppc/classes/qoriq_build_64bit_kernel.bbclass new file mode 100644 index 00000000..562afd14 --- /dev/null +++ b/meta-fsl-ppc/classes/qoriq_build_64bit_kernel.bbclass @@ -0,0 +1,18 @@ +inherit distro_features_check +REQUIRED_DISTRO_FEATURES_e6500 += "multiarch" + +python () { + pkgarch = d.getVar("TUNE_PKGARCH", True) + if not "ppce6500" == pkgarch: + return + + promote_kernel = d.getVar('BUILD_64BIT_KERNEL') + if promote_kernel == "1": + d.setVar('KERNEL_CC_append', ' -m64') + d.setVar('KERNEL_LD_append', ' -melf64ppc') + + error_qa = d.getVar('ERROR_QA', True) + if 'arch' in error_qa: + d.setVar('ERROR_QA', error_qa.replace(' arch', '')) +} + diff --git a/meta-fsl-ppc/conf/layer.conf b/meta-fsl-ppc/conf/layer.conf index 0f81db04..9c0a4125 100644 --- a/meta-fsl-ppc/conf/layer.conf +++ b/meta-fsl-ppc/conf/layer.conf @@ -3,6 +3,7 @@ BBPATH .= ":${LAYERDIR}" BBFILES += "${LAYERDIR}/recipes-*/*/*.bb*" BBFILES += "${LAYERDIR}/images/*.bb*" +BBFILES += "${LAYERDIR}/classes/*.bb*" BBFILE_COLLECTIONS += "fsl-ppc" BBFILE_PATTERN_fsl-ppc = "^${LAYERDIR}/" -- cgit v1.2.3-54-g00ecf From 8fb3cb799c52d21ba9ab394532fc7410ce3c5200 Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Sat, 14 Jun 2014 14:38:18 +0800 Subject: cryptodev-linux/module: use fsl maintained source FSL SDK released its own cryptodev based on 1.6, but not all the codes was upstreamed, add bbappend to use fsl maintained source. This change only be applied for fsl machines Signed-off-by: Zhenhua Luo Signed-off-by: Ting Liu --- .../recipes-kernel/cryptodev/cryptodev-fsl.inc | 24 + ...-for-composite-TLS-SHA1-AES-algorithm-off.patch | 53 ++ ...on-local-storage-for-cipher-and-hmac-keys.patch | 87 ++ ...rt-for-aead-keys-for-composite-algorithms.patch | 170 ++++ ...-scatterlist-size-for-in-place-operations.patch | 39 + ..._len-parameter-to-be-provided-by-the-user.patch | 70 ++ .../0006-fix-build-error-on-some-targets.patch | 64 ++ ...dd-support-for-COMPAT_CIOCAUTHCRYPT-ioctl.patch | 209 +++++ .../0008-fix-cipher-algorithm-memleaks.patch | 53 ++ ...009-PKC-support-added-in-cryptodev-module.patch | 898 +++++++++++++++++++++ .../0010-Compat-versions-of-PKC-IOCTLs.patch | 200 +++++ ...ynchronous-interface-changes-in-cryptodev.patch | 213 +++++ ...and-DLC_KEYGEN-supported-in-cryptodev-mod.patch | 213 +++++ ...stall-fixed-in-PKC-asynchronous-interface.patch | 238 ++++++ ...allocation-for-keys-copied-from-userspace.patch | 131 +++ .../0015-Add-RSA-Key-generation-offloading.patch | 170 ++++ ...lation-error-of-openssl-with-fsl-cryptode.patch | 116 +++ .../cryptodev/cryptodev-linux_1.6.bbappend | 2 + .../cryptodev/cryptodev-module_1.6.bbappend | 8 + .../recipes-kernel/cryptodev/cryptodev_1.5.bb | 51 -- ...pile-and-install-rules-for-cryptodev-test.patch | 69 -- .../cryptodev/files/makefile_fixup.patch | 26 - 22 files changed, 2958 insertions(+), 146 deletions(-) create mode 100644 meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl.inc create mode 100644 meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0001-add-support-for-composite-TLS-SHA1-AES-algorithm-off.patch create mode 100644 meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0002-use-function-local-storage-for-cipher-and-hmac-keys.patch create mode 100644 meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0003-Add-support-for-aead-keys-for-composite-algorithms.patch create mode 100644 meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0004-fix-scatterlist-size-for-in-place-operations.patch create mode 100644 meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0005-add-dst_len-parameter-to-be-provided-by-the-user.patch create mode 100644 meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0006-fix-build-error-on-some-targets.patch create mode 100644 meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0007-add-support-for-COMPAT_CIOCAUTHCRYPT-ioctl.patch create mode 100644 meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0008-fix-cipher-algorithm-memleaks.patch create mode 100644 meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0009-PKC-support-added-in-cryptodev-module.patch create mode 100644 meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0010-Compat-versions-of-PKC-IOCTLs.patch create mode 100644 meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0011-Asynchronous-interface-changes-in-cryptodev.patch create mode 100644 meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0012-ECC_KEYGEN-and-DLC_KEYGEN-supported-in-cryptodev-mod.patch create mode 100644 meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0013-RCU-stall-fixed-in-PKC-asynchronous-interface.patch create mode 100644 meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0014-use-static-allocation-for-keys-copied-from-userspace.patch create mode 100644 meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0015-Add-RSA-Key-generation-offloading.patch create mode 100644 meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0016-Fixed-compilation-error-of-openssl-with-fsl-cryptode.patch create mode 100644 meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-linux_1.6.bbappend create mode 100644 meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-module_1.6.bbappend delete mode 100644 meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev_1.5.bb delete mode 100644 meta-fsl-ppc/recipes-kernel/cryptodev/files/Add-the-compile-and-install-rules-for-cryptodev-test.patch delete mode 100644 meta-fsl-ppc/recipes-kernel/cryptodev/files/makefile_fixup.patch diff --git a/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl.inc b/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl.inc new file mode 100644 index 00000000..774ef102 --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl.inc @@ -0,0 +1,24 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/cryptodev-fsl" + +SRC_URI_fslmachine = "git://github.com/nmav/cryptodev-linux.git \ + file://0001-add-support-for-composite-TLS-SHA1-AES-algorithm-off.patch \ + file://0002-use-function-local-storage-for-cipher-and-hmac-keys.patch \ + file://0003-Add-support-for-aead-keys-for-composite-algorithms.patch \ + file://0004-fix-scatterlist-size-for-in-place-operations.patch \ + file://0005-add-dst_len-parameter-to-be-provided-by-the-user.patch \ + file://0006-fix-build-error-on-some-targets.patch \ + file://0007-add-support-for-COMPAT_CIOCAUTHCRYPT-ioctl.patch \ + file://0008-fix-cipher-algorithm-memleaks.patch \ + file://0009-PKC-support-added-in-cryptodev-module.patch \ + file://0010-Compat-versions-of-PKC-IOCTLs.patch \ + file://0011-Asynchronous-interface-changes-in-cryptodev.patch \ + file://0012-ECC_KEYGEN-and-DLC_KEYGEN-supported-in-cryptodev-mod.patch \ + file://0013-RCU-stall-fixed-in-PKC-asynchronous-interface.patch \ + file://0014-use-static-allocation-for-keys-copied-from-userspace.patch \ + file://0015-Add-RSA-Key-generation-offloading.patch \ + file://0016-Fixed-compilation-error-of-openssl-with-fsl-cryptode.patch \ +" +SRCREV_fslmachine = "e8609a408d40c83ae8fc11bbe9a7b3847612669b" + +S_fslmachine = "${WORKDIR}/git" + diff --git a/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0001-add-support-for-composite-TLS-SHA1-AES-algorithm-off.patch b/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0001-add-support-for-composite-TLS-SHA1-AES-algorithm-off.patch new file mode 100644 index 00000000..094fb0b5 --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0001-add-support-for-composite-TLS-SHA1-AES-algorithm-off.patch @@ -0,0 +1,53 @@ +From 434790a1bbafa371c0c6647238234573db98d017 Mon Sep 17 00:00:00 2001 +From: Cristian Stoica +Date: Thu, 29 Aug 2013 16:52:30 +0300 +Subject: [[Patch][fsl 01/16] add support for composite TLS(SHA1,AES) + algorithm offload + +Upstream-status: Pending + +This adds support for composite algorithm offload in a single crypto +(cipher + hmac) operation. + +It requires either software or hardware TLS support in the Linux kernel +and can be used with Freescale B*, P* and T* platforms that have support +for hardware TLS acceleration. + +Signed-off-by: Cristian Stoica +Tested-by: Horia Ioan Geanta Neag +--- + crypto/cryptodev.h | 1 + + ioctl.c | 5 +++++ + 2 files changed, 6 insertions(+) + +diff --git a/crypto/cryptodev.h b/crypto/cryptodev.h +index 7fb9c7d..c0e8cd4 100644 +--- a/crypto/cryptodev.h ++++ b/crypto/cryptodev.h +@@ -50,6 +50,7 @@ enum cryptodev_crypto_op_t { + CRYPTO_SHA2_384, + CRYPTO_SHA2_512, + CRYPTO_SHA2_224_HMAC, ++ CRYPTO_TLS10_AES_CBC_HMAC_SHA1, + CRYPTO_ALGORITHM_ALL, /* Keep updated - see below */ + }; + +diff --git a/ioctl.c b/ioctl.c +index d4e83f4..a0f1db1 100644 +--- a/ioctl.c ++++ b/ioctl.c +@@ -146,6 +146,11 @@ crypto_create_session(struct fcrypt *fcr, struct session_op *sop) + stream = 1; + aead = 1; + break; ++ case CRYPTO_TLS10_AES_CBC_HMAC_SHA1: ++ alg_name = "tls10(hmac(sha1),cbc(aes))"; ++ stream = 0; ++ aead = 1; ++ break; + case CRYPTO_NULL: + alg_name = "ecb(cipher_null)"; + stream = 1; +-- +1.7.9.7 + diff --git a/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0002-use-function-local-storage-for-cipher-and-hmac-keys.patch b/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0002-use-function-local-storage-for-cipher-and-hmac-keys.patch new file mode 100644 index 00000000..4702fd4f --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0002-use-function-local-storage-for-cipher-and-hmac-keys.patch @@ -0,0 +1,87 @@ +From cc65307405a21c3b709ca6f2a6f64ff0c67c0eed Mon Sep 17 00:00:00 2001 +From: Cristian Stoica +Date: Wed, 18 Sep 2013 13:42:31 +0300 +Subject: [[Patch][fsl 02/16] use function-local storage for cipher and hmac + keys + +Upstream-status: Pending + +This refactorization is necessary for next patches that add support for +aead composite ciphers where the aead key is the sum of cipher and hmac +keys. + +Without this patch, the hmac and cipher keys can't be combined in the +same ioctl. + +Signed-off-by: Cristian Stoica +Tested-by: Horia Ioan Geanta Neag +--- + ioctl.c | 14 ++++++-------- + 1 file changed, 6 insertions(+), 8 deletions(-) + +diff --git a/ioctl.c b/ioctl.c +index a0f1db1..c614373 100644 +--- a/ioctl.c ++++ b/ioctl.c +@@ -109,6 +109,8 @@ crypto_create_session(struct fcrypt *fcr, struct session_op *sop) + const char *alg_name = NULL; + const char *hash_name = NULL; + int hmac_mode = 1, stream = 0, aead = 0; ++ uint8_t enckey[CRYPTO_CIPHER_MAX_KEY_LEN]; ++ uint8_t mackey[CRYPTO_HMAC_MAX_KEY_LEN]; + + /* Does the request make sense? */ + if (unlikely(!sop->cipher && !sop->mac)) { +@@ -227,8 +229,6 @@ crypto_create_session(struct fcrypt *fcr, struct session_op *sop) + + /* Set-up crypto transform. */ + if (alg_name) { +- uint8_t keyp[CRYPTO_CIPHER_MAX_KEY_LEN]; +- + if (unlikely(sop->keylen > CRYPTO_CIPHER_MAX_KEY_LEN)) { + ddebug(1, "Setting key failed for %s-%zu.", + alg_name, (size_t)sop->keylen*8); +@@ -236,12 +236,12 @@ crypto_create_session(struct fcrypt *fcr, struct session_op *sop) + goto error_cipher; + } + +- if (unlikely(copy_from_user(keyp, sop->key, sop->keylen))) { ++ if (unlikely(copy_from_user(enckey, sop->key, sop->keylen))) { + ret = -EFAULT; + goto error_cipher; + } + +- ret = cryptodev_cipher_init(&ses_new->cdata, alg_name, keyp, ++ ret = cryptodev_cipher_init(&ses_new->cdata, alg_name, enckey, + sop->keylen, stream, aead); + if (ret < 0) { + ddebug(1, "Failed to load cipher for %s", alg_name); +@@ -251,8 +251,6 @@ crypto_create_session(struct fcrypt *fcr, struct session_op *sop) + } + + if (hash_name && aead == 0) { +- uint8_t keyp[CRYPTO_HMAC_MAX_KEY_LEN]; +- + if (unlikely(sop->mackeylen > CRYPTO_HMAC_MAX_KEY_LEN)) { + ddebug(1, "Setting key failed for %s-%zu.", + hash_name, (size_t)sop->mackeylen*8); +@@ -260,14 +258,14 @@ crypto_create_session(struct fcrypt *fcr, struct session_op *sop) + goto error_hash; + } + +- if (sop->mackey && unlikely(copy_from_user(keyp, sop->mackey, ++ if (sop->mackey && unlikely(copy_from_user(mackey, sop->mackey, + sop->mackeylen))) { + ret = -EFAULT; + goto error_hash; + } + + ret = cryptodev_hash_init(&ses_new->hdata, hash_name, hmac_mode, +- keyp, sop->mackeylen); ++ mackey, sop->mackeylen); + if (ret != 0) { + ddebug(1, "Failed to load hash for %s", hash_name); + ret = -EINVAL; +-- +1.7.9.7 + diff --git a/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0003-Add-support-for-aead-keys-for-composite-algorithms.patch b/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0003-Add-support-for-aead-keys-for-composite-algorithms.patch new file mode 100644 index 00000000..033552a3 --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0003-Add-support-for-aead-keys-for-composite-algorithms.patch @@ -0,0 +1,170 @@ +From 8cabaedb69acc5b44c7a9cf058045908130a6af7 Mon Sep 17 00:00:00 2001 +From: Cristian Stoica +Date: Wed, 23 Oct 2013 16:57:22 +0300 +Subject: [[Patch][fsl 03/16] Add support for aead keys for composite + algorithms + +Upstream-status: Pending + +Composite aead algorithms (e.g. AES-CBC + HMAC-SHA1) need two keys to +operate. The two keys are wrapped in a single buffer in the form +used also by crypto/authenc.c +Blockcipher and non-composite aead algorithms (e.g. AES-GCM) use a +single key which is simply copied from user-space. + +Signed-off-by: Cristian Stoica +Tested-by: Horia Ioan Geanta Neag +--- + cryptlib.c | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + cryptlib.h | 3 +++ + ioctl.c | 24 ++++++++++++++---------- + 3 files changed, 76 insertions(+), 10 deletions(-) + +diff --git a/cryptlib.c b/cryptlib.c +index a7fbff4..2986d09 100644 +--- a/cryptlib.c ++++ b/cryptlib.c +@@ -34,6 +34,8 @@ + #include + #include + #include ++#include ++#include + #include "cryptodev_int.h" + + +@@ -53,6 +55,63 @@ static void cryptodev_complete(struct crypto_async_request *req, int err) + complete(&res->completion); + } + ++int cryptodev_get_cipher_keylen(unsigned int *keylen, struct session_op *sop, ++ int aead) ++{ ++ unsigned int klen = sop->keylen; ++ ++ if (unlikely(sop->keylen > CRYPTO_CIPHER_MAX_KEY_LEN)) ++ return -EINVAL; ++ ++ if (aead && sop->mackeylen) { ++ if (unlikely(sop->mackeylen > CRYPTO_HMAC_MAX_KEY_LEN)) ++ return -EINVAL; ++ klen += sop->mackeylen; ++ klen += RTA_SPACE(sizeof(struct crypto_authenc_key_param)); ++ } ++ ++ *keylen = klen; ++ return 0; ++} ++ ++int cryptodev_get_cipher_key(uint8_t *key, struct session_op *sop, int aead) ++{ ++ /* Get algorithm key from user-space. For composite aead algorithms, ++ * the key representation is in the format used by linux kernel in ++ * crypto/authenc.c ++ */ ++ struct crypto_authenc_key_param *param; ++ struct rtattr *rta; ++ int ret = 0; ++ ++ if (aead && sop->mackeylen) { ++ /* the key header type and header length */ ++ rta = (void *)key; ++ rta->rta_type = CRYPTO_AUTHENC_KEYA_PARAM; ++ rta->rta_len = RTA_LENGTH(sizeof(*param)); ++ ++ /* the key parameter is the length of the encryption key */ ++ param = RTA_DATA(rta); ++ param->enckeylen = cpu_to_be32(sop->keylen); ++ ++ /* copy the hash key */ ++ key += RTA_SPACE(sizeof(*param)); ++ if (unlikely(copy_from_user(key, sop->mackey, sop->mackeylen))) { ++ ret = -EFAULT; ++ goto error; ++ } ++ /* get the pointer ready for the encryption key */ ++ key += sop->mackeylen; ++ } ++ /* blockcipher algorithms have the key ready to use */ ++ if (unlikely(copy_from_user(key, sop->key, sop->keylen))) ++ ret = -EFAULT; ++ ++error: ++ return ret; ++} ++ ++ + int cryptodev_cipher_init(struct cipher_data *out, const char *alg_name, + uint8_t *keyp, size_t keylen, int stream, int aead) + { +diff --git a/cryptlib.h b/cryptlib.h +index 0744284..a0a8a63 100644 +--- a/cryptlib.h ++++ b/cryptlib.h +@@ -25,6 +25,9 @@ struct cipher_data { + int cryptodev_cipher_init(struct cipher_data *out, const char *alg_name, + uint8_t *key, size_t keylen, int stream, int aead); + void cryptodev_cipher_deinit(struct cipher_data *cdata); ++int cryptodev_get_cipher_key(uint8_t *key, struct session_op *sop, int aead); ++int cryptodev_get_cipher_keylen(unsigned int *keylen, struct session_op *sop, ++ int aead); + ssize_t cryptodev_cipher_decrypt(struct cipher_data *cdata, + const struct scatterlist *sg1, + struct scatterlist *sg2, size_t len); +diff --git a/ioctl.c b/ioctl.c +index c614373..3baf195 100644 +--- a/ioctl.c ++++ b/ioctl.c +@@ -109,7 +109,8 @@ crypto_create_session(struct fcrypt *fcr, struct session_op *sop) + const char *alg_name = NULL; + const char *hash_name = NULL; + int hmac_mode = 1, stream = 0, aead = 0; +- uint8_t enckey[CRYPTO_CIPHER_MAX_KEY_LEN]; ++ uint8_t *key = NULL; ++ unsigned int keylen; + uint8_t mackey[CRYPTO_HMAC_MAX_KEY_LEN]; + + /* Does the request make sense? */ +@@ -229,20 +230,22 @@ crypto_create_session(struct fcrypt *fcr, struct session_op *sop) + + /* Set-up crypto transform. */ + if (alg_name) { +- if (unlikely(sop->keylen > CRYPTO_CIPHER_MAX_KEY_LEN)) { +- ddebug(1, "Setting key failed for %s-%zu.", +- alg_name, (size_t)sop->keylen*8); +- ret = -EINVAL; ++ ret = cryptodev_get_cipher_keylen(&keylen, sop, aead); ++ if (unlikely(ret < 0)) + goto error_cipher; +- } + +- if (unlikely(copy_from_user(enckey, sop->key, sop->keylen))) { +- ret = -EFAULT; ++ key = kmalloc(keylen, GFP_KERNEL); ++ if (unlikely(!key)) { ++ ret = -ENOMEM; + goto error_cipher; + } + +- ret = cryptodev_cipher_init(&ses_new->cdata, alg_name, enckey, +- sop->keylen, stream, aead); ++ ret = cryptodev_get_cipher_key(key, sop, aead); ++ if (unlikely(ret < 0)) ++ goto error_cipher; ++ ++ ret = cryptodev_cipher_init(&ses_new->cdata, alg_name, key, keylen, ++ stream, aead); + if (ret < 0) { + ddebug(1, "Failed to load cipher for %s", alg_name); + ret = -EINVAL; +@@ -318,6 +321,7 @@ error_hash: + kfree(ses_new->sg); + kfree(ses_new->pages); + error_cipher: ++ kfree(key); + kfree(ses_new); + + return ret; +-- +1.7.9.7 + diff --git a/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0004-fix-scatterlist-size-for-in-place-operations.patch b/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0004-fix-scatterlist-size-for-in-place-operations.patch new file mode 100644 index 00000000..c8086062 --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0004-fix-scatterlist-size-for-in-place-operations.patch @@ -0,0 +1,39 @@ +From 5a6cd042d3cee9e3bbf3b0125a89e64d75dffdc7 Mon Sep 17 00:00:00 2001 +From: Cristian Stoica +Date: Thu, 31 Oct 2013 13:13:51 +0200 +Subject: [[Patch][fsl 04/16] fix scatterlist size for in-place operations + +Upstream-status: Pending + +For in-place operations, the scatterlist must be big enough to allow for +either the source or destination data: + - for block ciphers, the destination will be bigger than the source if + the source is not multiple of blocksize + - for aead ciphers, the additional data and padding guarantees the + destination to be bigger than the source. + +Signed-off-by: Cristian Stoica +Tested-by: Horia Ioan Geanta Neag +--- + zc.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/zc.c b/zc.c +index 809a36d..8855083 100644 +--- a/zc.c ++++ b/zc.c +@@ -162,8 +162,9 @@ int get_userbuf(struct csession *ses, + } + + if (src == dst) { /* inplace operation */ +- rc = __get_userbuf(src, src_len, 1, ses->used_pages, +- ses->pages, ses->sg, task, mm); ++ rc = __get_userbuf(src, max(src_len, dst_len), 1, ses->used_pages, ++ ses->pages, ses->sg, task, mm); ++ + if (unlikely(rc)) { + derr(1, "failed to get user pages for data IO"); + return rc; +-- +1.7.9.7 + diff --git a/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0005-add-dst_len-parameter-to-be-provided-by-the-user.patch b/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0005-add-dst_len-parameter-to-be-provided-by-the-user.patch new file mode 100644 index 00000000..480d2a93 --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0005-add-dst_len-parameter-to-be-provided-by-the-user.patch @@ -0,0 +1,70 @@ +From e673e6ec09770b624d524bcd82f911e4fe2e2075 Mon Sep 17 00:00:00 2001 +From: Cristian Stoica +Date: Thu, 31 Oct 2013 13:27:28 +0200 +Subject: [[Patch][fsl 05/16] add dst_len parameter to be provided by the user + +Upstream-status: Pending + +This allows the user to set the result length and relieves cryptodev +from making assumptions about it. + +Signed-off-by: Cristian Stoica +Tested-by: Horia Ioan Geanta Neag +--- + authenc.c | 13 +++---------- + crypto/cryptodev.h | 1 + + 2 files changed, 4 insertions(+), 10 deletions(-) + +diff --git a/authenc.c b/authenc.c +index a183820..5235973 100644 +--- a/authenc.c ++++ b/authenc.c +@@ -199,7 +199,7 @@ static int fill_kcaop_from_caop(struct kernel_crypt_auth_op *kcaop, struct fcryp + kcaop->ivlen = caop->iv ? ses_ptr->cdata.ivsize : 0; + + if (caop->flags & COP_FLAG_AEAD_TLS_TYPE) +- kcaop->dst_len = caop->len + ses_ptr->cdata.blocksize /* pad */ + caop->tag_len; ++ kcaop->dst_len = caop->dst_len; + else + kcaop->dst_len = caop->len; + +@@ -645,8 +645,6 @@ __crypto_auth_run_zc(struct csession *ses_ptr, struct kernel_crypt_auth_op *kcao + ret = tls_auth_n_crypt(ses_ptr, kcaop, auth_sg, caop->auth_len, + dst_sg, caop->len); + } else { +- int dst_len; +- + if (unlikely(ses_ptr->cdata.init == 0 || + (ses_ptr->cdata.stream == 0 && + ses_ptr->cdata.aead == 0))) { +@@ -655,13 +653,8 @@ __crypto_auth_run_zc(struct csession *ses_ptr, struct kernel_crypt_auth_op *kcao + goto free_auth_buf; + } + +- if (caop->op == COP_ENCRYPT) +- dst_len = caop->len + cryptodev_cipher_get_tag_size(&ses_ptr->cdata); +- else +- dst_len = caop->len; +- +- ret = get_userbuf(ses_ptr, caop->src, caop->len, caop->dst, dst_len, +- kcaop->task, kcaop->mm, &src_sg, &dst_sg); ++ ret = get_userbuf(ses_ptr, caop->src, caop->len, caop->dst, ++ caop->dst_len, kcaop->task, kcaop->mm, &src_sg, &dst_sg); + if (unlikely(ret)) { + derr(1, "get_userbuf(): Error getting user pages."); + goto free_auth_buf; +diff --git a/crypto/cryptodev.h b/crypto/cryptodev.h +index c0e8cd4..3ea3d35 100644 +--- a/crypto/cryptodev.h ++++ b/crypto/cryptodev.h +@@ -137,6 +137,7 @@ struct crypt_auth_op { + __u16 op; /* COP_ENCRYPT or COP_DECRYPT */ + __u16 flags; /* see COP_FLAG_AEAD_* */ + __u32 len; /* length of source data */ ++ __u32 dst_len; /* length of result data */ + __u32 auth_len; /* length of auth data */ + __u8 __user *auth_src; /* authenticated-only data */ + +-- +1.7.9.7 + diff --git a/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0006-fix-build-error-on-some-targets.patch b/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0006-fix-build-error-on-some-targets.patch new file mode 100644 index 00000000..510dee09 --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0006-fix-build-error-on-some-targets.patch @@ -0,0 +1,64 @@ +From 69e00f8c1633dfe6da20ccd0cf363a481c99fc97 Mon Sep 17 00:00:00 2001 +From: Cristian Stoica +Date: Wed, 20 Nov 2013 11:29:50 +0200 +Subject: [[Patch][fsl 06/16] fix build error on some targets + +Upstream-status: Pending + +This updates incomplete patch f681e2e5fd1088bfe0aafd1ae2560c1dc9d04778 +and allows building main.o + +Signed-off-by: Cristian Stoica +Tested-by: Horia Ioan Geanta Neag +--- + cryptlib.c | 4 ++-- + cryptlib.h | 4 ++-- + 2 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/cryptlib.c b/cryptlib.c +index 2986d09..3576f39 100644 +--- a/cryptlib.c ++++ b/cryptlib.c +@@ -113,7 +113,7 @@ error: + + + int cryptodev_cipher_init(struct cipher_data *out, const char *alg_name, +- uint8_t *keyp, size_t keylen, int stream, int aead) ++ uint8_t *keyp, unsigned int keylen, int stream, int aead) + { + int ret; + +@@ -313,7 +313,7 @@ ssize_t cryptodev_cipher_decrypt(struct cipher_data *cdata, + /* Hash functions */ + + int cryptodev_hash_init(struct hash_data *hdata, const char *alg_name, +- int hmac_mode, void *mackey, size_t mackeylen) ++ int hmac_mode, void *mackey, unsigned int mackeylen) + { + int ret; + +diff --git a/cryptlib.h b/cryptlib.h +index a0a8a63..4cb66ad 100644 +--- a/cryptlib.h ++++ b/cryptlib.h +@@ -23,7 +23,7 @@ struct cipher_data { + }; + + int cryptodev_cipher_init(struct cipher_data *out, const char *alg_name, +- uint8_t *key, size_t keylen, int stream, int aead); ++ uint8_t *key, unsigned int keylen, int stream, int aead); + void cryptodev_cipher_deinit(struct cipher_data *cdata); + int cryptodev_get_cipher_key(uint8_t *key, struct session_op *sop, int aead); + int cryptodev_get_cipher_keylen(unsigned int *keylen, struct session_op *sop, +@@ -87,7 +87,7 @@ ssize_t cryptodev_hash_update(struct hash_data *hdata, + int cryptodev_hash_reset(struct hash_data *hdata); + void cryptodev_hash_deinit(struct hash_data *hdata); + int cryptodev_hash_init(struct hash_data *hdata, const char *alg_name, +- int hmac_mode, void *mackey, size_t mackeylen); ++ int hmac_mode, void *mackey, unsigned int mackeylen); + + + #endif +-- +1.7.9.7 + diff --git a/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0007-add-support-for-COMPAT_CIOCAUTHCRYPT-ioctl.patch b/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0007-add-support-for-COMPAT_CIOCAUTHCRYPT-ioctl.patch new file mode 100644 index 00000000..b796f160 --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0007-add-support-for-COMPAT_CIOCAUTHCRYPT-ioctl.patch @@ -0,0 +1,209 @@ +From 75e26bf18997488518228cb851585bf8e4c3120f Mon Sep 17 00:00:00 2001 +From: Horia Geanta +Date: Wed, 4 Dec 2013 15:43:41 +0200 +Subject: [[Patch][fsl 07/16] add support for COMPAT_CIOCAUTHCRYPT ioctl() + +Upstream-status: Pending + +Needed for 64b kernel with 32b user space. + +Signed-off-by: Horia Geanta +Tested-by: Cristian Stoica +--- + authenc.c | 80 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ + cryptodev_int.h | 41 ++++++++++++++++++++++++++++ + ioctl.c | 16 +++++++++++ + 3 files changed, 137 insertions(+) + +diff --git a/authenc.c b/authenc.c +index 5235973..259a225 100644 +--- a/authenc.c ++++ b/authenc.c +@@ -241,6 +241,86 @@ static int fill_caop_from_kcaop(struct kernel_crypt_auth_op *kcaop, struct fcryp + return 0; + } + ++/* compatibility code for 32bit userlands */ ++#ifdef CONFIG_COMPAT ++ ++static inline void ++compat_to_crypt_auth_op(struct compat_crypt_auth_op *compat, ++ struct crypt_auth_op *caop) ++{ ++ caop->ses = compat->ses; ++ caop->op = compat->op; ++ caop->flags = compat->flags; ++ caop->len = compat->len; ++ caop->dst_len = compat->dst_len; ++ caop->auth_len = compat->auth_len; ++ caop->tag_len = compat->tag_len; ++ caop->iv_len = compat->iv_len; ++ ++ caop->auth_src = compat_ptr(compat->auth_src); ++ caop->src = compat_ptr(compat->src); ++ caop->dst = compat_ptr(compat->dst); ++ caop->tag = compat_ptr(compat->tag); ++ caop->iv = compat_ptr(compat->iv); ++} ++ ++static inline void ++crypt_auth_op_to_compat(struct crypt_auth_op *caop, ++ struct compat_crypt_auth_op *compat) ++{ ++ compat->ses = caop->ses; ++ compat->op = caop->op; ++ compat->flags = caop->flags; ++ compat->len = caop->len; ++ compat->dst_len = caop->dst_len; ++ compat->auth_len = caop->auth_len; ++ compat->tag_len = caop->tag_len; ++ compat->iv_len = caop->iv_len; ++ ++ compat->auth_src = ptr_to_compat(caop->auth_src); ++ compat->src = ptr_to_compat(caop->src); ++ compat->dst = ptr_to_compat(caop->dst); ++ compat->tag = ptr_to_compat(caop->tag); ++ compat->iv = ptr_to_compat(caop->iv); ++} ++ ++int compat_kcaop_from_user(struct kernel_crypt_auth_op *kcaop, ++ struct fcrypt *fcr, void __user *arg) ++{ ++ struct compat_crypt_auth_op compat_caop; ++ ++ if (unlikely(copy_from_user(&compat_caop, arg, sizeof(compat_caop)))) { ++ dprintk(1, KERN_ERR, "Error in copying from userspace\n"); ++ return -EFAULT; ++ } ++ ++ compat_to_crypt_auth_op(&compat_caop, &kcaop->caop); ++ ++ return fill_kcaop_from_caop(kcaop, fcr); ++} ++ ++int compat_kcaop_to_user(struct kernel_crypt_auth_op *kcaop, ++ struct fcrypt *fcr, void __user *arg) ++{ ++ int ret; ++ struct compat_crypt_auth_op compat_caop; ++ ++ ret = fill_caop_from_kcaop(kcaop, fcr); ++ if (unlikely(ret)) { ++ dprintk(1, KERN_ERR, "fill_caop_from_kcaop\n"); ++ return ret; ++ } ++ ++ crypt_auth_op_to_compat(&kcaop->caop, &compat_caop); ++ ++ if (unlikely(copy_to_user(arg, &compat_caop, sizeof(compat_caop)))) { ++ dprintk(1, KERN_ERR, "Error in copying to userspace\n"); ++ return -EFAULT; ++ } ++ return 0; ++} ++ ++#endif /* CONFIG_COMPAT */ + + int kcaop_from_user(struct kernel_crypt_auth_op *kcaop, + struct fcrypt *fcr, void __user *arg) +diff --git a/cryptodev_int.h b/cryptodev_int.h +index d7660fa..8d206c9 100644 +--- a/cryptodev_int.h ++++ b/cryptodev_int.h +@@ -73,11 +73,43 @@ struct compat_crypt_op { + compat_uptr_t iv;/* initialization vector for encryption operations */ + }; + ++ /* input of CIOCAUTHCRYPT */ ++struct compat_crypt_auth_op { ++ uint32_t ses; /* session identifier */ ++ uint16_t op; /* COP_ENCRYPT or COP_DECRYPT */ ++ uint16_t flags; /* see COP_FLAG_AEAD_* */ ++ uint32_t len; /* length of source data */ ++ uint32_t dst_len; /* length of result data */ ++ uint32_t auth_len; /* length of auth data */ ++ compat_uptr_t auth_src; /* authenticated-only data */ ++ ++ /* The current implementation is more efficient if data are ++ * encrypted in-place (src==dst). */ ++ compat_uptr_t src; /* data to be encrypted and ++ authenticated */ ++ compat_uptr_t dst; /* pointer to output data. Must have ++ * space for tag. For TLS this should be ++ * at least len + tag_size + block_size ++ * for padding */ ++ ++ compat_uptr_t tag; /* where the tag will be copied to. TLS ++ * mode doesn't use that as tag is ++ * copied to dst. ++ * SRTP mode copies tag there. */ ++ uint32_t tag_len; /* the length of the tag. Use zero for ++ * digest size or max tag. */ ++ ++ /* initialization vector for encryption operations */ ++ compat_uptr_t iv; ++ uint32_t iv_len; ++}; ++ + /* compat ioctls, defined for the above structs */ + #define COMPAT_CIOCGSESSION _IOWR('c', 102, struct compat_session_op) + #define COMPAT_CIOCCRYPT _IOWR('c', 104, struct compat_crypt_op) + #define COMPAT_CIOCASYNCCRYPT _IOW('c', 107, struct compat_crypt_op) + #define COMPAT_CIOCASYNCFETCH _IOR('c', 108, struct compat_crypt_op) ++#define COMPAT_CIOCAUTHCRYPT _IOWR('c', 109, struct compat_crypt_auth_op) + + #endif /* CONFIG_COMPAT */ + +@@ -108,6 +140,15 @@ struct kernel_crypt_auth_op { + + /* auth */ + ++#ifdef CONFIG_COMPAT ++int compat_kcaop_from_user(struct kernel_crypt_auth_op *kcaop, ++ struct fcrypt *fcr, void __user *arg); ++ ++int compat_kcaop_to_user(struct kernel_crypt_auth_op *kcaop, ++ struct fcrypt *fcr, void __user *arg); ++#endif /* CONFIG_COMPAT */ ++ ++ + int kcaop_from_user(struct kernel_crypt_auth_op *kcop, + struct fcrypt *fcr, void __user *arg); + int kcaop_to_user(struct kernel_crypt_auth_op *kcaop, +diff --git a/ioctl.c b/ioctl.c +index 3baf195..18874d3 100644 +--- a/ioctl.c ++++ b/ioctl.c +@@ -991,6 +991,7 @@ cryptodev_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg_) + struct session_op sop; + struct compat_session_op compat_sop; + struct kernel_crypt_op kcop; ++ struct kernel_crypt_auth_op kcaop; + int ret; + + if (unlikely(!pcr)) +@@ -1033,6 +1034,21 @@ cryptodev_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg_) + return ret; + + return compat_kcop_to_user(&kcop, fcr, arg); ++ ++ case COMPAT_CIOCAUTHCRYPT: ++ if (unlikely(ret = compat_kcaop_from_user(&kcaop, fcr, arg))) { ++ dprintk(1, KERN_WARNING, "Error copying from user\n"); ++ return ret; ++ } ++ ++ ret = crypto_auth_run(fcr, &kcaop); ++ if (unlikely(ret)) { ++ dprintk(1, KERN_WARNING, "Error in crypto_auth_run\n"); ++ return ret; ++ } ++ ++ return compat_kcaop_to_user(&kcaop, fcr, arg); ++ + #ifdef ENABLE_ASYNC + case COMPAT_CIOCASYNCCRYPT: + if (unlikely(ret = compat_kcop_from_user(&kcop, fcr, arg))) +-- +1.7.9.7 + diff --git a/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0008-fix-cipher-algorithm-memleaks.patch b/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0008-fix-cipher-algorithm-memleaks.patch new file mode 100644 index 00000000..995fbed4 --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0008-fix-cipher-algorithm-memleaks.patch @@ -0,0 +1,53 @@ +From 9675e358fe73b33029a470aa5cf47527848f4054 Mon Sep 17 00:00:00 2001 +From: Cristian Stoica +Date: Tue, 26 Nov 2013 16:36:37 +0200 +Subject: [[Patch][fsl 08/16] fix cipher algorithm memleaks + +Upstream-status: Pending + +Patch 67e743aef130d107c1b41e0aace7677f9ff53bd1 allocates memory for +cipher algorithm key without freeing it when session terminates. This +patch addresses the deallocation issue. + +Signed-off-by: Cristian Stoica +Tested-by: Horia Ioan Geanta Neag +--- + cryptodev_int.h | 1 + + ioctl.c | 2 ++ + 2 files changed, 3 insertions(+) + +diff --git a/cryptodev_int.h b/cryptodev_int.h +index 8d206c9..8891837 100644 +--- a/cryptodev_int.h ++++ b/cryptodev_int.h +@@ -166,6 +166,7 @@ struct csession { + struct hash_data hdata; + uint32_t sid; + uint32_t alignmask; ++ uint8_t *key; + + unsigned int array_size; + unsigned int used_pages; /* the number of pages that are used */ +diff --git a/ioctl.c b/ioctl.c +index 18874d3..63467e0 100644 +--- a/ioctl.c ++++ b/ioctl.c +@@ -235,6 +235,7 @@ crypto_create_session(struct fcrypt *fcr, struct session_op *sop) + goto error_cipher; + + key = kmalloc(keylen, GFP_KERNEL); ++ ses_new->key = key; + if (unlikely(!key)) { + ret = -ENOMEM; + goto error_cipher; +@@ -342,6 +343,7 @@ crypto_destroy_session(struct csession *ses_ptr) + ddebug(2, "freeing space for %d user pages", ses_ptr->array_size); + kfree(ses_ptr->pages); + kfree(ses_ptr->sg); ++ kfree(ses_ptr->key); + mutex_unlock(&ses_ptr->sem); + mutex_destroy(&ses_ptr->sem); + kfree(ses_ptr); +-- +1.7.9.7 + diff --git a/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0009-PKC-support-added-in-cryptodev-module.patch b/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0009-PKC-support-added-in-cryptodev-module.patch new file mode 100644 index 00000000..b403731a --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0009-PKC-support-added-in-cryptodev-module.patch @@ -0,0 +1,898 @@ +From 55be37e9e308990b2eeeef7f974dfbfbb1120266 Mon Sep 17 00:00:00 2001 +From: Yashpal Dutta +Date: Fri, 7 Mar 2014 06:16:09 +0545 +Subject: [[Patch][fsl 09/16] PKC support added in cryptodev module + +Upstream-status: Pending + +Signed-off-by: Yashpal Dutta +--- + cryptlib.c | 66 ++++++++- + cryptlib.h | 28 ++++ + crypto/cryptodev.h | 15 ++- + cryptodev_int.h | 20 ++- + ioctl.c | 196 +++++++++++++++++++++++++-- + main.c | 378 ++++++++++++++++++++++++++++++++++++++++++++++++++++ + 6 files changed, 685 insertions(+), 18 deletions(-) + +diff --git a/cryptlib.c b/cryptlib.c +index 3576f39..fa0b63f 100644 +--- a/cryptlib.c ++++ b/cryptlib.c +@@ -5,6 +5,8 @@ + * Portions Copyright (c) 2010 Michael Weiser + * Portions Copyright (c) 2010 Phil Sutter + * ++ * Copyright 2012 Freescale Semiconductor, Inc. ++ * + * This file is part of linux cryptodev. + * + * This program is free software; you can redistribute it and/or +@@ -39,11 +41,6 @@ + #include "cryptodev_int.h" + + +-struct cryptodev_result { +- struct completion completion; +- int err; +-}; +- + static void cryptodev_complete(struct crypto_async_request *req, int err) + { + struct cryptodev_result *res = req->data; +@@ -244,7 +241,6 @@ static inline int waitfor(struct cryptodev_result *cr, ssize_t ret) + case 0: + break; + case -EINPROGRESS: +- case -EBUSY: + wait_for_completion(&cr->completion); + /* At this point we known for sure the request has finished, + * because wait_for_completion above was not interruptible. +@@ -424,3 +420,61 @@ int cryptodev_hash_final(struct hash_data *hdata, void *output) + return waitfor(hdata->async.result, ret); + } + ++int cryptodev_pkc_offload(struct cryptodev_pkc *pkc) ++{ ++ int ret = 0; ++ struct pkc_request *pkc_req = &pkc->req, *pkc_requested; ++ ++ switch (pkc_req->type) { ++ case RSA_PUB: ++ case RSA_PRIV_FORM1: ++ case RSA_PRIV_FORM2: ++ case RSA_PRIV_FORM3: ++ pkc->s = crypto_alloc_pkc("pkc(rsa)", ++ CRYPTO_ALG_TYPE_PKC_RSA, 0); ++ break; ++ case DSA_SIGN: ++ case DSA_VERIFY: ++ case ECDSA_SIGN: ++ case ECDSA_VERIFY: ++ pkc->s = crypto_alloc_pkc("pkc(dsa)", ++ CRYPTO_ALG_TYPE_PKC_DSA, 0); ++ break; ++ case DH_COMPUTE_KEY: ++ case ECDH_COMPUTE_KEY: ++ pkc->s = crypto_alloc_pkc("pkc(dh)", ++ CRYPTO_ALG_TYPE_PKC_DH, 0); ++ break; ++ default: ++ return -EINVAL; ++ } ++ ++ if (IS_ERR_OR_NULL(pkc->s)) ++ return -EINVAL; ++ ++ init_completion(&pkc->result.completion); ++ pkc_requested = pkc_request_alloc(pkc->s, GFP_KERNEL); ++ ++ if (unlikely(IS_ERR_OR_NULL(pkc_requested))) { ++ ret = -ENOMEM; ++ goto error; ++ } ++ pkc_requested->type = pkc_req->type; ++ pkc_requested->curve_type = pkc_req->curve_type; ++ memcpy(&pkc_requested->req_u, &pkc_req->req_u, sizeof(pkc_req->req_u)); ++ pkc_request_set_callback(pkc_requested, CRYPTO_TFM_REQ_MAY_BACKLOG, ++ cryptodev_complete_asym, pkc); ++ ret = crypto_pkc_op(pkc_requested); ++ if (ret != -EINPROGRESS && ret != 0) ++ goto error2; ++ ++ if (pkc->type == SYNCHRONOUS) ++ ret = waitfor(&pkc->result, ret); ++ ++ return ret; ++error2: ++ kfree(pkc_requested); ++error: ++ crypto_free_pkc(pkc->s); ++ return ret; ++} +diff --git a/cryptlib.h b/cryptlib.h +index 4cb66ad..e77edc5 100644 +--- a/cryptlib.h ++++ b/cryptlib.h +@@ -1,3 +1,6 @@ ++/* ++ * Copyright 2012 Freescale Semiconductor, Inc. ++ */ + #ifndef CRYPTLIB_H + # define CRYPTLIB_H + +@@ -89,5 +92,30 @@ void cryptodev_hash_deinit(struct hash_data *hdata); + int cryptodev_hash_init(struct hash_data *hdata, const char *alg_name, + int hmac_mode, void *mackey, unsigned int mackeylen); + ++/* Operation Type */ ++enum offload_type { ++ SYNCHRONOUS, ++ ASYNCHRONOUS ++}; ++ ++struct cryptodev_result { ++ struct completion completion; ++ int err; ++}; ++ ++struct cryptodev_pkc { ++ struct list_head list; /* To maintain the Jobs in completed ++ cryptodev lists */ ++ struct kernel_crypt_kop kop; ++ struct crypto_pkc *s; /* Transform pointer from CryptoAPI */ ++ struct cryptodev_result result; /* Result to be updated by ++ completion handler */ ++ struct pkc_request req; /* PKC request structure allocated ++ from CryptoAPI */ ++ enum offload_type type; /* Synchronous Vs Asynchronous request */ ++ void *cookie; /*Additional opaque cookie to be used in future */ ++ struct crypt_priv *priv; ++}; + ++int cryptodev_pkc_offload(struct cryptodev_pkc *); + #endif +diff --git a/crypto/cryptodev.h b/crypto/cryptodev.h +index 3ea3d35..575ce63 100644 +--- a/crypto/cryptodev.h ++++ b/crypto/cryptodev.h +@@ -1,6 +1,10 @@ +-/* This is a source compatible implementation with the original API of ++/* ++ * Copyright 2012 Freescale Semiconductor, Inc. ++ * ++ * This is a source compatible implementation with the original API of + * cryptodev by Angelos D. Keromytis, found at openbsd cryptodev.h. +- * Placed under public domain */ ++ * Placed under public domain ++ */ + + #ifndef L_CRYPTODEV_H + #define L_CRYPTODEV_H +@@ -246,6 +250,9 @@ struct crypt_kop { + __u16 crk_oparams; + __u32 crk_pad1; + struct crparam crk_param[CRK_MAXPARAM]; ++ enum curve_t curve_type; /* 0 == Discrete Log, ++ 1 = EC_PRIME, 2 = EC_BINARY */ ++ void *cookie; + }; + + enum cryptodev_crk_op_t { +@@ -290,5 +297,7 @@ enum cryptodev_crk_op_t { + */ + #define CIOCASYNCCRYPT _IOW('c', 110, struct crypt_op) + #define CIOCASYNCFETCH _IOR('c', 111, struct crypt_op) +- ++/* additional ioctls for asynchronous operation for asymmetric ciphers*/ ++#define CIOCASYMASYNCRYPT _IOW('c', 112, struct crypt_kop) ++#define CIOCASYMASYNFETCH _IOR('c', 113, struct crypt_kop) + #endif /* L_CRYPTODEV_H */ +diff --git a/cryptodev_int.h b/cryptodev_int.h +index 8891837..b08c253 100644 +--- a/cryptodev_int.h ++++ b/cryptodev_int.h +@@ -1,4 +1,6 @@ +-/* cipher stuff */ ++/* cipher stuff ++ * Copyright 2012 Freescale Semiconductor, Inc. ++ */ + #ifndef CRYPTODEV_INT_H + # define CRYPTODEV_INT_H + +@@ -113,6 +115,14 @@ struct compat_crypt_auth_op { + + #endif /* CONFIG_COMPAT */ + ++/* kernel-internal extension to struct crypt_kop */ ++struct kernel_crypt_kop { ++ struct crypt_kop kop; ++ ++ struct task_struct *task; ++ struct mm_struct *mm; ++}; ++ + /* kernel-internal extension to struct crypt_op */ + struct kernel_crypt_op { + struct crypt_op cop; +@@ -158,6 +168,14 @@ int crypto_run(struct fcrypt *fcr, struct kernel_crypt_op *kcop); + + #include + ++/* Cryptodev Key operation handler */ ++int crypto_bn_modexp(struct cryptodev_pkc *); ++int crypto_modexp_crt(struct cryptodev_pkc *); ++int crypto_kop_dsasign(struct cryptodev_pkc *); ++int crypto_kop_dsaverify(struct cryptodev_pkc *); ++int crypto_run_asym(struct cryptodev_pkc *); ++void cryptodev_complete_asym(struct crypto_async_request *, int); ++ + /* other internal structs */ + struct csession { + struct list_head entry; +diff --git a/ioctl.c b/ioctl.c +index 63467e0..44070e1 100644 +--- a/ioctl.c ++++ b/ioctl.c +@@ -4,6 +4,7 @@ + * Copyright (c) 2004 Michal Ludvig , SuSE Labs + * Copyright (c) 2009,2010,2011 Nikos Mavrogiannopoulos + * Copyright (c) 2010 Phil Sutter ++ * Copyright 2012 Freescale Semiconductor, Inc. + * + * This file is part of linux cryptodev. + * +@@ -87,8 +88,37 @@ struct crypt_priv { + int itemcount; + struct work_struct cryptask; + wait_queue_head_t user_waiter; ++ /* List of pending cryptodev_pkc asym requests */ ++ struct list_head asym_completed_list; ++ /* For addition/removal of entry in pending list of asymmetric request*/ ++ spinlock_t completion_lock; + }; + ++/* Asymmetric request Completion handler */ ++void cryptodev_complete_asym(struct crypto_async_request *req, int err) ++{ ++ struct cryptodev_pkc *pkc = req->data; ++ struct cryptodev_result *res = &pkc->result; ++ ++ crypto_free_pkc(pkc->s); ++ res->err = err; ++ if (pkc->type == SYNCHRONOUS) { ++ if (err == -EINPROGRESS) ++ return; ++ complete(&res->completion); ++ } else { ++ struct crypt_priv *pcr = pkc->priv; ++ unsigned long flags; ++ spin_lock_irqsave(&pcr->completion_lock, flags); ++ list_add_tail(&pkc->list, &pcr->asym_completed_list); ++ spin_unlock_irqrestore(&pcr->completion_lock, flags); ++ /* wake for POLLIN */ ++ wake_up_interruptible(&pcr->user_waiter); ++ } ++ ++ kfree(req); ++} ++ + #define FILL_SG(sg, ptr, len) \ + do { \ + (sg)->page = virt_to_page(ptr); \ +@@ -467,7 +497,8 @@ cryptodev_open(struct inode *inode, struct file *filp) + INIT_LIST_HEAD(&pcr->free.list); + INIT_LIST_HEAD(&pcr->todo.list); + INIT_LIST_HEAD(&pcr->done.list); +- ++ INIT_LIST_HEAD(&pcr->asym_completed_list); ++ spin_lock_init(&pcr->completion_lock); + INIT_WORK(&pcr->cryptask, cryptask_routine); + + init_waitqueue_head(&pcr->user_waiter); +@@ -634,6 +665,79 @@ static int crypto_async_fetch(struct crypt_priv *pcr, + } + #endif + ++/* get the first asym cipher completed job from the "done" queue ++ * ++ * returns: ++ * -EBUSY if no completed jobs are ready (yet) ++ * the return value otherwise */ ++static int crypto_async_fetch_asym(struct cryptodev_pkc *pkc) ++{ ++ int ret = 0; ++ struct kernel_crypt_kop *kop = &pkc->kop; ++ struct crypt_kop *ckop = &kop->kop; ++ struct pkc_request *pkc_req = &pkc->req; ++ ++ switch (ckop->crk_op) { ++ case CRK_MOD_EXP: ++ { ++ struct rsa_pub_req_s *rsa_req = &pkc_req->req_u.rsa_pub_req; ++ copy_to_user(ckop->crk_param[3].crp_p, rsa_req->g, ++ rsa_req->g_len); ++ } ++ break; ++ case CRK_MOD_EXP_CRT: ++ { ++ struct rsa_priv_frm3_req_s *rsa_req = ++ &pkc_req->req_u.rsa_priv_f3; ++ copy_to_user(ckop->crk_param[6].crp_p, ++ rsa_req->f, rsa_req->f_len); ++ } ++ break; ++ case CRK_DSA_SIGN: ++ { ++ struct dsa_sign_req_s *dsa_req = &pkc_req->req_u.dsa_sign; ++ ++ if (pkc_req->type == ECDSA_SIGN) { ++ copy_to_user(ckop->crk_param[6].crp_p, ++ dsa_req->c, dsa_req->d_len); ++ copy_to_user(ckop->crk_param[7].crp_p, ++ dsa_req->d, dsa_req->d_len); ++ } else { ++ copy_to_user(ckop->crk_param[5].crp_p, ++ dsa_req->c, dsa_req->d_len); ++ copy_to_user(ckop->crk_param[6].crp_p, ++ dsa_req->d, dsa_req->d_len); ++ } ++ } ++ break; ++ case CRK_DSA_VERIFY: ++ break; ++ case CRK_DH_COMPUTE_KEY: ++ { ++ struct dh_key_req_s *dh_req = &pkc_req->req_u.dh_req; ++ if (pkc_req->type == ECDH_COMPUTE_KEY) ++ copy_to_user(ckop->crk_param[4].crp_p, ++ dh_req->z, dh_req->z_len); ++ else ++ copy_to_user(ckop->crk_param[3].crp_p, ++ dh_req->z, dh_req->z_len); ++ } ++ break; ++ default: ++ ret = -EINVAL; ++ } ++ kfree(pkc->cookie); ++ return ret; ++} ++ ++/* this function has to be called from process context */ ++static int fill_kop_from_cop(struct kernel_crypt_kop *kop) ++{ ++ kop->task = current; ++ kop->mm = current->mm; ++ return 0; ++} ++ + /* this function has to be called from process context */ + static int fill_kcop_from_cop(struct kernel_crypt_op *kcop, struct fcrypt *fcr) + { +@@ -657,11 +761,8 @@ static int fill_kcop_from_cop(struct kernel_crypt_op *kcop, struct fcrypt *fcr) + + if (cop->iv) { + rc = copy_from_user(kcop->iv, cop->iv, kcop->ivlen); +- if (unlikely(rc)) { +- derr(1, "error copying IV (%d bytes), copy_from_user returned %d for address %p", +- kcop->ivlen, rc, cop->iv); ++ if (unlikely(rc)) + return -EFAULT; +- } + } + + return 0; +@@ -687,6 +788,25 @@ static int fill_cop_from_kcop(struct kernel_crypt_op *kcop, struct fcrypt *fcr) + return 0; + } + ++static int kop_from_user(struct kernel_crypt_kop *kop, ++ void __user *arg) ++{ ++ if (unlikely(copy_from_user(&kop->kop, arg, sizeof(kop->kop)))) ++ return -EFAULT; ++ ++ return fill_kop_from_cop(kop); ++} ++ ++static int kop_to_user(struct kernel_crypt_kop *kop, ++ void __user *arg) ++{ ++ if (unlikely(copy_to_user(arg, &kop->kop, sizeof(kop->kop)))) { ++ dprintk(1, KERN_ERR, "Cannot copy to userspace\n"); ++ return -EFAULT; ++ } ++ return 0; ++} ++ + static int kcop_from_user(struct kernel_crypt_op *kcop, + struct fcrypt *fcr, void __user *arg) + { +@@ -816,7 +936,8 @@ cryptodev_ioctl(struct file *filp, unsigned int cmd, unsigned long arg_) + + switch (cmd) { + case CIOCASYMFEAT: +- return put_user(0, p); ++ return put_user(CRF_MOD_EXP_CRT | CRF_MOD_EXP | ++ CRF_DSA_SIGN | CRF_DSA_VERIFY | CRF_DH_COMPUTE_KEY, p); + case CRIOGET: + fd = clonefd(filp); + ret = put_user(fd, p); +@@ -852,6 +973,24 @@ cryptodev_ioctl(struct file *filp, unsigned int cmd, unsigned long arg_) + if (unlikely(ret)) + return ret; + return copy_to_user(arg, &siop, sizeof(siop)); ++ case CIOCKEY: ++ { ++ struct cryptodev_pkc *pkc = ++ kzalloc(sizeof(struct cryptodev_pkc), GFP_KERNEL); ++ ++ if (!pkc) ++ return -ENOMEM; ++ ++ ret = kop_from_user(&pkc->kop, arg); ++ if (unlikely(ret)) { ++ kfree(pkc); ++ return ret; ++ } ++ pkc->type = SYNCHRONOUS; ++ ret = crypto_run_asym(pkc); ++ kfree(pkc); ++ } ++ return ret; + case CIOCCRYPT: + if (unlikely(ret = kcop_from_user(&kcop, fcr, arg))) { + dwarning(1, "Error copying from user"); +@@ -890,6 +1029,45 @@ cryptodev_ioctl(struct file *filp, unsigned int cmd, unsigned long arg_) + + return kcop_to_user(&kcop, fcr, arg); + #endif ++ case CIOCASYMASYNCRYPT: ++ { ++ struct cryptodev_pkc *pkc = ++ kzalloc(sizeof(struct cryptodev_pkc), GFP_KERNEL); ++ ret = kop_from_user(&pkc->kop, arg); ++ ++ if (unlikely(ret)) ++ return -EINVAL; ++ ++ /* Store associated FD priv data with asymmetric request */ ++ pkc->priv = pcr; ++ pkc->type = ASYNCHRONOUS; ++ ret = crypto_run_asym(pkc); ++ if (ret == -EINPROGRESS) ++ ret = 0; ++ } ++ return ret; ++ case CIOCASYMASYNFETCH: ++ { ++ struct cryptodev_pkc *pkc; ++ unsigned long flags; ++ ++ spin_lock_irqsave(&pcr->completion_lock, flags); ++ if (list_empty(&pcr->asym_completed_list)) { ++ spin_unlock_irqrestore(&pcr->completion_lock, flags); ++ return -ENOMEM; ++ } ++ pkc = list_first_entry(&pcr->asym_completed_list, ++ struct cryptodev_pkc, list); ++ list_del(&pkc->list); ++ spin_unlock_irqrestore(&pcr->completion_lock, flags); ++ ret = crypto_async_fetch_asym(pkc); ++ ++ /* Reflect the updated request to user-space */ ++ if (!ret) ++ kop_to_user(&pkc->kop, arg); ++ kfree(pkc); ++ } ++ return ret; + default: + return -EINVAL; + } +@@ -1078,9 +1256,11 @@ static unsigned int cryptodev_poll(struct file *file, poll_table *wait) + + poll_wait(file, &pcr->user_waiter, wait); + +- if (!list_empty_careful(&pcr->done.list)) ++ if (!list_empty_careful(&pcr->done.list) || ++ !list_empty_careful(&pcr->asym_completed_list)) + ret |= POLLIN | POLLRDNORM; +- if (!list_empty_careful(&pcr->free.list) || pcr->itemcount < MAX_COP_RINGSIZE) ++ if (!list_empty_careful(&pcr->free.list) || ++ pcr->itemcount < MAX_COP_RINGSIZE) + ret |= POLLOUT | POLLWRNORM; + + return ret; +diff --git a/main.c b/main.c +index 57e5c38..0b7951e 100644 +--- a/main.c ++++ b/main.c +@@ -181,6 +181,384 @@ __crypto_run_zc(struct csession *ses_ptr, struct kernel_crypt_op *kcop) + return ret; + } + ++int crypto_kop_dsasign(struct cryptodev_pkc *pkc) ++{ ++ struct kernel_crypt_kop *kop = &pkc->kop; ++ struct crypt_kop *cop = &kop->kop; ++ struct pkc_request *pkc_req = &pkc->req; ++ struct dsa_sign_req_s *dsa_req = &pkc_req->req_u.dsa_sign; ++ int rc, buf_size; ++ uint8_t *buf; ++ ++ if (!cop->crk_param[0].crp_nbits || !cop->crk_param[1].crp_nbits || ++ !cop->crk_param[2].crp_nbits || !cop->crk_param[3].crp_nbits || ++ !cop->crk_param[4].crp_nbits || !cop->crk_param[5].crp_nbits || ++ !cop->crk_param[6].crp_nbits || (cop->crk_iparams == 6 && ++ !cop->crk_param[7].crp_nbits)) ++ return -EINVAL; ++ ++ dsa_req->m_len = (cop->crk_param[0].crp_nbits + 7)/8; ++ dsa_req->q_len = (cop->crk_param[1].crp_nbits + 7)/8; ++ dsa_req->r_len = (cop->crk_param[2].crp_nbits + 7)/8; ++ dsa_req->g_len = (cop->crk_param[3].crp_nbits + 7)/8; ++ dsa_req->priv_key_len = (cop->crk_param[4].crp_nbits + 7)/8; ++ dsa_req->d_len = (cop->crk_param[6].crp_nbits + 7)/8; ++ buf_size = dsa_req->m_len + dsa_req->q_len + dsa_req->r_len + ++ dsa_req->g_len + dsa_req->priv_key_len + dsa_req->d_len + ++ dsa_req->d_len; ++ if (cop->crk_iparams == 6) { ++ dsa_req->ab_len = (cop->crk_param[5].crp_nbits + 7)/8; ++ buf_size += dsa_req->ab_len; ++ pkc_req->type = ECDSA_SIGN; ++ pkc_req->curve_type = cop->curve_type; ++ } else { ++ pkc_req->type = DSA_SIGN; ++ } ++ ++ buf = kzalloc(buf_size, GFP_DMA); ++ ++ dsa_req->q = buf; ++ dsa_req->r = dsa_req->q + dsa_req->q_len; ++ dsa_req->g = dsa_req->r + dsa_req->r_len; ++ dsa_req->priv_key = dsa_req->g + dsa_req->g_len; ++ dsa_req->m = dsa_req->priv_key + dsa_req->priv_key_len; ++ dsa_req->c = dsa_req->m + dsa_req->m_len; ++ dsa_req->d = dsa_req->c + dsa_req->d_len; ++ copy_from_user(dsa_req->m, cop->crk_param[0].crp_p, dsa_req->m_len); ++ copy_from_user(dsa_req->q, cop->crk_param[1].crp_p, dsa_req->q_len); ++ copy_from_user(dsa_req->r, cop->crk_param[2].crp_p, dsa_req->r_len); ++ copy_from_user(dsa_req->g, cop->crk_param[3].crp_p, dsa_req->g_len); ++ copy_from_user(dsa_req->priv_key, cop->crk_param[4].crp_p, ++ dsa_req->priv_key_len); ++ if (cop->crk_iparams == 6) { ++ dsa_req->ab = dsa_req->d + dsa_req->d_len; ++ copy_from_user(dsa_req->ab, cop->crk_param[5].crp_p, ++ dsa_req->ab_len); ++ } ++ rc = cryptodev_pkc_offload(pkc); ++ if (pkc->type == SYNCHRONOUS) { ++ if (rc) ++ goto err; ++ if (cop->crk_iparams == 6) { ++ copy_to_user(cop->crk_param[6].crp_p, dsa_req->c, ++ dsa_req->d_len); ++ copy_to_user(cop->crk_param[7].crp_p, dsa_req->d, ++ dsa_req->d_len); ++ } else { ++ copy_to_user(cop->crk_param[5].crp_p, dsa_req->c, ++ dsa_req->d_len); ++ copy_to_user(cop->crk_param[6].crp_p, dsa_req->d, ++ dsa_req->d_len); ++ } ++ } else { ++ if (rc != -EINPROGRESS && rc != 0) ++ goto err; ++ ++ pkc->cookie = buf; ++ return rc; ++ } ++err: ++ kfree(buf); ++ return rc; ++} ++ ++int crypto_kop_dsaverify(struct cryptodev_pkc *pkc) ++{ ++ struct kernel_crypt_kop *kop = &pkc->kop; ++ struct crypt_kop *cop = &kop->kop; ++ struct pkc_request *pkc_req; ++ struct dsa_verify_req_s *dsa_req; ++ int rc, buf_size; ++ uint8_t *buf; ++ ++ if (!cop->crk_param[0].crp_nbits || !cop->crk_param[1].crp_nbits || ++ !cop->crk_param[2].crp_nbits || !cop->crk_param[3].crp_nbits || ++ !cop->crk_param[4].crp_nbits || !cop->crk_param[5].crp_nbits || ++ !cop->crk_param[6].crp_nbits || (cop->crk_iparams == 8 && ++ !cop->crk_param[7].crp_nbits)) ++ return -EINVAL; ++ ++ pkc_req = &pkc->req; ++ dsa_req = &pkc_req->req_u.dsa_verify; ++ dsa_req->m_len = (cop->crk_param[0].crp_nbits + 7)/8; ++ dsa_req->q_len = (cop->crk_param[1].crp_nbits + 7)/8; ++ dsa_req->r_len = (cop->crk_param[2].crp_nbits + 7)/8; ++ dsa_req->g_len = (cop->crk_param[3].crp_nbits + 7)/8; ++ dsa_req->pub_key_len = (cop->crk_param[4].crp_nbits + 7)/8; ++ dsa_req->d_len = (cop->crk_param[6].crp_nbits + 7)/8; ++ buf_size = dsa_req->m_len + dsa_req->q_len + dsa_req->r_len + ++ dsa_req->g_len + dsa_req->pub_key_len + dsa_req->d_len + ++ dsa_req->d_len; ++ if (cop->crk_iparams == 8) { ++ dsa_req->ab_len = (cop->crk_param[5].crp_nbits + 7)/8; ++ buf_size += dsa_req->ab_len; ++ pkc_req->type = ECDSA_VERIFY; ++ pkc_req->curve_type = cop->curve_type; ++ } else { ++ pkc_req->type = DSA_VERIFY; ++ } ++ ++ buf = kzalloc(buf_size, GFP_DMA); ++ ++ dsa_req->q = buf; ++ dsa_req->r = dsa_req->q + dsa_req->q_len; ++ dsa_req->g = dsa_req->r + dsa_req->r_len; ++ dsa_req->pub_key = dsa_req->g + dsa_req->g_len; ++ dsa_req->m = dsa_req->pub_key + dsa_req->pub_key_len; ++ dsa_req->c = dsa_req->m + dsa_req->m_len; ++ dsa_req->d = dsa_req->c + dsa_req->d_len; ++ copy_from_user(dsa_req->m, cop->crk_param[0].crp_p, dsa_req->m_len); ++ copy_from_user(dsa_req->q, cop->crk_param[1].crp_p, dsa_req->q_len); ++ copy_from_user(dsa_req->r, cop->crk_param[2].crp_p, dsa_req->r_len); ++ copy_from_user(dsa_req->g, cop->crk_param[3].crp_p, dsa_req->g_len); ++ copy_from_user(dsa_req->pub_key, cop->crk_param[4].crp_p, ++ dsa_req->pub_key_len); ++ if (cop->crk_iparams == 8) { ++ dsa_req->ab = dsa_req->d + dsa_req->d_len; ++ copy_from_user(dsa_req->ab, cop->crk_param[5].crp_p, ++ dsa_req->ab_len); ++ copy_from_user(dsa_req->c, cop->crk_param[6].crp_p, ++ dsa_req->d_len); ++ copy_from_user(dsa_req->d, cop->crk_param[7].crp_p, ++ dsa_req->d_len); ++ } else { ++ copy_from_user(dsa_req->c, cop->crk_param[5].crp_p, ++ dsa_req->d_len); ++ copy_from_user(dsa_req->d, cop->crk_param[6].crp_p, ++ dsa_req->d_len); ++ } ++ rc = cryptodev_pkc_offload(pkc); ++ if (pkc->type == SYNCHRONOUS) { ++ if (rc) ++ goto err; ++ } else { ++ if (rc != -EINPROGRESS && !rc) ++ goto err; ++ pkc->cookie = buf; ++ return rc; ++ } ++err: ++ kfree(buf); ++ return rc; ++} ++ ++int crypto_kop_dh_key(struct cryptodev_pkc *pkc) ++{ ++ struct kernel_crypt_kop *kop = &pkc->kop; ++ struct crypt_kop *cop = &kop->kop; ++ struct pkc_request *pkc_req; ++ struct dh_key_req_s *dh_req; ++ int buf_size; ++ uint8_t *buf; ++ int rc = -EINVAL; ++ ++ pkc_req = &pkc->req; ++ dh_req = &pkc_req->req_u.dh_req; ++ dh_req->s_len = (cop->crk_param[0].crp_nbits + 7)/8; ++ dh_req->pub_key_len = (cop->crk_param[1].crp_nbits + 7)/8; ++ dh_req->q_len = (cop->crk_param[2].crp_nbits + 7)/8; ++ buf_size = dh_req->q_len + dh_req->pub_key_len + dh_req->s_len; ++ if (cop->crk_iparams == 4) { ++ pkc_req->type = ECDH_COMPUTE_KEY; ++ dh_req->ab_len = (cop->crk_param[3].crp_nbits + 7)/8; ++ dh_req->z_len = (cop->crk_param[4].crp_nbits + 7)/8; ++ buf_size += dh_req->ab_len; ++ } else { ++ dh_req->z_len = (cop->crk_param[3].crp_nbits + 7)/8; ++ pkc_req->type = DH_COMPUTE_KEY; ++ } ++ buf_size += dh_req->z_len; ++ buf = kzalloc(buf_size, GFP_DMA); ++ dh_req->q = buf; ++ dh_req->s = dh_req->q + dh_req->q_len; ++ dh_req->pub_key = dh_req->s + dh_req->s_len; ++ dh_req->z = dh_req->pub_key + dh_req->pub_key_len; ++ if (cop->crk_iparams == 4) { ++ dh_req->ab = dh_req->z + dh_req->z_len; ++ pkc_req->curve_type = cop->curve_type; ++ copy_from_user(dh_req->ab, cop->crk_param[3].crp_p, ++ dh_req->ab_len); ++ } ++ copy_from_user(dh_req->s, cop->crk_param[0].crp_p, dh_req->s_len); ++ copy_from_user(dh_req->pub_key, cop->crk_param[1].crp_p, ++ dh_req->pub_key_len); ++ copy_from_user(dh_req->q, cop->crk_param[2].crp_p, dh_req->q_len); ++ rc = cryptodev_pkc_offload(pkc); ++ if (pkc->type == SYNCHRONOUS) { ++ if (rc) ++ goto err; ++ if (cop->crk_iparams == 4) ++ copy_to_user(cop->crk_param[4].crp_p, dh_req->z, ++ dh_req->z_len); ++ else ++ copy_to_user(cop->crk_param[3].crp_p, dh_req->z, ++ dh_req->z_len); ++ } else { ++ if (rc != -EINPROGRESS && rc != 0) ++ goto err; ++ ++ pkc->cookie = buf; ++ return rc; ++ } ++err: ++ kfree(buf); ++ return rc; ++} ++ ++int crypto_modexp_crt(struct cryptodev_pkc *pkc) ++{ ++ struct kernel_crypt_kop *kop = &pkc->kop; ++ struct crypt_kop *cop = &kop->kop; ++ struct pkc_request *pkc_req; ++ struct rsa_priv_frm3_req_s *rsa_req; ++ int rc; ++ uint8_t *buf; ++ ++ if (!cop->crk_param[0].crp_nbits || !cop->crk_param[1].crp_nbits || ++ !cop->crk_param[2].crp_nbits || !cop->crk_param[3].crp_nbits || ++ !cop->crk_param[4].crp_nbits || !cop->crk_param[5].crp_nbits) ++ return -EINVAL; ++ ++ pkc_req = &pkc->req; ++ pkc_req->type = RSA_PRIV_FORM3; ++ rsa_req = &pkc_req->req_u.rsa_priv_f3; ++ rsa_req->p_len = (cop->crk_param[0].crp_nbits + 7)/8; ++ rsa_req->q_len = (cop->crk_param[1].crp_nbits + 7)/8; ++ rsa_req->g_len = (cop->crk_param[2].crp_nbits + 7)/8; ++ rsa_req->dp_len = (cop->crk_param[3].crp_nbits + 7)/8; ++ rsa_req->dq_len = (cop->crk_param[4].crp_nbits + 7)/8; ++ rsa_req->c_len = (cop->crk_param[5].crp_nbits + 7)/8; ++ rsa_req->f_len = (cop->crk_param[6].crp_nbits + 7)/8; ++ buf = kzalloc(rsa_req->p_len + rsa_req->q_len + rsa_req->f_len + ++ rsa_req->dp_len + rsa_req->dp_len + rsa_req->c_len + ++ rsa_req->g_len, GFP_DMA); ++ rsa_req->p = buf; ++ rsa_req->q = rsa_req->p + rsa_req->p_len; ++ rsa_req->g = rsa_req->q + rsa_req->q_len; ++ rsa_req->dp = rsa_req->g + rsa_req->g_len; ++ rsa_req->dq = rsa_req->dp + rsa_req->dp_len; ++ rsa_req->c = rsa_req->dq + rsa_req->dq_len; ++ rsa_req->f = rsa_req->c + rsa_req->c_len; ++ copy_from_user(rsa_req->p, cop->crk_param[0].crp_p, rsa_req->p_len); ++ copy_from_user(rsa_req->q, cop->crk_param[1].crp_p, rsa_req->q_len); ++ copy_from_user(rsa_req->g, cop->crk_param[2].crp_p, rsa_req->g_len); ++ copy_from_user(rsa_req->dp, cop->crk_param[3].crp_p, rsa_req->dp_len); ++ copy_from_user(rsa_req->dq, cop->crk_param[4].crp_p, rsa_req->dq_len); ++ copy_from_user(rsa_req->c, cop->crk_param[5].crp_p, rsa_req->c_len); ++ rc = cryptodev_pkc_offload(pkc); ++ ++ if (pkc->type == SYNCHRONOUS) { ++ if (rc) ++ goto err; ++ copy_to_user(cop->crk_param[6].crp_p, rsa_req->f, ++ rsa_req->f_len); ++ } else { ++ if (rc != -EINPROGRESS && rc != 0) ++ goto err; ++ ++ pkc->cookie = buf; ++ return rc; ++ } ++err: ++ kfree(buf); ++ return rc; ++} ++ ++int crypto_bn_modexp(struct cryptodev_pkc *pkc) ++{ ++ struct pkc_request *pkc_req; ++ struct rsa_pub_req_s *rsa_req; ++ int rc; ++ struct kernel_crypt_kop *kop = &pkc->kop; ++ struct crypt_kop *cop = &kop->kop; ++ uint8_t *buf; ++ ++ if (!cop->crk_param[0].crp_nbits || !cop->crk_param[1].crp_nbits || ++ !cop->crk_param[2].crp_nbits || !cop->crk_param[3].crp_nbits) ++ return -EINVAL; ++ ++ pkc_req = &pkc->req; ++ pkc_req->type = RSA_PUB; ++ rsa_req = &pkc_req->req_u.rsa_pub_req; ++ rsa_req->f_len = (cop->crk_param[0].crp_nbits + 7)/8; ++ rsa_req->e_len = (cop->crk_param[1].crp_nbits + 7)/8; ++ rsa_req->n_len = (cop->crk_param[2].crp_nbits + 7)/8; ++ rsa_req->g_len = (cop->crk_param[3].crp_nbits + 7)/8; ++ buf = kzalloc(rsa_req->f_len + rsa_req->e_len + rsa_req->n_len ++ + rsa_req->g_len, GFP_DMA); ++ if (!buf) ++ return -ENOMEM; ++ ++ rsa_req->e = buf; ++ rsa_req->f = rsa_req->e + rsa_req->e_len; ++ rsa_req->g = rsa_req->f + rsa_req->f_len; ++ rsa_req->n = rsa_req->g + rsa_req->g_len; ++ copy_from_user(rsa_req->f, cop->crk_param[0].crp_p, rsa_req->f_len); ++ copy_from_user(rsa_req->e, cop->crk_param[1].crp_p, rsa_req->e_len); ++ copy_from_user(rsa_req->n, cop->crk_param[2].crp_p, rsa_req->n_len); ++ rc = cryptodev_pkc_offload(pkc); ++ if (pkc->type == SYNCHRONOUS) { ++ if (rc) ++ goto err; ++ ++ copy_to_user(cop->crk_param[3].crp_p, rsa_req->g, ++ rsa_req->g_len); ++ } else { ++ if (rc != -EINPROGRESS && rc != 0) ++ goto err; ++ ++ /* This one will be freed later in fetch handler */ ++ pkc->cookie = buf; ++ return rc; ++ } ++err: ++ kfree(buf); ++ return rc; ++} ++ ++int crypto_run_asym(struct cryptodev_pkc *pkc) ++{ ++ int ret = -EINVAL; ++ struct kernel_crypt_kop *kop = &pkc->kop; ++ ++ switch (kop->kop.crk_op) { ++ case CRK_MOD_EXP: ++ if (kop->kop.crk_iparams != 3 && kop->kop.crk_oparams != 1) ++ goto err; ++ ++ ret = crypto_bn_modexp(pkc); ++ break; ++ case CRK_MOD_EXP_CRT: ++ if (kop->kop.crk_iparams != 6 && kop->kop.crk_oparams != 1) ++ goto err; ++ ++ ret = crypto_modexp_crt(pkc); ++ break; ++ case CRK_DSA_SIGN: ++ if ((kop->kop.crk_iparams != 5 && kop->kop.crk_iparams != 6) || ++ kop->kop.crk_oparams != 2) ++ goto err; ++ ++ ret = crypto_kop_dsasign(pkc); ++ break; ++ case CRK_DSA_VERIFY: ++ if ((kop->kop.crk_iparams != 7 && kop->kop.crk_iparams != 8) || ++ kop->kop.crk_oparams != 0) ++ goto err; ++ ++ ret = crypto_kop_dsaverify(pkc); ++ break; ++ case CRK_DH_COMPUTE_KEY: ++ if ((kop->kop.crk_iparams != 3 && kop->kop.crk_iparams != 4) || ++ kop->kop.crk_oparams != 1) ++ goto err; ++ ret = crypto_kop_dh_key(pkc); ++ break; ++ } ++err: ++ return ret; ++} ++ + int crypto_run(struct fcrypt *fcr, struct kernel_crypt_op *kcop) + { + struct csession *ses_ptr; +-- +1.7.9.7 + diff --git a/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0010-Compat-versions-of-PKC-IOCTLs.patch b/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0010-Compat-versions-of-PKC-IOCTLs.patch new file mode 100644 index 00000000..03204625 --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0010-Compat-versions-of-PKC-IOCTLs.patch @@ -0,0 +1,200 @@ +From f6550035fe2c0e66798ace17d31d1d880beacc14 Mon Sep 17 00:00:00 2001 +From: Yashpal Dutta +Date: Fri, 7 Mar 2014 06:52:13 +0545 +Subject: [[Patch][fsl 10/16] Compat versions of PKC IOCTLs + +Upstream-status: Pending + +Signed-off-by: Yashpal Dutta +--- + cryptodev_int.h | 20 ++++++++++ + ioctl.c | 120 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 140 insertions(+) + +diff --git a/cryptodev_int.h b/cryptodev_int.h +index b08c253..229fcd0 100644 +--- a/cryptodev_int.h ++++ b/cryptodev_int.h +@@ -75,6 +75,24 @@ struct compat_crypt_op { + compat_uptr_t iv;/* initialization vector for encryption operations */ + }; + ++/* input of CIOCKEY */ ++struct compat_crparam { ++ compat_uptr_t crp_p; ++ uint32_t crp_nbits; ++}; ++ ++struct compat_crypt_kop { ++ uint32_t crk_op; /* cryptodev_crk_ot_t */ ++ uint32_t crk_status; ++ uint16_t crk_iparams; ++ uint16_t crk_oparams; ++ uint32_t crk_pad1; ++ struct compat_crparam crk_param[CRK_MAXPARAM]; ++ enum curve_t curve_type; /* 0 == Discrete Log, 1 = EC_PRIME, ++ 2 = EC_BINARY */ ++ compat_uptr_t cookie; ++}; ++ + /* input of CIOCAUTHCRYPT */ + struct compat_crypt_auth_op { + uint32_t ses; /* session identifier */ +@@ -112,6 +130,8 @@ struct compat_crypt_auth_op { + #define COMPAT_CIOCASYNCCRYPT _IOW('c', 107, struct compat_crypt_op) + #define COMPAT_CIOCASYNCFETCH _IOR('c', 108, struct compat_crypt_op) + #define COMPAT_CIOCAUTHCRYPT _IOWR('c', 109, struct compat_crypt_auth_op) ++#define COMPAT_CIOCASYMASYNCRYPT _IOW('c', 110, struct compat_crypt_kop) ++#define COMPAT_CIOCASYMASYNFETCH _IOR('c', 111, struct compat_crypt_kop) + + #endif /* CONFIG_COMPAT */ + +diff --git a/ioctl.c b/ioctl.c +index 44070e1..ec82c69 100644 +--- a/ioctl.c ++++ b/ioctl.c +@@ -1076,6 +1076,68 @@ cryptodev_ioctl(struct file *filp, unsigned int cmd, unsigned long arg_) + /* compatibility code for 32bit userlands */ + #ifdef CONFIG_COMPAT + ++static inline void compat_to_crypt_kop(struct compat_crypt_kop *compat, ++ struct crypt_kop *kop) ++{ ++ int i; ++ kop->crk_op = compat->crk_op; ++ kop->crk_status = compat->crk_status; ++ kop->crk_iparams = compat->crk_iparams; ++ kop->crk_oparams = compat->crk_oparams; ++ ++ for (i = 0; i < CRK_MAXPARAM; i++) { ++ kop->crk_param[i].crp_p = ++ compat_ptr(compat->crk_param[i].crp_p); ++ kop->crk_param[i].crp_nbits = compat->crk_param[i].crp_nbits; ++ } ++ ++ kop->curve_type = compat->curve_type; ++ kop->cookie = compat->cookie; ++} ++ ++static int compat_kop_from_user(struct kernel_crypt_kop *kop, ++ void __user *arg) ++{ ++ struct compat_crypt_kop compat_kop; ++ ++ if (unlikely(copy_from_user(&compat_kop, arg, sizeof(compat_kop)))) ++ return -EFAULT; ++ ++ compat_to_crypt_kop(&compat_kop, &kop->kop); ++ return fill_kop_from_cop(kop); ++} ++ ++static inline void crypt_kop_to_compat(struct crypt_kop *kop, ++ struct compat_crypt_kop *compat) ++{ ++ int i; ++ ++ compat->crk_op = kop->crk_op; ++ compat->crk_status = kop->crk_status; ++ compat->crk_iparams = kop->crk_iparams; ++ compat->crk_oparams = kop->crk_oparams; ++ ++ for (i = 0; i < CRK_MAXPARAM; i++) { ++ compat->crk_param[i].crp_p = ++ ptr_to_compat(kop->crk_param[i].crp_p); ++ compat->crk_param[i].crp_nbits = kop->crk_param[i].crp_nbits; ++ } ++ compat->cookie = kop->cookie; ++ compat->curve_type = kop->curve_type; ++} ++ ++static int compat_kop_to_user(struct kernel_crypt_kop *kop, void __user *arg) ++{ ++ struct compat_crypt_kop compat_kop; ++ ++ crypt_kop_to_compat(&kop->kop, &compat_kop); ++ if (unlikely(copy_to_user(arg, &compat_kop, sizeof(compat_kop)))) { ++ dprintk(1, KERN_ERR, "Cannot copy to userspace\n"); ++ return -EFAULT; ++ } ++ return 0; ++} ++ + static inline void + compat_to_session_op(struct compat_session_op *compat, struct session_op *sop) + { +@@ -1203,7 +1265,26 @@ cryptodev_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg_) + return -EFAULT; + } + return ret; ++ case COMPAT_CIOCKEY: ++ { ++ struct cryptodev_pkc *pkc = ++ kzalloc(sizeof(struct cryptodev_pkc), GFP_KERNEL); ++ ++ if (!pkc) ++ return -ENOMEM; ++ ++ ret = compat_kop_from_user(&pkc->kop, arg); ++ ++ if (unlikely(ret)) { ++ kfree(pkc); ++ return ret; ++ } + ++ pkc->type = SYNCHRONOUS; ++ ret = crypto_run_asym(pkc); ++ kfree(pkc); ++ } ++ return ret; + case COMPAT_CIOCCRYPT: + ret = compat_kcop_from_user(&kcop, fcr, arg); + if (unlikely(ret)) +@@ -1242,6 +1323,45 @@ cryptodev_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg_) + + return compat_kcop_to_user(&kcop, fcr, arg); + #endif ++ case COMPAT_CIOCASYMASYNCRYPT: ++ { ++ struct cryptodev_pkc *pkc = ++ kzalloc(sizeof(struct cryptodev_pkc), GFP_KERNEL); ++ ++ ret = compat_kop_from_user(&pkc->kop, arg); ++ if (unlikely(ret)) ++ return -EINVAL; ++ ++ /* Store associated FD priv data with asymmetric request */ ++ pkc->priv = pcr; ++ pkc->type = ASYNCHRONOUS; ++ ret = crypto_run_asym(pkc); ++ if (ret == -EINPROGRESS) ++ ret = 0; ++ } ++ return ret; ++ case COMPAT_CIOCASYMASYNFETCH: ++ { ++ struct cryptodev_pkc *pkc; ++ unsigned long flags; ++ ++ spin_lock_irqsave(&pcr->completion_lock, flags); ++ if (list_empty(&pcr->asym_completed_list)) { ++ spin_unlock_irqrestore(&pcr->completion_lock, flags); ++ return -ENOMEM; ++ } ++ pkc = list_first_entry(&pcr->asym_completed_list, ++ struct cryptodev_pkc, list); ++ list_del(&pkc->list); ++ spin_unlock_irqrestore(&pcr->completion_lock, flags); ++ ret = crypto_async_fetch_asym(pkc); ++ ++ /* Reflect the updated request to user-space */ ++ if (!ret) ++ compat_kop_to_user(&pkc->kop, arg); ++ kfree(pkc); ++ } ++ return ret; + default: + return -EINVAL; + } +-- +1.7.9.7 + diff --git a/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0011-Asynchronous-interface-changes-in-cryptodev.patch b/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0011-Asynchronous-interface-changes-in-cryptodev.patch new file mode 100644 index 00000000..5331abc6 --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0011-Asynchronous-interface-changes-in-cryptodev.patch @@ -0,0 +1,213 @@ +From ffa8fd090afaf3631e6abd0ab8daa6780be7c31c Mon Sep 17 00:00:00 2001 +From: Yashpal Dutta +Date: Fri, 7 Mar 2014 07:24:00 +0545 +Subject: [[Patch][fsl 11/16] Asynchronous interface changes in cryptodev + +Upstream-status: Pending + +Signed-off-by: Yashpal Dutta +--- + cryptlib.h | 7 ++++- + crypto/cryptodev.h | 10 ++++++- + cryptodev_int.h | 10 ++++++- + ioctl.c | 76 +++++++++++++++++++++++++++++++++++----------------- + 4 files changed, 76 insertions(+), 27 deletions(-) + +diff --git a/cryptlib.h b/cryptlib.h +index e77edc5..947d845 100644 +--- a/cryptlib.h ++++ b/cryptlib.h +@@ -113,7 +113,12 @@ struct cryptodev_pkc { + struct pkc_request req; /* PKC request structure allocated + from CryptoAPI */ + enum offload_type type; /* Synchronous Vs Asynchronous request */ +- void *cookie; /*Additional opaque cookie to be used in future */ ++ /* ++ * cookie used for transfering tranparent information from async ++ * submission to async fetch. Currently some dynamic allocated ++ * buffers are maintained which will be freed later during fetch ++ */ ++ void *cookie; + struct crypt_priv *priv; + }; + +diff --git a/crypto/cryptodev.h b/crypto/cryptodev.h +index 575ce63..0d65899 100644 +--- a/crypto/cryptodev.h ++++ b/crypto/cryptodev.h +@@ -255,6 +255,14 @@ struct crypt_kop { + void *cookie; + }; + ++#define MAX_COOKIES 4 ++ ++struct pkc_cookie_list_s { ++ int cookie_available; ++ void *cookie[MAX_COOKIES]; ++ int status[MAX_COOKIES]; ++}; ++ + enum cryptodev_crk_op_t { + CRK_MOD_EXP = 0, + CRK_MOD_EXP_CRT = 1, +@@ -299,5 +307,5 @@ enum cryptodev_crk_op_t { + #define CIOCASYNCFETCH _IOR('c', 111, struct crypt_op) + /* additional ioctls for asynchronous operation for asymmetric ciphers*/ + #define CIOCASYMASYNCRYPT _IOW('c', 112, struct crypt_kop) +-#define CIOCASYMASYNFETCH _IOR('c', 113, struct crypt_kop) ++#define CIOCASYMFETCHCOOKIE _IOR('c', 113, struct pkc_cookie_list_s) + #endif /* L_CRYPTODEV_H */ +diff --git a/cryptodev_int.h b/cryptodev_int.h +index 229fcd0..8beeef0 100644 +--- a/cryptodev_int.h ++++ b/cryptodev_int.h +@@ -93,6 +93,12 @@ struct compat_crypt_kop { + compat_uptr_t cookie; + }; + ++struct compat_pkc_cookie_list_s { ++ int cookie_available; ++ compat_uptr_t cookie[MAX_COOKIES]; ++ int status[MAX_COOKIES]; ++}; ++ + /* input of CIOCAUTHCRYPT */ + struct compat_crypt_auth_op { + uint32_t ses; /* session identifier */ +@@ -127,11 +133,13 @@ struct compat_crypt_auth_op { + /* compat ioctls, defined for the above structs */ + #define COMPAT_CIOCGSESSION _IOWR('c', 102, struct compat_session_op) + #define COMPAT_CIOCCRYPT _IOWR('c', 104, struct compat_crypt_op) ++#define COMPAT_CIOCKEY _IOW('c', 105, struct compat_crypt_kop) + #define COMPAT_CIOCASYNCCRYPT _IOW('c', 107, struct compat_crypt_op) + #define COMPAT_CIOCASYNCFETCH _IOR('c', 108, struct compat_crypt_op) + #define COMPAT_CIOCAUTHCRYPT _IOWR('c', 109, struct compat_crypt_auth_op) + #define COMPAT_CIOCASYMASYNCRYPT _IOW('c', 110, struct compat_crypt_kop) +-#define COMPAT_CIOCASYMASYNFETCH _IOR('c', 111, struct compat_crypt_kop) ++#define COMPAT_CIOCASYMFETCHCOOKIE _IOR('c', 111, \ ++ struct compat_pkc_cookie_list_s) + + #endif /* CONFIG_COMPAT */ + +diff --git a/ioctl.c b/ioctl.c +index ec82c69..9f57d46 100644 +--- a/ioctl.c ++++ b/ioctl.c +@@ -103,8 +103,6 @@ void cryptodev_complete_asym(struct crypto_async_request *req, int err) + crypto_free_pkc(pkc->s); + res->err = err; + if (pkc->type == SYNCHRONOUS) { +- if (err == -EINPROGRESS) +- return; + complete(&res->completion); + } else { + struct crypt_priv *pcr = pkc->priv; +@@ -1046,26 +1044,41 @@ cryptodev_ioctl(struct file *filp, unsigned int cmd, unsigned long arg_) + ret = 0; + } + return ret; +- case CIOCASYMASYNFETCH: ++ case CIOCASYMFETCHCOOKIE: + { + struct cryptodev_pkc *pkc; + unsigned long flags; ++ int i; ++ struct pkc_cookie_list_s cookie_list; + + spin_lock_irqsave(&pcr->completion_lock, flags); +- if (list_empty(&pcr->asym_completed_list)) { +- spin_unlock_irqrestore(&pcr->completion_lock, flags); +- return -ENOMEM; ++ cookie_list.cookie_available = 0; ++ for (i = 0; i < MAX_COOKIES; i++) { ++ if (!list_empty(&pcr->asym_completed_list)) { ++ /* Run a loop in the list for upto elements ++ and copy their response back */ ++ pkc = ++ list_first_entry(&pcr->asym_completed_list, ++ struct cryptodev_pkc, list); ++ list_del(&pkc->list); ++ ret = crypto_async_fetch_asym(pkc); ++ if (!ret) { ++ cookie_list.cookie_available++; ++ cookie_list.cookie[i] = ++ pkc->kop.kop.cookie; ++ cookie_list.status[i] = pkc->result.err; ++ } ++ kfree(pkc); ++ } else { ++ break; ++ } + } +- pkc = list_first_entry(&pcr->asym_completed_list, +- struct cryptodev_pkc, list); +- list_del(&pkc->list); + spin_unlock_irqrestore(&pcr->completion_lock, flags); +- ret = crypto_async_fetch_asym(pkc); + + /* Reflect the updated request to user-space */ +- if (!ret) +- kop_to_user(&pkc->kop, arg); +- kfree(pkc); ++ if (cookie_list.cookie_available) ++ copy_to_user(arg, &cookie_list, ++ sizeof(struct pkc_cookie_list_s)); + } + return ret; + default: +@@ -1340,26 +1353,41 @@ cryptodev_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg_) + ret = 0; + } + return ret; +- case COMPAT_CIOCASYMASYNFETCH: ++ case COMPAT_CIOCASYMFETCHCOOKIE: + { + struct cryptodev_pkc *pkc; + unsigned long flags; ++ int i = 0; ++ struct compat_pkc_cookie_list_s cookie_list; + + spin_lock_irqsave(&pcr->completion_lock, flags); +- if (list_empty(&pcr->asym_completed_list)) { +- spin_unlock_irqrestore(&pcr->completion_lock, flags); +- return -ENOMEM; ++ cookie_list.cookie_available = 0; ++ ++ for (i = 0; i < MAX_COOKIES; i++) { ++ if (!list_empty(&pcr->asym_completed_list)) { ++ /* Run a loop in the list for upto elements ++ and copy their response back */ ++ pkc = ++ list_first_entry(&pcr->asym_completed_list, ++ struct cryptodev_pkc, list); ++ list_del(&pkc->list); ++ ret = crypto_async_fetch_asym(pkc); ++ if (!ret) { ++ cookie_list.cookie_available++; ++ cookie_list.cookie[i] = ++ pkc->kop.kop.cookie; ++ } ++ kfree(pkc); ++ } else { ++ break; ++ } + } +- pkc = list_first_entry(&pcr->asym_completed_list, +- struct cryptodev_pkc, list); +- list_del(&pkc->list); + spin_unlock_irqrestore(&pcr->completion_lock, flags); +- ret = crypto_async_fetch_asym(pkc); + + /* Reflect the updated request to user-space */ +- if (!ret) +- compat_kop_to_user(&pkc->kop, arg); +- kfree(pkc); ++ if (cookie_list.cookie_available) ++ copy_to_user(arg, &cookie_list, ++ sizeof(struct compat_pkc_cookie_list_s)); + } + return ret; + default: +-- +1.7.9.7 + diff --git a/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0012-ECC_KEYGEN-and-DLC_KEYGEN-supported-in-cryptodev-mod.patch b/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0012-ECC_KEYGEN-and-DLC_KEYGEN-supported-in-cryptodev-mod.patch new file mode 100644 index 00000000..acb5bea7 --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0012-ECC_KEYGEN-and-DLC_KEYGEN-supported-in-cryptodev-mod.patch @@ -0,0 +1,213 @@ +From bda8dd5839da7a8e731b60b64b9fcb531c334b99 Mon Sep 17 00:00:00 2001 +From: Yashpal Dutta +Date: Fri, 7 Mar 2014 07:53:53 +0545 +Subject: [[Patch][fsl 12/16] ECC_KEYGEN and DLC_KEYGEN supported in cryptodev + module + +Upstream-status: Pending + +Signed-off-by: Yashpal Dutta +--- + cryptlib.c | 2 ++ + crypto/cryptodev.h | 5 +++- + ioctl.c | 29 ++++++++++++++++-- + main.c | 85 ++++++++++++++++++++++++++++++++++++++++++++++++++++ + 4 files changed, 118 insertions(+), 3 deletions(-) + +diff --git a/cryptlib.c b/cryptlib.c +index fa0b63f..41acb2c 100644 +--- a/cryptlib.c ++++ b/cryptlib.c +@@ -437,6 +437,8 @@ int cryptodev_pkc_offload(struct cryptodev_pkc *pkc) + case DSA_VERIFY: + case ECDSA_SIGN: + case ECDSA_VERIFY: ++ case DLC_KEYGEN: ++ case ECC_KEYGEN: + pkc->s = crypto_alloc_pkc("pkc(dsa)", + CRYPTO_ALG_TYPE_PKC_DSA, 0); + break; +diff --git a/crypto/cryptodev.h b/crypto/cryptodev.h +index 0d65899..33cca2e 100644 +--- a/crypto/cryptodev.h ++++ b/crypto/cryptodev.h +@@ -269,6 +269,8 @@ enum cryptodev_crk_op_t { + CRK_DSA_SIGN = 2, + CRK_DSA_VERIFY = 3, + CRK_DH_COMPUTE_KEY = 4, ++ CRK_DSA_GENERATE_KEY = 5, ++ CRK_DH_GENERATE_KEY = 6, + CRK_ALGORITHM_ALL + }; + +@@ -281,7 +283,8 @@ enum cryptodev_crk_op_t { + #define CRF_DSA_SIGN (1 << CRK_DSA_SIGN) + #define CRF_DSA_VERIFY (1 << CRK_DSA_VERIFY) + #define CRF_DH_COMPUTE_KEY (1 << CRK_DH_COMPUTE_KEY) +- ++#define CRF_DSA_GENERATE_KEY (1 << CRK_DSA_GENERATE_KEY) ++#define CRF_DH_GENERATE_KEY (1 << CRK_DH_GENERATE_KEY) + + /* ioctl's. Compatible with old linux cryptodev.h + */ +diff --git a/ioctl.c b/ioctl.c +index 9f57d46..cc1a2a9 100644 +--- a/ioctl.c ++++ b/ioctl.c +@@ -721,6 +721,23 @@ static int crypto_async_fetch_asym(struct cryptodev_pkc *pkc) + dh_req->z, dh_req->z_len); + } + break; ++ case CRK_DSA_GENERATE_KEY: ++ case CRK_DH_GENERATE_KEY: ++ { ++ struct keygen_req_s *key_req = &pkc_req->req_u.keygen; ++ ++ if (pkc_req->type == ECC_KEYGEN) { ++ copy_to_user(ckop->crk_param[4].crp_p, key_req->pub_key, ++ key_req->pub_key_len); ++ copy_to_user(ckop->crk_param[5].crp_p, ++ key_req->priv_key, key_req->priv_key_len); ++ } else { ++ copy_to_user(ckop->crk_param[3].crp_p, ++ key_req->pub_key, key_req->pub_key_len); ++ copy_to_user(ckop->crk_param[4].crp_p, ++ key_req->priv_key, key_req->priv_key_len); ++ } ++ } + default: + ret = -EINVAL; + } +@@ -934,8 +951,9 @@ cryptodev_ioctl(struct file *filp, unsigned int cmd, unsigned long arg_) + + switch (cmd) { + case CIOCASYMFEAT: +- return put_user(CRF_MOD_EXP_CRT | CRF_MOD_EXP | +- CRF_DSA_SIGN | CRF_DSA_VERIFY | CRF_DH_COMPUTE_KEY, p); ++ return put_user(CRF_MOD_EXP_CRT | CRF_MOD_EXP | CRF_DSA_SIGN | ++ CRF_DSA_VERIFY | CRF_DH_COMPUTE_KEY | ++ CRF_DSA_GENERATE_KEY, p); + case CRIOGET: + fd = clonefd(filp); + ret = put_user(fd, p); +@@ -1079,7 +1097,14 @@ cryptodev_ioctl(struct file *filp, unsigned int cmd, unsigned long arg_) + if (cookie_list.cookie_available) + copy_to_user(arg, &cookie_list, + sizeof(struct pkc_cookie_list_s)); ++ else { ++ struct pkc_cookie_list_s *user_ck_list = (void *)arg; ++ ++ put_user(0, &(user_ck_list->cookie_available)); ++ } ++ ret = cookie_list.cookie_available; + } ++ + return ret; + default: + return -EINVAL; +diff --git a/main.c b/main.c +index 0b7951e..c901bc7 100644 +--- a/main.c ++++ b/main.c +@@ -342,6 +342,85 @@ err: + return rc; + } + ++int crypto_kop_keygen(struct cryptodev_pkc *pkc) ++{ ++ struct kernel_crypt_kop *kop = &pkc->kop; ++ struct crypt_kop *cop = &kop->kop; ++ struct pkc_request *pkc_req; ++ struct keygen_req_s *key_req; ++ int rc, buf_size; ++ uint8_t *buf; ++ ++ if (!cop->crk_param[0].crp_nbits || !cop->crk_param[1].crp_nbits || ++ !cop->crk_param[2].crp_nbits || !cop->crk_param[3].crp_nbits || ++ !cop->crk_param[4].crp_nbits) ++ return -EINVAL; ++ ++ pkc_req = &pkc->req; ++ key_req = &pkc_req->req_u.keygen; ++ key_req->q_len = (cop->crk_param[0].crp_nbits + 7)/8; ++ key_req->r_len = (cop->crk_param[1].crp_nbits + 7)/8; ++ key_req->g_len = (cop->crk_param[2].crp_nbits + 7)/8; ++ if (cop->crk_iparams == 3) { ++ key_req->pub_key_len = (cop->crk_param[3].crp_nbits + 7)/8; ++ key_req->priv_key_len = (cop->crk_param[4].crp_nbits + 7)/8; ++ buf_size = key_req->q_len + key_req->r_len + key_req->g_len + ++ key_req->pub_key_len + key_req->priv_key_len; ++ pkc_req->type = DLC_KEYGEN; ++ } else { ++ key_req->ab_len = (cop->crk_param[3].crp_nbits + 7)/8; ++ key_req->pub_key_len = (cop->crk_param[4].crp_nbits + 7)/8; ++ key_req->priv_key_len = (cop->crk_param[5].crp_nbits + 7)/8; ++ buf_size = key_req->q_len + key_req->r_len + key_req->g_len + ++ key_req->pub_key_len + key_req->priv_key_len + ++ key_req->ab_len; ++ pkc_req->type = ECC_KEYGEN; ++ pkc_req->curve_type = cop->curve_type; ++ } ++ ++ buf = kzalloc(buf_size, GFP_DMA); ++ if (!buf) ++ return -ENOMEM; ++ ++ key_req->q = buf; ++ key_req->r = key_req->q + key_req->q_len; ++ key_req->g = key_req->r + key_req->r_len; ++ key_req->pub_key = key_req->g + key_req->g_len; ++ key_req->priv_key = key_req->pub_key + key_req->pub_key_len; ++ copy_from_user(key_req->q, cop->crk_param[0].crp_p, key_req->q_len); ++ copy_from_user(key_req->r, cop->crk_param[1].crp_p, key_req->r_len); ++ copy_from_user(key_req->g, cop->crk_param[2].crp_p, key_req->g_len); ++ if (cop->crk_iparams == 3) { ++ copy_from_user(key_req->pub_key, cop->crk_param[3].crp_p, ++ key_req->pub_key_len); ++ copy_from_user(key_req->priv_key, cop->crk_param[4].crp_p, ++ key_req->priv_key_len); ++ } else { ++ key_req->ab = key_req->priv_key + key_req->priv_key_len; ++ copy_from_user(key_req->ab, cop->crk_param[3].crp_p, ++ key_req->ab_len); ++ copy_from_user(key_req->pub_key, cop->crk_param[4].crp_p, ++ key_req->pub_key_len); ++ copy_from_user(key_req->priv_key, cop->crk_param[5].crp_p, ++ key_req->priv_key_len); ++ } ++ ++ rc = cryptodev_pkc_offload(pkc); ++ if (pkc->type == SYNCHRONOUS) { ++ if (rc) ++ goto err; ++ } else { ++ if (rc != -EINPROGRESS && !rc) ++ goto err; ++ ++ pkc->cookie = buf; ++ return rc; ++ } ++err: ++ kfree(buf); ++ return rc; ++} ++ + int crypto_kop_dh_key(struct cryptodev_pkc *pkc) + { + struct kernel_crypt_kop *kop = &pkc->kop; +@@ -554,6 +633,12 @@ int crypto_run_asym(struct cryptodev_pkc *pkc) + goto err; + ret = crypto_kop_dh_key(pkc); + break; ++ case CRK_DH_GENERATE_KEY: ++ case CRK_DSA_GENERATE_KEY: ++ if ((kop->kop.crk_iparams != 3 && kop->kop.crk_iparams != 4)) ++ goto err; ++ ret = crypto_kop_keygen(pkc); ++ break; + } + err: + return ret; +-- +1.7.9.7 + diff --git a/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0013-RCU-stall-fixed-in-PKC-asynchronous-interface.patch b/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0013-RCU-stall-fixed-in-PKC-asynchronous-interface.patch new file mode 100644 index 00000000..26c01689 --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0013-RCU-stall-fixed-in-PKC-asynchronous-interface.patch @@ -0,0 +1,238 @@ +From 211a494a4f8ee6d5d31a1db938b771958ea32c6b Mon Sep 17 00:00:00 2001 +From: Yashpal Dutta +Date: Fri, 7 Mar 2014 08:49:15 +0545 +Subject: [[Patch][fsl 13/16] RCU stall fixed in PKC asynchronous interface + +Upstream-status: Pending + +Signed-off-by: Yashpal Dutta +--- + ioctl.c | 23 +++++++++++------------ + main.c | 43 +++++++++++++++++++++++++++---------------- + 2 files changed, 38 insertions(+), 28 deletions(-) + +diff --git a/ioctl.c b/ioctl.c +index cc1a2a9..1752880 100644 +--- a/ioctl.c ++++ b/ioctl.c +@@ -106,10 +106,9 @@ void cryptodev_complete_asym(struct crypto_async_request *req, int err) + complete(&res->completion); + } else { + struct crypt_priv *pcr = pkc->priv; +- unsigned long flags; +- spin_lock_irqsave(&pcr->completion_lock, flags); ++ spin_lock_bh(&pcr->completion_lock); + list_add_tail(&pkc->list, &pcr->asym_completed_list); +- spin_unlock_irqrestore(&pcr->completion_lock, flags); ++ spin_unlock_bh(&pcr->completion_lock); + /* wake for POLLIN */ + wake_up_interruptible(&pcr->user_waiter); + } +@@ -953,7 +952,7 @@ cryptodev_ioctl(struct file *filp, unsigned int cmd, unsigned long arg_) + case CIOCASYMFEAT: + return put_user(CRF_MOD_EXP_CRT | CRF_MOD_EXP | CRF_DSA_SIGN | + CRF_DSA_VERIFY | CRF_DH_COMPUTE_KEY | +- CRF_DSA_GENERATE_KEY, p); ++ CRF_DSA_GENERATE_KEY | CRF_DH_GENERATE_KEY, p); + case CRIOGET: + fd = clonefd(filp); + ret = put_user(fd, p); +@@ -992,7 +991,7 @@ cryptodev_ioctl(struct file *filp, unsigned int cmd, unsigned long arg_) + case CIOCKEY: + { + struct cryptodev_pkc *pkc = +- kzalloc(sizeof(struct cryptodev_pkc), GFP_KERNEL); ++ kmalloc(sizeof(struct cryptodev_pkc), GFP_KERNEL); + + if (!pkc) + return -ENOMEM; +@@ -1048,7 +1047,7 @@ cryptodev_ioctl(struct file *filp, unsigned int cmd, unsigned long arg_) + case CIOCASYMASYNCRYPT: + { + struct cryptodev_pkc *pkc = +- kzalloc(sizeof(struct cryptodev_pkc), GFP_KERNEL); ++ kmalloc(sizeof(struct cryptodev_pkc), GFP_KERNEL); + ret = kop_from_user(&pkc->kop, arg); + + if (unlikely(ret)) +@@ -1065,13 +1064,12 @@ cryptodev_ioctl(struct file *filp, unsigned int cmd, unsigned long arg_) + case CIOCASYMFETCHCOOKIE: + { + struct cryptodev_pkc *pkc; +- unsigned long flags; + int i; + struct pkc_cookie_list_s cookie_list; + +- spin_lock_irqsave(&pcr->completion_lock, flags); + cookie_list.cookie_available = 0; + for (i = 0; i < MAX_COOKIES; i++) { ++ spin_lock_bh(&pcr->completion_lock); + if (!list_empty(&pcr->asym_completed_list)) { + /* Run a loop in the list for upto elements + and copy their response back */ +@@ -1079,6 +1077,7 @@ cryptodev_ioctl(struct file *filp, unsigned int cmd, unsigned long arg_) + list_first_entry(&pcr->asym_completed_list, + struct cryptodev_pkc, list); + list_del(&pkc->list); ++ spin_unlock_bh(&pcr->completion_lock); + ret = crypto_async_fetch_asym(pkc); + if (!ret) { + cookie_list.cookie_available++; +@@ -1088,10 +1087,10 @@ cryptodev_ioctl(struct file *filp, unsigned int cmd, unsigned long arg_) + } + kfree(pkc); + } else { ++ spin_unlock_bh(&pcr->completion_lock); + break; + } + } +- spin_unlock_irqrestore(&pcr->completion_lock, flags); + + /* Reflect the updated request to user-space */ + if (cookie_list.cookie_available) +@@ -1381,14 +1380,13 @@ cryptodev_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg_) + case COMPAT_CIOCASYMFETCHCOOKIE: + { + struct cryptodev_pkc *pkc; +- unsigned long flags; + int i = 0; + struct compat_pkc_cookie_list_s cookie_list; + +- spin_lock_irqsave(&pcr->completion_lock, flags); + cookie_list.cookie_available = 0; + + for (i = 0; i < MAX_COOKIES; i++) { ++ spin_lock_bh(&pcr->completion_lock); + if (!list_empty(&pcr->asym_completed_list)) { + /* Run a loop in the list for upto elements + and copy their response back */ +@@ -1396,6 +1394,7 @@ cryptodev_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg_) + list_first_entry(&pcr->asym_completed_list, + struct cryptodev_pkc, list); + list_del(&pkc->list); ++ spin_unlock_bh(&pcr->completion_lock); + ret = crypto_async_fetch_asym(pkc); + if (!ret) { + cookie_list.cookie_available++; +@@ -1404,10 +1403,10 @@ cryptodev_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg_) + } + kfree(pkc); + } else { ++ spin_unlock_bh(&pcr->completion_lock); + break; + } + } +- spin_unlock_irqrestore(&pcr->completion_lock, flags); + + /* Reflect the updated request to user-space */ + if (cookie_list.cookie_available) +diff --git a/main.c b/main.c +index c901bc7..2747706 100644 +--- a/main.c ++++ b/main.c +@@ -215,7 +215,9 @@ int crypto_kop_dsasign(struct cryptodev_pkc *pkc) + pkc_req->type = DSA_SIGN; + } + +- buf = kzalloc(buf_size, GFP_DMA); ++ buf = kmalloc(buf_size, GFP_DMA); ++ if (!buf) ++ return -ENOMEM; + + dsa_req->q = buf; + dsa_req->r = dsa_req->q + dsa_req->q_len; +@@ -298,7 +300,9 @@ int crypto_kop_dsaverify(struct cryptodev_pkc *pkc) + pkc_req->type = DSA_VERIFY; + } + +- buf = kzalloc(buf_size, GFP_DMA); ++ buf = kmalloc(buf_size, GFP_DMA); ++ if (!buf) ++ return -ENOMEM; + + dsa_req->q = buf; + dsa_req->r = dsa_req->q + dsa_req->q_len; +@@ -378,7 +382,7 @@ int crypto_kop_keygen(struct cryptodev_pkc *pkc) + pkc_req->curve_type = cop->curve_type; + } + +- buf = kzalloc(buf_size, GFP_DMA); ++ buf = kmalloc(buf_size, GFP_DMA); + if (!buf) + return -ENOMEM; + +@@ -390,25 +394,28 @@ int crypto_kop_keygen(struct cryptodev_pkc *pkc) + copy_from_user(key_req->q, cop->crk_param[0].crp_p, key_req->q_len); + copy_from_user(key_req->r, cop->crk_param[1].crp_p, key_req->r_len); + copy_from_user(key_req->g, cop->crk_param[2].crp_p, key_req->g_len); +- if (cop->crk_iparams == 3) { +- copy_from_user(key_req->pub_key, cop->crk_param[3].crp_p, +- key_req->pub_key_len); +- copy_from_user(key_req->priv_key, cop->crk_param[4].crp_p, +- key_req->priv_key_len); +- } else { ++ if (cop->crk_iparams == 4) { + key_req->ab = key_req->priv_key + key_req->priv_key_len; + copy_from_user(key_req->ab, cop->crk_param[3].crp_p, + key_req->ab_len); +- copy_from_user(key_req->pub_key, cop->crk_param[4].crp_p, +- key_req->pub_key_len); +- copy_from_user(key_req->priv_key, cop->crk_param[5].crp_p, +- key_req->priv_key_len); + } + + rc = cryptodev_pkc_offload(pkc); + if (pkc->type == SYNCHRONOUS) { + if (rc) + goto err; ++ ++ if (cop->crk_iparams == 4) { ++ copy_to_user(cop->crk_param[4].crp_p, key_req->pub_key, ++ key_req->pub_key_len); ++ copy_to_user(cop->crk_param[5].crp_p, key_req->priv_key, ++ key_req->priv_key_len); ++ } else { ++ copy_to_user(cop->crk_param[3].crp_p, key_req->pub_key, ++ key_req->pub_key_len); ++ copy_to_user(cop->crk_param[4].crp_p, ++ key_req->priv_key, key_req->priv_key_len); ++ } + } else { + if (rc != -EINPROGRESS && !rc) + goto err; +@@ -447,7 +454,9 @@ int crypto_kop_dh_key(struct cryptodev_pkc *pkc) + pkc_req->type = DH_COMPUTE_KEY; + } + buf_size += dh_req->z_len; +- buf = kzalloc(buf_size, GFP_DMA); ++ buf = kmalloc(buf_size, GFP_DMA); ++ if (!buf) ++ return -ENOMEM; + dh_req->q = buf; + dh_req->s = dh_req->q + dh_req->q_len; + dh_req->pub_key = dh_req->s + dh_req->s_len; +@@ -508,9 +517,11 @@ int crypto_modexp_crt(struct cryptodev_pkc *pkc) + rsa_req->dq_len = (cop->crk_param[4].crp_nbits + 7)/8; + rsa_req->c_len = (cop->crk_param[5].crp_nbits + 7)/8; + rsa_req->f_len = (cop->crk_param[6].crp_nbits + 7)/8; +- buf = kzalloc(rsa_req->p_len + rsa_req->q_len + rsa_req->f_len + ++ buf = kmalloc(rsa_req->p_len + rsa_req->q_len + rsa_req->f_len + + rsa_req->dp_len + rsa_req->dp_len + rsa_req->c_len + + rsa_req->g_len, GFP_DMA); ++ if (!buf) ++ return -ENOMEM; + rsa_req->p = buf; + rsa_req->q = rsa_req->p + rsa_req->p_len; + rsa_req->g = rsa_req->q + rsa_req->q_len; +@@ -563,7 +574,7 @@ int crypto_bn_modexp(struct cryptodev_pkc *pkc) + rsa_req->e_len = (cop->crk_param[1].crp_nbits + 7)/8; + rsa_req->n_len = (cop->crk_param[2].crp_nbits + 7)/8; + rsa_req->g_len = (cop->crk_param[3].crp_nbits + 7)/8; +- buf = kzalloc(rsa_req->f_len + rsa_req->e_len + rsa_req->n_len ++ buf = kmalloc(rsa_req->f_len + rsa_req->e_len + rsa_req->n_len + + rsa_req->g_len, GFP_DMA); + if (!buf) + return -ENOMEM; +-- +1.7.9.7 + diff --git a/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0014-use-static-allocation-for-keys-copied-from-userspace.patch b/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0014-use-static-allocation-for-keys-copied-from-userspace.patch new file mode 100644 index 00000000..c68f3d7c --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0014-use-static-allocation-for-keys-copied-from-userspace.patch @@ -0,0 +1,131 @@ +From 50c116780f736b3e6a11389c9d9b3f4a1d5cab90 Mon Sep 17 00:00:00 2001 +From: Cristian Stoica +Date: Wed, 19 Mar 2014 17:59:17 +0200 +Subject: [[Patch][fsl 14/16] use static allocation for keys copied from + userspace + +Upstream-status: Pending + +There is no need to keep keys around for the entire duration of the +session. The keys are copied from user-space and then used to initialize +the ciphers. After this, the original keys can be discarded. +The total required space for keys is small and known in advance. This +patch uses this information to allocate required space on stack. + +Signed-off-by: Cristian Stoica +--- + cryptodev_int.h | 1 - + ioctl.c | 38 ++++++++++++++++++++------------------ + 2 files changed, 20 insertions(+), 19 deletions(-) + +diff --git a/cryptodev_int.h b/cryptodev_int.h +index 8beeef0..7ea6976 100644 +--- a/cryptodev_int.h ++++ b/cryptodev_int.h +@@ -212,7 +212,6 @@ struct csession { + struct hash_data hdata; + uint32_t sid; + uint32_t alignmask; +- uint8_t *key; + + unsigned int array_size; + unsigned int used_pages; /* the number of pages that are used */ +diff --git a/ioctl.c b/ioctl.c +index 1752880..16ce72c 100644 +--- a/ioctl.c ++++ b/ioctl.c +@@ -46,6 +46,8 @@ + #include + #include + #include ++#include ++#include + + #include + +@@ -136,9 +138,17 @@ crypto_create_session(struct fcrypt *fcr, struct session_op *sop) + const char *alg_name = NULL; + const char *hash_name = NULL; + int hmac_mode = 1, stream = 0, aead = 0; +- uint8_t *key = NULL; +- unsigned int keylen; +- uint8_t mackey[CRYPTO_HMAC_MAX_KEY_LEN]; ++ /* ++ * With aead, only ckey is used and it can cover all the struct space; ++ * otherwise both keys may be used simultaneously but they are confined ++ * to their spaces ++ */ ++ struct { ++ uint8_t ckey[CRYPTO_CIPHER_MAX_KEY_LEN]; ++ uint8_t mkey[CRYPTO_HMAC_MAX_KEY_LEN]; ++ /* padding space for aead keys */ ++ uint8_t pad[RTA_SPACE(sizeof(struct crypto_authenc_key_param))]; ++ } keys; + + /* Does the request make sense? */ + if (unlikely(!sop->cipher && !sop->mac)) { +@@ -257,23 +267,17 @@ crypto_create_session(struct fcrypt *fcr, struct session_op *sop) + + /* Set-up crypto transform. */ + if (alg_name) { ++ unsigned int keylen; + ret = cryptodev_get_cipher_keylen(&keylen, sop, aead); + if (unlikely(ret < 0)) + goto error_cipher; + +- key = kmalloc(keylen, GFP_KERNEL); +- ses_new->key = key; +- if (unlikely(!key)) { +- ret = -ENOMEM; +- goto error_cipher; +- } +- +- ret = cryptodev_get_cipher_key(key, sop, aead); ++ ret = cryptodev_get_cipher_key(keys.ckey, sop, aead); + if (unlikely(ret < 0)) + goto error_cipher; + +- ret = cryptodev_cipher_init(&ses_new->cdata, alg_name, key, keylen, +- stream, aead); ++ ret = cryptodev_cipher_init(&ses_new->cdata, alg_name, ++ keys.ckey, keylen, stream, aead); + if (ret < 0) { + ddebug(1, "Failed to load cipher for %s", alg_name); + ret = -EINVAL; +@@ -289,14 +293,14 @@ crypto_create_session(struct fcrypt *fcr, struct session_op *sop) + goto error_hash; + } + +- if (sop->mackey && unlikely(copy_from_user(mackey, sop->mackey, +- sop->mackeylen))) { ++ if (sop->mackey && unlikely(copy_from_user(keys.mkey, ++ sop->mackey, sop->mackeylen))) { + ret = -EFAULT; + goto error_hash; + } + + ret = cryptodev_hash_init(&ses_new->hdata, hash_name, hmac_mode, +- mackey, sop->mackeylen); ++ keys.mkey, sop->mackeylen); + if (ret != 0) { + ddebug(1, "Failed to load hash for %s", hash_name); + ret = -EINVAL; +@@ -349,7 +353,6 @@ error_hash: + kfree(ses_new->sg); + kfree(ses_new->pages); + error_cipher: +- kfree(key); + kfree(ses_new); + + return ret; +@@ -370,7 +373,6 @@ crypto_destroy_session(struct csession *ses_ptr) + ddebug(2, "freeing space for %d user pages", ses_ptr->array_size); + kfree(ses_ptr->pages); + kfree(ses_ptr->sg); +- kfree(ses_ptr->key); + mutex_unlock(&ses_ptr->sem); + mutex_destroy(&ses_ptr->sem); + kfree(ses_ptr); +-- +1.7.9.7 + diff --git a/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0015-Add-RSA-Key-generation-offloading.patch b/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0015-Add-RSA-Key-generation-offloading.patch new file mode 100644 index 00000000..a419b58a --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0015-Add-RSA-Key-generation-offloading.patch @@ -0,0 +1,170 @@ +From 1d9c8084a9addaa071ca3e6c14167ebdb2673725 Mon Sep 17 00:00:00 2001 +From: Hou Zhiqiang +Date: Wed, 19 Mar 2014 14:02:46 +0800 +Subject: [[Patch][fsl 15/16] Add RSA Key generation offloading + +Upstream-status: Pending + +Signed-off-by: Hou Zhiqiang +Tested-by: Cristian Stoica +--- + cryptlib.c | 1 + + crypto/cryptodev.h | 2 ++ + ioctl.c | 3 +- + main.c | 80 +++++++++++++++++++++++++++++++++++++++++++++++++++- + 4 files changed, 84 insertions(+), 2 deletions(-) + +diff --git a/cryptlib.c b/cryptlib.c +index 41acb2c..89af77a 100644 +--- a/cryptlib.c ++++ b/cryptlib.c +@@ -426,6 +426,7 @@ int cryptodev_pkc_offload(struct cryptodev_pkc *pkc) + struct pkc_request *pkc_req = &pkc->req, *pkc_requested; + + switch (pkc_req->type) { ++ case RSA_KEYGEN: + case RSA_PUB: + case RSA_PRIV_FORM1: + case RSA_PRIV_FORM2: +diff --git a/crypto/cryptodev.h b/crypto/cryptodev.h +index 33cca2e..7990f27 100644 +--- a/crypto/cryptodev.h ++++ b/crypto/cryptodev.h +@@ -271,6 +271,7 @@ enum cryptodev_crk_op_t { + CRK_DH_COMPUTE_KEY = 4, + CRK_DSA_GENERATE_KEY = 5, + CRK_DH_GENERATE_KEY = 6, ++ CRK_RSA_GENERATE_KEY = 7, + CRK_ALGORITHM_ALL + }; + +@@ -280,6 +281,7 @@ enum cryptodev_crk_op_t { + */ + #define CRF_MOD_EXP (1 << CRK_MOD_EXP) + #define CRF_MOD_EXP_CRT (1 << CRK_MOD_EXP_CRT) ++#define CRF_RSA_GENERATE_KEY (1 << CRK_RSA_GENERATE_KEY) + #define CRF_DSA_SIGN (1 << CRK_DSA_SIGN) + #define CRF_DSA_VERIFY (1 << CRK_DSA_VERIFY) + #define CRF_DH_COMPUTE_KEY (1 << CRK_DH_COMPUTE_KEY) +diff --git a/ioctl.c b/ioctl.c +index 16ce72c..0344c0c 100644 +--- a/ioctl.c ++++ b/ioctl.c +@@ -954,7 +954,8 @@ cryptodev_ioctl(struct file *filp, unsigned int cmd, unsigned long arg_) + case CIOCASYMFEAT: + return put_user(CRF_MOD_EXP_CRT | CRF_MOD_EXP | CRF_DSA_SIGN | + CRF_DSA_VERIFY | CRF_DH_COMPUTE_KEY | +- CRF_DSA_GENERATE_KEY | CRF_DH_GENERATE_KEY, p); ++ CRF_DSA_GENERATE_KEY | CRF_DH_GENERATE_KEY | ++ CRF_RSA_GENERATE_KEY, p); + case CRIOGET: + fd = clonefd(filp); + ret = put_user(fd, p); +diff --git a/main.c b/main.c +index 2747706..14dcf40 100644 +--- a/main.c ++++ b/main.c +@@ -346,6 +346,82 @@ err: + return rc; + } + ++int crypto_kop_rsa_keygen(struct cryptodev_pkc *pkc) ++{ ++ struct kernel_crypt_kop *kop = &pkc->kop; ++ struct crypt_kop *cop = &kop->kop; ++ struct pkc_request *pkc_req; ++ struct rsa_keygen_req_s *key_req; ++ int rc, buf_size; ++ uint8_t *buf; ++ ++ if (!cop->crk_param[0].crp_nbits || !cop->crk_param[1].crp_nbits || ++ !cop->crk_param[2].crp_nbits || !cop->crk_param[3].crp_nbits || ++ !cop->crk_param[4].crp_nbits || !cop->crk_param[5].crp_nbits || ++ !cop->crk_param[6].crp_nbits) ++ return -EINVAL; ++ ++ pkc_req = &pkc->req; ++ pkc_req->type = RSA_KEYGEN; ++ key_req = &pkc_req->req_u.rsa_keygen; ++ key_req->n_len = (cop->crk_param[2].crp_nbits + 7)/8; ++ key_req->p_len = (cop->crk_param[0].crp_nbits + 7) / 8; ++ key_req->q_len = (cop->crk_param[1].crp_nbits + 7) / 8; ++ key_req->n_len = (cop->crk_param[2].crp_nbits + 7) / 8; ++ key_req->d_len = (cop->crk_param[3].crp_nbits + 7) / 8; ++ key_req->dp_len = (cop->crk_param[4].crp_nbits + 7) / 8; ++ key_req->dq_len = (cop->crk_param[5].crp_nbits + 7) / 8; ++ key_req->c_len = (cop->crk_param[6].crp_nbits + 7) / 8; ++ ++ buf_size = key_req->p_len + key_req->q_len + key_req->n_len + ++ key_req->d_len + key_req->dp_len + ++ key_req->dq_len + key_req->c_len; ++ ++ buf = kmalloc(buf_size, GFP_DMA); ++ if (!buf) ++ return -ENOMEM; ++ key_req->p = buf; ++ key_req->q = key_req->p + key_req->p_len; ++ key_req->n = key_req->q + key_req->q_len; ++ key_req->d = key_req->n + key_req->n_len; ++ key_req->dp = key_req->d + key_req->d_len; ++ key_req->dq = key_req->dp + key_req->dp_len; ++ key_req->c = key_req->dq + key_req->dq_len; ++ ++ rc = cryptodev_pkc_offload(pkc); ++ ++ if (pkc->type == SYNCHRONOUS) { ++ if (rc) ++ goto err; ++ ++ copy_to_user(cop->crk_param[0].crp_p, ++ key_req->p, key_req->p_len); ++ copy_to_user(cop->crk_param[1].crp_p, ++ key_req->q, key_req->q_len); ++ copy_to_user(cop->crk_param[2].crp_p, ++ key_req->n, key_req->n_len); ++ copy_to_user(cop->crk_param[3].crp_p, ++ key_req->d, key_req->d_len); ++ copy_to_user(cop->crk_param[4].crp_p, ++ key_req->dp, key_req->dp_len); ++ copy_to_user(cop->crk_param[5].crp_p, ++ key_req->dq, key_req->dq_len); ++ copy_to_user(cop->crk_param[6].crp_p, ++ key_req->c, key_req->c_len); ++ } else { ++ if (rc != -EINPROGRESS && !rc) { ++ printk("%s: Failed\n", __func__); ++ goto err; ++ } ++ pkc->cookie = buf; ++ return rc; ++ } ++err: ++ kfree(buf); ++ return rc; ++ ++} ++ + int crypto_kop_keygen(struct cryptodev_pkc *pkc) + { + struct kernel_crypt_kop *kop = &pkc->kop; +@@ -385,7 +461,6 @@ int crypto_kop_keygen(struct cryptodev_pkc *pkc) + buf = kmalloc(buf_size, GFP_DMA); + if (!buf) + return -ENOMEM; +- + key_req->q = buf; + key_req->r = key_req->q + key_req->q_len; + key_req->g = key_req->r + key_req->r_len; +@@ -650,6 +725,9 @@ int crypto_run_asym(struct cryptodev_pkc *pkc) + goto err; + ret = crypto_kop_keygen(pkc); + break; ++ case CRK_RSA_GENERATE_KEY: ++ ret = crypto_kop_rsa_keygen(pkc); ++ break; + } + err: + return ret; +-- +1.7.9.7 + diff --git a/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0016-Fixed-compilation-error-of-openssl-with-fsl-cryptode.patch b/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0016-Fixed-compilation-error-of-openssl-with-fsl-cryptode.patch new file mode 100644 index 00000000..d5cc7f04 --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0016-Fixed-compilation-error-of-openssl-with-fsl-cryptode.patch @@ -0,0 +1,116 @@ +From 2215332bff6034d0e22e92e8fda0993f2579a740 Mon Sep 17 00:00:00 2001 +From: Yashpal Dutta +Date: Thu, 17 Apr 2014 07:08:47 +0545 +Subject: [[Patch][fsl 16/16] Fixed compilation error of openssl with fsl + cryptodev + +Upstream-status: Pending + +Signed-off-by: Yashpal Dutta +Tested-by: Cristian Stoica +--- + cryptlib.c | 6 +++--- + crypto/cryptodev.h | 9 ++++++++- + cryptodev_int.h | 2 +- + ioctl.c | 6 +++++- + 4 files changed, 17 insertions(+), 6 deletions(-) + +diff --git a/cryptlib.c b/cryptlib.c +index 89af77a..1fc03e5 100644 +--- a/cryptlib.c ++++ b/cryptlib.c +@@ -129,7 +129,7 @@ int cryptodev_cipher_init(struct cipher_data *out, const char *alg_name, + if (alg->max_keysize > 0 && + unlikely((keylen < alg->min_keysize) || + (keylen > alg->max_keysize))) { +- ddebug(1, "Wrong keylen '%zu' for algorithm '%s'. Use %u to %u.", ++ ddebug(1, "Wrong keylen '%u' for algorithm '%s'. Use %u to %u.", + keylen, alg_name, alg->min_keysize, alg->max_keysize); + ret = -EINVAL; + goto error; +@@ -156,7 +156,7 @@ int cryptodev_cipher_init(struct cipher_data *out, const char *alg_name, + } + + if (unlikely(ret)) { +- ddebug(1, "Setting key failed for %s-%zu.", alg_name, keylen*8); ++ ddebug(1, "Setting key failed for %s-%u.", alg_name, keylen*8); + ret = -EINVAL; + goto error; + } +@@ -323,7 +323,7 @@ int cryptodev_hash_init(struct hash_data *hdata, const char *alg_name, + if (hmac_mode != 0) { + ret = crypto_ahash_setkey(hdata->async.s, mackey, mackeylen); + if (unlikely(ret)) { +- ddebug(1, "Setting hmac key failed for %s-%zu.", ++ ddebug(1, "Setting hmac key failed for %s-%u.", + alg_name, mackeylen*8); + ret = -EINVAL; + goto error; +diff --git a/crypto/cryptodev.h b/crypto/cryptodev.h +index 7990f27..77bffc9 100644 +--- a/crypto/cryptodev.h ++++ b/crypto/cryptodev.h +@@ -235,6 +235,13 @@ struct crypt_auth_op { + #define CRYPTO_ALG_FLAG_RNG_ENABLE 2 + #define CRYPTO_ALG_FLAG_DSA_SHA 4 + ++enum ec_curve_t { ++ EC_DISCRETE_LOG, ++ EC_PRIME, ++ EC_BINARY, ++ MAX_EC_TYPE ++}; ++ + struct crparam { + __u8 *crp_p; + __u32 crp_nbits; +@@ -250,7 +257,7 @@ struct crypt_kop { + __u16 crk_oparams; + __u32 crk_pad1; + struct crparam crk_param[CRK_MAXPARAM]; +- enum curve_t curve_type; /* 0 == Discrete Log, ++ enum ec_curve_t curve_type; /* 0 == Discrete Log, + 1 = EC_PRIME, 2 = EC_BINARY */ + void *cookie; + }; +diff --git a/cryptodev_int.h b/cryptodev_int.h +index 7ea6976..e379eaf 100644 +--- a/cryptodev_int.h ++++ b/cryptodev_int.h +@@ -88,7 +88,7 @@ struct compat_crypt_kop { + uint16_t crk_oparams; + uint32_t crk_pad1; + struct compat_crparam crk_param[CRK_MAXPARAM]; +- enum curve_t curve_type; /* 0 == Discrete Log, 1 = EC_PRIME, ++ enum ec_curve_t curve_type; /* 0 == Discrete Log, 1 = EC_PRIME, + 2 = EC_BINARY */ + compat_uptr_t cookie; + }; +diff --git a/ioctl.c b/ioctl.c +index 0344c0c..66cb05a 100644 +--- a/ioctl.c ++++ b/ioctl.c +@@ -498,6 +498,7 @@ cryptodev_open(struct inode *inode, struct file *filp) + INIT_LIST_HEAD(&pcr->done.list); + INIT_LIST_HEAD(&pcr->asym_completed_list); + spin_lock_init(&pcr->completion_lock); ++ + INIT_WORK(&pcr->cryptask, cryptask_routine); + + init_waitqueue_head(&pcr->user_waiter); +@@ -777,8 +778,11 @@ static int fill_kcop_from_cop(struct kernel_crypt_op *kcop, struct fcrypt *fcr) + + if (cop->iv) { + rc = copy_from_user(kcop->iv, cop->iv, kcop->ivlen); +- if (unlikely(rc)) ++ if (unlikely(rc)) { ++ derr(1, "error copying IV (%d bytes), copy_from_user returned %d for address %p", ++ kcop->ivlen, rc, cop->iv); + return -EFAULT; ++ } + } + + return 0; +-- +1.7.9.7 + diff --git a/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-linux_1.6.bbappend b/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-linux_1.6.bbappend new file mode 100644 index 00000000..3cbbb3dd --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-linux_1.6.bbappend @@ -0,0 +1,2 @@ +require recipes-kernel/cryptodev/cryptodev-fsl.inc + diff --git a/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-module_1.6.bbappend b/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-module_1.6.bbappend new file mode 100644 index 00000000..1dbf3b64 --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-module_1.6.bbappend @@ -0,0 +1,8 @@ +require recipes-kernel/cryptodev/cryptodev-fsl.inc + +inherit qoriq_build_64bit_kernel + +do_install_append_fslmachine () { + rm -fr ${D}/usr +} + diff --git a/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev_1.5.bb b/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev_1.5.bb deleted file mode 100644 index 4c1dadeb..00000000 --- a/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev_1.5.bb +++ /dev/null @@ -1,51 +0,0 @@ -SECTION = "devel" -SUMMARY = "Linux Cryptodev KERNEL MODULE" -DESCRIPTION = "The Cryptodev package contains the kernel /dev/crypto module" -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" -RCONFLICTS_${PN} = "ocf-linux" - -inherit module - -PR = "r1" -DEPENDS += "openssl" - -SRCREV = "1c24a0aa996630518d47826a2e3fea129ea094c7" - -SRC_URI = "git://repo.or.cz/cryptodev-linux.git;protocol=git \ - file://makefile_fixup.patch \ - file://Add-the-compile-and-install-rules-for-cryptodev-test.patch" - -EXTRA_OEMAKE='KERNEL_DIR="${STAGING_KERNEL_DIR}" PREFIX="${D}"' - -S = "${WORKDIR}/git" -python () { - ma = d.getVar("DISTRO_FEATURES", True) - arch = d.getVar("OVERRIDES", True) - - # the : after the arch is to skip the message on 64b - if not "multiarch" in ma and ("e5500:" in arch or "e6500:" in arch): - raise bb.parse.SkipPackage("Building the kernel for this arch requires multiarch to be in DISTRO_FEATURES") - - promote_kernel = d.getVar('BUILD_64BIT_KERNEL') - - if promote_kernel == "1": - d.setVar('KERNEL_CC_append', ' -m64') - d.setVar('KERNEL_LD_append', ' -melf64ppc') - - error_qa = d.getVar('ERROR_QA', True) - if 'arch' in error_qa: - d.setVar('ERROR_QA', error_qa.replace(' arch', '')) -} - -do_compile_append() { - oe_runmake testprogs -} - -do_install_append() { - oe_runmake install_tests -} - -PACKAGES += "${PN}-tests" -FILES_${PN}-dbg += "${bindir}/tests_cryptodev/.debug" -FILES_${PN}-tests = "${bindir}/tests_cryptodev/*" diff --git a/meta-fsl-ppc/recipes-kernel/cryptodev/files/Add-the-compile-and-install-rules-for-cryptodev-test.patch b/meta-fsl-ppc/recipes-kernel/cryptodev/files/Add-the-compile-and-install-rules-for-cryptodev-test.patch deleted file mode 100644 index cb871f6b..00000000 --- a/meta-fsl-ppc/recipes-kernel/cryptodev/files/Add-the-compile-and-install-rules-for-cryptodev-test.patch +++ /dev/null @@ -1,69 +0,0 @@ -From 1980a8f4779a955e73285e7a0d86549b69bea5c8 Mon Sep 17 00:00:00 2001 -From: Yu Zongchun -Date: Sun, 28 Apr 2013 14:39:22 +0800 -Subject: [PATCH] Add the compile and install rules for cryptodev tests folder - -This is required to install the cryptodev tests folder to rootfs - -Signed-off-by: Yu Zongchun - -Upstream-Status: Pending - ---- - Makefile | 6 ++++++ - tests/Makefile | 8 ++++++++ - 2 files changed, 14 insertions(+), 0 deletions(-) - -diff --git a/Makefile b/Makefile -index 2be8825..4cbb865 100644 ---- a/Makefile -+++ b/Makefile -@@ -17,6 +17,9 @@ install: - @echo "Installing cryptodev.h in /usr/include/crypto ..." - @install -D crypto/cryptodev.h /usr/include/crypto/cryptodev.h - -+install_tests: -+ make -C tests install DESTDIR=$(PREFIX) -+ - clean: - make -C $(KERNEL_DIR) SUBDIRS=`pwd` clean - rm -f $(hostprogs) *~ -@@ -25,6 +28,9 @@ clean: - check: - KERNEL_DIR=$(KERNEL_DIR) make -C tests check - -+testprogs: -+ KERNEL_DIR=$(KERNEL_DIR) make -C tests testprogs -+ - FILEBASE = cryptodev-linux-$(VERSION) - TMPDIR ?= /tmp - OUTPUT = $(FILEBASE).tar.gz -diff --git a/tests/Makefile b/tests/Makefile -index 87ca3c7..0488cf6 100644 ---- a/tests/Makefile -+++ b/tests/Makefile -@@ -19,6 +19,12 @@ example-async-hmac-objs := async_hmac.o - example-async-speed-objs := async_speed.o - example-hashcrypt-speed-objs := hashcrypt_speed.c - -+install: -+ install -d $(DESTDIR)/usr/bin/tests_cryptodev -+ for bin in $(hostprogs); do \ -+ install -m 755 $${bin} $(DESTDIR)/usr/bin/tests_cryptodev/; \ -+ done -+ - check: $(hostprogs) - ./cipher - ./hmac -@@ -28,6 +34,8 @@ check: $(hostprogs) - ./cipher-gcm - ./cipher-aead - -+testprogs: $(hostprogs) -+ - clean: - rm -f *.o *~ $(hostprogs) - --- -1.7.5.4 - diff --git a/meta-fsl-ppc/recipes-kernel/cryptodev/files/makefile_fixup.patch b/meta-fsl-ppc/recipes-kernel/cryptodev/files/makefile_fixup.patch deleted file mode 100644 index 323aacdf..00000000 --- a/meta-fsl-ppc/recipes-kernel/cryptodev/files/makefile_fixup.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff --git a/Makefile b/Makefile -index 2be8825..b36d68c 100644 ---- a/Makefile -+++ b/Makefile -@@ -1,6 +1,7 @@ - KBUILD_CFLAGS += -I$(src) - KERNEL_DIR = /lib/modules/$(shell uname -r)/build - VERSION = 1.5 -+PREFIX = - - cryptodev-objs = ioctl.o main.o cryptlib.o authenc.o zc.o util.o - -@@ -12,10 +13,10 @@ build: version.h - version.h: Makefile - @echo "#define VERSION \"$(VERSION)\"" > version.h - --install: -+modules_install: - make -C $(KERNEL_DIR) SUBDIRS=`pwd` modules_install -- @echo "Installing cryptodev.h in /usr/include/crypto ..." -- @install -D crypto/cryptodev.h /usr/include/crypto/cryptodev.h -+ @echo "Installing cryptodev.h in $(PREFIX)/usr/include/crypto ..." -+ @install -D crypto/cryptodev.h $(PREFIX)/usr/include/crypto/cryptodev.h - - clean: - make -C $(KERNEL_DIR) SUBDIRS=`pwd` clean -- cgit v1.2.3-54-g00ecf From 22729e3b2cf70106b8221025e5f622b028f1d6e1 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Fri, 11 Jul 2014 00:20:06 -0500 Subject: move all inc files to folder include/ Signed-off-by: Ting Liu --- meta-fsl-ppc/conf/machine/b4420qds-64b.conf | 2 +- meta-fsl-ppc/conf/machine/b4420qds.conf | 2 +- meta-fsl-ppc/conf/machine/b4860qds-64b.conf | 2 +- meta-fsl-ppc/conf/machine/b4860qds.conf | 2 +- meta-fsl-ppc/conf/machine/bsc9131rdb.conf | 2 +- meta-fsl-ppc/conf/machine/bsc9132qds.conf | 2 +- meta-fsl-ppc/conf/machine/c293pcie.conf | 2 +- meta-fsl-ppc/conf/machine/e500mc.inc | 18 ------------------ meta-fsl-ppc/conf/machine/e500v2.inc | 16 ---------------- meta-fsl-ppc/conf/machine/e5500-64b.inc | 19 ------------------- meta-fsl-ppc/conf/machine/e5500.inc | 18 ------------------ meta-fsl-ppc/conf/machine/e6500-64b.inc | 19 ------------------- meta-fsl-ppc/conf/machine/e6500.inc | 18 ------------------ meta-fsl-ppc/conf/machine/include/e500mc.inc | 18 ++++++++++++++++++ meta-fsl-ppc/conf/machine/include/e500v2.inc | 16 ++++++++++++++++ meta-fsl-ppc/conf/machine/include/e5500-64b.inc | 19 +++++++++++++++++++ meta-fsl-ppc/conf/machine/include/e5500.inc | 18 ++++++++++++++++++ meta-fsl-ppc/conf/machine/include/e6500-64b.inc | 19 +++++++++++++++++++ meta-fsl-ppc/conf/machine/include/e6500.inc | 18 ++++++++++++++++++ meta-fsl-ppc/conf/machine/p1010rdb.conf | 2 +- meta-fsl-ppc/conf/machine/p1020rdb.conf | 2 +- meta-fsl-ppc/conf/machine/p1021rdb.conf | 2 +- meta-fsl-ppc/conf/machine/p1022ds.conf | 2 +- meta-fsl-ppc/conf/machine/p1023rdb.conf | 2 +- meta-fsl-ppc/conf/machine/p1025twr.conf | 2 +- meta-fsl-ppc/conf/machine/p2020ds.conf | 2 +- meta-fsl-ppc/conf/machine/p2020rdb.conf | 2 +- meta-fsl-ppc/conf/machine/p2041rdb.conf | 2 +- meta-fsl-ppc/conf/machine/p3041ds.conf | 2 +- meta-fsl-ppc/conf/machine/p4080ds.conf | 2 +- meta-fsl-ppc/conf/machine/p5020ds-64b.conf | 2 +- meta-fsl-ppc/conf/machine/p5020ds.conf | 2 +- meta-fsl-ppc/conf/machine/p5040ds-64b.conf | 2 +- meta-fsl-ppc/conf/machine/p5040ds.conf | 2 +- meta-fsl-ppc/conf/machine/t1040rdb-64b.conf | 2 +- meta-fsl-ppc/conf/machine/t1040rdb.conf | 2 +- meta-fsl-ppc/conf/machine/t1042rdb-64b.conf | 2 +- meta-fsl-ppc/conf/machine/t1042rdb.conf | 2 +- meta-fsl-ppc/conf/machine/t2080qds-64b.conf | 2 +- meta-fsl-ppc/conf/machine/t2080qds.conf | 2 +- meta-fsl-ppc/conf/machine/t2080rdb-64b.conf | 2 +- meta-fsl-ppc/conf/machine/t2080rdb.conf | 2 +- meta-fsl-ppc/conf/machine/t4160qds-64b.conf | 2 +- meta-fsl-ppc/conf/machine/t4160qds.conf | 2 +- meta-fsl-ppc/conf/machine/t4240qds-64b.conf | 2 +- meta-fsl-ppc/conf/machine/t4240qds.conf | 2 +- meta-fsl-ppc/conf/machine/t4240rdb-64b.conf | 2 +- meta-fsl-ppc/conf/machine/t4240rdb.conf | 2 +- 48 files changed, 144 insertions(+), 144 deletions(-) delete mode 100644 meta-fsl-ppc/conf/machine/e500mc.inc delete mode 100644 meta-fsl-ppc/conf/machine/e500v2.inc delete mode 100644 meta-fsl-ppc/conf/machine/e5500-64b.inc delete mode 100644 meta-fsl-ppc/conf/machine/e5500.inc delete mode 100644 meta-fsl-ppc/conf/machine/e6500-64b.inc delete mode 100644 meta-fsl-ppc/conf/machine/e6500.inc create mode 100644 meta-fsl-ppc/conf/machine/include/e500mc.inc create mode 100644 meta-fsl-ppc/conf/machine/include/e500v2.inc create mode 100644 meta-fsl-ppc/conf/machine/include/e5500-64b.inc create mode 100644 meta-fsl-ppc/conf/machine/include/e5500.inc create mode 100644 meta-fsl-ppc/conf/machine/include/e6500-64b.inc create mode 100644 meta-fsl-ppc/conf/machine/include/e6500.inc diff --git a/meta-fsl-ppc/conf/machine/b4420qds-64b.conf b/meta-fsl-ppc/conf/machine/b4420qds-64b.conf index ea51fe4e..45c820e4 100644 --- a/meta-fsl-ppc/conf/machine/b4420qds-64b.conf +++ b/meta-fsl-ppc/conf/machine/b4420qds-64b.conf @@ -4,7 +4,7 @@ #@DESCRIPTION: Machine configuration for running B4420QDS in 64-bit mode #@MAINTAINER: Chunrong Guo -require e6500-64b.inc +require conf/machine/include/e6500-64b.inc require conf/machine/include/soc-family.inc SOC_FAMILY = "b4420" diff --git a/meta-fsl-ppc/conf/machine/b4420qds.conf b/meta-fsl-ppc/conf/machine/b4420qds.conf index 66526124..9016cfb5 100644 --- a/meta-fsl-ppc/conf/machine/b4420qds.conf +++ b/meta-fsl-ppc/conf/machine/b4420qds.conf @@ -4,7 +4,7 @@ #@DESCRIPTION: Machine configuration for running B4420QDS in 32-bit mode #@MAINTAINER: Chunrong Guo -require e6500.inc +require conf/machine/include/e6500.inc require conf/machine/include/soc-family.inc SOC_FAMILY = "b4420" diff --git a/meta-fsl-ppc/conf/machine/b4860qds-64b.conf b/meta-fsl-ppc/conf/machine/b4860qds-64b.conf index 07770e81..4da069f9 100644 --- a/meta-fsl-ppc/conf/machine/b4860qds-64b.conf +++ b/meta-fsl-ppc/conf/machine/b4860qds-64b.conf @@ -4,7 +4,7 @@ #@DESCRIPTION: Machine configuration for running B4860QDS in 64-bit mode #@MAINTAINER: Chunrong Guo -require e6500-64b.inc +require conf/machine/include/e6500-64b.inc require conf/machine/include/soc-family.inc SOC_FAMILY = "b4860" diff --git a/meta-fsl-ppc/conf/machine/b4860qds.conf b/meta-fsl-ppc/conf/machine/b4860qds.conf index 5fafafdd..c560f1c7 100644 --- a/meta-fsl-ppc/conf/machine/b4860qds.conf +++ b/meta-fsl-ppc/conf/machine/b4860qds.conf @@ -4,7 +4,7 @@ #@DESCRIPTION: Machine configuration for running B4860QDS in 32-bit mode #@MAINTAINER: Chunrong Guo -require e6500.inc +require conf/machine/include/e6500.inc require conf/machine/include/soc-family.inc SOC_FAMILY = "b4860" diff --git a/meta-fsl-ppc/conf/machine/bsc9131rdb.conf b/meta-fsl-ppc/conf/machine/bsc9131rdb.conf index 58c9f5b5..64ba795c 100644 --- a/meta-fsl-ppc/conf/machine/bsc9131rdb.conf +++ b/meta-fsl-ppc/conf/machine/bsc9131rdb.conf @@ -4,7 +4,7 @@ #@DESCRIPTION: Machine configuration for running BSC9131RDB #@MAINTAINER: Chunrong Guo -require e500v2.inc +require conf/machine/include/e500v2.inc require conf/machine/include/soc-family.inc SOC_FAMILY = "bsc9131" diff --git a/meta-fsl-ppc/conf/machine/bsc9132qds.conf b/meta-fsl-ppc/conf/machine/bsc9132qds.conf index fc056326..a51cbd85 100644 --- a/meta-fsl-ppc/conf/machine/bsc9132qds.conf +++ b/meta-fsl-ppc/conf/machine/bsc9132qds.conf @@ -4,7 +4,7 @@ #@DESCRIPTION: Machine configuration for running BSC9132QDS #@MAINTAINER: Chunrong Guo -require e500v2.inc +require conf/machine/include/e500v2.inc require conf/machine/include/soc-family.inc SOC_FAMILY = "bsc9132" diff --git a/meta-fsl-ppc/conf/machine/c293pcie.conf b/meta-fsl-ppc/conf/machine/c293pcie.conf index 88009ace..b22dfd05 100644 --- a/meta-fsl-ppc/conf/machine/c293pcie.conf +++ b/meta-fsl-ppc/conf/machine/c293pcie.conf @@ -4,7 +4,7 @@ #@DESCRIPTION: Machine configuration for running C293PCIE in 36-bit mode #@MAINTAINER: Chunrong Guo -require e500v2.inc +require conf/machine/include/e500v2.inc require conf/machine/include/soc-family.inc SOC_FAMILY = "c293pcie" diff --git a/meta-fsl-ppc/conf/machine/e500mc.inc b/meta-fsl-ppc/conf/machine/e500mc.inc deleted file mode 100644 index f5b419d6..00000000 --- a/meta-fsl-ppc/conf/machine/e500mc.inc +++ /dev/null @@ -1,18 +0,0 @@ -TARGET_FPU = "hard" - -require conf/machine/include/tune-ppce500mc.inc - -MACHINE_FEATURES = "kernel26 keyboard pci ext2 ext3 serial" -MACHINE_EXTRA_RRECOMMENDS = "u-boot udev-extraconf kernel-modules" - -PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" -PREFERRED_VERSION_virtual/kernel ?= "3.0.34" -PREFERRED_VERSION_qemu = "1.7+fsl" -PREFERRED_VERSION_openssl = "1.0.1g" - -KERNEL_IMAGETYPE ?= "uImage" -# disable the images below for now -# ext2.bz2 ext2.lzma \ -# ext2.gz.u-boot ext2.bz2.u-boot ext2.lzma.u-boot" - -MACHINEOVERRIDES .= ":e500mc:fslmachine" diff --git a/meta-fsl-ppc/conf/machine/e500v2.inc b/meta-fsl-ppc/conf/machine/e500v2.inc deleted file mode 100644 index 23b5091d..00000000 --- a/meta-fsl-ppc/conf/machine/e500v2.inc +++ /dev/null @@ -1,16 +0,0 @@ -require conf/machine/include/tune-ppce500v2.inc - -MACHINE_FEATURES = "kernel26 pci ext2 ext3 serial" -MACHINE_EXTRA_RRECOMMENDS = "u-boot udev-extraconf kernel-modules" - -PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" -PREFERRED_VERSION_virtual/kernel ?= "3.0.34" -PREFERRED_VERSION_qemu = "1.7+fsl" -PREFERRED_VERSION_openssl = "1.0.1g" - -KERNEL_IMAGETYPE ?= "uImage" -# disable the images below for now -# ext2.bz2 ext2.lzma \ -# ext2.gz.u-boot ext2.bz2.u-boot ext2.lzma.u-boot" - -MACHINEOVERRIDES .= ":e500v2:fslmachine" diff --git a/meta-fsl-ppc/conf/machine/e5500-64b.inc b/meta-fsl-ppc/conf/machine/e5500-64b.inc deleted file mode 100644 index b34be91b..00000000 --- a/meta-fsl-ppc/conf/machine/e5500-64b.inc +++ /dev/null @@ -1,19 +0,0 @@ -TARGET_FPU = "hard" - -DEFAULTTUNE ?= "ppc64e5500" -require conf/machine/include/tune-ppce5500.inc - -MACHINE_FEATURES = "kernel26 keyboard pci ext2 ext3 serial" -MACHINE_EXTRA_RRECOMMENDS = "u-boot udev-extraconf kernel-modules" - -PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" -PREFERRED_VERSION_virtual/kernel ?= "3.0.34" -PREFERRED_VERSION_qemu = "1.7+fsl" -PREFERRED_VERSION_openssl = "1.0.1g" - -KERNEL_IMAGETYPE ?= "uImage" -# disable the images below for now -# ext2.bz2 ext2.lzma \ -# ext2.gz.u-boot ext2.bz2.u-boot ext2.lzma.u-boot" - -MACHINEOVERRIDES .= ":e5500-64b:fslmachine" diff --git a/meta-fsl-ppc/conf/machine/e5500.inc b/meta-fsl-ppc/conf/machine/e5500.inc deleted file mode 100644 index 0b4a9a3b..00000000 --- a/meta-fsl-ppc/conf/machine/e5500.inc +++ /dev/null @@ -1,18 +0,0 @@ -TARGET_FPU = "hard" - -require conf/machine/include/tune-ppce5500.inc - -MACHINE_FEATURES = "kernel26 keyboard pci ext2 ext3 serial" -MACHINE_EXTRA_RRECOMMENDS = "u-boot udev-extraconf kernel-modules" - -PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" -PREFERRED_VERSION_virtual/kernel ?= "3.0.34" -PREFERRED_VERSION_qemu = "1.7+fsl" -PREFERRED_VERSION_openssl = "1.0.1g" - -KERNEL_IMAGETYPE ?= "uImage" -# disable the images below for now -# ext2.bz2 ext2.lzma \ -# ext2.gz.u-boot ext2.bz2.u-boot ext2.lzma.u-boot" - -MACHINEOVERRIDES .= ":e5500:fslmachine" diff --git a/meta-fsl-ppc/conf/machine/e6500-64b.inc b/meta-fsl-ppc/conf/machine/e6500-64b.inc deleted file mode 100644 index a37d1dd2..00000000 --- a/meta-fsl-ppc/conf/machine/e6500-64b.inc +++ /dev/null @@ -1,19 +0,0 @@ -TARGET_FPU = "hard" - -DEFAULTTUNE ?= "ppc64e6500" -require conf/machine/include/tune-ppce6500.inc - -MACHINE_FEATURES = "kernel26 keyboard pci ext2 ext3 serial" -MACHINE_EXTRA_RRECOMMENDS = "u-boot udev-extraconf kernel-modules" - -PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" -PREFERRED_VERSION_virtual/kernel ?= "3.0.34" -PREFERRED_VERSION_qemu = "1.7+fsl" -PREFERRED_VERSION_openssl = "1.0.1g" - -KERNEL_IMAGETYPE ?= "uImage" -# disable the images below for now -# ext2.bz2 ext2.lzma \ -# ext2.gz.u-boot ext2.bz2.u-boot ext2.lzma.u-boot" - -MACHINEOVERRIDES .= ":e6500-64b:fslmachine" diff --git a/meta-fsl-ppc/conf/machine/e6500.inc b/meta-fsl-ppc/conf/machine/e6500.inc deleted file mode 100644 index dd259fc7..00000000 --- a/meta-fsl-ppc/conf/machine/e6500.inc +++ /dev/null @@ -1,18 +0,0 @@ -TARGET_FPU = "hard" - -require conf/machine/include/tune-ppce6500.inc - -MACHINE_FEATURES = "kernel26 keyboard pci ext2 ext3 serial" -MACHINE_EXTRA_RRECOMMENDS = "u-boot udev-extraconf kernel-modules" - -PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" -PREFERRED_VERSION_virtual/kernel ?= "3.0.34" -PREFERRED_VERSION_qemu = "1.7+fsl" -PREFERRED_VERSION_openssl = "1.0.1g" - -KERNEL_IMAGETYPE ?= "uImage" -# disable the images below for now -# ext2.bz2 ext2.lzma \ -# ext2.gz.u-boot ext2.bz2.u-boot ext2.lzma.u-boot" - -MACHINEOVERRIDES .= ":e6500:fslmachine" diff --git a/meta-fsl-ppc/conf/machine/include/e500mc.inc b/meta-fsl-ppc/conf/machine/include/e500mc.inc new file mode 100644 index 00000000..f5b419d6 --- /dev/null +++ b/meta-fsl-ppc/conf/machine/include/e500mc.inc @@ -0,0 +1,18 @@ +TARGET_FPU = "hard" + +require conf/machine/include/tune-ppce500mc.inc + +MACHINE_FEATURES = "kernel26 keyboard pci ext2 ext3 serial" +MACHINE_EXTRA_RRECOMMENDS = "u-boot udev-extraconf kernel-modules" + +PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" +PREFERRED_VERSION_virtual/kernel ?= "3.0.34" +PREFERRED_VERSION_qemu = "1.7+fsl" +PREFERRED_VERSION_openssl = "1.0.1g" + +KERNEL_IMAGETYPE ?= "uImage" +# disable the images below for now +# ext2.bz2 ext2.lzma \ +# ext2.gz.u-boot ext2.bz2.u-boot ext2.lzma.u-boot" + +MACHINEOVERRIDES .= ":e500mc:fslmachine" diff --git a/meta-fsl-ppc/conf/machine/include/e500v2.inc b/meta-fsl-ppc/conf/machine/include/e500v2.inc new file mode 100644 index 00000000..23b5091d --- /dev/null +++ b/meta-fsl-ppc/conf/machine/include/e500v2.inc @@ -0,0 +1,16 @@ +require conf/machine/include/tune-ppce500v2.inc + +MACHINE_FEATURES = "kernel26 pci ext2 ext3 serial" +MACHINE_EXTRA_RRECOMMENDS = "u-boot udev-extraconf kernel-modules" + +PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" +PREFERRED_VERSION_virtual/kernel ?= "3.0.34" +PREFERRED_VERSION_qemu = "1.7+fsl" +PREFERRED_VERSION_openssl = "1.0.1g" + +KERNEL_IMAGETYPE ?= "uImage" +# disable the images below for now +# ext2.bz2 ext2.lzma \ +# ext2.gz.u-boot ext2.bz2.u-boot ext2.lzma.u-boot" + +MACHINEOVERRIDES .= ":e500v2:fslmachine" diff --git a/meta-fsl-ppc/conf/machine/include/e5500-64b.inc b/meta-fsl-ppc/conf/machine/include/e5500-64b.inc new file mode 100644 index 00000000..b34be91b --- /dev/null +++ b/meta-fsl-ppc/conf/machine/include/e5500-64b.inc @@ -0,0 +1,19 @@ +TARGET_FPU = "hard" + +DEFAULTTUNE ?= "ppc64e5500" +require conf/machine/include/tune-ppce5500.inc + +MACHINE_FEATURES = "kernel26 keyboard pci ext2 ext3 serial" +MACHINE_EXTRA_RRECOMMENDS = "u-boot udev-extraconf kernel-modules" + +PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" +PREFERRED_VERSION_virtual/kernel ?= "3.0.34" +PREFERRED_VERSION_qemu = "1.7+fsl" +PREFERRED_VERSION_openssl = "1.0.1g" + +KERNEL_IMAGETYPE ?= "uImage" +# disable the images below for now +# ext2.bz2 ext2.lzma \ +# ext2.gz.u-boot ext2.bz2.u-boot ext2.lzma.u-boot" + +MACHINEOVERRIDES .= ":e5500-64b:fslmachine" diff --git a/meta-fsl-ppc/conf/machine/include/e5500.inc b/meta-fsl-ppc/conf/machine/include/e5500.inc new file mode 100644 index 00000000..0b4a9a3b --- /dev/null +++ b/meta-fsl-ppc/conf/machine/include/e5500.inc @@ -0,0 +1,18 @@ +TARGET_FPU = "hard" + +require conf/machine/include/tune-ppce5500.inc + +MACHINE_FEATURES = "kernel26 keyboard pci ext2 ext3 serial" +MACHINE_EXTRA_RRECOMMENDS = "u-boot udev-extraconf kernel-modules" + +PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" +PREFERRED_VERSION_virtual/kernel ?= "3.0.34" +PREFERRED_VERSION_qemu = "1.7+fsl" +PREFERRED_VERSION_openssl = "1.0.1g" + +KERNEL_IMAGETYPE ?= "uImage" +# disable the images below for now +# ext2.bz2 ext2.lzma \ +# ext2.gz.u-boot ext2.bz2.u-boot ext2.lzma.u-boot" + +MACHINEOVERRIDES .= ":e5500:fslmachine" diff --git a/meta-fsl-ppc/conf/machine/include/e6500-64b.inc b/meta-fsl-ppc/conf/machine/include/e6500-64b.inc new file mode 100644 index 00000000..a37d1dd2 --- /dev/null +++ b/meta-fsl-ppc/conf/machine/include/e6500-64b.inc @@ -0,0 +1,19 @@ +TARGET_FPU = "hard" + +DEFAULTTUNE ?= "ppc64e6500" +require conf/machine/include/tune-ppce6500.inc + +MACHINE_FEATURES = "kernel26 keyboard pci ext2 ext3 serial" +MACHINE_EXTRA_RRECOMMENDS = "u-boot udev-extraconf kernel-modules" + +PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" +PREFERRED_VERSION_virtual/kernel ?= "3.0.34" +PREFERRED_VERSION_qemu = "1.7+fsl" +PREFERRED_VERSION_openssl = "1.0.1g" + +KERNEL_IMAGETYPE ?= "uImage" +# disable the images below for now +# ext2.bz2 ext2.lzma \ +# ext2.gz.u-boot ext2.bz2.u-boot ext2.lzma.u-boot" + +MACHINEOVERRIDES .= ":e6500-64b:fslmachine" diff --git a/meta-fsl-ppc/conf/machine/include/e6500.inc b/meta-fsl-ppc/conf/machine/include/e6500.inc new file mode 100644 index 00000000..dd259fc7 --- /dev/null +++ b/meta-fsl-ppc/conf/machine/include/e6500.inc @@ -0,0 +1,18 @@ +TARGET_FPU = "hard" + +require conf/machine/include/tune-ppce6500.inc + +MACHINE_FEATURES = "kernel26 keyboard pci ext2 ext3 serial" +MACHINE_EXTRA_RRECOMMENDS = "u-boot udev-extraconf kernel-modules" + +PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" +PREFERRED_VERSION_virtual/kernel ?= "3.0.34" +PREFERRED_VERSION_qemu = "1.7+fsl" +PREFERRED_VERSION_openssl = "1.0.1g" + +KERNEL_IMAGETYPE ?= "uImage" +# disable the images below for now +# ext2.bz2 ext2.lzma \ +# ext2.gz.u-boot ext2.bz2.u-boot ext2.lzma.u-boot" + +MACHINEOVERRIDES .= ":e6500:fslmachine" diff --git a/meta-fsl-ppc/conf/machine/p1010rdb.conf b/meta-fsl-ppc/conf/machine/p1010rdb.conf index 53655c42..10b1c927 100644 --- a/meta-fsl-ppc/conf/machine/p1010rdb.conf +++ b/meta-fsl-ppc/conf/machine/p1010rdb.conf @@ -4,7 +4,7 @@ #@DESCRIPTION: Machine configuration for running P1010RDB #@MAINTAINER: Chunrong Guo -require e500v2.inc +require conf/machine/include/e500v2.inc require conf/machine/include/soc-family.inc SOC_FAMILY = "p1010" diff --git a/meta-fsl-ppc/conf/machine/p1020rdb.conf b/meta-fsl-ppc/conf/machine/p1020rdb.conf index 24f9d975..3fa73771 100644 --- a/meta-fsl-ppc/conf/machine/p1020rdb.conf +++ b/meta-fsl-ppc/conf/machine/p1020rdb.conf @@ -4,7 +4,7 @@ #@DESCRIPTION: Machine configuration for running P1020RDB #@MAINTAINER: Chunrong Guo -require e500v2.inc +require conf/machine/include/e500v2.inc require conf/machine/include/soc-family.inc SOC_FAMILY = "p1020" diff --git a/meta-fsl-ppc/conf/machine/p1021rdb.conf b/meta-fsl-ppc/conf/machine/p1021rdb.conf index 3d21175b..711a62d9 100644 --- a/meta-fsl-ppc/conf/machine/p1021rdb.conf +++ b/meta-fsl-ppc/conf/machine/p1021rdb.conf @@ -4,7 +4,7 @@ #@DESCRIPTION: Machine configuration for running P1021RDB #@MAINTAINER: Chunrong Guo -require e500v2.inc +require conf/machine/include/e500v2.inc require conf/machine/include/soc-family.inc SOC_FAMILY = "p1021" diff --git a/meta-fsl-ppc/conf/machine/p1022ds.conf b/meta-fsl-ppc/conf/machine/p1022ds.conf index 0895d6d8..107cbe4b 100644 --- a/meta-fsl-ppc/conf/machine/p1022ds.conf +++ b/meta-fsl-ppc/conf/machine/p1022ds.conf @@ -4,7 +4,7 @@ #@DESCRIPTION: Machine configuration for running P1022DS #@MAINTAINER: Chunrong Guo -require e500v2.inc +require conf/machine/include/e500v2.inc require conf/machine/include/soc-family.inc SOC_FAMILY = "p1022" diff --git a/meta-fsl-ppc/conf/machine/p1023rdb.conf b/meta-fsl-ppc/conf/machine/p1023rdb.conf index 4c180834..59a9ce61 100644 --- a/meta-fsl-ppc/conf/machine/p1023rdb.conf +++ b/meta-fsl-ppc/conf/machine/p1023rdb.conf @@ -4,7 +4,7 @@ #@DESCRIPTION: Machine configuration for running P1023RDB #@MAINTAINER: Chunrong Guo -require e500v2.inc +require conf/machine/include/e500v2.inc require conf/machine/include/soc-family.inc SOC_FAMILY = "p1023" diff --git a/meta-fsl-ppc/conf/machine/p1025twr.conf b/meta-fsl-ppc/conf/machine/p1025twr.conf index 7eab3429..e7d25fe9 100644 --- a/meta-fsl-ppc/conf/machine/p1025twr.conf +++ b/meta-fsl-ppc/conf/machine/p1025twr.conf @@ -4,7 +4,7 @@ #@DESCRIPTION: Machine configuration for running P1025TWR #@MAINTAINER: Chunrong Guo -require e500v2.inc +require conf/machine/include/e500v2.inc require conf/machine/include/soc-family.inc SOC_FAMILY = "p1025" diff --git a/meta-fsl-ppc/conf/machine/p2020ds.conf b/meta-fsl-ppc/conf/machine/p2020ds.conf index 84f792cb..75107876 100644 --- a/meta-fsl-ppc/conf/machine/p2020ds.conf +++ b/meta-fsl-ppc/conf/machine/p2020ds.conf @@ -4,7 +4,7 @@ #@DESCRIPTION: Machine configuration for running P2020DS #@MAINTAINER: Chunrong Guo -require e500v2.inc +require conf/machine/include/e500v2.inc require conf/machine/include/soc-family.inc SOC_FAMILY = "p2020" diff --git a/meta-fsl-ppc/conf/machine/p2020rdb.conf b/meta-fsl-ppc/conf/machine/p2020rdb.conf index 740df882..c3d08c95 100644 --- a/meta-fsl-ppc/conf/machine/p2020rdb.conf +++ b/meta-fsl-ppc/conf/machine/p2020rdb.conf @@ -4,7 +4,7 @@ #@DESCRIPTION: Machine configuration for running P2020RDB #@MAINTAINER: Chunrong Guo -require e500v2.inc +require conf/machine/include/e500v2.inc require conf/machine/include/soc-family.inc SOC_FAMILY = "p2020" diff --git a/meta-fsl-ppc/conf/machine/p2041rdb.conf b/meta-fsl-ppc/conf/machine/p2041rdb.conf index 69889228..d06df45c 100644 --- a/meta-fsl-ppc/conf/machine/p2041rdb.conf +++ b/meta-fsl-ppc/conf/machine/p2041rdb.conf @@ -4,7 +4,7 @@ #@DESCRIPTION: Machine configuration for running P2041RDB #@MAINTAINER: Chunrong Guo -require e500mc.inc +require conf/machine/include/e500mc.inc require conf/machine/include/soc-family.inc SOC_FAMILY = "p2041" diff --git a/meta-fsl-ppc/conf/machine/p3041ds.conf b/meta-fsl-ppc/conf/machine/p3041ds.conf index 939d18d5..7be35b93 100644 --- a/meta-fsl-ppc/conf/machine/p3041ds.conf +++ b/meta-fsl-ppc/conf/machine/p3041ds.conf @@ -4,7 +4,7 @@ #@DESCRIPTION: Machine configuration for running P3041DS #@MAINTAINER: Chunrong Guo -require e500mc.inc +require conf/machine/include/e500mc.inc require conf/machine/include/soc-family.inc SOC_FAMILY = "p3041" diff --git a/meta-fsl-ppc/conf/machine/p4080ds.conf b/meta-fsl-ppc/conf/machine/p4080ds.conf index c3a1519e..51c0fed8 100644 --- a/meta-fsl-ppc/conf/machine/p4080ds.conf +++ b/meta-fsl-ppc/conf/machine/p4080ds.conf @@ -4,7 +4,7 @@ #@DESCRIPTION: Machine configuration for running P4080DS #@MAINTAINER: Chunrong Guo -require e500mc.inc +require conf/machine/include/e500mc.inc require conf/machine/include/soc-family.inc SOC_FAMILY = "p4080" diff --git a/meta-fsl-ppc/conf/machine/p5020ds-64b.conf b/meta-fsl-ppc/conf/machine/p5020ds-64b.conf index 5f82dba9..a901b48e 100644 --- a/meta-fsl-ppc/conf/machine/p5020ds-64b.conf +++ b/meta-fsl-ppc/conf/machine/p5020ds-64b.conf @@ -4,7 +4,7 @@ #@DESCRIPTION: Machine configuration for running P5020DS in 64-bit mode #@MAINTAINER: Chunrong Guo -require e5500-64b.inc +require conf/machine/include/e5500-64b.inc require conf/machine/include/soc-family.inc SOC_FAMILY = "p5020" diff --git a/meta-fsl-ppc/conf/machine/p5020ds.conf b/meta-fsl-ppc/conf/machine/p5020ds.conf index 72effb10..42ab7690 100644 --- a/meta-fsl-ppc/conf/machine/p5020ds.conf +++ b/meta-fsl-ppc/conf/machine/p5020ds.conf @@ -4,7 +4,7 @@ #@DESCRIPTION: Machine configuration for running P5020DS in 32-bit mode #@MAINTAINER: Chunrong Guo -require e5500.inc +require conf/machine/include/e5500.inc require conf/machine/include/soc-family.inc SOC_FAMILY = "p5020" diff --git a/meta-fsl-ppc/conf/machine/p5040ds-64b.conf b/meta-fsl-ppc/conf/machine/p5040ds-64b.conf index 70508a44..c462970a 100644 --- a/meta-fsl-ppc/conf/machine/p5040ds-64b.conf +++ b/meta-fsl-ppc/conf/machine/p5040ds-64b.conf @@ -4,7 +4,7 @@ #@DESCRIPTION: Machine configuration for running P5040DS in 64-bit mode #@MAINTAINER: Chunrong Guo -require e5500-64b.inc +require conf/machine/include/e5500-64b.inc require conf/machine/include/soc-family.inc SOC_FAMILY = "p5040" diff --git a/meta-fsl-ppc/conf/machine/p5040ds.conf b/meta-fsl-ppc/conf/machine/p5040ds.conf index 27782180..8f5ea620 100644 --- a/meta-fsl-ppc/conf/machine/p5040ds.conf +++ b/meta-fsl-ppc/conf/machine/p5040ds.conf @@ -4,7 +4,7 @@ #@DESCRIPTION: Machine configuration for running P5040DS in 32-bit mode #@MAINTAINER: Chunrong Guo -require e5500.inc +require conf/machine/include/e5500.inc require conf/machine/include/soc-family.inc SOC_FAMILY = "p5040" diff --git a/meta-fsl-ppc/conf/machine/t1040rdb-64b.conf b/meta-fsl-ppc/conf/machine/t1040rdb-64b.conf index 0f0a6859..bc4de7b4 100644 --- a/meta-fsl-ppc/conf/machine/t1040rdb-64b.conf +++ b/meta-fsl-ppc/conf/machine/t1040rdb-64b.conf @@ -4,7 +4,7 @@ #@DESCRIPTION: Machine configuration for running T1040RDB in 64-bit mode #@MAINTAINER: Chunrong Guo -require e5500-64b.inc +require conf/machine/include/e5500-64b.inc require conf/machine/include/soc-family.inc SOC_FAMILY = "t1040" diff --git a/meta-fsl-ppc/conf/machine/t1040rdb.conf b/meta-fsl-ppc/conf/machine/t1040rdb.conf index 4532c49a..d2ec7a4c 100644 --- a/meta-fsl-ppc/conf/machine/t1040rdb.conf +++ b/meta-fsl-ppc/conf/machine/t1040rdb.conf @@ -4,7 +4,7 @@ #@DESCRIPTION: Machine configuration for running T1040RDB in 32-bit mode #@MAINTAINER: Chunrong Guo -require e5500.inc +require conf/machine/include/e5500.inc require conf/machine/include/soc-family.inc SOC_FAMILY = "t1040" diff --git a/meta-fsl-ppc/conf/machine/t1042rdb-64b.conf b/meta-fsl-ppc/conf/machine/t1042rdb-64b.conf index 52be355b..58b2bd0f 100644 --- a/meta-fsl-ppc/conf/machine/t1042rdb-64b.conf +++ b/meta-fsl-ppc/conf/machine/t1042rdb-64b.conf @@ -4,7 +4,7 @@ #@DESCRIPTION: Machine configuration for running T1042RDB in 64-bit mode #@MAINTAINER: Chunrong Guo -require e5500-64b.inc +require conf/machine/include/e5500-64b.inc require conf/machine/include/soc-family.inc SOC_FAMILY = "t1042" diff --git a/meta-fsl-ppc/conf/machine/t1042rdb.conf b/meta-fsl-ppc/conf/machine/t1042rdb.conf index ce877c70..e5c4112a 100644 --- a/meta-fsl-ppc/conf/machine/t1042rdb.conf +++ b/meta-fsl-ppc/conf/machine/t1042rdb.conf @@ -4,7 +4,7 @@ #@DESCRIPTION: Machine configuration for running T1042RDB in 32-bit mode #@MAINTAINER: Chunrong Guo -require e5500.inc +require conf/machine/include/e5500.inc require conf/machine/include/soc-family.inc SOC_FAMILY = "t1042" diff --git a/meta-fsl-ppc/conf/machine/t2080qds-64b.conf b/meta-fsl-ppc/conf/machine/t2080qds-64b.conf index 18749026..bd1cd1d9 100644 --- a/meta-fsl-ppc/conf/machine/t2080qds-64b.conf +++ b/meta-fsl-ppc/conf/machine/t2080qds-64b.conf @@ -4,7 +4,7 @@ #@DESCRIPTION: Machine configuration for running T2080QDS in 64-bit mode #@MAINTAINER: Chunrong Guo -require e6500-64b.inc +require conf/machine/include/e6500-64b.inc require conf/machine/include/soc-family.inc SOC_FAMILY = "t2080" diff --git a/meta-fsl-ppc/conf/machine/t2080qds.conf b/meta-fsl-ppc/conf/machine/t2080qds.conf index aa19307a..2892baaf 100644 --- a/meta-fsl-ppc/conf/machine/t2080qds.conf +++ b/meta-fsl-ppc/conf/machine/t2080qds.conf @@ -4,7 +4,7 @@ #@DESCRIPTION: Machine configuration for running T2080QDS in 32-bit mode #@MAINTAINER: Chunrong Guo -require e6500.inc +require conf/machine/include/e6500.inc require conf/machine/include/soc-family.inc SOC_FAMILY = "t2080" diff --git a/meta-fsl-ppc/conf/machine/t2080rdb-64b.conf b/meta-fsl-ppc/conf/machine/t2080rdb-64b.conf index e5dfb33c..2d28f9c2 100644 --- a/meta-fsl-ppc/conf/machine/t2080rdb-64b.conf +++ b/meta-fsl-ppc/conf/machine/t2080rdb-64b.conf @@ -4,7 +4,7 @@ #@DESCRIPTION: Machine configuration for running T2080RDB in 64-bit mode #@MAINTAINER: Chunrong Guo -require e6500-64b.inc +require conf/machine/include/e6500-64b.inc require conf/machine/include/soc-family.inc SOC_FAMILY = "t2080" diff --git a/meta-fsl-ppc/conf/machine/t2080rdb.conf b/meta-fsl-ppc/conf/machine/t2080rdb.conf index 5030588a..256a3d0c 100644 --- a/meta-fsl-ppc/conf/machine/t2080rdb.conf +++ b/meta-fsl-ppc/conf/machine/t2080rdb.conf @@ -4,7 +4,7 @@ #@DESCRIPTION: Machine configuration for running T2080RDB in 32-bit mode #@MAINTAINER: Chunrong Guo -require e6500.inc +require conf/machine/include/e6500.inc require conf/machine/include/soc-family.inc SOC_FAMILY = "t2080" diff --git a/meta-fsl-ppc/conf/machine/t4160qds-64b.conf b/meta-fsl-ppc/conf/machine/t4160qds-64b.conf index 778f554c..18650787 100644 --- a/meta-fsl-ppc/conf/machine/t4160qds-64b.conf +++ b/meta-fsl-ppc/conf/machine/t4160qds-64b.conf @@ -4,7 +4,7 @@ #@DESCRIPTION: Machine configuration for running T4160QDS in 64-bit mode #@MAINTAINER: Chunrong Guo -require e6500-64b.inc +require conf/machine/include/e6500-64b.inc require conf/machine/include/soc-family.inc SOC_FAMILY = "t4160" diff --git a/meta-fsl-ppc/conf/machine/t4160qds.conf b/meta-fsl-ppc/conf/machine/t4160qds.conf index 62157d2b..07ea41b5 100644 --- a/meta-fsl-ppc/conf/machine/t4160qds.conf +++ b/meta-fsl-ppc/conf/machine/t4160qds.conf @@ -4,7 +4,7 @@ #@DESCRIPTION: Machine configuration for running T4160QDS in 32-bit mode #@MAINTAINER: Chunrong Guo -require e6500.inc +require conf/machine/include/e6500.inc require conf/machine/include/soc-family.inc SOC_FAMILY = "t4160" diff --git a/meta-fsl-ppc/conf/machine/t4240qds-64b.conf b/meta-fsl-ppc/conf/machine/t4240qds-64b.conf index dc77770a..ff56c3bb 100644 --- a/meta-fsl-ppc/conf/machine/t4240qds-64b.conf +++ b/meta-fsl-ppc/conf/machine/t4240qds-64b.conf @@ -4,7 +4,7 @@ #@DESCRIPTION: Machine configuration for running T4240QDS in 64-bit mode #@MAINTAINER: Chunrong Guo -require e6500-64b.inc +require conf/machine/include/e6500-64b.inc require conf/machine/include/soc-family.inc SOC_FAMILY = "t4240" diff --git a/meta-fsl-ppc/conf/machine/t4240qds.conf b/meta-fsl-ppc/conf/machine/t4240qds.conf index 8f515005..0df32f6a 100644 --- a/meta-fsl-ppc/conf/machine/t4240qds.conf +++ b/meta-fsl-ppc/conf/machine/t4240qds.conf @@ -4,7 +4,7 @@ #@DESCRIPTION: Machine configuration for running T4240QDS in 32-bit mode #@MAINTAINER: Chunrong Guo -require e6500.inc +require conf/machine/include/e6500.inc require conf/machine/include/soc-family.inc SOC_FAMILY = "t4240" diff --git a/meta-fsl-ppc/conf/machine/t4240rdb-64b.conf b/meta-fsl-ppc/conf/machine/t4240rdb-64b.conf index ab7870bd..0838187e 100644 --- a/meta-fsl-ppc/conf/machine/t4240rdb-64b.conf +++ b/meta-fsl-ppc/conf/machine/t4240rdb-64b.conf @@ -4,7 +4,7 @@ #@DESCRIPTION: Machine configuration for running T4240RDB in 64-bit mode #@MAINTAINER: Chunrong Guo -require e6500-64b.inc +require conf/machine/include/e6500-64b.inc require conf/machine/include/soc-family.inc SOC_FAMILY = "t4240" diff --git a/meta-fsl-ppc/conf/machine/t4240rdb.conf b/meta-fsl-ppc/conf/machine/t4240rdb.conf index dc51e654..dc5f45cf 100644 --- a/meta-fsl-ppc/conf/machine/t4240rdb.conf +++ b/meta-fsl-ppc/conf/machine/t4240rdb.conf @@ -4,7 +4,7 @@ #@DESCRIPTION: Machine configuration for running T4240RDB in 32-bit mode #@MAINTAINER: Chunrong Guo -require e6500.inc +require conf/machine/include/e6500.inc require conf/machine/include/soc-family.inc SOC_FAMILY = "t4240" -- cgit v1.2.3-54-g00ecf From 28cf59805ab886add7cde931298285940f7b724c Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Fri, 11 Jul 2014 00:25:54 -0500 Subject: remove kernel26 machine feature usage kernel26 is now obsolete so remove it from the machine configs Signed-off-by: Ting Liu --- meta-fsl-ppc/conf/machine/include/e500mc.inc | 2 +- meta-fsl-ppc/conf/machine/include/e500v2.inc | 2 +- meta-fsl-ppc/conf/machine/include/e5500-64b.inc | 2 +- meta-fsl-ppc/conf/machine/include/e5500.inc | 2 +- meta-fsl-ppc/conf/machine/include/e6500-64b.inc | 2 +- meta-fsl-ppc/conf/machine/include/e6500.inc | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/meta-fsl-ppc/conf/machine/include/e500mc.inc b/meta-fsl-ppc/conf/machine/include/e500mc.inc index f5b419d6..6fecb809 100644 --- a/meta-fsl-ppc/conf/machine/include/e500mc.inc +++ b/meta-fsl-ppc/conf/machine/include/e500mc.inc @@ -2,7 +2,7 @@ TARGET_FPU = "hard" require conf/machine/include/tune-ppce500mc.inc -MACHINE_FEATURES = "kernel26 keyboard pci ext2 ext3 serial" +MACHINE_FEATURES = "keyboard pci ext2 ext3 serial" MACHINE_EXTRA_RRECOMMENDS = "u-boot udev-extraconf kernel-modules" PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" diff --git a/meta-fsl-ppc/conf/machine/include/e500v2.inc b/meta-fsl-ppc/conf/machine/include/e500v2.inc index 23b5091d..2142d9d1 100644 --- a/meta-fsl-ppc/conf/machine/include/e500v2.inc +++ b/meta-fsl-ppc/conf/machine/include/e500v2.inc @@ -1,6 +1,6 @@ require conf/machine/include/tune-ppce500v2.inc -MACHINE_FEATURES = "kernel26 pci ext2 ext3 serial" +MACHINE_FEATURES = "pci ext2 ext3 serial" MACHINE_EXTRA_RRECOMMENDS = "u-boot udev-extraconf kernel-modules" PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" diff --git a/meta-fsl-ppc/conf/machine/include/e5500-64b.inc b/meta-fsl-ppc/conf/machine/include/e5500-64b.inc index b34be91b..015444aa 100644 --- a/meta-fsl-ppc/conf/machine/include/e5500-64b.inc +++ b/meta-fsl-ppc/conf/machine/include/e5500-64b.inc @@ -3,7 +3,7 @@ TARGET_FPU = "hard" DEFAULTTUNE ?= "ppc64e5500" require conf/machine/include/tune-ppce5500.inc -MACHINE_FEATURES = "kernel26 keyboard pci ext2 ext3 serial" +MACHINE_FEATURES = "keyboard pci ext2 ext3 serial" MACHINE_EXTRA_RRECOMMENDS = "u-boot udev-extraconf kernel-modules" PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" diff --git a/meta-fsl-ppc/conf/machine/include/e5500.inc b/meta-fsl-ppc/conf/machine/include/e5500.inc index 0b4a9a3b..bc948fa8 100644 --- a/meta-fsl-ppc/conf/machine/include/e5500.inc +++ b/meta-fsl-ppc/conf/machine/include/e5500.inc @@ -2,7 +2,7 @@ TARGET_FPU = "hard" require conf/machine/include/tune-ppce5500.inc -MACHINE_FEATURES = "kernel26 keyboard pci ext2 ext3 serial" +MACHINE_FEATURES = "keyboard pci ext2 ext3 serial" MACHINE_EXTRA_RRECOMMENDS = "u-boot udev-extraconf kernel-modules" PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" diff --git a/meta-fsl-ppc/conf/machine/include/e6500-64b.inc b/meta-fsl-ppc/conf/machine/include/e6500-64b.inc index a37d1dd2..21ee5d61 100644 --- a/meta-fsl-ppc/conf/machine/include/e6500-64b.inc +++ b/meta-fsl-ppc/conf/machine/include/e6500-64b.inc @@ -3,7 +3,7 @@ TARGET_FPU = "hard" DEFAULTTUNE ?= "ppc64e6500" require conf/machine/include/tune-ppce6500.inc -MACHINE_FEATURES = "kernel26 keyboard pci ext2 ext3 serial" +MACHINE_FEATURES = "keyboard pci ext2 ext3 serial" MACHINE_EXTRA_RRECOMMENDS = "u-boot udev-extraconf kernel-modules" PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" diff --git a/meta-fsl-ppc/conf/machine/include/e6500.inc b/meta-fsl-ppc/conf/machine/include/e6500.inc index dd259fc7..c9010200 100644 --- a/meta-fsl-ppc/conf/machine/include/e6500.inc +++ b/meta-fsl-ppc/conf/machine/include/e6500.inc @@ -2,7 +2,7 @@ TARGET_FPU = "hard" require conf/machine/include/tune-ppce6500.inc -MACHINE_FEATURES = "kernel26 keyboard pci ext2 ext3 serial" +MACHINE_FEATURES = "keyboard pci ext2 ext3 serial" MACHINE_EXTRA_RRECOMMENDS = "u-boot udev-extraconf kernel-modules" PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" -- cgit v1.2.3-54-g00ecf From 0117961f98e4bd4c33152f05c37a9092bed50dfb Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Fri, 11 Jul 2014 00:28:08 -0500 Subject: remove obsolete PREFERRED_VERSION for virtual/kernel there is only one linux-qoriq-sdk recipe that is based on 3.12 now Signed-off-by: Ting Liu --- meta-fsl-ppc/conf/machine/include/e500mc.inc | 1 - meta-fsl-ppc/conf/machine/include/e500v2.inc | 1 - meta-fsl-ppc/conf/machine/include/e5500-64b.inc | 1 - meta-fsl-ppc/conf/machine/include/e5500.inc | 1 - meta-fsl-ppc/conf/machine/include/e6500-64b.inc | 1 - meta-fsl-ppc/conf/machine/include/e6500.inc | 1 - 6 files changed, 6 deletions(-) diff --git a/meta-fsl-ppc/conf/machine/include/e500mc.inc b/meta-fsl-ppc/conf/machine/include/e500mc.inc index 6fecb809..a35d91b8 100644 --- a/meta-fsl-ppc/conf/machine/include/e500mc.inc +++ b/meta-fsl-ppc/conf/machine/include/e500mc.inc @@ -6,7 +6,6 @@ MACHINE_FEATURES = "keyboard pci ext2 ext3 serial" MACHINE_EXTRA_RRECOMMENDS = "u-boot udev-extraconf kernel-modules" PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" -PREFERRED_VERSION_virtual/kernel ?= "3.0.34" PREFERRED_VERSION_qemu = "1.7+fsl" PREFERRED_VERSION_openssl = "1.0.1g" diff --git a/meta-fsl-ppc/conf/machine/include/e500v2.inc b/meta-fsl-ppc/conf/machine/include/e500v2.inc index 2142d9d1..adaa3cdf 100644 --- a/meta-fsl-ppc/conf/machine/include/e500v2.inc +++ b/meta-fsl-ppc/conf/machine/include/e500v2.inc @@ -4,7 +4,6 @@ MACHINE_FEATURES = "pci ext2 ext3 serial" MACHINE_EXTRA_RRECOMMENDS = "u-boot udev-extraconf kernel-modules" PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" -PREFERRED_VERSION_virtual/kernel ?= "3.0.34" PREFERRED_VERSION_qemu = "1.7+fsl" PREFERRED_VERSION_openssl = "1.0.1g" diff --git a/meta-fsl-ppc/conf/machine/include/e5500-64b.inc b/meta-fsl-ppc/conf/machine/include/e5500-64b.inc index 015444aa..c9518434 100644 --- a/meta-fsl-ppc/conf/machine/include/e5500-64b.inc +++ b/meta-fsl-ppc/conf/machine/include/e5500-64b.inc @@ -7,7 +7,6 @@ MACHINE_FEATURES = "keyboard pci ext2 ext3 serial" MACHINE_EXTRA_RRECOMMENDS = "u-boot udev-extraconf kernel-modules" PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" -PREFERRED_VERSION_virtual/kernel ?= "3.0.34" PREFERRED_VERSION_qemu = "1.7+fsl" PREFERRED_VERSION_openssl = "1.0.1g" diff --git a/meta-fsl-ppc/conf/machine/include/e5500.inc b/meta-fsl-ppc/conf/machine/include/e5500.inc index bc948fa8..0babacca 100644 --- a/meta-fsl-ppc/conf/machine/include/e5500.inc +++ b/meta-fsl-ppc/conf/machine/include/e5500.inc @@ -6,7 +6,6 @@ MACHINE_FEATURES = "keyboard pci ext2 ext3 serial" MACHINE_EXTRA_RRECOMMENDS = "u-boot udev-extraconf kernel-modules" PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" -PREFERRED_VERSION_virtual/kernel ?= "3.0.34" PREFERRED_VERSION_qemu = "1.7+fsl" PREFERRED_VERSION_openssl = "1.0.1g" diff --git a/meta-fsl-ppc/conf/machine/include/e6500-64b.inc b/meta-fsl-ppc/conf/machine/include/e6500-64b.inc index 21ee5d61..36f55a2c 100644 --- a/meta-fsl-ppc/conf/machine/include/e6500-64b.inc +++ b/meta-fsl-ppc/conf/machine/include/e6500-64b.inc @@ -7,7 +7,6 @@ MACHINE_FEATURES = "keyboard pci ext2 ext3 serial" MACHINE_EXTRA_RRECOMMENDS = "u-boot udev-extraconf kernel-modules" PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" -PREFERRED_VERSION_virtual/kernel ?= "3.0.34" PREFERRED_VERSION_qemu = "1.7+fsl" PREFERRED_VERSION_openssl = "1.0.1g" diff --git a/meta-fsl-ppc/conf/machine/include/e6500.inc b/meta-fsl-ppc/conf/machine/include/e6500.inc index c9010200..81a2bf47 100644 --- a/meta-fsl-ppc/conf/machine/include/e6500.inc +++ b/meta-fsl-ppc/conf/machine/include/e6500.inc @@ -6,7 +6,6 @@ MACHINE_FEATURES = "keyboard pci ext2 ext3 serial" MACHINE_EXTRA_RRECOMMENDS = "u-boot udev-extraconf kernel-modules" PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" -PREFERRED_VERSION_virtual/kernel ?= "3.0.34" PREFERRED_VERSION_qemu = "1.7+fsl" PREFERRED_VERSION_openssl = "1.0.1g" -- cgit v1.2.3-54-g00ecf From 528285dfb196b8bdfa25c6d84eaf659b83c5cbdd Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Fri, 11 Jul 2014 01:07:56 -0500 Subject: conf/machine/: move common bits to inc files * add four new files to hold common bits: include/qoriq-base.inc include/qoriq-default-providers.inc include/qoriq-default-settings.inc include/qoriq-default-versions.inc * add 'qoriq-ppc' into list of MACHINEOVERRIDES Signed-off-by: Ting Liu --- meta-fsl-ppc/conf/machine/b4420qds-64b.conf | 6 ------ meta-fsl-ppc/conf/machine/b4420qds.conf | 5 ----- meta-fsl-ppc/conf/machine/b4860qds-64b.conf | 5 ----- meta-fsl-ppc/conf/machine/b4860qds.conf | 5 ----- meta-fsl-ppc/conf/machine/bsc9131rdb.conf | 4 ---- meta-fsl-ppc/conf/machine/bsc9132qds.conf | 4 ---- meta-fsl-ppc/conf/machine/c293pcie.conf | 4 ---- meta-fsl-ppc/conf/machine/include/e500mc.inc | 13 +------------ meta-fsl-ppc/conf/machine/include/e500v2.inc | 13 +------------ meta-fsl-ppc/conf/machine/include/e5500-64b.inc | 15 ++------------- meta-fsl-ppc/conf/machine/include/e5500.inc | 13 +------------ meta-fsl-ppc/conf/machine/include/e6500-64b.inc | 15 ++------------- meta-fsl-ppc/conf/machine/include/e6500.inc | 14 +++----------- meta-fsl-ppc/conf/machine/include/qoriq-base.inc | 8 ++++++++ .../conf/machine/include/qoriq-default-providers.inc | 2 ++ .../conf/machine/include/qoriq-default-settings.inc | 15 +++++++++++++++ .../conf/machine/include/qoriq-default-versions.inc | 3 +++ meta-fsl-ppc/conf/machine/p1010rdb.conf | 4 ---- meta-fsl-ppc/conf/machine/p1020rdb.conf | 6 ------ meta-fsl-ppc/conf/machine/p1021rdb.conf | 4 ---- meta-fsl-ppc/conf/machine/p1022ds.conf | 4 ---- meta-fsl-ppc/conf/machine/p1023rdb.conf | 4 ---- meta-fsl-ppc/conf/machine/p1025twr.conf | 4 ---- meta-fsl-ppc/conf/machine/p2020ds.conf | 4 ---- meta-fsl-ppc/conf/machine/p2020rdb.conf | 4 ---- meta-fsl-ppc/conf/machine/p2041rdb.conf | 4 ---- meta-fsl-ppc/conf/machine/p3041ds.conf | 4 ---- meta-fsl-ppc/conf/machine/p4080ds.conf | 4 ---- meta-fsl-ppc/conf/machine/p5020ds-64b.conf | 5 ----- meta-fsl-ppc/conf/machine/p5020ds.conf | 4 ---- meta-fsl-ppc/conf/machine/p5040ds-64b.conf | 4 ---- meta-fsl-ppc/conf/machine/p5040ds.conf | 4 ---- meta-fsl-ppc/conf/machine/t1040rdb-64b.conf | 4 ---- meta-fsl-ppc/conf/machine/t1040rdb.conf | 4 ---- meta-fsl-ppc/conf/machine/t1042rdb-64b.conf | 5 ----- meta-fsl-ppc/conf/machine/t1042rdb.conf | 5 ----- meta-fsl-ppc/conf/machine/t2080qds-64b.conf | 5 ----- meta-fsl-ppc/conf/machine/t2080qds.conf | 5 ----- meta-fsl-ppc/conf/machine/t2080rdb-64b.conf | 5 ----- meta-fsl-ppc/conf/machine/t2080rdb.conf | 5 ----- meta-fsl-ppc/conf/machine/t4160qds-64b.conf | 5 ----- meta-fsl-ppc/conf/machine/t4160qds.conf | 5 ----- meta-fsl-ppc/conf/machine/t4240qds-64b.conf | 5 ----- meta-fsl-ppc/conf/machine/t4240qds.conf | 5 ----- meta-fsl-ppc/conf/machine/t4240rdb-64b.conf | 5 ----- meta-fsl-ppc/conf/machine/t4240rdb.conf | 5 ----- 46 files changed, 38 insertions(+), 237 deletions(-) create mode 100644 meta-fsl-ppc/conf/machine/include/qoriq-base.inc create mode 100644 meta-fsl-ppc/conf/machine/include/qoriq-default-providers.inc create mode 100644 meta-fsl-ppc/conf/machine/include/qoriq-default-settings.inc create mode 100644 meta-fsl-ppc/conf/machine/include/qoriq-default-versions.inc diff --git a/meta-fsl-ppc/conf/machine/b4420qds-64b.conf b/meta-fsl-ppc/conf/machine/b4420qds-64b.conf index 45c820e4..a623c84f 100644 --- a/meta-fsl-ppc/conf/machine/b4420qds-64b.conf +++ b/meta-fsl-ppc/conf/machine/b4420qds-64b.conf @@ -5,17 +5,11 @@ #@MAINTAINER: Chunrong Guo require conf/machine/include/e6500-64b.inc -require conf/machine/include/soc-family.inc SOC_FAMILY = "b4420" - -# TODO: fix 32bit build of u-boot UBOOT_MACHINES ?= "B4420QDS" KERNEL_DEVICETREE ?= "b4420qds.dtb b4420qds-usdpaa.dtb" KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/85xx/e6500rev2_defconfig" JFFS2_ERASEBLOCK = "0x10000" -SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" -SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" -USE_VT = "0" diff --git a/meta-fsl-ppc/conf/machine/b4420qds.conf b/meta-fsl-ppc/conf/machine/b4420qds.conf index 9016cfb5..fa1187b2 100644 --- a/meta-fsl-ppc/conf/machine/b4420qds.conf +++ b/meta-fsl-ppc/conf/machine/b4420qds.conf @@ -5,7 +5,6 @@ #@MAINTAINER: Chunrong Guo require conf/machine/include/e6500.inc -require conf/machine/include/soc-family.inc SOC_FAMILY = "b4420" UBOOT_MACHINES ?= "B4420QDS" @@ -14,7 +13,3 @@ KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/85xx/e6500rev2_defconfig" JFFS2_ERASEBLOCK = "0x10000" -SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" -SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" -USE_VT = "0" -BUILD_64BIT_KERNEL = "1" diff --git a/meta-fsl-ppc/conf/machine/b4860qds-64b.conf b/meta-fsl-ppc/conf/machine/b4860qds-64b.conf index 4da069f9..3ba56482 100644 --- a/meta-fsl-ppc/conf/machine/b4860qds-64b.conf +++ b/meta-fsl-ppc/conf/machine/b4860qds-64b.conf @@ -5,16 +5,11 @@ #@MAINTAINER: Chunrong Guo require conf/machine/include/e6500-64b.inc -require conf/machine/include/soc-family.inc SOC_FAMILY = "b4860" -# TODO: fix 32bit build of u-boot UBOOT_MACHINES ?= "B4860QDS" KERNEL_DEVICETREE ?= "b4860qds.dtb b4860qds-usdpaa.dtb" KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/85xx/e6500rev2_defconfig" JFFS2_ERASEBLOCK = "0x10000" -SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" -SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" -USE_VT = "0" diff --git a/meta-fsl-ppc/conf/machine/b4860qds.conf b/meta-fsl-ppc/conf/machine/b4860qds.conf index c560f1c7..972d29f8 100644 --- a/meta-fsl-ppc/conf/machine/b4860qds.conf +++ b/meta-fsl-ppc/conf/machine/b4860qds.conf @@ -5,7 +5,6 @@ #@MAINTAINER: Chunrong Guo require conf/machine/include/e6500.inc -require conf/machine/include/soc-family.inc SOC_FAMILY = "b4860" UBOOT_MACHINES ?= "B4860QDS" @@ -14,7 +13,3 @@ KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/85xx/e6500rev2_defconfig" JFFS2_ERASEBLOCK = "0x10000" -SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" -SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" -USE_VT = "0" -BUILD_64BIT_KERNEL = "1" diff --git a/meta-fsl-ppc/conf/machine/bsc9131rdb.conf b/meta-fsl-ppc/conf/machine/bsc9131rdb.conf index 64ba795c..e65f7e4e 100644 --- a/meta-fsl-ppc/conf/machine/bsc9131rdb.conf +++ b/meta-fsl-ppc/conf/machine/bsc9131rdb.conf @@ -5,7 +5,6 @@ #@MAINTAINER: Chunrong Guo require conf/machine/include/e500v2.inc -require conf/machine/include/soc-family.inc SOC_FAMILY = "bsc9131" UBOOT_MACHINES ?= "BSC9131RDB_SPIFLASH BSC9131RDB_NAND BSC9131RDB_NAND_SYSCLK100 BSC9131RDB_SPIFLASH_SYSCLK100" @@ -14,6 +13,3 @@ KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/85xx/bsc913x_defconfig" JFFS2_ERASEBLOCK = "0x10000" -SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" -SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" -USE_VT = "0" diff --git a/meta-fsl-ppc/conf/machine/bsc9132qds.conf b/meta-fsl-ppc/conf/machine/bsc9132qds.conf index a51cbd85..82078ee3 100644 --- a/meta-fsl-ppc/conf/machine/bsc9132qds.conf +++ b/meta-fsl-ppc/conf/machine/bsc9132qds.conf @@ -5,7 +5,6 @@ #@MAINTAINER: Chunrong Guo require conf/machine/include/e500v2.inc -require conf/machine/include/soc-family.inc SOC_FAMILY = "bsc9132" UBOOT_MACHINES ?= " BSC9132QDS_NAND_DDRCLK133 BSC9132QDS_NAND_DDRCLK100 BSC9132QDS_NOR_DDRCLK100 BSC9132QDS_NOR_DDRCLK133 BSC9132QDS_SDCARD_DDRCLK100 BSC9132QDS_SDCARD_DDRCLK133 BSC9132QDS_SPIFLASH_DDRCLK100 BSC9132QDS_SPIFLASH_DDRCLK133" @@ -14,6 +13,3 @@ KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/85xx/bsc913x_smp_defconfig" JFFS2_ERASEBLOCK = "0x10000" -SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" -SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" -USE_VT = "0" diff --git a/meta-fsl-ppc/conf/machine/c293pcie.conf b/meta-fsl-ppc/conf/machine/c293pcie.conf index b22dfd05..6a63844e 100644 --- a/meta-fsl-ppc/conf/machine/c293pcie.conf +++ b/meta-fsl-ppc/conf/machine/c293pcie.conf @@ -5,7 +5,6 @@ #@MAINTAINER: Chunrong Guo require conf/machine/include/e500v2.inc -require conf/machine/include/soc-family.inc SOC_FAMILY = "c293pcie" BOOTFORMAT_CONFIG = "config_ddr3_512m_c29xpcie_800M.dat" @@ -15,6 +14,3 @@ KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/mpc85xx_defconfig" JFFS2_ERASEBLOCK = "0x10000" -SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" -SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" -USE_VT = "0" diff --git a/meta-fsl-ppc/conf/machine/include/e500mc.inc b/meta-fsl-ppc/conf/machine/include/e500mc.inc index a35d91b8..09b5c69e 100644 --- a/meta-fsl-ppc/conf/machine/include/e500mc.inc +++ b/meta-fsl-ppc/conf/machine/include/e500mc.inc @@ -1,17 +1,6 @@ TARGET_FPU = "hard" require conf/machine/include/tune-ppce500mc.inc - -MACHINE_FEATURES = "keyboard pci ext2 ext3 serial" -MACHINE_EXTRA_RRECOMMENDS = "u-boot udev-extraconf kernel-modules" - -PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" -PREFERRED_VERSION_qemu = "1.7+fsl" -PREFERRED_VERSION_openssl = "1.0.1g" - -KERNEL_IMAGETYPE ?= "uImage" -# disable the images below for now -# ext2.bz2 ext2.lzma \ -# ext2.gz.u-boot ext2.bz2.u-boot ext2.lzma.u-boot" +require conf/machine/include/qoriq-base.inc MACHINEOVERRIDES .= ":e500mc:fslmachine" diff --git a/meta-fsl-ppc/conf/machine/include/e500v2.inc b/meta-fsl-ppc/conf/machine/include/e500v2.inc index adaa3cdf..178de188 100644 --- a/meta-fsl-ppc/conf/machine/include/e500v2.inc +++ b/meta-fsl-ppc/conf/machine/include/e500v2.inc @@ -1,15 +1,4 @@ require conf/machine/include/tune-ppce500v2.inc - -MACHINE_FEATURES = "pci ext2 ext3 serial" -MACHINE_EXTRA_RRECOMMENDS = "u-boot udev-extraconf kernel-modules" - -PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" -PREFERRED_VERSION_qemu = "1.7+fsl" -PREFERRED_VERSION_openssl = "1.0.1g" - -KERNEL_IMAGETYPE ?= "uImage" -# disable the images below for now -# ext2.bz2 ext2.lzma \ -# ext2.gz.u-boot ext2.bz2.u-boot ext2.lzma.u-boot" +require conf/machine/include/qoriq-base.inc MACHINEOVERRIDES .= ":e500v2:fslmachine" diff --git a/meta-fsl-ppc/conf/machine/include/e5500-64b.inc b/meta-fsl-ppc/conf/machine/include/e5500-64b.inc index c9518434..47a9ad7c 100644 --- a/meta-fsl-ppc/conf/machine/include/e5500-64b.inc +++ b/meta-fsl-ppc/conf/machine/include/e5500-64b.inc @@ -1,18 +1,7 @@ TARGET_FPU = "hard" - DEFAULTTUNE ?= "ppc64e5500" -require conf/machine/include/tune-ppce5500.inc - -MACHINE_FEATURES = "keyboard pci ext2 ext3 serial" -MACHINE_EXTRA_RRECOMMENDS = "u-boot udev-extraconf kernel-modules" -PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" -PREFERRED_VERSION_qemu = "1.7+fsl" -PREFERRED_VERSION_openssl = "1.0.1g" - -KERNEL_IMAGETYPE ?= "uImage" -# disable the images below for now -# ext2.bz2 ext2.lzma \ -# ext2.gz.u-boot ext2.bz2.u-boot ext2.lzma.u-boot" +require conf/machine/include/tune-ppce5500.inc +require conf/machine/include/qoriq-base.inc MACHINEOVERRIDES .= ":e5500-64b:fslmachine" diff --git a/meta-fsl-ppc/conf/machine/include/e5500.inc b/meta-fsl-ppc/conf/machine/include/e5500.inc index 0babacca..e6f0400a 100644 --- a/meta-fsl-ppc/conf/machine/include/e5500.inc +++ b/meta-fsl-ppc/conf/machine/include/e5500.inc @@ -1,17 +1,6 @@ TARGET_FPU = "hard" require conf/machine/include/tune-ppce5500.inc - -MACHINE_FEATURES = "keyboard pci ext2 ext3 serial" -MACHINE_EXTRA_RRECOMMENDS = "u-boot udev-extraconf kernel-modules" - -PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" -PREFERRED_VERSION_qemu = "1.7+fsl" -PREFERRED_VERSION_openssl = "1.0.1g" - -KERNEL_IMAGETYPE ?= "uImage" -# disable the images below for now -# ext2.bz2 ext2.lzma \ -# ext2.gz.u-boot ext2.bz2.u-boot ext2.lzma.u-boot" +require conf/machine/include/qoriq-base.inc MACHINEOVERRIDES .= ":e5500:fslmachine" diff --git a/meta-fsl-ppc/conf/machine/include/e6500-64b.inc b/meta-fsl-ppc/conf/machine/include/e6500-64b.inc index 36f55a2c..0770cc37 100644 --- a/meta-fsl-ppc/conf/machine/include/e6500-64b.inc +++ b/meta-fsl-ppc/conf/machine/include/e6500-64b.inc @@ -1,18 +1,7 @@ TARGET_FPU = "hard" - DEFAULTTUNE ?= "ppc64e6500" -require conf/machine/include/tune-ppce6500.inc - -MACHINE_FEATURES = "keyboard pci ext2 ext3 serial" -MACHINE_EXTRA_RRECOMMENDS = "u-boot udev-extraconf kernel-modules" -PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" -PREFERRED_VERSION_qemu = "1.7+fsl" -PREFERRED_VERSION_openssl = "1.0.1g" - -KERNEL_IMAGETYPE ?= "uImage" -# disable the images below for now -# ext2.bz2 ext2.lzma \ -# ext2.gz.u-boot ext2.bz2.u-boot ext2.lzma.u-boot" +require conf/machine/include/tune-ppce6500.inc +require conf/machine/include/qoriq-base.inc MACHINEOVERRIDES .= ":e6500-64b:fslmachine" diff --git a/meta-fsl-ppc/conf/machine/include/e6500.inc b/meta-fsl-ppc/conf/machine/include/e6500.inc index 81a2bf47..323e420d 100644 --- a/meta-fsl-ppc/conf/machine/include/e6500.inc +++ b/meta-fsl-ppc/conf/machine/include/e6500.inc @@ -1,17 +1,9 @@ TARGET_FPU = "hard" require conf/machine/include/tune-ppce6500.inc +require conf/machine/include/qoriq-base.inc -MACHINE_FEATURES = "keyboard pci ext2 ext3 serial" -MACHINE_EXTRA_RRECOMMENDS = "u-boot udev-extraconf kernel-modules" - -PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" -PREFERRED_VERSION_qemu = "1.7+fsl" -PREFERRED_VERSION_openssl = "1.0.1g" +MACHINEOVERRIDES .= ":e6500:fslmachine" -KERNEL_IMAGETYPE ?= "uImage" -# disable the images below for now -# ext2.bz2 ext2.lzma \ -# ext2.gz.u-boot ext2.bz2.u-boot ext2.lzma.u-boot" +BUILD_64BIT_KERNEL = "1" -MACHINEOVERRIDES .= ":e6500:fslmachine" diff --git a/meta-fsl-ppc/conf/machine/include/qoriq-base.inc b/meta-fsl-ppc/conf/machine/include/qoriq-base.inc new file mode 100644 index 00000000..9b26d10c --- /dev/null +++ b/meta-fsl-ppc/conf/machine/include/qoriq-base.inc @@ -0,0 +1,8 @@ +# Provides the QorIQ common settings + +require conf/machine/include/qoriq-default-settings.inc +require conf/machine/include/qoriq-default-versions.inc +require conf/machine/include/qoriq-default-providers.inc + +require conf/machine/include/soc-family.inc + diff --git a/meta-fsl-ppc/conf/machine/include/qoriq-default-providers.inc b/meta-fsl-ppc/conf/machine/include/qoriq-default-providers.inc new file mode 100644 index 00000000..824712b9 --- /dev/null +++ b/meta-fsl-ppc/conf/machine/include/qoriq-default-providers.inc @@ -0,0 +1,2 @@ +PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" + diff --git a/meta-fsl-ppc/conf/machine/include/qoriq-default-settings.inc b/meta-fsl-ppc/conf/machine/include/qoriq-default-settings.inc new file mode 100644 index 00000000..a4fc0ec5 --- /dev/null +++ b/meta-fsl-ppc/conf/machine/include/qoriq-default-settings.inc @@ -0,0 +1,15 @@ +MACHINE_FEATURES = "keyboard pci ext2 ext3 serial" +MACHINE_EXTRA_RRECOMMENDS = "u-boot udev-extraconf kernel-modules" + +KERNEL_IMAGETYPE ?= "uImage" +# disable the images below for now +# ext2.bz2 ext2.lzma \ +# ext2.gz.u-boot ext2.bz2.u-boot ext2.lzma.u-boot" + +MACHINEOVERRIDES .= ":qoriq-ppc" + +SERIAL_CONSOLES ?= "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" +SERIAL_CONSOLES_CHECK ?= "${SERIAL_CONSOLES}" + +USE_VT = "0" + diff --git a/meta-fsl-ppc/conf/machine/include/qoriq-default-versions.inc b/meta-fsl-ppc/conf/machine/include/qoriq-default-versions.inc new file mode 100644 index 00000000..3bb03ba0 --- /dev/null +++ b/meta-fsl-ppc/conf/machine/include/qoriq-default-versions.inc @@ -0,0 +1,3 @@ +PREFERRED_VERSION_qemu = "1.7+fsl" +PREFERRED_VERSION_openssl = "1.0.1g" + diff --git a/meta-fsl-ppc/conf/machine/p1010rdb.conf b/meta-fsl-ppc/conf/machine/p1010rdb.conf index 10b1c927..ee7a9b61 100644 --- a/meta-fsl-ppc/conf/machine/p1010rdb.conf +++ b/meta-fsl-ppc/conf/machine/p1010rdb.conf @@ -5,7 +5,6 @@ #@MAINTAINER: Chunrong Guo require conf/machine/include/e500v2.inc -require conf/machine/include/soc-family.inc SOC_FAMILY = "p1010" BOOTFORMAT_CONFIG = "config_sram_p1010rdb.dat" @@ -17,6 +16,3 @@ KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/mpc85xx_defconfig" JFFS2_ERASEBLOCK = "0x20000" -SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" -SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" -USE_VT = "0" diff --git a/meta-fsl-ppc/conf/machine/p1020rdb.conf b/meta-fsl-ppc/conf/machine/p1020rdb.conf index 3fa73771..e2b706ed 100644 --- a/meta-fsl-ppc/conf/machine/p1020rdb.conf +++ b/meta-fsl-ppc/conf/machine/p1020rdb.conf @@ -5,18 +5,12 @@ #@MAINTAINER: Chunrong Guo require conf/machine/include/e500v2.inc -require conf/machine/include/soc-family.inc SOC_FAMILY = "p1020" BOOTFORMAT_CONFIG = "config_sram_p1022ds.dat" UBOOT_MACHINES ?= " P1020RDB-PD P1020RDB-PD_NAND P1020RDB-PD_SDCARD P1020RDB-PD_SPIFLASH" - KERNEL_DEVICETREE ?= "p1020rdb-pd_32b.dtb" - KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" JFFS2_ERASEBLOCK = "0x20000" -SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" -SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" -USE_VT = "0" diff --git a/meta-fsl-ppc/conf/machine/p1021rdb.conf b/meta-fsl-ppc/conf/machine/p1021rdb.conf index 711a62d9..4c793e8e 100644 --- a/meta-fsl-ppc/conf/machine/p1021rdb.conf +++ b/meta-fsl-ppc/conf/machine/p1021rdb.conf @@ -5,7 +5,6 @@ #@MAINTAINER: Chunrong Guo require conf/machine/include/e500v2.inc -require conf/machine/include/soc-family.inc SOC_FAMILY = "p1021" BOOTFORMAT_CONFIG = "config_sram_p1022ds.dat" @@ -15,6 +14,3 @@ KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" JFFS2_ERASEBLOCK = "0x20000" -SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" -SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" -USE_VT = "0" diff --git a/meta-fsl-ppc/conf/machine/p1022ds.conf b/meta-fsl-ppc/conf/machine/p1022ds.conf index 107cbe4b..823131ad 100644 --- a/meta-fsl-ppc/conf/machine/p1022ds.conf +++ b/meta-fsl-ppc/conf/machine/p1022ds.conf @@ -5,7 +5,6 @@ #@MAINTAINER: Chunrong Guo require conf/machine/include/e500v2.inc -require conf/machine/include/soc-family.inc SOC_FAMILY = "p1022" BOOTFORMAT_CONFIG = "config_sram_p1022ds.dat" @@ -25,6 +24,3 @@ XSERVER = " \ JFFS2_ERASEBLOCK = "0x20000" -SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" -SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" -USE_VT = "0" diff --git a/meta-fsl-ppc/conf/machine/p1023rdb.conf b/meta-fsl-ppc/conf/machine/p1023rdb.conf index 59a9ce61..02ec4a59 100644 --- a/meta-fsl-ppc/conf/machine/p1023rdb.conf +++ b/meta-fsl-ppc/conf/machine/p1023rdb.conf @@ -5,7 +5,6 @@ #@MAINTAINER: Chunrong Guo require conf/machine/include/e500v2.inc -require conf/machine/include/soc-family.inc SOC_FAMILY = "p1023" UBOOT_MACHINES ?= "P1023RDB" @@ -14,6 +13,3 @@ KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/85xx/p1023_defconfig" JFFS2_ERASEBLOCK = "0x10000" -SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" -SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" -USE_VT = "0" diff --git a/meta-fsl-ppc/conf/machine/p1025twr.conf b/meta-fsl-ppc/conf/machine/p1025twr.conf index e7d25fe9..67fa569f 100644 --- a/meta-fsl-ppc/conf/machine/p1025twr.conf +++ b/meta-fsl-ppc/conf/machine/p1025twr.conf @@ -5,7 +5,6 @@ #@MAINTAINER: Chunrong Guo require conf/machine/include/e500v2.inc -require conf/machine/include/soc-family.inc SOC_FAMILY = "p1025" BOOTFORMAT_CONFIG = "config_ddr3_1gb_p1_p2_rdb_pc_667M.dat" @@ -15,6 +14,3 @@ KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" JFFS2_ERASEBLOCK = "0x20000" -SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" -SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" -USE_VT = "0" diff --git a/meta-fsl-ppc/conf/machine/p2020ds.conf b/meta-fsl-ppc/conf/machine/p2020ds.conf index 75107876..96433a2e 100644 --- a/meta-fsl-ppc/conf/machine/p2020ds.conf +++ b/meta-fsl-ppc/conf/machine/p2020ds.conf @@ -5,7 +5,6 @@ #@MAINTAINER: Chunrong Guo require conf/machine/include/e500v2.inc -require conf/machine/include/soc-family.inc SOC_FAMILY = "p2020" BOOTFORMAT_CONFIG = "config_sram_p2020ds.dat" @@ -15,6 +14,3 @@ KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" JFFS2_ERASEBLOCK = "0x20000" -SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" -SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" -USE_VT = "0" diff --git a/meta-fsl-ppc/conf/machine/p2020rdb.conf b/meta-fsl-ppc/conf/machine/p2020rdb.conf index c3d08c95..9544c256 100644 --- a/meta-fsl-ppc/conf/machine/p2020rdb.conf +++ b/meta-fsl-ppc/conf/machine/p2020rdb.conf @@ -5,7 +5,6 @@ #@MAINTAINER: Chunrong Guo require conf/machine/include/e500v2.inc -require conf/machine/include/soc-family.inc SOC_FAMILY = "p2020" BOOTFORMAT_CONFIG = "config_sram_p1022ds.dat" @@ -15,6 +14,3 @@ KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" JFFS2_ERASEBLOCK = "0x20000" -SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" -SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" -USE_VT = "0" diff --git a/meta-fsl-ppc/conf/machine/p2041rdb.conf b/meta-fsl-ppc/conf/machine/p2041rdb.conf index d06df45c..f641a000 100644 --- a/meta-fsl-ppc/conf/machine/p2041rdb.conf +++ b/meta-fsl-ppc/conf/machine/p2041rdb.conf @@ -5,7 +5,6 @@ #@MAINTAINER: Chunrong Guo require conf/machine/include/e500mc.inc -require conf/machine/include/soc-family.inc SOC_FAMILY = "p2041" UBOOT_MACHINES ?= "P2041RDB P2041RDB_NAND P2041RDB_SECURE_BOOT P2041RDB_SDCARD P2041RDB_SPIFLASH" @@ -14,6 +13,3 @@ KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/corenet32_smp_defconfig" JFFS2_ERASEBLOCK = "0x10000" -SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" -SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" -USE_VT = "0" diff --git a/meta-fsl-ppc/conf/machine/p3041ds.conf b/meta-fsl-ppc/conf/machine/p3041ds.conf index 7be35b93..01c51e40 100644 --- a/meta-fsl-ppc/conf/machine/p3041ds.conf +++ b/meta-fsl-ppc/conf/machine/p3041ds.conf @@ -5,7 +5,6 @@ #@MAINTAINER: Chunrong Guo require conf/machine/include/e500mc.inc -require conf/machine/include/soc-family.inc SOC_FAMILY = "p3041" UBOOT_MACHINES ?= "P3041DS P3041DS_NAND P3041DS_SECURE_BOOT P3041DS_SDCARD P3041DS_SPIFLASH" @@ -14,6 +13,3 @@ KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/corenet32_smp_defconfig" JFFS2_ERASEBLOCK = "0x10000" -SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" -SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" -USE_VT = "0" diff --git a/meta-fsl-ppc/conf/machine/p4080ds.conf b/meta-fsl-ppc/conf/machine/p4080ds.conf index 51c0fed8..1b6fad74 100644 --- a/meta-fsl-ppc/conf/machine/p4080ds.conf +++ b/meta-fsl-ppc/conf/machine/p4080ds.conf @@ -5,7 +5,6 @@ #@MAINTAINER: Chunrong Guo require conf/machine/include/e500mc.inc -require conf/machine/include/soc-family.inc SOC_FAMILY = "p4080" UBOOT_MACHINES ?= "P4080DS P4080DS_SECURE_BOOT P4080DS_SDCARD P4080DS_SPIFLASH " @@ -14,6 +13,3 @@ KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/corenet32_smp_defconfig" JFFS2_ERASEBLOCK = "0x10000" -SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" -SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" -USE_VT = "0" diff --git a/meta-fsl-ppc/conf/machine/p5020ds-64b.conf b/meta-fsl-ppc/conf/machine/p5020ds-64b.conf index a901b48e..057e9f3a 100644 --- a/meta-fsl-ppc/conf/machine/p5020ds-64b.conf +++ b/meta-fsl-ppc/conf/machine/p5020ds-64b.conf @@ -5,16 +5,11 @@ #@MAINTAINER: Chunrong Guo require conf/machine/include/e5500-64b.inc -require conf/machine/include/soc-family.inc SOC_FAMILY = "p5020" -# TODO: fix 32bit build of u-boot for p5020ds-64b UBOOT_MACHINES ?= "P5020DS" KERNEL_DEVICETREE ?= "p5020ds.dtb p5020ds-usdpaa.dtb" KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/corenet64_smp_defconfig" JFFS2_ERASEBLOCK = "0x10000" -SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" -SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" -USE_VT = "0" diff --git a/meta-fsl-ppc/conf/machine/p5020ds.conf b/meta-fsl-ppc/conf/machine/p5020ds.conf index 42ab7690..7effe1e9 100644 --- a/meta-fsl-ppc/conf/machine/p5020ds.conf +++ b/meta-fsl-ppc/conf/machine/p5020ds.conf @@ -5,7 +5,6 @@ #@MAINTAINER: Chunrong Guo require conf/machine/include/e5500.inc -require conf/machine/include/soc-family.inc SOC_FAMILY = "p5020" UBOOT_MACHINES ?= "P5020DS P5020DS_NAND P5020DS_SECURE_BOOT P5020DS_SDCARD P5020DS_SPIFLASH " @@ -14,6 +13,3 @@ KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/corenet32_smp_defconfig" JFFS2_ERASEBLOCK = "0x10000" -SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" -SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" -USE_VT = "0" diff --git a/meta-fsl-ppc/conf/machine/p5040ds-64b.conf b/meta-fsl-ppc/conf/machine/p5040ds-64b.conf index c462970a..fbbe9e2f 100644 --- a/meta-fsl-ppc/conf/machine/p5040ds-64b.conf +++ b/meta-fsl-ppc/conf/machine/p5040ds-64b.conf @@ -5,7 +5,6 @@ #@MAINTAINER: Chunrong Guo require conf/machine/include/e5500-64b.inc -require conf/machine/include/soc-family.inc SOC_FAMILY = "p5040" UBOOT_MACHINES ?= "P5040DS P5040DS_NAND P5040DS_SECURE_BOOT P5040DS_SDCARD P5040DS_SPIFLASH" @@ -14,6 +13,3 @@ KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/corenet64_smp_defconfig" JFFS2_ERASEBLOCK = "0x10000" -SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" -SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" -USE_VT = "0" diff --git a/meta-fsl-ppc/conf/machine/p5040ds.conf b/meta-fsl-ppc/conf/machine/p5040ds.conf index 8f5ea620..1cd95120 100644 --- a/meta-fsl-ppc/conf/machine/p5040ds.conf +++ b/meta-fsl-ppc/conf/machine/p5040ds.conf @@ -5,7 +5,6 @@ #@MAINTAINER: Chunrong Guo require conf/machine/include/e5500.inc -require conf/machine/include/soc-family.inc SOC_FAMILY = "p5040" UBOOT_MACHINES ?= "P5040DS P5040DS_NAND P5040DS_SECURE_BOOT P5040DS_SDCARD P5040DS_SPIFLASH" @@ -14,6 +13,3 @@ KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/corenet32_smp_defconfig" JFFS2_ERASEBLOCK = "0x10000" -SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" -SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" -USE_VT = "0" diff --git a/meta-fsl-ppc/conf/machine/t1040rdb-64b.conf b/meta-fsl-ppc/conf/machine/t1040rdb-64b.conf index bc4de7b4..b4ea5c86 100644 --- a/meta-fsl-ppc/conf/machine/t1040rdb-64b.conf +++ b/meta-fsl-ppc/conf/machine/t1040rdb-64b.conf @@ -5,7 +5,6 @@ #@MAINTAINER: Chunrong Guo require conf/machine/include/e5500-64b.inc -require conf/machine/include/soc-family.inc SOC_FAMILY = "t1040" UBOOT_MACHINES ?= "T1040RDB" @@ -14,6 +13,3 @@ KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/t1040_64bit_smp_defconfig" JFFS2_ERASEBLOCK = "0x10000" -SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" -SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" -USE_VT = "0" diff --git a/meta-fsl-ppc/conf/machine/t1040rdb.conf b/meta-fsl-ppc/conf/machine/t1040rdb.conf index d2ec7a4c..684cf8ee 100644 --- a/meta-fsl-ppc/conf/machine/t1040rdb.conf +++ b/meta-fsl-ppc/conf/machine/t1040rdb.conf @@ -5,7 +5,6 @@ #@MAINTAINER: Chunrong Guo require conf/machine/include/e5500.inc -require conf/machine/include/soc-family.inc SOC_FAMILY = "t1040" UBOOT_MACHINES ?= "T1040RDB" @@ -14,6 +13,3 @@ KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/t1040_32bit_smp_defconfig" JFFS2_ERASEBLOCK = "0x10000" -SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" -SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" -USE_VT = "0" diff --git a/meta-fsl-ppc/conf/machine/t1042rdb-64b.conf b/meta-fsl-ppc/conf/machine/t1042rdb-64b.conf index 58b2bd0f..0141e102 100644 --- a/meta-fsl-ppc/conf/machine/t1042rdb-64b.conf +++ b/meta-fsl-ppc/conf/machine/t1042rdb-64b.conf @@ -5,7 +5,6 @@ #@MAINTAINER: Chunrong Guo require conf/machine/include/e5500-64b.inc -require conf/machine/include/soc-family.inc SOC_FAMILY = "t1042" UBOOT_MACHINES ?= "T1042RDB_PI" @@ -14,10 +13,6 @@ KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/t1040_64bit_smp_defconfig" JFFS2_ERASEBLOCK = "0x10000" -SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" -SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" -USE_VT = "0" - PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xorg" XSERVER = " \ xserver-xorg \ diff --git a/meta-fsl-ppc/conf/machine/t1042rdb.conf b/meta-fsl-ppc/conf/machine/t1042rdb.conf index e5c4112a..1f13d86c 100644 --- a/meta-fsl-ppc/conf/machine/t1042rdb.conf +++ b/meta-fsl-ppc/conf/machine/t1042rdb.conf @@ -5,7 +5,6 @@ #@MAINTAINER: Chunrong Guo require conf/machine/include/e5500.inc -require conf/machine/include/soc-family.inc SOC_FAMILY = "t1042" UBOOT_MACHINES ?= "T1042RDB_PI" @@ -14,10 +13,6 @@ KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/t1040_32bit_smp_defconfig" JFFS2_ERASEBLOCK = "0x10000" -SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" -SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" -USE_VT = "0" - PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xorg" XSERVER = " \ xserver-xorg \ diff --git a/meta-fsl-ppc/conf/machine/t2080qds-64b.conf b/meta-fsl-ppc/conf/machine/t2080qds-64b.conf index bd1cd1d9..e2b5682f 100644 --- a/meta-fsl-ppc/conf/machine/t2080qds-64b.conf +++ b/meta-fsl-ppc/conf/machine/t2080qds-64b.conf @@ -5,16 +5,11 @@ #@MAINTAINER: Chunrong Guo require conf/machine/include/e6500-64b.inc -require conf/machine/include/soc-family.inc SOC_FAMILY = "t2080" -# TODO: fix 32bit build of u-boot UBOOT_MACHINES ?= "T2080QDS T2080QDS_SDCARD T2080QDS_SPIFLASH T2080QDS_NAND T2080QDS_SRIO_PCIE_BOOT" KERNEL_DEVICETREE ?= "t2080qds.dtb t2080qds-usdpaa.dtb" KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/85xx/e6500rev2_defconfig" JFFS2_ERASEBLOCK = "0x10000" -SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" -SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" -USE_VT = "0" diff --git a/meta-fsl-ppc/conf/machine/t2080qds.conf b/meta-fsl-ppc/conf/machine/t2080qds.conf index 2892baaf..dfa6b090 100644 --- a/meta-fsl-ppc/conf/machine/t2080qds.conf +++ b/meta-fsl-ppc/conf/machine/t2080qds.conf @@ -5,7 +5,6 @@ #@MAINTAINER: Chunrong Guo require conf/machine/include/e6500.inc -require conf/machine/include/soc-family.inc SOC_FAMILY = "t2080" UBOOT_MACHINES ?= "T2080QDS T2080QDS_SDCARD T2080QDS_SPIFLASH T2080QDS_NAND T2080QDS_SRIO_PCIE_BOOT" @@ -14,7 +13,3 @@ KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/85xx/e6500rev2_defconfig" JFFS2_ERASEBLOCK = "0x10000" -SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" -SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" -USE_VT = "0" -BUILD_64BIT_KERNEL = "1" diff --git a/meta-fsl-ppc/conf/machine/t2080rdb-64b.conf b/meta-fsl-ppc/conf/machine/t2080rdb-64b.conf index 2d28f9c2..5d4eed43 100644 --- a/meta-fsl-ppc/conf/machine/t2080rdb-64b.conf +++ b/meta-fsl-ppc/conf/machine/t2080rdb-64b.conf @@ -5,16 +5,11 @@ #@MAINTAINER: Chunrong Guo require conf/machine/include/e6500-64b.inc -require conf/machine/include/soc-family.inc SOC_FAMILY = "t2080" -# TODO: fix 32bit build of u-boot UBOOT_MACHINES ?= "T2080RDB T2080RDB_SDCARD T2080RDB_SPIFLASH T2080RDB_NAND T2080RDB_SRIO_PCIE_BOOT" KERNEL_DEVICETREE ?= "t2080rdb.dtb t2080rdb-usdpaa.dtb" KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/85xx/e6500rev2_defconfig" JFFS2_ERASEBLOCK = "0x10000" -SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" -SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" -USE_VT = "0" diff --git a/meta-fsl-ppc/conf/machine/t2080rdb.conf b/meta-fsl-ppc/conf/machine/t2080rdb.conf index 256a3d0c..08d2dd72 100644 --- a/meta-fsl-ppc/conf/machine/t2080rdb.conf +++ b/meta-fsl-ppc/conf/machine/t2080rdb.conf @@ -5,7 +5,6 @@ #@MAINTAINER: Chunrong Guo require conf/machine/include/e6500.inc -require conf/machine/include/soc-family.inc SOC_FAMILY = "t2080" UBOOT_MACHINES ?= "T2080RDB T2080RDB_SDCARD T2080RDB_SPIFLASH T2080RDB_NAND T2080RDB_SRIO_PCIE_BOOT" @@ -14,7 +13,3 @@ KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/85xx/e6500rev2_defconfig" JFFS2_ERASEBLOCK = "0x10000" -SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" -SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" -USE_VT = "0" -BUILD_64BIT_KERNEL = "1" diff --git a/meta-fsl-ppc/conf/machine/t4160qds-64b.conf b/meta-fsl-ppc/conf/machine/t4160qds-64b.conf index 18650787..3f35e57b 100644 --- a/meta-fsl-ppc/conf/machine/t4160qds-64b.conf +++ b/meta-fsl-ppc/conf/machine/t4160qds-64b.conf @@ -5,16 +5,11 @@ #@MAINTAINER: Chunrong Guo require conf/machine/include/e6500-64b.inc -require conf/machine/include/soc-family.inc SOC_FAMILY = "t4160" -# TODO: fix 32bit build of u-boot UBOOT_MACHINES ?= "T4160QDS" KERNEL_DEVICETREE ?= "t4240qds.dtb t4240qds-usdpaa.dtb" KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/85xx/e6500rev2_defconfig" JFFS2_ERASEBLOCK = "0x10000" -SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" -SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" -USE_VT = "0" diff --git a/meta-fsl-ppc/conf/machine/t4160qds.conf b/meta-fsl-ppc/conf/machine/t4160qds.conf index 07ea41b5..f87b58e5 100644 --- a/meta-fsl-ppc/conf/machine/t4160qds.conf +++ b/meta-fsl-ppc/conf/machine/t4160qds.conf @@ -5,7 +5,6 @@ #@MAINTAINER: Chunrong Guo require conf/machine/include/e6500.inc -require conf/machine/include/soc-family.inc SOC_FAMILY = "t4160" UBOOT_MACHINES ?= "T4160QDS" @@ -14,7 +13,3 @@ KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/85xx/e6500rev2_defconfig" JFFS2_ERASEBLOCK = "0x10000" -SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" -SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" -USE_VT = "0" -BUILD_64BIT_KERNEL = "1" diff --git a/meta-fsl-ppc/conf/machine/t4240qds-64b.conf b/meta-fsl-ppc/conf/machine/t4240qds-64b.conf index ff56c3bb..510b813e 100644 --- a/meta-fsl-ppc/conf/machine/t4240qds-64b.conf +++ b/meta-fsl-ppc/conf/machine/t4240qds-64b.conf @@ -5,16 +5,11 @@ #@MAINTAINER: Chunrong Guo require conf/machine/include/e6500-64b.inc -require conf/machine/include/soc-family.inc SOC_FAMILY = "t4240" -# TODO: fix 32bit build of u-boot UBOOT_MACHINES ?= "T4240QDS" KERNEL_DEVICETREE ?= "t4240qds.dtb t4240qds-usdpaa.dtb" KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/85xx/e6500rev2_defconfig" JFFS2_ERASEBLOCK = "0x10000" -SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" -SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" -USE_VT = "0" diff --git a/meta-fsl-ppc/conf/machine/t4240qds.conf b/meta-fsl-ppc/conf/machine/t4240qds.conf index 0df32f6a..58e52000 100644 --- a/meta-fsl-ppc/conf/machine/t4240qds.conf +++ b/meta-fsl-ppc/conf/machine/t4240qds.conf @@ -5,7 +5,6 @@ #@MAINTAINER: Chunrong Guo require conf/machine/include/e6500.inc -require conf/machine/include/soc-family.inc SOC_FAMILY = "t4240" UBOOT_MACHINES ?= "T4240QDS" @@ -14,7 +13,3 @@ KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/85xx/e6500rev2_defconfig" JFFS2_ERASEBLOCK = "0x10000" -SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" -SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" -USE_VT = "0" -BUILD_64BIT_KERNEL = "1" diff --git a/meta-fsl-ppc/conf/machine/t4240rdb-64b.conf b/meta-fsl-ppc/conf/machine/t4240rdb-64b.conf index 0838187e..ea458957 100644 --- a/meta-fsl-ppc/conf/machine/t4240rdb-64b.conf +++ b/meta-fsl-ppc/conf/machine/t4240rdb-64b.conf @@ -5,16 +5,11 @@ #@MAINTAINER: Chunrong Guo require conf/machine/include/e6500-64b.inc -require conf/machine/include/soc-family.inc SOC_FAMILY = "t4240" -# TODO: fix 32bit build of u-boot UBOOT_MACHINES ?= "T4240RDB" KERNEL_DEVICETREE ?= "t4240rdb.dtb t4240rdb-usdpaa.dtb t4240rdb-usdpaa-shared-interfaces.dtb" KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/85xx/e6500rev2_defconfig" JFFS2_ERASEBLOCK = "0x10000" -SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" -SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" -USE_VT = "0" diff --git a/meta-fsl-ppc/conf/machine/t4240rdb.conf b/meta-fsl-ppc/conf/machine/t4240rdb.conf index dc5f45cf..ec9c5bbc 100644 --- a/meta-fsl-ppc/conf/machine/t4240rdb.conf +++ b/meta-fsl-ppc/conf/machine/t4240rdb.conf @@ -5,7 +5,6 @@ #@MAINTAINER: Chunrong Guo require conf/machine/include/e6500.inc -require conf/machine/include/soc-family.inc SOC_FAMILY = "t4240" UBOOT_MACHINES ?= "T4240RDB" @@ -14,7 +13,3 @@ KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/85xx/e6500rev2_defconfig" JFFS2_ERASEBLOCK = "0x10000" -SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" -SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" -USE_VT = "0" -BUILD_64BIT_KERNEL = "1" -- cgit v1.2.3-54-g00ecf From cb643f7a13a50eb1ad039aa3290d15a1140f4063 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Fri, 11 Jul 2014 01:17:36 -0500 Subject: u-boot: rename to u-boot-qoriq like u-boot-imx, u-boot-qoriq is supposed to be provided and supported by Freescale. it uses latest u-boot codes on git.freescale.com Signed-off-by: Ting Liu --- .../machine/include/qoriq-default-providers.inc | 1 + .../recipes-bsp/u-boot/u-boot-qoriq_git.bb | 179 +++++++++++++++++++++ meta-fsl-ppc/recipes-bsp/u-boot/u-boot_git.bb | 179 --------------------- 3 files changed, 180 insertions(+), 179 deletions(-) create mode 100644 meta-fsl-ppc/recipes-bsp/u-boot/u-boot-qoriq_git.bb delete mode 100644 meta-fsl-ppc/recipes-bsp/u-boot/u-boot_git.bb diff --git a/meta-fsl-ppc/conf/machine/include/qoriq-default-providers.inc b/meta-fsl-ppc/conf/machine/include/qoriq-default-providers.inc index 824712b9..b2c6c536 100644 --- a/meta-fsl-ppc/conf/machine/include/qoriq-default-providers.inc +++ b/meta-fsl-ppc/conf/machine/include/qoriq-default-providers.inc @@ -1,2 +1,3 @@ PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" +PREFERRED_PROVIDER_u-boot ?= "u-boot-qoriq" diff --git a/meta-fsl-ppc/recipes-bsp/u-boot/u-boot-qoriq_git.bb b/meta-fsl-ppc/recipes-bsp/u-boot/u-boot-qoriq_git.bb new file mode 100644 index 00000000..e16438f1 --- /dev/null +++ b/meta-fsl-ppc/recipes-bsp/u-boot/u-boot-qoriq_git.bb @@ -0,0 +1,179 @@ +DESCRIPTION = "U-boot bootloader" +HOMEPAGE = "http://u-boot.sf.net" +SECTION = "bootloaders" +PROVIDES = "virtual/bootloader u-boot" +LICENSE = "GPLv2 & BSD-3-Clause & BSD-2-Clause & LGPL-2.0 & LGPL-2.1" +LIC_FILES_CHKSUM = " \ + file://Licenses/gpl-2.0.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://Licenses/bsd-2-clause.txt;md5=6a31f076f5773aabd8ff86191ad6fdd5 \ + file://Licenses/bsd-3-clause.txt;md5=4a1190eac56a9db675d58ebe86eaf50c \ + file://Licenses/lgpl-2.0.txt;md5=5f30f0716dfdd0d91eb439ebec522ec2 \ + file://Licenses/lgpl-2.1.txt;md5=4fbd65380cdd255951079008b364516c \ +" + +PV = "2014.01+fslgit" +INHIBIT_DEFAULT_DEPS = "1" +DEPENDS = "boot-format-native libgcc ${@base_contains('TCMODE', 'external-fsl', '', 'virtual/${TARGET_PREFIX}gcc', d)}" + +inherit deploy + +SRC_URI = "git://git.freescale.com/ppc/sdk/u-boot.git;nobranch=1" +SRCREV = "fe1d4f5739e752ad45ada6227a9fb19590af7194" + +python () { + if d.getVar("TCMODE", True) == "external-fsl": + return + + ml = d.getVar("MULTILIB_VARIANTS", True) + arch = d.getVar("OVERRIDES", True) + + if ("e5500-64b:" in arch or "e6500-64b:" in arch) and not "lib32" in ml: + raise bb.parse.SkipPackage("Building the u-boot for this arch requires multilib to be enabled") +} + +DEPENDS_append_e5500-64b = "${@base_contains('TCMODE', 'external-fsl', '', ' lib32-gcc-cross-powerpc lib32-libgcc', d)}" +PATH_append_e5500-64b = ":${STAGING_BINDIR_NATIVE}/powerpc${TARGET_VENDOR_virtclass-multilib-lib32}-${HOST_OS}/" +TOOLCHAIN_OPTIONS_append_e5500-64b = "${@base_contains('TCMODE', 'external-fsl', '', '/../lib32-${MACHINE}', d)}" +TARGET_VENDOR_virtclass-multilib-lib32 ?= "${@base_contains('TCMODE', 'external-fsl', '', '-${DISTRO}mllib32', d)}" +WRAP_TARGET_PREFIX_e5500-64b := "powerpc${TARGET_VENDOR_virtclass-multilib-lib32}-${HOST_OS}-" + +DEPENDS_append_e6500-64b = "${@base_contains('TCMODE', 'external-fsl', '', ' lib32-gcc-cross-powerpc lib32-libgcc', d)}" +PATH_append_e6500-64b = ":${STAGING_BINDIR_NATIVE}/powerpc${TARGET_VENDOR_virtclass-multilib-lib32}-${HOST_OS}/" +TOOLCHAIN_OPTIONS_append_e6500-64b = "${@base_contains('TCMODE', 'external-fsl', '', '/../lib32-${MACHINE}', d)}" +TARGET_VENDOR_virtclass-multilib-lib32 ?= "${@base_contains('TCMODE', 'external-fsl', '', '-${DISTRO}mllib32', d)}" +WRAP_TARGET_PREFIX_e6500-64b := "powerpc${TARGET_VENDOR_virtclass-multilib-lib32}-${HOST_OS}-" +WRAP_TARGET_PREFIX = "${TARGET_PREFIX}" + +PACKAGE_ARCH = "${MACHINE_ARCH}" + +UBOOT_LOCALVERSION = "${@d.getVar('SDK_VERSION', True).partition(' ')[0]}" + +USRC ?= "" +S = '${@base_conditional("USRC", "", "${WORKDIR}/git", "${USRC}", d)}' + +CROSS_COMPILE = '${@base_conditional("TCMODE", "external-fsl", "${TARGET_PREFIX}", "${WRAP_TARGET_PREFIX}", d)}' +EXTRA_OEMAKE = 'CROSS_COMPILE=${CROSS_COMPILE} CC="${CROSS_COMPILE}gcc ${TOOLCHAIN_OPTIONS}"' + +do_compile () { + unset LDFLAGS + unset CFLAGS + unset CPPFLAGS + + if [ ! -e ${B}/.scmversion -a ! -e ${S}/.scmversion ] + then + head=`git rev-parse --verify --short HEAD 2> /dev/null` + printf "%s%s%s" ${UBOOT_LOCALVERSION} +g $head > ${B}/.scmversion + printf "%s%s%s" ${UBOOT_LOCALVERSION} +g $head > ${S}/.scmversion + fi + + if [ "x${UBOOT_MACHINES}" = "x" ]; then + UBOOT_MACHINES=${UBOOT_MACHINE} + fi + + for board in ${UBOOT_MACHINES}; do + if ! grep -wq $board ${S}/boards.cfg;then + echo "WARNING: $board not supported in boards.cfg" + continue + fi + + oe_runmake O=${board} distclean + oe_runmake O=${board} ${board} + oe_runmake O=${board} all + + case "${board}" in + *SDCARD*) UBOOT_TARGET="u-boot-sd";; + *SPIFLASH*) UBOOT_TARGET="u-boot-spi";; + *NAND*) UBOOT_TARGET="u-boot-nand";; + *SRIO*) UBOOT_TARGET="u-boot-srio";; + *) UBOOT_TARGET="";; + esac + + # deal with sd/spi/nand/srio image + UBOOT_SOURCE=u-boot + if [ "x${UBOOT_TARGET}" != "x" ]; then + # some boards' nand image was named as u-boot-with-spl + if [ "${UBOOT_TARGET}" = "u-boot-nand" ];then + if echo $board |egrep -q "(P1010RDB|P1020RDB|P1021RDB|P2020RDB|P1022DS|BSC913|C293)";then + UBOOT_SOURCE=u-boot-with-spl + fi + elif [ "${UBOOT_TARGET}" = "u-boot-spi" ];then + if echo $board |egrep -q "(P1010RDB|P1020RDB|P1021RDB|P2020RDB|P1022DS)";then + UBOOT_SOURCE=u-boot-with-spl + fi + elif [ "${UBOOT_TARGET}" = "u-boot-sd" ];then + if echo $board |egrep -q "(P1010RDB|P1020RDB|P1021RDB|P2020RDB|P1022DS)";then + UBOOT_SOURCE=u-boot-with-spl + fi + fi + cp ${S}/${board}/${UBOOT_SOURCE}.bin ${S}/${board}/${UBOOT_TARGET}.bin + + # use boot-format to regenerate spi image if BOOTFORMAT_CONFIG is not empty + if [ "${UBOOT_TARGET}" = "u-boot-spi" ] && [ -n "${BOOTFORMAT_CONFIG}" ];then + ${STAGING_BINDIR_NATIVE}/boot_format \ + ${STAGING_DATADIR_NATIVE}/boot_format/${BOOTFORMAT_CONFIG} \ + ${S}/${board}/${UBOOT_SOURCE}.bin -spi ${S}/${board}/${UBOOT_TARGET}.bin + fi + fi + done +} + +do_install(){ + if [ "x${UBOOT_MACHINES}" = "x" ]; then + UBOOT_MACHINES=${UBOOT_MACHINE} + fi + + for board in ${UBOOT_MACHINES}; do + if ! grep -wq $board ${S}/boards.cfg;then + continue + fi + + case "${board}" in + *SDCARD*) UBOOT_TARGET="u-boot-sd";; + *SPIFLASH*) UBOOT_TARGET="u-boot-spi";; + *NAND*) UBOOT_TARGET="u-boot-nand";; + *SRIO*) UBOOT_TARGET="u-boot-srio";; + *) UBOOT_TARGET="u-boot";; + esac + + if [ -f ${S}/${board}/${UBOOT_TARGET}.bin ]; then + mkdir -p ${D}/boot/ + install ${S}/${board}/${UBOOT_TARGET}.bin ${D}/boot/${UBOOT_TARGET}-${board}-${PV}-${PR}.bin + ln -sf ${UBOOT_TARGET}-${board}-${PV}-${PR}.bin ${D}/boot/${UBOOT_TARGET}.bin + fi + done +} + +do_deploy(){ + if [ "x${UBOOT_MACHINES}" = "x" ]; then + UBOOT_MACHINES=${UBOOT_MACHINE} + fi + + for board in ${UBOOT_MACHINES}; do + if ! grep -wq $board ${S}/boards.cfg;then + continue + fi + + case "${board}" in + *SDCARD*) UBOOT_TARGET="u-boot-sd";; + *SPIFLASH*) UBOOT_TARGET="u-boot-spi";; + *NAND*) UBOOT_TARGET="u-boot-nand";; + *SRIO*) UBOOT_TARGET="u-boot-srio";; + *) UBOOT_TARGET="u-boot";; + esac + + if [ -f ${S}/${board}/${UBOOT_TARGET}.bin ]; then + mkdir -p ${DEPLOYDIR} + install ${S}/${board}/${UBOOT_TARGET}.bin ${DEPLOYDIR}/${UBOOT_TARGET}-${board}-${PV}-${PR}.bin + + cd ${DEPLOYDIR} + rm -f ${UBOOT_TARGET}-${board}.bin + ln -sf ${UBOOT_TARGET}-${board}-${PV}-${PR}.bin ${UBOOT_TARGET}-${board}.bin + fi + done +} +addtask deploy after do_install + +PACKAGES += "${PN}-images" +FILES_${PN}-images += "/boot" + +ALLOW_EMPTY_${PN} = "1" diff --git a/meta-fsl-ppc/recipes-bsp/u-boot/u-boot_git.bb b/meta-fsl-ppc/recipes-bsp/u-boot/u-boot_git.bb deleted file mode 100644 index bd3053ff..00000000 --- a/meta-fsl-ppc/recipes-bsp/u-boot/u-boot_git.bb +++ /dev/null @@ -1,179 +0,0 @@ -DESCRIPTION = "U-boot bootloader" -HOMEPAGE = "http://u-boot.sf.net" -SECTION = "bootloaders" -PROVIDES = "virtual/bootloader" -LICENSE = "GPLv2 & BSD-3-Clause & BSD-2-Clause & LGPL-2.0 & LGPL-2.1" -LIC_FILES_CHKSUM = " \ - file://Licenses/gpl-2.0.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - file://Licenses/bsd-2-clause.txt;md5=6a31f076f5773aabd8ff86191ad6fdd5 \ - file://Licenses/bsd-3-clause.txt;md5=4a1190eac56a9db675d58ebe86eaf50c \ - file://Licenses/lgpl-2.0.txt;md5=5f30f0716dfdd0d91eb439ebec522ec2 \ - file://Licenses/lgpl-2.1.txt;md5=4fbd65380cdd255951079008b364516c \ -" - -PV = "2014.01+fslgit" -INHIBIT_DEFAULT_DEPS = "1" -DEPENDS = "boot-format-native libgcc ${@base_contains('TCMODE', 'external-fsl', '', 'virtual/${TARGET_PREFIX}gcc', d)}" - -inherit deploy - -SRC_URI = "git://git.freescale.com/ppc/sdk/u-boot.git;nobranch=1" -SRCREV = "fe1d4f5739e752ad45ada6227a9fb19590af7194" - -python () { - if d.getVar("TCMODE", True) == "external-fsl": - return - - ml = d.getVar("MULTILIB_VARIANTS", True) - arch = d.getVar("OVERRIDES", True) - - if ("e5500-64b:" in arch or "e6500-64b:" in arch) and not "lib32" in ml: - raise bb.parse.SkipPackage("Building the u-boot for this arch requires multilib to be enabled") -} - -DEPENDS_append_e5500-64b = "${@base_contains('TCMODE', 'external-fsl', '', ' lib32-gcc-cross-powerpc lib32-libgcc', d)}" -PATH_append_e5500-64b = ":${STAGING_BINDIR_NATIVE}/powerpc${TARGET_VENDOR_virtclass-multilib-lib32}-${HOST_OS}/" -TOOLCHAIN_OPTIONS_append_e5500-64b = "${@base_contains('TCMODE', 'external-fsl', '', '/../lib32-${MACHINE}', d)}" -TARGET_VENDOR_virtclass-multilib-lib32 ?= "${@base_contains('TCMODE', 'external-fsl', '', '-${DISTRO}mllib32', d)}" -WRAP_TARGET_PREFIX_e5500-64b := "powerpc${TARGET_VENDOR_virtclass-multilib-lib32}-${HOST_OS}-" - -DEPENDS_append_e6500-64b = "${@base_contains('TCMODE', 'external-fsl', '', ' lib32-gcc-cross-powerpc lib32-libgcc', d)}" -PATH_append_e6500-64b = ":${STAGING_BINDIR_NATIVE}/powerpc${TARGET_VENDOR_virtclass-multilib-lib32}-${HOST_OS}/" -TOOLCHAIN_OPTIONS_append_e6500-64b = "${@base_contains('TCMODE', 'external-fsl', '', '/../lib32-${MACHINE}', d)}" -TARGET_VENDOR_virtclass-multilib-lib32 ?= "${@base_contains('TCMODE', 'external-fsl', '', '-${DISTRO}mllib32', d)}" -WRAP_TARGET_PREFIX_e6500-64b := "powerpc${TARGET_VENDOR_virtclass-multilib-lib32}-${HOST_OS}-" -WRAP_TARGET_PREFIX = "${TARGET_PREFIX}" - -PACKAGE_ARCH = "${MACHINE_ARCH}" - -UBOOT_LOCALVERSION = "${@d.getVar('SDK_VERSION', True).partition(' ')[0]}" - -USRC ?= "" -S = '${@base_conditional("USRC", "", "${WORKDIR}/git", "${USRC}", d)}' - -CROSS_COMPILE = '${@base_conditional("TCMODE", "external-fsl", "${TARGET_PREFIX}", "${WRAP_TARGET_PREFIX}", d)}' -EXTRA_OEMAKE = 'CROSS_COMPILE=${CROSS_COMPILE} CC="${CROSS_COMPILE}gcc ${TOOLCHAIN_OPTIONS}"' - -do_compile () { - unset LDFLAGS - unset CFLAGS - unset CPPFLAGS - - if [ ! -e ${B}/.scmversion -a ! -e ${S}/.scmversion ] - then - head=`git rev-parse --verify --short HEAD 2> /dev/null` - printf "%s%s%s" ${UBOOT_LOCALVERSION} +g $head > ${B}/.scmversion - printf "%s%s%s" ${UBOOT_LOCALVERSION} +g $head > ${S}/.scmversion - fi - - if [ "x${UBOOT_MACHINES}" = "x" ]; then - UBOOT_MACHINES=${UBOOT_MACHINE} - fi - - for board in ${UBOOT_MACHINES}; do - if ! grep -wq $board ${S}/boards.cfg;then - echo "WARNING: $board not supported in boards.cfg" - continue - fi - - oe_runmake O=${board} distclean - oe_runmake O=${board} ${board} - oe_runmake O=${board} all - - case "${board}" in - *SDCARD*) UBOOT_TARGET="u-boot-sd";; - *SPIFLASH*) UBOOT_TARGET="u-boot-spi";; - *NAND*) UBOOT_TARGET="u-boot-nand";; - *SRIO*) UBOOT_TARGET="u-boot-srio";; - *) UBOOT_TARGET="";; - esac - - # deal with sd/spi/nand/srio image - UBOOT_SOURCE=u-boot - if [ "x${UBOOT_TARGET}" != "x" ]; then - # some boards' nand image was named as u-boot-with-spl - if [ "${UBOOT_TARGET}" = "u-boot-nand" ];then - if echo $board |egrep -q "(P1010RDB|P1020RDB|P1021RDB|P2020RDB|P1022DS|BSC913|C293)";then - UBOOT_SOURCE=u-boot-with-spl - fi - elif [ "${UBOOT_TARGET}" = "u-boot-spi" ];then - if echo $board |egrep -q "(P1010RDB|P1020RDB|P1021RDB|P2020RDB|P1022DS)";then - UBOOT_SOURCE=u-boot-with-spl - fi - elif [ "${UBOOT_TARGET}" = "u-boot-sd" ];then - if echo $board |egrep -q "(P1010RDB|P1020RDB|P1021RDB|P2020RDB|P1022DS)";then - UBOOT_SOURCE=u-boot-with-spl - fi - fi - cp ${S}/${board}/${UBOOT_SOURCE}.bin ${S}/${board}/${UBOOT_TARGET}.bin - - # use boot-format to regenerate spi image if BOOTFORMAT_CONFIG is not empty - if [ "${UBOOT_TARGET}" = "u-boot-spi" ] && [ -n "${BOOTFORMAT_CONFIG}" ];then - ${STAGING_BINDIR_NATIVE}/boot_format \ - ${STAGING_DATADIR_NATIVE}/boot_format/${BOOTFORMAT_CONFIG} \ - ${S}/${board}/${UBOOT_SOURCE}.bin -spi ${S}/${board}/${UBOOT_TARGET}.bin - fi - fi - done -} - -do_install(){ - if [ "x${UBOOT_MACHINES}" = "x" ]; then - UBOOT_MACHINES=${UBOOT_MACHINE} - fi - - for board in ${UBOOT_MACHINES}; do - if ! grep -wq $board ${S}/boards.cfg;then - continue - fi - - case "${board}" in - *SDCARD*) UBOOT_TARGET="u-boot-sd";; - *SPIFLASH*) UBOOT_TARGET="u-boot-spi";; - *NAND*) UBOOT_TARGET="u-boot-nand";; - *SRIO*) UBOOT_TARGET="u-boot-srio";; - *) UBOOT_TARGET="u-boot";; - esac - - if [ -f ${S}/${board}/${UBOOT_TARGET}.bin ]; then - mkdir -p ${D}/boot/ - install ${S}/${board}/${UBOOT_TARGET}.bin ${D}/boot/${UBOOT_TARGET}-${board}-${PV}-${PR}.bin - ln -sf ${UBOOT_TARGET}-${board}-${PV}-${PR}.bin ${D}/boot/${UBOOT_TARGET}.bin - fi - done -} - -do_deploy(){ - if [ "x${UBOOT_MACHINES}" = "x" ]; then - UBOOT_MACHINES=${UBOOT_MACHINE} - fi - - for board in ${UBOOT_MACHINES}; do - if ! grep -wq $board ${S}/boards.cfg;then - continue - fi - - case "${board}" in - *SDCARD*) UBOOT_TARGET="u-boot-sd";; - *SPIFLASH*) UBOOT_TARGET="u-boot-spi";; - *NAND*) UBOOT_TARGET="u-boot-nand";; - *SRIO*) UBOOT_TARGET="u-boot-srio";; - *) UBOOT_TARGET="u-boot";; - esac - - if [ -f ${S}/${board}/${UBOOT_TARGET}.bin ]; then - mkdir -p ${DEPLOYDIR} - install ${S}/${board}/${UBOOT_TARGET}.bin ${DEPLOYDIR}/${UBOOT_TARGET}-${board}-${PV}-${PR}.bin - - cd ${DEPLOYDIR} - rm -f ${UBOOT_TARGET}-${board}.bin - ln -sf ${UBOOT_TARGET}-${board}-${PV}-${PR}.bin ${UBOOT_TARGET}-${board}.bin - fi - done -} -addtask deploy after do_install - -PACKAGES += "${PN}-images" -FILES_${PN}-images += "/boot" - -ALLOW_EMPTY_${PN} = "1" -- cgit v1.2.3-54-g00ecf From 7333942fb2503afc12847bb7ad8200280151bed3 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Fri, 11 Jul 2014 01:25:59 -0500 Subject: linux-qoriq-sdk: rename to linux-qoriq like linux-imx, linux-qoriq is supposed to be provided and supported by Freescale. it uses latest linux codes on git.freescale.com Signed-off-by: Ting Liu --- .../machine/include/qoriq-default-providers.inc | 2 +- .../recipes-kernel/linux/linux-qoriq-sdk.inc | 69 ---------------------- .../recipes-kernel/linux/linux-qoriq-sdk_3.12.bb | 7 --- meta-fsl-ppc/recipes-kernel/linux/linux-qoriq.inc | 69 ++++++++++++++++++++++ .../recipes-kernel/linux/linux-qoriq_3.12.bb | 7 +++ 5 files changed, 77 insertions(+), 77 deletions(-) delete mode 100644 meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc delete mode 100644 meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk_3.12.bb create mode 100644 meta-fsl-ppc/recipes-kernel/linux/linux-qoriq.inc create mode 100644 meta-fsl-ppc/recipes-kernel/linux/linux-qoriq_3.12.bb diff --git a/meta-fsl-ppc/conf/machine/include/qoriq-default-providers.inc b/meta-fsl-ppc/conf/machine/include/qoriq-default-providers.inc index b2c6c536..25197da5 100644 --- a/meta-fsl-ppc/conf/machine/include/qoriq-default-providers.inc +++ b/meta-fsl-ppc/conf/machine/include/qoriq-default-providers.inc @@ -1,3 +1,3 @@ -PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk" +PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq" PREFERRED_PROVIDER_u-boot ?= "u-boot-qoriq" diff --git a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc deleted file mode 100644 index 00fe526f..00000000 --- a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.inc +++ /dev/null @@ -1,69 +0,0 @@ -inherit kernel -require recipes-kernel/linux/linux-dtb.inc - -DESCRIPTION = "Linux kernel for Freescale platforms" -SECTION = "kernel" -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7" - -KSRC ?= "" -S = '${@base_conditional("KSRC", "", "${WORKDIR}/git", "${KSRC}", d)}' - -python () { - ma = d.getVar("DISTRO_FEATURES", True) - arch = d.getVar("OVERRIDES", True) - - # the : after the arch is to skip the message on 64b - if not "multiarch" in ma and ("e5500:" in arch or "e6500:" in arch): - raise bb.parse.SkipPackage("Building the kernel for this arch requires multiarch to be in DISTRO_FEATURES") - - promote_kernel = d.getVar('BUILD_64BIT_KERNEL') - - if promote_kernel == "1": - d.setVar('KERNEL_CC_append', ' -m64') - d.setVar('KERNEL_LD_append', ' -melf64ppc') - - error_qa = d.getVar('ERROR_QA', True) - if 'arch' in error_qa: - d.setVar('ERROR_QA', error_qa.replace(' arch', '')) - - all_qa = d.getVar('ALL_QA', True) - if 'arch' in all_qa: - d.setVar('ALL_QA', all_qa.replace(' arch', '')) -} - -DEPENDS_append = " libgcc" -KERNEL_CC_append = " ${TOOLCHAIN_OPTIONS}" -KERNEL_LD_append = " ${TOOLCHAIN_OPTIONS}" - -SCMVERSION ?= "y" -DELTA_KERNEL_DEFCONFIG ?= "" -do_configure_prepend() { - # copy desired defconfig so we pick it up for the real kernel_do_configure - cp ${KERNEL_DEFCONFIG} ${B}/.config - - # add config fragments - for deltacfg in ${DELTA_KERNEL_DEFCONFIG}; do - if [ -f "${deltacfg}" ]; then - ${S}/scripts/kconfig/merge_config.sh -m .config ${deltacfg} - elif [ -f "${S}/arch/powerpc/configs/${deltacfg}" ]; then - ${S}/scripts/kconfig/merge_config.sh -m .config \ - ${S}/arch/powerpc/configs/${deltacfg} - fi - done - - #add git revision to the local version - if [ "${SCMVERSION}" = "y" ]; then - # append sdk version if SDK_VERSION is defined - sdkversion='' - if [ -n "${SDK_VERSION}" ]; then - sdkversion="-${SDK_VERSION}" - fi - head=`git rev-parse --verify --short HEAD 2> /dev/null` - printf "%s%s%s" $sdkversion +g $head > ${S}/.scmversion - fi -} - -# make everything compatible for the time being -COMPATIBLE_MACHINE_$MACHINE = "$MACHINE" - diff --git a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk_3.12.bb b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk_3.12.bb deleted file mode 100644 index 881180a5..00000000 --- a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk_3.12.bb +++ /dev/null @@ -1,7 +0,0 @@ -require recipes-kernel/linux/linux-qoriq-sdk.inc - -SRC_URI = "git://git.freescale.com/ppc/sdk/linux.git;nobranch=1 \ - file://powerpc-Fix-64-bit-builds-with-binutils-2.24.patch \ -" -SRCREV = "c29fe1a733308cbe592b3af054a97be1b91cf2dd" - diff --git a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq.inc b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq.inc new file mode 100644 index 00000000..00fe526f --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq.inc @@ -0,0 +1,69 @@ +inherit kernel +require recipes-kernel/linux/linux-dtb.inc + +DESCRIPTION = "Linux kernel for Freescale platforms" +SECTION = "kernel" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7" + +KSRC ?= "" +S = '${@base_conditional("KSRC", "", "${WORKDIR}/git", "${KSRC}", d)}' + +python () { + ma = d.getVar("DISTRO_FEATURES", True) + arch = d.getVar("OVERRIDES", True) + + # the : after the arch is to skip the message on 64b + if not "multiarch" in ma and ("e5500:" in arch or "e6500:" in arch): + raise bb.parse.SkipPackage("Building the kernel for this arch requires multiarch to be in DISTRO_FEATURES") + + promote_kernel = d.getVar('BUILD_64BIT_KERNEL') + + if promote_kernel == "1": + d.setVar('KERNEL_CC_append', ' -m64') + d.setVar('KERNEL_LD_append', ' -melf64ppc') + + error_qa = d.getVar('ERROR_QA', True) + if 'arch' in error_qa: + d.setVar('ERROR_QA', error_qa.replace(' arch', '')) + + all_qa = d.getVar('ALL_QA', True) + if 'arch' in all_qa: + d.setVar('ALL_QA', all_qa.replace(' arch', '')) +} + +DEPENDS_append = " libgcc" +KERNEL_CC_append = " ${TOOLCHAIN_OPTIONS}" +KERNEL_LD_append = " ${TOOLCHAIN_OPTIONS}" + +SCMVERSION ?= "y" +DELTA_KERNEL_DEFCONFIG ?= "" +do_configure_prepend() { + # copy desired defconfig so we pick it up for the real kernel_do_configure + cp ${KERNEL_DEFCONFIG} ${B}/.config + + # add config fragments + for deltacfg in ${DELTA_KERNEL_DEFCONFIG}; do + if [ -f "${deltacfg}" ]; then + ${S}/scripts/kconfig/merge_config.sh -m .config ${deltacfg} + elif [ -f "${S}/arch/powerpc/configs/${deltacfg}" ]; then + ${S}/scripts/kconfig/merge_config.sh -m .config \ + ${S}/arch/powerpc/configs/${deltacfg} + fi + done + + #add git revision to the local version + if [ "${SCMVERSION}" = "y" ]; then + # append sdk version if SDK_VERSION is defined + sdkversion='' + if [ -n "${SDK_VERSION}" ]; then + sdkversion="-${SDK_VERSION}" + fi + head=`git rev-parse --verify --short HEAD 2> /dev/null` + printf "%s%s%s" $sdkversion +g $head > ${S}/.scmversion + fi +} + +# make everything compatible for the time being +COMPATIBLE_MACHINE_$MACHINE = "$MACHINE" + diff --git a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq_3.12.bb b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq_3.12.bb new file mode 100644 index 00000000..5d9a1f0d --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq_3.12.bb @@ -0,0 +1,7 @@ +require recipes-kernel/linux/linux-qoriq.inc + +SRC_URI = "git://git.freescale.com/ppc/sdk/linux.git;nobranch=1 \ + file://powerpc-Fix-64-bit-builds-with-binutils-2.24.patch \ +" +SRCREV = "c29fe1a733308cbe592b3af054a97be1b91cf2dd" + -- cgit v1.2.3-54-g00ecf From 424f1e55060fed7126bd0ca68a83df984583c9b3 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Fri, 11 Jul 2014 01:52:40 -0500 Subject: remove fslmachine MACHINEOVERRIDES usage fslmachine is too generic, use qoriq-ppc instead. Signed-off-by: Ting Liu --- meta-fsl-ppc/conf/machine/include/e500mc.inc | 2 +- meta-fsl-ppc/conf/machine/include/e500v2.inc | 2 +- meta-fsl-ppc/conf/machine/include/e5500-64b.inc | 2 +- meta-fsl-ppc/conf/machine/include/e5500.inc | 2 +- meta-fsl-ppc/conf/machine/include/e6500-64b.inc | 2 +- meta-fsl-ppc/conf/machine/include/e6500.inc | 2 +- meta-fsl-ppc/recipes-bsp/rcw/rcw_git.bb | 2 +- meta-fsl-ppc/recipes-devtools/qemu/qemu_fslgit.bb | 2 +- meta-fsl-ppc/recipes-dpaa/fmlib/fmlib_git.bb | 2 +- meta-fsl-ppc/recipes-dpaa/usdpaa/usdpaa_git.bb | 2 +- meta-fsl-ppc/recipes-extended/testfloat/testfloat_2a.bb | 2 +- meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl.inc | 6 +++--- meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-module_1.6.bbappend | 2 +- meta-fsl-ppc/recipes-virtualization/hv-cfg/hv-cfg_git.bb | 2 +- meta-fsl-ppc/recipes-virtualization/hypervisor/hypervisor_git.bb | 2 +- 15 files changed, 17 insertions(+), 17 deletions(-) diff --git a/meta-fsl-ppc/conf/machine/include/e500mc.inc b/meta-fsl-ppc/conf/machine/include/e500mc.inc index 09b5c69e..5871104d 100644 --- a/meta-fsl-ppc/conf/machine/include/e500mc.inc +++ b/meta-fsl-ppc/conf/machine/include/e500mc.inc @@ -3,4 +3,4 @@ TARGET_FPU = "hard" require conf/machine/include/tune-ppce500mc.inc require conf/machine/include/qoriq-base.inc -MACHINEOVERRIDES .= ":e500mc:fslmachine" +MACHINEOVERRIDES .= ":e500mc" diff --git a/meta-fsl-ppc/conf/machine/include/e500v2.inc b/meta-fsl-ppc/conf/machine/include/e500v2.inc index 178de188..a9372549 100644 --- a/meta-fsl-ppc/conf/machine/include/e500v2.inc +++ b/meta-fsl-ppc/conf/machine/include/e500v2.inc @@ -1,4 +1,4 @@ require conf/machine/include/tune-ppce500v2.inc require conf/machine/include/qoriq-base.inc -MACHINEOVERRIDES .= ":e500v2:fslmachine" +MACHINEOVERRIDES .= ":e500v2" diff --git a/meta-fsl-ppc/conf/machine/include/e5500-64b.inc b/meta-fsl-ppc/conf/machine/include/e5500-64b.inc index 47a9ad7c..5c758838 100644 --- a/meta-fsl-ppc/conf/machine/include/e5500-64b.inc +++ b/meta-fsl-ppc/conf/machine/include/e5500-64b.inc @@ -4,4 +4,4 @@ DEFAULTTUNE ?= "ppc64e5500" require conf/machine/include/tune-ppce5500.inc require conf/machine/include/qoriq-base.inc -MACHINEOVERRIDES .= ":e5500-64b:fslmachine" +MACHINEOVERRIDES .= ":e5500-64b" diff --git a/meta-fsl-ppc/conf/machine/include/e5500.inc b/meta-fsl-ppc/conf/machine/include/e5500.inc index e6f0400a..88f6d06e 100644 --- a/meta-fsl-ppc/conf/machine/include/e5500.inc +++ b/meta-fsl-ppc/conf/machine/include/e5500.inc @@ -3,4 +3,4 @@ TARGET_FPU = "hard" require conf/machine/include/tune-ppce5500.inc require conf/machine/include/qoriq-base.inc -MACHINEOVERRIDES .= ":e5500:fslmachine" +MACHINEOVERRIDES .= ":e5500" diff --git a/meta-fsl-ppc/conf/machine/include/e6500-64b.inc b/meta-fsl-ppc/conf/machine/include/e6500-64b.inc index 0770cc37..5e533e01 100644 --- a/meta-fsl-ppc/conf/machine/include/e6500-64b.inc +++ b/meta-fsl-ppc/conf/machine/include/e6500-64b.inc @@ -4,4 +4,4 @@ DEFAULTTUNE ?= "ppc64e6500" require conf/machine/include/tune-ppce6500.inc require conf/machine/include/qoriq-base.inc -MACHINEOVERRIDES .= ":e6500-64b:fslmachine" +MACHINEOVERRIDES .= ":e6500-64b" diff --git a/meta-fsl-ppc/conf/machine/include/e6500.inc b/meta-fsl-ppc/conf/machine/include/e6500.inc index 323e420d..5ebeccf6 100644 --- a/meta-fsl-ppc/conf/machine/include/e6500.inc +++ b/meta-fsl-ppc/conf/machine/include/e6500.inc @@ -3,7 +3,7 @@ TARGET_FPU = "hard" require conf/machine/include/tune-ppce6500.inc require conf/machine/include/qoriq-base.inc -MACHINEOVERRIDES .= ":e6500:fslmachine" +MACHINEOVERRIDES .= ":e6500" BUILD_64BIT_KERNEL = "1" diff --git a/meta-fsl-ppc/recipes-bsp/rcw/rcw_git.bb b/meta-fsl-ppc/recipes-bsp/rcw/rcw_git.bb index 5e751b8c..1bc60d21 100644 --- a/meta-fsl-ppc/recipes-bsp/rcw/rcw_git.bb +++ b/meta-fsl-ppc/recipes-bsp/rcw/rcw_git.bb @@ -42,6 +42,6 @@ addtask deploy after do_install PACKAGES += "${PN}-image" FILES_${PN}-image += "/boot" -COMPATIBLE_HOST_fslmachine = ".*" +COMPATIBLE_HOST_qoriq-ppc = ".*" COMPATIBLE_HOST ?= "(none)" ALLOW_EMPTY_${PN} = "1" diff --git a/meta-fsl-ppc/recipes-devtools/qemu/qemu_fslgit.bb b/meta-fsl-ppc/recipes-devtools/qemu/qemu_fslgit.bb index 30f27d60..88e78b58 100644 --- a/meta-fsl-ppc/recipes-devtools/qemu/qemu_fslgit.bb +++ b/meta-fsl-ppc/recipes-devtools/qemu/qemu_fslgit.bb @@ -46,4 +46,4 @@ INSANE_SKIP_${PN} += "dev-deps" # the package get built. COMPATIBLE_HOST would not work # because it was too generic COMPATIBLE_MACHINE = "a^" -COMPATIBLE_MACHINE_libc-glibc_fslmachine = ".*" +COMPATIBLE_MACHINE_libc-glibc_qoriq-ppc = ".*" diff --git a/meta-fsl-ppc/recipes-dpaa/fmlib/fmlib_git.bb b/meta-fsl-ppc/recipes-dpaa/fmlib/fmlib_git.bb index 04ca515a..d59d6aca 100644 --- a/meta-fsl-ppc/recipes-dpaa/fmlib/fmlib_git.bb +++ b/meta-fsl-ppc/recipes-dpaa/fmlib/fmlib_git.bb @@ -16,7 +16,7 @@ S = "${WORKDIR}/git" TARGET_ARCH_FMLIB = "${DEFAULTTUNE}" TARGET_ARCH_FMLIB_e5500 = "ppc32e5500" TARGET_ARCH_FMLIB_e6500 = "ppc32e6500" -COMPATIBLE_HOST_fslmachine = ".*" +COMPATIBLE_HOST_qoriq-ppc = ".*" COMPATIBLE_HOST ?= "(none)" EXTRA_OEMAKE = "DESTDIR=${D} PREFIX=${prefix} LIB_DEST_DIR=${libdir} \ diff --git a/meta-fsl-ppc/recipes-dpaa/usdpaa/usdpaa_git.bb b/meta-fsl-ppc/recipes-dpaa/usdpaa/usdpaa_git.bb index 9c7e3882..78d42535 100644 --- a/meta-fsl-ppc/recipes-dpaa/usdpaa/usdpaa_git.bb +++ b/meta-fsl-ppc/recipes-dpaa/usdpaa/usdpaa_git.bb @@ -71,6 +71,6 @@ do_install () { PARALLEL_MAKE_pn-${PN} = "" FILES_${PN} += "/root/SOURCE_THIS /usr/etc/" -COMPATIBLE_HOST_fslmachine = ".*" +COMPATIBLE_HOST_qoriq-ppc = ".*" COMPATIBLE_HOST ?= "(none)" diff --git a/meta-fsl-ppc/recipes-extended/testfloat/testfloat_2a.bb b/meta-fsl-ppc/recipes-extended/testfloat/testfloat_2a.bb index fb89e263..800cef3d 100644 --- a/meta-fsl-ppc/recipes-extended/testfloat/testfloat_2a.bb +++ b/meta-fsl-ppc/recipes-extended/testfloat/testfloat_2a.bb @@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = "file://testfloat/testfloat.txt;beginline=87;endline=95;md5=b SRC_URI = " http://www.jhauser.us/arithmetic/TestFloat-2a.tar.Z;name=TestFloat \ http://www.jhauser.us/arithmetic/SoftFloat-2b.tar.Z;name=SoftFloat \ " -SRC_URI_append_fslmachine = " file://SoftFloat-powerpc-1.patch \ +SRC_URI_append_qoriq-ppc = " file://SoftFloat-powerpc-1.patch \ file://TestFloat-powerpc-E500v2-SPE-1.patch \ file://Yocto-replace-COMPILE_PREFIX-gcc.patch \ " diff --git a/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl.inc b/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl.inc index 774ef102..3bdd3018 100644 --- a/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl.inc +++ b/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl.inc @@ -1,6 +1,6 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/cryptodev-fsl" -SRC_URI_fslmachine = "git://github.com/nmav/cryptodev-linux.git \ +SRC_URI_qoriq-ppc = "git://github.com/nmav/cryptodev-linux.git \ file://0001-add-support-for-composite-TLS-SHA1-AES-algorithm-off.patch \ file://0002-use-function-local-storage-for-cipher-and-hmac-keys.patch \ file://0003-Add-support-for-aead-keys-for-composite-algorithms.patch \ @@ -18,7 +18,7 @@ SRC_URI_fslmachine = "git://github.com/nmav/cryptodev-linux.git \ file://0015-Add-RSA-Key-generation-offloading.patch \ file://0016-Fixed-compilation-error-of-openssl-with-fsl-cryptode.patch \ " -SRCREV_fslmachine = "e8609a408d40c83ae8fc11bbe9a7b3847612669b" +SRCREV_qoriq-ppc = "e8609a408d40c83ae8fc11bbe9a7b3847612669b" -S_fslmachine = "${WORKDIR}/git" +S_qoriq-ppc = "${WORKDIR}/git" diff --git a/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-module_1.6.bbappend b/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-module_1.6.bbappend index 1dbf3b64..345a09d4 100644 --- a/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-module_1.6.bbappend +++ b/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-module_1.6.bbappend @@ -2,7 +2,7 @@ require recipes-kernel/cryptodev/cryptodev-fsl.inc inherit qoriq_build_64bit_kernel -do_install_append_fslmachine () { +do_install_append_qoriq-ppc () { rm -fr ${D}/usr } diff --git a/meta-fsl-ppc/recipes-virtualization/hv-cfg/hv-cfg_git.bb b/meta-fsl-ppc/recipes-virtualization/hv-cfg/hv-cfg_git.bb index 304b78f8..0fc83e09 100644 --- a/meta-fsl-ppc/recipes-virtualization/hv-cfg/hv-cfg_git.bb +++ b/meta-fsl-ppc/recipes-virtualization/hv-cfg/hv-cfg_git.bb @@ -41,6 +41,6 @@ addtask deploy after do_install PACKAGES += "${PN}-image" FILES_${PN}-image += "/boot" -COMPATIBLE_HOST_fslmachine = ".*" +COMPATIBLE_HOST_qoriq-ppc = ".*" COMPATIBLE_HOST ?= "(none)" ALLOW_EMPTY_${PN} = "1" diff --git a/meta-fsl-ppc/recipes-virtualization/hypervisor/hypervisor_git.bb b/meta-fsl-ppc/recipes-virtualization/hypervisor/hypervisor_git.bb index 4add9f30..c2a5d2c0 100644 --- a/meta-fsl-ppc/recipes-virtualization/hypervisor/hypervisor_git.bb +++ b/meta-fsl-ppc/recipes-virtualization/hypervisor/hypervisor_git.bb @@ -36,7 +36,7 @@ EXTRA_OEMAKE = 'CROSS_COMPILE=${TARGET_PREFIX} CC="${TARGET_PREFIX}gcc ${TOOLCHA DEFCONFIG = "defconfig" DEFCONFIG_powerpc64 = "64bit_defconfig" -COMPATIBLE_HOST_fslmachine = ".*" +COMPATIBLE_HOST_qoriq-ppc = ".*" COMPATIBLE_HOST ?= "(none)" inherit cml1 -- cgit v1.2.3-54-g00ecf From ecc1422a381bf55e49b6ce2ed1abf47bd626e9fc Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Fri, 11 Jul 2014 02:24:40 -0500 Subject: add u-boot as EXTRA_IMAGEDEPENDS * As the doc said: EXTRA_IMAGEDEPENDS = "A list of recipes to build that do not provide packages for installing into the root filesystem." MACHINE_EXTRA_RRECOMMENDS = "A list of machine-specific packages to install as part of the image being built" * use += for MACHINE_EXTRA_RRECOMMENDS definition Signed-off-by: Ting Liu --- meta-fsl-ppc/conf/machine/include/qoriq-default-settings.inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/meta-fsl-ppc/conf/machine/include/qoriq-default-settings.inc b/meta-fsl-ppc/conf/machine/include/qoriq-default-settings.inc index a4fc0ec5..59241e24 100644 --- a/meta-fsl-ppc/conf/machine/include/qoriq-default-settings.inc +++ b/meta-fsl-ppc/conf/machine/include/qoriq-default-settings.inc @@ -1,5 +1,6 @@ MACHINE_FEATURES = "keyboard pci ext2 ext3 serial" -MACHINE_EXTRA_RRECOMMENDS = "u-boot udev-extraconf kernel-modules" +MACHINE_EXTRA_RRECOMMENDS += "udev-extraconf kernel-modules" +EXTRA_IMAGEDEPENDS += "u-boot" KERNEL_IMAGETYPE ?= "uImage" # disable the images below for now -- cgit v1.2.3-54-g00ecf From 1d0e48dfb48d2c0e4e55473317bb26ff0801fb58 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Fri, 11 Jul 2014 02:30:00 -0500 Subject: set IMAGE_CLASSES = "image_types_uboot" as defaut Signed-off-by: Ting Liu --- meta-fsl-ppc/conf/machine/include/qoriq-default-settings.inc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/meta-fsl-ppc/conf/machine/include/qoriq-default-settings.inc b/meta-fsl-ppc/conf/machine/include/qoriq-default-settings.inc index 59241e24..e5750fff 100644 --- a/meta-fsl-ppc/conf/machine/include/qoriq-default-settings.inc +++ b/meta-fsl-ppc/conf/machine/include/qoriq-default-settings.inc @@ -1,5 +1,7 @@ MACHINE_FEATURES = "keyboard pci ext2 ext3 serial" MACHINE_EXTRA_RRECOMMENDS += "udev-extraconf kernel-modules" + +IMAGE_CLASSES += "image_types_uboot" EXTRA_IMAGEDEPENDS += "u-boot" KERNEL_IMAGETYPE ?= "uImage" -- cgit v1.2.3-54-g00ecf From 2e419bc61584edb7160e1f11bbd5ff35f69861da Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Fri, 11 Jul 2014 02:36:44 -0500 Subject: add default setting for MKUBIFS_ARGS and UBINIZE_ARGS Signed-off-by: Ting Liu --- meta-fsl-ppc/conf/machine/include/qoriq-default-settings.inc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/meta-fsl-ppc/conf/machine/include/qoriq-default-settings.inc b/meta-fsl-ppc/conf/machine/include/qoriq-default-settings.inc index e5750fff..4c8b8424 100644 --- a/meta-fsl-ppc/conf/machine/include/qoriq-default-settings.inc +++ b/meta-fsl-ppc/conf/machine/include/qoriq-default-settings.inc @@ -16,3 +16,6 @@ SERIAL_CONSOLES_CHECK ?= "${SERIAL_CONSOLES}" USE_VT = "0" +MKUBIFS_ARGS ??= "-m 512 -e 15360 -c 3600" +UBINIZE_ARGS ??= "-m 512 -p 16KiB -s 512" + -- cgit v1.2.3-54-g00ecf From 4f980553868ff8f99acf61eba3a1c578c7a1c02b Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Fri, 11 Jul 2014 02:49:10 -0500 Subject: inherit qoriq_build_64bit_kernel for kernel/module recipes ppce6500 is a specific core which only support 64bit kernel, the duplicate hack codes were packaged into qoriq_build_64bit_kernel.bbclass, use it. Signed-off-by: Ting Liu --- meta-fsl-ppc/recipes-bsp/ipc/ipc-modules.inc | 20 +---------------- meta-fsl-ppc/recipes-kernel/asf/asf_git.bb | 21 +----------------- meta-fsl-ppc/recipes-kernel/ceetm/ceetm_git.bb | 21 +----------------- meta-fsl-ppc/recipes-kernel/linux/linux-qoriq.inc | 25 +--------------------- .../recipes-kernel/lttng/lttng-modules_%.bbappend | 18 +--------------- .../recipes-kernel/pkc-host/pkc-host_git.bb | 21 +----------------- .../recipes-kernel/qoriq-debug/qoriq-debug_git.bb | 21 +----------------- .../recipes-kernel/skmm-host/skmm-host_git.bb | 21 +----------------- 8 files changed, 8 insertions(+), 160 deletions(-) diff --git a/meta-fsl-ppc/recipes-bsp/ipc/ipc-modules.inc b/meta-fsl-ppc/recipes-bsp/ipc/ipc-modules.inc index 015a91bc..3d7dfa66 100644 --- a/meta-fsl-ppc/recipes-bsp/ipc/ipc-modules.inc +++ b/meta-fsl-ppc/recipes-bsp/ipc/ipc-modules.inc @@ -5,27 +5,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=fa38cd73d71527dc6efb546474f64d10" require ipc.inc -inherit module +inherit module qoriq_build_64bit_kernel S = "${WORKDIR}/git" -python () { - ma = d.getVar("DISTRO_FEATURES", True) - arch = d.getVar("OVERRIDES", True) - - # the : after the arch is to skip the message on 64b - if not "multiarch" in ma and ("e5500:" in arch or "e6500:" in arch): - raise bb.parse.SkipPackage("Building the kernel for this arch requires multiarch to be in DISTRO_FEATURES") - - promote_kernel = d.getVar('BUILD_64BIT_KERNEL') - - if promote_kernel == "1": - d.setVar('KERNEL_CC_append', ' -m64') - d.setVar('KERNEL_LD_append', ' -melf64ppc') - - error_qa = d.getVar('ERROR_QA', True) - if 'arch' in error_qa: - d.setVar('ERROR_QA', error_qa.replace(' arch', '')) -} do_compile_prepend () { cd ${S}/kernel diff --git a/meta-fsl-ppc/recipes-kernel/asf/asf_git.bb b/meta-fsl-ppc/recipes-kernel/asf/asf_git.bb index 743ce62e..9597257c 100644 --- a/meta-fsl-ppc/recipes-kernel/asf/asf_git.bb +++ b/meta-fsl-ppc/recipes-kernel/asf/asf_git.bb @@ -9,32 +9,13 @@ SRCREV = "f107bc7dac7fe74d765dc09f66dca84951921d2c" DEPENDS="virtual/kernel" RDEPENDS_${PN} += "ipsec-tools" -inherit module +inherit module qoriq_build_64bit_kernel S = "${WORKDIR}/git/asfmodule" EXTRA_OEMAKE = "CROSS_COMPILE=${TARGET_PREFIX}" export KERNEL_PATH = "${STAGING_KERNEL_DIR}" -python () { - ma = d.getVar("DISTRO_FEATURES", True) - arch = d.getVar("OVERRIDES", True) - - # the : after the arch is to skip the message on 64b - if not "multiarch" in ma and "e6500:" in arch: - raise bb.parse.SkipPackage("Building the kernel for this arch requires multiarch to be in DISTRO_FEATURES") - - promote_kernel = d.getVar('BUILD_64BIT_KERNEL') - - if promote_kernel == "1": - d.setVar('KERNEL_CC_append', ' -m64') - d.setVar('KERNEL_LD_append', ' -melf64ppc') - - error_qa = d.getVar('ERROR_QA', True) - if 'arch' in error_qa: - d.setVar('ERROR_QA', error_qa.replace(' arch', '')) -} - do_install(){ mkdir -p ${D}/usr/driver/asf cp -rf ${S}/bin/full ${D}/usr/driver/asf diff --git a/meta-fsl-ppc/recipes-kernel/ceetm/ceetm_git.bb b/meta-fsl-ppc/recipes-kernel/ceetm/ceetm_git.bb index 7620cdbc..266261eb 100644 --- a/meta-fsl-ppc/recipes-kernel/ceetm/ceetm_git.bb +++ b/meta-fsl-ppc/recipes-kernel/ceetm/ceetm_git.bb @@ -4,7 +4,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b5881ecf398da8a03a3f4c501e29d287" DEPENDS="virtual/kernel" -inherit module +inherit module qoriq_build_64bit_kernel SRC_URI = "git://git.freescale.com/ppc/sdk/ceetm.git;nobranch=1" SRCREV = "ecf55c9ca0cd42a212653e1f99c19cd611e3a008" @@ -14,25 +14,6 @@ S = "${WORKDIR}/git" EXTRA_OEMAKE = "CROSS_COMPILE=${TARGET_PREFIX} SYSROOT=${STAGING_DIR_TARGET}" export KERNEL_PATH = "${STAGING_KERNEL_DIR}" -python () { - ma = d.getVar("DISTRO_FEATURES", True) - arch = d.getVar("OVERRIDES", True) - - # the : after the arch is to skip the message on 64b - if not "multiarch" in ma and "e6500:" in arch: - raise bb.parse.SkipPackage("Building the kernel for this arch requires multiarch to be in DISTRO_FEATURES") - - promote_kernel = d.getVar('BUILD_64BIT_KERNEL') - - if promote_kernel == "1": - d.setVar('KERNEL_CC_append', ' -m64') - d.setVar('KERNEL_LD_append', ' -melf64ppc') - - error_qa = d.getVar('ERROR_QA', True) - if 'arch' in error_qa: - d.setVar('ERROR_QA', error_qa.replace(' arch', '')) -} - do_install(){ mkdir -p ${D}/usr/driver/ceetm mkdir -p ${D}/${libdir}/tc diff --git a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq.inc b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq.inc index 00fe526f..9e463ddb 100644 --- a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq.inc +++ b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq.inc @@ -1,4 +1,4 @@ -inherit kernel +inherit kernel qoriq_build_64bit_kernel require recipes-kernel/linux/linux-dtb.inc DESCRIPTION = "Linux kernel for Freescale platforms" @@ -9,29 +9,6 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7" KSRC ?= "" S = '${@base_conditional("KSRC", "", "${WORKDIR}/git", "${KSRC}", d)}' -python () { - ma = d.getVar("DISTRO_FEATURES", True) - arch = d.getVar("OVERRIDES", True) - - # the : after the arch is to skip the message on 64b - if not "multiarch" in ma and ("e5500:" in arch or "e6500:" in arch): - raise bb.parse.SkipPackage("Building the kernel for this arch requires multiarch to be in DISTRO_FEATURES") - - promote_kernel = d.getVar('BUILD_64BIT_KERNEL') - - if promote_kernel == "1": - d.setVar('KERNEL_CC_append', ' -m64') - d.setVar('KERNEL_LD_append', ' -melf64ppc') - - error_qa = d.getVar('ERROR_QA', True) - if 'arch' in error_qa: - d.setVar('ERROR_QA', error_qa.replace(' arch', '')) - - all_qa = d.getVar('ALL_QA', True) - if 'arch' in all_qa: - d.setVar('ALL_QA', all_qa.replace(' arch', '')) -} - DEPENDS_append = " libgcc" KERNEL_CC_append = " ${TOOLCHAIN_OPTIONS}" KERNEL_LD_append = " ${TOOLCHAIN_OPTIONS}" diff --git a/meta-fsl-ppc/recipes-kernel/lttng/lttng-modules_%.bbappend b/meta-fsl-ppc/recipes-kernel/lttng/lttng-modules_%.bbappend index 5415f16e..5ff765d4 100644 --- a/meta-fsl-ppc/recipes-kernel/lttng/lttng-modules_%.bbappend +++ b/meta-fsl-ppc/recipes-kernel/lttng/lttng-modules_%.bbappend @@ -1,18 +1,2 @@ -inherit distro_features_check +inherit qoriq_build_64bit_kernel -REQUIRED_DISTRO_FEATURES_append_e6500 ?= "multiarch" - -python () { - - promote_kernel = d.getVar('BUILD_64BIT_KERNEL') - - if promote_kernel == "1": - d.appendVar('KERNEL_CC', ' -m64') - d.appendVar('KERNEL_LD', ' -melf64ppc') - - - error_qa = d.getVar('ERROR_QA', True) - if 'arch' in error_qa: - d.setVar('ERROR_QA', error_qa.replace(' arch', '')) - -} diff --git a/meta-fsl-ppc/recipes-kernel/pkc-host/pkc-host_git.bb b/meta-fsl-ppc/recipes-kernel/pkc-host/pkc-host_git.bb index 9535005d..2e579c1e 100644 --- a/meta-fsl-ppc/recipes-kernel/pkc-host/pkc-host_git.bb +++ b/meta-fsl-ppc/recipes-kernel/pkc-host/pkc-host_git.bb @@ -3,7 +3,7 @@ SECTION = "pkc-host" LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://Makefile;endline=30;md5=6a26ed8e76a8ea2e019c525369ed0f03" -inherit module +inherit module qoriq_build_64bit_kernel SRC_URI = "git://git.freescale.com/ppc/sdk/pkc-host.git;nobranch=1" SRCREV = "cae512c94e2a26cc6b0d6393d307cdea2d7282c9" @@ -12,25 +12,6 @@ S = "${WORKDIR}/git" EXTRA_OEMAKE='KERNEL_DIR="${STAGING_KERNEL_DIR}" PREFIX="${D}"' -python () { - ma = d.getVar("DISTRO_FEATURES", True) - arch = d.getVar("OVERRIDES", True) - - # the : after the arch is to skip the message on 64b - if not "multiarch" in ma and ("e5500:" in arch or "e6500:" in arch): - raise bb.parse.SkipPackage("Building the kernel for this arch requires multiarch to be in DISTRO_FEATURES") - - promote_kernel = d.getVar('BUILD_64BIT_KERNEL') - - if promote_kernel == "1": - d.setVar('KERNEL_CC_append', ' -m64') - d.setVar('KERNEL_LD_append', ' -melf64ppc') - - error_qa = d.getVar('ERROR_QA', True) - if 'arch' in error_qa: - d.setVar('ERROR_QA', error_qa.replace(' arch', '')) -} - do_install() { install -d ${D}/lib/modules/c2x0 install -d ${D}/etc/crypto diff --git a/meta-fsl-ppc/recipes-kernel/qoriq-debug/qoriq-debug_git.bb b/meta-fsl-ppc/recipes-kernel/qoriq-debug/qoriq-debug_git.bb index 5dd2468d..c08f057f 100644 --- a/meta-fsl-ppc/recipes-kernel/qoriq-debug/qoriq-debug_git.bb +++ b/meta-fsl-ppc/recipes-kernel/qoriq-debug/qoriq-debug_git.bb @@ -3,7 +3,7 @@ SECTION = "qoriq-debug" LICENSE = "GPLv2+" LIC_FILES_CHKSUM = "file://COPYING;md5=e29234dd5d40dc352cc60cc0c93437ba" -inherit module autotools-brokensep +inherit module autotools-brokensep qoriq_build_64bit_kernel SRC_URI = "git://git.freescale.com/ppc/sdk/qoriq-debug.git;nobranch=1" SRCREV = "20615c1ea332102635f8314cee5787c48c1a4254" @@ -13,22 +13,3 @@ S = "${WORKDIR}/git" EXTRA_OECONF += "--with-linux=${STAGING_KERNEL_DIR}" EXTRA_OEMAKE += 'SYSROOT="${D}"' -python () { - ma = d.getVar("DISTRO_FEATURES", True) - arch = d.getVar("OVERRIDES", True) - - # the : after the arch is to skip the message on 64b - if not "multiarch" in ma and ("e5500:" in arch or "e6500:" in arch): - raise bb.parse.SkipPackage("Building the kernel for this arch requires multiarch to be in DISTRO_FEATURES") - - promote_kernel = d.getVar('BUILD_64BIT_KERNEL') - - if promote_kernel == "1": - d.setVar('KERNEL_CC_append', ' -m64') - d.setVar('KERNEL_LD_append', ' -melf64ppc') - - error_qa = d.getVar('ERROR_QA', True) - if 'arch' in error_qa: - d.setVar('ERROR_QA', error_qa.replace(' arch', '')) -} - diff --git a/meta-fsl-ppc/recipes-kernel/skmm-host/skmm-host_git.bb b/meta-fsl-ppc/recipes-kernel/skmm-host/skmm-host_git.bb index 9ce8a1dd..a1c43f35 100644 --- a/meta-fsl-ppc/recipes-kernel/skmm-host/skmm-host_git.bb +++ b/meta-fsl-ppc/recipes-kernel/skmm-host/skmm-host_git.bb @@ -3,7 +3,7 @@ SECTION = "c293-skmm-host" LICENSE = "Freescale-EULA" LIC_FILES_CHKSUM = "file://Makefile;endline=7;md5=edffaac1da9e809ade0d2fcfcc18d8df" -inherit module +inherit module qoriq_build_64bit_kernel SRC_URI = "git://git.freescale.com/ppc/sdk/skmm-host.git;nobranch=1" SRCREV = "97c9241a359edccdf8913cb9accbfe4ceb511523" @@ -12,23 +12,4 @@ S = "${WORKDIR}/git" EXTRA_OEMAKE='KERNEL_DIR="${STAGING_KERNEL_DIR}" PREFIX="${D}"' -python () { - ma = d.getVar("DISTRO_FEATURES", True) - arch = d.getVar("OVERRIDES", True) - - # the : after the arch is to skip the message on 64b - if not "multiarch" in ma and ("e5500:" in arch or "e6500:" in arch): - raise bb.parse.SkipPackage("Building the kernel for this arch requires multiarch to be in DISTRO_FEATURES") - - promote_kernel = d.getVar('BUILD_64BIT_KERNEL') - - if promote_kernel == "1": - d.setVar('KERNEL_CC_append', ' -m64') - d.setVar('KERNEL_LD_append', ' -melf64ppc') - - error_qa = d.getVar('ERROR_QA', True) - if 'arch' in error_qa: - d.setVar('ERROR_QA', error_qa.replace(' arch', '')) -} - FILES_${PN} += "/etc/skmm/" -- cgit v1.2.3-54-g00ecf From 3148502d291236c928299f8bf20644f6c1c7852c Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Fri, 11 Jul 2014 02:52:16 -0500 Subject: ipc-modules: move to recipes-kernel/ Signed-off-by: Ting Liu --- .../recipes-bsp/ipc/ipc-modules-multi_git.bb | 11 ----------- .../recipes-bsp/ipc/ipc-modules-single_git.bb | 11 ----------- meta-fsl-ppc/recipes-bsp/ipc/ipc-modules.inc | 21 --------------------- .../recipes-kernel/ipc/ipc-modules-multi_git.bb | 11 +++++++++++ .../recipes-kernel/ipc/ipc-modules-single_git.bb | 11 +++++++++++ meta-fsl-ppc/recipes-kernel/ipc/ipc-modules.inc | 21 +++++++++++++++++++++ 6 files changed, 43 insertions(+), 43 deletions(-) delete mode 100644 meta-fsl-ppc/recipes-bsp/ipc/ipc-modules-multi_git.bb delete mode 100644 meta-fsl-ppc/recipes-bsp/ipc/ipc-modules-single_git.bb delete mode 100644 meta-fsl-ppc/recipes-bsp/ipc/ipc-modules.inc create mode 100644 meta-fsl-ppc/recipes-kernel/ipc/ipc-modules-multi_git.bb create mode 100644 meta-fsl-ppc/recipes-kernel/ipc/ipc-modules-single_git.bb create mode 100644 meta-fsl-ppc/recipes-kernel/ipc/ipc-modules.inc diff --git a/meta-fsl-ppc/recipes-bsp/ipc/ipc-modules-multi_git.bb b/meta-fsl-ppc/recipes-bsp/ipc/ipc-modules-multi_git.bb deleted file mode 100644 index e5dc1151..00000000 --- a/meta-fsl-ppc/recipes-bsp/ipc/ipc-modules-multi_git.bb +++ /dev/null @@ -1,11 +0,0 @@ -require ipc-modules.inc - -EXTRA_OEMAKE ="KERNEL_DIR=${STAGING_KERNEL_DIR} ${SOC}=1 CONFIG_MULTI_RAT=1" - -do_install(){ - install -d ${D}/usr/driver/IPC/multi_rat - install -m 755 ${S}/kernel/*.ko ${D}/usr/driver/IPC/multi_rat -} - -FILES_${PN} += "/usr/driver/IPC/multi_rat/*.ko" -FILES_${PN}-dbg += "/usr/driver/IPC/multi_rat/.debug" diff --git a/meta-fsl-ppc/recipes-bsp/ipc/ipc-modules-single_git.bb b/meta-fsl-ppc/recipes-bsp/ipc/ipc-modules-single_git.bb deleted file mode 100644 index 03817e0e..00000000 --- a/meta-fsl-ppc/recipes-bsp/ipc/ipc-modules-single_git.bb +++ /dev/null @@ -1,11 +0,0 @@ -require ipc-modules.inc - -EXTRA_OEMAKE ="KERNEL_DIR=${STAGING_KERNEL_DIR} ${SOC}=1" - -do_install(){ - install -d ${D}/usr/driver/IPC/single_rat - install -m 755 ${S}/kernel/*.ko ${D}/usr/driver/IPC/single_rat -} - -FILES_${PN} += "/usr/driver/IPC/single_rat/*.ko" -FILES_${PN}-dbg += "/usr/driver/IPC/single_rat/.debug" diff --git a/meta-fsl-ppc/recipes-bsp/ipc/ipc-modules.inc b/meta-fsl-ppc/recipes-bsp/ipc/ipc-modules.inc deleted file mode 100644 index 3d7dfa66..00000000 --- a/meta-fsl-ppc/recipes-bsp/ipc/ipc-modules.inc +++ /dev/null @@ -1,21 +0,0 @@ -SUMMARY = "Linux IPC KERNEL MODULE " -DESCRIPTION = "DSP boot application and ipc test application" -LICENSE = "BSD" -LIC_FILES_CHKSUM = "file://COPYING;md5=fa38cd73d71527dc6efb546474f64d10" - -require ipc.inc - -inherit module qoriq_build_64bit_kernel - -S = "${WORKDIR}/git" - -do_compile_prepend () { - cd ${S}/kernel - case ${MACHINE} in - bsc9132qds|bsc9131rdb) SOC=B913x;; - b4860qds|b4420qds) SOC=B4860;; - esac -} - -INHIBIT_PACKAGE_STRIP = "1" - diff --git a/meta-fsl-ppc/recipes-kernel/ipc/ipc-modules-multi_git.bb b/meta-fsl-ppc/recipes-kernel/ipc/ipc-modules-multi_git.bb new file mode 100644 index 00000000..e5dc1151 --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/ipc/ipc-modules-multi_git.bb @@ -0,0 +1,11 @@ +require ipc-modules.inc + +EXTRA_OEMAKE ="KERNEL_DIR=${STAGING_KERNEL_DIR} ${SOC}=1 CONFIG_MULTI_RAT=1" + +do_install(){ + install -d ${D}/usr/driver/IPC/multi_rat + install -m 755 ${S}/kernel/*.ko ${D}/usr/driver/IPC/multi_rat +} + +FILES_${PN} += "/usr/driver/IPC/multi_rat/*.ko" +FILES_${PN}-dbg += "/usr/driver/IPC/multi_rat/.debug" diff --git a/meta-fsl-ppc/recipes-kernel/ipc/ipc-modules-single_git.bb b/meta-fsl-ppc/recipes-kernel/ipc/ipc-modules-single_git.bb new file mode 100644 index 00000000..03817e0e --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/ipc/ipc-modules-single_git.bb @@ -0,0 +1,11 @@ +require ipc-modules.inc + +EXTRA_OEMAKE ="KERNEL_DIR=${STAGING_KERNEL_DIR} ${SOC}=1" + +do_install(){ + install -d ${D}/usr/driver/IPC/single_rat + install -m 755 ${S}/kernel/*.ko ${D}/usr/driver/IPC/single_rat +} + +FILES_${PN} += "/usr/driver/IPC/single_rat/*.ko" +FILES_${PN}-dbg += "/usr/driver/IPC/single_rat/.debug" diff --git a/meta-fsl-ppc/recipes-kernel/ipc/ipc-modules.inc b/meta-fsl-ppc/recipes-kernel/ipc/ipc-modules.inc new file mode 100644 index 00000000..e403e6bb --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/ipc/ipc-modules.inc @@ -0,0 +1,21 @@ +SUMMARY = "Linux IPC KERNEL MODULE " +DESCRIPTION = "DSP boot application and ipc test application" +LICENSE = "BSD" +LIC_FILES_CHKSUM = "file://COPYING;md5=fa38cd73d71527dc6efb546474f64d10" + +require recipes-bsp/ipc/ipc.inc + +inherit module qoriq_build_64bit_kernel + +S = "${WORKDIR}/git" + +do_compile_prepend () { + cd ${S}/kernel + case ${MACHINE} in + bsc9132qds|bsc9131rdb) SOC=B913x;; + b4860qds|b4420qds) SOC=B4860;; + esac +} + +INHIBIT_PACKAGE_STRIP = "1" + -- cgit v1.2.3-54-g00ecf From 7cb7b451666721c1512531dd5c0c608d577e3670 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Tue, 22 Jul 2014 18:04:00 +0800 Subject: enable multilib for e5500-64b/e6500/e6500-64b enable multilib by default as it is needed: * for e5500-64b/e6500-64b, 32bit toolchain is need to build u-boot * for e6500, only 64bit kernel is supported Signed-off-by: Ting Liu --- meta-fsl-ppc/conf/machine/include/e5500-64b.inc | 5 +++++ meta-fsl-ppc/conf/machine/include/e6500-64b.inc | 5 +++++ meta-fsl-ppc/conf/machine/include/e6500.inc | 4 ++++ 3 files changed, 14 insertions(+) diff --git a/meta-fsl-ppc/conf/machine/include/e5500-64b.inc b/meta-fsl-ppc/conf/machine/include/e5500-64b.inc index 5c758838..07e6274e 100644 --- a/meta-fsl-ppc/conf/machine/include/e5500-64b.inc +++ b/meta-fsl-ppc/conf/machine/include/e5500-64b.inc @@ -5,3 +5,8 @@ require conf/machine/include/tune-ppce5500.inc require conf/machine/include/qoriq-base.inc MACHINEOVERRIDES .= ":e5500-64b" + +require conf/multilib.conf +MULTILIBS = "multilib:lib32" +DEFAULTTUNE_virtclass-multilib-lib32 = "ppce5500" + diff --git a/meta-fsl-ppc/conf/machine/include/e6500-64b.inc b/meta-fsl-ppc/conf/machine/include/e6500-64b.inc index 5e533e01..aa722a51 100644 --- a/meta-fsl-ppc/conf/machine/include/e6500-64b.inc +++ b/meta-fsl-ppc/conf/machine/include/e6500-64b.inc @@ -5,3 +5,8 @@ require conf/machine/include/tune-ppce6500.inc require conf/machine/include/qoriq-base.inc MACHINEOVERRIDES .= ":e6500-64b" + +require conf/multilib.conf +MULTILIBS = "multilib:lib32" +DEFAULTTUNE_virtclass-multilib-lib32 = "ppce6500" + diff --git a/meta-fsl-ppc/conf/machine/include/e6500.inc b/meta-fsl-ppc/conf/machine/include/e6500.inc index 5ebeccf6..e6848bdc 100644 --- a/meta-fsl-ppc/conf/machine/include/e6500.inc +++ b/meta-fsl-ppc/conf/machine/include/e6500.inc @@ -7,3 +7,7 @@ MACHINEOVERRIDES .= ":e6500" BUILD_64BIT_KERNEL = "1" +require conf/multilib.conf +MULTILIBS = "multilib:lib64" +DEFAULTTUNE_virtclass-multilib-lib64 = "ppc64e6500" + -- cgit v1.2.3-54-g00ecf From 673ac7eeb206c9392e8167258ee58d17bc2ac695 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Tue, 22 Jul 2014 18:32:14 +0800 Subject: remove obsolete patches Signed-off-by: Ting Liu --- ...-include-to-usr-local-include-in-Makefile.patch | 36 -------------------- .../0001-fix-sizeof-pointer-memaccess-error.patch | 39 ---------------------- 2 files changed, 75 deletions(-) delete mode 100644 meta-fsl-ppc/recipes-kernel/linux/files/libtraceevent-Remove-hard-coded-include-to-usr-local-include-in-Makefile.patch delete mode 100644 meta-fsl-ppc/recipes-virtualization/hypervisor/files/0001-fix-sizeof-pointer-memaccess-error.patch diff --git a/meta-fsl-ppc/recipes-kernel/linux/files/libtraceevent-Remove-hard-coded-include-to-usr-local-include-in-Makefile.patch b/meta-fsl-ppc/recipes-kernel/linux/files/libtraceevent-Remove-hard-coded-include-to-usr-local-include-in-Makefile.patch deleted file mode 100644 index 15c397dc..00000000 --- a/meta-fsl-ppc/recipes-kernel/linux/files/libtraceevent-Remove-hard-coded-include-to-usr-local-include-in-Makefile.patch +++ /dev/null @@ -1,36 +0,0 @@ -Upstream-Status: Backport - -From b9e8c37220c80e78289a1e87b50c09418eb59a7e Mon Sep 17 00:00:00 2001 -From: Jack Mitchell -Date: Fri, 08 Mar 2013 11:21:52 +0000 -Subject: libtraceevent: Remove hard coded include to /usr/local/include in Makefile - -having /usr/local/include hardcoded into the makefile is not necessary -as this is automatically included by GCC. It also infects cross-compile -builds with the host systems includes. - -Signed-off-by: Jack Mitchell -Acked-by: Namhyung Kim -Cc: Ingo Molnar -Cc: Paul Mackerras -Cc: Peter Zijlstra -Link: http://lkml.kernel.org/r/1362741712-21308-1-git-send-email-ml@communistcode.co.uk -Signed-off-by: Arnaldo Carvalho de Melo ---- -(limited to 'tools/lib/traceevent/Makefile') - -diff --git a/tools/lib/traceevent/Makefile b/tools/lib/traceevent/Makefile -index a20e320..0b0a907 100644 ---- a/tools/lib/traceevent/Makefile -+++ b/tools/lib/traceevent/Makefile -@@ -122,7 +122,7 @@ export Q VERBOSE - - EVENT_PARSE_VERSION = $(EP_VERSION).$(EP_PATCHLEVEL).$(EP_EXTRAVERSION) - --INCLUDES = -I. -I/usr/local/include $(CONFIG_INCLUDES) -+INCLUDES = -I. $(CONFIG_INCLUDES) - - # Set compile option CFLAGS if not set elsewhere - CFLAGS ?= -g -Wall --- -cgit v0.9.2 diff --git a/meta-fsl-ppc/recipes-virtualization/hypervisor/files/0001-fix-sizeof-pointer-memaccess-error.patch b/meta-fsl-ppc/recipes-virtualization/hypervisor/files/0001-fix-sizeof-pointer-memaccess-error.patch deleted file mode 100644 index a5622732..00000000 --- a/meta-fsl-ppc/recipes-virtualization/hypervisor/files/0001-fix-sizeof-pointer-memaccess-error.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 59e68351114a65a1f315ded1ee92f4370b8547e2 Mon Sep 17 00:00:00 2001 -From: Ting Liu -Date: Mon, 8 Jul 2013 17:03:43 +0800 -Subject: [PATCH] fix sizeof-pointer-memaccess error - -build: src/livetree.c -.../hypervisor/git-r3/git/src/devtree.c: In function 'read_intmap': -.../hypervisor/git-r3/git/src/devtree.c:1513:25: error: argument to 'sizeof' in 'memset' call is the same expression as the destination; did you mean to dereference it? [-Werror=sizeof-pointer-memaccess] - memset(ent, 0, sizeof(ent)); - ^ -cc1: all warnings being treated as errors -build: src/ipi_doorbell.c -make[1]: *** [bin/devtree.o] Error 1 -make[1]: *** Waiting for unfinished jobs.... -make[1]: Leaving directory `.../hypervisor/git-r3/git/output' -make: *** [all] Error 2 -ERROR: oe_runmake failed - -Signed-off-by: Ting Liu ---- - src/devtree.c | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/src/devtree.c b/src/devtree.c -index f3710e4..3295e20 100644 ---- a/src/devtree.c -+++ b/src/devtree.c -@@ -1510,7 +1510,7 @@ static void read_intmap(dt_node_t *node) - } - - if (imap + ent->parent_naddr + ent->parent_nint > imap_end) { -- memset(ent, 0, sizeof(ent)); -+ memset(ent, 0, sizeof(intmap_entry_t)); - break; - } - --- -1.7.5.4 - -- cgit v1.2.3-54-g00ecf From 0c0fe3e4e0f05433a31900821c64c1b79a386733 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Tue, 22 Jul 2014 18:32:15 +0800 Subject: luajit: add bbappend to hold ppc specific patch Signed-off-by: Ting Liu --- .../luajit/luajit/ppc-fixplt.patch | 105 +++++++++++++++++++++ .../recipes-devtools/luajit/luajit_%.bbappend | 4 + 2 files changed, 109 insertions(+) create mode 100644 meta-fsl-ppc/recipes-devtools/luajit/luajit/ppc-fixplt.patch create mode 100644 meta-fsl-ppc/recipes-devtools/luajit/luajit_%.bbappend diff --git a/meta-fsl-ppc/recipes-devtools/luajit/luajit/ppc-fixplt.patch b/meta-fsl-ppc/recipes-devtools/luajit/luajit/ppc-fixplt.patch new file mode 100644 index 00000000..b9f17f4e --- /dev/null +++ b/meta-fsl-ppc/recipes-devtools/luajit/luajit/ppc-fixplt.patch @@ -0,0 +1,105 @@ +Upstream-Status: Unknown + +Signed-off-by: Khem Raj + +libluajit is having symbols that can't be +resolved the reloc cannot accommodate an offset greater than 24 bits. + +Looking at libluajit with readelf -r, you see a bunch of entries that look like: + 000082f0 00003c0a R_PPC_REL24 00000000 sqrt + 0 + +These should not occur when the code is compiled and linked with -fPIC. + +It turns out that libluajit *is* compiled and linked with -fPIC, however... +There is one assembler file called lj_vm.s which is generated during the build. +This file is missing the `@plt' qualifier from external references. + +This file is generated by a program called buildvm. This in turn uses tables +in a file called buildvm_arch.h which is generated by dynasm.lua. + +Index: LuaJIT-2.0.1/src/host/buildvm.c +=================================================================== +--- LuaJIT-2.0.1.orig/src/host/buildvm.c 2013-02-19 12:15:00.000000000 -0800 ++++ LuaJIT-2.0.1/src/host/buildvm.c 2013-05-14 20:26:05.933444512 -0700 +@@ -107,12 +107,14 @@ + #endif + sprintf(name, "%s%s%s", symprefix, prefix, suffix); + p = strchr(name, '@'); ++#if 0 + if (p) { + if (!LJ_64 && (ctx->mode == BUILD_coffasm || ctx->mode == BUILD_peobj)) + name[0] = '@'; + else + *p = '\0'; + } ++#endif + p = (char *)malloc(strlen(name)+1); /* MSVC doesn't like strdup. */ + strcpy(p, name); + return p; +Index: LuaJIT-2.0.1/src/vm_ppcspe.dasc +=================================================================== +--- LuaJIT-2.0.1.orig/src/vm_ppcspe.dasc 2013-02-19 12:15:00.000000000 -0800 ++++ LuaJIT-2.0.1/src/vm_ppcspe.dasc 2013-05-14 20:26:05.937444512 -0700 +@@ -1390,7 +1390,7 @@ + | checknum CARG2 + | evmergehi CARG1, CARG2, CARG2 + | checkfail ->fff_fallback +- | bl extern func ++ | bl extern func@plt + | evmergelo CRET1, CRET1, CRET2 + | b ->fff_restv + |.endmacro +@@ -1405,7 +1405,7 @@ + | checknum CARG1 + | evmergehi CARG3, CARG4, CARG4 + | checkanyfail ->fff_fallback +- | bl extern func ++ | bl extern func@plt + | evmergelo CRET1, CRET1, CRET2 + | b ->fff_restv + |.endmacro +@@ -1437,7 +1437,7 @@ + | checknum CARG2 + | evmergehi CARG1, CARG2, CARG2 + | checkfail ->fff_fallback +- | bl extern log ++ | bl extern log@plt + | evmergelo CRET1, CRET1, CRET2 + | b ->fff_restv + | +@@ -1471,7 +1471,7 @@ + | checknum CARG1 + | checkanyfail ->fff_fallback + | efdctsi CARG3, CARG4 +- | bl extern ldexp ++ | bl extern ldexp@plt + | evmergelo CRET1, CRET1, CRET2 + | b ->fff_restv + | +@@ -1484,7 +1484,7 @@ + | checkfail ->fff_fallback + | la CARG3, DISPATCH_GL(tmptv)(DISPATCH) + | lwz PC, FRAME_PC(BASE) +- | bl extern frexp ++ | bl extern frexp@plt + | lwz TMP1, DISPATCH_GL(tmptv)(DISPATCH) + | evmergelo CRET1, CRET1, CRET2 + | efdcfsi CRET2, TMP1 +@@ -1503,7 +1503,7 @@ + | checkfail ->fff_fallback + | la CARG3, -8(BASE) + | lwz PC, FRAME_PC(BASE) +- | bl extern modf ++ | bl extern modf@plt + | evmergelo CRET1, CRET1, CRET2 + | la RA, -8(BASE) + | evstdd CRET1, 0(BASE) +@@ -2399,7 +2399,7 @@ + | checknum CARG1 + | evmergehi CARG3, CARG4, CARG4 + | checkanyfail ->vmeta_arith_vv +- | bl extern pow ++ | bl extern pow@plt + | evmergelo CRET2, CRET1, CRET2 + | evstddx CRET2, BASE, RA + | ins_next diff --git a/meta-fsl-ppc/recipes-devtools/luajit/luajit_%.bbappend b/meta-fsl-ppc/recipes-devtools/luajit/luajit_%.bbappend new file mode 100644 index 00000000..8c6138c5 --- /dev/null +++ b/meta-fsl-ppc/recipes-devtools/luajit/luajit_%.bbappend @@ -0,0 +1,4 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:" + +SRC_URI_append_qoriq-ppc = " file://ppc-fixplt.patch " + -- cgit v1.2.3-54-g00ecf From 0d211ad1e10d01c143cf704bcb8a60086088e693 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Tue, 22 Jul 2014 18:32:16 +0800 Subject: init-ifupdown: use customized interfaces for qoriq-ppc the file is same with the one for qemuarm in poky/meta/, only define loopback interface. Signed-off-by: Ting Liu --- .../recipes-core/init-ifupdown/init-ifupdown/qoriq-ppc/interfaces | 6 ++++++ meta-fsl-ppc/recipes-core/init-ifupdown/init-ifupdown_%.bbappend | 2 ++ 2 files changed, 8 insertions(+) create mode 100644 meta-fsl-ppc/recipes-core/init-ifupdown/init-ifupdown/qoriq-ppc/interfaces create mode 100644 meta-fsl-ppc/recipes-core/init-ifupdown/init-ifupdown_%.bbappend diff --git a/meta-fsl-ppc/recipes-core/init-ifupdown/init-ifupdown/qoriq-ppc/interfaces b/meta-fsl-ppc/recipes-core/init-ifupdown/init-ifupdown/qoriq-ppc/interfaces new file mode 100644 index 00000000..3737c8b2 --- /dev/null +++ b/meta-fsl-ppc/recipes-core/init-ifupdown/init-ifupdown/qoriq-ppc/interfaces @@ -0,0 +1,6 @@ +# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8) + +# The loopback interface +auto lo +iface lo inet loopback + diff --git a/meta-fsl-ppc/recipes-core/init-ifupdown/init-ifupdown_%.bbappend b/meta-fsl-ppc/recipes-core/init-ifupdown/init-ifupdown_%.bbappend new file mode 100644 index 00000000..00057874 --- /dev/null +++ b/meta-fsl-ppc/recipes-core/init-ifupdown/init-ifupdown_%.bbappend @@ -0,0 +1,2 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:" + -- cgit v1.2.3-54-g00ecf From 90c306c9374e8cc63d21f7bdf61e3dcdebcb8cae Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Wed, 23 Jul 2014 10:25:06 +0800 Subject: merge-files: add recipe Signed-off-by: Ting Liu --- .../merge-files/merge-files/merge/README | 7 ++++++ .../merge-files/merge-files_1.0.bb | 25 ++++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 meta-fsl-ppc/recipes-extended/merge-files/merge-files/merge/README create mode 100644 meta-fsl-ppc/recipes-extended/merge-files/merge-files_1.0.bb diff --git a/meta-fsl-ppc/recipes-extended/merge-files/merge-files/merge/README b/meta-fsl-ppc/recipes-extended/merge-files/merge-files/merge/README new file mode 100644 index 00000000..8f0d85af --- /dev/null +++ b/meta-fsl-ppc/recipes-extended/merge-files/merge-files/merge/README @@ -0,0 +1,7 @@ +This package is used to merge specified files into rootfs. + +Steps: +1> copy files to recipes-*/merge-files/merge-files/merge/ +2> add 'IMAGE_INSTALL += "merge-files"' into rootfs recipe +3> bitbake + diff --git a/meta-fsl-ppc/recipes-extended/merge-files/merge-files_1.0.bb b/meta-fsl-ppc/recipes-extended/merge-files/merge-files_1.0.bb new file mode 100644 index 00000000..f64b909f --- /dev/null +++ b/meta-fsl-ppc/recipes-extended/merge-files/merge-files_1.0.bb @@ -0,0 +1,25 @@ +DESCRIPTION = "Merge prebuilt/extra files into rootfs" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \ + file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" + +inherit allarch + +SRC_URI = "file://merge" + +MERGED_DST ?= "${ROOT_HOME}" +do_install () { + install -d ${D}/${MERGED_DST} + find ${WORKDIR}/merge/ -maxdepth 1 -mindepth 1 -not -name README \ + -exec cp -fr '{}' ${D}/${MERGED_DST}/ \; + find ${WORKDIR}/merge/ -maxdepth 1 -mindepth 1 -exec rm -fr '{}' \; +} +do_unpack[nostamp] = "1" +do_install[nostamp] = "1" +do_configure[noexec] = "1" +do_compile[noexec] = "1" + +FILES_${PN} = "/*" +ALLOW_EMPTY_${PN} = "1" +INSANE_SKIP_${PN} = "debug-files dev-so" + -- cgit v1.2.3-54-g00ecf From 55ce8e486dc8f8db84e1cfaee5b274fa2316251d Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Tue, 22 Jul 2014 18:32:18 +0800 Subject: procps: disabling reverse-path filtering rp_filter causes issues with VLAN interfaces. Signed-off-by: Ting Liu --- meta-fsl-ppc/recipes-extended/procps/procps_%.bbappend | 9 +++++++++ meta-fsl-ppc/recipes-extended/procps/procps_3.2.8.bbappend | 1 - 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 meta-fsl-ppc/recipes-extended/procps/procps_%.bbappend delete mode 100644 meta-fsl-ppc/recipes-extended/procps/procps_3.2.8.bbappend diff --git a/meta-fsl-ppc/recipes-extended/procps/procps_%.bbappend b/meta-fsl-ppc/recipes-extended/procps/procps_%.bbappend new file mode 100644 index 00000000..face0ccc --- /dev/null +++ b/meta-fsl-ppc/recipes-extended/procps/procps_%.bbappend @@ -0,0 +1,9 @@ +do_install_append_qoriq-ppc() { + for keyword in \ + net.ipv4.conf.default.rp_filter \ + net.ipv4.conf.all.rp_filter \ + ; do + sed -i 's,'"$keyword"'=.*,'"$keyword"'=0,' ${D}${sysconfdir}/sysctl.conf + done +} + diff --git a/meta-fsl-ppc/recipes-extended/procps/procps_3.2.8.bbappend b/meta-fsl-ppc/recipes-extended/procps/procps_3.2.8.bbappend deleted file mode 100644 index 72d991c7..00000000 --- a/meta-fsl-ppc/recipes-extended/procps/procps_3.2.8.bbappend +++ /dev/null @@ -1 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" -- cgit v1.2.3-54-g00ecf From bfefe19e30cea420507cbb3b4ab7a903470be9b6 Mon Sep 17 00:00:00 2001 From: Hongxu Jia Date: Wed, 23 Jul 2014 11:30:49 +0800 Subject: cryptodev-fsl: add missing colon for FILESEXTRAPATHS While other cryptodev-fsl's bbapend to assign FILESEXTRAPATHS, there was a potential dir split error. Signed-off-by: Hongxu Jia --- meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl.inc b/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl.inc index 3bdd3018..70544e26 100644 --- a/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl.inc +++ b/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl.inc @@ -1,4 +1,4 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/cryptodev-fsl" +FILESEXTRAPATHS_prepend := "${THISDIR}/cryptodev-fsl:" SRC_URI_qoriq-ppc = "git://github.com/nmav/cryptodev-linux.git \ file://0001-add-support-for-composite-TLS-SHA1-AES-algorithm-off.patch \ -- cgit v1.2.3-54-g00ecf From d8d2594ec04a3b3d6059368d7332132efc23b7df Mon Sep 17 00:00:00 2001 From: Hongxu Jia Date: Wed, 23 Jul 2014 11:30:50 +0800 Subject: openssl_1.0.1g.bbappend: add missing colon for FILESEXTRAPATHS While other openssl's bbapend to assign FILESEXTRAPATHS, there was a potential dir split error. Signed-off-by: Hongxu Jia --- meta-fsl-ppc/recipes-connectivity/openssl/openssl_1.0.1g.bbappend | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-fsl-ppc/recipes-connectivity/openssl/openssl_1.0.1g.bbappend b/meta-fsl-ppc/recipes-connectivity/openssl/openssl_1.0.1g.bbappend index f3e49aeb..ab1985bb 100644 --- a/meta-fsl-ppc/recipes-connectivity/openssl/openssl_1.0.1g.bbappend +++ b/meta-fsl-ppc/recipes-connectivity/openssl/openssl_1.0.1g.bbappend @@ -1,4 +1,4 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/openssl-fsl" +FILESEXTRAPATHS_prepend := "${THISDIR}/openssl-fsl:" RDEPENDS_${PN}_class-target += "cryptodev-module" -- cgit v1.2.3-54-g00ecf From 9c3578b1a7f177e95b62479ebfac977f52681c02 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Wed, 23 Jul 2014 14:12:02 +0800 Subject: skmm-ep: add two missing header files Signed-off-by: Ting Liu --- .../skmm-ep/add-two-missing-header-files.patch | 660 +++++++++++++++++++++ .../recipes-extended/skmm-ep/skmm-ep_git.bb | 4 +- 2 files changed, 663 insertions(+), 1 deletion(-) create mode 100644 meta-fsl-ppc/recipes-extended/skmm-ep/skmm-ep/add-two-missing-header-files.patch diff --git a/meta-fsl-ppc/recipes-extended/skmm-ep/skmm-ep/add-two-missing-header-files.patch b/meta-fsl-ppc/recipes-extended/skmm-ep/skmm-ep/add-two-missing-header-files.patch new file mode 100644 index 00000000..2a7bb9f2 --- /dev/null +++ b/meta-fsl-ppc/recipes-extended/skmm-ep/skmm-ep/add-two-missing-header-files.patch @@ -0,0 +1,660 @@ +add two missing header files + +Upstream-status: Pending + +--- + include/linux/fsl_pci_ep_vfio.h | 79 ++++++ + include/linux/vfio.h | 555 ++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 634 insertions(+) + create mode 100644 include/linux/fsl_pci_ep_vfio.h + create mode 100644 include/linux/vfio.h + +diff --git a/include/linux/fsl_pci_ep_vfio.h b/include/linux/fsl_pci_ep_vfio.h +new file mode 100644 +index 0000000..8960157 +--- /dev/null ++++ b/include/linux/fsl_pci_ep_vfio.h +@@ -0,0 +1,79 @@ ++/* ++ * Copyright 2013 Freescale Semiconductor, Inc. ++ * ++ * Author: Minghuan Lian ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License, version 2, as ++ * published by the Free Software Foundation. ++ * ++ * 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, write to the Free Software ++ * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ++ * ++ */ ++ ++#ifndef _FSL_PCI_EP_VFIO_H ++#define _FSL_PCI_EP_VFIO_H ++ ++#include ++ ++enum { ++ PCI_EP_TYPE_PF, ++ PCI_EP_TYPE_VF, ++}; ++ ++enum PCI_EP_REGION_TYPE { ++ PCI_EP_REGION_IBWIN, ++ PCI_EP_REGION_OBWIN, ++ PCI_EP_REGION_VF_IBWIN, ++ PCI_EP_REGION_VF_OBWIN, ++ PCI_EP_REGION_REGS, ++ PCI_EP_REGION_CONFIG, ++ PCI_EP_REGION_MEM, ++ PCI_EP_REGION_MSIX_OBWIN ++}; ++ ++enum PCI_EP_REGION_INDEX { ++ PCI_EP_WIN0_INDEX, ++ PCI_EP_WIN1_INDEX, ++ PCI_EP_WIN2_INDEX, ++ PCI_EP_WIN3_INDEX, ++ PCI_EP_WIN4_INDEX, ++ PCI_EP_WIN5_INDEX, ++}; ++ ++#define PCI_EP_MSI_WIN_INDEX PCI_EP_WIN1_INDEX ++#define PCI_EP_CCSR_WIN_INDEX PCI_EP_WIN0_INDEX ++#define PCI_EP_DEFAULT_OW_INDEX PCI_EP_WIN0_INDEX ++ ++struct pci_ep_win { ++ uint64_t pci_addr; ++ uint64_t cpu_addr; ++ uint64_t size; ++ uint64_t offset; ++ uint32_t attr; ++ uint32_t type; ++ uint32_t idx; ++}; ++ ++#define VFIO_DEVICE_SET_WIN_INFO _IO(VFIO_TYPE, VFIO_BASE + 20) ++#define VFIO_DEVICE_GET_WIN_INFO _IO(VFIO_TYPE, VFIO_BASE + 21) ++ ++struct pci_ep_info { ++ uint32_t type; ++ uint32_t pf_idx; ++ uint32_t vf_idx; ++ uint32_t iw_num; ++ uint32_t ow_num; ++ uint32_t vf_iw_num; ++ uint32_t vf_ow_num; ++ bool msix_enable; ++}; ++ ++#endif +diff --git a/include/linux/vfio.h b/include/linux/vfio.h +new file mode 100644 +index 0000000..44578d2 +--- /dev/null ++++ b/include/linux/vfio.h +@@ -0,0 +1,555 @@ ++/* ++ * VFIO API definition ++ * ++ * Copyright (C) 2012 Red Hat, Inc. All rights reserved. ++ * Author: Alex Williamson ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License version 2 as ++ * published by the Free Software Foundation. ++ */ ++#ifndef _UAPIVFIO_H ++#define _UAPIVFIO_H ++ ++#include ++#include ++ ++#define VFIO_API_VERSION 0 ++ ++ ++/* Kernel & User level defines for VFIO IOCTLs. */ ++ ++/* Extensions */ ++ ++#define VFIO_TYPE1_IOMMU 1 ++#define VFIO_SPAPR_TCE_IOMMU 2 ++#define VFIO_FSL_PAMU_IOMMU 1000 ++#define VFIO_IOMMU_DUMMY 1001 ++ ++/* ++ * The IOCTL interface is designed for extensibility by embedding the ++ * structure length (argsz) and flags into structures passed between ++ * kernel and userspace. We therefore use the _IO() macro for these ++ * defines to avoid implicitly embedding a size into the ioctl request. ++ * As structure fields are added, argsz will increase to match and flag ++ * bits will be defined to indicate additional fields with valid data. ++ * It's *always* the caller's responsibility to indicate the size of ++ * the structure passed by setting argsz appropriately. ++ */ ++ ++#define VFIO_TYPE (';') ++#define VFIO_BASE 100 ++ ++/* -------- IOCTLs for VFIO file descriptor (/dev/vfio/vfio) -------- */ ++ ++/** ++ * VFIO_GET_API_VERSION - _IO(VFIO_TYPE, VFIO_BASE + 0) ++ * ++ * Report the version of the VFIO API. This allows us to bump the entire ++ * API version should we later need to add or change features in incompatible ++ * ways. ++ * Return: VFIO_API_VERSION ++ * Availability: Always ++ */ ++#define VFIO_GET_API_VERSION _IO(VFIO_TYPE, VFIO_BASE + 0) ++ ++/** ++ * VFIO_CHECK_EXTENSION - _IOW(VFIO_TYPE, VFIO_BASE + 1, __u32) ++ * ++ * Check whether an extension is supported. ++ * Return: 0 if not supported, 1 (or some other positive integer) if supported. ++ * Availability: Always ++ */ ++#define VFIO_CHECK_EXTENSION _IO(VFIO_TYPE, VFIO_BASE + 1) ++ ++/** ++ * VFIO_SET_IOMMU - _IOW(VFIO_TYPE, VFIO_BASE + 2, __s32) ++ * ++ * Set the iommu to the given type. The type must be supported by an ++ * iommu driver as verified by calling CHECK_EXTENSION using the same ++ * type. A group must be set to this file descriptor before this ++ * ioctl is available. The IOMMU interfaces enabled by this call are ++ * specific to the value set. ++ * Return: 0 on success, -errno on failure ++ * Availability: When VFIO group attached ++ */ ++#define VFIO_SET_IOMMU _IO(VFIO_TYPE, VFIO_BASE + 2) ++ ++/* -------- IOCTLs for GROUP file descriptors (/dev/vfio/$GROUP) -------- */ ++ ++/** ++ * VFIO_GROUP_GET_STATUS - _IOR(VFIO_TYPE, VFIO_BASE + 3, ++ * struct vfio_group_status) ++ * ++ * Retrieve information about the group. Fills in provided ++ * struct vfio_group_info. Caller sets argsz. ++ * Return: 0 on succes, -errno on failure. ++ * Availability: Always ++ */ ++struct vfio_group_status { ++ __u32 argsz; ++ __u32 flags; ++#define VFIO_GROUP_FLAGS_VIABLE (1 << 0) ++#define VFIO_GROUP_FLAGS_CONTAINER_SET (1 << 1) ++}; ++#define VFIO_GROUP_GET_STATUS _IO(VFIO_TYPE, VFIO_BASE + 3) ++ ++/** ++ * VFIO_GROUP_SET_CONTAINER - _IOW(VFIO_TYPE, VFIO_BASE + 4, __s32) ++ * ++ * Set the container for the VFIO group to the open VFIO file ++ * descriptor provided. Groups may only belong to a single ++ * container. Containers may, at their discretion, support multiple ++ * groups. Only when a container is set are all of the interfaces ++ * of the VFIO file descriptor and the VFIO group file descriptor ++ * available to the user. ++ * Return: 0 on success, -errno on failure. ++ * Availability: Always ++ */ ++#define VFIO_GROUP_SET_CONTAINER _IO(VFIO_TYPE, VFIO_BASE + 4) ++ ++/** ++ * VFIO_GROUP_UNSET_CONTAINER - _IO(VFIO_TYPE, VFIO_BASE + 5) ++ * ++ * Remove the group from the attached container. This is the ++ * opposite of the SET_CONTAINER call and returns the group to ++ * an initial state. All device file descriptors must be released ++ * prior to calling this interface. When removing the last group ++ * from a container, the IOMMU will be disabled and all state lost, ++ * effectively also returning the VFIO file descriptor to an initial ++ * state. ++ * Return: 0 on success, -errno on failure. ++ * Availability: When attached to container ++ */ ++#define VFIO_GROUP_UNSET_CONTAINER _IO(VFIO_TYPE, VFIO_BASE + 5) ++ ++/** ++ * VFIO_GROUP_GET_DEVICE_FD - _IOW(VFIO_TYPE, VFIO_BASE + 6, char) ++ * ++ * Return a new file descriptor for the device object described by ++ * the provided string. The string should match a device listed in ++ * the devices subdirectory of the IOMMU group sysfs entry. The ++ * group containing the device must already be added to this context. ++ * Return: new file descriptor on success, -errno on failure. ++ * Availability: When attached to container ++ */ ++#define VFIO_GROUP_GET_DEVICE_FD _IO(VFIO_TYPE, VFIO_BASE + 6) ++ ++/* --------------- IOCTLs for DEVICE file descriptors --------------- */ ++ ++/** ++ * VFIO_DEVICE_GET_INFO - _IOR(VFIO_TYPE, VFIO_BASE + 7, ++ * struct vfio_device_info) ++ * ++ * Retrieve information about the device. Fills in provided ++ * struct vfio_device_info. Caller sets argsz. ++ * Return: 0 on success, -errno on failure. ++ */ ++struct vfio_device_info { ++ __u32 argsz; ++ __u32 flags; ++#define VFIO_DEVICE_FLAGS_RESET (1 << 0) /* Device supports reset */ ++#define VFIO_DEVICE_FLAGS_PCI (1 << 1) /* vfio-pci device */ ++ __u32 num_regions; /* Max region index + 1 */ ++ __u32 num_irqs; /* Max IRQ index + 1 */ ++}; ++#define VFIO_DEVICE_GET_INFO _IO(VFIO_TYPE, VFIO_BASE + 7) ++ ++/** ++ * VFIO_DEVICE_GET_REGION_INFO - _IOWR(VFIO_TYPE, VFIO_BASE + 8, ++ * struct vfio_region_info) ++ * ++ * Retrieve information about a device region. Caller provides ++ * struct vfio_region_info with index value set. Caller sets argsz. ++ * Implementation of region mapping is bus driver specific. This is ++ * intended to describe MMIO, I/O port, as well as bus specific ++ * regions (ex. PCI config space). Zero sized regions may be used ++ * to describe unimplemented regions (ex. unimplemented PCI BARs). ++ * Return: 0 on success, -errno on failure. ++ */ ++struct vfio_region_info { ++ __u32 argsz; ++ __u32 flags; ++#define VFIO_REGION_INFO_FLAG_READ (1 << 0) /* Region supports read */ ++#define VFIO_REGION_INFO_FLAG_WRITE (1 << 1) /* Region supports write */ ++#define VFIO_REGION_INFO_FLAG_MMAP (1 << 2) /* Region supports mmap */ ++ __u32 index; /* Region index */ ++ __u32 resv; /* Reserved for alignment */ ++ __u64 size; /* Region size (bytes) */ ++ __u64 offset; /* Region offset from start of device fd */ ++}; ++#define VFIO_DEVICE_GET_REGION_INFO _IO(VFIO_TYPE, VFIO_BASE + 8) ++ ++/** ++ * VFIO_DEVICE_GET_IRQ_INFO - _IOWR(VFIO_TYPE, VFIO_BASE + 9, ++ * struct vfio_irq_info) ++ * ++ * Retrieve information about a device IRQ. Caller provides ++ * struct vfio_irq_info with index value set. Caller sets argsz. ++ * Implementation of IRQ mapping is bus driver specific. Indexes ++ * using multiple IRQs are primarily intended to support MSI-like ++ * interrupt blocks. Zero count irq blocks may be used to describe ++ * unimplemented interrupt types. ++ * ++ * The EVENTFD flag indicates the interrupt index supports eventfd based ++ * signaling. ++ * ++ * The MASKABLE flags indicates the index supports MASK and UNMASK ++ * actions described below. ++ * ++ * AUTOMASKED indicates that after signaling, the interrupt line is ++ * automatically masked by VFIO and the user needs to unmask the line ++ * to receive new interrupts. This is primarily intended to distinguish ++ * level triggered interrupts. ++ * ++ * The NORESIZE flag indicates that the interrupt lines within the index ++ * are setup as a set and new subindexes cannot be enabled without first ++ * disabling the entire index. This is used for interrupts like PCI MSI ++ * and MSI-X where the driver may only use a subset of the available ++ * indexes, but VFIO needs to enable a specific number of vectors ++ * upfront. In the case of MSI-X, where the user can enable MSI-X and ++ * then add and unmask vectors, it's up to userspace to make the decision ++ * whether to allocate the maximum supported number of vectors or tear ++ * down setup and incrementally increase the vectors as each is enabled. ++ */ ++struct vfio_irq_info { ++ __u32 argsz; ++ __u32 flags; ++#define VFIO_IRQ_INFO_EVENTFD (1 << 0) ++#define VFIO_IRQ_INFO_MASKABLE (1 << 1) ++#define VFIO_IRQ_INFO_AUTOMASKED (1 << 2) ++#define VFIO_IRQ_INFO_NORESIZE (1 << 3) ++ __u32 index; /* IRQ index */ ++ __u32 count; /* Number of IRQs within this index */ ++}; ++#define VFIO_DEVICE_GET_IRQ_INFO _IO(VFIO_TYPE, VFIO_BASE + 9) ++ ++/** ++ * VFIO_DEVICE_SET_IRQS - _IOW(VFIO_TYPE, VFIO_BASE + 10, struct vfio_irq_set) ++ * ++ * Set signaling, masking, and unmasking of interrupts. Caller provides ++ * struct vfio_irq_set with all fields set. 'start' and 'count' indicate ++ * the range of subindexes being specified. ++ * ++ * The DATA flags specify the type of data provided. If DATA_NONE, the ++ * operation performs the specified action immediately on the specified ++ * interrupt(s). For example, to unmask AUTOMASKED interrupt [0,0]: ++ * flags = (DATA_NONE|ACTION_UNMASK), index = 0, start = 0, count = 1. ++ * ++ * DATA_BOOL allows sparse support for the same on arrays of interrupts. ++ * For example, to mask interrupts [0,1] and [0,3] (but not [0,2]): ++ * flags = (DATA_BOOL|ACTION_MASK), index = 0, start = 1, count = 3, ++ * data = {1,0,1} ++ * ++ * DATA_EVENTFD binds the specified ACTION to the provided __s32 eventfd. ++ * A value of -1 can be used to either de-assign interrupts if already ++ * assigned or skip un-assigned interrupts. For example, to set an eventfd ++ * to be trigger for interrupts [0,0] and [0,2]: ++ * flags = (DATA_EVENTFD|ACTION_TRIGGER), index = 0, start = 0, count = 3, ++ * data = {fd1, -1, fd2} ++ * If index [0,1] is previously set, two count = 1 ioctls calls would be ++ * required to set [0,0] and [0,2] without changing [0,1]. ++ * ++ * Once a signaling mechanism is set, DATA_BOOL or DATA_NONE can be used ++ * with ACTION_TRIGGER to perform kernel level interrupt loopback testing ++ * from userspace (ie. simulate hardware triggering). ++ * ++ * Setting of an event triggering mechanism to userspace for ACTION_TRIGGER ++ * enables the interrupt index for the device. Individual subindex interrupts ++ * can be disabled using the -1 value for DATA_EVENTFD or the index can be ++ * disabled as a whole with: flags = (DATA_NONE|ACTION_TRIGGER), count = 0. ++ * ++ * Note that ACTION_[UN]MASK specify user->kernel signaling (irqfds) while ++ * ACTION_TRIGGER specifies kernel->user signaling. ++ */ ++struct vfio_irq_set { ++ __u32 argsz; ++ __u32 flags; ++#define VFIO_IRQ_SET_DATA_NONE (1 << 0) /* Data not present */ ++#define VFIO_IRQ_SET_DATA_BOOL (1 << 1) /* Data is bool (u8) */ ++#define VFIO_IRQ_SET_DATA_EVENTFD (1 << 2) /* Data is eventfd (s32) */ ++#define VFIO_IRQ_SET_ACTION_MASK (1 << 3) /* Mask interrupt */ ++#define VFIO_IRQ_SET_ACTION_UNMASK (1 << 4) /* Unmask interrupt */ ++#define VFIO_IRQ_SET_ACTION_TRIGGER (1 << 5) /* Trigger interrupt */ ++ __u32 index; ++ __u32 start; ++ __u32 count; ++ __u8 data[]; ++}; ++#define VFIO_DEVICE_SET_IRQS _IO(VFIO_TYPE, VFIO_BASE + 10) ++ ++#define VFIO_IRQ_SET_DATA_TYPE_MASK (VFIO_IRQ_SET_DATA_NONE | \ ++ VFIO_IRQ_SET_DATA_BOOL | \ ++ VFIO_IRQ_SET_DATA_EVENTFD) ++#define VFIO_IRQ_SET_ACTION_TYPE_MASK (VFIO_IRQ_SET_ACTION_MASK | \ ++ VFIO_IRQ_SET_ACTION_UNMASK | \ ++ VFIO_IRQ_SET_ACTION_TRIGGER) ++/** ++ * VFIO_DEVICE_RESET - _IO(VFIO_TYPE, VFIO_BASE + 11) ++ * ++ * Reset a device. ++ */ ++#define VFIO_DEVICE_RESET _IO(VFIO_TYPE, VFIO_BASE + 11) ++ ++/* ++ * The VFIO-PCI bus driver makes use of the following fixed region and ++ * IRQ index mapping. Unimplemented regions return a size of zero. ++ * Unimplemented IRQ types return a count of zero. ++ */ ++ ++enum { ++ VFIO_PCI_BAR0_REGION_INDEX, ++ VFIO_PCI_BAR1_REGION_INDEX, ++ VFIO_PCI_BAR2_REGION_INDEX, ++ VFIO_PCI_BAR3_REGION_INDEX, ++ VFIO_PCI_BAR4_REGION_INDEX, ++ VFIO_PCI_BAR5_REGION_INDEX, ++ VFIO_PCI_ROM_REGION_INDEX, ++ VFIO_PCI_CONFIG_REGION_INDEX, ++ /* ++ * Expose VGA regions defined for PCI base class 03, subclass 00. ++ * This includes I/O port ranges 0x3b0 to 0x3bb and 0x3c0 to 0x3df ++ * as well as the MMIO range 0xa0000 to 0xbffff. Each implemented ++ * range is found at it's identity mapped offset from the region ++ * offset, for example 0x3b0 is region_info.offset + 0x3b0. Areas ++ * between described ranges are unimplemented. ++ */ ++ VFIO_PCI_VGA_REGION_INDEX, ++ VFIO_PCI_NUM_REGIONS ++}; ++ ++enum { ++ VFIO_PCI_INTX_IRQ_INDEX, ++ VFIO_PCI_MSI_IRQ_INDEX, ++ VFIO_PCI_MSIX_IRQ_INDEX, ++ VFIO_PCI_ERR_IRQ_INDEX, ++ VFIO_PCI_NUM_IRQS ++}; ++ ++/** ++ * VFIO_DEVICE_GET_PCI_HOT_RESET_INFO - _IORW(VFIO_TYPE, VFIO_BASE + 12, ++ * struct vfio_pci_hot_reset_info) ++ * ++ * Return: 0 on success, -errno on failure: ++ * -enospc = insufficient buffer, -enodev = unsupported for device. ++ */ ++struct vfio_pci_dependent_device { ++ __u32 group_id; ++ __u16 segment; ++ __u8 bus; ++ __u8 devfn; /* Use PCI_SLOT/PCI_FUNC */ ++}; ++ ++struct vfio_pci_hot_reset_info { ++ __u32 argsz; ++ __u32 flags; ++ __u32 count; ++ struct vfio_pci_dependent_device devices[]; ++}; ++ ++#define VFIO_DEVICE_GET_PCI_HOT_RESET_INFO _IO(VFIO_TYPE, VFIO_BASE + 12) ++ ++/** ++ * VFIO_DEVICE_PCI_HOT_RESET - _IOW(VFIO_TYPE, VFIO_BASE + 13, ++ * struct vfio_pci_hot_reset) ++ * ++ * Return: 0 on success, -errno on failure. ++ */ ++struct vfio_pci_hot_reset { ++ __u32 argsz; ++ __u32 flags; ++ __u32 count; ++ __s32 group_fds[]; ++}; ++ ++#define VFIO_DEVICE_PCI_HOT_RESET _IO(VFIO_TYPE, VFIO_BASE + 13) ++ ++/* -------- API for Type1 VFIO IOMMU -------- */ ++ ++/** ++ * VFIO_IOMMU_GET_INFO - _IOR(VFIO_TYPE, VFIO_BASE + 12, struct vfio_iommu_info) ++ * ++ * Retrieve information about the IOMMU object. Fills in provided ++ * struct vfio_iommu_info. Caller sets argsz. ++ * ++ * XXX Should we do these by CHECK_EXTENSION too? ++ */ ++struct vfio_iommu_type1_info { ++ __u32 argsz; ++ __u32 flags; ++#define VFIO_IOMMU_INFO_PGSIZES (1 << 0) /* supported page sizes info */ ++ __u64 iova_pgsizes; /* Bitmap of supported page sizes */ ++}; ++ ++#define VFIO_IOMMU_GET_INFO _IO(VFIO_TYPE, VFIO_BASE + 12) ++ ++/** ++ * VFIO_IOMMU_MAP_DMA - _IOW(VFIO_TYPE, VFIO_BASE + 13, struct vfio_dma_map) ++ * ++ * Map process virtual addresses to IO virtual addresses using the ++ * provided struct vfio_dma_map. Caller sets argsz. READ &/ WRITE required. ++ */ ++struct vfio_iommu_type1_dma_map { ++ __u32 argsz; ++ __u32 flags; ++#define VFIO_DMA_MAP_FLAG_READ (1 << 0) /* readable from device */ ++#define VFIO_DMA_MAP_FLAG_WRITE (1 << 1) /* writable from device */ ++ __u64 vaddr; /* Process virtual address */ ++ __u64 iova; /* IO virtual address */ ++ __u64 size; /* Size of mapping (bytes) */ ++}; ++ ++#define VFIO_IOMMU_MAP_DMA _IO(VFIO_TYPE, VFIO_BASE + 13) ++ ++/** ++ * VFIO_IOMMU_UNMAP_DMA - _IOWR(VFIO_TYPE, VFIO_BASE + 14, ++ * struct vfio_dma_unmap) ++ * ++ * Unmap IO virtual addresses using the provided struct vfio_dma_unmap. ++ * Caller sets argsz. The actual unmapped size is returned in the size ++ * field. No guarantee is made to the user that arbitrary unmaps of iova ++ * or size different from those used in the original mapping call will ++ * succeed. ++ */ ++struct vfio_iommu_type1_dma_unmap { ++ __u32 argsz; ++ __u32 flags; ++ __u64 iova; /* IO virtual address */ ++ __u64 size; /* Size of mapping (bytes) */ ++}; ++ ++#define VFIO_IOMMU_UNMAP_DMA _IO(VFIO_TYPE, VFIO_BASE + 14) ++ ++/*********** APIs for VFIO_PAMU type only ****************/ ++/* ++ * VFIO_IOMMU_PAMU_GET_ATTR - _IO(VFIO_TYPE, VFIO_BASE + 15, ++ * struct vfio_pamu_attr) ++ * ++ * Gets the iommu attributes for the current vfio container. ++ * Caller sets argsz and attribute. The ioctl fills in ++ * the provided struct vfio_pamu_attr based on the attribute ++ * value that was set. ++ * Return: 0 on success, -errno on failure ++ */ ++struct vfio_pamu_attr { ++ __u32 argsz; ++ __u32 flags; /* no flags currently */ ++#define VFIO_ATTR_GEOMETRY 0 ++#define VFIO_ATTR_WINDOWS 1 ++#define VFIO_ATTR_PAMU_STASH 2 ++ __u32 attribute; ++ ++ union { ++ /* VFIO_ATTR_GEOMETRY */ ++ struct { ++ /* first addr that can be mapped */ ++ __u64 aperture_start; ++ /* last addr that can be mapped */ ++ __u64 aperture_end; ++ } attr; ++ ++ /* VFIO_ATTR_WINDOWS */ ++ __u32 windows; /* number of windows in the aperture ++ * initially this will be the max number ++ * of windows that can be set ++ */ ++ /* VFIO_ATTR_PAMU_STASH */ ++ struct { ++ __u32 cpu; /* CPU number for stashing */ ++ __u32 cache; /* cache ID for stashing */ ++ } stash; ++ } attr_info; ++}; ++#define VFIO_IOMMU_PAMU_GET_ATTR _IO(VFIO_TYPE, VFIO_BASE + 15) ++ ++/* ++ * VFIO_IOMMU_PAMU_SET_ATTR - _IO(VFIO_TYPE, VFIO_BASE + 16, ++ * struct vfio_pamu_attr) ++ * ++ * Sets the iommu attributes for the current vfio container. ++ * Caller sets struct vfio_pamu attr, including argsz and attribute and ++ * setting any fields that are valid for the attribute. ++ * Return: 0 on success, -errno on failure ++ */ ++#define VFIO_IOMMU_PAMU_SET_ATTR _IO(VFIO_TYPE, VFIO_BASE + 16) ++ ++/* ++ * VFIO_IOMMU_PAMU_GET_MSI_BANK_COUNT - _IO(VFIO_TYPE, VFIO_BASE + 17, __u32) ++ * ++ * Returns the number of MSI banks for this platform. This tells user space ++ * how many aperture windows should be reserved for MSI banks when setting ++ * the PAMU geometry and window count. ++ * Return: __u32 bank count on success, -errno on failure ++ */ ++#define VFIO_IOMMU_PAMU_GET_MSI_BANK_COUNT _IO(VFIO_TYPE, VFIO_BASE + 17) ++ ++/* ++ * VFIO_IOMMU_PAMU_MAP_MSI_BANK - _IO(VFIO_TYPE, VFIO_BASE + 18, ++ * struct vfio_pamu_msi_bank_map) ++ * ++ * Maps the MSI bank at the specified index and iova. User space must ++ * call this ioctl once for each MSI bank (count of banks is returned by ++ * VFIO_IOMMU_PAMU_GET_MSI_BANK_COUNT). ++ * Caller provides struct vfio_pamu_msi_bank_map with all fields set. ++ * Return: 0 on success, -errno on failure ++ */ ++ ++struct vfio_pamu_msi_bank_map { ++ __u32 argsz; ++ __u32 flags; /* no flags currently */ ++ __u32 msi_bank_index; /* the index of the MSI bank */ ++ __u64 iova; /* the iova the bank is to be mapped to */ ++}; ++#define VFIO_IOMMU_PAMU_MAP_MSI_BANK _IO(VFIO_TYPE, VFIO_BASE + 18) ++ ++/* ++ * VFIO_IOMMU_PAMU_UNMAP_MSI_BANK - _IO(VFIO_TYPE, VFIO_BASE + 19, ++ * struct vfio_pamu_msi_bank_unmap) ++ * ++ * Unmaps the MSI bank at the specified iova. ++ * Caller provides struct vfio_pamu_msi_bank_unmap with all fields set. ++ * Operates on VFIO file descriptor (/dev/vfio/vfio). ++ * Return: 0 on success, -errno on failure ++ */ ++ ++struct vfio_pamu_msi_bank_unmap { ++ __u32 argsz; ++ __u32 flags; /* no flags currently */ ++ __u64 iova; /* the iova to be unmapped to */ ++}; ++#define VFIO_IOMMU_PAMU_UNMAP_MSI_BANK _IO(VFIO_TYPE, VFIO_BASE + 19) ++ ++/* ++ * IOCTLs to enable/disable IOMMU container usage. ++ * No parameters are supported. ++ */ ++#define VFIO_IOMMU_ENABLE _IO(VFIO_TYPE, VFIO_BASE + 15) ++#define VFIO_IOMMU_DISABLE _IO(VFIO_TYPE, VFIO_BASE + 16) ++ ++/* -------- Additional API for SPAPR TCE (Server POWERPC) IOMMU -------- */ ++ ++/* ++ * The SPAPR TCE info struct provides the information about the PCI bus ++ * address ranges available for DMA, these values are programmed into ++ * the hardware so the guest has to know that information. ++ * ++ * The DMA 32 bit window start is an absolute PCI bus address. ++ * The IOVA address passed via map/unmap ioctls are absolute PCI bus ++ * addresses too so the window works as a filter rather than an offset ++ * for IOVA addresses. ++ * ++ * A flag will need to be added if other page sizes are supported, ++ * so as defined here, it is always 4k. ++ */ ++struct vfio_iommu_spapr_tce_info { ++ __u32 argsz; ++ __u32 flags; /* reserved for future use */ ++ __u32 dma32_window_start; /* 32 bit window start (bytes) */ ++ __u32 dma32_window_size; /* 32 bit window size (bytes) */ ++}; ++ ++#define VFIO_IOMMU_SPAPR_TCE_GET_INFO _IO(VFIO_TYPE, VFIO_BASE + 12) ++ ++/* ***************************************************************** */ ++ ++#endif /* _UAPIVFIO_H */ +-- +1.8.3.2 + diff --git a/meta-fsl-ppc/recipes-extended/skmm-ep/skmm-ep_git.bb b/meta-fsl-ppc/recipes-extended/skmm-ep/skmm-ep_git.bb index 65659b9a..145b1d9f 100644 --- a/meta-fsl-ppc/recipes-extended/skmm-ep/skmm-ep_git.bb +++ b/meta-fsl-ppc/recipes-extended/skmm-ep/skmm-ep_git.bb @@ -5,7 +5,9 @@ LIC_FILES_CHKSUM = "file://Makefile;endline=30;md5=39e58bedc879163c9338596e52df5 DEPENDS = "libedit openssl" -SRC_URI = "git://git.freescale.com/ppc/sdk/skmm-ep.git;nobranch=1" +SRC_URI = "git://git.freescale.com/ppc/sdk/skmm-ep.git;nobranch=1 \ + file://add-two-missing-header-files.patch \ +" SRCREV = "448522aa1ba3f0c4a1481631dc1c3b168d410a61" COMPATIBLE_MACHINE = "(p4080ds|t4240qds|c293pcie)" -- cgit v1.2.3-54-g00ecf From 5b7bd2ce51dea459471c68ed2dcb18d12efa02ec Mon Sep 17 00:00:00 2001 From: Chunrong Guo Date: Wed, 23 Jul 2014 14:58:40 +0800 Subject: u-boot-qoriq: rename to match verion 2014.01 Signed-off-by: Chunrong Guo --- .../recipes-bsp/u-boot/u-boot-qoriq_2014.01.bb | 179 +++++++++++++++++++++ .../recipes-bsp/u-boot/u-boot-qoriq_git.bb | 179 --------------------- 2 files changed, 179 insertions(+), 179 deletions(-) create mode 100644 meta-fsl-ppc/recipes-bsp/u-boot/u-boot-qoriq_2014.01.bb delete mode 100644 meta-fsl-ppc/recipes-bsp/u-boot/u-boot-qoriq_git.bb diff --git a/meta-fsl-ppc/recipes-bsp/u-boot/u-boot-qoriq_2014.01.bb b/meta-fsl-ppc/recipes-bsp/u-boot/u-boot-qoriq_2014.01.bb new file mode 100644 index 00000000..e16438f1 --- /dev/null +++ b/meta-fsl-ppc/recipes-bsp/u-boot/u-boot-qoriq_2014.01.bb @@ -0,0 +1,179 @@ +DESCRIPTION = "U-boot bootloader" +HOMEPAGE = "http://u-boot.sf.net" +SECTION = "bootloaders" +PROVIDES = "virtual/bootloader u-boot" +LICENSE = "GPLv2 & BSD-3-Clause & BSD-2-Clause & LGPL-2.0 & LGPL-2.1" +LIC_FILES_CHKSUM = " \ + file://Licenses/gpl-2.0.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://Licenses/bsd-2-clause.txt;md5=6a31f076f5773aabd8ff86191ad6fdd5 \ + file://Licenses/bsd-3-clause.txt;md5=4a1190eac56a9db675d58ebe86eaf50c \ + file://Licenses/lgpl-2.0.txt;md5=5f30f0716dfdd0d91eb439ebec522ec2 \ + file://Licenses/lgpl-2.1.txt;md5=4fbd65380cdd255951079008b364516c \ +" + +PV = "2014.01+fslgit" +INHIBIT_DEFAULT_DEPS = "1" +DEPENDS = "boot-format-native libgcc ${@base_contains('TCMODE', 'external-fsl', '', 'virtual/${TARGET_PREFIX}gcc', d)}" + +inherit deploy + +SRC_URI = "git://git.freescale.com/ppc/sdk/u-boot.git;nobranch=1" +SRCREV = "fe1d4f5739e752ad45ada6227a9fb19590af7194" + +python () { + if d.getVar("TCMODE", True) == "external-fsl": + return + + ml = d.getVar("MULTILIB_VARIANTS", True) + arch = d.getVar("OVERRIDES", True) + + if ("e5500-64b:" in arch or "e6500-64b:" in arch) and not "lib32" in ml: + raise bb.parse.SkipPackage("Building the u-boot for this arch requires multilib to be enabled") +} + +DEPENDS_append_e5500-64b = "${@base_contains('TCMODE', 'external-fsl', '', ' lib32-gcc-cross-powerpc lib32-libgcc', d)}" +PATH_append_e5500-64b = ":${STAGING_BINDIR_NATIVE}/powerpc${TARGET_VENDOR_virtclass-multilib-lib32}-${HOST_OS}/" +TOOLCHAIN_OPTIONS_append_e5500-64b = "${@base_contains('TCMODE', 'external-fsl', '', '/../lib32-${MACHINE}', d)}" +TARGET_VENDOR_virtclass-multilib-lib32 ?= "${@base_contains('TCMODE', 'external-fsl', '', '-${DISTRO}mllib32', d)}" +WRAP_TARGET_PREFIX_e5500-64b := "powerpc${TARGET_VENDOR_virtclass-multilib-lib32}-${HOST_OS}-" + +DEPENDS_append_e6500-64b = "${@base_contains('TCMODE', 'external-fsl', '', ' lib32-gcc-cross-powerpc lib32-libgcc', d)}" +PATH_append_e6500-64b = ":${STAGING_BINDIR_NATIVE}/powerpc${TARGET_VENDOR_virtclass-multilib-lib32}-${HOST_OS}/" +TOOLCHAIN_OPTIONS_append_e6500-64b = "${@base_contains('TCMODE', 'external-fsl', '', '/../lib32-${MACHINE}', d)}" +TARGET_VENDOR_virtclass-multilib-lib32 ?= "${@base_contains('TCMODE', 'external-fsl', '', '-${DISTRO}mllib32', d)}" +WRAP_TARGET_PREFIX_e6500-64b := "powerpc${TARGET_VENDOR_virtclass-multilib-lib32}-${HOST_OS}-" +WRAP_TARGET_PREFIX = "${TARGET_PREFIX}" + +PACKAGE_ARCH = "${MACHINE_ARCH}" + +UBOOT_LOCALVERSION = "${@d.getVar('SDK_VERSION', True).partition(' ')[0]}" + +USRC ?= "" +S = '${@base_conditional("USRC", "", "${WORKDIR}/git", "${USRC}", d)}' + +CROSS_COMPILE = '${@base_conditional("TCMODE", "external-fsl", "${TARGET_PREFIX}", "${WRAP_TARGET_PREFIX}", d)}' +EXTRA_OEMAKE = 'CROSS_COMPILE=${CROSS_COMPILE} CC="${CROSS_COMPILE}gcc ${TOOLCHAIN_OPTIONS}"' + +do_compile () { + unset LDFLAGS + unset CFLAGS + unset CPPFLAGS + + if [ ! -e ${B}/.scmversion -a ! -e ${S}/.scmversion ] + then + head=`git rev-parse --verify --short HEAD 2> /dev/null` + printf "%s%s%s" ${UBOOT_LOCALVERSION} +g $head > ${B}/.scmversion + printf "%s%s%s" ${UBOOT_LOCALVERSION} +g $head > ${S}/.scmversion + fi + + if [ "x${UBOOT_MACHINES}" = "x" ]; then + UBOOT_MACHINES=${UBOOT_MACHINE} + fi + + for board in ${UBOOT_MACHINES}; do + if ! grep -wq $board ${S}/boards.cfg;then + echo "WARNING: $board not supported in boards.cfg" + continue + fi + + oe_runmake O=${board} distclean + oe_runmake O=${board} ${board} + oe_runmake O=${board} all + + case "${board}" in + *SDCARD*) UBOOT_TARGET="u-boot-sd";; + *SPIFLASH*) UBOOT_TARGET="u-boot-spi";; + *NAND*) UBOOT_TARGET="u-boot-nand";; + *SRIO*) UBOOT_TARGET="u-boot-srio";; + *) UBOOT_TARGET="";; + esac + + # deal with sd/spi/nand/srio image + UBOOT_SOURCE=u-boot + if [ "x${UBOOT_TARGET}" != "x" ]; then + # some boards' nand image was named as u-boot-with-spl + if [ "${UBOOT_TARGET}" = "u-boot-nand" ];then + if echo $board |egrep -q "(P1010RDB|P1020RDB|P1021RDB|P2020RDB|P1022DS|BSC913|C293)";then + UBOOT_SOURCE=u-boot-with-spl + fi + elif [ "${UBOOT_TARGET}" = "u-boot-spi" ];then + if echo $board |egrep -q "(P1010RDB|P1020RDB|P1021RDB|P2020RDB|P1022DS)";then + UBOOT_SOURCE=u-boot-with-spl + fi + elif [ "${UBOOT_TARGET}" = "u-boot-sd" ];then + if echo $board |egrep -q "(P1010RDB|P1020RDB|P1021RDB|P2020RDB|P1022DS)";then + UBOOT_SOURCE=u-boot-with-spl + fi + fi + cp ${S}/${board}/${UBOOT_SOURCE}.bin ${S}/${board}/${UBOOT_TARGET}.bin + + # use boot-format to regenerate spi image if BOOTFORMAT_CONFIG is not empty + if [ "${UBOOT_TARGET}" = "u-boot-spi" ] && [ -n "${BOOTFORMAT_CONFIG}" ];then + ${STAGING_BINDIR_NATIVE}/boot_format \ + ${STAGING_DATADIR_NATIVE}/boot_format/${BOOTFORMAT_CONFIG} \ + ${S}/${board}/${UBOOT_SOURCE}.bin -spi ${S}/${board}/${UBOOT_TARGET}.bin + fi + fi + done +} + +do_install(){ + if [ "x${UBOOT_MACHINES}" = "x" ]; then + UBOOT_MACHINES=${UBOOT_MACHINE} + fi + + for board in ${UBOOT_MACHINES}; do + if ! grep -wq $board ${S}/boards.cfg;then + continue + fi + + case "${board}" in + *SDCARD*) UBOOT_TARGET="u-boot-sd";; + *SPIFLASH*) UBOOT_TARGET="u-boot-spi";; + *NAND*) UBOOT_TARGET="u-boot-nand";; + *SRIO*) UBOOT_TARGET="u-boot-srio";; + *) UBOOT_TARGET="u-boot";; + esac + + if [ -f ${S}/${board}/${UBOOT_TARGET}.bin ]; then + mkdir -p ${D}/boot/ + install ${S}/${board}/${UBOOT_TARGET}.bin ${D}/boot/${UBOOT_TARGET}-${board}-${PV}-${PR}.bin + ln -sf ${UBOOT_TARGET}-${board}-${PV}-${PR}.bin ${D}/boot/${UBOOT_TARGET}.bin + fi + done +} + +do_deploy(){ + if [ "x${UBOOT_MACHINES}" = "x" ]; then + UBOOT_MACHINES=${UBOOT_MACHINE} + fi + + for board in ${UBOOT_MACHINES}; do + if ! grep -wq $board ${S}/boards.cfg;then + continue + fi + + case "${board}" in + *SDCARD*) UBOOT_TARGET="u-boot-sd";; + *SPIFLASH*) UBOOT_TARGET="u-boot-spi";; + *NAND*) UBOOT_TARGET="u-boot-nand";; + *SRIO*) UBOOT_TARGET="u-boot-srio";; + *) UBOOT_TARGET="u-boot";; + esac + + if [ -f ${S}/${board}/${UBOOT_TARGET}.bin ]; then + mkdir -p ${DEPLOYDIR} + install ${S}/${board}/${UBOOT_TARGET}.bin ${DEPLOYDIR}/${UBOOT_TARGET}-${board}-${PV}-${PR}.bin + + cd ${DEPLOYDIR} + rm -f ${UBOOT_TARGET}-${board}.bin + ln -sf ${UBOOT_TARGET}-${board}-${PV}-${PR}.bin ${UBOOT_TARGET}-${board}.bin + fi + done +} +addtask deploy after do_install + +PACKAGES += "${PN}-images" +FILES_${PN}-images += "/boot" + +ALLOW_EMPTY_${PN} = "1" diff --git a/meta-fsl-ppc/recipes-bsp/u-boot/u-boot-qoriq_git.bb b/meta-fsl-ppc/recipes-bsp/u-boot/u-boot-qoriq_git.bb deleted file mode 100644 index e16438f1..00000000 --- a/meta-fsl-ppc/recipes-bsp/u-boot/u-boot-qoriq_git.bb +++ /dev/null @@ -1,179 +0,0 @@ -DESCRIPTION = "U-boot bootloader" -HOMEPAGE = "http://u-boot.sf.net" -SECTION = "bootloaders" -PROVIDES = "virtual/bootloader u-boot" -LICENSE = "GPLv2 & BSD-3-Clause & BSD-2-Clause & LGPL-2.0 & LGPL-2.1" -LIC_FILES_CHKSUM = " \ - file://Licenses/gpl-2.0.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - file://Licenses/bsd-2-clause.txt;md5=6a31f076f5773aabd8ff86191ad6fdd5 \ - file://Licenses/bsd-3-clause.txt;md5=4a1190eac56a9db675d58ebe86eaf50c \ - file://Licenses/lgpl-2.0.txt;md5=5f30f0716dfdd0d91eb439ebec522ec2 \ - file://Licenses/lgpl-2.1.txt;md5=4fbd65380cdd255951079008b364516c \ -" - -PV = "2014.01+fslgit" -INHIBIT_DEFAULT_DEPS = "1" -DEPENDS = "boot-format-native libgcc ${@base_contains('TCMODE', 'external-fsl', '', 'virtual/${TARGET_PREFIX}gcc', d)}" - -inherit deploy - -SRC_URI = "git://git.freescale.com/ppc/sdk/u-boot.git;nobranch=1" -SRCREV = "fe1d4f5739e752ad45ada6227a9fb19590af7194" - -python () { - if d.getVar("TCMODE", True) == "external-fsl": - return - - ml = d.getVar("MULTILIB_VARIANTS", True) - arch = d.getVar("OVERRIDES", True) - - if ("e5500-64b:" in arch or "e6500-64b:" in arch) and not "lib32" in ml: - raise bb.parse.SkipPackage("Building the u-boot for this arch requires multilib to be enabled") -} - -DEPENDS_append_e5500-64b = "${@base_contains('TCMODE', 'external-fsl', '', ' lib32-gcc-cross-powerpc lib32-libgcc', d)}" -PATH_append_e5500-64b = ":${STAGING_BINDIR_NATIVE}/powerpc${TARGET_VENDOR_virtclass-multilib-lib32}-${HOST_OS}/" -TOOLCHAIN_OPTIONS_append_e5500-64b = "${@base_contains('TCMODE', 'external-fsl', '', '/../lib32-${MACHINE}', d)}" -TARGET_VENDOR_virtclass-multilib-lib32 ?= "${@base_contains('TCMODE', 'external-fsl', '', '-${DISTRO}mllib32', d)}" -WRAP_TARGET_PREFIX_e5500-64b := "powerpc${TARGET_VENDOR_virtclass-multilib-lib32}-${HOST_OS}-" - -DEPENDS_append_e6500-64b = "${@base_contains('TCMODE', 'external-fsl', '', ' lib32-gcc-cross-powerpc lib32-libgcc', d)}" -PATH_append_e6500-64b = ":${STAGING_BINDIR_NATIVE}/powerpc${TARGET_VENDOR_virtclass-multilib-lib32}-${HOST_OS}/" -TOOLCHAIN_OPTIONS_append_e6500-64b = "${@base_contains('TCMODE', 'external-fsl', '', '/../lib32-${MACHINE}', d)}" -TARGET_VENDOR_virtclass-multilib-lib32 ?= "${@base_contains('TCMODE', 'external-fsl', '', '-${DISTRO}mllib32', d)}" -WRAP_TARGET_PREFIX_e6500-64b := "powerpc${TARGET_VENDOR_virtclass-multilib-lib32}-${HOST_OS}-" -WRAP_TARGET_PREFIX = "${TARGET_PREFIX}" - -PACKAGE_ARCH = "${MACHINE_ARCH}" - -UBOOT_LOCALVERSION = "${@d.getVar('SDK_VERSION', True).partition(' ')[0]}" - -USRC ?= "" -S = '${@base_conditional("USRC", "", "${WORKDIR}/git", "${USRC}", d)}' - -CROSS_COMPILE = '${@base_conditional("TCMODE", "external-fsl", "${TARGET_PREFIX}", "${WRAP_TARGET_PREFIX}", d)}' -EXTRA_OEMAKE = 'CROSS_COMPILE=${CROSS_COMPILE} CC="${CROSS_COMPILE}gcc ${TOOLCHAIN_OPTIONS}"' - -do_compile () { - unset LDFLAGS - unset CFLAGS - unset CPPFLAGS - - if [ ! -e ${B}/.scmversion -a ! -e ${S}/.scmversion ] - then - head=`git rev-parse --verify --short HEAD 2> /dev/null` - printf "%s%s%s" ${UBOOT_LOCALVERSION} +g $head > ${B}/.scmversion - printf "%s%s%s" ${UBOOT_LOCALVERSION} +g $head > ${S}/.scmversion - fi - - if [ "x${UBOOT_MACHINES}" = "x" ]; then - UBOOT_MACHINES=${UBOOT_MACHINE} - fi - - for board in ${UBOOT_MACHINES}; do - if ! grep -wq $board ${S}/boards.cfg;then - echo "WARNING: $board not supported in boards.cfg" - continue - fi - - oe_runmake O=${board} distclean - oe_runmake O=${board} ${board} - oe_runmake O=${board} all - - case "${board}" in - *SDCARD*) UBOOT_TARGET="u-boot-sd";; - *SPIFLASH*) UBOOT_TARGET="u-boot-spi";; - *NAND*) UBOOT_TARGET="u-boot-nand";; - *SRIO*) UBOOT_TARGET="u-boot-srio";; - *) UBOOT_TARGET="";; - esac - - # deal with sd/spi/nand/srio image - UBOOT_SOURCE=u-boot - if [ "x${UBOOT_TARGET}" != "x" ]; then - # some boards' nand image was named as u-boot-with-spl - if [ "${UBOOT_TARGET}" = "u-boot-nand" ];then - if echo $board |egrep -q "(P1010RDB|P1020RDB|P1021RDB|P2020RDB|P1022DS|BSC913|C293)";then - UBOOT_SOURCE=u-boot-with-spl - fi - elif [ "${UBOOT_TARGET}" = "u-boot-spi" ];then - if echo $board |egrep -q "(P1010RDB|P1020RDB|P1021RDB|P2020RDB|P1022DS)";then - UBOOT_SOURCE=u-boot-with-spl - fi - elif [ "${UBOOT_TARGET}" = "u-boot-sd" ];then - if echo $board |egrep -q "(P1010RDB|P1020RDB|P1021RDB|P2020RDB|P1022DS)";then - UBOOT_SOURCE=u-boot-with-spl - fi - fi - cp ${S}/${board}/${UBOOT_SOURCE}.bin ${S}/${board}/${UBOOT_TARGET}.bin - - # use boot-format to regenerate spi image if BOOTFORMAT_CONFIG is not empty - if [ "${UBOOT_TARGET}" = "u-boot-spi" ] && [ -n "${BOOTFORMAT_CONFIG}" ];then - ${STAGING_BINDIR_NATIVE}/boot_format \ - ${STAGING_DATADIR_NATIVE}/boot_format/${BOOTFORMAT_CONFIG} \ - ${S}/${board}/${UBOOT_SOURCE}.bin -spi ${S}/${board}/${UBOOT_TARGET}.bin - fi - fi - done -} - -do_install(){ - if [ "x${UBOOT_MACHINES}" = "x" ]; then - UBOOT_MACHINES=${UBOOT_MACHINE} - fi - - for board in ${UBOOT_MACHINES}; do - if ! grep -wq $board ${S}/boards.cfg;then - continue - fi - - case "${board}" in - *SDCARD*) UBOOT_TARGET="u-boot-sd";; - *SPIFLASH*) UBOOT_TARGET="u-boot-spi";; - *NAND*) UBOOT_TARGET="u-boot-nand";; - *SRIO*) UBOOT_TARGET="u-boot-srio";; - *) UBOOT_TARGET="u-boot";; - esac - - if [ -f ${S}/${board}/${UBOOT_TARGET}.bin ]; then - mkdir -p ${D}/boot/ - install ${S}/${board}/${UBOOT_TARGET}.bin ${D}/boot/${UBOOT_TARGET}-${board}-${PV}-${PR}.bin - ln -sf ${UBOOT_TARGET}-${board}-${PV}-${PR}.bin ${D}/boot/${UBOOT_TARGET}.bin - fi - done -} - -do_deploy(){ - if [ "x${UBOOT_MACHINES}" = "x" ]; then - UBOOT_MACHINES=${UBOOT_MACHINE} - fi - - for board in ${UBOOT_MACHINES}; do - if ! grep -wq $board ${S}/boards.cfg;then - continue - fi - - case "${board}" in - *SDCARD*) UBOOT_TARGET="u-boot-sd";; - *SPIFLASH*) UBOOT_TARGET="u-boot-spi";; - *NAND*) UBOOT_TARGET="u-boot-nand";; - *SRIO*) UBOOT_TARGET="u-boot-srio";; - *) UBOOT_TARGET="u-boot";; - esac - - if [ -f ${S}/${board}/${UBOOT_TARGET}.bin ]; then - mkdir -p ${DEPLOYDIR} - install ${S}/${board}/${UBOOT_TARGET}.bin ${DEPLOYDIR}/${UBOOT_TARGET}-${board}-${PV}-${PR}.bin - - cd ${DEPLOYDIR} - rm -f ${UBOOT_TARGET}-${board}.bin - ln -sf ${UBOOT_TARGET}-${board}-${PV}-${PR}.bin ${UBOOT_TARGET}-${board}.bin - fi - done -} -addtask deploy after do_install - -PACKAGES += "${PN}-images" -FILES_${PN}-images += "/boot" - -ALLOW_EMPTY_${PN} = "1" -- cgit v1.2.3-54-g00ecf From f3b3cadcd6c0e19055199cd9dbad2a2d17710338 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Thu, 24 Jul 2014 10:44:22 +0800 Subject: set BB_DANGLINGAPPENDS_WARNONLY as true a ppc specific patch for luajit (exist in mete-oe) was moved to this layer recently. set BB_DANGLINGAPPENDS_WARNONLY as true for the situation where meta-oe was not pulled in. Signed-off-by: Ting Liu --- meta-fsl-ppc/conf/layer.conf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/meta-fsl-ppc/conf/layer.conf b/meta-fsl-ppc/conf/layer.conf index 9c0a4125..ceab6292 100644 --- a/meta-fsl-ppc/conf/layer.conf +++ b/meta-fsl-ppc/conf/layer.conf @@ -13,3 +13,5 @@ BB_ENV_EXTRAWHITE := "KSRC USRC" LICENSE_PATH += "${LAYERDIR}/custom-licenses" +BB_DANGLINGAPPENDS_WARNONLY ?= "true" + -- cgit v1.2.3-54-g00ecf From 31c3d85e4a9e44c732bd641eecaeaa60a7f9de6c Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Thu, 24 Jul 2014 10:44:23 +0800 Subject: README: add dependency on meta-openembedded some fsl own pkgs depend on pkgs in meta-openembeded. for example, asf needs ipsec-tools, usdpaa/skmm-ep needs libedit, fmc needs tclap. Signed-off-by: Ting Liu --- meta-fsl-ppc/README | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/meta-fsl-ppc/README b/meta-fsl-ppc/README index 39a54bf4..10158ef9 100644 --- a/meta-fsl-ppc/README +++ b/meta-fsl-ppc/README @@ -10,6 +10,10 @@ URI: git://git.openembedded.org/openembedded-core branch: master revision: HEAD +URI: git://git.openembedded.org/meta-openembedded +branch: master +revision: HEAD + Contributing ------------ -- cgit v1.2.3-54-g00ecf From cfcf554c7a3f8d2bb5b10bb423651ade9c347841 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Thu, 24 Jul 2014 10:44:24 +0800 Subject: libedit/tclap: remove they already exist in meta-openembeded layer, remove Signed-off-by: Ting Liu --- .../recipes-devtools/libedit/libedit_20121213.bb | 18 ------------------ meta-fsl-ppc/recipes-devtools/tclap/tclap_1.2.1.bb | 17 ----------------- 2 files changed, 35 deletions(-) delete mode 100644 meta-fsl-ppc/recipes-devtools/libedit/libedit_20121213.bb delete mode 100644 meta-fsl-ppc/recipes-devtools/tclap/tclap_1.2.1.bb diff --git a/meta-fsl-ppc/recipes-devtools/libedit/libedit_20121213.bb b/meta-fsl-ppc/recipes-devtools/libedit/libedit_20121213.bb deleted file mode 100644 index 08dba440..00000000 --- a/meta-fsl-ppc/recipes-devtools/libedit/libedit_20121213.bb +++ /dev/null @@ -1,18 +0,0 @@ -DESCRIPTION = "BSD replacement for libreadline" -HOMEPAGE = "http://www.thrysoee.dk/editline/" -SECTION = "libs" -LICENSE = "BSD" -LIC_FILES_CHKSUM = "file://COPYING;md5=1e4228d0c5a9093b01aeaaeae6641533" - -DEPENDS = "ncurses" - -inherit autotools - -# upstream site does not allow wget's User-Agent -FETCHCMD_wget += "-U bitbake" -SRC_URI = "http://www.thrysoee.dk/editline/${BPN}-${PV}-3.0.tar.gz" - -S = "${WORKDIR}/${BPN}-${PV}-3.0" - -SRC_URI[md5sum] = "f475f50fe7467c1074c0fbae8b5bca1a" -SRC_URI[sha256sum] = "0379e4a73c219f260e6d16adbc2e87635532ebb4c5a83a7399f231dc40108d1f" diff --git a/meta-fsl-ppc/recipes-devtools/tclap/tclap_1.2.1.bb b/meta-fsl-ppc/recipes-devtools/tclap/tclap_1.2.1.bb deleted file mode 100644 index aa478b58..00000000 --- a/meta-fsl-ppc/recipes-devtools/tclap/tclap_1.2.1.bb +++ /dev/null @@ -1,17 +0,0 @@ -DESCRIPTION = "Templatized C++ Command Line Parser" -HOMEPAGE = "http://tclap.sourceforge.net/" -SECTION = "tclap" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://COPYING;md5=c8ab0ff134bcc584d0e6b5b9f8732453" - -SRCREV = "3627d9402e529770df9b0edf2aa8c0e0d6c6bb41" -SRC_URI = "git://tclap.git.sourceforge.net/gitroot/tclap/tclap;protocal=git;branch=master" - -S = "${WORKDIR}/git" -inherit autotools - -do_install_prepend() { - install -d ${S}/docs/html -} - -BBCLASSEXTEND = "native nativesdk" -- cgit v1.2.3-54-g00ecf From bb2a86b76a88d70bb711048bb10510c3ace30655 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Thu, 24 Jul 2014 15:48:12 +0800 Subject: add cs4315-firmware license file Cortina Signed-off-by: Ting Liu --- meta-fsl-ppc/custom-licenses/Cortina | 51 ++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 meta-fsl-ppc/custom-licenses/Cortina diff --git a/meta-fsl-ppc/custom-licenses/Cortina b/meta-fsl-ppc/custom-licenses/Cortina new file mode 100644 index 00000000..a68417c5 --- /dev/null +++ b/meta-fsl-ppc/custom-licenses/Cortina @@ -0,0 +1,51 @@ +DEFINITIONS:“Device†is the product described in this document or document set. “Cortina†is Cortina Systems, Inc. +“Software†is the software used with the Device, including the Application Programmable Interface (“APIâ€). “You†are a +customer, or potential customer, of Devices with whom Cortina has an NDA. +LICENSE:Subject to the restrictions below, Cortina grants to You a non-exclusive, non-assignable, non-transferable, +royalty-free copyright license to (1) copy and modify the source code of the API; (2) incorporate the API in object code +form or as a library into Your software which is solely used with Your products (that incorporate the Devices); and (3) +distribute to Your customer, inobject code form only, the API. +RESTRICTIONS:The Software must be used solely in conjunction with the Devices and solely for Your internal +evaluation, demonstration, software application development anddistribution for production purposes, either with an +Cortina platform that contains the Device or with Your own product that incorporates the Device. Notwithstanding +anything to the contrary, the API can be incorporated into Your software as described above and distributed to Your +customers in object code form only. You may not distribute the Software as a stand-alone product. You shall not cause +the incorporation, modification or distribution of the Software to become subject to any open source licenses. You will +make reasonable efforts to discontinue the distribution of any portions of the Software that You are licensed hereunder +to distribute upon Cortina’s release of an update, upgrade or new version of the Software. You agree that You are +solely responsible for supporting any code which You modify, incorporate or distribute. You may not reverse-assemble, +reverse-compile, or otherwise reverse-engineer any Software provided in binary or machine readable form. +Distribution of the Software is also subject to the following limitations: You (i) are solely responsible to Your customers +for any update or support obligation or other liability which may arise from the modification, incorporation, and +distribution of the Software, (ii) do notmake any statement that Your product is“certified,†or that its performance is +guaranteed, by Cortina, (iii) do not use Cortina's name or trademarks to market Your product without prior written +permission, (iv) shall prohibit disassembly and reverse engineering, and (v) shall indemnify, hold harmless, and defend +Cortina and its suppliers from and against any claims or lawsuits, including attorney's fees, that arise or result from +Your distribution of any product. +OWNERSHIP OF SOFTWARE AND COPYRIGHTS.The title to all copies of the Software remains with Cortina or its +suppliers. The Software is copyrighted and protected by the laws of the United States and other countries, and +international treaty provisions. You may not remove any copyright notices from the Software. Cortina may make +changes to the Software, or to items referenced therein, at any timewithout notice, but is not obligated to support or +update the Software. Except as otherwise expressly provided,Cortina grants no express or implied right under Cortina +patents, copyrights, trademarks, or other intellectual property rights. +DISCLAIMER OF WARRANTIES.THE SOFTWARE IS PROVIDED “AS IS†WITHOUT ANY EXPRESS OR IMPLIED +WARRANTY OF ANY KIND. CORTINA AND ITS SUPPLIERSHEREBY DISCLAIM ALL WARRANTIES, INCLUDING +ANY IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT, OR FITNESS FOR A PARTICULAR +PURPOSE. +LIMITATION OF LIABILITY.IN NO EVENT SHALL CORTINA OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES +WHATSOEVER (INCLUDING, WITHOUT LIMITATION, LOST PROFITS, BUSINESS INTERRUPTION, OR LOST +INFORMATION) ARISING OUT OF THE USE OF OR INABILITY TO USE THE SOFTWARE, EVEN IF CORTINA HAS +BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. +TERMINATION OF THIS LICENSE.Cortina may terminate this license at any time if You violate its terms. Upon +termination, You will immediately destroy the Software or return all copies of the Software to Cortina. +APPLICABLE LAWS.Claims arising under this license shall be governed by the laws of the State of Delaware, +excluding its principles of conflict of laws. The provisions of the United Nations Convention on Contracts for the +International Sale of Goods shall not apply to this license.You shall not export, either directly or indirectly, any +Software or derived object code without first obtaining any required license or other approval from the applicable +governmental entity, including the U.S. Department of Commerce or any other agency or department of the United +States Government if required. This isthe entire agreement and understanding between You and Cortina relating to +this subject matter, and no amendments will be effective unless in a writing signed by both parties. +GOVERNMENT RESTRICTED RIGHTS.The Software is provided with “RESTRICTED RIGHTS.†Use, duplication, or +disclosure by the Government issubject to restrictions as set forth in FAR52.227-14 and DFAR252.227-7013 et seq. or +its successor. Use of the Software by the Government constitutes acknowledgment of Cortina's proprietary rights +therein. Contractor or Manufacturer is Cortina. -- cgit v1.2.3-54-g00ecf From 2fc8578b5733e4b3286d9e7586c0ce8664fa42b8 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Thu, 24 Jul 2014 15:48:13 +0800 Subject: add more generic SOC_FAMILY name t1/t2/t4/b4 currently the SOC_FAMILY name only cover 32b/64b for each one. add a more generic one to make it more usable. Signed-off-by: Ting Liu --- meta-fsl-ppc/conf/machine/b4420qds-64b.conf | 2 +- meta-fsl-ppc/conf/machine/b4420qds.conf | 2 +- meta-fsl-ppc/conf/machine/b4860qds-64b.conf | 2 +- meta-fsl-ppc/conf/machine/b4860qds.conf | 2 +- meta-fsl-ppc/conf/machine/t1040rdb-64b.conf | 2 +- meta-fsl-ppc/conf/machine/t1040rdb.conf | 2 +- meta-fsl-ppc/conf/machine/t1042rdb-64b.conf | 2 +- meta-fsl-ppc/conf/machine/t1042rdb.conf | 2 +- meta-fsl-ppc/conf/machine/t2080qds-64b.conf | 2 +- meta-fsl-ppc/conf/machine/t2080qds.conf | 2 +- meta-fsl-ppc/conf/machine/t2080rdb-64b.conf | 2 +- meta-fsl-ppc/conf/machine/t2080rdb.conf | 2 +- meta-fsl-ppc/conf/machine/t4160qds-64b.conf | 2 +- meta-fsl-ppc/conf/machine/t4160qds.conf | 2 +- meta-fsl-ppc/conf/machine/t4240qds-64b.conf | 2 +- meta-fsl-ppc/conf/machine/t4240qds.conf | 2 +- meta-fsl-ppc/conf/machine/t4240rdb-64b.conf | 2 +- meta-fsl-ppc/conf/machine/t4240rdb.conf | 2 +- 18 files changed, 18 insertions(+), 18 deletions(-) diff --git a/meta-fsl-ppc/conf/machine/b4420qds-64b.conf b/meta-fsl-ppc/conf/machine/b4420qds-64b.conf index a623c84f..c0487d90 100644 --- a/meta-fsl-ppc/conf/machine/b4420qds-64b.conf +++ b/meta-fsl-ppc/conf/machine/b4420qds-64b.conf @@ -6,7 +6,7 @@ require conf/machine/include/e6500-64b.inc -SOC_FAMILY = "b4420" +SOC_FAMILY = "b4:b4420" UBOOT_MACHINES ?= "B4420QDS" KERNEL_DEVICETREE ?= "b4420qds.dtb b4420qds-usdpaa.dtb" KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/85xx/e6500rev2_defconfig" diff --git a/meta-fsl-ppc/conf/machine/b4420qds.conf b/meta-fsl-ppc/conf/machine/b4420qds.conf index fa1187b2..94ab1d33 100644 --- a/meta-fsl-ppc/conf/machine/b4420qds.conf +++ b/meta-fsl-ppc/conf/machine/b4420qds.conf @@ -6,7 +6,7 @@ require conf/machine/include/e6500.inc -SOC_FAMILY = "b4420" +SOC_FAMILY = "b4:b4420" UBOOT_MACHINES ?= "B4420QDS" KERNEL_DEVICETREE ?= "b4420qds.dtb b4420qds-usdpaa.dtb" KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/85xx/e6500rev2_defconfig" diff --git a/meta-fsl-ppc/conf/machine/b4860qds-64b.conf b/meta-fsl-ppc/conf/machine/b4860qds-64b.conf index 3ba56482..acc72d46 100644 --- a/meta-fsl-ppc/conf/machine/b4860qds-64b.conf +++ b/meta-fsl-ppc/conf/machine/b4860qds-64b.conf @@ -6,7 +6,7 @@ require conf/machine/include/e6500-64b.inc -SOC_FAMILY = "b4860" +SOC_FAMILY = "b4:b4860" UBOOT_MACHINES ?= "B4860QDS" KERNEL_DEVICETREE ?= "b4860qds.dtb b4860qds-usdpaa.dtb" KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/85xx/e6500rev2_defconfig" diff --git a/meta-fsl-ppc/conf/machine/b4860qds.conf b/meta-fsl-ppc/conf/machine/b4860qds.conf index 972d29f8..c2d28edb 100644 --- a/meta-fsl-ppc/conf/machine/b4860qds.conf +++ b/meta-fsl-ppc/conf/machine/b4860qds.conf @@ -6,7 +6,7 @@ require conf/machine/include/e6500.inc -SOC_FAMILY = "b4860" +SOC_FAMILY = "b4:b4860" UBOOT_MACHINES ?= "B4860QDS" KERNEL_DEVICETREE ?= "b4860qds.dtb b4860qds-usdpaa.dtb" KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/85xx/e6500rev2_defconfig" diff --git a/meta-fsl-ppc/conf/machine/t1040rdb-64b.conf b/meta-fsl-ppc/conf/machine/t1040rdb-64b.conf index b4ea5c86..603bc30d 100644 --- a/meta-fsl-ppc/conf/machine/t1040rdb-64b.conf +++ b/meta-fsl-ppc/conf/machine/t1040rdb-64b.conf @@ -6,7 +6,7 @@ require conf/machine/include/e5500-64b.inc -SOC_FAMILY = "t1040" +SOC_FAMILY = "t1:t1040" UBOOT_MACHINES ?= "T1040RDB" KERNEL_DEVICETREE ?= "t1040rdb.dtb t1040rdb-usdpaa.dtb" KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/t1040_64bit_smp_defconfig" diff --git a/meta-fsl-ppc/conf/machine/t1040rdb.conf b/meta-fsl-ppc/conf/machine/t1040rdb.conf index 684cf8ee..eaac98fa 100644 --- a/meta-fsl-ppc/conf/machine/t1040rdb.conf +++ b/meta-fsl-ppc/conf/machine/t1040rdb.conf @@ -6,7 +6,7 @@ require conf/machine/include/e5500.inc -SOC_FAMILY = "t1040" +SOC_FAMILY = "t1:t1040" UBOOT_MACHINES ?= "T1040RDB" KERNEL_DEVICETREE ?= "t1040rdb.dtb t1040rdb-usdpaa.dtb" KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/t1040_32bit_smp_defconfig" diff --git a/meta-fsl-ppc/conf/machine/t1042rdb-64b.conf b/meta-fsl-ppc/conf/machine/t1042rdb-64b.conf index 0141e102..c3f78385 100644 --- a/meta-fsl-ppc/conf/machine/t1042rdb-64b.conf +++ b/meta-fsl-ppc/conf/machine/t1042rdb-64b.conf @@ -6,7 +6,7 @@ require conf/machine/include/e5500-64b.inc -SOC_FAMILY = "t1042" +SOC_FAMILY = "t1:t1042" UBOOT_MACHINES ?= "T1042RDB_PI" KERNEL_DEVICETREE ?= "t1042rdb_pi.dtb" KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/t1040_64bit_smp_defconfig" diff --git a/meta-fsl-ppc/conf/machine/t1042rdb.conf b/meta-fsl-ppc/conf/machine/t1042rdb.conf index 1f13d86c..feb5049c 100644 --- a/meta-fsl-ppc/conf/machine/t1042rdb.conf +++ b/meta-fsl-ppc/conf/machine/t1042rdb.conf @@ -6,7 +6,7 @@ require conf/machine/include/e5500.inc -SOC_FAMILY = "t1042" +SOC_FAMILY = "t1:t1042" UBOOT_MACHINES ?= "T1042RDB_PI" KERNEL_DEVICETREE ?= "t1042rdb_pi.dtb" KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/t1040_32bit_smp_defconfig" diff --git a/meta-fsl-ppc/conf/machine/t2080qds-64b.conf b/meta-fsl-ppc/conf/machine/t2080qds-64b.conf index e2b5682f..6b0f9436 100644 --- a/meta-fsl-ppc/conf/machine/t2080qds-64b.conf +++ b/meta-fsl-ppc/conf/machine/t2080qds-64b.conf @@ -6,7 +6,7 @@ require conf/machine/include/e6500-64b.inc -SOC_FAMILY = "t2080" +SOC_FAMILY = "t2:t2080" UBOOT_MACHINES ?= "T2080QDS T2080QDS_SDCARD T2080QDS_SPIFLASH T2080QDS_NAND T2080QDS_SRIO_PCIE_BOOT" KERNEL_DEVICETREE ?= "t2080qds.dtb t2080qds-usdpaa.dtb" KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/85xx/e6500rev2_defconfig" diff --git a/meta-fsl-ppc/conf/machine/t2080qds.conf b/meta-fsl-ppc/conf/machine/t2080qds.conf index dfa6b090..c675aecd 100644 --- a/meta-fsl-ppc/conf/machine/t2080qds.conf +++ b/meta-fsl-ppc/conf/machine/t2080qds.conf @@ -6,7 +6,7 @@ require conf/machine/include/e6500.inc -SOC_FAMILY = "t2080" +SOC_FAMILY = "t2:t2080" UBOOT_MACHINES ?= "T2080QDS T2080QDS_SDCARD T2080QDS_SPIFLASH T2080QDS_NAND T2080QDS_SRIO_PCIE_BOOT" KERNEL_DEVICETREE ?= "t2080qds.dtb t2080qds-usdpaa.dtb" KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/85xx/e6500rev2_defconfig" diff --git a/meta-fsl-ppc/conf/machine/t2080rdb-64b.conf b/meta-fsl-ppc/conf/machine/t2080rdb-64b.conf index 5d4eed43..22f3f0fd 100644 --- a/meta-fsl-ppc/conf/machine/t2080rdb-64b.conf +++ b/meta-fsl-ppc/conf/machine/t2080rdb-64b.conf @@ -6,7 +6,7 @@ require conf/machine/include/e6500-64b.inc -SOC_FAMILY = "t2080" +SOC_FAMILY = "t2:t2080" UBOOT_MACHINES ?= "T2080RDB T2080RDB_SDCARD T2080RDB_SPIFLASH T2080RDB_NAND T2080RDB_SRIO_PCIE_BOOT" KERNEL_DEVICETREE ?= "t2080rdb.dtb t2080rdb-usdpaa.dtb" KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/85xx/e6500rev2_defconfig" diff --git a/meta-fsl-ppc/conf/machine/t2080rdb.conf b/meta-fsl-ppc/conf/machine/t2080rdb.conf index 08d2dd72..67b6d920 100644 --- a/meta-fsl-ppc/conf/machine/t2080rdb.conf +++ b/meta-fsl-ppc/conf/machine/t2080rdb.conf @@ -6,7 +6,7 @@ require conf/machine/include/e6500.inc -SOC_FAMILY = "t2080" +SOC_FAMILY = "t2:t2080" UBOOT_MACHINES ?= "T2080RDB T2080RDB_SDCARD T2080RDB_SPIFLASH T2080RDB_NAND T2080RDB_SRIO_PCIE_BOOT" KERNEL_DEVICETREE ?= "t2080rdb.dtb t2080rdb-usdpaa.dtb" KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/85xx/e6500rev2_defconfig" diff --git a/meta-fsl-ppc/conf/machine/t4160qds-64b.conf b/meta-fsl-ppc/conf/machine/t4160qds-64b.conf index 3f35e57b..970e54eb 100644 --- a/meta-fsl-ppc/conf/machine/t4160qds-64b.conf +++ b/meta-fsl-ppc/conf/machine/t4160qds-64b.conf @@ -6,7 +6,7 @@ require conf/machine/include/e6500-64b.inc -SOC_FAMILY = "t4160" +SOC_FAMILY = "t4:t4160" UBOOT_MACHINES ?= "T4160QDS" KERNEL_DEVICETREE ?= "t4240qds.dtb t4240qds-usdpaa.dtb" KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/85xx/e6500rev2_defconfig" diff --git a/meta-fsl-ppc/conf/machine/t4160qds.conf b/meta-fsl-ppc/conf/machine/t4160qds.conf index f87b58e5..66c114e2 100644 --- a/meta-fsl-ppc/conf/machine/t4160qds.conf +++ b/meta-fsl-ppc/conf/machine/t4160qds.conf @@ -6,7 +6,7 @@ require conf/machine/include/e6500.inc -SOC_FAMILY = "t4160" +SOC_FAMILY = "t4:t4160" UBOOT_MACHINES ?= "T4160QDS" KERNEL_DEVICETREE ?= "t4240qds.dtb t4240qds-usdpaa.dtb" KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/85xx/e6500rev2_defconfig" diff --git a/meta-fsl-ppc/conf/machine/t4240qds-64b.conf b/meta-fsl-ppc/conf/machine/t4240qds-64b.conf index 510b813e..5d1c12ac 100644 --- a/meta-fsl-ppc/conf/machine/t4240qds-64b.conf +++ b/meta-fsl-ppc/conf/machine/t4240qds-64b.conf @@ -6,7 +6,7 @@ require conf/machine/include/e6500-64b.inc -SOC_FAMILY = "t4240" +SOC_FAMILY = "t4:t4240" UBOOT_MACHINES ?= "T4240QDS" KERNEL_DEVICETREE ?= "t4240qds.dtb t4240qds-usdpaa.dtb" KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/85xx/e6500rev2_defconfig" diff --git a/meta-fsl-ppc/conf/machine/t4240qds.conf b/meta-fsl-ppc/conf/machine/t4240qds.conf index 58e52000..06673fa4 100644 --- a/meta-fsl-ppc/conf/machine/t4240qds.conf +++ b/meta-fsl-ppc/conf/machine/t4240qds.conf @@ -6,7 +6,7 @@ require conf/machine/include/e6500.inc -SOC_FAMILY = "t4240" +SOC_FAMILY = "t4:t4240" UBOOT_MACHINES ?= "T4240QDS" KERNEL_DEVICETREE ?= "t4240qds.dtb t4240qds-usdpaa.dtb" KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/85xx/e6500rev2_defconfig" diff --git a/meta-fsl-ppc/conf/machine/t4240rdb-64b.conf b/meta-fsl-ppc/conf/machine/t4240rdb-64b.conf index ea458957..09740664 100644 --- a/meta-fsl-ppc/conf/machine/t4240rdb-64b.conf +++ b/meta-fsl-ppc/conf/machine/t4240rdb-64b.conf @@ -6,7 +6,7 @@ require conf/machine/include/e6500-64b.inc -SOC_FAMILY = "t4240" +SOC_FAMILY = "t4:t4240" UBOOT_MACHINES ?= "T4240RDB" KERNEL_DEVICETREE ?= "t4240rdb.dtb t4240rdb-usdpaa.dtb t4240rdb-usdpaa-shared-interfaces.dtb" KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/85xx/e6500rev2_defconfig" diff --git a/meta-fsl-ppc/conf/machine/t4240rdb.conf b/meta-fsl-ppc/conf/machine/t4240rdb.conf index ec9c5bbc..e4c31f90 100644 --- a/meta-fsl-ppc/conf/machine/t4240rdb.conf +++ b/meta-fsl-ppc/conf/machine/t4240rdb.conf @@ -6,7 +6,7 @@ require conf/machine/include/e6500.inc -SOC_FAMILY = "t4240" +SOC_FAMILY = "t4:t4240" UBOOT_MACHINES ?= "T4240RDB" KERNEL_DEVICETREE ?= "t4240rdb.dtb t4240rdb-usdpaa.dtb t4240rdb-usdpaa-shared-interfaces.dtb" KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/85xx/e6500rev2_defconfig" -- cgit v1.2.3-54-g00ecf From 7d4d8e712e6d6483c1dd2144b34c7451cf531e32 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Thu, 24 Jul 2014 15:48:14 +0800 Subject: fmlib: use SOC_FAMILY as override Signed-off-by: Ting Liu --- meta-fsl-ppc/recipes-dpaa/fmlib/fmlib_git.bb | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/meta-fsl-ppc/recipes-dpaa/fmlib/fmlib_git.bb b/meta-fsl-ppc/recipes-dpaa/fmlib/fmlib_git.bb index d59d6aca..04b94a30 100644 --- a/meta-fsl-ppc/recipes-dpaa/fmlib/fmlib_git.bb +++ b/meta-fsl-ppc/recipes-dpaa/fmlib/fmlib_git.bb @@ -22,12 +22,10 @@ COMPATIBLE_HOST ?= "(none)" EXTRA_OEMAKE = "DESTDIR=${D} PREFIX=${prefix} LIB_DEST_DIR=${libdir} \ CROSS_COMPILE=${TARGET_PREFIX} KERNEL_SRC=${STAGING_KERNEL_DIR}" +COMPILE_TARGET = "libfm-${TARGET_ARCH_FMLIB}.a" +COMPILE_TARGET_t1 = "libfm-${TARGET_ARCH_FMLIB}-fmv3.a" do_compile () { - if [ "t1040" = "${SOC_FAMILY}" -o "t1042" = "${SOC_FAMILY}" ];then - oe_runmake libfm-${TARGET_ARCH_FMLIB}-fmv3.a - else - oe_runmake libfm-${TARGET_ARCH_FMLIB}.a - fi + oe_runmake ${COMPILE_TARGET} } do_compile_virtclass-native () { -- cgit v1.2.3-54-g00ecf From e5a615e7793a5c7317302eb5a183685c0f1e116a Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Thu, 24 Jul 2014 15:48:16 +0800 Subject: libvirt: add bbappend for qoriq-ppc customizations * add customized qemu.conf to enable cgroup device and add /dev/net/tun device as cgroup * add customized PKGCONFIG as not all features supported on ppc boards. Signed-off-by: Ting Liu --- .../libvirt/libvirt/qoriq-ppc/qemu.conf | 465 +++++++++++++++++++++ .../libvirt/libvirt_%.bbappend | 9 + 2 files changed, 474 insertions(+) create mode 100644 meta-fsl-ppc/recipes-virtualization/libvirt/libvirt/qoriq-ppc/qemu.conf create mode 100644 meta-fsl-ppc/recipes-virtualization/libvirt/libvirt_%.bbappend diff --git a/meta-fsl-ppc/recipes-virtualization/libvirt/libvirt/qoriq-ppc/qemu.conf b/meta-fsl-ppc/recipes-virtualization/libvirt/libvirt/qoriq-ppc/qemu.conf new file mode 100644 index 00000000..cc22fa13 --- /dev/null +++ b/meta-fsl-ppc/recipes-virtualization/libvirt/libvirt/qoriq-ppc/qemu.conf @@ -0,0 +1,465 @@ +# Master configuration file for the QEMU driver. +# All settings described here are optional - if omitted, sensible +# defaults are used. + +# VNC is configured to listen on 127.0.0.1 by default. +# To make it listen on all public interfaces, uncomment +# this next option. +# +# NB, strong recommendation to enable TLS + x509 certificate +# verification when allowing public access +# +#vnc_listen = "0.0.0.0" + +# Enable this option to have VNC served over an automatically created +# unix socket. This prevents unprivileged access from users on the +# host machine, though most VNC clients do not support it. +# +# This will only be enabled for VNC configurations that do not have +# a hardcoded 'listen' or 'socket' value. This setting takes preference +# over vnc_listen. +# +#vnc_auto_unix_socket = 1 + +# Enable use of TLS encryption on the VNC server. This requires +# a VNC client which supports the VeNCrypt protocol extension. +# Examples include vinagre, virt-viewer, virt-manager and vencrypt +# itself. UltraVNC, RealVNC, TightVNC do not support this +# +# It is necessary to setup CA and issue a server certificate +# before enabling this. +# +#vnc_tls = 1 + + +# Use of TLS requires that x509 certificates be issued. The +# default it to keep them in /etc/pki/libvirt-vnc. This directory +# must contain +# +# ca-cert.pem - the CA master certificate +# server-cert.pem - the server certificate signed with ca-cert.pem +# server-key.pem - the server private key +# +# This option allows the certificate directory to be changed +# +#vnc_tls_x509_cert_dir = "/etc/pki/libvirt-vnc" + + +# The default TLS configuration only uses certificates for the server +# allowing the client to verify the server's identity and establish +# an encrypted channel. +# +# It is possible to use x509 certificates for authentication too, by +# issuing a x509 certificate to every client who needs to connect. +# +# Enabling this option will reject any client who does not have a +# certificate signed by the CA in /etc/pki/libvirt-vnc/ca-cert.pem +# +#vnc_tls_x509_verify = 1 + + +# The default VNC password. Only 8 letters are significant for +# VNC passwords. This parameter is only used if the per-domain +# XML config does not already provide a password. To allow +# access without passwords, leave this commented out. An empty +# string will still enable passwords, but be rejected by QEMU, +# effectively preventing any use of VNC. Obviously change this +# example here before you set this. +# +#vnc_password = "XYZ12345" + + +# Enable use of SASL encryption on the VNC server. This requires +# a VNC client which supports the SASL protocol extension. +# Examples include vinagre, virt-viewer and virt-manager +# itself. UltraVNC, RealVNC, TightVNC do not support this +# +# It is necessary to configure /etc/sasl2/qemu.conf to choose +# the desired SASL plugin (eg, GSSPI for Kerberos) +# +#vnc_sasl = 1 + + +# The default SASL configuration file is located in /etc/sasl2/ +# When running libvirtd unprivileged, it may be desirable to +# override the configs in this location. Set this parameter to +# point to the directory, and create a qemu.conf in that location +# +#vnc_sasl_dir = "/some/directory/sasl2" + + +# QEMU implements an extension for providing audio over a VNC connection, +# though if your VNC client does not support it, your only chance for getting +# sound output is through regular audio backends. By default, libvirt will +# disable all QEMU sound backends if using VNC, since they can cause +# permissions issues. Enabling this option will make libvirtd honor the +# QEMU_AUDIO_DRV environment variable when using VNC. +# +#vnc_allow_host_audio = 0 + + + +# SPICE is configured to listen on 127.0.0.1 by default. +# To make it listen on all public interfaces, uncomment +# this next option. +# +# NB, strong recommendation to enable TLS + x509 certificate +# verification when allowing public access +# +#spice_listen = "0.0.0.0" + + +# Enable use of TLS encryption on the SPICE server. +# +# It is necessary to setup CA and issue a server certificate +# before enabling this. +# +#spice_tls = 1 + + +# Use of TLS requires that x509 certificates be issued. The +# default it to keep them in /etc/pki/libvirt-spice. This directory +# must contain +# +# ca-cert.pem - the CA master certificate +# server-cert.pem - the server certificate signed with ca-cert.pem +# server-key.pem - the server private key +# +# This option allows the certificate directory to be changed. +# +#spice_tls_x509_cert_dir = "/etc/pki/libvirt-spice" + + +# The default SPICE password. This parameter is only used if the +# per-domain XML config does not already provide a password. To +# allow access without passwords, leave this commented out. An +# empty string will still enable passwords, but be rejected by +# QEMU, effectively preventing any use of SPICE. Obviously change +# this example here before you set this. +# +#spice_password = "XYZ12345" + + +# Enable use of SASL encryption on the SPICE server. This requires +# a SPICE client which supports the SASL protocol extension. +# +# It is necessary to configure /etc/sasl2/qemu.conf to choose +# the desired SASL plugin (eg, GSSPI for Kerberos) +# +#spice_sasl = 1 + +# The default SASL configuration file is located in /etc/sasl2/ +# When running libvirtd unprivileged, it may be desirable to +# override the configs in this location. Set this parameter to +# point to the directory, and create a qemu.conf in that location +# +#spice_sasl_dir = "/some/directory/sasl2" + + +# By default, if no graphical front end is configured, libvirt will disable +# QEMU audio output since directly talking to alsa/pulseaudio may not work +# with various security settings. If you know what you're doing, enable +# the setting below and libvirt will passthrough the QEMU_AUDIO_DRV +# environment variable when using nographics. +# +#nographics_allow_host_audio = 1 + + +# Override the port for creating both VNC and SPICE sessions (min). +# This defaults to 5900 and increases for consecutive sessions +# or when ports are occupied, until it hits the maximum. +# +# Minimum must be greater than or equal to 5900 as lower number would +# result into negative vnc display number. +# +# Maximum must be less than 65536, because higher numbers do not make +# sense as a port number. +# +#remote_display_port_min = 5900 +#remote_display_port_max = 65535 + +# VNC WebSocket port policies, same rules apply as with remote display +# ports. VNC WebSockets use similar display <-> port mappings, with +# the exception being that ports starts from 5700 instead of 5900. +# +#remote_websocket_port_min = 5700 +#remote_websocket_port_max = 65535 + +# The default security driver is SELinux. If SELinux is disabled +# on the host, then the security driver will automatically disable +# itself. If you wish to disable QEMU SELinux security driver while +# leaving SELinux enabled for the host in general, then set this +# to 'none' instead. It's also possible to use more than one security +# driver at the same time, for this use a list of names separated by +# comma and delimited by square brackets. For example: +# +# security_driver = [ "selinux", "apparmor" ] +# +# Notes: The DAC security driver is always enabled; as a result, the +# value of security_driver cannot contain "dac". The value "none" is +# a special value; security_driver can be set to that value in +# isolation, but it cannot appear in a list of drivers. +# +#security_driver = "selinux" + +# If set to non-zero, then the default security labeling +# will make guests confined. If set to zero, then guests +# will be unconfined by default. Defaults to 1. +#security_default_confined = 1 + +# If set to non-zero, then attempts to create unconfined +# guests will be blocked. Defaults to 0. +#security_require_confined = 1 + +# The user for QEMU processes run by the system instance. It can be +# specified as a user name or as a user id. The qemu driver will try to +# parse this value first as a name and then, if the name doesn't exist, +# as a user id. +# +# Since a sequence of digits is a valid user name, a leading plus sign +# can be used to ensure that a user id will not be interpreted as a user +# name. +# +# Some examples of valid values are: +# +# user = "qemu" # A user named "qemu" +# user = "+0" # Super user (uid=0) +# user = "100" # A user named "100" or a user with uid=100 +# +#user = "root" + +# The group for QEMU processes run by the system instance. It can be +# specified in a similar way to user. +#group = "root" + +# Whether libvirt should dynamically change file ownership +# to match the configured user/group above. Defaults to 1. +# Set to 0 to disable file ownership changes. +#dynamic_ownership = 1 + + +# What cgroup controllers to make use of with QEMU guests +# +# - 'cpu' - use for schedular tunables +# - 'devices' - use for device whitelisting +# - 'memory' - use for memory tunables +# - 'blkio' - use for block devices I/O tunables +# - 'cpuset' - use for CPUs and memory nodes +# - 'cpuacct' - use for CPUs statistics. +# +# NB, even if configured here, they won't be used unless +# the administrator has mounted cgroups, e.g.: +# +# mkdir /dev/cgroup +# mount -t cgroup -o devices,cpu,memory,blkio,cpuset none /dev/cgroup +# +# They can be mounted anywhere, and different controllers +# can be mounted in different locations. libvirt will detect +# where they are located. +# +#cgroup_controllers = [ "cpu", "devices", "memory", "blkio", "cpuset", "cpuacct" ] + +# This is the basic set of devices allowed / required by +# all virtual machines. +# +# As well as this, any configured block backed disks, +# all sound device, and all PTY devices are allowed. +# +# This will only need setting if newer QEMU suddenly +# wants some device we don't already know about. +# +cgroup_device_acl = [ + "/dev/null", "/dev/full", "/dev/zero", + "/dev/random", "/dev/urandom", + "/dev/ptmx", "/dev/kvm", "/dev/kqemu", + "/dev/rtc", "/dev/hpet", "/dev/vfio/vfio", "/dev/net/tun" +] + + +# The default format for Qemu/KVM guest save images is raw; that is, the +# memory from the domain is dumped out directly to a file. If you have +# guests with a large amount of memory, however, this can take up quite +# a bit of space. If you would like to compress the images while they +# are being saved to disk, you can also set "lzop", "gzip", "bzip2", or "xz" +# for save_image_format. Note that this means you slow down the process of +# saving a domain in order to save disk space; the list above is in descending +# order by performance and ascending order by compression ratio. +# +# save_image_format is used when you use 'virsh save' or 'virsh managedsave' +# at scheduled saving, and it is an error if the specified save_image_format +# is not valid, or the requested compression program can't be found. +# +# dump_image_format is used when you use 'virsh dump' at emergency +# crashdump, and if the specified dump_image_format is not valid, or +# the requested compression program can't be found, this falls +# back to "raw" compression. +# +# snapshot_image_format specifies the compression algorithm of the memory save +# image when an external snapshot of a domain is taken. This does not apply +# on disk image format. It is an error if the specified format isn't valid, +# or the requested compression program can't be found. +# +#save_image_format = "raw" +#dump_image_format = "raw" +#snapshot_image_format = "raw" + +# When a domain is configured to be auto-dumped when libvirtd receives a +# watchdog event from qemu guest, libvirtd will save dump files in directory +# specified by auto_dump_path. Default value is /var/lib/libvirt/qemu/dump +# +#auto_dump_path = "/var/lib/libvirt/qemu/dump" + +# When a domain is configured to be auto-dumped, enabling this flag +# has the same effect as using the VIR_DUMP_BYPASS_CACHE flag with the +# virDomainCoreDump API. That is, the system will avoid using the +# file system cache while writing the dump file, but may cause +# slower operation. +# +#auto_dump_bypass_cache = 0 + +# When a domain is configured to be auto-started, enabling this flag +# has the same effect as using the VIR_DOMAIN_START_BYPASS_CACHE flag +# with the virDomainCreateWithFlags API. That is, the system will +# avoid using the file system cache when restoring any managed state +# file, but may cause slower operation. +# +#auto_start_bypass_cache = 0 + +# If provided by the host and a hugetlbfs mount point is configured, +# a guest may request huge page backing. When this mount point is +# unspecified here, determination of a host mount point in /proc/mounts +# will be attempted. Specifying an explicit mount overrides detection +# of the same in /proc/mounts. Setting the mount point to "" will +# disable guest hugepage backing. +# +# NB, within this mount point, guests will create memory backing files +# in a location of $MOUNTPOINT/libvirt/qemu +# +#hugetlbfs_mount = "/dev/hugepages" + + +# Path to the setuid helper for creating tap devices. This executable +# is used to create interfaces when libvirtd is +# running unprivileged. libvirt invokes the helper directly, instead +# of using "-netdev bridge", for security reasons. +#bridge_helper = "/usr/libexec/qemu-bridge-helper" + + + +# If clear_emulator_capabilities is enabled, libvirt will drop all +# privileged capabilities of the QEmu/KVM emulator. This is enabled by +# default. +# +# Warning: Disabling this option means that a compromised guest can +# exploit the privileges and possibly do damage to the host. +# +#clear_emulator_capabilities = 1 + + +# If enabled, libvirt will have QEMU set its process name to +# "qemu:VM_NAME", where VM_NAME is the name of the VM. The QEMU +# process will appear as "qemu:VM_NAME" in process listings and +# other system monitoring tools. By default, QEMU does not set +# its process title, so the complete QEMU command (emulator and +# its arguments) appear in process listings. +# +#set_process_name = 1 + + +# If max_processes is set to a positive integer, libvirt will use +# it to set the maximum number of processes that can be run by qemu +# user. This can be used to override default value set by host OS. +# The same applies to max_files which sets the limit on the maximum +# number of opened files. +# +#max_processes = 0 +#max_files = 0 + + + +# mac_filter enables MAC addressed based filtering on bridge ports. +# This currently requires ebtables to be installed. +# +#mac_filter = 1 + + +# By default, PCI devices below non-ACS switch are not allowed to be assigned +# to guests. By setting relaxed_acs_check to 1 such devices will be allowed to +# be assigned to guests. +# +#relaxed_acs_check = 1 + + +# If allow_disk_format_probing is enabled, libvirt will probe disk +# images to attempt to identify their format, when not otherwise +# specified in the XML. This is disabled by default. +# +# WARNING: Enabling probing is a security hole in almost all +# deployments. It is strongly recommended that users update their +# guest XML elements to include +# elements instead of enabling this option. +# +#allow_disk_format_probing = 1 + + +# To enable 'Sanlock' project based locking of the file +# content (to prevent two VMs writing to the same +# disk), uncomment this +# +#lock_manager = "sanlock" + + + +# Set limit of maximum APIs queued on one domain. All other APIs +# over this threshold will fail on acquiring job lock. Specially, +# setting to zero turns this feature off. +# Note, that job lock is per domain. +# +#max_queued = 0 + +################################################################### +# Keepalive protocol: +# This allows qemu driver to detect broken connections to remote +# libvirtd during peer-to-peer migration. A keepalive message is +# sent to the deamon after keepalive_interval seconds of inactivity +# to check if the deamon is still responding; keepalive_count is a +# maximum number of keepalive messages that are allowed to be sent +# to the deamon without getting any response before the connection +# is considered broken. In other words, the connection is +# automatically closed approximately after +# keepalive_interval * (keepalive_count + 1) seconds since the last +# message received from the deamon. If keepalive_interval is set to +# -1, qemu driver will not send keepalive requests during +# peer-to-peer migration; however, the remote libvirtd can still +# send them and source libvirtd will send responses. When +# keepalive_count is set to 0, connections will be automatically +# closed after keepalive_interval seconds of inactivity without +# sending any keepalive messages. +# +#keepalive_interval = 5 +#keepalive_count = 5 + + + +# Use seccomp syscall whitelisting in QEMU. +# 1 = on, 0 = off, -1 = use QEMU default +# Defaults to -1. +# +#seccomp_sandbox = 1 + + + +# Override the listen address for all incoming migrations. Defaults to +# 0.0.0.0 or :: in case if both host and qemu are capable of IPv6. +#migration_address = "127.0.0.1" + + +# Override the port range used for incoming migrations. +# +# Minimum must be greater than 0, however when QEMU is not running as root, +# setting the minimum to be lower than 1024 will not work. +# +# Maximum must not be greater than 65535. +# +#migration_port_min = 49152 +#migration_port_max = 49215 diff --git a/meta-fsl-ppc/recipes-virtualization/libvirt/libvirt_%.bbappend b/meta-fsl-ppc/recipes-virtualization/libvirt/libvirt_%.bbappend new file mode 100644 index 00000000..c7e6d32e --- /dev/null +++ b/meta-fsl-ppc/recipes-virtualization/libvirt/libvirt_%.bbappend @@ -0,0 +1,9 @@ +PACKAGECONFIG_qoriq-ppc = "qemu yajl lxc test remote macvtap libvirtd netcf udev python" + +FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:" +SRC_URI_append_qoriq-ppc = " file://qemu.conf" + +do_install_append_qoriq-ppc() { + install -m 0644 ${WORKDIR}/qemu.conf ${D}${sysconfdir}/libvirt/qemu.conf +} + -- cgit v1.2.3-54-g00ecf From b113442a0ca749385b6321f810040bf8de43bc79 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Thu, 24 Jul 2014 15:48:17 +0800 Subject: ipsec-demo (scripts and configuration files) add recipe There are some ipsec demo scripts and configuration files for qoriq boards. add a recipe to hold them. Signed-off-by: Ting Liu --- .../ipsec-demo/ipsec-demo/test_setkey/README | 77 ++++++++++++++++++++++ .../test_setkey/auto_left.conf-3des-sha1-tunnel | 32 +++++++++ .../test_setkey/auto_right.conf-3des-sha1-tunnel | 31 +++++++++ .../ipsec-demo/ipsec-demo/test_setkey/flush-setkey | 4 ++ .../ipsec-demo/test_setkey/ipsec.conf.left | 29 ++++++++ .../ipsec-demo/test_setkey/ipsec.conf.right | 28 ++++++++ .../ipsec-demo/test_setkey/ipsec.secrets.left | 3 + .../ipsec-demo/test_setkey/ipsec.secrets.right | 8 +++ .../ipsec-demo/test_setkey/ipsec_ikev1.conf.left | 39 +++++++++++ .../ipsec-demo/test_setkey/ipsec_ikev1.conf.right | 34 ++++++++++ .../test_setkey/left.conf-3des-md5-transport | 23 +++++++ .../test_setkey/left.conf-3des-md5-tunnel | 42 ++++++++++++ .../test_setkey/left.conf-3des-sha1-transport | 22 +++++++ .../test_setkey/left.conf-3des-sha1-tunnel | 42 ++++++++++++ .../test_setkey/left.conf-3des-sha256-transport | 23 +++++++ .../test_setkey/left.conf-3des-sha256-tunnel | 42 ++++++++++++ .../test_setkey/left.conf-aes-md5-transport | 23 +++++++ .../test_setkey/left.conf-aes-md5-tunnel | 42 ++++++++++++ .../test_setkey/left.conf-aes-sha1-transport | 22 +++++++ .../test_setkey/left.conf-aes-sha1-tunnel | 42 ++++++++++++ .../test_setkey/left.conf-aes-sha256-transport | 23 +++++++ .../test_setkey/left.conf-aes-sha256-tunnel | 42 ++++++++++++ .../test_setkey/left.conf-null-null-transport | 23 +++++++ .../test_setkey/left.conf-null-null-tunnel | 42 ++++++++++++ .../ipsec-demo/ipsec-demo/test_setkey/left.ipv4 | 2 + .../ipsec-demo/ipsec-demo/test_setkey/moonCert.pem | 25 +++++++ .../ipsec-demo/ipsec-demo/test_setkey/moonKey.pem | 27 ++++++++ .../ipsec-demo/ipsec-demo/test_setkey/pingsizes.sh | 19 ++++++ .../ipsec-demo/test_setkey/pingsizest.sh | 19 ++++++ .../ipsec-demo/ipsec-demo/test_setkey/psk.txt | 2 + .../ipsec-demo/ipsec-demo/test_setkey/racoon.conf | 22 +++++++ .../test_setkey/right.conf-3des-md5-transport | 23 +++++++ .../test_setkey/right.conf-3des-md5-tunnel | 42 ++++++++++++ .../test_setkey/right.conf-3des-sha1-transport | 22 +++++++ .../test_setkey/right.conf-3des-sha1-tunnel | 41 ++++++++++++ .../test_setkey/right.conf-3des-sha256-transport | 23 +++++++ .../test_setkey/right.conf-3des-sha256-tunnel | 42 ++++++++++++ .../test_setkey/right.conf-aes-md5-transport | 23 +++++++ .../test_setkey/right.conf-aes-md5-tunnel | 42 ++++++++++++ .../test_setkey/right.conf-aes-sha1-transport | 22 +++++++ .../test_setkey/right.conf-aes-sha1-tunnel | 41 ++++++++++++ .../test_setkey/right.conf-aes-sha256-transport | 23 +++++++ .../test_setkey/right.conf-aes-sha256-tunnel | 42 ++++++++++++ .../test_setkey/right.conf-null-null-transport | 23 +++++++ .../test_setkey/right.conf-null-null-tunnel | 42 ++++++++++++ .../ipsec-demo/ipsec-demo/test_setkey/right.ipv4 | 2 + .../ipsec-demo/ipsec-demo/test_setkey/setup | 47 +++++++++++++ .../ipsec-demo/ipsec-demo/test_setkey/setup_left | 13 ++++ .../ipsec-demo/ipsec-demo/test_setkey/setup_right | 13 ++++ .../ipsec-demo/test_setkey/strongswan.conf | 19 ++++++ .../ipsec-demo/test_setkey/strongswanCert.pem | 22 +++++++ .../ipsec-demo/test_setkey/strongswan_left | 10 +++ .../ipsec-demo/test_setkey/strongswan_right | 10 +++ .../ipsec-demo/ipsec-demo/test_setkey/sunCert.pem | 25 +++++++ .../ipsec-demo/ipsec-demo/test_setkey/sunKey.pem | 27 ++++++++ .../ipsec-demo/ipsec-demo_0.1.bb | 25 +++++++ 56 files changed, 1518 insertions(+) create mode 100644 meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/README create mode 100755 meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/auto_left.conf-3des-sha1-tunnel create mode 100755 meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/auto_right.conf-3des-sha1-tunnel create mode 100755 meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/flush-setkey create mode 100644 meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/ipsec.conf.left create mode 100644 meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/ipsec.conf.right create mode 100644 meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/ipsec.secrets.left create mode 100644 meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/ipsec.secrets.right create mode 100644 meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/ipsec_ikev1.conf.left create mode 100644 meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/ipsec_ikev1.conf.right create mode 100755 meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-3des-md5-transport create mode 100755 meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-3des-md5-tunnel create mode 100755 meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-3des-sha1-transport create mode 100755 meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-3des-sha1-tunnel create mode 100755 meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-3des-sha256-transport create mode 100755 meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-3des-sha256-tunnel create mode 100755 meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-aes-md5-transport create mode 100755 meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-aes-md5-tunnel create mode 100755 meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-aes-sha1-transport create mode 100755 meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-aes-sha1-tunnel create mode 100755 meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-aes-sha256-transport create mode 100755 meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-aes-sha256-tunnel create mode 100755 meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-null-null-transport create mode 100755 meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-null-null-tunnel create mode 100755 meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.ipv4 create mode 100644 meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/moonCert.pem create mode 100644 meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/moonKey.pem create mode 100755 meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/pingsizes.sh create mode 100755 meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/pingsizest.sh create mode 100644 meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/psk.txt create mode 100644 meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/racoon.conf create mode 100755 meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-3des-md5-transport create mode 100755 meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-3des-md5-tunnel create mode 100755 meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-3des-sha1-transport create mode 100755 meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-3des-sha1-tunnel create mode 100755 meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-3des-sha256-transport create mode 100755 meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-3des-sha256-tunnel create mode 100755 meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-aes-md5-transport create mode 100755 meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-aes-md5-tunnel create mode 100755 meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-aes-sha1-transport create mode 100755 meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-aes-sha1-tunnel create mode 100755 meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-aes-sha256-transport create mode 100755 meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-aes-sha256-tunnel create mode 100755 meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-null-null-transport create mode 100755 meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-null-null-tunnel create mode 100755 meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.ipv4 create mode 100755 meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/setup create mode 100755 meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/setup_left create mode 100755 meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/setup_right create mode 100644 meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/strongswan.conf create mode 100644 meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/strongswanCert.pem create mode 100755 meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/strongswan_left create mode 100755 meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/strongswan_right create mode 100644 meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/sunCert.pem create mode 100644 meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/sunKey.pem create mode 100644 meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo_0.1.bb diff --git a/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/README b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/README new file mode 100644 index 00000000..9578982d --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/README @@ -0,0 +1,77 @@ +test_setkey script usage + +The scripts in this directory may be used for testing +native Linux IPsec with the talitos driver as a loadable module. + +It's assumed that these scripts have been placed in the directory +named /test_setkey. + +The scripts setup_left and setup_right configure the ip addresses +for two boards named 'left' and 'right', which are two gateways for +an IPsec tunnel. Connect the eth1 interfaces of left and right boards together. +For smartbits testing, connect eth0 on each board to a smartbits port. +For other testing (ping, netperf, iperf), connect eth0 on each board to another system. + +The scripts named left.conf-* and right.conf-* are setkey scripts +which configure the IPsec SA and SPD entries. +The scripts ending in -tunnel use tunnel mode IPsec, and the scripts +ending in -transport used transport mode IPsec. +Transport mode is useful for quickly testing security functionality +using ping or netperf between two boards. +Tunnel mode can be used for testing throughput using smartbits or other +performance test equipment. + +There is a top level script called 'setup' which +is used for a one-step setup on the left and right boards. +'setup' uses two or three parameters. The first parameter is the side, left or right. +The second parameter is the setkey suffix for the left.conf- and right.conf- files. +If the third parameter is supplied, the setup will modprobe that name, so +typically you should provide talitos as the third parameter if you want to load the driver. +If you have built the talitos driver into the kernel, omit the third parameter to setup. +You may test software encryption if talitos is built as a module and you omit the third parameter. + +Below are example uses of the 'setup' script. + +1) One-step setup for smartbits + Use a tunnel mode setup on each side. + AES-HMAC-SHA1: + Left side: + /test_setkey/setup left aes-sha1-tunnel talitos + Right side: + /test_setkey/setup right aes-sha1-tunnel talitos + + 3DES-HMAC-SHA1: + Left side: + /test_setkey/setup left 3des-sha1-tunnel talitos + Right side: + /test_setkey/setup right 3des-sha1-tunnel talitos + +2) One-step setup for testing ping, netperf, or iperf between two boards. + Use a transport mode setup on each side. + AES-HMAC-SHA1: + Left side: + /test_setkey/setup left aes-sha1-transport talitos + Right side: + /test_setkey/setup right aes-sha1-transport talitos + + 3DES-HMAC-SHA1: + Left side: + /test_setkey/setup left 3des-sha1-transport talitos + Right side: + /test_setkey/setup right 3des-sha1-transport talitos + +3) Testing ipv4 + To test ipv4 (with no security) over the two gateways, use steps below. + Testing ipv4 is helpful to get your smartbits configuration verified + and also establish a baseline performance for throughput. + + On the left board: + cd /test_setkey + ./setup_left + ./left.ipv4 + + On the right board: + cd /test_setkey + ./setup_right + ./right.ipv4 + diff --git a/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/auto_left.conf-3des-sha1-tunnel b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/auto_left.conf-3des-sha1-tunnel new file mode 100755 index 00000000..6bd6c5d8 --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/auto_left.conf-3des-sha1-tunnel @@ -0,0 +1,32 @@ +#!/usr/sbin/setkey -f +# +# +# Example ESP Tunnel for VPN. +# +# ========= ESP ========= +# | | +# Network-A Gateway-A Gateway-B Network-B +# 192.168.1.0/24 ---- 200.200.200.10 ------ 200.200.200.20 ---- 192.168.2.0/24 +# +# ====== 83xx board A ====== ===== 83xx board B ===== +# | | | | +# eth0 eth1 eth1 eth0 +# 192.168.1.130 200.200.200.10 200.200.200.20 192.168.2.130 +# +# +# Board A setup +# +# Flush the SAD and SPD +flush; +spdflush; + +# I am gateway A (eth0:192.168.1.130, eth1:200.200.200.10) +# +# Security policies +spdadd 192.168.1.0/24 192.168.2.0/24 any -P out ipsec + esp/tunnel/200.200.200.10-200.200.200.20/require; + +spdadd 192.168.2.0/24 192.168.1.0/24 any -P in ipsec + esp/tunnel/200.200.200.20-200.200.200.10/require; + + diff --git a/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/auto_right.conf-3des-sha1-tunnel b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/auto_right.conf-3des-sha1-tunnel new file mode 100755 index 00000000..eebf307a --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/auto_right.conf-3des-sha1-tunnel @@ -0,0 +1,31 @@ +#!/usr/sbin/setkey -f +# +# +# Example ESP Tunnel for VPN. +# +# ========= ESP ========= +# | | +# Network-A Gateway-A Gateway-B Network-B +# 192.168.1.0/24 ---- 200.200.200.10 ------ 200.200.200.20 ---- 192.168.2.0/24 +# +# ====== 83xx board A ====== ===== 83xx board B ===== +# | | | | +# eth0 eth1 eth1 eth0 +# 192.168.1.130 200.200.200.10 200.200.200.20 192.168.2.130 +# +# +# Board B setup +# Flush the SAD and SPD +flush; +spdflush; + +# I am gateway B (eth0:192.168.2.130, eth1:200.200.200.20) +# +# Security policies + +spdadd 192.168.2.0/24 192.168.1.0/24 any -P out ipsec + esp/tunnel/200.200.200.20-200.200.200.10/require; + +spdadd 192.168.1.0/24 192.168.2.0/24 any -P in ipsec + esp/tunnel/200.200.200.10-200.200.200.20/require; + diff --git a/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/flush-setkey b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/flush-setkey new file mode 100755 index 00000000..0be30562 --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/flush-setkey @@ -0,0 +1,4 @@ +#!/usr/sbin/setkey -f + +flush; +spdflush; diff --git a/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/ipsec.conf.left b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/ipsec.conf.left new file mode 100644 index 00000000..d9d6c0c6 --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/ipsec.conf.left @@ -0,0 +1,29 @@ +# /etc/ipsec.conf - strongSwan IPsec configuration file + +config setup + charondebug="chd 2, knl 2" + crlcheckinterval=180 + strictcrlpolicy=no + plutostart=no + +conn %default + ikelifetime=60m + keylife=20m + rekeymargin=3m + keyingtries=1 + keyexchange=ikev2 + type=tunnel + auth=esp + compress=no + mobike=no + +conn net-net + left=200.200.200.10 + leftsubnet=192.168.1.0/24 + leftcert=moonCert.pem + leftid="C=CH, O=Linux strongSwan, CN=moon.strongswan.org" + leftfirewall=yes + right=200.200.200.20 + rightsubnet=192.168.2.0/24 + rightid="C=CH, O=Linux strongSwan, CN=sun.strongswan.org" + auto=add diff --git a/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/ipsec.conf.right b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/ipsec.conf.right new file mode 100644 index 00000000..c14dee2b --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/ipsec.conf.right @@ -0,0 +1,28 @@ +# /etc/ipsec.conf - strongSwan IPsec configuration file + +config setup + charondebug="chd 2, knl 2" + crlcheckinterval=180 + strictcrlpolicy=no + plutostart=no + +conn %default + ikelifetime=60m + keylife=20m + rekeymargin=3m + keyingtries=1 + keyexchange=ikev2 + auth=esp + compress=no + mobike=no + +conn net-net + left=200.200.200.20 + leftcert=sunCert.pem + leftid="C=CH, O=Linux strongSwan, CN=sun.strongswan.org" + leftsubnet=192.168.2.0/24 + leftfirewall=yes + right=200.200.200.10 + rightid="C=CH, O=Linux strongSwan, CN=moon.strongswan.org" + rightsubnet=192.168.1.0/24 + auto=add diff --git a/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/ipsec.secrets.left b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/ipsec.secrets.left new file mode 100644 index 00000000..e86d6aa5 --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/ipsec.secrets.left @@ -0,0 +1,3 @@ +# /etc/ipsec.secrets - strongSwan IPsec secrets file + +: RSA moonKey.pem diff --git a/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/ipsec.secrets.right b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/ipsec.secrets.right new file mode 100644 index 00000000..1095b74c --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/ipsec.secrets.right @@ -0,0 +1,8 @@ +# /etc/ipsec.secrets - strongSwan IPsec secrets file + +: RSA sunKey.pem + + + + + diff --git a/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/ipsec_ikev1.conf.left b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/ipsec_ikev1.conf.left new file mode 100644 index 00000000..55025dbc --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/ipsec_ikev1.conf.left @@ -0,0 +1,39 @@ +# /etc/ipsec.conf - strongSwan IPsec configuration file + +config setup + plutodebug=control + crlcheckinterval=180 + strictcrlpolicy=no + charonstart=no + +conn %default + ikelifetime=60m + keylife=20m + rekeymargin=3m + keyingtries=1 + keyexchange=ikev1 + left=200.200.200.10 + leftcert=moonCert.pem + leftid="C=CH, O=Linux strongSwan, CN=moon.strongswan.org" + leftfirewall=yes + +conn net-net + left=%defaultroute + leftsubnet=192.168.1.0/24 + leftcert=moonCert.pem + right=200.200.200.20 + rightsubnet=192.168.2.0/24 + rightid="C=CH, O=Linux strongSwan, CN=sun.strongswan.org" + auto=add + +conn host-host + left=%defaultroute + leftcert=moonCert.pem + right=200.200.200.20 + rightid="C=CH, O=Linux strongSwan, CN=sun.strongswan.org" + auto=add + +conn rw + leftsubnet=192.168.1.0/24 + right=%any + auto=add diff --git a/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/ipsec_ikev1.conf.right b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/ipsec_ikev1.conf.right new file mode 100644 index 00000000..479791ea --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/ipsec_ikev1.conf.right @@ -0,0 +1,34 @@ +# /etc/ipsec.conf - strongSwan IPsec configuration file + +config setup + plutodebug=control + crlcheckinterval=180 + strictcrlpolicy=no + charonstart=no + +conn %default + ikelifetime=60m + keylife=20m + rekeymargin=3m + keyingtries=1 + keyexchange=ikev1 + left=200.200.200.20 + leftcert=sunCert.pem + leftid="C=CH, O=Linux strongSwan, CN=sun.strongswan.org" + leftfirewall=yes + +conn net-net + left=%defaultroute + leftsubnet=192.168.2.0/24 + leftcert=sunCert.pem + right=200.200.200.10 + rightsubnet=192.168.1.0/24 + rightid="C=CH, O=Linux strongSwan, CN=moon.strongswan.org" + auto=add + +conn host-host + left=%defaultroute + leftcert=sunCert.pem + right=200.200.200.10 + rightid="C=CH, O=Linux strongSwan, CN=moon.strongswan.org" + auto=add diff --git a/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-3des-md5-transport b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-3des-md5-transport new file mode 100755 index 00000000..5422771b --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-3des-md5-transport @@ -0,0 +1,23 @@ +#!/usr/sbin/setkey -f +#I am 200.200.200.10 + +flush; +spdflush; + +# ESP SAs doing encryption using 192 bit long keys (168 + 24 parity) +# and hmac-md5 authentication using 128 bit long keys +add 200.200.200.10 200.200.200.20 esp 0x10513 + -E 3des-cbc 0x7aeaca3f87d060a12f4a4487d5a5c3355920fae69a96c831 + -A hmac-md5 0xd5f603abc8cd9d19319ca32fb955b10f; + +add 200.200.200.20 200.200.200.10 esp 0x10514 + -E 3des-cbc 0xf6ddb555acfd9d77b03ea3843f2653255afe8eb5573965df + -A hmac-md5 0x1dd90b4c32dcbe9d37b555a23df5170e; + + +spdadd 200.200.200.20 200.200.200.10 any -P in ipsec + esp/transport//require; + +spdadd 200.200.200.10 200.200.200.20 any -P out ipsec + esp/transport//require; + diff --git a/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-3des-md5-tunnel b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-3des-md5-tunnel new file mode 100755 index 00000000..52bf9c3f --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-3des-md5-tunnel @@ -0,0 +1,42 @@ +#!/usr/sbin/setkey -f +# +# +# Example ESP Tunnel for VPN. +# +# ========= ESP ========= +# | | +# Network-A Gateway-A Gateway-B Network-B +# 192.168.1.0/24 ---- 200.200.200.10 ------ 200.200.200.20 ---- 192.168.2.0/24 +# +# ====== 83xx board A ====== ===== 83xx board B ===== +# | | | | +# eth0 eth1 eth1 eth0 +# 192.168.1.130 200.200.200.10 200.200.200.20 192.168.2.130 +# +# +# Board A setup +# +# Flush the SAD and SPD +flush; +spdflush; + +# I am gateway A (eth0:192.168.1.130, eth1:200.200.200.10) +# +# Security policies +spdadd 192.168.1.0/24 192.168.2.0/24 any -P out ipsec + esp/tunnel/200.200.200.10-200.200.200.20/require; + +spdadd 192.168.2.0/24 192.168.1.0/24 any -P in ipsec + esp/tunnel/200.200.200.20-200.200.200.10/require; + + +# ESP SAs doing encryption using 192 bit long keys (168 + 24 parity) +# and hmac-md5 authentication using 128 bit long keys +add 200.200.200.10 200.200.200.20 esp 0x201 -m tunnel + -E 3des-cbc 0x7aeaca3f87d060a12f4a4487d5a5c3355920fae69a96c831 + -A hmac-md5 0xd5f603abc8cd9d19319ca32fb955b10f; + +add 200.200.200.20 200.200.200.10 esp 0x301 -m tunnel + -E 3des-cbc 0xf6ddb555acfd9d77b03ea3843f2653255afe8eb5573965df + -A hmac-md5 0x1dd90b4c32dcbe9d37b555a23df5170e; + diff --git a/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-3des-sha1-transport b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-3des-sha1-transport new file mode 100755 index 00000000..e5ee0054 --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-3des-sha1-transport @@ -0,0 +1,22 @@ +#!/usr/sbin/setkey -f +#I am 200.200.200.10 + +flush; +spdflush; + +# ESP SAs doing encryption using 192 bit long keys (168 + 24 parity) +# and hmac-sha1 authentication using 160 bit long keys +add 200.200.200.10 200.200.200.20 esp 0x10513 + -E 3des-cbc 0x7aeaca3f87d060a12f4a4487d5a5c3355920fae69a96c831 + -A hmac-sha1 0xe9c43acd5e8d779b6e09c87347852708ab49bdd3; + +add 200.200.200.20 200.200.200.10 esp 0x10514 + -E 3des-cbc 0xf6ddb555acfd9d77b03ea3843f2653255afe8eb5573965df + -A hmac-sha1 0xea6856479330dc9c17b8f6c37e2a895363d83f21; + +spdadd 200.200.200.20 200.200.200.10 any -P in ipsec + esp/transport//require; + +spdadd 200.200.200.10 200.200.200.20 any -P out ipsec + esp/transport//require; + diff --git a/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-3des-sha1-tunnel b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-3des-sha1-tunnel new file mode 100755 index 00000000..eb2881db --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-3des-sha1-tunnel @@ -0,0 +1,42 @@ +#!/usr/sbin/setkey -f +# +# +# Example ESP Tunnel for VPN. +# +# ========= ESP ========= +# | | +# Network-A Gateway-A Gateway-B Network-B +# 192.168.1.0/24 ---- 200.200.200.10 ------ 200.200.200.20 ---- 192.168.2.0/24 +# +# ====== 83xx board A ====== ===== 83xx board B ===== +# | | | | +# eth0 eth1 eth1 eth0 +# 192.168.1.130 200.200.200.10 200.200.200.20 192.168.2.130 +# +# +# Board A setup +# +# Flush the SAD and SPD +flush; +spdflush; + +# I am gateway A (eth0:192.168.1.130, eth1:200.200.200.10) +# +# Security policies +spdadd 192.168.1.0/24 192.168.2.0/24 any -P out ipsec + esp/tunnel/200.200.200.10-200.200.200.20/require; + +spdadd 192.168.2.0/24 192.168.1.0/24 any -P in ipsec + esp/tunnel/200.200.200.20-200.200.200.10/require; + + +# ESP SAs doing encryption using 192 bit long keys (168 + 24 parity) +# and hmac-sha1 authentication using 160 bit long keys +add 200.200.200.10 200.200.200.20 esp 0x201 -m tunnel + -E 3des-cbc 0x7aeaca3f87d060a12f4a4487d5a5c3355920fae69a96c831 + -A hmac-sha1 0xe9c43acd5e8d779b6e09c87347852708ab49bdd3; + +add 200.200.200.20 200.200.200.10 esp 0x301 -m tunnel + -E 3des-cbc 0xf6ddb555acfd9d77b03ea3843f2653255afe8eb5573965df + -A hmac-sha1 0xea6856479330dc9c17b8f6c37e2a895363d83f21; + diff --git a/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-3des-sha256-transport b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-3des-sha256-transport new file mode 100755 index 00000000..b5286320 --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-3des-sha256-transport @@ -0,0 +1,23 @@ +#!/usr/sbin/setkey -f +#I am 200.200.200.10 + +flush; +spdflush; + +# ESP SAs doing encryption using 192 bit long keys (168 + 24 parity) +# and hmac-sha2-256 authentication using 256 bit long keys +add 200.200.200.10 200.200.200.20 esp 0x10513 + -E 3des-cbc 0x7aeaca3f87d060a12f4a4487d5a5c3355920fae69a96c831 + -A hmac-sha2-256 0x4de03bebf6beb4fdef5a67d349a09580466cc4e54503333b2a5fd34538c91198; + +add 200.200.200.20 200.200.200.10 esp 0x10514 + -E 3des-cbc 0xf6ddb555acfd9d77b03ea3843f2653255afe8eb5573965df + -A hmac-sha2-256 0x5e01eb780b7ecc074ca2ca4fa4a5ea2ff841c977da0ce61c49d1fe767ea5452c; + + +spdadd 200.200.200.20 200.200.200.10 any -P in ipsec + esp/transport//require; + +spdadd 200.200.200.10 200.200.200.20 any -P out ipsec + esp/transport//require; + diff --git a/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-3des-sha256-tunnel b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-3des-sha256-tunnel new file mode 100755 index 00000000..e7726f08 --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-3des-sha256-tunnel @@ -0,0 +1,42 @@ +#!/usr/sbin/setkey -f +# +# +# Example ESP Tunnel for VPN. +# +# ========= ESP ========= +# | | +# Network-A Gateway-A Gateway-B Network-B +# 192.168.1.0/24 ---- 200.200.200.10 ------ 200.200.200.20 ---- 192.168.2.0/24 +# +# ====== 83xx board A ====== ===== 83xx board B ===== +# | | | | +# eth0 eth1 eth1 eth0 +# 192.168.1.130 200.200.200.10 200.200.200.20 192.168.2.130 +# +# +# Board A setup +# +# Flush the SAD and SPD +flush; +spdflush; + +# I am gateway A (eth0:192.168.1.130, eth1:200.200.200.10) +# +# Security policies +spdadd 192.168.1.0/24 192.168.2.0/24 any -P out ipsec + esp/tunnel/200.200.200.10-200.200.200.20/require; + +spdadd 192.168.2.0/24 192.168.1.0/24 any -P in ipsec + esp/tunnel/200.200.200.20-200.200.200.10/require; + + +# ESP SAs doing encryption using 192 bit long keys (168 + 24 parity) +# and hmac-sha2-256 authentication using 256 bit long keys +add 200.200.200.10 200.200.200.20 esp 0x10513 -m tunnel + -E 3des-cbc 0x7aeaca3f87d060a12f4a4487d5a5c3355920fae69a96c831 + -A hmac-sha2-256 0x4de03bebf6beb4fdef5a67d349a09580466cc4e54503333b2a5fd34538c91198; + +add 200.200.200.20 200.200.200.10 esp 0x10514 -m tunnel + -E 3des-cbc 0xf6ddb555acfd9d77b03ea3843f2653255afe8eb5573965df + -A hmac-sha2-256 0x5e01eb780b7ecc074ca2ca4fa4a5ea2ff841c977da0ce61c49d1fe767ea5452c; + diff --git a/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-aes-md5-transport b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-aes-md5-transport new file mode 100755 index 00000000..96f57837 --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-aes-md5-transport @@ -0,0 +1,23 @@ +#!/usr/sbin/setkey -f +#I am 200.200.200.10 + +flush; +spdflush; + +# ESP SAs doing encryption using 192 bit long keys (168 + 24 parity) +# and hmac-md5 authentication using 128 bit long keys +add 200.200.200.10 200.200.200.20 esp 0x10513 + -E aes-cbc 0x7aeaca3f87d060a12f4a4487d5a5c3355920fae69a96c831 + -A hmac-md5 0xd5f603abc8cd9d19319ca32fb955b10f; + +add 200.200.200.20 200.200.200.10 esp 0x10514 + -E aes-cbc 0xf6ddb555acfd9d77b03ea3843f2653255afe8eb5573965df + -A hmac-md5 0x1dd90b4c32dcbe9d37b555a23df5170e; + + +spdadd 200.200.200.20 200.200.200.10 any -P in ipsec + esp/transport//require; + +spdadd 200.200.200.10 200.200.200.20 any -P out ipsec + esp/transport//require; + diff --git a/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-aes-md5-tunnel b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-aes-md5-tunnel new file mode 100755 index 00000000..b2cf84bf --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-aes-md5-tunnel @@ -0,0 +1,42 @@ +#!/usr/sbin/setkey -f +# +# +# Example ESP Tunnel for VPN. +# +# ========= ESP ========= +# | | +# Network-A Gateway-A Gateway-B Network-B +# 192.168.1.0/24 ---- 200.200.200.10 ------ 200.200.200.20 ---- 192.168.2.0/24 +# +# ====== 83xx board A ====== ===== 83xx board B ===== +# | | | | +# eth0 eth1 eth1 eth0 +# 192.168.1.130 200.200.200.10 200.200.200.20 192.168.2.130 +# +# +# Board A setup +# +# Flush the SAD and SPD +flush; +spdflush; + +# I am gateway A (eth0:192.168.1.130, eth1:200.200.200.10) +# +# Security policies +spdadd 192.168.1.0/24 192.168.2.0/24 any -P out ipsec + esp/tunnel/200.200.200.10-200.200.200.20/require; + +spdadd 192.168.2.0/24 192.168.1.0/24 any -P in ipsec + esp/tunnel/200.200.200.20-200.200.200.10/require; + + +# ESP SAs doing encryption using 192 bit long keys (168 + 24 parity) +# and hmac-md5 authentication using 128 bit long keys +add 200.200.200.10 200.200.200.20 esp 0x201 -m tunnel + -E aes-cbc 0x7aeaca3f87d060a12f4a4487d5a5c3355920fae69a96c831 + -A hmac-md5 0xd5f603abc8cd9d19319ca32fb955b10f; + +add 200.200.200.20 200.200.200.10 esp 0x301 -m tunnel + -E aes-cbc 0xf6ddb555acfd9d77b03ea3843f2653255afe8eb5573965df + -A hmac-md5 0x1dd90b4c32dcbe9d37b555a23df5170e; + diff --git a/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-aes-sha1-transport b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-aes-sha1-transport new file mode 100755 index 00000000..f3ffaf5c --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-aes-sha1-transport @@ -0,0 +1,22 @@ +#!/usr/sbin/setkey -f +#I am 200.200.200.10 + +flush; +spdflush; + +# ESP SAs doing encryption using 192 bit long keys (168 + 24 parity) +# and hmac-sha1 authentication using 160 bit long keys +add 200.200.200.10 200.200.200.20 esp 0x10513 + -E aes-cbc 0x7aeaca3f87d060a12f4a4487d5a5c3355920fae69a96c831 + -A hmac-sha1 0xe9c43acd5e8d779b6e09c87347852708ab49bdd3; + +add 200.200.200.20 200.200.200.10 esp 0x10514 + -E aes-cbc 0xf6ddb555acfd9d77b03ea3843f2653255afe8eb5573965df + -A hmac-sha1 0xea6856479330dc9c17b8f6c37e2a895363d83f21; + +spdadd 200.200.200.20 200.200.200.10 any -P in ipsec + esp/transport//require; + +spdadd 200.200.200.10 200.200.200.20 any -P out ipsec + esp/transport//require; + diff --git a/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-aes-sha1-tunnel b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-aes-sha1-tunnel new file mode 100755 index 00000000..1ab7874f --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-aes-sha1-tunnel @@ -0,0 +1,42 @@ +#!/usr/sbin/setkey -f +# +# +# Example ESP Tunnel for VPN. +# +# ========= ESP ========= +# | | +# Network-A Gateway-A Gateway-B Network-B +# 192.168.1.0/24 ---- 200.200.200.10 ------ 200.200.200.20 ---- 192.168.2.0/24 +# +# ====== 83xx board A ====== ===== 83xx board B ===== +# | | | | +# eth0 eth1 eth1 eth0 +# 192.168.1.130 200.200.200.10 200.200.200.20 192.168.2.130 +# +# +# Board A setup +# +# Flush the SAD and SPD +flush; +spdflush; + +# I am gateway A (eth0:192.168.1.130, eth1:200.200.200.10) +# +# Security policies +spdadd 192.168.1.0/24 192.168.2.0/24 any -P out ipsec + esp/tunnel/200.200.200.10-200.200.200.20/require; + +spdadd 192.168.2.0/24 192.168.1.0/24 any -P in ipsec + esp/tunnel/200.200.200.20-200.200.200.10/require; + + +# ESP SAs doing encryption using 192 bit long keys (168 + 24 parity) +# and hmac-sha1 authentication using 160 bit long keys +add 200.200.200.10 200.200.200.20 esp 0x201 -m tunnel + -E aes-cbc 0x7aeaca3f87d060a12f4a4487d5a5c3355920fae69a96c831 + -A hmac-sha1 0xe9c43acd5e8d779b6e09c87347852708ab49bdd3; + +add 200.200.200.20 200.200.200.10 esp 0x301 -m tunnel + -E aes-cbc 0xf6ddb555acfd9d77b03ea3843f2653255afe8eb5573965df + -A hmac-sha1 0xea6856479330dc9c17b8f6c37e2a895363d83f21; + diff --git a/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-aes-sha256-transport b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-aes-sha256-transport new file mode 100755 index 00000000..d2645d6f --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-aes-sha256-transport @@ -0,0 +1,23 @@ +#!/usr/sbin/setkey -f +#I am 200.200.200.10 + +flush; +spdflush; + +# ESP SAs doing encryption using 192 bit long keys (168 + 24 parity) +# and hmac-sha2-256 authentication using 256 bit long keys +add 200.200.200.10 200.200.200.20 esp 0x10513 + -E aes-cbc 0x7aeaca3f87d060a12f4a4487d5a5c3355920fae69a96c831 + -A hmac-sha2-256 0x4de03bebf6beb4fdef5a67d349a09580466cc4e54503333b2a5fd34538c91198; + +add 200.200.200.20 200.200.200.10 esp 0x10514 + -E aes-cbc 0xf6ddb555acfd9d77b03ea3843f2653255afe8eb5573965df + -A hmac-sha2-256 0x5e01eb780b7ecc074ca2ca4fa4a5ea2ff841c977da0ce61c49d1fe767ea5452c; + + +spdadd 200.200.200.20 200.200.200.10 any -P in ipsec + esp/transport//require; + +spdadd 200.200.200.10 200.200.200.20 any -P out ipsec + esp/transport//require; + diff --git a/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-aes-sha256-tunnel b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-aes-sha256-tunnel new file mode 100755 index 00000000..8ed697d1 --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-aes-sha256-tunnel @@ -0,0 +1,42 @@ +#!/usr/sbin/setkey -f +# +# +# Example ESP Tunnel for VPN. +# +# ========= ESP ========= +# | | +# Network-A Gateway-A Gateway-B Network-B +# 192.168.1.0/24 ---- 200.200.200.10 ------ 200.200.200.20 ---- 192.168.2.0/24 +# +# ====== 83xx board A ====== ===== 83xx board B ===== +# | | | | +# eth0 eth1 eth1 eth0 +# 192.168.1.130 200.200.200.10 200.200.200.20 192.168.2.130 +# +# +# Board A setup +# +# Flush the SAD and SPD +flush; +spdflush; + +# I am gateway A (eth0:192.168.1.130, eth1:200.200.200.10) +# +# Security policies +spdadd 192.168.1.0/24 192.168.2.0/24 any -P out ipsec + esp/tunnel/200.200.200.10-200.200.200.20/require; + +spdadd 192.168.2.0/24 192.168.1.0/24 any -P in ipsec + esp/tunnel/200.200.200.20-200.200.200.10/require; + + +# ESP SAs doing encryption using 192 bit long keys (168 + 24 parity) +# and hmac-sha2-256 authentication using 256 bit long keys +add 200.200.200.10 200.200.200.20 esp 0x10513 -m tunnel + -E aes-cbc 0x7aeaca3f87d060a12f4a4487d5a5c3355920fae69a96c831 + -A hmac-sha2-256 0x4de03bebf6beb4fdef5a67d349a09580466cc4e54503333b2a5fd34538c91198; + +add 200.200.200.20 200.200.200.10 esp 0x10514 -m tunnel + -E aes-cbc 0xf6ddb555acfd9d77b03ea3843f2653255afe8eb5573965df + -A hmac-sha2-256 0x5e01eb780b7ecc074ca2ca4fa4a5ea2ff841c977da0ce61c49d1fe767ea5452c; + diff --git a/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-null-null-transport b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-null-null-transport new file mode 100755 index 00000000..84275d07 --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-null-null-transport @@ -0,0 +1,23 @@ +#!/usr/sbin/setkey -f +#I am 200.200.200.10 + +flush; +spdflush; + +# ESP SAs doing null encryption +# and null authentication +add 200.200.200.10 200.200.200.20 esp 0x10513 + -E null + -A null; + +add 200.200.200.20 200.200.200.10 esp 0x10514 + -E null + -A null; + + +spdadd 200.200.200.20 200.200.200.10 any -P in ipsec + esp/transport//require; + +spdadd 200.200.200.10 200.200.200.20 any -P out ipsec + esp/transport//require; + diff --git a/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-null-null-tunnel b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-null-null-tunnel new file mode 100755 index 00000000..478d14a8 --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-null-null-tunnel @@ -0,0 +1,42 @@ +#!/usr/sbin/setkey -f +# +# +# Example ESP Tunnel for VPN. +# +# ========= ESP ========= +# | | +# Network-A Gateway-A Gateway-B Network-B +# 192.168.1.0/24 ---- 200.200.200.10 ------ 200.200.200.20 ---- 192.168.2.0/24 +# +# ====== 83xx board A ====== ===== 83xx board B ===== +# | | | | +# eth0 eth1 eth1 eth0 +# 192.168.1.130 200.200.200.10 200.200.200.20 192.168.2.130 +# +# +# Board A setup +# +# Flush the SAD and SPD +flush; +spdflush; + +# I am gateway A (eth0:192.168.1.130, eth1:200.200.200.10) +# +# Security policies +spdadd 192.168.1.0/24 192.168.2.0/24 any -P out ipsec + esp/tunnel/200.200.200.10-200.200.200.20/require; + +spdadd 192.168.2.0/24 192.168.1.0/24 any -P in ipsec + esp/tunnel/200.200.200.20-200.200.200.10/require; + + +# ESP SAs doing null encryption +# and null authentication +add 200.200.200.10 200.200.200.20 esp 0x201 -m tunnel + -E null + -A null; + +add 200.200.200.20 200.200.200.10 esp 0x301 -m tunnel + -E null + -A null; + diff --git a/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.ipv4 b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.ipv4 new file mode 100755 index 00000000..e219f2ad --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.ipv4 @@ -0,0 +1,2 @@ +set -v +route add -net 192.168.2.0 netmask 255.255.255.0 gw 200.200.200.20 diff --git a/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/moonCert.pem b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/moonCert.pem new file mode 100644 index 00000000..d5c970f4 --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/moonCert.pem @@ -0,0 +1,25 @@ +-----BEGIN CERTIFICATE----- +MIIEIjCCAwqgAwIBAgIBFzANBgkqhkiG9w0BAQsFADBFMQswCQYDVQQGEwJDSDEZ +MBcGA1UEChMQTGludXggc3Ryb25nU3dhbjEbMBkGA1UEAxMSc3Ryb25nU3dhbiBS +b290IENBMB4XDTA5MDgyNzEwMDMzMloXDTE0MDgyNjEwMDMzMlowRjELMAkGA1UE +BhMCQ0gxGTAXBgNVBAoTEExpbnV4IHN0cm9uZ1N3YW4xHDAaBgNVBAMTE21vb24u +c3Ryb25nc3dhbi5vcmcwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDK +L2M91Lu6BYYhWxWgMS9z9TMSTwszm5rhO7ZIsCtMRo4PAeYw+++SGXt3CPXb/+p+ +SWKGlm11rPE71eQ3ehgh2C3hAurfmWO0iQQaCw+fdreeIVCqOQIOP6UqZ327h5yY +YpHk8VQv4vBJTpxclU1PqnWheqe1ZlLxsW773LRml/fQt/UgvJkCBTZZONLNMfK+ +7TDnYaVsAtncgvDN78nUNEe2qY92KK7SrBJ6SpUEg49m51F+XgsGcsgWVHS85on3 +Om/G48crLEVJjdu8CxewSRVgb+lPJWzHd8QsU0Vg/7vlqs3ZRMyNtNKrr4opSvVb +A6agGlTXhDCreDiXU8KHAgMBAAGjggEaMIIBFjAJBgNVHRMEAjAAMAsGA1UdDwQE +AwIDqDAdBgNVHQ4EFgQUapx00fiJeYn2WpTpifH6w2SdKS4wbQYDVR0jBGYwZIAU +XafdcAZRMn7ntm2zteXgYOouTe+hSaRHMEUxCzAJBgNVBAYTAkNIMRkwFwYDVQQK +ExBMaW51eCBzdHJvbmdTd2FuMRswGQYDVQQDExJzdHJvbmdTd2FuIFJvb3QgQ0GC +AQAwHgYDVR0RBBcwFYITbW9vbi5zdHJvbmdzd2FuLm9yZzATBgNVHSUEDDAKBggr +BgEFBQcDATA5BgNVHR8EMjAwMC6gLKAqhihodHRwOi8vY3JsLnN0cm9uZ3N3YW4u +b3JnL3N0cm9uZ3N3YW4uY3JsMA0GCSqGSIb3DQEBCwUAA4IBAQCctXg2xeMozaTV +jiBL1P8MY9uEH5JtU0EceQ1RbI5/2vGRdnECND9oADY5vamaaE2Mdq2Qh/vlXnML +o3ii5ELjsQlYdTYZOcMOdcUUXYvbbFX1cwpkBhyBl1H25KptHcgQ/HnceKp3kOuq +wYOYjgwePXulcpWXx0E2QtQCFQQZFPyEWeNJxH0oglg53QPXfHY9I2/Gukj5V0bz +p7ME0Gs8KdnYdmbbDqzQgPsta96/m+HoJlsrVF+4Gqihj6BWMBQ2ybjPWZdG3oH9 +25cE8v60Ry98D0Z/tygbAUFnh5oOvaf642paVgc3aoA77I8U+UZjECxISoiHultY +7QTufOwP +-----END CERTIFICATE----- diff --git a/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/moonKey.pem b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/moonKey.pem new file mode 100644 index 00000000..4d99866f --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/moonKey.pem @@ -0,0 +1,27 @@ +-----BEGIN RSA PRIVATE KEY----- +MIIEowIBAAKCAQEAyi9jPdS7ugWGIVsVoDEvc/UzEk8LM5ua4Tu2SLArTEaODwHm +MPvvkhl7dwj12//qfklihpZtdazxO9XkN3oYIdgt4QLq35ljtIkEGgsPn3a3niFQ +qjkCDj+lKmd9u4ecmGKR5PFUL+LwSU6cXJVNT6p1oXqntWZS8bFu+9y0Zpf30Lf1 +ILyZAgU2WTjSzTHyvu0w52GlbALZ3ILwze/J1DRHtqmPdiiu0qwSekqVBIOPZudR +fl4LBnLIFlR0vOaJ9zpvxuPHKyxFSY3bvAsXsEkVYG/pTyVsx3fELFNFYP+75arN +2UTMjbTSq6+KKUr1WwOmoBpU14Qwq3g4l1PChwIDAQABAoIBACBFB/Xqajv6fbn9 +K6pxrz02uXwGmacXAtVIDoPzejWmXS4QA4l17HrJDmelSnhelDKry8nnYHkTrTz7 +mn0wQ4HDWy86o/okJUG/TKRLd6bf79aRQqqohqd3iQkHk43GyzuXH+oGioVKF0fc +ACDWw4wfjL7FMNdHCZ4Bz9DrHO/ysHe9B6rvSYm3VZRhSxaneIkaLkkDadKpVx3f +XNFlMxY4qKPJYYSoJZ61iMqrO7+rnA93tmyDDs8PKU3BtnpfNrdePgleJHhk8Zqy +Ev2/NOCSUxbKE8NCtLpGTs+T0qjjnu4k3WPd3ZOBAan0uPDekHZeHB/aXGLhYcxx +J5SurqECgYEA+F1gppkER5Jtoaudt/CUpdQ1sR9wxf75VBqJ4FiYABGQz9xlG4oj +zL/o572s0iV3bwFpnQa+WuWrxGkP6ZuB/Z82npc0N/vLou/b4dxvg4n7K+eOOEf0 +8FMjsse2tqTIXKCqcmQnR0NPQ1jwuvEKsXP5w/JOlnRXAXnd4jxsJI0CgYEA0GaT +61ySttUW9jC3mxuY6jkQy8TEQqR3nOFvWwmCXIWOpN/MTTPus+Telxp/pdKhU+mo +PmX3Unyne5PvwleWDq3YzltX5ZDZGJ5UJlKuNnfGIzQ6OcHRbb7zBpQG6qSRPuug +bgo688hTnb1L59nK88zWVK45euf6pyuoI+SwIGMCgYEA7yvE8knyhBXvezuv0z1b +eGHmHp5/VDwY0DQKSEAoiBBiWrkLqLybgwXf/KJ8dZZc8En08aFX2GLJyYe/KiB1 +ys3ypEBJqgvRayP+o/9KZ+qNNRd0rqAksPXvL7ABNNt0kzapTSVDae3Yu6s/j1am +DIL5qAeERIDedG5uDPpQzdUCgYB7MtjpP63ABhLv8XbpbBQnCxtByw3W89F+Xcrt +v55gQdhE4cSuMzA/CuMH4vNpPS6AI9aBJNhj3CtKo/cOJachAGb1/wvkO5ALvLW0 +fhZdPstUTnDJain7vfF/hwzbs/PlhXgu9T9KlLfRvXFdG+Sd4g8mumRiozcLkoRw +y6XPTwKBgDJP+s9wXmdG90HST/aqC7FKrVXLpB63dY5swNUfQP6sa0pFnON0r0JC +h/YCsGFFIAebQ2uOkM3g3f9nkwTp7910ov+/5uThvRI2w2BBPy0mVuALPjyyF1Z2 +cb9zpyKiIuXoXRCf4sd8r1lR9bn0Fxx0Svpxf+fpMGSI5quHNBKY +-----END RSA PRIVATE KEY----- diff --git a/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/pingsizes.sh b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/pingsizes.sh new file mode 100755 index 00000000..faefb245 --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/pingsizes.sh @@ -0,0 +1,19 @@ +#!/bin/bash +# +# Usage: ./pingsizes.sh 1440 20 (or greater) +# + +PINGDEST=${PINGDEST:-200.200.200.10} +k=$1 +lim="$((k+$2))" +((k-=1)) +while [ "$k" != "$lim" ] ; do + echo -n "ping -s $((k+=1)) : " + ping -i 1000 -c 1 -s $k $PINGDEST | grep packets & + sleep 1 + PID=`ps -eaf | grep 'ping -i' | grep -v grep | sed 's/[ ][ ]*/ /g' | cut -d " " -f 2` + if [ -n "$PID" ] ; then + echo "****************** killing $PID" + kill $PID > /dev/null + fi +done diff --git a/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/pingsizest.sh b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/pingsizest.sh new file mode 100755 index 00000000..d5ff0f7d --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/pingsizest.sh @@ -0,0 +1,19 @@ +#!/bin/bash +# +# Usage: ./pingsizes.sh 1440 20 (or greater) +# + +PINGDEST=${PINGDEST:-200.200.200.10} +k=$1 +lim="$((k+$2))" +((k-=1)) +while [ "$k" != "$lim" ] ; do + echo ping -s $((k+=1)) + ping -i 1000 -c 1 -s $k $PINGDEST & + sleep 1 + PID=`ps -eaf | grep 'ping -i' | sed 's/[ ][ ]*/ /g' | cut -d " " -f 2` + if [ -n "$PID" ] ; then + echo "****************** killing $PID" + kill $PID + fi +done diff --git a/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/psk.txt b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/psk.txt new file mode 100644 index 00000000..46c1ff41 --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/psk.txt @@ -0,0 +1,2 @@ +200.200.200.20 secretkeyracoon +200.200.200.10 secretkeyracoon diff --git a/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/racoon.conf b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/racoon.conf new file mode 100644 index 00000000..cf561f51 --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/racoon.conf @@ -0,0 +1,22 @@ +path pre_shared_key "/test_setkey/psk.txt" ; + + remote anonymous + { + exchange_mode main ; + lifetime time 1 hour ; + proposal { + encryption_algorithm 3des; + hash_algorithm sha1; + authentication_method pre_shared_key ; + dh_group 2 ; + } + } + + sainfo anonymous + { + pfs_group 2; + lifetime time 1 hour ; + encryption_algorithm 3des ; + authentication_algorithm hmac_sha1 ; + compression_algorithm deflate ; + } diff --git a/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-3des-md5-transport b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-3des-md5-transport new file mode 100755 index 00000000..7f82fb46 --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-3des-md5-transport @@ -0,0 +1,23 @@ +#!/usr/sbin/setkey -f +#I am 200.200.200.20 + +flush; +spdflush; + +# ESP SAs doing encryption using 192 bit long keys (168 + 24 parity) +# and hmac-md5 authentication using 128 bit long keys +add 200.200.200.10 200.200.200.20 esp 0x10513 + -E 3des-cbc 0x7aeaca3f87d060a12f4a4487d5a5c3355920fae69a96c831 + -A hmac-md5 0xd5f603abc8cd9d19319ca32fb955b10f; + +add 200.200.200.20 200.200.200.10 esp 0x10514 + -E 3des-cbc 0xf6ddb555acfd9d77b03ea3843f2653255afe8eb5573965df + -A hmac-md5 0x1dd90b4c32dcbe9d37b555a23df5170e; + + +spdadd 200.200.200.20 200.200.200.10 any -P out ipsec + esp/transport//require; + +spdadd 200.200.200.10 200.200.200.20 any -P in ipsec + esp/transport//require; + diff --git a/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-3des-md5-tunnel b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-3des-md5-tunnel new file mode 100755 index 00000000..5a752579 --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-3des-md5-tunnel @@ -0,0 +1,42 @@ +#!/usr/sbin/setkey -f +# +# +# Example ESP Tunnel for VPN. +# +# ========= ESP ========= +# | | +# Network-A Gateway-A Gateway-B Network-B +# 192.168.1.0/24 ---- 200.200.200.10 ------ 200.200.200.20 ---- 192.168.2.0/24 +# +# ====== 83xx board A ====== ===== 83xx board B ===== +# | | | | +# eth0 eth1 eth1 eth0 +# 192.168.1.130 200.200.200.10 200.200.200.20 192.168.2.130 +# +# +# Board B setup +# +# Flush the SAD and SPD +flush; +spdflush; + +# I am gateway B (eth0:192.168.2.130, eth1:200.200.200.20) +# +# Security policies +spdadd 192.168.2.0/24 192.168.1.0/24 any -P out ipsec + esp/tunnel/200.200.200.20-200.200.200.10/require; + +spdadd 192.168.1.0/24 192.168.2.0/24 any -P in ipsec + esp/tunnel/200.200.200.10-200.200.200.20/require; + + +# ESP SAs doing encryption using 192 bit long keys (168 + 24 parity) +# and hmac-md5 authentication using 128 bit long keys +add 200.200.200.10 200.200.200.20 esp 0x201 -m tunnel + -E 3des-cbc 0x7aeaca3f87d060a12f4a4487d5a5c3355920fae69a96c831 + -A hmac-md5 0xd5f603abc8cd9d19319ca32fb955b10f; + +add 200.200.200.20 200.200.200.10 esp 0x301 -m tunnel + -E 3des-cbc 0xf6ddb555acfd9d77b03ea3843f2653255afe8eb5573965df + -A hmac-md5 0x1dd90b4c32dcbe9d37b555a23df5170e; + diff --git a/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-3des-sha1-transport b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-3des-sha1-transport new file mode 100755 index 00000000..6ef885d4 --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-3des-sha1-transport @@ -0,0 +1,22 @@ +#!/usr/sbin/setkey -f +#I am 200.200.200.20 + +flush; +spdflush; + +# ESP SAs doing encryption using 192 bit long keys (168 + 24 parity) +# and hmac-sha1 authentication using 160 bit long keys +add 200.200.200.10 200.200.200.20 esp 0x10513 + -E 3des-cbc 0x7aeaca3f87d060a12f4a4487d5a5c3355920fae69a96c831 + -A hmac-sha1 0xe9c43acd5e8d779b6e09c87347852708ab49bdd3; + +add 200.200.200.20 200.200.200.10 esp 0x10514 + -E 3des-cbc 0xf6ddb555acfd9d77b03ea3843f2653255afe8eb5573965df + -A hmac-sha1 0xea6856479330dc9c17b8f6c37e2a895363d83f21; + +# Security policies +spdadd 200.200.200.20 200.200.200.10 any -P out ipsec + esp/transport//require; + +spdadd 200.200.200.10 200.200.200.20 any -P in ipsec + esp/transport//require; diff --git a/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-3des-sha1-tunnel b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-3des-sha1-tunnel new file mode 100755 index 00000000..16c31578 --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-3des-sha1-tunnel @@ -0,0 +1,41 @@ +#!/usr/sbin/setkey -f +# +# +# Example ESP Tunnel for VPN. +# +# ========= ESP ========= +# | | +# Network-A Gateway-A Gateway-B Network-B +# 192.168.1.0/24 ---- 200.200.200.10 ------ 200.200.200.20 ---- 192.168.2.0/24 +# +# ====== 83xx board A ====== ===== 83xx board B ===== +# | | | | +# eth0 eth1 eth1 eth0 +# 192.168.1.130 200.200.200.10 200.200.200.20 192.168.2.130 +# +# +# Board B setup +# Flush the SAD and SPD +flush; +spdflush; + +# I am gateway B (eth0:192.168.2.130, eth1:200.200.200.20) +# +# Security policies + +spdadd 192.168.2.0/24 192.168.1.0/24 any -P out ipsec + esp/tunnel/200.200.200.20-200.200.200.10/require; + +spdadd 192.168.1.0/24 192.168.2.0/24 any -P in ipsec + esp/tunnel/200.200.200.10-200.200.200.20/require; + +# ESP SAs doing encryption using 192 bit long keys (168 + 24 parity) +# and hmac-sha1 authentication using 160 bit long keys +add 200.200.200.10 200.200.200.20 esp 0x201 -m tunnel + -E 3des-cbc 0x7aeaca3f87d060a12f4a4487d5a5c3355920fae69a96c831 + -A hmac-sha1 0xe9c43acd5e8d779b6e09c87347852708ab49bdd3; + +add 200.200.200.20 200.200.200.10 esp 0x301 -m tunnel + -E 3des-cbc 0xf6ddb555acfd9d77b03ea3843f2653255afe8eb5573965df + -A hmac-sha1 0xea6856479330dc9c17b8f6c37e2a895363d83f21; + diff --git a/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-3des-sha256-transport b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-3des-sha256-transport new file mode 100755 index 00000000..b9772092 --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-3des-sha256-transport @@ -0,0 +1,23 @@ +#!/usr/sbin/setkey -f +#I am 200.200.200.20 + +flush; +spdflush; + +# ESP SAs doing encryption using 192 bit long keys (168 + 24 parity) +# and hmac-sha2-256 authentication using 256 bit long keys +add 200.200.200.10 200.200.200.20 esp 0x10513 + -E 3des-cbc 0x7aeaca3f87d060a12f4a4487d5a5c3355920fae69a96c831 + -A hmac-sha2-256 0x4de03bebf6beb4fdef5a67d349a09580466cc4e54503333b2a5fd34538c91198; + +add 200.200.200.20 200.200.200.10 esp 0x10514 + -E 3des-cbc 0xf6ddb555acfd9d77b03ea3843f2653255afe8eb5573965df + -A hmac-sha2-256 0x5e01eb780b7ecc074ca2ca4fa4a5ea2ff841c977da0ce61c49d1fe767ea5452c; + + +spdadd 200.200.200.20 200.200.200.10 any -P out ipsec + esp/transport//require; + +spdadd 200.200.200.10 200.200.200.20 any -P in ipsec + esp/transport//require; + diff --git a/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-3des-sha256-tunnel b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-3des-sha256-tunnel new file mode 100755 index 00000000..e7c5b4e6 --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-3des-sha256-tunnel @@ -0,0 +1,42 @@ +#!/usr/sbin/setkey -f +# +# +# Example ESP Tunnel for VPN. +# +# ========= ESP ========= +# | | +# Network-A Gateway-A Gateway-B Network-B +# 192.168.1.0/24 ---- 200.200.200.10 ------ 200.200.200.20 ---- 192.168.2.0/24 +# +# ====== 83xx board A ====== ===== 83xx board B ===== +# | | | | +# eth0 eth1 eth1 eth0 +# 192.168.1.130 200.200.200.10 200.200.200.20 192.168.2.130 +# +# +# Board A setup +# +# Flush the SAD and SPD +flush; +spdflush; + +# I am gateway B (eth0:192.168.2.130, eth1:200.200.200.20) +# +# Security policies +spdadd 192.168.2.0/24 192.168.1.0/24 any -P out ipsec + esp/tunnel/200.200.200.20-200.200.200.10/require; + +spdadd 192.168.1.0/24 192.168.2.0/24 any -P in ipsec + esp/tunnel/200.200.200.10-200.200.200.20/require; + + +# ESP SAs doing encryption using 192 bit long keys (168 + 24 parity) +# and hmac-sha2-256 authentication using 256 bit long keys +add 200.200.200.10 200.200.200.20 esp 0x10513 -m tunnel + -E 3des-cbc 0x7aeaca3f87d060a12f4a4487d5a5c3355920fae69a96c831 + -A hmac-sha2-256 0x4de03bebf6beb4fdef5a67d349a09580466cc4e54503333b2a5fd34538c91198; + +add 200.200.200.20 200.200.200.10 esp 0x10514 -m tunnel + -E 3des-cbc 0xf6ddb555acfd9d77b03ea3843f2653255afe8eb5573965df + -A hmac-sha2-256 0x5e01eb780b7ecc074ca2ca4fa4a5ea2ff841c977da0ce61c49d1fe767ea5452c; + diff --git a/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-aes-md5-transport b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-aes-md5-transport new file mode 100755 index 00000000..5d55d001 --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-aes-md5-transport @@ -0,0 +1,23 @@ +#!/usr/sbin/setkey -f +#I am 200.200.200.20 + +flush; +spdflush; + +# ESP SAs doing encryption using 192 bit long keys (168 + 24 parity) +# and hmac-md5 authentication using 128 bit long keys +add 200.200.200.10 200.200.200.20 esp 0x10513 + -E aes-cbc 0x7aeaca3f87d060a12f4a4487d5a5c3355920fae69a96c831 + -A hmac-md5 0xd5f603abc8cd9d19319ca32fb955b10f; + +add 200.200.200.20 200.200.200.10 esp 0x10514 + -E aes-cbc 0xf6ddb555acfd9d77b03ea3843f2653255afe8eb5573965df + -A hmac-md5 0x1dd90b4c32dcbe9d37b555a23df5170e; + + +spdadd 200.200.200.20 200.200.200.10 any -P out ipsec + esp/transport//require; + +spdadd 200.200.200.10 200.200.200.20 any -P in ipsec + esp/transport//require; + diff --git a/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-aes-md5-tunnel b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-aes-md5-tunnel new file mode 100755 index 00000000..f49bd54a --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-aes-md5-tunnel @@ -0,0 +1,42 @@ +#!/usr/sbin/setkey -f +# +# +# Example ESP Tunnel for VPN. +# +# ========= ESP ========= +# | | +# Network-A Gateway-A Gateway-B Network-B +# 192.168.1.0/24 ---- 200.200.200.10 ------ 200.200.200.20 ---- 192.168.2.0/24 +# +# ====== 83xx board A ====== ===== 83xx board B ===== +# | | | | +# eth0 eth1 eth1 eth0 +# 192.168.1.130 200.200.200.10 200.200.200.20 192.168.2.130 +# +# +# Board B setup +# +# Flush the SAD and SPD +flush; +spdflush; + +# I am gateway B (eth0:192.168.2.130, eth1:200.200.200.20) +# +# Security policies +spdadd 192.168.2.0/24 192.168.1.0/24 any -P out ipsec + esp/tunnel/200.200.200.20-200.200.200.10/require; + +spdadd 192.168.1.0/24 192.168.2.0/24 any -P in ipsec + esp/tunnel/200.200.200.10-200.200.200.20/require; + + +# ESP SAs doing encryption using 192 bit long keys (168 + 24 parity) +# and hmac-md5 authentication using 128 bit long keys +add 200.200.200.10 200.200.200.20 esp 0x201 -m tunnel + -E aes-cbc 0x7aeaca3f87d060a12f4a4487d5a5c3355920fae69a96c831 + -A hmac-md5 0xd5f603abc8cd9d19319ca32fb955b10f; + +add 200.200.200.20 200.200.200.10 esp 0x301 -m tunnel + -E aes-cbc 0xf6ddb555acfd9d77b03ea3843f2653255afe8eb5573965df + -A hmac-md5 0x1dd90b4c32dcbe9d37b555a23df5170e; + diff --git a/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-aes-sha1-transport b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-aes-sha1-transport new file mode 100755 index 00000000..d9c65a45 --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-aes-sha1-transport @@ -0,0 +1,22 @@ +#!/usr/sbin/setkey -f +#I am 200.200.200.20 + +flush; +spdflush; + +# ESP SAs doing encryption using 192 bit long keys (168 + 24 parity) +# and hmac-sha1 authentication using 160 bit long keys +add 200.200.200.10 200.200.200.20 esp 0x10513 + -E aes-cbc 0x7aeaca3f87d060a12f4a4487d5a5c3355920fae69a96c831 + -A hmac-sha1 0xe9c43acd5e8d779b6e09c87347852708ab49bdd3; + +add 200.200.200.20 200.200.200.10 esp 0x10514 + -E aes-cbc 0xf6ddb555acfd9d77b03ea3843f2653255afe8eb5573965df + -A hmac-sha1 0xea6856479330dc9c17b8f6c37e2a895363d83f21; + +# Security policies +spdadd 200.200.200.20 200.200.200.10 any -P out ipsec + esp/transport//require; + +spdadd 200.200.200.10 200.200.200.20 any -P in ipsec + esp/transport//require; diff --git a/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-aes-sha1-tunnel b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-aes-sha1-tunnel new file mode 100755 index 00000000..1f10136a --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-aes-sha1-tunnel @@ -0,0 +1,41 @@ +#!/usr/sbin/setkey -f +# +# +# Example ESP Tunnel for VPN. +# +# ========= ESP ========= +# | | +# Network-A Gateway-A Gateway-B Network-B +# 192.168.1.0/24 ---- 200.200.200.10 ------ 200.200.200.20 ---- 192.168.2.0/24 +# +# ====== 83xx board A ====== ===== 83xx board B ===== +# | | | | +# eth0 eth1 eth1 eth0 +# 192.168.1.130 200.200.200.10 200.200.200.20 192.168.2.130 +# +# +# Board B setup +# Flush the SAD and SPD +flush; +spdflush; + +# I am gateway B (eth0:192.168.2.130, eth1:200.200.200.20) +# +# Security policies + +spdadd 192.168.2.0/24 192.168.1.0/24 any -P out ipsec + esp/tunnel/200.200.200.20-200.200.200.10/require; + +spdadd 192.168.1.0/24 192.168.2.0/24 any -P in ipsec + esp/tunnel/200.200.200.10-200.200.200.20/require; + +# ESP SAs doing encryption using 192 bit long keys (168 + 24 parity) +# and hmac-sha1 authentication using 160 bit long keys +add 200.200.200.10 200.200.200.20 esp 0x201 -m tunnel + -E aes-cbc 0x7aeaca3f87d060a12f4a4487d5a5c3355920fae69a96c831 + -A hmac-sha1 0xe9c43acd5e8d779b6e09c87347852708ab49bdd3; + +add 200.200.200.20 200.200.200.10 esp 0x301 -m tunnel + -E aes-cbc 0xf6ddb555acfd9d77b03ea3843f2653255afe8eb5573965df + -A hmac-sha1 0xea6856479330dc9c17b8f6c37e2a895363d83f21; + diff --git a/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-aes-sha256-transport b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-aes-sha256-transport new file mode 100755 index 00000000..817a8bd4 --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-aes-sha256-transport @@ -0,0 +1,23 @@ +#!/usr/sbin/setkey -f +#I am 200.200.200.20 + +flush; +spdflush; + +# ESP SAs doing encryption using 192 bit long keys (168 + 24 parity) +# and hmac-sha2-256 authentication using 256 bit long keys +add 200.200.200.10 200.200.200.20 esp 0x10513 + -E aes-cbc 0x7aeaca3f87d060a12f4a4487d5a5c3355920fae69a96c831 + -A hmac-sha2-256 0x4de03bebf6beb4fdef5a67d349a09580466cc4e54503333b2a5fd34538c91198; + +add 200.200.200.20 200.200.200.10 esp 0x10514 + -E aes-cbc 0xf6ddb555acfd9d77b03ea3843f2653255afe8eb5573965df + -A hmac-sha2-256 0x5e01eb780b7ecc074ca2ca4fa4a5ea2ff841c977da0ce61c49d1fe767ea5452c; + + +spdadd 200.200.200.20 200.200.200.10 any -P out ipsec + esp/transport//require; + +spdadd 200.200.200.10 200.200.200.20 any -P in ipsec + esp/transport//require; + diff --git a/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-aes-sha256-tunnel b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-aes-sha256-tunnel new file mode 100755 index 00000000..9bca18fb --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-aes-sha256-tunnel @@ -0,0 +1,42 @@ +#!/usr/sbin/setkey -f +# +# +# Example ESP Tunnel for VPN. +# +# ========= ESP ========= +# | | +# Network-A Gateway-A Gateway-B Network-B +# 192.168.1.0/24 ---- 200.200.200.10 ------ 200.200.200.20 ---- 192.168.2.0/24 +# +# ====== 83xx board A ====== ===== 83xx board B ===== +# | | | | +# eth0 eth1 eth1 eth0 +# 192.168.1.130 200.200.200.10 200.200.200.20 192.168.2.130 +# +# +# Board A setup +# +# Flush the SAD and SPD +flush; +spdflush; + +# I am gateway B (eth0:192.168.2.130, eth1:200.200.200.20) +# +# Security policies +spdadd 192.168.2.0/24 192.168.1.0/24 any -P out ipsec + esp/tunnel/200.200.200.20-200.200.200.10/require; + +spdadd 192.168.1.0/24 192.168.2.0/24 any -P in ipsec + esp/tunnel/200.200.200.10-200.200.200.20/require; + + +# ESP SAs doing encryption using 192 bit long keys (168 + 24 parity) +# and hmac-sha2-256 authentication using 256 bit long keys +add 200.200.200.10 200.200.200.20 esp 0x10513 -m tunnel + -E aes-cbc 0x7aeaca3f87d060a12f4a4487d5a5c3355920fae69a96c831 + -A hmac-sha2-256 0x4de03bebf6beb4fdef5a67d349a09580466cc4e54503333b2a5fd34538c91198; + +add 200.200.200.20 200.200.200.10 esp 0x10514 -m tunnel + -E aes-cbc 0xf6ddb555acfd9d77b03ea3843f2653255afe8eb5573965df + -A hmac-sha2-256 0x5e01eb780b7ecc074ca2ca4fa4a5ea2ff841c977da0ce61c49d1fe767ea5452c; + diff --git a/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-null-null-transport b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-null-null-transport new file mode 100755 index 00000000..26dfe2e1 --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-null-null-transport @@ -0,0 +1,23 @@ +#!/usr/sbin/setkey -f +#I am 200.200.200.20 + +flush; +spdflush; + +# ESP SAs doing null encryption +# and null authentication +add 200.200.200.10 200.200.200.20 esp 0x10513 + -E null + -A null; + +add 200.200.200.20 200.200.200.10 esp 0x10514 + -E null + -A null; + + +spdadd 200.200.200.20 200.200.200.10 any -P out ipsec + esp/transport//require; + +spdadd 200.200.200.10 200.200.200.20 any -P in ipsec + esp/transport//require; + diff --git a/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-null-null-tunnel b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-null-null-tunnel new file mode 100755 index 00000000..bc4f38eb --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-null-null-tunnel @@ -0,0 +1,42 @@ +#!/usr/sbin/setkey -f +# +# +# Example ESP Tunnel for VPN. +# +# ========= ESP ========= +# | | +# Network-A Gateway-A Gateway-B Network-B +# 192.168.1.0/24 ---- 200.200.200.10 ------ 200.200.200.20 ---- 192.168.2.0/24 +# +# ====== 83xx board A ====== ===== 83xx board B ===== +# | | | | +# eth0 eth1 eth1 eth0 +# 192.168.1.130 200.200.200.10 200.200.200.20 192.168.2.130 +# +# +# Board B setup +# +# Flush the SAD and SPD +flush; +spdflush; + +# I am gateway B (eth0:192.168.2.130, eth1:200.200.200.20) +# +# Security policies +spdadd 192.168.2.0/24 192.168.1.0/24 any -P out ipsec + esp/tunnel/200.200.200.20-200.200.200.10/require; + +spdadd 192.168.1.0/24 192.168.2.0/24 any -P in ipsec + esp/tunnel/200.200.200.10-200.200.200.20/require; + + +# ESP SAs doing null encryption +# and null authentication +add 200.200.200.10 200.200.200.20 esp 0x201 -m tunnel + -E null + -A null; + +add 200.200.200.20 200.200.200.10 esp 0x301 -m tunnel + -E null + -A null; + diff --git a/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.ipv4 b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.ipv4 new file mode 100755 index 00000000..67cd1b2c --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.ipv4 @@ -0,0 +1,2 @@ +set -v +route add -net 192.168.1.0 netmask 255.255.255.0 gw 200.200.200.10 diff --git a/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/setup b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/setup new file mode 100755 index 00000000..9e6fa7fa --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/setup @@ -0,0 +1,47 @@ +# setup - quick setup for left or right side of ipsec test +# see README for example use. + +SCRIPT_HOME=/test_setkey/ +cd $SCRIPT_HOME + +export PATH=$SCRIPT_HOME:$PATH + +if [ "$1" != "left" -a "$1" != "right" ] ; then + echo "Usage: $0 side [config] [driver]" + echo " where side is either left or right." + echo " where config is either" + echo " aes-sha1-tunnel (default)" + echo " or 3des-sha1-tunnel" + echo " if driver is supplied, script does 'modprobe driver'" + exit 1 +fi + +SIDE=$1 +POLICY_CFG=$SIDE.conf +DEFAULT_POLICY=aes-sha1-tunnel + +if [ -n "$2" ] ; then + POLICY=$2 +else + POLICY=$DEFAULT_POLICY +fi + +SETKEY_FILE=$POLICY_CFG-$POLICY + +if [ ! -f $SETKEY_FILE ] ; then + echo "Missing setkey command file: $SETKEY_FILE" + exit 1 +fi + +# modprobe any driver name given as last parameter +if [ -n "$3" ] ; then + modprobe $3 +fi + +SETUP_CMD_FILE=./setup_$SIDE +. $SETUP_CMD_FILE + +$SETKEY_FILE + +setkey -D +setkey -D -P diff --git a/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/setup_left b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/setup_left new file mode 100755 index 00000000..da769099 --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/setup_left @@ -0,0 +1,13 @@ +# board on left setup +set -v +ifconfig eth0 down +ifconfig eth0 hw ether 00:04:9F:11:22:33 +ifconfig eth0 192.168.1.130 netmask 255.255.255.0 +ifconfig eth0 up +ifconfig eth1 down +ifconfig eth1 hw ether 00:E0:0C:00:7D:FD +ifconfig eth1 200.200.200.10 netmask 255.255.255.0 +ifconfig eth1 up +arp -s 192.168.1.21 00:00:00:00:00:01 +route add default dev eth1 +echo 1 > /proc/sys/net/ipv4/ip_forward diff --git a/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/setup_right b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/setup_right new file mode 100755 index 00000000..f0e333ee --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/setup_right @@ -0,0 +1,13 @@ +# board on right setup +set -v +ifconfig eth0 down +ifconfig eth0 hw ether 00:E0:0C:00:01:FD +ifconfig eth0 192.168.2.130 netmask 255.255.255.0 +ifconfig eth0 up +ifconfig eth1 down +ifconfig eth1 hw ether 00:E0:0C:00:00:FD +ifconfig eth1 200.200.200.20 netmask 255.255.255.0 +ifconfig eth1 up +arp -s 192.168.2.21 00:00:00:00:00:02 +route add default dev eth1 +echo 1 > /proc/sys/net/ipv4/ip_forward diff --git a/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/strongswan.conf b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/strongswan.conf new file mode 100644 index 00000000..1701f4ab --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/strongswan.conf @@ -0,0 +1,19 @@ +# strongswan.conf - strongSwan configuration file + +charon { + load = curl aes des sha1 sha2 md5 pem pkcs1 gmp random x509 revocation hmac xcbc stroke kernel-netlink socket-raw updown + multiple_authentication = no +} + +pluto { + + # plugins to load in pluto + #load = aes des sha1 md5 sha2 hmac gmp random pubkey + +} + +libstrongswan { + + # set to no, the DH exponent size is optimized + # dh_exponent_ansi_x9_42 = no +} diff --git a/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/strongswanCert.pem b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/strongswanCert.pem new file mode 100644 index 00000000..0865ad22 --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/strongswanCert.pem @@ -0,0 +1,22 @@ +-----BEGIN CERTIFICATE----- +MIIDuDCCAqCgAwIBAgIBADANBgkqhkiG9w0BAQsFADBFMQswCQYDVQQGEwJDSDEZ +MBcGA1UEChMQTGludXggc3Ryb25nU3dhbjEbMBkGA1UEAxMSc3Ryb25nU3dhbiBS +b290IENBMB4XDTA0MDkxMDEwMDExOFoXDTE5MDkwNzEwMDExOFowRTELMAkGA1UE +BhMCQ0gxGTAXBgNVBAoTEExpbnV4IHN0cm9uZ1N3YW4xGzAZBgNVBAMTEnN0cm9u +Z1N3YW4gUm9vdCBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL/y +X2LqPVZuWLPIeknK86xhz6ljd3NNhC2z+P1uoCP3sBMuZiZQEjFzhnKcbXxCeo2f +FnvhOOjrrisSuVkzuu82oxXD3fIkzuS7m9V4E10EZzgmKWIf+WuNRfbgAuUINmLc +4YGAXBQLPyzpP4Ou48hhz/YQo58Bics6PHy5v34qCVROIXDvqhj91P8g+pS+F21/ +7P+CH2jRcVIEHZtG8M/PweTPQ95dPzpYd2Ov6SZ/U7EWmbMmT8VcUYn1aChxFmy5 +gweVBWlkH6MP+1DeE0/tL5c87xo5KCeGK8Tdqpe7sBRC4pPEEHDQciTUvkeuJ1Pr +K+1LwdqRxo7HgMRiDw8CAwEAAaOBsjCBrzASBgNVHRMBAf8ECDAGAQH/AgEBMAsG +A1UdDwQEAwIBBjAdBgNVHQ4EFgQUXafdcAZRMn7ntm2zteXgYOouTe8wbQYDVR0j +BGYwZIAUXafdcAZRMn7ntm2zteXgYOouTe+hSaRHMEUxCzAJBgNVBAYTAkNIMRkw +FwYDVQQKExBMaW51eCBzdHJvbmdTd2FuMRswGQYDVQQDExJzdHJvbmdTd2FuIFJv +b3QgQ0GCAQAwDQYJKoZIhvcNAQELBQADggEBACOSmqEBtBLR9aV3UyCI8gmzR5in +Lte9aUXXS+qis6F2h2Stf4sN+Nl6Gj7REC6SpfEH4wWdwiUL5J0CJhyoOjQuDl3n +1Dw3dE4/zqMZdyDKEYTU75TmvusNJBdGsLkrf7EATAjoi/nrTOYPPhSUZvPp/D+Y +vORJ9Ej51GXlK1nwEB5iA8+tDYniNQn6BD1MEgIejzK+fbiy7braZB1kqhoEr2Si +7luBSnU912sw494E88a2EWbmMvg2TVHPNzCpVkpNk7kifCiwmw9VldkqYy9y/lCa +Epyp7lTfKw7cbD04Vk8QJW782L6Csuxkl346b17wmOqn8AZips3tFsuAY3w= +-----END CERTIFICATE----- diff --git a/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/strongswan_left b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/strongswan_left new file mode 100755 index 00000000..e55c3e42 --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/strongswan_left @@ -0,0 +1,10 @@ +#strongswan on left board +set -v +cp -rf ipsec.conf.left /etc/ipsec.conf +cp -rf ipsec.secrets.left /etc/ipsec.secrets +cp -rf strongswan.conf /etc/ +cp -rf strongswanCert.pem /etc/ipsec.d/cacerts/ +cp -rf moonCert.pem /etc/ipsec.d/certs/ +mkdir /etc/ipsec.d/private +cp -rf sunKey.pem /etc/ipsec.d/private/ +cp -rf moonKey.pem /etc/ipsec.d/private/ diff --git a/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/strongswan_right b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/strongswan_right new file mode 100755 index 00000000..bcdbb731 --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/strongswan_right @@ -0,0 +1,10 @@ +#strongswan on left board +set -v +cp -rf ipsec.conf.right /etc/ipsec.conf +cp -rf ipsec.secrets.right /etc/ipsec.secrets +cp -rf strongswan.conf /etc/ +cp -rf strongswanCert.pem /etc/ipsec.d/cacerts/ +cp -rf sunCert.pem /etc/ipsec.d/certs/ +mkdir /etc/ipsec.d/private +cp -rf sunKey.pem /etc/ipsec.d/private/ +cp -rf moonKey.pem /etc/ipsec.d/private/ diff --git a/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/sunCert.pem b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/sunCert.pem new file mode 100644 index 00000000..d0937bab --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/sunCert.pem @@ -0,0 +1,25 @@ +-----BEGIN CERTIFICATE----- +MIIEIDCCAwigAwIBAgIBFjANBgkqhkiG9w0BAQsFADBFMQswCQYDVQQGEwJDSDEZ +MBcGA1UEChMQTGludXggc3Ryb25nU3dhbjEbMBkGA1UEAxMSc3Ryb25nU3dhbiBS +b290IENBMB4XDTA5MDgyNzA5NTkwNFoXDTE0MDgyNjA5NTkwNFowRTELMAkGA1UE +BhMCQ0gxGTAXBgNVBAoTEExpbnV4IHN0cm9uZ1N3YW4xGzAZBgNVBAMTEnN1bi5z +dHJvbmdzd2FuLm9yZzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAN+V +VIpn6Q5jaU//EN6p6A5cSfUfhBK0mFa2laFFZh/Y0h66AXqqrQ3X917h7YNsSk68 +oowY9h9I3gOx7hNVBsJr2VjdYC+b0q5NTha09/A5mimv/prYj6o0yawxoPjoDs9Y +h7D7Kf+F8fkgk0stlHJZX66J7dNrFXbg1xBld+Ep5Or2FbEZ9QWUpRQTuhdpNt/4 +9YuxQ59DemY9IRbwsrKCHH0mGrJsDdqeb0ap+8QvSXHjCt1fr9MNKWaAFAQLKQI4 +e0da1ntPCEQLeE833+NNRBgGufk0KqGT3eAXqrxa9AEIUJnVcPexQdqUMjcUpXFb +8WNzRWB8Egh3BDK6FsECAwEAAaOCARkwggEVMAkGA1UdEwQCMAAwCwYDVR0PBAQD +AgOoMB0GA1UdDgQWBBRW1p4v2qihzRlcI1PnxbZwluML+zBtBgNVHSMEZjBkgBRd +p91wBlEyfue2bbO15eBg6i5N76FJpEcwRTELMAkGA1UEBhMCQ0gxGTAXBgNVBAoT +EExpbnV4IHN0cm9uZ1N3YW4xGzAZBgNVBAMTEnN0cm9uZ1N3YW4gUm9vdCBDQYIB +ADAdBgNVHREEFjAUghJzdW4uc3Ryb25nc3dhbi5vcmcwEwYDVR0lBAwwCgYIKwYB +BQUHAwEwOQYDVR0fBDIwMDAuoCygKoYoaHR0cDovL2NybC5zdHJvbmdzd2FuLm9y +Zy9zdHJvbmdzd2FuLmNybDANBgkqhkiG9w0BAQsFAAOCAQEAo37LYT9Awx0MK/nA +FZpPJqUr0Ey+O5Ukcsdx7nd00SlmpiQRY8KmuRXCBQnDEgdLstd3slQjT0pJEgWF +0pzxybnI6eOzYAhLfhart+X1hURiNGbXjggm2s4I5+K32bVIkNEqlsYnd/6F9oo5 +ZNO0/eTTruLZfkNe/zchBGKe/Z7MacVwlYWWCbMtBV4K1d5dGcRRgpQ9WivDlmat +Nh9wlscDSgSGk3HJkbxnq695VN7zUbDWAUvWWhV5bIDjlAR/xyT9ApqIxiyVVRul +fYrE7U05Hbt6GgAroAKLp6qJup9+TxQAKSjKIwJ0hf7OuYyQ8TZtVHS7AOhm+T/5 +G/jGGA== +-----END CERTIFICATE----- diff --git a/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/sunKey.pem b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/sunKey.pem new file mode 100644 index 00000000..d8fad9aa --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/sunKey.pem @@ -0,0 +1,27 @@ +-----BEGIN RSA PRIVATE KEY----- +MIIEpAIBAAKCAQEA35VUimfpDmNpT/8Q3qnoDlxJ9R+EErSYVraVoUVmH9jSHroB +eqqtDdf3XuHtg2xKTryijBj2H0jeA7HuE1UGwmvZWN1gL5vSrk1OFrT38DmaKa/+ +mtiPqjTJrDGg+OgOz1iHsPsp/4Xx+SCTSy2Ucllfront02sVduDXEGV34Snk6vYV +sRn1BZSlFBO6F2k23/j1i7FDn0N6Zj0hFvCysoIcfSYasmwN2p5vRqn7xC9JceMK +3V+v0w0pZoAUBAspAjh7R1rWe08IRAt4Tzff401EGAa5+TQqoZPd4BeqvFr0AQhQ +mdVw97FB2pQyNxSlcVvxY3NFYHwSCHcEMroWwQIDAQABAoIBADH51hjN2zk9HVgl +QmcTAWzcUie5cLMhrP+M9mtC8O3jcCwwFY6OwfnbMU8DHy0GMqHg5lB8b99UUVPw +HLAzjDw/ESkc6pgZs4EEhJTsxJLsvTnePgHssEgyXnXf7gRVEqJkPohfy+Zy0UCH +eIUQXiMlOQ7xg7iDMhwNa+UdWSt539DztSKilQn2xdPZjFnMT0/prvl4NA/8Zn54 +/SdWDq5yRdLWb6EK1V7yJ3687GXR1jzGtgy7TXuncUJVTYgX7RdP1Tn6gWD8YAQ/ +RfT0DdWYm4WHSgSb9/NW8lBZH2yy3hg+lNgofXEvTfBkO5QyW31LIr0tCV6zhJIc +Y9MxaKUCgYEA9sktaXfhPLe0ECjdeQEOq5EKuDrCviSKCOuAV4BDSOsdw6+5LWfY +Vb/oke8N70lL3RCblcj1pOKWUi2O/SpEJdDRduiw2gM9cXt3/bChSTHC4TsIxxN/ +Db9OGg72kZ4sRY5Au+zyAAQYBwXhFWux194Jk5qK0JblNG9J5QMqZDcCgYEA5+5h +BgHUMEO+pdME5lAiSc5PcNTejpA6j+OikCh4/HFXy3C/dLx+Cs1+egw64c8iVaIv +NEo7n7E9I0e3XqanPRXhMnBRrP+39OVsWPmZ18Li2Hi84KwJyi8Y11l3XJOqaYpF +wMVUuZpxR0dfG5k/5GwT/tEkmQBglOgG3m2zUMcCgYEA4m3Vd9ahV5dp5AXKpzKc +JjiPMFfhxJo7+FEz0ZUCp03qYljBu/Jy4MKS/grrqyiCLdQGHNlk4SNxLvdUId78 +5gGBnuuDEJU2dAAIKUE9yq2YlBUZSacOxStI2snt28/X6P3LUWHm7LLU5OS1D3Vf +mKPF/6MlSJuas5CEqVZNN+MCgYBH9Qh7IaQgmVQUBKVXg3Mv7OduvUyTdKIGtHxi +N3xZ7hxsDP4JjNWaKmlcGmFGX8pqQRheI83d3NJ4GK8GmbP3Wst0p65fezMqsudr +r30QmPFicgs/tYCQDw6o+aPzwAi2F+VOSqrfrtAIaldSq7hL+VA21dKB+cD9UgOX +jPd+TwKBgQCbKeg2QNS2qhPIG9eaqJDROuxmxb/07d7OBctgMgxVvKhqW9hW42Sy +gJ59fyz5QjFBaSfcOdf4gkKyEawVo45/q6ymIQU37R4vF4CW9Z3CfaIbwJp7LcHV +zH07so/HNsZua6GWCSCLJU5MeCRiZzk2RFiS9KIaLP4gZndv4lXOiQ== +-----END RSA PRIVATE KEY----- diff --git a/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo_0.1.bb b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo_0.1.bb new file mode 100644 index 00000000..56070605 --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo_0.1.bb @@ -0,0 +1,25 @@ +SUMMARY = "Scripts and configuration files for ipsec demo" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" + +RDEPENDS_${PN} = "ipsec-tools" + +inherit allarch + +SRC_URI = "file://test_setkey" + +do_configure() { + : +} + +do_compile() { + : +} + +do_install(){ + install -d ${D}${datadir} + cp -a ${WORKDIR}/test_setkey ${D}${datadir}/ +} + +FILES_${PN} = "${datadir}/*" + -- cgit v1.2.3-54-g00ecf From c3865de1847d6c8f0b4e321db1677d9ad8e80e94 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Fri, 1 Aug 2014 12:33:15 +0800 Subject: udev-extraconf: remove obsolete local.rules local.rules was used for udev, and the content of this obsolete file was seperated (automount.rules/autonet.rules/...). Signed-off-by: Ting Liu --- .../recipes-core/udev/udev-extraconf/local.rules | 42 ---------------------- 1 file changed, 42 deletions(-) delete mode 100644 meta-fsl-ppc/recipes-core/udev/udev-extraconf/local.rules diff --git a/meta-fsl-ppc/recipes-core/udev/udev-extraconf/local.rules b/meta-fsl-ppc/recipes-core/udev/udev-extraconf/local.rules deleted file mode 100644 index 43034b83..00000000 --- a/meta-fsl-ppc/recipes-core/udev/udev-extraconf/local.rules +++ /dev/null @@ -1,42 +0,0 @@ -# There are a number of modifiers that are allowed to be used in some -# of the different fields. They provide the following subsitutions: -# -# %n the "kernel number" of the device. -# For example, 'sda3' has a "kernel number" of '3' -# %e the smallest number for that name which does not matches an existing node -# %k the kernel name for the device -# %M the kernel major number for the device -# %m the kernel minor number for the device -# %b the bus id for the device -# %c the string returned by the PROGRAM -# %s{filename} the content of a sysfs attribute -# %% the '%' char itself -# - -KERNEL=="nbd*", GOTO="persistent_storage_end" - -SUBSYSTEM=="block", ENV{DEVTYPE}=="partition", GOTO="nomountblock" - -# Media automounting -SUBSYSTEM=="block", ACTION=="add" RUN+="/etc/udev/scripts/mount.sh" -SUBSYSTEM=="block", ACTION=="remove" RUN+="/etc/udev/scripts/mount.sh" - -# Handle network interface setup -SUBSYSTEM=="net", ACTION=="add" RUN+="/etc/udev/scripts/network.sh" -SUBSYSTEM=="net", ACTION=="remove" RUN+="/etc/udev/scripts/network.sh" - -# The first framebuffer is symlinked to /dev/fb -KERNEL=="fb0", SYMLINK+="fb" - -# The first rtc device is symlinked to /dev/rtc -KERNEL=="rtc0", SYMLINK+="rtc" - -# Try and modprobe for drivers for new hardware -ACTION=="add", DEVPATH=="/devices/*", ENV{MODALIAS}=="?*", RUN+="/sbin/modprobe $env{MODALIAS}" - -# Create a symlink to any touchscreen input device -SUBSYSTEM=="input", KERNEL=="event[0-9]*", ATTRS{modalias}=="input:*-e0*,3,*a0,1,*18,*", SYMLINK+="input/touchscreen0" - -LABEL="persistent_storage_end" - -LABEL="nomountblock" -- cgit v1.2.3-54-g00ecf From 74f473df1337a7ee2ab1d3b1f9a63279098ed6f0 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Fri, 1 Aug 2014 12:33:16 +0800 Subject: udev[-extraconf]: skip mmc rpmb partitions In FSL SDK 1.6 Kernel, mmc driver has created a new partition with "mmcblkXrpmb" if device expresses it support of RPMB. RPMB (Replay Protected Memory Block), A signed access to a Replay Protected Memory Block is provided. This function provides means for the system to store data to the specific memory area in an authenticated and replay protected manner. In that case, any read/write access to this partition device will report errors which will not impact any fuction. add rules to skip it, avoid the below error msg: | mmcblk0rpmb: retrying using single block read | mmcblk0rpmb: error -110 transferring data Signed-off-by: Ting Liu --- .../recipes-core/udev/udev-extraconf_%.bbappend | 9 +++-- .../udev/skip-rules-for-mmc-rpmb-partition.patch | 41 ++++++++++++++++++++++ meta-fsl-ppc/recipes-core/udev/udev_182.bbappend | 7 +++- 3 files changed, 53 insertions(+), 4 deletions(-) create mode 100644 meta-fsl-ppc/recipes-core/udev/udev/skip-rules-for-mmc-rpmb-partition.patch diff --git a/meta-fsl-ppc/recipes-core/udev/udev-extraconf_%.bbappend b/meta-fsl-ppc/recipes-core/udev/udev-extraconf_%.bbappend index db74aacb..6c2bfe2c 100644 --- a/meta-fsl-ppc/recipes-core/udev/udev-extraconf_%.bbappend +++ b/meta-fsl-ppc/recipes-core/udev/udev-extraconf_%.bbappend @@ -1,10 +1,13 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" +FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:" -SRC_URI_append = " file://${@bb.utils.contains("TUNE_FEATURES", "e6500", \ +SRC_URI_append_qoriq-ppc = " file://${@bb.utils.contains("TUNE_FEATURES", "e6500", \ "72-fsl-dpaa-persistent-networking.rules", "71-fsl-dpaa-persistent-networking.rules", d)}" -do_install_append () { +do_install_append_qoriq-ppc () { install -d ${D}${sysconfdir}/udev/rules.d/ install -m 0644 ${WORKDIR}/*-fsl-dpaa-persistent-networking.rules ${D}${sysconfdir}/udev/rules.d + + # skip mmc rpmb partitions + echo "/dev/mmcblk.*rpmb" >>${D}${sysconfdir}/udev/mount.blacklist } diff --git a/meta-fsl-ppc/recipes-core/udev/udev/skip-rules-for-mmc-rpmb-partition.patch b/meta-fsl-ppc/recipes-core/udev/udev/skip-rules-for-mmc-rpmb-partition.patch new file mode 100644 index 00000000..edbc0b3d --- /dev/null +++ b/meta-fsl-ppc/recipes-core/udev/udev/skip-rules-for-mmc-rpmb-partition.patch @@ -0,0 +1,41 @@ +From 68a780f4cbba18c01d8409faafb1f7904afa86a9 Mon Sep 17 00:00:00 2001 +From: Ting Liu +Date: Thu, 31 Jul 2014 16:12:32 +0800 +Subject: [PATCH] skip rules for mmc rpmb partition + +Upstream-status: Pending + +In FSL SDK 1.6 Kernel, mmc driver has created a new partition +with "mmcblkXrpmb" if device expresses it support of RPMB. + +RPMB (Replay Protected Memory Block), A signed access to a Replay +Protected Memory Block is provided. This function provides means +for the system to store data to the specific memory area in an +authenticated and replay protected manner. + +In that case, any read/write access to this partition device will +report errors which will not impact any fuction. + +add rules to skip it. + +Signed-off-by: Ting Liu +--- + rules/60-persistent-storage.rules | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/rules/60-persistent-storage.rules b/rules/60-persistent-storage.rules +index fa687f2..bb3f8f9 100644 +--- a/rules/60-persistent-storage.rules ++++ b/rules/60-persistent-storage.rules +@@ -14,7 +14,7 @@ ACTION=="add", SUBSYSTEM=="module", KERNEL=="block", ATTR{parameters/events_dfl_ + SUBSYSTEM!="block", GOTO="persistent_storage_end" + + # skip rules for inappropriate block devices +-KERNEL=="fd*|mtd*|nbd*|gnbd*|btibm*|dm-*|md*", GOTO="persistent_storage_end" ++KERNEL=="fd*|mtd*|nbd*|gnbd*|btibm*|dm-*|md*|mmcblk*rpmb", GOTO="persistent_storage_end" + + # ignore partitions that span the entire disk + TEST=="whole_disk", GOTO="persistent_storage_end" +-- +1.8.3.2 + diff --git a/meta-fsl-ppc/recipes-core/udev/udev_182.bbappend b/meta-fsl-ppc/recipes-core/udev/udev_182.bbappend index 72d991c7..4eedfd89 100644 --- a/meta-fsl-ppc/recipes-core/udev/udev_182.bbappend +++ b/meta-fsl-ppc/recipes-core/udev/udev_182.bbappend @@ -1 +1,6 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" +FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:" + +SRC_URI_append_qoriq-ppc = " \ + file://skip-rules-for-mmc-rpmb-partition.patch \ +" + -- cgit v1.2.3-54-g00ecf From f60edc4bbefdf6378880b81bff3112e05e115908 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Fri, 1 Aug 2014 12:33:17 +0800 Subject: udev-extraconf: not automount network block devices The nbd devices are set up loop devices, we first have dead device nodes, then later we attach stuff behind them. At the time of the udev creation event, nothing works at nbd devices. This avoids unnecessary boot error msg: | nbd0: Attempted send on closed socket | end_request: I/O error, dev nbd0, sector 0 Signed-off-by: Ting Liu --- meta-fsl-ppc/recipes-core/udev/udev-extraconf_%.bbappend | 2 ++ 1 file changed, 2 insertions(+) diff --git a/meta-fsl-ppc/recipes-core/udev/udev-extraconf_%.bbappend b/meta-fsl-ppc/recipes-core/udev/udev-extraconf_%.bbappend index 6c2bfe2c..896e75f6 100644 --- a/meta-fsl-ppc/recipes-core/udev/udev-extraconf_%.bbappend +++ b/meta-fsl-ppc/recipes-core/udev/udev-extraconf_%.bbappend @@ -9,5 +9,7 @@ do_install_append_qoriq-ppc () { # skip mmc rpmb partitions echo "/dev/mmcblk.*rpmb" >>${D}${sysconfdir}/udev/mount.blacklist + # skip nbd (network block device) + echo "/dev/nbd*" >>${D}${sysconfdir}/udev/mount.blacklist } -- cgit v1.2.3-54-g00ecf From 2aec745c30a674d7840ba50d3d7c0fa22a0bf4e2 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Fri, 1 Aug 2014 12:33:18 +0800 Subject: udev-extraconf: not automount disk partitions There is a bug found in FSL SDK: kernel can't boot up (or hang for a long time) when board connects with a HDD (has extended partition) via pcie sata controller card. avoid auto-mounting disk partitions. user can do it via fstab. And move all the customized rules to qoriq-ppc folers. Signed-off-by: Ting Liu --- .../71-fsl-dpaa-persistent-networking.rules | 20 ------------------ .../72-fsl-dpaa-persistent-networking.rules | 24 ---------------------- .../71-fsl-dpaa-persistent-networking.rules | 20 ++++++++++++++++++ .../72-fsl-dpaa-persistent-networking.rules | 24 ++++++++++++++++++++++ .../udev/udev-extraconf/qoriq-ppc/automount.rules | 23 +++++++++++++++++++++ 5 files changed, 67 insertions(+), 44 deletions(-) delete mode 100644 meta-fsl-ppc/recipes-core/udev/udev-extraconf/71-fsl-dpaa-persistent-networking.rules delete mode 100644 meta-fsl-ppc/recipes-core/udev/udev-extraconf/72-fsl-dpaa-persistent-networking.rules create mode 100644 meta-fsl-ppc/recipes-core/udev/udev-extraconf/qoriq-ppc/71-fsl-dpaa-persistent-networking.rules create mode 100644 meta-fsl-ppc/recipes-core/udev/udev-extraconf/qoriq-ppc/72-fsl-dpaa-persistent-networking.rules create mode 100644 meta-fsl-ppc/recipes-core/udev/udev-extraconf/qoriq-ppc/automount.rules diff --git a/meta-fsl-ppc/recipes-core/udev/udev-extraconf/71-fsl-dpaa-persistent-networking.rules b/meta-fsl-ppc/recipes-core/udev/udev-extraconf/71-fsl-dpaa-persistent-networking.rules deleted file mode 100644 index 6c6dc354..00000000 --- a/meta-fsl-ppc/recipes-core/udev/udev-extraconf/71-fsl-dpaa-persistent-networking.rules +++ /dev/null @@ -1,20 +0,0 @@ -# Rules for handling naming the DPAA FMan ethernet ports in a consistent way -SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe4e0000", NAME="fm1-gb0" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe4e2000", NAME="fm1-gb1" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe4e4000", NAME="fm1-gb2" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe4e6000", NAME="fm1-gb3" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe4e8000", NAME="fm1-gb4" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe4f0000", NAME="fm1-10g" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe5e0000", NAME="fm2-gb0" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe5e2000", NAME="fm2-gb1" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe5e4000", NAME="fm2-gb2" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe5e6000", NAME="fm2-gb3" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe5e8000", NAME="fm2-gb4" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe5f0000", NAME="fm2-10g" - -# P1023 has its Fman @ different offsets -SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ff7e0000", NAME="fm1-gb0" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ff7e2000", NAME="fm1-gb1" - -# Rename macless0 port to "macless0" -SUBSYSTEM=="net", ATTR{device_type}=="macless0", NAME="macless0" diff --git a/meta-fsl-ppc/recipes-core/udev/udev-extraconf/72-fsl-dpaa-persistent-networking.rules b/meta-fsl-ppc/recipes-core/udev/udev-extraconf/72-fsl-dpaa-persistent-networking.rules deleted file mode 100644 index d0eec9ce..00000000 --- a/meta-fsl-ppc/recipes-core/udev/udev-extraconf/72-fsl-dpaa-persistent-networking.rules +++ /dev/null @@ -1,24 +0,0 @@ -# Rules for handling naming the DPAA FMan ethernet ports in a consistent way -SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe4e0000", NAME="fm1-mac1" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe4e2000", NAME="fm1-mac2" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe4e4000", NAME="fm1-mac3" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe4e6000", NAME="fm1-mac4" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe4e8000", NAME="fm1-mac5" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe4ea000", NAME="fm1-mac6" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe4ec000", NAME="fm1-mac7" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe4ee000", NAME="fm1-mac8" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe4f0000", NAME="fm1-mac9" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe4f2000", NAME="fm1-mac10" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe5e0000", NAME="fm2-mac1" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe5e2000", NAME="fm2-mac2" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe5e4000", NAME="fm2-mac3" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe5e6000", NAME="fm2-mac4" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe5e8000", NAME="fm2-mac5" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe5ea000", NAME="fm2-mac6" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe5ec000", NAME="fm2-mac7" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe5ee000", NAME="fm2-mac8" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe5f0000", NAME="fm2-mac9" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe5f2000", NAME="fm2-mac10" - -# Rename macless0 to "macless0" -SUBSYSTEM=="net", ATTR{device_type}=="macless0", NAME="macless0" diff --git a/meta-fsl-ppc/recipes-core/udev/udev-extraconf/qoriq-ppc/71-fsl-dpaa-persistent-networking.rules b/meta-fsl-ppc/recipes-core/udev/udev-extraconf/qoriq-ppc/71-fsl-dpaa-persistent-networking.rules new file mode 100644 index 00000000..6c6dc354 --- /dev/null +++ b/meta-fsl-ppc/recipes-core/udev/udev-extraconf/qoriq-ppc/71-fsl-dpaa-persistent-networking.rules @@ -0,0 +1,20 @@ +# Rules for handling naming the DPAA FMan ethernet ports in a consistent way +SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe4e0000", NAME="fm1-gb0" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe4e2000", NAME="fm1-gb1" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe4e4000", NAME="fm1-gb2" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe4e6000", NAME="fm1-gb3" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe4e8000", NAME="fm1-gb4" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe4f0000", NAME="fm1-10g" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe5e0000", NAME="fm2-gb0" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe5e2000", NAME="fm2-gb1" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe5e4000", NAME="fm2-gb2" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe5e6000", NAME="fm2-gb3" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe5e8000", NAME="fm2-gb4" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe5f0000", NAME="fm2-10g" + +# P1023 has its Fman @ different offsets +SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ff7e0000", NAME="fm1-gb0" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ff7e2000", NAME="fm1-gb1" + +# Rename macless0 port to "macless0" +SUBSYSTEM=="net", ATTR{device_type}=="macless0", NAME="macless0" diff --git a/meta-fsl-ppc/recipes-core/udev/udev-extraconf/qoriq-ppc/72-fsl-dpaa-persistent-networking.rules b/meta-fsl-ppc/recipes-core/udev/udev-extraconf/qoriq-ppc/72-fsl-dpaa-persistent-networking.rules new file mode 100644 index 00000000..d0eec9ce --- /dev/null +++ b/meta-fsl-ppc/recipes-core/udev/udev-extraconf/qoriq-ppc/72-fsl-dpaa-persistent-networking.rules @@ -0,0 +1,24 @@ +# Rules for handling naming the DPAA FMan ethernet ports in a consistent way +SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe4e0000", NAME="fm1-mac1" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe4e2000", NAME="fm1-mac2" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe4e4000", NAME="fm1-mac3" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe4e6000", NAME="fm1-mac4" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe4e8000", NAME="fm1-mac5" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe4ea000", NAME="fm1-mac6" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe4ec000", NAME="fm1-mac7" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe4ee000", NAME="fm1-mac8" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe4f0000", NAME="fm1-mac9" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe4f2000", NAME="fm1-mac10" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe5e0000", NAME="fm2-mac1" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe5e2000", NAME="fm2-mac2" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe5e4000", NAME="fm2-mac3" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe5e6000", NAME="fm2-mac4" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe5e8000", NAME="fm2-mac5" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe5ea000", NAME="fm2-mac6" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe5ec000", NAME="fm2-mac7" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe5ee000", NAME="fm2-mac8" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe5f0000", NAME="fm2-mac9" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe5f2000", NAME="fm2-mac10" + +# Rename macless0 to "macless0" +SUBSYSTEM=="net", ATTR{device_type}=="macless0", NAME="macless0" diff --git a/meta-fsl-ppc/recipes-core/udev/udev-extraconf/qoriq-ppc/automount.rules b/meta-fsl-ppc/recipes-core/udev/udev-extraconf/qoriq-ppc/automount.rules new file mode 100644 index 00000000..a47efdab --- /dev/null +++ b/meta-fsl-ppc/recipes-core/udev/udev-extraconf/qoriq-ppc/automount.rules @@ -0,0 +1,23 @@ +# There are a number of modifiers that are allowed to be used in some +# of the different fields. They provide the following subsitutions: +# +# %n the "kernel number" of the device. +# For example, 'sda3' has a "kernel number" of '3' +# %e the smallest number for that name which does not matches an existing node +# %k the kernel name for the device +# %M the kernel major number for the device +# %m the kernel minor number for the device +# %b the bus id for the device +# %c the string returned by the PROGRAM +# %s{filename} the content of a sysfs attribute +# %% the '%' char itself +# + +SUBSYSTEM=="block", ENV{DEVTYPE}=="partition", GOTO="automount_end" + +# Media automounting +SUBSYSTEM=="block", ACTION=="add" RUN+="/etc/udev/scripts/mount.sh" +SUBSYSTEM=="block", ACTION=="remove" RUN+="/etc/udev/scripts/mount.sh" + +LABEL="automount_end" + -- cgit v1.2.3-54-g00ecf From 0eb10efc949cdd2152473aa31be9c1e5762faaf1 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Thu, 7 Aug 2014 10:01:28 +0800 Subject: fmlib: use SOC_FAMILY as override in do_install In previous commit, do_install was missed. update it. Signed-off-by: Ting Liu --- meta-fsl-ppc/recipes-dpaa/fmlib/fmlib_git.bb | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/meta-fsl-ppc/recipes-dpaa/fmlib/fmlib_git.bb b/meta-fsl-ppc/recipes-dpaa/fmlib/fmlib_git.bb index 04b94a30..ec038862 100644 --- a/meta-fsl-ppc/recipes-dpaa/fmlib/fmlib_git.bb +++ b/meta-fsl-ppc/recipes-dpaa/fmlib/fmlib_git.bb @@ -22,21 +22,17 @@ COMPATIBLE_HOST ?= "(none)" EXTRA_OEMAKE = "DESTDIR=${D} PREFIX=${prefix} LIB_DEST_DIR=${libdir} \ CROSS_COMPILE=${TARGET_PREFIX} KERNEL_SRC=${STAGING_KERNEL_DIR}" -COMPILE_TARGET = "libfm-${TARGET_ARCH_FMLIB}.a" -COMPILE_TARGET_t1 = "libfm-${TARGET_ARCH_FMLIB}-fmv3.a" +FMLIB_TARGET = "libfm-${TARGET_ARCH_FMLIB}" +FMLIB_TARGET_t1 = "libfm-${TARGET_ARCH_FMLIB}-fmv3" do_compile () { - oe_runmake ${COMPILE_TARGET} + oe_runmake ${FMLIB_TARGET}.a } do_compile_virtclass-native () { } do_install () { - if [ "t1040" = "${SOC_FAMILY}" -o "t1042" = "${SOC_FAMILY}" ];then - oe_runmake install-libfm-${TARGET_ARCH_FMLIB}-fmv3 - else - oe_runmake install-libfm-${TARGET_ARCH_FMLIB} - fi + oe_runmake install-${FMLIB_TARGET} } do_install_virtclass-native () { -- cgit v1.2.3-54-g00ecf From 038cf9c90064a709603f22a6f3f1b06b4a3516a1 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Thu, 7 Aug 2014 10:12:23 +0800 Subject: conf/layer.conf: remove BB_ENV_EXTRAWHITE setting If not removed, BB_ENV_EXTRAWHITE is overrided as "KSRC USRC". Signed-off-by: Ting Liu --- meta-fsl-ppc/conf/layer.conf | 2 -- 1 file changed, 2 deletions(-) diff --git a/meta-fsl-ppc/conf/layer.conf b/meta-fsl-ppc/conf/layer.conf index ceab6292..4a942e01 100644 --- a/meta-fsl-ppc/conf/layer.conf +++ b/meta-fsl-ppc/conf/layer.conf @@ -9,8 +9,6 @@ BBFILE_COLLECTIONS += "fsl-ppc" BBFILE_PATTERN_fsl-ppc = "^${LAYERDIR}/" BBFILE_PRIORITY_fsl-ppc = "5" -BB_ENV_EXTRAWHITE := "KSRC USRC" - LICENSE_PATH += "${LAYERDIR}/custom-licenses" BB_DANGLINGAPPENDS_WARNONLY ?= "true" -- cgit v1.2.3-54-g00ecf From 7a30c6b98abf69f9d0750a31c1aa399dd10e1101 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Thu, 7 Aug 2014 10:42:34 +0800 Subject: add layer-specific bbappends when that layer is included setting BB_DANGLINGAPPENDS_WARNONLY forces the policy for all layers. If the user is expecting dangling appends to be errors, this hides potential problems from them. Signed-off-by: Ting Liu --- meta-fsl-ppc/conf/layer.conf | 5 +- .../luajit/luajit/ppc-fixplt.patch | 105 +++++ .../recipes-devtools/luajit/luajit_%.bbappend | 4 + .../luajit/luajit/ppc-fixplt.patch | 105 ----- .../recipes-devtools/luajit/luajit_%.bbappend | 4 - .../libvirt/libvirt/qoriq-ppc/qemu.conf | 465 --------------------- .../libvirt/libvirt_%.bbappend | 9 - .../libvirt/libvirt/qoriq-ppc/qemu.conf | 465 +++++++++++++++++++++ .../recipes-extended/libvirt/libvirt_%.bbappend | 9 + 9 files changed, 587 insertions(+), 584 deletions(-) create mode 100644 meta-fsl-ppc/openembedded-layer/recipes-devtools/luajit/luajit/ppc-fixplt.patch create mode 100644 meta-fsl-ppc/openembedded-layer/recipes-devtools/luajit/luajit_%.bbappend delete mode 100644 meta-fsl-ppc/recipes-devtools/luajit/luajit/ppc-fixplt.patch delete mode 100644 meta-fsl-ppc/recipes-devtools/luajit/luajit_%.bbappend delete mode 100644 meta-fsl-ppc/recipes-virtualization/libvirt/libvirt/qoriq-ppc/qemu.conf delete mode 100644 meta-fsl-ppc/recipes-virtualization/libvirt/libvirt_%.bbappend create mode 100644 meta-fsl-ppc/virtualization-layer/recipes-extended/libvirt/libvirt/qoriq-ppc/qemu.conf create mode 100644 meta-fsl-ppc/virtualization-layer/recipes-extended/libvirt/libvirt_%.bbappend diff --git a/meta-fsl-ppc/conf/layer.conf b/meta-fsl-ppc/conf/layer.conf index 4a942e01..a4d4add9 100644 --- a/meta-fsl-ppc/conf/layer.conf +++ b/meta-fsl-ppc/conf/layer.conf @@ -11,5 +11,8 @@ BBFILE_PRIORITY_fsl-ppc = "5" LICENSE_PATH += "${LAYERDIR}/custom-licenses" -BB_DANGLINGAPPENDS_WARNONLY ?= "true" +# Let us add layer-specific bbappends which are only applied when that +# layer is included in our configuration +BBFILES += "${@' '.join('${LAYERDIR}/%s/recipes*/*/*.bbappend' % layer \ + for layer in BBFILE_COLLECTIONS.split())}" diff --git a/meta-fsl-ppc/openembedded-layer/recipes-devtools/luajit/luajit/ppc-fixplt.patch b/meta-fsl-ppc/openembedded-layer/recipes-devtools/luajit/luajit/ppc-fixplt.patch new file mode 100644 index 00000000..b9f17f4e --- /dev/null +++ b/meta-fsl-ppc/openembedded-layer/recipes-devtools/luajit/luajit/ppc-fixplt.patch @@ -0,0 +1,105 @@ +Upstream-Status: Unknown + +Signed-off-by: Khem Raj + +libluajit is having symbols that can't be +resolved the reloc cannot accommodate an offset greater than 24 bits. + +Looking at libluajit with readelf -r, you see a bunch of entries that look like: + 000082f0 00003c0a R_PPC_REL24 00000000 sqrt + 0 + +These should not occur when the code is compiled and linked with -fPIC. + +It turns out that libluajit *is* compiled and linked with -fPIC, however... +There is one assembler file called lj_vm.s which is generated during the build. +This file is missing the `@plt' qualifier from external references. + +This file is generated by a program called buildvm. This in turn uses tables +in a file called buildvm_arch.h which is generated by dynasm.lua. + +Index: LuaJIT-2.0.1/src/host/buildvm.c +=================================================================== +--- LuaJIT-2.0.1.orig/src/host/buildvm.c 2013-02-19 12:15:00.000000000 -0800 ++++ LuaJIT-2.0.1/src/host/buildvm.c 2013-05-14 20:26:05.933444512 -0700 +@@ -107,12 +107,14 @@ + #endif + sprintf(name, "%s%s%s", symprefix, prefix, suffix); + p = strchr(name, '@'); ++#if 0 + if (p) { + if (!LJ_64 && (ctx->mode == BUILD_coffasm || ctx->mode == BUILD_peobj)) + name[0] = '@'; + else + *p = '\0'; + } ++#endif + p = (char *)malloc(strlen(name)+1); /* MSVC doesn't like strdup. */ + strcpy(p, name); + return p; +Index: LuaJIT-2.0.1/src/vm_ppcspe.dasc +=================================================================== +--- LuaJIT-2.0.1.orig/src/vm_ppcspe.dasc 2013-02-19 12:15:00.000000000 -0800 ++++ LuaJIT-2.0.1/src/vm_ppcspe.dasc 2013-05-14 20:26:05.937444512 -0700 +@@ -1390,7 +1390,7 @@ + | checknum CARG2 + | evmergehi CARG1, CARG2, CARG2 + | checkfail ->fff_fallback +- | bl extern func ++ | bl extern func@plt + | evmergelo CRET1, CRET1, CRET2 + | b ->fff_restv + |.endmacro +@@ -1405,7 +1405,7 @@ + | checknum CARG1 + | evmergehi CARG3, CARG4, CARG4 + | checkanyfail ->fff_fallback +- | bl extern func ++ | bl extern func@plt + | evmergelo CRET1, CRET1, CRET2 + | b ->fff_restv + |.endmacro +@@ -1437,7 +1437,7 @@ + | checknum CARG2 + | evmergehi CARG1, CARG2, CARG2 + | checkfail ->fff_fallback +- | bl extern log ++ | bl extern log@plt + | evmergelo CRET1, CRET1, CRET2 + | b ->fff_restv + | +@@ -1471,7 +1471,7 @@ + | checknum CARG1 + | checkanyfail ->fff_fallback + | efdctsi CARG3, CARG4 +- | bl extern ldexp ++ | bl extern ldexp@plt + | evmergelo CRET1, CRET1, CRET2 + | b ->fff_restv + | +@@ -1484,7 +1484,7 @@ + | checkfail ->fff_fallback + | la CARG3, DISPATCH_GL(tmptv)(DISPATCH) + | lwz PC, FRAME_PC(BASE) +- | bl extern frexp ++ | bl extern frexp@plt + | lwz TMP1, DISPATCH_GL(tmptv)(DISPATCH) + | evmergelo CRET1, CRET1, CRET2 + | efdcfsi CRET2, TMP1 +@@ -1503,7 +1503,7 @@ + | checkfail ->fff_fallback + | la CARG3, -8(BASE) + | lwz PC, FRAME_PC(BASE) +- | bl extern modf ++ | bl extern modf@plt + | evmergelo CRET1, CRET1, CRET2 + | la RA, -8(BASE) + | evstdd CRET1, 0(BASE) +@@ -2399,7 +2399,7 @@ + | checknum CARG1 + | evmergehi CARG3, CARG4, CARG4 + | checkanyfail ->vmeta_arith_vv +- | bl extern pow ++ | bl extern pow@plt + | evmergelo CRET2, CRET1, CRET2 + | evstddx CRET2, BASE, RA + | ins_next diff --git a/meta-fsl-ppc/openembedded-layer/recipes-devtools/luajit/luajit_%.bbappend b/meta-fsl-ppc/openembedded-layer/recipes-devtools/luajit/luajit_%.bbappend new file mode 100644 index 00000000..8c6138c5 --- /dev/null +++ b/meta-fsl-ppc/openembedded-layer/recipes-devtools/luajit/luajit_%.bbappend @@ -0,0 +1,4 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:" + +SRC_URI_append_qoriq-ppc = " file://ppc-fixplt.patch " + diff --git a/meta-fsl-ppc/recipes-devtools/luajit/luajit/ppc-fixplt.patch b/meta-fsl-ppc/recipes-devtools/luajit/luajit/ppc-fixplt.patch deleted file mode 100644 index b9f17f4e..00000000 --- a/meta-fsl-ppc/recipes-devtools/luajit/luajit/ppc-fixplt.patch +++ /dev/null @@ -1,105 +0,0 @@ -Upstream-Status: Unknown - -Signed-off-by: Khem Raj - -libluajit is having symbols that can't be -resolved the reloc cannot accommodate an offset greater than 24 bits. - -Looking at libluajit with readelf -r, you see a bunch of entries that look like: - 000082f0 00003c0a R_PPC_REL24 00000000 sqrt + 0 - -These should not occur when the code is compiled and linked with -fPIC. - -It turns out that libluajit *is* compiled and linked with -fPIC, however... -There is one assembler file called lj_vm.s which is generated during the build. -This file is missing the `@plt' qualifier from external references. - -This file is generated by a program called buildvm. This in turn uses tables -in a file called buildvm_arch.h which is generated by dynasm.lua. - -Index: LuaJIT-2.0.1/src/host/buildvm.c -=================================================================== ---- LuaJIT-2.0.1.orig/src/host/buildvm.c 2013-02-19 12:15:00.000000000 -0800 -+++ LuaJIT-2.0.1/src/host/buildvm.c 2013-05-14 20:26:05.933444512 -0700 -@@ -107,12 +107,14 @@ - #endif - sprintf(name, "%s%s%s", symprefix, prefix, suffix); - p = strchr(name, '@'); -+#if 0 - if (p) { - if (!LJ_64 && (ctx->mode == BUILD_coffasm || ctx->mode == BUILD_peobj)) - name[0] = '@'; - else - *p = '\0'; - } -+#endif - p = (char *)malloc(strlen(name)+1); /* MSVC doesn't like strdup. */ - strcpy(p, name); - return p; -Index: LuaJIT-2.0.1/src/vm_ppcspe.dasc -=================================================================== ---- LuaJIT-2.0.1.orig/src/vm_ppcspe.dasc 2013-02-19 12:15:00.000000000 -0800 -+++ LuaJIT-2.0.1/src/vm_ppcspe.dasc 2013-05-14 20:26:05.937444512 -0700 -@@ -1390,7 +1390,7 @@ - | checknum CARG2 - | evmergehi CARG1, CARG2, CARG2 - | checkfail ->fff_fallback -- | bl extern func -+ | bl extern func@plt - | evmergelo CRET1, CRET1, CRET2 - | b ->fff_restv - |.endmacro -@@ -1405,7 +1405,7 @@ - | checknum CARG1 - | evmergehi CARG3, CARG4, CARG4 - | checkanyfail ->fff_fallback -- | bl extern func -+ | bl extern func@plt - | evmergelo CRET1, CRET1, CRET2 - | b ->fff_restv - |.endmacro -@@ -1437,7 +1437,7 @@ - | checknum CARG2 - | evmergehi CARG1, CARG2, CARG2 - | checkfail ->fff_fallback -- | bl extern log -+ | bl extern log@plt - | evmergelo CRET1, CRET1, CRET2 - | b ->fff_restv - | -@@ -1471,7 +1471,7 @@ - | checknum CARG1 - | checkanyfail ->fff_fallback - | efdctsi CARG3, CARG4 -- | bl extern ldexp -+ | bl extern ldexp@plt - | evmergelo CRET1, CRET1, CRET2 - | b ->fff_restv - | -@@ -1484,7 +1484,7 @@ - | checkfail ->fff_fallback - | la CARG3, DISPATCH_GL(tmptv)(DISPATCH) - | lwz PC, FRAME_PC(BASE) -- | bl extern frexp -+ | bl extern frexp@plt - | lwz TMP1, DISPATCH_GL(tmptv)(DISPATCH) - | evmergelo CRET1, CRET1, CRET2 - | efdcfsi CRET2, TMP1 -@@ -1503,7 +1503,7 @@ - | checkfail ->fff_fallback - | la CARG3, -8(BASE) - | lwz PC, FRAME_PC(BASE) -- | bl extern modf -+ | bl extern modf@plt - | evmergelo CRET1, CRET1, CRET2 - | la RA, -8(BASE) - | evstdd CRET1, 0(BASE) -@@ -2399,7 +2399,7 @@ - | checknum CARG1 - | evmergehi CARG3, CARG4, CARG4 - | checkanyfail ->vmeta_arith_vv -- | bl extern pow -+ | bl extern pow@plt - | evmergelo CRET2, CRET1, CRET2 - | evstddx CRET2, BASE, RA - | ins_next diff --git a/meta-fsl-ppc/recipes-devtools/luajit/luajit_%.bbappend b/meta-fsl-ppc/recipes-devtools/luajit/luajit_%.bbappend deleted file mode 100644 index 8c6138c5..00000000 --- a/meta-fsl-ppc/recipes-devtools/luajit/luajit_%.bbappend +++ /dev/null @@ -1,4 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:" - -SRC_URI_append_qoriq-ppc = " file://ppc-fixplt.patch " - diff --git a/meta-fsl-ppc/recipes-virtualization/libvirt/libvirt/qoriq-ppc/qemu.conf b/meta-fsl-ppc/recipes-virtualization/libvirt/libvirt/qoriq-ppc/qemu.conf deleted file mode 100644 index cc22fa13..00000000 --- a/meta-fsl-ppc/recipes-virtualization/libvirt/libvirt/qoriq-ppc/qemu.conf +++ /dev/null @@ -1,465 +0,0 @@ -# Master configuration file for the QEMU driver. -# All settings described here are optional - if omitted, sensible -# defaults are used. - -# VNC is configured to listen on 127.0.0.1 by default. -# To make it listen on all public interfaces, uncomment -# this next option. -# -# NB, strong recommendation to enable TLS + x509 certificate -# verification when allowing public access -# -#vnc_listen = "0.0.0.0" - -# Enable this option to have VNC served over an automatically created -# unix socket. This prevents unprivileged access from users on the -# host machine, though most VNC clients do not support it. -# -# This will only be enabled for VNC configurations that do not have -# a hardcoded 'listen' or 'socket' value. This setting takes preference -# over vnc_listen. -# -#vnc_auto_unix_socket = 1 - -# Enable use of TLS encryption on the VNC server. This requires -# a VNC client which supports the VeNCrypt protocol extension. -# Examples include vinagre, virt-viewer, virt-manager and vencrypt -# itself. UltraVNC, RealVNC, TightVNC do not support this -# -# It is necessary to setup CA and issue a server certificate -# before enabling this. -# -#vnc_tls = 1 - - -# Use of TLS requires that x509 certificates be issued. The -# default it to keep them in /etc/pki/libvirt-vnc. This directory -# must contain -# -# ca-cert.pem - the CA master certificate -# server-cert.pem - the server certificate signed with ca-cert.pem -# server-key.pem - the server private key -# -# This option allows the certificate directory to be changed -# -#vnc_tls_x509_cert_dir = "/etc/pki/libvirt-vnc" - - -# The default TLS configuration only uses certificates for the server -# allowing the client to verify the server's identity and establish -# an encrypted channel. -# -# It is possible to use x509 certificates for authentication too, by -# issuing a x509 certificate to every client who needs to connect. -# -# Enabling this option will reject any client who does not have a -# certificate signed by the CA in /etc/pki/libvirt-vnc/ca-cert.pem -# -#vnc_tls_x509_verify = 1 - - -# The default VNC password. Only 8 letters are significant for -# VNC passwords. This parameter is only used if the per-domain -# XML config does not already provide a password. To allow -# access without passwords, leave this commented out. An empty -# string will still enable passwords, but be rejected by QEMU, -# effectively preventing any use of VNC. Obviously change this -# example here before you set this. -# -#vnc_password = "XYZ12345" - - -# Enable use of SASL encryption on the VNC server. This requires -# a VNC client which supports the SASL protocol extension. -# Examples include vinagre, virt-viewer and virt-manager -# itself. UltraVNC, RealVNC, TightVNC do not support this -# -# It is necessary to configure /etc/sasl2/qemu.conf to choose -# the desired SASL plugin (eg, GSSPI for Kerberos) -# -#vnc_sasl = 1 - - -# The default SASL configuration file is located in /etc/sasl2/ -# When running libvirtd unprivileged, it may be desirable to -# override the configs in this location. Set this parameter to -# point to the directory, and create a qemu.conf in that location -# -#vnc_sasl_dir = "/some/directory/sasl2" - - -# QEMU implements an extension for providing audio over a VNC connection, -# though if your VNC client does not support it, your only chance for getting -# sound output is through regular audio backends. By default, libvirt will -# disable all QEMU sound backends if using VNC, since they can cause -# permissions issues. Enabling this option will make libvirtd honor the -# QEMU_AUDIO_DRV environment variable when using VNC. -# -#vnc_allow_host_audio = 0 - - - -# SPICE is configured to listen on 127.0.0.1 by default. -# To make it listen on all public interfaces, uncomment -# this next option. -# -# NB, strong recommendation to enable TLS + x509 certificate -# verification when allowing public access -# -#spice_listen = "0.0.0.0" - - -# Enable use of TLS encryption on the SPICE server. -# -# It is necessary to setup CA and issue a server certificate -# before enabling this. -# -#spice_tls = 1 - - -# Use of TLS requires that x509 certificates be issued. The -# default it to keep them in /etc/pki/libvirt-spice. This directory -# must contain -# -# ca-cert.pem - the CA master certificate -# server-cert.pem - the server certificate signed with ca-cert.pem -# server-key.pem - the server private key -# -# This option allows the certificate directory to be changed. -# -#spice_tls_x509_cert_dir = "/etc/pki/libvirt-spice" - - -# The default SPICE password. This parameter is only used if the -# per-domain XML config does not already provide a password. To -# allow access without passwords, leave this commented out. An -# empty string will still enable passwords, but be rejected by -# QEMU, effectively preventing any use of SPICE. Obviously change -# this example here before you set this. -# -#spice_password = "XYZ12345" - - -# Enable use of SASL encryption on the SPICE server. This requires -# a SPICE client which supports the SASL protocol extension. -# -# It is necessary to configure /etc/sasl2/qemu.conf to choose -# the desired SASL plugin (eg, GSSPI for Kerberos) -# -#spice_sasl = 1 - -# The default SASL configuration file is located in /etc/sasl2/ -# When running libvirtd unprivileged, it may be desirable to -# override the configs in this location. Set this parameter to -# point to the directory, and create a qemu.conf in that location -# -#spice_sasl_dir = "/some/directory/sasl2" - - -# By default, if no graphical front end is configured, libvirt will disable -# QEMU audio output since directly talking to alsa/pulseaudio may not work -# with various security settings. If you know what you're doing, enable -# the setting below and libvirt will passthrough the QEMU_AUDIO_DRV -# environment variable when using nographics. -# -#nographics_allow_host_audio = 1 - - -# Override the port for creating both VNC and SPICE sessions (min). -# This defaults to 5900 and increases for consecutive sessions -# or when ports are occupied, until it hits the maximum. -# -# Minimum must be greater than or equal to 5900 as lower number would -# result into negative vnc display number. -# -# Maximum must be less than 65536, because higher numbers do not make -# sense as a port number. -# -#remote_display_port_min = 5900 -#remote_display_port_max = 65535 - -# VNC WebSocket port policies, same rules apply as with remote display -# ports. VNC WebSockets use similar display <-> port mappings, with -# the exception being that ports starts from 5700 instead of 5900. -# -#remote_websocket_port_min = 5700 -#remote_websocket_port_max = 65535 - -# The default security driver is SELinux. If SELinux is disabled -# on the host, then the security driver will automatically disable -# itself. If you wish to disable QEMU SELinux security driver while -# leaving SELinux enabled for the host in general, then set this -# to 'none' instead. It's also possible to use more than one security -# driver at the same time, for this use a list of names separated by -# comma and delimited by square brackets. For example: -# -# security_driver = [ "selinux", "apparmor" ] -# -# Notes: The DAC security driver is always enabled; as a result, the -# value of security_driver cannot contain "dac". The value "none" is -# a special value; security_driver can be set to that value in -# isolation, but it cannot appear in a list of drivers. -# -#security_driver = "selinux" - -# If set to non-zero, then the default security labeling -# will make guests confined. If set to zero, then guests -# will be unconfined by default. Defaults to 1. -#security_default_confined = 1 - -# If set to non-zero, then attempts to create unconfined -# guests will be blocked. Defaults to 0. -#security_require_confined = 1 - -# The user for QEMU processes run by the system instance. It can be -# specified as a user name or as a user id. The qemu driver will try to -# parse this value first as a name and then, if the name doesn't exist, -# as a user id. -# -# Since a sequence of digits is a valid user name, a leading plus sign -# can be used to ensure that a user id will not be interpreted as a user -# name. -# -# Some examples of valid values are: -# -# user = "qemu" # A user named "qemu" -# user = "+0" # Super user (uid=0) -# user = "100" # A user named "100" or a user with uid=100 -# -#user = "root" - -# The group for QEMU processes run by the system instance. It can be -# specified in a similar way to user. -#group = "root" - -# Whether libvirt should dynamically change file ownership -# to match the configured user/group above. Defaults to 1. -# Set to 0 to disable file ownership changes. -#dynamic_ownership = 1 - - -# What cgroup controllers to make use of with QEMU guests -# -# - 'cpu' - use for schedular tunables -# - 'devices' - use for device whitelisting -# - 'memory' - use for memory tunables -# - 'blkio' - use for block devices I/O tunables -# - 'cpuset' - use for CPUs and memory nodes -# - 'cpuacct' - use for CPUs statistics. -# -# NB, even if configured here, they won't be used unless -# the administrator has mounted cgroups, e.g.: -# -# mkdir /dev/cgroup -# mount -t cgroup -o devices,cpu,memory,blkio,cpuset none /dev/cgroup -# -# They can be mounted anywhere, and different controllers -# can be mounted in different locations. libvirt will detect -# where they are located. -# -#cgroup_controllers = [ "cpu", "devices", "memory", "blkio", "cpuset", "cpuacct" ] - -# This is the basic set of devices allowed / required by -# all virtual machines. -# -# As well as this, any configured block backed disks, -# all sound device, and all PTY devices are allowed. -# -# This will only need setting if newer QEMU suddenly -# wants some device we don't already know about. -# -cgroup_device_acl = [ - "/dev/null", "/dev/full", "/dev/zero", - "/dev/random", "/dev/urandom", - "/dev/ptmx", "/dev/kvm", "/dev/kqemu", - "/dev/rtc", "/dev/hpet", "/dev/vfio/vfio", "/dev/net/tun" -] - - -# The default format for Qemu/KVM guest save images is raw; that is, the -# memory from the domain is dumped out directly to a file. If you have -# guests with a large amount of memory, however, this can take up quite -# a bit of space. If you would like to compress the images while they -# are being saved to disk, you can also set "lzop", "gzip", "bzip2", or "xz" -# for save_image_format. Note that this means you slow down the process of -# saving a domain in order to save disk space; the list above is in descending -# order by performance and ascending order by compression ratio. -# -# save_image_format is used when you use 'virsh save' or 'virsh managedsave' -# at scheduled saving, and it is an error if the specified save_image_format -# is not valid, or the requested compression program can't be found. -# -# dump_image_format is used when you use 'virsh dump' at emergency -# crashdump, and if the specified dump_image_format is not valid, or -# the requested compression program can't be found, this falls -# back to "raw" compression. -# -# snapshot_image_format specifies the compression algorithm of the memory save -# image when an external snapshot of a domain is taken. This does not apply -# on disk image format. It is an error if the specified format isn't valid, -# or the requested compression program can't be found. -# -#save_image_format = "raw" -#dump_image_format = "raw" -#snapshot_image_format = "raw" - -# When a domain is configured to be auto-dumped when libvirtd receives a -# watchdog event from qemu guest, libvirtd will save dump files in directory -# specified by auto_dump_path. Default value is /var/lib/libvirt/qemu/dump -# -#auto_dump_path = "/var/lib/libvirt/qemu/dump" - -# When a domain is configured to be auto-dumped, enabling this flag -# has the same effect as using the VIR_DUMP_BYPASS_CACHE flag with the -# virDomainCoreDump API. That is, the system will avoid using the -# file system cache while writing the dump file, but may cause -# slower operation. -# -#auto_dump_bypass_cache = 0 - -# When a domain is configured to be auto-started, enabling this flag -# has the same effect as using the VIR_DOMAIN_START_BYPASS_CACHE flag -# with the virDomainCreateWithFlags API. That is, the system will -# avoid using the file system cache when restoring any managed state -# file, but may cause slower operation. -# -#auto_start_bypass_cache = 0 - -# If provided by the host and a hugetlbfs mount point is configured, -# a guest may request huge page backing. When this mount point is -# unspecified here, determination of a host mount point in /proc/mounts -# will be attempted. Specifying an explicit mount overrides detection -# of the same in /proc/mounts. Setting the mount point to "" will -# disable guest hugepage backing. -# -# NB, within this mount point, guests will create memory backing files -# in a location of $MOUNTPOINT/libvirt/qemu -# -#hugetlbfs_mount = "/dev/hugepages" - - -# Path to the setuid helper for creating tap devices. This executable -# is used to create interfaces when libvirtd is -# running unprivileged. libvirt invokes the helper directly, instead -# of using "-netdev bridge", for security reasons. -#bridge_helper = "/usr/libexec/qemu-bridge-helper" - - - -# If clear_emulator_capabilities is enabled, libvirt will drop all -# privileged capabilities of the QEmu/KVM emulator. This is enabled by -# default. -# -# Warning: Disabling this option means that a compromised guest can -# exploit the privileges and possibly do damage to the host. -# -#clear_emulator_capabilities = 1 - - -# If enabled, libvirt will have QEMU set its process name to -# "qemu:VM_NAME", where VM_NAME is the name of the VM. The QEMU -# process will appear as "qemu:VM_NAME" in process listings and -# other system monitoring tools. By default, QEMU does not set -# its process title, so the complete QEMU command (emulator and -# its arguments) appear in process listings. -# -#set_process_name = 1 - - -# If max_processes is set to a positive integer, libvirt will use -# it to set the maximum number of processes that can be run by qemu -# user. This can be used to override default value set by host OS. -# The same applies to max_files which sets the limit on the maximum -# number of opened files. -# -#max_processes = 0 -#max_files = 0 - - - -# mac_filter enables MAC addressed based filtering on bridge ports. -# This currently requires ebtables to be installed. -# -#mac_filter = 1 - - -# By default, PCI devices below non-ACS switch are not allowed to be assigned -# to guests. By setting relaxed_acs_check to 1 such devices will be allowed to -# be assigned to guests. -# -#relaxed_acs_check = 1 - - -# If allow_disk_format_probing is enabled, libvirt will probe disk -# images to attempt to identify their format, when not otherwise -# specified in the XML. This is disabled by default. -# -# WARNING: Enabling probing is a security hole in almost all -# deployments. It is strongly recommended that users update their -# guest XML elements to include -# elements instead of enabling this option. -# -#allow_disk_format_probing = 1 - - -# To enable 'Sanlock' project based locking of the file -# content (to prevent two VMs writing to the same -# disk), uncomment this -# -#lock_manager = "sanlock" - - - -# Set limit of maximum APIs queued on one domain. All other APIs -# over this threshold will fail on acquiring job lock. Specially, -# setting to zero turns this feature off. -# Note, that job lock is per domain. -# -#max_queued = 0 - -################################################################### -# Keepalive protocol: -# This allows qemu driver to detect broken connections to remote -# libvirtd during peer-to-peer migration. A keepalive message is -# sent to the deamon after keepalive_interval seconds of inactivity -# to check if the deamon is still responding; keepalive_count is a -# maximum number of keepalive messages that are allowed to be sent -# to the deamon without getting any response before the connection -# is considered broken. In other words, the connection is -# automatically closed approximately after -# keepalive_interval * (keepalive_count + 1) seconds since the last -# message received from the deamon. If keepalive_interval is set to -# -1, qemu driver will not send keepalive requests during -# peer-to-peer migration; however, the remote libvirtd can still -# send them and source libvirtd will send responses. When -# keepalive_count is set to 0, connections will be automatically -# closed after keepalive_interval seconds of inactivity without -# sending any keepalive messages. -# -#keepalive_interval = 5 -#keepalive_count = 5 - - - -# Use seccomp syscall whitelisting in QEMU. -# 1 = on, 0 = off, -1 = use QEMU default -# Defaults to -1. -# -#seccomp_sandbox = 1 - - - -# Override the listen address for all incoming migrations. Defaults to -# 0.0.0.0 or :: in case if both host and qemu are capable of IPv6. -#migration_address = "127.0.0.1" - - -# Override the port range used for incoming migrations. -# -# Minimum must be greater than 0, however when QEMU is not running as root, -# setting the minimum to be lower than 1024 will not work. -# -# Maximum must not be greater than 65535. -# -#migration_port_min = 49152 -#migration_port_max = 49215 diff --git a/meta-fsl-ppc/recipes-virtualization/libvirt/libvirt_%.bbappend b/meta-fsl-ppc/recipes-virtualization/libvirt/libvirt_%.bbappend deleted file mode 100644 index c7e6d32e..00000000 --- a/meta-fsl-ppc/recipes-virtualization/libvirt/libvirt_%.bbappend +++ /dev/null @@ -1,9 +0,0 @@ -PACKAGECONFIG_qoriq-ppc = "qemu yajl lxc test remote macvtap libvirtd netcf udev python" - -FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:" -SRC_URI_append_qoriq-ppc = " file://qemu.conf" - -do_install_append_qoriq-ppc() { - install -m 0644 ${WORKDIR}/qemu.conf ${D}${sysconfdir}/libvirt/qemu.conf -} - diff --git a/meta-fsl-ppc/virtualization-layer/recipes-extended/libvirt/libvirt/qoriq-ppc/qemu.conf b/meta-fsl-ppc/virtualization-layer/recipes-extended/libvirt/libvirt/qoriq-ppc/qemu.conf new file mode 100644 index 00000000..cc22fa13 --- /dev/null +++ b/meta-fsl-ppc/virtualization-layer/recipes-extended/libvirt/libvirt/qoriq-ppc/qemu.conf @@ -0,0 +1,465 @@ +# Master configuration file for the QEMU driver. +# All settings described here are optional - if omitted, sensible +# defaults are used. + +# VNC is configured to listen on 127.0.0.1 by default. +# To make it listen on all public interfaces, uncomment +# this next option. +# +# NB, strong recommendation to enable TLS + x509 certificate +# verification when allowing public access +# +#vnc_listen = "0.0.0.0" + +# Enable this option to have VNC served over an automatically created +# unix socket. This prevents unprivileged access from users on the +# host machine, though most VNC clients do not support it. +# +# This will only be enabled for VNC configurations that do not have +# a hardcoded 'listen' or 'socket' value. This setting takes preference +# over vnc_listen. +# +#vnc_auto_unix_socket = 1 + +# Enable use of TLS encryption on the VNC server. This requires +# a VNC client which supports the VeNCrypt protocol extension. +# Examples include vinagre, virt-viewer, virt-manager and vencrypt +# itself. UltraVNC, RealVNC, TightVNC do not support this +# +# It is necessary to setup CA and issue a server certificate +# before enabling this. +# +#vnc_tls = 1 + + +# Use of TLS requires that x509 certificates be issued. The +# default it to keep them in /etc/pki/libvirt-vnc. This directory +# must contain +# +# ca-cert.pem - the CA master certificate +# server-cert.pem - the server certificate signed with ca-cert.pem +# server-key.pem - the server private key +# +# This option allows the certificate directory to be changed +# +#vnc_tls_x509_cert_dir = "/etc/pki/libvirt-vnc" + + +# The default TLS configuration only uses certificates for the server +# allowing the client to verify the server's identity and establish +# an encrypted channel. +# +# It is possible to use x509 certificates for authentication too, by +# issuing a x509 certificate to every client who needs to connect. +# +# Enabling this option will reject any client who does not have a +# certificate signed by the CA in /etc/pki/libvirt-vnc/ca-cert.pem +# +#vnc_tls_x509_verify = 1 + + +# The default VNC password. Only 8 letters are significant for +# VNC passwords. This parameter is only used if the per-domain +# XML config does not already provide a password. To allow +# access without passwords, leave this commented out. An empty +# string will still enable passwords, but be rejected by QEMU, +# effectively preventing any use of VNC. Obviously change this +# example here before you set this. +# +#vnc_password = "XYZ12345" + + +# Enable use of SASL encryption on the VNC server. This requires +# a VNC client which supports the SASL protocol extension. +# Examples include vinagre, virt-viewer and virt-manager +# itself. UltraVNC, RealVNC, TightVNC do not support this +# +# It is necessary to configure /etc/sasl2/qemu.conf to choose +# the desired SASL plugin (eg, GSSPI for Kerberos) +# +#vnc_sasl = 1 + + +# The default SASL configuration file is located in /etc/sasl2/ +# When running libvirtd unprivileged, it may be desirable to +# override the configs in this location. Set this parameter to +# point to the directory, and create a qemu.conf in that location +# +#vnc_sasl_dir = "/some/directory/sasl2" + + +# QEMU implements an extension for providing audio over a VNC connection, +# though if your VNC client does not support it, your only chance for getting +# sound output is through regular audio backends. By default, libvirt will +# disable all QEMU sound backends if using VNC, since they can cause +# permissions issues. Enabling this option will make libvirtd honor the +# QEMU_AUDIO_DRV environment variable when using VNC. +# +#vnc_allow_host_audio = 0 + + + +# SPICE is configured to listen on 127.0.0.1 by default. +# To make it listen on all public interfaces, uncomment +# this next option. +# +# NB, strong recommendation to enable TLS + x509 certificate +# verification when allowing public access +# +#spice_listen = "0.0.0.0" + + +# Enable use of TLS encryption on the SPICE server. +# +# It is necessary to setup CA and issue a server certificate +# before enabling this. +# +#spice_tls = 1 + + +# Use of TLS requires that x509 certificates be issued. The +# default it to keep them in /etc/pki/libvirt-spice. This directory +# must contain +# +# ca-cert.pem - the CA master certificate +# server-cert.pem - the server certificate signed with ca-cert.pem +# server-key.pem - the server private key +# +# This option allows the certificate directory to be changed. +# +#spice_tls_x509_cert_dir = "/etc/pki/libvirt-spice" + + +# The default SPICE password. This parameter is only used if the +# per-domain XML config does not already provide a password. To +# allow access without passwords, leave this commented out. An +# empty string will still enable passwords, but be rejected by +# QEMU, effectively preventing any use of SPICE. Obviously change +# this example here before you set this. +# +#spice_password = "XYZ12345" + + +# Enable use of SASL encryption on the SPICE server. This requires +# a SPICE client which supports the SASL protocol extension. +# +# It is necessary to configure /etc/sasl2/qemu.conf to choose +# the desired SASL plugin (eg, GSSPI for Kerberos) +# +#spice_sasl = 1 + +# The default SASL configuration file is located in /etc/sasl2/ +# When running libvirtd unprivileged, it may be desirable to +# override the configs in this location. Set this parameter to +# point to the directory, and create a qemu.conf in that location +# +#spice_sasl_dir = "/some/directory/sasl2" + + +# By default, if no graphical front end is configured, libvirt will disable +# QEMU audio output since directly talking to alsa/pulseaudio may not work +# with various security settings. If you know what you're doing, enable +# the setting below and libvirt will passthrough the QEMU_AUDIO_DRV +# environment variable when using nographics. +# +#nographics_allow_host_audio = 1 + + +# Override the port for creating both VNC and SPICE sessions (min). +# This defaults to 5900 and increases for consecutive sessions +# or when ports are occupied, until it hits the maximum. +# +# Minimum must be greater than or equal to 5900 as lower number would +# result into negative vnc display number. +# +# Maximum must be less than 65536, because higher numbers do not make +# sense as a port number. +# +#remote_display_port_min = 5900 +#remote_display_port_max = 65535 + +# VNC WebSocket port policies, same rules apply as with remote display +# ports. VNC WebSockets use similar display <-> port mappings, with +# the exception being that ports starts from 5700 instead of 5900. +# +#remote_websocket_port_min = 5700 +#remote_websocket_port_max = 65535 + +# The default security driver is SELinux. If SELinux is disabled +# on the host, then the security driver will automatically disable +# itself. If you wish to disable QEMU SELinux security driver while +# leaving SELinux enabled for the host in general, then set this +# to 'none' instead. It's also possible to use more than one security +# driver at the same time, for this use a list of names separated by +# comma and delimited by square brackets. For example: +# +# security_driver = [ "selinux", "apparmor" ] +# +# Notes: The DAC security driver is always enabled; as a result, the +# value of security_driver cannot contain "dac". The value "none" is +# a special value; security_driver can be set to that value in +# isolation, but it cannot appear in a list of drivers. +# +#security_driver = "selinux" + +# If set to non-zero, then the default security labeling +# will make guests confined. If set to zero, then guests +# will be unconfined by default. Defaults to 1. +#security_default_confined = 1 + +# If set to non-zero, then attempts to create unconfined +# guests will be blocked. Defaults to 0. +#security_require_confined = 1 + +# The user for QEMU processes run by the system instance. It can be +# specified as a user name or as a user id. The qemu driver will try to +# parse this value first as a name and then, if the name doesn't exist, +# as a user id. +# +# Since a sequence of digits is a valid user name, a leading plus sign +# can be used to ensure that a user id will not be interpreted as a user +# name. +# +# Some examples of valid values are: +# +# user = "qemu" # A user named "qemu" +# user = "+0" # Super user (uid=0) +# user = "100" # A user named "100" or a user with uid=100 +# +#user = "root" + +# The group for QEMU processes run by the system instance. It can be +# specified in a similar way to user. +#group = "root" + +# Whether libvirt should dynamically change file ownership +# to match the configured user/group above. Defaults to 1. +# Set to 0 to disable file ownership changes. +#dynamic_ownership = 1 + + +# What cgroup controllers to make use of with QEMU guests +# +# - 'cpu' - use for schedular tunables +# - 'devices' - use for device whitelisting +# - 'memory' - use for memory tunables +# - 'blkio' - use for block devices I/O tunables +# - 'cpuset' - use for CPUs and memory nodes +# - 'cpuacct' - use for CPUs statistics. +# +# NB, even if configured here, they won't be used unless +# the administrator has mounted cgroups, e.g.: +# +# mkdir /dev/cgroup +# mount -t cgroup -o devices,cpu,memory,blkio,cpuset none /dev/cgroup +# +# They can be mounted anywhere, and different controllers +# can be mounted in different locations. libvirt will detect +# where they are located. +# +#cgroup_controllers = [ "cpu", "devices", "memory", "blkio", "cpuset", "cpuacct" ] + +# This is the basic set of devices allowed / required by +# all virtual machines. +# +# As well as this, any configured block backed disks, +# all sound device, and all PTY devices are allowed. +# +# This will only need setting if newer QEMU suddenly +# wants some device we don't already know about. +# +cgroup_device_acl = [ + "/dev/null", "/dev/full", "/dev/zero", + "/dev/random", "/dev/urandom", + "/dev/ptmx", "/dev/kvm", "/dev/kqemu", + "/dev/rtc", "/dev/hpet", "/dev/vfio/vfio", "/dev/net/tun" +] + + +# The default format for Qemu/KVM guest save images is raw; that is, the +# memory from the domain is dumped out directly to a file. If you have +# guests with a large amount of memory, however, this can take up quite +# a bit of space. If you would like to compress the images while they +# are being saved to disk, you can also set "lzop", "gzip", "bzip2", or "xz" +# for save_image_format. Note that this means you slow down the process of +# saving a domain in order to save disk space; the list above is in descending +# order by performance and ascending order by compression ratio. +# +# save_image_format is used when you use 'virsh save' or 'virsh managedsave' +# at scheduled saving, and it is an error if the specified save_image_format +# is not valid, or the requested compression program can't be found. +# +# dump_image_format is used when you use 'virsh dump' at emergency +# crashdump, and if the specified dump_image_format is not valid, or +# the requested compression program can't be found, this falls +# back to "raw" compression. +# +# snapshot_image_format specifies the compression algorithm of the memory save +# image when an external snapshot of a domain is taken. This does not apply +# on disk image format. It is an error if the specified format isn't valid, +# or the requested compression program can't be found. +# +#save_image_format = "raw" +#dump_image_format = "raw" +#snapshot_image_format = "raw" + +# When a domain is configured to be auto-dumped when libvirtd receives a +# watchdog event from qemu guest, libvirtd will save dump files in directory +# specified by auto_dump_path. Default value is /var/lib/libvirt/qemu/dump +# +#auto_dump_path = "/var/lib/libvirt/qemu/dump" + +# When a domain is configured to be auto-dumped, enabling this flag +# has the same effect as using the VIR_DUMP_BYPASS_CACHE flag with the +# virDomainCoreDump API. That is, the system will avoid using the +# file system cache while writing the dump file, but may cause +# slower operation. +# +#auto_dump_bypass_cache = 0 + +# When a domain is configured to be auto-started, enabling this flag +# has the same effect as using the VIR_DOMAIN_START_BYPASS_CACHE flag +# with the virDomainCreateWithFlags API. That is, the system will +# avoid using the file system cache when restoring any managed state +# file, but may cause slower operation. +# +#auto_start_bypass_cache = 0 + +# If provided by the host and a hugetlbfs mount point is configured, +# a guest may request huge page backing. When this mount point is +# unspecified here, determination of a host mount point in /proc/mounts +# will be attempted. Specifying an explicit mount overrides detection +# of the same in /proc/mounts. Setting the mount point to "" will +# disable guest hugepage backing. +# +# NB, within this mount point, guests will create memory backing files +# in a location of $MOUNTPOINT/libvirt/qemu +# +#hugetlbfs_mount = "/dev/hugepages" + + +# Path to the setuid helper for creating tap devices. This executable +# is used to create interfaces when libvirtd is +# running unprivileged. libvirt invokes the helper directly, instead +# of using "-netdev bridge", for security reasons. +#bridge_helper = "/usr/libexec/qemu-bridge-helper" + + + +# If clear_emulator_capabilities is enabled, libvirt will drop all +# privileged capabilities of the QEmu/KVM emulator. This is enabled by +# default. +# +# Warning: Disabling this option means that a compromised guest can +# exploit the privileges and possibly do damage to the host. +# +#clear_emulator_capabilities = 1 + + +# If enabled, libvirt will have QEMU set its process name to +# "qemu:VM_NAME", where VM_NAME is the name of the VM. The QEMU +# process will appear as "qemu:VM_NAME" in process listings and +# other system monitoring tools. By default, QEMU does not set +# its process title, so the complete QEMU command (emulator and +# its arguments) appear in process listings. +# +#set_process_name = 1 + + +# If max_processes is set to a positive integer, libvirt will use +# it to set the maximum number of processes that can be run by qemu +# user. This can be used to override default value set by host OS. +# The same applies to max_files which sets the limit on the maximum +# number of opened files. +# +#max_processes = 0 +#max_files = 0 + + + +# mac_filter enables MAC addressed based filtering on bridge ports. +# This currently requires ebtables to be installed. +# +#mac_filter = 1 + + +# By default, PCI devices below non-ACS switch are not allowed to be assigned +# to guests. By setting relaxed_acs_check to 1 such devices will be allowed to +# be assigned to guests. +# +#relaxed_acs_check = 1 + + +# If allow_disk_format_probing is enabled, libvirt will probe disk +# images to attempt to identify their format, when not otherwise +# specified in the XML. This is disabled by default. +# +# WARNING: Enabling probing is a security hole in almost all +# deployments. It is strongly recommended that users update their +# guest XML elements to include +# elements instead of enabling this option. +# +#allow_disk_format_probing = 1 + + +# To enable 'Sanlock' project based locking of the file +# content (to prevent two VMs writing to the same +# disk), uncomment this +# +#lock_manager = "sanlock" + + + +# Set limit of maximum APIs queued on one domain. All other APIs +# over this threshold will fail on acquiring job lock. Specially, +# setting to zero turns this feature off. +# Note, that job lock is per domain. +# +#max_queued = 0 + +################################################################### +# Keepalive protocol: +# This allows qemu driver to detect broken connections to remote +# libvirtd during peer-to-peer migration. A keepalive message is +# sent to the deamon after keepalive_interval seconds of inactivity +# to check if the deamon is still responding; keepalive_count is a +# maximum number of keepalive messages that are allowed to be sent +# to the deamon without getting any response before the connection +# is considered broken. In other words, the connection is +# automatically closed approximately after +# keepalive_interval * (keepalive_count + 1) seconds since the last +# message received from the deamon. If keepalive_interval is set to +# -1, qemu driver will not send keepalive requests during +# peer-to-peer migration; however, the remote libvirtd can still +# send them and source libvirtd will send responses. When +# keepalive_count is set to 0, connections will be automatically +# closed after keepalive_interval seconds of inactivity without +# sending any keepalive messages. +# +#keepalive_interval = 5 +#keepalive_count = 5 + + + +# Use seccomp syscall whitelisting in QEMU. +# 1 = on, 0 = off, -1 = use QEMU default +# Defaults to -1. +# +#seccomp_sandbox = 1 + + + +# Override the listen address for all incoming migrations. Defaults to +# 0.0.0.0 or :: in case if both host and qemu are capable of IPv6. +#migration_address = "127.0.0.1" + + +# Override the port range used for incoming migrations. +# +# Minimum must be greater than 0, however when QEMU is not running as root, +# setting the minimum to be lower than 1024 will not work. +# +# Maximum must not be greater than 65535. +# +#migration_port_min = 49152 +#migration_port_max = 49215 diff --git a/meta-fsl-ppc/virtualization-layer/recipes-extended/libvirt/libvirt_%.bbappend b/meta-fsl-ppc/virtualization-layer/recipes-extended/libvirt/libvirt_%.bbappend new file mode 100644 index 00000000..c7e6d32e --- /dev/null +++ b/meta-fsl-ppc/virtualization-layer/recipes-extended/libvirt/libvirt_%.bbappend @@ -0,0 +1,9 @@ +PACKAGECONFIG_qoriq-ppc = "qemu yajl lxc test remote macvtap libvirtd netcf udev python" + +FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:" +SRC_URI_append_qoriq-ppc = " file://qemu.conf" + +do_install_append_qoriq-ppc() { + install -m 0644 ${WORKDIR}/qemu.conf ${D}${sysconfdir}/libvirt/qemu.conf +} + -- cgit v1.2.3-54-g00ecf From fa938cf76caedfd7123584dc24fd97b29a5b08be Mon Sep 17 00:00:00 2001 From: Christopher Larson Date: Wed, 3 Sep 2014 10:50:31 -0700 Subject: boot-format: obey CFLAGS, LDFLAGS Signed-off-by: Christopher Larson --- .../recipes-bsp/boot-format/boot-format/flags.patch | 21 +++++++++++++++++++++ .../recipes-bsp/boot-format/boot-format_git.bb | 5 +++-- 2 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 meta-fsl-ppc/recipes-bsp/boot-format/boot-format/flags.patch diff --git a/meta-fsl-ppc/recipes-bsp/boot-format/boot-format/flags.patch b/meta-fsl-ppc/recipes-bsp/boot-format/boot-format/flags.patch new file mode 100644 index 00000000..cddb34cd --- /dev/null +++ b/meta-fsl-ppc/recipes-bsp/boot-format/boot-format/flags.patch @@ -0,0 +1,21 @@ +Index: git/Makefile +=================================================================== +--- git.orig/Makefile ++++ git/Makefile +@@ -3,14 +3,14 @@ + INSTALL=install + PREFIX=/usr + +-CFLAGS=-Wall ++override CFLAGS+=-Wall + + all: boot_format + + boot_format.o: boot_format.c boot_format.h + + boot_format: boot_format.o +- $(CC) $< -o $@ ++ $(CC) $(CFLAGS) $< -o $@ $(LDFLAGS) + + install: boot_format + $(INSTALL) -d $(DESTDIR)$(PREFIX)/bin diff --git a/meta-fsl-ppc/recipes-bsp/boot-format/boot-format_git.bb b/meta-fsl-ppc/recipes-bsp/boot-format/boot-format_git.bb index eb7c6de8..2d9f9b1d 100644 --- a/meta-fsl-ppc/recipes-bsp/boot-format/boot-format_git.bb +++ b/meta-fsl-ppc/recipes-bsp/boot-format/boot-format_git.bb @@ -3,11 +3,12 @@ LICENSE = "GPLv2" PR = "r6" LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" -SRC_URI = "git://git.freescale.com/ppc/sdk/boot-format.git;nobranch=1" +SRC_URI = "git://git.freescale.com/ppc/sdk/boot-format.git;nobranch=1 \ + file://flags.patch" SRCREV = "4eb81a6797ef4e58bf7d9b2d58afb37a21c1f550" S = "${WORKDIR}/git" -EXTRA_OEMAKE = 'CC="${CC}"' +EXTRA_OEMAKE = 'CC="${CC}" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}"' do_install(){ oe_runmake DESTDIR=${D} PREFIX=${prefix} install -- cgit v1.2.3-54-g00ecf From b659a9eb7e5e0456f2881b840dc8fe164706f5fb Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 3 Sep 2014 11:23:20 -0700 Subject: uspdcp, fmc: make meta-fsl-ppc play with other layers Some recipes are specific to fsl machines but arent marked so. Signed-off-by: Khem Raj --- meta-fsl-ppc/recipes-dpaa/fmc/fmc_git.bb | 2 ++ meta-fsl-ppc/recipes-extended/uspdcp/uspdcp_git.bb | 3 +++ 2 files changed, 5 insertions(+) diff --git a/meta-fsl-ppc/recipes-dpaa/fmc/fmc_git.bb b/meta-fsl-ppc/recipes-dpaa/fmc/fmc_git.bb index 9a8af271..100940a1 100644 --- a/meta-fsl-ppc/recipes-dpaa/fmc/fmc_git.bb +++ b/meta-fsl-ppc/recipes-dpaa/fmc/fmc_git.bb @@ -11,6 +11,8 @@ SRCREV = "021f7206cd80eb2e85dde1fc1bc79e8fea272de4" DEPENDS = "libxml2 fmlib tclap" PACKAGE_ARCH = "${MACHINE_ARCH}" +COMPATIBLE_HOST_qoriq-ppc = ".*" +COMPATIBLE_HOST ?= "(none)" S = "${WORKDIR}/git" diff --git a/meta-fsl-ppc/recipes-extended/uspdcp/uspdcp_git.bb b/meta-fsl-ppc/recipes-extended/uspdcp/uspdcp_git.bb index 035aab59..71e68ccc 100644 --- a/meta-fsl-ppc/recipes-extended/uspdcp/uspdcp_git.bb +++ b/meta-fsl-ppc/recipes-extended/uspdcp/uspdcp_git.bb @@ -3,6 +3,9 @@ LICENSE = "BSD GPLv2" DEPENDS += "flib usdpaa" +COMPATIBLE_HOST_qoriq-ppc = ".*" +COMPATIBLE_HOST ?= "(none)" + # no COPYING file in current git tree, need to be fixed LIC_FILES_CHKSUM = "file://Makefile;endline=30;md5=83b6209ab517640a7390536a08d33609" -- cgit v1.2.3-54-g00ecf From 8efb769207b4e96afecc47129983eadfd77fc008 Mon Sep 17 00:00:00 2001 From: Sona Sarmadi Date: Fri, 5 Sep 2014 14:59:02 +0200 Subject: fs: umount on symlink leaks mnt count, CVE-2014-5045 Signed-off-by: Sona Sarmadi --- ...r-CVE-2014-5045-fs-umount-on-symlink-leak.patch | 47 ++++++++++++++++++++++ .../recipes-kernel/linux/linux-qoriq_3.12.bb | 1 + 2 files changed, 48 insertions(+) create mode 100644 meta-fsl-ppc/recipes-kernel/linux/files/Fix-for-CVE-2014-5045-fs-umount-on-symlink-leak.patch diff --git a/meta-fsl-ppc/recipes-kernel/linux/files/Fix-for-CVE-2014-5045-fs-umount-on-symlink-leak.patch b/meta-fsl-ppc/recipes-kernel/linux/files/Fix-for-CVE-2014-5045-fs-umount-on-symlink-leak.patch new file mode 100644 index 00000000..1ae600fb --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/linux/files/Fix-for-CVE-2014-5045-fs-umount-on-symlink-leak.patch @@ -0,0 +1,47 @@ +fs: umount on symlink leaks mnt count + +commit 295dc39d941dc2ae53d5c170365af4c9d5c16212 upstream. + +Currently umount on symlink blocks following umount: + +/vz is separate mount + +drwxr-xr-x. 2 root root 4096 Jul 19 01:14 testdir +lrwxrwxrwx. 1 root root 11 Jul 19 01:16 testlink -> /vz/testdir +umount: /vz/testlink: not mounted (expected) + +umount: /vz: device is busy. (unexpected) + +In this case mountpoint_last() gets an extra refcount on path->mnt + +Upstream-Status: Backport + +Signed-off-by: Vasily Averin +Acked-by: Ian Kent +Acked-by: Jeff Layton +Cc: stable@vger.kernel.org +Signed-off-by: Christoph Hellwig +Signed-off-by: Sona Sarmadi +--- + fs/namei.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/fs/namei.c b/fs/namei.c +index 187cacf..c199dcc 100644 +--- a/fs/namei.c ++++ b/fs/namei.c +@@ -2280,9 +2280,10 @@ done: + goto out; + } + path->dentry = dentry; +- path->mnt = mntget(nd->path.mnt); ++ path->mnt = nd->path.mnt; + if (should_follow_link(dentry->d_inode, nd->flags & LOOKUP_FOLLOW)) + return 1; ++ mntget(path->mnt); + follow_mount(path); + error = 0; + out: +-- +1.9.1 + diff --git a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq_3.12.bb b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq_3.12.bb index 5d9a1f0d..4e9c50b5 100644 --- a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq_3.12.bb +++ b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq_3.12.bb @@ -2,6 +2,7 @@ require recipes-kernel/linux/linux-qoriq.inc SRC_URI = "git://git.freescale.com/ppc/sdk/linux.git;nobranch=1 \ file://powerpc-Fix-64-bit-builds-with-binutils-2.24.patch \ + file://Fix-for-CVE-2014-5045-fs-umount-on-symlink-leak.patch \ " SRCREV = "c29fe1a733308cbe592b3af054a97be1b91cf2dd" -- cgit v1.2.3-54-g00ecf From 0593fcf83de728c86fd41c4695a3903dd7625daf Mon Sep 17 00:00:00 2001 From: Josep Puigdemont Date: Sat, 6 Sep 2014 12:45:01 +0200 Subject: qemu: remove unavailable configuration options The preferred version of qemu defined in this layer (1.7) does not have the same configuration options as the original yocto version (2.0). Since this recipe includes yocto's qemu.inc, some of the configuration options defined there generate an error during the do_configure task: | ERROR: unknown option --disable-lzo | ERROR: unknown option --disable-numa | ERROR: unknown option --disable-quorum Setting PACKAGECONFIG[otion] to an empty string fixes the problem. Addresses bug: [YOCTO #6690] Signed-off-by: Josep Puigdemont --- meta-fsl-ppc/recipes-devtools/qemu/qemu_fslgit.bb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/meta-fsl-ppc/recipes-devtools/qemu/qemu_fslgit.bb b/meta-fsl-ppc/recipes-devtools/qemu/qemu_fslgit.bb index 88e78b58..9e510567 100644 --- a/meta-fsl-ppc/recipes-devtools/qemu/qemu_fslgit.bb +++ b/meta-fsl-ppc/recipes-devtools/qemu/qemu_fslgit.bb @@ -6,6 +6,13 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \ # This means QEMU v1.7 with FSL specific patches applied PV = "1.7+fsl" +# NOTE: these options are note available in qemu 1.7, but qemu.inc assumes +# version 2.0+ where they are available. For now we unset them, but we should +# remove the following lines when upgrading to qemu 2.0+: +PACKAGECONFIG[quorum] = "" +PACKAGECONFIG[lzo] = "" +PACKAGECONFIG[numa] = "" + SRC_URI = "git://git.freescale.com/ppc/sdk/qemu.git;nobranch=1" SRCREV = "9e38e640275beabf6468a04cec5c403b2ac566ad" -- cgit v1.2.3-54-g00ecf From e58e8ae7b6735dd1f65b5bd6e59b3f5897dfd837 Mon Sep 17 00:00:00 2001 From: Liviu Gheorghisan Date: Thu, 18 Sep 2014 10:22:37 +0200 Subject: CVE-2014-5077 Kernel/SCTP: fix a NULL pointer dereference A NULL pointer dereference flaw was found in the way the Linux kernel's Stream Control Transmission Protocol (SCTP) implementation handled simultaneous connections between the same hosts. A remote attacker could use this flaw to crash the system. References: - https://access.redhat.com/security/cve/CVE-2014-5077 - http://patchwork.ozlabs.org/patch/372475/ Signed-off-by: Liviu Gheorghisan --- ...p-inherit-auth-capable-on-INIT-collisions.patch | 41 ++++++++++++++++++++++ .../recipes-kernel/linux/linux-qoriq_3.12.bb | 1 + 2 files changed, 42 insertions(+) create mode 100644 meta-fsl-ppc/recipes-kernel/linux/files/Fix-CVE-2014-5077-sctp-inherit-auth-capable-on-INIT-collisions.patch diff --git a/meta-fsl-ppc/recipes-kernel/linux/files/Fix-CVE-2014-5077-sctp-inherit-auth-capable-on-INIT-collisions.patch b/meta-fsl-ppc/recipes-kernel/linux/files/Fix-CVE-2014-5077-sctp-inherit-auth-capable-on-INIT-collisions.patch new file mode 100644 index 00000000..7d165356 --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/linux/files/Fix-CVE-2014-5077-sctp-inherit-auth-capable-on-INIT-collisions.patch @@ -0,0 +1,41 @@ +CVE-2014-5077 Kernel/SCTP: fix a NULL pointer dereference + +A NULL pointer dereference flaw was found in the way the +Linux kernel's Stream Control Transmission Protocol +(SCTP) implementation handled simultaneous connections +between the same hosts. A remote attacker could use this +flaw to crash the system. + +Upstream-Status: Backport (from v3.16, commit 1be9a950c646c) + +References: + - https://access.redhat.com/security/cve/CVE-2014-5077 + - http://patchwork.ozlabs.org/patch/372475/ + +Fixes: 730fc3d05cd4 ("[SCTP]: Implete SCTP-AUTH parameter processing") +Reported-by: Jason Gunthorpe +Signed-off-by: Daniel Borkmann +Tested-by: Jason Gunthorpe +Cc: Vlad Yasevich +Acked-by: Vlad Yasevich +Signed-off-by: David S. Miller +Signed-off-by: Liviu Gheorghisan +--- + net/sctp/associola.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/net/sctp/associola.c b/net/sctp/associola.c +index 9de23a2..06a9ee6 100644 +--- a/net/sctp/associola.c ++++ b/net/sctp/associola.c +@@ -1097,6 +1097,7 @@ void sctp_assoc_update(struct sctp_association *asoc, + asoc->c = new->c; + asoc->peer.rwnd = new->peer.rwnd; + asoc->peer.sack_needed = new->peer.sack_needed; ++ asoc->peer.auth_capable = new->peer.auth_capable; + asoc->peer.i = new->peer.i; + sctp_tsnmap_init(&asoc->peer.tsn_map, SCTP_TSN_MAP_INITIAL, + asoc->peer.i.initial_tsn, GFP_ATOMIC); +-- +1.9.1 + diff --git a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq_3.12.bb b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq_3.12.bb index 4e9c50b5..93a0bba7 100644 --- a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq_3.12.bb +++ b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq_3.12.bb @@ -3,6 +3,7 @@ require recipes-kernel/linux/linux-qoriq.inc SRC_URI = "git://git.freescale.com/ppc/sdk/linux.git;nobranch=1 \ file://powerpc-Fix-64-bit-builds-with-binutils-2.24.patch \ file://Fix-for-CVE-2014-5045-fs-umount-on-symlink-leak.patch \ + file://Fix-CVE-2014-5077-sctp-inherit-auth-capable-on-INIT-collisions.patch \ " SRCREV = "c29fe1a733308cbe592b3af054a97be1b91cf2dd" -- cgit v1.2.3-54-g00ecf From cefbff013154eb414f3fcaa7de0884b7dd2598fe Mon Sep 17 00:00:00 2001 From: Sona Sarmadi Date: Fri, 26 Sep 2014 15:18:31 +0800 Subject: linux: sofs - CVE-2014-5471, CVE-2014-5472 Fix unbounded recursion when processing relocated directories Signed-off-by: Sona Sarmadi Signed-off-by: Zhenhua Luo --- .../files/Fix-CVE-2014-5471_CVE-2014-5472.patch | 212 +++++++++++++++++++++ .../recipes-kernel/linux/linux-qoriq_3.12.bb | 1 + 2 files changed, 213 insertions(+) create mode 100644 meta-fsl-ppc/recipes-kernel/linux/files/Fix-CVE-2014-5471_CVE-2014-5472.patch diff --git a/meta-fsl-ppc/recipes-kernel/linux/files/Fix-CVE-2014-5471_CVE-2014-5472.patch b/meta-fsl-ppc/recipes-kernel/linux/files/Fix-CVE-2014-5471_CVE-2014-5472.patch new file mode 100644 index 00000000..65107d63 --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/linux/files/Fix-CVE-2014-5471_CVE-2014-5472.patch @@ -0,0 +1,212 @@ +From 4488e1f5ef40441c9846b1d0a29152c208a05e66 Mon Sep 17 00:00:00 2001 +From: Jan Kara +Date: Sun, 17 Aug 2014 11:49:57 +0200 +Subject: [PATCH] isofs: Fix unbounded recursion when processing relocated + directories + +commit 410dd3cf4c9b36f27ed4542ee18b1af5e68645a4 upstream. + +We did not check relocated directory in any way when processing Rock +Ridge 'CL' tag. Thus a corrupted isofs image can possibly have a CL +entry pointing to another CL entry leading to possibly unbounded +recursion in kernel code and thus stack overflow or deadlocks (if there +is a loop created from CL entries). + +Fix the problem by not allowing CL entry to point to a directory entry +with CL entry (such use makes no good sense anyway) and by checking +whether CL entry doesn't point to itself. + +Upstream status: backported (from v3.12 e4ca8b780c82c04ec0) + +Reported-by: Chris Evans +Signed-off-by: Jan Kara +Signed-off-by: Jiri Slaby +Signed-off-by: Sona Sarmadi +--- + fs/isofs/inode.c | 15 ++++++++------- + fs/isofs/isofs.h | 23 +++++++++++++++++++---- + fs/isofs/rock.c | 39 ++++++++++++++++++++++++++++----------- + 3 files changed, 55 insertions(+), 22 deletions(-) + +diff --git a/fs/isofs/inode.c b/fs/isofs/inode.c +index e5d408a..2e2af97 100644 +--- a/fs/isofs/inode.c ++++ b/fs/isofs/inode.c +@@ -61,7 +61,7 @@ static void isofs_put_super(struct super_block *sb) + return; + } + +-static int isofs_read_inode(struct inode *); ++static int isofs_read_inode(struct inode *, int relocated); + static int isofs_statfs (struct dentry *, struct kstatfs *); + + static struct kmem_cache *isofs_inode_cachep; +@@ -1258,7 +1258,7 @@ out_toomany: + goto out; + } + +-static int isofs_read_inode(struct inode *inode) ++static int isofs_read_inode(struct inode *inode, int relocated) + { + struct super_block *sb = inode->i_sb; + struct isofs_sb_info *sbi = ISOFS_SB(sb); +@@ -1403,7 +1403,7 @@ static int isofs_read_inode(struct inode *inode) + */ + + if (!high_sierra) { +- parse_rock_ridge_inode(de, inode); ++ parse_rock_ridge_inode(de, inode, relocated); + /* if we want uid/gid set, override the rock ridge setting */ + if (sbi->s_uid_set) + inode->i_uid = sbi->s_uid; +@@ -1482,9 +1482,10 @@ static int isofs_iget5_set(struct inode *ino, void *data) + * offset that point to the underlying meta-data for the inode. The + * code below is otherwise similar to the iget() code in + * include/linux/fs.h */ +-struct inode *isofs_iget(struct super_block *sb, +- unsigned long block, +- unsigned long offset) ++struct inode *__isofs_iget(struct super_block *sb, ++ unsigned long block, ++ unsigned long offset, ++ int relocated) + { + unsigned long hashval; + struct inode *inode; +@@ -1506,7 +1507,7 @@ struct inode *isofs_iget(struct super_block *sb, + return ERR_PTR(-ENOMEM); + + if (inode->i_state & I_NEW) { +- ret = isofs_read_inode(inode); ++ ret = isofs_read_inode(inode, relocated); + if (ret < 0) { + iget_failed(inode); + inode = ERR_PTR(ret); +diff --git a/fs/isofs/isofs.h b/fs/isofs/isofs.h +index 9916723..0ac4c1f 100644 +--- a/fs/isofs/isofs.h ++++ b/fs/isofs/isofs.h +@@ -107,7 +107,7 @@ extern int iso_date(char *, int); + + struct inode; /* To make gcc happy */ + +-extern int parse_rock_ridge_inode(struct iso_directory_record *, struct inode *); ++extern int parse_rock_ridge_inode(struct iso_directory_record *, struct inode *, int relocated); + extern int get_rock_ridge_filename(struct iso_directory_record *, char *, struct inode *); + extern int isofs_name_translate(struct iso_directory_record *, char *, struct inode *); + +@@ -118,9 +118,24 @@ extern struct dentry *isofs_lookup(struct inode *, struct dentry *, unsigned int + extern struct buffer_head *isofs_bread(struct inode *, sector_t); + extern int isofs_get_blocks(struct inode *, sector_t, struct buffer_head **, unsigned long); + +-extern struct inode *isofs_iget(struct super_block *sb, +- unsigned long block, +- unsigned long offset); ++struct inode *__isofs_iget(struct super_block *sb, ++ unsigned long block, ++ unsigned long offset, ++ int relocated); ++ ++static inline struct inode *isofs_iget(struct super_block *sb, ++ unsigned long block, ++ unsigned long offset) ++{ ++ return __isofs_iget(sb, block, offset, 0); ++} ++ ++static inline struct inode *isofs_iget_reloc(struct super_block *sb, ++ unsigned long block, ++ unsigned long offset) ++{ ++ return __isofs_iget(sb, block, offset, 1); ++} + + /* Because the inode number is no longer relevant to finding the + * underlying meta-data for an inode, we are free to choose a more +diff --git a/fs/isofs/rock.c b/fs/isofs/rock.c +index c0bf424..f488bba 100644 +--- a/fs/isofs/rock.c ++++ b/fs/isofs/rock.c +@@ -288,12 +288,16 @@ eio: + goto out; + } + ++#define RR_REGARD_XA 1 ++#define RR_RELOC_DE 2 ++ + static int + parse_rock_ridge_inode_internal(struct iso_directory_record *de, +- struct inode *inode, int regard_xa) ++ struct inode *inode, int flags) + { + int symlink_len = 0; + int cnt, sig; ++ unsigned int reloc_block; + struct inode *reloc; + struct rock_ridge *rr; + int rootflag; +@@ -305,7 +309,7 @@ parse_rock_ridge_inode_internal(struct iso_directory_record *de, + + init_rock_state(&rs, inode); + setup_rock_ridge(de, inode, &rs); +- if (regard_xa) { ++ if (flags & RR_REGARD_XA) { + rs.chr += 14; + rs.len -= 14; + if (rs.len < 0) +@@ -485,12 +489,22 @@ repeat: + "relocated directory\n"); + goto out; + case SIG('C', 'L'): +- ISOFS_I(inode)->i_first_extent = +- isonum_733(rr->u.CL.location); +- reloc = +- isofs_iget(inode->i_sb, +- ISOFS_I(inode)->i_first_extent, +- 0); ++ if (flags & RR_RELOC_DE) { ++ printk(KERN_ERR ++ "ISOFS: Recursive directory relocation " ++ "is not supported\n"); ++ goto eio; ++ } ++ reloc_block = isonum_733(rr->u.CL.location); ++ if (reloc_block == ISOFS_I(inode)->i_iget5_block && ++ ISOFS_I(inode)->i_iget5_offset == 0) { ++ printk(KERN_ERR ++ "ISOFS: Directory relocation points to " ++ "itself\n"); ++ goto eio; ++ } ++ ISOFS_I(inode)->i_first_extent = reloc_block; ++ reloc = isofs_iget_reloc(inode->i_sb, reloc_block, 0); + if (IS_ERR(reloc)) { + ret = PTR_ERR(reloc); + goto out; +@@ -637,9 +651,11 @@ static char *get_symlink_chunk(char *rpnt, struct rock_ridge *rr, char *plimit) + return rpnt; + } + +-int parse_rock_ridge_inode(struct iso_directory_record *de, struct inode *inode) ++int parse_rock_ridge_inode(struct iso_directory_record *de, struct inode *inode, ++ int relocated) + { +- int result = parse_rock_ridge_inode_internal(de, inode, 0); ++ int flags = relocated ? RR_RELOC_DE : 0; ++ int result = parse_rock_ridge_inode_internal(de, inode, flags); + + /* + * if rockridge flag was reset and we didn't look for attributes +@@ -647,7 +663,8 @@ int parse_rock_ridge_inode(struct iso_directory_record *de, struct inode *inode) + */ + if ((ISOFS_SB(inode->i_sb)->s_rock_offset == -1) + && (ISOFS_SB(inode->i_sb)->s_rock == 2)) { +- result = parse_rock_ridge_inode_internal(de, inode, 14); ++ result = parse_rock_ridge_inode_internal(de, inode, ++ flags | RR_REGARD_XA); + } + return result; + } +-- +1.9.1 + diff --git a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq_3.12.bb b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq_3.12.bb index 93a0bba7..39270d48 100644 --- a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq_3.12.bb +++ b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq_3.12.bb @@ -4,6 +4,7 @@ SRC_URI = "git://git.freescale.com/ppc/sdk/linux.git;nobranch=1 \ file://powerpc-Fix-64-bit-builds-with-binutils-2.24.patch \ file://Fix-for-CVE-2014-5045-fs-umount-on-symlink-leak.patch \ file://Fix-CVE-2014-5077-sctp-inherit-auth-capable-on-INIT-collisions.patch \ + file://Fix-CVE-2014-5471_CVE-2014-5472.patch \ " SRCREV = "c29fe1a733308cbe592b3af054a97be1b91cf2dd" -- cgit v1.2.3-54-g00ecf From 449ff0650b5c0a5cf1e8c1f5ada099613efe8f9c Mon Sep 17 00:00:00 2001 From: Bob Cochran Date: Thu, 13 Nov 2014 22:55:23 -0500 Subject: linux-qoriq: Remove Altivec from T1040 64-bit defconfig T1040 uses an E5500 processor, and E5500 doesn't have an Altivec unit This was tested on a t1040rdb Signed-off-by: Bob Cochran --- ...emove-Altivec-from-T1040-64-bit-defconfig.patch | 27 ++++++++++++++++++++++ .../recipes-kernel/linux/linux-qoriq_3.12.bb | 1 + 2 files changed, 28 insertions(+) create mode 100644 meta-fsl-ppc/recipes-kernel/linux/files/remove-Altivec-from-T1040-64-bit-defconfig.patch diff --git a/meta-fsl-ppc/recipes-kernel/linux/files/remove-Altivec-from-T1040-64-bit-defconfig.patch b/meta-fsl-ppc/recipes-kernel/linux/files/remove-Altivec-from-T1040-64-bit-defconfig.patch new file mode 100644 index 00000000..e6cc8814 --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/linux/files/remove-Altivec-from-T1040-64-bit-defconfig.patch @@ -0,0 +1,27 @@ +From e018761d719e41e3bf108cafafcb5138527752e2 Mon Sep 17 00:00:00 2001 +From: Bob Cochran +Date: Fri, 31 Oct 2014 16:49:57 -0400 +Subject: [meta-fsl-ppc][PATCH] linux-qoriq: Remove Altivec from T1040 64-bit defconfig + +T1040 uses an E5500 processor, and E5500 doesn't have an Altivec unit + +Signed-off-by: Bob Cochran +--- + arch/powerpc/configs/t1040_64bit_smp_defconfig | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/arch/powerpc/configs/t1040_64bit_smp_defconfig b/arch/powerpc/configs/t1040_64bit_smp_defconfig +index 1b987d9..c2005f2 100644 +--- a/arch/powerpc/configs/t1040_64bit_smp_defconfig ++++ b/arch/powerpc/configs/t1040_64bit_smp_defconfig +@@ -1,6 +1,6 @@ + CONFIG_PPC64=y + CONFIG_PPC_BOOK3E_64=y +-CONFIG_ALTIVEC=y ++# CONFIG_ALTIVEC is not set + CONFIG_SMP=y + CONFIG_NR_CPUS=24 + CONFIG_SYSVIPC=y +-- +1.7.9.5 + diff --git a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq_3.12.bb b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq_3.12.bb index 39270d48..a9f7fa74 100644 --- a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq_3.12.bb +++ b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq_3.12.bb @@ -5,6 +5,7 @@ SRC_URI = "git://git.freescale.com/ppc/sdk/linux.git;nobranch=1 \ file://Fix-for-CVE-2014-5045-fs-umount-on-symlink-leak.patch \ file://Fix-CVE-2014-5077-sctp-inherit-auth-capable-on-INIT-collisions.patch \ file://Fix-CVE-2014-5471_CVE-2014-5472.patch \ + file://remove-Altivec-from-T1040-64-bit-defconfig.patch \ " SRCREV = "c29fe1a733308cbe592b3af054a97be1b91cf2dd" -- cgit v1.2.3-54-g00ecf From 7b5ff091ee7d1c0f22b6edbf5ba3ed85439bbb23 Mon Sep 17 00:00:00 2001 From: Bob Cochran Date: Thu, 13 Nov 2014 22:56:20 -0500 Subject: linux-qoriq: Configure T1040 for FMAN V3 Although the flag existed in Kconfig for FMAN_V3L, it was not set by default. Also, the T1040 and FMAN V3L only support four O/H ports, so remove the last two from the DTS files. Otherwise, MAJOR FM Errors will be reported during FMAN probing / init. This was tested on t1040rdb-64b Signed-off-by: Bob Cochran --- .../linux/files/configure-T1040-for-FMAN-V3L.patch | 217 +++++++++++++++++++++ .../recipes-kernel/linux/linux-qoriq_3.12.bb | 1 + 2 files changed, 218 insertions(+) create mode 100644 meta-fsl-ppc/recipes-kernel/linux/files/configure-T1040-for-FMAN-V3L.patch diff --git a/meta-fsl-ppc/recipes-kernel/linux/files/configure-T1040-for-FMAN-V3L.patch b/meta-fsl-ppc/recipes-kernel/linux/files/configure-T1040-for-FMAN-V3L.patch new file mode 100644 index 00000000..9c7ab2a1 --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/linux/files/configure-T1040-for-FMAN-V3L.patch @@ -0,0 +1,217 @@ +From acbdc62578c0cde48847a306a0d02a26d3a9ea8a Mon Sep 17 00:00:00 2001 +From: Bob Cochran +Date: Fri, 31 Oct 2014 22:50:19 -0400 +Subject: [meta-fsl-ppc][PATCH] linux-qoriq: Configure T1040 for FMAN V3L + +Although the flag existed in Kconfig for FMAN_V3L, it was not set by +default. Also, the T1040 and FMAN V3L only support four O/H ports, so remove +the last two from the DTS files. Otherwise, MAJOR FM Errors will be +reported during FMAN probing / init. + +Signed-off-by: Bob Cochran +--- + arch/powerpc/boot/dts/fsl/qoriq-fman3l-0.dtsi | 138 ++++++++++++++++++++++++ + arch/powerpc/boot/dts/fsl/t1040si-post.dtsi | 10 +- + arch/powerpc/configs/t1040_32bit_smp_defconfig | 1 + + arch/powerpc/configs/t1040_64bit_smp_defconfig | 1 + + 4 files changed, 141 insertions(+), 9 deletions(-) + create mode 100644 arch/powerpc/boot/dts/fsl/qoriq-fman3l-0.dtsi + +diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3l-0.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman3l-0.dtsi +new file mode 100644 +index 0000000..b4f6cd6 +--- /dev/null ++++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3l-0.dtsi +@@ -0,0 +1,138 @@ ++/* ++ * QorIQ FMan v3 device tree stub [ controller @ offset 0x400000 ] ++ * ++ * Copyright 2012 Freescale Semiconductor Inc. ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions are met: ++ * * Redistributions of source code must retain the above copyright ++ * notice, this list of conditions and the following disclaimer. ++ * * 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. ++ * * Neither the name of Freescale Semiconductor nor the ++ * names of its contributors may be used to endorse or promote products ++ * derived from this software without specific prior written permission. ++ * ++ * ++ * ALTERNATIVELY, this software may be distributed under the terms of the ++ * GNU General Public License ("GPL") as published by the Free Software ++ * Foundation, either version 2 of that License or (at your option) any ++ * later version. ++ * ++ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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. ++ */ ++ ++fman0: fman@400000 { ++ #address-cells = <1>; ++ #size-cells = <1>; ++ cell-index = <0>; ++ compatible = "fsl,fman", "simple-bus"; ++ ranges = <0 0x400000 0x100000>; ++ reg = <0x400000 0x100000>; ++ clock-frequency = <0>; ++ interrupts = < ++ 96 2 0 0 ++ 16 2 1 1>; ++ ++ cc { ++ compatible = "fsl,fman-cc"; ++ }; ++ ++ muram@0 { ++ compatible = "fsl,fman-muram"; ++ reg = <0x0 0x60000>; ++ }; ++ ++ bmi@80000 { ++ compatible = "fsl,fman-bmi"; ++ reg = <0x80000 0x400>; ++ }; ++ ++ qmi@80400 { ++ compatible = "fsl,fman-qmi"; ++ reg = <0x80400 0x400>; ++ }; ++ ++ fman0_oh1: port@82000 { ++ cell-index = <0>; ++ compatible = "fsl,fman-port-oh"; ++ reg = <0x82000 0x1000>; ++ }; ++ ++ fman0_oh2: port@83000 { ++ cell-index = <1>; ++ compatible = "fsl,fman-port-oh"; ++ reg = <0x83000 0x1000>; ++ }; ++ ++ fman0_oh3: port@84000 { ++ cell-index = <2>; ++ compatible = "fsl,fman-port-oh"; ++ reg = <0x84000 0x1000>; ++ }; ++ ++ fman0_oh4: port@85000 { ++ cell-index = <3>; ++ compatible = "fsl,fman-port-oh"; ++ reg = <0x85000 0x1000>; ++ }; ++ ++ policer@c0000 { ++ compatible = "fsl,fman-policer"; ++ reg = <0xc0000 0x1000>; ++ }; ++ ++ keygen@c1000 { ++ compatible = "fsl,fman-keygen"; ++ reg = <0xc1000 0x1000>; ++ }; ++ ++ dma@c2000 { ++ compatible = "fsl,fman-dma"; ++ reg = <0xc2000 0x1000>; ++ }; ++ ++ fpm@c3000 { ++ compatible = "fsl,fman-fpm"; ++ reg = <0xc3000 0x1000>; ++ }; ++ ++ parser@c7000 { ++ compatible = "fsl,fman-parser"; ++ reg = <0xc7000 0x1000>; ++ }; ++ ++ vsps@dc000 { ++ compatible = "fsl,fman-vsps"; ++ reg = <0xdc000 0x1000>; ++ }; ++ ++ mdio@fc000 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ compatible = "fsl,fman-memac-mdio"; ++ reg = <0xfc000 0x1000>; ++ }; ++ ++ mdio@fd000 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ compatible = "fsl,fman-memac-mdio"; ++ reg = <0xfd000 0x1000>; ++ }; ++ ++ ptp_timer0: rtc@fe000 { ++ compatible = "fsl,fman-rtc"; ++ reg = <0xfe000 0x1000>; ++ }; ++}; +diff --git a/arch/powerpc/boot/dts/fsl/t1040si-post.dtsi b/arch/powerpc/boot/dts/fsl/t1040si-post.dtsi +index 75d7462..d391471 100644 +--- a/arch/powerpc/boot/dts/fsl/t1040si-post.dtsi ++++ b/arch/powerpc/boot/dts/fsl/t1040si-post.dtsi +@@ -584,7 +584,7 @@ sata@221000 { + /include/ "qoriq-pme-0.dtsi" + /include/ "qoriq-qman1.dtsi" + /include/ "qoriq-bman1.dtsi" +-/include/ "qoriq-fman3-0.dtsi" ++/include/ "qoriq-fman3l-0.dtsi" + /include/ "qoriq-fman3-0-1g-0.dtsi" + /include/ "qoriq-fman3-0-1g-1.dtsi" + /include/ "qoriq-fman3-0-1g-2.dtsi" +@@ -627,14 +627,6 @@ sata@221000 { + port@85000 { + fsl,qman-channel-id = <0x80c>; + }; +- /* offline - 5 */ +- port@86000 { +- fsl,qman-channel-id = <0x80d>; +- }; +- /* offline - 6 */ +- port@87000 { +- fsl,qman-channel-id = <0x80e>; +- }; + mdio@fd000 { + status = "disabled"; + }; +diff --git a/arch/powerpc/configs/t1040_32bit_smp_defconfig b/arch/powerpc/configs/t1040_32bit_smp_defconfig +index a401e7c..43bf3c78 100644 +--- a/arch/powerpc/configs/t1040_32bit_smp_defconfig ++++ b/arch/powerpc/configs/t1040_32bit_smp_defconfig +@@ -105,6 +105,7 @@ CONFIG_NETDEVICES=y + CONFIG_FSL_PQ_MDIO=y + CONFIG_FSL_XGMAC_MDIO=y + CONFIG_FMAN_T4240=y ++CONFIG_FMAN_V3L=y + CONFIG_FSL_DPAA_ETH=y + CONFIG_E1000=y + CONFIG_E1000E=y +diff --git a/arch/powerpc/configs/t1040_64bit_smp_defconfig b/arch/powerpc/configs/t1040_64bit_smp_defconfig +index c2005f2..99c05a5 100644 +--- a/arch/powerpc/configs/t1040_64bit_smp_defconfig ++++ b/arch/powerpc/configs/t1040_64bit_smp_defconfig +@@ -111,6 +111,7 @@ CONFIG_DUMMY=y + CONFIG_FSL_PQ_MDIO=y + CONFIG_FSL_XGMAC_MDIO=y + CONFIG_FMAN_T4240=y ++CONFIG_FMAN_V3L=y + CONFIG_FSL_DPAA_ETH=y + CONFIG_E1000E=y + CONFIG_VITESSE_PHY=y +-- +1.7.9.5 diff --git a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq_3.12.bb b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq_3.12.bb index a9f7fa74..39c4a7b9 100644 --- a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq_3.12.bb +++ b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq_3.12.bb @@ -6,6 +6,7 @@ SRC_URI = "git://git.freescale.com/ppc/sdk/linux.git;nobranch=1 \ file://Fix-CVE-2014-5077-sctp-inherit-auth-capable-on-INIT-collisions.patch \ file://Fix-CVE-2014-5471_CVE-2014-5472.patch \ file://remove-Altivec-from-T1040-64-bit-defconfig.patch \ + file://configure-T1040-for-FMAN-V3L.patch \ " SRCREV = "c29fe1a733308cbe592b3af054a97be1b91cf2dd" -- cgit v1.2.3-54-g00ecf From 770d5e33066b1f16ac060011d861843c079de16a Mon Sep 17 00:00:00 2001 From: Bob Cochran Date: Thu, 13 Nov 2014 23:05:20 -0500 Subject: linux-qoriq: change defconfig for T1040 to match number of cpus Having a number higher than necessary for NR_CPUS wastes memory by instantiating unnecessary structures in RAM. An example is in the DPAA where DPAA_ETH_TX_QUEUES is defined based on NR_CPUS and used to create dozens of extra qman_fq structures. Using the prior value of 24, which was left over from the T4240 created an additonal 60 frame queue structures alone. This has been tested on t1040rdb-64b. Signed-off-by: Bob Cochran --- .../files/modify-defconfig-t1040-nr-cpus.patch | 47 ++++++++++++++++++++++ .../recipes-kernel/linux/linux-qoriq_3.12.bb | 1 + 2 files changed, 48 insertions(+) create mode 100644 meta-fsl-ppc/recipes-kernel/linux/files/modify-defconfig-t1040-nr-cpus.patch diff --git a/meta-fsl-ppc/recipes-kernel/linux/files/modify-defconfig-t1040-nr-cpus.patch b/meta-fsl-ppc/recipes-kernel/linux/files/modify-defconfig-t1040-nr-cpus.patch new file mode 100644 index 00000000..7b4b39cc --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/linux/files/modify-defconfig-t1040-nr-cpus.patch @@ -0,0 +1,47 @@ +From 8545129540a5862b22aad03badb2a9f93bf29117 Mon Sep 17 00:00:00 2001 +From: Bob Cochran +Date: Mon, 3 Nov 2014 22:45:35 -0500 +Subject: [meta-fsl-ppc][PATCH] linux-qoriq: Change defconfig for T1040 to + match number of CPUS + +Having a number higher than necessary for NR_CPUS wastes memory by +instantiating unnecessary structures in RAM. An example is in the DPAA where +DPAA_ETH_TX_QUEUES is defined based on NR_CPUS and used to create +dozens of extra qman_fq structures. Using the prior value of 24, which was +left over from the T4240 created an additonal 60 frame queue structures alone. + +This has been tested on t1040rdb-64b. . + +Signed-off-by: Bob Cochran +--- + arch/powerpc/configs/t1040_32bit_smp_defconfig | 2 +- + arch/powerpc/configs/t1040_64bit_smp_defconfig | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/arch/powerpc/configs/t1040_32bit_smp_defconfig b/arch/powerpc/configs/t1040_32bit_smp_defconfig +index a401e7c..5542248 100644 +--- a/arch/powerpc/configs/t1040_32bit_smp_defconfig ++++ b/arch/powerpc/configs/t1040_32bit_smp_defconfig +@@ -1,6 +1,6 @@ + CONFIG_PPC_85xx=y + CONFIG_SMP=y +-CONFIG_NR_CPUS=8 ++CONFIG_NR_CPUS=4 + CONFIG_EXPERIMENTAL=y + CONFIG_SYSVIPC=y + CONFIG_POSIX_MQUEUE=y +diff --git a/arch/powerpc/configs/t1040_64bit_smp_defconfig b/arch/powerpc/configs/t1040_64bit_smp_defconfig +index 1b987d9..bc0dacf 100644 +--- a/arch/powerpc/configs/t1040_64bit_smp_defconfig ++++ b/arch/powerpc/configs/t1040_64bit_smp_defconfig +@@ -2,7 +2,7 @@ CONFIG_PPC64=y + CONFIG_PPC_BOOK3E_64=y + CONFIG_ALTIVEC=y + CONFIG_SMP=y +-CONFIG_NR_CPUS=24 ++CONFIG_NR_CPUS=4 + CONFIG_SYSVIPC=y + CONFIG_POSIX_MQUEUE=y + CONFIG_IRQ_DOMAIN_DEBUG=y +-- +1.7.9.5 diff --git a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq_3.12.bb b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq_3.12.bb index 39c4a7b9..5f9bc172 100644 --- a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq_3.12.bb +++ b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq_3.12.bb @@ -7,6 +7,7 @@ SRC_URI = "git://git.freescale.com/ppc/sdk/linux.git;nobranch=1 \ file://Fix-CVE-2014-5471_CVE-2014-5472.patch \ file://remove-Altivec-from-T1040-64-bit-defconfig.patch \ file://configure-T1040-for-FMAN-V3L.patch \ + file://modify-defconfig-t1040-nr-cpus.patch \ " SRCREV = "c29fe1a733308cbe592b3af054a97be1b91cf2dd" -- cgit v1.2.3-54-g00ecf From 4fe6e184396e83758b2b709c17674d97190972d8 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Mon, 5 Jan 2015 11:37:23 +0800 Subject: linux-qoriq: fix building using out-of-tree Signed-off-by: Ting Liu --- meta-fsl-ppc/recipes-kernel/linux/linux-qoriq.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq.inc b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq.inc index 9e463ddb..a832b46a 100644 --- a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq.inc +++ b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq.inc @@ -36,8 +36,8 @@ do_configure_prepend() { if [ -n "${SDK_VERSION}" ]; then sdkversion="-${SDK_VERSION}" fi - head=`git rev-parse --verify --short HEAD 2> /dev/null` - printf "%s%s%s" $sdkversion +g $head > ${S}/.scmversion + head=`git --git-dir=${S}/.git rev-parse --verify --short HEAD 2> /dev/null` + printf "%s%s%s" $sdkversion +g $head > ${B}/.scmversion fi } -- cgit v1.2.3-54-g00ecf From 217d739a6bed850b1ccf5b1d04eab44bdb0b2228 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Mon, 5 Jan 2015 18:32:19 +0800 Subject: dtc: old SRC_URI died, changing to new working one Signed-off-by: Ting Liu --- meta-fsl-ppc/recipes-virtualization/hypervisor/hypervisor_git.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-fsl-ppc/recipes-virtualization/hypervisor/hypervisor_git.bb b/meta-fsl-ppc/recipes-virtualization/hypervisor/hypervisor_git.bb index c2a5d2c0..fb76c7a3 100644 --- a/meta-fsl-ppc/recipes-virtualization/hypervisor/hypervisor_git.bb +++ b/meta-fsl-ppc/recipes-virtualization/hypervisor/hypervisor_git.bb @@ -14,7 +14,7 @@ SRC_URI = " \ git://git.freescale.com/ppc/sdk/hypervisor/hypervisor.git;name=hypervisor;nobranch=1 \ git://git.freescale.com/ppc/sdk/hypervisor/kconfig.git;name=kconfig;destsuffix=git/kconfig;nobranch=1 \ git://git.freescale.com/ppc/sdk/hypervisor/libos.git;name=libos;destsuffix=git/libos;nobranch=1 \ - git://www.jdl.com/software/dtc.git;name=dtc;destsuffix=dtc \ + git://git.kernel.org/pub/scm/utils/dtc/dtc.git;name=dtc;destsuffix=dtc \ git://git.freescale.com/ppc/sdk/hypertrk.git;name=hypertrk;destsuffix=git/hypertrk;nobranch=1 \ file://81-fsl-embedded-hv.rules \ " -- cgit v1.2.3-54-g00ecf From 2139b5324ecef4e5c9bc19ed5af9ce09411585a7 Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Mon, 5 Jan 2015 18:32:20 +0800 Subject: linux-qoriq: update revision to 6619b8b This update to fsl sdk v1.7 release. For detailed changes, see: http://git.freescale.com/git/cgit.cgi/ppc/sdk/linux.git/ Remove the patches which were applied in the repository. Signed-off-by: Zhenhua Luo --- .../linux/files/configure-T1040-for-FMAN-V3L.patch | 217 --------------------- .../files/modify-defconfig-t1040-nr-cpus.patch | 16 +- ...emove-Altivec-from-T1040-64-bit-defconfig.patch | 27 --- .../recipes-kernel/linux/linux-qoriq_3.12.bb | 4 +- 4 files changed, 9 insertions(+), 255 deletions(-) delete mode 100644 meta-fsl-ppc/recipes-kernel/linux/files/configure-T1040-for-FMAN-V3L.patch delete mode 100644 meta-fsl-ppc/recipes-kernel/linux/files/remove-Altivec-from-T1040-64-bit-defconfig.patch diff --git a/meta-fsl-ppc/recipes-kernel/linux/files/configure-T1040-for-FMAN-V3L.patch b/meta-fsl-ppc/recipes-kernel/linux/files/configure-T1040-for-FMAN-V3L.patch deleted file mode 100644 index 9c7ab2a1..00000000 --- a/meta-fsl-ppc/recipes-kernel/linux/files/configure-T1040-for-FMAN-V3L.patch +++ /dev/null @@ -1,217 +0,0 @@ -From acbdc62578c0cde48847a306a0d02a26d3a9ea8a Mon Sep 17 00:00:00 2001 -From: Bob Cochran -Date: Fri, 31 Oct 2014 22:50:19 -0400 -Subject: [meta-fsl-ppc][PATCH] linux-qoriq: Configure T1040 for FMAN V3L - -Although the flag existed in Kconfig for FMAN_V3L, it was not set by -default. Also, the T1040 and FMAN V3L only support four O/H ports, so remove -the last two from the DTS files. Otherwise, MAJOR FM Errors will be -reported during FMAN probing / init. - -Signed-off-by: Bob Cochran ---- - arch/powerpc/boot/dts/fsl/qoriq-fman3l-0.dtsi | 138 ++++++++++++++++++++++++ - arch/powerpc/boot/dts/fsl/t1040si-post.dtsi | 10 +- - arch/powerpc/configs/t1040_32bit_smp_defconfig | 1 + - arch/powerpc/configs/t1040_64bit_smp_defconfig | 1 + - 4 files changed, 141 insertions(+), 9 deletions(-) - create mode 100644 arch/powerpc/boot/dts/fsl/qoriq-fman3l-0.dtsi - -diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3l-0.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman3l-0.dtsi -new file mode 100644 -index 0000000..b4f6cd6 ---- /dev/null -+++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3l-0.dtsi -@@ -0,0 +1,138 @@ -+/* -+ * QorIQ FMan v3 device tree stub [ controller @ offset 0x400000 ] -+ * -+ * Copyright 2012 Freescale Semiconductor Inc. -+ * -+ * Redistribution and use in source and binary forms, with or without -+ * modification, are permitted provided that the following conditions are met: -+ * * Redistributions of source code must retain the above copyright -+ * notice, this list of conditions and the following disclaimer. -+ * * 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. -+ * * Neither the name of Freescale Semiconductor nor the -+ * names of its contributors may be used to endorse or promote products -+ * derived from this software without specific prior written permission. -+ * -+ * -+ * ALTERNATIVELY, this software may be distributed under the terms of the -+ * GNU General Public License ("GPL") as published by the Free Software -+ * Foundation, either version 2 of that License or (at your option) any -+ * later version. -+ * -+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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. -+ */ -+ -+fman0: fman@400000 { -+ #address-cells = <1>; -+ #size-cells = <1>; -+ cell-index = <0>; -+ compatible = "fsl,fman", "simple-bus"; -+ ranges = <0 0x400000 0x100000>; -+ reg = <0x400000 0x100000>; -+ clock-frequency = <0>; -+ interrupts = < -+ 96 2 0 0 -+ 16 2 1 1>; -+ -+ cc { -+ compatible = "fsl,fman-cc"; -+ }; -+ -+ muram@0 { -+ compatible = "fsl,fman-muram"; -+ reg = <0x0 0x60000>; -+ }; -+ -+ bmi@80000 { -+ compatible = "fsl,fman-bmi"; -+ reg = <0x80000 0x400>; -+ }; -+ -+ qmi@80400 { -+ compatible = "fsl,fman-qmi"; -+ reg = <0x80400 0x400>; -+ }; -+ -+ fman0_oh1: port@82000 { -+ cell-index = <0>; -+ compatible = "fsl,fman-port-oh"; -+ reg = <0x82000 0x1000>; -+ }; -+ -+ fman0_oh2: port@83000 { -+ cell-index = <1>; -+ compatible = "fsl,fman-port-oh"; -+ reg = <0x83000 0x1000>; -+ }; -+ -+ fman0_oh3: port@84000 { -+ cell-index = <2>; -+ compatible = "fsl,fman-port-oh"; -+ reg = <0x84000 0x1000>; -+ }; -+ -+ fman0_oh4: port@85000 { -+ cell-index = <3>; -+ compatible = "fsl,fman-port-oh"; -+ reg = <0x85000 0x1000>; -+ }; -+ -+ policer@c0000 { -+ compatible = "fsl,fman-policer"; -+ reg = <0xc0000 0x1000>; -+ }; -+ -+ keygen@c1000 { -+ compatible = "fsl,fman-keygen"; -+ reg = <0xc1000 0x1000>; -+ }; -+ -+ dma@c2000 { -+ compatible = "fsl,fman-dma"; -+ reg = <0xc2000 0x1000>; -+ }; -+ -+ fpm@c3000 { -+ compatible = "fsl,fman-fpm"; -+ reg = <0xc3000 0x1000>; -+ }; -+ -+ parser@c7000 { -+ compatible = "fsl,fman-parser"; -+ reg = <0xc7000 0x1000>; -+ }; -+ -+ vsps@dc000 { -+ compatible = "fsl,fman-vsps"; -+ reg = <0xdc000 0x1000>; -+ }; -+ -+ mdio@fc000 { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ compatible = "fsl,fman-memac-mdio"; -+ reg = <0xfc000 0x1000>; -+ }; -+ -+ mdio@fd000 { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ compatible = "fsl,fman-memac-mdio"; -+ reg = <0xfd000 0x1000>; -+ }; -+ -+ ptp_timer0: rtc@fe000 { -+ compatible = "fsl,fman-rtc"; -+ reg = <0xfe000 0x1000>; -+ }; -+}; -diff --git a/arch/powerpc/boot/dts/fsl/t1040si-post.dtsi b/arch/powerpc/boot/dts/fsl/t1040si-post.dtsi -index 75d7462..d391471 100644 ---- a/arch/powerpc/boot/dts/fsl/t1040si-post.dtsi -+++ b/arch/powerpc/boot/dts/fsl/t1040si-post.dtsi -@@ -584,7 +584,7 @@ sata@221000 { - /include/ "qoriq-pme-0.dtsi" - /include/ "qoriq-qman1.dtsi" - /include/ "qoriq-bman1.dtsi" --/include/ "qoriq-fman3-0.dtsi" -+/include/ "qoriq-fman3l-0.dtsi" - /include/ "qoriq-fman3-0-1g-0.dtsi" - /include/ "qoriq-fman3-0-1g-1.dtsi" - /include/ "qoriq-fman3-0-1g-2.dtsi" -@@ -627,14 +627,6 @@ sata@221000 { - port@85000 { - fsl,qman-channel-id = <0x80c>; - }; -- /* offline - 5 */ -- port@86000 { -- fsl,qman-channel-id = <0x80d>; -- }; -- /* offline - 6 */ -- port@87000 { -- fsl,qman-channel-id = <0x80e>; -- }; - mdio@fd000 { - status = "disabled"; - }; -diff --git a/arch/powerpc/configs/t1040_32bit_smp_defconfig b/arch/powerpc/configs/t1040_32bit_smp_defconfig -index a401e7c..43bf3c78 100644 ---- a/arch/powerpc/configs/t1040_32bit_smp_defconfig -+++ b/arch/powerpc/configs/t1040_32bit_smp_defconfig -@@ -105,6 +105,7 @@ CONFIG_NETDEVICES=y - CONFIG_FSL_PQ_MDIO=y - CONFIG_FSL_XGMAC_MDIO=y - CONFIG_FMAN_T4240=y -+CONFIG_FMAN_V3L=y - CONFIG_FSL_DPAA_ETH=y - CONFIG_E1000=y - CONFIG_E1000E=y -diff --git a/arch/powerpc/configs/t1040_64bit_smp_defconfig b/arch/powerpc/configs/t1040_64bit_smp_defconfig -index c2005f2..99c05a5 100644 ---- a/arch/powerpc/configs/t1040_64bit_smp_defconfig -+++ b/arch/powerpc/configs/t1040_64bit_smp_defconfig -@@ -111,6 +111,7 @@ CONFIG_DUMMY=y - CONFIG_FSL_PQ_MDIO=y - CONFIG_FSL_XGMAC_MDIO=y - CONFIG_FMAN_T4240=y -+CONFIG_FMAN_V3L=y - CONFIG_FSL_DPAA_ETH=y - CONFIG_E1000E=y - CONFIG_VITESSE_PHY=y --- -1.7.9.5 diff --git a/meta-fsl-ppc/recipes-kernel/linux/files/modify-defconfig-t1040-nr-cpus.patch b/meta-fsl-ppc/recipes-kernel/linux/files/modify-defconfig-t1040-nr-cpus.patch index 7b4b39cc..635c2bb5 100644 --- a/meta-fsl-ppc/recipes-kernel/linux/files/modify-defconfig-t1040-nr-cpus.patch +++ b/meta-fsl-ppc/recipes-kernel/linux/files/modify-defconfig-t1040-nr-cpus.patch @@ -14,14 +14,14 @@ This has been tested on t1040rdb-64b. . Signed-off-by: Bob Cochran --- - arch/powerpc/configs/t1040_32bit_smp_defconfig | 2 +- - arch/powerpc/configs/t1040_64bit_smp_defconfig | 2 +- + arch/powerpc/configs/corenet32_fmanv3_smp_defconfig | 2 +- + arch/powerpc/configs/corenet64_fmanv3_smp_defconfig | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) -diff --git a/arch/powerpc/configs/t1040_32bit_smp_defconfig b/arch/powerpc/configs/t1040_32bit_smp_defconfig +diff --git a/arch/powerpc/configs/corenet32_fmanv3_smp_defconfig b/arch/powerpc/configs/corenet32_fmanv3_smp_defconfig index a401e7c..5542248 100644 ---- a/arch/powerpc/configs/t1040_32bit_smp_defconfig -+++ b/arch/powerpc/configs/t1040_32bit_smp_defconfig +--- a/arch/powerpc/configs/corenet32_fmanv3_smp_defconfig ++++ b/arch/powerpc/configs/corenet32_fmanv3_smp_defconfig @@ -1,6 +1,6 @@ CONFIG_PPC_85xx=y CONFIG_SMP=y @@ -30,10 +30,10 @@ index a401e7c..5542248 100644 CONFIG_EXPERIMENTAL=y CONFIG_SYSVIPC=y CONFIG_POSIX_MQUEUE=y -diff --git a/arch/powerpc/configs/t1040_64bit_smp_defconfig b/arch/powerpc/configs/t1040_64bit_smp_defconfig +diff --git a/arch/powerpc/configs/corenet64_fmanv3_smp_defconfig b/arch/powerpc/configs/corenet64_fmanv3_smp_defconfig index 1b987d9..bc0dacf 100644 ---- a/arch/powerpc/configs/t1040_64bit_smp_defconfig -+++ b/arch/powerpc/configs/t1040_64bit_smp_defconfig +--- a/arch/powerpc/configs/corenet64_fmanv3_smp_defconfig ++++ b/arch/powerpc/configs/corenet64_fmanv3_smp_defconfig @@ -2,7 +2,7 @@ CONFIG_PPC64=y CONFIG_PPC_BOOK3E_64=y CONFIG_ALTIVEC=y diff --git a/meta-fsl-ppc/recipes-kernel/linux/files/remove-Altivec-from-T1040-64-bit-defconfig.patch b/meta-fsl-ppc/recipes-kernel/linux/files/remove-Altivec-from-T1040-64-bit-defconfig.patch deleted file mode 100644 index e6cc8814..00000000 --- a/meta-fsl-ppc/recipes-kernel/linux/files/remove-Altivec-from-T1040-64-bit-defconfig.patch +++ /dev/null @@ -1,27 +0,0 @@ -From e018761d719e41e3bf108cafafcb5138527752e2 Mon Sep 17 00:00:00 2001 -From: Bob Cochran -Date: Fri, 31 Oct 2014 16:49:57 -0400 -Subject: [meta-fsl-ppc][PATCH] linux-qoriq: Remove Altivec from T1040 64-bit defconfig - -T1040 uses an E5500 processor, and E5500 doesn't have an Altivec unit - -Signed-off-by: Bob Cochran ---- - arch/powerpc/configs/t1040_64bit_smp_defconfig | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/arch/powerpc/configs/t1040_64bit_smp_defconfig b/arch/powerpc/configs/t1040_64bit_smp_defconfig -index 1b987d9..c2005f2 100644 ---- a/arch/powerpc/configs/t1040_64bit_smp_defconfig -+++ b/arch/powerpc/configs/t1040_64bit_smp_defconfig -@@ -1,6 +1,6 @@ - CONFIG_PPC64=y - CONFIG_PPC_BOOK3E_64=y --CONFIG_ALTIVEC=y -+# CONFIG_ALTIVEC is not set - CONFIG_SMP=y - CONFIG_NR_CPUS=24 - CONFIG_SYSVIPC=y --- -1.7.9.5 - diff --git a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq_3.12.bb b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq_3.12.bb index 5f9bc172..a5902311 100644 --- a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq_3.12.bb +++ b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq_3.12.bb @@ -5,9 +5,7 @@ SRC_URI = "git://git.freescale.com/ppc/sdk/linux.git;nobranch=1 \ file://Fix-for-CVE-2014-5045-fs-umount-on-symlink-leak.patch \ file://Fix-CVE-2014-5077-sctp-inherit-auth-capable-on-INIT-collisions.patch \ file://Fix-CVE-2014-5471_CVE-2014-5472.patch \ - file://remove-Altivec-from-T1040-64-bit-defconfig.patch \ - file://configure-T1040-for-FMAN-V3L.patch \ file://modify-defconfig-t1040-nr-cpus.patch \ " -SRCREV = "c29fe1a733308cbe592b3af054a97be1b91cf2dd" +SRCREV = "6619b8b55796cdf0cec04b66a71288edd3057229" -- cgit v1.2.3-54-g00ecf From 3656a2c2ebae75c1112c9ab545b209a07f12292c Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Mon, 5 Jan 2015 18:32:21 +0800 Subject: u-boot: upgrade to 2014.07 with revision 659b6a2 This updates u-boot to sdk v1.7 release which was based on 2014.07. For detailed changes, see: http://git.freescale.com/git/cgit.cgi/ppc/sdk/u-boot.git/ Signed-off-by: Zhenhua Luo --- .../recipes-bsp/u-boot/u-boot-qoriq_2014.01.bb | 179 ------------------- .../recipes-bsp/u-boot/u-boot-qoriq_2014.07.bb | 193 +++++++++++++++++++++ 2 files changed, 193 insertions(+), 179 deletions(-) delete mode 100644 meta-fsl-ppc/recipes-bsp/u-boot/u-boot-qoriq_2014.01.bb create mode 100644 meta-fsl-ppc/recipes-bsp/u-boot/u-boot-qoriq_2014.07.bb diff --git a/meta-fsl-ppc/recipes-bsp/u-boot/u-boot-qoriq_2014.01.bb b/meta-fsl-ppc/recipes-bsp/u-boot/u-boot-qoriq_2014.01.bb deleted file mode 100644 index e16438f1..00000000 --- a/meta-fsl-ppc/recipes-bsp/u-boot/u-boot-qoriq_2014.01.bb +++ /dev/null @@ -1,179 +0,0 @@ -DESCRIPTION = "U-boot bootloader" -HOMEPAGE = "http://u-boot.sf.net" -SECTION = "bootloaders" -PROVIDES = "virtual/bootloader u-boot" -LICENSE = "GPLv2 & BSD-3-Clause & BSD-2-Clause & LGPL-2.0 & LGPL-2.1" -LIC_FILES_CHKSUM = " \ - file://Licenses/gpl-2.0.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - file://Licenses/bsd-2-clause.txt;md5=6a31f076f5773aabd8ff86191ad6fdd5 \ - file://Licenses/bsd-3-clause.txt;md5=4a1190eac56a9db675d58ebe86eaf50c \ - file://Licenses/lgpl-2.0.txt;md5=5f30f0716dfdd0d91eb439ebec522ec2 \ - file://Licenses/lgpl-2.1.txt;md5=4fbd65380cdd255951079008b364516c \ -" - -PV = "2014.01+fslgit" -INHIBIT_DEFAULT_DEPS = "1" -DEPENDS = "boot-format-native libgcc ${@base_contains('TCMODE', 'external-fsl', '', 'virtual/${TARGET_PREFIX}gcc', d)}" - -inherit deploy - -SRC_URI = "git://git.freescale.com/ppc/sdk/u-boot.git;nobranch=1" -SRCREV = "fe1d4f5739e752ad45ada6227a9fb19590af7194" - -python () { - if d.getVar("TCMODE", True) == "external-fsl": - return - - ml = d.getVar("MULTILIB_VARIANTS", True) - arch = d.getVar("OVERRIDES", True) - - if ("e5500-64b:" in arch or "e6500-64b:" in arch) and not "lib32" in ml: - raise bb.parse.SkipPackage("Building the u-boot for this arch requires multilib to be enabled") -} - -DEPENDS_append_e5500-64b = "${@base_contains('TCMODE', 'external-fsl', '', ' lib32-gcc-cross-powerpc lib32-libgcc', d)}" -PATH_append_e5500-64b = ":${STAGING_BINDIR_NATIVE}/powerpc${TARGET_VENDOR_virtclass-multilib-lib32}-${HOST_OS}/" -TOOLCHAIN_OPTIONS_append_e5500-64b = "${@base_contains('TCMODE', 'external-fsl', '', '/../lib32-${MACHINE}', d)}" -TARGET_VENDOR_virtclass-multilib-lib32 ?= "${@base_contains('TCMODE', 'external-fsl', '', '-${DISTRO}mllib32', d)}" -WRAP_TARGET_PREFIX_e5500-64b := "powerpc${TARGET_VENDOR_virtclass-multilib-lib32}-${HOST_OS}-" - -DEPENDS_append_e6500-64b = "${@base_contains('TCMODE', 'external-fsl', '', ' lib32-gcc-cross-powerpc lib32-libgcc', d)}" -PATH_append_e6500-64b = ":${STAGING_BINDIR_NATIVE}/powerpc${TARGET_VENDOR_virtclass-multilib-lib32}-${HOST_OS}/" -TOOLCHAIN_OPTIONS_append_e6500-64b = "${@base_contains('TCMODE', 'external-fsl', '', '/../lib32-${MACHINE}', d)}" -TARGET_VENDOR_virtclass-multilib-lib32 ?= "${@base_contains('TCMODE', 'external-fsl', '', '-${DISTRO}mllib32', d)}" -WRAP_TARGET_PREFIX_e6500-64b := "powerpc${TARGET_VENDOR_virtclass-multilib-lib32}-${HOST_OS}-" -WRAP_TARGET_PREFIX = "${TARGET_PREFIX}" - -PACKAGE_ARCH = "${MACHINE_ARCH}" - -UBOOT_LOCALVERSION = "${@d.getVar('SDK_VERSION', True).partition(' ')[0]}" - -USRC ?= "" -S = '${@base_conditional("USRC", "", "${WORKDIR}/git", "${USRC}", d)}' - -CROSS_COMPILE = '${@base_conditional("TCMODE", "external-fsl", "${TARGET_PREFIX}", "${WRAP_TARGET_PREFIX}", d)}' -EXTRA_OEMAKE = 'CROSS_COMPILE=${CROSS_COMPILE} CC="${CROSS_COMPILE}gcc ${TOOLCHAIN_OPTIONS}"' - -do_compile () { - unset LDFLAGS - unset CFLAGS - unset CPPFLAGS - - if [ ! -e ${B}/.scmversion -a ! -e ${S}/.scmversion ] - then - head=`git rev-parse --verify --short HEAD 2> /dev/null` - printf "%s%s%s" ${UBOOT_LOCALVERSION} +g $head > ${B}/.scmversion - printf "%s%s%s" ${UBOOT_LOCALVERSION} +g $head > ${S}/.scmversion - fi - - if [ "x${UBOOT_MACHINES}" = "x" ]; then - UBOOT_MACHINES=${UBOOT_MACHINE} - fi - - for board in ${UBOOT_MACHINES}; do - if ! grep -wq $board ${S}/boards.cfg;then - echo "WARNING: $board not supported in boards.cfg" - continue - fi - - oe_runmake O=${board} distclean - oe_runmake O=${board} ${board} - oe_runmake O=${board} all - - case "${board}" in - *SDCARD*) UBOOT_TARGET="u-boot-sd";; - *SPIFLASH*) UBOOT_TARGET="u-boot-spi";; - *NAND*) UBOOT_TARGET="u-boot-nand";; - *SRIO*) UBOOT_TARGET="u-boot-srio";; - *) UBOOT_TARGET="";; - esac - - # deal with sd/spi/nand/srio image - UBOOT_SOURCE=u-boot - if [ "x${UBOOT_TARGET}" != "x" ]; then - # some boards' nand image was named as u-boot-with-spl - if [ "${UBOOT_TARGET}" = "u-boot-nand" ];then - if echo $board |egrep -q "(P1010RDB|P1020RDB|P1021RDB|P2020RDB|P1022DS|BSC913|C293)";then - UBOOT_SOURCE=u-boot-with-spl - fi - elif [ "${UBOOT_TARGET}" = "u-boot-spi" ];then - if echo $board |egrep -q "(P1010RDB|P1020RDB|P1021RDB|P2020RDB|P1022DS)";then - UBOOT_SOURCE=u-boot-with-spl - fi - elif [ "${UBOOT_TARGET}" = "u-boot-sd" ];then - if echo $board |egrep -q "(P1010RDB|P1020RDB|P1021RDB|P2020RDB|P1022DS)";then - UBOOT_SOURCE=u-boot-with-spl - fi - fi - cp ${S}/${board}/${UBOOT_SOURCE}.bin ${S}/${board}/${UBOOT_TARGET}.bin - - # use boot-format to regenerate spi image if BOOTFORMAT_CONFIG is not empty - if [ "${UBOOT_TARGET}" = "u-boot-spi" ] && [ -n "${BOOTFORMAT_CONFIG}" ];then - ${STAGING_BINDIR_NATIVE}/boot_format \ - ${STAGING_DATADIR_NATIVE}/boot_format/${BOOTFORMAT_CONFIG} \ - ${S}/${board}/${UBOOT_SOURCE}.bin -spi ${S}/${board}/${UBOOT_TARGET}.bin - fi - fi - done -} - -do_install(){ - if [ "x${UBOOT_MACHINES}" = "x" ]; then - UBOOT_MACHINES=${UBOOT_MACHINE} - fi - - for board in ${UBOOT_MACHINES}; do - if ! grep -wq $board ${S}/boards.cfg;then - continue - fi - - case "${board}" in - *SDCARD*) UBOOT_TARGET="u-boot-sd";; - *SPIFLASH*) UBOOT_TARGET="u-boot-spi";; - *NAND*) UBOOT_TARGET="u-boot-nand";; - *SRIO*) UBOOT_TARGET="u-boot-srio";; - *) UBOOT_TARGET="u-boot";; - esac - - if [ -f ${S}/${board}/${UBOOT_TARGET}.bin ]; then - mkdir -p ${D}/boot/ - install ${S}/${board}/${UBOOT_TARGET}.bin ${D}/boot/${UBOOT_TARGET}-${board}-${PV}-${PR}.bin - ln -sf ${UBOOT_TARGET}-${board}-${PV}-${PR}.bin ${D}/boot/${UBOOT_TARGET}.bin - fi - done -} - -do_deploy(){ - if [ "x${UBOOT_MACHINES}" = "x" ]; then - UBOOT_MACHINES=${UBOOT_MACHINE} - fi - - for board in ${UBOOT_MACHINES}; do - if ! grep -wq $board ${S}/boards.cfg;then - continue - fi - - case "${board}" in - *SDCARD*) UBOOT_TARGET="u-boot-sd";; - *SPIFLASH*) UBOOT_TARGET="u-boot-spi";; - *NAND*) UBOOT_TARGET="u-boot-nand";; - *SRIO*) UBOOT_TARGET="u-boot-srio";; - *) UBOOT_TARGET="u-boot";; - esac - - if [ -f ${S}/${board}/${UBOOT_TARGET}.bin ]; then - mkdir -p ${DEPLOYDIR} - install ${S}/${board}/${UBOOT_TARGET}.bin ${DEPLOYDIR}/${UBOOT_TARGET}-${board}-${PV}-${PR}.bin - - cd ${DEPLOYDIR} - rm -f ${UBOOT_TARGET}-${board}.bin - ln -sf ${UBOOT_TARGET}-${board}-${PV}-${PR}.bin ${UBOOT_TARGET}-${board}.bin - fi - done -} -addtask deploy after do_install - -PACKAGES += "${PN}-images" -FILES_${PN}-images += "/boot" - -ALLOW_EMPTY_${PN} = "1" diff --git a/meta-fsl-ppc/recipes-bsp/u-boot/u-boot-qoriq_2014.07.bb b/meta-fsl-ppc/recipes-bsp/u-boot/u-boot-qoriq_2014.07.bb new file mode 100644 index 00000000..4a1b9081 --- /dev/null +++ b/meta-fsl-ppc/recipes-bsp/u-boot/u-boot-qoriq_2014.07.bb @@ -0,0 +1,193 @@ +DESCRIPTION = "U-boot bootloader" +HOMEPAGE = "http://u-boot.sf.net" +SECTION = "bootloaders" +PROVIDES = "virtual/bootloader u-boot" +LICENSE = "GPLv2 & BSD-3-Clause & BSD-2-Clause & LGPL-2.0 & LGPL-2.1" +LIC_FILES_CHKSUM = " \ + file://Licenses/gpl-2.0.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://Licenses/bsd-2-clause.txt;md5=6a31f076f5773aabd8ff86191ad6fdd5 \ + file://Licenses/bsd-3-clause.txt;md5=4a1190eac56a9db675d58ebe86eaf50c \ + file://Licenses/lgpl-2.0.txt;md5=5f30f0716dfdd0d91eb439ebec522ec2 \ + file://Licenses/lgpl-2.1.txt;md5=4fbd65380cdd255951079008b364516c \ +" + +PV = "2014.07+fslgit" +INHIBIT_DEFAULT_DEPS = "1" +DEPENDS = "boot-format-native libgcc ${@base_contains('TCMODE', 'external-fsl', '', 'virtual/${TARGET_PREFIX}gcc', d)}" + +inherit deploy + +SRC_URI = "git://git.freescale.com/ppc/sdk/u-boot.git;nobranch=1" +SRCREV = "659b6a23a8b1f3026200bc6352dbacef53f4dcb1" + +python () { + if d.getVar("TCMODE", True) == "external-fsl": + return + + ml = d.getVar("MULTILIB_VARIANTS", True) + arch = d.getVar("OVERRIDES", True) + + if ("e5500-64b:" in arch or "e6500-64b:" in arch) and not "lib32" in ml: + raise bb.parse.SkipPackage("Building the u-boot for this arch requires multilib to be enabled") +} + +DEPENDS_append_e5500-64b = "${@base_contains('TCMODE', 'external-fsl', '', ' lib32-gcc-cross-powerpc lib32-libgcc', d)}" +PATH_append_e5500-64b = ":${STAGING_BINDIR_NATIVE}/powerpc${TARGET_VENDOR_virtclass-multilib-lib32}-${HOST_OS}/" +TOOLCHAIN_OPTIONS_append_e5500-64b = "${@base_contains('TCMODE', 'external-fsl', '', '/../lib32-${MACHINE}', d)}" +TARGET_VENDOR_virtclass-multilib-lib32 ?= "${@base_contains('TCMODE', 'external-fsl', '', '-${DISTRO}mllib32', d)}" +WRAP_TARGET_PREFIX_e5500-64b := "powerpc${TARGET_VENDOR_virtclass-multilib-lib32}-${HOST_OS}-" + +DEPENDS_append_e6500-64b = "${@base_contains('TCMODE', 'external-fsl', '', ' lib32-gcc-cross-powerpc lib32-libgcc', d)}" +PATH_append_e6500-64b = ":${STAGING_BINDIR_NATIVE}/powerpc${TARGET_VENDOR_virtclass-multilib-lib32}-${HOST_OS}/" +TOOLCHAIN_OPTIONS_append_e6500-64b = "${@base_contains('TCMODE', 'external-fsl', '', '/../lib32-${MACHINE}', d)}" +TARGET_VENDOR_virtclass-multilib-lib32 ?= "${@base_contains('TCMODE', 'external-fsl', '', '-${DISTRO}mllib32', d)}" +WRAP_TARGET_PREFIX_e6500-64b := "powerpc${TARGET_VENDOR_virtclass-multilib-lib32}-${HOST_OS}-" +WRAP_TARGET_PREFIX = "${TARGET_PREFIX}" + +PACKAGE_ARCH = "${MACHINE_ARCH}" + +UBOOT_LOCALVERSION = "${@d.getVar('SDK_VERSION', True).partition(' ')[0]}" + +USRC ?= "" +S = '${@base_conditional("USRC", "", "${WORKDIR}/git", "${USRC}", d)}' + +CROSS_COMPILE = '${@base_conditional("TCMODE", "external-fsl", "${TARGET_PREFIX}", "${WRAP_TARGET_PREFIX}", d)}' +EXTRA_OEMAKE = 'CROSS_COMPILE=${CROSS_COMPILE} CC="${CROSS_COMPILE}gcc ${TOOLCHAIN_OPTIONS}"' + +do_compile () { + unset LDFLAGS + unset CFLAGS + unset CPPFLAGS + + if [ ! -e ${B}/.scmversion -a ! -e ${S}/.scmversion ] + then + head=`git rev-parse --verify --short HEAD 2> /dev/null` + printf "%s%s%s" ${UBOOT_LOCALVERSION} +g $head > ${B}/.scmversion + printf "%s%s%s" ${UBOOT_LOCALVERSION} +g $head > ${S}/.scmversion + fi + + if [ "x${UBOOT_MACHINES}" = "x" ]; then + UBOOT_MACHINES=${UBOOT_MACHINE} + fi + + for board in ${UBOOT_MACHINES}; do + if ! grep -wq $board ${S}/boards.cfg;then + echo "WARNING: $board not supported in boards.cfg" + continue + fi + + oe_runmake O=${board} distclean + oe_runmake O=${board} ${board}_config + oe_runmake O=${board} all + + case "${board}" in + *SDCARD*) UBOOT_TARGET="u-boot-sd";; + *SPIFLASH*) UBOOT_TARGET="u-boot-spi";; + *NAND*) UBOOT_TARGET="u-boot-nand";; + *SRIO*) UBOOT_TARGET="u-boot-srio";; + *) UBOOT_TARGET="";; + esac + + # deal with sd/spi/nand/srio image + UBOOT_SOURCE=u-boot.bin + if [ "x${UBOOT_TARGET}" != "x" ] && echo $board |egrep -qi "SECBOOT|SECURE"; then + cp ${S}/${board}/${UBOOT_SOURCE} ${S}/${board}/${UBOOT_TARGET}.bin + elif [ "x${UBOOT_TARGET}" != "x" ]; then + # some boards' final binary was not named as u-boot.bin + if [ "${UBOOT_TARGET}" = "u-boot-nand" ];then + if echo $board |egrep -q "^(BSC|C29|P10|P2020RDB)";then + UBOOT_SOURCE=u-boot-with-spl.bin + elif echo $board |egrep -q "^(B4|T1|T2|T4)";then + UBOOT_SOURCE=u-boot-with-spl-pbl.bin + elif echo $board |egrep -q "^(P2041|P3|P4|P5)";then + UBOOT_SOURCE=u-boot.pbl + fi + elif [ "${UBOOT_TARGET}" = "u-boot-spi" ];then + if echo $board |egrep -q "^(P10|P2020RDB)";then + UBOOT_SOURCE=u-boot-with-spl.bin + elif echo $board |egrep -q "^(T1|T2)";then + UBOOT_SOURCE=u-boot-with-spl-pbl.bin + elif echo $board |egrep -q "^(B4|P2041|P3|P4|P5|T4)";then + UBOOT_SOURCE=u-boot.pbl + fi + elif [ "${UBOOT_TARGET}" = "u-boot-sd" ];then + if echo $board |egrep -q "^(P10|P2020RDB)";then + UBOOT_SOURCE=u-boot-with-spl.bin + elif echo $board |egrep -q "^(B4|T1|T2|T4)";then + UBOOT_SOURCE=u-boot-with-spl-pbl.bin + elif echo $board |egrep -q "^(P2041|P3|P4|P5)";then + UBOOT_SOURCE=u-boot.pbl + fi + fi + cp ${S}/${board}/${UBOOT_SOURCE} ${S}/${board}/${UBOOT_TARGET}.bin + + # use boot-format to regenerate spi image if BOOTFORMAT_CONFIG is not empty + if [ "${UBOOT_TARGET}" = "u-boot-spi" ] && [ -n "${BOOTFORMAT_CONFIG}" ];then + ${STAGING_BINDIR_NATIVE}/boot_format \ + ${STAGING_DATADIR_NATIVE}/boot_format/${BOOTFORMAT_CONFIG} \ + ${S}/${board}/${UBOOT_SOURCE} -spi ${S}/${board}/${UBOOT_TARGET}.bin + fi + fi + done +} + +do_install(){ + if [ "x${UBOOT_MACHINES}" = "x" ]; then + UBOOT_MACHINES=${UBOOT_MACHINE} + fi + + for board in ${UBOOT_MACHINES}; do + if ! grep -wq $board ${S}/boards.cfg;then + continue + fi + + case "${board}" in + *SDCARD*) UBOOT_TARGET="u-boot-sd";; + *SPIFLASH*) UBOOT_TARGET="u-boot-spi";; + *NAND*) UBOOT_TARGET="u-boot-nand";; + *SRIO*) UBOOT_TARGET="u-boot-srio";; + *) UBOOT_TARGET="u-boot";; + esac + + if [ -f ${S}/${board}/${UBOOT_TARGET}.bin ]; then + mkdir -p ${D}/boot/ + install ${S}/${board}/${UBOOT_TARGET}.bin ${D}/boot/${UBOOT_TARGET}-${board}-${PV}-${PR}.bin + ln -sf ${UBOOT_TARGET}-${board}-${PV}-${PR}.bin ${D}/boot/${UBOOT_TARGET}.bin + fi + done +} + +do_deploy(){ + if [ "x${UBOOT_MACHINES}" = "x" ]; then + UBOOT_MACHINES=${UBOOT_MACHINE} + fi + + for board in ${UBOOT_MACHINES}; do + if ! grep -wq $board ${S}/boards.cfg;then + continue + fi + + case "${board}" in + *SDCARD*) UBOOT_TARGET="u-boot-sd";; + *SPIFLASH*) UBOOT_TARGET="u-boot-spi";; + *NAND*) UBOOT_TARGET="u-boot-nand";; + *SRIO*) UBOOT_TARGET="u-boot-srio";; + *) UBOOT_TARGET="u-boot";; + esac + + if [ -f ${S}/${board}/${UBOOT_TARGET}.bin ]; then + mkdir -p ${DEPLOYDIR} + install ${S}/${board}/${UBOOT_TARGET}.bin ${DEPLOYDIR}/${UBOOT_TARGET}-${board}-${PV}-${PR}.bin + + cd ${DEPLOYDIR} + rm -f ${UBOOT_TARGET}-${board}.bin + ln -sf ${UBOOT_TARGET}-${board}-${PV}-${PR}.bin ${UBOOT_TARGET}-${board}.bin + fi + done +} +addtask deploy after do_install + +PACKAGES += "${PN}-images" +FILES_${PN}-images += "/boot" + +ALLOW_EMPTY_${PN} = "1" -- cgit v1.2.3-54-g00ecf From a10ab846ea22c423c24496c2768c8f745641399b Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Mon, 5 Jan 2015 18:32:23 +0800 Subject: rename t1042rdb -> t1042rdb-pi Current configuration of t1042rdb was targeted for printing market, rename it to t1042rdb-pi. Signed-off-by: Ting Liu --- meta-fsl-ppc/conf/machine/t1042rdb-64b.conf | 24 ------------------------ meta-fsl-ppc/conf/machine/t1042rdb-pi-64b.conf | 24 ++++++++++++++++++++++++ meta-fsl-ppc/conf/machine/t1042rdb-pi.conf | 23 +++++++++++++++++++++++ meta-fsl-ppc/conf/machine/t1042rdb.conf | 23 ----------------------- 4 files changed, 47 insertions(+), 47 deletions(-) delete mode 100644 meta-fsl-ppc/conf/machine/t1042rdb-64b.conf create mode 100644 meta-fsl-ppc/conf/machine/t1042rdb-pi-64b.conf create mode 100644 meta-fsl-ppc/conf/machine/t1042rdb-pi.conf delete mode 100644 meta-fsl-ppc/conf/machine/t1042rdb.conf diff --git a/meta-fsl-ppc/conf/machine/t1042rdb-64b.conf b/meta-fsl-ppc/conf/machine/t1042rdb-64b.conf deleted file mode 100644 index c3f78385..00000000 --- a/meta-fsl-ppc/conf/machine/t1042rdb-64b.conf +++ /dev/null @@ -1,24 +0,0 @@ -#@TYPE: Machine -#@NAME: Freescale T1042RDB -#@SOC: t1042 -#@DESCRIPTION: Machine configuration for running T1042RDB in 64-bit mode -#@MAINTAINER: Chunrong Guo - -require conf/machine/include/e5500-64b.inc - -SOC_FAMILY = "t1:t1042" -UBOOT_MACHINES ?= "T1042RDB_PI" -KERNEL_DEVICETREE ?= "t1042rdb_pi.dtb" -KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/t1040_64bit_smp_defconfig" - -JFFS2_ERASEBLOCK = "0x10000" - -PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xorg" -XSERVER = " \ - xserver-xorg \ - xf86-input-evdev \ - xf86-input-mouse \ - xf86-input-keyboard \ - xf86-video-fbdev \ -" - diff --git a/meta-fsl-ppc/conf/machine/t1042rdb-pi-64b.conf b/meta-fsl-ppc/conf/machine/t1042rdb-pi-64b.conf new file mode 100644 index 00000000..6ec34369 --- /dev/null +++ b/meta-fsl-ppc/conf/machine/t1042rdb-pi-64b.conf @@ -0,0 +1,24 @@ +#@TYPE: Machine +#@NAME: Freescale T1042RDB-PI +#@SOC: t1042 +#@DESCRIPTION: Machine configuration for running T1042RDB-PI in 64-bit mode +#@MAINTAINER: Chunrong Guo + +require conf/machine/include/e5500-64b.inc + +SOC_FAMILY = "t1:t1042" +UBOOT_MACHINES ?= "T1042RDB_PI" +KERNEL_DEVICETREE ?= "t1042rdb_pi.dtb" +KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/t1040_64bit_smp_defconfig" + +JFFS2_ERASEBLOCK = "0x10000" + +PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xorg" +XSERVER = " \ + xserver-xorg \ + xf86-input-evdev \ + xf86-input-mouse \ + xf86-input-keyboard \ + xf86-video-fbdev \ +" + diff --git a/meta-fsl-ppc/conf/machine/t1042rdb-pi.conf b/meta-fsl-ppc/conf/machine/t1042rdb-pi.conf new file mode 100644 index 00000000..fdd4d738 --- /dev/null +++ b/meta-fsl-ppc/conf/machine/t1042rdb-pi.conf @@ -0,0 +1,23 @@ +#@TYPE: Machine +#@NAME: Freescale T1042RDB-PI +#@SOC: t1042 +#@DESCRIPTION: Machine configuration for running T1042RDB-PI in 32-bit mode +#@MAINTAINER: Chunrong Guo + +require conf/machine/include/e5500.inc + +SOC_FAMILY = "t1:t1042" +UBOOT_MACHINES ?= "T1042RDB_PI" +KERNEL_DEVICETREE ?= "t1042rdb_pi.dtb" +KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/t1040_32bit_smp_defconfig" + +JFFS2_ERASEBLOCK = "0x10000" + +PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xorg" +XSERVER = " \ + xserver-xorg \ + xf86-input-evdev \ + xf86-input-mouse \ + xf86-input-keyboard \ + xf86-video-fbdev \ +" diff --git a/meta-fsl-ppc/conf/machine/t1042rdb.conf b/meta-fsl-ppc/conf/machine/t1042rdb.conf deleted file mode 100644 index feb5049c..00000000 --- a/meta-fsl-ppc/conf/machine/t1042rdb.conf +++ /dev/null @@ -1,23 +0,0 @@ -#@TYPE: Machine -#@NAME: Freescale T1042RDB -#@SOC: t1042 -#@DESCRIPTION: Machine configuration for running T1042RDB in 32-bit mode -#@MAINTAINER: Chunrong Guo - -require conf/machine/include/e5500.inc - -SOC_FAMILY = "t1:t1042" -UBOOT_MACHINES ?= "T1042RDB_PI" -KERNEL_DEVICETREE ?= "t1042rdb_pi.dtb" -KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/t1040_32bit_smp_defconfig" - -JFFS2_ERASEBLOCK = "0x10000" - -PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xorg" -XSERVER = " \ - xserver-xorg \ - xf86-input-evdev \ - xf86-input-mouse \ - xf86-input-keyboard \ - xf86-video-fbdev \ -" -- cgit v1.2.3-54-g00ecf From 6a85795250488780ca067885ac1c59865ad01eb4 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Mon, 5 Jan 2015 18:32:24 +0800 Subject: t1042rdb: add machine support This is a board with t1042rdb u-boot/rcw/dtb, the others are the same wtih t1040rdb Signed-off-by: Ting Liu --- meta-fsl-ppc/conf/machine/t1042rdb-64b.conf | 15 +++++++++++++++ meta-fsl-ppc/conf/machine/t1042rdb.conf | 15 +++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 meta-fsl-ppc/conf/machine/t1042rdb-64b.conf create mode 100644 meta-fsl-ppc/conf/machine/t1042rdb.conf diff --git a/meta-fsl-ppc/conf/machine/t1042rdb-64b.conf b/meta-fsl-ppc/conf/machine/t1042rdb-64b.conf new file mode 100644 index 00000000..cd01bc44 --- /dev/null +++ b/meta-fsl-ppc/conf/machine/t1042rdb-64b.conf @@ -0,0 +1,15 @@ +#@TYPE: Machine +#@NAME: Freescale T1042RDB +#@SOC: t1042 +#@DESCRIPTION: Machine configuration for running T1042RDB in 64-bit mode +#@MAINTAINER: Chunrong Guo + +require conf/machine/include/e5500-64b.inc + +SOC_FAMILY = "t1:t1042" +UBOOT_MACHINES ?= "T1042RDB_PI" +KERNEL_DEVICETREE ?= "t1042rdb_pi.dtb" +KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/t1040_64bit_smp_defconfig" + +JFFS2_ERASEBLOCK = "0x10000" + diff --git a/meta-fsl-ppc/conf/machine/t1042rdb.conf b/meta-fsl-ppc/conf/machine/t1042rdb.conf new file mode 100644 index 00000000..40ba9f37 --- /dev/null +++ b/meta-fsl-ppc/conf/machine/t1042rdb.conf @@ -0,0 +1,15 @@ +#@TYPE: Machine +#@NAME: Freescale T1042RDB +#@SOC: t1042 +#@DESCRIPTION: Machine configuration for running T1042RDB in 32-bit mode +#@MAINTAINER: Chunrong Guo + +require conf/machine/include/e5500.inc + +SOC_FAMILY = "t1:t1042" +UBOOT_MACHINES ?= "T1042RDB_PI" +KERNEL_DEVICETREE ?= "t1042rdb_pi.dtb" +KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/t1040_32bit_smp_defconfig" + +JFFS2_ERASEBLOCK = "0x10000" + -- cgit v1.2.3-54-g00ecf From 6a4ffe1702b0d0fbcf8abb9cf271c9d017967d7a Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Mon, 5 Jan 2015 18:32:25 +0800 Subject: t104x: use kernel defconfig corenet_fmanv3_smp_defconfig The defconfig in kernel source was renamed. Signed-off-by: Ting Liu --- meta-fsl-ppc/conf/machine/t1040rdb-64b.conf | 2 +- meta-fsl-ppc/conf/machine/t1040rdb.conf | 2 +- meta-fsl-ppc/conf/machine/t1042rdb-64b.conf | 2 +- meta-fsl-ppc/conf/machine/t1042rdb-pi-64b.conf | 2 +- meta-fsl-ppc/conf/machine/t1042rdb-pi.conf | 2 +- meta-fsl-ppc/conf/machine/t1042rdb.conf | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/meta-fsl-ppc/conf/machine/t1040rdb-64b.conf b/meta-fsl-ppc/conf/machine/t1040rdb-64b.conf index 603bc30d..7e52b724 100644 --- a/meta-fsl-ppc/conf/machine/t1040rdb-64b.conf +++ b/meta-fsl-ppc/conf/machine/t1040rdb-64b.conf @@ -9,7 +9,7 @@ require conf/machine/include/e5500-64b.inc SOC_FAMILY = "t1:t1040" UBOOT_MACHINES ?= "T1040RDB" KERNEL_DEVICETREE ?= "t1040rdb.dtb t1040rdb-usdpaa.dtb" -KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/t1040_64bit_smp_defconfig" +KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/corenet64_fmanv3_smp_defconfig" JFFS2_ERASEBLOCK = "0x10000" diff --git a/meta-fsl-ppc/conf/machine/t1040rdb.conf b/meta-fsl-ppc/conf/machine/t1040rdb.conf index eaac98fa..d108819a 100644 --- a/meta-fsl-ppc/conf/machine/t1040rdb.conf +++ b/meta-fsl-ppc/conf/machine/t1040rdb.conf @@ -9,7 +9,7 @@ require conf/machine/include/e5500.inc SOC_FAMILY = "t1:t1040" UBOOT_MACHINES ?= "T1040RDB" KERNEL_DEVICETREE ?= "t1040rdb.dtb t1040rdb-usdpaa.dtb" -KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/t1040_32bit_smp_defconfig" +KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/corenet32_fmanv3_smp_defconfig" JFFS2_ERASEBLOCK = "0x10000" diff --git a/meta-fsl-ppc/conf/machine/t1042rdb-64b.conf b/meta-fsl-ppc/conf/machine/t1042rdb-64b.conf index cd01bc44..23c4a0fe 100644 --- a/meta-fsl-ppc/conf/machine/t1042rdb-64b.conf +++ b/meta-fsl-ppc/conf/machine/t1042rdb-64b.conf @@ -9,7 +9,7 @@ require conf/machine/include/e5500-64b.inc SOC_FAMILY = "t1:t1042" UBOOT_MACHINES ?= "T1042RDB_PI" KERNEL_DEVICETREE ?= "t1042rdb_pi.dtb" -KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/t1040_64bit_smp_defconfig" +KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/corenet64_fmanv3_smp_defconfig" JFFS2_ERASEBLOCK = "0x10000" diff --git a/meta-fsl-ppc/conf/machine/t1042rdb-pi-64b.conf b/meta-fsl-ppc/conf/machine/t1042rdb-pi-64b.conf index 6ec34369..1b0adea6 100644 --- a/meta-fsl-ppc/conf/machine/t1042rdb-pi-64b.conf +++ b/meta-fsl-ppc/conf/machine/t1042rdb-pi-64b.conf @@ -9,7 +9,7 @@ require conf/machine/include/e5500-64b.inc SOC_FAMILY = "t1:t1042" UBOOT_MACHINES ?= "T1042RDB_PI" KERNEL_DEVICETREE ?= "t1042rdb_pi.dtb" -KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/t1040_64bit_smp_defconfig" +KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/corenet64_fmanv3_smp_defconfig" JFFS2_ERASEBLOCK = "0x10000" diff --git a/meta-fsl-ppc/conf/machine/t1042rdb-pi.conf b/meta-fsl-ppc/conf/machine/t1042rdb-pi.conf index fdd4d738..7a529c34 100644 --- a/meta-fsl-ppc/conf/machine/t1042rdb-pi.conf +++ b/meta-fsl-ppc/conf/machine/t1042rdb-pi.conf @@ -9,7 +9,7 @@ require conf/machine/include/e5500.inc SOC_FAMILY = "t1:t1042" UBOOT_MACHINES ?= "T1042RDB_PI" KERNEL_DEVICETREE ?= "t1042rdb_pi.dtb" -KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/t1040_32bit_smp_defconfig" +KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/corenet32_fmanv3_smp_defconfig" JFFS2_ERASEBLOCK = "0x10000" diff --git a/meta-fsl-ppc/conf/machine/t1042rdb.conf b/meta-fsl-ppc/conf/machine/t1042rdb.conf index 40ba9f37..e10065b6 100644 --- a/meta-fsl-ppc/conf/machine/t1042rdb.conf +++ b/meta-fsl-ppc/conf/machine/t1042rdb.conf @@ -9,7 +9,7 @@ require conf/machine/include/e5500.inc SOC_FAMILY = "t1:t1042" UBOOT_MACHINES ?= "T1042RDB_PI" KERNEL_DEVICETREE ?= "t1042rdb_pi.dtb" -KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/t1040_32bit_smp_defconfig" +KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/corenet32_fmanv3_smp_defconfig" JFFS2_ERASEBLOCK = "0x10000" -- cgit v1.2.3-54-g00ecf From c4a6a76d38f44283e7b5914883d7247ef7cf462c Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Mon, 5 Jan 2015 18:32:26 +0800 Subject: hv-cfg: t1042rdb use the same setting with t1040 As previous t1042rdb was renamed to t1042rdb-pi and the new t1042rdb keep the same with t1040rdb except rcw/u-boot/dtb, update hv-cfg to follow this. Signed-off-by: Ting Liu --- meta-fsl-ppc/recipes-virtualization/hv-cfg/hv-cfg_git.bb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/meta-fsl-ppc/recipes-virtualization/hv-cfg/hv-cfg_git.bb b/meta-fsl-ppc/recipes-virtualization/hv-cfg/hv-cfg_git.bb index 0fc83e09..599bce28 100644 --- a/meta-fsl-ppc/recipes-virtualization/hv-cfg/hv-cfg_git.bb +++ b/meta-fsl-ppc/recipes-virtualization/hv-cfg/hv-cfg_git.bb @@ -27,12 +27,18 @@ do_install () { make install M=`echo ${MACHINE} | sed s/-64b//g` + if [ "t1042rdb" = "${M}" ];then + M=t1040rdb + fi install -d ${D}/boot/hv-cfg cp -r ${S}/${M}/${M}/* ${D}/boot/hv-cfg } do_deploy () { M=`echo ${MACHINE} | sed s/-64b//g` + if [ "t1042rdb" = "${M}" ];then + M=t1040rdb + fi install -d ${DEPLOYDIR}/hv-cfg cp -r ${S}/${M}/${M}/* ${DEPLOYDIR}/hv-cfg } -- cgit v1.2.3-54-g00ecf From 716c6d76ea81ec0a63756bdfc2f85bd5e0b5958d Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Mon, 5 Jan 2015 18:32:28 +0800 Subject: rcw: update revision to 3e89f378 This update to fsl sdk v1.7 release, the detailed changes can be found at: http://git.freescale.com/git/cgit.cgi/ppc/sdk/rcw.git/ t1042rdb and t1042rdb-pi use the same rcw, update for it. Signed-off-by: Zhenhua Luo --- meta-fsl-ppc/recipes-bsp/rcw/rcw_git.bb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/meta-fsl-ppc/recipes-bsp/rcw/rcw_git.bb b/meta-fsl-ppc/recipes-bsp/rcw/rcw_git.bb index 1bc60d21..5714ed0a 100644 --- a/meta-fsl-ppc/recipes-bsp/rcw/rcw_git.bb +++ b/meta-fsl-ppc/recipes-bsp/rcw/rcw_git.bb @@ -12,7 +12,7 @@ PACKAGE_ARCH = "${MACHINE_ARCH}" inherit deploy SRC_URI = "git://git.freescale.com/ppc/sdk/rcw.git;nobranch=1" -SRCREV = "261b2355e9936ecb37b61e6f58dfc48dcfb805b3" +SRCREV = "3e89f378ed70e9b856756de8c3dbdfccb045fa0c" S = "${WORKDIR}/git" @@ -22,8 +22,8 @@ do_install () { make install M=`echo ${MACHINE} | sed s/-64b//g` - if [ "t1042rdb" = "${M}" ];then - M=${M}_pi + if [ "t1042rdb" = "${M}" ] || [ "t1042rdb-pi" = "${M}" ];then + M=t1042rdb_pi fi install -d ${D}/boot/rcw cp -r ${S}/${M}/${M}/* ${D}/boot/rcw @@ -31,8 +31,8 @@ do_install () { do_deploy () { M=`echo ${MACHINE} | sed s/-64b//g` - if [ "t1042rdb" = "${M}" ];then - M=${M}_pi + if [ "t1042rdb" = "${M}" ] || [ "t1042rdb-pi" = "${M}" ];then + M=t1042rdb_pi fi install -d ${DEPLOYDIR}/rcw cp -r ${S}/${M}/${M}/* ${DEPLOYDIR}/rcw -- cgit v1.2.3-54-g00ecf From cac1c43131c5e2fb5720c1c68677bb34d726497a Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Mon, 5 Jan 2015 18:32:30 +0800 Subject: web-sysmon: update to revision 8d0c6ec This includes following fixes: 8d0c6ec Using Makefile to install the package 7d7a893 Add PM demo scripts support 472c2b1 Add startup script for web-sysmon package ca33057 Add T4240QDS support 8508c8f Automatically scan hwmon system 522f8e2 Update the clean target of Makefile 24d3e4c Unify the template of temp/curr/in/power cgi script cd66d0f Update the clean target of Makefile c5dd6e8 Update description of sens_create_rrd Update recipe to match the code changes: 1. use 'oe_runmake install' 2. install web-sysmon.sh as init script Signed-off-by: Zhenhua Luo --- .../recipes-extended/web-sysmon/web-sysmon_git.bb | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/meta-fsl-ppc/recipes-extended/web-sysmon/web-sysmon_git.bb b/meta-fsl-ppc/recipes-extended/web-sysmon/web-sysmon_git.bb index 506c0e10..84f60d51 100644 --- a/meta-fsl-ppc/recipes-extended/web-sysmon/web-sysmon_git.bb +++ b/meta-fsl-ppc/recipes-extended/web-sysmon/web-sysmon_git.bb @@ -4,18 +4,20 @@ LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e" SRC_URI = "git://git.freescale.com/ppc/sdk/web-sysmon-dev.git;nobranch=1" -SRCREV = "d8fafc6f223054a4129d5623e89d3dcf42ac8147" +SRCREV = "8d0c6eca1113832fabe917fd0cb25abe2d4d7157" -S = "${WORKDIR}/git" +inherit update-rc.d -FILES_${PN} += "/" +S = "${WORKDIR}/git" RDEPENDS_${PN} = "lighttpd" -do_install() { - install -d ${D}/etc - install -m 644 ${S}/lighttpd.conf ${D}/etc - install -d ${D}/usr/local/bin - install -m 755 ${S}/rrd/sens_update_rrd ${D}/usr/local/bin - cp -r ${S}/rrd ${D}/usr +EXTRA_OEMAKE += "D=${D}" +do_install () { + oe_runmake install } + +FILES_${PN} += "/" + +INITSCRIPT_NAME = "web-sysmon.sh" +INITSCRIPT_PARAMS = "defaults 99 20" -- cgit v1.2.3-54-g00ecf From 5db77ce09bc20e2a3ff3d62f8a89b54f49ee2caf Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Mon, 5 Jan 2015 18:32:31 +0800 Subject: eth-config: update to revision 8040e0b This includes following fixes: 8040e0b eth_config: Add COPYING file 7e7c062 eth_config: Added Makefile 05d30e6 eth_config: Update Shared-Mac config file to new port notation 1777d0a eth_config: General refactoring of config/policy files 8a34b20 eth_config: Moved config/policy files to obsolete folder Update recipe to match the code changes: * change copyright to "BSD & GPLv2+" * call "oe_runmake install" in do_install Signed-off-by: Zhenhua Luo --- meta-fsl-ppc/recipes-dpaa/eth-config/eth-config_git.bb | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/meta-fsl-ppc/recipes-dpaa/eth-config/eth-config_git.bb b/meta-fsl-ppc/recipes-dpaa/eth-config/eth-config_git.bb index 85c3b784..878121f2 100644 --- a/meta-fsl-ppc/recipes-dpaa/eth-config/eth-config_git.bb +++ b/meta-fsl-ppc/recipes-dpaa/eth-config/eth-config_git.bb @@ -1,19 +1,17 @@ DESCRIPTION = "Ethernet Configuration Files" SECTION = "eth-config" -LICENSE = "Freescale-EULA" -LIC_FILES_CHKSUM = "file://COPYING;md5=cf02dc8eb5ac4a76f3812826520dea87" +LICENSE = "BSD & GPLv2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=8ed5eddbfbb84af5089ea94c382d423c" PR = "r2" -SRC_URI = "git://git.freescale.com/ppc/sdk/eth-config.git" -SRCREV = "96ac356dbe77948318c3806764f4a68862e30ac4" +SRC_URI = "git://git.freescale.com/ppc/sdk/eth-config.git;branch=sdk-v1.7.x" +SRCREV = "8040e0b1a7cb18cecfe0c7657d42f59f222b7930" S = "${WORKDIR}/git" +EXTRA_OEMAKE = "D=${D}" + do_install() { - install -d ${D}/etc/fmc/config - install -m 644 ${S}/*.xml ${D}/etc/fmc/config - install -d ${D}/etc/fmc/config/shared_mac - install -m 644 ${S}/shared_mac/*.xml ${D}/etc/fmc/config/shared_mac - install -m 644 ${S}/shared_mac/README ${D}/etc/fmc/config/shared_mac + oe_runmake install } -- cgit v1.2.3-54-g00ecf From 85c7681917564572c7a8c351ee2258186ce8196a Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Mon, 5 Jan 2015 18:32:32 +0800 Subject: qemu: update to revision 6ac4597 This includes following fixes: 6ac4597 QEMU:Add support for e5500 core revision v102.1 present on T1024 SOC. b8c87e9 Synchronized Linux headers. f2e4612 hw/arm/virt: Support -cpu host 80cd9c1 target-arm: Provide '-cpu host' when running KVM 8e1f791 target-arm: Don't hardcode KVM target CPU to be A15 885c7a9 hw/arm: Add 'virt' platform 7ea5615 target-arm: Allow secondary KVM CPUs to be booted via PSCI c33ac75 target-arm: Add ARMCPU field for Linux device-tree 'compatible' string 79f0d1c target-arm: Provide PSCI constants to generic QEMU code 5d1a235 hw/arm/boot: Allow boards to provide an fdt blob badc409 device_tree.c: Terminate the empty reservemap in create_device_tree() 7a6947b target-arm: Provide mechanism for getting KVM constants even if not CONFIG_KVM Signed-off-by: Zhenhua Luo --- meta-fsl-ppc/recipes-devtools/qemu/qemu_fslgit.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-fsl-ppc/recipes-devtools/qemu/qemu_fslgit.bb b/meta-fsl-ppc/recipes-devtools/qemu/qemu_fslgit.bb index 9e510567..1a7dd8eb 100644 --- a/meta-fsl-ppc/recipes-devtools/qemu/qemu_fslgit.bb +++ b/meta-fsl-ppc/recipes-devtools/qemu/qemu_fslgit.bb @@ -14,7 +14,7 @@ PACKAGECONFIG[lzo] = "" PACKAGECONFIG[numa] = "" SRC_URI = "git://git.freescale.com/ppc/sdk/qemu.git;nobranch=1" -SRCREV = "9e38e640275beabf6468a04cec5c403b2ac566ad" +SRCREV = "6ac4597c059d35e2737b234747243e56d340f4db" S = "${WORKDIR}/git" -- cgit v1.2.3-54-g00ecf From c6d85b6e0862249b345c5517e3f54f857aeb783e Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Mon, 5 Jan 2015 18:32:33 +0800 Subject: flib: update to revision 4bd48d4 This update to fsl sdk v1.7 release. The detailed changes can be found at: http://git.freescale.com/git/cgit.cgi/ppc/sdk/flib.git/ The license file changes: 1. add SPDX license identifier 2. update to 'Copyright 2008-2014' Signed-off-by: Zhenhua Luo --- meta-fsl-ppc/recipes-dpaa/flib/flib_git.bb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meta-fsl-ppc/recipes-dpaa/flib/flib_git.bb b/meta-fsl-ppc/recipes-dpaa/flib/flib_git.bb index 56737180..3ac7886b 100644 --- a/meta-fsl-ppc/recipes-dpaa/flib/flib_git.bb +++ b/meta-fsl-ppc/recipes-dpaa/flib/flib_git.bb @@ -1,10 +1,10 @@ DESCRIPTION = "Foundation Library" SECTION = "flib" LICENSE = "BSD & GPLv2" -LIC_FILES_CHKSUM = "file://COPYING;md5=3f16fa8e677e45af3127c5c4bafc3c00" +LIC_FILES_CHKSUM = "file://COPYING;md5=75d2f6a74299640c05ae6c69ed7a4ad6" SRC_URI = "git://git.freescale.com/ppc/sdk/flib.git;nobranch=1" -SRCREV = "6918b5d4ff24a5e7ab4803c849570d45f359a8d7" +SRCREV = "4bd48d4d6dbb1bd57c3c608fe66e97f4eb8e05b9" S = "${WORKDIR}/git" -- cgit v1.2.3-54-g00ecf From 9bb96772bdd6c3b5689f96c1ed9f8416db518c49 Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Mon, 5 Jan 2015 18:32:34 +0800 Subject: fmc: update to revision to 4f4a3eb This includes following fixes: 4f4a3eb ENGR00342608: Major error on ALU PCD: IC_HASH_INDEXED numOfKeys has to b e powerOfTwo a3e40ab ENGR00342299: ALU PCD (fmc_pcd_ed44_skeleton_TSOC.xml) generates Segmentation fault 71deab3 ENGR00342299: ALU PCD (fmc_pcd_ed44_skeleton_TSOC.xml) generates Segmentation fault aa34fa3 ENGR00341753: Schemes sharing between ports is not working e6fee7f ENGR00341091: False error reported by FMC in ALU PCD: 'ERR: Unresolved cycled dependencies are found' 2fb5b1c ENGR00340476: ALU Issue with pbit marking with a given DSCP (B0198) 284a506 ENGR329197: 32 Schema limit exhausted when FMC duplicates the schemas even if same policy is attached to all the ports 0434629 ENGR00338449: Enable Test automation framework for FMC on Linux host OS d09735b ENGR00338121: fmc: Support new convention for port type in xml config file f46f085 Improvement to: ENGR330486: ALU B0187: FMC/libxml2 SDK1.5 FB3 : Memory leaked during PCD xml application c2330c3 ENGR00330486: ALU B0187 : FMC/ libxml2 SDK1.5 FB3 : Memory leaked during PCD xml application 2bff057 ENGR00325623: PCD : replicator issue 4157f75 ENGR00316689: fmc: Ccnode mask support option fails to propagate into the PCD 35b9363 ENGR00320235: reassembly management with PCD xml (FMC) - FM_PCD_MAX_NUM_OF_CC_GROUPS Signed-off-by: Zhenhua Luo --- meta-fsl-ppc/recipes-dpaa/fmc/fmc_git.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-fsl-ppc/recipes-dpaa/fmc/fmc_git.bb b/meta-fsl-ppc/recipes-dpaa/fmc/fmc_git.bb index 100940a1..a9da96f8 100644 --- a/meta-fsl-ppc/recipes-dpaa/fmc/fmc_git.bb +++ b/meta-fsl-ppc/recipes-dpaa/fmc/fmc_git.bb @@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=a504ab5a8ff235e67c7301214749346c" PR = "r2" SRC_URI = "git://git.freescale.com/ppc/sdk/fmc.git;nobranch=1" -SRCREV = "021f7206cd80eb2e85dde1fc1bc79e8fea272de4" +SRCREV = "4f4a3ebe447c3c982d453596a82af7b40ac3a28a" DEPENDS = "libxml2 fmlib tclap" -- cgit v1.2.3-54-g00ecf From a8f646e627118e23e01381392036a23d799067c0 Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Mon, 5 Jan 2015 18:32:35 +0800 Subject: fmlib: update to revision 661d782 This includes following fixes: 661d782 fmlib: Fix pointer handles used in FMD wrapper 744e788 fmlib: copy CcNode pointer when appropriate b3a7bc7 fmlib: expose configuration routines in header files bdd6d6f capwap: sync with kernel for frag support 2eafba1 fmlib: add capwap support 87327a1 capwap: transfer to id for reassembly manip 20984f8 fmd: handle possibly undefined macro Signed-off-by: Zhenhua Luo --- meta-fsl-ppc/recipes-dpaa/fmlib/fmlib_git.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-fsl-ppc/recipes-dpaa/fmlib/fmlib_git.bb b/meta-fsl-ppc/recipes-dpaa/fmlib/fmlib_git.bb index ec038862..4d394a5d 100644 --- a/meta-fsl-ppc/recipes-dpaa/fmlib/fmlib_git.bb +++ b/meta-fsl-ppc/recipes-dpaa/fmlib/fmlib_git.bb @@ -9,7 +9,7 @@ DEPENDS += "virtual/kernel" DEPENDS_virtclass-native = "" SRC_URI = "git://git.freescale.com/ppc/sdk/fmlib.git;nobranch=1" -SRCREV = "6efc100cf470f271a312860c06717928554e3492" +SRCREV = "661d7822aa182f720029134008d7e1db07b0d504" S = "${WORKDIR}/git" -- cgit v1.2.3-54-g00ecf From f19ee7f9464deb8a0667f845dc5bff64c2c82242 Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Mon, 5 Jan 2015 18:32:36 +0800 Subject: hypervisor: update to revision to 99b04d9 This includes following fixes: 99b04d9 update libos 805227f ccf: add b4 ccf compatibles 1ed0f70 msi: Differentiate between mpic 4.3 and older ones 4a2ede1 Revert "t1040: workaround A-008007 erratum" The fixes in libos: 819bda2 Set error int irq index at init time de32355 Properly unmask error interrupts 955ddac Revert "t1040: workaround A-008007 erratum" Signed-off-by: Zhenhua Luo --- meta-fsl-ppc/recipes-virtualization/hypervisor/hypervisor_git.bb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meta-fsl-ppc/recipes-virtualization/hypervisor/hypervisor_git.bb b/meta-fsl-ppc/recipes-virtualization/hypervisor/hypervisor_git.bb index fb76c7a3..3a7f838f 100644 --- a/meta-fsl-ppc/recipes-virtualization/hypervisor/hypervisor_git.bb +++ b/meta-fsl-ppc/recipes-virtualization/hypervisor/hypervisor_git.bb @@ -20,9 +20,9 @@ SRC_URI = " \ " SRCREV_FORMAT="hypervisor" -SRCREV = "175984b6f07d9b407efc10b781cf6a05c2f3a24f" +SRCREV = "99b04d937b944d57b2685b55584e982d8e36dd41" SRCREV_kconfig = "a56025d4da992b856796b0eccac2e410d751dbac" -SRCREV_libos = "99b4fb59192412ddbad27196fd5617e61cff895d" +SRCREV_libos = "819bda2a913bc1f6afb43f5f2b026da5872866ea" SRCREV_dtc = "a6d55e039fd22048687fe061b4609e2807efe764" SRCREV_hypertrk = "975c98b562186afbd3bbf103ae54b96cf9b3e533" -- cgit v1.2.3-54-g00ecf From d81ae5296310dfc04e35eff93fd59c7337ecfba1 Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Mon, 5 Jan 2015 18:32:37 +0800 Subject: ipc: update to revision c9c92ac This includes following fixes: c9c92ac B4:L1 Defense: Add support for hardware watchpoint c4dd0bc b4860: IPC: Make dynamic user space library position independent Signed-off-by: Zhenhua Luo --- meta-fsl-ppc/recipes-bsp/ipc/ipc.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-fsl-ppc/recipes-bsp/ipc/ipc.inc b/meta-fsl-ppc/recipes-bsp/ipc/ipc.inc index 22ab1e32..547771ae 100644 --- a/meta-fsl-ppc/recipes-bsp/ipc/ipc.inc +++ b/meta-fsl-ppc/recipes-bsp/ipc/ipc.inc @@ -1,7 +1,7 @@ DEPENDS = "virtual/kernel" SRC_URI = "git://git.freescale.com/ppc/sdk/ipc.git;nobranch=1" -SRCREV = "7e36edbbc5ac5271c85d45745b3e70f47771f262" +SRCREV = "c9c92ac6a7a31c9d878096eb7d135c22a38f20ff" COMPATIBLE_MACHINE = "(bsc9132qds|bsc9131rdb|b4860qds|b4420qds)" -- cgit v1.2.3-54-g00ecf From ab7ed712a1c08563b156b8d7dd54c6ba7ac69100 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Mon, 5 Jan 2015 18:32:38 +0800 Subject: p2020ds: remove as it is not supported now Signed-off-by: Ting Liu --- meta-fsl-ppc/conf/machine/p2020ds.conf | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 meta-fsl-ppc/conf/machine/p2020ds.conf diff --git a/meta-fsl-ppc/conf/machine/p2020ds.conf b/meta-fsl-ppc/conf/machine/p2020ds.conf deleted file mode 100644 index 96433a2e..00000000 --- a/meta-fsl-ppc/conf/machine/p2020ds.conf +++ /dev/null @@ -1,16 +0,0 @@ -#@TYPE: Machine -#@NAME: Freescale P2020DS -#@SOC: p2020 -#@DESCRIPTION: Machine configuration for running P2020DS -#@MAINTAINER: Chunrong Guo - -require conf/machine/include/e500v2.inc - -SOC_FAMILY = "p2020" -BOOTFORMAT_CONFIG = "config_sram_p2020ds.dat" -UBOOT_MACHINES ?= "P2020DS P2020DS_36BIT P2020DS_DDR2 P2020DS_SDCARD P2020DS_SPIFLASH" -KERNEL_DEVICETREE ?= "p2020ds.dtb" -KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" - -JFFS2_ERASEBLOCK = "0x20000" - -- cgit v1.2.3-54-g00ecf From 951a401605f7926ecec8ae47a02f44f55cd19a4e Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Wed, 7 Jan 2015 12:33:17 +0800 Subject: t1024qds-64b: add machine support Signed-off-by: Ting Liu --- meta-fsl-ppc/conf/machine/t1024qds-64b.conf | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 meta-fsl-ppc/conf/machine/t1024qds-64b.conf diff --git a/meta-fsl-ppc/conf/machine/t1024qds-64b.conf b/meta-fsl-ppc/conf/machine/t1024qds-64b.conf new file mode 100644 index 00000000..81d57633 --- /dev/null +++ b/meta-fsl-ppc/conf/machine/t1024qds-64b.conf @@ -0,0 +1,15 @@ +#@TYPE: Machine +#@NAME: Freescale T1024QDS +#@SOC: t1024 +#@DESCRIPTION: Machine configuration for running T1024QDS in 64-bit mode +#@MAINTAINER: Chunrong Guo + +require conf/machine/include/e5500-64b.inc + +SOC_FAMILY = "t1:t1024" +UBOOT_MACHINES ?= "T1024QDS T1024QDS_D4 T1024QDS_NAND T1024QDS_SDCARD T1024QDS_SPIFLASH T1024QDS_SECURE_BOOT" +KERNEL_DEVICETREE ?= "t1024qds.dtb t1024qds-usdpaa.dtb t1024qds-usdpaa-capwap.dtb" +KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/corenet64_fmanv3_smp_defconfig" + +JFFS2_ERASEBLOCK = "0x10000" + -- cgit v1.2.3-54-g00ecf From 161a427087e49b824e8acd27c19f71e27c84b862 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Wed, 7 Jan 2015 12:33:18 +0800 Subject: t1024qds: add machine support Signed-off-by: Ting Liu --- meta-fsl-ppc/conf/machine/t1024qds.conf | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 meta-fsl-ppc/conf/machine/t1024qds.conf diff --git a/meta-fsl-ppc/conf/machine/t1024qds.conf b/meta-fsl-ppc/conf/machine/t1024qds.conf new file mode 100644 index 00000000..3e5cac1a --- /dev/null +++ b/meta-fsl-ppc/conf/machine/t1024qds.conf @@ -0,0 +1,15 @@ +#@TYPE: Machine +#@NAME: Freescale T1024QDS +#@SOC: t1024 +#@DESCRIPTION: Machine configuration for running T1024QDS in 32-bit mode +#@MAINTAINER: Chunrong Guo + +require conf/machine/include/e5500.inc + +SOC_FAMILY = "t1:t1024" +UBOOT_MACHINES ?= "T1024QDS T1024QDS_D4 T1024QDS_NAND T1024QDS_SDCARD T1024QDS_SPIFLASH T1024QDS_SECURE_BOOT" +KERNEL_DEVICETREE ?= "t1024qds.dtb t1024qds-usdpaa.dtb t1024qds-usdpaa-capwap.dtb" +KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/corenet32_fmanv3_smp_defconfig" + +JFFS2_ERASEBLOCK = "0x10000" + -- cgit v1.2.3-54-g00ecf From 754b5172e894c2f5d0abee9a36b8e6a5c6c933ec Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Wed, 7 Jan 2015 12:33:19 +0800 Subject: t1024rdb: add machine support Signed-off-by: Ting Liu --- meta-fsl-ppc/conf/machine/t1024rdb.conf | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 meta-fsl-ppc/conf/machine/t1024rdb.conf diff --git a/meta-fsl-ppc/conf/machine/t1024rdb.conf b/meta-fsl-ppc/conf/machine/t1024rdb.conf new file mode 100644 index 00000000..82a04009 --- /dev/null +++ b/meta-fsl-ppc/conf/machine/t1024rdb.conf @@ -0,0 +1,15 @@ +#@TYPE: Machine +#@NAME: Freescale T1024RDB +#@SOC: t1024 +#@DESCRIPTION: Machine configuration for running T1024RDB in 32-bit mode +#@MAINTAINER: Chunrong Guo + +require conf/machine/include/e5500.inc + +SOC_FAMILY = "t1:t1024" +UBOOT_MACHINES ?= "T1024RDB T1024RDB_NAND T1024RDB_SDCARD T1024RDB_SPIFLASH T1024RDB_SECURE_BOOT" +KERNEL_DEVICETREE ?= "t1024rdb.dtb t1024rdb-usdpaa.dtb t1024rdb-usdpaa-capwap.dtb" +KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/corenet32_fmanv3_smp_defconfig" + +JFFS2_ERASEBLOCK = "0x10000" + -- cgit v1.2.3-54-g00ecf From 37815288db75c97954e84ea2c5b16d8e52d5eb30 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Wed, 7 Jan 2015 12:33:20 +0800 Subject: t1024rdb-64b: add machine support Signed-off-by: Ting Liu --- meta-fsl-ppc/conf/machine/t1024rdb-64b.conf | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 meta-fsl-ppc/conf/machine/t1024rdb-64b.conf diff --git a/meta-fsl-ppc/conf/machine/t1024rdb-64b.conf b/meta-fsl-ppc/conf/machine/t1024rdb-64b.conf new file mode 100644 index 00000000..c40bba8a --- /dev/null +++ b/meta-fsl-ppc/conf/machine/t1024rdb-64b.conf @@ -0,0 +1,15 @@ +#@TYPE: Machine +#@NAME: Freescale T1024RDB +#@SOC: t1024 +#@DESCRIPTION: Machine configuration for running T1024RDB in 64-bit mode +#@MAINTAINER: Chunrong Guo + +require conf/machine/include/e5500-64b.inc + +SOC_FAMILY = "t1:t1024" +UBOOT_MACHINES ?= "T1024RDB T1024RDB_NAND T1024RDB_SDCARD T1024RDB_SPIFLASH T1024RDB_SECURE_BOOT" +KERNEL_DEVICETREE ?= "t1024rdb.dtb t1024rdb-usdpaa.dtb t1024rdb-usdpaa-capwap.dtb" +KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/corenet64_fmanv3_smp_defconfig" + +JFFS2_ERASEBLOCK = "0x10000" + -- cgit v1.2.3-54-g00ecf From 8f355b7174b98919425c45c21faea2e5283d3c06 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Wed, 7 Jan 2015 12:33:21 +0800 Subject: qemu: remove unavailable gtk+ options The preferred version of qemu defined in this layer (1.7) does not have the same configuration options as the original yocto version (2.0). Since this recipe includes yocto's qemu.inc, some of the configuration options defined there generate an error during the do_configure task: | ERROR: unknown option --disable-vte Setting PACKAGECONFIG[option] to an empty string fixes the problem. Signed-off-by: Ting Liu --- meta-fsl-ppc/recipes-devtools/qemu/qemu_fslgit.bb | 1 + 1 file changed, 1 insertion(+) diff --git a/meta-fsl-ppc/recipes-devtools/qemu/qemu_fslgit.bb b/meta-fsl-ppc/recipes-devtools/qemu/qemu_fslgit.bb index 1a7dd8eb..32e738e9 100644 --- a/meta-fsl-ppc/recipes-devtools/qemu/qemu_fslgit.bb +++ b/meta-fsl-ppc/recipes-devtools/qemu/qemu_fslgit.bb @@ -12,6 +12,7 @@ PV = "1.7+fsl" PACKAGECONFIG[quorum] = "" PACKAGECONFIG[lzo] = "" PACKAGECONFIG[numa] = "" +PACKAGECONFIG[gtk+] = "" SRC_URI = "git://git.freescale.com/ppc/sdk/qemu.git;nobranch=1" SRCREV = "6ac4597c059d35e2737b234747243e56d340f4db" -- cgit v1.2.3-54-g00ecf From e70b1180c4bb5aa1f3a464ac1ce02f0800975c2a Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Wed, 7 Jan 2015 12:33:22 +0800 Subject: skmm-ep: update revision to 27156a6 This includes following fixes: 27156a6 skmm-ep: add gcc flag '-mno-strict-align' to improve performance d6adb62 skmm-ep: fix up skmm application segment fault 13deed1 DMA: fix the mmap failed check bc505e5 PCIDMA: Add DMA chain and multiple channel support 68ee05f Temporarily add fsl_pci_ep_vfio.h which should be in linux 9e6e2cb PCIDMA: Change DMA BWC and memory allocation 4805577 PCIDMA: Add MSIX trigger functionality 31f653a PCIDMA: Add MSIX outbound window support e903be6 PCIDMA: Adjust PCI EP display information 7f8012d PCIDMA: Change DMA channel initialization code fb29219 PCIDMA: Remove duplicate code Also add missing DEPENDS on virtual/kernel Signed-off-by: Ting Liu --- meta-fsl-ppc/recipes-extended/skmm-ep/skmm-ep_git.bb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/meta-fsl-ppc/recipes-extended/skmm-ep/skmm-ep_git.bb b/meta-fsl-ppc/recipes-extended/skmm-ep/skmm-ep_git.bb index 145b1d9f..fcbd2ed9 100644 --- a/meta-fsl-ppc/recipes-extended/skmm-ep/skmm-ep_git.bb +++ b/meta-fsl-ppc/recipes-extended/skmm-ep/skmm-ep_git.bb @@ -3,12 +3,14 @@ SECTION = "skmm-ep" LICENSE = "BSD & GPLv2" LIC_FILES_CHKSUM = "file://Makefile;endline=30;md5=39e58bedc879163c9338596e52df5b1f" -DEPENDS = "libedit openssl" +DEPENDS = "libedit openssl virtual/kernel" + +PACKAGE_ARCH = "${MACHINE_ARCH}" SRC_URI = "git://git.freescale.com/ppc/sdk/skmm-ep.git;nobranch=1 \ file://add-two-missing-header-files.patch \ " -SRCREV = "448522aa1ba3f0c4a1481631dc1c3b168d410a61" +SRCREV = "27156a6621c8f6d7f98210b1ca5cd97bde926875" COMPATIBLE_MACHINE = "(p4080ds|t4240qds|c293pcie)" -- cgit v1.2.3-54-g00ecf From 29e112c9c62076dcfb5a7ffe896986d9ed7eff36 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Wed, 7 Jan 2015 12:33:23 +0800 Subject: fm-ucode: use soc_family to match deployed binaries listing machine names in recipe is painful when adding support for boards with same soc. use soc_family instead. Signed-off-by: Ting Liu --- meta-fsl-ppc/recipes-dpaa/fm-ucode/fm-ucode_git.bb | 29 ++++++---------------- 1 file changed, 8 insertions(+), 21 deletions(-) diff --git a/meta-fsl-ppc/recipes-dpaa/fm-ucode/fm-ucode_git.bb b/meta-fsl-ppc/recipes-dpaa/fm-ucode/fm-ucode_git.bb index ef9cae03..9f8ac468 100644 --- a/meta-fsl-ppc/recipes-dpaa/fm-ucode/fm-ucode_git.bb +++ b/meta-fsl-ppc/recipes-dpaa/fm-ucode/fm-ucode_git.bb @@ -12,33 +12,19 @@ SRCREV = "517267e5f9ca9ab13cb2e94e0a20f555f73885ee" S = "${WORKDIR}/git" -ALLOW_EMPTY_${PN} = "1" +REGLEX ?= "${MACHINE}" +REGLEX_t1042 = "t1040" +REGLEX_b4420 = "b4860" +REGLEX_t4160 = "t4240" + do_install () { - case ${MACHINE} in - t1040qds|t1040qds-64b|t1040rdb|t1040rdb-64b|t1042rdb|t1042rdb-64b) UCODE=t1040;; - t2080qds|t2080qds-64b|t2080rdb|t2080rdb-64b) UCODE=t2080;; - b4420qds|b4420qds-64b|b4860qds|b4860qds-64b) UCODE=b4860;; - t4240qds|t4240qds-64b|t4240rdb|t4240rdb-64b|t4160qds|t4160qds-64b) UCODE=t4240;; - p5020ds|p5020ds-64b) UCODE=p5020;; - p5040ds|p5040ds-64b) UCODE=p5040;; - *) UCODE=${MACHINE};; - esac - UCODE=`echo $UCODE | sed -e 's,[a-zA-Z]*$,,'` + UCODE=`echo ${REGLEX} | sed -e 's,-.*$,,' -e 's,[a-zA-Z]*$,,'` install -d ${D}/boot install -m 644 fsl_fman_ucode_${UCODE}*.bin ${D}/boot/ } do_deploy () { - case ${MACHINE} in - t1040qds|t1040qds-64b|t1040rdb|t1040rdb-64b|t1042rdb|t1042rdb-64b) UCODE=t1040;; - t2080qds|t2080qds-64b|t2080rdb|t2080rdb-64b) UCODE=t2080;; - b4420qds|b4420qds-64b|b4860qds|b4860qds-64b) UCODE=b4860;; - t4240qds|t4240qds-64b|t4240rdb|t4240rdb-64b|t4160qds|t4160qds-64b) UCODE=t4240;; - p5020ds|p5020ds-64b) UCODE=p5020;; - p5040ds|p5040ds-64b) UCODE=p5040;; - *) UCODE=${MACHINE};; - esac - UCODE=`echo $UCODE | sed -e 's,[a-zA-Z]*$,,'` + UCODE=`echo ${REGLEX} | sed -e 's,-.*$,,' -e 's,[a-zA-Z]*$,,'` install -d ${DEPLOYDIR}/ install -m 644 fsl_fman_ucode_${UCODE}*.bin ${DEPLOYDIR}/ } @@ -46,5 +32,6 @@ addtask deploy before do_build after do_install PACKAGES += "${PN}-image" FILES_${PN}-image += "/boot" +ALLOW_EMPTY_${PN} = "1" COMPATIBLE_MACHINE = "(p1023rdb|e500mc|e5500|e5500-64b|e6500|e6500-64b)" -- cgit v1.2.3-54-g00ecf From b0bb56a392f90a915ec319ae9d3150122fb0fe5c Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Wed, 7 Jan 2015 12:33:24 +0800 Subject: fm-ucode: update to revision 4cda2e3 This includes following fixes: 4cda2e3 fm-ucode: add t1040 and t2080 rev 1.1 files 222cd35 fm-ucode: remove prev version of _t1040_r1.0_107_ c5006bf fm-ucode: add t1024 packages 2698dc3 fm-ucode: release 107.4.2 3b66ca5 fm-ucode: new version 107_4_2_candidate1 Signed-off-by: Ting Liu --- meta-fsl-ppc/recipes-dpaa/fm-ucode/fm-ucode_git.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-fsl-ppc/recipes-dpaa/fm-ucode/fm-ucode_git.bb b/meta-fsl-ppc/recipes-dpaa/fm-ucode/fm-ucode_git.bb index 9f8ac468..1bb70988 100644 --- a/meta-fsl-ppc/recipes-dpaa/fm-ucode/fm-ucode_git.bb +++ b/meta-fsl-ppc/recipes-dpaa/fm-ucode/fm-ucode_git.bb @@ -8,7 +8,7 @@ PR = "r1" inherit deploy SRC_URI = "git://git.freescale.com/ppc/sdk/fm-ucode.git;nobranch=1" -SRCREV = "517267e5f9ca9ab13cb2e94e0a20f555f73885ee" +SRCREV = "4cda2e3f36408ded79022cf599260add07769786" S = "${WORKDIR}/git" -- cgit v1.2.3-54-g00ecf From ce9e5e9a1e3c528f0c1f123c0cde15c3b0893da0 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Wed, 7 Jan 2015 12:33:25 +0800 Subject: usdpaa: use soc_family to define SOC/FMAN_VARIANT listing machine names in recipe is painful when adding support for boards with same soc. use soc_family instead. Signed-off-by: Ting Liu --- meta-fsl-ppc/recipes-dpaa/usdpaa/usdpaa_git.bb | 48 +++++++++----------------- 1 file changed, 17 insertions(+), 31 deletions(-) diff --git a/meta-fsl-ppc/recipes-dpaa/usdpaa/usdpaa_git.bb b/meta-fsl-ppc/recipes-dpaa/usdpaa/usdpaa_git.bb index 78d42535..c8daab0a 100644 --- a/meta-fsl-ppc/recipes-dpaa/usdpaa/usdpaa_git.bb +++ b/meta-fsl-ppc/recipes-dpaa/usdpaa/usdpaa_git.bb @@ -21,33 +21,27 @@ S = "${WORKDIR}/git" EXTRA_OEMAKE = 'CC="${CC}" LD="${LD}" AR="${AR}"' export ARCH="${TARGET_ARCH}" +SOC ?= "P4080" +SOC_b4 = "B4860" +SOC_t1 = "T1040" +SOC_t2 = "T2080" +SOC_t4 = "T4240" +SOC_p1023rdb = "P1023" + +FMAN_VARIANT ?= "P4080" +FMAN_VARIANT_b4 = "B4860" +FMAN_VARIANT_t1 = "B4860" +FMAN_VARIANT_t2 = "B4860" +FMAN_VARIANT_t4 = "B4860" +FMAN_VARIANT_p1023rdb = "P1023" + do_compile_prepend () { - case ${MACHINE} in - b4420qds|b4420qds-64b|b4860qds|b4860qds-64b) - SOC=B4860; - FMAN_VARIANT=B4860;; - t1040qds|t1040qds-64b|t1040rdb|t1040rdb-64b) - SOC=T1040; - FMAN_VARIANT=B4860;; - t2080qds|t2080qds-64b|t2080rdb|t2080rdb-64b) - SOC=T2080; - FMAN_VARIANT=B4860;; - t4240qds|t4240qds-64b|t4240rdb|t4240rdb-64b) - SOC=T4240; - FMAN_VARIANT=B4860;; - p1023rdb) - SOC=P1023; - FMAN_VARIANT=P1023;; - *) - SOC=P4080; - FMAN_VARIANT=P4080;; - esac - export SOC=$SOC + export SOC=${SOC} export FMC_EXTRA_CFLAGS="-I ${STAGING_INCDIR}/fmc" export FMLIB_EXTRA_CFLAGS="-I ${STAGING_INCDIR}/fmd \ -I ${STAGING_INCDIR}/fmd/Peripherals \ -I ${STAGING_INCDIR}/fmd/integrations \ - -D$FMAN_VARIANT" + -D${FMAN_VARIANT}" export LIBXML2_CFLAGS="$(pkg-config --cflags libxml-2.0)" export LIBXML2_LDFLAGS="$(pkg-config --libs --static libxml-2.0)" @@ -56,15 +50,7 @@ do_compile_prepend () { } do_install () { - case ${MACHINE} in - b4420qds|b4420qds-64b|b4860qds|b4860qds-64b) SOC=B4860;; - t1040qds|t1040qds-64b|t1040rdb|t1040rdb-64b) SOC=T1040;; - t2080qds|t2080qds-64b|t2080rdb|t2080rdb-64b) SOC=T2080;; - t4240qds|t4240qds-64b|t4240rdb|t4240rdb-64b) SOC=T4240;; - p1023rdb) SOC=P1023;; - *) SOC=P4080;; - esac - export SOC=$SOC + export SOC=${SOC} oe_runmake install DESTDIR=${D} } -- cgit v1.2.3-54-g00ecf From 164e2bbef27f16ffca46fa08dc3858df6b803e78 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Wed, 7 Jan 2015 12:33:26 +0800 Subject: usdpaa: update to revision d997594 This update to fsl sdk v1.7 release. There are 143 new commits. The detailed changes can be found at: http://git.freescale.com/git/cgit.cgi/ppc/sdk/usdpaa.git/ Signed-off-by: Ting Liu --- meta-fsl-ppc/recipes-dpaa/usdpaa/usdpaa_git.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-fsl-ppc/recipes-dpaa/usdpaa/usdpaa_git.bb b/meta-fsl-ppc/recipes-dpaa/usdpaa/usdpaa_git.bb index c8daab0a..e6bf5f6c 100644 --- a/meta-fsl-ppc/recipes-dpaa/usdpaa/usdpaa_git.bb +++ b/meta-fsl-ppc/recipes-dpaa/usdpaa/usdpaa_git.bb @@ -14,7 +14,7 @@ DEPENDS_append_b4420qds = " ipc-ust" RDEPENDS_${PN} = "libgcc bash" SRC_URI = "git://git.freescale.com/ppc/sdk/usdpaa.git;nobranch=1" -SRCREV = "db3534f4d21892bc7f9fbe973f4e4cf8de924c75" +SRCREV = "d9975948bb6bf9fdcec189c0f1c31ce45f74961c" S = "${WORKDIR}/git" -- cgit v1.2.3-54-g00ecf From 58ca1838e372a60781b6b03c7b7a12dce2270e50 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Wed, 7 Jan 2015 17:54:59 +0800 Subject: udev-extraconf: replace bbappend with own recipe * introduce variable RULE for DPAA FMan ethernet ports name rule. * use 72-fsl-dpaa-persistent-networking.rules for t1024, same as e6500. Signed-off-by: Ting Liu --- .../machine/include/qoriq-default-settings.inc | 2 +- .../71-fsl-dpaa-persistent-networking.rules | 20 ------------------ .../72-fsl-dpaa-persistent-networking.rules | 24 ---------------------- .../udev/udev-extraconf/qoriq-ppc/automount.rules | 23 --------------------- .../recipes-core/udev/udev-extraconf_%.bbappend | 15 -------------- meta-fsl-ppc/recipes-core/udev/udev-rules-qoriq.bb | 23 +++++++++++++++++++++ .../71-fsl-dpaa-persistent-networking.rules | 20 ++++++++++++++++++ .../72-fsl-dpaa-persistent-networking.rules | 24 ++++++++++++++++++++++ .../udev-rules-qoriq/qoriq-ppc/automount.rules | 23 +++++++++++++++++++++ 9 files changed, 91 insertions(+), 83 deletions(-) delete mode 100644 meta-fsl-ppc/recipes-core/udev/udev-extraconf/qoriq-ppc/71-fsl-dpaa-persistent-networking.rules delete mode 100644 meta-fsl-ppc/recipes-core/udev/udev-extraconf/qoriq-ppc/72-fsl-dpaa-persistent-networking.rules delete mode 100644 meta-fsl-ppc/recipes-core/udev/udev-extraconf/qoriq-ppc/automount.rules delete mode 100644 meta-fsl-ppc/recipes-core/udev/udev-extraconf_%.bbappend create mode 100644 meta-fsl-ppc/recipes-core/udev/udev-rules-qoriq.bb create mode 100644 meta-fsl-ppc/recipes-core/udev/udev-rules-qoriq/qoriq-ppc/71-fsl-dpaa-persistent-networking.rules create mode 100644 meta-fsl-ppc/recipes-core/udev/udev-rules-qoriq/qoriq-ppc/72-fsl-dpaa-persistent-networking.rules create mode 100644 meta-fsl-ppc/recipes-core/udev/udev-rules-qoriq/qoriq-ppc/automount.rules diff --git a/meta-fsl-ppc/conf/machine/include/qoriq-default-settings.inc b/meta-fsl-ppc/conf/machine/include/qoriq-default-settings.inc index 4c8b8424..539f6a1d 100644 --- a/meta-fsl-ppc/conf/machine/include/qoriq-default-settings.inc +++ b/meta-fsl-ppc/conf/machine/include/qoriq-default-settings.inc @@ -1,5 +1,5 @@ MACHINE_FEATURES = "keyboard pci ext2 ext3 serial" -MACHINE_EXTRA_RRECOMMENDS += "udev-extraconf kernel-modules" +MACHINE_EXTRA_RRECOMMENDS += "udev-rules-qoriq kernel-modules" IMAGE_CLASSES += "image_types_uboot" EXTRA_IMAGEDEPENDS += "u-boot" diff --git a/meta-fsl-ppc/recipes-core/udev/udev-extraconf/qoriq-ppc/71-fsl-dpaa-persistent-networking.rules b/meta-fsl-ppc/recipes-core/udev/udev-extraconf/qoriq-ppc/71-fsl-dpaa-persistent-networking.rules deleted file mode 100644 index 6c6dc354..00000000 --- a/meta-fsl-ppc/recipes-core/udev/udev-extraconf/qoriq-ppc/71-fsl-dpaa-persistent-networking.rules +++ /dev/null @@ -1,20 +0,0 @@ -# Rules for handling naming the DPAA FMan ethernet ports in a consistent way -SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe4e0000", NAME="fm1-gb0" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe4e2000", NAME="fm1-gb1" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe4e4000", NAME="fm1-gb2" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe4e6000", NAME="fm1-gb3" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe4e8000", NAME="fm1-gb4" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe4f0000", NAME="fm1-10g" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe5e0000", NAME="fm2-gb0" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe5e2000", NAME="fm2-gb1" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe5e4000", NAME="fm2-gb2" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe5e6000", NAME="fm2-gb3" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe5e8000", NAME="fm2-gb4" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe5f0000", NAME="fm2-10g" - -# P1023 has its Fman @ different offsets -SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ff7e0000", NAME="fm1-gb0" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ff7e2000", NAME="fm1-gb1" - -# Rename macless0 port to "macless0" -SUBSYSTEM=="net", ATTR{device_type}=="macless0", NAME="macless0" diff --git a/meta-fsl-ppc/recipes-core/udev/udev-extraconf/qoriq-ppc/72-fsl-dpaa-persistent-networking.rules b/meta-fsl-ppc/recipes-core/udev/udev-extraconf/qoriq-ppc/72-fsl-dpaa-persistent-networking.rules deleted file mode 100644 index d0eec9ce..00000000 --- a/meta-fsl-ppc/recipes-core/udev/udev-extraconf/qoriq-ppc/72-fsl-dpaa-persistent-networking.rules +++ /dev/null @@ -1,24 +0,0 @@ -# Rules for handling naming the DPAA FMan ethernet ports in a consistent way -SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe4e0000", NAME="fm1-mac1" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe4e2000", NAME="fm1-mac2" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe4e4000", NAME="fm1-mac3" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe4e6000", NAME="fm1-mac4" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe4e8000", NAME="fm1-mac5" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe4ea000", NAME="fm1-mac6" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe4ec000", NAME="fm1-mac7" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe4ee000", NAME="fm1-mac8" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe4f0000", NAME="fm1-mac9" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe4f2000", NAME="fm1-mac10" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe5e0000", NAME="fm2-mac1" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe5e2000", NAME="fm2-mac2" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe5e4000", NAME="fm2-mac3" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe5e6000", NAME="fm2-mac4" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe5e8000", NAME="fm2-mac5" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe5ea000", NAME="fm2-mac6" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe5ec000", NAME="fm2-mac7" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe5ee000", NAME="fm2-mac8" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe5f0000", NAME="fm2-mac9" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe5f2000", NAME="fm2-mac10" - -# Rename macless0 to "macless0" -SUBSYSTEM=="net", ATTR{device_type}=="macless0", NAME="macless0" diff --git a/meta-fsl-ppc/recipes-core/udev/udev-extraconf/qoriq-ppc/automount.rules b/meta-fsl-ppc/recipes-core/udev/udev-extraconf/qoriq-ppc/automount.rules deleted file mode 100644 index a47efdab..00000000 --- a/meta-fsl-ppc/recipes-core/udev/udev-extraconf/qoriq-ppc/automount.rules +++ /dev/null @@ -1,23 +0,0 @@ -# There are a number of modifiers that are allowed to be used in some -# of the different fields. They provide the following subsitutions: -# -# %n the "kernel number" of the device. -# For example, 'sda3' has a "kernel number" of '3' -# %e the smallest number for that name which does not matches an existing node -# %k the kernel name for the device -# %M the kernel major number for the device -# %m the kernel minor number for the device -# %b the bus id for the device -# %c the string returned by the PROGRAM -# %s{filename} the content of a sysfs attribute -# %% the '%' char itself -# - -SUBSYSTEM=="block", ENV{DEVTYPE}=="partition", GOTO="automount_end" - -# Media automounting -SUBSYSTEM=="block", ACTION=="add" RUN+="/etc/udev/scripts/mount.sh" -SUBSYSTEM=="block", ACTION=="remove" RUN+="/etc/udev/scripts/mount.sh" - -LABEL="automount_end" - diff --git a/meta-fsl-ppc/recipes-core/udev/udev-extraconf_%.bbappend b/meta-fsl-ppc/recipes-core/udev/udev-extraconf_%.bbappend deleted file mode 100644 index 896e75f6..00000000 --- a/meta-fsl-ppc/recipes-core/udev/udev-extraconf_%.bbappend +++ /dev/null @@ -1,15 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:" - -SRC_URI_append_qoriq-ppc = " file://${@bb.utils.contains("TUNE_FEATURES", "e6500", \ - "72-fsl-dpaa-persistent-networking.rules", "71-fsl-dpaa-persistent-networking.rules", d)}" - -do_install_append_qoriq-ppc () { - install -d ${D}${sysconfdir}/udev/rules.d/ - install -m 0644 ${WORKDIR}/*-fsl-dpaa-persistent-networking.rules ${D}${sysconfdir}/udev/rules.d - - # skip mmc rpmb partitions - echo "/dev/mmcblk.*rpmb" >>${D}${sysconfdir}/udev/mount.blacklist - # skip nbd (network block device) - echo "/dev/nbd*" >>${D}${sysconfdir}/udev/mount.blacklist -} - diff --git a/meta-fsl-ppc/recipes-core/udev/udev-rules-qoriq.bb b/meta-fsl-ppc/recipes-core/udev/udev-rules-qoriq.bb new file mode 100644 index 00000000..546f9e8d --- /dev/null +++ b/meta-fsl-ppc/recipes-core/udev/udev-rules-qoriq.bb @@ -0,0 +1,23 @@ +DESCRIPTION = "udev rules for Freescale QorIQ SOCs" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690" + +SRC_URI = "\ + file://71-fsl-dpaa-persistent-networking.rules \ + file://72-fsl-dpaa-persistent-networking.rules \ +" +RULE ?= "71-fsl-dpaa-persistent-networking.rules" +RULE_e6500 = "72-fsl-dpaa-persistent-networking.rules" +RULE_e6500-64b = "72-fsl-dpaa-persistent-networking.rules" +RULE_t1024 = "72-fsl-dpaa-persistent-networking.rules" + +do_install () { + install -d ${D}${sysconfdir}/udev/rules.d/ + install -m 0644 ${WORKDIR}/${RULE} ${D}${sysconfdir}/udev/rules.d/ + + # skip mmc rpmb partitions + echo "/dev/mmcblk.*rpmb" >>${D}${sysconfdir}/udev/mount.blacklist + # skip nbd (network block device) + echo "/dev/nbd*" >>${D}${sysconfdir}/udev/mount.blacklist +} + diff --git a/meta-fsl-ppc/recipes-core/udev/udev-rules-qoriq/qoriq-ppc/71-fsl-dpaa-persistent-networking.rules b/meta-fsl-ppc/recipes-core/udev/udev-rules-qoriq/qoriq-ppc/71-fsl-dpaa-persistent-networking.rules new file mode 100644 index 00000000..6c6dc354 --- /dev/null +++ b/meta-fsl-ppc/recipes-core/udev/udev-rules-qoriq/qoriq-ppc/71-fsl-dpaa-persistent-networking.rules @@ -0,0 +1,20 @@ +# Rules for handling naming the DPAA FMan ethernet ports in a consistent way +SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe4e0000", NAME="fm1-gb0" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe4e2000", NAME="fm1-gb1" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe4e4000", NAME="fm1-gb2" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe4e6000", NAME="fm1-gb3" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe4e8000", NAME="fm1-gb4" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe4f0000", NAME="fm1-10g" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe5e0000", NAME="fm2-gb0" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe5e2000", NAME="fm2-gb1" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe5e4000", NAME="fm2-gb2" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe5e6000", NAME="fm2-gb3" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe5e8000", NAME="fm2-gb4" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe5f0000", NAME="fm2-10g" + +# P1023 has its Fman @ different offsets +SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ff7e0000", NAME="fm1-gb0" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ff7e2000", NAME="fm1-gb1" + +# Rename macless0 port to "macless0" +SUBSYSTEM=="net", ATTR{device_type}=="macless0", NAME="macless0" diff --git a/meta-fsl-ppc/recipes-core/udev/udev-rules-qoriq/qoriq-ppc/72-fsl-dpaa-persistent-networking.rules b/meta-fsl-ppc/recipes-core/udev/udev-rules-qoriq/qoriq-ppc/72-fsl-dpaa-persistent-networking.rules new file mode 100644 index 00000000..d0eec9ce --- /dev/null +++ b/meta-fsl-ppc/recipes-core/udev/udev-rules-qoriq/qoriq-ppc/72-fsl-dpaa-persistent-networking.rules @@ -0,0 +1,24 @@ +# Rules for handling naming the DPAA FMan ethernet ports in a consistent way +SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe4e0000", NAME="fm1-mac1" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe4e2000", NAME="fm1-mac2" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe4e4000", NAME="fm1-mac3" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe4e6000", NAME="fm1-mac4" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe4e8000", NAME="fm1-mac5" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe4ea000", NAME="fm1-mac6" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe4ec000", NAME="fm1-mac7" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe4ee000", NAME="fm1-mac8" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe4f0000", NAME="fm1-mac9" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe4f2000", NAME="fm1-mac10" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe5e0000", NAME="fm2-mac1" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe5e2000", NAME="fm2-mac2" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe5e4000", NAME="fm2-mac3" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe5e6000", NAME="fm2-mac4" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe5e8000", NAME="fm2-mac5" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe5ea000", NAME="fm2-mac6" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe5ec000", NAME="fm2-mac7" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe5ee000", NAME="fm2-mac8" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe5f0000", NAME="fm2-mac9" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe5f2000", NAME="fm2-mac10" + +# Rename macless0 to "macless0" +SUBSYSTEM=="net", ATTR{device_type}=="macless0", NAME="macless0" diff --git a/meta-fsl-ppc/recipes-core/udev/udev-rules-qoriq/qoriq-ppc/automount.rules b/meta-fsl-ppc/recipes-core/udev/udev-rules-qoriq/qoriq-ppc/automount.rules new file mode 100644 index 00000000..a47efdab --- /dev/null +++ b/meta-fsl-ppc/recipes-core/udev/udev-rules-qoriq/qoriq-ppc/automount.rules @@ -0,0 +1,23 @@ +# There are a number of modifiers that are allowed to be used in some +# of the different fields. They provide the following subsitutions: +# +# %n the "kernel number" of the device. +# For example, 'sda3' has a "kernel number" of '3' +# %e the smallest number for that name which does not matches an existing node +# %k the kernel name for the device +# %M the kernel major number for the device +# %m the kernel minor number for the device +# %b the bus id for the device +# %c the string returned by the PROGRAM +# %s{filename} the content of a sysfs attribute +# %% the '%' char itself +# + +SUBSYSTEM=="block", ENV{DEVTYPE}=="partition", GOTO="automount_end" + +# Media automounting +SUBSYSTEM=="block", ACTION=="add" RUN+="/etc/udev/scripts/mount.sh" +SUBSYSTEM=="block", ACTION=="remove" RUN+="/etc/udev/scripts/mount.sh" + +LABEL="automount_end" + -- cgit v1.2.3-54-g00ecf From 9d9bfaf710bc0648e9259ec9d7e7cc9eb9219cf7 Mon Sep 17 00:00:00 2001 From: Cristian Stoica Date: Wed, 7 Jan 2015 17:55:00 +0800 Subject: openssl: upgrade to 1.0.1i plus Freescale patches - include fixes for algorithm registration and 32-bit application hanging on E5500 cores. - add offloading suport for aes-gcm - upstream patches are kept except for the documentation patch which is no longer necessary Signed-off-by: Cristian Stoica --- .../machine/include/qoriq-default-versions.inc | 2 +- ...double-initialization-of-cryptodev-engine.patch | 18 +- ...2-ECC-Support-header-for-Cryptodev-Engine.patch | 318 --- ...ev-add-support-for-TLS-algorithms-offload.patch | 317 +++ ...03-add-support-for-TLS-algorithms-offload.patch | 296 --- ...0003-cryptodev-fix-algorithm-registration.patch | 64 + .../0004-Fixed-private-key-support-for-DH.patch | 33 - ...ake-it-more-robust-and-recognize-KERNEL_B.patch | 74 + ...5-ECC-Support-header-for-Cryptodev-Engine.patch | 318 +++ .../0005-Fixed-private-key-support-for-DH.patch | 35 - .../0006-Fixed-private-key-support-for-DH.patch | 33 + ...itial-support-for-PKC-in-cryptodev-engine.patch | 1563 --------------- ...007-Added-hwrng-dev-file-as-source-of-RNG.patch | 28 - .../0007-Fixed-private-key-support-for-DH.patch | 35 + ...s-interface-added-for-PKC-cryptodev-inter.patch | 2039 -------------------- ...itial-support-for-PKC-in-cryptodev-engine.patch | 1564 +++++++++++++++ ...009-Added-hwrng-dev-file-as-source-of-RNG.patch | 28 + ...ev-extend-TLS-offload-with-new-algorithms.patch | 106 - ...gen-operation-and-support-gendsa-command-.patch | 153 -- ...s-interface-added-for-PKC-cryptodev-inter.patch | 2039 ++++++++++++++++++++ ...gen-operation-and-support-gendsa-command-.patch | 153 ++ .../openssl/openssl-fsl/0011-RSA-Keygen-Fix.patch | 64 - .../openssl/openssl-fsl/0012-RSA-Keygen-Fix.patch | 64 + .../0012-Removed-local-copy-of-curve_t-type.patch | 164 -- ...us-parameter-is-not-populated-by-dhparams.patch | 43 - .../0013-Removed-local-copy-of-curve_t-type.patch | 164 ++ ...us-parameter-is-not-populated-by-dhparams.patch | 43 + .../0014-SW-Backoff-mechanism-for-dsa-keygen.patch | 53 - .../0015-Fixed-DH-keygen-pair-generator.patch | 100 - .../0015-SW-Backoff-mechanism-for-dsa-keygen.patch | 53 + .../0016-Fixed-DH-keygen-pair-generator.patch | 100 + ...dd-support-for-aes-gcm-algorithm-offloadi.patch | 309 +++ .../openssl/openssl/openssl-fix-doc.patch | 401 ---- .../recipes-connectivity/openssl/openssl_1.0.1g.bb | 55 - .../openssl/openssl_1.0.1g.bbappend | 59 - .../recipes-connectivity/openssl/openssl_1.0.1i.bb | 55 + .../openssl/openssl_1.0.1i.bbappend | 60 + 37 files changed, 5483 insertions(+), 5520 deletions(-) delete mode 100644 meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0002-ECC-Support-header-for-Cryptodev-Engine.patch create mode 100644 meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0002-eng_cryptodev-add-support-for-TLS-algorithms-offload.patch delete mode 100644 meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0003-add-support-for-TLS-algorithms-offload.patch create mode 100644 meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0003-cryptodev-fix-algorithm-registration.patch delete mode 100644 meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0004-Fixed-private-key-support-for-DH.patch create mode 100644 meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0004-linux-pcc-make-it-more-robust-and-recognize-KERNEL_B.patch create mode 100644 meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0005-ECC-Support-header-for-Cryptodev-Engine.patch delete mode 100644 meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0005-Fixed-private-key-support-for-DH.patch create mode 100644 meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0006-Fixed-private-key-support-for-DH.patch delete mode 100644 meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0006-Initial-support-for-PKC-in-cryptodev-engine.patch delete mode 100644 meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0007-Added-hwrng-dev-file-as-source-of-RNG.patch create mode 100644 meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0007-Fixed-private-key-support-for-DH.patch delete mode 100644 meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0008-Asynchronous-interface-added-for-PKC-cryptodev-inter.patch create mode 100644 meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0008-Initial-support-for-PKC-in-cryptodev-engine.patch create mode 100644 meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0009-Added-hwrng-dev-file-as-source-of-RNG.patch delete mode 100644 meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0009-eng_cryptodev-extend-TLS-offload-with-new-algorithms.patch delete mode 100644 meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0010-Add-RSA-keygen-operation-and-support-gendsa-command-.patch create mode 100644 meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0010-Asynchronous-interface-added-for-PKC-cryptodev-inter.patch create mode 100644 meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0011-Add-RSA-keygen-operation-and-support-gendsa-command-.patch delete mode 100644 meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0011-RSA-Keygen-Fix.patch create mode 100644 meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0012-RSA-Keygen-Fix.patch delete mode 100644 meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0012-Removed-local-copy-of-curve_t-type.patch delete mode 100644 meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0013-Modulus-parameter-is-not-populated-by-dhparams.patch create mode 100644 meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0013-Removed-local-copy-of-curve_t-type.patch create mode 100644 meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0014-Modulus-parameter-is-not-populated-by-dhparams.patch delete mode 100644 meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0014-SW-Backoff-mechanism-for-dsa-keygen.patch delete mode 100644 meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0015-Fixed-DH-keygen-pair-generator.patch create mode 100644 meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0015-SW-Backoff-mechanism-for-dsa-keygen.patch create mode 100644 meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0016-Fixed-DH-keygen-pair-generator.patch create mode 100644 meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0017-cryptodev-add-support-for-aes-gcm-algorithm-offloadi.patch delete mode 100644 meta-fsl-ppc/recipes-connectivity/openssl/openssl/openssl-fix-doc.patch delete mode 100644 meta-fsl-ppc/recipes-connectivity/openssl/openssl_1.0.1g.bb delete mode 100644 meta-fsl-ppc/recipes-connectivity/openssl/openssl_1.0.1g.bbappend create mode 100644 meta-fsl-ppc/recipes-connectivity/openssl/openssl_1.0.1i.bb create mode 100644 meta-fsl-ppc/recipes-connectivity/openssl/openssl_1.0.1i.bbappend diff --git a/meta-fsl-ppc/conf/machine/include/qoriq-default-versions.inc b/meta-fsl-ppc/conf/machine/include/qoriq-default-versions.inc index 3bb03ba0..639e61e9 100644 --- a/meta-fsl-ppc/conf/machine/include/qoriq-default-versions.inc +++ b/meta-fsl-ppc/conf/machine/include/qoriq-default-versions.inc @@ -1,3 +1,3 @@ PREFERRED_VERSION_qemu = "1.7+fsl" -PREFERRED_VERSION_openssl = "1.0.1g" +PREFERRED_VERSION_openssl = "1.0.1i" diff --git a/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0001-remove-double-initialization-of-cryptodev-engine.patch b/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0001-remove-double-initialization-of-cryptodev-engine.patch index eae68780..233cf6e2 100644 --- a/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0001-remove-double-initialization-of-cryptodev-engine.patch +++ b/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0001-remove-double-initialization-of-cryptodev-engine.patch @@ -1,20 +1,20 @@ -From f174dd904fb4995a89eed53be3e2ebf7bee25a9b Mon Sep 17 00:00:00 2001 +From 9297e3834518ff0558d6e7004a62adfd107e659a Mon Sep 17 00:00:00 2001 From: Cristian Stoica Date: Tue, 10 Sep 2013 12:46:46 +0300 -Subject: [PATCH][fsl 01/15] remove double initialization of cryptodev engine - -Upstream-status: Pending +Subject: [PATCH 01/17] remove double initialization of cryptodev engine cryptodev engine is initialized together with the other engines in ENGINE_load_builtin_engines. The initialization done through OpenSSL_add_all_algorithms is redundant. +Change-Id: Ic9488500967595543ff846f147b36f383db7cb27 Signed-off-by: Cristian Stoica +Reviewed-on: http://git.am.freescale.net:8181/17222 --- - crypto/engine/eng_all.c | 11 ----------- - crypto/engine/engine.h | 4 ---- - crypto/evp/c_all.c | 5 ----- - util/libeay.num | 2 +- + crypto/engine/eng_all.c | 11 ----------- + crypto/engine/engine.h | 4 ---- + crypto/evp/c_all.c | 5 ----- + util/libeay.num | 2 +- 4 files changed, 1 insertion(+), 21 deletions(-) diff --git a/crypto/engine/eng_all.c b/crypto/engine/eng_all.c @@ -79,5 +79,5 @@ index aa86b2b..ae50040 100755 EVP_aes_128_cfb8 3248 EXIST::FUNCTION:AES FIPS_corrupt_rsa 3249 NOEXIST::FUNCTION: -- -1.7.9.7 +1.8.3.1 diff --git a/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0002-ECC-Support-header-for-Cryptodev-Engine.patch b/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0002-ECC-Support-header-for-Cryptodev-Engine.patch deleted file mode 100644 index 717a345a..00000000 --- a/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0002-ECC-Support-header-for-Cryptodev-Engine.patch +++ /dev/null @@ -1,318 +0,0 @@ -From 154601fba4907a7eb3f98e670d62cfa15a767500 Mon Sep 17 00:00:00 2001 -From: Yashpal Dutta -Date: Tue, 11 Mar 2014 05:56:54 +0545 -Subject: [PATCH][fsl 02/15] ECC Support header for Cryptodev Engine - -Upstream-status: Pending - -Signed-off-by: Yashpal Dutta ---- - crypto/engine/eng_cryptodev_ec.h | 296 ++++++++++++++++++++++++++++++++++++++ - 1 file changed, 296 insertions(+) - create mode 100644 crypto/engine/eng_cryptodev_ec.h - -diff --git a/crypto/engine/eng_cryptodev_ec.h b/crypto/engine/eng_cryptodev_ec.h -new file mode 100644 -index 0000000..77aee71 ---- /dev/null -+++ b/crypto/engine/eng_cryptodev_ec.h -@@ -0,0 +1,296 @@ -+/* -+ * Copyright (C) 2012 Freescale Semiconductor, Inc. -+ * -+ * 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. -+ * -+ * 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 __ENG_EC_H -+#define __ENG_EC_H -+ -+#define SPCF_CPARAM_INIT(X,...) \ -+static unsigned char X##_c[] = {__VA_ARGS__} \ -+ -+#define SPCF_FREE_BN(X) do { if(X) { BN_clear_free(X); X = NULL; } } while (0) -+ -+#define SPCF_COPY_CPARAMS(NIDBUF) \ -+ do { \ -+ memcpy (buf, NIDBUF, buf_len); \ -+ } while (0) -+ -+#define SPCF_CPARAM_CASE(X) \ -+ case NID_##X: \ -+ SPCF_COPY_CPARAMS(X##_c); \ -+ break -+ -+SPCF_CPARAM_INIT(sect113r1, 0x01, 0x73, 0xE8, 0x34, 0xAF, 0x28, 0xEC, 0x76, -+ 0xCB, 0x83, 0xBD, 0x8D, 0xFE, 0xB2, 0xD5); -+SPCF_CPARAM_INIT(sect113r2, 0x00, 0x54, 0xD9, 0xF0, 0x39, 0x57, 0x17, 0x4A, -+ 0x32, 0x32, 0x91, 0x67, 0xD7, 0xFE, 0x71); -+SPCF_CPARAM_INIT(sect131r1, 0x03, 0xDB, 0x89, 0xB4, 0x05, 0xE4, 0x91, 0x16, -+ 0x0E, 0x3B, 0x2F, 0x07, 0xB0, 0xCE, 0x20, 0xB3, 0x7E); -+SPCF_CPARAM_INIT(sect131r2, 0x07, 0xCB, 0xB9, 0x92, 0x0D, 0x71, 0xA4, 0x8E, -+ 0x09, 0x9C, 0x38, 0xD7, 0x1D, 0xA6, 0x49, 0x0E, 0xB1); -+SPCF_CPARAM_INIT(sect163k1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x01); -+SPCF_CPARAM_INIT(sect163r1, 0x05, 0xED, 0x40, 0x3E, 0xD5, 0x8E, 0xB4, 0x5B, -+ 0x1C, 0xCE, 0xCA, 0x0F, 0x4F, 0x61, 0x65, 0x55, 0x49, 0x86, -+ 0x1B, 0xE0, 0x52); -+SPCF_CPARAM_INIT(sect163r2, 0x07, 0x2C, 0x4E, 0x1E, 0xF7, 0xCB, 0x2F, 0x3A, -+ 0x03, 0x5D, 0x33, 0x10, 0x42, 0x94, 0x15, 0x96, 0x09, 0x13, -+ 0x8B, 0xB4, 0x04); -+SPCF_CPARAM_INIT(sect193r1, 0x01, 0x67, 0xB3, 0x5E, 0xB4, 0x31, 0x3F, 0x26, -+ 0x3D, 0x0F, 0x7A, 0x3D, 0x50, 0x36, 0xF0, 0xA0, 0xA3, 0xC9, -+ 0x80, 0xD4, 0x0E, 0x5A, 0x05, 0x3E, 0xD2); -+SPCF_CPARAM_INIT(sect193r2, 0x00, 0x69, 0x89, 0xFE, 0x6B, 0xFE, 0x30, 0xED, -+ 0xDC, 0x32, 0x44, 0x26, 0x9F, 0x3A, 0xAD, 0x18, 0xD6, 0x6C, -+ 0xF3, 0xDB, 0x3E, 0x33, 0x02, 0xFA, 0xA8); -+SPCF_CPARAM_INIT(sect233k1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x01); -+SPCF_CPARAM_INIT(sect233r1, 0x00, 0x07, 0xD5, 0xEF, 0x43, 0x89, 0xDF, 0xF1, -+ 0x1E, 0xCD, 0xBA, 0x39, 0xC3, 0x09, 0x70, 0xD3, 0xCE, 0x35, -+ 0xCE, 0xBB, 0xA5, 0x84, 0x73, 0xF6, 0x4B, 0x4D, 0xC0, 0xF2, -+ 0x68, 0x6C); -+SPCF_CPARAM_INIT(sect239k1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x01); -+SPCF_CPARAM_INIT(sect283k1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01); -+SPCF_CPARAM_INIT(sect283r1, 0x03, 0xD8, 0xC9, 0x3D, 0x3B, 0x0E, 0xA8, 0x1D, -+ 0x92, 0x94, 0x03, 0x4D, 0x7E, 0xE3, 0x13, 0x5D, 0x0A, 0xC5, -+ 0xFC, 0x8D, 0x9C, 0xB0, 0x27, 0x6F, 0x72, 0x11, 0xF8, 0x80, -+ 0xF0, 0xD8, 0x1C, 0xA4, 0xC6, 0xE8, 0x7B, 0x38); -+SPCF_CPARAM_INIT(sect409k1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x01); -+SPCF_CPARAM_INIT(sect409r1, 0x01, 0x49, 0xB8, 0xB7, 0xBE, 0xBD, 0x9B, 0x63, -+ 0x65, 0x3E, 0xF1, 0xCD, 0x8C, 0x6A, 0x5D, 0xD1, 0x05, 0xA2, -+ 0xAA, 0xAC, 0x36, 0xFE, 0x2E, 0xAE, 0x43, 0xCF, 0x28, 0xCE, -+ 0x1C, 0xB7, 0xC8, 0x30, 0xC1, 0xEC, 0xDB, 0xFA, 0x41, 0x3A, -+ 0xB0, 0x7F, 0xE3, 0x5A, 0x57, 0x81, 0x1A, 0xE4, 0xF8, 0x8D, -+ 0x30, 0xAC, 0x63, 0xFB); -+SPCF_CPARAM_INIT(sect571k1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x01); -+SPCF_CPARAM_INIT(sect571r1, 0x06, 0x39, 0x5D, 0xB2, 0x2A, 0xB5, 0x94, 0xB1, -+ 0x86, 0x8C, 0xED, 0x95, 0x25, 0x78, 0xB6, 0x53, 0x9F, 0xAB, -+ 0xA6, 0x94, 0x06, 0xD9, 0xB2, 0x98, 0x61, 0x23, 0xA1, 0x85, -+ 0xC8, 0x58, 0x32, 0xE2, 0x5F, 0xD5, 0xB6, 0x38, 0x33, 0xD5, -+ 0x14, 0x42, 0xAB, 0xF1, 0xA9, 0xC0, 0x5F, 0xF0, 0xEC, 0xBD, -+ 0x88, 0xD7, 0xF7, 0x79, 0x97, 0xF4, 0xDC, 0x91, 0x56, 0xAA, -+ 0xF1, 0xCE, 0x08, 0x16, 0x46, 0x86, 0xDD, 0xFF, 0x75, 0x11, -+ 0x6F, 0xBC, 0x9A, 0x7A); -+SPCF_CPARAM_INIT(X9_62_c2pnb163v1, 0x04, 0x53, 0xE1, 0xE4, 0xB7, 0x29, 0x1F, -+ 0x5C, 0x2D, 0x53, 0xCE, 0x18, 0x48, 0x3F, 0x00, 0x70, 0x81, -+ 0xE7, 0xEA, 0x26, 0xEC); -+SPCF_CPARAM_INIT(X9_62_c2pnb163v2, 0x04, 0x35, 0xC0, 0x19, 0x66, 0x0E, 0x01, -+ 0x01, 0xBA, 0x87, 0x0C, 0xA3, 0x9F, 0xD9, 0xA7, 0x76, 0x86, -+ 0x50, 0x9D, 0x28, 0x13); -+SPCF_CPARAM_INIT(X9_62_c2pnb163v3, 0x06, 0x55, 0xC4, 0x54, 0xE4, 0x1E, 0x38, -+ 0x0C, 0x7A, 0x60, 0xB6, 0x67, 0x9A, 0x5B, 0x7A, 0x3F, 0x3A, -+ 0xF6, 0x8E, 0x22, 0xC5); -+SPCF_CPARAM_INIT(X9_62_c2pnb176v1, 0x00, 0x69, 0xF7, 0xDA, 0x36, 0x19, 0xA7, -+ 0x42, 0xA3, 0x82, 0xFF, 0x05, 0x08, 0x8F, 0xD3, 0x99, 0x42, -+ 0xCA, 0x0F, 0x1D, 0x90, 0xB6, 0x5B); -+SPCF_CPARAM_INIT(X9_62_c2tnb191v1, 0x4C, 0x45, 0x25, 0xAB, 0x0B, 0x68, 0x4A, -+ 0x64, 0x44, 0x62, 0x0A, 0x86, 0x45, 0xEF, 0x54, 0x6D, 0x54, -+ 0x69, 0x39, 0x68, 0xC2, 0xAE, 0x84, 0xAC); -+SPCF_CPARAM_INIT(X9_62_c2tnb191v2, 0x03, 0x7C, 0x8F, 0x57, 0xA2, 0x25, 0xC7, -+ 0xB3, 0xD4, 0xED, 0xD5, 0x88, 0x0F, 0x38, 0x0A, 0xCC, 0x55, -+ 0x74, 0xEC, 0xB3, 0x6C, 0x9F, 0x51, 0x21); -+SPCF_CPARAM_INIT(X9_62_c2tnb191v3, 0x37, 0x39, 0xFF, 0x98, 0xB4, 0xD1, 0x69, -+ 0x3E, 0xCF, 0x52, 0x7A, 0x98, 0x51, 0xED, 0xCF, 0x99, 0x9D, -+ 0x9E, 0x75, 0x05, 0x43, 0x33, 0x43, 0x24); -+SPCF_CPARAM_INIT(X9_62_c2pnb208w1, 0x00, 0xDB, 0x05, 0x3C, 0x41, 0x76, 0xCC, -+ 0x1D, 0xA1, 0x27, 0x85, 0x2C, 0xA6, 0xD9, 0x88, 0xBE, 0x1A, -+ 0xCC, 0xD1, 0x5B, 0x2A, 0xC1, 0xC1, 0x07, 0x42, 0x57, 0x34); -+SPCF_CPARAM_INIT(X9_62_c2tnb239v1, 0x24, 0x59, 0xFC, 0xF4, 0x51, 0x7B, 0xC5, -+ 0xA6, 0xB9, 0x9B, 0xE5, 0xC6, 0xC5, 0x62, 0x85, 0xC0, 0x21, -+ 0xFE, 0x32, 0xEE, 0x2B, 0x6F, 0x1C, 0x22, 0xEA, 0x5B, 0xE1, -+ 0xB8, 0x4B, 0x93); -+SPCF_CPARAM_INIT(X9_62_c2tnb239v2, 0x64, 0x98, 0x84, 0x19, 0x3B, 0x56, 0x2D, -+ 0x4A, 0x50, 0xB4, 0xFA, 0x56, 0x34, 0xE0, 0x34, 0x41, 0x3F, -+ 0x94, 0xC4, 0x59, 0xDA, 0x7C, 0xDB, 0x16, 0x64, 0x9D, 0xDD, -+ 0xF7, 0xE6, 0x0A); -+SPCF_CPARAM_INIT(X9_62_c2tnb239v3, 0x32, 0x63, 0x2E, 0x65, 0x2B, 0xEE, 0x91, -+ 0xC2, 0xE4, 0xA2, 0xF5, 0x42, 0xA3, 0x2D, 0x67, 0xA8, 0xB5, -+ 0xB4, 0x5F, 0x21, 0xA0, 0x81, 0x02, 0xFB, 0x1F, 0x2A, 0xFB, -+ 0xB6, 0xAC, 0xDA); -+SPCF_CPARAM_INIT(X9_62_c2pnb272w1, 0x00, 0xDA, 0x7B, 0x60, 0x28, 0xF4, 0xC8, -+ 0x09, 0xA0, 0xB9, 0x78, 0x81, 0xC3, 0xA5, 0x7E, 0x4D, 0x71, -+ 0x81, 0x34, 0xD1, 0x3F, 0xEC, 0xE0, 0x90, 0x85, 0x8A, 0xC3, -+ 0x1A, 0xE2, 0xDC, 0x2E, 0xDF, 0x8E, 0x3C, 0x8B); -+SPCF_CPARAM_INIT(X9_62_c2pnb304w1, 0x00, 0x3C, 0x67, 0xB4, 0x07, 0xC6, 0xF3, -+ 0x3F, 0x81, 0x0B, 0x17, 0xDC, 0x16, 0xE2, 0x14, 0x8A, 0x2C, -+ 0x9C, 0xE2, 0x9D, 0x56, 0x05, 0x23, 0x69, 0x6A, 0x55, 0x93, -+ 0x8A, 0x15, 0x40, 0x81, 0xE3, 0xE3, 0xAE, 0xFB, 0xCE, 0x45, -+ 0x70, 0xC9); -+SPCF_CPARAM_INIT(X9_62_c2tnb359v1, 0x22, 0x39, 0xAA, 0x58, 0x4A, 0xC5, 0x9A, -+ 0xF9, 0x61, 0xD0, 0xFA, 0x2D, 0x52, 0x85, 0xB6, 0xFD, 0xF7, -+ 0x34, 0x9B, 0xC6, 0x0E, 0x91, 0xE3, 0x20, 0xF4, 0x71, 0x64, -+ 0xCE, 0x11, 0xF5, 0x18, 0xEF, 0xB4, 0xC0, 0x8B, 0x9B, 0xDA, -+ 0x99, 0x9A, 0x8A, 0x37, 0xF8, 0x2A, 0x22, 0x61); -+SPCF_CPARAM_INIT(X9_62_c2pnb368w1, 0x00, 0xC0, 0x6C, 0xCF, 0x42, 0x89, 0x3A, -+ 0x8A, 0xAA, 0x00, 0x1E, 0x0B, 0xC0, 0xD2, 0xA2, 0x27, 0x66, -+ 0xEF, 0x3E, 0x41, 0x88, 0x7C, 0xC6, 0x77, 0x6F, 0x4A, 0x04, -+ 0x1E, 0xE4, 0x45, 0x14, 0xB2, 0x0A, 0xFC, 0x4E, 0x5C, 0x30, -+ 0x40, 0x60, 0x06, 0x5B, 0xC8, 0xD6, 0xCF, 0x04, 0xD3, 0x25); -+SPCF_CPARAM_INIT(X9_62_c2tnb431r1, 0x64, 0xF5, 0xBB, 0xE9, 0xBB, 0x31, 0x66, -+ 0xA3, 0xA0, 0x2F, 0x2F, 0x22, 0xBF, 0x05, 0xD9, 0xF7, 0xDA, -+ 0x43, 0xEE, 0x70, 0xC1, 0x79, 0x03, 0x15, 0x2B, 0x70, 0xA0, -+ 0xB4, 0x25, 0x9B, 0xD2, 0xFC, 0xB2, 0x20, 0x3B, 0x7F, 0xB8, -+ 0xD3, 0x39, 0x4E, 0x20, 0xEB, 0x0E, 0xA9, 0x84, 0xDD, 0xB1, -+ 0xE1, 0xF1, 0x4C, 0x67, 0xB1, 0x36, 0x2B); -+SPCF_CPARAM_INIT(wap_wsg_idm_ecid_wtls1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01); -+SPCF_CPARAM_INIT(wap_wsg_idm_ecid_wtls3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x01); -+SPCF_CPARAM_INIT(wap_wsg_idm_ecid_wtls4, 0x01, 0x73, 0xE8, 0x34, 0xAF, 0x28, -+ 0xEC, 0x76, 0xCB, 0x83, 0xBD, 0x8D, 0xFE, 0xB2, 0xD5); -+SPCF_CPARAM_INIT(wap_wsg_idm_ecid_wtls5, 0x04, 0x53, 0xE1, 0xE4, 0xB7, 0x29, -+ 0x1F, 0x5C, 0x2D, 0x53, 0xCE, 0x18, 0x48, 0x3F, 0x00, 0x70, -+ 0x81, 0xE7, 0xEA, 0x26, 0xEC); -+SPCF_CPARAM_INIT(wap_wsg_idm_ecid_wtls10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x01); -+SPCF_CPARAM_INIT(wap_wsg_idm_ecid_wtls11, 0x00, 0x07, 0xD5, 0xEF, 0x43, 0x89, -+ 0xDF, 0xF1, 0x1E, 0xCD, 0xBA, 0x39, 0xC3, 0x09, 0x70, 0xD3, -+ 0xCE, 0x35, 0xCE, 0xBB, 0xA5, 0x84, 0x73, 0xF6, 0x4B, 0x4D, -+ 0xC0, 0xF2, 0x68, 0x6C); -+/* Oakley curve #3 over 155 bit binary filed */ -+SPCF_CPARAM_INIT(ipsec3, 0x00, 0x31, 0x10, 0x00, 0x00, 0x02, 0x23, 0xA0, 0x00, -+ 0xC4, 0x47, 0x40, 0x00, 0x08, 0x8E, 0x80, 0x00, 0x11, 0x1D, -+ 0x1D); -+/* Oakley curve #4 over 185 bit binary filed */ -+SPCF_CPARAM_INIT(ipsec4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, -+ 0x01, 0x80, 0x00, 0xC0, 0x0C, 0x00, 0x00, 0x00, 0x63, 0x80, -+ 0x30, 0x00, 0x1C, 0x00, 0x09); -+ -+static inline int -+eng_ec_get_cparam(int nid, unsigned char *buf, unsigned int buf_len) -+{ -+ int ret = 0; -+ switch (nid) { -+ SPCF_CPARAM_CASE(sect113r1); -+ SPCF_CPARAM_CASE(sect113r2); -+ SPCF_CPARAM_CASE(sect131r1); -+ SPCF_CPARAM_CASE(sect131r2); -+ SPCF_CPARAM_CASE(sect163k1); -+ SPCF_CPARAM_CASE(sect163r1); -+ SPCF_CPARAM_CASE(sect163r2); -+ SPCF_CPARAM_CASE(sect193r1); -+ SPCF_CPARAM_CASE(sect193r2); -+ SPCF_CPARAM_CASE(sect233k1); -+ SPCF_CPARAM_CASE(sect233r1); -+ SPCF_CPARAM_CASE(sect239k1); -+ SPCF_CPARAM_CASE(sect283k1); -+ SPCF_CPARAM_CASE(sect283r1); -+ SPCF_CPARAM_CASE(sect409k1); -+ SPCF_CPARAM_CASE(sect409r1); -+ SPCF_CPARAM_CASE(sect571k1); -+ SPCF_CPARAM_CASE(sect571r1); -+ SPCF_CPARAM_CASE(X9_62_c2pnb163v1); -+ SPCF_CPARAM_CASE(X9_62_c2pnb163v2); -+ SPCF_CPARAM_CASE(X9_62_c2pnb163v3); -+ SPCF_CPARAM_CASE(X9_62_c2pnb176v1); -+ SPCF_CPARAM_CASE(X9_62_c2tnb191v1); -+ SPCF_CPARAM_CASE(X9_62_c2tnb191v2); -+ SPCF_CPARAM_CASE(X9_62_c2tnb191v3); -+ SPCF_CPARAM_CASE(X9_62_c2pnb208w1); -+ SPCF_CPARAM_CASE(X9_62_c2tnb239v1); -+ SPCF_CPARAM_CASE(X9_62_c2tnb239v2); -+ SPCF_CPARAM_CASE(X9_62_c2tnb239v3); -+ SPCF_CPARAM_CASE(X9_62_c2pnb272w1); -+ SPCF_CPARAM_CASE(X9_62_c2pnb304w1); -+ SPCF_CPARAM_CASE(X9_62_c2tnb359v1); -+ SPCF_CPARAM_CASE(X9_62_c2pnb368w1); -+ SPCF_CPARAM_CASE(X9_62_c2tnb431r1); -+ SPCF_CPARAM_CASE(wap_wsg_idm_ecid_wtls1); -+ SPCF_CPARAM_CASE(wap_wsg_idm_ecid_wtls3); -+ SPCF_CPARAM_CASE(wap_wsg_idm_ecid_wtls4); -+ SPCF_CPARAM_CASE(wap_wsg_idm_ecid_wtls5); -+ SPCF_CPARAM_CASE(wap_wsg_idm_ecid_wtls10); -+ SPCF_CPARAM_CASE(wap_wsg_idm_ecid_wtls11); -+ /* Oakley curve #3 over 155 bit binary filed */ -+ SPCF_CPARAM_CASE(ipsec3); -+ /* Oakley curve #4 over 185 bit binary filed */ -+ SPCF_CPARAM_CASE(ipsec4); -+ default: -+ ret = -EINVAL; -+ break; -+ } -+ return ret; -+} -+ -+/* Copies the curve points to a flat buffer with appropriate padding */ -+static inline unsigned char *eng_copy_curve_points(BIGNUM * x, BIGNUM * y, -+ int xy_len, int crv_len) -+{ -+ unsigned char *xy = NULL; -+ int len1 = 0, len2 = 0; -+ -+ len1 = BN_num_bytes(x); -+ len2 = BN_num_bytes(y); -+ -+ if (!(xy = malloc(xy_len))) { -+ return NULL; -+ } -+ -+ memset(xy, 0, xy_len); -+ -+ if (len1 < crv_len) { -+ if (!BN_is_zero(x)) -+ BN_bn2bin(x, xy + (crv_len - len1)); -+ } else { -+ BN_bn2bin(x, xy); -+ } -+ -+ if (len2 < crv_len) { -+ if (!BN_is_zero(y)) -+ BN_bn2bin(y, xy+crv_len+(crv_len-len2)); -+ } else { -+ BN_bn2bin(y, xy+crv_len); -+ } -+ -+ return xy; -+} -+ -+enum curve_t { -+ DISCRETE_LOG, -+ ECC_PRIME, -+ ECC_BINARY, -+ MAX_ECC_TYPE -+}; -+#endif --- -1.7.9.7 - diff --git a/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0002-eng_cryptodev-add-support-for-TLS-algorithms-offload.patch b/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0002-eng_cryptodev-add-support-for-TLS-algorithms-offload.patch new file mode 100644 index 00000000..0b77bfa8 --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0002-eng_cryptodev-add-support-for-TLS-algorithms-offload.patch @@ -0,0 +1,317 @@ +From dfd6ba263dc25ea2a4bbc32448b24ca2b1fc40e8 Mon Sep 17 00:00:00 2001 +From: Cristian Stoica +Date: Thu, 29 Aug 2013 16:51:18 +0300 +Subject: [PATCH 02/17] eng_cryptodev: add support for TLS algorithms offload + +- aes-128-cbc-hmac-sha1 +- aes-256-cbc-hmac-sha1 + +Requires TLS patches on cryptodev and TLS algorithm support in Linux +kernel driver. + +Change-Id: I43048caa348414daddd6c1a5cdc55e769ac1945f +Signed-off-by: Cristian Stoica +Reviewed-on: http://git.am.freescale.net:8181/17223 +--- + crypto/engine/eng_cryptodev.c | 222 +++++++++++++++++++++++++++++++++++++++--- + 1 file changed, 211 insertions(+), 11 deletions(-) + +diff --git a/crypto/engine/eng_cryptodev.c b/crypto/engine/eng_cryptodev.c +index 5a715ac..7588a28 100644 +--- a/crypto/engine/eng_cryptodev.c ++++ b/crypto/engine/eng_cryptodev.c +@@ -72,6 +72,9 @@ ENGINE_load_cryptodev(void) + struct dev_crypto_state { + struct session_op d_sess; + int d_fd; ++ unsigned char *aad; ++ unsigned int aad_len; ++ unsigned int len; + + #ifdef USE_CRYPTODEV_DIGESTS + char dummy_mac_key[HASH_MAX_LEN]; +@@ -140,17 +143,20 @@ static struct { + int nid; + int ivmax; + int keylen; ++ int mackeylen; + } ciphers[] = { +- { CRYPTO_ARC4, NID_rc4, 0, 16, }, +- { CRYPTO_DES_CBC, NID_des_cbc, 8, 8, }, +- { CRYPTO_3DES_CBC, NID_des_ede3_cbc, 8, 24, }, +- { CRYPTO_AES_CBC, NID_aes_128_cbc, 16, 16, }, +- { CRYPTO_AES_CBC, NID_aes_192_cbc, 16, 24, }, +- { CRYPTO_AES_CBC, NID_aes_256_cbc, 16, 32, }, +- { CRYPTO_BLF_CBC, NID_bf_cbc, 8, 16, }, +- { CRYPTO_CAST_CBC, NID_cast5_cbc, 8, 16, }, +- { CRYPTO_SKIPJACK_CBC, NID_undef, 0, 0, }, +- { 0, NID_undef, 0, 0, }, ++ { CRYPTO_ARC4, NID_rc4, 0, 16, 0}, ++ { CRYPTO_DES_CBC, NID_des_cbc, 8, 8, 0}, ++ { CRYPTO_3DES_CBC, NID_des_ede3_cbc, 8, 24, 0}, ++ { CRYPTO_AES_CBC, NID_aes_128_cbc, 16, 16, 0}, ++ { CRYPTO_AES_CBC, NID_aes_192_cbc, 16, 24, 0}, ++ { CRYPTO_AES_CBC, NID_aes_256_cbc, 16, 32, 0}, ++ { CRYPTO_BLF_CBC, NID_bf_cbc, 8, 16, 0}, ++ { CRYPTO_CAST_CBC, NID_cast5_cbc, 8, 16, 0}, ++ { CRYPTO_SKIPJACK_CBC, NID_undef, 0, 0, 0}, ++ { CRYPTO_TLS10_AES_CBC_HMAC_SHA1, NID_aes_128_cbc_hmac_sha1, 16, 16, 20}, ++ { CRYPTO_TLS10_AES_CBC_HMAC_SHA1, NID_aes_256_cbc_hmac_sha1, 16, 32, 20}, ++ { 0, NID_undef, 0, 0, 0}, + }; + + #ifdef USE_CRYPTODEV_DIGESTS +@@ -250,13 +256,15 @@ get_cryptodev_ciphers(const int **cnids) + } + memset(&sess, 0, sizeof(sess)); + sess.key = (caddr_t)"123456789abcdefghijklmno"; ++ sess.mackey = (caddr_t)"123456789ABCDEFGHIJKLMNO"; + + for (i = 0; ciphers[i].id && count < CRYPTO_ALGORITHM_MAX; i++) { + if (ciphers[i].nid == NID_undef) + continue; + sess.cipher = ciphers[i].id; + sess.keylen = ciphers[i].keylen; +- sess.mac = 0; ++ sess.mackeylen = ciphers[i].mackeylen; ++ + if (ioctl(fd, CIOCGSESSION, &sess) != -1 && + ioctl(fd, CIOCFSESSION, &sess.ses) != -1) + nids[count++] = ciphers[i].nid; +@@ -414,6 +422,67 @@ cryptodev_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, + return (1); + } + ++ ++static int cryptodev_aead_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, ++ const unsigned char *in, size_t len) ++{ ++ struct crypt_auth_op cryp; ++ struct dev_crypto_state *state = ctx->cipher_data; ++ struct session_op *sess = &state->d_sess; ++ const void *iiv; ++ unsigned char save_iv[EVP_MAX_IV_LENGTH]; ++ ++ if (state->d_fd < 0) ++ return (0); ++ if (!len) ++ return (1); ++ if ((len % ctx->cipher->block_size) != 0) ++ return (0); ++ ++ memset(&cryp, 0, sizeof(cryp)); ++ ++ /* TODO: make a seamless integration with cryptodev flags */ ++ switch (ctx->cipher->nid) { ++ case NID_aes_128_cbc_hmac_sha1: ++ case NID_aes_256_cbc_hmac_sha1: ++ cryp.flags = COP_FLAG_AEAD_TLS_TYPE; ++ } ++ cryp.ses = sess->ses; ++ cryp.len = state->len; ++ cryp.src = (caddr_t) in; ++ cryp.dst = (caddr_t) out; ++ cryp.auth_src = state->aad; ++ cryp.auth_len = state->aad_len; ++ ++ cryp.op = ctx->encrypt ? COP_ENCRYPT : COP_DECRYPT; ++ ++ if (ctx->cipher->iv_len) { ++ cryp.iv = (caddr_t) ctx->iv; ++ if (!ctx->encrypt) { ++ iiv = in + len - ctx->cipher->iv_len; ++ memcpy(save_iv, iiv, ctx->cipher->iv_len); ++ } ++ } else ++ cryp.iv = NULL; ++ ++ if (ioctl(state->d_fd, CIOCAUTHCRYPT, &cryp) == -1) { ++ /* XXX need better errror handling ++ * this can fail for a number of different reasons. ++ */ ++ return (0); ++ } ++ ++ if (ctx->cipher->iv_len) { ++ if (ctx->encrypt) ++ iiv = out + len - ctx->cipher->iv_len; ++ else ++ iiv = save_iv; ++ memcpy(ctx->iv, iiv, ctx->cipher->iv_len); ++ } ++ return (1); ++} ++ ++ + static int + cryptodev_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, + const unsigned char *iv, int enc) +@@ -452,6 +521,45 @@ cryptodev_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, + return (1); + } + ++/* Save the encryption key provided by upper layers. ++ * ++ * This function is called by EVP_CipherInit_ex to initialize the algorithm's ++ * extra data. We can't do much here because the mac key is not available. ++ * The next call should/will be to cryptodev_cbc_hmac_sha1_ctrl with parameter ++ * EVP_CTRL_AEAD_SET_MAC_KEY, to set the hmac key. There we call CIOCGSESSION ++ * with both the crypto and hmac keys. ++ */ ++static int cryptodev_init_aead_key(EVP_CIPHER_CTX *ctx, ++ const unsigned char *key, const unsigned char *iv, int enc) ++{ ++ struct dev_crypto_state *state = ctx->cipher_data; ++ struct session_op *sess = &state->d_sess; ++ int cipher = -1, i; ++ ++ for (i = 0; ciphers[i].id; i++) ++ if (ctx->cipher->nid == ciphers[i].nid && ++ ctx->cipher->iv_len <= ciphers[i].ivmax && ++ ctx->key_len == ciphers[i].keylen) { ++ cipher = ciphers[i].id; ++ break; ++ } ++ ++ if (!ciphers[i].id) { ++ state->d_fd = -1; ++ return (0); ++ } ++ ++ memset(sess, 0, sizeof(struct session_op)); ++ ++ sess->key = (caddr_t)key; ++ sess->keylen = ctx->key_len; ++ sess->cipher = cipher; ++ ++ /* for whatever reason, (1) means success */ ++ return (1); ++} ++ ++ + /* + * free anything we allocated earlier when initting a + * session, and close the session. +@@ -488,6 +596,63 @@ cryptodev_cleanup(EVP_CIPHER_CTX *ctx) + return (ret); + } + ++static int cryptodev_cbc_hmac_sha1_ctrl(EVP_CIPHER_CTX *ctx, int type, int arg, ++ void *ptr) ++{ ++ switch (type) { ++ case EVP_CTRL_AEAD_SET_MAC_KEY: ++ { ++ /* TODO: what happens with hmac keys larger than 64 bytes? */ ++ struct dev_crypto_state *state = ctx->cipher_data; ++ struct session_op *sess = &state->d_sess; ++ ++ if ((state->d_fd = get_dev_crypto()) < 0) ++ return (0); ++ ++ /* the rest should have been set in cryptodev_init_aead_key */ ++ sess->mackey = ptr; ++ sess->mackeylen = arg; ++ ++ if (ioctl(state->d_fd, CIOCGSESSION, sess) == -1) { ++ put_dev_crypto(state->d_fd); ++ state->d_fd = -1; ++ return (0); ++ } ++ return (1); ++ } ++ case EVP_CTRL_AEAD_TLS1_AAD: ++ { ++ /* ptr points to the associated data buffer of 13 bytes */ ++ struct dev_crypto_state *state = ctx->cipher_data; ++ unsigned char *p = ptr; ++ unsigned int cryptlen = p[arg - 2] << 8 | p[arg - 1]; ++ unsigned int maclen, padlen; ++ unsigned int bs = ctx->cipher->block_size; ++ ++ state->aad = ptr; ++ state->aad_len = arg; ++ state->len = cryptlen; ++ ++ /* TODO: this should be an extension of EVP_CIPHER struct */ ++ switch (ctx->cipher->nid) { ++ case NID_aes_128_cbc_hmac_sha1: ++ case NID_aes_256_cbc_hmac_sha1: ++ maclen = SHA_DIGEST_LENGTH; ++ } ++ ++ /* space required for encryption (not only TLS padding) */ ++ padlen = maclen; ++ if (ctx->encrypt) { ++ cryptlen += maclen; ++ padlen += bs - (cryptlen % bs); ++ } ++ return padlen; ++ } ++ default: ++ return -1; ++ } ++} ++ + /* + * libcrypto EVP stuff - this is how we get wired to EVP so the engine + * gets called when libcrypto requests a cipher NID. +@@ -600,6 +765,33 @@ const EVP_CIPHER cryptodev_aes_256_cbc = { + NULL + }; + ++const EVP_CIPHER cryptodev_aes_128_cbc_hmac_sha1 = { ++ NID_aes_128_cbc_hmac_sha1, ++ 16, 16, 16, ++ EVP_CIPH_CBC_MODE | EVP_CIPH_FLAG_AEAD_CIPHER, ++ cryptodev_init_aead_key, ++ cryptodev_aead_cipher, ++ cryptodev_cleanup, ++ sizeof(struct dev_crypto_state), ++ EVP_CIPHER_set_asn1_iv, ++ EVP_CIPHER_get_asn1_iv, ++ cryptodev_cbc_hmac_sha1_ctrl, ++ NULL ++}; ++ ++const EVP_CIPHER cryptodev_aes_256_cbc_hmac_sha1 = { ++ NID_aes_256_cbc_hmac_sha1, ++ 16, 32, 16, ++ EVP_CIPH_CBC_MODE | EVP_CIPH_FLAG_AEAD_CIPHER, ++ cryptodev_init_aead_key, ++ cryptodev_aead_cipher, ++ cryptodev_cleanup, ++ sizeof(struct dev_crypto_state), ++ EVP_CIPHER_set_asn1_iv, ++ EVP_CIPHER_get_asn1_iv, ++ cryptodev_cbc_hmac_sha1_ctrl, ++ NULL ++}; + /* + * Registered by the ENGINE when used to find out how to deal with + * a particular NID in the ENGINE. this says what we'll do at the +@@ -637,6 +829,12 @@ cryptodev_engine_ciphers(ENGINE *e, const EVP_CIPHER **cipher, + case NID_aes_256_cbc: + *cipher = &cryptodev_aes_256_cbc; + break; ++ case NID_aes_128_cbc_hmac_sha1: ++ *cipher = &cryptodev_aes_128_cbc_hmac_sha1; ++ break; ++ case NID_aes_256_cbc_hmac_sha1: ++ *cipher = &cryptodev_aes_256_cbc_hmac_sha1; ++ break; + default: + *cipher = NULL; + break; +@@ -1384,6 +1582,8 @@ ENGINE_load_cryptodev(void) + } + put_dev_crypto(fd); + ++ EVP_add_cipher(&cryptodev_aes_128_cbc_hmac_sha1); ++ EVP_add_cipher(&cryptodev_aes_256_cbc_hmac_sha1); + if (!ENGINE_set_id(engine, "cryptodev") || + !ENGINE_set_name(engine, "BSD cryptodev engine") || + !ENGINE_set_ciphers(engine, cryptodev_engine_ciphers) || +-- +1.8.3.1 + diff --git a/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0003-add-support-for-TLS-algorithms-offload.patch b/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0003-add-support-for-TLS-algorithms-offload.patch deleted file mode 100644 index dd99ca9f..00000000 --- a/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0003-add-support-for-TLS-algorithms-offload.patch +++ /dev/null @@ -1,296 +0,0 @@ -From 1a8886909afc7e4c9e8539644c815baee8ee4816 Mon Sep 17 00:00:00 2001 -From: Cristian Stoica -Date: Thu, 29 Aug 2013 16:51:18 +0300 -Subject: [PATCH][fsl 03/15] add support for TLS algorithms offload - -Upstream-status: Pending - -Requires TLS patches on cryptodev and TLS algorithm support in Linux -kernel driver. - -Signed-off-by: Cristian Stoica ---- - crypto/engine/eng_cryptodev.c | 204 ++++++++++++++++++++++++++++++++++++++--- - 1 file changed, 193 insertions(+), 11 deletions(-) - -diff --git a/crypto/engine/eng_cryptodev.c b/crypto/engine/eng_cryptodev.c -index 5a715ac..123613d 100644 ---- a/crypto/engine/eng_cryptodev.c -+++ b/crypto/engine/eng_cryptodev.c -@@ -72,6 +72,9 @@ ENGINE_load_cryptodev(void) - struct dev_crypto_state { - struct session_op d_sess; - int d_fd; -+ unsigned char *aad; -+ unsigned int aad_len; -+ unsigned int len; - - #ifdef USE_CRYPTODEV_DIGESTS - char dummy_mac_key[HASH_MAX_LEN]; -@@ -140,17 +143,19 @@ static struct { - int nid; - int ivmax; - int keylen; -+ int mackeylen; - } ciphers[] = { -- { CRYPTO_ARC4, NID_rc4, 0, 16, }, -- { CRYPTO_DES_CBC, NID_des_cbc, 8, 8, }, -- { CRYPTO_3DES_CBC, NID_des_ede3_cbc, 8, 24, }, -- { CRYPTO_AES_CBC, NID_aes_128_cbc, 16, 16, }, -- { CRYPTO_AES_CBC, NID_aes_192_cbc, 16, 24, }, -- { CRYPTO_AES_CBC, NID_aes_256_cbc, 16, 32, }, -- { CRYPTO_BLF_CBC, NID_bf_cbc, 8, 16, }, -- { CRYPTO_CAST_CBC, NID_cast5_cbc, 8, 16, }, -- { CRYPTO_SKIPJACK_CBC, NID_undef, 0, 0, }, -- { 0, NID_undef, 0, 0, }, -+ { CRYPTO_ARC4, NID_rc4, 0, 16, 0}, -+ { CRYPTO_DES_CBC, NID_des_cbc, 8, 8, 0}, -+ { CRYPTO_3DES_CBC, NID_des_ede3_cbc, 8, 24, 0}, -+ { CRYPTO_AES_CBC, NID_aes_128_cbc, 16, 16, 0}, -+ { CRYPTO_AES_CBC, NID_aes_192_cbc, 16, 24, 0}, -+ { CRYPTO_AES_CBC, NID_aes_256_cbc, 16, 32, 0}, -+ { CRYPTO_BLF_CBC, NID_bf_cbc, 8, 16, 0}, -+ { CRYPTO_CAST_CBC, NID_cast5_cbc, 8, 16, 0}, -+ { CRYPTO_SKIPJACK_CBC, NID_undef, 0, 0, 0}, -+ { CRYPTO_TLS10_AES_CBC_HMAC_SHA1, NID_aes_128_cbc_hmac_sha1, 16, 16, 20}, -+ { 0, NID_undef, 0, 0, 0}, - }; - - #ifdef USE_CRYPTODEV_DIGESTS -@@ -250,13 +255,15 @@ get_cryptodev_ciphers(const int **cnids) - } - memset(&sess, 0, sizeof(sess)); - sess.key = (caddr_t)"123456789abcdefghijklmno"; -+ sess.mackey = (caddr_t)"123456789ABCDEFGHIJKLMNO"; - - for (i = 0; ciphers[i].id && count < CRYPTO_ALGORITHM_MAX; i++) { - if (ciphers[i].nid == NID_undef) - continue; - sess.cipher = ciphers[i].id; - sess.keylen = ciphers[i].keylen; -- sess.mac = 0; -+ sess.mackeylen = ciphers[i].mackeylen; -+ - if (ioctl(fd, CIOCGSESSION, &sess) != -1 && - ioctl(fd, CIOCFSESSION, &sess.ses) != -1) - nids[count++] = ciphers[i].nid; -@@ -414,6 +421,67 @@ cryptodev_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, - return (1); - } - -+ -+static int cryptodev_aead_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, -+ const unsigned char *in, size_t len) -+{ -+ struct crypt_auth_op cryp; -+ struct dev_crypto_state *state = ctx->cipher_data; -+ struct session_op *sess = &state->d_sess; -+ const void *iiv; -+ unsigned char save_iv[EVP_MAX_IV_LENGTH]; -+ -+ if (state->d_fd < 0) -+ return (0); -+ if (!len) -+ return (1); -+ if ((len % ctx->cipher->block_size) != 0) -+ return (0); -+ -+ memset(&cryp, 0, sizeof(cryp)); -+ -+ /* TODO: make a seamless integration with cryptodev flags */ -+ switch (ctx->cipher->nid) { -+ case NID_aes_128_cbc_hmac_sha1: -+ cryp.flags = COP_FLAG_AEAD_TLS_TYPE; -+ } -+ cryp.ses = sess->ses; -+ cryp.len = state->len; -+ cryp.dst_len = len; -+ cryp.src = (caddr_t) in; -+ cryp.dst = (caddr_t) out; -+ cryp.auth_src = state->aad; -+ cryp.auth_len = state->aad_len; -+ -+ cryp.op = ctx->encrypt ? COP_ENCRYPT : COP_DECRYPT; -+ -+ if (ctx->cipher->iv_len) { -+ cryp.iv = (caddr_t) ctx->iv; -+ if (!ctx->encrypt) { -+ iiv = in + len - ctx->cipher->iv_len; -+ memcpy(save_iv, iiv, ctx->cipher->iv_len); -+ } -+ } else -+ cryp.iv = NULL; -+ -+ if (ioctl(state->d_fd, CIOCAUTHCRYPT, &cryp) == -1) { -+ /* XXX need better errror handling -+ * this can fail for a number of different reasons. -+ */ -+ return (0); -+ } -+ -+ if (ctx->cipher->iv_len) { -+ if (ctx->encrypt) -+ iiv = out + len - ctx->cipher->iv_len; -+ else -+ iiv = save_iv; -+ memcpy(ctx->iv, iiv, ctx->cipher->iv_len); -+ } -+ return (1); -+} -+ -+ - static int - cryptodev_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, - const unsigned char *iv, int enc) -@@ -452,6 +520,45 @@ cryptodev_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, - return (1); - } - -+/* Save the encryption key provided by upper layers. -+ * -+ * This function is called by EVP_CipherInit_ex to initialize the algorithm's -+ * extra data. We can't do much here because the mac key is not available. -+ * The next call should/will be to cryptodev_cbc_hmac_sha1_ctrl with parameter -+ * EVP_CTRL_AEAD_SET_MAC_KEY, to set the hmac key. There we call CIOCGSESSION -+ * with both the crypto and hmac keys. -+ */ -+static int cryptodev_init_aead_key(EVP_CIPHER_CTX *ctx, -+ const unsigned char *key, const unsigned char *iv, int enc) -+{ -+ struct dev_crypto_state *state = ctx->cipher_data; -+ struct session_op *sess = &state->d_sess; -+ int cipher = -1, i; -+ -+ for (i = 0; ciphers[i].id; i++) -+ if (ctx->cipher->nid == ciphers[i].nid && -+ ctx->cipher->iv_len <= ciphers[i].ivmax && -+ ctx->key_len == ciphers[i].keylen) { -+ cipher = ciphers[i].id; -+ break; -+ } -+ -+ if (!ciphers[i].id) { -+ state->d_fd = -1; -+ return (0); -+ } -+ -+ memset(sess, 0, sizeof(struct session_op)); -+ -+ sess->key = (caddr_t)key; -+ sess->keylen = ctx->key_len; -+ sess->cipher = cipher; -+ -+ /* for whatever reason, (1) means success */ -+ return (1); -+} -+ -+ - /* - * free anything we allocated earlier when initting a - * session, and close the session. -@@ -488,6 +595,63 @@ cryptodev_cleanup(EVP_CIPHER_CTX *ctx) - return (ret); - } - -+static int cryptodev_cbc_hmac_sha1_ctrl(EVP_CIPHER_CTX *ctx, int type, int arg, -+ void *ptr) -+{ -+ switch (type) { -+ case EVP_CTRL_AEAD_SET_MAC_KEY: -+ { -+ /* TODO: what happens with hmac keys larger than 64 bytes? */ -+ struct dev_crypto_state *state = ctx->cipher_data; -+ struct session_op *sess = &state->d_sess; -+ -+ if ((state->d_fd = get_dev_crypto()) < 0) -+ return (0); -+ -+ /* the rest should have been set in cryptodev_init_aead_key */ -+ sess->mackey = ptr; -+ sess->mackeylen = arg; -+ -+ if (ioctl(state->d_fd, CIOCGSESSION, sess) == -1) { -+ put_dev_crypto(state->d_fd); -+ state->d_fd = -1; -+ return (0); -+ } -+ return (1); -+ } -+ case EVP_CTRL_AEAD_TLS1_AAD: -+ { -+ /* ptr points to the associated data buffer of 13 bytes */ -+ struct dev_crypto_state *state = ctx->cipher_data; -+ unsigned char *p = ptr; -+ unsigned int cryptlen = p[arg - 2] << 8 | p[arg - 1]; -+ unsigned int maclen, padlen; -+ unsigned int bs = ctx->cipher->block_size; -+ int j; -+ -+ state->aad = ptr; -+ state->aad_len = arg; -+ state->len = cryptlen; -+ -+ /* TODO: this should be an extension of EVP_CIPHER struct */ -+ switch (ctx->cipher->nid) { -+ case NID_aes_128_cbc_hmac_sha1: -+ maclen = SHA_DIGEST_LENGTH; -+ } -+ -+ /* space required for encryption (not only TLS padding) */ -+ padlen = maclen; -+ if (ctx->encrypt) { -+ cryptlen += maclen; -+ padlen += bs - (cryptlen % bs); -+ } -+ return padlen; -+ } -+ default: -+ return -1; -+ } -+} -+ - /* - * libcrypto EVP stuff - this is how we get wired to EVP so the engine - * gets called when libcrypto requests a cipher NID. -@@ -600,6 +764,20 @@ const EVP_CIPHER cryptodev_aes_256_cbc = { - NULL - }; - -+const EVP_CIPHER cryptodev_aes_128_cbc_hmac_sha1 = { -+ NID_aes_128_cbc_hmac_sha1, -+ 16, 16, 16, -+ EVP_CIPH_CBC_MODE | EVP_CIPH_FLAG_AEAD_CIPHER, -+ cryptodev_init_aead_key, -+ cryptodev_aead_cipher, -+ cryptodev_cleanup, -+ sizeof(struct dev_crypto_state), -+ EVP_CIPHER_set_asn1_iv, -+ EVP_CIPHER_get_asn1_iv, -+ cryptodev_cbc_hmac_sha1_ctrl, -+ NULL -+}; -+ - /* - * Registered by the ENGINE when used to find out how to deal with - * a particular NID in the ENGINE. this says what we'll do at the -@@ -637,6 +815,9 @@ cryptodev_engine_ciphers(ENGINE *e, const EVP_CIPHER **cipher, - case NID_aes_256_cbc: - *cipher = &cryptodev_aes_256_cbc; - break; -+ case NID_aes_128_cbc_hmac_sha1: -+ *cipher = &cryptodev_aes_128_cbc_hmac_sha1; -+ break; - default: - *cipher = NULL; - break; -@@ -1384,6 +1565,7 @@ ENGINE_load_cryptodev(void) - } - put_dev_crypto(fd); - -+ EVP_add_cipher(&cryptodev_aes_128_cbc_hmac_sha1); - if (!ENGINE_set_id(engine, "cryptodev") || - !ENGINE_set_name(engine, "BSD cryptodev engine") || - !ENGINE_set_ciphers(engine, cryptodev_engine_ciphers) || --- -1.7.9.7 - diff --git a/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0003-cryptodev-fix-algorithm-registration.patch b/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0003-cryptodev-fix-algorithm-registration.patch new file mode 100644 index 00000000..b31668e1 --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0003-cryptodev-fix-algorithm-registration.patch @@ -0,0 +1,64 @@ +From 084fa469a8fef530d71a0870364df1c7997f6465 Mon Sep 17 00:00:00 2001 +From: Cristian Stoica +Date: Thu, 31 Jul 2014 14:06:19 +0300 +Subject: [PATCH 03/17] cryptodev: fix algorithm registration + +Cryptodev specific algorithms must register only if available in kernel. + +Change-Id: Iec5af8f4f3138357e4b96f2ec1627278134e4808 +Signed-off-by: Cristian Stoica +Reviewed-on: http://git.am.freescale.net:8181/15326 +Reviewed-by: Horia Ioan Geanta Neag +Reviewed-on: http://git.am.freescale.net:8181/17224 +--- + crypto/engine/eng_cryptodev.c | 20 +++++++++++++++++--- + 1 file changed, 17 insertions(+), 3 deletions(-) + +diff --git a/crypto/engine/eng_cryptodev.c b/crypto/engine/eng_cryptodev.c +index 7588a28..e3eb98b 100644 +--- a/crypto/engine/eng_cryptodev.c ++++ b/crypto/engine/eng_cryptodev.c +@@ -133,6 +133,8 @@ static int cryptodev_dh_compute_key(unsigned char *key, + static int cryptodev_ctrl(ENGINE *e, int cmd, long i, void *p, + void (*f)(void)); + void ENGINE_load_cryptodev(void); ++const EVP_CIPHER cryptodev_aes_128_cbc_hmac_sha1; ++const EVP_CIPHER cryptodev_aes_256_cbc_hmac_sha1; + + static const ENGINE_CMD_DEFN cryptodev_defns[] = { + { 0, NULL, NULL, 0 } +@@ -342,7 +344,21 @@ get_cryptodev_digests(const int **cnids) + static int + cryptodev_usable_ciphers(const int **nids) + { +- return (get_cryptodev_ciphers(nids)); ++ int i, count; ++ ++ count = get_cryptodev_ciphers(nids); ++ /* add ciphers specific to cryptodev if found in kernel */ ++ for(i = 0; i < count; i++) { ++ switch (*(*nids + i)) { ++ case NID_aes_128_cbc_hmac_sha1: ++ EVP_add_cipher(&cryptodev_aes_128_cbc_hmac_sha1); ++ break; ++ case NID_aes_256_cbc_hmac_sha1: ++ EVP_add_cipher(&cryptodev_aes_256_cbc_hmac_sha1); ++ break; ++ } ++ } ++ return count; + } + + static int +@@ -1582,8 +1598,6 @@ ENGINE_load_cryptodev(void) + } + put_dev_crypto(fd); + +- EVP_add_cipher(&cryptodev_aes_128_cbc_hmac_sha1); +- EVP_add_cipher(&cryptodev_aes_256_cbc_hmac_sha1); + if (!ENGINE_set_id(engine, "cryptodev") || + !ENGINE_set_name(engine, "BSD cryptodev engine") || + !ENGINE_set_ciphers(engine, cryptodev_engine_ciphers) || +-- +1.8.3.1 + diff --git a/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0004-Fixed-private-key-support-for-DH.patch b/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0004-Fixed-private-key-support-for-DH.patch deleted file mode 100644 index 607f6035..00000000 --- a/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0004-Fixed-private-key-support-for-DH.patch +++ /dev/null @@ -1,33 +0,0 @@ -From c994fa6c5eb9b684dd6aff45dd5e8eb98237c31e Mon Sep 17 00:00:00 2001 -From: Yashpal Dutta -Date: Tue, 11 Mar 2014 05:57:47 +0545 -Subject: [PATCH][fsl 04/15] Fixed private key support for DH - -Upstream-status: Pending - -Signed-off-by: Yashpal Dutta ---- - crypto/dh/dh_ameth.c | 7 +++++++ - 1 file changed, 7 insertions(+) - -diff --git a/crypto/dh/dh_ameth.c b/crypto/dh/dh_ameth.c -index 02ec2d4..ed32004 100644 ---- a/crypto/dh/dh_ameth.c -+++ b/crypto/dh/dh_ameth.c -@@ -422,6 +422,13 @@ static int dh_copy_parameters(EVP_PKEY *to, const EVP_PKEY *from) - if (to->pkey.dh->g != NULL) - BN_free(to->pkey.dh->g); - to->pkey.dh->g=a; -+ if ((a=BN_dup(from->pkey.dh->q)) != NULL) { -+ if (to->pkey.dh->q != NULL) -+ BN_free(to->pkey.dh->q); -+ to->pkey.dh->q=a; -+ } -+ -+ to->pkey.dh->length = from->pkey.dh->length; - - return 1; - } --- -1.7.9.7 - diff --git a/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0004-linux-pcc-make-it-more-robust-and-recognize-KERNEL_B.patch b/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0004-linux-pcc-make-it-more-robust-and-recognize-KERNEL_B.patch new file mode 100644 index 00000000..af30ad3d --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0004-linux-pcc-make-it-more-robust-and-recognize-KERNEL_B.patch @@ -0,0 +1,74 @@ +From 7d770f0324498d1fa78300cc5cecc8c1dcd3b788 Mon Sep 17 00:00:00 2001 +From: Andy Polyakov +Date: Sun, 21 Oct 2012 18:19:41 +0000 +Subject: [PATCH 04/17] linux-pcc: make it more robust and recognize + KERNEL_BITS variable. + +(cherry picked from commit 78c3e20579d3baa159c8b51b59d415b6e521614b) + +Change-Id: I769c466f052305681ab54a1b6545d94c7fbf5a9d +Signed-off-by: Cristian Stoica +--- + config | 19 +++++++++++++------ + crypto/ppccap.c | 7 +++++++ + 2 files changed, 20 insertions(+), 6 deletions(-) + +diff --git a/config b/config +index 41fa2a6..f37b9e6 100755 +--- a/config ++++ b/config +@@ -587,13 +587,20 @@ case "$GUESSOS" in + fi + ;; + ppc64-*-linux2) +- echo "WARNING! If you wish to build 64-bit library, then you have to" +- echo " invoke './Configure linux-ppc64' *manually*." +- if [ "$TEST" = "false" -a -t 1 ]; then +- echo " You have about 5 seconds to press Ctrl-C to abort." +- (trap "stty `stty -g`" 2 0; stty -icanon min 0 time 50; read waste) <&1 ++ if [ -z "$KERNEL_BITS" ]; then ++ echo "WARNING! If you wish to build 64-bit library, then you have to" ++ echo " invoke './Configure linux-ppc64' *manually*." ++ if [ "$TEST" = "false" -a -t 1 ]; then ++ echo " You have about 5 seconds to press Ctrl-C to abort." ++ (trap "stty `stty -g`" 2 0; stty -icanon min 0 time 50; read waste) <&1 ++ fi ++ fi ++ if [ "$KERNEL_BITS" = "64" ]; then ++ OUT="linux-ppc64" ++ else ++ OUT="linux-ppc" ++ (echo "__LP64__" | gcc -E -x c - 2>/dev/null | grep "^__LP64__" 2>&1 > /dev/null) || options="$options -m32" + fi +- OUT="linux-ppc" + ;; + ppc-*-linux2) OUT="linux-ppc" ;; + ppc60x-*-vxworks*) OUT="vxworks-ppc60x" ;; +diff --git a/crypto/ppccap.c b/crypto/ppccap.c +index f71ba66..531f1b3 100644 +--- a/crypto/ppccap.c ++++ b/crypto/ppccap.c +@@ -4,6 +4,9 @@ + #include + #include + #include ++#ifdef __linux ++#include ++#endif + #include + #include + +@@ -102,6 +105,10 @@ void OPENSSL_cpuid_setup(void) + + if (sizeof(size_t)==4) + { ++#ifdef __linux ++ struct utsname uts; ++ if (uname(&uts)==0 && strcmp(uts.machine,"ppc64")==0) ++#endif + if (sigsetjmp(ill_jmp,1) == 0) + { + OPENSSL_ppc64_probe(); +-- +1.8.3.1 + diff --git a/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0005-ECC-Support-header-for-Cryptodev-Engine.patch b/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0005-ECC-Support-header-for-Cryptodev-Engine.patch new file mode 100644 index 00000000..cfcf4a66 --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0005-ECC-Support-header-for-Cryptodev-Engine.patch @@ -0,0 +1,318 @@ +From 15abbcd740eafbf2a46b5da24be76acf4982743d Mon Sep 17 00:00:00 2001 +From: Yashpal Dutta +Date: Tue, 11 Mar 2014 05:56:54 +0545 +Subject: [PATCH 05/17] ECC Support header for Cryptodev Engine + +Upstream-status: Pending + +Signed-off-by: Yashpal Dutta +--- + crypto/engine/eng_cryptodev_ec.h | 296 +++++++++++++++++++++++++++++++++++++++ + 1 file changed, 296 insertions(+) + create mode 100644 crypto/engine/eng_cryptodev_ec.h + +diff --git a/crypto/engine/eng_cryptodev_ec.h b/crypto/engine/eng_cryptodev_ec.h +new file mode 100644 +index 0000000..77aee71 +--- /dev/null ++++ b/crypto/engine/eng_cryptodev_ec.h +@@ -0,0 +1,296 @@ ++/* ++ * Copyright (C) 2012 Freescale Semiconductor, Inc. ++ * ++ * 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. ++ * ++ * 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 __ENG_EC_H ++#define __ENG_EC_H ++ ++#define SPCF_CPARAM_INIT(X,...) \ ++static unsigned char X##_c[] = {__VA_ARGS__} \ ++ ++#define SPCF_FREE_BN(X) do { if(X) { BN_clear_free(X); X = NULL; } } while (0) ++ ++#define SPCF_COPY_CPARAMS(NIDBUF) \ ++ do { \ ++ memcpy (buf, NIDBUF, buf_len); \ ++ } while (0) ++ ++#define SPCF_CPARAM_CASE(X) \ ++ case NID_##X: \ ++ SPCF_COPY_CPARAMS(X##_c); \ ++ break ++ ++SPCF_CPARAM_INIT(sect113r1, 0x01, 0x73, 0xE8, 0x34, 0xAF, 0x28, 0xEC, 0x76, ++ 0xCB, 0x83, 0xBD, 0x8D, 0xFE, 0xB2, 0xD5); ++SPCF_CPARAM_INIT(sect113r2, 0x00, 0x54, 0xD9, 0xF0, 0x39, 0x57, 0x17, 0x4A, ++ 0x32, 0x32, 0x91, 0x67, 0xD7, 0xFE, 0x71); ++SPCF_CPARAM_INIT(sect131r1, 0x03, 0xDB, 0x89, 0xB4, 0x05, 0xE4, 0x91, 0x16, ++ 0x0E, 0x3B, 0x2F, 0x07, 0xB0, 0xCE, 0x20, 0xB3, 0x7E); ++SPCF_CPARAM_INIT(sect131r2, 0x07, 0xCB, 0xB9, 0x92, 0x0D, 0x71, 0xA4, 0x8E, ++ 0x09, 0x9C, 0x38, 0xD7, 0x1D, 0xA6, 0x49, 0x0E, 0xB1); ++SPCF_CPARAM_INIT(sect163k1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ++ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ++ 0x00, 0x00, 0x01); ++SPCF_CPARAM_INIT(sect163r1, 0x05, 0xED, 0x40, 0x3E, 0xD5, 0x8E, 0xB4, 0x5B, ++ 0x1C, 0xCE, 0xCA, 0x0F, 0x4F, 0x61, 0x65, 0x55, 0x49, 0x86, ++ 0x1B, 0xE0, 0x52); ++SPCF_CPARAM_INIT(sect163r2, 0x07, 0x2C, 0x4E, 0x1E, 0xF7, 0xCB, 0x2F, 0x3A, ++ 0x03, 0x5D, 0x33, 0x10, 0x42, 0x94, 0x15, 0x96, 0x09, 0x13, ++ 0x8B, 0xB4, 0x04); ++SPCF_CPARAM_INIT(sect193r1, 0x01, 0x67, 0xB3, 0x5E, 0xB4, 0x31, 0x3F, 0x26, ++ 0x3D, 0x0F, 0x7A, 0x3D, 0x50, 0x36, 0xF0, 0xA0, 0xA3, 0xC9, ++ 0x80, 0xD4, 0x0E, 0x5A, 0x05, 0x3E, 0xD2); ++SPCF_CPARAM_INIT(sect193r2, 0x00, 0x69, 0x89, 0xFE, 0x6B, 0xFE, 0x30, 0xED, ++ 0xDC, 0x32, 0x44, 0x26, 0x9F, 0x3A, 0xAD, 0x18, 0xD6, 0x6C, ++ 0xF3, 0xDB, 0x3E, 0x33, 0x02, 0xFA, 0xA8); ++SPCF_CPARAM_INIT(sect233k1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ++ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ++ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ++ 0x00, 0x01); ++SPCF_CPARAM_INIT(sect233r1, 0x00, 0x07, 0xD5, 0xEF, 0x43, 0x89, 0xDF, 0xF1, ++ 0x1E, 0xCD, 0xBA, 0x39, 0xC3, 0x09, 0x70, 0xD3, 0xCE, 0x35, ++ 0xCE, 0xBB, 0xA5, 0x84, 0x73, 0xF6, 0x4B, 0x4D, 0xC0, 0xF2, ++ 0x68, 0x6C); ++SPCF_CPARAM_INIT(sect239k1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ++ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ++ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ++ 0x00, 0x01); ++SPCF_CPARAM_INIT(sect283k1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ++ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ++ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ++ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01); ++SPCF_CPARAM_INIT(sect283r1, 0x03, 0xD8, 0xC9, 0x3D, 0x3B, 0x0E, 0xA8, 0x1D, ++ 0x92, 0x94, 0x03, 0x4D, 0x7E, 0xE3, 0x13, 0x5D, 0x0A, 0xC5, ++ 0xFC, 0x8D, 0x9C, 0xB0, 0x27, 0x6F, 0x72, 0x11, 0xF8, 0x80, ++ 0xF0, 0xD8, 0x1C, 0xA4, 0xC6, 0xE8, 0x7B, 0x38); ++SPCF_CPARAM_INIT(sect409k1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ++ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ++ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ++ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ++ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ++ 0x00, 0x00, 0x00, 0x01); ++SPCF_CPARAM_INIT(sect409r1, 0x01, 0x49, 0xB8, 0xB7, 0xBE, 0xBD, 0x9B, 0x63, ++ 0x65, 0x3E, 0xF1, 0xCD, 0x8C, 0x6A, 0x5D, 0xD1, 0x05, 0xA2, ++ 0xAA, 0xAC, 0x36, 0xFE, 0x2E, 0xAE, 0x43, 0xCF, 0x28, 0xCE, ++ 0x1C, 0xB7, 0xC8, 0x30, 0xC1, 0xEC, 0xDB, 0xFA, 0x41, 0x3A, ++ 0xB0, 0x7F, 0xE3, 0x5A, 0x57, 0x81, 0x1A, 0xE4, 0xF8, 0x8D, ++ 0x30, 0xAC, 0x63, 0xFB); ++SPCF_CPARAM_INIT(sect571k1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ++ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ++ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ++ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ++ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ++ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ++ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ++ 0x00, 0x00, 0x00, 0x01); ++SPCF_CPARAM_INIT(sect571r1, 0x06, 0x39, 0x5D, 0xB2, 0x2A, 0xB5, 0x94, 0xB1, ++ 0x86, 0x8C, 0xED, 0x95, 0x25, 0x78, 0xB6, 0x53, 0x9F, 0xAB, ++ 0xA6, 0x94, 0x06, 0xD9, 0xB2, 0x98, 0x61, 0x23, 0xA1, 0x85, ++ 0xC8, 0x58, 0x32, 0xE2, 0x5F, 0xD5, 0xB6, 0x38, 0x33, 0xD5, ++ 0x14, 0x42, 0xAB, 0xF1, 0xA9, 0xC0, 0x5F, 0xF0, 0xEC, 0xBD, ++ 0x88, 0xD7, 0xF7, 0x79, 0x97, 0xF4, 0xDC, 0x91, 0x56, 0xAA, ++ 0xF1, 0xCE, 0x08, 0x16, 0x46, 0x86, 0xDD, 0xFF, 0x75, 0x11, ++ 0x6F, 0xBC, 0x9A, 0x7A); ++SPCF_CPARAM_INIT(X9_62_c2pnb163v1, 0x04, 0x53, 0xE1, 0xE4, 0xB7, 0x29, 0x1F, ++ 0x5C, 0x2D, 0x53, 0xCE, 0x18, 0x48, 0x3F, 0x00, 0x70, 0x81, ++ 0xE7, 0xEA, 0x26, 0xEC); ++SPCF_CPARAM_INIT(X9_62_c2pnb163v2, 0x04, 0x35, 0xC0, 0x19, 0x66, 0x0E, 0x01, ++ 0x01, 0xBA, 0x87, 0x0C, 0xA3, 0x9F, 0xD9, 0xA7, 0x76, 0x86, ++ 0x50, 0x9D, 0x28, 0x13); ++SPCF_CPARAM_INIT(X9_62_c2pnb163v3, 0x06, 0x55, 0xC4, 0x54, 0xE4, 0x1E, 0x38, ++ 0x0C, 0x7A, 0x60, 0xB6, 0x67, 0x9A, 0x5B, 0x7A, 0x3F, 0x3A, ++ 0xF6, 0x8E, 0x22, 0xC5); ++SPCF_CPARAM_INIT(X9_62_c2pnb176v1, 0x00, 0x69, 0xF7, 0xDA, 0x36, 0x19, 0xA7, ++ 0x42, 0xA3, 0x82, 0xFF, 0x05, 0x08, 0x8F, 0xD3, 0x99, 0x42, ++ 0xCA, 0x0F, 0x1D, 0x90, 0xB6, 0x5B); ++SPCF_CPARAM_INIT(X9_62_c2tnb191v1, 0x4C, 0x45, 0x25, 0xAB, 0x0B, 0x68, 0x4A, ++ 0x64, 0x44, 0x62, 0x0A, 0x86, 0x45, 0xEF, 0x54, 0x6D, 0x54, ++ 0x69, 0x39, 0x68, 0xC2, 0xAE, 0x84, 0xAC); ++SPCF_CPARAM_INIT(X9_62_c2tnb191v2, 0x03, 0x7C, 0x8F, 0x57, 0xA2, 0x25, 0xC7, ++ 0xB3, 0xD4, 0xED, 0xD5, 0x88, 0x0F, 0x38, 0x0A, 0xCC, 0x55, ++ 0x74, 0xEC, 0xB3, 0x6C, 0x9F, 0x51, 0x21); ++SPCF_CPARAM_INIT(X9_62_c2tnb191v3, 0x37, 0x39, 0xFF, 0x98, 0xB4, 0xD1, 0x69, ++ 0x3E, 0xCF, 0x52, 0x7A, 0x98, 0x51, 0xED, 0xCF, 0x99, 0x9D, ++ 0x9E, 0x75, 0x05, 0x43, 0x33, 0x43, 0x24); ++SPCF_CPARAM_INIT(X9_62_c2pnb208w1, 0x00, 0xDB, 0x05, 0x3C, 0x41, 0x76, 0xCC, ++ 0x1D, 0xA1, 0x27, 0x85, 0x2C, 0xA6, 0xD9, 0x88, 0xBE, 0x1A, ++ 0xCC, 0xD1, 0x5B, 0x2A, 0xC1, 0xC1, 0x07, 0x42, 0x57, 0x34); ++SPCF_CPARAM_INIT(X9_62_c2tnb239v1, 0x24, 0x59, 0xFC, 0xF4, 0x51, 0x7B, 0xC5, ++ 0xA6, 0xB9, 0x9B, 0xE5, 0xC6, 0xC5, 0x62, 0x85, 0xC0, 0x21, ++ 0xFE, 0x32, 0xEE, 0x2B, 0x6F, 0x1C, 0x22, 0xEA, 0x5B, 0xE1, ++ 0xB8, 0x4B, 0x93); ++SPCF_CPARAM_INIT(X9_62_c2tnb239v2, 0x64, 0x98, 0x84, 0x19, 0x3B, 0x56, 0x2D, ++ 0x4A, 0x50, 0xB4, 0xFA, 0x56, 0x34, 0xE0, 0x34, 0x41, 0x3F, ++ 0x94, 0xC4, 0x59, 0xDA, 0x7C, 0xDB, 0x16, 0x64, 0x9D, 0xDD, ++ 0xF7, 0xE6, 0x0A); ++SPCF_CPARAM_INIT(X9_62_c2tnb239v3, 0x32, 0x63, 0x2E, 0x65, 0x2B, 0xEE, 0x91, ++ 0xC2, 0xE4, 0xA2, 0xF5, 0x42, 0xA3, 0x2D, 0x67, 0xA8, 0xB5, ++ 0xB4, 0x5F, 0x21, 0xA0, 0x81, 0x02, 0xFB, 0x1F, 0x2A, 0xFB, ++ 0xB6, 0xAC, 0xDA); ++SPCF_CPARAM_INIT(X9_62_c2pnb272w1, 0x00, 0xDA, 0x7B, 0x60, 0x28, 0xF4, 0xC8, ++ 0x09, 0xA0, 0xB9, 0x78, 0x81, 0xC3, 0xA5, 0x7E, 0x4D, 0x71, ++ 0x81, 0x34, 0xD1, 0x3F, 0xEC, 0xE0, 0x90, 0x85, 0x8A, 0xC3, ++ 0x1A, 0xE2, 0xDC, 0x2E, 0xDF, 0x8E, 0x3C, 0x8B); ++SPCF_CPARAM_INIT(X9_62_c2pnb304w1, 0x00, 0x3C, 0x67, 0xB4, 0x07, 0xC6, 0xF3, ++ 0x3F, 0x81, 0x0B, 0x17, 0xDC, 0x16, 0xE2, 0x14, 0x8A, 0x2C, ++ 0x9C, 0xE2, 0x9D, 0x56, 0x05, 0x23, 0x69, 0x6A, 0x55, 0x93, ++ 0x8A, 0x15, 0x40, 0x81, 0xE3, 0xE3, 0xAE, 0xFB, 0xCE, 0x45, ++ 0x70, 0xC9); ++SPCF_CPARAM_INIT(X9_62_c2tnb359v1, 0x22, 0x39, 0xAA, 0x58, 0x4A, 0xC5, 0x9A, ++ 0xF9, 0x61, 0xD0, 0xFA, 0x2D, 0x52, 0x85, 0xB6, 0xFD, 0xF7, ++ 0x34, 0x9B, 0xC6, 0x0E, 0x91, 0xE3, 0x20, 0xF4, 0x71, 0x64, ++ 0xCE, 0x11, 0xF5, 0x18, 0xEF, 0xB4, 0xC0, 0x8B, 0x9B, 0xDA, ++ 0x99, 0x9A, 0x8A, 0x37, 0xF8, 0x2A, 0x22, 0x61); ++SPCF_CPARAM_INIT(X9_62_c2pnb368w1, 0x00, 0xC0, 0x6C, 0xCF, 0x42, 0x89, 0x3A, ++ 0x8A, 0xAA, 0x00, 0x1E, 0x0B, 0xC0, 0xD2, 0xA2, 0x27, 0x66, ++ 0xEF, 0x3E, 0x41, 0x88, 0x7C, 0xC6, 0x77, 0x6F, 0x4A, 0x04, ++ 0x1E, 0xE4, 0x45, 0x14, 0xB2, 0x0A, 0xFC, 0x4E, 0x5C, 0x30, ++ 0x40, 0x60, 0x06, 0x5B, 0xC8, 0xD6, 0xCF, 0x04, 0xD3, 0x25); ++SPCF_CPARAM_INIT(X9_62_c2tnb431r1, 0x64, 0xF5, 0xBB, 0xE9, 0xBB, 0x31, 0x66, ++ 0xA3, 0xA0, 0x2F, 0x2F, 0x22, 0xBF, 0x05, 0xD9, 0xF7, 0xDA, ++ 0x43, 0xEE, 0x70, 0xC1, 0x79, 0x03, 0x15, 0x2B, 0x70, 0xA0, ++ 0xB4, 0x25, 0x9B, 0xD2, 0xFC, 0xB2, 0x20, 0x3B, 0x7F, 0xB8, ++ 0xD3, 0x39, 0x4E, 0x20, 0xEB, 0x0E, 0xA9, 0x84, 0xDD, 0xB1, ++ 0xE1, 0xF1, 0x4C, 0x67, 0xB1, 0x36, 0x2B); ++SPCF_CPARAM_INIT(wap_wsg_idm_ecid_wtls1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ++ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01); ++SPCF_CPARAM_INIT(wap_wsg_idm_ecid_wtls3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ++ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ++ 0x00, 0x00, 0x00, 0x00, 0x01); ++SPCF_CPARAM_INIT(wap_wsg_idm_ecid_wtls4, 0x01, 0x73, 0xE8, 0x34, 0xAF, 0x28, ++ 0xEC, 0x76, 0xCB, 0x83, 0xBD, 0x8D, 0xFE, 0xB2, 0xD5); ++SPCF_CPARAM_INIT(wap_wsg_idm_ecid_wtls5, 0x04, 0x53, 0xE1, 0xE4, 0xB7, 0x29, ++ 0x1F, 0x5C, 0x2D, 0x53, 0xCE, 0x18, 0x48, 0x3F, 0x00, 0x70, ++ 0x81, 0xE7, 0xEA, 0x26, 0xEC); ++SPCF_CPARAM_INIT(wap_wsg_idm_ecid_wtls10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ++ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ++ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ++ 0x00, 0x00, 0x00, 0x01); ++SPCF_CPARAM_INIT(wap_wsg_idm_ecid_wtls11, 0x00, 0x07, 0xD5, 0xEF, 0x43, 0x89, ++ 0xDF, 0xF1, 0x1E, 0xCD, 0xBA, 0x39, 0xC3, 0x09, 0x70, 0xD3, ++ 0xCE, 0x35, 0xCE, 0xBB, 0xA5, 0x84, 0x73, 0xF6, 0x4B, 0x4D, ++ 0xC0, 0xF2, 0x68, 0x6C); ++/* Oakley curve #3 over 155 bit binary filed */ ++SPCF_CPARAM_INIT(ipsec3, 0x00, 0x31, 0x10, 0x00, 0x00, 0x02, 0x23, 0xA0, 0x00, ++ 0xC4, 0x47, 0x40, 0x00, 0x08, 0x8E, 0x80, 0x00, 0x11, 0x1D, ++ 0x1D); ++/* Oakley curve #4 over 185 bit binary filed */ ++SPCF_CPARAM_INIT(ipsec4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, ++ 0x01, 0x80, 0x00, 0xC0, 0x0C, 0x00, 0x00, 0x00, 0x63, 0x80, ++ 0x30, 0x00, 0x1C, 0x00, 0x09); ++ ++static inline int ++eng_ec_get_cparam(int nid, unsigned char *buf, unsigned int buf_len) ++{ ++ int ret = 0; ++ switch (nid) { ++ SPCF_CPARAM_CASE(sect113r1); ++ SPCF_CPARAM_CASE(sect113r2); ++ SPCF_CPARAM_CASE(sect131r1); ++ SPCF_CPARAM_CASE(sect131r2); ++ SPCF_CPARAM_CASE(sect163k1); ++ SPCF_CPARAM_CASE(sect163r1); ++ SPCF_CPARAM_CASE(sect163r2); ++ SPCF_CPARAM_CASE(sect193r1); ++ SPCF_CPARAM_CASE(sect193r2); ++ SPCF_CPARAM_CASE(sect233k1); ++ SPCF_CPARAM_CASE(sect233r1); ++ SPCF_CPARAM_CASE(sect239k1); ++ SPCF_CPARAM_CASE(sect283k1); ++ SPCF_CPARAM_CASE(sect283r1); ++ SPCF_CPARAM_CASE(sect409k1); ++ SPCF_CPARAM_CASE(sect409r1); ++ SPCF_CPARAM_CASE(sect571k1); ++ SPCF_CPARAM_CASE(sect571r1); ++ SPCF_CPARAM_CASE(X9_62_c2pnb163v1); ++ SPCF_CPARAM_CASE(X9_62_c2pnb163v2); ++ SPCF_CPARAM_CASE(X9_62_c2pnb163v3); ++ SPCF_CPARAM_CASE(X9_62_c2pnb176v1); ++ SPCF_CPARAM_CASE(X9_62_c2tnb191v1); ++ SPCF_CPARAM_CASE(X9_62_c2tnb191v2); ++ SPCF_CPARAM_CASE(X9_62_c2tnb191v3); ++ SPCF_CPARAM_CASE(X9_62_c2pnb208w1); ++ SPCF_CPARAM_CASE(X9_62_c2tnb239v1); ++ SPCF_CPARAM_CASE(X9_62_c2tnb239v2); ++ SPCF_CPARAM_CASE(X9_62_c2tnb239v3); ++ SPCF_CPARAM_CASE(X9_62_c2pnb272w1); ++ SPCF_CPARAM_CASE(X9_62_c2pnb304w1); ++ SPCF_CPARAM_CASE(X9_62_c2tnb359v1); ++ SPCF_CPARAM_CASE(X9_62_c2pnb368w1); ++ SPCF_CPARAM_CASE(X9_62_c2tnb431r1); ++ SPCF_CPARAM_CASE(wap_wsg_idm_ecid_wtls1); ++ SPCF_CPARAM_CASE(wap_wsg_idm_ecid_wtls3); ++ SPCF_CPARAM_CASE(wap_wsg_idm_ecid_wtls4); ++ SPCF_CPARAM_CASE(wap_wsg_idm_ecid_wtls5); ++ SPCF_CPARAM_CASE(wap_wsg_idm_ecid_wtls10); ++ SPCF_CPARAM_CASE(wap_wsg_idm_ecid_wtls11); ++ /* Oakley curve #3 over 155 bit binary filed */ ++ SPCF_CPARAM_CASE(ipsec3); ++ /* Oakley curve #4 over 185 bit binary filed */ ++ SPCF_CPARAM_CASE(ipsec4); ++ default: ++ ret = -EINVAL; ++ break; ++ } ++ return ret; ++} ++ ++/* Copies the curve points to a flat buffer with appropriate padding */ ++static inline unsigned char *eng_copy_curve_points(BIGNUM * x, BIGNUM * y, ++ int xy_len, int crv_len) ++{ ++ unsigned char *xy = NULL; ++ int len1 = 0, len2 = 0; ++ ++ len1 = BN_num_bytes(x); ++ len2 = BN_num_bytes(y); ++ ++ if (!(xy = malloc(xy_len))) { ++ return NULL; ++ } ++ ++ memset(xy, 0, xy_len); ++ ++ if (len1 < crv_len) { ++ if (!BN_is_zero(x)) ++ BN_bn2bin(x, xy + (crv_len - len1)); ++ } else { ++ BN_bn2bin(x, xy); ++ } ++ ++ if (len2 < crv_len) { ++ if (!BN_is_zero(y)) ++ BN_bn2bin(y, xy+crv_len+(crv_len-len2)); ++ } else { ++ BN_bn2bin(y, xy+crv_len); ++ } ++ ++ return xy; ++} ++ ++enum curve_t { ++ DISCRETE_LOG, ++ ECC_PRIME, ++ ECC_BINARY, ++ MAX_ECC_TYPE ++}; ++#endif +-- +1.8.3.1 + diff --git a/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0005-Fixed-private-key-support-for-DH.patch b/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0005-Fixed-private-key-support-for-DH.patch deleted file mode 100644 index 06dff881..00000000 --- a/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0005-Fixed-private-key-support-for-DH.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 408bdb2a3971edd6a949f5a93bd44d0a6f3eb823 Mon Sep 17 00:00:00 2001 -From: Yashpal Dutta -Date: Thu, 20 Mar 2014 19:55:51 -0500 -Subject: [PATCH][fsl 05/15] Fixed private key support for DH - -Upstream-status: Pending - -Required Length of the DH result is not returned in dh method in openssl - -Tested-by: Yashpal Dutta ---- - crypto/dh/dh_ameth.c | 7 ------- - 1 file changed, 7 deletions(-) - -diff --git a/crypto/dh/dh_ameth.c b/crypto/dh/dh_ameth.c -index ed32004..02ec2d4 100644 ---- a/crypto/dh/dh_ameth.c -+++ b/crypto/dh/dh_ameth.c -@@ -422,13 +422,6 @@ static int dh_copy_parameters(EVP_PKEY *to, const EVP_PKEY *from) - if (to->pkey.dh->g != NULL) - BN_free(to->pkey.dh->g); - to->pkey.dh->g=a; -- if ((a=BN_dup(from->pkey.dh->q)) != NULL) { -- if (to->pkey.dh->q != NULL) -- BN_free(to->pkey.dh->q); -- to->pkey.dh->q=a; -- } -- -- to->pkey.dh->length = from->pkey.dh->length; - - return 1; - } --- -1.7.9.7 - diff --git a/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0006-Fixed-private-key-support-for-DH.patch b/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0006-Fixed-private-key-support-for-DH.patch new file mode 100644 index 00000000..41f48a2f --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0006-Fixed-private-key-support-for-DH.patch @@ -0,0 +1,33 @@ +From 39a9e609290a8a1163a721915bcde0c7cf8f92f7 Mon Sep 17 00:00:00 2001 +From: Yashpal Dutta +Date: Tue, 11 Mar 2014 05:57:47 +0545 +Subject: [PATCH 06/17] Fixed private key support for DH + +Upstream-status: Pending + +Signed-off-by: Yashpal Dutta +--- + crypto/dh/dh_ameth.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/crypto/dh/dh_ameth.c b/crypto/dh/dh_ameth.c +index 02ec2d4..ed32004 100644 +--- a/crypto/dh/dh_ameth.c ++++ b/crypto/dh/dh_ameth.c +@@ -422,6 +422,13 @@ static int dh_copy_parameters(EVP_PKEY *to, const EVP_PKEY *from) + if (to->pkey.dh->g != NULL) + BN_free(to->pkey.dh->g); + to->pkey.dh->g=a; ++ if ((a=BN_dup(from->pkey.dh->q)) != NULL) { ++ if (to->pkey.dh->q != NULL) ++ BN_free(to->pkey.dh->q); ++ to->pkey.dh->q=a; ++ } ++ ++ to->pkey.dh->length = from->pkey.dh->length; + + return 1; + } +-- +1.8.3.1 + diff --git a/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0006-Initial-support-for-PKC-in-cryptodev-engine.patch b/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0006-Initial-support-for-PKC-in-cryptodev-engine.patch deleted file mode 100644 index b5ac55db..00000000 --- a/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0006-Initial-support-for-PKC-in-cryptodev-engine.patch +++ /dev/null @@ -1,1563 +0,0 @@ -From 8e9a39aab2fce48c117460eb1d14bcc02be6de6c Mon Sep 17 00:00:00 2001 -From: Yashpal Dutta -Date: Tue, 11 Mar 2014 06:29:52 +0545 -Subject: [PATCH][fsl 06/15] Initial support for PKC in cryptodev engine - -Upstream-status: Pending - -Signed-off-by: Yashpal Dutta ---- - crypto/engine/eng_cryptodev.c | 1343 ++++++++++++++++++++++++++++++++++++----- - 1 file changed, 1183 insertions(+), 160 deletions(-) - -diff --git a/crypto/engine/eng_cryptodev.c b/crypto/engine/eng_cryptodev.c -index 123613d..88caec1 100644 ---- a/crypto/engine/eng_cryptodev.c -+++ b/crypto/engine/eng_cryptodev.c -@@ -54,11 +54,14 @@ ENGINE_load_cryptodev(void) - #else - - #include --#include - #include - #include - #include - #include -+#include -+#include -+#include -+#include - #include - #include - #include -@@ -68,6 +71,8 @@ ENGINE_load_cryptodev(void) - #include - #include - #include -+#include "eng_cryptodev_ec.h" -+#include - - struct dev_crypto_state { - struct session_op d_sess; -@@ -116,24 +121,112 @@ static int cryptodev_bn_mod_exp(BIGNUM *r, const BIGNUM *a, - static int cryptodev_rsa_nocrt_mod_exp(BIGNUM *r0, const BIGNUM *I, - RSA *rsa, BN_CTX *ctx); - static int cryptodev_rsa_mod_exp(BIGNUM *r0, const BIGNUM *I, RSA *rsa, BN_CTX *ctx); --static int cryptodev_dsa_bn_mod_exp(DSA *dsa, BIGNUM *r, BIGNUM *a, -- const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx); --static int cryptodev_dsa_dsa_mod_exp(DSA *dsa, BIGNUM *t1, BIGNUM *g, -- BIGNUM *u1, BIGNUM *pub_key, BIGNUM *u2, BIGNUM *p, -- BN_CTX *ctx, BN_MONT_CTX *mont); - static DSA_SIG *cryptodev_dsa_do_sign(const unsigned char *dgst, - int dlen, DSA *dsa); - static int cryptodev_dsa_verify(const unsigned char *dgst, int dgst_len, - DSA_SIG *sig, DSA *dsa); --static int cryptodev_mod_exp_dh(const DH *dh, BIGNUM *r, const BIGNUM *a, -- const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx, -- BN_MONT_CTX *m_ctx); - static int cryptodev_dh_compute_key(unsigned char *key, - const BIGNUM *pub_key, DH *dh); - static int cryptodev_ctrl(ENGINE *e, int cmd, long i, void *p, - void (*f)(void)); - void ENGINE_load_cryptodev(void); - -+inline int spcf_bn2bin(BIGNUM *bn, unsigned char **bin, int *bin_len) -+{ -+ int len; -+ unsigned char *p; -+ -+ len = BN_num_bytes(bn); -+ -+ if (!len) -+ return -1; -+ -+ p = malloc(len); -+ if (!p) -+ return -1; -+ -+ BN_bn2bin(bn,p); -+ -+ *bin = p; -+ *bin_len = len; -+ -+ return 0; -+} -+ -+inline int spcf_bn2bin_ex(BIGNUM *bn, unsigned char **bin, int *bin_len) -+{ -+ int len; -+ unsigned char *p; -+ -+ len = BN_num_bytes(bn); -+ -+ if (!len) -+ return -1; -+ -+ if (len < *bin_len) -+ p = malloc(*bin_len); -+ else -+ p = malloc(len); -+ -+ if (!p) -+ return -ENOMEM; -+ -+ if (len < *bin_len) { -+ /* place padding */ -+ memset(p, 0, (*bin_len - len)); -+ BN_bn2bin(bn,p+(*bin_len-len)); -+ } else { -+ BN_bn2bin(bn,p); -+ } -+ -+ *bin = p; -+ if (len >= *bin_len) -+ *bin_len = len; -+ -+ return 0; -+} -+ -+/** -+ * Convert an ECC F2m 'b' parameter into the 'c' parameter. -+ *Inputs: -+ * q, the curve's modulus -+ * b, the curve's b parameter -+ * (a bignum for b, a buffer for c) -+ * Output: -+ * c, written into bin, right-adjusted to fill q_len bytes. -+ */ -+static int -+eng_ec_compute_cparam(const BIGNUM* b, const BIGNUM* q, -+ unsigned char **bin, int *bin_len) -+{ -+ BIGNUM* c = BN_new(); -+ BIGNUM* exp = BN_new(); -+ BN_CTX *ctx = BN_CTX_new(); -+ int m = BN_num_bits(q) - 1; -+ int ok = 0; -+ -+ if (!c || !exp || !ctx || *bin) -+ goto err; -+ -+ /* -+ * We have to compute c, where b = c^4, i.e., the fourth root of b. -+ * The equation for c is c = b^(2^(m-2)) -+ * Compute exp = 2^(m-2) -+ * (1 << x) == 2^x -+ * and then compute c = b^exp -+ */ -+ BN_lshift(exp, BN_value_one(), m-2); -+ BN_GF2m_mod_exp(c, b, exp, q, ctx); -+ /* Store c */ -+ spcf_bn2bin_ex(c, bin, bin_len); -+ ok = 1; -+err: -+ if (ctx) BN_CTX_free(ctx); -+ if (c) BN_free(c); -+ if (exp) BN_free(exp); -+ return ok; -+} -+ - static const ENGINE_CMD_DEFN cryptodev_defns[] = { - { 0, NULL, NULL, 0 } - }; -@@ -1106,7 +1199,6 @@ cryptodev_engine_digests(ENGINE *e, const EVP_MD **digest, - static int - bn2crparam(const BIGNUM *a, struct crparam *crp) - { -- int i, j, k; - ssize_t bytes, bits; - u_char *b; - -@@ -1123,15 +1215,7 @@ bn2crparam(const BIGNUM *a, struct crparam *crp) - - crp->crp_p = (caddr_t) b; - crp->crp_nbits = bits; -- -- for (i = 0, j = 0; i < a->top; i++) { -- for (k = 0; k < BN_BITS2 / 8; k++) { -- if ((j + k) >= bytes) -- return (0); -- b[j + k] = a->d[i] >> (k * 8); -- } -- j += BN_BITS2 / 8; -- } -+ BN_bn2bin(a, crp->crp_p); - return (0); - } - -@@ -1139,22 +1223,14 @@ bn2crparam(const BIGNUM *a, struct crparam *crp) - static int - crparam2bn(struct crparam *crp, BIGNUM *a) - { -- u_int8_t *pd; -- int i, bytes; -+ int bytes; - - bytes = (crp->crp_nbits + 7) / 8; - - if (bytes == 0) - return (-1); - -- if ((pd = (u_int8_t *) malloc(bytes)) == NULL) -- return (-1); -- -- for (i = 0; i < bytes; i++) -- pd[i] = crp->crp_p[bytes - i - 1]; -- -- BN_bin2bn(pd, bytes, a); -- free(pd); -+ BN_bin2bn(crp->crp_p, bytes, a); - - return (0); - } -@@ -1202,6 +1278,32 @@ cryptodev_asym(struct crypt_kop *kop, int rlen, BIGNUM *r, int slen, BIGNUM *s) - return (ret); - } - -+/* Close an opened instance of cryptodev engine */ -+void cryptodev_close_instance(void *handle) -+{ -+ int fd; -+ -+ if (handle) { -+ fd = *(int *)handle; -+ close(fd); -+ free(handle); -+ } -+} -+ -+/* Create an instance of cryptodev for asynchronous interface */ -+void *cryptodev_init_instance(void) -+{ -+ int *fd = malloc(sizeof(int)); -+ -+ if (fd) { -+ if ((*fd = open("/dev/crypto", O_RDWR, 0)) == -1) { -+ free(fd); -+ return NULL; -+ } -+ } -+ return fd; -+} -+ - static int - cryptodev_bn_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, - const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *in_mont) -@@ -1217,9 +1319,9 @@ cryptodev_bn_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, - return (ret); - } - -- memset(&kop, 0, sizeof kop); - kop.crk_op = CRK_MOD_EXP; -- -+ kop.crk_oparams = 0; -+ kop.crk_status = 0; - /* inputs: a^p % m */ - if (bn2crparam(a, &kop.crk_param[0])) - goto err; -@@ -1260,28 +1362,38 @@ static int - cryptodev_rsa_mod_exp(BIGNUM *r0, const BIGNUM *I, RSA *rsa, BN_CTX *ctx) - { - struct crypt_kop kop; -- int ret = 1; -+ int ret = 1, f_len, p_len, q_len; -+ unsigned char *f = NULL, *p = NULL, *q = NULL, *dp = NULL, *dq = NULL, *c = NULL; - - if (!rsa->p || !rsa->q || !rsa->dmp1 || !rsa->dmq1 || !rsa->iqmp) { - /* XXX 0 means failure?? */ - return (0); - } - -- memset(&kop, 0, sizeof kop); -+ kop.crk_oparams = 0; -+ kop.crk_status = 0; - kop.crk_op = CRK_MOD_EXP_CRT; -+ f_len = BN_num_bytes(rsa->n); -+ spcf_bn2bin_ex(I, &f, &f_len); -+ spcf_bn2bin(rsa->p, &p, &p_len); -+ spcf_bn2bin(rsa->q, &q, &q_len); -+ spcf_bn2bin_ex(rsa->dmp1, &dp, &p_len); -+ spcf_bn2bin_ex(rsa->iqmp, &c, &p_len); -+ spcf_bn2bin_ex(rsa->dmq1, &dq, &q_len); - /* inputs: rsa->p rsa->q I rsa->dmp1 rsa->dmq1 rsa->iqmp */ -- if (bn2crparam(rsa->p, &kop.crk_param[0])) -- goto err; -- if (bn2crparam(rsa->q, &kop.crk_param[1])) -- goto err; -- if (bn2crparam(I, &kop.crk_param[2])) -- goto err; -- if (bn2crparam(rsa->dmp1, &kop.crk_param[3])) -- goto err; -- if (bn2crparam(rsa->dmq1, &kop.crk_param[4])) -- goto err; -- if (bn2crparam(rsa->iqmp, &kop.crk_param[5])) -- goto err; -+ kop.crk_param[0].crp_p = p; -+ kop.crk_param[0].crp_nbits = p_len * 8; -+ kop.crk_param[1].crp_p = q; -+ kop.crk_param[1].crp_nbits = q_len * 8; -+ kop.crk_param[2].crp_p = f; -+ kop.crk_param[2].crp_nbits = f_len * 8; -+ kop.crk_param[3].crp_p = dp; -+ kop.crk_param[3].crp_nbits = p_len * 8; -+ /* dq must of length q, rest all of length p*/ -+ kop.crk_param[4].crp_p = dq; -+ kop.crk_param[4].crp_nbits = q_len * 8; -+ kop.crk_param[5].crp_p = c; -+ kop.crk_param[5].crp_nbits = p_len * 8; - kop.crk_iparams = 6; - - if (cryptodev_asym(&kop, BN_num_bytes(rsa->n), r0, 0, NULL)) { -@@ -1317,90 +1429,117 @@ static RSA_METHOD cryptodev_rsa = { - NULL /* rsa_verify */ - }; - --static int --cryptodev_dsa_bn_mod_exp(DSA *dsa, BIGNUM *r, BIGNUM *a, const BIGNUM *p, -- const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx) --{ -- return (cryptodev_bn_mod_exp(r, a, p, m, ctx, m_ctx)); --} -- --static int --cryptodev_dsa_dsa_mod_exp(DSA *dsa, BIGNUM *t1, BIGNUM *g, -- BIGNUM *u1, BIGNUM *pub_key, BIGNUM *u2, BIGNUM *p, -- BN_CTX *ctx, BN_MONT_CTX *mont) -+static DSA_SIG * -+cryptodev_dsa_do_sign(const unsigned char *dgst, int dlen, DSA *dsa) - { -- BIGNUM t2; -- int ret = 0; -- -- BN_init(&t2); -- -- /* v = ( g^u1 * y^u2 mod p ) mod q */ -- /* let t1 = g ^ u1 mod p */ -- ret = 0; -+ struct crypt_kop kop; -+ BIGNUM *c = NULL, *d = NULL; -+ DSA_SIG *dsaret = NULL; -+ int q_len = 0, r_len = 0, g_len = 0; -+ int priv_key_len = 0, ret; -+ unsigned char *q = NULL, *r = NULL, *g = NULL, *priv_key = NULL, *f = NULL; - -- if (!dsa->meth->bn_mod_exp(dsa,t1,dsa->g,u1,dsa->p,ctx,mont)) -+ memset(&kop, 0, sizeof kop); -+ if ((c = BN_new()) == NULL) { -+ DSAerr(DSA_F_DSA_DO_SIGN, ERR_R_MALLOC_FAILURE); - goto err; -+ } - -- /* let t2 = y ^ u2 mod p */ -- if (!dsa->meth->bn_mod_exp(dsa,&t2,dsa->pub_key,u2,dsa->p,ctx,mont)) -+ if ((d = BN_new()) == NULL) { -+ BN_free(c); -+ DSAerr(DSA_F_DSA_DO_SIGN, ERR_R_MALLOC_FAILURE); - goto err; -- /* let u1 = t1 * t2 mod p */ -- if (!BN_mod_mul(u1,t1,&t2,dsa->p,ctx)) -+ } -+ -+ if (spcf_bn2bin(dsa->p, &q, &q_len)) { -+ DSAerr(DSA_F_DSA_DO_SIGN, DSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE); - goto err; -+ } - -- BN_copy(t1,u1); -+ /* Get order of the field of private keys into plain buffer */ -+ if (spcf_bn2bin (dsa->q, &r, &r_len)) { -+ DSAerr(DSA_F_DSA_DO_SIGN, ERR_R_MALLOC_FAILURE); -+ goto err; -+ } - -- ret = 1; --err: -- BN_free(&t2); -- return(ret); --} -+ /* sanity test */ -+ if (dlen > r_len) { -+ DSAerr(DSA_F_DSA_DO_SIGN, DSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE); -+ goto err; -+ } - --static DSA_SIG * --cryptodev_dsa_do_sign(const unsigned char *dgst, int dlen, DSA *dsa) --{ -- struct crypt_kop kop; -- BIGNUM *r = NULL, *s = NULL; -- DSA_SIG *dsaret = NULL; -+ g_len = q_len; -+ /** -+ * Get generator into a plain buffer. If length is less than -+ * q_len then add leading padding bytes. -+ */ -+ if (spcf_bn2bin_ex(dsa->g, &g, &g_len)) { -+ DSAerr(DSA_F_DSA_DO_SIGN, ERR_R_MALLOC_FAILURE); -+ goto err; -+ } - -- if ((r = BN_new()) == NULL) -+ priv_key_len = r_len; -+ /** -+ * Get private key into a plain buffer. If length is less than -+ * r_len then add leading padding bytes. -+ */ -+ if (spcf_bn2bin_ex(dsa->priv_key, &priv_key, &priv_key_len)) { -+ DSAerr(DSA_F_DSA_DO_SIGN, ERR_R_MALLOC_FAILURE); - goto err; -- if ((s = BN_new()) == NULL) { -- BN_free(r); -+ } -+ -+ /* Allocate memory to store hash. */ -+ f = OPENSSL_malloc (r_len); -+ if (!f) { -+ DSAerr(DSA_F_DSA_DO_SIGN, ERR_R_MALLOC_FAILURE); - goto err; - } - -- memset(&kop, 0, sizeof kop); -+ /* Add padding, since SEC expects hash to of size r_len */ -+ if (dlen < r_len) -+ memset(f, 0, r_len - dlen); -+ -+ /* Skip leading bytes if dgst_len < r_len */ -+ memcpy(f + r_len - dlen, dgst, dlen); -+ - kop.crk_op = CRK_DSA_SIGN; - - /* inputs: dgst dsa->p dsa->q dsa->g dsa->priv_key */ -- kop.crk_param[0].crp_p = (caddr_t)dgst; -- kop.crk_param[0].crp_nbits = dlen * 8; -- if (bn2crparam(dsa->p, &kop.crk_param[1])) -- goto err; -- if (bn2crparam(dsa->q, &kop.crk_param[2])) -- goto err; -- if (bn2crparam(dsa->g, &kop.crk_param[3])) -- goto err; -- if (bn2crparam(dsa->priv_key, &kop.crk_param[4])) -- goto err; -+ kop.crk_param[0].crp_p = (void*)f; -+ kop.crk_param[0].crp_nbits = r_len * 8; -+ kop.crk_param[1].crp_p = (void*)q; -+ kop.crk_param[1].crp_nbits = q_len * 8; -+ kop.crk_param[2].crp_p = (void*)r; -+ kop.crk_param[2].crp_nbits = r_len * 8; -+ kop.crk_param[3].crp_p = (void*)g; -+ kop.crk_param[3].crp_nbits = g_len * 8; -+ kop.crk_param[4].crp_p = (void*)priv_key; -+ kop.crk_param[4].crp_nbits = priv_key_len * 8; - kop.crk_iparams = 5; - -- if (cryptodev_asym(&kop, BN_num_bytes(dsa->q), r, -- BN_num_bytes(dsa->q), s) == 0) { -- dsaret = DSA_SIG_new(); -- dsaret->r = r; -- dsaret->s = s; -- } else { -- const DSA_METHOD *meth = DSA_OpenSSL(); -- BN_free(r); -- BN_free(s); -- dsaret = (meth->dsa_do_sign)(dgst, dlen, dsa); -+ ret = cryptodev_asym(&kop, r_len, c, r_len, d); -+ -+ if (ret) { -+ DSAerr(DSA_F_DSA_DO_SIGN, DSA_R_DECODE_ERROR); -+ goto err; - } --err: -- kop.crk_param[0].crp_p = NULL; -+ -+ dsaret = DSA_SIG_new(); -+ dsaret->r = c; -+ dsaret->s = d; -+ - zapparams(&kop); - return (dsaret); -+err: -+ { -+ const DSA_METHOD *meth = DSA_OpenSSL(); -+ if (c) -+ BN_free(c); -+ if (d) -+ BN_free(d); -+ dsaret = (meth->dsa_do_sign)(dgst, dlen, dsa); -+ return (dsaret); -+ } - } - - static int -@@ -1408,42 +1547,179 @@ cryptodev_dsa_verify(const unsigned char *dgst, int dlen, - DSA_SIG *sig, DSA *dsa) - { - struct crypt_kop kop; -- int dsaret = 1; -+ int dsaret = 1, q_len = 0, r_len = 0, g_len = 0; -+ int w_len = 0 ,c_len = 0, d_len = 0, ret = -1; -+ unsigned char * q = NULL, * r = NULL, * w = NULL, * g = NULL; -+ unsigned char * c = NULL, * d = NULL, *f = NULL; - - memset(&kop, 0, sizeof kop); - kop.crk_op = CRK_DSA_VERIFY; - -- /* inputs: dgst dsa->p dsa->q dsa->g dsa->pub_key sig->r sig->s */ -- kop.crk_param[0].crp_p = (caddr_t)dgst; -- kop.crk_param[0].crp_nbits = dlen * 8; -- if (bn2crparam(dsa->p, &kop.crk_param[1])) -+ if (spcf_bn2bin(dsa->p, &q, &q_len)) { -+ DSAerr(DSA_F_DSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); -+ return ret; -+ } -+ -+ /* Get Order of field of private keys */ -+ if (spcf_bn2bin(dsa->q, &r, &r_len)) { -+ DSAerr(DSA_F_DSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); - goto err; -- if (bn2crparam(dsa->q, &kop.crk_param[2])) -+ } -+ -+ g_len = q_len; -+ /** -+ * Get generator into a plain buffer. If length is less than -+ * q_len then add leading padding bytes. -+ */ -+ if (spcf_bn2bin_ex(dsa->g, &g, &g_len)) { -+ DSAerr(DSA_F_DSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); - goto err; -- if (bn2crparam(dsa->g, &kop.crk_param[3])) -+ } -+ w_len = q_len; -+ /** -+ * Get public key into a plain buffer. If length is less than -+ * q_len then add leading padding bytes. -+ */ -+ if (spcf_bn2bin_ex(dsa->pub_key, &w, &w_len)) { -+ DSAerr(DSA_F_DSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); -+ goto err; -+ } -+ /** -+ * Get the 1st part of signature into a flat buffer with -+ * appropriate padding -+ */ -+ c_len = r_len; -+ -+ if (spcf_bn2bin_ex(sig->r, &c, &c_len)) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); - goto err; -- if (bn2crparam(dsa->pub_key, &kop.crk_param[4])) -+ } -+ -+ /** -+ * Get the 2nd part of signature into a flat buffer with -+ * appropriate padding -+ */ -+ d_len = r_len; -+ -+ if (spcf_bn2bin_ex(sig->s, &d, &d_len)) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); - goto err; -- if (bn2crparam(sig->r, &kop.crk_param[5])) -+ } -+ -+ -+ /* Sanity test */ -+ if (dlen > r_len) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); - goto err; -- if (bn2crparam(sig->s, &kop.crk_param[6])) -+ } -+ -+ /* Allocate memory to store hash. */ -+ f = OPENSSL_malloc (r_len); -+ if (!f) { -+ DSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); - goto err; -+ } -+ -+ /* Add padding, since SEC expects hash to of size r_len */ -+ if (dlen < r_len) -+ memset(f, 0, r_len - dlen); -+ -+ /* Skip leading bytes if dgst_len < r_len */ -+ memcpy(f + r_len - dlen, dgst, dlen); -+ -+ /* inputs: dgst dsa->p dsa->q dsa->g dsa->pub_key sig->r sig->s */ -+ kop.crk_param[0].crp_p = (void*)f; -+ kop.crk_param[0].crp_nbits = r_len * 8; -+ kop.crk_param[1].crp_p = q; -+ kop.crk_param[1].crp_nbits = q_len * 8; -+ kop.crk_param[2].crp_p = r; -+ kop.crk_param[2].crp_nbits = r_len * 8; -+ kop.crk_param[3].crp_p = g; -+ kop.crk_param[3].crp_nbits = g_len * 8; -+ kop.crk_param[4].crp_p = w; -+ kop.crk_param[4].crp_nbits = w_len * 8; -+ kop.crk_param[5].crp_p = c; -+ kop.crk_param[5].crp_nbits = c_len * 8; -+ kop.crk_param[6].crp_p = d; -+ kop.crk_param[6].crp_nbits = d_len * 8; - kop.crk_iparams = 7; - -- if (cryptodev_asym(&kop, 0, NULL, 0, NULL) == 0) { --/*OCF success value is 0, if not zero, change dsaret to fail*/ -- if(0 != kop.crk_status) dsaret = 0; -- } else { -- const DSA_METHOD *meth = DSA_OpenSSL(); -+ if ((cryptodev_asym(&kop, 0, NULL, 0, NULL))) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, DSA_R_DECODE_ERROR); -+ goto err; -+ } - -- dsaret = (meth->dsa_do_verify)(dgst, dlen, sig, dsa); -+ /*OCF success value is 0, if not zero, change dsaret to fail*/ -+ if(0 != kop.crk_status) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, DSA_R_DECODE_ERROR); -+ goto err; - } --err: -- kop.crk_param[0].crp_p = NULL; -+ - zapparams(&kop); - return (dsaret); -+err: -+ { -+ const DSA_METHOD *meth = DSA_OpenSSL(); -+ -+ dsaret = (meth->dsa_do_verify)(dgst, dlen, sig, dsa); -+ } -+ return dsaret; - } - -+/* Cryptodev DSA Key Gen routine */ -+static int cryptodev_dsa_keygen(DSA *dsa) -+{ -+ struct crypt_kop kop; -+ int ret = 1, g_len; -+ unsigned char *g = NULL; -+ -+ if (dsa->priv_key == NULL) { -+ if ((dsa->priv_key=BN_new()) == NULL) -+ goto sw_try; -+ } -+ -+ if (dsa->pub_key == NULL) { -+ if ((dsa->pub_key=BN_new()) == NULL) -+ goto sw_try; -+ } -+ -+ g_len = BN_num_bytes(dsa->p); -+ /** -+ * Get generator into a plain buffer. If length is less than -+ * p_len then add leading padding bytes. -+ */ -+ if (spcf_bn2bin_ex(dsa->g, &g, &g_len)) { -+ DSAerr(DSA_F_DSA_GENERATE_KEY, ERR_R_MALLOC_FAILURE); -+ goto sw_try; -+ } -+ -+ memset(&kop, 0, sizeof kop); -+ -+ kop.crk_op = CRK_DSA_GENERATE_KEY; -+ if (bn2crparam(dsa->p, &kop.crk_param[0])) -+ goto sw_try; -+ if (bn2crparam(dsa->q, &kop.crk_param[1])) -+ goto sw_try; -+ kop.crk_param[2].crp_p = g; -+ kop.crk_param[2].crp_nbits = g_len * 8; -+ kop.crk_iparams = 3; -+ -+ /* pub_key is or prime length while priv key is of length of order */ -+ if (cryptodev_asym(&kop, BN_num_bytes(dsa->p), dsa->pub_key, -+ BN_num_bytes(dsa->q), dsa->priv_key)) -+ goto sw_try; -+ -+ return ret; -+sw_try: -+ { -+ const DSA_METHOD *meth = DSA_OpenSSL(); -+ ret = (meth->dsa_keygen)(dsa); -+ } -+ return ret; -+} -+ -+ -+ - static DSA_METHOD cryptodev_dsa = { - "cryptodev DSA method", - NULL, -@@ -1457,12 +1733,543 @@ static DSA_METHOD cryptodev_dsa = { - NULL /* app_data */ - }; - --static int --cryptodev_mod_exp_dh(const DH *dh, BIGNUM *r, const BIGNUM *a, -- const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx, -- BN_MONT_CTX *m_ctx) -+static ECDSA_METHOD cryptodev_ecdsa = { -+ "cryptodev ECDSA method", -+ NULL, -+ NULL, /* ecdsa_sign_setup */ -+ NULL, -+ NULL, -+ 0, /* flags */ -+ NULL /* app_data */ -+}; -+ -+typedef enum ec_curve_s -+{ -+ EC_PRIME, -+ EC_BINARY -+} ec_curve_t; -+ -+/* ENGINE handler for ECDSA Sign */ -+static ECDSA_SIG *cryptodev_ecdsa_do_sign( const unsigned char *dgst, -+ int dgst_len, const BIGNUM *in_kinv, const BIGNUM *in_r, EC_KEY *eckey) - { -- return (cryptodev_bn_mod_exp(r, a, p, m, ctx, m_ctx)); -+ BIGNUM *m = NULL, *p = NULL, *a = NULL; -+ BIGNUM *b = NULL, *x = NULL, *y = NULL; -+ BN_CTX *ctx = NULL; -+ ECDSA_SIG *ret = NULL; -+ ECDSA_DATA *ecdsa = NULL; -+ unsigned char * q = NULL, *r = NULL, *ab = NULL, *g_xy = NULL; -+ unsigned char * s = NULL, *c = NULL, *d = NULL, *f = NULL, *tmp_dgst = NULL; -+ int i = 0, q_len = 0, priv_key_len = 0, r_len = 0; -+ int g_len = 0, d_len = 0, ab_len = 0; -+ const BIGNUM *order = NULL, *priv_key=NULL; -+ const EC_GROUP *group = NULL; -+ struct crypt_kop kop; -+ ec_curve_t ec_crv = EC_PRIME; -+ -+ memset(&kop, 0, sizeof(kop)); -+ ecdsa = ecdsa_check(eckey); -+ if (!ecdsa) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_PASSED_NULL_PARAMETER); -+ return NULL; -+ } -+ -+ group = EC_KEY_get0_group(eckey); -+ priv_key = EC_KEY_get0_private_key(eckey); -+ -+ if (!group || !priv_key) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_PASSED_NULL_PARAMETER); -+ return NULL; -+ } -+ -+ if ((ctx = BN_CTX_new()) == NULL || (m = BN_new()) == NULL || -+ (a = BN_new()) == NULL || (b = BN_new()) == NULL || -+ (p = BN_new()) == NULL || (x = BN_new()) == NULL || -+ (y = BN_new()) == NULL) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_MALLOC_FAILURE); -+ goto err; -+ } -+ -+ order = &group->order; -+ if (!order || BN_is_zero(order)) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ECDSA_R_MISSING_PARAMETERS); -+ goto err; -+ } -+ -+ i = BN_num_bits(order); -+ /* Need to truncate digest if it is too long: first truncate whole -+ bytes */ -+ if (8 * dgst_len > i) -+ dgst_len = (i + 7)/8; -+ -+ if (!BN_bin2bn(dgst, dgst_len, m)) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_BN_LIB); -+ goto err; -+ } -+ -+ /* If still too long truncate remaining bits with a shift */ -+ if ((8 * dgst_len > i) && !BN_rshift(m, m, 8 - (i & 0x7))) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_BN_LIB); -+ goto err; -+ } -+ -+ /* copy the truncated bits into plain buffer */ -+ if (spcf_bn2bin(m, &tmp_dgst, &dgst_len)) { -+ fprintf(stderr, "%s:%d: OPENSSL_malloc failec\n", __FUNCTION__, __LINE__); -+ goto err; -+ } -+ -+ ret = ECDSA_SIG_new(); -+ if (!ret) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_BN_LIB); -+ goto err; -+ } -+ -+ /* check if this is prime or binary EC request */ -+ if (EC_METHOD_get_field_type(EC_GROUP_method_of(group)) == NID_X9_62_prime_field) { -+ ec_crv = EC_PRIME; -+ /* get the generator point pair */ -+ if (!EC_POINT_get_affine_coordinates_GFp (group, EC_GROUP_get0_generator(group), -+ x, y,ctx)) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_EC_LIB); -+ goto err; -+ } -+ -+ /* get the ECC curve parameters */ -+ if (!EC_GROUP_get_curve_GFp(group, p, a, b , ctx)) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_EC_LIB); -+ goto err; -+ } -+ } else if (EC_METHOD_get_field_type(EC_GROUP_method_of(group)) == NID_X9_62_characteristic_two_field) { -+ ec_crv = EC_BINARY; -+ /* get the ECC curve parameters */ -+ if (!EC_GROUP_get_curve_GF2m(group, p, a, b , ctx)) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_EC_LIB); -+ goto err; -+ } -+ -+ /* get the generator point pair */ -+ if (!EC_POINT_get_affine_coordinates_GF2m(group, -+ EC_GROUP_get0_generator(group), x, y,ctx)) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_EC_LIB); -+ goto err; -+ } -+ } else { -+ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_EC_LIB); -+ goto err; -+ } -+ -+ if (spcf_bn2bin(order, &r, &r_len)) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_MALLOC_FAILURE); -+ goto err; -+ } -+ -+ if (spcf_bn2bin(p, &q, &q_len)) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_MALLOC_FAILURE); -+ goto err; -+ } -+ -+ priv_key_len = r_len; -+ -+ /** -+ * If BN_num_bytes of priv_key returns less then r_len then -+ * add padding bytes before the key -+ */ -+ if (spcf_bn2bin_ex(priv_key, &s, &priv_key_len)) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_MALLOC_FAILURE); -+ goto err; -+ } -+ -+ /* Generation of ECC curve parameters */ -+ ab_len = 2*q_len; -+ ab = eng_copy_curve_points(a, b, ab_len, q_len); -+ if (!ab) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_MALLOC_FAILURE); -+ goto err; -+ } -+ -+ if (ec_crv == EC_BINARY) { -+ if (eng_ec_get_cparam(EC_GROUP_get_curve_name(group), ab+q_len, q_len)) -+ { -+ unsigned char *c_temp = NULL; -+ int c_temp_len = q_len; -+ if (eng_ec_compute_cparam(b, p, &c_temp, &c_temp_len)) -+ memcpy(ab+q_len, c_temp, q_len); -+ else -+ goto err; -+ } -+ kop.curve_type = ECC_BINARY; -+ } -+ -+ /* Calculation of Generator point */ -+ g_len = 2*q_len; -+ g_xy = eng_copy_curve_points(x, y, g_len, q_len); -+ if (!g_xy) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_MALLOC_FAILURE); -+ goto err; -+ } -+ -+ /* Memory allocation for first part of digital signature */ -+ c = malloc(r_len); -+ if (!c) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_MALLOC_FAILURE); -+ goto err; -+ } -+ -+ d_len = r_len; -+ -+ /* Memory allocation for second part of digital signature */ -+ d = malloc(d_len); -+ if (!d) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_MALLOC_FAILURE); -+ goto err; -+ } -+ -+ /* memory for message representative */ -+ f = malloc(r_len); -+ if (!f) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_MALLOC_FAILURE); -+ goto err; -+ } -+ -+ /* Add padding, since SEC expects hash to of size r_len */ -+ memset(f, 0, r_len - dgst_len); -+ -+ /* Skip leading bytes if dgst_len < r_len */ -+ memcpy(f + r_len - dgst_len, tmp_dgst, dgst_len); -+ -+ dgst_len += r_len - dgst_len; -+ kop.crk_op = CRK_DSA_SIGN; -+ /* inputs: dgst dsa->p dsa->q dsa->g dsa->priv_key */ -+ kop.crk_param[0].crp_p = f; -+ kop.crk_param[0].crp_nbits = dgst_len * 8; -+ kop.crk_param[1].crp_p = q; -+ kop.crk_param[1].crp_nbits = q_len * 8; -+ kop.crk_param[2].crp_p = r; -+ kop.crk_param[2].crp_nbits = r_len * 8; -+ kop.crk_param[3].crp_p = g_xy; -+ kop.crk_param[3].crp_nbits = g_len * 8; -+ kop.crk_param[4].crp_p = s; -+ kop.crk_param[4].crp_nbits = priv_key_len * 8; -+ kop.crk_param[5].crp_p = ab; -+ kop.crk_param[5].crp_nbits = ab_len * 8; -+ kop.crk_iparams = 6; -+ kop.crk_param[6].crp_p = c; -+ kop.crk_param[6].crp_nbits = d_len * 8; -+ kop.crk_param[7].crp_p = d; -+ kop.crk_param[7].crp_nbits = d_len * 8; -+ kop.crk_oparams = 2; -+ -+ if (cryptodev_asym(&kop, 0, NULL, 0, NULL) == 0) { -+ /* Check if ret->r and s needs to allocated */ -+ crparam2bn(&kop.crk_param[6], ret->r); -+ crparam2bn(&kop.crk_param[7], ret->s); -+ } else { -+ const ECDSA_METHOD *meth = ECDSA_OpenSSL(); -+ ret = (meth->ecdsa_do_sign)(dgst, dgst_len, in_kinv, in_r, eckey); -+ } -+ kop.crk_param[0].crp_p = NULL; -+ zapparams(&kop); -+err: -+ if (!ret) { -+ ECDSA_SIG_free(ret); -+ ret = NULL; -+ } -+ return ret; -+} -+ -+static int cryptodev_ecdsa_verify(const unsigned char *dgst, int dgst_len, -+ ECDSA_SIG *sig, EC_KEY *eckey) -+{ -+ BIGNUM *m = NULL, *p = NULL, *a = NULL, *b = NULL; -+ BIGNUM *x = NULL, *y = NULL, *w_x = NULL, *w_y = NULL; -+ BN_CTX *ctx = NULL; -+ ECDSA_DATA *ecdsa = NULL; -+ unsigned char *q = NULL, *r = NULL, *ab = NULL, *g_xy = NULL, *w_xy = NULL; -+ unsigned char *c = NULL, *d = NULL, *f = NULL, *tmp_dgst = NULL; -+ int i = 0, q_len = 0, pub_key_len = 0, r_len = 0, c_len = 0, g_len = 0; -+ int d_len = 0, ab_len = 0, ret = -1; -+ const EC_POINT *pub_key = NULL; -+ const BIGNUM *order = NULL; -+ const EC_GROUP *group=NULL; -+ ec_curve_t ec_crv = EC_PRIME; -+ struct crypt_kop kop; -+ -+ memset(&kop, 0, sizeof kop); -+ ecdsa = ecdsa_check(eckey); -+ if (!ecdsa) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_PASSED_NULL_PARAMETER); -+ return ret; -+ } -+ -+ group = EC_KEY_get0_group(eckey); -+ pub_key = EC_KEY_get0_public_key(eckey); -+ -+ if (!group || !pub_key) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_PASSED_NULL_PARAMETER); -+ return ret; -+ } -+ -+ if ((ctx = BN_CTX_new()) == NULL || (m = BN_new()) == NULL || -+ (a = BN_new()) == NULL || (b = BN_new()) == NULL || -+ (p = BN_new()) == NULL || (x = BN_new()) == NULL || -+ (y = BN_new()) == NULL || (w_x = BN_new()) == NULL || -+ (w_y = BN_new()) == NULL) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); -+ goto err; -+ } -+ -+ order = &group->order; -+ if (!order || BN_is_zero(order)) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ECDSA_R_MISSING_PARAMETERS); -+ goto err; -+ } -+ -+ i = BN_num_bits(order); -+ /* Need to truncate digest if it is too long: first truncate whole -+ * bytes */ -+ if (8 * dgst_len > i) -+ dgst_len = (i + 7)/8; -+ -+ if (!BN_bin2bn(dgst, dgst_len, m)) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_BN_LIB); -+ goto err; -+ } -+ -+ /* If still too long truncate remaining bits with a shift */ -+ if ((8 * dgst_len > i) && !BN_rshift(m, m, 8 - (i & 0x7))) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_BN_LIB); -+ goto err; -+ } -+ /* copy the truncated bits into plain buffer */ -+ if (spcf_bn2bin(m, &tmp_dgst, &dgst_len)) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); -+ goto err; -+ } -+ -+ /* check if this is prime or binary EC request */ -+ if (EC_METHOD_get_field_type(EC_GROUP_method_of(group)) == NID_X9_62_prime_field) { -+ ec_crv = EC_PRIME; -+ -+ /* get the generator point pair */ -+ if (!EC_POINT_get_affine_coordinates_GFp (group, -+ EC_GROUP_get0_generator(group), x, y,ctx)) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_EC_LIB); -+ goto err; -+ } -+ -+ /* get the public key pair for prime curve */ -+ if (!EC_POINT_get_affine_coordinates_GFp (group, -+ pub_key, w_x, w_y,ctx)) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_EC_LIB); -+ goto err; -+ } -+ -+ /* get the ECC curve parameters */ -+ if (!EC_GROUP_get_curve_GFp(group, p, a, b, ctx)) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_EC_LIB); -+ goto err; -+ } -+ } else if (EC_METHOD_get_field_type(EC_GROUP_method_of(group)) == NID_X9_62_characteristic_two_field){ -+ ec_crv = EC_BINARY; -+ /* get the ECC curve parameters */ -+ if (!EC_GROUP_get_curve_GF2m(group, p, a, b , ctx)) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_EC_LIB); -+ goto err; -+ } -+ -+ /* get the generator point pair */ -+ if (!EC_POINT_get_affine_coordinates_GF2m(group, -+ EC_GROUP_get0_generator(group),x, y,ctx)) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_EC_LIB); -+ goto err; -+ } -+ -+ /* get the public key pair for binary curve */ -+ if (!EC_POINT_get_affine_coordinates_GF2m(group, -+ pub_key, w_x, w_y,ctx)) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_EC_LIB); -+ goto err; -+ } -+ }else { -+ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_EC_LIB); -+ goto err; -+ } -+ -+ /* Get the order of the subgroup of private keys */ -+ if (spcf_bn2bin((BIGNUM*)order, &r, &r_len)) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); -+ goto err; -+ } -+ -+ /* Get the irreducible polynomial that creates the field */ -+ if (spcf_bn2bin(p, &q, &q_len)) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); -+ goto err; -+ } -+ -+ /* Get the public key into a flat buffer with appropriate padding */ -+ pub_key_len = 2 * q_len; -+ -+ w_xy = eng_copy_curve_points (w_x, w_y, pub_key_len, q_len); -+ if (!w_xy) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); -+ goto err; -+ } -+ -+ /* Generation of ECC curve parameters */ -+ ab_len = 2*q_len; -+ -+ ab = eng_copy_curve_points (a, b, ab_len, q_len); -+ if (!ab) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); -+ goto err; -+ } -+ -+ if (ec_crv == EC_BINARY) { -+ /* copy b' i.e c(b), instead of only b */ -+ if (eng_ec_get_cparam(EC_GROUP_get_curve_name(group), ab+q_len, q_len)) -+ { -+ unsigned char *c_temp = NULL; -+ int c_temp_len = q_len; -+ if (eng_ec_compute_cparam(b, p, &c_temp, &c_temp_len)) -+ memcpy(ab+q_len, c_temp, q_len); -+ else -+ goto err; -+ } -+ kop.curve_type = ECC_BINARY; -+ } -+ -+ /* Calculation of Generator point */ -+ g_len = 2 * q_len; -+ -+ g_xy = eng_copy_curve_points (x, y, g_len, q_len); -+ if (!g_xy) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); -+ goto err; -+ } -+ -+ /** -+ * Get the 1st part of signature into a flat buffer with -+ * appropriate padding -+ */ -+ if (BN_num_bytes(sig->r) < r_len) -+ c_len = r_len; -+ -+ if (spcf_bn2bin_ex(sig->r, &c, &c_len)) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); -+ goto err; -+ } -+ -+ /** -+ * Get the 2nd part of signature into a flat buffer with -+ * appropriate padding -+ */ -+ if (BN_num_bytes(sig->s) < r_len) -+ d_len = r_len; -+ -+ if (spcf_bn2bin_ex(sig->s, &d, &d_len)) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); -+ goto err; -+ } -+ -+ /* memory for message representative */ -+ f = malloc(r_len); -+ if (!f) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); -+ goto err; -+ } -+ -+ /* Add padding, since SEC expects hash to of size r_len */ -+ memset(f, 0, r_len-dgst_len); -+ -+ /* Skip leading bytes if dgst_len < r_len */ -+ memcpy(f + r_len-dgst_len, tmp_dgst, dgst_len); -+ dgst_len += r_len-dgst_len; -+ kop.crk_op = CRK_DSA_VERIFY; -+ /* inputs: dgst dsa->p dsa->q dsa->g dsa->priv_key */ -+ kop.crk_param[0].crp_p = f; -+ kop.crk_param[0].crp_nbits = dgst_len * 8; -+ kop.crk_param[1].crp_p = q; -+ kop.crk_param[1].crp_nbits = q_len * 8; -+ kop.crk_param[2].crp_p = r; -+ kop.crk_param[2].crp_nbits = r_len * 8; -+ kop.crk_param[3].crp_p = g_xy; -+ kop.crk_param[3].crp_nbits = g_len * 8; -+ kop.crk_param[4].crp_p = w_xy; -+ kop.crk_param[4].crp_nbits = pub_key_len * 8; -+ kop.crk_param[5].crp_p = ab; -+ kop.crk_param[5].crp_nbits = ab_len * 8; -+ kop.crk_param[6].crp_p = c; -+ kop.crk_param[6].crp_nbits = d_len * 8; -+ kop.crk_param[7].crp_p = d; -+ kop.crk_param[7].crp_nbits = d_len * 8; -+ kop.crk_iparams = 8; -+ -+ if (cryptodev_asym(&kop, 0, NULL, 0, NULL) == 0) { -+ /*OCF success value is 0, if not zero, change ret to fail*/ -+ if(0 == kop.crk_status) -+ ret = 1; -+ } else { -+ const ECDSA_METHOD *meth = ECDSA_OpenSSL(); -+ -+ ret = (meth->ecdsa_do_verify)(dgst, dgst_len, sig, eckey); -+ } -+ kop.crk_param[0].crp_p = NULL; -+ zapparams(&kop); -+ -+err: -+ return ret; -+} -+ -+static int cryptodev_dh_keygen(DH *dh) -+{ -+ struct crypt_kop kop; -+ int ret = 1, g_len; -+ unsigned char *g = NULL; -+ -+ if (dh->priv_key == NULL) { -+ if ((dh->priv_key=BN_new()) == NULL) -+ goto sw_try; -+ } -+ -+ if (dh->pub_key == NULL) { -+ if ((dh->pub_key=BN_new()) == NULL) -+ goto sw_try; -+ } -+ -+ g_len = BN_num_bytes(dh->p); -+ /** -+ * Get generator into a plain buffer. If length is less than -+ * q_len then add leading padding bytes. -+ */ -+ if (spcf_bn2bin_ex(dh->g, &g, &g_len)) { -+ DSAerr(DH_F_DH_GENERATE_KEY, ERR_R_MALLOC_FAILURE); -+ goto sw_try; -+ } -+ -+ memset(&kop, 0, sizeof kop); -+ kop.crk_op = CRK_DH_GENERATE_KEY; -+ if (bn2crparam(dh->p, &kop.crk_param[0])) -+ goto sw_try; -+ if (bn2crparam(dh->q, &kop.crk_param[1])) -+ goto sw_try; -+ kop.crk_param[2].crp_p = g; -+ kop.crk_param[2].crp_nbits = g_len * 8; -+ kop.crk_iparams = 3; -+ -+ /* pub_key is or prime length while priv key is of length of order */ -+ if (cryptodev_asym(&kop, BN_num_bytes(dh->p), dh->pub_key, -+ BN_num_bytes(dh->q), dh->priv_key)) -+ goto sw_try; -+ -+ return ret; -+sw_try: -+ { -+ const DH_METHOD *meth = DH_OpenSSL(); -+ ret = (meth->generate_key)(dh); -+ } -+ return ret; - } - - static int -@@ -1470,43 +2277,234 @@ cryptodev_dh_compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh) - { - struct crypt_kop kop; - int dhret = 1; -- int fd, keylen; -+ int fd, p_len; -+ BIGNUM *temp = NULL; -+ unsigned char *padded_pub_key = NULL, *p = NULL; -+ -+ if ((fd = get_asym_dev_crypto()) < 0) -+ goto sw_try; -+ -+ memset(&kop, 0, sizeof kop); -+ kop.crk_op = CRK_DH_COMPUTE_KEY; -+ /* inputs: dh->priv_key pub_key dh->p key */ -+ spcf_bn2bin(dh->p, &p, &p_len); -+ spcf_bn2bin_ex(pub_key, &padded_pub_key, &p_len); -+ if (bn2crparam(dh->priv_key, &kop.crk_param[0])) -+ goto sw_try; -+ -+ kop.crk_param[1].crp_p = padded_pub_key; -+ kop.crk_param[1].crp_nbits = p_len * 8; -+ kop.crk_param[2].crp_p = p; -+ kop.crk_param[2].crp_nbits = p_len * 8; -+ kop.crk_iparams = 3; -+ kop.crk_param[3].crp_p = (void*) key; -+ kop.crk_param[3].crp_nbits = p_len * 8; -+ kop.crk_oparams = 1; -+ dhret = p_len; -+ -+ if (ioctl(fd, CIOCKEY, &kop)) -+ goto sw_try; - -- if ((fd = get_asym_dev_crypto()) < 0) { -+ if ((temp = BN_new())) { -+ if (!BN_bin2bn(key, p_len, temp)) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_BN_LIB); -+ goto sw_try; -+ } -+ if (dhret > BN_num_bytes(temp)) -+ dhret=BN_bn2bin(temp,key); -+ BN_free(temp); -+ } -+ -+ kop.crk_param[3].crp_p = NULL; -+ zapparams(&kop); -+ return (dhret); -+sw_try: -+ { - const DH_METHOD *meth = DH_OpenSSL(); - -- return ((meth->compute_key)(key, pub_key, dh)); -+ dhret = (meth->compute_key)(key, pub_key, dh); - } -+ return (dhret); -+} - -- keylen = BN_num_bits(dh->p); -+int cryptodev_ecdh_compute_key(void *out, size_t outlen, -+ const EC_POINT *pub_key, EC_KEY *ecdh, void *(*KDF)(const void *in, size_t inlen, -+ void *out, size_t *outlen)) -+{ -+ ec_curve_t ec_crv = EC_PRIME; -+ unsigned char * q = NULL, *w_xy = NULL, *ab = NULL, *s = NULL, *r = NULL; -+ BIGNUM * w_x = NULL, *w_y = NULL; -+ int q_len = 0, ab_len = 0, pub_key_len = 0, r_len = 0, priv_key_len = 0; -+ BIGNUM * p = NULL, *a = NULL, *b = NULL; -+ BN_CTX *ctx; -+ EC_POINT *tmp=NULL; -+ BIGNUM *x=NULL, *y=NULL; -+ const BIGNUM *priv_key; -+ const EC_GROUP* group = NULL; -+ int ret = -1; -+ size_t buflen, len; -+ struct crypt_kop kop; - - memset(&kop, 0, sizeof kop); -- kop.crk_op = CRK_DH_COMPUTE_KEY; - -- /* inputs: dh->priv_key pub_key dh->p key */ -- if (bn2crparam(dh->priv_key, &kop.crk_param[0])) -+ if ((ctx = BN_CTX_new()) == NULL) goto err; -+ BN_CTX_start(ctx); -+ x = BN_CTX_get(ctx); -+ y = BN_CTX_get(ctx); -+ p = BN_CTX_get(ctx); -+ a = BN_CTX_get(ctx); -+ b = BN_CTX_get(ctx); -+ w_x = BN_CTX_get(ctx); -+ w_y = BN_CTX_get(ctx); -+ -+ if (!x || !y || !p || !a || !b || !w_x || !w_y) { -+ ECDHerr(ECDH_F_ECDH_COMPUTE_KEY,ERR_R_MALLOC_FAILURE); - goto err; -- if (bn2crparam(pub_key, &kop.crk_param[1])) -+ } -+ -+ priv_key = EC_KEY_get0_private_key(ecdh); -+ if (priv_key == NULL) { -+ ECDHerr(ECDH_F_ECDH_COMPUTE_KEY,ECDH_R_NO_PRIVATE_VALUE); - goto err; -- if (bn2crparam(dh->p, &kop.crk_param[2])) -+ } -+ -+ group = EC_KEY_get0_group(ecdh); -+ if ((tmp=EC_POINT_new(group)) == NULL) { -+ ECDHerr(ECDH_F_ECDH_COMPUTE_KEY,ERR_R_MALLOC_FAILURE); - goto err; -- kop.crk_iparams = 3; -+ } - -- kop.crk_param[3].crp_p = (caddr_t) key; -- kop.crk_param[3].crp_nbits = keylen * 8; -- kop.crk_oparams = 1; -+ if (EC_METHOD_get_field_type(EC_GROUP_method_of(group)) == -+ NID_X9_62_prime_field) { -+ ec_crv = EC_PRIME; - -- if (ioctl(fd, CIOCKEY, &kop) == -1) { -- const DH_METHOD *meth = DH_OpenSSL(); -+ if (!EC_POINT_get_affine_coordinates_GFp(group, -+ EC_GROUP_get0_generator(group), x, y, ctx)) { -+ ECDHerr(ECDH_F_ECDH_COMPUTE_KEY,ECDH_R_POINT_ARITHMETIC_FAILURE); -+ goto err; -+ } - -- dhret = (meth->compute_key)(key, pub_key, dh); -+ /* get the ECC curve parameters */ -+ if (!EC_GROUP_get_curve_GFp(group, p, a, b, ctx)) { -+ ECDHerr(ECDH_F_ECDH_COMPUTE_KEY,ERR_R_BN_LIB); -+ goto err; -+ } -+ -+ /* get the public key pair for prime curve */ -+ if (!EC_POINT_get_affine_coordinates_GFp (group, pub_key, w_x, w_y,ctx)) { -+ ECDHerr(ECDH_F_ECDH_COMPUTE_KEY,ERR_R_BN_LIB); -+ goto err; -+ } -+ } else { -+ ec_crv = EC_BINARY; -+ -+ if (!EC_POINT_get_affine_coordinates_GF2m(group, -+ EC_GROUP_get0_generator(group), x, y, ctx)) { -+ ECDHerr(ECDH_F_ECDH_COMPUTE_KEY,ECDH_R_POINT_ARITHMETIC_FAILURE); -+ goto err; -+ } -+ -+ /* get the ECC curve parameters */ -+ if (!EC_GROUP_get_curve_GF2m(group, p, a, b , ctx)) { -+ ECDHerr(ECDH_F_ECDH_COMPUTE_KEY,ERR_R_BN_LIB); -+ goto err; -+ } -+ -+ /* get the public key pair for binary curve */ -+ if (!EC_POINT_get_affine_coordinates_GF2m(group, -+ pub_key, w_x, w_y,ctx)) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_EC_LIB); -+ goto err; -+ } -+ } -+ -+ /* irreducible polynomial that creates the field */ -+ if (spcf_bn2bin((BIGNUM*)&group->order, &r, &r_len)) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_MALLOC_FAILURE); -+ goto err; -+ } -+ -+ /* Get the irreducible polynomial that creates the field */ -+ if (spcf_bn2bin(p, &q, &q_len)) { -+ ECDHerr(ECDH_F_ECDH_COMPUTE_KEY,ERR_R_BN_LIB); -+ goto err; - } -+ -+ /* Get the public key into a flat buffer with appropriate padding */ -+ pub_key_len = 2 * q_len; -+ w_xy = eng_copy_curve_points (w_x, w_y, pub_key_len, q_len); -+ if (!w_xy) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_MALLOC_FAILURE); -+ goto err; -+ } -+ -+ /* Generation of ECC curve parameters */ -+ ab_len = 2*q_len; -+ ab = eng_copy_curve_points (a, b, ab_len, q_len); -+ if (!ab) { -+ ECDHerr(ECDH_F_ECDH_COMPUTE_KEY,ERR_R_BN_LIB); -+ goto err; -+ } -+ -+ if (ec_crv == EC_BINARY) { -+ /* copy b' i.e c(b), instead of only b */ -+ if (eng_ec_get_cparam(EC_GROUP_get_curve_name(group), ab+q_len, q_len)) -+ { -+ unsigned char *c_temp = NULL; -+ int c_temp_len = q_len; -+ if (eng_ec_compute_cparam(b, p, &c_temp, &c_temp_len)) -+ memcpy(ab+q_len, c_temp, q_len); -+ else -+ goto err; -+ } -+ kop.curve_type = ECC_BINARY; -+ } else -+ kop.curve_type = ECC_PRIME; -+ -+ priv_key_len = r_len; -+ -+ /* -+ * If BN_num_bytes of priv_key returns less then r_len then -+ * add padding bytes before the key -+ */ -+ if (spcf_bn2bin_ex((BIGNUM *)priv_key, &s, &priv_key_len)) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_MALLOC_FAILURE); -+ goto err; -+ } -+ -+ buflen = (EC_GROUP_get_degree(group) + 7)/8; -+ len = BN_num_bytes(x); -+ if (len > buflen || q_len < buflen) { -+ ECDHerr(ECDH_F_ECDH_COMPUTE_KEY,ERR_R_INTERNAL_ERROR); -+ goto err; -+ } -+ -+ kop.crk_op = CRK_DH_COMPUTE_KEY; -+ kop.crk_param[0].crp_p = (void*) s; -+ kop.crk_param[0].crp_nbits = priv_key_len*8; -+ kop.crk_param[1].crp_p = (void*) w_xy; -+ kop.crk_param[1].crp_nbits = pub_key_len*8; -+ kop.crk_param[2].crp_p = (void*) q; -+ kop.crk_param[2].crp_nbits = q_len*8; -+ kop.crk_param[3].crp_p = (void*) ab; -+ kop.crk_param[3].crp_nbits = ab_len*8; -+ kop.crk_iparams = 4; -+ kop.crk_param[4].crp_p = (void*) out; -+ kop.crk_param[4].crp_nbits = q_len*8; -+ kop.crk_oparams = 1; -+ ret = q_len; -+ if (cryptodev_asym(&kop, 0, NULL, 0, NULL)) { -+ const ECDH_METHOD *meth = ECDH_OpenSSL(); -+ ret = (meth->compute_key)(out, outlen, pub_key, ecdh, KDF); -+ } else -+ ret = q_len; - err: -- kop.crk_param[3].crp_p = NULL; -+ kop.crk_param[4].crp_p = NULL; - zapparams(&kop); -- return (dhret); -+ return ret; - } - -+ - static DH_METHOD cryptodev_dh = { - "cryptodev DH method", - NULL, /* cryptodev_dh_generate_key */ -@@ -1518,6 +2516,14 @@ static DH_METHOD cryptodev_dh = { - NULL /* app_data */ - }; - -+static ECDH_METHOD cryptodev_ecdh = { -+ "cryptodev ECDH method", -+ NULL, /* cryptodev_ecdh_compute_key */ -+ NULL, -+ 0, /* flags */ -+ NULL /* app_data */ -+}; -+ - /* - * ctrl right now is just a wrapper that doesn't do much - * but I expect we'll want some options soon. -@@ -1602,25 +2608,42 @@ ENGINE_load_cryptodev(void) - memcpy(&cryptodev_dsa, meth, sizeof(DSA_METHOD)); - if (cryptodev_asymfeat & CRF_DSA_SIGN) - cryptodev_dsa.dsa_do_sign = cryptodev_dsa_do_sign; -- if (cryptodev_asymfeat & CRF_MOD_EXP) { -- cryptodev_dsa.bn_mod_exp = cryptodev_dsa_bn_mod_exp; -- cryptodev_dsa.dsa_mod_exp = cryptodev_dsa_dsa_mod_exp; -- } - if (cryptodev_asymfeat & CRF_DSA_VERIFY) - cryptodev_dsa.dsa_do_verify = cryptodev_dsa_verify; -+ if (cryptodev_asymfeat & CRF_DSA_GENERATE_KEY) -+ cryptodev_dsa.dsa_keygen = cryptodev_dsa_keygen; - } - - if (ENGINE_set_DH(engine, &cryptodev_dh)){ - const DH_METHOD *dh_meth = DH_OpenSSL(); -+ memcpy(&cryptodev_dh, dh_meth, sizeof(DH_METHOD)); -+ if (cryptodev_asymfeat & CRF_DH_COMPUTE_KEY) { -+ cryptodev_dh.compute_key = -+ cryptodev_dh_compute_key; -+ } -+ if (cryptodev_asymfeat & CRF_DH_GENERATE_KEY) { -+ cryptodev_dh.generate_key = -+ cryptodev_dh_keygen; -+ } -+ } - -- cryptodev_dh.generate_key = dh_meth->generate_key; -- cryptodev_dh.compute_key = dh_meth->compute_key; -- cryptodev_dh.bn_mod_exp = dh_meth->bn_mod_exp; -- if (cryptodev_asymfeat & CRF_MOD_EXP) { -- cryptodev_dh.bn_mod_exp = cryptodev_mod_exp_dh; -- if (cryptodev_asymfeat & CRF_DH_COMPUTE_KEY) -- cryptodev_dh.compute_key = -- cryptodev_dh_compute_key; -+ if (ENGINE_set_ECDSA(engine, &cryptodev_ecdsa)) { -+ const ECDSA_METHOD *meth = ECDSA_OpenSSL(); -+ memcpy(&cryptodev_ecdsa, meth, sizeof(ECDSA_METHOD)); -+ if (cryptodev_asymfeat & CRF_DSA_SIGN) { -+ cryptodev_ecdsa.ecdsa_do_sign = cryptodev_ecdsa_do_sign; -+ } -+ if (cryptodev_asymfeat & CRF_DSA_VERIFY) { -+ cryptodev_ecdsa.ecdsa_do_verify = -+ cryptodev_ecdsa_verify; -+ } -+ } -+ -+ if (ENGINE_set_ECDH(engine, &cryptodev_ecdh)) { -+ const ECDH_METHOD *ecdh_meth = ECDH_OpenSSL(); -+ memcpy(&cryptodev_ecdh, ecdh_meth, sizeof(ECDH_METHOD)); -+ if (cryptodev_asymfeat & CRF_DH_COMPUTE_KEY) { -+ cryptodev_ecdh.compute_key = cryptodev_ecdh_compute_key; - } - } - --- -1.7.9.7 - diff --git a/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0007-Added-hwrng-dev-file-as-source-of-RNG.patch b/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0007-Added-hwrng-dev-file-as-source-of-RNG.patch deleted file mode 100644 index afe9f7cf..00000000 --- a/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0007-Added-hwrng-dev-file-as-source-of-RNG.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 6ee6f7acad9824244b32ac23248f1d12f2c2b201 Mon Sep 17 00:00:00 2001 -From: Yashpal Dutta -Date: Tue, 11 Mar 2014 06:42:59 +0545 -Subject: [PATCH][fsl 07/15] Added hwrng dev file as source of RNG - -Upstream-status: Pending - -Signed-off-by: Yashpal Dutta ---- - e_os.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/e_os.h b/e_os.h -index 6a0aad1..57c0563 100644 ---- a/e_os.h -+++ b/e_os.h -@@ -79,7 +79,7 @@ extern "C" { - #ifndef DEVRANDOM - /* set this to a comma-separated list of 'random' device files to try out. - * My default, we will try to read at least one of these files */ --#define DEVRANDOM "/dev/urandom","/dev/random","/dev/srandom" -+#define DEVRANDOM "/dev/hwrng","/dev/urandom","/dev/random","/dev/srandom" - #endif - #ifndef DEVRANDOM_EGD - /* set this to a comma-seperated list of 'egd' sockets to try out. These --- -1.7.9.7 - diff --git a/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0007-Fixed-private-key-support-for-DH.patch b/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0007-Fixed-private-key-support-for-DH.patch new file mode 100644 index 00000000..f507fff7 --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0007-Fixed-private-key-support-for-DH.patch @@ -0,0 +1,35 @@ +From 8322e4157bf49d992b5b9e460f2c0785865dd1c1 Mon Sep 17 00:00:00 2001 +From: Yashpal Dutta +Date: Thu, 20 Mar 2014 19:55:51 -0500 +Subject: [PATCH 07/17] Fixed private key support for DH + +Upstream-status: Pending + +Required Length of the DH result is not returned in dh method in openssl + +Tested-by: Yashpal Dutta +--- + crypto/dh/dh_ameth.c | 7 ------- + 1 file changed, 7 deletions(-) + +diff --git a/crypto/dh/dh_ameth.c b/crypto/dh/dh_ameth.c +index ed32004..02ec2d4 100644 +--- a/crypto/dh/dh_ameth.c ++++ b/crypto/dh/dh_ameth.c +@@ -422,13 +422,6 @@ static int dh_copy_parameters(EVP_PKEY *to, const EVP_PKEY *from) + if (to->pkey.dh->g != NULL) + BN_free(to->pkey.dh->g); + to->pkey.dh->g=a; +- if ((a=BN_dup(from->pkey.dh->q)) != NULL) { +- if (to->pkey.dh->q != NULL) +- BN_free(to->pkey.dh->q); +- to->pkey.dh->q=a; +- } +- +- to->pkey.dh->length = from->pkey.dh->length; + + return 1; + } +-- +1.8.3.1 + diff --git a/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0008-Asynchronous-interface-added-for-PKC-cryptodev-inter.patch b/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0008-Asynchronous-interface-added-for-PKC-cryptodev-inter.patch deleted file mode 100644 index d8b5d952..00000000 --- a/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0008-Asynchronous-interface-added-for-PKC-cryptodev-inter.patch +++ /dev/null @@ -1,2039 +0,0 @@ -From 68f8054c5a1f72e40884782d2d548892406d6049 Mon Sep 17 00:00:00 2001 -From: Yashpal Dutta -Date: Tue, 11 Mar 2014 07:14:30 +0545 -Subject: [PATCH][fsl 08/15] Asynchronous interface added for PKC cryptodev - interface - -Upstream-status: Pending - -Signed-off-by: Yashpal Dutta ---- - crypto/crypto.h | 16 + - crypto/dh/dh.h | 4 +- - crypto/dsa/dsa.h | 5 + - crypto/ecdh/ech_locl.h | 3 + - crypto/ecdsa/ecs_locl.h | 5 + - crypto/engine/eng_cryptodev.c | 1578 +++++++++++++++++++++++++++++++++++++---- - crypto/engine/eng_int.h | 24 +- - crypto/engine/eng_lib.c | 46 ++ - crypto/engine/engine.h | 24 + - crypto/rsa/rsa.h | 23 + - 10 files changed, 1582 insertions(+), 146 deletions(-) - -diff --git a/crypto/crypto.h b/crypto/crypto.h -index f92fc51..ce12731 100644 ---- a/crypto/crypto.h -+++ b/crypto/crypto.h -@@ -605,6 +605,22 @@ void ERR_load_CRYPTO_strings(void); - #define CRYPTO_R_FIPS_MODE_NOT_SUPPORTED 101 - #define CRYPTO_R_NO_DYNLOCK_CREATE_CALLBACK 100 - -+/* Additions for Asynchronous PKC Infrastructure */ -+struct pkc_cookie_s { -+ void *cookie; /* To be filled by openssl library primitive method function caller */ -+ void *eng_cookie; /* To be filled by Engine */ -+ /* -+ * Callback handler to be provided by caller. Ensure to pass a -+ * handler which takes the crypto operation to completion. -+ * cookie: Container cookie from library -+ * status: Status of the crypto Job completion. -+ * 0: Job handled without any issue -+ * -EINVAL: Parameters Invalid -+ */ -+ void (*pkc_callback)(struct pkc_cookie_s *cookie, int status); -+ void *eng_handle; -+}; -+ - #ifdef __cplusplus - } - #endif -diff --git a/crypto/dh/dh.h b/crypto/dh/dh.h -index ea59e61..20ffad2 100644 ---- a/crypto/dh/dh.h -+++ b/crypto/dh/dh.h -@@ -118,7 +118,9 @@ struct dh_method - int (*bn_mod_exp)(const DH *dh, BIGNUM *r, const BIGNUM *a, - const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx, - BN_MONT_CTX *m_ctx); /* Can be null */ -- -+ int (*compute_key_async)(unsigned char *key,const BIGNUM *pub_key,DH *dh, -+ struct pkc_cookie_s *cookie); -+ int (*generate_key_async)(DH *dh, struct pkc_cookie_s *cookie); - int (*init)(DH *dh); - int (*finish)(DH *dh); - int flags; -diff --git a/crypto/dsa/dsa.h b/crypto/dsa/dsa.h -index a6f6d0b..b04a029 100644 ---- a/crypto/dsa/dsa.h -+++ b/crypto/dsa/dsa.h -@@ -140,6 +140,10 @@ struct dsa_method - int (*bn_mod_exp)(DSA *dsa, BIGNUM *r, BIGNUM *a, const BIGNUM *p, - const BIGNUM *m, BN_CTX *ctx, - BN_MONT_CTX *m_ctx); /* Can be null */ -+ int (*dsa_do_sign_async)(const unsigned char *dgst, int dlen, DSA *dsa, -+ DSA_SIG *sig, struct pkc_cookie_s *cookie); -+ int (*dsa_do_verify_async)(const unsigned char *dgst, int dgst_len, -+ DSA_SIG *sig, DSA *dsa, struct pkc_cookie_s *cookie); - int (*init)(DSA *dsa); - int (*finish)(DSA *dsa); - int flags; -@@ -151,6 +155,7 @@ struct dsa_method - BN_GENCB *cb); - /* If this is non-NULL, it is used to generate DSA keys */ - int (*dsa_keygen)(DSA *dsa); -+ int (*dsa_keygen_async)(DSA *dsa, struct pkc_cookie_s *cookie); - }; - - struct dsa_st -diff --git a/crypto/ecdh/ech_locl.h b/crypto/ecdh/ech_locl.h -index f6cad6a..adce6b3 100644 ---- a/crypto/ecdh/ech_locl.h -+++ b/crypto/ecdh/ech_locl.h -@@ -67,6 +67,9 @@ struct ecdh_method - const char *name; - int (*compute_key)(void *key, size_t outlen, const EC_POINT *pub_key, EC_KEY *ecdh, - void *(*KDF)(const void *in, size_t inlen, void *out, size_t *outlen)); -+ int (*compute_key_async)(void *key, size_t outlen, const EC_POINT *pub_key, EC_KEY *ecdh, -+ void *(*KDF)(const void *in, size_t inlen, void *out, size_t *outlen), -+ struct pkc_cookie_s *cookie); - #if 0 - int (*init)(EC_KEY *eckey); - int (*finish)(EC_KEY *eckey); -diff --git a/crypto/ecdsa/ecs_locl.h b/crypto/ecdsa/ecs_locl.h -index cb3be13..eb0ebe0 100644 ---- a/crypto/ecdsa/ecs_locl.h -+++ b/crypto/ecdsa/ecs_locl.h -@@ -74,6 +74,11 @@ struct ecdsa_method - BIGNUM **r); - int (*ecdsa_do_verify)(const unsigned char *dgst, int dgst_len, - const ECDSA_SIG *sig, EC_KEY *eckey); -+ int (*ecdsa_do_sign_async)(const unsigned char *dgst, int dgst_len, -+ const BIGNUM *inv, const BIGNUM *rp, EC_KEY *eckey, -+ ECDSA_SIG *sig, struct pkc_cookie_s *cookie); -+ int (*ecdsa_do_verify_async)(const unsigned char *dgst, int dgst_len, -+ const ECDSA_SIG *sig, EC_KEY *eckey, struct pkc_cookie_s *cookie); - #if 0 - int (*init)(EC_KEY *eckey); - int (*finish)(EC_KEY *eckey); -diff --git a/crypto/engine/eng_cryptodev.c b/crypto/engine/eng_cryptodev.c -index 88caec1..c5e8fb3 100644 ---- a/crypto/engine/eng_cryptodev.c -+++ b/crypto/engine/eng_cryptodev.c -@@ -1248,6 +1248,56 @@ zapparams(struct crypt_kop *kop) - } - } - -+/* Any PKC request has at max 2 output parameters and they are stored here to -+be used while copying in the check availability */ -+struct cryptodev_cookie_s { -+ BIGNUM *r; -+ struct crparam r_param; -+ BIGNUM *s; -+ struct crparam s_param; -+ struct crypt_kop *kop; -+}; -+ -+static int -+cryptodev_asym_async(struct crypt_kop *kop, int rlen, BIGNUM *r, int slen, -+ BIGNUM *s) -+{ -+ int fd; -+ struct pkc_cookie_s *cookie = kop->cookie; -+ struct cryptodev_cookie_s *eng_cookie; -+ -+ fd = *(int *)cookie->eng_handle; -+ -+ eng_cookie = malloc(sizeof(struct cryptodev_cookie_s)); -+ -+ if (eng_cookie) { -+ memset(eng_cookie, 0, sizeof(struct cryptodev_cookie_s)); -+ if (r) { -+ kop->crk_param[kop->crk_iparams].crp_p = calloc(rlen, sizeof(char)); -+ if (!kop->crk_param[kop->crk_iparams].crp_p) -+ return -ENOMEM; -+ kop->crk_param[kop->crk_iparams].crp_nbits = rlen * 8; -+ kop->crk_oparams++; -+ eng_cookie->r = r; -+ eng_cookie->r_param = kop->crk_param[kop->crk_iparams]; -+ } -+ if (s) { -+ kop->crk_param[kop->crk_iparams+1].crp_p = calloc(slen, sizeof(char)); -+ if (!kop->crk_param[kop->crk_iparams+1].crp_p) -+ return -ENOMEM; -+ kop->crk_param[kop->crk_iparams+1].crp_nbits = slen * 8; -+ kop->crk_oparams++; -+ eng_cookie->s = s; -+ eng_cookie->s_param = kop->crk_param[kop->crk_iparams + 1]; -+ } -+ } else -+ return -ENOMEM; -+ -+ eng_cookie->kop = kop; -+ cookie->eng_cookie = eng_cookie; -+ return ioctl(fd, CIOCASYMASYNCRYPT, kop); -+} -+ - static int - cryptodev_asym(struct crypt_kop *kop, int rlen, BIGNUM *r, int slen, BIGNUM *s) - { -@@ -1304,6 +1354,44 @@ void *cryptodev_init_instance(void) - return fd; - } - -+#include -+ -+/* Return 0 on success and 1 on failure */ -+int cryptodev_check_availability(void *eng_handle) -+{ -+ int fd = *(int *)eng_handle; -+ struct pkc_cookie_list_s cookie_list; -+ struct pkc_cookie_s *cookie; -+ int i; -+ -+ /* FETCH COOKIE returns number of cookies extracted */ -+ if (ioctl(fd, CIOCASYMFETCHCOOKIE, &cookie_list) <= 0) -+ return 1; -+ -+ for (i = 0; i < cookie_list.cookie_available; i++) { -+ cookie = cookie_list.cookie[i]; -+ if (cookie) { -+ struct cryptodev_cookie_s *eng_cookie = cookie->eng_cookie; -+ if (eng_cookie) { -+ struct crypt_kop *kop = eng_cookie->kop; -+ -+ if (eng_cookie->r) -+ crparam2bn(&eng_cookie->r_param, eng_cookie->r); -+ if (eng_cookie->s) -+ crparam2bn(&eng_cookie->s_param, eng_cookie->s); -+ if (kop->crk_op == CRK_DH_COMPUTE_KEY) -+ kop->crk_oparams = 0; -+ -+ zapparams(eng_cookie->kop); -+ free(eng_cookie->kop); -+ free (eng_cookie); -+ } -+ cookie->pkc_callback(cookie, cookie_list.status[i]); -+ } -+ } -+ return 0; -+} -+ - static int - cryptodev_bn_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, - const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *in_mont) -@@ -1349,6 +1437,63 @@ err: - } - - static int -+cryptodev_bn_mod_exp_async(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, -+ const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *in_mont, struct pkc_cookie_s *cookie) -+{ -+ struct crypt_kop *kop = malloc(sizeof(struct crypt_kop)); -+ int ret = 1; -+ -+ /* Currently, we know we can do mod exp iff we can do any -+ * asymmetric operations at all. -+ */ -+ if (cryptodev_asymfeat == 0 || !kop) { -+ ret = BN_mod_exp(r, a, p, m, ctx); -+ return (ret); -+ } -+ -+ kop->crk_oparams = 0; -+ kop->crk_status = 0; -+ kop->crk_op = CRK_MOD_EXP; -+ kop->cookie = cookie; -+ /* inputs: a^p % m */ -+ if (bn2crparam(a, &kop->crk_param[0])) -+ goto err; -+ if (bn2crparam(p, &kop->crk_param[1])) -+ goto err; -+ if (bn2crparam(m, &kop->crk_param[2])) -+ goto err; -+ -+ kop->crk_iparams = 3; -+ if (cryptodev_asym_async(kop, BN_num_bytes(m), r, 0, NULL)) -+ goto err; -+ -+ return ret; -+err: -+ { -+ const RSA_METHOD *meth = RSA_PKCS1_SSLeay(); -+ -+ if (kop) -+ free(kop); -+ ret = meth->bn_mod_exp(r, a, p, m, ctx, in_mont); -+ if (ret) -+ /* Call the completion handler immediately */ -+ cookie->pkc_callback(cookie, 0); -+ } -+ return ret; -+} -+ -+static int -+cryptodev_rsa_nocrt_mod_exp_async(BIGNUM *r0, const BIGNUM *I, -+ RSA *rsa, BN_CTX *ctx, struct pkc_cookie_s *cookie) -+{ -+ int r; -+ ctx = BN_CTX_new(); -+ r = cryptodev_bn_mod_exp_async(r0, I, rsa->d, rsa->n, ctx, NULL, cookie); -+ BN_CTX_free(ctx); -+ return r; -+} -+ -+static int - cryptodev_rsa_nocrt_mod_exp(BIGNUM *r0, const BIGNUM *I, RSA *rsa, BN_CTX *ctx) - { - int r; -@@ -1413,6 +1558,62 @@ err: - return (ret); - } - -+static int -+cryptodev_rsa_mod_exp_async(BIGNUM *r0, const BIGNUM *I, RSA *rsa, BN_CTX *ctx, -+ struct pkc_cookie_s *cookie) -+{ -+ struct crypt_kop *kop = malloc(sizeof(struct crypt_kop)); -+ int ret = 1, f_len, p_len, q_len; -+ unsigned char *f = NULL, *p = NULL, *q = NULL, *dp = NULL, *dq = NULL, *c = NULL; -+ -+ if (!rsa->p || !rsa->q || !rsa->dmp1 || !rsa->dmq1 || !rsa->iqmp || !kop) { -+ return (0); -+ } -+ -+ kop->crk_oparams = 0; -+ kop->crk_status = 0; -+ kop->crk_op = CRK_MOD_EXP_CRT; -+ f_len = BN_num_bytes(rsa->n); -+ spcf_bn2bin_ex(I, &f, &f_len); -+ spcf_bn2bin(rsa->p, &p, &p_len); -+ spcf_bn2bin(rsa->q, &q, &q_len); -+ spcf_bn2bin_ex(rsa->dmp1, &dp, &p_len); -+ spcf_bn2bin_ex(rsa->iqmp, &c, &p_len); -+ spcf_bn2bin_ex(rsa->dmq1, &dq, &q_len); -+ /* inputs: rsa->p rsa->q I rsa->dmp1 rsa->dmq1 rsa->iqmp */ -+ kop->crk_param[0].crp_p = p; -+ kop->crk_param[0].crp_nbits = p_len * 8; -+ kop->crk_param[1].crp_p = q; -+ kop->crk_param[1].crp_nbits = q_len * 8; -+ kop->crk_param[2].crp_p = f; -+ kop->crk_param[2].crp_nbits = f_len * 8; -+ kop->crk_param[3].crp_p = dp; -+ kop->crk_param[3].crp_nbits = p_len * 8; -+ /* dq must of length q, rest all of length p*/ -+ kop->crk_param[4].crp_p = dq; -+ kop->crk_param[4].crp_nbits = q_len * 8; -+ kop->crk_param[5].crp_p = c; -+ kop->crk_param[5].crp_nbits = p_len * 8; -+ kop->crk_iparams = 6; -+ kop->cookie = cookie; -+ if (cryptodev_asym_async(kop, BN_num_bytes(rsa->n), r0, 0, NULL)) -+ goto err; -+ -+ return ret; -+err: -+ { -+ const RSA_METHOD *meth = RSA_PKCS1_SSLeay(); -+ -+ if (kop) -+ free(kop); -+ ret = (*meth->rsa_mod_exp)(r0, I, rsa, ctx); -+ if (ret) -+ /* Call user completion handler immediately */ -+ cookie->pkc_callback(cookie, 0); -+ } -+ return (ret); -+} -+ - static RSA_METHOD cryptodev_rsa = { - "cryptodev RSA method", - NULL, /* rsa_pub_enc */ -@@ -1421,6 +1622,12 @@ static RSA_METHOD cryptodev_rsa = { - NULL, /* rsa_priv_dec */ - NULL, - NULL, -+ NULL, /* rsa_pub_enc */ -+ NULL, /* rsa_pub_dec */ -+ NULL, /* rsa_priv_enc */ -+ NULL, /* rsa_priv_dec */ -+ NULL, -+ NULL, - NULL, /* init */ - NULL, /* finish */ - 0, /* flags */ -@@ -1718,126 +1925,424 @@ sw_try: - return ret; - } - -+/* Cryptodev DSA Key Gen routine */ -+static int cryptodev_dsa_keygen_async(DSA *dsa, struct pkc_cookie_s *cookie) -+{ -+ struct crypt_kop *kop = malloc(sizeof(struct crypt_kop)); -+ int ret = 1, g_len; -+ unsigned char *g = NULL; - -+ if (!kop) -+ goto sw_try; - --static DSA_METHOD cryptodev_dsa = { -- "cryptodev DSA method", -- NULL, -- NULL, /* dsa_sign_setup */ -- NULL, -- NULL, /* dsa_mod_exp */ -- NULL, -- NULL, /* init */ -- NULL, /* finish */ -- 0, /* flags */ -- NULL /* app_data */ --}; -+ if (dsa->priv_key == NULL) { -+ if ((dsa->priv_key=BN_new()) == NULL) -+ goto sw_try; -+ } - --static ECDSA_METHOD cryptodev_ecdsa = { -- "cryptodev ECDSA method", -- NULL, -- NULL, /* ecdsa_sign_setup */ -- NULL, -- NULL, -- 0, /* flags */ -- NULL /* app_data */ --}; -+ if (dsa->pub_key == NULL) { -+ if ((dsa->pub_key=BN_new()) == NULL) -+ goto sw_try; -+ } - --typedef enum ec_curve_s --{ -- EC_PRIME, -- EC_BINARY --} ec_curve_t; -+ g_len = BN_num_bytes(dsa->p); -+ /** -+ * Get generator into a plain buffer. If length is less than -+ * q_len then add leading padding bytes. -+ */ -+ if (spcf_bn2bin_ex(dsa->g, &g, &g_len)) { -+ DSAerr(DSA_F_DSA_GENERATE_KEY, ERR_R_MALLOC_FAILURE); -+ goto sw_try; -+ } - --/* ENGINE handler for ECDSA Sign */ --static ECDSA_SIG *cryptodev_ecdsa_do_sign( const unsigned char *dgst, -- int dgst_len, const BIGNUM *in_kinv, const BIGNUM *in_r, EC_KEY *eckey) --{ -- BIGNUM *m = NULL, *p = NULL, *a = NULL; -- BIGNUM *b = NULL, *x = NULL, *y = NULL; -- BN_CTX *ctx = NULL; -- ECDSA_SIG *ret = NULL; -- ECDSA_DATA *ecdsa = NULL; -- unsigned char * q = NULL, *r = NULL, *ab = NULL, *g_xy = NULL; -- unsigned char * s = NULL, *c = NULL, *d = NULL, *f = NULL, *tmp_dgst = NULL; -- int i = 0, q_len = 0, priv_key_len = 0, r_len = 0; -- int g_len = 0, d_len = 0, ab_len = 0; -- const BIGNUM *order = NULL, *priv_key=NULL; -- const EC_GROUP *group = NULL; -- struct crypt_kop kop; -- ec_curve_t ec_crv = EC_PRIME; -+ memset(kop, 0, sizeof(struct crypt_kop)); -+ kop->crk_op = CRK_DSA_GENERATE_KEY; -+ if (bn2crparam(dsa->p, &kop->crk_param[0])) -+ goto sw_try; -+ if (bn2crparam(dsa->q, &kop->crk_param[1])) -+ goto sw_try; -+ kop->crk_param[2].crp_p = g; -+ kop->crk_param[2].crp_nbits = g_len * 8; -+ kop->crk_iparams = 3; -+ kop->cookie = cookie; - -- memset(&kop, 0, sizeof(kop)); -- ecdsa = ecdsa_check(eckey); -- if (!ecdsa) { -- ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_PASSED_NULL_PARAMETER); -- return NULL; -+ /* pub_key is or prime length while priv key is of length of order */ -+ if (cryptodev_asym_async(kop, BN_num_bytes(dsa->p), dsa->pub_key, -+ BN_num_bytes(dsa->q), dsa->priv_key)) -+ goto sw_try; -+ -+ return ret; -+sw_try: -+ { -+ const DSA_METHOD *meth = DSA_OpenSSL(); -+ -+ if (kop) -+ free(kop); -+ ret = (meth->dsa_keygen)(dsa); -+ cookie->pkc_callback(cookie, 0); - } -+ return ret; -+} - -- group = EC_KEY_get0_group(eckey); -- priv_key = EC_KEY_get0_private_key(eckey); -+static int -+cryptodev_dsa_do_sign_async(const unsigned char *dgst, int dlen, DSA *dsa, -+ DSA_SIG *sig, struct pkc_cookie_s *cookie) -+{ -+ struct crypt_kop *kop = malloc(sizeof(struct crypt_kop)); -+ DSA_SIG *dsaret = NULL; -+ int q_len = 0, r_len = 0, g_len = 0; -+ int priv_key_len = 0, ret = 1; -+ unsigned char *q = NULL, *r = NULL, *g = NULL, *priv_key = NULL, *f = NULL; - -- if (!group || !priv_key) { -- ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_PASSED_NULL_PARAMETER); -- return NULL; -+ if (((sig->r = BN_new()) == NULL) || !kop) { -+ DSAerr(DSA_F_DSA_DO_SIGN, ERR_R_MALLOC_FAILURE); -+ goto err; - } - -- if ((ctx = BN_CTX_new()) == NULL || (m = BN_new()) == NULL || -- (a = BN_new()) == NULL || (b = BN_new()) == NULL || -- (p = BN_new()) == NULL || (x = BN_new()) == NULL || -- (y = BN_new()) == NULL) { -- ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_MALLOC_FAILURE); -+ if ((sig->s = BN_new()) == NULL) { -+ BN_free(sig->r); -+ DSAerr(DSA_F_DSA_DO_SIGN, ERR_R_MALLOC_FAILURE); - goto err; - } - -- order = &group->order; -- if (!order || BN_is_zero(order)) { -- ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ECDSA_R_MISSING_PARAMETERS); -+ if (spcf_bn2bin(dsa->p, &q, &q_len)) { -+ DSAerr(DSA_F_DSA_DO_SIGN, DSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE); - goto err; - } - -- i = BN_num_bits(order); -- /* Need to truncate digest if it is too long: first truncate whole -- bytes */ -- if (8 * dgst_len > i) -- dgst_len = (i + 7)/8; -+ /* Get order of the field of private keys into plain buffer */ -+ if (spcf_bn2bin (dsa->q, &r, &r_len)) { -+ DSAerr(DSA_F_DSA_DO_SIGN, ERR_R_MALLOC_FAILURE); -+ goto err; -+ } - -- if (!BN_bin2bn(dgst, dgst_len, m)) { -- ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_BN_LIB); -+ /* sanity test */ -+ if (dlen > r_len) { -+ DSAerr(DSA_F_DSA_DO_SIGN, DSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE); - goto err; - } - -- /* If still too long truncate remaining bits with a shift */ -- if ((8 * dgst_len > i) && !BN_rshift(m, m, 8 - (i & 0x7))) { -- ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_BN_LIB); -+ g_len = q_len; -+ /** -+ * Get generator into a plain buffer. If length is less than -+ * q_len then add leading padding bytes. -+ */ -+ if (spcf_bn2bin_ex(dsa->g, &g, &g_len)) { -+ DSAerr(DSA_F_DSA_DO_SIGN, ERR_R_MALLOC_FAILURE); - goto err; - } - -- /* copy the truncated bits into plain buffer */ -- if (spcf_bn2bin(m, &tmp_dgst, &dgst_len)) { -- fprintf(stderr, "%s:%d: OPENSSL_malloc failec\n", __FUNCTION__, __LINE__); -+ priv_key_len = r_len; -+ /** -+ * Get private key into a plain buffer. If length is less than -+ * r_len then add leading padding bytes. -+ */ -+ if (spcf_bn2bin_ex(dsa->priv_key, &priv_key, &priv_key_len)) { -+ DSAerr(DSA_F_DSA_DO_SIGN, ERR_R_MALLOC_FAILURE); - goto err; - } - -- ret = ECDSA_SIG_new(); -- if (!ret) { -- ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_BN_LIB); -+ /* Allocate memory to store hash. */ -+ f = OPENSSL_malloc (r_len); -+ if (!f) { -+ DSAerr(DSA_F_DSA_DO_SIGN, ERR_R_MALLOC_FAILURE); - goto err; - } - -- /* check if this is prime or binary EC request */ -- if (EC_METHOD_get_field_type(EC_GROUP_method_of(group)) == NID_X9_62_prime_field) { -- ec_crv = EC_PRIME; -- /* get the generator point pair */ -- if (!EC_POINT_get_affine_coordinates_GFp (group, EC_GROUP_get0_generator(group), -- x, y,ctx)) { -- ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_EC_LIB); -- goto err; -- } -+ /* Add padding, since SEC expects hash to of size r_len */ -+ if (dlen < r_len) -+ memset(f, 0, r_len - dlen); - -- /* get the ECC curve parameters */ -- if (!EC_GROUP_get_curve_GFp(group, p, a, b , ctx)) { -- ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_EC_LIB); -+ /* Skip leading bytes if dgst_len < r_len */ -+ memcpy(f + r_len - dlen, dgst, dlen); -+ -+ dlen = r_len; -+ -+ memset(kop, 0, sizeof( struct crypt_kop)); -+ kop->crk_op = CRK_DSA_SIGN; -+ -+ /* inputs: dgst dsa->p dsa->q dsa->g dsa->priv_key */ -+ kop->crk_param[0].crp_p = (void*)f; -+ kop->crk_param[0].crp_nbits = dlen * 8; -+ kop->crk_param[1].crp_p = (void*)q; -+ kop->crk_param[1].crp_nbits = q_len * 8; -+ kop->crk_param[2].crp_p = (void*)r; -+ kop->crk_param[2].crp_nbits = r_len * 8; -+ kop->crk_param[3].crp_p = (void*)g; -+ kop->crk_param[3].crp_nbits = g_len * 8; -+ kop->crk_param[4].crp_p = (void*)priv_key; -+ kop->crk_param[4].crp_nbits = priv_key_len * 8; -+ kop->crk_iparams = 5; -+ kop->cookie = cookie; -+ -+ if (cryptodev_asym_async(kop, r_len, sig->r, r_len, sig->s)) -+ goto err; -+ -+ return ret; -+err: -+ { -+ const DSA_METHOD *meth = DSA_OpenSSL(); -+ -+ if (kop) -+ free(kop); -+ BN_free(sig->r); -+ BN_free(sig->s); -+ dsaret = (meth->dsa_do_sign)(dgst, dlen, dsa); -+ sig->r = dsaret->r; -+ sig->s = dsaret->s; -+ /* Call user callback immediately */ -+ cookie->pkc_callback(cookie, 0); -+ ret = dsaret; -+ } -+ return ret; -+} -+ -+static int -+cryptodev_dsa_verify_async(const unsigned char *dgst, int dlen, -+ DSA_SIG *sig, DSA *dsa, struct pkc_cookie_s *cookie) -+{ -+ struct crypt_kop *kop = malloc(sizeof(struct crypt_kop)); -+ int q_len = 0, r_len = 0, g_len = 0; -+ int w_len = 0 ,c_len = 0, d_len = 0, ret = 1; -+ unsigned char * q = NULL, * r = NULL, * w = NULL, * g = NULL; -+ unsigned char *c = NULL, * d = NULL, *f = NULL; -+ -+ if (!kop) -+ goto err; -+ -+ if (spcf_bn2bin(dsa->p, &q, &q_len)) { -+ DSAerr(DSA_F_DSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); -+ return ret; -+ } -+ -+ /* Get Order of field of private keys */ -+ if (spcf_bn2bin(dsa->q, &r, &r_len)) { -+ DSAerr(DSA_F_DSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); -+ goto err; -+ } -+ -+ g_len = q_len; -+ /** -+ * Get generator into a plain buffer. If length is less than -+ * q_len then add leading padding bytes. -+ */ -+ if (spcf_bn2bin_ex(dsa->g, &g, &g_len)) { -+ DSAerr(DSA_F_DSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); -+ goto err; -+ } -+ w_len = q_len; -+ /** -+ * Get public key into a plain buffer. If length is less than -+ * q_len then add leading padding bytes. -+ */ -+ if (spcf_bn2bin_ex(dsa->pub_key, &w, &w_len)) { -+ DSAerr(DSA_F_DSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); -+ goto err; -+ } -+ /** -+ * Get the 1st part of signature into a flat buffer with -+ * appropriate padding -+ */ -+ c_len = r_len; -+ -+ if (spcf_bn2bin_ex(sig->r, &c, &c_len)) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); -+ goto err; -+ } -+ -+ /** -+ * Get the 2nd part of signature into a flat buffer with -+ * appropriate padding -+ */ -+ d_len = r_len; -+ -+ if (spcf_bn2bin_ex(sig->s, &d, &d_len)) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); -+ goto err; -+ } -+ -+ -+ /* Sanity test */ -+ if (dlen > r_len) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); -+ goto err; -+ } -+ -+ /* Allocate memory to store hash. */ -+ f = OPENSSL_malloc (r_len); -+ if (!f) { -+ DSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); -+ goto err; -+ } -+ -+ /* Add padding, since SEC expects hash to of size r_len */ -+ if (dlen < r_len) -+ memset(f, 0, r_len - dlen); -+ -+ /* Skip leading bytes if dgst_len < r_len */ -+ memcpy(f + r_len - dlen, dgst, dlen); -+ -+ dlen = r_len; -+ memset(kop, 0, sizeof(struct crypt_kop)); -+ -+ /* inputs: dgst dsa->p dsa->q dsa->g dsa->pub_key sig->r sig->s */ -+ kop->crk_param[0].crp_p = (void*)f; -+ kop->crk_param[0].crp_nbits = dlen * 8; -+ kop->crk_param[1].crp_p = q; -+ kop->crk_param[1].crp_nbits = q_len * 8; -+ kop->crk_param[2].crp_p = r; -+ kop->crk_param[2].crp_nbits = r_len * 8; -+ kop->crk_param[3].crp_p = g; -+ kop->crk_param[3].crp_nbits = g_len * 8; -+ kop->crk_param[4].crp_p = w; -+ kop->crk_param[4].crp_nbits = w_len * 8; -+ kop->crk_param[5].crp_p = c; -+ kop->crk_param[5].crp_nbits = c_len * 8; -+ kop->crk_param[6].crp_p = d; -+ kop->crk_param[6].crp_nbits = d_len * 8; -+ kop->crk_iparams = 7; -+ kop->crk_op = CRK_DSA_VERIFY; -+ kop->cookie = cookie; -+ if (cryptodev_asym_async(kop, 0, NULL, 0, NULL)) -+ goto err; -+ -+ return ret; -+err: -+ { -+ const DSA_METHOD *meth = DSA_OpenSSL(); -+ -+ if (kop) -+ free(kop); -+ -+ ret = (meth->dsa_do_verify)(dgst, dlen, sig, dsa); -+ cookie->pkc_callback(cookie, 0); -+ } -+ return ret; -+} -+ -+static DSA_METHOD cryptodev_dsa = { -+ "cryptodev DSA method", -+ NULL, -+ NULL, /* dsa_sign_setup */ -+ NULL, -+ NULL, /* dsa_mod_exp */ -+ NULL, -+ NULL, -+ NULL, -+ NULL, -+ NULL, /* init */ -+ NULL, /* finish */ -+ 0, /* flags */ -+ NULL /* app_data */ -+}; -+ -+static ECDSA_METHOD cryptodev_ecdsa = { -+ "cryptodev ECDSA method", -+ NULL, -+ NULL, /* ecdsa_sign_setup */ -+ NULL, -+ NULL, -+ NULL, -+ NULL, -+ 0, /* flags */ -+ NULL /* app_data */ -+}; -+ -+typedef enum ec_curve_s -+{ -+ EC_PRIME, -+ EC_BINARY -+} ec_curve_t; -+ -+/* ENGINE handler for ECDSA Sign */ -+static ECDSA_SIG *cryptodev_ecdsa_do_sign( const unsigned char *dgst, -+ int dgst_len, const BIGNUM *in_kinv, const BIGNUM *in_r, EC_KEY *eckey) -+{ -+ BIGNUM *m = NULL, *p = NULL, *a = NULL; -+ BIGNUM *b = NULL, *x = NULL, *y = NULL; -+ BN_CTX *ctx = NULL; -+ ECDSA_SIG *ret = NULL; -+ ECDSA_DATA *ecdsa = NULL; -+ unsigned char * q = NULL, *r = NULL, *ab = NULL, *g_xy = NULL; -+ unsigned char * s = NULL, *c = NULL, *d = NULL, *f = NULL, *tmp_dgst = NULL; -+ int i = 0, q_len = 0, priv_key_len = 0, r_len = 0; -+ int g_len = 0, d_len = 0, ab_len = 0; -+ const BIGNUM *order = NULL, *priv_key=NULL; -+ const EC_GROUP *group = NULL; -+ struct crypt_kop kop; -+ ec_curve_t ec_crv = EC_PRIME; -+ -+ memset(&kop, 0, sizeof(kop)); -+ ecdsa = ecdsa_check(eckey); -+ if (!ecdsa) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_PASSED_NULL_PARAMETER); -+ return NULL; -+ } -+ -+ group = EC_KEY_get0_group(eckey); -+ priv_key = EC_KEY_get0_private_key(eckey); -+ -+ if (!group || !priv_key) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_PASSED_NULL_PARAMETER); -+ return NULL; -+ } -+ -+ if ((ctx = BN_CTX_new()) == NULL || (m = BN_new()) == NULL || -+ (a = BN_new()) == NULL || (b = BN_new()) == NULL || -+ (p = BN_new()) == NULL || (x = BN_new()) == NULL || -+ (y = BN_new()) == NULL) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_MALLOC_FAILURE); -+ goto err; -+ } -+ -+ order = &group->order; -+ if (!order || BN_is_zero(order)) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ECDSA_R_MISSING_PARAMETERS); -+ goto err; -+ } -+ -+ i = BN_num_bits(order); -+ /* Need to truncate digest if it is too long: first truncate whole -+ bytes */ -+ if (8 * dgst_len > i) -+ dgst_len = (i + 7)/8; -+ -+ if (!BN_bin2bn(dgst, dgst_len, m)) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_BN_LIB); -+ goto err; -+ } -+ -+ /* If still too long truncate remaining bits with a shift */ -+ if ((8 * dgst_len > i) && !BN_rshift(m, m, 8 - (i & 0x7))) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_BN_LIB); -+ goto err; -+ } -+ -+ /* copy the truncated bits into plain buffer */ -+ if (spcf_bn2bin(m, &tmp_dgst, &dgst_len)) { -+ fprintf(stderr, "%s:%d: OPENSSL_malloc failec\n", __FUNCTION__, __LINE__); -+ goto err; -+ } -+ -+ ret = ECDSA_SIG_new(); -+ if (!ret) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_BN_LIB); -+ goto err; -+ } -+ -+ /* check if this is prime or binary EC request */ -+ if (EC_METHOD_get_field_type(EC_GROUP_method_of(group)) == NID_X9_62_prime_field) { -+ ec_crv = EC_PRIME; -+ /* get the generator point pair */ -+ if (!EC_POINT_get_affine_coordinates_GFp (group, EC_GROUP_get0_generator(group), -+ x, y,ctx)) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_EC_LIB); -+ goto err; -+ } -+ -+ /* get the ECC curve parameters */ -+ if (!EC_GROUP_get_curve_GFp(group, p, a, b , ctx)) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_EC_LIB); - goto err; - } - } else if (EC_METHOD_get_field_type(EC_GROUP_method_of(group)) == NID_X9_62_characteristic_two_field) { -@@ -2162,63 +2667,581 @@ static int cryptodev_ecdsa_verify(const unsigned char *dgst, int dgst_len, - } - - /** -- * Get the 2nd part of signature into a flat buffer with -- * appropriate padding -+ * Get the 2nd part of signature into a flat buffer with -+ * appropriate padding -+ */ -+ if (BN_num_bytes(sig->s) < r_len) -+ d_len = r_len; -+ -+ if (spcf_bn2bin_ex(sig->s, &d, &d_len)) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); -+ goto err; -+ } -+ -+ /* memory for message representative */ -+ f = malloc(r_len); -+ if (!f) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); -+ goto err; -+ } -+ -+ /* Add padding, since SEC expects hash to of size r_len */ -+ memset(f, 0, r_len-dgst_len); -+ -+ /* Skip leading bytes if dgst_len < r_len */ -+ memcpy(f + r_len-dgst_len, tmp_dgst, dgst_len); -+ dgst_len += r_len-dgst_len; -+ kop.crk_op = CRK_DSA_VERIFY; -+ /* inputs: dgst dsa->p dsa->q dsa->g dsa->priv_key */ -+ kop.crk_param[0].crp_p = f; -+ kop.crk_param[0].crp_nbits = dgst_len * 8; -+ kop.crk_param[1].crp_p = q; -+ kop.crk_param[1].crp_nbits = q_len * 8; -+ kop.crk_param[2].crp_p = r; -+ kop.crk_param[2].crp_nbits = r_len * 8; -+ kop.crk_param[3].crp_p = g_xy; -+ kop.crk_param[3].crp_nbits = g_len * 8; -+ kop.crk_param[4].crp_p = w_xy; -+ kop.crk_param[4].crp_nbits = pub_key_len * 8; -+ kop.crk_param[5].crp_p = ab; -+ kop.crk_param[5].crp_nbits = ab_len * 8; -+ kop.crk_param[6].crp_p = c; -+ kop.crk_param[6].crp_nbits = d_len * 8; -+ kop.crk_param[7].crp_p = d; -+ kop.crk_param[7].crp_nbits = d_len * 8; -+ kop.crk_iparams = 8; -+ -+ if (cryptodev_asym(&kop, 0, NULL, 0, NULL) == 0) { -+ /*OCF success value is 0, if not zero, change ret to fail*/ -+ if(0 == kop.crk_status) -+ ret = 1; -+ } else { -+ const ECDSA_METHOD *meth = ECDSA_OpenSSL(); -+ -+ ret = (meth->ecdsa_do_verify)(dgst, dgst_len, sig, eckey); -+ } -+ kop.crk_param[0].crp_p = NULL; -+ zapparams(&kop); -+ -+err: -+ return ret; -+} -+ -+static int cryptodev_ecdsa_do_sign_async( const unsigned char *dgst, -+ int dgst_len, const BIGNUM *in_kinv, const BIGNUM *in_r, EC_KEY *eckey, -+ ECDSA_SIG *sig, struct pkc_cookie_s *cookie) -+{ -+ BIGNUM *m = NULL, *p = NULL, *a = NULL; -+ BIGNUM *b = NULL, *x = NULL, *y = NULL; -+ BN_CTX *ctx = NULL; -+ ECDSA_SIG *sig_ret = NULL; -+ ECDSA_DATA *ecdsa = NULL; -+ unsigned char * q = NULL, *r = NULL, *ab = NULL, *g_xy = NULL; -+ unsigned char * s = NULL, *f = NULL, *tmp_dgst = NULL; -+ int i = 0, q_len = 0, priv_key_len = 0, r_len = 0; -+ int g_len = 0, ab_len = 0, ret = 1; -+ const BIGNUM *order = NULL, *priv_key=NULL; -+ const EC_GROUP *group = NULL; -+ struct crypt_kop *kop = malloc(sizeof(struct crypt_kop)); -+ ec_curve_t ec_crv = EC_PRIME; -+ -+ if (!(sig->r = BN_new()) || !kop) -+ goto err; -+ if ((sig->s = BN_new()) == NULL) { -+ BN_free(r); -+ goto err; -+ } -+ -+ memset(kop, 0, sizeof(struct crypt_kop)); -+ ecdsa = ecdsa_check(eckey); -+ if (!ecdsa) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_PASSED_NULL_PARAMETER); -+ goto err; -+ } -+ -+ group = EC_KEY_get0_group(eckey); -+ priv_key = EC_KEY_get0_private_key(eckey); -+ -+ if (!group || !priv_key) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_PASSED_NULL_PARAMETER); -+ goto err; -+ } -+ -+ if ((ctx = BN_CTX_new()) == NULL || (m = BN_new()) == NULL || -+ (a = BN_new()) == NULL || (b = BN_new()) == NULL || -+ (p = BN_new()) == NULL || (x = BN_new()) == NULL || -+ (y = BN_new()) == NULL) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_MALLOC_FAILURE); -+ goto err; -+ } -+ -+ order = &group->order; -+ if (!order || BN_is_zero(order)) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ECDSA_R_MISSING_PARAMETERS); -+ goto err; -+ } -+ -+ i = BN_num_bits(order); -+ /* Need to truncate digest if it is too long: first truncate whole -+ bytes */ -+ if (8 * dgst_len > i) -+ dgst_len = (i + 7)/8; -+ -+ if (!BN_bin2bn(dgst, dgst_len, m)) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_BN_LIB); -+ goto err; -+ } -+ -+ /* If still too long truncate remaining bits with a shift */ -+ if ((8 * dgst_len > i) && !BN_rshift(m, m, 8 - (i & 0x7))) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_BN_LIB); -+ goto err; -+ } -+ -+ /* copy the truncated bits into plain buffer */ -+ if (spcf_bn2bin(m, &tmp_dgst, &dgst_len)) { -+ fprintf(stderr, "%s:%d: OPENSSL_malloc failec\n", __FUNCTION__, __LINE__); -+ goto err; -+ } -+ -+ /* check if this is prime or binary EC request */ -+ if (EC_METHOD_get_field_type(EC_GROUP_method_of(group)) -+ == NID_X9_62_prime_field) { -+ ec_crv = EC_PRIME; -+ /* get the generator point pair */ -+ if (!EC_POINT_get_affine_coordinates_GFp (group, -+ EC_GROUP_get0_generator(group), x, y,ctx)) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_EC_LIB); -+ goto err; -+ } -+ -+ /* get the ECC curve parameters */ -+ if (!EC_GROUP_get_curve_GFp(group, p, a, b , ctx)) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_EC_LIB); -+ goto err; -+ } -+ } else if (EC_METHOD_get_field_type(EC_GROUP_method_of(group)) == NID_X9_62_characteristic_two_field) { -+ ec_crv = EC_BINARY; -+ /* get the ECC curve parameters */ -+ if (!EC_GROUP_get_curve_GF2m(group, p, a, b , ctx)) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_EC_LIB); -+ goto err; -+ } -+ -+ /* get the generator point pair */ -+ if (!EC_POINT_get_affine_coordinates_GF2m(group, -+ EC_GROUP_get0_generator(group), x, y,ctx)) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_EC_LIB); -+ goto err; -+ } -+ } else { -+ printf("Unsupported Curve\n"); -+ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_EC_LIB); -+ goto err; -+ } -+ -+ if (spcf_bn2bin(order, &r, &r_len)) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_MALLOC_FAILURE); -+ goto err; -+ } -+ -+ if (spcf_bn2bin(p, &q, &q_len)) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_MALLOC_FAILURE); -+ goto err; -+ } -+ -+ priv_key_len = r_len; -+ -+ /** -+ * If BN_num_bytes of priv_key returns less then r_len then -+ * add padding bytes before the key -+ */ -+ if (spcf_bn2bin_ex(priv_key, &s, &priv_key_len)) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_MALLOC_FAILURE); -+ goto err; -+ } -+ -+ /* Generation of ECC curve parameters */ -+ ab_len = 2*q_len; -+ ab = eng_copy_curve_points(a, b, ab_len, q_len); -+ if (!ab) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_MALLOC_FAILURE); -+ goto err; -+ } -+ -+ if (ec_crv == EC_BINARY) { -+ if (eng_ec_get_cparam(EC_GROUP_get_curve_name(group), ab+q_len, q_len)) -+ { -+ unsigned char *c_temp = NULL; -+ int c_temp_len = q_len; -+ if (eng_ec_compute_cparam(b, p, &c_temp, &c_temp_len)) -+ memcpy(ab+q_len, c_temp, q_len); -+ else -+ goto err; -+ } -+ kop->curve_type = ECC_BINARY; -+ } -+ -+ /* Calculation of Generator point */ -+ g_len = 2*q_len; -+ g_xy = eng_copy_curve_points(x, y, g_len, q_len); -+ if (!g_xy) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_MALLOC_FAILURE); -+ goto err; -+ } -+ -+ /* memory for message representative */ -+ f = malloc(r_len); -+ if (!f) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_MALLOC_FAILURE); -+ goto err; -+ } -+ -+ /* Add padding, since SEC expects hash to of size r_len */ -+ memset(f, 0, r_len - dgst_len); -+ -+ /* Skip leading bytes if dgst_len < r_len */ -+ memcpy(f + r_len - dgst_len, tmp_dgst, dgst_len); -+ -+ dgst_len += r_len - dgst_len; -+ -+ kop->crk_op = CRK_DSA_SIGN; -+ /* inputs: dgst dsa->p dsa->q dsa->g dsa->priv_key */ -+ kop->crk_param[0].crp_p = f; -+ kop->crk_param[0].crp_nbits = dgst_len * 8; -+ kop->crk_param[1].crp_p = q; -+ kop->crk_param[1].crp_nbits = q_len * 8; -+ kop->crk_param[2].crp_p = r; -+ kop->crk_param[2].crp_nbits = r_len * 8; -+ kop->crk_param[3].crp_p = g_xy; -+ kop->crk_param[3].crp_nbits = g_len * 8; -+ kop->crk_param[4].crp_p = s; -+ kop->crk_param[4].crp_nbits = priv_key_len * 8; -+ kop->crk_param[5].crp_p = ab; -+ kop->crk_param[5].crp_nbits = ab_len * 8; -+ kop->crk_iparams = 6; -+ kop->cookie = cookie; -+ -+ if (cryptodev_asym_async(kop, r_len, sig->r , r_len, sig->s)) -+ goto err; -+ -+ return ret; -+err: -+ { -+ const ECDSA_METHOD *meth = ECDSA_OpenSSL(); -+ BN_free(sig->r); -+ BN_free(sig->s); -+ if (kop) -+ free(kop); -+ sig_ret = (meth->ecdsa_do_sign)(dgst, dgst_len, in_kinv, in_r, eckey); -+ sig->r = sig_ret->r; -+ sig->s = sig_ret->s; -+ cookie->pkc_callback(cookie, 0); -+ } -+ return ret; -+} -+ -+static int cryptodev_ecdsa_verify_async(const unsigned char *dgst, int dgst_len, -+ const ECDSA_SIG *sig, EC_KEY *eckey, struct pkc_cookie_s *cookie) -+{ -+ BIGNUM *m = NULL, *p = NULL, *a = NULL, *b = NULL; -+ BIGNUM *x = NULL, *y = NULL, *w_x = NULL, *w_y = NULL; -+ BN_CTX *ctx = NULL; -+ ECDSA_DATA *ecdsa = NULL; -+ unsigned char *q = NULL, *r = NULL, *ab = NULL, *g_xy = NULL, *w_xy = NULL; -+ unsigned char *c = NULL, *d = NULL, *f = NULL, *tmp_dgst = NULL; -+ int i = 0, q_len = 0, pub_key_len = 0, r_len = 0, c_len = 0, g_len = 0; -+ int d_len = 0, ab_len = 0, ret = 1; -+ const EC_POINT *pub_key = NULL; -+ const BIGNUM *order = NULL; -+ const EC_GROUP *group=NULL; -+ ec_curve_t ec_crv = EC_PRIME; -+ struct crypt_kop *kop = malloc(sizeof(struct crypt_kop)); -+ -+ if (!kop) -+ goto err; -+ -+ memset(kop, 0, sizeof(struct crypt_kop)); -+ ecdsa = ecdsa_check(eckey); -+ if (!ecdsa) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_PASSED_NULL_PARAMETER); -+ goto err; -+ } -+ -+ group = EC_KEY_get0_group(eckey); -+ pub_key = EC_KEY_get0_public_key(eckey); -+ -+ if (!group || !pub_key) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_PASSED_NULL_PARAMETER); -+ goto err; -+ } -+ -+ if ((ctx = BN_CTX_new()) == NULL || (m = BN_new()) == NULL || -+ (a = BN_new()) == NULL || (b = BN_new()) == NULL || -+ (p = BN_new()) == NULL || (x = BN_new()) == NULL || -+ (y = BN_new()) == NULL || (w_x = BN_new()) == NULL || -+ (w_y = BN_new()) == NULL) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); -+ goto err; -+ } -+ -+ order = &group->order; -+ if (!order || BN_is_zero(order)) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ECDSA_R_MISSING_PARAMETERS); -+ goto err; -+ } -+ -+ i = BN_num_bits(order); -+ /* Need to truncate digest if it is too long: first truncate whole -+ * bytes */ -+ if (8 * dgst_len > i) -+ dgst_len = (i + 7)/8; -+ -+ if (!BN_bin2bn(dgst, dgst_len, m)) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_BN_LIB); -+ goto err; -+ } -+ -+ /* If still too long truncate remaining bits with a shift */ -+ if ((8 * dgst_len > i) && !BN_rshift(m, m, 8 - (i & 0x7))) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_BN_LIB); -+ goto err; -+ } -+ /* copy the truncated bits into plain buffer */ -+ if (spcf_bn2bin(m, &tmp_dgst, &dgst_len)) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); -+ goto err; -+ } -+ -+ /* check if this is prime or binary EC request */ -+ if (EC_METHOD_get_field_type(EC_GROUP_method_of(group)) == NID_X9_62_prime_field) { -+ ec_crv = EC_PRIME; -+ -+ /* get the generator point pair */ -+ if (!EC_POINT_get_affine_coordinates_GFp (group, -+ EC_GROUP_get0_generator(group), x, y,ctx)) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_EC_LIB); -+ goto err; -+ } -+ -+ /* get the public key pair for prime curve */ -+ if (!EC_POINT_get_affine_coordinates_GFp (group, -+ pub_key, w_x, w_y,ctx)) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_EC_LIB); -+ goto err; -+ } -+ -+ /* get the ECC curve parameters */ -+ if (!EC_GROUP_get_curve_GFp(group, p, a, b, ctx)) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_EC_LIB); -+ goto err; -+ } -+ } else if (EC_METHOD_get_field_type(EC_GROUP_method_of(group)) == NID_X9_62_characteristic_two_field){ -+ ec_crv = EC_BINARY; -+ /* get the ECC curve parameters */ -+ if (!EC_GROUP_get_curve_GF2m(group, p, a, b , ctx)) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_EC_LIB); -+ goto err; -+ } -+ -+ /* get the generator point pair */ -+ if (!EC_POINT_get_affine_coordinates_GF2m(group, -+ EC_GROUP_get0_generator(group),x, y,ctx)) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_EC_LIB); -+ goto err; -+ } -+ -+ /* get the public key pair for binary curve */ -+ if (!EC_POINT_get_affine_coordinates_GF2m(group, -+ pub_key, w_x, w_y,ctx)) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_EC_LIB); -+ goto err; -+ } -+ }else { -+ printf("Unsupported Curve\n"); -+ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_EC_LIB); -+ goto err; -+ } -+ -+ /* Get the order of the subgroup of private keys */ -+ if (spcf_bn2bin((BIGNUM*)order, &r, &r_len)) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); -+ goto err; -+ } -+ -+ /* Get the irreducible polynomial that creates the field */ -+ if (spcf_bn2bin(p, &q, &q_len)) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); -+ goto err; -+ } -+ -+ /* Get the public key into a flat buffer with appropriate padding */ -+ pub_key_len = 2 * q_len; -+ -+ w_xy = eng_copy_curve_points (w_x, w_y, pub_key_len, q_len); -+ if (!w_xy) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); -+ goto err; -+ } -+ -+ /* Generation of ECC curve parameters */ -+ ab_len = 2*q_len; -+ -+ ab = eng_copy_curve_points (a, b, ab_len, q_len); -+ if (!ab) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); -+ goto err; -+ } -+ -+ if (ec_crv == EC_BINARY) { -+ /* copy b' i.e c(b), instead of only b */ -+ eng_ec_get_cparam (EC_GROUP_get_curve_name(group), -+ ab+q_len, q_len); -+ kop->curve_type = ECC_BINARY; -+ } -+ -+ /* Calculation of Generator point */ -+ g_len = 2 * q_len; -+ -+ g_xy = eng_copy_curve_points (x, y, g_len, q_len); -+ if (!g_xy) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); -+ goto err; -+ } -+ -+ /** -+ * Get the 1st part of signature into a flat buffer with -+ * appropriate padding -+ */ -+ if (BN_num_bytes(sig->r) < r_len) -+ c_len = r_len; -+ -+ if (spcf_bn2bin_ex(sig->r, &c, &c_len)) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); -+ goto err; -+ } -+ -+ /** -+ * Get the 2nd part of signature into a flat buffer with -+ * appropriate padding -+ */ -+ if (BN_num_bytes(sig->s) < r_len) -+ d_len = r_len; -+ -+ if (spcf_bn2bin_ex(sig->s, &d, &d_len)) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); -+ goto err; -+ } -+ -+ /* memory for message representative */ -+ f = malloc(r_len); -+ if (!f) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); -+ goto err; -+ } -+ -+ /* Add padding, since SEC expects hash to of size r_len */ -+ memset(f, 0, r_len-dgst_len); -+ -+ /* Skip leading bytes if dgst_len < r_len */ -+ memcpy(f + r_len-dgst_len, tmp_dgst, dgst_len); -+ -+ dgst_len += r_len-dgst_len; -+ -+ kop->crk_op = CRK_DSA_VERIFY; -+ /* inputs: dgst dsa->p dsa->q dsa->g dsa->priv_key */ -+ kop->crk_param[0].crp_p = f; -+ kop->crk_param[0].crp_nbits = dgst_len * 8; -+ kop->crk_param[1].crp_p = q; -+ kop->crk_param[1].crp_nbits = q_len * 8; -+ kop->crk_param[2].crp_p = r; -+ kop->crk_param[2].crp_nbits = r_len * 8; -+ kop->crk_param[3].crp_p = g_xy; -+ kop->crk_param[3].crp_nbits = g_len * 8; -+ kop->crk_param[4].crp_p = w_xy; -+ kop->crk_param[4].crp_nbits = pub_key_len * 8; -+ kop->crk_param[5].crp_p = ab; -+ kop->crk_param[5].crp_nbits = ab_len * 8; -+ kop->crk_param[6].crp_p = c; -+ kop->crk_param[6].crp_nbits = d_len * 8; -+ kop->crk_param[7].crp_p = d; -+ kop->crk_param[7].crp_nbits = d_len * 8; -+ kop->crk_iparams = 8; -+ kop->cookie = cookie; -+ -+ if (cryptodev_asym_async(kop, 0, NULL, 0, NULL)) -+ goto err; -+ -+ return ret; -+err: -+ { -+ const ECDSA_METHOD *meth = ECDSA_OpenSSL(); -+ -+ if (kop) -+ free(kop); -+ ret = (meth->ecdsa_do_verify)(dgst, dgst_len, sig, eckey); -+ cookie->pkc_callback(cookie, 0); -+ } -+ -+ return ret; -+} -+ -+/* Cryptodev DH Key Gen routine */ -+static int cryptodev_dh_keygen_async(DH *dh, struct pkc_cookie_s *cookie) -+{ -+ struct crypt_kop *kop = malloc(sizeof(struct crypt_kop)); -+ int ret = 1, g_len; -+ unsigned char *g = NULL; -+ -+ if (!kop) -+ goto sw_try; -+ -+ if (dh->priv_key == NULL) { -+ if ((dh->priv_key=BN_new()) == NULL) -+ goto sw_try; -+ } -+ -+ if (dh->pub_key == NULL) { -+ if ((dh->pub_key=BN_new()) == NULL) -+ goto sw_try; -+ } -+ -+ g_len = BN_num_bytes(dh->p); -+ /** -+ * Get generator into a plain buffer. If length is less than -+ * q_len then add leading padding bytes. - */ -- if (BN_num_bytes(sig->s) < r_len) -- d_len = r_len; -- -- if (spcf_bn2bin_ex(sig->s, &d, &d_len)) { -- ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); -- goto err; -- } -- -- /* memory for message representative */ -- f = malloc(r_len); -- if (!f) { -- ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); -- goto err; -+ if (spcf_bn2bin_ex(dh->g, &g, &g_len)) { -+ DSAerr(DH_F_DH_GENERATE_KEY, ERR_R_MALLOC_FAILURE); -+ goto sw_try; - } - -- /* Add padding, since SEC expects hash to of size r_len */ -- memset(f, 0, r_len-dgst_len); -+ memset(kop, 0, sizeof(struct crypt_kop)); -+ kop->crk_op = CRK_DH_GENERATE_KEY; -+ if (bn2crparam(dh->p, &kop->crk_param[0])) -+ goto sw_try; -+ if (bn2crparam(dh->q, &kop->crk_param[1])) -+ goto sw_try; -+ kop->crk_param[2].crp_p = g; -+ kop->crk_param[2].crp_nbits = g_len * 8; -+ kop->crk_iparams = 3; -+ kop->cookie = cookie; - -- /* Skip leading bytes if dgst_len < r_len */ -- memcpy(f + r_len-dgst_len, tmp_dgst, dgst_len); -- dgst_len += r_len-dgst_len; -- kop.crk_op = CRK_DSA_VERIFY; -- /* inputs: dgst dsa->p dsa->q dsa->g dsa->priv_key */ -- kop.crk_param[0].crp_p = f; -- kop.crk_param[0].crp_nbits = dgst_len * 8; -- kop.crk_param[1].crp_p = q; -- kop.crk_param[1].crp_nbits = q_len * 8; -- kop.crk_param[2].crp_p = r; -- kop.crk_param[2].crp_nbits = r_len * 8; -- kop.crk_param[3].crp_p = g_xy; -- kop.crk_param[3].crp_nbits = g_len * 8; -- kop.crk_param[4].crp_p = w_xy; -- kop.crk_param[4].crp_nbits = pub_key_len * 8; -- kop.crk_param[5].crp_p = ab; -- kop.crk_param[5].crp_nbits = ab_len * 8; -- kop.crk_param[6].crp_p = c; -- kop.crk_param[6].crp_nbits = d_len * 8; -- kop.crk_param[7].crp_p = d; -- kop.crk_param[7].crp_nbits = d_len * 8; -- kop.crk_iparams = 8; -+ /* pub_key is or prime length while priv key is of length of order */ -+ if (cryptodev_asym_async(kop, BN_num_bytes(dh->p), dh->pub_key, -+ BN_num_bytes(dh->q), dh->priv_key)) -+ goto sw_try; - -- if (cryptodev_asym(&kop, 0, NULL, 0, NULL) == 0) { -- /*OCF success value is 0, if not zero, change ret to fail*/ -- if(0 == kop.crk_status) -- ret = 1; -- } else { -- const ECDSA_METHOD *meth = ECDSA_OpenSSL(); -+ return ret; -+sw_try: -+ { -+ const DH_METHOD *meth = DH_OpenSSL(); - -- ret = (meth->ecdsa_do_verify)(dgst, dgst_len, sig, eckey); -+ if (kop) -+ free(kop); -+ ret = (meth->generate_key)(dh); -+ cookie->pkc_callback(cookie, 0); - } -- kop.crk_param[0].crp_p = NULL; -- zapparams(&kop); -- --err: - return ret; - } - -@@ -2327,6 +3350,54 @@ sw_try: - return (dhret); - } - -+/* Return Length if successful and 0 on failure */ -+static int -+cryptodev_dh_compute_key_async(unsigned char *key, const BIGNUM *pub_key, -+ DH *dh, struct pkc_cookie_s *cookie) -+{ -+ struct crypt_kop *kop = malloc(sizeof(struct crypt_kop)); -+ int ret = 1; -+ int fd, p_len; -+ unsigned char *padded_pub_key = NULL, *p = NULL; -+ -+ fd = *(int *)cookie->eng_handle; -+ -+ memset(kop, 0, sizeof(struct crypt_kop)); -+ kop->crk_op = CRK_DH_COMPUTE_KEY; -+ /* inputs: dh->priv_key pub_key dh->p key */ -+ spcf_bn2bin(dh->p, &p, &p_len); -+ spcf_bn2bin_ex(pub_key, &padded_pub_key, &p_len); -+ -+ if (bn2crparam(dh->priv_key, &kop->crk_param[0])) -+ goto err; -+ kop->crk_param[1].crp_p = padded_pub_key; -+ kop->crk_param[1].crp_nbits = p_len * 8; -+ kop->crk_param[2].crp_p = p; -+ kop->crk_param[2].crp_nbits = p_len * 8; -+ kop->crk_iparams = 3; -+ -+ kop->cookie = cookie; -+ kop->crk_param[3].crp_p = (void*) key; -+ kop->crk_param[3].crp_nbits = p_len * 8; -+ kop->crk_oparams = 1; -+ -+ if (cryptodev_asym_async(kop, 0, NULL, 0, NULL)) -+ goto err; -+ -+ return p_len; -+err: -+ { -+ const DH_METHOD *meth = DH_OpenSSL(); -+ -+ if (kop) -+ free(kop); -+ ret = (meth->compute_key)(key, pub_key, dh); -+ /* Call user cookie handler */ -+ cookie->pkc_callback(cookie, 0); -+ } -+ return (ret); -+} -+ - int cryptodev_ecdh_compute_key(void *out, size_t outlen, - const EC_POINT *pub_key, EC_KEY *ecdh, void *(*KDF)(const void *in, size_t inlen, - void *out, size_t *outlen)) -@@ -2504,6 +3575,190 @@ err: - return ret; - } - -+int cryptodev_ecdh_compute_key_async(void *out, size_t outlen, -+ const EC_POINT *pub_key, EC_KEY *ecdh, void *(*KDF)(const void *in, size_t inlen, -+ void *out, size_t *outlen), struct pkc_cookie_s *cookie) -+{ -+ ec_curve_t ec_crv = EC_PRIME; -+ unsigned char * q = NULL, *w_xy = NULL, *ab = NULL, *s = NULL, *r = NULL; -+ BIGNUM * w_x = NULL, *w_y = NULL; -+ int q_len = 0, ab_len = 0, pub_key_len = 0, r_len = 0, priv_key_len = 0; -+ BIGNUM * p = NULL, *a = NULL, *b = NULL; -+ BN_CTX *ctx; -+ EC_POINT *tmp=NULL; -+ BIGNUM *x=NULL, *y=NULL; -+ const BIGNUM *priv_key; -+ const EC_GROUP* group = NULL; -+ int ret = 1; -+ size_t buflen, len; -+ struct crypt_kop *kop = malloc(sizeof(struct crypt_kop)); -+ -+ if (!(ctx = BN_CTX_new()) || !kop) -+ goto err; -+ -+ memset(kop, 0, sizeof(struct crypt_kop)); -+ -+ BN_CTX_start(ctx); -+ x = BN_CTX_get(ctx); -+ y = BN_CTX_get(ctx); -+ p = BN_CTX_get(ctx); -+ a = BN_CTX_get(ctx); -+ b = BN_CTX_get(ctx); -+ w_x = BN_CTX_get(ctx); -+ w_y = BN_CTX_get(ctx); -+ -+ if (!x || !y || !p || !a || !b || !w_x || !w_y) { -+ ECDHerr(ECDH_F_ECDH_COMPUTE_KEY,ERR_R_MALLOC_FAILURE); -+ goto err; -+ } -+ -+ priv_key = EC_KEY_get0_private_key(ecdh); -+ if (priv_key == NULL) { -+ ECDHerr(ECDH_F_ECDH_COMPUTE_KEY,ECDH_R_NO_PRIVATE_VALUE); -+ goto err; -+ } -+ -+ group = EC_KEY_get0_group(ecdh); -+ if ((tmp=EC_POINT_new(group)) == NULL) { -+ ECDHerr(ECDH_F_ECDH_COMPUTE_KEY,ERR_R_MALLOC_FAILURE); -+ goto err; -+ } -+ -+ if (EC_METHOD_get_field_type(EC_GROUP_method_of(group)) == -+ NID_X9_62_prime_field) { -+ ec_crv = EC_PRIME; -+ -+ if (!EC_POINT_get_affine_coordinates_GFp(group, -+ EC_GROUP_get0_generator(group), x, y, ctx)) { -+ ECDHerr(ECDH_F_ECDH_COMPUTE_KEY,ECDH_R_POINT_ARITHMETIC_FAILURE); -+ goto err; -+ } -+ -+ /* get the ECC curve parameters */ -+ if (!EC_GROUP_get_curve_GFp(group, p, a, b, ctx)) { -+ ECDHerr(ECDH_F_ECDH_COMPUTE_KEY,ERR_R_BN_LIB); -+ goto err; -+ } -+ -+ /* get the public key pair for prime curve */ -+ if (!EC_POINT_get_affine_coordinates_GFp (group, pub_key, w_x, w_y,ctx)) { -+ ECDHerr(ECDH_F_ECDH_COMPUTE_KEY,ERR_R_BN_LIB); -+ goto err; -+ } -+ } else { -+ ec_crv = EC_BINARY; -+ -+ if (!EC_POINT_get_affine_coordinates_GF2m(group, -+ EC_GROUP_get0_generator(group), x, y, ctx)) { -+ ECDHerr(ECDH_F_ECDH_COMPUTE_KEY,ECDH_R_POINT_ARITHMETIC_FAILURE); -+ goto err; -+ } -+ -+ /* get the ECC curve parameters */ -+ if (!EC_GROUP_get_curve_GF2m(group, p, a, b , ctx)) { -+ ECDHerr(ECDH_F_ECDH_COMPUTE_KEY,ERR_R_BN_LIB); -+ goto err; -+ } -+ -+ /* get the public key pair for binary curve */ -+ if (!EC_POINT_get_affine_coordinates_GF2m(group, -+ pub_key, w_x, w_y,ctx)) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_EC_LIB); -+ goto err; -+ } -+ } -+ -+ /* irreducible polynomial that creates the field */ -+ if (spcf_bn2bin((BIGNUM*)&group->order, &r, &r_len)) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_MALLOC_FAILURE); -+ goto err; -+ } -+ -+ /* Get the irreducible polynomial that creates the field */ -+ if (spcf_bn2bin(p, &q, &q_len)) { -+ ECDHerr(ECDH_F_ECDH_COMPUTE_KEY,ERR_R_BN_LIB); -+ goto err; -+ } -+ -+ /* Get the public key into a flat buffer with appropriate padding */ -+ pub_key_len = 2 * q_len; -+ w_xy = eng_copy_curve_points (w_x, w_y, pub_key_len, q_len); -+ if (!w_xy) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_MALLOC_FAILURE); -+ goto err; -+ } -+ -+ /* Generation of ECC curve parameters */ -+ ab_len = 2*q_len; -+ ab = eng_copy_curve_points (a, b, ab_len, q_len); -+ if (!ab) { -+ ECDHerr(ECDH_F_ECDH_COMPUTE_KEY,ERR_R_BN_LIB); -+ goto err; -+ } -+ -+ if (ec_crv == EC_BINARY) { -+ /* copy b' i.e c(b), instead of only b */ -+ if (eng_ec_get_cparam(EC_GROUP_get_curve_name(group), ab+q_len, q_len)) -+ { -+ unsigned char *c_temp = NULL; -+ int c_temp_len = q_len; -+ if (eng_ec_compute_cparam(b, p, &c_temp, &c_temp_len)) -+ memcpy(ab+q_len, c_temp, q_len); -+ else -+ goto err; -+ } -+ kop->curve_type = ECC_BINARY; -+ } else -+ kop->curve_type = ECC_PRIME; -+ -+ priv_key_len = r_len; -+ -+ /* -+ * If BN_num_bytes of priv_key returns less then r_len then -+ * add padding bytes before the key -+ */ -+ if (spcf_bn2bin_ex((BIGNUM *)priv_key, &s, &priv_key_len)) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_MALLOC_FAILURE); -+ goto err; -+ } -+ -+ buflen = (EC_GROUP_get_degree(group) + 7)/8; -+ len = BN_num_bytes(x); -+ if (len > buflen || q_len < buflen) { -+ ECDHerr(ECDH_F_ECDH_COMPUTE_KEY, ERR_R_INTERNAL_ERROR); -+ goto err; -+ } -+ -+ kop->crk_op = CRK_DH_COMPUTE_KEY; -+ kop->crk_param[0].crp_p = (void *) s; -+ kop->crk_param[0].crp_nbits = priv_key_len*8; -+ kop->crk_param[1].crp_p = (void *) w_xy; -+ kop->crk_param[1].crp_nbits = pub_key_len*8; -+ kop->crk_param[2].crp_p = (void *) q; -+ kop->crk_param[2].crp_nbits = q_len*8; -+ kop->crk_param[3].crp_p = (void *) ab; -+ kop->crk_param[3].crp_nbits = ab_len*8; -+ kop->crk_iparams = 4; -+ kop->crk_param[4].crp_p = (void *) out; -+ kop->crk_param[4].crp_nbits = q_len*8; -+ kop->crk_oparams = 1; -+ kop->cookie = cookie; -+ if (cryptodev_asym_async(kop, 0, NULL, 0, NULL)) -+ goto err; -+ -+ return q_len; -+err: -+ { -+ const ECDH_METHOD *meth = ECDH_OpenSSL(); -+ -+ if (kop) -+ free(kop); -+ ret = (meth->compute_key)(out, outlen, pub_key, ecdh, KDF); -+ /* Call user cookie handler */ -+ cookie->pkc_callback(cookie, 0); -+ } -+ return ret; -+} - - static DH_METHOD cryptodev_dh = { - "cryptodev DH method", -@@ -2512,6 +3767,8 @@ static DH_METHOD cryptodev_dh = { - NULL, - NULL, - NULL, -+ NULL, -+ NULL, - 0, /* flags */ - NULL /* app_data */ - }; -@@ -2520,6 +3777,7 @@ static ECDH_METHOD cryptodev_ecdh = { - "cryptodev ECDH method", - NULL, /* cryptodev_ecdh_compute_key */ - NULL, -+ NULL, - 0, /* flags */ - NULL /* app_data */ - }; -@@ -2593,12 +3851,19 @@ ENGINE_load_cryptodev(void) - cryptodev_rsa.rsa_priv_dec = rsa_meth->rsa_priv_dec; - if (cryptodev_asymfeat & CRF_MOD_EXP) { - cryptodev_rsa.bn_mod_exp = cryptodev_bn_mod_exp; -- if (cryptodev_asymfeat & CRF_MOD_EXP_CRT) -+ cryptodev_rsa.bn_mod_exp_async = -+ cryptodev_bn_mod_exp_async; -+ if (cryptodev_asymfeat & CRF_MOD_EXP_CRT) { - cryptodev_rsa.rsa_mod_exp = - cryptodev_rsa_mod_exp; -- else -+ cryptodev_rsa.rsa_mod_exp_async = -+ cryptodev_rsa_mod_exp_async; -+ } else { - cryptodev_rsa.rsa_mod_exp = - cryptodev_rsa_nocrt_mod_exp; -+ cryptodev_rsa.rsa_mod_exp_async = -+ cryptodev_rsa_nocrt_mod_exp_async; -+ } - } - } - -@@ -2606,12 +3871,21 @@ ENGINE_load_cryptodev(void) - const DSA_METHOD *meth = DSA_OpenSSL(); - - memcpy(&cryptodev_dsa, meth, sizeof(DSA_METHOD)); -- if (cryptodev_asymfeat & CRF_DSA_SIGN) -+ if (cryptodev_asymfeat & CRF_DSA_SIGN) { - cryptodev_dsa.dsa_do_sign = cryptodev_dsa_do_sign; -- if (cryptodev_asymfeat & CRF_DSA_VERIFY) -+ cryptodev_dsa.dsa_do_sign_async = -+ cryptodev_dsa_do_sign_async; -+ } -+ if (cryptodev_asymfeat & CRF_DSA_VERIFY) { - cryptodev_dsa.dsa_do_verify = cryptodev_dsa_verify; -- if (cryptodev_asymfeat & CRF_DSA_GENERATE_KEY) -+ cryptodev_dsa.dsa_do_verify_async = -+ cryptodev_dsa_verify_async; -+ } -+ if (cryptodev_asymfeat & CRF_DSA_GENERATE_KEY) { - cryptodev_dsa.dsa_keygen = cryptodev_dsa_keygen; -+ cryptodev_dsa.dsa_keygen_async = -+ cryptodev_dsa_keygen_async; -+ } - } - - if (ENGINE_set_DH(engine, &cryptodev_dh)){ -@@ -2620,10 +3894,15 @@ ENGINE_load_cryptodev(void) - if (cryptodev_asymfeat & CRF_DH_COMPUTE_KEY) { - cryptodev_dh.compute_key = - cryptodev_dh_compute_key; -+ cryptodev_dh.compute_key_async = -+ cryptodev_dh_compute_key_async; - } - if (cryptodev_asymfeat & CRF_DH_GENERATE_KEY) { - cryptodev_dh.generate_key = - cryptodev_dh_keygen; -+ cryptodev_dh.generate_key_async = -+ cryptodev_dh_keygen_async; -+ - } - } - -@@ -2632,10 +3911,14 @@ ENGINE_load_cryptodev(void) - memcpy(&cryptodev_ecdsa, meth, sizeof(ECDSA_METHOD)); - if (cryptodev_asymfeat & CRF_DSA_SIGN) { - cryptodev_ecdsa.ecdsa_do_sign = cryptodev_ecdsa_do_sign; -+ cryptodev_ecdsa.ecdsa_do_sign_async = -+ cryptodev_ecdsa_do_sign_async; - } - if (cryptodev_asymfeat & CRF_DSA_VERIFY) { - cryptodev_ecdsa.ecdsa_do_verify = - cryptodev_ecdsa_verify; -+ cryptodev_ecdsa.ecdsa_do_verify_async = -+ cryptodev_ecdsa_verify_async; - } - } - -@@ -2644,9 +3927,16 @@ ENGINE_load_cryptodev(void) - memcpy(&cryptodev_ecdh, ecdh_meth, sizeof(ECDH_METHOD)); - if (cryptodev_asymfeat & CRF_DH_COMPUTE_KEY) { - cryptodev_ecdh.compute_key = cryptodev_ecdh_compute_key; -+ cryptodev_ecdh.compute_key_async = -+ cryptodev_ecdh_compute_key_async; - } - } - -+ ENGINE_set_check_pkc_availability(engine, cryptodev_check_availability); -+ ENGINE_set_close_instance(engine, cryptodev_close_instance); -+ ENGINE_set_init_instance(engine, cryptodev_init_instance); -+ ENGINE_set_async_map(engine, ENGINE_ALLPKC_ASYNC); -+ - ENGINE_add(engine); - ENGINE_free(engine); - ERR_clear_error(); -diff --git a/crypto/engine/eng_int.h b/crypto/engine/eng_int.h -index 451ef8f..8fc3077 100644 ---- a/crypto/engine/eng_int.h -+++ b/crypto/engine/eng_int.h -@@ -181,7 +181,29 @@ struct engine_st - ENGINE_LOAD_KEY_PTR load_pubkey; - - ENGINE_SSL_CLIENT_CERT_PTR load_ssl_client_cert; -- -+ /* -+ * Instantiate Engine handle to be passed in check_pkc_availability -+ * Ensure that Engine is instantiated before any pkc asynchronous call. -+ */ -+ void *(*engine_init_instance)(void); -+ /* -+ * Instantiated Engine handle will be closed with this call. -+ * Ensure that no pkc asynchronous call is made after this call -+ */ -+ void (*engine_close_instance)(void *handle); -+ /* -+ * Check availability will extract the data from kernel. -+ * eng_handle: This is the Engine handle corresponds to which -+ * the cookies needs to be polled. -+ * return 0 if cookie available else 1 -+ */ -+ int (*check_pkc_availability)(void *eng_handle); -+ /* -+ * The following map is used to check if the engine supports asynchronous implementation -+ * ENGINE_ASYNC_FLAG* for available bitmap. Any application checking for asynchronous -+ * implementation need to check this features using "int ENGINE_get_async_map(engine *)"; -+ */ -+ int async_map; - const ENGINE_CMD_DEFN *cmd_defns; - int flags; - /* reference count on the structure itself */ -diff --git a/crypto/engine/eng_lib.c b/crypto/engine/eng_lib.c -index 18a6664..6fa621c 100644 ---- a/crypto/engine/eng_lib.c -+++ b/crypto/engine/eng_lib.c -@@ -98,7 +98,11 @@ void engine_set_all_null(ENGINE *e) - e->ctrl = NULL; - e->load_privkey = NULL; - e->load_pubkey = NULL; -+ e->check_pkc_availability = NULL; -+ e->engine_init_instance = NULL; -+ e->engine_close_instance = NULL; - e->cmd_defns = NULL; -+ e->async_map = 0; - e->flags = 0; - } - -@@ -233,6 +237,48 @@ int ENGINE_set_id(ENGINE *e, const char *id) - return 1; - } - -+void ENGINE_set_init_instance(ENGINE *e, void *(*engine_init_instance)(void)) -+ { -+ e->engine_init_instance = engine_init_instance; -+ } -+ -+void ENGINE_set_close_instance(ENGINE *e, -+ void (*engine_close_instance)(void *)) -+ { -+ e->engine_close_instance = engine_close_instance; -+ } -+ -+void ENGINE_set_async_map(ENGINE *e, int async_map) -+ { -+ e->async_map = async_map; -+ } -+ -+void *ENGINE_init_instance(ENGINE *e) -+ { -+ return e->engine_init_instance(); -+ } -+ -+void ENGINE_close_instance(ENGINE *e, void *eng_handle) -+ { -+ e->engine_close_instance(eng_handle); -+ } -+ -+int ENGINE_get_async_map(ENGINE *e) -+ { -+ return e->async_map; -+ } -+ -+void ENGINE_set_check_pkc_availability(ENGINE *e, -+ int (*check_pkc_availability)(void *eng_handle)) -+ { -+ e->check_pkc_availability = check_pkc_availability; -+ } -+ -+int ENGINE_check_pkc_availability(ENGINE *e, void *eng_handle) -+ { -+ return e->check_pkc_availability(eng_handle); -+ } -+ - int ENGINE_set_name(ENGINE *e, const char *name) - { - if(name == NULL) -diff --git a/crypto/engine/engine.h b/crypto/engine/engine.h -index 237a6c9..ccff86a 100644 ---- a/crypto/engine/engine.h -+++ b/crypto/engine/engine.h -@@ -473,6 +473,30 @@ ENGINE *ENGINE_new(void); - int ENGINE_free(ENGINE *e); - int ENGINE_up_ref(ENGINE *e); - int ENGINE_set_id(ENGINE *e, const char *id); -+void ENGINE_set_init_instance(ENGINE *e, void *(*engine_init_instance)(void)); -+void ENGINE_set_close_instance(ENGINE *e, -+ void (*engine_free_instance)(void *)); -+/* -+ * Following FLAGS are bitmap store in async_map to set asynchronous interface capability -+ *of the engine -+ */ -+#define ENGINE_RSA_ASYNC 0x0001 -+#define ENGINE_DSA_ASYNC 0x0002 -+#define ENGINE_DH_ASYNC 0x0004 -+#define ENGINE_ECDSA_ASYNC 0x0008 -+#define ENGINE_ECDH_ASYNC 0x0010 -+#define ENGINE_ALLPKC_ASYNC 0x001F -+/* Engine implementation will set the bitmap based on above flags using following API */ -+void ENGINE_set_async_map(ENGINE *e, int async_map); -+ /* Application need to check the bitmap based on above flags using following API -+ * to confirm asynchronous methods supported -+ */ -+int ENGINE_get_async_map(ENGINE *e); -+void *ENGINE_init_instance(ENGINE *e); -+void ENGINE_close_instance(ENGINE *e, void *eng_handle); -+void ENGINE_set_check_pkc_availability(ENGINE *e, -+ int (*check_pkc_availability)(void *eng_handle)); -+int ENGINE_check_pkc_availability(ENGINE *e, void *eng_handle); - int ENGINE_set_name(ENGINE *e, const char *name); - int ENGINE_set_RSA(ENGINE *e, const RSA_METHOD *rsa_meth); - int ENGINE_set_DSA(ENGINE *e, const DSA_METHOD *dsa_meth); -diff --git a/crypto/rsa/rsa.h b/crypto/rsa/rsa.h -index 5f269e5..6ef1b15 100644 ---- a/crypto/rsa/rsa.h -+++ b/crypto/rsa/rsa.h -@@ -101,6 +101,29 @@ struct rsa_meth_st - int (*bn_mod_exp)(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, - const BIGNUM *m, BN_CTX *ctx, - BN_MONT_CTX *m_ctx); /* Can be null */ -+ /* -+ * Cookie in the following _async variant must be allocated before -+ * submission and can be freed once its corresponding callback -+ * handler is called -+ */ -+ int (*rsa_pub_enc_asyn)(int flen,const unsigned char *from, -+ unsigned char *to, RSA *rsa, int padding, -+ struct pkc_cookie_s *cookie); -+ int (*rsa_pub_dec_async)(int flen,const unsigned char *from, -+ unsigned char *to, RSA *rsa, int padding, -+ struct pkc_cookie_s *cookie); -+ int (*rsa_priv_enc_async)(int flen,const unsigned char *from, -+ unsigned char *to, RSA *rsa, int padding, -+ struct pkc_cookie_s *cookie); -+ int (*rsa_priv_dec_async)(int flen,const unsigned char *from, -+ unsigned char *to, RSA *rsa, int padding, -+ struct pkc_cookie_s *cookie); -+ int (*rsa_mod_exp_async)(BIGNUM *r0, const BIGNUM *I, RSA *rsa, -+ BN_CTX *ctx, struct pkc_cookie_s *cookie); -+ int (*bn_mod_exp_async)(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, -+ const BIGNUM *m, BN_CTX *ctx, -+ BN_MONT_CTX *m_ctx, struct pkc_cookie_s *cookie); -+ - int (*init)(RSA *rsa); /* called at new */ - int (*finish)(RSA *rsa); /* called at free */ - int flags; /* RSA_METHOD_FLAG_* things */ --- -1.7.9.7 - diff --git a/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0008-Initial-support-for-PKC-in-cryptodev-engine.patch b/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0008-Initial-support-for-PKC-in-cryptodev-engine.patch new file mode 100644 index 00000000..6903c88d --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0008-Initial-support-for-PKC-in-cryptodev-engine.patch @@ -0,0 +1,1564 @@ +From 107a10d45db0f2e58482f698add04ed9183f7268 Mon Sep 17 00:00:00 2001 +From: Yashpal Dutta +Date: Tue, 11 Mar 2014 06:29:52 +0545 +Subject: [PATCH 08/17] Initial support for PKC in cryptodev engine + +Upstream-status: Pending + +Signed-off-by: Yashpal Dutta +--- + crypto/engine/eng_cryptodev.c | 1343 ++++++++++++++++++++++++++++++++++++----- + 1 file changed, 1183 insertions(+), 160 deletions(-) + +diff --git a/crypto/engine/eng_cryptodev.c b/crypto/engine/eng_cryptodev.c +index e3eb98b..7ee314b 100644 +--- a/crypto/engine/eng_cryptodev.c ++++ b/crypto/engine/eng_cryptodev.c +@@ -54,11 +54,14 @@ ENGINE_load_cryptodev(void) + #else + + #include +-#include + #include + #include + #include + #include ++#include ++#include ++#include ++#include + #include + #include + #include +@@ -68,6 +71,8 @@ ENGINE_load_cryptodev(void) + #include + #include + #include ++#include "eng_cryptodev_ec.h" ++#include + + struct dev_crypto_state { + struct session_op d_sess; +@@ -116,18 +121,10 @@ static int cryptodev_bn_mod_exp(BIGNUM *r, const BIGNUM *a, + static int cryptodev_rsa_nocrt_mod_exp(BIGNUM *r0, const BIGNUM *I, + RSA *rsa, BN_CTX *ctx); + static int cryptodev_rsa_mod_exp(BIGNUM *r0, const BIGNUM *I, RSA *rsa, BN_CTX *ctx); +-static int cryptodev_dsa_bn_mod_exp(DSA *dsa, BIGNUM *r, BIGNUM *a, +- const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx); +-static int cryptodev_dsa_dsa_mod_exp(DSA *dsa, BIGNUM *t1, BIGNUM *g, +- BIGNUM *u1, BIGNUM *pub_key, BIGNUM *u2, BIGNUM *p, +- BN_CTX *ctx, BN_MONT_CTX *mont); + static DSA_SIG *cryptodev_dsa_do_sign(const unsigned char *dgst, + int dlen, DSA *dsa); + static int cryptodev_dsa_verify(const unsigned char *dgst, int dgst_len, + DSA_SIG *sig, DSA *dsa); +-static int cryptodev_mod_exp_dh(const DH *dh, BIGNUM *r, const BIGNUM *a, +- const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx, +- BN_MONT_CTX *m_ctx); + static int cryptodev_dh_compute_key(unsigned char *key, + const BIGNUM *pub_key, DH *dh); + static int cryptodev_ctrl(ENGINE *e, int cmd, long i, void *p, +@@ -136,6 +133,102 @@ void ENGINE_load_cryptodev(void); + const EVP_CIPHER cryptodev_aes_128_cbc_hmac_sha1; + const EVP_CIPHER cryptodev_aes_256_cbc_hmac_sha1; + ++inline int spcf_bn2bin(BIGNUM *bn, unsigned char **bin, int *bin_len) ++{ ++ int len; ++ unsigned char *p; ++ ++ len = BN_num_bytes(bn); ++ ++ if (!len) ++ return -1; ++ ++ p = malloc(len); ++ if (!p) ++ return -1; ++ ++ BN_bn2bin(bn,p); ++ ++ *bin = p; ++ *bin_len = len; ++ ++ return 0; ++} ++ ++inline int spcf_bn2bin_ex(BIGNUM *bn, unsigned char **bin, int *bin_len) ++{ ++ int len; ++ unsigned char *p; ++ ++ len = BN_num_bytes(bn); ++ ++ if (!len) ++ return -1; ++ ++ if (len < *bin_len) ++ p = malloc(*bin_len); ++ else ++ p = malloc(len); ++ ++ if (!p) ++ return -ENOMEM; ++ ++ if (len < *bin_len) { ++ /* place padding */ ++ memset(p, 0, (*bin_len - len)); ++ BN_bn2bin(bn,p+(*bin_len-len)); ++ } else { ++ BN_bn2bin(bn,p); ++ } ++ ++ *bin = p; ++ if (len >= *bin_len) ++ *bin_len = len; ++ ++ return 0; ++} ++ ++/** ++ * Convert an ECC F2m 'b' parameter into the 'c' parameter. ++ *Inputs: ++ * q, the curve's modulus ++ * b, the curve's b parameter ++ * (a bignum for b, a buffer for c) ++ * Output: ++ * c, written into bin, right-adjusted to fill q_len bytes. ++ */ ++static int ++eng_ec_compute_cparam(const BIGNUM* b, const BIGNUM* q, ++ unsigned char **bin, int *bin_len) ++{ ++ BIGNUM* c = BN_new(); ++ BIGNUM* exp = BN_new(); ++ BN_CTX *ctx = BN_CTX_new(); ++ int m = BN_num_bits(q) - 1; ++ int ok = 0; ++ ++ if (!c || !exp || !ctx || *bin) ++ goto err; ++ ++ /* ++ * We have to compute c, where b = c^4, i.e., the fourth root of b. ++ * The equation for c is c = b^(2^(m-2)) ++ * Compute exp = 2^(m-2) ++ * (1 << x) == 2^x ++ * and then compute c = b^exp ++ */ ++ BN_lshift(exp, BN_value_one(), m-2); ++ BN_GF2m_mod_exp(c, b, exp, q, ctx); ++ /* Store c */ ++ spcf_bn2bin_ex(c, bin, bin_len); ++ ok = 1; ++err: ++ if (ctx) BN_CTX_free(ctx); ++ if (c) BN_free(c); ++ if (exp) BN_free(exp); ++ return ok; ++} ++ + static const ENGINE_CMD_DEFN cryptodev_defns[] = { + { 0, NULL, NULL, 0 } + }; +@@ -1139,7 +1232,6 @@ cryptodev_engine_digests(ENGINE *e, const EVP_MD **digest, + static int + bn2crparam(const BIGNUM *a, struct crparam *crp) + { +- int i, j, k; + ssize_t bytes, bits; + u_char *b; + +@@ -1156,15 +1248,7 @@ bn2crparam(const BIGNUM *a, struct crparam *crp) + + crp->crp_p = (caddr_t) b; + crp->crp_nbits = bits; +- +- for (i = 0, j = 0; i < a->top; i++) { +- for (k = 0; k < BN_BITS2 / 8; k++) { +- if ((j + k) >= bytes) +- return (0); +- b[j + k] = a->d[i] >> (k * 8); +- } +- j += BN_BITS2 / 8; +- } ++ BN_bn2bin(a, crp->crp_p); + return (0); + } + +@@ -1172,22 +1256,14 @@ bn2crparam(const BIGNUM *a, struct crparam *crp) + static int + crparam2bn(struct crparam *crp, BIGNUM *a) + { +- u_int8_t *pd; +- int i, bytes; ++ int bytes; + + bytes = (crp->crp_nbits + 7) / 8; + + if (bytes == 0) + return (-1); + +- if ((pd = (u_int8_t *) malloc(bytes)) == NULL) +- return (-1); +- +- for (i = 0; i < bytes; i++) +- pd[i] = crp->crp_p[bytes - i - 1]; +- +- BN_bin2bn(pd, bytes, a); +- free(pd); ++ BN_bin2bn(crp->crp_p, bytes, a); + + return (0); + } +@@ -1235,6 +1311,32 @@ cryptodev_asym(struct crypt_kop *kop, int rlen, BIGNUM *r, int slen, BIGNUM *s) + return (ret); + } + ++/* Close an opened instance of cryptodev engine */ ++void cryptodev_close_instance(void *handle) ++{ ++ int fd; ++ ++ if (handle) { ++ fd = *(int *)handle; ++ close(fd); ++ free(handle); ++ } ++} ++ ++/* Create an instance of cryptodev for asynchronous interface */ ++void *cryptodev_init_instance(void) ++{ ++ int *fd = malloc(sizeof(int)); ++ ++ if (fd) { ++ if ((*fd = open("/dev/crypto", O_RDWR, 0)) == -1) { ++ free(fd); ++ return NULL; ++ } ++ } ++ return fd; ++} ++ + static int + cryptodev_bn_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, + const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *in_mont) +@@ -1250,9 +1352,9 @@ cryptodev_bn_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, + return (ret); + } + +- memset(&kop, 0, sizeof kop); + kop.crk_op = CRK_MOD_EXP; +- ++ kop.crk_oparams = 0; ++ kop.crk_status = 0; + /* inputs: a^p % m */ + if (bn2crparam(a, &kop.crk_param[0])) + goto err; +@@ -1293,28 +1395,38 @@ static int + cryptodev_rsa_mod_exp(BIGNUM *r0, const BIGNUM *I, RSA *rsa, BN_CTX *ctx) + { + struct crypt_kop kop; +- int ret = 1; ++ int ret = 1, f_len, p_len, q_len; ++ unsigned char *f = NULL, *p = NULL, *q = NULL, *dp = NULL, *dq = NULL, *c = NULL; + + if (!rsa->p || !rsa->q || !rsa->dmp1 || !rsa->dmq1 || !rsa->iqmp) { + /* XXX 0 means failure?? */ + return (0); + } + +- memset(&kop, 0, sizeof kop); ++ kop.crk_oparams = 0; ++ kop.crk_status = 0; + kop.crk_op = CRK_MOD_EXP_CRT; ++ f_len = BN_num_bytes(rsa->n); ++ spcf_bn2bin_ex(I, &f, &f_len); ++ spcf_bn2bin(rsa->p, &p, &p_len); ++ spcf_bn2bin(rsa->q, &q, &q_len); ++ spcf_bn2bin_ex(rsa->dmp1, &dp, &p_len); ++ spcf_bn2bin_ex(rsa->iqmp, &c, &p_len); ++ spcf_bn2bin_ex(rsa->dmq1, &dq, &q_len); + /* inputs: rsa->p rsa->q I rsa->dmp1 rsa->dmq1 rsa->iqmp */ +- if (bn2crparam(rsa->p, &kop.crk_param[0])) +- goto err; +- if (bn2crparam(rsa->q, &kop.crk_param[1])) +- goto err; +- if (bn2crparam(I, &kop.crk_param[2])) +- goto err; +- if (bn2crparam(rsa->dmp1, &kop.crk_param[3])) +- goto err; +- if (bn2crparam(rsa->dmq1, &kop.crk_param[4])) +- goto err; +- if (bn2crparam(rsa->iqmp, &kop.crk_param[5])) +- goto err; ++ kop.crk_param[0].crp_p = p; ++ kop.crk_param[0].crp_nbits = p_len * 8; ++ kop.crk_param[1].crp_p = q; ++ kop.crk_param[1].crp_nbits = q_len * 8; ++ kop.crk_param[2].crp_p = f; ++ kop.crk_param[2].crp_nbits = f_len * 8; ++ kop.crk_param[3].crp_p = dp; ++ kop.crk_param[3].crp_nbits = p_len * 8; ++ /* dq must of length q, rest all of length p*/ ++ kop.crk_param[4].crp_p = dq; ++ kop.crk_param[4].crp_nbits = q_len * 8; ++ kop.crk_param[5].crp_p = c; ++ kop.crk_param[5].crp_nbits = p_len * 8; + kop.crk_iparams = 6; + + if (cryptodev_asym(&kop, BN_num_bytes(rsa->n), r0, 0, NULL)) { +@@ -1350,90 +1462,117 @@ static RSA_METHOD cryptodev_rsa = { + NULL /* rsa_verify */ + }; + +-static int +-cryptodev_dsa_bn_mod_exp(DSA *dsa, BIGNUM *r, BIGNUM *a, const BIGNUM *p, +- const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx) +-{ +- return (cryptodev_bn_mod_exp(r, a, p, m, ctx, m_ctx)); +-} +- +-static int +-cryptodev_dsa_dsa_mod_exp(DSA *dsa, BIGNUM *t1, BIGNUM *g, +- BIGNUM *u1, BIGNUM *pub_key, BIGNUM *u2, BIGNUM *p, +- BN_CTX *ctx, BN_MONT_CTX *mont) ++static DSA_SIG * ++cryptodev_dsa_do_sign(const unsigned char *dgst, int dlen, DSA *dsa) + { +- BIGNUM t2; +- int ret = 0; +- +- BN_init(&t2); +- +- /* v = ( g^u1 * y^u2 mod p ) mod q */ +- /* let t1 = g ^ u1 mod p */ +- ret = 0; ++ struct crypt_kop kop; ++ BIGNUM *c = NULL, *d = NULL; ++ DSA_SIG *dsaret = NULL; ++ int q_len = 0, r_len = 0, g_len = 0; ++ int priv_key_len = 0, ret; ++ unsigned char *q = NULL, *r = NULL, *g = NULL, *priv_key = NULL, *f = NULL; + +- if (!dsa->meth->bn_mod_exp(dsa,t1,dsa->g,u1,dsa->p,ctx,mont)) ++ memset(&kop, 0, sizeof kop); ++ if ((c = BN_new()) == NULL) { ++ DSAerr(DSA_F_DSA_DO_SIGN, ERR_R_MALLOC_FAILURE); + goto err; ++ } + +- /* let t2 = y ^ u2 mod p */ +- if (!dsa->meth->bn_mod_exp(dsa,&t2,dsa->pub_key,u2,dsa->p,ctx,mont)) ++ if ((d = BN_new()) == NULL) { ++ BN_free(c); ++ DSAerr(DSA_F_DSA_DO_SIGN, ERR_R_MALLOC_FAILURE); + goto err; +- /* let u1 = t1 * t2 mod p */ +- if (!BN_mod_mul(u1,t1,&t2,dsa->p,ctx)) ++ } ++ ++ if (spcf_bn2bin(dsa->p, &q, &q_len)) { ++ DSAerr(DSA_F_DSA_DO_SIGN, DSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE); + goto err; ++ } + +- BN_copy(t1,u1); ++ /* Get order of the field of private keys into plain buffer */ ++ if (spcf_bn2bin (dsa->q, &r, &r_len)) { ++ DSAerr(DSA_F_DSA_DO_SIGN, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } + +- ret = 1; +-err: +- BN_free(&t2); +- return(ret); +-} ++ /* sanity test */ ++ if (dlen > r_len) { ++ DSAerr(DSA_F_DSA_DO_SIGN, DSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE); ++ goto err; ++ } + +-static DSA_SIG * +-cryptodev_dsa_do_sign(const unsigned char *dgst, int dlen, DSA *dsa) +-{ +- struct crypt_kop kop; +- BIGNUM *r = NULL, *s = NULL; +- DSA_SIG *dsaret = NULL; ++ g_len = q_len; ++ /** ++ * Get generator into a plain buffer. If length is less than ++ * q_len then add leading padding bytes. ++ */ ++ if (spcf_bn2bin_ex(dsa->g, &g, &g_len)) { ++ DSAerr(DSA_F_DSA_DO_SIGN, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } + +- if ((r = BN_new()) == NULL) ++ priv_key_len = r_len; ++ /** ++ * Get private key into a plain buffer. If length is less than ++ * r_len then add leading padding bytes. ++ */ ++ if (spcf_bn2bin_ex(dsa->priv_key, &priv_key, &priv_key_len)) { ++ DSAerr(DSA_F_DSA_DO_SIGN, ERR_R_MALLOC_FAILURE); + goto err; +- if ((s = BN_new()) == NULL) { +- BN_free(r); ++ } ++ ++ /* Allocate memory to store hash. */ ++ f = OPENSSL_malloc (r_len); ++ if (!f) { ++ DSAerr(DSA_F_DSA_DO_SIGN, ERR_R_MALLOC_FAILURE); + goto err; + } + +- memset(&kop, 0, sizeof kop); ++ /* Add padding, since SEC expects hash to of size r_len */ ++ if (dlen < r_len) ++ memset(f, 0, r_len - dlen); ++ ++ /* Skip leading bytes if dgst_len < r_len */ ++ memcpy(f + r_len - dlen, dgst, dlen); ++ + kop.crk_op = CRK_DSA_SIGN; + + /* inputs: dgst dsa->p dsa->q dsa->g dsa->priv_key */ +- kop.crk_param[0].crp_p = (caddr_t)dgst; +- kop.crk_param[0].crp_nbits = dlen * 8; +- if (bn2crparam(dsa->p, &kop.crk_param[1])) +- goto err; +- if (bn2crparam(dsa->q, &kop.crk_param[2])) +- goto err; +- if (bn2crparam(dsa->g, &kop.crk_param[3])) +- goto err; +- if (bn2crparam(dsa->priv_key, &kop.crk_param[4])) +- goto err; ++ kop.crk_param[0].crp_p = (void*)f; ++ kop.crk_param[0].crp_nbits = r_len * 8; ++ kop.crk_param[1].crp_p = (void*)q; ++ kop.crk_param[1].crp_nbits = q_len * 8; ++ kop.crk_param[2].crp_p = (void*)r; ++ kop.crk_param[2].crp_nbits = r_len * 8; ++ kop.crk_param[3].crp_p = (void*)g; ++ kop.crk_param[3].crp_nbits = g_len * 8; ++ kop.crk_param[4].crp_p = (void*)priv_key; ++ kop.crk_param[4].crp_nbits = priv_key_len * 8; + kop.crk_iparams = 5; + +- if (cryptodev_asym(&kop, BN_num_bytes(dsa->q), r, +- BN_num_bytes(dsa->q), s) == 0) { +- dsaret = DSA_SIG_new(); +- dsaret->r = r; +- dsaret->s = s; +- } else { +- const DSA_METHOD *meth = DSA_OpenSSL(); +- BN_free(r); +- BN_free(s); +- dsaret = (meth->dsa_do_sign)(dgst, dlen, dsa); ++ ret = cryptodev_asym(&kop, r_len, c, r_len, d); ++ ++ if (ret) { ++ DSAerr(DSA_F_DSA_DO_SIGN, DSA_R_DECODE_ERROR); ++ goto err; + } +-err: +- kop.crk_param[0].crp_p = NULL; ++ ++ dsaret = DSA_SIG_new(); ++ dsaret->r = c; ++ dsaret->s = d; ++ + zapparams(&kop); + return (dsaret); ++err: ++ { ++ const DSA_METHOD *meth = DSA_OpenSSL(); ++ if (c) ++ BN_free(c); ++ if (d) ++ BN_free(d); ++ dsaret = (meth->dsa_do_sign)(dgst, dlen, dsa); ++ return (dsaret); ++ } + } + + static int +@@ -1441,42 +1580,179 @@ cryptodev_dsa_verify(const unsigned char *dgst, int dlen, + DSA_SIG *sig, DSA *dsa) + { + struct crypt_kop kop; +- int dsaret = 1; ++ int dsaret = 1, q_len = 0, r_len = 0, g_len = 0; ++ int w_len = 0 ,c_len = 0, d_len = 0, ret = -1; ++ unsigned char * q = NULL, * r = NULL, * w = NULL, * g = NULL; ++ unsigned char * c = NULL, * d = NULL, *f = NULL; + + memset(&kop, 0, sizeof kop); + kop.crk_op = CRK_DSA_VERIFY; + +- /* inputs: dgst dsa->p dsa->q dsa->g dsa->pub_key sig->r sig->s */ +- kop.crk_param[0].crp_p = (caddr_t)dgst; +- kop.crk_param[0].crp_nbits = dlen * 8; +- if (bn2crparam(dsa->p, &kop.crk_param[1])) ++ if (spcf_bn2bin(dsa->p, &q, &q_len)) { ++ DSAerr(DSA_F_DSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); ++ return ret; ++ } ++ ++ /* Get Order of field of private keys */ ++ if (spcf_bn2bin(dsa->q, &r, &r_len)) { ++ DSAerr(DSA_F_DSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); + goto err; +- if (bn2crparam(dsa->q, &kop.crk_param[2])) ++ } ++ ++ g_len = q_len; ++ /** ++ * Get generator into a plain buffer. If length is less than ++ * q_len then add leading padding bytes. ++ */ ++ if (spcf_bn2bin_ex(dsa->g, &g, &g_len)) { ++ DSAerr(DSA_F_DSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); + goto err; +- if (bn2crparam(dsa->g, &kop.crk_param[3])) ++ } ++ w_len = q_len; ++ /** ++ * Get public key into a plain buffer. If length is less than ++ * q_len then add leading padding bytes. ++ */ ++ if (spcf_bn2bin_ex(dsa->pub_key, &w, &w_len)) { ++ DSAerr(DSA_F_DSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ /** ++ * Get the 1st part of signature into a flat buffer with ++ * appropriate padding ++ */ ++ c_len = r_len; ++ ++ if (spcf_bn2bin_ex(sig->r, &c, &c_len)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); + goto err; +- if (bn2crparam(dsa->pub_key, &kop.crk_param[4])) ++ } ++ ++ /** ++ * Get the 2nd part of signature into a flat buffer with ++ * appropriate padding ++ */ ++ d_len = r_len; ++ ++ if (spcf_bn2bin_ex(sig->s, &d, &d_len)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); + goto err; +- if (bn2crparam(sig->r, &kop.crk_param[5])) ++ } ++ ++ ++ /* Sanity test */ ++ if (dlen > r_len) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); + goto err; +- if (bn2crparam(sig->s, &kop.crk_param[6])) ++ } ++ ++ /* Allocate memory to store hash. */ ++ f = OPENSSL_malloc (r_len); ++ if (!f) { ++ DSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); + goto err; ++ } ++ ++ /* Add padding, since SEC expects hash to of size r_len */ ++ if (dlen < r_len) ++ memset(f, 0, r_len - dlen); ++ ++ /* Skip leading bytes if dgst_len < r_len */ ++ memcpy(f + r_len - dlen, dgst, dlen); ++ ++ /* inputs: dgst dsa->p dsa->q dsa->g dsa->pub_key sig->r sig->s */ ++ kop.crk_param[0].crp_p = (void*)f; ++ kop.crk_param[0].crp_nbits = r_len * 8; ++ kop.crk_param[1].crp_p = q; ++ kop.crk_param[1].crp_nbits = q_len * 8; ++ kop.crk_param[2].crp_p = r; ++ kop.crk_param[2].crp_nbits = r_len * 8; ++ kop.crk_param[3].crp_p = g; ++ kop.crk_param[3].crp_nbits = g_len * 8; ++ kop.crk_param[4].crp_p = w; ++ kop.crk_param[4].crp_nbits = w_len * 8; ++ kop.crk_param[5].crp_p = c; ++ kop.crk_param[5].crp_nbits = c_len * 8; ++ kop.crk_param[6].crp_p = d; ++ kop.crk_param[6].crp_nbits = d_len * 8; + kop.crk_iparams = 7; + +- if (cryptodev_asym(&kop, 0, NULL, 0, NULL) == 0) { +-/*OCF success value is 0, if not zero, change dsaret to fail*/ +- if(0 != kop.crk_status) dsaret = 0; +- } else { +- const DSA_METHOD *meth = DSA_OpenSSL(); ++ if ((cryptodev_asym(&kop, 0, NULL, 0, NULL))) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, DSA_R_DECODE_ERROR); ++ goto err; ++ } + +- dsaret = (meth->dsa_do_verify)(dgst, dlen, sig, dsa); ++ /*OCF success value is 0, if not zero, change dsaret to fail*/ ++ if(0 != kop.crk_status) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, DSA_R_DECODE_ERROR); ++ goto err; + } +-err: +- kop.crk_param[0].crp_p = NULL; ++ + zapparams(&kop); + return (dsaret); ++err: ++ { ++ const DSA_METHOD *meth = DSA_OpenSSL(); ++ ++ dsaret = (meth->dsa_do_verify)(dgst, dlen, sig, dsa); ++ } ++ return dsaret; + } + ++/* Cryptodev DSA Key Gen routine */ ++static int cryptodev_dsa_keygen(DSA *dsa) ++{ ++ struct crypt_kop kop; ++ int ret = 1, g_len; ++ unsigned char *g = NULL; ++ ++ if (dsa->priv_key == NULL) { ++ if ((dsa->priv_key=BN_new()) == NULL) ++ goto sw_try; ++ } ++ ++ if (dsa->pub_key == NULL) { ++ if ((dsa->pub_key=BN_new()) == NULL) ++ goto sw_try; ++ } ++ ++ g_len = BN_num_bytes(dsa->p); ++ /** ++ * Get generator into a plain buffer. If length is less than ++ * p_len then add leading padding bytes. ++ */ ++ if (spcf_bn2bin_ex(dsa->g, &g, &g_len)) { ++ DSAerr(DSA_F_DSA_GENERATE_KEY, ERR_R_MALLOC_FAILURE); ++ goto sw_try; ++ } ++ ++ memset(&kop, 0, sizeof kop); ++ ++ kop.crk_op = CRK_DSA_GENERATE_KEY; ++ if (bn2crparam(dsa->p, &kop.crk_param[0])) ++ goto sw_try; ++ if (bn2crparam(dsa->q, &kop.crk_param[1])) ++ goto sw_try; ++ kop.crk_param[2].crp_p = g; ++ kop.crk_param[2].crp_nbits = g_len * 8; ++ kop.crk_iparams = 3; ++ ++ /* pub_key is or prime length while priv key is of length of order */ ++ if (cryptodev_asym(&kop, BN_num_bytes(dsa->p), dsa->pub_key, ++ BN_num_bytes(dsa->q), dsa->priv_key)) ++ goto sw_try; ++ ++ return ret; ++sw_try: ++ { ++ const DSA_METHOD *meth = DSA_OpenSSL(); ++ ret = (meth->dsa_keygen)(dsa); ++ } ++ return ret; ++} ++ ++ ++ + static DSA_METHOD cryptodev_dsa = { + "cryptodev DSA method", + NULL, +@@ -1490,12 +1766,543 @@ static DSA_METHOD cryptodev_dsa = { + NULL /* app_data */ + }; + +-static int +-cryptodev_mod_exp_dh(const DH *dh, BIGNUM *r, const BIGNUM *a, +- const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx, +- BN_MONT_CTX *m_ctx) ++static ECDSA_METHOD cryptodev_ecdsa = { ++ "cryptodev ECDSA method", ++ NULL, ++ NULL, /* ecdsa_sign_setup */ ++ NULL, ++ NULL, ++ 0, /* flags */ ++ NULL /* app_data */ ++}; ++ ++typedef enum ec_curve_s ++{ ++ EC_PRIME, ++ EC_BINARY ++} ec_curve_t; ++ ++/* ENGINE handler for ECDSA Sign */ ++static ECDSA_SIG *cryptodev_ecdsa_do_sign( const unsigned char *dgst, ++ int dgst_len, const BIGNUM *in_kinv, const BIGNUM *in_r, EC_KEY *eckey) + { +- return (cryptodev_bn_mod_exp(r, a, p, m, ctx, m_ctx)); ++ BIGNUM *m = NULL, *p = NULL, *a = NULL; ++ BIGNUM *b = NULL, *x = NULL, *y = NULL; ++ BN_CTX *ctx = NULL; ++ ECDSA_SIG *ret = NULL; ++ ECDSA_DATA *ecdsa = NULL; ++ unsigned char * q = NULL, *r = NULL, *ab = NULL, *g_xy = NULL; ++ unsigned char * s = NULL, *c = NULL, *d = NULL, *f = NULL, *tmp_dgst = NULL; ++ int i = 0, q_len = 0, priv_key_len = 0, r_len = 0; ++ int g_len = 0, d_len = 0, ab_len = 0; ++ const BIGNUM *order = NULL, *priv_key=NULL; ++ const EC_GROUP *group = NULL; ++ struct crypt_kop kop; ++ ec_curve_t ec_crv = EC_PRIME; ++ ++ memset(&kop, 0, sizeof(kop)); ++ ecdsa = ecdsa_check(eckey); ++ if (!ecdsa) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_PASSED_NULL_PARAMETER); ++ return NULL; ++ } ++ ++ group = EC_KEY_get0_group(eckey); ++ priv_key = EC_KEY_get0_private_key(eckey); ++ ++ if (!group || !priv_key) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_PASSED_NULL_PARAMETER); ++ return NULL; ++ } ++ ++ if ((ctx = BN_CTX_new()) == NULL || (m = BN_new()) == NULL || ++ (a = BN_new()) == NULL || (b = BN_new()) == NULL || ++ (p = BN_new()) == NULL || (x = BN_new()) == NULL || ++ (y = BN_new()) == NULL) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ ++ order = &group->order; ++ if (!order || BN_is_zero(order)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ECDSA_R_MISSING_PARAMETERS); ++ goto err; ++ } ++ ++ i = BN_num_bits(order); ++ /* Need to truncate digest if it is too long: first truncate whole ++ bytes */ ++ if (8 * dgst_len > i) ++ dgst_len = (i + 7)/8; ++ ++ if (!BN_bin2bn(dgst, dgst_len, m)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_BN_LIB); ++ goto err; ++ } ++ ++ /* If still too long truncate remaining bits with a shift */ ++ if ((8 * dgst_len > i) && !BN_rshift(m, m, 8 - (i & 0x7))) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_BN_LIB); ++ goto err; ++ } ++ ++ /* copy the truncated bits into plain buffer */ ++ if (spcf_bn2bin(m, &tmp_dgst, &dgst_len)) { ++ fprintf(stderr, "%s:%d: OPENSSL_malloc failec\n", __FUNCTION__, __LINE__); ++ goto err; ++ } ++ ++ ret = ECDSA_SIG_new(); ++ if (!ret) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_BN_LIB); ++ goto err; ++ } ++ ++ /* check if this is prime or binary EC request */ ++ if (EC_METHOD_get_field_type(EC_GROUP_method_of(group)) == NID_X9_62_prime_field) { ++ ec_crv = EC_PRIME; ++ /* get the generator point pair */ ++ if (!EC_POINT_get_affine_coordinates_GFp (group, EC_GROUP_get0_generator(group), ++ x, y,ctx)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_EC_LIB); ++ goto err; ++ } ++ ++ /* get the ECC curve parameters */ ++ if (!EC_GROUP_get_curve_GFp(group, p, a, b , ctx)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_EC_LIB); ++ goto err; ++ } ++ } else if (EC_METHOD_get_field_type(EC_GROUP_method_of(group)) == NID_X9_62_characteristic_two_field) { ++ ec_crv = EC_BINARY; ++ /* get the ECC curve parameters */ ++ if (!EC_GROUP_get_curve_GF2m(group, p, a, b , ctx)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_EC_LIB); ++ goto err; ++ } ++ ++ /* get the generator point pair */ ++ if (!EC_POINT_get_affine_coordinates_GF2m(group, ++ EC_GROUP_get0_generator(group), x, y,ctx)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_EC_LIB); ++ goto err; ++ } ++ } else { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_EC_LIB); ++ goto err; ++ } ++ ++ if (spcf_bn2bin(order, &r, &r_len)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ ++ if (spcf_bn2bin(p, &q, &q_len)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ ++ priv_key_len = r_len; ++ ++ /** ++ * If BN_num_bytes of priv_key returns less then r_len then ++ * add padding bytes before the key ++ */ ++ if (spcf_bn2bin_ex(priv_key, &s, &priv_key_len)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ ++ /* Generation of ECC curve parameters */ ++ ab_len = 2*q_len; ++ ab = eng_copy_curve_points(a, b, ab_len, q_len); ++ if (!ab) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ ++ if (ec_crv == EC_BINARY) { ++ if (eng_ec_get_cparam(EC_GROUP_get_curve_name(group), ab+q_len, q_len)) ++ { ++ unsigned char *c_temp = NULL; ++ int c_temp_len = q_len; ++ if (eng_ec_compute_cparam(b, p, &c_temp, &c_temp_len)) ++ memcpy(ab+q_len, c_temp, q_len); ++ else ++ goto err; ++ } ++ kop.curve_type = ECC_BINARY; ++ } ++ ++ /* Calculation of Generator point */ ++ g_len = 2*q_len; ++ g_xy = eng_copy_curve_points(x, y, g_len, q_len); ++ if (!g_xy) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ ++ /* Memory allocation for first part of digital signature */ ++ c = malloc(r_len); ++ if (!c) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ ++ d_len = r_len; ++ ++ /* Memory allocation for second part of digital signature */ ++ d = malloc(d_len); ++ if (!d) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ ++ /* memory for message representative */ ++ f = malloc(r_len); ++ if (!f) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ ++ /* Add padding, since SEC expects hash to of size r_len */ ++ memset(f, 0, r_len - dgst_len); ++ ++ /* Skip leading bytes if dgst_len < r_len */ ++ memcpy(f + r_len - dgst_len, tmp_dgst, dgst_len); ++ ++ dgst_len += r_len - dgst_len; ++ kop.crk_op = CRK_DSA_SIGN; ++ /* inputs: dgst dsa->p dsa->q dsa->g dsa->priv_key */ ++ kop.crk_param[0].crp_p = f; ++ kop.crk_param[0].crp_nbits = dgst_len * 8; ++ kop.crk_param[1].crp_p = q; ++ kop.crk_param[1].crp_nbits = q_len * 8; ++ kop.crk_param[2].crp_p = r; ++ kop.crk_param[2].crp_nbits = r_len * 8; ++ kop.crk_param[3].crp_p = g_xy; ++ kop.crk_param[3].crp_nbits = g_len * 8; ++ kop.crk_param[4].crp_p = s; ++ kop.crk_param[4].crp_nbits = priv_key_len * 8; ++ kop.crk_param[5].crp_p = ab; ++ kop.crk_param[5].crp_nbits = ab_len * 8; ++ kop.crk_iparams = 6; ++ kop.crk_param[6].crp_p = c; ++ kop.crk_param[6].crp_nbits = d_len * 8; ++ kop.crk_param[7].crp_p = d; ++ kop.crk_param[7].crp_nbits = d_len * 8; ++ kop.crk_oparams = 2; ++ ++ if (cryptodev_asym(&kop, 0, NULL, 0, NULL) == 0) { ++ /* Check if ret->r and s needs to allocated */ ++ crparam2bn(&kop.crk_param[6], ret->r); ++ crparam2bn(&kop.crk_param[7], ret->s); ++ } else { ++ const ECDSA_METHOD *meth = ECDSA_OpenSSL(); ++ ret = (meth->ecdsa_do_sign)(dgst, dgst_len, in_kinv, in_r, eckey); ++ } ++ kop.crk_param[0].crp_p = NULL; ++ zapparams(&kop); ++err: ++ if (!ret) { ++ ECDSA_SIG_free(ret); ++ ret = NULL; ++ } ++ return ret; ++} ++ ++static int cryptodev_ecdsa_verify(const unsigned char *dgst, int dgst_len, ++ ECDSA_SIG *sig, EC_KEY *eckey) ++{ ++ BIGNUM *m = NULL, *p = NULL, *a = NULL, *b = NULL; ++ BIGNUM *x = NULL, *y = NULL, *w_x = NULL, *w_y = NULL; ++ BN_CTX *ctx = NULL; ++ ECDSA_DATA *ecdsa = NULL; ++ unsigned char *q = NULL, *r = NULL, *ab = NULL, *g_xy = NULL, *w_xy = NULL; ++ unsigned char *c = NULL, *d = NULL, *f = NULL, *tmp_dgst = NULL; ++ int i = 0, q_len = 0, pub_key_len = 0, r_len = 0, c_len = 0, g_len = 0; ++ int d_len = 0, ab_len = 0, ret = -1; ++ const EC_POINT *pub_key = NULL; ++ const BIGNUM *order = NULL; ++ const EC_GROUP *group=NULL; ++ ec_curve_t ec_crv = EC_PRIME; ++ struct crypt_kop kop; ++ ++ memset(&kop, 0, sizeof kop); ++ ecdsa = ecdsa_check(eckey); ++ if (!ecdsa) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_PASSED_NULL_PARAMETER); ++ return ret; ++ } ++ ++ group = EC_KEY_get0_group(eckey); ++ pub_key = EC_KEY_get0_public_key(eckey); ++ ++ if (!group || !pub_key) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_PASSED_NULL_PARAMETER); ++ return ret; ++ } ++ ++ if ((ctx = BN_CTX_new()) == NULL || (m = BN_new()) == NULL || ++ (a = BN_new()) == NULL || (b = BN_new()) == NULL || ++ (p = BN_new()) == NULL || (x = BN_new()) == NULL || ++ (y = BN_new()) == NULL || (w_x = BN_new()) == NULL || ++ (w_y = BN_new()) == NULL) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ ++ order = &group->order; ++ if (!order || BN_is_zero(order)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ECDSA_R_MISSING_PARAMETERS); ++ goto err; ++ } ++ ++ i = BN_num_bits(order); ++ /* Need to truncate digest if it is too long: first truncate whole ++ * bytes */ ++ if (8 * dgst_len > i) ++ dgst_len = (i + 7)/8; ++ ++ if (!BN_bin2bn(dgst, dgst_len, m)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_BN_LIB); ++ goto err; ++ } ++ ++ /* If still too long truncate remaining bits with a shift */ ++ if ((8 * dgst_len > i) && !BN_rshift(m, m, 8 - (i & 0x7))) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_BN_LIB); ++ goto err; ++ } ++ /* copy the truncated bits into plain buffer */ ++ if (spcf_bn2bin(m, &tmp_dgst, &dgst_len)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ ++ /* check if this is prime or binary EC request */ ++ if (EC_METHOD_get_field_type(EC_GROUP_method_of(group)) == NID_X9_62_prime_field) { ++ ec_crv = EC_PRIME; ++ ++ /* get the generator point pair */ ++ if (!EC_POINT_get_affine_coordinates_GFp (group, ++ EC_GROUP_get0_generator(group), x, y,ctx)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_EC_LIB); ++ goto err; ++ } ++ ++ /* get the public key pair for prime curve */ ++ if (!EC_POINT_get_affine_coordinates_GFp (group, ++ pub_key, w_x, w_y,ctx)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_EC_LIB); ++ goto err; ++ } ++ ++ /* get the ECC curve parameters */ ++ if (!EC_GROUP_get_curve_GFp(group, p, a, b, ctx)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_EC_LIB); ++ goto err; ++ } ++ } else if (EC_METHOD_get_field_type(EC_GROUP_method_of(group)) == NID_X9_62_characteristic_two_field){ ++ ec_crv = EC_BINARY; ++ /* get the ECC curve parameters */ ++ if (!EC_GROUP_get_curve_GF2m(group, p, a, b , ctx)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_EC_LIB); ++ goto err; ++ } ++ ++ /* get the generator point pair */ ++ if (!EC_POINT_get_affine_coordinates_GF2m(group, ++ EC_GROUP_get0_generator(group),x, y,ctx)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_EC_LIB); ++ goto err; ++ } ++ ++ /* get the public key pair for binary curve */ ++ if (!EC_POINT_get_affine_coordinates_GF2m(group, ++ pub_key, w_x, w_y,ctx)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_EC_LIB); ++ goto err; ++ } ++ }else { ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_EC_LIB); ++ goto err; ++ } ++ ++ /* Get the order of the subgroup of private keys */ ++ if (spcf_bn2bin((BIGNUM*)order, &r, &r_len)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ ++ /* Get the irreducible polynomial that creates the field */ ++ if (spcf_bn2bin(p, &q, &q_len)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ ++ /* Get the public key into a flat buffer with appropriate padding */ ++ pub_key_len = 2 * q_len; ++ ++ w_xy = eng_copy_curve_points (w_x, w_y, pub_key_len, q_len); ++ if (!w_xy) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ ++ /* Generation of ECC curve parameters */ ++ ab_len = 2*q_len; ++ ++ ab = eng_copy_curve_points (a, b, ab_len, q_len); ++ if (!ab) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ ++ if (ec_crv == EC_BINARY) { ++ /* copy b' i.e c(b), instead of only b */ ++ if (eng_ec_get_cparam(EC_GROUP_get_curve_name(group), ab+q_len, q_len)) ++ { ++ unsigned char *c_temp = NULL; ++ int c_temp_len = q_len; ++ if (eng_ec_compute_cparam(b, p, &c_temp, &c_temp_len)) ++ memcpy(ab+q_len, c_temp, q_len); ++ else ++ goto err; ++ } ++ kop.curve_type = ECC_BINARY; ++ } ++ ++ /* Calculation of Generator point */ ++ g_len = 2 * q_len; ++ ++ g_xy = eng_copy_curve_points (x, y, g_len, q_len); ++ if (!g_xy) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ ++ /** ++ * Get the 1st part of signature into a flat buffer with ++ * appropriate padding ++ */ ++ if (BN_num_bytes(sig->r) < r_len) ++ c_len = r_len; ++ ++ if (spcf_bn2bin_ex(sig->r, &c, &c_len)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ ++ /** ++ * Get the 2nd part of signature into a flat buffer with ++ * appropriate padding ++ */ ++ if (BN_num_bytes(sig->s) < r_len) ++ d_len = r_len; ++ ++ if (spcf_bn2bin_ex(sig->s, &d, &d_len)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ ++ /* memory for message representative */ ++ f = malloc(r_len); ++ if (!f) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ ++ /* Add padding, since SEC expects hash to of size r_len */ ++ memset(f, 0, r_len-dgst_len); ++ ++ /* Skip leading bytes if dgst_len < r_len */ ++ memcpy(f + r_len-dgst_len, tmp_dgst, dgst_len); ++ dgst_len += r_len-dgst_len; ++ kop.crk_op = CRK_DSA_VERIFY; ++ /* inputs: dgst dsa->p dsa->q dsa->g dsa->priv_key */ ++ kop.crk_param[0].crp_p = f; ++ kop.crk_param[0].crp_nbits = dgst_len * 8; ++ kop.crk_param[1].crp_p = q; ++ kop.crk_param[1].crp_nbits = q_len * 8; ++ kop.crk_param[2].crp_p = r; ++ kop.crk_param[2].crp_nbits = r_len * 8; ++ kop.crk_param[3].crp_p = g_xy; ++ kop.crk_param[3].crp_nbits = g_len * 8; ++ kop.crk_param[4].crp_p = w_xy; ++ kop.crk_param[4].crp_nbits = pub_key_len * 8; ++ kop.crk_param[5].crp_p = ab; ++ kop.crk_param[5].crp_nbits = ab_len * 8; ++ kop.crk_param[6].crp_p = c; ++ kop.crk_param[6].crp_nbits = d_len * 8; ++ kop.crk_param[7].crp_p = d; ++ kop.crk_param[7].crp_nbits = d_len * 8; ++ kop.crk_iparams = 8; ++ ++ if (cryptodev_asym(&kop, 0, NULL, 0, NULL) == 0) { ++ /*OCF success value is 0, if not zero, change ret to fail*/ ++ if(0 == kop.crk_status) ++ ret = 1; ++ } else { ++ const ECDSA_METHOD *meth = ECDSA_OpenSSL(); ++ ++ ret = (meth->ecdsa_do_verify)(dgst, dgst_len, sig, eckey); ++ } ++ kop.crk_param[0].crp_p = NULL; ++ zapparams(&kop); ++ ++err: ++ return ret; ++} ++ ++static int cryptodev_dh_keygen(DH *dh) ++{ ++ struct crypt_kop kop; ++ int ret = 1, g_len; ++ unsigned char *g = NULL; ++ ++ if (dh->priv_key == NULL) { ++ if ((dh->priv_key=BN_new()) == NULL) ++ goto sw_try; ++ } ++ ++ if (dh->pub_key == NULL) { ++ if ((dh->pub_key=BN_new()) == NULL) ++ goto sw_try; ++ } ++ ++ g_len = BN_num_bytes(dh->p); ++ /** ++ * Get generator into a plain buffer. If length is less than ++ * q_len then add leading padding bytes. ++ */ ++ if (spcf_bn2bin_ex(dh->g, &g, &g_len)) { ++ DSAerr(DH_F_DH_GENERATE_KEY, ERR_R_MALLOC_FAILURE); ++ goto sw_try; ++ } ++ ++ memset(&kop, 0, sizeof kop); ++ kop.crk_op = CRK_DH_GENERATE_KEY; ++ if (bn2crparam(dh->p, &kop.crk_param[0])) ++ goto sw_try; ++ if (bn2crparam(dh->q, &kop.crk_param[1])) ++ goto sw_try; ++ kop.crk_param[2].crp_p = g; ++ kop.crk_param[2].crp_nbits = g_len * 8; ++ kop.crk_iparams = 3; ++ ++ /* pub_key is or prime length while priv key is of length of order */ ++ if (cryptodev_asym(&kop, BN_num_bytes(dh->p), dh->pub_key, ++ BN_num_bytes(dh->q), dh->priv_key)) ++ goto sw_try; ++ ++ return ret; ++sw_try: ++ { ++ const DH_METHOD *meth = DH_OpenSSL(); ++ ret = (meth->generate_key)(dh); ++ } ++ return ret; + } + + static int +@@ -1503,43 +2310,234 @@ cryptodev_dh_compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh) + { + struct crypt_kop kop; + int dhret = 1; +- int fd, keylen; ++ int fd, p_len; ++ BIGNUM *temp = NULL; ++ unsigned char *padded_pub_key = NULL, *p = NULL; ++ ++ if ((fd = get_asym_dev_crypto()) < 0) ++ goto sw_try; ++ ++ memset(&kop, 0, sizeof kop); ++ kop.crk_op = CRK_DH_COMPUTE_KEY; ++ /* inputs: dh->priv_key pub_key dh->p key */ ++ spcf_bn2bin(dh->p, &p, &p_len); ++ spcf_bn2bin_ex(pub_key, &padded_pub_key, &p_len); ++ if (bn2crparam(dh->priv_key, &kop.crk_param[0])) ++ goto sw_try; ++ ++ kop.crk_param[1].crp_p = padded_pub_key; ++ kop.crk_param[1].crp_nbits = p_len * 8; ++ kop.crk_param[2].crp_p = p; ++ kop.crk_param[2].crp_nbits = p_len * 8; ++ kop.crk_iparams = 3; ++ kop.crk_param[3].crp_p = (void*) key; ++ kop.crk_param[3].crp_nbits = p_len * 8; ++ kop.crk_oparams = 1; ++ dhret = p_len; ++ ++ if (ioctl(fd, CIOCKEY, &kop)) ++ goto sw_try; + +- if ((fd = get_asym_dev_crypto()) < 0) { ++ if ((temp = BN_new())) { ++ if (!BN_bin2bn(key, p_len, temp)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_BN_LIB); ++ goto sw_try; ++ } ++ if (dhret > BN_num_bytes(temp)) ++ dhret=BN_bn2bin(temp,key); ++ BN_free(temp); ++ } ++ ++ kop.crk_param[3].crp_p = NULL; ++ zapparams(&kop); ++ return (dhret); ++sw_try: ++ { + const DH_METHOD *meth = DH_OpenSSL(); + +- return ((meth->compute_key)(key, pub_key, dh)); ++ dhret = (meth->compute_key)(key, pub_key, dh); + } ++ return (dhret); ++} + +- keylen = BN_num_bits(dh->p); ++int cryptodev_ecdh_compute_key(void *out, size_t outlen, ++ const EC_POINT *pub_key, EC_KEY *ecdh, void *(*KDF)(const void *in, size_t inlen, ++ void *out, size_t *outlen)) ++{ ++ ec_curve_t ec_crv = EC_PRIME; ++ unsigned char * q = NULL, *w_xy = NULL, *ab = NULL, *s = NULL, *r = NULL; ++ BIGNUM * w_x = NULL, *w_y = NULL; ++ int q_len = 0, ab_len = 0, pub_key_len = 0, r_len = 0, priv_key_len = 0; ++ BIGNUM * p = NULL, *a = NULL, *b = NULL; ++ BN_CTX *ctx; ++ EC_POINT *tmp=NULL; ++ BIGNUM *x=NULL, *y=NULL; ++ const BIGNUM *priv_key; ++ const EC_GROUP* group = NULL; ++ int ret = -1; ++ size_t buflen, len; ++ struct crypt_kop kop; + + memset(&kop, 0, sizeof kop); +- kop.crk_op = CRK_DH_COMPUTE_KEY; + +- /* inputs: dh->priv_key pub_key dh->p key */ +- if (bn2crparam(dh->priv_key, &kop.crk_param[0])) ++ if ((ctx = BN_CTX_new()) == NULL) goto err; ++ BN_CTX_start(ctx); ++ x = BN_CTX_get(ctx); ++ y = BN_CTX_get(ctx); ++ p = BN_CTX_get(ctx); ++ a = BN_CTX_get(ctx); ++ b = BN_CTX_get(ctx); ++ w_x = BN_CTX_get(ctx); ++ w_y = BN_CTX_get(ctx); ++ ++ if (!x || !y || !p || !a || !b || !w_x || !w_y) { ++ ECDHerr(ECDH_F_ECDH_COMPUTE_KEY,ERR_R_MALLOC_FAILURE); + goto err; +- if (bn2crparam(pub_key, &kop.crk_param[1])) ++ } ++ ++ priv_key = EC_KEY_get0_private_key(ecdh); ++ if (priv_key == NULL) { ++ ECDHerr(ECDH_F_ECDH_COMPUTE_KEY,ECDH_R_NO_PRIVATE_VALUE); + goto err; +- if (bn2crparam(dh->p, &kop.crk_param[2])) ++ } ++ ++ group = EC_KEY_get0_group(ecdh); ++ if ((tmp=EC_POINT_new(group)) == NULL) { ++ ECDHerr(ECDH_F_ECDH_COMPUTE_KEY,ERR_R_MALLOC_FAILURE); + goto err; +- kop.crk_iparams = 3; ++ } + +- kop.crk_param[3].crp_p = (caddr_t) key; +- kop.crk_param[3].crp_nbits = keylen * 8; +- kop.crk_oparams = 1; ++ if (EC_METHOD_get_field_type(EC_GROUP_method_of(group)) == ++ NID_X9_62_prime_field) { ++ ec_crv = EC_PRIME; + +- if (ioctl(fd, CIOCKEY, &kop) == -1) { +- const DH_METHOD *meth = DH_OpenSSL(); ++ if (!EC_POINT_get_affine_coordinates_GFp(group, ++ EC_GROUP_get0_generator(group), x, y, ctx)) { ++ ECDHerr(ECDH_F_ECDH_COMPUTE_KEY,ECDH_R_POINT_ARITHMETIC_FAILURE); ++ goto err; ++ } + +- dhret = (meth->compute_key)(key, pub_key, dh); ++ /* get the ECC curve parameters */ ++ if (!EC_GROUP_get_curve_GFp(group, p, a, b, ctx)) { ++ ECDHerr(ECDH_F_ECDH_COMPUTE_KEY,ERR_R_BN_LIB); ++ goto err; ++ } ++ ++ /* get the public key pair for prime curve */ ++ if (!EC_POINT_get_affine_coordinates_GFp (group, pub_key, w_x, w_y,ctx)) { ++ ECDHerr(ECDH_F_ECDH_COMPUTE_KEY,ERR_R_BN_LIB); ++ goto err; ++ } ++ } else { ++ ec_crv = EC_BINARY; ++ ++ if (!EC_POINT_get_affine_coordinates_GF2m(group, ++ EC_GROUP_get0_generator(group), x, y, ctx)) { ++ ECDHerr(ECDH_F_ECDH_COMPUTE_KEY,ECDH_R_POINT_ARITHMETIC_FAILURE); ++ goto err; ++ } ++ ++ /* get the ECC curve parameters */ ++ if (!EC_GROUP_get_curve_GF2m(group, p, a, b , ctx)) { ++ ECDHerr(ECDH_F_ECDH_COMPUTE_KEY,ERR_R_BN_LIB); ++ goto err; ++ } ++ ++ /* get the public key pair for binary curve */ ++ if (!EC_POINT_get_affine_coordinates_GF2m(group, ++ pub_key, w_x, w_y,ctx)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_EC_LIB); ++ goto err; ++ } ++ } ++ ++ /* irreducible polynomial that creates the field */ ++ if (spcf_bn2bin((BIGNUM*)&group->order, &r, &r_len)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ ++ /* Get the irreducible polynomial that creates the field */ ++ if (spcf_bn2bin(p, &q, &q_len)) { ++ ECDHerr(ECDH_F_ECDH_COMPUTE_KEY,ERR_R_BN_LIB); ++ goto err; + } ++ ++ /* Get the public key into a flat buffer with appropriate padding */ ++ pub_key_len = 2 * q_len; ++ w_xy = eng_copy_curve_points (w_x, w_y, pub_key_len, q_len); ++ if (!w_xy) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ ++ /* Generation of ECC curve parameters */ ++ ab_len = 2*q_len; ++ ab = eng_copy_curve_points (a, b, ab_len, q_len); ++ if (!ab) { ++ ECDHerr(ECDH_F_ECDH_COMPUTE_KEY,ERR_R_BN_LIB); ++ goto err; ++ } ++ ++ if (ec_crv == EC_BINARY) { ++ /* copy b' i.e c(b), instead of only b */ ++ if (eng_ec_get_cparam(EC_GROUP_get_curve_name(group), ab+q_len, q_len)) ++ { ++ unsigned char *c_temp = NULL; ++ int c_temp_len = q_len; ++ if (eng_ec_compute_cparam(b, p, &c_temp, &c_temp_len)) ++ memcpy(ab+q_len, c_temp, q_len); ++ else ++ goto err; ++ } ++ kop.curve_type = ECC_BINARY; ++ } else ++ kop.curve_type = ECC_PRIME; ++ ++ priv_key_len = r_len; ++ ++ /* ++ * If BN_num_bytes of priv_key returns less then r_len then ++ * add padding bytes before the key ++ */ ++ if (spcf_bn2bin_ex((BIGNUM *)priv_key, &s, &priv_key_len)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ ++ buflen = (EC_GROUP_get_degree(group) + 7)/8; ++ len = BN_num_bytes(x); ++ if (len > buflen || q_len < buflen) { ++ ECDHerr(ECDH_F_ECDH_COMPUTE_KEY,ERR_R_INTERNAL_ERROR); ++ goto err; ++ } ++ ++ kop.crk_op = CRK_DH_COMPUTE_KEY; ++ kop.crk_param[0].crp_p = (void*) s; ++ kop.crk_param[0].crp_nbits = priv_key_len*8; ++ kop.crk_param[1].crp_p = (void*) w_xy; ++ kop.crk_param[1].crp_nbits = pub_key_len*8; ++ kop.crk_param[2].crp_p = (void*) q; ++ kop.crk_param[2].crp_nbits = q_len*8; ++ kop.crk_param[3].crp_p = (void*) ab; ++ kop.crk_param[3].crp_nbits = ab_len*8; ++ kop.crk_iparams = 4; ++ kop.crk_param[4].crp_p = (void*) out; ++ kop.crk_param[4].crp_nbits = q_len*8; ++ kop.crk_oparams = 1; ++ ret = q_len; ++ if (cryptodev_asym(&kop, 0, NULL, 0, NULL)) { ++ const ECDH_METHOD *meth = ECDH_OpenSSL(); ++ ret = (meth->compute_key)(out, outlen, pub_key, ecdh, KDF); ++ } else ++ ret = q_len; + err: +- kop.crk_param[3].crp_p = NULL; ++ kop.crk_param[4].crp_p = NULL; + zapparams(&kop); +- return (dhret); ++ return ret; + } + ++ + static DH_METHOD cryptodev_dh = { + "cryptodev DH method", + NULL, /* cryptodev_dh_generate_key */ +@@ -1551,6 +2549,14 @@ static DH_METHOD cryptodev_dh = { + NULL /* app_data */ + }; + ++static ECDH_METHOD cryptodev_ecdh = { ++ "cryptodev ECDH method", ++ NULL, /* cryptodev_ecdh_compute_key */ ++ NULL, ++ 0, /* flags */ ++ NULL /* app_data */ ++}; ++ + /* + * ctrl right now is just a wrapper that doesn't do much + * but I expect we'll want some options soon. +@@ -1634,25 +2640,42 @@ ENGINE_load_cryptodev(void) + memcpy(&cryptodev_dsa, meth, sizeof(DSA_METHOD)); + if (cryptodev_asymfeat & CRF_DSA_SIGN) + cryptodev_dsa.dsa_do_sign = cryptodev_dsa_do_sign; +- if (cryptodev_asymfeat & CRF_MOD_EXP) { +- cryptodev_dsa.bn_mod_exp = cryptodev_dsa_bn_mod_exp; +- cryptodev_dsa.dsa_mod_exp = cryptodev_dsa_dsa_mod_exp; +- } + if (cryptodev_asymfeat & CRF_DSA_VERIFY) + cryptodev_dsa.dsa_do_verify = cryptodev_dsa_verify; ++ if (cryptodev_asymfeat & CRF_DSA_GENERATE_KEY) ++ cryptodev_dsa.dsa_keygen = cryptodev_dsa_keygen; + } + + if (ENGINE_set_DH(engine, &cryptodev_dh)){ + const DH_METHOD *dh_meth = DH_OpenSSL(); ++ memcpy(&cryptodev_dh, dh_meth, sizeof(DH_METHOD)); ++ if (cryptodev_asymfeat & CRF_DH_COMPUTE_KEY) { ++ cryptodev_dh.compute_key = ++ cryptodev_dh_compute_key; ++ } ++ if (cryptodev_asymfeat & CRF_DH_GENERATE_KEY) { ++ cryptodev_dh.generate_key = ++ cryptodev_dh_keygen; ++ } ++ } + +- cryptodev_dh.generate_key = dh_meth->generate_key; +- cryptodev_dh.compute_key = dh_meth->compute_key; +- cryptodev_dh.bn_mod_exp = dh_meth->bn_mod_exp; +- if (cryptodev_asymfeat & CRF_MOD_EXP) { +- cryptodev_dh.bn_mod_exp = cryptodev_mod_exp_dh; +- if (cryptodev_asymfeat & CRF_DH_COMPUTE_KEY) +- cryptodev_dh.compute_key = +- cryptodev_dh_compute_key; ++ if (ENGINE_set_ECDSA(engine, &cryptodev_ecdsa)) { ++ const ECDSA_METHOD *meth = ECDSA_OpenSSL(); ++ memcpy(&cryptodev_ecdsa, meth, sizeof(ECDSA_METHOD)); ++ if (cryptodev_asymfeat & CRF_DSA_SIGN) { ++ cryptodev_ecdsa.ecdsa_do_sign = cryptodev_ecdsa_do_sign; ++ } ++ if (cryptodev_asymfeat & CRF_DSA_VERIFY) { ++ cryptodev_ecdsa.ecdsa_do_verify = ++ cryptodev_ecdsa_verify; ++ } ++ } ++ ++ if (ENGINE_set_ECDH(engine, &cryptodev_ecdh)) { ++ const ECDH_METHOD *ecdh_meth = ECDH_OpenSSL(); ++ memcpy(&cryptodev_ecdh, ecdh_meth, sizeof(ECDH_METHOD)); ++ if (cryptodev_asymfeat & CRF_DH_COMPUTE_KEY) { ++ cryptodev_ecdh.compute_key = cryptodev_ecdh_compute_key; + } + } + +-- +1.8.3.1 + diff --git a/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0009-Added-hwrng-dev-file-as-source-of-RNG.patch b/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0009-Added-hwrng-dev-file-as-source-of-RNG.patch new file mode 100644 index 00000000..6a69c324 --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0009-Added-hwrng-dev-file-as-source-of-RNG.patch @@ -0,0 +1,28 @@ +From 81c4c62a4f5f5542843381bfb34e39a6171d5cdd Mon Sep 17 00:00:00 2001 +From: Yashpal Dutta +Date: Tue, 11 Mar 2014 06:42:59 +0545 +Subject: [PATCH 09/17] Added hwrng dev file as source of RNG + +Upstream-status: Pending + +Signed-off-by: Yashpal Dutta +--- + e_os.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/e_os.h b/e_os.h +index 6a0aad1..57c0563 100644 +--- a/e_os.h ++++ b/e_os.h +@@ -79,7 +79,7 @@ extern "C" { + #ifndef DEVRANDOM + /* set this to a comma-separated list of 'random' device files to try out. + * My default, we will try to read at least one of these files */ +-#define DEVRANDOM "/dev/urandom","/dev/random","/dev/srandom" ++#define DEVRANDOM "/dev/hwrng","/dev/urandom","/dev/random","/dev/srandom" + #endif + #ifndef DEVRANDOM_EGD + /* set this to a comma-seperated list of 'egd' sockets to try out. These +-- +1.8.3.1 + diff --git a/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0009-eng_cryptodev-extend-TLS-offload-with-new-algorithms.patch b/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0009-eng_cryptodev-extend-TLS-offload-with-new-algorithms.patch deleted file mode 100644 index a4178841..00000000 --- a/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0009-eng_cryptodev-extend-TLS-offload-with-new-algorithms.patch +++ /dev/null @@ -1,106 +0,0 @@ -From 6555c11c9f62fc37c60bb335cfeb5c9d641e493a Mon Sep 17 00:00:00 2001 -From: Cristian Stoica -Date: Fri, 21 Mar 2014 16:22:27 +0200 -Subject: [PATCH][fsl 09/15] eng_cryptodev: extend TLS offload with new - algorithms - -Upstream-status: Pending - -- aes-192-cbc-hmac-sha1 -- aes-256-cbc-hmac-sha1 - -Signed-off-by: Cristian Stoica ---- - crypto/engine/eng_cryptodev.c | 41 +++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 41 insertions(+) - -diff --git a/crypto/engine/eng_cryptodev.c b/crypto/engine/eng_cryptodev.c -index c5e8fb3..e2d4c53 100644 ---- a/crypto/engine/eng_cryptodev.c -+++ b/crypto/engine/eng_cryptodev.c -@@ -248,6 +248,8 @@ static struct { - { CRYPTO_CAST_CBC, NID_cast5_cbc, 8, 16, 0}, - { CRYPTO_SKIPJACK_CBC, NID_undef, 0, 0, 0}, - { CRYPTO_TLS10_AES_CBC_HMAC_SHA1, NID_aes_128_cbc_hmac_sha1, 16, 16, 20}, -+ { CRYPTO_TLS10_AES_CBC_HMAC_SHA1, NID_aes_192_cbc_hmac_sha1, 16, 24, 20}, -+ { CRYPTO_TLS10_AES_CBC_HMAC_SHA1, NID_aes_256_cbc_hmac_sha1, 16, 32, 20}, - { 0, NID_undef, 0, 0, 0}, - }; - -@@ -536,6 +538,8 @@ static int cryptodev_aead_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, - /* TODO: make a seamless integration with cryptodev flags */ - switch (ctx->cipher->nid) { - case NID_aes_128_cbc_hmac_sha1: -+ case NID_aes_192_cbc_hmac_sha1: -+ case NID_aes_256_cbc_hmac_sha1: - cryp.flags = COP_FLAG_AEAD_TLS_TYPE; - } - cryp.ses = sess->ses; -@@ -729,6 +733,8 @@ static int cryptodev_cbc_hmac_sha1_ctrl(EVP_CIPHER_CTX *ctx, int type, int arg, - /* TODO: this should be an extension of EVP_CIPHER struct */ - switch (ctx->cipher->nid) { - case NID_aes_128_cbc_hmac_sha1: -+ case NID_aes_192_cbc_hmac_sha1: -+ case NID_aes_256_cbc_hmac_sha1: - maclen = SHA_DIGEST_LENGTH; - } - -@@ -871,6 +877,33 @@ const EVP_CIPHER cryptodev_aes_128_cbc_hmac_sha1 = { - NULL - }; - -+const EVP_CIPHER cryptodev_aes_192_cbc_hmac_sha1 = { -+ NID_aes_192_cbc_hmac_sha1, -+ 16, 24, 16, -+ EVP_CIPH_CBC_MODE | EVP_CIPH_FLAG_AEAD_CIPHER, -+ cryptodev_init_aead_key, -+ cryptodev_aead_cipher, -+ cryptodev_cleanup, -+ sizeof(struct dev_crypto_state), -+ EVP_CIPHER_set_asn1_iv, -+ EVP_CIPHER_get_asn1_iv, -+ cryptodev_cbc_hmac_sha1_ctrl, -+ NULL -+}; -+ -+const EVP_CIPHER cryptodev_aes_256_cbc_hmac_sha1 = { -+ NID_aes_256_cbc_hmac_sha1, -+ 16, 32, 16, -+ EVP_CIPH_CBC_MODE | EVP_CIPH_FLAG_AEAD_CIPHER, -+ cryptodev_init_aead_key, -+ cryptodev_aead_cipher, -+ cryptodev_cleanup, -+ sizeof(struct dev_crypto_state), -+ EVP_CIPHER_set_asn1_iv, -+ EVP_CIPHER_get_asn1_iv, -+ cryptodev_cbc_hmac_sha1_ctrl, -+ NULL -+}; - /* - * Registered by the ENGINE when used to find out how to deal with - * a particular NID in the ENGINE. this says what we'll do at the -@@ -911,6 +944,12 @@ cryptodev_engine_ciphers(ENGINE *e, const EVP_CIPHER **cipher, - case NID_aes_128_cbc_hmac_sha1: - *cipher = &cryptodev_aes_128_cbc_hmac_sha1; - break; -+ case NID_aes_192_cbc_hmac_sha1: -+ *cipher = &cryptodev_aes_192_cbc_hmac_sha1; -+ break; -+ case NID_aes_256_cbc_hmac_sha1: -+ *cipher = &cryptodev_aes_256_cbc_hmac_sha1; -+ break; - default: - *cipher = NULL; - break; -@@ -3830,6 +3869,8 @@ ENGINE_load_cryptodev(void) - put_dev_crypto(fd); - - EVP_add_cipher(&cryptodev_aes_128_cbc_hmac_sha1); -+ EVP_add_cipher(&cryptodev_aes_192_cbc_hmac_sha1); -+ EVP_add_cipher(&cryptodev_aes_256_cbc_hmac_sha1); - if (!ENGINE_set_id(engine, "cryptodev") || - !ENGINE_set_name(engine, "BSD cryptodev engine") || - !ENGINE_set_ciphers(engine, cryptodev_engine_ciphers) || --- -1.7.9.7 - diff --git a/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0010-Add-RSA-keygen-operation-and-support-gendsa-command-.patch b/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0010-Add-RSA-keygen-operation-and-support-gendsa-command-.patch deleted file mode 100644 index 4eaaeaaa..00000000 --- a/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0010-Add-RSA-keygen-operation-and-support-gendsa-command-.patch +++ /dev/null @@ -1,153 +0,0 @@ -From a08f27a22d2c78f058b63dd2565925ca92ad08b2 Mon Sep 17 00:00:00 2001 -From: Hou Zhiqiang -Date: Wed, 2 Apr 2014 16:10:43 +0800 -Subject: [PATCH][fsl 10/15] Add RSA keygen operation and support gendsa - command with hardware engine - -Upstream-status: Pending - -Signed-off-by: Hou Zhiqiang -Tested-by: Cristian Stoica ---- - crypto/engine/eng_cryptodev.c | 118 +++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 118 insertions(+) - -diff --git a/crypto/engine/eng_cryptodev.c b/crypto/engine/eng_cryptodev.c -index e2d4c53..0a6567c 100644 ---- a/crypto/engine/eng_cryptodev.c -+++ b/crypto/engine/eng_cryptodev.c -@@ -1912,6 +1912,121 @@ err: - return dsaret; - } - -+/* Cryptodev RSA Key Gen routine */ -+static int cryptodev_rsa_keygen(RSA *rsa, int bits, BIGNUM *e, BN_GENCB *cb) -+{ -+ struct crypt_kop kop; -+ int ret, fd; -+ int p_len, q_len; -+ int i; -+ -+ if ((fd = get_asym_dev_crypto()) < 0) -+ return fd; -+ -+ if(!rsa->n && ((rsa->n=BN_new()) == NULL)) goto err; -+ if(!rsa->d && ((rsa->d=BN_new()) == NULL)) goto err; -+ if(!rsa->e && ((rsa->e=BN_new()) == NULL)) goto err; -+ if(!rsa->p && ((rsa->p=BN_new()) == NULL)) goto err; -+ if(!rsa->q && ((rsa->q=BN_new()) == NULL)) goto err; -+ if(!rsa->dmp1 && ((rsa->dmp1=BN_new()) == NULL)) goto err; -+ if(!rsa->dmq1 && ((rsa->dmq1=BN_new()) == NULL)) goto err; -+ if(!rsa->iqmp && ((rsa->iqmp=BN_new()) == NULL)) goto err; -+ -+ BN_copy(rsa->e, e); -+ -+ p_len = (bits+1) / (2 * 8); -+ q_len = (bits - p_len * 8) / 8; -+ memset(&kop, 0, sizeof kop); -+ kop.crk_op = CRK_RSA_GENERATE_KEY; -+ -+ /* p length */ -+ kop.crk_param[kop.crk_iparams].crp_p = calloc(p_len + 1, sizeof(char)); -+ if (!kop.crk_param[kop.crk_iparams].crp_p) -+ goto err; -+ kop.crk_param[kop.crk_iparams].crp_nbits = p_len * 8; -+ memset(kop.crk_param[kop.crk_iparams].crp_p, 0xff, p_len + 1); -+ kop.crk_iparams++; -+ kop.crk_oparams++; -+ /* q length */ -+ kop.crk_param[kop.crk_iparams].crp_p = calloc(q_len + 1, sizeof(char)); -+ if (!kop.crk_param[kop.crk_iparams].crp_p) -+ goto err; -+ kop.crk_param[kop.crk_iparams].crp_nbits = q_len * 8; -+ memset(kop.crk_param[kop.crk_iparams].crp_p, 0xff, q_len + 1); -+ kop.crk_iparams++; -+ kop.crk_oparams++; -+ /* n length */ -+ kop.crk_param[kop.crk_iparams].crp_p = calloc(p_len + q_len + 1, sizeof(char)); -+ if (!kop.crk_param[kop.crk_iparams].crp_p) -+ goto err; -+ kop.crk_param[kop.crk_iparams].crp_nbits = bits; -+ memset(kop.crk_param[kop.crk_iparams].crp_p, 0x00, p_len + q_len + 1); -+ kop.crk_iparams++; -+ kop.crk_oparams++; -+ /* d length */ -+ kop.crk_param[kop.crk_iparams].crp_p = calloc(p_len + q_len + 1, sizeof(char)); -+ if (!kop.crk_param[kop.crk_iparams].crp_p) -+ goto err; -+ kop.crk_param[kop.crk_iparams].crp_nbits = bits; -+ memset(kop.crk_param[kop.crk_iparams].crp_p, 0xff, p_len + q_len + 1); -+ kop.crk_iparams++; -+ kop.crk_oparams++; -+ /* dp1 length */ -+ kop.crk_param[kop.crk_iparams].crp_p = calloc(p_len + 1, sizeof(char)); -+ if (!kop.crk_param[kop.crk_iparams].crp_p) -+ goto err; -+ kop.crk_param[kop.crk_iparams].crp_nbits = p_len * 8; -+ memset(kop.crk_param[kop.crk_iparams].crp_p, 0xff, p_len + 1); -+ kop.crk_iparams++; -+ kop.crk_oparams++; -+ /* dq1 length */ -+ kop.crk_param[kop.crk_iparams].crp_p = calloc(q_len + 1, sizeof(char)); -+ if (!kop.crk_param[kop.crk_iparams].crp_p) -+ goto err; -+ kop.crk_param[kop.crk_iparams].crp_nbits = q_len * 8; -+ memset(kop.crk_param[kop.crk_iparams].crp_p, 0xff, q_len + 1); -+ kop.crk_iparams++; -+ kop.crk_oparams++; -+ /* i length */ -+ kop.crk_param[kop.crk_iparams].crp_p = calloc(p_len + 1, sizeof(char)); -+ if (!kop.crk_param[kop.crk_iparams].crp_p) -+ goto err; -+ kop.crk_param[kop.crk_iparams].crp_nbits = p_len * 8; -+ memset(kop.crk_param[kop.crk_iparams].crp_p, 0xff, p_len + 1); -+ kop.crk_iparams++; -+ kop.crk_oparams++; -+ -+ if (ioctl(fd, CIOCKEY, &kop) == 0) { -+ BN_bin2bn(kop.crk_param[0].crp_p, -+ p_len, rsa->p); -+ BN_bin2bn(kop.crk_param[1].crp_p, -+ q_len, rsa->q); -+ BN_bin2bn(kop.crk_param[2].crp_p, -+ bits / 8, rsa->n); -+ BN_bin2bn(kop.crk_param[3].crp_p, -+ bits / 8, rsa->d); -+ BN_bin2bn(kop.crk_param[4].crp_p, -+ p_len, rsa->dmp1); -+ BN_bin2bn(kop.crk_param[5].crp_p, -+ q_len, rsa->dmq1); -+ BN_bin2bn(kop.crk_param[6].crp_p, -+ p_len, rsa->iqmp); -+ return 1; -+ } -+sw_try: -+ { -+ const RSA_METHOD *meth = RSA_PKCS1_SSLeay(); -+ ret = (meth->rsa_keygen)(rsa, bits, e, cb); -+ } -+ return ret; -+ -+err: -+ for (i = 0; i < CRK_MAXPARAM; i++) -+ free(kop.crk_param[i].crp_p); -+ return 0; -+ -+} -+ - /* Cryptodev DSA Key Gen routine */ - static int cryptodev_dsa_keygen(DSA *dsa) - { -@@ -3905,6 +4020,9 @@ ENGINE_load_cryptodev(void) - cryptodev_rsa.rsa_mod_exp_async = - cryptodev_rsa_nocrt_mod_exp_async; - } -+ if (cryptodev_asymfeat & CRF_RSA_GENERATE_KEY) -+ cryptodev_rsa.rsa_keygen = -+ cryptodev_rsa_keygen; - } - } - --- -1.7.9.7 - diff --git a/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0010-Asynchronous-interface-added-for-PKC-cryptodev-inter.patch b/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0010-Asynchronous-interface-added-for-PKC-cryptodev-inter.patch new file mode 100644 index 00000000..b7702d10 --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0010-Asynchronous-interface-added-for-PKC-cryptodev-inter.patch @@ -0,0 +1,2039 @@ +From a933e6341fd8989bdd82f8a5446b6f04aa00eef9 Mon Sep 17 00:00:00 2001 +From: Yashpal Dutta +Date: Tue, 11 Mar 2014 07:14:30 +0545 +Subject: [PATCH 10/17] Asynchronous interface added for PKC cryptodev + interface + +Upstream-status: Pending + +Signed-off-by: Yashpal Dutta +--- + crypto/crypto.h | 16 + + crypto/dh/dh.h | 4 +- + crypto/dsa/dsa.h | 5 + + crypto/ecdh/ech_locl.h | 3 + + crypto/ecdsa/ecs_locl.h | 5 + + crypto/engine/eng_cryptodev.c | 1578 +++++++++++++++++++++++++++++++++++++---- + crypto/engine/eng_int.h | 24 +- + crypto/engine/eng_lib.c | 46 ++ + crypto/engine/engine.h | 24 + + crypto/rsa/rsa.h | 23 + + 10 files changed, 1582 insertions(+), 146 deletions(-) + +diff --git a/crypto/crypto.h b/crypto/crypto.h +index f92fc51..ce12731 100644 +--- a/crypto/crypto.h ++++ b/crypto/crypto.h +@@ -605,6 +605,22 @@ void ERR_load_CRYPTO_strings(void); + #define CRYPTO_R_FIPS_MODE_NOT_SUPPORTED 101 + #define CRYPTO_R_NO_DYNLOCK_CREATE_CALLBACK 100 + ++/* Additions for Asynchronous PKC Infrastructure */ ++struct pkc_cookie_s { ++ void *cookie; /* To be filled by openssl library primitive method function caller */ ++ void *eng_cookie; /* To be filled by Engine */ ++ /* ++ * Callback handler to be provided by caller. Ensure to pass a ++ * handler which takes the crypto operation to completion. ++ * cookie: Container cookie from library ++ * status: Status of the crypto Job completion. ++ * 0: Job handled without any issue ++ * -EINVAL: Parameters Invalid ++ */ ++ void (*pkc_callback)(struct pkc_cookie_s *cookie, int status); ++ void *eng_handle; ++}; ++ + #ifdef __cplusplus + } + #endif +diff --git a/crypto/dh/dh.h b/crypto/dh/dh.h +index ea59e61..20ffad2 100644 +--- a/crypto/dh/dh.h ++++ b/crypto/dh/dh.h +@@ -118,7 +118,9 @@ struct dh_method + int (*bn_mod_exp)(const DH *dh, BIGNUM *r, const BIGNUM *a, + const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx, + BN_MONT_CTX *m_ctx); /* Can be null */ +- ++ int (*compute_key_async)(unsigned char *key,const BIGNUM *pub_key,DH *dh, ++ struct pkc_cookie_s *cookie); ++ int (*generate_key_async)(DH *dh, struct pkc_cookie_s *cookie); + int (*init)(DH *dh); + int (*finish)(DH *dh); + int flags; +diff --git a/crypto/dsa/dsa.h b/crypto/dsa/dsa.h +index a6f6d0b..b04a029 100644 +--- a/crypto/dsa/dsa.h ++++ b/crypto/dsa/dsa.h +@@ -140,6 +140,10 @@ struct dsa_method + int (*bn_mod_exp)(DSA *dsa, BIGNUM *r, BIGNUM *a, const BIGNUM *p, + const BIGNUM *m, BN_CTX *ctx, + BN_MONT_CTX *m_ctx); /* Can be null */ ++ int (*dsa_do_sign_async)(const unsigned char *dgst, int dlen, DSA *dsa, ++ DSA_SIG *sig, struct pkc_cookie_s *cookie); ++ int (*dsa_do_verify_async)(const unsigned char *dgst, int dgst_len, ++ DSA_SIG *sig, DSA *dsa, struct pkc_cookie_s *cookie); + int (*init)(DSA *dsa); + int (*finish)(DSA *dsa); + int flags; +@@ -151,6 +155,7 @@ struct dsa_method + BN_GENCB *cb); + /* If this is non-NULL, it is used to generate DSA keys */ + int (*dsa_keygen)(DSA *dsa); ++ int (*dsa_keygen_async)(DSA *dsa, struct pkc_cookie_s *cookie); + }; + + struct dsa_st +diff --git a/crypto/ecdh/ech_locl.h b/crypto/ecdh/ech_locl.h +index f6cad6a..adce6b3 100644 +--- a/crypto/ecdh/ech_locl.h ++++ b/crypto/ecdh/ech_locl.h +@@ -67,6 +67,9 @@ struct ecdh_method + const char *name; + int (*compute_key)(void *key, size_t outlen, const EC_POINT *pub_key, EC_KEY *ecdh, + void *(*KDF)(const void *in, size_t inlen, void *out, size_t *outlen)); ++ int (*compute_key_async)(void *key, size_t outlen, const EC_POINT *pub_key, EC_KEY *ecdh, ++ void *(*KDF)(const void *in, size_t inlen, void *out, size_t *outlen), ++ struct pkc_cookie_s *cookie); + #if 0 + int (*init)(EC_KEY *eckey); + int (*finish)(EC_KEY *eckey); +diff --git a/crypto/ecdsa/ecs_locl.h b/crypto/ecdsa/ecs_locl.h +index cb3be13..eb0ebe0 100644 +--- a/crypto/ecdsa/ecs_locl.h ++++ b/crypto/ecdsa/ecs_locl.h +@@ -74,6 +74,11 @@ struct ecdsa_method + BIGNUM **r); + int (*ecdsa_do_verify)(const unsigned char *dgst, int dgst_len, + const ECDSA_SIG *sig, EC_KEY *eckey); ++ int (*ecdsa_do_sign_async)(const unsigned char *dgst, int dgst_len, ++ const BIGNUM *inv, const BIGNUM *rp, EC_KEY *eckey, ++ ECDSA_SIG *sig, struct pkc_cookie_s *cookie); ++ int (*ecdsa_do_verify_async)(const unsigned char *dgst, int dgst_len, ++ const ECDSA_SIG *sig, EC_KEY *eckey, struct pkc_cookie_s *cookie); + #if 0 + int (*init)(EC_KEY *eckey); + int (*finish)(EC_KEY *eckey); +diff --git a/crypto/engine/eng_cryptodev.c b/crypto/engine/eng_cryptodev.c +index 7ee314b..9f2416e 100644 +--- a/crypto/engine/eng_cryptodev.c ++++ b/crypto/engine/eng_cryptodev.c +@@ -1281,6 +1281,56 @@ zapparams(struct crypt_kop *kop) + } + } + ++/* Any PKC request has at max 2 output parameters and they are stored here to ++be used while copying in the check availability */ ++struct cryptodev_cookie_s { ++ BIGNUM *r; ++ struct crparam r_param; ++ BIGNUM *s; ++ struct crparam s_param; ++ struct crypt_kop *kop; ++}; ++ ++static int ++cryptodev_asym_async(struct crypt_kop *kop, int rlen, BIGNUM *r, int slen, ++ BIGNUM *s) ++{ ++ int fd; ++ struct pkc_cookie_s *cookie = kop->cookie; ++ struct cryptodev_cookie_s *eng_cookie; ++ ++ fd = *(int *)cookie->eng_handle; ++ ++ eng_cookie = malloc(sizeof(struct cryptodev_cookie_s)); ++ ++ if (eng_cookie) { ++ memset(eng_cookie, 0, sizeof(struct cryptodev_cookie_s)); ++ if (r) { ++ kop->crk_param[kop->crk_iparams].crp_p = calloc(rlen, sizeof(char)); ++ if (!kop->crk_param[kop->crk_iparams].crp_p) ++ return -ENOMEM; ++ kop->crk_param[kop->crk_iparams].crp_nbits = rlen * 8; ++ kop->crk_oparams++; ++ eng_cookie->r = r; ++ eng_cookie->r_param = kop->crk_param[kop->crk_iparams]; ++ } ++ if (s) { ++ kop->crk_param[kop->crk_iparams+1].crp_p = calloc(slen, sizeof(char)); ++ if (!kop->crk_param[kop->crk_iparams+1].crp_p) ++ return -ENOMEM; ++ kop->crk_param[kop->crk_iparams+1].crp_nbits = slen * 8; ++ kop->crk_oparams++; ++ eng_cookie->s = s; ++ eng_cookie->s_param = kop->crk_param[kop->crk_iparams + 1]; ++ } ++ } else ++ return -ENOMEM; ++ ++ eng_cookie->kop = kop; ++ cookie->eng_cookie = eng_cookie; ++ return ioctl(fd, CIOCASYMASYNCRYPT, kop); ++} ++ + static int + cryptodev_asym(struct crypt_kop *kop, int rlen, BIGNUM *r, int slen, BIGNUM *s) + { +@@ -1337,6 +1387,44 @@ void *cryptodev_init_instance(void) + return fd; + } + ++#include ++ ++/* Return 0 on success and 1 on failure */ ++int cryptodev_check_availability(void *eng_handle) ++{ ++ int fd = *(int *)eng_handle; ++ struct pkc_cookie_list_s cookie_list; ++ struct pkc_cookie_s *cookie; ++ int i; ++ ++ /* FETCH COOKIE returns number of cookies extracted */ ++ if (ioctl(fd, CIOCASYMFETCHCOOKIE, &cookie_list) <= 0) ++ return 1; ++ ++ for (i = 0; i < cookie_list.cookie_available; i++) { ++ cookie = cookie_list.cookie[i]; ++ if (cookie) { ++ struct cryptodev_cookie_s *eng_cookie = cookie->eng_cookie; ++ if (eng_cookie) { ++ struct crypt_kop *kop = eng_cookie->kop; ++ ++ if (eng_cookie->r) ++ crparam2bn(&eng_cookie->r_param, eng_cookie->r); ++ if (eng_cookie->s) ++ crparam2bn(&eng_cookie->s_param, eng_cookie->s); ++ if (kop->crk_op == CRK_DH_COMPUTE_KEY) ++ kop->crk_oparams = 0; ++ ++ zapparams(eng_cookie->kop); ++ free(eng_cookie->kop); ++ free (eng_cookie); ++ } ++ cookie->pkc_callback(cookie, cookie_list.status[i]); ++ } ++ } ++ return 0; ++} ++ + static int + cryptodev_bn_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, + const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *in_mont) +@@ -1382,6 +1470,63 @@ err: + } + + static int ++cryptodev_bn_mod_exp_async(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, ++ const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *in_mont, struct pkc_cookie_s *cookie) ++{ ++ struct crypt_kop *kop = malloc(sizeof(struct crypt_kop)); ++ int ret = 1; ++ ++ /* Currently, we know we can do mod exp iff we can do any ++ * asymmetric operations at all. ++ */ ++ if (cryptodev_asymfeat == 0 || !kop) { ++ ret = BN_mod_exp(r, a, p, m, ctx); ++ return (ret); ++ } ++ ++ kop->crk_oparams = 0; ++ kop->crk_status = 0; ++ kop->crk_op = CRK_MOD_EXP; ++ kop->cookie = cookie; ++ /* inputs: a^p % m */ ++ if (bn2crparam(a, &kop->crk_param[0])) ++ goto err; ++ if (bn2crparam(p, &kop->crk_param[1])) ++ goto err; ++ if (bn2crparam(m, &kop->crk_param[2])) ++ goto err; ++ ++ kop->crk_iparams = 3; ++ if (cryptodev_asym_async(kop, BN_num_bytes(m), r, 0, NULL)) ++ goto err; ++ ++ return ret; ++err: ++ { ++ const RSA_METHOD *meth = RSA_PKCS1_SSLeay(); ++ ++ if (kop) ++ free(kop); ++ ret = meth->bn_mod_exp(r, a, p, m, ctx, in_mont); ++ if (ret) ++ /* Call the completion handler immediately */ ++ cookie->pkc_callback(cookie, 0); ++ } ++ return ret; ++} ++ ++static int ++cryptodev_rsa_nocrt_mod_exp_async(BIGNUM *r0, const BIGNUM *I, ++ RSA *rsa, BN_CTX *ctx, struct pkc_cookie_s *cookie) ++{ ++ int r; ++ ctx = BN_CTX_new(); ++ r = cryptodev_bn_mod_exp_async(r0, I, rsa->d, rsa->n, ctx, NULL, cookie); ++ BN_CTX_free(ctx); ++ return r; ++} ++ ++static int + cryptodev_rsa_nocrt_mod_exp(BIGNUM *r0, const BIGNUM *I, RSA *rsa, BN_CTX *ctx) + { + int r; +@@ -1446,6 +1591,62 @@ err: + return (ret); + } + ++static int ++cryptodev_rsa_mod_exp_async(BIGNUM *r0, const BIGNUM *I, RSA *rsa, BN_CTX *ctx, ++ struct pkc_cookie_s *cookie) ++{ ++ struct crypt_kop *kop = malloc(sizeof(struct crypt_kop)); ++ int ret = 1, f_len, p_len, q_len; ++ unsigned char *f = NULL, *p = NULL, *q = NULL, *dp = NULL, *dq = NULL, *c = NULL; ++ ++ if (!rsa->p || !rsa->q || !rsa->dmp1 || !rsa->dmq1 || !rsa->iqmp || !kop) { ++ return (0); ++ } ++ ++ kop->crk_oparams = 0; ++ kop->crk_status = 0; ++ kop->crk_op = CRK_MOD_EXP_CRT; ++ f_len = BN_num_bytes(rsa->n); ++ spcf_bn2bin_ex(I, &f, &f_len); ++ spcf_bn2bin(rsa->p, &p, &p_len); ++ spcf_bn2bin(rsa->q, &q, &q_len); ++ spcf_bn2bin_ex(rsa->dmp1, &dp, &p_len); ++ spcf_bn2bin_ex(rsa->iqmp, &c, &p_len); ++ spcf_bn2bin_ex(rsa->dmq1, &dq, &q_len); ++ /* inputs: rsa->p rsa->q I rsa->dmp1 rsa->dmq1 rsa->iqmp */ ++ kop->crk_param[0].crp_p = p; ++ kop->crk_param[0].crp_nbits = p_len * 8; ++ kop->crk_param[1].crp_p = q; ++ kop->crk_param[1].crp_nbits = q_len * 8; ++ kop->crk_param[2].crp_p = f; ++ kop->crk_param[2].crp_nbits = f_len * 8; ++ kop->crk_param[3].crp_p = dp; ++ kop->crk_param[3].crp_nbits = p_len * 8; ++ /* dq must of length q, rest all of length p*/ ++ kop->crk_param[4].crp_p = dq; ++ kop->crk_param[4].crp_nbits = q_len * 8; ++ kop->crk_param[5].crp_p = c; ++ kop->crk_param[5].crp_nbits = p_len * 8; ++ kop->crk_iparams = 6; ++ kop->cookie = cookie; ++ if (cryptodev_asym_async(kop, BN_num_bytes(rsa->n), r0, 0, NULL)) ++ goto err; ++ ++ return ret; ++err: ++ { ++ const RSA_METHOD *meth = RSA_PKCS1_SSLeay(); ++ ++ if (kop) ++ free(kop); ++ ret = (*meth->rsa_mod_exp)(r0, I, rsa, ctx); ++ if (ret) ++ /* Call user completion handler immediately */ ++ cookie->pkc_callback(cookie, 0); ++ } ++ return (ret); ++} ++ + static RSA_METHOD cryptodev_rsa = { + "cryptodev RSA method", + NULL, /* rsa_pub_enc */ +@@ -1454,6 +1655,12 @@ static RSA_METHOD cryptodev_rsa = { + NULL, /* rsa_priv_dec */ + NULL, + NULL, ++ NULL, /* rsa_pub_enc */ ++ NULL, /* rsa_pub_dec */ ++ NULL, /* rsa_priv_enc */ ++ NULL, /* rsa_priv_dec */ ++ NULL, ++ NULL, + NULL, /* init */ + NULL, /* finish */ + 0, /* flags */ +@@ -1751,126 +1958,424 @@ sw_try: + return ret; + } + ++/* Cryptodev DSA Key Gen routine */ ++static int cryptodev_dsa_keygen_async(DSA *dsa, struct pkc_cookie_s *cookie) ++{ ++ struct crypt_kop *kop = malloc(sizeof(struct crypt_kop)); ++ int ret = 1, g_len; ++ unsigned char *g = NULL; + ++ if (!kop) ++ goto sw_try; + +-static DSA_METHOD cryptodev_dsa = { +- "cryptodev DSA method", +- NULL, +- NULL, /* dsa_sign_setup */ +- NULL, +- NULL, /* dsa_mod_exp */ +- NULL, +- NULL, /* init */ +- NULL, /* finish */ +- 0, /* flags */ +- NULL /* app_data */ +-}; ++ if (dsa->priv_key == NULL) { ++ if ((dsa->priv_key=BN_new()) == NULL) ++ goto sw_try; ++ } + +-static ECDSA_METHOD cryptodev_ecdsa = { +- "cryptodev ECDSA method", +- NULL, +- NULL, /* ecdsa_sign_setup */ +- NULL, +- NULL, +- 0, /* flags */ +- NULL /* app_data */ +-}; ++ if (dsa->pub_key == NULL) { ++ if ((dsa->pub_key=BN_new()) == NULL) ++ goto sw_try; ++ } + +-typedef enum ec_curve_s +-{ +- EC_PRIME, +- EC_BINARY +-} ec_curve_t; ++ g_len = BN_num_bytes(dsa->p); ++ /** ++ * Get generator into a plain buffer. If length is less than ++ * q_len then add leading padding bytes. ++ */ ++ if (spcf_bn2bin_ex(dsa->g, &g, &g_len)) { ++ DSAerr(DSA_F_DSA_GENERATE_KEY, ERR_R_MALLOC_FAILURE); ++ goto sw_try; ++ } + +-/* ENGINE handler for ECDSA Sign */ +-static ECDSA_SIG *cryptodev_ecdsa_do_sign( const unsigned char *dgst, +- int dgst_len, const BIGNUM *in_kinv, const BIGNUM *in_r, EC_KEY *eckey) +-{ +- BIGNUM *m = NULL, *p = NULL, *a = NULL; +- BIGNUM *b = NULL, *x = NULL, *y = NULL; +- BN_CTX *ctx = NULL; +- ECDSA_SIG *ret = NULL; +- ECDSA_DATA *ecdsa = NULL; +- unsigned char * q = NULL, *r = NULL, *ab = NULL, *g_xy = NULL; +- unsigned char * s = NULL, *c = NULL, *d = NULL, *f = NULL, *tmp_dgst = NULL; +- int i = 0, q_len = 0, priv_key_len = 0, r_len = 0; +- int g_len = 0, d_len = 0, ab_len = 0; +- const BIGNUM *order = NULL, *priv_key=NULL; +- const EC_GROUP *group = NULL; +- struct crypt_kop kop; +- ec_curve_t ec_crv = EC_PRIME; ++ memset(kop, 0, sizeof(struct crypt_kop)); ++ kop->crk_op = CRK_DSA_GENERATE_KEY; ++ if (bn2crparam(dsa->p, &kop->crk_param[0])) ++ goto sw_try; ++ if (bn2crparam(dsa->q, &kop->crk_param[1])) ++ goto sw_try; ++ kop->crk_param[2].crp_p = g; ++ kop->crk_param[2].crp_nbits = g_len * 8; ++ kop->crk_iparams = 3; ++ kop->cookie = cookie; + +- memset(&kop, 0, sizeof(kop)); +- ecdsa = ecdsa_check(eckey); +- if (!ecdsa) { +- ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_PASSED_NULL_PARAMETER); +- return NULL; ++ /* pub_key is or prime length while priv key is of length of order */ ++ if (cryptodev_asym_async(kop, BN_num_bytes(dsa->p), dsa->pub_key, ++ BN_num_bytes(dsa->q), dsa->priv_key)) ++ goto sw_try; ++ ++ return ret; ++sw_try: ++ { ++ const DSA_METHOD *meth = DSA_OpenSSL(); ++ ++ if (kop) ++ free(kop); ++ ret = (meth->dsa_keygen)(dsa); ++ cookie->pkc_callback(cookie, 0); + } ++ return ret; ++} + +- group = EC_KEY_get0_group(eckey); +- priv_key = EC_KEY_get0_private_key(eckey); ++static int ++cryptodev_dsa_do_sign_async(const unsigned char *dgst, int dlen, DSA *dsa, ++ DSA_SIG *sig, struct pkc_cookie_s *cookie) ++{ ++ struct crypt_kop *kop = malloc(sizeof(struct crypt_kop)); ++ DSA_SIG *dsaret = NULL; ++ int q_len = 0, r_len = 0, g_len = 0; ++ int priv_key_len = 0, ret = 1; ++ unsigned char *q = NULL, *r = NULL, *g = NULL, *priv_key = NULL, *f = NULL; + +- if (!group || !priv_key) { +- ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_PASSED_NULL_PARAMETER); +- return NULL; ++ if (((sig->r = BN_new()) == NULL) || !kop) { ++ DSAerr(DSA_F_DSA_DO_SIGN, ERR_R_MALLOC_FAILURE); ++ goto err; + } + +- if ((ctx = BN_CTX_new()) == NULL || (m = BN_new()) == NULL || +- (a = BN_new()) == NULL || (b = BN_new()) == NULL || +- (p = BN_new()) == NULL || (x = BN_new()) == NULL || +- (y = BN_new()) == NULL) { +- ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_MALLOC_FAILURE); ++ if ((sig->s = BN_new()) == NULL) { ++ BN_free(sig->r); ++ DSAerr(DSA_F_DSA_DO_SIGN, ERR_R_MALLOC_FAILURE); + goto err; + } + +- order = &group->order; +- if (!order || BN_is_zero(order)) { +- ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ECDSA_R_MISSING_PARAMETERS); ++ if (spcf_bn2bin(dsa->p, &q, &q_len)) { ++ DSAerr(DSA_F_DSA_DO_SIGN, DSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE); + goto err; + } + +- i = BN_num_bits(order); +- /* Need to truncate digest if it is too long: first truncate whole +- bytes */ +- if (8 * dgst_len > i) +- dgst_len = (i + 7)/8; ++ /* Get order of the field of private keys into plain buffer */ ++ if (spcf_bn2bin (dsa->q, &r, &r_len)) { ++ DSAerr(DSA_F_DSA_DO_SIGN, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } + +- if (!BN_bin2bn(dgst, dgst_len, m)) { +- ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_BN_LIB); ++ /* sanity test */ ++ if (dlen > r_len) { ++ DSAerr(DSA_F_DSA_DO_SIGN, DSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE); + goto err; + } + +- /* If still too long truncate remaining bits with a shift */ +- if ((8 * dgst_len > i) && !BN_rshift(m, m, 8 - (i & 0x7))) { +- ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_BN_LIB); ++ g_len = q_len; ++ /** ++ * Get generator into a plain buffer. If length is less than ++ * q_len then add leading padding bytes. ++ */ ++ if (spcf_bn2bin_ex(dsa->g, &g, &g_len)) { ++ DSAerr(DSA_F_DSA_DO_SIGN, ERR_R_MALLOC_FAILURE); + goto err; + } + +- /* copy the truncated bits into plain buffer */ +- if (spcf_bn2bin(m, &tmp_dgst, &dgst_len)) { +- fprintf(stderr, "%s:%d: OPENSSL_malloc failec\n", __FUNCTION__, __LINE__); ++ priv_key_len = r_len; ++ /** ++ * Get private key into a plain buffer. If length is less than ++ * r_len then add leading padding bytes. ++ */ ++ if (spcf_bn2bin_ex(dsa->priv_key, &priv_key, &priv_key_len)) { ++ DSAerr(DSA_F_DSA_DO_SIGN, ERR_R_MALLOC_FAILURE); + goto err; + } + +- ret = ECDSA_SIG_new(); +- if (!ret) { +- ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_BN_LIB); ++ /* Allocate memory to store hash. */ ++ f = OPENSSL_malloc (r_len); ++ if (!f) { ++ DSAerr(DSA_F_DSA_DO_SIGN, ERR_R_MALLOC_FAILURE); + goto err; + } + +- /* check if this is prime or binary EC request */ +- if (EC_METHOD_get_field_type(EC_GROUP_method_of(group)) == NID_X9_62_prime_field) { +- ec_crv = EC_PRIME; +- /* get the generator point pair */ +- if (!EC_POINT_get_affine_coordinates_GFp (group, EC_GROUP_get0_generator(group), +- x, y,ctx)) { +- ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_EC_LIB); +- goto err; +- } ++ /* Add padding, since SEC expects hash to of size r_len */ ++ if (dlen < r_len) ++ memset(f, 0, r_len - dlen); + +- /* get the ECC curve parameters */ +- if (!EC_GROUP_get_curve_GFp(group, p, a, b , ctx)) { +- ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_EC_LIB); ++ /* Skip leading bytes if dgst_len < r_len */ ++ memcpy(f + r_len - dlen, dgst, dlen); ++ ++ dlen = r_len; ++ ++ memset(kop, 0, sizeof( struct crypt_kop)); ++ kop->crk_op = CRK_DSA_SIGN; ++ ++ /* inputs: dgst dsa->p dsa->q dsa->g dsa->priv_key */ ++ kop->crk_param[0].crp_p = (void*)f; ++ kop->crk_param[0].crp_nbits = dlen * 8; ++ kop->crk_param[1].crp_p = (void*)q; ++ kop->crk_param[1].crp_nbits = q_len * 8; ++ kop->crk_param[2].crp_p = (void*)r; ++ kop->crk_param[2].crp_nbits = r_len * 8; ++ kop->crk_param[3].crp_p = (void*)g; ++ kop->crk_param[3].crp_nbits = g_len * 8; ++ kop->crk_param[4].crp_p = (void*)priv_key; ++ kop->crk_param[4].crp_nbits = priv_key_len * 8; ++ kop->crk_iparams = 5; ++ kop->cookie = cookie; ++ ++ if (cryptodev_asym_async(kop, r_len, sig->r, r_len, sig->s)) ++ goto err; ++ ++ return ret; ++err: ++ { ++ const DSA_METHOD *meth = DSA_OpenSSL(); ++ ++ if (kop) ++ free(kop); ++ BN_free(sig->r); ++ BN_free(sig->s); ++ dsaret = (meth->dsa_do_sign)(dgst, dlen, dsa); ++ sig->r = dsaret->r; ++ sig->s = dsaret->s; ++ /* Call user callback immediately */ ++ cookie->pkc_callback(cookie, 0); ++ ret = dsaret; ++ } ++ return ret; ++} ++ ++static int ++cryptodev_dsa_verify_async(const unsigned char *dgst, int dlen, ++ DSA_SIG *sig, DSA *dsa, struct pkc_cookie_s *cookie) ++{ ++ struct crypt_kop *kop = malloc(sizeof(struct crypt_kop)); ++ int q_len = 0, r_len = 0, g_len = 0; ++ int w_len = 0 ,c_len = 0, d_len = 0, ret = 1; ++ unsigned char * q = NULL, * r = NULL, * w = NULL, * g = NULL; ++ unsigned char *c = NULL, * d = NULL, *f = NULL; ++ ++ if (!kop) ++ goto err; ++ ++ if (spcf_bn2bin(dsa->p, &q, &q_len)) { ++ DSAerr(DSA_F_DSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); ++ return ret; ++ } ++ ++ /* Get Order of field of private keys */ ++ if (spcf_bn2bin(dsa->q, &r, &r_len)) { ++ DSAerr(DSA_F_DSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ ++ g_len = q_len; ++ /** ++ * Get generator into a plain buffer. If length is less than ++ * q_len then add leading padding bytes. ++ */ ++ if (spcf_bn2bin_ex(dsa->g, &g, &g_len)) { ++ DSAerr(DSA_F_DSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ w_len = q_len; ++ /** ++ * Get public key into a plain buffer. If length is less than ++ * q_len then add leading padding bytes. ++ */ ++ if (spcf_bn2bin_ex(dsa->pub_key, &w, &w_len)) { ++ DSAerr(DSA_F_DSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ /** ++ * Get the 1st part of signature into a flat buffer with ++ * appropriate padding ++ */ ++ c_len = r_len; ++ ++ if (spcf_bn2bin_ex(sig->r, &c, &c_len)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ ++ /** ++ * Get the 2nd part of signature into a flat buffer with ++ * appropriate padding ++ */ ++ d_len = r_len; ++ ++ if (spcf_bn2bin_ex(sig->s, &d, &d_len)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ ++ ++ /* Sanity test */ ++ if (dlen > r_len) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ ++ /* Allocate memory to store hash. */ ++ f = OPENSSL_malloc (r_len); ++ if (!f) { ++ DSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ ++ /* Add padding, since SEC expects hash to of size r_len */ ++ if (dlen < r_len) ++ memset(f, 0, r_len - dlen); ++ ++ /* Skip leading bytes if dgst_len < r_len */ ++ memcpy(f + r_len - dlen, dgst, dlen); ++ ++ dlen = r_len; ++ memset(kop, 0, sizeof(struct crypt_kop)); ++ ++ /* inputs: dgst dsa->p dsa->q dsa->g dsa->pub_key sig->r sig->s */ ++ kop->crk_param[0].crp_p = (void*)f; ++ kop->crk_param[0].crp_nbits = dlen * 8; ++ kop->crk_param[1].crp_p = q; ++ kop->crk_param[1].crp_nbits = q_len * 8; ++ kop->crk_param[2].crp_p = r; ++ kop->crk_param[2].crp_nbits = r_len * 8; ++ kop->crk_param[3].crp_p = g; ++ kop->crk_param[3].crp_nbits = g_len * 8; ++ kop->crk_param[4].crp_p = w; ++ kop->crk_param[4].crp_nbits = w_len * 8; ++ kop->crk_param[5].crp_p = c; ++ kop->crk_param[5].crp_nbits = c_len * 8; ++ kop->crk_param[6].crp_p = d; ++ kop->crk_param[6].crp_nbits = d_len * 8; ++ kop->crk_iparams = 7; ++ kop->crk_op = CRK_DSA_VERIFY; ++ kop->cookie = cookie; ++ if (cryptodev_asym_async(kop, 0, NULL, 0, NULL)) ++ goto err; ++ ++ return ret; ++err: ++ { ++ const DSA_METHOD *meth = DSA_OpenSSL(); ++ ++ if (kop) ++ free(kop); ++ ++ ret = (meth->dsa_do_verify)(dgst, dlen, sig, dsa); ++ cookie->pkc_callback(cookie, 0); ++ } ++ return ret; ++} ++ ++static DSA_METHOD cryptodev_dsa = { ++ "cryptodev DSA method", ++ NULL, ++ NULL, /* dsa_sign_setup */ ++ NULL, ++ NULL, /* dsa_mod_exp */ ++ NULL, ++ NULL, ++ NULL, ++ NULL, ++ NULL, /* init */ ++ NULL, /* finish */ ++ 0, /* flags */ ++ NULL /* app_data */ ++}; ++ ++static ECDSA_METHOD cryptodev_ecdsa = { ++ "cryptodev ECDSA method", ++ NULL, ++ NULL, /* ecdsa_sign_setup */ ++ NULL, ++ NULL, ++ NULL, ++ NULL, ++ 0, /* flags */ ++ NULL /* app_data */ ++}; ++ ++typedef enum ec_curve_s ++{ ++ EC_PRIME, ++ EC_BINARY ++} ec_curve_t; ++ ++/* ENGINE handler for ECDSA Sign */ ++static ECDSA_SIG *cryptodev_ecdsa_do_sign( const unsigned char *dgst, ++ int dgst_len, const BIGNUM *in_kinv, const BIGNUM *in_r, EC_KEY *eckey) ++{ ++ BIGNUM *m = NULL, *p = NULL, *a = NULL; ++ BIGNUM *b = NULL, *x = NULL, *y = NULL; ++ BN_CTX *ctx = NULL; ++ ECDSA_SIG *ret = NULL; ++ ECDSA_DATA *ecdsa = NULL; ++ unsigned char * q = NULL, *r = NULL, *ab = NULL, *g_xy = NULL; ++ unsigned char * s = NULL, *c = NULL, *d = NULL, *f = NULL, *tmp_dgst = NULL; ++ int i = 0, q_len = 0, priv_key_len = 0, r_len = 0; ++ int g_len = 0, d_len = 0, ab_len = 0; ++ const BIGNUM *order = NULL, *priv_key=NULL; ++ const EC_GROUP *group = NULL; ++ struct crypt_kop kop; ++ ec_curve_t ec_crv = EC_PRIME; ++ ++ memset(&kop, 0, sizeof(kop)); ++ ecdsa = ecdsa_check(eckey); ++ if (!ecdsa) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_PASSED_NULL_PARAMETER); ++ return NULL; ++ } ++ ++ group = EC_KEY_get0_group(eckey); ++ priv_key = EC_KEY_get0_private_key(eckey); ++ ++ if (!group || !priv_key) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_PASSED_NULL_PARAMETER); ++ return NULL; ++ } ++ ++ if ((ctx = BN_CTX_new()) == NULL || (m = BN_new()) == NULL || ++ (a = BN_new()) == NULL || (b = BN_new()) == NULL || ++ (p = BN_new()) == NULL || (x = BN_new()) == NULL || ++ (y = BN_new()) == NULL) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ ++ order = &group->order; ++ if (!order || BN_is_zero(order)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ECDSA_R_MISSING_PARAMETERS); ++ goto err; ++ } ++ ++ i = BN_num_bits(order); ++ /* Need to truncate digest if it is too long: first truncate whole ++ bytes */ ++ if (8 * dgst_len > i) ++ dgst_len = (i + 7)/8; ++ ++ if (!BN_bin2bn(dgst, dgst_len, m)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_BN_LIB); ++ goto err; ++ } ++ ++ /* If still too long truncate remaining bits with a shift */ ++ if ((8 * dgst_len > i) && !BN_rshift(m, m, 8 - (i & 0x7))) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_BN_LIB); ++ goto err; ++ } ++ ++ /* copy the truncated bits into plain buffer */ ++ if (spcf_bn2bin(m, &tmp_dgst, &dgst_len)) { ++ fprintf(stderr, "%s:%d: OPENSSL_malloc failec\n", __FUNCTION__, __LINE__); ++ goto err; ++ } ++ ++ ret = ECDSA_SIG_new(); ++ if (!ret) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_BN_LIB); ++ goto err; ++ } ++ ++ /* check if this is prime or binary EC request */ ++ if (EC_METHOD_get_field_type(EC_GROUP_method_of(group)) == NID_X9_62_prime_field) { ++ ec_crv = EC_PRIME; ++ /* get the generator point pair */ ++ if (!EC_POINT_get_affine_coordinates_GFp (group, EC_GROUP_get0_generator(group), ++ x, y,ctx)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_EC_LIB); ++ goto err; ++ } ++ ++ /* get the ECC curve parameters */ ++ if (!EC_GROUP_get_curve_GFp(group, p, a, b , ctx)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_EC_LIB); + goto err; + } + } else if (EC_METHOD_get_field_type(EC_GROUP_method_of(group)) == NID_X9_62_characteristic_two_field) { +@@ -2195,63 +2700,581 @@ static int cryptodev_ecdsa_verify(const unsigned char *dgst, int dgst_len, + } + + /** +- * Get the 2nd part of signature into a flat buffer with +- * appropriate padding ++ * Get the 2nd part of signature into a flat buffer with ++ * appropriate padding ++ */ ++ if (BN_num_bytes(sig->s) < r_len) ++ d_len = r_len; ++ ++ if (spcf_bn2bin_ex(sig->s, &d, &d_len)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ ++ /* memory for message representative */ ++ f = malloc(r_len); ++ if (!f) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ ++ /* Add padding, since SEC expects hash to of size r_len */ ++ memset(f, 0, r_len-dgst_len); ++ ++ /* Skip leading bytes if dgst_len < r_len */ ++ memcpy(f + r_len-dgst_len, tmp_dgst, dgst_len); ++ dgst_len += r_len-dgst_len; ++ kop.crk_op = CRK_DSA_VERIFY; ++ /* inputs: dgst dsa->p dsa->q dsa->g dsa->priv_key */ ++ kop.crk_param[0].crp_p = f; ++ kop.crk_param[0].crp_nbits = dgst_len * 8; ++ kop.crk_param[1].crp_p = q; ++ kop.crk_param[1].crp_nbits = q_len * 8; ++ kop.crk_param[2].crp_p = r; ++ kop.crk_param[2].crp_nbits = r_len * 8; ++ kop.crk_param[3].crp_p = g_xy; ++ kop.crk_param[3].crp_nbits = g_len * 8; ++ kop.crk_param[4].crp_p = w_xy; ++ kop.crk_param[4].crp_nbits = pub_key_len * 8; ++ kop.crk_param[5].crp_p = ab; ++ kop.crk_param[5].crp_nbits = ab_len * 8; ++ kop.crk_param[6].crp_p = c; ++ kop.crk_param[6].crp_nbits = d_len * 8; ++ kop.crk_param[7].crp_p = d; ++ kop.crk_param[7].crp_nbits = d_len * 8; ++ kop.crk_iparams = 8; ++ ++ if (cryptodev_asym(&kop, 0, NULL, 0, NULL) == 0) { ++ /*OCF success value is 0, if not zero, change ret to fail*/ ++ if(0 == kop.crk_status) ++ ret = 1; ++ } else { ++ const ECDSA_METHOD *meth = ECDSA_OpenSSL(); ++ ++ ret = (meth->ecdsa_do_verify)(dgst, dgst_len, sig, eckey); ++ } ++ kop.crk_param[0].crp_p = NULL; ++ zapparams(&kop); ++ ++err: ++ return ret; ++} ++ ++static int cryptodev_ecdsa_do_sign_async( const unsigned char *dgst, ++ int dgst_len, const BIGNUM *in_kinv, const BIGNUM *in_r, EC_KEY *eckey, ++ ECDSA_SIG *sig, struct pkc_cookie_s *cookie) ++{ ++ BIGNUM *m = NULL, *p = NULL, *a = NULL; ++ BIGNUM *b = NULL, *x = NULL, *y = NULL; ++ BN_CTX *ctx = NULL; ++ ECDSA_SIG *sig_ret = NULL; ++ ECDSA_DATA *ecdsa = NULL; ++ unsigned char * q = NULL, *r = NULL, *ab = NULL, *g_xy = NULL; ++ unsigned char * s = NULL, *f = NULL, *tmp_dgst = NULL; ++ int i = 0, q_len = 0, priv_key_len = 0, r_len = 0; ++ int g_len = 0, ab_len = 0, ret = 1; ++ const BIGNUM *order = NULL, *priv_key=NULL; ++ const EC_GROUP *group = NULL; ++ struct crypt_kop *kop = malloc(sizeof(struct crypt_kop)); ++ ec_curve_t ec_crv = EC_PRIME; ++ ++ if (!(sig->r = BN_new()) || !kop) ++ goto err; ++ if ((sig->s = BN_new()) == NULL) { ++ BN_free(r); ++ goto err; ++ } ++ ++ memset(kop, 0, sizeof(struct crypt_kop)); ++ ecdsa = ecdsa_check(eckey); ++ if (!ecdsa) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_PASSED_NULL_PARAMETER); ++ goto err; ++ } ++ ++ group = EC_KEY_get0_group(eckey); ++ priv_key = EC_KEY_get0_private_key(eckey); ++ ++ if (!group || !priv_key) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_PASSED_NULL_PARAMETER); ++ goto err; ++ } ++ ++ if ((ctx = BN_CTX_new()) == NULL || (m = BN_new()) == NULL || ++ (a = BN_new()) == NULL || (b = BN_new()) == NULL || ++ (p = BN_new()) == NULL || (x = BN_new()) == NULL || ++ (y = BN_new()) == NULL) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ ++ order = &group->order; ++ if (!order || BN_is_zero(order)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ECDSA_R_MISSING_PARAMETERS); ++ goto err; ++ } ++ ++ i = BN_num_bits(order); ++ /* Need to truncate digest if it is too long: first truncate whole ++ bytes */ ++ if (8 * dgst_len > i) ++ dgst_len = (i + 7)/8; ++ ++ if (!BN_bin2bn(dgst, dgst_len, m)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_BN_LIB); ++ goto err; ++ } ++ ++ /* If still too long truncate remaining bits with a shift */ ++ if ((8 * dgst_len > i) && !BN_rshift(m, m, 8 - (i & 0x7))) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_BN_LIB); ++ goto err; ++ } ++ ++ /* copy the truncated bits into plain buffer */ ++ if (spcf_bn2bin(m, &tmp_dgst, &dgst_len)) { ++ fprintf(stderr, "%s:%d: OPENSSL_malloc failec\n", __FUNCTION__, __LINE__); ++ goto err; ++ } ++ ++ /* check if this is prime or binary EC request */ ++ if (EC_METHOD_get_field_type(EC_GROUP_method_of(group)) ++ == NID_X9_62_prime_field) { ++ ec_crv = EC_PRIME; ++ /* get the generator point pair */ ++ if (!EC_POINT_get_affine_coordinates_GFp (group, ++ EC_GROUP_get0_generator(group), x, y,ctx)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_EC_LIB); ++ goto err; ++ } ++ ++ /* get the ECC curve parameters */ ++ if (!EC_GROUP_get_curve_GFp(group, p, a, b , ctx)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_EC_LIB); ++ goto err; ++ } ++ } else if (EC_METHOD_get_field_type(EC_GROUP_method_of(group)) == NID_X9_62_characteristic_two_field) { ++ ec_crv = EC_BINARY; ++ /* get the ECC curve parameters */ ++ if (!EC_GROUP_get_curve_GF2m(group, p, a, b , ctx)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_EC_LIB); ++ goto err; ++ } ++ ++ /* get the generator point pair */ ++ if (!EC_POINT_get_affine_coordinates_GF2m(group, ++ EC_GROUP_get0_generator(group), x, y,ctx)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_EC_LIB); ++ goto err; ++ } ++ } else { ++ printf("Unsupported Curve\n"); ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_EC_LIB); ++ goto err; ++ } ++ ++ if (spcf_bn2bin(order, &r, &r_len)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ ++ if (spcf_bn2bin(p, &q, &q_len)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ ++ priv_key_len = r_len; ++ ++ /** ++ * If BN_num_bytes of priv_key returns less then r_len then ++ * add padding bytes before the key ++ */ ++ if (spcf_bn2bin_ex(priv_key, &s, &priv_key_len)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ ++ /* Generation of ECC curve parameters */ ++ ab_len = 2*q_len; ++ ab = eng_copy_curve_points(a, b, ab_len, q_len); ++ if (!ab) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ ++ if (ec_crv == EC_BINARY) { ++ if (eng_ec_get_cparam(EC_GROUP_get_curve_name(group), ab+q_len, q_len)) ++ { ++ unsigned char *c_temp = NULL; ++ int c_temp_len = q_len; ++ if (eng_ec_compute_cparam(b, p, &c_temp, &c_temp_len)) ++ memcpy(ab+q_len, c_temp, q_len); ++ else ++ goto err; ++ } ++ kop->curve_type = ECC_BINARY; ++ } ++ ++ /* Calculation of Generator point */ ++ g_len = 2*q_len; ++ g_xy = eng_copy_curve_points(x, y, g_len, q_len); ++ if (!g_xy) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ ++ /* memory for message representative */ ++ f = malloc(r_len); ++ if (!f) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ ++ /* Add padding, since SEC expects hash to of size r_len */ ++ memset(f, 0, r_len - dgst_len); ++ ++ /* Skip leading bytes if dgst_len < r_len */ ++ memcpy(f + r_len - dgst_len, tmp_dgst, dgst_len); ++ ++ dgst_len += r_len - dgst_len; ++ ++ kop->crk_op = CRK_DSA_SIGN; ++ /* inputs: dgst dsa->p dsa->q dsa->g dsa->priv_key */ ++ kop->crk_param[0].crp_p = f; ++ kop->crk_param[0].crp_nbits = dgst_len * 8; ++ kop->crk_param[1].crp_p = q; ++ kop->crk_param[1].crp_nbits = q_len * 8; ++ kop->crk_param[2].crp_p = r; ++ kop->crk_param[2].crp_nbits = r_len * 8; ++ kop->crk_param[3].crp_p = g_xy; ++ kop->crk_param[3].crp_nbits = g_len * 8; ++ kop->crk_param[4].crp_p = s; ++ kop->crk_param[4].crp_nbits = priv_key_len * 8; ++ kop->crk_param[5].crp_p = ab; ++ kop->crk_param[5].crp_nbits = ab_len * 8; ++ kop->crk_iparams = 6; ++ kop->cookie = cookie; ++ ++ if (cryptodev_asym_async(kop, r_len, sig->r , r_len, sig->s)) ++ goto err; ++ ++ return ret; ++err: ++ { ++ const ECDSA_METHOD *meth = ECDSA_OpenSSL(); ++ BN_free(sig->r); ++ BN_free(sig->s); ++ if (kop) ++ free(kop); ++ sig_ret = (meth->ecdsa_do_sign)(dgst, dgst_len, in_kinv, in_r, eckey); ++ sig->r = sig_ret->r; ++ sig->s = sig_ret->s; ++ cookie->pkc_callback(cookie, 0); ++ } ++ return ret; ++} ++ ++static int cryptodev_ecdsa_verify_async(const unsigned char *dgst, int dgst_len, ++ const ECDSA_SIG *sig, EC_KEY *eckey, struct pkc_cookie_s *cookie) ++{ ++ BIGNUM *m = NULL, *p = NULL, *a = NULL, *b = NULL; ++ BIGNUM *x = NULL, *y = NULL, *w_x = NULL, *w_y = NULL; ++ BN_CTX *ctx = NULL; ++ ECDSA_DATA *ecdsa = NULL; ++ unsigned char *q = NULL, *r = NULL, *ab = NULL, *g_xy = NULL, *w_xy = NULL; ++ unsigned char *c = NULL, *d = NULL, *f = NULL, *tmp_dgst = NULL; ++ int i = 0, q_len = 0, pub_key_len = 0, r_len = 0, c_len = 0, g_len = 0; ++ int d_len = 0, ab_len = 0, ret = 1; ++ const EC_POINT *pub_key = NULL; ++ const BIGNUM *order = NULL; ++ const EC_GROUP *group=NULL; ++ ec_curve_t ec_crv = EC_PRIME; ++ struct crypt_kop *kop = malloc(sizeof(struct crypt_kop)); ++ ++ if (!kop) ++ goto err; ++ ++ memset(kop, 0, sizeof(struct crypt_kop)); ++ ecdsa = ecdsa_check(eckey); ++ if (!ecdsa) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_PASSED_NULL_PARAMETER); ++ goto err; ++ } ++ ++ group = EC_KEY_get0_group(eckey); ++ pub_key = EC_KEY_get0_public_key(eckey); ++ ++ if (!group || !pub_key) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_PASSED_NULL_PARAMETER); ++ goto err; ++ } ++ ++ if ((ctx = BN_CTX_new()) == NULL || (m = BN_new()) == NULL || ++ (a = BN_new()) == NULL || (b = BN_new()) == NULL || ++ (p = BN_new()) == NULL || (x = BN_new()) == NULL || ++ (y = BN_new()) == NULL || (w_x = BN_new()) == NULL || ++ (w_y = BN_new()) == NULL) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ ++ order = &group->order; ++ if (!order || BN_is_zero(order)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ECDSA_R_MISSING_PARAMETERS); ++ goto err; ++ } ++ ++ i = BN_num_bits(order); ++ /* Need to truncate digest if it is too long: first truncate whole ++ * bytes */ ++ if (8 * dgst_len > i) ++ dgst_len = (i + 7)/8; ++ ++ if (!BN_bin2bn(dgst, dgst_len, m)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_BN_LIB); ++ goto err; ++ } ++ ++ /* If still too long truncate remaining bits with a shift */ ++ if ((8 * dgst_len > i) && !BN_rshift(m, m, 8 - (i & 0x7))) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_BN_LIB); ++ goto err; ++ } ++ /* copy the truncated bits into plain buffer */ ++ if (spcf_bn2bin(m, &tmp_dgst, &dgst_len)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ ++ /* check if this is prime or binary EC request */ ++ if (EC_METHOD_get_field_type(EC_GROUP_method_of(group)) == NID_X9_62_prime_field) { ++ ec_crv = EC_PRIME; ++ ++ /* get the generator point pair */ ++ if (!EC_POINT_get_affine_coordinates_GFp (group, ++ EC_GROUP_get0_generator(group), x, y,ctx)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_EC_LIB); ++ goto err; ++ } ++ ++ /* get the public key pair for prime curve */ ++ if (!EC_POINT_get_affine_coordinates_GFp (group, ++ pub_key, w_x, w_y,ctx)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_EC_LIB); ++ goto err; ++ } ++ ++ /* get the ECC curve parameters */ ++ if (!EC_GROUP_get_curve_GFp(group, p, a, b, ctx)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_EC_LIB); ++ goto err; ++ } ++ } else if (EC_METHOD_get_field_type(EC_GROUP_method_of(group)) == NID_X9_62_characteristic_two_field){ ++ ec_crv = EC_BINARY; ++ /* get the ECC curve parameters */ ++ if (!EC_GROUP_get_curve_GF2m(group, p, a, b , ctx)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_EC_LIB); ++ goto err; ++ } ++ ++ /* get the generator point pair */ ++ if (!EC_POINT_get_affine_coordinates_GF2m(group, ++ EC_GROUP_get0_generator(group),x, y,ctx)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_EC_LIB); ++ goto err; ++ } ++ ++ /* get the public key pair for binary curve */ ++ if (!EC_POINT_get_affine_coordinates_GF2m(group, ++ pub_key, w_x, w_y,ctx)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_EC_LIB); ++ goto err; ++ } ++ }else { ++ printf("Unsupported Curve\n"); ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_EC_LIB); ++ goto err; ++ } ++ ++ /* Get the order of the subgroup of private keys */ ++ if (spcf_bn2bin((BIGNUM*)order, &r, &r_len)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ ++ /* Get the irreducible polynomial that creates the field */ ++ if (spcf_bn2bin(p, &q, &q_len)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ ++ /* Get the public key into a flat buffer with appropriate padding */ ++ pub_key_len = 2 * q_len; ++ ++ w_xy = eng_copy_curve_points (w_x, w_y, pub_key_len, q_len); ++ if (!w_xy) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ ++ /* Generation of ECC curve parameters */ ++ ab_len = 2*q_len; ++ ++ ab = eng_copy_curve_points (a, b, ab_len, q_len); ++ if (!ab) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ ++ if (ec_crv == EC_BINARY) { ++ /* copy b' i.e c(b), instead of only b */ ++ eng_ec_get_cparam (EC_GROUP_get_curve_name(group), ++ ab+q_len, q_len); ++ kop->curve_type = ECC_BINARY; ++ } ++ ++ /* Calculation of Generator point */ ++ g_len = 2 * q_len; ++ ++ g_xy = eng_copy_curve_points (x, y, g_len, q_len); ++ if (!g_xy) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ ++ /** ++ * Get the 1st part of signature into a flat buffer with ++ * appropriate padding ++ */ ++ if (BN_num_bytes(sig->r) < r_len) ++ c_len = r_len; ++ ++ if (spcf_bn2bin_ex(sig->r, &c, &c_len)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ ++ /** ++ * Get the 2nd part of signature into a flat buffer with ++ * appropriate padding ++ */ ++ if (BN_num_bytes(sig->s) < r_len) ++ d_len = r_len; ++ ++ if (spcf_bn2bin_ex(sig->s, &d, &d_len)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ ++ /* memory for message representative */ ++ f = malloc(r_len); ++ if (!f) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ ++ /* Add padding, since SEC expects hash to of size r_len */ ++ memset(f, 0, r_len-dgst_len); ++ ++ /* Skip leading bytes if dgst_len < r_len */ ++ memcpy(f + r_len-dgst_len, tmp_dgst, dgst_len); ++ ++ dgst_len += r_len-dgst_len; ++ ++ kop->crk_op = CRK_DSA_VERIFY; ++ /* inputs: dgst dsa->p dsa->q dsa->g dsa->priv_key */ ++ kop->crk_param[0].crp_p = f; ++ kop->crk_param[0].crp_nbits = dgst_len * 8; ++ kop->crk_param[1].crp_p = q; ++ kop->crk_param[1].crp_nbits = q_len * 8; ++ kop->crk_param[2].crp_p = r; ++ kop->crk_param[2].crp_nbits = r_len * 8; ++ kop->crk_param[3].crp_p = g_xy; ++ kop->crk_param[3].crp_nbits = g_len * 8; ++ kop->crk_param[4].crp_p = w_xy; ++ kop->crk_param[4].crp_nbits = pub_key_len * 8; ++ kop->crk_param[5].crp_p = ab; ++ kop->crk_param[5].crp_nbits = ab_len * 8; ++ kop->crk_param[6].crp_p = c; ++ kop->crk_param[6].crp_nbits = d_len * 8; ++ kop->crk_param[7].crp_p = d; ++ kop->crk_param[7].crp_nbits = d_len * 8; ++ kop->crk_iparams = 8; ++ kop->cookie = cookie; ++ ++ if (cryptodev_asym_async(kop, 0, NULL, 0, NULL)) ++ goto err; ++ ++ return ret; ++err: ++ { ++ const ECDSA_METHOD *meth = ECDSA_OpenSSL(); ++ ++ if (kop) ++ free(kop); ++ ret = (meth->ecdsa_do_verify)(dgst, dgst_len, sig, eckey); ++ cookie->pkc_callback(cookie, 0); ++ } ++ ++ return ret; ++} ++ ++/* Cryptodev DH Key Gen routine */ ++static int cryptodev_dh_keygen_async(DH *dh, struct pkc_cookie_s *cookie) ++{ ++ struct crypt_kop *kop = malloc(sizeof(struct crypt_kop)); ++ int ret = 1, g_len; ++ unsigned char *g = NULL; ++ ++ if (!kop) ++ goto sw_try; ++ ++ if (dh->priv_key == NULL) { ++ if ((dh->priv_key=BN_new()) == NULL) ++ goto sw_try; ++ } ++ ++ if (dh->pub_key == NULL) { ++ if ((dh->pub_key=BN_new()) == NULL) ++ goto sw_try; ++ } ++ ++ g_len = BN_num_bytes(dh->p); ++ /** ++ * Get generator into a plain buffer. If length is less than ++ * q_len then add leading padding bytes. + */ +- if (BN_num_bytes(sig->s) < r_len) +- d_len = r_len; +- +- if (spcf_bn2bin_ex(sig->s, &d, &d_len)) { +- ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); +- goto err; +- } +- +- /* memory for message representative */ +- f = malloc(r_len); +- if (!f) { +- ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); +- goto err; ++ if (spcf_bn2bin_ex(dh->g, &g, &g_len)) { ++ DSAerr(DH_F_DH_GENERATE_KEY, ERR_R_MALLOC_FAILURE); ++ goto sw_try; + } + +- /* Add padding, since SEC expects hash to of size r_len */ +- memset(f, 0, r_len-dgst_len); ++ memset(kop, 0, sizeof(struct crypt_kop)); ++ kop->crk_op = CRK_DH_GENERATE_KEY; ++ if (bn2crparam(dh->p, &kop->crk_param[0])) ++ goto sw_try; ++ if (bn2crparam(dh->q, &kop->crk_param[1])) ++ goto sw_try; ++ kop->crk_param[2].crp_p = g; ++ kop->crk_param[2].crp_nbits = g_len * 8; ++ kop->crk_iparams = 3; ++ kop->cookie = cookie; + +- /* Skip leading bytes if dgst_len < r_len */ +- memcpy(f + r_len-dgst_len, tmp_dgst, dgst_len); +- dgst_len += r_len-dgst_len; +- kop.crk_op = CRK_DSA_VERIFY; +- /* inputs: dgst dsa->p dsa->q dsa->g dsa->priv_key */ +- kop.crk_param[0].crp_p = f; +- kop.crk_param[0].crp_nbits = dgst_len * 8; +- kop.crk_param[1].crp_p = q; +- kop.crk_param[1].crp_nbits = q_len * 8; +- kop.crk_param[2].crp_p = r; +- kop.crk_param[2].crp_nbits = r_len * 8; +- kop.crk_param[3].crp_p = g_xy; +- kop.crk_param[3].crp_nbits = g_len * 8; +- kop.crk_param[4].crp_p = w_xy; +- kop.crk_param[4].crp_nbits = pub_key_len * 8; +- kop.crk_param[5].crp_p = ab; +- kop.crk_param[5].crp_nbits = ab_len * 8; +- kop.crk_param[6].crp_p = c; +- kop.crk_param[6].crp_nbits = d_len * 8; +- kop.crk_param[7].crp_p = d; +- kop.crk_param[7].crp_nbits = d_len * 8; +- kop.crk_iparams = 8; ++ /* pub_key is or prime length while priv key is of length of order */ ++ if (cryptodev_asym_async(kop, BN_num_bytes(dh->p), dh->pub_key, ++ BN_num_bytes(dh->q), dh->priv_key)) ++ goto sw_try; + +- if (cryptodev_asym(&kop, 0, NULL, 0, NULL) == 0) { +- /*OCF success value is 0, if not zero, change ret to fail*/ +- if(0 == kop.crk_status) +- ret = 1; +- } else { +- const ECDSA_METHOD *meth = ECDSA_OpenSSL(); ++ return ret; ++sw_try: ++ { ++ const DH_METHOD *meth = DH_OpenSSL(); + +- ret = (meth->ecdsa_do_verify)(dgst, dgst_len, sig, eckey); ++ if (kop) ++ free(kop); ++ ret = (meth->generate_key)(dh); ++ cookie->pkc_callback(cookie, 0); + } +- kop.crk_param[0].crp_p = NULL; +- zapparams(&kop); +- +-err: + return ret; + } + +@@ -2360,6 +3383,54 @@ sw_try: + return (dhret); + } + ++/* Return Length if successful and 0 on failure */ ++static int ++cryptodev_dh_compute_key_async(unsigned char *key, const BIGNUM *pub_key, ++ DH *dh, struct pkc_cookie_s *cookie) ++{ ++ struct crypt_kop *kop = malloc(sizeof(struct crypt_kop)); ++ int ret = 1; ++ int fd, p_len; ++ unsigned char *padded_pub_key = NULL, *p = NULL; ++ ++ fd = *(int *)cookie->eng_handle; ++ ++ memset(kop, 0, sizeof(struct crypt_kop)); ++ kop->crk_op = CRK_DH_COMPUTE_KEY; ++ /* inputs: dh->priv_key pub_key dh->p key */ ++ spcf_bn2bin(dh->p, &p, &p_len); ++ spcf_bn2bin_ex(pub_key, &padded_pub_key, &p_len); ++ ++ if (bn2crparam(dh->priv_key, &kop->crk_param[0])) ++ goto err; ++ kop->crk_param[1].crp_p = padded_pub_key; ++ kop->crk_param[1].crp_nbits = p_len * 8; ++ kop->crk_param[2].crp_p = p; ++ kop->crk_param[2].crp_nbits = p_len * 8; ++ kop->crk_iparams = 3; ++ ++ kop->cookie = cookie; ++ kop->crk_param[3].crp_p = (void*) key; ++ kop->crk_param[3].crp_nbits = p_len * 8; ++ kop->crk_oparams = 1; ++ ++ if (cryptodev_asym_async(kop, 0, NULL, 0, NULL)) ++ goto err; ++ ++ return p_len; ++err: ++ { ++ const DH_METHOD *meth = DH_OpenSSL(); ++ ++ if (kop) ++ free(kop); ++ ret = (meth->compute_key)(key, pub_key, dh); ++ /* Call user cookie handler */ ++ cookie->pkc_callback(cookie, 0); ++ } ++ return (ret); ++} ++ + int cryptodev_ecdh_compute_key(void *out, size_t outlen, + const EC_POINT *pub_key, EC_KEY *ecdh, void *(*KDF)(const void *in, size_t inlen, + void *out, size_t *outlen)) +@@ -2537,6 +3608,190 @@ err: + return ret; + } + ++int cryptodev_ecdh_compute_key_async(void *out, size_t outlen, ++ const EC_POINT *pub_key, EC_KEY *ecdh, void *(*KDF)(const void *in, size_t inlen, ++ void *out, size_t *outlen), struct pkc_cookie_s *cookie) ++{ ++ ec_curve_t ec_crv = EC_PRIME; ++ unsigned char * q = NULL, *w_xy = NULL, *ab = NULL, *s = NULL, *r = NULL; ++ BIGNUM * w_x = NULL, *w_y = NULL; ++ int q_len = 0, ab_len = 0, pub_key_len = 0, r_len = 0, priv_key_len = 0; ++ BIGNUM * p = NULL, *a = NULL, *b = NULL; ++ BN_CTX *ctx; ++ EC_POINT *tmp=NULL; ++ BIGNUM *x=NULL, *y=NULL; ++ const BIGNUM *priv_key; ++ const EC_GROUP* group = NULL; ++ int ret = 1; ++ size_t buflen, len; ++ struct crypt_kop *kop = malloc(sizeof(struct crypt_kop)); ++ ++ if (!(ctx = BN_CTX_new()) || !kop) ++ goto err; ++ ++ memset(kop, 0, sizeof(struct crypt_kop)); ++ ++ BN_CTX_start(ctx); ++ x = BN_CTX_get(ctx); ++ y = BN_CTX_get(ctx); ++ p = BN_CTX_get(ctx); ++ a = BN_CTX_get(ctx); ++ b = BN_CTX_get(ctx); ++ w_x = BN_CTX_get(ctx); ++ w_y = BN_CTX_get(ctx); ++ ++ if (!x || !y || !p || !a || !b || !w_x || !w_y) { ++ ECDHerr(ECDH_F_ECDH_COMPUTE_KEY,ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ ++ priv_key = EC_KEY_get0_private_key(ecdh); ++ if (priv_key == NULL) { ++ ECDHerr(ECDH_F_ECDH_COMPUTE_KEY,ECDH_R_NO_PRIVATE_VALUE); ++ goto err; ++ } ++ ++ group = EC_KEY_get0_group(ecdh); ++ if ((tmp=EC_POINT_new(group)) == NULL) { ++ ECDHerr(ECDH_F_ECDH_COMPUTE_KEY,ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ ++ if (EC_METHOD_get_field_type(EC_GROUP_method_of(group)) == ++ NID_X9_62_prime_field) { ++ ec_crv = EC_PRIME; ++ ++ if (!EC_POINT_get_affine_coordinates_GFp(group, ++ EC_GROUP_get0_generator(group), x, y, ctx)) { ++ ECDHerr(ECDH_F_ECDH_COMPUTE_KEY,ECDH_R_POINT_ARITHMETIC_FAILURE); ++ goto err; ++ } ++ ++ /* get the ECC curve parameters */ ++ if (!EC_GROUP_get_curve_GFp(group, p, a, b, ctx)) { ++ ECDHerr(ECDH_F_ECDH_COMPUTE_KEY,ERR_R_BN_LIB); ++ goto err; ++ } ++ ++ /* get the public key pair for prime curve */ ++ if (!EC_POINT_get_affine_coordinates_GFp (group, pub_key, w_x, w_y,ctx)) { ++ ECDHerr(ECDH_F_ECDH_COMPUTE_KEY,ERR_R_BN_LIB); ++ goto err; ++ } ++ } else { ++ ec_crv = EC_BINARY; ++ ++ if (!EC_POINT_get_affine_coordinates_GF2m(group, ++ EC_GROUP_get0_generator(group), x, y, ctx)) { ++ ECDHerr(ECDH_F_ECDH_COMPUTE_KEY,ECDH_R_POINT_ARITHMETIC_FAILURE); ++ goto err; ++ } ++ ++ /* get the ECC curve parameters */ ++ if (!EC_GROUP_get_curve_GF2m(group, p, a, b , ctx)) { ++ ECDHerr(ECDH_F_ECDH_COMPUTE_KEY,ERR_R_BN_LIB); ++ goto err; ++ } ++ ++ /* get the public key pair for binary curve */ ++ if (!EC_POINT_get_affine_coordinates_GF2m(group, ++ pub_key, w_x, w_y,ctx)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_EC_LIB); ++ goto err; ++ } ++ } ++ ++ /* irreducible polynomial that creates the field */ ++ if (spcf_bn2bin((BIGNUM*)&group->order, &r, &r_len)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ ++ /* Get the irreducible polynomial that creates the field */ ++ if (spcf_bn2bin(p, &q, &q_len)) { ++ ECDHerr(ECDH_F_ECDH_COMPUTE_KEY,ERR_R_BN_LIB); ++ goto err; ++ } ++ ++ /* Get the public key into a flat buffer with appropriate padding */ ++ pub_key_len = 2 * q_len; ++ w_xy = eng_copy_curve_points (w_x, w_y, pub_key_len, q_len); ++ if (!w_xy) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ ++ /* Generation of ECC curve parameters */ ++ ab_len = 2*q_len; ++ ab = eng_copy_curve_points (a, b, ab_len, q_len); ++ if (!ab) { ++ ECDHerr(ECDH_F_ECDH_COMPUTE_KEY,ERR_R_BN_LIB); ++ goto err; ++ } ++ ++ if (ec_crv == EC_BINARY) { ++ /* copy b' i.e c(b), instead of only b */ ++ if (eng_ec_get_cparam(EC_GROUP_get_curve_name(group), ab+q_len, q_len)) ++ { ++ unsigned char *c_temp = NULL; ++ int c_temp_len = q_len; ++ if (eng_ec_compute_cparam(b, p, &c_temp, &c_temp_len)) ++ memcpy(ab+q_len, c_temp, q_len); ++ else ++ goto err; ++ } ++ kop->curve_type = ECC_BINARY; ++ } else ++ kop->curve_type = ECC_PRIME; ++ ++ priv_key_len = r_len; ++ ++ /* ++ * If BN_num_bytes of priv_key returns less then r_len then ++ * add padding bytes before the key ++ */ ++ if (spcf_bn2bin_ex((BIGNUM *)priv_key, &s, &priv_key_len)) { ++ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_MALLOC_FAILURE); ++ goto err; ++ } ++ ++ buflen = (EC_GROUP_get_degree(group) + 7)/8; ++ len = BN_num_bytes(x); ++ if (len > buflen || q_len < buflen) { ++ ECDHerr(ECDH_F_ECDH_COMPUTE_KEY, ERR_R_INTERNAL_ERROR); ++ goto err; ++ } ++ ++ kop->crk_op = CRK_DH_COMPUTE_KEY; ++ kop->crk_param[0].crp_p = (void *) s; ++ kop->crk_param[0].crp_nbits = priv_key_len*8; ++ kop->crk_param[1].crp_p = (void *) w_xy; ++ kop->crk_param[1].crp_nbits = pub_key_len*8; ++ kop->crk_param[2].crp_p = (void *) q; ++ kop->crk_param[2].crp_nbits = q_len*8; ++ kop->crk_param[3].crp_p = (void *) ab; ++ kop->crk_param[3].crp_nbits = ab_len*8; ++ kop->crk_iparams = 4; ++ kop->crk_param[4].crp_p = (void *) out; ++ kop->crk_param[4].crp_nbits = q_len*8; ++ kop->crk_oparams = 1; ++ kop->cookie = cookie; ++ if (cryptodev_asym_async(kop, 0, NULL, 0, NULL)) ++ goto err; ++ ++ return q_len; ++err: ++ { ++ const ECDH_METHOD *meth = ECDH_OpenSSL(); ++ ++ if (kop) ++ free(kop); ++ ret = (meth->compute_key)(out, outlen, pub_key, ecdh, KDF); ++ /* Call user cookie handler */ ++ cookie->pkc_callback(cookie, 0); ++ } ++ return ret; ++} + + static DH_METHOD cryptodev_dh = { + "cryptodev DH method", +@@ -2545,6 +3800,8 @@ static DH_METHOD cryptodev_dh = { + NULL, + NULL, + NULL, ++ NULL, ++ NULL, + 0, /* flags */ + NULL /* app_data */ + }; +@@ -2553,6 +3810,7 @@ static ECDH_METHOD cryptodev_ecdh = { + "cryptodev ECDH method", + NULL, /* cryptodev_ecdh_compute_key */ + NULL, ++ NULL, + 0, /* flags */ + NULL /* app_data */ + }; +@@ -2625,12 +3883,19 @@ ENGINE_load_cryptodev(void) + cryptodev_rsa.rsa_priv_dec = rsa_meth->rsa_priv_dec; + if (cryptodev_asymfeat & CRF_MOD_EXP) { + cryptodev_rsa.bn_mod_exp = cryptodev_bn_mod_exp; +- if (cryptodev_asymfeat & CRF_MOD_EXP_CRT) ++ cryptodev_rsa.bn_mod_exp_async = ++ cryptodev_bn_mod_exp_async; ++ if (cryptodev_asymfeat & CRF_MOD_EXP_CRT) { + cryptodev_rsa.rsa_mod_exp = + cryptodev_rsa_mod_exp; +- else ++ cryptodev_rsa.rsa_mod_exp_async = ++ cryptodev_rsa_mod_exp_async; ++ } else { + cryptodev_rsa.rsa_mod_exp = + cryptodev_rsa_nocrt_mod_exp; ++ cryptodev_rsa.rsa_mod_exp_async = ++ cryptodev_rsa_nocrt_mod_exp_async; ++ } + } + } + +@@ -2638,12 +3903,21 @@ ENGINE_load_cryptodev(void) + const DSA_METHOD *meth = DSA_OpenSSL(); + + memcpy(&cryptodev_dsa, meth, sizeof(DSA_METHOD)); +- if (cryptodev_asymfeat & CRF_DSA_SIGN) ++ if (cryptodev_asymfeat & CRF_DSA_SIGN) { + cryptodev_dsa.dsa_do_sign = cryptodev_dsa_do_sign; +- if (cryptodev_asymfeat & CRF_DSA_VERIFY) ++ cryptodev_dsa.dsa_do_sign_async = ++ cryptodev_dsa_do_sign_async; ++ } ++ if (cryptodev_asymfeat & CRF_DSA_VERIFY) { + cryptodev_dsa.dsa_do_verify = cryptodev_dsa_verify; +- if (cryptodev_asymfeat & CRF_DSA_GENERATE_KEY) ++ cryptodev_dsa.dsa_do_verify_async = ++ cryptodev_dsa_verify_async; ++ } ++ if (cryptodev_asymfeat & CRF_DSA_GENERATE_KEY) { + cryptodev_dsa.dsa_keygen = cryptodev_dsa_keygen; ++ cryptodev_dsa.dsa_keygen_async = ++ cryptodev_dsa_keygen_async; ++ } + } + + if (ENGINE_set_DH(engine, &cryptodev_dh)){ +@@ -2652,10 +3926,15 @@ ENGINE_load_cryptodev(void) + if (cryptodev_asymfeat & CRF_DH_COMPUTE_KEY) { + cryptodev_dh.compute_key = + cryptodev_dh_compute_key; ++ cryptodev_dh.compute_key_async = ++ cryptodev_dh_compute_key_async; + } + if (cryptodev_asymfeat & CRF_DH_GENERATE_KEY) { + cryptodev_dh.generate_key = + cryptodev_dh_keygen; ++ cryptodev_dh.generate_key_async = ++ cryptodev_dh_keygen_async; ++ + } + } + +@@ -2664,10 +3943,14 @@ ENGINE_load_cryptodev(void) + memcpy(&cryptodev_ecdsa, meth, sizeof(ECDSA_METHOD)); + if (cryptodev_asymfeat & CRF_DSA_SIGN) { + cryptodev_ecdsa.ecdsa_do_sign = cryptodev_ecdsa_do_sign; ++ cryptodev_ecdsa.ecdsa_do_sign_async = ++ cryptodev_ecdsa_do_sign_async; + } + if (cryptodev_asymfeat & CRF_DSA_VERIFY) { + cryptodev_ecdsa.ecdsa_do_verify = + cryptodev_ecdsa_verify; ++ cryptodev_ecdsa.ecdsa_do_verify_async = ++ cryptodev_ecdsa_verify_async; + } + } + +@@ -2676,9 +3959,16 @@ ENGINE_load_cryptodev(void) + memcpy(&cryptodev_ecdh, ecdh_meth, sizeof(ECDH_METHOD)); + if (cryptodev_asymfeat & CRF_DH_COMPUTE_KEY) { + cryptodev_ecdh.compute_key = cryptodev_ecdh_compute_key; ++ cryptodev_ecdh.compute_key_async = ++ cryptodev_ecdh_compute_key_async; + } + } + ++ ENGINE_set_check_pkc_availability(engine, cryptodev_check_availability); ++ ENGINE_set_close_instance(engine, cryptodev_close_instance); ++ ENGINE_set_init_instance(engine, cryptodev_init_instance); ++ ENGINE_set_async_map(engine, ENGINE_ALLPKC_ASYNC); ++ + ENGINE_add(engine); + ENGINE_free(engine); + ERR_clear_error(); +diff --git a/crypto/engine/eng_int.h b/crypto/engine/eng_int.h +index 451ef8f..8fc3077 100644 +--- a/crypto/engine/eng_int.h ++++ b/crypto/engine/eng_int.h +@@ -181,7 +181,29 @@ struct engine_st + ENGINE_LOAD_KEY_PTR load_pubkey; + + ENGINE_SSL_CLIENT_CERT_PTR load_ssl_client_cert; +- ++ /* ++ * Instantiate Engine handle to be passed in check_pkc_availability ++ * Ensure that Engine is instantiated before any pkc asynchronous call. ++ */ ++ void *(*engine_init_instance)(void); ++ /* ++ * Instantiated Engine handle will be closed with this call. ++ * Ensure that no pkc asynchronous call is made after this call ++ */ ++ void (*engine_close_instance)(void *handle); ++ /* ++ * Check availability will extract the data from kernel. ++ * eng_handle: This is the Engine handle corresponds to which ++ * the cookies needs to be polled. ++ * return 0 if cookie available else 1 ++ */ ++ int (*check_pkc_availability)(void *eng_handle); ++ /* ++ * The following map is used to check if the engine supports asynchronous implementation ++ * ENGINE_ASYNC_FLAG* for available bitmap. Any application checking for asynchronous ++ * implementation need to check this features using "int ENGINE_get_async_map(engine *)"; ++ */ ++ int async_map; + const ENGINE_CMD_DEFN *cmd_defns; + int flags; + /* reference count on the structure itself */ +diff --git a/crypto/engine/eng_lib.c b/crypto/engine/eng_lib.c +index 18a6664..6fa621c 100644 +--- a/crypto/engine/eng_lib.c ++++ b/crypto/engine/eng_lib.c +@@ -98,7 +98,11 @@ void engine_set_all_null(ENGINE *e) + e->ctrl = NULL; + e->load_privkey = NULL; + e->load_pubkey = NULL; ++ e->check_pkc_availability = NULL; ++ e->engine_init_instance = NULL; ++ e->engine_close_instance = NULL; + e->cmd_defns = NULL; ++ e->async_map = 0; + e->flags = 0; + } + +@@ -233,6 +237,48 @@ int ENGINE_set_id(ENGINE *e, const char *id) + return 1; + } + ++void ENGINE_set_init_instance(ENGINE *e, void *(*engine_init_instance)(void)) ++ { ++ e->engine_init_instance = engine_init_instance; ++ } ++ ++void ENGINE_set_close_instance(ENGINE *e, ++ void (*engine_close_instance)(void *)) ++ { ++ e->engine_close_instance = engine_close_instance; ++ } ++ ++void ENGINE_set_async_map(ENGINE *e, int async_map) ++ { ++ e->async_map = async_map; ++ } ++ ++void *ENGINE_init_instance(ENGINE *e) ++ { ++ return e->engine_init_instance(); ++ } ++ ++void ENGINE_close_instance(ENGINE *e, void *eng_handle) ++ { ++ e->engine_close_instance(eng_handle); ++ } ++ ++int ENGINE_get_async_map(ENGINE *e) ++ { ++ return e->async_map; ++ } ++ ++void ENGINE_set_check_pkc_availability(ENGINE *e, ++ int (*check_pkc_availability)(void *eng_handle)) ++ { ++ e->check_pkc_availability = check_pkc_availability; ++ } ++ ++int ENGINE_check_pkc_availability(ENGINE *e, void *eng_handle) ++ { ++ return e->check_pkc_availability(eng_handle); ++ } ++ + int ENGINE_set_name(ENGINE *e, const char *name) + { + if(name == NULL) +diff --git a/crypto/engine/engine.h b/crypto/engine/engine.h +index 237a6c9..ccff86a 100644 +--- a/crypto/engine/engine.h ++++ b/crypto/engine/engine.h +@@ -473,6 +473,30 @@ ENGINE *ENGINE_new(void); + int ENGINE_free(ENGINE *e); + int ENGINE_up_ref(ENGINE *e); + int ENGINE_set_id(ENGINE *e, const char *id); ++void ENGINE_set_init_instance(ENGINE *e, void *(*engine_init_instance)(void)); ++void ENGINE_set_close_instance(ENGINE *e, ++ void (*engine_free_instance)(void *)); ++/* ++ * Following FLAGS are bitmap store in async_map to set asynchronous interface capability ++ *of the engine ++ */ ++#define ENGINE_RSA_ASYNC 0x0001 ++#define ENGINE_DSA_ASYNC 0x0002 ++#define ENGINE_DH_ASYNC 0x0004 ++#define ENGINE_ECDSA_ASYNC 0x0008 ++#define ENGINE_ECDH_ASYNC 0x0010 ++#define ENGINE_ALLPKC_ASYNC 0x001F ++/* Engine implementation will set the bitmap based on above flags using following API */ ++void ENGINE_set_async_map(ENGINE *e, int async_map); ++ /* Application need to check the bitmap based on above flags using following API ++ * to confirm asynchronous methods supported ++ */ ++int ENGINE_get_async_map(ENGINE *e); ++void *ENGINE_init_instance(ENGINE *e); ++void ENGINE_close_instance(ENGINE *e, void *eng_handle); ++void ENGINE_set_check_pkc_availability(ENGINE *e, ++ int (*check_pkc_availability)(void *eng_handle)); ++int ENGINE_check_pkc_availability(ENGINE *e, void *eng_handle); + int ENGINE_set_name(ENGINE *e, const char *name); + int ENGINE_set_RSA(ENGINE *e, const RSA_METHOD *rsa_meth); + int ENGINE_set_DSA(ENGINE *e, const DSA_METHOD *dsa_meth); +diff --git a/crypto/rsa/rsa.h b/crypto/rsa/rsa.h +index 5f269e5..6ef1b15 100644 +--- a/crypto/rsa/rsa.h ++++ b/crypto/rsa/rsa.h +@@ -101,6 +101,29 @@ struct rsa_meth_st + int (*bn_mod_exp)(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, + const BIGNUM *m, BN_CTX *ctx, + BN_MONT_CTX *m_ctx); /* Can be null */ ++ /* ++ * Cookie in the following _async variant must be allocated before ++ * submission and can be freed once its corresponding callback ++ * handler is called ++ */ ++ int (*rsa_pub_enc_asyn)(int flen,const unsigned char *from, ++ unsigned char *to, RSA *rsa, int padding, ++ struct pkc_cookie_s *cookie); ++ int (*rsa_pub_dec_async)(int flen,const unsigned char *from, ++ unsigned char *to, RSA *rsa, int padding, ++ struct pkc_cookie_s *cookie); ++ int (*rsa_priv_enc_async)(int flen,const unsigned char *from, ++ unsigned char *to, RSA *rsa, int padding, ++ struct pkc_cookie_s *cookie); ++ int (*rsa_priv_dec_async)(int flen,const unsigned char *from, ++ unsigned char *to, RSA *rsa, int padding, ++ struct pkc_cookie_s *cookie); ++ int (*rsa_mod_exp_async)(BIGNUM *r0, const BIGNUM *I, RSA *rsa, ++ BN_CTX *ctx, struct pkc_cookie_s *cookie); ++ int (*bn_mod_exp_async)(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, ++ const BIGNUM *m, BN_CTX *ctx, ++ BN_MONT_CTX *m_ctx, struct pkc_cookie_s *cookie); ++ + int (*init)(RSA *rsa); /* called at new */ + int (*finish)(RSA *rsa); /* called at free */ + int flags; /* RSA_METHOD_FLAG_* things */ +-- +1.8.3.1 + diff --git a/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0011-Add-RSA-keygen-operation-and-support-gendsa-command-.patch b/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0011-Add-RSA-keygen-operation-and-support-gendsa-command-.patch new file mode 100644 index 00000000..5e742986 --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0011-Add-RSA-keygen-operation-and-support-gendsa-command-.patch @@ -0,0 +1,153 @@ +From e4fc051f8ae1c093b25ca346c2ec351ff3b700d1 Mon Sep 17 00:00:00 2001 +From: Hou Zhiqiang +Date: Wed, 2 Apr 2014 16:10:43 +0800 +Subject: [PATCH 11/17] Add RSA keygen operation and support gendsa command + with hardware engine + +Upstream-status: Pending + +Signed-off-by: Hou Zhiqiang +Tested-by: Cristian Stoica +--- + crypto/engine/eng_cryptodev.c | 118 ++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 118 insertions(+) + +diff --git a/crypto/engine/eng_cryptodev.c b/crypto/engine/eng_cryptodev.c +index 9f2416e..b2919a8 100644 +--- a/crypto/engine/eng_cryptodev.c ++++ b/crypto/engine/eng_cryptodev.c +@@ -1906,6 +1906,121 @@ err: + return dsaret; + } + ++/* Cryptodev RSA Key Gen routine */ ++static int cryptodev_rsa_keygen(RSA *rsa, int bits, BIGNUM *e, BN_GENCB *cb) ++{ ++ struct crypt_kop kop; ++ int ret, fd; ++ int p_len, q_len; ++ int i; ++ ++ if ((fd = get_asym_dev_crypto()) < 0) ++ return fd; ++ ++ if(!rsa->n && ((rsa->n=BN_new()) == NULL)) goto err; ++ if(!rsa->d && ((rsa->d=BN_new()) == NULL)) goto err; ++ if(!rsa->e && ((rsa->e=BN_new()) == NULL)) goto err; ++ if(!rsa->p && ((rsa->p=BN_new()) == NULL)) goto err; ++ if(!rsa->q && ((rsa->q=BN_new()) == NULL)) goto err; ++ if(!rsa->dmp1 && ((rsa->dmp1=BN_new()) == NULL)) goto err; ++ if(!rsa->dmq1 && ((rsa->dmq1=BN_new()) == NULL)) goto err; ++ if(!rsa->iqmp && ((rsa->iqmp=BN_new()) == NULL)) goto err; ++ ++ BN_copy(rsa->e, e); ++ ++ p_len = (bits+1) / (2 * 8); ++ q_len = (bits - p_len * 8) / 8; ++ memset(&kop, 0, sizeof kop); ++ kop.crk_op = CRK_RSA_GENERATE_KEY; ++ ++ /* p length */ ++ kop.crk_param[kop.crk_iparams].crp_p = calloc(p_len + 1, sizeof(char)); ++ if (!kop.crk_param[kop.crk_iparams].crp_p) ++ goto err; ++ kop.crk_param[kop.crk_iparams].crp_nbits = p_len * 8; ++ memset(kop.crk_param[kop.crk_iparams].crp_p, 0xff, p_len + 1); ++ kop.crk_iparams++; ++ kop.crk_oparams++; ++ /* q length */ ++ kop.crk_param[kop.crk_iparams].crp_p = calloc(q_len + 1, sizeof(char)); ++ if (!kop.crk_param[kop.crk_iparams].crp_p) ++ goto err; ++ kop.crk_param[kop.crk_iparams].crp_nbits = q_len * 8; ++ memset(kop.crk_param[kop.crk_iparams].crp_p, 0xff, q_len + 1); ++ kop.crk_iparams++; ++ kop.crk_oparams++; ++ /* n length */ ++ kop.crk_param[kop.crk_iparams].crp_p = calloc(p_len + q_len + 1, sizeof(char)); ++ if (!kop.crk_param[kop.crk_iparams].crp_p) ++ goto err; ++ kop.crk_param[kop.crk_iparams].crp_nbits = bits; ++ memset(kop.crk_param[kop.crk_iparams].crp_p, 0x00, p_len + q_len + 1); ++ kop.crk_iparams++; ++ kop.crk_oparams++; ++ /* d length */ ++ kop.crk_param[kop.crk_iparams].crp_p = calloc(p_len + q_len + 1, sizeof(char)); ++ if (!kop.crk_param[kop.crk_iparams].crp_p) ++ goto err; ++ kop.crk_param[kop.crk_iparams].crp_nbits = bits; ++ memset(kop.crk_param[kop.crk_iparams].crp_p, 0xff, p_len + q_len + 1); ++ kop.crk_iparams++; ++ kop.crk_oparams++; ++ /* dp1 length */ ++ kop.crk_param[kop.crk_iparams].crp_p = calloc(p_len + 1, sizeof(char)); ++ if (!kop.crk_param[kop.crk_iparams].crp_p) ++ goto err; ++ kop.crk_param[kop.crk_iparams].crp_nbits = p_len * 8; ++ memset(kop.crk_param[kop.crk_iparams].crp_p, 0xff, p_len + 1); ++ kop.crk_iparams++; ++ kop.crk_oparams++; ++ /* dq1 length */ ++ kop.crk_param[kop.crk_iparams].crp_p = calloc(q_len + 1, sizeof(char)); ++ if (!kop.crk_param[kop.crk_iparams].crp_p) ++ goto err; ++ kop.crk_param[kop.crk_iparams].crp_nbits = q_len * 8; ++ memset(kop.crk_param[kop.crk_iparams].crp_p, 0xff, q_len + 1); ++ kop.crk_iparams++; ++ kop.crk_oparams++; ++ /* i length */ ++ kop.crk_param[kop.crk_iparams].crp_p = calloc(p_len + 1, sizeof(char)); ++ if (!kop.crk_param[kop.crk_iparams].crp_p) ++ goto err; ++ kop.crk_param[kop.crk_iparams].crp_nbits = p_len * 8; ++ memset(kop.crk_param[kop.crk_iparams].crp_p, 0xff, p_len + 1); ++ kop.crk_iparams++; ++ kop.crk_oparams++; ++ ++ if (ioctl(fd, CIOCKEY, &kop) == 0) { ++ BN_bin2bn(kop.crk_param[0].crp_p, ++ p_len, rsa->p); ++ BN_bin2bn(kop.crk_param[1].crp_p, ++ q_len, rsa->q); ++ BN_bin2bn(kop.crk_param[2].crp_p, ++ bits / 8, rsa->n); ++ BN_bin2bn(kop.crk_param[3].crp_p, ++ bits / 8, rsa->d); ++ BN_bin2bn(kop.crk_param[4].crp_p, ++ p_len, rsa->dmp1); ++ BN_bin2bn(kop.crk_param[5].crp_p, ++ q_len, rsa->dmq1); ++ BN_bin2bn(kop.crk_param[6].crp_p, ++ p_len, rsa->iqmp); ++ return 1; ++ } ++sw_try: ++ { ++ const RSA_METHOD *meth = RSA_PKCS1_SSLeay(); ++ ret = (meth->rsa_keygen)(rsa, bits, e, cb); ++ } ++ return ret; ++ ++err: ++ for (i = 0; i < CRK_MAXPARAM; i++) ++ free(kop.crk_param[i].crp_p); ++ return 0; ++ ++} ++ + /* Cryptodev DSA Key Gen routine */ + static int cryptodev_dsa_keygen(DSA *dsa) + { +@@ -3896,6 +4011,9 @@ ENGINE_load_cryptodev(void) + cryptodev_rsa.rsa_mod_exp_async = + cryptodev_rsa_nocrt_mod_exp_async; + } ++ if (cryptodev_asymfeat & CRF_RSA_GENERATE_KEY) ++ cryptodev_rsa.rsa_keygen = ++ cryptodev_rsa_keygen; + } + } + +-- +1.8.3.1 + diff --git a/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0011-RSA-Keygen-Fix.patch b/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0011-RSA-Keygen-Fix.patch deleted file mode 100644 index b2d636a4..00000000 --- a/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0011-RSA-Keygen-Fix.patch +++ /dev/null @@ -1,64 +0,0 @@ -From f44fc935d5bc601cd625a64a366e64b19f2bb730 Mon Sep 17 00:00:00 2001 -From: Yashpal Dutta -Date: Wed, 16 Apr 2014 22:53:04 +0545 -Subject: [PATCH][fsl 11/15] RSA Keygen Fix - -Upstream-status: Pending - -If Kernel driver doesn't support RSA Keygen or same returns -error handling the keygen operation, the keygen is gracefully -handled by software supported rsa_keygen handler - -Signed-off-by: Yashpal Dutta -Tested-by: Cristian Stoica ---- - crypto/engine/eng_cryptodev.c | 12 +++++++----- - 1 file changed, 7 insertions(+), 5 deletions(-) - -diff --git a/crypto/engine/eng_cryptodev.c b/crypto/engine/eng_cryptodev.c -index 0a6567c..5d54f7e 100644 ---- a/crypto/engine/eng_cryptodev.c -+++ b/crypto/engine/eng_cryptodev.c -@@ -1921,7 +1921,7 @@ static int cryptodev_rsa_keygen(RSA *rsa, int bits, BIGNUM *e, BN_GENCB *cb) - int i; - - if ((fd = get_asym_dev_crypto()) < 0) -- return fd; -+ goto sw_try; - - if(!rsa->n && ((rsa->n=BN_new()) == NULL)) goto err; - if(!rsa->d && ((rsa->d=BN_new()) == NULL)) goto err; -@@ -1942,7 +1942,7 @@ static int cryptodev_rsa_keygen(RSA *rsa, int bits, BIGNUM *e, BN_GENCB *cb) - /* p length */ - kop.crk_param[kop.crk_iparams].crp_p = calloc(p_len + 1, sizeof(char)); - if (!kop.crk_param[kop.crk_iparams].crp_p) -- goto err; -+ goto sw_try; - kop.crk_param[kop.crk_iparams].crp_nbits = p_len * 8; - memset(kop.crk_param[kop.crk_iparams].crp_p, 0xff, p_len + 1); - kop.crk_iparams++; -@@ -1950,7 +1950,7 @@ static int cryptodev_rsa_keygen(RSA *rsa, int bits, BIGNUM *e, BN_GENCB *cb) - /* q length */ - kop.crk_param[kop.crk_iparams].crp_p = calloc(q_len + 1, sizeof(char)); - if (!kop.crk_param[kop.crk_iparams].crp_p) -- goto err; -+ goto sw_try; - kop.crk_param[kop.crk_iparams].crp_nbits = q_len * 8; - memset(kop.crk_param[kop.crk_iparams].crp_p, 0xff, q_len + 1); - kop.crk_iparams++; -@@ -2015,8 +2015,10 @@ static int cryptodev_rsa_keygen(RSA *rsa, int bits, BIGNUM *e, BN_GENCB *cb) - } - sw_try: - { -- const RSA_METHOD *meth = RSA_PKCS1_SSLeay(); -- ret = (meth->rsa_keygen)(rsa, bits, e, cb); -+ const RSA_METHOD *meth = rsa->meth; -+ rsa->meth = RSA_PKCS1_SSLeay(); -+ ret = RSA_generate_key_ex(rsa, bits, e, cb); -+ rsa->meth = meth; - } - return ret; - --- -1.7.9.7 - diff --git a/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0012-RSA-Keygen-Fix.patch b/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0012-RSA-Keygen-Fix.patch new file mode 100644 index 00000000..44899733 --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0012-RSA-Keygen-Fix.patch @@ -0,0 +1,64 @@ +From ac777f046da7151386d667391362ecb553ceee90 Mon Sep 17 00:00:00 2001 +From: Yashpal Dutta +Date: Wed, 16 Apr 2014 22:53:04 +0545 +Subject: [PATCH 12/17] RSA Keygen Fix + +Upstream-status: Pending + +If Kernel driver doesn't support RSA Keygen or same returns +error handling the keygen operation, the keygen is gracefully +handled by software supported rsa_keygen handler + +Signed-off-by: Yashpal Dutta +Tested-by: Cristian Stoica +--- + crypto/engine/eng_cryptodev.c | 12 +++++++----- + 1 file changed, 7 insertions(+), 5 deletions(-) + +diff --git a/crypto/engine/eng_cryptodev.c b/crypto/engine/eng_cryptodev.c +index b2919a8..ed5f20f 100644 +--- a/crypto/engine/eng_cryptodev.c ++++ b/crypto/engine/eng_cryptodev.c +@@ -1915,7 +1915,7 @@ static int cryptodev_rsa_keygen(RSA *rsa, int bits, BIGNUM *e, BN_GENCB *cb) + int i; + + if ((fd = get_asym_dev_crypto()) < 0) +- return fd; ++ goto sw_try; + + if(!rsa->n && ((rsa->n=BN_new()) == NULL)) goto err; + if(!rsa->d && ((rsa->d=BN_new()) == NULL)) goto err; +@@ -1936,7 +1936,7 @@ static int cryptodev_rsa_keygen(RSA *rsa, int bits, BIGNUM *e, BN_GENCB *cb) + /* p length */ + kop.crk_param[kop.crk_iparams].crp_p = calloc(p_len + 1, sizeof(char)); + if (!kop.crk_param[kop.crk_iparams].crp_p) +- goto err; ++ goto sw_try; + kop.crk_param[kop.crk_iparams].crp_nbits = p_len * 8; + memset(kop.crk_param[kop.crk_iparams].crp_p, 0xff, p_len + 1); + kop.crk_iparams++; +@@ -1944,7 +1944,7 @@ static int cryptodev_rsa_keygen(RSA *rsa, int bits, BIGNUM *e, BN_GENCB *cb) + /* q length */ + kop.crk_param[kop.crk_iparams].crp_p = calloc(q_len + 1, sizeof(char)); + if (!kop.crk_param[kop.crk_iparams].crp_p) +- goto err; ++ goto sw_try; + kop.crk_param[kop.crk_iparams].crp_nbits = q_len * 8; + memset(kop.crk_param[kop.crk_iparams].crp_p, 0xff, q_len + 1); + kop.crk_iparams++; +@@ -2009,8 +2009,10 @@ static int cryptodev_rsa_keygen(RSA *rsa, int bits, BIGNUM *e, BN_GENCB *cb) + } + sw_try: + { +- const RSA_METHOD *meth = RSA_PKCS1_SSLeay(); +- ret = (meth->rsa_keygen)(rsa, bits, e, cb); ++ const RSA_METHOD *meth = rsa->meth; ++ rsa->meth = RSA_PKCS1_SSLeay(); ++ ret = RSA_generate_key_ex(rsa, bits, e, cb); ++ rsa->meth = meth; + } + return ret; + +-- +1.8.3.1 + diff --git a/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0012-Removed-local-copy-of-curve_t-type.patch b/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0012-Removed-local-copy-of-curve_t-type.patch deleted file mode 100644 index 077b08e7..00000000 --- a/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0012-Removed-local-copy-of-curve_t-type.patch +++ /dev/null @@ -1,164 +0,0 @@ -From 7a6848210c3b2f42aed4de60646e0e63c0e35fcb Mon Sep 17 00:00:00 2001 -From: Yashpal Dutta -Date: Thu, 17 Apr 2014 06:57:59 +0545 -Subject: [PATCH][fsl 12/15] Removed local copy of curve_t type - -Upstream-status: Pending - -Signed-off-by: Yashpal Dutta -Tested-by: Cristian Stoica ---- - crypto/engine/eng_cryptodev.c | 34 ++++++++++++++-------------------- - crypto/engine/eng_cryptodev_ec.h | 7 ------- - 2 files changed, 14 insertions(+), 27 deletions(-) - -diff --git a/crypto/engine/eng_cryptodev.c b/crypto/engine/eng_cryptodev.c -index 5d54f7e..33447c8 100644 ---- a/crypto/engine/eng_cryptodev.c -+++ b/crypto/engine/eng_cryptodev.c -@@ -2404,12 +2404,6 @@ static ECDSA_METHOD cryptodev_ecdsa = { - NULL /* app_data */ - }; - --typedef enum ec_curve_s --{ -- EC_PRIME, -- EC_BINARY --} ec_curve_t; -- - /* ENGINE handler for ECDSA Sign */ - static ECDSA_SIG *cryptodev_ecdsa_do_sign( const unsigned char *dgst, - int dgst_len, const BIGNUM *in_kinv, const BIGNUM *in_r, EC_KEY *eckey) -@@ -2426,7 +2420,7 @@ static ECDSA_SIG *cryptodev_ecdsa_do_sign( const unsigned char *dgst, - const BIGNUM *order = NULL, *priv_key=NULL; - const EC_GROUP *group = NULL; - struct crypt_kop kop; -- ec_curve_t ec_crv = EC_PRIME; -+ enum ec_curve_t ec_crv = EC_PRIME; - - memset(&kop, 0, sizeof(kop)); - ecdsa = ecdsa_check(eckey); -@@ -2559,7 +2553,7 @@ static ECDSA_SIG *cryptodev_ecdsa_do_sign( const unsigned char *dgst, - else - goto err; - } -- kop.curve_type = ECC_BINARY; -+ kop.curve_type = EC_BINARY; - } - - /* Calculation of Generator point */ -@@ -2653,7 +2647,7 @@ static int cryptodev_ecdsa_verify(const unsigned char *dgst, int dgst_len, - const EC_POINT *pub_key = NULL; - const BIGNUM *order = NULL; - const EC_GROUP *group=NULL; -- ec_curve_t ec_crv = EC_PRIME; -+ enum ec_curve_t ec_crv = EC_PRIME; - struct crypt_kop kop; - - memset(&kop, 0, sizeof kop); -@@ -2798,7 +2792,7 @@ static int cryptodev_ecdsa_verify(const unsigned char *dgst, int dgst_len, - else - goto err; - } -- kop.curve_type = ECC_BINARY; -+ kop.curve_type = EC_BINARY; - } - - /* Calculation of Generator point */ -@@ -2899,7 +2893,7 @@ static int cryptodev_ecdsa_do_sign_async( const unsigned char *dgst, - const BIGNUM *order = NULL, *priv_key=NULL; - const EC_GROUP *group = NULL; - struct crypt_kop *kop = malloc(sizeof(struct crypt_kop)); -- ec_curve_t ec_crv = EC_PRIME; -+ enum ec_curve_t ec_crv = EC_PRIME; - - if (!(sig->r = BN_new()) || !kop) - goto err; -@@ -3035,7 +3029,7 @@ static int cryptodev_ecdsa_do_sign_async( const unsigned char *dgst, - else - goto err; - } -- kop->curve_type = ECC_BINARY; -+ kop->curve_type = EC_BINARY; - } - - /* Calculation of Generator point */ -@@ -3111,7 +3105,7 @@ static int cryptodev_ecdsa_verify_async(const unsigned char *dgst, int dgst_len, - const EC_POINT *pub_key = NULL; - const BIGNUM *order = NULL; - const EC_GROUP *group=NULL; -- ec_curve_t ec_crv = EC_PRIME; -+ enum ec_curve_t ec_crv = EC_PRIME; - struct crypt_kop *kop = malloc(sizeof(struct crypt_kop)); - - if (!kop) -@@ -3253,7 +3247,7 @@ static int cryptodev_ecdsa_verify_async(const unsigned char *dgst, int dgst_len, - /* copy b' i.e c(b), instead of only b */ - eng_ec_get_cparam (EC_GROUP_get_curve_name(group), - ab+q_len, q_len); -- kop->curve_type = ECC_BINARY; -+ kop->curve_type = EC_BINARY; - } - - /* Calculation of Generator point */ -@@ -3558,7 +3552,7 @@ int cryptodev_ecdh_compute_key(void *out, size_t outlen, - const EC_POINT *pub_key, EC_KEY *ecdh, void *(*KDF)(const void *in, size_t inlen, - void *out, size_t *outlen)) - { -- ec_curve_t ec_crv = EC_PRIME; -+ enum ec_curve_t ec_crv = EC_PRIME; - unsigned char * q = NULL, *w_xy = NULL, *ab = NULL, *s = NULL, *r = NULL; - BIGNUM * w_x = NULL, *w_y = NULL; - int q_len = 0, ab_len = 0, pub_key_len = 0, r_len = 0, priv_key_len = 0; -@@ -3684,9 +3678,9 @@ int cryptodev_ecdh_compute_key(void *out, size_t outlen, - else - goto err; - } -- kop.curve_type = ECC_BINARY; -+ kop.curve_type = EC_BINARY; - } else -- kop.curve_type = ECC_PRIME; -+ kop.curve_type = EC_PRIME; - - priv_key_len = r_len; - -@@ -3735,7 +3729,7 @@ int cryptodev_ecdh_compute_key_async(void *out, size_t outlen, - const EC_POINT *pub_key, EC_KEY *ecdh, void *(*KDF)(const void *in, size_t inlen, - void *out, size_t *outlen), struct pkc_cookie_s *cookie) - { -- ec_curve_t ec_crv = EC_PRIME; -+ enum ec_curve_t ec_crv = EC_PRIME; - unsigned char * q = NULL, *w_xy = NULL, *ab = NULL, *s = NULL, *r = NULL; - BIGNUM * w_x = NULL, *w_y = NULL; - int q_len = 0, ab_len = 0, pub_key_len = 0, r_len = 0, priv_key_len = 0; -@@ -3863,9 +3857,9 @@ int cryptodev_ecdh_compute_key_async(void *out, size_t outlen, - else - goto err; - } -- kop->curve_type = ECC_BINARY; -+ kop->curve_type = EC_BINARY; - } else -- kop->curve_type = ECC_PRIME; -+ kop->curve_type = EC_PRIME; - - priv_key_len = r_len; - -diff --git a/crypto/engine/eng_cryptodev_ec.h b/crypto/engine/eng_cryptodev_ec.h -index 77aee71..a4b8da5 100644 ---- a/crypto/engine/eng_cryptodev_ec.h -+++ b/crypto/engine/eng_cryptodev_ec.h -@@ -286,11 +286,4 @@ static inline unsigned char *eng_copy_curve_points(BIGNUM * x, BIGNUM * y, - - return xy; - } -- --enum curve_t { -- DISCRETE_LOG, -- ECC_PRIME, -- ECC_BINARY, -- MAX_ECC_TYPE --}; - #endif --- -1.7.9.7 - diff --git a/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0013-Modulus-parameter-is-not-populated-by-dhparams.patch b/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0013-Modulus-parameter-is-not-populated-by-dhparams.patch deleted file mode 100644 index 11f06226..00000000 --- a/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0013-Modulus-parameter-is-not-populated-by-dhparams.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 8aabfeb1308188a46d3f370cd757de130e73eb9b Mon Sep 17 00:00:00 2001 -From: Yashpal Dutta -Date: Tue, 22 Apr 2014 22:58:33 +0545 -Subject: [PATCH][fsl 13/15] Modulus parameter is not populated by dhparams - -Upstream-status: Pending - -When dhparams are created, modulus parameter required for -private key generation is not populated. So, falling back -to software for proper population of modulus parameters followed -by private key generation - -Signed-off-by: Yashpal Dutta -Tested-by: Cristian Stoica ---- - crypto/engine/eng_cryptodev.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/crypto/engine/eng_cryptodev.c b/crypto/engine/eng_cryptodev.c -index 33447c8..8de8f09 100644 ---- a/crypto/engine/eng_cryptodev.c -+++ b/crypto/engine/eng_cryptodev.c -@@ -3370,7 +3370,7 @@ static int cryptodev_dh_keygen_async(DH *dh, struct pkc_cookie_s *cookie) - kop->crk_op = CRK_DH_GENERATE_KEY; - if (bn2crparam(dh->p, &kop->crk_param[0])) - goto sw_try; -- if (bn2crparam(dh->q, &kop->crk_param[1])) -+ if (!dh->q || bn2crparam(dh->q, &kop->crk_param[1])) - goto sw_try; - kop->crk_param[2].crp_p = g; - kop->crk_param[2].crp_nbits = g_len * 8; -@@ -3425,7 +3425,7 @@ static int cryptodev_dh_keygen(DH *dh) - kop.crk_op = CRK_DH_GENERATE_KEY; - if (bn2crparam(dh->p, &kop.crk_param[0])) - goto sw_try; -- if (bn2crparam(dh->q, &kop.crk_param[1])) -+ if (!dh->q || bn2crparam(dh->q, &kop.crk_param[1])) - goto sw_try; - kop.crk_param[2].crp_p = g; - kop.crk_param[2].crp_nbits = g_len * 8; --- -1.7.9.7 - diff --git a/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0013-Removed-local-copy-of-curve_t-type.patch b/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0013-Removed-local-copy-of-curve_t-type.patch new file mode 100644 index 00000000..183f3fbd --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0013-Removed-local-copy-of-curve_t-type.patch @@ -0,0 +1,164 @@ +From 6aaa306cdf878250d7b6eaf30978de313653886b Mon Sep 17 00:00:00 2001 +From: Yashpal Dutta +Date: Thu, 17 Apr 2014 06:57:59 +0545 +Subject: [PATCH 13/17] Removed local copy of curve_t type + +Upstream-status: Pending + +Signed-off-by: Yashpal Dutta +Tested-by: Cristian Stoica +--- + crypto/engine/eng_cryptodev.c | 34 ++++++++++++++-------------------- + crypto/engine/eng_cryptodev_ec.h | 7 ------- + 2 files changed, 14 insertions(+), 27 deletions(-) + +diff --git a/crypto/engine/eng_cryptodev.c b/crypto/engine/eng_cryptodev.c +index ed5f20f..5d883fa 100644 +--- a/crypto/engine/eng_cryptodev.c ++++ b/crypto/engine/eng_cryptodev.c +@@ -2398,12 +2398,6 @@ static ECDSA_METHOD cryptodev_ecdsa = { + NULL /* app_data */ + }; + +-typedef enum ec_curve_s +-{ +- EC_PRIME, +- EC_BINARY +-} ec_curve_t; +- + /* ENGINE handler for ECDSA Sign */ + static ECDSA_SIG *cryptodev_ecdsa_do_sign( const unsigned char *dgst, + int dgst_len, const BIGNUM *in_kinv, const BIGNUM *in_r, EC_KEY *eckey) +@@ -2420,7 +2414,7 @@ static ECDSA_SIG *cryptodev_ecdsa_do_sign( const unsigned char *dgst, + const BIGNUM *order = NULL, *priv_key=NULL; + const EC_GROUP *group = NULL; + struct crypt_kop kop; +- ec_curve_t ec_crv = EC_PRIME; ++ enum ec_curve_t ec_crv = EC_PRIME; + + memset(&kop, 0, sizeof(kop)); + ecdsa = ecdsa_check(eckey); +@@ -2553,7 +2547,7 @@ static ECDSA_SIG *cryptodev_ecdsa_do_sign( const unsigned char *dgst, + else + goto err; + } +- kop.curve_type = ECC_BINARY; ++ kop.curve_type = EC_BINARY; + } + + /* Calculation of Generator point */ +@@ -2647,7 +2641,7 @@ static int cryptodev_ecdsa_verify(const unsigned char *dgst, int dgst_len, + const EC_POINT *pub_key = NULL; + const BIGNUM *order = NULL; + const EC_GROUP *group=NULL; +- ec_curve_t ec_crv = EC_PRIME; ++ enum ec_curve_t ec_crv = EC_PRIME; + struct crypt_kop kop; + + memset(&kop, 0, sizeof kop); +@@ -2792,7 +2786,7 @@ static int cryptodev_ecdsa_verify(const unsigned char *dgst, int dgst_len, + else + goto err; + } +- kop.curve_type = ECC_BINARY; ++ kop.curve_type = EC_BINARY; + } + + /* Calculation of Generator point */ +@@ -2893,7 +2887,7 @@ static int cryptodev_ecdsa_do_sign_async( const unsigned char *dgst, + const BIGNUM *order = NULL, *priv_key=NULL; + const EC_GROUP *group = NULL; + struct crypt_kop *kop = malloc(sizeof(struct crypt_kop)); +- ec_curve_t ec_crv = EC_PRIME; ++ enum ec_curve_t ec_crv = EC_PRIME; + + if (!(sig->r = BN_new()) || !kop) + goto err; +@@ -3029,7 +3023,7 @@ static int cryptodev_ecdsa_do_sign_async( const unsigned char *dgst, + else + goto err; + } +- kop->curve_type = ECC_BINARY; ++ kop->curve_type = EC_BINARY; + } + + /* Calculation of Generator point */ +@@ -3105,7 +3099,7 @@ static int cryptodev_ecdsa_verify_async(const unsigned char *dgst, int dgst_len, + const EC_POINT *pub_key = NULL; + const BIGNUM *order = NULL; + const EC_GROUP *group=NULL; +- ec_curve_t ec_crv = EC_PRIME; ++ enum ec_curve_t ec_crv = EC_PRIME; + struct crypt_kop *kop = malloc(sizeof(struct crypt_kop)); + + if (!kop) +@@ -3247,7 +3241,7 @@ static int cryptodev_ecdsa_verify_async(const unsigned char *dgst, int dgst_len, + /* copy b' i.e c(b), instead of only b */ + eng_ec_get_cparam (EC_GROUP_get_curve_name(group), + ab+q_len, q_len); +- kop->curve_type = ECC_BINARY; ++ kop->curve_type = EC_BINARY; + } + + /* Calculation of Generator point */ +@@ -3552,7 +3546,7 @@ int cryptodev_ecdh_compute_key(void *out, size_t outlen, + const EC_POINT *pub_key, EC_KEY *ecdh, void *(*KDF)(const void *in, size_t inlen, + void *out, size_t *outlen)) + { +- ec_curve_t ec_crv = EC_PRIME; ++ enum ec_curve_t ec_crv = EC_PRIME; + unsigned char * q = NULL, *w_xy = NULL, *ab = NULL, *s = NULL, *r = NULL; + BIGNUM * w_x = NULL, *w_y = NULL; + int q_len = 0, ab_len = 0, pub_key_len = 0, r_len = 0, priv_key_len = 0; +@@ -3678,9 +3672,9 @@ int cryptodev_ecdh_compute_key(void *out, size_t outlen, + else + goto err; + } +- kop.curve_type = ECC_BINARY; ++ kop.curve_type = EC_BINARY; + } else +- kop.curve_type = ECC_PRIME; ++ kop.curve_type = EC_PRIME; + + priv_key_len = r_len; + +@@ -3729,7 +3723,7 @@ int cryptodev_ecdh_compute_key_async(void *out, size_t outlen, + const EC_POINT *pub_key, EC_KEY *ecdh, void *(*KDF)(const void *in, size_t inlen, + void *out, size_t *outlen), struct pkc_cookie_s *cookie) + { +- ec_curve_t ec_crv = EC_PRIME; ++ enum ec_curve_t ec_crv = EC_PRIME; + unsigned char * q = NULL, *w_xy = NULL, *ab = NULL, *s = NULL, *r = NULL; + BIGNUM * w_x = NULL, *w_y = NULL; + int q_len = 0, ab_len = 0, pub_key_len = 0, r_len = 0, priv_key_len = 0; +@@ -3857,9 +3851,9 @@ int cryptodev_ecdh_compute_key_async(void *out, size_t outlen, + else + goto err; + } +- kop->curve_type = ECC_BINARY; ++ kop->curve_type = EC_BINARY; + } else +- kop->curve_type = ECC_PRIME; ++ kop->curve_type = EC_PRIME; + + priv_key_len = r_len; + +diff --git a/crypto/engine/eng_cryptodev_ec.h b/crypto/engine/eng_cryptodev_ec.h +index 77aee71..a4b8da5 100644 +--- a/crypto/engine/eng_cryptodev_ec.h ++++ b/crypto/engine/eng_cryptodev_ec.h +@@ -286,11 +286,4 @@ static inline unsigned char *eng_copy_curve_points(BIGNUM * x, BIGNUM * y, + + return xy; + } +- +-enum curve_t { +- DISCRETE_LOG, +- ECC_PRIME, +- ECC_BINARY, +- MAX_ECC_TYPE +-}; + #endif +-- +1.8.3.1 + diff --git a/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0014-Modulus-parameter-is-not-populated-by-dhparams.patch b/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0014-Modulus-parameter-is-not-populated-by-dhparams.patch new file mode 100644 index 00000000..46846f8f --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0014-Modulus-parameter-is-not-populated-by-dhparams.patch @@ -0,0 +1,43 @@ +From 14623ca9e417ccef1ad3f4138acfac0ebe682f1f Mon Sep 17 00:00:00 2001 +From: Yashpal Dutta +Date: Tue, 22 Apr 2014 22:58:33 +0545 +Subject: [PATCH 14/17] Modulus parameter is not populated by dhparams + +Upstream-status: Pending + +When dhparams are created, modulus parameter required for +private key generation is not populated. So, falling back +to software for proper population of modulus parameters followed +by private key generation + +Signed-off-by: Yashpal Dutta +Tested-by: Cristian Stoica +--- + crypto/engine/eng_cryptodev.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/crypto/engine/eng_cryptodev.c b/crypto/engine/eng_cryptodev.c +index 5d883fa..6d69336 100644 +--- a/crypto/engine/eng_cryptodev.c ++++ b/crypto/engine/eng_cryptodev.c +@@ -3364,7 +3364,7 @@ static int cryptodev_dh_keygen_async(DH *dh, struct pkc_cookie_s *cookie) + kop->crk_op = CRK_DH_GENERATE_KEY; + if (bn2crparam(dh->p, &kop->crk_param[0])) + goto sw_try; +- if (bn2crparam(dh->q, &kop->crk_param[1])) ++ if (!dh->q || bn2crparam(dh->q, &kop->crk_param[1])) + goto sw_try; + kop->crk_param[2].crp_p = g; + kop->crk_param[2].crp_nbits = g_len * 8; +@@ -3419,7 +3419,7 @@ static int cryptodev_dh_keygen(DH *dh) + kop.crk_op = CRK_DH_GENERATE_KEY; + if (bn2crparam(dh->p, &kop.crk_param[0])) + goto sw_try; +- if (bn2crparam(dh->q, &kop.crk_param[1])) ++ if (!dh->q || bn2crparam(dh->q, &kop.crk_param[1])) + goto sw_try; + kop.crk_param[2].crp_p = g; + kop.crk_param[2].crp_nbits = g_len * 8; +-- +1.8.3.1 + diff --git a/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0014-SW-Backoff-mechanism-for-dsa-keygen.patch b/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0014-SW-Backoff-mechanism-for-dsa-keygen.patch deleted file mode 100644 index e5aa1baa..00000000 --- a/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0014-SW-Backoff-mechanism-for-dsa-keygen.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 8b1ed323d08dce8b6e303ce63a82337543e9187f Mon Sep 17 00:00:00 2001 -From: Yashpal Dutta -Date: Thu, 24 Apr 2014 00:35:34 +0545 -Subject: [PATCH][fsl 14/15] SW Backoff mechanism for dsa keygen - -Upstream-status: Pending - -DSA Keygen is not handled in default openssl dsa method. Due to -same null function pointer in SW DSA method, the backoff for dsa -keygen gives segmentation fault. - -Signed-off-by: Yashpal Dutta -Tested-by: Cristian Stoica ---- - crypto/engine/eng_cryptodev.c | 12 ++++++++---- - 1 file changed, 8 insertions(+), 4 deletions(-) - -diff --git a/crypto/engine/eng_cryptodev.c b/crypto/engine/eng_cryptodev.c -index 8de8f09..7c2661f 100644 ---- a/crypto/engine/eng_cryptodev.c -+++ b/crypto/engine/eng_cryptodev.c -@@ -2075,8 +2075,10 @@ static int cryptodev_dsa_keygen(DSA *dsa) - return ret; - sw_try: - { -- const DSA_METHOD *meth = DSA_OpenSSL(); -- ret = (meth->dsa_keygen)(dsa); -+ const DSA_METHOD *meth = dsa->meth; -+ dsa->meth = DSA_OpenSSL(); -+ ret = DSA_generate_key(dsa); -+ dsa->meth = meth; - } - return ret; - } -@@ -2130,11 +2132,13 @@ static int cryptodev_dsa_keygen_async(DSA *dsa, struct pkc_cookie_s *cookie) - return ret; - sw_try: - { -- const DSA_METHOD *meth = DSA_OpenSSL(); -+ const DSA_METHOD *meth = dsa->meth; - -+ dsa->meth = DSA_OpenSSL(); - if (kop) - free(kop); -- ret = (meth->dsa_keygen)(dsa); -+ ret = DSA_generate_key(dsa); -+ dsa->meth = meth; - cookie->pkc_callback(cookie, 0); - } - return ret; --- -1.7.9.7 - diff --git a/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0015-Fixed-DH-keygen-pair-generator.patch b/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0015-Fixed-DH-keygen-pair-generator.patch deleted file mode 100644 index 99e6094f..00000000 --- a/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0015-Fixed-DH-keygen-pair-generator.patch +++ /dev/null @@ -1,100 +0,0 @@ -From 9dfc18846063a110070782ede699c513b30257e5 Mon Sep 17 00:00:00 2001 -From: Yashpal Dutta -Date: Thu, 1 May 2014 06:35:45 +0545 -Subject: [PATCH][fsl 15/15] Fixed DH keygen pair generator - -Upstream-status: Pending - -Wrong Padding results into keygen length error - -Signed-off-by: Yashpal Dutta -Tested-by: Cristian Stoica ---- - crypto/engine/eng_cryptodev.c | 50 +++++++++++++++++++++++++++-------------- - 1 file changed, 33 insertions(+), 17 deletions(-) - -diff --git a/crypto/engine/eng_cryptodev.c b/crypto/engine/eng_cryptodev.c -index 7c2661f..703eee4 100644 ---- a/crypto/engine/eng_cryptodev.c -+++ b/crypto/engine/eng_cryptodev.c -@@ -3402,44 +3402,60 @@ sw_try: - static int cryptodev_dh_keygen(DH *dh) - { - struct crypt_kop kop; -- int ret = 1, g_len; -- unsigned char *g = NULL; -+ int ret = 1, q_len = 0; -+ unsigned char *q = NULL, *g = NULL, *s = NULL, *w = NULL; -+ BIGNUM *pub_key = NULL, *priv_key = NULL; -+ int generate_new_key = 1; - -- if (dh->priv_key == NULL) { -- if ((dh->priv_key=BN_new()) == NULL) -- goto sw_try; -- } -+ if (dh->priv_key) -+ priv_key = dh->priv_key; - -- if (dh->pub_key == NULL) { -- if ((dh->pub_key=BN_new()) == NULL) -- goto sw_try; -- } -+ if (dh->pub_key) -+ pub_key = dh->pub_key; - -- g_len = BN_num_bytes(dh->p); -+ q_len = BN_num_bytes(dh->p); - /** - * Get generator into a plain buffer. If length is less than - * q_len then add leading padding bytes. - */ -- if (spcf_bn2bin_ex(dh->g, &g, &g_len)) { -+ if (spcf_bn2bin_ex(dh->g, &g, &q_len)) { -+ DSAerr(DH_F_DH_GENERATE_KEY, ERR_R_MALLOC_FAILURE); -+ goto sw_try; -+ } -+ -+ if (spcf_bn2bin_ex(dh->p, &q, &q_len)) { - DSAerr(DH_F_DH_GENERATE_KEY, ERR_R_MALLOC_FAILURE); - goto sw_try; - } - - memset(&kop, 0, sizeof kop); - kop.crk_op = CRK_DH_GENERATE_KEY; -- if (bn2crparam(dh->p, &kop.crk_param[0])) -- goto sw_try; -+ kop.crk_param[0].crp_p = q; -+ kop.crk_param[0].crp_nbits = q_len * 8; - if (!dh->q || bn2crparam(dh->q, &kop.crk_param[1])) - goto sw_try; - kop.crk_param[2].crp_p = g; -- kop.crk_param[2].crp_nbits = g_len * 8; -+ kop.crk_param[2].crp_nbits = q_len * 8; - kop.crk_iparams = 3; - -+ s = OPENSSL_malloc (q_len); -+ if (!s) { -+ DSAerr(DH_F_DH_GENERATE_KEY, ERR_R_MALLOC_FAILURE); -+ goto sw_try; -+ } -+ -+ w = OPENSSL_malloc (q_len); -+ if (!w) { -+ DSAerr(DH_F_DH_GENERATE_KEY, ERR_R_MALLOC_FAILURE); -+ goto sw_try; -+ } -+ - /* pub_key is or prime length while priv key is of length of order */ -- if (cryptodev_asym(&kop, BN_num_bytes(dh->p), dh->pub_key, -- BN_num_bytes(dh->q), dh->priv_key)) -+ if (cryptodev_asym(&kop, q_len, w, q_len, s)) - goto sw_try; - -+ dh->pub_key = BN_bin2bn(w, q_len, pub_key); -+ dh->pub_key = BN_bin2bn(s, q_len, priv_key); - return ret; - sw_try: - { --- -1.7.9.7 - diff --git a/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0015-SW-Backoff-mechanism-for-dsa-keygen.patch b/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0015-SW-Backoff-mechanism-for-dsa-keygen.patch new file mode 100644 index 00000000..c20f9d71 --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0015-SW-Backoff-mechanism-for-dsa-keygen.patch @@ -0,0 +1,53 @@ +From 10be401a33e6ebcc325d6747914c70595cd53d0a Mon Sep 17 00:00:00 2001 +From: Yashpal Dutta +Date: Thu, 24 Apr 2014 00:35:34 +0545 +Subject: [PATCH 15/17] SW Backoff mechanism for dsa keygen + +Upstream-status: Pending + +DSA Keygen is not handled in default openssl dsa method. Due to +same null function pointer in SW DSA method, the backoff for dsa +keygen gives segmentation fault. + +Signed-off-by: Yashpal Dutta +Tested-by: Cristian Stoica +--- + crypto/engine/eng_cryptodev.c | 12 ++++++++---- + 1 file changed, 8 insertions(+), 4 deletions(-) + +diff --git a/crypto/engine/eng_cryptodev.c b/crypto/engine/eng_cryptodev.c +index 6d69336..dab8fea 100644 +--- a/crypto/engine/eng_cryptodev.c ++++ b/crypto/engine/eng_cryptodev.c +@@ -2069,8 +2069,10 @@ static int cryptodev_dsa_keygen(DSA *dsa) + return ret; + sw_try: + { +- const DSA_METHOD *meth = DSA_OpenSSL(); +- ret = (meth->dsa_keygen)(dsa); ++ const DSA_METHOD *meth = dsa->meth; ++ dsa->meth = DSA_OpenSSL(); ++ ret = DSA_generate_key(dsa); ++ dsa->meth = meth; + } + return ret; + } +@@ -2124,11 +2126,13 @@ static int cryptodev_dsa_keygen_async(DSA *dsa, struct pkc_cookie_s *cookie) + return ret; + sw_try: + { +- const DSA_METHOD *meth = DSA_OpenSSL(); ++ const DSA_METHOD *meth = dsa->meth; + ++ dsa->meth = DSA_OpenSSL(); + if (kop) + free(kop); +- ret = (meth->dsa_keygen)(dsa); ++ ret = DSA_generate_key(dsa); ++ dsa->meth = meth; + cookie->pkc_callback(cookie, 0); + } + return ret; +-- +1.8.3.1 + diff --git a/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0016-Fixed-DH-keygen-pair-generator.patch b/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0016-Fixed-DH-keygen-pair-generator.patch new file mode 100644 index 00000000..abcc2efc --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0016-Fixed-DH-keygen-pair-generator.patch @@ -0,0 +1,100 @@ +From d2c868c6370bcc0d0a254e641907da2cdf992d62 Mon Sep 17 00:00:00 2001 +From: Yashpal Dutta +Date: Thu, 1 May 2014 06:35:45 +0545 +Subject: [PATCH 16/17] Fixed DH keygen pair generator + +Upstream-status: Pending + +Wrong Padding results into keygen length error + +Signed-off-by: Yashpal Dutta +Tested-by: Cristian Stoica +--- + crypto/engine/eng_cryptodev.c | 50 ++++++++++++++++++++++++++++--------------- + 1 file changed, 33 insertions(+), 17 deletions(-) + +diff --git a/crypto/engine/eng_cryptodev.c b/crypto/engine/eng_cryptodev.c +index dab8fea..13d924f 100644 +--- a/crypto/engine/eng_cryptodev.c ++++ b/crypto/engine/eng_cryptodev.c +@@ -3396,44 +3396,60 @@ sw_try: + static int cryptodev_dh_keygen(DH *dh) + { + struct crypt_kop kop; +- int ret = 1, g_len; +- unsigned char *g = NULL; ++ int ret = 1, q_len = 0; ++ unsigned char *q = NULL, *g = NULL, *s = NULL, *w = NULL; ++ BIGNUM *pub_key = NULL, *priv_key = NULL; ++ int generate_new_key = 1; + +- if (dh->priv_key == NULL) { +- if ((dh->priv_key=BN_new()) == NULL) +- goto sw_try; +- } ++ if (dh->priv_key) ++ priv_key = dh->priv_key; + +- if (dh->pub_key == NULL) { +- if ((dh->pub_key=BN_new()) == NULL) +- goto sw_try; +- } ++ if (dh->pub_key) ++ pub_key = dh->pub_key; + +- g_len = BN_num_bytes(dh->p); ++ q_len = BN_num_bytes(dh->p); + /** + * Get generator into a plain buffer. If length is less than + * q_len then add leading padding bytes. + */ +- if (spcf_bn2bin_ex(dh->g, &g, &g_len)) { ++ if (spcf_bn2bin_ex(dh->g, &g, &q_len)) { ++ DSAerr(DH_F_DH_GENERATE_KEY, ERR_R_MALLOC_FAILURE); ++ goto sw_try; ++ } ++ ++ if (spcf_bn2bin_ex(dh->p, &q, &q_len)) { + DSAerr(DH_F_DH_GENERATE_KEY, ERR_R_MALLOC_FAILURE); + goto sw_try; + } + + memset(&kop, 0, sizeof kop); + kop.crk_op = CRK_DH_GENERATE_KEY; +- if (bn2crparam(dh->p, &kop.crk_param[0])) +- goto sw_try; ++ kop.crk_param[0].crp_p = q; ++ kop.crk_param[0].crp_nbits = q_len * 8; + if (!dh->q || bn2crparam(dh->q, &kop.crk_param[1])) + goto sw_try; + kop.crk_param[2].crp_p = g; +- kop.crk_param[2].crp_nbits = g_len * 8; ++ kop.crk_param[2].crp_nbits = q_len * 8; + kop.crk_iparams = 3; + ++ s = OPENSSL_malloc (q_len); ++ if (!s) { ++ DSAerr(DH_F_DH_GENERATE_KEY, ERR_R_MALLOC_FAILURE); ++ goto sw_try; ++ } ++ ++ w = OPENSSL_malloc (q_len); ++ if (!w) { ++ DSAerr(DH_F_DH_GENERATE_KEY, ERR_R_MALLOC_FAILURE); ++ goto sw_try; ++ } ++ + /* pub_key is or prime length while priv key is of length of order */ +- if (cryptodev_asym(&kop, BN_num_bytes(dh->p), dh->pub_key, +- BN_num_bytes(dh->q), dh->priv_key)) ++ if (cryptodev_asym(&kop, q_len, w, q_len, s)) + goto sw_try; + ++ dh->pub_key = BN_bin2bn(w, q_len, pub_key); ++ dh->pub_key = BN_bin2bn(s, q_len, priv_key); + return ret; + sw_try: + { +-- +1.8.3.1 + diff --git a/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0017-cryptodev-add-support-for-aes-gcm-algorithm-offloadi.patch b/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0017-cryptodev-add-support-for-aes-gcm-algorithm-offloadi.patch new file mode 100644 index 00000000..a71bb456 --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/openssl/openssl-fsl/0017-cryptodev-add-support-for-aes-gcm-algorithm-offloadi.patch @@ -0,0 +1,309 @@ +From 11b55103463bac614e00d74e9f196ec4ec6bade1 Mon Sep 17 00:00:00 2001 +From: Cristian Stoica +Date: Mon, 16 Jun 2014 14:06:21 +0300 +Subject: [PATCH 17/17] cryptodev: add support for aes-gcm algorithm offloading + +Change-Id: I3b77dc5ef8b8f707309549244a02852d95b36168 +Signed-off-by: Cristian Stoica +Reviewed-on: http://git.am.freescale.net:8181/17226 +--- + apps/speed.c | 6 +- + crypto/engine/eng_cryptodev.c | 229 +++++++++++++++++++++++++++++++++++++++++- + 2 files changed, 233 insertions(+), 2 deletions(-) + +diff --git a/apps/speed.c b/apps/speed.c +index 9886ca3..099dede 100644 +--- a/apps/speed.c ++++ b/apps/speed.c +@@ -224,7 +224,11 @@ + #endif + + #undef BUFSIZE +-#define BUFSIZE ((long)1024*8+1) ++/* The buffer overhead allows GCM tag at the end of the encrypted data. This ++ avoids buffer overflows from cryptodev since Linux kernel GCM ++ implementation allways adds the tag - unlike e_aes.c:aes_gcm_cipher() ++ which doesn't */ ++#define BUFSIZE ((long)1024*8 + EVP_GCM_TLS_TAG_LEN) + int run=0; + + static int mr=0; +diff --git a/crypto/engine/eng_cryptodev.c b/crypto/engine/eng_cryptodev.c +index 13d924f..4493490 100644 +--- a/crypto/engine/eng_cryptodev.c ++++ b/crypto/engine/eng_cryptodev.c +@@ -78,8 +78,10 @@ struct dev_crypto_state { + struct session_op d_sess; + int d_fd; + unsigned char *aad; +- unsigned int aad_len; ++ int aad_len; + unsigned int len; ++ unsigned char *iv; ++ int ivlen; + + #ifdef USE_CRYPTODEV_DIGESTS + char dummy_mac_key[HASH_MAX_LEN]; +@@ -251,6 +253,7 @@ static struct { + { CRYPTO_SKIPJACK_CBC, NID_undef, 0, 0, 0}, + { CRYPTO_TLS10_AES_CBC_HMAC_SHA1, NID_aes_128_cbc_hmac_sha1, 16, 16, 20}, + { CRYPTO_TLS10_AES_CBC_HMAC_SHA1, NID_aes_256_cbc_hmac_sha1, 16, 32, 20}, ++ { CRYPTO_AES_GCM, NID_aes_128_gcm, 16, 16, 0}, + { 0, NID_undef, 0, 0, 0}, + }; + +@@ -271,6 +274,19 @@ static struct { + }; + #endif + ++/* increment counter (64-bit int) by 1 */ ++static void ctr64_inc(unsigned char *counter) { ++ int n=8; ++ unsigned char c; ++ ++ do { ++ --n; ++ c = counter[n]; ++ ++c; ++ counter[n] = c; ++ if (c) return; ++ } while (n); ++} + /* + * Return a fd if /dev/crypto seems usable, 0 otherwise. + */ +@@ -762,6 +778,197 @@ static int cryptodev_cbc_hmac_sha1_ctrl(EVP_CIPHER_CTX *ctx, int type, int arg, + } + } + ++static int cryptodev_init_gcm_key(EVP_CIPHER_CTX *ctx, ++ const unsigned char *key, const unsigned char *iv, int enc) ++{ ++ struct dev_crypto_state *state = ctx->cipher_data; ++ struct session_op *sess = &state->d_sess; ++ int cipher = -1, i; ++ if (!iv && !key) ++ return 1; ++ ++ if (iv) ++ memcpy(ctx->iv, iv, ctx->cipher->iv_len); ++ ++ for (i = 0; ciphers[i].id; i++) ++ if (ctx->cipher->nid == ciphers[i].nid && ++ ctx->cipher->iv_len <= ciphers[i].ivmax && ++ ctx->key_len == ciphers[i].keylen) { ++ cipher = ciphers[i].id; ++ break; ++ } ++ ++ if (!ciphers[i].id) { ++ state->d_fd = -1; ++ return 0; ++ } ++ ++ memset(sess, 0, sizeof(struct session_op)); ++ ++ if ((state->d_fd = get_dev_crypto()) < 0) ++ return 0; ++ ++ sess->key = (unsigned char *) key; ++ sess->keylen = ctx->key_len; ++ sess->cipher = cipher; ++ ++ if (ioctl(state->d_fd, CIOCGSESSION, sess) == -1) { ++ put_dev_crypto(state->d_fd); ++ state->d_fd = -1; ++ return 0; ++ } ++ return 1; ++} ++ ++static int cryptodev_gcm_tls_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, ++ const unsigned char *in, size_t len) ++{ ++ struct crypt_auth_op cryp = {0}; ++ struct dev_crypto_state *state = ctx->cipher_data; ++ struct session_op *sess = &state->d_sess; ++ int rv = len; ++ ++ if (EVP_CIPHER_CTX_ctrl(ctx, ctx->encrypt ? ++ EVP_CTRL_GCM_IV_GEN : EVP_CTRL_GCM_SET_IV_INV, ++ EVP_GCM_TLS_EXPLICIT_IV_LEN, out) <= 0) ++ return 0; ++ ++ in += EVP_GCM_TLS_EXPLICIT_IV_LEN; ++ out += EVP_GCM_TLS_EXPLICIT_IV_LEN; ++ len -= EVP_GCM_TLS_EXPLICIT_IV_LEN; ++ ++ if (ctx->encrypt) { ++ len -= EVP_GCM_TLS_TAG_LEN; ++ } ++ cryp.ses = sess->ses; ++ cryp.len = len; ++ cryp.src = (unsigned char*) in; ++ cryp.dst = out; ++ cryp.auth_src = state->aad; ++ cryp.auth_len = state->aad_len; ++ cryp.iv = ctx->iv; ++ cryp.op = ctx->encrypt ? COP_ENCRYPT : COP_DECRYPT; ++ ++ if (ioctl(state->d_fd, CIOCAUTHCRYPT, &cryp) == -1) { ++ return 0; ++ } ++ ++ if (ctx->encrypt) ++ ctr64_inc(state->iv + state->ivlen - 8); ++ else ++ rv = len - EVP_GCM_TLS_TAG_LEN; ++ ++ return rv; ++} ++ ++static int cryptodev_gcm_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, ++ const unsigned char *in, size_t len) ++{ ++ struct crypt_auth_op cryp; ++ struct dev_crypto_state *state = ctx->cipher_data; ++ struct session_op *sess = &state->d_sess; ++ ++ if (state->d_fd < 0) ++ return 0; ++ ++ if ((len % ctx->cipher->block_size) != 0) ++ return 0; ++ ++ if (state->aad_len >= 0) ++ return cryptodev_gcm_tls_cipher(ctx, out, in, len); ++ ++ memset(&cryp, 0, sizeof(cryp)); ++ ++ cryp.ses = sess->ses; ++ cryp.len = len; ++ cryp.src = (unsigned char*) in; ++ cryp.dst = out; ++ cryp.auth_src = NULL; ++ cryp.auth_len = 0; ++ cryp.iv = ctx->iv; ++ cryp.op = ctx->encrypt ? COP_ENCRYPT : COP_DECRYPT; ++ ++ if (ioctl(state->d_fd, CIOCAUTHCRYPT, &cryp) == -1) { ++ return 0; ++ } ++ ++ return len; ++} ++ ++static int cryptodev_gcm_ctrl(EVP_CIPHER_CTX *ctx, int type, int arg, ++ void *ptr) ++{ ++ struct dev_crypto_state *state = ctx->cipher_data; ++ switch (type) { ++ case EVP_CTRL_INIT: ++ { ++ state->ivlen = ctx->cipher->iv_len; ++ state->iv = ctx->iv; ++ state->aad_len = -1; ++ return 1; ++ } ++ case EVP_CTRL_GCM_SET_IV_FIXED: ++ { ++ /* Special case: -1 length restores whole IV */ ++ if (arg == -1) ++ { ++ memcpy(state->iv, ptr, state->ivlen); ++ return 1; ++ } ++ /* Fixed field must be at least 4 bytes and invocation field ++ * at least 8. ++ */ ++ if ((arg < 4) || (state->ivlen - arg) < 8) ++ return 0; ++ if (arg) ++ memcpy(state->iv, ptr, arg); ++ if (ctx->encrypt && ++ RAND_bytes(state->iv + arg, state->ivlen - arg) <= 0) ++ return 0; ++ return 1; ++ } ++ case EVP_CTRL_AEAD_TLS1_AAD: ++ { ++ unsigned int len; ++ if (arg != 13) ++ return 0; ++ ++ memcpy(ctx->buf, ptr, arg); ++ len=ctx->buf[arg-2] << 8 | ctx->buf[arg-1]; ++ ++ /* Correct length for explicit IV */ ++ len -= EVP_GCM_TLS_EXPLICIT_IV_LEN; ++ ++ /* If decrypting correct for tag too */ ++ if (!ctx->encrypt) ++ len -= EVP_GCM_TLS_TAG_LEN; ++ ++ ctx->buf[arg-2] = len >> 8; ++ ctx->buf[arg-1] = len & 0xff; ++ ++ state->aad = ctx->buf; ++ state->aad_len = arg; ++ state->len = len; ++ ++ /* Extra padding: tag appended to record */ ++ return EVP_GCM_TLS_TAG_LEN; ++ } ++ case EVP_CTRL_GCM_SET_IV_INV: ++ { ++ if (ctx->encrypt) ++ return 0; ++ memcpy(state->iv + state->ivlen - arg, ptr, arg); ++ return 1; ++ } ++ case EVP_CTRL_GCM_IV_GEN: ++ if (arg <= 0 || arg > state->ivlen) ++ arg = state->ivlen; ++ memcpy(ptr, state->iv + state->ivlen - arg, arg); ++ return 1; ++ default: ++ return -1; ++ } ++} + /* + * libcrypto EVP stuff - this is how we get wired to EVP so the engine + * gets called when libcrypto requests a cipher NID. +@@ -901,6 +1108,23 @@ const EVP_CIPHER cryptodev_aes_256_cbc_hmac_sha1 = { + cryptodev_cbc_hmac_sha1_ctrl, + NULL + }; ++ ++const EVP_CIPHER cryptodev_aes_128_gcm = { ++ NID_aes_128_gcm, ++ 1, 16, 12, ++ EVP_CIPH_GCM_MODE | EVP_CIPH_FLAG_AEAD_CIPHER | EVP_CIPH_FLAG_DEFAULT_ASN1 \ ++ | EVP_CIPH_CUSTOM_IV | EVP_CIPH_FLAG_CUSTOM_CIPHER \ ++ | EVP_CIPH_ALWAYS_CALL_INIT | EVP_CIPH_CTRL_INIT, ++ cryptodev_init_gcm_key, ++ cryptodev_gcm_cipher, ++ cryptodev_cleanup, ++ sizeof(struct dev_crypto_state), ++ EVP_CIPHER_set_asn1_iv, ++ EVP_CIPHER_get_asn1_iv, ++ cryptodev_gcm_ctrl, ++ NULL ++}; ++ + /* + * Registered by the ENGINE when used to find out how to deal with + * a particular NID in the ENGINE. this says what we'll do at the +@@ -944,6 +1168,9 @@ cryptodev_engine_ciphers(ENGINE *e, const EVP_CIPHER **cipher, + case NID_aes_256_cbc_hmac_sha1: + *cipher = &cryptodev_aes_256_cbc_hmac_sha1; + break; ++ case NID_aes_128_gcm: ++ *cipher = &cryptodev_aes_128_gcm; ++ break; + default: + *cipher = NULL; + break; +-- +1.8.3.1 + diff --git a/meta-fsl-ppc/recipes-connectivity/openssl/openssl/openssl-fix-doc.patch b/meta-fsl-ppc/recipes-connectivity/openssl/openssl/openssl-fix-doc.patch deleted file mode 100644 index 451256ea..00000000 --- a/meta-fsl-ppc/recipes-connectivity/openssl/openssl/openssl-fix-doc.patch +++ /dev/null @@ -1,401 +0,0 @@ -Fix documentation build errors with Perl 5.18 pod2man - -This fixes errors building man pages with newer versions of pod2man -included with Perl 5.18. - -Upstream-Status: Submitted -Signed-off-by: Jonathan Liu - -Index: openssl-1.0.1f/doc/apps/cms.pod -=================================================================== ---- openssl-1.0.1f.orig/doc/apps/cms.pod 2014-01-06 15:47:42.000000000 +0200 -+++ openssl-1.0.1f/doc/apps/cms.pod 2014-02-28 10:13:51.899979213 +0200 -@@ -450,28 +450,28 @@ - - =over 4 - --=item 0 -+=item Z<>0 - - the operation was completely successfully. - --=item 1 -+=item Z<>1 - - an error occurred parsing the command options. - --=item 2 -+=item Z<>2 - - one of the input files could not be read. - --=item 3 -+=item Z<>3 - - an error occurred creating the CMS file or when reading the MIME - message. - --=item 4 -+=item Z<>4 - - an error occurred decrypting or verifying the message. - --=item 5 -+=item Z<>5 - - the message was verified correctly but an error occurred writing out - the signers certificates. -Index: openssl-1.0.1f/doc/apps/smime.pod -=================================================================== ---- openssl-1.0.1f.orig/doc/apps/smime.pod 2014-01-06 15:47:42.000000000 +0200 -+++ openssl-1.0.1f/doc/apps/smime.pod 2014-02-28 10:16:57.795979233 +0200 -@@ -308,28 +308,28 @@ - - =over 4 - --=item 0 -+=item Z<>0 - - the operation was completely successfully. - --=item 1 -+=item Z<>1 - - an error occurred parsing the command options. - --=item 2 -+=item Z<>2 - - one of the input files could not be read. - --=item 3 -+=item Z<>3 - - an error occurred creating the PKCS#7 file or when reading the MIME - message. - --=item 4 -+=item Z<>4 - - an error occurred decrypting or verifying the message. - --=item 5 -+=item Z<>5 - - the message was verified correctly but an error occurred writing out - the signers certificates. -Index: openssl-1.0.1f/doc/ssl/SSL_COMP_add_compression_method.pod -=================================================================== ---- openssl-1.0.1f.orig/doc/ssl/SSL_COMP_add_compression_method.pod 2014-01-06 15:47:42.000000000 +0200 -+++ openssl-1.0.1f/doc/ssl/SSL_COMP_add_compression_method.pod 2014-02-28 10:18:09.679979225 +0200 -@@ -53,11 +53,11 @@ - - =over 4 - --=item 0 -+=item Z<>0 - - The operation succeeded. - --=item 1 -+=item Z<>1 - - The operation failed. Check the error queue to find out the reason. - -Index: openssl-1.0.1f/doc/ssl/SSL_CTX_add_session.pod -=================================================================== ---- openssl-1.0.1f.orig/doc/ssl/SSL_CTX_add_session.pod 2014-01-06 15:47:42.000000000 +0200 -+++ openssl-1.0.1f/doc/ssl/SSL_CTX_add_session.pod 2014-02-28 10:18:42.687979221 +0200 -@@ -52,13 +52,13 @@ - - =over 4 - --=item 0 -+=item Z<>0 - - The operation failed. In case of the add operation, it was tried to add - the same (identical) session twice. In case of the remove operation, the - session was not found in the cache. - --=item 1 -+=item Z<>1 - - The operation succeeded. - -Index: openssl-1.0.1f/doc/ssl/SSL_CTX_load_verify_locations.pod -=================================================================== ---- openssl-1.0.1f.orig/doc/ssl/SSL_CTX_load_verify_locations.pod 2014-01-06 15:47:42.000000000 +0200 -+++ openssl-1.0.1f/doc/ssl/SSL_CTX_load_verify_locations.pod 2014-02-28 10:19:09.079979218 +0200 -@@ -100,13 +100,13 @@ - - =over 4 - --=item 0 -+=item Z<>0 - - The operation failed because B and B are NULL or the - processing at one of the locations specified failed. Check the error - stack to find out the reason. - --=item 1 -+=item Z<>1 - - The operation succeeded. - -Index: openssl-1.0.1f/doc/ssl/SSL_CTX_set_client_CA_list.pod -=================================================================== ---- openssl-1.0.1f.orig/doc/ssl/SSL_CTX_set_client_CA_list.pod 2014-01-06 15:47:42.000000000 +0200 -+++ openssl-1.0.1f/doc/ssl/SSL_CTX_set_client_CA_list.pod 2014-02-28 10:19:42.999979220 +0200 -@@ -66,13 +66,13 @@ - - =over 4 - --=item 0 -+=item Z<>0 - - A failure while manipulating the STACK_OF(X509_NAME) object occurred or - the X509_NAME could not be extracted from B. Check the error stack - to find out the reason. - --=item 1 -+=item Z<>1 - - The operation succeeded. - -Index: openssl-1.0.1f/doc/ssl/SSL_CTX_set_session_id_context.pod -=================================================================== ---- openssl-1.0.1f.orig/doc/ssl/SSL_CTX_set_session_id_context.pod 2014-01-06 15:47:42.000000000 +0200 -+++ openssl-1.0.1f/doc/ssl/SSL_CTX_set_session_id_context.pod 2014-02-28 10:20:06.495979211 +0200 -@@ -64,13 +64,13 @@ - - =over 4 - --=item 0 -+=item Z<>0 - - The length B of the session id context B exceeded - the maximum allowed length of B. The error - is logged to the error stack. - --=item 1 -+=item Z<>1 - - The operation succeeded. - -Index: openssl-1.0.1f/doc/ssl/SSL_CTX_set_ssl_version.pod -=================================================================== ---- openssl-1.0.1f.orig/doc/ssl/SSL_CTX_set_ssl_version.pod 2014-01-06 15:47:42.000000000 +0200 -+++ openssl-1.0.1f/doc/ssl/SSL_CTX_set_ssl_version.pod 2014-02-28 10:20:32.111979208 +0200 -@@ -42,11 +42,11 @@ - - =over 4 - --=item 0 -+=item Z<>0 - - The new choice failed, check the error stack to find out the reason. - --=item 1 -+=item Z<>1 - - The operation succeeded. - -Index: openssl-1.0.1f/doc/ssl/SSL_CTX_use_psk_identity_hint.pod -=================================================================== ---- openssl-1.0.1f.orig/doc/ssl/SSL_CTX_use_psk_identity_hint.pod 2014-01-06 15:47:42.000000000 +0200 -+++ openssl-1.0.1f/doc/ssl/SSL_CTX_use_psk_identity_hint.pod 2014-02-28 10:21:12.351979203 +0200 -@@ -96,7 +96,7 @@ - connection will fail with decryption_error before it will be finished - completely. - --=item 0 -+=item Z<>0 - - PSK identity was not found. An "unknown_psk_identity" alert message - will be sent and the connection setup fails. -Index: openssl-1.0.1f/doc/ssl/SSL_accept.pod -=================================================================== ---- openssl-1.0.1f.orig/doc/ssl/SSL_accept.pod 2014-01-06 15:47:42.000000000 +0200 -+++ openssl-1.0.1f/doc/ssl/SSL_accept.pod 2014-02-28 10:21:51.535979215 +0200 -@@ -44,13 +44,13 @@ - - =over 4 - --=item 0 -+=item Z<>0 - - The TLS/SSL handshake was not successful but was shut down controlled and - by the specifications of the TLS/SSL protocol. Call SSL_get_error() with the - return value B to find out the reason. - --=item 1 -+=item Z<>1 - - The TLS/SSL handshake was successfully completed, a TLS/SSL connection has been - established. -Index: openssl-1.0.1f/doc/ssl/SSL_clear.pod -=================================================================== ---- openssl-1.0.1f.orig/doc/ssl/SSL_clear.pod 2014-01-06 15:47:42.000000000 +0200 -+++ openssl-1.0.1f/doc/ssl/SSL_clear.pod 2014-02-28 10:22:13.087979196 +0200 -@@ -56,12 +56,12 @@ - - =over 4 - --=item 0 -+=item Z<>0 - - The SSL_clear() operation could not be performed. Check the error stack to - find out the reason. - --=item 1 -+=item Z<>1 - - The SSL_clear() operation was successful. - -Index: openssl-1.0.1f/doc/ssl/SSL_connect.pod -=================================================================== ---- openssl-1.0.1f.orig/doc/ssl/SSL_connect.pod 2014-01-06 15:47:42.000000000 +0200 -+++ openssl-1.0.1f/doc/ssl/SSL_connect.pod 2014-02-28 10:22:33.991979193 +0200 -@@ -41,13 +41,13 @@ - - =over 4 - --=item 0 -+=item Z<>0 - - The TLS/SSL handshake was not successful but was shut down controlled and - by the specifications of the TLS/SSL protocol. Call SSL_get_error() with the - return value B to find out the reason. - --=item 1 -+=item Z<>1 - - The TLS/SSL handshake was successfully completed, a TLS/SSL connection has been - established. -Index: openssl-1.0.1f/doc/ssl/SSL_do_handshake.pod -=================================================================== ---- openssl-1.0.1f.orig/doc/ssl/SSL_do_handshake.pod 2014-01-06 15:47:42.000000000 +0200 -+++ openssl-1.0.1f/doc/ssl/SSL_do_handshake.pod 2014-02-28 10:22:56.887979159 +0200 -@@ -45,13 +45,13 @@ - - =over 4 - --=item 0 -+=item Z<>0 - - The TLS/SSL handshake was not successful but was shut down controlled and - by the specifications of the TLS/SSL protocol. Call SSL_get_error() with the - return value B to find out the reason. - --=item 1 -+=item Z<>1 - - The TLS/SSL handshake was successfully completed, a TLS/SSL connection has been - established. -Index: openssl-1.0.1f/doc/ssl/SSL_read.pod -=================================================================== ---- openssl-1.0.1f.orig/doc/ssl/SSL_read.pod 2014-01-06 15:47:42.000000000 +0200 -+++ openssl-1.0.1f/doc/ssl/SSL_read.pod 2014-02-28 10:23:15.303979188 +0200 -@@ -86,7 +86,7 @@ - The read operation was successful; the return value is the number of - bytes actually read from the TLS/SSL connection. - --=item 0 -+=item Z<>0 - - The read operation was not successful. The reason may either be a clean - shutdown due to a "close notify" alert sent by the peer (in which case -Index: openssl-1.0.1f/doc/ssl/SSL_session_reused.pod -=================================================================== ---- openssl-1.0.1f.orig/doc/ssl/SSL_session_reused.pod 2014-01-06 15:47:42.000000000 +0200 -+++ openssl-1.0.1f/doc/ssl/SSL_session_reused.pod 2014-02-28 10:23:36.615979186 +0200 -@@ -27,11 +27,11 @@ - - =over 4 - --=item 0 -+=item Z<>0 - - A new session was negotiated. - --=item 1 -+=item Z<>1 - - A session was reused. - -Index: openssl-1.0.1f/doc/ssl/SSL_set_fd.pod -=================================================================== ---- openssl-1.0.1f.orig/doc/ssl/SSL_set_fd.pod 2014-01-06 15:47:42.000000000 +0200 -+++ openssl-1.0.1f/doc/ssl/SSL_set_fd.pod 2014-02-28 10:23:57.599979183 +0200 -@@ -35,11 +35,11 @@ - - =over 4 - --=item 0 -+=item Z<>0 - - The operation failed. Check the error stack to find out why. - --=item 1 -+=item Z<>1 - - The operation succeeded. - -Index: openssl-1.0.1f/doc/ssl/SSL_set_session.pod -=================================================================== ---- openssl-1.0.1f.orig/doc/ssl/SSL_set_session.pod 2014-01-06 15:47:42.000000000 +0200 -+++ openssl-1.0.1f/doc/ssl/SSL_set_session.pod 2014-02-28 10:24:16.943979181 +0200 -@@ -37,11 +37,11 @@ - - =over 4 - --=item 0 -+=item Z<>0 - - The operation failed; check the error stack to find out the reason. - --=item 1 -+=item Z<>1 - - The operation succeeded. - -Index: openssl-1.0.1f/doc/ssl/SSL_shutdown.pod -=================================================================== ---- openssl-1.0.1f.orig/doc/ssl/SSL_shutdown.pod 2014-01-06 15:47:42.000000000 +0200 -+++ openssl-1.0.1f/doc/ssl/SSL_shutdown.pod 2014-02-28 10:25:03.623979175 +0200 -@@ -92,19 +92,19 @@ - - =over 4 - --=item 0 -+=item Z<>0 - - The shutdown is not yet finished. Call SSL_shutdown() for a second time, - if a bidirectional shutdown shall be performed. - The output of L may be misleading, as an - erroneous SSL_ERROR_SYSCALL may be flagged even though no error occurred. - --=item 1 -+=item Z<>1 - - The shutdown was successfully completed. The "close notify" alert was sent - and the peer's "close notify" alert was received. - --=item -1 -+=item Z<>-1 - - The shutdown was not successful because a fatal error occurred either - at the protocol level or a connection failure occurred. It can also occur if -Index: openssl-1.0.1f/doc/ssl/SSL_write.pod -=================================================================== ---- openssl-1.0.1f.orig/doc/ssl/SSL_write.pod 2014-01-06 15:47:42.000000000 +0200 -+++ openssl-1.0.1f/doc/ssl/SSL_write.pod 2014-02-28 10:25:36.031979168 +0200 -@@ -79,7 +79,7 @@ - The write operation was successful, the return value is the number of - bytes actually written to the TLS/SSL connection. - --=item 0 -+=item Z<>0 - - The write operation was not successful. Probably the underlying connection - was closed. Call SSL_get_error() with the return value B to find out, diff --git a/meta-fsl-ppc/recipes-connectivity/openssl/openssl_1.0.1g.bb b/meta-fsl-ppc/recipes-connectivity/openssl/openssl_1.0.1g.bb deleted file mode 100644 index f3c20e8c..00000000 --- a/meta-fsl-ppc/recipes-connectivity/openssl/openssl_1.0.1g.bb +++ /dev/null @@ -1,55 +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=f9a8f968107345e0b75aa8c2ecaa7ec8" - -export DIRS = "crypto ssl apps engines" -export OE_LDFLAGS="${LDFLAGS}" - -SRC_URI += "file://configure-targets.patch \ - file://shared-libs.patch \ - file://oe-ldflags.patch \ - file://engines-install-in-libdir-ssl.patch \ - file://openssl-fix-link.patch \ - file://debian/version-script.patch \ - file://debian/pic.patch \ - file://debian/c_rehash-compat.patch \ - file://debian/ca.patch \ - file://debian/make-targets.patch \ - file://debian/no-rpath.patch \ - file://debian/man-dir.patch \ - file://debian/man-section.patch \ - file://debian/no-symbolic.patch \ - file://debian/debian-targets.patch \ - file://openssl_fix_for_x32.patch \ - file://openssl-fix-doc.patch \ - file://fix-cipher-des-ede3-cfb1.patch \ - file://openssl-avoid-NULL-pointer-dereference-in-EVP_DigestInit_ex.patch \ - file://openssl-avoid-NULL-pointer-dereference-in-dh_pub_encode.patch \ - file://initial-aarch64-bits.patch \ - file://find.pl \ - file://openssl-fix-des.pod-error.patch \ - " - -SRC_URI[md5sum] = "de62b43dfcd858e66a74bee1c834e959" -SRC_URI[sha256sum] = "53cb818c3b90e507a8348f4f5eaedb05d8bfe5358aabb508b7263cc670c3e028" - -PACKAGES =+ " \ - ${PN}-engines \ - ${PN}-engines-dbg \ - " - -FILES_${PN}-engines = "${libdir}/ssl/engines/*.so ${libdir}/engines" -FILES_${PN}-engines-dbg = "${libdir}/ssl/engines/.debug" - -PARALLEL_MAKE = "" -PARALLEL_MAKEINST = "" - -do_configure_prepend() { - cp ${WORKDIR}/find.pl ${S}/util/find.pl -} diff --git a/meta-fsl-ppc/recipes-connectivity/openssl/openssl_1.0.1g.bbappend b/meta-fsl-ppc/recipes-connectivity/openssl/openssl_1.0.1g.bbappend deleted file mode 100644 index ab1985bb..00000000 --- a/meta-fsl-ppc/recipes-connectivity/openssl/openssl_1.0.1g.bbappend +++ /dev/null @@ -1,59 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/openssl-fsl:" - -RDEPENDS_${PN}_class-target += "cryptodev-module" - -# base package is taken from Freescale repository -SRCBRANCH = "OpenSSL_1_0_1-stable" -SRC_URI = "git://git.openssl.org/openssl.git;branch=${SRCBRANCH} \ - file://0001-remove-double-initialization-of-cryptodev-engine.patch \ - file://0002-ECC-Support-header-for-Cryptodev-Engine.patch \ - file://0003-add-support-for-TLS-algorithms-offload.patch \ - file://0004-Fixed-private-key-support-for-DH.patch \ - file://0005-Fixed-private-key-support-for-DH.patch \ - file://0006-Initial-support-for-PKC-in-cryptodev-engine.patch \ - file://0007-Added-hwrng-dev-file-as-source-of-RNG.patch \ - file://0008-Asynchronous-interface-added-for-PKC-cryptodev-inter.patch \ - file://0009-eng_cryptodev-extend-TLS-offload-with-new-algorithms.patch \ - file://0010-Add-RSA-keygen-operation-and-support-gendsa-command-.patch \ - file://0011-RSA-Keygen-Fix.patch \ - file://0012-Removed-local-copy-of-curve_t-type.patch \ - file://0013-Modulus-parameter-is-not-populated-by-dhparams.patch \ - file://0014-SW-Backoff-mechanism-for-dsa-keygen.patch \ - file://0015-Fixed-DH-keygen-pair-generator.patch \ -" -SRCREV = "b2d951e4232d2f90168f9a3dd0b7df9ecf2d81a8" - -SRC_URI += "file://configure-targets.patch \ - file://shared-libs.patch \ - file://oe-ldflags.patch \ - file://engines-install-in-libdir-ssl.patch \ - file://openssl-fix-link.patch \ - file://debian/version-script.patch \ - file://debian/pic.patch \ - file://debian/c_rehash-compat.patch \ - file://debian/ca.patch \ - file://debian/make-targets.patch \ - file://debian/no-rpath.patch \ - file://debian/man-dir.patch \ - file://debian/man-section.patch \ - file://debian/no-symbolic.patch \ - file://debian/debian-targets.patch \ - file://openssl_fix_for_x32.patch \ - file://openssl-fix-doc.patch \ - file://fix-cipher-des-ede3-cfb1.patch \ - file://openssl-avoid-NULL-pointer-dereference-in-EVP_DigestInit_ex.patch \ - file://openssl-avoid-NULL-pointer-dereference-in-dh_pub_encode.patch \ - file://initial-aarch64-bits.patch \ - file://find.pl \ - file://openssl-fix-des.pod-error.patch \ - " -S = "${WORKDIR}/git" - -# Digest offloading through cryptodev is not recommended because of the -# performance penalty of the Openssl engine interface. Openssl generates a huge -# number of calls to digest functions for even a small amount of work data. -# For example there are 70 calls to cipher code and over 10000 to digest code -# when downloading only 10 files of 700 bytes each. -# Do not build OpenSSL with cryptodev digest support until engine digest -# interface gets some rework: -CFLAG := "${@'${CFLAG}'.replace('-DUSE_CRYPTODEV_DIGESTS', '')}" diff --git a/meta-fsl-ppc/recipes-connectivity/openssl/openssl_1.0.1i.bb b/meta-fsl-ppc/recipes-connectivity/openssl/openssl_1.0.1i.bb new file mode 100644 index 00000000..f3c20e8c --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/openssl/openssl_1.0.1i.bb @@ -0,0 +1,55 @@ +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=f9a8f968107345e0b75aa8c2ecaa7ec8" + +export DIRS = "crypto ssl apps engines" +export OE_LDFLAGS="${LDFLAGS}" + +SRC_URI += "file://configure-targets.patch \ + file://shared-libs.patch \ + file://oe-ldflags.patch \ + file://engines-install-in-libdir-ssl.patch \ + file://openssl-fix-link.patch \ + file://debian/version-script.patch \ + file://debian/pic.patch \ + file://debian/c_rehash-compat.patch \ + file://debian/ca.patch \ + file://debian/make-targets.patch \ + file://debian/no-rpath.patch \ + file://debian/man-dir.patch \ + file://debian/man-section.patch \ + file://debian/no-symbolic.patch \ + file://debian/debian-targets.patch \ + file://openssl_fix_for_x32.patch \ + file://openssl-fix-doc.patch \ + file://fix-cipher-des-ede3-cfb1.patch \ + file://openssl-avoid-NULL-pointer-dereference-in-EVP_DigestInit_ex.patch \ + file://openssl-avoid-NULL-pointer-dereference-in-dh_pub_encode.patch \ + file://initial-aarch64-bits.patch \ + file://find.pl \ + file://openssl-fix-des.pod-error.patch \ + " + +SRC_URI[md5sum] = "de62b43dfcd858e66a74bee1c834e959" +SRC_URI[sha256sum] = "53cb818c3b90e507a8348f4f5eaedb05d8bfe5358aabb508b7263cc670c3e028" + +PACKAGES =+ " \ + ${PN}-engines \ + ${PN}-engines-dbg \ + " + +FILES_${PN}-engines = "${libdir}/ssl/engines/*.so ${libdir}/engines" +FILES_${PN}-engines-dbg = "${libdir}/ssl/engines/.debug" + +PARALLEL_MAKE = "" +PARALLEL_MAKEINST = "" + +do_configure_prepend() { + cp ${WORKDIR}/find.pl ${S}/util/find.pl +} diff --git a/meta-fsl-ppc/recipes-connectivity/openssl/openssl_1.0.1i.bbappend b/meta-fsl-ppc/recipes-connectivity/openssl/openssl_1.0.1i.bbappend new file mode 100644 index 00000000..89d7339a --- /dev/null +++ b/meta-fsl-ppc/recipes-connectivity/openssl/openssl_1.0.1i.bbappend @@ -0,0 +1,60 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/openssl-fsl:" + +RDEPENDS_${PN}_class-target += "cryptodev-module" + +# base package is taken from Freescale repository +SRCBRANCH = "OpenSSL_1_0_1-stable" +SRC_URI = "git://git.openssl.org/openssl.git;branch=${SRCBRANCH} \ + file://0001-remove-double-initialization-of-cryptodev-engine.patch \ + file://0002-eng_cryptodev-add-support-for-TLS-algorithms-offload.patch \ + file://0003-cryptodev-fix-algorithm-registration.patch \ + file://0004-linux-pcc-make-it-more-robust-and-recognize-KERNEL_B.patch \ + file://0005-ECC-Support-header-for-Cryptodev-Engine.patch \ + file://0006-Fixed-private-key-support-for-DH.patch \ + file://0007-Fixed-private-key-support-for-DH.patch \ + file://0008-Initial-support-for-PKC-in-cryptodev-engine.patch \ + file://0009-Added-hwrng-dev-file-as-source-of-RNG.patch \ + file://0010-Asynchronous-interface-added-for-PKC-cryptodev-inter.patch \ + file://0011-Add-RSA-keygen-operation-and-support-gendsa-command-.patch \ + file://0012-RSA-Keygen-Fix.patch \ + file://0013-Removed-local-copy-of-curve_t-type.patch \ + file://0014-Modulus-parameter-is-not-populated-by-dhparams.patch \ + file://0015-SW-Backoff-mechanism-for-dsa-keygen.patch \ + file://0016-Fixed-DH-keygen-pair-generator.patch \ + file://0017-cryptodev-add-support-for-aes-gcm-algorithm-offloadi.patch \ +" +SRCREV = "2b456034457b58454aae3998a2765b6a5b9bc837" + +SRC_URI += "file://configure-targets.patch \ + file://shared-libs.patch \ + file://oe-ldflags.patch \ + file://engines-install-in-libdir-ssl.patch \ + file://openssl-fix-link.patch \ + file://debian/version-script.patch \ + file://debian/pic.patch \ + file://debian/c_rehash-compat.patch \ + file://debian/ca.patch \ + file://debian/make-targets.patch \ + file://debian/no-rpath.patch \ + file://debian/man-dir.patch \ + file://debian/man-section.patch \ + file://debian/no-symbolic.patch \ + file://debian/debian-targets.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-avoid-NULL-pointer-dereference-in-dh_pub_encode.patch \ + file://initial-aarch64-bits.patch \ + file://find.pl \ + file://openssl-fix-des.pod-error.patch \ + " +S = "${WORKDIR}/git" + +# Digest offloading through cryptodev is not recommended because of the +# performance penalty of the Openssl engine interface. Openssl generates a huge +# number of calls to digest functions for even a small amount of work data. +# For example there are 70 calls to cipher code and over 10000 to digest code +# when downloading only 10 files of 700 bytes each. +# Do not build OpenSSL with cryptodev digest support until engine digest +# interface gets some rework: +CFLAG := "${@'${CFLAG}'.replace('-DUSE_CRYPTODEV_DIGESTS', '')}" -- cgit v1.2.3-54-g00ecf From 9e63ca38c4ccbf54228ac743936501f710f8a09e Mon Sep 17 00:00:00 2001 From: Cristian Stoica Date: Wed, 7 Jan 2015 17:55:01 +0800 Subject: cryptodev: update origin and remove stale patches - Nikos handed over project maintainance to Phil Sutter. - Several pending patches have been merged upstream so we removed them from the recipe. The remaining ones have been sorted Signed-off-by: Cristian Stoica Change-Id: I0c6160c739d379ba787e72423d1564b9a3d05d8b Reviewed-on: http://git.am.freescale.net:8181/24177 Reviewed-by: Zhenhua Luo Tested-by: Zhenhua Luo --- .../recipes-kernel/cryptodev/cryptodev-fsl.inc | 29 +- ...-for-composite-TLS-SHA1-AES-algorithm-off.patch | 53 -- ...-for-composite-TLS10-SHA1-AES-algorithm-o.patch | 52 ++ ...dd-support-for-COMPAT_CIOCAUTHCRYPT-ioctl.patch | 207 +++++ ...on-local-storage-for-cipher-and-hmac-keys.patch | 87 -- ...rt-for-aead-keys-for-composite-algorithms.patch | 170 ---- ...003-PKC-support-added-in-cryptodev-module.patch | 898 +++++++++++++++++++++ .../0004-Compat-versions-of-PKC-IOCTLs.patch | 200 +++++ ...-scatterlist-size-for-in-place-operations.patch | 39 - ...ynchronous-interface-changes-in-cryptodev.patch | 213 +++++ ..._len-parameter-to-be-provided-by-the-user.patch | 70 -- ...and-DLC_KEYGEN-supported-in-cryptodev-mod.patch | 212 +++++ .../0006-fix-build-error-on-some-targets.patch | 64 -- ...stall-fixed-in-PKC-asynchronous-interface.patch | 238 ++++++ ...dd-support-for-COMPAT_CIOCAUTHCRYPT-ioctl.patch | 209 ----- .../0008-Add-RSA-Key-generation-offloading.patch | 170 ++++ .../0008-fix-cipher-algorithm-memleaks.patch | 53 -- ...lation-error-of-openssl-with-fsl-cryptode.patch | 160 ++++ ...009-PKC-support-added-in-cryptodev-module.patch | 898 --------------------- .../0010-Compat-versions-of-PKC-IOCTLs.patch | 200 ----- ...ynchronous-interface-changes-in-cryptodev.patch | 213 ----- ...and-DLC_KEYGEN-supported-in-cryptodev-mod.patch | 213 ----- ...stall-fixed-in-PKC-asynchronous-interface.patch | 238 ------ ...allocation-for-keys-copied-from-userspace.patch | 131 --- .../0015-Add-RSA-Key-generation-offloading.patch | 170 ---- ...lation-error-of-openssl-with-fsl-cryptode.patch | 116 --- 26 files changed, 2361 insertions(+), 2942 deletions(-) delete mode 100644 meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0001-add-support-for-composite-TLS-SHA1-AES-algorithm-off.patch create mode 100644 meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0001-add-support-for-composite-TLS10-SHA1-AES-algorithm-o.patch create mode 100644 meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0002-add-support-for-COMPAT_CIOCAUTHCRYPT-ioctl.patch delete mode 100644 meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0002-use-function-local-storage-for-cipher-and-hmac-keys.patch delete mode 100644 meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0003-Add-support-for-aead-keys-for-composite-algorithms.patch create mode 100644 meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0003-PKC-support-added-in-cryptodev-module.patch create mode 100644 meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0004-Compat-versions-of-PKC-IOCTLs.patch delete mode 100644 meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0004-fix-scatterlist-size-for-in-place-operations.patch create mode 100644 meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0005-Asynchronous-interface-changes-in-cryptodev.patch delete mode 100644 meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0005-add-dst_len-parameter-to-be-provided-by-the-user.patch create mode 100644 meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0006-ECC_KEYGEN-and-DLC_KEYGEN-supported-in-cryptodev-mod.patch delete mode 100644 meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0006-fix-build-error-on-some-targets.patch create mode 100644 meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0007-RCU-stall-fixed-in-PKC-asynchronous-interface.patch delete mode 100644 meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0007-add-support-for-COMPAT_CIOCAUTHCRYPT-ioctl.patch create mode 100644 meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0008-Add-RSA-Key-generation-offloading.patch delete mode 100644 meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0008-fix-cipher-algorithm-memleaks.patch create mode 100644 meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0009-Fixed-compilation-error-of-openssl-with-fsl-cryptode.patch delete mode 100644 meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0009-PKC-support-added-in-cryptodev-module.patch delete mode 100644 meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0010-Compat-versions-of-PKC-IOCTLs.patch delete mode 100644 meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0011-Asynchronous-interface-changes-in-cryptodev.patch delete mode 100644 meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0012-ECC_KEYGEN-and-DLC_KEYGEN-supported-in-cryptodev-mod.patch delete mode 100644 meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0013-RCU-stall-fixed-in-PKC-asynchronous-interface.patch delete mode 100644 meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0014-use-static-allocation-for-keys-copied-from-userspace.patch delete mode 100644 meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0015-Add-RSA-Key-generation-offloading.patch delete mode 100644 meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0016-Fixed-compilation-error-of-openssl-with-fsl-cryptode.patch diff --git a/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl.inc b/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl.inc index 70544e26..e32e3502 100644 --- a/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl.inc +++ b/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl.inc @@ -1,24 +1,17 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/cryptodev-fsl:" -SRC_URI_qoriq-ppc = "git://github.com/nmav/cryptodev-linux.git \ - file://0001-add-support-for-composite-TLS-SHA1-AES-algorithm-off.patch \ - file://0002-use-function-local-storage-for-cipher-and-hmac-keys.patch \ - file://0003-Add-support-for-aead-keys-for-composite-algorithms.patch \ - file://0004-fix-scatterlist-size-for-in-place-operations.patch \ - file://0005-add-dst_len-parameter-to-be-provided-by-the-user.patch \ - file://0006-fix-build-error-on-some-targets.patch \ - file://0007-add-support-for-COMPAT_CIOCAUTHCRYPT-ioctl.patch \ - file://0008-fix-cipher-algorithm-memleaks.patch \ - file://0009-PKC-support-added-in-cryptodev-module.patch \ - file://0010-Compat-versions-of-PKC-IOCTLs.patch \ - file://0011-Asynchronous-interface-changes-in-cryptodev.patch \ - file://0012-ECC_KEYGEN-and-DLC_KEYGEN-supported-in-cryptodev-mod.patch \ - file://0013-RCU-stall-fixed-in-PKC-asynchronous-interface.patch \ - file://0014-use-static-allocation-for-keys-copied-from-userspace.patch \ - file://0015-Add-RSA-Key-generation-offloading.patch \ - file://0016-Fixed-compilation-error-of-openssl-with-fsl-cryptode.patch \ +SRC_URI_qoriq-ppc = "git://github.com/cryptodev-linux/cryptodev-linux.git \ + file://0001-add-support-for-composite-TLS10-SHA1-AES-algorithm-o.patch \ + file://0002-add-support-for-COMPAT_CIOCAUTHCRYPT-ioctl.patch \ + file://0003-PKC-support-added-in-cryptodev-module.patch \ + file://0004-Compat-versions-of-PKC-IOCTLs.patch \ + file://0005-Asynchronous-interface-changes-in-cryptodev.patch \ + file://0006-ECC_KEYGEN-and-DLC_KEYGEN-supported-in-cryptodev-mod.patch \ + file://0007-RCU-stall-fixed-in-PKC-asynchronous-interface.patch \ + file://0008-Add-RSA-Key-generation-offloading.patch \ + file://0009-Fixed-compilation-error-of-openssl-with-fsl-cryptode.patch \ " -SRCREV_qoriq-ppc = "e8609a408d40c83ae8fc11bbe9a7b3847612669b" +SRCREV_qoriq-ppc = "6aa62a2c320b04f55fdfe0ed015c3d9b48997239" S_qoriq-ppc = "${WORKDIR}/git" diff --git a/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0001-add-support-for-composite-TLS-SHA1-AES-algorithm-off.patch b/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0001-add-support-for-composite-TLS-SHA1-AES-algorithm-off.patch deleted file mode 100644 index 094fb0b5..00000000 --- a/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0001-add-support-for-composite-TLS-SHA1-AES-algorithm-off.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 434790a1bbafa371c0c6647238234573db98d017 Mon Sep 17 00:00:00 2001 -From: Cristian Stoica -Date: Thu, 29 Aug 2013 16:52:30 +0300 -Subject: [[Patch][fsl 01/16] add support for composite TLS(SHA1,AES) - algorithm offload - -Upstream-status: Pending - -This adds support for composite algorithm offload in a single crypto -(cipher + hmac) operation. - -It requires either software or hardware TLS support in the Linux kernel -and can be used with Freescale B*, P* and T* platforms that have support -for hardware TLS acceleration. - -Signed-off-by: Cristian Stoica -Tested-by: Horia Ioan Geanta Neag ---- - crypto/cryptodev.h | 1 + - ioctl.c | 5 +++++ - 2 files changed, 6 insertions(+) - -diff --git a/crypto/cryptodev.h b/crypto/cryptodev.h -index 7fb9c7d..c0e8cd4 100644 ---- a/crypto/cryptodev.h -+++ b/crypto/cryptodev.h -@@ -50,6 +50,7 @@ enum cryptodev_crypto_op_t { - CRYPTO_SHA2_384, - CRYPTO_SHA2_512, - CRYPTO_SHA2_224_HMAC, -+ CRYPTO_TLS10_AES_CBC_HMAC_SHA1, - CRYPTO_ALGORITHM_ALL, /* Keep updated - see below */ - }; - -diff --git a/ioctl.c b/ioctl.c -index d4e83f4..a0f1db1 100644 ---- a/ioctl.c -+++ b/ioctl.c -@@ -146,6 +146,11 @@ crypto_create_session(struct fcrypt *fcr, struct session_op *sop) - stream = 1; - aead = 1; - break; -+ case CRYPTO_TLS10_AES_CBC_HMAC_SHA1: -+ alg_name = "tls10(hmac(sha1),cbc(aes))"; -+ stream = 0; -+ aead = 1; -+ break; - case CRYPTO_NULL: - alg_name = "ecb(cipher_null)"; - stream = 1; --- -1.7.9.7 - diff --git a/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0001-add-support-for-composite-TLS10-SHA1-AES-algorithm-o.patch b/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0001-add-support-for-composite-TLS10-SHA1-AES-algorithm-o.patch new file mode 100644 index 00000000..796e5484 --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0001-add-support-for-composite-TLS10-SHA1-AES-algorithm-o.patch @@ -0,0 +1,52 @@ +From 715ade8236f40cf811c39f9538dfd60803967fcd Mon Sep 17 00:00:00 2001 +From: Cristian Stoica +Date: Thu, 29 Aug 2013 16:52:30 +0300 +Subject: [PATCH 1/9] add support for composite TLS10(SHA1,AES) algorithm + offload + +This adds support for composite algorithm offload as a primitive +crypto (cipher + hmac) operation. + +It requires kernel support for tls10(hmac(sha1),cbc(aes)) algorithm +provided either in software or accelerated by hardware such as +Freescale B*, P* and T* platforms. + +Change-Id: Ia1c605da3860e91e681295dfc8df7c09eb4006cf +Signed-off-by: Cristian Stoica +Reviewed-on: http://git.am.freescale.net:8181/17218 +--- + crypto/cryptodev.h | 1 + + ioctl.c | 5 +++++ + 2 files changed, 6 insertions(+) + +diff --git a/crypto/cryptodev.h b/crypto/cryptodev.h +index 7fb9c7d..c0e8cd4 100644 +--- a/crypto/cryptodev.h ++++ b/crypto/cryptodev.h +@@ -50,6 +50,7 @@ enum cryptodev_crypto_op_t { + CRYPTO_SHA2_384, + CRYPTO_SHA2_512, + CRYPTO_SHA2_224_HMAC, ++ CRYPTO_TLS10_AES_CBC_HMAC_SHA1, + CRYPTO_ALGORITHM_ALL, /* Keep updated - see below */ + }; + +diff --git a/ioctl.c b/ioctl.c +index 5a55a76..f9b9b2e 100644 +--- a/ioctl.c ++++ b/ioctl.c +@@ -159,6 +159,11 @@ crypto_create_session(struct fcrypt *fcr, struct session_op *sop) + stream = 1; + aead = 1; + break; ++ case CRYPTO_TLS10_AES_CBC_HMAC_SHA1: ++ alg_name = "tls10(hmac(sha1),cbc(aes))"; ++ stream = 0; ++ aead = 1; ++ break; + case CRYPTO_NULL: + alg_name = "ecb(cipher_null)"; + stream = 1; +-- +1.8.3.1 + diff --git a/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0002-add-support-for-COMPAT_CIOCAUTHCRYPT-ioctl.patch b/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0002-add-support-for-COMPAT_CIOCAUTHCRYPT-ioctl.patch new file mode 100644 index 00000000..086a97f8 --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0002-add-support-for-COMPAT_CIOCAUTHCRYPT-ioctl.patch @@ -0,0 +1,207 @@ +From 4b766c93e4ee19248dd66bbebb61fb5cc9c8a012 Mon Sep 17 00:00:00 2001 +From: Horia Geanta +Date: Wed, 4 Dec 2013 15:43:41 +0200 +Subject: [PATCH 2/9] add support for COMPAT_CIOCAUTHCRYPT ioctl() + +Upstream-status: Pending + +Needed for 64b kernel with 32b user space. + +Change-Id: I44a999a4164e7ae7122dee6ed0716b2f25cadbc1 +Signed-off-by: Horia Geanta +Tested-by: Cristian Stoica +--- + authenc.c | 78 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + cryptodev_int.h | 40 +++++++++++++++++++++++++++++ + ioctl.c | 16 ++++++++++++ + 3 files changed, 134 insertions(+) + +diff --git a/authenc.c b/authenc.c +index 1bd7377..ef0d3db 100644 +--- a/authenc.c ++++ b/authenc.c +@@ -272,6 +272,84 @@ static int fill_caop_from_kcaop(struct kernel_crypt_auth_op *kcaop, struct fcryp + return 0; + } + ++/* compatibility code for 32bit userlands */ ++#ifdef CONFIG_COMPAT ++ ++static inline void ++compat_to_crypt_auth_op(struct compat_crypt_auth_op *compat, ++ struct crypt_auth_op *caop) ++{ ++ caop->ses = compat->ses; ++ caop->op = compat->op; ++ caop->flags = compat->flags; ++ caop->len = compat->len; ++ caop->auth_len = compat->auth_len; ++ caop->tag_len = compat->tag_len; ++ caop->iv_len = compat->iv_len; ++ ++ caop->auth_src = compat_ptr(compat->auth_src); ++ caop->src = compat_ptr(compat->src); ++ caop->dst = compat_ptr(compat->dst); ++ caop->tag = compat_ptr(compat->tag); ++ caop->iv = compat_ptr(compat->iv); ++} ++ ++static inline void ++crypt_auth_op_to_compat(struct crypt_auth_op *caop, ++ struct compat_crypt_auth_op *compat) ++{ ++ compat->ses = caop->ses; ++ compat->op = caop->op; ++ compat->flags = caop->flags; ++ compat->len = caop->len; ++ compat->auth_len = caop->auth_len; ++ compat->tag_len = caop->tag_len; ++ compat->iv_len = caop->iv_len; ++ ++ compat->auth_src = ptr_to_compat(caop->auth_src); ++ compat->src = ptr_to_compat(caop->src); ++ compat->dst = ptr_to_compat(caop->dst); ++ compat->tag = ptr_to_compat(caop->tag); ++ compat->iv = ptr_to_compat(caop->iv); ++} ++ ++int compat_kcaop_from_user(struct kernel_crypt_auth_op *kcaop, ++ struct fcrypt *fcr, void __user *arg) ++{ ++ struct compat_crypt_auth_op compat_caop; ++ ++ if (unlikely(copy_from_user(&compat_caop, arg, sizeof(compat_caop)))) { ++ dprintk(1, KERN_ERR, "Error in copying from userspace\n"); ++ return -EFAULT; ++ } ++ ++ compat_to_crypt_auth_op(&compat_caop, &kcaop->caop); ++ ++ return fill_kcaop_from_caop(kcaop, fcr); ++} ++ ++int compat_kcaop_to_user(struct kernel_crypt_auth_op *kcaop, ++ struct fcrypt *fcr, void __user *arg) ++{ ++ int ret; ++ struct compat_crypt_auth_op compat_caop; ++ ++ ret = fill_caop_from_kcaop(kcaop, fcr); ++ if (unlikely(ret)) { ++ dprintk(1, KERN_ERR, "fill_caop_from_kcaop\n"); ++ return ret; ++ } ++ ++ crypt_auth_op_to_compat(&kcaop->caop, &compat_caop); ++ ++ if (unlikely(copy_to_user(arg, &compat_caop, sizeof(compat_caop)))) { ++ dprintk(1, KERN_ERR, "Error in copying to userspace\n"); ++ return -EFAULT; ++ } ++ return 0; ++} ++ ++#endif /* CONFIG_COMPAT */ + + int kcaop_from_user(struct kernel_crypt_auth_op *kcaop, + struct fcrypt *fcr, void __user *arg) +diff --git a/cryptodev_int.h b/cryptodev_int.h +index d7660fa..8e687e7 100644 +--- a/cryptodev_int.h ++++ b/cryptodev_int.h +@@ -73,11 +73,42 @@ struct compat_crypt_op { + compat_uptr_t iv;/* initialization vector for encryption operations */ + }; + ++ /* input of CIOCAUTHCRYPT */ ++struct compat_crypt_auth_op { ++ uint32_t ses; /* session identifier */ ++ uint16_t op; /* COP_ENCRYPT or COP_DECRYPT */ ++ uint16_t flags; /* see COP_FLAG_AEAD_* */ ++ uint32_t len; /* length of source data */ ++ uint32_t auth_len; /* length of auth data */ ++ compat_uptr_t auth_src; /* authenticated-only data */ ++ ++ /* The current implementation is more efficient if data are ++ * encrypted in-place (src==dst). */ ++ compat_uptr_t src; /* data to be encrypted and ++ authenticated */ ++ compat_uptr_t dst; /* pointer to output data. Must have ++ * space for tag. For TLS this should be ++ * at least len + tag_size + block_size ++ * for padding */ ++ ++ compat_uptr_t tag; /* where the tag will be copied to. TLS ++ * mode doesn't use that as tag is ++ * copied to dst. ++ * SRTP mode copies tag there. */ ++ uint32_t tag_len; /* the length of the tag. Use zero for ++ * digest size or max tag. */ ++ ++ /* initialization vector for encryption operations */ ++ compat_uptr_t iv; ++ uint32_t iv_len; ++}; ++ + /* compat ioctls, defined for the above structs */ + #define COMPAT_CIOCGSESSION _IOWR('c', 102, struct compat_session_op) + #define COMPAT_CIOCCRYPT _IOWR('c', 104, struct compat_crypt_op) + #define COMPAT_CIOCASYNCCRYPT _IOW('c', 107, struct compat_crypt_op) + #define COMPAT_CIOCASYNCFETCH _IOR('c', 108, struct compat_crypt_op) ++#define COMPAT_CIOCAUTHCRYPT _IOWR('c', 109, struct compat_crypt_auth_op) + + #endif /* CONFIG_COMPAT */ + +@@ -108,6 +139,15 @@ struct kernel_crypt_auth_op { + + /* auth */ + ++#ifdef CONFIG_COMPAT ++int compat_kcaop_from_user(struct kernel_crypt_auth_op *kcaop, ++ struct fcrypt *fcr, void __user *arg); ++ ++int compat_kcaop_to_user(struct kernel_crypt_auth_op *kcaop, ++ struct fcrypt *fcr, void __user *arg); ++#endif /* CONFIG_COMPAT */ ++ ++ + int kcaop_from_user(struct kernel_crypt_auth_op *kcop, + struct fcrypt *fcr, void __user *arg); + int kcaop_to_user(struct kernel_crypt_auth_op *kcaop, +diff --git a/ioctl.c b/ioctl.c +index f9b9b2e..1563c75 100644 +--- a/ioctl.c ++++ b/ioctl.c +@@ -998,6 +998,7 @@ cryptodev_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg_) + struct session_op sop; + struct compat_session_op compat_sop; + struct kernel_crypt_op kcop; ++ struct kernel_crypt_auth_op kcaop; + int ret; + + if (unlikely(!pcr)) +@@ -1040,6 +1041,21 @@ cryptodev_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg_) + return ret; + + return compat_kcop_to_user(&kcop, fcr, arg); ++ ++ case COMPAT_CIOCAUTHCRYPT: ++ if (unlikely(ret = compat_kcaop_from_user(&kcaop, fcr, arg))) { ++ dprintk(1, KERN_WARNING, "Error copying from user\n"); ++ return ret; ++ } ++ ++ ret = crypto_auth_run(fcr, &kcaop); ++ if (unlikely(ret)) { ++ dprintk(1, KERN_WARNING, "Error in crypto_auth_run\n"); ++ return ret; ++ } ++ ++ return compat_kcaop_to_user(&kcaop, fcr, arg); ++ + #ifdef ENABLE_ASYNC + case COMPAT_CIOCASYNCCRYPT: + if (unlikely(ret = compat_kcop_from_user(&kcop, fcr, arg))) +-- +1.8.3.1 + diff --git a/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0002-use-function-local-storage-for-cipher-and-hmac-keys.patch b/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0002-use-function-local-storage-for-cipher-and-hmac-keys.patch deleted file mode 100644 index 4702fd4f..00000000 --- a/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0002-use-function-local-storage-for-cipher-and-hmac-keys.patch +++ /dev/null @@ -1,87 +0,0 @@ -From cc65307405a21c3b709ca6f2a6f64ff0c67c0eed Mon Sep 17 00:00:00 2001 -From: Cristian Stoica -Date: Wed, 18 Sep 2013 13:42:31 +0300 -Subject: [[Patch][fsl 02/16] use function-local storage for cipher and hmac - keys - -Upstream-status: Pending - -This refactorization is necessary for next patches that add support for -aead composite ciphers where the aead key is the sum of cipher and hmac -keys. - -Without this patch, the hmac and cipher keys can't be combined in the -same ioctl. - -Signed-off-by: Cristian Stoica -Tested-by: Horia Ioan Geanta Neag ---- - ioctl.c | 14 ++++++-------- - 1 file changed, 6 insertions(+), 8 deletions(-) - -diff --git a/ioctl.c b/ioctl.c -index a0f1db1..c614373 100644 ---- a/ioctl.c -+++ b/ioctl.c -@@ -109,6 +109,8 @@ crypto_create_session(struct fcrypt *fcr, struct session_op *sop) - const char *alg_name = NULL; - const char *hash_name = NULL; - int hmac_mode = 1, stream = 0, aead = 0; -+ uint8_t enckey[CRYPTO_CIPHER_MAX_KEY_LEN]; -+ uint8_t mackey[CRYPTO_HMAC_MAX_KEY_LEN]; - - /* Does the request make sense? */ - if (unlikely(!sop->cipher && !sop->mac)) { -@@ -227,8 +229,6 @@ crypto_create_session(struct fcrypt *fcr, struct session_op *sop) - - /* Set-up crypto transform. */ - if (alg_name) { -- uint8_t keyp[CRYPTO_CIPHER_MAX_KEY_LEN]; -- - if (unlikely(sop->keylen > CRYPTO_CIPHER_MAX_KEY_LEN)) { - ddebug(1, "Setting key failed for %s-%zu.", - alg_name, (size_t)sop->keylen*8); -@@ -236,12 +236,12 @@ crypto_create_session(struct fcrypt *fcr, struct session_op *sop) - goto error_cipher; - } - -- if (unlikely(copy_from_user(keyp, sop->key, sop->keylen))) { -+ if (unlikely(copy_from_user(enckey, sop->key, sop->keylen))) { - ret = -EFAULT; - goto error_cipher; - } - -- ret = cryptodev_cipher_init(&ses_new->cdata, alg_name, keyp, -+ ret = cryptodev_cipher_init(&ses_new->cdata, alg_name, enckey, - sop->keylen, stream, aead); - if (ret < 0) { - ddebug(1, "Failed to load cipher for %s", alg_name); -@@ -251,8 +251,6 @@ crypto_create_session(struct fcrypt *fcr, struct session_op *sop) - } - - if (hash_name && aead == 0) { -- uint8_t keyp[CRYPTO_HMAC_MAX_KEY_LEN]; -- - if (unlikely(sop->mackeylen > CRYPTO_HMAC_MAX_KEY_LEN)) { - ddebug(1, "Setting key failed for %s-%zu.", - hash_name, (size_t)sop->mackeylen*8); -@@ -260,14 +258,14 @@ crypto_create_session(struct fcrypt *fcr, struct session_op *sop) - goto error_hash; - } - -- if (sop->mackey && unlikely(copy_from_user(keyp, sop->mackey, -+ if (sop->mackey && unlikely(copy_from_user(mackey, sop->mackey, - sop->mackeylen))) { - ret = -EFAULT; - goto error_hash; - } - - ret = cryptodev_hash_init(&ses_new->hdata, hash_name, hmac_mode, -- keyp, sop->mackeylen); -+ mackey, sop->mackeylen); - if (ret != 0) { - ddebug(1, "Failed to load hash for %s", hash_name); - ret = -EINVAL; --- -1.7.9.7 - diff --git a/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0003-Add-support-for-aead-keys-for-composite-algorithms.patch b/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0003-Add-support-for-aead-keys-for-composite-algorithms.patch deleted file mode 100644 index 033552a3..00000000 --- a/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0003-Add-support-for-aead-keys-for-composite-algorithms.patch +++ /dev/null @@ -1,170 +0,0 @@ -From 8cabaedb69acc5b44c7a9cf058045908130a6af7 Mon Sep 17 00:00:00 2001 -From: Cristian Stoica -Date: Wed, 23 Oct 2013 16:57:22 +0300 -Subject: [[Patch][fsl 03/16] Add support for aead keys for composite - algorithms - -Upstream-status: Pending - -Composite aead algorithms (e.g. AES-CBC + HMAC-SHA1) need two keys to -operate. The two keys are wrapped in a single buffer in the form -used also by crypto/authenc.c -Blockcipher and non-composite aead algorithms (e.g. AES-GCM) use a -single key which is simply copied from user-space. - -Signed-off-by: Cristian Stoica -Tested-by: Horia Ioan Geanta Neag ---- - cryptlib.c | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - cryptlib.h | 3 +++ - ioctl.c | 24 ++++++++++++++---------- - 3 files changed, 76 insertions(+), 10 deletions(-) - -diff --git a/cryptlib.c b/cryptlib.c -index a7fbff4..2986d09 100644 ---- a/cryptlib.c -+++ b/cryptlib.c -@@ -34,6 +34,8 @@ - #include - #include - #include -+#include -+#include - #include "cryptodev_int.h" - - -@@ -53,6 +55,63 @@ static void cryptodev_complete(struct crypto_async_request *req, int err) - complete(&res->completion); - } - -+int cryptodev_get_cipher_keylen(unsigned int *keylen, struct session_op *sop, -+ int aead) -+{ -+ unsigned int klen = sop->keylen; -+ -+ if (unlikely(sop->keylen > CRYPTO_CIPHER_MAX_KEY_LEN)) -+ return -EINVAL; -+ -+ if (aead && sop->mackeylen) { -+ if (unlikely(sop->mackeylen > CRYPTO_HMAC_MAX_KEY_LEN)) -+ return -EINVAL; -+ klen += sop->mackeylen; -+ klen += RTA_SPACE(sizeof(struct crypto_authenc_key_param)); -+ } -+ -+ *keylen = klen; -+ return 0; -+} -+ -+int cryptodev_get_cipher_key(uint8_t *key, struct session_op *sop, int aead) -+{ -+ /* Get algorithm key from user-space. For composite aead algorithms, -+ * the key representation is in the format used by linux kernel in -+ * crypto/authenc.c -+ */ -+ struct crypto_authenc_key_param *param; -+ struct rtattr *rta; -+ int ret = 0; -+ -+ if (aead && sop->mackeylen) { -+ /* the key header type and header length */ -+ rta = (void *)key; -+ rta->rta_type = CRYPTO_AUTHENC_KEYA_PARAM; -+ rta->rta_len = RTA_LENGTH(sizeof(*param)); -+ -+ /* the key parameter is the length of the encryption key */ -+ param = RTA_DATA(rta); -+ param->enckeylen = cpu_to_be32(sop->keylen); -+ -+ /* copy the hash key */ -+ key += RTA_SPACE(sizeof(*param)); -+ if (unlikely(copy_from_user(key, sop->mackey, sop->mackeylen))) { -+ ret = -EFAULT; -+ goto error; -+ } -+ /* get the pointer ready for the encryption key */ -+ key += sop->mackeylen; -+ } -+ /* blockcipher algorithms have the key ready to use */ -+ if (unlikely(copy_from_user(key, sop->key, sop->keylen))) -+ ret = -EFAULT; -+ -+error: -+ return ret; -+} -+ -+ - int cryptodev_cipher_init(struct cipher_data *out, const char *alg_name, - uint8_t *keyp, size_t keylen, int stream, int aead) - { -diff --git a/cryptlib.h b/cryptlib.h -index 0744284..a0a8a63 100644 ---- a/cryptlib.h -+++ b/cryptlib.h -@@ -25,6 +25,9 @@ struct cipher_data { - int cryptodev_cipher_init(struct cipher_data *out, const char *alg_name, - uint8_t *key, size_t keylen, int stream, int aead); - void cryptodev_cipher_deinit(struct cipher_data *cdata); -+int cryptodev_get_cipher_key(uint8_t *key, struct session_op *sop, int aead); -+int cryptodev_get_cipher_keylen(unsigned int *keylen, struct session_op *sop, -+ int aead); - ssize_t cryptodev_cipher_decrypt(struct cipher_data *cdata, - const struct scatterlist *sg1, - struct scatterlist *sg2, size_t len); -diff --git a/ioctl.c b/ioctl.c -index c614373..3baf195 100644 ---- a/ioctl.c -+++ b/ioctl.c -@@ -109,7 +109,8 @@ crypto_create_session(struct fcrypt *fcr, struct session_op *sop) - const char *alg_name = NULL; - const char *hash_name = NULL; - int hmac_mode = 1, stream = 0, aead = 0; -- uint8_t enckey[CRYPTO_CIPHER_MAX_KEY_LEN]; -+ uint8_t *key = NULL; -+ unsigned int keylen; - uint8_t mackey[CRYPTO_HMAC_MAX_KEY_LEN]; - - /* Does the request make sense? */ -@@ -229,20 +230,22 @@ crypto_create_session(struct fcrypt *fcr, struct session_op *sop) - - /* Set-up crypto transform. */ - if (alg_name) { -- if (unlikely(sop->keylen > CRYPTO_CIPHER_MAX_KEY_LEN)) { -- ddebug(1, "Setting key failed for %s-%zu.", -- alg_name, (size_t)sop->keylen*8); -- ret = -EINVAL; -+ ret = cryptodev_get_cipher_keylen(&keylen, sop, aead); -+ if (unlikely(ret < 0)) - goto error_cipher; -- } - -- if (unlikely(copy_from_user(enckey, sop->key, sop->keylen))) { -- ret = -EFAULT; -+ key = kmalloc(keylen, GFP_KERNEL); -+ if (unlikely(!key)) { -+ ret = -ENOMEM; - goto error_cipher; - } - -- ret = cryptodev_cipher_init(&ses_new->cdata, alg_name, enckey, -- sop->keylen, stream, aead); -+ ret = cryptodev_get_cipher_key(key, sop, aead); -+ if (unlikely(ret < 0)) -+ goto error_cipher; -+ -+ ret = cryptodev_cipher_init(&ses_new->cdata, alg_name, key, keylen, -+ stream, aead); - if (ret < 0) { - ddebug(1, "Failed to load cipher for %s", alg_name); - ret = -EINVAL; -@@ -318,6 +321,7 @@ error_hash: - kfree(ses_new->sg); - kfree(ses_new->pages); - error_cipher: -+ kfree(key); - kfree(ses_new); - - return ret; --- -1.7.9.7 - diff --git a/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0003-PKC-support-added-in-cryptodev-module.patch b/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0003-PKC-support-added-in-cryptodev-module.patch new file mode 100644 index 00000000..a4f7816b --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0003-PKC-support-added-in-cryptodev-module.patch @@ -0,0 +1,898 @@ +From 5b57fc2124cef0acc3c7e8de376ebd9aa4f1fdd3 Mon Sep 17 00:00:00 2001 +From: Yashpal Dutta +Date: Fri, 7 Mar 2014 06:16:09 +0545 +Subject: [PATCH 3/9] PKC support added in cryptodev module + +Upstream-status: Pending + +Signed-off-by: Yashpal Dutta +--- + cryptlib.c | 66 +++++++++- + cryptlib.h | 28 ++++ + crypto/cryptodev.h | 15 ++- + cryptodev_int.h | 20 ++- + ioctl.c | 196 +++++++++++++++++++++++++-- + main.c | 378 +++++++++++++++++++++++++++++++++++++++++++++++++++++ + 6 files changed, 685 insertions(+), 18 deletions(-) + +diff --git a/cryptlib.c b/cryptlib.c +index 44ce763..6900028 100644 +--- a/cryptlib.c ++++ b/cryptlib.c +@@ -5,6 +5,8 @@ + * Portions Copyright (c) 2010 Michael Weiser + * Portions Copyright (c) 2010 Phil Sutter + * ++ * Copyright 2012 Freescale Semiconductor, Inc. ++ * + * This file is part of linux cryptodev. + * + * This program is free software; you can redistribute it and/or +@@ -39,11 +41,6 @@ + #include "cryptodev_int.h" + + +-struct cryptodev_result { +- struct completion completion; +- int err; +-}; +- + static void cryptodev_complete(struct crypto_async_request *req, int err) + { + struct cryptodev_result *res = req->data; +@@ -259,7 +256,6 @@ static inline int waitfor(struct cryptodev_result *cr, ssize_t ret) + case 0: + break; + case -EINPROGRESS: +- case -EBUSY: + wait_for_completion(&cr->completion); + /* At this point we known for sure the request has finished, + * because wait_for_completion above was not interruptible. +@@ -439,3 +435,61 @@ int cryptodev_hash_final(struct hash_data *hdata, void *output) + return waitfor(hdata->async.result, ret); + } + ++int cryptodev_pkc_offload(struct cryptodev_pkc *pkc) ++{ ++ int ret = 0; ++ struct pkc_request *pkc_req = &pkc->req, *pkc_requested; ++ ++ switch (pkc_req->type) { ++ case RSA_PUB: ++ case RSA_PRIV_FORM1: ++ case RSA_PRIV_FORM2: ++ case RSA_PRIV_FORM3: ++ pkc->s = crypto_alloc_pkc("pkc(rsa)", ++ CRYPTO_ALG_TYPE_PKC_RSA, 0); ++ break; ++ case DSA_SIGN: ++ case DSA_VERIFY: ++ case ECDSA_SIGN: ++ case ECDSA_VERIFY: ++ pkc->s = crypto_alloc_pkc("pkc(dsa)", ++ CRYPTO_ALG_TYPE_PKC_DSA, 0); ++ break; ++ case DH_COMPUTE_KEY: ++ case ECDH_COMPUTE_KEY: ++ pkc->s = crypto_alloc_pkc("pkc(dh)", ++ CRYPTO_ALG_TYPE_PKC_DH, 0); ++ break; ++ default: ++ return -EINVAL; ++ } ++ ++ if (IS_ERR_OR_NULL(pkc->s)) ++ return -EINVAL; ++ ++ init_completion(&pkc->result.completion); ++ pkc_requested = pkc_request_alloc(pkc->s, GFP_KERNEL); ++ ++ if (unlikely(IS_ERR_OR_NULL(pkc_requested))) { ++ ret = -ENOMEM; ++ goto error; ++ } ++ pkc_requested->type = pkc_req->type; ++ pkc_requested->curve_type = pkc_req->curve_type; ++ memcpy(&pkc_requested->req_u, &pkc_req->req_u, sizeof(pkc_req->req_u)); ++ pkc_request_set_callback(pkc_requested, CRYPTO_TFM_REQ_MAY_BACKLOG, ++ cryptodev_complete_asym, pkc); ++ ret = crypto_pkc_op(pkc_requested); ++ if (ret != -EINPROGRESS && ret != 0) ++ goto error2; ++ ++ if (pkc->type == SYNCHRONOUS) ++ ret = waitfor(&pkc->result, ret); ++ ++ return ret; ++error2: ++ kfree(pkc_requested); ++error: ++ crypto_free_pkc(pkc->s); ++ return ret; ++} +diff --git a/cryptlib.h b/cryptlib.h +index a0a8a63..56d325a 100644 +--- a/cryptlib.h ++++ b/cryptlib.h +@@ -1,3 +1,6 @@ ++/* ++ * Copyright 2012 Freescale Semiconductor, Inc. ++ */ + #ifndef CRYPTLIB_H + # define CRYPTLIB_H + +@@ -89,5 +92,30 @@ void cryptodev_hash_deinit(struct hash_data *hdata); + int cryptodev_hash_init(struct hash_data *hdata, const char *alg_name, + int hmac_mode, void *mackey, size_t mackeylen); + ++/* Operation Type */ ++enum offload_type { ++ SYNCHRONOUS, ++ ASYNCHRONOUS ++}; ++ ++struct cryptodev_result { ++ struct completion completion; ++ int err; ++}; ++ ++struct cryptodev_pkc { ++ struct list_head list; /* To maintain the Jobs in completed ++ cryptodev lists */ ++ struct kernel_crypt_kop kop; ++ struct crypto_pkc *s; /* Transform pointer from CryptoAPI */ ++ struct cryptodev_result result; /* Result to be updated by ++ completion handler */ ++ struct pkc_request req; /* PKC request structure allocated ++ from CryptoAPI */ ++ enum offload_type type; /* Synchronous Vs Asynchronous request */ ++ void *cookie; /*Additional opaque cookie to be used in future */ ++ struct crypt_priv *priv; ++}; + ++int cryptodev_pkc_offload(struct cryptodev_pkc *); + #endif +diff --git a/crypto/cryptodev.h b/crypto/cryptodev.h +index c0e8cd4..96675fe 100644 +--- a/crypto/cryptodev.h ++++ b/crypto/cryptodev.h +@@ -1,6 +1,10 @@ +-/* This is a source compatible implementation with the original API of ++/* ++ * Copyright 2012 Freescale Semiconductor, Inc. ++ * ++ * This is a source compatible implementation with the original API of + * cryptodev by Angelos D. Keromytis, found at openbsd cryptodev.h. +- * Placed under public domain */ ++ * Placed under public domain ++ */ + + #ifndef L_CRYPTODEV_H + #define L_CRYPTODEV_H +@@ -245,6 +249,9 @@ struct crypt_kop { + __u16 crk_oparams; + __u32 crk_pad1; + struct crparam crk_param[CRK_MAXPARAM]; ++ enum curve_t curve_type; /* 0 == Discrete Log, ++ 1 = EC_PRIME, 2 = EC_BINARY */ ++ void *cookie; + }; + + enum cryptodev_crk_op_t { +@@ -289,5 +296,7 @@ enum cryptodev_crk_op_t { + */ + #define CIOCASYNCCRYPT _IOW('c', 110, struct crypt_op) + #define CIOCASYNCFETCH _IOR('c', 111, struct crypt_op) +- ++/* additional ioctls for asynchronous operation for asymmetric ciphers*/ ++#define CIOCASYMASYNCRYPT _IOW('c', 112, struct crypt_kop) ++#define CIOCASYMASYNFETCH _IOR('c', 113, struct crypt_kop) + #endif /* L_CRYPTODEV_H */ +diff --git a/cryptodev_int.h b/cryptodev_int.h +index 8e687e7..fdbcc61 100644 +--- a/cryptodev_int.h ++++ b/cryptodev_int.h +@@ -1,4 +1,6 @@ +-/* cipher stuff */ ++/* cipher stuff ++ * Copyright 2012 Freescale Semiconductor, Inc. ++ */ + #ifndef CRYPTODEV_INT_H + # define CRYPTODEV_INT_H + +@@ -112,6 +114,14 @@ struct compat_crypt_auth_op { + + #endif /* CONFIG_COMPAT */ + ++/* kernel-internal extension to struct crypt_kop */ ++struct kernel_crypt_kop { ++ struct crypt_kop kop; ++ ++ struct task_struct *task; ++ struct mm_struct *mm; ++}; ++ + /* kernel-internal extension to struct crypt_op */ + struct kernel_crypt_op { + struct crypt_op cop; +@@ -157,6 +167,14 @@ int crypto_run(struct fcrypt *fcr, struct kernel_crypt_op *kcop); + + #include + ++/* Cryptodev Key operation handler */ ++int crypto_bn_modexp(struct cryptodev_pkc *); ++int crypto_modexp_crt(struct cryptodev_pkc *); ++int crypto_kop_dsasign(struct cryptodev_pkc *); ++int crypto_kop_dsaverify(struct cryptodev_pkc *); ++int crypto_run_asym(struct cryptodev_pkc *); ++void cryptodev_complete_asym(struct crypto_async_request *, int); ++ + /* other internal structs */ + struct csession { + struct list_head entry; +diff --git a/ioctl.c b/ioctl.c +index 1563c75..782d7fe 100644 +--- a/ioctl.c ++++ b/ioctl.c +@@ -4,6 +4,7 @@ + * Copyright (c) 2004 Michal Ludvig , SuSE Labs + * Copyright (c) 2009,2010,2011 Nikos Mavrogiannopoulos + * Copyright (c) 2010 Phil Sutter ++ * Copyright 2012 Freescale Semiconductor, Inc. + * + * This file is part of linux cryptodev. + * +@@ -89,8 +90,37 @@ struct crypt_priv { + int itemcount; + struct work_struct cryptask; + wait_queue_head_t user_waiter; ++ /* List of pending cryptodev_pkc asym requests */ ++ struct list_head asym_completed_list; ++ /* For addition/removal of entry in pending list of asymmetric request*/ ++ spinlock_t completion_lock; + }; + ++/* Asymmetric request Completion handler */ ++void cryptodev_complete_asym(struct crypto_async_request *req, int err) ++{ ++ struct cryptodev_pkc *pkc = req->data; ++ struct cryptodev_result *res = &pkc->result; ++ ++ crypto_free_pkc(pkc->s); ++ res->err = err; ++ if (pkc->type == SYNCHRONOUS) { ++ if (err == -EINPROGRESS) ++ return; ++ complete(&res->completion); ++ } else { ++ struct crypt_priv *pcr = pkc->priv; ++ unsigned long flags; ++ spin_lock_irqsave(&pcr->completion_lock, flags); ++ list_add_tail(&pkc->list, &pcr->asym_completed_list); ++ spin_unlock_irqrestore(&pcr->completion_lock, flags); ++ /* wake for POLLIN */ ++ wake_up_interruptible(&pcr->user_waiter); ++ } ++ ++ kfree(req); ++} ++ + #define FILL_SG(sg, ptr, len) \ + do { \ + (sg)->page = virt_to_page(ptr); \ +@@ -472,7 +502,8 @@ cryptodev_open(struct inode *inode, struct file *filp) + INIT_LIST_HEAD(&pcr->free.list); + INIT_LIST_HEAD(&pcr->todo.list); + INIT_LIST_HEAD(&pcr->done.list); +- ++ INIT_LIST_HEAD(&pcr->asym_completed_list); ++ spin_lock_init(&pcr->completion_lock); + INIT_WORK(&pcr->cryptask, cryptask_routine); + + init_waitqueue_head(&pcr->user_waiter); +@@ -639,6 +670,79 @@ static int crypto_async_fetch(struct crypt_priv *pcr, + } + #endif + ++/* get the first asym cipher completed job from the "done" queue ++ * ++ * returns: ++ * -EBUSY if no completed jobs are ready (yet) ++ * the return value otherwise */ ++static int crypto_async_fetch_asym(struct cryptodev_pkc *pkc) ++{ ++ int ret = 0; ++ struct kernel_crypt_kop *kop = &pkc->kop; ++ struct crypt_kop *ckop = &kop->kop; ++ struct pkc_request *pkc_req = &pkc->req; ++ ++ switch (ckop->crk_op) { ++ case CRK_MOD_EXP: ++ { ++ struct rsa_pub_req_s *rsa_req = &pkc_req->req_u.rsa_pub_req; ++ copy_to_user(ckop->crk_param[3].crp_p, rsa_req->g, ++ rsa_req->g_len); ++ } ++ break; ++ case CRK_MOD_EXP_CRT: ++ { ++ struct rsa_priv_frm3_req_s *rsa_req = ++ &pkc_req->req_u.rsa_priv_f3; ++ copy_to_user(ckop->crk_param[6].crp_p, ++ rsa_req->f, rsa_req->f_len); ++ } ++ break; ++ case CRK_DSA_SIGN: ++ { ++ struct dsa_sign_req_s *dsa_req = &pkc_req->req_u.dsa_sign; ++ ++ if (pkc_req->type == ECDSA_SIGN) { ++ copy_to_user(ckop->crk_param[6].crp_p, ++ dsa_req->c, dsa_req->d_len); ++ copy_to_user(ckop->crk_param[7].crp_p, ++ dsa_req->d, dsa_req->d_len); ++ } else { ++ copy_to_user(ckop->crk_param[5].crp_p, ++ dsa_req->c, dsa_req->d_len); ++ copy_to_user(ckop->crk_param[6].crp_p, ++ dsa_req->d, dsa_req->d_len); ++ } ++ } ++ break; ++ case CRK_DSA_VERIFY: ++ break; ++ case CRK_DH_COMPUTE_KEY: ++ { ++ struct dh_key_req_s *dh_req = &pkc_req->req_u.dh_req; ++ if (pkc_req->type == ECDH_COMPUTE_KEY) ++ copy_to_user(ckop->crk_param[4].crp_p, ++ dh_req->z, dh_req->z_len); ++ else ++ copy_to_user(ckop->crk_param[3].crp_p, ++ dh_req->z, dh_req->z_len); ++ } ++ break; ++ default: ++ ret = -EINVAL; ++ } ++ kfree(pkc->cookie); ++ return ret; ++} ++ ++/* this function has to be called from process context */ ++static int fill_kop_from_cop(struct kernel_crypt_kop *kop) ++{ ++ kop->task = current; ++ kop->mm = current->mm; ++ return 0; ++} ++ + /* this function has to be called from process context */ + static int fill_kcop_from_cop(struct kernel_crypt_op *kcop, struct fcrypt *fcr) + { +@@ -662,11 +766,8 @@ static int fill_kcop_from_cop(struct kernel_crypt_op *kcop, struct fcrypt *fcr) + + if (cop->iv) { + rc = copy_from_user(kcop->iv, cop->iv, kcop->ivlen); +- if (unlikely(rc)) { +- derr(1, "error copying IV (%d bytes), copy_from_user returned %d for address %p", +- kcop->ivlen, rc, cop->iv); ++ if (unlikely(rc)) + return -EFAULT; +- } + } + + return 0; +@@ -692,6 +793,25 @@ static int fill_cop_from_kcop(struct kernel_crypt_op *kcop, struct fcrypt *fcr) + return 0; + } + ++static int kop_from_user(struct kernel_crypt_kop *kop, ++ void __user *arg) ++{ ++ if (unlikely(copy_from_user(&kop->kop, arg, sizeof(kop->kop)))) ++ return -EFAULT; ++ ++ return fill_kop_from_cop(kop); ++} ++ ++static int kop_to_user(struct kernel_crypt_kop *kop, ++ void __user *arg) ++{ ++ if (unlikely(copy_to_user(arg, &kop->kop, sizeof(kop->kop)))) { ++ dprintk(1, KERN_ERR, "Cannot copy to userspace\n"); ++ return -EFAULT; ++ } ++ return 0; ++} ++ + static int kcop_from_user(struct kernel_crypt_op *kcop, + struct fcrypt *fcr, void __user *arg) + { +@@ -821,7 +941,8 @@ cryptodev_ioctl(struct file *filp, unsigned int cmd, unsigned long arg_) + + switch (cmd) { + case CIOCASYMFEAT: +- return put_user(0, p); ++ return put_user(CRF_MOD_EXP_CRT | CRF_MOD_EXP | ++ CRF_DSA_SIGN | CRF_DSA_VERIFY | CRF_DH_COMPUTE_KEY, p); + case CRIOGET: + fd = clonefd(filp); + ret = put_user(fd, p); +@@ -857,6 +978,24 @@ cryptodev_ioctl(struct file *filp, unsigned int cmd, unsigned long arg_) + if (unlikely(ret)) + return ret; + return copy_to_user(arg, &siop, sizeof(siop)); ++ case CIOCKEY: ++ { ++ struct cryptodev_pkc *pkc = ++ kzalloc(sizeof(struct cryptodev_pkc), GFP_KERNEL); ++ ++ if (!pkc) ++ return -ENOMEM; ++ ++ ret = kop_from_user(&pkc->kop, arg); ++ if (unlikely(ret)) { ++ kfree(pkc); ++ return ret; ++ } ++ pkc->type = SYNCHRONOUS; ++ ret = crypto_run_asym(pkc); ++ kfree(pkc); ++ } ++ return ret; + case CIOCCRYPT: + if (unlikely(ret = kcop_from_user(&kcop, fcr, arg))) { + dwarning(1, "Error copying from user"); +@@ -895,6 +1034,45 @@ cryptodev_ioctl(struct file *filp, unsigned int cmd, unsigned long arg_) + + return kcop_to_user(&kcop, fcr, arg); + #endif ++ case CIOCASYMASYNCRYPT: ++ { ++ struct cryptodev_pkc *pkc = ++ kzalloc(sizeof(struct cryptodev_pkc), GFP_KERNEL); ++ ret = kop_from_user(&pkc->kop, arg); ++ ++ if (unlikely(ret)) ++ return -EINVAL; ++ ++ /* Store associated FD priv data with asymmetric request */ ++ pkc->priv = pcr; ++ pkc->type = ASYNCHRONOUS; ++ ret = crypto_run_asym(pkc); ++ if (ret == -EINPROGRESS) ++ ret = 0; ++ } ++ return ret; ++ case CIOCASYMASYNFETCH: ++ { ++ struct cryptodev_pkc *pkc; ++ unsigned long flags; ++ ++ spin_lock_irqsave(&pcr->completion_lock, flags); ++ if (list_empty(&pcr->asym_completed_list)) { ++ spin_unlock_irqrestore(&pcr->completion_lock, flags); ++ return -ENOMEM; ++ } ++ pkc = list_first_entry(&pcr->asym_completed_list, ++ struct cryptodev_pkc, list); ++ list_del(&pkc->list); ++ spin_unlock_irqrestore(&pcr->completion_lock, flags); ++ ret = crypto_async_fetch_asym(pkc); ++ ++ /* Reflect the updated request to user-space */ ++ if (!ret) ++ kop_to_user(&pkc->kop, arg); ++ kfree(pkc); ++ } ++ return ret; + default: + return -EINVAL; + } +@@ -1083,9 +1261,11 @@ static unsigned int cryptodev_poll(struct file *file, poll_table *wait) + + poll_wait(file, &pcr->user_waiter, wait); + +- if (!list_empty_careful(&pcr->done.list)) ++ if (!list_empty_careful(&pcr->done.list) || ++ !list_empty_careful(&pcr->asym_completed_list)) + ret |= POLLIN | POLLRDNORM; +- if (!list_empty_careful(&pcr->free.list) || pcr->itemcount < MAX_COP_RINGSIZE) ++ if (!list_empty_careful(&pcr->free.list) || ++ pcr->itemcount < MAX_COP_RINGSIZE) + ret |= POLLOUT | POLLWRNORM; + + return ret; +diff --git a/main.c b/main.c +index 57e5c38..0b7951e 100644 +--- a/main.c ++++ b/main.c +@@ -181,6 +181,384 @@ __crypto_run_zc(struct csession *ses_ptr, struct kernel_crypt_op *kcop) + return ret; + } + ++int crypto_kop_dsasign(struct cryptodev_pkc *pkc) ++{ ++ struct kernel_crypt_kop *kop = &pkc->kop; ++ struct crypt_kop *cop = &kop->kop; ++ struct pkc_request *pkc_req = &pkc->req; ++ struct dsa_sign_req_s *dsa_req = &pkc_req->req_u.dsa_sign; ++ int rc, buf_size; ++ uint8_t *buf; ++ ++ if (!cop->crk_param[0].crp_nbits || !cop->crk_param[1].crp_nbits || ++ !cop->crk_param[2].crp_nbits || !cop->crk_param[3].crp_nbits || ++ !cop->crk_param[4].crp_nbits || !cop->crk_param[5].crp_nbits || ++ !cop->crk_param[6].crp_nbits || (cop->crk_iparams == 6 && ++ !cop->crk_param[7].crp_nbits)) ++ return -EINVAL; ++ ++ dsa_req->m_len = (cop->crk_param[0].crp_nbits + 7)/8; ++ dsa_req->q_len = (cop->crk_param[1].crp_nbits + 7)/8; ++ dsa_req->r_len = (cop->crk_param[2].crp_nbits + 7)/8; ++ dsa_req->g_len = (cop->crk_param[3].crp_nbits + 7)/8; ++ dsa_req->priv_key_len = (cop->crk_param[4].crp_nbits + 7)/8; ++ dsa_req->d_len = (cop->crk_param[6].crp_nbits + 7)/8; ++ buf_size = dsa_req->m_len + dsa_req->q_len + dsa_req->r_len + ++ dsa_req->g_len + dsa_req->priv_key_len + dsa_req->d_len + ++ dsa_req->d_len; ++ if (cop->crk_iparams == 6) { ++ dsa_req->ab_len = (cop->crk_param[5].crp_nbits + 7)/8; ++ buf_size += dsa_req->ab_len; ++ pkc_req->type = ECDSA_SIGN; ++ pkc_req->curve_type = cop->curve_type; ++ } else { ++ pkc_req->type = DSA_SIGN; ++ } ++ ++ buf = kzalloc(buf_size, GFP_DMA); ++ ++ dsa_req->q = buf; ++ dsa_req->r = dsa_req->q + dsa_req->q_len; ++ dsa_req->g = dsa_req->r + dsa_req->r_len; ++ dsa_req->priv_key = dsa_req->g + dsa_req->g_len; ++ dsa_req->m = dsa_req->priv_key + dsa_req->priv_key_len; ++ dsa_req->c = dsa_req->m + dsa_req->m_len; ++ dsa_req->d = dsa_req->c + dsa_req->d_len; ++ copy_from_user(dsa_req->m, cop->crk_param[0].crp_p, dsa_req->m_len); ++ copy_from_user(dsa_req->q, cop->crk_param[1].crp_p, dsa_req->q_len); ++ copy_from_user(dsa_req->r, cop->crk_param[2].crp_p, dsa_req->r_len); ++ copy_from_user(dsa_req->g, cop->crk_param[3].crp_p, dsa_req->g_len); ++ copy_from_user(dsa_req->priv_key, cop->crk_param[4].crp_p, ++ dsa_req->priv_key_len); ++ if (cop->crk_iparams == 6) { ++ dsa_req->ab = dsa_req->d + dsa_req->d_len; ++ copy_from_user(dsa_req->ab, cop->crk_param[5].crp_p, ++ dsa_req->ab_len); ++ } ++ rc = cryptodev_pkc_offload(pkc); ++ if (pkc->type == SYNCHRONOUS) { ++ if (rc) ++ goto err; ++ if (cop->crk_iparams == 6) { ++ copy_to_user(cop->crk_param[6].crp_p, dsa_req->c, ++ dsa_req->d_len); ++ copy_to_user(cop->crk_param[7].crp_p, dsa_req->d, ++ dsa_req->d_len); ++ } else { ++ copy_to_user(cop->crk_param[5].crp_p, dsa_req->c, ++ dsa_req->d_len); ++ copy_to_user(cop->crk_param[6].crp_p, dsa_req->d, ++ dsa_req->d_len); ++ } ++ } else { ++ if (rc != -EINPROGRESS && rc != 0) ++ goto err; ++ ++ pkc->cookie = buf; ++ return rc; ++ } ++err: ++ kfree(buf); ++ return rc; ++} ++ ++int crypto_kop_dsaverify(struct cryptodev_pkc *pkc) ++{ ++ struct kernel_crypt_kop *kop = &pkc->kop; ++ struct crypt_kop *cop = &kop->kop; ++ struct pkc_request *pkc_req; ++ struct dsa_verify_req_s *dsa_req; ++ int rc, buf_size; ++ uint8_t *buf; ++ ++ if (!cop->crk_param[0].crp_nbits || !cop->crk_param[1].crp_nbits || ++ !cop->crk_param[2].crp_nbits || !cop->crk_param[3].crp_nbits || ++ !cop->crk_param[4].crp_nbits || !cop->crk_param[5].crp_nbits || ++ !cop->crk_param[6].crp_nbits || (cop->crk_iparams == 8 && ++ !cop->crk_param[7].crp_nbits)) ++ return -EINVAL; ++ ++ pkc_req = &pkc->req; ++ dsa_req = &pkc_req->req_u.dsa_verify; ++ dsa_req->m_len = (cop->crk_param[0].crp_nbits + 7)/8; ++ dsa_req->q_len = (cop->crk_param[1].crp_nbits + 7)/8; ++ dsa_req->r_len = (cop->crk_param[2].crp_nbits + 7)/8; ++ dsa_req->g_len = (cop->crk_param[3].crp_nbits + 7)/8; ++ dsa_req->pub_key_len = (cop->crk_param[4].crp_nbits + 7)/8; ++ dsa_req->d_len = (cop->crk_param[6].crp_nbits + 7)/8; ++ buf_size = dsa_req->m_len + dsa_req->q_len + dsa_req->r_len + ++ dsa_req->g_len + dsa_req->pub_key_len + dsa_req->d_len + ++ dsa_req->d_len; ++ if (cop->crk_iparams == 8) { ++ dsa_req->ab_len = (cop->crk_param[5].crp_nbits + 7)/8; ++ buf_size += dsa_req->ab_len; ++ pkc_req->type = ECDSA_VERIFY; ++ pkc_req->curve_type = cop->curve_type; ++ } else { ++ pkc_req->type = DSA_VERIFY; ++ } ++ ++ buf = kzalloc(buf_size, GFP_DMA); ++ ++ dsa_req->q = buf; ++ dsa_req->r = dsa_req->q + dsa_req->q_len; ++ dsa_req->g = dsa_req->r + dsa_req->r_len; ++ dsa_req->pub_key = dsa_req->g + dsa_req->g_len; ++ dsa_req->m = dsa_req->pub_key + dsa_req->pub_key_len; ++ dsa_req->c = dsa_req->m + dsa_req->m_len; ++ dsa_req->d = dsa_req->c + dsa_req->d_len; ++ copy_from_user(dsa_req->m, cop->crk_param[0].crp_p, dsa_req->m_len); ++ copy_from_user(dsa_req->q, cop->crk_param[1].crp_p, dsa_req->q_len); ++ copy_from_user(dsa_req->r, cop->crk_param[2].crp_p, dsa_req->r_len); ++ copy_from_user(dsa_req->g, cop->crk_param[3].crp_p, dsa_req->g_len); ++ copy_from_user(dsa_req->pub_key, cop->crk_param[4].crp_p, ++ dsa_req->pub_key_len); ++ if (cop->crk_iparams == 8) { ++ dsa_req->ab = dsa_req->d + dsa_req->d_len; ++ copy_from_user(dsa_req->ab, cop->crk_param[5].crp_p, ++ dsa_req->ab_len); ++ copy_from_user(dsa_req->c, cop->crk_param[6].crp_p, ++ dsa_req->d_len); ++ copy_from_user(dsa_req->d, cop->crk_param[7].crp_p, ++ dsa_req->d_len); ++ } else { ++ copy_from_user(dsa_req->c, cop->crk_param[5].crp_p, ++ dsa_req->d_len); ++ copy_from_user(dsa_req->d, cop->crk_param[6].crp_p, ++ dsa_req->d_len); ++ } ++ rc = cryptodev_pkc_offload(pkc); ++ if (pkc->type == SYNCHRONOUS) { ++ if (rc) ++ goto err; ++ } else { ++ if (rc != -EINPROGRESS && !rc) ++ goto err; ++ pkc->cookie = buf; ++ return rc; ++ } ++err: ++ kfree(buf); ++ return rc; ++} ++ ++int crypto_kop_dh_key(struct cryptodev_pkc *pkc) ++{ ++ struct kernel_crypt_kop *kop = &pkc->kop; ++ struct crypt_kop *cop = &kop->kop; ++ struct pkc_request *pkc_req; ++ struct dh_key_req_s *dh_req; ++ int buf_size; ++ uint8_t *buf; ++ int rc = -EINVAL; ++ ++ pkc_req = &pkc->req; ++ dh_req = &pkc_req->req_u.dh_req; ++ dh_req->s_len = (cop->crk_param[0].crp_nbits + 7)/8; ++ dh_req->pub_key_len = (cop->crk_param[1].crp_nbits + 7)/8; ++ dh_req->q_len = (cop->crk_param[2].crp_nbits + 7)/8; ++ buf_size = dh_req->q_len + dh_req->pub_key_len + dh_req->s_len; ++ if (cop->crk_iparams == 4) { ++ pkc_req->type = ECDH_COMPUTE_KEY; ++ dh_req->ab_len = (cop->crk_param[3].crp_nbits + 7)/8; ++ dh_req->z_len = (cop->crk_param[4].crp_nbits + 7)/8; ++ buf_size += dh_req->ab_len; ++ } else { ++ dh_req->z_len = (cop->crk_param[3].crp_nbits + 7)/8; ++ pkc_req->type = DH_COMPUTE_KEY; ++ } ++ buf_size += dh_req->z_len; ++ buf = kzalloc(buf_size, GFP_DMA); ++ dh_req->q = buf; ++ dh_req->s = dh_req->q + dh_req->q_len; ++ dh_req->pub_key = dh_req->s + dh_req->s_len; ++ dh_req->z = dh_req->pub_key + dh_req->pub_key_len; ++ if (cop->crk_iparams == 4) { ++ dh_req->ab = dh_req->z + dh_req->z_len; ++ pkc_req->curve_type = cop->curve_type; ++ copy_from_user(dh_req->ab, cop->crk_param[3].crp_p, ++ dh_req->ab_len); ++ } ++ copy_from_user(dh_req->s, cop->crk_param[0].crp_p, dh_req->s_len); ++ copy_from_user(dh_req->pub_key, cop->crk_param[1].crp_p, ++ dh_req->pub_key_len); ++ copy_from_user(dh_req->q, cop->crk_param[2].crp_p, dh_req->q_len); ++ rc = cryptodev_pkc_offload(pkc); ++ if (pkc->type == SYNCHRONOUS) { ++ if (rc) ++ goto err; ++ if (cop->crk_iparams == 4) ++ copy_to_user(cop->crk_param[4].crp_p, dh_req->z, ++ dh_req->z_len); ++ else ++ copy_to_user(cop->crk_param[3].crp_p, dh_req->z, ++ dh_req->z_len); ++ } else { ++ if (rc != -EINPROGRESS && rc != 0) ++ goto err; ++ ++ pkc->cookie = buf; ++ return rc; ++ } ++err: ++ kfree(buf); ++ return rc; ++} ++ ++int crypto_modexp_crt(struct cryptodev_pkc *pkc) ++{ ++ struct kernel_crypt_kop *kop = &pkc->kop; ++ struct crypt_kop *cop = &kop->kop; ++ struct pkc_request *pkc_req; ++ struct rsa_priv_frm3_req_s *rsa_req; ++ int rc; ++ uint8_t *buf; ++ ++ if (!cop->crk_param[0].crp_nbits || !cop->crk_param[1].crp_nbits || ++ !cop->crk_param[2].crp_nbits || !cop->crk_param[3].crp_nbits || ++ !cop->crk_param[4].crp_nbits || !cop->crk_param[5].crp_nbits) ++ return -EINVAL; ++ ++ pkc_req = &pkc->req; ++ pkc_req->type = RSA_PRIV_FORM3; ++ rsa_req = &pkc_req->req_u.rsa_priv_f3; ++ rsa_req->p_len = (cop->crk_param[0].crp_nbits + 7)/8; ++ rsa_req->q_len = (cop->crk_param[1].crp_nbits + 7)/8; ++ rsa_req->g_len = (cop->crk_param[2].crp_nbits + 7)/8; ++ rsa_req->dp_len = (cop->crk_param[3].crp_nbits + 7)/8; ++ rsa_req->dq_len = (cop->crk_param[4].crp_nbits + 7)/8; ++ rsa_req->c_len = (cop->crk_param[5].crp_nbits + 7)/8; ++ rsa_req->f_len = (cop->crk_param[6].crp_nbits + 7)/8; ++ buf = kzalloc(rsa_req->p_len + rsa_req->q_len + rsa_req->f_len + ++ rsa_req->dp_len + rsa_req->dp_len + rsa_req->c_len + ++ rsa_req->g_len, GFP_DMA); ++ rsa_req->p = buf; ++ rsa_req->q = rsa_req->p + rsa_req->p_len; ++ rsa_req->g = rsa_req->q + rsa_req->q_len; ++ rsa_req->dp = rsa_req->g + rsa_req->g_len; ++ rsa_req->dq = rsa_req->dp + rsa_req->dp_len; ++ rsa_req->c = rsa_req->dq + rsa_req->dq_len; ++ rsa_req->f = rsa_req->c + rsa_req->c_len; ++ copy_from_user(rsa_req->p, cop->crk_param[0].crp_p, rsa_req->p_len); ++ copy_from_user(rsa_req->q, cop->crk_param[1].crp_p, rsa_req->q_len); ++ copy_from_user(rsa_req->g, cop->crk_param[2].crp_p, rsa_req->g_len); ++ copy_from_user(rsa_req->dp, cop->crk_param[3].crp_p, rsa_req->dp_len); ++ copy_from_user(rsa_req->dq, cop->crk_param[4].crp_p, rsa_req->dq_len); ++ copy_from_user(rsa_req->c, cop->crk_param[5].crp_p, rsa_req->c_len); ++ rc = cryptodev_pkc_offload(pkc); ++ ++ if (pkc->type == SYNCHRONOUS) { ++ if (rc) ++ goto err; ++ copy_to_user(cop->crk_param[6].crp_p, rsa_req->f, ++ rsa_req->f_len); ++ } else { ++ if (rc != -EINPROGRESS && rc != 0) ++ goto err; ++ ++ pkc->cookie = buf; ++ return rc; ++ } ++err: ++ kfree(buf); ++ return rc; ++} ++ ++int crypto_bn_modexp(struct cryptodev_pkc *pkc) ++{ ++ struct pkc_request *pkc_req; ++ struct rsa_pub_req_s *rsa_req; ++ int rc; ++ struct kernel_crypt_kop *kop = &pkc->kop; ++ struct crypt_kop *cop = &kop->kop; ++ uint8_t *buf; ++ ++ if (!cop->crk_param[0].crp_nbits || !cop->crk_param[1].crp_nbits || ++ !cop->crk_param[2].crp_nbits || !cop->crk_param[3].crp_nbits) ++ return -EINVAL; ++ ++ pkc_req = &pkc->req; ++ pkc_req->type = RSA_PUB; ++ rsa_req = &pkc_req->req_u.rsa_pub_req; ++ rsa_req->f_len = (cop->crk_param[0].crp_nbits + 7)/8; ++ rsa_req->e_len = (cop->crk_param[1].crp_nbits + 7)/8; ++ rsa_req->n_len = (cop->crk_param[2].crp_nbits + 7)/8; ++ rsa_req->g_len = (cop->crk_param[3].crp_nbits + 7)/8; ++ buf = kzalloc(rsa_req->f_len + rsa_req->e_len + rsa_req->n_len ++ + rsa_req->g_len, GFP_DMA); ++ if (!buf) ++ return -ENOMEM; ++ ++ rsa_req->e = buf; ++ rsa_req->f = rsa_req->e + rsa_req->e_len; ++ rsa_req->g = rsa_req->f + rsa_req->f_len; ++ rsa_req->n = rsa_req->g + rsa_req->g_len; ++ copy_from_user(rsa_req->f, cop->crk_param[0].crp_p, rsa_req->f_len); ++ copy_from_user(rsa_req->e, cop->crk_param[1].crp_p, rsa_req->e_len); ++ copy_from_user(rsa_req->n, cop->crk_param[2].crp_p, rsa_req->n_len); ++ rc = cryptodev_pkc_offload(pkc); ++ if (pkc->type == SYNCHRONOUS) { ++ if (rc) ++ goto err; ++ ++ copy_to_user(cop->crk_param[3].crp_p, rsa_req->g, ++ rsa_req->g_len); ++ } else { ++ if (rc != -EINPROGRESS && rc != 0) ++ goto err; ++ ++ /* This one will be freed later in fetch handler */ ++ pkc->cookie = buf; ++ return rc; ++ } ++err: ++ kfree(buf); ++ return rc; ++} ++ ++int crypto_run_asym(struct cryptodev_pkc *pkc) ++{ ++ int ret = -EINVAL; ++ struct kernel_crypt_kop *kop = &pkc->kop; ++ ++ switch (kop->kop.crk_op) { ++ case CRK_MOD_EXP: ++ if (kop->kop.crk_iparams != 3 && kop->kop.crk_oparams != 1) ++ goto err; ++ ++ ret = crypto_bn_modexp(pkc); ++ break; ++ case CRK_MOD_EXP_CRT: ++ if (kop->kop.crk_iparams != 6 && kop->kop.crk_oparams != 1) ++ goto err; ++ ++ ret = crypto_modexp_crt(pkc); ++ break; ++ case CRK_DSA_SIGN: ++ if ((kop->kop.crk_iparams != 5 && kop->kop.crk_iparams != 6) || ++ kop->kop.crk_oparams != 2) ++ goto err; ++ ++ ret = crypto_kop_dsasign(pkc); ++ break; ++ case CRK_DSA_VERIFY: ++ if ((kop->kop.crk_iparams != 7 && kop->kop.crk_iparams != 8) || ++ kop->kop.crk_oparams != 0) ++ goto err; ++ ++ ret = crypto_kop_dsaverify(pkc); ++ break; ++ case CRK_DH_COMPUTE_KEY: ++ if ((kop->kop.crk_iparams != 3 && kop->kop.crk_iparams != 4) || ++ kop->kop.crk_oparams != 1) ++ goto err; ++ ret = crypto_kop_dh_key(pkc); ++ break; ++ } ++err: ++ return ret; ++} ++ + int crypto_run(struct fcrypt *fcr, struct kernel_crypt_op *kcop) + { + struct csession *ses_ptr; +-- +1.8.3.1 + diff --git a/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0004-Compat-versions-of-PKC-IOCTLs.patch b/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0004-Compat-versions-of-PKC-IOCTLs.patch new file mode 100644 index 00000000..2eedcc72 --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0004-Compat-versions-of-PKC-IOCTLs.patch @@ -0,0 +1,200 @@ +From 5435dfd329cd90837ce36c6dadc26166c7906cab Mon Sep 17 00:00:00 2001 +From: Yashpal Dutta +Date: Fri, 7 Mar 2014 06:52:13 +0545 +Subject: [PATCH 4/9] Compat versions of PKC IOCTLs + +Upstream-status: Pending + +Signed-off-by: Yashpal Dutta +--- + cryptodev_int.h | 20 ++++++++++ + ioctl.c | 120 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 140 insertions(+) + +diff --git a/cryptodev_int.h b/cryptodev_int.h +index fdbcc61..cf54dac 100644 +--- a/cryptodev_int.h ++++ b/cryptodev_int.h +@@ -75,6 +75,24 @@ struct compat_crypt_op { + compat_uptr_t iv;/* initialization vector for encryption operations */ + }; + ++/* input of CIOCKEY */ ++struct compat_crparam { ++ compat_uptr_t crp_p; ++ uint32_t crp_nbits; ++}; ++ ++struct compat_crypt_kop { ++ uint32_t crk_op; /* cryptodev_crk_ot_t */ ++ uint32_t crk_status; ++ uint16_t crk_iparams; ++ uint16_t crk_oparams; ++ uint32_t crk_pad1; ++ struct compat_crparam crk_param[CRK_MAXPARAM]; ++ enum curve_t curve_type; /* 0 == Discrete Log, 1 = EC_PRIME, ++ 2 = EC_BINARY */ ++ compat_uptr_t cookie; ++}; ++ + /* input of CIOCAUTHCRYPT */ + struct compat_crypt_auth_op { + uint32_t ses; /* session identifier */ +@@ -111,6 +129,8 @@ struct compat_crypt_auth_op { + #define COMPAT_CIOCASYNCCRYPT _IOW('c', 107, struct compat_crypt_op) + #define COMPAT_CIOCASYNCFETCH _IOR('c', 108, struct compat_crypt_op) + #define COMPAT_CIOCAUTHCRYPT _IOWR('c', 109, struct compat_crypt_auth_op) ++#define COMPAT_CIOCASYMASYNCRYPT _IOW('c', 110, struct compat_crypt_kop) ++#define COMPAT_CIOCASYMASYNFETCH _IOR('c', 111, struct compat_crypt_kop) + + #endif /* CONFIG_COMPAT */ + +diff --git a/ioctl.c b/ioctl.c +index 782d7fe..3baf3e6 100644 +--- a/ioctl.c ++++ b/ioctl.c +@@ -1081,6 +1081,68 @@ cryptodev_ioctl(struct file *filp, unsigned int cmd, unsigned long arg_) + /* compatibility code for 32bit userlands */ + #ifdef CONFIG_COMPAT + ++static inline void compat_to_crypt_kop(struct compat_crypt_kop *compat, ++ struct crypt_kop *kop) ++{ ++ int i; ++ kop->crk_op = compat->crk_op; ++ kop->crk_status = compat->crk_status; ++ kop->crk_iparams = compat->crk_iparams; ++ kop->crk_oparams = compat->crk_oparams; ++ ++ for (i = 0; i < CRK_MAXPARAM; i++) { ++ kop->crk_param[i].crp_p = ++ compat_ptr(compat->crk_param[i].crp_p); ++ kop->crk_param[i].crp_nbits = compat->crk_param[i].crp_nbits; ++ } ++ ++ kop->curve_type = compat->curve_type; ++ kop->cookie = compat->cookie; ++} ++ ++static int compat_kop_from_user(struct kernel_crypt_kop *kop, ++ void __user *arg) ++{ ++ struct compat_crypt_kop compat_kop; ++ ++ if (unlikely(copy_from_user(&compat_kop, arg, sizeof(compat_kop)))) ++ return -EFAULT; ++ ++ compat_to_crypt_kop(&compat_kop, &kop->kop); ++ return fill_kop_from_cop(kop); ++} ++ ++static inline void crypt_kop_to_compat(struct crypt_kop *kop, ++ struct compat_crypt_kop *compat) ++{ ++ int i; ++ ++ compat->crk_op = kop->crk_op; ++ compat->crk_status = kop->crk_status; ++ compat->crk_iparams = kop->crk_iparams; ++ compat->crk_oparams = kop->crk_oparams; ++ ++ for (i = 0; i < CRK_MAXPARAM; i++) { ++ compat->crk_param[i].crp_p = ++ ptr_to_compat(kop->crk_param[i].crp_p); ++ compat->crk_param[i].crp_nbits = kop->crk_param[i].crp_nbits; ++ } ++ compat->cookie = kop->cookie; ++ compat->curve_type = kop->curve_type; ++} ++ ++static int compat_kop_to_user(struct kernel_crypt_kop *kop, void __user *arg) ++{ ++ struct compat_crypt_kop compat_kop; ++ ++ crypt_kop_to_compat(&kop->kop, &compat_kop); ++ if (unlikely(copy_to_user(arg, &compat_kop, sizeof(compat_kop)))) { ++ dprintk(1, KERN_ERR, "Cannot copy to userspace\n"); ++ return -EFAULT; ++ } ++ return 0; ++} ++ + static inline void + compat_to_session_op(struct compat_session_op *compat, struct session_op *sop) + { +@@ -1208,7 +1270,26 @@ cryptodev_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg_) + return -EFAULT; + } + return ret; ++ case COMPAT_CIOCKEY: ++ { ++ struct cryptodev_pkc *pkc = ++ kzalloc(sizeof(struct cryptodev_pkc), GFP_KERNEL); ++ ++ if (!pkc) ++ return -ENOMEM; ++ ++ ret = compat_kop_from_user(&pkc->kop, arg); ++ ++ if (unlikely(ret)) { ++ kfree(pkc); ++ return ret; ++ } + ++ pkc->type = SYNCHRONOUS; ++ ret = crypto_run_asym(pkc); ++ kfree(pkc); ++ } ++ return ret; + case COMPAT_CIOCCRYPT: + ret = compat_kcop_from_user(&kcop, fcr, arg); + if (unlikely(ret)) +@@ -1247,6 +1328,45 @@ cryptodev_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg_) + + return compat_kcop_to_user(&kcop, fcr, arg); + #endif ++ case COMPAT_CIOCASYMASYNCRYPT: ++ { ++ struct cryptodev_pkc *pkc = ++ kzalloc(sizeof(struct cryptodev_pkc), GFP_KERNEL); ++ ++ ret = compat_kop_from_user(&pkc->kop, arg); ++ if (unlikely(ret)) ++ return -EINVAL; ++ ++ /* Store associated FD priv data with asymmetric request */ ++ pkc->priv = pcr; ++ pkc->type = ASYNCHRONOUS; ++ ret = crypto_run_asym(pkc); ++ if (ret == -EINPROGRESS) ++ ret = 0; ++ } ++ return ret; ++ case COMPAT_CIOCASYMASYNFETCH: ++ { ++ struct cryptodev_pkc *pkc; ++ unsigned long flags; ++ ++ spin_lock_irqsave(&pcr->completion_lock, flags); ++ if (list_empty(&pcr->asym_completed_list)) { ++ spin_unlock_irqrestore(&pcr->completion_lock, flags); ++ return -ENOMEM; ++ } ++ pkc = list_first_entry(&pcr->asym_completed_list, ++ struct cryptodev_pkc, list); ++ list_del(&pkc->list); ++ spin_unlock_irqrestore(&pcr->completion_lock, flags); ++ ret = crypto_async_fetch_asym(pkc); ++ ++ /* Reflect the updated request to user-space */ ++ if (!ret) ++ compat_kop_to_user(&pkc->kop, arg); ++ kfree(pkc); ++ } ++ return ret; + default: + return -EINVAL; + } +-- +1.8.3.1 + diff --git a/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0004-fix-scatterlist-size-for-in-place-operations.patch b/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0004-fix-scatterlist-size-for-in-place-operations.patch deleted file mode 100644 index c8086062..00000000 --- a/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0004-fix-scatterlist-size-for-in-place-operations.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 5a6cd042d3cee9e3bbf3b0125a89e64d75dffdc7 Mon Sep 17 00:00:00 2001 -From: Cristian Stoica -Date: Thu, 31 Oct 2013 13:13:51 +0200 -Subject: [[Patch][fsl 04/16] fix scatterlist size for in-place operations - -Upstream-status: Pending - -For in-place operations, the scatterlist must be big enough to allow for -either the source or destination data: - - for block ciphers, the destination will be bigger than the source if - the source is not multiple of blocksize - - for aead ciphers, the additional data and padding guarantees the - destination to be bigger than the source. - -Signed-off-by: Cristian Stoica -Tested-by: Horia Ioan Geanta Neag ---- - zc.c | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git a/zc.c b/zc.c -index 809a36d..8855083 100644 ---- a/zc.c -+++ b/zc.c -@@ -162,8 +162,9 @@ int get_userbuf(struct csession *ses, - } - - if (src == dst) { /* inplace operation */ -- rc = __get_userbuf(src, src_len, 1, ses->used_pages, -- ses->pages, ses->sg, task, mm); -+ rc = __get_userbuf(src, max(src_len, dst_len), 1, ses->used_pages, -+ ses->pages, ses->sg, task, mm); -+ - if (unlikely(rc)) { - derr(1, "failed to get user pages for data IO"); - return rc; --- -1.7.9.7 - diff --git a/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0005-Asynchronous-interface-changes-in-cryptodev.patch b/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0005-Asynchronous-interface-changes-in-cryptodev.patch new file mode 100644 index 00000000..2f88eda3 --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0005-Asynchronous-interface-changes-in-cryptodev.patch @@ -0,0 +1,213 @@ +From ddc4179a454cea79c8385fd6756d20cbf3c6dcb5 Mon Sep 17 00:00:00 2001 +From: Yashpal Dutta +Date: Fri, 7 Mar 2014 07:24:00 +0545 +Subject: [PATCH 5/9] Asynchronous interface changes in cryptodev + +Upstream-status: Pending + +Signed-off-by: Yashpal Dutta +--- + cryptlib.h | 7 ++++- + crypto/cryptodev.h | 10 ++++++- + cryptodev_int.h | 10 ++++++- + ioctl.c | 76 +++++++++++++++++++++++++++++++++++++----------------- + 4 files changed, 76 insertions(+), 27 deletions(-) + +diff --git a/cryptlib.h b/cryptlib.h +index 56d325a..7ffa54c 100644 +--- a/cryptlib.h ++++ b/cryptlib.h +@@ -113,7 +113,12 @@ struct cryptodev_pkc { + struct pkc_request req; /* PKC request structure allocated + from CryptoAPI */ + enum offload_type type; /* Synchronous Vs Asynchronous request */ +- void *cookie; /*Additional opaque cookie to be used in future */ ++ /* ++ * cookie used for transfering tranparent information from async ++ * submission to async fetch. Currently some dynamic allocated ++ * buffers are maintained which will be freed later during fetch ++ */ ++ void *cookie; + struct crypt_priv *priv; + }; + +diff --git a/crypto/cryptodev.h b/crypto/cryptodev.h +index 96675fe..4436fbf 100644 +--- a/crypto/cryptodev.h ++++ b/crypto/cryptodev.h +@@ -254,6 +254,14 @@ struct crypt_kop { + void *cookie; + }; + ++#define MAX_COOKIES 4 ++ ++struct pkc_cookie_list_s { ++ int cookie_available; ++ void *cookie[MAX_COOKIES]; ++ int status[MAX_COOKIES]; ++}; ++ + enum cryptodev_crk_op_t { + CRK_MOD_EXP = 0, + CRK_MOD_EXP_CRT = 1, +@@ -298,5 +306,5 @@ enum cryptodev_crk_op_t { + #define CIOCASYNCFETCH _IOR('c', 111, struct crypt_op) + /* additional ioctls for asynchronous operation for asymmetric ciphers*/ + #define CIOCASYMASYNCRYPT _IOW('c', 112, struct crypt_kop) +-#define CIOCASYMASYNFETCH _IOR('c', 113, struct crypt_kop) ++#define CIOCASYMFETCHCOOKIE _IOR('c', 113, struct pkc_cookie_list_s) + #endif /* L_CRYPTODEV_H */ +diff --git a/cryptodev_int.h b/cryptodev_int.h +index cf54dac..5347cae 100644 +--- a/cryptodev_int.h ++++ b/cryptodev_int.h +@@ -93,6 +93,12 @@ struct compat_crypt_kop { + compat_uptr_t cookie; + }; + ++struct compat_pkc_cookie_list_s { ++ int cookie_available; ++ compat_uptr_t cookie[MAX_COOKIES]; ++ int status[MAX_COOKIES]; ++}; ++ + /* input of CIOCAUTHCRYPT */ + struct compat_crypt_auth_op { + uint32_t ses; /* session identifier */ +@@ -126,11 +132,13 @@ struct compat_crypt_auth_op { + /* compat ioctls, defined for the above structs */ + #define COMPAT_CIOCGSESSION _IOWR('c', 102, struct compat_session_op) + #define COMPAT_CIOCCRYPT _IOWR('c', 104, struct compat_crypt_op) ++#define COMPAT_CIOCKEY _IOW('c', 105, struct compat_crypt_kop) + #define COMPAT_CIOCASYNCCRYPT _IOW('c', 107, struct compat_crypt_op) + #define COMPAT_CIOCASYNCFETCH _IOR('c', 108, struct compat_crypt_op) + #define COMPAT_CIOCAUTHCRYPT _IOWR('c', 109, struct compat_crypt_auth_op) + #define COMPAT_CIOCASYMASYNCRYPT _IOW('c', 110, struct compat_crypt_kop) +-#define COMPAT_CIOCASYMASYNFETCH _IOR('c', 111, struct compat_crypt_kop) ++#define COMPAT_CIOCASYMFETCHCOOKIE _IOR('c', 111, \ ++ struct compat_pkc_cookie_list_s) + + #endif /* CONFIG_COMPAT */ + +diff --git a/ioctl.c b/ioctl.c +index 3baf3e6..2eb7f03 100644 +--- a/ioctl.c ++++ b/ioctl.c +@@ -105,8 +105,6 @@ void cryptodev_complete_asym(struct crypto_async_request *req, int err) + crypto_free_pkc(pkc->s); + res->err = err; + if (pkc->type == SYNCHRONOUS) { +- if (err == -EINPROGRESS) +- return; + complete(&res->completion); + } else { + struct crypt_priv *pcr = pkc->priv; +@@ -1051,26 +1049,41 @@ cryptodev_ioctl(struct file *filp, unsigned int cmd, unsigned long arg_) + ret = 0; + } + return ret; +- case CIOCASYMASYNFETCH: ++ case CIOCASYMFETCHCOOKIE: + { + struct cryptodev_pkc *pkc; + unsigned long flags; ++ int i; ++ struct pkc_cookie_list_s cookie_list; + + spin_lock_irqsave(&pcr->completion_lock, flags); +- if (list_empty(&pcr->asym_completed_list)) { +- spin_unlock_irqrestore(&pcr->completion_lock, flags); +- return -ENOMEM; ++ cookie_list.cookie_available = 0; ++ for (i = 0; i < MAX_COOKIES; i++) { ++ if (!list_empty(&pcr->asym_completed_list)) { ++ /* Run a loop in the list for upto elements ++ and copy their response back */ ++ pkc = ++ list_first_entry(&pcr->asym_completed_list, ++ struct cryptodev_pkc, list); ++ list_del(&pkc->list); ++ ret = crypto_async_fetch_asym(pkc); ++ if (!ret) { ++ cookie_list.cookie_available++; ++ cookie_list.cookie[i] = ++ pkc->kop.kop.cookie; ++ cookie_list.status[i] = pkc->result.err; ++ } ++ kfree(pkc); ++ } else { ++ break; ++ } + } +- pkc = list_first_entry(&pcr->asym_completed_list, +- struct cryptodev_pkc, list); +- list_del(&pkc->list); + spin_unlock_irqrestore(&pcr->completion_lock, flags); +- ret = crypto_async_fetch_asym(pkc); + + /* Reflect the updated request to user-space */ +- if (!ret) +- kop_to_user(&pkc->kop, arg); +- kfree(pkc); ++ if (cookie_list.cookie_available) ++ copy_to_user(arg, &cookie_list, ++ sizeof(struct pkc_cookie_list_s)); + } + return ret; + default: +@@ -1345,26 +1358,41 @@ cryptodev_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg_) + ret = 0; + } + return ret; +- case COMPAT_CIOCASYMASYNFETCH: ++ case COMPAT_CIOCASYMFETCHCOOKIE: + { + struct cryptodev_pkc *pkc; + unsigned long flags; ++ int i = 0; ++ struct compat_pkc_cookie_list_s cookie_list; + + spin_lock_irqsave(&pcr->completion_lock, flags); +- if (list_empty(&pcr->asym_completed_list)) { +- spin_unlock_irqrestore(&pcr->completion_lock, flags); +- return -ENOMEM; ++ cookie_list.cookie_available = 0; ++ ++ for (i = 0; i < MAX_COOKIES; i++) { ++ if (!list_empty(&pcr->asym_completed_list)) { ++ /* Run a loop in the list for upto elements ++ and copy their response back */ ++ pkc = ++ list_first_entry(&pcr->asym_completed_list, ++ struct cryptodev_pkc, list); ++ list_del(&pkc->list); ++ ret = crypto_async_fetch_asym(pkc); ++ if (!ret) { ++ cookie_list.cookie_available++; ++ cookie_list.cookie[i] = ++ pkc->kop.kop.cookie; ++ } ++ kfree(pkc); ++ } else { ++ break; ++ } + } +- pkc = list_first_entry(&pcr->asym_completed_list, +- struct cryptodev_pkc, list); +- list_del(&pkc->list); + spin_unlock_irqrestore(&pcr->completion_lock, flags); +- ret = crypto_async_fetch_asym(pkc); + + /* Reflect the updated request to user-space */ +- if (!ret) +- compat_kop_to_user(&pkc->kop, arg); +- kfree(pkc); ++ if (cookie_list.cookie_available) ++ copy_to_user(arg, &cookie_list, ++ sizeof(struct compat_pkc_cookie_list_s)); + } + return ret; + default: +-- +1.8.3.1 + diff --git a/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0005-add-dst_len-parameter-to-be-provided-by-the-user.patch b/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0005-add-dst_len-parameter-to-be-provided-by-the-user.patch deleted file mode 100644 index 480d2a93..00000000 --- a/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0005-add-dst_len-parameter-to-be-provided-by-the-user.patch +++ /dev/null @@ -1,70 +0,0 @@ -From e673e6ec09770b624d524bcd82f911e4fe2e2075 Mon Sep 17 00:00:00 2001 -From: Cristian Stoica -Date: Thu, 31 Oct 2013 13:27:28 +0200 -Subject: [[Patch][fsl 05/16] add dst_len parameter to be provided by the user - -Upstream-status: Pending - -This allows the user to set the result length and relieves cryptodev -from making assumptions about it. - -Signed-off-by: Cristian Stoica -Tested-by: Horia Ioan Geanta Neag ---- - authenc.c | 13 +++---------- - crypto/cryptodev.h | 1 + - 2 files changed, 4 insertions(+), 10 deletions(-) - -diff --git a/authenc.c b/authenc.c -index a183820..5235973 100644 ---- a/authenc.c -+++ b/authenc.c -@@ -199,7 +199,7 @@ static int fill_kcaop_from_caop(struct kernel_crypt_auth_op *kcaop, struct fcryp - kcaop->ivlen = caop->iv ? ses_ptr->cdata.ivsize : 0; - - if (caop->flags & COP_FLAG_AEAD_TLS_TYPE) -- kcaop->dst_len = caop->len + ses_ptr->cdata.blocksize /* pad */ + caop->tag_len; -+ kcaop->dst_len = caop->dst_len; - else - kcaop->dst_len = caop->len; - -@@ -645,8 +645,6 @@ __crypto_auth_run_zc(struct csession *ses_ptr, struct kernel_crypt_auth_op *kcao - ret = tls_auth_n_crypt(ses_ptr, kcaop, auth_sg, caop->auth_len, - dst_sg, caop->len); - } else { -- int dst_len; -- - if (unlikely(ses_ptr->cdata.init == 0 || - (ses_ptr->cdata.stream == 0 && - ses_ptr->cdata.aead == 0))) { -@@ -655,13 +653,8 @@ __crypto_auth_run_zc(struct csession *ses_ptr, struct kernel_crypt_auth_op *kcao - goto free_auth_buf; - } - -- if (caop->op == COP_ENCRYPT) -- dst_len = caop->len + cryptodev_cipher_get_tag_size(&ses_ptr->cdata); -- else -- dst_len = caop->len; -- -- ret = get_userbuf(ses_ptr, caop->src, caop->len, caop->dst, dst_len, -- kcaop->task, kcaop->mm, &src_sg, &dst_sg); -+ ret = get_userbuf(ses_ptr, caop->src, caop->len, caop->dst, -+ caop->dst_len, kcaop->task, kcaop->mm, &src_sg, &dst_sg); - if (unlikely(ret)) { - derr(1, "get_userbuf(): Error getting user pages."); - goto free_auth_buf; -diff --git a/crypto/cryptodev.h b/crypto/cryptodev.h -index c0e8cd4..3ea3d35 100644 ---- a/crypto/cryptodev.h -+++ b/crypto/cryptodev.h -@@ -137,6 +137,7 @@ struct crypt_auth_op { - __u16 op; /* COP_ENCRYPT or COP_DECRYPT */ - __u16 flags; /* see COP_FLAG_AEAD_* */ - __u32 len; /* length of source data */ -+ __u32 dst_len; /* length of result data */ - __u32 auth_len; /* length of auth data */ - __u8 __user *auth_src; /* authenticated-only data */ - --- -1.7.9.7 - diff --git a/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0006-ECC_KEYGEN-and-DLC_KEYGEN-supported-in-cryptodev-mod.patch b/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0006-ECC_KEYGEN-and-DLC_KEYGEN-supported-in-cryptodev-mod.patch new file mode 100644 index 00000000..e70a057b --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0006-ECC_KEYGEN-and-DLC_KEYGEN-supported-in-cryptodev-mod.patch @@ -0,0 +1,212 @@ +From 30fc86a09109f169815befc2cd8bbfcae79fe7e0 Mon Sep 17 00:00:00 2001 +From: Yashpal Dutta +Date: Fri, 7 Mar 2014 07:53:53 +0545 +Subject: [PATCH 6/9] ECC_KEYGEN and DLC_KEYGEN supported in cryptodev module + +Upstream-status: Pending + +Signed-off-by: Yashpal Dutta +--- + cryptlib.c | 2 ++ + crypto/cryptodev.h | 5 +++- + ioctl.c | 29 +++++++++++++++++-- + main.c | 85 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ + 4 files changed, 118 insertions(+), 3 deletions(-) + +diff --git a/cryptlib.c b/cryptlib.c +index 6900028..47cd568 100644 +--- a/cryptlib.c ++++ b/cryptlib.c +@@ -452,6 +452,8 @@ int cryptodev_pkc_offload(struct cryptodev_pkc *pkc) + case DSA_VERIFY: + case ECDSA_SIGN: + case ECDSA_VERIFY: ++ case DLC_KEYGEN: ++ case ECC_KEYGEN: + pkc->s = crypto_alloc_pkc("pkc(dsa)", + CRYPTO_ALG_TYPE_PKC_DSA, 0); + break; +diff --git a/crypto/cryptodev.h b/crypto/cryptodev.h +index 4436fbf..275a55c 100644 +--- a/crypto/cryptodev.h ++++ b/crypto/cryptodev.h +@@ -268,6 +268,8 @@ enum cryptodev_crk_op_t { + CRK_DSA_SIGN = 2, + CRK_DSA_VERIFY = 3, + CRK_DH_COMPUTE_KEY = 4, ++ CRK_DSA_GENERATE_KEY = 5, ++ CRK_DH_GENERATE_KEY = 6, + CRK_ALGORITHM_ALL + }; + +@@ -280,7 +282,8 @@ enum cryptodev_crk_op_t { + #define CRF_DSA_SIGN (1 << CRK_DSA_SIGN) + #define CRF_DSA_VERIFY (1 << CRK_DSA_VERIFY) + #define CRF_DH_COMPUTE_KEY (1 << CRK_DH_COMPUTE_KEY) +- ++#define CRF_DSA_GENERATE_KEY (1 << CRK_DSA_GENERATE_KEY) ++#define CRF_DH_GENERATE_KEY (1 << CRK_DH_GENERATE_KEY) + + /* ioctl's. Compatible with old linux cryptodev.h + */ +diff --git a/ioctl.c b/ioctl.c +index 2eb7f03..c813c8c 100644 +--- a/ioctl.c ++++ b/ioctl.c +@@ -726,6 +726,23 @@ static int crypto_async_fetch_asym(struct cryptodev_pkc *pkc) + dh_req->z, dh_req->z_len); + } + break; ++ case CRK_DSA_GENERATE_KEY: ++ case CRK_DH_GENERATE_KEY: ++ { ++ struct keygen_req_s *key_req = &pkc_req->req_u.keygen; ++ ++ if (pkc_req->type == ECC_KEYGEN) { ++ copy_to_user(ckop->crk_param[4].crp_p, key_req->pub_key, ++ key_req->pub_key_len); ++ copy_to_user(ckop->crk_param[5].crp_p, ++ key_req->priv_key, key_req->priv_key_len); ++ } else { ++ copy_to_user(ckop->crk_param[3].crp_p, ++ key_req->pub_key, key_req->pub_key_len); ++ copy_to_user(ckop->crk_param[4].crp_p, ++ key_req->priv_key, key_req->priv_key_len); ++ } ++ } + default: + ret = -EINVAL; + } +@@ -939,8 +956,9 @@ cryptodev_ioctl(struct file *filp, unsigned int cmd, unsigned long arg_) + + switch (cmd) { + case CIOCASYMFEAT: +- return put_user(CRF_MOD_EXP_CRT | CRF_MOD_EXP | +- CRF_DSA_SIGN | CRF_DSA_VERIFY | CRF_DH_COMPUTE_KEY, p); ++ return put_user(CRF_MOD_EXP_CRT | CRF_MOD_EXP | CRF_DSA_SIGN | ++ CRF_DSA_VERIFY | CRF_DH_COMPUTE_KEY | ++ CRF_DSA_GENERATE_KEY, p); + case CRIOGET: + fd = clonefd(filp); + ret = put_user(fd, p); +@@ -1084,7 +1102,14 @@ cryptodev_ioctl(struct file *filp, unsigned int cmd, unsigned long arg_) + if (cookie_list.cookie_available) + copy_to_user(arg, &cookie_list, + sizeof(struct pkc_cookie_list_s)); ++ else { ++ struct pkc_cookie_list_s *user_ck_list = (void *)arg; ++ ++ put_user(0, &(user_ck_list->cookie_available)); ++ } ++ ret = cookie_list.cookie_available; + } ++ + return ret; + default: + return -EINVAL; +diff --git a/main.c b/main.c +index 0b7951e..c901bc7 100644 +--- a/main.c ++++ b/main.c +@@ -342,6 +342,85 @@ err: + return rc; + } + ++int crypto_kop_keygen(struct cryptodev_pkc *pkc) ++{ ++ struct kernel_crypt_kop *kop = &pkc->kop; ++ struct crypt_kop *cop = &kop->kop; ++ struct pkc_request *pkc_req; ++ struct keygen_req_s *key_req; ++ int rc, buf_size; ++ uint8_t *buf; ++ ++ if (!cop->crk_param[0].crp_nbits || !cop->crk_param[1].crp_nbits || ++ !cop->crk_param[2].crp_nbits || !cop->crk_param[3].crp_nbits || ++ !cop->crk_param[4].crp_nbits) ++ return -EINVAL; ++ ++ pkc_req = &pkc->req; ++ key_req = &pkc_req->req_u.keygen; ++ key_req->q_len = (cop->crk_param[0].crp_nbits + 7)/8; ++ key_req->r_len = (cop->crk_param[1].crp_nbits + 7)/8; ++ key_req->g_len = (cop->crk_param[2].crp_nbits + 7)/8; ++ if (cop->crk_iparams == 3) { ++ key_req->pub_key_len = (cop->crk_param[3].crp_nbits + 7)/8; ++ key_req->priv_key_len = (cop->crk_param[4].crp_nbits + 7)/8; ++ buf_size = key_req->q_len + key_req->r_len + key_req->g_len + ++ key_req->pub_key_len + key_req->priv_key_len; ++ pkc_req->type = DLC_KEYGEN; ++ } else { ++ key_req->ab_len = (cop->crk_param[3].crp_nbits + 7)/8; ++ key_req->pub_key_len = (cop->crk_param[4].crp_nbits + 7)/8; ++ key_req->priv_key_len = (cop->crk_param[5].crp_nbits + 7)/8; ++ buf_size = key_req->q_len + key_req->r_len + key_req->g_len + ++ key_req->pub_key_len + key_req->priv_key_len + ++ key_req->ab_len; ++ pkc_req->type = ECC_KEYGEN; ++ pkc_req->curve_type = cop->curve_type; ++ } ++ ++ buf = kzalloc(buf_size, GFP_DMA); ++ if (!buf) ++ return -ENOMEM; ++ ++ key_req->q = buf; ++ key_req->r = key_req->q + key_req->q_len; ++ key_req->g = key_req->r + key_req->r_len; ++ key_req->pub_key = key_req->g + key_req->g_len; ++ key_req->priv_key = key_req->pub_key + key_req->pub_key_len; ++ copy_from_user(key_req->q, cop->crk_param[0].crp_p, key_req->q_len); ++ copy_from_user(key_req->r, cop->crk_param[1].crp_p, key_req->r_len); ++ copy_from_user(key_req->g, cop->crk_param[2].crp_p, key_req->g_len); ++ if (cop->crk_iparams == 3) { ++ copy_from_user(key_req->pub_key, cop->crk_param[3].crp_p, ++ key_req->pub_key_len); ++ copy_from_user(key_req->priv_key, cop->crk_param[4].crp_p, ++ key_req->priv_key_len); ++ } else { ++ key_req->ab = key_req->priv_key + key_req->priv_key_len; ++ copy_from_user(key_req->ab, cop->crk_param[3].crp_p, ++ key_req->ab_len); ++ copy_from_user(key_req->pub_key, cop->crk_param[4].crp_p, ++ key_req->pub_key_len); ++ copy_from_user(key_req->priv_key, cop->crk_param[5].crp_p, ++ key_req->priv_key_len); ++ } ++ ++ rc = cryptodev_pkc_offload(pkc); ++ if (pkc->type == SYNCHRONOUS) { ++ if (rc) ++ goto err; ++ } else { ++ if (rc != -EINPROGRESS && !rc) ++ goto err; ++ ++ pkc->cookie = buf; ++ return rc; ++ } ++err: ++ kfree(buf); ++ return rc; ++} ++ + int crypto_kop_dh_key(struct cryptodev_pkc *pkc) + { + struct kernel_crypt_kop *kop = &pkc->kop; +@@ -554,6 +633,12 @@ int crypto_run_asym(struct cryptodev_pkc *pkc) + goto err; + ret = crypto_kop_dh_key(pkc); + break; ++ case CRK_DH_GENERATE_KEY: ++ case CRK_DSA_GENERATE_KEY: ++ if ((kop->kop.crk_iparams != 3 && kop->kop.crk_iparams != 4)) ++ goto err; ++ ret = crypto_kop_keygen(pkc); ++ break; + } + err: + return ret; +-- +1.8.3.1 + diff --git a/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0006-fix-build-error-on-some-targets.patch b/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0006-fix-build-error-on-some-targets.patch deleted file mode 100644 index 510dee09..00000000 --- a/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0006-fix-build-error-on-some-targets.patch +++ /dev/null @@ -1,64 +0,0 @@ -From 69e00f8c1633dfe6da20ccd0cf363a481c99fc97 Mon Sep 17 00:00:00 2001 -From: Cristian Stoica -Date: Wed, 20 Nov 2013 11:29:50 +0200 -Subject: [[Patch][fsl 06/16] fix build error on some targets - -Upstream-status: Pending - -This updates incomplete patch f681e2e5fd1088bfe0aafd1ae2560c1dc9d04778 -and allows building main.o - -Signed-off-by: Cristian Stoica -Tested-by: Horia Ioan Geanta Neag ---- - cryptlib.c | 4 ++-- - cryptlib.h | 4 ++-- - 2 files changed, 4 insertions(+), 4 deletions(-) - -diff --git a/cryptlib.c b/cryptlib.c -index 2986d09..3576f39 100644 ---- a/cryptlib.c -+++ b/cryptlib.c -@@ -113,7 +113,7 @@ error: - - - int cryptodev_cipher_init(struct cipher_data *out, const char *alg_name, -- uint8_t *keyp, size_t keylen, int stream, int aead) -+ uint8_t *keyp, unsigned int keylen, int stream, int aead) - { - int ret; - -@@ -313,7 +313,7 @@ ssize_t cryptodev_cipher_decrypt(struct cipher_data *cdata, - /* Hash functions */ - - int cryptodev_hash_init(struct hash_data *hdata, const char *alg_name, -- int hmac_mode, void *mackey, size_t mackeylen) -+ int hmac_mode, void *mackey, unsigned int mackeylen) - { - int ret; - -diff --git a/cryptlib.h b/cryptlib.h -index a0a8a63..4cb66ad 100644 ---- a/cryptlib.h -+++ b/cryptlib.h -@@ -23,7 +23,7 @@ struct cipher_data { - }; - - int cryptodev_cipher_init(struct cipher_data *out, const char *alg_name, -- uint8_t *key, size_t keylen, int stream, int aead); -+ uint8_t *key, unsigned int keylen, int stream, int aead); - void cryptodev_cipher_deinit(struct cipher_data *cdata); - int cryptodev_get_cipher_key(uint8_t *key, struct session_op *sop, int aead); - int cryptodev_get_cipher_keylen(unsigned int *keylen, struct session_op *sop, -@@ -87,7 +87,7 @@ ssize_t cryptodev_hash_update(struct hash_data *hdata, - int cryptodev_hash_reset(struct hash_data *hdata); - void cryptodev_hash_deinit(struct hash_data *hdata); - int cryptodev_hash_init(struct hash_data *hdata, const char *alg_name, -- int hmac_mode, void *mackey, size_t mackeylen); -+ int hmac_mode, void *mackey, unsigned int mackeylen); - - - #endif --- -1.7.9.7 - diff --git a/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0007-RCU-stall-fixed-in-PKC-asynchronous-interface.patch b/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0007-RCU-stall-fixed-in-PKC-asynchronous-interface.patch new file mode 100644 index 00000000..93a2248c --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0007-RCU-stall-fixed-in-PKC-asynchronous-interface.patch @@ -0,0 +1,238 @@ +From d60b9dbf53d63092fd292c00bb03c250c26703cf Mon Sep 17 00:00:00 2001 +From: Yashpal Dutta +Date: Fri, 7 Mar 2014 08:49:15 +0545 +Subject: [PATCH 7/9] RCU stall fixed in PKC asynchronous interface + +Upstream-status: Pending + +Signed-off-by: Yashpal Dutta +--- + ioctl.c | 23 +++++++++++------------ + main.c | 43 +++++++++++++++++++++++++++---------------- + 2 files changed, 38 insertions(+), 28 deletions(-) + +diff --git a/ioctl.c b/ioctl.c +index c813c8c..7e4c671 100644 +--- a/ioctl.c ++++ b/ioctl.c +@@ -108,10 +108,9 @@ void cryptodev_complete_asym(struct crypto_async_request *req, int err) + complete(&res->completion); + } else { + struct crypt_priv *pcr = pkc->priv; +- unsigned long flags; +- spin_lock_irqsave(&pcr->completion_lock, flags); ++ spin_lock_bh(&pcr->completion_lock); + list_add_tail(&pkc->list, &pcr->asym_completed_list); +- spin_unlock_irqrestore(&pcr->completion_lock, flags); ++ spin_unlock_bh(&pcr->completion_lock); + /* wake for POLLIN */ + wake_up_interruptible(&pcr->user_waiter); + } +@@ -958,7 +957,7 @@ cryptodev_ioctl(struct file *filp, unsigned int cmd, unsigned long arg_) + case CIOCASYMFEAT: + return put_user(CRF_MOD_EXP_CRT | CRF_MOD_EXP | CRF_DSA_SIGN | + CRF_DSA_VERIFY | CRF_DH_COMPUTE_KEY | +- CRF_DSA_GENERATE_KEY, p); ++ CRF_DSA_GENERATE_KEY | CRF_DH_GENERATE_KEY, p); + case CRIOGET: + fd = clonefd(filp); + ret = put_user(fd, p); +@@ -997,7 +996,7 @@ cryptodev_ioctl(struct file *filp, unsigned int cmd, unsigned long arg_) + case CIOCKEY: + { + struct cryptodev_pkc *pkc = +- kzalloc(sizeof(struct cryptodev_pkc), GFP_KERNEL); ++ kmalloc(sizeof(struct cryptodev_pkc), GFP_KERNEL); + + if (!pkc) + return -ENOMEM; +@@ -1053,7 +1052,7 @@ cryptodev_ioctl(struct file *filp, unsigned int cmd, unsigned long arg_) + case CIOCASYMASYNCRYPT: + { + struct cryptodev_pkc *pkc = +- kzalloc(sizeof(struct cryptodev_pkc), GFP_KERNEL); ++ kmalloc(sizeof(struct cryptodev_pkc), GFP_KERNEL); + ret = kop_from_user(&pkc->kop, arg); + + if (unlikely(ret)) +@@ -1070,13 +1069,12 @@ cryptodev_ioctl(struct file *filp, unsigned int cmd, unsigned long arg_) + case CIOCASYMFETCHCOOKIE: + { + struct cryptodev_pkc *pkc; +- unsigned long flags; + int i; + struct pkc_cookie_list_s cookie_list; + +- spin_lock_irqsave(&pcr->completion_lock, flags); + cookie_list.cookie_available = 0; + for (i = 0; i < MAX_COOKIES; i++) { ++ spin_lock_bh(&pcr->completion_lock); + if (!list_empty(&pcr->asym_completed_list)) { + /* Run a loop in the list for upto elements + and copy their response back */ +@@ -1084,6 +1082,7 @@ cryptodev_ioctl(struct file *filp, unsigned int cmd, unsigned long arg_) + list_first_entry(&pcr->asym_completed_list, + struct cryptodev_pkc, list); + list_del(&pkc->list); ++ spin_unlock_bh(&pcr->completion_lock); + ret = crypto_async_fetch_asym(pkc); + if (!ret) { + cookie_list.cookie_available++; +@@ -1093,10 +1092,10 @@ cryptodev_ioctl(struct file *filp, unsigned int cmd, unsigned long arg_) + } + kfree(pkc); + } else { ++ spin_unlock_bh(&pcr->completion_lock); + break; + } + } +- spin_unlock_irqrestore(&pcr->completion_lock, flags); + + /* Reflect the updated request to user-space */ + if (cookie_list.cookie_available) +@@ -1386,14 +1385,13 @@ cryptodev_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg_) + case COMPAT_CIOCASYMFETCHCOOKIE: + { + struct cryptodev_pkc *pkc; +- unsigned long flags; + int i = 0; + struct compat_pkc_cookie_list_s cookie_list; + +- spin_lock_irqsave(&pcr->completion_lock, flags); + cookie_list.cookie_available = 0; + + for (i = 0; i < MAX_COOKIES; i++) { ++ spin_lock_bh(&pcr->completion_lock); + if (!list_empty(&pcr->asym_completed_list)) { + /* Run a loop in the list for upto elements + and copy their response back */ +@@ -1401,6 +1399,7 @@ cryptodev_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg_) + list_first_entry(&pcr->asym_completed_list, + struct cryptodev_pkc, list); + list_del(&pkc->list); ++ spin_unlock_bh(&pcr->completion_lock); + ret = crypto_async_fetch_asym(pkc); + if (!ret) { + cookie_list.cookie_available++; +@@ -1409,10 +1408,10 @@ cryptodev_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg_) + } + kfree(pkc); + } else { ++ spin_unlock_bh(&pcr->completion_lock); + break; + } + } +- spin_unlock_irqrestore(&pcr->completion_lock, flags); + + /* Reflect the updated request to user-space */ + if (cookie_list.cookie_available) +diff --git a/main.c b/main.c +index c901bc7..2747706 100644 +--- a/main.c ++++ b/main.c +@@ -215,7 +215,9 @@ int crypto_kop_dsasign(struct cryptodev_pkc *pkc) + pkc_req->type = DSA_SIGN; + } + +- buf = kzalloc(buf_size, GFP_DMA); ++ buf = kmalloc(buf_size, GFP_DMA); ++ if (!buf) ++ return -ENOMEM; + + dsa_req->q = buf; + dsa_req->r = dsa_req->q + dsa_req->q_len; +@@ -298,7 +300,9 @@ int crypto_kop_dsaverify(struct cryptodev_pkc *pkc) + pkc_req->type = DSA_VERIFY; + } + +- buf = kzalloc(buf_size, GFP_DMA); ++ buf = kmalloc(buf_size, GFP_DMA); ++ if (!buf) ++ return -ENOMEM; + + dsa_req->q = buf; + dsa_req->r = dsa_req->q + dsa_req->q_len; +@@ -378,7 +382,7 @@ int crypto_kop_keygen(struct cryptodev_pkc *pkc) + pkc_req->curve_type = cop->curve_type; + } + +- buf = kzalloc(buf_size, GFP_DMA); ++ buf = kmalloc(buf_size, GFP_DMA); + if (!buf) + return -ENOMEM; + +@@ -390,25 +394,28 @@ int crypto_kop_keygen(struct cryptodev_pkc *pkc) + copy_from_user(key_req->q, cop->crk_param[0].crp_p, key_req->q_len); + copy_from_user(key_req->r, cop->crk_param[1].crp_p, key_req->r_len); + copy_from_user(key_req->g, cop->crk_param[2].crp_p, key_req->g_len); +- if (cop->crk_iparams == 3) { +- copy_from_user(key_req->pub_key, cop->crk_param[3].crp_p, +- key_req->pub_key_len); +- copy_from_user(key_req->priv_key, cop->crk_param[4].crp_p, +- key_req->priv_key_len); +- } else { ++ if (cop->crk_iparams == 4) { + key_req->ab = key_req->priv_key + key_req->priv_key_len; + copy_from_user(key_req->ab, cop->crk_param[3].crp_p, + key_req->ab_len); +- copy_from_user(key_req->pub_key, cop->crk_param[4].crp_p, +- key_req->pub_key_len); +- copy_from_user(key_req->priv_key, cop->crk_param[5].crp_p, +- key_req->priv_key_len); + } + + rc = cryptodev_pkc_offload(pkc); + if (pkc->type == SYNCHRONOUS) { + if (rc) + goto err; ++ ++ if (cop->crk_iparams == 4) { ++ copy_to_user(cop->crk_param[4].crp_p, key_req->pub_key, ++ key_req->pub_key_len); ++ copy_to_user(cop->crk_param[5].crp_p, key_req->priv_key, ++ key_req->priv_key_len); ++ } else { ++ copy_to_user(cop->crk_param[3].crp_p, key_req->pub_key, ++ key_req->pub_key_len); ++ copy_to_user(cop->crk_param[4].crp_p, ++ key_req->priv_key, key_req->priv_key_len); ++ } + } else { + if (rc != -EINPROGRESS && !rc) + goto err; +@@ -447,7 +454,9 @@ int crypto_kop_dh_key(struct cryptodev_pkc *pkc) + pkc_req->type = DH_COMPUTE_KEY; + } + buf_size += dh_req->z_len; +- buf = kzalloc(buf_size, GFP_DMA); ++ buf = kmalloc(buf_size, GFP_DMA); ++ if (!buf) ++ return -ENOMEM; + dh_req->q = buf; + dh_req->s = dh_req->q + dh_req->q_len; + dh_req->pub_key = dh_req->s + dh_req->s_len; +@@ -508,9 +517,11 @@ int crypto_modexp_crt(struct cryptodev_pkc *pkc) + rsa_req->dq_len = (cop->crk_param[4].crp_nbits + 7)/8; + rsa_req->c_len = (cop->crk_param[5].crp_nbits + 7)/8; + rsa_req->f_len = (cop->crk_param[6].crp_nbits + 7)/8; +- buf = kzalloc(rsa_req->p_len + rsa_req->q_len + rsa_req->f_len + ++ buf = kmalloc(rsa_req->p_len + rsa_req->q_len + rsa_req->f_len + + rsa_req->dp_len + rsa_req->dp_len + rsa_req->c_len + + rsa_req->g_len, GFP_DMA); ++ if (!buf) ++ return -ENOMEM; + rsa_req->p = buf; + rsa_req->q = rsa_req->p + rsa_req->p_len; + rsa_req->g = rsa_req->q + rsa_req->q_len; +@@ -563,7 +574,7 @@ int crypto_bn_modexp(struct cryptodev_pkc *pkc) + rsa_req->e_len = (cop->crk_param[1].crp_nbits + 7)/8; + rsa_req->n_len = (cop->crk_param[2].crp_nbits + 7)/8; + rsa_req->g_len = (cop->crk_param[3].crp_nbits + 7)/8; +- buf = kzalloc(rsa_req->f_len + rsa_req->e_len + rsa_req->n_len ++ buf = kmalloc(rsa_req->f_len + rsa_req->e_len + rsa_req->n_len + + rsa_req->g_len, GFP_DMA); + if (!buf) + return -ENOMEM; +-- +1.8.3.1 + diff --git a/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0007-add-support-for-COMPAT_CIOCAUTHCRYPT-ioctl.patch b/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0007-add-support-for-COMPAT_CIOCAUTHCRYPT-ioctl.patch deleted file mode 100644 index b796f160..00000000 --- a/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0007-add-support-for-COMPAT_CIOCAUTHCRYPT-ioctl.patch +++ /dev/null @@ -1,209 +0,0 @@ -From 75e26bf18997488518228cb851585bf8e4c3120f Mon Sep 17 00:00:00 2001 -From: Horia Geanta -Date: Wed, 4 Dec 2013 15:43:41 +0200 -Subject: [[Patch][fsl 07/16] add support for COMPAT_CIOCAUTHCRYPT ioctl() - -Upstream-status: Pending - -Needed for 64b kernel with 32b user space. - -Signed-off-by: Horia Geanta -Tested-by: Cristian Stoica ---- - authenc.c | 80 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ - cryptodev_int.h | 41 ++++++++++++++++++++++++++++ - ioctl.c | 16 +++++++++++ - 3 files changed, 137 insertions(+) - -diff --git a/authenc.c b/authenc.c -index 5235973..259a225 100644 ---- a/authenc.c -+++ b/authenc.c -@@ -241,6 +241,86 @@ static int fill_caop_from_kcaop(struct kernel_crypt_auth_op *kcaop, struct fcryp - return 0; - } - -+/* compatibility code for 32bit userlands */ -+#ifdef CONFIG_COMPAT -+ -+static inline void -+compat_to_crypt_auth_op(struct compat_crypt_auth_op *compat, -+ struct crypt_auth_op *caop) -+{ -+ caop->ses = compat->ses; -+ caop->op = compat->op; -+ caop->flags = compat->flags; -+ caop->len = compat->len; -+ caop->dst_len = compat->dst_len; -+ caop->auth_len = compat->auth_len; -+ caop->tag_len = compat->tag_len; -+ caop->iv_len = compat->iv_len; -+ -+ caop->auth_src = compat_ptr(compat->auth_src); -+ caop->src = compat_ptr(compat->src); -+ caop->dst = compat_ptr(compat->dst); -+ caop->tag = compat_ptr(compat->tag); -+ caop->iv = compat_ptr(compat->iv); -+} -+ -+static inline void -+crypt_auth_op_to_compat(struct crypt_auth_op *caop, -+ struct compat_crypt_auth_op *compat) -+{ -+ compat->ses = caop->ses; -+ compat->op = caop->op; -+ compat->flags = caop->flags; -+ compat->len = caop->len; -+ compat->dst_len = caop->dst_len; -+ compat->auth_len = caop->auth_len; -+ compat->tag_len = caop->tag_len; -+ compat->iv_len = caop->iv_len; -+ -+ compat->auth_src = ptr_to_compat(caop->auth_src); -+ compat->src = ptr_to_compat(caop->src); -+ compat->dst = ptr_to_compat(caop->dst); -+ compat->tag = ptr_to_compat(caop->tag); -+ compat->iv = ptr_to_compat(caop->iv); -+} -+ -+int compat_kcaop_from_user(struct kernel_crypt_auth_op *kcaop, -+ struct fcrypt *fcr, void __user *arg) -+{ -+ struct compat_crypt_auth_op compat_caop; -+ -+ if (unlikely(copy_from_user(&compat_caop, arg, sizeof(compat_caop)))) { -+ dprintk(1, KERN_ERR, "Error in copying from userspace\n"); -+ return -EFAULT; -+ } -+ -+ compat_to_crypt_auth_op(&compat_caop, &kcaop->caop); -+ -+ return fill_kcaop_from_caop(kcaop, fcr); -+} -+ -+int compat_kcaop_to_user(struct kernel_crypt_auth_op *kcaop, -+ struct fcrypt *fcr, void __user *arg) -+{ -+ int ret; -+ struct compat_crypt_auth_op compat_caop; -+ -+ ret = fill_caop_from_kcaop(kcaop, fcr); -+ if (unlikely(ret)) { -+ dprintk(1, KERN_ERR, "fill_caop_from_kcaop\n"); -+ return ret; -+ } -+ -+ crypt_auth_op_to_compat(&kcaop->caop, &compat_caop); -+ -+ if (unlikely(copy_to_user(arg, &compat_caop, sizeof(compat_caop)))) { -+ dprintk(1, KERN_ERR, "Error in copying to userspace\n"); -+ return -EFAULT; -+ } -+ return 0; -+} -+ -+#endif /* CONFIG_COMPAT */ - - int kcaop_from_user(struct kernel_crypt_auth_op *kcaop, - struct fcrypt *fcr, void __user *arg) -diff --git a/cryptodev_int.h b/cryptodev_int.h -index d7660fa..8d206c9 100644 ---- a/cryptodev_int.h -+++ b/cryptodev_int.h -@@ -73,11 +73,43 @@ struct compat_crypt_op { - compat_uptr_t iv;/* initialization vector for encryption operations */ - }; - -+ /* input of CIOCAUTHCRYPT */ -+struct compat_crypt_auth_op { -+ uint32_t ses; /* session identifier */ -+ uint16_t op; /* COP_ENCRYPT or COP_DECRYPT */ -+ uint16_t flags; /* see COP_FLAG_AEAD_* */ -+ uint32_t len; /* length of source data */ -+ uint32_t dst_len; /* length of result data */ -+ uint32_t auth_len; /* length of auth data */ -+ compat_uptr_t auth_src; /* authenticated-only data */ -+ -+ /* The current implementation is more efficient if data are -+ * encrypted in-place (src==dst). */ -+ compat_uptr_t src; /* data to be encrypted and -+ authenticated */ -+ compat_uptr_t dst; /* pointer to output data. Must have -+ * space for tag. For TLS this should be -+ * at least len + tag_size + block_size -+ * for padding */ -+ -+ compat_uptr_t tag; /* where the tag will be copied to. TLS -+ * mode doesn't use that as tag is -+ * copied to dst. -+ * SRTP mode copies tag there. */ -+ uint32_t tag_len; /* the length of the tag. Use zero for -+ * digest size or max tag. */ -+ -+ /* initialization vector for encryption operations */ -+ compat_uptr_t iv; -+ uint32_t iv_len; -+}; -+ - /* compat ioctls, defined for the above structs */ - #define COMPAT_CIOCGSESSION _IOWR('c', 102, struct compat_session_op) - #define COMPAT_CIOCCRYPT _IOWR('c', 104, struct compat_crypt_op) - #define COMPAT_CIOCASYNCCRYPT _IOW('c', 107, struct compat_crypt_op) - #define COMPAT_CIOCASYNCFETCH _IOR('c', 108, struct compat_crypt_op) -+#define COMPAT_CIOCAUTHCRYPT _IOWR('c', 109, struct compat_crypt_auth_op) - - #endif /* CONFIG_COMPAT */ - -@@ -108,6 +140,15 @@ struct kernel_crypt_auth_op { - - /* auth */ - -+#ifdef CONFIG_COMPAT -+int compat_kcaop_from_user(struct kernel_crypt_auth_op *kcaop, -+ struct fcrypt *fcr, void __user *arg); -+ -+int compat_kcaop_to_user(struct kernel_crypt_auth_op *kcaop, -+ struct fcrypt *fcr, void __user *arg); -+#endif /* CONFIG_COMPAT */ -+ -+ - int kcaop_from_user(struct kernel_crypt_auth_op *kcop, - struct fcrypt *fcr, void __user *arg); - int kcaop_to_user(struct kernel_crypt_auth_op *kcaop, -diff --git a/ioctl.c b/ioctl.c -index 3baf195..18874d3 100644 ---- a/ioctl.c -+++ b/ioctl.c -@@ -991,6 +991,7 @@ cryptodev_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg_) - struct session_op sop; - struct compat_session_op compat_sop; - struct kernel_crypt_op kcop; -+ struct kernel_crypt_auth_op kcaop; - int ret; - - if (unlikely(!pcr)) -@@ -1033,6 +1034,21 @@ cryptodev_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg_) - return ret; - - return compat_kcop_to_user(&kcop, fcr, arg); -+ -+ case COMPAT_CIOCAUTHCRYPT: -+ if (unlikely(ret = compat_kcaop_from_user(&kcaop, fcr, arg))) { -+ dprintk(1, KERN_WARNING, "Error copying from user\n"); -+ return ret; -+ } -+ -+ ret = crypto_auth_run(fcr, &kcaop); -+ if (unlikely(ret)) { -+ dprintk(1, KERN_WARNING, "Error in crypto_auth_run\n"); -+ return ret; -+ } -+ -+ return compat_kcaop_to_user(&kcaop, fcr, arg); -+ - #ifdef ENABLE_ASYNC - case COMPAT_CIOCASYNCCRYPT: - if (unlikely(ret = compat_kcop_from_user(&kcop, fcr, arg))) --- -1.7.9.7 - diff --git a/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0008-Add-RSA-Key-generation-offloading.patch b/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0008-Add-RSA-Key-generation-offloading.patch new file mode 100644 index 00000000..affb2e72 --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0008-Add-RSA-Key-generation-offloading.patch @@ -0,0 +1,170 @@ +From af5e4289f60c38ab17adab14c82d6204d155f25f Mon Sep 17 00:00:00 2001 +From: Hou Zhiqiang +Date: Wed, 19 Mar 2014 14:02:46 +0800 +Subject: [PATCH 8/9] Add RSA Key generation offloading + +Upstream-status: Pending + +Signed-off-by: Hou Zhiqiang +Tested-by: Cristian Stoica +--- + cryptlib.c | 1 + + crypto/cryptodev.h | 2 ++ + ioctl.c | 3 +- + main.c | 80 +++++++++++++++++++++++++++++++++++++++++++++++++++++- + 4 files changed, 84 insertions(+), 2 deletions(-) + +diff --git a/cryptlib.c b/cryptlib.c +index 47cd568..4dd1847 100644 +--- a/cryptlib.c ++++ b/cryptlib.c +@@ -441,6 +441,7 @@ int cryptodev_pkc_offload(struct cryptodev_pkc *pkc) + struct pkc_request *pkc_req = &pkc->req, *pkc_requested; + + switch (pkc_req->type) { ++ case RSA_KEYGEN: + case RSA_PUB: + case RSA_PRIV_FORM1: + case RSA_PRIV_FORM2: +diff --git a/crypto/cryptodev.h b/crypto/cryptodev.h +index 275a55c..d0cc542 100644 +--- a/crypto/cryptodev.h ++++ b/crypto/cryptodev.h +@@ -270,6 +270,7 @@ enum cryptodev_crk_op_t { + CRK_DH_COMPUTE_KEY = 4, + CRK_DSA_GENERATE_KEY = 5, + CRK_DH_GENERATE_KEY = 6, ++ CRK_RSA_GENERATE_KEY = 7, + CRK_ALGORITHM_ALL + }; + +@@ -279,6 +280,7 @@ enum cryptodev_crk_op_t { + */ + #define CRF_MOD_EXP (1 << CRK_MOD_EXP) + #define CRF_MOD_EXP_CRT (1 << CRK_MOD_EXP_CRT) ++#define CRF_RSA_GENERATE_KEY (1 << CRK_RSA_GENERATE_KEY) + #define CRF_DSA_SIGN (1 << CRK_DSA_SIGN) + #define CRF_DSA_VERIFY (1 << CRK_DSA_VERIFY) + #define CRF_DH_COMPUTE_KEY (1 << CRK_DH_COMPUTE_KEY) +diff --git a/ioctl.c b/ioctl.c +index 7e4c671..14888d6 100644 +--- a/ioctl.c ++++ b/ioctl.c +@@ -957,7 +957,8 @@ cryptodev_ioctl(struct file *filp, unsigned int cmd, unsigned long arg_) + case CIOCASYMFEAT: + return put_user(CRF_MOD_EXP_CRT | CRF_MOD_EXP | CRF_DSA_SIGN | + CRF_DSA_VERIFY | CRF_DH_COMPUTE_KEY | +- CRF_DSA_GENERATE_KEY | CRF_DH_GENERATE_KEY, p); ++ CRF_DSA_GENERATE_KEY | CRF_DH_GENERATE_KEY | ++ CRF_RSA_GENERATE_KEY, p); + case CRIOGET: + fd = clonefd(filp); + ret = put_user(fd, p); +diff --git a/main.c b/main.c +index 2747706..14dcf40 100644 +--- a/main.c ++++ b/main.c +@@ -346,6 +346,82 @@ err: + return rc; + } + ++int crypto_kop_rsa_keygen(struct cryptodev_pkc *pkc) ++{ ++ struct kernel_crypt_kop *kop = &pkc->kop; ++ struct crypt_kop *cop = &kop->kop; ++ struct pkc_request *pkc_req; ++ struct rsa_keygen_req_s *key_req; ++ int rc, buf_size; ++ uint8_t *buf; ++ ++ if (!cop->crk_param[0].crp_nbits || !cop->crk_param[1].crp_nbits || ++ !cop->crk_param[2].crp_nbits || !cop->crk_param[3].crp_nbits || ++ !cop->crk_param[4].crp_nbits || !cop->crk_param[5].crp_nbits || ++ !cop->crk_param[6].crp_nbits) ++ return -EINVAL; ++ ++ pkc_req = &pkc->req; ++ pkc_req->type = RSA_KEYGEN; ++ key_req = &pkc_req->req_u.rsa_keygen; ++ key_req->n_len = (cop->crk_param[2].crp_nbits + 7)/8; ++ key_req->p_len = (cop->crk_param[0].crp_nbits + 7) / 8; ++ key_req->q_len = (cop->crk_param[1].crp_nbits + 7) / 8; ++ key_req->n_len = (cop->crk_param[2].crp_nbits + 7) / 8; ++ key_req->d_len = (cop->crk_param[3].crp_nbits + 7) / 8; ++ key_req->dp_len = (cop->crk_param[4].crp_nbits + 7) / 8; ++ key_req->dq_len = (cop->crk_param[5].crp_nbits + 7) / 8; ++ key_req->c_len = (cop->crk_param[6].crp_nbits + 7) / 8; ++ ++ buf_size = key_req->p_len + key_req->q_len + key_req->n_len + ++ key_req->d_len + key_req->dp_len + ++ key_req->dq_len + key_req->c_len; ++ ++ buf = kmalloc(buf_size, GFP_DMA); ++ if (!buf) ++ return -ENOMEM; ++ key_req->p = buf; ++ key_req->q = key_req->p + key_req->p_len; ++ key_req->n = key_req->q + key_req->q_len; ++ key_req->d = key_req->n + key_req->n_len; ++ key_req->dp = key_req->d + key_req->d_len; ++ key_req->dq = key_req->dp + key_req->dp_len; ++ key_req->c = key_req->dq + key_req->dq_len; ++ ++ rc = cryptodev_pkc_offload(pkc); ++ ++ if (pkc->type == SYNCHRONOUS) { ++ if (rc) ++ goto err; ++ ++ copy_to_user(cop->crk_param[0].crp_p, ++ key_req->p, key_req->p_len); ++ copy_to_user(cop->crk_param[1].crp_p, ++ key_req->q, key_req->q_len); ++ copy_to_user(cop->crk_param[2].crp_p, ++ key_req->n, key_req->n_len); ++ copy_to_user(cop->crk_param[3].crp_p, ++ key_req->d, key_req->d_len); ++ copy_to_user(cop->crk_param[4].crp_p, ++ key_req->dp, key_req->dp_len); ++ copy_to_user(cop->crk_param[5].crp_p, ++ key_req->dq, key_req->dq_len); ++ copy_to_user(cop->crk_param[6].crp_p, ++ key_req->c, key_req->c_len); ++ } else { ++ if (rc != -EINPROGRESS && !rc) { ++ printk("%s: Failed\n", __func__); ++ goto err; ++ } ++ pkc->cookie = buf; ++ return rc; ++ } ++err: ++ kfree(buf); ++ return rc; ++ ++} ++ + int crypto_kop_keygen(struct cryptodev_pkc *pkc) + { + struct kernel_crypt_kop *kop = &pkc->kop; +@@ -385,7 +461,6 @@ int crypto_kop_keygen(struct cryptodev_pkc *pkc) + buf = kmalloc(buf_size, GFP_DMA); + if (!buf) + return -ENOMEM; +- + key_req->q = buf; + key_req->r = key_req->q + key_req->q_len; + key_req->g = key_req->r + key_req->r_len; +@@ -650,6 +725,9 @@ int crypto_run_asym(struct cryptodev_pkc *pkc) + goto err; + ret = crypto_kop_keygen(pkc); + break; ++ case CRK_RSA_GENERATE_KEY: ++ ret = crypto_kop_rsa_keygen(pkc); ++ break; + } + err: + return ret; +-- +1.8.3.1 + diff --git a/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0008-fix-cipher-algorithm-memleaks.patch b/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0008-fix-cipher-algorithm-memleaks.patch deleted file mode 100644 index 995fbed4..00000000 --- a/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0008-fix-cipher-algorithm-memleaks.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 9675e358fe73b33029a470aa5cf47527848f4054 Mon Sep 17 00:00:00 2001 -From: Cristian Stoica -Date: Tue, 26 Nov 2013 16:36:37 +0200 -Subject: [[Patch][fsl 08/16] fix cipher algorithm memleaks - -Upstream-status: Pending - -Patch 67e743aef130d107c1b41e0aace7677f9ff53bd1 allocates memory for -cipher algorithm key without freeing it when session terminates. This -patch addresses the deallocation issue. - -Signed-off-by: Cristian Stoica -Tested-by: Horia Ioan Geanta Neag ---- - cryptodev_int.h | 1 + - ioctl.c | 2 ++ - 2 files changed, 3 insertions(+) - -diff --git a/cryptodev_int.h b/cryptodev_int.h -index 8d206c9..8891837 100644 ---- a/cryptodev_int.h -+++ b/cryptodev_int.h -@@ -166,6 +166,7 @@ struct csession { - struct hash_data hdata; - uint32_t sid; - uint32_t alignmask; -+ uint8_t *key; - - unsigned int array_size; - unsigned int used_pages; /* the number of pages that are used */ -diff --git a/ioctl.c b/ioctl.c -index 18874d3..63467e0 100644 ---- a/ioctl.c -+++ b/ioctl.c -@@ -235,6 +235,7 @@ crypto_create_session(struct fcrypt *fcr, struct session_op *sop) - goto error_cipher; - - key = kmalloc(keylen, GFP_KERNEL); -+ ses_new->key = key; - if (unlikely(!key)) { - ret = -ENOMEM; - goto error_cipher; -@@ -342,6 +343,7 @@ crypto_destroy_session(struct csession *ses_ptr) - ddebug(2, "freeing space for %d user pages", ses_ptr->array_size); - kfree(ses_ptr->pages); - kfree(ses_ptr->sg); -+ kfree(ses_ptr->key); - mutex_unlock(&ses_ptr->sem); - mutex_destroy(&ses_ptr->sem); - kfree(ses_ptr); --- -1.7.9.7 - diff --git a/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0009-Fixed-compilation-error-of-openssl-with-fsl-cryptode.patch b/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0009-Fixed-compilation-error-of-openssl-with-fsl-cryptode.patch new file mode 100644 index 00000000..32757ca9 --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0009-Fixed-compilation-error-of-openssl-with-fsl-cryptode.patch @@ -0,0 +1,160 @@ +From e791b55b03d295ee11476382a7bd93ab131e2e52 Mon Sep 17 00:00:00 2001 +From: Yashpal Dutta +Date: Thu, 17 Apr 2014 07:08:47 +0545 +Subject: [PATCH 9/9] Fixed compilation error of openssl with fsl cryptodev + +Upstream-status: Pending + +Signed-off-by: Yashpal Dutta +Tested-by: Cristian Stoica +--- + authenc.c | 1 + + cryptlib.c | 9 ++++----- + crypto/cryptodev.h | 9 ++++++++- + cryptodev_int.h | 2 +- + ioctl.c | 8 ++++++-- + main.c | 1 + + 6 files changed, 21 insertions(+), 9 deletions(-) + +diff --git a/authenc.c b/authenc.c +index ef0d3db..2aa4d38 100644 +--- a/authenc.c ++++ b/authenc.c +@@ -2,6 +2,7 @@ + * Driver for /dev/crypto device (aka CryptoDev) + * + * Copyright (c) 2011, 2012 OpenSSL Software Foundation, Inc. ++ * Copyright (c) 2014 Freescale Semiconductor, Inc. + * + * Author: Nikos Mavrogiannopoulos + * +diff --git a/cryptlib.c b/cryptlib.c +index 4dd1847..ec6693e 100644 +--- a/cryptlib.c ++++ b/cryptlib.c +@@ -4,8 +4,7 @@ + * Copyright (c) 2010,2011 Nikos Mavrogiannopoulos + * Portions Copyright (c) 2010 Michael Weiser + * Portions Copyright (c) 2010 Phil Sutter +- * +- * Copyright 2012 Freescale Semiconductor, Inc. ++ * Copyright 2012-2014 Freescale Semiconductor, Inc. + * + * This file is part of linux cryptodev. + * +@@ -144,7 +143,7 @@ int cryptodev_cipher_init(struct cipher_data *out, const char *alg_name, + if (alg->max_keysize > 0 && + unlikely((keylen < alg->min_keysize) || + (keylen > alg->max_keysize))) { +- ddebug(1, "Wrong keylen '%zu' for algorithm '%s'. Use %u to %u.", ++ ddebug(1, "Wrong keylen '%u' for algorithm '%s'. Use %u to %u.", + keylen, alg_name, alg->min_keysize, alg->max_keysize); + ret = -EINVAL; + goto error; +@@ -171,7 +170,7 @@ int cryptodev_cipher_init(struct cipher_data *out, const char *alg_name, + } + + if (unlikely(ret)) { +- ddebug(1, "Setting key failed for %s-%zu.", alg_name, keylen*8); ++ ddebug(1, "Setting key failed for %s-%u.", alg_name, keylen*8); + ret = -EINVAL; + goto error; + } +@@ -338,7 +337,7 @@ int cryptodev_hash_init(struct hash_data *hdata, const char *alg_name, + if (hmac_mode != 0) { + ret = crypto_ahash_setkey(hdata->async.s, mackey, mackeylen); + if (unlikely(ret)) { +- ddebug(1, "Setting hmac key failed for %s-%zu.", ++ ddebug(1, "Setting hmac key failed for %s-%u.", + alg_name, mackeylen*8); + ret = -EINVAL; + goto error; +diff --git a/crypto/cryptodev.h b/crypto/cryptodev.h +index d0cc542..e7edd97 100644 +--- a/crypto/cryptodev.h ++++ b/crypto/cryptodev.h +@@ -234,6 +234,13 @@ struct crypt_auth_op { + #define CRYPTO_ALG_FLAG_RNG_ENABLE 2 + #define CRYPTO_ALG_FLAG_DSA_SHA 4 + ++enum ec_curve_t { ++ EC_DISCRETE_LOG, ++ EC_PRIME, ++ EC_BINARY, ++ MAX_EC_TYPE ++}; ++ + struct crparam { + __u8 *crp_p; + __u32 crp_nbits; +@@ -249,7 +256,7 @@ struct crypt_kop { + __u16 crk_oparams; + __u32 crk_pad1; + struct crparam crk_param[CRK_MAXPARAM]; +- enum curve_t curve_type; /* 0 == Discrete Log, ++ enum ec_curve_t curve_type; /* 0 == Discrete Log, + 1 = EC_PRIME, 2 = EC_BINARY */ + void *cookie; + }; +diff --git a/cryptodev_int.h b/cryptodev_int.h +index 5347cae..c83c885 100644 +--- a/cryptodev_int.h ++++ b/cryptodev_int.h +@@ -88,7 +88,7 @@ struct compat_crypt_kop { + uint16_t crk_oparams; + uint32_t crk_pad1; + struct compat_crparam crk_param[CRK_MAXPARAM]; +- enum curve_t curve_type; /* 0 == Discrete Log, 1 = EC_PRIME, ++ enum ec_curve_t curve_type; /* 0 == Discrete Log, 1 = EC_PRIME, + 2 = EC_BINARY */ + compat_uptr_t cookie; + }; +diff --git a/ioctl.c b/ioctl.c +index 14888d6..20ab4ca 100644 +--- a/ioctl.c ++++ b/ioctl.c +@@ -4,7 +4,7 @@ + * Copyright (c) 2004 Michal Ludvig , SuSE Labs + * Copyright (c) 2009,2010,2011 Nikos Mavrogiannopoulos + * Copyright (c) 2010 Phil Sutter +- * Copyright 2012 Freescale Semiconductor, Inc. ++ * Copyright 2012-2014 Freescale Semiconductor, Inc. + * + * This file is part of linux cryptodev. + * +@@ -501,6 +501,7 @@ cryptodev_open(struct inode *inode, struct file *filp) + INIT_LIST_HEAD(&pcr->done.list); + INIT_LIST_HEAD(&pcr->asym_completed_list); + spin_lock_init(&pcr->completion_lock); ++ + INIT_WORK(&pcr->cryptask, cryptask_routine); + + init_waitqueue_head(&pcr->user_waiter); +@@ -780,8 +781,11 @@ static int fill_kcop_from_cop(struct kernel_crypt_op *kcop, struct fcrypt *fcr) + + if (cop->iv) { + rc = copy_from_user(kcop->iv, cop->iv, kcop->ivlen); +- if (unlikely(rc)) ++ if (unlikely(rc)) { ++ derr(1, "error copying IV (%d bytes), copy_from_user returned %d for address %p", ++ kcop->ivlen, rc, cop->iv); + return -EFAULT; ++ } + } + + return 0; +diff --git a/main.c b/main.c +index 14dcf40..6365911 100644 +--- a/main.c ++++ b/main.c +@@ -3,6 +3,7 @@ + * + * Copyright (c) 2004 Michal Ludvig , SuSE Labs + * Copyright (c) 2009-2013 Nikos Mavrogiannopoulos ++ * Copyright (c) 2014 Freescale Semiconductor, Inc. + * + * This file is part of linux cryptodev. + * +-- +2.2.0 + diff --git a/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0009-PKC-support-added-in-cryptodev-module.patch b/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0009-PKC-support-added-in-cryptodev-module.patch deleted file mode 100644 index b403731a..00000000 --- a/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0009-PKC-support-added-in-cryptodev-module.patch +++ /dev/null @@ -1,898 +0,0 @@ -From 55be37e9e308990b2eeeef7f974dfbfbb1120266 Mon Sep 17 00:00:00 2001 -From: Yashpal Dutta -Date: Fri, 7 Mar 2014 06:16:09 +0545 -Subject: [[Patch][fsl 09/16] PKC support added in cryptodev module - -Upstream-status: Pending - -Signed-off-by: Yashpal Dutta ---- - cryptlib.c | 66 ++++++++- - cryptlib.h | 28 ++++ - crypto/cryptodev.h | 15 ++- - cryptodev_int.h | 20 ++- - ioctl.c | 196 +++++++++++++++++++++++++-- - main.c | 378 ++++++++++++++++++++++++++++++++++++++++++++++++++++ - 6 files changed, 685 insertions(+), 18 deletions(-) - -diff --git a/cryptlib.c b/cryptlib.c -index 3576f39..fa0b63f 100644 ---- a/cryptlib.c -+++ b/cryptlib.c -@@ -5,6 +5,8 @@ - * Portions Copyright (c) 2010 Michael Weiser - * Portions Copyright (c) 2010 Phil Sutter - * -+ * Copyright 2012 Freescale Semiconductor, Inc. -+ * - * This file is part of linux cryptodev. - * - * This program is free software; you can redistribute it and/or -@@ -39,11 +41,6 @@ - #include "cryptodev_int.h" - - --struct cryptodev_result { -- struct completion completion; -- int err; --}; -- - static void cryptodev_complete(struct crypto_async_request *req, int err) - { - struct cryptodev_result *res = req->data; -@@ -244,7 +241,6 @@ static inline int waitfor(struct cryptodev_result *cr, ssize_t ret) - case 0: - break; - case -EINPROGRESS: -- case -EBUSY: - wait_for_completion(&cr->completion); - /* At this point we known for sure the request has finished, - * because wait_for_completion above was not interruptible. -@@ -424,3 +420,61 @@ int cryptodev_hash_final(struct hash_data *hdata, void *output) - return waitfor(hdata->async.result, ret); - } - -+int cryptodev_pkc_offload(struct cryptodev_pkc *pkc) -+{ -+ int ret = 0; -+ struct pkc_request *pkc_req = &pkc->req, *pkc_requested; -+ -+ switch (pkc_req->type) { -+ case RSA_PUB: -+ case RSA_PRIV_FORM1: -+ case RSA_PRIV_FORM2: -+ case RSA_PRIV_FORM3: -+ pkc->s = crypto_alloc_pkc("pkc(rsa)", -+ CRYPTO_ALG_TYPE_PKC_RSA, 0); -+ break; -+ case DSA_SIGN: -+ case DSA_VERIFY: -+ case ECDSA_SIGN: -+ case ECDSA_VERIFY: -+ pkc->s = crypto_alloc_pkc("pkc(dsa)", -+ CRYPTO_ALG_TYPE_PKC_DSA, 0); -+ break; -+ case DH_COMPUTE_KEY: -+ case ECDH_COMPUTE_KEY: -+ pkc->s = crypto_alloc_pkc("pkc(dh)", -+ CRYPTO_ALG_TYPE_PKC_DH, 0); -+ break; -+ default: -+ return -EINVAL; -+ } -+ -+ if (IS_ERR_OR_NULL(pkc->s)) -+ return -EINVAL; -+ -+ init_completion(&pkc->result.completion); -+ pkc_requested = pkc_request_alloc(pkc->s, GFP_KERNEL); -+ -+ if (unlikely(IS_ERR_OR_NULL(pkc_requested))) { -+ ret = -ENOMEM; -+ goto error; -+ } -+ pkc_requested->type = pkc_req->type; -+ pkc_requested->curve_type = pkc_req->curve_type; -+ memcpy(&pkc_requested->req_u, &pkc_req->req_u, sizeof(pkc_req->req_u)); -+ pkc_request_set_callback(pkc_requested, CRYPTO_TFM_REQ_MAY_BACKLOG, -+ cryptodev_complete_asym, pkc); -+ ret = crypto_pkc_op(pkc_requested); -+ if (ret != -EINPROGRESS && ret != 0) -+ goto error2; -+ -+ if (pkc->type == SYNCHRONOUS) -+ ret = waitfor(&pkc->result, ret); -+ -+ return ret; -+error2: -+ kfree(pkc_requested); -+error: -+ crypto_free_pkc(pkc->s); -+ return ret; -+} -diff --git a/cryptlib.h b/cryptlib.h -index 4cb66ad..e77edc5 100644 ---- a/cryptlib.h -+++ b/cryptlib.h -@@ -1,3 +1,6 @@ -+/* -+ * Copyright 2012 Freescale Semiconductor, Inc. -+ */ - #ifndef CRYPTLIB_H - # define CRYPTLIB_H - -@@ -89,5 +92,30 @@ void cryptodev_hash_deinit(struct hash_data *hdata); - int cryptodev_hash_init(struct hash_data *hdata, const char *alg_name, - int hmac_mode, void *mackey, unsigned int mackeylen); - -+/* Operation Type */ -+enum offload_type { -+ SYNCHRONOUS, -+ ASYNCHRONOUS -+}; -+ -+struct cryptodev_result { -+ struct completion completion; -+ int err; -+}; -+ -+struct cryptodev_pkc { -+ struct list_head list; /* To maintain the Jobs in completed -+ cryptodev lists */ -+ struct kernel_crypt_kop kop; -+ struct crypto_pkc *s; /* Transform pointer from CryptoAPI */ -+ struct cryptodev_result result; /* Result to be updated by -+ completion handler */ -+ struct pkc_request req; /* PKC request structure allocated -+ from CryptoAPI */ -+ enum offload_type type; /* Synchronous Vs Asynchronous request */ -+ void *cookie; /*Additional opaque cookie to be used in future */ -+ struct crypt_priv *priv; -+}; - -+int cryptodev_pkc_offload(struct cryptodev_pkc *); - #endif -diff --git a/crypto/cryptodev.h b/crypto/cryptodev.h -index 3ea3d35..575ce63 100644 ---- a/crypto/cryptodev.h -+++ b/crypto/cryptodev.h -@@ -1,6 +1,10 @@ --/* This is a source compatible implementation with the original API of -+/* -+ * Copyright 2012 Freescale Semiconductor, Inc. -+ * -+ * This is a source compatible implementation with the original API of - * cryptodev by Angelos D. Keromytis, found at openbsd cryptodev.h. -- * Placed under public domain */ -+ * Placed under public domain -+ */ - - #ifndef L_CRYPTODEV_H - #define L_CRYPTODEV_H -@@ -246,6 +250,9 @@ struct crypt_kop { - __u16 crk_oparams; - __u32 crk_pad1; - struct crparam crk_param[CRK_MAXPARAM]; -+ enum curve_t curve_type; /* 0 == Discrete Log, -+ 1 = EC_PRIME, 2 = EC_BINARY */ -+ void *cookie; - }; - - enum cryptodev_crk_op_t { -@@ -290,5 +297,7 @@ enum cryptodev_crk_op_t { - */ - #define CIOCASYNCCRYPT _IOW('c', 110, struct crypt_op) - #define CIOCASYNCFETCH _IOR('c', 111, struct crypt_op) -- -+/* additional ioctls for asynchronous operation for asymmetric ciphers*/ -+#define CIOCASYMASYNCRYPT _IOW('c', 112, struct crypt_kop) -+#define CIOCASYMASYNFETCH _IOR('c', 113, struct crypt_kop) - #endif /* L_CRYPTODEV_H */ -diff --git a/cryptodev_int.h b/cryptodev_int.h -index 8891837..b08c253 100644 ---- a/cryptodev_int.h -+++ b/cryptodev_int.h -@@ -1,4 +1,6 @@ --/* cipher stuff */ -+/* cipher stuff -+ * Copyright 2012 Freescale Semiconductor, Inc. -+ */ - #ifndef CRYPTODEV_INT_H - # define CRYPTODEV_INT_H - -@@ -113,6 +115,14 @@ struct compat_crypt_auth_op { - - #endif /* CONFIG_COMPAT */ - -+/* kernel-internal extension to struct crypt_kop */ -+struct kernel_crypt_kop { -+ struct crypt_kop kop; -+ -+ struct task_struct *task; -+ struct mm_struct *mm; -+}; -+ - /* kernel-internal extension to struct crypt_op */ - struct kernel_crypt_op { - struct crypt_op cop; -@@ -158,6 +168,14 @@ int crypto_run(struct fcrypt *fcr, struct kernel_crypt_op *kcop); - - #include - -+/* Cryptodev Key operation handler */ -+int crypto_bn_modexp(struct cryptodev_pkc *); -+int crypto_modexp_crt(struct cryptodev_pkc *); -+int crypto_kop_dsasign(struct cryptodev_pkc *); -+int crypto_kop_dsaverify(struct cryptodev_pkc *); -+int crypto_run_asym(struct cryptodev_pkc *); -+void cryptodev_complete_asym(struct crypto_async_request *, int); -+ - /* other internal structs */ - struct csession { - struct list_head entry; -diff --git a/ioctl.c b/ioctl.c -index 63467e0..44070e1 100644 ---- a/ioctl.c -+++ b/ioctl.c -@@ -4,6 +4,7 @@ - * Copyright (c) 2004 Michal Ludvig , SuSE Labs - * Copyright (c) 2009,2010,2011 Nikos Mavrogiannopoulos - * Copyright (c) 2010 Phil Sutter -+ * Copyright 2012 Freescale Semiconductor, Inc. - * - * This file is part of linux cryptodev. - * -@@ -87,8 +88,37 @@ struct crypt_priv { - int itemcount; - struct work_struct cryptask; - wait_queue_head_t user_waiter; -+ /* List of pending cryptodev_pkc asym requests */ -+ struct list_head asym_completed_list; -+ /* For addition/removal of entry in pending list of asymmetric request*/ -+ spinlock_t completion_lock; - }; - -+/* Asymmetric request Completion handler */ -+void cryptodev_complete_asym(struct crypto_async_request *req, int err) -+{ -+ struct cryptodev_pkc *pkc = req->data; -+ struct cryptodev_result *res = &pkc->result; -+ -+ crypto_free_pkc(pkc->s); -+ res->err = err; -+ if (pkc->type == SYNCHRONOUS) { -+ if (err == -EINPROGRESS) -+ return; -+ complete(&res->completion); -+ } else { -+ struct crypt_priv *pcr = pkc->priv; -+ unsigned long flags; -+ spin_lock_irqsave(&pcr->completion_lock, flags); -+ list_add_tail(&pkc->list, &pcr->asym_completed_list); -+ spin_unlock_irqrestore(&pcr->completion_lock, flags); -+ /* wake for POLLIN */ -+ wake_up_interruptible(&pcr->user_waiter); -+ } -+ -+ kfree(req); -+} -+ - #define FILL_SG(sg, ptr, len) \ - do { \ - (sg)->page = virt_to_page(ptr); \ -@@ -467,7 +497,8 @@ cryptodev_open(struct inode *inode, struct file *filp) - INIT_LIST_HEAD(&pcr->free.list); - INIT_LIST_HEAD(&pcr->todo.list); - INIT_LIST_HEAD(&pcr->done.list); -- -+ INIT_LIST_HEAD(&pcr->asym_completed_list); -+ spin_lock_init(&pcr->completion_lock); - INIT_WORK(&pcr->cryptask, cryptask_routine); - - init_waitqueue_head(&pcr->user_waiter); -@@ -634,6 +665,79 @@ static int crypto_async_fetch(struct crypt_priv *pcr, - } - #endif - -+/* get the first asym cipher completed job from the "done" queue -+ * -+ * returns: -+ * -EBUSY if no completed jobs are ready (yet) -+ * the return value otherwise */ -+static int crypto_async_fetch_asym(struct cryptodev_pkc *pkc) -+{ -+ int ret = 0; -+ struct kernel_crypt_kop *kop = &pkc->kop; -+ struct crypt_kop *ckop = &kop->kop; -+ struct pkc_request *pkc_req = &pkc->req; -+ -+ switch (ckop->crk_op) { -+ case CRK_MOD_EXP: -+ { -+ struct rsa_pub_req_s *rsa_req = &pkc_req->req_u.rsa_pub_req; -+ copy_to_user(ckop->crk_param[3].crp_p, rsa_req->g, -+ rsa_req->g_len); -+ } -+ break; -+ case CRK_MOD_EXP_CRT: -+ { -+ struct rsa_priv_frm3_req_s *rsa_req = -+ &pkc_req->req_u.rsa_priv_f3; -+ copy_to_user(ckop->crk_param[6].crp_p, -+ rsa_req->f, rsa_req->f_len); -+ } -+ break; -+ case CRK_DSA_SIGN: -+ { -+ struct dsa_sign_req_s *dsa_req = &pkc_req->req_u.dsa_sign; -+ -+ if (pkc_req->type == ECDSA_SIGN) { -+ copy_to_user(ckop->crk_param[6].crp_p, -+ dsa_req->c, dsa_req->d_len); -+ copy_to_user(ckop->crk_param[7].crp_p, -+ dsa_req->d, dsa_req->d_len); -+ } else { -+ copy_to_user(ckop->crk_param[5].crp_p, -+ dsa_req->c, dsa_req->d_len); -+ copy_to_user(ckop->crk_param[6].crp_p, -+ dsa_req->d, dsa_req->d_len); -+ } -+ } -+ break; -+ case CRK_DSA_VERIFY: -+ break; -+ case CRK_DH_COMPUTE_KEY: -+ { -+ struct dh_key_req_s *dh_req = &pkc_req->req_u.dh_req; -+ if (pkc_req->type == ECDH_COMPUTE_KEY) -+ copy_to_user(ckop->crk_param[4].crp_p, -+ dh_req->z, dh_req->z_len); -+ else -+ copy_to_user(ckop->crk_param[3].crp_p, -+ dh_req->z, dh_req->z_len); -+ } -+ break; -+ default: -+ ret = -EINVAL; -+ } -+ kfree(pkc->cookie); -+ return ret; -+} -+ -+/* this function has to be called from process context */ -+static int fill_kop_from_cop(struct kernel_crypt_kop *kop) -+{ -+ kop->task = current; -+ kop->mm = current->mm; -+ return 0; -+} -+ - /* this function has to be called from process context */ - static int fill_kcop_from_cop(struct kernel_crypt_op *kcop, struct fcrypt *fcr) - { -@@ -657,11 +761,8 @@ static int fill_kcop_from_cop(struct kernel_crypt_op *kcop, struct fcrypt *fcr) - - if (cop->iv) { - rc = copy_from_user(kcop->iv, cop->iv, kcop->ivlen); -- if (unlikely(rc)) { -- derr(1, "error copying IV (%d bytes), copy_from_user returned %d for address %p", -- kcop->ivlen, rc, cop->iv); -+ if (unlikely(rc)) - return -EFAULT; -- } - } - - return 0; -@@ -687,6 +788,25 @@ static int fill_cop_from_kcop(struct kernel_crypt_op *kcop, struct fcrypt *fcr) - return 0; - } - -+static int kop_from_user(struct kernel_crypt_kop *kop, -+ void __user *arg) -+{ -+ if (unlikely(copy_from_user(&kop->kop, arg, sizeof(kop->kop)))) -+ return -EFAULT; -+ -+ return fill_kop_from_cop(kop); -+} -+ -+static int kop_to_user(struct kernel_crypt_kop *kop, -+ void __user *arg) -+{ -+ if (unlikely(copy_to_user(arg, &kop->kop, sizeof(kop->kop)))) { -+ dprintk(1, KERN_ERR, "Cannot copy to userspace\n"); -+ return -EFAULT; -+ } -+ return 0; -+} -+ - static int kcop_from_user(struct kernel_crypt_op *kcop, - struct fcrypt *fcr, void __user *arg) - { -@@ -816,7 +936,8 @@ cryptodev_ioctl(struct file *filp, unsigned int cmd, unsigned long arg_) - - switch (cmd) { - case CIOCASYMFEAT: -- return put_user(0, p); -+ return put_user(CRF_MOD_EXP_CRT | CRF_MOD_EXP | -+ CRF_DSA_SIGN | CRF_DSA_VERIFY | CRF_DH_COMPUTE_KEY, p); - case CRIOGET: - fd = clonefd(filp); - ret = put_user(fd, p); -@@ -852,6 +973,24 @@ cryptodev_ioctl(struct file *filp, unsigned int cmd, unsigned long arg_) - if (unlikely(ret)) - return ret; - return copy_to_user(arg, &siop, sizeof(siop)); -+ case CIOCKEY: -+ { -+ struct cryptodev_pkc *pkc = -+ kzalloc(sizeof(struct cryptodev_pkc), GFP_KERNEL); -+ -+ if (!pkc) -+ return -ENOMEM; -+ -+ ret = kop_from_user(&pkc->kop, arg); -+ if (unlikely(ret)) { -+ kfree(pkc); -+ return ret; -+ } -+ pkc->type = SYNCHRONOUS; -+ ret = crypto_run_asym(pkc); -+ kfree(pkc); -+ } -+ return ret; - case CIOCCRYPT: - if (unlikely(ret = kcop_from_user(&kcop, fcr, arg))) { - dwarning(1, "Error copying from user"); -@@ -890,6 +1029,45 @@ cryptodev_ioctl(struct file *filp, unsigned int cmd, unsigned long arg_) - - return kcop_to_user(&kcop, fcr, arg); - #endif -+ case CIOCASYMASYNCRYPT: -+ { -+ struct cryptodev_pkc *pkc = -+ kzalloc(sizeof(struct cryptodev_pkc), GFP_KERNEL); -+ ret = kop_from_user(&pkc->kop, arg); -+ -+ if (unlikely(ret)) -+ return -EINVAL; -+ -+ /* Store associated FD priv data with asymmetric request */ -+ pkc->priv = pcr; -+ pkc->type = ASYNCHRONOUS; -+ ret = crypto_run_asym(pkc); -+ if (ret == -EINPROGRESS) -+ ret = 0; -+ } -+ return ret; -+ case CIOCASYMASYNFETCH: -+ { -+ struct cryptodev_pkc *pkc; -+ unsigned long flags; -+ -+ spin_lock_irqsave(&pcr->completion_lock, flags); -+ if (list_empty(&pcr->asym_completed_list)) { -+ spin_unlock_irqrestore(&pcr->completion_lock, flags); -+ return -ENOMEM; -+ } -+ pkc = list_first_entry(&pcr->asym_completed_list, -+ struct cryptodev_pkc, list); -+ list_del(&pkc->list); -+ spin_unlock_irqrestore(&pcr->completion_lock, flags); -+ ret = crypto_async_fetch_asym(pkc); -+ -+ /* Reflect the updated request to user-space */ -+ if (!ret) -+ kop_to_user(&pkc->kop, arg); -+ kfree(pkc); -+ } -+ return ret; - default: - return -EINVAL; - } -@@ -1078,9 +1256,11 @@ static unsigned int cryptodev_poll(struct file *file, poll_table *wait) - - poll_wait(file, &pcr->user_waiter, wait); - -- if (!list_empty_careful(&pcr->done.list)) -+ if (!list_empty_careful(&pcr->done.list) || -+ !list_empty_careful(&pcr->asym_completed_list)) - ret |= POLLIN | POLLRDNORM; -- if (!list_empty_careful(&pcr->free.list) || pcr->itemcount < MAX_COP_RINGSIZE) -+ if (!list_empty_careful(&pcr->free.list) || -+ pcr->itemcount < MAX_COP_RINGSIZE) - ret |= POLLOUT | POLLWRNORM; - - return ret; -diff --git a/main.c b/main.c -index 57e5c38..0b7951e 100644 ---- a/main.c -+++ b/main.c -@@ -181,6 +181,384 @@ __crypto_run_zc(struct csession *ses_ptr, struct kernel_crypt_op *kcop) - return ret; - } - -+int crypto_kop_dsasign(struct cryptodev_pkc *pkc) -+{ -+ struct kernel_crypt_kop *kop = &pkc->kop; -+ struct crypt_kop *cop = &kop->kop; -+ struct pkc_request *pkc_req = &pkc->req; -+ struct dsa_sign_req_s *dsa_req = &pkc_req->req_u.dsa_sign; -+ int rc, buf_size; -+ uint8_t *buf; -+ -+ if (!cop->crk_param[0].crp_nbits || !cop->crk_param[1].crp_nbits || -+ !cop->crk_param[2].crp_nbits || !cop->crk_param[3].crp_nbits || -+ !cop->crk_param[4].crp_nbits || !cop->crk_param[5].crp_nbits || -+ !cop->crk_param[6].crp_nbits || (cop->crk_iparams == 6 && -+ !cop->crk_param[7].crp_nbits)) -+ return -EINVAL; -+ -+ dsa_req->m_len = (cop->crk_param[0].crp_nbits + 7)/8; -+ dsa_req->q_len = (cop->crk_param[1].crp_nbits + 7)/8; -+ dsa_req->r_len = (cop->crk_param[2].crp_nbits + 7)/8; -+ dsa_req->g_len = (cop->crk_param[3].crp_nbits + 7)/8; -+ dsa_req->priv_key_len = (cop->crk_param[4].crp_nbits + 7)/8; -+ dsa_req->d_len = (cop->crk_param[6].crp_nbits + 7)/8; -+ buf_size = dsa_req->m_len + dsa_req->q_len + dsa_req->r_len + -+ dsa_req->g_len + dsa_req->priv_key_len + dsa_req->d_len + -+ dsa_req->d_len; -+ if (cop->crk_iparams == 6) { -+ dsa_req->ab_len = (cop->crk_param[5].crp_nbits + 7)/8; -+ buf_size += dsa_req->ab_len; -+ pkc_req->type = ECDSA_SIGN; -+ pkc_req->curve_type = cop->curve_type; -+ } else { -+ pkc_req->type = DSA_SIGN; -+ } -+ -+ buf = kzalloc(buf_size, GFP_DMA); -+ -+ dsa_req->q = buf; -+ dsa_req->r = dsa_req->q + dsa_req->q_len; -+ dsa_req->g = dsa_req->r + dsa_req->r_len; -+ dsa_req->priv_key = dsa_req->g + dsa_req->g_len; -+ dsa_req->m = dsa_req->priv_key + dsa_req->priv_key_len; -+ dsa_req->c = dsa_req->m + dsa_req->m_len; -+ dsa_req->d = dsa_req->c + dsa_req->d_len; -+ copy_from_user(dsa_req->m, cop->crk_param[0].crp_p, dsa_req->m_len); -+ copy_from_user(dsa_req->q, cop->crk_param[1].crp_p, dsa_req->q_len); -+ copy_from_user(dsa_req->r, cop->crk_param[2].crp_p, dsa_req->r_len); -+ copy_from_user(dsa_req->g, cop->crk_param[3].crp_p, dsa_req->g_len); -+ copy_from_user(dsa_req->priv_key, cop->crk_param[4].crp_p, -+ dsa_req->priv_key_len); -+ if (cop->crk_iparams == 6) { -+ dsa_req->ab = dsa_req->d + dsa_req->d_len; -+ copy_from_user(dsa_req->ab, cop->crk_param[5].crp_p, -+ dsa_req->ab_len); -+ } -+ rc = cryptodev_pkc_offload(pkc); -+ if (pkc->type == SYNCHRONOUS) { -+ if (rc) -+ goto err; -+ if (cop->crk_iparams == 6) { -+ copy_to_user(cop->crk_param[6].crp_p, dsa_req->c, -+ dsa_req->d_len); -+ copy_to_user(cop->crk_param[7].crp_p, dsa_req->d, -+ dsa_req->d_len); -+ } else { -+ copy_to_user(cop->crk_param[5].crp_p, dsa_req->c, -+ dsa_req->d_len); -+ copy_to_user(cop->crk_param[6].crp_p, dsa_req->d, -+ dsa_req->d_len); -+ } -+ } else { -+ if (rc != -EINPROGRESS && rc != 0) -+ goto err; -+ -+ pkc->cookie = buf; -+ return rc; -+ } -+err: -+ kfree(buf); -+ return rc; -+} -+ -+int crypto_kop_dsaverify(struct cryptodev_pkc *pkc) -+{ -+ struct kernel_crypt_kop *kop = &pkc->kop; -+ struct crypt_kop *cop = &kop->kop; -+ struct pkc_request *pkc_req; -+ struct dsa_verify_req_s *dsa_req; -+ int rc, buf_size; -+ uint8_t *buf; -+ -+ if (!cop->crk_param[0].crp_nbits || !cop->crk_param[1].crp_nbits || -+ !cop->crk_param[2].crp_nbits || !cop->crk_param[3].crp_nbits || -+ !cop->crk_param[4].crp_nbits || !cop->crk_param[5].crp_nbits || -+ !cop->crk_param[6].crp_nbits || (cop->crk_iparams == 8 && -+ !cop->crk_param[7].crp_nbits)) -+ return -EINVAL; -+ -+ pkc_req = &pkc->req; -+ dsa_req = &pkc_req->req_u.dsa_verify; -+ dsa_req->m_len = (cop->crk_param[0].crp_nbits + 7)/8; -+ dsa_req->q_len = (cop->crk_param[1].crp_nbits + 7)/8; -+ dsa_req->r_len = (cop->crk_param[2].crp_nbits + 7)/8; -+ dsa_req->g_len = (cop->crk_param[3].crp_nbits + 7)/8; -+ dsa_req->pub_key_len = (cop->crk_param[4].crp_nbits + 7)/8; -+ dsa_req->d_len = (cop->crk_param[6].crp_nbits + 7)/8; -+ buf_size = dsa_req->m_len + dsa_req->q_len + dsa_req->r_len + -+ dsa_req->g_len + dsa_req->pub_key_len + dsa_req->d_len + -+ dsa_req->d_len; -+ if (cop->crk_iparams == 8) { -+ dsa_req->ab_len = (cop->crk_param[5].crp_nbits + 7)/8; -+ buf_size += dsa_req->ab_len; -+ pkc_req->type = ECDSA_VERIFY; -+ pkc_req->curve_type = cop->curve_type; -+ } else { -+ pkc_req->type = DSA_VERIFY; -+ } -+ -+ buf = kzalloc(buf_size, GFP_DMA); -+ -+ dsa_req->q = buf; -+ dsa_req->r = dsa_req->q + dsa_req->q_len; -+ dsa_req->g = dsa_req->r + dsa_req->r_len; -+ dsa_req->pub_key = dsa_req->g + dsa_req->g_len; -+ dsa_req->m = dsa_req->pub_key + dsa_req->pub_key_len; -+ dsa_req->c = dsa_req->m + dsa_req->m_len; -+ dsa_req->d = dsa_req->c + dsa_req->d_len; -+ copy_from_user(dsa_req->m, cop->crk_param[0].crp_p, dsa_req->m_len); -+ copy_from_user(dsa_req->q, cop->crk_param[1].crp_p, dsa_req->q_len); -+ copy_from_user(dsa_req->r, cop->crk_param[2].crp_p, dsa_req->r_len); -+ copy_from_user(dsa_req->g, cop->crk_param[3].crp_p, dsa_req->g_len); -+ copy_from_user(dsa_req->pub_key, cop->crk_param[4].crp_p, -+ dsa_req->pub_key_len); -+ if (cop->crk_iparams == 8) { -+ dsa_req->ab = dsa_req->d + dsa_req->d_len; -+ copy_from_user(dsa_req->ab, cop->crk_param[5].crp_p, -+ dsa_req->ab_len); -+ copy_from_user(dsa_req->c, cop->crk_param[6].crp_p, -+ dsa_req->d_len); -+ copy_from_user(dsa_req->d, cop->crk_param[7].crp_p, -+ dsa_req->d_len); -+ } else { -+ copy_from_user(dsa_req->c, cop->crk_param[5].crp_p, -+ dsa_req->d_len); -+ copy_from_user(dsa_req->d, cop->crk_param[6].crp_p, -+ dsa_req->d_len); -+ } -+ rc = cryptodev_pkc_offload(pkc); -+ if (pkc->type == SYNCHRONOUS) { -+ if (rc) -+ goto err; -+ } else { -+ if (rc != -EINPROGRESS && !rc) -+ goto err; -+ pkc->cookie = buf; -+ return rc; -+ } -+err: -+ kfree(buf); -+ return rc; -+} -+ -+int crypto_kop_dh_key(struct cryptodev_pkc *pkc) -+{ -+ struct kernel_crypt_kop *kop = &pkc->kop; -+ struct crypt_kop *cop = &kop->kop; -+ struct pkc_request *pkc_req; -+ struct dh_key_req_s *dh_req; -+ int buf_size; -+ uint8_t *buf; -+ int rc = -EINVAL; -+ -+ pkc_req = &pkc->req; -+ dh_req = &pkc_req->req_u.dh_req; -+ dh_req->s_len = (cop->crk_param[0].crp_nbits + 7)/8; -+ dh_req->pub_key_len = (cop->crk_param[1].crp_nbits + 7)/8; -+ dh_req->q_len = (cop->crk_param[2].crp_nbits + 7)/8; -+ buf_size = dh_req->q_len + dh_req->pub_key_len + dh_req->s_len; -+ if (cop->crk_iparams == 4) { -+ pkc_req->type = ECDH_COMPUTE_KEY; -+ dh_req->ab_len = (cop->crk_param[3].crp_nbits + 7)/8; -+ dh_req->z_len = (cop->crk_param[4].crp_nbits + 7)/8; -+ buf_size += dh_req->ab_len; -+ } else { -+ dh_req->z_len = (cop->crk_param[3].crp_nbits + 7)/8; -+ pkc_req->type = DH_COMPUTE_KEY; -+ } -+ buf_size += dh_req->z_len; -+ buf = kzalloc(buf_size, GFP_DMA); -+ dh_req->q = buf; -+ dh_req->s = dh_req->q + dh_req->q_len; -+ dh_req->pub_key = dh_req->s + dh_req->s_len; -+ dh_req->z = dh_req->pub_key + dh_req->pub_key_len; -+ if (cop->crk_iparams == 4) { -+ dh_req->ab = dh_req->z + dh_req->z_len; -+ pkc_req->curve_type = cop->curve_type; -+ copy_from_user(dh_req->ab, cop->crk_param[3].crp_p, -+ dh_req->ab_len); -+ } -+ copy_from_user(dh_req->s, cop->crk_param[0].crp_p, dh_req->s_len); -+ copy_from_user(dh_req->pub_key, cop->crk_param[1].crp_p, -+ dh_req->pub_key_len); -+ copy_from_user(dh_req->q, cop->crk_param[2].crp_p, dh_req->q_len); -+ rc = cryptodev_pkc_offload(pkc); -+ if (pkc->type == SYNCHRONOUS) { -+ if (rc) -+ goto err; -+ if (cop->crk_iparams == 4) -+ copy_to_user(cop->crk_param[4].crp_p, dh_req->z, -+ dh_req->z_len); -+ else -+ copy_to_user(cop->crk_param[3].crp_p, dh_req->z, -+ dh_req->z_len); -+ } else { -+ if (rc != -EINPROGRESS && rc != 0) -+ goto err; -+ -+ pkc->cookie = buf; -+ return rc; -+ } -+err: -+ kfree(buf); -+ return rc; -+} -+ -+int crypto_modexp_crt(struct cryptodev_pkc *pkc) -+{ -+ struct kernel_crypt_kop *kop = &pkc->kop; -+ struct crypt_kop *cop = &kop->kop; -+ struct pkc_request *pkc_req; -+ struct rsa_priv_frm3_req_s *rsa_req; -+ int rc; -+ uint8_t *buf; -+ -+ if (!cop->crk_param[0].crp_nbits || !cop->crk_param[1].crp_nbits || -+ !cop->crk_param[2].crp_nbits || !cop->crk_param[3].crp_nbits || -+ !cop->crk_param[4].crp_nbits || !cop->crk_param[5].crp_nbits) -+ return -EINVAL; -+ -+ pkc_req = &pkc->req; -+ pkc_req->type = RSA_PRIV_FORM3; -+ rsa_req = &pkc_req->req_u.rsa_priv_f3; -+ rsa_req->p_len = (cop->crk_param[0].crp_nbits + 7)/8; -+ rsa_req->q_len = (cop->crk_param[1].crp_nbits + 7)/8; -+ rsa_req->g_len = (cop->crk_param[2].crp_nbits + 7)/8; -+ rsa_req->dp_len = (cop->crk_param[3].crp_nbits + 7)/8; -+ rsa_req->dq_len = (cop->crk_param[4].crp_nbits + 7)/8; -+ rsa_req->c_len = (cop->crk_param[5].crp_nbits + 7)/8; -+ rsa_req->f_len = (cop->crk_param[6].crp_nbits + 7)/8; -+ buf = kzalloc(rsa_req->p_len + rsa_req->q_len + rsa_req->f_len + -+ rsa_req->dp_len + rsa_req->dp_len + rsa_req->c_len + -+ rsa_req->g_len, GFP_DMA); -+ rsa_req->p = buf; -+ rsa_req->q = rsa_req->p + rsa_req->p_len; -+ rsa_req->g = rsa_req->q + rsa_req->q_len; -+ rsa_req->dp = rsa_req->g + rsa_req->g_len; -+ rsa_req->dq = rsa_req->dp + rsa_req->dp_len; -+ rsa_req->c = rsa_req->dq + rsa_req->dq_len; -+ rsa_req->f = rsa_req->c + rsa_req->c_len; -+ copy_from_user(rsa_req->p, cop->crk_param[0].crp_p, rsa_req->p_len); -+ copy_from_user(rsa_req->q, cop->crk_param[1].crp_p, rsa_req->q_len); -+ copy_from_user(rsa_req->g, cop->crk_param[2].crp_p, rsa_req->g_len); -+ copy_from_user(rsa_req->dp, cop->crk_param[3].crp_p, rsa_req->dp_len); -+ copy_from_user(rsa_req->dq, cop->crk_param[4].crp_p, rsa_req->dq_len); -+ copy_from_user(rsa_req->c, cop->crk_param[5].crp_p, rsa_req->c_len); -+ rc = cryptodev_pkc_offload(pkc); -+ -+ if (pkc->type == SYNCHRONOUS) { -+ if (rc) -+ goto err; -+ copy_to_user(cop->crk_param[6].crp_p, rsa_req->f, -+ rsa_req->f_len); -+ } else { -+ if (rc != -EINPROGRESS && rc != 0) -+ goto err; -+ -+ pkc->cookie = buf; -+ return rc; -+ } -+err: -+ kfree(buf); -+ return rc; -+} -+ -+int crypto_bn_modexp(struct cryptodev_pkc *pkc) -+{ -+ struct pkc_request *pkc_req; -+ struct rsa_pub_req_s *rsa_req; -+ int rc; -+ struct kernel_crypt_kop *kop = &pkc->kop; -+ struct crypt_kop *cop = &kop->kop; -+ uint8_t *buf; -+ -+ if (!cop->crk_param[0].crp_nbits || !cop->crk_param[1].crp_nbits || -+ !cop->crk_param[2].crp_nbits || !cop->crk_param[3].crp_nbits) -+ return -EINVAL; -+ -+ pkc_req = &pkc->req; -+ pkc_req->type = RSA_PUB; -+ rsa_req = &pkc_req->req_u.rsa_pub_req; -+ rsa_req->f_len = (cop->crk_param[0].crp_nbits + 7)/8; -+ rsa_req->e_len = (cop->crk_param[1].crp_nbits + 7)/8; -+ rsa_req->n_len = (cop->crk_param[2].crp_nbits + 7)/8; -+ rsa_req->g_len = (cop->crk_param[3].crp_nbits + 7)/8; -+ buf = kzalloc(rsa_req->f_len + rsa_req->e_len + rsa_req->n_len -+ + rsa_req->g_len, GFP_DMA); -+ if (!buf) -+ return -ENOMEM; -+ -+ rsa_req->e = buf; -+ rsa_req->f = rsa_req->e + rsa_req->e_len; -+ rsa_req->g = rsa_req->f + rsa_req->f_len; -+ rsa_req->n = rsa_req->g + rsa_req->g_len; -+ copy_from_user(rsa_req->f, cop->crk_param[0].crp_p, rsa_req->f_len); -+ copy_from_user(rsa_req->e, cop->crk_param[1].crp_p, rsa_req->e_len); -+ copy_from_user(rsa_req->n, cop->crk_param[2].crp_p, rsa_req->n_len); -+ rc = cryptodev_pkc_offload(pkc); -+ if (pkc->type == SYNCHRONOUS) { -+ if (rc) -+ goto err; -+ -+ copy_to_user(cop->crk_param[3].crp_p, rsa_req->g, -+ rsa_req->g_len); -+ } else { -+ if (rc != -EINPROGRESS && rc != 0) -+ goto err; -+ -+ /* This one will be freed later in fetch handler */ -+ pkc->cookie = buf; -+ return rc; -+ } -+err: -+ kfree(buf); -+ return rc; -+} -+ -+int crypto_run_asym(struct cryptodev_pkc *pkc) -+{ -+ int ret = -EINVAL; -+ struct kernel_crypt_kop *kop = &pkc->kop; -+ -+ switch (kop->kop.crk_op) { -+ case CRK_MOD_EXP: -+ if (kop->kop.crk_iparams != 3 && kop->kop.crk_oparams != 1) -+ goto err; -+ -+ ret = crypto_bn_modexp(pkc); -+ break; -+ case CRK_MOD_EXP_CRT: -+ if (kop->kop.crk_iparams != 6 && kop->kop.crk_oparams != 1) -+ goto err; -+ -+ ret = crypto_modexp_crt(pkc); -+ break; -+ case CRK_DSA_SIGN: -+ if ((kop->kop.crk_iparams != 5 && kop->kop.crk_iparams != 6) || -+ kop->kop.crk_oparams != 2) -+ goto err; -+ -+ ret = crypto_kop_dsasign(pkc); -+ break; -+ case CRK_DSA_VERIFY: -+ if ((kop->kop.crk_iparams != 7 && kop->kop.crk_iparams != 8) || -+ kop->kop.crk_oparams != 0) -+ goto err; -+ -+ ret = crypto_kop_dsaverify(pkc); -+ break; -+ case CRK_DH_COMPUTE_KEY: -+ if ((kop->kop.crk_iparams != 3 && kop->kop.crk_iparams != 4) || -+ kop->kop.crk_oparams != 1) -+ goto err; -+ ret = crypto_kop_dh_key(pkc); -+ break; -+ } -+err: -+ return ret; -+} -+ - int crypto_run(struct fcrypt *fcr, struct kernel_crypt_op *kcop) - { - struct csession *ses_ptr; --- -1.7.9.7 - diff --git a/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0010-Compat-versions-of-PKC-IOCTLs.patch b/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0010-Compat-versions-of-PKC-IOCTLs.patch deleted file mode 100644 index 03204625..00000000 --- a/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0010-Compat-versions-of-PKC-IOCTLs.patch +++ /dev/null @@ -1,200 +0,0 @@ -From f6550035fe2c0e66798ace17d31d1d880beacc14 Mon Sep 17 00:00:00 2001 -From: Yashpal Dutta -Date: Fri, 7 Mar 2014 06:52:13 +0545 -Subject: [[Patch][fsl 10/16] Compat versions of PKC IOCTLs - -Upstream-status: Pending - -Signed-off-by: Yashpal Dutta ---- - cryptodev_int.h | 20 ++++++++++ - ioctl.c | 120 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 2 files changed, 140 insertions(+) - -diff --git a/cryptodev_int.h b/cryptodev_int.h -index b08c253..229fcd0 100644 ---- a/cryptodev_int.h -+++ b/cryptodev_int.h -@@ -75,6 +75,24 @@ struct compat_crypt_op { - compat_uptr_t iv;/* initialization vector for encryption operations */ - }; - -+/* input of CIOCKEY */ -+struct compat_crparam { -+ compat_uptr_t crp_p; -+ uint32_t crp_nbits; -+}; -+ -+struct compat_crypt_kop { -+ uint32_t crk_op; /* cryptodev_crk_ot_t */ -+ uint32_t crk_status; -+ uint16_t crk_iparams; -+ uint16_t crk_oparams; -+ uint32_t crk_pad1; -+ struct compat_crparam crk_param[CRK_MAXPARAM]; -+ enum curve_t curve_type; /* 0 == Discrete Log, 1 = EC_PRIME, -+ 2 = EC_BINARY */ -+ compat_uptr_t cookie; -+}; -+ - /* input of CIOCAUTHCRYPT */ - struct compat_crypt_auth_op { - uint32_t ses; /* session identifier */ -@@ -112,6 +130,8 @@ struct compat_crypt_auth_op { - #define COMPAT_CIOCASYNCCRYPT _IOW('c', 107, struct compat_crypt_op) - #define COMPAT_CIOCASYNCFETCH _IOR('c', 108, struct compat_crypt_op) - #define COMPAT_CIOCAUTHCRYPT _IOWR('c', 109, struct compat_crypt_auth_op) -+#define COMPAT_CIOCASYMASYNCRYPT _IOW('c', 110, struct compat_crypt_kop) -+#define COMPAT_CIOCASYMASYNFETCH _IOR('c', 111, struct compat_crypt_kop) - - #endif /* CONFIG_COMPAT */ - -diff --git a/ioctl.c b/ioctl.c -index 44070e1..ec82c69 100644 ---- a/ioctl.c -+++ b/ioctl.c -@@ -1076,6 +1076,68 @@ cryptodev_ioctl(struct file *filp, unsigned int cmd, unsigned long arg_) - /* compatibility code for 32bit userlands */ - #ifdef CONFIG_COMPAT - -+static inline void compat_to_crypt_kop(struct compat_crypt_kop *compat, -+ struct crypt_kop *kop) -+{ -+ int i; -+ kop->crk_op = compat->crk_op; -+ kop->crk_status = compat->crk_status; -+ kop->crk_iparams = compat->crk_iparams; -+ kop->crk_oparams = compat->crk_oparams; -+ -+ for (i = 0; i < CRK_MAXPARAM; i++) { -+ kop->crk_param[i].crp_p = -+ compat_ptr(compat->crk_param[i].crp_p); -+ kop->crk_param[i].crp_nbits = compat->crk_param[i].crp_nbits; -+ } -+ -+ kop->curve_type = compat->curve_type; -+ kop->cookie = compat->cookie; -+} -+ -+static int compat_kop_from_user(struct kernel_crypt_kop *kop, -+ void __user *arg) -+{ -+ struct compat_crypt_kop compat_kop; -+ -+ if (unlikely(copy_from_user(&compat_kop, arg, sizeof(compat_kop)))) -+ return -EFAULT; -+ -+ compat_to_crypt_kop(&compat_kop, &kop->kop); -+ return fill_kop_from_cop(kop); -+} -+ -+static inline void crypt_kop_to_compat(struct crypt_kop *kop, -+ struct compat_crypt_kop *compat) -+{ -+ int i; -+ -+ compat->crk_op = kop->crk_op; -+ compat->crk_status = kop->crk_status; -+ compat->crk_iparams = kop->crk_iparams; -+ compat->crk_oparams = kop->crk_oparams; -+ -+ for (i = 0; i < CRK_MAXPARAM; i++) { -+ compat->crk_param[i].crp_p = -+ ptr_to_compat(kop->crk_param[i].crp_p); -+ compat->crk_param[i].crp_nbits = kop->crk_param[i].crp_nbits; -+ } -+ compat->cookie = kop->cookie; -+ compat->curve_type = kop->curve_type; -+} -+ -+static int compat_kop_to_user(struct kernel_crypt_kop *kop, void __user *arg) -+{ -+ struct compat_crypt_kop compat_kop; -+ -+ crypt_kop_to_compat(&kop->kop, &compat_kop); -+ if (unlikely(copy_to_user(arg, &compat_kop, sizeof(compat_kop)))) { -+ dprintk(1, KERN_ERR, "Cannot copy to userspace\n"); -+ return -EFAULT; -+ } -+ return 0; -+} -+ - static inline void - compat_to_session_op(struct compat_session_op *compat, struct session_op *sop) - { -@@ -1203,7 +1265,26 @@ cryptodev_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg_) - return -EFAULT; - } - return ret; -+ case COMPAT_CIOCKEY: -+ { -+ struct cryptodev_pkc *pkc = -+ kzalloc(sizeof(struct cryptodev_pkc), GFP_KERNEL); -+ -+ if (!pkc) -+ return -ENOMEM; -+ -+ ret = compat_kop_from_user(&pkc->kop, arg); -+ -+ if (unlikely(ret)) { -+ kfree(pkc); -+ return ret; -+ } - -+ pkc->type = SYNCHRONOUS; -+ ret = crypto_run_asym(pkc); -+ kfree(pkc); -+ } -+ return ret; - case COMPAT_CIOCCRYPT: - ret = compat_kcop_from_user(&kcop, fcr, arg); - if (unlikely(ret)) -@@ -1242,6 +1323,45 @@ cryptodev_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg_) - - return compat_kcop_to_user(&kcop, fcr, arg); - #endif -+ case COMPAT_CIOCASYMASYNCRYPT: -+ { -+ struct cryptodev_pkc *pkc = -+ kzalloc(sizeof(struct cryptodev_pkc), GFP_KERNEL); -+ -+ ret = compat_kop_from_user(&pkc->kop, arg); -+ if (unlikely(ret)) -+ return -EINVAL; -+ -+ /* Store associated FD priv data with asymmetric request */ -+ pkc->priv = pcr; -+ pkc->type = ASYNCHRONOUS; -+ ret = crypto_run_asym(pkc); -+ if (ret == -EINPROGRESS) -+ ret = 0; -+ } -+ return ret; -+ case COMPAT_CIOCASYMASYNFETCH: -+ { -+ struct cryptodev_pkc *pkc; -+ unsigned long flags; -+ -+ spin_lock_irqsave(&pcr->completion_lock, flags); -+ if (list_empty(&pcr->asym_completed_list)) { -+ spin_unlock_irqrestore(&pcr->completion_lock, flags); -+ return -ENOMEM; -+ } -+ pkc = list_first_entry(&pcr->asym_completed_list, -+ struct cryptodev_pkc, list); -+ list_del(&pkc->list); -+ spin_unlock_irqrestore(&pcr->completion_lock, flags); -+ ret = crypto_async_fetch_asym(pkc); -+ -+ /* Reflect the updated request to user-space */ -+ if (!ret) -+ compat_kop_to_user(&pkc->kop, arg); -+ kfree(pkc); -+ } -+ return ret; - default: - return -EINVAL; - } --- -1.7.9.7 - diff --git a/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0011-Asynchronous-interface-changes-in-cryptodev.patch b/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0011-Asynchronous-interface-changes-in-cryptodev.patch deleted file mode 100644 index 5331abc6..00000000 --- a/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0011-Asynchronous-interface-changes-in-cryptodev.patch +++ /dev/null @@ -1,213 +0,0 @@ -From ffa8fd090afaf3631e6abd0ab8daa6780be7c31c Mon Sep 17 00:00:00 2001 -From: Yashpal Dutta -Date: Fri, 7 Mar 2014 07:24:00 +0545 -Subject: [[Patch][fsl 11/16] Asynchronous interface changes in cryptodev - -Upstream-status: Pending - -Signed-off-by: Yashpal Dutta ---- - cryptlib.h | 7 ++++- - crypto/cryptodev.h | 10 ++++++- - cryptodev_int.h | 10 ++++++- - ioctl.c | 76 +++++++++++++++++++++++++++++++++++----------------- - 4 files changed, 76 insertions(+), 27 deletions(-) - -diff --git a/cryptlib.h b/cryptlib.h -index e77edc5..947d845 100644 ---- a/cryptlib.h -+++ b/cryptlib.h -@@ -113,7 +113,12 @@ struct cryptodev_pkc { - struct pkc_request req; /* PKC request structure allocated - from CryptoAPI */ - enum offload_type type; /* Synchronous Vs Asynchronous request */ -- void *cookie; /*Additional opaque cookie to be used in future */ -+ /* -+ * cookie used for transfering tranparent information from async -+ * submission to async fetch. Currently some dynamic allocated -+ * buffers are maintained which will be freed later during fetch -+ */ -+ void *cookie; - struct crypt_priv *priv; - }; - -diff --git a/crypto/cryptodev.h b/crypto/cryptodev.h -index 575ce63..0d65899 100644 ---- a/crypto/cryptodev.h -+++ b/crypto/cryptodev.h -@@ -255,6 +255,14 @@ struct crypt_kop { - void *cookie; - }; - -+#define MAX_COOKIES 4 -+ -+struct pkc_cookie_list_s { -+ int cookie_available; -+ void *cookie[MAX_COOKIES]; -+ int status[MAX_COOKIES]; -+}; -+ - enum cryptodev_crk_op_t { - CRK_MOD_EXP = 0, - CRK_MOD_EXP_CRT = 1, -@@ -299,5 +307,5 @@ enum cryptodev_crk_op_t { - #define CIOCASYNCFETCH _IOR('c', 111, struct crypt_op) - /* additional ioctls for asynchronous operation for asymmetric ciphers*/ - #define CIOCASYMASYNCRYPT _IOW('c', 112, struct crypt_kop) --#define CIOCASYMASYNFETCH _IOR('c', 113, struct crypt_kop) -+#define CIOCASYMFETCHCOOKIE _IOR('c', 113, struct pkc_cookie_list_s) - #endif /* L_CRYPTODEV_H */ -diff --git a/cryptodev_int.h b/cryptodev_int.h -index 229fcd0..8beeef0 100644 ---- a/cryptodev_int.h -+++ b/cryptodev_int.h -@@ -93,6 +93,12 @@ struct compat_crypt_kop { - compat_uptr_t cookie; - }; - -+struct compat_pkc_cookie_list_s { -+ int cookie_available; -+ compat_uptr_t cookie[MAX_COOKIES]; -+ int status[MAX_COOKIES]; -+}; -+ - /* input of CIOCAUTHCRYPT */ - struct compat_crypt_auth_op { - uint32_t ses; /* session identifier */ -@@ -127,11 +133,13 @@ struct compat_crypt_auth_op { - /* compat ioctls, defined for the above structs */ - #define COMPAT_CIOCGSESSION _IOWR('c', 102, struct compat_session_op) - #define COMPAT_CIOCCRYPT _IOWR('c', 104, struct compat_crypt_op) -+#define COMPAT_CIOCKEY _IOW('c', 105, struct compat_crypt_kop) - #define COMPAT_CIOCASYNCCRYPT _IOW('c', 107, struct compat_crypt_op) - #define COMPAT_CIOCASYNCFETCH _IOR('c', 108, struct compat_crypt_op) - #define COMPAT_CIOCAUTHCRYPT _IOWR('c', 109, struct compat_crypt_auth_op) - #define COMPAT_CIOCASYMASYNCRYPT _IOW('c', 110, struct compat_crypt_kop) --#define COMPAT_CIOCASYMASYNFETCH _IOR('c', 111, struct compat_crypt_kop) -+#define COMPAT_CIOCASYMFETCHCOOKIE _IOR('c', 111, \ -+ struct compat_pkc_cookie_list_s) - - #endif /* CONFIG_COMPAT */ - -diff --git a/ioctl.c b/ioctl.c -index ec82c69..9f57d46 100644 ---- a/ioctl.c -+++ b/ioctl.c -@@ -103,8 +103,6 @@ void cryptodev_complete_asym(struct crypto_async_request *req, int err) - crypto_free_pkc(pkc->s); - res->err = err; - if (pkc->type == SYNCHRONOUS) { -- if (err == -EINPROGRESS) -- return; - complete(&res->completion); - } else { - struct crypt_priv *pcr = pkc->priv; -@@ -1046,26 +1044,41 @@ cryptodev_ioctl(struct file *filp, unsigned int cmd, unsigned long arg_) - ret = 0; - } - return ret; -- case CIOCASYMASYNFETCH: -+ case CIOCASYMFETCHCOOKIE: - { - struct cryptodev_pkc *pkc; - unsigned long flags; -+ int i; -+ struct pkc_cookie_list_s cookie_list; - - spin_lock_irqsave(&pcr->completion_lock, flags); -- if (list_empty(&pcr->asym_completed_list)) { -- spin_unlock_irqrestore(&pcr->completion_lock, flags); -- return -ENOMEM; -+ cookie_list.cookie_available = 0; -+ for (i = 0; i < MAX_COOKIES; i++) { -+ if (!list_empty(&pcr->asym_completed_list)) { -+ /* Run a loop in the list for upto elements -+ and copy their response back */ -+ pkc = -+ list_first_entry(&pcr->asym_completed_list, -+ struct cryptodev_pkc, list); -+ list_del(&pkc->list); -+ ret = crypto_async_fetch_asym(pkc); -+ if (!ret) { -+ cookie_list.cookie_available++; -+ cookie_list.cookie[i] = -+ pkc->kop.kop.cookie; -+ cookie_list.status[i] = pkc->result.err; -+ } -+ kfree(pkc); -+ } else { -+ break; -+ } - } -- pkc = list_first_entry(&pcr->asym_completed_list, -- struct cryptodev_pkc, list); -- list_del(&pkc->list); - spin_unlock_irqrestore(&pcr->completion_lock, flags); -- ret = crypto_async_fetch_asym(pkc); - - /* Reflect the updated request to user-space */ -- if (!ret) -- kop_to_user(&pkc->kop, arg); -- kfree(pkc); -+ if (cookie_list.cookie_available) -+ copy_to_user(arg, &cookie_list, -+ sizeof(struct pkc_cookie_list_s)); - } - return ret; - default: -@@ -1340,26 +1353,41 @@ cryptodev_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg_) - ret = 0; - } - return ret; -- case COMPAT_CIOCASYMASYNFETCH: -+ case COMPAT_CIOCASYMFETCHCOOKIE: - { - struct cryptodev_pkc *pkc; - unsigned long flags; -+ int i = 0; -+ struct compat_pkc_cookie_list_s cookie_list; - - spin_lock_irqsave(&pcr->completion_lock, flags); -- if (list_empty(&pcr->asym_completed_list)) { -- spin_unlock_irqrestore(&pcr->completion_lock, flags); -- return -ENOMEM; -+ cookie_list.cookie_available = 0; -+ -+ for (i = 0; i < MAX_COOKIES; i++) { -+ if (!list_empty(&pcr->asym_completed_list)) { -+ /* Run a loop in the list for upto elements -+ and copy their response back */ -+ pkc = -+ list_first_entry(&pcr->asym_completed_list, -+ struct cryptodev_pkc, list); -+ list_del(&pkc->list); -+ ret = crypto_async_fetch_asym(pkc); -+ if (!ret) { -+ cookie_list.cookie_available++; -+ cookie_list.cookie[i] = -+ pkc->kop.kop.cookie; -+ } -+ kfree(pkc); -+ } else { -+ break; -+ } - } -- pkc = list_first_entry(&pcr->asym_completed_list, -- struct cryptodev_pkc, list); -- list_del(&pkc->list); - spin_unlock_irqrestore(&pcr->completion_lock, flags); -- ret = crypto_async_fetch_asym(pkc); - - /* Reflect the updated request to user-space */ -- if (!ret) -- compat_kop_to_user(&pkc->kop, arg); -- kfree(pkc); -+ if (cookie_list.cookie_available) -+ copy_to_user(arg, &cookie_list, -+ sizeof(struct compat_pkc_cookie_list_s)); - } - return ret; - default: --- -1.7.9.7 - diff --git a/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0012-ECC_KEYGEN-and-DLC_KEYGEN-supported-in-cryptodev-mod.patch b/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0012-ECC_KEYGEN-and-DLC_KEYGEN-supported-in-cryptodev-mod.patch deleted file mode 100644 index acb5bea7..00000000 --- a/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0012-ECC_KEYGEN-and-DLC_KEYGEN-supported-in-cryptodev-mod.patch +++ /dev/null @@ -1,213 +0,0 @@ -From bda8dd5839da7a8e731b60b64b9fcb531c334b99 Mon Sep 17 00:00:00 2001 -From: Yashpal Dutta -Date: Fri, 7 Mar 2014 07:53:53 +0545 -Subject: [[Patch][fsl 12/16] ECC_KEYGEN and DLC_KEYGEN supported in cryptodev - module - -Upstream-status: Pending - -Signed-off-by: Yashpal Dutta ---- - cryptlib.c | 2 ++ - crypto/cryptodev.h | 5 +++- - ioctl.c | 29 ++++++++++++++++-- - main.c | 85 ++++++++++++++++++++++++++++++++++++++++++++++++++++ - 4 files changed, 118 insertions(+), 3 deletions(-) - -diff --git a/cryptlib.c b/cryptlib.c -index fa0b63f..41acb2c 100644 ---- a/cryptlib.c -+++ b/cryptlib.c -@@ -437,6 +437,8 @@ int cryptodev_pkc_offload(struct cryptodev_pkc *pkc) - case DSA_VERIFY: - case ECDSA_SIGN: - case ECDSA_VERIFY: -+ case DLC_KEYGEN: -+ case ECC_KEYGEN: - pkc->s = crypto_alloc_pkc("pkc(dsa)", - CRYPTO_ALG_TYPE_PKC_DSA, 0); - break; -diff --git a/crypto/cryptodev.h b/crypto/cryptodev.h -index 0d65899..33cca2e 100644 ---- a/crypto/cryptodev.h -+++ b/crypto/cryptodev.h -@@ -269,6 +269,8 @@ enum cryptodev_crk_op_t { - CRK_DSA_SIGN = 2, - CRK_DSA_VERIFY = 3, - CRK_DH_COMPUTE_KEY = 4, -+ CRK_DSA_GENERATE_KEY = 5, -+ CRK_DH_GENERATE_KEY = 6, - CRK_ALGORITHM_ALL - }; - -@@ -281,7 +283,8 @@ enum cryptodev_crk_op_t { - #define CRF_DSA_SIGN (1 << CRK_DSA_SIGN) - #define CRF_DSA_VERIFY (1 << CRK_DSA_VERIFY) - #define CRF_DH_COMPUTE_KEY (1 << CRK_DH_COMPUTE_KEY) -- -+#define CRF_DSA_GENERATE_KEY (1 << CRK_DSA_GENERATE_KEY) -+#define CRF_DH_GENERATE_KEY (1 << CRK_DH_GENERATE_KEY) - - /* ioctl's. Compatible with old linux cryptodev.h - */ -diff --git a/ioctl.c b/ioctl.c -index 9f57d46..cc1a2a9 100644 ---- a/ioctl.c -+++ b/ioctl.c -@@ -721,6 +721,23 @@ static int crypto_async_fetch_asym(struct cryptodev_pkc *pkc) - dh_req->z, dh_req->z_len); - } - break; -+ case CRK_DSA_GENERATE_KEY: -+ case CRK_DH_GENERATE_KEY: -+ { -+ struct keygen_req_s *key_req = &pkc_req->req_u.keygen; -+ -+ if (pkc_req->type == ECC_KEYGEN) { -+ copy_to_user(ckop->crk_param[4].crp_p, key_req->pub_key, -+ key_req->pub_key_len); -+ copy_to_user(ckop->crk_param[5].crp_p, -+ key_req->priv_key, key_req->priv_key_len); -+ } else { -+ copy_to_user(ckop->crk_param[3].crp_p, -+ key_req->pub_key, key_req->pub_key_len); -+ copy_to_user(ckop->crk_param[4].crp_p, -+ key_req->priv_key, key_req->priv_key_len); -+ } -+ } - default: - ret = -EINVAL; - } -@@ -934,8 +951,9 @@ cryptodev_ioctl(struct file *filp, unsigned int cmd, unsigned long arg_) - - switch (cmd) { - case CIOCASYMFEAT: -- return put_user(CRF_MOD_EXP_CRT | CRF_MOD_EXP | -- CRF_DSA_SIGN | CRF_DSA_VERIFY | CRF_DH_COMPUTE_KEY, p); -+ return put_user(CRF_MOD_EXP_CRT | CRF_MOD_EXP | CRF_DSA_SIGN | -+ CRF_DSA_VERIFY | CRF_DH_COMPUTE_KEY | -+ CRF_DSA_GENERATE_KEY, p); - case CRIOGET: - fd = clonefd(filp); - ret = put_user(fd, p); -@@ -1079,7 +1097,14 @@ cryptodev_ioctl(struct file *filp, unsigned int cmd, unsigned long arg_) - if (cookie_list.cookie_available) - copy_to_user(arg, &cookie_list, - sizeof(struct pkc_cookie_list_s)); -+ else { -+ struct pkc_cookie_list_s *user_ck_list = (void *)arg; -+ -+ put_user(0, &(user_ck_list->cookie_available)); -+ } -+ ret = cookie_list.cookie_available; - } -+ - return ret; - default: - return -EINVAL; -diff --git a/main.c b/main.c -index 0b7951e..c901bc7 100644 ---- a/main.c -+++ b/main.c -@@ -342,6 +342,85 @@ err: - return rc; - } - -+int crypto_kop_keygen(struct cryptodev_pkc *pkc) -+{ -+ struct kernel_crypt_kop *kop = &pkc->kop; -+ struct crypt_kop *cop = &kop->kop; -+ struct pkc_request *pkc_req; -+ struct keygen_req_s *key_req; -+ int rc, buf_size; -+ uint8_t *buf; -+ -+ if (!cop->crk_param[0].crp_nbits || !cop->crk_param[1].crp_nbits || -+ !cop->crk_param[2].crp_nbits || !cop->crk_param[3].crp_nbits || -+ !cop->crk_param[4].crp_nbits) -+ return -EINVAL; -+ -+ pkc_req = &pkc->req; -+ key_req = &pkc_req->req_u.keygen; -+ key_req->q_len = (cop->crk_param[0].crp_nbits + 7)/8; -+ key_req->r_len = (cop->crk_param[1].crp_nbits + 7)/8; -+ key_req->g_len = (cop->crk_param[2].crp_nbits + 7)/8; -+ if (cop->crk_iparams == 3) { -+ key_req->pub_key_len = (cop->crk_param[3].crp_nbits + 7)/8; -+ key_req->priv_key_len = (cop->crk_param[4].crp_nbits + 7)/8; -+ buf_size = key_req->q_len + key_req->r_len + key_req->g_len + -+ key_req->pub_key_len + key_req->priv_key_len; -+ pkc_req->type = DLC_KEYGEN; -+ } else { -+ key_req->ab_len = (cop->crk_param[3].crp_nbits + 7)/8; -+ key_req->pub_key_len = (cop->crk_param[4].crp_nbits + 7)/8; -+ key_req->priv_key_len = (cop->crk_param[5].crp_nbits + 7)/8; -+ buf_size = key_req->q_len + key_req->r_len + key_req->g_len + -+ key_req->pub_key_len + key_req->priv_key_len + -+ key_req->ab_len; -+ pkc_req->type = ECC_KEYGEN; -+ pkc_req->curve_type = cop->curve_type; -+ } -+ -+ buf = kzalloc(buf_size, GFP_DMA); -+ if (!buf) -+ return -ENOMEM; -+ -+ key_req->q = buf; -+ key_req->r = key_req->q + key_req->q_len; -+ key_req->g = key_req->r + key_req->r_len; -+ key_req->pub_key = key_req->g + key_req->g_len; -+ key_req->priv_key = key_req->pub_key + key_req->pub_key_len; -+ copy_from_user(key_req->q, cop->crk_param[0].crp_p, key_req->q_len); -+ copy_from_user(key_req->r, cop->crk_param[1].crp_p, key_req->r_len); -+ copy_from_user(key_req->g, cop->crk_param[2].crp_p, key_req->g_len); -+ if (cop->crk_iparams == 3) { -+ copy_from_user(key_req->pub_key, cop->crk_param[3].crp_p, -+ key_req->pub_key_len); -+ copy_from_user(key_req->priv_key, cop->crk_param[4].crp_p, -+ key_req->priv_key_len); -+ } else { -+ key_req->ab = key_req->priv_key + key_req->priv_key_len; -+ copy_from_user(key_req->ab, cop->crk_param[3].crp_p, -+ key_req->ab_len); -+ copy_from_user(key_req->pub_key, cop->crk_param[4].crp_p, -+ key_req->pub_key_len); -+ copy_from_user(key_req->priv_key, cop->crk_param[5].crp_p, -+ key_req->priv_key_len); -+ } -+ -+ rc = cryptodev_pkc_offload(pkc); -+ if (pkc->type == SYNCHRONOUS) { -+ if (rc) -+ goto err; -+ } else { -+ if (rc != -EINPROGRESS && !rc) -+ goto err; -+ -+ pkc->cookie = buf; -+ return rc; -+ } -+err: -+ kfree(buf); -+ return rc; -+} -+ - int crypto_kop_dh_key(struct cryptodev_pkc *pkc) - { - struct kernel_crypt_kop *kop = &pkc->kop; -@@ -554,6 +633,12 @@ int crypto_run_asym(struct cryptodev_pkc *pkc) - goto err; - ret = crypto_kop_dh_key(pkc); - break; -+ case CRK_DH_GENERATE_KEY: -+ case CRK_DSA_GENERATE_KEY: -+ if ((kop->kop.crk_iparams != 3 && kop->kop.crk_iparams != 4)) -+ goto err; -+ ret = crypto_kop_keygen(pkc); -+ break; - } - err: - return ret; --- -1.7.9.7 - diff --git a/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0013-RCU-stall-fixed-in-PKC-asynchronous-interface.patch b/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0013-RCU-stall-fixed-in-PKC-asynchronous-interface.patch deleted file mode 100644 index 26c01689..00000000 --- a/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0013-RCU-stall-fixed-in-PKC-asynchronous-interface.patch +++ /dev/null @@ -1,238 +0,0 @@ -From 211a494a4f8ee6d5d31a1db938b771958ea32c6b Mon Sep 17 00:00:00 2001 -From: Yashpal Dutta -Date: Fri, 7 Mar 2014 08:49:15 +0545 -Subject: [[Patch][fsl 13/16] RCU stall fixed in PKC asynchronous interface - -Upstream-status: Pending - -Signed-off-by: Yashpal Dutta ---- - ioctl.c | 23 +++++++++++------------ - main.c | 43 +++++++++++++++++++++++++++---------------- - 2 files changed, 38 insertions(+), 28 deletions(-) - -diff --git a/ioctl.c b/ioctl.c -index cc1a2a9..1752880 100644 ---- a/ioctl.c -+++ b/ioctl.c -@@ -106,10 +106,9 @@ void cryptodev_complete_asym(struct crypto_async_request *req, int err) - complete(&res->completion); - } else { - struct crypt_priv *pcr = pkc->priv; -- unsigned long flags; -- spin_lock_irqsave(&pcr->completion_lock, flags); -+ spin_lock_bh(&pcr->completion_lock); - list_add_tail(&pkc->list, &pcr->asym_completed_list); -- spin_unlock_irqrestore(&pcr->completion_lock, flags); -+ spin_unlock_bh(&pcr->completion_lock); - /* wake for POLLIN */ - wake_up_interruptible(&pcr->user_waiter); - } -@@ -953,7 +952,7 @@ cryptodev_ioctl(struct file *filp, unsigned int cmd, unsigned long arg_) - case CIOCASYMFEAT: - return put_user(CRF_MOD_EXP_CRT | CRF_MOD_EXP | CRF_DSA_SIGN | - CRF_DSA_VERIFY | CRF_DH_COMPUTE_KEY | -- CRF_DSA_GENERATE_KEY, p); -+ CRF_DSA_GENERATE_KEY | CRF_DH_GENERATE_KEY, p); - case CRIOGET: - fd = clonefd(filp); - ret = put_user(fd, p); -@@ -992,7 +991,7 @@ cryptodev_ioctl(struct file *filp, unsigned int cmd, unsigned long arg_) - case CIOCKEY: - { - struct cryptodev_pkc *pkc = -- kzalloc(sizeof(struct cryptodev_pkc), GFP_KERNEL); -+ kmalloc(sizeof(struct cryptodev_pkc), GFP_KERNEL); - - if (!pkc) - return -ENOMEM; -@@ -1048,7 +1047,7 @@ cryptodev_ioctl(struct file *filp, unsigned int cmd, unsigned long arg_) - case CIOCASYMASYNCRYPT: - { - struct cryptodev_pkc *pkc = -- kzalloc(sizeof(struct cryptodev_pkc), GFP_KERNEL); -+ kmalloc(sizeof(struct cryptodev_pkc), GFP_KERNEL); - ret = kop_from_user(&pkc->kop, arg); - - if (unlikely(ret)) -@@ -1065,13 +1064,12 @@ cryptodev_ioctl(struct file *filp, unsigned int cmd, unsigned long arg_) - case CIOCASYMFETCHCOOKIE: - { - struct cryptodev_pkc *pkc; -- unsigned long flags; - int i; - struct pkc_cookie_list_s cookie_list; - -- spin_lock_irqsave(&pcr->completion_lock, flags); - cookie_list.cookie_available = 0; - for (i = 0; i < MAX_COOKIES; i++) { -+ spin_lock_bh(&pcr->completion_lock); - if (!list_empty(&pcr->asym_completed_list)) { - /* Run a loop in the list for upto elements - and copy their response back */ -@@ -1079,6 +1077,7 @@ cryptodev_ioctl(struct file *filp, unsigned int cmd, unsigned long arg_) - list_first_entry(&pcr->asym_completed_list, - struct cryptodev_pkc, list); - list_del(&pkc->list); -+ spin_unlock_bh(&pcr->completion_lock); - ret = crypto_async_fetch_asym(pkc); - if (!ret) { - cookie_list.cookie_available++; -@@ -1088,10 +1087,10 @@ cryptodev_ioctl(struct file *filp, unsigned int cmd, unsigned long arg_) - } - kfree(pkc); - } else { -+ spin_unlock_bh(&pcr->completion_lock); - break; - } - } -- spin_unlock_irqrestore(&pcr->completion_lock, flags); - - /* Reflect the updated request to user-space */ - if (cookie_list.cookie_available) -@@ -1381,14 +1380,13 @@ cryptodev_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg_) - case COMPAT_CIOCASYMFETCHCOOKIE: - { - struct cryptodev_pkc *pkc; -- unsigned long flags; - int i = 0; - struct compat_pkc_cookie_list_s cookie_list; - -- spin_lock_irqsave(&pcr->completion_lock, flags); - cookie_list.cookie_available = 0; - - for (i = 0; i < MAX_COOKIES; i++) { -+ spin_lock_bh(&pcr->completion_lock); - if (!list_empty(&pcr->asym_completed_list)) { - /* Run a loop in the list for upto elements - and copy their response back */ -@@ -1396,6 +1394,7 @@ cryptodev_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg_) - list_first_entry(&pcr->asym_completed_list, - struct cryptodev_pkc, list); - list_del(&pkc->list); -+ spin_unlock_bh(&pcr->completion_lock); - ret = crypto_async_fetch_asym(pkc); - if (!ret) { - cookie_list.cookie_available++; -@@ -1404,10 +1403,10 @@ cryptodev_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg_) - } - kfree(pkc); - } else { -+ spin_unlock_bh(&pcr->completion_lock); - break; - } - } -- spin_unlock_irqrestore(&pcr->completion_lock, flags); - - /* Reflect the updated request to user-space */ - if (cookie_list.cookie_available) -diff --git a/main.c b/main.c -index c901bc7..2747706 100644 ---- a/main.c -+++ b/main.c -@@ -215,7 +215,9 @@ int crypto_kop_dsasign(struct cryptodev_pkc *pkc) - pkc_req->type = DSA_SIGN; - } - -- buf = kzalloc(buf_size, GFP_DMA); -+ buf = kmalloc(buf_size, GFP_DMA); -+ if (!buf) -+ return -ENOMEM; - - dsa_req->q = buf; - dsa_req->r = dsa_req->q + dsa_req->q_len; -@@ -298,7 +300,9 @@ int crypto_kop_dsaverify(struct cryptodev_pkc *pkc) - pkc_req->type = DSA_VERIFY; - } - -- buf = kzalloc(buf_size, GFP_DMA); -+ buf = kmalloc(buf_size, GFP_DMA); -+ if (!buf) -+ return -ENOMEM; - - dsa_req->q = buf; - dsa_req->r = dsa_req->q + dsa_req->q_len; -@@ -378,7 +382,7 @@ int crypto_kop_keygen(struct cryptodev_pkc *pkc) - pkc_req->curve_type = cop->curve_type; - } - -- buf = kzalloc(buf_size, GFP_DMA); -+ buf = kmalloc(buf_size, GFP_DMA); - if (!buf) - return -ENOMEM; - -@@ -390,25 +394,28 @@ int crypto_kop_keygen(struct cryptodev_pkc *pkc) - copy_from_user(key_req->q, cop->crk_param[0].crp_p, key_req->q_len); - copy_from_user(key_req->r, cop->crk_param[1].crp_p, key_req->r_len); - copy_from_user(key_req->g, cop->crk_param[2].crp_p, key_req->g_len); -- if (cop->crk_iparams == 3) { -- copy_from_user(key_req->pub_key, cop->crk_param[3].crp_p, -- key_req->pub_key_len); -- copy_from_user(key_req->priv_key, cop->crk_param[4].crp_p, -- key_req->priv_key_len); -- } else { -+ if (cop->crk_iparams == 4) { - key_req->ab = key_req->priv_key + key_req->priv_key_len; - copy_from_user(key_req->ab, cop->crk_param[3].crp_p, - key_req->ab_len); -- copy_from_user(key_req->pub_key, cop->crk_param[4].crp_p, -- key_req->pub_key_len); -- copy_from_user(key_req->priv_key, cop->crk_param[5].crp_p, -- key_req->priv_key_len); - } - - rc = cryptodev_pkc_offload(pkc); - if (pkc->type == SYNCHRONOUS) { - if (rc) - goto err; -+ -+ if (cop->crk_iparams == 4) { -+ copy_to_user(cop->crk_param[4].crp_p, key_req->pub_key, -+ key_req->pub_key_len); -+ copy_to_user(cop->crk_param[5].crp_p, key_req->priv_key, -+ key_req->priv_key_len); -+ } else { -+ copy_to_user(cop->crk_param[3].crp_p, key_req->pub_key, -+ key_req->pub_key_len); -+ copy_to_user(cop->crk_param[4].crp_p, -+ key_req->priv_key, key_req->priv_key_len); -+ } - } else { - if (rc != -EINPROGRESS && !rc) - goto err; -@@ -447,7 +454,9 @@ int crypto_kop_dh_key(struct cryptodev_pkc *pkc) - pkc_req->type = DH_COMPUTE_KEY; - } - buf_size += dh_req->z_len; -- buf = kzalloc(buf_size, GFP_DMA); -+ buf = kmalloc(buf_size, GFP_DMA); -+ if (!buf) -+ return -ENOMEM; - dh_req->q = buf; - dh_req->s = dh_req->q + dh_req->q_len; - dh_req->pub_key = dh_req->s + dh_req->s_len; -@@ -508,9 +517,11 @@ int crypto_modexp_crt(struct cryptodev_pkc *pkc) - rsa_req->dq_len = (cop->crk_param[4].crp_nbits + 7)/8; - rsa_req->c_len = (cop->crk_param[5].crp_nbits + 7)/8; - rsa_req->f_len = (cop->crk_param[6].crp_nbits + 7)/8; -- buf = kzalloc(rsa_req->p_len + rsa_req->q_len + rsa_req->f_len + -+ buf = kmalloc(rsa_req->p_len + rsa_req->q_len + rsa_req->f_len + - rsa_req->dp_len + rsa_req->dp_len + rsa_req->c_len + - rsa_req->g_len, GFP_DMA); -+ if (!buf) -+ return -ENOMEM; - rsa_req->p = buf; - rsa_req->q = rsa_req->p + rsa_req->p_len; - rsa_req->g = rsa_req->q + rsa_req->q_len; -@@ -563,7 +574,7 @@ int crypto_bn_modexp(struct cryptodev_pkc *pkc) - rsa_req->e_len = (cop->crk_param[1].crp_nbits + 7)/8; - rsa_req->n_len = (cop->crk_param[2].crp_nbits + 7)/8; - rsa_req->g_len = (cop->crk_param[3].crp_nbits + 7)/8; -- buf = kzalloc(rsa_req->f_len + rsa_req->e_len + rsa_req->n_len -+ buf = kmalloc(rsa_req->f_len + rsa_req->e_len + rsa_req->n_len - + rsa_req->g_len, GFP_DMA); - if (!buf) - return -ENOMEM; --- -1.7.9.7 - diff --git a/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0014-use-static-allocation-for-keys-copied-from-userspace.patch b/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0014-use-static-allocation-for-keys-copied-from-userspace.patch deleted file mode 100644 index c68f3d7c..00000000 --- a/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0014-use-static-allocation-for-keys-copied-from-userspace.patch +++ /dev/null @@ -1,131 +0,0 @@ -From 50c116780f736b3e6a11389c9d9b3f4a1d5cab90 Mon Sep 17 00:00:00 2001 -From: Cristian Stoica -Date: Wed, 19 Mar 2014 17:59:17 +0200 -Subject: [[Patch][fsl 14/16] use static allocation for keys copied from - userspace - -Upstream-status: Pending - -There is no need to keep keys around for the entire duration of the -session. The keys are copied from user-space and then used to initialize -the ciphers. After this, the original keys can be discarded. -The total required space for keys is small and known in advance. This -patch uses this information to allocate required space on stack. - -Signed-off-by: Cristian Stoica ---- - cryptodev_int.h | 1 - - ioctl.c | 38 ++++++++++++++++++++------------------ - 2 files changed, 20 insertions(+), 19 deletions(-) - -diff --git a/cryptodev_int.h b/cryptodev_int.h -index 8beeef0..7ea6976 100644 ---- a/cryptodev_int.h -+++ b/cryptodev_int.h -@@ -212,7 +212,6 @@ struct csession { - struct hash_data hdata; - uint32_t sid; - uint32_t alignmask; -- uint8_t *key; - - unsigned int array_size; - unsigned int used_pages; /* the number of pages that are used */ -diff --git a/ioctl.c b/ioctl.c -index 1752880..16ce72c 100644 ---- a/ioctl.c -+++ b/ioctl.c -@@ -46,6 +46,8 @@ - #include - #include - #include -+#include -+#include - - #include - -@@ -136,9 +138,17 @@ crypto_create_session(struct fcrypt *fcr, struct session_op *sop) - const char *alg_name = NULL; - const char *hash_name = NULL; - int hmac_mode = 1, stream = 0, aead = 0; -- uint8_t *key = NULL; -- unsigned int keylen; -- uint8_t mackey[CRYPTO_HMAC_MAX_KEY_LEN]; -+ /* -+ * With aead, only ckey is used and it can cover all the struct space; -+ * otherwise both keys may be used simultaneously but they are confined -+ * to their spaces -+ */ -+ struct { -+ uint8_t ckey[CRYPTO_CIPHER_MAX_KEY_LEN]; -+ uint8_t mkey[CRYPTO_HMAC_MAX_KEY_LEN]; -+ /* padding space for aead keys */ -+ uint8_t pad[RTA_SPACE(sizeof(struct crypto_authenc_key_param))]; -+ } keys; - - /* Does the request make sense? */ - if (unlikely(!sop->cipher && !sop->mac)) { -@@ -257,23 +267,17 @@ crypto_create_session(struct fcrypt *fcr, struct session_op *sop) - - /* Set-up crypto transform. */ - if (alg_name) { -+ unsigned int keylen; - ret = cryptodev_get_cipher_keylen(&keylen, sop, aead); - if (unlikely(ret < 0)) - goto error_cipher; - -- key = kmalloc(keylen, GFP_KERNEL); -- ses_new->key = key; -- if (unlikely(!key)) { -- ret = -ENOMEM; -- goto error_cipher; -- } -- -- ret = cryptodev_get_cipher_key(key, sop, aead); -+ ret = cryptodev_get_cipher_key(keys.ckey, sop, aead); - if (unlikely(ret < 0)) - goto error_cipher; - -- ret = cryptodev_cipher_init(&ses_new->cdata, alg_name, key, keylen, -- stream, aead); -+ ret = cryptodev_cipher_init(&ses_new->cdata, alg_name, -+ keys.ckey, keylen, stream, aead); - if (ret < 0) { - ddebug(1, "Failed to load cipher for %s", alg_name); - ret = -EINVAL; -@@ -289,14 +293,14 @@ crypto_create_session(struct fcrypt *fcr, struct session_op *sop) - goto error_hash; - } - -- if (sop->mackey && unlikely(copy_from_user(mackey, sop->mackey, -- sop->mackeylen))) { -+ if (sop->mackey && unlikely(copy_from_user(keys.mkey, -+ sop->mackey, sop->mackeylen))) { - ret = -EFAULT; - goto error_hash; - } - - ret = cryptodev_hash_init(&ses_new->hdata, hash_name, hmac_mode, -- mackey, sop->mackeylen); -+ keys.mkey, sop->mackeylen); - if (ret != 0) { - ddebug(1, "Failed to load hash for %s", hash_name); - ret = -EINVAL; -@@ -349,7 +353,6 @@ error_hash: - kfree(ses_new->sg); - kfree(ses_new->pages); - error_cipher: -- kfree(key); - kfree(ses_new); - - return ret; -@@ -370,7 +373,6 @@ crypto_destroy_session(struct csession *ses_ptr) - ddebug(2, "freeing space for %d user pages", ses_ptr->array_size); - kfree(ses_ptr->pages); - kfree(ses_ptr->sg); -- kfree(ses_ptr->key); - mutex_unlock(&ses_ptr->sem); - mutex_destroy(&ses_ptr->sem); - kfree(ses_ptr); --- -1.7.9.7 - diff --git a/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0015-Add-RSA-Key-generation-offloading.patch b/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0015-Add-RSA-Key-generation-offloading.patch deleted file mode 100644 index a419b58a..00000000 --- a/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0015-Add-RSA-Key-generation-offloading.patch +++ /dev/null @@ -1,170 +0,0 @@ -From 1d9c8084a9addaa071ca3e6c14167ebdb2673725 Mon Sep 17 00:00:00 2001 -From: Hou Zhiqiang -Date: Wed, 19 Mar 2014 14:02:46 +0800 -Subject: [[Patch][fsl 15/16] Add RSA Key generation offloading - -Upstream-status: Pending - -Signed-off-by: Hou Zhiqiang -Tested-by: Cristian Stoica ---- - cryptlib.c | 1 + - crypto/cryptodev.h | 2 ++ - ioctl.c | 3 +- - main.c | 80 +++++++++++++++++++++++++++++++++++++++++++++++++++- - 4 files changed, 84 insertions(+), 2 deletions(-) - -diff --git a/cryptlib.c b/cryptlib.c -index 41acb2c..89af77a 100644 ---- a/cryptlib.c -+++ b/cryptlib.c -@@ -426,6 +426,7 @@ int cryptodev_pkc_offload(struct cryptodev_pkc *pkc) - struct pkc_request *pkc_req = &pkc->req, *pkc_requested; - - switch (pkc_req->type) { -+ case RSA_KEYGEN: - case RSA_PUB: - case RSA_PRIV_FORM1: - case RSA_PRIV_FORM2: -diff --git a/crypto/cryptodev.h b/crypto/cryptodev.h -index 33cca2e..7990f27 100644 ---- a/crypto/cryptodev.h -+++ b/crypto/cryptodev.h -@@ -271,6 +271,7 @@ enum cryptodev_crk_op_t { - CRK_DH_COMPUTE_KEY = 4, - CRK_DSA_GENERATE_KEY = 5, - CRK_DH_GENERATE_KEY = 6, -+ CRK_RSA_GENERATE_KEY = 7, - CRK_ALGORITHM_ALL - }; - -@@ -280,6 +281,7 @@ enum cryptodev_crk_op_t { - */ - #define CRF_MOD_EXP (1 << CRK_MOD_EXP) - #define CRF_MOD_EXP_CRT (1 << CRK_MOD_EXP_CRT) -+#define CRF_RSA_GENERATE_KEY (1 << CRK_RSA_GENERATE_KEY) - #define CRF_DSA_SIGN (1 << CRK_DSA_SIGN) - #define CRF_DSA_VERIFY (1 << CRK_DSA_VERIFY) - #define CRF_DH_COMPUTE_KEY (1 << CRK_DH_COMPUTE_KEY) -diff --git a/ioctl.c b/ioctl.c -index 16ce72c..0344c0c 100644 ---- a/ioctl.c -+++ b/ioctl.c -@@ -954,7 +954,8 @@ cryptodev_ioctl(struct file *filp, unsigned int cmd, unsigned long arg_) - case CIOCASYMFEAT: - return put_user(CRF_MOD_EXP_CRT | CRF_MOD_EXP | CRF_DSA_SIGN | - CRF_DSA_VERIFY | CRF_DH_COMPUTE_KEY | -- CRF_DSA_GENERATE_KEY | CRF_DH_GENERATE_KEY, p); -+ CRF_DSA_GENERATE_KEY | CRF_DH_GENERATE_KEY | -+ CRF_RSA_GENERATE_KEY, p); - case CRIOGET: - fd = clonefd(filp); - ret = put_user(fd, p); -diff --git a/main.c b/main.c -index 2747706..14dcf40 100644 ---- a/main.c -+++ b/main.c -@@ -346,6 +346,82 @@ err: - return rc; - } - -+int crypto_kop_rsa_keygen(struct cryptodev_pkc *pkc) -+{ -+ struct kernel_crypt_kop *kop = &pkc->kop; -+ struct crypt_kop *cop = &kop->kop; -+ struct pkc_request *pkc_req; -+ struct rsa_keygen_req_s *key_req; -+ int rc, buf_size; -+ uint8_t *buf; -+ -+ if (!cop->crk_param[0].crp_nbits || !cop->crk_param[1].crp_nbits || -+ !cop->crk_param[2].crp_nbits || !cop->crk_param[3].crp_nbits || -+ !cop->crk_param[4].crp_nbits || !cop->crk_param[5].crp_nbits || -+ !cop->crk_param[6].crp_nbits) -+ return -EINVAL; -+ -+ pkc_req = &pkc->req; -+ pkc_req->type = RSA_KEYGEN; -+ key_req = &pkc_req->req_u.rsa_keygen; -+ key_req->n_len = (cop->crk_param[2].crp_nbits + 7)/8; -+ key_req->p_len = (cop->crk_param[0].crp_nbits + 7) / 8; -+ key_req->q_len = (cop->crk_param[1].crp_nbits + 7) / 8; -+ key_req->n_len = (cop->crk_param[2].crp_nbits + 7) / 8; -+ key_req->d_len = (cop->crk_param[3].crp_nbits + 7) / 8; -+ key_req->dp_len = (cop->crk_param[4].crp_nbits + 7) / 8; -+ key_req->dq_len = (cop->crk_param[5].crp_nbits + 7) / 8; -+ key_req->c_len = (cop->crk_param[6].crp_nbits + 7) / 8; -+ -+ buf_size = key_req->p_len + key_req->q_len + key_req->n_len + -+ key_req->d_len + key_req->dp_len + -+ key_req->dq_len + key_req->c_len; -+ -+ buf = kmalloc(buf_size, GFP_DMA); -+ if (!buf) -+ return -ENOMEM; -+ key_req->p = buf; -+ key_req->q = key_req->p + key_req->p_len; -+ key_req->n = key_req->q + key_req->q_len; -+ key_req->d = key_req->n + key_req->n_len; -+ key_req->dp = key_req->d + key_req->d_len; -+ key_req->dq = key_req->dp + key_req->dp_len; -+ key_req->c = key_req->dq + key_req->dq_len; -+ -+ rc = cryptodev_pkc_offload(pkc); -+ -+ if (pkc->type == SYNCHRONOUS) { -+ if (rc) -+ goto err; -+ -+ copy_to_user(cop->crk_param[0].crp_p, -+ key_req->p, key_req->p_len); -+ copy_to_user(cop->crk_param[1].crp_p, -+ key_req->q, key_req->q_len); -+ copy_to_user(cop->crk_param[2].crp_p, -+ key_req->n, key_req->n_len); -+ copy_to_user(cop->crk_param[3].crp_p, -+ key_req->d, key_req->d_len); -+ copy_to_user(cop->crk_param[4].crp_p, -+ key_req->dp, key_req->dp_len); -+ copy_to_user(cop->crk_param[5].crp_p, -+ key_req->dq, key_req->dq_len); -+ copy_to_user(cop->crk_param[6].crp_p, -+ key_req->c, key_req->c_len); -+ } else { -+ if (rc != -EINPROGRESS && !rc) { -+ printk("%s: Failed\n", __func__); -+ goto err; -+ } -+ pkc->cookie = buf; -+ return rc; -+ } -+err: -+ kfree(buf); -+ return rc; -+ -+} -+ - int crypto_kop_keygen(struct cryptodev_pkc *pkc) - { - struct kernel_crypt_kop *kop = &pkc->kop; -@@ -385,7 +461,6 @@ int crypto_kop_keygen(struct cryptodev_pkc *pkc) - buf = kmalloc(buf_size, GFP_DMA); - if (!buf) - return -ENOMEM; -- - key_req->q = buf; - key_req->r = key_req->q + key_req->q_len; - key_req->g = key_req->r + key_req->r_len; -@@ -650,6 +725,9 @@ int crypto_run_asym(struct cryptodev_pkc *pkc) - goto err; - ret = crypto_kop_keygen(pkc); - break; -+ case CRK_RSA_GENERATE_KEY: -+ ret = crypto_kop_rsa_keygen(pkc); -+ break; - } - err: - return ret; --- -1.7.9.7 - diff --git a/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0016-Fixed-compilation-error-of-openssl-with-fsl-cryptode.patch b/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0016-Fixed-compilation-error-of-openssl-with-fsl-cryptode.patch deleted file mode 100644 index d5cc7f04..00000000 --- a/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0016-Fixed-compilation-error-of-openssl-with-fsl-cryptode.patch +++ /dev/null @@ -1,116 +0,0 @@ -From 2215332bff6034d0e22e92e8fda0993f2579a740 Mon Sep 17 00:00:00 2001 -From: Yashpal Dutta -Date: Thu, 17 Apr 2014 07:08:47 +0545 -Subject: [[Patch][fsl 16/16] Fixed compilation error of openssl with fsl - cryptodev - -Upstream-status: Pending - -Signed-off-by: Yashpal Dutta -Tested-by: Cristian Stoica ---- - cryptlib.c | 6 +++--- - crypto/cryptodev.h | 9 ++++++++- - cryptodev_int.h | 2 +- - ioctl.c | 6 +++++- - 4 files changed, 17 insertions(+), 6 deletions(-) - -diff --git a/cryptlib.c b/cryptlib.c -index 89af77a..1fc03e5 100644 ---- a/cryptlib.c -+++ b/cryptlib.c -@@ -129,7 +129,7 @@ int cryptodev_cipher_init(struct cipher_data *out, const char *alg_name, - if (alg->max_keysize > 0 && - unlikely((keylen < alg->min_keysize) || - (keylen > alg->max_keysize))) { -- ddebug(1, "Wrong keylen '%zu' for algorithm '%s'. Use %u to %u.", -+ ddebug(1, "Wrong keylen '%u' for algorithm '%s'. Use %u to %u.", - keylen, alg_name, alg->min_keysize, alg->max_keysize); - ret = -EINVAL; - goto error; -@@ -156,7 +156,7 @@ int cryptodev_cipher_init(struct cipher_data *out, const char *alg_name, - } - - if (unlikely(ret)) { -- ddebug(1, "Setting key failed for %s-%zu.", alg_name, keylen*8); -+ ddebug(1, "Setting key failed for %s-%u.", alg_name, keylen*8); - ret = -EINVAL; - goto error; - } -@@ -323,7 +323,7 @@ int cryptodev_hash_init(struct hash_data *hdata, const char *alg_name, - if (hmac_mode != 0) { - ret = crypto_ahash_setkey(hdata->async.s, mackey, mackeylen); - if (unlikely(ret)) { -- ddebug(1, "Setting hmac key failed for %s-%zu.", -+ ddebug(1, "Setting hmac key failed for %s-%u.", - alg_name, mackeylen*8); - ret = -EINVAL; - goto error; -diff --git a/crypto/cryptodev.h b/crypto/cryptodev.h -index 7990f27..77bffc9 100644 ---- a/crypto/cryptodev.h -+++ b/crypto/cryptodev.h -@@ -235,6 +235,13 @@ struct crypt_auth_op { - #define CRYPTO_ALG_FLAG_RNG_ENABLE 2 - #define CRYPTO_ALG_FLAG_DSA_SHA 4 - -+enum ec_curve_t { -+ EC_DISCRETE_LOG, -+ EC_PRIME, -+ EC_BINARY, -+ MAX_EC_TYPE -+}; -+ - struct crparam { - __u8 *crp_p; - __u32 crp_nbits; -@@ -250,7 +257,7 @@ struct crypt_kop { - __u16 crk_oparams; - __u32 crk_pad1; - struct crparam crk_param[CRK_MAXPARAM]; -- enum curve_t curve_type; /* 0 == Discrete Log, -+ enum ec_curve_t curve_type; /* 0 == Discrete Log, - 1 = EC_PRIME, 2 = EC_BINARY */ - void *cookie; - }; -diff --git a/cryptodev_int.h b/cryptodev_int.h -index 7ea6976..e379eaf 100644 ---- a/cryptodev_int.h -+++ b/cryptodev_int.h -@@ -88,7 +88,7 @@ struct compat_crypt_kop { - uint16_t crk_oparams; - uint32_t crk_pad1; - struct compat_crparam crk_param[CRK_MAXPARAM]; -- enum curve_t curve_type; /* 0 == Discrete Log, 1 = EC_PRIME, -+ enum ec_curve_t curve_type; /* 0 == Discrete Log, 1 = EC_PRIME, - 2 = EC_BINARY */ - compat_uptr_t cookie; - }; -diff --git a/ioctl.c b/ioctl.c -index 0344c0c..66cb05a 100644 ---- a/ioctl.c -+++ b/ioctl.c -@@ -498,6 +498,7 @@ cryptodev_open(struct inode *inode, struct file *filp) - INIT_LIST_HEAD(&pcr->done.list); - INIT_LIST_HEAD(&pcr->asym_completed_list); - spin_lock_init(&pcr->completion_lock); -+ - INIT_WORK(&pcr->cryptask, cryptask_routine); - - init_waitqueue_head(&pcr->user_waiter); -@@ -777,8 +778,11 @@ static int fill_kcop_from_cop(struct kernel_crypt_op *kcop, struct fcrypt *fcr) - - if (cop->iv) { - rc = copy_from_user(kcop->iv, cop->iv, kcop->ivlen); -- if (unlikely(rc)) -+ if (unlikely(rc)) { -+ derr(1, "error copying IV (%d bytes), copy_from_user returned %d for address %p", -+ kcop->ivlen, rc, cop->iv); - return -EFAULT; -+ } - } - - return 0; --- -1.7.9.7 - -- cgit v1.2.3-54-g00ecf From a24cf3acea3c6a7e639de78124c3d7f47989b8e4 Mon Sep 17 00:00:00 2001 From: Cristian Stoica Date: Wed, 7 Jan 2015 17:55:02 +0800 Subject: cryptodev: disable RSA_KEYGEN if pkc-host installed Currently pkc-host does not support RSA_KEYGEN. When pkc-host installed, RSA keygen operations should be avoided. Introduce DISTRO_FEATURE "c29x_pkc". To install pkc-host, this feature should be enabled. Then cryptodev checks it to disable RSA_KEYGEN. this can be done in conf/local.conf: DISTRO_FEATURES_append = " c29x_pkc" Signed-off-by: Cristian Stoica --- .../0001-don-t-advertise-RSA-keygen.patch | 32 ++++++++++++++++++++++ .../cryptodev/cryptodev-module_1.6.bbappend | 4 +++ .../recipes-kernel/pkc-host/pkc-host_git.bb | 5 ++++ 3 files changed, 41 insertions(+) create mode 100644 meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0001-don-t-advertise-RSA-keygen.patch diff --git a/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0001-don-t-advertise-RSA-keygen.patch b/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0001-don-t-advertise-RSA-keygen.patch new file mode 100644 index 00000000..3d7c6086 --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-fsl/0001-don-t-advertise-RSA-keygen.patch @@ -0,0 +1,32 @@ +From b6e2a3747e3cffdf3cc515b0ce35d6bcdcb051c5 Mon Sep 17 00:00:00 2001 +From: Cristian Stoica +Date: Tue, 9 Dec 2014 16:41:25 +0200 +Subject: [PATCH] don't advertise RSA keygen + +This is supposed to avoid RSA keygen operations when they are not +available. Since no testing can be done, the patch should be applied +selectively (for example when offloading through pkc driver on C293) + +Change-Id: I60765f46fd7a39053d42e075d2ec71b032b2ed8a +Signed-off-by: Cristian Stoica +--- + ioctl.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/ioctl.c b/ioctl.c +index e907167..3239093 100644 +--- a/ioctl.c ++++ b/ioctl.c +@@ -961,8 +961,7 @@ cryptodev_ioctl(struct file *filp, unsigned int cmd, unsigned long arg_) + case CIOCASYMFEAT: + return put_user(CRF_MOD_EXP_CRT | CRF_MOD_EXP | CRF_DSA_SIGN | + CRF_DSA_VERIFY | CRF_DH_COMPUTE_KEY | +- CRF_DSA_GENERATE_KEY | CRF_DH_GENERATE_KEY | +- CRF_RSA_GENERATE_KEY, p); ++ CRF_DSA_GENERATE_KEY | CRF_DH_GENERATE_KEY, p); + case CRIOGET: + fd = clonefd(filp); + ret = put_user(fd, p); +-- +2.2.0 + diff --git a/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-module_1.6.bbappend b/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-module_1.6.bbappend index 345a09d4..2bf012c1 100644 --- a/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-module_1.6.bbappend +++ b/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-module_1.6.bbappend @@ -6,3 +6,7 @@ do_install_append_qoriq-ppc () { rm -fr ${D}/usr } +# Currently pkc-host does not support RSA_KEYGEN, remove this +# if it is fixed. +SRC_URI_append_qoriq-ppc = "${@base_contains('DISTRO_FEATURES', 'c29x_pkc', ' file://0001-don-t-advertise-RSA-keygen.patch', '', d)}" + diff --git a/meta-fsl-ppc/recipes-kernel/pkc-host/pkc-host_git.bb b/meta-fsl-ppc/recipes-kernel/pkc-host/pkc-host_git.bb index 2e579c1e..2d5e3165 100644 --- a/meta-fsl-ppc/recipes-kernel/pkc-host/pkc-host_git.bb +++ b/meta-fsl-ppc/recipes-kernel/pkc-host/pkc-host_git.bb @@ -4,6 +4,11 @@ LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://Makefile;endline=30;md5=6a26ed8e76a8ea2e019c525369ed0f03" inherit module qoriq_build_64bit_kernel +RDEPENDS_${PN} += "cryptodev-module" + +# Currently pkc-host does not support RSA_KEYGEN, remove this +# if it is fixed. +REQUIRED_DISTRO_FEATURES = "c29x_pkc" SRC_URI = "git://git.freescale.com/ppc/sdk/pkc-host.git;nobranch=1" SRCREV = "cae512c94e2a26cc6b0d6393d307cdea2d7282c9" -- cgit v1.2.3-54-g00ecf From dbad0321b1bd9851e00bdf416b88ca2c8aa5f2bb Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Wed, 7 Jan 2015 17:55:03 +0800 Subject: add more secure u-boot into default build list Signed-off-by: Ting Liu --- meta-fsl-ppc/conf/machine/b4860qds-64b.conf | 2 +- meta-fsl-ppc/conf/machine/b4860qds.conf | 2 +- meta-fsl-ppc/conf/machine/bsc9132qds.conf | 10 +++++++++- meta-fsl-ppc/conf/machine/p1010rdb.conf | 6 +++++- meta-fsl-ppc/conf/machine/p5020ds-64b.conf | 4 +++- meta-fsl-ppc/conf/machine/t1040rdb-64b.conf | 2 +- meta-fsl-ppc/conf/machine/t1040rdb.conf | 2 +- meta-fsl-ppc/conf/machine/t2080qds-64b.conf | 4 +++- meta-fsl-ppc/conf/machine/t2080qds.conf | 4 +++- meta-fsl-ppc/conf/machine/t2080rdb-64b.conf | 4 +++- meta-fsl-ppc/conf/machine/t2080rdb.conf | 4 +++- meta-fsl-ppc/conf/machine/t4160qds-64b.conf | 2 +- meta-fsl-ppc/conf/machine/t4160qds.conf | 2 +- meta-fsl-ppc/conf/machine/t4240qds-64b.conf | 2 +- meta-fsl-ppc/conf/machine/t4240qds.conf | 2 +- 15 files changed, 37 insertions(+), 15 deletions(-) diff --git a/meta-fsl-ppc/conf/machine/b4860qds-64b.conf b/meta-fsl-ppc/conf/machine/b4860qds-64b.conf index acc72d46..7e1f5bf9 100644 --- a/meta-fsl-ppc/conf/machine/b4860qds-64b.conf +++ b/meta-fsl-ppc/conf/machine/b4860qds-64b.conf @@ -7,7 +7,7 @@ require conf/machine/include/e6500-64b.inc SOC_FAMILY = "b4:b4860" -UBOOT_MACHINES ?= "B4860QDS" +UBOOT_MACHINES ?= "B4860QDS B4860QDS_SECURE_BOOT" KERNEL_DEVICETREE ?= "b4860qds.dtb b4860qds-usdpaa.dtb" KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/85xx/e6500rev2_defconfig" diff --git a/meta-fsl-ppc/conf/machine/b4860qds.conf b/meta-fsl-ppc/conf/machine/b4860qds.conf index c2d28edb..bae326e0 100644 --- a/meta-fsl-ppc/conf/machine/b4860qds.conf +++ b/meta-fsl-ppc/conf/machine/b4860qds.conf @@ -7,7 +7,7 @@ require conf/machine/include/e6500.inc SOC_FAMILY = "b4:b4860" -UBOOT_MACHINES ?= "B4860QDS" +UBOOT_MACHINES ?= "B4860QDS B4860QDS_SECURE_BOOT" KERNEL_DEVICETREE ?= "b4860qds.dtb b4860qds-usdpaa.dtb" KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/85xx/e6500rev2_defconfig" diff --git a/meta-fsl-ppc/conf/machine/bsc9132qds.conf b/meta-fsl-ppc/conf/machine/bsc9132qds.conf index 82078ee3..90ac2a3b 100644 --- a/meta-fsl-ppc/conf/machine/bsc9132qds.conf +++ b/meta-fsl-ppc/conf/machine/bsc9132qds.conf @@ -7,7 +7,15 @@ require conf/machine/include/e500v2.inc SOC_FAMILY = "bsc9132" -UBOOT_MACHINES ?= " BSC9132QDS_NAND_DDRCLK133 BSC9132QDS_NAND_DDRCLK100 BSC9132QDS_NOR_DDRCLK100 BSC9132QDS_NOR_DDRCLK133 BSC9132QDS_SDCARD_DDRCLK100 BSC9132QDS_SDCARD_DDRCLK133 BSC9132QDS_SPIFLASH_DDRCLK100 BSC9132QDS_SPIFLASH_DDRCLK133" +UBOOT_MACHINES ?= " BSC9132QDS_NAND_DDRCLK133 BSC9132QDS_NAND_DDRCLK100 \ + BSC9132QDS_NOR_DDRCLK100 BSC9132QDS_NOR_DDRCLK133 \ + BSC9132QDS_SDCARD_DDRCLK100 BSC9132QDS_SDCARD_DDRCLK133 \ + BSC9132QDS_SPIFLASH_DDRCLK100 BSC9132QDS_SPIFLASH_DDRCLK133 \ + BSC9132QDS_NAND_DDRCLK100_SECURE BSC9132QDS_NAND_DDRCLK133_SECURE \ + BSC9132QDS_NOR_DDRCLK100_SECURE BSC9132QDS_NOR_DDRCLK133_SECURE \ + BSC9132QDS_SDCARD_DDRCLK100_SECURE BSC9132QDS_SDCARD_DDRCLK133_SECURE \ + BSC9132QDS_SPIFLASH_DDRCLK100_SECURE BSC9132QDS_SPIFLASH_DDRCLK133_SECURE \ +" KERNEL_DEVICETREE ?= "bsc9132qds.dtb" KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/85xx/bsc913x_smp_defconfig" diff --git a/meta-fsl-ppc/conf/machine/p1010rdb.conf b/meta-fsl-ppc/conf/machine/p1010rdb.conf index ee7a9b61..e24c341e 100644 --- a/meta-fsl-ppc/conf/machine/p1010rdb.conf +++ b/meta-fsl-ppc/conf/machine/p1010rdb.conf @@ -10,7 +10,11 @@ SOC_FAMILY = "p1010" BOOTFORMAT_CONFIG = "config_sram_p1010rdb.dat" UBOOT_MACHINES ?= "P1010RDB-PB_NAND P1010RDB-PB_NOR \ P1010RDB-PB_SPIFLASH P1010RDB-PB_36BIT_NOR P1010RDB-PB_36BIT_NAND \ - P1010RDB-PB_36BIT_SPIFLASH" + P1010RDB-PB_36BIT_SPIFLASH P1010RDB-PB_36BIT_NAND_SECBOOT \ + P1010RDB-PB_36BIT_NOR_SECBOOT P1010RDB-PB_36BIT_SPIFLASH_SECBOOT \ + P1010RDB-PB_NAND_SECBOOT P1010RDB-PB_NOR_SECBOOT \ + P1010RDB-PB_SPIFLASH_SECBOOT \ +" KERNEL_DEVICETREE ?= "p1010rdb-pa.dtb p1010rdb-pb.dtb" KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/mpc85xx_defconfig" diff --git a/meta-fsl-ppc/conf/machine/p5020ds-64b.conf b/meta-fsl-ppc/conf/machine/p5020ds-64b.conf index 057e9f3a..615157f8 100644 --- a/meta-fsl-ppc/conf/machine/p5020ds-64b.conf +++ b/meta-fsl-ppc/conf/machine/p5020ds-64b.conf @@ -7,7 +7,9 @@ require conf/machine/include/e5500-64b.inc SOC_FAMILY = "p5020" -UBOOT_MACHINES ?= "P5020DS" +UBOOT_MACHINES ?= "P5020DS P5020DS_NAND P5020DS_SECURE_BOOT \ + P5020DS_SDCARD P5020DS_SPIFLASH \ +" KERNEL_DEVICETREE ?= "p5020ds.dtb p5020ds-usdpaa.dtb" KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/corenet64_smp_defconfig" diff --git a/meta-fsl-ppc/conf/machine/t1040rdb-64b.conf b/meta-fsl-ppc/conf/machine/t1040rdb-64b.conf index 7e52b724..c489f8f8 100644 --- a/meta-fsl-ppc/conf/machine/t1040rdb-64b.conf +++ b/meta-fsl-ppc/conf/machine/t1040rdb-64b.conf @@ -7,7 +7,7 @@ require conf/machine/include/e5500-64b.inc SOC_FAMILY = "t1:t1040" -UBOOT_MACHINES ?= "T1040RDB" +UBOOT_MACHINES ?= "T1040RDB T1040RDB_SECURE_BOOT" KERNEL_DEVICETREE ?= "t1040rdb.dtb t1040rdb-usdpaa.dtb" KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/corenet64_fmanv3_smp_defconfig" diff --git a/meta-fsl-ppc/conf/machine/t1040rdb.conf b/meta-fsl-ppc/conf/machine/t1040rdb.conf index d108819a..5c4f682f 100644 --- a/meta-fsl-ppc/conf/machine/t1040rdb.conf +++ b/meta-fsl-ppc/conf/machine/t1040rdb.conf @@ -7,7 +7,7 @@ require conf/machine/include/e5500.inc SOC_FAMILY = "t1:t1040" -UBOOT_MACHINES ?= "T1040RDB" +UBOOT_MACHINES ?= "T1040RDB T1040RDB_SECURE_BOOT" KERNEL_DEVICETREE ?= "t1040rdb.dtb t1040rdb-usdpaa.dtb" KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/corenet32_fmanv3_smp_defconfig" diff --git a/meta-fsl-ppc/conf/machine/t2080qds-64b.conf b/meta-fsl-ppc/conf/machine/t2080qds-64b.conf index 6b0f9436..88cb2c98 100644 --- a/meta-fsl-ppc/conf/machine/t2080qds-64b.conf +++ b/meta-fsl-ppc/conf/machine/t2080qds-64b.conf @@ -7,7 +7,9 @@ require conf/machine/include/e6500-64b.inc SOC_FAMILY = "t2:t2080" -UBOOT_MACHINES ?= "T2080QDS T2080QDS_SDCARD T2080QDS_SPIFLASH T2080QDS_NAND T2080QDS_SRIO_PCIE_BOOT" +UBOOT_MACHINES ?= "T2080QDS T2080QDS_SDCARD T2080QDS_SPIFLASH \ + T2080QDS_NAND T2080QDS_SRIO_PCIE_BOOT T2080QDS_SECURE_BOOT \ +" KERNEL_DEVICETREE ?= "t2080qds.dtb t2080qds-usdpaa.dtb" KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/85xx/e6500rev2_defconfig" diff --git a/meta-fsl-ppc/conf/machine/t2080qds.conf b/meta-fsl-ppc/conf/machine/t2080qds.conf index c675aecd..30478e9d 100644 --- a/meta-fsl-ppc/conf/machine/t2080qds.conf +++ b/meta-fsl-ppc/conf/machine/t2080qds.conf @@ -7,7 +7,9 @@ require conf/machine/include/e6500.inc SOC_FAMILY = "t2:t2080" -UBOOT_MACHINES ?= "T2080QDS T2080QDS_SDCARD T2080QDS_SPIFLASH T2080QDS_NAND T2080QDS_SRIO_PCIE_BOOT" +UBOOT_MACHINES ?= "T2080QDS T2080QDS_SDCARD T2080QDS_SPIFLASH \ + T2080QDS_NAND T2080QDS_SRIO_PCIE_BOOT T2080QDS_SECURE_BOOT \ +" KERNEL_DEVICETREE ?= "t2080qds.dtb t2080qds-usdpaa.dtb" KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/85xx/e6500rev2_defconfig" diff --git a/meta-fsl-ppc/conf/machine/t2080rdb-64b.conf b/meta-fsl-ppc/conf/machine/t2080rdb-64b.conf index 22f3f0fd..3892ffba 100644 --- a/meta-fsl-ppc/conf/machine/t2080rdb-64b.conf +++ b/meta-fsl-ppc/conf/machine/t2080rdb-64b.conf @@ -7,7 +7,9 @@ require conf/machine/include/e6500-64b.inc SOC_FAMILY = "t2:t2080" -UBOOT_MACHINES ?= "T2080RDB T2080RDB_SDCARD T2080RDB_SPIFLASH T2080RDB_NAND T2080RDB_SRIO_PCIE_BOOT" +UBOOT_MACHINES ?= "T2080RDB T2080RDB_SDCARD T2080RDB_SPIFLASH \ + T2080RDB_NAND T2080RDB_SRIO_PCIE_BOOT T2080RDB_SECURE_BOOT \ +" KERNEL_DEVICETREE ?= "t2080rdb.dtb t2080rdb-usdpaa.dtb" KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/85xx/e6500rev2_defconfig" diff --git a/meta-fsl-ppc/conf/machine/t2080rdb.conf b/meta-fsl-ppc/conf/machine/t2080rdb.conf index 67b6d920..28dca0db 100644 --- a/meta-fsl-ppc/conf/machine/t2080rdb.conf +++ b/meta-fsl-ppc/conf/machine/t2080rdb.conf @@ -7,7 +7,9 @@ require conf/machine/include/e6500.inc SOC_FAMILY = "t2:t2080" -UBOOT_MACHINES ?= "T2080RDB T2080RDB_SDCARD T2080RDB_SPIFLASH T2080RDB_NAND T2080RDB_SRIO_PCIE_BOOT" +UBOOT_MACHINES ?= "T2080RDB T2080RDB_SDCARD T2080RDB_SPIFLASH \ + T2080RDB_NAND T2080RDB_SRIO_PCIE_BOOT T2080RDB_SECURE_BOOT \ +" KERNEL_DEVICETREE ?= "t2080rdb.dtb t2080rdb-usdpaa.dtb" KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/85xx/e6500rev2_defconfig" diff --git a/meta-fsl-ppc/conf/machine/t4160qds-64b.conf b/meta-fsl-ppc/conf/machine/t4160qds-64b.conf index 970e54eb..c63aba88 100644 --- a/meta-fsl-ppc/conf/machine/t4160qds-64b.conf +++ b/meta-fsl-ppc/conf/machine/t4160qds-64b.conf @@ -7,7 +7,7 @@ require conf/machine/include/e6500-64b.inc SOC_FAMILY = "t4:t4160" -UBOOT_MACHINES ?= "T4160QDS" +UBOOT_MACHINES ?= "T4160QDS T4160QDS_SECURE_BOOT" KERNEL_DEVICETREE ?= "t4240qds.dtb t4240qds-usdpaa.dtb" KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/85xx/e6500rev2_defconfig" diff --git a/meta-fsl-ppc/conf/machine/t4160qds.conf b/meta-fsl-ppc/conf/machine/t4160qds.conf index 66c114e2..83fb5c84 100644 --- a/meta-fsl-ppc/conf/machine/t4160qds.conf +++ b/meta-fsl-ppc/conf/machine/t4160qds.conf @@ -7,7 +7,7 @@ require conf/machine/include/e6500.inc SOC_FAMILY = "t4:t4160" -UBOOT_MACHINES ?= "T4160QDS" +UBOOT_MACHINES ?= "T4160QDS T4160QDS_SECURE_BOOT" KERNEL_DEVICETREE ?= "t4240qds.dtb t4240qds-usdpaa.dtb" KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/85xx/e6500rev2_defconfig" diff --git a/meta-fsl-ppc/conf/machine/t4240qds-64b.conf b/meta-fsl-ppc/conf/machine/t4240qds-64b.conf index 5d1c12ac..006c2c1f 100644 --- a/meta-fsl-ppc/conf/machine/t4240qds-64b.conf +++ b/meta-fsl-ppc/conf/machine/t4240qds-64b.conf @@ -7,7 +7,7 @@ require conf/machine/include/e6500-64b.inc SOC_FAMILY = "t4:t4240" -UBOOT_MACHINES ?= "T4240QDS" +UBOOT_MACHINES ?= "T4240QDS T4240QDS_SECURE_BOOT" KERNEL_DEVICETREE ?= "t4240qds.dtb t4240qds-usdpaa.dtb" KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/85xx/e6500rev2_defconfig" diff --git a/meta-fsl-ppc/conf/machine/t4240qds.conf b/meta-fsl-ppc/conf/machine/t4240qds.conf index 06673fa4..fe67584c 100644 --- a/meta-fsl-ppc/conf/machine/t4240qds.conf +++ b/meta-fsl-ppc/conf/machine/t4240qds.conf @@ -7,7 +7,7 @@ require conf/machine/include/e6500.inc SOC_FAMILY = "t4:t4240" -UBOOT_MACHINES ?= "T4240QDS" +UBOOT_MACHINES ?= "T4240QDS T4240QDS_SECURE_BOOT" KERNEL_DEVICETREE ?= "t4240qds.dtb t4240qds-usdpaa.dtb" KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/85xx/e6500rev2_defconfig" -- cgit v1.2.3-54-g00ecf From 9c4d9c350217847b2cdf63057fb0609d24a50ee2 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Wed, 7 Jan 2015 17:55:04 +0800 Subject: qe-ucode: update to revision 49efc94 This includes following fixes: 49efc94 Add QE ucode binary for T1024 and LS1021a Signed-off-by: Ting Liu --- meta-fsl-ppc/recipes-bsp/qe-ucode/qe-ucode_git.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-fsl-ppc/recipes-bsp/qe-ucode/qe-ucode_git.bb b/meta-fsl-ppc/recipes-bsp/qe-ucode/qe-ucode_git.bb index 71897dc9..06a7298c 100644 --- a/meta-fsl-ppc/recipes-bsp/qe-ucode/qe-ucode_git.bb +++ b/meta-fsl-ppc/recipes-bsp/qe-ucode/qe-ucode_git.bb @@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = "file://EULA;md5=60037ccba533a5995e8d1a838d85799c" inherit deploy SRC_URI = "git://git.freescale.com/ppc/sdk/qe-ucode.git;nobranch=1" -SRCREV= "10bef345397ba303cca0e900ec1acc09cf05928e" +SRCREV= "49efc94b553de5c2a9bd28093592eff0068e161c" S = "${WORKDIR}/git" -- cgit v1.2.3-54-g00ecf From 9e5ff5bf92a7888018613aad03ecba76d1434599 Mon Sep 17 00:00:00 2001 From: Zongchun Yu Date: Wed, 7 Jan 2015 17:55:06 +0800 Subject: remove duplicate check for e6500 64b kernel build e6500 is a specific core which only support 64bit kernel, no matter rootfs is 32b/64b. qoriq_build_64bit_kernel.bbclass was added to do this. BUILD_64BIT_KERNEL is only set for e6500. It is duplicate to check core and BUILD_64BIT_KERNEL at the same time. remove one. Signed-off-by: Zongchun Yu --- meta-fsl-ppc/classes/qoriq_build_64bit_kernel.bbclass | 4 ---- 1 file changed, 4 deletions(-) diff --git a/meta-fsl-ppc/classes/qoriq_build_64bit_kernel.bbclass b/meta-fsl-ppc/classes/qoriq_build_64bit_kernel.bbclass index 562afd14..5dd8931f 100644 --- a/meta-fsl-ppc/classes/qoriq_build_64bit_kernel.bbclass +++ b/meta-fsl-ppc/classes/qoriq_build_64bit_kernel.bbclass @@ -2,10 +2,6 @@ inherit distro_features_check REQUIRED_DISTRO_FEATURES_e6500 += "multiarch" python () { - pkgarch = d.getVar("TUNE_PKGARCH", True) - if not "ppce6500" == pkgarch: - return - promote_kernel = d.getVar('BUILD_64BIT_KERNEL') if promote_kernel == "1": d.setVar('KERNEL_CC_append', ' -m64') -- cgit v1.2.3-54-g00ecf From 8362551c5d623b14825ad16b6f5d9a6c9ff6a675 Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Wed, 7 Jan 2015 17:55:07 +0800 Subject: asf: update revision to 16eb472 This update to fsl sdk v1.7 release. The detailed changes can be found at: http://git.freescale.com/git/cgit.cgi/ppc/sdk/asf.git/ Other changes to sync with meta-fsl-arm: * install kernel modules to ${D}/lib/modules/${KERNEL_VERSION}/asf * install scripts to ${D}/${libexecdir}/ * remove dependency on virtual/kernel as it inherit module.bbclass Signed-off-by: Zhenhua Luo --- meta-fsl-ppc/recipes-kernel/asf/asf_git.bb | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/meta-fsl-ppc/recipes-kernel/asf/asf_git.bb b/meta-fsl-ppc/recipes-kernel/asf/asf_git.bb index 9597257c..8070f5a2 100644 --- a/meta-fsl-ppc/recipes-kernel/asf/asf_git.bb +++ b/meta-fsl-ppc/recipes-kernel/asf/asf_git.bb @@ -4,10 +4,8 @@ LICENSE = "GPLv2 & GPLv2+ & BSD" LIC_FILES_CHKSUM = "file://COPYING;md5=b5881ecf398da8a03a3f4c501e29d287" SRC_URI = "git://git.freescale.com/ppc/sdk/asf.git;nobranch=1" -SRCREV = "f107bc7dac7fe74d765dc09f66dca84951921d2c" +SRCREV = "16eb472d6b2b34c8b605a86c469611bc8ddec1c9" -DEPENDS="virtual/kernel" -RDEPENDS_${PN} += "ipsec-tools" inherit module qoriq_build_64bit_kernel @@ -16,12 +14,16 @@ S = "${WORKDIR}/git/asfmodule" EXTRA_OEMAKE = "CROSS_COMPILE=${TARGET_PREFIX}" export KERNEL_PATH = "${STAGING_KERNEL_DIR}" +INHIBIT_PACKAGE_STRIP = "1" + do_install(){ - mkdir -p ${D}/usr/driver/asf - cp -rf ${S}/bin/full ${D}/usr/driver/asf - cp -rf ${S}/bin/min ${D}/usr/driver/asf - cp -rf ${S}/../scripts ${D}/usr/driver/asf/. + install -d ${D}/${libexecdir} + install -d ${D}/lib/modules/${KERNEL_VERSION}/asf + cp -rf ${S}/bin/full ${D}/lib/modules/${KERNEL_VERSION}/asf + cp -rf ${S}/bin/min ${D}/lib/modules/${KERNEL_VERSION}/asf + cp -rf ${S}/../scripts ${D}/${libexecdir}/ } -FILES_${PN} += "/usr/driver/asf" -INHIBIT_PACKAGE_STRIP = "1" +FILES_${PN} += "${libexecdir} /lib/modules/${KERNEL_VERSION}/asf" +RDEPENDS_${PN} += "ipsec-tools" + -- cgit v1.2.3-54-g00ecf From 3e377f6b33ec471677aeccb450c4b84926c3130f Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Fri, 9 Jan 2015 10:41:54 +0800 Subject: cs4315-firmware: remove recipe The source code of cs4315-firmware is not available in public git repo due to license issue, remove the recipe. Build error log: ERROR: Function failed: Fetcher failure for URL: 'git://git.freescale.com/ppc/sdk/firmware.git;nobranch=1'. Unable to fetch URL from any source. Signed-off-by: Zhenhua Luo --- .../cs4315-firmware/cs4315-firmware_git.bb | 26 ---------------------- 1 file changed, 26 deletions(-) delete mode 100644 meta-fsl-ppc/recipes-bsp/cs4315-firmware/cs4315-firmware_git.bb diff --git a/meta-fsl-ppc/recipes-bsp/cs4315-firmware/cs4315-firmware_git.bb b/meta-fsl-ppc/recipes-bsp/cs4315-firmware/cs4315-firmware_git.bb deleted file mode 100644 index 153e8f85..00000000 --- a/meta-fsl-ppc/recipes-bsp/cs4315-firmware/cs4315-firmware_git.bb +++ /dev/null @@ -1,26 +0,0 @@ -DESCRIPTION = "Firmware image for the Cortina CS4315 PHY" -LICENSE = "Cortina" -LIC_FILES_CHKSUM = "file://Cortina-EULA;md5=ef3a0b9eaf40547d263a4f67040dc56e" - -inherit deploy - -SRC_URI = "git://git.freescale.com/ppc/sdk/firmware.git;nobranch=1" -SRCREV = "ad5a3108f9ede39ea41fde18d4ac0cc7680cf650" - -S = "${WORKDIR}/git" - -do_install () { - install -d ${D}/boot - install -m 644 ${S}/cs4315-cs4340-PHY-ucode.txt ${D}/boot/ -} - -do_deploy () { - install -d ${DEPLOYDIR}/ - install -m 644 ${S}/cs4315-cs4340-PHY-ucode.txt ${DEPLOYDIR}/ -} -addtask deploy before do_build after do_install - -PACKAGES += "${PN}-image" -FILES_${PN}-image += "/boot" -COMPATIBLE_MACHINE = "(t2080rdb|t2080rdb-64b|t4240rdb|t4240rdb-64b)" -ALLOW_EMPTY_${PN} = "1" -- cgit v1.2.3-54-g00ecf From b99b6101764b8fc76fc4bcd309d00cb94a625b7b Mon Sep 17 00:00:00 2001 From: Rich Schmitt Date: Fri, 9 Jan 2015 17:09:09 +0800 Subject: uio-seville: update to revision 35af73f This includes following fixes: 35af73f Fix: Copy user-space buffer of injected control frame to kernel 00c8040 Add multiple error labels in the probe function 2835689 Fix: Remove memory leaks when the module is removed or fails on probing d770a37 Fix: Remove compile warning on 32b 89e29fc Fix: Remove unnecessary checks adbb47e Beautify: Rename macros into more proper names d5cac6e Add "poll()" function for NPI device 220cee3 Replace rescheduling with work queues 2a5fe4e Add cacheline support for extraction of control frames 6f14f0b Fix: UIO device might not be removed properly if module fails to initialize 2dcea55 Removed unecessary includes 1077880 Add UIO driver 68ab7bd Initial empty repository update COMPATIBLE_MACHINE to use soc_family. Signed-off-by: Zhenhua Luo --- meta-fsl-ppc/recipes-kernel/uio-seville/uio-seville_0.1.bb | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/meta-fsl-ppc/recipes-kernel/uio-seville/uio-seville_0.1.bb b/meta-fsl-ppc/recipes-kernel/uio-seville/uio-seville_0.1.bb index 0307a6dd..51e1475a 100755 --- a/meta-fsl-ppc/recipes-kernel/uio-seville/uio-seville_0.1.bb +++ b/meta-fsl-ppc/recipes-kernel/uio-seville/uio-seville_0.1.bb @@ -2,11 +2,14 @@ DESCRIPTION = "UIO driver for T1040 L2 Switch" LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e" -SRC_URI = "git://git.freescale.com/ppc/sdk/l2switch-uio.git" -SRCREV = "1077880ff3557d44dc5dd9fe5e2f4ee1474fb25f" +SRC_URI = "git://git.freescale.com/ppc/sdk/l2switch-uio.git;branch=sdk-v1.7.x" +SRCREV = "35af73f3ba00745777f32787400d9eb0317d7ff5" inherit module S = "${WORKDIR}/git/uio-driver" -COMPATIBLE_MACHINE = "(t1040qds|t1040rdb|t1040rdb-64b)" +COMPATIBLE_MACHINE ?= "(none)" +COMPATIBLE_MACHINE_t1040 = ".*" +COMPATIBLE_MACHINE_t1042 = ".*" + -- cgit v1.2.3-54-g00ecf From dc2e2ff97a6f8a83ac922c395f70d21eecc60fce Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Fri, 9 Jan 2015 17:09:10 +0800 Subject: multilib: use ?= to allow overridden in local.conf The multilib setting was set in .inc which was included by the .conf. In bitbake.conf, .conf is included after local.conf. Change to use ?= to not override the value in local.conf. This is useful when using external toolchain which does not need to enable multilib. Signed-off-by: Zongchun Yu --- meta-fsl-ppc/conf/machine/include/e5500-64b.inc | 4 ++-- meta-fsl-ppc/conf/machine/include/e6500-64b.inc | 4 ++-- meta-fsl-ppc/conf/machine/include/e6500.inc | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/meta-fsl-ppc/conf/machine/include/e5500-64b.inc b/meta-fsl-ppc/conf/machine/include/e5500-64b.inc index 07e6274e..d238ca89 100644 --- a/meta-fsl-ppc/conf/machine/include/e5500-64b.inc +++ b/meta-fsl-ppc/conf/machine/include/e5500-64b.inc @@ -7,6 +7,6 @@ require conf/machine/include/qoriq-base.inc MACHINEOVERRIDES .= ":e5500-64b" require conf/multilib.conf -MULTILIBS = "multilib:lib32" -DEFAULTTUNE_virtclass-multilib-lib32 = "ppce5500" +MULTILIBS ?= "multilib:lib32" +DEFAULTTUNE_virtclass-multilib-lib32 ?= "ppce5500" diff --git a/meta-fsl-ppc/conf/machine/include/e6500-64b.inc b/meta-fsl-ppc/conf/machine/include/e6500-64b.inc index aa722a51..522ee71f 100644 --- a/meta-fsl-ppc/conf/machine/include/e6500-64b.inc +++ b/meta-fsl-ppc/conf/machine/include/e6500-64b.inc @@ -7,6 +7,6 @@ require conf/machine/include/qoriq-base.inc MACHINEOVERRIDES .= ":e6500-64b" require conf/multilib.conf -MULTILIBS = "multilib:lib32" -DEFAULTTUNE_virtclass-multilib-lib32 = "ppce6500" +MULTILIBS ?= "multilib:lib32" +DEFAULTTUNE_virtclass-multilib-lib32 ?= "ppce6500" diff --git a/meta-fsl-ppc/conf/machine/include/e6500.inc b/meta-fsl-ppc/conf/machine/include/e6500.inc index e6848bdc..4121fbef 100644 --- a/meta-fsl-ppc/conf/machine/include/e6500.inc +++ b/meta-fsl-ppc/conf/machine/include/e6500.inc @@ -8,6 +8,6 @@ MACHINEOVERRIDES .= ":e6500" BUILD_64BIT_KERNEL = "1" require conf/multilib.conf -MULTILIBS = "multilib:lib64" -DEFAULTTUNE_virtclass-multilib-lib64 = "ppc64e6500" +MULTILIBS ?= "multilib:lib64" +DEFAULTTUNE_virtclass-multilib-lib64 ?= "ppc64e6500" -- cgit v1.2.3-54-g00ecf From 95a9bd749b4159e1e52a832e588253e66f96725f Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Tue, 13 Jan 2015 17:22:54 +0800 Subject: qe-ucode: install if QE_UCODE defined * QE_UCODE definition is moved to .conf * add check if QE_UCODE defined in anonymous python function * install the binary into /boot Signed-off-by: Ting Liu --- meta-fsl-ppc/recipes-bsp/qe-ucode/qe-ucode_git.bb | 29 ++++++++++------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/meta-fsl-ppc/recipes-bsp/qe-ucode/qe-ucode_git.bb b/meta-fsl-ppc/recipes-bsp/qe-ucode/qe-ucode_git.bb index 06a7298c..028d9bcd 100644 --- a/meta-fsl-ppc/recipes-bsp/qe-ucode/qe-ucode_git.bb +++ b/meta-fsl-ppc/recipes-bsp/qe-ucode/qe-ucode_git.bb @@ -3,6 +3,13 @@ SECTION = "qe-ucode" LICENSE = "Freescale-EULA" LIC_FILES_CHKSUM = "file://EULA;md5=60037ccba533a5995e8d1a838d85799c" +python () { + if not d.getVar("QE_UCODE", True): + machine = d.getVar("MACHINE", True) + raise bb.parse.SkipPackage("QE_UCODE not set in \ + meta-fsl-ppc/conf/machine/%s.conf" % machine) +} + inherit deploy SRC_URI = "git://git.freescale.com/ppc/sdk/qe-ucode.git;nobranch=1" @@ -11,28 +18,18 @@ SRCREV= "49efc94b553de5c2a9bd28093592eff0068e161c" S = "${WORKDIR}/git" do_install () { - case ${MACHINE} in - p1025rdb|p1021rdb|p1025twr) QE_UCODE="fsl_qe_ucode_1021_10_A.bin";; - t1040rdb|t1040rdb-64b) QE_UCODE="iram_Type_A_T1040_r1.0.bin";; - *) QE_UCODE="";; - esac - install -d ${D}/ - install -m 644 ${QE_UCODE} ${D}/ + install -d ${D}/boot + install -m 644 ${QE_UCODE} ${D}/boot/ } do_deploy () { - case ${MACHINE} in - p1025rdb|p1021rdb|p1025twr) QE_UCODE="fsl_qe_ucode_1021_10_A.bin";; - t1040rdb|t1040rdb-64b) QE_UCODE="iram_Type_A_T1040_r1.0.bin";; - *) QE_UCODE="";; - esac - install -d ${DEPLOYDIR}/ - install -m 644 ${QE_UCODE} ${DEPLOYDIR}/ + install -d ${DEPLOYDIR}/boot + install -m 644 ${QE_UCODE} ${DEPLOYDIR}/boot/ } addtask deploy before do_build after do_install PACKAGES += "${PN}-image" -FILES_${PN}-image += "/*" +FILES_${PN}-image += "/boot/*" ALLOW_EMPTY_${PN} = "1" -COMPATIBLE_MACHINE = "(p1025rdb|p1021rdb|p1025twr|t1040rdb|t1040rdb-64b)" +COMPATIBLE_MACHINE = "(p1021rdb|p1025twr|t1)" -- cgit v1.2.3-54-g00ecf From b98403bec88ad2be37b4f0174a5f60ddf7449b66 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Tue, 13 Jan 2015 17:22:55 +0800 Subject: add QE_UCODE definition in machine.conf Signed-off-by: Ting Liu --- meta-fsl-ppc/conf/machine/p1021rdb.conf | 1 + meta-fsl-ppc/conf/machine/p1025twr.conf | 1 + meta-fsl-ppc/conf/machine/t1024qds-64b.conf | 1 + meta-fsl-ppc/conf/machine/t1024qds.conf | 1 + meta-fsl-ppc/conf/machine/t1024rdb-64b.conf | 1 + meta-fsl-ppc/conf/machine/t1024rdb.conf | 1 + meta-fsl-ppc/conf/machine/t1040rdb-64b.conf | 1 + meta-fsl-ppc/conf/machine/t1040rdb.conf | 1 + meta-fsl-ppc/conf/machine/t1042rdb-64b.conf | 1 + meta-fsl-ppc/conf/machine/t1042rdb-pi-64b.conf | 1 + meta-fsl-ppc/conf/machine/t1042rdb-pi.conf | 1 + meta-fsl-ppc/conf/machine/t1042rdb.conf | 1 + 12 files changed, 12 insertions(+) diff --git a/meta-fsl-ppc/conf/machine/p1021rdb.conf b/meta-fsl-ppc/conf/machine/p1021rdb.conf index 4c793e8e..03a18215 100644 --- a/meta-fsl-ppc/conf/machine/p1021rdb.conf +++ b/meta-fsl-ppc/conf/machine/p1021rdb.conf @@ -13,4 +13,5 @@ KERNEL_DEVICETREE ?= "p1021rdb-pc_32b.dtb" KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" JFFS2_ERASEBLOCK = "0x20000" +QE_UCODE ?= "fsl_qe_ucode_1021_10_A.bin" diff --git a/meta-fsl-ppc/conf/machine/p1025twr.conf b/meta-fsl-ppc/conf/machine/p1025twr.conf index 67fa569f..0c6bb57a 100644 --- a/meta-fsl-ppc/conf/machine/p1025twr.conf +++ b/meta-fsl-ppc/conf/machine/p1025twr.conf @@ -13,4 +13,5 @@ KERNEL_DEVICETREE ?= "p1025twr_32b.dtb" KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/mpc85xx_smp_defconfig" JFFS2_ERASEBLOCK = "0x20000" +QE_UCODE ?= "fsl_qe_ucode_1021_10_A.bin" diff --git a/meta-fsl-ppc/conf/machine/t1024qds-64b.conf b/meta-fsl-ppc/conf/machine/t1024qds-64b.conf index 81d57633..9dc047cc 100644 --- a/meta-fsl-ppc/conf/machine/t1024qds-64b.conf +++ b/meta-fsl-ppc/conf/machine/t1024qds-64b.conf @@ -12,4 +12,5 @@ KERNEL_DEVICETREE ?= "t1024qds.dtb t1024qds-usdpaa.dtb t1024qds-usdpaa-capwap.dt KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/corenet64_fmanv3_smp_defconfig" JFFS2_ERASEBLOCK = "0x10000" +QE_UCODE ?= "iram_Type_A_T1024_r1.0.bin" diff --git a/meta-fsl-ppc/conf/machine/t1024qds.conf b/meta-fsl-ppc/conf/machine/t1024qds.conf index 3e5cac1a..dc043a3f 100644 --- a/meta-fsl-ppc/conf/machine/t1024qds.conf +++ b/meta-fsl-ppc/conf/machine/t1024qds.conf @@ -12,4 +12,5 @@ KERNEL_DEVICETREE ?= "t1024qds.dtb t1024qds-usdpaa.dtb t1024qds-usdpaa-capwap.dt KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/corenet32_fmanv3_smp_defconfig" JFFS2_ERASEBLOCK = "0x10000" +QE_UCODE ?= "iram_Type_A_T1024_r1.0.bin" diff --git a/meta-fsl-ppc/conf/machine/t1024rdb-64b.conf b/meta-fsl-ppc/conf/machine/t1024rdb-64b.conf index c40bba8a..e9e66b21 100644 --- a/meta-fsl-ppc/conf/machine/t1024rdb-64b.conf +++ b/meta-fsl-ppc/conf/machine/t1024rdb-64b.conf @@ -12,4 +12,5 @@ KERNEL_DEVICETREE ?= "t1024rdb.dtb t1024rdb-usdpaa.dtb t1024rdb-usdpaa-capwap.dt KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/corenet64_fmanv3_smp_defconfig" JFFS2_ERASEBLOCK = "0x10000" +QE_UCODE ?= "iram_Type_A_T1024_r1.0.bin" diff --git a/meta-fsl-ppc/conf/machine/t1024rdb.conf b/meta-fsl-ppc/conf/machine/t1024rdb.conf index 82a04009..80d87bdd 100644 --- a/meta-fsl-ppc/conf/machine/t1024rdb.conf +++ b/meta-fsl-ppc/conf/machine/t1024rdb.conf @@ -12,4 +12,5 @@ KERNEL_DEVICETREE ?= "t1024rdb.dtb t1024rdb-usdpaa.dtb t1024rdb-usdpaa-capwap.dt KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/corenet32_fmanv3_smp_defconfig" JFFS2_ERASEBLOCK = "0x10000" +QE_UCODE ?= "iram_Type_A_T1024_r1.0.bin" diff --git a/meta-fsl-ppc/conf/machine/t1040rdb-64b.conf b/meta-fsl-ppc/conf/machine/t1040rdb-64b.conf index c489f8f8..6196097e 100644 --- a/meta-fsl-ppc/conf/machine/t1040rdb-64b.conf +++ b/meta-fsl-ppc/conf/machine/t1040rdb-64b.conf @@ -12,4 +12,5 @@ KERNEL_DEVICETREE ?= "t1040rdb.dtb t1040rdb-usdpaa.dtb" KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/corenet64_fmanv3_smp_defconfig" JFFS2_ERASEBLOCK = "0x10000" +QE_UCODE ?= "iram_Type_A_T1040_r1.0.bin" diff --git a/meta-fsl-ppc/conf/machine/t1040rdb.conf b/meta-fsl-ppc/conf/machine/t1040rdb.conf index 5c4f682f..e70c44b2 100644 --- a/meta-fsl-ppc/conf/machine/t1040rdb.conf +++ b/meta-fsl-ppc/conf/machine/t1040rdb.conf @@ -12,4 +12,5 @@ KERNEL_DEVICETREE ?= "t1040rdb.dtb t1040rdb-usdpaa.dtb" KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/corenet32_fmanv3_smp_defconfig" JFFS2_ERASEBLOCK = "0x10000" +QE_UCODE ?= "iram_Type_A_T1040_r1.0.bin" diff --git a/meta-fsl-ppc/conf/machine/t1042rdb-64b.conf b/meta-fsl-ppc/conf/machine/t1042rdb-64b.conf index 23c4a0fe..d60cdd06 100644 --- a/meta-fsl-ppc/conf/machine/t1042rdb-64b.conf +++ b/meta-fsl-ppc/conf/machine/t1042rdb-64b.conf @@ -12,4 +12,5 @@ KERNEL_DEVICETREE ?= "t1042rdb_pi.dtb" KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/corenet64_fmanv3_smp_defconfig" JFFS2_ERASEBLOCK = "0x10000" +QE_UCODE ?= "iram_Type_A_T1040_r1.0.bin" diff --git a/meta-fsl-ppc/conf/machine/t1042rdb-pi-64b.conf b/meta-fsl-ppc/conf/machine/t1042rdb-pi-64b.conf index 1b0adea6..4ebef183 100644 --- a/meta-fsl-ppc/conf/machine/t1042rdb-pi-64b.conf +++ b/meta-fsl-ppc/conf/machine/t1042rdb-pi-64b.conf @@ -12,6 +12,7 @@ KERNEL_DEVICETREE ?= "t1042rdb_pi.dtb" KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/corenet64_fmanv3_smp_defconfig" JFFS2_ERASEBLOCK = "0x10000" +QE_UCODE ?= "iram_Type_A_T1040_r1.0.bin" PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xorg" XSERVER = " \ diff --git a/meta-fsl-ppc/conf/machine/t1042rdb-pi.conf b/meta-fsl-ppc/conf/machine/t1042rdb-pi.conf index 7a529c34..60270f04 100644 --- a/meta-fsl-ppc/conf/machine/t1042rdb-pi.conf +++ b/meta-fsl-ppc/conf/machine/t1042rdb-pi.conf @@ -12,6 +12,7 @@ KERNEL_DEVICETREE ?= "t1042rdb_pi.dtb" KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/corenet32_fmanv3_smp_defconfig" JFFS2_ERASEBLOCK = "0x10000" +QE_UCODE ?= "iram_Type_A_T1040_r1.0.bin" PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xorg" XSERVER = " \ diff --git a/meta-fsl-ppc/conf/machine/t1042rdb.conf b/meta-fsl-ppc/conf/machine/t1042rdb.conf index e10065b6..b530b0ed 100644 --- a/meta-fsl-ppc/conf/machine/t1042rdb.conf +++ b/meta-fsl-ppc/conf/machine/t1042rdb.conf @@ -12,4 +12,5 @@ KERNEL_DEVICETREE ?= "t1042rdb_pi.dtb" KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/corenet32_fmanv3_smp_defconfig" JFFS2_ERASEBLOCK = "0x10000" +QE_UCODE ?= "iram_Type_A_T1040_r1.0.bin" -- cgit v1.2.3-54-g00ecf From e73628337d43671a166405d63f22e18f8f1edca8 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Tue, 13 Jan 2015 18:27:37 +0800 Subject: auto-resp: add recipe Signed-off-by: Ting Liu --- meta-fsl-ppc/recipes-kernel/auto-resp/ar_git.bb | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 meta-fsl-ppc/recipes-kernel/auto-resp/ar_git.bb diff --git a/meta-fsl-ppc/recipes-kernel/auto-resp/ar_git.bb b/meta-fsl-ppc/recipes-kernel/auto-resp/ar_git.bb new file mode 100644 index 00000000..81a94a04 --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/auto-resp/ar_git.bb @@ -0,0 +1,25 @@ +SUMMARY = "Auto Response Control Module" +LICENSE = "GPLv2 & BSD" +LIC_FILES_CHKSUM = "file://COPYING;md5=b5881ecf398da8a03a3f4c501e29d287" + +inherit module + +SRC_URI = "git://git.freescale.com/ppc/sdk/auto-resp.git;branch=sdk-v1.7.x" +SRCREV = "dbede76fb4020a370baa393f7c53af4c0db8f175" + +S = "${WORKDIR}/git" + +EXTRA_OEMAKE = "CROSS_COMPILE=${TARGET_PREFIX} SYSROOT=${STAGING_DIR_TARGET}" +export KERNEL_PATH + +INHIBIT_PACKAGE_STRIP = "1" + +do_install(){ + install -d ${D}/lib/modules/${KERNEL_VERSION} + install -d ${D}${bindir} + install -m 644 ${B}/bin/ar.ko ${D}/lib/modules/${KERNEL_VERSION}/ + cp -f ${S}/bin/ar_* ${D}${bindir}/ +} + +FILES_${PN} += "${bindir}/" + -- cgit v1.2.3-54-g00ecf From f09d259d7a54876a312527ef570a151878701dac Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Tue, 13 Jan 2015 18:27:38 +0800 Subject: cst: upgrade revision to 2d35e98 This includes following fixes: 2d35e98 CST : Add P2041 support to cst. c8b29ef CST: initialize uninitialized variables 6d30fc3 Makefile: use CFLAGS environment variable 39a4b89 Makefile: add install rule 7e9d814 Makefile: check OPENSSL setting before use 4ce2fd1 Modify input files to add HASH_FILE and SIGN_FILE felds. 2934719 ls1: ie_key files modified 13cef32 ls1: Remove extra keys from input file in ls1 14660b8 Modify input files to make consisitency with images. 6dbd697 Modify signature offset. b6d3fe6 input_files/uni_sign: Updated uboot binary name to u-boot.bin 2344105 IE Keys : Add input files 517b3d8 Fixed error handling for sign_embed tool. f711555 Modify ESBC header fields and use case for SRK and IE KEY. c9361dd sign_embed: it would embed signature over header passed. ec541fa gen_sign: it would calculate and generate signature over hash passed. 3b0a522 Modifications for changing argc to optind. 78cfdba Parsing of esbc flag is done prior of other fields. c0f49a8 Add feature of comparison of key pairs. c22c94f Add gen_drv tool. 7abb3e1 Modularise the key extraction from key file. 5ac9cd1 Add error handling for not supported values provided as input. 64eb9c4 Modify parsing of field values. c73ae3a Modify Makefile to discard compilation of uni_pbi tool. 8023fa1 Modify usage of gen_otpmk utility. 9065d2a Corrected the setting of FSL_UID and OEM_UID flag 7b688ed uni_pbi tool added 4ae8899 LS2 specific changes. 5e856de Add T2080 as target. 582fa00 Add input files for ie_key usage. f5ac295 Modify features enabled with different options. bcb3791 modify option available. 34c2290 Add key_ext option. 3abf8d3 Signature is moved to end. 7d58769 Add feature to accept externally generated signature. 43a917a Add export hash feature. d1877da Remove redundancy with keys usage. 9b049cb Add LS2 header support. 8b0044b Add IE key usage support for ESBC header. a684f4f support for ESBC header generation 63c901a Add ISBC Extension Key Feature. 746a9b9 Linked implementation for headers and tables 15ae37e Revert "LS1021: unisign fixed for group5" 54661bb Corrected LS1 input files. 5f58c80 Corrected dtb name in input file for LS1 dtb 8c0feeb LS1: Change the input file for NOR addresses Also sync with meta-fsl-arm. --- meta-fsl-ppc/recipes-extended/cst/cst_git.bb | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/meta-fsl-ppc/recipes-extended/cst/cst_git.bb b/meta-fsl-ppc/recipes-extended/cst/cst_git.bb index 0ec883b2..e9f1b6f0 100644 --- a/meta-fsl-ppc/recipes-extended/cst/cst_git.bb +++ b/meta-fsl-ppc/recipes-extended/cst/cst_git.bb @@ -1,4 +1,4 @@ -DESCRIPTION = "CST Tool" +SUMMARY = "utility for security boot" SECTION = "cst" LICENSE = "BSD" @@ -7,23 +7,20 @@ LIC_FILES_CHKSUM = "file://RELEASENOTES;beginline=8;endline=43;md5=5a7b22a2c96b5 DEPENDS += "openssl" +inherit kernel-arch + SRC_URI = "git://git.freescale.com/ppc/sdk/cst.git;nobranch=1" -SRCREV = "321b798b84cb5fe6564dfb233dea046e779d6f74" +SRCREV = "2d35e98539c0daa2bc8049e3bd44994d3d93bbe7" S = "${WORKDIR}/git" -EXTRA_OEMAKE = 'OPENSSL_LIB_PATH=${STAGING_LIBDIR} OPENSSL_INC_PATH=${STAGING_INCDIR} CC="${CC}" LD="${CC}" LDFLAGS="${LDFLAGS}"' +EXTRA_OEMAKE = 'CC="${CC}" LD="${CC}"' + +PARALLEL_MAKE = "" do_install () { - install -d ${D}/${bindir}/cst - install -m 755 ${S}/gen_keys ${D}/${bindir}/cst/ - install -m 755 ${S}/gen_otpmk ${D}/${bindir}/cst/ - install -m 755 ${S}/uni_cfsign ${D}/${bindir}/cst/ - install -m 755 ${S}/uni_sign ${D}/${bindir}/cst/ - cp -rf ${S}/input_files ${D}/${bindir}/cst + oe_runmake install DESTDIR=${D} BIN_DEST_DIR=${bindir} } -BBCLASSEXTEND = "native nativesdk" -PARALLEL_MAKE = "" - FILES_${PN}-dbg += "${bindir}/cst/.debug" +BBCLASSEXTEND = "native nativesdk" -- cgit v1.2.3-54-g00ecf From d71dde80b5e30e457279c455d3363df3b4ff581c Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Tue, 13 Jan 2015 18:27:39 +0800 Subject: u-boot: replace base_contains with python codes Signed-off-by: Ting Liu --- .../recipes-bsp/u-boot/u-boot-qoriq_2014.07.bb | 26 +++++++++------------- 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/meta-fsl-ppc/recipes-bsp/u-boot/u-boot-qoriq_2014.07.bb b/meta-fsl-ppc/recipes-bsp/u-boot/u-boot-qoriq_2014.07.bb index 4a1b9081..43af42d7 100644 --- a/meta-fsl-ppc/recipes-bsp/u-boot/u-boot-qoriq_2014.07.bb +++ b/meta-fsl-ppc/recipes-bsp/u-boot/u-boot-qoriq_2014.07.bb @@ -27,22 +27,17 @@ python () { ml = d.getVar("MULTILIB_VARIANTS", True) arch = d.getVar("OVERRIDES", True) - if ("e5500-64b:" in arch or "e6500-64b:" in arch) and not "lib32" in ml: - raise bb.parse.SkipPackage("Building the u-boot for this arch requires multilib to be enabled") + if "e5500-64b:" in arch or "e6500-64b:" in arch: + if not "lib32" in ml: + raise bb.parse.SkipPackage("Building the u-boot for this arch requires multilib to be enabled") + sys_multilib = 'powerpc-' + d.getVar('DISTRO') + 'mllib32-' + d.getVar('HOST_OS') + d.setVar('DEPENDS_append', ' lib32-gcc-cross-powerpc lib32-libgcc') + d.setVar('PATH_append', ':' + d.getVar('STAGING_BINDIR_NATIVE') + '/' + sys_multilib) + d.setVar('TOOLCHAIN_OPTIONS_append', '/../lib32-' + d.getVar("MACHINE")) + d.setVar("WRAP_TARGET_PREFIX", sys_multilib + '-') } -DEPENDS_append_e5500-64b = "${@base_contains('TCMODE', 'external-fsl', '', ' lib32-gcc-cross-powerpc lib32-libgcc', d)}" -PATH_append_e5500-64b = ":${STAGING_BINDIR_NATIVE}/powerpc${TARGET_VENDOR_virtclass-multilib-lib32}-${HOST_OS}/" -TOOLCHAIN_OPTIONS_append_e5500-64b = "${@base_contains('TCMODE', 'external-fsl', '', '/../lib32-${MACHINE}', d)}" -TARGET_VENDOR_virtclass-multilib-lib32 ?= "${@base_contains('TCMODE', 'external-fsl', '', '-${DISTRO}mllib32', d)}" -WRAP_TARGET_PREFIX_e5500-64b := "powerpc${TARGET_VENDOR_virtclass-multilib-lib32}-${HOST_OS}-" - -DEPENDS_append_e6500-64b = "${@base_contains('TCMODE', 'external-fsl', '', ' lib32-gcc-cross-powerpc lib32-libgcc', d)}" -PATH_append_e6500-64b = ":${STAGING_BINDIR_NATIVE}/powerpc${TARGET_VENDOR_virtclass-multilib-lib32}-${HOST_OS}/" -TOOLCHAIN_OPTIONS_append_e6500-64b = "${@base_contains('TCMODE', 'external-fsl', '', '/../lib32-${MACHINE}', d)}" -TARGET_VENDOR_virtclass-multilib-lib32 ?= "${@base_contains('TCMODE', 'external-fsl', '', '-${DISTRO}mllib32', d)}" -WRAP_TARGET_PREFIX_e6500-64b := "powerpc${TARGET_VENDOR_virtclass-multilib-lib32}-${HOST_OS}-" -WRAP_TARGET_PREFIX = "${TARGET_PREFIX}" +WRAP_TARGET_PREFIX ?= "${TARGET_PREFIX}" PACKAGE_ARCH = "${MACHINE_ARCH}" @@ -51,8 +46,7 @@ UBOOT_LOCALVERSION = "${@d.getVar('SDK_VERSION', True).partition(' ')[0]}" USRC ?= "" S = '${@base_conditional("USRC", "", "${WORKDIR}/git", "${USRC}", d)}' -CROSS_COMPILE = '${@base_conditional("TCMODE", "external-fsl", "${TARGET_PREFIX}", "${WRAP_TARGET_PREFIX}", d)}' -EXTRA_OEMAKE = 'CROSS_COMPILE=${CROSS_COMPILE} CC="${CROSS_COMPILE}gcc ${TOOLCHAIN_OPTIONS}"' +EXTRA_OEMAKE = 'CROSS_COMPILE=${WRAP_TARGET_PREFIX} CC="${WRAP_TARGET_PREFIX}gcc ${TOOLCHAIN_OPTIONS}"' do_compile () { unset LDFLAGS -- cgit v1.2.3-54-g00ecf From a0a5896dad0091b6021e1999f316b781e39c467f Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Tue, 13 Jan 2015 21:25:44 +0800 Subject: uspdcp: remove as it is not bsp related This pkg is for fsl security, not bsp related. will put it to fsl distro layer for security. Signed-off-by: Ting Liu --- meta-fsl-ppc/recipes-extended/uspdcp/uspdcp_git.bb | 21 --------------------- 1 file changed, 21 deletions(-) delete mode 100644 meta-fsl-ppc/recipes-extended/uspdcp/uspdcp_git.bb diff --git a/meta-fsl-ppc/recipes-extended/uspdcp/uspdcp_git.bb b/meta-fsl-ppc/recipes-extended/uspdcp/uspdcp_git.bb deleted file mode 100644 index 71e68ccc..00000000 --- a/meta-fsl-ppc/recipes-extended/uspdcp/uspdcp_git.bb +++ /dev/null @@ -1,21 +0,0 @@ -DESCRIPTION = "SEC user space driver package" -LICENSE = "BSD GPLv2" - -DEPENDS += "flib usdpaa" - -COMPATIBLE_HOST_qoriq-ppc = ".*" -COMPATIBLE_HOST ?= "(none)" - -# no COPYING file in current git tree, need to be fixed -LIC_FILES_CHKSUM = "file://Makefile;endline=30;md5=83b6209ab517640a7390536a08d33609" - -SRC_URI = "git://git.freescale.com/ppc/sdk/uspdcp.git;nobranch=1" -SRCREV = "30016cdf36553c14f7143ef005a4925edd901fb0" - -S = "${WORKDIR}/git" - -EXTRA_OEMAKE="ARCH=${TARGET_ARCH} EXTRA_DEFINE='USDPAA CONFIG_PHYS_64BIT' CROSS_COMPILE=${TARGET_PREFIX} SDK_DIR=${STAGING_DIR}/${MACHINE}" - -do_install(){ - oe_runmake install DESTDIR=${D} -} -- cgit v1.2.3-54-g00ecf From aeff0d805721f00d841522c65606ce3a2f35d007 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Tue, 13 Jan 2015 23:04:30 +0800 Subject: sysvinit: remove obsolete bbappend Signed-off-by: Ting Liu --- meta-fsl-ppc/recipes-core/sysvinit/sysvinit_2.88dsf.bbappend | 1 - 1 file changed, 1 deletion(-) delete mode 100644 meta-fsl-ppc/recipes-core/sysvinit/sysvinit_2.88dsf.bbappend diff --git a/meta-fsl-ppc/recipes-core/sysvinit/sysvinit_2.88dsf.bbappend b/meta-fsl-ppc/recipes-core/sysvinit/sysvinit_2.88dsf.bbappend deleted file mode 100644 index 72d991c7..00000000 --- a/meta-fsl-ppc/recipes-core/sysvinit/sysvinit_2.88dsf.bbappend +++ /dev/null @@ -1 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" -- cgit v1.2.3-54-g00ecf From be31dec2d48897b8c7a2ae60821f493a691acb5f Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Tue, 13 Jan 2015 23:04:31 +0800 Subject: move all common definitions onto qoriq-base.inc Signed-off-by: Ting Liu --- meta-fsl-ppc/conf/machine/include/qoriq-base.inc | 29 +++++++++++++++++++--- .../machine/include/qoriq-default-providers.inc | 3 --- .../machine/include/qoriq-default-settings.inc | 21 ---------------- .../machine/include/qoriq-default-versions.inc | 3 --- 4 files changed, 25 insertions(+), 31 deletions(-) delete mode 100644 meta-fsl-ppc/conf/machine/include/qoriq-default-providers.inc delete mode 100644 meta-fsl-ppc/conf/machine/include/qoriq-default-settings.inc delete mode 100644 meta-fsl-ppc/conf/machine/include/qoriq-default-versions.inc diff --git a/meta-fsl-ppc/conf/machine/include/qoriq-base.inc b/meta-fsl-ppc/conf/machine/include/qoriq-base.inc index 9b26d10c..aae476d6 100644 --- a/meta-fsl-ppc/conf/machine/include/qoriq-base.inc +++ b/meta-fsl-ppc/conf/machine/include/qoriq-base.inc @@ -1,8 +1,29 @@ # Provides the QorIQ common settings +require conf/machine/include/soc-family.inc -require conf/machine/include/qoriq-default-settings.inc -require conf/machine/include/qoriq-default-versions.inc -require conf/machine/include/qoriq-default-providers.inc +# providers +PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq" +PREFERRED_PROVIDER_u-boot ?= "u-boot-qoriq" -require conf/machine/include/soc-family.inc +# versions +PREFERRED_VERSION_qemu = "1.7+fsl" +PREFERRED_VERSION_openssl = "1.0.1i" + +# settings +MACHINE_FEATURES = "keyboard pci ext2 ext3 serial" +MACHINE_EXTRA_RRECOMMENDS += "udev-rules-qoriq kernel-modules" +MACHINEOVERRIDES .= ":qoriq-ppc" + +IMAGE_CLASSES += "image_types_uboot" +EXTRA_IMAGEDEPENDS += "u-boot" + +KERNEL_IMAGETYPE ?= "uImage" + +SERIAL_CONSOLES ?= "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" +SERIAL_CONSOLES_CHECK ?= "${SERIAL_CONSOLES}" + +USE_VT = "0" + +MKUBIFS_ARGS ??= "-m 512 -e 15360 -c 3600" +UBINIZE_ARGS ??= "-m 512 -p 16KiB -s 512" diff --git a/meta-fsl-ppc/conf/machine/include/qoriq-default-providers.inc b/meta-fsl-ppc/conf/machine/include/qoriq-default-providers.inc deleted file mode 100644 index 25197da5..00000000 --- a/meta-fsl-ppc/conf/machine/include/qoriq-default-providers.inc +++ /dev/null @@ -1,3 +0,0 @@ -PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq" -PREFERRED_PROVIDER_u-boot ?= "u-boot-qoriq" - diff --git a/meta-fsl-ppc/conf/machine/include/qoriq-default-settings.inc b/meta-fsl-ppc/conf/machine/include/qoriq-default-settings.inc deleted file mode 100644 index 539f6a1d..00000000 --- a/meta-fsl-ppc/conf/machine/include/qoriq-default-settings.inc +++ /dev/null @@ -1,21 +0,0 @@ -MACHINE_FEATURES = "keyboard pci ext2 ext3 serial" -MACHINE_EXTRA_RRECOMMENDS += "udev-rules-qoriq kernel-modules" - -IMAGE_CLASSES += "image_types_uboot" -EXTRA_IMAGEDEPENDS += "u-boot" - -KERNEL_IMAGETYPE ?= "uImage" -# disable the images below for now -# ext2.bz2 ext2.lzma \ -# ext2.gz.u-boot ext2.bz2.u-boot ext2.lzma.u-boot" - -MACHINEOVERRIDES .= ":qoriq-ppc" - -SERIAL_CONSOLES ?= "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" -SERIAL_CONSOLES_CHECK ?= "${SERIAL_CONSOLES}" - -USE_VT = "0" - -MKUBIFS_ARGS ??= "-m 512 -e 15360 -c 3600" -UBINIZE_ARGS ??= "-m 512 -p 16KiB -s 512" - diff --git a/meta-fsl-ppc/conf/machine/include/qoriq-default-versions.inc b/meta-fsl-ppc/conf/machine/include/qoriq-default-versions.inc deleted file mode 100644 index 639e61e9..00000000 --- a/meta-fsl-ppc/conf/machine/include/qoriq-default-versions.inc +++ /dev/null @@ -1,3 +0,0 @@ -PREFERRED_VERSION_qemu = "1.7+fsl" -PREFERRED_VERSION_openssl = "1.0.1i" - -- cgit v1.2.3-54-g00ecf From 481385cf3d0ff49ef162ad88a019bb9bf0066cad Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Tue, 13 Jan 2015 23:04:32 +0800 Subject: remove default setting for ubifs this is not bsp related, remove it. Signed-off-by: Ting Liu --- meta-fsl-ppc/conf/machine/include/qoriq-base.inc | 3 --- 1 file changed, 3 deletions(-) diff --git a/meta-fsl-ppc/conf/machine/include/qoriq-base.inc b/meta-fsl-ppc/conf/machine/include/qoriq-base.inc index aae476d6..35ca79ce 100644 --- a/meta-fsl-ppc/conf/machine/include/qoriq-base.inc +++ b/meta-fsl-ppc/conf/machine/include/qoriq-base.inc @@ -24,6 +24,3 @@ SERIAL_CONSOLES_CHECK ?= "${SERIAL_CONSOLES}" USE_VT = "0" -MKUBIFS_ARGS ??= "-m 512 -e 15360 -c 3600" -UBINIZE_ARGS ??= "-m 512 -p 16KiB -s 512" - -- cgit v1.2.3-54-g00ecf From 61ec507539c38b4f471410c47cc293c2db108499 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Fri, 16 Jan 2015 18:22:59 +0800 Subject: u-boot: use TARGET_VENDOR to compose multilib sys This aligns with the default setting in Poky. Signed-off-by: Ting Liu --- meta-fsl-ppc/recipes-bsp/u-boot/u-boot-qoriq_2014.07.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-fsl-ppc/recipes-bsp/u-boot/u-boot-qoriq_2014.07.bb b/meta-fsl-ppc/recipes-bsp/u-boot/u-boot-qoriq_2014.07.bb index 43af42d7..b7806584 100644 --- a/meta-fsl-ppc/recipes-bsp/u-boot/u-boot-qoriq_2014.07.bb +++ b/meta-fsl-ppc/recipes-bsp/u-boot/u-boot-qoriq_2014.07.bb @@ -30,7 +30,7 @@ python () { if "e5500-64b:" in arch or "e6500-64b:" in arch: if not "lib32" in ml: raise bb.parse.SkipPackage("Building the u-boot for this arch requires multilib to be enabled") - sys_multilib = 'powerpc-' + d.getVar('DISTRO') + 'mllib32-' + d.getVar('HOST_OS') + sys_multilib = 'powerpc' + d.getVar('TARGET_VENDOR') + 'mllib32-' + d.getVar('HOST_OS') d.setVar('DEPENDS_append', ' lib32-gcc-cross-powerpc lib32-libgcc') d.setVar('PATH_append', ':' + d.getVar('STAGING_BINDIR_NATIVE') + '/' + sys_multilib) d.setVar('TOOLCHAIN_OPTIONS_append', '/../lib32-' + d.getVar("MACHINE")) -- cgit v1.2.3-54-g00ecf From e95bdf7590600d0d38427227f081d4a19a3c3e64 Mon Sep 17 00:00:00 2001 From: Sona Sarmadi Date: Mon, 19 Jan 2015 12:45:09 +0100 Subject: mnt: CVE-2014-5206_CVE-2014-5207 This patches fixes mount flags handling during remount issue. The patches come from: https://www.kernel.org (remotes/origin/linux-3.12.y branch) References: http://seclists.org/oss-sec/2014/q3/357 http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-5206 http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-5207 Signed-off-by: Sona Sarmadi --- .../0001-mnt-CVE-2014-5206_CVE-2014-5207.patch | 62 ++++ .../0002-mnt-CVE-2014-5206_CVE-2014-5207.patch | 62 ++++ .../0003-mnt-CVE-2014-5206_CVE-2014-5207.patch | 137 +++++++++ .../0004-mnt-CVE-2014-5206_CVE-2014-5207.patch | 64 ++++ .../0005-mnt-CVE-2014-5206_CVE-2014-5207.patch | 324 +++++++++++++++++++++ .../recipes-kernel/linux/linux-qoriq_3.12.bb | 5 + 6 files changed, 654 insertions(+) create mode 100644 meta-fsl-ppc/recipes-kernel/linux/files/0001-mnt-CVE-2014-5206_CVE-2014-5207.patch create mode 100644 meta-fsl-ppc/recipes-kernel/linux/files/0002-mnt-CVE-2014-5206_CVE-2014-5207.patch create mode 100644 meta-fsl-ppc/recipes-kernel/linux/files/0003-mnt-CVE-2014-5206_CVE-2014-5207.patch create mode 100644 meta-fsl-ppc/recipes-kernel/linux/files/0004-mnt-CVE-2014-5206_CVE-2014-5207.patch create mode 100644 meta-fsl-ppc/recipes-kernel/linux/files/0005-mnt-CVE-2014-5206_CVE-2014-5207.patch diff --git a/meta-fsl-ppc/recipes-kernel/linux/files/0001-mnt-CVE-2014-5206_CVE-2014-5207.patch b/meta-fsl-ppc/recipes-kernel/linux/files/0001-mnt-CVE-2014-5206_CVE-2014-5207.patch new file mode 100644 index 00000000..aec89301 --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/linux/files/0001-mnt-CVE-2014-5206_CVE-2014-5207.patch @@ -0,0 +1,62 @@ +From 25c1def33a2f74079f3062b7afdf98fcf9f34e6d Mon Sep 17 00:00:00 2001 +From: "Eric W. Biederman" +Date: Mon, 28 Jul 2014 16:26:53 -0700 +Subject: [PATCH] mnt: Only change user settable mount flags in remount + +commit a6138db815df5ee542d848318e5dae681590fccd upstream. + +Kenton Varda discovered that by remounting a +read-only bind mount read-only in a user namespace the +MNT_LOCK_READONLY bit would be cleared, allowing an unprivileged user +to the remount a read-only mount read-write. + +Correct this by replacing the mask of mount flags to preserve +with a mask of mount flags that may be changed, and preserve +all others. This ensures that any future bugs with this mask and +remount will fail in an easy to detect way where new mount flags +simply won't change. + +Fix for CVE-2014-5206 and CVE-2014-5207 +Upstream-Status: backport + +Cc: stable@vger.kernel.org +Acked-by: Serge E. Hallyn +Signed-off-by: "Eric W. Biederman" +Signed-off-by: Jiri Slaby +Signed-off-by: Sona Sarmadi +--- + fs/namespace.c | 2 +- + include/linux/mount.h | 4 +++- + 2 files changed, 4 insertions(+), 2 deletions(-) + +diff --git a/fs/namespace.c b/fs/namespace.c +index 84447db..34fa7a5 100644 +--- a/fs/namespace.c ++++ b/fs/namespace.c +@@ -1847,7 +1847,7 @@ static int do_remount(struct path *path, int flags, int mnt_flags, + err = do_remount_sb(sb, flags, data, 0); + if (!err) { + br_write_lock(&vfsmount_lock); +- mnt_flags |= mnt->mnt.mnt_flags & MNT_PROPAGATION_MASK; ++ mnt_flags |= mnt->mnt.mnt_flags & ~MNT_USER_SETTABLE_MASK; + mnt->mnt.mnt_flags = mnt_flags; + br_write_unlock(&vfsmount_lock); + } +diff --git a/include/linux/mount.h b/include/linux/mount.h +index 38cd98f..8707c9e 100644 +--- a/include/linux/mount.h ++++ b/include/linux/mount.h +@@ -42,7 +42,9 @@ struct mnt_namespace; + * flag, consider how it interacts with shared mounts. + */ + #define MNT_SHARED_MASK (MNT_UNBINDABLE) +-#define MNT_PROPAGATION_MASK (MNT_SHARED | MNT_UNBINDABLE) ++#define MNT_USER_SETTABLE_MASK (MNT_NOSUID | MNT_NODEV | MNT_NOEXEC \ ++ | MNT_NOATIME | MNT_NODIRATIME | MNT_RELATIME \ ++ | MNT_READONLY) + + + #define MNT_INTERNAL 0x4000 +-- +1.9.1 + diff --git a/meta-fsl-ppc/recipes-kernel/linux/files/0002-mnt-CVE-2014-5206_CVE-2014-5207.patch b/meta-fsl-ppc/recipes-kernel/linux/files/0002-mnt-CVE-2014-5206_CVE-2014-5207.patch new file mode 100644 index 00000000..b08f2179 --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/linux/files/0002-mnt-CVE-2014-5206_CVE-2014-5207.patch @@ -0,0 +1,62 @@ +From cab259f821fad20afa688d3fbeb47356447ac20b Mon Sep 17 00:00:00 2001 +From: "Eric W. Biederman" +Date: Mon, 28 Jul 2014 17:10:56 -0700 +Subject: [PATCH] mnt: Move the test for MNT_LOCK_READONLY from + change_mount_flags into do_remount + +commit 07b645589dcda8b7a5249e096fece2a67556f0f4 upstream. + +There are no races as locked mount flags are guaranteed to never change. + +Moving the test into do_remount makes it more visible, and ensures all +filesystem remounts pass the MNT_LOCK_READONLY permission check. This +second case is not an issue today as filesystem remounts are guarded +by capable(CAP_DAC_ADMIN) and thus will always fail in less privileged +mount namespaces, but it could become an issue in the future. + +Fix for CVE-2014-5206 and CVE-2014-5207 +Upstream-Status: backport + +Cc: stable@vger.kernel.org +Acked-by: Serge E. Hallyn +Signed-off-by: "Eric W. Biederman" +Signed-off-by: Jiri Slaby +Signed-off-by: Sona Sarmadi +--- + fs/namespace.c | 13 ++++++++++--- + 1 file changed, 10 insertions(+), 3 deletions(-) + +diff --git a/fs/namespace.c b/fs/namespace.c +index 34fa7a5..8e90b03 100644 +--- a/fs/namespace.c ++++ b/fs/namespace.c +@@ -1806,9 +1806,6 @@ static int change_mount_flags(struct vfsmount *mnt, int ms_flags) + if (readonly_request == __mnt_is_readonly(mnt)) + return 0; + +- if (mnt->mnt_flags & MNT_LOCK_READONLY) +- return -EPERM; +- + if (readonly_request) + error = mnt_make_readonly(real_mount(mnt)); + else +@@ -1834,6 +1831,16 @@ static int do_remount(struct path *path, int flags, int mnt_flags, + if (path->dentry != path->mnt->mnt_root) + return -EINVAL; + ++ /* Don't allow changing of locked mnt flags. ++ * ++ * No locks need to be held here while testing the various ++ * MNT_LOCK flags because those flags can never be cleared ++ * once they are set. ++ */ ++ if ((mnt->mnt.mnt_flags & MNT_LOCK_READONLY) && ++ !(mnt_flags & MNT_READONLY)) { ++ return -EPERM; ++ } + err = security_sb_remount(sb, data); + if (err) + return err; +-- +1.9.1 + diff --git a/meta-fsl-ppc/recipes-kernel/linux/files/0003-mnt-CVE-2014-5206_CVE-2014-5207.patch b/meta-fsl-ppc/recipes-kernel/linux/files/0003-mnt-CVE-2014-5206_CVE-2014-5207.patch new file mode 100644 index 00000000..aa5ca1bc --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/linux/files/0003-mnt-CVE-2014-5206_CVE-2014-5207.patch @@ -0,0 +1,137 @@ +From 8b18c0adbc5d0cb1530692e72bcfb88fd7bb77bb Mon Sep 17 00:00:00 2001 +From: "Eric W. Biederman" +Date: Mon, 28 Jul 2014 17:26:07 -0700 +Subject: [PATCH] mnt: Correct permission checks in do_remount + +commit 9566d6742852c527bf5af38af5cbb878dad75705 upstream. + +While invesgiating the issue where in "mount --bind -oremount,ro ..." +would result in later "mount --bind -oremount,rw" succeeding even if +the mount started off locked I realized that there are several +additional mount flags that should be locked and are not. + +In particular MNT_NOSUID, MNT_NODEV, MNT_NOEXEC, and the atime +flags in addition to MNT_READONLY should all be locked. These +flags are all per superblock, can all be changed with MS_BIND, +and should not be changable if set by a more privileged user. + +The following additions to the current logic are added in this patch. +- nosuid may not be clearable by a less privileged user. +- nodev may not be clearable by a less privielged user. +- noexec may not be clearable by a less privileged user. +- atime flags may not be changeable by a less privileged user. + +The logic with atime is that always setting atime on access is a +global policy and backup software and auditing software could break if +atime bits are not updated (when they are configured to be updated), +and serious performance degradation could result (DOS attack) if atime +updates happen when they have been explicitly disabled. Therefore an +unprivileged user should not be able to mess with the atime bits set +by a more privileged user. + +The additional restrictions are implemented with the addition of +MNT_LOCK_NOSUID, MNT_LOCK_NODEV, MNT_LOCK_NOEXEC, and MNT_LOCK_ATIME +mnt flags. + +Taken together these changes and the fixes for MNT_LOCK_READONLY +should make it safe for an unprivileged user to create a user +namespace and to call "mount --bind -o remount,... ..." without +the danger of mount flags being changed maliciously. + +Fix for CVE-2014-5206 and CVE-2014-5207 +Upstream-Status: backport + +Cc: stable@vger.kernel.org +Acked-by: Serge E. Hallyn +Signed-off-by: "Eric W. Biederman" +Signed-off-by: Jiri Slaby +Signed-off-by: Sona Sarmadi +--- + fs/namespace.c | 36 +++++++++++++++++++++++++++++++++--- + include/linux/mount.h | 5 +++++ + 2 files changed, 38 insertions(+), 3 deletions(-) + +diff --git a/fs/namespace.c b/fs/namespace.c +index 8e90b03..7c67de8 100644 +--- a/fs/namespace.c ++++ b/fs/namespace.c +@@ -827,8 +827,21 @@ static struct mount *clone_mnt(struct mount *old, struct dentry *root, + + mnt->mnt.mnt_flags = old->mnt.mnt_flags & ~MNT_WRITE_HOLD; + /* Don't allow unprivileged users to change mount flags */ +- if ((flag & CL_UNPRIVILEGED) && (mnt->mnt.mnt_flags & MNT_READONLY)) +- mnt->mnt.mnt_flags |= MNT_LOCK_READONLY; ++ if (flag & CL_UNPRIVILEGED) { ++ mnt->mnt.mnt_flags |= MNT_LOCK_ATIME; ++ ++ if (mnt->mnt.mnt_flags & MNT_READONLY) ++ mnt->mnt.mnt_flags |= MNT_LOCK_READONLY; ++ ++ if (mnt->mnt.mnt_flags & MNT_NODEV) ++ mnt->mnt.mnt_flags |= MNT_LOCK_NODEV; ++ ++ if (mnt->mnt.mnt_flags & MNT_NOSUID) ++ mnt->mnt.mnt_flags |= MNT_LOCK_NOSUID; ++ ++ if (mnt->mnt.mnt_flags & MNT_NOEXEC) ++ mnt->mnt.mnt_flags |= MNT_LOCK_NOEXEC; ++ } + + /* Don't allow unprivileged users to reveal what is under a mount */ + if ((flag & CL_UNPRIVILEGED) && list_empty(&old->mnt_expire)) +@@ -1841,6 +1854,23 @@ static int do_remount(struct path *path, int flags, int mnt_flags, + !(mnt_flags & MNT_READONLY)) { + return -EPERM; + } ++ if ((mnt->mnt.mnt_flags & MNT_LOCK_NODEV) && ++ !(mnt_flags & MNT_NODEV)) { ++ return -EPERM; ++ } ++ if ((mnt->mnt.mnt_flags & MNT_LOCK_NOSUID) && ++ !(mnt_flags & MNT_NOSUID)) { ++ return -EPERM; ++ } ++ if ((mnt->mnt.mnt_flags & MNT_LOCK_NOEXEC) && ++ !(mnt_flags & MNT_NOEXEC)) { ++ return -EPERM; ++ } ++ if ((mnt->mnt.mnt_flags & MNT_LOCK_ATIME) && ++ ((mnt->mnt.mnt_flags & MNT_ATIME_MASK) != (mnt_flags & MNT_ATIME_MASK))) { ++ return -EPERM; ++ } ++ + err = security_sb_remount(sb, data); + if (err) + return err; +@@ -2043,7 +2073,7 @@ static int do_new_mount(struct path *path, const char *fstype, int flags, + */ + if (!(type->fs_flags & FS_USERNS_DEV_MOUNT)) { + flags |= MS_NODEV; +- mnt_flags |= MNT_NODEV; ++ mnt_flags |= MNT_NODEV | MNT_LOCK_NODEV; + } + } + +diff --git a/include/linux/mount.h b/include/linux/mount.h +index 8707c9e..22e5b96 100644 +--- a/include/linux/mount.h ++++ b/include/linux/mount.h +@@ -45,10 +45,15 @@ struct mnt_namespace; + #define MNT_USER_SETTABLE_MASK (MNT_NOSUID | MNT_NODEV | MNT_NOEXEC \ + | MNT_NOATIME | MNT_NODIRATIME | MNT_RELATIME \ + | MNT_READONLY) ++#define MNT_ATIME_MASK (MNT_NOATIME | MNT_NODIRATIME | MNT_RELATIME ) + + + #define MNT_INTERNAL 0x4000 + ++#define MNT_LOCK_ATIME 0x040000 ++#define MNT_LOCK_NOEXEC 0x080000 ++#define MNT_LOCK_NOSUID 0x100000 ++#define MNT_LOCK_NODEV 0x200000 + #define MNT_LOCK_READONLY 0x400000 + #define MNT_LOCKED 0x800000 + +-- +1.9.1 + diff --git a/meta-fsl-ppc/recipes-kernel/linux/files/0004-mnt-CVE-2014-5206_CVE-2014-5207.patch b/meta-fsl-ppc/recipes-kernel/linux/files/0004-mnt-CVE-2014-5206_CVE-2014-5207.patch new file mode 100644 index 00000000..8cd4b130 --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/linux/files/0004-mnt-CVE-2014-5206_CVE-2014-5207.patch @@ -0,0 +1,64 @@ +From fafbc9412b8f2dae04bc3ca233ae7b49482c8df8 Mon Sep 17 00:00:00 2001 +From: "Eric W. Biederman" +Date: Mon, 28 Jul 2014 17:36:04 -0700 +Subject: [PATCH] mnt: Change the default remount atime from relatime to the + existing value + +commit ffbc6f0ead47fa5a1dc9642b0331cb75c20a640e upstream. + +Since March 2009 the kernel has treated the state that if no +MS_..ATIME flags are passed then the kernel defaults to relatime. + +Defaulting to relatime instead of the existing atime state during a +remount is silly, and causes problems in practice for people who don't +specify any MS_...ATIME flags and to get the default filesystem atime +setting. Those users may encounter a permission error because the +default atime setting does not work. + +A default that does not work and causes permission problems is +ridiculous, so preserve the existing value to have a default +atime setting that is always guaranteed to work. + +Using the default atime setting in this way is particularly +interesting for applications built to run in restricted userspace +environments without /proc mounted, as the existing atime mount +options of a filesystem can not be read from /proc/mounts. + +In practice this fixes user space that uses the default atime +setting on remount that are broken by the permission checks +keeping less privileged users from changing more privileged users +atime settings. + +Fix for CVE-2014-5206 and CVE-2014-5207 +Upstream-Status: backport + +Acked-by: Serge E. Hallyn +Signed-off-by: "Eric W. Biederman" +Signed-off-by: Jiri Slaby +Signed-off-by: Sona Sarmadi +--- + fs/namespace.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/fs/namespace.c b/fs/namespace.c +index 7c67de8..4ea2b73 100644 +--- a/fs/namespace.c ++++ b/fs/namespace.c +@@ -2391,6 +2391,14 @@ long do_mount(const char *dev_name, const char *dir_name, + if (flags & MS_RDONLY) + mnt_flags |= MNT_READONLY; + ++ /* The default atime for remount is preservation */ ++ if ((flags & MS_REMOUNT) && ++ ((flags & (MS_NOATIME | MS_NODIRATIME | MS_RELATIME | ++ MS_STRICTATIME)) == 0)) { ++ mnt_flags &= ~MNT_ATIME_MASK; ++ mnt_flags |= path.mnt->mnt_flags & MNT_ATIME_MASK; ++ } ++ + flags &= ~(MS_NOSUID | MS_NOEXEC | MS_NODEV | MS_ACTIVE | MS_BORN | + MS_NOATIME | MS_NODIRATIME | MS_RELATIME| MS_KERNMOUNT | + MS_STRICTATIME); +-- +1.9.1 + diff --git a/meta-fsl-ppc/recipes-kernel/linux/files/0005-mnt-CVE-2014-5206_CVE-2014-5207.patch b/meta-fsl-ppc/recipes-kernel/linux/files/0005-mnt-CVE-2014-5206_CVE-2014-5207.patch new file mode 100644 index 00000000..caa89db4 --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/linux/files/0005-mnt-CVE-2014-5206_CVE-2014-5207.patch @@ -0,0 +1,324 @@ +From 4194b9700ce41ff2f7031aa0c6108c2539028ab5 Mon Sep 17 00:00:00 2001 +From: "Eric W. Biederman" +Date: Tue, 29 Jul 2014 15:50:44 -0700 +Subject: [PATCH] mnt: Add tests for unprivileged remount cases that have found + to be faulty + +commit db181ce011e3c033328608299cd6fac06ea50130 upstream. + +Kenton Varda discovered that by remounting a +read-only bind mount read-only in a user namespace the +MNT_LOCK_READONLY bit would be cleared, allowing an unprivileged user +to the remount a read-only mount read-write. + +Upon review of the code in remount it was discovered that the code allowed +nosuid, noexec, and nodev to be cleared. It was also discovered that +the code was allowing the per mount atime flags to be changed. + +The first naive patch to fix these issues contained the flaw that using +default atime settings when remounting a filesystem could be disallowed. + +To avoid this problems in the future add tests to ensure unprivileged +remounts are succeeding and failing at the appropriate times. + +Fix for CVE-2014-5206 and CVE-2014-5207 +Upstream-Status: backport + +Acked-by: Serge E. Hallyn +Signed-off-by: "Eric W. Biederman" +Signed-off-by: Jiri Slaby +Signed-off-by: Sona Sarmadi +--- + tools/testing/selftests/Makefile | 1 + + tools/testing/selftests/mount/Makefile | 17 ++ + .../selftests/mount/unprivileged-remount-test.c | 242 +++++++++++++++++++++ + 3 files changed, 260 insertions(+) + create mode 100644 tools/testing/selftests/mount/Makefile + create mode 100644 tools/testing/selftests/mount/unprivileged-remount-test.c + +diff --git a/tools/testing/selftests/Makefile b/tools/testing/selftests/Makefile +index 9f3eae2..2d9ab94 100644 +--- a/tools/testing/selftests/Makefile ++++ b/tools/testing/selftests/Makefile +@@ -4,6 +4,7 @@ TARGETS += efivarfs + TARGETS += kcmp + TARGETS += memory-hotplug + TARGETS += mqueue ++TARGETS += mount + TARGETS += net + TARGETS += ptrace + TARGETS += timers +diff --git a/tools/testing/selftests/mount/Makefile b/tools/testing/selftests/mount/Makefile +new file mode 100644 +index 0000000..337d853 +--- /dev/null ++++ b/tools/testing/selftests/mount/Makefile +@@ -0,0 +1,17 @@ ++# Makefile for mount selftests. ++ ++all: unprivileged-remount-test ++ ++unprivileged-remount-test: unprivileged-remount-test.c ++ gcc -Wall -O2 unprivileged-remount-test.c -o unprivileged-remount-test ++ ++# Allow specific tests to be selected. ++test_unprivileged_remount: unprivileged-remount-test ++ @if [ -f /proc/self/uid_map ] ; then ./unprivileged-remount-test ; fi ++ ++run_tests: all test_unprivileged_remount ++ ++clean: ++ rm -f unprivileged-remount-test ++ ++.PHONY: all test_unprivileged_remount +diff --git a/tools/testing/selftests/mount/unprivileged-remount-test.c b/tools/testing/selftests/mount/unprivileged-remount-test.c +new file mode 100644 +index 0000000..1b3ff2f +--- /dev/null ++++ b/tools/testing/selftests/mount/unprivileged-remount-test.c +@@ -0,0 +1,242 @@ ++#define _GNU_SOURCE ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#ifndef CLONE_NEWNS ++# define CLONE_NEWNS 0x00020000 ++#endif ++#ifndef CLONE_NEWUTS ++# define CLONE_NEWUTS 0x04000000 ++#endif ++#ifndef CLONE_NEWIPC ++# define CLONE_NEWIPC 0x08000000 ++#endif ++#ifndef CLONE_NEWNET ++# define CLONE_NEWNET 0x40000000 ++#endif ++#ifndef CLONE_NEWUSER ++# define CLONE_NEWUSER 0x10000000 ++#endif ++#ifndef CLONE_NEWPID ++# define CLONE_NEWPID 0x20000000 ++#endif ++ ++#ifndef MS_RELATIME ++#define MS_RELATIME (1 << 21) ++#endif ++#ifndef MS_STRICTATIME ++#define MS_STRICTATIME (1 << 24) ++#endif ++ ++static void die(char *fmt, ...) ++{ ++ va_list ap; ++ va_start(ap, fmt); ++ vfprintf(stderr, fmt, ap); ++ va_end(ap); ++ exit(EXIT_FAILURE); ++} ++ ++static void write_file(char *filename, char *fmt, ...) ++{ ++ char buf[4096]; ++ int fd; ++ ssize_t written; ++ int buf_len; ++ va_list ap; ++ ++ va_start(ap, fmt); ++ buf_len = vsnprintf(buf, sizeof(buf), fmt, ap); ++ va_end(ap); ++ if (buf_len < 0) { ++ die("vsnprintf failed: %s\n", ++ strerror(errno)); ++ } ++ if (buf_len >= sizeof(buf)) { ++ die("vsnprintf output truncated\n"); ++ } ++ ++ fd = open(filename, O_WRONLY); ++ if (fd < 0) { ++ die("open of %s failed: %s\n", ++ filename, strerror(errno)); ++ } ++ written = write(fd, buf, buf_len); ++ if (written != buf_len) { ++ if (written >= 0) { ++ die("short write to %s\n", filename); ++ } else { ++ die("write to %s failed: %s\n", ++ filename, strerror(errno)); ++ } ++ } ++ if (close(fd) != 0) { ++ die("close of %s failed: %s\n", ++ filename, strerror(errno)); ++ } ++} ++ ++static void create_and_enter_userns(void) ++{ ++ uid_t uid; ++ gid_t gid; ++ ++ uid = getuid(); ++ gid = getgid(); ++ ++ if (unshare(CLONE_NEWUSER) !=0) { ++ die("unshare(CLONE_NEWUSER) failed: %s\n", ++ strerror(errno)); ++ } ++ ++ write_file("/proc/self/uid_map", "0 %d 1", uid); ++ write_file("/proc/self/gid_map", "0 %d 1", gid); ++ ++ if (setgroups(0, NULL) != 0) { ++ die("setgroups failed: %s\n", ++ strerror(errno)); ++ } ++ if (setgid(0) != 0) { ++ die ("setgid(0) failed %s\n", ++ strerror(errno)); ++ } ++ if (setuid(0) != 0) { ++ die("setuid(0) failed %s\n", ++ strerror(errno)); ++ } ++} ++ ++static ++bool test_unpriv_remount(int mount_flags, int remount_flags, int invalid_flags) ++{ ++ pid_t child; ++ ++ child = fork(); ++ if (child == -1) { ++ die("fork failed: %s\n", ++ strerror(errno)); ++ } ++ if (child != 0) { /* parent */ ++ pid_t pid; ++ int status; ++ pid = waitpid(child, &status, 0); ++ if (pid == -1) { ++ die("waitpid failed: %s\n", ++ strerror(errno)); ++ } ++ if (pid != child) { ++ die("waited for %d got %d\n", ++ child, pid); ++ } ++ if (!WIFEXITED(status)) { ++ die("child did not terminate cleanly\n"); ++ } ++ return WEXITSTATUS(status) == EXIT_SUCCESS ? true : false; ++ } ++ ++ create_and_enter_userns(); ++ if (unshare(CLONE_NEWNS) != 0) { ++ die("unshare(CLONE_NEWNS) failed: %s\n", ++ strerror(errno)); ++ } ++ ++ if (mount("testing", "/tmp", "ramfs", mount_flags, NULL) != 0) { ++ die("mount of /tmp failed: %s\n", ++ strerror(errno)); ++ } ++ ++ create_and_enter_userns(); ++ ++ if (unshare(CLONE_NEWNS) != 0) { ++ die("unshare(CLONE_NEWNS) failed: %s\n", ++ strerror(errno)); ++ } ++ ++ if (mount("/tmp", "/tmp", "none", ++ MS_REMOUNT | MS_BIND | remount_flags, NULL) != 0) { ++ /* system("cat /proc/self/mounts"); */ ++ die("remount of /tmp failed: %s\n", ++ strerror(errno)); ++ } ++ ++ if (mount("/tmp", "/tmp", "none", ++ MS_REMOUNT | MS_BIND | invalid_flags, NULL) == 0) { ++ /* system("cat /proc/self/mounts"); */ ++ die("remount of /tmp with invalid flags " ++ "succeeded unexpectedly\n"); ++ } ++ exit(EXIT_SUCCESS); ++} ++ ++static bool test_unpriv_remount_simple(int mount_flags) ++{ ++ return test_unpriv_remount(mount_flags, mount_flags, 0); ++} ++ ++static bool test_unpriv_remount_atime(int mount_flags, int invalid_flags) ++{ ++ return test_unpriv_remount(mount_flags, mount_flags, invalid_flags); ++} ++ ++int main(int argc, char **argv) ++{ ++ if (!test_unpriv_remount_simple(MS_RDONLY|MS_NODEV)) { ++ die("MS_RDONLY malfunctions\n"); ++ } ++ if (!test_unpriv_remount_simple(MS_NODEV)) { ++ die("MS_NODEV malfunctions\n"); ++ } ++ if (!test_unpriv_remount_simple(MS_NOSUID|MS_NODEV)) { ++ die("MS_NOSUID malfunctions\n"); ++ } ++ if (!test_unpriv_remount_simple(MS_NOEXEC|MS_NODEV)) { ++ die("MS_NOEXEC malfunctions\n"); ++ } ++ if (!test_unpriv_remount_atime(MS_RELATIME|MS_NODEV, ++ MS_NOATIME|MS_NODEV)) ++ { ++ die("MS_RELATIME malfunctions\n"); ++ } ++ if (!test_unpriv_remount_atime(MS_STRICTATIME|MS_NODEV, ++ MS_NOATIME|MS_NODEV)) ++ { ++ die("MS_STRICTATIME malfunctions\n"); ++ } ++ if (!test_unpriv_remount_atime(MS_NOATIME|MS_NODEV, ++ MS_STRICTATIME|MS_NODEV)) ++ { ++ die("MS_RELATIME malfunctions\n"); ++ } ++ if (!test_unpriv_remount_atime(MS_RELATIME|MS_NODIRATIME|MS_NODEV, ++ MS_NOATIME|MS_NODEV)) ++ { ++ die("MS_RELATIME malfunctions\n"); ++ } ++ if (!test_unpriv_remount_atime(MS_STRICTATIME|MS_NODIRATIME|MS_NODEV, ++ MS_NOATIME|MS_NODEV)) ++ { ++ die("MS_RELATIME malfunctions\n"); ++ } ++ if (!test_unpriv_remount_atime(MS_NOATIME|MS_NODIRATIME|MS_NODEV, ++ MS_STRICTATIME|MS_NODEV)) ++ { ++ die("MS_RELATIME malfunctions\n"); ++ } ++ if (!test_unpriv_remount(MS_STRICTATIME|MS_NODEV, MS_NODEV, ++ MS_NOATIME|MS_NODEV)) ++ { ++ die("Default atime malfunctions\n"); ++ } ++ return EXIT_SUCCESS; ++} +-- +1.9.1 + diff --git a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq_3.12.bb b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq_3.12.bb index a5902311..12fa2a6a 100644 --- a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq_3.12.bb +++ b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq_3.12.bb @@ -6,6 +6,11 @@ SRC_URI = "git://git.freescale.com/ppc/sdk/linux.git;nobranch=1 \ file://Fix-CVE-2014-5077-sctp-inherit-auth-capable-on-INIT-collisions.patch \ file://Fix-CVE-2014-5471_CVE-2014-5472.patch \ file://modify-defconfig-t1040-nr-cpus.patch \ + file://0001-mnt-CVE-2014-5206_CVE-2014-5207.patch \ + file://0002-mnt-CVE-2014-5206_CVE-2014-5207.patch \ + file://0003-mnt-CVE-2014-5206_CVE-2014-5207.patch \ + file://0004-mnt-CVE-2014-5206_CVE-2014-5207.patch \ + file://0005-mnt-CVE-2014-5206_CVE-2014-5207.patch \ " SRCREV = "6619b8b55796cdf0cec04b66a71288edd3057229" -- cgit v1.2.3-54-g00ecf From d59902329c7554727bfd0456891fbc6807021864 Mon Sep 17 00:00:00 2001 From: Sona Sarmadi Date: Mon, 19 Jan 2015 14:37:06 +0100 Subject: udf: CVE-2014-6410 Avoid infinite loop when processing indirect ICBs References: http://seclists.org/oss-sec/2014/q3/600 http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-6410 Signed-off-by: Sona Sarmadi --- .../linux/files/udf-CVE-2014-6410.patch | 96 ++++++++++++++++++++++ .../recipes-kernel/linux/linux-qoriq_3.12.bb | 1 + 2 files changed, 97 insertions(+) create mode 100644 meta-fsl-ppc/recipes-kernel/linux/files/udf-CVE-2014-6410.patch diff --git a/meta-fsl-ppc/recipes-kernel/linux/files/udf-CVE-2014-6410.patch b/meta-fsl-ppc/recipes-kernel/linux/files/udf-CVE-2014-6410.patch new file mode 100644 index 00000000..9086e0a1 --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/linux/files/udf-CVE-2014-6410.patch @@ -0,0 +1,96 @@ +From 07d209bd092d023976fdb881ba6d4b30fe18aebe Mon Sep 17 00:00:00 2001 +From: Jan Kara +Date: Thu, 4 Sep 2014 14:06:55 +0200 +Subject: [PATCH] udf: Avoid infinite loop when processing indirect ICBs + +commit c03aa9f6e1f938618e6db2e23afef0574efeeb65 upstream. + +We did not implement any bound on number of indirect ICBs we follow when +loading inode. Thus corrupted medium could cause kernel to go into an +infinite loop, possibly causing a stack overflow. + +Fix the possible stack overflow by removing recursion from +__udf_read_inode() and limit number of indirect ICBs we follow to avoid +infinite loops. + +Upstream-Status: Backport + +Signed-off-by: Jan Kara +Cc: Chuck Ebbert +Signed-off-by: Greg Kroah-Hartman +Signed-off-by: Sona Sarmadi +--- + fs/udf/inode.c | 35 +++++++++++++++++++++-------------- + 1 file changed, 21 insertions(+), 14 deletions(-) + +diff --git a/fs/udf/inode.c b/fs/udf/inode.c +index b6d15d3..aa02328 100644 +--- a/fs/udf/inode.c ++++ b/fs/udf/inode.c +@@ -1270,13 +1270,22 @@ update_time: + return 0; + } + ++/* ++ * Maximum length of linked list formed by ICB hierarchy. The chosen number is ++ * arbitrary - just that we hopefully don't limit any real use of rewritten ++ * inode on write-once media but avoid looping for too long on corrupted media. ++ */ ++#define UDF_MAX_ICB_NESTING 1024 ++ + static void __udf_read_inode(struct inode *inode) + { + struct buffer_head *bh = NULL; + struct fileEntry *fe; + uint16_t ident; + struct udf_inode_info *iinfo = UDF_I(inode); ++ unsigned int indirections = 0; + ++reread: + /* + * Set defaults, but the inode is still incomplete! + * Note: get_new_inode() sets the following on a new inode: +@@ -1313,28 +1322,26 @@ static void __udf_read_inode(struct inode *inode) + ibh = udf_read_ptagged(inode->i_sb, &iinfo->i_location, 1, + &ident); + if (ident == TAG_IDENT_IE && ibh) { +- struct buffer_head *nbh = NULL; + struct kernel_lb_addr loc; + struct indirectEntry *ie; + + ie = (struct indirectEntry *)ibh->b_data; + loc = lelb_to_cpu(ie->indirectICB.extLocation); + +- if (ie->indirectICB.extLength && +- (nbh = udf_read_ptagged(inode->i_sb, &loc, 0, +- &ident))) { +- if (ident == TAG_IDENT_FE || +- ident == TAG_IDENT_EFE) { +- memcpy(&iinfo->i_location, +- &loc, +- sizeof(struct kernel_lb_addr)); +- brelse(bh); +- brelse(ibh); +- brelse(nbh); +- __udf_read_inode(inode); ++ if (ie->indirectICB.extLength) { ++ brelse(bh); ++ brelse(ibh); ++ memcpy(&iinfo->i_location, &loc, ++ sizeof(struct kernel_lb_addr)); ++ if (++indirections > UDF_MAX_ICB_NESTING) { ++ udf_err(inode->i_sb, ++ "too many ICBs in ICB hierarchy" ++ " (max %d supported)\n", ++ UDF_MAX_ICB_NESTING); ++ make_bad_inode(inode); + return; + } +- brelse(nbh); ++ goto reread; + } + } + brelse(ibh); +-- +1.9.1 + diff --git a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq_3.12.bb b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq_3.12.bb index 12fa2a6a..48a67c0d 100644 --- a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq_3.12.bb +++ b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq_3.12.bb @@ -11,6 +11,7 @@ SRC_URI = "git://git.freescale.com/ppc/sdk/linux.git;nobranch=1 \ file://0003-mnt-CVE-2014-5206_CVE-2014-5207.patch \ file://0004-mnt-CVE-2014-5206_CVE-2014-5207.patch \ file://0005-mnt-CVE-2014-5206_CVE-2014-5207.patch \ + file://udf-CVE-2014-6410.patch \ " SRCREV = "6619b8b55796cdf0cec04b66a71288edd3057229" -- cgit v1.2.3-54-g00ecf From 42590aa5fb3ae3212c7950f2c71fcf7b3b19ecde Mon Sep 17 00:00:00 2001 From: Sona Sarmadi Date: Tue, 27 Jan 2015 09:09:30 +0100 Subject: net-sctp: CVE-2014-0101 Fixes null pointer dereference when processing authenticated cookie_echo chunk Reference: http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-0101 https://bugzilla.redhat.com/show_bug.cgi?id=1070705 Introduced by: http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=bbd0d59809f9 Signed-off-by: Sona Sarmadi --- .../linux/files/net-sctp-CVE-2014-0101.patch | 145 +++++++++++++++++++++ .../recipes-kernel/linux/linux-qoriq_3.12.bb | 1 + 2 files changed, 146 insertions(+) create mode 100644 meta-fsl-ppc/recipes-kernel/linux/files/net-sctp-CVE-2014-0101.patch diff --git a/meta-fsl-ppc/recipes-kernel/linux/files/net-sctp-CVE-2014-0101.patch b/meta-fsl-ppc/recipes-kernel/linux/files/net-sctp-CVE-2014-0101.patch new file mode 100644 index 00000000..6fc5610e --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/linux/files/net-sctp-CVE-2014-0101.patch @@ -0,0 +1,145 @@ +From 00c53b02cb01976b35d37670a4b5c5d7a6ad3c62 Mon Sep 17 00:00:00 2001 +From: Daniel Borkmann +Date: Mon, 3 Mar 2014 17:23:04 +0100 +Subject: [PATCH] net: sctp: fix sctp_sf_do_5_1D_ce to verify if we/peer is + AUTH capable + +[ Upstream commit ec0223ec48a90cb605244b45f7c62de856403729 ] + +RFC4895 introduced AUTH chunks for SCTP; during the SCTP +handshake RANDOM; CHUNKS; HMAC-ALGO are negotiated (CHUNKS +being optional though): + + ---------- INIT[RANDOM; CHUNKS; HMAC-ALGO] ----------> + <------- INIT-ACK[RANDOM; CHUNKS; HMAC-ALGO] --------- + -------------------- COOKIE-ECHO --------------------> + <-------------------- COOKIE-ACK --------------------- + +A special case is when an endpoint requires COOKIE-ECHO +chunks to be authenticated: + + ---------- INIT[RANDOM; CHUNKS; HMAC-ALGO] ----------> + <------- INIT-ACK[RANDOM; CHUNKS; HMAC-ALGO] --------- + ------------------ AUTH; COOKIE-ECHO ----------------> + <-------------------- COOKIE-ACK --------------------- + +RFC4895, section 6.3. Receiving Authenticated Chunks says: + + The receiver MUST use the HMAC algorithm indicated in + the HMAC Identifier field. If this algorithm was not + specified by the receiver in the HMAC-ALGO parameter in + the INIT or INIT-ACK chunk during association setup, the + AUTH chunk and all the chunks after it MUST be discarded + and an ERROR chunk SHOULD be sent with the error cause + defined in Section 4.1. [...] If no endpoint pair shared + key has been configured for that Shared Key Identifier, + all authenticated chunks MUST be silently discarded. [...] + + When an endpoint requires COOKIE-ECHO chunks to be + authenticated, some special procedures have to be followed + because the reception of a COOKIE-ECHO chunk might result + in the creation of an SCTP association. If a packet arrives + containing an AUTH chunk as a first chunk, a COOKIE-ECHO + chunk as the second chunk, and possibly more chunks after + them, and the receiver does not have an STCB for that + packet, then authentication is based on the contents of + the COOKIE-ECHO chunk. In this situation, the receiver MUST + authenticate the chunks in the packet by using the RANDOM + parameters, CHUNKS parameters and HMAC_ALGO parameters + obtained from the COOKIE-ECHO chunk, and possibly a local + shared secret as inputs to the authentication procedure + specified in Section 6.3. If authentication fails, then + the packet is discarded. If the authentication is successful, + the COOKIE-ECHO and all the chunks after the COOKIE-ECHO + MUST be processed. If the receiver has an STCB, it MUST + process the AUTH chunk as described above using the STCB + from the existing association to authenticate the + COOKIE-ECHO chunk and all the chunks after it. [...] + +Commit bbd0d59809f9 introduced the possibility to receive +and verification of AUTH chunk, including the edge case for +authenticated COOKIE-ECHO. On reception of COOKIE-ECHO, +the function sctp_sf_do_5_1D_ce() handles processing, +unpacks and creates a new association if it passed sanity +checks and also tests for authentication chunks being +present. After a new association has been processed, it +invokes sctp_process_init() on the new association and +walks through the parameter list it received from the INIT +chunk. It checks SCTP_PARAM_RANDOM, SCTP_PARAM_HMAC_ALGO +and SCTP_PARAM_CHUNKS, and copies them into asoc->peer +meta data (peer_random, peer_hmacs, peer_chunks) in case +sysctl -w net.sctp.auth_enable=1 is set. If in INIT's +SCTP_PARAM_SUPPORTED_EXT parameter SCTP_CID_AUTH is set, +peer_random != NULL and peer_hmacs != NULL the peer is to be +assumed asoc->peer.auth_capable=1, in any other case +asoc->peer.auth_capable=0. + +Now, if in sctp_sf_do_5_1D_ce() chunk->auth_chunk is +available, we set up a fake auth chunk and pass that on to +sctp_sf_authenticate(), which at latest in +sctp_auth_calculate_hmac() reliably dereferences a NULL pointer +at position 0..0008 when setting up the crypto key in +crypto_hash_setkey() by using asoc->asoc_shared_key that is +NULL as condition key_id == asoc->active_key_id is true if +the AUTH chunk was injected correctly from remote. This +happens no matter what net.sctp.auth_enable sysctl says. + +The fix is to check for net->sctp.auth_enable and for +asoc->peer.auth_capable before doing any operations like +sctp_sf_authenticate() as no key is activated in +sctp_auth_asoc_init_active_key() for each case. + +Now as RFC4895 section 6.3 states that if the used HMAC-ALGO +passed from the INIT chunk was not used in the AUTH chunk, we +SHOULD send an error; however in this case it would be better +to just silently discard such a maliciously prepared handshake +as we didn't even receive a parameter at all. Also, as our +endpoint has no shared key configured, section 6.3 says that +MUST silently discard, which we are doing from now onwards. + +Before calling sctp_sf_pdiscard(), we need not only to free +the association, but also the chunk->auth_chunk skb, as +commit bbd0d59809f9 created a skb clone in that case. + +I have tested this locally by using netfilter's nfqueue and +re-injecting packets into the local stack after maliciously +modifying the INIT chunk (removing RANDOM; HMAC-ALGO param) +and the SCTP packet containing the COOKIE_ECHO (injecting +AUTH chunk before COOKIE_ECHO). Fixed with this patch applied. + +This fixes CVE-2014-0101 +Upstream-Status: Backport + +Fixes: bbd0d59809f9 ("[SCTP]: Implement the receive and verification of AUTH chunk") +Signed-off-by: Daniel Borkmann +Cc: Vlad Yasevich +Cc: Neil Horman +Acked-by: Vlad Yasevich +Signed-off-by: David S. Miller +Signed-off-by: Jiri Slaby +Signed-off-by: Sona Sarmadi +--- + net/sctp/sm_statefuns.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c +index dfe3f36..56ebe71 100644 +--- a/net/sctp/sm_statefuns.c ++++ b/net/sctp/sm_statefuns.c +@@ -759,6 +759,13 @@ sctp_disposition_t sctp_sf_do_5_1D_ce(struct net *net, + struct sctp_chunk auth; + sctp_ierror_t ret; + ++ /* Make sure that we and the peer are AUTH capable */ ++ if (!net->sctp.auth_enable || !new_asoc->peer.auth_capable) { ++ kfree_skb(chunk->auth_chunk); ++ sctp_association_free(new_asoc); ++ return sctp_sf_pdiscard(net, ep, asoc, type, arg, commands); ++ } ++ + /* set-up our fake chunk so that we can process it */ + auth.skb = chunk->auth_chunk; + auth.asoc = chunk->asoc; +-- +1.9.1 + diff --git a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq_3.12.bb b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq_3.12.bb index 48a67c0d..874a3f2b 100644 --- a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq_3.12.bb +++ b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq_3.12.bb @@ -12,6 +12,7 @@ SRC_URI = "git://git.freescale.com/ppc/sdk/linux.git;nobranch=1 \ file://0004-mnt-CVE-2014-5206_CVE-2014-5207.patch \ file://0005-mnt-CVE-2014-5206_CVE-2014-5207.patch \ file://udf-CVE-2014-6410.patch \ + file://net-sctp-CVE-2014-0101.patch \ " SRCREV = "6619b8b55796cdf0cec04b66a71288edd3057229" -- cgit v1.2.3-54-g00ecf From 2d64414dded202975082a0531fcfb4461256bf2d Mon Sep 17 00:00:00 2001 From: Sona Sarmadi Date: Tue, 27 Jan 2015 09:10:42 +0100 Subject: Kernel-HID/USB: multiple CVEs CVE-2014-3181 Kernel: HID: OOB write in magicmouse driver CVE-2014-3182 Kernel: HID: logitech-dj OOB array access CVE-2014-3184 Kernel: HID: off by one error in various _report_fixup routine CVE-2014-3185 Kernel: USB serial: memory corruption flaw References: http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-3181 http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-3182 http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-3184 http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-3185 Signed-off-by: Sona Sarmadi --- .../linux/files/0001-HID-CVE-2014-3181.patch | 52 ++++++++++ .../linux/files/0002-HID-CVE-2014-3182.patch | 65 ++++++++++++ .../linux/files/0003-HID-CVE-2014-3184.patch | 114 +++++++++++++++++++++ .../linux/files/0004-USB-CVE-2014-3185.patch | 51 +++++++++ .../recipes-kernel/linux/linux-qoriq_3.12.bb | 4 + 5 files changed, 286 insertions(+) create mode 100644 meta-fsl-ppc/recipes-kernel/linux/files/0001-HID-CVE-2014-3181.patch create mode 100644 meta-fsl-ppc/recipes-kernel/linux/files/0002-HID-CVE-2014-3182.patch create mode 100644 meta-fsl-ppc/recipes-kernel/linux/files/0003-HID-CVE-2014-3184.patch create mode 100644 meta-fsl-ppc/recipes-kernel/linux/files/0004-USB-CVE-2014-3185.patch diff --git a/meta-fsl-ppc/recipes-kernel/linux/files/0001-HID-CVE-2014-3181.patch b/meta-fsl-ppc/recipes-kernel/linux/files/0001-HID-CVE-2014-3181.patch new file mode 100644 index 00000000..4355c68f --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/linux/files/0001-HID-CVE-2014-3181.patch @@ -0,0 +1,52 @@ +From c54def7bd64d7c0b6993336abcffb8444795bf38 Mon Sep 17 00:00:00 2001 +From: Jiri Kosina +Date: Wed, 27 Aug 2014 09:12:24 +0200 +Subject: [PATCH] HID: magicmouse: sanity check report size in raw_event() + callback + +The report passed to us from transport driver could potentially be +arbitrarily large, therefore we better sanity-check it so that +magicmouse_emit_touch() gets only valid values of raw_id. + +This fixes CVE-2014-3181 +Upstream-Status: Backport + +Cc: stable@vger.kernel.org +Reported-by: Steven Vittitoe +Signed-off-by: Jiri Kosina +Signed-off-by: Sona Sarmadi +--- + drivers/hid/hid-magicmouse.c | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +diff --git a/drivers/hid/hid-magicmouse.c b/drivers/hid/hid-magicmouse.c +index ecc2cbf..29a74c1 100644 +--- a/drivers/hid/hid-magicmouse.c ++++ b/drivers/hid/hid-magicmouse.c +@@ -290,6 +290,11 @@ static int magicmouse_raw_event(struct hid_device *hdev, + if (size < 4 || ((size - 4) % 9) != 0) + return 0; + npoints = (size - 4) / 9; ++ if (npoints > 15) { ++ hid_warn(hdev, "invalid size value (%d) for TRACKPAD_REPORT_ID\n", ++ size); ++ return 0; ++ } + msc->ntouches = 0; + for (ii = 0; ii < npoints; ii++) + magicmouse_emit_touch(msc, ii, data + ii * 9 + 4); +@@ -307,6 +312,11 @@ static int magicmouse_raw_event(struct hid_device *hdev, + if (size < 6 || ((size - 6) % 8) != 0) + return 0; + npoints = (size - 6) / 8; ++ if (npoints > 15) { ++ hid_warn(hdev, "invalid size value (%d) for MOUSE_REPORT_ID\n", ++ size); ++ return 0; ++ } + msc->ntouches = 0; + for (ii = 0; ii < npoints; ii++) + magicmouse_emit_touch(msc, ii, data + ii * 8 + 6); +-- +1.9.1 + diff --git a/meta-fsl-ppc/recipes-kernel/linux/files/0002-HID-CVE-2014-3182.patch b/meta-fsl-ppc/recipes-kernel/linux/files/0002-HID-CVE-2014-3182.patch new file mode 100644 index 00000000..a90d0799 --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/linux/files/0002-HID-CVE-2014-3182.patch @@ -0,0 +1,65 @@ +From ad3e14d7c5268c2e24477c6ef54bbdf88add5d36 Mon Sep 17 00:00:00 2001 +From: Jiri Kosina +Date: Thu, 21 Aug 2014 09:57:17 -0500 +Subject: [PATCH] HID: logitech: perform bounds checking on device_id early + enough + +device_index is a char type and the size of paired_dj_deivces is 7 +elements, therefore proper bounds checking has to be applied to +device_index before it is used. + +We are currently performing the bounds checking in +logi_dj_recv_add_djhid_device(), which is too late, as malicious device +could send REPORT_TYPE_NOTIF_DEVICE_UNPAIRED early enough and trigger the +problem in one of the report forwarding functions called from +logi_dj_raw_event(). + +Fix this by performing the check at the earliest possible ocasion in +logi_dj_raw_event(). + +This fixes CVE-2014-3182 +Upstream-Status: Backport + +Cc: stable@vger.kernel.org +Reported-by: Ben Hawkes +Reviewed-by: Benjamin Tissoires +Signed-off-by: Jiri Kosina +Signed-off-by: Sona Sarmadi +--- + drivers/hid/hid-logitech-dj.c | 13 ++++++------- + 1 file changed, 6 insertions(+), 7 deletions(-) + +diff --git a/drivers/hid/hid-logitech-dj.c b/drivers/hid/hid-logitech-dj.c +index ca0ab51..b7ba829 100644 +--- a/drivers/hid/hid-logitech-dj.c ++++ b/drivers/hid/hid-logitech-dj.c +@@ -238,13 +238,6 @@ static void logi_dj_recv_add_djhid_device(struct dj_receiver_dev *djrcv_dev, + return; + } + +- if ((dj_report->device_index < DJ_DEVICE_INDEX_MIN) || +- (dj_report->device_index > DJ_DEVICE_INDEX_MAX)) { +- dev_err(&djrcv_hdev->dev, "%s: invalid device index:%d\n", +- __func__, dj_report->device_index); +- return; +- } +- + if (djrcv_dev->paired_dj_devices[dj_report->device_index]) { + /* The device is already known. No need to reallocate it. */ + dbg_hid("%s: device is already known\n", __func__); +@@ -690,6 +683,12 @@ static int logi_dj_raw_event(struct hid_device *hdev, + * device (via hid_input_report() ) and return 1 so hid-core does not do + * anything else with it. + */ ++ if ((dj_report->device_index < DJ_DEVICE_INDEX_MIN) || ++ (dj_report->device_index > DJ_DEVICE_INDEX_MAX)) { ++ dev_err(&hdev->dev, "%s: invalid device index:%d\n", ++ __func__, dj_report->device_index); ++ return false; ++ } + + spin_lock_irqsave(&djrcv_dev->lock, flags); + if (dj_report->report_id == REPORT_ID_DJ_SHORT) { +-- +1.9.1 + diff --git a/meta-fsl-ppc/recipes-kernel/linux/files/0003-HID-CVE-2014-3184.patch b/meta-fsl-ppc/recipes-kernel/linux/files/0003-HID-CVE-2014-3184.patch new file mode 100644 index 00000000..f58b2f0e --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/linux/files/0003-HID-CVE-2014-3184.patch @@ -0,0 +1,114 @@ +From 4ab25786c87eb20857bbb715c3ae34ec8fd6a214 Mon Sep 17 00:00:00 2001 +From: Jiri Kosina +Date: Thu, 21 Aug 2014 09:57:48 -0500 +Subject: [PATCH] HID: fix a couple of off-by-ones + +There are a few very theoretical off-by-one bugs in report descriptor size +checking when performing a pre-parsing fixup. Fix those. + +This fixes CVE-2014-3184 +Upstream-Status: Backport + +Cc: stable@vger.kernel.org +Reported-by: Ben Hawkes +Reviewed-by: Benjamin Tissoires +Signed-off-by: Jiri Kosina +Signed-off-by: Sona Sarmadi +--- + drivers/hid/hid-cherry.c | 2 +- + drivers/hid/hid-kye.c | 2 +- + drivers/hid/hid-lg.c | 4 ++-- + drivers/hid/hid-monterey.c | 2 +- + drivers/hid/hid-petalynx.c | 2 +- + drivers/hid/hid-sunplus.c | 2 +- + 6 files changed, 7 insertions(+), 7 deletions(-) + +diff --git a/drivers/hid/hid-cherry.c b/drivers/hid/hid-cherry.c +index 1bdcccc..f745d2c 100644 +--- a/drivers/hid/hid-cherry.c ++++ b/drivers/hid/hid-cherry.c +@@ -28,7 +28,7 @@ + static __u8 *ch_report_fixup(struct hid_device *hdev, __u8 *rdesc, + unsigned int *rsize) + { +- if (*rsize >= 17 && rdesc[11] == 0x3c && rdesc[12] == 0x02) { ++ if (*rsize >= 18 && rdesc[11] == 0x3c && rdesc[12] == 0x02) { + hid_info(hdev, "fixing up Cherry Cymotion report descriptor\n"); + rdesc[11] = rdesc[16] = 0xff; + rdesc[12] = rdesc[17] = 0x03; +diff --git a/drivers/hid/hid-kye.c b/drivers/hid/hid-kye.c +index e776963..b92bf01 100644 +--- a/drivers/hid/hid-kye.c ++++ b/drivers/hid/hid-kye.c +@@ -300,7 +300,7 @@ static __u8 *kye_report_fixup(struct hid_device *hdev, __u8 *rdesc, + * - change the button usage range to 4-7 for the extra + * buttons + */ +- if (*rsize >= 74 && ++ if (*rsize >= 75 && + rdesc[61] == 0x05 && rdesc[62] == 0x08 && + rdesc[63] == 0x19 && rdesc[64] == 0x08 && + rdesc[65] == 0x29 && rdesc[66] == 0x0f && +diff --git a/drivers/hid/hid-lg.c b/drivers/hid/hid-lg.c +index a976f48..f91ff14 100644 +--- a/drivers/hid/hid-lg.c ++++ b/drivers/hid/hid-lg.c +@@ -345,14 +345,14 @@ static __u8 *lg_report_fixup(struct hid_device *hdev, __u8 *rdesc, + struct usb_device_descriptor *udesc; + __u16 bcdDevice, rev_maj, rev_min; + +- if ((drv_data->quirks & LG_RDESC) && *rsize >= 90 && rdesc[83] == 0x26 && ++ if ((drv_data->quirks & LG_RDESC) && *rsize >= 91 && rdesc[83] == 0x26 && + rdesc[84] == 0x8c && rdesc[85] == 0x02) { + hid_info(hdev, + "fixing up Logitech keyboard report descriptor\n"); + rdesc[84] = rdesc[89] = 0x4d; + rdesc[85] = rdesc[90] = 0x10; + } +- if ((drv_data->quirks & LG_RDESC_REL_ABS) && *rsize >= 50 && ++ if ((drv_data->quirks & LG_RDESC_REL_ABS) && *rsize >= 51 && + rdesc[32] == 0x81 && rdesc[33] == 0x06 && + rdesc[49] == 0x81 && rdesc[50] == 0x06) { + hid_info(hdev, +diff --git a/drivers/hid/hid-monterey.c b/drivers/hid/hid-monterey.c +index 9e14c00..25daf28 100644 +--- a/drivers/hid/hid-monterey.c ++++ b/drivers/hid/hid-monterey.c +@@ -24,7 +24,7 @@ + static __u8 *mr_report_fixup(struct hid_device *hdev, __u8 *rdesc, + unsigned int *rsize) + { +- if (*rsize >= 30 && rdesc[29] == 0x05 && rdesc[30] == 0x09) { ++ if (*rsize >= 31 && rdesc[29] == 0x05 && rdesc[30] == 0x09) { + hid_info(hdev, "fixing up button/consumer in HID report descriptor\n"); + rdesc[30] = 0x0c; + } +diff --git a/drivers/hid/hid-petalynx.c b/drivers/hid/hid-petalynx.c +index 736b250..6aca4f2 100644 +--- a/drivers/hid/hid-petalynx.c ++++ b/drivers/hid/hid-petalynx.c +@@ -25,7 +25,7 @@ + static __u8 *pl_report_fixup(struct hid_device *hdev, __u8 *rdesc, + unsigned int *rsize) + { +- if (*rsize >= 60 && rdesc[39] == 0x2a && rdesc[40] == 0xf5 && ++ if (*rsize >= 62 && rdesc[39] == 0x2a && rdesc[40] == 0xf5 && + rdesc[41] == 0x00 && rdesc[59] == 0x26 && + rdesc[60] == 0xf9 && rdesc[61] == 0x00) { + hid_info(hdev, "fixing up Petalynx Maxter Remote report descriptor\n"); +diff --git a/drivers/hid/hid-sunplus.c b/drivers/hid/hid-sunplus.c +index 87fc91e..91072fa 100644 +--- a/drivers/hid/hid-sunplus.c ++++ b/drivers/hid/hid-sunplus.c +@@ -24,7 +24,7 @@ + static __u8 *sp_report_fixup(struct hid_device *hdev, __u8 *rdesc, + unsigned int *rsize) + { +- if (*rsize >= 107 && rdesc[104] == 0x26 && rdesc[105] == 0x80 && ++ if (*rsize >= 112 && rdesc[104] == 0x26 && rdesc[105] == 0x80 && + rdesc[106] == 0x03) { + hid_info(hdev, "fixing up Sunplus Wireless Desktop report descriptor\n"); + rdesc[105] = rdesc[110] = 0x03; +-- +1.9.1 + diff --git a/meta-fsl-ppc/recipes-kernel/linux/files/0004-USB-CVE-2014-3185.patch b/meta-fsl-ppc/recipes-kernel/linux/files/0004-USB-CVE-2014-3185.patch new file mode 100644 index 00000000..08208076 --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/linux/files/0004-USB-CVE-2014-3185.patch @@ -0,0 +1,51 @@ +From 6817ae225cd650fb1c3295d769298c38b1eba818 Mon Sep 17 00:00:00 2001 +From: James Forshaw +Date: Sat, 23 Aug 2014 14:39:48 -0700 +Subject: [PATCH] USB: whiteheat: Added bounds checking for bulk command + response + +This patch fixes a potential security issue in the whiteheat USB driver +which might allow a local attacker to cause kernel memory corrpution. This +is due to an unchecked memcpy into a fixed size buffer (of 64 bytes). On +EHCI and XHCI busses it's possible to craft responses greater than 64 +bytes leading a buffer overflow. + +This fixes CVE-2014-3185 +Upstream-Status: Backport + +Signed-off-by: James Forshaw +Cc: stable +Signed-off-by: Greg Kroah-Hartman +Signed-off-by: Sona Sarmadi +--- + drivers/usb/serial/whiteheat.c | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/drivers/usb/serial/whiteheat.c b/drivers/usb/serial/whiteheat.c +index e62f2df..6c3734d 100644 +--- a/drivers/usb/serial/whiteheat.c ++++ b/drivers/usb/serial/whiteheat.c +@@ -514,6 +514,10 @@ static void command_port_read_callback(struct urb *urb) + dev_dbg(&urb->dev->dev, "%s - command_info is NULL, exiting.\n", __func__); + return; + } ++ if (!urb->actual_length) { ++ dev_dbg(&urb->dev->dev, "%s - empty response, exiting.\n", __func__); ++ return; ++ } + if (status) { + dev_dbg(&urb->dev->dev, "%s - nonzero urb status: %d\n", __func__, status); + if (status != -ENOENT) +@@ -534,7 +538,8 @@ static void command_port_read_callback(struct urb *urb) + /* These are unsolicited reports from the firmware, hence no + waiting command to wakeup */ + dev_dbg(&urb->dev->dev, "%s - event received\n", __func__); +- } else if (data[0] == WHITEHEAT_GET_DTR_RTS) { ++ } else if ((data[0] == WHITEHEAT_GET_DTR_RTS) && ++ (urb->actual_length - 1 <= sizeof(command_info->result_buffer))) { + memcpy(command_info->result_buffer, &data[1], + urb->actual_length - 1); + command_info->command_finished = WHITEHEAT_CMD_COMPLETE; +-- +1.9.1 + diff --git a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq_3.12.bb b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq_3.12.bb index 874a3f2b..195b4777 100644 --- a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq_3.12.bb +++ b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq_3.12.bb @@ -13,6 +13,10 @@ SRC_URI = "git://git.freescale.com/ppc/sdk/linux.git;nobranch=1 \ file://0005-mnt-CVE-2014-5206_CVE-2014-5207.patch \ file://udf-CVE-2014-6410.patch \ file://net-sctp-CVE-2014-0101.patch \ + file://0001-HID-CVE-2014-3181.patch \ + file://0002-HID-CVE-2014-3182.patch \ + file://0003-HID-CVE-2014-3184.patch \ + file://0004-USB-CVE-2014-3185.patch \ " SRCREV = "6619b8b55796cdf0cec04b66a71288edd3057229" -- cgit v1.2.3-54-g00ecf From 8cde62241772c928769ae77344325e741c414e0f Mon Sep 17 00:00:00 2001 From: Sona Sarmadi Date: Tue, 27 Jan 2015 10:22:10 +0100 Subject: kvm-iommu: CVE-2014-3601, CVE-2014-8369 CVE-2014-3601 Fixes the third parameter of kvm_iommu_put_pages The third parameter of kvm_iommu_put_pages is wrong, It should be 'gfn - slot->base_gfn'. CVE-2014-8369 Fixes excessive pages un-pinning in kvm_iommu_map error path. (This vulnerability exists because of an incorrect fix for CVE-2014-3601 Reference: http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-3601 http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-8369 https://bugzilla.redhat.com/show_bug.cgi?id=1156518 https://lkml.org/lkml/2014/10/24/460 Signed-off-by: Sona Sarmadi --- .../linux/files/0001-kvm-iommu-CVE-2014-3601.patch | 94 ++++++++++++++++++++++ .../linux/files/0002-kvm-iommu-CVE-2014-8369.patch | 86 ++++++++++++++++++++ .../recipes-kernel/linux/linux-qoriq_3.12.bb | 2 + 3 files changed, 182 insertions(+) create mode 100644 meta-fsl-ppc/recipes-kernel/linux/files/0001-kvm-iommu-CVE-2014-3601.patch create mode 100644 meta-fsl-ppc/recipes-kernel/linux/files/0002-kvm-iommu-CVE-2014-8369.patch diff --git a/meta-fsl-ppc/recipes-kernel/linux/files/0001-kvm-iommu-CVE-2014-3601.patch b/meta-fsl-ppc/recipes-kernel/linux/files/0001-kvm-iommu-CVE-2014-3601.patch new file mode 100644 index 00000000..e19a3c10 --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/linux/files/0001-kvm-iommu-CVE-2014-3601.patch @@ -0,0 +1,94 @@ +From e35b1e9f17e0567f96502f3a2a31dace727ed3da Mon Sep 17 00:00:00 2001 +From: "Michael S. Tsirkin" +Date: Tue, 19 Aug 2014 19:14:50 +0800 +Subject: [PATCH] kvm: iommu: fix the third parameter of kvm_iommu_put_pages + (CVE-2014-3601) + +commit 350b8bdd689cd2ab2c67c8a86a0be86cfa0751a7 upstream. + +The third parameter of kvm_iommu_put_pages is wrong, +It should be 'gfn - slot->base_gfn'. + +By making gfn very large, malicious guest or userspace can cause kvm to +go to this error path, and subsequently to pass a huge value as size. +Alternatively if gfn is small, then pages would be pinned but never +unpinned, causing host memory leak and local DOS. + +Passing a reasonable but large value could be the most dangerous case, +because it would unpin a page that should have stayed pinned, and thus +allow the device to DMA into arbitrary memory. However, this cannot +happen because of the condition that can trigger the error: + +- out of memory (where you can't allocate even a single page) + should not be possible for the attacker to trigger + +- when exceeding the iommu's address space, guest pages after gfn + will also exceed the iommu's address space, and inside + kvm_iommu_put_pages() the iommu_iova_to_phys() will fail. The + page thus would not be unpinned at all. + +Upstream-Status: Backport + +Reported-by: Jack Morgenstein +Signed-off-by: Michael S. Tsirkin +Signed-off-by: Paolo Bonzini +Signed-off-by: Jiri Slaby +Signed-off-by: Sona Sarmadi +--- + virt/kvm/iommu.c | 19 ++++++++++--------- + 1 file changed, 10 insertions(+), 9 deletions(-) + +diff --git a/virt/kvm/iommu.c b/virt/kvm/iommu.c +index c329c8f..dec9971 100644 +--- a/virt/kvm/iommu.c ++++ b/virt/kvm/iommu.c +@@ -61,6 +61,14 @@ static pfn_t kvm_pin_pages(struct kvm_memory_slot *slot, gfn_t gfn, + return pfn; + } + ++static void kvm_unpin_pages(struct kvm *kvm, pfn_t pfn, unsigned long npages) ++{ ++ unsigned long i; ++ ++ for (i = 0; i < npages; ++i) ++ kvm_release_pfn_clean(pfn + i); ++} ++ + int kvm_iommu_map_pages(struct kvm *kvm, struct kvm_memory_slot *slot) + { + gfn_t gfn, end_gfn; +@@ -123,6 +131,7 @@ int kvm_iommu_map_pages(struct kvm *kvm, struct kvm_memory_slot *slot) + if (r) { + printk(KERN_ERR "kvm_iommu_map_address:" + "iommu failed to map pfn=%llx\n", pfn); ++ kvm_unpin_pages(kvm, pfn, page_size); + goto unmap_pages; + } + +@@ -134,7 +143,7 @@ int kvm_iommu_map_pages(struct kvm *kvm, struct kvm_memory_slot *slot) + return 0; + + unmap_pages: +- kvm_iommu_put_pages(kvm, slot->base_gfn, gfn); ++ kvm_iommu_put_pages(kvm, slot->base_gfn, gfn - slot->base_gfn); + return r; + } + +@@ -272,14 +281,6 @@ out_unlock: + return r; + } + +-static void kvm_unpin_pages(struct kvm *kvm, pfn_t pfn, unsigned long npages) +-{ +- unsigned long i; +- +- for (i = 0; i < npages; ++i) +- kvm_release_pfn_clean(pfn + i); +-} +- + static void kvm_iommu_put_pages(struct kvm *kvm, + gfn_t base_gfn, unsigned long npages) + { +-- +1.9.1 + diff --git a/meta-fsl-ppc/recipes-kernel/linux/files/0002-kvm-iommu-CVE-2014-8369.patch b/meta-fsl-ppc/recipes-kernel/linux/files/0002-kvm-iommu-CVE-2014-8369.patch new file mode 100644 index 00000000..e43771cc --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/linux/files/0002-kvm-iommu-CVE-2014-8369.patch @@ -0,0 +1,86 @@ +From 248541357433e3035d954435dafcdb9e70afee4e Mon Sep 17 00:00:00 2001 +From: Quentin Casasnovas +Date: Fri, 17 Oct 2014 22:55:59 +0200 +Subject: [PATCH] kvm: fix excessive pages un-pinning in kvm_iommu_map error + path. + +commit 3d32e4dbe71374a6780eaf51d719d76f9a9bf22f upstream. + +The third parameter of kvm_unpin_pages() when called from +kvm_iommu_map_pages() is wrong, it should be the number of pages to un-pin +and not the page size. + +This error was facilitated with an inconsistent API: kvm_pin_pages() takes +a size, but kvn_unpin_pages() takes a number of pages, so fix the problem +by matching the two. + +This was introduced by commit 350b8bd ("kvm: iommu: fix the third parameter +of kvm_iommu_put_pages (CVE-2014-3601)"), which fixes the lack of +un-pinning for pages intended to be un-pinned (i.e. memory leak) but +unfortunately potentially aggravated the number of pages we un-pin that +should have stayed pinned. As far as I understand though, the same +practical mitigations apply. + +This issue was found during review of Red Hat 6.6 patches to prepare +Ksplice rebootless updates. + +Thanks to Vegard for his time on a late Friday evening to help me in +understanding this code. + +Fix for CVE-2014-8369 + +Upstream-Status: Backport + +Fixes: 350b8bd ("kvm: iommu: fix the third parameter of... (CVE-2014-3601)") +Signed-off-by: Quentin Casasnovas +Signed-off-by: Vegard Nossum +Signed-off-by: Jamie Iles +Reviewed-by: Sasha Levin +Signed-off-by: Paolo Bonzini +Signed-off-by: Jiri Slaby +Signed-off-by: Sona Sarmadi +--- + virt/kvm/iommu.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/virt/kvm/iommu.c b/virt/kvm/iommu.c +index dec9971..a650aa4 100644 +--- a/virt/kvm/iommu.c ++++ b/virt/kvm/iommu.c +@@ -43,13 +43,13 @@ static void kvm_iommu_put_pages(struct kvm *kvm, + gfn_t base_gfn, unsigned long npages); + + static pfn_t kvm_pin_pages(struct kvm_memory_slot *slot, gfn_t gfn, +- unsigned long size) ++ unsigned long npages) + { + gfn_t end_gfn; + pfn_t pfn; + + pfn = gfn_to_pfn_memslot(slot, gfn); +- end_gfn = gfn + (size >> PAGE_SHIFT); ++ end_gfn = gfn + npages; + gfn += 1; + + if (is_error_noslot_pfn(pfn)) +@@ -119,7 +119,7 @@ int kvm_iommu_map_pages(struct kvm *kvm, struct kvm_memory_slot *slot) + * Pin all pages we are about to map in memory. This is + * important because we unmap and unpin in 4kb steps later. + */ +- pfn = kvm_pin_pages(slot, gfn, page_size); ++ pfn = kvm_pin_pages(slot, gfn, page_size >> PAGE_SHIFT); + if (is_error_noslot_pfn(pfn)) { + gfn += 1; + continue; +@@ -131,7 +131,7 @@ int kvm_iommu_map_pages(struct kvm *kvm, struct kvm_memory_slot *slot) + if (r) { + printk(KERN_ERR "kvm_iommu_map_address:" + "iommu failed to map pfn=%llx\n", pfn); +- kvm_unpin_pages(kvm, pfn, page_size); ++ kvm_unpin_pages(kvm, pfn, page_size >> PAGE_SHIFT); + goto unmap_pages; + } + +-- +1.9.1 + diff --git a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq_3.12.bb b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq_3.12.bb index 195b4777..5993b59a 100644 --- a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq_3.12.bb +++ b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq_3.12.bb @@ -17,6 +17,8 @@ SRC_URI = "git://git.freescale.com/ppc/sdk/linux.git;nobranch=1 \ file://0002-HID-CVE-2014-3182.patch \ file://0003-HID-CVE-2014-3184.patch \ file://0004-USB-CVE-2014-3185.patch \ + file://0001-kvm-iommu-CVE-2014-3601.patch \ + file://0002-kvm-iommu-CVE-2014-8369.patch \ " SRCREV = "6619b8b55796cdf0cec04b66a71288edd3057229" -- cgit v1.2.3-54-g00ecf From 26303c11e8502a997caee96a4b342fdf084bd4ab Mon Sep 17 00:00:00 2001 From: Sona Sarmadi Date: Tue, 27 Jan 2015 14:04:07 +0100 Subject: net-sctp: CVE-2014-3673, CVE-2014-3687, CVE-2014-3688 CVE-2014-3673 skb_over_panic when receiving malformed ASCONF chunks Fixes: b896b82be4ae ("[SCTP] ADDIP: Support for processing incoming ASCONF_ACK chunks.") CVE-2014-3687 panic on duplicate ASCONF chunks Fixes: 2e3216cd54b1 ("sctp: Follow security requirement of responding with 1 packet") CVE-2014-3688 remote memory pressure from excessive queueing Fixes: 2e3216cd54b1 ("sctp: Follow security requirement of responding with 1 packet") References: http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-3673 http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-3687 http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-3688 http://www.openwall.com/lists/oss-security/2014/11/13/8 Signed-off-by: Sona Sarmadi --- .../linux/files/0001-net-sctp-CVE-2014-3673.patch | 348 +++++++++++++++++++++ .../linux/files/0002-net-sctp-CVE-2014-3687.patch | 102 ++++++ .../linux/files/0003-net-sctp-CVE-2014-3688.patch | 160 ++++++++++ .../recipes-kernel/linux/linux-qoriq_3.12.bb | 3 + 4 files changed, 613 insertions(+) create mode 100644 meta-fsl-ppc/recipes-kernel/linux/files/0001-net-sctp-CVE-2014-3673.patch create mode 100644 meta-fsl-ppc/recipes-kernel/linux/files/0002-net-sctp-CVE-2014-3687.patch create mode 100644 meta-fsl-ppc/recipes-kernel/linux/files/0003-net-sctp-CVE-2014-3688.patch diff --git a/meta-fsl-ppc/recipes-kernel/linux/files/0001-net-sctp-CVE-2014-3673.patch b/meta-fsl-ppc/recipes-kernel/linux/files/0001-net-sctp-CVE-2014-3673.patch new file mode 100644 index 00000000..68289f28 --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/linux/files/0001-net-sctp-CVE-2014-3673.patch @@ -0,0 +1,348 @@ +From bbd951a21e0fd555cd9ede44c7196af09d04d171 Mon Sep 17 00:00:00 2001 +From: Daniel Borkmann +Date: Thu, 9 Oct 2014 22:55:31 +0200 +Subject: [PATCH] net: sctp: fix skb_over_panic when receiving malformed ASCONF + chunks + +commit 9de7922bc709eee2f609cd01d98aaedc4cf5ea74 upstream. + +Commit 6f4c618ddb0 ("SCTP : Add paramters validity check for +ASCONF chunk") added basic verification of ASCONF chunks, however, +it is still possible to remotely crash a server by sending a +special crafted ASCONF chunk, even up to pre 2.6.12 kernels: + +skb_over_panic: text:ffffffffa01ea1c3 len:31056 put:30768 + head:ffff88011bd81800 data:ffff88011bd81800 tail:0x7950 + end:0x440 dev: + ------------[ cut here ]------------ +kernel BUG at net/core/skbuff.c:129! +[...] +Call Trace: + + [] skb_put+0x5c/0x70 + [] sctp_addto_chunk+0x63/0xd0 [sctp] + [] sctp_process_asconf+0x1af/0x540 [sctp] + [] ? _read_unlock_bh+0x15/0x20 + [] sctp_sf_do_asconf+0x168/0x240 [sctp] + [] sctp_do_sm+0x71/0x1210 [sctp] + [] ? fib_rules_lookup+0xad/0xf0 + [] ? sctp_cmp_addr_exact+0x32/0x40 [sctp] + [] sctp_assoc_bh_rcv+0xd3/0x180 [sctp] + [] sctp_inq_push+0x56/0x80 [sctp] + [] sctp_rcv+0x982/0xa10 [sctp] + [] ? ipt_local_in_hook+0x23/0x28 [iptable_filter] + [] ? nf_iterate+0x69/0xb0 + [] ? ip_local_deliver_finish+0x0/0x2d0 + [] ? nf_hook_slow+0x76/0x120 + [] ? ip_local_deliver_finish+0x0/0x2d0 + [] ip_local_deliver_finish+0xdd/0x2d0 + [] ip_local_deliver+0x98/0xa0 + [] ip_rcv_finish+0x12d/0x440 + [] ip_rcv+0x275/0x350 + [] __netif_receive_skb+0x4ab/0x750 + [] netif_receive_skb+0x58/0x60 + +This can be triggered e.g., through a simple scripted nmap +connection scan injecting the chunk after the handshake, for +example, ... + + -------------- INIT[ASCONF; ASCONF_ACK] -------------> + <----------- INIT-ACK[ASCONF; ASCONF_ACK] ------------ + -------------------- COOKIE-ECHO --------------------> + <-------------------- COOKIE-ACK --------------------- + ------------------ ASCONF; UNKNOWN ------------------> + +... where ASCONF chunk of length 280 contains 2 parameters ... + + 1) Add IP address parameter (param length: 16) + 2) Add/del IP address parameter (param length: 255) + +... followed by an UNKNOWN chunk of e.g. 4 bytes. Here, the +Address Parameter in the ASCONF chunk is even missing, too. +This is just an example and similarly-crafted ASCONF chunks +could be used just as well. + +The ASCONF chunk passes through sctp_verify_asconf() as all +parameters passed sanity checks, and after walking, we ended +up successfully at the chunk end boundary, and thus may invoke +sctp_process_asconf(). Parameter walking is done with +WORD_ROUND() to take padding into account. + +In sctp_process_asconf()'s TLV processing, we may fail in +sctp_process_asconf_param() e.g., due to removal of the IP +address that is also the source address of the packet containing +the ASCONF chunk, and thus we need to add all TLVs after the +failure to our ASCONF response to remote via helper function +sctp_add_asconf_response(), which basically invokes a +sctp_addto_chunk() adding the error parameters to the given +skb. + +When walking to the next parameter this time, we proceed +with ... + + length = ntohs(asconf_param->param_hdr.length); + asconf_param = (void *)asconf_param + length; + +... instead of the WORD_ROUND()'ed length, thus resulting here +in an off-by-one that leads to reading the follow-up garbage +parameter length of 12336, and thus throwing an skb_over_panic +for the reply when trying to sctp_addto_chunk() next time, +which implicitly calls the skb_put() with that length. + +Fix it by using sctp_walk_params() [ which is also used in +INIT parameter processing ] macro in the verification *and* +in ASCONF processing: it will make sure we don't spill over, +that we walk parameters WORD_ROUND()'ed. Moreover, we're being +more defensive and guard against unknown parameter types and +missized addresses. + +Joint work with Vlad Yasevich. + +Fixes CVE-2014-3673 +Upstream-Status: Backport + +Fixes: b896b82be4ae ("[SCTP] ADDIP: Support for processing incoming ASCONF_ACK chunks.") +Signed-off-by: Daniel Borkmann +Signed-off-by: Vlad Yasevich +Acked-by: Neil Horman +Signed-off-by: David S. Miller +Cc: Josh Boyer +Signed-off-by: Jiri Slaby +Signed-off-by: Sona Sarmadi +--- + include/net/sctp/sm.h | 6 +-- + net/sctp/sm_make_chunk.c | 99 +++++++++++++++++++++++++++--------------------- + net/sctp/sm_statefuns.c | 18 +-------- + 3 files changed, 60 insertions(+), 63 deletions(-) + +diff --git a/include/net/sctp/sm.h b/include/net/sctp/sm.h +index 4ef75af..c91b6f5 100644 +--- a/include/net/sctp/sm.h ++++ b/include/net/sctp/sm.h +@@ -249,9 +249,9 @@ struct sctp_chunk *sctp_make_asconf_update_ip(struct sctp_association *, + int, __be16); + struct sctp_chunk *sctp_make_asconf_set_prim(struct sctp_association *asoc, + union sctp_addr *addr); +-int sctp_verify_asconf(const struct sctp_association *asoc, +- struct sctp_paramhdr *param_hdr, void *chunk_end, +- struct sctp_paramhdr **errp); ++bool sctp_verify_asconf(const struct sctp_association *asoc, ++ struct sctp_chunk *chunk, bool addr_param_needed, ++ struct sctp_paramhdr **errp); + struct sctp_chunk *sctp_process_asconf(struct sctp_association *asoc, + struct sctp_chunk *asconf); + int sctp_process_asconf_ack(struct sctp_association *asoc, +diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c +index e342387..d800160 100644 +--- a/net/sctp/sm_make_chunk.c ++++ b/net/sctp/sm_make_chunk.c +@@ -3126,50 +3126,63 @@ static __be16 sctp_process_asconf_param(struct sctp_association *asoc, + return SCTP_ERROR_NO_ERROR; + } + +-/* Verify the ASCONF packet before we process it. */ +-int sctp_verify_asconf(const struct sctp_association *asoc, +- struct sctp_paramhdr *param_hdr, void *chunk_end, +- struct sctp_paramhdr **errp) { +- sctp_addip_param_t *asconf_param; ++/* Verify the ASCONF packet before we process it. */ ++bool sctp_verify_asconf(const struct sctp_association *asoc, ++ struct sctp_chunk *chunk, bool addr_param_needed, ++ struct sctp_paramhdr **errp) ++{ ++ sctp_addip_chunk_t *addip = (sctp_addip_chunk_t *) chunk->chunk_hdr; + union sctp_params param; +- int length, plen; +- +- param.v = (sctp_paramhdr_t *) param_hdr; +- while (param.v <= chunk_end - sizeof(sctp_paramhdr_t)) { +- length = ntohs(param.p->length); +- *errp = param.p; ++ bool addr_param_seen = false; + +- if (param.v > chunk_end - length || +- length < sizeof(sctp_paramhdr_t)) +- return 0; ++ sctp_walk_params(param, addip, addip_hdr.params) { ++ size_t length = ntohs(param.p->length); + ++ *errp = param.p; + switch (param.p->type) { ++ case SCTP_PARAM_ERR_CAUSE: ++ break; ++ case SCTP_PARAM_IPV4_ADDRESS: ++ if (length != sizeof(sctp_ipv4addr_param_t)) ++ return false; ++ addr_param_seen = true; ++ break; ++ case SCTP_PARAM_IPV6_ADDRESS: ++ if (length != sizeof(sctp_ipv6addr_param_t)) ++ return false; ++ addr_param_seen = true; ++ break; + case SCTP_PARAM_ADD_IP: + case SCTP_PARAM_DEL_IP: + case SCTP_PARAM_SET_PRIMARY: +- asconf_param = (sctp_addip_param_t *)param.v; +- plen = ntohs(asconf_param->param_hdr.length); +- if (plen < sizeof(sctp_addip_param_t) + +- sizeof(sctp_paramhdr_t)) +- return 0; ++ /* In ASCONF chunks, these need to be first. */ ++ if (addr_param_needed && !addr_param_seen) ++ return false; ++ length = ntohs(param.addip->param_hdr.length); ++ if (length < sizeof(sctp_addip_param_t) + ++ sizeof(sctp_paramhdr_t)) ++ return false; + break; + case SCTP_PARAM_SUCCESS_REPORT: + case SCTP_PARAM_ADAPTATION_LAYER_IND: + if (length != sizeof(sctp_addip_param_t)) +- return 0; +- ++ return false; + break; + default: +- break; ++ /* This is unkown to us, reject! */ ++ return false; + } +- +- param.v += WORD_ROUND(length); + } + +- if (param.v != chunk_end) +- return 0; ++ /* Remaining sanity checks. */ ++ if (addr_param_needed && !addr_param_seen) ++ return false; ++ if (!addr_param_needed && addr_param_seen) ++ return false; ++ if (param.v != chunk->chunk_end) ++ return false; + +- return 1; ++ return true; + } + + /* Process an incoming ASCONF chunk with the next expected serial no. and +@@ -3178,16 +3191,17 @@ int sctp_verify_asconf(const struct sctp_association *asoc, + struct sctp_chunk *sctp_process_asconf(struct sctp_association *asoc, + struct sctp_chunk *asconf) + { ++ sctp_addip_chunk_t *addip = (sctp_addip_chunk_t *) asconf->chunk_hdr; ++ bool all_param_pass = true; ++ union sctp_params param; + sctp_addiphdr_t *hdr; + union sctp_addr_param *addr_param; + sctp_addip_param_t *asconf_param; + struct sctp_chunk *asconf_ack; +- + __be16 err_code; + int length = 0; + int chunk_len; + __u32 serial; +- int all_param_pass = 1; + + chunk_len = ntohs(asconf->chunk_hdr->length) - sizeof(sctp_chunkhdr_t); + hdr = (sctp_addiphdr_t *)asconf->skb->data; +@@ -3215,9 +3229,14 @@ struct sctp_chunk *sctp_process_asconf(struct sctp_association *asoc, + goto done; + + /* Process the TLVs contained within the ASCONF chunk. */ +- while (chunk_len > 0) { ++ sctp_walk_params(param, addip, addip_hdr.params) { ++ /* Skip preceeding address parameters. */ ++ if (param.p->type == SCTP_PARAM_IPV4_ADDRESS || ++ param.p->type == SCTP_PARAM_IPV6_ADDRESS) ++ continue; ++ + err_code = sctp_process_asconf_param(asoc, asconf, +- asconf_param); ++ param.addip); + /* ADDIP 4.1 A7) + * If an error response is received for a TLV parameter, + * all TLVs with no response before the failed TLV are +@@ -3225,28 +3244,20 @@ struct sctp_chunk *sctp_process_asconf(struct sctp_association *asoc, + * the failed response are considered unsuccessful unless + * a specific success indication is present for the parameter. + */ +- if (SCTP_ERROR_NO_ERROR != err_code) +- all_param_pass = 0; +- ++ if (err_code != SCTP_ERROR_NO_ERROR) ++ all_param_pass = false; + if (!all_param_pass) +- sctp_add_asconf_response(asconf_ack, +- asconf_param->crr_id, err_code, +- asconf_param); ++ sctp_add_asconf_response(asconf_ack, param.addip->crr_id, ++ err_code, param.addip); + + /* ADDIP 4.3 D11) When an endpoint receiving an ASCONF to add + * an IP address sends an 'Out of Resource' in its response, it + * MUST also fail any subsequent add or delete requests bundled + * in the ASCONF. + */ +- if (SCTP_ERROR_RSRC_LOW == err_code) ++ if (err_code == SCTP_ERROR_RSRC_LOW) + goto done; +- +- /* Move to the next ASCONF param. */ +- length = ntohs(asconf_param->param_hdr.length); +- asconf_param = (void *)asconf_param + length; +- chunk_len -= length; + } +- + done: + asoc->peer.addip_serial++; + +diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c +index 62623cc..bf12098 100644 +--- a/net/sctp/sm_statefuns.c ++++ b/net/sctp/sm_statefuns.c +@@ -3595,9 +3595,7 @@ sctp_disposition_t sctp_sf_do_asconf(struct net *net, + struct sctp_chunk *asconf_ack = NULL; + struct sctp_paramhdr *err_param = NULL; + sctp_addiphdr_t *hdr; +- union sctp_addr_param *addr_param; + __u32 serial; +- int length; + + if (!sctp_vtag_verify(chunk, asoc)) { + sctp_add_cmd_sf(commands, SCTP_CMD_REPORT_BAD_TAG, +@@ -3622,17 +3620,8 @@ sctp_disposition_t sctp_sf_do_asconf(struct net *net, + hdr = (sctp_addiphdr_t *)chunk->skb->data; + serial = ntohl(hdr->serial); + +- addr_param = (union sctp_addr_param *)hdr->params; +- length = ntohs(addr_param->p.length); +- if (length < sizeof(sctp_paramhdr_t)) +- return sctp_sf_violation_paramlen(net, ep, asoc, type, arg, +- (void *)addr_param, commands); +- + /* Verify the ASCONF chunk before processing it. */ +- if (!sctp_verify_asconf(asoc, +- (sctp_paramhdr_t *)((void *)addr_param + length), +- (void *)chunk->chunk_end, +- &err_param)) ++ if (!sctp_verify_asconf(asoc, chunk, true, &err_param)) + return sctp_sf_violation_paramlen(net, ep, asoc, type, arg, + (void *)err_param, commands); + +@@ -3750,10 +3739,7 @@ sctp_disposition_t sctp_sf_do_asconf_ack(struct net *net, + rcvd_serial = ntohl(addip_hdr->serial); + + /* Verify the ASCONF-ACK chunk before processing it. */ +- if (!sctp_verify_asconf(asoc, +- (sctp_paramhdr_t *)addip_hdr->params, +- (void *)asconf_ack->chunk_end, +- &err_param)) ++ if (!sctp_verify_asconf(asoc, asconf_ack, false, &err_param)) + return sctp_sf_violation_paramlen(net, ep, asoc, type, arg, + (void *)err_param, commands); + +-- +1.9.1 + diff --git a/meta-fsl-ppc/recipes-kernel/linux/files/0002-net-sctp-CVE-2014-3687.patch b/meta-fsl-ppc/recipes-kernel/linux/files/0002-net-sctp-CVE-2014-3687.patch new file mode 100644 index 00000000..b05aaf2b --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/linux/files/0002-net-sctp-CVE-2014-3687.patch @@ -0,0 +1,102 @@ +From a723db0be941b8aebaa1a98b33d17a91b16603e4 Mon Sep 17 00:00:00 2001 +From: Daniel Borkmann +Date: Thu, 9 Oct 2014 22:55:32 +0200 +Subject: [PATCH] net: sctp: fix panic on duplicate ASCONF chunks + +commit b69040d8e39f20d5215a03502a8e8b4c6ab78395 upstream. + +When receiving a e.g. semi-good formed connection scan in the +form of ... + + -------------- INIT[ASCONF; ASCONF_ACK] -------------> + <----------- INIT-ACK[ASCONF; ASCONF_ACK] ------------ + -------------------- COOKIE-ECHO --------------------> + <-------------------- COOKIE-ACK --------------------- + ---------------- ASCONF_a; ASCONF_b -----------------> + +... where ASCONF_a equals ASCONF_b chunk (at least both serials +need to be equal), we panic an SCTP server! + +The problem is that good-formed ASCONF chunks that we reply with +ASCONF_ACK chunks are cached per serial. Thus, when we receive a +same ASCONF chunk twice (e.g. through a lost ASCONF_ACK), we do +not need to process them again on the server side (that was the +idea, also proposed in the RFC). Instead, we know it was cached +and we just resend the cached chunk instead. So far, so good. + +Where things get nasty is in SCTP's side effect interpreter, that +is, sctp_cmd_interpreter(): + +While incoming ASCONF_a (chunk = event_arg) is being marked +!end_of_packet and !singleton, and we have an association context, +we do not flush the outqueue the first time after processing the +ASCONF_ACK singleton chunk via SCTP_CMD_REPLY. Instead, we keep it +queued up, although we set local_cork to 1. Commit 2e3216cd54b1 +changed the precedence, so that as long as we get bundled, incoming +chunks we try possible bundling on outgoing queue as well. Before +this commit, we would just flush the output queue. + +Now, while ASCONF_a's ASCONF_ACK sits in the corked outq, we +continue to process the same ASCONF_b chunk from the packet. As +we have cached the previous ASCONF_ACK, we find it, grab it and +do another SCTP_CMD_REPLY command on it. So, effectively, we rip +the chunk->list pointers and requeue the same ASCONF_ACK chunk +another time. Since we process ASCONF_b, it's correctly marked +with end_of_packet and we enforce an uncork, and thus flush, thus +crashing the kernel. + +Fix it by testing if the ASCONF_ACK is currently pending and if +that is the case, do not requeue it. When flushing the output +queue we may relink the chunk for preparing an outgoing packet, +but eventually unlink it when it's copied into the skb right +before transmission. + +Joint work with Vlad Yasevich. + +Fixes CVE-2014-3687 +Upstream-Status: Backport + +Fixes: 2e3216cd54b1 ("sctp: Follow security requirement of responding with 1 packet") +Signed-off-by: Daniel Borkmann +Signed-off-by: Vlad Yasevich +Signed-off-by: David S. Miller +Cc: Josh Boyer +Signed-off-by: Jiri Slaby +Signed-off-by: Sona Sarmadi +--- + include/net/sctp/sctp.h | 5 +++++ + net/sctp/associola.c | 2 ++ + 2 files changed, 7 insertions(+) + +diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h +index 3794c5a..3848934 100644 +--- a/include/net/sctp/sctp.h ++++ b/include/net/sctp/sctp.h +@@ -454,6 +454,11 @@ static inline void sctp_assoc_pending_pmtu(struct sock *sk, struct sctp_associat + asoc->pmtu_pending = 0; + } + ++static inline bool sctp_chunk_pending(const struct sctp_chunk *chunk) ++{ ++ return !list_empty(&chunk->list); ++} ++ + /* Walk through a list of TLV parameters. Don't trust the + * individual parameter lengths and instead depend on + * the chunk length to indicate when to stop. Make sure +diff --git a/net/sctp/associola.c b/net/sctp/associola.c +index ad5cd6f..737050f 100644 +--- a/net/sctp/associola.c ++++ b/net/sctp/associola.c +@@ -1645,6 +1645,8 @@ struct sctp_chunk *sctp_assoc_lookup_asconf_ack( + * ack chunk whose serial number matches that of the request. + */ + list_for_each_entry(ack, &asoc->asconf_ack_list, transmitted_list) { ++ if (sctp_chunk_pending(ack)) ++ continue; + if (ack->subh.addip_hdr->serial == serial) { + sctp_chunk_hold(ack); + return ack; +-- +1.9.1 + diff --git a/meta-fsl-ppc/recipes-kernel/linux/files/0003-net-sctp-CVE-2014-3688.patch b/meta-fsl-ppc/recipes-kernel/linux/files/0003-net-sctp-CVE-2014-3688.patch new file mode 100644 index 00000000..1b4716d0 --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/linux/files/0003-net-sctp-CVE-2014-3688.patch @@ -0,0 +1,160 @@ +From e476841415c1b7b54e4118d8a219f5db71878675 Mon Sep 17 00:00:00 2001 +From: Daniel Borkmann +Date: Thu, 9 Oct 2014 22:55:33 +0200 +Subject: [PATCH] net: sctp: fix remote memory pressure from excessive queueing + +commit 26b87c7881006311828bb0ab271a551a62dcceb4 upstream. + +This scenario is not limited to ASCONF, just taken as one +example triggering the issue. When receiving ASCONF probes +in the form of ... + + -------------- INIT[ASCONF; ASCONF_ACK] -------------> + <----------- INIT-ACK[ASCONF; ASCONF_ACK] ------------ + -------------------- COOKIE-ECHO --------------------> + <-------------------- COOKIE-ACK --------------------- + ---- ASCONF_a; [ASCONF_b; ...; ASCONF_n;] JUNK ------> + [...] + ---- ASCONF_m; [ASCONF_o; ...; ASCONF_z;] JUNK ------> + +... where ASCONF_a, ASCONF_b, ..., ASCONF_z are good-formed +ASCONFs and have increasing serial numbers, we process such +ASCONF chunk(s) marked with !end_of_packet and !singleton, +since we have not yet reached the SCTP packet end. SCTP does +only do verification on a chunk by chunk basis, as an SCTP +packet is nothing more than just a container of a stream of +chunks which it eats up one by one. + +We could run into the case that we receive a packet with a +malformed tail, above marked as trailing JUNK. All previous +chunks are here goodformed, so the stack will eat up all +previous chunks up to this point. In case JUNK does not fit +into a chunk header and there are no more other chunks in +the input queue, or in case JUNK contains a garbage chunk +header, but the encoded chunk length would exceed the skb +tail, or we came here from an entirely different scenario +and the chunk has pdiscard=1 mark (without having had a flush +point), it will happen, that we will excessively queue up +the association's output queue (a correct final chunk may +then turn it into a response flood when flushing the +queue ;)): I ran a simple script with incremental ASCONF +serial numbers and could see the server side consuming +excessive amount of RAM [before/after: up to 2GB and more]. + +The issue at heart is that the chunk train basically ends +with !end_of_packet and !singleton markers and since commit +2e3216cd54b1 ("sctp: Follow security requirement of responding +with 1 packet") therefore preventing an output queue flush +point in sctp_do_sm() -> sctp_cmd_interpreter() on the input +chunk (chunk = event_arg) even though local_cork is set, +but its precedence has changed since then. In the normal +case, the last chunk with end_of_packet=1 would trigger the +queue flush to accommodate possible outgoing bundling. + +In the input queue, sctp_inq_pop() seems to do the right thing +in terms of discarding invalid chunks. So, above JUNK will +not enter the state machine and instead be released and exit +the sctp_assoc_bh_rcv() chunk processing loop. It's simply +the flush point being missing at loop exit. Adding a try-flush +approach on the output queue might not work as the underlying +infrastructure might be long gone at this point due to the +side-effect interpreter run. + +One possibility, albeit a bit of a kludge, would be to defer +invalid chunk freeing into the state machine in order to +possibly trigger packet discards and thus indirectly a queue +flush on error. It would surely be better to discard chunks +as in the current, perhaps better controlled environment, but +going back and forth, it's simply architecturally not possible. +I tried various trailing JUNK attack cases and it seems to +look good now. + +Joint work with Vlad Yasevich. + +Fixes CVE-2014-3688 +Upstream-Status: Backport + +Fixes: 2e3216cd54b1 ("sctp: Follow security requirement of responding with 1 packet") +Signed-off-by: Daniel Borkmann +Signed-off-by: Vlad Yasevich +Signed-off-by: David S. Miller +Cc: Josh Boyer +Signed-off-by: Jiri Slaby +Signed-off-by: Sona Sarmadi +--- + net/sctp/inqueue.c | 33 +++++++-------------------------- + net/sctp/sm_statefuns.c | 3 +++ + 2 files changed, 10 insertions(+), 26 deletions(-) + +diff --git a/net/sctp/inqueue.c b/net/sctp/inqueue.c +index 5856932..560cd41 100644 +--- a/net/sctp/inqueue.c ++++ b/net/sctp/inqueue.c +@@ -141,18 +141,9 @@ struct sctp_chunk *sctp_inq_pop(struct sctp_inq *queue) + } else { + /* Nothing to do. Next chunk in the packet, please. */ + ch = (sctp_chunkhdr_t *) chunk->chunk_end; +- + /* Force chunk->skb->data to chunk->chunk_end. */ +- skb_pull(chunk->skb, +- chunk->chunk_end - chunk->skb->data); +- +- /* Verify that we have at least chunk headers +- * worth of buffer left. +- */ +- if (skb_headlen(chunk->skb) < sizeof(sctp_chunkhdr_t)) { +- sctp_chunk_free(chunk); +- chunk = queue->in_progress = NULL; +- } ++ skb_pull(chunk->skb, chunk->chunk_end - chunk->skb->data); ++ /* We are guaranteed to pull a SCTP header. */ + } + } + +@@ -188,24 +179,14 @@ struct sctp_chunk *sctp_inq_pop(struct sctp_inq *queue) + skb_pull(chunk->skb, sizeof(sctp_chunkhdr_t)); + chunk->subh.v = NULL; /* Subheader is no longer valid. */ + +- if (chunk->chunk_end < skb_tail_pointer(chunk->skb)) { ++ if (chunk->chunk_end + sizeof(sctp_chunkhdr_t) < ++ skb_tail_pointer(chunk->skb)) { + /* This is not a singleton */ + chunk->singleton = 0; + } else if (chunk->chunk_end > skb_tail_pointer(chunk->skb)) { +- /* RFC 2960, Section 6.10 Bundling +- * +- * Partial chunks MUST NOT be placed in an SCTP packet. +- * If the receiver detects a partial chunk, it MUST drop +- * the chunk. +- * +- * Since the end of the chunk is past the end of our buffer +- * (which contains the whole packet, we can freely discard +- * the whole packet. +- */ +- sctp_chunk_free(chunk); +- chunk = queue->in_progress = NULL; +- +- return NULL; ++ /* Discard inside state machine. */ ++ chunk->pdiscard = 1; ++ chunk->chunk_end = skb_tail_pointer(chunk->skb); + } else { + /* We are at the end of the packet, so mark the chunk + * in case we need to send a SACK. +diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c +index 1dbcc6a..62623cc 100644 +--- a/net/sctp/sm_statefuns.c ++++ b/net/sctp/sm_statefuns.c +@@ -171,6 +171,9 @@ sctp_chunk_length_valid(struct sctp_chunk *chunk, + { + __u16 chunk_length = ntohs(chunk->chunk_hdr->length); + ++ /* Previously already marked? */ ++ if (unlikely(chunk->pdiscard)) ++ return 0; + if (unlikely(chunk_length < required_length)) + return 0; + +-- +1.9.1 + diff --git a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq_3.12.bb b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq_3.12.bb index 5993b59a..96656322 100644 --- a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq_3.12.bb +++ b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq_3.12.bb @@ -19,6 +19,9 @@ SRC_URI = "git://git.freescale.com/ppc/sdk/linux.git;nobranch=1 \ file://0004-USB-CVE-2014-3185.patch \ file://0001-kvm-iommu-CVE-2014-3601.patch \ file://0002-kvm-iommu-CVE-2014-8369.patch \ + file://0001-net-sctp-CVE-2014-3673.patch \ + file://0002-net-sctp-CVE-2014-3687.patch \ + file://0003-net-sctp-CVE-2014-3688.patch \ " SRCREV = "6619b8b55796cdf0cec04b66a71288edd3057229" -- cgit v1.2.3-54-g00ecf From f4a55466f032850b4ca8c495d76d06d18d77fb00 Mon Sep 17 00:00:00 2001 From: Sona Sarmadi Date: Tue, 27 Jan 2015 14:04:08 +0100 Subject: kernel-auditsc: CVE-2014-3917 audit_krule mask accesses need bounds checking Reference: http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-3917 Signed-off-by: Sona Sarmadi --- .../linux/files/auditsc-CVE-2014-3917.patch | 91 ++++++++++++++++++++++ .../recipes-kernel/linux/linux-qoriq_3.12.bb | 1 + 2 files changed, 92 insertions(+) create mode 100644 meta-fsl-ppc/recipes-kernel/linux/files/auditsc-CVE-2014-3917.patch diff --git a/meta-fsl-ppc/recipes-kernel/linux/files/auditsc-CVE-2014-3917.patch b/meta-fsl-ppc/recipes-kernel/linux/files/auditsc-CVE-2014-3917.patch new file mode 100644 index 00000000..a0bdc271 --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/linux/files/auditsc-CVE-2014-3917.patch @@ -0,0 +1,91 @@ +From 6004b0e5ac2e8e9e1bb0f012dc9242e03cca95df Mon Sep 17 00:00:00 2001 +From: Andy Lutomirski +Date: Wed, 28 May 2014 23:09:58 -0400 +Subject: [PATCH] auditsc: audit_krule mask accesses need bounds checking + +commit a3c54931199565930d6d84f4c3456f6440aefd41 upstream. + +Fixes an easy DoS and possible information disclosure. + +This does nothing about the broken state of x32 auditing. + +eparis: If the admin has enabled auditd and has specifically loaded +audit rules. This bug has been around since before git. Wow... + +This fixes CVE-2014-3917 +Upstream-Status: Backport + +Signed-off-by: Andy Lutomirski +Signed-off-by: Eric Paris +Signed-off-by: Linus Torvalds +Signed-off-by: Jiri Slaby +Signed-off-by: Sona Sarmadi +--- + kernel/auditsc.c | 27 ++++++++++++++++++--------- + 1 file changed, 18 insertions(+), 9 deletions(-) + +diff --git a/kernel/auditsc.c b/kernel/auditsc.c +index 3b79a47..979c00b 100644 +--- a/kernel/auditsc.c ++++ b/kernel/auditsc.c +@@ -733,6 +733,22 @@ static enum audit_state audit_filter_task(struct task_struct *tsk, char **key) + return AUDIT_BUILD_CONTEXT; + } + ++static int audit_in_mask(const struct audit_krule *rule, unsigned long val) ++{ ++ int word, bit; ++ ++ if (val > 0xffffffff) ++ return false; ++ ++ word = AUDIT_WORD(val); ++ if (word >= AUDIT_BITMASK_SIZE) ++ return false; ++ ++ bit = AUDIT_BIT(val); ++ ++ return rule->mask[word] & bit; ++} ++ + /* At syscall entry and exit time, this filter is called if the + * audit_state is not low enough that auditing cannot take place, but is + * also not high enough that we already know we have to write an audit +@@ -750,11 +766,8 @@ static enum audit_state audit_filter_syscall(struct task_struct *tsk, + + rcu_read_lock(); + if (!list_empty(list)) { +- int word = AUDIT_WORD(ctx->major); +- int bit = AUDIT_BIT(ctx->major); +- + list_for_each_entry_rcu(e, list, list) { +- if ((e->rule.mask[word] & bit) == bit && ++ if (audit_in_mask(&e->rule, ctx->major) && + audit_filter_rules(tsk, &e->rule, ctx, NULL, + &state, false)) { + rcu_read_unlock(); +@@ -774,20 +787,16 @@ static enum audit_state audit_filter_syscall(struct task_struct *tsk, + static int audit_filter_inode_name(struct task_struct *tsk, + struct audit_names *n, + struct audit_context *ctx) { +- int word, bit; + int h = audit_hash_ino((u32)n->ino); + struct list_head *list = &audit_inode_hash[h]; + struct audit_entry *e; + enum audit_state state; + +- word = AUDIT_WORD(ctx->major); +- bit = AUDIT_BIT(ctx->major); +- + if (list_empty(list)) + return 0; + + list_for_each_entry_rcu(e, list, list) { +- if ((e->rule.mask[word] & bit) == bit && ++ if (audit_in_mask(&e->rule, ctx->major) && + audit_filter_rules(tsk, &e->rule, ctx, n, &state, false)) { + ctx->current_state = state; + return 1; +-- +1.9.1 + diff --git a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq_3.12.bb b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq_3.12.bb index 96656322..bbbf4ba7 100644 --- a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq_3.12.bb +++ b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq_3.12.bb @@ -22,6 +22,7 @@ SRC_URI = "git://git.freescale.com/ppc/sdk/linux.git;nobranch=1 \ file://0001-net-sctp-CVE-2014-3673.patch \ file://0002-net-sctp-CVE-2014-3687.patch \ file://0003-net-sctp-CVE-2014-3688.patch \ + file://auditsc-CVE-2014-3917.patch \ " SRCREV = "6619b8b55796cdf0cec04b66a71288edd3057229" -- cgit v1.2.3-54-g00ecf From 6a6c9c5fdab04e8c78d4d7a72a359cb03bb1cdd0 Mon Sep 17 00:00:00 2001 From: Sona Sarmadi Date: Tue, 27 Jan 2015 14:04:09 +0100 Subject: ALSA: CVE-2014-4652 CVE-2014-4653 CVE-2014-4652 Protect user controls against concurrent access CVE-2014-4653 Don't access controls outside of protected regions Reference: http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-4652 http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-4653 Signed-off-by: Sona Sarmadi --- .../linux/files/0001-ALSA-CVE-2014-4652.patch | 140 +++++++++++++++++++++ .../linux/files/0002-ALSA-CVE-2014-4653.patch | 92 ++++++++++++++ .../recipes-kernel/linux/linux-qoriq_3.12.bb | 2 + 3 files changed, 234 insertions(+) create mode 100644 meta-fsl-ppc/recipes-kernel/linux/files/0001-ALSA-CVE-2014-4652.patch create mode 100644 meta-fsl-ppc/recipes-kernel/linux/files/0002-ALSA-CVE-2014-4653.patch diff --git a/meta-fsl-ppc/recipes-kernel/linux/files/0001-ALSA-CVE-2014-4652.patch b/meta-fsl-ppc/recipes-kernel/linux/files/0001-ALSA-CVE-2014-4652.patch new file mode 100644 index 00000000..01307688 --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/linux/files/0001-ALSA-CVE-2014-4652.patch @@ -0,0 +1,140 @@ +From ed81e6b21790b717cda5f5bab2bdb07d2ce17ab1 Mon Sep 17 00:00:00 2001 +From: Lars-Peter Clausen +Date: Wed, 18 Jun 2014 13:32:31 +0200 +Subject: [PATCH] ALSA: control: Protect user controls against concurrent + access + +commit 07f4d9d74a04aa7c72c5dae0ef97565f28f17b92 upstream. + +The user-control put and get handlers as well as the tlv do not protect against +concurrent access from multiple threads. Since the state of the control is not +updated atomically it is possible that either two write operations or a write +and a read operation race against each other. Both can lead to arbitrary memory +disclosure. This patch introduces a new lock that protects user-controls from +concurrent access. Since applications typically access controls sequentially +than in parallel a single lock per card should be fine. + +This fixes CVE-2014-4652 +Upstream-Status: Backport + +Signed-off-by: Lars-Peter Clausen +Acked-by: Jaroslav Kysela +Signed-off-by: Takashi Iwai +Signed-off-by: Jiri Slaby +Signed-off-by: Sona Sarmadi +--- + include/sound/core.h | 2 ++ + sound/core/control.c | 31 +++++++++++++++++++++++++------ + sound/core/init.c | 1 + + 3 files changed, 28 insertions(+), 6 deletions(-) + +diff --git a/include/sound/core.h b/include/sound/core.h +index 2a14f1f..d6bc961 100644 +--- a/include/sound/core.h ++++ b/include/sound/core.h +@@ -121,6 +121,8 @@ struct snd_card { + int user_ctl_count; /* count of all user controls */ + struct list_head controls; /* all controls for this card */ + struct list_head ctl_files; /* active control files */ ++ struct mutex user_ctl_lock; /* protects user controls against ++ concurrent access */ + + struct snd_info_entry *proc_root; /* root for soundcard specific files */ + struct snd_info_entry *proc_id; /* the card id */ +diff --git a/sound/core/control.c b/sound/core/control.c +index d8aa206..183fab2 100644 +--- a/sound/core/control.c ++++ b/sound/core/control.c +@@ -992,6 +992,7 @@ static int snd_ctl_elem_unlock(struct snd_ctl_file *file, + + struct user_element { + struct snd_ctl_elem_info info; ++ struct snd_card *card; + void *elem_data; /* element data */ + unsigned long elem_data_size; /* size of element data in bytes */ + void *tlv_data; /* TLV data */ +@@ -1035,7 +1036,9 @@ static int snd_ctl_elem_user_get(struct snd_kcontrol *kcontrol, + { + struct user_element *ue = kcontrol->private_data; + ++ mutex_lock(&ue->card->user_ctl_lock); + memcpy(&ucontrol->value, ue->elem_data, ue->elem_data_size); ++ mutex_unlock(&ue->card->user_ctl_lock); + return 0; + } + +@@ -1044,10 +1047,12 @@ static int snd_ctl_elem_user_put(struct snd_kcontrol *kcontrol, + { + int change; + struct user_element *ue = kcontrol->private_data; +- ++ ++ mutex_lock(&ue->card->user_ctl_lock); + change = memcmp(&ucontrol->value, ue->elem_data, ue->elem_data_size) != 0; + if (change) + memcpy(ue->elem_data, &ucontrol->value, ue->elem_data_size); ++ mutex_unlock(&ue->card->user_ctl_lock); + return change; + } + +@@ -1067,19 +1072,32 @@ static int snd_ctl_elem_user_tlv(struct snd_kcontrol *kcontrol, + new_data = memdup_user(tlv, size); + if (IS_ERR(new_data)) + return PTR_ERR(new_data); ++ mutex_lock(&ue->card->user_ctl_lock); + change = ue->tlv_data_size != size; + if (!change) + change = memcmp(ue->tlv_data, new_data, size); + kfree(ue->tlv_data); + ue->tlv_data = new_data; + ue->tlv_data_size = size; ++ mutex_unlock(&ue->card->user_ctl_lock); + } else { +- if (! ue->tlv_data_size || ! ue->tlv_data) +- return -ENXIO; +- if (size < ue->tlv_data_size) +- return -ENOSPC; ++ int ret = 0; ++ ++ mutex_lock(&ue->card->user_ctl_lock); ++ if (!ue->tlv_data_size || !ue->tlv_data) { ++ ret = -ENXIO; ++ goto err_unlock; ++ } ++ if (size < ue->tlv_data_size) { ++ ret = -ENOSPC; ++ goto err_unlock; ++ } + if (copy_to_user(tlv, ue->tlv_data, ue->tlv_data_size)) +- return -EFAULT; ++ ret = -EFAULT; ++err_unlock: ++ mutex_unlock(&ue->card->user_ctl_lock); ++ if (ret) ++ return ret; + } + return change; + } +@@ -1211,6 +1229,7 @@ static int snd_ctl_elem_add(struct snd_ctl_file *file, + ue = kzalloc(sizeof(struct user_element) + private_size, GFP_KERNEL); + if (ue == NULL) + return -ENOMEM; ++ ue->card = card; + ue->info = *info; + ue->info.access = 0; + ue->elem_data = (char *)ue + sizeof(*ue); +diff --git a/sound/core/init.c b/sound/core/init.c +index d047851..b9268a5 100644 +--- a/sound/core/init.c ++++ b/sound/core/init.c +@@ -215,6 +215,7 @@ int snd_card_create(int idx, const char *xid, + INIT_LIST_HEAD(&card->devices); + init_rwsem(&card->controls_rwsem); + rwlock_init(&card->ctl_files_rwlock); ++ mutex_init(&card->user_ctl_lock); + INIT_LIST_HEAD(&card->controls); + INIT_LIST_HEAD(&card->ctl_files); + spin_lock_init(&card->files_lock); +-- +1.9.1 + diff --git a/meta-fsl-ppc/recipes-kernel/linux/files/0002-ALSA-CVE-2014-4653.patch b/meta-fsl-ppc/recipes-kernel/linux/files/0002-ALSA-CVE-2014-4653.patch new file mode 100644 index 00000000..8612d74a --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/linux/files/0002-ALSA-CVE-2014-4653.patch @@ -0,0 +1,92 @@ +From 0bf595fd311aa4d6e82c43879f2c0d0650e83271 Mon Sep 17 00:00:00 2001 +From: Lars-Peter Clausen +Date: Wed, 18 Jun 2014 13:32:33 +0200 +Subject: [PATCH] ALSA: control: Don't access controls outside of protected + regions + +commit fd9f26e4eca5d08a27d12c0933fceef76ed9663d upstream. + +A control that is visible on the card->controls list can be freed at any time. +This means we must not access any of its memory while not holding the +controls_rw_lock. Otherwise we risk a use after free access. + +This fixes CVE-2014-4653 +Upstream-Status: Backport + +Signed-off-by: Lars-Peter Clausen +Acked-by: Jaroslav Kysela +Signed-off-by: Takashi Iwai +Signed-off-by: Jiri Slaby +Signed-off-by: Sona Sarmadi +--- + sound/core/control.c | 15 ++++++++++----- + 1 file changed, 10 insertions(+), 5 deletions(-) + +diff --git a/sound/core/control.c b/sound/core/control.c +index 15bc844..d4a597f 100644 +--- a/sound/core/control.c ++++ b/sound/core/control.c +@@ -331,6 +331,7 @@ int snd_ctl_add(struct snd_card *card, struct snd_kcontrol *kcontrol) + { + struct snd_ctl_elem_id id; + unsigned int idx; ++ unsigned int count; + int err = -EINVAL; + + if (! kcontrol) +@@ -359,8 +360,9 @@ int snd_ctl_add(struct snd_card *card, struct snd_kcontrol *kcontrol) + card->controls_count += kcontrol->count; + kcontrol->id.numid = card->last_numid + 1; + card->last_numid += kcontrol->count; ++ count = kcontrol->count; + up_write(&card->controls_rwsem); +- for (idx = 0; idx < kcontrol->count; idx++, id.index++, id.numid++) ++ for (idx = 0; idx < count; idx++, id.index++, id.numid++) + snd_ctl_notify(card, SNDRV_CTL_EVENT_MASK_ADD, &id); + return 0; + +@@ -389,6 +391,7 @@ int snd_ctl_replace(struct snd_card *card, struct snd_kcontrol *kcontrol, + bool add_on_replace) + { + struct snd_ctl_elem_id id; ++ unsigned int count; + unsigned int idx; + struct snd_kcontrol *old; + int ret; +@@ -424,8 +427,9 @@ add: + card->controls_count += kcontrol->count; + kcontrol->id.numid = card->last_numid + 1; + card->last_numid += kcontrol->count; ++ count = kcontrol->count; + up_write(&card->controls_rwsem); +- for (idx = 0; idx < kcontrol->count; idx++, id.index++, id.numid++) ++ for (idx = 0; idx < count; idx++, id.index++, id.numid++) + snd_ctl_notify(card, SNDRV_CTL_EVENT_MASK_ADD, &id); + return 0; + +@@ -898,9 +902,9 @@ static int snd_ctl_elem_write(struct snd_card *card, struct snd_ctl_file *file, + result = kctl->put(kctl, control); + } + if (result > 0) { ++ struct snd_ctl_elem_id id = control->id; + up_read(&card->controls_rwsem); +- snd_ctl_notify(card, SNDRV_CTL_EVENT_MASK_VALUE, +- &control->id); ++ snd_ctl_notify(card, SNDRV_CTL_EVENT_MASK_VALUE, &id); + return 0; + } + } +@@ -1334,8 +1338,9 @@ static int snd_ctl_tlv_ioctl(struct snd_ctl_file *file, + } + err = kctl->tlv.c(kctl, op_flag, tlv.length, _tlv->tlv); + if (err > 0) { ++ struct snd_ctl_elem_id id = kctl->id; + up_read(&card->controls_rwsem); +- snd_ctl_notify(card, SNDRV_CTL_EVENT_MASK_TLV, &kctl->id); ++ snd_ctl_notify(card, SNDRV_CTL_EVENT_MASK_TLV, &id); + return 0; + } + } else { +-- +1.9.1 + diff --git a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq_3.12.bb b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq_3.12.bb index bbbf4ba7..90ccedd9 100644 --- a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq_3.12.bb +++ b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq_3.12.bb @@ -23,6 +23,8 @@ SRC_URI = "git://git.freescale.com/ppc/sdk/linux.git;nobranch=1 \ file://0002-net-sctp-CVE-2014-3687.patch \ file://0003-net-sctp-CVE-2014-3688.patch \ file://auditsc-CVE-2014-3917.patch \ + file://0001-ALSA-CVE-2014-4652.patch \ + file://0002-ALSA-CVE-2014-4653.patch \ " SRCREV = "6619b8b55796cdf0cec04b66a71288edd3057229" -- cgit v1.2.3-54-g00ecf From d4408fa0d3c03a0ee0352aef09354c1f4af729fd Mon Sep 17 00:00:00 2001 From: Sona Sarmadi Date: Tue, 27 Jan 2015 14:04:10 +0100 Subject: sctp: CVE-2014-4667 sk_ack_backlog wrap-around problem Reference: http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-4667 Signed-off-by: Sona Sarmadi --- .../linux/files/sctp-CVE-2014-4667.patch | 51 ++++++++++++++++++++++ .../recipes-kernel/linux/linux-qoriq_3.12.bb | 1 + 2 files changed, 52 insertions(+) create mode 100644 meta-fsl-ppc/recipes-kernel/linux/files/sctp-CVE-2014-4667.patch diff --git a/meta-fsl-ppc/recipes-kernel/linux/files/sctp-CVE-2014-4667.patch b/meta-fsl-ppc/recipes-kernel/linux/files/sctp-CVE-2014-4667.patch new file mode 100644 index 00000000..e7b12283 --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/linux/files/sctp-CVE-2014-4667.patch @@ -0,0 +1,51 @@ +From ddb638e68690ca61959775b262a5ef0719c5c066 Mon Sep 17 00:00:00 2001 +From: Xufeng Zhang +Date: Thu, 12 Jun 2014 10:53:36 +0800 +Subject: [PATCH] sctp: Fix sk_ack_backlog wrap-around problem + +[ Upstream commit d3217b15a19a4779c39b212358a5c71d725822ee ] + +Consider the scenario: +For a TCP-style socket, while processing the COOKIE_ECHO chunk in +sctp_sf_do_5_1D_ce(), after it has passed a series of sanity check, +a new association would be created in sctp_unpack_cookie(), but afterwards, +some processing maybe failed, and sctp_association_free() will be called to +free the previously allocated association, in sctp_association_free(), +sk_ack_backlog value is decremented for this socket, since the initial +value for sk_ack_backlog is 0, after the decrement, it will be 65535, +a wrap-around problem happens, and if we want to establish new associations +afterward in the same socket, ABORT would be triggered since sctp deem the +accept queue as full. +Fix this issue by only decrementing sk_ack_backlog for associations in +the endpoint's list. + +Fixes CVE-2014-4667 +Upstream-Status: Backport + +Fix-suggested-by: Neil Horman +Signed-off-by: Xufeng Zhang +Acked-by: Daniel Borkmann +Acked-by: Vlad Yasevich +Signed-off-by: David S. Miller +Signed-off-by: Jiri Slaby +Signed-off-by: Sona Sarmadi +--- + net/sctp/associola.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/net/sctp/associola.c b/net/sctp/associola.c +index cef5099..f6d6dcd 100644 +--- a/net/sctp/associola.c ++++ b/net/sctp/associola.c +@@ -375,7 +375,7 @@ void sctp_association_free(struct sctp_association *asoc) + /* Only real associations count against the endpoint, so + * don't bother for if this is a temporary association. + */ +- if (!asoc->temp) { ++ if (!list_empty(&asoc->asocs)) { + list_del(&asoc->asocs); + + /* Decrement the backlog value for a TCP-style listening +-- +1.9.1 + diff --git a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq_3.12.bb b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq_3.12.bb index 90ccedd9..2cd8ce9f 100644 --- a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq_3.12.bb +++ b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq_3.12.bb @@ -25,6 +25,7 @@ SRC_URI = "git://git.freescale.com/ppc/sdk/linux.git;nobranch=1 \ file://auditsc-CVE-2014-3917.patch \ file://0001-ALSA-CVE-2014-4652.patch \ file://0002-ALSA-CVE-2014-4653.patch \ + file://sctp-CVE-2014-4667.patch \ " SRCREV = "6619b8b55796cdf0cec04b66a71288edd3057229" -- cgit v1.2.3-54-g00ecf From d2c2e06bf9b990b4e330ce83ce5cf3b88c8b46a1 Mon Sep 17 00:00:00 2001 From: Sona Sarmadi Date: Tue, 27 Jan 2015 14:04:11 +0100 Subject: sctp: CVE-2014-7841 NULL pointer dereference in af->from_addr_param on malformed packet Reference: http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-7841 Signed-off-by: Sona Sarmadi --- .../linux/files/sctp-CVE-2014-7841.patch | 85 ++++++++++++++++++++++ .../recipes-kernel/linux/linux-qoriq_3.12.bb | 1 + 2 files changed, 86 insertions(+) create mode 100644 meta-fsl-ppc/recipes-kernel/linux/files/sctp-CVE-2014-7841.patch diff --git a/meta-fsl-ppc/recipes-kernel/linux/files/sctp-CVE-2014-7841.patch b/meta-fsl-ppc/recipes-kernel/linux/files/sctp-CVE-2014-7841.patch new file mode 100644 index 00000000..0c4beb31 --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/linux/files/sctp-CVE-2014-7841.patch @@ -0,0 +1,85 @@ +From 4008f1dbe6fea8114e7f79ed2d238e369dc9138f Mon Sep 17 00:00:00 2001 +From: Daniel Borkmann +Date: Mon, 10 Nov 2014 17:54:26 +0100 +Subject: [PATCH] net: sctp: fix NULL pointer dereference in + af->from_addr_param on malformed packet + +[ Upstream commit e40607cbe270a9e8360907cb1e62ddf0736e4864 ] + +An SCTP server doing ASCONF will panic on malformed INIT ping-of-death +in the form of: + + ------------ INIT[PARAM: SET_PRIMARY_IP] ------------> + +While the INIT chunk parameter verification dissects through many things +in order to detect malformed input, it misses to actually check parameters +inside of parameters. E.g. RFC5061, section 4.2.4 proposes a 'set primary +IP address' parameter in ASCONF, which has as a subparameter an address +parameter. + +So an attacker may send a parameter type other than SCTP_PARAM_IPV4_ADDRESS +or SCTP_PARAM_IPV6_ADDRESS, param_type2af() will subsequently return 0 +and thus sctp_get_af_specific() returns NULL, too, which we then happily +dereference unconditionally through af->from_addr_param(). + +The trace for the log: + +BUG: unable to handle kernel NULL pointer dereference at 0000000000000078 +IP: [] sctp_process_init+0x492/0x990 [sctp] +PGD 0 +Oops: 0000 [#1] SMP +[...] +Pid: 0, comm: swapper Not tainted 2.6.32-504.el6.x86_64 #1 Bochs Bochs +RIP: 0010:[] [] sctp_process_init+0x492/0x990 [sctp] +[...] +Call Trace: + + [] ? sctp_bind_addr_copy+0x5d/0xe0 [sctp] + [] sctp_sf_do_5_1B_init+0x21b/0x340 [sctp] + [] sctp_do_sm+0x71/0x1210 [sctp] + [] ? sctp_endpoint_lookup_assoc+0xc9/0xf0 [sctp] + [] sctp_endpoint_bh_rcv+0x116/0x230 [sctp] + [] sctp_inq_push+0x56/0x80 [sctp] + [] sctp_rcv+0x982/0xa10 [sctp] + [] ? ipt_local_in_hook+0x23/0x28 [iptable_filter] + [] ? nf_iterate+0x69/0xb0 + [] ? ip_local_deliver_finish+0x0/0x2d0 + [] ? nf_hook_slow+0x76/0x120 + [] ? ip_local_deliver_finish+0x0/0x2d0 +[...] + +A minimal way to address this is to check for NULL as we do on all +other such occasions where we know sctp_get_af_specific() could +possibly return with NULL. + +Fix for CVE-2014-7841 +Upstream-Status: Backport + +Fixes: d6de3097592b ("[SCTP]: Add the handling of "Set Primary IP Address" parameter to INIT") +Signed-off-by: Daniel Borkmann +Cc: Vlad Yasevich +Acked-by: Neil Horman +Signed-off-by: David S. Miller +Signed-off-by: Jiri Slaby +Signed-off-by: Sona Sarmadi +--- + net/sctp/sm_make_chunk.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c +index 1e06f3b..e342387 100644 +--- a/net/sctp/sm_make_chunk.c ++++ b/net/sctp/sm_make_chunk.c +@@ -2622,6 +2622,9 @@ do_addr_param: + addr_param = param.v + sizeof(sctp_addip_param_t); + + af = sctp_get_af_specific(param_type2af(param.p->type)); ++ if (af == NULL) ++ break; ++ + af->from_addr_param(&addr, addr_param, + htons(asoc->peer.port), 0); + +-- +1.9.1 + diff --git a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq_3.12.bb b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq_3.12.bb index 2cd8ce9f..5c67dc3a 100644 --- a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq_3.12.bb +++ b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq_3.12.bb @@ -26,6 +26,7 @@ SRC_URI = "git://git.freescale.com/ppc/sdk/linux.git;nobranch=1 \ file://0001-ALSA-CVE-2014-4652.patch \ file://0002-ALSA-CVE-2014-4653.patch \ file://sctp-CVE-2014-4667.patch \ + file://sctp-CVE-2014-7841.patch \ " SRCREV = "6619b8b55796cdf0cec04b66a71288edd3057229" -- cgit v1.2.3-54-g00ecf From 0a51b84c2c2f49f809b513210f2e627757ddcf64 Mon Sep 17 00:00:00 2001 From: Sona Sarmadi Date: Mon, 9 Feb 2015 07:54:01 +0100 Subject: ALSA: CVE-2014-4656 Handle numid overflow Make sure that id->index does not overflow References: http://www.openwall.com/lists/oss-security/2014/06/26/6 http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-4656 Signed-off-by: Sona Sarmadi --- .../linux/files/0001-ALSA-CVE-2014-4656.patch | 43 ++++++++++++++++++++ .../linux/files/0002-ALSA-CVE-2014-4656.patch | 46 ++++++++++++++++++++++ .../recipes-kernel/linux/linux-qoriq_3.12.bb | 2 + 3 files changed, 91 insertions(+) create mode 100644 meta-fsl-ppc/recipes-kernel/linux/files/0001-ALSA-CVE-2014-4656.patch create mode 100644 meta-fsl-ppc/recipes-kernel/linux/files/0002-ALSA-CVE-2014-4656.patch diff --git a/meta-fsl-ppc/recipes-kernel/linux/files/0001-ALSA-CVE-2014-4656.patch b/meta-fsl-ppc/recipes-kernel/linux/files/0001-ALSA-CVE-2014-4656.patch new file mode 100644 index 00000000..98590252 --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/linux/files/0001-ALSA-CVE-2014-4656.patch @@ -0,0 +1,43 @@ +From 7ee7663da07717a1b31ce60d2ebf12d2058ee975 Mon Sep 17 00:00:00 2001 +From: Lars-Peter Clausen +Date: Wed, 18 Jun 2014 13:32:35 +0200 +Subject: [PATCH] ALSA: control: Make sure that id->index does not overflow + +commit 883a1d49f0d77d30012f114b2e19fc141beb3e8e upstream. + +The ALSA control code expects that the range of assigned indices to a control is +continuous and does not overflow. Currently there are no checks to enforce this. +If a control with a overflowing index range is created that control becomes +effectively inaccessible and unremovable since snd_ctl_find_id() will not be +able to find it. This patch adds a check that makes sure that controls with a +overflowing index range can not be created. + +Fixes CVE-2014-4656 +Upstream-Status: Backport + +Signed-off-by: Lars-Peter Clausen +Acked-by: Jaroslav Kysela +Signed-off-by: Takashi Iwai +Signed-off-by: Jiri Slaby +Signed-off-by: Sona Sarmadi +--- + sound/core/control.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/sound/core/control.c b/sound/core/control.c +index 93215b4..98a29b2 100644 +--- a/sound/core/control.c ++++ b/sound/core/control.c +@@ -343,6 +343,9 @@ int snd_ctl_add(struct snd_card *card, struct snd_kcontrol *kcontrol) + if (snd_BUG_ON(!card || !kcontrol->info)) + goto error; + id = kcontrol->id; ++ if (id.index > UINT_MAX - kcontrol->count) ++ goto error; ++ + down_write(&card->controls_rwsem); + if (snd_ctl_find_id(card, &id)) { + up_write(&card->controls_rwsem); +-- +1.9.1 + diff --git a/meta-fsl-ppc/recipes-kernel/linux/files/0002-ALSA-CVE-2014-4656.patch b/meta-fsl-ppc/recipes-kernel/linux/files/0002-ALSA-CVE-2014-4656.patch new file mode 100644 index 00000000..2065780f --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/linux/files/0002-ALSA-CVE-2014-4656.patch @@ -0,0 +1,46 @@ +From 669982364299f6f22bea4324f0f7ee8f8a361b87 Mon Sep 17 00:00:00 2001 +From: Lars-Peter Clausen +Date: Wed, 18 Jun 2014 13:32:34 +0200 +Subject: [PATCH] ALSA: control: Handle numid overflow + +commit ac902c112d90a89e59916f751c2745f4dbdbb4bd upstream. + +Each control gets automatically assigned its numids when the control is created. +The allocation is done by incrementing the numid by the amount of allocated +numids per allocation. This means that excessive creation and destruction of +controls (e.g. via SNDRV_CTL_IOCTL_ELEM_ADD/REMOVE) can cause the id to +eventually overflow. Currently when this happens for the control that caused the +overflow kctl->id.numid + kctl->count will also over flow causing it to be +smaller than kctl->id.numid. Most of the code assumes that this is something +that can not happen, so we need to make sure that it won't happen + +Fixes CVE-2014-4656 +Upstream-Status: Backport + +Signed-off-by: Lars-Peter Clausen +Acked-by: Jaroslav Kysela +Signed-off-by: Takashi Iwai +Signed-off-by: Jiri Slaby +Signed-off-by: Sona Sarmadi +--- + sound/core/control.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/sound/core/control.c b/sound/core/control.c +index d4a597f..93215b4 100644 +--- a/sound/core/control.c ++++ b/sound/core/control.c +@@ -289,6 +289,10 @@ static bool snd_ctl_remove_numid_conflict(struct snd_card *card, + { + struct snd_kcontrol *kctl; + ++ /* Make sure that the ids assigned to the control do not wrap around */ ++ if (card->last_numid >= UINT_MAX - count) ++ card->last_numid = 0; ++ + list_for_each_entry(kctl, &card->controls, list) { + if (kctl->id.numid < card->last_numid + 1 + count && + kctl->id.numid + kctl->count > card->last_numid + 1) { +-- +1.9.1 + diff --git a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq_3.12.bb b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq_3.12.bb index 5c67dc3a..de110465 100644 --- a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq_3.12.bb +++ b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq_3.12.bb @@ -27,6 +27,8 @@ SRC_URI = "git://git.freescale.com/ppc/sdk/linux.git;nobranch=1 \ file://0002-ALSA-CVE-2014-4653.patch \ file://sctp-CVE-2014-4667.patch \ file://sctp-CVE-2014-7841.patch \ + file://0001-ALSA-CVE-2014-4656.patch \ + file://0002-ALSA-CVE-2014-4656.patch \ " SRCREV = "6619b8b55796cdf0cec04b66a71288edd3057229" -- cgit v1.2.3-54-g00ecf From 0924bb79343a6846efa3acc8d14c2139b5abcec2 Mon Sep 17 00:00:00 2001 From: Sona Sarmadi Date: Mon, 9 Feb 2015 07:54:02 +0100 Subject: target: CVE-2014-4027 Explicitly clear ramdisk_mcp backend pages References: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-4027 http://permalink.gmane.org/gmane.linux.scsi.target.devel/6618 Signed-off-by: Sona Sarmadi --- .../linux/files/target-CVE-2014-4027.patch | 46 ++++++++++++++++++++++ .../recipes-kernel/linux/linux-qoriq_3.12.bb | 1 + 2 files changed, 47 insertions(+) create mode 100644 meta-fsl-ppc/recipes-kernel/linux/files/target-CVE-2014-4027.patch diff --git a/meta-fsl-ppc/recipes-kernel/linux/files/target-CVE-2014-4027.patch b/meta-fsl-ppc/recipes-kernel/linux/files/target-CVE-2014-4027.patch new file mode 100644 index 00000000..0f8b49c1 --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/linux/files/target-CVE-2014-4027.patch @@ -0,0 +1,46 @@ +From 186f32e2096c7d9cd9106b8dedd79c596f4c8398 Mon Sep 17 00:00:00 2001 +From: "Nicholas A. Bellinger" +Date: Mon, 16 Jun 2014 20:59:52 +0000 +Subject: [PATCH] target: Explicitly clear ramdisk_mcp backend pages + +[Note that a different patch to address the same issue went in during +v3.15-rc1 (commit 4442dc8a), but includes a bunch of other changes that +don't strictly apply to fixing the bug] + +This patch changes rd_allocate_sgl_table() to explicitly clear +ramdisk_mcp backend memory pages by passing __GFP_ZERO into +alloc_pages(). + +This addresses a potential security issue where reading from a +ramdisk_mcp could return sensitive information, and follows what +>= v3.15 does to explicitly clear ramdisk_mcp memory at backend +device initialization time. + +This fixes CVE-2014-4027 +Upstream-Status: Backport + +Reported-by: Jorge Daniel Sequeira Matias +Cc: Jorge Daniel Sequeira Matias +Signed-off-by: Nicholas Bellinger +Signed-off-by: Jiri Slaby +Signed-off-by: Sona Sarmadi +--- + drivers/target/target_core_rd.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/target/target_core_rd.c b/drivers/target/target_core_rd.c +index 131327a..9f6bede 100644 +--- a/drivers/target/target_core_rd.c ++++ b/drivers/target/target_core_rd.c +@@ -179,7 +179,7 @@ static int rd_build_device_space(struct rd_dev *rd_dev) + - 1; + + for (j = 0; j < sg_per_table; j++) { +- pg = alloc_pages(GFP_KERNEL, 0); ++ pg = alloc_pages(GFP_KERNEL | __GFP_ZERO, 0); + if (!pg) { + pr_err("Unable to allocate scatterlist" + " pages for struct rd_dev_sg_table\n"); +-- +1.9.1 + diff --git a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq_3.12.bb b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq_3.12.bb index de110465..a65c458d 100644 --- a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq_3.12.bb +++ b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq_3.12.bb @@ -29,6 +29,7 @@ SRC_URI = "git://git.freescale.com/ppc/sdk/linux.git;nobranch=1 \ file://sctp-CVE-2014-7841.patch \ file://0001-ALSA-CVE-2014-4656.patch \ file://0002-ALSA-CVE-2014-4656.patch \ + file://target-CVE-2014-4027.patch \ " SRCREV = "6619b8b55796cdf0cec04b66a71288edd3057229" -- cgit v1.2.3-54-g00ecf From 68ab723ab6bb3e6055efad8c5682b21e86f1a1b9 Mon Sep 17 00:00:00 2001 From: Sona Sarmadi Date: Fri, 13 Feb 2015 10:38:23 +0100 Subject: mm: CVE-2014-3122 try_to_unmap_cluster() should lock_page() before mlocking Reference: http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-3122 Signed-off-by: Sona Sarmadi --- .../recipes-kernel/linux/files/mm-2014-3122.patch | 98 ++++++++++++++++++++++ .../recipes-kernel/linux/linux-qoriq_3.12.bb | 1 + 2 files changed, 99 insertions(+) create mode 100644 meta-fsl-ppc/recipes-kernel/linux/files/mm-2014-3122.patch diff --git a/meta-fsl-ppc/recipes-kernel/linux/files/mm-2014-3122.patch b/meta-fsl-ppc/recipes-kernel/linux/files/mm-2014-3122.patch new file mode 100644 index 00000000..590af0a6 --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/linux/files/mm-2014-3122.patch @@ -0,0 +1,98 @@ +From 77552735ba84a410447af7e3375625eb4cfd577b Mon Sep 17 00:00:00 2001 +From: Vlastimil Babka +Date: Mon, 7 Apr 2014 15:37:50 -0700 +Subject: [PATCH] mm: try_to_unmap_cluster() should lock_page() before mlocking + +commit 57e68e9cd65b4b8eb4045a1e0d0746458502554c upstream. + +A BUG_ON(!PageLocked) was triggered in mlock_vma_page() by Sasha Levin +fuzzing with trinity. The call site try_to_unmap_cluster() does not lock +the pages other than its check_page parameter (which is already locked). + +The BUG_ON in mlock_vma_page() is not documented and its purpose is +somewhat unclear, but apparently it serializes against page migration, +which could otherwise fail to transfer the PG_mlocked flag. This would +not be fatal, as the page would be eventually encountered again, but +NR_MLOCK accounting would become distorted nevertheless. This patch adds +a comment to the BUG_ON in mlock_vma_page() and munlock_vma_page() to that +effect. + +The call site try_to_unmap_cluster() is fixed so that for page != +check_page, trylock_page() is attempted (to avoid possible deadlocks as we +already have check_page locked) and mlock_vma_page() is performed only +upon success. If the page lock cannot be obtained, the page is left +without PG_mlocked, which is again not a problem in the whole unevictable +memory design. + +Fixes CVE-2014-3122 +Upstream-Status: Backport + +Signed-off-by: Vlastimil Babka +Signed-off-by: Bob Liu +Reported-by: Sasha Levin +Cc: Wanpeng Li +Cc: Michel Lespinasse +Cc: KOSAKI Motohiro +Acked-by: Rik van Riel +Cc: David Rientjes +Cc: Mel Gorman +Cc: Hugh Dickins +Cc: Joonsoo Kim +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman +Signed-off-by: Sona Sarmadi +--- + mm/mlock.c | 2 ++ + mm/rmap.c | 14 ++++++++++++-- + 2 files changed, 14 insertions(+), 2 deletions(-) + +diff --git a/mm/mlock.c b/mm/mlock.c +index 79b7cf7..713e462 100644 +--- a/mm/mlock.c ++++ b/mm/mlock.c +@@ -76,6 +76,7 @@ void clear_page_mlock(struct page *page) + */ + void mlock_vma_page(struct page *page) + { ++ /* Serialize with page migration */ + BUG_ON(!PageLocked(page)); + + if (!TestSetPageMlocked(page)) { +@@ -106,6 +107,7 @@ unsigned int munlock_vma_page(struct page *page) + { + unsigned int page_mask = 0; + ++ /* For try_to_munlock() and to serialize with page migration */ + BUG_ON(!PageLocked(page)); + + if (TestClearPageMlocked(page)) { +diff --git a/mm/rmap.c b/mm/rmap.c +index 3f60774..fbf0040 100644 +--- a/mm/rmap.c ++++ b/mm/rmap.c +@@ -1390,9 +1390,19 @@ static int try_to_unmap_cluster(unsigned long cursor, unsigned int *mapcount, + BUG_ON(!page || PageAnon(page)); + + if (locked_vma) { +- mlock_vma_page(page); /* no-op if already mlocked */ +- if (page == check_page) ++ if (page == check_page) { ++ /* we know we have check_page locked */ ++ mlock_vma_page(page); + ret = SWAP_MLOCK; ++ } else if (trylock_page(page)) { ++ /* ++ * If we can lock the page, perform mlock. ++ * Otherwise leave the page alone, it will be ++ * eventually encountered again later. ++ */ ++ mlock_vma_page(page); ++ unlock_page(page); ++ } + continue; /* don't unmap */ + } + +-- +1.9.1 + diff --git a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq_3.12.bb b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq_3.12.bb index a65c458d..7bf8b223 100644 --- a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq_3.12.bb +++ b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq_3.12.bb @@ -30,6 +30,7 @@ SRC_URI = "git://git.freescale.com/ppc/sdk/linux.git;nobranch=1 \ file://0001-ALSA-CVE-2014-4656.patch \ file://0002-ALSA-CVE-2014-4656.patch \ file://target-CVE-2014-4027.patch \ + file://mm-2014-3122.patch \ " SRCREV = "6619b8b55796cdf0cec04b66a71288edd3057229" -- cgit v1.2.3-54-g00ecf From 4562c57b1fab96a16c8eb20c4ceb39e590be67cd Mon Sep 17 00:00:00 2001 From: Sona Sarmadi Date: Tue, 17 Feb 2015 12:38:44 +0100 Subject: mm/shmem: CVE-2014-4171 Fixes a denial of service flaw in the Linux kernel built with the shared memory suppor Reference: http://www.openwall.com/lists/oss-security/2014/06/18/11 http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-4171 Signed-off-by: Sona Sarmadi --- .../linux/files/0001-shmem-CVE-2014-4171.patch | 141 +++++++++++++++ .../linux/files/0002-shmem-CVE-2014-4171.patch | 200 +++++++++++++++++++++ .../linux/files/0003-shmem-CVE-2014-4171.patch | 134 ++++++++++++++ .../recipes-kernel/linux/linux-qoriq_3.12.bb | 3 + 4 files changed, 478 insertions(+) create mode 100644 meta-fsl-ppc/recipes-kernel/linux/files/0001-shmem-CVE-2014-4171.patch create mode 100644 meta-fsl-ppc/recipes-kernel/linux/files/0002-shmem-CVE-2014-4171.patch create mode 100644 meta-fsl-ppc/recipes-kernel/linux/files/0003-shmem-CVE-2014-4171.patch diff --git a/meta-fsl-ppc/recipes-kernel/linux/files/0001-shmem-CVE-2014-4171.patch b/meta-fsl-ppc/recipes-kernel/linux/files/0001-shmem-CVE-2014-4171.patch new file mode 100644 index 00000000..00ead602 --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/linux/files/0001-shmem-CVE-2014-4171.patch @@ -0,0 +1,141 @@ +From 8685789bd8ec12a02b07ea76df4527b055efbf20 Mon Sep 17 00:00:00 2001 +From: Hugh Dickins +Date: Mon, 23 Jun 2014 13:22:06 -0700 +Subject: [PATCH 1/3] shmem: fix faulting into a hole while it's punched + +commit f00cdc6df7d7cfcabb5b740911e6788cb0802bdb upstream. + +Trinity finds that mmap access to a hole while it's punched from shmem +can prevent the madvise(MADV_REMOVE) or fallocate(FALLOC_FL_PUNCH_HOLE) +from completing, until the reader chooses to stop; with the puncher's +hold on i_mutex locking out all other writers until it can complete. + +It appears that the tmpfs fault path is too light in comparison with its +hole-punching path, lacking an i_data_sem to obstruct it; but we don't +want to slow down the common case. + +Extend shmem_fallocate()'s existing range notification mechanism, so +shmem_fault() can refrain from faulting pages into the hole while it's +punched, waiting instead on i_mutex (when safe to sleep; or repeatedly +faulting when not). + +Upstream-Status: Backport + +[akpm@linux-foundation.org: coding-style fixes] +Signed-off-by: Hugh Dickins +Reported-by: Sasha Levin +Tested-by: Sasha Levin +Cc: Dave Jones +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds + +Signed-off-by: Jiri Slaby +Signed-off-by: Sona Sarmadi +--- + mm/shmem.c | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++---- + 1 file changed, 52 insertions(+), 4 deletions(-) + +diff --git a/mm/shmem.c b/mm/shmem.c +index 8297623..00d412f 100644 +--- a/mm/shmem.c ++++ b/mm/shmem.c +@@ -80,11 +80,12 @@ static struct vfsmount *shm_mnt; + #define SHORT_SYMLINK_LEN 128 + + /* +- * shmem_fallocate and shmem_writepage communicate via inode->i_private +- * (with i_mutex making sure that it has only one user at a time): +- * we would prefer not to enlarge the shmem inode just for that. ++ * shmem_fallocate communicates with shmem_fault or shmem_writepage via ++ * inode->i_private (with i_mutex making sure that it has only one user at ++ * a time): we would prefer not to enlarge the shmem inode just for that. + */ + struct shmem_falloc { ++ int mode; /* FALLOC_FL mode currently operating */ + pgoff_t start; /* start of range currently being fallocated */ + pgoff_t next; /* the next page offset to be fallocated */ + pgoff_t nr_falloced; /* how many new pages have been fallocated */ +@@ -826,6 +827,7 @@ static int shmem_writepage(struct page *page, struct writeback_control *wbc) + spin_lock(&inode->i_lock); + shmem_falloc = inode->i_private; + if (shmem_falloc && ++ !shmem_falloc->mode && + index >= shmem_falloc->start && + index < shmem_falloc->next) + shmem_falloc->nr_unswapped++; +@@ -1300,6 +1302,44 @@ static int shmem_fault(struct vm_area_struct *vma, struct vm_fault *vmf) + int error; + int ret = VM_FAULT_LOCKED; + ++ /* ++ * Trinity finds that probing a hole which tmpfs is punching can ++ * prevent the hole-punch from ever completing: which in turn ++ * locks writers out with its hold on i_mutex. So refrain from ++ * faulting pages into the hole while it's being punched, and ++ * wait on i_mutex to be released if vmf->flags permits. ++ */ ++ if (unlikely(inode->i_private)) { ++ struct shmem_falloc *shmem_falloc; ++ ++ spin_lock(&inode->i_lock); ++ shmem_falloc = inode->i_private; ++ if (!shmem_falloc || ++ shmem_falloc->mode != FALLOC_FL_PUNCH_HOLE || ++ vmf->pgoff < shmem_falloc->start || ++ vmf->pgoff >= shmem_falloc->next) ++ shmem_falloc = NULL; ++ spin_unlock(&inode->i_lock); ++ /* ++ * i_lock has protected us from taking shmem_falloc seriously ++ * once return from shmem_fallocate() went back up that stack. ++ * i_lock does not serialize with i_mutex at all, but it does ++ * not matter if sometimes we wait unnecessarily, or sometimes ++ * miss out on waiting: we just need to make those cases rare. ++ */ ++ if (shmem_falloc) { ++ if ((vmf->flags & FAULT_FLAG_ALLOW_RETRY) && ++ !(vmf->flags & FAULT_FLAG_RETRY_NOWAIT)) { ++ up_read(&vma->vm_mm->mmap_sem); ++ mutex_lock(&inode->i_mutex); ++ mutex_unlock(&inode->i_mutex); ++ return VM_FAULT_RETRY; ++ } ++ /* cond_resched? Leave that to GUP or return to user */ ++ return VM_FAULT_NOPAGE; ++ } ++ } ++ + error = shmem_getpage(inode, vmf->pgoff, &vmf->page, SGP_CACHE, &ret); + if (error) + return ((error == -ENOMEM) ? VM_FAULT_OOM : VM_FAULT_SIGBUS); +@@ -1815,18 +1855,26 @@ static long shmem_fallocate(struct file *file, int mode, loff_t offset, + + mutex_lock(&inode->i_mutex); + ++ shmem_falloc.mode = mode & ~FALLOC_FL_KEEP_SIZE; ++ + if (mode & FALLOC_FL_PUNCH_HOLE) { + struct address_space *mapping = file->f_mapping; + loff_t unmap_start = round_up(offset, PAGE_SIZE); + loff_t unmap_end = round_down(offset + len, PAGE_SIZE) - 1; + ++ shmem_falloc.start = unmap_start >> PAGE_SHIFT; ++ shmem_falloc.next = (unmap_end + 1) >> PAGE_SHIFT; ++ spin_lock(&inode->i_lock); ++ inode->i_private = &shmem_falloc; ++ spin_unlock(&inode->i_lock); ++ + if ((u64)unmap_end > (u64)unmap_start) + unmap_mapping_range(mapping, unmap_start, + 1 + unmap_end - unmap_start, 0); + shmem_truncate_range(inode, offset, offset + len - 1); + /* No need to unmap again: hole-punching leaves COWed pages */ + error = 0; +- goto out; ++ goto undone; + } + + /* We need to check rlimit even when FALLOC_FL_KEEP_SIZE */ +-- +1.9.1 + diff --git a/meta-fsl-ppc/recipes-kernel/linux/files/0002-shmem-CVE-2014-4171.patch b/meta-fsl-ppc/recipes-kernel/linux/files/0002-shmem-CVE-2014-4171.patch new file mode 100644 index 00000000..a43b8956 --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/linux/files/0002-shmem-CVE-2014-4171.patch @@ -0,0 +1,200 @@ +From 38d05809df1ea5272a658e7f4d5f2a3027ad2fd2 Mon Sep 17 00:00:00 2001 +From: Hugh Dickins +Date: Wed, 23 Jul 2014 14:00:10 -0700 +Subject: [PATCH 2/3] shmem: fix faulting into a hole, not taking i_mutex + +commit 8e205f779d1443a94b5ae81aa359cb535dd3021e upstream. + +Commit f00cdc6df7d7 ("shmem: fix faulting into a hole while it's +punched") was buggy: Sasha sent a lockdep report to remind us that +grabbing i_mutex in the fault path is a no-no (write syscall may already +hold i_mutex while faulting user buffer). + +We tried a completely different approach (see following patch) but that +proved inadequate: good enough for a rational workload, but not good +enough against trinity - which forks off so many mappings of the object +that contention on i_mmap_mutex while hole-puncher holds i_mutex builds +into serious starvation when concurrent faults force the puncher to fall +back to single-page unmap_mapping_range() searches of the i_mmap tree. + +So return to the original umbrella approach, but keep away from i_mutex +this time. We really don't want to bloat every shmem inode with a new +mutex or completion, just to protect this unlikely case from trinity. +So extend the original with wait_queue_head on stack at the hole-punch +end, and wait_queue item on the stack at the fault end. + +This involves further use of i_lock to guard against the races: lockdep +has been happy so far, and I see fs/inode.c:unlock_new_inode() holds +i_lock around wake_up_bit(), which is comparable to what we do here. +i_lock is more convenient, but we could switch to shmem's info->lock. + +This issue has been tagged with CVE-2014-4171, which will require commit +f00cdc6df7d7 and this and the following patch to be backported: we +suggest to 3.1+, though in fact the trinity forkbomb effect might go +back as far as 2.6.16, when madvise(,,MADV_REMOVE) came in - or might +not, since much has changed, with i_mmap_mutex a spinlock before 3.0. +Anyone running trinity on 3.0 and earlier? I don't think we need care. + +Upstream-Status: Backport + +Signed-off-by: Hugh Dickins +Reported-by: Sasha Levin +Tested-by: Sasha Levin +Cc: Vlastimil Babka +Cc: Konstantin Khlebnikov +Cc: Johannes Weiner +Cc: Lukas Czerner +Cc: Dave Jones +Cc: [3.1+] +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +Signed-off-by: Jiri Slaby +Signed-off-by: Sona Sarmadi +--- + mm/shmem.c | 78 +++++++++++++++++++++++++++++++++++++++++--------------------- + 1 file changed, 52 insertions(+), 26 deletions(-) + +diff --git a/mm/shmem.c b/mm/shmem.c +index 00d412f..6f5626f 100644 +--- a/mm/shmem.c ++++ b/mm/shmem.c +@@ -85,7 +85,7 @@ static struct vfsmount *shm_mnt; + * a time): we would prefer not to enlarge the shmem inode just for that. + */ + struct shmem_falloc { +- int mode; /* FALLOC_FL mode currently operating */ ++ wait_queue_head_t *waitq; /* faults into hole wait for punch to end */ + pgoff_t start; /* start of range currently being fallocated */ + pgoff_t next; /* the next page offset to be fallocated */ + pgoff_t nr_falloced; /* how many new pages have been fallocated */ +@@ -827,7 +827,7 @@ static int shmem_writepage(struct page *page, struct writeback_control *wbc) + spin_lock(&inode->i_lock); + shmem_falloc = inode->i_private; + if (shmem_falloc && +- !shmem_falloc->mode && ++ !shmem_falloc->waitq && + index >= shmem_falloc->start && + index < shmem_falloc->next) + shmem_falloc->nr_unswapped++; +@@ -1306,38 +1306,58 @@ static int shmem_fault(struct vm_area_struct *vma, struct vm_fault *vmf) + * Trinity finds that probing a hole which tmpfs is punching can + * prevent the hole-punch from ever completing: which in turn + * locks writers out with its hold on i_mutex. So refrain from +- * faulting pages into the hole while it's being punched, and +- * wait on i_mutex to be released if vmf->flags permits. ++ * faulting pages into the hole while it's being punched. Although ++ * shmem_undo_range() does remove the additions, it may be unable to ++ * keep up, as each new page needs its own unmap_mapping_range() call, ++ * and the i_mmap tree grows ever slower to scan if new vmas are added. ++ * ++ * It does not matter if we sometimes reach this check just before the ++ * hole-punch begins, so that one fault then races with the punch: ++ * we just need to make racing faults a rare case. ++ * ++ * The implementation below would be much simpler if we just used a ++ * standard mutex or completion: but we cannot take i_mutex in fault, ++ * and bloating every shmem inode for this unlikely case would be sad. + */ + if (unlikely(inode->i_private)) { + struct shmem_falloc *shmem_falloc; + + spin_lock(&inode->i_lock); + shmem_falloc = inode->i_private; +- if (!shmem_falloc || +- shmem_falloc->mode != FALLOC_FL_PUNCH_HOLE || +- vmf->pgoff < shmem_falloc->start || +- vmf->pgoff >= shmem_falloc->next) +- shmem_falloc = NULL; +- spin_unlock(&inode->i_lock); +- /* +- * i_lock has protected us from taking shmem_falloc seriously +- * once return from shmem_fallocate() went back up that stack. +- * i_lock does not serialize with i_mutex at all, but it does +- * not matter if sometimes we wait unnecessarily, or sometimes +- * miss out on waiting: we just need to make those cases rare. +- */ +- if (shmem_falloc) { ++ if (shmem_falloc && ++ shmem_falloc->waitq && ++ vmf->pgoff >= shmem_falloc->start && ++ vmf->pgoff < shmem_falloc->next) { ++ wait_queue_head_t *shmem_falloc_waitq; ++ DEFINE_WAIT(shmem_fault_wait); ++ ++ ret = VM_FAULT_NOPAGE; + if ((vmf->flags & FAULT_FLAG_ALLOW_RETRY) && + !(vmf->flags & FAULT_FLAG_RETRY_NOWAIT)) { ++ /* It's polite to up mmap_sem if we can */ + up_read(&vma->vm_mm->mmap_sem); +- mutex_lock(&inode->i_mutex); +- mutex_unlock(&inode->i_mutex); +- return VM_FAULT_RETRY; ++ ret = VM_FAULT_RETRY; + } +- /* cond_resched? Leave that to GUP or return to user */ +- return VM_FAULT_NOPAGE; ++ ++ shmem_falloc_waitq = shmem_falloc->waitq; ++ prepare_to_wait(shmem_falloc_waitq, &shmem_fault_wait, ++ TASK_UNINTERRUPTIBLE); ++ spin_unlock(&inode->i_lock); ++ schedule(); ++ ++ /* ++ * shmem_falloc_waitq points into the shmem_fallocate() ++ * stack of the hole-punching task: shmem_falloc_waitq ++ * is usually invalid by the time we reach here, but ++ * finish_wait() does not dereference it in that case; ++ * though i_lock needed lest racing with wake_up_all(). ++ */ ++ spin_lock(&inode->i_lock); ++ finish_wait(shmem_falloc_waitq, &shmem_fault_wait); ++ spin_unlock(&inode->i_lock); ++ return ret; + } ++ spin_unlock(&inode->i_lock); + } + + error = shmem_getpage(inode, vmf->pgoff, &vmf->page, SGP_CACHE, &ret); +@@ -1855,13 +1875,13 @@ static long shmem_fallocate(struct file *file, int mode, loff_t offset, + + mutex_lock(&inode->i_mutex); + +- shmem_falloc.mode = mode & ~FALLOC_FL_KEEP_SIZE; +- + if (mode & FALLOC_FL_PUNCH_HOLE) { + struct address_space *mapping = file->f_mapping; + loff_t unmap_start = round_up(offset, PAGE_SIZE); + loff_t unmap_end = round_down(offset + len, PAGE_SIZE) - 1; ++ DECLARE_WAIT_QUEUE_HEAD_ONSTACK(shmem_falloc_waitq); + ++ shmem_falloc.waitq = &shmem_falloc_waitq; + shmem_falloc.start = unmap_start >> PAGE_SHIFT; + shmem_falloc.next = (unmap_end + 1) >> PAGE_SHIFT; + spin_lock(&inode->i_lock); +@@ -1873,8 +1893,13 @@ static long shmem_fallocate(struct file *file, int mode, loff_t offset, + 1 + unmap_end - unmap_start, 0); + shmem_truncate_range(inode, offset, offset + len - 1); + /* No need to unmap again: hole-punching leaves COWed pages */ ++ ++ spin_lock(&inode->i_lock); ++ inode->i_private = NULL; ++ wake_up_all(&shmem_falloc_waitq); ++ spin_unlock(&inode->i_lock); + error = 0; +- goto undone; ++ goto out; + } + + /* We need to check rlimit even when FALLOC_FL_KEEP_SIZE */ +@@ -1890,6 +1915,7 @@ static long shmem_fallocate(struct file *file, int mode, loff_t offset, + goto out; + } + ++ shmem_falloc.waitq = NULL; + shmem_falloc.start = start; + shmem_falloc.next = start; + shmem_falloc.nr_falloced = 0; +-- +1.9.1 + diff --git a/meta-fsl-ppc/recipes-kernel/linux/files/0003-shmem-CVE-2014-4171.patch b/meta-fsl-ppc/recipes-kernel/linux/files/0003-shmem-CVE-2014-4171.patch new file mode 100644 index 00000000..2b70ec1d --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/linux/files/0003-shmem-CVE-2014-4171.patch @@ -0,0 +1,134 @@ +From a428dc008e435c5a36b1288fb5b8c4b58472e28c Mon Sep 17 00:00:00 2001 +From: Hugh Dickins +Date: Wed, 23 Jul 2014 14:00:13 -0700 +Subject: [PATCH 3/3] shmem: fix splicing from a hole while it's punched + +commit b1a366500bd537b50c3aad26dc7df083ec03a448 upstream. + +shmem_fault() is the actual culprit in trinity's hole-punch starvation, +and the most significant cause of such problems: since a page faulted is +one that then appears page_mapped(), needing unmap_mapping_range() and +i_mmap_mutex to be unmapped again. + +But it is not the only way in which a page can be brought into a hole in +the radix_tree while that hole is being punched; and Vlastimil's testing +implies that if enough other processors are busy filling in the hole, +then shmem_undo_range() can be kept from completing indefinitely. + +shmem_file_splice_read() is the main other user of SGP_CACHE, which can +instantiate shmem pagecache pages in the read-only case (without holding +i_mutex, so perhaps concurrently with a hole-punch). Probably it's +silly not to use SGP_READ already (using the ZERO_PAGE for holes): which +ought to be safe, but might bring surprises - not a change to be rushed. + +shmem_read_mapping_page_gfp() is an internal interface used by +drivers/gpu/drm GEM (and next by uprobes): it should be okay. And +shmem_file_read_iter() uses the SGP_DIRTY variant of SGP_CACHE, when +called internally by the kernel (perhaps for a stacking filesystem, +which might rely on holes to be reserved): it's unclear whether it could +be provoked to keep hole-punch busy or not. + +We could apply the same umbrella as now used in shmem_fault() to +shmem_file_splice_read() and the others; but it looks ugly, and use over +a range raises questions - should it actually be per page? can these get +starved themselves? + +The origin of this part of the problem is my v3.1 commit d0823576bf4b +("mm: pincer in truncate_inode_pages_range"), once it was duplicated +into shmem.c. It seemed like a nice idea at the time, to ensure +(barring RCU lookup fuzziness) that there's an instant when the entire +hole is empty; but the indefinitely repeated scans to ensure that make +it vulnerable. + +Revert that "enhancement" to hole-punch from shmem_undo_range(), but +retain the unproblematic rescanning when it's truncating; add a couple +of comments there. + +Remove the "indices[0] >= end" test: that is now handled satisfactorily +by the inner loop, and mem_cgroup_uncharge_start()/end() are too light +to be worth avoiding here. + +But if we do not always loop indefinitely, we do need to handle the case +of swap swizzled back to page before shmem_free_swap() gets it: add a +retry for that case, as suggested by Konstantin Khlebnikov; and for the +case of page swizzled back to swap, as suggested by Johannes Weiner. + +Upstream-Status: Backport + +Signed-off-by: Hugh Dickins +Reported-by: Sasha Levin +Suggested-by: Vlastimil Babka +Cc: Konstantin Khlebnikov +Cc: Johannes Weiner +Cc: Lukas Czerner +Cc: Dave Jones +Cc: [3.1+] +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +Signed-off-by: Jiri Slaby +Signed-off-by: Sona Sarmadi +--- + mm/shmem.c | 24 +++++++++++++++--------- + 1 file changed, 15 insertions(+), 9 deletions(-) + +diff --git a/mm/shmem.c b/mm/shmem.c +index 6f5626f..0da81aa 100644 +--- a/mm/shmem.c ++++ b/mm/shmem.c +@@ -534,22 +534,19 @@ static void shmem_undo_range(struct inode *inode, loff_t lstart, loff_t lend, + return; + + index = start; +- for ( ; ; ) { ++ while (index < end) { + cond_resched(); + pvec.nr = shmem_find_get_pages_and_swap(mapping, index, + min(end - index, (pgoff_t)PAGEVEC_SIZE), + pvec.pages, indices); + if (!pvec.nr) { +- if (index == start || unfalloc) ++ /* If all gone or hole-punch or unfalloc, we're done */ ++ if (index == start || end != -1) + break; ++ /* But if truncating, restart to make sure all gone */ + index = start; + continue; + } +- if ((index == start || unfalloc) && indices[0] >= end) { +- shmem_deswap_pagevec(&pvec); +- pagevec_release(&pvec); +- break; +- } + mem_cgroup_uncharge_start(); + for (i = 0; i < pagevec_count(&pvec); i++) { + struct page *page = pvec.pages[i]; +@@ -561,8 +558,12 @@ static void shmem_undo_range(struct inode *inode, loff_t lstart, loff_t lend, + if (radix_tree_exceptional_entry(page)) { + if (unfalloc) + continue; +- nr_swaps_freed += !shmem_free_swap(mapping, +- index, page); ++ if (shmem_free_swap(mapping, index, page)) { ++ /* Swap was replaced by page: retry */ ++ index--; ++ break; ++ } ++ nr_swaps_freed++; + continue; + } + +@@ -571,6 +572,11 @@ static void shmem_undo_range(struct inode *inode, loff_t lstart, loff_t lend, + if (page->mapping == mapping) { + VM_BUG_ON(PageWriteback(page)); + truncate_inode_page(mapping, page); ++ } else { ++ /* Page was replaced by swap: retry */ ++ unlock_page(page); ++ index--; ++ break; + } + } + unlock_page(page); +-- +1.9.1 + diff --git a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq_3.12.bb b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq_3.12.bb index 7bf8b223..9727a734 100644 --- a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq_3.12.bb +++ b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq_3.12.bb @@ -31,6 +31,9 @@ SRC_URI = "git://git.freescale.com/ppc/sdk/linux.git;nobranch=1 \ file://0002-ALSA-CVE-2014-4656.patch \ file://target-CVE-2014-4027.patch \ file://mm-2014-3122.patch \ + file://0001-shmem-CVE-2014-4171.patch \ + file://0002-shmem-CVE-2014-4171.patch \ + file://0003-shmem-CVE-2014-4171.patch \ " SRCREV = "6619b8b55796cdf0cec04b66a71288edd3057229" -- cgit v1.2.3-54-g00ecf From c5d969db855c3d238cd68d978cf83c1846116080 Mon Sep 17 00:00:00 2001 From: Sona Sarmadi Date: Tue, 17 Feb 2015 12:38:45 +0100 Subject: fs-userns: CVE-2014-4014 Fixes a potential privilege escalation flaw when the Linux kernel is built with the user namespaces(CONFIG_USER_NS) References: http://www.openwall.com/lists/oss-security/2014/06/10/4 http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-4014 Signed-off-by: Sona Sarmadi --- .../linux/files/fs-CVE-2014-4014.patch | 210 +++++++++++++++++++++ .../recipes-kernel/linux/linux-qoriq_3.12.bb | 1 + 2 files changed, 211 insertions(+) create mode 100644 meta-fsl-ppc/recipes-kernel/linux/files/fs-CVE-2014-4014.patch diff --git a/meta-fsl-ppc/recipes-kernel/linux/files/fs-CVE-2014-4014.patch b/meta-fsl-ppc/recipes-kernel/linux/files/fs-CVE-2014-4014.patch new file mode 100644 index 00000000..a61ae4cb --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/linux/files/fs-CVE-2014-4014.patch @@ -0,0 +1,210 @@ +From 2246a472bce19c0d373fb5488a0e612e3328ce0a Mon Sep 17 00:00:00 2001 +From: Andy Lutomirski +Date: Tue, 10 Jun 2014 12:45:42 -0700 +Subject: [PATCH] fs,userns: Change inode_capable to capable_wrt_inode_uidgid + +commit 23adbe12ef7d3d4195e80800ab36b37bee28cd03 upstream. + +The kernel has no concept of capabilities with respect to inodes; inodes +exist independently of namespaces. For example, inode_capable(inode, +CAP_LINUX_IMMUTABLE) would be nonsense. + +This patch changes inode_capable to check for uid and gid mappings and +renames it to capable_wrt_inode_uidgid, which should make it more +obvious what it does. + +Fixes CVE-2014-4014. +Upstream-Status: Backport + +Cc: Theodore Ts'o +Cc: Serge Hallyn +Cc: "Eric W. Biederman" +Cc: Dave Chinner +Signed-off-by: Andy Lutomirski +Signed-off-by: Linus Torvalds +Signed-off-by: Jiri Slaby +Signed-off-by: Sona Sarmadi +--- + fs/attr.c | 8 ++++---- + fs/inode.c | 10 +++++++--- + fs/namei.c | 11 ++++++----- + fs/xfs/xfs_ioctl.c | 2 +- + include/linux/capability.h | 2 +- + kernel/capability.c | 20 ++++++++------------ + 6 files changed, 27 insertions(+), 26 deletions(-) + +diff --git a/fs/attr.c b/fs/attr.c +index 8dd5825..66fa625 100644 +--- a/fs/attr.c ++++ b/fs/attr.c +@@ -50,14 +50,14 @@ int inode_change_ok(const struct inode *inode, struct iattr *attr) + if ((ia_valid & ATTR_UID) && + (!uid_eq(current_fsuid(), inode->i_uid) || + !uid_eq(attr->ia_uid, inode->i_uid)) && +- !inode_capable(inode, CAP_CHOWN)) ++ !capable_wrt_inode_uidgid(inode, CAP_CHOWN)) + return -EPERM; + + /* Make sure caller can chgrp. */ + if ((ia_valid & ATTR_GID) && + (!uid_eq(current_fsuid(), inode->i_uid) || + (!in_group_p(attr->ia_gid) && !gid_eq(attr->ia_gid, inode->i_gid))) && +- !inode_capable(inode, CAP_CHOWN)) ++ !capable_wrt_inode_uidgid(inode, CAP_CHOWN)) + return -EPERM; + + /* Make sure a caller can chmod. */ +@@ -67,7 +67,7 @@ int inode_change_ok(const struct inode *inode, struct iattr *attr) + /* Also check the setgid bit! */ + if (!in_group_p((ia_valid & ATTR_GID) ? attr->ia_gid : + inode->i_gid) && +- !inode_capable(inode, CAP_FSETID)) ++ !capable_wrt_inode_uidgid(inode, CAP_FSETID)) + attr->ia_mode &= ~S_ISGID; + } + +@@ -160,7 +160,7 @@ void setattr_copy(struct inode *inode, const struct iattr *attr) + umode_t mode = attr->ia_mode; + + if (!in_group_p(inode->i_gid) && +- !inode_capable(inode, CAP_FSETID)) ++ !capable_wrt_inode_uidgid(inode, CAP_FSETID)) + mode &= ~S_ISGID; + inode->i_mode = mode; + } +diff --git a/fs/inode.c b/fs/inode.c +index b33ba8e..1e6e846 100644 +--- a/fs/inode.c ++++ b/fs/inode.c +@@ -1808,14 +1808,18 @@ EXPORT_SYMBOL(inode_init_owner); + * inode_owner_or_capable - check current task permissions to inode + * @inode: inode being checked + * +- * Return true if current either has CAP_FOWNER to the inode, or +- * owns the file. ++ * Return true if current either has CAP_FOWNER in a namespace with the ++ * inode owner uid mapped, or owns the file. + */ + bool inode_owner_or_capable(const struct inode *inode) + { ++ struct user_namespace *ns; ++ + if (uid_eq(current_fsuid(), inode->i_uid)) + return true; +- if (inode_capable(inode, CAP_FOWNER)) ++ ++ ns = current_user_ns(); ++ if (ns_capable(ns, CAP_FOWNER) && kuid_has_mapping(ns, inode->i_uid)) + return true; + return false; + } +diff --git a/fs/namei.c b/fs/namei.c +index 187cacf..338d08b 100644 +--- a/fs/namei.c ++++ b/fs/namei.c +@@ -321,10 +321,11 @@ int generic_permission(struct inode *inode, int mask) + + if (S_ISDIR(inode->i_mode)) { + /* DACs are overridable for directories */ +- if (inode_capable(inode, CAP_DAC_OVERRIDE)) ++ if (capable_wrt_inode_uidgid(inode, CAP_DAC_OVERRIDE)) + return 0; + if (!(mask & MAY_WRITE)) +- if (inode_capable(inode, CAP_DAC_READ_SEARCH)) ++ if (capable_wrt_inode_uidgid(inode, ++ CAP_DAC_READ_SEARCH)) + return 0; + return -EACCES; + } +@@ -334,7 +335,7 @@ int generic_permission(struct inode *inode, int mask) + * at least one exec bit set. + */ + if (!(mask & MAY_EXEC) || (inode->i_mode & S_IXUGO)) +- if (inode_capable(inode, CAP_DAC_OVERRIDE)) ++ if (capable_wrt_inode_uidgid(inode, CAP_DAC_OVERRIDE)) + return 0; + + /* +@@ -342,7 +343,7 @@ int generic_permission(struct inode *inode, int mask) + */ + mask &= MAY_READ | MAY_WRITE | MAY_EXEC; + if (mask == MAY_READ) +- if (inode_capable(inode, CAP_DAC_READ_SEARCH)) ++ if (capable_wrt_inode_uidgid(inode, CAP_DAC_READ_SEARCH)) + return 0; + + return -EACCES; +@@ -2404,7 +2405,7 @@ static inline int check_sticky(struct inode *dir, struct inode *inode) + return 0; + if (uid_eq(dir->i_uid, fsuid)) + return 0; +- return !inode_capable(inode, CAP_FOWNER); ++ return !capable_wrt_inode_uidgid(inode, CAP_FOWNER); + } + + /* +diff --git a/fs/xfs/xfs_ioctl.c b/fs/xfs/xfs_ioctl.c +index 8c8ef24..52b5375 100644 +--- a/fs/xfs/xfs_ioctl.c ++++ b/fs/xfs/xfs_ioctl.c +@@ -1133,7 +1133,7 @@ xfs_ioctl_setattr( + * cleared upon successful return from chown() + */ + if ((ip->i_d.di_mode & (S_ISUID|S_ISGID)) && +- !inode_capable(VFS_I(ip), CAP_FSETID)) ++ !capable_wrt_inode_uidgid(VFS_I(ip), CAP_FSETID)) + ip->i_d.di_mode &= ~(S_ISUID|S_ISGID); + + /* +diff --git a/include/linux/capability.h b/include/linux/capability.h +index a6ee1f9..84b13ad 100644 +--- a/include/linux/capability.h ++++ b/include/linux/capability.h +@@ -210,7 +210,7 @@ extern bool has_ns_capability_noaudit(struct task_struct *t, + struct user_namespace *ns, int cap); + extern bool capable(int cap); + extern bool ns_capable(struct user_namespace *ns, int cap); +-extern bool inode_capable(const struct inode *inode, int cap); ++extern bool capable_wrt_inode_uidgid(const struct inode *inode, int cap); + extern bool file_ns_capable(const struct file *file, struct user_namespace *ns, int cap); + + /* audit system wants to get cap info from files as well */ +diff --git a/kernel/capability.c b/kernel/capability.c +index 4e66bf9..788653b 100644 +--- a/kernel/capability.c ++++ b/kernel/capability.c +@@ -433,23 +433,19 @@ bool capable(int cap) + EXPORT_SYMBOL(capable); + + /** +- * inode_capable - Check superior capability over inode ++ * capable_wrt_inode_uidgid - Check nsown_capable and uid and gid mapped + * @inode: The inode in question + * @cap: The capability in question + * +- * Return true if the current task has the given superior capability +- * targeted at it's own user namespace and that the given inode is owned +- * by the current user namespace or a child namespace. +- * +- * Currently we check to see if an inode is owned by the current +- * user namespace by seeing if the inode's owner maps into the +- * current user namespace. +- * ++ * Return true if the current task has the given capability targeted at ++ * its own user namespace and that the given inode's uid and gid are ++ * mapped into the current user namespace. + */ +-bool inode_capable(const struct inode *inode, int cap) ++bool capable_wrt_inode_uidgid(const struct inode *inode, int cap) + { + struct user_namespace *ns = current_user_ns(); + +- return ns_capable(ns, cap) && kuid_has_mapping(ns, inode->i_uid); ++ return ns_capable(ns, cap) && kuid_has_mapping(ns, inode->i_uid) && ++ kgid_has_mapping(ns, inode->i_gid); + } +-EXPORT_SYMBOL(inode_capable); ++EXPORT_SYMBOL(capable_wrt_inode_uidgid); +-- +1.9.1 + diff --git a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq_3.12.bb b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq_3.12.bb index 9727a734..527daf45 100644 --- a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq_3.12.bb +++ b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq_3.12.bb @@ -34,6 +34,7 @@ SRC_URI = "git://git.freescale.com/ppc/sdk/linux.git;nobranch=1 \ file://0001-shmem-CVE-2014-4171.patch \ file://0002-shmem-CVE-2014-4171.patch \ file://0003-shmem-CVE-2014-4171.patch \ + file://fs-CVE-2014-4014.patch \ " SRCREV = "6619b8b55796cdf0cec04b66a71288edd3057229" -- cgit v1.2.3-54-g00ecf From d8309b272f69eae18c73c1eab3b96e094826b58b Mon Sep 17 00:00:00 2001 From: Sona Sarmadi Date: Mon, 2 Mar 2015 11:43:59 +0100 Subject: kernel: CVE-2014-7825, CVE-2014-7826 Insufficient syscall number validation in perf and ftrace subsystems CVE-2014-7825 Fixes an out-of-bounds memory access flaw, in the syscall tracing functionality of the Linux kernel's perf subsystem. CVE-2014-7826 Fixes an out-of-bounds memory access flaw, in the syscall tracing functionality of the Linux kernel's ftrace subsystem. References: http://www.openwall.com/lists/oss-security/2014/11/06/11 http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-7825 http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-7826 Signed-off-by: Sona Sarmadi --- .../tracing-CVE-2014-7825_CVE-2014-7826.patch | 94 ++++++++++++++++++++++ .../recipes-kernel/linux/linux-qoriq_3.12.bb | 1 + 2 files changed, 95 insertions(+) create mode 100644 meta-fsl-ppc/recipes-kernel/linux/files/tracing-CVE-2014-7825_CVE-2014-7826.patch diff --git a/meta-fsl-ppc/recipes-kernel/linux/files/tracing-CVE-2014-7825_CVE-2014-7826.patch b/meta-fsl-ppc/recipes-kernel/linux/files/tracing-CVE-2014-7825_CVE-2014-7826.patch new file mode 100644 index 00000000..cc90f7de --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/linux/files/tracing-CVE-2014-7825_CVE-2014-7826.patch @@ -0,0 +1,94 @@ +From abc07cd01c51fb54088c6bc8ee654d104a5ec7d9 Mon Sep 17 00:00:00 2001 +From: Rabin Vincent +Date: Wed, 29 Oct 2014 23:06:58 +0100 +Subject: [PATCH] tracing/syscalls: Ignore numbers outside NR_syscalls' range + +commit 086ba77a6db00ed858ff07451bedee197df868c9 upstream. + +ARM has some private syscalls (for example, set_tls(2)) which lie +outside the range of NR_syscalls. If any of these are called while +syscall tracing is being performed, out-of-bounds array access will +occur in the ftrace and perf sys_{enter,exit} handlers. + + # trace-cmd record -e raw_syscalls:* true && trace-cmd report + ... + true-653 [000] 384.675777: sys_enter: NR 192 (0, 1000, 3, 4000022, ffffffff, 0) + true-653 [000] 384.675812: sys_exit: NR 192 = 1995915264 + true-653 [000] 384.675971: sys_enter: NR 983045 (76f74480, 76f74000, 76f74b28, 76f74480, 76f76f74, 1) + true-653 [000] 384.675988: sys_exit: NR 983045 = 0 + ... + + # trace-cmd record -e syscalls:* true + [ 17.289329] Unable to handle kernel paging request at virtual address aaaaaace + [ 17.289590] pgd = 9e71c000 + [ 17.289696] [aaaaaace] *pgd=00000000 + [ 17.289985] Internal error: Oops: 5 [#1] PREEMPT SMP ARM + [ 17.290169] Modules linked in: + [ 17.290391] CPU: 0 PID: 704 Comm: true Not tainted 3.18.0-rc2+ #21 + [ 17.290585] task: 9f4dab00 ti: 9e710000 task.ti: 9e710000 + [ 17.290747] PC is at ftrace_syscall_enter+0x48/0x1f8 + [ 17.290866] LR is at syscall_trace_enter+0x124/0x184 + +Fix this by ignoring out-of-NR_syscalls-bounds syscall numbers. + +Commit cd0980fc8add "tracing: Check invalid syscall nr while tracing syscalls" +added the check for less than zero, but it should have also checked +for greater than NR_syscalls. + +Fixes CVE-2014-7825 and CVE-2014-7826 +Upstream-Status: Backport + +Link: http://lkml.kernel.org/p/1414620418-29472-1-git-send-email-rabin@rab.in + +Fixes: cd0980fc8add "tracing: Check invalid syscall nr while tracing syscalls" +Signed-off-by: Rabin Vincent +Signed-off-by: Steven Rostedt +Signed-off-by: Jiri Slaby +Signed-off-by: Sona Sarmadi +--- + kernel/trace/trace_syscalls.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/kernel/trace/trace_syscalls.c b/kernel/trace/trace_syscalls.c +index 559329d..d8ce71b 100644 +--- a/kernel/trace/trace_syscalls.c ++++ b/kernel/trace/trace_syscalls.c +@@ -312,7 +312,7 @@ static void ftrace_syscall_enter(void *data, struct pt_regs *regs, long id) + int size; + + syscall_nr = trace_get_syscall_nr(current, regs); +- if (syscall_nr < 0) ++ if (syscall_nr < 0 || syscall_nr >= NR_syscalls) + return; + if (!test_bit(syscall_nr, tr->enabled_enter_syscalls)) + return; +@@ -354,7 +354,7 @@ static void ftrace_syscall_exit(void *data, struct pt_regs *regs, long ret) + int syscall_nr; + + syscall_nr = trace_get_syscall_nr(current, regs); +- if (syscall_nr < 0) ++ if (syscall_nr < 0 || syscall_nr >= NR_syscalls) + return; + if (!test_bit(syscall_nr, tr->enabled_exit_syscalls)) + return; +@@ -557,7 +557,7 @@ static void perf_syscall_enter(void *ignore, struct pt_regs *regs, long id) + int size; + + syscall_nr = trace_get_syscall_nr(current, regs); +- if (syscall_nr < 0) ++ if (syscall_nr < 0 || syscall_nr >= NR_syscalls) + return; + if (!test_bit(syscall_nr, enabled_perf_enter_syscalls)) + return; +@@ -631,7 +631,7 @@ static void perf_syscall_exit(void *ignore, struct pt_regs *regs, long ret) + int size; + + syscall_nr = trace_get_syscall_nr(current, regs); +- if (syscall_nr < 0) ++ if (syscall_nr < 0 || syscall_nr >= NR_syscalls) + return; + if (!test_bit(syscall_nr, enabled_perf_exit_syscalls)) + return; +-- +1.9.1 + diff --git a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq_3.12.bb b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq_3.12.bb index 527daf45..e7af6274 100644 --- a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq_3.12.bb +++ b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq_3.12.bb @@ -35,6 +35,7 @@ SRC_URI = "git://git.freescale.com/ppc/sdk/linux.git;nobranch=1 \ file://0002-shmem-CVE-2014-4171.patch \ file://0003-shmem-CVE-2014-4171.patch \ file://fs-CVE-2014-4014.patch \ + file://tracing-CVE-2014-7825_CVE-2014-7826.patch \ " SRCREV = "6619b8b55796cdf0cec04b66a71288edd3057229" -- cgit v1.2.3-54-g00ecf From 95b506386d128a715c389cf2aa67b3468a1cf2cc Mon Sep 17 00:00:00 2001 From: Sona Sarmadi Date: Mon, 2 Mar 2015 11:44:00 +0100 Subject: security-keys: CVE-2014-9529 Fixes memory corruption or panic during key garbage collection Reference: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-9529 Signed-off-by: Sona Sarmadi --- .../linux/files/security-keys-CVE-2014-9529.patch | 53 ++++++++++++++++++++++ .../recipes-kernel/linux/linux-qoriq_3.12.bb | 1 + 2 files changed, 54 insertions(+) create mode 100644 meta-fsl-ppc/recipes-kernel/linux/files/security-keys-CVE-2014-9529.patch diff --git a/meta-fsl-ppc/recipes-kernel/linux/files/security-keys-CVE-2014-9529.patch b/meta-fsl-ppc/recipes-kernel/linux/files/security-keys-CVE-2014-9529.patch new file mode 100644 index 00000000..573b5300 --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/linux/files/security-keys-CVE-2014-9529.patch @@ -0,0 +1,53 @@ +From a7033e302dcd38bb4333f46b3fdcd930955e402d Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Mon, 29 Dec 2014 09:39:01 -0500 +Subject: [PATCH] KEYS: close race between key lookup and freeing + +commit a3a8784454692dd72e5d5d34dcdab17b4420e74c upstream. + +When a key is being garbage collected, it's key->user would get put before +the ->destroy() callback is called, where the key is removed from it's +respective tracking structures. + +This leaves a key hanging in a semi-invalid state which leaves a window open +for a different task to try an access key->user. An example is +find_keyring_by_name() which would dereference key->user for a key that is +in the process of being garbage collected (where key->user was freed but +->destroy() wasn't called yet - so it's still present in the linked list). + +This would cause either a panic, or corrupt memory. + +Fixes CVE-2014-9529. + +Upstream-Status: Backport + +Signed-off-by: Sasha Levin +Signed-off-by: David Howells +Signed-off-by: Greg Kroah-Hartman +Signed-off-by: Sona Sarmadi +--- + security/keys/gc.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/security/keys/gc.c b/security/keys/gc.c +index d67c97b..7978186 100644 +--- a/security/keys/gc.c ++++ b/security/keys/gc.c +@@ -201,12 +201,12 @@ static noinline void key_gc_unused_keys(struct list_head *keys) + if (test_bit(KEY_FLAG_INSTANTIATED, &key->flags)) + atomic_dec(&key->user->nikeys); + +- key_user_put(key->user); +- + /* now throw away the key memory */ + if (key->type->destroy) + key->type->destroy(key); + ++ key_user_put(key->user); ++ + kfree(key->description); + + #ifdef KEY_DEBUGGING +-- +1.9.1 + diff --git a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq_3.12.bb b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq_3.12.bb index e7af6274..f082b046 100644 --- a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq_3.12.bb +++ b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq_3.12.bb @@ -36,6 +36,7 @@ SRC_URI = "git://git.freescale.com/ppc/sdk/linux.git;nobranch=1 \ file://0003-shmem-CVE-2014-4171.patch \ file://fs-CVE-2014-4014.patch \ file://tracing-CVE-2014-7825_CVE-2014-7826.patch \ + file://security-keys-CVE-2014-9529.patch \ " SRCREV = "6619b8b55796cdf0cec04b66a71288edd3057229" -- cgit v1.2.3-54-g00ecf From 1afa62312a1c0e7336e5771b6f45c0a4810d9bd7 Mon Sep 17 00:00:00 2001 From: Sona Sarmadi Date: Fri, 13 Mar 2015 12:54:03 +0100 Subject: eCryptfs: CVE-2014-9683 This fixes a 1-byte NULL write past the end of allocated memory References http://seclists.org/oss-sec/2015/q1/582 https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-9683 Signed-off-by: Sona Sarmadi --- .../linux/files/eCryptfs-CVE-2014-9683.patch | 41 ++++++++++++++++++++++ .../recipes-kernel/linux/linux-qoriq_3.12.bb | 1 + 2 files changed, 42 insertions(+) create mode 100644 meta-fsl-ppc/recipes-kernel/linux/files/eCryptfs-CVE-2014-9683.patch diff --git a/meta-fsl-ppc/recipes-kernel/linux/files/eCryptfs-CVE-2014-9683.patch b/meta-fsl-ppc/recipes-kernel/linux/files/eCryptfs-CVE-2014-9683.patch new file mode 100644 index 00000000..0cd9c958 --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/linux/files/eCryptfs-CVE-2014-9683.patch @@ -0,0 +1,41 @@ +From 8ffea99d6f2be99790611282f326da95a84a8cab Mon Sep 17 00:00:00 2001 +From: Michael Halcrow +Date: Wed, 26 Nov 2014 09:09:16 -0800 +Subject: [PATCH] eCryptfs: Remove buggy and unnecessary write in file name + decode routine + +commit 942080643bce061c3dd9d5718d3b745dcb39a8bc upstream. + +Dmitry Chernenkov used KASAN to discover that eCryptfs writes past the +end of the allocated buffer during encrypted filename decoding. This +fix corrects the issue by getting rid of the unnecessary 0 write when +the current bit offset is 2. + +Fixes CVE-2014-9683 +Upstream-Status: Backport + +Signed-off-by: Michael Halcrow +Reported-by: Dmitry Chernenkov +Suggested-by: Kees Cook +Signed-off-by: Tyler Hicks +Signed-off-by: Jiri Slaby +Signed-off-by: Sona Sarmadi +--- + fs/ecryptfs/crypto.c | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/fs/ecryptfs/crypto.c b/fs/ecryptfs/crypto.c +index 000eae2..bf926f7 100644 +--- a/fs/ecryptfs/crypto.c ++++ b/fs/ecryptfs/crypto.c +@@ -1917,7 +1917,6 @@ ecryptfs_decode_from_filename(unsigned char *dst, size_t *dst_size, + break; + case 2: + dst[dst_byte_offset++] |= (src_byte); +- dst[dst_byte_offset] = 0; + current_bit_offset = 0; + break; + } +-- +1.9.1 + diff --git a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq_3.12.bb b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq_3.12.bb index f082b046..1e9e4761 100644 --- a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq_3.12.bb +++ b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq_3.12.bb @@ -37,6 +37,7 @@ SRC_URI = "git://git.freescale.com/ppc/sdk/linux.git;nobranch=1 \ file://fs-CVE-2014-4014.patch \ file://tracing-CVE-2014-7825_CVE-2014-7826.patch \ file://security-keys-CVE-2014-9529.patch \ + file://eCryptfs-CVE-2014-9683.patch \ " SRCREV = "6619b8b55796cdf0cec04b66a71288edd3057229" -- cgit v1.2.3-54-g00ecf From 70e804bd4ed3f5dd6d501c664bf3a63dad59eefa Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Thu, 12 Feb 2015 15:54:18 +0800 Subject: u-boot-qoriq: fix the build issue with binutils-2.25 Remove _GLOBAL_OFFSET_TABLE_ definition from u-boot/mpc85xx/u-boot*.lds In binutils-2.25, the _GLOBAL_OFFSET_TABLE_ symbols defined by PROVIDE in u-boot.lds overrides the linker built-in symbols (https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commitdiff;h=b893397a4b1316610f49819344817715e4305de9), so the linker is treating _GLOBAL_OFFSET_TABLE_ as a definition into the .reloc section. To align with the change of binutils-2.25, the _GLOBAL_OFFSET_TABLE_ symbol should not be defined in sections, and the symbols in linker generated .got section should be used(https://sourceware.org/ml/binutils/2008-09/msg00122.html). Fixed the following build errors with binutils-2.25: | powerpc-poky-linux-gnuspe-ld.bfd: _GLOBAL_OFFSET_TABLE_ not defined in linker created .got [YOCTO #7145] Signed-off-by: Zhenhua Luo --- ...5xx-u-boot-.lds-remove-_GLOBAL_OFFSET_TAB.patch | 77 ++++++++++++++++++++++ .../recipes-bsp/u-boot/u-boot-qoriq_2014.07.bb | 3 +- 2 files changed, 79 insertions(+), 1 deletion(-) create mode 100644 meta-fsl-ppc/recipes-bsp/u-boot/files/0001-u-boot-mpc85xx-u-boot-.lds-remove-_GLOBAL_OFFSET_TAB.patch diff --git a/meta-fsl-ppc/recipes-bsp/u-boot/files/0001-u-boot-mpc85xx-u-boot-.lds-remove-_GLOBAL_OFFSET_TAB.patch b/meta-fsl-ppc/recipes-bsp/u-boot/files/0001-u-boot-mpc85xx-u-boot-.lds-remove-_GLOBAL_OFFSET_TAB.patch new file mode 100644 index 00000000..e6b8d2e5 --- /dev/null +++ b/meta-fsl-ppc/recipes-bsp/u-boot/files/0001-u-boot-mpc85xx-u-boot-.lds-remove-_GLOBAL_OFFSET_TAB.patch @@ -0,0 +1,77 @@ +From 9ba002f1b1afc7af84a352f4ecab32a30d7ba353 Mon Sep 17 00:00:00 2001 +From: Zhenhua Luo +Date: Mon, 9 Feb 2015 18:33:56 +0800 +Subject: [PATCH] u-boot/mpc85xx/u-boot*.lds: remove _GLOBAL_OFFSET_TABLE_ + definition + +In binutils-2.25, the _GLOBAL_OFFSET_TABLE_ symbols defined by PROVIDE in +u-boot.lds overrides the linker built-in symbols +(https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commitdiff;h=b893397a4b1316610f49819344817715e4305de9), +so the linker is treating _GLOBAL_OFFSET_TABLE_ as a definition into the .reloc section. + +To align with the change of binutils-2.25, the _GLOBAL_OFFSET_TABLE_ symbol +should not be defined in sections, and the symbols in linker generated .got +section should be used(https://sourceware.org/ml/binutils/2008-09/msg00122.html). + +Fixed the following build errors with binutils-2.25: +| powerpc-poky-linux-gnuspe-ld.bfd: _GLOBAL_OFFSET_TABLE_ not defined in linker created .got + +Signed-off-by: Zhenhua Luo +--- + arch/powerpc/cpu/mpc85xx/u-boot-nand.lds | 1 - + arch/powerpc/cpu/mpc85xx/u-boot-nand_spl.lds | 1 - + arch/powerpc/cpu/mpc85xx/u-boot-spl.lds | 1 - + arch/powerpc/cpu/mpc85xx/u-boot.lds | 1 - + 4 files changed, 4 deletions(-) + +diff --git a/arch/powerpc/cpu/mpc85xx/u-boot-nand.lds b/arch/powerpc/cpu/mpc85xx/u-boot-nand.lds +index f933b21..0399f93 100644 +--- a/arch/powerpc/cpu/mpc85xx/u-boot-nand.lds ++++ b/arch/powerpc/cpu/mpc85xx/u-boot-nand.lds +@@ -44,7 +44,6 @@ SECTIONS + _GOT2_TABLE_ = .; + KEEP(*(.got2)) + KEEP(*(.got)) +- PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4); + _FIXUP_TABLE_ = .; + KEEP(*(.fixup)) + } +diff --git a/arch/powerpc/cpu/mpc85xx/u-boot-nand_spl.lds b/arch/powerpc/cpu/mpc85xx/u-boot-nand_spl.lds +index b83c553..f044564 100644 +--- a/arch/powerpc/cpu/mpc85xx/u-boot-nand_spl.lds ++++ b/arch/powerpc/cpu/mpc85xx/u-boot-nand_spl.lds +@@ -22,7 +22,6 @@ SECTIONS + _GOT2_TABLE_ = .; + KEEP(*(.got2)) + KEEP(*(.got)) +- PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4); + _FIXUP_TABLE_ = .; + KEEP(*(.fixup)) + } +diff --git a/arch/powerpc/cpu/mpc85xx/u-boot-spl.lds b/arch/powerpc/cpu/mpc85xx/u-boot-spl.lds +index 5ae7b3e..889a4c2 100644 +--- a/arch/powerpc/cpu/mpc85xx/u-boot-spl.lds ++++ b/arch/powerpc/cpu/mpc85xx/u-boot-spl.lds +@@ -29,7 +29,6 @@ SECTIONS + _GOT2_TABLE_ = .; + KEEP(*(.got2)) + KEEP(*(.got)) +- PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4); + _FIXUP_TABLE_ = .; + KEEP(*(.fixup)) + } +diff --git a/arch/powerpc/cpu/mpc85xx/u-boot.lds b/arch/powerpc/cpu/mpc85xx/u-boot.lds +index 2cf0b25..f15eaf3 100644 +--- a/arch/powerpc/cpu/mpc85xx/u-boot.lds ++++ b/arch/powerpc/cpu/mpc85xx/u-boot.lds +@@ -50,7 +50,6 @@ SECTIONS + _GOT2_TABLE_ = .; + KEEP(*(.got2)) + KEEP(*(.got)) +- PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4); + _FIXUP_TABLE_ = .; + KEEP(*(.fixup)) + } +-- +2.1.0 + diff --git a/meta-fsl-ppc/recipes-bsp/u-boot/u-boot-qoriq_2014.07.bb b/meta-fsl-ppc/recipes-bsp/u-boot/u-boot-qoriq_2014.07.bb index b7806584..3e519e2f 100644 --- a/meta-fsl-ppc/recipes-bsp/u-boot/u-boot-qoriq_2014.07.bb +++ b/meta-fsl-ppc/recipes-bsp/u-boot/u-boot-qoriq_2014.07.bb @@ -17,7 +17,8 @@ DEPENDS = "boot-format-native libgcc ${@base_contains('TCMODE', 'external-fsl', inherit deploy -SRC_URI = "git://git.freescale.com/ppc/sdk/u-boot.git;nobranch=1" +SRC_URI = "git://git.freescale.com/ppc/sdk/u-boot.git;nobranch=1 \ + file://0001-u-boot-mpc85xx-u-boot-.lds-remove-_GLOBAL_OFFSET_TAB.patch" SRCREV = "659b6a23a8b1f3026200bc6352dbacef53f4dcb1" python () { -- cgit v1.2.3-54-g00ecf From 5ba8351d4d29cc2cc99b9f2ca28971b1c3e4cbc5 Mon Sep 17 00:00:00 2001 From: Chunrong Guo Date: Tue, 14 Apr 2015 17:25:18 +0800 Subject: asf: fix configure error fix the following error: |make: *** No rule to make target `/poky/build/tmp/work-shared/p4080ds/kernel-source/.config (From OE-Core rev: 6a1ff0e7eacef595738f2fed086986fd622ec32a) Signed-off-by: Chunrong Guo --- meta-fsl-ppc/recipes-kernel/asf/asf_git.bb | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/meta-fsl-ppc/recipes-kernel/asf/asf_git.bb b/meta-fsl-ppc/recipes-kernel/asf/asf_git.bb index 8070f5a2..b3379c1a 100644 --- a/meta-fsl-ppc/recipes-kernel/asf/asf_git.bb +++ b/meta-fsl-ppc/recipes-kernel/asf/asf_git.bb @@ -6,16 +6,18 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b5881ecf398da8a03a3f4c501e29d287" SRC_URI = "git://git.freescale.com/ppc/sdk/asf.git;nobranch=1" SRCREV = "16eb472d6b2b34c8b605a86c469611bc8ddec1c9" - inherit module qoriq_build_64bit_kernel - +do_configure[depends] += "virtual/kernel:do_shared_workdir" S = "${WORKDIR}/git/asfmodule" EXTRA_OEMAKE = "CROSS_COMPILE=${TARGET_PREFIX}" export KERNEL_PATH = "${STAGING_KERNEL_DIR}" - INHIBIT_PACKAGE_STRIP = "1" +do_configure_append (){ + cp ${STAGING_KERNEL_BUILDDIR}/.config ${STAGING_KERNEL_DIR}/ +} + do_install(){ install -d ${D}/${libexecdir} install -d ${D}/lib/modules/${KERNEL_VERSION}/asf @@ -26,4 +28,3 @@ do_install(){ FILES_${PN} += "${libexecdir} /lib/modules/${KERNEL_VERSION}/asf" RDEPENDS_${PN} += "ipsec-tools" - -- cgit v1.2.3-54-g00ecf From 60188331d9687555055246d275f3fac304d73e5c Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Wed, 22 Apr 2015 20:13:45 +0800 Subject: cryptodev: upgrade the bbappend version from 1.6 to 1.7 Signed-off-by: Zhenhua Luo --- .../recipes-kernel/cryptodev/cryptodev-linux_1.6.bbappend | 2 -- .../recipes-kernel/cryptodev/cryptodev-linux_1.7.bbappend | 2 ++ .../recipes-kernel/cryptodev/cryptodev-module_1.6.bbappend | 12 ------------ .../recipes-kernel/cryptodev/cryptodev-module_1.7.bbappend | 12 ++++++++++++ 4 files changed, 14 insertions(+), 14 deletions(-) delete mode 100644 meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-linux_1.6.bbappend create mode 100644 meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-linux_1.7.bbappend delete mode 100644 meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-module_1.6.bbappend create mode 100644 meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-module_1.7.bbappend diff --git a/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-linux_1.6.bbappend b/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-linux_1.6.bbappend deleted file mode 100644 index 3cbbb3dd..00000000 --- a/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-linux_1.6.bbappend +++ /dev/null @@ -1,2 +0,0 @@ -require recipes-kernel/cryptodev/cryptodev-fsl.inc - diff --git a/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-linux_1.7.bbappend b/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-linux_1.7.bbappend new file mode 100644 index 00000000..3cbbb3dd --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-linux_1.7.bbappend @@ -0,0 +1,2 @@ +require recipes-kernel/cryptodev/cryptodev-fsl.inc + diff --git a/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-module_1.6.bbappend b/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-module_1.6.bbappend deleted file mode 100644 index 2bf012c1..00000000 --- a/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-module_1.6.bbappend +++ /dev/null @@ -1,12 +0,0 @@ -require recipes-kernel/cryptodev/cryptodev-fsl.inc - -inherit qoriq_build_64bit_kernel - -do_install_append_qoriq-ppc () { - rm -fr ${D}/usr -} - -# Currently pkc-host does not support RSA_KEYGEN, remove this -# if it is fixed. -SRC_URI_append_qoriq-ppc = "${@base_contains('DISTRO_FEATURES', 'c29x_pkc', ' file://0001-don-t-advertise-RSA-keygen.patch', '', d)}" - diff --git a/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-module_1.7.bbappend b/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-module_1.7.bbappend new file mode 100644 index 00000000..2bf012c1 --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/cryptodev/cryptodev-module_1.7.bbappend @@ -0,0 +1,12 @@ +require recipes-kernel/cryptodev/cryptodev-fsl.inc + +inherit qoriq_build_64bit_kernel + +do_install_append_qoriq-ppc () { + rm -fr ${D}/usr +} + +# Currently pkc-host does not support RSA_KEYGEN, remove this +# if it is fixed. +SRC_URI_append_qoriq-ppc = "${@base_contains('DISTRO_FEATURES', 'c29x_pkc', ' file://0001-don-t-advertise-RSA-keygen.patch', '', d)}" + -- cgit v1.2.3-54-g00ecf From d941ab6d0a6d7862d477c53acca282efaec49d2f Mon Sep 17 00:00:00 2001 From: Liu Ting-B28495 Date: Fri, 1 May 2015 23:53:45 +0800 Subject: asf: use KBUILD_OUTPUT to point to build-artifacts In poky commit 46cdaf1, the kernel build output was put into kernel-build-artifacts, and kernel-source is kept "pristine". KERNEL_PATH points to kernel-source, while KBUILD_OUTPUT points to build-artifacts which can be used for external module build. asf Makefile tries to include the .config, use KBUILD_OUTPUT to avoid build error. Signed-off-by: Liu Ting-B28495 --- meta-fsl-ppc/recipes-kernel/asf/asf_git.bb | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/meta-fsl-ppc/recipes-kernel/asf/asf_git.bb b/meta-fsl-ppc/recipes-kernel/asf/asf_git.bb index b3379c1a..1ca4c8ea 100644 --- a/meta-fsl-ppc/recipes-kernel/asf/asf_git.bb +++ b/meta-fsl-ppc/recipes-kernel/asf/asf_git.bb @@ -7,15 +7,17 @@ SRC_URI = "git://git.freescale.com/ppc/sdk/asf.git;nobranch=1" SRCREV = "16eb472d6b2b34c8b605a86c469611bc8ddec1c9" inherit module qoriq_build_64bit_kernel -do_configure[depends] += "virtual/kernel:do_shared_workdir" + S = "${WORKDIR}/git/asfmodule" EXTRA_OEMAKE = "CROSS_COMPILE=${TARGET_PREFIX}" export KERNEL_PATH = "${STAGING_KERNEL_DIR}" + INHIBIT_PACKAGE_STRIP = "1" -do_configure_append (){ - cp ${STAGING_KERNEL_BUILDDIR}/.config ${STAGING_KERNEL_DIR}/ +do_configure[depends] += "virtual/kernel:do_shared_workdir" +do_configure_prepend () { + sed -i 's,$(KERNEL_PATH)/.config,$(KBUILD_OUTPUT)/.config,' ${S}/Makefile } do_install(){ @@ -28,3 +30,4 @@ do_install(){ FILES_${PN} += "${libexecdir} /lib/modules/${KERNEL_VERSION}/asf" RDEPENDS_${PN} += "ipsec-tools" + -- cgit v1.2.3-54-g00ecf From 9d382632fcb6cff2445625a3cba0a52413546a8f Mon Sep 17 00:00:00 2001 From: Liu Ting-B28495 Date: Fri, 1 May 2015 23:53:46 +0800 Subject: ceetm: use KBUILD_OUTPUT to point to build-artifacts In poky commit 46cdaf1, the kernel build output was put into kernel-build-artifacts, and kernel-source is kept "pristine". KERNEL_PATH points to kernel-source, while KBUILD_OUTPUT points to build-artifacts which can be used for external module build. ceetm Makefile tries to include the .config, use KBUILD_OUTPUT to avoid build error. Signed-off-by: Liu Ting-B28495 --- meta-fsl-ppc/recipes-kernel/ceetm/ceetm_git.bb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/meta-fsl-ppc/recipes-kernel/ceetm/ceetm_git.bb b/meta-fsl-ppc/recipes-kernel/ceetm/ceetm_git.bb index 266261eb..beaed31e 100644 --- a/meta-fsl-ppc/recipes-kernel/ceetm/ceetm_git.bb +++ b/meta-fsl-ppc/recipes-kernel/ceetm/ceetm_git.bb @@ -14,6 +14,11 @@ S = "${WORKDIR}/git" EXTRA_OEMAKE = "CROSS_COMPILE=${TARGET_PREFIX} SYSROOT=${STAGING_DIR_TARGET}" export KERNEL_PATH = "${STAGING_KERNEL_DIR}" +do_configure[depends] += "virtual/kernel:do_shared_workdir" +do_configure_prepend () { + sed -i 's,$(KERNEL_PATH)/.config,$(KBUILD_OUTPUT)/.config,' ${S}/ceetm_module/Makefile +} + do_install(){ mkdir -p ${D}/usr/driver/ceetm mkdir -p ${D}/${libdir}/tc -- cgit v1.2.3-54-g00ecf From 8a3e937f5655c4be7465358015916009d53ec8ce Mon Sep 17 00:00:00 2001 From: Liu Ting-B28495 Date: Fri, 1 May 2015 23:53:47 +0800 Subject: skmm-ep: use backquotes for command substitution Signed-off-by: Liu Ting-B28495 --- meta-fsl-ppc/recipes-extended/skmm-ep/skmm-ep_git.bb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meta-fsl-ppc/recipes-extended/skmm-ep/skmm-ep_git.bb b/meta-fsl-ppc/recipes-extended/skmm-ep/skmm-ep_git.bb index fcbd2ed9..ca5d6734 100644 --- a/meta-fsl-ppc/recipes-extended/skmm-ep/skmm-ep_git.bb +++ b/meta-fsl-ppc/recipes-extended/skmm-ep/skmm-ep_git.bb @@ -18,8 +18,8 @@ S = "${WORKDIR}/git" EXTRA_OEMAKE = 'MACHINE=${MACHINE}' -export LIBEDIT_CFLAGS="$(pkg-config --cflags libedit)" -export LIBEDIT_LDFLAGS="$(pkg-config --libs --static libedit)" +export LIBEDIT_CFLAGS = "`pkg-config --cflags libedit`" +export LIBEDIT_LDFLAGS = "`pkg-config --libs --static libedit`" do_compile () { export ARCH=${TARGET_ARCH} -- cgit v1.2.3-54-g00ecf From f9ad49d43e342e90fdbd5ab6c49cb99ca28ef53c Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Tue, 12 May 2015 17:15:58 +0800 Subject: skmm-host: packaging mini_calc file in binary package Fix the following build error: * ERROR: QA Issue: skmm-host: Files/directories were installed but not shipped /usr/bin/mini_calc [installed-vs-shipped] Signed-off-by: Zhenhua Luo --- meta-fsl-ppc/recipes-kernel/skmm-host/skmm-host_git.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-fsl-ppc/recipes-kernel/skmm-host/skmm-host_git.bb b/meta-fsl-ppc/recipes-kernel/skmm-host/skmm-host_git.bb index a1c43f35..5e6b0858 100644 --- a/meta-fsl-ppc/recipes-kernel/skmm-host/skmm-host_git.bb +++ b/meta-fsl-ppc/recipes-kernel/skmm-host/skmm-host_git.bb @@ -12,4 +12,4 @@ S = "${WORKDIR}/git" EXTRA_OEMAKE='KERNEL_DIR="${STAGING_KERNEL_DIR}" PREFIX="${D}"' -FILES_${PN} += "/etc/skmm/" +FILES_${PN} += "/etc/skmm/ /usr/bin/" -- cgit v1.2.3-54-g00ecf From 8dcb3bb6595b8930039d94456f63fbbef490b02a Mon Sep 17 00:00:00 2001 From: Liu Ting-B28495 Date: Wed, 13 May 2015 18:15:50 +0800 Subject: ipc: use KBUILD_OUTPUT to point to build-artifacts In poky commit 46cdaf1, the kernel build output was put into kernel-build-artifacts, and kernel-source is kept "pristine". KERNEL_PATH points to kernel-source, while KBUILD_OUTPUT points to build-artifacts which can be used for external module build. ipc Makefile tries to include the .config, use KBUILD_OUTPUT to avoid build error. Signed-off-by: Liu Ting-B28495 --- meta-fsl-ppc/recipes-kernel/ipc/ipc-modules.inc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/meta-fsl-ppc/recipes-kernel/ipc/ipc-modules.inc b/meta-fsl-ppc/recipes-kernel/ipc/ipc-modules.inc index e403e6bb..79ba7ef1 100644 --- a/meta-fsl-ppc/recipes-kernel/ipc/ipc-modules.inc +++ b/meta-fsl-ppc/recipes-kernel/ipc/ipc-modules.inc @@ -9,6 +9,11 @@ inherit module qoriq_build_64bit_kernel S = "${WORKDIR}/git" +do_configure[depends] += "virtual/kernel:do_shared_workdir" +do_configure_prepend() { + sed -i 's,$(KERNEL_DIR)/.config,$(KBUILD_OUTPUT)/.config,' ${S}/kernel/Makefile +} + do_compile_prepend () { cd ${S}/kernel case ${MACHINE} in -- cgit v1.2.3-54-g00ecf From 60ecf4f21bb60a1c83a194b6799f56dcaf094f1b Mon Sep 17 00:00:00 2001 From: Liu Ting-B28495 Date: Wed, 13 May 2015 18:15:51 +0800 Subject: auto-resp: fix the include path to private headers When building external module, $(PWD) is the root of the kernel tree. Signed-off-by: Liu Ting-B28495 --- meta-fsl-ppc/recipes-kernel/auto-resp/ar_git.bb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/meta-fsl-ppc/recipes-kernel/auto-resp/ar_git.bb b/meta-fsl-ppc/recipes-kernel/auto-resp/ar_git.bb index 81a94a04..52d9f57d 100644 --- a/meta-fsl-ppc/recipes-kernel/auto-resp/ar_git.bb +++ b/meta-fsl-ppc/recipes-kernel/auto-resp/ar_git.bb @@ -14,6 +14,10 @@ export KERNEL_PATH INHIBIT_PACKAGE_STRIP = "1" +do_compile_prepend() { + sed -i -e 's,EXTRA_CFLAGS += -I$(PWD),EXTRA_CFLAGS += -I${S},' ${S}/armodule/source/Makefile +} + do_install(){ install -d ${D}/lib/modules/${KERNEL_VERSION} install -d ${D}${bindir} -- cgit v1.2.3-54-g00ecf