+++ /dev/null
-tzselect: eliminate ksh-dependency
-
-This is an adapted version of a patch originally
-by Peter Seebach <peter.seebach@windriver.com> found here:
-http://www.eglibc.org/archives/patches/msg00671.html
-
-Upstream-Status: Pending
-
-Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
-
-Index: libc/timezone/tzselect.ksh
-===================================================================
---- libc.orig/timezone/tzselect.ksh 2012-11-17 09:50:14.000000000 -0800
-+++ libc/timezone/tzselect.ksh 2013-01-03 22:46:26.423844259 -0800
-@@ -1,4 +1,4 @@
--#!/bin/bash
-+#!/bin/sh
-
- PKGVERSION='(tzcode) '
- TZVERSION=see_Makefile
-@@ -11,23 +11,80 @@
-
- # Porting notes:
- #
--# This script requires a Posix-like shell with the extension of a
--# 'select' statement. The 'select' statement was introduced in the
--# Korn shell and is available in Bash and other shell implementations.
--# If your host lacks both Bash and the Korn shell, you can get their
--# source from one of these locations:
-+# func_select allows this script to run on shells (such as busybox ash)
-+# which lack the ksh "select" builtin.
- #
--# Bash <http://www.gnu.org/software/bash/bash.html>
--# Korn Shell <http://www.kornshell.com/>
--# Public Domain Korn Shell <http://www.cs.mun.ca/~michael/pdksh/>
--#
--# This script also uses several features of modern awk programs.
-+# This script uses several features of modern awk programs.
- # If your host lacks awk, or has an old awk that does not conform to Posix,
- # you can use either of the following free programs instead:
- #
- # Gawk (GNU awk) <http://www.gnu.org/software/gawk/>
- # mawk <http://invisible-island.net/mawk/>
-
-+# Implement ksh-style select in POSIX shell
-+
-+# We need a mostly-portable echo-n.
-+case `echo -n "foo\c"` in
-+*n*c*) func_echo_n() { echo "$*"; } ;;
-+*n*) func_echo_n() { echo "$*\c"; } ;;
-+*) func_echo_n() { echo -n "$*"; } ;;
-+esac
-+
-+# Synopsis: Replace "select foo in list" with "while func_select foo in list"
-+# and this works just like ksh, so far as I know.
-+func_select () {
-+ func_select_args=0
-+ if expr "$1" : "[_a-zA-Z][_a-zA-Z0-9]*$" > /dev/null; then
-+ func_select_var=$1
-+ else
-+ echo >&2 "func_select: '$1' is not a valid variable name."
-+ return 1
-+ fi
-+ shift 1
-+ case $1 in
-+ in) shift 1;;
-+ *) echo >&2 "func_select: usage: func_select var in ... (you must provide
-+arguments)"; return 1;;
-+ esac
-+ case $# in
-+ 0) echo >&2 "func_select: usage: func_select var in ..."; return 1;;
-+ esac
-+ for func_select_arg
-+ do
-+ func_select_args=`expr $func_select_args + 1`
-+ eval func_select_a_$func_select_args=\$func_select_arg
-+ done
-+ REPLY=""
-+ while :
-+ do
-+ if test -z "$REPLY"; then
-+ func_select_i=1
-+ while test $func_select_i -le $func_select_args
-+ do
-+ eval echo "\"\$func_select_i) \$func_select_a_$func_select_i\""
-+ func_select_i=`expr $func_select_i + 1`
-+ done
-+ fi
-+ func_echo_n "${PS3-#? }" >&2
-+ if read REPLY; then
-+ if test -n "${REPLY}"; then
-+ if expr "$REPLY" : '[1-9][0-9]*$' > /dev/null; then
-+ if test "$REPLY" -ge 1 && test "$REPLY" -le $func_select_args; then
-+ eval $func_select_var=\$func_select_a_$REPLY
-+ else
-+ eval $func_select_var=
-+ fi
-+ else
-+ eval $func_select_var=
-+ fi
-+ return 0
-+ fi
-+ else
-+ eval $func_select_var=
-+ return 1
-+ fi
-+ done
-+}
-
- # Specify default values for environment variables if they are unset.
- : ${AWK=awk}
-@@ -72,7 +129,7 @@
-
-
- # Work around a bug in bash 1.14.7 and earlier, where $PS3 is sent to stdout.
--case $(echo 1 | (select x in x; do break; done) 2>/dev/null) in
-+case $(echo 1 | (while func_select x in x; do break; done) 2>/dev/null) in
- ?*) PS3=
- esac
-
-@@ -92,7 +149,7 @@
-
- echo >&2 'Please select a continent or ocean.'
-
-- select continent in \
-+ while func_select continent in \
- Africa \
- Americas \
- Antarctica \
-@@ -172,7 +229,7 @@
- case $countries in
- *"$newline"*)
- echo >&2 'Please select a country.'
-- select country in $countries
-+ while func_select country in $countries
- do
- case $country in
- '') echo >&2 'Please enter a number in range.';;
-@@ -211,7 +268,7 @@
- *"$newline"*)
- echo >&2 'Please select one of the following' \
- 'time zone regions.'
-- select region in $regions
-+ while func_select region in $regions
- do
- case $region in
- '') echo >&2 'Please enter a number in range.';;
-@@ -288,7 +345,7 @@
- echo >&2 "Is the above information OK?"
-
- ok=
-- select ok in Yes No
-+ while func_select ok in Yes No
- do
- case $ok in
- '') echo >&2 'Please enter 1 for Yes, or 2 for No.';;
Index: libc/EGLIBC.cross-building
===================================================================
---- libc.orig/EGLIBC.cross-building 2007-04-20 16:15:03.000000000 -0700
-+++ libc/EGLIBC.cross-building 2013-06-26 00:45:15.788885570 -0700
-@@ -243,9 +243,29 @@
+--- libc.orig/EGLIBC.cross-building
++++ libc/EGLIBC.cross-building
+@@ -243,9 +243,29 @@ full EGLIBC build:
> $src/libc/configure \
> --prefix=/usr \
> --with-headers=$sysroot/usr/include \
$ PATH=$tools/bin:$PATH make
$ PATH=$tools/bin:$PATH make install install_root=$sysroot
-Index: libc/configure.in
+Index: libc/configure.ac
===================================================================
---- libc.orig/configure.in 2013-06-24 15:42:26.000000000 -0700
-+++ libc/configure.in 2013-06-26 00:45:15.792885570 -0700
-@@ -127,6 +127,16 @@
+--- libc.orig/configure.ac
++++ libc/configure.ac
+@@ -127,6 +127,16 @@ AC_ARG_WITH([headers],
[sysheaders=''])
AC_SUBST(sysheaders)
AC_HELP_STRING([--with-default-link],
Index: libc/config.make.in
===================================================================
---- libc.orig/config.make.in 2013-04-28 08:21:50.000000000 -0700
-+++ libc/config.make.in 2013-06-26 00:45:15.792885570 -0700
-@@ -45,6 +45,8 @@
+--- libc.orig/config.make.in
++++ libc/config.make.in
+@@ -45,6 +45,8 @@ sysincludes = @SYSINCLUDES@
c++-sysincludes = @CXX_SYSINCLUDES@
all-warnings = @all_warnings@
have-Bgroup = @libc_cv_Bgroup@
Index: libc/options-config/config-postproc.pl
===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ libc/options-config/config-postproc.pl 2013-06-26 00:45:15.792885570 -0700
+--- /dev/null
++++ libc/options-config/config-postproc.pl
@@ -0,0 +1,54 @@
+#!/usr/bin/perl
+
+}
Index: libc/options-config/config-preproc.pl
===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ libc/options-config/config-preproc.pl 2013-06-26 00:45:15.792885570 -0700
+--- /dev/null
++++ libc/options-config/config-preproc.pl
@@ -0,0 +1,8 @@
+#!/usr/bin/perl
+
+}
Index: libc/options-config/Makefile
===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ libc/options-config/Makefile 2013-06-26 00:45:15.792885570 -0700
+--- /dev/null
++++ libc/options-config/Makefile
@@ -0,0 +1,55 @@
+# ===========================================================================
+# EGLIBC option-groups configuration targets
+endif
Index: libc/option-groups.def
===================================================================
---- libc.orig/option-groups.def 2013-05-17 17:12:09.000000000 -0700
-+++ libc/option-groups.def 2013-06-26 00:45:15.796885570 -0700
+--- libc.orig/option-groups.def
++++ libc/option-groups.def
@@ -4,19 +4,19 @@
#
# An entry of the form:
help
This option group includes the functions specified by RFC 3542,
"Advanced Sockets Application Program Interface (API) for
-@@ -71,7 +71,7 @@
+@@ -71,7 +71,7 @@ config OPTION_EGLIBC_ADVANCED_INET6
inet6_rth_segments
inet6_rth_space
bool "Functions for producing backtraces"
help
This option group includes functions for producing a list of
-@@ -85,7 +85,7 @@
+@@ -85,7 +85,7 @@ config OPTION_EGLIBC_BACKTRACE
backtrace_symbols
backtrace_symbols_fd
bool "Use extensive inline code"
help
This option group specifies whether certain pieces of code
-@@ -93,7 +93,7 @@
+@@ -93,7 +93,7 @@ config OPTION_EGLIBC_BIG_MACROS
group is not selected, function calls will be used instead,
hence reducing the library footprint.
bool "BSD-specific functions, and their compatibility stubs"
help
This option group includes functions specific to BSD kernels.
-@@ -109,10 +109,9 @@
+@@ -109,10 +109,9 @@ config OPTION_EGLIBC_BSD
revoke
setlogin
help
This option group does not include any C library functions;
instead, it controls which EGLIBC tests an ordinary 'make
-@@ -121,23 +120,22 @@
+@@ -121,23 +120,22 @@ config OPTION_EGLIBC_CXX_TESTS
run.
The standard C++ library depends on the math library 'libm' and
This option group includes support for character sets other
than ASCII (ANSI_X3.4-1968) and Unicode and ISO-10646 in their
various encodings. This affects both the character sets
-@@ -198,16 +196,16 @@
+@@ -198,16 +196,16 @@ config OPTION_EGLIBC_CHARSETS
WCHAR_T - EGLIBC's internal form (target-endian,
32-bit ISO 10646)
help
This option group provides ultra fast DES-based implementation of
the `crypt' function. When this option group is disabled,
-@@ -216,7 +214,7 @@
+@@ -216,7 +214,7 @@ config OPTION_EGLIBC_CRYPT_UFC
errno to ENOSYS if /salt/ passed does not correspond to either MD5,
SHA-256 or SHA-512 algorithm.
bool "Functions for accessing the mail aliases database"
help
This option group includues functions for looking up mail
-@@ -233,7 +231,7 @@
+@@ -233,7 +231,7 @@ config OPTION_EGLIBC_DB_ALIASES
When this option group is disabled, the NSS service libraries
also lack support for querying their mail alias tables.
bool "Functions for handling envz-style environment vectors."
help
This option group contains functions for creating and operating
-@@ -248,7 +246,7 @@
+@@ -248,7 +246,7 @@ config OPTION_EGLIBC_ENVZ
envz_entry envz_remove
envz_get envz_strip
bool "Functions for converting floating-point numbers to strings"
help
This option group includes functions for converting
-@@ -262,14 +260,14 @@
+@@ -262,14 +260,14 @@ config OPTION_EGLIBC_FCVT
fcvt_r qfcvt_r
gcvt qgcvt
bool "Access functions for 'fstab'"
help
This option group includes functions for reading the mount
-@@ -283,7 +281,7 @@
+@@ -283,7 +281,7 @@ config OPTION_EGLIBC_FSTAB
getfsent setfsent
getfsfile
bool "Functions for traversing file hierarchies"
help
This option group includes functions for traversing file
-@@ -297,9 +295,9 @@
+@@ -297,9 +295,9 @@ config OPTION_EGLIBC_FTRAVERSE
fts_set nftw64
fts_close
help
This function group includes the 'getlogin' and 'getlogin_r'
functions, which return the user name associated by the login
-@@ -309,17 +307,17 @@
+@@ -309,17 +307,17 @@ config OPTION_EGLIBC_GETLOGIN
fall back on 'getlogin' to find the user's login name for tilde
expansion when the 'HOME' environment variable is not set.
installation and API changes as follows:
- The following libraries are not installed:
-@@ -439,14 +437,14 @@
+@@ -439,14 +437,14 @@ config OPTION_EGLIBC_INET
use Unix-domain sockets to communicate with the syslog daemon;
syslog is valuable in non-networked contexts.
bool "libm (math library)"
help
This option group includes the 'libm' library, containing
-@@ -464,7 +462,7 @@
+@@ -464,7 +462,7 @@ config OPTION_EGLIBC_LIBM
group, you will not be able to build 'libstdc++' against the
resulting EGLIBC installation.
bool "Locale definitions"
help
This option group includes all locale definitions other than
-@@ -472,17 +470,17 @@
+@@ -472,17 +470,17 @@ config OPTION_EGLIBC_LOCALES
only the "C" locale is supported.
functions are omitted from libc:
duplocale localeconv nl_langinfo rpmatch strfmon_l
-@@ -491,46 +489,43 @@
+@@ -491,46 +489,43 @@ config OPTION_EGLIBC_LOCALE_CODE
Furthermore, only the LC_CTYPE and LC_TIME categories of the
standard "C" locale are available.
This option group includes support for the 'nsswitch' facility.
With this option group enabled, all EGLIBC functions for
accessing various system databases (passwords and groups;
-@@ -544,12 +539,12 @@
+@@ -544,12 +539,12 @@ config OPTION_EGLIBC_NSSWITCH
'option-groups.config' file must set the following two
variables:
produces a C library that uses the nsswitch service
libraries to search for database entries as this file
specifies, instead of consulting '/etc/nsswitch.conf' at run
-@@ -567,7 +562,7 @@
+@@ -567,7 +562,7 @@ config OPTION_EGLIBC_NSSWITCH
you will probably want to delete references to databases not
needed on your system.
The EGLIBC build process uses this file to decide which
functions to make available from which service libraries.
-@@ -585,28 +580,28 @@
+@@ -585,28 +580,28 @@ config OPTION_EGLIBC_NSSWITCH
Be sure to mention each function in each service you wish to
use. If you do not mention a service's function here, the
EGLIBC database access functions will not find it, even if
help
This option group includes functions for running commands on
remote machines via the 'rsh' protocol, and doing authentication
-@@ -622,7 +617,7 @@
+@@ -622,7 +617,7 @@ config OPTION_EGLIBC_RCMD
rresvport ruserpass
rresvport_af
bool "Runtime linker debug print outs"
help
This option group enables debug output of the runtime linker
-@@ -633,7 +628,7 @@
+@@ -633,7 +628,7 @@ config OPTION_EGLIBC_RTLD_DEBUG
the `ldd' utility which may also be used by the prelinker.
In particular, the `--unused' ldd option will not work correctly.
bool "Support for POSIX posix_spawn functions"
help
This option group includes the POSIX functions for executing
-@@ -669,7 +664,7 @@
+@@ -669,7 +664,7 @@ config OPTION_EGLIBC_SPAWN
disabled, those programs will only operate on uncompressed
charmap files.
bool "Support for accessing STREAMS."
help
This option group includes functions for reading and writing
-@@ -685,14 +680,14 @@
+@@ -685,14 +680,14 @@ config OPTION_EGLIBC_STREAMS
isastream fdetach
putmsg
bool "Older access functions for 'utmp' login records"
help
This option group includes the older 'utent' family of
-@@ -719,9 +714,9 @@
+@@ -719,9 +714,9 @@ config OPTION_EGLIBC_UTMP
libutil.so (and libutil.a)
help
This option group includes the POSIX functions for reading and
writing user login records in the 'utmp' file (usually
-@@ -742,21 +737,21 @@
+@@ -742,21 +737,21 @@ config OPTION_EGLIBC_UTMPX
updwtmpx
utmpxname
This option group includes the following functions:
-@@ -778,14 +773,14 @@
+@@ -778,14 +773,14 @@ config OPTION_POSIX_C_LANG_WIDE_CHAR
mbrlen wcscoll wcstol
mbrtowc wcscpy wcstold
omitted from libc:
re_comp re_max_failures regcomp
-@@ -799,9 +794,9 @@
+@@ -799,9 +794,9 @@ config OPTION_POSIX_REGEXP
<regexp.h> header file, 'compile', 'step', and 'advance', is
omitted.
help
This option group specifies which regular expression
library to use. The choice is between regex
-@@ -810,9 +805,9 @@
+@@ -810,9 +805,9 @@ config OPTION_POSIX_REGEXP_GLIBC
optimized for speed; regex from libiberty is more than twice
as small while still is enough for most practical purposes.
wide characters to and from <stdio.h> streams.
Index: libc/Makefile
===================================================================
---- libc.orig/Makefile 2013-06-04 08:48:26.000000000 -0700
-+++ libc/Makefile 2013-06-26 00:45:15.796885570 -0700
-@@ -24,6 +24,7 @@
+--- libc.orig/Makefile
++++ libc/Makefile
+@@ -24,6 +24,7 @@ endif
include Makeconfig
.PHONY: all
Index: libc/configure
===================================================================
---- libc.orig/configure 2013-06-24 15:42:26.000000000 -0700
-+++ libc/configure 2013-06-26 00:45:15.800885570 -0700
-@@ -622,6 +622,7 @@
+--- libc.orig/configure
++++ libc/configure
+@@ -621,6 +621,7 @@ KSH
libc_cv_have_bash2
BASH_SHELL
libc_cv_gcc_static_libgcc
CXX_SYSINCLUDES
SYSINCLUDES
AUTOCONF
-@@ -734,6 +735,7 @@
+@@ -734,6 +735,7 @@ with_fp
with_binutils
with_selinux
with_headers
with_default_link
enable_sanity_checks
enable_shared
-@@ -1432,6 +1434,9 @@
+@@ -1438,6 +1440,9 @@ Optional Packages:
--with-selinux if building with SELinux support
--with-headers=PATH location of system headers to use (for example
/usr/src/linux/include) [default=compiler default]
--with-default-link do not use explicit linker scripts
--with-cpu=CPU select code for CPU variant
-@@ -3395,6 +3400,14 @@
+@@ -3401,6 +3406,14 @@ fi
if test "${with_default_link+set}" = set; then :
Index: libc/EGLIBC.option-groups
===================================================================
---- libc.orig/EGLIBC.option-groups 2007-04-13 17:50:17.000000000 -0700
-+++ libc/EGLIBC.option-groups 2013-06-26 00:45:15.800885570 -0700
-@@ -56,33 +56,9 @@
+--- libc.orig/EGLIBC.option-groups
++++ libc/EGLIBC.option-groups
+@@ -56,33 +56,9 @@ disable option groups one by one, until
The Option Groups
The POSIX.1-2001 specification includes a suggested partition of all
the functions in the POSIX C API into option groups: math functions
-@@ -110,6 +86,18 @@
+@@ -110,6 +86,18 @@ data, but include mathematical functions
OPTION_EGLIBC_LOCALES = n
OPTION_EGLIBC_LIBM = y
In general, each option group variable controls whether a given set of
object files in EGLIBC is compiled and included in the final
libraries, or omitted from the build.
-@@ -132,22 +120,3 @@
+@@ -132,22 +120,3 @@ under development.
We have used the system to subset some portions of EGLIBC's
functionality. It needs to be extended to cover more of the library.