components/libgsl/Makefile
branchs11-update
changeset 4177 403051808966
parent 4138 240dc166feab
child 4388 8bd4e7260c34
--- a/components/libgsl/Makefile	Thu Apr 23 10:43:16 2015 -0700
+++ b/components/libgsl/Makefile	Thu Apr 23 11:13:39 2015 -0700
@@ -39,16 +39,28 @@
 include $(WS_MAKE_RULES)/configure.mk
 include $(WS_MAKE_RULES)/ips.mk
 
-# Recreate configure and various Makefiles to pickup libsunperf changes.
+# By default, tests in each GSL sub-directory are linked statically against
+# a set of .la files. We don't deliver those in the GSL package, so we
+# adjust all the tests to link against the dynamic GSL library instead.
+COMPONENT_POST_UNPACK_ACTION = \
+	(cd $(COMPONENT_SRC); \
+	for f in `ls */Makefile.am` ; do \
+	    $(GSED) -i -e \
+		's|^test_LDADD.*$$|test_LDFLAGS = -L`pwd`/../.libs/ -R`pwd`/../.libs/\ntest_LDADD = -lgsl|' \
+		$$f ; \
+	done)
+
+# Recreate configure and top-level Makefile to pickup libsunperf changes.
 COMPONENT_PREP_ACTION = \
 	(cd $(@D) ; ACLOCAL=aclocal-1.11 AUTOMAKE=automake-1.11 autoreconf -f)
 
-# When using Studio 12.1, we need to clear this flag otherwise we get an
-# error at configure time.
-studio_NORUNPATH =
-
-# Get rid of compiler path set in RUNPATH.
-LDFLAGS += $(studio_NORUNPATH)
+# Prevent the test_linear() interpolation test core dumping when compiled
+# with -xO3 (or higher) with Studio 12.1. This is not a problem with Studio
+# 12.4. CR 20918528 - "Optimization problem with -xO4 for GSL test case."
+# has been filed for this problem.
+# Changed globally because it's unclear what other problems the higher
+# optimization level might cause GSL with Studio 12.1.
+studio_OPT = -xO2
 
 LDFLAGS += $(CC_BITS)
 LDFLAGS += $(studio_PIC)
@@ -71,9 +83,6 @@
 
 CC += $(CC_BITS)
 
-# Needed to pass -norunpath to the shared library link.
-CC += $(studio_NORUNPATH)
-
 COMPONENT_TEST_ARGS =	-k -i
 
 # Master test results are different not only between 32-bit and 64-bit, but
@@ -103,6 +112,12 @@
 
 install:	$(INSTALL_32_and_64)
 
+# There is a known problem in libsunperf that is causing a GSL test failure
+# in Solaris 11.3 with Studio 12.1 just on the x86 platform:
+# linalg: FAIL:   LQ_update m(5,3) [88]                             (32-bit)
+# The problem still exists on Solaris 12 with Studio 12.4 for which:
+# 20914954 cblas_gemm differences between x86 and sparcv7
+# has been filed.
 test:		$(TEST_32_and_64)
 
 REQUIRED_PACKAGES += shell/ksh93