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 compatibility with GCC <= 11.2 & Clang 10 #4

Closed
wants to merge 2 commits into from

Conversation

andreittr
Copy link
Contributor

This changeset adds compiler version checks around problematic code not understood by older versions of compilers, enabling support for:

  • GCC 11.x older than 11.3 (i.e. 11.1.x, 11.2.x)
  • Clang 10.x

GCC versions prior to 11.3 do not support the "mwait" target attribute.
This change adds compiler version checks to the pragmas using this
attribute, enabling builds with GCC 11.1 & 11.2.

Signed-off-by: Andrei Tatar <andrei@unikraft.io>
Clang versions below 11 do not support the AMX, serialize, and tsxldtrk
intrinsics. This change adds a version check when including the
offending headers.

Signed-off-by: Andrei Tatar <andrei@unikraft.io>
Copy link
Member

@StefanJum StefanJum left a comment

Choose a reason for hiding this comment

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

All good, thanks.
Reviewed-by: Stefan Jumarea stefanjumarea02@gmail.com

Copy link

@mariasfiraiala mariasfiraiala 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, thanks!

Reviewed-by: Maria Sfiraiala maria.sfiraiala@gmail.com

Copy link

@RaduNichita RaduNichita left a comment

Choose a reason for hiding this comment

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

All good, thanks @andreittr for this change! 💯

Reviewed-by: Radu Nichita radunichita99@gmail.com

@razvand razvand added the enhancement New feature or request label Aug 15, 2023
Copy link

@razvand razvand left a comment

Choose a reason for hiding this comment

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

Approved-by: Razvan Deaconescu razvand@unikraft.io

unikraft-bot pushed a commit that referenced this pull request Aug 15, 2023
Clang versions below 11 do not support the AMX, serialize, and tsxldtrk
intrinsics. This change adds a version check when including the
offending headers.

Signed-off-by: Andrei Tatar <andrei@unikraft.io>
Reviewed-by: Stefan Jumarea <stefanjumarea02@gmail.com>
Reviewed-by: Maria Sfiraiala <maria.sfiraiala@gmail.com>
Reviewed-by: Radu Nichita <radunichita99@gmail.com>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
Tested-by: Unikraft CI <monkey@unikraft.io>
GitHub-Closes: #4
@andreittr andreittr deleted the ttr/compat-misc branch August 15, 2023 21:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci/merged enhancement New feature or request
Projects
Status: Done!
Development

Successfully merging this pull request may close these issues.

None yet

6 participants