util: Add some additional flags for files in the m5 util.
authorGabe Black <gabeblack@google.com>
Wed, 25 Mar 2020 06:49:25 +0000 (23:49 -0700)
committerGabe Black <gabeblack@google.com>
Sun, 26 Apr 2020 11:15:16 +0000 (11:15 +0000)
commitda21567d2cfb0a4279d3a6c8ebe2aa01fa7b7306
tree4bb93ae97b92d11e8c50964945f0f3ed1d29c77d
parent93933b44654e5e1f94cdbdc3efed84aa4a642b82
util: Add some additional flags for files in the m5 util.

When compiling static objects, disable pie with the -no-pie linker flag.
This is necessary for x86, and doesn't seem to hurt anything for the
other variants.

When compiling shared objects, particularly the assembly files which
can't rely on the compiler to generate position independent code, define
M5OP_PIC so that the assembly code can configure itself correctly.

Change-Id: I80d1ea7a7704666027e74228036af5e0e4b9eac2
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/27218
Reviewed-by: Matthew Poremba <matthew.poremba@amd.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
util/m5/src/SConscript