summaryrefslogtreecommitdiff
path: root/config.lib
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-09-07 12:14:45 +0000
committerrubidium <rubidium@openttd.org>2009-09-07 12:14:45 +0000
commitd9164005212e4f6f680ee845ca85aea45de7ca4a (patch)
tree9e254d613f9fb9d7c5b3b46dddf09951eb62199d /config.lib
parent46e562527887679c422c7bdc32efe4634c20670e (diff)
downloadopenttd-d9164005212e4f6f680ee845ca85aea45de7ca4a.tar.xz
(svn r17453) -Add: crash logger for all Unixy OSes; should work for all, but I don't have all exotic machines so it might break compilation on the more exotic configurations
Diffstat (limited to 'config.lib')
-rw-r--r--config.lib17
1 files changed, 15 insertions, 2 deletions
diff --git a/config.lib b/config.lib
index 3ae524dfb..bada28c73 100644
--- a/config.lib
+++ b/config.lib
@@ -1038,13 +1038,18 @@ make_compiler_cflags() {
# $1 - compiler
# $2 - the current cflags
# $3 - variable to finally write to
+ # $4 - the current ldflags
+ # $5 - variable to finally write to
flags="$2"
+ ldflags="$4"
if [ `echo $1 | cut -c 1-3` = "icc" ]; then
# Enable some things only for certain ICC versions
cc_version=`$1 -dumpversion | cut -c 1-4`
+ flags="$flags -rdynamic"
+ ldflags="$ldflags -rdynamic"
if [ "$cc_version" = "10.1" ]; then
flags="$flags -Wno-multichar"
@@ -1094,9 +1099,17 @@ make_compiler_cflags() {
# about it's own optimized code in some places.
flags="$flags -fno-strict-overflow"
fi
+
+ has_rdynamic=`$1 -dumpspecs | grep rdynamic`
+ if [ -n "$has_rdynamic" ]; then
+ # rdynamic is used to get useful stack traces from crash reports.
+ flags="$flags -rdynamic"
+ ldflags="$ldflags -rdynamic"
+ fi
fi
eval "$3=\"$flags\""
+ eval "$5=\"$ldflags\""
}
make_cflags_and_ldflags() {
@@ -1154,8 +1167,8 @@ make_cflags_and_ldflags() {
CFLAGS="$CFLAGS -DNO_THREADS"
fi
- make_compiler_cflags "$cc_build" "$CFLAGS_BUILD" "CFLAGS_BUILD"
- make_compiler_cflags "$cc_host" "$CFLAGS" "CFLAGS"
+ make_compiler_cflags "$cc_build" "$CFLAGS_BUILD" "CFLAGS_BUILD" "$LDFLAGS_BUILD" "LDFLAGS_BUILD"
+ make_compiler_cflags "$cc_host" "$CFLAGS" "CFLAGS" "$LDFLAGS" "LDFLAGS"
if [ "`echo $1 | cut -c 1-3`" != "icc" ]; then
if [ "$os" = "CYGWIN" ]; then