From: "Mcnamara, John" <john.mcnamara@intel.com>
To: David Marchand <david.marchand@6wind.com>,
Panu Matilainen <pmatilai@redhat.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH v2] mk: Rework gcc version detection to permit versions newer than 4.x
Date: Tue, 24 Feb 2015 10:36:02 +0000 [thread overview]
Message-ID: <B27915DBBA3421428155699D51E4CFE2EC72CF@IRSMSX103.ger.corp.intel.com> (raw)
In-Reply-To: <CALwxeUvM=Tsw3kYnE36c0i-+29XmnxY6MWSjwk0ESyn74xiiSw@mail.gmail.com>
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of David Marchand
> Sent: Tuesday, February 24, 2015 10:21 AM
> To: Panu Matilainen
> Cc: dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH v2] mk: Rework gcc version detection to
> permit versions newer than 4.x
>
> On Tue, Feb 24, 2015 at 11:09 AM, David Marchand
> <david.marchand@6wind.com>
> wrote:
>
> > On Tue, Feb 24, 2015 at 10:50 AM, Panu Matilainen
> > <pmatilai@redhat.com>
> > wrote:
> >
> >> $ gcc -dumpversion
> >>> 4.7
> >>>
> Hum, how about something like always appending .0.0 to the gcc -
> dumpversion then cut at 3 characters ?
Hi,
Or something like this in Sed or Perl within the $(shell) expansion:
$ gcc -dumpversion | perl -pe 's/^(\d+\.\d+)$/$1.0/'
4.7.0
# Tests:
$ echo 4.7 | perl -pe 's/^(\d+\.\d+)$/$1.0/'
4.7.0
$ echo 4.7.0 | perl -pe 's/^(\d+\.\d+)$/$1.0/'
4.7.0
$ echo 4.7.1 | perl -pe 's/^(\d+\.\d+)$/$1.0/'
4.7.1
$ echo 144.7 | perl -pe 's/^(\d+\.\d+)$/$1.0/'
144.7.0
John
--
next prev parent reply other threads:[~2015-02-24 10:36 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-18 12:11 [dpdk-dev] [PATCH] " Panu Matilainen
2015-02-20 14:04 ` Thomas Monjalon
2015-02-20 15:25 ` Panu Matilainen
2015-02-23 14:53 ` [dpdk-dev] [PATCH v2] " Panu Matilainen
2015-02-24 2:46 ` Thomas Monjalon
2015-02-24 9:25 ` David Marchand
2015-02-24 9:50 ` Panu Matilainen
2015-02-24 10:09 ` David Marchand
2015-02-24 10:21 ` David Marchand
2015-02-24 10:36 ` Mcnamara, John [this message]
2015-02-24 10:44 ` David Marchand
2015-02-24 10:50 ` Bruce Richardson
2015-02-24 10:53 ` Panu Matilainen
2015-02-24 10:58 ` Mcnamara, John
2015-02-24 10:21 ` Panu Matilainen
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=B27915DBBA3421428155699D51E4CFE2EC72CF@IRSMSX103.ger.corp.intel.com \
--to=john.mcnamara@intel.com \
--cc=david.marchand@6wind.com \
--cc=dev@dpdk.org \
--cc=pmatilai@redhat.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 NNTP newsgroup(s).