tool_chain: update GCC to version 4.9.2

Fixes #1520
This commit is contained in:
Christian Prochaska 2015-05-13 12:33:21 +02:00 committed by Christian Helmuth
parent 7709059245
commit 72e31090ee
23 changed files with 61 additions and 166 deletions

View File

@ -50,6 +50,7 @@ REDEF_SYMBOLS = $(foreach S, $(EH_SYMBOLS), --redefine-sym $(S)=_cxx_$(S) --rede
#
KEEP_SYMBOLS += __cxa_guard_acquire
KEEP_SYMBOLS += __dynamic_cast
KEEP_SYMBOLS += __cxa_throw_bad_array_new_length
KEEP_SYMBOLS += _ZTVN10__cxxabiv116__enum_type_infoE
KEEP_SYMBOLS += _ZN10__cxxabiv121__vmi_class_type_infoD0Ev
KEEP_SYMBOLS += _ZTVN10__cxxabiv119__pointer_type_infoE

View File

@ -1261,7 +1261,7 @@ namespace std
/* Define if C99 types in <stdint.h> should be imported in <tr1/cstdint> in
namespace std::tr1. */
#define _GLIBCXX_USE_C99_STDINT_TR1 1
/* #undef GLIBCXX_USE_C99_STDINT_TR1 */
/* Defined if clock_gettime has monotonic clock support. */
/* #undef _GLIBCXX_USE_CLOCK_MONOTONIC */

View File

@ -1,6 +1,6 @@
/* Threads compatibility routines for libgcc2 and libobjc. */
/* Compile this one with gcc. */
/* Copyright (C) 1997-2013 Free Software Foundation, Inc.
/* Copyright (C) 1997-2014 Free Software Foundation, Inc.
This file is part of GCC.

View File

@ -19,3 +19,8 @@ CC_OPT += -D_GLIBCXX_HAVE_MBSTATE_T
# use compiler-builtin atomic operations
CC_OPT += -D_GLIBCXX_ATOMIC_BUILTINS_4
# GCC's stddef.h defines the 'max_align_t' type, which is used in the 'cstddef'
# C++ header file. libc's version of stddef.h shadows GCC's version, so it is
# included explicitly here.
CC_OPT += -include $(LIBGCC_INC_DIR)/stddef.h

View File

@ -37,7 +37,7 @@ INC_DIR += $(STDCXX_DIR)/config/io
# add bits of libsupc++ (most parts are already contained in the cxx library)
SRC_CC += new_op.cc new_opnt.cc new_opv.cc new_opvnt.cc new_handler.cc
SRC_CC += del_op.cc del_opnt.cc del_opv.cc del_opvnt.cc
SRC_CC += bad_cast.cc bad_alloc.cc bad_typeid.cc
SRC_CC += bad_array_length.cc bad_array_new.cc bad_cast.cc bad_alloc.cc bad_typeid.cc
SRC_CC += eh_aux_runtime.cc hash_bytes.cc
SRC_CC += tinfo.cc
INC_DIR += $(STDCXX_DIR)/libsupc++

View File

@ -1 +1 @@
e84c87de80e973ef43e93d8da733585461be4bc8
b39cfa69b3aa8f3a5f2d27b4249fbf15d402e1e4

View File

@ -1,9 +1,9 @@
LICENSE := LGPL
VERSION := 4.8.4
VERSION := 4.9.2
DOWNLOADS := gcc.archive
URL(gcc) := ftp://ftp.fu-berlin.de/gnu/gcc/gcc-$(VERSION)/gcc-$(VERSION).tar.bz2
SHA(gcc) := 40867a9ac74a054b1cee855988fd680cabf42006
SHA(gcc) := 79dbcb09f44232822460d80b033c962c0237c6d8
DIR(gcc) := src/lib/stdcxx
SIG(gcc) := ${URL(gcc)}
KEY(gcc) := GNU

View File

@ -1 +1 @@
2194bf9e9cc57f15d820e3d4a1388af3cfe49449
d8e669f3851e670797a51ac07100977bdd285b17

View File

@ -1,9 +1,9 @@
LICENSE := GPLv3
VERSION := 4.8.4
VERSION := 4.9.2
DOWNLOADS := gcc.archive
URL(gcc) := ftp://ftp.fu-berlin.de/gnu/gcc/gcc-$(VERSION)/gcc-$(VERSION).tar.bz2
SHA(gcc) := 40867a9ac74a054b1cee855988fd680cabf42006
SHA(gcc) := 79dbcb09f44232822460d80b033c962c0237c6d8
SIG(gcc) := ${URL(gcc)}.sig
KEY(gcc) := GNU
DIR(gcc) := src/noux-pkg/gcc

View File

@ -1,12 +1,21 @@
arm.patch
From: Christian Prochaska <christian.prochaska@genode-labs.com>
---
gcc/config/arm/arm.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/gcc/config/arm/arm.h b/gcc/config/arm/arm.h
index c60d9a4..fefa7d4 100644
--- a/gcc/config/arm/arm.h
+++ b/gcc/config/arm/arm.h
@@ -2193,9 +2193,7 @@
/* -mcpu=native handling only makes sense with compiler running on
an ARM chip. */
@@ -2381,7 +2381,6 @@ extern const char *arm_rewrite_mcpu (int argc, const char **argv);
#if defined(__arm__)
-extern const char *host_detect_local_cpu (int argc, const char **argv);
-# define EXTRA_SPEC_FUNCTIONS \
- { "local_cpu_detect", host_detect_local_cpu },
+# define EXTRA_SPEC_FUNCTIONS
extern const char *host_detect_local_cpu (int argc, const char **argv);
# define EXTRA_SPEC_FUNCTIONS \
- { "local_cpu_detect", host_detect_local_cpu }, \
BIG_LITTLE_CPU_SPEC_FUNCTIONS
# define MCPU_MTUNE_NATIVE_SPECS \
" %{march=native:%<march=native %:local_cpu_detect(arch)}" \

View File

@ -6,7 +6,7 @@ NOUX_CONFIGURE_ARGS += --program-prefix=$(PROGRAM_PREFIX) \
# the configure script calls the linker with "-lexpat", which fails
NOUX_CONFIGURE_ARGS += --without-expat
NOUX_CPPFLAGS += -DHAVE_LIBEXPAT=1
NOUX_CFLAGS += -Wno-error=sizeof-pointer-memaccess
NOUX_CFLAGS += -Wno-error=sizeof-pointer-memaccess -Wno-error=unused-value
LIBS += ncurses expat

View File

@ -1,105 +0,0 @@
From caf62483f30035efca2958615a466f73cc99880e Mon Sep 17 00:00:00 2001
From: glisse <glisse@138bc75d-0d04-0410-961f-82ee72b054a4>
Subject: [PATCH] 2014-02-03 Marc Glisse <marc.glisse@inria.fr>
PR c++/53017
PR c++/59211
gcc/c-family/
* c-common.c (handle_aligned_attribute, handle_alloc_size_attribute,
handle_vector_size_attribute, handle_nonnull_attribute): Call
default_conversion on the attribute argument.
(handle_nonnull_attribute): Increment the argument number.
gcc/cp/
* tree.c (handle_init_priority_attribute): Call default_conversion on
the attribute argument.
gcc/
* doc/extend.texi (Function Attributes): Typo.
gcc/testsuite/
* c-c++-common/attributes-1.c: New testcase.
* g++.dg/cpp0x/constexpr-attribute2.C: Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@207436 138bc75d-0d04-0410-961f-82ee72b054a4
---
gcc/c-family/c-common.c | 26 ++++++++++++++++++++++----
gcc/cp/tree.c | 1 +
2 files changed, 23 insertions(+), 4 deletions(-)
diff --git a/gcc/c-family/c-common.c b/gcc/c-family/c-common.c
index 86f64ec..5f43074 100644
--- a/gcc/c-family/c-common.c
+++ b/gcc/c-family/c-common.c
@@ -7414,10 +7414,18 @@ handle_aligned_attribute (tree *node, tree ARG_UNUSED (name), tree args,
tree decl = NULL_TREE;
tree *type = NULL;
int is_type = 0;
- tree align_expr = (args ? TREE_VALUE (args)
- : size_int (ATTRIBUTE_ALIGNED_VALUE / BITS_PER_UNIT));
+ tree align_expr;
int i;
+ if (args)
+ {
+ align_expr = TREE_VALUE (args);
+ if (align_expr && TREE_CODE (align_expr) != IDENTIFIER_NODE)
+ align_expr = default_conversion (align_expr);
+ }
+ else
+ align_expr = size_int (ATTRIBUTE_ALIGNED_VALUE / BITS_PER_UNIT);
+
if (DECL_P (*node))
{
decl = *node;
@@ -7923,6 +7931,9 @@ handle_alloc_size_attribute (tree *node, tree ARG_UNUSED (name), tree args,
for (; args; args = TREE_CHAIN (args))
{
tree position = TREE_VALUE (args);
+ if (position && TREE_CODE (position) != IDENTIFIER_NODE
+ && TREE_CODE (position) != FUNCTION_DECL)
+ position = default_conversion (position);
if (TREE_CODE (position) != INTEGER_CST
|| TREE_INT_CST_HIGH (position)
@@ -8328,6 +8339,8 @@ handle_vector_size_attribute (tree *node, tree name, tree args,
*no_add_attrs = true;
size = TREE_VALUE (args);
+ if (size && TREE_CODE (size) != IDENTIFIER_NODE)
+ size = default_conversion (size);
if (!host_integerp (size, 1))
{
@@ -8421,11 +8434,16 @@ handle_nonnull_attribute (tree *node, tree ARG_UNUSED (name),
/* Argument list specified. Verify that each argument number references
a pointer argument. */
- for (attr_arg_num = 1; args; args = TREE_CHAIN (args))
+ for (attr_arg_num = 1; args; attr_arg_num++, args = TREE_CHAIN (args))
{
unsigned HOST_WIDE_INT arg_num = 0, ck_num;
- if (!get_nonnull_operand (TREE_VALUE (args), &arg_num))
+ tree arg = TREE_VALUE (args);
+ if (arg && TREE_CODE (arg) != IDENTIFIER_NODE
+ && TREE_CODE (arg) != FUNCTION_DECL)
+ arg = default_conversion (arg);
+
+ if (!get_nonnull_operand (arg, &arg_num))
{
error ("nonnull argument has invalid operand number (argument %lu)",
(unsigned long) attr_arg_num);
diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c
index c7502d6..775e94e 100644
--- a/gcc/cp/tree.c
+++ b/gcc/cp/tree.c
@@ -3216,6 +3216,7 @@ handle_init_priority_attribute (tree* node,
int pri;
STRIP_NOPS (initp_expr);
+ initp_expr = default_conversion (initp_expr);
if (!initp_expr || TREE_CODE (initp_expr) != INTEGER_CST)
{

View File

@ -11,10 +11,10 @@ From: Christian Prochaska <christian.prochaska@genode-labs.com>
4 files changed, 47 insertions(+), 4 deletions(-)
diff --git a/gcc/config.gcc b/gcc/config.gcc
index 57a415b..87c0a72 100644
index 9d3fa57..20daf70 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -919,7 +919,7 @@ arm*-*-eabi* | arm*-*-symbianelf* | arm*-*-rtems*)
@@ -1056,7 +1056,7 @@ arm*-*-eabi* | arm*-*-symbianelf* | arm*-*-rtems*)
case ${target} in
arm*-*-eabi*)
tm_file="$tm_file newlib-stdint.h"
@ -23,7 +23,7 @@ index 57a415b..87c0a72 100644
use_gcc_stdint=wrap
;;
arm*-*-rtems*)
@@ -2690,7 +2690,7 @@ i[34567]86-*-linux* | x86_64-*-linux*)
@@ -2890,7 +2890,7 @@ i[34567]86-*-linux* | x86_64-*-linux*)
tmake_file="${tmake_file} i386/t-pmm_malloc i386/t-i386"
;;
i[34567]86-*-* | x86_64-*-*)
@ -33,7 +33,7 @@ index 57a415b..87c0a72 100644
powerpc*-*-* | rs6000-*-*)
tm_file="${tm_file} rs6000/option-defaults.h"
diff --git a/gcc/config/arm/unknown-elf.h b/gcc/config/arm/unknown-elf.h
index 9d776b0..68faf5b 100644
index ec6f9a4..579172d 100644
--- a/gcc/config/arm/unknown-elf.h
+++ b/gcc/config/arm/unknown-elf.h
@@ -94,3 +94,19 @@
@ -57,7 +57,7 @@ index 9d776b0..68faf5b 100644
+/* https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57699 */
+#define NO_IMPLICIT_EXTERN_C
diff --git a/gcc/config/i386/x86-64.h b/gcc/config/i386/x86-64.h
index 66f96d9..7ccf6ea 100644
index 16fc685..85b07bb 100644
--- a/gcc/config/i386/x86-64.h
+++ b/gcc/config/i386/x86-64.h
@@ -106,3 +106,22 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
@ -84,10 +84,10 @@ index 66f96d9..7ccf6ea 100644
+/* https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57699 */
+#define NO_IMPLICIT_EXTERN_C
diff --git a/libgcc/config.host b/libgcc/config.host
index 4a76998..05bae91 100644
index f4a7428..c9bce6a 100644
--- a/libgcc/config.host
+++ b/libgcc/config.host
@@ -263,7 +263,7 @@ case ${host} in
@@ -297,7 +297,7 @@ case ${host} in
tmake_file=t-vxworks
;;
*-*-elf)
@ -96,7 +96,7 @@ index 4a76998..05bae91 100644
;;
esac
@@ -342,8 +342,12 @@ arm*-*-eabi* | arm*-*-symbianelf* | arm*-*-rtems*)
@@ -384,8 +384,12 @@ arm*-*-eabi* | arm*-*-symbianelf* | arm*-*-rtems*)
tm_file="$tm_file arm/bpabi-lib.h"
case ${host} in
arm*-*-eabi* | arm*-*-rtems*)
@ -110,7 +110,7 @@ index 4a76998..05bae91 100644
;;
arm*-*-symbianelf*)
tmake_file="${tmake_file} arm/t-symbian t-slibgcc-nolc-override"
@@ -499,6 +503,10 @@ i[34567]86-*-elf*)
@@ -543,6 +547,10 @@ i[34567]86-*-elf*)
tmake_file="$tmake_file i386/t-crtstuff t-crtstuff-pic t-libgcc-pic"
;;
x86_64-*-elf*)

