summaryrefslogtreecommitdiff
path: root/usr/src/tools/smatch/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/tools/smatch/Makefile')
-rw-r--r--usr/src/tools/smatch/Makefile9
1 files changed, 9 insertions, 0 deletions
diff --git a/usr/src/tools/smatch/Makefile b/usr/src/tools/smatch/Makefile
index db1bd68b8f..4b2c909785 100644
--- a/usr/src/tools/smatch/Makefile
+++ b/usr/src/tools/smatch/Makefile
@@ -48,11 +48,20 @@ CFLAGS += -DMULTIARCH_TRIPLET=NULL
LDCHECKS = -Wl,$(ZASSERTDEFLIB) -Wl,$(ZGUIDANCE) -Wl,$(ZFATALWARNINGS)
LDLIBS += -Wl,$(ZLAZYLOAD) -Wl,$(ZDIRECT) -lsqlite3 -lcrypto -lgcc -lm -lc
LDFLAGS = $(MAPFILE.NES:%=-Wl,-M%)
+
+#
+# To allow linking to $(NATIVE_ADJUNCT) libraries on both multiarch (where
+# 64-bit libraries will be found in $(NATIVE_ADJUNCT)/lib/$(MACH64)) and 64-bit
+# images (where 64-bit libraries will be found in $(NATIVE_ADJUNCT)/lib/), we
+# set our library and run paths to both locations.
+#
LDFLAGS += -L$(NATIVE_ADJUNCT)/lib -R$(NATIVE_ADJUNCT)/lib
+LDFLAGS += -L$(NATIVE_ADJUNCT)/lib/$(MACH64) -R$(NATIVE_ADJUNCT)/lib/$(MACH64)
CPPFLAGS += -nostdinc
CPPFLAGS += -Isrc/
CPPFLAGS += -I$(NATIVE_ADJUNCT)/include
+CPPFLAGS += -I/usr/include
# no install.bin
INS.file = $(RM) $@; $(CP) $< $(@D); $(CHMOD) $(FILEMODE) $@