From: Shinya Kuribayashi <skuribay@ruby.dti.ne.jp>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] [PATCH][MIPS] cpu/mips/config.mk: Fix GNU assembler minor version picker
Date: Fri, 02 May 2008 12:37:01 +0900 [thread overview]
Message-ID: <481A8C5D.6060803@ruby.dti.ne.jp> (raw)
In-Reply-To: <481A8B97.5030209@ruby.dti.ne.jp>
Current trick to pick up GNU assembler minor version uses a dot(.) as a
delimiter, and take the second field to obtain minor version number. But
as can be expected, this doesn't work with a version string which has
dots more than needs.
Here's an example:
$ mips-linux-gnu-as --version | grep 'GNU assembler'
GNU assembler (Sourcery G++ Lite 4.2-129) 2.18.50.20080215
$ mips-linux-gnu-as --version | grep 'GNU assembler' | cut -d. -f2
2-129) 2
$
This patch restricts the version format to 2.XX.XX... This will work
in most cases.
$ mips-linux-gnu-as --version | grep 'GNU assembler' | egrep -o '2\.[0-9\.]+'
2.18.50.20080215
$ mips-linux-gnu-as --version | grep 'GNU assembler' | egrep -o '2\.[0-9\.]+' | cut -d. -f2
18
$
Signed-off-by: Shinya Kuribayashi <skuribay@ruby.dti.ne.jp>
---
cpu/mips/config.mk | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/cpu/mips/config.mk b/cpu/mips/config.mk
index b505a42..a173c54 100644
--- a/cpu/mips/config.mk
+++ b/cpu/mips/config.mk
@@ -20,7 +20,7 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
# MA 02111-1307 USA
#
-v=$(shell $(AS) --version |grep "GNU assembler" |cut -d. -f2)
+v=$(shell $(AS) --version | grep 'GNU assembler' | egrep -o '2\.[0-9\.]+' | cut -d. -f2)
MIPSFLAGS:=$(shell \
if [ "$v" -lt "14" ]; then \
echo "-mcpu=4kc"; \
next prev parent reply other threads:[~2008-05-02 3:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-02 3:33 [U-Boot-Users] [GIT PULL] MIPS updates Shinya Kuribayashi
2008-05-02 3:35 ` [U-Boot-Users] [PATCH][MIPS] cpu/mips/cache.S: Add dcache_enable Shinya Kuribayashi
2008-05-02 17:40 ` Jean-Christophe PLAGNIOL-VILLARD
2008-05-02 3:37 ` Shinya Kuribayashi [this message]
2008-05-03 22:10 ` [U-Boot-Users] [GIT PULL] MIPS updates Wolfgang Denk
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=481A8C5D.6060803@ruby.dti.ne.jp \
--to=skuribay@ruby.dti.ne.jp \
--cc=u-boot@lists.denx.de \
/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