]> git.ipfire.org Git - thirdparty/glibc.git/commit - Makeconfig
stdio: Remove the usage of $(fno-unit-at-a-time) for errlist.c
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Wed, 6 Apr 2022 15:09:42 +0000 (12:09 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Fri, 13 May 2022 13:54:41 +0000 (10:54 -0300)
commit900fa2573671d692ed245f76aa3f05cec462be0c
tree221e0866faaa1e5305384a43f8de84f869c84caa
parent111254f3e1e1a7ae5c2eda7cebc98f93a61d417c
stdio: Remove the usage of $(fno-unit-at-a-time) for errlist.c

The errlist.c is built with -fno-toplevel-reorder to avoid compiler to
reorder the compat assembly directives due an assembler issue [1]
(fixed on 2.39).

This patch removes the compiler flags by split the compat symbol
generation in two phases.  First the _sys_errlist_internal internal
without any compat symbol directive is preprocessed to generate an
assembly source code.  This generate assembly is then used as input
on a platform agnostic errlist-data.S which then creates the compat
definitions.  This prevents compiler to move any compat directive
prior the _sys_errlist_internal definition itself.

Checked on a make check run-built-tests=no on all affected ABIs.

[1] https://sourceware.org/bugzilla/show_bug.cgi?id=29012
16 files changed:
Makeconfig
include/stdio.h
stdio-common/Makefile
stdio-common/err_map.h [new file with mode: 0644]
stdio-common/errlist-compat-data.h [new file with mode: 0644]
stdio-common/errlist-compat.c [deleted file]
stdio-common/errlist-data-gen.c [new file with mode: 0644]
stdio-common/errlist-data.S [new file with mode: 0644]
stdio-common/errlist.c
sysdeps/mach/hurd/err_map.h [moved from sysdeps/mach/hurd/errlist.c with 83% similarity]
sysdeps/unix/sysv/linux/alpha/errlist-compat-data.h [moved from sysdeps/unix/sysv/linux/alpha/errlist-compat.c with 100% similarity]
sysdeps/unix/sysv/linux/errlist-compat-data.h [moved from sysdeps/unix/sysv/linux/errlist-compat.c with 100% similarity]
sysdeps/unix/sysv/linux/errlist-compat.h
sysdeps/unix/sysv/linux/hppa/errlist-compat-data.h [moved from sysdeps/unix/sysv/linux/hppa/errlist-compat.c with 100% similarity]
sysdeps/unix/sysv/linux/mips/errlist-compat-data.h [moved from sysdeps/unix/sysv/linux/mips/errlist-compat.c with 100% similarity]
sysdeps/unix/sysv/linux/sparc/errlist-compat-data.h [moved from sysdeps/unix/sysv/linux/sparc/errlist-compat.c with 100% similarity]