Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC
Commits:
-
81577fe7
by Ben Gamari at 2025-08-02T04:29:39-04:00
1 changed file:
Changes:
... | ... | @@ -351,15 +351,23 @@ fi |
351 | 351 | |
352 | 352 | dnl ** Building a cross compiler?
|
353 | 353 | dnl --------------------------------------------------------------
|
354 | -CrossCompiling=NO
|
|
355 | -# If 'host' and 'target' differ, then this means we are building a cross-compiler.
|
|
356 | -if test "$target" != "$host" ; then
|
|
357 | - CrossCompiling=YES
|
|
358 | - cross_compiling=yes # This tells configure that it can accept just 'target',
|
|
359 | - # otherwise you get
|
|
360 | - # configure: error: cannot run C compiled programs.
|
|
361 | - # If you meant to cross compile, use `--host'.
|
|
354 | +dnl We allow the user to override this since the target/host check
|
|
355 | +dnl can get this wrong in some particular cases. See #26236.
|
|
356 | +if test -z "$CrossCompiling" ; then
|
|
357 | + CrossCompiling=NO
|
|
358 | + # If 'host' and 'target' differ, then this means we are building a cross-compiler.
|
|
359 | + if test "$target" != "$host" ; then
|
|
360 | + CrossCompiling=YES
|
|
361 | + fi
|
|
362 | +fi
|
|
363 | +if test "$CrossCompiling" = "YES"; then
|
|
364 | + # This tells configure that it can accept just 'target',
|
|
365 | + # otherwise you get
|
|
366 | + # configure: error: cannot run C compiled programs.
|
|
367 | + # If you meant to cross compile, use `--host'.
|
|
368 | + cross_compiling=yes
|
|
362 | 369 | fi
|
370 | + |
|
363 | 371 | if test "$BuildPlatform" != "$HostPlatform" ; then
|
364 | 372 | AC_MSG_ERROR([
|
365 | 373 | You've selected:
|