Skip to content

Managing the upstreaming of libgccjit patches #8

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

Closed
davidmalcolm opened this issue May 20, 2021 · 11 comments
Closed

Managing the upstreaming of libgccjit patches #8

davidmalcolm opened this issue May 20, 2021 · 11 comments

Comments

@davidmalcolm
Copy link

Readme.md currently states that two libgccjit patches are needed, but judging by the patches you've been sending me for review I'm guessing that that's currently out of date.

Idea: have a "gcc-patches" subdirectory, containing the patches to libgccjit currently needed to build the project. Ideally the subdirectory will eventually become empty as all the support is merged into the gcc source tree, but it at least documents exactly what you're building against (and the readme probably should document exactly which revision of the gcc tree you're patching). It may help with CI, and also gives me a good at-a-glance way of seeing if I have anything of yours I need to review.

@antoyo
Copy link
Contributor

antoyo commented May 21, 2021

Yup, I wanted to send all the patches I had before updating it (I just sent you the last one).

Sure, I will add the patches in a subdirectory in the following days.
Edit: The patches were added: they will obviously conflict with one another, but should be easy to fix.

CI won't pass anything soon since I have many bugs to fix and features to implement.

Were you asking because you tried running this?

@antoyo
Copy link
Contributor

antoyo commented May 21, 2021

Also, I'm not sure if it would against gcc policies, but I could open PRs here for those patches to do the reviews with an easier tool than email so that it's easier to keep tracks of what issues remain and those that are resolved (I'm having a hard time figuring that out, especially with my big patch that adds the reflection API).

When all issues are solved, we could then post the patch to the gcc mailing list for a final review by other people.

What do you think?

@davidmalcolm
Copy link
Author

Yup, I wanted to send all the patches I had before updating it (I just sent you the last one).

Sure, I will add the patches in a subdirectory in the following days.
Edit: The patches were added: they will obviously conflict with one another, but should be easy to fix.

Thanks. I see that all of them are of the form "0001-*.patch" so it's not clear what order they go in. I was more thinking a git format-patch master so that it emits all of the patches in numbered order in a form that "git am" can apply.

But it might make more sense to instead have the readme point people at a fork of https://github.com/gcc-mirror/gcc with a branch holding the patches that are needed, so that it's trivial to see what patches still need to be merged into gcc upstream. That would probably be easier for you and other people to work with.

Are you also using a forked copy of the libgccjit rust bindings? If so, maybe that should be published too, and linked to from the readme.

CI won't pass anything soon since I have many bugs to fix and features to implement.

Were you asking because you tried running this?

I did try (and failed) a few months ago. My question was more about making it easy to see what patches I need to review. You seem to be doing a great job of finding bugs and features that libgccjit doesn't implement yet, so I expect that there will be a few more patches along the way.

Hope this is constructive

@antoyo
Copy link
Contributor

antoyo commented May 23, 2021

Are you also using a forked copy of the libgccjit rust bindings? If so, maybe that should be published too, and linked to from the readme.

Yes, this is in the Cargo.toml file.

I added my fork of gcc in the readme.

@antoyo antoyo closed this as completed May 23, 2021
@antoyo
Copy link
Contributor

antoyo commented May 26, 2021

By the way, I renamed the files so that they have different number prefixes: even though they cannot be applied on gcc master branch without conflicting, that will at least tell you the order in which they should be merged (which is important because they add different ABI numbers).

@antoyo
Copy link
Contributor

antoyo commented Jul 18, 2021

As requested for the inclusion into rustc, the patches were moved out of this repository and are now in this one.

GuillaumeGomez pushed a commit to GuillaumeGomez/rustc_codegen_gcc that referenced this issue Mar 25, 2024
…ister_to_gcc

Add missing mappings from register classes to dummy output types
@eternal-sorrow
Copy link

So? What's the status here? Were the patches upsteamed? Is it possible to build it with the upstream libgccjit? If not, why the issue is closed?

@antoyo
Copy link
Contributor

antoyo commented Jun 12, 2024

This issue was opened by the maintainer of libgccjit in order to find a way to have a list of patches that were sent for review and that way was found, so that's why the issue is closed.

The patches weren't merged upstream yet.
rustc_codegen_gcc has a feature master that you can disable which will allow you to build this project with libgccjit 12, but with a few missing features.

@eternal-sorrow
Copy link

Is there any way to track the progress of the patches being merged upstream? Some mailing list thread maybe?

@antoyo
Copy link
Contributor

antoyo commented Jun 12, 2024

This page will list most of them (I believe there's one or 2 missing, not sure why).

@eternal-sorrow
Copy link

Thanks.

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

No branches or pull requests

3 participants