From owner-freebsd-stable@FreeBSD.ORG Wed Oct 24 07:57:26 2012 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 19D74C58 for ; Wed, 24 Oct 2012 07:57:26 +0000 (UTC) (envelope-from c.kworr@gmail.com) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id DBD058FC0C for ; Wed, 24 Oct 2012 07:57:25 +0000 (UTC) Received: by mail-pb0-f54.google.com with SMTP id rp8so1107859pbb.13 for ; Wed, 24 Oct 2012 00:57:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; bh=Ud+IX1ens0nRSH6+yns0QDMmgSlFplsh1O3ldVLjHnI=; b=bEn7jHJT9C1AAm3wdVQOjtj4Fw6OLZnfn/PmdJBy2AP82WL5ICOmehRqMN/NOrTcNS 8IPa28rK74SFQ908//lxHnhCP6TAQ6KFhOiPcPVy9qmOcVscDHWmCOPD+6z+j1rt2W2y 0Wex9ke4koYUHAY9dkjMkVDIj/iN7rhN/e9n+27AxC3f4rbHoa9UzZbIljs8AiUmqXL5 vhWE+spwtoaq0DyY1RP1MI4uj2ur3t9fHYBvFKd7eX9JOANWzqDnvtSwesC3Akc9Qx5k a4KHFofecR2x4vC+Rx2SId0EjjgNOQ1WQJJyR3/bfires2dH++tp7IiXWdMHlY9UFwck rsDQ== Received: by 10.68.209.170 with SMTP id mn10mr48038815pbc.11.1351065445708; Wed, 24 Oct 2012 00:57:25 -0700 (PDT) Received: from [192.168.1.131] (mau.donbass.com. [92.242.127.250]) by mx.google.com with ESMTPS id nt7sm9074771pbb.33.2012.10.24.00.57.24 (version=SSLv3 cipher=OTHER); Wed, 24 Oct 2012 00:57:25 -0700 (PDT) Message-ID: <50879F62.2010004@gmail.com> Date: Wed, 24 Oct 2012 10:57:22 +0300 From: Volodymyr Kostyrko User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:16.0) Gecko/20121015 Thunderbird/16.0.1 MIME-Version: 1.0 To: freebsd-stable@freebsd.org Subject: wine, gcc and clang with CPUTYPE Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Oct 2012 07:57:26 -0000 Hi all. I just have taken some time to inspect CPUTYPE support for clang. It seems to me that clang generates incorrect code in some cases. The first failure point I discovered was inability to build gcc from sources or compile something with gcc. Code produced by gcc seem to fail whether this was gcc compiled from bootstrap or anything else: http://lists.freebsd.org/pipermail/freebsd-multimedia/2012-October/013469.html I started testing by commenting out CPUTYPE in make.conf. After first rebuild I also updated the ports and installed new version of wine-devel. And to my surprise it works like a charm. Rolling back to the world built with CPUTYPE=native makes wine break again. To my surprise CPUTYPE was not the cause of wine failure per se. Wine continues to work for k6, k6-3, athlon and athlon-tbird. But it completely fails when the world was built with athlon-4 and athlon-xp. Trying to recompile gcc I also found that everything works and yet again up to the athlon-tbird. My conclusion is: clang incorrectly produces code within one of core libraries (I haven't tested which one yet, but I suspect libgcc_s.so) when optimizing for athlon-4 or athlon-xp. -- Sphinx of black quartz, judge my vow.