Commit b7126674 authored by ian@well-typed.com's avatar ian@well-typed.com
Browse files

By default, use the dynamic way for programs in the GHC tree

In particular, this means that GHCi will use DLLs, rather than loading
object files itself.
parent 5319ea79
...@@ -110,6 +110,12 @@ ifeq "$(UseLibFFIForAdjustors)" "YES" ...@@ -110,6 +110,12 @@ ifeq "$(UseLibFFIForAdjustors)" "YES"
@echo 'cLibFFI = True' >> $@ @echo 'cLibFFI = True' >> $@
else else
@echo 'cLibFFI = False' >> $@ @echo 'cLibFFI = False' >> $@
endif
@echo 'cDYNAMIC_GHC_PROGRAMS :: Bool' >> $@
ifeq "$(DYNAMIC_GHC_PROGRAMS)" "YES"
@echo 'cDYNAMIC_GHC_PROGRAMS = True' >> $@
else
@echo 'cDYNAMIC_GHC_PROGRAMS = False' >> $@
endif endif
@echo done. @echo done.
...@@ -483,6 +489,10 @@ $(foreach way,$(compiler_stage3_WAYS),\ ...@@ -483,6 +489,10 @@ $(foreach way,$(compiler_stage3_WAYS),\
# switch off the recompilation checker for that module: # switch off the recompilation checker for that module:
compiler/prelude/PrimOp_HC_OPTS += -fforce-recomp compiler/prelude/PrimOp_HC_OPTS += -fforce-recomp
ifeq "$(DYNAMIC_GHC_PROGRAMS)" "YES"
compiler/utils/Util_HC_OPTS += -DDYNAMIC_GHC_PROGRAMS
endif
# LibFFI.hs #includes ffi.h # LibFFI.hs #includes ffi.h
ifneq "$(UseSystemLibFFI)" "YES" ifneq "$(UseSystemLibFFI)" "YES"
compiler/stage2/build/LibFFI.hs : $(libffi_HEADERS) compiler/stage2/build/LibFFI.hs : $(libffi_HEADERS)
......
...@@ -414,14 +414,14 @@ preloadLib dflags lib_paths framework_paths lib_spec ...@@ -414,14 +414,14 @@ preloadLib dflags lib_paths framework_paths lib_spec
preload_static _paths name preload_static _paths name
= do b <- doesFileExist name = do b <- doesFileExist name
if not b then return False if not b then return False
else do if dYNAMIC_BY_DEFAULT dflags else do if cDYNAMIC_GHC_PROGRAMS
then dynLoadObjs dflags [name] then dynLoadObjs dflags [name]
else loadObj name else loadObj name
return True return True
preload_static_archive _paths name preload_static_archive _paths name
= do b <- doesFileExist name = do b <- doesFileExist name
if not b then return False if not b then return False
else do if dYNAMIC_BY_DEFAULT dflags else do if cDYNAMIC_GHC_PROGRAMS
then panic "Loading archives not supported" then panic "Loading archives not supported"
else loadArchive name else loadArchive name
return True return True
...@@ -485,9 +485,8 @@ dieWith dflags span msg = throwGhcExceptionIO (ProgramError (showSDoc dflags (mk ...@@ -485,9 +485,8 @@ dieWith dflags span msg = throwGhcExceptionIO (ProgramError (showSDoc dflags (mk
checkNonStdWay :: DynFlags -> SrcSpan -> IO Bool checkNonStdWay :: DynFlags -> SrcSpan -> IO Bool
checkNonStdWay dflags srcspan = do checkNonStdWay dflags srcspan = do
let tag = buildTag dflags let tag = buildTag dflags
dynamicByDefault = dYNAMIC_BY_DEFAULT dflags if (null tag && not cDYNAMIC_GHC_PROGRAMS) ||
if (null tag && not dynamicByDefault) || (tag == "dyn" && cDYNAMIC_GHC_PROGRAMS)
(tag == "dyn" && dynamicByDefault)
then return False then return False
-- see #3604: object files compiled for way "dyn" need to link to the -- see #3604: object files compiled for way "dyn" need to link to the
-- dynamic packages, so we can't load them into a statically-linked GHCi. -- dynamic packages, so we can't load them into a statically-linked GHCi.
...@@ -638,10 +637,9 @@ getLinkDeps hsc_env hpt pls replace_osuf span mods ...@@ -638,10 +637,9 @@ getLinkDeps hsc_env hpt pls replace_osuf span mods
let file_base = reverse (drop (length osuf + 1) (reverse file)) let file_base = reverse (drop (length osuf + 1) (reverse file))
dyn_file = file_base <.> "dyn_o" dyn_file = file_base <.> "dyn_o"
new_file = file_base <.> normalObjectSuffix new_file = file_base <.> normalObjectSuffix
-- Note that even if dYNAMIC_BY_DEFAULT is on, we might -- When looking for dynamic object files, we try both
-- still have dynamic object files called .o, so we need -- .dyn_o and .o, with a preference for the former.
-- to try both filenames. use_dyn <- if cDYNAMIC_GHC_PROGRAMS
use_dyn <- if dYNAMIC_BY_DEFAULT dflags
then do doesFileExist dyn_file then do doesFileExist dyn_file
else return False else return False
if use_dyn if use_dyn
...@@ -790,7 +788,7 @@ dynLinkObjs dflags pls objs = do ...@@ -790,7 +788,7 @@ dynLinkObjs dflags pls objs = do
unlinkeds = concatMap linkableUnlinked new_objs unlinkeds = concatMap linkableUnlinked new_objs
wanted_objs = map nameOfObject unlinkeds wanted_objs = map nameOfObject unlinkeds
if dYNAMIC_BY_DEFAULT dflags if cDYNAMIC_GHC_PROGRAMS
then do dynLoadObjs dflags wanted_objs then do dynLoadObjs dflags wanted_objs
return (pls, Succeeded) return (pls, Succeeded)
else do mapM_ loadObj wanted_objs else do mapM_ loadObj wanted_objs
...@@ -1185,7 +1183,7 @@ locateLib dflags is_hs dirs lib ...@@ -1185,7 +1183,7 @@ locateLib dflags is_hs dirs lib
-- --
= findDll `orElse` findArchive `orElse` tryGcc `orElse` assumeDll = findDll `orElse` findArchive `orElse` tryGcc `orElse` assumeDll
| not isDynamicGhcLib | not cDYNAMIC_GHC_PROGRAMS
-- When the GHC package was not compiled as dynamic library -- When the GHC package was not compiled as dynamic library
-- (=DYNAMIC not set), we search for .o libraries or, if they -- (=DYNAMIC not set), we search for .o libraries or, if they
-- don't exist, .a libraries. -- don't exist, .a libraries.
...@@ -1194,13 +1192,11 @@ locateLib dflags is_hs dirs lib ...@@ -1194,13 +1192,11 @@ locateLib dflags is_hs dirs lib
| otherwise | otherwise
-- When the GHC package was compiled as dynamic library (=DYNAMIC set), -- When the GHC package was compiled as dynamic library (=DYNAMIC set),
-- we search for .so libraries first. -- we search for .so libraries first.
= findHSDll `orElse` findDynObject `orElse` findDynArchive `orElse` = findHSDll `orElse` findDynObject `orElse` assumeDll
findObject `orElse` findArchive `orElse` assumeDll
where where
mk_obj_path dir = dir </> (lib <.> "o") mk_obj_path dir = dir </> (lib <.> "o")
mk_dyn_obj_path dir = dir </> (lib <.> "dyn_o") mk_dyn_obj_path dir = dir </> (lib <.> "dyn_o")
mk_arch_path dir = dir </> ("lib" ++ lib <.> "a") mk_arch_path dir = dir </> ("lib" ++ lib <.> "a")
mk_dyn_arch_path dir = dir </> ("lib" ++ lib <.> "dyn_a")
hs_dyn_lib_name = lib ++ "-ghc" ++ cProjectVersion hs_dyn_lib_name = lib ++ "-ghc" ++ cProjectVersion
mk_hs_dyn_lib_path dir = dir </> mkSOName platform hs_dyn_lib_name mk_hs_dyn_lib_path dir = dir </> mkSOName platform hs_dyn_lib_name
...@@ -1209,10 +1205,8 @@ locateLib dflags is_hs dirs lib ...@@ -1209,10 +1205,8 @@ locateLib dflags is_hs dirs lib
mk_dyn_lib_path dir = dir </> so_name mk_dyn_lib_path dir = dir </> so_name
findObject = liftM (fmap Object) $ findFile mk_obj_path dirs findObject = liftM (fmap Object) $ findFile mk_obj_path dirs
findDynObject = do putStrLn "In findDynObject" findDynObject = liftM (fmap Object) $ findFile mk_dyn_obj_path dirs
liftM (fmap Object) $ findFile mk_dyn_obj_path dirs
findArchive = liftM (fmap Archive) $ findFile mk_arch_path dirs findArchive = liftM (fmap Archive) $ findFile mk_arch_path dirs
findDynArchive = liftM (fmap Archive) $ findFile mk_dyn_arch_path dirs
findHSDll = liftM (fmap DLLPath) $ findFile mk_hs_dyn_lib_path dirs findHSDll = liftM (fmap DLLPath) $ findFile mk_hs_dyn_lib_path dirs
findDll = liftM (fmap DLLPath) $ findFile mk_dyn_lib_path dirs findDll = liftM (fmap DLLPath) $ findFile mk_dyn_lib_path dirs
tryGcc = liftM (fmap DLLPath) $ searchForLibUsingGcc dflags so_name dirs tryGcc = liftM (fmap DLLPath) $ searchForLibUsingGcc dflags so_name dirs
......
...@@ -3344,6 +3344,8 @@ compilerInfo dflags ...@@ -3344,6 +3344,8 @@ compilerInfo dflags
("RTS ways", cGhcRTSWays), ("RTS ways", cGhcRTSWays),
("Dynamic by default", if dYNAMIC_BY_DEFAULT dflags ("Dynamic by default", if dYNAMIC_BY_DEFAULT dflags
then "YES" else "NO"), then "YES" else "NO"),
("GHC Dynamic", if cDYNAMIC_GHC_PROGRAMS
then "YES" else "NO"),
("Leading underscore", cLeadingUnderscore), ("Leading underscore", cLeadingUnderscore),
("Debug on", show debugIsOn), ("Debug on", show debugIsOn),
("LibDir", topDir dflags), ("LibDir", topDir dflags),
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
module Util ( module Util (
-- * Flags dependent on the compiler build -- * Flags dependent on the compiler build
ghciSupported, debugIsOn, ncgDebugIsOn, ghciSupported, debugIsOn, ncgDebugIsOn,
ghciTablesNextToCode, isDynamicGhcLib, ghciTablesNextToCode,
isWindowsHost, isDarwinHost, isWindowsHost, isDarwinHost,
-- * General list processing -- * General list processing
...@@ -179,13 +179,6 @@ ghciTablesNextToCode = True ...@@ -179,13 +179,6 @@ ghciTablesNextToCode = True
ghciTablesNextToCode = False ghciTablesNextToCode = False
#endif #endif
isDynamicGhcLib :: Bool
#ifdef DYNAMIC
isDynamicGhcLib = True
#else
isDynamicGhcLib = False
#endif
isWindowsHost :: Bool isWindowsHost :: Bool
#ifdef mingw32_HOST_OS #ifdef mingw32_HOST_OS
isWindowsHost = True isWindowsHost = True
......
...@@ -128,13 +128,13 @@ include mk/ways.mk ...@@ -128,13 +128,13 @@ include mk/ways.mk
include mk/custom-settings.mk include mk/custom-settings.mk
ifeq "$(findstring clean,$(MAKECMDGOALS))" "" ifeq "$(findstring clean,$(MAKECMDGOALS))" ""
ifeq "$(DYNAMIC_BY_DEFAULT)" "YES" ifeq "$(DYNAMIC_GHC_PROGRAMS)" "YES"
ifeq "$(findstring dyn,$(GhcLibWays))" "" ifeq "$(findstring dyn,$(GhcLibWays))" ""
$(error dyn is not in $$(GhcLibWays), but $$(DYNAMIC_BY_DEFAULT) is YES) $(error dyn is not in $$(GhcLibWays), but $$(DYNAMIC_GHC_PROGRAMS) is YES)
endif endif
else else
ifeq "$(findstring v,$(GhcLibWays))" "" ifeq "$(findstring v,$(GhcLibWays))" ""
$(error v is not in $$(GhcLibWays), and $$(DYNAMIC_BY_DEFAULT) is not YES) $(error v is not in $$(GhcLibWays), and $$(DYNAMIC_GHC_PROGRAMS) is not YES)
endif endif
endif endif
ifeq "$(GhcProfiled)" "YES" ifeq "$(GhcProfiled)" "YES"
...@@ -196,7 +196,7 @@ include rules/way-prelims.mk ...@@ -196,7 +196,7 @@ include rules/way-prelims.mk
$(foreach way,$(ALL_WAYS),\ $(foreach way,$(ALL_WAYS),\
$(eval $(call way-prelims,$(way)))) $(eval $(call way-prelims,$(way))))
ifeq "$(DYNAMIC_BY_DEFAULT)" "YES" ifeq "$(DYNAMIC_GHC_PROGRAMS)" "YES"
GHCI_WAY = dyn GHCI_WAY = dyn
HADDOCK_WAY = dyn HADDOCK_WAY = dyn
else else
...@@ -438,7 +438,7 @@ SUPERSIZE_INSTALL_PACKAGES += $(addprefix libraries/,$(PACKAGES_STAGE2)) ...@@ -438,7 +438,7 @@ SUPERSIZE_INSTALL_PACKAGES += $(addprefix libraries/,$(PACKAGES_STAGE2))
INSTALL_DYNLIBS := INSTALL_DYNLIBS :=
ifeq "$(InstallExtraPackages)" "NO" ifeq "$(InstallExtraPackages)" "NO"
INSTALL_PACKAGES := $(REGULAR_INSTALL_PACKAGES) INSTALL_PACKAGES := $(REGULAR_INSTALL_PACKAGES)
ifeq "$(DYNAMIC_BY_DEFAULT)" "YES" ifeq "$(DYNAMIC_GHC_PROGRAMS)" "YES"
INSTALL_DYNLIBS := $(REGULAR_INSTALL_DYNLIBS) INSTALL_DYNLIBS := $(REGULAR_INSTALL_DYNLIBS)
endif endif
else else
...@@ -1260,7 +1260,7 @@ bootstrapping-files: $(libffi_HEADERS) ...@@ -1260,7 +1260,7 @@ bootstrapping-files: $(libffi_HEADERS)
ifeq "$(HADDOCK_DOCS)" "YES" ifeq "$(HADDOCK_DOCS)" "YES"
BINDIST_HADDOCK_FLAG = --with-haddock="$(BINDIST_PREFIX)/bin/haddock" BINDIST_HADDOCK_FLAG = --with-haddock="$(BINDIST_PREFIX)/bin/haddock"
endif endif
ifeq "$(DYNAMIC_BY_DEFAULT)" "YES" ifeq "$(DYNAMIC_GHC_PROGRAMS)" "YES"
BINDIST_LIBRARY_FLAGS = --enable-shared --disable-library-vanilla BINDIST_LIBRARY_FLAGS = --enable-shared --disable-library-vanilla
else else
BINDIST_LIBRARY_FLAGS = --enable-library-vanilla --disable-shared BINDIST_LIBRARY_FLAGS = --enable-library-vanilla --disable-shared
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
# A development build, working on the stage 2 compiler: # A development build, working on the stage 2 compiler:
#BuildFlavour = devel2 #BuildFlavour = devel2
GhcLibWays = $(if $(filter $(DYNAMIC_BY_DEFAULT),YES),dyn,v) GhcLibWays = $(if $(filter $(DYNAMIC_GHC_PROGRAMS),YES),dyn,v)
# Uncomment this to get prettier build output. # Uncomment this to get prettier build output.
# Please use V = 1 when reporting GHC bugs. # Please use V = 1 when reporting GHC bugs.
......
...@@ -124,8 +124,15 @@ endif ...@@ -124,8 +124,15 @@ endif
# cabal-install's that are in the wild don't handle it properly. # cabal-install's that are in the wild don't handle it properly.
DYNAMIC_BY_DEFAULT = NO DYNAMIC_BY_DEFAULT = NO
# If building both v and dyn ways, then use -dynamic-too to build them.
# This makes the build faster.
DYNAMIC_TOO = YES DYNAMIC_TOO = YES
# Use the dynamic way when building programs in the GHC tree. In
# particular, this means that GHCi will use DLLs rather than loading
# object files directly.
DYNAMIC_GHC_PROGRAMS = YES
# Build a compiler that will build *unregisterised* libraries and # Build a compiler that will build *unregisterised* libraries and
# binaries by default. Unregisterised code is supposed to compile and # binaries by default. Unregisterised code is supposed to compile and
# run without any support for architecture-specific assembly mangling, # run without any support for architecture-specific assembly mangling,
...@@ -168,7 +175,7 @@ ArchSupportsGHCi=$(strip $(patsubst $(TargetArch_CPP), YES, $(findstring $(Targe ...@@ -168,7 +175,7 @@ ArchSupportsGHCi=$(strip $(patsubst $(TargetArch_CPP), YES, $(findstring $(Targe
ifeq "$(OsSupportsGHCi)$(ArchSupportsGHCi)" "YESYES" ifeq "$(OsSupportsGHCi)$(ArchSupportsGHCi)" "YESYES"
GhcWithInterpreter=YES GhcWithInterpreter=YES
else else
GhcWithInterpreter=$(if $(findstring YES,$(DYNAMIC_BY_DEFAULT)),YES,NO) GhcWithInterpreter=$(if $(findstring YES,$(DYNAMIC_GHC_PROGRAMS)),YES,NO)
endif endif
# GhcEnableTablesNextToCode tells us whether the target architecture # GhcEnableTablesNextToCode tells us whether the target architecture
......
...@@ -37,8 +37,8 @@ GhcStage2HcOpts += -O -dcore-lint ...@@ -37,8 +37,8 @@ GhcStage2HcOpts += -O -dcore-lint
GhcLibHcOpts += -O -dcore-lint GhcLibHcOpts += -O -dcore-lint
# We define DefaultFastGhcLibWays in this style so that the value is # We define DefaultFastGhcLibWays in this style so that the value is
# correct even if the user alters DYNAMIC_BY_DEFAULT # correct even if the user alters DYNAMIC_GHC_PROGRAMS
DefaultFastGhcLibWays = $(if $(filter $(DYNAMIC_BY_DEFAULT),YES),dyn,v) DefaultFastGhcLibWays = $(if $(filter $(DYNAMIC_GHC_PROGRAMS),YES),dyn,v)
DefaultProfGhcLibWays = $(if $(filter $(GhcProfiled),YES),p,) DefaultProfGhcLibWays = $(if $(filter $(GhcProfiled),YES),p,)
ifeq "$(ValidateSpeed)" "FAST" ifeq "$(ValidateSpeed)" "FAST"
......
...@@ -141,10 +141,10 @@ ...@@ -141,10 +141,10 @@
// warnings like // warnings like
// error: function might be possible candidate for attribute ‘noreturn’ // error: function might be possible candidate for attribute ‘noreturn’
// from gcc: // from gcc:
#ifdef DYNAMIC_BY_DEFAULT #ifdef DYNAMIC_GHC_PROGRAMS
int dynamicByDefault = 1; int dynamicGhcPrograms = 1;
#else #else
int dynamicByDefault = 0; int dynamicGhcPrograms = 0;
#endif #endif
/* Hash table mapping symbol names to Symbol */ /* Hash table mapping symbol names to Symbol */
...@@ -2116,8 +2116,8 @@ loadArchive( pathchar *path ) ...@@ -2116,8 +2116,8 @@ loadArchive( pathchar *path )
IF_DEBUG(linker, debugBelch("loadArchive: start\n")); IF_DEBUG(linker, debugBelch("loadArchive: start\n"));
IF_DEBUG(linker, debugBelch("loadArchive: Loading archive `%" PATH_FMT" '\n", path)); IF_DEBUG(linker, debugBelch("loadArchive: Loading archive `%" PATH_FMT" '\n", path));
if (dynamicByDefault) { if (dynamicGhcPrograms) {
barf("loadArchive called, but using dynlibs by default (%s)", path); barf("loadArchive called, but using dynamic GHC (%s)", path);
} }
gnuFileIndex = NULL; gnuFileIndex = NULL;
...@@ -2511,8 +2511,8 @@ loadObj( pathchar *path ) ...@@ -2511,8 +2511,8 @@ loadObj( pathchar *path )
#endif #endif
IF_DEBUG(linker, debugBelch("loadObj %" PATH_FMT "\n", path)); IF_DEBUG(linker, debugBelch("loadObj %" PATH_FMT "\n", path));
if (dynamicByDefault) { if (dynamicGhcPrograms) {
barf("loadObj called, but using dynlibs by default (%s)", path); barf("loadObj called, but using dynamic GHC (%s)", path);
} }
initLinker(); initLinker();
......
...@@ -329,8 +329,8 @@ rts/RtsUtils_CC_OPTS += -DTargetVendor=\"$(TargetVendor_CPP)\" ...@@ -329,8 +329,8 @@ rts/RtsUtils_CC_OPTS += -DTargetVendor=\"$(TargetVendor_CPP)\"
rts/RtsUtils_CC_OPTS += -DGhcUnregisterised=\"$(GhcUnregisterised)\" rts/RtsUtils_CC_OPTS += -DGhcUnregisterised=\"$(GhcUnregisterised)\"
rts/RtsUtils_CC_OPTS += -DGhcEnableTablesNextToCode=\"$(GhcEnableTablesNextToCode)\" rts/RtsUtils_CC_OPTS += -DGhcEnableTablesNextToCode=\"$(GhcEnableTablesNextToCode)\"
ifeq "$(DYNAMIC_BY_DEFAULT)" "YES" ifeq "$(DYNAMIC_GHC_PROGRAMS)" "YES"
rts/Linker_CC_OPTS += -DDYNAMIC_BY_DEFAULT rts/Linker_CC_OPTS += -DDYNAMIC_GHC_PROGRAMS
endif endif
# Compile various performance-critical pieces *without* -fPIC -dynamic # Compile various performance-critical pieces *without* -fPIC -dynamic
......
...@@ -22,7 +22,7 @@ $1_$2_CONFIGURE_OPTS += --disable-library-for-ghci ...@@ -22,7 +22,7 @@ $1_$2_CONFIGURE_OPTS += --disable-library-for-ghci
ifeq "$$(filter v,$$($1_$2_WAYS))" "v" ifeq "$$(filter v,$$($1_$2_WAYS))" "v"
$1_$2_CONFIGURE_OPTS += --enable-library-vanilla $1_$2_CONFIGURE_OPTS += --enable-library-vanilla
ifeq "$$(GhcWithInterpreter)" "YES" ifeq "$$(GhcWithInterpreter)" "YES"
ifneq "$$(DYNAMIC_BY_DEFAULT)" "YES" ifneq "$$(DYNAMIC_GHC_PROGRAMS)" "YES"
$1_$2_CONFIGURE_OPTS += --enable-library-for-ghci $1_$2_CONFIGURE_OPTS += --enable-library-for-ghci
endif endif
endif endif
......
...@@ -119,7 +119,7 @@ BINDIST_LIBS += $$($1_$2_$3_LIB0) ...@@ -119,7 +119,7 @@ BINDIST_LIBS += $$($1_$2_$3_LIB0)
endif endif
# Build the GHCi library # Build the GHCi library
ifeq "$$(DYNAMIC_BY_DEFAULT)" "YES" ifeq "$$(DYNAMIC_GHC_PROGRAMS)" "YES"
$1_$2_GHCI_LIB = $$($1_$2_dyn_LIB) $1_$2_GHCI_LIB = $$($1_$2_dyn_LIB)
else else
ifeq "$3" "v" ifeq "$3" "v"
......
...@@ -64,7 +64,7 @@ else ifneq "$$($1_$2_INSTALL_INPLACE)" "YES" ...@@ -64,7 +64,7 @@ else ifneq "$$($1_$2_INSTALL_INPLACE)" "YES"
$1_$2_WANT_INPLACE_WRAPPER = NO $1_$2_WANT_INPLACE_WRAPPER = NO
else ifeq "$$($1_$2_SHELL_WRAPPER)" "YES" else ifeq "$$($1_$2_SHELL_WRAPPER)" "YES"
$1_$2_WANT_INPLACE_WRAPPER = YES $1_$2_WANT_INPLACE_WRAPPER = YES
else ifeq "$$(DYNAMIC_BY_DEFAULT)" "YES" else ifeq "$$(DYNAMIC_GHC_PROGRAMS)" "YES"
$1_$2_WANT_INPLACE_WRAPPER = YES $1_$2_WANT_INPLACE_WRAPPER = YES
else else
$1_$2_WANT_INPLACE_WRAPPER = NO $1_$2_WANT_INPLACE_WRAPPER = NO
...@@ -136,7 +136,7 @@ $(call shell-wrapper,$1,$2) ...@@ -136,7 +136,7 @@ $(call shell-wrapper,$1,$2)
ifeq "$$($1_$2_PROGRAM_WAY)" "" ifeq "$$($1_$2_PROGRAM_WAY)" ""
ifeq "$3" "0" ifeq "$3" "0"
$1_$2_PROGRAM_WAY = v $1_$2_PROGRAM_WAY = v
else ifeq "$$(DYNAMIC_BY_DEFAULT)" "YES" else ifeq "$$(DYNAMIC_GHC_PROGRAMS)" "YES"
$1_$2_PROGRAM_WAY = dyn $1_$2_PROGRAM_WAY = dyn
else else
$1_$2_PROGRAM_WAY = v $1_$2_PROGRAM_WAY = v
......
...@@ -44,7 +44,7 @@ $$(INPLACE_WRAPPER): $$($1_$2_INPLACE) ...@@ -44,7 +44,7 @@ $$(INPLACE_WRAPPER): $$($1_$2_INPLACE)
echo 'pgmgcc="$$(WhatGccIsCalled)"' >> $$@ echo 'pgmgcc="$$(WhatGccIsCalled)"' >> $$@
$$($1_$2_SHELL_WRAPPER_EXTRA) $$($1_$2_SHELL_WRAPPER_EXTRA)
$$($1_$2_INPLACE_SHELL_WRAPPER_EXTRA) $$($1_$2_INPLACE_SHELL_WRAPPER_EXTRA)
ifeq "$$(DYNAMIC_BY_DEFAULT)" "YES" ifeq "$$(DYNAMIC_GHC_PROGRAMS)" "YES"
echo '$$(call prependLibraryPath,$$($1_$2_DEP_LIB_DIRS_SEARCHPATH))' >> $$@ echo '$$(call prependLibraryPath,$$($1_$2_DEP_LIB_DIRS_SEARCHPATH))' >> $$@
endif endif
ifeq "$$($1_$2_SHELL_WRAPPER)" "YES" ifeq "$$($1_$2_SHELL_WRAPPER)" "YES"
...@@ -99,7 +99,7 @@ BINDIST_EXTRAS += $$($1_$2_BINDIST_WRAPPER) ...@@ -99,7 +99,7 @@ BINDIST_EXTRAS += $$($1_$2_BINDIST_WRAPPER)
$$($1_$2_BINDIST_WRAPPER): $1/$2/build/tmp/$$($1_$2_PROG) $$($1_$2_BINDIST_WRAPPER): $1/$2/build/tmp/$$($1_$2_PROG)
$$(call removeFiles, $$@) $$(call removeFiles, $$@)
echo '#!$$(SHELL)' >> $$@ echo '#!$$(SHELL)' >> $$@
ifeq "$$(DYNAMIC_BY_DEFAULT)" "YES" ifeq "$$(DYNAMIC_GHC_PROGRAMS)" "YES"
echo '$$(call prependLibraryPath,$$($1_$2_DEP_LIB_REL_DIRS_SEARCHPATH))' >> $$@ echo '$$(call prependLibraryPath,$$($1_$2_DEP_LIB_REL_DIRS_SEARCHPATH))' >> $$@
endif endif
echo 'exec "$$<" $$$${1+"$$$$@"}' >> $$@ echo 'exec "$$<" $$$${1+"$$$$@"}' >> $$@
......
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