Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: Fix previous: HAVE_GCC needs to be checked in addit...
details: https://anonhg.NetBSD.org/src/rev/0d4bdaff272b
branches: trunk
changeset: 318338:0d4bdaff272b
user: martin <martin%NetBSD.org@localhost>
date: Wed Apr 18 09:29:35 2018 +0000
description:
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).
diffstat:
sys/arch/amd64/conf/Makefile.amd64 | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diffs (19 lines):
diff -r 8222ee6477dc -r 0d4bdaff272b sys/arch/amd64/conf/Makefile.amd64
--- a/sys/arch/amd64/conf/Makefile.amd64 Wed Apr 18 09:20:42 2018 +0000
+++ b/sys/arch/amd64/conf/Makefile.amd64 Wed Apr 18 09:29:35 2018 +0000
@@ -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 @@
# 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
Home |
Main Index |
Thread Index |
Old Index