Comments (10)
It should be OK to just delete those lines. (by which I mean I don't know what they really do)
it is caused by this: __weak_reference(__isinff, isinff);
from the definition of weak reference in: https://github.com/JuliaLang/openlibm/blob/master/include/cdefs-compat.h
from openlibm.
IIRC those are debug directives, so it should be fine to delete them (or comment them out) for now. If we run into any problems while debugging we can always take a second look.
from openlibm.
I though it was a linker command that controls the symbol's scope and allows it to finish compiling when there would otherwise be conflicts with certain built-in functions. But my research may very well be completely faulty.
from openlibm.
That does sound like a likely explanation.
-viral
On 02-Jul-2012, at 8:54 PM, Jameson Nash wrote:
I though it was a linker command that controls the symbol's scope and allows it to finish compiling when there would otherwise be conflicts with certain built-in functions. But my research may very well be completely faulty.
Reply to this email directly or view it on GitHub:
#9 (comment)
from openlibm.
If that is indeed the reason, then we may not be able to simply delete, right?
-viral
On 02-Jul-2012, at 8:54 PM, Jameson Nash wrote:
I though it was a linker command that controls the symbol's scope and allows it to finish compiling when there would otherwise be conflicts with certain built-in functions. But my research may very well be completely faulty.
Reply to this email directly or view it on GitHub:
#9 (comment)
from openlibm.
It seems that we need to find the correct weak reference directives for the Mach-O binary format. I'm digging through the apple developer manual and it seems that there are the proper directives to do that, but their usage is a little different. I'll see if I can get it to work.
from openlibm.
Ok, found it. This works, but I don't have git set up atm and I need to leave (be back in 30min), so feel free to apply in the meantime:
diff --git a/include/cdefs-compat.h b/include/cdefs-compat.h
index be310a1..81b1a62 100644
--- a/include/cdefs-compat.h
+++ b/include/cdefs-compat.h
@@ -49,6 +49,10 @@
__asm__(".asciz \"msg\""); \
__asm__(".previous")
#endif /* __STDC__ */
+#elif defined(__clang__) /* !__ELF__ */
+#define __weak_reference(sym,alias) \
+ __asm__(".weak_reference alias");\
+ __asm__(".set alias, sym")
#else /* !__ELF__ */
#ifdef __STDC__
#define __weak_reference(sym,alias) \
from openlibm.
Actually, I get a link time failure
LINK libopenlibm.dylib
<inline asm>:5:13: error: invalid reassignment of non-absolute variable 'alias'
.set alias, sym
^
LLVM ERROR: Error parsing inline asm
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [libopenlibm.dylib] Error 1
from openlibm.
Ah, yes. Inline assembly, not assembly by itself. Should be fixed.
from openlibm.
I'm running into this again when trying to use gcc-5
on OSX to compile libopenlibm
. This is killing my GCC-based OSX build that I'm trying to do.
$ make
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C build/openlibm-3ee2a6e6a9fc68cbf2ab00f830b9059215e40b06/ ARCH="x86_64" CC="gcc-5" FC="gfortran -m64" AR="ar" OS="Darwin" USECLANG=0 USEGCC=1 DESTDIR="" prefix=/Users/sabae/src/julia/usr bindir=/Users/sabae/src/julia/usr/bin libdir=/Users/sabae/src/julia/usr/lib libexecdir=/Users/sabae/src/julia/usr/libexec datarootdir=/Users/sabae/src/julia/usr/share includedir=/Users/sabae/src/julia/usr/include sysconfdir=/Users/sabae/src/julia/usr/etc O=
gcc-5 -fno-gnu89-inline -std=c99 -Wall -O3 -I/Users/sabae/src/julia/deps/build/openlibm-3ee2a6e6a9fc68cbf2ab00f830b9059215e40b06 -I/Users/sabae/src/julia/deps/build/openlibm-3ee2a6e6a9fc68cbf2ab00f830b9059215e40b06/include -I/Users/sabae/src/julia/deps/build/openlibm-3ee2a6e6a9fc68cbf2ab00f830b9059215e40b06/ld80 -I/Users/sabae/src/julia/deps/build/openlibm-3ee2a6e6a9fc68cbf2ab00f830b9059215e40b06/amd64 -I/Users/sabae/src/julia/deps/build/openlibm-3ee2a6e6a9fc68cbf2ab00f830b9059215e40b06/src -DASSEMBLER -D__BSD_VISIBLE -Wno-implicit-function-declaration -fPIC -I/Users/sabae/local/include -I/usr/local/include -c src/s_isinf.c -o src/s_isinf.c.o
/var/folders/zk/nh41l40158l2hr22v7mhzf4c0000gn/T//ccpiR1KV.s:1:9: error: unsupported directive '.stabs'
.stabs "_isinff",11,0,0,0
^
/var/folders/zk/nh41l40158l2hr22v7mhzf4c0000gn/T//ccpiR1KV.s:2:9: error: unsupported directive '.stabs'
.stabs "___isinff",1,0,0,0
^
make[2]: *** [src/s_isinf.c.o] Error 1
make[1]: *** [build/openlibm-3ee2a6e6a9fc68cbf2ab00f830b9059215e40b06/libopenlibm.dylib] Error 2
make: *** [julia-deps] Error 2
from openlibm.
Related Issues (20)
- fdlibm and the Java OpenJDK
- 32 or 64 bit openlibm?
- Support for ppc32 BE? HOT 11
- Segfault while linking wasm binaries against libopenlibm HOT 2
- openlibm, fdlibm, Java openjdk? HOT 1
- openlibm Arithmetic Support? HOT 1
- MSVC _Complex not support
- Build fails on macOS with GCC: s_fpclassify.c: error: storage size of 'u' isn't known
- i387 asm does not compile under djgpp
- aarch64/fenv.c:41:23: error: invalid initializer HOT 1
- configure: error: libmpfr not found or uses a different ABI (including static vs shared). HOT 1
- makefile error HOT 1
- openlibm performance on ARM server is very poor HOT 7
- C versions of remquo deliver wrong quotient if x == -y
- ld128 coshl mishandles tiny inputs HOT 1
- Build shared lib with CMake
- Replace GNU testsuite HOT 1
- CMake build fails on macOS arm64/aarch64
- CMake parity with Makefile HOT 2
- expm1l returns NaN instead of valid number
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openlibm.