From owner-freebsd-stable@FreeBSD.ORG Wed Oct 24 10:34:20 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 9ADC85DD; Wed, 24 Oct 2012 10:34:20 +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 635E08FC0C; Wed, 24 Oct 2012 10:34:20 +0000 (UTC) Received: by mail-pb0-f54.google.com with SMTP id rp8so1196159pbb.13 for ; Wed, 24 Oct 2012 03:34:20 -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:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=ekMsCL+codhhVE0DfD4eEfoWLo7KmxMrSPF2K76R7B0=; b=vdBYzvOp45t3f8bkbFWMuhrtoTMUvlLEVbmp28Vh5Aa2ZGQQtpWwpySrMSFWqHmbLi 1TlpozSvq9JMsSq8uzUbLSGXsE4GOVh4dSf/Ex5C/h3ySaZYfHe+PikqryGRYKS/PRu3 Z37YHRLPwd5ZsKVkcP3teP9fhWnsSNTXSrhvUhcqQMxDhFa4+GG+1kZ7SUqJT67StXej nElSAtIGh70u35RwAXTSOLdjzEzXIkdDgH8egqobiBkoDMS4EpMl8gayR7EcePVa3yzD 9eFvFsS8XnAkcxPoyoyHA/R98GItSTasbZC5x8TGN6RIlyLzWA/qhPjRN8nE8NocCVHf BHMg== Received: by 10.68.220.42 with SMTP id pt10mr49117474pbc.84.1351074860174; Wed, 24 Oct 2012 03:34:20 -0700 (PDT) Received: from [192.168.1.131] (mau.donbass.com. [92.242.127.250]) by mx.google.com with ESMTPS id ix9sm9268349pbc.7.2012.10.24.03.34.18 (version=SSLv3 cipher=OTHER); Wed, 24 Oct 2012 03:34:19 -0700 (PDT) Message-ID: <5087C428.2020908@gmail.com> Date: Wed, 24 Oct 2012 13:34:16 +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: Dimitry Andric Subject: Re: wine, gcc and clang with CPUTYPE References: <50879F62.2010004@gmail.com> <5087BD71.9090002@FreeBSD.org> In-Reply-To: <5087BD71.9090002@FreeBSD.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-stable@freebsd.org 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 10:34:20 -0000 24.10.2012 13:05, Dimitry Andric wrote: >> 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 > > Can you attempt to figure out what the illegal instruction was, in that > case? How can I do that? I'm not very familiar with gdb. >> 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. > > On the problematic athlons, can you please post the exact CPUIDs from > dmesg? If you have WITH_CLANG_EXTRAS enabled, please also post the > output of "opt -version". Oct 24 01:47:20 limbo kernel: CPU: AMD Athlon(tm) XP 2500+ (1833.95-MHz 686-class CPU) Oct 24 01:47:20 limbo kernel: Origin = "AuthenticAMD" Id = 0x6a0 Family = 0x6 Model = 0xa Stepping = 0 Oct 24 01:47:20 limbo kernel: Features=0x383fbff Oct 24 01:47:20 limbo kernel: AMD Features=0xc0400800 I will rebuild WITH_CLANG_EXTRAS. -- Sphinx of black quartz, judge my vow.