]> sourceware.org Git - glibc.git/commit
Build divdi3 only for architecture that required it
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Wed, 15 Mar 2017 18:44:59 +0000 (15:44 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Thu, 6 Apr 2017 18:14:34 +0000 (15:14 -0300)
commitdb3d848e154b00071f4a5e729d5884efad410109
treeb3504ad2e7c75073cd4f80972bfdf480b6a433b8
parent12fb180108f461c3c6884a512f59c9a4c5dbfb88
Build divdi3 only for architecture that required it

As noted in [1], divdi3 object is only exported in a handful ABIs
(i386, m68k, powerpc32, s390-32, and ia64), however it is built
for all current architectures regardless.

This patch refact the make rules for this object to so only the
aforementioned architectures that actually require it builds it.

Also, to avoid internal PLT calls to the exported symbol from the
module, glibc uses an internal header (symbol-hacks.h) which is
unrequired (and in fact breaks the build for architectures that
intend to get symbol definitions from libgcc.a).  The patch also
changes it to create its own header (divdi3-symbol-hacks.h) and
adjust the architectures that require it accordingly.

I checked the build/check (with run-built-tests=no) on the
following architectures (which I think must cover all supported
ABI/builds) using GCC 6.3:

aarch64-linux-gnu
alpha-linux-gnu
arm-linux-gnueabihf
hppa-linux-gnu
ia64-linux-gnu
m68k-linux-gnu
microblaze-linux-gnu
mips64-n32-linux-gnu
mips-linux-gnu
mips64-linux-gnu
nios2-linux-gnu
powerpc-linux-gnu
powerpc-linux-gnu-power4
powerpc64-linux-gnu
powerpc64le-linux-gnu
s390x-linux-gnu
s390-linux-gnu
sh4-linux-gnu
sh4-linux-gnu-soft
sparc64-linux-gnu
sparcv9-linux-gnu
tilegx-linux-gnu
tilegx-linux-gnu-32
tilepro-linux-gnu
x86_64-linux-gnu
x86_64-linux-gnu-x32
i686-linux-gnu

I only saw one regression on sparcv9-linux-gnu (extra PLT call to
.udiv) which I address in next patch in the set.  It also correctly
build SH with GCC 7.0.1 (without any regression from c89721e25d).

[1] https://sourceware.org/ml/libc-alpha/2017-03/msg00243.html

* sysdeps/i386/symbol-hacks.h: New file.
* sysdeps/m68k/symbol-hacks.h: New file.
* sysdeps/powerpc/powerpc32/symbol-hacks.h: New file.
* sysdeps/s390/s390-32/symbol-hacks.h: New file.
* sysdeps/unix/sysv/linux/i386/Makefile
[$(subdir) = csu] (sysdep_routines): New rule: divdi3 object.
[$(subdir) = csu] (sysdep-only-routines): Likewise.
[$(subdir) = csu] (CFLAGS-divdi3.c): Likewise.
* sysdeps/unix/sysv/linux/m68k/Makefile
[$(subdir) = csu] (sysdep_routines): Likewise.
[$(subdir) = csu] (sysdep-only-routines): Likewise.
[$(subdir) = csu] (CFLAGS-divdi3.c): Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/Makefile
[$(subdir) = csu] (sysdep_routines): Likewise.
[$(subdir) = csu] (sysdep-only-routines): Likewise.
[$(subdir) = csu] (CFLAGS-divdi3.c): Likewise.
* sysdeps/unix/sysv/linux/s390/s390-32/Makefile
[$(subdir) = csu] (sysdep_routines): Likewise.
[$(subdir) = csu] (sysdep-only-routines): Likewise.
[$(subdir) = csu] (CFLAGS-divdi3.c): Likewise.
* sysdeps/wordsize-32/Makefile: Remove file.
* sysdeps/wordsize-32/symbol-hacks.h: Definitions move to ...
* sysdeps/wordsize-32/divdi3-symbol-hacks.h: ... here.
ChangeLog
sysdeps/i386/symbol-hacks.h [new file with mode: 0644]
sysdeps/m68k/symbol-hacks.h [new file with mode: 0644]
sysdeps/powerpc/powerpc32/symbol-hacks.h [new file with mode: 0644]
sysdeps/s390/s390-32/symbol-hacks.h [new file with mode: 0644]
sysdeps/unix/sysv/linux/i386/Makefile
sysdeps/unix/sysv/linux/m68k/Makefile
sysdeps/unix/sysv/linux/powerpc/powerpc32/Makefile
sysdeps/unix/sysv/linux/s390/s390-32/Makefile
sysdeps/wordsize-32/Makefile [deleted file]
sysdeps/wordsize-32/divdi3-symbol-hacks.h [moved from sysdeps/wordsize-32/symbol-hacks.h with 89% similarity]
This page took 0.050906 seconds and 5 git commands to generate.