Closed abrodkin closed 3 years ago
...it would be good to upstream it, but that will obviously require us to do much more changes.
For the record, that patch is not acceptable upstream. No matter how much effort is put there. In that sense, the real effort must be put on making MWDT produce more standard DWARF data.
Regarding the ifdef
s, we're on the same page.
@abrodkin merged, thanks.
What was the resolution here ? Where and what got merged ?
I guess we should start tagging the issues as being from GDB, LD or AS as well, as it would make it much more easy understand context.
@cupertinomiranda there's no resolution yet. @shahab-vahedi is going to wrap our non-upstreamable changes into ifdefs to make them non-visible to other arches. And I guess @temap really meant to close after merge this PR for our CT-NG: https://github.com/foss-for-synopsys-dwc-arc-processors/crosstool-ng/pull/1.
As for labeling - it's a good idea. We do it in toolchain issues but here we never needed those and now maybe it's time to add it here.
The obvious approach here would be to use #if
guards. However, this will not fully work, because one can configure
GDB as such to support multiple targets, e.g. configure --target=arc-elf32 --enable-targets=arm-elf32,sparcs-elf32 ...
.
According to @claziss probably the ARCH_arc
macro can be used for this hack.
@shahab-vahedi I guess that case of adding multiple targets while may exist, but I'm not aware of such cases, people just build multiple GDB versions. That said the most important would be to separate ARC target from all the rest.
You know CrossNG better than I. In GDB development, it happens all the time to make sure that a change does not break other targets. In the end, they run tests for that all-purpose gdb.
The latest patch updates the aarch64-tdep.c
file as well. So the build should go OK.
As of today our changes for MWDT compatibility (generic code changes & ARC-only changes) if applied won't allow to use the same sources to be built for any architecture but ARC. The following error appears:
That means we cannot have that patch set in upstream projects (like Crosstool-NG) even as an off-the-tree patches. But if we wrap changes we need in ifdefs that will allow to use these patches much more relaxed.
For example I managed to post all our GDB backports to CT-NG (see https://github.com/crosstool-ng/crosstool-ng/commit/8099a7475083e04429990c53cd490cda9eb63d68, via https://github.com/crosstool-ng/crosstool-ng/pull/1595) but had to exclude aforementioned patches.
Well, ideally it would be good to upstream it, but that will obviously require us to do much more changes.