On Thu, Apr 29, 2010 at 09:12:35PM -0500, Peter O'Gorman wrote:
> On 04/29/2010 11:39 AM, Jack Howarth wrote:
> >    FYI, I posted packaging for a replacement llvm-clang-2.7-1
> > package (now containing both llvm and clang), llvm-gcc42-2.7-1,
> > and a new dragonegg-gcc-2.7-1 package to fink tracking...
> > 
> > https://sourceforge.net/tracker/?func=detail&aid=2993939&group_id=17203&atid=414256
> > 
> > The dragonegg-gcc package builds dragonegg-gcc45 against the new
> > gcc45-4.5.0-1001 packaging (which provides the necessary
> > gcc45-compiler splitoff). Compiler wrappers are installed with the
> > names de-gcc45. de-g++45, etc to automate the process of invoking
> > the FSF gcc compiler with the llvm dragonegg plugin.
> >                  Jack
> > ps As before, if you want to play with LTO, the most current libLTO.dylib
> > packaged in llvm has to be moved into /usr/lib over the system one.
> > Unfortunately ld expects libLTO in a specific place and I've not puzzled
> > out a way to override this behvior without moving libLTO.dylib.
> 
> Hi Jack
> 
> I haven't had a look at these yet, but had a thought about libLTO.
> 
> If you put it in e.g. /sw/opt/llvm27/lib/libLTO.dylib (dunno where
> you're putting it, just chose this for example's sake), and then have a
> symlink from /sw/opt/llvm27/bin/ld to /usr/bin/ld, then running
> /sw/opt/llvm27/bin/ld should load the LTO library. You can check this
> with ld -v (compare /usr/bin/ld -v and /Developer/usr/bin/ld -v output
> for an example).
> 
> Peter

Peter,
  Actually, I abandoned using --prefix=%p/lib/llvm-%v because it causes
clang to fail to install the symlink for clang++ with the error...

llvm[4]: ======= Finished Linking Release Executable clang (without symbols)
llvm[4]: Installing Release 
/sw/src/fink.build/root-llvm-clang-2.7-1/sw/lib/llvm-2.7/bin/clang
make[4]: *** No rule to make target `/sw/lib/llvm-2.7/bin', needed by 
`/sw/src/fink.build/root-llvm-clang-2.7-1/sw/lib/llvm-2.7/bin/clang++'.  Stop.
make[3]: *** [install] Error 1
make[2]: *** [install] Error 1
make[1]: *** [clang/.makeinstall] Error 2
make: *** [install] Error 1

I am attaching a llvm-clang-x86_64.info which uses wrappers for llvm-clang
to find a ld symlink which will use the llvm-2.7 libLTO. This fails to build
with the error above. Any ideas how to fix clang/tools/driver/CMakeLists.txt
to avoid this error?
            Jack


Info2: <<
Package: llvm-clang
Version: 2.7
Revision: 1
Source: http://llvm.org/releases/%v/llvm-%v.tgz
Source-MD5: ac322661f20e7d6c810b1869f886ad9b
Source2: http://llvm.org/releases/%v/clang-%v.tgz
Source2-MD5: b83260aa8c13494adf8978b5f238bf1b
Type: -64bit .
Architecture: x86_64
BuildDepends: fink (>= 0.28)
Conflicts: llvm
Provides: llvm
Replaces: llvm
ConfigureParams: <<
 --prefix=%p/lib/llvm-%v --mandir=%p/share/man --infodir=%p/share/info 
--with-gmp=%p --with-libiconv-prefix=/usr --with-system-zlib 
--with-as=`xcode-select  -print-path`/usr/bin/as --with-ld=`xcode-select  
-print-path`/usr/bin/ld --with-nm=`xcode-select  -print-path`/usr/bin/nm
<<
CompileScript: <<
 #!/bin/bash -ev
 export LD=`xcode-select  -print-path`/usr/bin/ld
 ulimit -s `ulimit -s`
 mv ../clang-%v ./tools/clang
 mkdir ../llvm_objdir
 cd ../llvm_objdir
 ../llvm-%v/configure %c --enable-optimized --enable-assertions --enable-pic 
--enable-targets=host-only
 num_cpu=$(echo `sysctl -n hw.ncpu`)
 make -j $num_cpu
