Просмотр исходного кода

Merge branch 'gcc-rpath' into next

* gcc-rpath:
  Fix GCC port usage on FreeBSD where clang is not default.

Conflicts:
	doc/UPDATES
Bryan Drewery 11 лет назад
Родитель
Сommit
4cee661cbe
4 измененных файлов с 39 добавлено и 0 удалено
  1. 1 0
      build/autotools/configure.ac
  2. 16 0
      build/autotools/includes/acinclude.m4
  3. 20 0
      configure
  4. 2 0
      doc/UPDATES

+ 1 - 0
build/autotools/configure.ac

@@ -21,6 +21,7 @@ dnl AC_PROG_CC([gcc34 gcc-3.4 gcc33 gcc3 gcc-3.3 gcc cc c1])
 AC_REQUIRE_CPP
 AC_REQUIRE_CPP
 AX_CXX_COMPILE_STDCXX_11([noext], [mandatory])
 AX_CXX_COMPILE_STDCXX_11([noext], [mandatory])
 EGG_CHECK_CC
 EGG_CHECK_CC
+CXX_RPATH_CHECK
 
 
 #checkpoint
 #checkpoint
 AC_CACHE_SAVE 
 AC_CACHE_SAVE 

+ 16 - 0
build/autotools/includes/acinclude.m4

@@ -211,6 +211,22 @@ EOF
   fi
   fi
 ])
 ])
 
 
+dnl Fix GCC lame compiler paths (FreeBSD)
+dnl @summary check whether compiler requires -rpath for libstdc++.so
+AC_DEFUN([CXX_RPATH_CHECK],
+[
+  AC_CACHE_CHECK([whether the compiler requires -rpath], ax_cv_prog_cc_rpath, [
+    ax_cv_prog_cc_rpath=
+    for path in `${CXX} -print-search-dirs | awk '/^libraries:/ {print substr([$]0, 13)}' | tr ':' ' '`; do
+      if [[ -r "${path}/libstdc++.so" ]]; then
+        ax_cv_prog_cc_rpath="${path}"
+        LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-Wl,-rpath,${path}"
+        break
+      fi
+    done
+  ])
+])
+
 dnl  EGG_CHECK_CCSTATIC()
 dnl  EGG_CHECK_CCSTATIC()
 dnl
 dnl
 dnl  Checks whether the compiler supports the `-static' flag.
 dnl  Checks whether the compiler supports the `-static' flag.

+ 20 - 0
configure

@@ -3348,6 +3348,26 @@ fi
 
 
 
 
 
 
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler requires -rpath" >&5
+$as_echo_n "checking whether the compiler requires -rpath... " >&6; }
+if ${ax_cv_prog_cc_rpath+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+    ax_cv_prog_cc_rpath=
+    for path in `${CXX} -print-search-dirs | awk '/^libraries:/ {print substr($0, 13)}' | tr ':' ' '`; do
+      if [ -r "${path}/libstdc++.so" ]; then
+        ax_cv_prog_cc_rpath="${path}"
+        LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-Wl,-rpath,${path}"
+        break
+      fi
+    done
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_prog_cc_rpath" >&5
+$as_echo "$ax_cv_prog_cc_rpath" >&6; }
+
+
 #checkpoint
 #checkpoint
 cat >confcache <<\_ACEOF
 cat >confcache <<\_ACEOF
 # This file is a shell script that caches the results of configure
 # This file is a shell script that caches the results of configure

+ 2 - 0
doc/UPDATES

@@ -8,12 +8,14 @@ next
     will properly assign roles out to bots to not cause overlap. Only leaf
     will properly assign roles out to bots to not cause overlap. Only leaf
     bots know which bots have which roles. (#39)
     bots know which bots have which roles. (#39)
   * Add cmd_roles (leaf only) to display roles for a channel. (#39)
   * Add cmd_roles (leaf only) to display roles for a channel. (#39)
+  * Fix broken startup with GCC from ports on FreeBSD.
 
 
 master
 master
   * Require C++11 compiler support (G++ 4.7+, clang32+)
   * Require C++11 compiler support (G++ 4.7+, clang32+)
 
 
 maint
 maint
   * Fix TCL warnings during build if TCL is not being used.
   * Fix TCL warnings during build if TCL is not being used.
+  * Disable demo TCL support by default to prevent confusion during build.
 
 
 1.4.5
 1.4.5
   * Remove ahbl as it now positively identifies all hosts as abusive
   * Remove ahbl as it now positively identifies all hosts as abusive