public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Cygwin and clang
@ 2013-06-24  4:37 Keith Smith
  2013-06-24  7:53 ` marco atzeri
  0 siblings, 1 reply; 2+ messages in thread
From: Keith Smith @ 2013-06-24  4:37 UTC (permalink / raw)
  To: cygwin

Dear List:


I am attempting to build llvm/clang using Cygwin and gcc. Below are
the results. I am able to build clang, but clang does not build clang.

I noticed that Cygwin has version 3.1 available.

Was there any modifications to llvm/clang necessary to get 3.1 to
build properly?
--------------------------------
Building llvm/clang 3.3 under Cygwin

Step 1)

CC=gcc CXX=g++ ../llvm3.3/configure
make -j4

works just fine.
This builds the debug with asserts. Not the sharpest knife in the
drawer, but it builds.

There is a warning during configure, 'mmap() of a fixed address
required but not supported.'
 It appears to be a bug in the configure file. Performing a Google
search one finds reports
that mmap() is supported under Cygwin, but is not properly discovered.

Step 2)

Start again

rm -r *
CC=gcc CXX=g++ ../llvm3.3/configure --enable-optimized
make -j4

works just fine.

Step 3)

make install

 No errors.

Step 4)
Build clang with clang

rm -r *
CC=clang CXX=clang ../llvm3.3/configure --enable-optimized
make -j4

Now we get the following error. A lot more errors of similar nature.

llvm[2]: Linking Release+Asserts executable FileUpdate (without symbols)
/cygdrive/c/OpenSource/llvmbuild3-3/utils/FileUpdate/Release+Asserts/FileUpdate.o:fake:(.text+0x2e):
undefined reference to `std::basic_string<char,
std::char_traits<char>, std::allocator<char>
>::_Rep::_S_empty_rep_storage'
 /cygdrive/c/OpenSource/llvmbuild3-3/utils/FileUpdate/Release+Asserts/FileUpdate.o:fake:(.text+0x63):
undefined reference to `std::basic_string<char,
std::char_traits<char>, std::allocator<char>
>::_Rep::_M_destroy(std::allocator<char> const&)'

Step 4a)
Repeat without optimization.

rm -r *
CC=clang CXX=clang ../llvm3.3/configure
make -j4

Similar errors.

-------------------------------------------------------

Building llvm/clang 3.3 under Cygwin using cmake

Now try all of the above, but this time use cmake.
Unfortunately Cygwin no longer exports _WIN32, so it is defined
below. It is required to get _YUGA_LITTLE_ENDIAN and _YUGA_BIG_ENDIAN
 defined in /compiler-rt/lib/int_endianness.h

Step C1)

CC=gcc CXX=g++  CMAKE_LEGACY_CYGWIN_WIN32=1
CMAKE_C_FLAGS="-D_WIN32=1" CMAKE_CXX_FLAGS="-D_WIN32=1"
 cmake ../llvm-3-3

Get the error

/cygdrive/c/OpenSource/llvm-3-3/projects/compiler-rt/lib/int_endianness.h:106:2:
error: #error Unable to determine endian

Step C2)

rm -r *
CC=gcc CXX=g++  CMAKE_LEGACY_CYGWIN_WIN32=1
CMAKE_C_FLAGS="-D_YUGA_LITTLE_ENDIAN=1 -D_YUGA_BIG_ENDIAN=0"
CMAKE_CXX_FLAGS="-D_YUGA_LITTLE_ENDIAN=1 -D_YUGA_BIG_ENDIAN=0"
cmake ../llvm-3-3

Get same error.

What am I doing wrong?

Keith Smith

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Cygwin and clang
  2013-06-24  4:37 Cygwin and clang Keith Smith
@ 2013-06-24  7:53 ` marco atzeri
  0 siblings, 0 replies; 2+ messages in thread
From: marco atzeri @ 2013-06-24  7:53 UTC (permalink / raw)
  To: cygwin

Il 6/24/2013 1:42 AM, Keith Smith ha scritto:
> Dear List:
>
>
> I am attempting to build llvm/clang using Cygwin and gcc. Below are
> the results. I am able to build clang, but clang does not build clang.
>
> I noticed that Cygwin has version 3.1 available.
>
> Was there any modifications to llvm/clang necessary to get 3.1 to
> build properly?

Suggestion:
all the info are available on the source package
that you can download from setup.exe.
Just check the "Src?" tick for clang when chosing the package
the sources will drop on "/usr/src"

>
> Keith Smith

Marco


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-06-24  4:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-24  4:37 Cygwin and clang Keith Smith
2013-06-24  7:53 ` marco atzeri

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).