From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ricardo Wurmus Subject: [PATCH] gnu: gcj: remove broken symlink and stump binaries. Date: Thu, 30 Apr 2015 17:37:16 +0200 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:32922) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YnqWn-00017n-UP for guix-devel@gnu.org; Thu, 30 Apr 2015 11:37:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YnqWk-0002wO-Ij for guix-devel@gnu.org; Thu, 30 Apr 2015 11:37:29 -0400 Received: from sinope.bbbm.mdc-berlin.de ([141.80.25.23]:57330) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YnqWk-0002vS-6o for guix-devel@gnu.org; Thu, 30 Apr 2015 11:37:26 -0400 Received: from localhost (localhost [127.0.0.1]) by sinope.bbbm.mdc-berlin.de (Postfix) with ESMTP id BC6F4280847 for ; Thu, 30 Apr 2015 17:37:23 +0200 (CEST) Received: from sinope.bbbm.mdc-berlin.de ([127.0.0.1]) by localhost (sinope.bbbm.mdc-berlin.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id g0YVIeZFhduM for ; Thu, 30 Apr 2015 17:37:17 +0200 (CEST) Received: from HTCAONE.mdc-berlin.net (mab.citx.mdc-berlin.de [141.80.36.102]) by sinope.bbbm.mdc-berlin.de (Postfix) with ESMTP for ; Thu, 30 Apr 2015 17:37:17 +0200 (CEST) List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Guix-devel --=-=-= Content-Type: text/plain This patch adds a build phase to GCJ removing a broken symlink and a couple of non-functional binaries, such as "gcc" or "g++". In a GCJ build these binaries are useless as GCJ is a GCC built only with Java support. When GCJ is installed alongside gcc-toolchain, for example, there would be conflicts with GCJ's "gcc" stump binary shadowing the usable "gcc" binary from gcc-toolchain. Removing these binaries should be harmless as users of GCJ are unlikely to use "gcc" but "gcj" directly. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename="0001-gnu-gcj-Remove-broken-symlink-and-conflicting-files.patch" >From 99b56cf4b17b1dbed7977dbce6e3c81fa4115aa7 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Thu, 30 Apr 2015 17:11:39 +0200 Subject: [PATCH] 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 | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm index e712e43..3ea65a9 100644 --- a/gnu/packages/gcc.scm +++ b/gnu/packages/gcc.scm @@ -435,7 +435,29 @@ 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 + (map (cut string-append out <>) + '("/lib/jvm/jre/lib/amd64/libjawt.so" + "/bin/c++" + "/bin/cpp" + "/bin/g++" + "/bin/gcc" + "/bin/gcc-ar" + "/bin/gcc-nm" + "/bin/gcc-ranlib" + "/bin/x86_64-unknown-linux-gnu-c++" + "/bin/x86_64-unknown-linux-gnu-g++" + "/bin/x86_64-unknown-linux-gnu-gcc" + "/bin/x86_64-unknown-linux-gnu-gcc-4.8.4" + "/bin/x86_64-unknown-linux-gnu-gcc-ar" + "/bin/x86_64-unknown-linux-gnu-gcc-nm" + "/bin/x86_64-unknown-linux-gnu-gcc-ranlib")))) + #t) + ,phases))))))) (define ecj-bootstrap-4.8 (origin -- 2.1.0 --=-=-=--