Re: x86_64 kernel with i586 userland plus SDK?

Bruce Ashfield <bruce.ashfield@...>

On 12/17/18 8:50 AM, Richard Weinberger wrote:
On Mon, Dec 17, 2018 at 2:47 PM Bruce Ashfield
<bruce.ashfield@...> wrote:
Yocto seems to try a different approach.
When I use qemux86-64.conf with DEFAULTTUNE being "i586" it generates a 32bit
toolchain by default.

Build Configuration:
BB_VERSION = "1.38.0"
BUILD_SYS = "x86_64-linux"
TARGET_SYS = "i686-poky-linux"
MACHINE = "myqemux86-64"
DISTRO = "poky"
TUNE_FEATURES = "m32 i586"

What I need is a x86_64-poky-linux toolchain with -m32 set for everything except
kernel (and modules).
For the most part the kernel builds do not take any flags from the
outside, i.e. they are all generated based on the kernel build
structure, not what is calling the build. (unless you bury flags
into the definition of $(CC), etc, but I wouldn't recommend that.

So if you have a 64 bit capable toolchain, have a 64 bit configured
kernel (i.e. CONFIG_64BIT=y), are passing -m32 to usespace .. the
kernel really should build 64bit.
This was my plan, but yocto always create a 32bit toolchain when
it set DEFAULTTUNE to i586 for a 64bit machine.

Have you tried that and are seeing the kernel still be built with the
32bit toolchain ?
Yes, it builds with i686-poky-linux. :-(
It's Monday, and I've only had half a coffee .. so bear with me. When
I see i686, I'd expect that without -m32 it is generating 64bit by
default .. so there's definitely a -m32 sneaking into the definition of
CC for the kernel build ?

Do you have a dump of the kernel build line that I could see ?


Join to automatically receive all group messages.