public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Romain Geissler <romain.geissler@gmail.com>
To: Jonathan Wakely <jwakely.gcc@gmail.com>
Cc: Basile Starynkevitch <basile@starynkevitch.net>,
	gcc-melt@googlegroups.com, gcc@gcc.gnu.org
Subject: Re: [GCC-MELT-397] MELT 0.9.5rc1 etc...
Date: Sat, 31 Mar 2012 13:56:00 -0000	[thread overview]
Message-ID: <5B77CEF8-B4E4-4FEB-9A96-4D7951A449BB@gmail.com> (raw)
In-Reply-To: <CAH6eHdQcVqoHs2RwHJ9iLcHtUtoRhxJSBSyOBHbrQz89SP7ujA@mail.gmail.com>

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 !).

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}")

Notice the $$3 at the end, showing you only need the version number.
This line currently outputs something like:
gcc version 4.7.0 20120115 (experimental) (GCC)

If you change double quote by single quote like this:
MELTGCC_VERSION := $(shell env LANG=C LC_ALL=C $(MELTGCC) -v < /dev/null 2>&1 | $(GAWK) '/^gcc version/{print $$3}')

It'll output:
4.7.0

If you change this, then you'll also have to change this line:
echo "$(MELTGCC_VERSION)"  | $(GAWK) '{split($$3,vertab,"."); printf "%d", strtonum(vertab[1])*1000+strtonum(vertab[2])}' > $@

to this:
echo "$(MELTGCC_VERSION)"  | $(GAWK) '{split($$1,vertab,"."); printf "%d", strtonum(vertab[1])*1000+strtonum(vertab[2])}' > $@

(notice $$3 becomes $$1)

Romain Geissler

  reply	other threads:[~2012-03-31 13:56 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-29 20:02 pre-announce: MELT 0.9.5rc1 plugin for GCC 4.6 & 4.7 pre-release candidate 1 (and help needed on make issues) Basile Starynkevitch
2012-03-29 20:45 ` [GCC-MELT-386] " Romain Geissler
2012-03-29 21:03   ` [GCC-MELT-387] " Basile Starynkevitch
2012-03-29 21:29     ` Romain Geissler
2012-03-30  5:22       ` Basile Starynkevitch
2012-03-30  9:41       ` MELT 0.9.5rc1 etc Basile Starynkevitch
2012-03-31  0:23         ` [GCC-MELT-391] " Romain Geissler
2012-03-31  7:08           ` Basile Starynkevitch
2012-03-31  8:52             ` Romain Geissler
2012-03-31 10:28               ` Basile Starynkevitch
2012-03-31 11:55                 ` Romain Geissler
2012-03-31 12:03                   ` Romain Geissler
2012-03-31 12:39                     ` [GCC-MELT-397] " Basile Starynkevitch
2012-03-31 13:07                       ` Jonathan Wakely
2012-03-31 13:56                         ` Romain Geissler [this message]
2012-03-31 14:30                           ` Basile Starynkevitch
2012-04-02 10:31 ` Announce: MELT 0.9.5rc2 release candidate (for GCC 4.6 and 4.7) Basile Starynkevitch
2012-04-02 10:35   ` Basile Starynkevitch

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5B77CEF8-B4E4-4FEB-9A96-4D7951A449BB@gmail.com \
    --to=romain.geissler@gmail.com \
    --cc=basile@starynkevitch.net \
    --cc=gcc-melt@googlegroups.com \
    --cc=gcc@gcc.gnu.org \
    --cc=jwakely.gcc@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).