[PATCH] Fix SunCC _mcount problem
Mladen Turk <[email protected]>
| Newsgroups | gmane.comp.db.unixodbc.devel |
|---|---|
| Organization | Red Hat, Inc. |
| Message-ID | <[email protected]> |
Hi, SunCC uses -pt flag to turn on profiling mode at compile and link time. Now if -pthread is supplied it will got mistakenly interpreted with -pt and you'll got an ld: extra '-h' warning Fix is simple, caused by a typo in configure.in. Test for if test "x$ac_cv_prog_gcc"="xyes" will always eval to true cause it misses spaces around '=' so it will add -pthread instead -mt on non-gcc compilers. Attached a svn diff to trunk. It can be probably directly applied to all existing branches as well. Regards -- ^TM _______________________________________________ unixODBC-dev mailing list [email protected] http://mailman.unixodbc.org/mailman/listinfo/unixodbc-dev
fix-pthread-flags.diff
(text/plain, 1.2 KB)
Index: configure.in
===================================================================
--- configure.in (revision 25)
+++ configure.in (working copy)
@@ -327,7 +327,7 @@
AC_DEFINE([HAVE_LIBPTHREAD], [1], [Use -lpthread threading lib])
gotthread="yes";
THREADLIB="-lpthread"
- if test "x$ac_cv_prog_gcc"="xyes"; then
+ if test "x$ac_cv_prog_gcc" = "xyes"; then
dnl Check if the compiler will build with -pthread as a option
AC_CHECK_COMP_OPT(pthread)
else
@@ -343,7 +343,7 @@
AC_DEFINE(HAVE_LIBPTHREAD,1)
gotthread="yes";
THREADLIB=""
- if test "x$ac_cv_prog_gcc"="xyes"; then
+ if test "x$ac_cv_prog_gcc" = "xyes"; then
dnl Check if the compiler will build with -pthread as a option
AC_CHECK_COMP_OPT(pthread)
else
@@ -354,7 +354,7 @@
fi
if test "x$gotthread" = "xno"; then
- if test "x$ac_cv_prog_gcc"="xyes"; then
+ if test "x$ac_cv_prog_gcc" = "xyes"; then
dnl This is for freebsd that needs -lpthread before it finds the lib
AC_CHECK_COMP_OPT(pthread)
AC_CHECK_LIBPT_NOC(c, pthread_mutex_lock,