Ignore:
Timestamp:
01/05/2011 22:14:59 (13 months ago)
Author:
jamesog
Message:

Unbreak Solaris build: skip checking for -rdynamic with gcc as it's broken but yet returns 0 - this causes autoconf to think that the check succeeded when gcc actually threw an error. Bad gcc!

File:
1 edited

Legend:

Unmodified
Added
Removed
  • box/trunk/configure.ac

    r2891 r2952  
    2727  AC_SUBST([CXXFLAGS_STRICT], ['-Wall -Wundef']) 
    2828 
    29   # Check whether gcc supports -rdynamic, thanks to Steve Ellcey 
    30   # [http://readlist.com/lists/gcc.gnu.org/gcc/6/31502.html] 
    31   # This is needed to get symbols in backtraces. 
    32   # Note that this apparently fails on HP-UX 
    33   LDFLAGS="$LDFLAGS -rdynamic" 
    34   AC_MSG_CHECKING([whether gcc accepts -rdynamic]) 
    35   AC_TRY_LINK([], [return 0;], 
    36     [AC_MSG_RESULT([yes]); have_rdynamic=yes], 
    37     [AC_MSG_RESULT([no])]) 
    38   if test x"$have_rdynamic" = x"yes" ; then 
    39     AC_SUBST([LDADD_RDYNAMIC], ['-rdynamic']) 
    40   fi 
     29  # Don't check for gcc -rdynamic on Solaris as it's broken, but returns 0. 
     30  case $build_os in 
     31  solaris*) 
     32    AC_MSG_NOTICE([skipping check for -rdynamic check on Solaris]) 
     33    ;; 
     34  *) 
     35    # Check whether gcc supports -rdynamic, thanks to Steve Ellcey 
     36    # [http://readlist.com/lists/gcc.gnu.org/gcc/6/31502.html] 
     37    # This is needed to get symbols in backtraces. 
     38    # Note that this apparently fails on HP-UX and Solaris 
     39    LDFLAGS="$LDFLAGS -rdynamic" 
     40    AC_MSG_CHECKING([whether gcc accepts -rdynamic]) 
     41    AC_TRY_LINK([], [return 0;], 
     42      [AC_MSG_RESULT([yes]); have_rdynamic=yes], 
     43      [AC_MSG_RESULT([no])]) 
     44    if test x"$have_rdynamic" = x"yes" ; then 
     45      AC_SUBST([LDADD_RDYNAMIC], ['-rdynamic']) 
     46    fi 
     47    ;; 
     48  esac 
    4149fi 
    4250 
Note: See TracChangeset for help on using the changeset viewer.