Skip to content
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

add downlevel compiler warning #1137

Merged
merged 4 commits into from
Nov 30, 2021
Merged

add downlevel compiler warning #1137

merged 4 commits into from
Nov 30, 2021

Conversation

baentsch
Copy link
Member

This informs users if the installed compiler will not create optimized ARM code due to a compiler compatibility issue otherwise going unnoticed (as per open-quantum-safe/profiling#68).

  • Does this PR change the input/output behaviour of a cryptographic algorithm (i.e., does it change known answer test values)? (If so, a version bump will be required from x.y.z to x.(y+1).0.)
  • Does this PR change the the list of algorithms available -- either adding, removing, or renaming? (If so, PRs in OQS-OpenSSL, OQS-BoringSSL, and OQS-OpenSSH will also be required by the time this is merged.)

@baentsch baentsch marked this pull request as ready for review November 29, 2021 13:07
@baentsch baentsch requested a review from xvzcf as a code owner November 29, 2021 13:07
@@ -182,6 +182,8 @@ if(CMAKE_SYSTEM_NAME MATCHES "Linux|Darwin")
if((OQS_DIST_ARM64_V8_BUILD OR (OQS_USE_ARM_NEON_INSTRUCTIONS)))
if(((CMAKE_C_COMPILER_ID STREQUAL "GNU") AND (CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL "9.4.0")) OR ((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "9.4.0")) OR ((NOT (CMAKE_C_COMPILER_ID STREQUAL "GNU")) AND (NOT (CMAKE_CXX_COMPILER_ID STREQUAL "GNU"))))
cmake_dependent_option(OQS_ENABLE_KEM_kyber_512_aarch64 "" ON "OQS_ENABLE_KEM_kyber_512" OFF)
else()
message(WARNING " ARM optimizations not active due to backlevel compiler")
Copy link
Member

Choose a reason for hiding this comment

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

"backlevel" is a weird word to me -- not a real English word as far as I know and I'm not really sure what precisely you're trying to say. "out-of-date"? "unsupported"?

Copy link
Member Author

Choose a reason for hiding this comment

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

Strange indeed. I meant to write what I wrote in the commit message: downlevel. Will update.

Copy link
Member Author

Choose a reason for hiding this comment

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

More words: "out-of-date" doesn't "feel" quite right: Older compiler versions can still have value today (as evidenced by some of them still receiving support - also making the word "unsupported" quite unsuitable).

Also, my intention was merely to make people aware that their compiler environment is not fully suitable for a specific feature of liboqs -- without making them change their build environment "just" for this feature.

Hence the word "downlevel". But it seems to be a marketing term (https://en.wiktionary.org/wiki/downlevel), so we could also use something else. Suggestions welcome by any native speaker (without marketing background :-)

Copy link
Member

Choose a reason for hiding this comment

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

How about simply: "ARM optimizations are not fully supported on this compiler version."

Copy link
Member Author

Choose a reason for hiding this comment

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

So done

Copy link
Member

@Martyrshot Martyrshot left a comment

Choose a reason for hiding this comment

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

Should this be added to scripts/copy_from_upstream/.CMake/alg_support.cmake/add_enable_by_alg.fragment? If we run copy_from_upstream.py now it's likely that these changes get overwritten.

@baentsch baentsch requested a review from bhess as a code owner November 29, 2021 16:12
@baentsch baentsch requested a review from Martyrshot November 29, 2021 16:13
Copy link
Member

@Martyrshot Martyrshot left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@dstebila dstebila merged commit 6888e9e into main Nov 30, 2021
@dstebila dstebila deleted the mb-warngcc branch November 30, 2021 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants