From owner-svn-ports-head@freebsd.org Sun Nov 25 21:08:02 2018 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 56DF51142E3E; Sun, 25 Nov 2018 21:08:02 +0000 (UTC) (envelope-from gerald@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F276A77A1A; Sun, 25 Nov 2018 21:08:01 +0000 (UTC) (envelope-from gerald@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D2FD22229D; Sun, 25 Nov 2018 21:08:01 +0000 (UTC) (envelope-from gerald@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wAPL81H2082419; Sun, 25 Nov 2018 21:08:01 GMT (envelope-from gerald@FreeBSD.org) Received: (from gerald@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wAPL81PJ082417; Sun, 25 Nov 2018 21:08:01 GMT (envelope-from gerald@FreeBSD.org) Message-Id: <201811252108.wAPL81PJ082417@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gerald set sender to gerald@FreeBSD.org using -f From: Gerald Pfeifer Date: Sun, 25 Nov 2018 21:08:01 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r485902 - in head/lang/gcc8: . files X-SVN-Group: ports-head X-SVN-Commit-Author: gerald X-SVN-Commit-Paths: in head/lang/gcc8: . files X-SVN-Commit-Revision: 485902 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: F276A77A1A X-Spamd-Result: default: False [1.61 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_SPAM_LONG(0.66)[0.661,0]; NEURAL_SPAM_MEDIUM(0.66)[0.657,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_SPAM_SHORT(0.30)[0.296,0] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Nov 2018 21:08:02 -0000 Author: gerald Date: Sun Nov 25 21:08:01 2018 New Revision: 485902 URL: https://svnweb.freebsd.org/changeset/ports/485902 Log: Add support for -fuse-ld=lld, backported from GCC mainline which is going to become GCC 9 (in form of files/patch-fuse-ld=lld borrowed from devel/riscv64-gcc). PR: 227302 Added: head/lang/gcc8/files/patch-fuse-ld=lld - copied unchanged from r485860, head/devel/riscv64-gcc/files/patch-fuse-ld=lld Modified: head/lang/gcc8/Makefile Modified: head/lang/gcc8/Makefile ============================================================================== --- head/lang/gcc8/Makefile Sun Nov 25 21:01:10 2018 (r485901) +++ head/lang/gcc8/Makefile Sun Nov 25 21:08:01 2018 (r485902) @@ -3,7 +3,7 @@ PORTNAME= gcc PORTVERSION= 8.2.0 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= lang MASTER_SITES= GCC PKGNAMESUFFIX= ${SUFFIX} Copied: head/lang/gcc8/files/patch-fuse-ld=lld (from r485860, head/devel/riscv64-gcc/files/patch-fuse-ld=lld) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lang/gcc8/files/patch-fuse-ld=lld Sun Nov 25 21:08:01 2018 (r485902, copy of r485860, head/devel/riscv64-gcc/files/patch-fuse-ld=lld) @@ -0,0 +1,105 @@ +commit 4eea76dbfc871614e116961b048d9aa38eee66ea +Author: law +Date: Thu Nov 8 22:05:27 2018 +0000 + + * collect2.c (linker_select): Add USE_LLD_LD. + (ld_suffixes): Add ld.lld. + (main): Handle -fuse-ld=lld. + * common.opt (-fuse-ld=lld): New option. + * doc/invoke.texi (-fuse-ld=lld): Document. + * opts.c (common_handle_option): Handle OPT_fuse_ld_lld. + + git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@265940 138bc75d-0d04-0410-961f-82ee72b054a4 + +diff --git a/gcc/collect2.c b/gcc/collect2.c +index a96af137a44..6463ff7b645 100644 +--- gcc/collect2.c ++++ gcc/collect2.c +@@ -831,6 +831,7 @@ main (int argc, char **argv) + USE_PLUGIN_LD, + USE_GOLD_LD, + USE_BFD_LD, ++ USE_LLD_LD, + USE_LD_MAX + } selected_linker = USE_DEFAULT_LD; + static const char *const ld_suffixes[USE_LD_MAX] = +@@ -838,7 +839,8 @@ main (int argc, char **argv) + "ld", + PLUGIN_LD_SUFFIX, + "ld.gold", +- "ld.bfd" ++ "ld.bfd", ++ "ld.lld" + }; + static const char *const real_ld_suffix = "real-ld"; + static const char *const collect_ld_suffix = "collect-ld"; +@@ -1007,6 +1009,8 @@ main (int argc, char **argv) + selected_linker = USE_BFD_LD; + else if (strcmp (argv[i], "-fuse-ld=gold") == 0) + selected_linker = USE_GOLD_LD; ++ else if (strcmp (argv[i], "-fuse-ld=lld") == 0) ++ selected_linker = USE_LLD_LD; + + #ifdef COLLECT_EXPORT_LIST + /* These flags are position independent, although their order +@@ -1096,7 +1100,8 @@ main (int argc, char **argv) + /* Maybe we know the right file to use (if not cross). */ + ld_file_name = 0; + #ifdef DEFAULT_LINKER +- if (selected_linker == USE_BFD_LD || selected_linker == USE_GOLD_LD) ++ if (selected_linker == USE_BFD_LD || selected_linker == USE_GOLD_LD || ++ selected_linker == USE_LLD_LD) + { + char *linker_name; + # ifdef HOST_EXECUTABLE_SUFFIX +@@ -1315,7 +1320,7 @@ main (int argc, char **argv) + else if (!use_collect_ld + && strncmp (arg, "-fuse-ld=", 9) == 0) + { +- /* Do not pass -fuse-ld={bfd|gold} to the linker. */ ++ /* Do not pass -fuse-ld={bfd|gold|lld} to the linker. */ + ld1--; + ld2--; + } +diff --git a/gcc/common.opt b/gcc/common.opt +index 5a5d33205a4..99489fbd553 100644 +--- gcc/common.opt ++++ gcc/common.opt +@@ -2732,6 +2732,10 @@ fuse-ld=gold + Common Driver Negative(fuse-ld=bfd) + Use the gold linker instead of the default linker. + ++fuse-ld=lld ++Common Driver Negative(fuse-ld=lld) ++Use the lld LLVM linker instead of the default linker. ++ + fuse-linker-plugin + Common Undocumented Var(flag_use_linker_plugin) + +diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi +index e0a770491b6..8762f3f7bc3 100644 +--- gcc/doc/invoke.texi ++++ gcc/doc/invoke.texi +@@ -12610,6 +12610,10 @@ Use the @command{bfd} linker instead of the default linker. + @opindex fuse-ld=gold + Use the @command{gold} linker instead of the default linker. + ++@item -fuse-ld=lld ++@opindex fuse-ld=lld ++Use the LLVM @command{lld} linker instead of the default linker. ++ + @cindex Libraries + @item -l@var{library} + @itemx -l @var{library} +diff --git a/gcc/opts.c b/gcc/opts.c +index 34c283dd765..f094f5f1251 100644 +--- gcc/opts.c ++++ gcc/opts.c +@@ -2557,6 +2557,7 @@ common_handle_option (struct gcc_options *opts, + + case OPT_fuse_ld_bfd: + case OPT_fuse_ld_gold: ++ case OPT_fuse_ld_lld: + case OPT_fuse_linker_plugin: + /* No-op. Used by the driver and passed to us because it starts with f.*/ + break;