Return-Path: Delivered-To: apmail-incubator-stdcxx-dev-archive@www.apache.org Received: (qmail 61085 invoked from network); 29 Nov 2006 18:03:11 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 29 Nov 2006 18:03:11 -0000 Received: (qmail 10403 invoked by uid 500); 29 Nov 2006 18:03:04 -0000 Delivered-To: apmail-incubator-stdcxx-dev-archive@incubator.apache.org Received: (qmail 10389 invoked by uid 500); 29 Nov 2006 18:03:04 -0000 Mailing-List: contact stdcxx-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: stdcxx-dev@incubator.apache.org Delivered-To: mailing list stdcxx-dev@incubator.apache.org Received: (qmail 10367 invoked by uid 99); 29 Nov 2006 18:03:03 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Nov 2006 10:03:03 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=UPPERCASE_25_50 X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [208.30.140.160] (HELO moroha.quovadx.com) (208.30.140.160) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Nov 2006 10:02:52 -0800 Received: from qxvcexch01.ad.quovadx.com (qxvcexch01.ad.quovadx.com [192.168.170.59]) by moroha.quovadx.com (8.13.6/8.13.6) with ESMTP id kATI2U1k017333 for ; Wed, 29 Nov 2006 18:02:30 GMT Received: from [10.70.3.113] ([10.70.3.113]) by qxvcexch01.ad.quovadx.com with Microsoft SMTPSVC(6.0.3790.1830); Wed, 29 Nov 2006 11:02:53 -0700 Message-ID: <456DCB38.1090703@roguewave.com> Date: Wed, 29 Nov 2006 11:02:32 -0700 From: Martin Sebor Organization: Rogue Wave Software User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.13) Gecko/20060417 X-Accept-Language: en-us, en MIME-Version: 1.0 To: stdcxx-dev@incubator.apache.org Subject: Re: [PATCH] Library path fix References: <454BB782.9000500@roguewave.com> <454BD649.9010205@roguewave.com> <454FAB51.5010603@roguewave.com> <4559107B.2070100@roguewave.com> <45590888.8070102@roguewave.com> <455915DE.7040306@roguewave.com> <455910B2.1030100@roguewave.com> <4559EAAB.2060805@roguewave.com> <455E23A7.8080102@roguewave.com> <456B30B0.7030704@roguewave.com> <456C7295.5030400@roguewave.com> <456DB0B8.3030807@roguewave.com> In-Reply-To: <456DB0B8.3030807@roguewave.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 29 Nov 2006 18:02:53.0103 (UTC) FILETIME=[970AFBF0:01C713E0] X-Virus-Checked: Checked by ClamAV on apache.org Andrew Black wrote: > Greetings all. > > After checking in this patch, I was performing a test build on AIX 5.2 > with GCC, and discovered that the version of ld available with this OS > doesn't support the -bsrv4 and -R switches. Attached is a patch that > aims to resolve this issue, along with a related issue with vacpp on > Linux (-bsrv4 is an AIX specific switch). Please prefer the := form of variable assignment when possible in order to have the expression on the right hand side evaluated just once rather than each time the variable is expanded. Before committing please also adjust the length of your ChangeLog lines to less than 80 characters. Thanks Martin > > --Andrew Black > > Changelog: > * 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). > > > ------------------------------------------------------------------------ > > Index: etc/config/gcc.config > =================================================================== > --- etc/config/gcc.config (revision 480289) > +++ etc/config/gcc.config (working copy) > @@ -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,10 @@ > SHARED_LDFLAGS = -Wl,-R$(LIBDIR) > else > ifeq ($(OSNAME),AIX) > - SHARED_LDFLAGS = -Wl,-bsvr4,-R$(LIBDIR) > + ifeq ($(shell expr $(OS_MAJOR) \< 5 \| $(OS_MINOR) \< 3),0) > + # -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) > Index: etc/config/vacpp.config > =================================================================== > --- etc/config/vacpp.config (revision 480289) > +++ etc/config/vacpp.config (working copy) > @@ -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,14 @@ > # shared/archive library options > SHARED_CXXFLAGS = > SHARED_CPPFLAGS = > -SHARED_LDFLAGS = -Wl,-bsvr4,-R$(LIBDIR) > +ifeq ($(OSNAME),AIX) > + ifeq ($(shell expr $(OS_MAJOR) \< 5 \| $(OS_MINOR) \< 3),0) > + # -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