$NetBSD: patch-build_config_SunOS-GCC,v 1.3 2012/07/29 11:26:54 fhajny Exp $ Resolve a conflict on SunOS, where GCC>=4.6 will force C99 with C++ and require _XOPEN_SOURCE=600, whereas GCC<4.6 will reject C99 with C++. --- build/config/SunOS-GCC.orig 2011-09-24 08:06:59.000000000 +0000 +++ build/config/SunOS-GCC @@ -21,6 +21,8 @@ LINK = $(CXX) LIB = ar -cr RANLIB = ranlib SHLIB = $(CXX) -shared -Wl,-soname,$(notdir $@) -o $@ +SHLIBFLAGS = $(LDFLAGS) -Wl,-R$(POCO_PREFIX)/lib \ + $(foreach p,$(sort $(POCO_ADD_LIBRARY)),-L$(p) -Wl,-R$(p)) SHLIBLN = $(POCO_BASE)/build/script/shlibln STRIP = strip DEP = $(POCO_BASE)/build/script/makedepend.gcc @@ -38,10 +40,10 @@ SHAREDLIBLINKEXT = .so # # Compiler and Linker Flags # -CFLAGS = +CFLAGS = -D_XOPEN_SOURCE=500 CFLAGS32 = CFLAGS64 = -CXXFLAGS = -Wall -Wno-sign-compare +CXXFLAGS = -Wall -Wno-sign-compare -D_XOPEN_SOURCE=$(XOPEN_SOURCE) CXXFLAGS32 = CXXFLAGS64 = LINKFLAGS = @@ -52,7 +54,7 @@ STATICOPT_CXX = STATICOPT_LINK = -static SHAREDOPT_CC = -fPIC SHAREDOPT_CXX = -fPIC -SHAREDOPT_LINK = -Wl,-rpath,$(LIBPATH) +SHAREDOPT_LINK = -Wl,-R$(POCO_PREFIX)/lib -L$(LIBPATH) DEBUGOPT_CC = -g -D_DEBUG DEBUGOPT_CXX = -g -D_DEBUG DEBUGOPT_LINK = -g @@ -63,9 +65,9 @@ RELEASEOPT_LINK = -O2 # # System Specific Flags # -SYSFLAGS = -D_XOPEN_SOURCE=500 -D_REENTRANT -D_THREAD_SAFE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE +SYSFLAGS = -D_REENTRANT -D_THREAD_SAFE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE # # System Specific Libraries # -SYSLIBS = -lpthread -ldl -lrt +SYSLIBS = -lpthread -ldl -lrt -lxnet -lsocket -lnsl -lresolv -ldl