[cfe-dev] Building llvmgcc using MinGW64

Ruben Van Boxem vanboxem.ruben at gmail.com
Mon Sep 26 03:06:30 PDT 2011


2011/9/26 陈晓宇 <xychen0921 at gmail.com>

> Thanks for your reply. The problem is we were not using pure
> llvmgcc(otherwise we should be able to use gcc4.6+dragonegg, I think), and a
> lot changes were made to llvmgcc for our own purpose. If we switch our
> compiler to clang, there will be a lot of manual patch work... Maybe the
> MinGW patch for gcc4.4 can be useful for me.


GCC 4.2 is unusable for Windows x64. 4.3 is buggy, 4.4 is buggy but
workable. I think you'll have better luck using a standard released compiler
(implying manual patchwork, I hope you mean to your codebase, not Clang's).

MinGW-w64 + GCC's older than 4.4 is a no-go. Sorry.

Ruben

2011/9/26 Ruben Van Boxem <vanboxem.ruben at gmail.com>
>
>> 2011/9/26 陈晓宇 <xychen0921 at gmail.com>
>>
>>> I was building llvmgcc using MinGW64 and met following error. Any idea
>>> how to get rid of this problem?
>>>
>>> /home/xchen/MinGWSrcLLVM/llvmgcc/build/./gcc/xgcc
>>> -B/home/xchen/MinGWSrcLLVM/llv
>>> mgcc/build/./gcc/
>>> -L/home/xchen/MinGWSrcLLVM/llvmgcc/build/x86_64-w64-mingw32/wi
>>> nsup/mingw
>>> -L/home/xchen/MinGWSrcLLVM/llvmgcc/build/x86_64-w64-mingw32/winsup/w3
>>> 2api/lib -isystem /home/xchen/MinGWSrcLLVM/llvmgcc/winsup/mingw/include
>>> -isystem
>>>  /home/xchen/MinGWSrcLLVM/llvmgcc/winsup/w32api/include
>>> -B/home/xchen/MinGWSrcLL
>>> VM/myprefix/x86_64-w64-mingw32/bin/
>>> -B/home/xchen/MinGWSrcLLVM/myprefix/x86_64-w
>>> 64-mingw32/lib/ -isystem
>>> /home/xchen/MinGWSrcLLVM/myprefix/x86_64-w64-mingw32/in
>>> clude -isystem
>>> /home/xchen/MinGWSrcLLVM/myprefix/x86_64-w64-mingw32/sys-include
>>> -O2 -O2 -g -O2  -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -DNATIVE_CROSS   -W
>>> -Wall -
>>> Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes
>>> -Wold-style-definition
>>> -isystem ./include  -I. -I. -I../../gcc -I../../gcc/.
>>> -I../../gcc/../include -I.
>>> ./../gcc/../libcpp/include  -I../../gcc/../libdecnumber -I../libdecnumber
>>> -I/hom
>>> e/xchen/llvm2.7-obj/include -I/home/xchen/llvm2.7/include  -g0
>>> -finhibit-size-di
>>> rective -fno-inline-functions -fno-exceptions
>>> -fno-zero-initialized-in-bss -fno-
>>> toplevel-reorder -Dinhibit_libc -c -o crtbegin.o \
>>>         ../../gcc/config/i386/cygming-crtbegin.c
>>> ../../gcc/config/i386/cygming-crtbegin.c:1: error: -malign-double makes
>>> no sense
>>>  in the 64bit mode
>>> make[1]: *** [crtbegin.o] Error 1
>>> make[1]: Leaving directory `/home/xchen/MinGWSrcLLVM/llvmgcc/build/gcc'
>>> make: *** [all-gcc] Error 2
>>>
>>>
>>> ../llvmgcc/configure --prefix=/home/xchen/llvmgcc-install
>>> --enable-llvm=/home/xchen/llvm2.7-obj --enable-languages=c,c++
>>> --disable-threads --program-prefix=llvm-  --disable-bootstrap
>>> --enable-checking=release --disable-shared --disable-nls --disable-c-mbchar
>>> --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32 --disable-multilib
>>>
>>
>> If I'm not mistaken, llvm-gcc is based on GCC 4.2. MinGW-w64 only started
>> existing around GCC 4.3, with a working implementation at GCC 4.4 (with lots
>> of local patches required) and a vanilla (unpatched) implementation at GCC
>> 4.5+. I think you're currently out of luck here. Why not try Clang itself
>> (if you don't need fortran or any other non-C family language of course)?
>>
>> Ruben
>>
>>
>>>
>>> Thanks & Regards
>>>
>>> _______________________________________________
>>> cfe-dev mailing list
>>> cfe-dev at cs.uiuc.edu
>>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20110926/3e2e25bc/attachment.html>


More information about the cfe-dev mailing list