Adding gcc type options with cabal (e.g. -mno-cygwin)

Is there a way to pass misc options to the cabal, ghc process. I tried the following: extra-libraries: sqlite3 extra-lib-dirs: C:\cygwin\lib include-dirs: C:\cygwin\usr\include ghc-options: -mno-cygwin runhaskell Setup.lhs build --ghc-options=-mno-cygwin -v No dice, doesn't show up. -- Berlin Brown email: berlin-dot-brown-AT-gmail-dot-com http://botspiritcompany.com/botlist/

bbrown:
Is there a way to pass misc options to the cabal, ghc process.
I tried the following:
extra-libraries: sqlite3 extra-lib-dirs: C:\cygwin\lib include-dirs: C:\cygwin\usr\include ghc-options: -mno-cygwin
runhaskell Setup.lhs build --ghc-options=-mno-cygwin -v
ghc-options: -optc-mno-cygwin cc-options: -mno-cygwin or ghc-options: -O2 -Wall cc-options: -Wall or via the foo.buildinfo file. Ghc-options: -optc@CPPFLAGS@ Cc-options: @CPPFLAGS@ Writing a binding to sqlite3? -- Don

On Mon, 4 Feb 2008 14:24:12 -0800, Don Stewart wrote
bbrown:
Is there a way to pass misc options to the cabal, ghc process.
I tried the following:
extra-libraries: sqlite3 extra-lib-dirs: C:\cygwin\lib include-dirs: C:\cygwin\usr\include ghc-options: -mno-cygwin
runhaskell Setup.lhs build --ghc-options=-mno-cygwin -v
ghc-options: -optc-mno-cygwin cc-options: -mno-cygwin
or ghc-options: -O2 -Wall cc-options: -Wall
or via the foo.buildinfo file.
Ghc-options: -optc@CPPFLAGS@ Cc-options: @CPPFLAGS@
Writing a binding to sqlite3?
-- Don
Writing a binding to sqlite3?
No, one already exists. Trying to compile that one. My googling powers are crippled with haskell. I couldn't find how to add those options. Thanks for the quick response. -- Berlin Brown email: berlin-dot-brown-AT-gmail-dot-com http://botspiritcompany.com/botlist/

On Mon, 4 Feb 2008 17:27:30 -0500, bbrown wrote
On Mon, 4 Feb 2008 14:24:12 -0800, Don Stewart wrote
bbrown:
Is there a way to pass misc options to the cabal, ghc process.
I tried the following:
extra-libraries: sqlite3 extra-lib-dirs: C:\cygwin\lib include-dirs: C:\cygwin\usr\include ghc-options: -mno-cygwin
runhaskell Setup.lhs build --ghc-options=-mno-cygwin -v
ghc-options: -optc-mno-cygwin cc-options: -mno-cygwin
or ghc-options: -O2 -Wall cc-options: -Wall
or via the foo.buildinfo file.
Ghc-options: -optc@CPPFLAGS@ Cc-options: @CPPFLAGS@
Writing a binding to sqlite3?
-- Don
Writing a binding to sqlite3?
No, one already exists. Trying to compile that one. My googling powers are crippled with haskell. I couldn't find how to add those options.
Thanks for the quick response.
-- Berlin Brown email: berlin-dot-brown-AT-gmail-dot-com http://botspiritcompany.com/botlist/
I couldn't get hsql-sqlite (other unix libraries?) to compile on cygwin. I tried though. It looks like it is passing the option. The sqlite3 library is installed and setup. From googling, it looks there is an issue with compatibility between cygwin/ and whatever ghc was compiled with. But then again, I guess I could not try using cygwin? I built the library (sqlite3 under cygwin). Download ghc6.8.2 straight from the haskell.org. Creating dist\build (and its parents) Creating dist\build\autogen (and its parents) Preprocessing library hsql-sqlite3-1.7... Creating dist\build\Database\HSQL (and its parents) c:\projects\tools\home\projects\tmp3\ghc-6.8.2\bin\hsc2hs.exe --cc=c:\projects\t ools\home\projects\tmp3\ghc-6.8.2\bin\ghc.exe --ld=c:\projects\tools\home\projec ts\tmp3\ghc-6.8.2\bin\ghc.exe --cflag=-optc-mno-cygwin --cflag=-package --cflag= base-3.0.1.0 --cflag=-package --cflag=hsql-1.7 --cflag=-IC:\cygwin\usr\include - -lflag=-optl-LC:\cygwin\lib --lflag=-optl-lsqlite3 -o dist\build\Database\HSQL\S QLite3.hs Database\HSQL\SQLite3.hsc dist/build/Database/HSQL/SQLite3_hsc_make.o(.text+0x5d):SQLite3_hsc_make.c: unde fined reference to `_impure_ptr' dist/build/Database/HSQL/SQLite3_hsc_make.o(.text+0xa1):SQLite3_hsc_make.c: unde fined reference to `_impure_ptr' dist/build/Database/HSQL/SQLite3_hsc_make.o(.text+0xc9):SQLite3_hsc_make.c: unde fined reference to `_impure_ptr' dist/build/Database/HSQL/SQLite3_hsc_make.o(.text+0xfd):SQLite3_hsc_make.c: unde fined reference to `_impure_ptr' dist/build/Database/HSQL/SQLite3_hsc_make.o(.text+0x131):SQLite3_hsc_make.c: und efined reference to `_impure_ptr' dist/build/Database/HSQL/SQLite3_hsc_make.o(.text+0x16d):SQLite3_hsc_make.c: mor e undefined references to `_impure_ptr' follow collect2: ld returned 1 exit status linking dist\build\Database\HSQL\SQLite3_hsc_make.o failed command was: c:\projects\tools\home\projects\tmp3\ghc-6.8.2\bin\ghc.exe -optl-LC :\cygwin\lib -optl-lsqlite3 dist\build\Database\HSQL\SQLite3_hsc_make.o -o dist\ build\Database\HSQL\SQLite3_hsc_make.exe -- Berlin Brown email: berlin-dot-brown-AT-gmail-dot-com http://botspiritcompany.com/botlist/

