11.12Schristos# $NetBSD: Makefile,v 1.12 2023/11/10 23:03:25 christos Exp $ 21.1Spgoyette 31.1SpgoyetteNOMAN= # defined 41.1Spgoyette 51.1Spgoyette.include <bsd.own.mk> 61.1Spgoyette 71.1SpgoyetteWARNS= 4 81.1Spgoyette 91.1SpgoyetteCPPFLAGS+= -D_FORTIFY_SOURCE=2 101.1Spgoyette 111.5SjoergCOPTS.h_raw.c= -fstack-protector-all -Wstack-protector 121.5SjoergCOPTS.h_raw.c+= ${${ACTIVE_CC} == "gcc":? --param ssp-buffer-size=1 :} 131.6SjoergCOPTS.h_raw.c+= ${${ACTIVE_CC} == "clang":? --param ssp-buffer-size=1 :} 141.4Splunky 151.1Spgoyette# Bootstrap hack 161.1Spgoyette 171.1Spgoyette.ifmake !clean && !obj && !cleandir 181.1Spgoyette.BEGIN: 191.1Spgoyette ${AR} cr libssp_nonshared.a 201.1Spgoyette.endif 211.1Spgoyette 221.1SpgoyetteCLEANFILES+= libssp_nonshared.a 231.1SpgoyetteLDFLAGS+= -L. 241.1Spgoyette 251.1SpgoyetteTESTSDIR= ${TESTSBASE}/lib/libc/ssp 261.1Spgoyette 271.1SpgoyetteTESTS_SH+= t_ssp 281.1Spgoyette 291.1SpgoyetteBINDIR= ${TESTSDIR} 301.1Spgoyette 311.1SpgoyettePROGS= h_fgets 321.1SpgoyettePROGS+= h_gets 331.1SpgoyettePROGS+= h_getcwd 341.12SchristosPROGS+= h_getcwd2 351.1SpgoyettePROGS+= h_memcpy 361.1SpgoyettePROGS+= h_memmove 371.1SpgoyettePROGS+= h_memset 381.4SplunkyPROGS+= h_raw 391.1SpgoyettePROGS+= h_read 401.1SpgoyettePROGS+= h_readlink 411.1SpgoyettePROGS+= h_snprintf 421.1SpgoyettePROGS+= h_sprintf 431.7SchristosPROGS+= h_stpcpy 441.7SchristosPROGS+= h_stpncpy 451.1SpgoyettePROGS+= h_strcat 461.1SpgoyettePROGS+= h_strcpy 471.1SpgoyettePROGS+= h_strncat 481.1SpgoyettePROGS+= h_strncpy 491.1SpgoyettePROGS+= h_vsnprintf 501.1SpgoyettePROGS+= h_vsprintf 511.1Spgoyette 521.8Smrg# Test exercises truncation 531.11SlukemCOPTS.h_snprintf.c+= ${CC_WNO_FORMAT_TRUNCATION} 541.8Smrg 551.1Spgoyette.include <bsd.test.mk> 56