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

Change how we detect what library ways are available

We used to use the base package to do the detection. However, base has
    extra-lib-dirs: @ICONV_LIB_DIRS@
in base.buildinfo.in, which means that if ICONV_LIB_DIRS is set then
the package config will have
    library-dirs: [...]base/dist-install/build /path/for/iconv
and, as paths may be double quoted and contains spaces, this makes it
a little tricky to extra the path that we want to look in (the first
path).

We therefore now use the ghc-prim package, which has no such complication.
parent ebd51659
......@@ -47,10 +47,10 @@ else
RUNTEST_OPTS += -e ghc_with_native_codegen=0
endif
BASE_LIBDIR := $(shell "$(GHC_PKG)" field base library-dirs --simple-output)
HAVE_VANILLA := $(shell if [ -f $(subst \,/,$(BASE_LIBDIR))/Prelude.hi ]; then echo YES; else echo NO; fi)
HAVE_DYNAMIC := $(shell if [ -f $(subst \,/,$(BASE_LIBDIR))/Prelude.dyn_hi ]; then echo YES; else echo NO; fi)
HAVE_PROFILING := $(shell if [ -f $(subst \,/,$(BASE_LIBDIR))/Prelude.p_hi ]; then echo YES; else echo NO; fi)
GHC_PRIM_LIBDIR := $(shell "$(GHC_PKG)" field ghc-prim library-dirs --simple-output)
HAVE_VANILLA := $(shell if [ -f $(subst \,/,$(GHC_PRIM_LIBDIR))/GHC/PrimopWrappers.hi ]; then echo YES; else echo NO; fi)
HAVE_DYNAMIC := $(shell if [ -f $(subst \,/,$(GHC_PRIM_LIBDIR))/GHC/PrimopWrappers.dyn_hi ]; then echo YES; else echo NO; fi)
HAVE_PROFILING := $(shell if [ -f $(subst \,/,$(GHC_PRIM_LIBDIR))/GHC/PrimopWrappers.p_hi ]; then echo YES; else echo NO; fi)
ifeq "$(HAVE_VANILLA)" "YES"
RUNTEST_OPTS += -e ghc_with_vanilla=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