glibc/sysdeps
Adhemerval Zanella Netto f8f9a27257 i386: Fix build with --enable-fortify=3
The i386 string routines provide multiple internal definitions
for memcpy, memmove, and mempcpy chk routines:

  $ objdump -t libc.a | grep __memcpy_chk
  00000000 g     F .text  0000000e __memcpy_chk
  00000000 g     F .text  00000013 __memcpy_chk
  $ objdump -t libc.a | grep __mempcpy_chk
  00000000 g     F .text  0000000e __mempcpy_chk
  00000000 g     F .text  00000013 __mempcpy_chk
  $ objdump -t libc.a | grep __memmove_chk
  00000000 g     F .text  0000000e __memmove_chk
  00000000 g     F .text  00000013 __memmove_chk

Although is not an issue for normal static builds, with fortify=3
glibc itself might use the fortify chk functions and thus static
build might fail with multiple definitions.  For instance:

x86_64-glibc-linux-gnu-gcc -m32 -march=i686 -o [...]math/test-signgam-uchar-static -nostdlib -nostartfiles -static -static-pie [...]
x86_64-glibc-linux-gnu/bin/ld: [...]/libc.a(mempcpy-ia32.o):
in function `__mempcpy_chk': [...]/glibc-git/string/../sysdeps/i386/i686/mempcpy.S:32: multiple definition of `__mempcpy_chk';
[...]/libc.a(mempcpy_chk-nonshared.o):[...]/debug/../sysdeps/i386/mempcpy_chk.S:28: first defined here
collect2: error: ld returned 1 exit status
make[2]: *** [../Rules:298:

There is no need for mem*-nonshared.S, the __mem*_chk routines
are already provided by the assembly routines.

Checked on i686-linux-gnu with gcc 13 built with fortify=1,2,3 and
without fortify.
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
2023-07-26 09:45:55 -03:00
..
aarch64 configure: Use autoconf 2.71 2023-07-17 10:08:10 -04:00
alpha configure: Use autoconf 2.71 2023-07-17 10:08:10 -04:00
arc configure: Use autoconf 2.71 2023-07-17 10:08:10 -04:00
arm configure: Use autoconf 2.71 2023-07-17 10:08:10 -04:00
csky configure: Use autoconf 2.71 2023-07-17 10:08:10 -04:00
generic sparc: Fix la_symbind for bind-now (BZ 23734) 2023-07-12 15:29:08 -03:00
gnu configure: Use autoconf 2.71 2023-07-17 10:08:10 -04:00
hppa configure: Use autoconf 2.71 2023-07-17 10:08:10 -04:00
htl Fix misspellings in sysdeps/ -- BZ 25337 2023-05-30 23:02:29 +00:00
hurd hurd: Fix using interposable hurd_thread_self 2023-05-19 20:45:51 +02:00
i386 i386: Fix build with --enable-fortify=3 2023-07-26 09:45:55 -03:00
ia64 configure: Use autoconf 2.71 2023-07-17 10:08:10 -04:00
ieee754 configure: Use autoconf 2.71 2023-07-17 10:08:10 -04:00
loongarch configure: Use autoconf 2.71 2023-07-17 10:08:10 -04:00
m68k configure: Use autoconf 2.71 2023-07-17 10:08:10 -04:00
mach configure: Use autoconf 2.71 2023-07-17 10:08:10 -04:00
microblaze configure: Use autoconf 2.71 2023-07-17 10:08:10 -04:00
mips MIPS: Update mips32 and mip64 libm test ulps 2023-07-25 22:20:57 +02:00
nios2 configure: Use autoconf 2.71 2023-07-17 10:08:10 -04:00
nptl Fix misspellings in sysdeps/ -- BZ 25337 2023-05-30 23:02:29 +00:00
or1k configure: Use autoconf 2.71 2023-07-17 10:08:10 -04:00
posix hurd: readv: Get rid of alloca 2023-06-20 19:15:10 +02:00
powerpc powerpc: Fix powerpc64 strchrnul build with old gcc 2023-07-26 09:45:22 -03:00
pthread Exclude routines from fortification 2023-07-05 16:59:48 +02:00
riscv riscv: Update rvd libm test ulps 2023-07-22 15:55:33 +02:00
s390 configure: Use autoconf 2.71 2023-07-17 10:08:10 -04:00
sh configure: Use autoconf 2.71 2023-07-17 10:08:10 -04:00
sparc configure: Use autoconf 2.71 2023-07-17 10:08:10 -04:00
unix Include sys/rseq.h in tst-rseq-disable.c 2023-07-25 12:27:30 +02:00
wordsize-32 Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
wordsize-64 hurd: Fix tst-writev test 2023-05-01 13:01:30 +02:00
x86 [PATCH v1] x86: Use 3/4*sizeof(per-thread-L3) as low bound for NT threshold. 2023-07-18 22:34:34 -05:00
x86_64 Update x86_64 libm-test-ulps (x32 ABI) 2023-07-19 16:56:54 +02:00