With the Sun/Oracle compiler, libtool uses 'cc' for linking. For
OpenMP programs, the version of the compiler I am using (Sun C 5.9
SunOS_i386 Patch 124868-15 2010/08/11) warns like this:
CCLD coders/art.la
cc: Warning: Specify a supported level of optimization when using -xopenmp,
-xopenmp will not set an optimization level in a future release. Optimization
level changed to 3 to support -xopenmp
or with full detail:
libtool: link: /opt/SUNWspro/bin/cc -xc99=all -G -z defs -M
coders/.libs/art.so.exp -h art.so -o coders/.libs/art.so
coders/.libs/coders_art_la-art.o
-R/home/bfriesen/build/GM-16-modules-suncc/magick/.libs -R/usr/local/lib
-R/usr/local/lib -R/usr/openwin/lib -L/usr/local/lib -L/usr/openwin/lib
-L/usr/lib magick/.libs/libGraphicsMagick.so /usr/local/lib/liblcms2.so
/usr/local/lib/libfreetype.so -lXext -lSM -lICE -lX11 -lsocket -lnsl
/usr/local/lib/liblzma.so -lbz2 -lz -lm -lmtsk -lpthread
/usr/local/lib/libltdl.so -lc -xopenmp -m32 -Wl,-zlazyload -xopenmp
cc: Warning: Specify a supported level of optimization when using -xopenmp,
-xopenmp will not set an optimization level in a future release. Optimization
level changed to 3 to support -xopenmp
This warning suggests that sometime in the future this compiler may
not successfully link an application/library depending on OpenMP
because the compiler will require that at least -xO3 be specified at
the same time as -xopenmp.
The option comes from the associated .la file:
# Linker flags that can not go in dependency_libs.
inherited_linker_flags=' -xopenmp'
I am not sure what the best solution to this problem is. Presumably
the existing CFLAGS could be applied if the compiler is used as the
linker, but might not properly handle the case where the
application/library must link against OpenMP (due a dependency) but
otherwise does not use optimization or OpenMP.
Thoughts?
Bob
--
Bob Friesenhahn
bfrie...@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer, http://www.GraphicsMagick.org/
_______________________________________________
https://lists.gnu.org/mailman/listinfo/libtool