Skip to content
Permalink
Browse files

x86_64: Compile with fPIC for relocatable PEs for UEFI

XXX: Note the XXX comment within the patch contents of this commit.
  • Loading branch information...
AmaanC committed Jun 5, 2018
1 parent 6c80ac3 commit 547ef85a7f176046b2cb06a34b1e312c4986e97f
Showing with 9 additions and 0 deletions.
  1. +9 −0 bsps/x86_64/amd64/config/amd64.cfg
@@ -6,4 +6,13 @@ RTEMS_CPU = x86_64
CFLAGS_OPTIMIZE_V += -O2 -g
CFLAGS_OPTIMIZE_V += -ffunction-sections -fdata-sections

CPU_CFLAGS = -fPIC
CPU_CFLAGS += -fno-stack-protector -fshort-wchar -mno-red-zone -DEFI_FUNCTION_WRAPPER

LDFLAGS = -Wl,--gc-sections
LDFLAGS += -Wl,-znocombreloc,-Bsymbolic

# XXX: This needs to be in LDFLAGS to prevent CPU_FLAGS from causing configure
# to mistakenly think that the compiler doesn't work normally because of
# unresolved symbols throwing errors when the "-shared" option is used.
LDFLAGS += -shared

0 comments on commit 547ef85

Please sign in to comment.
You can’t perform that action at this time.