mirror of
https://git.planet-casio.com/Lephenixnoir/OpenLibm.git
synced 2025-01-01 06:23:39 +01:00
Export ldexp aliases on Windows
skip END and add .drectve export in assembly versions uncomment __strong_reference definition from cdefs-compat.h use weak references in place of strong references on Mac add DLLEXPORT to all strong references Fixes Julia issue #6777
This commit is contained in:
parent
516b4f4222
commit
8b59bbc18b
4 changed files with 22 additions and 10 deletions
|
@ -41,10 +41,14 @@ ENTRY(scalbn)
|
||||||
fstpl -8(%rsp)
|
fstpl -8(%rsp)
|
||||||
movsd -8(%rsp),%xmm0
|
movsd -8(%rsp),%xmm0
|
||||||
ret
|
ret
|
||||||
|
#ifndef _WIN64
|
||||||
END(scalbn)
|
END(scalbn)
|
||||||
|
|
||||||
.globl CNAME(ldexp)
|
.globl CNAME(ldexp)
|
||||||
|
#else
|
||||||
|
.globl CNAME(ldexp); .section .drectve; .ascii " -export:ldexp"
|
||||||
|
#endif
|
||||||
.set CNAME(ldexp),CNAME(scalbn)
|
.set CNAME(ldexp),CNAME(scalbn)
|
||||||
|
|
||||||
/* Enable stack protection */
|
/* Enable stack protection */
|
||||||
#if defined(__linux__) && defined(__ELF__)
|
#if defined(__linux__) && defined(__ELF__)
|
||||||
.section .note.GNU-stack,"",%progbits
|
.section .note.GNU-stack,"",%progbits
|
||||||
|
|
|
@ -41,12 +41,14 @@ ENTRY(scalbnf)
|
||||||
fstps -8(%rsp)
|
fstps -8(%rsp)
|
||||||
movss -8(%rsp),%xmm0
|
movss -8(%rsp),%xmm0
|
||||||
ret
|
ret
|
||||||
|
#ifndef _WIN64
|
||||||
END(scalbnf)
|
END(scalbnf)
|
||||||
|
|
||||||
.globl CNAME(ldexpf)
|
.globl CNAME(ldexpf)
|
||||||
.set CNAME(ldexpf),CNAME(scalbnf)
|
#else
|
||||||
|
.globl CNAME(ldexpf); .section .drectve; .ascii " -export:ldexpf"
|
||||||
|
#endif
|
||||||
|
.set CNAME(ldexpf),CNAME(scalbnf)
|
||||||
|
|
||||||
|
|
||||||
/* Enable stack protection */
|
/* Enable stack protection */
|
||||||
#if defined(__linux__) && defined(__ELF__)
|
#if defined(__linux__) && defined(__ELF__)
|
||||||
.section .note.GNU-stack,"",%progbits
|
.section .note.GNU-stack,"",%progbits
|
||||||
|
|
|
@ -26,12 +26,14 @@ ENTRY(scalbnl)
|
||||||
fstpt (%rcx)
|
fstpt (%rcx)
|
||||||
#endif
|
#endif
|
||||||
ret
|
ret
|
||||||
|
#ifndef _WIN64
|
||||||
END(scalbnl)
|
END(scalbnl)
|
||||||
|
.globl CNAME(ldexpl)
|
||||||
|
#else
|
||||||
|
.globl CNAME(ldexpl); .section .drectve; .ascii " -export:ldexpl"
|
||||||
|
#endif
|
||||||
|
.set CNAME(ldexpl),CNAME(scalbnl)
|
||||||
|
|
||||||
.globl CNAME(ldexpl)
|
|
||||||
.set CNAME(ldexpl),CNAME(scalbnl)
|
|
||||||
|
|
||||||
|
|
||||||
/* Enable stack protection */
|
/* Enable stack protection */
|
||||||
#if defined(__linux__) && defined(__ELF__)
|
#if defined(__linux__) && defined(__ELF__)
|
||||||
.section .note.GNU-stack,"",%progbits
|
.section .note.GNU-stack,"",%progbits
|
||||||
|
|
|
@ -22,8 +22,12 @@
|
||||||
|
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
#ifndef __strong_reference
|
#ifndef __strong_reference
|
||||||
#define __strong_reference(sym,aliassym)
|
#ifdef __APPLE__
|
||||||
//extern __typeof (sym) aliassym __attribute__ ((__alias__ (#sym)));
|
#define __strong_reference(sym,aliassym) __weak_reference(sym,aliassym)
|
||||||
|
#else
|
||||||
|
#define __strong_reference(sym,aliassym) \
|
||||||
|
DLLEXPORT extern __typeof (sym) aliassym __attribute__ ((__alias__ (#sym)));
|
||||||
|
#endif /* __APPLE__ */
|
||||||
#endif /* __strong_reference */
|
#endif /* __strong_reference */
|
||||||
|
|
||||||
#ifndef __weak_reference
|
#ifndef __weak_reference
|
||||||
|
|
Loading…
Reference in a new issue