From commits-return-3035-apmail-stdcxx-commits-archive=stdcxx.apache.org@stdcxx.apache.org Tue Jun 03 22:30:28 2008 Return-Path: Delivered-To: apmail-stdcxx-commits-archive@www.apache.org Received: (qmail 87706 invoked from network); 3 Jun 2008 22:30:28 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 3 Jun 2008 22:30:28 -0000 Received: (qmail 28950 invoked by uid 500); 3 Jun 2008 22:30:31 -0000 Delivered-To: apmail-stdcxx-commits-archive@stdcxx.apache.org Received: (qmail 28932 invoked by uid 500); 3 Jun 2008 22:30:31 -0000 Mailing-List: contact commits-help@stdcxx.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@stdcxx.apache.org Delivered-To: mailing list commits@stdcxx.apache.org Received: (qmail 28923 invoked by uid 99); 3 Jun 2008 22:30:31 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Jun 2008 15:30:31 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Jun 2008 22:29:43 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id AF45A2388A16; Tue, 3 Jun 2008 15:30:05 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r662906 - in /stdcxx/branches/4.2.x/etc/config: GNUmakefile.tst gcc.config Date: Tue, 03 Jun 2008 22:30:05 -0000 To: commits@stdcxx.apache.org From: elemings@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080603223005.AF45A2388A16@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: elemings Date: Tue Jun 3 15:30:04 2008 New Revision: 662906 URL: http://svn.apache.org/viewvc?rev=662906&view=rev Log: 2008-06-03 Eric Lemings STDCXX-488 * etc/config/GNUmakefile.tst (LDFLAGS): Use appropriate form of RPATH options in LDFLAGS variable on Darwin platforms. * etc/config/gcc.config: Retrieve major OS version on Darwin platforms and use @rpath in -install_name flag if building on Darwin 9.x (Mac OS 10.5). Use only library basename for all other versions of Darwin. Also define RPATH variable on Darwin. Modified: stdcxx/branches/4.2.x/etc/config/GNUmakefile.tst stdcxx/branches/4.2.x/etc/config/gcc.config Modified: stdcxx/branches/4.2.x/etc/config/GNUmakefile.tst URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/etc/config/GNUmakefile.tst?rev=662906&r1=662905&r2=662906&view=diff ============================================================================== --- stdcxx/branches/4.2.x/etc/config/GNUmakefile.tst (original) +++ stdcxx/branches/4.2.x/etc/config/GNUmakefile.tst Tue Jun 3 15:30:04 2008 @@ -87,7 +87,13 @@ TARGET += $(patsubst %.cpp,%.o,$(wildcard *.cpp)) ifneq ($(RPATH),) - LDFLAGS += $(RPATH)$(LIBDIR):$(BUILDDIR)/rwtest + ifneq ($(shell uname),Darwin) + # this form doesn't work on Darwin + LDFLAGS += $(RPATH)$(LIBDIR):$(BUILDDIR)/rwtest + else + # but this form does + LDFLAGS += $(RPATH)$(LIBDIR) $(RPATH)$(BUILDDIR)/rwtest + endif endif RUNFLAGS += --compat -x "--compat -O -" --ulimit=as:1073741824 Modified: stdcxx/branches/4.2.x/etc/config/gcc.config URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/etc/config/gcc.config?rev=662906&r1=662905&r2=662906&view=diff ============================================================================== --- stdcxx/branches/4.2.x/etc/config/gcc.config (original) +++ stdcxx/branches/4.2.x/etc/config/gcc.config Tue Jun 3 15:30:04 2008 @@ -33,10 +33,14 @@ 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 +# determine the major and minor version of the OS when needed ifeq ($(OSNAME),AIX) OS_MAJOR := $(shell uname -v) OS_MINOR := $(shell uname -r) +else + ifeq ($(OSNAME),Darwin) + OS_MAJOR := $(shell uname -r | sed "s/^\([1-9]*\).*/\1/") + endif endif # -W and -Wextra are the same @@ -97,12 +101,16 @@ # no -shared option for GCC on Mac OS X (Darwin) LDSOFLAGS = -shared else - # Flags needed when linking the library - LDSOFLAGS = \ --dynamiclib \ --install_name $(BUILDDIR)/lib/$(LIBNAME) \ --compatibility_version 4 \ --current_version $(LIBVER) + # flags needed when linking the library + LDSOFLAGS = -dynamiclib \ +-compatibility_version 4 -current_version $(LIBVER) + + # use appropriate install_name + ifeq ($(shell [ $(OS_MAJOR) -eq 9 ] && echo 1), 1) + LDSOFLAGS += -install_name @rpath/$(LIBNAME) + else + LDSOFLAGS += -install_name $(LIBNAME) + endif endif @@ -198,6 +206,10 @@ endif endif +ifeq ($(OSNAME),Darwin) + RPATH = -Wl,-rpath, +endif + # debug/optimization options DEBUG_CXXFLAGS = -g DEBUG_CPPFLAGS =