From 391c3e505e08d4b12f0f06ca2d59c5552d37a373 Mon Sep 17 00:00:00 2001 From: Nikolay Amiantov Date: Tue, 12 Apr 2016 19:15:14 +0300 Subject: [PATCH 1/2] wrapCCMulti: split from gcc_multi --- pkgs/top-level/all-packages.nix | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 188788955ffe..02df6bd55323 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4044,18 +4044,20 @@ in gcc = gcc5; - gcc_multi = + wrapCCMulti = cc: if system == "x86_64-linux" then lowPrio ( let extraBuildCommands = '' echo "dontMoveLib64=1" >> $out/nix-support/setup-hook ''; - in wrapCCWith (callPackage ../build-support/cc-wrapper) glibc_multi extraBuildCommands (gcc.cc.override { - stdenv = overrideCC stdenv (wrapCCWith (callPackage ../build-support/cc-wrapper) glibc_multi "" gcc.cc); + in wrapCCWith (callPackage ../build-support/cc-wrapper) glibc_multi extraBuildCommands (cc.cc.override { + stdenv = overrideCC stdenv (wrapCCWith (callPackage ../build-support/cc-wrapper) glibc_multi "" cc.cc); profiledCompiler = false; enableMultilib = true; })) - else throw "Multilib gcc not supported on ‘${system}’"; + else throw "Multilib ${cc.name} not supported on ‘${system}’"; + + gcc_multi = wrapCCMulti gcc; gcc_debug = lowPrio (wrapCC (gcc.cc.override { stripped = false; From 24835df32201c22a4d9d8e18042260aefeb78002 Mon Sep 17 00:00:00 2001 From: Nikolay Amiantov Date: Tue, 12 Apr 2016 19:15:45 +0300 Subject: [PATCH 2/2] wine: use gcc49 for 64-bit builds --- pkgs/misc/emulators/wine/packages.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkgs/misc/emulators/wine/packages.nix b/pkgs/misc/emulators/wine/packages.nix index 45c48182f284..206deb01b8bb 100644 --- a/pkgs/misc/emulators/wine/packages.nix +++ b/pkgs/misc/emulators/wine/packages.nix @@ -1,4 +1,5 @@ { system, stdenv, stdenv_32bit, lib, pkgs, pkgsi686Linux, callPackage, callPackage_i686, + overrideCC, wrapCCMulti, gcc49, pulseaudioSupport, wineRelease ? "stable" }: @@ -16,6 +17,9 @@ in with src; { wine64 = callPackage ./base.nix { name = "wine64-${version}"; inherit src version pulseaudioSupport; + # FIXME: drop this when GCC is updated to >5.3. + # Corresponding bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69140 + stdenv = overrideCC stdenv gcc49; pkgArches = [ pkgs ]; geckos = [ gecko64 ]; monos = [ mono ]; @@ -25,7 +29,8 @@ in with src; { wineWow = callPackage ./base.nix { name = "wine-wow-${version}"; inherit src version pulseaudioSupport; - stdenv = stdenv_32bit; + # FIXME: see above. + stdenv = overrideCC stdenv_32bit (wrapCCMulti gcc49); pkgArches = [ pkgs pkgsi686Linux ]; geckos = [ gecko32 gecko64 ]; monos = [ mono ];