[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commits] r18819 - in /fsf/trunk/libc: ./ include/ nptl/ scripts/ sysdeps/unix/ sysdeps/unix/sysv/linux/ sysdeps/unix/sysv/linux/i386/...



Author: eglibc
Date: Wed May 30 19:14:51 2012
New Revision: 18819

Log:
Import glibc-mainline for 2012-05-30

Added:
    fsf/trunk/libc/sysdeps/unix/sysv/linux/i386/Implies
    fsf/trunk/libc/sysdeps/unix/sysv/linux/x86/
    fsf/trunk/libc/sysdeps/unix/sysv/linux/x86/Makefile
    fsf/trunk/libc/sysdeps/unix/sysv/linux/x86_64/64/Makefile
Removed:
    fsf/trunk/libc/include/stubs-biarch.h
Modified:
    fsf/trunk/libc/ChangeLog
    fsf/trunk/libc/Makeconfig
    fsf/trunk/libc/Makefile
    fsf/trunk/libc/NEWS
    fsf/trunk/libc/configure
    fsf/trunk/libc/configure.in
    fsf/trunk/libc/nptl/ChangeLog
    fsf/trunk/libc/scripts/abilist.awk
    fsf/trunk/libc/scripts/lib-names.awk
    fsf/trunk/libc/scripts/soversions.awk
    fsf/trunk/libc/shlib-versions
    fsf/trunk/libc/sysdeps/unix/make-syscalls.sh
    fsf/trunk/libc/sysdeps/unix/sysv/linux/Makefile
    fsf/trunk/libc/sysdeps/unix/sysv/linux/ftruncate64.c
    fsf/trunk/libc/sysdeps/unix/sysv/linux/i386/Makefile
    fsf/trunk/libc/sysdeps/unix/sysv/linux/kernel-features.h
    fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/Makefile
    fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/ftruncate64.c
    fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/truncate64.c
    fsf/trunk/libc/sysdeps/unix/sysv/linux/s390/Makefile
    fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/Makefile
    fsf/trunk/libc/sysdeps/unix/sysv/linux/truncate64.c
    fsf/trunk/libc/sysdeps/unix/sysv/linux/x86_64/Implies
    fsf/trunk/libc/sysdeps/unix/sysv/linux/x86_64/Makefile
    fsf/trunk/libc/sysdeps/unix/sysv/linux/x86_64/bits/typesizes.h
    fsf/trunk/libc/sysdeps/unix/sysv/linux/x86_64/x32/Makefile
    fsf/trunk/libc/sysdeps/x86_64/64/shlib-versions
    fsf/trunk/libc/sysdeps/x86_64/x32/shlib-versions

Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Wed May 30 19:14:51 2012
@@ -1,45 +1,95 @@
-2012-05-30  Andreas Schwab  <schwab@xxxxxxxxxxxxxx>
-
-	[BZ #14132]
-	* nptl-init.c (pthread_functions): Remove use of INTUSE and
-	_internal aliases.
-	(__pthread_initialize_minimal_internal): Likewise.
-	* sem_open.c: Likewise.
-	* sem_unlink.c: Likewise.
-	* pthreadP.h: Replace _internal aliases by hidden_proto
-	declarations.
-	* pthread_getspecific.c: Replace _internal alias by hidden_def.
-	* pthread_key_create.c: Likewise.
-	* pthread_mutex_destroy.c: Likewise.
-	* pthread_mutex_init.c: Likewise.
-	* pthread_mutex_lock.c: Likewise.
-	* pthread_mutex_unlock.c: Likewise.
-	* pthread_once.c: Likewise.
-	* pthread_rwlock_rdlock.c: Likewise.
-	* pthread_rwlock_unlock.c: Likewise.
-	* pthread_rwlock_wrlock.c: Likewise.
-	* pthread_setspecific.c: Likewise.
-	* sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
-	Likewise.
-	* sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
-	Likewise.
-	* sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
-	Likewise.
-	* sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
-	* sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
-	* sysdeps/unix/sysv/linux/s390/pthread_once.c: Likewise.
-	* sysdeps/unix/sysv/linux/sh/pthread_once.S: Likewise.
-	* sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
-	* sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
-	* sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
-	* sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
-	* sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
-	* sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
-	Likewise.
-	* sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
-	Likewise.
-	* sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
-	Likewise.
+2012-05-30  H.J. Lu  <hongjiu.lu@xxxxxxxxx>
+
+	[BZ #14183]
+	* sysdeps/unix/sysv/linux/x86_64/bits/typesizes.h (__NLINK_T_TYPE):
+	Defined with __UWORD_TYPE if __x86_64__ isn't defined.
+
+2012-05-30  Richard Henderson  <rth@xxxxxxxxxxx>
+
+	* sysdeps/unix/make-syscalls.sh: Protect symbol_version output
+	with #ifndef NOT_IN_libc.
+
+	* scripts/abilist.awk: Accept 8 fields.  Handle Alpha functions
+	marked to avoid plt entry.
+
+2012-05-30  H.J. Lu  <hongjiu.lu@xxxxxxxxx>
+
+	[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 i.86/s390x/powerpc64 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.
+	* sysdeps/x86_64/64/shlib-versions: Remove ld entry.
+	* sysdeps/x86_64/x32/shlib-versions: Likewise.
+
+2012-05-30  Joseph Myers  <joseph@xxxxxxxxxxxxxxxx>
+
+	* sysdeps/unix/sysv/linux/kernel-features.h
+	(__ASSUME_TRUNCATE64_SYSCALL): Remove all definitions.
+	* sysdeps/unix/sysv/linux/ftruncate64.c: Do not
+	include <kernel-features.h>.
+	[!__NR_ftruncate64]: Remove conditional code.
+	[!__ASSUME_TRUNCATE64_SYSCALL]: Likewise.
+	[__NR_ftruncate64]: Make code unconditional.
+	[__ASSUME_TRUNCATE64_SYSCALL]: Likewise.
+	* sysdeps/unix/sysv/linux/truncate64.c: Do not
+	include <kernel-features.h>.
+	[!__NR_ftruncate64]: Remove conditional code.
+	[!__ASSUME_TRUNCATE64_SYSCALL]: Likewise.
+	[__NR_ftruncate64]: Make code unconditional.
+	[__ASSUME_TRUNCATE64_SYSCALL]: Likewise.
+	* sysdeps/unix/sysv/linux/powerpc/powerpc32/ftruncate64.c: Do not
+	include <kernel-features.h>.
+	[!__NR_ftruncate64]: Remove conditional code.
+	[!__ASSUME_TRUNCATE64_SYSCALL]: Likewise.
+	[__NR_ftruncate64]: Make code unconditional.
+	[__ASSUME_TRUNCATE64_SYSCALL]: Likewise.
+	* sysdeps/unix/sysv/linux/powerpc/powerpc32/truncate64.c: Do not
+	include <kernel-features.h>.
+	[!__NR_ftruncate64]: Remove conditional code.
+	[!__ASSUME_TRUNCATE64_SYSCALL]: Likewise.
+	[__NR_ftruncate64]: Make code unconditional.
+	[__ASSUME_TRUNCATE64_SYSCALL]: Likewise.
+
+	* configure.in (libc_cv_fpie): Weaken to a compile test using
+	LIBC_TRY_CC_OPTION.
+	* configure: Regenerated.
 
 2012-05-29  Andreas Krebbel  <Andreas.Krebbel@xxxxxxxxxx>
 

Modified: fsf/trunk/libc/Makeconfig
==============================================================================
--- fsf/trunk/libc/Makeconfig (original)
+++ fsf/trunk/libc/Makeconfig Wed May 30 19:14:51 2012
@@ -791,6 +791,24 @@
 	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 @@
 	       -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.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

Modified: fsf/trunk/libc/Makefile
==============================================================================
--- fsf/trunk/libc/Makefile (original)
+++ fsf/trunk/libc/Makefile Wed May 30 19:14:51 2012
@@ -170,14 +170,29 @@
 
 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
-
-$(inst_includedir)/gnu/stubs.h: include/stubs-biarch.h $(+force)
+installed-stubs = $(inst_includedir)/gnu/stubs-$(default-abi).h
+
+$(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

Modified: fsf/trunk/libc/NEWS
==============================================================================
--- fsf/trunk/libc/NEWS (original)
+++ fsf/trunk/libc/NEWS Wed May 30 19:14:51 2012
@@ -27,8 +27,14 @@
   13916, 13917, 13918, 13919, 13920, 13921, 13922, 13923, 13924, 13926,
   13927, 13928, 13938, 13941, 13942, 13954, 13955, 13956, 13963, 13967,
   13968, 13970, 13973, 13979, 13983, 13986, 14012, 14027, 14033, 14034,
-  14036, 14040, 14043, 14044, 14049, 14053, 14055, 14059, 14064, 14080,
-  14083, 14103, 14104, 14109, 14122, 14123, 14153
+  14036, 14040, 14043, 14044, 14049, 14053, 14055, 14059, 14064, 14075,
+  14080, 14083, 14103, 14104, 14109, 14112, 14122, 14123, 14153, 14183
+
+* Support for the x32 ABI on x86-64 added.  The x32 target is selected by
+  configuring glibc with:
+	BUILD_CC='gcc' CC='gcc -mx32' CXX='g++ -mx32'
+  Visit <http://sites.google.com/site/x32abi/> for more x32 ABI info.
+  Implemented by H.J. Lu.
 
 * ISO C11 support:
 

Modified: fsf/trunk/libc/configure
==============================================================================
--- fsf/trunk/libc/configure (original)
+++ fsf/trunk/libc/configure Wed May 30 19:14:51 2012
@@ -6490,23 +6490,17 @@
 if ${libc_cv_fpie+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  cat > conftest.c <<EOF
-int foo;
-main () { return 0;}
-EOF
-if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS -pie -fpie
-			    -o conftest conftest.c 1>&5'
+  if { ac_try='${CC-cc} -fpie -xc /dev/null -S -o /dev/null'
   { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
   (eval $ac_try) 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; }
-then
+  test $ac_status = 0; }; }; then :
   libc_cv_fpie=yes
 else
   libc_cv_fpie=no
 fi
-rm -f conftest*
+
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_fpie" >&5
 $as_echo "$libc_cv_fpie" >&6; }

Modified: fsf/trunk/libc/configure.in
==============================================================================
--- fsf/trunk/libc/configure.in (original)
+++ fsf/trunk/libc/configure.in Wed May 30 19:14:51 2012
@@ -1618,18 +1618,8 @@
 AC_SUBST(libc_cv_z_execstack)
 
 AC_CACHE_CHECK(for -fpie, libc_cv_fpie, [dnl
-cat > conftest.c <<EOF
-int foo;
-main () { return 0;}
-EOF
-if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS -pie -fpie
-			    -o conftest conftest.c 1>&AS_MESSAGE_LOG_FD])
-then
-  libc_cv_fpie=yes
-else
-  libc_cv_fpie=no
-fi
-rm -f conftest*])
+LIBC_TRY_CC_OPTION([-fpie], [libc_cv_fpie=yes], [libc_cv_fpie=no])
+])
 
 AC_SUBST(libc_cv_fpie)
 

