From f8695a7d33d03250bacc1dd833653adda34c357a Mon Sep 17 00:00:00 2001 From: Sam James Date: Thu, 2 Feb 2023 17:04:28 +0000 Subject: crossdev: style tweaks Signed-off-by: Sam James --- crossdev | 125 ++++++++++++++++++++++++++++++++++++++------------------------- 1 file changed, 76 insertions(+), 49 deletions(-) diff --git a/crossdev b/crossdev index bd13f7f..2299661 100755 --- a/crossdev +++ b/crossdev @@ -244,21 +244,23 @@ parse_target() { # this is a linux+ target, not microcontroller (below) avr32*) :;; - avr*) KPKG="[none]" - LCAT="dev-embedded" - LPKG="avr-libc" - GUSE+=" -fortran -go" # doesn't work - MULTILIB_USE="yes" #377039 - BUSE+=" cxx" - STAGE_DEFAULT=${STAGE_LIBC} - WITH_DEF_HEADERS="no";; + avr*) + KPKG="[none]" + LCAT="dev-embedded" + LPKG="avr-libc" + GUSE+=" -fortran -go" # doesn't work + MULTILIB_USE="yes" #377039 + BUSE+=" cxx" + STAGE_DEFAULT=${STAGE_LIBC} + WITH_DEF_HEADERS="no" + ;; # Has no glibc support yet (or even ABI defined). Can # only compile linux kernel: # https://parisc.wiki.kernel.org/index.php/Userspace64 hppa64*) - STAGE_DEFAULT=${STAGE_C_ONLY} - WITH_DEF_HEADERS="no";; + STAGE_DEFAULT=${STAGE_C_ONLY} + WITH_DEF_HEADERS="no";; ia64*) # gcc's libgcc needs glibc headers for unwinder. @@ -275,58 +277,80 @@ parse_target() { # added in bug #609602 mmix*) - KPKG="[none]" - LPKG="newlib" - STAGE_DEFAULT=${STAGE_LIBC} - WITH_DEF_HEADERS="no";; + KPKG="[none]" + LPKG="newlib" + STAGE_DEFAULT=${STAGE_LIBC} + WITH_DEF_HEADERS="no" + ;; # due to upstream lameness, build C/C++ at first glance *-cygwin) - GUSE_DISABLE_STAGE_1+=" -nocxx cxx";; + GUSE_DISABLE_STAGE_1+=" -nocxx cxx" + ;; # these are the mingw64 targets that binutils seems to use x86_64-*-mingw*|*-w64-mingw*) - KPKG="[none]"; - LCAT="dev-util"; LPKG="mingw64-runtime" - WITH_DEF_HEADERS="yes" # gcc can't boot without headers: bug #693770 - GMASK+=" default-stack-clash-protection hardened" - GUSE+=" -default-stack-clash-protection -hardened" # gcc ICEs as libssp/ssp.c:186:1: internal compiler error: in seh_emit_stackalloc - ;; + KPKG="[none]"; + LCAT="dev-util" + LPKG="mingw64-runtime" + WITH_DEF_HEADERS="yes" # gcc can't boot without headers: bug #693770 + GMASK+=" default-stack-clash-protection hardened" + GUSE+=" -default-stack-clash-protection -hardened" # gcc ICEs as libssp/ssp.c:186:1: internal compiler error: in seh_emit_stackalloc + ;; mingw*|*-mingw*) - # bug #584858 - die "'${CTARGET}' target is not supported anymore, use i686-w64-mingw32" - ;; + # bug #584858 + die "'${CTARGET}' target is not supported anymore, use i686-w64-mingw32" + ;; - spu*) TARCH=ppc64; - KPKG="[none]"; - LPKG="newlib";; - ppu*) TARCH=ppc64;; + spu*) + TARCH=ppc64 + KPKG="[none]" + LPKG="newlib" + ;; + ppu*) + TARCH=ppc64 + ;; mips64*-gnuabin32|mipsisa64*-gnuabin32) - [[ ${MULTILIB_ABIS} == "default" ]] && MULTILIB_ABIS="n32";; - mips64*-gnuabi64|mipsisa64*-gnuabi64|\ - mips64*-gnuabin64|mipsisa64*-gnuabin64) - [[ ${MULTILIB_ABIS} == "default" ]] && MULTILIB_ABIS="n64";; - mips64*-gnuabi32|mipsisa64*-gnuabi32|\ - mips64*-gnuabio32|mipsisa64*-gnuabio32) - [[ ${MULTILIB_ABIS} == "default" ]] && MULTILIB_ABIS="o32";; + [[ ${MULTILIB_ABIS} == "default" ]] && MULTILIB_ABIS="n32" + ;; + mips64*-gnuabi64|mipsisa64*-gnuabi64|mips64*-gnuabin64|mipsisa64*-gnuabin64) + [[ ${MULTILIB_ABIS} == "default" ]] && MULTILIB_ABIS="n64" + ;; + mips64*-gnuabi32|mipsisa64*-gnuabi32|mips64*-gnuabio32|mipsisa64*-gnuabio32) + [[ ${MULTILIB_ABIS} == "default" ]] && MULTILIB_ABIS="o32" + ;; esac # Tweak packages based upon CTARGET case ${CTARGET} in # Normal Linux host, just diff libc - *-dietlibc) LPKG="dietlibc"; LCAT="dev-libs";; - *-gnu*) LPKG="glibc";; - *-klibc) LPKG="klibc";; - *-uclibc*) LPKG="uclibc-ng";; - *-uclinux) LPKG="uclibc-ng";; - *-musl*) LPKG="musl";; + *-dietlibc) + LPKG="dietlibc" + LCAT="dev-libs" + ;; + *-gnu*) + LPKG="glibc" + ;; + *-klibc) + LPKG="klibc" + ;; + *-uclibc*) + LPKG="uclibc-ng" + ;; + *-uclinux) + LPKG="uclibc-ng" + ;; + *-musl*) + LPKG="musl" + ;; # Windows targets *-cygwin) - LCAT="dev-libs"; LPKG="cygwin"; - KPKG="[none]"; + LCAT="dev-libs" + LPKG="cygwin" + KPKG="[none]" ;; # Bare metal targets @@ -407,10 +431,13 @@ parse_target() { case ${CTARGET} in # [1.]: no -fPIC flag support: # check as '$CC -fPIC -c -x c - =gcc-6, nopie is =gcc-6, nossp is