* RFA: Port maintainers: Convert WORDSIZE[32|64]/ld to abi-variants
@ 2012-05-26 13:37 H.J. Lu
2012-05-26 17:03 ` Joseph S. Myers
0 siblings, 1 reply; 21+ messages in thread
From: H.J. Lu @ 2012-05-26 13:37 UTC (permalink / raw)
To: GNU C Library; +Cc: libc-ports
Hi, Glibc Port Maintainers,
Here is a patch to convert WORDSIZE[32|64]/ld in shlib-versions to
abi-variants in CPU/Makefile to support more than one ABI in
gnu/lib-names.h, gnu/stubs.h and bits/syscall.h:
1. For non-biarch architectures, there is nothing to do.
2. For biarch/triarch architectures where there are no soname differences,
you need to rename syscall-list-* variables in CPU/Makefile to abi-*.
If the default ABI for the build isn't the first one on abi-variants, you
should also define default-abi:
---
# The default ABI is 64.
default-abi := 64
---
3. For biarch/triarch architectures where there are soname differences,
in addition to renaming syscall-list-* variables in CPU/Makefile to
abi-* and defining default-abi, you also need to define
abi-XX-ld-soname := your ld.so soname.
where XX is the ABI variant, like
---
# 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
----
Please test it and let me know if it works for you.
BTW, this patch is on hjl/abi branch.
Thanks.
H.J.
---
---
ChangeLog | 47 ++++++++++++++++++++++
Makeconfig | 56 +++++++++++++++++++++-----
Makefile | 23 +++++++++--
include/stubs-biarch.h | 12 ------
scripts/lib-names.awk | 51 ++++--------------------
scripts/soversions.awk | 11 -----
shlib-versions | 23 -----------
sysdeps/unix/sysv/linux/Makefile | 53 ++++++++++++-------------
sysdeps/unix/sysv/linux/i386/Implies | 1 +
sysdeps/unix/sysv/linux/i386/Makefile | 3 +
sysdeps/unix/sysv/linux/powerpc/Makefile | 11 +++--
sysdeps/unix/sysv/linux/s390/Makefile | 11 +++--
sysdeps/unix/sysv/linux/sparc/Makefile | 12 +++--
sysdeps/unix/sysv/linux/x86/Makefile | 14 +++++++
sysdeps/unix/sysv/linux/x86_64/64/Makefile | 2 +
sysdeps/unix/sysv/linux/x86_64/Implies | 1 +
sysdeps/unix/sysv/linux/x86_64/Makefile | 6 ---
sysdeps/unix/sysv/linux/x86_64/x32/Makefile | 3 +
sysdeps/x86_64/64/shlib-versions | 1 -
sysdeps/x86_64/x32/shlib-versions | 1 -
20 files changed, 189 insertions(+), 153 deletions(-)
delete mode 100644 include/stubs-biarch.h
create mode 100644 sysdeps/unix/sysv/linux/i386/Implies
create mode 100644 sysdeps/unix/sysv/linux/x86/Makefile
create mode 100644 sysdeps/unix/sysv/linux/x86_64/64/Makefile
diff --git a/ChangeLog b/ChangeLog
index 0c7a24b..f88b6a6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -39,6 +39,53 @@
2012-05-25 H.J. Lu <hongjiu.lu@intel.com>
+ [BZ #14112]
+ * Makeconfig (default-abi): New macro.
+ (abi-includes): Likewise.
+ ($(common-objpfx)soversions.mk): Remove WORDSIZE check. Use
+ $(abi-$(default-abi)-lib-soname) for soname if defined.
+ ($(common-objpfx)gnu/lib-names.stmp): Generate from
+ abi-variants.
+ * Makefile (installed-stubs): Likewise.
+ * 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 and ld entries.
+ * sysdeps/unix/sysv/linux/Makefile (syscall-list-variants):
+ Removed.
+ (syscall-list-default-condition): Likewise.
+ (syscall-list-default-condition): Likewise.
+ (syscall-list-includes): Likewise.
+ ($(objpfx)bits/syscall%h $(objpfx)bits/syscall%d): Replace
+ syscall-list-* with abi-*. Handle undefined abi-variants.
+ * sysdeps/unix/sysv/linux/i386/Makefile (default-abi): New macro.
+ * sysdeps/unix/sysv/linux/i386/Implies: New file.
+ * sysdeps/unix/sysv/linux/x86/Makefile: Likewise.
+ * sysdeps/unix/sysv/linux/x86_64/64/Makefile: Likewise.
+ * sysdeps/unix/sysv/linux/x86_64/Implies: Add unix/sysv/linux/x86.
+ * 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.
+ * sysdeps/unix/sysv/linux/x86_64/x32/Makefile (default-abi): New
+ macro.
+ * sysdeps/unix/sysv/linux/powerpc/Makefile (syscall-list-*):
+ Renamed to ...
+ (abi-*): This.
+ (abi-64-ld-soname): New macro.
+ * sysdeps/unix/sysv/linux/s390/Makefile: Likewise.
+ * sysdeps/unix/sysv/linux/sparc/Makefile (syscall-list-*):
+ Renamed to ...
+ (abi-*): This.
+ (abi-32-ld-soname): New macro.
+ (abi-64-ld-soname): Likewise.
+ * sysdeps/x86_64/64/shlib-versions: Remove ld entry.
+ * sysdeps/x86_64/x32/shlib-versions: Likewise.
+
+2012-05-25 H.J. Lu <hongjiu.lu@intel.com>
+
* configure.in: Define the default includes to being none.
* configure: Regenerated.
diff --git a/Makeconfig b/Makeconfig
index b4b2963..df7545f 100644
--- a/Makeconfig
+++ b/Makeconfig
@@ -791,6 +791,24 @@ ifeq (yes, $(build-shared))
sed '/^[ ]*#/d;/^[ ]*$$/d' $< > $@T
mv -f $@T $@
+# To generate a header to support more than one ABI for different
+# architecture 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)-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.
+
+ifdef abi-variants
+ifndef default-abi
+default-abi = $(firstword $(abi-variants))
+endif
+endif
+
+ifndef abi-includes
+abi-includes := bits/wordsize.h
+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.
@@ -816,24 +834,17 @@ $(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; \
case $$number in \
[0-9]*) echo "$$lib.so-version=.$$number"; \
echo "all-sonames+=$$lib=$$lib.so\$$($$lib.so-version)";;\
- *) echo "$$lib.so-version=$$number"; \
+ *) echo "$$lib.so-version=\$$(if \$$(abi-$(default-abi)-$$lib-soname),\$$(abi-$(default-abi)-$$lib-soname),$$number)"; \
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
@@ -850,8 +861,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-includes), \
+ $(foreach h,$(abi-includes), echo '#include <$(h)>';) \
+ echo '';) \
+ $(if $(abi-variants), \
+ $(foreach v,$(abi-variants),\
+ $(if $(abi-$(v)-condition),\
+ echo '#if $(abi-$(v)-condition)'; \
+ ($(foreach s,$(all-sonames), \
+ $(if $(abi-$(v)-$(firstword $(subst =, ,$(s)))-soname),\
+ echo $(firstword $(subst =, ,$(s)))=$(abi-$(v)-$(firstword $(subst =, ,$(s)))-soname);, \
+ echo $(s);))) \
+ | LC_ALL=C $(AWK) -v multi=1 -f $(firstword $^) | LC_ALL=C sort;) \
+ $(if $(abi-$(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 c0a0cfb..89588c1 100644
--- a/Makefile
+++ b/Makefile
@@ -170,14 +170,29 @@ others: $(common-objpfx)testrun.sh
subdir-stubs := $(foreach dir,$(subdirs),$(common-objpfx)$(dir)/stubs)
-ifeq ($(biarch),no)
+ifndef abi-variants
installed-stubs = $(inst_includedir)/gnu/stubs.h
else
-installed-stubs = $(inst_includedir)/gnu/stubs-$(biarch).h
+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-includes), echo '#include <$(h)>';) \
+ echo ''; \
+ $(foreach v,$(abi-variants),\
+ $(if $(abi-$(v)-condition),\
+ echo '#if $(abi-$(v)-condition)'; \
+ echo '# include <gnu/stubs-$(v).h>'); \
+ $(if $(abi-$(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 fc086bd..0000000
--- 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 77e6668..ccb7b7f 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 55577cc..dc8afdc 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 b8ed1e9..9d8e21d 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@
@@ -69,13 +53,6 @@ sparc64.*-.*-linux.* libc=6 GLIBC_2.2
# libc.so.0.3 is the first Hurd libc using libio.
.*-.*-gnu-gnu.* libc=0.3
-# The dynamic loader also requires different names.
-i.86-.*-linux.* ld=ld-linux.so.2
-sparc64.*-.*-linux.* ld=ld-linux.so.2 GLIBC_2.2
-sparc.*-.*-linux.* ld=ld-linux.so.2
-sh.*-.*-linux.* ld=ld-linux.so.2 GLIBC_2.2
-s390x-.*-linux.* ld=ld64.so.1 GLIBC_2.2
-powerpc64.*-.*-linux.* ld=ld64.so.1 GLIBC_2.3
# We use the ELF ABI standard name for the default.
.*-.*-.* ld=ld.so.1
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..a71679d 100644
--- a/sysdeps/unix/sysv/linux/sparc/Makefile
+++ b/sysdeps/unix/sysv/linux/sparc/Makefile
@@ -1,8 +1,10 @@
-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-32-ld-soname := ld-linux.so.2
+abi-64-options := -D__sparc_v9__ -D__arch64__
+abi-64-condition := __WORDSIZE == 64
+abi-64-ld-soname := $(abi-32-ld-soname)
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
# ------------- ---------- -----------------------------
--
1.7.6.5
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: RFA: Port maintainers: Convert WORDSIZE[32|64]/ld to abi-variants
2012-05-26 13:37 RFA: Port maintainers: Convert WORDSIZE[32|64]/ld to abi-variants H.J. Lu
@ 2012-05-26 17:03 ` Joseph S. Myers
2012-05-26 17:51 ` H.J. Lu
2012-05-30 18:58 ` Thomas Schwinge
0 siblings, 2 replies; 21+ messages in thread
From: Joseph S. Myers @ 2012-05-26 17:03 UTC (permalink / raw)
To: H.J. Lu
Cc: GNU C Library, libc-ports, Thomas Schwinge, Kaz Kojima, Andreas Krebbel
On Sat, 26 May 2012, H.J. Lu wrote:
> 1. For non-biarch architectures, there is nothing to do.
This patch is removing the ld=ld-linux.so.2 entry for sh.*-.*-linux.*,
which looks like a mistake; I don't see it added anywhere else.
> 2. For biarch/triarch architectures where there are no soname differences,
> you need to rename syscall-list-* variables in CPU/Makefile to abi-*.
> If the default ABI for the build isn't the first one on abi-variants, you
> should also define default-abi:
But leave the sonames in shlib-versions?
> 3. For biarch/triarch architectures where there are soname differences,
> in addition to renaming syscall-list-* variables in CPU/Makefile to
> abi-* and defining default-abi, you also need to define
>
> abi-XX-ld-soname := your ld.so soname.
>
> where XX is the ABI variant, like
And leave sonames in shlib-versions as well, or take them out?
If taken out, where does the minimum symbol version information for ld.so
go? For sparc64 it's currently given as GLIBC_2.2 - not globally, but for
ld.so (sparc64 has GLIBC_2.0 symbols in some libraries such as libresolv,
but for ld.so, libc, libm and libpthread the minimum is GLIBC_2.2; I don't
know the story behind why this is the case). I don't see an obvious new
location where that information is going, with the entries removed from
shlib-versions.
We could probably do with each libc architecture maintainer confirming
that their ABI tests still pass after the changes. (Well, that may be
hard for S390 and SH, whose ABI baselines haven't been updated by the
architecture maintainers since they were moved to separate
per-architecture files. SH and S390 maintainers, if your baselines are in
fact accurate without changes - if the tests pass as-is (you can run make
check-abi from cross as well as native builds) and comparison with other
architectures and old binaries doesn't show any signs of mistakes having
crept into past symbol versions - could you please confirm that
explicitly? And if they do need changes, please make them. Verifying the
check-abi tests pass is something to be done for all architectures between
freeze and release - but the only problems it should be discovering at
that point are *recent* ABI breakage; mistakes in the baseline, or
unwanted changes relative to binaries of old releases, ought to be found
in advance of the freeze.)
--
Joseph S. Myers
joseph@codesourcery.com
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: RFA: Port maintainers: Convert WORDSIZE[32|64]/ld to abi-variants
2012-05-26 17:03 ` Joseph S. Myers
@ 2012-05-26 17:51 ` H.J. Lu
2012-05-26 19:22 ` Joseph S. Myers
2012-05-30 18:58 ` Thomas Schwinge
1 sibling, 1 reply; 21+ messages in thread
From: H.J. Lu @ 2012-05-26 17:51 UTC (permalink / raw)
To: Joseph S. Myers
Cc: GNU C Library, libc-ports, Thomas Schwinge, Kaz Kojima, Andreas Krebbel
On Sat, May 26, 2012 at 10:02 AM, Joseph S. Myers
<joseph@codesourcery.com> wrote:
> On Sat, 26 May 2012, H.J. Lu wrote:
>
>> 1. For non-biarch architectures, there is nothing to do.
>
> This patch is removing the ld=ld-linux.so.2 entry for sh.*-.*-linux.*,
> which looks like a mistake; I don't see it added anywhere else.
I restored sh and sparc entries in shlib-versions on hjl/abi branch.
The new patch is at
http://sourceware.org/git/?p=glibc.git;a=patch;h=0d1f492b3cf83a200601c1f49734b048c5547e57
>> 2. For biarch/triarch architectures where there are no soname differences,
>> you need to rename syscall-list-* variables in CPU/Makefile to abi-*.
>> If the default ABI for the build isn't the first one on abi-variants, you
>> should also define default-abi:
>
> But leave the sonames in shlib-versions?
Yes.
>> 3. For biarch/triarch architectures where there are soname differences,
>> in addition to renaming syscall-list-* variables in CPU/Makefile to
>> abi-* and defining default-abi, you also need to define
>>
>> abi-XX-ld-soname := your ld.so soname.
>>
>> where XX is the ABI variant, like
>
> And leave sonames in shlib-versions as well, or take them out?
>
> If taken out, where does the minimum symbol version information for ld.so
> go? For sparc64 it's currently given as GLIBC_2.2 - not globally, but for
> ld.so (sparc64 has GLIBC_2.0 symbols in some libraries such as libresolv,
> but for ld.so, libc, libm and libpthread the minimum is GLIBC_2.2; I don't
> know the story behind why this is the case). I don't see an obvious new
> location where that information is going, with the entries removed from
> shlib-versions.
I restored sparc entries in shlib-versions to accommodate this.
> We could probably do with each libc architecture maintainer confirming
> that their ABI tests still pass after the changes. (Well, that may be
> hard for S390 and SH, whose ABI baselines haven't been updated by the
> architecture maintainers since they were moved to separate
> per-architecture files. SH and S390 maintainers, if your baselines are in
> fact accurate without changes - if the tests pass as-is (you can run make
> check-abi from cross as well as native builds) and comparison with other
> architectures and old binaries doesn't show any signs of mistakes having
> crept into past symbol versions - could you please confirm that
> explicitly? And if they do need changes, please make them. Verifying the
> check-abi tests pass is something to be done for all architectures between
> freeze and release - but the only problems it should be discovering at
> that point are *recent* ABI breakage; mistakes in the baseline, or
> unwanted changes relative to binaries of old releases, ought to be found
> in advance of the freeze.)
>
Thanks.
--
H.J.
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: RFA: Port maintainers: Convert WORDSIZE[32|64]/ld to abi-variants
2012-05-26 17:51 ` H.J. Lu
@ 2012-05-26 19:22 ` Joseph S. Myers
2012-05-26 20:42 ` H.J. Lu
2012-05-30 0:29 ` H.J. Lu
0 siblings, 2 replies; 21+ messages in thread
From: Joseph S. Myers @ 2012-05-26 19:22 UTC (permalink / raw)
To: H.J. Lu
Cc: GNU C Library, libc-ports, Thomas Schwinge, Kaz Kojima, Andreas Krebbel
On Sat, 26 May 2012, H.J. Lu wrote:
> I restored sh and sparc entries in shlib-versions on hjl/abi branch.
> The new patch is at
>
> http://sourceware.org/git/?p=glibc.git;a=patch;h=0d1f492b3cf83a200601c1f49734b048c5547e57
Provided the new version passes architecture maintainer testing I think it
will probably be OK for 2.16, given the comments Roland requested saying
that the use of soname variables set in makefiles is wrong and a bug filed
with a 2.17 milestone to get this cleaned up properly along the lines I
proposed (naming ABI variants, not triplets, in shlib-versions, with all
the architecture information in shlib-versions moving to appropriate
sysdeps directories shared by all the ABI variants of each architecture).
--
Joseph S. Myers
joseph@codesourcery.com
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: RFA: Port maintainers: Convert WORDSIZE[32|64]/ld to abi-variants
2012-05-26 19:22 ` Joseph S. Myers
@ 2012-05-26 20:42 ` H.J. Lu
2012-05-30 0:29 ` H.J. Lu
1 sibling, 0 replies; 21+ messages in thread
From: H.J. Lu @ 2012-05-26 20:42 UTC (permalink / raw)
To: Joseph S. Myers
Cc: GNU C Library, libc-ports, Thomas Schwinge, Kaz Kojima, Andreas Krebbel
On Sat, May 26, 2012 at 12:22 PM, Joseph S. Myers
<joseph@codesourcery.com> wrote:
> On Sat, 26 May 2012, H.J. Lu wrote:
>
>> I restored sh and sparc entries in shlib-versions on hjl/abi branch.
>> The new patch is at
>>
>> http://sourceware.org/git/?p=glibc.git;a=patch;h=0d1f492b3cf83a200601c1f49734b048c5547e57
>
> Provided the new version passes architecture maintainer testing I think it
> will probably be OK for 2.16, given the comments Roland requested saying
> that the use of soname variables set in makefiles is wrong and a bug filed
> with a 2.17 milestone to get this cleaned up properly along the lines I
> proposed (naming ABI variants, not triplets, in shlib-versions, with all
> the architecture information in shlib-versions moving to appropriate
> sysdeps directories shared by all the ABI variants of each architecture).
>
I opened:
http://sourceware.org/bugzilla/show_bug.cgi?id=14171
--
H.J.
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: RFA: Port maintainers: Convert WORDSIZE[32|64]/ld to abi-variants
2012-05-26 19:22 ` Joseph S. Myers
2012-05-26 20:42 ` H.J. Lu
@ 2012-05-30 0:29 ` H.J. Lu
2012-05-30 0:39 ` David Miller
` (2 more replies)
1 sibling, 3 replies; 21+ messages in thread
From: H.J. Lu @ 2012-05-30 0:29 UTC (permalink / raw)
To: Joseph S. Myers
Cc: GNU C Library, libc-ports, Thomas Schwinge, Kaz Kojima,
Andreas Krebbel, David Miller
On Sat, May 26, 2012 at 12:22 PM, Joseph S. Myers
<joseph@codesourcery.com> wrote:
> On Sat, 26 May 2012, H.J. Lu wrote:
>
>> I restored sh and sparc entries in shlib-versions on hjl/abi branch.
>> The new patch is at
>>
>> http://sourceware.org/git/?p=glibc.git;a=patch;h=0d1f492b3cf83a200601c1f49734b048c5547e57
>
> Provided the new version passes architecture maintainer testing I think it
> will probably be OK for 2.16, given the comments Roland requested saying
> that the use of soname variables set in makefiles is wrong and a bug filed
> with a 2.17 milestone to get this cleaned up properly along the lines I
> proposed (naming ABI variants, not triplets, in shlib-versions, with all
> the architecture information in shlib-versions moving to appropriate
> sysdeps directories shared by all the ABI variants of each architecture).
>
I rebased hjl/abi branch. Has anyone verified it on sparc, powerpc an s390x?
Thanks.
--
H.J.
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: RFA: Port maintainers: Convert WORDSIZE[32|64]/ld to abi-variants
2012-05-30 0:29 ` H.J. Lu
@ 2012-05-30 0:39 ` David Miller
2012-05-30 3:15 ` David Miller
2012-05-30 8:49 ` Andreas Krebbel
2012-05-31 15:17 ` Joseph S. Myers
2 siblings, 1 reply; 21+ messages in thread
From: David Miller @ 2012-05-30 0:39 UTC (permalink / raw)
To: hjl.tools
Cc: joseph, libc-alpha, libc-ports, thomas, kkojima, Andreas.Krebbel
From: "H.J. Lu" <hjl.tools@gmail.com>
Date: Tue, 29 May 2012 17:29:14 -0700
> On Sat, May 26, 2012 at 12:22 PM, Joseph S. Myers
> <joseph@codesourcery.com> wrote:
>> On Sat, 26 May 2012, H.J. Lu wrote:
>>
>>> I restored sh and sparc entries in shlib-versions on hjl/abi branch.
>>> The new patch is at
>>>
>>> http://sourceware.org/git/?p=glibc.git;a=patch;h=0d1f492b3cf83a200601c1f49734b048c5547e57
>>
>> Provided the new version passes architecture maintainer testing I think it
>> will probably be OK for 2.16, given the comments Roland requested saying
>> that the use of soname variables set in makefiles is wrong and a bug filed
>> with a 2.17 milestone to get this cleaned up properly along the lines I
>> proposed (naming ABI variants, not triplets, in shlib-versions, with all
>> the architecture information in shlib-versions moving to appropriate
>> sysdeps directories shared by all the ABI variants of each architecture).
>>
>
> I rebased hjl/abi branch. Has anyone verified it on sparc, powerpc an s390x?
I've started some sparc tests right now.
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: RFA: Port maintainers: Convert WORDSIZE[32|64]/ld to abi-variants
2012-05-30 0:39 ` David Miller
@ 2012-05-30 3:15 ` David Miller
2012-05-30 3:27 ` H.J. Lu
0 siblings, 1 reply; 21+ messages in thread
From: David Miller @ 2012-05-30 3:15 UTC (permalink / raw)
To: hjl.tools
Cc: joseph, libc-alpha, libc-ports, thomas, kkojima, Andreas.Krebbel
From: David Miller <davem@davemloft.net>
Date: Tue, 29 May 2012 20:39:04 -0400 (EDT)
> From: "H.J. Lu" <hjl.tools@gmail.com>
> Date: Tue, 29 May 2012 17:29:14 -0700
>
>> I rebased hjl/abi branch. Has anyone verified it on sparc, powerpc an s390x?
>
> I've started some sparc tests right now.
Ok, sparc looks fine.
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: RFA: Port maintainers: Convert WORDSIZE[32|64]/ld to abi-variants
2012-05-30 3:15 ` David Miller
@ 2012-05-30 3:27 ` H.J. Lu
0 siblings, 0 replies; 21+ messages in thread
From: H.J. Lu @ 2012-05-30 3:27 UTC (permalink / raw)
To: David Miller
Cc: joseph, libc-alpha, libc-ports, thomas, kkojima, Andreas.Krebbel
On Tue, May 29, 2012 at 8:15 PM, David Miller <davem@davemloft.net> wrote:
> From: David Miller <davem@davemloft.net>
> Date: Tue, 29 May 2012 20:39:04 -0400 (EDT)
>
>> From: "H.J. Lu" <hjl.tools@gmail.com>
>> Date: Tue, 29 May 2012 17:29:14 -0700
>>
>>> I rebased hjl/abi branch. Has anyone verified it on sparc, powerpc an s390x?
>>
>> I've started some sparc tests right now.
>
> Ok, sparc looks fine.
Thanks.
--
H.J.
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: RFA: Port maintainers: Convert WORDSIZE[32|64]/ld to abi-variants
2012-05-30 0:29 ` H.J. Lu
2012-05-30 0:39 ` David Miller
@ 2012-05-30 8:49 ` Andreas Krebbel
2012-05-30 13:00 ` H.J. Lu
2012-05-31 15:17 ` Joseph S. Myers
2 siblings, 1 reply; 21+ messages in thread
From: Andreas Krebbel @ 2012-05-30 8:49 UTC (permalink / raw)
To: H.J. Lu; +Cc: Joseph S. Myers, GNU C Library, libc-ports
On 05/30/2012 02:29 AM, H.J. Lu wrote:
> On Sat, May 26, 2012 at 12:22 PM, Joseph S. Myers
> <joseph@codesourcery.com> wrote:
>> On Sat, 26 May 2012, H.J. Lu wrote:
>>
>>> I restored sh and sparc entries in shlib-versions on hjl/abi branch.
>>> The new patch is at
>>>
>>> http://sourceware.org/git/?p=glibc.git;a=patch;h=0d1f492b3cf83a200601c1f49734b048c5547e57
>>
>> Provided the new version passes architecture maintainer testing I think it
>> will probably be OK for 2.16, given the comments Roland requested saying
>> that the use of soname variables set in makefiles is wrong and a bug filed
>> with a 2.17 milestone to get this cleaned up properly along the lines I
>> proposed (naming ABI variants, not triplets, in shlib-versions, with all
>> the architecture information in shlib-versions moving to appropriate
>> sysdeps directories shared by all the ABI variants of each architecture).
>>
>
> I rebased hjl/abi branch. Has anyone verified it on sparc, powerpc an s390x?
I've tested your patch on s390 and s390x. No regressions.
Bye,
-Andreas-
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: RFA: Port maintainers: Convert WORDSIZE[32|64]/ld to abi-variants
2012-05-30 8:49 ` Andreas Krebbel
@ 2012-05-30 13:00 ` H.J. Lu
0 siblings, 0 replies; 21+ messages in thread
From: H.J. Lu @ 2012-05-30 13:00 UTC (permalink / raw)
To: Andreas Krebbel
Cc: Joseph S. Myers, GNU C Library, libc-ports, Adhemerval Zanella
On Wed, May 30, 2012 at 1:49 AM, Andreas Krebbel
<krebbel@linux.vnet.ibm.com> wrote:
> On 05/30/2012 02:29 AM, H.J. Lu wrote:
>> On Sat, May 26, 2012 at 12:22 PM, Joseph S. Myers
>> <joseph@codesourcery.com> wrote:
>>> On Sat, 26 May 2012, H.J. Lu wrote:
>>>
>>>> I restored sh and sparc entries in shlib-versions on hjl/abi branch.
>>>> The new patch is at
>>>>
>>>> http://sourceware.org/git/?p=glibc.git;a=patch;h=0d1f492b3cf83a200601c1f49734b048c5547e57
>>>
>>> Provided the new version passes architecture maintainer testing I think it
>>> will probably be OK for 2.16, given the comments Roland requested saying
>>> that the use of soname variables set in makefiles is wrong and a bug filed
>>> with a 2.17 milestone to get this cleaned up properly along the lines I
>>> proposed (naming ABI variants, not triplets, in shlib-versions, with all
>>> the architecture information in shlib-versions moving to appropriate
>>> sysdeps directories shared by all the ABI variants of each architecture).
>>>
>>
>> I rebased hjl/abi branch. Has anyone verified it on sparc, powerpc an s390x?
>
> I've tested your patch on s390 and s390x. No regressions.
>
> Bye,
>
> -Andreas-
>
Adhemerval,
Can you test hjl/abi branch on powerpc?
Thanks.
--
H.J.
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: RFA: Port maintainers: Convert WORDSIZE[32|64]/ld to abi-variants
2012-05-26 17:03 ` Joseph S. Myers
2012-05-26 17:51 ` H.J. Lu
@ 2012-05-30 18:58 ` Thomas Schwinge
2012-05-30 19:00 ` H.J. Lu
1 sibling, 1 reply; 21+ messages in thread
From: Thomas Schwinge @ 2012-05-30 18:58 UTC (permalink / raw)
To: Joseph S. Myers, H.J. Lu; +Cc: GNU C Library, libc-ports, Kaz Kojima
[-- Attachment #1: Type: text/plain, Size: 654 bytes --]
Hi!
On Sat, 26 May 2012 17:02:58 +0000, "Joseph S. Myers" <joseph@codesourcery.com> wrote:
> On Sat, 26 May 2012, H.J. Lu wrote:
>
> > 1. For non-biarch architectures, there is nothing to do.
>
> This patch is removing the ld=ld-linux.so.2 entry for sh.*-.*-linux.*,
> which looks like a mistake; I don't see it added anywhere else.
Thanks for catching that. (I used the current version of the hjl/abi
branch, 0ab0291b84b45f2389a019af2c88bf5169d14f64.)
> We could probably do with each libc architecture maintainer confirming
> that their ABI tests still pass after the changes.
No issues found for SH.
Grüße,
Thomas
[-- Attachment #2: Type: application/pgp-signature, Size: 489 bytes --]
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: RFA: Port maintainers: Convert WORDSIZE[32|64]/ld to abi-variants
2012-05-30 18:58 ` Thomas Schwinge
@ 2012-05-30 19:00 ` H.J. Lu
0 siblings, 0 replies; 21+ messages in thread
From: H.J. Lu @ 2012-05-30 19:00 UTC (permalink / raw)
To: Thomas Schwinge; +Cc: Joseph S. Myers, GNU C Library, libc-ports, Kaz Kojima
On Wed, May 30, 2012 at 11:57 AM, Thomas Schwinge
<thomas@codesourcery.com> wrote:
> Hi!
>
> On Sat, 26 May 2012 17:02:58 +0000, "Joseph S. Myers" <joseph@codesourcery.com> wrote:
>> On Sat, 26 May 2012, H.J. Lu wrote:
>>
>> > 1. For non-biarch architectures, there is nothing to do.
>>
>> This patch is removing the ld=ld-linux.so.2 entry for sh.*-.*-linux.*,
>> which looks like a mistake; I don't see it added anywhere else.
>
> Thanks for catching that. (I used the current version of the hjl/abi
> branch, 0ab0291b84b45f2389a019af2c88bf5169d14f64.)
>
>
>> We could probably do with each libc architecture maintainer confirming
>> that their ABI tests still pass after the changes.
>
> No issues found for SH.
hjl/abi branch has been merged into master.
---
H.J.
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: RFA: Port maintainers: Convert WORDSIZE[32|64]/ld to abi-variants
2012-05-30 0:29 ` H.J. Lu
2012-05-30 0:39 ` David Miller
2012-05-30 8:49 ` Andreas Krebbel
@ 2012-05-31 15:17 ` Joseph S. Myers
2012-05-31 15:32 ` H.J. Lu
2 siblings, 1 reply; 21+ messages in thread
From: Joseph S. Myers @ 2012-05-31 15:17 UTC (permalink / raw)
To: H.J. Lu
Cc: GNU C Library, libc-ports, Thomas Schwinge, Kaz Kojima,
Andreas Krebbel, David Miller
HJ, I don't see how default-abi gets set for powerpc, s390 or sparc - I
think you're missing appropriate settings in six sysdeps makefiles for
those.
The setting in Makeconfig
ifdef abi-variants
ifndef default-abi
default-abi = $(firstword $(abi-variants))
endif
endif
isn't going to be effective - Makerules includes $(sysdep-makefiles)
*after* it includes Makeconfig, so abi-variants won't be set at that
point. And it would be wrong for half the ABIs if it was effective.
I see a file "stubs-.h" installed on powerpc because of this.
--
Joseph S. Myers
joseph@codesourcery.com
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: RFA: Port maintainers: Convert WORDSIZE[32|64]/ld to abi-variants
2012-05-31 15:17 ` Joseph S. Myers
@ 2012-05-31 15:32 ` H.J. Lu
2012-06-01 14:06 ` Joseph S. Myers
0 siblings, 1 reply; 21+ messages in thread
From: H.J. Lu @ 2012-05-31 15:32 UTC (permalink / raw)
To: Joseph S. Myers
Cc: GNU C Library, libc-ports, Thomas Schwinge, Kaz Kojima,
Andreas Krebbel, David Miller
On Thu, May 31, 2012 at 8:17 AM, Joseph S. Myers
<joseph@codesourcery.com> wrote:
> HJ, I don't see how default-abi gets set for powerpc, s390 or sparc - I
> think you're missing appropriate settings in six sysdeps makefiles for
> those.
>
> The setting in Makeconfig
>
> ifdef abi-variants
> ifndef default-abi
> default-abi = $(firstword $(abi-variants))
> endif
> endif
This should be removed then and powerpc, s390 or sparc
should define default-abi. But I don't know them well enough
to add it myself.
>
> isn't going to be effective - Makerules includes $(sysdep-makefiles)
> *after* it includes Makeconfig, so abi-variants won't be set at that
> point. And it would be wrong for half the ABIs if it was effective.
>
> I see a file "stubs-.h" installed on powerpc because of this.
>
--
H.J.
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: RFA: Port maintainers: Convert WORDSIZE[32|64]/ld to abi-variants
2012-05-31 15:32 ` H.J. Lu
@ 2012-06-01 14:06 ` Joseph S. Myers
2012-06-01 14:21 ` H.J. Lu
0 siblings, 1 reply; 21+ messages in thread
From: Joseph S. Myers @ 2012-06-01 14:06 UTC (permalink / raw)
To: H.J. Lu
Cc: GNU C Library, libc-ports, Thomas Schwinge, Kaz Kojima,
Andreas Krebbel, David Miller
On Thu, 31 May 2012, H.J. Lu wrote:
> On Thu, May 31, 2012 at 8:17 AM, Joseph S. Myers
> <joseph@codesourcery.com> wrote:
> > HJ, I don't see how default-abi gets set for powerpc, s390 or sparc - I
> > think you're missing appropriate settings in six sysdeps makefiles for
> > those.
> >
> > The setting in Makeconfig
> >
> > ifdef abi-variants
> > ifndef default-abi
> > default-abi = $(firstword $(abi-variants))
> > endif
> > endif
>
> This should be removed then and powerpc, s390 or sparc
> should define default-abi. But I don't know them well enough
> to add it myself.
Here is the (untested) patch I propose to add the default-abi definitions
so that these architectures again install the correct stubs-<abi>.h
instead of "stubs-.h".
2012-06-01 Joseph Myers <joseph@codesourcery.com>
* sysdeps/unix/sysv/linux/powerpc/powerpc32/Makefile
(default-abi): New variable.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/Makefile: New file.
* sysdeps/unix/sysv/linux/s390/s390-32/Makefile (default-abi): New
variable.
* sysdeps/unix/sysv/linux/s390/s390-64/Makefile (default-abi):
Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc32/Makefile (default-abi):
Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc64/Makefile (default-abi):
Likewise.
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/Makefile b/sysdeps/unix/sysv/linux/powerpc/powerpc32/Makefile
index 966a768..9e25d37 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/Makefile
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/Makefile
@@ -1,3 +1,5 @@
+default-abi := 32
+
ifeq ($(subdir),resource)
sysdep_routines += oldgetrlimit64
endif
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/Makefile b/sysdeps/unix/sysv/linux/powerpc/powerpc64/Makefile
new file mode 100644
index 0000000..c8991d3
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/Makefile
@@ -0,0 +1 @@
+default-abi := 64
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/Makefile b/sysdeps/unix/sysv/linux/s390/s390-32/Makefile
index a509c93..02a5edc 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-32/Makefile
+++ b/sysdeps/unix/sysv/linux/s390/s390-32/Makefile
@@ -1,3 +1,5 @@
+default-abi := 32
+
ifeq ($(subdir),login)
sysdep_routines += utmp32 utmpx32
libutil-routines += login32
diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/Makefile b/sysdeps/unix/sysv/linux/s390/s390-64/Makefile
index 283361b..413b016 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-64/Makefile
+++ b/sysdeps/unix/sysv/linux/s390/s390-64/Makefile
@@ -1,3 +1,5 @@
+default-abi := 64
+
ifeq ($(subdir),misc)
sysdep_headers += sys/elf.h
endif
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/Makefile b/sysdeps/unix/sysv/linux/sparc/sparc32/Makefile
index 8f7e76b..95dbb9c 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc32/Makefile
+++ b/sysdeps/unix/sysv/linux/sparc/sparc32/Makefile
@@ -1,3 +1,5 @@
+default-abi := 32
+
asm-CPPFLAGS = -D__ASSEMBLY__
ASFLAGS-.os += -fPIC
LD += -melf32_sparc
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/Makefile b/sysdeps/unix/sysv/linux/sparc/sparc64/Makefile
index df4533a..bc36ca4 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/Makefile
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/Makefile
@@ -1,2 +1,4 @@
+default-abi := 64
+
sysdep-CFLAGS += -fcall-used-g6
LD += -melf64_sparc
--
Joseph S. Myers
joseph@codesourcery.com
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: RFA: Port maintainers: Convert WORDSIZE[32|64]/ld to abi-variants
2012-06-01 14:06 ` Joseph S. Myers
@ 2012-06-01 14:21 ` H.J. Lu
2012-06-01 15:07 ` Joseph S. Myers
0 siblings, 1 reply; 21+ messages in thread
From: H.J. Lu @ 2012-06-01 14:21 UTC (permalink / raw)
To: Joseph S. Myers
Cc: GNU C Library, libc-ports, Thomas Schwinge, Kaz Kojima,
Andreas Krebbel, David Miller
On Fri, Jun 1, 2012 at 7:06 AM, Joseph S. Myers <joseph@codesourcery.com> wrote:
> On Thu, 31 May 2012, H.J. Lu wrote:
>
>> On Thu, May 31, 2012 at 8:17 AM, Joseph S. Myers
>> <joseph@codesourcery.com> wrote:
>> > HJ, I don't see how default-abi gets set for powerpc, s390 or sparc - I
>> > think you're missing appropriate settings in six sysdeps makefiles for
>> > those.
>> >
>> > The setting in Makeconfig
>> >
>> > ifdef abi-variants
>> > ifndef default-abi
>> > default-abi = $(firstword $(abi-variants))
>> > endif
>> > endif
>>
>> This should be removed then and powerpc, s390 or sparc
>> should define default-abi. But I don't know them well enough
>> to add it myself.
>
> Here is the (untested) patch I propose to add the default-abi definitions
> so that these architectures again install the correct stubs-<abi>.h
> instead of "stubs-.h".
>
Can you also remove
ifdef abi-variants
ifndef default-abi
default-abi = $(firstword $(abi-variants))
endif
endif
in Makeconfig?
Thanks.
--
H.J.
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: RFA: Port maintainers: Convert WORDSIZE[32|64]/ld to abi-variants
2012-06-01 14:21 ` H.J. Lu
@ 2012-06-01 15:07 ` Joseph S. Myers
2012-06-01 15:27 ` H.J. Lu
0 siblings, 1 reply; 21+ messages in thread
From: Joseph S. Myers @ 2012-06-01 15:07 UTC (permalink / raw)
To: H.J. Lu
Cc: GNU C Library, libc-ports, Thomas Schwinge, Kaz Kojima,
Andreas Krebbel, David Miller
On Fri, 1 Jun 2012, H.J. Lu wrote:
> > Here is the (untested) patch I propose to add the default-abi definitions
> > so that these architectures again install the correct stubs-<abi>.h
> > instead of "stubs-.h".
>
> Can you also remove
>
> ifdef abi-variants
> ifndef default-abi
> default-abi = $(firstword $(abi-variants))
> endif
> endif
>
> in Makeconfig?
Here is a patch for that. Tested x86_64.
2012-06-01 Joseph Myers <joseph@codesourcery.com>
* Makeconfig [abi-variants && !default-abi] (default-abi): Remove
definition. Document in comment.
diff --git a/Makeconfig b/Makeconfig
index df7545f..cba5db7 100644
--- a/Makeconfig
+++ b/Makeconfig
@@ -797,13 +797,8 @@ ifeq (yes, $(build-shared))
# defines 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.
-
-ifdef abi-variants
-ifndef default-abi
-default-abi = $(firstword $(abi-variants))
-endif
-endif
+# suffice. default-abi is defined to be the ABI for the current glibc
+# build.
ifndef abi-includes
abi-includes := bits/wordsize.h
--
Joseph S. Myers
joseph@codesourcery.com
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: RFA: Port maintainers: Convert WORDSIZE[32|64]/ld to abi-variants
2012-06-01 15:07 ` Joseph S. Myers
@ 2012-06-01 15:27 ` H.J. Lu
2012-06-01 20:16 ` Joseph S. Myers
0 siblings, 1 reply; 21+ messages in thread
From: H.J. Lu @ 2012-06-01 15:27 UTC (permalink / raw)
To: Joseph S. Myers
Cc: GNU C Library, libc-ports, Thomas Schwinge, Kaz Kojima,
Andreas Krebbel, David Miller
On Fri, Jun 1, 2012 at 8:06 AM, Joseph S. Myers <joseph@codesourcery.com> wrote:
> On Fri, 1 Jun 2012, H.J. Lu wrote:
>
>> > Here is the (untested) patch I propose to add the default-abi definitions
>> > so that these architectures again install the correct stubs-<abi>.h
>> > instead of "stubs-.h".
>>
>> Can you also remove
>>
>> ifdef abi-variants
>> ifndef default-abi
>> default-abi = $(firstword $(abi-variants))
>> endif
>> endif
>>
>> in Makeconfig?
>
> Here is a patch for that. Tested x86_64.
>
> 2012-06-01 Joseph Myers <joseph@codesourcery.com>
>
> * Makeconfig [abi-variants && !default-abi] (default-abi): Remove
> definition. Document in comment.
>
> diff --git a/Makeconfig b/Makeconfig
> index df7545f..cba5db7 100644
> --- a/Makeconfig
> +++ b/Makeconfig
> @@ -797,13 +797,8 @@ ifeq (yes, $(build-shared))
> # defines 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.
> -
> -ifdef abi-variants
> -ifndef default-abi
> -default-abi = $(firstword $(abi-variants))
> -endif
> -endif
> +# suffice. default-abi is defined to be the ABI for the current glibc
> +# build.
>
> ifndef abi-includes
> abi-includes := bits/wordsize.h
>
Looks good to me.
Thanks.
--
H.J.
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: RFA: Port maintainers: Convert WORDSIZE[32|64]/ld to abi-variants
2012-06-01 15:27 ` H.J. Lu
@ 2012-06-01 20:16 ` Joseph S. Myers
2012-06-01 20:32 ` Roland McGrath
0 siblings, 1 reply; 21+ messages in thread
From: Joseph S. Myers @ 2012-06-01 20:16 UTC (permalink / raw)
To: H.J. Lu
Cc: GNU C Library, libc-ports, Thomas Schwinge, Kaz Kojima,
Andreas Krebbel, David Miller
[-- Attachment #1: Type: TEXT/PLAIN, Size: 501 bytes --]
On Fri, 1 Jun 2012, H.J. Lu wrote:
> > Here is a patch for that. Tested x86_64.
> >
> > 2012-06-01 Joseph Myers <joseph@codesourcery.com>
> >
> > * Makeconfig [abi-variants && !default-abi] (default-abi): Remove
> > definition. Document in comment.
[...]
>
> Looks good to me.
Any comments on the patch to sysdeps makefiles, which is the one actually
needed to fix the installation of stubs.h for those architectures?
--
Joseph S. Myers
joseph@codesourcery.com
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: RFA: Port maintainers: Convert WORDSIZE[32|64]/ld to abi-variants
2012-06-01 20:16 ` Joseph S. Myers
@ 2012-06-01 20:32 ` Roland McGrath
0 siblings, 0 replies; 21+ messages in thread
From: Roland McGrath @ 2012-06-01 20:32 UTC (permalink / raw)
To: Joseph S. Myers
Cc: H.J. Lu, GNU C Library, libc-ports, Thomas Schwinge, Kaz Kojima,
Andreas Krebbel, David Miller
> Any comments on the patch to sysdeps makefiles, which is the one actually
> needed to fix the installation of stubs.h for those architectures?
Those changes look fine to me, though comments wouldn't hurt (they can just
refer to Makeconfig, I guess). Of course, it's the powerpc, sparc, and
s390 maintainers whose reactions really matter. But since the status quo
now is that we've regressed the situation for them and this fairly
obviously fixes it or at least won't make it worse, I don't think you need
to wait for everybody to chime in.
Thanks,
Roland
^ permalink raw reply [flat|nested] 21+ messages in thread
end of thread, other threads:[~2012-06-01 20:32 UTC | newest]
Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-26 13:37 RFA: Port maintainers: Convert WORDSIZE[32|64]/ld to abi-variants H.J. Lu
2012-05-26 17:03 ` Joseph S. Myers
2012-05-26 17:51 ` H.J. Lu
2012-05-26 19:22 ` Joseph S. Myers
2012-05-26 20:42 ` H.J. Lu
2012-05-30 0:29 ` H.J. Lu
2012-05-30 0:39 ` David Miller
2012-05-30 3:15 ` David Miller
2012-05-30 3:27 ` H.J. Lu
2012-05-30 8:49 ` Andreas Krebbel
2012-05-30 13:00 ` H.J. Lu
2012-05-31 15:17 ` Joseph S. Myers
2012-05-31 15:32 ` H.J. Lu
2012-06-01 14:06 ` Joseph S. Myers
2012-06-01 14:21 ` H.J. Lu
2012-06-01 15:07 ` Joseph S. Myers
2012-06-01 15:27 ` H.J. Lu
2012-06-01 20:16 ` Joseph S. Myers
2012-06-01 20:32 ` Roland McGrath
2012-05-30 18:58 ` Thomas Schwinge
2012-05-30 19:00 ` H.J. Lu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).