From 459d2198ebf855596f41a747719baadbde12d730 Mon Sep 17 00:00:00 2001 From: Paul Menzel Date: Sun, 19 Mar 2017 20:25:33 +0100 Subject: 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 Reviewed-on: https://review.coreboot.org/18907 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Tauner Reviewed-by: David Hendricks Reviewed-by: Stefan Reinauer --- util/msrtool/Makefile.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'util/msrtool/Makefile.in') 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 -- cgit v1.2.3