* [Buildroot] [PATCH 0/9] Various toolchain related fixes/updates
@ 2016-05-16 22:12 Thomas Petazzoni
2016-05-16 22:12 ` [Buildroot] [PATCH 1/9] gcc: fix build of gcc 6.x on Microblaze Thomas Petazzoni
` (8 more replies)
0 siblings, 9 replies; 22+ messages in thread
From: Thomas Petazzoni @ 2016-05-16 22:12 UTC (permalink / raw)
To: buildroot
Hello,
This patch series contain various fixes/updates to the toolchain
support.
- The first two patches might be considered for 2016.05, as they fix
real problems: building gcc 6.x on Microblaze, and making sure
people don't select glibc 2.22 (which is our default version) with
gcc 6.x, as it doesn't build.
- The next four patches take care of gdb, adding support for 7.11,
moving to 7.10 as the default, and removing 7.8.
- eglibc support is removed.
- binutils 2.23 support is removed. This patch has already been
submitted in the past, I included it in this series as it is
related to the other changes.
- musl support is no longer considered experimental.
Thanks!
Thomas
Thomas Petazzoni (9):
gcc: fix build of gcc 6.x on Microblaze
glibc: disable build of glibc 2.22 with gcc 6.x
gdb: add support for gdb 7.11
gdb: switch to 7.10 as the default version
gdb: remove version 7.8
gdb: specify hashes for the ARC and Microblaze versions
toolchain: remove eglibc support
binutils: remove support for version 2.23
toolchain: musl support is no longer experimental
Config.in.legacy | 31 +-
package/binutils/2.23.2/120-sh-conf.patch | 29 -
.../2.23.2/300-001_ld_makefile_patch.patch | 24 -
.../2.23.2/300-012_check_ldrunpath_length.patch | 21 -
package/binutils/2.23.2/500-sysroot.patch | 37 -
.../2.23.2/600-poison-system-directories.patch | 279 -------
.../binutils/2.23.2/900-xtensa-trampolines.patch | 846 ---------------------
.../901-xtensa-gas-first-frag-alignment.patch | 51 --
.../902-xtensa-gas-ld-diff-relocation-signed.patch | 133 ----
...ix-ld-segfault-when-linking-linux-modules.patch | 47 --
...-target-out-of-range-xtensa-ld-relaxation.patch | 79 --
...ines-search-code-for-conditional-branches.patch | 90 ---
...localized-symbol-refcounting-with-gc-sect.patch | 57 --
...x-gas-segfault-with-text-section-literals.patch | 56 --
...-xtensa-fix-signedness-of-gas-relocations.patch | 47 --
...15-xtensa-fix-.init-.fini-literals-moving.patch | 70 --
package/binutils/Config.in.host | 10 -
package/binutils/binutils.hash | 1 -
.../840-microblaze-enable-dwarf-eh-support.patch | 166 ----
package/gcc/Config.in.host | 2 +-
.../0001-gdbserver-fix-uClibc-whithout-MMU.patch | 34 -
...gdbserver-xtensa-drop-xtensa_usrregs_info.patch | 47 --
...erver-xtensa-fix-typo-in-XCHAL_HAVE_LOOPS.patch | 46 --
.../0004-Add-some-casts-for-building-on-musl.patch | 70 --
...musl-Move-W_STOPCODE-to-common-gdb_wait-h.patch | 63 --
package/gdb/7.8.2/0006-move-__SIGRTMIN.patch | 58 --
package/gdb/Config.in.host | 14 +-
package/gdb/gdb.hash | 9 +-
.../2.18-svnr23787/0001-CVE-2014-7817-eglibc.patch | 174 -----
.../glibc/2.18-svnr23787/0002-accept-make4.patch | 33 -
.../glibc/2.18-svnr23787/0003-CVE-2014-6040.patch | 141 ----
.../glibc/2.18-svnr23787/0004-CVE-2014-9402.patch | 20 -
.../glibc/2.18-svnr23787/0005-CVE-2015-1472.patch | 88 ---
.../2.19-svnr25243/0001-CVE-2014-7817-eglibc.patch | 174 -----
.../glibc/2.19-svnr25243/0002-CVE-2014-6040.patch | 141 ----
.../glibc/2.19-svnr25243/0003-CVE-2014-9402.patch | 20 -
.../glibc/2.19-svnr25243/0004-CVE-2015-1472.patch | 88 ---
package/glibc/Config.in | 29 +-
package/glibc/glibc.mk | 7 -
toolchain/toolchain-buildroot/Config.in | 25 +-
toolchain/toolchain-external/Config.in | 4 +-
41 files changed, 45 insertions(+), 3316 deletions(-)
delete mode 100644 package/binutils/2.23.2/120-sh-conf.patch
delete mode 100644 package/binutils/2.23.2/300-001_ld_makefile_patch.patch
delete mode 100644 package/binutils/2.23.2/300-012_check_ldrunpath_length.patch
delete mode 100644 package/binutils/2.23.2/500-sysroot.patch
delete mode 100644 package/binutils/2.23.2/600-poison-system-directories.patch
delete mode 100644 package/binutils/2.23.2/900-xtensa-trampolines.patch
delete mode 100644 package/binutils/2.23.2/901-xtensa-gas-first-frag-alignment.patch
delete mode 100644 package/binutils/2.23.2/902-xtensa-gas-ld-diff-relocation-signed.patch
delete mode 100644 package/binutils/2.23.2/903-xtensa-fix-ld-segfault-when-linking-linux-modules.patch
delete mode 100644 package/binutils/2.23.2/904-Fix-call8-call-target-out-of-range-xtensa-ld-relaxation.patch
delete mode 100644 package/binutils/2.23.2/905-Fix-trampolines-search-code-for-conditional-branches.patch
delete mode 100644 package/binutils/2.23.2/911-xtensa-fix-localized-symbol-refcounting-with-gc-sect.patch
delete mode 100644 package/binutils/2.23.2/912-xtensa-fix-gas-segfault-with-text-section-literals.patch
delete mode 100644 package/binutils/2.23.2/914-xtensa-fix-signedness-of-gas-relocations.patch
delete mode 100644 package/binutils/2.23.2/915-xtensa-fix-.init-.fini-literals-moving.patch
delete mode 100644 package/gcc/6.1.0/840-microblaze-enable-dwarf-eh-support.patch
delete mode 100644 package/gdb/7.8.2/0001-gdbserver-fix-uClibc-whithout-MMU.patch
delete mode 100644 package/gdb/7.8.2/0002-gdbserver-xtensa-drop-xtensa_usrregs_info.patch
delete mode 100644 package/gdb/7.8.2/0003-gdbserver-xtensa-fix-typo-in-XCHAL_HAVE_LOOPS.patch
delete mode 100644 package/gdb/7.8.2/0004-Add-some-casts-for-building-on-musl.patch
delete mode 100644 package/gdb/7.8.2/0005-musl-Move-W_STOPCODE-to-common-gdb_wait-h.patch
delete mode 100644 package/gdb/7.8.2/0006-move-__SIGRTMIN.patch
delete mode 100644 package/glibc/2.18-svnr23787/0001-CVE-2014-7817-eglibc.patch
delete mode 100644 package/glibc/2.18-svnr23787/0002-accept-make4.patch
delete mode 100644 package/glibc/2.18-svnr23787/0003-CVE-2014-6040.patch
delete mode 100644 package/glibc/2.18-svnr23787/0004-CVE-2014-9402.patch
delete mode 100644 package/glibc/2.18-svnr23787/0005-CVE-2015-1472.patch
delete mode 100644 package/glibc/2.19-svnr25243/0001-CVE-2014-7817-eglibc.patch
delete mode 100644 package/glibc/2.19-svnr25243/0002-CVE-2014-6040.patch
delete mode 100644 package/glibc/2.19-svnr25243/0003-CVE-2014-9402.patch
delete mode 100644 package/glibc/2.19-svnr25243/0004-CVE-2015-1472.patch
--
2.7.4
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Buildroot] [PATCH 1/9] gcc: fix build of gcc 6.x on Microblaze
2016-05-16 22:12 [Buildroot] [PATCH 0/9] Various toolchain related fixes/updates Thomas Petazzoni
@ 2016-05-16 22:12 ` Thomas Petazzoni
2016-05-17 6:43 ` Peter Korsgaard
2016-05-16 22:12 ` [Buildroot] [PATCH 2/9] glibc: disable build of glibc 2.22 with gcc 6.x Thomas Petazzoni
` (7 subsequent siblings)
8 siblings, 1 reply; 22+ messages in thread
From: Thomas Petazzoni @ 2016-05-16 22:12 UTC (permalink / raw)
To: buildroot
Due to patch 840-microblaze-enable-dwarf-eh-support.patch, gcc 6.x
does not build:
../../gcc/config/microblaze/microblaze.c: In function 'void microblaze_expand_epilogue()':
../../gcc/config/microblaze/microblaze.c:3046: error: 'gen_rtx_raw_REG' was not declared in this scope
This patch was originally added to gcc 4.9 to make it capable of
building glibc. However, this is no longer needed with gcc 6.x, which
builds glibc just fine.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
.../840-microblaze-enable-dwarf-eh-support.patch | 166 ---------------------
1 file changed, 166 deletions(-)
delete mode 100644 package/gcc/6.1.0/840-microblaze-enable-dwarf-eh-support.patch
diff --git a/package/gcc/6.1.0/840-microblaze-enable-dwarf-eh-support.patch b/package/gcc/6.1.0/840-microblaze-enable-dwarf-eh-support.patch
deleted file mode 100644
index 81bf60a..0000000
--- a/package/gcc/6.1.0/840-microblaze-enable-dwarf-eh-support.patch
+++ /dev/null
@@ -1,166 +0,0 @@
-Fetched from Xilinx gcc git at https://github.com/Xilinx/gcc
-
-From 23c35173490ac2d6348a668dfc9c1a6eb62171f2 Mon Sep 17 00:00:00 2001
-From: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>
-Date: Mon, 18 Jun 2012 20:18:13 +0200
-Subject: [PATCH] [Patch, microblaze]: Enable DWARF exception handling support.
-
-Changelog
-
-2013-03-18 Edgar E. Iglesias <edgar.iglesias@xilinx.com>
- David Holsgrove <david.holsgrove@xilinx.com>
-
- * common/config/microblaze/microblaze-common.c: Remove
- TARGET_EXCEPT_UNWIND_INFO definition.
- * config/microblaze/microblaze-protos.h: Add
- microblaze_eh_return prototype.
- * gcc/config/microblaze/microblaze.c: (microblaze_must_save_register,
- microblaze_expand_epilogue, microblaze_return_addr): Handle
- calls_eh_return
- (microblaze_eh_return): New function.
- * gcc/config/microblaze/microblaze.h: Define RETURN_ADDR_OFFSET,
- EH_RETURN_DATA_REGNO, MB_EH_STACKADJ_REGNUM, EH_RETURN_STACKADJ_RTX,
- ASM_PREFERRED_EH_DATA_FORMAT
- * gcc/config/microblaze/microblaze.md: Define eh_return pattern.
-
-Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com>
-Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
----
- gcc/common/config/microblaze/microblaze-common.c | 3 ---
- gcc/config/microblaze/microblaze-protos.h | 1 +
- gcc/config/microblaze/microblaze.c | 29 ++++++++++++++++++++----
- gcc/config/microblaze/microblaze.h | 15 ++++++++++++
- gcc/config/microblaze/microblaze.md | 11 +++++++++
- 5 files changed, 52 insertions(+), 7 deletions(-)
-
-Index: b/gcc/common/config/microblaze/microblaze-common.c
-===================================================================
---- a/gcc/common/config/microblaze/microblaze-common.c
-+++ b/gcc/common/config/microblaze/microblaze-common.c
-@@ -37,7 +37,4 @@
- #undef TARGET_OPTION_OPTIMIZATION_TABLE
- #define TARGET_OPTION_OPTIMIZATION_TABLE microblaze_option_optimization_table
-
--#undef TARGET_EXCEPT_UNWIND_INFO
--#define TARGET_EXCEPT_UNWIND_INFO sjlj_except_unwind_info
--
- struct gcc_targetm_common targetm_common = TARGETM_COMMON_INITIALIZER;
-Index: b/gcc/config/microblaze/microblaze-protos.h
-===================================================================
---- a/gcc/config/microblaze/microblaze-protos.h
-+++ b/gcc/config/microblaze/microblaze-protos.h
-@@ -57,6 +57,7 @@
- extern int symbol_mentioned_p (rtx);
- extern int label_mentioned_p (rtx);
- extern bool microblaze_cannot_force_const_mem (machine_mode, rtx);
-+extern void microblaze_eh_return (rtx op0);
- #endif /* RTX_CODE */
-
- /* Declare functions in microblaze-c.c. */
-Index: b/gcc/config/microblaze/microblaze.c
-===================================================================
---- a/gcc/config/microblaze/microblaze.c
-+++ b/gcc/config/microblaze/microblaze.c
-@@ -1924,6 +1924,11 @@
- if (frame_pointer_needed && (regno == HARD_FRAME_POINTER_REGNUM))
- return 1;
-
-+ if (crtl->calls_eh_return
-+ && regno == MB_ABI_SUB_RETURN_ADDR_REGNUM) {
-+ return 1;
-+ }
-+
- if (!crtl->is_leaf)
- {
- if (regno == MB_ABI_SUB_RETURN_ADDR_REGNUM)
-@@ -1951,6 +1956,13 @@
- return 1;
- }
-
-+ if (crtl->calls_eh_return
-+ && (regno == EH_RETURN_DATA_REGNO (0)
-+ || regno == EH_RETURN_DATA_REGNO (1)))
-+ {
-+ return 1;
-+ }
-+
- return 0;
- }
-
-@@ -3027,6 +3039,12 @@
- emit_insn (gen_addsi3 (stack_pointer_rtx, stack_pointer_rtx, fsiz_rtx));
- }
-
-+ if (crtl->calls_eh_return)
-+ emit_insn (gen_addsi3 (stack_pointer_rtx,
-+ stack_pointer_rtx,
-+ gen_rtx_raw_REG (SImode,
-+ MB_EH_STACKADJ_REGNUM)));
-+
- emit_jump_insn (gen_return_internal (gen_rtx_REG (Pmode, GP_REG_FIRST +
- MB_ABI_SUB_RETURN_ADDR_REGNUM)));
- }
-@@ -3324,10 +3342,13 @@
- if (count != 0)
- return NULL_RTX;
-
-- return gen_rtx_PLUS (Pmode,
-- get_hard_reg_initial_val (Pmode,
-- MB_ABI_SUB_RETURN_ADDR_REGNUM),
-- GEN_INT (8));
-+ return get_hard_reg_initial_val (Pmode,
-+ MB_ABI_SUB_RETURN_ADDR_REGNUM);
-+}
-+
-+void microblaze_eh_return (rtx op0)
-+{
-+ emit_insn (gen_movsi(gen_rtx_MEM(Pmode, stack_pointer_rtx), op0));
- }
-
- /* Queue an .ident string in the queue of top-level asm statements.
-Index: b/gcc/config/microblaze/microblaze.h
-===================================================================
---- a/gcc/config/microblaze/microblaze.h
-+++ b/gcc/config/microblaze/microblaze.h
-@@ -184,6 +184,21 @@
- #define INCOMING_RETURN_ADDR_RTX \
- gen_rtx_REG (VOIDmode, GP_REG_FIRST + MB_ABI_SUB_RETURN_ADDR_REGNUM)
-
-+/* Specifies the offset from INCOMING_RETURN_ADDR_RTX and the actual return PC. */
-+#define RETURN_ADDR_OFFSET (8)
-+
-+/* Describe how we implement __builtin_eh_return. */
-+#define EH_RETURN_DATA_REGNO(N) (((N) < 2) ? MB_ABI_FIRST_ARG_REGNUM + (N) : INVALID_REGNUM)
-+
-+#define MB_EH_STACKADJ_REGNUM MB_ABI_INT_RETURN_VAL2_REGNUM
-+#define EH_RETURN_STACKADJ_RTX gen_rtx_REG (Pmode, MB_EH_STACKADJ_REGNUM)
-+
-+/* Select a format to encode pointers in exception handling data. CODE
-+ is 0 for data, 1 for code labels, 2 for function pointers. GLOBAL is
-+ true if the symbol may be affected by dynamic relocations. */
-+#define ASM_PREFERRED_EH_DATA_FORMAT(CODE,GLOBAL) \
-+ ((flag_pic || GLOBAL) ? DW_EH_PE_aligned : DW_EH_PE_absptr)
-+
- /* Use DWARF 2 debugging information by default. */
- #define DWARF2_DEBUGGING_INFO
- #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
-Index: b/gcc/config/microblaze/microblaze.md
-===================================================================
---- a/gcc/config/microblaze/microblaze.md
-+++ b/gcc/config/microblaze/microblaze.md
-@@ -2324,4 +2324,15 @@
- (set_attr "mode" "SI")
- (set_attr "length" "4")])
-
-+; This is used in compiling the unwind routines.
-+(define_expand "eh_return"
-+ [(use (match_operand 0 "general_operand" ""))]
-+ ""
-+ "
-+{
-+ microblaze_eh_return(operands[0]);
-+ DONE;
-+}")
-+
- (include "sync.md")
-+
--
2.7.4
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [Buildroot] [PATCH 2/9] glibc: disable build of glibc 2.22 with gcc 6.x
2016-05-16 22:12 [Buildroot] [PATCH 0/9] Various toolchain related fixes/updates Thomas Petazzoni
2016-05-16 22:12 ` [Buildroot] [PATCH 1/9] gcc: fix build of gcc 6.x on Microblaze Thomas Petazzoni
@ 2016-05-16 22:12 ` Thomas Petazzoni
2016-05-17 6:44 ` Peter Korsgaard
2016-05-16 22:12 ` [Buildroot] [PATCH 3/9] gdb: add support for gdb 7.11 Thomas Petazzoni
` (6 subsequent siblings)
8 siblings, 1 reply; 22+ messages in thread
From: Thomas Petazzoni @ 2016-05-16 22:12 UTC (permalink / raw)
To: buildroot
glibc-2.22 does not build with gcc 6.x. The first issues can be fixed
by:
- Using the same 0004-gcc6.patch as we're using with glibc 2.23 since
Buildroot commit ab8de336eb39ae1cb019a72be65bd0504c86e527.
- Backport glibc commit 5542236837c5c41435f8282ec92799f480c36f18 to fix
strchr() build failure.
But then, there are some more failures caused by the fact that numerous
glibc files were not using modern prototypes in the function
definitions, causing build failures such as:
../sysdeps/unix/sysv/linux/dl-openat64.c:26:1: error: 'openat64' defined as variadic function without prototype [-Werror]
openat64 (dfd, file, oflag)
^~~~~~~~
In file included from ../include/fcntl.h:2:0,
from ../sysdeps/unix/sysv/linux/dl-openat64.c:21:
../io/fcntl.h:214:12: note: previous declaration of 'openat64' was here
extern int openat64 (int __fd, const char *__file, int __oflag, ...)
^~~~~~~~
This could be fixed by backporting glibc commit
9dd346ff431fc761f1b748bd4da8bb59f7652094, but this is a large commit,
touching a significant number of files. We probably don't want to take
this path, and instead making glibc 2.22 as not available with gcc 6.x
seems like the right course of action.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
package/glibc/Config.in | 2 ++
1 file changed, 2 insertions(+)
diff --git a/package/glibc/Config.in b/package/glibc/Config.in
index 0565162..5b82170 100644
--- a/package/glibc/Config.in
+++ b/package/glibc/Config.in
@@ -38,6 +38,8 @@ config BR2_GLIBC_VERSION_2_22
bool "2.22"
# No support for pthread barriers on < v9 ISA
depends on !BR2_sparc
+ # Too old to build with gcc >= 6.x
+ depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_6
config BR2_GLIBC_VERSION_2_23
bool "2.23"
--
2.7.4
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [Buildroot] [PATCH 3/9] gdb: add support for gdb 7.11
2016-05-16 22:12 [Buildroot] [PATCH 0/9] Various toolchain related fixes/updates Thomas Petazzoni
2016-05-16 22:12 ` [Buildroot] [PATCH 1/9] gcc: fix build of gcc 6.x on Microblaze Thomas Petazzoni
2016-05-16 22:12 ` [Buildroot] [PATCH 2/9] glibc: disable build of glibc 2.22 with gcc 6.x Thomas Petazzoni
@ 2016-05-16 22:12 ` Thomas Petazzoni
2016-05-17 6:45 ` Peter Korsgaard
2016-05-16 22:12 ` [Buildroot] [PATCH 4/9] gdb: switch to 7.10 as the default version Thomas Petazzoni
` (5 subsequent siblings)
8 siblings, 1 reply; 22+ messages in thread
From: Thomas Petazzoni @ 2016-05-16 22:12 UTC (permalink / raw)
To: buildroot
gdb 7.11 was released on February 2016, it's time to include it in
Buildroot, which this commit does.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
package/gdb/Config.in.host | 4 ++++
package/gdb/gdb.hash | 2 ++
2 files changed, 6 insertions(+)
diff --git a/package/gdb/Config.in.host b/package/gdb/Config.in.host
index cc1dc40..35eb418 100644
--- a/package/gdb/Config.in.host
+++ b/package/gdb/Config.in.host
@@ -40,6 +40,9 @@ choice
config BR2_GDB_VERSION_7_10
bool "gdb 7.10.x"
+ config BR2_GDB_VERSION_7_11
+ bool "gdb 7.11.x"
+
endchoice
endif
@@ -53,3 +56,4 @@ config BR2_GDB_VERSION
default "7.8.2" if BR2_GDB_VERSION_7_8
default "7.9.1" if BR2_GDB_VERSION_7_9 || !BR2_PACKAGE_HOST_GDB
default "7.10.1" if BR2_GDB_VERSION_7_10
+ default "7.11" if BR2_GDB_VERSION_7_11
diff --git a/package/gdb/gdb.hash b/package/gdb/gdb.hash
index ee0ec73..87ce09c 100644
--- a/package/gdb/gdb.hash
+++ b/package/gdb/gdb.hash
@@ -2,6 +2,8 @@
sha512 face5bf1b4ce144fc8604fc84620beed956177a11fd632b4e41906fc7f632910b2b43a50e6cfdfd6cbd876ee527c813bddab8df29dc560a6c36694cdb8edc4e4 gdb-7.8.2.tar.xz
sha512 eebdf88b24e52e792b8a4b89ea85790de72b462a7810b44975fdf4232c068f353b15506071f450102a9d4bcecdde8e93dc3748a10699b7f73f3e04fb2d9d8414 gdb-7.9.1.tar.xz
sha512 17a5138277a31685a5c2a841cb47ed9bc4626ea617b8ca77750513b300299f4fbbffe504958b5372de610dcb952c679cf8fa9c1bdadd380294fbf59b6e366010 gdb-7.10.1.tar.xz
+sha512 eadd2a59a1e48b1484eb2bea85256d6b1912926bc8b690793d02babf2639608bd22a0f2de77d4f60092da3b1dafeaa6d75a7cff3e84bd4e22fc46364b68e5e9f gdb-7.11.tar.xz
+
# No hash for the ARC & microblaze variants, comes from the github-helper:
none xxx gdb-arc-2016.03-rc2-gdb.tar.gz
none xxx gdb-6be65fb56ea6694a9260733a536a023a1e2d4d57.tar.gz
--
2.7.4
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [Buildroot] [PATCH 4/9] gdb: switch to 7.10 as the default version
2016-05-16 22:12 [Buildroot] [PATCH 0/9] Various toolchain related fixes/updates Thomas Petazzoni
` (2 preceding siblings ...)
2016-05-16 22:12 ` [Buildroot] [PATCH 3/9] gdb: add support for gdb 7.11 Thomas Petazzoni
@ 2016-05-16 22:12 ` Thomas Petazzoni
2016-05-17 6:45 ` Peter Korsgaard
2016-05-16 22:12 ` [Buildroot] [PATCH 5/9] gdb: remove version 7.8 Thomas Petazzoni
` (4 subsequent siblings)
8 siblings, 1 reply; 22+ messages in thread
From: Thomas Petazzoni @ 2016-05-16 22:12 UTC (permalink / raw)
To: buildroot
7.11 is around, 7.10 has already seen a point release, so it's time to
make 7.10 the default version for gdb.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
package/gdb/Config.in.host | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/package/gdb/Config.in.host b/package/gdb/Config.in.host
index 35eb418..46e00f6 100644
--- a/package/gdb/Config.in.host
+++ b/package/gdb/Config.in.host
@@ -27,7 +27,7 @@ choice
prompt "GDB debugger Version"
depends on !BR2_arc
depends on !BR2_microblaze
- default BR2_GDB_VERSION_7_9
+ default BR2_GDB_VERSION_7_10
help
Select the version of gdb you wish to use.
@@ -54,6 +54,6 @@ config BR2_GDB_VERSION
default "arc-2016.03-rc2-gdb" if BR2_arc
default "6be65fb56ea6694a9260733a536a023a1e2d4d57" if BR2_microblaze
default "7.8.2" if BR2_GDB_VERSION_7_8
- default "7.9.1" if BR2_GDB_VERSION_7_9 || !BR2_PACKAGE_HOST_GDB
- default "7.10.1" if BR2_GDB_VERSION_7_10
+ default "7.9.1" if BR2_GDB_VERSION_7_9
+ default "7.10.1" if BR2_GDB_VERSION_7_10 || !BR2_PACKAGE_HOST_GDB
default "7.11" if BR2_GDB_VERSION_7_11
--
2.7.4
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [Buildroot] [PATCH 5/9] gdb: remove version 7.8
2016-05-16 22:12 [Buildroot] [PATCH 0/9] Various toolchain related fixes/updates Thomas Petazzoni
` (3 preceding siblings ...)
2016-05-16 22:12 ` [Buildroot] [PATCH 4/9] gdb: switch to 7.10 as the default version Thomas Petazzoni
@ 2016-05-16 22:12 ` Thomas Petazzoni
2016-05-17 6:46 ` Peter Korsgaard
2016-05-16 22:12 ` [Buildroot] [PATCH 6/9] gdb: specify hashes for the ARC and Microblaze versions Thomas Petazzoni
` (3 subsequent siblings)
8 siblings, 1 reply; 22+ messages in thread
From: Thomas Petazzoni @ 2016-05-16 22:12 UTC (permalink / raw)
To: buildroot
Now that 7.11 has been added and 7.10 is the default version, let's
remove the old 7.8 release.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
Config.in.legacy | 10 ++++
.../0001-gdbserver-fix-uClibc-whithout-MMU.patch | 34 -----------
...gdbserver-xtensa-drop-xtensa_usrregs_info.patch | 47 ---------------
...erver-xtensa-fix-typo-in-XCHAL_HAVE_LOOPS.patch | 46 --------------
.../0004-Add-some-casts-for-building-on-musl.patch | 70 ----------------------
...musl-Move-W_STOPCODE-to-common-gdb_wait-h.patch | 63 -------------------
package/gdb/7.8.2/0006-move-__SIGRTMIN.patch | 58 ------------------
package/gdb/Config.in.host | 4 --
package/gdb/gdb.hash | 1 -
9 files changed, 10 insertions(+), 323 deletions(-)
delete mode 100644 package/gdb/7.8.2/0001-gdbserver-fix-uClibc-whithout-MMU.patch
delete mode 100644 package/gdb/7.8.2/0002-gdbserver-xtensa-drop-xtensa_usrregs_info.patch
delete mode 100644 package/gdb/7.8.2/0003-gdbserver-xtensa-fix-typo-in-XCHAL_HAVE_LOOPS.patch
delete mode 100644 package/gdb/7.8.2/0004-Add-some-casts-for-building-on-musl.patch
delete mode 100644 package/gdb/7.8.2/0005-musl-Move-W_STOPCODE-to-common-gdb_wait-h.patch
delete mode 100644 package/gdb/7.8.2/0006-move-__SIGRTMIN.patch
diff --git a/Config.in.legacy b/Config.in.legacy
index 824a220..ff11d75 100644
--- a/Config.in.legacy
+++ b/Config.in.legacy
@@ -143,6 +143,16 @@ comment "----------------------------------------------------"
endif
###############################################################################
+comment "Legacy options removed in 2016.08"
+
+config BR2_GDB_VERSION_7_8
+ bool "gdb 7.8 has been removed"
+ select BR2_LEGACY
+ help
+ The 7.8 version of gdb has been removed. Use a newer version
+ instead.
+
+###############################################################################
comment "Legacy options removed in 2016.05"
config BR2_PACKAGE_NGINX_HTTP_SPDY_MODULE
diff --git a/package/gdb/7.8.2/0001-gdbserver-fix-uClibc-whithout-MMU.patch b/package/gdb/7.8.2/0001-gdbserver-fix-uClibc-whithout-MMU.patch
deleted file mode 100644
index 42168df..0000000
--- a/package/gdb/7.8.2/0001-gdbserver-fix-uClibc-whithout-MMU.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 59432cbfe267ad89b7cfc73dcd702b8282ef4e9d Mon Sep 17 00:00:00 2001
-From: Romain Naour <romain.naour@openwide.fr>
-Date: Fri, 10 Apr 2015 22:58:07 +0200
-Subject: [PATCH] gdbserver: fix uClibc whithout MMU.
-
-Since commit d86d4aafd4fa22fa4cccb83253fb187b03f97f48, the pid
-must be retrieved from current_inferior.
-
-The change has not been made in the function linux_read_offsets().
-
-Fixes:
-http://autobuild.buildroot.net/results/9e4/9e4df085319e346803c26c65478accb27eb950ae/build-end.log
-
-Signed-off-by: Romain Naour <romain.naour@openwide.fr>
----
- gdb/gdbserver/linux-low.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c
-index 1a40897..71d078a 100644
---- a/gdb/gdbserver/linux-low.c
-+++ b/gdb/gdbserver/linux-low.c
-@@ -4933,7 +4933,7 @@ static int
- linux_read_offsets (CORE_ADDR *text_p, CORE_ADDR *data_p)
- {
- unsigned long text, text_end, data;
-- int pid = lwpid_of (get_thread_lwp (current_inferior));
-+ int pid = lwpid_of (current_inferior);
-
- errno = 0;
-
---
-1.9.3
-
diff --git a/package/gdb/7.8.2/0002-gdbserver-xtensa-drop-xtensa_usrregs_info.patch b/package/gdb/7.8.2/0002-gdbserver-xtensa-drop-xtensa_usrregs_info.patch
deleted file mode 100644
index 93fe749..0000000
--- a/package/gdb/7.8.2/0002-gdbserver-xtensa-drop-xtensa_usrregs_info.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From deb44829ecc1dd38275af0fcf91acd319e227a89 Mon Sep 17 00:00:00 2001
-From: Max Filippov <jcmvbkbc@gmail.com>
-Date: Fri, 17 Apr 2015 03:07:41 +0300
-Subject: [PATCH 1/2] gdbserver/xtensa: drop xtensa_usrregs_info
-
-xtensa_usrregs_info refers to undefined variables xtensa_num_regs and
-xtensa_regmap. Drop xtensa_usrregs_info and replace pointer to usrregs
-in regs_info with NULL since all registers are read/set through regsets.
-
-2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
-gdb/gdbserver/
- * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
- (regs_info): Replace usrregs pointer with NULL.
-
-Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
----
-Backported from: deb44829ecc1dd38275af0fcf91acd319e227a89
-Changes to ChangeLog are dropped.
-
- gdb/gdbserver/linux-xtensa-low.c | 8 +-------
- 2 files changed, 6 insertions(+), 7 deletions(-)
-
-diff --git a/gdb/gdbserver/linux-xtensa-low.c b/gdb/gdbserver/linux-xtensa-low.c
-index f7fafaf..e786da5 100644
---- a/gdb/gdbserver/linux-xtensa-low.c
-+++ b/gdb/gdbserver/linux-xtensa-low.c
-@@ -186,16 +186,10 @@ static struct regsets_info xtensa_regsets_info =
- NULL, /* disabled_regsets */
- };
-
--static struct usrregs_info xtensa_usrregs_info =
-- {
-- xtensa_num_regs,
-- xtensa_regmap,
-- };
--
- static struct regs_info regs_info =
- {
- NULL, /* regset_bitmap */
-- &xtensa_usrregs_info,
-+ NULL, /* usrregs */
- &xtensa_regsets_info
- };
-
---
-1.8.1.4
-
diff --git a/package/gdb/7.8.2/0003-gdbserver-xtensa-fix-typo-in-XCHAL_HAVE_LOOPS.patch b/package/gdb/7.8.2/0003-gdbserver-xtensa-fix-typo-in-XCHAL_HAVE_LOOPS.patch
deleted file mode 100644
index 027f700..0000000
--- a/package/gdb/7.8.2/0003-gdbserver-xtensa-fix-typo-in-XCHAL_HAVE_LOOPS.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From a2d5a9d76f2366ed93095fc5a63eafa06b22f808 Mon Sep 17 00:00:00 2001
-From: Max Filippov <jcmvbkbc@gmail.com>
-Date: Fri, 17 Apr 2015 02:52:50 +0300
-Subject: [PATCH 2/2] gdbserver/xtensa: fix typo in XCHAL_HAVE_LOOPS
-
-This fixes lbeg/lend/lcount registers handling through gdbserver.
-
-2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
-gdb/gdbserver/
- * linux-xtensa-low.c (xtensa_fill_gregset)
- (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
- XCHAL_HAVE_LOOP.
-
-Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
----
-Backported from: a2d5a9d76f2366ed93095fc5a63eafa06b22f808
-Changes to ChangeLog are dropped.
-
- gdb/gdbserver/linux-xtensa-low.c | 4 ++--
- 2 files changed, 8 insertions(+), 2 deletions(-)
-
-diff --git a/gdb/gdbserver/linux-xtensa-low.c b/gdb/gdbserver/linux-xtensa-low.c
-index e786da5..4daccee 100644
---- a/gdb/gdbserver/linux-xtensa-low.c
-+++ b/gdb/gdbserver/linux-xtensa-low.c
-@@ -59,7 +59,7 @@ xtensa_fill_gregset (struct regcache *regcache, void *buf)
-
- /* Loop registers, if hardware has it. */
-
--#if XCHAL_HAVE_LOOP
-+#if XCHAL_HAVE_LOOPS
- collect_register_by_name (regcache, "lbeg", (char*)&rset[R_LBEG]);
- collect_register_by_name (regcache, "lend", (char*)&rset[R_LEND]);
- collect_register_by_name (regcache, "lcount", (char*)&rset[R_LCOUNT]);
-@@ -94,7 +94,7 @@ xtensa_store_gregset (struct regcache *regcache, const void *buf)
-
- /* Loop registers, if hardware has it. */
-
--#if XCHAL_HAVE_LOOP
-+#if XCHAL_HAVE_LOOPS
- supply_register_by_name (regcache, "lbeg", (char*)&rset[R_LBEG]);
- supply_register_by_name (regcache, "lend", (char*)&rset[R_LEND]);
- supply_register_by_name (regcache, "lcount", (char*)&rset[R_LCOUNT]);
---
-1.8.1.4
-
diff --git a/package/gdb/7.8.2/0004-Add-some-casts-for-building-on-musl.patch b/package/gdb/7.8.2/0004-Add-some-casts-for-building-on-musl.patch
deleted file mode 100644
index bf20c03..0000000
--- a/package/gdb/7.8.2/0004-Add-some-casts-for-building-on-musl.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-From d41401ace01c234f42697e190a2ac95991780626 Mon Sep 17 00:00:00 2001
-From: Doug Evans <dje@google.com>
-Date: Mon, 26 Oct 2015 13:20:12 -0700
-Subject: [PATCH] Add some casts for building on musl.
-
-gdb/ChangeLog:
-
- * linux-thread-db.c (find_new_threads_callback): Cast ti.ti_tid to
- unsigned long for debug_printf.
- (thread_db_pid_to_str): Ditto.
-
-gdb/gdbserver/ChangeLog:
-
- * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
- for debug_printf.
- (attach_thread, find_new_threads_callback): Ditto.
-
-[Arnout: removed the parts that don't apply, including ChangeLog]
-Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
----
- gdb/ChangeLog | 5 +++++
- gdb/gdbserver/ChangeLog | 6 ++++++
- gdb/gdbserver/thread-db.c | 9 +++++----
- gdb/linux-thread-db.c | 5 +++--
- 4 files changed, 19 insertions(+), 6 deletions(-)
-
-diff --git a/gdb/gdbserver/thread-db.c b/gdb/gdbserver/thread-db.c
-index ffe722d..3df10ff 100644
---- a/gdb/gdbserver/thread-db.c
-+++ b/gdb/gdbserver/thread-db.c
-@@ -278,7 +278,7 @@ find_one_thread (ptid_t ptid)
-
- if (debug_threads)
- debug_printf ("Found thread %ld (LWP %d)\n",
-- ti.ti_tid, ti.ti_lid);
-+ (unsigned long) ti.ti_tid, ti.ti_lid);
-
- if (lwpid != ti.ti_lid)
- {
-@@ -319,12 +319,12 @@ attach_thread (const td_thrhandle_t *th_p, td_thrinfo_t *ti_p)
-
- if (debug_threads)
- debug_printf ("Attaching to thread %ld (LWP %d)\n",
-- ti_p->ti_tid, ti_p->ti_lid);
-+ (unsigned long) ti_p->ti_tid, ti_p->ti_lid);
- err = linux_attach_lwp (ptid);
- if (err != 0)
- {
- warning ("Could not attach to thread %ld (LWP %d): %s\n",
-- ti_p->ti_tid, ti_p->ti_lid,
-+ (unsigned long) ti_p->ti_tid, ti_p->ti_lid,
- linux_attach_fail_reason_string (ptid, err));
- return 0;
- }
-diff --git a/gdb/linux-thread-db.c b/gdb/linux-thread-db.c
-index 66e9595..41db29a 100644
---- a/gdb/linux-thread-db.c
-+++ b/gdb/linux-thread-db.c
-@@ -1816,7 +1817,7 @@ thread_db_pid_to_str (struct target_ops *ops, ptid_t ptid)
-
- tid = thread_info->priv->tid;
- snprintf (buf, sizeof (buf), "Thread 0x%lx (LWP %ld)",
-- tid, ptid_get_lwp (ptid));
-+ (unsigned long) tid, ptid_get_lwp (ptid));
-
- return buf;
- }
---
-1.9.4
-
diff --git a/package/gdb/7.8.2/0005-musl-Move-W_STOPCODE-to-common-gdb_wait-h.patch b/package/gdb/7.8.2/0005-musl-Move-W_STOPCODE-to-common-gdb_wait-h.patch
deleted file mode 100644
index 60c357c..0000000
--- a/package/gdb/7.8.2/0005-musl-Move-W_STOPCODE-to-common-gdb_wait-h.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-From 963843d4d07aef6caa296dacf191f8adc9518596 Mon Sep 17 00:00:00 2001
-From: Doug Evans <dje@google.com>
-Date: Mon, 26 Oct 2015 13:24:01 -0700
-Subject: [PATCH] musl: Move W_STOPCODE to common/gdb_wait.h.
-
-gdb/ChangeLog:
-
- * common/gdb_wait.h (W_STOPCODE): Define, moved here from
- gdbserver/linux-low.c.
- (WSETSTOP): Simplify.
-
-gdb/gdbserver/ChangeLog:
-
- * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
-
-[Arnout: removed the parts that don't apply, including ChangeLog]
-Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
----
- gdb/ChangeLog | 6 ++++++
- gdb/common/gdb_wait.h | 8 ++++----
- gdb/gdbserver/ChangeLog | 4 ++++
- gdb/gdbserver/linux-low.c | 4 ----
- 4 files changed, 14 insertions(+), 8 deletions(-)
-
-diff --git a/gdb/common/gdb_wait.h b/gdb/common/gdb_wait.h
-index 9b250d2..412f813 100644
---- a/gdb/common/gdb_wait.h
-+++ b/gdb/common/gdb_wait.h
-@@ -85,12 +85,12 @@
- # endif
- #endif
-
-+#ifndef W_STOPCODE
-+#define W_STOPCODE(sig) ((sig) << 8 | 0x7f)
-+#endif
-+
- #ifndef WSETSTOP
--# ifdef W_STOPCODE
- #define WSETSTOP(w,sig) ((w) = W_STOPCODE(sig))
--# else
--#define WSETSTOP(w,sig) ((w) = (0177 | ((sig) << 8)))
--# endif
- #endif
-
- /* For native GNU/Linux we may use waitpid and the __WCLONE option.
-diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c
-index 0c552b8..7ed67c7 100644
---- a/gdb/gdbserver/linux-low.c
-+++ b/gdb/gdbserver/linux-low.c
-@@ -70,10 +70,6 @@
- #define O_LARGEFILE 0
- #endif
-
--#ifndef W_STOPCODE
--#define W_STOPCODE(sig) ((sig) << 8 | 0x7f)
--#endif
--
- /* This is the kernel's hard limit. Not to be confused with
- SIGRTMIN. */
- #ifndef __SIGRTMIN
---
-1.9.4
-
diff --git a/package/gdb/7.8.2/0006-move-__SIGRTMIN.patch b/package/gdb/7.8.2/0006-move-__SIGRTMIN.patch
deleted file mode 100644
index 38ba1f0..0000000
--- a/package/gdb/7.8.2/0006-move-__SIGRTMIN.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-From 682b25469e66ea45b214e95962671373983c118f Mon Sep 17 00:00:00 2001
-From: Doug Evans <dje@google.com>
-Date: Mon, 26 Oct 2015 13:30:57 -0700
-Subject: [PATCH] Move __SIGRTMIN.
-
-gdb/ChangeLog:
-
- * nat/linux-nat.h (__SIGRTMIN): Move here from gdbserver/linux-low.c.
-
-gdb/gdbserver/ChangeLog:
-
- * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
-
-[Arnout: removed the parts that don't apply, including ChangeLog]
-Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
----
- gdb/ChangeLog | 4 ++++
- gdb/gdbserver/ChangeLog | 4 ++++
- gdb/gdbserver/linux-low.c | 6 ------
- gdb/nat/linux-nat.h | 5 +++++
- 4 files changed, 13 insertions(+), 6 deletions(-)
-
-diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c
-index 7ed67c7..e778c4c 100644
---- a/gdb/gdbserver/linux-low.c
-+++ b/gdb/gdbserver/linux-low.c
-@@ -70,12 +70,6 @@
- #define O_LARGEFILE 0
- #endif
-
--/* This is the kernel's hard limit. Not to be confused with
-- SIGRTMIN. */
--#ifndef __SIGRTMIN
--#define __SIGRTMIN 32
--#endif
--
- /* Some targets did not define these ptrace constants from the start,
- so gdbserver defines them locally here. In the future, these may
- be removed after they are added to asm/ptrace.h. */
-diff --git a/gdb/nat/linux-nat.h b/gdb/nat/linux-nat.h
-index 0633fa9..70e6274 100644
---- a/gdb/nat/linux-nat.h
-+++ b/gdb/nat/linux-nat.h
-@@ -25,6 +25,11 @@
- struct lwp_info;
- struct arch_lwp_info;
-
-+/* This is the kernel's hard limit. Not to be confused with SIGRTMIN. */
-+#ifndef __SIGRTMIN
-+#define __SIGRTMIN 32
-+#endif
-+
- /* Unlike other extended result codes, WSTOPSIG (status) on
- PTRACE_O_TRACESYSGOOD syscall events doesn't return SIGTRAP, but
- instead SIGTRAP with bit 7 set. */
---
-1.9.4
-
diff --git a/package/gdb/Config.in.host b/package/gdb/Config.in.host
index 46e00f6..d006fb7 100644
--- a/package/gdb/Config.in.host
+++ b/package/gdb/Config.in.host
@@ -31,9 +31,6 @@ choice
help
Select the version of gdb you wish to use.
- config BR2_GDB_VERSION_7_8
- bool "gdb 7.8.x"
-
config BR2_GDB_VERSION_7_9
bool "gdb 7.9.x"
@@ -53,7 +50,6 @@ config BR2_GDB_VERSION
depends on BR2_PACKAGE_GDB || BR2_PACKAGE_HOST_GDB
default "arc-2016.03-rc2-gdb" if BR2_arc
default "6be65fb56ea6694a9260733a536a023a1e2d4d57" if BR2_microblaze
- default "7.8.2" if BR2_GDB_VERSION_7_8
default "7.9.1" if BR2_GDB_VERSION_7_9
default "7.10.1" if BR2_GDB_VERSION_7_10 || !BR2_PACKAGE_HOST_GDB
default "7.11" if BR2_GDB_VERSION_7_11
diff --git a/package/gdb/gdb.hash b/package/gdb/gdb.hash
index 87ce09c..0fec3d0 100644
--- a/package/gdb/gdb.hash
+++ b/package/gdb/gdb.hash
@@ -1,5 +1,4 @@
# From ftp://gcc.gnu.org/pub/gdb/releases/sha512.sum
-sha512 face5bf1b4ce144fc8604fc84620beed956177a11fd632b4e41906fc7f632910b2b43a50e6cfdfd6cbd876ee527c813bddab8df29dc560a6c36694cdb8edc4e4 gdb-7.8.2.tar.xz
sha512 eebdf88b24e52e792b8a4b89ea85790de72b462a7810b44975fdf4232c068f353b15506071f450102a9d4bcecdde8e93dc3748a10699b7f73f3e04fb2d9d8414 gdb-7.9.1.tar.xz
sha512 17a5138277a31685a5c2a841cb47ed9bc4626ea617b8ca77750513b300299f4fbbffe504958b5372de610dcb952c679cf8fa9c1bdadd380294fbf59b6e366010 gdb-7.10.1.tar.xz
sha512 eadd2a59a1e48b1484eb2bea85256d6b1912926bc8b690793d02babf2639608bd22a0f2de77d4f60092da3b1dafeaa6d75a7cff3e84bd4e22fc46364b68e5e9f gdb-7.11.tar.xz
--
2.7.4
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [Buildroot] [PATCH 6/9] gdb: specify hashes for the ARC and Microblaze versions
2016-05-16 22:12 [Buildroot] [PATCH 0/9] Various toolchain related fixes/updates Thomas Petazzoni
` (4 preceding siblings ...)
2016-05-16 22:12 ` [Buildroot] [PATCH 5/9] gdb: remove version 7.8 Thomas Petazzoni
@ 2016-05-16 22:12 ` Thomas Petazzoni
2016-05-17 6:48 ` Peter Korsgaard
2016-05-16 22:13 ` [Buildroot] [PATCH 7/9] toolchain: remove eglibc support Thomas Petazzoni
` (2 subsequent siblings)
8 siblings, 1 reply; 22+ messages in thread
From: Thomas Petazzoni @ 2016-05-16 22:12 UTC (permalink / raw)
To: buildroot
On ARC and Microblaze, a special GDB version is used, fetched from
Github in both cases. Now that we consider Github generated tarballs
to be stable, we can specify hashes for those versions, rather than
using the special "none" hash to skip the hash check.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
package/gdb/gdb.hash | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/package/gdb/gdb.hash b/package/gdb/gdb.hash
index 0fec3d0..dd55189 100644
--- a/package/gdb/gdb.hash
+++ b/package/gdb/gdb.hash
@@ -3,6 +3,6 @@ sha512 eebdf88b24e52e792b8a4b89ea85790de72b462a7810b44975fdf4232c068f353b1550607
sha512 17a5138277a31685a5c2a841cb47ed9bc4626ea617b8ca77750513b300299f4fbbffe504958b5372de610dcb952c679cf8fa9c1bdadd380294fbf59b6e366010 gdb-7.10.1.tar.xz
sha512 eadd2a59a1e48b1484eb2bea85256d6b1912926bc8b690793d02babf2639608bd22a0f2de77d4f60092da3b1dafeaa6d75a7cff3e84bd4e22fc46364b68e5e9f gdb-7.11.tar.xz
-# No hash for the ARC & microblaze variants, comes from the github-helper:
-none xxx gdb-arc-2016.03-rc2-gdb.tar.gz
-none xxx gdb-6be65fb56ea6694a9260733a536a023a1e2d4d57.tar.gz
+# Locally calculated (fetched from Github)
+sha512 0a467091d4b01fbecabb4b8da1cb743025c70e7f4874a0b5c8fa2ec623569a39bde6762b91806de0be6e63711aeb6909715cfbe43860de73d8aec6159a9f10a7 gdb-6be65fb56ea6694a9260733a536a023a1e2d4d57.tar.gz
+sha512 6026889c72baee2f57d3e706fdd07c19e9b0b27d9ab87d32da39cc3bc3afe911f0d30e3bbca6fd6281b7e94da66d475b17edadfd58bce4d8b419ee8d475660fa gdb-arc-2016.03-rc2-gdb.tar.gz
--
2.7.4
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [Buildroot] [PATCH 7/9] toolchain: remove eglibc support
2016-05-16 22:12 [Buildroot] [PATCH 0/9] Various toolchain related fixes/updates Thomas Petazzoni
` (5 preceding siblings ...)
2016-05-16 22:12 ` [Buildroot] [PATCH 6/9] gdb: specify hashes for the ARC and Microblaze versions Thomas Petazzoni
@ 2016-05-16 22:13 ` Thomas Petazzoni
2016-05-17 6:50 ` Peter Korsgaard
2016-05-17 22:28 ` Arnout Vandecappelle
2016-05-16 22:13 ` [Buildroot] [PATCH 8/9] binutils: remove support for version 2.23 Thomas Petazzoni
2016-05-16 22:13 ` [Buildroot] [PATCH 9/9] toolchain: musl support is no longer experimental Thomas Petazzoni
8 siblings, 2 replies; 22+ messages in thread
From: Thomas Petazzoni @ 2016-05-16 22:13 UTC (permalink / raw)
To: buildroot
The eglibc support has been marked deprecated since 2015.08, so it's
time to remove it.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
Config.in.legacy | 8 +
package/gcc/Config.in.host | 2 +-
.../2.18-svnr23787/0001-CVE-2014-7817-eglibc.patch | 174 ---------------------
.../glibc/2.18-svnr23787/0002-accept-make4.patch | 33 ----
.../glibc/2.18-svnr23787/0003-CVE-2014-6040.patch | 141 -----------------
.../glibc/2.18-svnr23787/0004-CVE-2014-9402.patch | 20 ---
.../glibc/2.18-svnr23787/0005-CVE-2015-1472.patch | 88 -----------
.../2.19-svnr25243/0001-CVE-2014-7817-eglibc.patch | 174 ---------------------
.../glibc/2.19-svnr25243/0002-CVE-2014-6040.patch | 141 -----------------
.../glibc/2.19-svnr25243/0003-CVE-2014-9402.patch | 20 ---
.../glibc/2.19-svnr25243/0004-CVE-2015-1472.patch | 88 -----------
package/glibc/Config.in | 27 ----
package/glibc/glibc.mk | 7 -
toolchain/toolchain-buildroot/Config.in | 23 ---
14 files changed, 9 insertions(+), 937 deletions(-)
delete mode 100644 package/glibc/2.18-svnr23787/0001-CVE-2014-7817-eglibc.patch
delete mode 100644 package/glibc/2.18-svnr23787/0002-accept-make4.patch
delete mode 100644 package/glibc/2.18-svnr23787/0003-CVE-2014-6040.patch
delete mode 100644 package/glibc/2.18-svnr23787/0004-CVE-2014-9402.patch
delete mode 100644 package/glibc/2.18-svnr23787/0005-CVE-2015-1472.patch
delete mode 100644 package/glibc/2.19-svnr25243/0001-CVE-2014-7817-eglibc.patch
delete mode 100644 package/glibc/2.19-svnr25243/0002-CVE-2014-6040.patch
delete mode 100644 package/glibc/2.19-svnr25243/0003-CVE-2014-9402.patch
delete mode 100644 package/glibc/2.19-svnr25243/0004-CVE-2015-1472.patch
diff --git a/Config.in.legacy b/Config.in.legacy
index ff11d75..7b76f28 100644
--- a/Config.in.legacy
+++ b/Config.in.legacy
@@ -145,6 +145,14 @@ endif
###############################################################################
comment "Legacy options removed in 2016.08"
+config BR2_TOOLCHAIN_BUILDROOT_EGLIBC
+ bool "eglibc support has been removed"
+ select BR2_LEGACY
+ help
+ The eglibc project no longer exists, as it has been merged
+ back into the glibc project. Therefore, support for eglibc
+ has been removed, and glibc should be used instead.
+
config BR2_GDB_VERSION_7_8
bool "gdb 7.8 has been removed"
select BR2_LEGACY
diff --git a/package/gcc/Config.in.host b/package/gcc/Config.in.host
index 6b2d046..6c2732d 100644
--- a/package/gcc/Config.in.host
+++ b/package/gcc/Config.in.host
@@ -128,7 +128,7 @@ config BR2_TOOLCHAIN_BUILDROOT_FORTRAN
config BR2_GCC_ENABLE_TLS
bool "Enable compiler tls support" if BR2_TOOLCHAIN_BUILDROOT_UCLIBC
default y
- depends on BR2_PTHREADS_NATIVE || BR2_TOOLCHAIN_BUILDROOT_EGLIBC || BR2_TOOLCHAIN_BUILDROOT_GLIBC
+ depends on BR2_PTHREADS_NATIVE || BR2_TOOLCHAIN_BUILDROOT_GLIBC
help
Enable the compiler to generate code for accessing
thread local storage variables
diff --git a/package/glibc/2.18-svnr23787/0001-CVE-2014-7817-eglibc.patch b/package/glibc/2.18-svnr23787/0001-CVE-2014-7817-eglibc.patch
deleted file mode 100644
index da2f49d..0000000
--- a/package/glibc/2.18-svnr23787/0001-CVE-2014-7817-eglibc.patch
+++ /dev/null
@@ -1,174 +0,0 @@
-From https://bugzilla.redhat.com/show_bug.cgi?id=1157689
-Modified for eglibc.
-
-Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
-
-WARNING !!! WARNING !!! WARNING !!! WARNING !!! WARNING !!! WARNING !!!
-EMBARGOED !!! EMBARGOED !!! EMARGOED !!! EMBARGOED !!! EMBARGOED !!!
-SECURITY !!! SECURITY !!! SECURITY !!! SECURITY !!! SECURITY !!!
-
-CVE-2014-7817:
-
-The function wordexp() fails to properly handle the WRDE_NOCMD
-flag when processing arithmetic inputs in the form of "$((... ``))"
-where "..." can be anything valid. The backticks in the arithmetic
-epxression are evaluated by in a shell even if WRDE_NOCMD forbade
-command substitution. This allows an attacker to attempt to pass
-dangerous commands via constructs of the above form, and bypass
-the WRDE_NOCMD flag. This patch fixes this by checking for WRDE_NOCMD
-in parse_arith(). The patch also hardens parse_backticks() and
-parse_comm() to check for WRDE_NOCMD flag and return an error instead
-of ever running a shell.
-
-We expand the testsuite and add 3 new regression tests of roughtly
-the same form but with a couple of nested levels.
-
-On top of the 3 new tests we add fork validation to the WRDE_NOCMD
-testing. If any forks are detected during the execution of a wordexp()
-call with WRDE_NOCMD, the test is marked as failed. This is slightly
-heuristic since vfork might be used, but it provides a higher level
-of assurance that no shells were executed as part of command substitution
-with WRDE_NOCMD in effect. In addition it doesn't require libpthread or
-libdl, instead we use the public implementation namespace function
-__register_atfork (already part of the public ABI for libpthread).
-
-Tested on x86_64 with no regressions.
-
-2014-10-27 Carlos O'Donell <carlos@redhat.com>
-
- * wordexp-test.c (__dso_handle): Add prototype.
- (__register_atfork): Likewise.
- (__app_register_atfork): New function.
- (registered_forks): New global.
- (register_fork): New function.
- (test_case): Add 3 new tests for WRDE_CMDSUB.
- (main): Call __app_register_atfork.
- (testit): If WRDE_NOCMD set registered_forks to zero, run test, and
- if fork count is non-zero fail the test.
- * posix/wordexp.c (parse_arith): Return WRDE_NOCMD if WRDE_NOCMD flag
- is set and parsing '`'.
- (parse_comm): Return WRDE_NOCMD if WRDE_NOCMD flag is set.
- (parse_backtick): Return WRDE_NOCMD if WRDE_NOCMD flag is set and
- parsing '`'.
-
-diff --git a/posix/wordexp-test.c b/posix/wordexp-test.c
-index 4957006..5ce2a1b 100644
---- a/libc/posix/wordexp-test.c
-+++ b/libc/posix/wordexp-test.c
-@@ -27,6 +27,25 @@
-
- #define IFS " \n\t"
-
-+extern void *__dso_handle __attribute__ ((__weak__, __visibility__ ("hidden")));
-+extern int __register_atfork (void (*) (void), void (*) (void), void (*) (void), void *);
-+
-+static int __app_register_atfork (void (*prepare) (void), void (*parent) (void), void (*child) (void))
-+{
-+ return __register_atfork (prepare, parent, child,
-+ &__dso_handle == NULL ? NULL : __dso_handle);
-+}
-+
-+/* Number of forks seen. */
-+static int registered_forks;
-+
-+/* For each fork increment the fork count. */
-+static void
-+register_fork (void)
-+{
-+ registered_forks++;
-+}
-+
- struct test_case_struct
- {
- int retval;
-@@ -206,6 +225,12 @@ struct test_case_struct
- { WRDE_SYNTAX, NULL, "$((2+))", 0, 0, { NULL, }, IFS },
- { WRDE_SYNTAX, NULL, "`", 0, 0, { NULL, }, IFS },
- { WRDE_SYNTAX, NULL, "$((010+4+))", 0, 0, { NULL }, IFS },
-+ /* Test for CVE-2014-7817. We test 3 combinations of command
-+ substitution inside an arithmetic expression to make sure that
-+ no commands are executed and error is returned. */
-+ { WRDE_CMDSUB, NULL, "$((`echo 1`))", WRDE_NOCMD, 0, { NULL, }, IFS },
-+ { WRDE_CMDSUB, NULL, "$((1+`echo 1`))", WRDE_NOCMD, 0, { NULL, }, IFS },
-+ { WRDE_CMDSUB, NULL, "$((1+$((`echo 1`))))", WRDE_NOCMD, 0, { NULL, }, IFS },
-
- { -1, NULL, NULL, 0, 0, { NULL, }, IFS },
- };
-@@ -258,6 +283,15 @@ main (int argc, char *argv[])
- return -1;
- }
-
-+ /* If we are not allowed to do command substitution, we install
-+ fork handlers to verify that no forks happened. No forks should
-+ happen at all if command substitution is disabled. */
-+ if (__app_register_atfork (register_fork, NULL, NULL) != 0)
-+ {
-+ printf ("Failed to register fork handler.\n");
-+ return -1;
-+ }
-+
- for (test = 0; test_case[test].retval != -1; test++)
- if (testit (&test_case[test]))
- ++fail;
-@@ -367,6 +401,9 @@ testit (struct test_case_struct *tc)
-
- printf ("Test %d (%s): ", ++tests, tc->words);
-
-+ if (tc->flags & WRDE_NOCMD)
-+ registered_forks = 0;
-+
- if (tc->flags & WRDE_APPEND)
- {
- /* initial wordexp() call, to be appended to */
-@@ -378,6 +415,13 @@ testit (struct test_case_struct *tc)
- }
- retval = wordexp (tc->words, &we, tc->flags);
-
-+ if ((tc->flags & WRDE_NOCMD)
-+ && (registered_forks > 0))
-+ {
-+ printf ("FAILED fork called for WRDE_NOCMD\n");
-+ return 1;
-+ }
-+
- if (tc->flags & WRDE_DOOFFS)
- start_offs = sav_we.we_offs;
-
-diff --git a/posix/wordexp.c b/posix/wordexp.c
-index b6b65dd..d6a158f 100644
---- a/libc/posix/wordexp.c
-+++ b/libc/posix/wordexp.c
-@@ -693,6 +693,12 @@ parse_arith (char **word, size_t *word_length, size_t *max_length,
- break;
-
- case '`':
-+ if (flags & WRDE_NOCMD)
-+ {
-+ free (expr);
-+ return WRDE_NOCMD;
-+ }
-+
- (*offset)++;
- error = parse_backtick (&expr, &expr_length, &expr_maxlen,
- words, offset, flags, NULL, NULL, NULL);
-@@ -1144,6 +1150,10 @@ parse_comm (char **word, size_t *word_length, size_t *max_length,
- size_t comm_maxlen;
- char *comm = w_newword (&comm_length, &comm_maxlen);
-
-+ /* Do nothing if command substitution should not succeed. */
-+ if (flags & WRDE_NOCMD)
-+ return WRDE_CMDSUB;
-+
- for (; words[*offset]; ++(*offset))
- {
- switch (words[*offset])
-@@ -2121,6 +2131,9 @@ parse_backtick (char **word, size_t *word_length, size_t *max_length,
- switch (words[*offset])
- {
- case '`':
-+ if (flags & WRDE_NOCMD)
-+ return WRDE_NOCMD;
-+
- /* Go -- give the script to the shell */
- error = exec_comm (comm, word, word_length, max_length, flags,
- pwordexp, ifs, ifs_white);
diff --git a/package/glibc/2.18-svnr23787/0002-accept-make4.patch b/package/glibc/2.18-svnr23787/0002-accept-make4.patch
deleted file mode 100644
index 4f426f2..0000000
--- a/package/glibc/2.18-svnr23787/0002-accept-make4.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-Backport upstream patch (28d708c44bc47b56f6551ff285f78edcf61c208a) to accept
-make-4.0 or newer.
-We patch both configure and configure.in files so if we ever have to run
-autoreconf in the glibc source, then the fix will be propagated properly.
-
-Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
-
-Index: glibc-2.18-svnr23787/libc/configure
-===================================================================
---- glibc-2.18-svnr23787.orig/libc/configure
-+++ glibc-2.18-svnr23787/libc/configure
-@@ -4772,7 +4772,7 @@ $as_echo_n "checking version of $MAKE...
- ac_prog_version=`$MAKE --version 2>&1 | sed -n 's/^.*GNU Make[^0-9]*\([0-9][0-9.]*\).*$/\1/p'`
- case $ac_prog_version in
- '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
-- 3.79* | 3.[89]*)
-+ 3.79* | 3.[89]* | [4-9].* | [1-9][0-9]*)
- ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
- *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
-
-Index: glibc-2.18-svnr23787/libc/configure.in
-===================================================================
---- glibc-2.18-svnr23787.orig/libc/configure.in
-+++ glibc-2.18-svnr23787/libc/configure.in
-@@ -989,7 +989,7 @@ AC_CHECK_PROG_VER(CC, ${ac_tool_prefix}g
- critic_missing="$critic_missing gcc")
- AC_CHECK_PROG_VER(MAKE, gnumake gmake make, --version,
- [GNU Make[^0-9]*\([0-9][0-9.]*\)],
-- [3.79* | 3.[89]*], critic_missing="$critic_missing make")
-+ [3.79* | 3.[89]* | [4-9].* | [1-9][0-9]*], critic_missing="$critic_missing make")
-
- AC_CHECK_PROG_VER(MSGFMT, gnumsgfmt gmsgfmt msgfmt, --version,
- [GNU gettext.* \([0-9]*\.[0-9.]*\)],
diff --git a/package/glibc/2.18-svnr23787/0003-CVE-2014-6040.patch b/package/glibc/2.18-svnr23787/0003-CVE-2014-6040.patch
deleted file mode 100644
index f447dcd..0000000
--- a/package/glibc/2.18-svnr23787/0003-CVE-2014-6040.patch
+++ /dev/null
@@ -1,141 +0,0 @@
-Backport from https://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commit;h=41488498b6
-See https://bugzilla.redhat.com/show_bug.cgi?id=1135841
-
-Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
-
-diff -Nura eglibc-2.19.orig/libc/iconvdata/ibm1364.c eglibc-2.19/libc/iconvdata/ibm1364.c
---- eglibc-2.19.orig/libc/iconvdata/ibm1364.c 2015-01-08 16:05:53.918823240 -0300
-+++ eglibc-2.19/libc/iconvdata/ibm1364.c 2015-01-08 16:06:02.781555143 -0300
-@@ -220,7 +220,8 @@
- ++rp2; \
- \
- uint32_t res; \
-- if (__builtin_expect (ch < rp2->start, 0) \
-+ if (__builtin_expect (rp2->start == 0xffff, 0) \
-+ || __builtin_expect (ch < rp2->start, 0) \
- || (res = DB_TO_UCS4[ch + rp2->idx], \
- __builtin_expect (res, L'\1') == L'\0' && ch != '\0')) \
- { \
-diff -Nura eglibc-2.19.orig/libc/iconvdata/ibm932.c eglibc-2.19/libc/iconvdata/ibm932.c
---- eglibc-2.19.orig/libc/iconvdata/ibm932.c 2015-01-08 16:05:53.910818967 -0300
-+++ eglibc-2.19/libc/iconvdata/ibm932.c 2015-01-08 16:06:02.781555143 -0300
-@@ -73,11 +73,12 @@
- } \
- \
- ch = (ch * 0x100) + inptr[1]; \
-+ /* ch was less than 0xfd. */ \
-+ assert (ch < 0xfd00); \
- while (ch > rp2->end) \
- ++rp2; \
- \
-- if (__builtin_expect (rp2 == NULL, 0) \
-- || __builtin_expect (ch < rp2->start, 0) \
-+ if (__builtin_expect (ch < rp2->start, 0) \
- || (res = __ibm932db_to_ucs4[ch + rp2->idx], \
- __builtin_expect (res, '\1') == 0 && ch !=0)) \
- { \
-diff -Nura eglibc-2.19.orig/libc/iconvdata/ibm933.c eglibc-2.19/libc/iconvdata/ibm933.c
---- eglibc-2.19.orig/libc/iconvdata/ibm933.c 2015-01-08 16:05:53.917822706 -0300
-+++ eglibc-2.19/libc/iconvdata/ibm933.c 2015-01-08 16:06:02.781555143 -0300
-@@ -161,7 +161,7 @@
- while (ch > rp2->end) \
- ++rp2; \
- \
-- if (__builtin_expect (rp2 == NULL, 0) \
-+ if (__builtin_expect (rp2->start == 0xffff, 0) \
- || __builtin_expect (ch < rp2->start, 0) \
- || (res = __ibm933db_to_ucs4[ch + rp2->idx], \
- __builtin_expect (res, L'\1') == L'\0' && ch != '\0')) \
-diff -Nura eglibc-2.19.orig/libc/iconvdata/ibm935.c eglibc-2.19/libc/iconvdata/ibm935.c
---- eglibc-2.19.orig/libc/iconvdata/ibm935.c 2015-01-08 16:05:53.921824843 -0300
-+++ eglibc-2.19/libc/iconvdata/ibm935.c 2015-01-08 16:06:02.782555677 -0300
-@@ -161,7 +161,7 @@
- while (ch > rp2->end) \
- ++rp2; \
- \
-- if (__builtin_expect (rp2 == NULL, 0) \
-+ if (__builtin_expect (rp2->start == 0xffff, 0) \
- || __builtin_expect (ch < rp2->start, 0) \
- || (res = __ibm935db_to_ucs4[ch + rp2->idx], \
- __builtin_expect (res, L'\1') == L'\0' && ch != '\0')) \
-diff -Nura eglibc-2.19.orig/libc/iconvdata/ibm937.c eglibc-2.19/libc/iconvdata/ibm937.c
---- eglibc-2.19.orig/libc/iconvdata/ibm937.c 2015-01-08 16:05:53.915821638 -0300
-+++ eglibc-2.19/libc/iconvdata/ibm937.c 2015-01-08 16:06:02.782555677 -0300
-@@ -161,7 +161,7 @@
- while (ch > rp2->end) \
- ++rp2; \
- \
-- if (__builtin_expect (rp2 == NULL, 0) \
-+ if (__builtin_expect (rp2->start == 0xffff, 0) \
- || __builtin_expect (ch < rp2->start, 0) \
- || (res = __ibm937db_to_ucs4[ch + rp2->idx], \
- __builtin_expect (res, L'\1') == L'\0' && ch != '\0')) \
-diff -Nura eglibc-2.19.orig/libc/iconvdata/ibm939.c eglibc-2.19/libc/iconvdata/ibm939.c
---- eglibc-2.19.orig/libc/iconvdata/ibm939.c 2015-01-08 16:05:53.917822706 -0300
-+++ eglibc-2.19/libc/iconvdata/ibm939.c 2015-01-08 16:06:02.782555677 -0300
-@@ -161,7 +161,7 @@
- while (ch > rp2->end) \
- ++rp2; \
- \
-- if (__builtin_expect (rp2 == NULL, 0) \
-+ if (__builtin_expect (rp2->start == 0xffff, 0) \
- || __builtin_expect (ch < rp2->start, 0) \
- || (res = __ibm939db_to_ucs4[ch + rp2->idx], \
- __builtin_expect (res, L'\1') == L'\0' && ch != '\0')) \
-diff -Nura eglibc-2.19.orig/libc/iconvdata/ibm943.c eglibc-2.19/libc/iconvdata/ibm943.c
---- eglibc-2.19.orig/libc/iconvdata/ibm943.c 2015-01-08 16:05:53.918823240 -0300
-+++ eglibc-2.19/libc/iconvdata/ibm943.c 2015-01-08 16:06:02.782555677 -0300
-@@ -74,11 +74,12 @@
- } \
- \
- ch = (ch * 0x100) + inptr[1]; \
-+ /* ch was less than 0xfd. */ \
-+ assert (ch < 0xfd00); \
- while (ch > rp2->end) \
- ++rp2; \
- \
-- if (__builtin_expect (rp2 == NULL, 0) \
-- || __builtin_expect (ch < rp2->start, 0) \
-+ if (__builtin_expect (ch < rp2->start, 0) \
- || (res = __ibm943db_to_ucs4[ch + rp2->idx], \
- __builtin_expect (res, '\1') == 0 && ch !=0)) \
- { \
-diff -Nura eglibc-2.19.orig/libc/iconvdata/Makefile eglibc-2.19/libc/iconvdata/Makefile
---- eglibc-2.19.orig/libc/iconvdata/Makefile 2015-01-08 16:05:53.903815227 -0300
-+++ eglibc-2.19/libc/iconvdata/Makefile 2015-01-08 16:06:02.782555677 -0300
-@@ -303,6 +303,7 @@
- $(objpfx)iconv-test.out: run-iconv-test.sh $(objpfx)gconv-modules \
- $(addprefix $(objpfx),$(modules.so)) \
- $(common-objdir)/iconv/iconv_prog TESTS
-+ iconv_modules="$(modules)" \
- $(SHELL) $< $(common-objdir) '$(test-wrapper)' > $@
-
- $(objpfx)tst-tables.out: tst-tables.sh $(objpfx)gconv-modules \
-diff -Nura eglibc-2.19.orig/libc/iconvdata/run-iconv-test.sh eglibc-2.19/libc/iconvdata/run-iconv-test.sh
---- eglibc-2.19.orig/libc/iconvdata/run-iconv-test.sh 2015-01-08 16:05:53.894810420 -0300
-+++ eglibc-2.19/libc/iconvdata/run-iconv-test.sh 2015-01-08 16:06:02.782555677 -0300
-@@ -188,6 +188,24 @@
-
- done < TESTS2
-
-+# Check for crashes in decoders.
-+printf '\016\377\377\377\377\377\377\377' > $temp1
-+for from in $iconv_modules ; do
-+ echo $ac_n "test decoder $from $ac_c"
-+ PROG=`eval echo $ICONV`
-+ if $PROG < $temp1 >/dev/null 2>&1 ; then
-+ : # fall through
-+ else
-+ status=$?
-+ if test $status -gt 1 ; then
-+ echo "/FAILED"
-+ failed=1
-+ continue
-+ fi
-+ fi
-+ echo "OK"
-+done
-+
- exit $failed
- # Local Variables:
- # mode:shell-script
diff --git a/package/glibc/2.18-svnr23787/0004-CVE-2014-9402.patch b/package/glibc/2.18-svnr23787/0004-CVE-2014-9402.patch
deleted file mode 100644
index c7aa12c..0000000
--- a/package/glibc/2.18-svnr23787/0004-CVE-2014-9402.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-Fix CVE-2014-9402 - denial of service in getnetbyname function.
-Backport from https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=11e3417af6e354f1942c68a271ae51e892b2814d
-See https://bugzilla.redhat.com/show_bug.cgi?id=1175369
-
-Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
-
-diff -Nura eglibc-2.19.orig/libc/resolv/nss_dns/dns-network.c eglibc-2.19/libc/resolv/nss_dns/dns-network.c
---- eglibc-2.19.orig/libc/resolv/nss_dns/dns-network.c 2015-01-08 16:12:35.024977879 -0300
-+++ eglibc-2.19/libc/resolv/nss_dns/dns-network.c 2015-01-08 16:12:42.543992357 -0300
-@@ -398,8 +398,8 @@
-
- case BYNAME:
- {
-- char **ap = result->n_aliases++;
-- while (*ap != NULL)
-+ char **ap;
-+ for (ap = result->n_aliases; *ap != NULL; ++ap)
- {
- /* Check each alias name for being of the forms:
- 4.3.2.1.in-addr.arpa = net 1.2.3.4
diff --git a/package/glibc/2.18-svnr23787/0005-CVE-2015-1472.patch b/package/glibc/2.18-svnr23787/0005-CVE-2015-1472.patch
deleted file mode 100644
index a0da626..0000000
--- a/package/glibc/2.18-svnr23787/0005-CVE-2015-1472.patch
+++ /dev/null
@@ -1,88 +0,0 @@
-Fix CVE-2015-1472 - heap buffer overflow in wscanf
-Backport from upstream:
-https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=5bd80bfe9ca0d955bfbbc002781bc7b01b6bcb06
-See: https://bugzilla.redhat.com/show_bug.cgi?id=1188235
-
-Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
-
-diff --git a/stdio-common/tst-sscanf.c b/stdio-common/tst-sscanf.c
-index aece3f2..8a2eb9e 100644
---- a/libc/stdio-common/tst-sscanf.c
-+++ b/libc/stdio-common/tst-sscanf.c
-@@ -233,5 +233,38 @@ main (void)
- }
- }
-
-+ /* BZ #16618
-+ The test will segfault during SSCANF if the buffer overflow
-+ is not fixed. The size of `s` is such that it forces the use
-+ of malloc internally and this triggers the incorrect computation.
-+ Thus the value for SIZE is arbitrariy high enough that malloc
-+ is used. */
-+ {
-+#define SIZE 131072
-+ CHAR *s = malloc ((SIZE + 1) * sizeof (*s));
-+ if (s == NULL)
-+ abort ();
-+ for (size_t i = 0; i < SIZE; i++)
-+ s[i] = L('0');
-+ s[SIZE] = L('\0');
-+ int i = 42;
-+ /* Scan multi-digit zero into `i`. */
-+ if (SSCANF (s, L("%d"), &i) != 1)
-+ {
-+ printf ("FAIL: bug16618: SSCANF did not read one input item.\n");
-+ result = 1;
-+ }
-+ if (i != 0)
-+ {
-+ printf ("FAIL: bug16618: Value of `i` was not zero as expected.\n");
-+ result = 1;
-+ }
-+ free (s);
-+ if (result != 1)
-+ printf ("PASS: bug16618: Did not crash.\n");
-+#undef SIZE
-+ }
-+
-+
- return result;
- }
-diff --git a/stdio-common/vfscanf.c b/stdio-common/vfscanf.c
-index cd129a8..0e204e7 100644
---- a/libc/stdio-common/vfscanf.c
-+++ b/libc/stdio-common/vfscanf.c
-@@ -272,9 +272,10 @@ _IO_vfscanf_internal (_IO_FILE *s, const char *format, _IO_va_list argptr,
- if (__glibc_unlikely (wpsize == wpmax)) \
- { \
- CHAR_T *old = wp; \
-- size_t newsize = (UCHAR_MAX + 1 > 2 * wpmax \
-- ? UCHAR_MAX + 1 : 2 * wpmax); \
-- if (use_malloc || !__libc_use_alloca (newsize)) \
-+ bool fits = __glibc_likely (wpmax <= SIZE_MAX / sizeof (CHAR_T) / 2); \
-+ size_t wpneed = MAX (UCHAR_MAX + 1, 2 * wpmax); \
-+ size_t newsize = fits ? wpneed * sizeof (CHAR_T) : SIZE_MAX; \
-+ if (!__libc_use_alloca (newsize)) \
- { \
- wp = realloc (use_malloc ? wp : NULL, newsize); \
- if (wp == NULL) \
-@@ -286,14 +287,13 @@ _IO_vfscanf_internal (_IO_FILE *s, const char *format, _IO_va_list argptr,
- } \
- if (! use_malloc) \
- MEMCPY (wp, old, wpsize); \
-- wpmax = newsize; \
-+ wpmax = wpneed; \
- use_malloc = true; \
- } \
- else \
- { \
- size_t s = wpmax * sizeof (CHAR_T); \
-- wp = (CHAR_T *) extend_alloca (wp, s, \
-- newsize * sizeof (CHAR_T)); \
-+ wp = (CHAR_T *) extend_alloca (wp, s, newsize); \
- wpmax = s / sizeof (CHAR_T); \
- if (old != NULL) \
- MEMCPY (wp, old, wpsize); \
---
-1.9.4
-
diff --git a/package/glibc/2.19-svnr25243/0001-CVE-2014-7817-eglibc.patch b/package/glibc/2.19-svnr25243/0001-CVE-2014-7817-eglibc.patch
deleted file mode 100644
index da2f49d..0000000
--- a/package/glibc/2.19-svnr25243/0001-CVE-2014-7817-eglibc.patch
+++ /dev/null
@@ -1,174 +0,0 @@
-From https://bugzilla.redhat.com/show_bug.cgi?id=1157689
-Modified for eglibc.
-
-Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
-
-WARNING !!! WARNING !!! WARNING !!! WARNING !!! WARNING !!! WARNING !!!
-EMBARGOED !!! EMBARGOED !!! EMARGOED !!! EMBARGOED !!! EMBARGOED !!!
-SECURITY !!! SECURITY !!! SECURITY !!! SECURITY !!! SECURITY !!!
-
-CVE-2014-7817:
-
-The function wordexp() fails to properly handle the WRDE_NOCMD
-flag when processing arithmetic inputs in the form of "$((... ``))"
-where "..." can be anything valid. The backticks in the arithmetic
-epxression are evaluated by in a shell even if WRDE_NOCMD forbade
-command substitution. This allows an attacker to attempt to pass
-dangerous commands via constructs of the above form, and bypass
-the WRDE_NOCMD flag. This patch fixes this by checking for WRDE_NOCMD
-in parse_arith(). The patch also hardens parse_backticks() and
-parse_comm() to check for WRDE_NOCMD flag and return an error instead
-of ever running a shell.
-
-We expand the testsuite and add 3 new regression tests of roughtly
-the same form but with a couple of nested levels.
-
-On top of the 3 new tests we add fork validation to the WRDE_NOCMD
-testing. If any forks are detected during the execution of a wordexp()
-call with WRDE_NOCMD, the test is marked as failed. This is slightly
-heuristic since vfork might be used, but it provides a higher level
-of assurance that no shells were executed as part of command substitution
-with WRDE_NOCMD in effect. In addition it doesn't require libpthread or
-libdl, instead we use the public implementation namespace function
-__register_atfork (already part of the public ABI for libpthread).
-
-Tested on x86_64 with no regressions.
-
-2014-10-27 Carlos O'Donell <carlos@redhat.com>
-
- * wordexp-test.c (__dso_handle): Add prototype.
- (__register_atfork): Likewise.
- (__app_register_atfork): New function.
- (registered_forks): New global.
- (register_fork): New function.
- (test_case): Add 3 new tests for WRDE_CMDSUB.
- (main): Call __app_register_atfork.
- (testit): If WRDE_NOCMD set registered_forks to zero, run test, and
- if fork count is non-zero fail the test.
- * posix/wordexp.c (parse_arith): Return WRDE_NOCMD if WRDE_NOCMD flag
- is set and parsing '`'.
- (parse_comm): Return WRDE_NOCMD if WRDE_NOCMD flag is set.
- (parse_backtick): Return WRDE_NOCMD if WRDE_NOCMD flag is set and
- parsing '`'.
-
-diff --git a/posix/wordexp-test.c b/posix/wordexp-test.c
-index 4957006..5ce2a1b 100644
---- a/libc/posix/wordexp-test.c
-+++ b/libc/posix/wordexp-test.c
-@@ -27,6 +27,25 @@
-
- #define IFS " \n\t"
-
-+extern void *__dso_handle __attribute__ ((__weak__, __visibility__ ("hidden")));
-+extern int __register_atfork (void (*) (void), void (*) (void), void (*) (void), void *);
-+
-+static int __app_register_atfork (void (*prepare) (void), void (*parent) (void), void (*child) (void))
-+{
-+ return __register_atfork (prepare, parent, child,
-+ &__dso_handle == NULL ? NULL : __dso_handle);
-+}
-+
-+/* Number of forks seen. */
-+static int registered_forks;
-+
-+/* For each fork increment the fork count. */
-+static void
-+register_fork (void)
-+{
-+ registered_forks++;
-+}
-+
- struct test_case_struct
- {
- int retval;
-@@ -206,6 +225,12 @@ struct test_case_struct
- { WRDE_SYNTAX, NULL, "$((2+))", 0, 0, { NULL, }, IFS },
- { WRDE_SYNTAX, NULL, "`", 0, 0, { NULL, }, IFS },
- { WRDE_SYNTAX, NULL, "$((010+4+))", 0, 0, { NULL }, IFS },
-+ /* Test for CVE-2014-7817. We test 3 combinations of command
-+ substitution inside an arithmetic expression to make sure that
-+ no commands are executed and error is returned. */
-+ { WRDE_CMDSUB, NULL, "$((`echo 1`))", WRDE_NOCMD, 0, { NULL, }, IFS },
-+ { WRDE_CMDSUB, NULL, "$((1+`echo 1`))", WRDE_NOCMD, 0, { NULL, }, IFS },
-+ { WRDE_CMDSUB, NULL, "$((1+$((`echo 1`))))", WRDE_NOCMD, 0, { NULL, }, IFS },
-
- { -1, NULL, NULL, 0, 0, { NULL, }, IFS },
- };
-@@ -258,6 +283,15 @@ main (int argc, char *argv[])
- return -1;
- }
-
-+ /* If we are not allowed to do command substitution, we install
-+ fork handlers to verify that no forks happened. No forks should
-+ happen at all if command substitution is disabled. */
-+ if (__app_register_atfork (register_fork, NULL, NULL) != 0)
-+ {
-+ printf ("Failed to register fork handler.\n");
-+ return -1;
-+ }
-+
- for (test = 0; test_case[test].retval != -1; test++)
- if (testit (&test_case[test]))
- ++fail;
-@@ -367,6 +401,9 @@ testit (struct test_case_struct *tc)
-
- printf ("Test %d (%s): ", ++tests, tc->words);
-
-+ if (tc->flags & WRDE_NOCMD)
-+ registered_forks = 0;
-+
- if (tc->flags & WRDE_APPEND)
- {
- /* initial wordexp() call, to be appended to */
-@@ -378,6 +415,13 @@ testit (struct test_case_struct *tc)
- }
- retval = wordexp (tc->words, &we, tc->flags);
-
-+ if ((tc->flags & WRDE_NOCMD)
-+ && (registered_forks > 0))
-+ {
-+ printf ("FAILED fork called for WRDE_NOCMD\n");
-+ return 1;
-+ }
-+
- if (tc->flags & WRDE_DOOFFS)
- start_offs = sav_we.we_offs;
-
-diff --git a/posix/wordexp.c b/posix/wordexp.c
-index b6b65dd..d6a158f 100644
---- a/libc/posix/wordexp.c
-+++ b/libc/posix/wordexp.c
-@@ -693,6 +693,12 @@ parse_arith (char **word, size_t *word_length, size_t *max_length,
- break;
-
- case '`':
-+ if (flags & WRDE_NOCMD)
-+ {
-+ free (expr);
-+ return WRDE_NOCMD;
-+ }
-+
- (*offset)++;
- error = parse_backtick (&expr, &expr_length, &expr_maxlen,
- words, offset, flags, NULL, NULL, NULL);
-@@ -1144,6 +1150,10 @@ parse_comm (char **word, size_t *word_length, size_t *max_length,
- size_t comm_maxlen;
- char *comm = w_newword (&comm_length, &comm_maxlen);
-
-+ /* Do nothing if command substitution should not succeed. */
-+ if (flags & WRDE_NOCMD)
-+ return WRDE_CMDSUB;
-+
- for (; words[*offset]; ++(*offset))
- {
- switch (words[*offset])
-@@ -2121,6 +2131,9 @@ parse_backtick (char **word, size_t *word_length, size_t *max_length,
- switch (words[*offset])
- {
- case '`':
-+ if (flags & WRDE_NOCMD)
-+ return WRDE_NOCMD;
-+
- /* Go -- give the script to the shell */
- error = exec_comm (comm, word, word_length, max_length, flags,
- pwordexp, ifs, ifs_white);
diff --git a/package/glibc/2.19-svnr25243/0002-CVE-2014-6040.patch b/package/glibc/2.19-svnr25243/0002-CVE-2014-6040.patch
deleted file mode 100644
index f447dcd..0000000
--- a/package/glibc/2.19-svnr25243/0002-CVE-2014-6040.patch
+++ /dev/null
@@ -1,141 +0,0 @@
-Backport from https://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commit;h=41488498b6
-See https://bugzilla.redhat.com/show_bug.cgi?id=1135841
-
-Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
-
-diff -Nura eglibc-2.19.orig/libc/iconvdata/ibm1364.c eglibc-2.19/libc/iconvdata/ibm1364.c
---- eglibc-2.19.orig/libc/iconvdata/ibm1364.c 2015-01-08 16:05:53.918823240 -0300
-+++ eglibc-2.19/libc/iconvdata/ibm1364.c 2015-01-08 16:06:02.781555143 -0300
-@@ -220,7 +220,8 @@
- ++rp2; \
- \
- uint32_t res; \
-- if (__builtin_expect (ch < rp2->start, 0) \
-+ if (__builtin_expect (rp2->start == 0xffff, 0) \
-+ || __builtin_expect (ch < rp2->start, 0) \
- || (res = DB_TO_UCS4[ch + rp2->idx], \
- __builtin_expect (res, L'\1') == L'\0' && ch != '\0')) \
- { \
-diff -Nura eglibc-2.19.orig/libc/iconvdata/ibm932.c eglibc-2.19/libc/iconvdata/ibm932.c
---- eglibc-2.19.orig/libc/iconvdata/ibm932.c 2015-01-08 16:05:53.910818967 -0300
-+++ eglibc-2.19/libc/iconvdata/ibm932.c 2015-01-08 16:06:02.781555143 -0300
-@@ -73,11 +73,12 @@
- } \
- \
- ch = (ch * 0x100) + inptr[1]; \
-+ /* ch was less than 0xfd. */ \
-+ assert (ch < 0xfd00); \
- while (ch > rp2->end) \
- ++rp2; \
- \
-- if (__builtin_expect (rp2 == NULL, 0) \
-- || __builtin_expect (ch < rp2->start, 0) \
-+ if (__builtin_expect (ch < rp2->start, 0) \
- || (res = __ibm932db_to_ucs4[ch + rp2->idx], \
- __builtin_expect (res, '\1') == 0 && ch !=0)) \
- { \
-diff -Nura eglibc-2.19.orig/libc/iconvdata/ibm933.c eglibc-2.19/libc/iconvdata/ibm933.c
---- eglibc-2.19.orig/libc/iconvdata/ibm933.c 2015-01-08 16:05:53.917822706 -0300
-+++ eglibc-2.19/libc/iconvdata/ibm933.c 2015-01-08 16:06:02.781555143 -0300
-@@ -161,7 +161,7 @@
- while (ch > rp2->end) \
- ++rp2; \
- \
-- if (__builtin_expect (rp2 == NULL, 0) \
-+ if (__builtin_expect (rp2->start == 0xffff, 0) \
- || __builtin_expect (ch < rp2->start, 0) \
- || (res = __ibm933db_to_ucs4[ch + rp2->idx], \
- __builtin_expect (res, L'\1') == L'\0' && ch != '\0')) \
-diff -Nura eglibc-2.19.orig/libc/iconvdata/ibm935.c eglibc-2.19/libc/iconvdata/ibm935.c
---- eglibc-2.19.orig/libc/iconvdata/ibm935.c 2015-01-08 16:05:53.921824843 -0300
-+++ eglibc-2.19/libc/iconvdata/ibm935.c 2015-01-08 16:06:02.782555677 -0300
-@@ -161,7 +161,7 @@
- while (ch > rp2->end) \
- ++rp2; \
- \
-- if (__builtin_expect (rp2 == NULL, 0) \
-+ if (__builtin_expect (rp2->start == 0xffff, 0) \
- || __builtin_expect (ch < rp2->start, 0) \
- || (res = __ibm935db_to_ucs4[ch + rp2->idx], \
- __builtin_expect (res, L'\1') == L'\0' && ch != '\0')) \
-diff -Nura eglibc-2.19.orig/libc/iconvdata/ibm937.c eglibc-2.19/libc/iconvdata/ibm937.c
---- eglibc-2.19.orig/libc/iconvdata/ibm937.c 2015-01-08 16:05:53.915821638 -0300
-+++ eglibc-2.19/libc/iconvdata/ibm937.c 2015-01-08 16:06:02.782555677 -0300
-@@ -161,7 +161,7 @@
- while (ch > rp2->end) \
- ++rp2; \
- \
-- if (__builtin_expect (rp2 == NULL, 0) \
-+ if (__builtin_expect (rp2->start == 0xffff, 0) \
- || __builtin_expect (ch < rp2->start, 0) \
- || (res = __ibm937db_to_ucs4[ch + rp2->idx], \
- __builtin_expect (res, L'\1') == L'\0' && ch != '\0')) \
-diff -Nura eglibc-2.19.orig/libc/iconvdata/ibm939.c eglibc-2.19/libc/iconvdata/ibm939.c
---- eglibc-2.19.orig/libc/iconvdata/ibm939.c 2015-01-08 16:05:53.917822706 -0300
-+++ eglibc-2.19/libc/iconvdata/ibm939.c 2015-01-08 16:06:02.782555677 -0300
-@@ -161,7 +161,7 @@
- while (ch > rp2->end) \
- ++rp2; \
- \
-- if (__builtin_expect (rp2 == NULL, 0) \
-+ if (__builtin_expect (rp2->start == 0xffff, 0) \
- || __builtin_expect (ch < rp2->start, 0) \
- || (res = __ibm939db_to_ucs4[ch + rp2->idx], \
- __builtin_expect (res, L'\1') == L'\0' && ch != '\0')) \
-diff -Nura eglibc-2.19.orig/libc/iconvdata/ibm943.c eglibc-2.19/libc/iconvdata/ibm943.c
---- eglibc-2.19.orig/libc/iconvdata/ibm943.c 2015-01-08 16:05:53.918823240 -0300
-+++ eglibc-2.19/libc/iconvdata/ibm943.c 2015-01-08 16:06:02.782555677 -0300
-@@ -74,11 +74,12 @@
- } \
- \
- ch = (ch * 0x100) + inptr[1]; \
-+ /* ch was less than 0xfd. */ \
-+ assert (ch < 0xfd00); \
- while (ch > rp2->end) \
- ++rp2; \
- \
-- if (__builtin_expect (rp2 == NULL, 0) \
-- || __builtin_expect (ch < rp2->start, 0) \
-+ if (__builtin_expect (ch < rp2->start, 0) \
- || (res = __ibm943db_to_ucs4[ch + rp2->idx], \
- __builtin_expect (res, '\1') == 0 && ch !=0)) \
- { \
-diff -Nura eglibc-2.19.orig/libc/iconvdata/Makefile eglibc-2.19/libc/iconvdata/Makefile
---- eglibc-2.19.orig/libc/iconvdata/Makefile 2015-01-08 16:05:53.903815227 -0300
-+++ eglibc-2.19/libc/iconvdata/Makefile 2015-01-08 16:06:02.782555677 -0300
-@@ -303,6 +303,7 @@
- $(objpfx)iconv-test.out: run-iconv-test.sh $(objpfx)gconv-modules \
- $(addprefix $(objpfx),$(modules.so)) \
- $(common-objdir)/iconv/iconv_prog TESTS
-+ iconv_modules="$(modules)" \
- $(SHELL) $< $(common-objdir) '$(test-wrapper)' > $@
-
- $(objpfx)tst-tables.out: tst-tables.sh $(objpfx)gconv-modules \
-diff -Nura eglibc-2.19.orig/libc/iconvdata/run-iconv-test.sh eglibc-2.19/libc/iconvdata/run-iconv-test.sh
---- eglibc-2.19.orig/libc/iconvdata/run-iconv-test.sh 2015-01-08 16:05:53.894810420 -0300
-+++ eglibc-2.19/libc/iconvdata/run-iconv-test.sh 2015-01-08 16:06:02.782555677 -0300
-@@ -188,6 +188,24 @@
-
- done < TESTS2
-
-+# Check for crashes in decoders.
-+printf '\016\377\377\377\377\377\377\377' > $temp1
-+for from in $iconv_modules ; do
-+ echo $ac_n "test decoder $from $ac_c"
-+ PROG=`eval echo $ICONV`
-+ if $PROG < $temp1 >/dev/null 2>&1 ; then
-+ : # fall through
-+ else
-+ status=$?
-+ if test $status -gt 1 ; then
-+ echo "/FAILED"
-+ failed=1
-+ continue
-+ fi
-+ fi
-+ echo "OK"
-+done
-+
- exit $failed
- # Local Variables:
- # mode:shell-script
diff --git a/package/glibc/2.19-svnr25243/0003-CVE-2014-9402.patch b/package/glibc/2.19-svnr25243/0003-CVE-2014-9402.patch
deleted file mode 100644
index c7aa12c..0000000
--- a/package/glibc/2.19-svnr25243/0003-CVE-2014-9402.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-Fix CVE-2014-9402 - denial of service in getnetbyname function.
-Backport from https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=11e3417af6e354f1942c68a271ae51e892b2814d
-See https://bugzilla.redhat.com/show_bug.cgi?id=1175369
-
-Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
-
-diff -Nura eglibc-2.19.orig/libc/resolv/nss_dns/dns-network.c eglibc-2.19/libc/resolv/nss_dns/dns-network.c
---- eglibc-2.19.orig/libc/resolv/nss_dns/dns-network.c 2015-01-08 16:12:35.024977879 -0300
-+++ eglibc-2.19/libc/resolv/nss_dns/dns-network.c 2015-01-08 16:12:42.543992357 -0300
-@@ -398,8 +398,8 @@
-
- case BYNAME:
- {
-- char **ap = result->n_aliases++;
-- while (*ap != NULL)
-+ char **ap;
-+ for (ap = result->n_aliases; *ap != NULL; ++ap)
- {
- /* Check each alias name for being of the forms:
- 4.3.2.1.in-addr.arpa = net 1.2.3.4
diff --git a/package/glibc/2.19-svnr25243/0004-CVE-2015-1472.patch b/package/glibc/2.19-svnr25243/0004-CVE-2015-1472.patch
deleted file mode 100644
index a0da626..0000000
--- a/package/glibc/2.19-svnr25243/0004-CVE-2015-1472.patch
+++ /dev/null
@@ -1,88 +0,0 @@
-Fix CVE-2015-1472 - heap buffer overflow in wscanf
-Backport from upstream:
-https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=5bd80bfe9ca0d955bfbbc002781bc7b01b6bcb06
-See: https://bugzilla.redhat.com/show_bug.cgi?id=1188235
-
-Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
-
-diff --git a/stdio-common/tst-sscanf.c b/stdio-common/tst-sscanf.c
-index aece3f2..8a2eb9e 100644
---- a/libc/stdio-common/tst-sscanf.c
-+++ b/libc/stdio-common/tst-sscanf.c
-@@ -233,5 +233,38 @@ main (void)
- }
- }
-
-+ /* BZ #16618
-+ The test will segfault during SSCANF if the buffer overflow
-+ is not fixed. The size of `s` is such that it forces the use
-+ of malloc internally and this triggers the incorrect computation.
-+ Thus the value for SIZE is arbitrariy high enough that malloc
-+ is used. */
-+ {
-+#define SIZE 131072
-+ CHAR *s = malloc ((SIZE + 1) * sizeof (*s));
-+ if (s == NULL)
-+ abort ();
-+ for (size_t i = 0; i < SIZE; i++)
-+ s[i] = L('0');
-+ s[SIZE] = L('\0');
-+ int i = 42;
-+ /* Scan multi-digit zero into `i`. */
-+ if (SSCANF (s, L("%d"), &i) != 1)
-+ {
-+ printf ("FAIL: bug16618: SSCANF did not read one input item.\n");
-+ result = 1;
-+ }
-+ if (i != 0)
-+ {
-+ printf ("FAIL: bug16618: Value of `i` was not zero as expected.\n");
-+ result = 1;
-+ }
-+ free (s);
-+ if (result != 1)
-+ printf ("PASS: bug16618: Did not crash.\n");
-+#undef SIZE
-+ }
-+
-+
- return result;
- }
-diff --git a/stdio-common/vfscanf.c b/stdio-common/vfscanf.c
-index cd129a8..0e204e7 100644
---- a/libc/stdio-common/vfscanf.c
-+++ b/libc/stdio-common/vfscanf.c
-@@ -272,9 +272,10 @@ _IO_vfscanf_internal (_IO_FILE *s, const char *format, _IO_va_list argptr,
- if (__glibc_unlikely (wpsize == wpmax)) \
- { \
- CHAR_T *old = wp; \
-- size_t newsize = (UCHAR_MAX + 1 > 2 * wpmax \
-- ? UCHAR_MAX + 1 : 2 * wpmax); \
-- if (use_malloc || !__libc_use_alloca (newsize)) \
-+ bool fits = __glibc_likely (wpmax <= SIZE_MAX / sizeof (CHAR_T) / 2); \
-+ size_t wpneed = MAX (UCHAR_MAX + 1, 2 * wpmax); \
-+ size_t newsize = fits ? wpneed * sizeof (CHAR_T) : SIZE_MAX; \
-+ if (!__libc_use_alloca (newsize)) \
- { \
- wp = realloc (use_malloc ? wp : NULL, newsize); \
- if (wp == NULL) \
-@@ -286,14 +287,13 @@ _IO_vfscanf_internal (_IO_FILE *s, const char *format, _IO_va_list argptr,
- } \
- if (! use_malloc) \
- MEMCPY (wp, old, wpsize); \
-- wpmax = newsize; \
-+ wpmax = wpneed; \
- use_malloc = true; \
- } \
- else \
- { \
- size_t s = wpmax * sizeof (CHAR_T); \
-- wp = (CHAR_T *) extend_alloca (wp, s, \
-- newsize * sizeof (CHAR_T)); \
-+ wp = (CHAR_T *) extend_alloca (wp, s, newsize); \
- wpmax = s / sizeof (CHAR_T); \
- if (old != NULL) \
- MEMCPY (wp, old, wpsize); \
---
-1.9.4
-
diff --git a/package/glibc/Config.in b/package/glibc/Config.in
index 5b82170..75c2123 100644
--- a/package/glibc/Config.in
+++ b/package/glibc/Config.in
@@ -1,28 +1,3 @@
-if BR2_TOOLCHAIN_BUILDROOT_EGLIBC
-
-config BR2_PACKAGE_EGLIBC
- bool
- default y
- select BR2_PACKAGE_LINUX_HEADERS
-
-choice
- prompt "eglibc version"
- default BR2_EGLIBC_VERSION_2_18
-
-config BR2_EGLIBC_VERSION_2_18
- bool "2.18-svnr23787"
- # Build breakage
- depends on !BR2_sparc
-
-config BR2_EGLIBC_VERSION_2_19
- bool "2.19-svnr25243"
- # Build breakage
- depends on !BR2_powerpc_SPE
-
-endchoice
-
-endif
-
if BR2_TOOLCHAIN_BUILDROOT_GLIBC
config BR2_PACKAGE_GLIBC
@@ -52,7 +27,5 @@ endif
config BR2_GLIBC_VERSION_STRING
string
- default "2.18-svnr23787" if BR2_EGLIBC_VERSION_2_18
- default "2.19-svnr25243" if BR2_EGLIBC_VERSION_2_19
default "2.22" if BR2_GLIBC_VERSION_2_22
default "2.23" if BR2_GLIBC_VERSION_2_23
diff --git a/package/glibc/glibc.mk b/package/glibc/glibc.mk
index 2ae9cae..db9b46b 100644
--- a/package/glibc/glibc.mk
+++ b/package/glibc/glibc.mk
@@ -5,16 +5,9 @@
################################################################################
GLIBC_VERSION = $(call qstrip,$(BR2_GLIBC_VERSION_STRING))
-
-ifeq ($(BR2_TOOLCHAIN_BUILDROOT_EGLIBC),y)
-GLIBC_SITE = http://downloads.yoctoproject.org/releases/eglibc
-GLIBC_SOURCE = eglibc-$(GLIBC_VERSION).tar.bz2
-GLIBC_SRC_SUBDIR = libc
-else
GLIBC_SITE = $(BR2_GNU_MIRROR)/libc
GLIBC_SOURCE = glibc-$(GLIBC_VERSION).tar.xz
GLIBC_SRC_SUBDIR = .
-endif
GLIBC_LICENSE = GPLv2+ (programs), LGPLv2.1+, BSD-3c, MIT (library)
GLIBC_LICENSE_FILES = $(addprefix $(GLIBC_SRC_SUBDIR)/,COPYING COPYING.LIB LICENSES)
diff --git a/toolchain/toolchain-buildroot/Config.in b/toolchain/toolchain-buildroot/Config.in
index 0c40801..b046a61 100644
--- a/toolchain/toolchain-buildroot/Config.in
+++ b/toolchain/toolchain-buildroot/Config.in
@@ -42,26 +42,6 @@ config BR2_TOOLCHAIN_BUILDROOT_UCLIBC
http://uclibc.org
-config BR2_TOOLCHAIN_BUILDROOT_EGLIBC
- bool "eglibc"
- depends on BR2_arm || BR2_armeb || BR2_aarch64 || \
- BR2_aarch64_be || BR2_i386 || BR2_mips || \
- BR2_mipsel || BR2_mips64 || BR2_mips64el || \
- BR2_powerpc || BR2_sh || BR2_sh64 || \
- BR2_sparc || BR2_x86_64 || BR2_microblaze || \
- BR2_powerpc64
- depends on BR2_USE_MMU
- depends on !BR2_STATIC_LIBS
- depends on BR2_DEPRECATED_SINCE_2015_08
- select BR2_TOOLCHAIN_USES_GLIBC
- # our eglibc.mk enables RPC support
- select BR2_TOOLCHAIN_HAS_NATIVE_RPC
- help
- This option selects eglibc as the C library for the
- cross-compilation toolchain.
-
- http://eglibc.org
-
config BR2_TOOLCHAIN_BUILDROOT_GLIBC
bool "glibc"
depends on BR2_arm || BR2_armeb || BR2_aarch64 || \
@@ -107,9 +87,6 @@ endchoice
config BR2_TOOLCHAIN_BUILDROOT_LIBC
string
default "uclibc" if BR2_TOOLCHAIN_BUILDROOT_UCLIBC
- # Both glibc and eglibc are handled by the package called
- # 'glibc'
- default "glibc" if BR2_TOOLCHAIN_BUILDROOT_EGLIBC
default "glibc" if BR2_TOOLCHAIN_BUILDROOT_GLIBC
default "musl" if BR2_TOOLCHAIN_BUILDROOT_MUSL
--
2.7.4
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [Buildroot] [PATCH 8/9] binutils: remove support for version 2.23
2016-05-16 22:12 [Buildroot] [PATCH 0/9] Various toolchain related fixes/updates Thomas Petazzoni
` (6 preceding siblings ...)
2016-05-16 22:13 ` [Buildroot] [PATCH 7/9] toolchain: remove eglibc support Thomas Petazzoni
@ 2016-05-16 22:13 ` Thomas Petazzoni
2016-05-17 6:53 ` Peter Korsgaard
2016-05-16 22:13 ` [Buildroot] [PATCH 9/9] toolchain: musl support is no longer experimental Thomas Petazzoni
8 siblings, 1 reply; 22+ messages in thread
From: Thomas Petazzoni @ 2016-05-16 22:13 UTC (permalink / raw)
To: buildroot
Now that we have added support for the lastest binutils version 2.26,
it is time to remove the oldest version we currently support, 2.23, in
order to keep only 3 versions: 2.24, 2.25 and 2.26.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
Changes since v2:
- As suggested by Arnout, fix the previously existing
BR2_BINUTILS_VERSION_2_23_2 legacy option to make it not select
BR2_BINUTILS_VERSION_2_23_X, which is also a legacy option now, and
update its help text.
Changes since v1:
- Remove hash from the hash file, as noticed by Romain Naour.
- Add Config.in.legacy entry, as noticed by Romain Naour.
---
Config.in.legacy | 13 +-
package/binutils/2.23.2/120-sh-conf.patch | 29 -
.../2.23.2/300-001_ld_makefile_patch.patch | 24 -
.../2.23.2/300-012_check_ldrunpath_length.patch | 21 -
package/binutils/2.23.2/500-sysroot.patch | 37 -
.../2.23.2/600-poison-system-directories.patch | 279 -------
.../binutils/2.23.2/900-xtensa-trampolines.patch | 846 ---------------------
.../901-xtensa-gas-first-frag-alignment.patch | 51 --
.../902-xtensa-gas-ld-diff-relocation-signed.patch | 133 ----
...ix-ld-segfault-when-linking-linux-modules.patch | 47 --
...-target-out-of-range-xtensa-ld-relaxation.patch | 79 --
...ines-search-code-for-conditional-branches.patch | 90 ---
...localized-symbol-refcounting-with-gc-sect.patch | 57 --
...x-gas-segfault-with-text-section-literals.patch | 56 --
...-xtensa-fix-signedness-of-gas-relocations.patch | 47 --
...15-xtensa-fix-.init-.fini-literals-moving.patch | 70 --
package/binutils/Config.in.host | 10 -
package/binutils/binutils.hash | 1 -
18 files changed, 9 insertions(+), 1881 deletions(-)
delete mode 100644 package/binutils/2.23.2/120-sh-conf.patch
delete mode 100644 package/binutils/2.23.2/300-001_ld_makefile_patch.patch
delete mode 100644 package/binutils/2.23.2/300-012_check_ldrunpath_length.patch
delete mode 100644 package/binutils/2.23.2/500-sysroot.patch
delete mode 100644 package/binutils/2.23.2/600-poison-system-directories.patch
delete mode 100644 package/binutils/2.23.2/900-xtensa-trampolines.patch
delete mode 100644 package/binutils/2.23.2/901-xtensa-gas-first-frag-alignment.patch
delete mode 100644 package/binutils/2.23.2/902-xtensa-gas-ld-diff-relocation-signed.patch
delete mode 100644 package/binutils/2.23.2/903-xtensa-fix-ld-segfault-when-linking-linux-modules.patch
delete mode 100644 package/binutils/2.23.2/904-Fix-call8-call-target-out-of-range-xtensa-ld-relaxation.patch
delete mode 100644 package/binutils/2.23.2/905-Fix-trampolines-search-code-for-conditional-branches.patch
delete mode 100644 package/binutils/2.23.2/911-xtensa-fix-localized-symbol-refcounting-with-gc-sect.patch
delete mode 100644 package/binutils/2.23.2/912-xtensa-fix-gas-segfault-with-text-section-literals.patch
delete mode 100644 package/binutils/2.23.2/914-xtensa-fix-signedness-of-gas-relocations.patch
delete mode 100644 package/binutils/2.23.2/915-xtensa-fix-.init-.fini-literals-moving.patch
diff --git a/Config.in.legacy b/Config.in.legacy
index 7b76f28..a0a2059 100644
--- a/Config.in.legacy
+++ b/Config.in.legacy
@@ -145,6 +145,13 @@ endif
###############################################################################
comment "Legacy options removed in 2016.08"
+config BR2_BINUTILS_VERSION_2_23_X
+ bool "binutils 2.23 removed"
+ select BR2_LEGACY
+ help
+ Binutils 2.23 has been removed, using a newer version is
+ recommended.
+
config BR2_TOOLCHAIN_BUILDROOT_EGLIBC
bool "eglibc support has been removed"
select BR2_LEGACY
@@ -920,11 +927,9 @@ config BR2_PACKAGE_KODI_PVR_ADDONS
config BR2_BINUTILS_VERSION_2_23_2
bool "binutils 2.23 option renamed"
select BR2_LEGACY
- select BR2_BINUTILS_VERSION_2_23_X
help
- The binutils version option has been renamed to match the
- same patchlevel logic used by gcc. The new option is now
- BR2_BINUTILS_VERSION_2_23_X.
+ Binutils 2.23.2 has been removed, using a newer version is
+ recommended.
config BR2_BINUTILS_VERSION_2_24
bool "binutils 2.24 option renamed"
diff --git a/package/binutils/2.23.2/120-sh-conf.patch b/package/binutils/2.23.2/120-sh-conf.patch
deleted file mode 100644
index ea3d1b6..0000000
--- a/package/binutils/2.23.2/120-sh-conf.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-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).
-
---- a/configure
-+++ b/configure
-@@ -1495,7 +1495,7 @@
- mips*-*-*)
- noconfigdirs="$noconfigdirs gprof"
- ;;
-- sh-*-* | sh64-*-*)
-+ sh*-*-* | sh64-*-*)
- case "${target}" in
- sh*-*-elf)
- ;;
---- a/configure.ac
-+++ b/configure.ac
-@@ -712,7 +712,7 @@
- mips*-*-*)
- noconfigdirs="$noconfigdirs gprof"
- ;;
-- sh-*-* | sh64-*-*)
-+ sh*-*-* | sh64-*-*)
- case "${target}" in
- sh*-*-elf)
- ;;
diff --git a/package/binutils/2.23.2/300-001_ld_makefile_patch.patch b/package/binutils/2.23.2/300-001_ld_makefile_patch.patch
deleted file mode 100644
index 5cb0f61..0000000
--- a/package/binutils/2.23.2/300-001_ld_makefile_patch.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-diff -u binutils-2.17.50.0.17.oorig/ld/Makefile.am binutils-2.17.50.0.17/ld/Makefile.am
---- binutils-2.17.50.0.17.oorig/ld/Makefile.am 2007-06-18 19:29:29.000000000 +0200
-+++ binutils-2.17.50.0.17/ld/Makefile.am 2007-06-25 10:00:36.000000000 +0200
-@@ -18,7 +18,7 @@
- # 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 -u binutils-2.17.50.0.17.oorig/ld/Makefile.in binutils-2.17.50.0.17/ld/Makefile.in
---- binutils-2.17.50.0.17.oorig/ld/Makefile.in 2007-06-18 19:29:29.000000000 +0200
-+++ binutils-2.17.50.0.17/ld/Makefile.in 2007-06-25 10:00:36.000000000 +0200
-@@ -287,7 +287,7 @@
- # 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/package/binutils/2.23.2/300-012_check_ldrunpath_length.patch b/package/binutils/2.23.2/300-012_check_ldrunpath_length.patch
deleted file mode 100644
index df78310..0000000
--- a/package/binutils/2.23.2/300-012_check_ldrunpath_length.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-diff -Nura binutils-2.21.orig/ld/emultempl/elf32.em binutils-2.21/ld/emultempl/elf32.em
---- binutils-2.21.orig/ld/emultempl/elf32.em 2010-10-29 09:10:36.000000000 -0300
-+++ binutils-2.21/ld/emultempl/elf32.em 2010-12-10 09:26:56.746102724 -0300
-@@ -1270,6 +1270,8 @@
- && 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;
-@@ -1497,6 +1499,8 @@
- 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/package/binutils/2.23.2/500-sysroot.patch b/package/binutils/2.23.2/500-sysroot.patch
deleted file mode 100644
index e49c795..0000000
--- a/package/binutils/2.23.2/500-sysroot.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-Signed-off-by: Sven Rebhan <odinshorse@googlemail.com>
-
-Always try to prepend the sysroot prefix to absolute filenames first.
-
-http://bugs.gentoo.org/275666
-http://sourceware.org/bugzilla/show_bug.cgi?id=10340
-
---- a/ld/ldfile.c
-+++ b/ld/ldfile.c
-@@ -308,18 +308,25 @@
- directory first. */
- if (! entry->flags.maybe_archive)
- {
-- if (entry->flags.sysrooted && IS_ABSOLUTE_PATH (entry->filename))
-+ /* For absolute pathnames, try to always open the file in the
-+ sysroot first. If this fails, try to open the file at the
-+ given location. */
-+ entry->flags.sysrooted = is_sysrooted_pathname (entry->filename);
-+ if (!entry->flags.sysrooted && IS_ABSOLUTE_PATH (entry->filename)
-+ && ld_sysroot)
- {
- char *name = concat (ld_sysroot, entry->filename,
- (const char *) NULL);
- if (ldfile_try_open_bfd (name, entry))
- {
- entry->filename = name;
-+ entry->flags.sysrooted = TRUE;
- return TRUE;
- }
- free (name);
- }
-- else if (ldfile_try_open_bfd (entry->filename, entry))
-+
-+ if (ldfile_try_open_bfd (entry->filename, entry))
- return TRUE;
-
- if (IS_ABSOLUTE_PATH (entry->filename))
diff --git a/package/binutils/2.23.2/600-poison-system-directories.patch b/package/binutils/2.23.2/600-poison-system-directories.patch
deleted file mode 100644
index 780e48e..0000000
--- a/package/binutils/2.23.2/600-poison-system-directories.patch
+++ /dev/null
@@ -1,279 +0,0 @@
-Patch adapted to binutils 2.23.2 and extended to use
-BR_COMPILER_PARANOID_UNSAFE_PATH by Thomas Petazzoni.
-
-Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-
-Upstream-Status: Inappropriate [distribution: codesourcery]
-
-Patch originally created by Mark Hatle, forward-ported to
-binutils 2.21 by Scott Garman.
-
-purpose: warn for uses of system directories when cross linking
-
-Code Merged from Sourcery G++ binutils 2.19 - 4.4-277
-
-2008-07-02 Joseph Myers <joseph@codesourcery.com>
-
- ld/
- * ld.h (args_type): Add error_poison_system_directories.
- * ld.texinfo (--error-poison-system-directories): Document.
- * ldfile.c (ldfile_add_library_path): Check
- command_line.error_poison_system_directories.
- * ldmain.c (main): Initialize
- command_line.error_poison_system_directories.
- * lexsup.c (enum option_values): Add
- OPTION_ERROR_POISON_SYSTEM_DIRECTORIES.
- (ld_options): Add --error-poison-system-directories.
- (parse_args): Handle new option.
-
-2007-06-13 Joseph Myers <joseph@codesourcery.com>
-
- ld/
- * config.in: Regenerate.
- * ld.h (args_type): Add poison_system_directories.
- * ld.texinfo (--no-poison-system-directories): Document.
- * ldfile.c (ldfile_add_library_path): Check
- command_line.poison_system_directories.
- * ldmain.c (main): Initialize
- command_line.poison_system_directories.
- * lexsup.c (enum option_values): Add
- OPTION_NO_POISON_SYSTEM_DIRECTORIES.
- (ld_options): Add --no-poison-system-directories.
- (parse_args): Handle new option.
-
-2007-04-20 Joseph Myers <joseph@codesourcery.com>
-
- Merge from Sourcery G++ binutils 2.17:
-
- 2007-03-20 Joseph Myers <joseph@codesourcery.com>
- Based on patch by Mark Hatle <mark.hatle@windriver.com>.
- ld/
- * configure.in (--enable-poison-system-directories): New option.
- * configure, config.in: Regenerate.
- * ldfile.c (ldfile_add_library_path): If
- ENABLE_POISON_SYSTEM_DIRECTORIES defined, warn for use of /lib,
- /usr/lib, /usr/local/lib or /usr/X11R6/lib.
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
-Index: b/ld/config.in
-===================================================================
---- a/ld/config.in
-+++ b/ld/config.in
-@@ -11,6 +11,9 @@
- language is requested. */
- #undef ENABLE_NLS
-
-+/* Define to warn for use of native system library directories */
-+#undef ENABLE_POISON_SYSTEM_DIRECTORIES
-+
- /* Additional extension a shared object might have. */
- #undef EXTRA_SHLIB_EXTENSION
-
-Index: b/ld/configure
-===================================================================
---- a/ld/configure
-+++ b/ld/configure
-@@ -773,6 +773,7 @@
- enable_targets
- enable_64_bit_bfd
- with_sysroot
-+enable_poison_system_directories
- enable_gold
- enable_got
- enable_werror
-@@ -1428,6 +1429,8 @@
- (and sometimes confusing) to the casual installer
- --enable-targets alternative target configurations
- --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
-+ --enable-poison-system-directories
-+ warn for use of native system library directories
- --enable-gold[=ARG] build gold [ARG={default,yes,no}]
- --enable-got=<type> GOT handling scheme (target, single, negative,
- multigot)
-@@ -4338,7 +4341,18 @@
- fi
-
-
-+# Check whether --enable-poison-system-directories was given.
-+if test "${enable_poison_system_directories+set}" = set; then :
-+ enableval=$enable_poison_system_directories;
-+else
-+ enable_poison_system_directories=no
-+fi
-+
-+if test "x${enable_poison_system_directories}" = "xyes"; then
-
-+$as_echo "#define ENABLE_POISON_SYSTEM_DIRECTORIES 1" >>confdefs.h
-+
-+fi
-
- # Check whether --enable-got was given.
- if test "${enable_got+set}" = set; then :
-Index: b/ld/configure.in
-===================================================================
---- a/ld/configure.in
-+++ b/ld/configure.in
-@@ -70,6 +70,16 @@
- AC_SUBST(TARGET_SYSTEM_ROOT)
- AC_SUBST(TARGET_SYSTEM_ROOT_DEFINE)
-
-+AC_ARG_ENABLE([poison-system-directories],
-+ AS_HELP_STRING([--enable-poison-system-directories],
-+ [warn for use of native system library directories]),,
-+ [enable_poison_system_directories=no])
-+if test "x${enable_poison_system_directories}" = "xyes"; then
-+ AC_DEFINE([ENABLE_POISON_SYSTEM_DIRECTORIES],
-+ [1],
-+ [Define to warn for use of native system library directories])
-+fi
-+
- dnl Use --enable-gold to decide if this linker should be the default.
- dnl "install_as_default" is set to false if gold is the default linker.
- dnl "installed_linker" is the installed BFD linker name.
-Index: b/ld/ldfile.c
-===================================================================
---- a/ld/ldfile.c
-+++ b/ld/ldfile.c
-@@ -116,6 +116,23 @@
- new_dirs->name = concat (ld_sysroot, name + 1, (const char *) NULL);
- else
- new_dirs->name = xstrdup (name);
-+
-+#ifdef ENABLE_POISON_SYSTEM_DIRECTORIES
-+ if (command_line.poison_system_directories
-+ && ((!strncmp (name, "/lib", 4))
-+ || (!strncmp (name, "/usr/lib", 8))
-+ || (!strncmp (name, "/usr/local/lib", 14))
-+ || (!strncmp (name, "/usr/X11R6/lib", 14))))
-+ {
-+ if (command_line.error_poison_system_directories)
-+ einfo (_("%X%P: error: library search path \"%s\" is unsafe for "
-+ "cross-compilation\n"), name);
-+ else
-+ einfo (_("%P: warning: library search path \"%s\" is unsafe for "
-+ "cross-compilation\n"), name);
-+ }
-+#endif
-+
- }
-
- /* Try to open a BFD for a lang_input_statement. */
-Index: b/ld/ld.h
-===================================================================
---- a/ld/ld.h
-+++ b/ld/ld.h
-@@ -203,6 +203,14 @@
- /* If TRUE we'll just print the default output on stdout. */
- bfd_boolean print_output_format;
-
-+ /* If TRUE (the default) warn for uses of system directories when
-+ cross linking. */
-+ bfd_boolean poison_system_directories;
-+
-+ /* If TRUE (default FALSE) give an error for uses of system
-+ directories when cross linking instead of a warning. */
-+ bfd_boolean error_poison_system_directories;
-+
- /* Big or little endian as set on command line. */
- enum endian_enum endian;
-
-Index: b/ld/ldmain.c
-===================================================================
---- a/ld/ldmain.c
-+++ b/ld/ldmain.c
-@@ -265,6 +265,8 @@
- command_line.warn_search_mismatch = TRUE;
- command_line.check_section_addresses = -1;
- command_line.disable_target_specific_optimizations = -1;
-+ command_line.poison_system_directories = TRUE;
-+ command_line.error_poison_system_directories = FALSE;
-
- /* We initialize DEMANGLING based on the environment variable
- COLLECT_NO_DEMANGLE. The gcc collect2 program will demangle the
-Index: b/ld/ld.texinfo
-===================================================================
---- a/ld/ld.texinfo
-+++ b/ld/ld.texinfo
-@@ -2154,6 +2154,18 @@
-
- Passing @code{none} for @var{style} disables the setting from any
- @code{--build-id} options earlier on the command line.
-+
-+ at kindex --no-poison-system-directories
-+ at item --no-poison-system-directories
-+Do not warn for @option{-L} options using system directories such as
-+ at file{/usr/lib} when cross linking. This option is intended for use
-+in chroot environments when such directories contain the correct
-+libraries for the target system rather than the host.
-+
-+ at kindex --error-poison-system-directories
-+ at item --error-poison-system-directories
-+Give an error instead of a warning for @option{-L} options using
-+system directories when cross linking.
- @end table
-
- @c man end
-Index: b/ld/lexsup.c
-===================================================================
---- a/ld/lexsup.c
-+++ b/ld/lexsup.c
-@@ -498,6 +498,14 @@
- TWO_DASHES },
- { {"wrap", required_argument, NULL, OPTION_WRAP},
- '\0', N_("SYMBOL"), N_("Use wrapper functions for SYMBOL"), TWO_DASHES },
-+ { {"no-poison-system-directories", no_argument, NULL,
-+ OPTION_NO_POISON_SYSTEM_DIRECTORIES},
-+ '\0', NULL, N_("Do not warn for -L options using system directories"),
-+ TWO_DASHES },
-+ { {"error-poison-system-directories", no_argument, NULL,
-+ OPTION_ERROR_POISON_SYSTEM_DIRECTORIES},
-+ '\0', NULL, N_("Give an error for -L options using system directories"),
-+ TWO_DASHES },
- };
-
- #define OPTION_COUNT ARRAY_SIZE (ld_options)
-@@ -510,6 +518,7 @@
- int ingroup = 0;
- char *default_dirlist = NULL;
- char *shortopts;
-+ char *BR_paranoid_env;
- struct option *longopts;
- struct option *really_longopts;
- int last_optind;
-@@ -1427,9 +1436,21 @@
- einfo (_("%P%X: --hash-size needs a numeric argument\n"));
- }
- break;
-+
-+ case OPTION_NO_POISON_SYSTEM_DIRECTORIES:
-+ command_line.poison_system_directories = FALSE;
-+ break;
-+
-+ case OPTION_ERROR_POISON_SYSTEM_DIRECTORIES:
-+ command_line.error_poison_system_directories = TRUE;
-+ break;
- }
- }
-
-+ BR_paranoid_env = getenv("BR_COMPILER_PARANOID_UNSAFE_PATH");
-+ if (BR_paranoid_env && strlen(BR_paranoid_env) > 0)
-+ command_line.error_poison_system_directories = TRUE;
-+
- while (ingroup)
- {
- lang_leave_group ();
-Index: b/ld/ldlex.h
-===================================================================
---- a/ld/ldlex.h
-+++ b/ld/ldlex.h
-@@ -136,6 +136,8 @@
- #endif /* ENABLE_PLUGINS */
- OPTION_DEFAULT_SCRIPT,
- OPTION_PRINT_OUTPUT_FORMAT,
-+ OPTION_NO_POISON_SYSTEM_DIRECTORIES,
-+ OPTION_ERROR_POISON_SYSTEM_DIRECTORIES,
- };
-
- /* The initial parser states. */
diff --git a/package/binutils/2.23.2/900-xtensa-trampolines.patch b/package/binutils/2.23.2/900-xtensa-trampolines.patch
deleted file mode 100644
index b5b934f..0000000
--- a/package/binutils/2.23.2/900-xtensa-trampolines.patch
+++ /dev/null
@@ -1,846 +0,0 @@
-From a82c7d9030b67a6a76a5403d0e1641f9e42141ac Mon Sep 17 00:00:00 2001
-From: David Weatherford <weath@cadence.com>
-Date: Fri, 21 Mar 2014 11:53:42 +0000
-Subject: [PATCH] Add support to the Xtensa target for creating trampolines for
- out-of-range branches.
-
- * tc-xtensa.c (xtensa_check_frag_count, xtensa_create_trampoline_frag)
- (xtensa_maybe_create_trampoline_frag, init_trampoline_frag)
- (find_trampoline_seg, search_trampolines, get_best_trampoline)
- (check_and_update_trampolines, add_jump_to_trampoline)
- (dump_trampolines): New function.
- (md_parse_option): Add cases for --[no-]trampolines options.
- (md_assemble, finish_vinsn, xtensa_end): Add call to
- xtensa_check_frag_count.
- (xg_assemble_vliw_tokens): Add call to
- xtensa_maybe_create_trampoline_frag.
- (xtensa_relax_frag): Relax fragments with RELAX_TRAMPOLINE state.
- (relax_frag_immed): Relax jump instructions that cannot reach its
- target.
- * tc-xtensa.h (xtensa_relax_statesE::RELAX_TRAMPOLINE): New relax
- state.
-
- * as.texinfo: Document --[no-]trampolines command-line options.
- * c-xtensa.texi: Document trampolines relaxation and command line
- options.
-
- * frags.c (get_frag_count, clear_frag_count): New function.
- (frag_alloc): Increment totalfrags counter.
- * frags.h (get_frag_count, clear_frag_count): New function.
-
- * all.exp: Add test for trampoline relaxation.
- * trampoline.d: Trampoline relaxation expected dump.
- * trampoline.s: Trampoline relaxation test source.
----
-Backported from: a82c7d9030b67a6a76a5403d0e1641f9e42141ac
-Changes to Changelog files are dropped.
-
- gas/config/tc-xtensa.c | 558 +++++++++++++++++++++++++++++++++-
- gas/config/tc-xtensa.h | 5 +
- gas/frags.c | 15 +
- gas/frags.h | 3 +
- gas/testsuite/gas/xtensa/all.exp | 1 +
- gas/testsuite/gas/xtensa/trampoline.d | 26 ++
- gas/testsuite/gas/xtensa/trampoline.s | 21 ++
- 11 files changed, 753 insertions(+), 2 deletions(-)
- create mode 100644 gas/testsuite/gas/xtensa/trampoline.d
- create mode 100644 gas/testsuite/gas/xtensa/trampoline.s
-
-diff --git a/gas/config/tc-xtensa.c b/gas/config/tc-xtensa.c
-index fe8ec0f..ea23c96 100644
---- a/gas/config/tc-xtensa.c
-+++ b/gas/config/tc-xtensa.c
-@@ -468,6 +468,12 @@ static void xtensa_set_frag_assembly_state (fragS *);
- static void finish_vinsn (vliw_insn *);
- static bfd_boolean emit_single_op (TInsn *);
- static int total_frag_text_expansion (fragS *);
-+static bfd_boolean use_trampolines = TRUE;
-+static void xtensa_check_frag_count (void);
-+static void xtensa_create_trampoline_frag (bfd_boolean);
-+static void xtensa_maybe_create_trampoline_frag (void);
-+struct trampoline_frag;
-+static int init_trampoline_frag (struct trampoline_frag *);
-
- /* Alignment Functions. */
-
-@@ -520,6 +526,7 @@ static void tinsn_from_chars (TInsn *, char *, int);
- static void tinsn_immed_from_frag (TInsn *, fragS *, int);
- static int get_num_stack_text_bytes (IStack *);
- static int get_num_stack_literal_bytes (IStack *);
-+static bfd_boolean tinsn_to_slotbuf (xtensa_format, int, TInsn *, xtensa_insnbuf);
-
- /* vliw_insn functions. */
-
-@@ -687,7 +694,10 @@ enum
- option_prefer_l32r,
- option_prefer_const16,
-
-- option_target_hardware
-+ option_target_hardware,
-+
-+ option_trampolines,
-+ option_no_trampolines,
- };
-
- const char *md_shortopts = "";
-@@ -760,6 +770,9 @@ struct option md_longopts[] =
-
- { "target-hardware", required_argument, NULL, option_target_hardware },
-
-+ { "trampolines", no_argument, NULL, option_trampolines },
-+ { "no-trampolines", no_argument, NULL, option_no_trampolines },
-+
- { NULL, no_argument, NULL, 0 }
- };
-
-@@ -940,6 +953,14 @@ md_parse_option (int c, char *arg)
- directive_state[directive_transform] = FALSE;
- return 1;
-
-+ case option_trampolines:
-+ use_trampolines = TRUE;
-+ return 1;
-+
-+ case option_no_trampolines:
-+ use_trampolines = FALSE;
-+ return 1;
-+
- default:
- return 0;
- }
-@@ -963,7 +984,9 @@ Xtensa options:\n\
- flix bundles\n\
- --no-allow-flix neither allow hand-written nor generate\n\
- flix bundles\n\
-- --rename-section old=new Rename section 'old' to 'new'\n", stream);
-+ --rename-section old=new Rename section 'old' to 'new'\n\
-+ --[no-]trampolines [Do not] generate trampolines (jumps to jumps)\n\
-+ when jumps do not reach their targets\n", stream);
- }
-
- \f
-@@ -5568,6 +5591,8 @@ md_assemble (char *str)
-
- /* We've just emitted a new instruction so clear the list of labels. */
- xtensa_clear_insn_labels ();
-+
-+ xtensa_check_frag_count ();
- }
-
-
-@@ -6372,6 +6397,8 @@ finish_vinsn (vliw_insn *vinsn)
- xg_assemble_vliw_tokens (vinsn);
-
- xg_clear_vinsn (vinsn);
-+
-+ xtensa_check_frag_count ();
- }
-
-
-@@ -7140,6 +7167,7 @@ xg_assemble_vliw_tokens (vliw_insn *vinsn)
- RELAX_UNREACHABLE,
- frag_now->fr_symbol, frag_now->fr_offset, NULL);
- xtensa_set_frag_assembly_state (frag_now);
-+ xtensa_maybe_create_trampoline_frag ();
- }
- else if (is_branch && do_align_targets ())
- {
-@@ -7222,9 +7250,164 @@ xtensa_end (void)
- xtensa_sanity_check ();
-
- xtensa_add_config_info ();
-+
-+ xtensa_check_frag_count ();
-+}
-+
-+
-+struct trampoline_frag
-+{
-+ struct trampoline_frag *next;
-+ bfd_boolean needs_jump_around;
-+ fragS *fragP;
-+ fixS *fixP;
-+};
-+
-+struct trampoline_seg
-+{
-+ struct trampoline_seg *next;
-+ asection *seg;
-+ struct trampoline_frag trampoline_list;
-+};
-+
-+static struct trampoline_seg trampoline_seg_list;
-+#define J_RANGE (128 * 1024)
-+
-+static int unreachable_count = 0;
-+
-+
-+static void
-+xtensa_maybe_create_trampoline_frag (void)
-+{
-+ if (!use_trampolines)
-+ return;
-+
-+ /* We create an area for possible trampolines every 10 unreachable frags.
-+ These are preferred over the ones not preceded by an unreachable frag,
-+ because we don't have to jump around them. This function is called after
-+ each RELAX_UNREACHABLE frag is created. */
-+
-+ if (++unreachable_count > 10)
-+ {
-+ xtensa_create_trampoline_frag (FALSE);
-+ clear_frag_count ();
-+ unreachable_count = 0;
-+ }
-+}
-+
-+static void
-+xtensa_check_frag_count (void)
-+{
-+ if (!use_trampolines || frag_now->tc_frag_data.is_no_transform)
-+ return;
-+
-+ /* We create an area for possible trampolines every 8000 frags or so. This
-+ is an estimate based on the max range of a "j" insn (+/-128K) divided
-+ by a typical frag byte count (16), minus a few for safety. This function
-+ is called after each source line is processed. */
-+
-+ if (get_frag_count () > 8000)
-+ {
-+ xtensa_create_trampoline_frag (TRUE);
-+ clear_frag_count ();
-+ unreachable_count = 0;
-+ }
-+}
-+
-+static xtensa_insnbuf trampoline_buf = NULL;
-+static xtensa_insnbuf trampoline_slotbuf = NULL;
-+
-+#define TRAMPOLINE_FRAG_SIZE 3000
-+
-+static void
-+xtensa_create_trampoline_frag (bfd_boolean needs_jump_around)
-+{
-+ /* Emit a frag where we can place intermediate jump instructions,
-+ in case we need to jump farther than 128K bytes.
-+ Each jump instruction takes three bytes.
-+ We allocate enough for 1000 trampolines in each frag.
-+ If that's not enough, oh well. */
-+
-+ struct trampoline_seg *ts = trampoline_seg_list.next;
-+ struct trampoline_frag *tf;
-+ char *varP;
-+ fragS *fragP;
-+ int size = TRAMPOLINE_FRAG_SIZE;
-+
-+ for ( ; ts; ts = ts->next)
-+ {
-+ if (ts->seg == now_seg)
-+ break;
-+ }
-+
-+ if (ts == NULL)
-+ {
-+ ts = (struct trampoline_seg *)xcalloc(sizeof (struct trampoline_seg), 1);
-+ ts->next = trampoline_seg_list.next;
-+ trampoline_seg_list.next = ts;
-+ ts->seg = now_seg;
-+ }
-+
-+ frag_wane (frag_now);
-+ frag_new (0);
-+ xtensa_set_frag_assembly_state (frag_now);
-+ varP = frag_var (rs_machine_dependent, size, size, RELAX_TRAMPOLINE, NULL, 0, NULL);
-+ fragP = (fragS *)(varP - SIZEOF_STRUCT_FRAG);
-+ if (trampoline_buf == NULL)
-+ {
-+ trampoline_buf = xtensa_insnbuf_alloc (xtensa_default_isa);
-+ trampoline_slotbuf = xtensa_insnbuf_alloc (xtensa_default_isa);
-+ }
-+ tf = (struct trampoline_frag *)xmalloc(sizeof (struct trampoline_frag));
-+ tf->next = ts->trampoline_list.next;
-+ ts->trampoline_list.next = tf;
-+ tf->needs_jump_around = needs_jump_around;
-+ tf->fragP = fragP;
-+ tf->fixP = NULL;
-+}
-+
-+
-+static struct trampoline_seg *
-+find_trampoline_seg (asection *seg)
-+{
-+ struct trampoline_seg *ts = trampoline_seg_list.next;
-+
-+ for ( ; ts; ts = ts->next)
-+ {
-+ if (ts->seg == seg)
-+ return ts;
-+ }
-+
-+ return NULL;
- }
-
-
-+void dump_trampolines (void);
-+
-+void
-+dump_trampolines (void)
-+{
-+ struct trampoline_seg *ts = trampoline_seg_list.next;
-+
-+ for ( ; ts; ts = ts->next)
-+ {
-+ asection *seg = ts->seg;
-+
-+ if (seg == NULL)
-+ continue;
-+ fprintf(stderr, "SECTION %s\n", seg->name);
-+ struct trampoline_frag *tf = ts->trampoline_list.next;
-+ for ( ; tf; tf = tf->next)
-+ {
-+ if (tf->fragP == NULL)
-+ continue;
-+ fprintf(stderr, " 0x%08x: fix=%d, jump_around=%s\n",
-+ (int)tf->fragP->fr_address, (int)tf->fragP->fr_fix,
-+ tf->needs_jump_around ? "T" : "F");
-+ }
-+ }
-+}
-+
- static void
- xtensa_cleanup_align_frags (void)
- {
-@@ -8708,6 +8891,149 @@ xtensa_relax_frag (fragS *fragP, long stretch, int *stretched_p)
- new_stretch += relax_frag_for_align (fragP, stretch);
- break;
-
-+ case RELAX_TRAMPOLINE:
-+ if (fragP->tc_frag_data.relax_seen)
-+ {
-+ segment_info_type *seginfo = seg_info (now_seg);
-+ fragS *fP; /* The out-of-range jump. */
-+ fixS *fixP;
-+
-+ /* Scan for jumps that will not reach. */
-+ for (fixP = seginfo->fix_root; fixP ; fixP = fixP->fx_next)
-+ {
-+ symbolS *s = fixP->fx_addsy;
-+ xtensa_opcode opcode;
-+ int target;
-+ int addr;
-+ int delta;
-+
-+ if (fixP->fx_r_type < BFD_RELOC_XTENSA_SLOT0_OP ||
-+ fixP->fx_r_type > BFD_RELOC_XTENSA_SLOT14_OP)
-+ continue;
-+ xtensa_insnbuf_from_chars (isa, trampoline_buf,
-+ (unsigned char *) fixP->fx_frag->fr_literal + fixP->fx_where,
-+ 0);
-+ fmt = xtensa_format_decode (isa, trampoline_buf);
-+ gas_assert (fmt != XTENSA_UNDEFINED);
-+ slot = fixP->tc_fix_data.slot;
-+ xtensa_format_get_slot (isa, fmt, slot, trampoline_buf, trampoline_slotbuf);
-+ opcode = xtensa_opcode_decode (isa, fmt, slot, trampoline_slotbuf);
-+ if (opcode != xtensa_j_opcode)
-+ continue;
-+ target = S_GET_VALUE (s);
-+ addr = fixP->fx_frag->fr_address;
-+ delta = target - addr + stretch;
-+ if (delta > J_RANGE || delta < -1 * J_RANGE)
-+ { /* Found an out-of-range jump; scan the list of trampolines for the best match. */
-+ struct trampoline_seg *ts = find_trampoline_seg (now_seg);
-+ struct trampoline_frag *tf = ts->trampoline_list.next;
-+ struct trampoline_frag *prev = &ts->trampoline_list;
-+ int lower = (target < addr) ? target : addr;
-+ int upper = (target > addr) ? target : addr;
-+ int midpoint = lower + (upper - lower) / 2;
-+
-+ if ((upper - lower) > 2 * J_RANGE)
-+ {
-+ /* One trampoline won't suffice; we need multiple jumps.
-+ Jump to the trampoline that's farthest, but still in
-+ range relative to the original "j" instruction. */
-+ for ( ; tf; prev = tf, tf = tf->next )
-+ {
-+ int this_addr = tf->fragP->fr_address + tf->fragP->fr_fix;
-+ int next_addr = (tf->next) ? tf->next->fragP->fr_address + tf->next->fragP->fr_fix : 0 ;
-+
-+ if (addr == lower)
-+ {
-+ /* Forward jump. */
-+ if (this_addr - addr < J_RANGE)
-+ break;
-+ }
-+ else
-+ {
-+ /* Backward jump. */
-+ if (next_addr == 0 || addr - next_addr > J_RANGE)
-+ break;
-+ }
-+ }
-+ }
-+ else
-+ {
-+ struct trampoline_frag *best_tf = NULL;
-+ int best_delta = 0;
-+
-+ for ( ; tf; prev = tf, tf = tf->next )
-+ {
-+ int this_addr = tf->fragP->fr_address + tf->fragP->fr_fix;
-+ int this_delta = abs (this_addr - midpoint);
-+
-+ if (!best_tf || this_delta < best_delta)
-+ {
-+ best_tf = tf;
-+ best_delta = this_delta;
-+ }
-+ }
-+ tf = best_tf;
-+ }
-+ if (tf->fragP == fragP)
-+ {
-+ int trampaddr = fragP->fr_address + fragP->fr_fix;
-+
-+ if (abs (addr - trampaddr) < J_RANGE)
-+ { /* The trampoline is in range of original; fix it! */
-+ fixS *newfixP;
-+ int offset;
-+ TInsn insn;
-+ symbolS *lsym;
-+
-+ new_stretch += init_trampoline_frag (tf);
-+ offset = fragP->fr_fix; /* Where to assemble the j insn. */
-+ lsym = fragP->fr_symbol;
-+ fP = fixP->fx_frag;
-+ /* Assemble a jump to the target label here. */
-+ tinsn_init (&insn);
-+ insn.insn_type = ITYPE_INSN;
-+ insn.opcode = xtensa_j_opcode;
-+ insn.ntok = 1;
-+ set_expr_symbol_offset (&insn.tok[0], lsym, offset);
-+ fmt = xg_get_single_format (xtensa_j_opcode);
-+ tinsn_to_slotbuf (fmt, 0, &insn, trampoline_slotbuf);
-+ xtensa_format_set_slot (isa, fmt, 0, trampoline_buf, trampoline_slotbuf);
-+ xtensa_insnbuf_to_chars (isa, trampoline_buf, (unsigned char *)fragP->fr_literal + offset, 3);
-+ fragP->fr_fix += 3;
-+ fragP->fr_var -= 3;
-+ /* Add a fix-up for the original j insn. */
-+ newfixP = fix_new (fP, fixP->fx_where, fixP->fx_size, lsym, fragP->fr_fix - 3, TRUE, fixP->fx_r_type);
-+ newfixP->fx_no_overflow = 1;
-+ newfixP->tc_fix_data.X_add_symbol = lsym;
-+ newfixP->tc_fix_data.X_add_number = offset;
-+ newfixP->tc_fix_data.slot = slot;
-+ /* Move the fix-up from the original j insn to this one. */
-+ fixP->fx_frag = fragP;
-+ fixP->fx_where = fragP->fr_fix - 3;
-+ fixP->tc_fix_data.slot = 0;
-+ /* Adjust the jump around this trampoline (if present). */
-+ if (tf->fixP != NULL)
-+ {
-+ tf->fixP->fx_offset += 3;
-+ }
-+ new_stretch += 3;
-+ fragP->tc_frag_data.relax_seen = FALSE; /* Need another pass. */
-+ /* Do we have room for more? */
-+ if (fragP->fr_var < 3)
-+ { /* No, convert to fill. */
-+ frag_wane (fragP);
-+ fragP->fr_subtype = 0;
-+ /* Remove from the trampoline_list. */
-+ prev->next = tf->next;
-+ break;
-+ }
-+ }
-+ }
-+ }
-+ }
-+ }
-+ break;
-+
- default:
- as_bad (_("bad relaxation state"));
- }
-@@ -9146,6 +9472,200 @@ bytes_to_stretch (fragS *this_frag,
- }
-
-
-+static struct trampoline_frag *
-+search_trampolines (TInsn *tinsn, fragS *fragP, bfd_boolean unreachable_only)
-+{
-+ struct trampoline_seg *ts = find_trampoline_seg (now_seg);
-+ struct trampoline_frag *tf = (ts) ? ts->trampoline_list.next : NULL;
-+ struct trampoline_frag *best_tf = NULL;
-+ int best_delta = 0;
-+ int best_addr = 0;
-+ symbolS *sym = tinsn->tok[0].X_add_symbol;
-+ offsetT target = S_GET_VALUE (sym) + tinsn->tok[0].X_add_number;
-+ offsetT addr = fragP->fr_address;
-+ offsetT lower = (addr < target) ? addr : target;
-+ offsetT upper = (addr > target) ? addr : target;
-+ int delta = upper - lower;
-+ offsetT midpoint = lower + delta / 2;
-+ int this_delta = -1;
-+ int this_addr = -1;
-+
-+ if (delta > 2 * J_RANGE)
-+ {
-+ /* One trampoline won't do; we need multiple.
-+ Choose the farthest trampoline that's still in range of the original
-+ and let a later pass finish the job. */
-+ for ( ; tf; tf = tf->next)
-+ {
-+ int next_addr = (tf->next) ? tf->next->fragP->fr_address + tf->next->fragP->fr_fix : 0;
-+
-+ this_addr = tf->fragP->fr_address + tf->fragP->fr_fix;
-+ if (lower == addr)
-+ {
-+ /* Forward jump. */
-+ if (this_addr - addr < J_RANGE)
-+ break;
-+ }
-+ else
-+ {
-+ /* Backward jump. */
-+ if (next_addr == 0 || addr - next_addr > J_RANGE)
-+ break;
-+ }
-+ if (abs (addr - this_addr) < J_RANGE)
-+ return tf;
-+
-+ return NULL;
-+ }
-+ }
-+ for ( ; tf; tf = tf->next)
-+ {
-+ this_addr = tf->fragP->fr_address + tf->fragP->fr_fix;
-+ this_delta = abs (this_addr - midpoint);
-+ if (unreachable_only && tf->needs_jump_around)
-+ continue;
-+ if (!best_tf || this_delta < best_delta)
-+ {
-+ best_tf = tf;
-+ best_delta = this_delta;
-+ best_addr = this_addr;
-+ }
-+ }
-+
-+ if (best_tf &&
-+ best_delta < J_RANGE &&
-+ abs(best_addr - lower) < J_RANGE &&
-+ abs(best_addr - upper) < J_RANGE)
-+ return best_tf;
-+
-+ return NULL; /* No suitable trampoline found. */
-+}
-+
-+
-+static struct trampoline_frag *
-+get_best_trampoline (TInsn *tinsn, fragS *fragP)
-+{
-+ struct trampoline_frag *tf = NULL;
-+
-+ tf = search_trampolines (tinsn, fragP, TRUE); /* Try unreachable first. */
-+
-+ if (tf == NULL)
-+ tf = search_trampolines (tinsn, fragP, FALSE); /* Try ones needing a jump-around, too. */
-+
-+ return tf;
-+}
-+
-+
-+static void
-+check_and_update_trampolines (void)
-+{
-+ struct trampoline_seg *ts = find_trampoline_seg (now_seg);
-+ struct trampoline_frag *tf = ts->trampoline_list.next;
-+ struct trampoline_frag *prev = &ts->trampoline_list;
-+
-+ for ( ; tf; prev = tf, tf = tf->next)
-+ {
-+ if (tf->fragP->fr_var < 3)
-+ {
-+ frag_wane (tf->fragP);
-+ prev->next = tf->next;
-+ tf->fragP = NULL;
-+ }
-+ }
-+}
-+
-+
-+static int
-+init_trampoline_frag (struct trampoline_frag *trampP)
-+{
-+ fragS *fp = trampP->fragP;
-+ int growth = 0;
-+
-+ if (fp->fr_fix == 0)
-+ {
-+ symbolS *lsym;
-+ char label[10 + 2 * sizeof(fp)];
-+ sprintf (label, ".L0_TR_%p", fp);
-+
-+ lsym = (symbolS *)local_symbol_make (label, now_seg, 0, fp);
-+ fp->fr_symbol = lsym;
-+ if (trampP->needs_jump_around)
-+ {
-+ /* Add a jump around this block of jumps, in case
-+ control flows into this block. */
-+ fixS *fixP;
-+ TInsn insn;
-+ xtensa_format fmt;
-+ xtensa_isa isa = xtensa_default_isa;
-+
-+ fp->tc_frag_data.is_insn = 1;
-+ /* Assemble a jump insn. */
-+ tinsn_init (&insn);
-+ insn.insn_type = ITYPE_INSN;
-+ insn.opcode = xtensa_j_opcode;
-+ insn.ntok = 1;
-+ set_expr_symbol_offset (&insn.tok[0], lsym, 3);
-+ fmt = xg_get_single_format (xtensa_j_opcode);
-+ tinsn_to_slotbuf (fmt, 0, &insn, trampoline_slotbuf);
-+ xtensa_format_set_slot (isa, fmt, 0, trampoline_buf, trampoline_slotbuf);
-+ xtensa_insnbuf_to_chars (isa, trampoline_buf, (unsigned char *)fp->fr_literal, 3);
-+ fp->fr_fix += 3;
-+ fp->fr_var -= 3;
-+ growth = 3;
-+ fixP = fix_new (fp, 0, 3, lsym, 3, TRUE, BFD_RELOC_XTENSA_SLOT0_OP);
-+ trampP->fixP = fixP;
-+ }
-+ }
-+ return growth;
-+}
-+
-+
-+static int
-+add_jump_to_trampoline (struct trampoline_frag *trampP, fragS *origfrag)
-+{
-+ fragS *tramp = trampP->fragP;
-+ fixS *fixP;
-+ int offset = tramp->fr_fix; /* Where to assemble the j insn. */
-+ TInsn insn;
-+ symbolS *lsym;
-+ symbolS *tsym;
-+ int toffset;
-+ xtensa_format fmt;
-+ xtensa_isa isa = xtensa_default_isa;
-+ int growth = 0;
-+
-+ lsym = tramp->fr_symbol;
-+ /* Assemble a jump to the target label in the trampoline frag. */
-+ tsym = origfrag->tc_frag_data.slot_symbols[0];
-+ toffset = origfrag-> tc_frag_data.slot_offsets[0];
-+ tinsn_init (&insn);
-+ insn.insn_type = ITYPE_INSN;
-+ insn.opcode = xtensa_j_opcode;
-+ insn.ntok = 1;
-+ set_expr_symbol_offset (&insn.tok[0], tsym, toffset);
-+ fmt = xg_get_single_format (xtensa_j_opcode);
-+ tinsn_to_slotbuf (fmt, 0, &insn, trampoline_slotbuf);
-+ xtensa_format_set_slot (isa, fmt, 0, trampoline_buf, trampoline_slotbuf);
-+ xtensa_insnbuf_to_chars (isa, trampoline_buf, (unsigned char *)tramp->fr_literal + offset, 3);
-+ tramp->fr_fix += 3;
-+ tramp->fr_var -= 3;
-+ growth = 3;
-+ /* add a fix-up for the trampoline jump. */
-+ fixP = fix_new (tramp, tramp->fr_fix - 3, 3, tsym, toffset, TRUE, BFD_RELOC_XTENSA_SLOT0_OP);
-+ /* Modify the jump at the start of this trampoline to point past the newly-added jump. */
-+ fixP = trampP->fixP;
-+ if (fixP)
-+ fixP->fx_offset += 3;
-+ /* Modify the original j to point here. */
-+ origfrag->tc_frag_data.slot_symbols[0] = lsym;
-+ origfrag->tc_frag_data.slot_offsets[0] = tramp->fr_fix - 3;
-+ /* If trampoline is full, remove it from the list. */
-+ check_and_update_trampolines ();
-+
-+ return growth;
-+}
-+
-+
- static long
- relax_frag_immed (segT segP,
- fragS *fragP,
-@@ -9284,6 +9804,37 @@ relax_frag_immed (segT segP,
- if (negatable_branch && istack.ninsn > 1)
- update_next_frag_state (fragP);
-
-+ /* If last insn is a jump, and it cannot reach its target, try to find a trampoline. */
-+ if (istack.ninsn > 2 &&
-+ istack.insn[istack.ninsn - 1].insn_type == ITYPE_LABEL &&
-+ istack.insn[istack.ninsn - 2].insn_type == ITYPE_INSN &&
-+ istack.insn[istack.ninsn - 2].opcode == xtensa_j_opcode)
-+ {
-+ TInsn *jinsn = &istack.insn[istack.ninsn - 2];
-+
-+ if (!xg_symbolic_immeds_fit (jinsn, segP, fragP, fragP->fr_offset, total_text_diff))
-+ {
-+ struct trampoline_frag *tf = get_best_trampoline (jinsn, fragP);
-+
-+ if (tf)
-+ {
-+ this_text_diff += init_trampoline_frag (tf);
-+ this_text_diff += add_jump_to_trampoline (tf, fragP);
-+ }
-+ else
-+ {
-+ /* If target symbol is undefined, assume it will reach once linked. */
-+ expressionS *exp = &istack.insn[istack.ninsn - 2].tok[0];
-+
-+ if (exp->X_op == O_symbol && S_IS_DEFINED (exp->X_add_symbol))
-+ {
-+ as_bad_where (fragP->fr_file, fragP->fr_line,
-+ _("jump target out of range; no usable trampoline found"));
-+ }
-+ }
-+ }
-+ }
-+
- return this_text_diff;
- }
-
-@@ -9404,6 +9955,9 @@ md_convert_frag (bfd *abfd ATTRIBUTE_UNUSED, segT sec, fragS *fragp)
- else
- as_bad (_("invalid relaxation fragment result"));
- break;
-+
-+ case RELAX_TRAMPOLINE:
-+ break;
- }
-
- fragp->fr_var = 0;
-diff --git a/gas/config/tc-xtensa.h b/gas/config/tc-xtensa.h
-index 0bf1240..4672bc6 100644
---- a/gas/config/tc-xtensa.h
-+++ b/gas/config/tc-xtensa.h
-@@ -180,6 +180,11 @@ enum xtensa_relax_statesE
- prevent the linker from changing the size of any frag between the
- section start and the org frag. */
-
-+ RELAX_TRAMPOLINE,
-+ /* Every few thousand frags, we insert one of these, just in case we may
-+ need some space for a trampoline (jump to a jump) because the function
-+ has gotten too big. If not needed, it disappears. */
-+
- RELAX_NONE
- };
-
-diff --git a/gas/frags.c b/gas/frags.c
-index 5f68480..e14099d 100644
---- a/gas/frags.c
-+++ b/gas/frags.c
-@@ -24,6 +24,20 @@
-
- extern fragS zero_address_frag;
- extern fragS predefined_address_frag;
-+
-+static int totalfrags;
-+
-+int
-+get_frag_count (void)
-+{
-+ return totalfrags;
-+}
-+
-+void
-+clear_frag_count (void)
-+{
-+ totalfrags = 0;
-+}
- \f
- /* Initialization for frag routines. */
-
-@@ -70,6 +84,7 @@ frag_alloc (struct obstack *ob)
- ptr = (fragS *) obstack_alloc (ob, SIZEOF_STRUCT_FRAG);
- obstack_alignment_mask (ob) = oalign;
- memset (ptr, 0, SIZEOF_STRUCT_FRAG);
-+ totalfrags++;
- return ptr;
- }
- \f
-diff --git a/gas/frags.h b/gas/frags.h
-index 319898f..2f9e1b5 100644
---- a/gas/frags.h
-+++ b/gas/frags.h
-@@ -155,4 +155,7 @@ char *frag_var (relax_stateT type,
-
- bfd_boolean frag_offset_fixed_p (const fragS *, const fragS *, offsetT *);
-
-+int get_frag_count (void);
-+void clear_frag_count (void);
-+
- #endif /* FRAGS_H */
-diff --git a/gas/testsuite/gas/xtensa/all.exp b/gas/testsuite/gas/xtensa/all.exp
-index 2b2c294..3683b78 100644
---- a/gas/testsuite/gas/xtensa/all.exp
-+++ b/gas/testsuite/gas/xtensa/all.exp
-@@ -98,6 +98,7 @@ if [istarget xtensa*-*-*] then {
- run_dump_test "pcrel"
- run_dump_test "weak-call"
- run_dump_test "jlong"
-+ run_dump_test "trampoline"
- }
-
- if [info exists errorInfo] then {
-diff --git a/gas/testsuite/gas/xtensa/trampoline.d b/gas/testsuite/gas/xtensa/trampoline.d
-new file mode 100644
-index 0000000..b4f65dc
---- /dev/null
-+++ b/gas/testsuite/gas/xtensa/trampoline.d
-@@ -0,0 +1,26 @@
-+#as:
-+#objdump: -d
-+#name: trampolines relaxation
-+
-+.*: +file format .*xtensa.*
-+#...
-+.*0:.*j.0x1194c
-+.*3:.*j.0x1194f
-+.*6:.*j.0x11952
-+.*9:.*j.0x1d4e4
-+#...
-+.*11949:.*j.0x11955
-+.*1194c:.*j.0x24a0e
-+.*1194f:.*j.0x24a0e
-+.*11952:.*j.0x24a11
-+#...
-+.*1d4e1:.*j.0x1d4e7
-+.*1d4e4:.*j.0x33462
-+#...
-+.*24a0e:.*j.0x24a0e
-+.*24a11:.*j.0x24a11
-+#...
-+.*3345f:.*ret
-+.*33462:.*j.0x49407
-+#...
-+.*49407:.*j.0x49407
-diff --git a/gas/testsuite/gas/xtensa/trampoline.s b/gas/testsuite/gas/xtensa/trampoline.s
-new file mode 100644
-index 0000000..259a3bb
---- /dev/null
-+++ b/gas/testsuite/gas/xtensa/trampoline.s
-@@ -0,0 +1,21 @@
-+ .text
-+ j 1f
-+ j 1f
-+ j 2f
-+ j 3f
-+ .rep 25000
-+99:
-+ and a2, a2, a3
-+ bne a2, a3, 99b
-+ .endr
-+1:
-+ j 1b
-+2:
-+ j 2b
-+
-+ .rep 25000
-+ and a2, a2, a3
-+ _ret
-+ .endr
-+3:
-+ j 3b
---
-1.8.1.4
-
diff --git a/package/binutils/2.23.2/901-xtensa-gas-first-frag-alignment.patch b/package/binutils/2.23.2/901-xtensa-gas-first-frag-alignment.patch
deleted file mode 100644
index e1c2d85..0000000
--- a/package/binutils/2.23.2/901-xtensa-gas-first-frag-alignment.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-From a35d5e823fdfe8a6e7e05ca8e3fb8bb5697335b1 Mon Sep 17 00:00:00 2001
-From: Max Filippov <jcmvbkbc@gmail.com>
-Date: Tue, 15 Apr 2014 19:12:46 +0400
-Subject: [PATCH] Fix alignment for the first section frag on xtensa
-
-Linking object files produced by partial linking with link-time
-relaxation enabled sometimes fails with the following error message:
-
-dangerous relocation: call8: misaligned call target: (.text.unlikely+0x63)
-
-This happens because no basic block with an XTENSA_PROP_ALIGN flag in the
-property table is generated for the first basic block, even if the
-.align directive is present.
-It was believed that the first frag alignment could be derived from the
-section alignment, but this was not implemented for the partial linking
-case: after partial linking first frag of a section may become not
-first, but no additional alignment frag is inserted before it.
-Basic block for such frag may be merged with previous basic block into
-extended basic block during relaxation pass losing its alignment
-restrictions.
-
-Fix this by always recording alignment for the first section frag.
-
-2014-04-22 Max Filippov <jcmvbkbc@gmail.com>
-
-gas/
- * config/tc-xtensa.c (xtensa_handle_align): record alignment for the
- first section frag.
-
----
-Backported from: a35d5e823fdfe8a6e7e05ca8e3fb8bb5697335b1
-Changes to Changelog files and tests are dropped.
-
- gas/config/tc-xtensa.c | 1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/gas/config/tc-xtensa.c b/gas/config/tc-xtensa.c
-index ea23c96..58ace38 100644
---- a/gas/config/tc-xtensa.c
-+++ b/gas/config/tc-xtensa.c
-@@ -5609,7 +5609,6 @@ xtensa_handle_align (fragS *fragP)
- && ! fragP->tc_frag_data.is_literal
- && (fragP->fr_type == rs_align
- || fragP->fr_type == rs_align_code)
-- && fragP->fr_address + fragP->fr_fix > 0
- && fragP->fr_offset > 0
- && now_seg != bss_section)
- {
---
-1.8.1.4
-
diff --git a/package/binutils/2.23.2/902-xtensa-gas-ld-diff-relocation-signed.patch b/package/binutils/2.23.2/902-xtensa-gas-ld-diff-relocation-signed.patch
deleted file mode 100644
index ba24f4e..0000000
--- a/package/binutils/2.23.2/902-xtensa-gas-ld-diff-relocation-signed.patch
+++ /dev/null
@@ -1,133 +0,0 @@
-From 6a17eba5358549d0d6d195bb22b34cdbc068def2 Mon Sep 17 00:00:00 2001
-From: Volodymyr Arbatov <arbatov@cadence.com>
-Date: Mon, 6 May 2013 09:43:21 -0800
-Subject: [PATCH] Use signed data type for R_XTENSA_DIFF* relocation offsets.
-
-R_XTENSA_DIFF relocation offsets are in fact signed. Treat them as such.
-Add testcase that examines ld behaviour on R_XTENSA_DIFF relocation
-changing sign during relaxation.
-
-2014-05-02 Volodymyr Arbatov <arbatov@cadence.com>
- David Weatherford <weath@cadence.com>
- Max Filippov <jcmvbkbc@gmail.com>
-
-bfd/
- * elf32-xtensa.c (relax_section): treat R_XTENSA_DIFF* relocations as
- signed.
-
-gas/
- * config/tc-xtensa.c (md_apply_fix): mark BFD_RELOC_XTENSA_DIFF*
- fixups as signed.
----
-Backported from: 1058c7532d0b012ac329219264ddad59049fb6e6
-Changes to Changelog files and tests are dropped.
-
- bfd/elf32-xtensa.c | 32 ++++++++++++-----------
- gas/config/tc-xtensa.c | 3 +++
- 2 files changed, 20 insertions(+), 15 deletions(-)
-
-diff --git a/bfd/elf32-xtensa.c b/bfd/elf32-xtensa.c
-index edb04b4..8818d67 100644
---- a/bfd/elf32-xtensa.c
-+++ b/bfd/elf32-xtensa.c
-@@ -222,11 +222,11 @@ static reloc_howto_type elf_howto_table[] =
- FALSE, 0, 0, FALSE),
-
- /* Relocations for supporting difference of symbols. */
-- HOWTO (R_XTENSA_DIFF8, 0, 0, 8, FALSE, 0, complain_overflow_bitfield,
-+ HOWTO (R_XTENSA_DIFF8, 0, 0, 8, FALSE, 0, complain_overflow_signed,
- bfd_elf_xtensa_reloc, "R_XTENSA_DIFF8", FALSE, 0, 0xff, FALSE),
-- HOWTO (R_XTENSA_DIFF16, 0, 1, 16, FALSE, 0, complain_overflow_bitfield,
-+ HOWTO (R_XTENSA_DIFF16, 0, 1, 16, FALSE, 0, complain_overflow_signed,
- bfd_elf_xtensa_reloc, "R_XTENSA_DIFF16", FALSE, 0, 0xffff, FALSE),
-- HOWTO (R_XTENSA_DIFF32, 0, 2, 32, FALSE, 0, complain_overflow_bitfield,
-+ HOWTO (R_XTENSA_DIFF32, 0, 2, 32, FALSE, 0, complain_overflow_signed,
- bfd_elf_xtensa_reloc, "R_XTENSA_DIFF32", FALSE, 0, 0xffffffff, FALSE),
-
- /* General immediate operand relocations. */
-@@ -9013,7 +9013,8 @@ relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info)
- || r_type == R_XTENSA_DIFF16
- || r_type == R_XTENSA_DIFF32)
- {
-- bfd_vma diff_value = 0, new_end_offset, diff_mask = 0;
-+ bfd_signed_vma diff_value = 0;
-+ bfd_vma new_end_offset, diff_mask = 0;
-
- if (bfd_get_section_limit (abfd, sec) < old_source_offset)
- {
-@@ -9027,15 +9028,15 @@ relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info)
- {
- case R_XTENSA_DIFF8:
- diff_value =
-- bfd_get_8 (abfd, &contents[old_source_offset]);
-+ bfd_get_signed_8 (abfd, &contents[old_source_offset]);
- break;
- case R_XTENSA_DIFF16:
- diff_value =
-- bfd_get_16 (abfd, &contents[old_source_offset]);
-+ bfd_get_signed_16 (abfd, &contents[old_source_offset]);
- break;
- case R_XTENSA_DIFF32:
- diff_value =
-- bfd_get_32 (abfd, &contents[old_source_offset]);
-+ bfd_get_signed_32 (abfd, &contents[old_source_offset]);
- break;
- }
-
-@@ -9047,24 +9048,25 @@ relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info)
- switch (r_type)
- {
- case R_XTENSA_DIFF8:
-- diff_mask = 0xff;
-- bfd_put_8 (abfd, diff_value,
-+ diff_mask = 0x7f;
-+ bfd_put_signed_8 (abfd, diff_value,
- &contents[old_source_offset]);
- break;
- case R_XTENSA_DIFF16:
-- diff_mask = 0xffff;
-- bfd_put_16 (abfd, diff_value,
-+ diff_mask = 0x7fff;
-+ bfd_put_signed_16 (abfd, diff_value,
- &contents[old_source_offset]);
- break;
- case R_XTENSA_DIFF32:
-- diff_mask = 0xffffffff;
-- bfd_put_32 (abfd, diff_value,
-+ diff_mask = 0x7fffffff;
-+ bfd_put_signed_32 (abfd, diff_value,
- &contents[old_source_offset]);
- break;
- }
-
-- /* Check for overflow. */
-- if ((diff_value & ~diff_mask) != 0)
-+ /* Check for overflow. Sign bits must be all zeroes or all ones */
-+ if ((diff_value & ~diff_mask) != 0 &&
-+ (diff_value & ~diff_mask) != (-1 & ~diff_mask))
- {
- (*link_info->callbacks->reloc_dangerous)
- (link_info, _("overflow after relaxation"),
-diff --git a/gas/config/tc-xtensa.c b/gas/config/tc-xtensa.c
-index 58ace38..7547c0a0 100644
---- a/gas/config/tc-xtensa.c
-+++ b/gas/config/tc-xtensa.c
-@@ -5867,12 +5867,15 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg)
- {
- case BFD_RELOC_8:
- fixP->fx_r_type = BFD_RELOC_XTENSA_DIFF8;
-+ fixP->fx_signed = 1;
- break;
- case BFD_RELOC_16:
- fixP->fx_r_type = BFD_RELOC_XTENSA_DIFF16;
-+ fixP->fx_signed = 1;
- break;
- case BFD_RELOC_32:
- fixP->fx_r_type = BFD_RELOC_XTENSA_DIFF32;
-+ fixP->fx_signed = 1;
- break;
- default:
- break;
---
-1.8.1.4
-
diff --git a/package/binutils/2.23.2/903-xtensa-fix-ld-segfault-when-linking-linux-modules.patch b/package/binutils/2.23.2/903-xtensa-fix-ld-segfault-when-linking-linux-modules.patch
deleted file mode 100644
index 6a0846e..0000000
--- a/package/binutils/2.23.2/903-xtensa-fix-ld-segfault-when-linking-linux-modules.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From e7d17e71cdc10a2e81e454ce3b9637f1b2a587f2 Mon Sep 17 00:00:00 2001
-From: Max Filippov <jcmvbkbc@gmail.com>
-Date: Thu, 10 Jul 2014 01:47:33 +0400
-Subject: [PATCH] Fix xtensa ld segfault when linking linux modules
-
-is_inconsistent_linkonce_section makes an assumption that section name
-that starts with ".gnu.linkonce.prop." has one more dot in its suffix.
-However gas generates such section name by insertion of "prop." right
-after ".gnu.linkonce." part of the name of the original section. So, for
-section named ".gnu.linkonce.this_module" corresponding property section
-name does not satisfy the assumption. Such section names are common in
-linux modules. This bug was exposed by the patch "a35d5e8 Fix alignment
-for the first section frag on xtensa", that makes gas produce property
-section for each section that has ".align" directive in it.
-
-Use suffix that immediately follows ".gnu.linkonce.prop." when there are
-no more dots following it.
-
-2014-07-10 Max Filippov <jcmvbkbc@gmail.com>
-
-ld/
- * emultempl/xtensaelf.em (is_inconsistent_linkonce_section):
- correctly handle missing dot in section name after
- ".gnu.linkonce.prop.".
----
-Backported from: e7d17e71cdc10a2e81e454ce3b9637f1b2a587f2
-Changes to ld/ChangeLog file are dropped.
-
- ld/emultempl/xtensaelf.em | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/ld/emultempl/xtensaelf.em b/ld/emultempl/xtensaelf.em
-index 151eea4..948d18d 100644
---- a/ld/emultempl/xtensaelf.em
-+++ b/ld/emultempl/xtensaelf.em
-@@ -1310,7 +1310,7 @@ is_inconsistent_linkonce_section (asection *sec)
- for Tensilica's XCC compiler. */
- name = sec_name + linkonce_len;
- if (CONST_STRNEQ (name, "prop."))
-- name = strchr (name + 5, '.') + 1;
-+ name = strchr (name + 5, '.') ? strchr (name + 5, '.') + 1 : name + 5;
- else if (name[1] == '.'
- && (name[0] == 'p' || name[0] == 'e' || name[0] == 'h'))
- name += 2;
---
-1.8.1.4
-
diff --git a/package/binutils/2.23.2/904-Fix-call8-call-target-out-of-range-xtensa-ld-relaxation.patch b/package/binutils/2.23.2/904-Fix-call8-call-target-out-of-range-xtensa-ld-relaxation.patch
deleted file mode 100644
index dba7620..0000000
--- a/package/binutils/2.23.2/904-Fix-call8-call-target-out-of-range-xtensa-ld-relaxation.patch
+++ /dev/null
@@ -1,79 +0,0 @@
-From 7fc39194f8fb48914c995f8ec3826d50086f1ec0 Mon Sep 17 00:00:00 2001
-From: Sterling Augustine <augustine.sterling@gmail.com>
-Date: Tue, 25 Jan 2011 13:59:13 -0800
-Subject: [PATCH] Fix 'call8: call target out of range' xtensa ld relaxation
- bug
-
-During link-time relaxation distance between cross-section call site and
-its target may grow, producing 'call target out of range' error for
-relaxed calls. Be more conservative when calculating whether or not a
-callx can be converted to a straight call.
-
-2014-09-23 Sterling Augustine <augustine.sterling@gmail.com>
-
-bfd/
- * elf32-xtensa.c (is_resolvable_asm_expansion): for cross-section
- call relaxation use furthermost addresses where call source and
- destination can be to check whether it's in the range of a direct
- call.
-
-Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
----
- bfd/elf32-xtensa.c | 41 +++++++++++++++++++++++++++++++++++++----
- 1 file changed, 37 insertions(+), 4 deletions(-)
-
-diff --git a/bfd/elf32-xtensa.c b/bfd/elf32-xtensa.c
-index 09862e3..e32496a 100644
---- a/bfd/elf32-xtensa.c
-+++ b/bfd/elf32-xtensa.c
-@@ -7124,10 +7124,43 @@ is_resolvable_asm_expansion (bfd *abfd,
- || is_reloc_sym_weak (abfd, irel)))
- return FALSE;
-
-- self_address = (sec->output_section->vma
-- + sec->output_offset + irel->r_offset + 3);
-- dest_address = (target_sec->output_section->vma
-- + target_sec->output_offset + target_offset);
-+ if (target_sec->output_section != sec->output_section)
-+ {
-+ /* If the two sections are sufficiently far away that relaxation
-+ might take the call out of range, we can't simplify. For
-+ example, a positive displacement call into another memory
-+ could get moved to a lower address due to literal removal,
-+ but the destination won't move, and so the displacment might
-+ get larger.
-+
-+ If the displacement is negative, assume the destination could
-+ move as far back as the start of the output section. The
-+ self_address will be at least as far into the output section
-+ as it is prior to relaxation.
-+
-+ If the displacement is postive, assume the destination will be in
-+ it's pre-relaxed location (because relaxation only makes sections
-+ smaller). The self_address could go all the way to the beginning
-+ of the output section. */
-+
-+ dest_address = target_sec->output_section->vma;
-+ self_address = sec->output_section->vma;
-+
-+ if (sec->output_section->vma > target_sec->output_section->vma)
-+ self_address += sec->output_offset + irel->r_offset + 3;
-+ else
-+ dest_address += bfd_get_section_limit (abfd, target_sec->output_section);
-+ /* Call targets should be four-byte aligned. */
-+ dest_address = (dest_address + 3) & ~3;
-+ }
-+ else
-+ {
-+
-+ self_address = (sec->output_section->vma
-+ + sec->output_offset + irel->r_offset + 3);
-+ dest_address = (target_sec->output_section->vma
-+ + target_sec->output_offset + target_offset);
-+ }
-
- *is_reachable_p = pcrel_reloc_fits (direct_call_opcode, 0,
- self_address, dest_address);
---
-1.8.1.4
-
diff --git a/package/binutils/2.23.2/905-Fix-trampolines-search-code-for-conditional-branches.patch b/package/binutils/2.23.2/905-Fix-trampolines-search-code-for-conditional-branches.patch
deleted file mode 100644
index 8aeb064..0000000
--- a/package/binutils/2.23.2/905-Fix-trampolines-search-code-for-conditional-branches.patch
+++ /dev/null
@@ -1,90 +0,0 @@
-From 415480d6471e67aef97c0241d451ef2423a1da9d Mon Sep 17 00:00:00 2001
-From: Max Filippov <jcmvbkbc@gmail.com>
-Date: Tue, 25 Nov 2014 21:33:21 +0300
-Subject: [PATCH] Fix trampolines search code for conditional branches
-
-For conditional branches that need more than one trampoline to reach its
-target assembler couldn't always find suitable trampoline because
-post-loop condition check was placed inside the loop, resulting in
-premature loop termination. Move check outside the loop.
-
-This fixes the following build errors seen when assembling huge files
-produced by gcc:
- Error: jump target out of range; no usable trampoline found
- Error: operand 1 of 'j' has out of range value '307307'
-
-2014-11-25 Max Filippov <jcmvbkbc@gmail.com>
-
-gas/
- * config/tc-xtensa.c (search_trampolines): Move post-loop
- condition check outside the search loop.
-
-gas/testsuite/
- * gas/xtensa/trampoline.d: Add expected output for branches.
- * gas/xtensa/trampoline.s: Add test case for branches.
-
-Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
----
-Backported from: d92b6eece424f0ad35d96fdd85bf207295e8c4c3
-Changes to ChangeLogs are dropped.
-
- gas/config/tc-xtensa.c | 8 ++++----
- gas/testsuite/gas/xtensa/trampoline.d | 9 +++++++++
- gas/testsuite/gas/xtensa/trampoline.s | 7 +++++++
- 3 files changed, 20 insertions(+), 4 deletions(-)
-
-diff --git a/gas/config/tc-xtensa.c b/gas/config/tc-xtensa.c
-index d11b0c7..f23ccf8 100644
---- a/gas/config/tc-xtensa.c
-+++ b/gas/config/tc-xtensa.c
-@@ -9514,11 +9514,11 @@ search_trampolines (TInsn *tinsn, fragS *fragP, bfd_boolean unreachable_only)
- if (next_addr == 0 || addr - next_addr > J_RANGE)
- break;
- }
-- if (abs (addr - this_addr) < J_RANGE)
-- return tf;
--
-- return NULL;
- }
-+ if (abs (addr - this_addr) < J_RANGE)
-+ return tf;
-+
-+ return NULL;
- }
- for ( ; tf; tf = tf->next)
- {
-diff --git a/gas/testsuite/gas/xtensa/trampoline.d b/gas/testsuite/gas/xtensa/trampoline.d
-index b4f65dc..5ae32a6 100644
---- a/gas/testsuite/gas/xtensa/trampoline.d
-+++ b/gas/testsuite/gas/xtensa/trampoline.d
-@@ -24,3 +24,12 @@
- .*33462:.*j.0x49407
- #...
- .*49407:.*j.0x49407
-+.*4940a:.*beqz.n.a2,.0x4940f
-+.*4940c:.*j.0x693d1
-+#...
-+.*693d1:.*j.0x7ddd4
-+#...
-+.*7ddd4:.*j.0x927f5
-+#...
-+.*927f5:.*j.0x927f5
-+#...
-diff --git a/gas/testsuite/gas/xtensa/trampoline.s b/gas/testsuite/gas/xtensa/trampoline.s
-index 259a3bb..4465786 100644
---- a/gas/testsuite/gas/xtensa/trampoline.s
-+++ b/gas/testsuite/gas/xtensa/trampoline.s
-@@ -19,3 +19,10 @@
- .endr
- 3:
- j 3b
-+ bnez a2, 4f
-+ .rep 50000
-+ and a2, a2, a3
-+ _ret
-+ .endr
-+4:
-+ j 4b
---
-1.8.1.4
-
diff --git a/package/binutils/2.23.2/911-xtensa-fix-localized-symbol-refcounting-with-gc-sect.patch b/package/binutils/2.23.2/911-xtensa-fix-localized-symbol-refcounting-with-gc-sect.patch
deleted file mode 100644
index 9ad6b3b..0000000
--- a/package/binutils/2.23.2/911-xtensa-fix-localized-symbol-refcounting-with-gc-sect.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-From 8ec76b16f62d1bf386fb2c39af5f66c3afddc5cb Mon Sep 17 00:00:00 2001
-From: Max Filippov <jcmvbkbc@gmail.com>
-Date: Thu, 14 May 2015 05:22:55 +0300
-Subject: [PATCH] xtensa: fix localized symbol refcounting with --gc-sections
-
-elf_xtensa_gc_sweep_hook doesn't correctly unreference symbols that were
-made local, that results in link failure with the following message:
-
- BFD (GNU Binutils) 2.24 internal error, aborting at elf32-xtensa.c line
- 3372 in elf_xtensa_finish_dynamic_sections
-
-elf_xtensa_gc_sweep_hook determines symbol reference type (PLT or GOT) by
-relocation type. Relocation types are not changed when symbol becomes
-local, but its PLT references are added to GOT references and
-plt.refcount is set to 0. Such symbol cannot be unreferences in the
-elf_xtensa_gc_sweep_hook and its extra references make calculated GOT
-relocations section size not match number of GOT relocations.
-
-Fix it by treating PLT reference as GOT reference when plt.refcount is
-not positive.
-
-2015-05-14 Max Filippov <jcmvbkbc@gmail.com>
-bfd/
- * elf32-xtensa.c (elf_xtensa_gc_sweep_hook): Treat PLT reference
- as GOT reference when plt.refcount is not positive.
-
-Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
----
-Backported from: e6c9a083ec5ae7a45bd71682b26aae1939849388
-Changes to ChangeLog are dropped.
-
- bfd/elf32-xtensa.c | 6 +++++-
- 1 file changed, 5 insertions(+), 1 deletion(-)
-
-diff --git a/bfd/elf32-xtensa.c b/bfd/elf32-xtensa.c
-index 53af1c6..2523670 100644
---- a/bfd/elf32-xtensa.c
-+++ b/bfd/elf32-xtensa.c
-@@ -1360,10 +1360,14 @@ elf_xtensa_gc_sweep_hook (bfd *abfd,
- {
- if (is_plt)
- {
-+ /* If the symbol has been localized its plt.refcount got moved
-+ to got.refcount. Handle it as GOT. */
- if (h->plt.refcount > 0)
- h->plt.refcount--;
-+ else
-+ is_got = TRUE;
- }
-- else if (is_got)
-+ if (is_got)
- {
- if (h->got.refcount > 0)
- h->got.refcount--;
---
-1.8.1.4
-
diff --git a/package/binutils/2.23.2/912-xtensa-fix-gas-segfault-with-text-section-literals.patch b/package/binutils/2.23.2/912-xtensa-fix-gas-segfault-with-text-section-literals.patch
deleted file mode 100644
index 4a3de2c..0000000
--- a/package/binutils/2.23.2/912-xtensa-fix-gas-segfault-with-text-section-literals.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From 2d0522e76e4afeeb2e104e0a4332d94fa0d2fbf6 Mon Sep 17 00:00:00 2001
-From: Max Filippov <jcmvbkbc@gmail.com>
-Date: Sun, 17 May 2015 06:46:15 +0300
-Subject: [PATCH] xtensa: fix gas segfault with --text-section-literals
-
-When --text-section-literals is used and code in the .init or .fini
-emits literal in the absence of .literal_position, xtensa_move_literals
-segfaults.
-
-Check that search_frag is non-NULL in the xtensa_move_literals and
-report error otherwise.
-
-2015-05-26 Max Filippov <jcmvbkbc@gmail.com>
-gas/
- * config/tc-xtensa.c (xtensa_move_literals): Check that
- search_frag is non-NULL. Report error if literal frag is not
- found.
-
-Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
----
-Backported from: 4de0562a4c69fef4952aa7e19d7bda359f02e8b4
-Changes to ChangeLog are dropped.
-
- gas/config/tc-xtensa.c | 10 +++++++++-
- 1 file changed, 9 insertions(+), 1 deletion(-)
-
-diff --git a/gas/config/tc-xtensa.c b/gas/config/tc-xtensa.c
-index 31c0b6b..18307c1 100644
---- a/gas/config/tc-xtensa.c
-+++ b/gas/config/tc-xtensa.c
-@@ -10808,13 +10808,21 @@ xtensa_move_literals (void)
- frchain_to = NULL;
- frag_splice = &(frchain_from->frch_root);
-
-- while (!search_frag->tc_frag_data.literal_frag)
-+ while (search_frag && !search_frag->tc_frag_data.literal_frag)
- {
- gas_assert (search_frag->fr_fix == 0
- || search_frag->fr_type == rs_align);
- search_frag = search_frag->fr_next;
- }
-
-+ if (!search_frag)
-+ {
-+ search_frag = frchain_from->frch_root;
-+ as_bad_where (search_frag->fr_file, search_frag->fr_line,
-+ _("literal pool location required for text-section-literals; specify with .literal_position"));
-+ continue;
-+ }
-+
- gas_assert (search_frag->tc_frag_data.literal_frag->fr_subtype
- == RELAX_LITERAL_POOL_BEGIN);
- xtensa_switch_section_emit_state (&state, segment->seg, 0);
---
-1.8.1.4
-
diff --git a/package/binutils/2.23.2/914-xtensa-fix-signedness-of-gas-relocations.patch b/package/binutils/2.23.2/914-xtensa-fix-signedness-of-gas-relocations.patch
deleted file mode 100644
index 2955e11..0000000
--- a/package/binutils/2.23.2/914-xtensa-fix-signedness-of-gas-relocations.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From 6c7c5c477ef9ccf2d2548cf2ac3cec9bd3c9c5b6 Mon Sep 17 00:00:00 2001
-From: Max Filippov <jcmvbkbc@gmail.com>
-Date: Tue, 2 Feb 2016 17:11:38 +0300
-Subject: [PATCH] xtensa: fix signedness of gas relocations
-
-Change 1058c7532d0b "Use signed data type for R_XTENSA_DIFF* relocation
-offsets." changed signedness of BFD_RELOC_XTENSA_DIFF* relocations
-substituted for BFD_RELOC_*. This made it impossible to encode arbitrary
-8-, 16- and 32-bit values, which broke e.g. debug info encoding by .loc
-directive. Revert this part and add test.
-
-gas/
-2016-02-03 Max Filippov <jcmvbkbc@gmail.com>
- * config/tc-xtensa.c (md_apply_fix): Mark BFD_RELOC_XTENSA_DIFF*
- substitutions for BFD_RELOC_* as unsigned.
-
-Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
----
- gas/config/tc-xtensa.c | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/gas/config/tc-xtensa.c b/gas/config/tc-xtensa.c
-index a119871..36a06cc 100644
---- a/gas/config/tc-xtensa.c
-+++ b/gas/config/tc-xtensa.c
-@@ -5961,15 +5961,15 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg)
- {
- case BFD_RELOC_8:
- fixP->fx_r_type = BFD_RELOC_XTENSA_DIFF8;
-- fixP->fx_signed = 1;
-+ fixP->fx_signed = 0;
- break;
- case BFD_RELOC_16:
- fixP->fx_r_type = BFD_RELOC_XTENSA_DIFF16;
-- fixP->fx_signed = 1;
-+ fixP->fx_signed = 0;
- break;
- case BFD_RELOC_32:
- fixP->fx_r_type = BFD_RELOC_XTENSA_DIFF32;
-- fixP->fx_signed = 1;
-+ fixP->fx_signed = 0;
- break;
- default:
- break;
---
-2.1.4
-
diff --git a/package/binutils/2.23.2/915-xtensa-fix-.init-.fini-literals-moving.patch b/package/binutils/2.23.2/915-xtensa-fix-.init-.fini-literals-moving.patch
deleted file mode 100644
index 4bdd8a0..0000000
--- a/package/binutils/2.23.2/915-xtensa-fix-.init-.fini-literals-moving.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-From 7db2accc3fdea0aaa0c3a76a413d8e8030e022c3 Mon Sep 17 00:00:00 2001
-From: Max Filippov <jcmvbkbc@gmail.com>
-Date: Tue, 16 Feb 2016 02:23:28 +0300
-Subject: [PATCH] xtensa: fix .init/.fini literals moving
-
-Despite the documentation and the comment in xtensa_move_literals, in
-the presence of --text-section-literals and --auto-litpools literals are
-moved from the separate literal sections into .init and .fini, because
-the check in the xtensa_move_literals is incorrect.
-
-This moving was broken with introduction of auto litpools: some literals
-now may be lost. This happens because literal frags emitted from .init
-and .fini are not closed when new .literal_position marks new literal
-pool. Then frag_align(2, 0, 0) changes type of the last literal frag to
-rs_align. rs_align frags are skipped in the xtensa_move_literals. As a
-result fixups against such literals are not moved out of .init.literal/
-.fini.literal sections producing the following assembler error:
-
- test.S: Warning: fixes not all moved from .init.literal
- test.S: Internal error!
-
-Fix check for .init.literal/.fini.literal in the xtensa_move_literals
-and don't let it move literals from there in the presence of
---text-section-literals or --auto-litpools.
-
-2016-02-17 Max Filippov <jcmvbkbc@gmail.com>
-gas/
- * config/tc-xtensa.c (xtensa_move_literals): Fix check for
- .init.literal/.fini.literal section name.
-
-Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
----
-Backported from: 4111950f363221c4641dc2f33bea61cc94f34906
-
- gas/config/tc-xtensa.c | 12 ++++++++++--
- 1 file changed, 19 insertions(+), 2 deletions(-)
-
-diff --git a/gas/config/tc-xtensa.c b/gas/config/tc-xtensa.c
-index 36a06cc..5773634 100644
---- a/gas/config/tc-xtensa.c
-+++ b/gas/config/tc-xtensa.c
-@@ -10625,5 +10625,9 @@ xtensa_move_literals (void)
- fixS *fix, *next_fix, **fix_splice;
- sym_list *lit;
-+ const char *init_name = INIT_SECTION_NAME;
-+ const char *fini_name = FINI_SECTION_NAME;
-+ int init_name_len = strlen(init_name);
-+ int fini_name_len = strlen(fini_name);
-
- mark_literal_frags (literal_head->next);
-
-@@ -10632,9 +10636,13 @@ xtensa_move_literals (void)
-
- for (segment = literal_head->next; segment; segment = segment->next)
- {
-+ const char *seg_name = segment_name (segment->seg);
-+
- /* Keep the literals for .init and .fini in separate sections. */
-- if (!strcmp (segment_name (segment->seg), INIT_SECTION_NAME)
-- || !strcmp (segment_name (segment->seg), FINI_SECTION_NAME))
-+ if ((!memcmp (seg_name, init_name, init_name_len) &&
-+ !strcmp (seg_name + init_name_len, ".literal")) ||
-+ (!memcmp (seg_name, fini_name, fini_name_len) &&
-+ !strcmp (seg_name + fini_name_len, ".literal")))
- continue;
-
- frchain_from = seg_info (segment->seg)->frchainP;
---
-2.1.4
-
diff --git a/package/binutils/Config.in.host b/package/binutils/Config.in.host
index 6c72fa3..33159ca 100644
--- a/package/binutils/Config.in.host
+++ b/package/binutils/Config.in.host
@@ -7,15 +7,6 @@ choice
help
Select the version of binutils you wish to use.
- config BR2_BINUTILS_VERSION_2_23_X
- depends on !BR2_aarch64 && !BR2_microblaze && \
- !BR2_powerpc64le && !BR2_nios2
- # Unsupported for MIPS R6
- depends on !BR2_mips_32r6 && !BR2_mips_64r6
- # Unsupported ARM cores
- depends on !BR2_cortex_a17
- bool "binutils 2.23.2"
-
config BR2_BINUTILS_VERSION_2_24_X
# supported, but broken on Nios-II and powerpc64le
depends on !BR2_nios2 && !BR2_powerpc64le
@@ -36,7 +27,6 @@ endchoice
config BR2_BINUTILS_VERSION
string
default "arc-2016.03-rc2" if BR2_arc
- default "2.23.2" if BR2_BINUTILS_VERSION_2_23_X
default "2.24" if BR2_BINUTILS_VERSION_2_24_X
default "2.25.1" if BR2_BINUTILS_VERSION_2_25_X
default "2.26" if BR2_BINUTILS_VERSION_2_26_X
diff --git a/package/binutils/binutils.hash b/package/binutils/binutils.hash
index 15e7f19..7e77b6b 100644
--- a/package/binutils/binutils.hash
+++ b/package/binutils/binutils.hash
@@ -1,5 +1,4 @@
# From ftp://gcc.gnu.org/pub/binutils/releases/sha512.sum
-sha512 dec753bbba008f1526b89cf1bd85feba78f362f5333ffdf93953fd131eb755976dec82a0a4ba38c43d2434da007137780cfe674de5414be5cf7ce7fbc6af6d16 binutils-2.23.2.tar.bz2
sha512 5ec95ad47d49b12c4558a8db0ca2109d3ee1955e3776057f3330c4506f8f4d1cf5e505fbf8a16b98403a0fcdeaaf986fe0a22be6456247dbdace63ce1f776b12 binutils-2.24.tar.bz2
sha512 0b36dda0e6d32cd25613c0e64b56b28312515c54d6a159efd3db9a86717f114ab0a0a1f69d08975084d55713ebaeab64e4085c9b3d1c3fa86712869f80eb954d binutils-2.25.1.tar.bz2
sha512 e77e1b8dbbcbaf9ac2fae95c4403615808af3be03b2e1d32448cd3a7d32c43273f8bcace3f2de84ec120a982879295673029da306e2885dbf5f990584932cfc7 binutils-2.26.tar.bz2
--
2.7.4
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [Buildroot] [PATCH 9/9] toolchain: musl support is no longer experimental
2016-05-16 22:12 [Buildroot] [PATCH 0/9] Various toolchain related fixes/updates Thomas Petazzoni
` (7 preceding siblings ...)
2016-05-16 22:13 ` [Buildroot] [PATCH 8/9] binutils: remove support for version 2.23 Thomas Petazzoni
@ 2016-05-16 22:13 ` Thomas Petazzoni
2016-05-17 6:53 ` Peter Korsgaard
8 siblings, 1 reply; 22+ messages in thread
From: Thomas Petazzoni @ 2016-05-16 22:13 UTC (permalink / raw)
To: buildroot
Our musl support has now been around for quite some time, numerous
packages have been fixed (although admittedly not all). It's time to no
longer call our musl support "experimental": things are now expected to
be working with musl just like with the other two C libraries we
support.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
toolchain/toolchain-buildroot/Config.in | 2 +-
toolchain/toolchain-external/Config.in | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/toolchain/toolchain-buildroot/Config.in b/toolchain/toolchain-buildroot/Config.in
index b046a61..2b0ebc1 100644
--- a/toolchain/toolchain-buildroot/Config.in
+++ b/toolchain/toolchain-buildroot/Config.in
@@ -67,7 +67,7 @@ comment "(e)glibc only available with shared lib support"
depends on BR2_STATIC_LIBS
config BR2_TOOLCHAIN_BUILDROOT_MUSL
- bool "musl (experimental)"
+ bool "musl"
depends on BR2_aarch64 || BR2_arm || BR2_armeb || BR2_i386 || \
BR2_microblaze || BR2_mips || BR2_mipsel || BR2_powerpc || \
BR2_sh || BR2_x86_64
diff --git a/toolchain/toolchain-external/Config.in b/toolchain/toolchain-external/Config.in
index a037d67..0ba5d46 100644
--- a/toolchain/toolchain-external/Config.in
+++ b/toolchain/toolchain-external/Config.in
@@ -562,7 +562,7 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64
3.16.2.
config BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS
- bool "Musl 1.1.12 toolchain (experimental)"
+ bool "Musl 1.1.12 toolchain"
depends on (BR2_arm && BR2_ARM_EABI) || \
(BR2_arm && BR2_ARM_EABIHF && !BR2_ARM_CPU_ARMV4) || \
(BR2_armeb && BR2_ARM_EABI) || BR2_i386 || \
@@ -914,7 +914,7 @@ comment "(e)glibc only available with shared lib support"
depends on BR2_STATIC_LIBS
config BR2_TOOLCHAIN_EXTERNAL_CUSTOM_MUSL
- bool "musl (experimental)"
+ bool "musl"
select BR2_TOOLCHAIN_EXTERNAL_MUSL
help
Select this option if your external toolchain uses the
--
2.7.4
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [Buildroot] [PATCH 1/9] gcc: fix build of gcc 6.x on Microblaze
2016-05-16 22:12 ` [Buildroot] [PATCH 1/9] gcc: fix build of gcc 6.x on Microblaze Thomas Petazzoni
@ 2016-05-17 6:43 ` Peter Korsgaard
0 siblings, 0 replies; 22+ messages in thread
From: Peter Korsgaard @ 2016-05-17 6:43 UTC (permalink / raw)
To: buildroot
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:
> Due to patch 840-microblaze-enable-dwarf-eh-support.patch, gcc 6.x
> does not build:
> ../../gcc/config/microblaze/microblaze.c: In function 'void microblaze_expand_epilogue()':
> ../../gcc/config/microblaze/microblaze.c:3046: error: 'gen_rtx_raw_REG' was not declared in this scope
> This patch was originally added to gcc 4.9 to make it capable of
> building glibc. However, this is no longer needed with gcc 6.x, which
> builds glibc just fine.
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Committed, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Buildroot] [PATCH 2/9] glibc: disable build of glibc 2.22 with gcc 6.x
2016-05-16 22:12 ` [Buildroot] [PATCH 2/9] glibc: disable build of glibc 2.22 with gcc 6.x Thomas Petazzoni
@ 2016-05-17 6:44 ` Peter Korsgaard
0 siblings, 0 replies; 22+ messages in thread
From: Peter Korsgaard @ 2016-05-17 6:44 UTC (permalink / raw)
To: buildroot
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:
> glibc-2.22 does not build with gcc 6.x. The first issues can be fixed
> by:
> - Using the same 0004-gcc6.patch as we're using with glibc 2.23 since
> Buildroot commit ab8de336eb39ae1cb019a72be65bd0504c86e527.
> - Backport glibc commit 5542236837c5c41435f8282ec92799f480c36f18 to fix
> strchr() build failure.
> But then, there are some more failures caused by the fact that numerous
> glibc files were not using modern prototypes in the function
> definitions, causing build failures such as:
> ../sysdeps/unix/sysv/linux/dl-openat64.c:26:1: error: 'openat64' defined as variadic function without prototype [-Werror]
> openat64 (dfd, file, oflag)
> ^~~~~~~~
> In file included from ../include/fcntl.h:2:0,
> from ../sysdeps/unix/sysv/linux/dl-openat64.c:21:
> ../io/fcntl.h:214:12: note: previous declaration of 'openat64' was here
> extern int openat64 (int __fd, const char *__file, int __oflag, ...)
> ^~~~~~~~
> This could be fixed by backporting glibc commit
> 9dd346ff431fc761f1b748bd4da8bb59f7652094, but this is a large commit,
> touching a significant number of files. We probably don't want to take
> this path, and instead making glibc 2.22 as not available with gcc 6.x
> seems like the right course of action.
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Committed, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Buildroot] [PATCH 3/9] gdb: add support for gdb 7.11
2016-05-16 22:12 ` [Buildroot] [PATCH 3/9] gdb: add support for gdb 7.11 Thomas Petazzoni
@ 2016-05-17 6:45 ` Peter Korsgaard
0 siblings, 0 replies; 22+ messages in thread
From: Peter Korsgaard @ 2016-05-17 6:45 UTC (permalink / raw)
To: buildroot
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:
> gdb 7.11 was released on February 2016, it's time to include it in
> Buildroot, which this commit does.
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Committed to next, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Buildroot] [PATCH 4/9] gdb: switch to 7.10 as the default version
2016-05-16 22:12 ` [Buildroot] [PATCH 4/9] gdb: switch to 7.10 as the default version Thomas Petazzoni
@ 2016-05-17 6:45 ` Peter Korsgaard
0 siblings, 0 replies; 22+ messages in thread
From: Peter Korsgaard @ 2016-05-17 6:45 UTC (permalink / raw)
To: buildroot
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:
> 7.11 is around, 7.10 has already seen a point release, so it's time to
> make 7.10 the default version for gdb.
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Committed to next, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Buildroot] [PATCH 5/9] gdb: remove version 7.8
2016-05-16 22:12 ` [Buildroot] [PATCH 5/9] gdb: remove version 7.8 Thomas Petazzoni
@ 2016-05-17 6:46 ` Peter Korsgaard
0 siblings, 0 replies; 22+ messages in thread
From: Peter Korsgaard @ 2016-05-17 6:46 UTC (permalink / raw)
To: buildroot
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:
> Now that 7.11 has been added and 7.10 is the default version, let's
> remove the old 7.8 release.
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Committed to next, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Buildroot] [PATCH 6/9] gdb: specify hashes for the ARC and Microblaze versions
2016-05-16 22:12 ` [Buildroot] [PATCH 6/9] gdb: specify hashes for the ARC and Microblaze versions Thomas Petazzoni
@ 2016-05-17 6:48 ` Peter Korsgaard
0 siblings, 0 replies; 22+ messages in thread
From: Peter Korsgaard @ 2016-05-17 6:48 UTC (permalink / raw)
To: buildroot
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:
> On ARC and Microblaze, a special GDB version is used, fetched from
> Github in both cases. Now that we consider Github generated tarballs
> to be stable, we can specify hashes for those versions, rather than
> using the special "none" hash to skip the hash check.
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Committed to next, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Buildroot] [PATCH 7/9] toolchain: remove eglibc support
2016-05-16 22:13 ` [Buildroot] [PATCH 7/9] toolchain: remove eglibc support Thomas Petazzoni
@ 2016-05-17 6:50 ` Peter Korsgaard
2016-05-17 7:17 ` Thomas Petazzoni
2016-05-17 22:28 ` Arnout Vandecappelle
1 sibling, 1 reply; 22+ messages in thread
From: Peter Korsgaard @ 2016-05-17 6:50 UTC (permalink / raw)
To: buildroot
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:
> The eglibc support has been marked deprecated since 2015.08, so it's
> time to remove it.
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> ---
> Config.in.legacy | 8 +
> package/gcc/Config.in.host | 2 +-
> .../2.18-svnr23787/0001-CVE-2014-7817-eglibc.patch | 174 ---------------------
> .../glibc/2.18-svnr23787/0002-accept-make4.patch | 33 ----
> .../glibc/2.18-svnr23787/0003-CVE-2014-6040.patch | 141 -----------------
> .../glibc/2.18-svnr23787/0004-CVE-2014-9402.patch | 20 ---
> .../glibc/2.18-svnr23787/0005-CVE-2015-1472.patch | 88 -----------
> .../2.19-svnr25243/0001-CVE-2014-7817-eglibc.patch | 174 ---------------------
> .../glibc/2.19-svnr25243/0002-CVE-2014-6040.patch | 141 -----------------
> .../glibc/2.19-svnr25243/0003-CVE-2014-9402.patch | 20 ---
> .../glibc/2.19-svnr25243/0004-CVE-2015-1472.patch | 88 -----------
> package/glibc/Config.in | 27 ----
> package/glibc/glibc.mk | 7 -
> toolchain/toolchain-buildroot/Config.in | 23 ---
> 14 files changed, 9 insertions(+), 937 deletions(-)
> delete mode 100644 package/glibc/2.18-svnr23787/0001-CVE-2014-7817-eglibc.patch
> delete mode 100644 package/glibc/2.18-svnr23787/0002-accept-make4.patch
> delete mode 100644 package/glibc/2.18-svnr23787/0003-CVE-2014-6040.patch
> delete mode 100644 package/glibc/2.18-svnr23787/0004-CVE-2014-9402.patch
> delete mode 100644 package/glibc/2.18-svnr23787/0005-CVE-2015-1472.patch
> delete mode 100644 package/glibc/2.19-svnr25243/0001-CVE-2014-7817-eglibc.patch
> delete mode 100644 package/glibc/2.19-svnr25243/0002-CVE-2014-6040.patch
> delete mode 100644 package/glibc/2.19-svnr25243/0003-CVE-2014-9402.patch
> delete mode 100644 package/glibc/2.19-svnr25243/0004-CVE-2015-1472.patch
> diff --git a/Config.in.legacy b/Config.in.legacy
> index ff11d75..7b76f28 100644
> --- a/Config.in.legacy
> +++ b/Config.in.legacy
> @@ -145,6 +145,14 @@ endif
> ###############################################################################
> comment "Legacy options removed in 2016.08"
> +config BR2_TOOLCHAIN_BUILDROOT_EGLIBC
> + bool "eglibc support has been removed"
> + select BR2_LEGACY
> + help
> + The eglibc project no longer exists, as it has been merged
> + back into the glibc project. Therefore, support for eglibc
> + has been removed, and glibc should be used instead.
Committed to next, thanks. Perhaps we should add:
select BR2_TOOLCHAIN_BUILDROOT_GLIBC
As the defconfig otherwise falls back to uClibc.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Buildroot] [PATCH 8/9] binutils: remove support for version 2.23
2016-05-16 22:13 ` [Buildroot] [PATCH 8/9] binutils: remove support for version 2.23 Thomas Petazzoni
@ 2016-05-17 6:53 ` Peter Korsgaard
0 siblings, 0 replies; 22+ messages in thread
From: Peter Korsgaard @ 2016-05-17 6:53 UTC (permalink / raw)
To: buildroot
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:
> Now that we have added support for the lastest binutils version 2.26,
> it is time to remove the oldest version we currently support, 2.23, in
> order to keep only 3 versions: 2.24, 2.25 and 2.26.
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> ---
> Changes since v2:
> - As suggested by Arnout, fix the previously existing
> BR2_BINUTILS_VERSION_2_23_2 legacy option to make it not select
> BR2_BINUTILS_VERSION_2_23_X, which is also a legacy option now, and
> update its help text.
> Changes since v1:
> - Remove hash from the hash file, as noticed by Romain Naour.
> - Add Config.in.legacy entry, as noticed by Romain Naour.
Committed to next, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Buildroot] [PATCH 9/9] toolchain: musl support is no longer experimental
2016-05-16 22:13 ` [Buildroot] [PATCH 9/9] toolchain: musl support is no longer experimental Thomas Petazzoni
@ 2016-05-17 6:53 ` Peter Korsgaard
0 siblings, 0 replies; 22+ messages in thread
From: Peter Korsgaard @ 2016-05-17 6:53 UTC (permalink / raw)
To: buildroot
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:
> Our musl support has now been around for quite some time, numerous
> packages have been fixed (although admittedly not all). It's time to no
> longer call our musl support "experimental": things are now expected to
> be working with musl just like with the other two C libraries we
> support.
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Committed to next, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Buildroot] [PATCH 7/9] toolchain: remove eglibc support
2016-05-17 6:50 ` Peter Korsgaard
@ 2016-05-17 7:17 ` Thomas Petazzoni
0 siblings, 0 replies; 22+ messages in thread
From: Thomas Petazzoni @ 2016-05-17 7:17 UTC (permalink / raw)
To: buildroot
Hello,
On Tue, 17 May 2016 08:50:51 +0200, Peter Korsgaard wrote:
> Committed to next, thanks. Perhaps we should add:
>
> select BR2_TOOLCHAIN_BUILDROOT_GLIBC
>
> As the defconfig otherwise falls back to uClibc.
Good idea. I just sent a patch doing this.
Thanks,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Buildroot] [PATCH 7/9] toolchain: remove eglibc support
2016-05-16 22:13 ` [Buildroot] [PATCH 7/9] toolchain: remove eglibc support Thomas Petazzoni
2016-05-17 6:50 ` Peter Korsgaard
@ 2016-05-17 22:28 ` Arnout Vandecappelle
2016-05-18 12:27 ` Thomas Petazzoni
1 sibling, 1 reply; 22+ messages in thread
From: Arnout Vandecappelle @ 2016-05-17 22:28 UTC (permalink / raw)
To: buildroot
On 05/17/16 00:13, Thomas Petazzoni wrote:
> The eglibc support has been marked deprecated since 2015.08, so it's
> time to remove it.
>
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
It's probably a good idea to do a "sed 's/(e)glibc/glibc/' as well. Even
though we still have Linaro and possibly custom external toolchains with eglibc,
I don't think it makes much sense anymore to make that distinction explicit.
The glibc.hash file wasn't updated.
There are also still some references to eglibc in the manual, these should
probably be removed.
Regards,
Arnout
--
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286500
Essensium/Mind http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Buildroot] [PATCH 7/9] toolchain: remove eglibc support
2016-05-17 22:28 ` Arnout Vandecappelle
@ 2016-05-18 12:27 ` Thomas Petazzoni
0 siblings, 0 replies; 22+ messages in thread
From: Thomas Petazzoni @ 2016-05-18 12:27 UTC (permalink / raw)
To: buildroot
Hello,
On Wed, 18 May 2016 00:28:07 +0200, Arnout Vandecappelle wrote:
> It's probably a good idea to do a "sed 's/(e)glibc/glibc/' as well. Even
> though we still have Linaro and possibly custom external toolchains with eglibc,
> I don't think it makes much sense anymore to make that distinction explicit.
Yes, I thought about this yesterday as well.
> The glibc.hash file wasn't updated.
>
> There are also still some references to eglibc in the manual, these should
> probably be removed.
Good points, I'll send some patches to address those issues soonish.
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 22+ messages in thread
end of thread, other threads:[~2016-05-18 12:27 UTC | newest]
Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-16 22:12 [Buildroot] [PATCH 0/9] Various toolchain related fixes/updates Thomas Petazzoni
2016-05-16 22:12 ` [Buildroot] [PATCH 1/9] gcc: fix build of gcc 6.x on Microblaze Thomas Petazzoni
2016-05-17 6:43 ` Peter Korsgaard
2016-05-16 22:12 ` [Buildroot] [PATCH 2/9] glibc: disable build of glibc 2.22 with gcc 6.x Thomas Petazzoni
2016-05-17 6:44 ` Peter Korsgaard
2016-05-16 22:12 ` [Buildroot] [PATCH 3/9] gdb: add support for gdb 7.11 Thomas Petazzoni
2016-05-17 6:45 ` Peter Korsgaard
2016-05-16 22:12 ` [Buildroot] [PATCH 4/9] gdb: switch to 7.10 as the default version Thomas Petazzoni
2016-05-17 6:45 ` Peter Korsgaard
2016-05-16 22:12 ` [Buildroot] [PATCH 5/9] gdb: remove version 7.8 Thomas Petazzoni
2016-05-17 6:46 ` Peter Korsgaard
2016-05-16 22:12 ` [Buildroot] [PATCH 6/9] gdb: specify hashes for the ARC and Microblaze versions Thomas Petazzoni
2016-05-17 6:48 ` Peter Korsgaard
2016-05-16 22:13 ` [Buildroot] [PATCH 7/9] toolchain: remove eglibc support Thomas Petazzoni
2016-05-17 6:50 ` Peter Korsgaard
2016-05-17 7:17 ` Thomas Petazzoni
2016-05-17 22:28 ` Arnout Vandecappelle
2016-05-18 12:27 ` Thomas Petazzoni
2016-05-16 22:13 ` [Buildroot] [PATCH 8/9] binutils: remove support for version 2.23 Thomas Petazzoni
2016-05-17 6:53 ` Peter Korsgaard
2016-05-16 22:13 ` [Buildroot] [PATCH 9/9] toolchain: musl support is no longer experimental Thomas Petazzoni
2016-05-17 6:53 ` Peter Korsgaard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox