crossgcc: Distinguish bootstrap and target compiler options

GCC_OPTIONS is only used for target specific options right now,
so rename to TARGET_GCC_OPTIONS and only use them in the
non-bootstrap build.

Adapt BINUTILS_OPTIONS for consistency, even though it doesn't
have the same problem.

Change-Id: I5e4f54b758dd7daf4e69101c19dfa1212fa64cf6
Signed-off-by: Patrick Georgi <patrick@georgi.software>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/80229
Reviewed-by: Martin L Roth <gaumless@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
This commit is contained in:
Patrick Georgi 2024-01-28 01:20:43 +01:00 committed by Patrick Georgi
parent 50e8579bfd
commit f67005db0a
1 changed files with 4 additions and 3 deletions

View File

@ -722,7 +722,7 @@ build_BINUTILS() {
--enable-multilib \ --enable-multilib \
--disable-docs \ --disable-docs \
--disable-texinfo \ --disable-texinfo \
${BINUTILS_OPTIONS} \ ${TARGET_BINUTILS_OPTIONS} \
CFLAGS="$HOSTCFLAGS" \ CFLAGS="$HOSTCFLAGS" \
CXXFLAGS="$HOSTCFLAGS" || touch .failed CXXFLAGS="$HOSTCFLAGS" || touch .failed
# shellcheck disable=SC2086 # shellcheck disable=SC2086
@ -811,6 +811,7 @@ build_cross_GCC() {
--disable-libcc1 \ --disable-libcc1 \
--disable-decimal-float \ --disable-decimal-float \
${GCC_OPTIONS} \ ${GCC_OPTIONS} \
${TARGET_GCC_OPTIONS} \
--enable-languages="${LANGUAGES}" \ --enable-languages="${LANGUAGES}" \
--with-system-zlib \ --with-system-zlib \
--with-gmp="$DESTDIR$TARGETDIR" \ --with-gmp="$DESTDIR$TARGETDIR" \
@ -995,8 +996,8 @@ case "$TARGETARCH" in
i386-elf) ;; i386-elf) ;;
i386-mingw32) ;; i386-mingw32) ;;
riscv-elf) TARGETARCH=riscv64-elf riscv-elf) TARGETARCH=riscv64-elf
GCC_OPTIONS="$GCC_OPTIONS --with-isa-spec=20191213" TARGET_GCC_OPTIONS="$TARGET_GCC_OPTIONS --with-isa-spec=20191213"
BINUTILS_OPTIONS="$BINUTILS_OPTIONS --with-isa-spec=20191213";; TARGET_BINUTILS_OPTIONS="$TARGET_BINUTILS_OPTIONS --with-isa-spec=20191213";;
powerpc64*-linux*) ;; powerpc64*-linux*) ;;
i386*) TARGETARCH=i386-elf;; i386*) TARGETARCH=i386-elf;;
arm*) TARGETARCH=arm-eabi;; arm*) TARGETARCH=arm-eabi;;