diff options
Diffstat (limited to 'translate')
-rw-r--r-- | translate/gcc/Make-lang.in | 20 | ||||
-rwxr-xr-x | translate/gcc/dist.sh | 19 |
2 files changed, 19 insertions, 20 deletions
diff --git a/translate/gcc/Make-lang.in b/translate/gcc/Make-lang.in index f3d5f98..310f01a 100644 --- a/translate/gcc/Make-lang.in +++ b/translate/gcc/Make-lang.in @@ -62,25 +62,24 @@ vhdl VHDL: ghdl1$(exeext) ghdl$(exeext) ghdllib # Tell GNU Make to ignore these, if they exist. .PHONY: vhdl VHDL ghdllib -agcc_srcdir=$(srcdir)/vhdl -agcc_objdir=. +#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) -AGCC_GCCSRC_DIR=$(srcdir)/.. -AGCC_GCCOBJ_DIR=../ - -####gcc Makefile.inc +GHDL1_OBJS = attribs.o 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. -ghdl1$(exeext): $(AGCC_OBJS) $(AGCC_DEPS) force $(BACKEND) $(LIBDEPS) +ghdl1$(exeext): force $(GHDL1_OBJS) $(BACKEND) $(LIBDEPS) CURDIR=`pwd`; cd $(srcdir)/vhdl; VHDLSRCDIR=`pwd`; cd $$CURDIR/vhdl; \ $(GNATMAKE) -c -aI$$VHDLSRCDIR ortho_gcc-main \ -cargs $(CFLAGS) $(GHDL_ADAFLAGS) $(GNATMAKE) -o $@ -aI$(srcdir)/vhdl -aOvhdl ortho_gcc-main \ -bargs -E -cargs $(CFLAGS) $(GHDL_ADAFLAGS) \ - -largs $(AGCC_OBJS) $(filter-out main.o,$(BACKEND)) \ - $(LIBS) $(BACKENDLIBS) -lstdc++ + -largs --LINK=$(LLINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) $(GHDL1_OBJS) \ + $(filter-out main.o,$(BACKEND)) $(LIBS) $(BACKENDLIBS) # The driver for ghdl. ghdl$(exeext): force @@ -159,7 +158,8 @@ vhdl.uninstall: vhdl.mostlyclean: -$(RM) vhdl/*$(objext) vhdl/*.ali vhdl/b_*.c -vhdl.clean: agcc-clean +vhdl.clean: + -$(RM) vhdl/*$(objext) vhdl.distclean: -$(RM) vhdl/Makefile -$(RM) ghdl$(exeext) diff --git a/translate/gcc/dist.sh b/translate/gcc/dist.sh index e709a64..c0152d0 100755 --- a/translate/gcc/dist.sh +++ b/translate/gcc/dist.sh @@ -91,8 +91,7 @@ do_Makefile () sed -e "/^####libraries Makefile.inc/r ../../libraries/Makefile.inc" \ -e "/^####grt Makefile.inc/r ../grt/Makefile.inc" \ < Makefile.in > $VHDLDIR/Makefile.in - sed -e "/^####gcc Makefile.inc/r ../../ortho/gcc/Makefile.inc" \ - < Make-lang.in > $VHDLDIR/Make-lang.in + cp Make-lang.in $VHDLDIR/Make-lang.in } # Copy (or link) sources files into $VHDLDIR @@ -185,27 +184,27 @@ do_compile () cd $GCCDISTOBJ export CFLAGS="-O -g" - case x86 in - x86) + 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) + x86_64-*-linux*) BUILD=x86_64-pc-linux-gnu CONFIG_LIBS="" ;; - darwin) + x86_64-*-darwin*) BUILD=x86_64-apple-darwin10.7 - CONFIG_LIBS="--with-gmp=$HOME/local" + 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 + ../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 - make + make -j4 make -C gcc vhdl.info cd $CWD } @@ -219,7 +218,7 @@ do_recompile () do_update_gcc_sources; cd $GCCDISTOBJ export CFLAGS="-O -g" - make + make -j4 } check_root () |