summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config/binutils/binutils.in10
-rw-r--r--config/cc/gcc.in6
-rw-r--r--config/companion_libs/gmp.in8
-rw-r--r--config/companion_tools.in5
-rw-r--r--patches/binutils/2.25/120-sh-conf.patch33
-rw-r--r--patches/binutils/2.25/300-001_ld_makefile_patch.patch26
-rw-r--r--patches/binutils/2.25/300-012_check_ldrunpath_length.patch22
-rw-r--r--patches/gcc/4.7.4/100-hardfloat-ld.patch44
-rw-r--r--patches/gcc/4.8.4/001_gcc_bug_62231.patch129
-rw-r--r--patches/gcc/4.8.4/002_gcc_bug_62231.patch18
-rw-r--r--patches/gcc/4.8.4/003-PR57717-E500v2.patch21
-rw-r--r--patches/newlib/2.0.0/100-fix-optimising-for-space.patch8
-rw-r--r--patches/newlib/2.1.0/100-fix-optimising-for-space.patch8
-rw-r--r--patches/uClibc/0.9.33.2/300-fix-darwin-build.patch12
-rw-r--r--scripts/build/cc/gcc.sh10
-rw-r--r--scripts/build/companion_libs/100-gmp.sh9
-rw-r--r--scripts/build/companion_tools/050-make.sh3
-rw-r--r--scripts/build/libc/newlib.sh8
-rwxr-xr-xscripts/config.guess15
-rwxr-xr-xscripts/config.sub25
20 files changed, 393 insertions, 27 deletions
diff --git a/config/binutils/binutils.in b/config/binutils/binutils.in
index 6dc289d..f21cbca 100644
--- a/config/binutils/binutils.in
+++ b/config/binutils/binutils.in
@@ -8,6 +8,11 @@ choice
# Don't remove next line
# CT_INSERT_VERSION_BELOW
+config BINUTILS_V_2_25
+ bool
+ prompt "2.25"
+ select BINUTILS_2_25_or_later
+
config BINUTILS_V_2_24
bool
prompt "2.24"
@@ -77,6 +82,7 @@ config BINUTILS_VERSION
string
# Don't remove next line
# CT_INSERT_VERSION_STRING_BELOW
+ default "2.25" if BINUTILS_V_2_25
default "2.24" if BINUTILS_V_2_24
default "2.23.2" if BINUTILS_V_2_23_2
default "2.23.1" if BINUTILS_V_2_23_1
@@ -88,6 +94,10 @@ config BINUTILS_VERSION
default "2.18a" if BINUTILS_V_2_18a
default "custom" if BINUTILS_CUSTOM
+config BINUTILS_2_25_or_later
+ bool
+ select BINUTILS_2_24_or_later
+
config BINUTILS_2_24_or_later
bool
select BINUTILS_2_23_or_later
diff --git a/config/cc/gcc.in b/config/cc/gcc.in
index 5c2d98f..95abde6 100644
--- a/config/cc/gcc.in
+++ b/config/cc/gcc.in
@@ -57,6 +57,11 @@ config CC_V_linaro_4_8
depends on CC_GCC_SHOW_LINARO
select CC_GCC_4_8
+config CC_V_4_8_4
+ bool
+ prompt "4.8.4"
+ select CC_GCC_4_8
+
config CC_V_4_8_3
bool
prompt "4.8.3"
@@ -501,6 +506,7 @@ config CC_VERSION
default "4.9.1" if CC_V_4_9_1
default "4.9.0" if CC_V_4_9_0
default "linaro-4.8-2014.04" if CC_V_linaro_4_8
+ default "4.8.4" if CC_V_4_8_4
default "4.8.3" if CC_V_4_8_3
default "4.8.2" if CC_V_4_8_2
default "4.8.1" if CC_V_4_8_1
diff --git a/config/companion_libs/gmp.in b/config/companion_libs/gmp.in
index 386caff..f156e69 100644
--- a/config/companion_libs/gmp.in
+++ b/config/companion_libs/gmp.in
@@ -9,18 +9,22 @@ choice
config GMP_V_6_0_0
bool
prompt "6.0.0a"
+ select GMP_5_0_2_or_later
config GMP_V_5_1_3
bool
prompt "5.1.3"
+ select GMP_5_0_2_or_later
config GMP_V_5_1_1
bool
prompt "5.1.1"
+ select GMP_5_0_2_or_later
config GMP_V_5_0_2
bool
prompt "5.0.2"
+ select GMP_5_0_2_or_later
config GMP_V_5_0_1
bool
@@ -40,6 +44,10 @@ config GMP_V_4_3_0
endchoice
+# To disable --enable-mpbsd
+config GMP_5_0_2_or_later
+ bool
+
config GMP_VERSION
string
# Don't remove next line
diff --git a/config/companion_tools.in b/config/companion_tools.in
index 18811e6..f922388 100644
--- a/config/companion_tools.in
+++ b/config/companion_tools.in
@@ -35,6 +35,11 @@ config COMP_TOOLS_make
bool
prompt "make"
+config COMP_TOOLS_make_gmake
+ bool
+ prompt "Add gmake symlink to companion gnu/make"
+ depends on COMP_TOOLS_make
+
config COMP_TOOLS_m4
bool
prompt "m4"
diff --git a/patches/binutils/2.25/120-sh-conf.patch b/patches/binutils/2.25/120-sh-conf.patch
new file mode 100644
index 0000000..c12a023
--- /dev/null
+++ b/patches/binutils/2.25/120-sh-conf.patch
@@ -0,0 +1,33 @@
+r10231 | lethal | 2005-05-02 09:58:00 -0400 (Mon, 02 May 2005) | 13 lines
+
+Likewise, binutils has no idea about any of these new targets either, so we
+fix that up too.. now we're able to actually build a real toolchain for
+sh2a_nofpu- and other more ineptly named toolchains (and yes, there are more
+inept targets than that one, really. Go look, I promise).
+
+diff --git a/configure b/configure
+index 87677bc..2d916f1 100755
+--- a/configure
++++ b/configure
+@@ -3812,7 +3812,7 @@ case "${target}" in
+ or1k*-*-*)
+ noconfigdirs="$noconfigdirs gdb"
+ ;;
+- sh-*-* | sh64-*-*)
++ sh*-*-* | sh64-*-*)
+ case "${target}" in
+ sh*-*-elf)
+ ;;
+diff --git a/configure.ac b/configure.ac
+index 8fe0eca..b10a99f 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1140,7 +1140,7 @@ case "${target}" in
+ or1k*-*-*)
+ noconfigdirs="$noconfigdirs gdb"
+ ;;
+- sh-*-* | sh64-*-*)
++ sh*-*-* | sh64-*-*)
+ case "${target}" in
+ sh*-*-elf)
+ ;;
diff --git a/patches/binutils/2.25/300-001_ld_makefile_patch.patch b/patches/binutils/2.25/300-001_ld_makefile_patch.patch
new file mode 100644
index 0000000..2a1320c
--- /dev/null
+++ b/patches/binutils/2.25/300-001_ld_makefile_patch.patch
@@ -0,0 +1,26 @@
+diff --git a/ld/Makefile.am b/ld/Makefile.am
+index 9575f1f..84df0bf 100644
+--- a/ld/Makefile.am
++++ b/ld/Makefile.am
+@@ -54,7 +54,7 @@ endif
+ # We put the scripts in the directory $(scriptdir)/ldscripts.
+ # We can't put the scripts in $(datadir) because the SEARCH_DIR
+ # directives need to be different for native and cross linkers.
+-scriptdir = $(tooldir)/lib
++scriptdir = $(libdir)
+
+ EMUL = @EMUL@
+ EMULATION_OFILES = @EMULATION_OFILES@
+diff --git a/ld/Makefile.in b/ld/Makefile.in
+index 9f56ca1..272860f 100644
+--- a/ld/Makefile.in
++++ b/ld/Makefile.in
+@@ -388,7 +388,7 @@ AM_CFLAGS = $(WARN_CFLAGS)
+ # We put the scripts in the directory $(scriptdir)/ldscripts.
+ # We can't put the scripts in $(datadir) because the SEARCH_DIR
+ # directives need to be different for native and cross linkers.
+-scriptdir = $(tooldir)/lib
++scriptdir = $(libdir)
+ BASEDIR = $(srcdir)/..
+ BFDDIR = $(BASEDIR)/bfd
+ INCDIR = $(BASEDIR)/include
diff --git a/patches/binutils/2.25/300-012_check_ldrunpath_length.patch b/patches/binutils/2.25/300-012_check_ldrunpath_length.patch
new file mode 100644
index 0000000..16365b9
--- /dev/null
+++ b/patches/binutils/2.25/300-012_check_ldrunpath_length.patch
@@ -0,0 +1,22 @@
+diff --git a/ld/emultempl/elf32.em b/ld/emultempl/elf32.em
+index 137446f..bb8391a 100644
+--- a/ld/emultempl/elf32.em
++++ b/ld/emultempl/elf32.em
+@@ -1195,6 +1195,8 @@ fragment <<EOF
+ && command_line.rpath == NULL)
+ {
+ lib_path = (const char *) getenv ("LD_RUN_PATH");
++ if ((lib_path) && (strlen (lib_path) == 0))
++ lib_path = NULL;
+ if (gld${EMULATION_NAME}_search_needed (lib_path, &n,
+ force))
+ break;
+@@ -1458,6 +1460,8 @@ gld${EMULATION_NAME}_before_allocation (void)
+ rpath = command_line.rpath;
+ if (rpath == NULL)
+ rpath = (const char *) getenv ("LD_RUN_PATH");
++ if ((rpath) && (strlen (rpath) == 0))
++ rpath = NULL;
+
+ for (abfd = link_info.input_bfds; abfd; abfd = abfd->link.next)
+ if (bfd_get_flavour (abfd) == bfd_target_elf_flavour)
diff --git a/patches/gcc/4.7.4/100-hardfloat-ld.patch b/patches/gcc/4.7.4/100-hardfloat-ld.patch
new file mode 100644
index 0000000..0e97b6f
--- /dev/null
+++ b/patches/gcc/4.7.4/100-hardfloat-ld.patch
@@ -0,0 +1,44 @@
+From 9dd1a0668e5ab10a5943fdd1aee2e1616d7fc7ed Mon Sep 17 00:00:00 2001
+From: michaelh <michaelh@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Thu, 26 Apr 2012 04:33:08 +0000
+Subject: [PATCH] 2012-04-26 Michael Hope <michael.hope@linaro.org>
+ Richard Earnshaw <rearnsha@arm.com>
+
+ * config/arm/linux-eabi.h (GLIBC_DYNAMIC_LINKER_SOFT_FLOAT): Define.
+ (GLIBC_DYNAMIC_LINKER_HARD_FLOAT): Define.
+ (GLIBC_DYNAMIC_LINKER_DEFAULT): Define.
+ (GLIBC_DYNAMIC_LINKER): Redefine to use the hard float path.
+
+
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@186859 138bc75d-0d04-0410-961f-82ee72b054a4
+---
+ gcc/config/arm/linux-eabi.h | 12 +++++++++++-
+ 2 files changed, 19 insertions(+), 1 deletion(-)
+
+diff --git a/gcc/config/arm/linux-eabi.h b/gcc/config/arm/linux-eabi.h
+index 80bd825..2ace6f0 100644
+--- a/gcc/config/arm/linux-eabi.h
++++ b/gcc/config/arm/linux-eabi.h
+@@ -62,7 +62,17 @@
+ /* Use ld-linux.so.3 so that it will be possible to run "classic"
+ GNU/Linux binaries on an EABI system. */
+ #undef GLIBC_DYNAMIC_LINKER
+-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.3"
++#define GLIBC_DYNAMIC_LINKER_SOFT_FLOAT "/lib/ld-linux.so.3"
++#define GLIBC_DYNAMIC_LINKER_HARD_FLOAT "/lib/ld-linux-armhf.so.3"
++#if TARGET_DEFAULT_FLOAT_ABI == ARM_FLOAT_ABI_HARD
++#define GLIBC_DYNAMIC_LINKER_DEFAULT GLIBC_DYNAMIC_LINKER_HARD_FLOAT
++#else
++#define GLIBC_DYNAMIC_LINKER_DEFAULT GLIBC_DYNAMIC_LINKER_SOFT_FLOAT
++#endif
++#define GLIBC_DYNAMIC_LINKER \
++ "%{mfloat-abi=hard:" GLIBC_DYNAMIC_LINKER_HARD_FLOAT "} \
++ %{mfloat-abi=soft*:" GLIBC_DYNAMIC_LINKER_SOFT_FLOAT "} \
++ %{!mfloat-abi=*:" GLIBC_DYNAMIC_LINKER_DEFAULT "}"
+
+ /* At this point, bpabi.h will have clobbered LINK_SPEC. We want to
+ use the GNU/Linux version, not the generic BPABI version. */
+--
+2.1.0
+
diff --git a/patches/gcc/4.8.4/001_gcc_bug_62231.patch b/patches/gcc/4.8.4/001_gcc_bug_62231.patch
new file mode 100644
index 0000000..e7c9cf9
--- /dev/null
+++ b/patches/gcc/4.8.4/001_gcc_bug_62231.patch
@@ -0,0 +1,129 @@
+As-applied. From:
+
+https://gcc.gnu.org/ml/gcc-patches/2014-09/msg02625.html
+
+Linked from bug62231 comment 4 there
+
+diff -durN a/gcc/defaults.h b/gcc/defaults.h
+--- a/gcc/defaults.h 2013-01-10 12:38:27.000000000 -0800
++++ b/gcc/defaults.h 2014-12-15 13:26:13.498904465 -0800
+@@ -438,6 +438,11 @@
+ #define DWARF_FRAME_REGNUM(REG) DBX_REGISTER_NUMBER (REG)
+ #endif
+
++/* The mapping from dwarf CFA reg number to internal dwarf reg numbers. */
++#ifndef DWARF_REG_TO_UNWIND_COLUMN
++#define DWARF_REG_TO_UNWIND_COLUMN(REGNO) (REGNO)
++#endif
++
+ /* Map register numbers held in the call frame info that gcc has
+ collected using DWARF_FRAME_REGNUM to those that should be output in
+ .debug_frame and .eh_frame. */
+diff -durN a/gcc/dwarf2cfi.c b/gcc/dwarf2cfi.c
+--- a/gcc/dwarf2cfi.c 2013-01-10 12:38:27.000000000 -0800
++++ b/gcc/dwarf2cfi.c 2014-12-15 13:50:24.554883694 -0800
+@@ -225,7 +225,44 @@
+ emit_move_insn (adjust_address (mem, mode, offset), GEN_INT (size));
+ }
+
+-/* Generate code to initialize the register size table. */
++/* Helper for expand_builtin_init_dwarf_reg_sizes. Generate code to
++ initialize the dwarf register size table entry corresponding to register
++ REGNO in REGMODE. TABLE is the table base address, SLOTMODE is the mode
++ to use for the size entry to initialize, and WROTE_RETURN_COLUMN needs to
++ be set to true if the dwarf register number for REGNO is the dwarf return
++ column number. */
++
++static
++void init_one_dwarf_reg_size (int regno, enum machine_mode regmode,
++ rtx table, enum machine_mode slotmode,
++ bool *wrote_return_column)
++{
++ const unsigned int dnum = DWARF_FRAME_REGNUM (regno);
++ const unsigned int rnum = DWARF2_FRAME_REG_OUT (dnum, 1);
++ const unsigned int dcol = DWARF_REG_TO_UNWIND_COLUMN (rnum);
++
++ const HOST_WIDE_INT slotoffset = dcol * GET_MODE_SIZE (slotmode);
++ const HOST_WIDE_INT regsize = GET_MODE_SIZE (regmode);
++
++ if (rnum >= DWARF_FRAME_REGISTERS)
++ return;
++
++ if (dnum == DWARF_FRAME_RETURN_COLUMN)
++ {
++ if (regmode == VOIDmode)
++ return;
++ *wrote_return_column = true;
++ }
++
++ if (slotoffset < 0)
++ return;
++
++ emit_move_insn (adjust_address (table, slotmode, slotoffset),
++ gen_int_mode (regsize, slotmode));
++}
++
++/* Generate code to initialize the dwarf register size table located
++ at the provided ADDRESS. */
+
+ void
+ expand_builtin_init_dwarf_reg_sizes (tree address)
+@@ -238,30 +275,21 @@
+
+ for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
+ {
+- unsigned int dnum = DWARF_FRAME_REGNUM (i);
+- unsigned int rnum = DWARF2_FRAME_REG_OUT (dnum, 1);
+-
+- if (rnum < DWARF_FRAME_REGISTERS)
+- {
+- HOST_WIDE_INT offset = rnum * GET_MODE_SIZE (mode);
+- enum machine_mode save_mode = reg_raw_mode[i];
+- HOST_WIDE_INT size;
+-
+- if (HARD_REGNO_CALL_PART_CLOBBERED (i, save_mode))
+- save_mode = choose_hard_reg_mode (i, 1, true);
+- if (dnum == DWARF_FRAME_RETURN_COLUMN)
+- {
+- if (save_mode == VOIDmode)
+- continue;
+- wrote_return_column = true;
+- }
+- size = GET_MODE_SIZE (save_mode);
+- if (offset < 0)
+- continue;
++ enum machine_mode save_mode = reg_raw_mode[i];
++ rtx span;
+
+- emit_move_insn (adjust_address (mem, mode, offset),
+- gen_int_mode (size, mode));
+- }
++ span = targetm.dwarf_register_span (gen_rtx_REG (save_mode, i));
++ if (!span)
++ init_one_dwarf_reg_size (i, save_mode, mem, mode, &wrote_return_column);
++ else
++ {
++ for (int si = 0; si < XVECLEN (span, 0); si++)
++ {
++ rtx reg = XVECEXP (span, 0, si);
++ init_one_dwarf_reg_size
++ (REGNO (reg), GET_MODE (reg), mem, mode, &wrote_return_column);
++ }
++ }
+ }
+
+ if (!wrote_return_column)
+diff -durN a/libgcc/unwind-dw2.c b/libgcc/unwind-dw2.c
+--- a/libgcc/unwind-dw2.c 2013-05-31 16:21:46.000000000 -0700
++++ b/libgcc/unwind-dw2.c 2014-12-15 13:26:13.570904866 -0800
+@@ -55,10 +55,6 @@
+ #define PRE_GCC3_DWARF_FRAME_REGISTERS DWARF_FRAME_REGISTERS
+ #endif
+
+-#ifndef DWARF_REG_TO_UNWIND_COLUMN
+-#define DWARF_REG_TO_UNWIND_COLUMN(REGNO) (REGNO)
+-#endif
+-
+ /* ??? For the public function interfaces, we tend to gcc_assert that the
+ column numbers are in range. For the dwarf2 unwind info this does happen,
+ although so far in a case that doesn't actually matter.
diff --git a/patches/gcc/4.8.4/002_gcc_bug_62231.patch b/patches/gcc/4.8.4/002_gcc_bug_62231.patch
new file mode 100644
index 0000000..b970ebc
--- /dev/null
+++ b/patches/gcc/4.8.4/002_gcc_bug_62231.patch
@@ -0,0 +1,18 @@
+As-applied. From:
+
+https://gcc.gnu.org/ml/gcc-patches/2014-10/msg02605.html
+
+Linked from bug62231 comment 4 there
+
+diff -durN a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
+--- a/gcc/config/rs6000/rs6000.c 2014-12-08 17:29:04.000000000 -0800
++++ b/gcc/config/rs6000/rs6000.c 2014-12-15 14:44:46.568801843 -0800
+@@ -1673,7 +1673,7 @@
+ SCmode so as to pass the value correctly in a pair of
+ registers. */
+ else if (TARGET_E500_DOUBLE && FLOAT_MODE_P (mode) && mode != SCmode
+- && !DECIMAL_FLOAT_MODE_P (mode))
++ && !DECIMAL_FLOAT_MODE_P (mode) && SPE_SIMD_REGNO_P (regno))
+ reg_size = UNITS_PER_FP_WORD;
+
+ else
diff --git a/patches/gcc/4.8.4/003-PR57717-E500v2.patch b/patches/gcc/4.8.4/003-PR57717-E500v2.patch
new file mode 100644
index 0000000..723c710
--- /dev/null
+++ b/patches/gcc/4.8.4/003-PR57717-E500v2.patch
@@ -0,0 +1,21 @@
+This backports fix from http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57717
+
+Upstream-Status: Backport
+Signed-off-by: Julian Brown <Julian_Brown@mentor.com>
+
+fix for PR57717 (PowerPC E500v2)
+http://gcc.gnu.org/ml/gcc-patches/2013-08/msg00668.html
+
+--- a/gcc/config/rs6000/rs6000.c 2013-05-09 20:54:06.000000000 -0500
++++ b/gcc/config/rs6000/rs6000.c 2013-08-28 01:25:24.865218744 -0500
+@@ -7385,9 +7385,7 @@
+ && GET_CODE (XEXP (x, 1)) == CONST_INT
+ && reg_offset_p
+ && !SPE_VECTOR_MODE (mode)
+- && !(TARGET_E500_DOUBLE && (mode == DFmode || mode == TFmode
+- || mode == DDmode || mode == TDmode
+- || mode == DImode))
++ && !(TARGET_E500_DOUBLE && GET_MODE_SIZE (mode) > UNITS_PER_WORD)
+ && (!VECTOR_MODE_P (mode) || VECTOR_MEM_NONE_P (mode)))
+ {
+ HOST_WIDE_INT val = INTVAL (XEXP (x, 1));
diff --git a/patches/newlib/2.0.0/100-fix-optimising-for-space.patch b/patches/newlib/2.0.0/100-fix-optimising-for-space.patch
new file mode 100644
index 0000000..8480f92
--- /dev/null
+++ b/patches/newlib/2.0.0/100-fix-optimising-for-space.patch
@@ -0,0 +1,8 @@
+--- newlib-2.0.0/config/mt-ospace-orig 2014-11-13 12:02:45.463578281 +0000
++++ newlib-2.0.0/config/mt-ospace 2014-11-13 12:03:01.409592374 +0000
+@@ -1,3 +1,3 @@
+ # Build libraries optimizing for space, not speed.
+- CFLAGS_FOR_TARGET = -g -Os
+- CXXFLAGS_FOR_TARGET = -g -Os
++ CFLAGS_FOR_TARGET += -g -Os
++ CXXFLAGS_FOR_TARGET += -g -Os
diff --git a/patches/newlib/2.1.0/100-fix-optimising-for-space.patch b/patches/newlib/2.1.0/100-fix-optimising-for-space.patch
new file mode 100644
index 0000000..0e94d50
--- /dev/null
+++ b/patches/newlib/2.1.0/100-fix-optimising-for-space.patch
@@ -0,0 +1,8 @@
+--- newlib-2.1.0/config/mt-ospace-orig 2014-11-13 12:02:45.463578281 +0000
++++ newlib-2.1.0/config/mt-ospace 2014-11-13 12:03:01.409592374 +0000
+@@ -1,3 +1,3 @@
+ # Build libraries optimizing for space, not speed.
+- CFLAGS_FOR_TARGET = -g -Os
+- CXXFLAGS_FOR_TARGET = -g -Os
++ CFLAGS_FOR_TARGET += -g -Os
++ CXXFLAGS_FOR_TARGET += -g -Os
diff --git a/patches/uClibc/0.9.33.2/300-fix-darwin-build.patch b/patches/uClibc/0.9.33.2/300-fix-darwin-build.patch
new file mode 100644
index 0000000..884307d
--- /dev/null
+++ b/patches/uClibc/0.9.33.2/300-fix-darwin-build.patch
@@ -0,0 +1,12 @@
+diff -Nrupa uClibc-0.9.33.2.orig/extra/scripts/unifdef.c uClibc-0.9.33.2/extra/scripts/unifdef.c
+--- uClibc-0.9.33.2.orig/extra/scripts/unifdef.c 2012-05-15 09:20:09.000000000 +0200
++++ uClibc-0.9.33.2/extra/scripts/unifdef.c 2014-10-25 17:07:33.000000000 +0200
+@@ -78,8 +78,6 @@ __FBSDID("$FreeBSD: /repoman/r/ncvs/src/
+ #define errx(exit_code, fmt, args...) ({ warnx(fmt, ## args); exit(exit_code); })
+ #define err(exit_code, fmt, args...) errx(exit_code, fmt ": %s", ## args, strerror(errno))
+
+-size_t strlcpy(char *dst, const char *src, size_t siz);
+-
+ /* types of input lines: */
+ typedef enum {
+ LT_TRUEI, /* a true #if with ignore flag */
diff --git a/scripts/build/cc/gcc.sh b/scripts/build/cc/gcc.sh
index 632bc8c..40241c2 100644
--- a/scripts/build/cc/gcc.sh
+++ b/scripts/build/cc/gcc.sh
@@ -205,20 +205,16 @@ do_cc_core_backend() {
extra_config+=("--enable-threads=no")
extra_config+=("--disable-shared")
extra_user_config=( "${CT_CC_CORE_EXTRA_CONFIG_ARRAY[@]}" )
- copy_headers=y # For baremetal, as there's no headers to copy,
- # we copy an empty directory. So, who cares?
;;
shared)
extra_config+=("--enable-shared")
extra_user_config=( "${CT_CC_CORE_EXTRA_CONFIG_ARRAY[@]}" )
- copy_headers=y
;;
baremetal)
extra_config+=("--with-newlib")
extra_config+=("--enable-threads=no")
extra_config+=("--disable-shared")
extra_user_config=( "${CT_CC_EXTRA_CONFIG_ARRAY[@]}" )
- copy_headers=n
;;
*)
CT_Abort "Internal Error: 'mode' must be one of: 'static', 'shared' or 'baremetal', not '${mode:-(empty)}'"
@@ -231,10 +227,8 @@ do_cc_core_backend() {
[ -n "${CT_TOOLCHAIN_BUGURL}" ] && extra_config+=("--with-bugurl=${CT_TOOLCHAIN_BUGURL}")
fi
- if [ "${copy_headers}" = "y" ]; then
- CT_DoLog DEBUG "Copying headers to install area of bootstrap gcc, so it can build libgcc2"
- CT_DoExecLog ALL cp -a "${CT_HEADERS_DIR}" "${prefix}/${CT_TARGET}/include"
- fi
+ CT_DoLog DEBUG "Copying headers to install area of core C compiler"
+ CT_DoExecLog ALL cp -a "${CT_HEADERS_DIR}" "${prefix}/${CT_TARGET}/include"
for tmp in ARCH ABI CPU TUNE FPU FLOAT; do
eval tmp="\${CT_ARCH_WITH_${tmp}}"
diff --git a/scripts/build/companion_libs/100-gmp.sh b/scripts/build/companion_libs/100-gmp.sh
index beb75ea..f0c96a2 100644
--- a/scripts/build/companion_libs/100-gmp.sh
+++ b/scripts/build/companion_libs/100-gmp.sh
@@ -76,6 +76,7 @@ do_gmp_backend() {
local cflags
local ldflags
local arg
+ local -a extra_config
for arg in "$@"; do
eval "${arg// /\\ }"
@@ -83,6 +84,10 @@ do_gmp_backend() {
CT_DoLog EXTRA "Configuring GMP"
+ if [ ! "${CT_GMP_5_0_2_or_later}" = "y" ]; then
+ extra_config+=("--enable-mpbsd")
+ fi
+
CT_DoExecLog CFG \
CFLAGS="${cflags} -fexceptions" \
LDFLAGS="${ldflags}" \
@@ -91,10 +96,10 @@ do_gmp_backend() {
--host=${host} \
--prefix="${prefix}" \
--enable-fft \
- --enable-mpbsd \
--enable-cxx \
--disable-shared \
- --enable-static
+ --enable-static \
+ "${extra_config}"
CT_DoLog EXTRA "Building GMP"
CT_DoExecLog ALL make ${JOBSFLAGS}
diff --git a/scripts/build/companion_tools/050-make.sh b/scripts/build/companion_tools/050-make.sh
index 601e267..4247545 100644
--- a/scripts/build/companion_tools/050-make.sh
+++ b/scripts/build/companion_tools/050-make.sh
@@ -22,6 +22,9 @@ do_companion_tools_make_build() {
--prefix="${CT_BUILDTOOLS_PREFIX_DIR}"
CT_DoExecLog ALL make
CT_DoExecLog ALL make install
+ if [ "${CT_COMP_TOOLS_make_gmake}" = "y" ]; then
+ CT_DoExecLog ALL ln -sv make "${CT_BUILDTOOLS_PREFIX_DIR}/bin/gmake"
+ fi
CT_Popd
CT_EndStep
}
diff --git a/scripts/build/libc/newlib.sh b/scripts/build/libc/newlib.sh
index cae4b9f..74785a6 100644
--- a/scripts/build/libc/newlib.sh
+++ b/scripts/build/libc/newlib.sh
@@ -50,16 +50,16 @@ do_libc_check_config() {
}
do_libc_start_files() {
+ CT_DoStep INFO "Installing C library headers & start files"
+ CT_DoExecLog ALL cp -a "${CT_SRC_DIR}/newlib-${CT_LIBC_VERSION}/newlib/libc/include/." \
+ "${CT_HEADERS_DIR}"
if [ "${CT_ATMEL_AVR32_HEADERS}" = "y" ]; then
- CT_DoStep INFO "Installing C library headers & start files"
-
CT_DoLog EXTRA "Installing Atmel's AVR32 headers"
CT_DoExecLog ALL mkdir -p "${CT_PREFIX_DIR}/${CT_TARGET}/include"
CT_DoExecLog ALL cp -r "${CT_SRC_DIR}/${LIBC_NEWLIB_AVR_HDRS_BASE}/avr32" \
"${CT_PREFIX_DIR}/${CT_TARGET}/include/"
-
- CT_EndStep
fi
+ CT_EndStep
}
do_libc() {
diff --git a/scripts/config.guess b/scripts/config.guess
index 1f5c50c..dbfb978 100755
--- a/scripts/config.guess
+++ b/scripts/config.guess
@@ -1,8 +1,8 @@
#! /bin/sh
# Attempt to guess a canonical system name.
-# Copyright 1992-2014 Free Software Foundation, Inc.
+# Copyright 1992-2015 Free Software Foundation, Inc.
-timestamp='2014-03-23'
+timestamp='2015-01-01'
# 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
@@ -24,12 +24,12 @@ timestamp='2014-03-23'
# program. This Exception is an additional permission under section 7
# of the GNU General Public License, version 3 ("GPLv3").
#
-# Originally written by Per Bothner.
+# Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
#
# 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.
+# Please send patches to <config-patches@gnu.org>.
me=`echo "$0" | sed -e 's,.*/,,'`
@@ -50,7 +50,7 @@ version="\
GNU config.guess ($timestamp)
Originally written by Per Bothner.
-Copyright 1992-2014 Free Software Foundation, Inc.
+Copyright 1992-2015 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."
@@ -579,8 +579,9 @@ EOF
else
IBM_ARCH=powerpc
fi
- if [ -x /usr/bin/oslevel ] ; then
- IBM_REV=`/usr/bin/oslevel`
+ if [ -x /usr/bin/lslpp ] ; then
+ IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
+ awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
else
IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
fi
diff --git a/scripts/config.sub b/scripts/config.sub
index d654d03..6d2e94c 100755
--- a/scripts/config.sub
+++ b/scripts/config.sub
@@ -1,8 +1,8 @@
#! /bin/sh
# Configuration validation subroutine script.
-# Copyright 1992-2014 Free Software Foundation, Inc.
+# Copyright 1992-2015 Free Software Foundation, Inc.
-timestamp='2014-05-01'
+timestamp='2015-01-01'
# 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
@@ -25,7 +25,7 @@ timestamp='2014-05-01'
# of the GNU General Public License, version 3 ("GPLv3").
-# Please send patches with a ChangeLog entry to config-patches@gnu.org.
+# Please send patches to <config-patches@gnu.org>.
#
# Configuration subroutine to validate and canonicalize a configuration type.
# Supply the specified configuration type as an argument.
@@ -68,7 +68,7 @@ Report bugs and patches to <config-patches@gnu.org>."
version="\
GNU config.sub ($timestamp)
-Copyright 1992-2014 Free Software Foundation, Inc.
+Copyright 1992-2015 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."
@@ -260,7 +260,7 @@ case $basic_machine in
| c4x | c8051 | clipper \
| d10v | d30v | dlx | dsp16xx \
| epiphany \
- | fido | fr30 | frv \
+ | fido | fr30 | frv | ft32 \
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| hexagon \
| i370 | i860 | i960 | ia64 \
@@ -302,6 +302,7 @@ case $basic_machine in
| pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle \
| pyramid \
+ | riscv32 | riscv64 \
| rl78 | rx \
| score \
| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
@@ -312,6 +313,7 @@ case $basic_machine in
| tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
| ubicom32 \
| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
+ | visium \
| we32k \
| x86 | xc16x | xstormy16 | xtensa \
| z8k | z80)
@@ -326,6 +328,9 @@ case $basic_machine in
c6x)
basic_machine=tic6x-unknown
;;
+ leon|leon[3-9])
+ basic_machine=sparc-$basic_machine
+ ;;
m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
basic_machine=$basic_machine-unknown
os=-none
@@ -436,6 +441,7 @@ case $basic_machine in
| ubicom32-* \
| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
| vax-* \
+ | visium-* \
| we32k-* \
| x86-* | x86_64-* | xc16x-* | xps100-* \
| xstormy16-* | xtensa*-* \
@@ -773,6 +779,9 @@ case $basic_machine in
basic_machine=m68k-isi
os=-sysv
;;
+ leon-*|leon[3-9]-*)
+ basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'`
+ ;;
m68knommu)
basic_machine=m68k-unknown
os=-linux
@@ -828,6 +837,10 @@ case $basic_machine in
basic_machine=powerpc-unknown
os=-morphos
;;
+ moxiebox)
+ basic_machine=moxie-unknown
+ os=-moxiebox
+ ;;
msdos)
basic_machine=i386-pc
os=-msdos
@@ -1373,7 +1386,7 @@ case $os in
| -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
| -linux-newlib* | -linux-musl* | -linux-uclibc* \
- | -uxpv* | -beos* | -mpeix* | -udk* \
+ | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \