mirror of https://github.com/sm64pc/sm64pc.git
Add NO_PIE option
This commit is contained in:
parent
0f68537e09
commit
f9a26149eb
11
Makefile
11
Makefile
|
@ -30,6 +30,9 @@ TARGET_WEB ?= 0
|
|||
# Makeflag to enable OSX fixes
|
||||
OSX_BUILD ?= 0
|
||||
|
||||
# Enable -no-pie linker option
|
||||
NO_PIE ?= 1
|
||||
|
||||
# Specify the target you are building for, TARGET_BITS=0 means native
|
||||
TARGET_ARCH ?= native
|
||||
TARGET_BITS ?= 0
|
||||
|
@ -638,9 +641,13 @@ else ifeq ($(OSX_BUILD),1)
|
|||
LDFLAGS := -lm $(BACKEND_LDFLAGS) -no-pie -lpthread
|
||||
|
||||
else
|
||||
LDFLAGS := $(BITS) -march=$(TARGET_ARCH) -lm $(BACKEND_LDFLAGS) -no-pie -lpthread
|
||||
LDFLAGS := $(BITS) -march=$(TARGET_ARCH) -lm $(BACKEND_LDFLAGS) -lpthread -ldl
|
||||
ifeq ($(NO_PIE), 1)
|
||||
LDFLAGS += -no-pie
|
||||
endif
|
||||
|
||||
ifeq ($(DISCORDRPC),1)
|
||||
LDFLAGS += -ldl -Wl,-rpath .
|
||||
LDFLAGS += -Wl,-rpath .
|
||||
endif
|
||||
|
||||
endif # End of LDFLAGS
|
||||
|
|
Loading…
Reference in New Issue