mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-09 18:45:54 +02:00
gcc: Update to version 6.3.0
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
27
lfs/gcc
27
lfs/gcc
@@ -24,14 +24,14 @@
|
||||
|
||||
include Config
|
||||
|
||||
VER = 4.9.4
|
||||
VER = 6.3.0
|
||||
|
||||
GMP_VER = 5.0.5
|
||||
MPFR_VER = 2.4.2
|
||||
MPC_VER = 1.0.3
|
||||
|
||||
THISAPP = gcc-$(VER)
|
||||
DL_FILE = $(THISAPP).tar.bz2
|
||||
DL_FILE = $(THISAPP).tar.gz
|
||||
DL_FROM = $(URL_IPFIRE)
|
||||
DIR_APP = $(DIR_SRC)/$(THISAPP)
|
||||
|
||||
@@ -68,6 +68,8 @@ ifeq "$(PASS)" "1"
|
||||
--target=$(CROSSTARGET) \
|
||||
--prefix=/tools \
|
||||
--with-sysroot=$(ROOT) \
|
||||
--with-local-prefix=/tools \
|
||||
--with-native-system-header-dir=/tools/include \
|
||||
--disable-nls \
|
||||
--disable-shared \
|
||||
--disable-decimal-float \
|
||||
@@ -177,7 +179,7 @@ gmp-$(GMP_VER).tar.bz2 = $(DL_FROM)/gmp-$(GMP_VER).tar.bz2
|
||||
mpfr-$(MPFR_VER).tar.bz2 = $(DL_FROM)/mpfr-$(MPFR_VER).tar.bz2
|
||||
mpc-$(MPC_VER).tar.gz = $(DL_FROM)/mpc-$(MPC_VER).tar.gz
|
||||
|
||||
$(DL_FILE)_MD5 = 87c24a4090c1577ba817ec6882602491
|
||||
$(DL_FILE)_MD5 = 6e5ea04789678f1250c1b30c4d9ec417
|
||||
gmp-$(GMP_VER).tar.bz2_MD5 = 041487d25e9c230b0c42b106361055fe
|
||||
mpfr-$(MPFR_VER).tar.bz2_MD5 = 89e59fe665e2b3ad44a6789f40b059a0
|
||||
mpc-$(MPC_VER).tar.gz_MD5 = d6a1d5f8ddea3abd2cc3e98f58352d26
|
||||
@@ -212,14 +214,6 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
|
||||
@rm -rf $(DIR_APP) $(DIR_SRC)/gcc-build && cd $(DIR_SRC) && tar axf $(DIR_DL)/$(DL_FILE)
|
||||
@mkdir $(DIR_SRC)/gcc-build
|
||||
|
||||
# Apply patches.
|
||||
cd $(DIR_APP) && patch -Np0 < $(DIR_SRC)/src/patches/gcc/gcc49-i386-libgomp.patch
|
||||
cd $(DIR_APP) && patch -Np0 < $(DIR_SRC)/src/patches/gcc/gcc49-libtool-no-rpath.patch
|
||||
cd $(DIR_APP) && patch -Np0 < $(DIR_SRC)/src/patches/gcc/gcc49-no-add-needed.patch
|
||||
cd $(DIR_APP) && patch -Np0 < $(DIR_SRC)/src/patches/gcc/gcc49-pr38757.patch
|
||||
cd $(DIR_APP) && patch -Np0 < $(DIR_SRC)/src/patches/gcc/gcc49-pr64336.patch
|
||||
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/gcc/gcc-fix-inlining-issues.patch
|
||||
|
||||
ifneq "$(ROOT)" ""
|
||||
# Build gmp and mpfr internally in toolchain.
|
||||
cd $(DIR_APP) && tar xfa $(DIR_DL)/gmp-$(GMP_VER).tar.bz2
|
||||
@@ -230,12 +224,8 @@ ifneq "$(ROOT)" ""
|
||||
cd $(DIR_APP) && mv -v mpc-$(MPC_VER) mpc
|
||||
|
||||
ifeq "$(PASS)" "1"
|
||||
# GCC does not detect stack protection correctly, which causes problems
|
||||
# for the build of libresolv_pic.a.
|
||||
cd $(DIR_APP) && sed -i '/k prot/agcc_cv_libc_provides_ssp=yes' gcc/configure
|
||||
|
||||
for file in $$(find $(DIR_APP)/gcc/config -name linux64.h -o -name linux.h \
|
||||
-o -name sysv4.h -o -name linux-eabi.h -o -name linux-elf.h); do \
|
||||
-o -name sysv4.h -o -name linux-eabi.h -o -name linux-elf.h -o -name aarch64-linux.h); do \
|
||||
echo "Processing $${file}..."; \
|
||||
sed -i $${file} \
|
||||
-e 's@/lib\(64\)\?\(32\)\?/ld@/tools&@g' \
|
||||
@@ -251,7 +241,7 @@ ifeq "$(PASS)" "2"
|
||||
cd $(DIR_APP) && cat gcc/limitx.h gcc/glimits.h gcc/limity.h > \
|
||||
`dirname $$(/tools/bin/$(CROSSTARGET)-gcc -print-libgcc-file-name)`/include-fixed/limits.h
|
||||
for file in $$(find $(DIR_APP)/gcc/config -name linux64.h -o -name linux.h \
|
||||
-o -name sysv4.h -o -name linux-eabi.h -o -name linux-elf.h); do \
|
||||
-o -name sysv4.h -o -name linux-eabi.h -o -name linux-elf.h -o -name aarch64-linux.h); do \
|
||||
echo "Processing $${file}..."; \
|
||||
sed -i $${file} \
|
||||
-e 's@/lib\(64\)\?\(32\)\?/ld@/tools&@g' \
|
||||
@@ -277,6 +267,9 @@ ifeq "$(PASS)" "L"
|
||||
$(EXTRA_CONFIG)
|
||||
cd $(DIR_SRC)/gcc-build && make $(EXTRA_MAKE)
|
||||
cd $(DIR_SRC)/gcc-build && make $(EXTRA_INSTALL) install
|
||||
|
||||
# Workaround for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70936
|
||||
sed -e "s/^#include_next/#include/" -i /tools/$(CROSSTARGET)/include/c++/$(VER)/cstdlib
|
||||
else
|
||||
# The actual build.
|
||||
cd $(DIR_SRC)/gcc-build && \
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
Submitted By: Jeremy Huntwork (jhuntwork AT linuxfromscratch DOT org)
|
||||
Date: 2008-12-05
|
||||
Initial Package Version: 4.3.2
|
||||
Upstream Status: See below.
|
||||
Origin: DIY Linux, See below.
|
||||
Description: Original patch follows:
|
||||
|
||||
# DIY Linux Patch
|
||||
Date: 2008-09-09
|
||||
Author: Refer Origin.
|
||||
Origin: Partial revert of http://gcc.gnu.org/ml/gcc-cvs/2006-11/msg00416.html
|
||||
Maker: Greg Schafer <gschafer@zip.com.au>
|
||||
Upstream Status: Not applicable. Tweak only for Temptools phase GCC-Pass2.
|
||||
Description: Partially revert GCC driver to pre-GCC-4.3 state to allow startfiles to be
|
||||
found in $prefix when GCC is configured for a non-standard prefix eg: /temptools. Full
|
||||
background info in thread starting here: http://gcc.gnu.org/ml/gcc/2008-03/msg00095.html
|
||||
and GCC bugzilla here: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35532
|
||||
|
||||
diff -Naur gcc-4.3.0-RC-20080222.orig/gcc/gcc.c gcc-4.3.0-RC-20080222/gcc/gcc.c
|
||||
--- gcc-4.3.0-RC-20080222.orig/gcc/gcc.c 2008-01-24 18:57:12.000000000 +0000
|
||||
+++ gcc-4.3.0-RC-20080222/gcc/gcc.c 2008-03-02 06:07:36.000000000 +0000
|
||||
@@ -6370,6 +6370,11 @@
|
||||
machine_suffix,
|
||||
standard_startfile_prefix, NULL),
|
||||
NULL, PREFIX_PRIORITY_LAST, 0, 1);
|
||||
+ add_prefix (&startfile_prefixes,
|
||||
+ concat (standard_exec_prefix,
|
||||
+ machine_suffix,
|
||||
+ standard_startfile_prefix, NULL),
|
||||
+ NULL, PREFIX_PRIORITY_LAST, 0, 1);
|
||||
}
|
||||
|
||||
/* Sysrooted prefixes are relocated because target_system_root is
|
||||
@@ -1,89 +0,0 @@
|
||||
diff -Naur gcc-4.4.7.org/gcc/doc/cppopts.texi gcc-4.4.7/gcc/doc/cppopts.texi
|
||||
--- gcc-4.4.7.org/gcc/doc/cppopts.texi 2008-06-15 11:42:13.000000000 +0200
|
||||
+++ gcc-4.4.7/gcc/doc/cppopts.texi 2013-09-08 16:50:14.353507748 +0200
|
||||
@@ -758,7 +758,7 @@
|
||||
Enable special code to work around file systems which only permit very
|
||||
short file names, such as MS-DOS@.
|
||||
|
||||
-@itemx --help
|
||||
+@item --help
|
||||
@itemx --target-help
|
||||
@opindex help
|
||||
@opindex target-help
|
||||
diff -Naur gcc-4.4.7.org/gcc/doc/c-tree.texi gcc-4.4.7/gcc/doc/c-tree.texi
|
||||
--- gcc-4.4.7.org/gcc/doc/c-tree.texi 2009-02-20 16:20:38.000000000 +0100
|
||||
+++ gcc-4.4.7/gcc/doc/c-tree.texi 2013-09-08 17:53:21.055167463 +0200
|
||||
@@ -2338,13 +2338,13 @@
|
||||
not matter. The type of the operands and that of the result are
|
||||
always of @code{BOOLEAN_TYPE} or @code{INTEGER_TYPE}.
|
||||
|
||||
-@itemx POINTER_PLUS_EXPR
|
||||
+@item POINTER_PLUS_EXPR
|
||||
This node represents pointer arithmetic. The first operand is always
|
||||
a pointer/reference type. The second operand is always an unsigned
|
||||
integer type compatible with sizetype. This is the only binary
|
||||
arithmetic operand that can operate on pointer types.
|
||||
|
||||
-@itemx PLUS_EXPR
|
||||
+@item PLUS_EXPR
|
||||
@itemx MINUS_EXPR
|
||||
@itemx MULT_EXPR
|
||||
These nodes represent various binary arithmetic operations.
|
||||
diff -Naur gcc-4.4.7.org/gcc/doc/invoke.texi gcc-4.4.7/gcc/doc/invoke.texi
|
||||
--- gcc-4.4.7.org/gcc/doc/invoke.texi 2011-03-23 23:02:12.000000000 +0100
|
||||
+++ gcc-4.4.7/gcc/doc/invoke.texi 2013-09-08 17:10:49.503066254 +0200
|
||||
@@ -4645,11 +4645,11 @@
|
||||
@option{-fdump-rtl-ce3} enable dumping after the three
|
||||
if conversion passes.
|
||||
|
||||
-@itemx -fdump-rtl-cprop_hardreg
|
||||
+@item -fdump-rtl-cprop_hardreg
|
||||
@opindex fdump-rtl-cprop_hardreg
|
||||
Dump after hard register copy propagation.
|
||||
|
||||
-@itemx -fdump-rtl-csa
|
||||
+@item -fdump-rtl-csa
|
||||
@opindex fdump-rtl-csa
|
||||
Dump after combining stack adjustments.
|
||||
|
||||
@@ -4660,11 +4660,11 @@
|
||||
@option{-fdump-rtl-cse1} and @option{-fdump-rtl-cse2} enable dumping after
|
||||
the two common sub-expression elimination passes.
|
||||
|
||||
-@itemx -fdump-rtl-dce
|
||||
+@item -fdump-rtl-dce
|
||||
@opindex fdump-rtl-dce
|
||||
Dump after the standalone dead code elimination passes.
|
||||
|
||||
-@itemx -fdump-rtl-dbr
|
||||
+@item -fdump-rtl-dbr
|
||||
@opindex fdump-rtl-dbr
|
||||
Dump after delayed branch scheduling.
|
||||
|
||||
@@ -4709,7 +4709,7 @@
|
||||
@opindex fdump-rtl-initvals
|
||||
Dump after the computation of the initial value sets.
|
||||
|
||||
-@itemx -fdump-rtl-into_cfglayout
|
||||
+@item -fdump-rtl-into_cfglayout
|
||||
@opindex fdump-rtl-into_cfglayout
|
||||
Dump after converting to cfglayout mode.
|
||||
|
||||
@@ -4739,7 +4739,7 @@
|
||||
@opindex fdump-rtl-rnreg
|
||||
Dump after register renumbering.
|
||||
|
||||
-@itemx -fdump-rtl-outof_cfglayout
|
||||
+@item -fdump-rtl-outof_cfglayout
|
||||
@opindex fdump-rtl-outof_cfglayout
|
||||
Dump after converting from cfglayout mode.
|
||||
|
||||
@@ -4751,7 +4751,7 @@
|
||||
@opindex fdump-rtl-postreload
|
||||
Dump after post-reload optimizations.
|
||||
|
||||
-@itemx -fdump-rtl-pro_and_epilogue
|
||||
+@item -fdump-rtl-pro_and_epilogue
|
||||
@opindex fdump-rtl-pro_and_epilogue
|
||||
Dump after generating the function pro and epilogues.
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,11 +0,0 @@
|
||||
--- libgomp/configure.tgt.jj 2008-01-10 20:53:48.000000000 +0100
|
||||
+++ libgomp/configure.tgt 2008-03-27 12:44:51.000000000 +0100
|
||||
@@ -67,7 +67,7 @@ if test $enable_linux_futex = yes; then
|
||||
;;
|
||||
*)
|
||||
if test -z "$with_arch"; then
|
||||
- XCFLAGS="${XCFLAGS} -march=i486 -mtune=${target_cpu}"
|
||||
+ XCFLAGS="${XCFLAGS} -march=i486 -mtune=generic"
|
||||
fi
|
||||
esac
|
||||
;;
|
||||
@@ -1,27 +0,0 @@
|
||||
libtool sucks.
|
||||
--- ltmain.sh.jj 2007-12-07 14:53:21.000000000 +0100
|
||||
+++ ltmain.sh 2008-09-05 21:51:48.000000000 +0200
|
||||
@@ -5394,6 +5394,7 @@ EOF
|
||||
rpath="$finalize_rpath"
|
||||
test "$mode" != relink && rpath="$compile_rpath$rpath"
|
||||
for libdir in $rpath; do
|
||||
+ case "$libdir" in /usr/lib|/usr/lib64|/usr/lib/../lib|/usr/lib/../lib64) continue;; esac
|
||||
if test -n "$hardcode_libdir_flag_spec"; then
|
||||
if test -n "$hardcode_libdir_separator"; then
|
||||
if test -z "$hardcode_libdirs"; then
|
||||
@@ -6071,6 +6072,7 @@ EOF
|
||||
rpath=
|
||||
hardcode_libdirs=
|
||||
for libdir in $compile_rpath $finalize_rpath; do
|
||||
+ case "$libdir" in /usr/lib|/usr/lib64|/usr/lib/../lib|/usr/lib/../lib64) continue;; esac
|
||||
if test -n "$hardcode_libdir_flag_spec"; then
|
||||
if test -n "$hardcode_libdir_separator"; then
|
||||
if test -z "$hardcode_libdirs"; then
|
||||
@@ -6120,6 +6122,7 @@ EOF
|
||||
rpath=
|
||||
hardcode_libdirs=
|
||||
for libdir in $finalize_rpath; do
|
||||
+ case "$libdir" in /usr/lib|/usr/lib64|/usr/lib/../lib|/usr/lib/../lib64) continue;; esac
|
||||
if test -n "$hardcode_libdir_flag_spec"; then
|
||||
if test -n "$hardcode_libdir_separator"; then
|
||||
if test -z "$hardcode_libdirs"; then
|
||||
@@ -1,50 +0,0 @@
|
||||
2010-02-08 Roland McGrath <roland@redhat.com>
|
||||
|
||||
* config/rs6000/sysv4.h (LINK_EH_SPEC): Pass --no-add-needed to the
|
||||
linker.
|
||||
* config/gnu-user.h (LINK_EH_SPEC): Likewise.
|
||||
* config/alpha/elf.h (LINK_EH_SPEC): Likewise.
|
||||
* config/ia64/linux.h (LINK_EH_SPEC): Likewise.
|
||||
|
||||
--- gcc/config/alpha/elf.h.jj 2011-01-03 12:52:31.118056764 +0100
|
||||
+++ gcc/config/alpha/elf.h 2011-01-04 18:14:10.931874160 +0100
|
||||
@@ -165,5 +165,5 @@ extern int alpha_this_gpdisp_sequence_nu
|
||||
I imagine that other systems will catch up. In the meantime, it
|
||||
doesn't harm to make sure that the data exists to be used later. */
|
||||
#if defined(HAVE_LD_EH_FRAME_HDR)
|
||||
-#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
|
||||
+#define LINK_EH_SPEC "--no-add-needed %{!static:--eh-frame-hdr} "
|
||||
#endif
|
||||
--- gcc/config/ia64/linux.h.jj 2011-01-03 13:02:11.462994522 +0100
|
||||
+++ gcc/config/ia64/linux.h 2011-01-04 18:14:10.931874160 +0100
|
||||
@@ -77,7 +77,7 @@ do { \
|
||||
Signalize that because we have fde-glibc, we don't need all C shared libs
|
||||
linked against -lgcc_s. */
|
||||
#undef LINK_EH_SPEC
|
||||
-#define LINK_EH_SPEC ""
|
||||
+#define LINK_EH_SPEC "--no-add-needed "
|
||||
|
||||
/* Put all *tf routines in libgcc. */
|
||||
#undef LIBGCC2_HAS_TF_MODE
|
||||
--- gcc/config/gnu-user.h.jj 2011-01-03 12:53:03.739057299 +0100
|
||||
+++ gcc/config/gnu-user.h 2011-01-04 18:14:10.932814884 +0100
|
||||
@@ -82,7 +82,7 @@ see the files COPYING3 and COPYING.RUNTI
|
||||
#define LIB_SPEC GNU_USER_TARGET_LIB_SPEC
|
||||
|
||||
#if defined(HAVE_LD_EH_FRAME_HDR)
|
||||
-#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
|
||||
+#define LINK_EH_SPEC "--no-add-needed %{!static:--eh-frame-hdr} "
|
||||
#endif
|
||||
|
||||
#undef LINK_GCC_C_SEQUENCE_SPEC
|
||||
--- gcc/config/rs6000/sysv4.h.jj 2011-01-03 13:02:18.255994215 +0100
|
||||
+++ gcc/config/rs6000/sysv4.h 2011-01-04 18:14:10.933888871 +0100
|
||||
@@ -820,7 +820,7 @@ extern int fixuplabelno;
|
||||
-dynamic-linker " GNU_USER_DYNAMIC_LINKER "}}"
|
||||
|
||||
#if defined(HAVE_LD_EH_FRAME_HDR)
|
||||
-# define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
|
||||
+# define LINK_EH_SPEC "--no-add-needed %{!static:--eh-frame-hdr} "
|
||||
#endif
|
||||
|
||||
#define CPP_OS_LINUX_SPEC "-D__unix__ -D__gnu_linux__ -D__linux__ \
|
||||
@@ -1,106 +0,0 @@
|
||||
2009-03-18 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR debug/38757
|
||||
* langhooks.h (struct lang_hooks): Add source_language langhook.
|
||||
* langhooks-def.h (LANG_HOOKS_SOURCE_LANGUAGE): Define to NULL.
|
||||
(LANG_HOOKS_INITIALIZER): Add LANG_HOOKS_SOURCE_LANGUAGE.
|
||||
* dwarf2out.c (add_prototyped_attribute): Add DW_AT_prototype
|
||||
also for DW_LANG_{C,C99,ObjC}.
|
||||
(gen_compile_unit_die): Use lang_hooks.source_language () to
|
||||
determine if DW_LANG_C99 or DW_LANG_C89 should be returned.
|
||||
c/
|
||||
* c-lang.c (c_source_language): New function.
|
||||
(LANG_HOOKS_SOURCE_LANGUAGE): Define.
|
||||
|
||||
--- gcc/langhooks.h.jj 2011-01-03 12:53:05.125745450 +0100
|
||||
+++ gcc/langhooks.h 2011-01-04 17:59:43.166744926 +0100
|
||||
@@ -467,6 +467,10 @@ struct lang_hooks
|
||||
gimplification. */
|
||||
bool deep_unsharing;
|
||||
|
||||
+ /* Return year of the source language standard version if the FE supports
|
||||
+ multiple versions of the standard. */
|
||||
+ int (*source_language) (void);
|
||||
+
|
||||
/* Whenever you add entries here, make sure you adjust langhooks-def.h
|
||||
and langhooks.c accordingly. */
|
||||
};
|
||||
--- gcc/langhooks-def.h.jj 2011-01-03 12:53:05.000000000 +0100
|
||||
+++ gcc/langhooks-def.h 2011-01-04 18:00:44.858851030 +0100
|
||||
@@ -118,6 +118,7 @@ extern void lhd_omp_firstprivatize_type_
|
||||
#define LANG_HOOKS_BLOCK_MAY_FALLTHRU hook_bool_const_tree_true
|
||||
#define LANG_HOOKS_EH_USE_CXA_END_CLEANUP false
|
||||
#define LANG_HOOKS_DEEP_UNSHARING false
|
||||
+#define LANG_HOOKS_SOURCE_LANGUAGE NULL
|
||||
|
||||
/* Attribute hooks. */
|
||||
#define LANG_HOOKS_ATTRIBUTE_TABLE NULL
|
||||
@@ -303,7 +304,8 @@ extern void lhd_end_section (void);
|
||||
LANG_HOOKS_EH_PROTECT_CLEANUP_ACTIONS, \
|
||||
LANG_HOOKS_BLOCK_MAY_FALLTHRU, \
|
||||
LANG_HOOKS_EH_USE_CXA_END_CLEANUP, \
|
||||
- LANG_HOOKS_DEEP_UNSHARING \
|
||||
+ LANG_HOOKS_DEEP_UNSHARING, \
|
||||
+ LANG_HOOKS_SOURCE_LANGUAGE \
|
||||
}
|
||||
|
||||
#endif /* GCC_LANG_HOOKS_DEF_H */
|
||||
--- gcc/c/c-lang.c.jj 2011-01-03 12:53:05.376056936 +0100
|
||||
+++ gcc/c/c-lang.c 2011-01-04 17:59:43.167743798 +0100
|
||||
@@ -36,6 +36,12 @@ along with GCC; see the file COPYING3.
|
||||
|
||||
enum c_language_kind c_language = clk_c;
|
||||
|
||||
+static int
|
||||
+c_source_language (void)
|
||||
+{
|
||||
+ return flag_isoc99 ? 1999 : 1989;
|
||||
+}
|
||||
+
|
||||
/* Lang hooks common to C and ObjC are declared in c-objc-common.h;
|
||||
consequently, there should be very few hooks below. */
|
||||
|
||||
@@ -45,6 +51,8 @@ enum c_language_kind c_language = clk_c;
|
||||
#define LANG_HOOKS_INIT c_objc_common_init
|
||||
#undef LANG_HOOKS_INIT_TS
|
||||
#define LANG_HOOKS_INIT_TS c_common_init_ts
|
||||
+#undef LANG_HOOKS_SOURCE_LANGUAGE
|
||||
+#define LANG_HOOKS_SOURCE_LANGUAGE c_source_language
|
||||
|
||||
/* Each front end provides its own lang hook initializer. */
|
||||
struct lang_hooks lang_hooks = LANG_HOOKS_INITIALIZER;
|
||||
--- gcc/dwarf2out.c.jj 2011-01-03 12:53:05.102056475 +0100
|
||||
+++ gcc/dwarf2out.c 2011-01-04 18:03:14.534151763 +0100
|
||||
@@ -16109,9 +16109,18 @@ add_bit_size_attribute (dw_die_ref die,
|
||||
static inline void
|
||||
add_prototyped_attribute (dw_die_ref die, tree func_type)
|
||||
{
|
||||
- if (get_AT_unsigned (comp_unit_die (), DW_AT_language) == DW_LANG_C89
|
||||
- && prototype_p (func_type))
|
||||
- add_AT_flag (die, DW_AT_prototyped, 1);
|
||||
+ switch (get_AT_unsigned (comp_unit_die (), DW_AT_language))
|
||||
+ {
|
||||
+ case DW_LANG_C:
|
||||
+ case DW_LANG_C89:
|
||||
+ case DW_LANG_C99:
|
||||
+ case DW_LANG_ObjC:
|
||||
+ if (prototype_p (func_type))
|
||||
+ add_AT_flag (die, DW_AT_prototyped, 1);
|
||||
+ break;
|
||||
+ default:
|
||||
+ break;
|
||||
+ }
|
||||
}
|
||||
|
||||
/* Add an 'abstract_origin' attribute below a given DIE. The DIE is found
|
||||
@@ -18915,6 +18924,10 @@ gen_compile_unit_die (const char *filena
|
||||
if (strcmp (language_string, "GNU Go") == 0)
|
||||
language = DW_LANG_Go;
|
||||
}
|
||||
+ else if (strcmp (language_string, "GNU C") == 0
|
||||
+ && lang_hooks.source_language
|
||||
+ && lang_hooks.source_language () >= 1999)
|
||||
+ language = DW_LANG_C99;
|
||||
}
|
||||
/* Use a degraded Fortran setting in strict DWARF2 so is_fortran works. */
|
||||
else if (strcmp (language_string, "GNU Fortran") == 0)
|
||||
@@ -1,17 +0,0 @@
|
||||
2014-12-17 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR sanitizer/64336
|
||||
* tsan.c (instrument_expr): Ignore TREE_READONLY bit
|
||||
on MEM_REFs.
|
||||
|
||||
--- gcc/tsan.c.jj 2014-12-17 10:53:30.000000000 +0100
|
||||
+++ gcc/tsan.c 2014-12-17 11:55:12.793058159 +0100
|
||||
@@ -138,7 +138,7 @@ instrument_expr (gimple_stmt_iterator gs
|
||||
return false;
|
||||
}
|
||||
|
||||
- if (TREE_READONLY (base)
|
||||
+ if ((TREE_READONLY (base) && TREE_CODE (base) != MEM_REF)
|
||||
|| (TREE_CODE (base) == VAR_DECL
|
||||
&& DECL_HARD_REGISTER (base)))
|
||||
return false;
|
||||
Reference in New Issue
Block a user