[LLVMdev] Error building compiler-rt

Pranav Garg pranav.garg2107 at gmail.com
Wed Jul 31 13:09:44 PDT 2013


Hi,

I am trying to build llvm along with clang and compiler-rt. When I run
make, I am getting the following compilation error (I tried compiling
llvm-3.2, which is what I need for my project, but also tried llvm-3.3 and
the current llvm source from the git repository).

...
  COMPILE:   clang_linux/full-x86_64/x86_64:
/home/pranav/smack-project/llvm/src/projects/compiler-rt/lib/enable_execute_stack.c
/home/pranav/smack-project/llvm/src/projects/compiler-rt/lib/enable_execute_stack.c:53:29:
error: cast to 'unsigned char *' from smaller integer type 'unsigned int'
      [-Werror,-Wint-to-pointer-cast]
        unsigned char* startPage = (unsigned char*)(p & pageAlignMask);
                                   ^
/home/pranav/smack-project/llvm/src/projects/compiler-rt/lib/enable_execute_stack.c:54:27:
error: cast to 'unsigned char *' from smaller integer type 'unsigned int'
      [-Werror,-Wint-to-pointer-cast]
        unsigned char* endPage = (unsigned
char*)((p+TRAMPOLINE_SIZE+pageSize) & pageAlignMask);
                                 ^
2 errors generated.
...

On gcc --version I get the following output:
        gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
My operating system is a Ubuntu 12.04.1 LTS. On typing uname -a I get:
        Linux pranav 3.2.0-33-generic-pae #52-Ubuntu SMP Thu Oct 18
16:39:21 UTC 2012 i686 i686 i386 GNU/Linux

Any ideas as to how to resolve this compilation error?

Thanks
Pranav
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130731/c1d32f52/attachment.html>


More information about the llvm-dev mailing list