summaryrefslogtreecommitdiff
blob: f6c0a3dc89f1c4880c15025b4c4c5e976c608422 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
https://lists.gnu.org/archive/html/libtool-patches/2015-03/msg00000.html
https://lists.gnu.org/archive/html/libtool-patches/2016-02/msg00001.html

From 2f258b87ce4415edede1b2a84a3a7dbcf44555c2 Mon Sep 17 00:00:00 2001
From: Mike Frysinger <vapier@gentoo.org>
Date: Mon, 16 Mar 2015 18:17:31 -0400
Subject: [PATCH] libtool: pass through -fuse-ld flags

Starting with gcc-4.8, there's a -fuse-ld flag that can be used to select
between bfd & gold.  Make sure we pass it through to the linking stage.

* build-aux/ltmain.in (func_mode_link): Pass -fuse-ld=* flags through.

--- a/build-aux/ltmain.in
+++ b/build-aux/ltmain.in
@@ -5363,10 +5363,11 @@
       # -specs=*             GCC specs files
       # -stdlib=*            select c++ std lib with clang
       # -fsanitize=*         Clang/GCC memory and address sanitizer
+      # -fuse-ld=*           Linker select flags for GCC
       -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
       -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
       -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \
-      -specs=*|-fsanitize=*)
+      -specs=*|-fsanitize=*|-fuse-ld=*)
         func_quote_for_eval "$arg"
 	arg=$func_quote_for_eval_result
         func_append compile_command " $arg"
--- a/build-aux/ltmain.sh
+++ b/build-aux/ltmain.sh
@@ -7275,10 +7275,11 @@
       # -specs=*             GCC specs files
       # -stdlib=*            select c++ std lib with clang
       # -fsanitize=*         Clang/GCC memory and address sanitizer
+      # -fuse-ld=*           Linker select flags for GCC
       -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
       -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
       -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \
-      -specs=*|-fsanitize=*)
+      -specs=*|-fsanitize=*|-fuse-ld=*)
         func_quote_for_eval "$arg"
 	arg=$func_quote_for_eval_result
         func_append compile_command " $arg"