From 0703c968caef660adbad0677b2112887cdc9b18c Mon Sep 17 00:00:00 2001 From: Austin Harris Date: Sat, 11 Sep 2021 19:23:02 -0500 Subject: [PATCH] scons: Setup the m4 tool for libelf This resolves an error that SConsEnvironment has no attribute 'm4' on some systems. Change-Id: I9dfce277308d1939c3bd392f83dc49937884660e Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50259 Reviewed-by: Gabe Black Maintainer: Gabe Black Tested-by: kokoro --- ext/libelf/SConscript | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ext/libelf/SConscript b/ext/libelf/SConscript index f3dbe6ae7b..a5f3569c9d 100644 --- a/ext/libelf/SConscript +++ b/ext/libelf/SConscript @@ -116,6 +116,9 @@ if not SCons.Tool.m4.exists(m4env): "Please install M4 and try again.") Exit(1) +# Setup m4 tool +m4env.Tool('m4') + m4env.Append(M4FLAGS=['-DSRCDIR=%s' % Dir('.').path]) m4env['M4COM'] = '$M4 $M4FLAGS $SOURCES > $TARGET' m4env.M4(target=File('libelf_convert.c'),