From: "Jörg Krause" <joerg.krause@embedded.rocks>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 3/9] toolchain-external: add support for gcc version dependency
Date: Sat, 08 Aug 2015 14:23:04 +0200 [thread overview]
Message-ID: <1439036584.12501.5.camel@embedded.rocks> (raw)
In-Reply-To: <20150805121441.13c3a165@free-electrons.com>
Dear Thomas Petazzoni, Yann Y. Marin,
On Mi, 2015-08-05 at 12:14 +0200, Thomas Petazzoni wrote:
> Dear Yann E. MORIN,
>
> On Tue, 4 Aug 2015 21:49:48 +0200, Yann E. MORIN wrote:
>
> > That's not true for the BR2_TOOLCHAIN_EXTERNAL_LINARO_AARCH64
> > toolchain:
> >
> > $ ./host/opt/ext-toolchain/bin/aarch64-linux-gnu-gcc --version
> > aarch64-linux-gnu-gcc (crosstool-NG linaro-1.13.1-4.9-2014.09 -
> > Linaro GCC 4.9-2014.09) 4.9.2 20140904 (prerelease)
> >
> > Here's a better sed-expr that should match it too, as well as the
> > other
> > gcc versions; we'll make the assumption that the version string is
> > right
> > after the first closing parenthesis:
> >
> > sed -r -e '1!d; s/^[^)]+\) ([^[:space:]]+).*/\1/;
> > s/\.[[:digit:]]+$//;'
> >
> > Explanations;
> >
> > - 1!d
> > - delete if not line 1 (i.e. your 'head -n1')
> >
> > - s/^[^)]+\) ([^[:space:]]+).*/\1/
> > - eat all until the first ')' character followed by a space
> > - match as many non-space chars as possible
> > - eat all the remaining chars on the line
> > - replace by the matched expression
> >
> > - s/\.[[:digit:]]+$//
> > - eat a dot followed by as many digits as possible up to the
> > end
> > of line
> > - replace with nothing
>
> Thanks! I've used your regexp, and also copy/pasted your explanation
> into the code. I just had to replace $ by $$ to cope with make
> escaping.
This regex does not produce the version string 5 for my GCC 5.2
toolchain built with BR and included as external toolchain.
$ output/host/usr/bin/arm-linux-gcc --version
arm-linux-gcc (Buildroot 2015.08-rc1-01365-gec8cd42) 5.2.0
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There
is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.
$ output/host/usr/bin/arm-linux-gcc --version | sed -r -e '1!d;
s/^[^)]+\) ([^[:space:]]+).*/\1/; s/\.[[:digit:]]+$$//;'
5.2
Best regards
J?rg Krause
next prev parent reply other threads:[~2015-08-08 12:23 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-04 18:00 [Buildroot] [PATCH 0/9] Add gcc version dependency mechanism Thomas Petazzoni
2015-08-04 18:00 ` [Buildroot] [PATCH 1/9] toolchain: add common gcc version hidden config options Thomas Petazzoni
2015-08-04 19:12 ` Yann E. MORIN
2015-08-04 18:00 ` [Buildroot] [PATCH 2/9] gcc: select the appropriate BR2_TOOLCHAIN_GCC_AT_LEAST_* option Thomas Petazzoni
2015-08-04 19:14 ` Yann E. MORIN
2015-08-04 18:00 ` [Buildroot] [PATCH 3/9] toolchain-external: add support for gcc version dependency Thomas Petazzoni
2015-08-04 19:49 ` Yann E. MORIN
2015-08-05 10:14 ` Thomas Petazzoni
2015-08-08 12:23 ` Jörg Krause [this message]
2015-08-08 12:33 ` Thomas Petazzoni
[not found] ` <1485266737.8272514.1439293774884.JavaMail.zimbra@datacom.ind.br>
[not found] ` <979955045.8284402.1439295583830.JavaMail.zimbra@datacom.ind.br>
2015-08-12 8:30 ` Thomas Petazzoni
2015-08-04 18:00 ` [Buildroot] [PATCH 4/9] docs/manual: document gcc version dependencies Thomas Petazzoni
2015-08-04 19:58 ` Yann E. MORIN
2015-08-05 9:05 ` Thomas Petazzoni
2015-08-05 19:53 ` Yann E. MORIN
2015-08-04 18:00 ` [Buildroot] [PATCH 5/9] libsigrok: depends on gcc >= 4.7 Thomas Petazzoni
2015-08-04 20:08 ` Yann E. MORIN
2015-08-05 7:56 ` Thomas Petazzoni
2015-08-04 18:00 ` [Buildroot] [PATCH 6/9] upmpdcli: update to use the gcc version dependency mechanism Thomas Petazzoni
2015-08-04 20:11 ` Yann E. MORIN
2015-08-04 18:00 ` [Buildroot] [PATCH 7/9] zmqpp: " Thomas Petazzoni
2015-08-04 20:12 ` Yann E. MORIN
2015-08-05 10:15 ` Thomas Petazzoni
2015-08-04 18:00 ` [Buildroot] [PATCH 8/9] libupnpp: " Thomas Petazzoni
2015-08-04 20:21 ` Yann E. MORIN
2015-08-04 18:00 ` [Buildroot] [PATCH 9/9] mpd: " Thomas Petazzoni
2015-08-04 20:22 ` Yann E. MORIN
2015-08-05 10:13 ` [Buildroot] [PATCH 0/9] Add " Thomas Petazzoni
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=1439036584.12501.5.camel@embedded.rocks \
--to=joerg.krause@embedded.rocks \
--cc=buildroot@busybox.net \
/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