X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fghc.mk;h=65193ce9a1ea5c1af5580b9d798b536233441a41;hb=40ecf8e6b45fbcf1a99e3b901e2e87da6fbc8a15;hp=2daf6832f03da5d5e777e267341a1d9222832858;hpb=24a3fee9f3ff6cef6fe471ab6f0a7ba9ac001faf;p=ghc-hetmet.git diff --git a/compiler/ghc.mk b/compiler/ghc.mk index 2daf683..65193ce 100644 --- a/compiler/ghc.mk +++ b/compiler/ghc.mk @@ -144,44 +144,44 @@ PLATFORM_H = ghc_boot_platform.h compiler/stage1/$(PLATFORM_H) : mk/config.mk mk/project.mk | $$(dir $$@)/. "$(RM)" $(RM_OPTS) $@ @echo "Creating $@..." - @echo "#ifndef __PLATFORM_H__" >$@ - @echo "#define __PLATFORM_H__" >>$@ - @echo >> $@ + @echo "#ifndef __PLATFORM_H__" >> $@ + @echo "#define __PLATFORM_H__" >> $@ + @echo >> $@ @echo "#define BuildPlatform_NAME \"$(BUILDPLATFORM)\"" >> $@ - @echo "#define HostPlatform_NAME \"$(HOSTPLATFORM)\"" >> $@ - @echo "#define TargetPlatform_NAME \"$(TARGETPLATFORM)\"" >> $@ - @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 "#define HostPlatform_NAME \"$(BUILDPLATFORM)\"" >> $@ + @echo "#define TargetPlatform_NAME \"$(HOSTPLATFORM)\"" >> $@ + @echo >> $@ + @echo "#define $(BuildPlatform_CPP)_BUILD 1" >> $@ + @echo "#define $(BuildPlatform_CPP)_HOST 1" >> $@ + @echo "#define $(HostPlatform_CPP)_TARGET 1" >> $@ + @echo >> $@ + @echo "#define $(BuildArch_CPP)_BUILD_ARCH 1" >> $@ + @echo "#define $(BuildArch_CPP)_HOST_ARCH 1" >> $@ + @echo "#define $(HostArch_CPP)_TARGET_ARCH 1" >> $@ + @echo "#define BUILD_ARCH \"$(BuildArch_CPP)\"" >> $@ + @echo "#define HOST_ARCH \"$(BuildArch_CPP)\"" >> $@ + @echo "#define TARGET_ARCH \"$(HostArch_CPP)\"" >> $@ + @echo >> $@ + @echo "#define $(BuildOS_CPP)_BUILD_OS 1" >> $@ + @echo "#define $(BuildOS_CPP)_HOST_OS 1" >> $@ + @echo "#define $(HostOS_CPP)_TARGET_OS 1" >> $@ + @echo "#define BUILD_OS \"$(BuildOS_CPP)\"" >> $@ + @echo "#define HOST_OS \"$(BuildOS_CPP)\"" >> $@ + @echo "#define TARGET_OS \"$(HostOS_CPP)\"" >> $@ ifeq "$(HostOS_CPP)" "irix" - @echo "#ifndef $(IRIX_MAJOR)_TARGET_OS " >> $@ - @echo "#define $(IRIX_MAJOR)_TARGET_OS 1" >> $@ - @echo "#endif " >> $@ + @echo "#ifndef $(IRIX_MAJOR)_TARGET_OS" >> $@ + @echo "#define $(IRIX_MAJOR)_TARGET_OS 1" >> $@ + @echo "#endif" >> $@ endif - @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 >> $@ + @echo "#define $(BuildVendor_CPP)_BUILD_VENDOR 1" >> $@ + @echo "#define $(BuildVendor_CPP)_HOST_VENDOR 1" >> $@ + @echo "#define $(HostVendor_CPP)_TARGET_VENDOR 1" >> $@ + @echo "#define BUILD_VENDOR \"$(BuildVendor_CPP)\"" >> $@ + @echo "#define HOST_VENDOR \"$(BuildVendor_CPP)\"" >> $@ + @echo "#define TARGET_VENDOR \"$(HostVendor_CPP)\"" >> $@ + @echo >> $@ + @echo "#endif /* __PLATFORM_H__ */" >> $@ @echo "Done." # For stage2 and above, the BUILD platform is the HOST of stage1, and @@ -190,44 +190,44 @@ endif compiler/stage2/$(PLATFORM_H) : mk/config.mk mk/project.mk | $$(dir $$@)/. "$(RM)" $(RM_OPTS) $@ @echo "Creating $@..." - @echo "#ifndef __PLATFORM_H__" >$@ - @echo "#define __PLATFORM_H__" >>$@ - @echo >> $@ - @echo "#define BuildPlatform_NAME \"$(HOSTPLATFORM)\"" >> $@ - @echo "#define HostPlatform_NAME \"$(TARGETPLATFORM)\"" >> $@ + @echo "#ifndef __PLATFORM_H__" >> $@ + @echo "#define __PLATFORM_H__" >> $@ + @echo >> $@ + @echo "#define BuildPlatform_NAME \"$(BUILDPLATFORM)\"" >> $@ + @echo "#define HostPlatform_NAME \"$(HOSTPLATFORM)\"" >> $@ @echo "#define TargetPlatform_NAME \"$(TARGETPLATFORM)\"" >> $@ - @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)\"" >> $@ -ifeq "$(HostOS_CPP)" "irix" - @echo "#ifndef $(IRIX_MAJOR)_TARGET_OS " >> $@ - @echo "#define $(IRIX_MAJOR)_TARGET_OS 1" >> $@ - @echo "#endif " >> $@ + @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 \"$(HostArch_CPP)\"" >> $@ + @echo "#define HOST_ARCH \"$(HostArch_CPP)\"" >> $@ + @echo "#define TARGET_ARCH \"$(TargetArch_CPP)\"" >> $@ + @echo >> $@ + @echo "#define $(HostOS_CPP)_BUILD_OS 1" >> $@ + @echo "#define $(HostOS_CPP)_HOST_OS 1" >> $@ + @echo "#define $(TargetOS_CPP)_TARGET_OS 1" >> $@ + @echo "#define BUILD_OS \"$(HostOS_CPP)\"" >> $@ + @echo "#define HOST_OS \"$(HostOS_CPP)\"" >> $@ + @echo "#define TARGET_OS \"$(TargetOS_CPP)\"" >> $@ +ifeq "$(TargetOS_CPP)" "irix" + @echo "#ifndef $(IRIX_MAJOR)_TARGET_OS" >> $@ + @echo "#define $(IRIX_MAJOR)_TARGET_OS 1" >> $@ + @echo "#endif" >> $@ endif - @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 >> $@ + @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." compiler/stage3/$(PLATFORM_H) : compiler/stage2/$(PLATFORM_H) @@ -336,10 +336,6 @@ compiler_CONFIGURE_OPTS += --ld-options=-E endif ifeq "$(GhcUnregisterised)" "NO" -ifeq "$(HOSTPLATFORM)" "ia64-unknown-linux" -# needed for generating proper relocation in large binaries: trac #856 -compiler_CONFIGURE_OPTS += --ld-option=-Wl,--relax -endif else compiler_CONFIGURE_OPTS += --ghc-option=-DNO_REGS endif