Go to file
Thomas Petazzoni 4ed7d51d18 package/gcc: add patch to fix glibc header conflict
This commit backports the patch "fixinc: don't "fix" machine names in
__has_include(...)" from upstream GCC, which is needed to resolve a
header conflict between glibc headers and kernel headers, which has
appeared since we bumped glibc to version 2.36 in commit
80c8c15c85.

The problem comes from the "fixinc" logic used by gcc to fixup some
headers files, generated inside an include-fixed/ folder. This logic
ended up replacing "linux/mount.h" by "__linux__/mount.h" in
__has_include() invocation, like this:

 #ifdef __has_include
 # if __has_include ("__linux__/mount.h")
 #  include "linux/mount.h"
 # endif
 #endif

in
build/host-gcc-final-11.3.0/build/gcc/include-fixed/sys/mount.h. With
this fix in place, this "include-fixed" header is no longer generated,
avoiding the problem.

This issue was visible in two different ways in glibc configurations:

 - As a build failure during the gcc build itself, for architectures
   that support libsanitizer, as libsanitizer includes mount.h, and
   would therefore encounter the header conflict.

 - As a build failure during another user-space package (such as
   sysvinit for example), on architectures when libsanitizer isn't
   used, and therefore for which the gcc build was successful, but the
   header conflict shows up when building some "random" user-space
   package.

The problem is already fixed in GCC 12.2.0, so no patch is
required. The problem did not exist back in GCC 8.4.0, so this version
does not need patching. Consequently, the patch is only needed for GCC
10.4.0, GCC 11.3.0 and the special ARC 2020.09-release version.

Fixes:

  (gcc build issue, on architecture that supports libsanitizer)
  http://autobuild.buildroot.net/results/90fe4c3b8b72a2c28555674383de9bbd9e8ae09a/

  (sysvinit build issue, on architecture that does not support libsanitizer)
  http://autobuild.buildroot.net/results/d7bf5795b7621a92be32f18794e3e67944fb96db/

  (crun)
  http://autobuild.buildroot.net/results/e3e8da4f797dced48aedf8c636db983d36849850/

  (libarchive)
  http://autobuild.buildroot.net/results/9fcbf0c036a97b2e9a4fcc6e173bcfa09e1b3dac/

Thanks a lot to Peter Seiderer for pointing the relevant GCC commit.

Fixes:

  https://bugs.busybox.net/show_bug.cgi?id=15021

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Reviewed-by: Romain Naour <romain.naour@smile.fr>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2022-10-26 13:35:59 +02:00
arch arch/Config.in.arm: drop support for iwmmxt architecture variant 2022-09-25 14:06:08 +02:00
board configs/visionfive_defconfig: new defconfig 2022-10-14 15:47:21 +02:00
boot boot/grub2: ignore CVE-2021-46705 2022-10-25 23:06:13 +02:00
configs configs/olimex_a20_olinuxino_lime*: bump Linux and U-Boot 2022-10-24 22:57:10 +02:00
docs docs/website: update for 2022.08.1 2022-10-03 08:52:43 +02:00
fs fs/cpio: fix slight typo in help text 2022-09-18 21:30:33 +02:00
linux {linux, linux-headers}: bump 4.{9, 14, 19}.x / 5.{4, 10, 15}.x / 6.0.x series 2022-10-15 18:49:27 +02:00
package package/gcc: add patch to fix glibc header conflict 2022-10-26 13:35:59 +02:00
support toolchain: support gconv modules from glibc >= 2.34 2022-10-21 21:02:40 +02:00
system package/systemd: add setting for systemd default.target 2022-05-02 22:58:44 +02:00
toolchain toolchain: support gconv modules from glibc >= 2.34 2022-10-21 21:02:40 +02:00
utils utils/genrandconfig: fix flake8 2022-09-18 17:09:30 +02:00
.clang-format .clang-format: initial import from Linux 5.15.6 2022-01-01 15:01:13 +01:00
.defconfig
.flake8
.gitignore
.gitlab-ci.yml utils/checkpackagelib/lib_sysv: run shellcheck 2022-02-06 18:27:03 +01:00
.shellcheckrc utils/check-package: improve shellcheck reproducibility 2022-07-25 23:52:47 +02:00
CHANGES Update for 2022.08.1 2022-10-03 08:49:17 +02:00
Config.in Config.in: move toolchain menu before build options 2022-07-27 11:11:19 +02:00
Config.in.legacy package/linux-headers: drop 5.17.x option 2022-10-06 19:53:49 +02:00
COPYING
DEVELOPERS DEVELOPERS: add missing ending slash 2022-10-24 23:14:46 +02:00
Makefile Makefile: really generate glibc locales in parallel 2022-10-21 20:59:54 +02:00
Makefile.legacy
README

Buildroot is a simple, efficient and easy-to-use tool to generate embedded
Linux systems through cross-compilation.

The documentation can be found in docs/manual. You can generate a text
document with 'make manual-text' and read output/docs/manual/manual.text.
Online documentation can be found at http://buildroot.org/docs.html

To build and use the buildroot stuff, do the following:

1) run 'make menuconfig'
2) select the target architecture and the packages you wish to compile
3) run 'make'
4) wait while it compiles
5) find the kernel, bootloader, root filesystem, etc. in output/images

You do not need to be root to build or run buildroot.  Have fun!

Buildroot comes with a basic configuration for a number of boards. Run
'make list-defconfigs' to view the list of provided configurations.

Please feed suggestions, bug reports, insults, and bribes back to the
buildroot mailing list: buildroot@buildroot.org
You can also find us on #buildroot on OFTC IRC.

If you would like to contribute patches, please read
https://buildroot.org/manual.html#submitting-patches