Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 9 Jan 2008 19:36:35 +0100
From:      Bernd Walter <ticso@cicely12.cicely.de>
To:        arm@freebsd.org
Cc:        Bernd Walter <ticso@cicely12.cicely.de>
Subject:   make kernel.tramp broken at least in cross environments
Message-ID:  <20080109183634.GC79270@cicely12.cicely.de>

next in thread | raw e-mail | index | archive | help
buildhost is i386 few weeks old RELENG_7
Source to be compiled is a few days old RELENG_7

The ${KERNEL_KO}.tramp: target is missing -I../../.. in ${CC} calls
and arm/arm/elf_trampoline.c was including stlib.h, which it didn't
require - it's compiling -nostdlib anyway.

Unless someone is complaining or come up with a better fix I will
commit this change.

[61]cicely7# make TARGET=arm TARGET_ARCH=arm buildenv
Entering world for arm:arm
# pwd
/data/builder/arm-test-RELENG_7/src
# cd sys/arm/compile/BWCT
# make kernel.tramp
echo "#define KERNNAME \"kernel.tmp\"" >opt_kernname.h
sed s/0xc0000000/0x20000000/ ldscript.arm > ldscript.arm.tramp
sed s/" + SIZEOF_HEADERS"// ldscript.arm.tramp >  ldscript.arm.tramp.noheader
echo "#include <machine/asm.h>" >tmphack.S
echo "ENTRY(_start)" >>tmphack.S
echo "bl _startC" >>tmphack.S
objcopy --strip-symbol '$d' --strip-symbol '$a'  -g --strip-symbol '$t' kernel kernel.tmp
eval $(stat -s kernel.tmp) &&  echo "#define KERNSIZE $st_size" >>opt_kernname.h
cc -O -nostdlib -I. -Xlinker -T -Xlinker ldscript.arm.tramp  tmphack.S ../../../arm/arm/elf_trampoline.c ../../../arm/arm/inckern.S  ../../../arm/arm/cpufunc_asm_arm7tdmi.S  ../../../arm/arm/cpufunc_asm_arm8.S ../../../arm/arm/cpufunc_asm_arm9.S  ../../../arm/arm/cpufunc_asm_sa1.S ../../../arm/arm/cpufunc_asm_arm10.S  ../../../arm/arm/cpufunc_asm_xscale.S ../../../arm/arm/cpufunc_asm.S  ../../../arm/arm/cpufunc_asm_xscale_c3.S -o kernel.tramp
In file included from tmphack.S:1:
./machine/asm.h:41:23: error: sys/cdefs.h: No such file or directory
../../../arm/arm/elf_trampoline.c:25:23: error: sys/cdefs.h: No such file or directory
../../../arm/arm/elf_trampoline.c:26: error: expected declaration specifiers or '...' before string constant
../../../arm/arm/elf_trampoline.c:26: warning: data definition has no type or storage class
../../../arm/arm/elf_trampoline.c:28:23: error: sys/param.h: No such file or directory
../../../arm/arm/elf_trampoline.c:29:23: error: sys/elf32.h: No such file or directory
../../../arm/arm/elf_trampoline.c:30:25: error: sys/inflate.h: No such file or directory
In file included from ../../../arm/arm/elf_trampoline.c:31:
./machine/elf.h:41:29: error: sys/elf_generic.h: No such file or directory
In file included from ../../../arm/arm/elf_trampoline.c:31:
./machine/elf.h:52: warning: data definition has no type or storage class
./machine/elf.h:52: warning: parameter names (without types) in function declaration
In file included from ../../../arm/arm/elf_trampoline.c:32:
./machine/pte.h:45: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'pd_entry_t'
./machine/pte.h:46: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'pt_entry_t'
../../../arm/arm/elf_trampoline.c:36:20: error: stdlib.h: No such file or directory
../../../arm/arm/elf_trampoline.c: In function 'memcpy':
../../../arm/arm/elf_trampoline.c:114: error: 'vm_offset_t' undeclared (first use in this function)
../../../arm/arm/elf_trampoline.c:114: error: (Each undeclared identifier is reported only once
../../../arm/arm/elf_trampoline.c:114: error: for each function it appears in.)
../../../arm/arm/elf_trampoline.c:114: error: expected ')' before 'd'
../../../arm/arm/elf_trampoline.c:115: error: expected ')' before 's'
../../../arm/arm/elf_trampoline.c:116: error: 'uint32_t' undeclared (first use in this function)
../../../arm/arm/elf_trampoline.c:116: error: expected expression before ')' token
../../../arm/arm/elf_trampoline.c: In function 'bzero':
../../../arm/arm/elf_trampoline.c:134: error: 'vm_offset_t' undeclared (first use in this function)
../../../arm/arm/elf_trampoline.c:134: error: expected ')' before 'tmp'
../../../arm/arm/elf_trampoline.c:135: error: 'uint32_t' undeclared (first use in this function)
../../../arm/arm/elf_trampoline.c:135: error: expected expression before ')' token
../../../arm/arm/elf_trampoline.c: In function 'get_cachetype_cp15':
../../../arm/arm/elf_trampoline.c:226: error: 'u_int' undeclared (first use in this function)
../../../arm/arm/elf_trampoline.c:226: error: expected ';' before 'ctype'
../../../arm/arm/elf_trampoline.c:227: error: expected ';' before 'multiplier'
../../../arm/arm/elf_trampoline.c:230: error: 'ctype' undeclared (first use in this function)
../../../arm/arm/elf_trampoline.c:251: error: 'isize' undeclared (first use in this function)
../../../arm/arm/elf_trampoline.c:252: error: 'multiplier' undeclared (first use in this function)
../../../arm/arm/elf_trampoline.c:266: error: 'dsize' undeclared (first use in this function)
../../../arm/arm/elf_trampoline.c:229: error: invalid lvalue in asm output 0
../../../arm/arm/elf_trampoline.c: In function 'load_kernel':
../../../arm/arm/elf_trampoline.c:396: error: 'Elf32_Ehdr' undeclared (first use in this function)
../../../arm/arm/elf_trampoline.c:396: error: 'eh' undeclared (first use in this function)
../../../arm/arm/elf_trampoline.c:397: error: 'Elf32_Phdr' undeclared (first use in this function)
../../../arm/arm/elf_trampoline.c:397: error: expected ';' before 'phdr'
../../../arm/arm/elf_trampoline.c:398: error: 'Elf32_Shdr' undeclared (first use in this function)
../../../arm/arm/elf_trampoline.c:398: error: expected ';' before 'shdr'
../../../arm/arm/elf_trampoline.c:403: error: 'vm_offset_t' undeclared (first use in this function)
../../../arm/arm/elf_trampoline.c:403: error: expected ';' before 'lastaddr'
../../../arm/arm/elf_trampoline.c:404: error: 'Elf_Addr' undeclared (first use in this function)
../../../arm/arm/elf_trampoline.c:404: error: expected ';' before 'ssym'
../../../arm/arm/elf_trampoline.c:405: error: 'Elf_Dyn' undeclared (first use in this function)
../../../arm/arm/elf_trampoline.c:405: error: 'dp' undeclared (first use in this function)
../../../arm/arm/elf_trampoline.c:407: error: expected expression before ')' token
../../../arm/arm/elf_trampoline.c:408: error: 'ssym' undeclared (first use in this function)
../../../arm/arm/elf_trampoline.c:408: error: 'esym' undeclared (first use in this function)
../../../arm/arm/elf_trampoline.c:410: error: 'phdr' undeclared (first use in this function)
[...]

-- 
B.Walter                http://www.bwct.de      http://www.fizon.de
bernd@bwct.de           info@bwct.de            support@fizon.de



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080109183634.GC79270>