Remove tests that test __gnu_lto_v1 symbol.

Message ID 11c376df-c074-ef11-b84f-41de557e78e4@suse.cz
State New
Headers show
Series
  • Remove tests that test __gnu_lto_v1 symbol.
Related show

Commit Message

Martin Liška July 22, 2019, 1:02 p.m.
Hi.

As of r273662, the GCC compiler stopped emitting __gnu_lto_v1 symbol
for LTO objects.

Thus I'm suggesting to remove the tests for it.

Ready for trunk?
Thanks,
Martin

ld/ChangeLog:

2019-07-22  Martin Liska  <mliska@suse.cz>

	* testsuite/ld-plugin/lto-3r.d: Remove.
	* testsuite/ld-plugin/lto-5r.d: Remove.
	* testsuite/ld-plugin/lto.exp: Do not run lto-3r and lto-5r
	tests.
---
 ld/testsuite/ld-plugin/lto-3r.d | 7 -------
 ld/testsuite/ld-plugin/lto-5r.d | 7 -------
 ld/testsuite/ld-plugin/lto.exp  | 6 ------
 3 files changed, 20 deletions(-)
 delete mode 100644 ld/testsuite/ld-plugin/lto-3r.d
 delete mode 100644 ld/testsuite/ld-plugin/lto-5r.d

Comments

Jeff Law July 22, 2019, 3:12 p.m. | #1
On 7/22/19 7:02 AM, Martin Liška wrote:
> Hi.

> 

> As of r273662, the GCC compiler stopped emitting __gnu_lto_v1 symbol

> for LTO objects.

> 

> Thus I'm suggesting to remove the tests for it.

> 

> Ready for trunk?

> Thanks,

> Martin

> 

> ld/ChangeLog:

> 

> 2019-07-22  Martin Liska  <mliska@suse.cz>

> 

> 	* testsuite/ld-plugin/lto-3r.d: Remove.

> 	* testsuite/ld-plugin/lto-5r.d: Remove.

> 	* testsuite/ld-plugin/lto.exp: Do not run lto-3r and lto-5r

> 	tests.

> ---

>  ld/testsuite/ld-plugin/lto-3r.d | 7 -------

>  ld/testsuite/ld-plugin/lto-5r.d | 7 -------

>  ld/testsuite/ld-plugin/lto.exp  | 6 ------

>  3 files changed, 20 deletions(-)

>  delete mode 100644 ld/testsuite/ld-plugin/lto-3r.d

>  delete mode 100644 ld/testsuite/ld-plugin/lto-5r.d

> 

> 

OK
jeff
H.J. Lu July 23, 2019, 3:43 p.m. | #2
On Mon, Jul 22, 2019 at 6:02 AM Martin Liška <mliska@suse.cz> wrote:
>

> Hi.

>

> As of r273662, the GCC compiler stopped emitting __gnu_lto_v1 symbol

> for LTO objects.

>

> Thus I'm suggesting to remove the tests for it.

>

> Ready for trunk?

> Thanks,

> Martin

>

> ld/ChangeLog:

>

> 2019-07-22  Martin Liska  <mliska@suse.cz>

>

>         * testsuite/ld-plugin/lto-3r.d: Remove.

>         * testsuite/ld-plugin/lto-5r.d: Remove.

>         * testsuite/ld-plugin/lto.exp: Do not run lto-3r and lto-5r

>         tests.

> ---

>  ld/testsuite/ld-plugin/lto-3r.d | 7 -------

>  ld/testsuite/ld-plugin/lto-5r.d | 7 -------

>  ld/testsuite/ld-plugin/lto.exp  | 6 ------

>  3 files changed, 20 deletions(-)

>  delete mode 100644 ld/testsuite/ld-plugin/lto-3r.d

>  delete mode 100644 ld/testsuite/ld-plugin/lto-5r.d

>

>


This caused:

FAIL: LTO 5 symbol
FAIL: LTO 3b
FAIL: LTO 5

cc: error: tmpdir/lto-5.o: No such file or directory
cc: error: tmpdir/lto-5.o: No such file or directory
Unexpected linker warning or error
FAIL: LTO 5 symbol

-- 
H.J.
H.J. Lu July 23, 2019, 3:59 p.m. | #3
On Tue, Jul 23, 2019 at 8:43 AM H.J. Lu <hjl.tools@gmail.com> wrote:
>

> On Mon, Jul 22, 2019 at 6:02 AM Martin Liška <mliska@suse.cz> wrote:

> >

> > Hi.

> >

> > As of r273662, the GCC compiler stopped emitting __gnu_lto_v1 symbol

