aboutsummaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2021-01-18 11:28:17 +0100
committerJakub Jelinek <jakub@redhat.com>2021-01-18 11:29:26 +0100
commit2e43880dbd4cb9722ae99708c01c399f985dc7c3 (patch)
tree946af3257ca35779b5f1e5dbdb2b3a03ad69fa3b /config
parent0f951b3dd34b355579b4c9a9e287d32ac771bc67 (diff)
downloadgcc-2e43880dbd4cb9722ae99708c01c399f985dc7c3.zip
gcc-2e43880dbd4cb9722ae99708c01c399f985dc7c3.tar.gz
gcc-2e43880dbd4cb9722ae99708c01c399f985dc7c3.tar.bz2
libstd++: : Add workaround for as Error: file number less than one error [PR98708]
As mentioned in the PR, since the switch to DWARF5 by default instead of DWARF4, gcc fails to build when configured against recent binutils. The problem is that cxx11-ios_failure* is built in separate steps, -S compilation (with -g -O2) followed by some sed and followed by -c -g -O2 -g0 assembly. When gcc is configured against recent binutils and DWARF5 is the default, we emit .file 0 "..." directive on which the assembler then fails (unless --gdwarf-5 is passed to it, but we don't want that generally because on the other side older assemblers don't like -g* passed to it when invoked on *.s file with compiler generated debug info. I hope the bug will be fixed soon on the binutils side, but it would be nice to have a workaround. The following patch is one of the possibilities, another one is to do that but add configure check for whether it is needed, essentially echo 'int main () { return 0; }' > conftest.c ${CXX} ${CXXFLAGS} -g -O2 -S conftest.c -o conftest.s ${CXX} ${CXXFLAGS} -g -O2 -g0 -c conftest.s -o conftest.o and if the last command fails, we need that -gno-as-loc-support. Or yet another option would be I think do a different check, whether ${CXX} ${CXXFLAGS} -g -O2 -S conftest.c -o conftest.s ${CXX} ${CXXFLAGS} -g -O2 -c conftest.s -o conftest.o works and if yes, don't add the -g0 to cxx11-ios_failure*.s assembly. 2021-01-18 Jakub Jelinek <jakub@redhat.com> PR debug/98708 * src/c++11/Makefile.am (cxx11-ios_failure-lt.s, cxx11-ios_failure.s): Compile with -gno-as-loc-support. * src/c++11/Makefile.in: Regenerated.
Diffstat (limited to 'config')
0 files changed, 0 insertions, 0 deletions