about summary refs log tree commit diff
diff options
context:
space:
mode:
authorLluís Batlle i Rossell <viric@viric.name>2012-11-13 15:15:52 +0100
committerLluís Batlle i Rossell <viric@viric.name>2012-11-13 15:16:32 +0100
commit77e983a7d471568fb7c195aebdf0075d928bdca9 (patch)
treefe2aad83764f1e331e2eeae248fcc549dd7aaa08
parent63901ddd2139426f691f50c4ffa8f16263d0de15 (diff)
downloadnixlib-77e983a7d471568fb7c195aebdf0075d928bdca9.tar
nixlib-77e983a7d471568fb7c195aebdf0075d928bdca9.tar.gz
nixlib-77e983a7d471568fb7c195aebdf0075d928bdca9.tar.bz2
nixlib-77e983a7d471568fb7c195aebdf0075d928bdca9.tar.lz
nixlib-77e983a7d471568fb7c195aebdf0075d928bdca9.tar.xz
nixlib-77e983a7d471568fb7c195aebdf0075d928bdca9.tar.zst
nixlib-77e983a7d471568fb7c195aebdf0075d928bdca9.zip
ghdl: building the standard libs with -O2
That leads to faster simulations.
-rw-r--r--pkgs/development/compilers/gcc/4.3/default.nix3
-rw-r--r--pkgs/development/compilers/gcc/4.3/ghdl-runtime-o2.patch13
2 files changed, 15 insertions, 1 deletions
diff --git a/pkgs/development/compilers/gcc/4.3/default.nix b/pkgs/development/compilers/gcc/4.3/default.nix
index 57fc0f805c47..4b9fd616d849 100644
--- a/pkgs/development/compilers/gcc/4.3/default.nix
+++ b/pkgs/development/compilers/gcc/4.3/default.nix
@@ -80,7 +80,8 @@ stdenv.mkDerivation ({
     ++ optional noSysDirs ./no-sys-dirs.patch
     ++ optional (noSysDirs && langFortran) ./no-sys-dirs-fortran.patch
     ++ optional langJava ./java-jvgenmain-link.patch
-    ++ optional langVhdl ./ghdl-ortho-cflags.patch;
+    ++ optional langVhdl ./ghdl-ortho-cflags.patch
+    ++ optional langVhdl ./ghdl-runtime-o2.patch;
     
   inherit noSysDirs profiledCompiler staticCompiler crossStageStatic
     binutilsCross libcCross;
diff --git a/pkgs/development/compilers/gcc/4.3/ghdl-runtime-o2.patch b/pkgs/development/compilers/gcc/4.3/ghdl-runtime-o2.patch
new file mode 100644
index 000000000000..ddc455143c02
--- /dev/null
+++ b/pkgs/development/compilers/gcc/4.3/ghdl-runtime-o2.patch
@@ -0,0 +1,13 @@
+diff --git a/gcc/vhdl/Makefile.in b/gcc/vhdl/Makefile.in
+index b8d2ed0..0e8bd55 100644
+--- a/gcc/vhdl/Makefile.in
++++ b/gcc/vhdl/Makefile.in
+@@ -682,7 +682,7 @@ install-ghdllib: ghdllib grt.lst $(STD93_SRCS) $(STD87_SRCS) \
+ 	PDIR=`pwd` && cd $(DESTDIR)$(VHDL_LIB_DIR) && \
+ 	$(MAKE) -f $$PDIR/Makefile REL_DIR=../../.. \
+ 	 LIBSRC_DIR="src" LIB93_DIR=lib/v93 LIB87_DIR=lib/v87 \
+-	 ANALYZE="$$PDIR/../ghdl -a --GHDL1=$$PDIR/../ghdl1 --ieee=none" \
++	 ANALYZE="$$PDIR/../ghdl -a --GHDL1=$$PDIR/../ghdl1 --ieee=none -Wc,-O2" \
+ 	 std.v93 std.v87 ieee.v93 ieee.v87 synopsys.v93 synopsys.v87 mentor.v93
+ # Copy std_standard (this is done after libraries, since they remove dirs).
+ 	$(INSTALL_DATA) std87_standard.o \