> > for LTO objects.

> >

> > Thus I'm suggesting to remove the tests for it.

> >

> > Ready for trunk?

> > Thanks,

> > Martin

> >

> > ld/ChangeLog:

> >

> > 2019-07-22  Martin Liska  <mliska@suse.cz>

> >

> >         * testsuite/ld-plugin/lto-3r.d: Remove.

> >         * testsuite/ld-plugin/lto-5r.d: Remove.

> >         * testsuite/ld-plugin/lto.exp: Do not run lto-3r and lto-5r

> >         tests.

> > ---

> >  ld/testsuite/ld-plugin/lto-3r.d | 7 -------

> >  ld/testsuite/ld-plugin/lto-5r.d | 7 -------

> >  ld/testsuite/ld-plugin/lto.exp  | 6 ------

> >  3 files changed, 20 deletions(-)

> >  delete mode 100644 ld/testsuite/ld-plugin/lto-3r.d

> >  delete mode 100644 ld/testsuite/ld-plugin/lto-5r.d

> >

> >

>

> This caused:

>

> FAIL: LTO 5 symbol

> FAIL: LTO 3b

> FAIL: LTO 5

>

> cc: error: tmpdir/lto-5.o: No such file or directory

> cc: error: tmpdir/lto-5.o: No such file or directory

> Unexpected linker warning or error

> FAIL: LTO 5 symbol

>


This patch fixes it.  OK for master?


-- 
H.J.
From b4287b2cf172813ac83d80501c5a0e1fab6c5076 Mon Sep 17 00:00:00 2001
From: "H.J. Lu" <hjl.tools@gmail.com>
Date: Tue, 23 Jul 2019 08:51:31 -0700
Subject: [PATCH] Revert "Remove tests that test __gnu_lto_v1 symbol."

Revert

commit 8c728a9d93e2342c57039fcdd6e4a502875b9e09
Author: Martin Liska <mliska@suse.cz>
Date:   Mon Jul 22 14:23:32 2019 +0200

    Remove tests that test __gnu_lto_v1 symbol.

since outputs of these tests are used by later tests.  Check the normal
symbol, foo, instead of __gnu_lto_v.*, which GCC stopped emitting after
r273662.

	* testsuite/ld-plugin/lto-3r.d: Restored.  Check foo instead
	of __gnu_lto_v.*.
	* testsuite/ld-plugin/lto-5r.d: Likewise.
	* testsuite/ld-plugin/lto.exp: Run lto-3r and lto-5r tests.
---
 ld/testsuite/ld-plugin/lto-3r.d | 7 +++++++
 ld/testsuite/ld-plugin/lto-5r.d | 7 +++++++
 ld/testsuite/ld-plugin/lto.exp  | 6 ++++++
 3 files changed, 20 insertions(+)
 create mode 100644 ld/testsuite/ld-plugin/lto-3r.d
 create mode 100644 ld/testsuite/ld-plugin/lto-5r.d

diff --git a/ld/testsuite/ld-plugin/lto-3r.d b/ld/testsuite/ld-plugin/lto-3r.d
new file mode 100644
index 0000000000..8ce4482d15
--- /dev/null
+++ b/ld/testsuite/ld-plugin/lto-3r.d
@@ -0,0 +1,7 @@
+#ld: -r tmpdir/lto-3b.o
+#source: dummy.s
+#nm: -p
+
+#...
+[0-9a-f]+ T _?foo
+#pass
diff --git a/ld/testsuite/ld-plugin/lto-5r.d b/ld/testsuite/ld-plugin/lto-5r.d
new file mode 100644
index 0000000000..57d41781c2
--- /dev/null
+++ b/ld/testsuite/ld-plugin/lto-5r.d
@@ -0,0 +1,7 @@
+#ld: -r tmpdir/lto-5a.o tmpdir/lto-5b.o
+#source: dummy.s
+#nm: -p
+
+#...
+[0-9a-f]+ T _?foo
+#pass
diff --git a/ld/testsuite/ld-plugin/lto.exp b/ld/testsuite/ld-plugin/lto.exp
index b80de4902c..e913c6f203 100644
--- a/ld/testsuite/ld-plugin/lto.exp
+++ b/ld/testsuite/ld-plugin/lto.exp
@@ -630,6 +630,12 @@ if { [at_least_gcc_version 4 7] } {
     }
 }
 
