Skip to contentSkip to conversation

toolchain: handle toolchains with multiple ld*.so.* files

PATCH In review Jonah Petri 3 participants 5 messages Aug 24, 2021 – Aug 25, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 toolchain: handle toolchains with multiple ld*.so.* files

Some 3rd party vendor toolchains have multiple files which match these glob patterns. In this case, the shell script failed. Switching to use find and xargs solves the issue.

---
 toolchain/helpers.mk | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
toolchain/helpers.mk +2 -4
index dfb2581ed5..5ed149d57d 100644
@@ -135,10 +135,8 @@ copy_toolchain_sysroot = \
 			$(call simplify_symlink,$$i,$(STAGING_DIR)) ; \
 		done ; \
 	fi ; \
-	if [ ! -e $(STAGING_DIR)/lib/ld*.so.* ]; then \
-		if [ -e $${ARCH_SYSROOT_DIR}/lib/ld*.so.* ]; then \
-			cp -a $${ARCH_SYSROOT_DIR}/lib/ld*.so.* $(STAGING_DIR)/lib/ ; \
-		fi ; \
+       if ! find -wholename $(STAGING_DIR)'/lib/ld*.so.*' > /dev/null; then \
+               find -wholename $${ARCH_SYSROOT_DIR}'/lib/ld*.so.*' -print0 | xargs -0 -I % cp % $(STAGING_DIR)/lib/; \
 	fi ; \
 	if [ `readlink -f $${SYSROOT_DIR}` != `readlink -f $${ARCH_SYSROOT_DIR}` ] ; then \
 		if [ ! -d $${ARCH_SYSROOT_DIR}/usr/include ] ; then \
Signature · 6 lines
2.30.2

_______________________________________________
buildroot mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/buildroot
#1 lore raw

Sorry for the missing SOB - I will resubmit.  The instructions on https://buildroot.org/downloads/manual/manual.html#submitting-patches might need a modification, as I followed them precisely, I think! Expect a v2 shortly with a SOB.

Jonah

Quoted 14 lines · Jonah Petri

Some 3rd party vendor toolchains have multiple files which match these glob patterns. In this case, the shell script failed. Switching to use find and xargs solves the issue.

---
  toolchain/helpers.mk | 6 ++----
  1 file changed, 2 insertions(+), 4 deletions(-)
toolchain/helpers.mk +0 -0
index dfb2581ed5..5ed149d57d 100644
@@ -135,10 +135,8 @@ copy_toolchain_sysroot = \
  			$(call simplify_symlink,$$i,$(STAGING_DIR)) ; \
  		done ; \

toolchain/helpers.mk copy_toolchain_sysroot = \ · line 142

Quoted 10 lines
toolchain/helpers.mk +2 -4
  	fi ; \
-	if [ ! -e $(STAGING_DIR)/lib/ld*.so.* ]; then \
-		if [ -e $${ARCH_SYSROOT_DIR}/lib/ld*.so.* ]; then \
-			cp -a $${ARCH_SYSROOT_DIR}/lib/ld*.so.* $(STAGING_DIR)/lib/ ; \
-		fi ; \
+       if ! find -wholename $(STAGING_DIR)'/lib/ld*.so.*' > /dev/null; then \
+               find -wholename $${ARCH_SYSROOT_DIR}'/lib/ld*.so.*' -print0 | xargs -0 -I % cp % $(STAGING_DIR)/lib/; \
  	fi ; \
  	if [ `readlink -f $${SYSROOT_DIR}` != `readlink -f $${ARCH_SYSROOT_DIR}` ] ; then \
  		if [ ! -d $${ARCH_SYSROOT_DIR}/usr/include ] ; then \

_______________________________________________
buildroot mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/buildroot

#2 lore raw

Hello,

Quoted 4 lines · On Tue, 24 Aug 2021 16:35:36 -0400 Jonah Petri <[email protected]> wrote:

Sorry for the missing SOB - I will resubmit.  The instructions on
https://buildroot.org/downloads/manual/manual.html#submitting-patches
might need a modification, as I followed them precisely, I think! Expect a v2 shortly with a SOB.

Thanks for your patch and going through our manual. If you think anything is missing, the manual source code is in docs/manual/, so you can easily send a patch.

However, I think this requirement for a Signed-off-by is clearly in our instructions. Section 22.5.1 of our manual has:

Finally, the patch should be signed off. This is done by adding

commit message. git commit -s does that for you, if configured properly. The Signed-off-by tag means that you publish the patch under the Buildroot license (i.e. GPL-2.0+, except for package patches, which have the upstream license), and that you are allowed to do so. See the Developer Certificate of Origin for details.

Best regards!

Thomas

Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/buildroot
#3 lore raw
Quoted 9 lines · Thomas Petazzoni

Hello,

Quoted 4 lines · On Tue, 24 Aug 2021 16:35:36 -0400 Jonah Petri <[email protected]> wrote:

Sorry for the missing SOB - I will resubmit.  The instructions on
https://buildroot.org/downloads/manual/manual.html#submitting-patches
might need a modification, as I followed them precisely, I think! Expect a v2 shortly with a SOB.

Quoted 6 lines

Thanks for your patch and going through our manual. If you think anything is missing, the manual source code is in docs/manual/, so you can easily send a patch.

However, I think this requirement for a Signed-off-by is clearly in our instructions. Section 22.5.1 of our manual has:

Hi Thomas,

Yes, you're right, the requirement is totally clear.  I have some error in my understanding of git send-email.  I'll submit a clarification to the manual once I narrow down exactly what went wrong.

Thanks for all your work,

Jonah

_______________________________________________
buildroot mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/buildroot

#4 lore raw

Hi Jonah,

Quoted 17 lines

Il giorno 25 ago 2021, alle ore 00:38, Jonah Petri <[email protected]> ha scritto:



Quoted 14 lines · Thomas Petazzoni

Hello,

Quoted 4 lines · On Tue, 24 Aug 2021 16:35:36 -0400 Jonah Petri <[email protected]> wrote:

Sorry for the missing SOB - I will resubmit. The instructions on
https://buildroot.org/downloads/manual/manual.html#submitting-patches
might need a modification, as I followed them precisely, I think! Expect a v2 shortly with a SOB.

Thanks for your patch and going through our manual. If you think anything is missing, the manual source code is in docs/manual/, so you can easily send a patch.

Quoted 6 lines
Quoted 2 lines

However, I think this requirement for a Signed-off-by is clearly in our instructions. Section 22.5.1 of our manual has:

Hi Thomas,

Yes, you're right, the requirement is totally clear. I have some error in my understanding of git send-email. I'll submit a clarification to the manual once I narrow down exactly what went wrong.

I think that ./utils/get-developers in buildroot folder can help you. Try to create the patch with:
git format-patch -s -M -o . -1
and then:
./utils/get-developers 0001-your-patch.patch

That will give you the git send-mail command entirely to send your patch. And then you append your patch name to the command.

Best regards
Giulio Benetti

Quoted 5 lines

Thanks for all your work,

Jonah

_______________________________________________
buildroot mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/buildroot