Changeset - r20913:0d38c4765300
[Not reviewed]
master
0 1 0
rubidium - 11 years ago 2013-11-09 07:15:01
rubidium@openttd.org
(svn r25960) -Fix-ish: make it less likely to trigger clang's hang with -D_FORTIFY_SOURCE=2 -O1
1 file changed with 6 insertions and 2 deletions:
0 comments (0 inline, 0 general)
config.lib
Show inline comments
 
@@ -1452,18 +1452,22 @@ make_cflags_and_ldflags() {
 
		else
 
			CFLAGS="$CFLAGS -O2"
 
		fi
 
	fi
 

	
 
	if [ $enable_debug -le 2 ]; then
 
		if basename "$cc_host" | grep "gcc" &>/dev/null; then
 
		cc_host_is_gcc=`basename "$cc_host" | grep "gcc" &>/dev/null`
 
		if [ -n "$cc_host_is_gcc" ]; then
 
			# Define only when compiling with GCC. Some GLIBC versions use GNU
 
			# extensions in a way that breaks build with at least ICC.
 
			# This requires -O1 or more, so debug level 3 (-O0) is excluded.
 
			CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=2"
 

	
 
		fi
 

	
 
		cc_build_is_gcc=`basename "$cc_build" | grep "gcc" &>/dev/null`
 
		if [ -n "$cc_build_is_gcc" ]; then
 
			# Just add -O1 to the tools needed for building.
 
			CFLAGS_BUILD="$CFLAGS_BUILD -D_FORTIFY_SOURCE=2 -O1"
 
		fi
 
	fi
 

	
 
	if [ "$os" = "OSX" ] && [ $cc_version -eq 40 ]; then
0 comments (0 inline, 0 general)