toolchain: update toolchain setting from offical tag 2022.11.3

Signed-off-by: Andy Hu <andy.hu@starfivetech.com>
This commit is contained in:
Andy Hu
2023-03-09 00:08:39 +08:00
parent 389dc57182
commit cce9841ee9
7 changed files with 134 additions and 23 deletions
+61 -12
View File
@@ -115,15 +115,13 @@ config BR2_TOOLCHAIN_SUPPORTS_VARIADIC_MI_THUNK
depends on !BR2_or1k depends on !BR2_or1k
depends on !BR2_xtensa depends on !BR2_xtensa
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43744. This bug no # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43744. This bug
# reappeared on gcc 9.x and is still not fixed on gcc 11.x # reappeared on gcc 9.x and is still not fixed on gcc 11.x
config BR2_TOOLCHAIN_HAS_GCC_BUG_43744 config BR2_TOOLCHAIN_HAS_GCC_BUG_43744
bool bool
default y if BR2_sh4 default y if !BR2_TOOLCHAIN_GCC_AT_LEAST_8
depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_8 || \ default y if BR2_TOOLCHAIN_GCC_AT_LEAST_9
BR2_TOOLCHAIN_GCC_AT_LEAST_9 || \ depends on BR2_sh
BR2_TOOLCHAIN_GCC_AT_LEAST_10 || \
BR2_TOOLCHAIN_GCC_AT_LEAST_11
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63261. This bug no # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63261. This bug no
# longer exists in gcc 8.x. # longer exists in gcc 8.x.
@@ -144,7 +142,7 @@ config BR2_TOOLCHAIN_HAS_GCC_BUG_64735
!BR2_TOOLCHAIN_GCC_AT_LEAST_7 !BR2_TOOLCHAIN_GCC_AT_LEAST_7
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68485. This bug still # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68485. This bug still
# exists in gcc 9.x # exists in gcc 12.x
config BR2_TOOLCHAIN_HAS_GCC_BUG_68485 config BR2_TOOLCHAIN_HAS_GCC_BUG_68485
bool bool
default y if BR2_microblaze default y if BR2_microblaze
@@ -155,8 +153,9 @@ config BR2_TOOLCHAIN_HAS_GCC_BUG_68485
# it still not been fixed yet. # it still not been fixed yet.
config BR2_TOOLCHAIN_HAS_GCC_BUG_83143 config BR2_TOOLCHAIN_HAS_GCC_BUG_83143
bool bool
default y if BR2_sh default y if !BR2_TOOLCHAIN_GCC_AT_LEAST_10
depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_10 || BR2_TOOLCHAIN_GCC_AT_LEAST_11 default y if BR2_TOOLCHAIN_GCC_AT_LEAST_11
depends on BR2_sh
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85180. This bug no # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85180. This bug no
# longer exists in gcc 8.x. # longer exists in gcc 8.x.
@@ -175,11 +174,12 @@ config BR2_TOOLCHAIN_HAS_GCC_BUG_85862
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90620 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90620
# ICE: in do_output_reload, at reload1.c:7978 on microblaze. # ICE: in do_output_reload, at reload1.c:7978 on microblaze.
# This bug no longer exists in gcc 10.x # This bug no longer exists in gcc 10.x but reappeared in gcc 11.x
config BR2_TOOLCHAIN_HAS_GCC_BUG_90620 config BR2_TOOLCHAIN_HAS_GCC_BUG_90620
bool bool
default y if BR2_microblaze default y if BR2_microblaze
depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_10 depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_10 \
|| BR2_TOOLCHAIN_GCC_AT_LEAST_11
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93847 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93847
# ICE: compiler error: Segmentation fault on Nios II. This bug # ICE: compiler error: Segmentation fault on Nios II. This bug
@@ -207,7 +207,7 @@ config BR2_TOOLCHAIN_HAS_GCC_BUG_101737
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101915 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101915
# ICE: in extract_insn, at recog.c:2294 on microblaze. # ICE: in extract_insn, at recog.c:2294 on microblaze.
# This bug still exists in gcc = 11.1.0 # This bug still exists in gcc = 12.1.0
config BR2_TOOLCHAIN_HAS_GCC_BUG_101915 config BR2_TOOLCHAIN_HAS_GCC_BUG_101915
bool bool
default y if BR2_microblaze default y if BR2_microblaze
@@ -226,6 +226,25 @@ config BR2_TOOLCHAIN_HAS_GCC_BUG_101952
bool bool
default y if BR2_sh4 default y if BR2_sh4
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104028
# ICE: on M68K: Error: value -16034 out of range
# This bug still exists in gcc = 11.1.0
config BR2_TOOLCHAIN_HAS_GCC_BUG_104028
bool
default y if BR2_m68k
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107728
# https://sourceware.org/bugzilla/show_bug.cgi?id=29621
config BR2_TOOLCHAIN_HAS_GCC_BUG_107728
bool
default y if BR2_microblazebe || BR2_microblazeel \
|| BR2_mips || BR2_mipsel \
|| BR2_nios2 \
|| BR2_or1k \
|| BR2_sh
depends on BR2_TOOLCHAIN_USES_GLIBC
depends on BR2_OPTIMIZE_0
config BR2_TOOLCHAIN_HAS_NATIVE_RPC config BR2_TOOLCHAIN_HAS_NATIVE_RPC
bool bool
@@ -572,6 +591,26 @@ config BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_14
config BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_15 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_15
bool bool
select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_14 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_14
config BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_16
bool
select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_15
config BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_17
bool
select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_16
config BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_18
bool
select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_17
config BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_19
bool
select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_18
config BR2_TOOLCHAIN_HEADERS_AT_LEAST_6_0
bool
select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_19
select BR2_TOOLCHAIN_HEADERS_LATEST select BR2_TOOLCHAIN_HEADERS_LATEST
# This should be selected by the latest version, above, to indicate that # This should be selected by the latest version, above, to indicate that
@@ -585,6 +624,11 @@ config BR2_TOOLCHAIN_HEADERS_LATEST
# stops affecting a value on the first matching default. # stops affecting a value on the first matching default.
config BR2_TOOLCHAIN_HEADERS_AT_LEAST config BR2_TOOLCHAIN_HEADERS_AT_LEAST
string string
default "6.0" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_6_0
default "5.19" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_19
default "5.18" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_18
default "5.17" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_17
default "5.16" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_16
default "5.15" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_15 default "5.15" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_15
default "5.14" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_14 default "5.14" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_14
default "5.13" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_13 default "5.13" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_13
@@ -699,10 +743,15 @@ config BR2_TOOLCHAIN_GCC_AT_LEAST_11
bool bool
select BR2_TOOLCHAIN_GCC_AT_LEAST_10 select BR2_TOOLCHAIN_GCC_AT_LEAST_10
config BR2_TOOLCHAIN_GCC_AT_LEAST_12
bool
select BR2_TOOLCHAIN_GCC_AT_LEAST_11
# This order guarantees that the highest version is set, as kconfig # This order guarantees that the highest version is set, as kconfig
# stops affecting a value on the first matching default. # stops affecting a value on the first matching default.
config BR2_TOOLCHAIN_GCC_AT_LEAST config BR2_TOOLCHAIN_GCC_AT_LEAST
string string
default "12" if BR2_TOOLCHAIN_GCC_AT_LEAST_12
default "11" if BR2_TOOLCHAIN_GCC_AT_LEAST_11 default "11" if BR2_TOOLCHAIN_GCC_AT_LEAST_11
default "10" if BR2_TOOLCHAIN_GCC_AT_LEAST_10 default "10" if BR2_TOOLCHAIN_GCC_AT_LEAST_10
default "9" if BR2_TOOLCHAIN_GCC_AT_LEAST_9 default "9" if BR2_TOOLCHAIN_GCC_AT_LEAST_9
+1 -1
View File
@@ -150,7 +150,7 @@ copy_toolchain_sysroot = \
if test -n "$${SUPPORT_LIB_DIR}" ; then \ if test -n "$${SUPPORT_LIB_DIR}" ; then \
cp -a $${SUPPORT_LIB_DIR}/* $(STAGING_DIR)/lib/ ; \ cp -a $${SUPPORT_LIB_DIR}/* $(STAGING_DIR)/lib/ ; \
fi ; \ fi ; \
find $(STAGING_DIR) -type d | xargs chmod 755 find $(STAGING_DIR) -type d -print0 | xargs -0 chmod 755
# #
# Check the specified kernel headers version actually matches the # Check the specified kernel headers version actually matches the
+32 -5
View File
@@ -22,8 +22,7 @@ config BR2_TOOLCHAIN_BUILDROOT_VENDOR
choice choice
prompt "C library" prompt "C library"
default BR2_TOOLCHAIN_BUILDROOT_UCLIBC default BR2_TOOLCHAIN_BUILDROOT_GLIBC
default BR2_TOOLCHAIN_BUILDROOT_GLIBC if BR2_powerpc64
config BR2_TOOLCHAIN_BUILDROOT_UCLIBC config BR2_TOOLCHAIN_BUILDROOT_UCLIBC
bool "uClibc-ng" bool "uClibc-ng"
@@ -66,9 +65,9 @@ config BR2_TOOLCHAIN_BUILDROOT_GLIBC
http://www.gnu.org/software/libc/ http://www.gnu.org/software/libc/
comment "glibc needs a toolchain w/ dynamic library, kernel headers >= 3.2" comment "glibc needs a toolchain w/ kernel headers >= 3.2"
depends on BR2_USE_MMU depends on BR2_PACKAGE_GLIBC_ARCH_SUPPORTS
depends on BR2_STATIC_LIBS || !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2 depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2
# glibc >= 2.26 require kernel headers >= 3.10 on powerpc64le. # glibc >= 2.26 require kernel headers >= 3.10 on powerpc64le.
comment "glibc on powerpc64le needs a toolchain w/ headers >= 3.10" comment "glibc on powerpc64le needs a toolchain w/ headers >= 3.10"
@@ -80,6 +79,22 @@ comment "glibc on MIPS w/ NAN2008 needs a toolchain w/ headers >= 4.5"
depends on BR2_MIPS_NAN_2008 depends on BR2_MIPS_NAN_2008
depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5 depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5
comment "glibc on RISC-V 64-bit needs a toolchain w/ headers >= 5.0"
depends on BR2_RISCV_64
depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_0
comment "glibc on RISC-V 32-bit needs a toolchain w/ headers >= 5.4"
depends on BR2_RISCV_32
depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4
comment "glibc on ARC needs a toolchain w/ headers >= 5.1"
depends on BR2_arc
depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_1
comment "glibc on or1k needs a toolchain w/ headers >= 5.4"
depends on BR2_or1k
depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4
config BR2_TOOLCHAIN_BUILDROOT_MUSL config BR2_TOOLCHAIN_BUILDROOT_MUSL
bool "musl" bool "musl"
depends on BR2_aarch64 || BR2_arm || BR2_armeb || BR2_i386 || \ depends on BR2_aarch64 || BR2_arm || BR2_armeb || BR2_i386 || \
@@ -98,6 +113,18 @@ config BR2_TOOLCHAIN_BUILDROOT_MUSL
https://www.musl-libc.org/ https://www.musl-libc.org/
config BR2_TOOLCHAIN_BUILDROOT_NONE
bool "none"
depends on !BR2_PACKAGE_UCLIBC_SUPPORTS && \
!BR2_PACKAGE_GLIBC_SUPPORTS && \
!BR2_PACKAGE_MUSL_SUPPORTS
help
This option is visible if no C library is available for the
currently selected configuration. If you select this option,
the build will refuse to start as Buildroot needs a C
library to build a toolchain. Change your configuration
settings to make sure one of the C libraries is selected.
endchoice endchoice
config BR2_TOOLCHAIN_BUILDROOT_LIBC config BR2_TOOLCHAIN_BUILDROOT_LIBC
@@ -31,6 +31,10 @@ choice
Set to the gcc version that is used by your external Set to the gcc version that is used by your external
toolchain. toolchain.
config BR2_TOOLCHAIN_EXTERNAL_GCC_12
bool "12.x"
select BR2_TOOLCHAIN_GCC_AT_LEAST_12
config BR2_TOOLCHAIN_EXTERNAL_GCC_11 config BR2_TOOLCHAIN_EXTERNAL_GCC_11
bool "11.x" bool "11.x"
select BR2_TOOLCHAIN_GCC_AT_LEAST_11 select BR2_TOOLCHAIN_GCC_AT_LEAST_11
@@ -123,8 +127,28 @@ choice
If your toolchain uses headers newer than the latest version If your toolchain uses headers newer than the latest version
in the choice, then select the latest version. in the choice, then select the latest version.
config BR2_TOOLCHAIN_EXTERNAL_HEADERS_6_0
bool "6.0.x or later"
select BR2_TOOLCHAIN_HEADERS_AT_LEAST_6_0
config BR2_TOOLCHAIN_EXTERNAL_HEADERS_5_19
bool "5.19.x"
select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_19
config BR2_TOOLCHAIN_EXTERNAL_HEADERS_5_18
bool "5.18.x"
select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_18
config BR2_TOOLCHAIN_EXTERNAL_HEADERS_5_17
bool "5.17.x"
select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_17
config BR2_TOOLCHAIN_EXTERNAL_HEADERS_5_16
bool "5.16.x"
select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_16
config BR2_TOOLCHAIN_EXTERNAL_HEADERS_5_15 config BR2_TOOLCHAIN_EXTERNAL_HEADERS_5_15
bool "5.15.x or later" bool "5.15.x"
select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_15 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_15
config BR2_TOOLCHAIN_EXTERNAL_HEADERS_5_14 config BR2_TOOLCHAIN_EXTERNAL_HEADERS_5_14
+4 -2
View File
@@ -507,8 +507,10 @@ int main(int argc, char **argv)
exec_args = args; exec_args = args;
#ifdef BR_CCACHE #ifdef BR_CCACHE
if (getenv("BR_NO_CCACHE")) /* If BR2_USE_CCACHE is not defined, or its value is not 1,
/* Skip the ccache call */ * skip the ccache call */
char *br_use_ccache = getenv("BR2_USE_CCACHE");
if (!br_use_ccache || strncmp(br_use_ccache, "1", strlen("1")))
exec_args++; exec_args++;
#endif #endif
+4
View File
@@ -26,11 +26,15 @@ TOOLCHAIN_WRAPPER_OPTS += -Wl,--build-id=none
ifeq ($(BR2_TOOLCHAIN_GCC_AT_LEAST_8),y) ifeq ($(BR2_TOOLCHAIN_GCC_AT_LEAST_8),y)
TOOLCHAIN_WRAPPER_OPTS += -ffile-prefix-map=$(BASE_DIR)=buildroot TOOLCHAIN_WRAPPER_OPTS += -ffile-prefix-map=$(BASE_DIR)=buildroot
else else
TOOLCHAIN_WRAPPER_OPTS += -fdebug-prefix-map=$(BASE_DIR)=buildroot
TOOLCHAIN_WRAPPER_OPTS += -D__FILE__=\"\" -D__BASE_FILE__=\"\" -Wno-builtin-macro-redefined TOOLCHAIN_WRAPPER_OPTS += -D__FILE__=\"\" -D__BASE_FILE__=\"\" -Wno-builtin-macro-redefined
endif endif
ifeq ($(BR2_TOOLCHAIN_GCC_AT_LEAST_7),) ifeq ($(BR2_TOOLCHAIN_GCC_AT_LEAST_7),)
TOOLCHAIN_WRAPPER_OPTS += -DBR_NEED_SOURCE_DATE_EPOCH TOOLCHAIN_WRAPPER_OPTS += -DBR_NEED_SOURCE_DATE_EPOCH
endif endif
ifeq ($(BR2_TOOLCHAIN_GCC_AT_LEAST_6),)
TOOLCHAIN_WRAPPER_OPTS += -gno-record-gcc-switches
endif
endif endif
# Disable -ftree-loop-distribute-patterns on microblaze to # Disable -ftree-loop-distribute-patterns on microblaze to
+7 -2
View File
@@ -27,6 +27,10 @@ define TOOLCHAIN_GLIBC_COPY_GCONV_LIBS
$(INSTALL) -m 0644 $(STAGING_DIR)/usr/lib/$${d}/gconv/*.so \ $(INSTALL) -m 0644 $(STAGING_DIR)/usr/lib/$${d}/gconv/*.so \
$(TARGET_DIR)/usr/lib/gconv \ $(TARGET_DIR)/usr/lib/gconv \
|| exit 1; \ || exit 1; \
if [ -d $(STAGING_DIR)/usr/lib/$${d}/gconv/gconv-modules.d ]; then \
cp -a $(STAGING_DIR)/usr/lib/$${d}/gconv/gconv-modules.d \
$(TARGET_DIR)/usr/lib/gconv/ || exit 1; \
fi; \
else \ else \
for l in $(TOOLCHAIN_GLIBC_GCONV_LIBS); do \ for l in $(TOOLCHAIN_GLIBC_GCONV_LIBS); do \
$(INSTALL) -m 0644 -D $(STAGING_DIR)/usr/lib/$${d}/gconv/$${l}.so \ $(INSTALL) -m 0644 -D $(STAGING_DIR)/usr/lib/$${d}/gconv/$${l}.so \
@@ -41,8 +45,9 @@ define TOOLCHAIN_GLIBC_COPY_GCONV_LIBS
|| exit 1; \ || exit 1; \
done; \ done; \
done; \ done; \
./support/scripts/expunge-gconv-modules "$(TOOLCHAIN_GLIBC_GCONV_LIBS)" \ ./support/scripts/expunge-gconv-modules \
<$(STAGING_DIR)/usr/lib/$${d}/gconv/gconv-modules \ $(STAGING_DIR)/usr/lib/$${d}/gconv \
"$(TOOLCHAIN_GLIBC_GCONV_LIBS)" \
>$(TARGET_DIR)/usr/lib/gconv/gconv-modules; \ >$(TARGET_DIR)/usr/lib/gconv/gconv-modules; \
fi fi
endef endef