diff options
author | Tristan Gingold <tgingold@free.fr> | 2023-01-09 18:48:21 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2023-01-09 18:48:21 +0100 |
commit | c4bd15851b3fc3e61aa9b76fa07f87eb526a3d25 (patch) | |
tree | 00e7d434c1a04c0e8509f9d1815e019d0f9f99ef | |
parent | ebb526e2ec4187c1463b87c9db5b2417c6399793 (diff) | |
download | ghdl-c4bd15851b3fc3e61aa9b76fa07f87eb526a3d25.tar.gz ghdl-c4bd15851b3fc3e61aa9b76fa07f87eb526a3d25.tar.bz2 ghdl-c4bd15851b3fc3e61aa9b76fa07f87eb526a3d25.zip |
Makefile.in: add support of gcc 12.x
-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 |