[Git][ghc/ghc][wip/hadrian-windows-bindist-cross] fixes

Matthew Pickering (@mpickering) gitlab at gitlab.haskell.org
Thu Aug 24 10:07:05 UTC 2023



Matthew Pickering pushed to branch wip/hadrian-windows-bindist-cross at Glasgow Haskell Compiler / GHC


Commits:
e30e8154 by Matthew Pickering at 2023-08-24T11:06:55+01:00
fixes

- - - - -


2 changed files:

- configure.ac
- m4/fp_prog_ld_target.m4


Changes:

=====================================
configure.ac
=====================================
@@ -493,9 +493,6 @@ FP_PROG_LD_IS_GNU
 FP_PROG_LD_NO_COMPACT_UNWIND
 FP_PROG_LD_FILELIST
 
-FP_PROG_CC_LINKER_TARGET([CONF_GCC_LINKER_OPTS_STAGE1])
-FP_PROG_CC_LINKER_TARGET([CONF_GCC_LINKER_OPTS_STAGE2])
-FP_PROG_CC_LINKER_TARGET([CFLAGS])
 
 dnl ** Which nm to use?
 dnl --------------------------------------------------------------
@@ -666,6 +663,10 @@ FP_CC_SUPPORTS_TARGET([$CC_STAGE0], [CONF_CC_OPTS_STAGE0], [CONF_CXX_OPTS_STAGE0
 FP_CC_SUPPORTS_TARGET([$CC], [CONF_CC_OPTS_STAGE1], [CONF_CXX_OPTS_STAGE1], [CONF_GCC_LINKER_OPTS_STAGE1])
 FP_CC_SUPPORTS_TARGET([$CC], [CONF_CC_OPTS_STAGE2], [CONF_CXX_OPTS_STAGE2], [CONF_GCC_LINKER_OPTS_STAGE2])
 
+FP_PROG_CC_LINKER_TARGET([CONF_GCC_LINKER_OPTS_STAGE1])
+FP_PROG_CC_LINKER_TARGET([CONF_GCC_LINKER_OPTS_STAGE2])
+FP_PROG_CC_LINKER_TARGET([CFLAGS])
+
 dnl Pass -Qunused-arguments or otherwise GHC will have very noisy invocations of Clang
 dnl TODO: Do we need -Qunused-arguments in CXX and GCC linker too?
 FP_CC_IGNORE_UNUSED_ARGS([$CC_STAGE0], [CONF_CC_OPTS_STAGE0])


=====================================
m4/fp_prog_ld_target.m4
=====================================
@@ -3,21 +3,17 @@
 # Check to see if the C compiler used as a linker supports `--target`
 AC_DEFUN([FP_PROG_CC_LINKER_TARGET],
 [
-AC_MSG_CHECKING([whether $CC used as a linker understands --target],
-[
+    AC_MSG_CHECKING([whether $CC used as a linker understands --target])
     echo 'int foo() { return 0; }' > conftest1.c
     echo 'int bar() { return 0; }' > conftest2.c
     ${CC} -c conftest1.c
     ${CC} -c conftest2.c
-    if "$CC" $$2 --target=$LlvmTarget -o conftest conftest1.o conftest2.o
-    # > /dev/null 2>&1
+    if "$CC" $$2 --target=$LlvmTarget -o conftest conftest1.o conftest2.o > /dev/null 2>&1 ;
     then
         $2="--target=$LlvmTarget $$2"
         AC_MSG_RESULT([yes])
     else
-        fp_cv_cc_linker_target=no
         AC_MSG_RESULT([no])
     fi
     rm -rf conftest*
-])
 ])# FP_PROG_CC_LINKER_TARGET



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/e30e8154076905fff5a6cd3644b8827b2914013f

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/e30e8154076905fff5a6cd3644b8827b2914013f
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20230824/10db0148/attachment-0001.html>


More information about the ghc-commits mailing list