From owner-freebsd-office@FreeBSD.ORG Sat Mar 22 19:20:39 2014 Return-Path: Delivered-To: office@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8A46C8B3; Sat, 22 Mar 2014 19:20:39 +0000 (UTC) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2968FDC9; Sat, 22 Mar 2014 19:20:38 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7::cdb7:44e4:35b8:52a9] (unknown [IPv6:2001:7b8:3a7:0:cdb7:44e4:35b8:52a9]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id CA5275C43; Sat, 22 Mar 2014 20:20:28 +0100 (CET) Content-Type: multipart/signed; boundary="Apple-Mail=_B380A56A-FB2C-446F-9693-1680D28BF89D"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 7.2 \(1874\)) Subject: Re: HEADS UP: merged llvm/clang 3.4 From: Dimitry Andric In-Reply-To: <1395500548609-5896580.post@n5.nabble.com> Date: Sat, 22 Mar 2014 20:20:13 +0100 Message-Id: References: <0E7E81A1-54E9-4920-A360-005A1C0C4D47@FreeBSD.org> <1395476852973-5896505.post@n5.nabble.com> <76A1AA7F-E526-4481-B04D-0405D3090D93@FreeBSD.org> <1395489997493-5896543.post@n5.nabble.com> <1395500548609-5896580.post@n5.nabble.com> To: Jakub Lach X-Mailer: Apple Mail (2.1874) Cc: office@FreeBSD.org, freebsd-stable stable X-BeenThere: freebsd-office@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Office applications on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Mar 2014 19:20:39 -0000 --Apple-Mail=_B380A56A-FB2C-446F-9693-1680D28BF89D Content-Type: multipart/mixed; boundary="Apple-Mail=_CCDEBEAC-A3A5-4AB2-84DC-E651D4F19DB4" --Apple-Mail=_CCDEBEAC-A3A5-4AB2-84DC-E651D4F19DB4 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 22 Mar 2014, at 16:02, Jakub Lach wrote: > I'm now testing with CPUTYPE?=3Dcore2 which translates to = -march=3Dcore2,=20 > however I would like to emphasize, that previously it was set as = native,=20 > I was not forcing (faulty?) penryn march.=20 >=20 > It should just autodetect CPU features (at least that was how GCC = worked > iirc- it used multiple flags for all features detected, not a single = march)? Yes, it auto-detects, if you use -march=3Dnative. If you have a Penryn, you have SSE4.1 support, which is more than "plain" Core2 does, e.g. SSSE3. > ... core2 fails the same way, now I will try sans CPUTYPE. After some sleuthing, it turns out this is a bug in boost, when 128-bit types are represented as a struct. See this upstream commit: = https://github.com/boostorg/atomic/commit/e4bde20f2eec0a51be14533871d2123b= d2ab9cf3 To fix it, drop the attached patch in /usr/ports/devel/boost-libs/files. I tried this with CPUTYPE=3Dpenryn, and it worked for me. I have cc'd the boost port maintainers, so I hope they can add this patch soon. :) -Dimitry --Apple-Mail=_CCDEBEAC-A3A5-4AB2-84DC-E651D4F19DB4 Content-Disposition: attachment; filename=patch-boost__atomic__detail__gcc-atomic.hpp Content-Type: application/octet-stream; name="patch-boost__atomic__detail__gcc-atomic.hpp" Content-Transfer-Encoding: 7bit --- boost/atomic/detail/gcc-atomic.hpp.orig 2013-07-20 20:01:35.000000000 +0200 +++ boost/atomic/detail/gcc-atomic.hpp 2014-03-22 20:05:04.000000000 +0100 @@ -958,14 +958,16 @@ public: BOOST_DEFAULTED_FUNCTION(base_atomic(void), {}) - explicit base_atomic(value_type const& v) BOOST_NOEXCEPT : v_(0) + explicit base_atomic(value_type const& v) BOOST_NOEXCEPT { + memset(&v_, 0, sizeof(v_)); memcpy(&v_, &v, sizeof(value_type)); } void store(value_type const& v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { - storage_type tmp = 0; + storage_type tmp; + memset(&tmp, 0, sizeof(tmp)); memcpy(&tmp, &v, sizeof(value_type)); __atomic_store_n(&v_, tmp, atomics::detail::convert_memory_order_to_gcc(order)); } @@ -980,7 +982,8 @@ value_type exchange(value_type const& v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { - storage_type tmp = 0; + storage_type tmp; + memset(&tmp, 0, sizeof(tmp)); memcpy(&tmp, &v, sizeof(value_type)); tmp = __atomic_exchange_n(&v_, tmp, atomics::detail::convert_memory_order_to_gcc(order)); value_type res; @@ -994,7 +997,9 @@ memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { - storage_type expected_s = 0, desired_s = 0; + storage_type expected_s, desired_s; + memset(&expected_s, 0, sizeof(expected_s)); + memset(&desired_s, 0, sizeof(desired_s)); memcpy(&expected_s, &expected, sizeof(value_type)); memcpy(&desired_s, &desired, sizeof(value_type)); const bool success = __atomic_compare_exchange_n(&v_, &expected_s, desired_s, false, @@ -1010,7 +1015,9 @@ memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { - storage_type expected_s = 0, desired_s = 0; + storage_type expected_s, desired_s; + memset(&expected_s, 0, sizeof(expected_s)); + memset(&desired_s, 0, sizeof(desired_s)); memcpy(&expected_s, &expected, sizeof(value_type)); memcpy(&desired_s, &desired, sizeof(value_type)); const bool success = __atomic_compare_exchange_n(&v_, &expected_s, desired_s, true, --Apple-Mail=_CCDEBEAC-A3A5-4AB2-84DC-E651D4F19DB4 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii --Apple-Mail=_CCDEBEAC-A3A5-4AB2-84DC-E651D4F19DB4-- --Apple-Mail=_B380A56A-FB2C-446F-9693-1680D28BF89D Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.22 (Darwin) iEYEARECAAYFAlMt4noACgkQsF6jCi4glqP9JwCcC+fd+LCAMIKrhaG3ChaonqtX 51MAnRq8kbMLQb7IwI3+g+KbV32HWB/u =JlzE -----END PGP SIGNATURE----- --Apple-Mail=_B380A56A-FB2C-446F-9693-1680D28BF89D--