sdk-ng icon indicating copy to clipboard operation
sdk-ng copied to clipboard

microblaze: pull in gcc/bintuils/gdb patches from meta-xilinx

Open alpsayin opened this issue 1 year ago • 9 comments

~This commit pulls in the fix for the Microblaze gcc atomic compare-and-swap issue where atomic cas returns the inverse Boolean value of what it should. https://github.com/zephyrproject-rtos/gcc/pull/21~

These patchsets fixes many known issues on gnu-toolchain for microblaze. But mainly the atomic-cas and binutils incorrect relocation issues. Patches obtained from https://github.com/xilinx/meta-xilinx/ repository,

Fixes https://github.com/zephyrproject-rtos/sdk-ng/issues/646 and https://github.com/picolibc/picolibc/issues/460 and other yet-to-be-seen issues.

I've given up and disabled microblaze64 toolchain build. meta-xilinx patches somehow manage to break the same toolchain that they introduced. I have no intention to support microblaze64 yet and this saves a few CI cycles.

Finally; if/when AMD/Xilinx software group manages to upstream these to gnu-gcc, the squashed commits in individual repositories should provide an easy transition (revert and rebase) when it's time to upgrade zephyr-gcc.

CC @keith-packard

alpsayin avatar Mar 13 '23 17:03 alpsayin

I think the whole series of pending microblaze fixes should be added here, not just one of them.

keith-packard avatar Mar 13 '23 21:03 keith-packard

I think the whole series of pending microblaze fixes should be added here, not just one of them.

Sorry, I've been busy with work. I'll make use of the holidays now and start applying. I have some catching up to do...

alpsayin avatar Apr 07 '23 18:04 alpsayin

Tried to apply all patches I could find in binutils as the 1st step. Came across various conflicts. Tried to solve them naively but it seems I failed. Will have to approach this a bit more clever.

alpsayin avatar May 24 '23 11:05 alpsayin

I'll be damned. Binutils patches applied cleanly with https://github.com/zephyrproject-rtos/sdk-ng/commit/464c189ef7f513cadfad4fcd8e5ddaa3f7ceae0a With the toolchain built in https://github.com/zephyrproject-rtos/sdk-ng/actions/runs/5068098583 , all Zephyr tests passing except builds for picolibc. Using this sdk-ng I also face the same issues as reported before in https://github.com/picolibc/picolibc/issues/460 . I'm now trying to build only with the GCC fix in https://github.com/zephyrproject-rtos/gcc/commit/b4654fbf3eee0e7d277ed3072adb1d3011f22180 so that I can have a trusted base from which I can continue to apply binutils and gcc patches.

alpsayin avatar May 24 '23 17:05 alpsayin

GCC and binutils patches applied successfully but GDB patches are problematic. I'm working on it.

alpsayin avatar Jun 23 '23 11:06 alpsayin

Started

  • [x] https://github.com/zephyrproject-rtos/gcc/pull/24
  • [ ] https://github.com/zephyrproject-rtos/binutils-gdb/pull/10
  • [x] https://github.com/zephyrproject-rtos/binutils-gdb/pull/11

Closed in favour of above.

  • [x] https://github.com/zephyrproject-rtos/gcc/pull/21

alpsayin avatar Oct 01 '23 21:10 alpsayin

CI building for the last time. I will confirm microblaze toolchain still passes all tests (Zephyr & picolibc) and mark this as "Ready for review". I expect no issues.

alpsayin avatar Oct 02 '23 22:10 alpsayin

Seen it, on it. Thank you!

alpsayin avatar Nov 13 '23 10:11 alpsayin