<<
InstallScript: <<
 #!/bin/sh -ev
 export LD=`xcode-select  -print-path`/usr/bin/ld
 cd ../llvm_objdir
 make install DESTDIR=%d 
 mkdir -p %i/bin
 ln -s %p/lib/llvm/bin/bugpoint %i/bin/bugpoint
 ln -s %p/lib/llvm/bin/llc %i/bin/llc
 ln -s %p/lib/llvm/bin/lli %i/bin/lli
 ln -s %p/lib/llvm/bin/llvm-ar %i/bin/llvm-ar
 ln -s %p/lib/llvm/bin/llvm-as %i/bin/llvm-as
 ln -s %p/lib/llvm/bin/llvm-bcanalyzer %i/bin/llvm-bcanalyzer
 ln -s %p/lib/llvm/bin/llvm-config %i/bin/llvm-config
 ln -s %p/lib/llvm/bin/llvm-dis %i/bin/llvm-dis
 ln -s %p/lib/llvm/bin/llvm-extract %i/bin/llvm-extract
 ln -s %p/lib/llvm/bin/llvm-ld %i/bin/llvm-ld
 ln -s %p/lib/llvm/bin/llvm-link %i/bin/llvm-link
 ln -s %p/lib/llvm/bin/llvm-nm %i/bin/llvm-nm
 ln -s %p/lib/llvm/bin/llvm-prof  %i/bin/llvm-prof
 ln -s %p/lib/llvm/bin/llvm-ranlib %i/bin/llvm-ranlib
 ln -s %p/lib/llvm/bin/llvm-stub %i/bin/llvm-stub
 ln -s %p/lib/llvm/bin/llvmc %i/bin/llvmc
 ln -s %p/lib/llvm/bin/opt %i/bin/opt
 ln -s %p/lib/llvm/bin/tblgen %i/bin/tblgen
 ln -s `xcode-select  -print-path`/usr/bin/ld %i/bin/ld
 cat <<EOF > %i/bin/llvm-clang
 #!/bin/bash
 PATH=$PATH:%p/lib/llvm-%v/bin
 export PATH
 exec %p/lib/llvm-%v/bin/clang "\$@"
 EOF
 chmod ugo+x %i/bin/llvm-clang
 ln -s %p/bin/clang %i/bin/llvm-clang++
 mv %i/share/man/man1/clang.1 %i/share/man/man1/llvm-clang.1
 # --docdir is broken in llvm
 mkdir -p %i/share/doc
 mv %i/lib/llvm-%v/docs %i/share/doc/llvm
 install_name_tool -id %p/lib/llvm-%v/lib/libCIndex.dylib %i/lib/libCIndex.dylib
 install_name_tool -id %p/lib/llvm-%v/lib/libLLVMHello.dylib 
%i/lib/libLLVMHello.dylib
 install_name_tool -id %p/lib/llvm-%v/lib/libLTO.dylib %i/lib/libLTO.dylib
 install_name_tool -id %p/lib/llvm-%v/lib/libEnhancedDisassembly.dylib 
%i/lib/libEnhancedDisassembly.dylib
 install_name_tool -id %p/lib/llvm-%v/lib/libprofile_rt.dylib 
%i/lib/libprofile_rt.dylib
<<
SplitOff: <<
  Package: %N-shlibs
  Files: <<
     lib/llvm-%v/lib/libCIndex.dylib
     lib/llvm-%v/lib/libEnhancedDisassembly.dylib
     lib/llvm-%v/lib/libLLVMHello.dylib
     lib/llvm-%v/lib/libprofile_rt.dylib
     lib/llvm-%v/lib/libLTO.dylib
<< 
  Shlibs: <<
     %p/lib/llvm-%v/lib/libCIndex.dylib 0.0.0 %n (>= 2.7-1)
     %p/lib/llvm-%v/lib/libEnhancedDisassembly.dylib 0.0.0 %n (>= 2.7-1)
     %p/lib/llvm-%v/lib/libLLVMHello.dylib 0.0.0 %n (>= 2.7-1)
     %p/lib/llvm-%v/lib/libprofile_rt.dylib 0.0.0 %n (>= 2.7-1)
     %p/lib/llvm-%v/lib/libLTO.dylib 0.0.0 %n (>= 2.7-1)
<<
<<
License: BSD
Description: LLVM Compiler and C Family Frontend
DescDetail: <<
A compilation strategy designed to enable effective program optimization
across the entire lifetime of a program. The Low Level Virtual Machine
supports effective optimization at compile time, link-time (particularly
interprocedural) run-time and offline (i.e., after software is installed),
while remaining transparent to developers and maintaining compatibility
with existing build scripts. Clang is a new C, C++, Objective C and
Objective C++ front-end for the LLVM compiler.
<<
DescPackaging: <<
The previous llvm packaging has been replaced with a llvm-clang package which
provides both llvm and clang in a single build. 
The file libLTO.dylib in %p/lib/llvm/lib can be used to replace the libLTO.dylib
in /Developer/usr/lib from Xcode 3.1.2 to enable full LTO support at -O4 in
the compilers of the llvm-gcc42 package. Note that the fink maintainer mode
doesn't understand the @executable_path/../lib/libLTO.dylib syntax in 
libLTO.dylib's
otool -L output.
<<
Homepage: http://llvm.org/
Maintainer: Jack Howarth <howa...@bromo.med.uc.edu>
<<
------------------------------------------------------------------------------
_______________________________________________
Fink-devel mailing list
Fink-devel@lists.sourceforge.net
http://news.gmane.org/gmane.os.apple.fink.devel
Subscription management:
https://lists.sourceforge.net/lists/listinfo/fink-devel

Reply via email to