summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2021-10-24 01:01:25 +0000
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-10-29 16:57:48 -0400
commit7b67724bd1e6237f843241506d9650ea6f27cee2 (patch)
treead4a4c296c7780a0a7d269b65e3ba6461d9e7f8a
parent925c47b46529d202190f18bd653a6945caa51823 (diff)
downloadhaskell-7b67724bd1e6237f843241506d9650ea6f27cee2.tar.gz
make build system: RTS should use dist-install not dist
This is the following find and replace: - `rts/dist` -> `rts/dist-install` # for paths - `rts_dist` -> `rts_dist-install` # for make rules and vars - `,dist` -> `,dist-install` # for make, just in rts/ghc.mk` Why do this? Does it matter when the RTS is just built once? The answer is, yes, I think it does, because I want the distdir--stage correspondence to be consistent. In particular, for #17191 and continuing from d5de970dafd5876ef30601697576167f56b9c132 I am going to make the headers (`rts/includes`) increasingly the responsibility of the RTS (hence their new location). However, those headers are current made for multiple stages. This will probably become unnecessary as work on #17191 progresses and the compiler proper becomes more of a freestanding cabal package (e.g. a library that can be downloaded from Hackage and built without any autoconf). However, until that is finished, we have will transitional period where the RTS and headers need to agree on dirs for multiple stages. I know the make build system is going away, but it's not going yet, so I need to change it to unblock things :).
-rw-r--r--.gitignore2
-rw-r--r--compiler/ghc.cabal.in2
-rw-r--r--ghc.mk6
-rw-r--r--hadrian/src/Settings/Packages.hs4
-rw-r--r--libffi/ghc.mk4
-rw-r--r--rts/ghc.mk152
-rw-r--r--rts/package.conf.in4
-rw-r--r--utils/ghc-cabal/Main.hs2
8 files changed, 88 insertions, 88 deletions
diff --git a/.gitignore b/.gitignore
index e4c0104b3f..f66faf033e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -80,7 +80,7 @@ _darcs/
/libraries/*/dist-install/
/libraries/*/dist-newstyle/
/libraries/dist-haddock/
-/rts/dist/
+/rts/dist-install/
/rts/include/dist/
/rts/include/dist-*/
/utils/*/dist*/
diff --git a/compiler/ghc.cabal.in b/compiler/ghc.cabal.in
index ed5851a667..94416f7a80 100644
--- a/compiler/ghc.cabal.in
+++ b/compiler/ghc.cabal.in
@@ -113,7 +113,7 @@ Library
if flag(internal-interpreter)
CPP-Options: -DHAVE_INTERNAL_INTERPRETER
- Include-Dirs: ../rts/dist/build @FFIIncludeDir@
+ Include-Dirs: ../rts/dist-install/build @FFIIncludeDir@
-- if no dynamic system linker is available, don't try DLLs.
if flag(dynamic-system-linker)
diff --git a/ghc.mk b/ghc.mk
index b0dc34c2b4..d1a281e648 100644
--- a/ghc.mk
+++ b/ghc.mk
@@ -572,7 +572,7 @@ utils/check-exact/dist-install/package-data.mk: compiler/stage2/package-data.mk
utils/count-deps/dist-install/package-data.mk: compiler/stage2/package-data.mk
# add the final package.conf dependency: ghc-prim depends on RTS
-libraries/ghc-prim/dist-install/package-data.mk : rts/dist/package.conf.inplace
+libraries/ghc-prim/dist-install/package-data.mk : rts/dist-install/package.conf.inplace
endif
# --------------------------------
@@ -982,7 +982,7 @@ INSTALL_DISTDIR_compiler = stage2
# Now we can do the installation
install_packages: install_libexecs
-install_packages: rts/dist/package.conf.install
+install_packages: rts/dist-install/package.conf.install
$(INSTALL_DIR) "$(DESTDIR)$(topdir)"
$(call removeTrees,"$(INSTALLED_PACKAGE_CONF)")
$(INSTALL_DIR) "$(INSTALLED_PACKAGE_CONF)"
@@ -998,7 +998,7 @@ install_packages: rts/dist/package.conf.install
'$(ghclibdir)' \
'$(docdir)/html/libraries' \
'$(GhcLibWays)'))
- "$(INSTALLED_GHC_PKG_REAL)" --force --global-package-db "$(INSTALLED_PACKAGE_CONF)" update rts/dist/package.conf.install
+ "$(INSTALLED_GHC_PKG_REAL)" --force --global-package-db "$(INSTALLED_PACKAGE_CONF)" update rts/dist-install/package.conf.install
$(foreach p, $(INSTALL_PACKAGES), \
$(call make-command, \
"$(ghc-cabal_INPLACE)" register \
diff --git a/hadrian/src/Settings/Packages.hs b/hadrian/src/Settings/Packages.hs
index 1a3d191c99..36fcbb228a 100644
--- a/hadrian/src/Settings/Packages.hs
+++ b/hadrian/src/Settings/Packages.hs
@@ -397,7 +397,7 @@ rtsPackageArgs = package rts ? do
-- On Darwin we get errors of the form
--
-- ld: absolute addressing (perhaps -mdynamic-no-pic) used in _stg_ap_0_fast
--- from rts/dist/build/Apply.dyn_o not allowed in slidable image
+-- from rts/dist-install/build/Apply.dyn_o not allowed in slidable image
--
-- and lots of these warnings:
--
@@ -408,7 +408,7 @@ rtsPackageArgs = package rts ? do
--
-- Text relocation remains referenced
-- against symbol offset in file
--- .rodata (section) 0x11 rts/dist/build/Apply.dyn_o
+-- .rodata (section) 0x11 rts/dist-install/build/Apply.dyn_o
-- ...
-- ld: fatal: relocations remain against allocatable but non-writable sections
-- collect2: ld returned 1 exit status
diff --git a/libffi/ghc.mk b/libffi/ghc.mk
index ea59721bae..8226057646 100644
--- a/libffi/ghc.mk
+++ b/libffi/ghc.mk
@@ -32,8 +32,8 @@ libffi_EnableShared = no
endif
libffi_STATIC_LIB = libffi/build/inst/lib/libffi.a
-libffi_HEADERS = rts/dist/build/ffi.h \
- rts/dist/build/ffitarget.h
+libffi_HEADERS = rts/dist-install/build/ffi.h \
+ rts/dist-install/build/ffitarget.h
ifeq "$(HostOS_CPP)" "mingw32"
LIBFFI_NAME = ffi-6
diff --git a/rts/ghc.mk b/rts/ghc.mk
index 1c32bebe6e..4bb17cb8ae 100644
--- a/rts/ghc.mk
+++ b/rts/ghc.mk
@@ -14,7 +14,7 @@
# Building the RTS
# We build the RTS with stage 1
-rts_dist_HC = $(GHC_STAGE1)
+rts_dist-install_HC = $(GHC_STAGE1)
rts_INSTALL_INFO = rts
rts_VERSION = 1.0.2
@@ -29,9 +29,9 @@ rts_WINVER = 0x06010000
# merge GhcLibWays and GhcRTSWays but strip out duplicates
rts_WAYS = $(GhcLibWays) $(filter-out $(GhcLibWays),$(GhcRTSWays))
-rts_dist_WAYS = $(rts_WAYS)
+rts_dist-install_WAYS = $(rts_WAYS)
-ALL_RTS_LIBS = $(foreach way,$(rts_WAYS),rts/dist/build/libHSrts$($(way)_libsuf))
+ALL_RTS_LIBS = $(foreach way,$(rts_WAYS),rts/dist-install/build/libHSrts$($(way)_libsuf))
$(eval $(call all-target,rts,$(ALL_RTS_LIBS)))
# -----------------------------------------------------------------------------
@@ -90,7 +90,7 @@ ifeq "$(GhcUnregisterised)" "YES"
GENAPPLY_OPTS = -u
endif
-rts_AUTO_APPLY_CMM = rts/dist/build/AutoApply.cmm
+rts_AUTO_APPLY_CMM = rts/dist-install/build/AutoApply.cmm
$(rts_AUTO_APPLY_CMM): $$(genapply_INPLACE)
"$(genapply_INPLACE)" >$@
@@ -99,14 +99,14 @@ $(rts_AUTO_APPLY_CMM): $$(genapply_INPLACE)
rts_H_FILES := $(wildcard rts/*.h rts/*/*.h)
ifeq "$(USE_DTRACE)" "YES"
-DTRACEPROBES_H = rts/dist/build/RtsProbes.h
+DTRACEPROBES_H = rts/dist-install/build/RtsProbes.h
rts_H_FILES += $(DTRACEPROBES_H)
endif
# collect the -l and -L flags that we need to link the rts dyn lib.
# Note that, as sed on OS X doesn't handle \+, we use [^ ][^ ]* rather
# than [^ ]\+
-rts/dist/libs.depend : $$(ghc-pkg_INPLACE) | $$(dir $$@)/.
+rts/dist-install/libs.depend : $$(ghc-pkg_INPLACE) | $$(dir $$@)/.
"$(ghc-pkg_INPLACE)" --simple-output field rts extra-libraries \
| sed -e 's/\([^ ][^ ]*\)/-l\1/g' > $@
"$(ghc-pkg_INPLACE)" --simple-output field rts library-dirs \
@@ -123,20 +123,20 @@ ifeq "$(TargetOS_CPP)" "mingw32"
ALL_RTS_DEF_LIBNAMES = base ghc-prim
ALL_RTS_DEF_LIBS = \
- rts/dist/build/win32/libHSbase.dll.a \
- rts/dist/build/win32/libHSghc-prim.dll.a
+ rts/dist-install/build/win32/libHSbase.dll.a \
+ rts/dist-install/build/win32/libHSghc-prim.dll.a
# -- import libs for the regular Haskell libraries
define make-importlib-def # args $1 = lib name
-rts/dist/build/win32/libHS$1.def : rts/win32/libHS$1.def
+rts/dist-install/build/win32/libHS$1.def : rts/win32/libHS$1.def
cat rts/win32/libHS$1.def \
| sed "s/@LibVersion@/$$(libraries/$1_dist-install_VERSION)/" \
| sed "s/@ProjectVersion@/$$(ProjectVersion)/" \
- > rts/dist/build/win32/libHS$1.def
+ > rts/dist-install/build/win32/libHS$1.def
-rts/dist/build/win32/libHS$1.dll.a : rts/dist/build/win32/libHS$1.def
- "$$(DLLTOOL)" -d rts/dist/build/win32/libHS$1.def \
- -l rts/dist/build/win32/libHS$1.dll.a
+rts/dist-install/build/win32/libHS$1.dll.a : rts/dist-install/build/win32/libHS$1.def
+ "$$(DLLTOOL)" -d rts/dist-install/build/win32/libHS$1.def \
+ -l rts/dist-install/build/win32/libHS$1.dll.a
endef
$(foreach lib,$(ALL_RTS_DEF_LIBNAMES),$(eval $(call make-importlib-def,$(lib))))
endif
@@ -144,15 +144,15 @@ endif
ifneq "$(BINDIST)" "YES"
ifneq "$(UseSystemLibFFI)" "YES"
ifeq "$(TargetOS_CPP)" "mingw32"
-rts/dist/build/$(LIBFFI_DLL): libffi/build/inst/bin/$(LIBFFI_DLL)
+rts/dist-install/build/$(LIBFFI_DLL): libffi/build/inst/bin/$(LIBFFI_DLL)
cp $< $@
else
# This is a little hacky. We don't know the SO version, so we only
# depend on libffi.so, but copy libffi.so*
-rts/dist/build/lib$(LIBFFI_NAME)$(soext): libffi/build/inst/lib/lib$(LIBFFI_NAME)$(soext)
- cp libffi/build/inst/lib/lib$(LIBFFI_NAME)$(soext)* rts/dist/build
+rts/dist-install/build/lib$(LIBFFI_NAME)$(soext): libffi/build/inst/lib/lib$(LIBFFI_NAME)$(soext)
+ cp libffi/build/inst/lib/lib$(LIBFFI_NAME)$(soext)* rts/dist-install/build
ifeq "$(TargetOS_CPP)" "darwin"
- install_name_tool -id @rpath/lib$(LIBFFI_NAME)$(soext) rts/dist/build/lib$(LIBFFI_NAME)$(soext)
+ install_name_tool -id @rpath/lib$(LIBFFI_NAME)$(soext) rts/dist-install/build/lib$(LIBFFI_NAME)$(soext)
endif
endif
endif
@@ -171,37 +171,37 @@ define build-rts-way # args: $1 = way
ifneq "$$(BINDIST)" "YES"
-rts_dist_$1_HC_OPTS := $$(GhcRtsHcOpts)
-rts_dist_$1_CC_OPTS := $$(GhcRtsCcOpts)
+rts_dist-install_$1_HC_OPTS := $$(GhcRtsHcOpts)
+rts_dist-install_$1_CC_OPTS := $$(GhcRtsCcOpts)
# The per-way CC_OPTS
ifneq "$$(findstring debug, $1)" ""
-rts_dist_$1_HC_OPTS += -O0
-rts_dist_$1_CC_OPTS += -fno-omit-frame-pointer -O0 -g3
+rts_dist-install_$1_HC_OPTS += -O0
+rts_dist-install_$1_CC_OPTS += -fno-omit-frame-pointer -O0 -g3
# Useful to ensure that inline functions can be called within GDB but not
# supported by clang
-#rts_dist_$1_CC_OPTS += -fkeep-inline-functions
+#rts_dist-install_$1_CC_OPTS += -fkeep-inline-functions
endif
ifneq "$$(findstring dyn, $1)" ""
ifeq "$$(TargetOS_CPP)" "mingw32"
-rts_dist_$1_CC_OPTS += -DCOMPILING_WINDOWS_DLL
+rts_dist-install_$1_CC_OPTS += -DCOMPILING_WINDOWS_DLL
endif
-rts_dist_$1_CC_OPTS += -DDYNAMIC
+rts_dist-install_$1_CC_OPTS += -DDYNAMIC
endif
-$(call distdir-way-opts,rts,dist,$1,1) # 1 because the rts is built with stage1
-$(call c-suffix-rules,rts,dist,$1,YES)
-$(call cmm-suffix-rules,rts,dist,$1)
+$(call distdir-way-opts,rts,dist-install,$1,1) # 1 because the rts is built with stage1
+$(call c-suffix-rules,rts,dist-install,$1,YES)
+$(call cmm-suffix-rules,rts,dist-install,$1)
rts_$1_LIB_FILE = libHSrts$$($1_libsuf)
-rts_$1_LIB = rts/dist/build/$$(rts_$1_LIB_FILE)
+rts_$1_LIB = rts/dist-install/build/$$(rts_$1_LIB_FILE)
-rts_$1_C_OBJS = $$(patsubst rts/%.c,rts/dist/build/%.$$($1_osuf),$$(rts_C_SRCS)) $$(patsubst %.c,%.$$($1_osuf),$$(rts_$1_EXTRA_C_SRCS))
-rts_$1_C_HOOK_OBJS = $$(patsubst rts/hooks/%.c,rts/dist/build/hooks/%.$$($1_osuf),$$(rts_C_HOOK_SRCS))
-rts_$1_S_OBJS = $$(patsubst rts/%.S,rts/dist/build/%.$$($1_osuf),$$(rts_S_SRCS))
-rts_$1_CMM_OBJS = $$(patsubst rts/%.cmm,rts/dist/build/%.$$($1_osuf),$$(rts_CMM_SRCS)) $$(patsubst %.cmm,%.$$($1_osuf),$$(rts_AUTO_APPLY_CMM))
+rts_$1_C_OBJS = $$(patsubst rts/%.c,rts/dist-install/build/%.$$($1_osuf),$$(rts_C_SRCS)) $$(patsubst %.c,%.$$($1_osuf),$$(rts_$1_EXTRA_C_SRCS))
+rts_$1_C_HOOK_OBJS = $$(patsubst rts/hooks/%.c,rts/dist-install/build/hooks/%.$$($1_osuf),$$(rts_C_HOOK_SRCS))
+rts_$1_S_OBJS = $$(patsubst rts/%.S,rts/dist-install/build/%.$$($1_osuf),$$(rts_S_SRCS))
+rts_$1_CMM_OBJS = $$(patsubst rts/%.cmm,rts/dist-install/build/%.$$($1_osuf),$$(rts_CMM_SRCS)) $$(patsubst %.cmm,%.$$($1_osuf),$$(rts_AUTO_APPLY_CMM))
rts_$1_OBJS = $$(rts_$1_C_OBJS) $$(rts_$1_S_OBJS) $$(rts_$1_CMM_OBJS)
@@ -210,7 +210,7 @@ ifeq "$(NEED_DTRACE_PROBES_OBJ)" "YES"
# On Darwin we don't need to generate binary containing probes defined
# in DTrace script, but DTrace on Solaris expects generation of binary
# from the DTrace probes definitions
-rts_$1_DTRACE_OBJS = rts/dist/build/RtsProbes.$$($1_osuf)
+rts_$1_DTRACE_OBJS = rts/dist-install/build/RtsProbes.$$($1_osuf)
$$(rts_$1_DTRACE_OBJS) : $$(rts_$1_OBJS)
$(DTRACE) -G -C \
@@ -222,25 +222,25 @@ $$(rts_$1_DTRACE_OBJS) : $$(rts_$1_OBJS)
endif
endif
-rts_dist_$1_CC_OPTS += -DRtsWay=\"rts_$1\"
+rts_dist-install_$1_CC_OPTS += -DRtsWay=\"rts_$1\"
# If we're compiling on windows, enforce that we only support XP+
# Adding this here means it doesn't have to be done in individual .c files
# and also centralizes the versioning.
ifeq "$$(TargetOS_CPP)" "mingw32"
-rts_dist_$1_CC_OPTS += -D_WIN32_WINNT=$(rts_WINVER)
+rts_dist-install_$1_CC_OPTS += -D_WIN32_WINNT=$(rts_WINVER)
endif
ifneq "$$(UseSystemLibFFI)" "YES"
-rts_dist_FFI_SO = rts/dist/build/lib$$(LIBFFI_NAME)$$(soext)
+rts_dist-install_FFI_SO = rts/dist-install/build/lib$$(LIBFFI_NAME)$$(soext)
else
-rts_dist_FFI_SO =
+rts_dist-install_FFI_SO =
endif
# Making a shared library for the RTS.
ifneq "$$(findstring dyn, $1)" ""
ifeq "$$(TargetOS_CPP)" "mingw32"
-$$(rts_$1_LIB) : $$(rts_$1_OBJS) $$(ALL_RTS_DEF_LIBS) rts/dist/libs.depend rts/dist/build/$$(LIBFFI_DLL)
+$$(rts_$1_LIB) : $$(rts_$1_OBJS) $$(ALL_RTS_DEF_LIBS) rts/dist-install/libs.depend rts/dist-install/build/$$(LIBFFI_DLL)
"$$(RM)" $$(RM_OPTS) $$@
# Call out to the shell script to decide how to build the dll.
# Making a shared library for the RTS.
@@ -255,15 +255,15 @@ $$(rts_$1_LIB) : $$(rts_$1_OBJS) $$(ALL_RTS_DEF_LIBS) rts/dist/libs.depend rts/d
# $$9 = create delay load import lib
# $$10 = SxS Name
# $$11 = SxS Version
- $$(gen-dll_INPLACE) link "rts/dist/build" "rts/dist/build" "" "" "$$(ALL_RTS_DEF_LIBS)" "$$(rts_$1_OBJS)" "$$@" "$$(rts_dist_HC) -this-unit-id rts -no-hs-main -shared -dynamic -dynload deploy \
- -no-auto-link-packages -Lrts/dist/build -l$$(LIBFFI_NAME) \
- `cat rts/dist/libs.depend | tr '\n' ' '` \
- $$(rts_dist_$1_GHC_LD_OPTS)" "NO" \
+ $$(gen-dll_INPLACE) link "rts/dist-install/build" "rts/dist-install/build" "" "" "$$(ALL_RTS_DEF_LIBS)" "$$(rts_$1_OBJS)" "$$@" "$$(rts_dist-install_HC) -this-unit-id rts -no-hs-main -shared -dynamic -dynload deploy \
+ -no-auto-link-packages -Lrts/dist-install/build -l$$(LIBFFI_NAME) \
+ `cat rts/dist-install/libs.depend | tr '\n' ' '` \
+ $$(rts_dist-install_$1_GHC_LD_OPTS)" "NO" \
"$(rts_INSTALL_INFO)-$(subst dyn,,$(subst _dyn,,$(subst v,,$1)))" "$(ProjectVersion)"
else
ifneq "$$(UseSystemLibFFI)" "YES"
-LIBFFI_LIBS = -Lrts/dist/build -l$$(LIBFFI_NAME)
+LIBFFI_LIBS = -Lrts/dist-install/build -l$$(LIBFFI_NAME)
ifeq "$$(TargetElf)" "YES"
LIBFFI_LIBS += -optl-Wl,-rpath -optl-Wl,'$$$$ORIGIN' -optl-Wl,-zorigin
endif
@@ -272,14 +272,14 @@ LIBFFI_LIBS += -optl-Wl,-rpath -optl-Wl,@loader_path
endif
else
-# flags will be taken care of in rts/dist/libs.depend
+# flags will be taken care of in rts/dist-install/libs.depend
LIBFFI_LIBS =
endif
-$$(rts_$1_LIB) : $$(rts_$1_OBJS) $$(rts_$1_DTRACE_OBJS) rts/dist/libs.depend $$(rts_dist_FFI_SO)
+$$(rts_$1_LIB) : $$(rts_$1_OBJS) $$(rts_$1_DTRACE_OBJS) rts/dist-install/libs.depend $$(rts_dist-install_FFI_SO)
"$$(RM)" $$(RM_OPTS) $$@
- "$$(rts_dist_HC)" -this-unit-id rts -shared -dynamic -dynload deploy \
- -no-auto-link-packages $$(LIBFFI_LIBS) `cat rts/dist/libs.depend` $$(rts_$1_OBJS) \
- $$(rts_dist_$1_GHC_LD_OPTS) \
+ "$$(rts_dist-install_HC)" -this-unit-id rts -shared -dynamic -dynload deploy \
+ -no-auto-link-packages $$(LIBFFI_LIBS) `cat rts/dist-install/libs.depend` $$(rts_$1_OBJS) \
+ $$(rts_dist-install_$1_GHC_LD_OPTS) \
$$(rts_$1_DTRACE_OBJS) -o $$@
endif
else
@@ -298,7 +298,7 @@ ifeq "$(NEED_DTRACE_PROBES_OBJ)" "YES"
rts_$1_EXCLUDED_OBJS = $$(rts_$1_C_HOOK_OBJS)
# The RTS object that gets generated to package up all of the runtime system
# with the dtrace probe code.
-rts_$1_LINKED_OBJS = rts/dist/build/RTS.$$($1_osuf)
+rts_$1_LINKED_OBJS = rts/dist-install/build/RTS.$$($1_osuf)
$$(rts_$1_LINKED_OBJS) : $$(rts_$1_OBJS) $$(rts_$1_DTRACE_OBJS) $$(rts_$1_C_HOOK_OBJS)
"$$(RM)" $$(RM_OPTS) $$@
@@ -330,8 +330,8 @@ $$(rts_$1_LIB) : $$(rts_$1_LINKED_OBJS)
$$(AR_OPTS_STAGE1) $$(EXTRA_AR_ARGS_STAGE1) $$@
ifneq "$$(UseSystemLibFFI)" "YES"
-$$(rts_$1_LIB) : rts/dist/build/libC$$(LIBFFI_NAME)$$($1_libsuf)
-rts/dist/build/libC$$(LIBFFI_NAME)$$($1_libsuf): libffi/build/inst/lib/libffi.a
+$$(rts_$1_LIB) : rts/dist-install/build/libC$$(LIBFFI_NAME)$$($1_libsuf)
+rts/dist-install/build/libC$$(LIBFFI_NAME)$$($1_libsuf): libffi/build/inst/lib/libffi.a
cp $$< $$@
endif
@@ -344,7 +344,7 @@ endef
# And expand the above for each way:
$(foreach way,$(rts_WAYS),$(eval $(call build-rts-way,$(way))))
-$(eval $(call distdir-opts,rts,dist,1))
+$(eval $(call distdir-opts,rts,dist-install,1))
#-----------------------------------------------------------------------------
# Flags for compiling every file
@@ -382,7 +382,7 @@ STANDARD_OPTS += \
$(addprefix -I,$(GHC_INCLUDE_DIRS)) \
-I$(BUILD_1_INCLUDE_DIR) \
-Irts \
- -Irts/dist/build
+ -Irts/dist-install/build
# COMPILING_RTS is only used when building Win32 DLL support.
STANDARD_OPTS += -DCOMPILING_RTS -DFS_NAMESPACE=rts
@@ -463,7 +463,7 @@ rts/Hash_CC_OPTS += -O3
# This apparently doesn't work on OS X (Darwin) nor on Solaris.
# On Darwin we get errors of the form
#
-# ld: absolute addressing (perhaps -mdynamic-no-pic) used in _stg_ap_0_fast from rts/dist/build/Apply.dyn_o not allowed in slidable image
+# ld: absolute addressing (perhaps -mdynamic-no-pic) used in _stg_ap_0_fast from rts/dist-install/build/Apply.dyn_o not allowed in slidable image
#
# and lots of these warnings:
#
@@ -473,7 +473,7 @@ rts/Hash_CC_OPTS += -O3
#
# Text relocation remains referenced
# against symbol offset in file
-# .rodata (section) 0x11 rts/dist/build/Apply.dyn_o
+# .rodata (section) 0x11 rts/dist-install/build/Apply.dyn_o
# ...
# ld: fatal: relocations remain against allocatable but non-writable sections
# collect2: ld returned 1 exit status
@@ -503,7 +503,7 @@ rts/Updates_HC_OPTS += -fno-PIC -static
rts/StgMiscClosures_HC_OPTS += -fno-PIC -static
rts/PrimOps_HC_OPTS += -fno-PIC -static
rts/Apply_HC_OPTS += -fno-PIC -static
-rts/dist/build/AutoApply_HC_OPTS += -fno-PIC -static
+rts/dist-install/build/AutoApply_HC_OPTS += -fno-PIC -static
endif
endif
@@ -569,37 +569,37 @@ endif
# dependencies
rts_WAYS_DASHED = $(subst $(space),,$(patsubst %,-%,$(strip $(rts_WAYS))))
-rts_dist_depfile_base = rts/dist/build/.depend$(rts_WAYS_DASHED)
+rts_dist-install_depfile_base = rts/dist-install/build/.depend$(rts_WAYS_DASHED)
-rts_dist_C_SRCS = $(rts_C_SRCS) $(rts_thr_EXTRA_C_SRCS)
-rts_dist_S_SRCS = $(rts_S_SRCS)
-rts_dist_CMM_SRCS = $(rts_CMM_SRCS)
-rts_dist_C_FILES = $(rts_dist_C_SRCS)
-rts_dist_S_FILES = $(rts_dist_S_SRCS)
-rts_dist_CMM_FILES = $(rts_dist_CMM_SRCS)
+rts_dist-install_C_SRCS = $(rts_C_SRCS) $(rts_thr_EXTRA_C_SRCS)
+rts_dist-install_S_SRCS = $(rts_S_SRCS)
+rts_dist-install_CMM_SRCS = $(rts_CMM_SRCS)
+rts_dist-install_C_FILES = $(rts_dist-install_C_SRCS)
+rts_dist-install_S_FILES = $(rts_dist-install_S_SRCS)
+rts_dist-install_CMM_FILES = $(rts_dist-install_CMM_SRCS)
# Hack: we define every way-related option here, so that we get (hopefully)
# a superset of the dependencies. To do this properly, we should generate
# a different set of dependencies for each way. Further hack: PROFILING an
# TICKY_TICKY can't be used together, so we omit TICKY_TICKY for now.
-rts_dist_MKDEPENDC_OPTS += -DPROFILING -DTHREADED_RTS -DDEBUG
+rts_dist-install_MKDEPENDC_OPTS += -DPROFILING -DTHREADED_RTS -DDEBUG
ifeq "$(USE_DTRACE)" "YES"
-rts_dist_MKDEPENDC_OPTS += -Irts/dist/build
+rts_dist-install_MKDEPENDC_OPTS += -Irts/dist-install/build
endif
-$(eval $(call dependencies,rts,dist,1))
+$(eval $(call dependencies,rts,dist-install,1))
-$(rts_dist_depfile_c_asm) : $(includes_dist_H_CONFIG)
-$(rts_dist_depfile_c_asm) : $(includes_dist_H_PLATFORM)
-$(rts_dist_depfile_c_asm) : $(includes_dist_H_VERSION)
+$(rts_dist-install_depfile_c_asm) : $(includes_1_H_CONFIG)
+$(rts_dist-install_depfile_c_asm) : $(includes_1_H_PLATFORM)
+$(rts_dist-install_depfile_c_asm) : $(includes_1_H_VERSION)
-$(rts_dist_depfile_c_asm) : $(DTRACEPROBES_H)
+$(rts_dist-install_depfile_c_asm) : $(DTRACEPROBES_H)
ifneq "$(UseSystemLibFFI)" "YES"
-$(rts_dist_depfile_c_asm) : $(libffi_HEADERS)
+$(rts_dist-install_depfile_c_asm) : $(libffi_HEADERS)
endif
# -----------------------------------------------------------------------------
@@ -639,17 +639,17 @@ ifeq "$(HaveLibMingwEx)" "YES"
rts_PACKAGE_CPP_OPTS += -DHAVE_LIBMINGWEX
endif
-$(eval $(call manual-package-config,rts,dist,1))
+$(eval $(call manual-package-config,rts,dist-install,1))
-rts/dist/package.conf.inplace : $(includes_1_H_CONFIG) $(includes_1_H_PLATFORM) $(includes_1_H_VERSION)
+rts/dist-install/package.conf.inplace : $(includes_1_H_CONFIG) $(includes_1_H_PLATFORM) $(includes_1_H_VERSION)
# -----------------------------------------------------------------------------
# installing
RTS_INSTALL_LIBS += $(ALL_RTS_LIBS)
ifneq "$(UseSystemLibFFI)" "YES"
-RTS_INSTALL_LIBS += $(wildcard rts/dist/build/lib$(LIBFFI_NAME)*$(soext)*)
-RTS_INSTALL_LIBS += $(foreach w,$(filter-out %dyn,$(rts_WAYS)),rts/dist/build/libC$(LIBFFI_NAME)$($w_libsuf))
+RTS_INSTALL_LIBS += $(wildcard rts/dist-install/build/lib$(LIBFFI_NAME)*$(soext)*)
+RTS_INSTALL_LIBS += $(foreach w,$(filter-out %dyn,$(rts_WAYS)),rts/dist-install/build/libC$(LIBFFI_NAME)$($w_libsuf))
endif
ifneq "$(UseSystemLibFFI)" "YES"
@@ -664,6 +664,6 @@ install_libffi_headers :
# -----------------------------------------------------------------------------
# cleaning
-$(eval $(call clean-target,rts,dist,rts/dist))
+$(eval $(call clean-target,rts,dist-install,rts/dist-install))
BINDIST_EXTRAS += rts/package.conf.in
diff --git a/rts/package.conf.in b/rts/package.conf.in
index a4d3edf3fd..a5db5668c6 100644
--- a/rts/package.conf.in
+++ b/rts/package.conf.in
@@ -20,7 +20,7 @@ import-dirs:
#if defined(INSTALLING)
library-dirs: LIB_DIR"/rts" FFI_LIB_DIR LIBDW_LIB_DIR
#else /* !INSTALLING */
-library-dirs: TOP"/rts/dist/build" FFI_LIB_DIR LIBDW_LIB_DIR
+library-dirs: TOP"/rts/dist-install/build" FFI_LIB_DIR LIBDW_LIB_DIR
#endif
hs-libraries: "HSrts" FFI_LIB
@@ -70,7 +70,7 @@ extra-libraries:
#if defined(INSTALLING)
include-dirs: INCLUDE_DIR FFI_INCLUDE_DIR
#else /* !INSTALLING */
-include-dirs: TOP"/rts/dist/build"
+include-dirs: TOP"/rts/dist-install/build"
TOP"/rts/include"
TOP"/rts/include/dist-derivedconstants/header"
FFI_INCLUDE_DIR
diff --git a/utils/ghc-cabal/Main.hs b/utils/ghc-cabal/Main.hs
index a6414b4131..51378517fc 100644
--- a/utils/ghc-cabal/Main.hs
+++ b/utils/ghc-cabal/Main.hs
@@ -409,7 +409,7 @@ generate directory distdir config_args
libraryDirs = map normalise $ forDeps Installed.libraryDirs
-- The mkLibraryRelDir function is a bit of a hack.
-- Ideally it should be handled in the makefiles instead.
- mkLibraryRelDir "rts" = "rts/dist/build"
+ mkLibraryRelDir "rts" = "rts/dist-install/build"
mkLibraryRelDir "ghc" = "compiler/stage2/build"
mkLibraryRelDir "Cabal" = "libraries/Cabal/Cabal/dist-install/build"
mkLibraryRelDir "containers" = "libraries/containers/containers/dist-install/build"