glibc/sysdeps/i386
Adhemerval Zanella db3d848e15 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.
2017-04-06 15:14:34 -03:00
..
fpu Move tests of catan, catanh to auto-libm-test-*. 2017-02-17 18:42:37 +00:00
i586 Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
i686 Fix i686 memchr overflow calculation (BZ#21182) 2017-03-29 09:54:14 -03:00
i786
nptl Remove CALL_THREAD_FCT macro 2017-04-04 18:03:35 -03:00
sys Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
____longjmp_chk.S Add sigstack handling to Linux ____longjmp_chk on i386. 2009-07-30 21:50:14 -07:00
__longjmp.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
abort-instr.h
add_n.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
addmul_1.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
asm-syntax.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
atomic-machine.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
backtrace.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
bcopy.S Add i386 memset and memcpy assembly functions 2015-08-27 09:04:54 -07:00
bsd-_setjmp.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
bsd-setjmp.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
bzero.S Add i386 memset and memcpy assembly functions 2015-08-27 09:04:54 -07:00
cacheinfo.c Move sysdeps/x86_64/cacheinfo.c to sysdeps/x86 2016-05-08 08:49:18 -07:00
configure configure: fix test == usage 2016-04-09 20:05:13 -04:00
configure.ac configure: fix test == usage 2016-04-09 20:05:13 -04:00
crti.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
crtn.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
dl-irel.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
dl-lookupcfg.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
dl-machine.h Allow IFUNC relocation against unrelocated shared library 2017-02-02 13:14:59 -08:00
dl-procinfo.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
dl-procinfo.h Remove _dl_platform_string 2017-03-14 17:18:52 +01:00
dl-tls.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
dl-tlsdesc.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
dl-tlsdesc.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
dl-trampoline.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
ffs.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
gccframe.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
gmp-mparam.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
htonl.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
htons.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
i386-mcount.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
Implies Use x86-64 bits/byteswap.h for both i386 and x86_64 2012-05-30 14:13:18 -07:00
init-arch.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
jmpbuf-offsets.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
jmpbuf-unwind.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
ldbl2mpn.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
ldsodefs.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
link-defines.sym Preserve bound registers for pointer pass/return 2015-07-09 06:50:12 -07:00
lshift.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
machine-gmon.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
Makefile Compile the dynamic linker without stack protection [BZ #7065] 2016-12-26 10:08:48 +01:00
memchr.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
memcmp.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
memcopy.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
memcpy_chk.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
memcpy.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
memmove_chk.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
memmove.S Add i386 memset and memcpy assembly functions 2015-08-27 09:04:54 -07:00
mempcpy_chk.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
mempcpy.S Add i386 memset and memcpy assembly functions 2015-08-27 09:04:54 -07:00
memset_chk.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
memset.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
memusage.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
mp_clz_tab.c
mul_1.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
preconfigure Move base_machine and machine settings from configure.ac to sysdeps preconfigure fragments. 2014-06-25 17:52:56 +00:00
pthread_spin_trylock.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
rawmemchr.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
rshift.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
setfpucw.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
setjmp.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
stackguard-macros.h BZ #15754: CVE-2013-4788 2013-09-23 00:52:09 -04:00
stackinfo.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
start.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
stpcpy.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
stpncpy.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
strcat.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
strchr.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
strchrnul.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
strcspn.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
string-inlines.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
strlen.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
strlen.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
strpbrk.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
strrchr.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
strspn.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
sub_n.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
submul_1.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
symbol-hacks.h Build divdi3 only for architecture that required it 2017-04-06 15:14:34 -03:00
sysdep.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
tls-macros.h i386: Fix build by GCC 5.0 2014-12-30 11:37:41 -08:00
tlsdesc.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
tlsdesc.sym Introduce TLS descriptors for i386 and x86_64. 2008-05-13 05:41:30 +00:00
tst-audit3.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
tst-audit3.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
tst-audit.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
tst-auditmod3a.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
tst-auditmod3b.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
tst-ld-sse-use.sh Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
tst-stack-align.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
Versions Merge sysdeps/i386/elf/Versions into sysdeps/i386/Versions. 2012-03-19 21:02:40 +01:00