[LLVMdev] llvm build not respecting DESTDIR?

Erick Tryzelaar erickt at dslextreme.com
Fri Dec 8 19:27:50 PST 2006


Reid Spencer wrote:
> Yes, but its a bit verbose. The variables that control this are all
> defined in the Makefile.config file. The variables are:
>
> PROJ_prefix     := /proj/llvm/install-1
> PROJ_bindir     := /proj/llvm/install-1/bin
> PROJ_libdir     := /proj/llvm/install-1/lib
> PROJ_datadir    := /proj/llvm/install-1/share
> PROJ_docsdir    := /proj/llvm/install-1/docs/llvm
> PROJ_etcdir     := /proj/llvm/install-1/etc/llvm
> PROJ_includedir := /proj/llvm/install-1/include
> PROJ_infodir    := /proj/llvm/install-1/info
> PROJ_mandir     := /proj/llvm/install-1/man
>
> The values are from my environment.  You can either override each of
> these individually on the command line or replace their values in
> Makefile.config.

Great, that worked, thanks. For a future release though, think that 
DESTDIR could be supported? It shouldn't be that difficult, all that 
would need to be changed is in Makefile.config.in:

DESTDIR         :=
PROJ_prefix     := $(DESTDIR)@prefix@
PROJ_bindir     := $(DESTDIR)@prefix@/bin
PROJ_libdir     := $(DESTDIR)@prefix@/lib
PROJ_datadir    := $(DESTDIR)@prefix@/share
PROJ_docsdir    := $(DESTDIR)@prefix@/docs/llvm
PROJ_etcdir     := $(DESTDIR)@prefix@/etc/llvm
PROJ_includedir := $(DESTDIR)@prefix@/include
PROJ_infodir    := $(DESTDIR)@prefix@/info
PROJ_mandir     := $(DESTDIR)@prefix@/man

And then the makefile would be (more) gnu-compliant, and make linux 
packaging much more simple and straightforward.


>> Also, some questions about llvm-gcc. If we're just installing the binary 
>> version, does anything need to be done in order to let llvm find the 
>> libraries, such as modifying the DLYD_LIBRARY_PATH, or are all the paths 
>> relative? 
>
> There aren't any shared libraries so the library path doesn't matter.
> For llvm-gcc3, the path needs to be able to find gccas and gccld from
> the LLVM build. For llvm-gcc4, everything is linked in statically so
> after llvm-gcc4 is built, it doesn't matter where LLVM lives. 

So does that mean that if we're doing a pure llvm, or llvm + llvm-gcc4, 
we can just do "make" and not "make tools-only"?

> LLVM can be used by itself but the only languages it can process are
> LLVM assembly and Stacker. llvm-gcc4 just provides the C/C++/Obj-C/Obj-C
> ++ front end languages. Other front ends could be developed.

We hope to add http://felix.sourceforge.net to that list :) It currently 
is backed by a c++ generator, but we'd like to branch out to our own 
back end.


>> Thanks for all your help!
>
> You're welcome.
>
> Reid.

Thanks again!

-e



More information about the llvm-dev mailing list