diff options
-rw-r--r-- | Makefile.in | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/Makefile.in b/Makefile.in index 57cffa19c..5c6e6c032 100644 --- a/Makefile.in +++ b/Makefile.in @@ -284,8 +284,9 @@ copy-sources.gcc: version.ads scripts/gcc/Make-lang.in 7.*) gcc_ortho_lang=ortho-lang-7.c ;; \ 8.*) gcc_ortho_lang=ortho-lang-8.c ;; \ 9.* | 10.* | 11.*) gcc_ortho_lang=ortho-lang-9.c ;; \ + 12.*) gcc_ortho_lang=ortho-lang-9.c ;; \ *) echo "Mismatch gcc version from $(gcc_src_dir)"; \ - echo "Need gcc version 4.9.x, 5.x, 6.x, 7.x, 8.x, 9.x or 10.x"; \ + echo "Need gcc version 4.9.x, 5.x to 12.x"; \ exit 1 ;; \ esac; \ $(CP) -p $(srcdir)/src/ortho/gcc/$$gcc_ortho_lang \ @@ -297,6 +298,14 @@ copy-sources.gcc: version.ads scripts/gcc/Make-lang.in $(CP) -p $(srcdir)/scripts/gcc/config-lang.in $(gcc_vhdl_dir) $(CP) -p $(srcdir)/scripts/gcc/lang-options.h $(gcc_vhdl_dir) $(CP) -p $(srcdir)/scripts/gcc/lang-specs.h $(gcc_vhdl_dir) +# For gcc 12.x, use .cc extension + base_ver=`cat $(gcc_src_dir)/gcc/BASE-VER`; \ + case $$base_ver in \ + 12.*) for f in $(gcc_vhdl_dir)/*.c; do mv $$f $${f}c; done; \ + sed -e 's/ortho-lang.c/ortho-lang.cc/' \ + < $(srcdir)/scripts/gcc/config-lang.in \ + > $(gcc_vhdl_dir)/config-lang.in ;; \ + esac # To build vhdl libs using a non-installed ghdl, define GHDL_GCC_BIN to the # path of ghdl and GHDL1_GCC_BIN to path of ghdl1 |