22341948 check.pc includes cflags that break Studio
authorRich Burridge <rich.burridge@oracle.com>
Thu, 10 Dec 2015 12:35:02 -0800
changeset 5179 07d5ad88cb1d
parent 5178 39289ddbd44e
child 5180 da87475b1a99
22341948 check.pc includes cflags that break Studio
components/check/Makefile
--- a/components/check/Makefile	Thu Dec 10 09:53:12 2015 -0800
+++ b/components/check/Makefile	Thu Dec 10 12:35:02 2015 -0800
@@ -46,6 +46,16 @@
 
 CC +=		$(CC_BITS)
 
+# Override tests in m4/acx_pthread.m4 that try to set obsolete/incompatible
+# flags for linking threaded code on Solaris.
+PTHREAD_CFLAGS = -D__EXTENSIONS__
+ifeq ($(BUILD_TYPE), evaluation)
+# No longer needed on S12 due to PSARC/2014/019, but still needed on S11
+PTHREAD_CFLAGS += -D_POSIX_PTHREAD_SEMANTICS
+endif
+CONFIGURE_OPTIONS += PTHREAD_CFLAGS="$(PTHREAD_CFLAGS)"
+CONFIGURE_OPTIONS += PTHREAD_LIBS="-lc"
+
 # 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