Updating the ghdl related expressions:
- Adding ghdl with gcc 4.4 (with a patch I built for it to work) - Adding me as maintainer to both gccs and ghdl svn path=/nixpkgs/branches/stdenv-updates/; revision=19475
This commit is contained in:
parent
aaa4eafcbf
commit
61be82ffd0
@ -91,7 +91,7 @@ stdenv.mkDerivation ({
|
|||||||
++ (optional (zlib != null) zlib)
|
++ (optional (zlib != null) zlib)
|
||||||
++ (optional (boehmgc != null) boehmgc)
|
++ (optional (boehmgc != null) boehmgc)
|
||||||
++ (optionals (cross != null) [binutilsCross])
|
++ (optionals (cross != null) [binutilsCross])
|
||||||
++ (optionals (langVhdl != null) [gnat])
|
++ (optionals langVhdl [gnat])
|
||||||
;
|
;
|
||||||
|
|
||||||
configureFlags = "
|
configureFlags = "
|
||||||
@ -130,6 +130,8 @@ stdenv.mkDerivation ({
|
|||||||
homepage = "http://gcc.gnu.org/";
|
homepage = "http://gcc.gnu.org/";
|
||||||
license = "GPL/LGPL";
|
license = "GPL/LGPL";
|
||||||
description = "GNU Compiler Collection, 4.3.x";
|
description = "GNU Compiler Collection, 4.3.x";
|
||||||
|
maintainers = with stdenv.lib.maintainers; [viric ludo];
|
||||||
|
platforms = with stdenv.lib.platforms; linux;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // (if langJava then {
|
} // (if langJava then {
|
||||||
@ -168,6 +170,8 @@ stdenv.mkDerivation ({
|
|||||||
homepage = "http://ghdl.free.fr/";
|
homepage = "http://ghdl.free.fr/";
|
||||||
license = "GPLv2+";
|
license = "GPLv2+";
|
||||||
description = "Complete VHDL simulator, using the GCC technology";
|
description = "Complete VHDL simulator, using the GCC technology";
|
||||||
|
maintainers = with stdenv.lib.maintainers; [viric];
|
||||||
|
platforms = with stdenv.lib.platforms; linux;
|
||||||
};
|
};
|
||||||
|
|
||||||
} else {}))
|
} else {}))
|
||||||
|
@ -155,6 +155,8 @@ postInstall() {
|
|||||||
ln -sfn g++ $i
|
ln -sfn g++ $i
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
eval "$postInstallGhdl"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
, langC ? true, langCC ? true, langFortran ? false, langTreelang ? false
|
, langC ? true, langCC ? true, langFortran ? false, langTreelang ? false
|
||||||
, langJava ? false
|
, langJava ? false
|
||||||
, langAda ? false
|
, langAda ? false
|
||||||
|
, langVhdl ? false
|
||||||
, profiledCompiler ? false
|
, profiledCompiler ? false
|
||||||
, staticCompiler ? false
|
, staticCompiler ? false
|
||||||
, enableShared ? true
|
, enableShared ? true
|
||||||
@ -21,12 +22,14 @@
|
|||||||
, binutilsCross ? null
|
, binutilsCross ? null
|
||||||
, libcCross ? null
|
, libcCross ? null
|
||||||
, crossStageStatic ? true
|
, crossStageStatic ? true
|
||||||
|
, gnat ? null
|
||||||
}:
|
}:
|
||||||
|
|
||||||
assert langTreelang -> bison != null && flex != null;
|
assert langTreelang -> bison != null && flex != null;
|
||||||
assert langJava -> zip != null && unzip != null
|
assert langJava -> zip != null && unzip != null
|
||||||
&& zlib != null && boehmgc != null;
|
&& zlib != null && boehmgc != null;
|
||||||
assert langAda -> gnatboot != null;
|
assert langAda -> gnatboot != null;
|
||||||
|
assert langVhdl -> gnat != null;
|
||||||
|
|
||||||
with stdenv.lib;
|
with stdenv.lib;
|
||||||
|
|
||||||
@ -103,7 +106,8 @@ stdenv.mkDerivation ({
|
|||||||
++ optional noSysDirs ./no-sys-dirs.patch
|
++ optional noSysDirs ./no-sys-dirs.patch
|
||||||
# The GNAT Makefiles did not pay attention to CFLAGS_FOR_TARGET for its
|
# The GNAT Makefiles did not pay attention to CFLAGS_FOR_TARGET for its
|
||||||
# target libraries and tools.
|
# target libraries and tools.
|
||||||
++ optional langAda ./gnat-cflags.patch;
|
++ optional langAda ./gnat-cflags.patch
|
||||||
|
++ optional langVhdl ./ghdl-ortho-cflags.patch;
|
||||||
|
|
||||||
inherit noSysDirs profiledCompiler staticCompiler langJava crossStageStatic
|
inherit noSysDirs profiledCompiler staticCompiler langJava crossStageStatic
|
||||||
libcCross;
|
libcCross;
|
||||||
@ -118,6 +122,7 @@ stdenv.mkDerivation ({
|
|||||||
++ (optionals javaAwtGtk [gtk pkgconfig libart_lgpl] ++ xlibs)
|
++ (optionals javaAwtGtk [gtk pkgconfig libart_lgpl] ++ xlibs)
|
||||||
++ (optionals (cross != null) [binutilsCross])
|
++ (optionals (cross != null) [binutilsCross])
|
||||||
++ (optionals langAda [gnatboot])
|
++ (optionals langAda [gnatboot])
|
||||||
|
++ (optionals langVhdl [gnat])
|
||||||
;
|
;
|
||||||
|
|
||||||
configureFlags = "
|
configureFlags = "
|
||||||
@ -141,6 +146,7 @@ stdenv.mkDerivation ({
|
|||||||
++ optional langJava "java"
|
++ optional langJava "java"
|
||||||
++ optional langTreelang "treelang"
|
++ optional langTreelang "treelang"
|
||||||
++ optional langAda "ada"
|
++ optional langAda "ada"
|
||||||
|
++ optional langVhdl "vhdl"
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@ -197,9 +203,44 @@ stdenv.mkDerivation ({
|
|||||||
maintainers = [
|
maintainers = [
|
||||||
# Add your name here!
|
# Add your name here!
|
||||||
stdenv.lib.maintainers.ludo
|
stdenv.lib.maintainers.ludo
|
||||||
|
stdenv.lib.maintainers.viric
|
||||||
];
|
];
|
||||||
|
|
||||||
# Volunteers needed for the {Cyg,Dar}win ports.
|
# Volunteers needed for the {Cyg,Dar}win ports.
|
||||||
platforms = stdenv.lib.platforms.linux;
|
platforms = stdenv.lib.platforms.linux;
|
||||||
};
|
};
|
||||||
})
|
}
|
||||||
|
// (if langVhdl then rec {
|
||||||
|
name = "ghdl-0.29";
|
||||||
|
|
||||||
|
ghdlSrc = fetchurl {
|
||||||
|
url = "http://ghdl.free.fr/ghdl-0.29.tar.bz2";
|
||||||
|
sha256 = "15mlinr1lwljwll9ampzcfcrk9bk0qpdks1kxlvb70xf9zhh2jva";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Ghdl has some timestamps checks, storing file timestamps in '.cf' files.
|
||||||
|
# As we will change the timestamps to 1970-01-01 00:00:01, we also set the
|
||||||
|
# content of that .cf to that value. This way ghdl does not complain on
|
||||||
|
# the installed object files from the basic libraries (ieee, ...)
|
||||||
|
postInstallGhdl = ''
|
||||||
|
pushd $out
|
||||||
|
find . -name "*.cf" -exec \
|
||||||
|
sed 's/[0-9]*\.000" /19700101000001.000" /g' -i {} \;
|
||||||
|
popd
|
||||||
|
'';
|
||||||
|
|
||||||
|
postUnpack = ''
|
||||||
|
tar xvf ${ghdlSrc}
|
||||||
|
mv ghdl-*/vhdl gcc*/gcc
|
||||||
|
rm -Rf ghdl-*
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
homepage = "http://ghdl.free.fr/";
|
||||||
|
license = "GPLv2+";
|
||||||
|
description = "Complete VHDL simulator, using the GCC technology (gcc ${version})";
|
||||||
|
maintainers = with stdenv.lib.maintainers; [viric];
|
||||||
|
platforms = with stdenv.lib.platforms; linux;
|
||||||
|
};
|
||||||
|
|
||||||
|
} else {}))
|
||||||
|
98
pkgs/development/compilers/gcc-4.4/ghdl-ortho-cflags.patch
Normal file
98
pkgs/development/compilers/gcc-4.4/ghdl-ortho-cflags.patch
Normal file
@ -0,0 +1,98 @@
|
|||||||
|
diff --git a/gcc/vhdl/Make-lang.in b/gcc/vhdl/Make-lang.in
|
||||||
|
index 8f481df..681ac59 100644
|
||||||
|
--- a/gcc/vhdl/Make-lang.in
|
||||||
|
+++ b/gcc/vhdl/Make-lang.in
|
||||||
|
@@ -96,7 +96,7 @@ AGCC_GCCOBJ_DIR=../
|
||||||
|
AGCC_INC_FLAGS=-I$(AGCC_GCCOBJ_DIR)/gcc -I$(AGCC_GCCSRC_DIR)/include \
|
||||||
|
-I$(AGCC_GCCSRC_DIR)/gcc -I$(AGCC_GCCSRC_DIR)/gcc/config \
|
||||||
|
-I$(AGCC_GCCSRC_DIR)/libcpp/include
|
||||||
|
-AGCC_CFLAGS=-g -Wall -DIN_GCC $(AGCC_INC_FLAGS)
|
||||||
|
+AGCC_CFLAGS=-g -Wall -DIN_GCC $(AGCC_INC_FLAGS) $(CFLAGS) $(INCLUDES)
|
||||||
|
|
||||||
|
AGCC_LOCAL_OBJS=ortho-lang.o
|
||||||
|
|
||||||
|
@@ -140,7 +140,7 @@ ghdl$(exeext): force
|
||||||
|
|
||||||
|
# Ghdl libraries.
|
||||||
|
ghdllib: ghdl$(exeext) $(GCC_PASSES) force
|
||||||
|
- $(MAKE_IN_VHDL) GRT_FLAGS="-O -g" ghdllib
|
||||||
|
+ $(MAKE_IN_VHDL) GRT_FLAGS="-O -g $(CFLAGS)" ghdllib
|
||||||
|
|
||||||
|
# Build hooks:
|
||||||
|
|
||||||
|
diff --git a/gcc/vhdl/Makefile.in b/gcc/vhdl/Makefile.in
|
||||||
|
index d754c6c..07abc4a 100644
|
||||||
|
--- a/gcc/vhdl/Makefile.in
|
||||||
|
+++ b/gcc/vhdl/Makefile.in
|
||||||
|
@@ -80,7 +80,8 @@ T_CPPFLAGS =
|
||||||
|
X_ADAFLAGS =
|
||||||
|
T_ADAFLAGS =
|
||||||
|
|
||||||
|
-ADAC = $(CC)
|
||||||
|
+# Never use the bootstrapped compiler, as it may not be built for ada
|
||||||
|
+ADAC = gcc
|
||||||
|
|
||||||
|
ECHO = echo
|
||||||
|
CHMOD = chmod
|
||||||
|
diff --git a/gcc/vhdl/ortho-lang.c b/gcc/vhdl/ortho-lang.c
|
||||||
|
index 84aeb92..8eddd42 100644
|
||||||
|
--- a/gcc/vhdl/ortho-lang.c
|
||||||
|
+++ b/gcc/vhdl/ortho-lang.c
|
||||||
|
@@ -16,6 +16,7 @@
|
||||||
|
#include "options.h"
|
||||||
|
#include "real.h"
|
||||||
|
-#include "tree-gimple.h"
|
||||||
|
+#include "gimple.h"
|
||||||
|
+#include "tree.h"
|
||||||
|
#include "function.h"
|
||||||
|
#include "cgraph.h"
|
||||||
|
#include "target.h"
|
||||||
|
@@ -680,38 +681,10 @@ type_for_mode (enum machine_mode mode, int unsignedp)
|
||||||
|
|
||||||
|
const struct lang_hooks lang_hooks = LANG_HOOKS_INITIALIZER;
|
||||||
|
|
||||||
|
-/* Tree code classes. */
|
||||||
|
-
|
||||||
|
-#define DEFTREECODE(SYM, NAME, TYPE, LENGTH) TYPE,
|
||||||
|
-
|
||||||
|
-const enum tree_code_class tree_code_type[] = {
|
||||||
|
-#include "tree.def"
|
||||||
|
- 'x'
|
||||||
|
-};
|
||||||
|
-#undef DEFTREECODE
|
||||||
|
-
|
||||||
|
-/* Table indexed by tree code giving number of expression
|
||||||
|
- operands beyond the fixed part of the node structure.
|
||||||
|
- Not used for types or decls. */
|
||||||
|
-
|
||||||
|
-#define DEFTREECODE(SYM, NAME, TYPE, LENGTH) LENGTH,
|
||||||
|
-
|
||||||
|
-const unsigned char tree_code_length[] = {
|
||||||
|
-#include "tree.def"
|
||||||
|
- 0
|
||||||
|
-};
|
||||||
|
-#undef DEFTREECODE
|
||||||
|
-
|
||||||
|
-#define DEFTREECODE(SYM, NAME, TYPE, LENGTH) NAME,
|
||||||
|
-const char * const tree_code_name[] = {
|
||||||
|
-#include "tree.def"
|
||||||
|
- "@@dummy"
|
||||||
|
-};
|
||||||
|
-#undef DEFTREECODE
|
||||||
|
|
||||||
|
union lang_tree_node
|
||||||
|
GTY((desc ("0"),
|
||||||
|
- chain_next ("(union lang_tree_node *) GENERIC_NEXT (&%h.generic)")))
|
||||||
|
+ chain_next ("(union lang_tree_node *) TREE_CHAIN (&%h.generic)")))
|
||||||
|
{
|
||||||
|
union tree_node GTY ((tag ("0"))) generic;
|
||||||
|
};
|
||||||
|
@@ -1162,7 +1135,7 @@ new_access_type (tree dtype)
|
||||||
|
res = make_node (POINTER_TYPE);
|
||||||
|
TREE_TYPE (res) = NULL_TREE;
|
||||||
|
/* Seems necessary. */
|
||||||
|
- TYPE_MODE (res) = Pmode;
|
||||||
|
+ SET_TYPE_MODE (res, Pmode);
|
||||||
|
layout_type (res);
|
||||||
|
return res;
|
||||||
|
}
|
@ -2005,6 +2005,18 @@ let
|
|||||||
enableMultilib = false;
|
enableMultilib = false;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
# Not officially supported version for ghdl
|
||||||
|
ghdl_gcc44 = lowPrio (wrapGHDL (import ../development/compilers/gcc-4.4 {
|
||||||
|
inherit stdenv fetchurl texinfo gmp mpfr noSysDirs gnat gettext which
|
||||||
|
ppl cloogppl;
|
||||||
|
name = "ghdl";
|
||||||
|
langVhdl = true;
|
||||||
|
langCC = false;
|
||||||
|
langC = false;
|
||||||
|
profiledCompiler = false;
|
||||||
|
enableMultilib = false;
|
||||||
|
}));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Broken; fails because of unability to find its own symbols during linking
|
Broken; fails because of unability to find its own symbols during linking
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user