Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Conversation

janvorli
Copy link
Member

@janvorli janvorli commented Oct 5, 2020

Port of dotnet/runtime#42756

There was an extra -c in the CMAKE_REQUIRED_FLAGS set for testing
HAVE_UNW_GET_ACCESSORS and HAVE_UNW_GET_SAVE_LOC that was breaking
build of coreclr under homebrew. The option was somehow making
these checks behave on ARM Linux, even though it is not clear to
me why, as it was just causing this option to be passed to the
compiler twice at different positions of the command line of
the cmake tests.
This change fixes it by using check_symbol_exists instead of
check_c_source_compiles, since just removing the duplicite -c
was resulting in the check failing on ARM / ARM64 Linux due
to a missing symbol from libunwind during linking.

Customer impact

We've got this issue reported by a customer who was trying to add brew recipe for packaging
.NET Core 3.1 on OSX.

Regression?

Yes, introduced in 2.1

Testing

I've manually verified that the HAVE_UNW_GET_ACCESSORS and HAVE_UNW_GET_SAVE_LOC (and UNWIND_CONTEXT_IS_UCONTEXT_T that was not broken, but it is in the block of code influenced
by the change) are generated correctly for all the support target platforms / architectures.

Risk

Very low, the change influences only a compile time detection of a presence of two libunwind
functions.

There was an extra -c in the CMAKE_REQUIRED_FLAGS set for testing
HAVE_UNW_GET_ACCESSORS and HAVE_UNW_GET_SAVE_LOC that was breaking
build of coreclr under homebrew. The option was somehow making
these checks behave on ARM Linux, eveb though it is not clear to
me why, as it was just causing this option to be passed to the
compiler twice at different positions of the command line of
the cmake tests.
This change fixes it by using check_symbol_exists instead of
check_c_source_compiles, since just removing the duplicite -c
was resulting in the check failing on ARM / ARM64 Linux due
to a missing symbol from libunwind during linking
@janvorli janvorli added area-Infrastructure-coreclr Servicing-consider Issue for next servicing release review labels Oct 5, 2020
@janvorli janvorli added this to the 3.1 milestone Oct 5, 2020
@janvorli janvorli requested a review from jkotas October 5, 2020 12:36
@janvorli janvorli self-assigned this Oct 5, 2020
@janvorli
Copy link
Member Author

janvorli commented Oct 5, 2020

cc: @dagood, @asbjornu, @omajid

Copy link
Member

@jeffschwMSFT jeffschwMSFT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved. Since this is in infra. we can consider this for tell mode.

@jeffschwMSFT
Copy link
Member

@Anipik can you consider this when we merge changes for the next servicing release? Thanks

@jeffschwMSFT jeffschwMSFT added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Oct 5, 2020
@jeffschwMSFT jeffschwMSFT modified the milestones: 3.1, 3.1.x Oct 5, 2020
@Anipik Anipik merged commit a6c64da into dotnet:release/3.1 Oct 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants