diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2012-05-26 10:46:59 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2012-05-30 08:33:26 -0700 |
commit | 0ab0291b84b45f2389a019af2c88bf5169d14f64 (patch) | |
tree | b1935225e76f2470640244918e3e1ae89ae88fb2 /sysdeps | |
parent | 3a85279c0b02c3fcbe47f08743cace8550bf618e (diff) | |
download | glibc-0ab0291b84b45f2389a019af2c88bf5169d14f64.zip glibc-0ab0291b84b45f2389a019af2c88bf5169d14f64.tar.gz glibc-0ab0291b84b45f2389a019af2c88bf5169d14f64.tar.bz2 |
Convert WORDSIZE[32|64]/ld entries to abi-variants
Diffstat (limited to 'sysdeps')
-rw-r--r-- | sysdeps/unix/sysv/linux/Makefile | 53 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/i386/Implies | 1 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/i386/Makefile | 3 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/powerpc/Makefile | 11 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/s390/Makefile | 11 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/sparc/Makefile | 10 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/x86/Makefile | 14 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/x86_64/64/Makefile | 2 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/x86_64/Implies | 1 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/x86_64/Makefile | 6 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/x86_64/x32/Makefile | 3 | ||||
-rw-r--r-- | sysdeps/x86_64/64/shlib-versions | 1 | ||||
-rw-r--r-- | sysdeps/x86_64/x32/shlib-versions | 1 |
13 files changed, 67 insertions, 50 deletions
diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile index 70fd137..21b5607 100644 --- a/sysdeps/unix/sysv/linux/Makefile +++ b/sysdeps/unix/sysv/linux/Makefile @@ -43,25 +43,14 @@ tests += tst-clone # Generate the list of SYS_* macros for the system calls (__NR_* macros). # If there is more than one syscall list for different architecture -# variants, the CPU/Makefile defines syscall-list-variants to be a -# list of names for those variants (e.g. 32bit 64bit), and, for each -# variant, defines syscall-list-$(variant)-options to be compiler -# options to cause <asm/unistd.h> to define the desired list of -# syscalls and syscall-list-$(variant)-condition to be the condition -# for those options to use in a C #if condition. -# syscall-list-includes may be defined to a list of headers to include +# variants, the CPU/Makefile defines abi-variants to be a list of names +# for those variants (e.g. 32 64), and, for each variant, defines +# abi-$(variant)-options to be compiler options to cause <asm/unistd.h> +# to define the desired list of syscalls and abi-$(variant)-condition to +# be the condition for those options to use in a C #if condition. +# abi-includes may be defined to a list of headers to include # in the generated header, if the default does not suffice. -ifndef syscall-list-variants -syscall-list-variants := default -syscall-list-default-options := -syscall-list-default-condition := -endif - -ifndef syscall-list-includes -syscall-list-includes := bits/wordsize.h -endif - $(objpfx)bits/syscall%h $(objpfx)bits/syscall%d: ../sysdeps/unix/sysv/linux/sys/syscall.h $(make-target-directory) { \ @@ -71,31 +60,41 @@ $(objpfx)bits/syscall%h $(objpfx)bits/syscall%d: ../sysdeps/unix/sysv/linux/sys/ echo '# error "Never use <bits/syscall.h> directly; include <sys/syscall.h> instead."'; \ echo '#endif'; \ echo ''; \ - $(foreach h,$(syscall-list-includes), echo '#include <$(h)>';) \ + $(foreach h,$(abi-includes), echo '#include <$(h)>';) \ echo ''; \ - $(foreach v,$(syscall-list-variants),\ + $(if $(abi-variants), \ + $(foreach v,$(abi-variants),\ $(CC) -E -MD -MP -MF $(@:.h=.d)-t$(v) -MT '$(@:.d=.h) $(@:.h=.d)' \ - -x c $(sysincludes) $< $(syscall-list-$(v)-options) \ + -x c $(sysincludes) $< $(abi-$(v)-options) \ -D_LIBC -dM | \ sed -n 's@^#define __NR_\([^ ]*\) .*$$@#define SYS_\1 __NR_\1@p' | \ LC_ALL=C sort > $(@:.d=.h).new$(v); \ - $(if $(syscall-list-$(v)-condition),\ - echo '#if $(syscall-list-$(v)-condition)';) \ + $(if $(abi-$(v)-condition),\ + echo '#if $(abi-$(v)-condition)';) \ cat $(@:.d=.h).new$(v); \ - $(if $(syscall-list-$(v)-condition),echo '#endif';) \ + $(if $(abi-$(v)-condition),echo '#endif';) \ rm -f $(@:.d=.h).new$(v); \ - ) \ + ), \ + $(CC) -E -MD -MP -MF $(@:.h=.d)-t$(v) -MT '$(@:.d=.h) $(@:.h=.d)' \ + -x c $(sysincludes) $< \ + -D_LIBC -dM | \ + sed -n 's@^#define __NR_\([^ ]*\) .*$$@#define SYS_\1 __NR_\1@p' | \ + LC_ALL=C sort;) \ } > $(@:.d=.h).new mv -f $(@:.d=.h).new $(@:.d=.h) +ifdef abi-variants ifneq (,$(objpfx)) sed $(sed-remove-objpfx) \ - $(foreach v,$(syscall-list-variants),$(@:.h=.d)-t$(v)) > $(@:.h=.d)-t3 + $(foreach v,$(abi-variants),$(@:.h=.d)-t$(v)) > $(@:.h=.d)-t3 else - cat $(foreach v,$(syscall-list-variants),$(@:.h=.d)-t$(v)) \ + cat $(foreach v,$(abi-variants),$(@:.h=.d)-t$(v)) \ > $(@:.h=.d)-t3 endif - rm -f $(foreach v,$(syscall-list-variants),$(@:.h=.d)-t$(v)) + rm -f $(foreach v,$(abi-variants),$(@:.h=.d)-t$(v)) mv -f $(@:.h=.d)-t3 $(@:.h=.d) +else + mv -f $(@:.h=.d)-t $(@:.h=.d) +endif ifndef no_deps # Get the generated list of dependencies (probably /usr/include/asm/unistd.h). diff --git a/sysdeps/unix/sysv/linux/i386/Implies b/sysdeps/unix/sysv/linux/i386/Implies new file mode 100644 index 0000000..ccc7eaa --- /dev/null +++ b/sysdeps/unix/sysv/linux/i386/Implies @@ -0,0 +1 @@ +unix/sysv/linux/x86 diff --git a/sysdeps/unix/sysv/linux/i386/Makefile b/sysdeps/unix/sysv/linux/i386/Makefile index fc5a524..f4585d7 100644 --- a/sysdeps/unix/sysv/linux/i386/Makefile +++ b/sysdeps/unix/sysv/linux/i386/Makefile @@ -1,3 +1,6 @@ +# The default ABI is 32. +default-abi := 32 + ifeq ($(subdir),misc) sysdep_routines += ioperm iopl vm86 call_pselect6 call_fallocate sysdep_headers += sys/elf.h sys/perm.h sys/reg.h sys/vm86.h sys/debugreg.h sys/io.h diff --git a/sysdeps/unix/sysv/linux/powerpc/Makefile b/sysdeps/unix/sysv/linux/powerpc/Makefile index 55311a4..f6dccd9 100644 --- a/sysdeps/unix/sysv/linux/powerpc/Makefile +++ b/sysdeps/unix/sysv/linux/powerpc/Makefile @@ -1,8 +1,9 @@ -syscall-list-variants := 32bit 64bit -syscall-list-32bit-options := -U__powerpc64__ -syscall-list-32bit-condition := __WORDSIZE == 32 -syscall-list-64bit-options := -D__powerpc64__ -syscall-list-64bit-condition := __WORDSIZE == 64 +abi-variants := 32 64 +abi-32-options := -U__powerpc64__ +abi-32-condition := __WORDSIZE == 32 +abi-64-options := -D__powerpc64__ +abi-64-condition := __WORDSIZE == 64 +abi-64-ld-soname := ld64.so.1 ifeq ($(subdir),rt) librt-routines += rt-sysdep diff --git a/sysdeps/unix/sysv/linux/s390/Makefile b/sysdeps/unix/sysv/linux/s390/Makefile index fb20fb0..45b1922 100644 --- a/sysdeps/unix/sysv/linux/s390/Makefile +++ b/sysdeps/unix/sysv/linux/s390/Makefile @@ -1,8 +1,9 @@ -syscall-list-variants := 32bit 64bit -syscall-list-32bit-options := -U__s390x__ -syscall-list-32bit-condition := __WORDSIZE == 32 -syscall-list-64bit-options := -D__s390x__ -syscall-list-64bit-condition := __WORDSIZE == 64 +abi-variants := 32 64 +abi-32-options := -U__s390x__ +abi-32-condition := __WORDSIZE == 32 +abi-64-options := -D__s390x__ +abi-64-condition := __WORDSIZE == 64 +abi-64-ld-soname := ld64.so.1 ifeq ($(subdir),rt) librt-routines += rt-sysdep diff --git a/sysdeps/unix/sysv/linux/sparc/Makefile b/sysdeps/unix/sysv/linux/sparc/Makefile index d769c48..96b783e 100644 --- a/sysdeps/unix/sysv/linux/sparc/Makefile +++ b/sysdeps/unix/sysv/linux/sparc/Makefile @@ -1,8 +1,8 @@ -syscall-list-variants := 32bit 64bit -syscall-list-32bit-options := -U__sparc_v9__ -U__arch64__ -syscall-list-32bit-condition := __WORDSIZE == 32 -syscall-list-64bit-options := -D__sparc_v9__ -D__arch64__ -syscall-list-64bit-condition := __WORDSIZE == 64 +abi-variants := 32 64 +abi-32-options := -U__sparc_v9__ -U__arch64__ +abi-32-condition := __WORDSIZE == 32 +abi-64-options := -D__sparc_v9__ -D__arch64__ +abi-64-condition := __WORDSIZE == 64 ifeq ($(subdir),rt) librt-routines += rt-sysdep diff --git a/sysdeps/unix/sysv/linux/x86/Makefile b/sysdeps/unix/sysv/linux/x86/Makefile new file mode 100644 index 0000000..cf4a55c --- /dev/null +++ b/sysdeps/unix/sysv/linux/x86/Makefile @@ -0,0 +1,14 @@ +# We don't need any header files. +abi-includes := + +abi-variants := 32 64 x32 + +abi-32-options := -D__i386__ -U__x86_64__ +abi-32-condition := !defined __x86_64__ +abi-32-ld-soname := ld-linux.so.2 +abi-64-options := -U__i386__ -D__x86_64__ -U__ILP32__ -D__LP64__ +abi-64-condition := defined __x86_64__ && defined __LP64__ +abi-64-ld-soname := ld-linux-x86-64.so.2 +abi-x32-options := -U__i386__ -D__x86_64__ -D__ILP32__ -U__LP64__ +abi-x32-condition := defined __x86_64__ && defined __ILP32__ +abi-x32-ld-soname := ld-linux-x32.so.2 diff --git a/sysdeps/unix/sysv/linux/x86_64/64/Makefile b/sysdeps/unix/sysv/linux/x86_64/64/Makefile new file mode 100644 index 0000000..a7b6dc5 --- /dev/null +++ b/sysdeps/unix/sysv/linux/x86_64/64/Makefile @@ -0,0 +1,2 @@ +# The default ABI is 64. +default-abi := 64 diff --git a/sysdeps/unix/sysv/linux/x86_64/Implies b/sysdeps/unix/sysv/linux/x86_64/Implies index 8d91c80..c7a65c9 100644 --- a/sysdeps/unix/sysv/linux/x86_64/Implies +++ b/sysdeps/unix/sysv/linux/x86_64/Implies @@ -1 +1,2 @@ +unix/sysv/linux/x86 unix/sysv/linux/wordsize-64 diff --git a/sysdeps/unix/sysv/linux/x86_64/Makefile b/sysdeps/unix/sysv/linux/x86_64/Makefile index 59a6b0a..dd4ab59 100644 --- a/sysdeps/unix/sysv/linux/x86_64/Makefile +++ b/sysdeps/unix/sysv/linux/x86_64/Makefile @@ -1,9 +1,3 @@ -syscall-list-variants := 32bit 64bit -syscall-list-32bit-options := -D__i386__ -U__x86_64__ -syscall-list-32bit-condition := __WORDSIZE == 32 -syscall-list-64bit-options := -U__i386__ -D__x86_64__ -syscall-list-64bit-condition := __WORDSIZE == 64 - ifeq ($(subdir),misc) sysdep_routines += ioperm iopl sysdep_headers += sys/perm.h sys/reg.h sys/debugreg.h sys/io.h diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/Makefile b/sysdeps/unix/sysv/linux/x86_64/x32/Makefile index aa78238..ecbdefb 100644 --- a/sysdeps/unix/sysv/linux/x86_64/x32/Makefile +++ b/sysdeps/unix/sysv/linux/x86_64/x32/Makefile @@ -1,3 +1,6 @@ +# The default ABI is x32. +default-abi := x32 + ifeq ($(subdir),misc) sysdep_routines += arch_prctl endif diff --git a/sysdeps/x86_64/64/shlib-versions b/sysdeps/x86_64/64/shlib-versions index c797487..50dd908 100644 --- a/sysdeps/x86_64/64/shlib-versions +++ b/sysdeps/x86_64/64/shlib-versions @@ -1,4 +1,3 @@ # Configuration DEFAULT Earliest symbol set # ------------- --------------- ------------------------------ x86_64-.*-linux.* DEFAULT GLIBC_2.2.5 -x86_64-.*-linux.* ld=ld-linux-x86-64.so.2 GLIBC_2.2.5 diff --git a/sysdeps/x86_64/x32/shlib-versions b/sysdeps/x86_64/x32/shlib-versions index d9f63e1..ae3979b 100644 --- a/sysdeps/x86_64/x32/shlib-versions +++ b/sysdeps/x86_64/x32/shlib-versions @@ -1,7 +1,6 @@ # Configuration DEFAULT Earliest symbol set # ------------- --------------- ------------------------------ x86_64-.*-linux.* DEFAULT GLIBC_2.16 -x86_64-.*-linux.* ld=ld-linux-x32.so.2 GLIBC_2.16 # Configuration ABI Identifier for ABI data files # ------------- ---------- ----------------------------- |