+# Run "ld -r" to generate inputs for complex LTO tests.
+run_dump_test "lto-3r"
+remote_exec host "mv" "tmpdir/dump tmpdir/lto-3.o"
+run_dump_test "lto-5r"
+remote_exec host "mv" "tmpdir/dump tmpdir/lto-5.o"
+
 run_cc_link_tests $lto_link_symbol_tests
 
 run_ld_link_tests [list \
Martin Liška July 24, 2019, 6:54 a.m. | #4
On 7/23/19 5:59 PM, H.J. Lu wrote:
> On Tue, Jul 23, 2019 at 8:43 AM H.J. Lu <hjl.tools@gmail.com> wrote:

>>

>> On Mon, Jul 22, 2019 at 6:02 AM Martin Liška <mliska@suse.cz> wrote:

>>>

>>> Hi.

>>>

>>> As of r273662, the GCC compiler stopped emitting __gnu_lto_v1 symbol

>>> for LTO objects.

>>>

>>> Thus I'm suggesting to remove the tests for it.

>>>

>>> Ready for trunk?

>>> Thanks,

>>> Martin

>>>

>>> ld/ChangeLog:

>>>

>>> 2019-07-22  Martin Liska  <mliska@suse.cz>

>>>

>>>         * testsuite/ld-plugin/lto-3r.d: Remove.

>>>         * testsuite/ld-plugin/lto-5r.d: Remove.

>>>         * testsuite/ld-plugin/lto.exp: Do not run lto-3r and lto-5r

>>>         tests.

>>> ---

>>>  ld/testsuite/ld-plugin/lto-3r.d | 7 -------

>>>  ld/testsuite/ld-plugin/lto-5r.d | 7 -------

>>>  ld/testsuite/ld-plugin/lto.exp  | 6 ------

>>>  3 files changed, 20 deletions(-)

>>>  delete mode 100644 ld/testsuite/ld-plugin/lto-3r.d

>>>  delete mode 100644 ld/testsuite/ld-plugin/lto-5r.d

>>>

>>>

>>

>> This caused:

>>

>> FAIL: LTO 5 symbol

>> FAIL: LTO 3b

>> FAIL: LTO 5

>>

>> cc: error: tmpdir/lto-5.o: No such file or directory

>> cc: error: tmpdir/lto-5.o: No such file or directory

>> Unexpected linker warning or error

>> FAIL: LTO 5 symbol

>>

> 

> This patch fixes it.  OK for master?

> 

> 


Thank you for the patch, it looks fine to me.

Martin
Nick Clifton July 24, 2019, 7:14 a.m. | #5
Hi H.J.
 
>>> This caused:

>>>

>>> FAIL: LTO 5 symbol

>>> FAIL: LTO 3b

>>> FAIL: LTO 5

 
>> This patch fixes it.  OK for master?

 
Patch approved - please apply.

Cheers
  Nick

Patch

diff --git a/ld/testsuite/ld-plugin/lto-3r.d b/ld/testsuite/ld-plugin/lto-3r.d
deleted file mode 100644
index 3726718f2a..0000000000
--- a/ld/testsuite/ld-plugin/lto-3r.d
+++ /dev/null
@@ -1,7 +0,0 @@ 
-#ld: -r tmpdir/lto-3b.o
-#source: dummy.s
-#nm: -p
-
-#...
-[0-9a-f]+ C _?__gnu_lto_v.*
-#pass
diff --git a/ld/testsuite/ld-plugin/lto-5r.d b/ld/testsuite/ld-plugin/lto-5r.d
deleted file mode 100644
index ad1da7047b..0000000000
--- a/ld/testsuite/ld-plugin/lto-5r.d
+++ /dev/null
@@ -1,7 +0,0 @@ 
-#ld: -r tmpdir/lto-5a.o tmpdir/lto-5b.o
-#source: dummy.s
-#nm: -p
-
-#...
-[0-9a-f]+ C _?__gnu_lto_v.*
-#pass
diff --git a/ld/testsuite/ld-plugin/lto.exp b/ld/testsuite/ld-plugin/lto.exp
index e913c6f203..b80de4902c 100644
--- a/ld/testsuite/ld-plugin/lto.exp
+++ b/ld/testsuite/ld-plugin/lto.exp
@@ -630,12 +630,6 @@  if { [at_least_gcc_version 4 7] } {
     }
 }
 
-# Run "ld -r" to generate inputs for complex LTO tests.
-run_dump_test "lto-3r"
-remote_exec host "mv" "tmpdir/dump tmpdir/lto-3.o"
-run_dump_test "lto-5r"
-remote_exec host "mv" "tmpdir/dump tmpdir/lto-5.o"
-
 run_cc_link_tests $lto_link_symbol_tests
 
 run_ld_link_tests [list \