diff --git a/usr/src/tools/sgs/libld/Makefile b/usr/src/tools/sgs/libld/Makefile index 2760ed34dc4b..6897a0b18d70 100644 --- a/usr/src/tools/sgs/libld/Makefile +++ b/usr/src/tools/sgs/libld/Makefile @@ -31,12 +31,19 @@ include $(SGSHOME)/libld/Makefile.com .KEEP_STATE: +# +# By using libld's Makefile.com LDLIBS ends up pointing to the proto +# area and many of the directories of cmd/sgs. As such, we need to reset +# that and just make sure to find everything relative to the tools proto +# area. +# +LDLIBS = CW_LINKER = CPPFLAGS = $(NATIVE_CPPFLAGS) -DUSE_LIBLD_MALLOC -I$(SRC)/lib/libc/inc \ -I$(SRC)/uts/common/krtld -I$(SRC)/uts/sparc \ $(VAR_LIBLD_CPPFLAGS) -LDLIBS += -L$(ROOTONBLDLIBMACH) -L../libconv -lconv -llddbg -lelf -lc +LDLIBS += -L../libconv -lconv -L$(ROOTONBLDLIBMACH) -llddbg -lelf -lc NATIVE_LIBS += libc.so DYNFLAGS += $(VERSREF) '-R$$ORIGIN'