stdcxx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From abl...@apache.org
Subject svn commit: r480679 - in /incubator/stdcxx/trunk/etc/config: gcc.config vacpp.config
Date Wed, 29 Nov 2006 18:53:15 GMT
Author: ablack
Date: Wed Nov 29 10:53:12 2006
New Revision: 480679

URL: http://svn.apache.org/viewvc?view=rev&rev=480679
Log:
2006-11-29  Andrew Black  <ablack@roguewave.com>

	* gcc.config [AIX] (OS_MAJOR, OS_MINOR): Retrieve and store OS major 
	and minor version.
	[AIX] (SHARED_CPPFLAGS): Only set if OS is 5.3 or newer (Earlier 
	versions of ld don't support -bsrv4, -R switches).
	* vacpp.config [AIX] (OS_MAJOR, OS_MINOR): Retrieve and store OS major 
	and minor version.
	[AIX] (SHARED_CPPFLAGS): Only set if OS is 5.3 or newer (Earlier 
	versions of ld don't support -bsrv4, -R switches).
	[!AIX] (SHARED_CPPFLAGS): Use -R switch (assuming Linux ld).

Modified:
    incubator/stdcxx/trunk/etc/config/gcc.config
    incubator/stdcxx/trunk/etc/config/vacpp.config

Modified: incubator/stdcxx/trunk/etc/config/gcc.config
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/etc/config/gcc.config?view=diff&rev=480679&r1=480678&r2=480679
==============================================================================
--- incubator/stdcxx/trunk/etc/config/gcc.config (original)
+++ incubator/stdcxx/trunk/etc/config/gcc.config Wed Nov 29 10:53:12 2006
@@ -12,6 +12,12 @@
 CXX_MAJOR      := $(shell echo "$(CCVER)" | sed "s/^\([1-9][0-9]*\).*/\1/")
 CXX_MINOR      := $(shell echo "$(CCVER)" | sed "s/[1-9]*\.\([0-9]*\).*/\1/")
 
+# determine the major and minor version of the OS on AIX
+ifeq ($(OSNAME),AIX)
+    OS_MAJOR := $(shell uname -v)
+    OS_MINOR := $(shell uname -r)
+endif
+
 # -W and -Wextra are the same
 WARNFLAGS       = -W -Wall -Wcast-qual -Winline -Wshadow -Wwrite-strings
 
@@ -139,7 +145,11 @@
     SHARED_LDFLAGS = -Wl,-R$(LIBDIR)
   else
     ifeq ($(OSNAME),AIX)
-      SHARED_LDFLAGS = -Wl,-bsvr4,-R$(LIBDIR)
+      ifeq ($(shell [ $(OS_MAJOR) -gt 5 -o $(OS_MAJOR) -eq 5 -a $(OS_MINOR) \
+-ge 3 ] && echo 1), 1)
+        # -bsrv4, -R only available on AIX 5.3 and newer
+        SHARED_LDFLAGS  = -Wl,-bsvr4,-R$(LIBDIR)
+      endif
     else
       ifeq ($(OSNAME),HP-UX)
         SHARED_LDFLAGS = -Wl,+b$(LIBDIR)

Modified: incubator/stdcxx/trunk/etc/config/vacpp.config
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/etc/config/vacpp.config?view=diff&rev=480679&r1=480678&r2=480679
==============================================================================
--- incubator/stdcxx/trunk/etc/config/vacpp.config (original)
+++ incubator/stdcxx/trunk/etc/config/vacpp.config Wed Nov 29 10:53:12 2006
@@ -41,6 +41,12 @@
 CXX_MAJOR       = $(shell echo "$(CCVER)" | sed "s/^\([1-9][0-9]*\).*/\1/")
 CXX_MINOR       = $(shell echo "$(CCVER)" | sed "s/[1-9]*\.\([0-9]*\).*/\1/")
 
+# determine the major and minor version of the OS on AIX
+ifeq ($(OSNAME),AIX)
+    OS_MAJOR := $(shell uname -v)
+    OS_MINOR := $(shell uname -r)
+endif
+
 # suppress bogus warnings:
 # 1540-0152: A template dependent name that is a type must be qualified
 #            with "typename".
@@ -111,7 +117,15 @@
 # shared/archive library options
 SHARED_CXXFLAGS = 
 SHARED_CPPFLAGS =
-SHARED_LDFLAGS  = -Wl,-bsvr4,-R$(LIBDIR)
+ifeq ($(OSNAME),AIX)
+  ifeq ($(shell [ $(OS_MAJOR) -gt 5 -o $(OS_MAJOR) -eq 5 -a $(OS_MINOR) -ge 3 \
+] && echo 1), 1)
+    # -bsrv4, -R only available on AIX 5.3 and newer
+    SHARED_LDFLAGS  = -Wl,-bsvr4,-R$(LIBDIR)
+  endif
+else   # assume Linux
+  SHARED_LDFLAGS  = -Wl,-R$(LIBDIR)
+endif
 
 ifeq ($(rtl_enabled),1)
   SHARED_SUFFIX = .so



Mime
View raw message