From owner-freebsd-current@freebsd.org Fri Apr 15 07:48:28 2016 Return-Path: Delivered-To: freebsd-current@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 7688DAED6DD for ; Fri, 15 Apr 2016 07:48:28 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: from asp.reflexion.net (outbound-mail-211-160.reflexion.net [208.70.211.160]) (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 394B21650 for ; Fri, 15 Apr 2016 07:48:27 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: (qmail 30829 invoked from network); 15 Apr 2016 07:48:27 -0000 Received: from unknown (HELO mail-cs-01.app.dca.reflexion.local) (10.81.19.1) by 0 (rfx-qmail) with SMTP; 15 Apr 2016 07:48:27 -0000 Received: by mail-cs-01.app.dca.reflexion.local (Reflexion email security v7.90.3) with SMTP; Fri, 15 Apr 2016 03:48:52 -0400 (EDT) Received: (qmail 8432 invoked from network); 15 Apr 2016 07:48:52 -0000 Received: from unknown (HELO iron2.pdx.net) (69.64.224.71) by 0 (rfx-qmail) with SMTP; 15 Apr 2016 07:48:52 -0000 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.1.8] (c-76-115-7-162.hsd1.or.comcast.net [76.115.7.162]) by iron2.pdx.net (Postfix) with ESMTPSA id 9971F1C4075; Fri, 15 Apr 2016 00:48:25 -0700 (PDT) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Subject: Re: 11.0: head/lib/libsysdecode/Makefile for . . ./libsoft/usr/include uses CPP when XCPP needed? [Makefile.libcompat issue] From: Mark Millard In-Reply-To: Date: Fri, 15 Apr 2016 00:48:25 -0700 Cc: FreeBSD Current , FreeBSD PowerPC ML Content-Transfer-Encoding: quoted-printable Message-Id: <13E62933-9472-43C1-B766-7AD9707DC1CC@dsl-only.net> References: <3A6ED16B-F941-41FC-B844-50292894D5F4@dsl-only.net> <050EC0FA-21F9-4EAB-8771-B0F6E9DEE087@dsl-only.net> <9952A60C-C3F1-40C3-AEAE-96AF6CA6E829@dsl-only.net> <6311C740-362F-45AE-9044-B72E61FC04C9@dsl-only.net> <5710008C.6030602@FreeBSD.org> To: Bryan Drewery X-Mailer: Apple Mail (2.3124) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Apr 2016 07:48:28 -0000 On 2016-Apr-14, at 1:41 PM, Bryan Drewery = wrote: > . . .Please try this patch though: >=20 > https://people.freebsd.org/~bdrewery/patches/libcompat-xcpp.diff So far so good. . . TARGET_ARCH=3Damd64 hosted on amd64: buildworld/buildkernel built = without reporting any errors. TARGET_ARCH=3Darmv6 hosted on amd64: buildworld/buildkernel built = without reporting any errors. (src.conf tailored to targeting rpi2's = armv7a more specifically.) TARGET_ARCH=3Dpowerpc hosted on amd64 having clang bootstrap a gcc 4.2.1 = based buildworld/buildkernel (clang not built): built without reporting = any errors. TARGET_ARCH=3Dpowerpc hosted on powerpc having clang just buildworld (no = buildkernel): built without reporting any errors. (This environment = requires workarounds such as signal handling changes --and c++ = exceptions do not work. I've never gotten so far as to have workarounds = for buildkernel. gcc 4.2.1 not built.) TARGET_ARCH=3Dpowerpc64 hosted on powerpc64 having a = powerpc64-xtoolchain-gcc/powerpc64-gcc based buildworld/buildkernel with = a LIB32 built (a system that contains an unused clang/clang++, gcc4.2.1 = not built): built without reporting any errors. (Getting powerpc64-gcc = to install on a powerpc64 context requires workarounds because it is not = a true cross compile context. I've never had a gcc after gcc 4.2.1 build = the LIB32 such that it actually worked when used.) Still in process: TARGET_ARCH=3Dpowerpc64 hosted on amd64 having a = powerpc64-xtoolchain-gcc/power-gcc based buildworld/buildkernel with a = LIB32 built (a system that contains an unused clang/clang++, gcc4.2.1 = not built): Still in process. (I've never had a gcc after gcc 4.2.1 = build the LIB32 such that it actually worked when used.) TARGET_ARCH=3Dpowerpc64 hosted on powerpc64 having a = powerpc64-xtoolchain-gcc/power-gcc based buildworld/buildkernel without = LIB32 (and that contains an unused clang/clang++, gcc4.2.1 not built): = Still in process. (Getting powerpc64-gcc to install on a powerpc64 = context requires workarounds because it is not a true cross compile = context.) =3D=3D=3D Mark Millard markmi at dsl-only.net Older material. . . On 2016-Apr-14, at 2:54 PM, Mark Millard wrote: > This will take me a while. >=20 > I'm trying 2 or more builds, all from amd64 context: >=20 > TARGET_ARCH=3Damd64 > TARGET_ARCH=3Darmv6 (with my rpi2 armv7a tailoring in src.conf) > possibly TARGET_ARC=3Dpowerpc64 (without lib32) or powerpc (which has = no lib32 or libsoft option) >=20 > I'm doing this because my personal work arounds have been to have an = additional line that I'd adjust: >=20 > For TARGET_ARCH=3Damd64: #LIBCOMPATWMAKEFLAGS+=3D CPP=3D"${XCPP}" > For TARGET_ARCH=3Darmv6: LIBCOMPATWMAKEFLAGS+=3D CPP=3D"${XCPP}" >=20 > So: commented out vs. not. amd64 did not work with the ${XCPP} use = because it depended on a not being limited to the x86 during its lib32 = processing. >=20 > See = https://lists.freebsd.org/pipermail/freebsd-arm/2016-April/013663.html = for more information. Without the "#" for amd64 I got (grep of the log): >=20 >> ioctl.c:472:18: error: use of undeclared identifier = 'CCISS_PASSTHRU32' >> ioctl.c:1186:18: error: use of undeclared identifier = 'IPMICTL_RECEIVE_MSG_32' >> ioctl.c:1190:18: error: use of undeclared identifier = 'IPMICTL_RECEIVE_MSG_TRUNC_32' >> ioctl.c:1196:18: error: use of undeclared identifier = 'IPMICTL_SEND_COMMAND_32' >> ioctl.c:1394:18: error: use of undeclared identifier = 'MPTIO_RAID_ACTION32' >> ioctl.c:1398:18: error: use of undeclared identifier = 'MPTIO_READ_CFG_HEADER32' >> ioctl.c:1402:18: error: use of undeclared identifier = 'MPTIO_READ_CFG_PAGE32' >> ioctl.c:1406:18: error: use of undeclared identifier = 'MPTIO_READ_EXT_CFG_HEADER32' >> ioctl.c:1410:18: error: use of undeclared identifier = 'MPTIO_READ_EXT_CFG_PAGE32' >> ioctl.c:1414:18: error: use of undeclared identifier = 'MPTIO_WRITE_CFG_PAGE32' >=20 > Of course since I omitted ${LIBCOMPATCFLAGS} my earlier results might = not apply to your change. >=20 > I'm trying these on 11.0-CURRENT -r297769 . Let me know if I should = use something more recent for some reason. >=20 > =3D=3D=3D > Mark Millard > markmi at dsl-only.net >=20 On 2016-Apr-14, at 1:41 PM, Bryan Drewery = wrote: >=20 > On 4/6/2016 1:14 PM, Mark Millard wrote: >> The below forwards an example of a possibly more general issue not = necessarily limited to arm context of the example: in a cross compile = context the host CPP is in use via Makefile.libcompat not involving = "${XCPP}" and so various macro checks for the target context fail to = work. >>=20 >> [The below and the material leading up to it was originally posted to = freebsd-arm.] >>=20 >> =3D=3D=3D >> Mark Millard >> markmi at dsl-only.net >>=20 >> On 2016-Apr-4, at 2:02 PM, Mark Millard = wrote: >>=20 >> As a fix for >>=20 >>>> --- all_subdir_lib/libsysdecode --- >>>> In file included from :17: >>>> In file included from = /usr/obj/clang/arm.armv6/usr/src/libsoft/usr/include/dev/nvme/nvme.h:36: >>>> In file included from = /usr/obj/clang/arm.armv6/usr/src/libsoft/usr/include/sys/param.h:135: >>>> In file included from = /usr/obj/clang/arm.armv6/usr/src/libsoft/usr/include/machine/param.h:49: >>>> = /usr/obj/clang/arm.armv6/usr/src/libsoft/usr/include/machine/acle-compat.h= :182:4: error: Unable to determine architecture version. >>>> # error Unable to determine architecture version. >>>> ^ >>=20 >> I tested building an amd64 -> arm cross-build based on >>=20 >>> # svnlite diff Makefile.libcompat >>> Index: Makefile.libcompat >>> =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 >>> --- Makefile.libcompat (revision 297514) >>> +++ Makefile.libcompat (working copy) >>> @@ -90,6 +90,7 @@ >>> DTRACE=3D"${LIB$COMPATDTRACE:U${DTRACE}}" >>> LIBCOMPATWMAKEFLAGS+=3D CC=3D"${XCC} ${LIBCOMPATCFLAGS}" \ >>> CXX=3D"${XCXX} ${LIBCOMPATCFLAGS} ${LIBCOMPATCXXFLAGS}" = \ >>> + CPP=3D"${XCPP}" \ >>> DESTDIR=3D${LIBCOMPATTMP} \ >>> -DNO_CPU_CFLAGS \ >>> MK_CTF=3Dno \ >>=20 >> and it completed without getting an "error:". So this addition to = Makefile.libcompat may be one option for a fix. >>=20 >=20 > Yes this is needed. Please try this patch though: >=20 > https://people.freebsd.org/~bdrewery/patches/libcompat-xcpp.diff >=20 >=20 > --=20 > Regards, > Bryan Drewery >=20