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

Provide a stable ABI python3.dll #147

Closed
lazka opened this issue Aug 19, 2023 · 2 comments · Fixed by #148
Closed

Provide a stable ABI python3.dll #147

lazka opened this issue Aug 19, 2023 · 2 comments · Fixed by #148

Comments

@lazka
Copy link
Member

lazka commented Aug 19, 2023

See https://docs.python.org/3/c-api/stable.html#stable-application-binary-interface

This is currently handled here: https://github.com/python/cpython/blob/main/PC/python3dll.c

which I'm not sure how to translate to a mingw-w64 toolchain.

@Biswa96
Copy link

Biswa96 commented Aug 19, 2023

What would you like to use to translate that to a mingw-w64 toolchain - a DEF file, dllexport attribute or with other compiler/linker flag?

@lazka
Copy link
Member Author

lazka commented Aug 19, 2023

It looks like we might be able to do it with inline assembly:

// python3dll.c
 asm (".section .drectve\n\t.ascii \" -export:_Py_EllipsisObject=\\\"python3.11.dll._Py_EllipsisObject\\\" ,DATA\"");
$ gcc -shared -o python3.dll python3dll.c -Wl,--out-implib,libpython3.dll.a

lazka added a commit that referenced this issue Aug 22, 2023
This provides the limited ABI as a separate DLL, forwarding to the
real one. This makes linking with "-lpython3" work.

Fixes #147
lazka added a commit that referenced this issue Aug 25, 2023
This provides the limited ABI as a separate DLL, forwarding to the
real one. This makes linking with "-lpython3" work.

Fixes #147
lazka added a commit that referenced this issue Aug 27, 2023
This provides the limited ABI as a separate DLL, forwarding to the
real one. This makes linking with "-lpython3" work.

Fixes #147
lazka added a commit that referenced this issue Oct 2, 2023
This provides the limited ABI as a separate DLL, forwarding to the
real one. This makes linking with "-lpython3" work.

Fixes #147
lazka added a commit that referenced this issue Oct 2, 2023
This provides the limited ABI as a separate DLL, forwarding to the
real one. This makes linking with "-lpython3" work.

Fixes #147
lazka added a commit that referenced this issue Dec 6, 2023
This provides the limited ABI as a separate DLL, forwarding to the
real one. This makes linking with "-lpython3" work.

Fixes #147
lazka added a commit that referenced this issue Dec 7, 2023
This provides the limited ABI as a separate DLL, forwarding to the
real one. This makes linking with "-lpython3" work.

Fixes #147
lazka added a commit that referenced this issue Feb 10, 2024
This provides the limited ABI as a separate DLL, forwarding to the
real one. This makes linking with "-lpython3" work.

Fixes #147
lazka added a commit that referenced this issue Feb 12, 2024
This provides the limited ABI as a separate DLL, forwarding to the
real one. This makes linking with "-lpython3" work.

Fixes #147
lazka added a commit that referenced this issue Apr 11, 2024
This provides the limited ABI as a separate DLL, forwarding to the
real one. This makes linking with "-lpython3" work.

Fixes #147
lazka added a commit that referenced this issue Apr 12, 2024
This provides the limited ABI as a separate DLL, forwarding to the
real one. This makes linking with "-lpython3" work.

Fixes #147
naveen521kk pushed a commit that referenced this issue Aug 5, 2024
This provides the limited ABI as a separate DLL, forwarding to the
real one. This makes linking with "-lpython3" work.

Fixes #147
naveen521kk pushed a commit that referenced this issue Sep 9, 2024
This provides the limited ABI as a separate DLL, forwarding to the
real one. This makes linking with "-lpython3" work.

Fixes #147
lazka added a commit that referenced this issue Sep 10, 2024
This provides the limited ABI as a separate DLL, forwarding to the
real one. This makes linking with "-lpython3" work.

Fixes #147
lazka added a commit that referenced this issue Sep 10, 2024
This provides the limited ABI as a separate DLL, forwarding to the
real one. This makes linking with "-lpython3" work.

Fixes #147
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

Successfully merging a pull request may close this issue.

2 participants