Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Apr 2016 14:54:08 -0700
From:      Mark Millard <markmi@dsl-only.net>
To:        Bryan Drewery <bdrewery@FreeBSD.org>
Cc:        FreeBSD Current <freebsd-current@freebsd.org>, FreeBSD PowerPC ML <freebsd-ppc@freebsd.org>
Subject:   Re: 11.0: head/lib/libsysdecode/Makefile for . . ./libsoft/usr/include uses CPP when XCPP needed? [Makefile.libcompat issue]
Message-ID:  <B4BCA61C-4DE1-4B7D-89CA-1ADBA4006FBA@dsl-only.net>
In-Reply-To: <5710008C.6030602@FreeBSD.org>
References:  <D8803949-18C1-4B17-981F-DAD5A2DEDCE8@dsl-only.net> <CANCZdfo3Gdf0QF64hfn_WJzxhPOwJk6yMB3qEkDi8tfEpRRveg@mail.gmail.com> <B222BAE7-FD73-4F54-8C31-E982B6FCA718@dsl-only.net> <3A6ED16B-F941-41FC-B844-50292894D5F4@dsl-only.net> <CANCZdfqX8d-DZ-Y%2B%2BDFjsP7L8M_xFTvFLknxgGLSf_zO-wSfdA@mail.gmail.com> <B6B88406-A0AE-4704-9343-F65CF8DDBC5D@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>

next in thread | previous in thread | raw e-mail | index | archive | help
This will take me a while.

I'm trying 2 or more builds, all from amd64 context:

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)

I'm doing this because my personal work arounds have been to have an =
additional line that I'd adjust:

For TARGET_ARCH=3Damd64: #LIBCOMPATWMAKEFLAGS+=3D CPP=3D"${XCPP}"
For TARGET_ARCH=3Darmv6: LIBCOMPATWMAKEFLAGS+=3D CPP=3D"${XCPP}"

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.

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):

> 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'

Of course since I omitted ${LIBCOMPATCFLAGS} my earlier results might =
not apply to your change.

I'm trying these on 11.0-CURRENT -r297769 . Let me know if I should use =
something more recent for some reason.

=3D=3D=3D
Mark Millard
markmi at dsl-only.net

On 2016-Apr-14, at 1:41 PM, Bryan Drewery <bdrewery at FreeBSD.org> =
wrote:

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 <markmi at dsl-only.net> =
wrote:
>=20
> As a fix for
>=20
>>> --- all_subdir_lib/libsysdecode ---
>>> In file included from <stdin>: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

Yes this is needed. Please try this patch though:

https://people.freebsd.org/~bdrewery/patches/libcompat-xcpp.diff


--=20
Regards,
Bryan Drewery





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?B4BCA61C-4DE1-4B7D-89CA-1ADBA4006FBA>