From 952226eedb0be32b2c952fb2ae12f76a62131c00 Mon Sep 17 00:00:00 2001 From: Mitchell Horne Date: Wed, 4 Aug 2021 15:20:50 -0300 Subject: [PATCH] Prefer MK_SSP=no to SSP_CFLAGS= It is more idiomatic. CFLAGS is only augmented with $SSP_CFLAGS when $MK_SSP != "no". Reviewed by: imp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D31401 (cherry picked from commit 61ed578ee66648eff206ee5622b66727bfb52e78) --- Makefile.inc1 | 8 ++++---- Makefile.libcompat | 3 ++- lib/csu/Makefile.inc | 3 +-- lib/libclang_rt/Makefile.inc | 2 +- stand/defs.mk | 2 -- targets/pseudo/bootstrap-tools/Makefile | 2 +- 6 files changed, 9 insertions(+), 11 deletions(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index a03b79a5b02c..cc854fbebbb1 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -726,7 +726,6 @@ BSARGS= DESTDIR= \ MAKEOBJDIRPREFIX= \ BOOTSTRAPPING=${BOOTSTRAPPING_OSRELDATE} \ BWPHASE=${.TARGET:C,^_,,} \ - SSP_CFLAGS= \ -DNO_CPU_CFLAGS \ -DNO_LINT \ -DNO_PIC \ @@ -740,6 +739,7 @@ BSARGS= DESTDIR= \ MK_MAN=no \ MK_PROFILE=no \ MK_RETPOLINE=no \ + MK_SSP=no \ MK_TESTS=no \ MK_WERROR=no \ MK_INCLUDES=yes \ @@ -759,7 +759,6 @@ TMAKE= \ DESTDIR= \ BOOTSTRAPPING=${BOOTSTRAPPING_OSRELDATE} \ BWPHASE=${.TARGET:C,^_,,} \ - SSP_CFLAGS= \ -DNO_CPU_CFLAGS \ -DNO_LINT \ MK_CTF=no \ @@ -768,6 +767,7 @@ TMAKE= \ MK_CLANG_FULL=no \ MK_LLDB=no \ MK_RETPOLINE=no \ + MK_SSP=no \ MK_TESTS=no \ MK_WERROR=no @@ -792,7 +792,6 @@ KTMAKE= \ OBJROOT='$${OBJTOP}/' \ MAKEOBJDIRPREFIX= \ BOOTSTRAPPING=${BOOTSTRAPPING_OSRELDATE} \ - SSP_CFLAGS= \ -DNO_CPU_CFLAGS \ -DNO_LINT \ -DNO_PIC \ @@ -801,6 +800,7 @@ KTMAKE= \ MK_HTML=no \ MK_MAN=no \ MK_PROFILE=no \ + MK_SSP=no \ MK_RETPOLINE=no \ MK_WERROR=no @@ -2780,7 +2780,6 @@ NXBMAKEARGS+= \ -DNO_SHARED \ -DNO_CPU_CFLAGS \ -DNO_PIC \ - SSP_CFLAGS= \ MK_CASPER=no \ MK_CLANG_EXTRAS=no \ MK_CLANG_FORMAT=no \ @@ -2797,6 +2796,7 @@ NXBMAKEARGS+= \ MK_RETPOLINE=no \ MK_SENDMAIL=no \ MK_SVNLITE=no \ + MK_SSP=no \ MK_TESTS=no \ MK_WERROR=no \ MK_ZFS=no diff --git a/Makefile.libcompat b/Makefile.libcompat index 7238c6faf898..3691050b9f69 100644 --- a/Makefile.libcompat +++ b/Makefile.libcompat @@ -99,7 +99,7 @@ build${libcompat}: .PHONY ${_+_}cd ${.CURDIR}/${_dir}; \ WORLDTMP=${WORLDTMP} \ MAKEFLAGS="-m ${.CURDIR}/tools/build/mk ${.MAKEFLAGS}" \ - ${MAKE} SSP_CFLAGS= DESTDIR= \ + ${MAKE} DESTDIR= \ OBJTOP=${LIBCOMPAT_OBJTOP} \ OBJROOT='$${OBJTOP}/' \ MAKEOBJDIRPREFIX= \ @@ -108,6 +108,7 @@ build${libcompat}: .PHONY -DNO_CPU_CFLAGS \ MK_CTF=no \ MK_RETPOLINE=no \ + MK_SSP=no \ MK_WERROR=no \ ${_t} .endfor diff --git a/lib/csu/Makefile.inc b/lib/csu/Makefile.inc index 5681ef65117a..d39722847b4e 100644 --- a/lib/csu/Makefile.inc +++ b/lib/csu/Makefile.inc @@ -1,10 +1,9 @@ # $FreeBSD$ -SSP_CFLAGS= - NO_WMISSING_VARIABLE_DECLARATIONS= .include +MK_SSP= no .if !defined(BUILDING_TESTS) diff --git a/lib/libclang_rt/Makefile.inc b/lib/libclang_rt/Makefile.inc index 946d3f4c77a7..95fa32ba1f66 100644 --- a/lib/libclang_rt/Makefile.inc +++ b/lib/libclang_rt/Makefile.inc @@ -12,10 +12,10 @@ SHLIBDIR= ${LIBDIR} NO_PIC= MK_PROFILE= no +MK_SSP= no WARNS?= 0 -SSP_CFLAGS= CFLAGS+= -DNDEBUG CFLAGS+= -DHAVE_RPC_XDR_H=0 CFLAGS+= -DSANITIZER_SUPPORTS_WEAK_HOOKS=0 diff --git a/stand/defs.mk b/stand/defs.mk index d50c89879613..901c30666835 100644 --- a/stand/defs.mk +++ b/stand/defs.mk @@ -129,8 +129,6 @@ LD_FLAGS+= -m elf_i386_fbsd AFLAGS+= --32 .endif -SSP_CFLAGS= - # Add in the no float / no SIMD stuff and announce we're freestanding # aarch64 and riscv don't have -msoft-float, but all others do. CFLAGS+= -ffreestanding ${CFLAGS_NO_SIMD} diff --git a/targets/pseudo/bootstrap-tools/Makefile b/targets/pseudo/bootstrap-tools/Makefile index 1a7f2bd15ad0..3ac47053a388 100644 --- a/targets/pseudo/bootstrap-tools/Makefile +++ b/targets/pseudo/bootstrap-tools/Makefile @@ -39,7 +39,6 @@ BSARGS= DESTDIR= \ MAKEOBJDIRPREFIX= \ BOOTSTRAPPING=${OSRELDATE} \ BWPHASE=${.TARGET} \ - SSP_CFLAGS= \ -DNO_CPU_CFLAGS \ -DNO_LINT \ -DNO_PIC \ @@ -53,6 +52,7 @@ BSARGS= DESTDIR= \ MK_MAN=no \ MK_PROFILE=no \ MK_RETPOLINE=no \ + MK_SSP=no \ MK_TESTS=no \ MK_WERROR=no \ MK_INCLUDES=yes \