Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please pull-in Binutils tree with ARC64 changes based on 2.35.1 #447

Closed
abrodkin opened this issue Mar 21, 2022 · 9 comments
Closed

Please pull-in Binutils tree with ARC64 changes based on 2.35.1 #447

abrodkin opened this issue Mar 21, 2022 · 9 comments
Assignees
Labels
area: Toolchain Issues related to Toolchain (Binutils+GCC+GDB+libs) enhancement

Comments

@abrodkin
Copy link
Collaborator

@stephanosio here you may find a tag/snapshot of the sources used in SDK-ng 0.13.0 via #327.

Also note (as indicated in the aforementioned PR) that particular snapshot is only good for building ARC64 as code was not yet properly merged with ARCv2. I.e. we need to use upstream vanilla 2.35.1 for ARCv2 and that tag for ARC64.

Once you pull-in that tag/branch I'll post a PR for SDK-ng which uses that for ARC64.

But looking forward we'll be able to use the same sources for all ARC flavors and we've goth ARC64 merged with ARCv2 (ARC HS, ARC EM) a while ago, but that code is based on GCC 11.x.

Or maybe we use SNPS GitHub repo similar to QEMU so that we don't need to sync things up every now and then?

@stephanosio
Copy link
Member

stephanosio commented Mar 21, 2022

We are already pulling in the ARC64 patch with the new scheme (special exception made for ARC64):

CT_BINUTILS_SRC_DEVEL=y
CT_BINUTILS_DEVEL_URL="https://github.com/zephyrproject-rtos/binutils-gdb.git"
CT_BINUTILS_DEVEL_REVISION="c7d30a54fc17c1e9d9b1c39c7623222442c63af8"

CT_LOCAL_PATCH_DIR="${CT_TOP_DIR}/../../patches-arc64"

Patch: https://github.com/zephyrproject-rtos/sdk-ng/tree/main/patches-arc64/binutils

Or maybe we use SNPS GitHub repo similar to QEMU so that we don't need to sync things up every now and then?

QEMU was a special case because we do not/will likely not have global Zephyr-specific patches for it.

As for Binutils and GCC, we plan to implement the arch-*-zephyr targets as per #350 and we would not want to patch/rebase onto the Synopsys repo whenever we update the Zephyr targets. That is rationale behind going with single codebase rather than per-arch codebase.

p.s. is there a branch somewhere that has the ARC64 binutils patch that does not break ARCv2? If so, then we can pull that into https://github.com/zephyrproject-rtos/binutils-gdb/tree/zephyr-binutils-2_35_1 (or if it is based on a more recent version of binutils, we can look into upgrading the binutils for the Zephyr SDK).

p.s.2. also has there been any progress made in getting the ARC64 gdb working?

@stephanosio
Copy link
Member

@abrodkin ping

@abrodkin
Copy link
Collaborator Author

@stephanosio ooops missed your question in the end.

We do have now both GCC & Binutils sources with properly integrated ARCv3 code (i.e. the same source tree meant to be used for both ARCompact/ARCv2 & ARCv3). E.g. Binutils/GDB tree is here https://github.com/foss-for-synopsys-dwc-arc-processors/binutils-gdb/tree/arc64. But it is now based on top of the very recent Binutils/GDB upstream sources (https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=0b35f123c200522998a81335dc218551ca7b3d92).

And I need to check how hard it might be to back-port ARCv3 changes on top of the most recent upstream releases of both Binutils & GDB. @shahab-vahedi @cupertinomiranda could you guys please comment on that feasibility?

@stephanosio
Copy link
Member

stephanosio commented Mar 25, 2022

But it is now based on top of the very recent Binutils/GDB upstream sources

If that is the case, how about we wait a few months before doing that?

There is a plan to update Binutils/GCC/GDB in the 2022 H1 (#409).

@stephanosio
Copy link
Member

Based on #409, the backport target versions should be:

  • Binutils 2.38 (already released)
  • GCC 12.1 (scheduled for April 2022)
  • GDB 12.1 (likely to be released in June 2022) or 11.2 (if 12.1 gets delayed)

@abrodkin
Copy link
Collaborator Author

Well, my main rationale for ARC tools update sometime soon is a need to have HS5x (ARCv3 32-bit processors as opposed to 64-bit HS6x) support which is not there in what we have in the SDK-ng 0.13.x-0.14.1. And that in its turn is a prerequisite for adding HS5x support in upstream Zephyr, which we'd really like to get into v3.1 as it's been functionally ready for quite some time and @evgeniy-paltsev was about to start publishing PR's with that support in Zephyr RTOS.

Sorry for all that mess ;)

@stephanosio
Copy link
Member

@abrodkin Do we need both Binutils and GCC update for HS5x? or Binutils only?

@abrodkin
Copy link
Collaborator Author

@stephanosio we do need both as back in the day (almost a year ago) HS5x support was not added anywhere, sorry.

@stephanosio stephanosio added area: Toolchain Issues related to Toolchain (Binutils+GCC+GDB+libs) enhancement labels Mar 31, 2022
@stephanosio
Copy link
Member

Closing in favour of #409

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Toolchain Issues related to Toolchain (Binutils+GCC+GDB+libs) enhancement
Projects
None yet
Development

No branches or pull requests

2 participants