Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
GHC
GHC
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 4,265
    • Issues 4,265
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 421
    • Merge Requests 421
  • Requirements
    • Requirements
    • List
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Security & Compliance
    • Security & Compliance
    • Dependency List
    • License Compliance
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Code Review
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Glasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #3681

Closed
Open
Opened Nov 23, 2009 by nwn@trac-nwn

hsc2hs wrapper script throws away $HSC2HS_EXTRA's value when specified C compiler to use

hsc2hs wrapper script ignores default flags to build 32bit binary when specified C-compiler to use even if it was gcc.

This become a problem when building packages with Cabal. As usual, Cabal passes --cc=/path/to/gcc to hsc2hs. So default flags are ignored, built packages are broken.

I edited script to fix this problem. I think it's ugly fix, but it works.

{{{ #!/bin/sh exedir="/Library/Frameworks/GHC.framework/Versions/612/usr/lib/ghc-6.12.0.20091121" exeprog="hsc2hs" executablename="$exedir/$exeprog" datadir="/Library/Frameworks/GHC.framework/Versions/612/usr/share" bindir="/Library/Frameworks/GHC.framework/Versions/612/usr/bin" topdir="/Library/Frameworks/GHC.framework/Versions/612/usr/lib/ghc-6.12.0.20091121" HSC2HS_EXTRA="--cflag=-m32 --lflag=-m32" #!/bin/sh

tflag="--template=$topdir/template-hsc.h" Iflag="-I$topdir/include/"

for arg do

case "$arg" in

  • gcc) break;;

-c*) HSC2HS_EXTRA=;;

--cc=*) HSC2HS_EXTRA=;;

-t*) tflag=;;

--template=*) tflag=;;

--) break;;

esac

done

exec "$executablename" "$tflag" $HSC2HS_EXTRA ${1+"$@"} "$Iflag"

}}}

Trac metadata
Trac field Value
Version 6.12.1 RC1
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component hsc2hs
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
Edited Mar 09, 2019 by nwn
Assignee
Assign to
7.0.2
Milestone
7.0.2
Assign milestone
Time tracking
None
Due date
None
Reference: ghc/ghc#3681