diff options
author | John Ericson <git@JohnEricson.me> | 2019-04-07 22:33:21 -0400 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2019-07-24 16:49:53 -0400 |
commit | b95b63806b5a9764902d3ae556ba31d17ecd1ec3 (patch) | |
tree | 00434c0677600df9d5e35ebcfc9e7466cdc688d5 /compiler/ghc.mk | |
parent | 3dbcc3682066450b0fe1e74f9d82472d5c603d3b (diff) | |
download | haskell-b95b63806b5a9764902d3ae556ba31d17ecd1ec3.tar.gz |
Make stage 1 GHC target independent
Now that the target macros are not being used, we remove them. This
prevents target hardcoding regressions.
Diffstat (limited to 'compiler/ghc.mk')
-rw-r--r-- | compiler/ghc.mk | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/compiler/ghc.mk b/compiler/ghc.mk index f80d7b75df..629a1ed560 100644 --- a/compiler/ghc.mk +++ b/compiler/ghc.mk @@ -101,28 +101,21 @@ compiler/stage1/$(PLATFORM_H) : mk/config.mk mk/project.mk | $$(dir $$@)/. @echo >> $@ @echo "#define $(BuildPlatform_CPP)_BUILD 1" >> $@ @echo "#define $(HostPlatform_CPP)_HOST 1" >> $@ - @echo "#define $(TargetPlatform_CPP)_TARGET 1" >> $@ @echo >> $@ @echo "#define $(BuildArch_CPP)_BUILD_ARCH 1" >> $@ @echo "#define $(HostArch_CPP)_HOST_ARCH 1" >> $@ - @echo "#define $(TargetArch_CPP)_TARGET_ARCH 1" >> $@ @echo "#define BUILD_ARCH \"$(BuildArch_CPP)\"" >> $@ @echo "#define HOST_ARCH \"$(HostArch_CPP)\"" >> $@ - @echo "#define TARGET_ARCH \"$(TargetArch_CPP)\"" >> $@ @echo >> $@ @echo "#define $(BuildOS_CPP)_BUILD_OS 1" >> $@ @echo "#define $(HostOS_CPP)_HOST_OS 1" >> $@ - @echo "#define $(TargetOS_CPP)_TARGET_OS 1" >> $@ @echo "#define BUILD_OS \"$(BuildOS_CPP)\"" >> $@ @echo "#define HOST_OS \"$(HostOS_CPP)\"" >> $@ - @echo "#define TARGET_OS \"$(TargetOS_CPP)\"" >> $@ @echo >> $@ @echo "#define $(BuildVendor_CPP)_BUILD_VENDOR 1" >> $@ @echo "#define $(HostVendor_CPP)_HOST_VENDOR 1" >> $@ - @echo "#define $(TargetVendor_CPP)_TARGET_VENDOR 1" >> $@ @echo "#define BUILD_VENDOR \"$(BuildVendor_CPP)\"" >> $@ @echo "#define HOST_VENDOR \"$(HostVendor_CPP)\"" >> $@ - @echo "#define TARGET_VENDOR \"$(TargetVendor_CPP)\"" >> $@ @echo >> $@ @echo "#endif /* __PLATFORM_H__ */" >> $@ @echo "Done." @@ -141,28 +134,21 @@ compiler/stage2/$(PLATFORM_H) : mk/config.mk mk/project.mk | $$(dir $$@)/. @echo >> $@ @echo "#define $(HostPlatform_CPP)_BUILD 1" >> $@ @echo "#define $(TargetPlatform_CPP)_HOST 1" >> $@ - @echo "#define $(TargetPlatform_CPP)_TARGET 1" >> $@ @echo >> $@ @echo "#define $(HostArch_CPP)_BUILD_ARCH 1" >> $@ @echo "#define $(TargetArch_CPP)_HOST_ARCH 1" >> $@ - @echo "#define $(TargetArch_CPP)_TARGET_ARCH 1" >> $@ @echo "#define BUILD_ARCH \"$(HostArch_CPP)\"" >> $@ @echo "#define HOST_ARCH \"$(TargetArch_CPP)\"" >> $@ - @echo "#define TARGET_ARCH \"$(TargetArch_CPP)\"" >> $@ @echo >> $@ @echo "#define $(HostOS_CPP)_BUILD_OS 1" >> $@ @echo "#define $(TargetOS_CPP)_HOST_OS 1" >> $@ - @echo "#define $(TargetOS_CPP)_TARGET_OS 1" >> $@ @echo "#define BUILD_OS \"$(HostOS_CPP)\"" >> $@ @echo "#define HOST_OS \"$(TargetOS_CPP)\"" >> $@ - @echo "#define TARGET_OS \"$(TargetOS_CPP)\"" >> $@ @echo >> $@ @echo "#define $(HostVendor_CPP)_BUILD_VENDOR 1" >> $@ @echo "#define $(TargetVendor_CPP)_HOST_VENDOR 1" >> $@ - @echo "#define $(TargetVendor_CPP)_TARGET_VENDOR 1" >> $@ @echo "#define BUILD_VENDOR \"$(HostVendor_CPP)\"" >> $@ @echo "#define HOST_VENDOR \"$(TargetVendor_CPP)\"" >> $@ - @echo "#define TARGET_VENDOR \"$(TargetVendor_CPP)\"" >> $@ @echo >> $@ @echo "#endif /* __PLATFORM_H__ */" >> $@ @echo "Done." @@ -204,7 +190,7 @@ compiler_HC_OPTS += $(addprefix -I,$(GHC_INCLUDE_DIRS)) define preprocessCompilerFiles # $0 = stage -compiler/stage$1/build/primops.txt: compiler/prelude/primops.txt.pp compiler/stage$1/$$(PLATFORM_H) +compiler/stage$1/build/primops.txt: compiler/prelude/primops.txt.pp $$(HS_CPP) -P $$(compiler_CPP_OPTS) -Icompiler/stage$1 -x c $$< | grep -v '^#pragma GCC' > $$@ compiler/stage$1/build/primop-data-decl.hs-incl: compiler/stage$1/build/primops.txt $$$$(genprimopcode_INPLACE) |