delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2013/06/23/19:42:55

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:mime-version:date:message-id:subject:from:to
:content-type; q=dns; s=default; b=k806+7h6HXQelSPBaRSf+pl8H8UAL
IG1U1xTmXzE6fj8qfrl6I+gNR/kMZhGr3ATVivxs08kTg+fOmUlYSzkYi4WA1XpV
X0I2OBkbvEiJPAVR7BU/GhFQjT/H0I7J+Ze/sIw/92S/aU32AZwFO0yiFeWVWPn+
V2lSQPhTb9Ly64=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:mime-version:date:message-id:subject:from:to
:content-type; s=default; bh=F3oNdy8qVpaSXBli2S2zSLT/plY=; b=rxw
LhC4KK9BY0xP+KEKSJQCAT3KNUncuT+gY6NoN7SqAQMmCey5a6oN6gK81Jp97byF
v3BtpIXEzfzDe9VjhXRcdpw7xDJcaaPpzoYfdE7P6vBfZIQcYJs8VZUUriIkw49v
DJxjUdzXDQaPQO1APBjHhfpglYFXEOGaGYcfanFo=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
X-Spam-SWARE-Status: No, score=2.5 required=5.0 tests=AWL,BAYES_00,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE,SPF_PASS autolearn=ham version=3.3.1
MIME-Version: 1.0
X-Received: by 10.220.181.69 with SMTP id bx5mr9956118vcb.71.1372030958163; Sun, 23 Jun 2013 16:42:38 -0700 (PDT)
Date: Sun, 23 Jun 2013 19:42:38 -0400
Message-ID: <CAAwD7mb-_PNnpxNdsq57_AvBY27gZR9=XZUgKvBW0TjbdFDS1g@mail.gmail.com>
Subject: Cygwin and clang
From: Keith Smith <fernleaf07 AT gmail DOT com>
To: cygwin AT cygwin DOT com

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019