Commit b55ee979 authored by John Ericson's avatar John Ericson Committed by Marge Bot

Make sure all boolean settings entries use `YES` / `NO`

Some where using `True` / `False`, a legacy of when they were in
`Config.hs`. See #16914 / d238d306 for a similar problem.

Also clean up the configure variables names for consistency and clarity
while we're at it. "Target" makes clear we are talking about outputted
code, not where GHC itself runs.
parent f96d57b8
Pipeline #9937 failed with stages
in 382 minutes and 44 seconds
......@@ -315,11 +315,11 @@ AC_DEFUN([FPTOOLS_SET_HASKELL_PLATFORM_VARS],
AC_LINK_IFELSE(
[AC_LANG_PROGRAM([], [__asm__ (".subsections_via_symbols");])],
[AC_MSG_RESULT(yes)
HaskellHaveSubsectionsViaSymbols=True
TargetHasSubsectionsViaSymbols=YES
AC_DEFINE([HAVE_SUBSECTIONS_VIA_SYMBOLS],[1],
[Define to 1 if Apple-style dead-stripping is supported.])
],
[HaskellHaveSubsectionsViaSymbols=False
[TargetHasSubsectionsViaSymbols=NO
AC_MSG_RESULT(no)])
dnl ** check for .ident assembler directive
......@@ -329,9 +329,9 @@ AC_DEFUN([FPTOOLS_SET_HASKELL_PLATFORM_VARS],
AC_LINK_IFELSE(
[AC_LANG_PROGRAM([__asm__ (".ident \"GHC x.y.z\"");], [])],
[AC_MSG_RESULT(yes)
HaskellHaveIdentDirective=True],
TargetHasIdentDirective=YES],
[AC_MSG_RESULT(no)
HaskellHaveIdentDirective=False])
TargetHasIdentDirective=NO])
dnl *** check for GNU non-executable stack note support (ELF only)
dnl (.section .note.GNU-stack,"",@progbits)
......@@ -361,9 +361,9 @@ AC_DEFUN([FPTOOLS_SET_HASKELL_PLATFORM_VARS],
__asm__ (".section .text");
], [0])],
[AC_MSG_RESULT(yes)
HaskellHaveGnuNonexecStack=True],
TargetHasGnuNonexecStack=YES],
[AC_MSG_RESULT(no)
HaskellHaveGnuNonexecStack=False])
TargetHasGnuNonexecStack=NO])
CFLAGS="$CFLAGS2"
checkArch "$BuildArch" "HaskellBuildArch"
......@@ -380,9 +380,9 @@ AC_DEFUN([FPTOOLS_SET_HASKELL_PLATFORM_VARS],
AC_SUBST(HaskellTargetArch)
AC_SUBST(HaskellTargetOs)
AC_SUBST(HaskellHaveSubsectionsViaSymbols)
AC_SUBST(HaskellHaveIdentDirective)
AC_SUBST(HaskellHaveGnuNonexecStack)
AC_SUBST(TargetHasSubsectionsViaSymbols)
AC_SUBST(TargetHasIdentDirective)
AC_SUBST(TargetHasGnuNonexecStack)
])
......
......@@ -324,13 +324,13 @@ dnl ** Does target have runtime linker support?
dnl --------------------------------------------------------------
case "$target" in
powerpc64-*|powerpc64le-*|powerpc-ibm-aix*)
HaskellHaveRTSLinker=NO
TargetHasRTSLinker=NO
;;
*)
HaskellHaveRTSLinker=YES
TargetHasRTSLinker=YES
;;
esac
AC_SUBST(HaskellHaveRTSLinker)
AC_SUBST(TargetHasRTSLinker)
# Requires FPTOOLS_SET_PLATFORM_VARS to be run first.
FP_FIND_ROOT
......
......@@ -18,8 +18,8 @@ FP_GMP
dnl Various things from the source distribution configure
bootstrap_target=@TargetPlatform@
HaskellHaveRTSLinker=@HaskellHaveRTSLinker@
AC_SUBST(HaskellHaveRTSLinker)
HaveRTSLinker=@HaveRTSLinker@
AC_SUBST(HaveRTSLinker)
Please register or sign in to reply
FFIIncludeDir=@FFIIncludeDir@
FFILibDir=@FFILibDir@
......
......@@ -145,10 +145,10 @@ settings-opt-command = @SettingsOptCommand@
haskell-target-os = @HaskellTargetOs@
haskell-target-arch = @HaskellTargetArch@
target-word-size = @TargetWordSize@
haskell-have-gnu-nonexec-stack = @HaskellHaveGnuNonexecStack@
haskell-have-ident-directive = @HaskellHaveIdentDirective@
haskell-have-subsections-via-symbols = @HaskellHaveSubsectionsViaSymbols@
haskell-have-rts-linker = @HaskellHaveRTSLinker@
target-has-gnu-nonexec-stack = @TargetHasGnuNonexecStack@
target-has-ident-directive = @TargetHasIdentDirective@
target-has-subsections-via-symbols = @TargetHasSubsectionsViaSymbols@
target-has-rts-linker = @TargetHasRTSLinker@
# Include and library directories:
#=================================
......
......@@ -298,10 +298,10 @@ generateSettings = do
, ("target os", expr $ lookupValueOrError configFile "haskell-target-os")
, ("target arch", expr $ lookupValueOrError configFile "haskell-target-arch")
, ("target word size", expr $ lookupValueOrError configFile "target-word-size")
, ("target has GNU nonexec stack", expr $ lookupValueOrError configFile "haskell-have-gnu-nonexec-stack")
, ("target has .ident directive", expr $ lookupValueOrError configFile "haskell-have-ident-directive")
, ("target has subsections via symbols", expr $ lookupValueOrError configFile "haskell-have-subsections-via-symbols")
, ("target has RTS linker", expr $ lookupValueOrError configFile "haskell-have-rts-linker")
, ("target has GNU nonexec stack", expr $ lookupValueOrError configFile "target-has-gnu-nonexec-stack")
, ("target has .ident directive", expr $ lookupValueOrError configFile "target-has-ident-directive")
, ("target has subsections via symbols", expr $ lookupValueOrError configFile "target-has-subsections-via-symbols")
, ("target has RTS linker", expr $ lookupValueOrError configFile "target-has-rts-linker")
, ("Unregisterised", expr $ yesNo <$> flag GhcUnregisterised)
, ("LLVM target", getSetting LlvmTarget)
, ("LLVM llc command", expr $ settingsFileSetting SettingsFileSetting_LlcCommand)
......
......@@ -196,11 +196,11 @@ $(includes_SETTINGS) : includes/Makefile | $$(dir $$@)/.
@echo ',("target os", "$(HaskellTargetOs)")' >> $@
@echo ',("target arch", "$(HaskellTargetArch)")' >> $@
@echo ',("target word size", "$(TargetWordSize)")' >> $@
@echo ',("target has GNU nonexec stack", "$(HaskellHaveGnuNonexecStack)")' >> $@
@echo ',("target has .ident directive", "$(HaskellHaveIdentDirective)")' >> $@
@echo ',("target has subsections via symbols", "$(HaskellHaveSubsectionsViaSymbols)")' >> $@
@echo ',("target has RTS linker", "$(HaskellHaveRTSLinker)")' >> $@
@echo ',("Unregisterised", "$(Unregisterised)")' >> $@
@echo ',("target has GNU nonexec stack", "$(TargetHasGnuNonexecStack)")' >> $@
@echo ',("target has .ident directive", "$(TargetHasIdentDirective)")' >> $@
@echo ',("target has subsections via symbols", "$(TargetHasSubsectionsViaSymbols)")' >> $@
@echo ',("target has RTS linker", "$(TargetHasRTSLinker)")' >> $@
@echo ',("Unregisterised", "$(GhcUnregisterised)")' >> $@
@echo ',("LLVM target", "$(LLVMTarget_CPP)")' >> $@
@echo ',("LLVM llc command", "$(SettingsLlcCommand)")' >> $@
@echo ',("LLVM opt command", "$(SettingsOptCommand)")' >> $@
......
......@@ -37,9 +37,9 @@ getTargetPlatform settingsFile mySettings = do
targetOS <- readSetting "target os"
targetWordSize <- readSetting "target word size"
targetUnregisterised <- getBooleanSetting "Unregisterised"
targetHasGnuNonexecStack <- readSetting "target has GNU nonexec stack"
targetHasIdentDirective <- readSetting "target has .ident directive"
targetHasSubsectionsViaSymbols <- readSetting "target has subsections via symbols"
targetHasGnuNonexecStack <- getBooleanSetting "target has GNU nonexec stack"
targetHasIdentDirective <- getBooleanSetting "target has .ident directive"
targetHasSubsectionsViaSymbols <- getBooleanSetting "target has subsections via symbols"
crossCompiling <- getBooleanSetting "cross compiling"
pure $ Platform
......
......@@ -489,11 +489,10 @@ ArArgs = @ArArgs@
HaskellTargetOs = @HaskellTargetOs@
HaskellTargetArch = @HaskellTargetArch@
TargetWordSize = @TargetWordSize@
HaskellHaveGnuNonexecStack = @HaskellHaveGnuNonexecStack@
HaskellHaveIdentDirective = @HaskellHaveIdentDirective@
HaskellHaveSubsectionsViaSymbols = @HaskellHaveSubsectionsViaSymbols@
HaskellHaveRTSLinker = @HaskellHaveRTSLinker@
Unregisterised = @Unregisterised@
TargetHasGnuNonexecStack = @TargetHasGnuNonexecStack@
TargetHasIdentDirective = @TargetHasIdentDirective@
TargetHasSubsectionsViaSymbols = @TargetHasSubsectionsViaSymbols@
TargetHasRTSLinker = @TargetHasRTSLinker@
TablesNextToCode = @TablesNextToCode@
SettingsCCompilerCommand = @SettingsCCompilerCommand@
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment