[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openembedded-core
Subject:    Re: [OE-core] recipes-devtools/gcc: gcc-Fix-argument-list-too-long-error.patch is buggy
From:       "Richard Purdie" <richard.purdie () linuxfoundation ! org>
Date:       2020-07-29 12:55:30
Message-ID: 1d98a4bfac9233184149c8442726d7580b65b4b0.camel () linuxfoundation ! org
[Download RAW message or body]

On Sun, 2020-07-26 at 08:20 -0700, qiuguang.zqg@alibaba-inc.com wrote:
> A few days ago, I tried to compile a gcc plugin with the toolchain from poky sdk.
> It failed with errors about missing header files such as backend.h etc.
> 
> After investigation, I found that the problem was brought by a gcc patch:
> 0012-gcc-Fix-argument-list-too-long-error.patch (which is considered derived from \
> the original patch) 
> - headers=`echo $(PLUGIN_HEADERS) $$(cd $(srcdir); echo *.h *.def) | tr ' ' '\012' \
> | sort -u`; \ + headers="$(sort $(PLUGIN_HEADERS) $$(cd $(srcdir); echo *.h \
> *.def))"; \ 
> It changes the commands of install-plugin, making the sorting taken effect before \
> the shell globs. Thus results in the header files under gcc $(srcdir) being not \
> installed. 
> By checking log.do_install, we can find that the `headers=' statement to run is \
> incorrect and will not work as expected: headers="$(cd *.def) *.h \
> ../../../../../../../work-shared/gcc-10.1.0-r0/gcc-10.1.0/gcc/../include/ansidecl.h \
> ... 
> As the patch says,
> "The PLUGIN_HEADERS is too long before sort, so the "echo" can't handle it, ..."
> my suggestion is that we can simply take care of PLUGIN_HEADERS:
> 
> - headers=`echo $(PLUGIN_HEADERS) $$(cd $(srcdir); echo *.h *.def) | tr ' ' '\012' \
> | sort -u`; \ + headers=`echo $(sort $(PLUGIN_HEADERS)) $$(cd $(srcdir); echo *.h \
> *.def) | tr ' ' '\012' | sort -u`; \

Thanks for the report, I've submitted and later merged a patch to fix it.

Cheers,

Richard



-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#141085): https://lists.openembedded.org/g/openembedded-core/message/141085
Mute This Topic: https://lists.openembedded.org/mt/75804103/4454766
Group Owner: openembedded-core+owner@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub  [openembedded-core@marc.info]
-=-=-=-=-=-=-=-=-=-=-=-


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic