From owner-freebsd-ports-bugs@freebsd.org Mon Jan 25 19:39:09 2016 Return-Path: Delivered-To: freebsd-ports-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A7380A4688B for ; Mon, 25 Jan 2016 19:39:09 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 96E70E61 for ; Mon, 25 Jan 2016 19:39:09 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id u0PJd93W065870 for ; Mon, 25 Jan 2016 19:39:09 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-ports-bugs@FreeBSD.org Subject: [Bug 206620] audio/lame: fix build with clang 3.8.0 (and gcc >= 4.9.0) Date: Mon, 25 Jan 2016 19:39:09 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: dim@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: netchild@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter flagtypes.name attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jan 2016 19:39:09 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D206620 Bug ID: 206620 Summary: audio/lame: fix build with clang 3.8.0 (and gcc >=3D 4.9.0) Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: Individual Port(s) Assignee: netchild@FreeBSD.org Reporter: dim@FreeBSD.org Assignee: netchild@FreeBSD.org Flags: maintainer-feedback?(netchild@FreeBSD.org) Created attachment 166113 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D166113&action= =3Dedit Fix lame's configure script to correctly detect SSE support During the exp-run in bug 206074, it was found that audio/lame gives errors with a recent clang 3.8.0 snapshot, but only on i386 [1]: xmm_quantize_sub.c:65:34: error: always_inline function '_mm_loadu_ps' requ= ires target feature 'mmx', but would be inlined into function 'init_xrpow_core_s= se' that is compiled without support for 'mmx' const __m128 vec_fabs_mask =3D _mm_loadu_ps(&fabs_mask._float[0]); ^ And many more of such errors, in lame's SSE (vector) support routines. The actual message is a little misleading, as it is really SSE support that is missing. E.g., the program is compiled on i386-freebsd, which has i486 as default target CPU, but there is no -msse flag on the command line. (Note = that these messages go away if you set CPUTYPE to a CPU which does support SSE.) When you compile with recent versions of gcc (4.9 and higher), you get simi= lar errors: In file included from xmm_quantize_sub.c:37:0: /usr/local/lib/gcc49/gcc/i386-portbld-freebsd11.0/4.9.4/include/xmmintrin.h= :929:1: error: inlining failed in call to always_inline '_mm_loadu_ps': target spec= ific option mismatch _mm_loadu_ps (float const *__P) ^ The cause is that lame's configure script simply checks for the existence of , and if it exists, and can be compiled, it assumes SSE intrin= sics are available. This is not generally true anymore, because recent versions= of gcc and clang removed the #ifdef __SSE__ checks from their xmmintrin.h file= s, and therefore a test program which only does "#include " will always compile, even if SSE support is turned off. I have attempted to fix lame's configure.in and configure scripts, by letti= ng them compile a function which actually calls an SSE intrinsic. It works correctly for me, but my knowledge of autoconf is limited, so a double-chec= k by an expert would be nice. This should probably be upstreamed too. [1] http://package18.nyi.freebsd.org/data/headi386PR206074-default/2016-01-17_0= 7h20m29s/logs/errors/lame-3.99.5_2.log --=20 You are receiving this mail because: You are the assignee for the bug.=