[csw-devel] SF.net SVN: gar:[16600] csw/mgar/pkg/gcc4/trunk

wahwah at users.sourceforge.net wahwah at users.sourceforge.net
Tue Dec 27 12:41:02 CET 2011


Revision: 16600
          http://gar.svn.sourceforge.net/gar/?rev=16600&view=rev
Author:   wahwah
Date:     2011-12-27 11:41:02 +0000 (Tue, 27 Dec 2011)
Log Message:
-----------
gcc4/trunk: adding the default RPATH by shipping a custom specs file

Modified Paths:
--------------
    csw/mgar/pkg/gcc4/trunk/Makefile
    csw/mgar/pkg/gcc4/trunk/files/0002-default-rpath.diff

Added Paths:
-----------
    csw/mgar/pkg/gcc4/trunk/files/customize_specs.sh

Modified: csw/mgar/pkg/gcc4/trunk/Makefile
===================================================================
--- csw/mgar/pkg/gcc4/trunk/Makefile	2011-12-25 01:52:37 UTC (rev 16599)
+++ csw/mgar/pkg/gcc4/trunk/Makefile	2011-12-27 11:41:02 UTC (rev 16600)
@@ -21,9 +21,6 @@
 
 LIBOBJC = 3
 
-# Add default RPATH
-PATCHFILES = 0002-default-rpath.diff
-
 PACKAGING_PLATFORMS = solaris9-sparc solaris9-i386
 PACKAGING_PLATFORMS += solaris10-sparc solaris10-i386
 
@@ -521,9 +518,10 @@
 	ginstall -d -m 755 $(DESTDIR)$(prefix)/$(PKG_VERSION_TOKEN)/bin
 	for b in $(CORE_BINARIES) $(CXX_BINARIES) \
 		$(FORTRAN_BINARIES) $(JAVA_BINARIES); do \
-		gln -v -s ../../bin/$${b}$(PROGRAM_SUFFIX) \
+		gln -v -s -f ../../bin/$${b}$(PROGRAM_SUFFIX) \
 		$(DESTDIR)$(prefix)/$(PKG_VERSION_TOKEN)/bin/$${b}; \
 	done
+	bash $(FILEDIR)/customize_specs.sh $(DESTDIR) $(PROGRAM_SUFFIX) $(VERSION)
 	@$(MAKECOOKIE)
 
 # We need GNU find as find

Modified: csw/mgar/pkg/gcc4/trunk/files/0002-default-rpath.diff
===================================================================
--- csw/mgar/pkg/gcc4/trunk/files/0002-default-rpath.diff	2011-12-25 01:52:37 UTC (rev 16599)
+++ csw/mgar/pkg/gcc4/trunk/files/0002-default-rpath.diff	2011-12-27 11:41:02 UTC (rev 16600)
@@ -1,3 +1,5 @@
+This doesn't quite work the way we want it. We need something that works on
+Solaris 9 and 10, for both sparc and intel.
 --- gcc-4.6.2/gcc/config/i386/sol2-10.h	2011-12-11 00:34:08.341738656 +0100
 +++ gcc-4.6.2/gcc/config/i386/sol2-10.h.mod	2011-12-11 00:32:27.545153224 +0100
 @@ -131,6 +131,11 @@

Added: csw/mgar/pkg/gcc4/trunk/files/customize_specs.sh
===================================================================
--- csw/mgar/pkg/gcc4/trunk/files/customize_specs.sh	                        (rev 0)
+++ csw/mgar/pkg/gcc4/trunk/files/customize_specs.sh	2011-12-27 11:41:02 UTC (rev 16600)
@@ -0,0 +1,24 @@
+#!/opt/csw/bin/bash
+
+# This script generates and modifies a GCC specs file which after placing on
+# the filesystem will automatically add -R/opt/csw/lib to all gcc/g++
+# invocations.
+
+set -x
+set -e
+
+DESTDIR=$1
+PROGRAM_SUFFIX=$2
+VERSION=$3
+
+# Creating a modified specs file
+# In the global modulation, the gcc binary is not there.
+gcc_bin="${DESTDIR}/opt/csw/bin/gcc${PROGRAM_SUFFIX}"
+if [[ -x "${gcc_bin}" ]]; then
+  "${gcc_bin}" -dumpspecs > specs
+  gsed -i \
+    -e \
+    '/\*lib:/,+1 s+%.*+& %{m64:-R /opt/csw/lib/64 } %{!m64:-R /opt/csw/lib}+' \
+    specs
+  gmv -v specs "$(gfind ${DESTDIR}/opt/csw/lib -name ${VERSION} -type d -print)"
+fi


Property changes on: csw/mgar/pkg/gcc4/trunk/files/customize_specs.sh
___________________________________________________________________
Added: svn:executable
   + *

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the devel mailing list