Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Oct 2020 17:47:42 +0000 (UTC)
From:      Brooks Davis <brooks@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r367061 - stable/12/lib/libc/tests/ssp
Message-ID:  <202010261747.09QHlgS6025338@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: brooks
Date: Mon Oct 26 17:47:42 2020
New Revision: 367061
URL: https://svnweb.freebsd.org/changeset/base/367061

Log:
  MFC r366981:
  
  Only use ASAN when using the in-tree compiler
  
  When building FreeBSD 11 on a FreeBSD 12 system with
  CROSS_TOOLCHAIN=llvm10 we end up trying to link against the packaged
  version of the sanitizer library.  This resulted in a requirement for
  getentropy(3) which is not present in FreeBSD 11.
  
  Reviewed by:	emaste
  Differential Revision:	https://reviews.freebsd.org/D26903

Modified:
  stable/12/lib/libc/tests/ssp/Makefile
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/lib/libc/tests/ssp/Makefile
==============================================================================
--- stable/12/lib/libc/tests/ssp/Makefile	Mon Oct 26 17:30:17 2020	(r367060)
+++ stable/12/lib/libc/tests/ssp/Makefile	Mon Oct 26 17:47:42 2020	(r367061)
@@ -6,7 +6,9 @@ NO_WERROR=
 WARNS?=	2
 
 CFLAGS.h_raw+=	-fstack-protector-all -Wstack-protector
-.if ${COMPILER_TYPE} == "clang"
+.if ${COMPILER_TYPE} == "clang" && ${CC} == "cc"
+# Only use -fsanitize=bounds when using the in-tree compiler.  Otherwise
+# we may link to a sanitizer library targeted at a newer kernel/libc.
 CFLAGS.h_raw+=	-fsanitize=bounds
 .elif ${COMPILER_TYPE} == "gcc"
 CFLAGS.h_raw+=	--param ssp-buffer-size=1



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202010261747.09QHlgS6025338>