[Git][ghc/ghc][wip/romes/target-has-rts-linker] configure: Drop unused AC_PROG_CPP
Rodrigo Mesquita (@alt-romes)
gitlab at gitlab.haskell.org
Fri May 12 11:15:31 UTC 2023
Rodrigo Mesquita pushed to branch wip/romes/target-has-rts-linker at Glasgow Haskell Compiler / GHC
Commits:
1aea4a06 by Rodrigo Mesquita at 2023-05-12T12:10:10+01:00
configure: Drop unused AC_PROG_CPP
In configure, we were calling `AC_PROG_CPP` but never making use of the
$CPP variable it sets or reads.
The issue is $CPP will show up in the --help output of configure,
falsely advertising a configuration option that does nothing.
The reason we don't use the $CPP variable is because HS_CPP_CMD is
expected to be a single command (without flags), but AC_PROG_CPP, when
CPP is unset, will set said variable to something like `/usr/bin/gcc -E`.
Instead, we configure HS_CPP_CMD through $CC.
- - - - -
1 changed file:
- configure.ac
Changes:
=====================================
configure.ac
=====================================
@@ -330,6 +330,18 @@ if test x"$TablesNextToCode" = xYES; then
fi
AC_SUBST(TablesNextToCode)
+dnl ** Does target have runtime linker support?
+dnl --------------------------------------------------------------
+case "$target" in
+ powerpc64-*|powerpc64le-*|powerpc-ibm-aix*|s390x-ibm-linux|riscv64-*|wasm*|javascript-*|loongarch64-*)
+ TargetHasRTSLinker=NO
+ ;;
+ *)
+ TargetHasRTSLinker=YES
+ ;;
+esac
+AC_SUBST(TargetHasRTSLinker)
+
# Requires FPTOOLS_SET_PLATFORMS_VARS to be run first.
FP_FIND_ROOT
@@ -465,9 +477,6 @@ MAYBE_OVERRIDE_STAGE0([ar],[AR_STAGE0])
dnl make extensions visible to allow feature-tests to detect them lateron
AC_USE_SYSTEM_EXTENSIONS
-dnl ** figure out how to invoke the C preprocessor (i.e. `gcc -E`)
-AC_PROG_CPP
-
# --with-hs-cpp/--with-hs-cpp-flags
FP_CPP_CMD_WITH_ARGS(HaskellCPPCmd, HaskellCPPArgs)
AC_SUBST([HaskellCPPCmd])
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/1aea4a06554eb85db825ecaf51911a23695d6acc
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/1aea4a06554eb85db825ecaf51911a23695d6acc
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/20230512/3893ca03/attachment-0001.html>
More information about the ghc-commits
mailing list