Removed: fsf/trunk/libc/include/stubs-biarch.h
==============================================================================
--- fsf/trunk/libc/include/stubs-biarch.h (original)
+++ fsf/trunk/libc/include/stubs-biarch.h (removed)
@@ -1,12 +1,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

Modified: fsf/trunk/libc/nptl/ChangeLog
==============================================================================
--- fsf/trunk/libc/nptl/ChangeLog (original)
+++ fsf/trunk/libc/nptl/ChangeLog Wed May 30 19:14:51 2012
@@ -1,3 +1,46 @@
+2012-05-30  Andreas Schwab  <schwab@xxxxxxxxxxxxxx>
+
+	[BZ #14132]
+	* nptl-init.c (pthread_functions): Remove use of INTUSE and
+	_internal aliases.
+	(__pthread_initialize_minimal_internal): Likewise.
+	* sem_open.c: Likewise.
+	* sem_unlink.c: Likewise.
+	* pthreadP.h: Replace _internal aliases by hidden_proto
+	declarations.
+	* pthread_getspecific.c: Replace _internal alias by hidden_def.
+	* pthread_key_create.c: Likewise.
+	* pthread_mutex_destroy.c: Likewise.
+	* pthread_mutex_init.c: Likewise.
+	* pthread_mutex_lock.c: Likewise.
+	* pthread_mutex_unlock.c: Likewise.
+	* pthread_once.c: Likewise.
+	* pthread_rwlock_rdlock.c: Likewise.
+	* pthread_rwlock_unlock.c: Likewise.
+	* pthread_rwlock_wrlock.c: Likewise.
+	* pthread_setspecific.c: Likewise.
+	* sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
+	Likewise.
+	* sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
+	Likewise.
+	* sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
+	Likewise.
+	* sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
+	* sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
+	* sysdeps/unix/sysv/linux/s390/pthread_once.c: Likewise.
+	* sysdeps/unix/sysv/linux/sh/pthread_once.S: Likewise.
+	* sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
+	* sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
+	* sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
+	* sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
+	* sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
+	* sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
+	Likewise.
+	* sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
+	Likewise.
+	* sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
+	Likewise.
+
 2012-05-27  Chung-Lin Tang  <cltang@xxxxxxxxxxxxxxxx>
 
 	* sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO, LOAD_ARGS_1)

