summaryrefslogtreecommitdiff
blob: be9f677e1b8f33aeee40f6965228431552a55d9e (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
From 6e0ff9dfef58d03eacc05ef381ef1d5fc7ad072d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20K=2E=20H=C3=BCttel?= <dilfridge@gentoo.org>
Date: Sun, 10 May 2020 20:59:05 +0300
Subject: [PATCH 16/16] Gentoo: Fix regexp of hilarious ld detection heuristic

The new linker used to be called as "ld/ld-new" but is now called as "./ld-new"
Test for just "ld-new" and hope that the compiler binary never looks like this.
---
 ld/testsuite/lib/ld-lib.exp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/ld/testsuite/lib/ld-lib.exp b/ld/testsuite/lib/ld-lib.exp
index ae72f21d72..0b945b539d 100644
--- a/ld/testsuite/lib/ld-lib.exp
+++ b/ld/testsuite/lib/ld-lib.exp
@@ -200,9 +200,9 @@ proc default_ld_link { ld target objects } {
     # with $ld as parameter. If we want to change the default behaviour, we
     # need to take the different option formats into account.
     # We check the $ld parameter for
-    # - .*ld/ld-new    -> we're working with the new linker
+    # - ld-new         -> we're working with the new linker
     # - otherwise      -> we're likely working with the system compiler
-    if {[regexp {ld/ld-new$} $ld]} {
+    if {[regexp {ld-new$} $ld]} {
       set gentoosysv "--hash-style=sysv --no-warn-shared-textrel"
     } else {
       set gentoosysv "-Wl,--hash-style=sysv -Wl,--no-warn-shared-textrel"
-- 
2.26.2