diff options
author | Thiago Jung Bauermann <thiago.bauermann@linaro.org> | 2024-12-27 18:47:56 -0300 |
---|---|---|
committer | Thiago Jung Bauermann <thiago.bauermann@linaro.org> | 2025-01-08 18:40:38 -0300 |
commit | 36eee5a74eb6d4c48a3a22cd71b3944bac499d0a (patch) | |
tree | d30a4d701fb013ec87d6f3bdc73d62d650d26028 /gcc/gimplify.cc | |
parent | c42261d89538c416464c2191e4c72ec002a43cd0 (diff) | |
download | gcc-36eee5a74eb6d4c48a3a22cd71b3944bac499d0a.zip gcc-36eee5a74eb6d4c48a3a22cd71b3944bac499d0a.tar.gz gcc-36eee5a74eb6d4c48a3a22cd71b3944bac499d0a.tar.bz2 |
gcc/configure: Fix check for assembler section merging support on Arm
In 32-bit Arm assembly, the @ character is the start of a comment so
the section type needs to use the % character instead.
configure.ac attempts to account for this difference by doing a second
try when checking the assembler for section merging support.
Unfortunately there is a bug: because the gcc_GAS_CHECK_FEATURE macro
has a call to AC_CACHE_CHECK, it will actually skip the second try
because the gcc_cv_as_shf_merge variable has already been set:
checking assembler for section merging support... no
checking assembler for section merging support... (cached) no
Fix by using a separate variable for the second try, as is done in the
check for COMDAT group support.
This problem was noticed because the recent binutils commit
d5cbf916be4a ("gas/ELF: also reject merge entity size being zero") caused
gas to be stricter about mergeable sections without an entity size:
configure:27013: checking assembler for section merging support
configure:27022: /path/to/as --fatal-warnings -o conftest.o conftest.s >&5
conftest.s: Assembler messages:
conftest.s:1: Warning: invalid merge / string entity size
conftest.s: Error: 1 warning, treating warnings as errors
configure:27025: $? = 1
configure: failed program was
.section .rodata.str, "aMS", @progbits, 1
configure:27036: result: no
In previous versions of gas the conftest.s program above was accepted
and configure detected support for section merging.
See also:
https://linaro.atlassian.net/browse/GNU-1427
https://sourceware.org/bugzilla/show_bug.cgi?id=32491
Tested on armv8l-linux-gnueabihf.
gcc/ChangeLog:
* configure.ac: Fix check for HAVE_GAS_SHF_MERGE on Arm targets.
* configure: Regenerate.
Diffstat (limited to 'gcc/gimplify.cc')
0 files changed, 0 insertions, 0 deletions