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

cc-wrapper: Fortran: disable format hardening #174709

Merged

Conversation

FliegendeWurst
Copy link
Member

Description of changes

Disable format hardening when compiling Fortran code.

Otherwise, these warnings are emitted:
command-line option '-Wformat=1' is valid for C/C++/ObjC/ObjC++ but not for Fortran
command-line option '-Wformat-security' is valid for C/C++/ObjC/ObjC++ but not for Fortran
'-Werror=' argument '-Werror=format-security' is not valid for Fortran

Fixes #27218

Things done

(done with this commit applied on master)

  • Built getdp (which previously failed) on platform(s)
    • x86_64-linux
  • Fits CONTRIBUTING.md.

Not sure what else to do. This change shouldn't cause any regressions (cc.langFortran is only true for gfortran)..

Otherwise, these warnings are emitted:
command-line option '-Wformat=1' is valid for C/C++/ObjC/ObjC++ but not for Fortran
command-line option '-Wformat-security' is valid for C/C++/ObjC/ObjC++ but not for Fortran
'-Werror=' argument '-Werror=format-security' is not valid for Fortran

Fixes part of NixOS#27218
Copy link
Contributor

@AtilaSaraiva AtilaSaraiva left a comment

Choose a reason for hiding this comment

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

This is a problem that has been bugging me for some time, thank you for fixing it!

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-already-reviewed/2617/519

@AndersonTorres AndersonTorres merged commit 78028df into NixOS:staging Jun 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants