Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cc-wrapper: set FC when langFortran is on
We need to set FC so that CMake and other tools can find the fortran compiler. Also we need to limit the hardening flags since fortify and format don’t work with fortran. Fixes #88449
- Loading branch information
1 parent
4855aa6
commit f42aa7e
Showing
2 changed files
with
14 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
getTargetRole | ||
getTargetRoleWrapper | ||
|
||
export FC${role_post}=@named_fc@ | ||
|
||
# If unset, assume the default hardening flags. | ||
# These are different for fortran. | ||
: ${NIX_HARDENING_ENABLE="stackprotector pic strictoverflow relro bindnow"} | ||
export NIX_HARDENING_ENABLE | ||
|
||
unset -v role_post |