From 9a5345698dc85bb4076116e0e9fea29898cc8946 Mon Sep 17 00:00:00 2001 From: Alexander Sosedkin Date: Sun, 17 Oct 2021 16:13:45 +0200 Subject: [PATCH 1/2] tinycc: fix pkgsStatic.tinycc (musl) --- pkgs/development/compilers/tinycc/default.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/development/compilers/tinycc/default.nix b/pkgs/development/compilers/tinycc/default.nix index bb08b113ad50..90cd702de92a 100644 --- a/pkgs/development/compilers/tinycc/default.nix +++ b/pkgs/development/compilers/tinycc/default.nix @@ -19,12 +19,15 @@ stdenv.mkDerivation rec { ''; configureFlags = [ - "--cc=cc" + "--cc=${stdenv.cc.targetPrefix}cc" + "--ar=${stdenv.cc.targetPrefix}ar" "--crtprefix=${lib.getLib stdenv.cc.libc}/lib" "--sysincludepaths=${lib.getDev stdenv.cc.libc}/include:{B}/include" "--libpaths=${lib.getLib stdenv.cc.libc}/lib" # build cross compilers "--enable-cross" + ] ++ lib.optionals stdenv.hostPlatform.isMusl [ + "--config-musl" ]; preConfigure = '' From 8eeae5320e741d55ec1b891853fa48419e3a5a26 Mon Sep 17 00:00:00 2001 From: Alexander Sosedkin Date: Sun, 17 Oct 2021 19:30:47 +0200 Subject: [PATCH 2/2] tinycc: simplify specifying cc/ar Co-authored-by: Artturi --- pkgs/development/compilers/tinycc/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/compilers/tinycc/default.nix b/pkgs/development/compilers/tinycc/default.nix index 90cd702de92a..b46dee899a33 100644 --- a/pkgs/development/compilers/tinycc/default.nix +++ b/pkgs/development/compilers/tinycc/default.nix @@ -19,8 +19,8 @@ stdenv.mkDerivation rec { ''; configureFlags = [ - "--cc=${stdenv.cc.targetPrefix}cc" - "--ar=${stdenv.cc.targetPrefix}ar" + "--cc=$CC" + "--ar=$AR" "--crtprefix=${lib.getLib stdenv.cc.libc}/lib" "--sysincludepaths=${lib.getDev stdenv.cc.libc}/include:{B}/include" "--libpaths=${lib.getLib stdenv.cc.libc}/lib"