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.

[The below and the material leading up to it was originally posted to 
freebsd-arm.]

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

On 2016-Apr-4, at 2:02 PM, Mark Millard <markmi at dsl-only.net> wrote:

As a fix for

>> --- 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.
>>  ^

I tested building an amd64 -> arm cross-build based on

> # svnlite diff Makefile.libcompat
> Index: Makefile.libcompat
> ===================================================================
> --- Makefile.libcompat        (revision 297514)
> +++ Makefile.libcompat        (working copy)
> @@ -90,6 +90,7 @@
>               DTRACE="${LIB$COMPATDTRACE:U${DTRACE}}"
>  LIBCOMPATWMAKEFLAGS+= CC="${XCC} ${LIBCOMPATCFLAGS}" \
>               CXX="${XCXX} ${LIBCOMPATCFLAGS} ${LIBCOMPATCXXFLAGS}" \
> +             CPP="${XCPP}" \
>               DESTDIR=${LIBCOMPATTMP} \
>               -DNO_CPU_CFLAGS \
>               MK_CTF=no \

and it completed without getting an "error:". So this addition to 
Makefile.libcompat may be one option for a fix.

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


_______________________________________________
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"

Reply via email to