[Lldb-commits] [PATCH] linux: fix include in lldb.swig
Stephen Wilson
wilsons at start.ca
Wed Dec 15 15:14:55 PST 2010
Hi Greg,
How about the following patch. It makes Swig happy on Linux and we retain
all of the stdint.h constants.
Allow Swig to process stdint.h on Linux.
Define GCC's __extension__ keyword out of existence to make Swig happy when
processing glibc's stdint.h. Also, update the Makefile to include /usr/local in
Swig's search path and define __STDC_LIMIT_MACROS so we get all the constants.
diff --git a/scripts/lldb.swig b/scripts/lldb.swig
index 95c409e..7ba4e01 100644
--- a/scripts/lldb.swig
+++ b/scripts/lldb.swig
@@ -97,6 +97,7 @@
%}
/* Various liblldb typedefs that SWIG needs to know about. */
+#define __extension__
%include <stdint.h>
%include "lldb/lldb-defines.h"
%include "lldb/lldb-enumerations.h"
diff --git a/source/Interpreter/Makefile b/source/Interpreter/Makefile
index 0a9d172..0683a4d 100644
--- a/source/Interpreter/Makefile
+++ b/source/Interpreter/Makefile
@@ -20,5 +20,7 @@ LLDB_BIN_DIR := $(PROJ_OBJ_ROOT)/$(BuildMode)/bin
PYTHON_DIR := $(LLDB_BIN_DIR)
LLDBWrapPython.cpp:
- swig -c++ -shadow -python -I"$(PROJ_SRC_DIR)/$(LLDB_LEVEL)/include" -I./. -outdir "$(LLDB_BIN_DIR)" -o LLDBWrapPython.cpp "$(PROJ_SRC_DIR)/$(LLDB_LEVEL)/scripts/lldb.swig"
+ swig -c++ -shadow -python -I"$(PROJ_SRC_DIR)/$(LLDB_LEVEL)/include" \
+ -I./. -I"/usr/include" -D__STDC_LIMIT_MACROS -outdir "$(LLDB_BIN_DIR)" \
+ -o LLDBWrapPython.cpp "$(PROJ_SRC_DIR)/$(LLDB_LEVEL)/scripts/lldb.swig"
cp "$(PROJ_SRC_DIR)/embedded_interpreter.py" "$(PYTHON_DIR)"
More information about the lldb-commits
mailing list