From a9fed72b4b6e5b68e7b200cd9a37567d969d2ded Mon Sep 17 00:00:00 2001 From: PulkoMandy Date: Fri, 22 Oct 2021 13:11:51 +0200 Subject: [PATCH] sparc: add arch-specific libroot stubs These are helper functions for long double math. On sparc there is no hardware implementation of long double instructions, and the ABI defines these methods which must be part of the C library. GCC calls the methods directly in its generated code. They were already added to libroot, but they also need to be in the stub, which is used during bootstrapping to link mpfr (during the target gcc build). I put these in a separate file because I assume the generation of the stubs file from the real libroot.so will usually not be run on sparc, and will not include these symbols otherwise. This may become a problem if libroot for different architectures starts to diverge further. Change-Id: I6070394c685fee35b3dc12a507f5a6271571b993 Reviewed-on: https://review.haiku-os.org/c/haiku/+/4636 Tested-by: Commit checker robot Reviewed-by: waddlesplash --- src/system/libroot/stubbed/Jamfile | 2 + .../libroot/stubbed/libroot_stubs_sparc.c | 51 +++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 src/system/libroot/stubbed/libroot_stubs_sparc.c diff --git a/src/system/libroot/stubbed/Jamfile b/src/system/libroot/stubbed/Jamfile index 676df07b3f..a1b5a6107e 100644 --- a/src/system/libroot/stubbed/Jamfile +++ b/src/system/libroot/stubbed/Jamfile @@ -10,6 +10,8 @@ for architectureObject in [ MultiArchSubDirSetup ] { local stubsSource ; if $(TARGET_PACKAGING_ARCH) = x86_gcc2 { stubsSource = [ FGristFiles libroot_stubs_legacy.c ] ; + } else if $(TARGET_PACKAGING_ARCH) = sparc { + stubsSource = [ FGristFiles libroot_stubs.c libroot_stubs_sparc.c ] ; } else { stubsSource = [ FGristFiles libroot_stubs.c ] ; } diff --git a/src/system/libroot/stubbed/libroot_stubs_sparc.c b/src/system/libroot/stubbed/libroot_stubs_sparc.c new file mode 100644 index 0000000000..b10f73852c --- /dev/null +++ b/src/system/libroot/stubbed/libroot_stubs_sparc.c @@ -0,0 +1,51 @@ +void _Qp_fgt(); +void _Qp_flt(); +void _Qp_fne(); +void _Qp_fgt(); +void _Qp_flt(); +void _Qp_fgt(); +void _Qp_flt(); +void _Qp_fle(); +void _Qp_fgt(); +void _Qp_fle(); +void _Qp_fle(); +void _Qp_fle(); +void _Qp_fle(); +void _Qp_mul(); +void _Qp_fne(); +void _Qp_fgt(); +void _Qp_fge(); +void _Qp_fgt(); +void _Qp_fge(); +void _Qp_fge(); +void _Qp_fgt(); +void _Qp_fge(); +void _Qp_fge(); +void _Qp_mul(); +void _Qp_fle(); +void _Qp_fgt(); +void _Qp_fge(); +void _Qp_mul(); +void _Qp_fgt(); +void _Qp_fle(); +void _Qp_fgt(); +void _Qp_fle(); +void _Qp_mul(); +void _Qp_mul(); +void _Qp_mul(); +void _Qp_qtod(); +void _Qp_dtoq(); +void _Qp_sub(); +void _Qp_fge(); +void _Qp_fgt(); +void _Qp_fge(); +void _Qp_fgt(); +void _Qp_fge(); +void _Qp_fgt(); +void _Qp_fge(); +void _Qp_mul(); +void _Qp_mul(); +void _Qp_mul(); +void _Qp_mul(); +void _Qp_qtod(); +