diff options
author | Ludovic Courtès <ludo@gnu.org> | 2008-10-31 18:39:49 +0000 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2008-10-31 18:39:49 +0000 |
commit | 0336a2f3bba6aa07c4ae1cad0f21a36ec18b6ac3 (patch) | |
tree | 08d167b88539ef7a7690857d9e15b9895fc74ebd /pkgs/development/compilers/tinycc | |
parent | 24a5a221ae3c95afc48a1ff70f922a46dffd4a0c (diff) |
TinyCC: Fix crt and loader paths.
svn path=/nixpkgs/trunk/; revision=13170
Diffstat (limited to 'pkgs/development/compilers/tinycc')
-rw-r--r-- | pkgs/development/compilers/tinycc/default.nix | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/pkgs/development/compilers/tinycc/default.nix b/pkgs/development/compilers/tinycc/default.nix index e4e50f7dbfeb3..5c55afd63fb11 100644 --- a/pkgs/development/compilers/tinycc/default.nix +++ b/pkgs/development/compilers/tinycc/default.nix @@ -14,6 +14,15 @@ let version = "0.9.24"; in patchPhase = '' substituteInPlace "texi2pod.pl" \ --replace "/usr/bin/perl" "${perl}/bin/perl" + + # To produce executables, `tcc' needs to know where `crt*.o' are. + sed -i "tcc.c" \ + -e's|define CONFIG_TCC_CRT_PREFIX.*$|define CONFIG_TCC_CRT_PREFIX "${stdenv.glibc}/lib"|g ; + s|tcc_add_library_path(s, "/usr/lib");|tcc_add_library_path(s, "${stdenv.glibc}/lib");|g' + + # Tell it about the loader's location. + sed -i "tccelf.c" \ + -e's|".*/ld-linux\([^"]\+\)"|"${stdenv.glibc}/lib/ld-linux\1"|g' ''; postInstall = '' |