[Git][ghc/ghc][master] Configure: Fix check for --target support in stage0 CC
Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: 43638643 by Andreas Klebinger at 2026-03-15T18:15:48-04:00 Configure: Fix check for --target support in stage0 CC The check FP_PROG_CC_LINKER_TARGET used $CC unconditionally to check for --target support. However this fails for the stage0 config where the C compiler used is not $CC but $CC_STAGE0. Since we already pass the compiler under test into the macro I simply changed it to use that instead. Fixes #26999 - - - - - 1 changed file: - m4/fp_prog_cc_linker_target.m4 Changes: ===================================== m4/fp_prog_cc_linker_target.m4 ===================================== @@ -8,7 +8,7 @@ # a linker AC_DEFUN([FP_PROG_CC_LINKER_TARGET], [ - AC_MSG_CHECKING([whether $CC used as a linker understands --target]) + AC_MSG_CHECKING([whether $1 used as a linker understands --target]) echo 'int foo() { return 0; }' > conftest1.c echo 'int main() { return 0; }' > conftest2.c @@ -20,7 +20,7 @@ AC_DEFUN([FP_PROG_CC_LINKER_TARGET], # See Note [Don't pass --target to emscripten toolchain] in GHC.Toolchain.Program CONF_CC_SUPPORTS_TARGET=NO AC_MSG_RESULT([no]) - elif "$CC" $$3 --target=$LlvmTarget -o conftest conftest1.o conftest2.o; + elif "$1" $$3 --target=$LlvmTarget -o conftest conftest1.o conftest2.o; then $3="--target=$LlvmTarget $$3" AC_MSG_RESULT([yes]) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/43638643adbe999de8d2288a40bdd15c... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/43638643adbe999de8d2288a40bdd15c... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
Marge Bot (@marge-bot)