From: Andreas H. <AHE...@de...> - 2002-11-07 17:28:19
|
Hi, recently I changed the lkcdutils building procedure. I removed the gflags option and introduced options "--cflags" and "--lflags". There you can specify compile and linker flags, respectively. The options are passed down the Makefiles. To compile a debug lcrash version, you simply use: ./configure --cflags="-g" I think the new options provide more flexibility and I hope everyone can live with that. The motivation for the change came from the question, how to improve the linking step of lcrash against binutils libraries with support for multiple targets. If you build lcrash with multiple dump-target support, then you need corresponding binutils libs (libopcodes and libbfd). Preferably you have installed this libs and corresponding headers in separate directories to avoid conflicts with the original binutils stuff installed on your system. The building steps are described in the file README.xlcrash, here is the related part from this file: <--snip--> INSTALLATION steps for lcrash with cross arch support ===================================================== 1) install binutils src.rpm (e.g. rpm -i binutils...src.rpm && cd /usr/src/redhat/SPECS && rpm -bp binutils.spec) 2) install xlcrash source tree (e.g. from sourceforge cvs ...) 3) change to binutils src dir: $>./configure --enable-64-bit-bfd \ --enable-targets=i386-elf,s390-linux,s390x-linux,alpha-linux,ia64-elf \ --exec-prefix=/special/binutils/dir \ --prefix=/special/binutils/dir 4) change to bfd dir: $>make && make install 5) change to opcodes dir: $>make && make install 6) Now you should have under /special/binutils/dir a tree like: $>cd /special/binutils/dir; find . -type f <--snip--> ./lib/libopcodes.la ./lib/libopcodes.a ./lib/libbfd.la ./lib/libbfd.a ./include/dis-asm.h ./include/bfd.h ./include/ansidecl.h ./include/symcat.h ./include/bfdlink.h ./info/bfd.info <--snip--> WARNING: If prefix/exec-prefix is configured as /usr then it might happen that after "make install" the installed binutils header files do not correspond to the shared binutils libs on your system. Reason: If multiple targets are selected for libbfd, only a static library is built and afterwards installed. But the original shared lib will be kept in your system. Hence it is better to specify a prefix/exec-prefix that won't conflict with the original binutils headers and libs. 7) change to lcrash source dir: $> ./configure --cflags="-I /special/binutils/dir/include" \ --lflags="-L /special/binutils/dir/lib/" --target-arch=all $> make && make install During last step lcrash is statically linked against the special binutils libs with support for multiple targets. <--snip--> Regards, Andreas -- Linux for eServer Development Tel : +49-7031-16-4640 Notes mail : Andreas Herrmann/GERMANY/IBM@IBMDE email : ahe...@de... |