summaryrefslogtreecommitdiff
path: root/rts
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2021-10-24 01:15:14 +0000
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-10-31 09:04:41 -0400
commite4095c0c85b9c9f70f3c3d665370916e8fd4f616 (patch)
tree5b0cc24bf03924f80d982b3b6ab2b4cba9fcaab9 /rts
parentea862ef5b3779476e0aa2d20bbae1946d07430f1 (diff)
downloadhaskell-e4095c0c85b9c9f70f3c3d665370916e8fd4f616.tar.gz
Make build system: Put make generated include's in RTS distdirs
These are best thought of as being part of the RTS. - After !6791, `ghcautoconf.h` won't be used by the compiler inappropriately. - `ghcversion.h` is only used once outside the RTS, which is `compiler/cbits/genSym.c`. Except we *do* mean the RTS GHC is built against there, so it's better if we always get get the installed version. - `ghcplatform.h` alone is used extensively outside the RTS, but since we no longer have a target platform it is perfectly safe/correct to get the info from the previous RTS. All 3 are exported from the RTS currently and in the bootstrap window. This commit just swaps directories around, such that the new headers may continue to be used in stage 0 despite the reasoning above, but the idea is that we can subsequently make more interesting changes doubling down on the reasoning above. In particular, in !6803 we'll start "morally" moving `ghcautonconf.h` over, introducing an RTS configure script and temporary header of its `AC_DEFINE`s until the top-level configure script doesn't define any more. Progress towards #17191
Diffstat (limited to 'rts')
-rw-r--r--rts/include/ghc.mk20
-rw-r--r--rts/package.conf.in3
-rw-r--r--rts/rts.cabal.in2
3 files changed, 12 insertions, 13 deletions
diff --git a/rts/include/ghc.mk b/rts/include/ghc.mk
index f44f970bb5..4482446aea 100644
--- a/rts/include/ghc.mk
+++ b/rts/include/ghc.mk
@@ -13,20 +13,20 @@
#
# Header files built from the configure script's findings
#
-includes_0_H_CONFIG = rts/include/dist/build/ghcautoconf.h
-includes_1_H_CONFIG = rts/include/dist-install/build/ghcautoconf.h
+includes_0_H_CONFIG = rts/dist/build/include/ghcautoconf.h
+includes_1_H_CONFIG = rts/dist-install/build/include/ghcautoconf.h
includes_2_H_CONFIG = $(includes_1_H_CONFIG)
-includes_0_H_PLATFORM = rts/include/dist/build/ghcplatform.h
-includes_1_H_PLATFORM = rts/include/dist-install/build/ghcplatform.h
+includes_0_H_PLATFORM = rts/dist/build/include/ghcplatform.h
+includes_1_H_PLATFORM = rts/dist-install/build/include/ghcplatform.h
includes_2_H_PLATFORM = $(includes_1_H_PLATFORM)
-includes_0_H_VERSION = rts/include/dist/build/ghcversion.h
-includes_1_H_VERSION = rts/include/dist-install/build/ghcversion.h
+includes_0_H_VERSION = rts/dist/build/include/ghcversion.h
+includes_1_H_VERSION = rts/dist-install/build/include/ghcversion.h
includes_2_H_VERSION = $(includes_1_H_VERSION)
-BUILD_0_INCLUDE_DIR = rts/include/dist/build
-BUILD_1_INCLUDE_DIR = rts/include/dist-install/build
+BUILD_0_INCLUDE_DIR = rts/dist/build/include
+BUILD_1_INCLUDE_DIR = rts/dist-install/build/include
BUILD_2_INCLUDE_DIR = $(BUILD_1_INCLUDE_DIR)
#
@@ -205,7 +205,7 @@ $(eval $(call includesHeaderPlatform,1))
# rebuilds.
# See Note [tooldir: How GHC finds mingw on Windows]
-includes_SETTINGS = rts/include/dist/build/settings
+includes_SETTINGS = rts/dist-install/build/include/settings
# N.B. this is duplicated in hadrian/bindist/Makefile.
$(includes_SETTINGS) : rts/include/Makefile | $$(dir $$@)/.
@@ -268,7 +268,7 @@ $(includes_SETTINGS) : rts/include/Makefile | $$(dir $$@)/.
# ---------------------------------------------------------------------------
# Make DerivedConstants.h for the compiler
-includes_DERIVEDCONSTANTS = rts/include/dist-derivedconstants/header/DerivedConstants.h
+includes_DERIVEDCONSTANTS = rts/dist-install/build/include/DerivedConstants.h
DERIVE_CONSTANTS_FLAGS_FOR_HEADER += --gcc-program "$(CC)"
DERIVE_CONSTANTS_FLAGS_FOR_HEADER += $(addprefix --gcc-flag$(space),$(includes_CC_OPTS) -fcommon)
diff --git a/rts/package.conf.in b/rts/package.conf.in
index a5db5668c6..69ee9ba54d 100644
--- a/rts/package.conf.in
+++ b/rts/package.conf.in
@@ -72,10 +72,9 @@ include-dirs: INCLUDE_DIR FFI_INCLUDE_DIR
#else /* !INSTALLING */
include-dirs: TOP"/rts/dist-install/build"
TOP"/rts/include"
- TOP"/rts/include/dist-derivedconstants/header"
FFI_INCLUDE_DIR
LIBDW_INCLUDE_DIR
- TOP"/rts/include/dist-install/build"
+ TOP"/rts/dist-install/build/include"
#endif
includes: Stg.h
diff --git a/rts/rts.cabal.in b/rts/rts.cabal.in
index d1f5681d79..a2f78f15b6 100644
--- a/rts/rts.cabal.in
+++ b/rts/rts.cabal.in
@@ -145,7 +145,7 @@ library
cpp-options: -DNOSMP
include-dirs: build include
- include/dist-derivedconstants/header @FFIIncludeDir@
+ @FFIIncludeDir@
@LibdwIncludeDir@
includes: Stg.h
install-includes: Cmm.h HsFFI.h MachDeps.h Rts.h RtsAPI.h Stg.h