View File

@ -8,7 +8,7 @@ Remove the dependency on libbacktrace, which needs a libc.
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/go/config-lang.in b/gcc/go/config-lang.in
index fe9bb75..f965921 100644
index c33e218..ca2b3b1 100644
--- a/gcc/go/config-lang.in
+++ b/gcc/go/config-lang.in
@@ -28,7 +28,7 @@ language="go"

View File

@ -14,10 +14,10 @@ compiler as much as possible.
1 file changed, 1 deletion(-)
diff --git a/libstdc++-v3/crossconfig.m4 b/libstdc++-v3/crossconfig.m4
index 943ea67..d379010 100644
index 15d876e..e026e9a 100644
--- a/libstdc++-v3/crossconfig.m4
+++ b/libstdc++-v3/crossconfig.m4
@@ -270,7 +270,6 @@ case "${host}" in
@@ -278,7 +278,6 @@ case "${host}" in
AC_DEFINE(HAVE_TANHF)
;;
*)

View File

@ -8,10 +8,10 @@ From: Christian Prochaska <christian.prochaska@genode-labs.com>
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/libgcc/Makefile.in b/libgcc/Makefile.in
index 31740cb..db9b1b2 100644
index e86e98d..ca2275d 100644
--- a/libgcc/Makefile.in
+++ b/libgcc/Makefile.in
@@ -891,7 +891,7 @@ libgcc_s$(SHLIB_EXT): libunwind$(SHLIB_EXT)
@@ -907,7 +907,7 @@ libgcc_s$(SHLIB_EXT): libunwind$(SHLIB_EXT)
endif
ifeq ($(enable_shared),yes)
@ -20,7 +20,7 @@ index 31740cb..db9b1b2 100644
ifneq ($(LIBUNWIND),)
all: libunwind$(SHLIB_EXT)
endif
@@ -1058,10 +1058,6 @@ install-shared:
@@ -1090,10 +1090,6 @@ install-shared:
chmod 644 $(DESTDIR)$(inst_libdir)/libgcc_eh.a
$(RANLIB) $(DESTDIR)$(inst_libdir)/libgcc_eh.a

