wrapCCWith: disable pic when building for Windows
According to <https://gcc.gnu.org/legacy-ml/gcc-patches/2015-08/msg00836.html>, all code is position-independent on Windows. Some compilers apparently warn for -fPIC on Windows, and clang errors: > clang-15: error: unsupported option '-fPIC' for target 'x86_64-pc-windows-msvc' I'm guessing the check was hostPlatform instead of targetPlatform by mistake.
This commit is contained in:
parent
2839c94f1e
commit
bfc7aaa8af
1 changed files with 1 additions and 1 deletions
|
@ -518,7 +518,7 @@ stdenv.mkDerivation {
|
|||
''
|
||||
|
||||
# TODO: categorize these and figure out a better place for them
|
||||
+ optionalString hostPlatform.isCygwin ''
|
||||
+ optionalString targetPlatform.isWindows ''
|
||||
hardening_unsupported_flags+=" pic"
|
||||
'' + optionalString targetPlatform.isMinGW ''
|
||||
hardening_unsupported_flags+=" stackprotector fortify"
|
||||
|
|
Loading…
Reference in a new issue