Merge branch 'crashlog_improvements' into jgrpp

This commit is contained in:
Jonathan G Rennison
2016-09-08 19:41:53 +01:00
3 changed files with 16 additions and 11 deletions

View File

@@ -1589,8 +1589,11 @@ make_cflags_and_ldflags() {
cc_build_is_gcc=`basename "$cc_build" | grep "gcc" 2>/dev/null`
if [ -n "$cc_build_is_gcc" ]; then
# Just add -O1 to the tools needed for building.
# Add -O1 and fortify source to the tools needed for building, on gcc
CFLAGS_BUILD="$CFLAGS_BUILD -D_FORTIFY_SOURCE=2 -O1"
elif [ -n "`basename "$cc_build" | grep "clang" 2>/dev/null`" ]; then
# Add -O1 to the tools needed for building, on clang
CFLAGS_BUILD="$CFLAGS_BUILD -O1"
fi
fi
@@ -1729,7 +1732,11 @@ EOL
if [ -n "$LIBBFD_LIBS" -o -n "$HAVE_GDB_DBG" ]; then
if [ $enable_debug -lt 1 ] && [ "$with_bfd_extra_debug" = "1" ]; then
CFLAGS="$CFLAGS -g1"
if [ -n "`basename "$cc_host" | grep "clang" 2>/dev/null`" ]; then
CFLAGS="$CFLAGS -gline-tables-only"
else
CFLAGS="$CFLAGS -g1"
fi
fi
fi