Skip to content

Instantly share code, notes, and snippets.

@katlogic
Created October 3, 2015 12:18
Show Gist options
  • Save katlogic/62f7f4256223f6c8173e to your computer and use it in GitHub Desktop.
Save katlogic/62f7f4256223f6c8173e to your computer and use it in GitHub Desktop.
diff --git a/src/Makefile b/src/Makefile
index 532da6e..351f99b 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -34,9 +34,9 @@ CC= gcc
# to slow down the C part by not omitting it. Debugging, tracebacks and
# unwinding are not affected -- the assembler part has frame unwind
# information and GCC emits it where needed (x64) or with -g (see CCDEBUG).
-CCOPT= -O2 -fomit-frame-pointer
+#CCOPT= -O2 -fomit-frame-pointer
# Use this if you want to generate a smaller binary (but it's slower):
-#CCOPT= -Os -fomit-frame-pointer
+CCOPT= -O0 -fomit-frame-pointer
# Note: it's no longer recommended to use -O3 with GCC 4.x.
# The I-Cache bloat usually outweighs the benefits from aggressive inlining.
#
@@ -54,7 +54,7 @@ CCOPT_mips=
#
CCDEBUG=
# Uncomment the next line to generate debug information:
-#CCDEBUG= -g
+CCDEBUG= -ggdb
#
CCWARN= -Wall
# Uncomment the next line to enable more warnings:
@@ -97,7 +97,7 @@ XCFLAGS=
# enabled by default. Some other features that *might* break some existing
# code (e.g. __pairs or os.execute() return values) can be enabled here.
# Note: this does not provide full compatibility with Lua 5.2 at this time.
-#XCFLAGS+= -DLUAJIT_ENABLE_LUA52COMPAT
+XCFLAGS+= -DLUAJIT_ENABLE_LUA52COMPAT
#
# Disable the JIT compiler, i.e. turn LuaJIT into a pure interpreter.
#XCFLAGS+= -DLUAJIT_DISABLE_JIT
@@ -133,7 +133,7 @@ XCFLAGS=
# This is the client for the GDB JIT API. GDB 7.0 or higher is required
# to make use of it. See lj_gdbjit.c for details. Enabling this causes
# a non-negligible overhead, even when not running under GDB.
-#XCFLAGS+= -DLUAJIT_USE_GDBJIT
+XCFLAGS+= -DLUAJIT_USE_GDBJIT
#
# Turn on assertions for the Lua/C API to debug problems with lua_* calls.
# This is rather slow -- use only while developing C libraries/embeddings.
@@ -141,7 +141,7 @@ XCFLAGS=
#
# Turn on assertions for the whole LuaJIT VM. This significantly slows down
# everything. Use only if you suspect a problem with LuaJIT itself.
-#XCFLAGS+= -DLUA_USE_ASSERT
+XCFLAGS+= -DLUA_USE_ASSERT
#
##############################################################################
# You probably don't need to change anything below this line!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment