Module Name: src Committed By: martin Date: Wed Apr 18 09:29:36 UTC 2018
Modified Files: src/sys/arch/amd64/conf: Makefile.amd64 Log Message: Fix previous: HAVE_GCC needs to be checked in additon to SPECTRE_V2_GCC_MITIGATION, but SPECTRE_V2_GCC_MITIGATION being empty is not a good enough check as it can't be overwritte on the make command line. Now I can do: "make SPECTRE_V2_GCC_MITIGATION=0" (e.g. when my gcc is too old for having the indirect-branch options). To generate a diff of this commit: cvs rdiff -u -r1.68 -r1.69 src/sys/arch/amd64/conf/Makefile.amd64 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/amd64/conf/Makefile.amd64 diff -u src/sys/arch/amd64/conf/Makefile.amd64:1.68 src/sys/arch/amd64/conf/Makefile.amd64:1.69 --- src/sys/arch/amd64/conf/Makefile.amd64:1.68 Wed Apr 18 09:20:42 2018 +++ src/sys/arch/amd64/conf/Makefile.amd64 Wed Apr 18 09:29:35 2018 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.amd64,v 1.68 2018/04/18 09:20:42 martin Exp $ +# $NetBSD: Makefile.amd64,v 1.69 2018/04/18 09:29:35 martin Exp $ # Makefile for NetBSD # @@ -43,7 +43,8 @@ CFLAGS+= -msoft-float # For gcc we might need this, but other compilers barf # CFLAGS+= -mno-fp-ret-in-387 -.if !empty(SPECTRE_V2_GCC_MITIGATION) && ${SPECTRE_V2_GCC_MITIGATION:U0} > 0 +.if !empty(SPECTRE_V2_GCC_MITIGATION) && ${SPECTRE_V2_GCC_MITIGATION:U0} > 0 \ + && ${HAVE_GCC:U0} > 0 CFLAGS+= -mindirect-branch=thunk-inline CFLAGS+= -mindirect-branch-register .endif