Modified: fsf/trunk/libc/scripts/abilist.awk
==============================================================================
--- fsf/trunk/libc/scripts/abilist.awk (original)
+++ fsf/trunk/libc/scripts/abilist.awk Wed May 30 19:14:51 2012
@@ -37,14 +37,15 @@
 # Skip locals.
 $2 == "l" { next }
 
-$2 == "g" || $2 == "w" && NF == 7 {
+# If the target uses ST_OTHER, it will be output before the symbol name.
+$2 == "g" || $2 == "w" && (NF == 7 || NF == 8) {
   weak = $2;
   type = $3;
   size = $5;
   sub(/^0*/, "", size);
   size = " 0x" size;
   version = $6;
-  symbol = $7;
+  symbol = $NF;
   gsub(/[()]/, "", version);
 
   if (version == "GLIBC_PRIVATE") next;
@@ -59,6 +60,12 @@
     if (seen_opd < 0)
       type = "O";
     seen_opd = 1;
+  }
+  else if (type == "D" && NF == 8 && $7 == "0x80") {
+    # Alpha functions avoiding plt entry in users
+    type = "F";
+    size = "";
+    seen_opd = -1;
   }
   else if ($4 == "*ABS*") {
     type = "A";

Modified: fsf/trunk/libc/scripts/lib-names.awk
==============================================================================
--- fsf/trunk/libc/scripts/lib-names.awk (original)
+++ fsf/trunk/libc/scripts/lib-names.awk Wed May 30 19:14:51 2012
@@ -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 @@
 }
 
 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;
+    pfx = multi ? "# define " : "#define ";
+    printf("%-40s%s\n", pfx x[2], macros[elt]);
   }
-
-  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";
-  }
-  else {
-    cmd = "LC_ALL=C sort"; print lines["DEFAULT"] | cmd; close(cmd);
-  }
-
-  print "";
-  print "#endif	/* gnu/lib-names.h */"
 }

Modified: fsf/trunk/libc/scripts/soversions.awk
==============================================================================
--- fsf/trunk/libc/scripts/soversions.awk (original)
+++ fsf/trunk/libc/scripts/soversions.awk Wed May 30 19:14:51 2012
@@ -6,17 +6,6 @@
 }
 
 { 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) {

Modified: fsf/trunk/libc/shlib-versions
==============================================================================
--- fsf/trunk/libc/shlib-versions (original)
+++ fsf/trunk/libc/shlib-versions Wed May 30 19:14:51 2012
@@ -18,28 +18,12 @@
 # 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
 # -------------		---------------		------------------------------
 
 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
 # -------------		----------		-----------------------------
@@ -70,12 +54,9 @@
 .*-.*-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
 

Modified: fsf/trunk/libc/sysdeps/unix/make-syscalls.sh
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/make-syscalls.sh (original)
+++ fsf/trunk/libc/sysdeps/unix/make-syscalls.sh Wed May 30 19:14:51 2012
@@ -76,6 +76,7 @@
       *@@*)
 	base=`echo $name | sed 's/@@.*//'`
 	ver=`echo $name | sed 's/.*@@//'`
