[PATCH] tools: always create $STAGING_DIR/usr/{include,lib}

Matthias Schiffer mschiffer at universe-factory.net
Mon Aug 24 14:39:08 EDT 2020


On 8/24/20 7:56 PM, Paul Spooren wrote:
> 
> On 24.08.20 00:55, Jo-Philipp Wich wrote:
>> Hi,
>>
>>> rules.mk always passes these as -I/-L to the toolchain.
>>>
>>> Fixes rare errors like:
>>> cc1: error: staging_dir/target-aarch64_cortex-a53_musl/usr/include: No
>>> such file or directory [-Werror=missing-include-dirs]
>>>
>>> Signed-off-by: Andre Heider <a.heider at gmail.com>
>> NAK - I'd prefer if we remove the faulty/redundant/unused include paths
>> from rules.mk instead.
> 
> Isn't that breaking some packages which currently use `/usr/lib`?
> 
> packages.git/boost:
> https://github.com/openwrt/packages/blob/e2e152da599ceeacf06b4a045b5b391107d194df/libs/boost/Makefile#L485


Pretty much all packages stage into staging_dir/target-*/usr - I don't
think there are any -I/-L flags we can remove.

As toolchain-provided headers are installed to a separate staging
directory, it is conceivable that with sufficiently bad luck a package that
sets -Werror=missing-include-dirs is built before the first package is
staged. Creating these directories in PrepareStaging seems like a good
solution to me.



Side note:

Package/*/install takes care of installing files for creating opkg
packages; this are irrelevant for staging. For staging_dir, the sections
Host/Install and Build/InstallDev are relevant (in the case of
staging_dir/target-..., the latter). This also happens in the file Paul
referenced, just not in the line he highlighted.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.openwrt.org/pipermail/openwrt-devel/attachments/20200824/805fe2a3/attachment.sig>


More information about the openwrt-devel mailing list