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

Build architecture specific setjmp .S code more efficiently, reduce liklihood of Gnu ld error #3926

Conversation

LeeTibbert
Copy link
Contributor

@LeeTibbert LeeTibbert commented May 21, 2024

A better and stronger way to fix #3916

  • Consolidate the four architecture specific setjmp .S files into one. That means that the single file
    presented to the compiler will always contain meaningful code (or an unsupported OS). This
    does away with 'throw-away' compilations and empty .o files which take up hundreds of bytes.

  • Ensure that the new setjmp.S file has a guarded section at the end to ensure that the compiler
    always generates a .note.GNU-stack section when using a Linux compiler with ELF output .

  • I did_not check the various "unwind.S" files because I have never seen ld.bfd complain
    about them. They may be an issue there.

@LeeTibbert
Copy link
Contributor Author

LeeTibbert commented May 21, 2024

No changes to docs, yet doc build fails. Bad vibes & intermittent failures abound in CI tonight.
Time to end this sprint and check it by the light of day.


Next morning:

The build retry mechanism is wonderful. My many thanks to the implementer.

Woke up this morning and the build is all green, great! Life is good.

Copy link
Contributor

@natsukagami natsukagami left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, it definitely is a bit more annoying to have to maintain a single Assembly file (of all languages ;) ) with code of all architectures... But it cuts down a lot of annoyances on the user side, so I'm for it. Thanks!

@WojciechMazur WojciechMazur merged commit 638369a into scala-native:main May 21, 2024
61 checks passed
@LeeTibbert
Copy link
Contributor Author

LeeTibbert commented May 21, 2024

natsukagami

Thank you for the review & sign-off.

You are being kind/restrained using the word "annoying". It is a hack which not even an author could love.

Ugly as it is, I think the architecture tests within it have grown shaggy/borderline-un-intelligible. Perhaps
having them in one place will lead to some consolidation & purification.

Not to get too far off topic, how is your continuations work coming along?

I was doing some work the other day and began to think: I wonder if this is the kind of place were
continuations might apply.

Cheers,

L.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

delimcc/setjmp_amd32 compilation defect
3 participants