From owner-svn-src-all@freebsd.org Tue Mar 5 04:16:51 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9C4C61510817; Tue, 5 Mar 2019 04:16:51 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4476F75A99; Tue, 5 Mar 2019 04:16:51 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 39557EB22; Tue, 5 Mar 2019 04:16:51 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x254Gpw8095088; Tue, 5 Mar 2019 04:16:51 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x254Gpgt095087; Tue, 5 Mar 2019 04:16:51 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201903050416.x254Gpgt095087@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Tue, 5 Mar 2019 04:16:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r344791 - head/contrib/binutils/opcodes X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/contrib/binutils/opcodes X-SVN-Commit-Revision: 344791 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4476F75A99 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.95)[-0.953,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Mar 2019 04:16:51 -0000 Author: jhibbits Date: Tue Mar 5 04:16:50 2019 New Revision: 344791 URL: https://svnweb.freebsd.org/changeset/base/344791 Log: Fix binutils compilation error with Clang 8 Summary: This change fixes the following compilation error when using clang 8 to cross compile base to powerpc64: ``` /usr/src/gnu/usr.bin/binutils/libopcodes/../../../../contrib/binutils/opcodes/ppc-dis.c:100:35: error: arithmetic on a null pointer treated as a cast from integer to pointer is a GNU extension [-Werror,-Wnull-pointer-arithmetic] info->private_data = (char *) 0 + dialect; ~~~~~~~~~~ ^ 1 error generated. *** [ppc-dis.o] Error code 1 make[6]: stopped in /usr/src/gnu/usr.bin/binutils/libopcodes 1 error ``` Test Plan: - buildworld for x86_64 (native) - buildworld for powerpc64 (cross) - buildworld for powerpc64 (native) Submitted by: alfredo.junior_eldorado.org.br Reviewed By: emaste, pfg, brooks Differential Revision: https://reviews.freebsd.org/D19235 Modified: head/contrib/binutils/opcodes/ppc-dis.c Modified: head/contrib/binutils/opcodes/ppc-dis.c ============================================================================== --- head/contrib/binutils/opcodes/ppc-dis.c Tue Mar 5 04:15:34 2019 (r344790) +++ head/contrib/binutils/opcodes/ppc-dis.c Tue Mar 5 04:16:50 2019 (r344791) @@ -20,6 +20,7 @@ along with this file; see the file COPYING. If not, w Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ #include +#include #include "sysdep.h" #include "dis-asm.h" #include "opcode/ppc.h" @@ -97,7 +98,7 @@ powerpc_dialect (struct disassemble_info *info) dialect |= PPC_OPCODE_64; } - info->private_data = (char *) 0 + dialect; + info->private_data = (void *)(uintptr_t)dialect; return dialect; }