From owner-freebsd-hackers@FreeBSD.ORG Sun May 30 12:51:22 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 28AE5106566B; Sun, 30 May 2010 12:51:22 +0000 (UTC) (envelope-from hinokind@gmail.com) Received: from mail-ew0-f209.google.com (mail-ew0-f209.google.com [209.85.219.209]) by mx1.freebsd.org (Postfix) with ESMTP id 7E69B8FC0A; Sun, 30 May 2010 12:51:21 +0000 (UTC) Received: by ewy1 with SMTP id 1so666494ewy.13 for ; Sun, 30 May 2010 05:51:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:content-type:to:cc:subject :references:date:mime-version:content-transfer-encoding:from :message-id:in-reply-to:user-agent; bh=CaIdvbOOj6dMFDYpd/5PHOXGICAaSzRjfPL1UXPc+2E=; b=rnWcogW4ckR8NNRHJeWY/1M9B/CD5mNOyu5B2D+PkghW9UYRj7eO+nCpFsJM3E+gjM pPiu0DX9Wab80BHRwgTrvcdzA2qERsqK/XqRy+KV+E0k1iuPi9XhiV8akJuPffcrKs8G LgL34kzVy8p5eJUmJlVwSXk7fLR+ulqPU38GQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=content-type:to:cc:subject:references:date:mime-version :content-transfer-encoding:from:message-id:in-reply-to:user-agent; b=QDN8GAJYG7Fw7TwY3WrglcRuu4I4M62THmh4HTbN1w99z9FdXBVoKdNFSFJ05Ln2hc 1bOnle8QQsW6Iv7Kfy3POOyLYDuxZYPVmRya/A02XVvbZwdRovgW4LZBouWOrKVe+101 4SuZEW1f34i7TdhtEE+QHFuVP/UXOLSQCWPGs= Received: by 10.213.32.195 with SMTP id e3mr3859446ebd.14.1275223880278; Sun, 30 May 2010 05:51:20 -0700 (PDT) Received: from klevas (hst-17-80.splius.lt [77.79.17.80]) by mx.google.com with ESMTPS id 16sm2377647ewy.7.2010.05.30.05.51.18 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 30 May 2010 05:51:19 -0700 (PDT) Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: "Volodymyr Kostyrko" , freebsd-hackers@freebsd.org References: <4BDD28E2.8010201@rawbw.com> Date: Sun, 30 May 2010 15:51:17 +0300 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: =?utf-8?B?QW5kcml1cyBNb3JrxatuYXM=?= Message-ID: In-Reply-To: User-Agent: Opera Mail/10.10 (FreeBSD) Cc: freebsd-ports@freebsd.org Subject: Re: GSoC: Making ports work with clang X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 May 2010 12:51:22 -0000 On Sun, 30 May 2010 14:58:05 +0300, Volodymyr Kostyrko wrote: > 1. __dso not found after link. Some symbols seems to be omitted from > libraries and linking of plugins fails badly. Known problem with known fix. > 2. Assembler errors. Xorg has some in x11-servers/xorg-server > x11-drivers/xf86-video-vesa x11-drivers/xf86-video-ati, everything else > compiles and works. Assembler errors often aren't similar to each other, so fixing them may be very easy or difficult. Hopefully we will fix them for big stuff like xorg (not really as part of this GSoC project). > 3. Big bunch of compile errors or config errors. This means incorrectly > written code, like not correctly declaring variables. This also means > some automake stupidities like testing c++ compiler with c style code - > for example clang++ refuses to compile "int main(void) {}". $ cat main.cc int main(void) {} $ clang main.cc -o test && ./test && echo "No, it works." No, it works. Other than that, yes, many problems are related to insane configure scripts. > 4. Some ports specify that thay need at least gcc 3.3. This is another of those insane configure scripts, testing for specific version of specific compiler, rather than testing if it can compile anything. > 5. Some ports needs --dumpspecs. It's a bit uglier than "some ports": $ grep dumpspecs /usr/ports/Mk/bsd.gecko.mk GECKO_PTHREAD_LIBS!=${CC} -dumpspecs | ${GREP} -m 1 pthread: | ${SED} -e 's|^.*%{\!pg: %{pthread:|| ; s|}.*$$||' || ${TRUE} > audio/libmad - distorted sound > lang/python26 - compiling any gir dumps core > textproc/expat2 - dbus dumps core at launch Python and expat shout i386 in my face, clang/llvm tends to not like i386 too much. But I think few miscompilations were fixed recently, so some of these may already be working fine. > And this all data is not current. It's one month old. Since then > dumpspecs was implemented. And maybe some other problems begone - I just > have not enough time to look at this thoroughly. Some problems from a month ago are definitely gone, but I don't think dumpspecs is one of them. -- Andrius