From owner-freebsd-ports@freebsd.org Mon Oct 17 14:44:04 2016 Return-Path: Delivered-To: freebsd-ports@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 57AACC153B4 for ; Mon, 17 Oct 2016 14:44:04 +0000 (UTC) (envelope-from marcus@freebsd.org) Received: from alln-iport-6.cisco.com (alln-iport-6.cisco.com [173.37.142.93]) (using TLSv1.2 with cipher DHE-RSA-SEED-SHA (128/128 bits)) (Client CN "alln-iport.cisco.com", Issuer "HydrantID SSL ICA G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F20E0D6A for ; Mon, 17 Oct 2016 14:44:03 +0000 (UTC) (envelope-from marcus@freebsd.org) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0AdAgBF4wRY/4wNJK1cGgEBAQECAQEBA?= =?us-ascii?q?QgBAQEBgzwBAQEBAR1XAydSjTSXA5Q4gggkhX4CgWQ4FAECAQEBAQEBAV4nhGI?= =?us-ascii?q?BAQQjFVELDgoCAiYCAlcGAQwGAgEBBYhJtVmMeQEBAQEBAQEBAQEBAQEBAQEig?= =?us-ascii?q?QeHMwiCUIdLglsBBJoGmW2GDIh/h3weNlKFCSI0iQEBAQE?= X-IronPort-AV: E=Sophos;i="5.31,357,1473120000"; d="scan'208";a="336754093" Received: from alln-core-7.cisco.com ([173.36.13.140]) by alln-iport-6.cisco.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 17 Oct 2016 14:43:42 +0000 Received: from [10.118.87.91] (rtp-jclarke-nitro10.cisco.com [10.118.87.91]) by alln-core-7.cisco.com (8.14.5/8.14.5) with ESMTP id u9HEhf3g004799; Mon, 17 Oct 2016 14:43:42 GMT Subject: Re: wireshark 2.2.x build fail To: Michael Butler , FreeBSD Ports References: <535e7f14-7591-fccf-380a-4b90d245caeb@freebsd.org> <210ac5bd-074e-36fa-46e1-0af29992c751@protected-networks.net> From: Joe Marcus Clarke Organization: FreeBSD, Inc. Message-ID: <987344a7-ec33-2987-2c5e-1b071a892e06@freebsd.org> Date: Mon, 17 Oct 2016 10:43:41 -0400 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <210ac5bd-074e-36fa-46e1-0af29992c751@protected-networks.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Oct 2016 14:44:04 -0000 On 10/16/16 18:56, Michael Butler wrote: > On 10/16/16 11:36, Joe Marcus Clarke wrote: >> >> Seems like the easy fix would be to incorporate the fix for this bug, >> and then disable SSE4.2 in a CFLAGS override. The better fix would be >> to have clang do the same as GCC so that the test build would fail on >> those platforms that don't support SSE4.2. > > Personally, I feel that this whole approach is wrong. To have CONFIGURE > set a flag asking for instructions not supported by the host for the > whole project when only one module has a run-time check for them is > depending on undefined behavior. This is plainly poor engineering. > > It so happens that GCC does the expected thing but there is no guarantee > that any other compiler can or should. > > In CLANG's case, it found an opportunity to use an SSE-4.2 instruction > in compiling LEMON and assumed it could use it as CONFIGURE told it > explicitly that it could. "fixing" every compiler out there to be > GCC-compatible is not an acceptable or desirable work-around. > > The option should only be set for the module prepared for and capable of > handling the absence of the extended instructions, Sure. I think the better case is to do a runtime check of a binary built with this instruction set versus just a compiler check. Seems like the compiler check is what WS is settling on, though. Will any stub executable built with these instructions fail, or is there a specific call that needs to be made to test this? I imagine the latter. Joe -- Joe Marcus Clarke FreeBSD GNOME Team :: gnome@FreeBSD.org FreeNode / #freebsd-gnome http://www.FreeBSD.org/gnome