View File

@ -8,7 +8,7 @@ From: Christian Prochaska <christian.prochaska@genode-labs.com>
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/libstdc++-v3/configure.ac b/libstdc++-v3/configure.ac
index 3bf1b41..15f2de6 100644
index 3e8b9c5..1543c25 100644
--- a/libstdc++-v3/configure.ac
+++ b/libstdc++-v3/configure.ac
@@ -89,9 +89,9 @@ CXXFLAGS="$save_CXXFLAGS"
@ -24,7 +24,7 @@ index 3bf1b41..15f2de6 100644
AM_PROG_LIBTOOL
ACX_LT_HOST_FLAGS
AC_SUBST(enable_shared)
@@ -192,7 +192,7 @@ GLIBCXX_CHECK_WRITEV
@@ -205,7 +205,7 @@ AC_CHECK_HEADERS(fenv.h complex.h)
GLIBCXX_CHECK_C99_TR1
# For the EOF, SEEK_CUR, and SEEK_END integer constants.
@ -33,7 +33,7 @@ index 3bf1b41..15f2de6 100644
# For gettimeofday support.
GLIBCXX_CHECK_GETTIMEOFDAY
@@ -343,7 +343,7 @@ GCC_CHECK_UNWIND_GETIPINFO
@@ -358,7 +358,7 @@ GCC_CHECK_UNWIND_GETIPINFO
GCC_LINUX_FUTEX([AC_DEFINE(HAVE_LINUX_FUTEX, 1, [Define if futex syscall is available.])])

