summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorPaul Menzel <paulepanter@users.sourceforge.net>2017-03-19 20:25:33 +0100
committerMartin Roth <martinroth@google.com>2017-06-09 16:32:54 +0200
commit459d2198ebf855596f41a747719baadbde12d730 (patch)
tree654ab9d6a78880ebf43d81b44fbe2bdd4ba5a958 /util
parent6a67ffb6ea0e05d42222b6159802aa5e18b22f8f (diff)
downloadcoreboot-459d2198ebf855596f41a747719baadbde12d730.tar.xz
msrtool: Remove `no-pic` from `CFLAGS`
Commit 7c634ae8 (msrtool: added support for Intel CPUs) adds `no-pic` to the compiler flags. GCC 7.0.1 20170316 fails to built with the error below. ``` /usr/bin/ld: msrtool.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: msrutils.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: sys.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: linux.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: freebsd.o: relocation R_X86_64_32S against `.data' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: final link failed: Nonrepresentable section on output ``` Removing the flag causes the build to succeed with GCC 7, 6.3, and clang 4.0. Change-Id: I3d7aed27ce7f84aa27305c68e2d5f14607c58ec8 Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-on: https://review.coreboot.org/18907 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Stefan Tauner <stefan.tauner@gmx.at> Reviewed-by: David Hendricks <david.hendricks@gmail.com> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'util')
-rw-r--r--util/msrtool/Makefile.in2
1 files changed, 1 insertions, 1 deletions
diff --git a/util/msrtool/Makefile.in b/util/msrtool/Makefile.in
index 708515f049..3d50f4c498 100644
--- a/util/msrtool/Makefile.in
+++ b/util/msrtool/Makefile.in
@@ -19,7 +19,7 @@ PROGRAM = msrtool
CC = @CC@
INSTALL = @INSTALL@
PREFIX = @PREFIX@
-CFLAGS = @CFLAGS@ -fno-pic
+CFLAGS = @CFLAGS@
LDFLAGS = @LDFLAGS@
TARGETS = geodegx2.o geodelx.o cs5536.o k8.o intel_pentium3_early.o intel_pentium3.o intel_pentium4_early.o intel_pentium4_later.o intel_core1.o intel_core2_early.o intel_core2_later.o intel_nehalem.o intel_atom.o