Opened 4 years ago

Last modified 2 years ago

#12301 assigned task

[ARM] Implement missing glibc math funcs

Reported by: kallisti5 Owned by: nobody
Priority: normal Milestone: Unscheduled
Component: System/libroot.so Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Has a Patch: no Platform: arm

Description

Link /home/kallisti5/Code/haiku/generated.beagle/objects/haiku/arm/release/system/libroot/libroot.so 
/home/kallisti5/Code/haiku/generated.beagle/objects/haiku/arm/release/system/libroot/posix/glibc/math/posix_gnu_math.o: In function `cabs':
k_casinhl.c:(.text+0x0): undefined reference to `__hypot'
/home/kallisti5/Code/haiku/generated.beagle/objects/haiku/arm/release/system/libroot/posix/glibc/math/posix_gnu_math.o: In function `__cabsf':
k_casinhl.c:(.text+0x4): undefined reference to `__hypotf'
/home/kallisti5/Code/haiku/generated.beagle/objects/haiku/arm/release/system/libroot/posix/glibc/math/posix_gnu_math.o: In function `cabsl':
k_casinhl.c:(.text+0x14): undefined reference to `__hypotl'
/home/kallisti5/Code/haiku/generated.beagle/objects/haiku/arm/release/system/libroot/posix/glibc/math/posix_gnu_math.o: In function `cargl':
k_casinhl.c:(.text+0x5c): undefined reference to `__atan2l'
/home/kallisti5/Code/haiku/generated.beagle/objects/haiku/arm/release/system/libroot/posix/glibc/math/posix_gnu_math.o: In function `__kernel_casinh':
k_casinhl.c:(.text+0x124): undefined reference to `__clog'
k_casinhl.c:(.text+0x218): undefined reference to `__log1p'
k_casinhl.c:(.text+0x290): undefined reference to `__log1p'
k_casinhl.c:(.text+0x35c): undefined reference to `__csqrt'
k_casinhl.c:(.text+0x374): undefined reference to `__clog'
k_casinhl.c:(.text+0x39c): undefined reference to `__ieee754_hypot'
k_casinhl.c:(.text+0x408): undefined reference to `__log1p'
k_casinhl.c:(.text+0x494): undefined reference to `__log1p'
k_casinhl.c:(.text+0x564): undefined reference to `__log1p'
k_casinhl.c:(.text+0x5f4): undefined reference to `__log1p'
k_casinhl.c:(.text+0x65c): undefined reference to `__ieee754_hypot'
k_casinhl.c:(.text+0x670): undefined reference to `__log1p'
/home/kallisti5/Code/haiku/generated.beagle/objects/haiku/arm/release/system/libroot/posix/glibc/math/posix_gnu_math.o: In function `__kernel_casinhf':
k_casinhl.c:(.text+0x714): undefined reference to `__clogf'
k_casinhl.c:(.text+0x728): undefined reference to `__copysignf'
k_casinhl.c:(.text+0x740): undefined reference to `__copysignf'
k_casinhl.c:(.text+0x768): undefined reference to `__copysignf'
k_casinhl.c:(.text+0x808): undefined reference to `__log1pf'
k_casinhl.c:(.text+0x820): undefined reference to `__copysignf'
k_casinhl.c:(.text+0x878): undefined reference to `__log1pf'
k_casinhl.c:(.text+0x89c): undefined reference to `__copysignf'
k_casinhl.c:(.text+0x8bc): undefined reference to `__copysignf'
k_casinhl.c:(.text+0x8fc): undefined reference to `__ieee754_logf'
k_casinhl.c:(.text+0x924): undefined reference to `__copysignf'
k_casinhl.c:(.text+0x968): undefined reference to `__csqrtf'
k_casinhl.c:(.text+0x980): undefined reference to `__clogf'
k_casinhl.c:(.text+0x994): undefined reference to `__copysignf'
k_casinhl.c:(.text+0x9a8): undefined reference to `__ieee754_hypotf'
k_casinhl.c:(.text+0x9b4): undefined reference to `__ieee754_logf'
k_casinhl.c:(.text+0xa14): undefined reference to `__log1pf'
k_casinhl.c:(.text+0xab4): undefined reference to `__log1pf'
k_casinhl.c:(.text+0xb4c): undefined reference to `__log1pf'
k_casinhl.c:(.text+0xbd0): undefined reference to `__log1pf'
k_casinhl.c:(.text+0xbe8): undefined reference to `__copysignf'
k_casinhl.c:(.text+0xc44): undefined reference to `__ieee754_hypotf'
k_casinhl.c:(.text+0xc58): undefined reference to `__log1pf'
/home/kallisti5/Code/haiku/generated.beagle/objects/haiku/arm/release/system/libroot/posix/glibc/math/posix_gnu_math.o: In function `__kernel_casinhl':
k_casinhl.c:(.text+0xd04): undefined reference to `__clogl'
k_casinhl.c:(.text+0xd18): undefined reference to `__copysignl'
k_casinhl.c:(.text+0xd30): undefined reference to `__copysignl'
k_casinhl.c:(.text+0xdd0): undefined reference to `__ieee754_sqrtl'
k_casinhl.c:(.text+0xde4): undefined reference to `__log1pl'
k_casinhl.c:(.text+0xdfc): undefined reference to `__ieee754_atan2l'
k_casinhl.c:(.text+0xe0c): undefined reference to `__copysignl'
k_casinhl.c:(.text+0xe50): undefined reference to `__ieee754_sqrtl'
k_casinhl.c:(.text+0xe5c): undefined reference to `__log1pl'
k_casinhl.c:(.text+0xe70): undefined reference to `__ieee754_sqrtl'
k_casinhl.c:(.text+0xe80): undefined reference to `__copysignl'
k_casinhl.c:(.text+0xe8c): undefined reference to `__ieee754_atan2l'
k_casinhl.c:(.text+0xe9c): undefined reference to `__copysignl'
k_casinhl.c:(.text+0xeb8): undefined reference to `__copysignl'
k_casinhl.c:(.text+0xee4): undefined reference to `__ieee754_sqrtl'
k_casinhl.c:(.text+0xef0): undefined reference to `__ieee754_logl'
k_casinhl.c:(.text+0xf3c): undefined reference to `__csqrtl'
k_casinhl.c:(.text+0xf54): undefined reference to `__clogl'
k_casinhl.c:(.text+0xf68): undefined reference to `__ieee754_hypotl'
k_casinhl.c:(.text+0xf74): undefined reference to `__ieee754_logl'
k_casinhl.c:(.text+0xf8c): undefined reference to `__ieee754_atan2l'
k_casinhl.c:(.text+0xfc4): undefined reference to `__ieee754_sqrtl'
k_casinhl.c:(.text+0xfd4): undefined reference to `__log1pl'
k_casinhl.c:(.text+0xfec): undefined reference to `__ieee754_atan2l'
k_casinhl.c:(.text+0x101c): undefined reference to `__copysignl'
k_casinhl.c:(.text+0x1034): undefined reference to `__ieee754_sqrtl'
k_casinhl.c:(.text+0x1048): undefined reference to `__ieee754_sqrtl'
k_casinhl.c:(.text+0x1058): undefined reference to `__ieee754_sqrtl'
k_casinhl.c:(.text+0x1074): undefined reference to `__log1pl'
k_casinhl.c:(.text+0x10d0): undefined reference to `__ieee754_atan2l'
k_casinhl.c:(.text+0x1108): undefined reference to `__ieee754_sqrtl'
k_casinhl.c:(.text+0x111c): undefined reference to `__ieee754_sqrtl'
k_casinhl.c:(.text+0x1144): undefined reference to `__log1pl'
k_casinhl.c:(.text+0x1194): undefined reference to `__ieee754_sqrtl'
k_casinhl.c:(.text+0x11ac): undefined reference to `__ieee754_sqrtl'
k_casinhl.c:(.text+0x11d4): undefined reference to `__log1pl'
k_casinhl.c:(.text+0x11ec): undefined reference to `__copysignl'
k_casinhl.c:(.text+0x11fc): undefined reference to `__ieee754_atan2l'
k_casinhl.c:(.text+0x1210): undefined reference to `__ieee754_atan2l'
k_casinhl.c:(.text+0x121c): undefined reference to `__ieee754_sqrtl'
k_casinhl.c:(.text+0x1228): undefined reference to `__ieee754_atan2l'
k_casinhl.c:(.text+0x123c): undefined reference to `__ieee754_hypotl'
k_casinhl.c:(.text+0x1250): undefined reference to `__log1pl'
k_casinhl.c:(.text+0x1268): undefined reference to `__ieee754_atan2l'
k_casinhl.c:(.text+0x1280): undefined reference to `__ieee754_atan2l'
k_casinhl.c:(.text+0x1294): undefined reference to `__ieee754_atan2l'
collect2: error: ld returned 1 exit status
$ grep -R __log1pl  | grep ENTRY
system/libroot/posix/glibc/arch/x86_64/s_log1pl.S:ENTRY(__log1pl)
system/libroot/posix/glibc/arch/x86/s_log1pl.S:ENTRY(__log1pl)

Change History (5)

comment:1 Changed 4 years ago by pulkomandy

Note: this happens when trying to build the userland, for example jam -q @minimum-raw. The kernel builds fine.

The compiler is apparently supposed to provide builtins for most of these: http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0491h/BABICCBA.html . Why are these not found?

comment:2 Changed 4 years ago by kallisti5

Because all the calls I see aren't prefixed with builtin?

comment:3 Changed 4 years ago by pulkomandy

gcc is able to automatically replace calls to the standard functions (log1p, etc) with the builtins. But the symbols here are prefixed with two underscores, probably preventing this. So yes, we need to manually alias the glibc names to the gcc builtins.

comment:4 Changed 4 years ago by kallisti5

eh. for now i'm throwing in the generics on arm to fill these holes. I'm for the "using musl for gcc4 someday" camp... using generics will get arm linking for now with minimum changes.

comment:5 Changed 2 years ago by axeld

Owner: changed from axeld to nobody
Status: newassigned
Note: See TracTickets for help on using tickets.