[LLVMdev] -O4 -fvisibility=hidden
Jack Howarth
howarth at bromo.med.uc.edu
Sat Jan 24 21:01:06 PST 2009
After trying the recommended use of -O4 -fvisibility=hidden to
compile xplor-nih with full LTO optimizations, I discovered three
symbols become undefined...
llvm-gcc-4 -O4 -fvisibility=hidden -o xplor xplor.o \
\
-L. -lxplorCmd -lxplor -L/Users/howarth/xplor-nih-2.21/bin.Darwin_9_x86/ -lfft -lintVar -lvmd -lpy -lswigpy-xplor -ltclXplor -lswigtcl8-xplor -lnmrPot -lcommon -lmarvin \
-lcrypto -L/sw/lib/llvm-gcc-4.2/lib -lgfortran -llapack -lblas -L/Users/howarth/xplor-nih-2.21/bin.Darwin_9_x86/ \
Undefined symbols:
"_xplorwrapproc_slave_", referenced from:
llvm bitcode in xplor.o
"_python_interp_", referenced from:
llvm bitcode in xplor.o
"_tcl_interp_", referenced from:
llvm bitcode in xplor.o
ld: symbol(s) not found
These are all defined as extern as follows...
extern "C" void
FORTRAN(tcl_interp) (const long& canReturn,
long& qterm,
long& fd)
extern "C" void
FORTRAN(python_init)(const long& argc,
char** argv)
extern "C" void FORTRAN(xplorwrapproc_slave)();
The only symbols that become undefined are those extern
symbols which calling fortran routines from c++ code.
I'll look into creating a testcase and opening a PR for
this issue.
Jack
More information about the llvm-dev
mailing list