Page MenuHomeFreeBSD

Fix linker error in libuutil with recent LLVM
ClosedPublic

Authored by arichardson on Jul 14 2020, 10:29 AM.
Tags
None
Referenced Files
F108260469: D25663.diff
Thu, Jan 23, 4:59 AM
Unknown Object (File)
Dec 11 2024, 9:06 AM
Unknown Object (File)
Nov 26 2024, 9:14 AM
Unknown Object (File)
Nov 26 2024, 9:13 AM
Unknown Object (File)
Nov 26 2024, 9:11 AM
Unknown Object (File)
Nov 26 2024, 8:49 AM
Unknown Object (File)
Nov 26 2024, 8:32 AM
Unknown Object (File)
Oct 31 2024, 11:46 PM
Subscribers

Details

Summary

Not marking the function as static can result in a linker error:
undefined reference to __assfail [--no-allow-shlib-undefined]
I noticed this error after updating our CHERI LLVM to the latest upstream
LLVM HEAD revision.

This change effectively reverts r329984 and marks dmu_buf_init_user as static.

Test Plan

compiles again

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

mav added a subscriber: mav.

dmu_buf_init_user() part is actually done in OpenZFS already.

__assfail() part looks OK to me too.

This revision is now accepted and ready to land.Aug 7 2020, 1:57 PM

r329984 was done for a reason. With your change, can you still build world with GCC6?

r329984 was done for a reason. With your change, can you still build world with GCC6?

This patch adds static to dmu_buf_init_user and should therefore fix the error.

Ok. As long as you've tested it with GCC6, then it's fine by me.

This revision was automatically updated to reflect the committed changes.