llvm ld vs binutils ld
- Reply: Dimitry Andric : "Re: llvm ld vs binutils ld"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 27 Jan 2024 17:08:49 UTC
In an attempt to cleanup a bit of src/lib/msun, I ran into a small issue that I cannot explain at the moment. If I have /usr/bin/ld in my path prior to /usr/local/bin/ld everything works % which ld /usr/bin/ld % make clean && make cleandepend % make and I have a libm.so.5. But if /usr/local/bin/ld is found, I see % cd msun % make clean && make cleandepend % make ... ld: error: version script assignment of 'FBSD_1.0' to symbol 'fabs' \ failed: symbol not defined cc: error: linker command failed with exit code 1 (use -v to see invocation) *** Error code 1 Stop. make: stopped in /usr/src/lib/msun % grep fabs /usr/src/lib/msun/Symbol.map fabs; fabsf; fabsl; But, if one looks in msun/Makefile, one see # FreeBSD's C library supplies these functions: #COMMON_SRCS+= s_fabs.c s_frexp.c s_isnan.c s_ldexp.c s_modf.c so fabs is not built with libm. % nm --dynamic /lib/libc.so.7 | grep fabs 00000000000ba600 T fabs % nm --dynamic /lib/libm.so.5 | grep fabs 000000000001fa90 T fabsf 00000000000252e0 T fabsl Is this a known issue? Should fabs be removed from Symbol.map? -- Steve