summaryrefslogtreecommitdiff
path: root/test/Rules.mak
diff options
context:
space:
mode:
Diffstat (limited to 'test/Rules.mak')
-rw-r--r--test/Rules.mak17
1 files changed, 12 insertions, 5 deletions
diff --git a/test/Rules.mak b/test/Rules.mak
index 878e9ea6a..ac210a72e 100644
--- a/test/Rules.mak
+++ b/test/Rules.mak
@@ -10,10 +10,11 @@
#
top_builddir ?= ../
+
TESTDIR=$(top_builddir)test/
include $(top_builddir)/Rules.mak
-
+ifndef TEST_INSTALLED_UCLIBC
ifdef UCLIBC_LDSO
ifeq (,$(findstring /,$(UCLIBC_LDSO)))
UCLIBC_LDSO := $(top_builddir)lib/$(UCLIBC_LDSO)
@@ -21,7 +22,7 @@ endif
else
UCLIBC_LDSO := $(firstword $(wildcard $(top_builddir)lib/ld*))
endif
-
+endif
#--------------------------------------------------------
# Ensure consistent sort order, 'gcc -print-search-dirs' behavior, etc.
LC_ALL:= C
@@ -96,8 +97,14 @@ ifneq ($(strip $(HAVE_SHARED)),y)
HOST_LDFLAGS += -static
endif
LDFLAGS += -B$(top_builddir)lib -Wl,-rpath,$(top_builddir)lib -Wl,-rpath-link,$(top_builddir)lib
+UCLIBC_LDSO_ABSPATH=$(shell pwd)
+ifdef TEST_INSTALLED_UCLIBC
+LDFLAGS += -Wl,-rpath,./
+UCLIBC_LDSO_ABSPATH=/lib
+endif
+
ifeq ($(findstring -static,$(LDFLAGS)),)
-LDFLAGS += -Wl,--dynamic-linker,$(UCLIBC_LDSO)
+ LDFLAGS += -Wl,--dynamic-linker,$(UCLIBC_LDSO_ABSPATH)/$(UCLIBC_LDSO)
endif
@@ -123,7 +130,7 @@ banner := ---------------------------------
pur_showclean = echo " "CLEAN $(notdir $(CURDIR))
pur_showdiff = echo " "TEST_DIFF $(notdir $(CURDIR))/
pur_showlink = echo " "TEST_LINK $(notdir $(CURDIR))/ $@
-pur_showtest = echo " "TEST_EXEC $(notdir $(CURDIR))/ $@
+pur_showtest = echo " "TEST_EXEC $(notdir $(CURDIR))/ $(patsubst %.exe,%,$@)
sil_showclean =
sil_showdiff = true
sil_showlink = true
@@ -131,7 +138,7 @@ sil_showtest = true
ver_showclean =
ver_showdiff = true echo
ver_showlink = true echo
-ver_showtest = printf "\n$(banner)\nTEST $(notdir $(PWD))/ $@\n$(banner)\n"
+ver_showtest = printf "\n$(banner)\nTEST $(notdir $(PWD))/ $(patsubst %.exe,%,$@)\n$(banner)\n"
do_showclean = $($(DISP)_showclean)
do_showdiff = $($(DISP)_showdiff)
do_showlink = $($(DISP)_showlink)