summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2021-11-05 15:34:14 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2022-10-13 20:58:57 +0000
commit7989483929aa1b4b5db6bc0bca8137b640b6dda2 (patch)
tree1e38d7f5478f5a974face58c5a533f62b3bf2ca9
parentb4a105d77232a87304b7b621e2f99e699a8eebd3 (diff)
downloadpixman-7989483929aa1b4b5db6bc0bca8137b640b6dda2.tar.gz
configure.ac: allow x64 libraries on Solaris to run on non-SSSE3 machines
Override the x64 hardware capability autodetection by Solaris Studio compilers for x64 libraries the same way we do for x86 libraries. Also fix configure test for this override to work in out-of-tree builds. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--configure.ac16
1 files changed, 10 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac
index 3e84182..8561449 100644
--- a/configure.ac
+++ b/configure.ac
@@ -503,19 +503,19 @@ fi
AM_CONDITIONAL(USE_SSSE3, test $have_ssse3_intrinsics = yes)
dnl ===========================================================================
-dnl Other special flags needed when building code using MMX or SSE instructions
+dnl Other special flags needed when building code using x86 ISA extensions
case $host_os in
solaris*)
- # When building 32-bit binaries, apply a mapfile to ensure that the
- # binaries aren't flagged as only able to run on MMX+SSE capable CPUs
- # since they check at runtime before using those instructions.
+ # When building Solaris binaries, apply a mapfile to ensure that the
+ # binaries aren't flagged as only able to run on MMX/SSE/SSSE3 capable
+ # CPUs since they check at runtime before using those instructions.
# Not all linkers grok the mapfile format so we check for that first.
- if test "$AMD64_ABI" = "no" ; then
+ if test "$host_cpu" == "i386" -o "$host_cpu" == "x86_64"; then
use_hwcap_mapfile=no
AC_MSG_CHECKING(whether to use a hardware capability map file)
hwcap_save_LDFLAGS="$LDFLAGS"
HWCAP_LDFLAGS='-Wl,-M,$(srcdir)/solaris-hwcap.mapfile'
- LDFLAGS="$LDFLAGS -Wl,-M,pixman/solaris-hwcap.mapfile"
+ LDFLAGS="$LDFLAGS -Wl,-M,${srcdir}/pixman/solaris-hwcap.mapfile"
AC_LINK_IFELSE([AC_LANG_SOURCE([[int main() { return 0; }]])],
use_hwcap_mapfile=yes,
HWCAP_LDFLAGS="")
@@ -528,6 +528,9 @@ case $host_os in
if test "x$SSE2_LDFLAGS" = "x" ; then
SSE2_LDFLAGS="$HWCAP_LDFLAGS"
fi
+ if test "x$SSSE3_LDFLAGS" = "x" ; then
+ SSSE3_LDFLAGS="$HWCAP_LDFLAGS"
+ fi
;;
esac
@@ -538,6 +541,7 @@ AC_SUBST(MMX_LDFLAGS)
AC_SUBST(SSE2_CFLAGS)
AC_SUBST(SSE2_LDFLAGS)
AC_SUBST(SSSE3_CFLAGS)
+AC_SUBST(SSSE3_LDFLAGS)
dnl ===========================================================================
dnl Check for VMX/Altivec