From: Alexandre Oliva Date: Thu, 22 Oct 2020 05:32:04 +0000 (-0300) Subject: aarch64-* and ppc*-linux-gnu long long float/long double mismatch X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f72d7f7c2cac61612a70d22e03cb95ed47f3a4d4;p=gcc.git aarch64-* and ppc*-linux-gnu long long float/long double mismatch Some platforms have failed to build because long long float is mapped to double rather than long double, and then the attempts to import intrinsics for long double in Aux_Long_Long_Float raise warnings turned into errors. This patch is a work around for the mismatch, arranging for Aux_Long_Long_Float to map to Aux_Long_Float. for gcc/ada/ChangeLog * Makefile.rtl (LIBGNAT_TARGET_PAIRS): Use a-nallfl__wraplf.ads on aarch64-* and ppc*-linux-gnu targets. * libgnat/a-nallfl__wraplf.ads: New. --- diff --git a/gcc/ada/Makefile.rtl b/gcc/ada/Makefile.rtl index 898eb5d7d76..87ee3e94192 100644 --- a/gcc/ada/Makefile.rtl +++ b/gcc/ada/Makefile.rtl @@ -1402,6 +1402,7 @@ ifeq ($(strip $(filter-out aarch64 arm% coff wrs vx%,$(target_cpu) $(target_vend VX=vxworks7 EH_MECHANISM=-gcc SIGTRAMP_OBJ=sigtramp-vxworks.o + LIBGNAT_TARGET_PAIRS += a-nallfl.ads. -- +-- -- +-- GNAT was originally developed by the GNAT team at New York University. -- +-- Extensive contributions were provided by Ada Core Technologies Inc. -- +-- -- +------------------------------------------------------------------------------ + +-- This package provides the basic computational interface for the +-- generic elementary functions. The functions in this unit are +-- wrappers for those in the Long Float package. + +with Ada.Numerics.Aux_Long_Float; + +package Ada.Numerics.Aux_Long_Long_Float is + pragma Pure; + + subtype T is Long_Long_Float; + package Aux renames Ada.Numerics.Aux_Long_Float; + subtype W is Aux.T; + + -- Use the Aux implementation. + + function Sin (X : T) return T + is (T (Aux.Sin (W (X)))); + + function Cos (X : T) return T + is (T (Aux.Cos (W (X)))); + + function Tan (X : T) return T + is (T (Aux.Tan (W (X)))); + + function Exp (X : T) return T + is (T (Aux.Exp (W (X)))); + + function Sqrt (X : T) return T + is (T (Aux.Sqrt (W (X)))); + + function Log (X : T) return T + is (T (Aux.Log (W (X)))); + + function Acos (X : T) return T + is (T (Aux.Acos (W (X)))); + + function Asin (X : T) return T + is (T (Aux.Asin (W (X)))); + + function Atan (X : T) return T + is (T (Aux.Atan (W (X)))); + + function Sinh (X : T) return T + is (T (Aux.Sinh (W (X)))); + + function Cosh (X : T) return T + is (T (Aux.Cosh (W (X)))); + + function Tanh (X : T) return T + is (T (Aux.Tanh (W (X)))); + + function Pow (X, Y : T) return T + is (T (Aux.Pow (W (X), W (Y)))); + +end Ada.Numerics.Aux_Long_Long_Float;