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

Added rules for DLLs from MSYS2. #2315

Draft
wants to merge 28 commits into
base: master
Choose a base branch
from

Conversation

Paebbels
Copy link
Member

@Paebbels Paebbels commented Jan 13, 2023

This PR tries to solve #2314.

@tgingold
Open questions:

  • How to enable standalone mode?
    ⇒ Use a separate make target called standalone
    ⇒ add --enable-standalone/--disable-standalone to ./configure as well as some install.mcode.libs.true/install.mcode.libs.false and uninstall.mcode.libs.true/uninstall.mcode.libs.false targets.
  • How to get the GNAT major version?
    This version number is used in the DLL filename.
    ⇒ use a glob pattern like libgnat-*.dll. In MSYS2, only one version is installed. No parallel versions exist.
  • How to get the LLVM major version?
    This version number is used in the DLL filename.
    ⇒ use a glob pattern like libLLVM-*.dll. In MSYS2, only one version is installed. No parallel versions exist.
  • How to distinguish 32-bit MSYS2 environments (here MinGW32) from 64-bit environments (MinGW64 or UCRT64).
    One environment uses dw2 the other seh exception handling.
    ./configure is used to derive LIBGCC_KIND from build variable.
  • How to check if standalone is used with non mcode backends.
  • How to check if standalone is not used with MSYS2.
    → Maybe check against build variable?

@Paebbels Paebbels added Backend: mcode GHDL using in-memory code generation Build: MinGW (Makefile) Building GHDL using makefiles in MinGW32, MinGW64 or MSYS2 environments Arch: amd64 Alternative: x86-64, Intel 64 (EM64T) labels Jan 13, 2023
@Paebbels
Copy link
Member Author

I saw, you're using some true/false flags via make target names. Maybe it would be cleaner to not add a new make target, but offer a configure option like --standalone, which then sets a true/false.

@Paebbels
Copy link
Member Author

The latest commit contains this:

  • --enable/--disable-standalone.
  • new variable LIBGCC_KIND in configure derived from build.

I'm now locally testing. I assume we should add a check if standalone is used with another backend than mcode and if not used in MSYS2.

@tgingold
Copy link
Member

I have created #2320 to add new makefile targets.

Should we rewrite Test.yml to build standalone windows packages without reusing the pacman package ?
Or also create the standalone windows packages while creating the msys packages ?

@Paebbels
Copy link
Member Author

Should we rewrite Test.yml to build standalone windows packages without reusing the pacman package ?

The current solution for packaging standalone mcode variants is a "dirty hack" I made with @umarcor. We used MSYS2 packages, because they contain all needed files, so we didn't need to figure out what to repackage for standalone.

So we used that package, installed it, added die DLLs and then packaged it again as ZIP.

If we could install GHDL mcode directly including DLLs and use this directory for creating a ZIP file, it would simplify a lot and reduce CI job dependencies.

@tgingold
Copy link
Member

tgingold commented Jan 14, 2023 via email

(cherry picked from commit 8853d4b3ddd84ed06e33c4902b24e6784915709e)
(cherry picked from commit bd3191d87cb3ae599c41f6e4363d5a3930a34355)
(cherry picked from commit 8fd2965191f3484bdf960e0ef08df6da04c41647)
(cherry picked from commit fdfe104531660a91c6d3b107a14d572b2333d5bc)
(cherry picked from commit b783c9f8834116da368cbcb69667b3b88bca7d1f)
(cherry picked from commit f779b5c59499f8d3b3ba5cad48cb1001bc02e656)
(cherry picked from commit 7616d44a65bc20e504278390f986ada25e6ff2a1)
(cherry picked from commit e7e4844d52d72ba17761858ef2a32be4024724ba)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Arch: amd64 Alternative: x86-64, Intel 64 (EM64T) Backend: mcode GHDL using in-memory code generation Build: MinGW (Makefile) Building GHDL using makefiles in MinGW32, MinGW64 or MSYS2 environments
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants