-
Notifications
You must be signed in to change notification settings - Fork 5k
Fix for "ld.lld: error: undefined symbol: _Uaarch64_setcontext" when doing build for FreeBSD-arm64 using internal libunwind #110432
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…doing build for arm64 using internal libunwind
src/native/external/libunwind.cmake
Outdated
@@ -96,7 +96,7 @@ elseif(CLR_CMAKE_TARGET_FREEBSD) | |||
set(libunwind_la_SOURCES_arm_os arm/Gos-freebsd.c) | |||
set(libunwind_la_SOURCES_arm_os_local arm/Los-freebsd.c) | |||
set(libunwind_la_SOURCES_aarch64_os aarch64/Gos-freebsd.c) | |||
set(libunwind_la_SOURCES_aarch64_os_local aarch64/Los-freebsd.c) | |||
set(libunwind_la_SOURCES_aarch64_os_local aarch64/Los-freebsd.c aarch64/setcontext.S) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need both (only setcontext.S was missing)
set(libunwind_la_SOURCES_aarch64_os_local aarch64/Los-freebsd.c aarch64/setcontext.S) | |
set(libunwind_la_SOURCES_aarch64_os_local aarch64/Los-freebsd.c) | |
set(libunwind_aarch64_la_SOURCES_os aarch64/setcontext.S) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't what my change set(libunwind_la_SOURCES_aarch64_os_local aarch64/Los-freebsd.c aarch64/setcontext.S)
is doing? Am I wrong, that second set
will overwrite the previous one? So it's just ok to add aarch64/setcontext.S
to the existing line with set?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, corrected the patch. Lets put them on separate lines for consistency.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New lines added.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I meant keep the existing style used in this file (one line added, zero removed).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry I'm lost - there are few ways of doing set in this file. It's not possible to only add one line in here, as there's matching bracket on the line end when calling set, and this needs to go into the same variable which is included later?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The naming convention here is taken from libunwind, how they classify these files. Source are arch specific, others are OS specific and then few are machine independent (mi
). Using the existing convention, that will become main...am11:runtime:patch-24.
Two lines because this is the first assembly file in aarch64 group. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, wasn't feeling good last days, now should be ok..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you!
Can we get this in? |
I am sorry, I didn't know this was not merged in. |
Enable runtime build under FreeBSD-arm64 when using internal libunwind (atm. port version have bug that crash sdk randomly). Setting
CLR_CMAKE_USE_SYSTEM_LIBUNWIND 0
produce working SDK. cc @am11 for the tip.