about summary refs log tree commit diff
path: root/pkgs/development/compilers/xa/xa.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/compilers/xa/xa.nix')
-rw-r--r--pkgs/development/compilers/xa/xa.nix9
1 files changed, 4 insertions, 5 deletions
diff --git a/pkgs/development/compilers/xa/xa.nix b/pkgs/development/compilers/xa/xa.nix
index 163b0bba513ba..c445940f5cde1 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"}" ];