ld: Compile 2 CTF tests with -O2
authorH.J. Lu <hjl.tools@gmail.com>
Fri, 22 Jul 2022 18:35:00 +0000 (11:35 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Mon, 25 Jul 2022 16:59:47 +0000 (09:59 -0700)
commite4146092c3f147b8c395febc771edd7de23f724d
tree3e239f6abac8d6144b1844eb982c803799598657
parentb669667d0749ccf8d70792bb086f41904157e54d
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.
ld/testsuite/ld-ctf/data-func-conflicted-vars.d
ld/testsuite/ld-ctf/data-func-conflicted.d