Fix linking static test binaries with atf.test.mk
Check for -static in LDFLAGS or LDFLAGS.<test>, then pass in the appropriate dependency (LIBATF or LDATF) This unbreaks the build with some of the NetBSD tests that need to be compiled statically Reviewed by: imp, jmmv Phabric: D991 Sponsored by: EMC / Isilon Storage Division
This commit is contained in:
parent
ddcc16cf2f
commit
eb1fef6574
@ -71,7 +71,11 @@ BINDIR.${_T}= ${TESTSDIR}
|
||||
MAN.${_T}?= # empty
|
||||
SRCS.${_T}?= ${_T}.c
|
||||
DPADD.${_T}+= ${LIBATF_C}
|
||||
.if empty(LDFLAGS:M-static) && empty(LDFLAGS.${_T}:M-static)
|
||||
LDADD.${_T}+= ${LDATF_C}
|
||||
.else
|
||||
LDADD.${_T}+= ${LIBATF_C}
|
||||
.endif
|
||||
USEPRIVATELIB+= atf-c
|
||||
TEST_INTERFACE.${_T}= atf
|
||||
.endfor
|
||||
@ -85,7 +89,11 @@ BINDIR.${_T}= ${TESTSDIR}
|
||||
MAN.${_T}?= # empty
|
||||
SRCS.${_T}?= ${_T}${CXX_SUFFIX:U.cc}
|
||||
DPADD.${_T}+= ${LIBATF_CXX} ${LIBATF_C}
|
||||
.if empty(LDFLAGS:M-static) && empty(LDFLAGS.${_T}:M-static)
|
||||
LDADD.${_T}+= ${LDATF_CXX} ${LDATF_C}
|
||||
.else
|
||||
LDADD.${_T}+= ${LIBATF_CXX} ${LIBATF_C}
|
||||
.endif
|
||||
USEPRIVATELIB+= atf-c++
|
||||
TEST_INTERFACE.${_T}= atf
|
||||
.endfor
|
||||
|
Loading…
x
Reference in New Issue
Block a user