GhcLibProfiled=$(if $(filter p,$(GhcLibWays)),YES,NO)
# Build shared and/or static libs?
-BuildSharedLibs=@BuildSharedLibs@
+PlatformSupportsSharedLibs = $(if $(filter $(TARGETPLATFORM),i386-unknown-linux x86_64-unknown-linux),YES,NO)
+ifeq "$(PlatformSupportsSharedLibs)" "YES"
+BuildSharedLibs = YES
+else
+BuildSharedLibs = NO
+endif
# ToDo later:
# BuildStaticLibs=@BuildStaticLibs@
GhcEnableTablesNextToCode=YES
endif
+# Whether to use libffi for adjustors (foreign import "wrapper") or
+# not. If we have built-in support (rts/Adjustor.c) then we use that,
+# otherwise we fall back on libffi, which is slightly slower.
+ArchHasAdjustorSupport=$(strip $(if $(findstring $(HostArch_CPP),i386 x86_64 alpha powerpc ia64,),YES,NO))
+ifeq "$(ArchHasAdjustorSupport)" "YES"
+UseLibFFIForAdjustors=NO
+else
+UseLibFFIForAdjustors=YES
+endif
+
# On Windows we normally want to make a relocatable bindist, to we
# ignore flags like libdir
ifeq "$(Windows)" "YES"
BuildingParallel=$(subst mp,YES,$(filter mp,$(WAYS)))
BuildingGranSim=$(subst mg,YES,$(filter mg,$(WAYS)))
-# Interface file version (hi-boot files only)
-#
-# A GHC built with HscIfaceFileVersion=n will look for
-# M.hi-boot-n, and only then for
-# M.hi-boot.
-# (It'll be happy with the latter if the former doesn't exist.)
-#
-#
-# This variable is used ONLY for hi-boot files. Its only purpose is
-# to allow you to have a single directory with multiple .hi-boot files
-# for the same module, each corresponding to a different version of
-# GHC.
-#
-# HscIfaceFileVersion is propagated to hsc via
-# compiler/main/Config.hs, which is automatically generated by
-# compiler/Makefile.
-
-HscIfaceFileVersion=6
-
#------------------------------------------------------------------------------
# Options for Libraries
# Invocations of `install' for the four different classes
# of targets:
#
+CREATE_SCRIPT = create () { touch $$1 && chmod 755 $$1 ; } && create
+CREATE_DATA = create () { touch $$1 && chmod 644 $$1 ; } && create
INSTALL_PROGRAM = $(INSTALL) -m 755
INSTALL_SCRIPT = $(INSTALL) -m 755
INSTALL_SHLIB = $(INSTALL) -m 755
INSTALL_DATA = $(INSTALL) -m 644
INSTALL_HEADER = $(INSTALL) -m 644
INSTALL_MAN = $(INSTALL) -m 644
-INSTALL_DIR = $(MKDIRHIER)
+INSTALL_DOC = $(INSTALL) -m 644
+INSTALL_DIR = $(INSTALL) -m 755 -d
#
# runhaskell and hsc2hs are special, in that other compilers besides