#3251: split rts headers into public and private
-----------------------------+----------------------------------------------
Reporter:  duncan            |          Owner:                  
    Type:  feature request   |         Status:  new             
Priority:  normal            |      Component:  Runtime System  
 Version:  6.10.2            |       Severity:  normal          
Keywords:                    |       Testcase:                  
      Os:  Unknown/Multiple  |   Architecture:  Unknown/Multiple
-----------------------------+----------------------------------------------
 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).

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3251>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to