Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Bai Yingjie <byj.tea@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/1] toolchain-external: Improve lib subdirectory matching
Date: Wed,  3 Sep 2014 21:29:14 +0800	[thread overview]
Message-ID: <1409750954-3636-1-git-send-email-byj.tea@gmail.com> (raw)

Some external toolchain provides lib32-fp which supports FPU instructions
as well as lib32 in sys-root/usr, but lib32-fp can't be matched and
in consequence causes a compile error.

The toolchain in this case is OCTEON mips64 toolchain, and the CFLAGS
cause the issue is -march=octeon3.

This patch improves the matching by accepting lib(32|64)?([^/]*)? as lib
name.

Signed-off-by: Bai Yingjie <byj.tea@gmail.com>
---
 toolchain/toolchain-external/toolchain-external.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/toolchain/toolchain-external/toolchain-external.mk b/toolchain/toolchain-external/toolchain-external.mk
index b2957d9..dad000e 100644
--- a/toolchain/toolchain-external/toolchain-external.mk
+++ b/toolchain/toolchain-external/toolchain-external.mk
@@ -436,13 +436,13 @@ endef
 
 # Returns the sysroot location for the given compiler + flags
 define toolchain_find_sysroot
-$$(echo -n $(call toolchain_find_libc_a,$(1)) | sed -r -e 's:(usr/)?lib(32|64)?/([^/]*/)?libc\.a::')
+$$(echo -n $(call toolchain_find_libc_a,$(1)) | sed -r -e 's:(usr/)?lib(32|64)?([^/]*)?/([^/]*/)?libc\.a::')
 endef
 
 # Returns the lib subdirectory for the given compiler + flags (i.e
 # typically lib32 or lib64 for some toolchains)
 define toolchain_find_libdir
-$$(echo -n $(call toolchain_find_libc_a,$(1)) | sed -r -e 's:.*/(usr/)?(lib(32|64)?)/([^/]*/)?libc.a:\2:')
+$$(echo -n $(call toolchain_find_libc_a,$(1)) | sed -r -e 's:.*/(usr/)?(lib(32|64)?([^/]*)?)/([^/]*/)?libc.a:\2:')
 endef
 
 # Checks for an already installed toolchain: check the toolchain
-- 
1.9.1

             reply	other threads:[~2014-09-03 13:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-03 13:29 Bai Yingjie [this message]
2014-09-03 13:41 ` [Buildroot] [PATCH 1/1] toolchain-external: Improve lib subdirectory matching Thomas Petazzoni
2014-09-03 14:20   ` Thomas De Schampheleire
2014-09-03 14:43     ` Yingjie Bai

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=1409750954-3636-1-git-send-email-byj.tea@gmail.com \
    --to=byj.tea@gmail.com \
    --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