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

extra-bundled-libraries shouldn't use hsLibraries #8701

Open
bgamari opened this issue Jan 26, 2023 · 1 comment
Open

extra-bundled-libraries shouldn't use hsLibraries #8701

bgamari opened this issue Jan 26, 2023 · 1 comment

Comments

@bgamari
Copy link
Contributor

bgamari commented Jan 26, 2023

Describe the bug
In GHC#22564 we noted that users of Cabal's extra-bundled-libraries field are saddled with the unfortunate requirement of naming their native libraries with a rather ad-hoc libC prefix (specified in the Cabal reference documentation).

This requirement is due to the strange implementation of extra-bundled-libraries: "bundled" libraries are added to the hsLibraries field of InstalledPackageInfo, leaving GHC's runtime linker with an ambiguity regarding whether the library is a Haskell object (in which case it may need a "way" suffix in its name) or native object. The required libHS/libC prefix exists merely to allow the linker to resolve this ambiguity.

IMHO it would be much better if extra-bundled-libraries were instead implemented in terms of a new InstalledPackageInfo field, eliminating the ambiguity by construction.

(this was originally filed as GHC#22732

@Mikolaj
Copy link
Member

Mikolaj commented Jan 30, 2023

I assume GHC is ready for this change (since which version? do we need any hacks backward compatibility?) so PR is welcome and can be immediately tested.

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

No branches or pull requests

3 participants