tool_chain: update GCC to version 4.8.4

Fixes #1519
This commit is contained in:
Christian Prochaska
2015-05-12 16:25:30 +02:00
committed by Christian Helmuth
parent b704944d4d
commit 7709059245
25 changed files with 309 additions and 76 deletions

View File

@@ -0,0 +1,105 @@
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 9503b96..b8d6ce1 100644
index 57a415b..87c0a72 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -914,7 +914,7 @@ arm*-*-eabi* | arm*-*-symbianelf* | arm*-*-rtems*)
@@ -919,7 +919,7 @@ arm*-*-eabi* | arm*-*-symbianelf* | arm*-*-rtems*)
case ${target} in
arm*-*-eabi*)
tm_file="$tm_file newlib-stdint.h"
@@ -23,7 +23,7 @@ index 9503b96..b8d6ce1 100644
use_gcc_stdint=wrap
;;
arm*-*-rtems*)
@@ -2641,7 +2641,7 @@ i[34567]86-*-linux* | x86_64-*-linux*)
@@ -2690,7 +2690,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,10 +33,10 @@ index 9503b96..b8d6ce1 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 d5df624..6766c5f 100644
index 9d776b0..68faf5b 100644
--- a/gcc/config/arm/unknown-elf.h
+++ b/gcc/config/arm/unknown-elf.h
@@ -95,3 +95,19 @@
@@ -94,3 +94,19 @@
which will depend on abort, which is defined in libc. */
#undef LINK_GCC_C_SEQUENCE_SPEC
#define LINK_GCC_C_SEQUENCE_SPEC "--start-group %G %L --end-group"
@@ -57,13 +57,13 @@ index d5df624..6766c5f 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 d20f326..0cc4dd0 100644
index 66f96d9..7ccf6ea 100644
--- a/gcc/config/i386/x86-64.h
+++ b/gcc/config/i386/x86-64.h
@@ -104,3 +104,22 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
@@ -106,3 +106,22 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#undef TARGET_ASM_UNIQUE_SECTION
#define TARGET_ASM_UNIQUE_SECTION x86_64_elf_unique_section
#undef TARGET_SECTION_TYPE_FLAGS
#define TARGET_SECTION_TYPE_FLAGS x86_64_elf_section_type_flags
+
+/* genode64.h */
+
@@ -84,10 +84,10 @@ index d20f326..0cc4dd0 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 b64da4a..096d5b6 100644
index 4a76998..05bae91 100644
--- a/libgcc/config.host
+++ b/libgcc/config.host
@@ -261,7 +261,7 @@ case ${host} in
@@ -263,7 +263,7 @@ case ${host} in
tmake_file=t-vxworks
;;
*-*-elf)
@@ -96,7 +96,7 @@ index b64da4a..096d5b6 100644
;;
esac
@@ -363,8 +363,12 @@ arm*-*-eabi* | arm*-*-symbianelf* | arm*-*-rtems*)
@@ -342,8 +342,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 b64da4a..096d5b6 100644
;;
arm*-*-symbianelf*)
tmake_file="${tmake_file} arm/t-symbian t-slibgcc-nolc-override"
@@ -524,6 +528,10 @@ i[34567]86-*-elf*)
@@ -499,6 +503,10 @@ i[34567]86-*-elf*)
tmake_file="$tmake_file i386/t-crtstuff t-crtstuff-pic t-libgcc-pic"
;;
x86_64-*-elf*)

View File

