xref: /freebsd/lib/libc/tests/tls/Makefile (revision e9ac41698b2f322d55ccf9da50a3596edb2c1800)
12f121787SEnji Cooper.include <bsd.own.mk>
22f121787SEnji Cooper
32f121787SEnji Cooper.if !defined(NO_PIC)
42f121787SEnji CooperSUBDIR+=	dso
52f121787SEnji Cooper.endif
62f121787SEnji Cooper
72f121787SEnji Cooper# TODO: doesn't link properly (for some odd reason it's trying to link in
82f121787SEnji Cooper#       libatf.so)
92f121787SEnji Cooper#NETBSD_ATF_TESTS_C=	tls_static_test
102f121787SEnji Cooper.if !defined(NO_PIC)
112f121787SEnji CooperNETBSD_ATF_TESTS_C+=	tls_dlopen_test
122f121787SEnji CooperNETBSD_ATF_TESTS_C+=	tls_dynamic_test
132f121787SEnji Cooper.endif
142f121787SEnji Cooper
152f121787SEnji Cooper.include "../Makefile.netbsd-tests"
162f121787SEnji Cooper
17*99b33ca4SEnji CooperDSODIR=		${.OBJDIR:H}/tls_dso
182f121787SEnji Cooper
19eacae6dcSBryan DreweryLIBADD.tls_static_test+=	pthread
202f121787SEnji CooperLDFLAGS.tls_static_test+=	-static
212f121787SEnji CooperSRCS.tls_static_test=		t_tls_static.c t_tls_static_helper.c
222f121787SEnji Cooper
23eacae6dcSBryan DreweryDPADD.tls_dynamic_test+=	${DSODIR}/libh_tls_dynamic.so
24eacae6dcSBryan DreweryLDADD.tls_dynamic_test+=	-lh_tls_dynamic
252f121787SEnji CooperLDFLAGS.tls_dynamic_test+=	-Wl,-rpath,${TESTSDIR} -L${DSODIR}
26eacae6dcSBryan DreweryLIBADD.tls_dynamic_test+=	pthread
272f121787SEnji Cooper
28eacae6dcSBryan DreweryLIBADD.tls_dlopen_test+=	pthread
292f121787SEnji CooperLDFLAGS.tls_dlopen_test+=	-Wl,-rpath,${TESTSDIR} -Wl,-export-dynamic
302f121787SEnji Cooper
312f121787SEnji Cooper.include <bsd.test.mk>
32