[Hackage] #295: ld-options parsing treats , as separator

#295: ld-options parsing treats , as separator ----------------------------+----------------------------------------------- Reporter: duncan | Owner: Type: defect | Status: new Priority: normal | Milestone: Cabal-1.4 Component: Cabal library | Version: HEAD Severity: normal | Keywords: Difficulty: normal | Ghcversion: 6.8.2 Platform: | ----------------------------+----------------------------------------------- Say we've got X11.buildinfo.in: {{{ ld-options: @X_LIBS@ @LDFLAGS@ }}} and imagine that someone has all kinds of crazy `LDFLAGS`: {{{ LDFLAGS="-Wl,-O1 -Wl,--sort-common -Wl,--hash-style=gnu -Wl,-z,relro -Wl ,--as-needed -Wl,-z,now" }}} Can you guess what happens? We end up parsing that as: {{{ ldOptions = ["-Wl", "-O1", "-Wl", "--sort-common", "-Wl", "--hash-style=gnu", "-Wl", "-z", "relro", "-Wl", "--as-needed", "-Wl", "-z", "now"] }}} This is because the parser for the `ld-options` field is defined using `listField` which uses `parseOptCommaList` which uses space and `','` as value separators. We should use just spaces for this field and also for `cc-options` and `cpp-options`. If we make this change we'll have to check that we're not going to break things for existing .cabal files that might use ',' as a separator. Will require an audit of .cabal files on hackage. -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/295 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#295: ld-options parsing treats , as separator
----------------------------+-----------------------------------------------
Reporter: duncan | Owner:
Type: defect | Status: closed
Priority: normal | Milestone: Cabal-1.4
Component: Cabal library | Version: HEAD
Severity: normal | Resolution: fixed
Keywords: | Difficulty: normal
Ghcversion: 6.8.2 | Platform:
----------------------------+-----------------------------------------------
Changes (by duncan):
* status: new => closed
* resolution: => fixed
Comment:
Turns out all existing .cabal files are fine, none use `,` as a separator
in any of the fields `cpp-options`, `cc-options` or `ld-options`. We can
assume that configure scripts that write `.buildinfo` files do not use it
as a separator since they're written by shell scripts which use space as a
token separator and also because they're likely getting these options from
some tool which would generate them in a format suitable to pass direct to
gcc.
{{{
Tue Jul 29 18:05:56 BST 2008 Duncan Coutts
participants (1)
-
Hackage