diff --git a/pkgs/development/compilers/xa/dxa.nix b/pkgs/development/compilers/xa/dxa.nix index e0ff060de8d..03f2d054cc8 100644 --- a/pkgs/development/compilers/xa/dxa.nix +++ b/pkgs/development/compilers/xa/dxa.nix @@ -18,9 +18,8 @@ stdenv.mkDerivation rec { dontConfigure = true; postPatch = '' - substituteInPlace \ - --replace "CC = gcc" "CC = cc' \ - Makefile + substituteInPlace Makefile \ + --replace "CC = gcc" "CC = ${stdenv.cc.targetPrefix}cc" ''; installPhase = '' diff --git a/pkgs/development/compilers/xa/xa.nix b/pkgs/development/compilers/xa/xa.nix index 163b0bba513..c445940f5cd 100644 --- a/pkgs/development/compilers/xa/xa.nix +++ b/pkgs/development/compilers/xa/xa.nix @@ -15,13 +15,12 @@ stdenv.mkDerivation rec { dontConfigure = true; postPatch = '' - substitueInPlace \ + substituteInPlace Makefile \ --replace "DESTDIR" "PREFIX" \ - --replace "CC = gcc" "CC = cc" \ - --replace "LDD = gcc" "LDD = ld" \ + --replace "CC = gcc" "CC = ${stdenv.cc.targetPrefix}cc" \ + --replace "LDD = gcc" "LDD = ${stdenv.cc.targetPrefix}cc" \ --replace "CFLAGS = -O2" "CFLAGS ?=" \ - --replace "LDFLAGS = -lc" "LDFLAGS ?= -lc" \ - Makefile + --replace "LDFLAGS = -lc" "LDFLAGS ?= -lc" ''; makeFlags = [ "PREFIX=${placeholder "out"}" ];