Skip to content

[release/5.0] Fix bad configure tests #43031

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

Merged
merged 1 commit into from
Oct 8, 2020

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Oct 5, 2020

Backport of #42756 to release/5.0

/cc @dagood @janvorli

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.

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 self-assigned this Oct 5, 2020
@janvorli janvorli requested a review from jkotas October 5, 2020 15:23
@janvorli janvorli added the Servicing-consider Issue for next servicing release review label Oct 5, 2020
@janvorli janvorli added this to the 5.0.0 milestone Oct 5, 2020
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. We can consider this as tell mode. Please get a cr and we can send notification and merge.

@jeffschwMSFT jeffschwMSFT removed the Servicing-consider Issue for next servicing release review label Oct 5, 2020
@janvorli
Copy link
Member

janvorli commented Oct 8, 2020

The libraries test failure is unrelated, I have created an issue #43166 to track it.

@janvorli janvorli merged commit 62eb1b2 into release/5.0 Oct 8, 2020
@janvorli janvorli deleted the backport/pr-42756-to-release/5.0 branch October 8, 2020 10:27
@ghost ghost locked as resolved and limited conversation to collaborators Dec 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants