diff --git a/tests/scripts/components-compiler.sh b/tests/scripts/components-compiler.sh index 919dbce9ba..fa8f6126ec 100644 --- a/tests/scripts/components-compiler.sh +++ b/tests/scripts/components-compiler.sh @@ -80,7 +80,13 @@ support_test_gcc_latest_opt () { # For the time being, we don't make $GCC_LATEST be GCC 15 on the CI # platform, because that would break branches where #9814 isn'f fixed yet. support_test_gcc15_drivers_opt () { - test -x /usr/local/gcc-15/bin/gcc-15 + if type gcc-15 >/dev/null 2>/dev/null; then + GCC_15=gcc-15 + elif [ -x /usr/local/gcc-15/bin/gcc-15 ]; then + GCC_15=/usr/local/gcc-15/bin/gcc-15 + else + return 1 + fi } component_test_gcc15_drivers_opt () { msg "build: GCC 15: full + test drivers dispatching to builtins" @@ -95,7 +101,7 @@ component_test_gcc15_drivers_opt () { # Also disable a warning that we don't yet comply to. loc_cflags="${loc_cflags} -Wno-error=unterminated-string-initialization" - make CC=/usr/local/gcc-15/bin/gcc-15 CFLAGS="${loc_cflags}" LDFLAGS="$ASAN_CFLAGS" + make CC=$GCC_15 CFLAGS="${loc_cflags}" LDFLAGS="$ASAN_CFLAGS" msg "test: GCC 15: full + test drivers dispatching to builtins" make test