diff options
author | Tristan Gingold <tgingold@free.fr> | 2014-11-02 13:56:05 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2014-11-02 13:56:05 +0100 |
commit | 8bf6d7873124db4079b6757479c7e5d6327e7c86 (patch) | |
tree | 32847283702e46672ad07dd5db532864ea01aa60 /translate | |
parent | 88fff744247c4c1f8e886207c7997390b063af27 (diff) | |
download | ghdl-8bf6d7873124db4079b6757479c7e5d6327e7c86.tar.gz ghdl-8bf6d7873124db4079b6757479c7e5d6327e7c86.tar.bz2 ghdl-8bf6d7873124db4079b6757479c7e5d6327e7c86.zip |
makefiles and script: adjust for gcc 4.9
Diffstat (limited to 'translate')
-rw-r--r-- | translate/gcc/Make-lang.in | 15 | ||||
-rw-r--r-- | translate/gcc/Makefile.in | 32 | ||||
-rw-r--r-- | translate/gcc/dist-common.sh | 2 | ||||
-rwxr-xr-x | translate/gcc/dist.sh | 18 | ||||
-rw-r--r-- | translate/ghdldrv/Makefile | 4 |
5 files changed, 47 insertions, 24 deletions
diff --git a/translate/gcc/Make-lang.in b/translate/gcc/Make-lang.in index 310f01a9e..cde3e6c07 100644 --- a/translate/gcc/Make-lang.in +++ b/translate/gcc/Make-lang.in @@ -65,10 +65,14 @@ vhdl VHDL: ghdl1$(exeext) ghdl$(exeext) ghdllib #ortho-lang.o: $(agcc_srcdir)/ortho-lang.c \ # $(AGCC_GCCOBJ_DIR)gcc/gtype-vhdl.h \ # $(AGCC_GCCOBJ_DIR)gcc/gt-vhdl-ortho-lang.h -# $(COMPILER) -c -o $@ $< $(AGCC_CFLAGS) $(INCLUDES) +# $(COMPILER) -c -o $@ $< $(AGCC_CFLAGS) $(INCLUDES) GHDL1_OBJS = attribs.o vhdl/ortho-lang.o +# To be put in ALL_HOST_FRONTEND_OBJS, so that generated files are created +# before. +vhdl_OBJS=vhdl/ortho-lang.o + # The compiler proper. # It is compiled into the vhdl/ subdirectory to avoid file name clashes but # linked in in gcc directory to be able to access to gcc object files. @@ -86,8 +90,9 @@ ghdl$(exeext): force $(MAKE_IN_VHDL) ../ghdl$(exeext) # Ghdl libraries. -ghdllib: ghdl$(exeext) $(GCC_PASSES) force - $(MAKE_IN_VHDL) GRT_FLAGS="-O -g" ghdllib +ghdllib: ghdl$(exeext) ghdl1$(exeext) $(GCC_PASSES) force + $(MAKE_IN_VHDL) GRT_FLAGS="-O -g" $(FLAGS_TO_PASS) \ + ADAC=$(COMPILER_FOR_BUILD) ghdllib # Build hooks: @@ -97,8 +102,8 @@ vhdl.all.cross: @echo "No support for building vhdl cross-compiler" exit 1 -vhdl.start.encap: -vhdl.rest.encap: +vhdl.start.encap: +vhdl.rest.encap: # Documentation hooks doc/ghdl.info: vhdl/ghdl.texi diff --git a/translate/gcc/Makefile.in b/translate/gcc/Makefile.in index eae920d62..d26ec25a0 100644 --- a/translate/gcc/Makefile.in +++ b/translate/gcc/Makefile.in @@ -194,8 +194,9 @@ clean: grt-clean ghdllibs-clean force # Additionnal rules -LIB93_DIR:=./lib/v93 LIB87_DIR:=./lib/v87 +LIB93_DIR:=./lib/v93 +LIB08_DIR:=./lib/v08 LIBSRC_DIR:=$(srcdir)/libraries ANALYZE=../ghdl -a --GHDL1=../ghdl1 --ieee=none @@ -214,10 +215,15 @@ std93_standard.o: $(GHDL1) ../xgcc -c -o std_standard.o std_standard.s $(MV) std_standard.o $@ -ghdllib: std87_standard.o std93_standard.o libgrt.a +std08_standard.o: $(GHDL1) + $(GHDL1) --std=08 -quiet -o std_standard.s --compile-standard + ../xgcc -c -o std_standard.o std_standard.s + $(MV) std_standard.o $@ + +ghdllib: std87_standard.o std93_standard.o std08_standard.o libgrt.a ghdllibs-clean: force - $(RM) -rf $(LIB87_DIR) $(LIB93_DIR) + $(RM) -rf $(LIB87_DIR) $(LIB93_DIR) $(LIB08_DIR) PHONY: ghdllib ghdllibs-clean @@ -228,7 +234,8 @@ GRT_RANLIB=$(RANLIB) ####grt Makefile.inc install-ghdllib: ghdllib grt.lst $(STD93_SRCS) $(STD87_SRCS) \ - $(IEEE93_SRCS) $(IEEE87_SRCS) $(SYNOPSYS_SRCS) + $(IEEE93_SRCS) $(IEEE87_SRCS) $(SYNOPSYS_SRCS) \ + $(STD08_SRCS) $(IEEE08_SRCS) $(RM) -rf $(DESTDIR)$(VHDL_LIB_DIR) $(MKDIR) $(DESTDIR)$(VHDL_LIB_DIR) # Install libgrt @@ -239,7 +246,7 @@ install-ghdllib: ghdllib grt.lst $(STD93_SRCS) $(STD87_SRCS) \ # Install VHDL sources. $(MKDIR) $(DESTDIR)$(VHDL_LIB_DIR)/src $(MKDIR) $(DESTDIR)$(VHDL_LIB_DIR)/src/std - for i in $(STD93_SRCS) $(STD87_SRCS); do \ + for i in $(STD93_SRCS) $(STD87_SRCS) $(STD08_SRCS); do \ $(INSTALL_DATA) $$i $(DESTDIR)$(VHDL_LIB_DIR)/src/std; \ done $(MKDIR) $(DESTDIR)$(VHDL_LIB_DIR)/src/ieee @@ -262,17 +269,26 @@ install-ghdllib: ghdllib grt.lst $(STD93_SRCS) $(STD87_SRCS) \ for i in $(MENTOR93_SRCS); do \ $(INSTALL_DATA) $$i $(DESTDIR)$(VHDL_LIB_DIR)/src/mentor; \ done + $(MKDIR) $(DESTDIR)$(VHDL_LIB_DIR)/src/ieee2008 + for i in $(IEEE08_SRCS); do \ + $(INSTALL_DATA) $$i $(DESTDIR)$(VHDL_LIB_DIR)/src/ieee2008; \ + done # Create library dirs $(MKDIR) $(DESTDIR)$(VHDL_LIB_DIR)/lib/v93 $(MKDIR) $(DESTDIR)$(VHDL_LIB_DIR)/lib/v87 + $(MKDIR) $(DESTDIR)$(VHDL_LIB_DIR)/lib/v08 # Compile in place. PDIR=`pwd` && cd $(DESTDIR)$(VHDL_LIB_DIR) && \ - $(MAKE) -f $$PDIR/Makefile REL_DIR=../../.. \ - LIBSRC_DIR="src" LIB93_DIR=lib/v93 LIB87_DIR=lib/v87 \ + $(MAKE) -f $$PDIR/Makefile REL_DIR=../../.. LIBSRC_DIR="src" \ + LIB93_DIR=lib/v93 LIB87_DIR=lib/v87 LIB08_DIR=lib/v08 \ ANALYZE="$$PDIR/../ghdl -a --GHDL1=$$PDIR/../ghdl1 --ieee=none" \ - std.v93 std.v87 ieee.v93 ieee.v87 synopsys.v93 synopsys.v87 mentor.v93 + std.v87 ieee.v87 synopsys.v87 \ + std.v93 ieee.v93 synopsys.v93 mentor.v93 \ + std.v08 ieee.v08 # Copy std_standard (this is done after libraries, since they remove dirs). $(INSTALL_DATA) std87_standard.o \ $(DESTDIR)$(VHDL_LIB_DIR)/lib/v87/std/std_standard.o $(INSTALL_DATA) std93_standard.o \ $(DESTDIR)$(VHDL_LIB_DIR)/lib/v93/std/std_standard.o + $(INSTALL_DATA) std08_standard.o \ + $(DESTDIR)$(VHDL_LIB_DIR)/lib/v08/std/std_standard.o diff --git a/translate/gcc/dist-common.sh b/translate/gcc/dist-common.sh index b0b142b47..ad2229734 100644 --- a/translate/gcc/dist-common.sh +++ b/translate/gcc/dist-common.sh @@ -139,6 +139,8 @@ ghdlmain.adb libraries_files=" std/textio.vhdl std/textio_body.vhdl +std/env.vhdl +std/env_body.vhdl ieee/README.ieee ieee/numeric_bit-body.vhdl ieee/numeric_bit.vhdl diff --git a/translate/gcc/dist.sh b/translate/gcc/dist.sh index c0152d062..339bc490d 100755 --- a/translate/gcc/dist.sh +++ b/translate/gcc/dist.sh @@ -62,7 +62,7 @@ GCCDISTOBJ=$GCCDIST-objs PREFIX=/usr/local GCCLIBDIR=$PREFIX/lib/gcc/$MACHINE/$GCCVERSION GCCLIBEXECDIR=$PREFIX/libexec/gcc/$MACHINE/$GCCVERSION -bindirname=ghdl-$VERSION-i686-pc-linux +bindirname=ghdl-$VERSION-$MACHINE TARINSTALL=$DISTDIR/$bindirname.tar.bz2 VHDLDIR=$distdir/vhdl DOWNLOAD_HTML=../../website/download.html @@ -166,7 +166,7 @@ do_update_gcc_sources () # Extract the source, configure and make. do_compile () { - set -x + #set -x do_update_gcc_sources; @@ -186,23 +186,20 @@ do_compile () case $MACHINE in i?86-*-linux*) - BUILD=i686-pc-linux-gnu # gmp location (mpfr and mpc are supposed to be at the same place) CONFIG_LIBS="--with-gmp=$PWD/../build" ;; x86_64-*-linux*) - BUILD=x86_64-pc-linux-gnu CONFIG_LIBS="" ;; x86_64-*-darwin*) - BUILD=x86_64-apple-darwin10.7 CONFIG_LIBS="--with-gmp=$HOME/local --with-stage1-ldflags=" ;; *) exit 1 ;; esac - ../gcc-$GCCVERSION/configure --enable-languages=vhdl --prefix=$PREFIX --disable-bootstrap --with-bugurl="<URL:http://gna.org/projects/ghdl>" --build=$BUILD $CONFIG_LIBS --disable-shared --disable-libmudflap --disable-libssp --disable-libgomp --disable-libquadmatch --disable-libdecnumber + ../gcc-$GCCVERSION/configure --enable-languages=vhdl --prefix=$PREFIX --disable-bootstrap --with-bugurl="<URL:http://gna.org/projects/ghdl>" --build=$MACHINE $CONFIG_LIBS --disable-shared --disable-libmudflap --disable-libssp --disable-libgomp --disable-libquadmath make -j4 make -C gcc vhdl.info @@ -212,8 +209,6 @@ do_compile () # Re-package sources, update gcc sources and recompile without reconfiguring. do_recompile () { - set -x - do_sources do_update_gcc_sources; cd $GCCDISTOBJ @@ -277,7 +272,7 @@ do_tar_dist () mkdir $bindirname sed -e "s/@TARFILE@/$bindirname/" < INSTALL > $bindirname/INSTALL ln ../../COPYING $bindirname - ln $TARINSTALL $bindirname + cp $TARINSTALL $bindirname tar cvf $bindirname.tar $bindirname } @@ -286,6 +281,7 @@ do_distclean_gcc () { set -x rm -f ${DESTDIR}${PREFIX}/bin/cpp ${DESTDIR}${PREFIX}/bin/gcc + rm -f ${DESTDIR}${PREFIX}/bin/gcc-* rm -f ${DESTDIR}${PREFIX}/bin/gccbug ${DESTDIR}${PREFIX}/bin/gcov rm -f ${DESTDIR}${PREFIX}/bin/${MACHINE}-gcc* rm -f ${DESTDIR}${PREFIX}/info/cpp.info* @@ -302,9 +298,13 @@ do_distclean_gcc () rm -rf ${DESTDIR}${PREFIX}/include rm -f ${DESTDIR}${GCCLIBEXECDIR}/cc1 ${DESTDIR}${GCCLIBEXECDIR}/collect2 rm -f ${DESTDIR}${GCCLIBEXECDIR}/cpp0 ${DESTDIR}${GCCLIBEXECDIR}/tradcpp0 + rm -rf ${DESTDIR}${GCCLIBEXECDIR}/plugin + rm -rf ${DESTDIR}${GCCLIBEXECDIR}/lto-wrapper rm -f ${DESTDIR}${GCCLIBDIR}/*.o ${DESTDIR}$GCCLIBDIR/*.a rm -f ${DESTDIR}${GCCLIBDIR}/specs + rm -rf ${DESTDIR}${GCCLIBDIR}/plugin rm -rf ${DESTDIR}${GCCLIBDIR}/include + rm -rf ${DESTDIR}${GCCLIBDIR}/include-fixed rm -rf ${DESTDIR}${GCCLIBDIR}/install-tools rm -rf ${DESTDIR}${GCCLIBEXECDIR}/install-tools } diff --git a/translate/ghdldrv/Makefile b/translate/ghdldrv/Makefile index ed94f02b4..ec01aaf1e 100644 --- a/translate/ghdldrv/Makefile +++ b/translate/ghdldrv/Makefile @@ -166,8 +166,8 @@ grt.links: install.all: install.v87 install.v93 install.v08 install.gcc: - $(MAKE) GHDL1=../ghdl1-gcc install.standard $(MAKE) GHDL=ghdl_gcc install.all + $(MAKE) GHDL1=../ghdl1-gcc install.standard install.mcode: $(MAKE) GHDL=ghdl_mcode install.all @@ -176,8 +176,8 @@ install.simul: $(MAKE) GHDL=ghdl_simul install.all install.llvm: - $(MAKE) GHDL1=../ghdl1-llvm install.standard $(MAKE) GHDL=ghdl_llvm install.all + $(MAKE) GHDL1=../ghdl1-llvm install.standard clean: force $(RM) -f *.o *.ali ghdl_gcc ghdl_mcode ghdl_llvm ghdl_llvm_jit |