Is anyone building dragon-egg on darwin? I am trying to build against the fink gcc45 package that I have prepared for darwin and a updated fink llvm 2.7 package that is built as... ../llvm-2.7/configure --prefix=/sw --prefix=/sw/lib/llvm --mandir=/sw/share/man --infodir=/sw/share/info --with-gmp=/sw --with-libiconv-prefix=/usr --with-system-zlib --with-as=/Developer/usr/bin/as --with-ld=/Developer/usr/bin/ld --with-nm=/Developer/usr/bin/nm --enable-optimized --enable-assertions --enable-pic --enable-targets=host-only Since the gcc45 package installs symlinks to the compilers in /sw/bin as gcc-4, g++-4, etc, I executed... GCC=/sw/bin/gcc-4 LLVM_CONFIG=/sw/lib/llvm/bin/llvm-config make This fails with... g++ -c -I/sw/lib/llvm/include -D_DEBUG -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -MD -MP -DIN_GCC -DREVISION=\"100909M\" -DTARGET_NAME=\"x86_64-apple-darwin10.3.0\" -I/Users/howarth/llvm_svn/dragonegg -Iplugin/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/utils/target.cpp <command-line>: error: "__STDC_LIMIT_MACROS" redefined <command-line>: error: this is the location of the previous definition <command-line>: error: "__STDC_CONSTANT_MACROS" redefined <command-line>: error: this is the location of the previous definition make: *** [target.o] Error 1 with GCC apparently being insufficent to redirect the compilers. Instead, I had to use... GCC=/sw/bin/gcc-4 CC=/sw/bin/gcc-4 CXX=/sw/bin/g++-4 LLVM_CONFIG=/sw/lib/llvm/bin/llvm-config make This however fails with... /sw/bin/gcc-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=\"100909M\" -DTARGET_NAME=\"x86_64-apple-darwin10.3.0\" -I/Users/howarth/llvm_svn/dragonegg -Iplugin/include -I/Users/howarth/llvm_svn/dragonegg/x86 -I/Users/howarth/llvm_svn/dragonegg/darwin -Wall -Werror -I/sw/lib/llvm/include -D_DEBUG -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -O2 -fno-common /Users/howarth/llvm_svn/dragonegg/llvm-cache.c In file included from /Users/howarth/llvm_svn/dragonegg/llvm-cache.c:28:0: /Users/howarth/llvm_svn/dragonegg/llvm-cache.h:31:20: fatal error: config.h: No such file or directory compilation terminated. make: *** [llvm-cache.o] Error 1 If I manually run /sw/lib/llvm/bin/llvm-config, I get... bash-3.2$ /sw/lib/llvm/bin/llvm-config --prefix /sw/lib/llvm bash-3.2$ /sw/lib/llvm/bin/llvm-config --src-root /sw/src/fink.build/llvm-2.7-1/llvm-2.7 bash-3.2$ /sw/lib/llvm/bin/llvm-config --obj-root /sw/src/fink.build/llvm-2.7-1/llvm_objdir bash-3.2$ /sw/lib/llvm/bin/llvm-config --bindir /sw/lib/llvm/bin bash-3.2$ /sw/lib/llvm/bin/llvm-config --includedir /sw/lib/llvm/include bash-3.2$ /sw/lib/llvm/bin/llvm-config --libdir /sw/lib/llvm/lib bash-3.2$ /sw/lib/llvm/bin/llvm-config --cppflags -I/sw/lib/llvm/include -D_DEBUG -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS bash-3.2$ /sw/lib/llvm/bin/llvm-config --cflags -I/sw/lib/llvm/include -D_DEBUG -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -O2 -fno-common bash-3.2$ /sw/lib/llvm/bin/llvm-config --cxxflags -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 bash-3.2$ /sw/lib/llvm/bin/llvm-config --ldflags -L/sw/lib/llvm/lib -lpthread -lm bash-3.2$ /sw/lib/llvm/bin/llvm-config --libs -lLLVMLinker -lLLVMipo -lLLVMInterpreter -lLLVMInstrumentation -lLLVMJIT -lLLVMExecutionEngine -lLLVMBitWriter -lLLVMX86Disassembler -lLLVMX86AsmParser -lLLVMMCParser -lLLVMX86AsmPrinter -lLLVMX86CodeGen -lLLVMSelectionDAG -lLLVMX86Info -lLLVMAsmPrinter -lLLVMCodeGen -lLLVMScalarOpts -lLLVMInstCombine -lLLVMTransformUtils -lLLVMipa -lLLVMAsmParser -lLLVMArchive -lLLVMBitReader -lLLVMAnalysis -lLLVMTarget -lLLVMMC -lLLVMCore -lLLVMSupport -lLLVMSystem bash-3.2$ /sw/lib/llvm/bin/llvm-config --libnames libLLVMLinker.a libLLVMipo.a libLLVMInterpreter.a libLLVMInstrumentation.a libLLVMJIT.a libLLVMExecutionEngine.a libLLVMBitWriter.a libLLVMX86Disassembler.a libLLVMX86AsmParser.a libLLVMMCParser.a libLLVMX86AsmPrinter.a libLLVMX86CodeGen.a libLLVMSelectionDAG.a libLLVMX86Info.a libLLVMAsmPrinter.a libLLVMCodeGen.a libLLVMScalarOpts.a libLLVMInstCombine.a libLLVMTransformUtils.a libLLVMipa.a libLLVMAsmParser.a libLLVMArchive.a libLLVMBitReader.a libLLVMAnalysis.a libLLVMTarget.a libLLVMMC.a libLLVMCore.a libLLVMSupport.a libLLVMSystem.a bash-3.2$ /sw/lib/llvm/bin/llvm-config --components all analysis archive asmparser asmprinter backend bitreader bitwriter codegen core engine executionengine instcombine instrumentation interpreter ipa ipo jit linker mc mcparser native nativecodegen scalaropts selectiondag support system target transformutils x86 x86asmparser x86asmprinter x86codegen x86disassembler x86info bash-3.2$ /sw/lib/llvm/bin/llvm-config --targets-built x86 bash-3.2$ /sw/lib/llvm/bin/llvm-config --host-target x86_64-apple-darwin10.3.0 bash-3.2$ /sw/lib/llvm/bin/llvm-config --build-mode Release Out of those, actually the --src-root and --obj-root mess up and output... bash-3.2$ /sw/lib/llvm/bin/llvm-config --obj-root /sw/src/fink.build/llvm-2.7-1/llvm_objdirbash-3.2$ and bash-3.2$ /sw/lib/llvm/bin/llvm-config --src-root /sw/src/fink.build/llvm-2.7-1/llvm-2.7bash-3.2$ with a missing newline after the output. It seems that dragonegg gets confused by the fact that llvm actually installs the headers in... /sw/lib/llvm/include/llvm and /sw/lib/llvm/include/llvm-c rather than directly into /sw/lib/llvm/include. Jack
On Fri, Apr 09, 2010 at 10:23:12PM -0400, Jack Howarth wrote:> Is anyone building dragon-egg on darwin? I am trying > to build against the fink gcc45 package that I have prepared > for darwin and a updated fink llvm 2.7 package that is built > as... > > ../llvm-2.7/configure --prefix=/sw --prefix=/sw/lib/llvm --mandir=/sw/share/man --infodir=/sw/share/info --with-gmp=/sw --with-libiconv-prefix=/usr --with-system-zlib --with-as=/Developer/usr/bin/as --with-ld=/Developer/usr/bin/ld --with-nm=/Developer/usr/bin/nm --enable-optimized --enable-assertions --enable-pic --enable-targets=host-only > > Since the gcc45 package installs symlinks to the compilers > in /sw/bin as gcc-4, g++-4, etc, I executed... > > GCC=/sw/bin/gcc-4 LLVM_CONFIG=/sw/lib/llvm/bin/llvm-config make > > This fails with... > > g++ -c -I/sw/lib/llvm/include -D_DEBUG -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -MD -MP -DIN_GCC -DREVISION=\"100909M\" -DTARGET_NAME=\"x86_64-apple-darwin10.3.0\" -I/Users/howarth/llvm_svn/dragonegg -Iplugin/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/utils/target.cpp > <command-line>: error: "__STDC_LIMIT_MACROS" redefined > <command-line>: error: this is the location of the previous definition > <command-line>: error: "__STDC_CONSTANT_MACROS" redefined > <command-line>: error: this is the location of the previous definition > make: *** [target.o] Error 1 > > with GCC apparently being insufficent to redirect the compilers. Instead, I had to use... > > GCC=/sw/bin/gcc-4 CC=/sw/bin/gcc-4 CXX=/sw/bin/g++-4 LLVM_CONFIG=/sw/lib/llvm/bin/llvm-config make > > This however fails with... > > /sw/bin/gcc-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=\"100909M\" -DTARGET_NAME=\"x86_64-apple-darwin10.3.0\" -I/Users/howarth/llvm_svn/dragonegg -Iplugin/include -I/Users/howarth/llvm_svn/dragonegg/x86 -I/Users/howarth/llvm_svn/dragonegg/darwin -Wall -Werror -I/sw/lib/llvm/include -D_DEBUG -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -O2 -fno-common /Users/howarth/llvm_svn/dragonegg/llvm-cache.c > In file included from /Users/howarth/llvm_svn/dragonegg/llvm-cache.c:28:0: > /Users/howarth/llvm_svn/dragonegg/llvm-cache.h:31:20: fatal error: config.h: No such file or directory > compilation terminated. > make: *** [llvm-cache.o] Error 1 > > If I manually run /sw/lib/llvm/bin/llvm-config, I get... > > bash-3.2$ /sw/lib/llvm/bin/llvm-config --prefix > /sw/lib/llvm > bash-3.2$ /sw/lib/llvm/bin/llvm-config --src-root > /sw/src/fink.build/llvm-2.7-1/llvm-2.7 > bash-3.2$ /sw/lib/llvm/bin/llvm-config --obj-root > /sw/src/fink.build/llvm-2.7-1/llvm_objdir > bash-3.2$ /sw/lib/llvm/bin/llvm-config --bindir > /sw/lib/llvm/bin > bash-3.2$ /sw/lib/llvm/bin/llvm-config --includedir > /sw/lib/llvm/include > bash-3.2$ /sw/lib/llvm/bin/llvm-config --libdir > /sw/lib/llvm/lib > bash-3.2$ /sw/lib/llvm/bin/llvm-config --cppflags > -I/sw/lib/llvm/include -D_DEBUG -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS > bash-3.2$ /sw/lib/llvm/bin/llvm-config --cflags > -I/sw/lib/llvm/include -D_DEBUG -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -O2 -fno-common > bash-3.2$ /sw/lib/llvm/bin/llvm-config --cxxflags > -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 > bash-3.2$ /sw/lib/llvm/bin/llvm-config --ldflags > -L/sw/lib/llvm/lib -lpthread -lm > bash-3.2$ /sw/lib/llvm/bin/llvm-config --libs > -lLLVMLinker -lLLVMipo -lLLVMInterpreter -lLLVMInstrumentation -lLLVMJIT -lLLVMExecutionEngine -lLLVMBitWriter -lLLVMX86Disassembler -lLLVMX86AsmParser -lLLVMMCParser -lLLVMX86AsmPrinter -lLLVMX86CodeGen -lLLVMSelectionDAG -lLLVMX86Info -lLLVMAsmPrinter -lLLVMCodeGen -lLLVMScalarOpts -lLLVMInstCombine -lLLVMTransformUtils -lLLVMipa -lLLVMAsmParser -lLLVMArchive -lLLVMBitReader -lLLVMAnalysis -lLLVMTarget -lLLVMMC -lLLVMCore -lLLVMSupport -lLLVMSystem > bash-3.2$ /sw/lib/llvm/bin/llvm-config --libnames > libLLVMLinker.a libLLVMipo.a libLLVMInterpreter.a libLLVMInstrumentation.a libLLVMJIT.a libLLVMExecutionEngine.a libLLVMBitWriter.a libLLVMX86Disassembler.a libLLVMX86AsmParser.a libLLVMMCParser.a libLLVMX86AsmPrinter.a libLLVMX86CodeGen.a libLLVMSelectionDAG.a libLLVMX86Info.a libLLVMAsmPrinter.a libLLVMCodeGen.a libLLVMScalarOpts.a libLLVMInstCombine.a libLLVMTransformUtils.a libLLVMipa.a libLLVMAsmParser.a libLLVMArchive.a libLLVMBitReader.a libLLVMAnalysis.a libLLVMTarget.a libLLVMMC.a libLLVMCore.a libLLVMSupport.a libLLVMSystem.a > bash-3.2$ /sw/lib/llvm/bin/llvm-config --components > all analysis archive asmparser asmprinter backend bitreader bitwriter codegen core engine executionengine instcombine instrumentation interpreter ipa ipo jit linker mc mcparser native nativecodegen scalaropts selectiondag support system target transformutils x86 x86asmparser x86asmprinter x86codegen x86disassembler x86info > bash-3.2$ /sw/lib/llvm/bin/llvm-config --targets-built > x86 > bash-3.2$ /sw/lib/llvm/bin/llvm-config --host-target > x86_64-apple-darwin10.3.0 > bash-3.2$ /sw/lib/llvm/bin/llvm-config --build-mode > Release > > Out of those, actually the --src-root and --obj-root mess up and > output... > > bash-3.2$ /sw/lib/llvm/bin/llvm-config --obj-root > /sw/src/fink.build/llvm-2.7-1/llvm_objdirbash-3.2$ > > and > > bash-3.2$ /sw/lib/llvm/bin/llvm-config --src-root > /sw/src/fink.build/llvm-2.7-1/llvm-2.7bash-3.2$ > > with a missing newline after the output. It seems that > dragonegg gets confused by the fact that llvm actually > installs the headers in... > > /sw/lib/llvm/include/llvm > > and > > /sw/lib/llvm/include/llvm-c > > rather than directly into /sw/lib/llvm/include. > Jack >If I compare how my llvm-gcc42 package builds against the llvm package files, I find... g++ -c -g -O2 -mdynamic-no-pic -DIN_GCC -W -Wall -Wwrite-strings -pedantic -Wno-long-long -Wno-variadic-macros -Wmissing-format-attribute -mdynamic-no-pic -DHAVE_CONFIG_H -Wno-unused -DTARGET_NAME=\"x86_64-apple-darwin10.3.0\" -frandom-seed=0 -DNDEBUG -I. -I. -I../../llvm-gcc4.2-2.7.source/gcc -I../../llvm-gcc4.2-2.7.source/gcc/. -I../../llvm-gcc4.2-2.7.source/gcc/../include -I../../llvm-gcc4.2-2.7.source/gcc/../libcpp/include -I/sw/include -I../../llvm-gcc4.2-2.7.source/gcc/../libdecnumber -I../libdecnumber -I/sw/lib/llvm/include -I/sw/include -DENABLE_LLVM -I/sw/lib/llvm/include -D_DEBUG -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -I. -I. -I../../llvm-gcc4.2-2.7.source/gcc -I../../llvm-gcc4.2-2.7.source/gcc/. -I../../llvm-gcc4.2-2.7.source/gcc/../include -I../../llvm-gcc4.2-2.7.source/gcc/../libcpp/include -I/sw/include -I../../llvm-gcc4.2-2.7.source/gcc/../libdecnumber -I../libdecnumber -I/sw/lib/llvm/include ../../llvm-gcc4.2-2.7.source/gcc/llvm-main.cpp -o llvm-main.o where in ../../llvm-gcc4.2-2.7.source/gcc/llvm-main.cpp, we have... #include "llvm/Support/ErrorHandling.h" #include "llvm/Support/PrettyStackTrace.h" Shouldn't dragonegg be doing the same...providing explicit paths from what 'llvm-config --includedir' returns? Where exactly are some of these headers supposed to be coming from in llvm-cache.h? #include "config.h" #include "system.h" #include "coretypes.h" #include "target.h" #include "tree.h" Shouldn't some of these have explicit paths like... #include "llvm/Config/config.h" or #include "llvm/Target/target.h" as is the case in llvm-gcc4.2? Jack> > > > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
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 I am trying> to build against the fink gcc45 package that I have prepared > for darwin and a updated fink llvm 2.7 package that is built > as... > > ../llvm-2.7/configure --prefix=/sw --prefix=/sw/lib/llvm --mandir=/sw/share/man --infodir=/sw/share/info --with-gmp=/sw --with-libiconv-prefix=/usr --with-system-zlib --with-as=/Developer/usr/bin/as --with-ld=/Developer/usr/bin/ld --with-nm=/Developer/usr/bin/nm --enable-optimized --enable-assertions --enable-pic --enable-targets=host-only > > Since the gcc45 package installs symlinks to the compilers > in /sw/bin as gcc-4, g++-4, etc, I executed... > > GCC=/sw/bin/gcc-4 LLVM_CONFIG=/sw/lib/llvm/bin/llvm-config make > > This fails with... > > g++ -c -I/sw/lib/llvm/include -D_DEBUG -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -MD -MP -DIN_GCC -DREVISION=\"100909M\" -DTARGET_NAME=\"x86_64-apple-darwin10.3.0\" -I/Users/howarth/llvm_svn/dragonegg -Iplugin/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/utils/target.cpp > <command-line>: error: "__STDC_LIMIT_MACROS" redefined > <command-line>: error: this is the location of the previous definition > <command-line>: error: "__STDC_CONSTANT_MACROS" redefined > <command-line>: error: this is the location of the previous definition > make: *** [target.o] Error 1 > > with GCC apparently being insufficent to redirect the compilers. Instead, I had to use... > > GCC=/sw/bin/gcc-4 CC=/sw/bin/gcc-4 CXX=/sw/bin/g++-4 LLVM_CONFIG=/sw/lib/llvm/bin/llvm-config makeThat's correct. There is no need to build dragonegg with gcc-4.5; gcc-4.5 is the target of the plugin, which is different. You inform the makefile that the plugin is for gcc-4.5 using "GCC=...", and as usual you say what compiler to use to build dragonegg using CC/CXX.> > This however fails with... > > /sw/bin/gcc-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=\"100909M\" -DTARGET_NAME=\"x86_64-apple-darwin10.3.0\" -I/Users/howarth/llvm_svn/dragonegg -Iplugin/include -I/Users/howarth/llvm_svn/dragonegg/x86 -I/Users/howarth/llvm_svn/dragonegg/darwin -Wall -Werror -I/sw/lib/llvm/include -D_DEBUG -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -O2 -fno-common /Users/howarth/llvm_svn/dragonegg/llvm-cache.c > In file included from /Users/howarth/llvm_svn/dragonegg/llvm-cache.c:28:0: > /Users/howarth/llvm_svn/dragonegg/llvm-cache.h:31:20: fatal error: config.h: No such file or directoryThis is a gcc-4.5 "plugin header file". You can ask gcc where to find these by doing: /sw/bin/gcc-4 -print-file-name=plugin On my machine this returns /usr/local/gnat-fsf/lib/gcc/x86_64-unknown-linux-gnu/4.5.0/plugin I suspect that your gcc-4.5 was built without plugin support, and that because of this you aren't getting a path here.> If I manually run /sw/lib/llvm/bin/llvm-config, I get...These aren't llvm headers, so llvm-config is not relevant here. Ciao, Duncan.
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