View File

@ -4,26 +4,12 @@ From: Christian Prochaska <christian.prochaska@genode-labs.com>
Changes lacking documentation
---
libgcc/Makefile.in | 2 +-
libgcc/config/t-libunwind-elf | 2 +-
libgcc/config/t-slibgcc | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/libgcc/Makefile.in b/libgcc/Makefile.in
index 990cd49..31740cb 100644
--- a/libgcc/Makefile.in
+++ b/libgcc/Makefile.in
@@ -857,7 +857,7 @@ LIBGCOV = _gcov _gcov_merge_add _gcov_merge_single _gcov_merge_delta \
_gcov_indirect_call_profiler _gcov_average_profiler _gcov_ior_profiler \
_gcov_merge_ior
-libgcov-objects = $(patsubst %,%$(objext),$(LIBGCOV))
+libgcov-objects =
$(libgcov-objects): %$(objext): $(srcdir)/libgcov.c
$(gcc_compile) -DL$* -c $(srcdir)/libgcov.c
diff --git a/libgcc/config/t-libunwind-elf b/libgcc/config/t-libunwind-elf
index 6f8d0b2..2a4214c 100644
index beacf04..4556eb1 100644
--- a/libgcc/config/t-libunwind-elf
+++ b/libgcc/config/t-libunwind-elf
@@ -32,7 +32,7 @@ SHLIBUNWIND_SONAME = @shlib_base_name@.so.$(SHLIBUNWIND_SOVERSION)
@ -36,7 +22,7 @@ index 6f8d0b2..2a4214c 100644
if [ -f $(SHLIB_DIR)/$(SHLIBUNWIND_SONAME) ]; then \
mv -f $(SHLIB_DIR)/$(SHLIBUNWIND_SONAME) \
diff --git a/libgcc/config/t-slibgcc b/libgcc/config/t-slibgcc
index e55013f..4a67d27 100644
index 1696fe8..0beb525 100644
--- a/libgcc/config/t-slibgcc
+++ b/libgcc/config/t-slibgcc
@@ -26,7 +26,7 @@ SHLIB_MAP = @shlib_map_file@

