From owner-freebsd-stable@freebsd.org Mon Jul 11 20:51:35 2016 Return-Path: Delivered-To: freebsd-stable@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 149EDB92A82 for ; Mon, 11 Jul 2016 20:51:35 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: from asp.reflexion.net (outbound-mail-211-154.reflexion.net [208.70.211.154]) (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 CC81D11DE for ; Mon, 11 Jul 2016 20:51:34 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: (qmail 7500 invoked from network); 11 Jul 2016 20:52:12 -0000 Received: from unknown (HELO mail-cs-01.app.dca.reflexion.local) (10.81.19.1) by 0 (rfx-qmail) with SMTP; 11 Jul 2016 20:52:12 -0000 Received: by mail-cs-01.app.dca.reflexion.local (Reflexion email security v7.90.3) with SMTP; Mon, 11 Jul 2016 16:52:22 -0400 (EDT) Received: (qmail 27552 invoked from network); 11 Jul 2016 20:52:22 -0000 Received: from unknown (HELO iron2.pdx.net) (69.64.224.71) by 0 (rfx-qmail) with (AES256-SHA encrypted) SMTP; 11 Jul 2016 20:52:22 -0000 X-No-Relay: not in my network X-No-Relay: not in my network X-No-Relay: not in my network X-No-Relay: not in my network Received: from [192.168.0.105] (ip70-189-131-151.lv.lv.cox.net [70.189.131.151]) by iron2.pdx.net (Postfix) with ESMTPSA id 0503C1C4075; Mon, 11 Jul 2016 13:51:27 -0700 (PDT) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Subject: Re: stable/11 question: kboot vs. powerpc: only powerpc64? From: Mark Millard In-Reply-To: <5B3BC302-70DE-4FDA-A442-AC317E146B46@dsl-only.net> Date: Mon, 11 Jul 2016 13:51:31 -0700 Cc: FreeBSD PowerPC ML , freebsd-stable@freebsd.org, FreeBSD Current Content-Transfer-Encoding: quoted-printable Message-Id: <43415D81-F83A-445A-9409-5771D2B858C4@dsl-only.net> References: <07312336-F627-4372-AEF2-5FA93CF6E4CD@dsl-only.net> <5783A3F5.2030301@freebsd.org> <73A6C8D3-6733-4E75-9C5C-59F8A5BB5039@dsl-only.net> <341B3611-39DD-4359-9A26-CE4781445D02@dsl-only.net> <5B3BC302-70DE-4FDA-A442-AC317E146B46@dsl-only.net> To: Nathan Whitehorn X-Mailer: Apple Mail (2.3124) X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jul 2016 20:51:35 -0000 Quick top-post just to indicate that I just did gcc 4.2.1 based = cross-builds for TARGET_ARCH=3Dpowerpc and TARGET_ARCH=3Dpowerpc64 and = they completed. They had analogous warnings to what clang (powerpc) and = powerpc64-gcc (powerpc64) produced. I do not have a context to test powerpc64 or powerpc kboot in. I'll enter a report showing the sys/boot/powerpc/kboot/Makefile change = that I tried. =3D=3D=3D Mark Millard markmi at dsl-only.net On 2016-Jul-11, at 11:43 AM, Mark Millard = wrote: > On 2016-Jul-11, at 11:30 AM, Mark Millard = wrote: >=20 >> On 2016-Jul-11, at 11:04 AM, Mark Millard = wrote: >>=20 >>> On 2016-Jul-11, at 6:49 AM, Nathan Whitehorn = wrote: >>>>=20 >>>> It is not 64-bit only; like the normal loader, it can load both = 32-bit and 64-bit kernels. Those two flags are probably obsolete at this = point and were for compatibility with pre-2.17.5 versions of binutils. = Can you do a test build with the -CFLAGS+=3D -Wa,-mppc64bridge line = removed? >>>> -Nathan >>>>=20 >>>> On 07/11/16 03:55, Mark Millard wrote: >>>>> Is the following something that should be updated something like = is indicated below for 11.0-BETA1? Is kboot powerpc64 specific? >>>>>=20 >>>>> # svnlite diff /usr/src/sys/boot/powerpc/Makefile >>>>> Index: /usr/src/sys/boot/powerpc/Makefile >>>>> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >>>>> --- /usr/src/sys/boot/powerpc/Makefile (revision 302457) >>>>> +++ /usr/src/sys/boot/powerpc/Makefile (working copy) >>>>> @@ -1,5 +1,9 @@ >>>>> # $FreeBSD$ >>>>> -SUBDIR=3D boot1.chrp kboot ofw ps3 uboot >>>>> +SUBDIR=3D boot1.chrp >>>>> +.if ${MACHINE_ARCH} =3D=3D "powerpc64" >>>>> +SUBDIR+=3D kboot >>>>> +.endif >>>>> +SUBDIR+=3D ofw ps3 uboot >>>>> .include >>>>>=20 >>>>>=20 >>>>>=20 >>>>> I ask because I'd submitted 206303 back on 2016-jan-16 reporting = that TARGET_ARCH=3Dpowerpc WITH_BOOT=3D was stopped by getting a = -Wc,-mppc64bride and a -mcpu=3Dpowerpc64 (one of the = base/head/sys/boot/powerpc/kboot/Makefile SRCS being = ppc64_elf_freebsd.c). >>>>>=20 >>>>> =3D=3D=3D >>>>> Mark Millard >>>>> markmi at dsl-only.net >>>=20 >>> I do not have access to powerpc's currently so I'm just going to be = doing cross-build tests for TARGET_ARCH=3Dpowerpc and = TARGET_ARCH=3Dpowerpc64 (from amd64) based on the below updates. >>>=20 >>> You initially mention "two flags" but then only explicitly request = removal of one (the -CFLAGS+=3D -Wa,-mppc64bridge line). >>>=20 >>> I'm assuming that the -mcpu=3Dpowerpc64 is also to be removed if = powerpc (non-64) is to be covered. See my intended test below. Let me = know if it is not what you want.=20 >>>=20 >>>> # svnlite diff sys/boot/powerpc/kboot/Makefile >>>> Index: sys/boot/powerpc/kboot/Makefile >>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >>>> --- sys/boot/powerpc/kboot/Makefile (revision 302457) >>>> +++ sys/boot/powerpc/kboot/Makefile (working copy) >>>> @@ -71,7 +71,7 @@ >>>> # Avoid the open-close-dance for every file access as some = firmwares perform >>>> # an auto-negotiation on every open of the network interface and = thus causes >>>> # netbooting to take horribly long. >>>> -CFLAGS+=3D -DNETIF_OPEN_CLOSE_ONCE -mcpu=3Dpowerpc64 >>>> +CFLAGS+=3D -DNETIF_OPEN_CLOSE_ONCE >>>>=20 >>>> # Always add MI sources >>>> .PATH: ${.CURDIR}/../../common = ${.CURDIR}/../../../libkern >>>> @@ -88,9 +88,6 @@ >>>>=20 >>>> LDFLAGS=3D -nostdlib -static -T ${.CURDIR}/ldscript.powerpc >>>>=20 >>>> -# 64-bit bridge extensions >>>> -CFLAGS+=3D -Wa,-mppc64bridge >>>> - >>>> # Pull in common loader code >>>> #.PATH: ${.CURDIR}/../../ofw/common >>>> #.include "${.CURDIR}/../../ofw/common/Makefile.inc" >>>=20 >>>> # svnlite diff sys/boot/powerpc/Makefile >>>> #=20 >>>=20 >>> (I.e., I reverted sys/boot/powerpc/Makefile.) >>>=20 >>> =3D=3D=3D >>> Mark Millard >>> markmi at dsl-only.net >>=20 >> The TARGET_ARCH=3Dpowerpc build completed with the following messages = (from grep'ing for kboot in the typescript file): >>=20 >>> =3D=3D=3D> sys/boot/powerpc/kboot (all) >>> Building = /usr/obj/clang/powerpc.powerpc/usr/src/sys/boot/powerpc/kboot/vers.c >>> Building = /usr/obj/clang/powerpc.powerpc/usr/src/sys/boot/powerpc/kboot/conf.o >>> Building = /usr/obj/clang/powerpc.powerpc/usr/src/sys/boot/powerpc/kboot/metadata.o >>> Building = /usr/obj/clang/powerpc.powerpc/usr/src/sys/boot/powerpc/kboot/vers.o >>> Building = /usr/obj/clang/powerpc.powerpc/usr/src/sys/boot/powerpc/kboot/main.o >>> /usr/src/sys/boot/powerpc/kboot/main.c:307:12: warning: variable = 'sp' is uninitialized when used here [-Wuninitialized] >>> /usr/src/sys/boot/powerpc/kboot/main.c:306:29: note: initialize the = variable 'sp' to silence this warning >>> Building = /usr/obj/clang/powerpc.powerpc/usr/src/sys/boot/powerpc/kboot/ppc64_elf_fr= eebsd.o >>> /usr/src/sys/boot/powerpc/kboot/ppc64_elf_freebsd.c:94:15: warning: = implicit declaration of function 'md_load64' is invalid in C99 = [-Wimplicit-function-declaration] >>> Building = /usr/obj/clang/powerpc.powerpc/usr/src/sys/boot/powerpc/kboot/host_syscall= .o >>> Building = /usr/obj/clang/powerpc.powerpc/usr/src/sys/boot/powerpc/kboot/hostcons.o >>> Building = /usr/obj/clang/powerpc.powerpc/usr/src/sys/boot/powerpc/kboot/hostdisk.o >>> Building = /usr/obj/clang/powerpc.powerpc/usr/src/sys/boot/powerpc/kboot/kerneltramp.= o >>> Building = /usr/obj/clang/powerpc.powerpc/usr/src/sys/boot/powerpc/kboot/kbootfdt.o >>> --- kbootfdt.o --- >>> /usr/src/sys/boot/powerpc/kboot/kbootfdt.c:54:17: warning: passing = 'const char *' to parameter of type 'char *' discards qualifiers = [-Wincompatible-pointer-types-discards-qualifiers] >>> /usr/src/sys/boot/powerpc/kboot/host_syscall.h:36:21: note: passing = argument to parameter 'path' here >>> /usr/src/sys/boot/powerpc/kboot/kbootfdt.c:123:8: warning: assigning = to 'uint64_t *' (aka 'unsigned long long *') from 'const void *' = discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers] >>> /usr/src/sys/boot/powerpc/kboot/kbootfdt.c:125:8: warning: assigning = to 'uint64_t *' (aka 'unsigned long long *') from 'const void *' = discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers] >>> /usr/src/sys/boot/powerpc/kboot/kbootfdt.c:134:8: warning: assigning = to 'uint32_t *' (aka 'unsigned int *') from 'const void *' discards = qualifiers [-Wincompatible-pointer-types-discards-qualifiers] >>> /usr/src/sys/boot/powerpc/kboot/kbootfdt.c:135:8: warning: assigning = to 'uint32_t *' (aka 'unsigned int *') from 'const void *' discards = qualifiers [-Wincompatible-pointer-types-discards-qualifiers] >>> Building = /usr/obj/clang/powerpc.powerpc/usr/src/sys/boot/powerpc/kboot/ucmpdi2.o >>> In file included from = /usr/src/sys/boot/powerpc/kboot/../../../libkern/ucmpdi2.c:37: >>> In file included from = /usr/src/sys/boot/powerpc/kboot/../../../libkern/quad.h:59: >>> /usr/src/sys/boot/powerpc/kboot/../../../sys/syslimits.h:41:2: = warning: "No user-serviceable parts inside." [-W#warnings] >>> Building = /usr/obj/clang/powerpc.powerpc/usr/src/sys/boot/powerpc/kboot/boot.o >>> Building = /usr/obj/clang/powerpc.powerpc/usr/src/sys/boot/powerpc/kboot/commands.o >>> Building = /usr/obj/clang/powerpc.powerpc/usr/src/sys/boot/powerpc/kboot/console.o >>> Building = /usr/obj/clang/powerpc.powerpc/usr/src/sys/boot/powerpc/kboot/devopen.o >>> Building = /usr/obj/clang/powerpc.powerpc/usr/src/sys/boot/powerpc/kboot/interp.o >>> Building = /usr/obj/clang/powerpc.powerpc/usr/src/sys/boot/powerpc/kboot/interp_backs= lash.o >>> Building = /usr/obj/clang/powerpc.powerpc/usr/src/sys/boot/powerpc/kboot/interp_parse= .o >>> Building = /usr/obj/clang/powerpc.powerpc/usr/src/sys/boot/powerpc/kboot/ls.o >>> Building = /usr/obj/clang/powerpc.powerpc/usr/src/sys/boot/powerpc/kboot/misc.o >>> Building = /usr/obj/clang/powerpc.powerpc/usr/src/sys/boot/powerpc/kboot/module.o >>> Building = /usr/obj/clang/powerpc.powerpc/usr/src/sys/boot/powerpc/kboot/panic.o >>> Building = /usr/obj/clang/powerpc.powerpc/usr/src/sys/boot/powerpc/kboot/load_elf32.o= >>> Building = /usr/obj/clang/powerpc.powerpc/usr/src/sys/boot/powerpc/kboot/reloc_elf32.= o >>> Building = /usr/obj/clang/powerpc.powerpc/usr/src/sys/boot/powerpc/kboot/load_elf64.o= >>> Building = /usr/obj/clang/powerpc.powerpc/usr/src/sys/boot/powerpc/kboot/reloc_elf64.= o >>> Building = /usr/obj/clang/powerpc.powerpc/usr/src/sys/boot/powerpc/kboot/dev_net.o >>> Building = /usr/obj/clang/powerpc.powerpc/usr/src/sys/boot/powerpc/kboot/disk.o >>> Building = /usr/obj/clang/powerpc.powerpc/usr/src/sys/boot/powerpc/kboot/part.o >>> Building = /usr/obj/clang/powerpc.powerpc/usr/src/sys/boot/powerpc/kboot/crc32.o >>> Building = /usr/obj/clang/powerpc.powerpc/usr/src/sys/boot/powerpc/kboot/interp_forth= .o >>> Building = /usr/obj/clang/powerpc.powerpc/usr/src/sys/boot/powerpc/kboot/loader.kboot= >>> Building = /usr/obj/clang/powerpc.powerpc/usr/src/sys/boot/powerpc/kboot/loader.help >>=20 >> The compiler involved was clang 3.8.0 . (This was a = WITH_META_MODE=3Dyes build.) >>=20 >> The TARGET_ARCH=3Dpowerpc64 build also completed. The compiler = involved was powerpc64-gcc. (This was a WITH_META_MODE=3Dyes build.) >>=20 >> =3D=3D=3D >> Mark Millard >> markmi at dsl-only.net >=20 > I just noticed at least one additional warning (for hostdisk.c) from = the TARGET_ARCH=3Dpowerpc64 so here is the list via grep for that = context: >=20 >> # grep kboot = ~/sys_typescripts/typescript_make_powerpc64vtsc_nodebug_incl_clang_xtoolch= ain-amd64-host-2016-07-11:11:02:56 | grep -i warning: >> /usr/src/sys/boot/powerpc/kboot/ppc64_elf_freebsd.c:94:15: warning: = implicit declaration of function 'md_load64' = [-Wimplicit-function-declaration] >> /usr/src/sys/boot/powerpc/kboot/hostdisk.c:96:10: warning: format = '%s' expects argument of type 'char *', but argument 2 has type 'void *' = [-Wformat=3D] >> /usr/src/sys/boot/powerpc/kboot/kbootfdt.c:54:17: warning: passing = argument 1 of 'host_open' discards 'const' qualifier from pointer target = type [-Wdiscarded-qualifiers] >> /usr/src/sys/boot/powerpc/kboot/kbootfdt.c:123:8: warning: assignment = discards 'const' qualifier from pointer target type = [-Wdiscarded-qualifiers] >> /usr/src/sys/boot/powerpc/kboot/kbootfdt.c:125:8: warning: assignment = discards 'const' qualifier from pointer target type = [-Wdiscarded-qualifiers] >> /usr/src/sys/boot/powerpc/kboot/kbootfdt.c:134:8: warning: assignment = discards 'const' qualifier from pointer target type = [-Wdiscarded-qualifiers] >> /usr/src/sys/boot/powerpc/kboot/kbootfdt.c:135:8: warning: assignment = discards 'const' qualifier from pointer target type = [-Wdiscarded-qualifiers] >> /usr/src/sys/boot/powerpc/kboot/../../../sys/syslimits.h:41:2: = warning: #warning "No user-serviceable parts inside." [-Wcpp] >> /usr/src/sys/boot/powerpc/kboot/../../common/ls.c:142:18: warning: = variable 'tail' set but not used [-Wunused-but-set-variable] >=20 > =3D=3D=3D > Mark Millard > markmi at dsl-only.net >=20 >=20