summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/glibc
Commit message (Collapse)AuthorAgeFilesLines
* glibc: do_stash_locale must not delete files from ${D}Richard Purdie2020-10-151-1/+0
| | | | | | | | | | | | | | do_stash_locale doesn't run in fakeroot context, do_install does. We therefore shouldn't delete files that do_install has added or it leaves potentially problemtic entries in the fakeroot database. Leaving the files around doesn't change or break anything else. (From OE-Core rev: 7325222ce0dc8a75bc2d3eb7b6049f0d995ce17f) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit f18817f5340d06f7b4bb846a83b48731a1b9c4bc) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* glibc: Bring in CVE fixes and other bugfixes from 2.31 release branchKhem Raj2020-08-215-342/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Drop 0016-Add-unused-attribute.patch since its fixed by Rewrite iconv option parsing [BZ #19519] [1] Upgrade to latest on 2.31 branch which brings following bug fixes * 6fdf971c9db (origin/release/2.31/master) Add NEWS entry for CVE-2016-10228 (bug 19519) * 70d585151c0 Rewrite iconv option parsing [BZ #19519] * 1c8efe848bf powerpc: Fix incorrect cache line size load in memset (bug 26332) * 7611339a9b5 nptl: Zero-extend arguments to SETXID syscalls [BZ #26248] * 21b760cc2fa Disable warnings due to deprecated libselinux symbols used by nss and nscd * 6f3459f9859 Add NEWS entry for CVE-2020-6096 (bug 25620) * 64246fccafc arm: CVE-2020-6096: Fix multiarch memcpy for negative length [BZ #25620] * 9bbd2b61729 arm: CVE-2020-6096: fix memcpy and memmove for negative length [BZ #25620] * 4e8a33a9590 NEWS: Mention BZ 25933 fix * fd15ba932d2 Fix avx2 strncmp offset compare condition check [BZ #25933] * 3a44844c97a nss_compat: internal_end*ent may clobber errno, hiding ERANGE [BZ #25976] * c8391752678 aarch64: fix strcpy and strnlen for big-endian [BZ #25824] * 10947412240 aarch64: Accept PLT calls to __getauxval within libc.so * a98b8b221cf NEWS: Mention fixes for BZ 25810/25896/25902/25966 * 4c833bbebe3 x86-64: Use RDX_LP on __x86_shared_non_temporal_threshold [BZ #25966] * 3b9ceb33204 NEWS: Mention bug 25639 fixed in 2.31 branch * bb44fe7711a oc_FR locale: Fix spelling of April (bug 25639) * f2ac7920474 oc_FR locale: Fix spelling of Thursday (bug 25639) * 18fdba553dd Add a C wrapper for prctl [BZ #25896] * 7c9e054afdd powerpc: Rename argN to _argN in LOADARGS_N [BZ #25902] * 9c5ae39a644 Add C wrappers for process_vm_readv/process_vm_writev [BZ #25810] * 63c3696a4ac Mark unsigned long arguments with U in more syscalls [BZ #25810] * 5b9d49293b7 Add a syscall test for [BZ #25810] * 496b5963a75 Add SYSCALL_ULONG_ARG_[12] to pass long to syscall [BZ #25810] * 04330f85263 x32: Properly pass long to syscall [BZ #25810] * de371d1581f Fix build with GCC 10 when long double = double. * ece4e11d55d Add new file missed in previous hppa commit. * 91b909315c4 Fix data race in setting function descriptors during lazy binding on hppa. * b999c0098ae nios2: delete sysdeps/unix/sysv/linux/nios2/kernel-features.h * 54ba2541b3a mips: Fix bracktrace result for signal frames * 83d3eec6728 stdlib: Move tst-system to tests-container * ad9b0037ccc support/shell-container.c: Add builtin kill * 2448ba1d724 support/shell-container.c: Add builtin exit * 5810e6d75ff support/shell-container.c: Return 127 if execve fails * d39fb022c26 Add NEWS entry for CVE-2020-1751 (bug 25423) * 46bbbd46223 posix: Fix system error return value [BZ #25715] * 3937f6806d9 Add NEWS entry for CVE-2020-1752 (bug 25414) * ab029a2801d Fix use-after-free in glob when expanding ~user (bug 25414) * a3189fb15b4 Update syscall lists for Linux 5.5. * 05c08d5aea9 NEWS: update list of bugs fixed on the 2.31 branch * 123d48b33a5 Add NEWS entry for CVE-2020-10029 (bug 25487) * 03f44ce0938 math/test-sinl-pseudo: Use stack protector only if available * e85a88e00c1 sparc: Move sigreturn stub to assembly * a9ae2062d57 arm: Fix softp-fp Implies (BZ #25635) * da6ce60e3cb linux/sysipc: Include linux/posix_types.h for __kernel_mode_t * 9db2970506c linux: Clear mode_t padding bits (BZ#25623) * 44f2c26ee4f i386: Use comdat instead of .gnu.linkonce for i386 setup pic register (BZ #20543) * f2d95cf030f Improve IFUNC check [BZ #25506] * 9f997ceca28 Avoid ldbl-96 stack corruption from range reduction of pseudo-zero (bug 25487). [1] https://sourceware.org/git/?p=glibc.git;a=commit;h=70d585151c03ede999bd2ad5a724243914cb5f54 (From OE-Core rev: e03433fd52af298a4b177f36314728f916dd1ac2) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* glibc: Secruity fix for CVE-2020-6096Armin Kuster2020-07-313-0/+308
| | | | | | | | | | | | | | | | | Source: glibc.org MR: 104799 Type: Security Fix Disposition: Backport from beea361050728138b82c57dda0c4810402d342b9 ChangeID: 29df826fb697fdd2742c3bace33388bda962c5f1 Description: (From OE-Core rev: 7ce425fa1295a9dca48f8474be58db3ac8aa540d) Signed-off-by: Armin Kuster <akuster@gmvista.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit ffa4fa35e1f6132b19788166a2b87517d9e17d95) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* glibc: whitelist CVE-2010-10029akuster2020-07-221-0/+2
| | | | | | | | | | | | | | 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>
* glibc: Update to latest on 2.31 branchKhem Raj2020-06-235-349/+1
| | | | | | | | | | | | | | | | | | | 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>
* glibc: Backport patch to fix ifuncs on risc-v and gcc10 buildsKhem Raj2020-03-293-0/+219
| | | | | | | | | | 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>
* glibc: Update nativesdk locale relocation patchRichard Purdie2020-03-111-15/+47
| | | | | | | | | | 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>
* glibc: CVE-2020-10029Zhixiong Chi2020-03-102-0/+129
| | | | | | | | | | | 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>
* glibc: Explicitly disable msgfmtRichard Purdie2020-03-081-0/+3
| | | | | | | | | | | | 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>
* glibc: Syscall fixes for mips/risc-v/mucroblazeKhem Raj2020-03-011-2/+2
| | | | | | | | | | | | | | | | | 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>
* glibc-package.inc: fix multilib headers conflictKai Kang2020-02-181-1/+1
| | | | | | | | | | | | | | 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>
* glibc-testsuite: Exclude this recipe from world buildsNathan Rossi2020-02-151-0/+2
| | | | | | | | | | | 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>
* glibc-testsuite: Remove the do_install taskNathan Rossi2020-02-151-0/+1
| | | | | | | | | | | | | 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>
* glibc: don't ignore global LDFLAGS settingsRasmus Villemoes2020-02-041-2/+1
| | | | | | | | | | | | | | | | | | | | 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>
* glibc: Update to final 2.31 releaseKhem Raj2020-02-022-4/+4
| | | | | | | (From OE-Core rev: b0df2fcb26cb1b2b48e8f66cfcbfd351a7737099) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* glibc: merge libc-common.bbclass into glibc.bbRoss Burton2020-02-021-2/+38
| | | | | | | | | | | | 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>
* glibc-package.inc: Remove warnings about unpacked directoriesRichard Purdie2020-02-021-0/+2
| | | | | | | | | 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>
* glibc: Drop fortify refactoring patchKhem Raj2020-01-272-2781/+0
| | | | | | | | | | 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>
* glibc: Update to final 2.31 releaseKhem Raj2020-01-2734-449/+367
| | | | | | | | | | 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>
* glibc: Upgrade to 2.31Khem Raj2020-01-1941-325/+2980
| | | | | | | | | | | 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>
* cross-localedef: Re-arrange patchesKhem Raj2019-12-284-471/+554
| | | | | | | | | | | | | | | | 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>
* glibc: fix ldconfig packaging issueMing Liu2019-12-061-1/+1
| | | | | | | | | | | | 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>
* glibc-testing.inc: Remove testglibc script generationNathan Rossi2019-12-062-96/+0
| | | | | | | | | | | | | 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>
* glibc: fix CVE-2019-19126Anuj Mittal2019-11-292-0/+33
| | | | | | | | | | 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>
* distro_features_check: expand with MACHINE_FEATURES and COMBINED_FEATURES, ↵Denys Dmytriyenko2019-11-211-1/+1
| | | | | | | | | | | | | | | | 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>
* glibc: move ldconfig to its own packageAndreas Oberritter2019-11-111-7/+4
| | | | | | | | | 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>
* glibc: Make it build without ldconfig in DISTRO_FEATURESPeter Kjellerstedt2019-09-191-3/+1
| | | | | | | | | | | | 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>
* glibc: Move DISTRO_FEATURE specific do_install code for target recipe onlyKhem Raj2019-09-161-19/+20
| | | | | | | | | | | | | | | | | | | | | 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>
* glibc-testsuite: SkipRecipe if libc is not glibcNathan Rossi2019-09-161-0/+7
| | | | | | | | | | | 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>
* binutils/glibc-testsuite: inherit nopackages to fix world buildsRichard Purdie2019-09-061-0/+2
| | | | | | | | | | | | 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>
* glibc-testsuite: Create a recipe to implement glibc test suiteNathan Rossi2019-09-062-0/+122
| | | | | | | | | | | | | | | | | | | 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>
* Clean up remnants of glibc-initialNathan Rossi2019-09-061-8/+1
| | | | | | | | | 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>
* cross-localedef-native: Add hardlink resolver from util-linuxJason Wessel2019-08-213-0/+1344
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* glibc-package.inc: Add linux-libc-headers-dev to glibc-devMark Hatle2019-08-071-0/+1
| | | | | | | | | | | | | | | | | | | | | 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>
* glibc: Update to glibc 2.30Khem Raj2019-08-0737-384/+130
| | | | | | | | | | | | | | - 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>
* glibc: CVE-2018-20796 is same as CVE-2019-9169Anuj Mittal2019-07-191-0/+1
| | | | | | | | | | | 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>
* glibc: exclude child recipes from CVE scanningRoss Burton2019-07-173-0/+9
| | | | | | | | | | | | | | 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>
* glibc-package.inc: Do not use bitbake variable syntax for shell variablesPeter Kjellerstedt2019-07-151-24/+24
| | | | | | | | | | | | | | 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>
* glibc / glibc-locale: Fix stash_locale determinism problemsJason Wessel2019-07-102-17/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* glibc/glibc-locale: Fix do_stash_locale to work with usrmerge and multilibsJason Wessel2019-07-031-6/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* glibc-locale: Fix build error with PACKAGE_NO_GCONV = "1"Jason Wessel2019-07-031-0/+3
| | | | | | | | | | | | | | | | | | | | 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>
* glibc: Fix multilibs + usrmerge buildsJason Wessel2019-06-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* glibc-locale: DEPEND on virtual/libcJoshua Watt2019-05-311-3/+1
| | | | | | | | | | | | | | | 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>
* glibc: always use bfd linkerMartin Jansa2019-04-261-1/+1
| | | | | | | | | | | | | | | * 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>
* glibc: fix CVE-2019-9169Ross Burton2019-03-242-0/+37
| | | | | | | (From OE-Core rev: 966213b3c99d428f2afba3ad3d88189669005eb6) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* glibc: fix do_populate_sdk fail when multilib usedChangqing Li2019-03-181-0/+1
| | | | | | | | | | | | | 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>
* glibc: Drop upstream rejected patchesKhem Raj2019-03-063-110/+0
| | | | | | | | | | | | 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>
* glibc: Disable Werror when building with debug optionsKhem Raj2019-03-022-9/+1
| | | | | | | | | | | | | | | | | | | | | 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>
* glibc: Move common bits to glibc-common.incKhem Raj2019-02-284-28/+17
| | | | | | | | | | | 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>
* default-distrovars: Drop DISTRO_FEATURES_LIBCKhem Raj2019-02-281-2/+1
| | | | | | | | | | | 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>