On Sat, Apr 10, 2010 at 01:52:18PM +0200, Duncan Sands wrote:> Hi Jack, > > > Is anyone building dragon-egg on darwin? > > Anton built it once. There were some problems with dynamic libraries: gcc's > plugin support requires the use of dynamic libraries, and the configure logic > it uses thinks that darwin does not support dynamic libraries! So it is > possible that plugin support was automatically disabled because of this. Try > configuring with --enable-plugin >Duncan, The following hack to gcc/configure.ac will allow the --enable-plugin option to build and pass the plugin tests on x86_64-apple-darwin10 using gcc-4_5-branch... --- configure.ac.orig 2010-04-10 10:58:34.000000000 -0500 +++ configure.ac 2010-04-10 10:59:52.000000000 -0500 @@ -4380,22 +4380,6 @@ pluginlibs if test x"$enable_plugin" = x"yes"; then - - AC_MSG_CHECKING([for exported symbols]) - echo "int main() {return 0;} int foobar() {return 0;}" > conftest.c - ${CC} ${CFLAGS} ${LDFLAGS} conftest.c -o conftest > /dev/null 2>&1 - if $gcc_cv_objdump -T conftest | grep foobar > /dev/null; then - : # No need to use a flag - else - AC_MSG_CHECKING([for -rdynamic]) - ${CC} ${CFLAGS} ${LDFLAGS} -rdynamic conftest.c -o conftest > /dev/null 2>&1 - if $gcc_cv_objdump -T conftest | grep foobar > /dev/null; then - pluginlibs="-rdynamic" - else - enable_plugin=no - fi - fi - # Check -ldl saved_LIBS="$LIBS" AC_SEARCH_LIBS([dlopen], [dl]) @@ -4403,29 +4387,6 @@ pluginlibs="$pluginlibs -ldl" fi LIBS="$saved_LIBS" - - # Check that we can build shared objects with -fPIC -shared - saved_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -fPIC -shared" - AC_MSG_CHECKING([for -fPIC -shared]) - AC_TRY_LINK( - [extern int X;],[return X == 0;], - [AC_MSG_RESULT([yes]); have_pic_shared=yes], - [AC_MSG_RESULT([no]); have_pic_shared=no]) - if test x"$have_pic_shared" != x"yes" -o x"$ac_cv_search_dlopen" = x"no"; then - pluginlibs- enable_plugin=no - fi - LDFLAGS="$saved_LDFLAGS" - - # If plugin support had been requested but not available, fail. - if test x"$enable_plugin" = x"no" ; then - if test x"$default_plugin" != x"yes"; then - AC_MSG_ERROR([ -Building GCC with plugin support requires a host that supports --fPIC, -shared, -ldl and -rdynamic.]) - fi - fi fi AC_SUBST(pluginlibs) Index: gcc/testsuite/lib/plugin-support.exp ==================================================================--- gcc/testsuite/lib/plugin-support.exp (revision 158195) +++ gcc/testsuite/lib/plugin-support.exp (working copy) @@ -88,6 +88,10 @@ set optstr "$includes $extra_flags -DIN_GCC -fPIC -shared" + if { [ istarget *-*-darwin* ] } { + set optstr [concat $optstr "-undefined dynamic_lookup"] + } + # Temporarily switch to the environment for the plugin compiler. restore_ld_library_path_env_vars set status [remote_exec build "$PLUGINCC $PLUGINCFLAGS $plugin_src $optstr -o $plugin_lib"] I am working towards building current dragon-egg svn against this installation of FSF gcc 4.5.0. Currently FSF gcc 4.5.0 neglects to install gcc/config/darwin-sections.def into lib/gcc/x86_64-apple-darwin10.3.0/4.5.0/plugin/include/ so I copied that manually for now. With that change, I think I am bumping into a bug with building dragon-egg with gcc 4.5.0... bash-3.2$ GCC=/sw/bin/gcc-4 CC=gcc-4 CXX=g++-4 CFLAGS=-I/sw/include CXXFLAGS=-I/sw/include LLVM_CONFIG=/sw/lib/llvm/bin/llvm-config make g++-4 -c -I/sw/lib/llvm/include -D_DEBUG -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -MD -MP -DIN_GCC -DREVISION=\"100954M\" -DTARGET_NAME=\"x86_64-apple-darwin10.3.0\" -I/Users/howarth/llvm_svn/dragonegg -I/sw/lib/gcc4.5/lib/gcc/x86_64-apple-darwin10.3.0/4.5.0/plugin/include -I/Users/howarth/llvm_svn/dragonegg/x86 -I/Users/howarth/llvm_svn/dragonegg/darwin -I/sw/include -Wall -Werror -I/sw/lib/llvm/include -D_DEBUG -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -O2 -fno-exceptions -fno-rtti -fno-common -Woverloaded-virtual /Users/howarth/llvm_svn/dragonegg/llvm-convert.cpp In file included from /Users/howarth/llvm_svn/dragonegg/llvm-convert.cpp:88:0: /Users/howarth/llvm_svn/dragonegg/llvm-debug.h:150:3: error: ‘DIFile’ does not name a type make: *** [llvm-convert.o] Error 1 where /sw/bin/gcc-4 is the gcc 4.5.0 from my gcc45 fink package with plugin support. Do you see this under linux? Jack
On 04/10/2010 08:01 PM, Jack Howarth wrote:> > bash-3.2$ GCC=/sw/bin/gcc-4 CC=gcc-4 CXX=g++-4 CFLAGS=-I/sw/include CXXFLAGS=-I/sw/include LLVM_CONFIG=/sw/lib/llvm/bin/llvm-config make > g++-4 -c -I/sw/lib/llvm/include -D_DEBUG -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -MD -MP -DIN_GCC -DREVISION=\"100954M\" -DTARGET_NAME=\"x86_64-apple-darwin10.3.0\" -I/Users/howarth/llvm_svn/dragonegg -I/sw/lib/gcc4.5/lib/gcc/x86_64-apple-darwin10.3.0/4.5.0/plugin/include -I/Users/howarth/llvm_svn/dragonegg/x86 -I/Users/howarth/llvm_svn/dragonegg/darwin -I/sw/include -Wall -Werror -I/sw/lib/llvm/include -D_DEBUG -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -O2 -fno-exceptions -fno-rtti -fno-common -Woverloaded-virtual /Users/howarth/llvm_svn/dragonegg/llvm-convert.cpp > In file included from /Users/howarth/llvm_svn/dragonegg/llvm-convert.cpp:88:0: > /Users/howarth/llvm_svn/dragonegg/llvm-debug.h:150:3: error: ‘DIFile’ does not name a typeAfter editing the dragonegg Makefile to remove -Werror, installing r100954 of llvm/clang (to /opt/llv, being too lazy to type the 'm'), copying the missing darwin-sections.def to the installed gcc-4.5.0 release-candidate, as you noticed, I could add /opt/llv/bin to my path and the path to my gcc-4.5 install, and do: GCC=/sw/lib/gcc4.5/bin/gcc make CPPFLAGS="-DENABLE_LTO -I/sw/include" And it worked until the final link, which failed (-shared works in recent gcc, but is just an alias for -dynamiclib, and doesn't allow undefined symbols). I copy & pasted the link line, added -undefined dynamic_lookup, and it linked and apparently works: mini:dragonegg pogma$ gcc hello.c -S -O1 -o - -fplugin=./dragonegg.so -fplugin-arg-dragonegg-emit-ir ; ModuleID = 'hello.c' target datalayout "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64" target triple = "x86_64-apple-darwin10.3.0" %"char[]" = type [6 x i8] @.str = private constant %"char[]" c"Hello\00", align 1 ; <%"char[]"*> [#uses=2] define i32 @main() nounwind { entry: %0 = tail call i32 @puts(i8* getelementptr inbounds (%"char[]"* @.str, i64 0, i64 0)) nounwind ; <i32> [#uses=0] ret i32 undef } declare i32 @puts(i8* nocapture) nounwind Pretty awesome! Peter
On Sat, Apr 10, 2010 at 08:29:07PM -0500, Peter O'Gorman wrote:> On 04/10/2010 08:01 PM, Jack Howarth wrote: > > > > > bash-3.2$ GCC=/sw/bin/gcc-4 CC=gcc-4 CXX=g++-4 CFLAGS=-I/sw/include CXXFLAGS=-I/sw/include LLVM_CONFIG=/sw/lib/llvm/bin/llvm-config make > > g++-4 -c -I/sw/lib/llvm/include -D_DEBUG -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -MD -MP -DIN_GCC -DREVISION=\"100954M\" -DTARGET_NAME=\"x86_64-apple-darwin10.3.0\" -I/Users/howarth/llvm_svn/dragonegg -I/sw/lib/gcc4.5/lib/gcc/x86_64-apple-darwin10.3.0/4.5.0/plugin/include -I/Users/howarth/llvm_svn/dragonegg/x86 -I/Users/howarth/llvm_svn/dragonegg/darwin -I/sw/include -Wall -Werror -I/sw/lib/llvm/include -D_DEBUG -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -O2 -fno-exceptions -fno-rtti -fno-common -Woverloaded-virtual /Users/howarth/llvm_svn/dragonegg/llvm-convert.cpp > > In file included from /Users/howarth/llvm_svn/dragonegg/llvm-convert.cpp:88:0: > > /Users/howarth/llvm_svn/dragonegg/llvm-debug.h:150:3: error: ‘DIFile’ does not name a type > > > After editing the dragonegg Makefile to remove -Werror, installing > r100954 of llvm/clang (to /opt/llv, being too lazy to type the 'm'), > copying the missing darwin-sections.def to the installed gcc-4.5.0 > release-candidate, as you noticed, I could add /opt/llv/bin to my path > and the path to my gcc-4.5 install, and do: > > GCC=/sw/lib/gcc4.5/bin/gcc make CPPFLAGS="-DENABLE_LTO -I/sw/include" > > And it worked until the final link, which failed (-shared works in > recent gcc, but is just an alias for -dynamiclib, and doesn't allow > undefined symbols). I copy & pasted the link line, added -undefined > dynamic_lookup, and it linked and apparently works: > > mini:dragonegg pogma$ gcc hello.c -S -O1 -o - -fplugin=./dragonegg.so > -fplugin-arg-dragonegg-emit-ir > ; ModuleID = 'hello.c' > target datalayout > "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64" > target triple = "x86_64-apple-darwin10.3.0" > > %"char[]" = type [6 x i8] > > @.str = private constant %"char[]" c"Hello\00", align 1 ; <%"char[]"*> > [#uses=2] > > define i32 @main() nounwind { > entry: > %0 = tail call i32 @puts(i8* getelementptr inbounds (%"char[]"* @.str, > i64 0, i64 0)) nounwind ; <i32> [#uses=0] > ret i32 undef > } > > declare i32 @puts(i8* nocapture) nounwind > > Pretty awesome! > > PeterPeter, I am going to post this to gcc-patches after regression testing on gcc-4_5-branch. Jack 2010-04-11 Jack Howarth <howarth at bromo.med.uc.edu> PR 43715 * gcc/configure.ac: Use "$gcc_cv_nm -g" to check for exported symbols. Use "-undefined dynamic_lookup" on darwin. * gcc/configure: Regenerate. * testsuite/lib/plugin-support.exp: Use "-undefined dynamic_lookup" on darwin. Index: testsuite/lib/plugin-support.exp ==================================================================--- testsuite/lib/plugin-support.exp (revision 158199) +++ testsuite/lib/plugin-support.exp (working copy) @@ -88,6 +88,10 @@ set optstr "$includes $extra_flags -DIN_GCC -fPIC -shared" + if { [ istarget *-*-darwin* ] } { + set optstr [concat $optstr "-undefined dynamic_lookup"] + } + # Temporarily switch to the environment for the plugin compiler. restore_ld_library_path_env_vars set status [remote_exec build "$PLUGINCC $PLUGINCFLAGS $plugin_src $optstr -o $plugin_lib"] Index: configure.ac ==================================================================--- configure.ac (revision 158199) +++ configure.ac (working copy) @@ -4384,12 +4384,12 @@ AC_MSG_CHECKING([for exported symbols]) echo "int main() {return 0;} int foobar() {return 0;}" > conftest.c ${CC} ${CFLAGS} ${LDFLAGS} conftest.c -o conftest > /dev/null 2>&1 - if $gcc_cv_objdump -T conftest | grep foobar > /dev/null; then + if $gcc_cv_nm -g conftest | grep foobar > /dev/null; then : # No need to use a flag else AC_MSG_CHECKING([for -rdynamic]) ${CC} ${CFLAGS} ${LDFLAGS} -rdynamic conftest.c -o conftest > /dev/null 2>&1 - if $gcc_cv_objdump -T conftest | grep foobar > /dev/null; then + if $gcc_cv_nm -g conftest | grep foobar > /dev/null; then pluginlibs="-rdynamic" else enable_plugin=no @@ -4406,7 +4406,14 @@ # Check that we can build shared objects with -fPIC -shared saved_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -fPIC -shared" + case "${target}" in + *-*-darwin*) + LDFLAGS="$LDFLAGS -fPIC -shared -undefined dynamic_lookup" + ;; + *) + LDFLAGS="$LDFLAGS -fPIC -shared" + ;; + esac AC_MSG_CHECKING([for -fPIC -shared]) AC_TRY_LINK( [extern int X;],[return X == 0;],
Peter, FYI, I am interested in dragon-egg because I have been preparing updated llvm/llvm-gcc42 2.7 packaging for fink and was considering adding in an addition dragon-egg package if the additional gcc patch didn't destablize gcc45. Also I am really interested in checking the Polyhedron 2005 benchmarks for gcc 4.5.0 with and without dragon-egg. The Polyhedron 2005 benchmarks improved about 14% on llvm-gfortran over the past 13 months without the llvm developers even targeting those. With a modern gfortran and decent vectorization support, the benchmarks could be quite interesting and might fire up some interest among the FSF gcc developers. Jack
Hi Jack,> bash-3.2$ GCC=/sw/bin/gcc-4 CC=gcc-4 CXX=g++-4 CFLAGS=-I/sw/include CXXFLAGS=-I/sw/include LLVM_CONFIG=/sw/lib/llvm/bin/llvm-config make > g++-4 -c -I/sw/lib/llvm/include -D_DEBUG -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -MD -MP -DIN_GCC -DREVISION=\"100954M\" -DTARGET_NAME=\"x86_64-apple-darwin10.3.0\" -I/Users/howarth/llvm_svn/dragonegg -I/sw/lib/gcc4.5/lib/gcc/x86_64-apple-darwin10.3.0/4.5.0/plugin/include -I/Users/howarth/llvm_svn/dragonegg/x86 -I/Users/howarth/llvm_svn/dragonegg/darwin -I/sw/include -Wall -Werror -I/sw/lib/llvm/include -D_DEBUG -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -O2 -fno-exceptions -fno-rtti -fno-common -Woverloaded-virtual /Users/howarth/llvm_svn/dragonegg/llvm-convert.cpp > In file included from /Users/howarth/llvm_svn/dragonegg/llvm-convert.cpp:88:0: > /Users/howarth/llvm_svn/dragonegg/llvm-debug.h:150:3: error: ‘DIFile’ does not name a type > make: *** [llvm-convert.o] Error 1 > > where /sw/bin/gcc-4 is the gcc 4.5.0 from my gcc45 fink package > with plugin support. Do you see this under linux?are you building against LLVM top-of-tree? Currently dragonegg needs gcc from svn, and the same for LLVM. It would make sense to have versions of dragonegg that target: (1) Latest gcc release, latest LLVM release (this is not relevant until gcc-4.5 is released) (2) Latest gcc release, LLVM from svn (this is not relevant until gcc-4.5 is released) (3) Latest LLVM release, gcc from svn (4) gcc from svn, LLVM from svn Currently I'm only doing (4). Once gcc-4.5 is released I may do (4) and (2). I don't plan to do (1) or (3) unless I get some help. Ciao, Duncan.
Hi Peter,> After editing the dragonegg Makefile to remove -Werror, ...I think I'm going to remove -Werror, and instead make the build less noisy so warnings are easier to see. Ciao, Duncan.
On Sun, Apr 11, 2010 at 10:29:28AM +0200, Duncan Sands wrote:> Hi Jack, > >> bash-3.2$ GCC=/sw/bin/gcc-4 CC=gcc-4 CXX=g++-4 CFLAGS=-I/sw/include CXXFLAGS=-I/sw/include LLVM_CONFIG=/sw/lib/llvm/bin/llvm-config make >> g++-4 -c -I/sw/lib/llvm/include -D_DEBUG -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -MD -MP -DIN_GCC -DREVISION=\"100954M\" -DTARGET_NAME=\"x86_64-apple-darwin10.3.0\" -I/Users/howarth/llvm_svn/dragonegg -I/sw/lib/gcc4.5/lib/gcc/x86_64-apple-darwin10.3.0/4.5.0/plugin/include -I/Users/howarth/llvm_svn/dragonegg/x86 -I/Users/howarth/llvm_svn/dragonegg/darwin -I/sw/include -Wall -Werror -I/sw/lib/llvm/include -D_DEBUG -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -O2 -fno-exceptions -fno-rtti -fno-common -Woverloaded-virtual /Users/howarth/llvm_svn/dragonegg/llvm-convert.cpp >> In file included from /Users/howarth/llvm_svn/dragonegg/llvm-convert.cpp:88:0: >> /Users/howarth/llvm_svn/dragonegg/llvm-debug.h:150:3: error: ‘DIFile’ does not name a type >> make: *** [llvm-convert.o] Error 1 >> >> where /sw/bin/gcc-4 is the gcc 4.5.0 from my gcc45 fink package >> with plugin support. Do you see this under linux? > > are you building against LLVM top-of-tree? Currently dragonegg needs gcc > from svn, and the same for LLVM. It would make sense to have versions of > dragonegg that target: > (1) Latest gcc release, latest LLVM release (this is not relevant until > gcc-4.5 is released) > (2) Latest gcc release, LLVM from svn (this is not relevant until gcc-4.5 > is released) > (3) Latest LLVM release, gcc from svn > (4) gcc from svn, LLVM from svn > Currently I'm only doing (4). Once gcc-4.5 is released I may do (4) and (2). > I don't plan to do (1) or (3) unless I get some help. > > Ciao, > > Duncan.Duncan, Yes, I was trying to use dragon-egg svn with llvm release-2.7 branch (because I was in the process of preparing llvm/llvm-gcc42 2.7 fink packages and had those handy). I'll try again with llvm svn. FYI, I have posted the --enable-plugin fix patch for darwin to the gcc-patches mailing list... http://gcc.gnu.org/ml/gcc-patches/2010-04/msg00516.html I think we need one more darwin-specific FSF gcc patch for dragon-egg (as gcc 4.5.0 doesn't installed the required darwin-sections.def into /sw/lib/gcc4.5/lib/gcc/x86_64-apple-darwin10.3.0/4.5.0/plugin/include/config). I am still pondering how to properly do that in the Makefiles. Have any prior dragon-egg gcc patches been committed and do you intend to post the i386_static.diff to gcc-patches? Jack ps I did notice the dragon-egg web page said that exception handling was broken but I did see some recent commits on that feature. What is the status of exception handling in current svn?
On Sat, Apr 10, 2010 at 08:29:07PM -0500, Peter O'Gorman wrote:> On 04/10/2010 08:01 PM, Jack Howarth wrote: > > > > > bash-3.2$ GCC=/sw/bin/gcc-4 CC=gcc-4 CXX=g++-4 CFLAGS=-I/sw/include CXXFLAGS=-I/sw/include LLVM_CONFIG=/sw/lib/llvm/bin/llvm-config make > > g++-4 -c -I/sw/lib/llvm/include -D_DEBUG -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -MD -MP -DIN_GCC -DREVISION=\"100954M\" -DTARGET_NAME=\"x86_64-apple-darwin10.3.0\" -I/Users/howarth/llvm_svn/dragonegg -I/sw/lib/gcc4.5/lib/gcc/x86_64-apple-darwin10.3.0/4.5.0/plugin/include -I/Users/howarth/llvm_svn/dragonegg/x86 -I/Users/howarth/llvm_svn/dragonegg/darwin -I/sw/include -Wall -Werror -I/sw/lib/llvm/include -D_DEBUG -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -O2 -fno-exceptions -fno-rtti -fno-common -Woverloaded-virtual /Users/howarth/llvm_svn/dragonegg/llvm-convert.cpp > > In file included from /Users/howarth/llvm_svn/dragonegg/llvm-convert.cpp:88:0: > > /Users/howarth/llvm_svn/dragonegg/llvm-debug.h:150:3: error: ‘DIFile’ does not name a type > > > After editing the dragonegg Makefile to remove -Werror, installing > r100954 of llvm/clang (to /opt/llv, being too lazy to type the 'm'), > copying the missing darwin-sections.def to the installed gcc-4.5.0 > release-candidate, as you noticed, I could add /opt/llv/bin to my path > and the path to my gcc-4.5 install, and do: > > GCC=/sw/lib/gcc4.5/bin/gcc make CPPFLAGS="-DENABLE_LTO -I/sw/include" > > And it worked until the final link, which failed (-shared works in > recent gcc, but is just an alias for -dynamiclib, and doesn't allow > undefined symbols). I copy & pasted the link line, added -undefined > dynamic_lookup, and it linked and apparently works: > > mini:dragonegg pogma$ gcc hello.c -S -O1 -o - -fplugin=./dragonegg.so > -fplugin-arg-dragonegg-emit-ir > ; ModuleID = 'hello.c' > target datalayout > "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64" > target triple = "x86_64-apple-darwin10.3.0" > > %"char[]" = type [6 x i8] > > @.str = private constant %"char[]" c"Hello\00", align 1 ; <%"char[]"*> > [#uses=2] > > define i32 @main() nounwind { > entry: > %0 = tail call i32 @puts(i8* getelementptr inbounds (%"char[]"* @.str, > i64 0, i64 0)) nounwind ; <i32> [#uses=0] > ret i32 undef > } > > declare i32 @puts(i8* nocapture) nounwind > > Pretty awesome! > > PeterPeter, Does this still work for you with current llvm svn? I created a new llvm fink package from current svn and used that to build the current dragon-egg against my gcc45 package with plugin support enabled. The build of the plugin worked but when I try to use it I get.. bash-3.2$ gcc-4 hello.c -S -O1 -o - -fplugin=./dragonegg.so cc1: error: Cannot load plugin ./dragonegg.so dlopen(./dragonegg.so, 10): Symbol not found: _classify_argument Referenced from: /Users/howarth/llvm_svn/dragonegg/dragonegg.so Expected in: flat namespace in /Users/howarth/llvm_svn/dragonegg/dragonegg.so I noticed that I have... bash-3.2$ otool -L ./dragonegg.so ./dragonegg.so: /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.0.1) /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.9.0) in both builds I tried... GCC=/sw/lib/gcc4.5/bin/gcc LLVM_CONFIG=/sw/lib/llvm/bin/llvm-config make CPPFLAGS="-DENABLE_LTO -I/sw/include" and GCC=/sw/lib/gcc4.5/bin/gcc LLVM_CONFIG=/sw/lib/llvm/bin/llvm-config CC=gcc-4 CCX=g++-4 LDFLAGS=-L/sw/lib make CPPFLAGS="-DENABLE_LTO -I/sw/include" How do you build llvm? I am using... Info2: << Package: llvm Version: 2.799 Revision: 101114 #Source: http://llvm.org/releases/%v/llvm-%v.tar.gz Source: http://llvm.org/releases/%v/llvm-2.8.tar.gz Source-MD5: d317d277e97c3852994bb4dcaadf1591 SourceDirectory: llvm-2.8 Type: -64bit . Architecture: x86_64 BuildDepends: fink (>= 0.28) ConfigureParams: << --prefix=%p/lib/llvm --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` mkdir ../llvm_objdir cd ../llvm_objdir # ../llvm-%v/configure %c --enable-optimized --enable-assertions --enable-pic --enable-targets=host-only ../llvm-2.8/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/gccas %i/bin/gccas ln -s %p/lib/llvm/bin/gccld %i/bin/gccld 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-db %i/bin/llvm-db 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 << SplitOff: << Package: %N-shlibs Files: << lib/llvm/lib/libEnhancedDisassembly.dylib lib/llvm/lib/libLLVMHello.dylib lib/llvm/lib/libprofile_rt.dylib lib/llvm/lib/libLTO.dylib << Shlibs: << !%p/lib/llvm/lib/libEnhancedDisassembly.dylib !%p/lib/llvm/lib/libLLVMHello.dylib !%p/lib/llvm/lib/libprofile_rt.dylib %p/lib/llvm/lib/libLTO.dylib 0.0.0 %n (>= 2.7-1) 64 << << License: GPL Description: Low Level Virtual Machine Compiler DescDetail: << A compilation strategy designed to enable effective program optimization across the entire lifetime of a program. LLVM 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. << DescPackaging: << 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: None <fink-devel at lists.sourceforge.net> <<