diff options
author | q66 <daniel@octaforge.org> | 2019-07-04 19:28:54 +0000 |
---|---|---|
committer | Jürgen Buchmüller <pullmoll@t-online.de> | 2019-07-05 06:29:18 +0000 |
commit | 7801a8cef8fdd2e53ecf5ce2c3a22e9c1a1ba34a (patch) | |
tree | 929235116d9ca509ddd0129d36c4ca9d1a5f39e5 | |
parent | 8102e009d4244d0414811907fd08e82c3c5974f2 (diff) | |
download | void-packages-7801a8cef8fdd2e53ecf5ce2c3a22e9c1a1ba34a.tar void-packages-7801a8cef8fdd2e53ecf5ce2c3a22e9c1a1ba34a.tar.gz void-packages-7801a8cef8fdd2e53ecf5ce2c3a22e9c1a1ba34a.tar.bz2 void-packages-7801a8cef8fdd2e53ecf5ce2c3a22e9c1a1ba34a.tar.lz void-packages-7801a8cef8fdd2e53ecf5ce2c3a22e9c1a1ba34a.tar.xz void-packages-7801a8cef8fdd2e53ecf5ce2c3a22e9c1a1ba34a.tar.zst void-packages-7801a8cef8fdd2e53ecf5ce2c3a22e9c1a1ba34a.zip |
linux5.1: add patch to unbreak build on big-endian ppc64 + gcc9
[ci skip]
-rw-r--r-- | srcpkgs/linux5.1/patches/ppc64-be-gcc91.patch | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/srcpkgs/linux5.1/patches/ppc64-be-gcc91.patch b/srcpkgs/linux5.1/patches/ppc64-be-gcc91.patch new file mode 100644 index 00000000000..f168c161e6c --- /dev/null +++ b/srcpkgs/linux5.1/patches/ppc64-be-gcc91.patch @@ -0,0 +1,28 @@ +Since gcc 9.1, adding `-mcall-aixdesc` to cflags makes it no longer define +`__linux__`, which breaks compilation of the kernel in places where the macro +is checked (which is multiple). This behavior is actually more correct than +it was before, as `-mcall-aixdesc` is only meant to be used when compiling +for AIX. + +However, it is not enough to just drop it and use `-mabi=elfv1`, as that +results in a ton of undefined references all over the place when linking. +So work around it until upstream sorts it out. + +--- a/arch/powerpc/Makefile ++++ b/arch/powerpc/Makefile +@@ -96,6 +96,7 @@ endif + ifdef CONFIG_PPC64 + cflags-$(CONFIG_CPU_BIG_ENDIAN) += $(call cc-option,-mabi=elfv1) + cflags-$(CONFIG_CPU_BIG_ENDIAN) += $(call cc-option,-mcall-aixdesc) ++cflags-$(CONFIG_CPU_BIG_ENDIAN) += -D__linux__ + aflags-$(CONFIG_CPU_BIG_ENDIAN) += $(call cc-option,-mabi=elfv1) + aflags-$(CONFIG_CPU_LITTLE_ENDIAN) += -mabi=elfv2 + endif +@@ -151,6 +152,7 @@ AFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mabi=elfv2) + else + CFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mabi=elfv1) + CFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mcall-aixdesc) ++CFLAGS-$(CONFIG_PPC64) += -D__linux__ + AFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mabi=elfv1) + endif + CFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mcmodel=medium,$(call cc-option,-mminimal-toc)) |