diff mbox series

[uclibc-ng-devel,2/4] ldso: arc: add compiler option check

Message ID 20220920121421.31618-3-kozlov@synopsys.com
State New
Headers show
Series add support for ARCv3 32-bit processors | expand

Commit Message

Pavel.Kozlov@synopsys.com Sept. 20, 2022, 12:14 p.m. UTC
From: Sergey Matyukevich <sergey.matyukevich@synopsys.com>

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>
---
 ldso/ldso/Makefile.in | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/ldso/ldso/Makefile.in b/ldso/ldso/Makefile.in
index 4f2a184545f0..2d3886d735da 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