From 3e04b0a043639dfac25d2c26dc189f7f7576404d Mon Sep 17 00:00:00 2001 From: Cy Schubert Date: Tue, 28 Jun 2016 07:47:42 +0000 Subject: [PATCH] This commit addresses regression introduceded in r302177 (WITH_SYSTEM_COMPILER: Enable by default) and it's prerequisite: r300354, caused i386 builds to fail when cross-built on an amd64 host. Reviewed by: bdrewery, delphij, gjb Approved by: re (gjb) --- lib/libc/tests/ssp/Makefile | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/lib/libc/tests/ssp/Makefile b/lib/libc/tests/ssp/Makefile index 2ac74aafc77..5e0cca1fadf 100644 --- a/lib/libc/tests/ssp/Makefile +++ b/lib/libc/tests/ssp/Makefile @@ -1,5 +1,9 @@ # $FreeBSD$ +# XXX This is a workaround to allow i386 to cross-compile on an amd64 host. +.include +# XXX --- + .include NO_WERROR= @@ -34,7 +38,17 @@ PROGS+= h_memset .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" .if ${COMPILER_TYPE} == "clang" && ${MK_TOOLCHAIN} == "yes" .if ${COMPILER_VERSION} < 30500 || 30700 <= ${COMPILER_VERSION} + +# XXX This is a workaround to allow i386 to cross-compile on an amd64 host. +.if ${MACHINE_CPUARCH} == ${_HOST_ARCH} +# XXX --- + PROGS+= h_raw + +# XXX This is a workaround to allow i386 to cross-compile on an amd64 host. +.endif +# XXX --- + .endif .endif .endif