From: <ipe...@us...> - 2010-02-18 05:23:13
|
Revision: 12933 http://x10.svn.sourceforge.net/x10/?rev=12933&view=rev Author: ipeshansky Date: 2010-02-18 05:23:06 +0000 (Thu, 18 Feb 2010) Log Message: ----------- Fix XTENLANG-984. Shared libraries are now built and found using rpath. Remaining cleanup: - Extra relative path in the install_name for x10rt_*.so - hence the need for an extra -rpath in MacOSX_CXXCommandBuilder and X10RT_TEST_LDFLAGS - Repeated code for shared library dependencies in the Makefile Modified Paths: -------------- trunk/x10.compiler/src/x10cpp/postcompiler/MacOSX_CXXCommandBuilder.java trunk/x10.runtime/Make.rules trunk/x10.runtime/src-cpp/Makefile Property Changed: ---------------- trunk/x10.runtime/src-cpp/ trunk/x10.runtime/x10rt/lib/ Modified: trunk/x10.compiler/src/x10cpp/postcompiler/MacOSX_CXXCommandBuilder.java =================================================================== --- trunk/x10.compiler/src/x10cpp/postcompiler/MacOSX_CXXCommandBuilder.java 2010-02-18 02:51:10 UTC (rev 12932) +++ trunk/x10.compiler/src/x10cpp/postcompiler/MacOSX_CXXCommandBuilder.java 2010-02-18 05:23:06 UTC (rev 12933) @@ -31,5 +31,11 @@ protected void addPostArgs(ArrayList<String> cxxCmd) { super.addPostArgs(cxxCmd); + + // Support for loading shared libraries from x10.dist/lib + cxxCmd.add("-Wl,-rpath"); + cxxCmd.add("-Wl,"+X10_DIST+"/lib"); + cxxCmd.add("-Wl,-rpath"); + cxxCmd.add("-Wl,"+X10_DIST+""); // some libs end up with a "lib/" relative path } } Modified: trunk/x10.runtime/Make.rules =================================================================== --- trunk/x10.runtime/Make.rules 2010-02-18 02:51:10 UTC (rev 12932) +++ trunk/x10.runtime/Make.rules 2010-02-18 05:23:06 UTC (rev 12933) @@ -144,8 +144,8 @@ else ifeq ($(shell uname -s),Darwin) export X10RT_PLATFORM=$(shell echo | gcc -E -dM - | grep -q x86_64 && echo darwin64 || echo darwin) - export X10_STATIC_LIB=1 - LIBSUFFIX := .a + override CXXFLAGS_SHARED += -shared -fPIC -install_name '@rpath/$@' + export X10RT_TEST_LDFLAGS = -Wl,-rpath -Wl,$(X10_HOME)/x10.runtime/x10rt/lib -Wl,-rpath -Wl,$(X10_HOME)/x10.runtime/x10rt else ifeq ($(shell uname -s),SunOS) export X10RT_PLATFORM=sunos Property changes on: trunk/x10.runtime/src-cpp ___________________________________________________________________ Modified: svn:ignore - bdwgc gen depend.mk libx10.a libx10.mft x10.dll + bdwgc gen depend.mk libx10.a libx10.so libx10.mft x10.dll Modified: trunk/x10.runtime/src-cpp/Makefile =================================================================== --- trunk/x10.runtime/src-cpp/Makefile 2010-02-18 02:51:10 UTC (rev 12932) +++ trunk/x10.runtime/src-cpp/Makefile 2010-02-18 05:23:06 UTC (rev 12933) @@ -25,6 +25,12 @@ ifeq ($(X10RT_PLATFORM),cygwin) XRX_DEP_LIBS = -L$(INSTDIR)/lib -lx10rt_pgas_sockets -lgc endif +ifeq ($(X10RT_PLATFORM),darwin) + XRX_DEP_LIBS = -L$(INSTDIR)/lib -lx10rt_pgas_sockets -lgc +endif +ifeq ($(X10RT_PLATFORM),darwin64) + XRX_DEP_LIBS = -L$(INSTDIR)/lib -lx10rt_pgas_sockets -lgc +endif XRX_MANIFEST = libx10.mft # this builds everything Property changes on: trunk/x10.runtime/x10rt/lib ___________________________________________________________________ Modified: svn:ignore - libx10rt_mpi.a libx10rt_standalone.a libx10rt_pgas_sockets.a libx10rt_pgas_lapi.a libxlpgas_*.a x10rt_mpi.dll x10rt_standalone.dll x10rt_pgas_sockets.dll x10rt_pgas_lapi.dll + libx10rt_mpi.a libx10rt_standalone.a libx10rt_pgas_sockets.a libx10rt_pgas_lapi.a libx10rt_mpi.so libx10rt_standalone.so libx10rt_pgas_sockets.so libx10rt_pgas_lapi.so libxlpgas_*.a x10rt_mpi.dll x10rt_standalone.dll x10rt_pgas_sockets.dll x10rt_pgas_lapi.dll This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |