diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2014-08-30 23:23:41 +0400 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2014-08-30 23:23:41 +0400 |
commit | d6177bbbd17ddd3f837485f6cb59e24fbc7f82c5 (patch) | |
tree | 009c30637db1e59410942e9f447f9e310da859e5 /scripts | |
parent | 411498f0cc1bfe8762a4d999ac2761a70c305113 (diff) | |
parent | 344e61df0200af758e794b9843ffb37bd89e5259 (diff) | |
download | glibc-d6177bbbd17ddd3f837485f6cb59e24fbc7f82c5.tar.gz |
Merge branch 'release/2.19/master' of git://sourceware.org/git/glibc
Conflicts:
configure.in
include/features.h
io/ftw.c
malloc/arena.c
malloc/malloc.c
malloc/mtrace.c
nptl/allocatestack.c
nptl/nptl-init.c
nptl/pthread_attr_init.c
nptl/pthread_create.c
nptl/pthread_detach.c
nptl/pthread_getschedparam.c
nptl/pthread_setschedparam.c
nptl/pthread_setschedprio.c
nptl/pthread_timedjoin.c
nptl/pthread_tryjoin.c
nptl/sysdeps/unix/sysv/linux/fork.h
nptl/sysdeps/unix/sysv/linux/register-atfork.c
nptl/sysdeps/unix/sysv/linux/unregister-atfork.c
nptl/sysdeps/x86_64/tls.h
nscd/Makefile
sysdeps/unix/inet/syscalls.list
sysdeps/unix/opendir.c
sysdeps/x86_64/multiarch/strcasestr-nonascii.c
Diffstat (limited to 'scripts')
36 files changed, 1442 insertions, 1193 deletions
diff --git a/scripts/abilist.awk b/scripts/abilist.awk index 1c1d41d053..6d58f6663b 100644 --- a/scripts/abilist.awk +++ b/scripts/abilist.awk @@ -81,7 +81,7 @@ $2 == "g" || $2 == "w" && (NF == 7 || NF == 8) { type = "F"; size = ""; } - else if (type == "iD" && $4 == ".text") { + else if (type == "iD" && ($4 == ".text" || $4 == ".opd")) { # Indirect functions. type = "F"; size = ""; diff --git a/scripts/bench.pl b/scripts/bench.pl new file mode 100755 index 0000000000..569cd5156a --- /dev/null +++ b/scripts/bench.pl @@ -0,0 +1,205 @@ +#! /usr/bin/perl -w +# Copyright (C) 2013-2014 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 +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. + +# The GNU C Library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. + +# You should have received a copy of the GNU Lesser General Public +# License along with the GNU C Library; if not, see +# <http://www.gnu.org/licenses/>. + + +use strict; +use warnings; +# Generate a benchmark source file for a given input. + +if (@ARGV < 1) { + die "Usage: bench.pl <function>" +} + +my $func = $ARGV[0]; +my @args; +my $ret = "void"; +my $getret = ""; + +# We create a hash of inputs for each variant of the test. +my $variant = ""; +my @curvals; +my %vals; +my @include_headers; +my @include_sources; +my $incl; + +open INPUTS, "<$func-inputs" or die $!; + +LINE:while (<INPUTS>) { + chomp; + + # Directives. + if (/^## ([\w-]+): (.*)/) { + # Function argument types. + if ($1 eq "args") { + @args = split(":", $2); + } + + # Function return type. + elsif ($1 eq "ret") { + $ret = $2; + } + + elsif ($1 eq "includes") { + @include_headers = split (",", $2); + } + + elsif ($1 eq "include-sources") { + @include_sources = split (",", $2); + } + + # New variant. This is the only directive allowed in the body of the + # inputs to separate inputs into variants. All others should be at the + # top or else all hell will break loose. + elsif ($1 eq "name") { + + # Save values in the previous variant. + my @copy = @curvals; + $vals{$variant} = \@copy; + + # Prepare for the next. + $variant=$2; + undef @curvals; + next LINE; + } + + else { + die "Unknown directive: ".$1; + } + } + + # Skip over comments and blank lines. + if (/^#/ || /^$/) { + next LINE; + } + push (@curvals, $_); +} + + +my $bench_func = "#define CALL_BENCH_FUNC(v, i) $func ("; + +# Output variables. These include the return value as well as any pointers +# that may get passed into the function, denoted by the <> around the type. +my $outvars = ""; + +if ($ret ne "void") { + $outvars = "static $ret volatile ret;\n"; +} + +# Print the definitions and macros. +foreach $incl (@include_headers) { + print "#include <" . $incl . ">\n"; +} + +# Print the source files. +foreach $incl (@include_sources) { + print "#include \"" . $incl . "\"\n"; +} + +if (@args > 0) { + # Save values in the last variant. + $vals{$variant} = \@curvals; + my $struct = + "struct _variants + { + const char *name; + int count; + struct args *in; + };\n"; + + my $arg_struct = "struct args {"; + + my $num = 0; + my $arg; + foreach $arg (@args) { + if ($num > 0) { + $bench_func = "$bench_func,"; + } + + $_ = $arg; + if (/<(.*)\*>/) { + # Output variables. These have to be pointers, so dereference once by + # dropping one *. + $outvars = $outvars . "static $1 out$num;\n"; + $bench_func = "$bench_func &out$num"; + } + else { + $arg_struct = "$arg_struct $arg volatile arg$num;"; + $bench_func = "$bench_func variants[v].in[i].arg$num"; + } + + $num = $num + 1; + } + + $arg_struct = $arg_struct . "};\n"; + $bench_func = $bench_func . ");\n"; + + print $bench_func; + print $arg_struct; + print $struct; + + my $c = 0; + my $key; + + # Print the input arrays. + foreach $key (keys %vals) { + my @arr = @{$vals{$key}}; + + print "struct args in" . $c . "[" . @arr . "] = {\n"; + foreach (@arr) { + print "{$_},\n"; + } + print "};\n\n"; + $c += 1; + } + + # The variants. Each variant then points to the appropriate input array we + # defined above. + print "struct _variants variants[" . (keys %vals) . "] = {\n"; + $c = 0; + foreach $key (keys %vals) { + print "{\"$func($key)\", " . @{$vals{$key}} . ", in$c},\n"; + $c += 1; + } + print "};\n\n"; + # Finally, print the last set of macros. + print "#define NUM_VARIANTS $c\n"; + print "#define NUM_SAMPLES(i) (variants[i].count)\n"; + print "#define VARIANT(i) (variants[i].name)\n"; +} +else { + print $bench_func . ");\n"; + print "#define NUM_VARIANTS (1)\n"; + print "#define NUM_SAMPLES(v) (1)\n"; + print "#define VARIANT(v) FUNCNAME \"()\"\n" +} + +# Print the output variable definitions. +print "$outvars\n"; + +# In some cases not storing a return value seems to result in the function call +# being optimized out. +if ($ret ne "void") { + $getret = "ret = "; +} + +# And we're done. +print "#define BENCH_FUNC(i, j) ({$getret CALL_BENCH_FUNC (i, j);})\n"; + +print "#define FUNCNAME \"$func\"\n"; +print "#include \"bench-skeleton.c\"\n"; diff --git a/scripts/check-c++-types.sh b/scripts/check-c++-types.sh index 12fc45f88e..cb47c7b7fa 100755 --- a/scripts/check-c++-types.sh +++ b/scripts/check-c++-types.sh @@ -1,5 +1,5 @@ #! /bin/bash -# Copyright (C) 2003, 2005, 2006, 2007 Free Software Foundation, Inc. +# Copyright (C) 2003-2014 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 diff --git a/scripts/check-local-headers.sh b/scripts/check-local-headers.sh index 08ed880c5d..9bffed321f 100755 --- a/scripts/check-local-headers.sh +++ b/scripts/check-local-headers.sh @@ -1,5 +1,5 @@ #! /bin/bash -# Copyright (C) 2005,2007,2009,2011 Free Software Foundation, Inc. +# Copyright (C) 2005-2014 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,13 +22,18 @@ objpfx="$2" # To avoid long paths. cd "$objpfx" +# OK if *.os is missing. +shopt -s nullglob + # Search all dependency files for file names in the include directory. # There are a few system headers we are known to use. +# These include Linux kernel headers (asm*, arch, and linux), +# and Mach kernel headers (mach). exec ${AWK} -v includedir="$includedir" ' BEGIN { status = 0 exclude = "^" includedir \ - "/(.*-.*-.*/|)(asm[-/]|linux/|selinux/|gd|nss3/|sys/capability\\.h|libaudit\\.h)" + "/(.*-.*-.*/|)(asm[-/]|arch|linux/|selinux/|mach/|gd|nss3/|c\\+\\+/|sys/(capability|sdt(|-config))\\.h|libaudit\\.h)" } /^[^ ]/ && $1 ~ /.*:/ { obj = $1 } { diff --git a/scripts/config.guess b/scripts/config.guess index b78e65d3a9..ebdc4233a9 100755 --- a/scripts/config.guess +++ b/scripts/config.guess @@ -1,14 +1,12 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, -# 2011, 2012 Free Software Foundation, Inc. +# Copyright 1992-2013 Free Software Foundation, Inc. -timestamp='2012-01-01' +timestamp='2013-11-29' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but @@ -17,26 +15,22 @@ timestamp='2012-01-01' # General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. +# along with this program; if not, see <http://www.gnu.org/licenses/>. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - - -# Originally written by Per Bothner. Please send patches (context -# diff format) to <config-patches@gnu.org> and include a ChangeLog -# entry. +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). # -# This script attempts to guess a canonical system name similar to -# config.sub. If it succeeds, it prints the system name on stdout, and -# exits with 0. Otherwise, it exits with 1. +# Originally written by Per Bothner. # # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD +# +# Please send patches with a ChangeLog entry to config-patches@gnu.org. + me=`echo "$0" | sed -e 's,.*/,,'` @@ -56,9 +50,7 @@ version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 -Free Software Foundation, Inc. +Copyright 1992-2013 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -140,6 +132,27 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown +case "${UNAME_SYSTEM}" in +Linux|GNU|GNU/*) + # If the system lacks a compiler, then just pick glibc. + # We could probably try harder. + LIBC=gnu + + eval $set_cc_for_build + cat <<-EOF > $dummy.c + #include <features.h> + #if defined(__UCLIBC__) + LIBC=uclibc + #elif defined(__dietlibc__) + LIBC=dietlibc + #else + LIBC=gnu + #endif + EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` + ;; +esac + # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in @@ -202,6 +215,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit ;; + *:Bitrig:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} + exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} @@ -304,7 +321,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; - arm:riscos:*:*|arm:RISCOS:*:*) + arm*:riscos:*:*|arm*:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) @@ -803,6 +820,9 @@ EOF i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; + *:MINGW64*:*) + echo ${UNAME_MACHINE}-pc-mingw64 + exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; @@ -854,7 +874,7 @@ EOF exit ;; *:GNU:*:*) # the GNU system - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/kOpenSolaris:*:*) # other systems with GNU libc and userland @@ -862,11 +882,18 @@ EOF exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland - echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; + aarch64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + aarch64_be:Linux:*:*) + UNAME_MACHINE=aarch64_be + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; @@ -878,62 +905,57 @@ EOF EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} + if test "$?" = 0 ; then LIBC="gnulibc1" ; fi + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + arc:Linux:*:* | arceb:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then - echo ${UNAME_MACHINE}-unknown-linux-gnueabi + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi else - echo ${UNAME_MACHINE}-unknown-linux-gnueabihf + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf fi fi exit ;; avr32*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; cris:Linux:*:*) - echo ${UNAME_MACHINE}-axis-linux-gnu + echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; crisv32:Linux:*:*) - echo ${UNAME_MACHINE}-axis-linux-gnu + echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; frv:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; hexagon:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; i*86:Linux:*:*) - LIBC=gnu - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #ifdef __dietlibc__ - LIBC=dietlibc - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` - echo "${UNAME_MACHINE}-pc-linux-${LIBC}" + echo ${UNAME_MACHINE}-pc-linux-${LIBC} exit ;; ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m32r*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build @@ -952,54 +974,63 @@ EOF #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } ;; + or1k:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; or32:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; padre:Linux:*:*) - echo sparc-unknown-linux-gnu + echo sparc-unknown-linux-${LIBC} exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu + echo hppa64-unknown-linux-${LIBC} exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-gnu ;; - PA8*) echo hppa2.0-unknown-linux-gnu ;; - *) echo hppa-unknown-linux-gnu ;; + PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; + PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; + *) echo hppa-unknown-linux-${LIBC} ;; esac exit ;; ppc64:Linux:*:*) - echo powerpc64-unknown-linux-gnu + echo powerpc64-unknown-linux-${LIBC} exit ;; ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu + echo powerpc-unknown-linux-${LIBC} + exit ;; + ppc64le:Linux:*:*) + echo powerpc64le-unknown-linux-${LIBC} + exit ;; + ppcle:Linux:*:*) + echo powerpcle-unknown-linux-${LIBC} exit ;; s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux + echo ${UNAME_MACHINE}-ibm-linux-${LIBC} exit ;; sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; tile*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; vax:Linux:*:*) - echo ${UNAME_MACHINE}-dec-linux-gnu + echo ${UNAME_MACHINE}-dec-linux-${LIBC} exit ;; x86_64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; xtensa*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. @@ -1203,6 +1234,9 @@ EOF BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; + x86_64:Haiku:*:*) + echo x86_64-unknown-haiku + exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; @@ -1238,19 +1272,31 @@ EOF exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - case $UNAME_PROCESSOR in - i386) - eval $set_cc_for_build - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then - if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - UNAME_PROCESSOR="x86_64" - fi - fi ;; - unknown) UNAME_PROCESSOR=powerpc ;; - esac + eval $set_cc_for_build + if test "$UNAME_PROCESSOR" = unknown ; then + UNAME_PROCESSOR=powerpc + fi + if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + case $UNAME_PROCESSOR in + i386) UNAME_PROCESSOR=x86_64 ;; + powerpc) UNAME_PROCESSOR=powerpc64 ;; + esac + fi + fi + elif test "$UNAME_PROCESSOR" = i386 ; then + # Avoid executing cc on OS X 10.9, as it ships with a stub + # that puts up a graphical alert prompting to install + # developer tools. Any system running Mac OS X 10.7 or + # later (Darwin 11 and later) is required to have a 64-bit + # processor. This is not true of the ARM version of Darwin + # that Apple uses in portable devices. + UNAME_PROCESSOR=x86_64 + fi echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) @@ -1267,7 +1313,7 @@ EOF NEO-?:NONSTOP_KERNEL:*:*) echo neo-tandem-nsk${UNAME_RELEASE} exit ;; - NSE-?:NONSTOP_KERNEL:*:*) + NSE-*:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) @@ -1336,11 +1382,11 @@ EOF i*86:AROS:*:*) echo ${UNAME_MACHINE}-pc-aros exit ;; + x86_64:VMkernel:*:*) + echo ${UNAME_MACHINE}-unknown-esx + exit ;; esac -#echo '(No uname command or uname output not recognized.)' 1>&2 -#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 - eval $set_cc_for_build cat >$dummy.c <<EOF #ifdef _SEQUENT_ diff --git a/scripts/config.sub b/scripts/config.sub index a5d4b3e7a3..54e3b8d967 100755 --- a/scripts/config.sub +++ b/scripts/config.sub @@ -1,38 +1,31 @@ #! /bin/sh # Configuration validation subroutine script. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, -# 2011, 2012 Free Software Foundation, Inc. +# Copyright 1992-2013 Free Software Foundation, Inc. -timestamp='2012-01-28' +timestamp='2013-10-01' -# This file is (in principle) common to ALL GNU software. -# The presence of a machine in this file suggests that SOME GNU software -# can handle that machine. It does not imply ALL GNU software can. -# -# This file is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# This file is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. +# along with this program; if not, see <http://www.gnu.org/licenses/>. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). -# Please send patches to <config-patches@gnu.org>. Submit a context -# diff and a properly formatted GNU ChangeLog entry. +# Please send patches with a ChangeLog entry to config-patches@gnu.org. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. @@ -75,9 +68,7 @@ Report bugs and patches to <config-patches@gnu.org>." version="\ GNU config.sub ($timestamp) -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 -Free Software Foundation, Inc. +Copyright 1992-2013 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -125,7 +116,7 @@ esac maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ - linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ + linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ knetbsd*-gnu* | netbsd*-gnu* | \ kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) @@ -158,7 +149,7 @@ case $os in -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis | -knuth | -cray | -microblaze) + -apple | -axis | -knuth | -cray | -microblaze*) os= basic_machine=$1 ;; @@ -227,6 +218,12 @@ case $os in -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; + -lynx*178) + os=-lynxos178 + ;; + -lynx*5) + os=-lynxos5 + ;; -lynx*) os=-lynxos ;; @@ -251,13 +248,16 @@ case $basic_machine in # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ + | aarch64 | aarch64_be \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ - | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ - | be32 | be64 \ + | arc | arceb \ + | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ + | avr | avr32 \ + | be32 | be64 \ | bfin \ - | c4x | clipper \ + | c4x | c8051 | clipper \ | d10v | d30v | dlx | dsp16xx \ | epiphany \ | fido | fr30 | frv \ @@ -265,10 +265,11 @@ case $basic_machine in | hexagon \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ + | k1om \ | le32 | le64 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | maxq | mb | microblaze | mcore | mep | metag \ + | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ @@ -286,16 +287,17 @@ case $basic_machine in | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ + | mipsr5900 | mipsr5900el \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nds32 | nds32le | nds32be \ - | nios | nios2 \ + | nios | nios2 | nios2eb | nios2el \ | ns16k | ns32k \ | open8 \ - | or32 \ + | or1k | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle \ | pyramid \ @@ -323,7 +325,7 @@ case $basic_machine in c6x) basic_machine=tic6x-unknown ;; - m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip) + m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) basic_machine=$basic_machine-unknown os=-none ;; @@ -362,15 +364,16 @@ case $basic_machine in # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ + | aarch64-* | aarch64_be-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | be32-* | be64-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \ - | clipper-* | craynv-* | cydra-* \ + | c8051-* | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ @@ -379,11 +382,13 @@ case $basic_machine in | hexagon-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ + | k1om-* \ | le32-* | le64-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ + | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ + | microblaze-* | microblazeel-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ @@ -401,12 +406,13 @@ case $basic_machine in | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipsr5900-* | mipsr5900el-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nds32-* | nds32le-* | nds32be-* \ - | nios-* | nios2-* \ + | nios-* | nios2-* | nios2eb-* | nios2el-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | open8-* \ | orion-* \ @@ -798,11 +804,15 @@ case $basic_machine in basic_machine=ns32k-utek os=-sysv ;; - microblaze) + microblaze*) basic_machine=microblaze-xilinx ;; + mingw64) + basic_machine=x86_64-pc + os=-mingw64 + ;; mingw32) - basic_machine=i386-pc + basic_machine=i686-pc os=-mingw32 ;; mingw32ce) @@ -842,7 +852,7 @@ case $basic_machine in basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; msys) - basic_machine=i386-pc + basic_machine=i686-pc os=-msys ;; mvs) @@ -1041,7 +1051,11 @@ case $basic_machine in basic_machine=i586-unknown os=-pw32 ;; - rdos) + rdos | rdos64) + basic_machine=x86_64-pc + os=-rdos + ;; + rdos32) basic_machine=i386-pc os=-rdos ;; @@ -1379,21 +1393,21 @@ case $os in -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ - | -sym* | -kopensolaris* \ + | -sym* | -kopensolaris* | -plan9* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ - | -openbsd* | -solidbsd* \ + | -bitrig* | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* \ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -linux-android* \ - | -linux-newlib* | -linux-uclibc* \ + | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ + | -linux-newlib* | -linux-musl* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ @@ -1525,9 +1539,6 @@ case $os in -aros*) os=-aros ;; - -kaos*) - os=-kaos - ;; -zvmoe) os=-zvmoe ;; @@ -1576,6 +1587,12 @@ case $basic_machine in c4x-* | tic4x-*) os=-coff ;; + c8051-*) + os=-elf + ;; + hexagon-*) + os=-elf + ;; tic54x-*) os=-coff ;; @@ -1619,6 +1636,9 @@ case $basic_machine in mips*-*) os=-elf ;; + or1k-*) + os=-elf + ;; or32-*) os=-coff ;; diff --git a/scripts/cross-test-ssh.sh b/scripts/cross-test-ssh.sh new file mode 100755 index 0000000000..405ae999f5 --- /dev/null +++ b/scripts/cross-test-ssh.sh @@ -0,0 +1,136 @@ +#! /bin/bash +# Run a testcase on a remote system, via ssh. +# Copyright (C) 2012-2014 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 +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. + +# The GNU C Library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. + +# You should have received a copy of the GNU Lesser General Public +# License along with the GNU C Library; if not, see +# <http://www.gnu.org/licenses/>. + +# usage: cross-test-ssh.sh [--ssh SSH] HOST COMMAND ... +# Run with --help flag to get more detailed help. + +progname="$(basename $0)" +env_blacklist='HOME LOGNAME MAIL PATH SHELL SHLVL SSH_CLIENT SSH_CONNECTION +USER TERM TERMCAP PWD' + +usage="usage: ${progname} [--ssh SSH] HOST COMMAND ..." +help="Run a glibc test COMMAND on the remote machine HOST, via ssh, +passing environment variables, preserving the current working directory, +and respecting quoting. + +If the '--ssh SSH' flag is present, use SSH as the SSH command, +instead of ordinary 'ssh'. + +To use this to run glibc tests, invoke the tests as follows: + + $ make test-wrapper='ABSPATH/cross-test-ssh.sh HOST' tests + +where ABSPATH is the absolute path to this script, and HOST is the +name of the machine to connect to via ssh. + +If you need to connect to the test machine as a different user, you +may specify that just as you would to SSH: + + $ make test-wrapper='ABSPATH/cross-test-ssh.sh USER@HOST' tests + +Naturally, the remote user must have an appropriate public key, and +you will want to ensure that SSH does not prompt interactively for a +password on each connection. + +HOST and the build machines (on which 'make check' is being run) must +share a filesystem; all files needed by the tests must be visible at +the same paths on both machines. + +${progname} runs COMMAND in the same directory on the HOST that +${progname} itself is run in on the build machine. + +The command and arguments are passed to the remote host in a way that +avoids any further shell substitution or expansion, on the assumption +that the shell on the build machine has already done them +appropriately. + +${progname} propagates the values all environment variables through to +the remote target, except the following: +${env_blacklist}" + +ssh='ssh' +while [ $# -gt 0 ]; do + case "$1" in + + "--ssh") + shift + if [ $# -lt 1 ]; then + break + fi + ssh="$1" + ;; + + "--help") + echo "$usage" + echo "$help" + exit 0 + ;; + + *) + break + ;; + esac + shift +done + +if [ $# -lt 1 ]; then + echo "$usage" >&2 + echo "Type '${progname} --help' for more detailed help." >&2 + exit 1 +fi + +host="$1"; shift + +# Print the sequence of arguments as strings properly quoted for the +# Bourne shell, separated by spaces. +bourne_quote () +{ + local arg qarg + for arg in "$@"; do + qarg=${arg//\'/\'\\\'\'} + echo -n "'$qarg' " + done +} + +# Unset all variables from the blacklist. Then echo all exported +# variables. +blacklist_exports () +{ + (unset ${env_blacklist}; export -p) | sed 's/^declare -x/export/' +} + +# Produce commands to carry over the current environment, less blacklisted +# variables. +exports="$(blacklist_exports)" + +# Transform the current argument list into a properly quoted Bourne shell +# command string. +command="$(bourne_quote "$@")" + +# Add commands to set environment variables and the current directory. +command="${exports} +cd $(bourne_quote "$PWD") +${command}" + +# HOST's sshd simply concatenates its arguments with spaces and +# passes them to some shell. We want to force the use of /bin/sh, +# so we need to re-quote the whole command to ensure it appears as +# the sole argument of the '-c' option. +full_command="$(bourne_quote "${command}")" +$ssh "$host" /bin/sh -c "$full_command" diff --git a/scripts/data/c++-types-alpha-linux-gnu.data b/scripts/data/c++-types-alpha-linux-gnu.data deleted file mode 100644 index f264ed84ba..0000000000 --- a/scripts/data/c++-types-alpha-linux-gnu.data +++ /dev/null @@ -1,67 +0,0 @@ -blkcnt64_t:m -blkcnt_t:j -blksize_t:j -caddr_t:Pc -clockid_t:i -clock_t:l -daddr_t:i -dev_t:m -fd_mask:l -fsblkcnt64_t:l -fsblkcnt_t:i -fsfilcnt64_t:m -fsfilcnt_t:j -fsid_t:8__fsid_t -gid_t:j -id_t:j -ino64_t:m -ino_t:j -int16_t:s -int32_t:i -int64_t:l -int8_t:a -intptr_t:l -key_t:i -loff_t:l -mode_t:j -nlink_t:j -off64_t:l -off_t:l -pid_t:i -pthread_attr_t:14pthread_attr_t -pthread_barrier_t:17pthread_barrier_t -pthread_barrierattr_t:21pthread_barrierattr_t -pthread_cond_t:14pthread_cond_t -pthread_condattr_t:18pthread_condattr_t -pthread_key_t:j -pthread_mutex_t:15pthread_mutex_t -pthread_mutexattr_t:19pthread_mutexattr_t -pthread_once_t:i -pthread_rwlock_t:16pthread_rwlock_t -pthread_rwlockattr_t:20pthread_rwlockattr_t -pthread_spinlock_t:i -pthread_t:m -quad_t:l -register_t:l -rlim64_t:m -rlim_t:m -sigset_t:10__sigset_t -size_t:m -socklen_t:j -ssize_t:l -suseconds_t:l -time_t:l -u_char:h -uid_t:j -uint:j -u_int:j -u_int16_t:t -u_int32_t:j -u_int64_t:m -u_int8_t:h -ulong:m -u_long:m -u_quad_t:m -useconds_t:j -ushort:t -u_short:t diff --git a/scripts/data/c++-types-i386-linux-gnu.data b/scripts/data/c++-types-i386-linux-gnu.data deleted file mode 100644 index fde53bf337..0000000000 --- a/scripts/data/c++-types-i386-linux-gnu.data +++ /dev/null @@ -1,67 +0,0 @@ -blkcnt64_t:x -blkcnt_t:l -blksize_t:l -caddr_t:Pc -clockid_t:i -clock_t:l -daddr_t:i -dev_t:y -fd_mask:l -fsblkcnt64_t:y -fsblkcnt_t:m -fsfilcnt64_t:y -fsfilcnt_t:m -fsid_t:8__fsid_t -gid_t:j -id_t:j -ino64_t:y -ino_t:m -int16_t:s -int32_t:i -int64_t:x -int8_t:a -intptr_t:i -key_t:i -loff_t:x -mode_t:j -nlink_t:j -off64_t:x -off_t:l -pid_t:i -pthread_attr_t:14pthread_attr_t -pthread_barrier_t:17pthread_barrier_t -pthread_barrierattr_t:21pthread_barrierattr_t -pthread_cond_t:14pthread_cond_t -pthread_condattr_t:18pthread_condattr_t -pthread_key_t:j -pthread_mutex_t:15pthread_mutex_t -pthread_mutexattr_t:19pthread_mutexattr_t -pthread_once_t:i -pthread_rwlock_t:16pthread_rwlock_t -pthread_rwlockattr_t:20pthread_rwlockattr_t -pthread_spinlock_t:i -pthread_t:m -quad_t:x -register_t:i -rlim64_t:y -rlim_t:m -sigset_t:10__sigset_t -size_t:j -socklen_t:j -ssize_t:i -suseconds_t:l -time_t:l -u_char:h -uid_t:j -uint:j -u_int:j -u_int16_t:t -u_int32_t:j -u_int64_t:y -u_int8_t:h -ulong:m -u_long:m -u_quad_t:y -useconds_t:j -ushort:t -u_short:t diff --git a/scripts/data/c++-types-ia64-linux-gnu.data b/scripts/data/c++-types-ia64-linux-gnu.data deleted file mode 100644 index 23c11dc41b..0000000000 --- a/scripts/data/c++-types-ia64-linux-gnu.data +++ /dev/null @@ -1,67 +0,0 @@ -blkcnt64_t:l -blkcnt_t:l -blksize_t:l -caddr_t:Pc -clockid_t:i -clock_t:l -daddr_t:i -dev_t:m -fd_mask:l -fsblkcnt64_t:m -fsblkcnt_t:m -fsfilcnt64_t:m -fsfilcnt_t:m -fsid_t:8__fsid_t -gid_t:j -id_t:j -ino64_t:m -ino_t:m -int16_t:s -int32_t:i -int64_t:l -int8_t:a -intptr_t:l -key_t:i -loff_t:l -mode_t:j -nlink_t:m -off64_t:l -off_t:l -pid_t:i -pthread_attr_t:14pthread_attr_t -pthread_barrier_t:17pthread_barrier_t -pthread_barrierattr_t:21pthread_barrierattr_t -pthread_cond_t:14pthread_cond_t -pthread_condattr_t:18pthread_condattr_t -pthread_key_t:j -pthread_mutex_t:15pthread_mutex_t -pthread_mutexattr_t:19pthread_mutexattr_t -pthread_once_t:i -pthread_rwlock_t:16pthread_rwlock_t -pthread_rwlockattr_t:20pthread_rwlockattr_t -pthread_spinlock_t:i -pthread_t:m -quad_t:l -register_t:l -rlim64_t:m -rlim_t:m -sigset_t:10__sigset_t -size_t:m -socklen_t:j -ssize_t:l -suseconds_t:l -time_t:l -u_char:h -uid_t:j -uint:j -u_int:j -u_int16_t:t -u_int32_t:j -u_int64_t:m -u_int8_t:h -ulong:m -u_long:m -u_quad_t:m -useconds_t:j -ushort:t -u_short:t diff --git a/scripts/data/c++-types-powerpc-linux-gnu.data b/scripts/data/c++-types-powerpc-linux-gnu.data deleted file mode 100644 index fde53bf337..0000000000 --- a/scripts/data/c++-types-powerpc-linux-gnu.data +++ /dev/null @@ -1,67 +0,0 @@ -blkcnt64_t:x -blkcnt_t:l -blksize_t:l -caddr_t:Pc -clockid_t:i -clock_t:l -daddr_t:i -dev_t:y -fd_mask:l -fsblkcnt64_t:y -fsblkcnt_t:m -fsfilcnt64_t:y -fsfilcnt_t:m -fsid_t:8__fsid_t -gid_t:j -id_t:j -ino64_t:y -ino_t:m -int16_t:s -int32_t:i -int64_t:x -int8_t:a -intptr_t:i -key_t:i -loff_t:x -mode_t:j -nlink_t:j -off64_t:x -off_t:l -pid_t:i -pthread_attr_t:14pthread_attr_t -pthread_barrier_t:17pthread_barrier_t -pthread_barrierattr_t:21pthread_barrierattr_t -pthread_cond_t:14pthread_cond_t -pthread_condattr_t:18pthread_condattr_t -pthread_key_t:j -pthread_mutex_t:15pthread_mutex_t -pthread_mutexattr_t:19pthread_mutexattr_t -pthread_once_t:i -pthread_rwlock_t:16pthread_rwlock_t -pthread_rwlockattr_t:20pthread_rwlockattr_t -pthread_spinlock_t:i -pthread_t:m -quad_t:x -register_t:i -rlim64_t:y -rlim_t:m -sigset_t:10__sigset_t -size_t:j -socklen_t:j -ssize_t:i -suseconds_t:l -time_t:l -u_char:h -uid_t:j -uint:j -u_int:j -u_int16_t:t -u_int32_t:j -u_int64_t:y -u_int8_t:h -ulong:m -u_long:m -u_quad_t:y -useconds_t:j -ushort:t -u_short:t diff --git a/scripts/data/c++-types-powerpc64-linux-gnu.data b/scripts/data/c++-types-powerpc64-linux-gnu.data deleted file mode 100644 index 23c11dc41b..0000000000 --- a/scripts/data/c++-types-powerpc64-linux-gnu.data +++ /dev/null @@ -1,67 +0,0 @@ -blkcnt64_t:l -blkcnt_t:l -blksize_t:l -caddr_t:Pc -clockid_t:i -clock_t:l -daddr_t:i -dev_t:m -fd_mask:l -fsblkcnt64_t:m -fsblkcnt_t:m -fsfilcnt64_t:m -fsfilcnt_t:m -fsid_t:8__fsid_t -gid_t:j -id_t:j -ino64_t:m -ino_t:m -int16_t:s -int32_t:i -int64_t:l -int8_t:a -intptr_t:l -key_t:i -loff_t:l -mode_t:j -nlink_t:m -off64_t:l -off_t:l -pid_t:i -pthread_attr_t:14pthread_attr_t -pthread_barrier_t:17pthread_barrier_t -pthread_barrierattr_t:21pthread_barrierattr_t -pthread_cond_t:14pthread_cond_t -pthread_condattr_t:18pthread_condattr_t -pthread_key_t:j -pthread_mutex_t:15pthread_mutex_t -pthread_mutexattr_t:19pthread_mutexattr_t -pthread_once_t:i -pthread_rwlock_t:16pthread_rwlock_t -pthread_rwlockattr_t:20pthread_rwlockattr_t -pthread_spinlock_t:i -pthread_t:m -quad_t:l -register_t:l -rlim64_t:m -rlim_t:m -sigset_t:10__sigset_t -size_t:m -socklen_t:j -ssize_t:l -suseconds_t:l -time_t:l -u_char:h -uid_t:j -uint:j -u_int:j -u_int16_t:t -u_int32_t:j -u_int64_t:m -u_int8_t:h -ulong:m -u_long:m -u_quad_t:m -useconds_t:j -ushort:t -u_short:t diff --git a/scripts/data/c++-types-s390-linux-gnu.data b/scripts/data/c++-types-s390-linux-gnu.data deleted file mode 100644 index 6e2036ec01..0000000000 --- a/scripts/data/c++-types-s390-linux-gnu.data +++ /dev/null @@ -1,67 +0,0 @@ -blkcnt64_t:x -blkcnt_t:l -blksize_t:l -caddr_t:Pc -clockid_t:i -clock_t:l -daddr_t:i -dev_t:y -fd_mask:l -fsblkcnt64_t:y -fsblkcnt_t:m -fsfilcnt64_t:y -fsfilcnt_t:m -fsid_t:8__fsid_t -gid_t:j -id_t:j -ino64_t:y -ino_t:m -int16_t:s -int32_t:i -int64_t:x -int8_t:a -intptr_t:i -key_t:i -loff_t:x -mode_t:j -nlink_t:j -off64_t:x -off_t:l -pid_t:i -pthread_attr_t:14pthread_attr_t -pthread_barrier_t:17pthread_barrier_t -pthread_barrierattr_t:21pthread_barrierattr_t -pthread_cond_t:14pthread_cond_t -pthread_condattr_t:18pthread_condattr_t -pthread_key_t:j -pthread_mutex_t:15pthread_mutex_t -pthread_mutexattr_t:19pthread_mutexattr_t -pthread_once_t:i -pthread_rwlock_t:16pthread_rwlock_t -pthread_rwlockattr_t:20pthread_rwlockattr_t -pthread_spinlock_t:i -pthread_t:m -quad_t:x -register_t:i -rlim64_t:y -rlim_t:m -sigset_t:10__sigset_t -size_t:m -socklen_t:j -ssize_t:l -suseconds_t:l -time_t:l -u_char:h -uid_t:j -uint:j -u_int:j -u_int16_t:t -u_int32_t:j -u_int64_t:y -u_int8_t:h -ulong:m -u_long:m -u_quad_t:y -useconds_t:j -ushort:t -u_short:t diff --git a/scripts/data/c++-types-s390x-linux-gnu.data b/scripts/data/c++-types-s390x-linux-gnu.data deleted file mode 100644 index 23c11dc41b..0000000000 --- a/scripts/data/c++-types-s390x-linux-gnu.data +++ /dev/null @@ -1,67 +0,0 @@ -blkcnt64_t:l -blkcnt_t:l -blksize_t:l -caddr_t:Pc -clockid_t:i -clock_t:l -daddr_t:i -dev_t:m -fd_mask:l -fsblkcnt64_t:m -fsblkcnt_t:m -fsfilcnt64_t:m -fsfilcnt_t:m -fsid_t:8__fsid_t -gid_t:j -id_t:j -ino64_t:m -ino_t:m -int16_t:s -int32_t:i -int64_t:l -int8_t:a -intptr_t:l -key_t:i -loff_t:l -mode_t:j -nlink_t:m -off64_t:l -off_t:l -pid_t:i -pthread_attr_t:14pthread_attr_t -pthread_barrier_t:17pthread_barrier_t -pthread_barrierattr_t:21pthread_barrierattr_t -pthread_cond_t:14pthread_cond_t -pthread_condattr_t:18pthread_condattr_t -pthread_key_t:j -pthread_mutex_t:15pthread_mutex_t -pthread_mutexattr_t:19pthread_mutexattr_t -pthread_once_t:i -pthread_rwlock_t:16pthread_rwlock_t -pthread_rwlockattr_t:20pthread_rwlockattr_t -pthread_spinlock_t:i -pthread_t:m -quad_t:l -register_t:l -rlim64_t:m -rlim_t:m -sigset_t:10__sigset_t -size_t:m -socklen_t:j -ssize_t:l -suseconds_t:l -time_t:l -u_char:h -uid_t:j -uint:j -u_int:j -u_int16_t:t -u_int32_t:j -u_int64_t:m -u_int8_t:h -ulong:m -u_long:m -u_quad_t:m -useconds_t:j -ushort:t -u_short:t diff --git a/scripts/data/c++-types-sparc-linux-gnu.data b/scripts/data/c++-types-sparc-linux-gnu.data deleted file mode 100644 index b3c19d9c61..0000000000 --- a/scripts/data/c++-types-sparc-linux-gnu.data +++ /dev/null @@ -1,67 +0,0 @@ -blkcnt64_t:x -blkcnt_t:l -blksize_t:l -caddr_t:Pc -clockid_t:i -clock_t:l -daddr_t:i -dev_t:y -fd_mask:l -fsblkcnt64_t:y -fsblkcnt_t:m -fsfilcnt64_t:y -fsfilcnt_t:m -fsid_t:8__fsid_t -gid_t:j -id_t:j -ino64_t:y -ino_t:m -int16_t:s -int32_t:i -int64_t:x -int8_t:a -intptr_t:i -key_t:i -loff_t:x -mode_t:j -nlink_t:j -off64_t:x -off_t:l -pid_t:i -pthread_attr_t:14pthread_attr_t -pthread_barrier_t:17pthread_barrier_t -pthread_barrierattr_t:21pthread_barrierattr_t -pthread_cond_t:14pthread_cond_t -pthread_condattr_t:18pthread_condattr_t -pthread_key_t:j -pthread_mutex_t:15pthread_mutex_t -pthread_mutexattr_t:19pthread_mutexattr_t -pthread_once_t:i -pthread_rwlock_t:16pthread_rwlock_t -pthread_rwlockattr_t:20pthread_rwlockattr_t -pthread_spinlock_t:i -pthread_t:m -quad_t:x -register_t:i -rlim64_t:y -rlim_t:m -sigset_t:10__sigset_t -size_t:j -socklen_t:j -ssize_t:i -suseconds_t:i -time_t:l -u_char:h -uid_t:j -uint:j -u_int:j -u_int16_t:t -u_int32_t:j -u_int64_t:y -u_int8_t:h -ulong:m -u_long:m -u_quad_t:y -useconds_t:j -ushort:t -u_short:t diff --git a/scripts/data/c++-types-sparc64-linux-gnu.data b/scripts/data/c++-types-sparc64-linux-gnu.data deleted file mode 100644 index 5a04f4939a..0000000000 --- a/scripts/data/c++-types-sparc64-linux-gnu.data +++ /dev/null @@ -1,67 +0,0 @@ -blkcnt64_t:l -blkcnt_t:l -blksize_t:l -caddr_t:Pc -clockid_t:i -clock_t:l -daddr_t:i -dev_t:m -fd_mask:l -fsblkcnt64_t:m -fsblkcnt_t:m -fsfilcnt64_t:m -fsfilcnt_t:m -fsid_t:8__fsid_t -gid_t:j -id_t:j -ino64_t:m -ino_t:m -int16_t:s -int32_t:i -int64_t:l -int8_t:a -intptr_t:l -key_t:i -loff_t:l -mode_t:j -nlink_t:j -off64_t:l -off_t:l -pid_t:i -pthread_attr_t:14pthread_attr_t -pthread_barrier_t:17pthread_barrier_t -pthread_barrierattr_t:21pthread_barrierattr_t -pthread_cond_t:14pthread_cond_t -pthread_condattr_t:18pthread_condattr_t -pthread_key_t:j -pthread_mutex_t:15pthread_mutex_t -pthread_mutexattr_t:19pthread_mutexattr_t -pthread_once_t:i -pthread_rwlock_t:16pthread_rwlock_t -pthread_rwlockattr_t:20pthread_rwlockattr_t -pthread_spinlock_t:i -pthread_t:m -quad_t:l -register_t:l -rlim64_t:m -rlim_t:m -sigset_t:10__sigset_t -size_t:m -socklen_t:j -ssize_t:l -suseconds_t:i -time_t:l -u_char:h -uid_t:j -uint:j -u_int:j -u_int16_t:t -u_int32_t:j -u_int64_t:m -u_int8_t:h -ulong:m -u_long:m -u_quad_t:m -useconds_t:j -ushort:t -u_short:t diff --git a/scripts/data/c++-types-x32-linux-gnu.data b/scripts/data/c++-types-x32-linux-gnu.data deleted file mode 100644 index 348bf52b2b..0000000000 --- a/scripts/data/c++-types-x32-linux-gnu.data +++ /dev/null @@ -1,67 +0,0 @@ -blkcnt64_t:x -blkcnt_t:x -blksize_t:x -caddr_t:Pc -clockid_t:i -clock_t:x -daddr_t:i -dev_t:y -fd_mask:l -fsblkcnt64_t:y -fsblkcnt_t:y -fsfilcnt64_t:y -fsfilcnt_t:y -fsid_t:8__fsid_t -gid_t:j -id_t:j -ino64_t:y -ino_t:y -int16_t:s -int32_t:i -int64_t:x -int8_t:a -intptr_t:i -key_t:i -loff_t:x -mode_t:j -nlink_t:y -off64_t:x -off_t:x -pid_t:i -pthread_attr_t:14pthread_attr_t -pthread_barrier_t:17pthread_barrier_t -pthread_barrierattr_t:21pthread_barrierattr_t -pthread_cond_t:14pthread_cond_t -pthread_condattr_t:18pthread_condattr_t -pthread_key_t:j -pthread_mutex_t:15pthread_mutex_t -pthread_mutexattr_t:19pthread_mutexattr_t -pthread_once_t:i -pthread_rwlock_t:16pthread_rwlock_t -pthread_rwlockattr_t:20pthread_rwlockattr_t -pthread_spinlock_t:i -pthread_t:m -quad_t:x -register_t:x -rlim64_t:y -rlim_t:y -sigset_t:10__sigset_t -size_t:j -socklen_t:j -ssize_t:i -suseconds_t:x -time_t:x -u_char:h -uid_t:j -uint:j -u_int:j -u_int16_t:t -u_int32_t:j -u_int64_t:y -u_int8_t:h -ulong:m -u_long:m -u_quad_t:y -useconds_t:j -ushort:t -u_short:t diff --git a/scripts/data/c++-types-x86_64-linux-gnu.data b/scripts/data/c++-types-x86_64-linux-gnu.data deleted file mode 100644 index 23c11dc41b..0000000000 --- a/scripts/data/c++-types-x86_64-linux-gnu.data +++ /dev/null @@ -1,67 +0,0 @@ -blkcnt64_t:l -blkcnt_t:l -blksize_t:l -caddr_t:Pc -clockid_t:i -clock_t:l -daddr_t:i -dev_t:m -fd_mask:l -fsblkcnt64_t:m -fsblkcnt_t:m -fsfilcnt64_t:m -fsfilcnt_t:m -fsid_t:8__fsid_t -gid_t:j -id_t:j -ino64_t:m -ino_t:m -int16_t:s -int32_t:i -int64_t:l -int8_t:a -intptr_t:l -key_t:i -loff_t:l -mode_t:j -nlink_t:m -off64_t:l -off_t:l -pid_t:i -pthread_attr_t:14pthread_attr_t -pthread_barrier_t:17pthread_barrier_t -pthread_barrierattr_t:21pthread_barrierattr_t -pthread_cond_t:14pthread_cond_t -pthread_condattr_t:18pthread_condattr_t -pthread_key_t:j -pthread_mutex_t:15pthread_mutex_t -pthread_mutexattr_t:19pthread_mutexattr_t -pthread_once_t:i -pthread_rwlock_t:16pthread_rwlock_t -pthread_rwlockattr_t:20pthread_rwlockattr_t -pthread_spinlock_t:i -pthread_t:m -quad_t:l -register_t:l -rlim64_t:m -rlim_t:m -sigset_t:10__sigset_t -size_t:m -socklen_t:j -ssize_t:l -suseconds_t:l -time_t:l -u_char:h -uid_t:j -uint:j -u_int:j -u_int16_t:t -u_int32_t:j -u_int64_t:m -u_int8_t:h -ulong:m -u_long:m -u_quad_t:m -useconds_t:j -ushort:t -u_short:t diff --git a/scripts/data/localplt-generic.data b/scripts/data/localplt-generic.data deleted file mode 100644 index d2965199f3..0000000000 --- a/scripts/data/localplt-generic.data +++ /dev/null @@ -1,9 +0,0 @@ -# See scripts/check-localplt.awk for how this file is processed. -# PLT use is required for the malloc family and for matherr because -# users can define their own functions and have library internals call them. -libc.so: calloc -libc.so: free -libc.so: malloc -libc.so: memalign -libc.so: realloc -libm.so: matherr diff --git a/scripts/data/localplt-i386-linux-gnu.data b/scripts/data/localplt-i386-linux-gnu.data deleted file mode 100644 index 8fb56b6086..0000000000 --- a/scripts/data/localplt-i386-linux-gnu.data +++ /dev/null @@ -1,7 +0,0 @@ -libc.so: _Unwind_Find_FDE -libc.so: calloc -libc.so: free -libc.so: malloc -libc.so: memalign -libc.so: realloc -libm.so: matherr diff --git a/scripts/data/localplt-powerpc-linux-gnu.data b/scripts/data/localplt-powerpc-linux-gnu.data deleted file mode 100644 index 8fb56b6086..0000000000 --- a/scripts/data/localplt-powerpc-linux-gnu.data +++ /dev/null @@ -1,7 +0,0 @@ -libc.so: _Unwind_Find_FDE -libc.so: calloc -libc.so: free -libc.so: malloc -libc.so: memalign -libc.so: realloc -libm.so: matherr diff --git a/scripts/data/localplt-powerpc64-linux-gnu.data b/scripts/data/localplt-powerpc64-linux-gnu.data deleted file mode 100644 index 2219aa9048..0000000000 --- a/scripts/data/localplt-powerpc64-linux-gnu.data +++ /dev/null @@ -1,6 +0,0 @@ -libc.so: calloc -libc.so: free -libc.so: malloc -libc.so: memalign -libc.so: realloc -libm.so: matherr diff --git a/scripts/data/localplt-s390-linux-gnu.data b/scripts/data/localplt-s390-linux-gnu.data deleted file mode 100644 index 8fb56b6086..0000000000 --- a/scripts/data/localplt-s390-linux-gnu.data +++ /dev/null @@ -1,7 +0,0 @@ -libc.so: _Unwind_Find_FDE -libc.so: calloc -libc.so: free -libc.so: malloc -libc.so: memalign -libc.so: realloc -libm.so: matherr diff --git a/scripts/data/localplt-s390x-linux-gnu.data b/scripts/data/localplt-s390x-linux-gnu.data deleted file mode 100644 index 8fb56b6086..0000000000 --- a/scripts/data/localplt-s390x-linux-gnu.data +++ /dev/null @@ -1,7 +0,0 @@ -libc.so: _Unwind_Find_FDE -libc.so: calloc -libc.so: free -libc.so: malloc -libc.so: memalign -libc.so: realloc -libm.so: matherr diff --git a/scripts/data/localplt-sparc-linux-gnu.data b/scripts/data/localplt-sparc-linux-gnu.data deleted file mode 100644 index 15ba18b96d..0000000000 --- a/scripts/data/localplt-sparc-linux-gnu.data +++ /dev/null @@ -1,17 +0,0 @@ -libc.so: _Q_add ? -libc.so: _Q_div ? -libc.so: _Q_feq ? -libc.so: _Q_fge ? -libc.so: _Q_fle ? -libc.so: _Q_flt ? -libc.so: _Q_fne ? -libc.so: _Q_itoq ? -libc.so: _Q_mul ? -libc.so: _Q_sub ? -libc.so: _Unwind_Find_FDE -libc.so: calloc -libc.so: free -libc.so: malloc -libc.so: memalign -libc.so: realloc -libm.so: matherr diff --git a/scripts/data/localplt-sparc64-linux-gnu.data b/scripts/data/localplt-sparc64-linux-gnu.data deleted file mode 100644 index 6f1769c026..0000000000 --- a/scripts/data/localplt-sparc64-linux-gnu.data +++ /dev/null @@ -1,19 +0,0 @@ -libc.so: _Qp_add ? -libc.so: _Qp_div ? -libc.so: _Qp_feq ? -libc.so: _Qp_fge ? -libc.so: _Qp_fle ? -libc.so: _Qp_flt ? -libc.so: _Qp_fne ? -libc.so: _Qp_itoq ? -libc.so: _Qp_mul ? -libc.so: _Qp_qtod ? -libc.so: _Qp_sub ? -libc.so: _Qp_xtoq ? -libc.so: _Unwind_Find_FDE -libc.so: calloc -libc.so: free -libc.so: malloc -libc.so: memalign -libc.so: realloc -libm.so: matherr diff --git a/scripts/gen-sorted.awk b/scripts/gen-sorted.awk index 0092fe61d1..0f2a43f88f 100755 --- a/scripts/gen-sorted.awk +++ b/scripts/gen-sorted.awk @@ -1,7 +1,7 @@ #! /usr/bin/awk -f # Generate sorted list of directories. The sorting is stable but with # dependencies between directories resolved by moving dependees in front. -# (C) Copyright 1998 Free Software Foundation, Inc. +# Copyright (C) 1998-2014 Free Software Foundation, Inc. # Written by Ulrich Drepper <drepper@cygnus.com>, 1998. BEGIN { diff --git a/scripts/install-sh b/scripts/install-sh index ebc66913e9..377bb8687f 100755 --- a/scripts/install-sh +++ b/scripts/install-sh @@ -1,250 +1,527 @@ -#! /bin/sh -# +#!/bin/sh # install - install a program, script, or datafile -# This comes from X11R5 (mit/util/scripts/install.sh). + +scriptversion=2011-11-20.07; # UTC + +# This originates from X11R5 (mit/util/scripts/install.sh), which was +# later released in X11R6 (xc/config/util/install.sh) with the +# following copyright and license. +# +# Copyright (C) 1994 X Consortium +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- +# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -# Copyright 1991 by the Massachusetts Institute of Technology +# Except as contained in this notice, the name of the X Consortium shall not +# be used in advertising or otherwise to promote the sale, use or other deal- +# ings in this Software without prior written authorization from the X Consor- +# tium. # -# Permission to use, copy, modify, distribute, and sell this software and its -# documentation for any purpose is hereby granted without fee, provided that -# the above copyright notice appear in all copies and that both that -# copyright notice and this permission notice appear in supporting -# documentation, and that the name of M.I.T. not be used in advertising or -# publicity pertaining to distribution of the software without specific, -# written prior permission. M.I.T. makes no representations about the -# suitability of this software for any purpose. It is provided "as is" -# without express or implied warranty. +# +# FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent -# `make' implicit rules from creating a file called install from it +# 'make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written -# from scratch. It can only install one file at a time, a restriction -# shared with many OS's install programs. +# from scratch. +nl=' +' +IFS=" "" $nl" # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. -doit="${DOITPROG-}" - - -# put in absolute paths if you don't have them in your path; or use env. vars. - -mvprog="${MVPROG-mv}" -cpprog="${CPPROG-cp}" -chmodprog="${CHMODPROG-chmod}" -chownprog="${CHOWNPROG-chown}" -chgrpprog="${CHGRPPROG-chgrp}" -stripprog="${STRIPPROG-strip}" -rmprog="${RMPROG-rm}" -mkdirprog="${MKDIRPROG-mkdir}" - -transformbasename="" -transform_arg="" -instcmd="$mvprog" -chmodcmd="$chmodprog 0755" -chowncmd="" -chgrpcmd="" -stripcmd="" -rmcmd="$rmprog -f" -mvcmd="$mvprog" -src="" -dst="" -dir_arg="" - -while [ x"$1" != x ]; do - case $1 in - -c) instcmd="$cpprog" - shift - continue;; - - -d) dir_arg=true - shift - continue;; - - -m) chmodcmd="$chmodprog $2" - shift - shift - continue;; - - -o) chowncmd="$chownprog $2" - shift - shift - continue;; - - -g) chgrpcmd="$chgrpprog $2" - shift - shift - continue;; - - -s) stripcmd="$stripprog" - shift - continue;; - - -t=*) transformarg=`echo $1 | sed 's/-t=//'` - shift - continue;; - - -b=*) transformbasename=`echo $1 | sed 's/-b=//'` - shift - continue;; - - *) if [ x"$src" = x ] - then - src=$1 - else - # this colon is to work around a 386BSD /bin/sh bug - : - dst=$1 - fi - shift - continue;; - esac -done - -if [ x"$src" = x ] -then - echo "install: no input file specified" - exit 1 +doit=${DOITPROG-} +if test -z "$doit"; then + doit_exec=exec else - true + doit_exec=$doit fi -if [ x"$dir_arg" != x ]; then - dst=$src - src="" - - if [ -d $dst ]; then - instcmd=: - else - instcmd=mkdir - fi -else +# Put in absolute file names if you don't have them in your path; +# or use environment vars. + +chgrpprog=${CHGRPPROG-chgrp} +chmodprog=${CHMODPROG-chmod} +chownprog=${CHOWNPROG-chown} +cmpprog=${CMPPROG-cmp} +cpprog=${CPPROG-cp} +mkdirprog=${MKDIRPROG-mkdir} +mvprog=${MVPROG-mv} +rmprog=${RMPROG-rm} +stripprog=${STRIPPROG-strip} + +posix_glob='?' +initialize_posix_glob=' + test "$posix_glob" != "?" || { + if (set -f) 2>/dev/null; then + posix_glob= + else + posix_glob=: + fi + } +' -# Waiting for this to be detected by the "$instcmd $src $dsttmp" command -# might cause directories to be created, which would be especially bad -# if $src (and thus $dsttmp) contains '*'. +posix_mkdir= - if [ -f $src -o -d $src ] - then - true - else - echo "install: $src does not exist" - exit 1 - fi - - if [ x"$dst" = x ] - then - echo "install: no destination specified" - exit 1 - else - true - fi +# Desired mode of installed file. +mode=0755 -# If destination is a directory, append the input filename; if your system -# does not like double slashes in filenames, you may need to add some logic +chgrpcmd= +chmodcmd=$chmodprog +chowncmd= +mvcmd=$mvprog +rmcmd="$rmprog -f" +stripcmd= - if [ -d $dst ] - then - dst="$dst"/`basename $src` - else - true - fi -fi +src= +dst= +dir_arg= +dst_arg= -## this sed command emulates the dirname command -dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` +copy_on_change=false +no_target_directory= -# Make sure that the destination directory exists. -# this part is taken from Noah Friedman's mkinstalldirs script +usage="\ +Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE + or: $0 [OPTION]... SRCFILES... DIRECTORY + or: $0 [OPTION]... -t DIRECTORY SRCFILES... + or: $0 [OPTION]... -d DIRECTORIES... -# Skip lots of stat calls in the usual case. -if [ ! -d "$dstdir" ]; then -defaultIFS=' -' -IFS="${IFS-${defaultIFS}}" +In the 1st form, copy SRCFILE to DSTFILE. +In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. +In the 4th, create DIRECTORIES. -oIFS="${IFS}" -# Some sh's can't handle IFS=/ for some reason. -IFS='%' -set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` -IFS="${oIFS}" +Options: + --help display this help and exit. + --version display version info and exit. -pathcomp='' + -c (ignored) + -C install only if different (preserve the last data modification time) + -d create directories instead of installing files. + -g GROUP $chgrpprog installed files to GROUP. + -m MODE $chmodprog installed files to MODE. + -o USER $chownprog installed files to USER. + -s $stripprog installed files. + -t DIRECTORY install into DIRECTORY. + -T report an error if DSTFILE is a directory. -while [ $# -ne 0 ] ; do - pathcomp="${pathcomp}${1}" - shift +Environment variables override the default commands: + CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG + RMPROG STRIPPROG +" - if [ ! -d "${pathcomp}" ] ; - then - $mkdirprog "${pathcomp}" - else - true - fi +while test $# -ne 0; do + case $1 in + -c) ;; - pathcomp="${pathcomp}/" -done -fi + -C) copy_on_change=true;; -if [ x"$dir_arg" != x ] -then - $doit $instcmd $dst && + -d) dir_arg=true;; - if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi && - if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi && - if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi && - if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi -else + -g) chgrpcmd="$chgrpprog $2" + shift;; -# If we're going to rename the final executable, determine the name now. + --help) echo "$usage"; exit $?;; - if [ x"$transformarg" = x ] - then - dstfile=`basename $dst` - else - dstfile=`basename $dst $transformbasename | - sed $transformarg`$transformbasename - fi + -m) mode=$2 + case $mode in + *' '* | *' '* | *' +'* | *'*'* | *'?'* | *'['*) + echo "$0: invalid mode: $mode" >&2 + exit 1;; + esac + shift;; -# don't allow the sed command to completely eliminate the filename + -o) chowncmd="$chownprog $2" + shift;; - if [ x"$dstfile" = x ] - then - dstfile=`basename $dst` - else - true - fi + -s) stripcmd=$stripprog;; -# Make a temp file name in the proper directory. + -t) dst_arg=$2 + # Protect names problematic for 'test' and other utilities. + case $dst_arg in + -* | [=\(\)!]) dst_arg=./$dst_arg;; + esac + shift;; - dsttmp=$dstdir/#inst.$$# + -T) no_target_directory=true;; -# Move or copy the file name to the temp name + --version) echo "$0 $scriptversion"; exit $?;; - $doit $instcmd $src $dsttmp && + --) shift + break;; - trap "rm -f ${dsttmp}" 0 && + -*) echo "$0: invalid option: $1" >&2 + exit 1;; -# and set any options; do chmod last to preserve setuid bits + *) break;; + esac + shift +done -# If any of these fail, we abort the whole thing. If we want to -# ignore errors from any of these, just make sure not to ignore -# errors from the above "$doit $instcmd $src $dsttmp" command. +if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then + # When -d is used, all remaining arguments are directories to create. + # When -t is used, the destination is already specified. + # Otherwise, the last argument is the destination. Remove it from $@. + for arg + do + if test -n "$dst_arg"; then + # $@ is not empty: it contains at least $arg. + set fnord "$@" "$dst_arg" + shift # fnord + fi + shift # arg + dst_arg=$arg + # Protect names problematic for 'test' and other utilities. + case $dst_arg in + -* | [=\(\)!]) dst_arg=./$dst_arg;; + esac + done +fi - if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi && - if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi && - if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi && - if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi && +if test $# -eq 0; then + if test -z "$dir_arg"; then + echo "$0: no input file specified." >&2 + exit 1 + fi + # It's OK to call 'install-sh -d' without argument. + # This can happen when creating conditional directories. + exit 0 +fi -# Now rename the file to the real destination. +if test -z "$dir_arg"; then + do_exit='(exit $ret); exit $ret' + trap "ret=129; $do_exit" 1 + trap "ret=130; $do_exit" 2 + trap "ret=141; $do_exit" 13 + trap "ret=143; $do_exit" 15 + + # Set umask so as not to create temps with too-generous modes. + # However, 'strip' requires both read and write access to temps. + case $mode in + # Optimize common cases. + *644) cp_umask=133;; + *755) cp_umask=22;; + + *[0-7]) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw='% 200' + fi + cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; + *) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw=,u+rw + fi + cp_umask=$mode$u_plus_rw;; + esac +fi - $doit $rmcmd -f $dstdir/$dstfile && - $doit $mvcmd $dsttmp $dstdir/$dstfile +for src +do + # Protect names problematic for 'test' and other utilities. + case $src in + -* | [=\(\)!]) src=./$src;; + esac + + if test -n "$dir_arg"; then + dst=$src + dstdir=$dst + test -d "$dstdir" + dstdir_status=$? + else + + # Waiting for this to be detected by the "$cpprog $src $dsttmp" command + # might cause directories to be created, which would be especially bad + # if $src (and thus $dsttmp) contains '*'. + if test ! -f "$src" && test ! -d "$src"; then + echo "$0: $src does not exist." >&2 + exit 1 + fi + + if test -z "$dst_arg"; then + echo "$0: no destination specified." >&2 + exit 1 + fi + dst=$dst_arg + + # If destination is a directory, append the input filename; won't work + # if double slashes aren't ignored. + if test -d "$dst"; then + if test -n "$no_target_directory"; then + echo "$0: $dst_arg: Is a directory" >&2 + exit 1 + fi + dstdir=$dst + dst=$dstdir/`basename "$src"` + dstdir_status=0 + else + # Prefer dirname, but fall back on a substitute if dirname fails. + dstdir=` + (dirname "$dst") 2>/dev/null || + expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$dst" : 'X\(//\)[^/]' \| \ + X"$dst" : 'X\(//\)$' \| \ + X"$dst" : 'X\(/\)' \| . 2>/dev/null || + echo X"$dst" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q' + ` + + test -d "$dstdir" + dstdir_status=$? + fi + fi + + obsolete_mkdir_used=false + + if test $dstdir_status != 0; then + case $posix_mkdir in + '') + # Create intermediate dirs using mode 755 as modified by the umask. + # This is like FreeBSD 'install' as of 1997-10-28. + umask=`umask` + case $stripcmd.$umask in + # Optimize common cases. + *[2367][2367]) mkdir_umask=$umask;; + .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; + + *[0-7]) + mkdir_umask=`expr $umask + 22 \ + - $umask % 100 % 40 + $umask % 20 \ + - $umask % 10 % 4 + $umask % 2 + `;; + *) mkdir_umask=$umask,go-w;; + esac + + # With -d, create the new directory with the user-specified mode. + # Otherwise, rely on $mkdir_umask. + if test -n "$dir_arg"; then + mkdir_mode=-m$mode + else + mkdir_mode= + fi -fi && + posix_mkdir=false + case $umask in + *[123567][0-7][0-7]) + # POSIX mkdir -p sets u+wx bits regardless of umask, which + # is incompatible with FreeBSD 'install' when (umask & 300) != 0. + ;; + *) + tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ + trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 + + if (umask $mkdir_umask && + exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 + then + if test -z "$dir_arg" || { + # Check for POSIX incompatibilities with -m. + # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or + # other-writable bit of parent directory when it shouldn't. + # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. + ls_ld_tmpdir=`ls -ld "$tmpdir"` + case $ls_ld_tmpdir in + d????-?r-*) different_mode=700;; + d????-?--*) different_mode=755;; + *) false;; + esac && + $mkdirprog -m$different_mode -p -- "$tmpdir" && { + ls_ld_tmpdir_1=`ls -ld "$tmpdir"` + test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" + } + } + then posix_mkdir=: + fi + rmdir "$tmpdir/d" "$tmpdir" + else + # Remove any dirs left behind by ancient mkdir implementations. + rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null + fi + trap '' 0;; + esac;; + esac + if + $posix_mkdir && ( + umask $mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" + ) + then : + else + + # The umask is ridiculous, or mkdir does not conform to POSIX, + # or it failed possibly due to a race condition. Create the + # directory the slow way, step by step, checking for races as we go. + + case $dstdir in + /*) prefix='/';; + [-=\(\)!]*) prefix='./';; + *) prefix='';; + esac + + eval "$initialize_posix_glob" + + oIFS=$IFS + IFS=/ + $posix_glob set -f + set fnord $dstdir + shift + $posix_glob set +f + IFS=$oIFS + + prefixes= + + for d + do + test X"$d" = X && continue + + prefix=$prefix$d + if test -d "$prefix"; then + prefixes= + else + if $posix_mkdir; then + (umask=$mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break + # Don't fail if two instances are running concurrently. + test -d "$prefix" || exit 1 + else + case $prefix in + *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; + *) qprefix=$prefix;; + esac + prefixes="$prefixes '$qprefix'" + fi + fi + prefix=$prefix/ + done + + if test -n "$prefixes"; then + # Don't fail if two instances are running concurrently. + (umask $mkdir_umask && + eval "\$doit_exec \$mkdirprog $prefixes") || + test -d "$dstdir" || exit 1 + obsolete_mkdir_used=true + fi + fi + fi + + if test -n "$dir_arg"; then + { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && + { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || + test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 + else + + # Make a couple of temp file names in the proper directory. + dsttmp=$dstdir/_inst.$$_ + rmtmp=$dstdir/_rm.$$_ + + # Trap to clean up those temp files at exit. + trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 + + # Copy the file name to the temp name. + (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && + + # and set any options; do chmod last to preserve setuid bits. + # + # If any of these fail, we abort the whole thing. If we want to + # ignore errors from any of these, just make sure not to ignore + # errors from the above "$doit $cpprog $src $dsttmp" command. + # + { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && + { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && + { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && + + # If -C, don't bother to copy if it wouldn't change the file. + if $copy_on_change && + old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && + new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && + + eval "$initialize_posix_glob" && + $posix_glob set -f && + set X $old && old=:$2:$4:$5:$6 && + set X $new && new=:$2:$4:$5:$6 && + $posix_glob set +f && + + test "$old" = "$new" && + $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 + then + rm -f "$dsttmp" + else + # Rename the file to the real destination. + $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || + + # The rename failed, perhaps because mv can't rename something else + # to itself, or perhaps because mv is so ancient that it does not + # support -f. + { + # Now remove or move aside any old file at destination location. + # We try this two ways since rm can't unlink itself on some + # systems and the destination file might be busy for other + # reasons. In this case, the final cleanup might fail but the new + # file should still install successfully. + { + test ! -f "$dst" || + $doit $rmcmd -f "$dst" 2>/dev/null || + { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && + { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } + } || + { echo "$0: cannot unlink or rename $dst" >&2 + (exit 1); exit 1 + } + } && + + # Now rename the file to the real destination. + $doit $mvcmd "$dsttmp" "$dst" + } + fi || exit 1 + + trap '' 0 + fi +done -exit 0 +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff --git a/scripts/list-sources.sh b/scripts/list-sources.sh index 53b6f7f0ee..528e971b42 100755 --- a/scripts/list-sources.sh +++ b/scripts/list-sources.sh @@ -11,8 +11,21 @@ esac if [ -r .git/HEAD ]; then - exec ${GIT:-git} ls-files - + # List files for glibc core. + ${GIT:-git} ls-files + # List files for glibc ports. + ports="ports" + if [ -d "$PWD/$ports" ]; then + cd "$PWD/$ports" + ${GIT:-git} ls-files | sed -e "s,^,$ports/,g" + else + # We expect the glibc-ports directory to be symlinked as PORTS. + # The glibc release manager will run this script as part of libc.pot + # regeneration and should ensure the symlink to PORTS is setup. + echo >&2 "WARNING: No \"$ports\" directory found. Expected glibc-ports"\ + "source directory to be symlinked as \"$ports\" directory." + fi + exit 0 fi echo >&2 'Cannot list sources without some version control system in use.' diff --git a/scripts/mkinstalldirs b/scripts/mkinstalldirs index f945dbf2bc..55d537f872 100755 --- a/scripts/mkinstalldirs +++ b/scripts/mkinstalldirs @@ -1,38 +1,162 @@ #! /bin/sh # mkinstalldirs --- make directory hierarchy -# Author: Noah Friedman <friedman@prep.ai.mit.edu> + +scriptversion=2009-04-28.21; # UTC + +# Original author: Noah Friedman <friedman@prep.ai.mit.edu> # Created: 1993-05-16 -# Public domain +# Public domain. +# +# This file is maintained in Automake, please report +# bugs to <bug-automake@gnu.org> or send patches to +# <automake-patches@gnu.org>. +nl=' +' +IFS=" "" $nl" errstatus=0 +dirmode= + +usage="\ +Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ... + +Create each directory DIR (with mode MODE, if specified), including all +leading file name components. + +Report bugs to <bug-automake@gnu.org>." + +# process command line arguments +while test $# -gt 0 ; do + case $1 in + -h | --help | --h*) # -h for help + echo "$usage" + exit $? + ;; + -m) # -m PERM arg + shift + test $# -eq 0 && { echo "$usage" 1>&2; exit 1; } + dirmode=$1 + shift + ;; + --version) + echo "$0 $scriptversion" + exit $? + ;; + --) # stop option processing + shift + break + ;; + -*) # unknown option + echo "$usage" 1>&2 + exit 1 + ;; + *) # first non-opt arg + break + ;; + esac +done for file do - set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` - shift + if test -d "$file"; then + shift + else + break + fi +done + +case $# in + 0) exit 0 ;; +esac + +# Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and +# mkdir -p a/c at the same time, both will detect that a is missing, +# one will create a, then the other will try to create a and die with +# a "File exists" error. This is a problem when calling mkinstalldirs +# from a parallel make. We use --version in the probe to restrict +# ourselves to GNU mkdir, which is thread-safe. +case $dirmode in + '') + if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then + echo "mkdir -p -- $*" + exec mkdir -p -- "$@" + else + # On NextStep and OpenStep, the 'mkdir' command does not + # recognize any option. It will interpret all options as + # directories to create, and then abort because '.' already + # exists. + test -d ./-p && rmdir ./-p + test -d ./--version && rmdir ./--version + fi + ;; + *) + if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 && + test ! -d ./--version; then + echo "mkdir -m $dirmode -p -- $*" + exec mkdir -m "$dirmode" -p -- "$@" + else + # Clean up after NextStep and OpenStep mkdir. + for d in ./-m ./-p ./--version "./$dirmode"; + do + test -d $d && rmdir $d + done + fi + ;; +esac + +for file +do + case $file in + /*) pathcomp=/ ;; + *) pathcomp= ;; + esac + oIFS=$IFS + IFS=/ + set fnord $file + shift + IFS=$oIFS + + for d + do + test "x$d" = x && continue + + pathcomp=$pathcomp$d + case $pathcomp in + -*) pathcomp=./$pathcomp ;; + esac - pathcomp= - for d - do - pathcomp="$pathcomp$d" - case "$pathcomp" in - -* ) pathcomp=./$pathcomp ;; - esac + if test ! -d "$pathcomp"; then + echo "mkdir $pathcomp" - if test ! -d "$pathcomp"; then - echo "mkdir $pathcomp" 1>&2 + mkdir "$pathcomp" || lasterr=$? - mkdir "$pathcomp" || lasterr=$? + if test ! -d "$pathcomp"; then + errstatus=$lasterr + else + if test ! -z "$dirmode"; then + echo "chmod $dirmode $pathcomp" + lasterr= + chmod "$dirmode" "$pathcomp" || lasterr=$? - if test ! -d "$pathcomp"; then - errstatus=$lasterr - fi - fi + if test ! -z "$lasterr"; then + errstatus=$lasterr + fi + fi + fi + fi - pathcomp="$pathcomp/" - done + pathcomp=$pathcomp/ + done done exit $errstatus -# mkinstalldirs ends here +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff --git a/scripts/move-if-change b/scripts/move-if-change index 66d8b8adc7..f45cbea3bf 100755 --- a/scripts/move-if-change +++ b/scripts/move-if-change @@ -1,17 +1,83 @@ #!/bin/sh # Like mv $1 $2, but if the files are the same, just delete $1. -# Status is 0 if $2 is changed, 1 otherwise. -if -test -r $2 -then -if -cmp -s $1 $2 -then -echo $2 is unchanged -rm -f $1 +# Status is zero if successful, nonzero otherwise. + +VERSION='2012-01-06 07:23'; # UTC +# The definition above must lie within the first 8 lines in order +# for the Emacs time-stamp write hook (at end) to update it. +# If you change this file with Emacs, please let the write hook +# do its job. Otherwise, update this string manually. + +# Copyright (C) 2002-2013 Free Software Foundation, Inc. + +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + +usage="usage: $0 SOURCE DEST" + +help="$usage + or: $0 OPTION +If SOURCE is different than DEST, then move it to DEST; else remove SOURCE. + + --help display this help and exit + --version output version information and exit + +The variable CMPPROG can be used to specify an alternative to 'cmp'. + +Report bugs to <bug-gnulib@gnu.org>." + +version=`expr "$VERSION" : '\([^ ]*\)'` +version="move-if-change (gnulib) $version +Copyright (C) 2011 Free Software Foundation, Inc. +License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> +This is free software: you are free to change and redistribute it. +There is NO WARRANTY, to the extent permitted by law." + +cmpprog=${CMPPROG-cmp} + +for arg +do + case $arg in + --help | --hel | --he | --h) + exec echo "$help" ;; + --version | --versio | --versi | --vers | --ver | --ve | --v) + exec echo "$version" ;; + --) + shift + break ;; + -*) + echo "$0: invalid option: $arg" >&2 + exit 1 ;; + *) + break ;; + esac +done + +test $# -eq 2 || { echo "$0: $usage" >&2; exit 1; } + +if test -r "$2" && $cmpprog -- "$1" "$2" >/dev/null; then + rm -f -- "$1" else -mv -f $1 $2 -fi -else -mv -f $1 $2 + if mv -f -- "$1" "$2"; then :; else + # Ignore failure due to a concurrent move-if-change. + test -r "$2" && $cmpprog -- "$1" "$2" >/dev/null && rm -f -- "$1" + fi fi + +## Local Variables: +## eval: (add-hook 'write-file-hooks 'time-stamp) +## time-stamp-start: "VERSION='" +## time-stamp-format: "%:y-%02m-%02d %02H:%02M" +## time-stamp-time-zone: "UTC" +## time-stamp-end: "'; # UTC" +## End: diff --git a/scripts/rellns-sh b/scripts/rellns-sh index 64e8cd971c..9132ce77a0 100755 --- a/scripts/rellns-sh +++ b/scripts/rellns-sh @@ -1,6 +1,6 @@ #! /bin/sh # rellns-sh - Simplified ln program to generate relative symbolic link. -# Copyright (C) 1996, 1997 Free Software Foundation, Inc. +# Copyright (C) 1996-2014 Free Software Foundation, Inc. # Written by Ulrich Drepper <drepper@cygnus.com>, October 1996 # # This program is free software; you can redistribute it and/or modify @@ -16,8 +16,17 @@ # You should have received a copy of the GNU General Public License # along with this program; if not, see <http://www.gnu.org/licenses/>. +# With -p, instead of creating the link print the computed relative link +# name. +do_print=false +case $1 in + -p) + do_print=true + shift + ;; +esac if test $# -ne 2; then - echo "Usage: rellns SOURCE DEST" >&2 + echo "Usage: rellns [-p] SOURCE DEST" >&2 exit 1 fi @@ -70,4 +79,8 @@ while test -n "$from"; do from=`echo $from | sed 's%^[^/]*/*%%'` done -ln -s $rfrom$to $2 +if $do_print; then + echo "$rfrom$to" +else + ln -s $rfrom$to $2 +fi diff --git a/scripts/sysd-rules.awk b/scripts/sysd-rules.awk new file mode 100644 index 0000000000..cc143345c6 --- /dev/null +++ b/scripts/sysd-rules.awk @@ -0,0 +1,76 @@ +# This is a GAWK script to generate the sysd-rules file. +# It does not read any input, but it requires that several variables +# be set on its command line (using -v) to their makefile counterparts: +# all_object_suffixes $(all-object-suffixes) +# inhibit_sysdep_asm $(inhibit-sysdep-asm) +# config_sysdirs $(config_sysdirs) +# sysd_rules_patterns $(sysd-rules-patterns) + +BEGIN { + print "sysd-rules-sysdirs :=", config_sysdirs; + + nsuffixes = split(all_object_suffixes, suffixes); + ninhibit_asm = split(inhibit_sysdep_asm, inhibit_asm); + nsysdirs = split(config_sysdirs, sysdirs); + npatterns = split(sysd_rules_patterns, patterns); + + # Each element of $(sysd-rules-patterns) is a pair TARGET:DEP. + # They are no in particular order. We need to sort them so that + # the longest TARGET is first, and, among elements with the same + # TARGET, the longest DEP is first. + for (i = 1; i <= npatterns; ++i) { + if (split(patterns[i], td, ":") != 2) { + msg = "bad sysd-rules-patterns element '" patterns[i] "'"; + print msg > "/dev/stderr"; + exit 2; + } + target_order = sprintf("%09d", npatterns + 1 - length(td[1])); + dep_order = sprintf("%09d", npatterns - length(td[2])); + sort_patterns[target_order SUBSEP dep_order] = patterns[i]; + } + asorti(sort_patterns, map_patterns); + for (i in map_patterns) { + patterns[i] = sort_patterns[map_patterns[i]]; + } + + for (sysdir_idx = 1; sysdir_idx <= nsysdirs; ++sysdir_idx) { + dir = sysdirs[sysdir_idx]; + if (dir !~ /^\//) dir = "$(..)" dir; + asm_rules = 1; + for (i = 1; i <= ninhibit_asm; ++i) { + if (dir ~ ("^.*sysdeps/" inhibit_asm[i] "$")) { + asm_rules = 0; + break; + } + } + for (suffix_idx = 1; suffix_idx <= nsuffixes; ++suffix_idx) { + o = suffixes[suffix_idx]; + for (pattern_idx = 1; pattern_idx <= npatterns; ++pattern_idx) { + pattern = patterns[pattern_idx]; + split(pattern, td, ":"); + target_pattern = td[1]; + dep_pattern = td[2]; + if (target_pattern == "%") { + command_suffix = ""; + } else { + prefix = gensub(/%/, "", "", target_pattern); + command_suffix = " $(" prefix "CPPFLAGS)"; + } + target = "$(objpfx)" target_pattern o ":"; + if (asm_rules) { + dep = dir "/" dep_pattern ".S"; + print target, dep, "$(before-compile)"; + print "\t$(compile-command.S)" command_suffix; + } + dep = dir "/" dep_pattern ".c"; + print target, dep, "$(before-compile)"; + print "\t$(compile-command.c)" command_suffix; + } + } + print "$(inst_includedir)/%.h:", dir "/%.h", "$(+force)"; + print "\t$(do-install)"; + } + + print "sysd-rules-done := t"; + exit 0; +} diff --git a/scripts/test-installation.pl b/scripts/test-installation.pl index 1b22086bf9..a674a7fe0b 100755 --- a/scripts/test-installation.pl +++ b/scripts/test-installation.pl @@ -1,5 +1,5 @@ #! /usr/bin/perl -w -# Copyright (C) 1997-2012 Free Software Foundation, Inc. +# Copyright (C) 1997-2014 Free Software Foundation, Inc. # This file is part of the GNU C Library. # Contributed by Andreas Jaeger <aj@arthur.rhein-neckar.de>, 1997. @@ -25,6 +25,11 @@ if ($ENV{CC}) { } else { $CC= "gcc"; } +if ($ENV{LD_SO}) { + $LD_SO = $ENV{LD_SO}; +} else { + $LD_SO = ""; +} sub usage { print "Usage: test-installation [soversions.mk]\n"; @@ -54,7 +59,7 @@ arglist: while (@ARGV) { $ARGV[0] eq "--vers" || $ARGV[0] eq "--versi" || $ARGV[0] eq "--versio" || $ARGV[0] eq "--version") { print "test-installation (GNU $PACKAGE)\n"; - print "Copyright (C) 1997, 1998 Free Software Foundation, Inc.\n"; + print "Copyright (C) 2014 Free Software Foundation, Inc.\n"; print "This is free software; see the source for copying conditions. There is NO\n"; print "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"; print "Written by Andreas Jaeger <aj\@arthur.rhein-neckar.de>\n"; @@ -112,6 +117,8 @@ while (<SOVERSIONS>) { $link_libs .= " -l$name"; $versions{$name} = $version; } + } elsif ($LD_SO ne "") { + ($ld_so_name, $ld_so_version) = split ('\.so\.', $LD_SO); } else { if (/^ld\.so/) { ($ld_so_name, $ld_so_version)= /=(.*)\.so\.(.*)$/; diff --git a/scripts/update-copyrights b/scripts/update-copyrights new file mode 100755 index 0000000000..5841dbcf27 --- /dev/null +++ b/scripts/update-copyrights @@ -0,0 +1,77 @@ +#! /bin/sh +# Update copyright year lists. +# Copyright (C) 2012-2014 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 +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. + +# The GNU C Library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. + +# You should have received a copy of the GNU Lesser General Public +# License along with the GNU C Library; if not, see +# <http://www.gnu.org/licenses/>. + +# Run this script with the first argument being the location of +# gnulib's update-copyright script. Any other arguments are ignored. +# FSF copyright notices in the glibc source directory containing this +# script will be updated; glibc must then be built to update generated +# files. Copyright dates in --version copyright notices are not +# updated. + +set -e + +export LC_ALL=C +export UPDATE_COPYRIGHT_FORCE=1 +export UPDATE_COPYRIGHT_USE_INTERVALS=2 +export UPDATE_COPYRIGHT_MAX_LINE_LENGTH=79 + +update_script=$1 + +if ! [ -f "$update_script" ]; then + echo "error: first argument must point to gnulib update-copyright script" >&2 + exit 1 +fi + +cd "$(dirname "$0")/.." + +files=$(find . -type f | sed 's|^\./||' | grep -v '^\.git/') + +for f in $files; do + case $f in + COPYING | COPYING.LIB | manual/fdl-1.3.texi | manual/lgpl-2.1.texi) + # Licenses imported verbatim from FSF sources. + ;; + manual/texinfo.tex | scripts/config.guess | scripts/config.sub \ + | scripts/install-sh | scripts/mkinstalldirs | scripts/move-if-change) + # Other files imported verbatim from other GNU repositories. + ;; + po/*.po) + # Files imported verbatim from the Translation Project. + ;; + INSTALL | intl/plural.c | locale/C-translit.h \ + | locale/programs/charmap-kw.h | locale/programs/locfile-kw.h \ + | po/libc.pot | sysdeps/gnu/errlist.c) + # Generated files. + ;; + configure | */configure | preconfigure | */preconfigure) + # Possibly generated files. + if ! [ -f "$f.ac" ]; then + "$update_script" "$f" + fi + ;; + grp/initgroups.c | misc/bits/stab.def | posix/regex.h \ + | sysdeps/wordsize-32/divdi3.c) + # Pre-1991 gaps in copyright years, so cannot use a single range. + UPDATE_COPYRIGHT_USE_INTERVALS=1 "$update_script" "$f" + ;; + *) + "$update_script" "$f" + ;; + esac +done diff --git a/scripts/versions.awk b/scripts/versions.awk index 22b1c8edc8..7cc61d1a7f 100644 --- a/scripts/versions.awk +++ b/scripts/versions.awk @@ -1,5 +1,5 @@ # Combine version map fragments into version scripts for our shared objects. -# Copyright (C) 1998,99,2000,2002,2005 Free Software Foundation, Inc. +# Copyright (C) 1998-2014 Free Software Foundation, Inc. # Written by Ulrich Drepper <drepper@cygnus.com>, 1998. # This script expects the following variables to be defined: |