util: Build m5 with -no-pie flag
authorRyan Gambord <gambordr@oregonstate.edu>
Mon, 18 Mar 2019 08:08:32 +0000 (01:08 -0700)
committerRyan Gambord <gambordr@oregonstate.edu>
Tue, 19 Mar 2019 00:13:50 +0000 (00:13 +0000)
Added -no-pie flag to link /util/m5 to support newer versions of GCC
that enable PIE by default. Tested for backwards compatibility with GCC
4.3, which, only warns for the unrecognized flag.

Change-Id: I4b6df593936346b9d3e2fe29a5d85dde78b7cc5e
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/17429
Reviewed-by: Gabe Black <gabeblack@google.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>

util/m5/Makefile.x86

index 89f8f923145e43660c30b14ae2cf3ca4aff22e07..c108ef6962de513ae7a2b918bacd5bf964dafe49 100644 (file)
@@ -51,7 +51,7 @@ all: m5
        $(CC) $(CFLAGS) -fPIC -o $@ -c $<
 
 m5: $(OBJS)
-       $(CC) -o $@ $(OBJS)
+       $(CC) -o $@ $(OBJS) -no-pie
 
 m5op_x86.opic: m5op_x86.S
        $(CC) $(CFLAGS) -DM5OP_PIC -fPIC -o $@ -c $<