Patch to remove hard dependency of libga68.so with libm

Mohammad-Reza Nabipoor mnabipoor@gnu.org
Sat Mar 21 13:52:52 GMT 2026


Hi Jose.

On Sat, Mar 21, 2026 at 01:23:40PM +0100, Jose E. Marchesi wrote:
> 
> Hi Mohammad.
> 
> Can you please try the patch below?  It basically provides an
> implementation of floorl, floor and floorf.  The GCC builtins we expand
> may require these standard functions, and the idea is to keep libga68 in
> a way it will not depend of libm unless the user explicitly uses an
> operator/etc that requires it.
> 
> In other words, the idea is that no code in the Algol 68 parts of
> libga68 shall drag in a libm dependency.
> 

It works on arm-none-eabi. Now my `blink-leds' example doesn't need `-lm'
to build.

I've also added the following dummy code and checked the disasm, I see the
`floorf' in the output.

    real b := ABS read_word (dummy_bits_addr);
    int a := ENTIER b;


Thanks!


More information about the Algol68 mailing list