From 1c93a8353d0b641a6fa0077e81ecc8dd3efcae56 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Tue, 10 Nov 2015 12:03:59 +0000 Subject: toolchain: add support of ARC architecture This includes binutils, gcc, gdb and uClibc-ng. Latest release of ARC gcc (as of today it is "arc-2015.06") is based on upstream gcc 4.8.4. Sources are available on GitHub, see: https://github.com/foss-for-synopsys-dwc-arc-processors/gcc Latest release of ARC binutils (as of today it is "arc-2015.06") is based on upstream binutils 2.23. Sources are available on GitHub, see: https://github.com/foss-for-synopsys-dwc-arc-processors/binutils-gdb/releases/tag/arc-2015.06 Latest release of ARC GDB (as of today this is "arc-2015.06-gdb") is based on upstream gdb 7.9.1. Sources are available on GitHub, see: https://github.com/foss-for-synopsys-dwc-arc-processors/binutils-gdb/releases/tag/arc-2015.06-gdb Note that for binutils and gdb that come from unified git repository (which is the case for upstream binutils/gdb today) we need to disable building of gdb in binutils and binutils in gdb hence in binutils: ------>8------ --disable-sim --disable-gdb ------>8------ and in gdb: ------>8------ --disable-binutils --disable-ld --disable-gas ------>8------ Also in gdb we disable sim because if the following breakage while building with it: ------------>8------------ /usr/bin/env bash ./../common/genmloop.sh -shell /usr/bin/env bash \ -mono -fast -pbb -switch sem5-switch.c \ -cpu a5f -infile ./mloop5.in \ -outfile-suffix 5 unknown option: bash Makefile:699: recipe for target 'stamp-5mloop' failed make[7]: *** [stamp-5mloop] Error 1 ------------>8------------ Cc: Felix Fietkau Cc: John Crispin Cc: Jonas Gorski Signed-off-by: Alexey Brodkin git-svn-id: svn://svn.openwrt.org/openwrt/trunk@47438 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- .../patches/arc-2015.06/002-weak_data_fix.patch | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 toolchain/gcc/patches/arc-2015.06/002-weak_data_fix.patch (limited to 'toolchain/gcc/patches/arc-2015.06/002-weak_data_fix.patch') diff --git a/toolchain/gcc/patches/arc-2015.06/002-weak_data_fix.patch b/toolchain/gcc/patches/arc-2015.06/002-weak_data_fix.patch new file mode 100644 index 0000000000..a740b4ce9e --- /dev/null +++ b/toolchain/gcc/patches/arc-2015.06/002-weak_data_fix.patch @@ -0,0 +1,42 @@ +--- /dev/null ++++ b/gcc/testsuite/gcc.dg/visibility-21.c +@@ -0,0 +1,14 @@ ++/* PR target/32219 */ ++/* { dg-do run } */ ++/* { dg-require-visibility "" } */ ++/* { dg-options "-fPIC" { target fpic } } */ ++ ++extern void f() __attribute__((weak,visibility("hidden"))); ++extern int puts( char const* ); ++int main() ++{ ++ if (f) ++ f(); ++ return 0; ++} ++ +--- a/gcc/varasm.c ++++ b/gcc/varasm.c +@@ -6677,6 +6677,10 @@ default_binds_local_p_1 (const_tree exp, + /* Static variables are always local. */ + else if (! TREE_PUBLIC (exp)) + local_p = true; ++ /* hidden weak can't be overridden by something non-local, all ++ that is possible is that it is not defined at all. */ ++ else if (DECL_WEAK (exp)) ++ local_p = false; + /* A variable is local if the user has said explicitly that it will + be. */ + else if ((DECL_VISIBILITY_SPECIFIED (exp) +@@ -6690,11 +6694,6 @@ default_binds_local_p_1 (const_tree exp, + local. */ + else if (DECL_VISIBILITY (exp) != VISIBILITY_DEFAULT) + local_p = true; +- /* Default visibility weak data can be overridden by a strong symbol +- in another module and so are not local. */ +- else if (DECL_WEAK (exp) +- && !resolved_locally) +- local_p = false; + /* If PIC, then assume that any global name can be overridden by + symbols resolved from other modules. */ + else if (shlib) -- cgit v1.2.3