[Buildroot] [PATCH v3 1/1] toolchain: handle toolchains with multiple ld*.so.* files
Jonah Petri
jonah at petri.us
Mon Aug 30 00:25:48 UTC 2021
On 8/29/21 1:21 PM, Arnout Vandecappelle wrote:
> On 26/08/2021 21:34, Jonah Petri wrote:
>> 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 $(STAGING_DIR)/lib -name 'ld*.so.*' -print -quit) ]]; then \
> I was going to say: don't use [[, it's a bashism. However, we already use it in
> helpers.mk, so I guess it's OK. It's up to whoever has a problem with it to get
> rid of it :-)
>
> Therefore, applied to next, thanks.
Thanks! I found it surprisingly hard to find a pleasing shell answer to
"does this command succeed *and* output anything to stdout?" without
invoking bashisms. I too was wary of using [[ before I saw the same
usage lower in the file, and noted that bash is a prerequisite for
buildroot in general. Hopefully some future dev won't curse me too much
☺ Thanks for applying!
More information about the buildroot
mailing list