From owner-svn-src-head@freebsd.org Mon May 20 19:21:37 2019 Return-Path: <owner-svn-src-head@freebsd.org> Delivered-To: svn-src-head@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 7EDAA158FD47; Mon, 20 May 2019 19:21:37 +0000 (UTC) (envelope-from luporl@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 2185C8E7DE; Mon, 20 May 2019 19:21:37 +0000 (UTC) (envelope-from luporl@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 125622297D; Mon, 20 May 2019 19:21:37 +0000 (UTC) (envelope-from luporl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4KJLaxM012646; Mon, 20 May 2019 19:21:36 GMT (envelope-from luporl@FreeBSD.org) Received: (from luporl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4KJLZWK012637; Mon, 20 May 2019 19:21:35 GMT (envelope-from luporl@FreeBSD.org) Message-Id: <201905201921.x4KJLZWK012637@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: luporl set sender to luporl@FreeBSD.org using -f From: Leandro Lupori <luporl@FreeBSD.org> Date: Mon, 20 May 2019 19:21:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348005 - in head: cddl/contrib/opensolaris/lib/libzfs/common stand/common stand/ofw/libofw stand/powerpc/boot1.chrp stand/powerpc/kboot stand/powerpc/ofw X-SVN-Group: head X-SVN-Commit-Author: luporl X-SVN-Commit-Paths: in head: cddl/contrib/opensolaris/lib/libzfs/common stand/common stand/ofw/libofw stand/powerpc/boot1.chrp stand/powerpc/kboot stand/powerpc/ofw X-SVN-Commit-Revision: 348005 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 2185C8E7DE X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.965,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current <svn-src-head.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/svn-src-head/> List-Post: <mailto:svn-src-head@freebsd.org> List-Help: <mailto:svn-src-head-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=subscribe> X-List-Received-Date: Mon, 20 May 2019 19:21:37 -0000 Author: luporl Date: Mon May 20 19:21:35 2019 New Revision: 348005 URL: https://svnweb.freebsd.org/changeset/base/348005 Log: [PowerPC64] stand: fix build using clang 8 as compiler This change fixes "stand" build issues when using clang 8 as compiler. Submitted by: alfredo.junior_eldorado.org.br Reviewed by: jhibbits Differential Revision: https://reviews.freebsd.org/D20026 Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_diff.c head/stand/common/load_elf.c head/stand/ofw/libofw/ofw_net.c head/stand/ofw/libofw/openfirm.c head/stand/powerpc/boot1.chrp/boot1.c head/stand/powerpc/kboot/Makefile head/stand/powerpc/kboot/main.c head/stand/powerpc/ofw/elf_freebsd.c head/stand/powerpc/ofw/ppc64_elf_freebsd.c Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_diff.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_diff.c Mon May 20 19:14:07 2019 (r348004) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_diff.c Mon May 20 19:21:35 2019 (r348005) @@ -114,7 +114,7 @@ get_stats_for_obj(differ_info_t *di, const char *dsnam (void) snprintf(di->errbuf, sizeof (di->errbuf), dgettext(TEXT_DOMAIN, "Unable to determine path or stats for " - "object %lld in %s"), obj, dsname); + "object %jd in %s"), (uintmax_t)obj, dsname); return (-1); } } @@ -406,8 +406,8 @@ write_free_diffs(FILE *fp, differ_info_t *di, dmu_diff } else { (void) snprintf(di->errbuf, sizeof (di->errbuf), dgettext(TEXT_DOMAIN, - "next allocated object (> %lld) find failure"), - zc.zc_obj); + "next allocated object (> %jd) find failure"), + (uintmax_t)zc.zc_obj); di->zerr = errno; break; } Modified: head/stand/common/load_elf.c ============================================================================== --- head/stand/common/load_elf.c Mon May 20 19:14:07 2019 (r348004) +++ head/stand/common/load_elf.c Mon May 20 19:21:35 2019 (r348005) @@ -483,7 +483,7 @@ __elfN(loadimage)(struct preloaded_file *fp, elf_file_ off += 0x01000000; ehdr->e_entry += off; #ifdef ELF_VERBOSE - printf("Converted entry 0x%08x\n", ehdr->e_entry); + printf("Converted entry 0x%jx\n", (uintmax_t)ehdr->e_entry); #endif } else off = 0; @@ -509,8 +509,8 @@ __elfN(loadimage)(struct preloaded_file *fp, elf_file_ off -= ehdr->e_entry & ~PAGE_MASK; ehdr->e_entry += off; #ifdef ELF_VERBOSE - printf("ehdr->e_entry 0x%08x, va<->pa off %llx\n", - ehdr->e_entry, off); + printf("ehdr->e_entry 0x%jx", va<->pa off %llx\n", + (uintmax_t)ehdr->e_entry, off); #endif #else off = 0; /* other archs use direct mapped kernels */ Modified: head/stand/ofw/libofw/ofw_net.c ============================================================================== --- head/stand/ofw/libofw/ofw_net.c Mon May 20 19:14:07 2019 (r348004) +++ head/stand/ofw/libofw/ofw_net.c Mon May 20 19:21:35 2019 (r348005) @@ -225,12 +225,12 @@ ofwn_init(struct iodesc *desc, void *machdep_hint) dmabuf = NULL; if (OF_call_method("dma-alloc", netinstance, 1, 1, (64 * 1024), &dmabuf) < 0) { - printf("Failed to allocate DMA buffer (got %08x).\n", dmabuf); + printf("Failed to allocate DMA buffer (got %p).\n", dmabuf); goto punt; } #if defined(NETIF_DEBUG) - printf("ofwn_init: allocated DMA buffer: %08x\n", dmabuf); + printf("ofwn_init: allocated DMA buffer: %p\n", dmabuf); #endif #endif Modified: head/stand/ofw/libofw/openfirm.c ============================================================================== --- head/stand/ofw/libofw/openfirm.c Mon May 20 19:14:07 2019 (r348004) +++ head/stand/ofw/libofw/openfirm.c Mon May 20 19:21:35 2019 (r348005) @@ -669,7 +669,6 @@ OF_block_size(ihandle_t instance) } /* -/* * Memory functions */ Modified: head/stand/powerpc/boot1.chrp/boot1.c ============================================================================== --- head/stand/powerpc/boot1.chrp/boot1.c Mon May 20 19:14:07 2019 (r348004) +++ head/stand/powerpc/boot1.chrp/boot1.c Mon May 20 19:21:35 2019 (r348005) @@ -23,6 +23,7 @@ __FBSDID("$FreeBSD$"); #include <machine/elf.h> #include <machine/stdarg.h> #include <machine/md_var.h> +#include <ufs/ffs/fs.h> #include "paths.h" Modified: head/stand/powerpc/kboot/Makefile ============================================================================== --- head/stand/powerpc/kboot/Makefile Mon May 20 19:14:07 2019 (r348004) +++ head/stand/powerpc/kboot/Makefile Mon May 20 19:21:35 2019 (r348005) @@ -36,9 +36,6 @@ CFLAGS+= -DRELOC=${RELOC} LDFLAGS= -nostdlib -static -T ${.CURDIR}/ldscript.powerpc -# 64-bit bridge extensions -CFLAGS+= -Wa,-mppc64bridge - DPADD= ${LDR_INTERP} ${LIBOFW} ${LIBFDT} ${LIBSA} LDADD= ${LDR_INTERP} ${LIBOFW} ${LIBFDT} ${LIBSA} Modified: head/stand/powerpc/kboot/main.c ============================================================================== --- head/stand/powerpc/kboot/main.c Mon May 20 19:14:07 2019 (r348004) +++ head/stand/powerpc/kboot/main.c Mon May 20 19:21:35 2019 (r348005) @@ -484,8 +484,18 @@ kboot_kseg_get(int *nseg, void **ptr) void _start(int argc, const char **argv, char **env) { +// This makes error "variable 'sp' is uninitialized" be just a warning on clang. +// Initializing 'sp' is not desired here as it would overwrite "r1" original value +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic warning "-Wuninitialized" +#endif register volatile void **sp asm("r1"); main((int)sp[0], (const char **)&sp[1]); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } /* Modified: head/stand/powerpc/ofw/elf_freebsd.c ============================================================================== --- head/stand/powerpc/ofw/elf_freebsd.c Mon May 20 19:14:07 2019 (r348004) +++ head/stand/powerpc/ofw/elf_freebsd.c Mon May 20 19:21:35 2019 (r348005) @@ -84,7 +84,7 @@ __elfN(ofw_exec)(struct preloaded_file *fp) if ((error = md_load(fp->f_args, &mdp, &dtbp)) != 0) return (error); - printf("Kernel entry at 0x%lx ...\n", e->e_entry); + printf("Kernel entry at 0x%x ...\n", entry); dev_cleanup(); if (dtbp != 0) { Modified: head/stand/powerpc/ofw/ppc64_elf_freebsd.c ============================================================================== --- head/stand/powerpc/ofw/ppc64_elf_freebsd.c Mon May 20 19:14:07 2019 (r348004) +++ head/stand/powerpc/ofw/ppc64_elf_freebsd.c Mon May 20 19:21:35 2019 (r348005) @@ -87,7 +87,7 @@ ppc64_ofw_elf_exec(struct preloaded_file *fp) if ((error = md_load64(fp->f_args, &mdp, &dtbp)) != 0) return (error); - printf("Kernel entry at 0x%lx ...\n", entry); + printf("Kernel entry at 0x%x ...\n", entry); dev_cleanup();