# amd64 crosscompile i386 kernel/world



## eyebone (Apr 17, 2010)

hi folks,

just wondering if it is possible with TARGET_ARCH and TARGET to crosscompile from an amd64 box userland and kernel for i386 systems :stud. my first attempts to do so resulted in errors. the host system is 8-0-Stable amd64.


```
# make buildkernel TARGET_ARCH=i386 TARGET=i386

/usr/src/sys/i386/i386/genassym.c:1: error: -mpreferred-stack-boundary=2 is not between 4 and 12
*** Error code 1

Stop in /usr/obj/i386/usr/src/sys/GENERIC.
*** Error code 1

Stop in /usr/src.
*** Error code 1

Stop in /usr/src.
```

in the same time "try" core dumped


```
kernel: pid 35453 (try), uid 0: exited on signal 10 (core dumped)
```

regards,


----------



## bschmidt (Apr 17, 2010)

It is possible, I'm doing it all the time  You just have to run either `# make buildworld TARGET=i386` or `# make kernel-toolchain TARGET=i386` before.


----------



## eyebone (Apr 17, 2010)

ah, thx bschmidt


----------

