ld: Compile 2 CTF tests with -O2

When GCC 12 is used to build binutils with -O0, the following 2 tests
failed:

FAIL: Conflicted data syms, partially indexed, stripped, with variables
FAIL: Conflicted data syms, partially indexed, stripped

Compile 2 tests with -O2 to avoid test failures.

	PR ld/29378
	* testsuite/ld-ctf/data-func-conflicted-vars.d: Compile with -O2.
	* testsuite/ld-ctf/data-func-conflicted.d: Likewise.
This commit is contained in:
H.J. Lu 2022-07-22 11:35:00 -07:00
parent b669667d07
commit e4146092c3
2 changed files with 2 additions and 0 deletions

View file

@ -1,4 +1,5 @@
#as:
#cc: -O2
#source: data-func-1.c
#source: data-func-2.c
#objdump: --ctf

View file

@ -1,4 +1,5 @@
#as:
#cc: -O2
#source: data-func-1.c
#source: data-func-2.c
#objdump: --ctf