View File

@ -8,10 +8,10 @@ Ensure -fno-short-enums as default.
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
index 5bc6603..3a836e3 100644
index 439a4de..948a369 100644
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -24794,7 +24794,7 @@ arm_promote_function_mode (const_tree type ATTRIBUTE_UNUSED,
@@ -28348,7 +28348,7 @@ arm_promote_function_mode (const_tree type ATTRIBUTE_UNUSED,
static bool
arm_default_short_enums (void)
{

View File

@ -13,10 +13,10 @@ nothing rather than '-prefer-pic'.
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/libstdc++-v3/configure.ac b/libstdc++-v3/configure.ac
index 73d430a..3bf1b41 100644
index 1de0f6c..3e8b9c5 100644
--- a/libstdc++-v3/configure.ac
+++ b/libstdc++-v3/configure.ac
@@ -109,16 +109,16 @@ AC_SUBST(enable_static)
@@ -115,16 +115,16 @@ fi
# Use glibcxx_compiler_pic_flag to designate a compile-time flags for
# creating position-independent objects. This varies with the target
# hardware and operating system, but is often: -DPIC -fPIC.

View File

@ -7,4 +7,3 @@ libstdcxx_without_libc.patch
libgcc_s.patch
go_libbacktrace.patch
target_libbacktrace.patch
caf62483f30035efca2958615a466f73cc99880e.patch

View File

@ -8,7 +8,7 @@ Don't build libbacktrace, which needs a libc.
1 file changed, 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 943d93e..b4f20fd 100644
index 27ee905..8174460 100644
--- a/configure.ac
+++ b/configure.ac
@@ -152,7 +152,6 @@ libgcj="target-libffi \

View File

@ -59,7 +59,7 @@ MPC_DOWNLOAD_URL ?= http://www.multiprecision.org/mpc/download
# Tool versions and install location
#
GCC_VERSION = 4.8.4
GCC_VERSION = 4.9.2
BINUTILS_VERSION = 2.25
GDB_VERSION = 7.3.1
GMP_VERSION = 5.0.2
@ -101,7 +101,7 @@ VERBOSE = @
#
# Check if 'autoconf' is installed
#
AUTOCONF_VERSION_gcc_4.8.4 = 2.64
AUTOCONF_VERSION_gcc_4.9.2 = 2.64
AUTOCONF_VERSION = $(AUTOCONF_VERSION_gcc_$(GCC_VERSION))