diff options
author | Lluís Batlle i Rossell <viric@vicerveza.homeunix.net> | 2010-01-16 21:41:27 +0000 |
---|---|---|
committer | Lluís Batlle i Rossell <viric@vicerveza.homeunix.net> | 2010-01-16 21:41:27 +0000 |
commit | 08eb3243c90af2102ce087b02c9cacc2f3234026 (patch) | |
tree | fdaba49c52694582ecbd752ebde7e20893b62bdc /pkgs/build-support/gcc-wrapper | |
parent | e72908036f98bfae531affc34cc39397b554390d (diff) |
Merging the ghdl-wrapper and gcc-wrapper into one.
I will remove the ghdl-wrapper files later, if all this works. svn path=/nixpkgs/branches/stdenv-updates/; revision=19493
Diffstat (limited to 'pkgs/build-support/gcc-wrapper')
-rw-r--r-- | pkgs/build-support/gcc-wrapper/builder.sh | 8 | ||||
-rw-r--r-- | pkgs/build-support/gcc-wrapper/default.nix | 8 |
2 files changed, 15 insertions, 1 deletions
diff --git a/pkgs/build-support/gcc-wrapper/builder.sh b/pkgs/build-support/gcc-wrapper/builder.sh index 70e8498da7bba..2e87d82f52cd1 100644 --- a/pkgs/build-support/gcc-wrapper/builder.sh +++ b/pkgs/build-support/gcc-wrapper/builder.sh @@ -42,6 +42,9 @@ else gccLDFlags="$gccLDFlags -L$gcc/lib64" fi gccLDFlags="$gccLDFlags -L$gcc/lib" + if [ -n "$langVhdl" ]; then + gccLDFlags="$gccLDFlags -L$zlib/lib" + fi echo "$gccLDFlags" > $out/nix-support/gcc-ldflags # GCC shows $gcc/lib in `gcc -print-search-dirs', but not @@ -154,6 +157,11 @@ mkGnatWrapper $out/bin/gnatmake $gccPath/gnatmake || true mkGnatWrapper $out/bin/gnatbind $gccPath/gnatbind || true mkGnatLinkWrapper $out/bin/gnatlink $gccPath/gnatlink || true +if [ -f $gccPath/ghdl ]; then + ln -sf $gccPath/ghdl $out/bin/ghdl +fi + + # Create a symlink to as (the assembler). This is useful when a # gcc-wrapper is installed in a user environment, as it ensures that # the right assembler is called. diff --git a/pkgs/build-support/gcc-wrapper/default.nix b/pkgs/build-support/gcc-wrapper/default.nix index 700de9d20f49b..87b2b097659a9 100644 --- a/pkgs/build-support/gcc-wrapper/default.nix +++ b/pkgs/build-support/gcc-wrapper/default.nix @@ -6,13 +6,17 @@ # variables so that the compiler and the linker just "work". { name ? "", stdenv, nativeTools, nativeLibc, nativePrefix ? "" -, gcc ? null, libc ? null, binutils ? null, coreutils ? null, shell ? "" +, gcc ? null, libc ? null, binutils ? null, coreutils ? null, shell ? "", +zlib ? null }: assert nativeTools -> nativePrefix != ""; assert !nativeTools -> gcc != null && binutils != null && coreutils != null; assert !nativeLibc -> libc != null; +# For ghdl (the vhdl language provider to gcc) we need zlib in the wrapper +assert (gcc != null && gcc ? langVhdl) -> zlib != null; + let gccVersion = (builtins.parseDrvName gcc.name).version; @@ -44,6 +48,8 @@ stdenv.mkDerivation { langCC = if nativeTools then true else gcc.langCC; langFortran = if nativeTools then false else gcc ? langFortran; langAda = if nativeTools then false else gcc ? langAda; + langVhdl = if nativeTools then false else gcc ? langVhdl; + zlib = if (gcc != null && gcc ? langVhdl) then zlib else null; shell = if shell == "" then stdenv.shell else shell; meta = |