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 <gabe.black@gmail.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
Austin Harris
2021-09-11 19:23:02 -05:00
parent 5eff9b5e9b
commit 0703c968ca

View File

@@ -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'),