Skip to content

Commit

Permalink
treewide: Remove gnat support.
Browse files Browse the repository at this point in the history
See discussion in 6ac7b19.
  • Loading branch information
shlevy committed Mar 8, 2018
1 parent fe56551 commit c69d8bf
Show file tree
Hide file tree
Showing 31 changed files with 13 additions and 2,184 deletions.
5 changes: 0 additions & 5 deletions pkgs/build-support/cc-wrapper/add-flags.sh
Expand Up @@ -9,7 +9,6 @@ var_templates_list=(
NIX+CFLAGS_LINK
NIX+CXXSTDLIB_COMPILE
NIX+CXXSTDLIB_LINK
NIX+GNATFLAGS_COMPILE
)
var_templates_bool=(
NIX+ENFORCE_NO_NATIVE
Expand Down Expand Up @@ -51,10 +50,6 @@ if [ -e @out@/nix-support/cc-cflags ]; then
NIX_@infixSalt@_CFLAGS_COMPILE="$(< @out@/nix-support/cc-cflags) $NIX_@infixSalt@_CFLAGS_COMPILE"
fi

if [ -e @out@/nix-support/gnat-cflags ]; then
NIX_@infixSalt@_GNATFLAGS_COMPILE="$(< @out@/nix-support/gnat-cflags) $NIX_@infixSalt@_GNATFLAGS_COMPILE"
fi

if [ -e @out@/nix-support/cc-ldflags ]; then
NIX_@infixSalt@_LDFLAGS+=" $(< @out@/nix-support/cc-ldflags)"
fi
Expand Down
28 changes: 1 addition & 27 deletions pkgs/build-support/cc-wrapper/default.nix
Expand Up @@ -8,7 +8,7 @@
{ name ? ""
, stdenvNoCC, nativeTools, propagateDoc ? !nativeTools, noLibc ? false, nativeLibc, nativePrefix ? ""
, cc ? null, libc ? null, bintools, coreutils ? null, shell ? stdenvNoCC.shell
, zlib ? null, extraPackages ? [], extraBuildCommands ? ""
, extraPackages ? [], extraBuildCommands ? ""
, isGNU ? false, isClang ? cc.isClang or false, gnugrep ? null
, buildPackages ? {}
}:
Expand All @@ -21,9 +21,6 @@ assert !nativeTools ->
assert !(nativeLibc && noLibc);
assert (noLibc || nativeLibc) == (libc == null);

# For ghdl (the vhdl language provider to gcc) we need zlib in the wrapper.
assert cc.langVhdl or false -> zlib != null;

let
stdenv = stdenvNoCC;
inherit (stdenv) hostPlatform targetPlatform;
Expand Down Expand Up @@ -189,17 +186,6 @@ stdenv.mkDerivation {

+ optionalString cc.langGo or false ''
wrap ${targetPrefix}gccgo ${./cc-wrapper.sh} $ccPath/${targetPrefix}gccgo
''

+ optionalString cc.langAda or false ''
wrap ${targetPrefix}gnatgcc ${./cc-wrapper.sh} $ccPath/${targetPrefix}gnatgcc
wrap ${targetPrefix}gnatmake ${./gnat-wrapper.sh} $ccPath/${targetPrefix}gnatmake
wrap ${targetPrefix}gnatbind ${./gnat-wrapper.sh} $ccPath/${targetPrefix}gnatbind
wrap ${targetPrefix}gnatlink ${./gnatlink-wrapper.sh} $ccPath/${targetPrefix}gnatlink
''

+ optionalString cc.langVhdl or false ''
ln -s $ccPath/${targetPrefix}ghdl $out/bin/${targetPrefix}ghdl
'';

propagatedBuildInputs = [ bintools ];
Expand Down Expand Up @@ -262,18 +248,6 @@ stdenv.mkDerivation {
ccLDFlags+=" -L${cc_solib}/lib"
ccCFlags+=" -B${cc_solib}/lib"
${optionalString cc.langVhdl or false ''
ccLDFlags+=" -L${zlib.out}/lib"
''}
# Find the gcc libraries path (may work only without multilib).
${optionalString cc.langAda or false ''
basePath=`echo ${cc_solib}/lib/*/*/*`
ccCFlags+=" -B$basePath -I$basePath/adainclude"
gnatCFlags="-aI$basePath/adainclude -aO$basePath/adalib"
echo "$gnatCFlags" > $out/nix-support/gnat-cflags
''}
echo "$ccLDFlags" > $out/nix-support/cc-ldflags
echo "$ccCFlags" > $out/nix-support/cc-cflags
''
Expand Down
122 changes: 0 additions & 122 deletions pkgs/build-support/cc-wrapper/gnat-wrapper.sh

This file was deleted.

40 changes: 0 additions & 40 deletions pkgs/build-support/cc-wrapper/gnatlink-wrapper.sh

This file was deleted.

28 changes: 0 additions & 28 deletions pkgs/build-support/gcc-wrapper-old/add-flags

This file was deleted.

0 comments on commit c69d8bf

Please sign in to comment.