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