@@ -0,0 +1,22 @@
go_libbacktrace.patch
From: Christian Prochaska <christian.prochaska@genode-labs.com>
Remove the dependency on libbacktrace, which needs a libc.
---
gcc/go/config-lang.in | 2 +-
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
--- a/gcc/go/config-lang.in
+++ b/gcc/go/config-lang.in
@@ -28,7 +28,7 @@ language="go"
compilers="go1\$(exeext)"
-target_libs="target-libgo target-libffi target-libbacktrace"
+target_libs="target-libgo target-libffi"
# The Go frontend is written in C++, so we need to build the C++
# compiler during stage 1.

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 361ed0b..98d68ec 100644
index 943ea67..d379010 100644
--- a/libstdc++-v3/crossconfig.m4
+++ b/libstdc++-v3/crossconfig.m4
@@ -264,7 +264,6 @@ case "${host}" in
@@ -270,7 +270,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 9f45475..a2cb98f 100644
index 31740cb..db9b1b2 100644
--- a/libgcc/Makefile.in
+++ b/libgcc/Makefile.in
@@ -893,7 +893,7 @@ libgcc_s$(SHLIB_EXT): libunwind$(SHLIB_EXT)
@@ -891,7 +891,7 @@ libgcc_s$(SHLIB_EXT): libunwind$(SHLIB_EXT)
endif
ifeq ($(enable_shared),yes)
@@ -20,7 +20,7 @@ index 9f45475..a2cb98f 100644
ifneq ($(LIBUNWIND),)
all: libunwind$(SHLIB_EXT)
endif
@@ -1060,10 +1060,6 @@ install-shared:
@@ -1058,10 +1058,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 59024f2..5245cdd 100644
index 3bf1b41..15f2de6 100644
--- a/libstdc++-v3/configure.ac
+++ b/libstdc++-v3/configure.ac
@@ -89,9 +89,9 @@ CXXFLAGS="$save_CXXFLAGS"
@@ -24,7 +24,7 @@ index 59024f2..5245cdd 100644
AM_PROG_LIBTOOL
ACX_LT_HOST_FLAGS
AC_SUBST(enable_shared)
@@ -191,7 +191,7 @@ GLIBCXX_CHECK_WRITEV
@@ -192,7 +192,7 @@ GLIBCXX_CHECK_WRITEV
GLIBCXX_CHECK_C99_TR1
# For the EOF, SEEK_CUR, and SEEK_END integer constants.
@@ -33,7 +33,7 @@ index 59024f2..5245cdd 100644
# For gettimeofday support.
GLIBCXX_CHECK_GETTIMEOFDAY
@@ -339,7 +339,7 @@ GCC_CHECK_UNWIND_GETIPINFO
@@ -343,7 +343,7 @@ GCC_CHECK_UNWIND_GETIPINFO
GCC_LINUX_FUTEX([AC_DEFINE(HAVE_LINUX_FUTEX, 1, [Define if futex syscall is available.])])

View File

@@ -10,10 +10,10 @@ Changes lacking documentation
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/libgcc/Makefile.in b/libgcc/Makefile.in
index c301ff0..9f45475 100644
index 990cd49..31740cb 100644
--- a/libgcc/Makefile.in
+++ b/libgcc/Makefile.in
@@ -859,7 +859,7 @@ LIBGCOV = _gcov _gcov_merge_add _gcov_merge_single _gcov_merge_delta \
@@ -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
@@ -23,7 +23,7 @@ index c301ff0..9f45475 100644
$(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 47a460b..cd6e291 100644
index 6f8d0b2..2a4214c 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,10 +36,10 @@ index 47a460b..cd6e291 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 3727244..89c8e9b 100644
index e55013f..4a67d27 100644
--- a/libgcc/config/t-slibgcc
+++ b/libgcc/config/t-slibgcc
@@ -27,7 +27,7 @@ SHLIB_MAP = @shlib_map_file@
@@ -26,7 +26,7 @@ SHLIB_MAP = @shlib_map_file@
SHLIB_OBJS = @shlib_objs@
SHLIB_DIR = @multilib_dir@
SHLIB_SLIBDIR_QUAL = @shlib_slibdir_qual@

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 6ed3575..ba4cacb 100644
index 5bc6603..3a836e3 100644
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -23466,7 +23466,7 @@ arm_promote_function_mode (const_tree type ATTRIBUTE_UNUSED,
@@ -24794,7 +24794,7 @@ arm_promote_function_mode (const_tree type ATTRIBUTE_UNUSED,
static bool
arm_default_short_enums (void)
{

View File

@@ -13,7 +13,7 @@ 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 ce1f6c4..59024f2 100644
index 73d430a..3bf1b41 100644
--- a/libstdc++-v3/configure.ac
+++ b/libstdc++-v3/configure.ac
@@ -109,16 +109,16 @@ AC_SUBST(enable_static)

View File

@@ -5,3 +5,6 @@ host_target_combination.patch
prefer_pic.patch
libstdcxx_without_libc.patch
libgcc_s.patch
go_libbacktrace.patch
target_libbacktrace.patch
caf62483f30035efca2958615a466f73cc99880e.patch

View File

@@ -0,0 +1,21 @@
target_libbacktrace.patch
From: Christian Prochaska <christian.prochaska@genode-labs.com>
Don't build libbacktrace, which needs a libc.
---
configure.ac | 1 -
1 file changed, 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 943d93e..b4f20fd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -152,7 +152,6 @@ libgcj="target-libffi \
# the host libraries and the host tools (which may be a cross compiler)
# Note that libiberty is not a target library.
target_libraries="target-libgcc \
- target-libbacktrace \
target-libgloss \
target-newlib \
target-libgomp \

View File

@@ -59,7 +59,7 @@ MPC_DOWNLOAD_URL ?= http://www.multiprecision.org/mpc/download
# Tool versions and install location
#
GCC_VERSION = 4.7.4
GCC_VERSION = 4.8.4
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.7.4 = 2.64
AUTOCONF_VERSION_gcc_4.8.4 = 2.64
AUTOCONF_VERSION = $(AUTOCONF_VERSION_gcc_$(GCC_VERSION))