diff options
author | Patrick Georgi <patrick@coreboot.org> | 2022-09-08 20:25:46 +0200 |
---|---|---|
committer | Patrick Georgi <patrick@coreboot.org> | 2022-09-17 05:56:34 +0000 |
commit | f0d5f67e46cac62f485805626ca4a7c4dd622a08 (patch) | |
tree | 9f2fefd269f7ef6944335898d1a0116a9ef61133 /util/crossgcc | |
parent | 2c38933a0e461855c8eab997fc66baffa449f674 (diff) |
riscv: Enable the newfangled way of selecting instruction sets
gcc12+ will require riscv architecture selection to come not only with
featurei suffixd charactersa, it also comes with feature_ful suffix_ed
words_mith. Much creative, very appreciate.
To accommodate for this madness, enable the already existing (but off by
default) support for that in our gcc11 build, support using by detecting
the compiler's behavior in xcompile and pass that knowledge along to our
build system.
Then cross our fingers and hope for the best!
Change-Id: I5dfeed766626e78d4f8378d9d857b7a4d61510fd
Signed-off-by: Patrick Georgi <patrick@coreboot.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67457
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
Diffstat (limited to 'util/crossgcc')
-rwxr-xr-x | util/crossgcc/buildgcc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/util/crossgcc/buildgcc b/util/crossgcc/buildgcc index 97d98b1977..a36c25bf1d 100755 --- a/util/crossgcc/buildgcc +++ b/util/crossgcc/buildgcc @@ -681,11 +681,13 @@ build_BINUTILS() { if [ $TARGETARCH = "x86_64-elf" ]; then ADDITIONALTARGET=",i386-elf" fi + # shellcheck disable=SC2086 CC="$(hostcc target)" CXX="$(hostcxx target)" \ ../binutils-${BINUTILS_VERSION}/configure --prefix="$TARGETDIR" \ --target=${TARGETARCH} --enable-targets=${TARGETARCH}${ADDITIONALTARGET} \ --disable-werror --disable-nls --enable-lto \ --enable-gold --enable-multilib \ + ${BINUTILS_OPTIONS} \ CFLAGS="$HOSTCFLAGS" \ CXXFLAGS="$HOSTCFLAGS" \ || touch .failed @@ -932,7 +934,9 @@ case "$TARGETARCH" in x86_64*) TARGETARCH=x86_64-elf;; i386-elf) ;; i386-mingw32) ;; - riscv-elf) TARGETARCH=riscv64-elf;; + riscv-elf) TARGETARCH=riscv64-elf + GCC_OPTIONS="$GCC_OPTIONS --with-isa-spec=20191213" + BINUTILS_OPTIONS="$BINUTILS_OPTIONS --with-isa-spec=20191213";; powerpc64*-linux*) ;; i386*) TARGETARCH=i386-elf;; arm*) TARGETARCH=arm-eabi;; |