From owner-freebsd-arm@freebsd.org Mon Apr 4 04:25:41 2016 Return-Path: Delivered-To: freebsd-arm@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 2E202AEC0DE for ; Mon, 4 Apr 2016 04:25:41 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: from asp.reflexion.net (outbound-mail-211-157.reflexion.net [208.70.211.157]) (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 D84871357 for ; Mon, 4 Apr 2016 04:25:40 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: (qmail 15017 invoked from network); 4 Apr 2016 04:25:39 -0000 Received: from unknown (HELO mail-cs-02.app.dca.reflexion.local) (10.81.19.2) by 0 (rfx-qmail) with SMTP; 4 Apr 2016 04:25:39 -0000 Received: by mail-cs-02.app.dca.reflexion.local (Reflexion email security v7.90.2) with SMTP; Mon, 04 Apr 2016 00:25:29 -0400 (EDT) Received: (qmail 5435 invoked from network); 4 Apr 2016 04:25:29 -0000 Received: from unknown (HELO iron2.pdx.net) (69.64.224.71) by 0 (rfx-qmail) with SMTP; 4 Apr 2016 04:25:29 -0000 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 1B8D0B1E001; Sun, 3 Apr 2016 21:25:32 -0700 (PDT) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Subject: 11.0: head/lib/libsysdecode/Makefile for . . ./libsoft/usr/include uses CPP when XCPP needed? Message-Id: Date: Sun, 3 Apr 2016 21:25:37 -0700 To: FreeBSD Toolchain , freebsd-arm Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) X-Mailer: Apple Mail (2.3124) X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Apr 2016 04:25:41 -0000 For an amd64 -> armv7a (rpi2 targeting) cross-compile the code > # $FreeBSD: head/lib/libsysdecode/Makefile 295931 2016-02-23 20:00:55Z = jhb $ >=20 > . . . > ioctl.c: mkioctls > env MACHINE=3D${MACHINE} CPP=3D"${CPP}" \ > /bin/sh ${.CURDIR}/mkioctls ${DESTDIR}${INCLUDEDIR} > = ${.TARGET} (with its use of CPP instead of the XCPP) got: > --- all_subdir_lib/libsysdecode --- > --- ioctl.c --- > env MACHINE=3Darm CPP=3D"/usr/bin/clang-cpp" /bin/sh = /usr/src/lib/libsysdecode/mkioctls = /usr/obj/clang/arm.armv6/usr/src/libsoft/usr/include > ioctl.c > . . . > --- 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. > ^ In my case I had the following in the in-use src.conf in order to = control the cross compile specifics: > XCC=3D/usr/bin/clang -target ${TO_TYPE}--freebsd11.0-gnueabi = -march=3Darmv7a -mcpu=3Dcortex-a7 -mno-unaligned-access > XCXX=3D/usr/bin/clang++ -target ${TO_TYPE}--freebsd11.0-gnueabi = -march=3Darmv7a -mcpu=3Dcortex-a7 -mno-unaligned-access > XCPP=3D/usr/bin/clang-cpp -target ${TO_TYPE}--freebsd11.0-gnueabi = -march=3Darmv7a -mcpu=3Dcortex-a7 -mno-unaligned-access (I've been doing such for a long time but only just progressed to a 11.0 = source vintage with libsoft involved.) Even if I'm out of bounds for technique in some way I expect that > ioctl.c: mkioctls > env MACHINE=3D${MACHINE} CPP=3D"${CPP}" \ > /bin/sh ${.CURDIR}/mkioctls ${DESTDIR}${INCLUDEDIR} > = ${.TARGET} is not doing everything it should to have the full context needed for . = . ./machine/acle-compat.h . =3D=3D=3D Mark Millard markmi at dsl-only.net