+	echo "	 echo '#ifndef NOT_IN_libc'; \\"
 	if test -z "$vcount" ; then
 	  source=$strong
 	  vcount=1
@@ -85,10 +86,14 @@
 	  echo "	 echo 'strong_alias ($strong, $source)'; \\"
 	fi
 	echo "	 echo 'default_symbol_version($source, $base, $ver)'; \\"
+	echo "	 echo '#else'; \\"
+	echo "	 echo 'strong_alias ($strong, $base)'; \\"
+	echo "	 echo '#endif'; \\"
 	;;
       *@*)
 	base=`echo $name | sed 's/@.*//'`
 	ver=`echo $name | sed 's/.*@//'`
+	echo "	 echo '#ifndef NOT_IN_libc'; \\"
 	if test -z "$vcount" ; then
 	  source=$strong
 	  vcount=1
@@ -98,6 +103,7 @@
 	  echo "	 echo 'strong_alias ($strong, $source)'; \\"
 	fi
 	echo "	 echo 'symbol_version ($source, $base, $ver)'; \\"
+	echo "	 echo '#endif'; \\"
 	;;
       !*)
 	name=`echo $name | sed 's/.//'`

Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/Makefile
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/Makefile (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/Makefile Wed May 30 19:14:51 2012
@@ -43,24 +43,13 @@
 # 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 @@
 	 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).

Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/ftruncate64.c
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/ftruncate64.c (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/ftruncate64.c Wed May 30 19:14:51 2012
@@ -1,5 +1,4 @@
-/* Copyright (C) 1997,1998,1999,2000,2001,2003,2005,2006,2011
-	 Free Software Foundation, Inc.
+/* Copyright (C) 1997-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -24,53 +23,14 @@
 #include <sysdep.h>
 #include <sys/syscall.h>
 
-#include <kernel-features.h>
-
-#ifdef __NR_ftruncate64
-#ifndef __ASSUME_TRUNCATE64_SYSCALL
-/* The variable is shared between all wrappers around *truncate64 calls.  */
-extern int __have_no_truncate64;
-#endif
-
-
 /* Truncate the file referenced by FD to LENGTH bytes.  */
 int
 __ftruncate64 (int fd, off64_t length)
 {
-#ifndef __ASSUME_TRUNCATE64_SYSCALL
-  if (! __have_no_truncate64)
-#endif
-    {
-      unsigned int low = length & 0xffffffff;
-      unsigned int high = length >> 32;
-#ifndef __ASSUME_TRUNCATE64_SYSCALL
-      int saved_errno = errno;
-#endif
-      int result = INLINE_SYSCALL (ftruncate64, 3, fd,
-				   __LONG_LONG_PAIR (high, low));
-#ifndef __ASSUME_TRUNCATE64_SYSCALL
-      if (result != -1 || errno != ENOSYS)
-#endif
-	return result;
-
-#ifndef __ASSUME_TRUNCATE64_SYSCALL
-      __set_errno (saved_errno);
-      __have_no_truncate64 = 1;
-#endif
-    }
-
-#ifndef __ASSUME_TRUNCATE64_SYSCALL
-  if ((off_t) length != length)
-    {
-      __set_errno (EINVAL);
-      return -1;
-    }
-  return __ftruncate (fd, (off_t) length);
-#endif
+  unsigned int low = length & 0xffffffff;
+  unsigned int high = length >> 32;
+  int result = INLINE_SYSCALL (ftruncate64, 3, fd,
+			       __LONG_LONG_PAIR (high, low));
+  return result;
 }
 weak_alias (__ftruncate64, ftruncate64)
-
-#else
-/* Use the generic implementation.  */
-# include <misc/ftruncate64.c>
-#endif

Added: fsf/trunk/libc/sysdeps/unix/sysv/linux/i386/Implies
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/i386/Implies (added)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/i386/Implies Wed May 30 19:14:51 2012
@@ -1,0 +1,1 @@
+unix/sysv/linux/x86

Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/i386/Makefile
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/i386/Makefile (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/i386/Makefile Wed May 30 19:14:51 2012
@@ -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

Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/kernel-features.h
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/kernel-features.h (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/kernel-features.h Wed May 30 19:14:51 2012
@@ -40,11 +40,6 @@
 /* The sendfile syscall was introduced in 2.2.0.  */
 #define __ASSUME_SENDFILE		1
 
-/* On x86 the truncate64/ftruncate64 syscalls were introduced in 2.3.31.  */
-#ifdef __i386__
-# define __ASSUME_TRUNCATE64_SYSCALL	1
-#endif
-
 /* On x86 the mmap2 syscall was introduced in 2.3.31.  */
 #ifdef __i386__
 # define __ASSUME_MMAP2_SYSCALL	1
@@ -55,10 +50,9 @@
 # define __ASSUME_STAT64_SYSCALL	1
 #endif
 
-/* On sparc the truncate64/ftruncate64/mmap2/stat64/lstat64/fstat64
-   syscalls were introduced in 2.3.35.  */
+/* On sparc the mmap2/stat64/lstat64/fstat64 syscalls were introduced
+   in 2.3.35.  */
 #if defined __sparc__ && !defined __arch64__
-# define __ASSUME_TRUNCATE64_SYSCALL	1
 # define __ASSUME_MMAP2_SYSCALL		1
 # define __ASSUME_STAT64_SYSCALL	1
 #endif
@@ -66,7 +60,6 @@
 /* I know for sure that these are in 2.3.35 on powerpc. But PowerPC64 does not
    support separate 64-bit syscalls, already 64-bit.  */
 #if defined __powerpc__ && !defined __powerpc64__
-# define __ASSUME_TRUNCATE64_SYSCALL	1
 # define __ASSUME_STAT64_SYSCALL	1
 #endif
 
@@ -77,9 +70,8 @@
 # define __ASSUME_IPC64		1
 #endif
 
-/* SH kernels got stat64, mmap2, and truncate64 during 2.4.0-test.  */
+/* SH kernels got stat64 and mmap2 during 2.4.0-test.  */
 #ifdef __sh__
-# define __ASSUME_TRUNCATE64_SYSCALL	1
 # define __ASSUME_MMAP2_SYSCALL		1
 # define __ASSUME_STAT64_SYSCALL	1
 #endif

Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/Makefile
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/Makefile (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/Makefile Wed May 30 19:14:51 2012
@@ -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

Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/ftruncate64.c
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/ftruncate64.c (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/ftruncate64.c Wed May 30 19:14:51 2012
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997-2002,2005,2006,2011 Free Software Foundation, Inc.
+/* Copyright (C) 1997-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -22,56 +22,17 @@
 #include <sysdep.h>
 #include <sys/syscall.h>
 
-#include <kernel-features.h>
-
-#ifdef __NR_ftruncate64
-#ifndef __ASSUME_TRUNCATE64_SYSCALL
-/* The variable is shared between all wrappers around *truncate64 calls.  */
-extern int __have_no_truncate64;
-#endif
-
-
 /* Truncate the file referenced by FD to LENGTH bytes.  */
 int
 __ftruncate64 (fd, length)
      int fd;
      off64_t length;
 {
-#ifndef __ASSUME_TRUNCATE64_SYSCALL
-  if (! __have_no_truncate64)
-#endif
-    {
-#ifndef __ASSUME_TRUNCATE64_SYSCALL
-      int saved_errno = errno;
-#endif
-      /* On PPC32 64bit values are aligned in odd/even register pairs.  */
-      int result = INLINE_SYSCALL (ftruncate64, 4, fd, 0,
-				   (long) (length >> 32),
-				   (long) length);
+  /* On PPC32 64bit values are aligned in odd/even register pairs.  */
+  int result = INLINE_SYSCALL (ftruncate64, 4, fd, 0,
+			       (long) (length >> 32),
+			       (long) length);
 
-#ifndef __ASSUME_TRUNCATE64_SYSCALL
-      if (result != -1 || errno != ENOSYS)
-#endif
-	return result;
-
-#ifndef __ASSUME_TRUNCATE64_SYSCALL
-      __set_errno (saved_errno);
-      __have_no_truncate64 = 1;
-#endif
-    }
-
-#ifndef __ASSUME_TRUNCATE64_SYSCALL
-  if ((off_t) length != length)
-    {
-      __set_errno (EINVAL);
-      return -1;
-    }
-  return __ftruncate (fd, (off_t) length);
-#endif
+  return result;
 }
 weak_alias (__ftruncate64, ftruncate64)
-
-#else
-/* Use the generic implementation.  */
-# include <misc/ftruncate64.c>
-#endif

Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/truncate64.c
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/truncate64.c (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/truncate64.c Wed May 30 19:14:51 2012
@@ -1,5 +1,4 @@
-/* Copyright (C) 1997,1998,1999,2000,2002,2005,2006,2011
-	Free Software Foundation, Inc.
+/* Copyright (C) 1997-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -24,55 +23,15 @@
 #include <sys/syscall.h>
 #include <bp-checks.h>
 
-#include <kernel-features.h>
-
-#ifdef __NR_truncate64
-#ifndef __ASSUME_TRUNCATE64_SYSCALL
-/* The variable is shared between all wrappers around *truncate64 calls.  */
-int __have_no_truncate64;
-#endif
-
-
 /* Truncate the file referenced by FD to LENGTH bytes.  */
 int
 truncate64 (path, length)
      const char *path;
      off64_t length;
 {
-#ifndef __ASSUME_TRUNCATE64_SYSCALL
-  if (! __have_no_truncate64)
-#endif
-    {
-#ifndef __ASSUME_TRUNCATE64_SYSCALL
-      int saved_errno = errno;
-#endif
-      /* On PPC32 64bit values are aligned in odd/even register pairs.  */
-      int result = INLINE_SYSCALL (truncate64, 4, CHECK_STRING (path), 0,
-				   (long) (length >> 32),
-				   (long) length);
-
-#ifndef __ASSUME_TRUNCATE64_SYSCALL
-      if (result != -1 || errno != ENOSYS)
-#endif
-	return result;
-
-#ifndef __ASSUME_TRUNCATE64_SYSCALL
-      __set_errno (saved_errno);
-      __have_no_truncate64 = 1;
-#endif
-    }
-
-#ifndef __ASSUME_TRUNCATE64_SYSCALL
-  if ((off_t) length != length)
-    {
-      __set_errno (EINVAL);
-      return -1;
-    }
-  return __truncate (path, (off_t) length);
-#endif
+  /* On PPC32 64bit values are aligned in odd/even register pairs.  */
+  int result = INLINE_SYSCALL (truncate64, 4, CHECK_STRING (path), 0,
+			       (long) (length >> 32),
+			       (long) length);
+  return result;
 }
-
-#else
-/* Use the generic implementation.  */
-# include <misc/truncate64.c>
-#endif

Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/s390/Makefile
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/s390/Makefile (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/s390/Makefile Wed May 30 19:14:51 2012
@@ -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

Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/Makefile
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/Makefile (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/Makefile Wed May 30 19:14:51 2012
@@ -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

Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/truncate64.c
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/truncate64.c (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/truncate64.c Wed May 30 19:14:51 2012
@@ -1,5 +1,4 @@
-/* Copyright (C) 1997-2000,2003,2004,2005,2006,2011
-	Free Software Foundation, Inc.
+/* Copyright (C) 1997-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -25,51 +24,13 @@
 #include <sys/syscall.h>
 #include <bp-checks.h>
 
-#include <kernel-features.h>
-
-#ifdef __NR_truncate64
-#ifndef __ASSUME_TRUNCATE64_SYSCALL
-/* The variable is shared between all wrappers around *truncate64 calls.  */
-int __have_no_truncate64;
-#endif
-
 /* Truncate the file referenced by FD to LENGTH bytes.  */
 int
 truncate64 (const char *path, off64_t length)
 {
-#ifndef __ASSUME_TRUNCATE64_SYSCALL
-  if (! __have_no_truncate64)
-#endif
-    {
-      unsigned int low = length & 0xffffffff;
-      unsigned int high = length >> 32;
-#ifndef __ASSUME_TRUNCATE64_SYSCALL
-      int saved_errno = errno;
-#endif
-      int result = INLINE_SYSCALL (truncate64, 3, CHECK_STRING (path),
-				   __LONG_LONG_PAIR (high, low));
-#ifndef __ASSUME_TRUNCATE64_SYSCALL
-      if (result != -1 || errno != ENOSYS)
-#endif
-	return result;
-
-#ifndef __ASSUME_TRUNCATE64_SYSCALL
-      __set_errno (saved_errno);
-      __have_no_truncate64 = 1;
-#endif
-    }
-
-#ifndef __ASSUME_TRUNCATE64_SYSCALL
-  if ((off_t) length != length)
-    {
-      __set_errno (EINVAL);
-      return -1;
-    }
-  return __truncate (path, (off_t) length);
-#endif
+  unsigned int low = length & 0xffffffff;
+  unsigned int high = length >> 32;
+  int result = INLINE_SYSCALL (truncate64, 3, CHECK_STRING (path),
+			       __LONG_LONG_PAIR (high, low));
+  return result;
 }
-
-#else
-/* Use the generic implementation.  */
-# include <misc/truncate64.c>
-#endif

Added: fsf/trunk/libc/sysdeps/unix/sysv/linux/x86/Makefile
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/x86/Makefile (added)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/x86/Makefile Wed May 30 19:14:51 2012
@@ -1,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

Added: fsf/trunk/libc/sysdeps/unix/sysv/linux/x86_64/64/Makefile
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/x86_64/64/Makefile (added)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/x86_64/64/Makefile Wed May 30 19:14:51 2012
@@ -1,0 +1,2 @@
+# The default ABI is 64.
+default-abi := 64

Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/x86_64/Implies
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/x86_64/Implies (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/x86_64/Implies Wed May 30 19:14:51 2012
@@ -1,1 +1,2 @@
+unix/sysv/linux/x86
 unix/sysv/linux/wordsize-64

Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/x86_64/Makefile
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/x86_64/Makefile (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/x86_64/Makefile Wed May 30 19:14:51 2012
@@ -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

Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/x86_64/bits/typesizes.h
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/x86_64/bits/typesizes.h (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/x86_64/bits/typesizes.h Wed May 30 19:14:51 2012
@@ -41,7 +41,11 @@
 #define __INO_T_TYPE		__SYSCALL_ULONG_TYPE
 #define __INO64_T_TYPE		__UQUAD_TYPE
 #define __MODE_T_TYPE		__U32_TYPE
-#define __NLINK_T_TYPE		__SYSCALL_ULONG_TYPE
+#ifdef __x86_64__
+# define __NLINK_T_TYPE		__SYSCALL_ULONG_TYPE
+#else
+# define __NLINK_T_TYPE		__UWORD_TYPE
+#endif
 #define __OFF_T_TYPE		__SYSCALL_SLONG_TYPE
 #define __OFF64_T_TYPE		__SQUAD_TYPE
 #define __PID_T_TYPE		__S32_TYPE

Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/x86_64/x32/Makefile
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/x86_64/x32/Makefile (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/x86_64/x32/Makefile Wed May 30 19:14:51 2012
@@ -1,3 +1,6 @@
+# The default ABI is x32.
+default-abi := x32
+
 ifeq ($(subdir),misc)
 sysdep_routines += arch_prctl
 endif

Modified: fsf/trunk/libc/sysdeps/x86_64/64/shlib-versions
==============================================================================
--- fsf/trunk/libc/sysdeps/x86_64/64/shlib-versions (original)
+++ fsf/trunk/libc/sysdeps/x86_64/64/shlib-versions Wed May 30 19:14:51 2012
@@ -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

Modified: fsf/trunk/libc/sysdeps/x86_64/x32/shlib-versions
==============================================================================
--- fsf/trunk/libc/sysdeps/x86_64/x32/shlib-versions (original)
+++ fsf/trunk/libc/sysdeps/x86_64/x32/shlib-versions Wed May 30 19:14:51 2012
@@ -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
 # -------------		----------		-----------------------------

_______________________________________________
Commits mailing list
Commits@xxxxxxxxxx
http://eglibc.org/cgi-bin/mailman/listinfo/commits