Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 Aug 2016 02:04:55 +0000 (UTC)
From:      Ngie Cooper <ngie@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r305041 - head/lib/atf/libatf-c
Message-ID:  <201608300204.u7U24tdC025791@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ngie
Date: Tue Aug 30 02:04:55 2016
New Revision: 305041
URL: https://svnweb.freebsd.org/changeset/base/305041

Log:
  Filter certain compile-time options into -DATF_BUILD_*
  
  Items filtered through are:
  
  - Constant defines (-D)
  - Include flags (-I)
  - Linker flags (-L)
  - Optimization level (-O)
  - Warnings / linker flags (-W)
  - Preprocessor options (-f)
  
  This fixes the scenario hit by the Jenkins job where it's infecting
  the build with --sysroot, etc options from the Jenkins build in the
  tests.
  
  Prefix all intermediate variables (_CFLAGS, etc) with "ATF_BUILD" [*].
  
  MFC after:	2 weeks
  Reported by:	Jenkins
  Requested by:	jmmv
  Reviewed by:	jmmv
  Sponsored by:	EMC / Isilon Storage Division
  Differential Revision:	https://reviews.freebsd.org/D7702

Modified:
  head/lib/atf/libatf-c/Makefile

Modified: head/lib/atf/libatf-c/Makefile
==============================================================================
--- head/lib/atf/libatf-c/Makefile	Tue Aug 30 01:58:49 2016	(r305040)
+++ head/lib/atf/libatf-c/Makefile	Tue Aug 30 02:04:55 2016	(r305041)
@@ -28,9 +28,9 @@
 .include <src.opts.mk>
 .include <bsd.init.mk>
 
-_CFLAGS:=	${CFLAGS}
-_CPPFLAGS:=	${CPPFLAGS}
-_CXXFLAGS:=	${CXXFLAGS}
+ATF_BUILD_CFLAGS:=	${CFLAGS:M-[DILOWf]*}
+ATF_BUILD_CPPFLAGS:=	${CPPFLAGS:M-[DILOWf]*}
+ATF_BUILD_CXXFLAGS:=	${CXXFLAGS:M-[DILOWf]*}
 
 LIB=		atf-c
 PRIVATELIB=	true
@@ -42,11 +42,11 @@ ATF=		${SRCTOP}/contrib/atf
 .PATH:		${ATF}/atf-c/detail
 
 CFLAGS+=	-DATF_BUILD_CC='"${CC}"'
-CFLAGS+=	-DATF_BUILD_CFLAGS='"${_CFLAGS}"'
+CFLAGS+=	-DATF_BUILD_CFLAGS='"${ATF_BUILD_CFLAGS}"'
 CFLAGS+=	-DATF_BUILD_CPP='"${CPP}"'
-CFLAGS+=	-DATF_BUILD_CPPFLAGS='"${_CPPFLAGS}"'
+CFLAGS+=	-DATF_BUILD_CPPFLAGS='"${ATF_BUILD_CPPFLAGS}"'
 CFLAGS+=	-DATF_BUILD_CXX='"${CXX}"'
-CFLAGS+=	-DATF_BUILD_CXXFLAGS='"${_CXXFLAGS}"'
+CFLAGS+=	-DATF_BUILD_CXXFLAGS='"${ATF_BUILD_CXXFLAGS}"'
 CFLAGS+=	-I${ATF}
 CFLAGS+=	-I${.CURDIR}
 CFLAGS+=	-I.



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