Lines Matching +full:- +full:fpie

4 dnl Copyright 2007-2020 by Apple Inc.
5 dnl Copyright 1997-2007 by Easy Software Products, all rights reserved.
10 dnl Clear the debugging and non-shared library options unless the user asks
15 AC_ARG_WITH(optim, [ --with-optim set optimization flags ],
20 AC_ARG_ENABLE(debug, [ --enable-debug build with debugging symbols])
21 AC_ARG_ENABLE(debug_guards, [ --enable-debug-guards build with memory allocation guards])
22 AC_ARG_ENABLE(debug_printfs, [ --enable-debug-printfs build with CUPS_DEBUG_LOG support])
23 AC_ARG_ENABLE(unit_tests, [ --enable-unit-tests build and run unit tests])
26 if test x$enable_debug = xyes -a "x$OPTIM" = x; then
27 OPTIM="-g"
29 INSTALL_STRIP="-s"
34 CFLAGS="$CFLAGS -DDEBUG"
35 CXXFLAGS="$CXXFLAGS -DDEBUG"
41 CFLAGS="$CFLAGS -DDEBUG_GUARDS"
42 CXXFLAGS="$CXXFLAGS -DDEBUG_GUARDS"
48 AC_MSG_ERROR([Sorry, cannot build unit tests when cross-compiling.])
58 AC_ARG_WITH(archflags, [ --with-archflags set default architecture flags ])
59 AC_ARG_WITH(ldarchflags, [ --with-ldarchflags set program architecture flags ])
61 if test -z "$with_archflags"; then
67 if test -z "$with_ldarchflags"; then
70 LDARCHFLAGS="`echo $ARCHFLAGS | sed -e '1,$s/-arch ppc64//'`"
81 dnl Read-only data/program support on Linux...
82 AC_ARG_ENABLE(relro, [ --enable-relro build with the GCC relro option])
85 AC_ARG_ENABLE(sanitizer, [ --enable-sanitizer build with AddressSanitizer])
100 if test -n "$GCC"; then
101 # Add GCC-specific compiler options...
106 # Use -fsanitize=address with debugging...
107 OPTIM="$OPTIM -g -fsanitize=address"
111 CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=2"
112 CXXFLAGS="$CXXFLAGS -D_FORTIFY_SOURCE=2"
116 if test -z "$OPTIM"; then
117 # Default to optimize-for-size and debug
118 OPTIM="-Os -g"
121 # Generate position-independent code as needed...
123 OPTIM="-fPIC $OPTIM"
126 # The -fstack-protector option is available with some versions of
129 AC_MSG_CHECKING(whether compiler supports -fstack-protector)
131 CFLAGS="$CFLAGS -fstack-protector"
134 # Can't use stack-protector with LSB binaries...
135 OPTIM="$OPTIM -fno-stack-protector"
137 OPTIM="$OPTIM -fstack-protector"
144 # The -fPIE option is available with some versions of GCC and
149 AC_MSG_CHECKING(whether compiler supports -fPIE)
153 CFLAGS="$CFLAGS -fPIE -Wl,-pie"
155 PIEFLAGS="-fPIE -Wl,-pie"
161 CFLAGS="$CFLAGS -fPIE -pie"
163 PIEFLAGS="-fPIE -pie"
172 …WARNING_OPTIONS="-Wall -Wno-format-y2k -Wunused -Wno-unused-result -Wsign-conversion -Wno-unused-
174 # Test GCC version for certain warning flags since -Werror
176 gccversion=`$CC --version | head -1 | awk '{print $NF}'`
179 WARNING_OPTIONS="$WARNING_OPTIONS -Wno-format-truncation -Wno-tautological-compare"
184 if test -d .git; then
185 …WARNING_OPTIONS="-Werror -Wno-error=deprecated-declarations -Wno-unknown-warning-option $WARNING_O…
188 # Add vendor-specific compiler options...
192 if test -z "$OPTIM"; then
193 OPTIM="-xO2"
197 OPTIM="-KPIC $OPTIM"
217 OPTIM="$OPTIM -D_GNU_SOURCE"
219 # The -z relro option is provided by the Linux linker command to
220 # make relocatable data read-only.
222 RELROFLAGS="-Wl,-z,relro,-z,now"