From 5f6887e839c10f0c905969d07baca4e03f453e82 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Thu, 30 Apr 2015 17:11:39 +0200 Subject: gnu: gcj: Remove broken symlink and conflicting files. * gnu/packages/gcc.scm (gcj)[arguments]: Add a build phase to remove a broken symlink and generic stump binaries. --- gnu/packages/gcc.scm | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'gnu/packages/gcc.scm') diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm index c368b7df97..957917bf0b 100644 --- a/gnu/packages/gcc.scm +++ b/gnu/packages/gcc.scm @@ -444,7 +444,18 @@ Go. It also includes runtime support libraries for these languages.") (string-append jvm "/lib/tools.jar"))) (chmod target #o755) #t)) - ,phases)))))) + (alist-cons-after + 'install 'remove-broken-or-conflicting-files + (lambda _ + (let ((out (assoc-ref %outputs "out"))) + (for-each + delete-file + (append (find-files (string-append out "/lib/jvm/jre/lib") + "libjawt.so") + (find-files (string-append out "/bin") + ".*(c\\+\\+|cpp|g\\+\\+|gcc.*)")))) + #t) + ,phases))))))) (define ecj-bootstrap-4.8 (origin -- cgit 1.4.1 From 167a05aabc229d48d62545ef218d8b0577e6e8f3 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Mon, 4 May 2015 00:23:55 +0200 Subject: gnu: gcc-5.1: Add specific libvtv patch. * gnu/packages/patches/gcc-5.0-libvtv-runpath.patch: New file. * gnu-system.am (dist_patch_DATA): Add it. * gnu/packages/gcc.scm (gcc-5.1)[source]: Use it. --- gnu-system.am | 1 + gnu/packages/gcc.scm | 4 +++- gnu/packages/patches/gcc-5.0-libvtv-runpath.patch | 15 +++++++++++++++ 3 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/gcc-5.0-libvtv-runpath.patch (limited to 'gnu/packages/gcc.scm') diff --git a/gnu-system.am b/gnu-system.am index 95eefdcbf5..3223dc8afd 100644 --- a/gnu-system.am +++ b/gnu-system.am @@ -422,6 +422,7 @@ dist_patch_DATA = \ gnu/packages/patches/gcc-arm-link-spec-fix.patch \ gnu/packages/patches/gcc-cross-environment-variables.patch \ gnu/packages/patches/gcc-libvtv-runpath.patch \ + gnu/packages/patches/gcc-5.0-libvtv-runpath.patch \ gnu/packages/patches/geoclue-config.patch \ gnu/packages/patches/ghostscript-runpath.patch \ gnu/packages/patches/gitolite-openssh-6.8-compat.patch \ diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm index 957917bf0b..4512e54e8b 100644 --- a/gnu/packages/gcc.scm +++ b/gnu/packages/gcc.scm @@ -343,7 +343,9 @@ Go. It also includes runtime support libraries for these languages.") (sha256 (base32 "1bd5vj4px3s8nlakbgrh38ynxq4s654m6nxz7lrj03mvkkwgvnmp")) - (patches (origin-patches (package-source gcc-4.9))))))) + (patches (map search-patch + '("gcc-arm-link-spec-fix.patch" + "gcc-5.0-libvtv-runpath.patch"))))))) (define* (custom-gcc gcc name languages #:key (separate-lib-output? #t)) "Return a custom version of GCC that supports LANGUAGES." diff --git a/gnu/packages/patches/gcc-5.0-libvtv-runpath.patch b/gnu/packages/patches/gcc-5.0-libvtv-runpath.patch new file mode 100644 index 0000000000..9a9bc5ca53 --- /dev/null +++ b/gnu/packages/patches/gcc-5.0-libvtv-runpath.patch @@ -0,0 +1,15 @@ +GCC 4.9 and later have libvtv and, just like libstdc++ (see +https://gcc.gnu.org/bugzilla/show_bug.cgi?id=32354), it doesn't +have $libdir in its RUNPATH, but it NEEDs libgcc_s. This patch +fixes that. + +--- gcc-5.1.0/libvtv/Makefile.in 2014-10-30 09:28:58.000000000 +0100 ++++ gcc-5.1.0/libvtv/Makefile.in 2015-04-30 09:51:04.161129705 +0200 +@@ -15,6 +15,7 @@ + + @SET_MAKE@ + ++libvtv_la_LDFLAGS = -Wl,-rpath=$(libdir) + + VPATH = @srcdir@ + pkgdatadir = $(datadir)/@PACKAGE@ -- cgit 1.4.1 From ad12c43e972482dc9d38c7214fee751bad290ea7 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Fri, 8 May 2015 12:36:58 +0200 Subject: gnu: gcj: Add $libdir to RUNPATH. * gnu/packages/gcc.scm (gcj)[arguments]: Add build phase to add library output directory to RUNPATH. --- gnu/packages/gcc.scm | 76 +++++++++++++++++++++++++++++----------------------- 1 file changed, 42 insertions(+), 34 deletions(-) (limited to 'gnu/packages/gcc.scm') diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm index 4512e54e8b..b652521bb8 100644 --- a/gnu/packages/gcc.scm +++ b/gnu/packages/gcc.scm @@ -415,38 +415,47 @@ Go. It also includes runtime support libraries for these languages.") "--enable-languages=java" ,@(remove (cut string-match "--enable-languages.*" <>) ,flags)))) - ((#:phases phases) - `(alist-cons-after - 'install 'install-javac-and-javap-wrappers - (lambda _ - (let* ((javac (assoc-ref %build-inputs "javac.in")) - (ecj (assoc-ref %build-inputs "ecj-bootstrap")) - (gcj (assoc-ref %outputs "out")) - (gcjbin (string-append gcj "/bin/")) - (jvm (string-append gcj "/lib/jvm/")) - (target (string-append jvm "/bin/javac"))) - - (symlink (string-append gcjbin "jcf-dump") - (string-append jvm "/bin/javap")) - - (copy-file ecj (string-append gcj "/share/java/ecj.jar")) - - ;; Create javac wrapper from the template javac.in by - ;; replacing the @VARIABLES@ with paths. - (copy-file javac target) - (patch-shebang target) - (substitute* target - (("@JAVA@") - (string-append jvm "/bin/java")) - (("@ECJ_JAR@") - (string-append gcj "/share/java/ecj.jar")) - (("@RT_JAR@") - (string-append jvm "/jre/lib/rt.jar")) - (("@TOOLS_JAR@") - (string-append jvm "/lib/tools.jar"))) - (chmod target #o755) - #t)) - (alist-cons-after + ((#:phases phases) + `(modify-phases ,phases + (add-after + 'unpack 'add-lib-output-to-rpath + (lambda _ + (substitute* "libjava/Makefile.in" + (("libgcj_bc_dummy_LINK = .* -shared" line) + (string-append line " -Wl,-rpath=$(libdir)")) + (("libgcj(_bc)?_la_LDFLAGS =" ldflags _) + (string-append ldflags " -Wl,-rpath=$(libdir)"))))) + (add-after + 'install 'install-javac-and-javap-wrappers + (lambda _ + (let* ((javac (assoc-ref %build-inputs "javac.in")) + (ecj (assoc-ref %build-inputs "ecj-bootstrap")) + (gcj (assoc-ref %outputs "out")) + (gcjbin (string-append gcj "/bin/")) + (jvm (string-append gcj "/lib/jvm/")) + (target (string-append jvm "/bin/javac"))) + + (symlink (string-append gcjbin "jcf-dump") + (string-append jvm "/bin/javap")) + + (copy-file ecj (string-append gcj "/share/java/ecj.jar")) + + ;; Create javac wrapper from the template javac.in by + ;; replacing the @VARIABLES@ with paths. + (copy-file javac target) + (patch-shebang target) + (substitute* target + (("@JAVA@") + (string-append jvm "/bin/java")) + (("@ECJ_JAR@") + (string-append gcj "/share/java/ecj.jar")) + (("@RT_JAR@") + (string-append jvm "/jre/lib/rt.jar")) + (("@TOOLS_JAR@") + (string-append jvm "/lib/tools.jar"))) + (chmod target #o755) + #t))) + (add-after 'install 'remove-broken-or-conflicting-files (lambda _ (let ((out (assoc-ref %outputs "out"))) @@ -456,8 +465,7 @@ Go. It also includes runtime support libraries for these languages.") "libjawt.so") (find-files (string-append out "/bin") ".*(c\\+\\+|cpp|g\\+\\+|gcc.*)")))) - #t) - ,phases))))))) + #t)))))))) (define ecj-bootstrap-4.8 (origin -- cgit 1.4.1