[OpenWrt-Devel] [PATCH] build: don't add -fno-plt for ARC

Alexey Brodkin Alexey.Brodkin at synopsys.com
Thu Feb 4 07:09:05 EST 2016

Curent ARC toolchain fails to build libstdc++ if -fno-plt is used.
Lots of following error messages appear:
BFD (GNU Binutils) 2.23.2 assertion fail elf32-arc.c:2786
collect2: error: ld returned 1 exit status

In newer binutils (still in development) for ARC rewritten from
scratch this seem to not happen, so once new binutils for ARC hit
the street this patch might be reverted.

Signed-off-by: Alexey Brodkin <abrodkin at synopsys.com>
Cc: Felix Fietkau <nbd at openwrt.org>
Cc: Jo-Philipp Wich <jow at openwrt.org>
Cc: Jonas Gorski <jogo at openwrt.org>
 config/Config-devel.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/config/Config-devel.in b/config/Config-devel.in
index 5970ac2..938f0b3 100644
--- a/config/Config-devel.in
+++ b/config/Config-devel.in
@@ -106,7 +106,7 @@ menuconfig DEVEL
 		string "Additional compiler options" if DEVEL
-		default "-fno-caller-saves -fno-plt" if !CONFIG_EXTERNAL_TOOLCHAIN
+		default "-fno-caller-saves -fno-plt" if !CONFIG_EXTERNAL_TOOLCHAIN && !arc
 		default "-fno-caller-saves"
 		  Extra target-independent optimizations to use when building for the target.
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org

More information about the openwrt-devel mailing list