Cross-build Brokenness

From: Cy Schubert <Cy.Schubert_at_komquats.com>
Date: Sat, 25 Jun 2016 07:29:46 -0700
It appears that the i386 cross-build is broken as follows. Builds on native 
amd64 are OK.

--- main.o ---
cc -target i386-unknown-freebsd11.0 --sysroot=/usr/obj/i386.i386/opt/src/svn
-current/tmp -B/usr/obj/i386.i386/opt/src/svn-current/tmp/usr/bin -O2 -pipe 
-pipe -DRDUMP   -g -MD  -MF.depend.main.o -MTmain.o -std=gnu99 
-fstack-protector-strong -Wsystem-headers -Werror -Wall -Wno-format-y2k 
-Wno-uninitialized -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int 
-Wno-unused-const-variable -Wno-tautological-compare -Wno-unused-value 
-Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion 
-Wno-unused-local-typedef -Wno-switch -Wno-switch-enum 
-Wno-knr-promoted-parameter  -Qunused-arguments  -c 
/opt/src/svn-current/sbin/dump/main.c -o main.o
--- all_subdir_lib ---
/usr/obj/i386.i386/opt/src/svn-current/tmp/usr/bin/ld: 
/usr/bin/../lib/clang/3.8.0/lib/freebsd/libclang_rt.ubsan_standalone-i386.a:
 No such file: No such file or directory
cc: error: linker command failed with exit code 1 (use -v to see invocation)
*** [h_raw.full] Error code 1

make[7]: stopped in /opt/src/svn-current/lib/libc/tests/ssp
1 error

make[7]: stopped in /opt/src/svn-current/lib/libc/tests/ssp
*** [h_raw] Error code 2

make[6]: stopped in /opt/src/svn-current/lib/libc/tests/ssp
1 error

make[6]: stopped in /opt/src/svn-current/lib/libc/tests/ssp
--- all_subdir_kerberos5 ---
A failure has been detected in another branch of the parallel make

make[5]: stopped in /opt/src/svn-current/kerberos5/lib/libheimbase
--- all_subdir_lib ---
*** [all_subdir_lib/libc/tests/ssp] Error code 2

make[5]: stopped in /opt/src/svn-current/lib/libc/tests
1 error

make[5]: stopped in /opt/src/svn-current/lib/libc/tests
--- all_subdir_kerberos5 ---
*** [all] Error code 2

make[4]: stopped in /opt/src/svn-current/kerberos5/lib
1 error

make[4]: stopped in /opt/src/svn-current/kerberos5/lib
--- all_subdir_lib ---
*** [all] Error code 2

make[4]: stopped in /opt/src/svn-current/lib/libc
1 error

make[4]: stopped in /opt/src/svn-current/lib/libc
--- all_subdir_kerberos5 ---
*** [all_subdir_kerberos5/lib] Error code 2

make[3]: stopped in /opt/src/svn-current/kerberos5
1 error

make[3]: stopped in /opt/src/svn-current/kerberos5
*** [all_subdir_kerberos5] Error code 2

make[2]: stopped in /opt/src/svn-current
--- all_subdir_lib ---
*** [all_subdir_lib/libc] Error code 2

make[3]: stopped in /opt/src/svn-current/lib
1 error

make[3]: stopped in /opt/src/svn-current/lib
*** [all_subdir_lib] Error code 2

make[2]: stopped in /opt/src/svn-current
--- all_subdir_rescue ---
A failure has been detected in another branch of the parallel make

make[6]: stopped in /opt/src/svn-current/bin/csh
*** [csh_make] Error code 2

make[5]: stopped in /export/obj/i386.i386/opt/src/svn-current/rescue/rescue
1 error

make[5]: stopped in /export/obj/i386.i386/opt/src/svn-current/rescue/rescue
*** [objs] Error code 2

make[4]: stopped in /opt/src/svn-current/rescue/rescue
1 error

make[4]: stopped in /opt/src/svn-current/rescue/rescue
*** [all] Error code 2

make[3]: stopped in /opt/src/svn-current/rescue
1 error

make[3]: stopped in /opt/src/svn-current/rescue
*** [all_subdir_rescue] Error code 2

make[2]: stopped in /opt/src/svn-current
--- all_subdir_sbin ---
A failure has been detected in another branch of the parallel make

make[4]: stopped in /opt/src/svn-current/sbin/dump
*** [all_subdir_sbin/dump] Error code 2

make[3]: stopped in /opt/src/svn-current/sbin
1 error

make[3]: stopped in /opt/src/svn-current/sbin
*** [all_subdir_sbin] Error code 2

make[2]: stopped in /opt/src/svn-current
4 errors

make[2]: stopped in /opt/src/svn-current
*** [everything] Error code 2

make[1]: stopped in /opt/src/svn-current
1 error

make[1]: stopped in /opt/src/svn-current
*** [buildworld] Error code 2

make: stopped in /opt/src/svn-current
1 error

make: stopped in /opt/src/svn-current
slippy# 


The following patch fixes my i386 cross-builds on amd64 native architecture.

Index: lib/libc/tests/ssp/Makefile
===================================================================
--- lib/libc/tests/ssp/Makefile	(revision 302191)
+++ lib/libc/tests/ssp/Makefile	(working copy)
_at__at_ -1,5 +1,6 _at__at_
 # $FreeBSD$
 
+.include <host-target.mk>
 .include <bsd.own.mk>
 
 NO_WERROR=
_at__at_ -34,10 +35,12 _at__at_
 .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
 .if ${COMPILER_TYPE} == "clang" && ${MK_TOOLCHAIN} == "yes"
 .if ${COMPILER_VERSION} < 30500 || 30700 <= ${COMPILER_VERSION}
+.if ${MACHINE_CPUARCH} == ${_HOST_ARCH}
 PROGS+=		h_raw
 .endif
 .endif
 .endif
+.endif
 PROGS+=		h_read
 PROGS+=		h_readlink
 PROGS+=		h_snprintf


-- 
Cheers,
Cy Schubert <Cy.Schubert_at_cschubert.com>
FreeBSD UNIX:  <cy_at_FreeBSD.org>   Web:  http://www.FreeBSD.org

	The need of the many outweighs the greed of the few.
Received on Sat Jun 25 2016 - 12:29:51 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:06 UTC