haskell.compiler: no dynamic way without enableShared/enableProfiledLibs
This disables building dynamic libraries for GHC 9.4.x and before, when enableShared and enableProfiledLibs are set to false. Currently this only disables dynamic linking of GHC itself, but still creates dynamic libraries. The hadrian-based GHC 9.6+ already disable building dynamic libraries via the no_dynamic_libs transformer in this case. The reason for this happening before was, that the default was assumed to be "v p dyn", of which "p" was taken away when profiled libs were disabled. But this would unconditionally enable the dyn way. Using the BUILD_PROF_LIBS flag in this case will let GHC's config.mk.in script make the proper decisions about which GhcLibWays to build.
This commit is contained in:
parent
12e40910df
commit
f4f56c7af2
@ -103,7 +103,7 @@ let
|
||||
Stage1Only = ${if targetPlatform.system == hostPlatform.system then "NO" else "YES"}
|
||||
CrossCompilePrefix = ${targetPrefix}
|
||||
'' + lib.optionalString (!enableProfiledLibs) ''
|
||||
GhcLibWays = "v dyn"
|
||||
BUILD_PROF_LIBS = NO
|
||||
'' + lib.optionalString enableRelocatedStaticLibs ''
|
||||
GhcLibHcOpts += -fPIC
|
||||
GhcRtsHcOpts += -fPIC
|
||||
|
@ -105,7 +105,7 @@ let
|
||||
Stage1Only = ${if targetPlatform.system == hostPlatform.system then "NO" else "YES"}
|
||||
CrossCompilePrefix = ${targetPrefix}
|
||||
'' + lib.optionalString (!enableProfiledLibs) ''
|
||||
GhcLibWays = "v dyn"
|
||||
BUILD_PROF_LIBS = NO
|
||||
'' +
|
||||
# -fexternal-dynamic-refs apparently (because it's not clear from the documentation)
|
||||
# makes the GHC RTS able to load static libraries, which may be needed for TemplateHaskell.
|
||||
|
@ -105,7 +105,7 @@ let
|
||||
Stage1Only = ${if targetPlatform.system == hostPlatform.system then "NO" else "YES"}
|
||||
CrossCompilePrefix = ${targetPrefix}
|
||||
'' + lib.optionalString (!enableProfiledLibs) ''
|
||||
GhcLibWays = "v dyn"
|
||||
BUILD_PROF_LIBS = NO
|
||||
'' +
|
||||
# -fexternal-dynamic-refs apparently (because it's not clear from the documentation)
|
||||
# makes the GHC RTS able to load static libraries, which may be needed for TemplateHaskell.
|
||||
|
@ -105,7 +105,7 @@ let
|
||||
Stage1Only = ${if targetPlatform.system == hostPlatform.system then "NO" else "YES"}
|
||||
CrossCompilePrefix = ${targetPrefix}
|
||||
'' + lib.optionalString (!enableProfiledLibs) ''
|
||||
GhcLibWays = "v dyn"
|
||||
BUILD_PROF_LIBS = NO
|
||||
'' +
|
||||
# -fexternal-dynamic-refs apparently (because it's not clear from the documentation)
|
||||
# makes the GHC RTS able to load static libraries, which may be needed for TemplateHaskell.
|
||||
|
@ -105,7 +105,7 @@ let
|
||||
Stage1Only = ${if targetPlatform.system == hostPlatform.system then "NO" else "YES"}
|
||||
CrossCompilePrefix = ${targetPrefix}
|
||||
'' + lib.optionalString (!enableProfiledLibs) ''
|
||||
GhcLibWays = "v dyn"
|
||||
BUILD_PROF_LIBS = NO
|
||||
'' +
|
||||
# -fexternal-dynamic-refs apparently (because it's not clear from the documentation)
|
||||
# makes the GHC RTS able to load static libraries, which may be needed for TemplateHaskell.
|
||||
|
@ -105,7 +105,7 @@ let
|
||||
Stage1Only = ${if targetPlatform.system == hostPlatform.system then "NO" else "YES"}
|
||||
CrossCompilePrefix = ${targetPrefix}
|
||||
'' + lib.optionalString (!enableProfiledLibs) ''
|
||||
GhcLibWays = "v dyn"
|
||||
BUILD_PROF_LIBS = NO
|
||||
'' +
|
||||
# -fexternal-dynamic-refs apparently (because it's not clear from the documentation)
|
||||
# makes the GHC RTS able to load static libraries, which may be needed for TemplateHaskell.
|
||||
|
@ -107,7 +107,7 @@ let
|
||||
Stage1Only = ${if targetPlatform.system == hostPlatform.system then "NO" else "YES"}
|
||||
CrossCompilePrefix = ${targetPrefix}
|
||||
'' + lib.optionalString (!enableProfiledLibs) ''
|
||||
GhcLibWays = "v dyn"
|
||||
BUILD_PROF_LIBS = NO
|
||||
'' +
|
||||
# -fexternal-dynamic-refs apparently (because it's not clear from the documentation)
|
||||
# makes the GHC RTS able to load static libraries, which may be needed for TemplateHaskell.
|
||||
|
@ -107,7 +107,7 @@ let
|
||||
Stage1Only = ${if targetPlatform.system == hostPlatform.system then "NO" else "YES"}
|
||||
CrossCompilePrefix = ${targetPrefix}
|
||||
'' + lib.optionalString (!enableProfiledLibs) ''
|
||||
GhcLibWays = "v dyn"
|
||||
BUILD_PROF_LIBS = NO
|
||||
'' +
|
||||
# -fexternal-dynamic-refs apparently (because it's not clear from the documentation)
|
||||
# makes the GHC RTS able to load static libraries, which may be needed for TemplateHaskell.
|
||||
|
@ -107,7 +107,7 @@ let
|
||||
Stage1Only = ${if targetPlatform.system == hostPlatform.system then "NO" else "YES"}
|
||||
CrossCompilePrefix = ${targetPrefix}
|
||||
'' + lib.optionalString (!enableProfiledLibs) ''
|
||||
GhcLibWays = "v dyn"
|
||||
BUILD_PROF_LIBS = NO
|
||||
'' +
|
||||
# -fexternal-dynamic-refs apparently (because it's not clear from the documentation)
|
||||
# makes the GHC RTS able to load static libraries, which may be needed for TemplateHaskell.
|
||||
|
@ -107,7 +107,7 @@ let
|
||||
Stage1Only = ${if targetPlatform.system == hostPlatform.system then "NO" else "YES"}
|
||||
CrossCompilePrefix = ${targetPrefix}
|
||||
'' + lib.optionalString (!enableProfiledLibs) ''
|
||||
GhcLibWays = "v dyn"
|
||||
BUILD_PROF_LIBS = NO
|
||||
'' +
|
||||
# -fexternal-dynamic-refs apparently (because it's not clear from the documentation)
|
||||
# makes the GHC RTS able to load static libraries, which may be needed for TemplateHaskell.
|
||||
|
Loading…
Reference in New Issue
Block a user