[OpenWrt-Devel] GCC 7.4.0 ld LTO plugin issues with SDK
Daniel F. Dickinson
cshore at thecshore.com
Thu Jan 3 02:21:06 EST 2019
On 2019-01-02 8:58 p.m., Daniel F. Dickinson wrote:
> On 2019-01-02 3:06 p.m., Daniel F. Dickinson wrote:
>> Hi,
>>
>> With the SDK I'm getting errors with LTO -- at least for json-c LD is
>> trying to load the *target's* LTO plugin instead of host.
>>
>> 7.4.0_musl_eabi/bin/../libexec/gcc/arm-openwrt-linux-muslgnueabi/7.4.0/liblto_plugin.so:
>> error loading plugin:
>> /home/daniel/Build/openwrt-sdk/cshoredwrt-sdk-19.01-1-brcm2708-bcm2708_gcc-7.4.0_musl_eabi.Linux-x86_64/staging_dir/toolchain-arm_arm1176jzf-s+vfp_gcc-7.4.0_musl_eabi/bin/../libexec/gcc/arm-openwrt-linux-muslgnueabi/7.4.0/liblto_plugin.so:
>> invalid ELF header
> So it turns out that for the SDK that it turns libraries into
> library.bin and the original *.so* becomes a bash script. Apparently
> GCC doesn't like that, at least for it's own plugins.
Ok, building the SDK on Debian 9 solves the issue. The SDK built on
Ubuntu 18.10 has the issue even if used on Debian 9, so it's the
building of the SDK where the issue, whatever it is, occurs. As I have
a handy Debian VM I'm not going to worry too much about it at the
moment, unless there is a patch someone needs me to test.
Regards,
Daniel
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list