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,273
    • Issues 4,273
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 413
    • Merge Requests 413
  • 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
  • #3251

Closed
Open
Opened May 21, 2009 by duncan@trac-duncan

split rts headers into public and private

C code calling into the rts, eg to initialise it, uses header files like HsFFI.h or RtsAPI.h. However these header files that describe the public API of the rts are installed in $libdir/ghc-x.y/include where as the standard location for public header files should be $prefix/include/ghc-x.y.

The private header files that are only used by .hc files when compiling -fvia-C should remain where they are. So this would involve identifying which headers are public and which are private.

Once we have a set of public header files it might be nice to provide a pkg-config .pc file to make it easy for C programs to locate the header files and libraries. Eg it should be possible to compile and link a C program that uses the RTS public API with just:

gcc -o main main.c `pkg-config --cflags --libs ghc-rts-6.12.1`

and this would supply the flags like

-I/usr/include/ghc-6.12.1 -lHSrts -L/usr/lib/ghc-6.12.1

Note that pkg-config supports both shared and static libs (ie allows specifying the extra private deps of a static lib, eg -lm -ldl etc).

Trac metadata
Trac field Value
Version 6.10.2
Type FeatureRequest
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Runtime System
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
Assignee
Assign to
8.0.1
Milestone
8.0.1 (Past due)
Assign milestone
Time tracking
None
Due date
None
Reference: ghc/ghc#3251