-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Enable rust powerpc-unknown-linux-gnuspe for qoriq #5879
Conversation
@hgy59 Heads-up, this should create packages with full debug_symbols enabled and thus help with gdb to analyze core dumps with a lot more details. Note that I enabled it on both e.g. feel free to add additional arches you may want to play with, or unlimit unconditionnaly as you see fit. EDIT: I'll try to figure out how to build |
I am working on this (needs patches to build sim/ppc/) |
@hgy59 I did find a patch to fix building of gdb-7.12.1. Although what is really really weird is that I can build it from I was finally able to figure out why (now needs to know how to fix it). When it goes into the
The end-result way later on is that build-config.h is then missing:
As at the end of What I ended-up doing is commenting out the tmpdir removal from that configure script:
Which allowed me to keep track of the real error hapening in background:
Now why you ask it does not work? Simple, while testing the "build" compiler it includes the "target" flags which includes Now the question is, how to fix that? EDIT: I've contacted the gdb mailing list in hope for help https://sourceware.org/pipermail/gdb/2023-September/050897.html |
exactly my findings.... (didn't try diyspk and in spk/synocli-devel I thought it depends on the build order of dependen packages) where did you get the patch from? (I created my own). |
Backported from https://738272.bugs.gentoo.org/attachment.cgi?id=655808 |
This must have something to do with the MAKELEVEL (or include of makefiles), as it fails to build in the first difference in the configure output is
gdb/diyspk/spk folder:
The working version finds Only the evaluation of ld tool differs:
gdb/diyspk/spk folder:
Does this sound like toolchain specific handling ( |
@hgy59 I was exactly at that same point until I read this https://scm.linefinity.com/common/openwrt/commit/079d57b0f290a79c9dbc013b6e9c83cebf8a2f99 which at first looked unrelated but it does allow it to build, fully, on both gdb-7.12.1 and gdb-13.2. I've now created a separete PR for the What remains to be confirmed is, is it ok to disable sim on ppc? |
@th0ma7 I just created a patch to build sim/ppc, but don't know whether it is broken anyway. EDIT: |
I am totally new on this, but I thought that with the simulator we might try to find the qoriq crash on x64 or other archs. |
If that works out then excellent! As long as we have a working solution. Still, more I read and less I believe the ppc simulator is actually needed anyway. @hgy59 I wonder, shouldn't this be |
No, |
@th0ma7 sim/ppc is broken in cross/gdb-latest (i.e. 13.2) (but builds fine in cross/gdb-7.12)
|
Indeed, and note that I am relatively new as well to this. But using this train of thought (and if I get this right), you would need to build gdb for your x86_64 linux that includes the ppc simulator so you can reproduce that locally. Where you would enable My theory is that in the current case, having a ppc simulator on a ppc build is most probably useless. Still, I've checked and when it builds from |
@hgy59 now rebased against master. resulting github-action results should now reflect our actual needs. |
@hgy59 interestingly, enabling
I still presume this is openssl related... perhaps it's missing a few options specifically for ppc? |
the final error is:
So this can probably be fixed by disabling optimization (at least the lto optimizer). EDIT: |
just wondering, didn't you have to disable optimization for the debug symbols? |
Not that I'm an expert in this but this explanation from Bard may assist with debugging:
|
IMHO it is eather a 32-bit or endianess problem (or both).
|
I tried adding
nope I did not... question is, lto breaks qoriq when optimized with debug_info symbols... Could it be broken for PPC with py311.x release? EDIT: actually, initially I did not but with this new commit now by default it does disable
|
@hgy59 I've rebased against master to get rid of the conflict but forgot it would reset the PR state... In any case, for reference, the last sucessfull github-action run is available here https://github.com/SynoCommunity/spksrc/actions/runs/6188300522?pr=5879 |
I'm wondering (and unrelated to this topic), should we (re)-publish all DSM-6.2.4 toolchains on github, just in case? Or directly on our synocommunity.com server ... As this is pretty much the last bits standing on sourceforge and note that dsm-6.2.4 is no longer supported got out recently (eol october 2024): |
@th0ma7 I aleady have a local backup of all 6.2.4 toolchains to be prepared to put those to github. Unfortunately I missed some toolchains to backup before January 1 2023 when synology removed all but the DSM 6.2.4 from sf.net.
But I have some 4.2 and 5.2 toolchains in my archive. |
Again @hgy59 thnx for the upload of the toolchain, my initial testing seems to be working all-right. Other than that, I believe I'm now done and would appreciate a code review as I've certainly missed something. EDIT: Also note that this change now includes a new variable |
When called from cross or spk usage of $(ARCH) When called from toolchain: - Usage of $(TC_ARCH) when $(TC_NAME) does not exist - Usage of $(TC_NAME) for generic archs
There was a tricky part to play with relatively to |
@hgy59 and all, last round for comments. I intent to clean-up the package build change to enforce builds and merge to master in no time. Thnx in advance. |
@SynoCommunity/developers |
@th0ma7 now on the master branch, I want to recreate the rust stage2 toolchain for qoriq. Is it correct that I have to replace |
Exactly. You'll notice that the |
@hgy59 suggestion, if you could add at the end of the build your exact tar command so it generates a package ready for publishing online on github later-on would be nice and facilitate subsequent updates (if any is ever needed). |
I have successfully built it. Unfortunatley it is not possible to move the existing tag to create the same release with the related commit on the master branch. The command to create the archive is:
sorry I'll be offline for some days... |
Description
powerpc-unknown-linux-gnuspe
rust toolchain for properly supportingqoriq
archdebug_symbols
for qoriq (and x64 to help diagnosing) - TEMPORARYHelps debugging #5684 and #5847
Fixes #
Checklist
all-supported
completed successfullyType of change
Objective
Objective is when building not getting
lwsync
:Additional Change(s)
Introduction of
$(ADDITIONAL_RUSTFLAGS)
that allows passing, well, additional flags to rustc at build time, similarly to other existing flags.