summaryrefslogtreecommitdiff
path: root/Rules.mak
diff options
context:
space:
mode:
Diffstat (limited to 'Rules.mak')
-rw-r--r--Rules.mak13
1 files changed, 13 insertions, 0 deletions
diff --git a/Rules.mak b/Rules.mak
index 7f244b438..e085ac787 100644
--- a/Rules.mak
+++ b/Rules.mak
@@ -569,6 +569,19 @@ export UBACKTRACE_ASNEEDED:=$(shell $(CC) -Wl,--help 2>/dev/null | grep -q -- --
else
export UBACKTRACE_ASNEEDED:=""
endif
+ifeq ($(UCLIBC_HAS_ARGP),y)
+ifeq ($(HARDWIRED_ABSPATH),y)
+# Only used in installed libc.so linker script
+UARGP_FULL_NAME := $(subst //,/,$(RUNTIME_PREFIX)$(MULTILIB_DIR)/libuargp.so.$(MAJOR_VERSION))
+else
+UARGP_FULL_NAME := libuargp.so.$(MAJOR_VERSION)
+endif
+export UARGP_ASNEEDED:=$(shell $(CC) -Wl,--help 2>/dev/null | grep -q -- --as-needed && \
+ echo "GROUP ( AS_NEEDED ( $(UARGP_FULL_NAME) ) )" || \
+ echo "GROUP ( $(UARGP_FULL_NAME) )")
+else
+export UARGP_ASNEEDED:=""
+endif
endif
# Add a bunch of extra pedantic annoyingly strict checks