summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/glibc
AgeCommit message (Collapse)Author
2020-07-22glibc: whitelist CVE-2010-10029akuster
The update via Commit https://git.openembedded.org/openembedded-core/commit/meta/recipes-core/glibc?id=2c7e0e0bf32eb1ed0b7d8acddb16c0d1e93f2aa1 should have added the whitelist for this CVE removed (From OE-Core rev: e8de5271aeebd151b3fbe47d47a1c5f6969320e7) Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 213ac2d345ec6d4ef0daf7a7d8237038a914c491) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-06-23glibc: Update to latest on 2.31 branchKhem Raj
There are few fixes specifically for compiling with gcc10 that are good to have, before hitting them later Backport build fix from master for aarch64 with gcc10 Drop CVE-2020-10029 patch its already applied on latest 2.31 branch latest glibc 2.31 added fix for __getauxval/aarch64 issue (From OE-Core rev: 04e5d5f5a4318c826768146f5cd5de03fd152550) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 2c7e0e0bf32eb1ed0b7d8acddb16c0d1e93f2aa1) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-03-29glibc: Backport patch to fix ifuncs on risc-v and gcc10 buildsKhem Raj
ifunc patch is needed to address a glibc ptests failure on riscv long double double patch is backported to let 2.31 build with gcc10 (From OE-Core rev: 5ab732a1a1c57bc9f9a5e71230eccee217110ade) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-03-11glibc: Update nativesdk locale relocation patchRichard Purdie
The locale binary reported incorrect locale lists in relocated toolchains as some path references were not relocated by this patch. Fix this missing relocations so the locale binary correctly reports the locales. (From OE-Core rev: f7a6a72880009380ae81bc7fc863921a26811c8c) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-03-10glibc: CVE-2020-10029Zhixiong Chi
Backport the CVE patch from upstream: [https://sourceware.org/git/gitweb.cgi?p=glibc.git; a=patch;h=9333498794cde1d5cca518badf79533a24114b6f] (From OE-Core rev: bc0b66c584116635940364fdc2740b8b6ce3d384) Signed-off-by: Zhixiong Chi <zhixiong.chi@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-03-08glibc: Explicitly disable msgfmtRichard Purdie
If configure is rerun it finds msgfmt from gettext-native which is installed during package_write_ipk|deb and means builds are not determinisic. Whether msgfmt is needed is debatable (libc.mo files aren't generated without it), however, we should at least be consistent which this patch ensures. (From OE-Core rev: 9ffd08cf7d472e6572ee8f04781f410c9d657188) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-03-01glibc: Syscall fixes for mips/risc-v/mucroblazeKhem Raj
Should fix the mips make 4.3 issue on target Changes in this delta * 71f2b249a2 malloc/tst-mallocfork2: Kill lingering process for unexpected failures * 5d31b083e4 riscv: Avoid clobbering register parameters in syscall * f4f8843515 microblaze: Avoid clobbering register parameters in syscall * aa638b86b2 mips: Fix argument passing for inlined syscalls on Linux [BZ #25523] * ae1b6b13d4 mips: Use 'long int' and 'long long int' in linux syscall code (From OE-Core rev: 79b23077288dd557842f987e558262d7d8522e25) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-02-18glibc-package.inc: fix multilib headers conflictKai Kang
Pass bits/endianness.h and bits/struct_rwlock.h to oe_multilib_header in glibc-package.inc to fix files conflict: | Error: Transaction check error: | file /usr/include/bits/endianness.h conflicts between attempted installs of lib32-libc6-dev-2.31-r0.armv7vet2hf_vfp and libc6-dev-2.31-r0.aarch64 | file /usr/include/bits/struct_rwlock.h conflicts between attempted installs of lib32-libc6-dev-2.31-r0.armv7vet2hf_vfp and libc6-dev-2.31-r0.aarch64 (From OE-Core rev: 0af9ff84348197b8b314f7c0d3757cab629daa94) Signed-off-by: Kai Kang <kai.kang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-02-15glibc-testsuite: Exclude this recipe from world buildsNathan Rossi
This recipe is intended to be run manually or via oeqa. [YOCTO #13737] (From OE-Core rev: eadbe01bb8232de79e0827e6c6b3411f69ea7303) Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-02-15glibc-testsuite: Remove the do_install taskNathan Rossi
This task is not intended to be run as this recipe does not produce any packages or install any sysroot content. Additionally running this task behaves differently from a normal glibc build, and can result in issues. [YOCTO #13737] (From OE-Core rev: 2b51252cb8bd9badfa28794f9ef9431b48752e3d) Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-02-04glibc: don't ignore global LDFLAGS settingsRasmus Villemoes
Two things: The -Wl,-rpath-link comment is stale (due to per-recipe staging), so we no longer need to set our own LDFLAGS to avoid -Wl,-rpath-link being in there. Second, overriding LDFLAGS should be done at the recipe level so "bitbake -e" can show what is going on. Otherwise debugging why one's global LDFLAGS tweaks are being ignored is needlessly painful. So pull out the LDFLAGS setting from do_compile, and change it to an append instead of assignment. For the benefit of future git blame: the -fuse-ld=bfd setting was added by ac64c3b96b (glibc: always use bfd linker). (From OE-Core rev: 4535469d5953b94c9dcad5515be9b807ea7ba621) Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-02-02glibc: Update to final 2.31 releaseKhem Raj
(From OE-Core rev: b0df2fcb26cb1b2b48e8f66cfcbfd351a7737099) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-02-02glibc: merge libc-common.bbclass into glibc.bbRoss Burton
There's only one user of libc-common now that we don't ship both glibc and eglibc, so copy the contents directly into the recipe. [ YOCTO #12135 ] (From OE-Core rev: a0bff0db1eeb128776757d5f3d0bc1ebdc135498) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-02-02glibc-package.inc: Remove warnings about unpacked directoriesRichard Purdie
If documemtation generation is disabled, the recipe throws warnings about unpackaged files. Avoid this. (From OE-Core rev: 811a5b1b4d4da97caaca2779c8aa5687cbf0c609) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-01-27glibc: Drop fortify refactoring patchKhem Raj
This helps clang to do a better job with fortify on but it is better suited for clang layer (From OE-Core rev: c4ea8d76db37f21c034d610bfe4e53596e662bb8) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-01-27glibc: Update to final 2.31 releaseKhem Raj
Drop ppc 8xx clear cache optimization, which we have been carrying through eglibc days, it has been redone in glibc now (From OE-Core rev: 5c48e655cbd9a45d43c37602db8e09e2e91d2722) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-01-19glibc: Upgrade to 2.31Khem Raj
License-Update: Prefer https to http for gnu.org and fsf.org URLs [1] [1] https://sourceware.org/git/?p=glibc.git;a=commit;h=5a82c74822d3272df2f5929133680478c0cfb4bd (From OE-Core rev: b22626d996e153d6094e1f76ed33ee1bb3eea751) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-12-28cross-localedef: Re-arrange patchesKhem Raj
Patches are currently, crossing across repo boundaries, between glibc and localedef, therefore it is better to divide the patches accordiningly, with this patchset makery patch is spun out since that applies to localedef alone. There are no other code changes (From OE-Core rev: 85b86bc810dcde3357d681ca8043883f2f4fdba0) Signed-off-by: Khem Raj <raj.khem@gmail.com> Cc: Jason Wessel <jason.wessel@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-12-06glibc: fix ldconfig packaging issueMing Liu
ldconfig should be prior to glibc-utils in PACKAGES variable, or else ldconfig binary would not be split to its own package, hence will lead to runtime issues for the packages that depending on ldconfig, like systemd. (From OE-Core rev: 5101aecacfb5a8e48bba74b538742bef9409b999) Signed-off-by: Ming Liu <liu.ming50@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-12-06glibc-testing.inc: Remove testglibc script generationNathan Rossi
Remove the generation of the testglibc script which could be used to run the glibc test suite with a remote target. The same functionality can now be achieved with the 'do_check' task of glibc-testsuite or with oe-selftest (for automation of execution against qemu-user/qemu-system targets). (From OE-Core rev: 6d6fb46631d7d551cc2de48b51172cfcf36e8dd3) Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-29glibc: fix CVE-2019-19126Anuj Mittal
Backport from 2.30 stable branch and drop NEWS section. (From OE-Core rev: b4d4f70380c100d8ab06557237d8d5649a885e30) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-21distro_features_check: expand with MACHINE_FEATURES and COMBINED_FEATURES, ↵Denys Dmytriyenko
rename Besides checking DISTRO_FEATURES for required or conflicting features, being able to check MACHINE_FEATURES and/or COMBINED_FEATURES may also be useful at times. Temporarily support the old class name with a warning about future deprecation. (From OE-Core rev: 5f4875b950ce199e91f99c8e945a0c709166dc14) Signed-off-by: Denys Dmytriyenko <denys@ti.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-11glibc: move ldconfig to its own packageAndreas Oberritter
Only recommend its installation, if it's enabled in distro features. (From OE-Core rev: fda7cd9328ba26e0023d7ddfaa23f73b59443a08) Signed-off-by: Andreas Oberritter <obi@opendreambox.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-19glibc: Make it build without ldconfig in DISTRO_FEATURESPeter Kjellerstedt
The removal of the supposedly empty /etc when ldconfig is not in DISTRO_FEATURES seems to be a remnant from a long time ago when nothing else was installed in /etc. However, that is no longer the case as, e.g., nscd.conf is always installed to /etc now. (From OE-Core rev: f66c02130d11154088d86c96fedd88e9d2bca723) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-16glibc: Move DISTRO_FEATURE specific do_install code for target recipe onlyKhem Raj
nativesdk-glibc should be spared of recompile when the distro features are changed e.g. ldconfig is not in DISTRO_FEATURES, this happens when sdk with musl and another one with glibc is built Fixes Variable do_install value changed: ... -DISTRO_FEATURES{ldconfig} = Set +DISTRO_FEATURES{ldconfig} = Unset (From OE-Core rev: e7af0204e6051489ef5646fbca2509a42e04bb72) Signed-off-by: Khem Raj <raj.khem@gmail.com> s Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-16glibc-testsuite: SkipRecipe if libc is not glibcNathan Rossi
To prevent issues with parsing or dependencies, limit this recipe to use only when the libc is glibc (and libc-locale is glibc-locale). (From OE-Core rev: 88849a0652f1a9cffd5c1b5caae2878b3a438273) Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-06binutils/glibc-testsuite: inherit nopackages to fix world buildsRichard Purdie
These recipes don't need to generate packages but did contain the packaging tasks which would be triggered by a world build. They showed warnings or errors. Simplest fix is to remove the unneeded tasks with the nopackages class. Also don't attempt stash_locales task (From OE-Core rev: a34420e1bdb9a695fe7abd3b26426d7ae6113349) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-06glibc-testsuite: Create a recipe to implement glibc test suiteNathan Rossi
A recipe needs to be created for the test suite due to the dependency chain between libgcc -> glibc -> libgcc-initial, and the requirements of the test suite to have libgcc for compilation and execution. The glibc test suite does not use dejagnu like the gcc test suites do. Instead a test wrapper script is used along with the assumed dependency of having the same filesystem available on build host and target. For qemu linux-user the same filesystem is inherently available, for remote targets NFS is used. Separate test wrapper scripts are created for qemu linux-user or ssh targets, with the same TOOLCHAIN_TEST_* variables used for configuration. (From OE-Core rev: 6c4d581c35ebd51c4b080ac38175d93f0480f97d) Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-06Clean up remnants of glibc-initialNathan Rossi
Remove remnants of the glibc-initial recipe. (From OE-Core rev: 332b1e21db3e0cbeeb14f12dd6aeedb89b76d761) Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-21cross-localedef-native: Add hardlink resolver from util-linuxJason Wessel
The hard link resolver that is built into localedef cannot be run in parallel. It will search sibling directories (which are be processed in parallel) and perform a creation of a .tmp file and remove the original and move the .tmp file in. The problem is that if a probe occurs a hard link can be requested to the file that is being removed. This will lead to a stray copy or potentially, on a loaded system cause race condition which pseudo cannot deal with, where it is left with a hard link request to a file that no longer exists. In this situation psuedo will inherit the permissions of what ever the target inode had to offer. In short, there are two problems: 1) You will be left with stray copies when using the hard link resolution that is built in while running in parallel with localedef. 2) When running under pseudo the possibility exists for uid/gid leakage when the source file is removed before the hard link can be completed. The solution is to call localedef with --no-hard-links and separately process the hardlinks at a later point. To do this requires the inclusion of the hardlink utility found in modern versions of util-linux. Most host systems do not have this, so it will be included with the cross-localedef binary. There are two patches here. The first imports the raw version of hardlink.c and a couple of header files directly from util-linux. The second patch applies the fix-ups to make it compile, along with a change to recipe to package the new binary. [YOCTO #11299] [YOCTO #12434] (From OE-Core rev: 57e2e498ffb675d274aa95b10c14bd81742d2761) Signed-off-by: Jason Wessel <jason.wessel@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-07glibc-package.inc: Add linux-libc-headers-dev to glibc-devMark Hatle
Without linux-libc-headers-dev being added to the libc6-dev as a RDEPENDS, the system may fail to install the necessary libc headers. This can happen when NO_RECOMMENDATIONS = "1" is defined. During the 'testsdk' this results in failures that look like: fatal error: linux/errno.h: No such file or directory # include <linux/errno.h> ^~~~~~~~~~~~~~~ This also matches the behavior of musl, which does not suffer from this problem. (From OE-Core rev: ad31c908c8267166ce6cce9d5085ef2ac099a6c5) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-07glibc: Update to glibc 2.30Khem Raj
- Drop backported patches - Move common pieces between cross-localedef and glibc into a common file - Move latest checksums to glibc-common.inc and remove duplicates from glibc recipe - Detailed release notes [1] [1] https://sourceware.org/ml/libc-alpha/2019-08/msg00029.html (From OE-Core rev: fe75808dca4bb56ac703d18ebbad4004678f69da) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-07-19glibc: CVE-2018-20796 is same as CVE-2019-9169Anuj Mittal
See: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=34141 https://www.securityfocus.com/bid/107160 (From OE-Core rev: 7e90506534ed2a70680382cf28614f02fdb98409) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-07-17glibc: exclude child recipes from CVE scanningRoss Burton
As glibc will be scanned for CVEs, we don't need to scan glibc-locale, glibc-mtrace, and glibc-scripts which are all separate recipes for technical reasons. Exclude the recipes by setting CVE_PRODUCT in the recipe, instead of using the global whitelist. (From OE-Core rev: 1f9a963b9ff7ebe052ba54b9fcbdf7d09478dd17) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-07-15glibc-package.inc: Do not use bitbake variable syntax for shell variablesPeter Kjellerstedt
Using bitbake variable syntax (i.e., ${FOO}) for shell variables is bad practice. First of all it is confusing, but more importantly it can lead to weird problems if someone actually defines a bitbake variable with the same name as the shell variable. Also correct the indentation in stash_locale_cleanup(). (From OE-Core rev: 4e303063db731feae192314bab2ca16d26192dbb) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-07-10glibc / glibc-locale: Fix stash_locale determinism problemsJason Wessel
When using sstate, or performing an incremental build any change to the do_stash_locale() will cause a build failure because do_stash_locale() was destroying the results obtained from the do_install() with several mv operations. A recent change to do_stash_locale() for a different problem illustrated a number of build failures for users in the community. To fix the problem, do_stash_locale() must use copy operations instead of the mv operations. Because this is changed to a copy, the sysroot and package stage need to remove the files that would have been previously removed. The correct "fixup" code to deal with the removal already existed in the previous do_poststash_install_cleanup(). All that needed change was the path to where to remove the files from the sysroot and package stages. In order to force a re-compilation of glibc some unused white space was removed from do_compile() for glibc. I could not find any other way around this and we don't want to have all the community folks to have another iteration where they have to remove their tmp directories or purge some portion of the sstate. It also makes this change bisectable. If the change to the glibc is not included, it will fail with the following message: ===== | DEBUG: Executing shell function do_prep_locale_tree | tar: i18n: Cannot stat: No such file or directory | tar: Exiting with failure status due to previous errors | gzip: /poky/build/tmp/work/core2-64-poky-linux/glibc-locale/2.29-r0/locale-tree//usr/share/i18n/charmaps/*gz.gz: No such file or directory ===== After this one time change I tested changing only the do_stash_locale() function and it now works well because it is deterministically operating off the sstate data or a local build. (From OE-Core rev: fedc57a41a15bca1d96d14e25e2df0bb1eca904d) Signed-off-by: Jason Wessel <jason.wessel@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-07-03glibc/glibc-locale: Fix do_stash_locale to work with usrmerge and multilibsJason Wessel
The do_stash_locale was not working consistently across the 4 build configurations and the multilib, usrmerge configuration would fail entirely with the obscure message: | DEBUG: Executing shell function do_prep_locale_tree | tar: i18n: Cannot stat: No such file or directory | tar: Exiting with failure status due to previous errors | gzip: /poky/build/tmp/work/core2-64-poky-linux/glibc-locale/2.29-r0/locale-tree//usr/share/i18n/charmaps/*gz.gz: No such file or directory | WARNING: /poky/build/tmp/work/core2-64-poky-linux/glibc-locale/2.29-r0/temp/run.do_prep_locale_tree.124690:1 exit 1 from 'gunzip $i' Here is the 4 build configurations without the patch applied: A) x86-64 no multilibs, no usrmerge find ./tmp/work/*/glibc/2.29-r0/stashed-locale -type f |grep -v nscd.service |wc -l 909 B) x86-64 no multilibs, usrmerge find ./tmp/work/*/glibc/2.29-r0/stashed-locale -type f |grep -v nscd.service |wc -l 909 C) x86-64 multilibs, no usrmerge find ./tmp/work/*/glibc/2.29-r0/stashed-locale -type f |grep -v nscd.service |wc -l 885 D) x86-64 multilibs, usrmerge find ./tmp/work/*/glibc/2.29-r0/stashed-locale -type f |grep -v nscd.service |wc -l 864 The issue here is that all the moves should be processed first, then a copy should be made of the lib directories, but only in the case they are different when using the usrmerge feature. Even though the build worked for the multilib configuration without usrmerge, the content was not the same. After applying the patch the same number of files are in all the configurations. The list of files was also diffed, after normalizing the directory names to ensure all the correct files were copied. Ultimately there are probably additional files that should be pruned from what is copied to the stated_locale, but the purpose of this patch is make it 100% consistent between the build types and fix the builds. (From OE-Core rev: 33c2e7b4944af22ca47b53d1f85d03426f169bb7) Signed-off-by: Jason Wessel <jason.wessel@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-07-03glibc-locale: Fix build error with PACKAGE_NO_GCONV = "1"Jason Wessel
When the PACKAGE_NO_GCONV is set to 1 an empty directory is left behind from the do_install rule: ===== ERROR: glibc-locale-2.29-r0 do_package: QA Issue: glibc-locale: Files/directories were installed but not shipped in any package: /usr/lib /usr/lib/locale Please set FILES such that these items are packaged. Alternatively if they are unneeded, avoid installing them or delete them within do_install. glibc-locale: 2 installed and not shipped files. [installed-vs-shipped] ERROR: glibc-locale-2.29-r0 do_package: Fatal QA errors found, failing task. ===== The simple fix is to prune the empty directory. (From OE-Core rev: 4b3c5ec80e696fc2c7ce7ceba118095f9b8f6439) Signed-off-by: Jason Wessel <jason.wessel@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-06-30glibc: Fix multilibs + usrmerge buildsJason Wessel
The build of glibc fails when you have multilibs enabled + the distro feature usrmerge. Here is an example configuration: === MACHINE = "qemux86-64" VIRTUAL-RUNTIME_init_manager = "systemd" DISTRO_FEATURES_append = " systemd " DISTRO_FEATURES_append += " usrmerge" require conf/multilib.conf MULTILIBS = "multilib:lib32" DEFAULTTUNE_virtclass-multilib-lib32 = "x86" === This will fail with the following error: NOTE: Executing SetScene Tasks NOTE: Executing RunQueue Tasks ERROR: glibc-2.28-r0 do_poststash_install_cleanup: Function failed: do_poststash_install_cleanup (log file is located at /poky/build/tmp/work/core2-64-poky-linux/glibc/2.28-r0/temp/log.do_poststash_install_cleanup.107893) ERROR: Logfile of failure stored in: /poky/build/tmp/work/core2-64-poky-linux/glibc/2.28-r0/temp/log.do_poststash_install_cleanup.107893 The fix is to not perform the rmdir check when using the multilib + usr/merge, namely: if [ "${libdir}" != "${exec_prefix}/lib" ] && [ "${root_prefix}/lib" != "${exec_prefix}/lib" ]; then This will evaluate as follows (collecting the output from bitbake -e glibc) * no multilibs no usrmerge if [ "/usr/lib" != "/usr/lib" ] && [ "/lib" != "/usr/lib" ]; then * no multilibs yes usrmerge if [ "/usr/lib" != "/usr/lib" ] && [ "/usr/lib" != "/usr/lib" ]; then * yes multilibs no usrmerge if [ "/usr/lib64" != "/usr/lib" ] && [ "/lib" != "/usr/lib" ]; then * yes multilibs yes user merge if [ "/usr/lib64" != "/usr/lib" ] && [ "/usr/lib" != "/usr/lib" ]; then (From OE-Core rev: c5640f8c8663c8f81125bf7c5bc2ef8e9fe55315) Signed-off-by: Jason Wessel <jason.wessel@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-05-31glibc-locale: DEPEND on virtual/libcJoshua Watt
The restriction against glibc-locale depending on virtual/libc is removed now that libc-initial no longer exists. Adding the DEPENDS on virtual/libc fixes a race (and reproducibility issue) where the packages created by this recipe would have different runtime dependencies depending on if libc had generated its packages yet or not. (From OE-Core rev: 75539cb23073596a9f13446dd6f3921755d7fb53) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-04-26glibc: always use bfd linkerMartin Jansa
* Work around broken ld-2.29.so when gold is used causing qemu-arm to segfault during e.g. gobject-introspection or postinst at do_rootfs time, more details in: http://lists.openembedded.org/pipermail/openembedded-devel/2019-March/198937.html https://sourceware.org/bugzilla/show_bug.cgi?id=24148 https://sourceware.org/bugzilla/show_bug.cgi?id=10937 https://sourceware.org/bugzilla/show_bug.cgi?id=18103 (From OE-Core rev: ac64c3b96bdff0b61bb5247fcd2d7ef4be881c09) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-03-24glibc: fix CVE-2019-9169Ross Burton
(From OE-Core rev: 966213b3c99d428f2afba3ad3d88189669005eb6) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-03-18glibc: fix do_populate_sdk fail when multilib usedChangqing Li
fix below error: file /usr/include/bits/procfs-id.h conflicts between attempted installs of lib32-libc6-dev-2.29-r0.armv7vet2hf_vfp and libc6-dev-2.29-r0.aarch64 file /usr/include/bits/procfs.h conflicts between attempted installs of lib32-libc6-dev-2.29-r0.armv7vet2hf_vfp and libc6-dev-2.29-r0.aarch64 file /usr/include/bits/shmlba.h conflicts between attempted installs of lib32-libc6-dev-2.29-r0.armv7vet2hf_vfp and libc6-dev-2.29-r0.aarch64 (From OE-Core rev: 1e9120096da81171e9213b0b78df0aff7002de15) Signed-off-by: Changqing Li <changqing.li@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-03-06glibc: Drop upstream rejected patchesKhem Raj
These patches were applied, hoping that they will eventually be accepted upstream but they have been rejected, I think its best that they are dropped so we can avoid novel unintended behaviours that no other distros will be seeing (From OE-Core rev: 54550aa42378ce4b215bccbfd95e5e650b0d2efa) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-03-02glibc: Disable Werror when building with debug optionsKhem Raj
Since compiler does not optimize away a lot of stuff we end up with Werrors e.g. ./sysdeps/ieee754/flt-32/s_log1pf.c: In function '__log1pf': ../sysdeps/ieee754/flt-32/s_log1pf.c:114:22: error: 'c' may be used uninitialized in this function [-Werror=maybe-uninitialized] 114 | + (k * ln2_lo + c))) - f); | ~~~~~~~~~~~~^~~~ which otherwise wont happen, so lets build with warnings-as-errors disabled in debug mode given we disable werror, now we don't have to restrict user to compile without -O0 (From OE-Core rev: 9772eaafc1cb5957661d43e8f76c6f9b07b854dc) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-02-28glibc: Move common bits to glibc-common.incKhem Raj
We have been duplicating few variables in glibc recipes which could actually be defined once, therefore move them to glibc-common.inc which is included by all glibc family of recipes (From OE-Core rev: 41093cb6c6d5edccebf41e62ed537779b1ee47bf) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-02-28default-distrovars: Drop DISTRO_FEATURES_LIBCKhem Raj
After eglibc was merged into glibc, Kconfig support was also dropped so these libc features therefore are not effective anymore and can be removed (From OE-Core rev: c62b1cc06613a4cdddf53290e6203559f43fc62d) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-02-26glibc: Install AArch64 loader link correctly for usrmerge+multilibMike Crowe
The AArch64 little-endian ABI requires that the dynamic loader is always available at /lib/ld-linux-aarch64.so.1. Similarly, the big-endian ABI requires that the dynamic loader is always available at /lib/ld-linux-aarch64_be.so.1. glibc-package.inc contains code that tries to ensure this, but unfortunately it is defeated by the combination of multilib and usrmerge because it does not take into account that /lib is the same as /usr/lib with usrmerge when it adds the loader path to libc_baselibs and when it attempts to show that /usr/lib is empty in do_poststash_install_cleanup. This results in the symlink not being included in the package and a build failure due to rmdir failing. Richard Purdie also suggested[1] that ${nonarch_base_libdir} should not be used as a synonym for /lib in this case. This hopefully-fixed version always sets ARCH_DYNAMIC_LOADER and then uses ${root_prefix}/lib/${ARCH_DYNAMIC_LOADER} to refer to the dynamic loader which works with both multilib and usrmerge. Since ARCH_DYNAMIC_LOADER is only non-empty if the symlink is required, the code to create it can move to do_install_append. Then do_poststash_install_cleanup needs to be taught that ${exec_prefix}/lib may not be empty if the dynamic loader symlink is there. It appears not to be possible to specify the name of the loader via a variable with an override, since the _aarch64 override is applied even for _aarch64-be, so I've set the loader name using ${TARGET_ARCH} instead. Build-tested and inspected core-image-minimal rootfs with: * AArch64 no multilib (real loader in correct place) MACHINE = "qemuarm64" * AArch64 multilib (symlink in correct place) MACHINE = "qemuarm64" MULTILIBS = "multilib:lib32" DEFAULTTUNE_virtclass-multilib-lib32 = "armv7at-neon" require conf/multilib.conf * AArch64 usrmerge (real loader in correct place) DISTRO_FEATURES += "usrmerge" MACHINE = "qemuarm64" * AArch64 multilib usrmerge (symlink in correct place) DISTRO_FEATURES += "usrmerge" MACHINE = "qemuarm64" MULTILIBS = "multilib:lib32" DEFAULTTUNE_virtclass-multilib-lib32 = "armv7at-neon" require conf/multilib.conf * big-endian versions of all of the above by also setting DEFAULTTUNE = "aarch64_be". (building glibc only.) * x86_64 (real loader in /lib as before)[2] MACHINE = "qemux86" * x86_64 multilib (real loader in /lib64 as before) MACHINE="qemux86-64" MULTILIBS = "multilib:lib32" DEFAULTTUNE_virtclass-multilib-lib32 = "x86" require conf/multilib.conf I also tested leaving an unwanted file in ${exec_prefix}/lib for do_poststash_install_cleanup to detect, and I believe the detection always worked correctly. [1] http://lists.openembedded.org/pipermail/openembedded-core/2018-November/276120.html (From OE-Core rev: a705c0782c863ee960d65b5109168a4587a0a7b7) Signed-off-by: Mike Crowe <mac@mcrowe.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-02-26glibc: Remove ChangeLog diff from patchAlistair Francis
To avoid conflicts with other forks of glibc remove the diff from the ChangeLog. (From OE-Core rev: 695d79af1edcc76a01055b01922f0d106c8291ca) Signed-off-by: Alistair Francis <alistair.francis@wdc.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-02-20glibc: CVE-2019-7309Zhixiong Chi
Backport the CVE patch from the upstream commit 3f635fb43389b54f682fc9ed2acc0b2aaf4a923d (From OE-Core rev: 518be39ac82593c539144ac83acc459a45b7a81d) Signed-off-by: Zhixiong Chi <zhixiong.chi@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>