On Mon, 2008-02-04 at 17:18 -0500, bbrown wrote:
Is there a way to pass misc options to the cabal, ghc process.
I tried the following:
extra-libraries: sqlite3 extra-lib-dirs: C:\cygwin\lib include-dirs: C:\cygwin\usr\include ghc-options: -mno-cygwin
runhaskell Setup.lhs build --ghc-options=-mno-cygwin -v
No dice, doesn't show up.
Really? That's odd, works for me: $ runhaskell Setup.lhs build --ghc-options=-mno-cygwin -v ... [snip] ... ghc-6.8.2: unrecognised flags: -mno-cygwin Usage: For basic information, try the `--help' option. Also works with runhaskell Setup.lhs configure --ghc-options=-mno-cygwin Works in the sense that it passes the flag through to ghc. Of course I'm on unix and ghc does not recognise that flag. What version of Cabal are you using? Duncan

On Feb 4, 2008 5:55 PM, Duncan Coutts
On Mon, 2008-02-04 at 17:18 -0500, bbrown wrote:
Is there a way to pass misc options to the cabal, ghc process.
I tried the following:
extra-libraries: sqlite3 extra-lib-dirs: C:\cygwin\lib include-dirs: C:\cygwin\usr\include ghc-options: -mno-cygwin
runhaskell Setup.lhs build --ghc-options=-mno-cygwin -v
No dice, doesn't show up.
Really? That's odd, works for me:
$ runhaskell Setup.lhs build --ghc-options=-mno-cygwin -v ... [snip] ... ghc-6.8.2: unrecognised flags: -mno-cygwin Usage: For basic information, try the `--help' option.
Also works with runhaskell Setup.lhs configure --ghc-options=-mno-cygwin
Works in the sense that it passes the flag through to ghc. Of course I'm on unix and ghc does not recognise that flag.
What version of Cabal are you using?
Duncan
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
It looked like it passed the option, but didn't resolve the issue. Anyone seen that before? See error in previous post. -- Berlin Brown http://botspiritcompany.com/botlist/spring/help/about.html

On Tue, 2008-02-05 at 00:10 -0500, Berlin Brown wrote:
It looked like it passed the option, but didn't resolve the issue. Anyone seen that before? See error in previous post.
GHC is not a cygwin program. It does not use the cygwin gcc, it always uses its own gcc anyway (which happens to be a mingwin binary) so -mno-cygwin should not make any difference to the mingwin gcc. I'd advice using mingw + msys with ghc under windows rather than cygwin. Or use neither and just use a console. Duncan
participants (4)
-
bbrown
-
Berlin Brown
-
Don Stewart
-
Duncan Coutts