This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [GCC-MELT-397] MELT 0.9.5rc1 etc...


On Sat, 31 Mar 2012 15:55:50 +0200
Romain Geissler <romain.geissler@gmail.com> wrote:

> Le 31 mars 2012 à 15:07, Jonathan Wakely a écrit :
> 
> > On 31 March 2012 13:38, Basile Starynkevitch wrote:
> >> 
> >> (I think that printf in AWK script is a GNU extension).
> > 
> > Nope, it's standard.
> 
> Yeah it is. I looked at your the melt files in contrib (that's quite
> strange that the Makefile used to build the melt plugin is
> located in here through, files in the contrib directory should
> not be mandatory to build gcc !).

No, it is not strange: indeed the MELT *branch* has a file contrib/MELT-Plugin-Makefile
which is used for the *MELT* plugin (but is useless for the MELT *branch*, which has its
own gcc/Makefile.in).

But the MELT plugin is not useful for the MELT branch. When you build a gcc-melt from the
MELT branch, there is no melt.so file involved, the melt-runtime.o is statically linked
inside cc1 (and cc1plus, etc etc...) and the MELT runtime is automagically started as a
pseudo-plugin without any dlopen-ing. the MELT initialization phase is indeed dlopen-ing
MELT modules (as does the melt.so plugin for a regular GCC), because toplev.c of the MELT
branch calls melt_initialize() and melt_finalize().

So, when building the MELT *branch* (which few people do), you don't need or use
contrib/MELT-Plugin-Makefile.

When I extract the MELT plugin from the MELT branch (e.g. for MELT plugin releases) with
the procedure in https://groups.google.com/group/gcc-melt/msg/083091abb7f30c39?hl=en the
MELT-Plugin-Makefile is becoming the Makefile for the extracted plugin. But the MELT
branch don't need it, so it sits in rightly contrib/MELT-Plugin-Makefile


> It seems that among all your gawk uses, including
> make-warmelt-predef.awk and make-melt-predefh.awk
> the only GNU specific feature is strtonum. But you don't need it,
> as the following works with regular awk :
> 
> echo 4.7.0  | awk '{split($1,vertab,"."); printf "%d", vertab[1]*1000+vertab[2]}'
> 
> By looking at your awk calls, i think you've got some errors in
> MELT-Plugin-Makefile at the following line:
> 
> MELTGCC_VERSION := $(shell env LANG=C LC_ALL=C $(MELTGCC) -v < /dev/null 2>&1 | $(GAWK) "/^gcc version/{print $$3}")

Corrected and commited svn rev 186044.

Thanks
-- 
Basile STARYNKEVITCH         http://starynkevitch.net/Basile/
email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359
8, rue de la Faiencerie, 92340 Bourg La Reine, France
*** opinions {are only mine, sont seulement les miennes} ***


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]