mirror of
https://git.openwrt.org/openwrt/openwrt.git
synced 2025-12-10 08:44:39 +01:00
toolchain: gcc: 15: fix build error with glibc for aarch64 targets
Some checks failed
Build all core packages / Build all core packages for selected target (push) Waiting to run
Build and Push prebuilt tools container / Build and Push all prebuilt containers (push) Has been cancelled
Build Toolchains / Build Toolchains for each target (push) Has been cancelled
Build host tools / Build host tools for linux and macos based systems (push) Has been cancelled
Some checks failed
Build all core packages / Build all core packages for selected target (push) Waiting to run
Build and Push prebuilt tools container / Build and Push all prebuilt containers (push) Has been cancelled
Build Toolchains / Build Toolchains for each target (push) Has been cancelled
Build host tools / Build host tools for linux and macos based systems (push) Has been cancelled
GCC 14+ fails to build due to libatomic specific -march handling. This build error triggers only with glibc and not with musl libc which is default. It seems that this patch from GCC14 was forgotten when GCC15 support was being added [1]. [1]44ef343500Fixes:68cb84183e("toolchain: add support for GCC 15.1") Signed-off-by: Robert Marko <robimarko@gmail.com>
This commit is contained in:
parent
7caf88b63e
commit
1f8391346e
2 changed files with 33 additions and 6 deletions
32
toolchain/gcc/patches-15.x/830-aarch64-libatomic.patch
Normal file
32
toolchain/gcc/patches-15.x/830-aarch64-libatomic.patch
Normal file
|
|
@ -0,0 +1,32 @@
|
||||||
|
libatomic: Do not enforce march on aarch64
|
||||||
|
|
||||||
|
Inspired by The Yocto Project [1].
|
||||||
|
|
||||||
|
[1] https://github.com/yoctoproject/poky/blob/51192a79f1717786dda42776f916c3d97ada7971/meta/recipes-devtools/gcc/gcc/0022-libatomic-Do-not-enforce-march-on-aarch64.patch
|
||||||
|
|
||||||
|
Signed-off-by: Konstantin Demin <rockdrilla@gmail.com>
|
||||||
|
|
||||||
|
libatomic/Makefile.am | 1 -
|
||||||
|
libatomic/Makefile.in | 1 -
|
||||||
|
2 files changed, 2 deletions(-)
|
||||||
|
|
||||||
|
--- a/libatomic/Makefile.am
|
||||||
|
+++ b/libatomic/Makefile.am
|
||||||
|
@@ -128,7 +128,6 @@ libatomic_la_LIBADD = $(foreach s,$(SIZE
|
||||||
|
## On a target-specific basis, include alternates to be selected by IFUNC.
|
||||||
|
if HAVE_IFUNC
|
||||||
|
if ARCH_AARCH64_LINUX
|
||||||
|
-IFUNC_OPTIONS = -march=armv8-a+lse
|
||||||
|
libatomic_la_LIBADD += $(foreach s,$(SIZES),$(addsuffix _$(s)_1_.lo,$(SIZEOBJS)))
|
||||||
|
|
||||||
|
endif
|
||||||
|
--- a/libatomic/Makefile.in
|
||||||
|
+++ b/libatomic/Makefile.in
|
||||||
|
@@ -452,7 +452,6 @@ M_SRC = $(firstword $(filter %/$(M_FILE)
|
||||||
|
libatomic_la_LIBADD = $(foreach s,$(SIZES),$(addsuffix \
|
||||||
|
_$(s)_.lo,$(SIZEOBJS))) $(am__append_1) $(am__append_2) \
|
||||||
|
$(am__append_3) $(am__append_4)
|
||||||
|
-@ARCH_AARCH64_LINUX_TRUE@@HAVE_IFUNC_TRUE@IFUNC_OPTIONS = -march=armv8-a+lse
|
||||||
|
@ARCH_ARM_LINUX_TRUE@@HAVE_IFUNC_TRUE@IFUNC_OPTIONS = -march=armv7-a+fp -DHAVE_KERNEL64
|
||||||
|
@ARCH_I386_TRUE@@HAVE_IFUNC_TRUE@IFUNC_OPTIONS = -march=i586
|
||||||
|
@ARCH_X86_64_TRUE@@HAVE_IFUNC_TRUE@IFUNC_OPTIONS = -mcx16 -mcx16
|
||||||
|
|
@ -34,11 +34,9 @@ Signed-off-by: Georgi Valkov <gvalkov@gmail.com>
|
||||||
zlib/zutil.h | 2 +-
|
zlib/zutil.h | 2 +-
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
diff --git a/zlib/zutil.h b/zlib/zutil.h
|
|
||||||
index 4b596adf629..9ea8d840643 100644
|
|
||||||
--- a/zlib/zutil.h
|
--- a/zlib/zutil.h
|
||||||
+++ b/zlib/zutil.h
|
+++ b/zlib/zutil.h
|
||||||
@@ -130,7 +130,7 @@ extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
|
@@ -130,7 +130,7 @@ extern z_const char * const z_errmsg[10]
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
@ -47,6 +45,3 @@ index 4b596adf629..9ea8d840643 100644
|
||||||
# define OS_CODE 7
|
# define OS_CODE 7
|
||||||
# ifndef Z_SOLO
|
# ifndef Z_SOLO
|
||||||
# if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os
|
# if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os
|
||||||
--
|
|
||||||
2.49.0
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue