Commit e7f04c3b authored by kgardas's avatar kgardas Committed by Ian Lynagh
Browse files

- disable shared lib support on Solaris 10 and older (fixes #4973)

parent 814edf44
...@@ -222,6 +222,21 @@ x86_64-apple-darwin) ...@@ -222,6 +222,21 @@ x86_64-apple-darwin)
;; ;;
esac esac
# Testing if we shall enable shared libs support on Solaris.
# Anything older than SunOS 5.11 aka Solaris 11 (Express) is broken.
SOLARIS_BROKEN_SHLD=NO
case $host in
i386-*-solaris2)
# here we go with the test
MINOR=`uname -r|cut -d '.' -f 2-`
if test "$MINOR" -lt "11"; then
SOLARIS_BROKEN_SHLD=YES
fi
;;
esac
# Sync this with cTargetArch in compiler/ghc.mk # Sync this with cTargetArch in compiler/ghc.mk
checkArch() { checkArch() {
case $1 in case $1 in
...@@ -322,6 +337,8 @@ AC_SUBST(TargetVendor_CPP) ...@@ -322,6 +337,8 @@ AC_SUBST(TargetVendor_CPP)
AC_SUBST(exeext) AC_SUBST(exeext)
AC_SUBST(soext) AC_SUBST(soext)
AC_SUBST(SOLARIS_BROKEN_SHLD)
AC_ARG_WITH(hc, AC_ARG_WITH(hc,
[AC_HELP_STRING([--with-hc=ARG], [AC_HELP_STRING([--with-hc=ARG],
[Use ARG as the path to the compiler for compiling ordinary [Use ARG as the path to the compiler for compiling ordinary
......
...@@ -104,13 +104,18 @@ GhcDynamic=NO ...@@ -104,13 +104,18 @@ GhcDynamic=NO
GhcProfiled=NO GhcProfiled=NO
# Do we support shared libs? # Do we support shared libs?
PlatformSupportsSharedLibs = $(if $(filter $(TARGETPLATFORM),\ SharedLibsPlatformList = i386-unknown-linux x86_64-unknown-linux \
i386-unknown-linux x86_64-unknown-linux \
i386-unknown-freebsd x86_64-unknown-freebsd \ i386-unknown-freebsd x86_64-unknown-freebsd \
i386-unknown-openbsd x86_64-unknown-openbsd \ i386-unknown-openbsd x86_64-unknown-openbsd \
i386-unknown-mingw32 \ i386-unknown-mingw32 \
i386-unknown-solaris2 \ i386-apple-darwin powerpc-apple-darwin
i386-apple-darwin powerpc-apple-darwin),YES,NO)
ifeq ($(SOLARIS_BROKEN_SHLD), NO)
SharedLibsPlatformList := $(SharedLibsPlatformList) i386-unknown-solaris2
endif
PlatformSupportsSharedLibs = $(if $(filter $(TARGETPLATFORM),\
$(SharedLibsPlatformList)),YES,NO)
# Build a compiler that will build *unregisterised* libraries and # Build a compiler that will build *unregisterised* libraries and
# binaries by default. Unregisterised code is supposed to compile and # binaries by default. Unregisterised code is supposed to compile and
......
...@@ -139,3 +139,7 @@ endif ...@@ -139,3 +139,7 @@ endif
# This distinguishes "msys" and "cygwin", which are not # This distinguishes "msys" and "cygwin", which are not
# not distinguished by HOST_OS_CPP # not distinguished by HOST_OS_CPP
OSTYPE=@OSTYPE@ OSTYPE=@OSTYPE@
# In case of Solaris OS, does it provide broken shared libs
# linker or not?
SOLARIS_BROKEN_SHLD=@SOLARIS_BROKEN_SHLD@
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment