From d6a0bc57fa07d887a78aa8ed76e3bf4558dc5127 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Thu, 3 Aug 2017 07:03:20 -0700 Subject: glibc: Upgrade to 2.26 final release Signed-off-by: Khem Raj Signed-off-by: Ross Burton --- meta/conf/distro/include/tcmode-default.inc | 2 +- .../glibc/cross-localedef-native_2.25.90.bb | 52 -------- .../glibc/cross-localedef-native_2.26.bb | 51 ++++++++ meta/recipes-core/glibc/glibc-initial_2.25.90.bb | 9 -- meta/recipes-core/glibc/glibc-initial_2.26.bb | 9 ++ meta/recipes-core/glibc/glibc-locale_2.25.90.bb | 1 - meta/recipes-core/glibc/glibc-locale_2.26.bb | 1 + meta/recipes-core/glibc/glibc-mtrace_2.25.90.bb | 1 - meta/recipes-core/glibc/glibc-mtrace_2.26.bb | 1 + meta/recipes-core/glibc/glibc-scripts_2.25.90.bb | 1 - meta/recipes-core/glibc/glibc-scripts_2.26.bb | 1 + ...ress-pedantic-warning-caused-by-statement.patch | 90 +++++++++++++ meta/recipes-core/glibc/glibc_2.25.90.bb | 143 --------------------- meta/recipes-core/glibc/glibc_2.26.bb | 143 +++++++++++++++++++++ 14 files changed, 297 insertions(+), 208 deletions(-) delete mode 100644 meta/recipes-core/glibc/cross-localedef-native_2.25.90.bb create mode 100644 meta/recipes-core/glibc/cross-localedef-native_2.26.bb delete mode 100644 meta/recipes-core/glibc/glibc-initial_2.25.90.bb create mode 100644 meta/recipes-core/glibc/glibc-initial_2.26.bb delete mode 100644 meta/recipes-core/glibc/glibc-locale_2.25.90.bb create mode 100644 meta/recipes-core/glibc/glibc-locale_2.26.bb delete mode 100644 meta/recipes-core/glibc/glibc-mtrace_2.25.90.bb create mode 100644 meta/recipes-core/glibc/glibc-mtrace_2.26.bb delete mode 100644 meta/recipes-core/glibc/glibc-scripts_2.25.90.bb create mode 100644 meta/recipes-core/glibc/glibc-scripts_2.26.bb create mode 100644 meta/recipes-core/glibc/glibc/0026-assert-Suppress-pedantic-warning-caused-by-statement.patch delete mode 100644 meta/recipes-core/glibc/glibc_2.25.90.bb create mode 100644 meta/recipes-core/glibc/glibc_2.26.bb (limited to 'meta') diff --git a/meta/conf/distro/include/tcmode-default.inc b/meta/conf/distro/include/tcmode-default.inc index 8ffb8ad046..2754136405 100644 --- a/meta/conf/distro/include/tcmode-default.inc +++ b/meta/conf/distro/include/tcmode-default.inc @@ -26,7 +26,7 @@ GCCVERSION ?= "7.%" SDKGCCVERSION ?= "${GCCVERSION}" BINUVERSION ?= "2.28%" GDBVERSION ?= "8.0%" -GLIBCVERSION ?= "2.25%" +GLIBCVERSION ?= "2.26%" LINUXLIBCVERSION ?= "4.10%" PREFERRED_VERSION_gcc ?= "${GCCVERSION}" diff --git a/meta/recipes-core/glibc/cross-localedef-native_2.25.90.bb b/meta/recipes-core/glibc/cross-localedef-native_2.25.90.bb deleted file mode 100644 index 5dd0c70400..0000000000 --- a/meta/recipes-core/glibc/cross-localedef-native_2.25.90.bb +++ /dev/null @@ -1,52 +0,0 @@ -SUMMARY = "Cross locale generation tool for glibc" -HOMEPAGE = "http://www.gnu.org/software/libc/libc.html" -SECTION = "libs" -LICENSE = "LGPL-2.1" - -LIC_FILES_CHKSUM = "file://LICENSES;md5=e9a558e243b36d3209f380deb394b213 \ - file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - file://posix/rxspencer/COPYRIGHT;md5=dc5485bb394a13b2332ec1c785f5d83a \ - file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c" - -# Tell autotools that we're working in the localedef directory -# -AUTOTOOLS_SCRIPT_PATH = "${S}/localedef" - -inherit native -inherit autotools - -FILESEXTRAPATHS =. "${FILE_DIRNAME}/${PN}:${FILE_DIRNAME}/glibc:" - -#SRCBRANCH ?= "release/${PV}/master" -SRCBRANCH ?= "master" -GLIBC_GIT_URI ?= "git://sourceware.org/git/glibc.git" -UPSTREAM_CHECK_GITTAGREGEX = "(?P\d+\.\d+(\.\d+)*)" - -SRCREV_glibc ?= "43a9f537fc121a867981ca31ea9d79f33ce0fd24" -SRCREV_localedef ?= "dfb4afe551c6c6e94f9cc85417bd1f582168c843" - -SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \ - git://github.com/kraj/localedef;branch=master;name=localedef;destsuffix=git/localedef \ - file://0015-timezone-re-written-tzselect-as-posix-sh.patch \ - file://0016-Remove-bash-dependency-for-nscd-init-script.patch \ - file://0017-eglibc-Cross-building-and-testing-instructions.patch \ - file://0018-eglibc-Help-bootstrap-cross-toolchain.patch \ - file://0019-eglibc-Clear-cache-lines-on-ppc8xx.patch \ - file://0020-eglibc-Resolve-__fpscr_values-on-SH4.patch \ - file://0021-eglibc-Install-PIC-archives.patch \ - file://0022-eglibc-Forward-port-cross-locale-generation-support.patch \ - file://0023-Define-DUMMY_LOCALE_T-if-not-defined.patch \ -" -# Makes for a rather long rev (22 characters), but... -# -SRCREV_FORMAT = "glibc_localedef" - -S = "${WORKDIR}/git" - -EXTRA_OECONF = "--with-glibc=${S}" -CFLAGS += "-fgnu89-inline -std=gnu99 -DIS_IN\(x\)='0'" - -do_install() { - install -d ${D}${bindir} - install -m 0755 ${B}/localedef ${D}${bindir}/cross-localedef -} diff --git a/meta/recipes-core/glibc/cross-localedef-native_2.26.bb b/meta/recipes-core/glibc/cross-localedef-native_2.26.bb new file mode 100644 index 0000000000..fc5d70dbb9 --- /dev/null +++ b/meta/recipes-core/glibc/cross-localedef-native_2.26.bb @@ -0,0 +1,51 @@ +SUMMARY = "Cross locale generation tool for glibc" +HOMEPAGE = "http://www.gnu.org/software/libc/libc.html" +SECTION = "libs" +LICENSE = "LGPL-2.1" + +LIC_FILES_CHKSUM = "file://LICENSES;md5=e9a558e243b36d3209f380deb394b213 \ + file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://posix/rxspencer/COPYRIGHT;md5=dc5485bb394a13b2332ec1c785f5d83a \ + file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c" + +# Tell autotools that we're working in the localedef directory +# +AUTOTOOLS_SCRIPT_PATH = "${S}/localedef" + +inherit native +inherit autotools + +FILESEXTRAPATHS =. "${FILE_DIRNAME}/${PN}:${FILE_DIRNAME}/glibc:" + +SRCBRANCH ?= "release/${PV}/master" +GLIBC_GIT_URI ?= "git://sourceware.org/git/glibc.git" +UPSTREAM_CHECK_GITTAGREGEX = "(?P\d+\.\d+(\.\d+)*)" + +SRCREV_glibc ?= "1c9a5c270d8b66f30dcfaf1cb2d6cf39d3e18369" +SRCREV_localedef ?= "dfb4afe551c6c6e94f9cc85417bd1f582168c843" + +SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \ + git://github.com/kraj/localedef;branch=master;name=localedef;destsuffix=git/localedef \ + file://0015-timezone-re-written-tzselect-as-posix-sh.patch \ + file://0016-Remove-bash-dependency-for-nscd-init-script.patch \ + file://0017-eglibc-Cross-building-and-testing-instructions.patch \ + file://0018-eglibc-Help-bootstrap-cross-toolchain.patch \ + file://0019-eglibc-Clear-cache-lines-on-ppc8xx.patch \ + file://0020-eglibc-Resolve-__fpscr_values-on-SH4.patch \ + file://0021-eglibc-Install-PIC-archives.patch \ + file://0022-eglibc-Forward-port-cross-locale-generation-support.patch \ + file://0023-Define-DUMMY_LOCALE_T-if-not-defined.patch \ +" +# Makes for a rather long rev (22 characters), but... +# +SRCREV_FORMAT = "glibc_localedef" + +S = "${WORKDIR}/git" + +EXTRA_OECONF = "--with-glibc=${S}" +CFLAGS += "-fgnu89-inline -std=gnu99 -DIS_IN\(x\)='0'" + +do_install() { + install -d ${D}${bindir} + install -m 0755 ${B}/localedef ${D}${bindir}/cross-localedef +} diff --git a/meta/recipes-core/glibc/glibc-initial_2.25.90.bb b/meta/recipes-core/glibc/glibc-initial_2.25.90.bb deleted file mode 100644 index e86770e12d..0000000000 --- a/meta/recipes-core/glibc/glibc-initial_2.25.90.bb +++ /dev/null @@ -1,9 +0,0 @@ -require glibc_${PV}.bb -require glibc-initial.inc - -# main glibc recipes muck with TARGET_CPPFLAGS to point into -# final target sysroot but we -# are not there when building glibc-initial -# so reset it here - -TARGET_CPPFLAGS = "" diff --git a/meta/recipes-core/glibc/glibc-initial_2.26.bb b/meta/recipes-core/glibc/glibc-initial_2.26.bb new file mode 100644 index 0000000000..e86770e12d --- /dev/null +++ b/meta/recipes-core/glibc/glibc-initial_2.26.bb @@ -0,0 +1,9 @@ +require glibc_${PV}.bb +require glibc-initial.inc + +# main glibc recipes muck with TARGET_CPPFLAGS to point into +# final target sysroot but we +# are not there when building glibc-initial +# so reset it here + +TARGET_CPPFLAGS = "" diff --git a/meta/recipes-core/glibc/glibc-locale_2.25.90.bb b/meta/recipes-core/glibc/glibc-locale_2.25.90.bb deleted file mode 100644 index f7702e0358..0000000000 --- a/meta/recipes-core/glibc/glibc-locale_2.25.90.bb +++ /dev/null @@ -1 +0,0 @@ -require glibc-locale.inc diff --git a/meta/recipes-core/glibc/glibc-locale_2.26.bb b/meta/recipes-core/glibc/glibc-locale_2.26.bb new file mode 100644 index 0000000000..f7702e0358 --- /dev/null +++ b/meta/recipes-core/glibc/glibc-locale_2.26.bb @@ -0,0 +1 @@ +require glibc-locale.inc diff --git a/meta/recipes-core/glibc/glibc-mtrace_2.25.90.bb b/meta/recipes-core/glibc/glibc-mtrace_2.25.90.bb deleted file mode 100644 index 0b69bad46a..0000000000 --- a/meta/recipes-core/glibc/glibc-mtrace_2.25.90.bb +++ /dev/null @@ -1 +0,0 @@ -require glibc-mtrace.inc diff --git a/meta/recipes-core/glibc/glibc-mtrace_2.26.bb b/meta/recipes-core/glibc/glibc-mtrace_2.26.bb new file mode 100644 index 0000000000..0b69bad46a --- /dev/null +++ b/meta/recipes-core/glibc/glibc-mtrace_2.26.bb @@ -0,0 +1 @@ +require glibc-mtrace.inc diff --git a/meta/recipes-core/glibc/glibc-scripts_2.25.90.bb b/meta/recipes-core/glibc/glibc-scripts_2.25.90.bb deleted file mode 100644 index 5a89bd8022..0000000000 --- a/meta/recipes-core/glibc/glibc-scripts_2.25.90.bb +++ /dev/null @@ -1 +0,0 @@ -require glibc-scripts.inc diff --git a/meta/recipes-core/glibc/glibc-scripts_2.26.bb b/meta/recipes-core/glibc/glibc-scripts_2.26.bb new file mode 100644 index 0000000000..5a89bd8022 --- /dev/null +++ b/meta/recipes-core/glibc/glibc-scripts_2.26.bb @@ -0,0 +1 @@ +require glibc-scripts.inc diff --git a/meta/recipes-core/glibc/glibc/0026-assert-Suppress-pedantic-warning-caused-by-statement.patch b/meta/recipes-core/glibc/glibc/0026-assert-Suppress-pedantic-warning-caused-by-statement.patch new file mode 100644 index 0000000000..b2bb96b818 --- /dev/null +++ b/meta/recipes-core/glibc/glibc/0026-assert-Suppress-pedantic-warning-caused-by-statement.patch @@ -0,0 +1,90 @@ +From 037283cbc74739b72f36dfec827d120faa243406 Mon Sep 17 00:00:00 2001 +From: Florian Weimer +Date: Thu, 6 Jul 2017 11:50:55 +0200 +Subject: [PATCH 26/26] assert: Suppress pedantic warning caused by statement + expression [BZ# 21242] + +On 07/05/2017 10:15 PM, Zack Weinberg wrote: +> On Wed, Jul 5, 2017 at 11:51 AM, Florian Weimer wrote: +>> On 07/05/2017 05:46 PM, Zack Weinberg wrote: +>>> A problem occurs to me: expressions involving VLAs _are_ evaluated +>>> inside sizeof. +>> +>> The type of the sizeof argument would still be int (due to the +>> comparison against 0), so this doesn't actually occur. +> +> I rechecked what C99 says about sizeof and VLAs, and you're right - +> the operand of sizeof is only evaluated when sizeof is _directly_ +> applied to a VLA. So this is indeed safe, but I think this wrinkle +> should be mentioned in the comment. Perhaps +> +> /* The first occurrence of EXPR is not evaluated due to the sizeof, +> but will trigger any pedantic warnings masked by the __extension__ +> for the second occurrence. The explicit comparison against zero +> ensures that sizeof is not directly applied to a function pointer or +> bit-field (which would be ill-formed) or VLA (which would be evaluated). */ +> +> zw + +What about the attached patch? + +Siddhesh, is this okay during the freeze? I'd like to backport it to +2.25 as well. + +Thanks, +Florian + +assert: Suppress pedantic warning caused by statement expression + +2017-07-06 Florian Weimer + + [BZ #21242] + * assert/assert.h [__GNUC__ && !__STRICT_ANSI__] (assert): + Suppress pedantic warning resulting from statement expression. + (__ASSERT_FUNCTION): Add missing __extendsion__. +--- + +Upstream-Status: Submitted +Signed-off-by: Khem Raj + + assert/assert.h | 12 +++++++++--- + 1 file changed, 9 insertions(+), 3 deletions(-) + +diff --git a/assert/assert.h b/assert/assert.h +index 22f019537c..6801cfeb10 100644 +--- a/assert/assert.h ++++ b/assert/assert.h +@@ -91,13 +91,19 @@ __END_DECLS + ? __ASSERT_VOID_CAST (0) \ + : __assert_fail (#expr, __FILE__, __LINE__, __ASSERT_FUNCTION)) + # else ++/* The first occurrence of EXPR is not evaluated due to the sizeof, ++ but will trigger any pedantic warnings masked by the __extension__ ++ for the second occurrence. The explicit comparison against zero is ++ required to support function pointers and bit fields in this ++ context, and to suppress the evaluation of variable length ++ arrays. */ + # define assert(expr) \ +- ({ \ ++ ((void) sizeof ((expr) == 0), __extension__ ({ \ + if (expr) \ + ; /* empty */ \ + else \ + __assert_fail (#expr, __FILE__, __LINE__, __ASSERT_FUNCTION); \ +- }) ++ })) + # endif + + # ifdef __USE_GNU +@@ -113,7 +119,7 @@ __END_DECLS + C9x has a similar variable called __func__, but prefer the GCC one since + it demangles C++ function names. */ + # if defined __cplusplus ? __GNUC_PREREQ (2, 6) : __GNUC_PREREQ (2, 4) +-# define __ASSERT_FUNCTION __PRETTY_FUNCTION__ ++# define __ASSERT_FUNCTION __extension__ __PRETTY_FUNCTION__ + # else + # if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L + # define __ASSERT_FUNCTION __func__ +-- +2.13.3 + diff --git a/meta/recipes-core/glibc/glibc_2.25.90.bb b/meta/recipes-core/glibc/glibc_2.25.90.bb deleted file mode 100644 index caf1ff4138..0000000000 --- a/meta/recipes-core/glibc/glibc_2.25.90.bb +++ /dev/null @@ -1,143 +0,0 @@ -require glibc.inc - -LIC_FILES_CHKSUM = "file://LICENSES;md5=e9a558e243b36d3209f380deb394b213 \ - file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - file://posix/rxspencer/COPYRIGHT;md5=dc5485bb394a13b2332ec1c785f5d83a \ - file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c" - -DEPENDS += "gperf-native" - -SRCREV ?= "43a9f537fc121a867981ca31ea9d79f33ce0fd24" - -#SRCBRANCH ?= "release/${PV}/master" -SRCBRANCH ?= "master" - -GLIBC_GIT_URI ?= "git://sourceware.org/git/glibc.git" -UPSTREAM_CHECK_GITTAGREGEX = "(?P\d+\.\d+(\.\d+)*)" - -SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \ - file://etc/ld.so.conf \ - file://generate-supported.mk \ - \ - ${NATIVESDKFIXES} \ - file://0005-fsl-e500-e5500-e6500-603e-fsqrt-implementation.patch \ - file://0006-readlib-Add-OECORE_KNOWN_INTERPRETER_NAMES-to-known-.patch \ - file://0007-ppc-sqrt-Fix-undefined-reference-to-__sqrt_finite.patch \ - file://0008-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch \ - file://0009-Quote-from-bug-1443-which-explains-what-the-patch-do.patch \ - file://0010-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch \ - file://0011-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch \ - file://0012-sysdeps-gnu-configure.ac-handle-correctly-libc_cv_ro.patch \ - file://0013-Add-unused-attribute.patch \ - file://0014-yes-within-the-path-sets-wrong-config-variables.patch \ - file://0015-timezone-re-written-tzselect-as-posix-sh.patch \ - file://0016-Remove-bash-dependency-for-nscd-init-script.patch \ - file://0017-eglibc-Cross-building-and-testing-instructions.patch \ - file://0018-eglibc-Help-bootstrap-cross-toolchain.patch \ - file://0019-eglibc-Clear-cache-lines-on-ppc8xx.patch \ - file://0020-eglibc-Resolve-__fpscr_values-on-SH4.patch \ - file://0021-eglibc-Install-PIC-archives.patch \ - file://0022-eglibc-Forward-port-cross-locale-generation-support.patch \ - file://0023-Define-DUMMY_LOCALE_T-if-not-defined.patch \ - file://0024-elf-dl-deps.c-Make-_dl_build_local_scope-breadth-fir.patch \ - file://0025-locale-fix-hard-coded-reference-to-gcc-E.patch \ -" - -NATIVESDKFIXES ?= "" -NATIVESDKFIXES_class-nativesdk = "\ - file://0001-nativesdk-glibc-Look-for-host-system-ld.so.cache-as-.patch \ - file://0002-nativesdk-glibc-Fix-buffer-overrun-with-a-relocated-.patch \ - file://0003-nativesdk-glibc-Raise-the-size-of-arrays-containing-.patch \ - file://0004-nativesdk-glibc-Allow-64-bit-atomics-for-x86.patch \ -" - -S = "${WORKDIR}/git" -B = "${WORKDIR}/build-${TARGET_SYS}" - -PACKAGES_DYNAMIC = "" - -# the -isystem in bitbake.conf screws up glibc do_stage -BUILD_CPPFLAGS = "-I${STAGING_INCDIR_NATIVE}" -TARGET_CPPFLAGS = "-I${STAGING_DIR_TARGET}${includedir}" - -GLIBC_BROKEN_LOCALES = "" -# -# We will skip parsing glibc when target system C library selection is not glibc -# this helps in easing out parsing for non-glibc system libraries -# -COMPATIBLE_HOST_libc-musl_class-target = "null" - -EXTRA_OECONF = "--enable-kernel=${OLDEST_KERNEL} \ - --without-cvs --disable-profile \ - --disable-debug --without-gd \ - --enable-clocale=gnu \ - --enable-add-ons=libidn \ - --with-headers=${STAGING_INCDIR} \ - --without-selinux \ - --enable-obsolete-rpc \ - --enable-obsolete-nsl \ - --enable-tunables \ - --enable-bind-now \ - --enable-stack-protector=strong \ - --enable-stackguard-randomization \ - ${GLIBC_EXTRA_OECONF}" - -EXTRA_OECONF += "${@get_libc_fpu_setting(bb, d)}" -EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'libc-inet-anl', '--enable-nscd', '--disable-nscd', d)}" - - -do_patch_append() { - bb.build.exec_func('do_fix_readlib_c', d) -} - -do_fix_readlib_c () { - sed -i -e 's#OECORE_KNOWN_INTERPRETER_NAMES#${EGLIBC_KNOWN_INTERPRETER_NAMES}#' ${S}/elf/readlib.c -} - -do_configure () { -# override this function to avoid the autoconf/automake/aclocal/autoheader -# calls for now -# don't pass CPPFLAGS into configure, since it upsets the kernel-headers -# version check and doesn't really help with anything - (cd ${S} && gnu-configize) || die "failure in running gnu-configize" - find ${S} -name "configure" | xargs touch - CPPFLAGS="" oe_runconf -} - -rpcsvc = "bootparam_prot.x nlm_prot.x rstat.x \ - yppasswd.x klm_prot.x rex.x sm_inter.x mount.x \ - rusers.x spray.x nfs_prot.x rquota.x key_prot.x" - -do_compile () { - # -Wl,-rpath-link /lib in LDFLAGS can cause breakage if another glibc is in staging - unset LDFLAGS - base_do_compile - ( - cd ${S}/sunrpc/rpcsvc - for r in ${rpcsvc}; do - h=`echo $r|sed -e's,\.x$,.h,'` - rm -f $h - ${B}/sunrpc/cross-rpcgen -h $r -o $h || bbwarn "${PN}: unable to generate header for $r" - done - ) - echo "Adjust ldd script" - if [ -n "${RTLDLIST}" ] - then - prevrtld=`cat ${B}/elf/ldd | grep "^RTLDLIST=" | sed 's#^RTLDLIST="\?\([^"]*\)"\?$#\1#'` - if [ "${prevrtld}" != "${RTLDLIST}" ] - then - sed -i ${B}/elf/ldd -e "s#^RTLDLIST=.*\$#RTLDLIST=\"${prevrtld} ${RTLDLIST}\"#" - fi - fi - -} - -# Use the host locale archive when built for nativesdk so that we don't need to -# ship a complete (100MB) locale set. -do_compile_prepend_class-nativesdk() { - echo "complocaledir=/usr/lib/locale" >> ${S}/configparms -} - -require glibc-package.inc - -BBCLASSEXTEND = "nativesdk" diff --git a/meta/recipes-core/glibc/glibc_2.26.bb b/meta/recipes-core/glibc/glibc_2.26.bb new file mode 100644 index 0000000000..d453d8f9bf --- /dev/null +++ b/meta/recipes-core/glibc/glibc_2.26.bb @@ -0,0 +1,143 @@ +require glibc.inc + +LIC_FILES_CHKSUM = "file://LICENSES;md5=e9a558e243b36d3209f380deb394b213 \ + file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://posix/rxspencer/COPYRIGHT;md5=dc5485bb394a13b2332ec1c785f5d83a \ + file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c" + +DEPENDS += "gperf-native" + +SRCREV ?= "1c9a5c270d8b66f30dcfaf1cb2d6cf39d3e18369" + +SRCBRANCH ?= "release/${PV}/master" + +GLIBC_GIT_URI ?= "git://sourceware.org/git/glibc.git" +UPSTREAM_CHECK_GITTAGREGEX = "(?P\d+\.\d+(\.\d+)*)" + +SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \ + file://etc/ld.so.conf \ + file://generate-supported.mk \ + \ + ${NATIVESDKFIXES} \ + file://0005-fsl-e500-e5500-e6500-603e-fsqrt-implementation.patch \ + file://0006-readlib-Add-OECORE_KNOWN_INTERPRETER_NAMES-to-known-.patch \ + file://0007-ppc-sqrt-Fix-undefined-reference-to-__sqrt_finite.patch \ + file://0008-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch \ + file://0009-Quote-from-bug-1443-which-explains-what-the-patch-do.patch \ + file://0010-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch \ + file://0011-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch \ + file://0012-sysdeps-gnu-configure.ac-handle-correctly-libc_cv_ro.patch \ + file://0013-Add-unused-attribute.patch \ + file://0014-yes-within-the-path-sets-wrong-config-variables.patch \ + file://0015-timezone-re-written-tzselect-as-posix-sh.patch \ + file://0016-Remove-bash-dependency-for-nscd-init-script.patch \ + file://0017-eglibc-Cross-building-and-testing-instructions.patch \ + file://0018-eglibc-Help-bootstrap-cross-toolchain.patch \ + file://0019-eglibc-Clear-cache-lines-on-ppc8xx.patch \ + file://0020-eglibc-Resolve-__fpscr_values-on-SH4.patch \ + file://0021-eglibc-Install-PIC-archives.patch \ + file://0022-eglibc-Forward-port-cross-locale-generation-support.patch \ + file://0023-Define-DUMMY_LOCALE_T-if-not-defined.patch \ + file://0024-elf-dl-deps.c-Make-_dl_build_local_scope-breadth-fir.patch \ + file://0025-locale-fix-hard-coded-reference-to-gcc-E.patch \ + file://0026-assert-Suppress-pedantic-warning-caused-by-statement.patch \ +" + +NATIVESDKFIXES ?= "" +NATIVESDKFIXES_class-nativesdk = "\ + file://0001-nativesdk-glibc-Look-for-host-system-ld.so.cache-as-.patch \ + file://0002-nativesdk-glibc-Fix-buffer-overrun-with-a-relocated-.patch \ + file://0003-nativesdk-glibc-Raise-the-size-of-arrays-containing-.patch \ + file://0004-nativesdk-glibc-Allow-64-bit-atomics-for-x86.patch \ +" + +S = "${WORKDIR}/git" +B = "${WORKDIR}/build-${TARGET_SYS}" + +PACKAGES_DYNAMIC = "" + +# the -isystem in bitbake.conf screws up glibc do_stage +BUILD_CPPFLAGS = "-I${STAGING_INCDIR_NATIVE}" +TARGET_CPPFLAGS = "-I${STAGING_DIR_TARGET}${includedir}" + +GLIBC_BROKEN_LOCALES = "" +# +# We will skip parsing glibc when target system C library selection is not glibc +# this helps in easing out parsing for non-glibc system libraries +# +COMPATIBLE_HOST_libc-musl_class-target = "null" + +EXTRA_OECONF = "--enable-kernel=${OLDEST_KERNEL} \ + --without-cvs --disable-profile \ + --disable-debug --without-gd \ + --enable-clocale=gnu \ + --enable-add-ons=libidn \ + --with-headers=${STAGING_INCDIR} \ + --without-selinux \ + --enable-obsolete-rpc \ + --enable-obsolete-nsl \ + --enable-tunables \ + --enable-bind-now \ + --enable-stack-protector=strong \ + --enable-stackguard-randomization \ + ${GLIBC_EXTRA_OECONF}" + +EXTRA_OECONF += "${@get_libc_fpu_setting(bb, d)}" +EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'libc-inet-anl', '--enable-nscd', '--disable-nscd', d)}" + + +do_patch_append() { + bb.build.exec_func('do_fix_readlib_c', d) +} + +do_fix_readlib_c () { + sed -i -e 's#OECORE_KNOWN_INTERPRETER_NAMES#${EGLIBC_KNOWN_INTERPRETER_NAMES}#' ${S}/elf/readlib.c +} + +do_configure () { +# override this function to avoid the autoconf/automake/aclocal/autoheader +# calls for now +# don't pass CPPFLAGS into configure, since it upsets the kernel-headers +# version check and doesn't really help with anything + (cd ${S} && gnu-configize) || die "failure in running gnu-configize" + find ${S} -name "configure" | xargs touch + CPPFLAGS="" oe_runconf +} + +rpcsvc = "bootparam_prot.x nlm_prot.x rstat.x \ + yppasswd.x klm_prot.x rex.x sm_inter.x mount.x \ + rusers.x spray.x nfs_prot.x rquota.x key_prot.x" + +do_compile () { + # -Wl,-rpath-link /lib in LDFLAGS can cause breakage if another glibc is in staging + unset LDFLAGS + base_do_compile + ( + cd ${S}/sunrpc/rpcsvc + for r in ${rpcsvc}; do + h=`echo $r|sed -e's,\.x$,.h,'` + rm -f $h + ${B}/sunrpc/cross-rpcgen -h $r -o $h || bbwarn "${PN}: unable to generate header for $r" + done + ) + echo "Adjust ldd script" + if [ -n "${RTLDLIST}" ] + then + prevrtld=`cat ${B}/elf/ldd | grep "^RTLDLIST=" | sed 's#^RTLDLIST="\?\([^"]*\)"\?$#\1#'` + if [ "${prevrtld}" != "${RTLDLIST}" ] + then + sed -i ${B}/elf/ldd -e "s#^RTLDLIST=.*\$#RTLDLIST=\"${prevrtld} ${RTLDLIST}\"#" + fi + fi + +} + +# Use the host locale archive when built for nativesdk so that we don't need to +# ship a complete (100MB) locale set. +do_compile_prepend_class-nativesdk() { + echo "complocaledir=/usr/lib/locale" >> ${S}/configparms +} + +require glibc-package.inc + +BBCLASSEXTEND = "nativesdk" -- cgit 1.2.3-korg