configure: use do_cc when checking for -fstack-protector support
MacOSX clang silently swallows unrecognized -f options when doing a link with '-framework' also on the command line, so to detect support for the various -fstack-protector options we must do a plain .c to .o compile, not a complete compile-and-link. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Message-id: 1397041487-28477-1-git-send-email-peter.maydell@linaro.org
This commit is contained in:
		
							parent
							
								
									efcc87d9ae
								
							
						
					
					
						commit
						0a9077ea14
					
				
							
								
								
									
										2
									
								
								configure
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								configure
									
									
									
									
										vendored
									
									
								
							@ -1448,7 +1448,7 @@ done
 | 
				
			|||||||
if test "$stack_protector" != "no" ; then
 | 
					if test "$stack_protector" != "no" ; then
 | 
				
			||||||
  gcc_flags="-fstack-protector-strong -fstack-protector-all"
 | 
					  gcc_flags="-fstack-protector-strong -fstack-protector-all"
 | 
				
			||||||
  for flag in $gcc_flags; do
 | 
					  for flag in $gcc_flags; do
 | 
				
			||||||
    if compile_prog "-Werror $flag" "" ; then
 | 
					    if do_cc $QEMU_CFLAGS -Werror $flag -c -o $TMPO $TMPC ; then
 | 
				
			||||||
      QEMU_CFLAGS="$QEMU_CFLAGS $flag"
 | 
					      QEMU_CFLAGS="$QEMU_CFLAGS $flag"
 | 
				
			||||||
      LIBTOOLFLAGS="$LIBTOOLFLAGS -Wc,$flag"
 | 
					      LIBTOOLFLAGS="$LIBTOOLFLAGS -Wc,$flag"
 | 
				
			||||||
      break
 | 
					      break
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user