mirror of
				https://git.kernel.org/pub/scm/network/wireless/iwd.git
				synced 2025-11-04 08:57:29 +01:00 
			
		
		
		
	build: Use default compiler flags
This commit is contained in:
		
							parent
							
								
									188917cc29
								
							
						
					
					
						commit
						c11be930ea
					
				
							
								
								
									
										26
									
								
								acinclude.m4
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										26
									
								
								acinclude.m4
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,26 @@
 | 
			
		||||
AC_DEFUN([AC_PROG_CC_PIE], [
 | 
			
		||||
	AC_CACHE_CHECK([whether ${CC-cc} accepts -fPIE], ac_cv_prog_cc_pie, [
 | 
			
		||||
		echo 'void f(){}' > conftest.c
 | 
			
		||||
		if test -z "`${CC-cc} -fPIE -pie -c conftest.c 2>&1`"; then
 | 
			
		||||
			ac_cv_prog_cc_pie=yes
 | 
			
		||||
		else
 | 
			
		||||
			ac_cv_prog_cc_pie=no
 | 
			
		||||
		fi
 | 
			
		||||
		rm -rf conftest*
 | 
			
		||||
	])
 | 
			
		||||
])
 | 
			
		||||
 | 
			
		||||
AC_DEFUN([COMPILER_FLAGS], [
 | 
			
		||||
	if (test "${CFLAGS}" = ""); then
 | 
			
		||||
		CFLAGS="-Wall -O2 -D_FORTIFY_SOURCE=2 -fsigned-char"
 | 
			
		||||
	fi
 | 
			
		||||
	if (test "$USE_MAINTAINER_MODE" = "yes"); then
 | 
			
		||||
		CFLAGS+=" -Werror -Wextra"
 | 
			
		||||
		CFLAGS+=" -Wno-unused-parameter"
 | 
			
		||||
		CFLAGS+=" -Wno-missing-field-initializers"
 | 
			
		||||
		CFLAGS+=" -Wdeclaration-after-statement"
 | 
			
		||||
		CFLAGS+=" -Wmissing-declarations"
 | 
			
		||||
		CFLAGS+=" -Wredundant-decls"
 | 
			
		||||
		CFLAGS+=" -Wcast-align"
 | 
			
		||||
	fi
 | 
			
		||||
])
 | 
			
		||||
@ -14,7 +14,12 @@ AM_MAINTAINER_MODE
 | 
			
		||||
 | 
			
		||||
AC_PREFIX_DEFAULT(/usr/local)
 | 
			
		||||
 | 
			
		||||
COMPILER_FLAGS
 | 
			
		||||
 | 
			
		||||
AC_LANG_C
 | 
			
		||||
 | 
			
		||||
AC_PROG_CC
 | 
			
		||||
AC_PROG_CC_PIE
 | 
			
		||||
AC_PROG_INSTALL
 | 
			
		||||
AC_PROG_MKDIR_P
 | 
			
		||||
AC_PROG_LN_S
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user