[cfe-dev] clang with mingw feedback

Vincent R. forumer at smartmobili.com
Fri Jan 22 17:07:30 CST 2010


Hi,

I am trying to compile clang on windows using lateste msys/mingw on
Windows 7 and I get a compilation error :

llvm[4]: Linking Debug executable clang
"C:/Developer/msys/1.0/bin/ld.exe": warning: --export-dynamic is not
supported for PE targets, did you mean --export-all-symbols?
C:/Developer/msys/1.0/home/Vincent/tmp/llvm/Debug/lib/libLLVMCodeGen.a:
could not read symbols: Memory exhausted
collect2: ld returned 1 exit status
make[4]: *** [/home/Vincent/tmp/llvm/Debug/bin/clang.exe] Error 1
make[4]: Leaving directory
`/home/Vincent/tmp/llvm/tools/clang/tools/driver'

I suppose this problem is in the way autotools are configured, as the
message says I suppose it should be --export-all-symbols.
About the memory exhausted it may be due to some bug on msys so I will
retry mingw from a linux box.
I search for "--export-dynamic and here is the result :

Makefile.config:RDYNAMIC := -Wl,-export-dynamic
autoconf/configure.ac:dnl Determine whether the linker supports the
-export-dynamic option.
autoconf/configure.ac:  RDYNAMIC="-Wl,-export-dynamic"
autoconf/ltmain.sh:      -export-dynamic)
autoconf/ltmain.sh:	# If -module or -export-dynamic was specified, set the
dlname.
autoconf/ltmain.sh:	  test -n "$library_names" && $echo "$modename:
warning: \`$file' was not linked with \`-export-dynamic'"
autoconf/ltmain.sh:  -export-dynamic   allow symbols from OUTPUT-FILE to
be resolved with dlsym(3)
autoconf/m4/libtool.m4:    _LT_AC_TAGVAR(export_dynamic_flag_spec,
$1)='${wl}--export-dynamic'
autoconf/m4/libtool.m4:	_LT_AC_TAGVAR(export_dynamic_flag_spec,
$1)='${wl}--export-dynamic'
autoconf/m4/libtool.m4:	_LT_AC_TAGVAR(export_dynamic_flag_spec,
$1)='${wl}--export-dynamic'
autoconf/m4/libtool.m4:	_LT_AC_TAGVAR(export_dynamic_flag_spec,
$1)='${wl}--export-dynamic'
autoconf/m4/libtool.m4:    _LT_AC_TAGVAR(export_dynamic_flag_spec,
$1)='${wl}--export-dynamic'
autoconf/m4/link_options.m4:[AC_CACHE_CHECK([for compiler
-Wl,-export-dynamic option],
autoconf/m4/link_options.m4:  CFLAGS="$CFLAGS -Wl,-export-dynamic"
autoconf/m4/link_options.m4: 
AC_DEFINE([HAVE_LINK_EXPORT_DYNAMIC],[1],[Define if you can use
-Wl,-export-dynamic.])
config.status:s, at RDYNAMIC@,|#_!!_#|-Wl\,-export-dynamic,g
configure:{ echo "$as_me:$LINENO: checking for compiler
-Wl,-export-dynamic option" >&5
configure:echo $ECHO_N "checking for compiler -Wl,-export-dynamic
option... $ECHO_C" >&6; }
configure:  CFLAGS="$CFLAGS -Wl,-export-dynamic"
configure:    export_dynamic_flag_spec='${wl}--export-dynamic'
configure:    export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
configure:	export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
configure:	export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
configure:	export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
configure:    export_dynamic_flag_spec_F77='${wl}--export-dynamic'
configure:    export_dynamic_flag_spec_GCJ='${wl}--export-dynamic'
configure:  RDYNAMIC="-Wl,-export-dynamic"
include/llvm/Config/config.h:/* Define if you can use -Wl,-export-dynamic.
*/
include/llvm/Config/config.h.in:/* Define if you can use
-Wl,-export-dynamic. */
lib/ExecutionEngine/JIT/Intercept.cpp: * linking with libc_nonshared.a and
-Wl,--export-dynamic doesn't make 'stat' 
mklib:export_dynamic_flag_spec="\${wl}--export-dynamic"
mklib:      -export-dynamic)
mklib:	# If -module or -export-dynamic was specified, set the dlname.
mklib:	  test -n "$library_names" && $echo "$modename: warning: \`$file'
was not linked with \`-export-dynamic'"
mklib:  -export-dynamic   allow symbols from OUTPUT-FILE to be resolved
with dlsym(3)
mklib:export_dynamic_flag_spec="\${wl}--export-dynamic"
mklib:export_dynamic_flag_spec="\${wl}--export-dynamic"
tools/llvm-ld/Optimize.cpp:static cl::alias
ExportDynamic("export-dynamic",


Which one should I modify ?



More information about the cfe-dev mailing list