Skip to content
Commits on Source (4)
  • Sylvain Henry's avatar
    Hadrian: fix library install paths in bindist Makefile (#16498) · fe40ddd9
    Sylvain Henry authored and Marge Bot's avatar Marge Bot committed
    GHC now works out-of-the-box (i.e. without any wrapper script) by
    assuming that @bin@ and @lib@ directories sit next to each other. In
    particular, its RUNPATH uses $ORIGIN-based relative path to find the
    libraries.
    
    However, to be good citizens we want to support the case where @bin@ and
    @lib@ directories (respectively BINDIR and LIBDIR) don't sit next to
    each other or are renamed. To do that the install script simply creates
    GHC specific @bin@ and @lib@ siblings directories into:
    
       LIBDIR/ghc-VERSION/{bin,lib}
    
    Then it installs wrapper scripts into BINDIR that call the appropriate
    programs into LIBDIR/ghc-VERSION/bin/.
    
    The issue fixed by this patch is that libraries were not installed into
    LIBDIR/ghc-VERSION/lib but directly into LIBDIR.
    fe40ddd9
  • Ben Gamari's avatar
    gitlab: Bump cabal-install version used by Windows builds to 2.4 · 9acdc4c0
    Ben Gamari authored and Marge Bot's avatar Marge Bot committed
    Hopefully fixes Windows Hadrian build.
    9acdc4c0
  • Joachim Breitner's avatar
    GHC no longer ever defines TABLES_NEXT_TO_CODE on its own · a240f145
    Joachim Breitner authored and Marge Bot's avatar Marge Bot committed
    It should be entirely the responsibility of make/Hadrian to ensure that
    everything that needs this flag gets it. GHC shouldn't be hardcoded to
    assist with bootstrapping since it builds other things besides itself.
    
    Reviewers:
    
    Subscribers: TerrorJack, rwbarton, carter
    
    GHC Trac Issues: #15548 -- progress towards but not fix
    
    Differential Revision: https://phabricator.haskell.org/D5082 -- extract
    from that
    a240f145
  • Ryan Scott's avatar
    Use ghc-prim < 0.7, not <= 0.6.1, as upper version bounds · 0f532329
    Ryan Scott authored and Marge Bot's avatar Marge Bot committed
    Using `ghc-prim <= 0.6.1` is somewhat dodgy from a PVP point of view,
    as it makes it awkward to support new minor releases of `ghc-prim`.
    Let's instead use `< 0.7`, which is the idiomatic way of expressing
    PVP-compliant upper version bounds.
    0f532329
......@@ -4,6 +4,10 @@ variables:
# Commit of ghc/ci-images repository from which to pull Docker images
DOCKER_REV: cefaee3c742af193e0f7783f87edb0d35374515c
# Sequential version number capturing the versions of all tools fetched by
# .gitlab/win32-init.sh.
WINDOWS_TOOLCHAIN_VERSION: 1
before_script:
- python3 .gitlab/fix-submodules.py
- git submodule sync --recursive
......@@ -525,7 +529,7 @@ validate-x86_64-windows-hadrian:
variables:
MSYSTEM: MINGW64
cache:
key: x86_64-windows-hadrian
key: "x86_64-windows-hadrian-$WINDOWS_TOOLCHAIN_VERSION"
nightly-i386-windows-hadrian:
extends: .build-windows-hadrian
......@@ -535,7 +539,7 @@ nightly-i386-windows-hadrian:
variables:
- $NIGHTLY
cache:
key: i386-windows-hadrian
key: "i386-windows-hadrian-$WINDOWS_TOOLCHAIN_VERSION"
.build-windows-make:
extends: .build-windows
......@@ -571,7 +575,7 @@ validate-x86_64-windows:
MSYSTEM: MINGW64
CONFIGURE_ARGS: "--target=x86_64-unknown-mingw32"
cache:
key: x86_64-windows
key: "x86_64-windows-$WINDOWS_TOOLCHAIN_VERSION"
# Normal Windows validate builds are profiled; that won't do for releases.
release-x86_64-windows:
......@@ -592,7 +596,7 @@ release-i386-windows:
BUILD_FLAVOUR: "perf"
CONFIGURE_ARGS: "--target=i386-unknown-mingw32"
cache:
key: i386-windows
key: "i386-windows-$WINDOWS_TOOLCHAIN_VERSION"
nightly-i386-windows:
extends: .build-windows-make
......@@ -603,7 +607,7 @@ nightly-i386-windows:
MSYSTEM: MINGW32
CONFIGURE_ARGS: "--target=i386-unknown-mingw32"
cache:
key: i386-windows
key: "i386-windows-$WINDOWS_TOOLCHAIN_VERSION"
############################################################
# Cleanup
......
......@@ -27,7 +27,8 @@ if [ ! -e $toolchain/bin/ghc ]; then
fi
if [ ! -e $toolchain/bin/cabal ]; then
curl https://www.haskell.org/cabal/release/cabal-install-2.2.0.0/cabal-install-2.2.0.0-i386-unknown-mingw32.zip > /tmp/cabal.zip
url="https://downloads.haskell.org/~cabal/cabal-install-latest/cabal-install-2.4.1.0-x86_64-unknown-mingw32.zip"
curl $url > /tmp/cabal.zip
unzip /tmp/cabal.zip
mv cabal.exe $toolchain/bin
fi
......
......@@ -58,7 +58,7 @@ module DynFlags (
fFlags, fLangFlags, xFlags,
wWarningFlags,
dynFlagDependencies,
tablesNextToCode, mkTablesNextToCode,
tablesNextToCode,
makeDynFlagsConsistent,
shouldUseColor,
shouldUseHexWordLiterals,
......
......@@ -199,15 +199,9 @@ initSysTools top_dir
let unreg_gcc_args = if targetUnregisterised
then ["-DNO_REGS", "-DUSE_MINIINTERPRETER"]
else []
-- TABLES_NEXT_TO_CODE affects the info table layout.
tntc_gcc_args
| mkTablesNextToCode targetUnregisterised
= ["-DTABLES_NEXT_TO_CODE"]
| otherwise = []
cpp_args= map Option (words cpp_args_str)
gcc_args = map Option (words gcc_args_str
++ unreg_gcc_args
++ tntc_gcc_args)
++ unreg_gcc_args)
ldSupportsCompactUnwind <- getBooleanSetting "ld supports compact unwind"
ldSupportsBuildId <- getBooleanSetting "ld supports build-id"
ldSupportsFilelist <- getBooleanSetting "ld supports filelist"
......
......@@ -58,7 +58,7 @@ Executable ghc
Build-depends:
containers >= 0.5 && < 0.7,
deepseq == 1.4.*,
ghc-prim >= 0.5.0 && <= 0.6.1,
ghc-prim >= 0.5.0 && < 0.7,
ghci == @ProjectVersionMunged@,
haskeline == 0.7.*,
time >= 1.8 && < 1.10,
......
......@@ -86,6 +86,12 @@ you can simply do:
./configure --prefix=<path> [... other configure options ...]
make install
In order to support @bin@ and @lib@ directories that don't sit next to each
other, the install script:
* installs programs into @LIBDIR/ghc-VERSION/bin@
* installs libraries into @LIBDIR/ghc-VERSION/lib@
* installs the wrappers scripts into @BINDIR@ directory
-}
bindistRules :: Rules ()
......@@ -268,6 +274,7 @@ bindistMakefile = unlines
, "install: install_mingw update_package_db"
, ""
, "ActualBinsDir=${ghclibdir}/bin"
, "ActualLibsDir=${ghclibdir}/lib"
, "WrapperBinsDir=${bindir}"
, ""
, "# We need to install binaries relative to libraries."
......@@ -288,10 +295,10 @@ bindistMakefile = unlines
, ""
, "LIBRARIES = $(wildcard ./lib/*)"
, "install_lib:"
, "\t@echo \"Copying libraries to $(libdir)\""
, "\t$(INSTALL_DIR) \"$(libdir)\""
, "\t@echo \"Copying libraries to $(ActualLibsDir)\""
, "\t$(INSTALL_DIR) \"$(ActualLibsDir)\""
, "\tfor i in $(LIBRARIES); do \\"
, "\t\tcp -R $$i \"$(libdir)/\"; \\"
, "\t\tcp -R $$i \"$(ActualLibsDir)/\"; \\"
, "\tdone"
, ""
, "INCLUDES = $(wildcard ./include/*)"
......@@ -317,9 +324,9 @@ bindistMakefile = unlines
, "\t$(foreach p, $(BINARY_NAMES),\\"
, "\t\t$(call installscript,$p,$(WrapperBinsDir)/$p," ++
"$(WrapperBinsDir),$(ActualBinsDir),$(ActualBinsDir)/$p," ++
"$(libdir),$(docdir),$(includedir)))"
"$(ActualLibsDir),$(docdir),$(includedir)))"
, ""
, "PKG_CONFS = $(wildcard $(libdir)/package.conf.d/*)"
, "PKG_CONFS = $(wildcard $(ActualLibsDir)/package.conf.d/*)"
, "update_package_db:"
, "\t@echo \"Updating the package DB\""
, "\t$(foreach p, $(PKG_CONFS),\\"
......
......@@ -95,7 +95,7 @@ Library
UnliftedFFITypes
Unsafe
build-depends: rts == 1.0, ghc-prim >= 0.5.1.0 && <= 0.6.1
build-depends: rts == 1.0, ghc-prim >= 0.5.1.0 && < 0.7
-- sanity-check to ensure exactly one flag is set
if !((flag(integer-gmp) && !flag(integer-simple)) || (!flag(integer-gmp) && flag(integer-simple)))
......
......@@ -36,7 +36,7 @@ library
UnboxedTuples
CPP
build-depends: ghc-prim >= 0.5.3 && <= 0.6.1,
build-depends: ghc-prim >= 0.5.3 && < 0.7,
base >= 4.9.0 && < 4.14,
bytestring >= 0.10.6.0
ghc-options: -Wall
......
......@@ -23,7 +23,7 @@ library
default-language: Haskell2010
build-depends: base >= 4.9.0 && < 5.0
, ghc-prim > 0.2 && <= 0.6.1
, ghc-prim > 0.2 && < 0.7
, rts == 1.0.*
ghc-options: -Wall
......
......@@ -58,7 +58,7 @@ library
StandaloneDeriving
UnboxedTuples
UnliftedFFITypes
build-depends: ghc-prim >= 0.5.1.0 && <= 0.6.1
build-depends: ghc-prim >= 0.5.1.0 && < 0.7
hs-source-dirs: src/
-- We need to set the unit ID to integer-wired-in
-- (without a version number) as it's magic.
......