fixdep, etc. gets built for wrong arch when cross-compiling Ubuntu kernel
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux (Ubuntu) |
Confirmed
|
Wishlist
|
Unassigned |
Bug Description
Cross-compiling the Ubuntu kernel using the standard debian/rules methods produces a linux-headers-
Example from an ARM64 cross-compiled linux-headers package (note the x86-64 executable):
usr/src/
The kernel itself, of course, gets properly cross-compiled and the generated packages (including linux-headers) will install fine on the target. But the bogus executables prevent full functionality on that installation, i.e. it cannot be used for kernel driver development.
The fundamental reason why this occurs is that the build host needs to run some of those compiled executables itself during the build, but those executables should NOT get packaged. Instead, the build should be reorganized so that it compiles a set of temporary host-arch-execs for use during the build, but then separately (cross)-compiles them as target-arch-execs for inclusion in the linux-headers package.
This bug is Importance:Wishlist because:
- cross-compiled Ubuntu kernel package builds aren't technically "supported".
- this glitch only happens with engineer-built cross-compiled test kernels.
- building natively instead (i.e. in a Launchpad PPA) avoids the problem.
- this is not a new misbehavior; our cross-compile build rules have always been this way.