diff options
author | Sam James <sam@gentoo.org> | 2022-02-02 08:02:26 +0000 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2022-04-24 03:20:38 +0100 |
commit | 3c596b4636adfdaba638df642a6e00119f01cddc (patch) | |
tree | 2c3568ae4f5db3e4f01a56a09ab7f2e0660609d1 /eclass/kernel-build.eclass | |
parent | sys-apps/systemd: Stabilize 250.4-r1 hppa, #835979 (diff) | |
download | gentoo-3c596b4636adfdaba638df642a6e00119f01cddc.tar.gz gentoo-3c596b4636adfdaba638df642a6e00119f01cddc.tar.bz2 gentoo-3c596b4636adfdaba638df642a6e00119f01cddc.zip |
kernel-build.eclass: add HPPA support
Support HPPA kernel builds.
Notes:
- HPPA 2.0 supports 32-bit and 64-bit kernels (HPPA 2.0 userland remains
32-bit for now as toolchain support isn't there yet for 64-bit).
I've decided to only accommodate 64-bit kernels here unless/until someone
requests & can help figure out an acceptable solution for 32-bit kernels
for HPPA 2.0.
- HPPA 1.x should be fine as there's no need for a cross-compiler there,
unlike HPPA 2.x for 64-bit (sys-devel/kgcc64). It should Just Work,
but not tested.
Not adding a BDEPEND on sys-devel/kgcc64 as it's unclear how to do this
cleanly only for HPPA 2.0.
Tested on RP3440 and C8000.
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'eclass/kernel-build.eclass')
-rw-r--r-- | eclass/kernel-build.eclass | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/eclass/kernel-build.eclass b/eclass/kernel-build.eclass index 279649301087..0a49533e48d3 100644 --- a/eclass/kernel-build.eclass +++ b/eclass/kernel-build.eclass @@ -1,4 +1,4 @@ -# Copyright 2020-2021 Gentoo Authors +# Copyright 2020-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: kernel-build.eclass @@ -52,6 +52,20 @@ BDEPEND=" kernel-build_src_configure() { debug-print-function ${FUNCNAME} "${@}" + if ! tc-is-cross-compiler && use hppa ; then + if [[ ${CHOST} == hppa2.0-* ]] ; then + # Only hppa2.0 can handle 64-bit anyway. + # Right now, hppa2.0 can run both 32-bit and 64-bit kernels, + # but it seems like most people do 64-bit kernels now + # (obviously needed for more RAM too). + + # TODO: What if they want a 32-bit kernel? + # Not too worried about this case right now. + elog "Forcing 64 bit (${CHOST/2.0/64}) build..." + export CHOST=${CHOST/2.0/64} + fi + fi + # force ld.bfd if we can find it easily local LD="$(tc-getLD)" if type -P "${LD}.bfd" &>/dev/null; then |