Re: Include a new boot library
Simon Marlow <[email protected]>
| Newsgroups | gmane.comp.lang.haskell.cvs.ghc |
|---|---|
| Message-ID | <[email protected]> |
On 03/12/12 17:30, Mattias Lundell wrote: > Hi, > > I have spent a couple of hours this weekend trying to include an extra > boot library to GHC. My aim is to experiment with the LLVM FFI > bindings as code generator instead of the text representation. Great! > Unfortunately I am stuck in the build process. I am able to build GHC > HEAD from git and I am able to build the LLVM FFI bindings. The > problem begins when the GHC's build process tries to build the LLVM > FFI bindings. I have separated the llvm-base library and put it into > the libraries directory of GHC, I have imported a module that is > exported from the llvm-base package, I have added llvm-base to the > files: 'compiler/ghc.cabal.in <http://ghc.cabal.in/>', 'packages' and > 'ghc.mk <http://ghc.mk/>'. > > But I am stuck with the message: > > make[1]: *** No rule to make target `cbits/extra.cpp', needed by > `libraries/llvm-base/dist-install/build/libHSllvm-base-3.0.1.0.a'. Stop. > > This is my first time hacking on GHC and the build process is new to > me. My question is if I have forgotten something or if the problem is > in llvm-base. Is cbits/extra.cpp built from something else? Does llvm-base have some custom Cabal stuff that the GHC build system doesn't know about, maybe? Something you'll probably run into is that the build system doesn't have rules for building .cpp files (C++). You can add these by cut and pasting from the .c rules, which can be found in rules/c-suffix-rules.mk. I'm not sure whether the .cpp files will make it into the *_C_SRCS variable, if not there might be other changes needed. Have a look in your libraries/llvm-base/dist-install/package.mk. Cheers, Simon