diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2012-05-23 19:58:03 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2012-05-23 19:58:03 -0700 |
commit | ccd969f5868c18a1d59444769d1f4d6e3408cc21 (patch) | |
tree | abf62284685a94ebcdda58bc5ac8b18035c37822 | |
parent | 8de69b8360cdb7c2bb787fe343bc46c23aeb57c4 (diff) | |
parent | 118759a5bfa9a027617ef7c5dac3fa0daf1e824c (diff) | |
download | glibc-ccd969f5868c18a1d59444769d1f4d6e3408cc21.tar.gz glibc-ccd969f5868c18a1d59444769d1f4d6e3408cc21.tar.xz glibc-ccd969f5868c18a1d59444769d1f4d6e3408cc21.zip |
Merge remote-tracking branch 'origin/hjl/abi' into hjl/x32/master
Conflicts: sysdeps/unix/sysv/linux/x86_64/Makefile
-rw-r--r-- | ChangeLog.abi | 55 | ||||
-rw-r--r-- | Makeconfig | 51 | ||||
-rw-r--r-- | Makefile | 26 | ||||
-rw-r--r-- | include/stubs-biarch.h | 12 | ||||
-rw-r--r-- | scripts/lib-names.awk | 51 | ||||
-rw-r--r-- | scripts/soversions.awk | 11 | ||||
-rw-r--r-- | shlib-versions | 16 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/Makefile | 41 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/i386/Makefile | 18 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/powerpc/Makefile | 10 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/s390/Makefile | 10 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/sparc/Makefile | 10 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/x86_64/64/Makefile | 2 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/x86_64/Makefile | 21 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/x86_64/x32/Makefile | 3 |
15 files changed, 191 insertions, 146 deletions
diff --git a/ChangeLog.abi b/ChangeLog.abi new file mode 100644 index 0000000000..8a7e3ea247 --- /dev/null +++ b/ChangeLog.abi @@ -0,0 +1,55 @@ +2012-05-23 H.J. Lu <hongjiu.lu@intel.com> + + * Makeconfig (abi-list-default-options): New macro. + (abi-list-default-condition): Likewise. + ($(common-objpfx)soversions.mk): Remove WORDSIZE check. + ($(common-objpfx)gnu/lib-names.stmp): Generate from + abi-list-variants. + * Makefile (installed-stubs): Generate from abi-list-variants. + * include/stubs-biarch.h: Removed. + * scripts/lib-names.awk: Only handle one library at a time. + * scripts/soversions.awk: Remove WORDSIZE support. + * shlib-versions: Remove WORDSIZE. + * sysdeps/unix/sysv/linux/Makefile (syscall-list-variants): + Removed. + (syscall-list-default-condition): Likewise. + (syscall-list-includes): Renamed to ... + (abi-list-includes): This. + ($(objpfx)bits/syscall%h $(objpfx)bits/syscall%d): Replace + syscall-list-* with abi-list-*. + * sysdeps/unix/sysv/linux/i386/Makefile (abi-list-includes): New + macro. + (default-abi): Likewise. + (abi-list-variants): Likewise. + (abi-list-32-options): Likewise. + (abi-list-32-condition): Likewise. + (abi-list-64-options): Likewise. + (abi-list-64-condition): Likewise. + (abi-list-x32-options): Likewise. + (abi-list-x32-condition): Likewise. + * sysdeps/unix/sysv/linux/x86_64/64/Makefile: New file. + * sysdeps/unix/sysv/linux/x86_64/Makefile (syscall-list-variants): + Removed. + (syscall-list-32-options): Likewise. + (syscall-list-32-condition): Likewise. + (syscall-list-64-options): Likewise. + (syscall-list-64-condition): Likewise. + (abi-list-variants): New macros. + (abi-list-includes): Likewise. + (abi-list-32-options): Likewise. + (abi-list-32-condition): Likewise. + (abi-list-64-options): Likewise. + (abi-list-64-condition): Likewise. + (abi-list-x32-options): Likewise. + (abi-list-x32-condition): Likewise. + * sysdeps/unix/sysv/linux/x86_64/x32/Makefile (default-abi): New + macro. + * sysdeps/unix/sysv/linux/powerpc/Makefile (syscall-list-variants): + Renamed to ... + (abi-list-variants): This. + (syscall-list-32bit-*): Renamed to ... + (abi-list-32-*): This. + (syscall-list-64bit-*): Renamed to ... + (abi-list-64-*): This. + * sysdeps/unix/sysv/linux/s390/Makefile: Likewise. + * sysdeps/unix/sysv/linux/sparc/Makefile: Likewise. diff --git a/Makeconfig b/Makeconfig index 3a09764dfa..4f9b9cf654 100644 --- a/Makeconfig +++ b/Makeconfig @@ -787,6 +787,21 @@ ifeq (yes, $(build-shared)) sed '/^[ ]*#/d;/^[ ]*$$/d' $< > $@T mv -f $@T $@ +# If there is more than one syscall list for different architecture +# variants, the CPU/shlib-versions should have an ABI-LIST entry with a +# list of names for those variants, separated by `:', (e.g. 32:64), and, +# for each variant, defines abi-list-$(variant)-options to be compiler +# options to cause <asm/unistd.h> to define the desired list of +# syscalls and abi-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 +# in the generated header, if the default does not suffice. + +ifndef abi-list-variants +abi-list-default-options := +abi-list-default-condition := +endif + # Process the shlib-versions file, which tells us what shared library # version numbers to use when we install shared objects on this system. # We need to wait until $(subdirs) is complete. @@ -812,8 +827,7 @@ $(common-objpfx)soversions.i: $(..)scripts/soversions.awk \ -f $^ > $@T mv -f $@T $@ $(common-objpfx)soversions.mk: $(common-objpfx)soversions.i $(..)Makeconfig - (seen_DEFAULT=0; seen_WORDSIZE32=0; seen_WORDSIZE64=0; \ - while read which lib number setname; do \ + (while read which lib number setname; do \ eval seen_$$which=1; \ test x"$$which" != xABI || echo abi-name = "$$lib"; \ test x"$$which" = xDEFAULT || continue; \ @@ -824,12 +838,6 @@ $(common-objpfx)soversions.mk: $(common-objpfx)soversions.i $(..)Makeconfig echo "all-sonames+=$$lib=\$$($$lib.so-version)";;\ esac; \ done; \ - case "$$seen_DEFAULT$$seen_WORDSIZE32$$seen_WORDSIZE64" in \ - 100) echo biarch = no;; \ - 101) echo biarch = 32;; \ - ?1?) echo biarch = 64;; \ - *) echo >&2 BUG; exit 2;; \ - esac; \ echo soversions.mk-done = t;) < $< > $@T; exit 0 mv -f $@T $@ endif @@ -846,8 +854,31 @@ $(common-objpfx)gnu/lib-names.h: $(common-objpfx)gnu/lib-names.stmp; @: $(common-objpfx)gnu/lib-names.stmp: $(..)scripts/lib-names.awk \ $(common-objpfx)soversions.i $(make-target-directory) - @rm -f ${@:stmp=T} $@ - LC_ALL=C $(AWK) -f $^ > ${@:stmp=T} + { \ + echo '/* This file is automatically generated.';\ + echo ' It defines macros to allow user program to find the shared'; \ + echo ' library files which come as part of GNU libc. */'; \ + echo '#ifndef __GNU_LIB_NAMES_H'; \ + echo '#define __GNU_LIB_NAMES_H 1'; \ + echo ''; \ + $(if $(abi-list-includes), \ + $(foreach h,$(abi-list-includes), echo '#include <$(h)>';) \ + echo '';) \ + $(if $(abi-list-variants), \ + $(foreach v,$(abi-list-variants),\ + $(if $(abi-list-$(v)-condition),\ + echo '#if $(abi-list-$(v)-condition)'; \ + ($(foreach s,$(all-sonames), \ + $(if $(abi-list-$(v)-$(firstword $(subst =, ,$(s)))-soname),\ + echo $(firstword $(subst =, ,$(s)))=$(abi-list-$(v)-$(firstword $(subst =, ,$(s)))-soname);, \ + echo $(s);))) \ + | LC_ALL=C $(AWK) -v multi=1 -f $(firstword $^) | LC_ALL=C sort;) \ + $(if $(abi-list-$(v)-condition),echo '#endif';)), \ + ($(foreach s,$(all-sonames), echo $(s);)) \ + | LC_ALL=C $(AWK) -f $(firstword $^) | LC_ALL=C sort;) \ + echo ''; \ + echo '#endif /* gnu/lib-names.h */'; \ + } > ${@:stmp=T} $(move-if-change) ${@:stmp=T} ${@:stmp=h} touch $@ endif diff --git a/Makefile b/Makefile index c0a0cfb828..3859997eae 100644 --- a/Makefile +++ b/Makefile @@ -170,14 +170,32 @@ others: $(common-objpfx)testrun.sh subdir-stubs := $(foreach dir,$(subdirs),$(common-objpfx)$(dir)/stubs) -ifeq ($(biarch),no) +ifndef abi-list-variants installed-stubs = $(inst_includedir)/gnu/stubs.h else -installed-stubs = $(inst_includedir)/gnu/stubs-$(biarch).h +ifndef default-abi +default-abi = $(firstword $(abi-list-variants)) +endif +installed-stubs = $(inst_includedir)/gnu/stubs-$(default-abi).h -$(inst_includedir)/gnu/stubs.h: include/stubs-biarch.h $(+force) +$(inst_includedir)/gnu/stubs.h: $(common-objpfx)soversions.mk $(+force) $(make-target-directory) - $(INSTALL_DATA) $< $@ + { \ + echo '/* This file is automatically generated.';\ + echo " This file selects the right generated file of \`__stub_FUNCTION' macros";\ + echo ' based on the architecture being compiled for. */'; \ + echo ''; \ + $(foreach h,$(abi-list-includes), echo '#include <$(h)>';) \ + echo ''; \ + $(foreach v,$(abi-list-variants),\ + $(if $(abi-list-$(v)-condition),\ + echo '#if $(abi-list-$(v)-condition)'; \ + echo '# include <gnu/stubs-$(v).h>'); \ + $(if $(abi-list-$(v)-condition),echo '#endif';) \ + rm -f $(@:.d=.h).new$(v); \ + ) \ + } > $(@:.d=.h).new + mv -f $(@:.d=.h).new $(@:.d=.h) install-others-nosubdir: $(installed-stubs) endif diff --git a/include/stubs-biarch.h b/include/stubs-biarch.h deleted file mode 100644 index fc086bd894..0000000000 --- a/include/stubs-biarch.h +++ /dev/null @@ -1,12 +0,0 @@ -/* This file selects the right generated file of `__stub_FUNCTION' macros - based on the architecture being compiled for. */ - -#include <bits/wordsize.h> - -#if __WORDSIZE == 32 -# include <gnu/stubs-32.h> -#elif __WORDSIZE == 64 -# include <gnu/stubs-64.h> -#else -# error "unexpected value for __WORDSIZE macro" -#endif diff --git a/scripts/lib-names.awk b/scripts/lib-names.awk index 77e6668515..ccb7b7f431 100644 --- a/scripts/lib-names.awk +++ b/scripts/lib-names.awk @@ -1,18 +1,17 @@ # awk script for soversions.i -> gnu/lib-names.h; see Makeconfig. -$1 != "DEFAULT" { multi = 1 } - # { - lib = $2; - version = $3; - if ($3 !~ /^[0-9]/) { - soname = $3; - extra = $3; + split($1, fields, "=") + lib = fields[1]; + soname = version = fields[2]; + sub(/^.*=/, "", soname); + sub(/^lib.*\.so\./, "", version); + if ($soname !~ /^lib/) { + extra = soname; sub(/\.so.*$/, "", extra); } else { - soname = lib ".so." $3; extra = ""; } soname = "\"" soname "\""; @@ -26,41 +25,9 @@ $1 != "DEFAULT" { multi = 1 } } END { - print "/* This file is automatically generated."; - print " It defines macros to allow user program to find the shared"; - print " library files which come as part of GNU libc. */"; - print "#ifndef __GNU_LIB_NAMES_H"; - print "#define __GNU_LIB_NAMES_H 1"; - print ""; - - pfx = multi ? "# define " : "#define "; for (elt in macros) { split(elt, x); - line = sprintf("%-40s%s", pfx x[2], macros[elt]); - if (x[1] in lines) - lines[x[1]] = lines[x[1]] "\n" line; - else - lines[x[1]] = line; - } - - if (multi) { - # Print these in a fixed order so the result is identical - # on both sides of the coin. - if (!("WORDSIZE32" in lines)) - lines["WORDSIZE32"] = lines["DEFAULT"]; - if (!("WORDSIZE64" in lines)) - lines["WORDSIZE64"] = lines["DEFAULT"]; - print "#include <bits/wordsize.h>\n"; - print "#if __WORDSIZE == 32"; - cmd = "LC_ALL=C sort"; print lines["WORDSIZE32"] | cmd; close(cmd); - print "#else" - cmd = "LC_ALL=C sort"; print lines["WORDSIZE64"] | cmd; close(cmd); - print "#endif"; + pfx = multi ? "# define " : "#define "; + printf("%-40s%s\n", pfx x[2], macros[elt]); } - else { - cmd = "LC_ALL=C sort"; print lines["DEFAULT"] | cmd; close(cmd); - } - - print ""; - print "#endif /* gnu/lib-names.h */" } diff --git a/scripts/soversions.awk b/scripts/soversions.awk index 55577ccc7e..dc8afdc205 100644 --- a/scripts/soversions.awk +++ b/scripts/soversions.awk @@ -7,17 +7,6 @@ BEGIN { { thiscf = $1 } -$2 ~ /WORDSIZE[3264]/ { - if ((config ~ thiscf) && !othercf) { - othercf = $3; - sub(/@CPU@/, cpu, othercf); - sub(/@VENDOR@/, vendor, othercf); - sub(/@OS@/, os, othercf); - configs[othercf] = $2; - } - next; -} - $2 == "ABI" { if ((config ~ thiscf) && !abiname) { abiname = $3; diff --git a/shlib-versions b/shlib-versions index b8ed1e9b7d..38fc7ea0b8 100644 --- a/shlib-versions +++ b/shlib-versions @@ -18,11 +18,6 @@ # library has no third column. The defaults must precede the entries they # apply to. # -# An entry with WORDSIZE* in the second column gives an alternate -# configuration tuple whose macros will be conditionally defined in -# gnu/lib-names.h; @CPU@, @VENDOR@, @OS@ can be used in the third -# column to compose the alternate tuple matched against the patterns here. - # Configuration DEFAULT Earliest symbol set # ------------- --------------- ------------------------------ @@ -30,17 +25,6 @@ s390x-.*-linux.* DEFAULT GLIBC_2.2 powerpc64-.*-linux.* DEFAULT GLIBC_2.3 .*-.*-gnu-gnu.* DEFAULT GLIBC_2.2.6 -# Configuration WORDSIZE[32|64] Alternate configuration -# ------------- ---------- ----------------------- -x86_64-.*-.* WORDSIZE32 i686-@VENDOR@-@OS@ -i.86-.*-.* WORDSIZE64 x86_64-@VENDOR@-@OS@ -s390x-.*-.* WORDSIZE32 s390-@VENDOR@-@OS@ -s390-.*-.* WORDSIZE64 s390x-@VENDOR@-@OS@ -powerpc64-.*-.* WORDSIZE32 powerpc-@VENDOR@-@OS@ -powerpc.*-.*-.* WORDSIZE64 powerpc64-@VENDOR@-@OS@ -sparc64.*-.*-.* WORDSIZE32 sparc-@VENDOR@-@OS@ -sparc.*-.*-.* WORDSIZE64 sparc64-@VENDOR@-@OS@ - # Configuration ABI Identifier for ABI data files # ------------- ---------- ----------------------------- sparc64.*-.*-.* ABI sparc64-@OS@ diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile index 70fd137dbc..db05c9e66b 100644 --- a/sysdeps/unix/sysv/linux/Makefile +++ b/sysdeps/unix/sysv/linux/Makefile @@ -40,28 +40,11 @@ sysdep_headers += sys/mount.h sys/acct.h sys/sysctl.h \ 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 -# 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 +ifndef abi-list-includes +abi-list-includes := bits/wordsize.h endif +# Generate the list of SYS_* macros for the system calls (__NR_* macros). $(objpfx)bits/syscall%h $(objpfx)bits/syscall%d: ../sysdeps/unix/sysv/linux/sys/syscall.h $(make-target-directory) { \ @@ -71,30 +54,30 @@ $(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-list-includes), echo '#include <$(h)>';) \ echo ''; \ - $(foreach v,$(syscall-list-variants),\ + $(foreach v,$(abi-list-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-list-$(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-list-$(v)-condition),\ + echo '#if $(abi-list-$(v)-condition)';) \ cat $(@:.d=.h).new$(v); \ - $(if $(syscall-list-$(v)-condition),echo '#endif';) \ + $(if $(abi-list-$(v)-condition),echo '#endif';) \ rm -f $(@:.d=.h).new$(v); \ ) \ } > $(@:.d=.h).new mv -f $(@:.d=.h).new $(@:.d=.h) ifneq (,$(objpfx)) sed $(sed-remove-objpfx) \ - $(foreach v,$(syscall-list-variants),$(@:.h=.d)-t$(v)) > $(@:.h=.d)-t3 + $(foreach v,$(abi-list-variants),$(@:.h=.d)-t$(v)) > $(@:.h=.d)-t3 else - cat $(foreach v,$(syscall-list-variants),$(@:.h=.d)-t$(v)) \ + cat $(foreach v,$(abi-list-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-list-variants),$(@:.h=.d)-t$(v)) mv -f $(@:.h=.d)-t3 $(@:.h=.d) ifndef no_deps diff --git a/sysdeps/unix/sysv/linux/i386/Makefile b/sysdeps/unix/sysv/linux/i386/Makefile index fc5a524ebf..6301affc52 100644 --- a/sysdeps/unix/sysv/linux/i386/Makefile +++ b/sysdeps/unix/sysv/linux/i386/Makefile @@ -1,3 +1,21 @@ +# We don't need any header files. +abi-list-includes := + +# The default ABI is 32. +default-abi := 32 + +abi-list-variants := 32 64 x32 + +abi-list-32-options := -D__i386__ -U__x86_64__ +abi-list-32-condition := !defined __x86_64__ +abi-list-32-ld-soname := ld-linux.so.2 +abi-list-64-options := -U__i386__ -D__x86_64__ -U__ILP32__ -D__LP64__ +abi-list-64-condition := defined __x86_64__ && defined __LP64__ +abi-list-64-ld-soname := ld-linux-x86-64.so.2 +abi-list-x32-options := -U__i386__ -D__x86_64__ -D__ILP32__ -U__LP64__ +abi-list-x32-condition := defined __x86_64__ && defined __ILP32__ +abi-list-x32-ld-soname := ld-linux-x32.so.2 + 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 55311a4fc1..3b012a2f0f 100644 --- a/sysdeps/unix/sysv/linux/powerpc/Makefile +++ b/sysdeps/unix/sysv/linux/powerpc/Makefile @@ -1,8 +1,8 @@ -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-list-variants := 32 64 +abi-list-32-options := -U__powerpc64__ +abi-list-32-condition := __WORDSIZE == 32 +abi-list-64-options := -D__powerpc64__ +abi-list-64-condition := __WORDSIZE == 64 ifeq ($(subdir),rt) librt-routines += rt-sysdep diff --git a/sysdeps/unix/sysv/linux/s390/Makefile b/sysdeps/unix/sysv/linux/s390/Makefile index fb20fb05ac..2fd53f4308 100644 --- a/sysdeps/unix/sysv/linux/s390/Makefile +++ b/sysdeps/unix/sysv/linux/s390/Makefile @@ -1,8 +1,8 @@ -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-list-variants := 32 64 +abi-list-32-options := -U__s390x__ +abi-list-32-condition := __WORDSIZE == 32 +abi-list-64-options := -D__s390x__ +abi-list-64-condition := __WORDSIZE == 64 ifeq ($(subdir),rt) librt-routines += rt-sysdep diff --git a/sysdeps/unix/sysv/linux/sparc/Makefile b/sysdeps/unix/sysv/linux/sparc/Makefile index d769c48526..3f7af37a92 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-list-variants := 32 64 +abi-list-32-options := -U__sparc_v9__ -U__arch64__ +abi-list-32-condition := __WORDSIZE == 32 +abi-list-64-options := -D__sparc_v9__ -D__arch64__ +abi-list-64-condition := __WORDSIZE == 64 ifeq ($(subdir),rt) librt-routines += rt-sysdep 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 0000000000..a7b6dc5a53 --- /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/Makefile b/sysdeps/unix/sysv/linux/x86_64/Makefile index 367694882e..2b36544e3f 100644 --- a/sysdeps/unix/sysv/linux/x86_64/Makefile +++ b/sysdeps/unix/sysv/linux/x86_64/Makefile @@ -1,10 +1,17 @@ -syscall-list-variants := 32bit 64bit x32 -syscall-list-32bit-options := -D__i386__ -U__x86_64__ -syscall-list-32bit-condition := !defined __x86_64__ -syscall-list-64bit-options := -U__i386__ -D__x86_64__ -U__ILP32__ -D__LP64__ -syscall-list-64bit-condition := defined __x86_64__ && defined __LP64__ -syscall-list-x32-options := -U__i386__ -D__x86_64__ -D__ILP32__ -U__LP64__ -syscall-list-x32-condition := defined __x86_64__ && defined __ILP32__ +# We don't need any header files. +abi-list-includes := + +abi-list-variants := 32 64 x32 + +abi-list-32-options := -D__i386__ -U__x86_64__ +abi-list-32-condition := !defined __x86_64__ +abi-list-32-ld-soname := ld-linux.so.2 +abi-list-64-options := -U__i386__ -D__x86_64__ -U__ILP32__ -D__LP64__ +abi-list-64-condition := defined __x86_64__ && defined __LP64__ +abi-list-64-ld-soname := ld-linux-x86-64.so.2 +abi-list-x32-options := -U__i386__ -D__x86_64__ -D__ILP32__ -U__LP64__ +abi-list-x32-condition := defined __x86_64__ && defined __ILP32__ +abi-list-x32-ld-soname := ld-linux-x32.so.2 ifeq ($(subdir),misc) sysdep_routines += ioperm iopl diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/Makefile b/sysdeps/unix/sysv/linux/x86_64/x32/Makefile index aa78238a0d..ecbdefb2d3 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 |