Makefile: use -fPIC instead of -fPIE

According to the gcc docs:
  These options are similar to -fpic and -fPIC, but generated position
  independent code can be only linked into executables

Example failure when linking against shared library:

FAILED: lib/
x86_64-cros-linux-gnu-clang++ -shared -Wl,-O2 -Wl,--as-needed
-Wl,--gc-sections -Wl,--icf=all -Wl,-z,relro -Wl,-z,noexecstack
-Wl,-z,now -Wl,--as-needed --sysroot=/build/hatch -o
./lib/ -Wl,
ld.lld: error: relocation R_X86_64_PC32 cannot be used against symbol
subprocess_stdin; recompile with -fPIC
>>> defined in
>>> referenced by subprocess.c:278 (host/lib/subprocess.c:278)
>>>               subprocess.o:(subprocess_run) in archive

TEST=FEATURES="test" emerge-hatch vboot_reference

Change-Id: I5cda8dbe87d20d1b4b659459d861bc04f492e3e5
Signed-off-by: Tom Hughes <>
Commit-Queue: Julius Werner <>
Reviewed-by: Julius Werner <>
1 file changed