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
F80155264: D25663.id74433.diff
Thu, Mar 28, 3:53 PM
Unknown Object (File)
Jan 11 2024, 10:56 PM
Unknown Object (File)
Dec 23 2023, 1:14 AM
Unknown Object (File)
Sep 2 2023, 8:55 PM
Unknown Object (File)
Sep 2 2023, 8:52 PM
Unknown Object (File)
Sep 2 2023, 8:52 PM
Unknown Object (File)
Aug 28 2023, 2:59 AM
Unknown Object (File)
Aug 4 2023, 12:19 AM
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.