diff options
Diffstat (limited to 'meta/recipes-extended/libzypp/libzypp_git.bb')
-rw-r--r-- | meta/recipes-extended/libzypp/libzypp_git.bb | 47 |
1 files changed, 37 insertions, 10 deletions
diff --git a/meta/recipes-extended/libzypp/libzypp_git.bb b/meta/recipes-extended/libzypp/libzypp_git.bb index 809c1877f5..b473b9ff96 100644 --- a/meta/recipes-extended/libzypp/libzypp_git.bb +++ b/meta/recipes-extended/libzypp/libzypp_git.bb @@ -25,6 +25,9 @@ SRC_URI = "git://gitorious.org/opensuse/libzypp.git;protocol=git \ SRC_URI_append_mips = " file://mips-workaround-gcc-tribool-error.patch" +# ARM specific global constructor workaround +SRC_URI_append_arm = " file://arm-workaround-global-constructor.patch" + FILES_${PN} += "${libdir}/zypp ${datadir}/zypp ${datadir}/icons" FILES_${PN}-dev += "${datadir}/cmake" @@ -32,27 +35,38 @@ EXTRA_OECMAKE += "-DLIB=lib" PACKAGE_ARCH = "${MACHINE_ARCH}" +AVOID_CONSTRUCTOR = "" + +# Due to an ARM specific compiler issue +AVOID_CONSTRUCTOR_arm = "true" + +# Due to a potential conflict with '_mips' being a define +AVOID_CONSTRUCTOR_mips = "true" + do_archgen () { # We need to dynamically generate our arch file based on the machine # configuration echo "/* Automatically generated by the libzypp recipes */" > zypp/poky-arch.h + echo "/* Avoid Constructor: ${AVOID_CONSTRUCTOR} */" >> zypp/poky-arch.h echo "" >> zypp/poky-arch.h echo "#ifndef POKY_ARCH_H" >> zypp/poky-arch.h echo "#define POKY_ARCH_H 1" >> zypp/poky-arch.h echo "#define Arch_machine Arch_${MACHINE_ARCH}" >> zypp/poky-arch.h echo "#endif /* POKY_ARCH_H */" >> zypp/poky-arch.h echo "" >> zypp/poky-arch.h - echo "#ifdef DEF_BUILTIN" >> zypp/poky-arch.h - echo "/* Specify builtin types */" >> zypp/poky-arch.h - for each_arch in ${PACKAGE_ARCHS} ; do + if [ "${AVOID_CONSTRUCTOR}" != "true" ]; then + echo "#ifdef DEF_BUILTIN" >> zypp/poky-arch.h + echo "/* Specify builtin types */" >> zypp/poky-arch.h + for each_arch in ${PACKAGE_ARCHS} ; do case "$each_arch" in all | any | noarch) continue;; esac echo " DEF_BUILTIN( ${each_arch} );" >> zypp/poky-arch.h - done - echo "#endif /* DEF_BUILTIN */" >> zypp/poky-arch.h - echo "" >> zypp/poky-arch.h + done + echo "#endif /* DEF_BUILTIN */" >> zypp/poky-arch.h + echo "" >> zypp/poky-arch.h + fi echo "#ifdef POKY_EXTERN_PROTO" >> zypp/poky-arch.h echo "/* Specify extern prototypes */" >> zypp/poky-arch.h for each_arch in ${PACKAGE_ARCHS} ; do @@ -71,7 +85,11 @@ do_archgen () { all | any | noarch) continue;; esac - echo " const Arch Arch_${each_arch} (_${each_arch});" >> zypp/poky-arch.h + if [ "${AVOID_CONSTRUCTOR}" != "true" ]; then + echo " const Arch Arch_${each_arch} (_${each_arch});" >> zypp/poky-arch.h + else + echo " const Arch Arch_${each_arch} ( IdString ( \"${each_arch}\" ) );" >> zypp/poky-arch.h + fi done echo "#endif /* POKY_PROTO */" >> zypp/poky-arch.h echo "" >> zypp/poky-arch.h @@ -89,14 +107,23 @@ do_archgen () { all | any | noarch) shift ; continue;; esac - ARCH=_"$1" + if [ "${AVOID_CONSTRUCTOR}" != "true" ]; then + ARCH="_$1" + else + ARCH="IdString(\"$1\")" + fi shift COMPAT="" for each_arch in "$@"; do + if [ -z "${AVOID_CONSTRUCTOR}" ]; then + arch_val="_${each_arch}" + else + arch_val="IdString(\"${each_arch}\")" + fi if [ -z "$COMPAT" ]; then - COMPAT=_"$each_arch" + COMPAT=${arch_val} else - COMPAT=_"$each_arch,$COMPAT" + COMPAT="${arch_val},$COMPAT" fi done COMPAT_WITH="${ARCH},${COMPAT} $COMPAT_WITH" |