[Lldb-commits] [PATCH] linux: fix include in lldb.swig

Stephen Wilson wilsons at start.ca
Wed Dec 15 16:07:33 PST 2010


Hi Johnny,

Johnny Chen <johnny.chen at apple.com> writes:
> I'm building with your proposed diff on Mac OS X.

Great!  Thanks!

> I assumed that you meant:
>
>> +           -I./. -I"/usr/local/include" -D__STDC_LIMIT_MACROS -outdir "$(LLDB_BIN_DIR)" \
>
> correct?

Actually for me (Fedora 11) stdint.h lives under /usr/include.  We
certainly need come additional configure/makefile logic for this to work
portably.

I will look into extending the makefiles to handle this better.


> On Dec 15, 2010, at 3:14 PM, Stephen Wilson wrote:
>
>> 
>> 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)"
>> 
>> 
>> _______________________________________________
>> lldb-commits mailing list
>> lldb-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits
>



--
steve



More information about the lldb-commits mailing list