Date: Wed, 15 Jan 2014 12:27:47 +0100 From: =?ISO-8859-1?Q?Peter_Ankerst=E5l?= <peter@pean.org> To: "stable@freebsd.org" <stable@freebsd.org> Subject: Trying to cross compile i386 on amd64 (clang/llvm) Message-ID: <52D670B3.7030707@pean.org>
next in thread | raw e-mail | index | archive | help
Hi, Im having difficulties compiling world and kernel on an amd64 for one of my i386 machines. I dont know If I'm doing it wrong or something else it broken.. build machine: FreeBSD torus.pean.org 10.0-RC2 FreeBSD 10.0-RC2 #0 r259522: Wed Dec 18 09:27:56 CET 2013 root@torus.pean.org:/usr/obj/usr/src/sys/GENERIC amd64 src tree: Working Copy Root Path: /usr/src-soekris URL: https://svn0.us-west.freebsd.org/base/releng/10.0 Relative URL: ^/releng/10.0 Repository Root: https://svn0.us-west.freebsd.org/base Repository UUID: ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f Revision: 260687 Node Kind: directory Schedule: normal Last Changed Author: gjb Last Changed Rev: 260664 Last Changed Date: 2014-01-15 02:14:52 +0100 (Wed, 15 Jan 2014) I have a freshly checked out source tree and a separate obj-tree. building with these settings: TARGET_ARCH=i386 TARGET=i386 MAKEOBJDIRPREFIX=/usr/obj-soekris KERNCONF=SOEKRIS First of all it tries to install liblegacy.a to /usr/obj-soekris/legacy/usr/lib which does not exist. After creating that directory it build world compiles for a while but then stop with this error: ---- ==> usr.bin/clang/tblgen (obj,depend,all,install) make[3]: .depend, 2554: ignoring stale .depend for /usr/obj-soekris/i386.i386/usr/src-soekris/tmp/legacy/usr/lib/libegacy.a clang++ -O2 -pipe -I/usr/src-soekris/usr.bin/clang/tblgen/../../../contrib/llvm/include -I/usr/src-soekris/usr.bin/clang/tblgen/../../../contrib/llvm/tools/clang/include -I/usr/src-soekris/usr.bin/clang/tblgen/../../../contrib/llvm/utils/TableGen -I. -I/usr/src-soekris/usr.bin/clang/tblgen/../../../contrib/llvm/../../lib/clang/include -DLLVM_ON_UNIX -DLLVM_ON_FREEBSD -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -DNDEBUG -fno-strict-aliasing -DLLVM_DEFAULT_TARGET_TRIPLE=\"i386-unknown-freebsd10.0\" -DLLVM_HOST_TRIPLE=\"x86_64-unknown-freebsd10.0\" -DDEFAULT_SYSROOT=\"\" -I/usr/obj-soekris/i386.i386/usr/src-soekris/tmp/legacy/usr/include -Wno-c++11-extensions -fno-exceptions -fno-rtti -static -L/usr/obj-soekris/i386.i386/usr/src-soekris/tmp/legacy/usr/lib -o tblgen AsmMatcherEmitter.o AsmWriterEmitter.o AsmWriterInst.o CTagsEmitter.o CallingConvEmitter.o CodeEmitterGen.o CodeGenDAGPatterns.o CodeGenInstruction.o CodeGenMapTable.o CodeGenRegisters.o CodeGenSchedule.o CodeGenTarget.o DAGISelEmitter.o DAGISelMatcher.o DAGISelMatcherEmitter.o DAGISelMatcherGen.o DAGISelMatcherOpt.o DFAPacketizerEmitter.o DisassemblerEmitter.o FastISelEmitter.o FixedLenDecoderEmitter.o InstrInfoEmitter.o IntrinsicEmitter.o OptParserEmitter.o PseudoLoweringEmitter.o RegisterInfoEmitter.o SetTheory.o SubtargetEmitter.o TGValueTypes.o TableGen.o X86DisassemblerTables.o X86ModRMFilters.o X86RecognizableInstr.o /usr/src-soekris/usr.bin/clang/tblgen/../../../lib/clang/libllvmtablegen/libllvmtablegen.a /usr/src-soekris/usr.bin/clang/tblgen/../../../lib/clang/libllvmsupport/libllvmsupport.a -legacy /usr/bin/ld: cannot find -legacy clang++: error: linker command failed with exit code 1 (use -v to see invocation) *** Error code 1 Stop. make[3]: stopped in /usr/src-soekris/usr.bin/clang/tblgen *** Error code 1 ---- Trying to buildkernel on the other hand fails with the following error: ---- x86 -> /usr/src-soekris/sys/x86/include clang -c -O -pipe -std=c99 -g -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -Wmissing-include-dirs -fdiagnostics-show-option -Wno-error-tautological-compare -Wno-error-empty-body -Wno-error-parentheses-equality -nostdinc -I. -I/usr/src-soekris/sys -I/usr/src-soekris/sys/contrib/altq -I/usr/src-soekris/sys/contrib/ipfilter -I/usr/src-soekris/sys/dev/ath -I/usr/src-soekris/sys/dev/ath/ath_hal -I/usr/src-soekris/sys/contrib/dev/ath/ath_hal -I/usr/src-soekris/sys/contrib/ngatm -I/usr/src-soekris/sys/dev/twa -I/usr/src-soekris/sys/dev/cxgb -I/usr/src-soekris/sys/dev/cxgbe -I/usr/src-soekris/sys/contrib/libfdt -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -mno-aes -mno-avx -mno-mmx -mno-sse -msoft-float -ffreestanding -fstack-protector /usr/src-soekris/sys/i386/i386/genassym.c In file included from /usr/src-soekris/sys/i386/i386/genassym.c:44: In file included from /usr/src-soekris/sys/sys/systm.h:42: ./machine/cpufunc.h:468:41: warning: cast to 'char *' from smaller integer type 'u_int' (aka 'unsigned int') [-Wint-to-pointer-cast] __asm __volatile("invlpg %0" : : "m" (*(char *)addr) : "memory"); ^ In file included from /usr/src-soekris/sys/i386/i386/genassym.c:47: In file included from /usr/src-soekris/sys/sys/buf.h:260: In file included from /usr/src-soekris/sys/sys/proc.h:62: In file included from /usr/src-soekris/sys/sys/pcpu.h:48: In file included from ./machine/pcpu.h:36: ./machine/segments.h:91:29: error: use of undeclared identifier 'NLDT' extern union descriptor ldt[NLDT]; ^ In file included from /usr/src-soekris/sys/i386/i386/genassym.c:76: In file included from ./machine/pcb.h:45: ./machine/npx.h:56:14: error: use of 'savefpu' with tag type that does not match previous declaration void npxsave(union savefpu *addr); ^~~~~ struct ./x86/fpu.h:140:8: note: previous use is here struct savefpu { ^ In file included from /usr/src-soekris/sys/i386/i386/genassym.c:76: In file included from ./machine/pcb.h:45: ./machine/npx.h:57:36: error: use of 'savefpu' with tag type that does not match previous declaration void npxsetregs(struct thread *td, union savefpu *addr); ^~~~~ struct ./x86/fpu.h:140:8: note: previous use is here struct savefpu { ^ In file included from /usr/src-soekris/sys/i386/i386/genassym.c:76: ./machine/pcb.h:66:2: error: use of 'savefpu' with tag type that does not match previous declaration union savefpu pcb_user_save; ^~~~~ struct ./x86/fpu.h:140:8: note: previous use is here struct savefpu { ^ In file included from /usr/src-soekris/sys/i386/i386/genassym.c:76: ./machine/pcb.h:87:2: error: use of 'savefpu' with tag type that does not match previous declaration union savefpu *pcb_save; ^~~~~ struct ./x86/fpu.h:140:8: note: previous use is here struct savefpu { ^ In file included from /usr/src-soekris/sys/i386/i386/genassym.c:76: ./machine/pcb.h:100:30: warning: calling convention '__fastcall__' ignored for this target [-Wignored-attributes] void resumectx(struct pcb *) __fastcall; ^ /usr/src-soekris/sys/sys/cdefs.h:355:35: note: expanded from macro '__fastcall' #define __fastcall __attribute__((__fastcall__)) ^ In file included from /usr/src-soekris/sys/i386/i386/genassym.c:77: ./machine/sigframe.h:86:19: error: field has incomplete type 'struct ucontext' struct ucontext4 sf_uc; /* = *sf_ucontext */ ^ ./machine/sigframe.h:86:9: note: forward declaration of 'struct ucontext' struct ucontext4 sf_uc; /* = *sf_ucontext */ ^ /usr/src-soekris/sys/sys/ucontext.h:66:19: note: expanded from macro 'ucontext4' #define ucontext4 ucontext [....] ----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?52D670B3.7030707>