summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Matyukevich <sergey.matyukevich@synopsys.com>2022-09-20 16:14:19 +0400
committerWaldemar Brodkorb <wbx@openadk.org>2022-09-27 12:01:22 +0200
commitd6bf27d0a4e62d3a2c4f78aab11e88743cbb40b6 (patch)
tree436dcc0cbcbbc0513243105222eff3846e51739e
parentaa9e34c70f5173269f1e81f9ce08661c0f357617 (diff)
ldso: arc: add compiler option check
Option '-mno-long-calls' is not supported by all arc gcc compilers. For instance, this option is not supported by GCC for ARCv3 processors. Check if this option is supported before applying it. Signed-off-by: Sergey Matyukevich <sergey.matyukevich@synopsys.com> Signed-off-by: Pavel Kozlov <pavel.kozlov@synopsys.com>
-rw-r--r--ldso/ldso/Makefile.in3
1 files changed, 2 insertions, 1 deletions
diff --git a/ldso/ldso/Makefile.in b/ldso/ldso/Makefile.in
index 4f2a18454..2d3886d73 100644
--- a/ldso/ldso/Makefile.in
+++ b/ldso/ldso/Makefile.in
@@ -38,7 +38,8 @@ CFLAGS-ldso.c += -DLDSO_MULTILIB_DIR=\"$(MULTILIB_DIR)\"
endif
ifeq ($(TARGET_ARCH),arc)
-CFLAGS-ldso.c += -mno-long-calls
+$(eval $(call check-gcc-var,-mno-long-calls))
+CFLAGS-ldso.c += $(CFLAGS_-mno-long-calls)
endif
LDFLAGS-$(UCLIBC_FORMAT_DSBT_ELF)-$(UCLIBC_LDSO_NAME).so := -Wl,--dsbt-index=1