yetist / ios-toolchain-based-on-clang-for-linux

Automatically exported from code.google.com/p/ios-toolchain-based-on-clang-for-linux
0 stars 0 forks source link

very good toolchain #1

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Built everything on Linux 64 box. 
Tested app on iphone4.
This setup is better than ios native build method.

When building cctools I have to set CPPFLAGS=" -D__STDC_LIMIT_MACROS 
-D__STDC_CONSTANT_MACROS" 

Original issue reported on code.google.com by titan....@gmail.com on 16 Dec 2012 at 12:29

GoogleCodeExporter commented 9 years ago
These macros is related to "stdint.h".
Could you provide more information where the error happened during building 
cctools without these macros defined.

Or Can I directly define these macros in project files?

Original comment by cjac...@gmail.com on 16 Dec 2012 at 10:33

GoogleCodeExporter commented 9 years ago
This problem is LLVM related. On my system without macro define you will get 
errors.
Since we are using LLVM trunk version we can either sync cctools code with LLVM 
or just put a FAQ session in WIKI for known issues.

====== errors without macro
In file included from ../../libstuff/llvm.c:7:
In file included from /usr/local/clang/include/llvm-c/Disassembler.h:18:
/usr/local/clang/include/llvm/Support/DataTypes.h:49:3: error: "Must #define
      __STDC_LIMIT_MACROS before #including Support/DataTypes.h"
# error "Must #define __STDC_LIMIT_MACROS before #including Support/DataTypes.h"
  ^
/usr/local/clang/include/llvm/Support/DataTypes.h:53:3: error: "Must #define
      __STDC_CONSTANT_MACROS before "         "#including Support/DataTypes.h"
# error "Must #define __STDC_CONSTANT_MACROS before " \
  ^
2 errors generated.

Original comment by titan....@gmail.com on 16 Dec 2012 at 8:46

GoogleCodeExporter commented 9 years ago
Got it, It seems that the system level llvm-c/Disassembler.h had been included 
when compilation instead of the local copy of this header provide by cctools.

You can have a look at cctools/include/llvm-c, there is a copy of this header 
file shipped by Apple witll cctools.

Anyway, define these two macros in configure files should be safe. I will fix 
it in SVN, and ship it with next release.

Original comment by cjac...@gmail.com on 17 Dec 2012 at 1:45

GoogleCodeExporter commented 9 years ago

Original comment by cjac...@gmail.com on 17 Dec 2012 at 4:01