summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/glibc/glibc-package.inc
Commit message (Collapse)AuthorAgeFilesLines
* glibc: do_stash_locale must not delete files from ${D}Richard Purdie2020-10-061-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: f18817f5340d06f7b4bb846a83b48731a1b9c4bc) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* glibc: move ld.so.conf back to main packageRasmus Villemoes2020-06-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are cases where one doesn't want ldconfig on target (e.g. for read-only root filesystems, it's rather pointless), yet one still needs ld.so.conf to be present at image build time: When some recipe installs libraries to a non-standard location, and dutifully drops in a file in /etc/ld.so.conf.d/foo.conf, we need the ld.so.conf containing the include /etc/ld.so.conf.d/*.conf stanza to get those other locations picked up. So change the packaging logic so that there's always an ld.so.conf present when the build-time ldconfig runs. The ld.so.conf and ld.so.conf.d/*.conf files don't take up much room (at least not compared to the 700K binary ldconfig), and they might be needed in case ldconfig is installable, so leave them alone. In case of a read-only rootfs, one could add some logic to remove them if one really wants to shave those few dozens of bytes off. While here, fix typos in the bb.note (add spaces) so one can just copy-paste the line from the log-file and redo the command. (From OE-Core rev: a4cdda012f613d8d80203b9f5fc737d8511d16ce) Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* multilib/recipes: Use new RecipePostKeyExpansion eventRichard Purdie2020-05-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are issues with multilib due to the ordering of events where some functions see the remapped multilib dependencies and some do not. A significant problem is that the multilib class needs to make some changes before key expansion and some afterwards but by using existing event handlers, some code sees things in a partially translated state, leading to bugs. This patch changes things to use a new event handler from bitbake which makes the ordering of the changes explcit. The challenge in doing this is that it breaks some existing anonymous python and dyanmic assignments. In some cases these used to be translated and no longer are, meaning MLPREFIX has to be added. In some cases these are now translated and the MLPREFIX can be removed. This change does now make it very clear when MLPREFIX is required and when it is not, its just the migration path which is harder. The patch changes the small number of cases where fixes are needed. In particular, where a variable like RDEPENDS is conditionally extended (e.g. with an override), MLPREFIX is now required. This patch also reverts: base: Revert 'base.bbclass: considering multilib when setting LICENSE_EXCLUSION' This reverts 6597130256a1609c3e05ec5891aceaf549c37985 as the changes to multilib datastore handling mean its no longer necessary. (From OE-Core rev: b3fda056a674889cd9697e779de023d4f993d3ce) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* glibc: Do not synthesize wordsize.h for arm multilibsKhem Raj2020-05-181-1/+1
| | | | | | | | | | | | | | | | | This has been constant source of trouble, because it is fundamental file which sets machine word length and everything else builts on top of that so when it is sythesized like this, where the sythesize template itself needs wordsize.h to determine machine word length, it creates the catch-22 problem, which is seen when building things like bpf, or running clang-tidy etc. where compiler internal defines may not be used this ends up in all sorts of problems. Now that glibc provides exact same header for arm and aarch64, its no longer needed to be multilibbed here (From OE-Core rev: d223f85f8a18b1343f186122425f18f32706065b) 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: 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: 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: 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>
* 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>
* 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-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-101-16/+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: 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: 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: Install AArch64 loader link correctly for usrmerge+multilibMike Crowe2019-02-261-13/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* glibc: systemd and sysvinit are not mutually exclusiveJonas Bonn2019-01-311-1/+3
| | | | | | | (From OE-Core rev: 0990d77d99a9ba81e21961f9633df10ccef4b1a4) Signed-off-by: Jonas Bonn <jonas@norrbonn.se> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* glibc-package.inc: correct intention for deleting /usr/lib as neededAwais Belal2018-09-271-3/+4
| | | | | | | | | | | | | | | | In case the baselib is lib64 we would want to delete /usr/lib after removing the /usr/lib/locale dir and the implementation wanted to do that earlier as well but the fault was checking an already removed dir (/usr/lib/locale) before trying to remove /usr/lib as that check would always fail. Now we simply try to delete /usr/lib after deleting /usr/lib/locale to make sure it deletes cleanly and is empty at the time of deletion. (From OE-Core rev: 4dad1568f8f84ec9de4bf7235822f77a8ee6a413) Signed-off-by: Awais Belal <awais_belal@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* glibc: re-package for libnss-dbChen Qi2018-08-191-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On other distros like ubuntu/centos, libnss-db usually provides: - The libraries - The Makefile to create database (in /var/db for centos, /var/lib/misc/ for ubuntu) - The makedb command (it's in glibc-common for centos7) What we had is: - The libraries are in glibc-extra-nss - The Makefile is removed - The makedb command is in glibc-utils (lack of dependency) So when glibc-extra-nss is installed but glibc-utils is not, we see error like: nscd[165]: 165 checking for monitored file `/var/db/group.db': No such file or directory nscd[165]: 165 checking for monitored file `/var/db/passwd.db': No such file or directory And there is not an easy way to create these databases. To fix the issue: - Re-package the libraries into libnss-db - Don't remove the Makefile and add it in libnss-db - Add RDEPENDS for libnss-db on glibc-utils - Provide a shell script, makedbs.sh, to generate the db files. This is to avoid dependency on 'make'. Notes: 1. For external toolchain, an extra package 'libnss-db' need to be provided If replacing glibc from core. 2. I've check the git history of nss/db-Makefile, the last two functionality fix is as below. - fix non-portable `echo -n` usage -- Date: Thu Aug 6 04:14:20 2015 -0400 - Fix db makefile rule for group.db -- Date: Fri Nov 11 14:43:36 2011 +0100 So I think this file is stable enough. And using makedbs.sh which is crafted according to that file is not likely to cause maintanence problem. (From OE-Core rev: 13cf502fce8956f95fdc8ac0c7a37d741223bcc9) Signed-off-by: Jackie Huang <jackie.huang@windriver.com> Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* glibc: Disable crypt support in glibcKhem Raj2018-08-151-1/+1
| | | | | | | | | | Drop packaging libcrypt from 2.28+ onwards We have independent crypt implementation coming from libxcrypt (From OE-Core rev: 6146b8c4216daf56a69f4e3531861302df6a63a2) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* glibc: Make bits/wordsize.h multilibbed againDaniel Díaz2018-08-141-1/+1
| | | | | | | | | | | | | | | As reported by ChenQi, leaving bits/wordsize.h out of being multilibbed introduced a problem in building the SDK for arm64: Error: Transaction check error: file /usr/include/bits/wordsize.h conflicts between attempted installs of lib32-libc6-dev-2.27-r0.armv7vet2hf_vfp and libc6-dev-2.27-r0.aarch64 This effectively reverts commit a74c77d6. (From OE-Core rev: 90ad502bf8faa233e25cf297c1eeefcb0367aea3) Signed-off-by: Daniel Díaz <daniel.diaz@linaro.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* glibc: Avoid multilibbing on wordsize.hDaniel Díaz2018-07-261-2/+1
| | | | | | | | | | | | | | | | | | | | | Once another header #includes <bits/wordsize.h>, there is a potential recursion going on because the multilib_header_wrapper.h #includes <bits/wordsize.h> again! This should not happen because an __arm__ (32-bits) or an __aarch64__ (64-bits) environment guarantees that we will be getting the correct definition, but when building against a different target (like BPF), recursion is what happens. This can be seen, for instance, when building eBPF programs from the kernel with `clang -target bpf', such as the ones located in linux/tools/testing/selftests/bpf/. (From OE-Core rev: a74c77d6168101e88c3a3bce7130f4f52cfab95d) Signed-off-by: Daniel Díaz <daniel.diaz@linaro.org> Signed-off-by: Aníbal Limón <anibal.limon@linaro.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* glibc: Drop obsolete rpc and libnslKhem Raj2018-05-091-3/+2
| | | | | | | | | use libnsl2 and rpcsvc-proto packages (From OE-Core rev: 9dc9983901cec364ea57a72b9da1a0396b60663a) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* glibc: use oe_multilib_header on bits/floatn.hChen Qi2018-05-041-1/+1
| | | | | | | | | | | | | | | | | When building SDK via populate_sdk for qemuarm64 with multilib enabled, we would have conflict about bits/floatn.h at populate_sdk time. file /usr/include/bits/floatn.h conflicts between attempted ins talls of libc6-dev-2.27-r0.aarch64 and lib32-libc6-dev-2.27-r0.armv7vehf_vfp Apply oe_multilib_header on this header file to fix the problem. (From OE-Core rev: 650c59c8b6796cf4797ca1860be85f6ccf50bcd2) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* glibc-package: fix locale cleanup logicKoen Kooi2018-03-301-2/+5
| | | | | | | | | | | | | | If ${libdir} is a subdirectory of ${prefix}/lib, e.g. /usr/lib/aarch64-linux, the cleanup logic will delete libc.so. This bit of code was added in 2012 (git show b744f4cc) to remove /usr/lib/locale, this commit makes it remove that directory recursively and afterwards remove /usr/lib, erroring out if it's non-empty. Tested with a plain (/usr/lib), a 64-bit (/usr/lib64) and a multiarch (/usr/lib/aarch64-linux) build. I strongly suspect this whole bit of cleanup isn't needed anymore, but my testing is too limited to be certain. (From OE-Core rev: d8f4c7794f15f7071ee8e621d7964cb4b4134630) Signed-off-by: Koen Kooi <koen.kooi@linaro.org> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta: don't use deprecated functions from utils.bbclassRoss Burton2018-01-301-2/+2
| | | | | | | | | | | These functions were moved to meta/lib/oe in 2010 and the base_* functions in utils.bbclass were intended to be a short-term compatibility layer. They're still used in a few places, so update the callers to use the new functions. (From OE-Core rev: c97acbd034532895ce57c6717ed1b3ccc7900b0d) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* glibc: Adapt do_install_append_aarch64() for usrmergePeter Kjellerstedt2018-01-291-6/+6
| | | | | | | | | | | Change hardcoded /lib to ${nonarch_base_libdir} to correctly adapt the code in do_install_append_aarch64() for when usrmerge is enabled in DISTRO_FEATURES. (From OE-Core rev: ac373c9f760463d989d6a1eb3a14b7c5b255b9d4) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* glibc/nscd: do not cache for netgroup by defaultJackie Huang2018-01-131-0/+1
| | | | | | | | | | | | | | We don't have /etc/netgroup by default, so do not cache for netgroup by default to avoid: nscd[529]: 529 disabled inotify-based monitoring for file `/etc/netgroup': No such file or directory nscd[529]: 529 stat failed for file `/etc/netgroup'; will try again later: No such file or directory (From OE-Core rev: 10007bcd30a96470059f9d5b19cf698243486f06) (From OE-Core rev: 0adedfc2bf8981819fbbf8b1884da44c7082d1a6) Signed-off-by: Jackie Huang <jackie.huang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* glibc: do the multilib_header magic also for bits/pthreadtypes-arch.hChunrong Guo2017-09-111-1/+1
| | | | | | | | | | | Otherwise it will cause conflicts in mutlilib setting, as it varies from one machine to another. (From OE-Core rev: 30140990a8bbe920222204b4f19113f5a1662478) Signed-off-by: Chunrong Guo <chunrong.guo@nxp.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* glibc-package.inc: add support for armeb of multilibzhengrq2017-07-241-0/+4
| | | | | | | | | | Add support for armeb of multilib. (From OE-Core rev: ac3acdcdc313ee13739d378e88b907b31765cfee) Signed-off-by: zhengrq <zhengrq.fnst@cn.fujitsu.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* glibc: Drop obsoleted bits/string.h from multilibbingKhem Raj2017-07-111-1/+1
| | | | | | | | | | glibc 2.26 has dropped bits/string.h (From OE-Core rev: 81da4f6f12744fd051510a4df4eaeac73c232469) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta: Drop remnants of uclibc supportRichard Purdie2017-06-221-16/+0
| | | | | | | | | | | | | | uclibc support was removed a while ago and musl works much better. Start to remove the various overrides and patches related to uclibc which are no longer needed. uclibc support in a layer would still be possible. I have strong reasons to believe nobody is still using uclibc since patches are missing and I doubt the metadata even parses anymore. (From OE-Core rev: 653704e9cf325cb494eb23facca19e9f05132ffd) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake.conf: Add COMPONENTS_DIR for ${STAGING_DIR}-componentsPeter Kjellerstedt2017-05-111-2/+2
| | | | | | | | | | The path to where to install and find the sysroot components is used in many places. This warrants it to get its own variable. (From OE-Core rev: 70a84b525470f72339568409daf84845904e4cab) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* glibc-package: Allow 32 and 64 bit headers to exist on armRichard Purdie2017-03-311-0/+17
| | | | | | | | | | With this change (combined with the previous linux-libc-header fix), a combined sysroot for 32 and 64 bit arm works meaning our SDK works correctly for that multilib setup. (From OE-Core rev: 4690cd8e34fc23de10400cc1c178b2c73c7690c7) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* glibc: Ensure ldconfig is packaged into glibcJussi Kukkonen2017-03-221-1/+1
| | | | | | | | | | If base_bindir=bindir, /usr/sbin/ldconfig gets packaged into glibc-utils instead of glibc: Switch PACKAGES order to prevent this. (From OE-Core rev: 2794b1cc12af051db404d46aea4db4c74e8e1fe3) Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* glibc: do the multilib_header magic also for bits/long-double.hAlexander Kanavin2017-03-111-1/+1
| | | | | | | | | | Otherwise it will cause conflicts in mutlilib setting, as it varies from one machine to another. (From OE-Core rev: a3b19882e2f50089c785b1e2591550356c12a175) Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake.conf: replace USE_LDCONFIG with new "ldconfig" distro featureAndre McCurdy2017-03-041-6/+3
| | | | | | | | | | | | | | | | | | | | | USE_LDCONFIG could previously be set to 0 by distros which do not require ldconfig or ld.so.conf on the target. Since more and more recipes may need to respect that option, replace the ad-hoc variable with a distro feature. Distros which previously set: USE_LDCONFIG = "0" Should now instead use: DISTRO_FEATURES_BACKFILL_CONSIDERED_append = " ldconfig" (From OE-Core rev: a905df2dd8f43a2febffa64a39b6e508510326a0) Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* glibc-package: Avoid race sstate races with do_stash_localeRichard Purdie2017-02-091-6/+11
| | | | | | | | | | | | | | | | The change to make do_stash_locale an sstate task between do_install and do_package has some unforeseen problems since the function deletes part of ${D} but may or may not run depending on whether the task is installed from sstate. This cleans up the current "pre packaging" function to be more deterministic and result in the same set of files, whichever code path we end up reaching that point by. Its not an ideal sitation but it should avoid the race failures we've seen on some builds. (From OE-Core rev: 2a60bba00da9c4e2b1a1ce30e509dba82cc6c94a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* glibc: Separate locale files to their own sstate taskRichard Purdie2017-02-071-12/+18
| | | | | | | | | | | Putting the locale and script files into the sysroot for use by their specific recipes used to be a simple way to share the files. With RSS, we don't want to copy these into many different recipes so put these files in their own sstate task. (From OE-Core rev: c283f2532851e2a65e08fe7b3fd71c5d9abb70f2) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta: remove True option to getVar callsJoshua Lock2016-12-161-2/+2
| | | | | | | | | | | | | getVar() now defaults to expanding by default, thus remove the True option from getVar() calls with a regex search and replace. Search made with the following regex: getVar ?\(( ?[^,()]*), True\) (From OE-Core rev: 7c552996597faaee2fbee185b250c0ee30ea3b5f) Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta: Drop now pointless manual -dbg packagingRichard Purdie2015-12-161-1/+0
| | | | | | | | | With the autodebug package generation logic, specifically setting FILES_${PN}-dbg isn't needed in most cases, we can remove them. (From OE-Core rev: 3ab59d49dd7c18e194b58d1248b4b87709b5a738) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* glibc: fix libdir/libexecdir path confusionRoss Burton2015-12-081-2/+3
| | | | | | | | | | | | | $libdir/glibc is deleted if it doesn't exist but this is incorrectly assuming what variables are used to create this directory. In fact libexecdir is being used in the Makefile so use that in the recipe too. This fixes builds where libexecdir is changed. (From OE-Core rev: 0c73dcb7c1c369a66e4c5804fcdd19f657426a5d) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* glibc: package nscd related filesRoy Li2015-09-031-1/+39
| | | | | | | | | | install nscd related configuration file, startup files, and package them, make nscd easy to startup (From OE-Core rev: 6d8351ac26295d2e5a693169bd2df95b89cb32fe) Signed-off-by: Roy Li <rongqing.li@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* glibc-package: use ${PN} in INSANE_SKIPMartin Jansa2015-08-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * INSANE_SKIP_${PN}_append_aarch64 is causing following warning in some setups: WARNING: Variable key INSANE_SKIP_${PN} () replaces original key INSANE_SKIP_glibc (). * in worst case this will be applied also for glibc-initial package which is using the same glibc-package.inc, but glibc-initial doesn't create any packages so we should be fine * someone building for aarch64 should confirm verify that this INSANE_SKIP is still needed and cannot be fixed properly it was introduced in: commit aeb6f53dd607ceb0d2265a05c27f751109c73752 Author: Mark Hatle <mark.hatle@windriver.com> Date: Thu Dec 18 16:51:13 2014 +0800 glibc-package: aarch64 enable symlink for ABI compliance aarch64 requires the ld.so to be present in /lib, even if the rest of the libraries are installed into an alternative directory. See: https://sourceware.org/glibc/wiki/ABIList Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (From OE-Core rev: 34ffa04a5030d23070aa4d389d1cc51438525670) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* glibc: Package libmvec when builtKhem Raj2015-08-161-1/+1
| | | | | | | | | | | | | | | | | | | libmvec is new library in glibc 2.22 and currently turned on by default on x86_64. this helps in packaging it properly when its generated Fixes warning like WARNING: QA Issue: nativesdk-glibc: Files/directories were installed but not shipped in any package: /usr/local/oecore-x86_64/sysroots/x86_64-angstromsdk-linux/lib/libmvec-2.21.90.so Please set FILES such that these items are packaged. Alternatively if they are unneeded, avoid installing them or delete them within do_install. [installed-vs-shipped] (From OE-Core rev: f009e592fd5ef65c2417ec8cc131056a575a003f) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* staging: Strip files in sysrootRichard Purdie2015-06-231-0/+2
| | | | | | | | | | Add functionality to strip binaries/libraries going into the sysroot. Whilst this does fractionally slow down the build, it also significantly reduces the size of the sstate cache files. (From OE-Core rev: 30f3774f4cd5bbb8c1e6884aeff5af91ab053fc1) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* glibc-package: aarch64 enable symlink for ABI complianceMark Hatle2014-12-231-0/+16
| | | | | | | | | | | | aarch64 requires the ld.so to be present in /lib, even if the rest of the libraries are installed into an alternative directory. See: https://sourceware.org/glibc/wiki/ABIList (From OE-Core rev: aeb6f53dd607ceb0d2265a05c27f751109c73752) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>