答复: 答复: patch: fix wrong sysroot path when given rsdk toolchain

Message ID 14A4BC6FC7AB3340A49D24D6ACB7BED930707F@RS-MBS02.realsil.com.cn
State New
Headers show
Series
  • 答复: 答复: patch: fix wrong sysroot path when given rsdk toolchain
Related show

Commit Message

陈小刚 July 23, 2018, 6:54 a.m.
Hi Arnout,

Thanks for confirming the problem.
I pasted the patch with a refurbished commit msg as below.

From f884cb3ed9f920f8516fef0b3246b29751c25704 Mon Sep 17 00:00:00 2001
From: Shawn Chen <shawn_chen@realsil.com.cn>
Date: Mon, 23 Jul 2018 14:30:24 +0800
Subject: [PATCH 1/1] toolchain: avoid unexpected regex substitution

Anchor the regex in toolchain_find_sysroot macro with a / to avoid
unexpected substitution for Realtek mips toolchain, for which the libc.a
path ends with 'mips-linux-uclibc/lib/libc.a'.

Signed-off-by: Shawn Chen <shawn_chen@realsil.com.cn>
---
 toolchain/toolchain-external/pkg-toolchain-external.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch

diff --git a/toolchain/toolchain-external/pkg-toolchain-external.mk b/toolchain/toolchain-external/pkg-toolchain-external.mk
index 8b2c283654..1ae099fd33 100644
--- a/toolchain/toolchain-external/pkg-toolchain-external.mk
+++ b/toolchain/toolchain-external/pkg-toolchain-external.mk
@@ -339,7 +339,7 @@  endef
 #
 # And variations on these.
 define toolchain_find_sysroot
-$$(printf $(call toolchain_find_libc_a,$(1)) | sed -r -e 's:(usr/)?lib(32|64)?([^/]*)?/([^/]*/)?libc\.a::')
+$$(printf $(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