lowRISC / lowrisc-toolchains

UNSUPPORTED INTERNAL toolchain builds
32 stars 14 forks source link

[meson] Fix GCC ld cross-configuration #28

Closed lenary closed 4 years ago

lenary commented 4 years ago

I don't quite know what's going on here, meson should raise an error with a good explanation if it tries to set the gnu linker to anything that isn't the exact string bfd, gold or lld and yet it just… doesn't? Instead you get "unable to find dynamic linker" with no useful error message, and a useless log.

Anyway, turns out I got #26 wrong. Selecting a linker is required for clang, but not for the gnu toolchain (because the gnu toolchain is built as one piece, not as a cross-compiler). So this change removes these lines in the gcc meson configuration.

I tested this by trying the HEAD build from 15 minutes ago, and then discovering that meson was totally hosed. Applying this fix sorts it out, once I debugged how meson was trying to find the linker version.

lenary commented 4 years ago

Performed both a clang build and a gcc build using the resulting combined toolchain, both succeeded on morty, which was the reason for doing these changes in #26. I'm going to merge now so we can tag a new release with this fix.

luismarques commented 4 years ago

I guess this is good for merging? If it works that way...

luismarques commented 4 years ago

Oh well, too late by 2 minutes :-)

lenary commented 4 years ago

Sorry :(