cc-wrapper: Make gccgo look like go (#430137)
This commit is contained in:
@@ -106,7 +106,7 @@ let
|
||||
versionAtLeast
|
||||
;
|
||||
|
||||
inherit (stdenvNoCC) hostPlatform targetPlatform;
|
||||
inherit (stdenvNoCC) buildPlatform hostPlatform targetPlatform;
|
||||
|
||||
includeFortifyHeaders' =
|
||||
if includeFortifyHeaders != null then
|
||||
@@ -445,6 +445,13 @@ stdenvNoCC.mkDerivation {
|
||||
inherit nixSupport;
|
||||
|
||||
inherit defaultHardeningFlags;
|
||||
}
|
||||
// optionalAttrs cc.langGo or false {
|
||||
# So gccgo looks more like go for buildGoModule
|
||||
|
||||
inherit (targetPlatform.go) GOOS GOARCH GOARM;
|
||||
|
||||
CGO_ENABLED = 1;
|
||||
};
|
||||
|
||||
dontBuild = true;
|
||||
@@ -873,6 +880,9 @@ stdenvNoCC.mkDerivation {
|
||||
+ optionalString cc.langFortran or false ''
|
||||
hardening_unsupported_flags+=" format"
|
||||
''
|
||||
+ optionalString cc.langGo or false ''
|
||||
hardening_unsupported_flags+=" format"
|
||||
''
|
||||
+ optionalString targetPlatform.isWasm ''
|
||||
hardening_unsupported_flags+=" stackprotector fortify pie pic"
|
||||
''
|
||||
|
||||
Reference in New Issue
Block a user