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

Duplicate passing of gcc-options #10788

Open
jasagredo opened this issue Feb 9, 2025 · 0 comments
Open

Duplicate passing of gcc-options #10788

jasagredo opened this issue Feb 9, 2025 · 0 comments

Comments

@jasagredo
Copy link
Collaborator

Describe the bug

I like having these in my cabal config to suppress some warnings:

  gcc-options: -Wl,--allow-multiple-definition -Wno-pragma-pack -Wno-macro-redefined -Wno-missing-declarations

Building with verbose output shows that cabal duplicates these options when calling the C compiler:

$ cabal build -v3 | grep allow
...
["act-as-setup","--build-type=Simple",...,"--gcc-option=-Wl,--allow-multiple-definition","--gcc-option=-Wno-pragma-pack","--gcc-option=-Wno-macro-redefined","--gcc-option=-Wno-missing-declarations","--gcc-option=-Wl,--allow-multiple-definition","--gcc-option=-Wno-pragma-pack","--gcc-option=-Wno-macro-redefined","--gcc-option=-Wno-missing-declarations","--ghc-option=-hide-all-packages",...]
--gcc-option=-Wl,--allow-multiple-definition --gcc-option=-Wno-pragma-pack
--gcc-option=-Wl,--allow-multiple-definition --gcc-option=-Wno-pragma-pack
...
Running: "C:\ghcup\ghc\9.6.6\lib\../mingw/bin\clang.exe" ... "-Wl,--allow-multiple-definition" "-Wno-pragma-pack" "-Wno-macro-redefined" "-Wno-missing-declarations" "-Wl,--allow-multiple-definition" "-Wno-pragma-pack" "-Wno-macro-redefined" "-Wno-missing-declarations"

Cabal used: 3.14

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

1 participant