summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config/binutils/binutils.in.24
-rw-r--r--config/cc/gcc.in.23
-rw-r--r--config/companion_libs.in6
-rw-r--r--config/companion_libs/zlib.in19
-rw-r--r--config/kernel/linux.in14
-rw-r--r--config/libc/glibc.in6
-rw-r--r--config/libc/uClibc.in6
-rw-r--r--contrib/uClibc-defconfigs/uClibc-ng.config1
-rw-r--r--patches/elf2flt/9dbc458c6122c495bbdec8dc975a15c9d39e5ff2/0001-Check-for-libz-first.patch294
-rw-r--r--patches/glibc/2.25/100-Cygwin-doesnt-have-stat64.patch13
-rw-r--r--patches/glibc/2.25/110-sh-fix-gcc6.patch28
-rw-r--r--patches/glibc/2.25/120-Fix-build-with-enable-static-nss.patch30
-rw-r--r--patches/glibc/2.25/910-typedef-caddr.patch15
-rw-r--r--patches/uClibc/0.9.33.2/999-make-olddefconfig.patch41
-rw-r--r--samples/powerpc-unknown-linux-uclibc,m68k-unknown-uclinux-uclibc/crosstool.config7
-rw-r--r--samples/powerpc-unknown-linux-uclibc,m68k-unknown-uclinux-uclibc/reported.by3
-rwxr-xr-xscripts/addToolVersion.sh3
-rw-r--r--scripts/build/companion_libs/050-zlib.sh108
-rw-r--r--scripts/build/companion_libs/100-gmp.sh3
-rw-r--r--scripts/build/companion_libs/110-mpfr.sh1
-rw-r--r--scripts/build/companion_libs/121-isl.sh1
-rw-r--r--scripts/build/companion_libs/130-cloog.sh1
-rw-r--r--scripts/build/companion_libs/140-mpc.sh1
-rw-r--r--scripts/build/companion_libs/200-libelf.sh1
-rw-r--r--scripts/build/libc/uClibc.sh2
-rw-r--r--scripts/functions8
-rwxr-xr-xscripts/gen_in_frags.sh2
27 files changed, 593 insertions, 28 deletions
diff --git a/config/binutils/binutils.in.2 b/config/binutils/binutils.in.2
index 7a1291f..dfb00bd 100644
--- a/config/binutils/binutils.in.2
+++ b/config/binutils/binutils.in.2
@@ -2,6 +2,10 @@
if ARCH_BINFMT_FLAT
+config ELF2FLT_REQUIRES_ZLIB
+ def_bool y
+ select ZLIB
+
comment "elf2flt"
choice
diff --git a/config/cc/gcc.in.2 b/config/cc/gcc.in.2
index 2c5d45e..aad488b 100644
--- a/config/cc/gcc.in.2
+++ b/config/cc/gcc.in.2
@@ -81,6 +81,9 @@ config CC_GCC_SYSTEM_ZLIB
help
Do not use bundled zlib, and use the zlib already available for
the host (eg. the system library).
+
+ If zlib is built as a companion library, selecting this option
+ will use it.
If you want to build a static toolchain, you will need to also
install the static version of zlib for your host.
diff --git a/config/companion_libs.in b/config/companion_libs.in
index 7d1d4f7..02f2ecb 100644
--- a/config/companion_libs.in
+++ b/config/companion_libs.in
@@ -119,6 +119,12 @@ config NCURSES
config NCURSES_TARGET
bool
+config ZLIB
+ bool "Build local zlib"
+
+if ZLIB
+source "config/companion_libs/zlib.in"
+endif
if LIBICONV
source "config/companion_libs/libiconv.in"
endif
diff --git a/config/companion_libs/zlib.in b/config/companion_libs/zlib.in
new file mode 100644
index 0000000..df93682
--- /dev/null
+++ b/config/companion_libs/zlib.in
@@ -0,0 +1,19 @@
+# Zlib options
+
+choice
+ bool
+ prompt "zlib version"
+# Don't remove next line
+# CT_INSERT_VERSION_BELOW
+
+config ZLIB_V_1_2_11
+ bool
+ prompt "1.2.11"
+
+endchoice
+
+config ZLIB_VERSION
+ string
+# Don't remove next line
+# CT_INSERT_VERSION_STRING_BELOW
+ default "1.2.11" if ZLIB_V_1_2_11
diff --git a/config/kernel/linux.in b/config/kernel/linux.in
index 56756e7..940d92e 100644
--- a/config/kernel/linux.in
+++ b/config/kernel/linux.in
@@ -46,7 +46,7 @@ choice
config KERNEL_V_4_9
bool
- prompt "4.9.5"
+ prompt "4.9.8"
config KERNEL_V_4_8
bool
@@ -55,7 +55,7 @@ config KERNEL_V_4_8
config KERNEL_V_4_4
bool
- prompt "4.4.44"
+ prompt "4.4.47"
config KERNEL_V_4_1
bool
@@ -63,7 +63,7 @@ config KERNEL_V_4_1
config KERNEL_V_3_18
bool
- prompt "3.18.47"
+ prompt "3.18.47 (EOL)"
config KERNEL_V_3_16
bool
@@ -71,7 +71,7 @@ config KERNEL_V_3_16
config KERNEL_V_3_12
bool
- prompt "3.12.69"
+ prompt "3.12.70"
config KERNEL_V_3_10
bool
@@ -91,13 +91,13 @@ config KERNEL_VERSION
string
# Don't remove next line
# CT_INSERT_VERSION_STRING_BELOW
- default "4.9.5" if KERNEL_V_4_9
+ default "4.9.8" if KERNEL_V_4_9
default "4.8.17" if KERNEL_V_4_8
- default "4.4.44" if KERNEL_V_4_4
+ default "4.4.47" if KERNEL_V_4_4
default "4.1.38" if KERNEL_V_4_1
default "3.18.47" if KERNEL_V_3_18
default "3.16.39" if KERNEL_V_3_16
- default "3.12.69" if KERNEL_V_3_12
+ default "3.12.70" if KERNEL_V_3_12
default "3.10.104" if KERNEL_V_3_10
default "3.4.113" if KERNEL_V_3_4
default "3.2.84" if KERNEL_V_3_2
diff --git a/config/libc/glibc.in b/config/libc/glibc.in
index d6bd013..767cbbf 100644
--- a/config/libc/glibc.in
+++ b/config/libc/glibc.in
@@ -71,6 +71,11 @@ choice
# Don't remove next line
# CT_INSERT_VERSION_BELOW
+config LIBC_GLIBC_V_2_25
+ bool
+ prompt "2.25"
+ select LIBC_GLIBC_2_23_or_later
+
config LIBC_GLIBC_V_2_24
bool
prompt "2.24"
@@ -136,6 +141,7 @@ config LIBC_VERSION
string
# Don't remove next line
# CT_INSERT_VERSION_STRING_BELOW
+ default "2.25" if LIBC_GLIBC_V_2_25
default "2.24" if LIBC_GLIBC_V_2_24
default "2.23" if LIBC_GLIBC_V_2_23
default "2.22" if LIBC_GLIBC_V_2_22
diff --git a/config/libc/uClibc.in b/config/libc/uClibc.in
index 219426a..e830662 100644
--- a/config/libc/uClibc.in
+++ b/config/libc/uClibc.in
@@ -35,7 +35,8 @@ choice
prompt "uClibc Version Name"
config LIBC_UCLIBC_CUSTOM_UCLIBC
- bool "uClibc"
+ bool "uClibc (OBSOLETE)"
+ depends on OBSOLETE
select LIBC_UCLIBC_0_9_33_2_or_later
config LIBC_UCLIBC_CUSTOM_UCLIBC_NG
@@ -100,7 +101,8 @@ config LIBC_UCLIBC_NG_V_1_0_20
config LIBC_UCLIBC_V_0_9_33_2
bool
- prompt "0.9.33.2"
+ prompt "0.9.33.2 (OBSOLETE)"
+ depends on OBSOLETE
select LIBC_UCLIBC_0_9_33_2_or_later
endchoice
diff --git a/contrib/uClibc-defconfigs/uClibc-ng.config b/contrib/uClibc-defconfigs/uClibc-ng.config
index c17603d..1f0a8c1 100644
--- a/contrib/uClibc-defconfigs/uClibc-ng.config
+++ b/contrib/uClibc-defconfigs/uClibc-ng.config
@@ -5,7 +5,6 @@ KERNEL_HEADERS="/usr/src/linux/include"
LDSO_RUNPATH=y
LDSO_RUNPATH_OF_EXECUTABLE=y
MALLOC_GLIBC_COMPAT=y
-UCLIBC_HAS_OBSTACK=y
UCLIBC_HAS_UTMPX=y
UCLIBC_HAS_UTMP=y
UCLIBC_SUSV2_LEGACY=y
diff --git a/patches/elf2flt/9dbc458c6122c495bbdec8dc975a15c9d39e5ff2/0001-Check-for-libz-first.patch b/patches/elf2flt/9dbc458c6122c495bbdec8dc975a15c9d39e5ff2/0001-Check-for-libz-first.patch
new file mode 100644
index 0000000..f947e1f
--- /dev/null
+++ b/patches/elf2flt/9dbc458c6122c495bbdec8dc975a15c9d39e5ff2/0001-Check-for-libz-first.patch
@@ -0,0 +1,294 @@
+From 9848b4f5b207d762a75d6cf0ccbb59c6486a1616 Mon Sep 17 00:00:00 2001
+From: Alexey Neyman <stilor@att.net>
+Date: Fri, 3 Feb 2017 22:01:48 -0800
+Subject: [PATCH] Check for libz first
+
+If building statically, linking libz before libbfd results in unresolved symbols
+(compress/compressBound in libbfd.a).
+
+Signed-off-by: Alexey Neyman <stilor@att.net>
+---
+ configure | 108 +++++++++++++++++++++++++++++++++--------------------------
+ configure.ac | 10 +++---
+ 2 files changed, 65 insertions(+), 53 deletions(-)
+
+diff --git a/configure b/configure
+index d8d14be..df612cb 100755
+--- a/configure
++++ b/configure
+@@ -675,6 +675,7 @@ infodir
+ docdir
+ oldincludedir
+ includedir
++runstatedir
+ localstatedir
+ sharedstatedir
+ sysconfdir
+@@ -758,6 +759,7 @@ datadir='${datarootdir}'
+ sysconfdir='${prefix}/etc'
+ sharedstatedir='${prefix}/com'
+ localstatedir='${prefix}/var'
++runstatedir='${localstatedir}/run'
+ includedir='${prefix}/include'
+ oldincludedir='/usr/include'
+ docdir='${datarootdir}/doc/${PACKAGE}'
+@@ -1010,6 +1012,15 @@ do
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+
++ -runstatedir | --runstatedir | --runstatedi | --runstated \
++ | --runstate | --runstat | --runsta | --runst | --runs \
++ | --run | --ru | --r)
++ ac_prev=runstatedir ;;
++ -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
++ | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
++ | --run=* | --ru=* | --r=*)
++ runstatedir=$ac_optarg ;;
++
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+@@ -1147,7 +1158,7 @@ fi
+ for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
+ datadir sysconfdir sharedstatedir localstatedir includedir \
+ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
+- libdir localedir mandir
++ libdir localedir mandir runstatedir
+ do
+ eval ac_val=\$$ac_var
+ # Remove trailing slashes.
+@@ -1300,6 +1311,7 @@ Fine tuning of the installation directories:
+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
++ --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
+ --libdir=DIR object code libraries [EPREFIX/lib]
+ --includedir=DIR C header files [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
+@@ -3779,14 +3791,14 @@ if test "$ac_binutils_build_dir" != "NONE"; then
+ test "$ac_binutils_include_dir" = "NONE" && ac_binutils_include_dir="$ac_binutils_build_dir/include"
+ fi
+
+-if test "$ac_libiberty" = "NONE"; then
+- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objalloc_create in -liberty" >&5
+-$as_echo_n "checking for objalloc_create in -liberty... " >&6; }
+-if ${ac_cv_lib_iberty_objalloc_create+:} false; then :
++if test "$ac_zlib_prefix" = "NONE"; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for deflate in -lz" >&5
++$as_echo_n "checking for deflate in -lz... " >&6; }
++if ${ac_cv_lib_z_deflate+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ ac_check_lib_save_LIBS=$LIBS
+-LIBS="-liberty $LIBS"
++LIBS="-lz $LIBS"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
+
+@@ -3796,47 +3808,46 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-char objalloc_create ();
++char deflate ();
+ int
+ main ()
+ {
+-return objalloc_create ();
++return deflate ();
+ ;
+ return 0;
+ }
+ _ACEOF
+ if ac_fn_c_try_link "$LINENO"; then :
+- ac_cv_lib_iberty_objalloc_create=yes
++ ac_cv_lib_z_deflate=yes
+ else
+- ac_cv_lib_iberty_objalloc_create=no
++ ac_cv_lib_z_deflate=no
+ fi
+ rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_iberty_objalloc_create" >&5
+-$as_echo "$ac_cv_lib_iberty_objalloc_create" >&6; }
+-if test "x$ac_cv_lib_iberty_objalloc_create" = xyes; then :
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_deflate" >&5
++$as_echo "$ac_cv_lib_z_deflate" >&6; }
++if test "x$ac_cv_lib_z_deflate" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+-#define HAVE_LIBIBERTY 1
++#define HAVE_LIBZ 1
+ _ACEOF
+
+- LIBS="-liberty $LIBS"
++ LIBS="-lz $LIBS"
+
+ fi
+
+- ac_libiberty=auto
+ else
+- LIBS="$ac_libiberty $LIBS"
++ LIBS="-L$ac_zlib_prefix/lib -lz $LIBS"
+ fi
+-if test "$ac_libbfd" = "NONE"; then
+- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bfd_openr in -lbfd" >&5
+-$as_echo_n "checking for bfd_openr in -lbfd... " >&6; }
+-if ${ac_cv_lib_bfd_bfd_openr+:} false; then :
++if test "$ac_libiberty" = "NONE"; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objalloc_create in -liberty" >&5
++$as_echo_n "checking for objalloc_create in -liberty... " >&6; }
++if ${ac_cv_lib_iberty_objalloc_create+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ ac_check_lib_save_LIBS=$LIBS
+-LIBS="-lbfd $LIBS"
++LIBS="-liberty $LIBS"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
+
+@@ -3846,47 +3857,47 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-char bfd_openr ();
++char objalloc_create ();
+ int
+ main ()
+ {
+-return bfd_openr ();
++return objalloc_create ();
+ ;
+ return 0;
+ }
+ _ACEOF
+ if ac_fn_c_try_link "$LINENO"; then :
+- ac_cv_lib_bfd_bfd_openr=yes
++ ac_cv_lib_iberty_objalloc_create=yes
+ else
+- ac_cv_lib_bfd_bfd_openr=no
++ ac_cv_lib_iberty_objalloc_create=no
+ fi
+ rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfd_bfd_openr" >&5
+-$as_echo "$ac_cv_lib_bfd_bfd_openr" >&6; }
+-if test "x$ac_cv_lib_bfd_bfd_openr" = xyes; then :
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_iberty_objalloc_create" >&5
++$as_echo "$ac_cv_lib_iberty_objalloc_create" >&6; }
++if test "x$ac_cv_lib_iberty_objalloc_create" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+-#define HAVE_LIBBFD 1
++#define HAVE_LIBIBERTY 1
+ _ACEOF
+
+- LIBS="-lbfd $LIBS"
++ LIBS="-liberty $LIBS"
+
+ fi
+
+- ac_libbfd=auto
++ ac_libiberty=auto
+ else
+- LIBS="$ac_libbfd $LIBS"
++ LIBS="$ac_libiberty $LIBS"
+ fi
+-if test "$ac_zlib_prefix" = "NONE"; then
+- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for deflate in -lz" >&5
+-$as_echo_n "checking for deflate in -lz... " >&6; }
+-if ${ac_cv_lib_z_deflate+:} false; then :
++if test "$ac_libbfd" = "NONE"; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bfd_openr in -lbfd" >&5
++$as_echo_n "checking for bfd_openr in -lbfd... " >&6; }
++if ${ac_cv_lib_bfd_bfd_openr+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ ac_check_lib_save_LIBS=$LIBS
+-LIBS="-lz $LIBS"
++LIBS="-lbfd $LIBS"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
+
+@@ -3896,37 +3907,38 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-char deflate ();
++char bfd_openr ();
+ int
+ main ()
+ {
+-return deflate ();
++return bfd_openr ();
+ ;
+ return 0;
+ }
+ _ACEOF
+ if ac_fn_c_try_link "$LINENO"; then :
+- ac_cv_lib_z_deflate=yes
++ ac_cv_lib_bfd_bfd_openr=yes
+ else
+- ac_cv_lib_z_deflate=no
++ ac_cv_lib_bfd_bfd_openr=no
+ fi
+ rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_deflate" >&5
+-$as_echo "$ac_cv_lib_z_deflate" >&6; }
+-if test "x$ac_cv_lib_z_deflate" = xyes; then :
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfd_bfd_openr" >&5
++$as_echo "$ac_cv_lib_bfd_bfd_openr" >&6; }
++if test "x$ac_cv_lib_bfd_bfd_openr" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+-#define HAVE_LIBZ 1
++#define HAVE_LIBBFD 1
+ _ACEOF
+
+- LIBS="-lz $LIBS"
++ LIBS="-lbfd $LIBS"
+
+ fi
+
++ ac_libbfd=auto
+ else
+- LIBS="-L$ac_zlib_prefix/lib -lz $LIBS"
++ LIBS="$ac_libbfd $LIBS"
+ fi
+
+ bfd_include_dir=
+diff --git a/configure.ac b/configure.ac
+index dcf0f92..7dcc082 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -114,6 +114,11 @@ if test "$ac_binutils_build_dir" != "NONE"; then
+ fi
+
+ dnl Checks for libraries.
++if test "$ac_zlib_prefix" = "NONE"; then
++ AC_CHECK_LIB(z, deflate)
++else
++ LIBS="-L$ac_zlib_prefix/lib -lz $LIBS"
++fi
+ if test "$ac_libiberty" = "NONE"; then
+ AC_CHECK_LIB(iberty, objalloc_create)
+ ac_libiberty=auto
+@@ -126,11 +131,6 @@ if test "$ac_libbfd" = "NONE"; then
+ else
+ LIBS="$ac_libbfd $LIBS"
+ fi
+-if test "$ac_zlib_prefix" = "NONE"; then
+- AC_CHECK_LIB(z, deflate)
+-else
+- LIBS="-L$ac_zlib_prefix/lib -lz $LIBS"
+-fi
+
+ bfd_include_dir=
+ if test "$ac_bfd_include_dir" != "NONE"; then
+--
+2.9.3
+
diff --git a/patches/glibc/2.25/100-Cygwin-doesnt-have-stat64.patch b/patches/glibc/2.25/100-Cygwin-doesnt-have-stat64.patch
new file mode 100644
index 0000000..9097628
--- /dev/null
+++ b/patches/glibc/2.25/100-Cygwin-doesnt-have-stat64.patch
@@ -0,0 +1,13 @@
+--- glibc-2.22/sunrpc/rpc_main.c.orig 2015-08-05 07:42:21.000000000 +0100
++++ glibc-2.22/sunrpc/rpc_main.c 2015-10-21 23:37:31.071268800 +0100
+@@ -51,6 +51,10 @@
+ #include "rpc_scan.h"
+ #include "proto.h"
+
++#if defined(__CYGWIN__)
++#define stat64 stat
++#endif
++
+ #include "../version.h"
+ #define PACKAGE _libc_intl_domainname
+
diff --git a/patches/glibc/2.25/110-sh-fix-gcc6.patch b/patches/glibc/2.25/110-sh-fix-gcc6.patch
new file mode 100644
index 0000000..cacf390
--- /dev/null
+++ b/patches/glibc/2.25/110-sh-fix-gcc6.patch
@@ -0,0 +1,28 @@
+From 279acf7a059f2d2296f690d7f2d886bd0e404f30 Mon Sep 17 00:00:00 2001
+From: Alexey Neyman <stilor@att.net>
+Date: Wed, 25 Jan 2017 21:46:53 -0800
+Subject: [PATCH] sh: conditional is false in dl-conflict.c
+
+... ifdef it out, so that it doesn't create a call to abort().
+
+Signed-off-by: Alexey Neyman <stilor@att.net>
+---
+ sysdeps/sh/dl-machine.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/sysdeps/sh/dl-machine.h b/sysdeps/sh/dl-machine.h
+index 449deea..2b468af 100644
+--- a/sysdeps/sh/dl-machine.h
++++ b/sysdeps/sh/dl-machine.h
+@@ -389,7 +389,7 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
+ break;
+ case R_SH_DIR32:
+ {
+-#ifndef RTLD_BOOTSTRAP
++#if !defined RTLD_BOOTSTRAP && !defined RESOLVE_CONFLICT_FIND_MAP
+ /* This is defined in rtld.c, but nowhere in the static
+ libc.a; make the reference weak so static programs can
+ still link. This declaration cannot be done when
+--
+2.9.3
+
diff --git a/patches/glibc/2.25/120-Fix-build-with-enable-static-nss.patch b/patches/glibc/2.25/120-Fix-build-with-enable-static-nss.patch
new file mode 100644
index 0000000..59ab087
--- /dev/null
+++ b/patches/glibc/2.25/120-Fix-build-with-enable-static-nss.patch
@@ -0,0 +1,30 @@
+From 3a36c1eea4fa3b6f3b3b43f7eb91152383ae4ad8 Mon Sep 17 00:00:00 2001
+From: Alexey Neyman <stilor@att.net>
+Date: Tue, 24 Jan 2017 10:31:40 -0800
+Subject: [PATCH] Fix build with --enable-static-nss
+
+* nss/nsswitch.c (nscd_init_cb, is_nscd): make the #if around definitions
+ match those around use, to avoid "defined but not used" error.
+
+Signed-off-by: Alexey Neyman <stilor@att.net>
+---
+ ChangeLog | 5 +++++
+ nss/nsswitch.c | 2 +-
+ 2 files changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/nss/nsswitch.c b/nss/nsswitch.c
+index 0a65f6a..8f31658 100644
+--- a/nss/nsswitch.c
++++ b/nss/nsswitch.c
+@@ -94,7 +94,7 @@ static name_database *service_table;
+ static name_database_entry *defconfig_entries;
+
+
+-#ifdef USE_NSCD
++#if defined USE_NSCD && (!defined DO_STATIC_NSS || defined SHARED)
+ /* Nonzero if this is the nscd process. */
+ static bool is_nscd;
+ /* The callback passed to the init functions when nscd is used. */
+--
+2.9.3
+
diff --git a/patches/glibc/2.25/910-typedef-caddr.patch b/patches/glibc/2.25/910-typedef-caddr.patch
new file mode 100644
index 0000000..fc7979b
--- /dev/null
+++ b/patches/glibc/2.25/910-typedef-caddr.patch
@@ -0,0 +1,15 @@
+diff -urN glibc-2.23-orig/posix/sys/types.h glibc-2.23/posix/sys/types.h
+--- glibc-2.23-orig/posix/sys/types.h 2016-02-18 12:54:00.000000000 -0500
++++ glibc-2.23/posix/sys/types.h 2017-01-06 11:40:05.842147165 -0500
+@@ -113,7 +113,10 @@
+ #ifdef __USE_MISC
+ # ifndef __daddr_t_defined
+ typedef __daddr_t daddr_t;
++# if ! defined(caddr_t) && ! defined(__caddr_t_defined)
+ typedef __caddr_t caddr_t;
++# define __caddr_t_defined
++# endif
+ # define __daddr_t_defined
+ # endif
+ #endif
+
diff --git a/patches/uClibc/0.9.33.2/999-make-olddefconfig.patch b/patches/uClibc/0.9.33.2/999-make-olddefconfig.patch
new file mode 100644
index 0000000..8bc87ec
--- /dev/null
+++ b/patches/uClibc/0.9.33.2/999-make-olddefconfig.patch
@@ -0,0 +1,41 @@
+diff -urpN uClibc-0.9.33.2.orig/extra/config/conf.c uClibc-0.9.33.2/extra/config/conf.c
+--- uClibc-0.9.33.2.orig/extra/config/conf.c 2017-02-04 12:57:38.488808014 -0800
++++ uClibc-0.9.33.2/extra/config/conf.c 2017-02-04 20:26:28.613244457 -0800
+@@ -435,6 +435,7 @@ int main(int ac, char **av)
+ const char *name;
+ const char *configname = conf_get_configname();
+ struct stat tmpstat;
++ int olddefconfig = 0;
+
+ setlocale(LC_ALL, "");
+ bindtextdomain(PACKAGE, LOCALEDIR);
+@@ -451,6 +452,7 @@ int main(int ac, char **av)
+ break;
+ case 'd':
+ input_mode = set_default;
++ olddefconfig = 1;
+ break;
+ case 'D':
+ input_mode = set_default;
+@@ -514,7 +516,7 @@ int main(int ac, char **av)
+ switch (input_mode) {
+ case set_default:
+ if (!defconfig_file)
+- defconfig_file = conf_get_default_confname();
++ defconfig_file = olddefconfig ? NULL : conf_get_default_confname();
+ if (conf_read(defconfig_file)) {
+ printf(_("***\n"
+ "*** Can't find default configuration \"%s\"!\n"
+diff -urpN uClibc-0.9.33.2.orig/Makefile.in uClibc-0.9.33.2/Makefile.in
+--- uClibc-0.9.33.2.orig/Makefile.in 2017-02-04 12:57:38.484807980 -0800
++++ uClibc-0.9.33.2/Makefile.in 2017-02-04 12:59:34.625789324 -0800
+@@ -460,6 +460,9 @@ allyesconfig: $(conf)
+ allnoconfig: $(conf)
+ $(Q)$< -n extra/Configs/Config.in
+
++olddefconfig: $(conf)
++ $(Q)$< -d extra/Configs/Config.in
++
+ defconfig: $(conf)
+ $(Q)$< -D extra/Configs/defconfigs/$(ARCH)/$@ extra/Configs/Config.in
+
diff --git a/samples/powerpc-unknown-linux-uclibc,m68k-unknown-uclinux-uclibc/crosstool.config b/samples/powerpc-unknown-linux-uclibc,m68k-unknown-uclinux-uclibc/crosstool.config
new file mode 100644
index 0000000..5225b61
--- /dev/null
+++ b/samples/powerpc-unknown-linux-uclibc,m68k-unknown-uclinux-uclibc/crosstool.config
@@ -0,0 +1,7 @@
+CT_ARCH_m68k=y
+CT_CANADIAN=y
+CT_HOST="powerpc-unknown-linux-uclibc"
+CT_KERNEL_linux=y
+CT_THREADS_LT=y
+# CT_LIBICONV is not set
+# CT_GETTEXT is not set
diff --git a/samples/powerpc-unknown-linux-uclibc,m68k-unknown-uclinux-uclibc/reported.by b/samples/powerpc-unknown-linux-uclibc,m68k-unknown-uclinux-uclibc/reported.by
new file mode 100644
index 0000000..f9bf93e
--- /dev/null
+++ b/samples/powerpc-unknown-linux-uclibc,m68k-unknown-uclinux-uclibc/reported.by
@@ -0,0 +1,3 @@
+reporter_name="Alexey Neyman"
+reporter_url=""
+reporter_comment="Sample configuration with canadian cross & elf2flt."
diff --git a/scripts/addToolVersion.sh b/scripts/addToolVersion.sh
index bf59232..dbd1243 100755
--- a/scripts/addToolVersion.sh
+++ b/scripts/addToolVersion.sh
@@ -18,7 +18,7 @@ doHelp() {
'tool' in one of:
gcc, binutils, glibc, uClibc, uClibc-ng, newlib, linux, gdb,
duma, strace, ltrace, libelf, gmp, mpfr, isl, cloog, mpc,
- mingw-w64, expat, ncurses, musl, gettext
+ mingw-w64, expat, ncurses, musl, gettext, zlib
Valid options for all tools:
--stable, -s, +x (default)
@@ -210,6 +210,7 @@ while [ $# -gt 0 ]; do
--expat) EXP=; OBS=; cat=EXPAT; tool=expat; tool_prefix=companion_libs; dot2suffix=;;
--ncurses) EXP=; OBS=; cat=NCURSES; tool=ncurses; tool_prefix=companion_libs; dot2suffix=;;
--gettext) EXP=; OBS=; cat=GETTEXT; tool=gettext; tool_prefix=companion_libs; dot2suffix=;;
+ --zlib) EXP=; OBS=; cat=ZLIB; tool=zlib; tool_prefix=companion_tools; dot2suffix=;;
--make) EXP=; OBS=; cat=MAKE; tool=make; tool_prefix=companion_tools; dot2suffix=;;
--m4) EXP=; OBS=; cat=M4; tool=m4; tool_prefix=companion_tools; dot2suffix=;;
--autoconf) EXP=; OBS=; cat=AUTOCONF; tool=autoconf; tool_prefix=companion_tools; dot2suffix=;;
diff --git a/scripts/build/companion_libs/050-zlib.sh b/scripts/build/companion_libs/050-zlib.sh
new file mode 100644
index 0000000..45518e9
--- /dev/null
+++ b/scripts/build/companion_libs/050-zlib.sh
@@ -0,0 +1,108 @@
+# This file adds the functions to build the zlib library
+# Copyright 2017 Alexey Neyman
+# Licensed under the GPL v2. See COPYING in the root of this package
+
+do_zlib_get() { :; }
+do_zlib_extract() { :; }
+do_zlib_for_build() { :; }
+do_zlib_for_host() { :; }
+do_zlib_for_target() { :; }
+
+# Overide functions depending on configuration
+if [ "${CT_ZLIB}" = "y" ]; then
+
+# Download zlib
+do_zlib_get() {
+ CT_GetFile "zlib-${CT_ZLIB_VERSION}" \
+ "http://downloads.sourceforge.net/project/libpng/zlib/${CT_ZLIB_VERSION}"
+}
+
+# Extract zlib
+do_zlib_extract() {
+ CT_Extract "zlib-${CT_ZLIB_VERSION}"
+ CT_Patch "zlib" "${CT_ZLIB_VERSION}"
+}
+
+# Build zlib for running on build
+# - always build statically
+# - install in build-tools prefix
+do_zlib_for_build() {
+ local -a zlib_opts
+
+ case "${CT_TOOLCHAIN_TYPE}" in
+ native|cross) return 0;;
+ esac
+
+ CT_DoStep INFO "Installing zlib for build"
+ CT_mkdir_pushd "${CT_BUILD_DIR}/build-zlib-build-${CT_BUILD}"
+
+ zlib_opts+=( "host=${CT_BUILD}" )
+ zlib_opts+=( "prefix=${CT_BUILDTOOLS_PREFIX_DIR}" )
+ zlib_opts+=( "cflags=${CT_CFLAGS_FOR_BUILD}" )
+ zlib_opts+=( "ldflags=${CT_LDFLAGS_FOR_BUILD}" )
+ do_zlib_backend "${zlib_opts[@]}"
+
+ CT_Popd
+ CT_EndStep
+}
+
+# Build zlib for running on host
+do_zlib_for_host() {
+ local -a zlib_opts
+
+ CT_DoStep INFO "Installing zlib for host"
+ CT_mkdir_pushd "${CT_BUILD_DIR}/build-zlib-host-${CT_HOST}"
+
+ zlib_opts+=( "host=${CT_HOST}" )
+ zlib_opts+=( "prefix=${CT_HOST_COMPLIBS_DIR}" )
+ zlib_opts+=( "cflags=${CT_CFLAGS_FOR_HOST}" )
+ zlib_opts+=( "ldflags=${CT_LDFLAGS_FOR_HOST}" )
+ do_zlib_backend "${zlib_opts[@]}"
+
+ CT_Popd
+ CT_EndStep
+}
+
+# Build zlib
+# Parameter : description : type : default
+# host : machine to run on : tuple : (none)
+# prefix : prefix to install into : dir : (none)
+# cflags : cflags to use : string : (empty)
+# ldflags : ldflags to use : string : (empty)
+do_zlib_backend() {
+ local host
+ local prefix
+ local cflags
+ local ldflags
+ local arg
+ local -a extra_config
+
+ for arg in "$@"; do
+ eval "${arg// /\\ }"
+ done
+
+ CT_DoLog EXTRA "Configuring zlib"
+
+ CT_DoExecLog CFG \
+ CFLAGS="${cflags}" \
+ LDFLAGS="${ldflags}" \
+ CROSS_PREFIX="${host}-" \
+ ${CONFIG_SHELL} \
+ "${CT_SRC_DIR}/zlib-${CT_ZLIB_VERSION}/configure" \
+ --prefix="${prefix}" \
+ --static \
+ "${extra_config[@]}"
+
+ CT_DoLog EXTRA "Building zlib"
+ CT_DoExecLog ALL make ${JOBSFLAGS}
+
+ if [ "${CT_COMPLIBS_CHECK}" = "y" ]; then
+ CT_DoLog EXTRA "Checking zlib"
+ CT_DoExecLog ALL make ${JOBSFLAGS} -s check
+ fi
+
+ CT_DoLog EXTRA "Installing zlib"
+ CT_DoExecLog ALL make install
+}
+
+fi # CT_ZLIB
diff --git a/scripts/build/companion_libs/100-gmp.sh b/scripts/build/companion_libs/100-gmp.sh
index 8ce500e..6b526c8 100644
--- a/scripts/build/companion_libs/100-gmp.sh
+++ b/scripts/build/companion_libs/100-gmp.sh
@@ -26,7 +26,6 @@ do_gmp_extract() {
# Build GMP for running on build
# - always build statically
-# - we do not have build-specific CFLAGS
# - install in build-tools prefix
do_gmp_for_build() {
local -a gmp_opts
@@ -101,7 +100,7 @@ do_gmp_backend() {
--enable-cxx \
--disable-shared \
--enable-static \
- "${extra_config}"
+ "${extra_config[@]}"
CT_DoLog EXTRA "Building GMP"
CT_DoExecLog ALL make ${JOBSFLAGS}
diff --git a/scripts/build/companion_libs/110-mpfr.sh b/scripts/build/companion_libs/110-mpfr.sh
index 05b6860..4b9bc64 100644
--- a/scripts/build/companion_libs/110-mpfr.sh
+++ b/scripts/build/companion_libs/110-mpfr.sh
@@ -68,7 +68,6 @@ do_mpfr_extract() {
# Build MPFR for running on build
# - always build statically
-# - we do not have build-specific CFLAGS
# - install in build-tools prefix
do_mpfr_for_build() {
local -a mpfr_opts
diff --git a/scripts/build/companion_libs/121-isl.sh b/scripts/build/companion_libs/121-isl.sh
index bde63e3..8783f2d 100644
--- a/scripts/build/companion_libs/121-isl.sh
+++ b/scripts/build/companion_libs/121-isl.sh
@@ -25,7 +25,6 @@ do_isl_extract() {
# Build ISL for running on build
# - always build statically
-# - we do not have build-specific CFLAGS
# - install in build-tools prefix
do_isl_for_build() {
local -a isl_opts
diff --git a/scripts/build/companion_libs/130-cloog.sh b/scripts/build/companion_libs/130-cloog.sh
index b1c307c..b6ea1e5 100644
--- a/scripts/build/companion_libs/130-cloog.sh
+++ b/scripts/build/companion_libs/130-cloog.sh
@@ -29,7 +29,6 @@ do_cloog_extract() {
# Build CLooG for running on build
# - always build statically
-# - we do not have build-specific CFLAGS
# - install in build-tools prefix
do_cloog_for_build() {
local -a cloog_opts
diff --git a/scripts/build/companion_libs/140-mpc.sh b/scripts/build/companion_libs/140-mpc.sh
index f753c51..acb5fd3 100644
--- a/scripts/build/companion_libs/140-mpc.sh
+++ b/scripts/build/companion_libs/140-mpc.sh
@@ -26,7 +26,6 @@ do_mpc_extract() {
# Build MPC for running on build
# - always build statically
-# - we do not have build-specific CFLAGS
# - install in build-tools prefix
do_mpc_for_build() {
local -a mpc_opts
diff --git a/scripts/build/companion_libs/200-libelf.sh b/scripts/build/companion_libs/200-libelf.sh
index 41e4564..807ce7e 100644
--- a/scripts/build/companion_libs/200-libelf.sh
+++ b/scripts/build/companion_libs/200-libelf.sh
@@ -24,7 +24,6 @@ if [ "${CT_LIBELF}" = "y" ]; then
# Build libelf for running on build
# - always build statically
-# - we do not have build-specific CFLAGS
# - install in build-tools prefix
do_libelf_for_build() {
local -a libelf_opts
diff --git a/scripts/build/libc/uClibc.sh b/scripts/build/libc/uClibc.sh
index e58912c..e87abaf 100644
--- a/scripts/build/libc/uClibc.sh
+++ b/scripts/build/libc/uClibc.sh
@@ -138,7 +138,7 @@ do_libc_backend_once() {
fi
manage_uClibc_config "${CT_LIBC_UCLIBC_CONFIG_FILE}" .config "${multi_flags}"
- CT_DoYes | CT_DoExecLog ALL make "${make_args[@]}" oldconfig
+ CT_DoExecLog ALL make "${make_args[@]}" olddefconfig
# Now filter the multilib flags. manage_uClibc_config did the opposite of
# what Rules.mak in uClibc would do: by the multilib's CFLAGS, it determined
diff --git a/scripts/functions b/scripts/functions
index 9489f18..9f852b3 100644
--- a/scripts/functions
+++ b/scripts/functions
@@ -585,14 +585,6 @@ CT_DoForceRmdir() {
done
}
-# Echoes the specified string on stdout until the pipe breaks.
-# Doesn't fail
-# $1: string to echo
-# Usage: CT_DoYes "" |make oldconfig
-CT_DoYes() {
- yes "$1" || true
-}
-
# Add the specified directory to LD_LIBRARY_PATH, and export it
# If the specified patch is already present, just export
# $1: path to add
diff --git a/scripts/gen_in_frags.sh b/scripts/gen_in_frags.sh
index 9c656a8..9fbb871 100755
--- a/scripts/gen_in_frags.sh
+++ b/scripts/gen_in_frags.sh
@@ -128,7 +128,7 @@ gen_menu() {
shift 4
local file entry _entry
- # GEnerate the menuconfig
+ # Generate the menuconfig
exec >"${out_file}"
printf '# %s menu\n' "${label}"
printf '# Generated file, do not edit!!!\n'