summaryrefslogtreecommitdiff
path: root/test/Rules.mak
diff options
context:
space:
mode:
Diffstat (limited to 'test/Rules.mak')
-rw-r--r--test/Rules.mak9
1 files changed, 7 insertions, 2 deletions
diff --git a/test/Rules.mak b/test/Rules.mak
index f6d9fcdc2..5085ced3e 100644
--- a/test/Rules.mak
+++ b/test/Rules.mak
@@ -79,7 +79,11 @@ endif
XWARNINGS := $(subst ",, $(strip $(WARNINGS))) -Wstrict-prototypes
XARCH_CFLAGS := $(subst ",, $(strip $(ARCH_CFLAGS))) $(CPU_CFLAGS)
XCOMMON_CFLAGS := -D_GNU_SOURCE -I$(top_builddir)test
-CFLAGS += $(XWARNINGS) $(OPTIMIZATION) $(XCOMMON_CFLAGS) $(XARCH_CFLAGS) -I$(top_builddir)include $(PTINC)
+CFLAGS := $(XWARNINGS) $(OPTIMIZATION) $(XCOMMON_CFLAGS) $(XARCH_CFLAGS) -nostdinc -I$(top_builddir)$(LOCAL_INSTALL_PATH)/usr/include
+
+CC_IPREFIX:=$(shell $(CC) --print-file-name=include)
+CFLAGS += -I$(CC_IPREFIX)
+
HOST_CFLAGS += $(XWARNINGS) $(OPTIMIZATION) $(XCOMMON_CFLAGS)
LDFLAGS := $(CPU_LDFLAGS)
@@ -97,11 +101,12 @@ ifneq ($(strip $(HAVE_SHARED)),y)
LDFLAGS += -static
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
+UCLIBC_LDSO_ABSPATH=$(SHARED_LIB_LOADER_PREFIX)
endif
ifeq ($(findstring -static,$(LDFLAGS)),)