From 0afb45d5747d812d434e687ce8bfc78e40a54060 Mon Sep 17 00:00:00 2001 From: Will Fancher Date: Mon, 7 May 2018 23:52:05 -0400 Subject: [PATCH] Set the C standard when building GHC Should this be in cc-wrapper? --- pkgs/development/compilers/ghc/8.4.2.nix | 2 ++ pkgs/development/compilers/ghc/head.nix | 2 ++ 2 files changed, 4 insertions(+) diff --git a/pkgs/development/compilers/ghc/8.4.2.nix b/pkgs/development/compilers/ghc/8.4.2.nix index cf4e5772719..bbe82354c8c 100644 --- a/pkgs/development/compilers/ghc/8.4.2.nix +++ b/pkgs/development/compilers/ghc/8.4.2.nix @@ -50,6 +50,8 @@ let '' + stdenv.lib.optionalString enableRelocatedStaticLibs '' GhcLibHcOpts += -fPIC GhcRtsHcOpts += -fPIC + '' + stdenv.lib.optionalString targetPlatform.useAndroidPrebuilt '' + EXTRA_CC_OPTS += -std=gnu99 ''; # Splicer will pull out correct variations diff --git a/pkgs/development/compilers/ghc/head.nix b/pkgs/development/compilers/ghc/head.nix index 51497e0d9ce..f0e21b0cf5b 100644 --- a/pkgs/development/compilers/ghc/head.nix +++ b/pkgs/development/compilers/ghc/head.nix @@ -50,6 +50,8 @@ let '' + stdenv.lib.optionalString enableRelocatedStaticLibs '' GhcLibHcOpts += -fPIC GhcRtsHcOpts += -fPIC + '' + stdenv.lib.optionalString targetPlatform.useAndroidPrebuilt '' + EXTRA_CC_OPTS += -std=gnu99 ''; # Splicer will pull out correct variations