configure: fix -enable-debug with newer toolchains
Fedora 17's toolchain wants optimization enabled for _FORTIFY_SOURCE; so disable _FORTIFY_SOURCE when debugging. Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
		
							parent
							
								
									8aca521512
								
							
						
					
					
						commit
						8be74dc0ba
					
				
							
								
								
									
										3
									
								
								configure
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										3
									
								
								configure
									
									
									
									
										vendored
									
									
								
							@ -256,7 +256,6 @@ QEMU_CFLAGS="-fno-strict-aliasing $QEMU_CFLAGS"
 | 
				
			|||||||
QEMU_CFLAGS="-Wall -Wundef -Wwrite-strings -Wmissing-prototypes $QEMU_CFLAGS"
 | 
					QEMU_CFLAGS="-Wall -Wundef -Wwrite-strings -Wmissing-prototypes $QEMU_CFLAGS"
 | 
				
			||||||
QEMU_CFLAGS="-Wstrict-prototypes -Wredundant-decls $QEMU_CFLAGS"
 | 
					QEMU_CFLAGS="-Wstrict-prototypes -Wredundant-decls $QEMU_CFLAGS"
 | 
				
			||||||
QEMU_CFLAGS="-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE $QEMU_CFLAGS"
 | 
					QEMU_CFLAGS="-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE $QEMU_CFLAGS"
 | 
				
			||||||
QEMU_CFLAGS="-D_FORTIFY_SOURCE=2 $QEMU_CFLAGS"
 | 
					 | 
				
			||||||
QEMU_INCLUDES="-I. -I\$(SRC_PATH) -I\$(SRC_PATH)/fpu"
 | 
					QEMU_INCLUDES="-I. -I\$(SRC_PATH) -I\$(SRC_PATH)/fpu"
 | 
				
			||||||
if test "$debug_info" = "yes"; then
 | 
					if test "$debug_info" = "yes"; then
 | 
				
			||||||
    CFLAGS="-g $CFLAGS"
 | 
					    CFLAGS="-g $CFLAGS"
 | 
				
			||||||
@ -2856,7 +2855,7 @@ fi
 | 
				
			|||||||
# After here, no more $cc or $ld runs
 | 
					# After here, no more $cc or $ld runs
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if test "$debug" = "no" ; then
 | 
					if test "$debug" = "no" ; then
 | 
				
			||||||
  CFLAGS="-O2 $CFLAGS"
 | 
					  CFLAGS="-O2 -D_FORTIFY_SOURCE=2 $CFLAGS"
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Consult white-list to determine whether to enable werror
 | 
					# Consult white-list to determine whether to enable werror
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user