mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-04-20 05:53:26 +00:00
hardened binary
This commit is contained in:
parent
3a75273a21
commit
773f2d7d0a
@ -35,7 +35,7 @@ CC= $(DEFAULT_CC)
|
|||||||
# to slow down the C part by not omitting it. Debugging, tracebacks and
|
# to slow down the C part by not omitting it. Debugging, tracebacks and
|
||||||
# unwinding are not affected -- the assembler part has frame unwind
|
# unwinding are not affected -- the assembler part has frame unwind
|
||||||
# information and GCC emits it where needed (x64) or with -g (see CCDEBUG).
|
# information and GCC emits it where needed (x64) or with -g (see CCDEBUG).
|
||||||
CCOPT= -O2 -fomit-frame-pointer
|
CCOPT= -O2 -fomit-frame-pointer -g -D_FORTIFY_SOURCE=3 -Wstack-protector -fstack-protector-strong -fstack-clash-protection -pie -fPIE -Wl,-z,rel -Wl,dynamicbase -Wl,nxcompat -fvtable-verify=std
|
||||||
# Use this if you want to generate a smaller binary (but it's slower):
|
# Use this if you want to generate a smaller binary (but it's slower):
|
||||||
#CCOPT= -Os -fomit-frame-pointer
|
#CCOPT= -Os -fomit-frame-pointer
|
||||||
# Note: it's no longer recommended to use -O3 with GCC 4.x.
|
# Note: it's no longer recommended to use -O3 with GCC 4.x.
|
||||||
@ -311,8 +311,8 @@ ifeq (Windows,$(TARGET_SYS))
|
|||||||
TARGET_DYNXLDOPTS=
|
TARGET_DYNXLDOPTS=
|
||||||
else
|
else
|
||||||
TARGET_AR+= 2>/dev/null
|
TARGET_AR+= 2>/dev/null
|
||||||
ifeq (,$(shell $(TARGET_CC) -o /dev/null -c -x c /dev/null -fno-stack-protector 2>/dev/null || echo 1))
|
ifeq (,$(shell $(TARGET_CC) -o /dev/null -c -x c /dev/null 2>/dev/null || echo 1))
|
||||||
TARGET_XCFLAGS+= -fno-stack-protector
|
TARGET_XCFLAGS+=
|
||||||
endif
|
endif
|
||||||
ifeq (Darwin,$(TARGET_SYS))
|
ifeq (Darwin,$(TARGET_SYS))
|
||||||
ifeq (,$(MACOSX_DEPLOYMENT_TARGET))
|
ifeq (,$(MACOSX_DEPLOYMENT_TARGET))
|
||||||
|
Loading…
Reference in New Issue
Block a user