1 # $NetBSD: Makefile,v 1.15 2026/02/10 07:28:24 skrll Exp $ 2 3 NOMAN= # defined 4 5 .include <bsd.own.mk> 6 7 TESTSDIR= ${TESTSBASE}/lib/csu 8 TESTS_SH= t_crt0 t_ifunc_static 9 TESTS_SUBDIRS= 10 SUBDIR+= dso 11 12 .include "Makefile.check_stack" 13 14 CPPFLAGS+= ${CPPFLAGS_CHECK_STACK} 15 16 BINDIR= ${TESTSDIR} 17 PROGS_CXX= h_initfini1 h_initfini2 h_initfini3 18 SRCS.h_initfini1= h_initfini1.cxx h_initfini_common.cxx \ 19 ${SRCS_CHECK_STACK} 20 SRCS.h_initfini2= h_initfini1.cxx h_initfini_common.cxx \ 21 ${SRCS_CHECK_STACK} 22 LDSTATIC.h_initfini2+= -static 23 SRCS.h_initfini3= h_initfini3.cxx h_initfini_common.cxx \ 24 ${SRCS_CHECK_STACK} 25 LDADD.h_initfini3+= -Wl,-rpath,${TESTSDIR} 26 27 PROGS+= h_ifunc_static h_initfini_array h_preinit_array 28 SRCS.h_ifunc_static= h_ifunc_static.c 29 SRCS.h_initfini_array= h_initfini_array.c 30 SRCS.h_preinit_array= h_preinit_array.c 31 LDSTATIC.h_ifunc_static=-static 32 33 TESTS_SH+= t_hello 34 35 PROGS+= ${"${MKPIC}" != no:?h_hello_dyn:} 36 PROGS+= ${"${MKPIE}" != no:?h_hello_dynpie:} 37 PROGS+= ${"${MKPIE}" != no:?h_hello_relr:} 38 PROGS+= h_hello_sta 39 PROGS+= ${"${MKPIE}" != no:?h_hello_stapie:} 40 41 h_hello_relr: CTFMERGE=: # PR toolchain/59364: ctf tools needs update 42 h_hello_relr.link: CTFMERGE=: # PR toolchain/59364: ctf tools needs update 43 44 SRCS.h_hello_dyn+= h_hello.c 45 SRCS.h_hello_dynpie+= h_hello.c 46 SRCS.h_hello_relr+= h_hello.c 47 SRCS.h_hello_sta+= h_hello.c 48 SRCS.h_hello_stapie+= h_hello.c 49 COPTS.h_hello.c+= ${"${MKPIE}" != no:?-fPIE:} 50 LDFLAGS.h_hello_dyn= -no-pie 51 LDFLAGS.h_hello_dynpie= -pie 52 LDFLAGS.h_hello_relr= -pie ${LD_PACK_RELATIVE_RELOCS} 53 LDFLAGS.h_hello_sta= -no-pie 54 LDFLAGS.h_hello_stapie= -pie ${LD_NOPACK_RELATIVE_RELOCS} 55 LDSTATIC.h_hello_relr= -static 56 LDSTATIC.h_hello_sta= -static 57 LDSTATIC.h_hello_stapie= -static 58 59 .include <bsd.test.mk> 60