[Snek] ev3 build: musl or static older libc, or ?

Keith Packard keithp at keithp.com
Thu Feb 20 08:46:17 PST 2020


"Mikhail Gusarov" <dottedmag at dottedmag.net> writes:

> Sure, it works. The symbols are all from libm: powf, expf, exp2f, logf, 
> log2f.

Awesome!

> __asm__ declarations need to be added to every compilation unit where
> the symbols are used, namely snek-exec.c and snek-math.c.

Could you stick them in an EV3-specific header file included by those
modules? I just tried placing this in snek-posix.h and it seemed to
work:

__asm__(".symver powf,powf at GLIBC_2.2.5");
__asm__(".symver expf,expf at GLIBC_2.2.5");
__asm__(".symver exp2f,exp2f at GLIBC_2.2.5");
__asm__(".symver logf,logf at GLIBC_2.2.5");
__asm__(".symver log2f,log2f at GLIBC_2.2.5");

> OK to have them there under #ifdef? What would be the good preprocessor 
> define to check here?

Hrm. It should probably reflect the glibc version requirement. Something
like SNEK_USE_GLIBC_2_2_5_MATH ?

I wonder what changed in these functions ...

-- 
-keith
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <http://keithp.com/pipermail/snek/attachments/20200220/9ea50cd5/attachment.sig>


More information about the Snek mailing list