21764367 guile pkg-config files include gcc-specific flag
authorRich Burridge <rich.burridge@oracle.com>
Tue, 01 Sep 2015 13:30:24 -0700
changeset 4834 22970ab7cd3a
parent 4833 b9009ad1e605
child 4835 d5abd56e3fcf
21764367 guile pkg-config files include gcc-specific flag
components/guile/Makefile
--- a/components/guile/Makefile	Tue Sep 01 09:29:08 2015 -0700
+++ b/components/guile/Makefile	Tue Sep 01 13:30:24 2015 -0700
@@ -48,6 +48,19 @@
 CONFIGURE_OPTIONS +=	ac_cv_type_complex_double=no
 CONFIGURE_OPTIONS +=	CFLAGS="$(CFLAGS)"
 
+# Remove the GNU specific "-pthreads" Cflags option from the guile config
+# files. In case we need to back-port this to earlier versions of Solaris,
+# -D_POSIX_PTHREAD_SEMANTICS is added in its place, which makes the pthreads
+# interfaces behave as specified in the POSIX standard (even though it does
+# nothing for Solaris 12).
+
+PROTOPKGCONFIGDIR.32 = $(PROTOUSRLIBDIR)/pkgconfig
+PROTOPKGCONFIGDIR.64 = $(PROTOUSRLIBDIR64)/pkgconfig
+
+COMPONENT_POST_INSTALL_ACTION += \
+	$(GSED) -i -e 's/-pthreads/-D_POSIX_PTHREAD_SEMANTICS/' \
+		$(PROTOPKGCONFIGDIR.$(BITS))/guile-1.8.pc
+
 # Master test results are the same for 32-bit and 64-bit, so override
 # here, rather than create multiple identical master files.
 COMPONENT_TEST_MASTER = $(COMPONENT_TEST_RESULTS_DIR)/results-all.master