Lines Matching +full:- +full:- +full:enable +full:- +full:werror
13 --srcdir=DIR source directory [detected]
16 --prefix=PREFIX main installation prefix [/usr/local/musl]
17 --exec-prefix=EPREFIX installation prefix for executable files [PREFIX]
20 --bindir=DIR user executables [EPREFIX/bin]
21 --libdir=DIR library files for the linker [PREFIX/lib]
22 --includedir=DIR include files for the C compiler [PREFIX/include]
23 --syslibdir=DIR location for the dynamic linker [/lib]
26 --target=TARGET configure to run on target TARGET [detected]
27 --host=HOST same as --target
28 --build=BUILD build system type; used only to infer cross-compiling
31 --enable-optimize=... optimize listed components for speed over size [auto]
32 --enable-debug build with debugging information [disabled]
33 --enable-warnings build with recommended warnings flags [disabled]
34 --enable-wrapper=... build given musl toolchain wrapper [auto]
35 --disable-shared inhibit building shared library [enabled]
36 --disable-static inhibit building static library [enabled]
40 CFLAGS C compiler flags [-Os -pipe ...]
53 tr '\n' ' ' <<EOF | grep '^[-[:alnum:]_=,./:]* $' >/dev/null 2>&1 && { echo "$1" ; return 0 ; }
56 printf %s\\n "$1" | sed -e "s/'/'\\\\''/g" -e "1s/^/'/" -e "\$s/\$/'/" -e "s#^'\([-[:alnum:]_,./:]*…
62 trycc () { test -z "$CC" && cmdexists "$1" && CC=$1 ; }
74 if $CC $2 -c -o /dev/null "$tmpc" >/dev/null 2>&1 ; then
86 if $CC $CFLAGS_TRY $2 -c -o /dev/null "$tmpc" >/dev/null 2>&1 ; then
100 if $CC $LDFLAGS_TRY -nostdlib -shared "$2" -o /dev/null "$tmpc" >/dev/null 2>&1 ; then
145 --help|-h) usage ;;
146 --srcdir=*) srcdir=${arg#*=} ;;
147 --prefix=*) prefix=${arg#*=} ;;
148 --exec-prefix=*) exec_prefix=${arg#*=} ;;
149 --bindir=*) bindir=${arg#*=} ;;
150 --libdir=*) libdir=${arg#*=} ;;
151 --includedir=*) includedir=${arg#*=} ;;
152 --syslibdir=*) syslibdir=${arg#*=} ;;
153 --enable-shared|--enable-shared=yes) shared=yes ;;
154 --disable-shared|--enable-shared=no) shared=no ;;
155 --enable-static|--enable-static=yes) static=yes ;;
156 --disable-static|--enable-static=no) static=no ;;
157 --enable-optimize) optimize=yes ;;
158 --enable-optimize=*) optimize=${arg#*=} ;;
159 --disable-optimize) optimize=no ;;
160 --enable-debug|--enable-debug=yes) debug=yes ;;
161 --disable-debug|--enable-debug=no) debug=no ;;
162 --enable-warnings|--enable-warnings=yes) warnings=yes ;;
163 --disable-warnings|--enable-warnings=no) warnings=no ;;
164 --enable-wrapper|--enable-wrapper=yes) wrapper=detect ;;
165 --enable-wrapper=all) wrapper=yes ; gcc_wrapper=yes ; clang_wrapper=yes ;;
166 --enable-wrapper=gcc) wrapper=yes ; gcc_wrapper=yes ;;
167 --enable-wrapper=clang) wrapper=yes ; clang_wrapper=yes ;;
168 --disable-wrapper|--enable-wrapper=no) wrapper=no ;;
169 --enable-gcc-wrapper|--enable-gcc-wrapper=yes) wrapper=yes ; gcc_wrapper=yes ;;
170 --disable-gcc-wrapper|--enable-gcc-wrapper=no) wrapper=no ;;
171 --enable-*|--disable-*|--with-*|--without-*|--*dir=*) ;;
172 --host=*|--target=*) target=${arg#*=} ;;
173 --build=*) build=${arg#*=} ;;
174 -* ) echo "$0: unknown option $arg" ;;
193 # Get the source dir for out-of-tree builds
195 if test -z "$srcdir" ; then
202 test "$srcdir" != "." -a -f Makefile -a ! -h Makefile && fail "$0: Makefile already exists in the w…
208 set -C
210 tmpc="./conf$$-$PPID-$i.c"
212 test "$i" -gt 50 && fail "$0: cannot create temporary file $tmpc"
218 # Check whether we are cross-compiling, and set a default
223 test -z "$CROSS_COMPILE" && \
224 CROSS_COMPILE="$target-"
234 test -n "$CC" || { echo "$0: cannot find a C compiler" ; exit 1 ; }
238 if output=$($CC $CPPFLAGS $CFLAGS -c -o /dev/null "$tmpc" 2>&1) ; then
248 tryflag CFLAGS_TRY -Werror=unknown-warning-option
249 tryflag CFLAGS_TRY -Werror=unused-command-line-argument
250 tryflag CFLAGS_TRY -Werror=ignored-optimization-argument
251 tryldflag LDFLAGS_TRY -Werror=unknown-warning-option
252 tryldflag LDFLAGS_TRY -Werror=unused-command-line-argument
259 cc_ver="$(LC_ALL=C $CC -v 2>&1)"
271 if test "$wrapper" = auto -o "$wrapper" = detect ; then
277 if test "$wrapper" = auto && ! $CC -c -o /dev/null "$tmpc" >/dev/null 2>&1 ; then
294 tools="$tools obj/musl-gcc"
295 tool_libs="$tool_libs lib/musl-gcc.specs"
298 tools="$tools obj/musl-clang obj/ld.musl-clang"
305 test -n "$target" || target=$($CC -dumpmachine 2>/dev/null) || target=unknown
312 # Catch these early to simplify matching for 32-bit archs
315 i?86-nt32*) ARCH=nt32 ;;
317 x86_64-x32*|x32*|x86_64*x32) ARCH=x32 ;;
318 x86_64-nt64*) ARCH=nt64 ;;
328 sh[1-9bel-]*|sh|superh*) ARCH=sh ;;
330 unknown) fail "$0: unable to detect target arch; try $0 --target=..." ;;
337 tryflag CFLAGS_C99FSE -std=c99
338 tryflag CFLAGS_C99FSE -nostdinc
339 tryflag CFLAGS_C99FSE -ffreestanding \
340 || tryflag CFLAGS_C99FSE -fno-builtin
341 tryflag CFLAGS_C99FSE -fexcess-precision=standard \
342 || { test "$ARCH" = i386 && tryflag CFLAGS_C99FSE -ffloat-store ; }
343 tryflag CFLAGS_C99FSE -frounding-math
359 -c -o /dev/null "$tmpc" >/dev/null 2>&1 ; then
363 CFLAGS_C99FSE="$CFLAGS_C99FSE -D__may_alias__="
371 tryflag CFLAGS_C99FSE -Wa,--noexecstack
375 # disabled for a few early-bootstrap translation units. If not found,
378 tryflag CFLAGS_NOSSP -fno-stack-protector
382 # generating self-referential versions of memcpy,, memmove, memcmp,
387 tryflag CFLAGS_MEMOPS -fno-tree-loop-distribute-patterns
390 # Enable debugging if requessted.
392 test "$debug" = yes && CFLAGS_AUTO=-g
400 if fnmatch '-g*|*\ -g*' "$CFLAGS_AUTO $CFLAGS" &&
401 test -f "tools/add-cfi.$ARCH.awk" &&
402 …ile.s\"\n.line 1\n.cfi_startproc\n.cfi_endproc" | $CC -g -x assembler -c -o /dev/null 2>/dev/null -
411 # Possibly add a -O option to CFLAGS and select modules to optimize with
412 # -O3 based on the status of --enable-optimize and provided CFLAGS.
417 if fnmatch '-O*|*\ -O*' "$CFLAGS_AUTO $CFLAGS" ; then
428 test "$optimize" = no || tryflag CFLAGS_AUTO -Os || tryflag CFLAGS_AUTO -O2
451 # Always try -pipe
452 tryflag CFLAGS_AUTO -pipe
459 if fnmatch '-g*|*\ -g*' "$CFLAGS_AUTO $CFLAGS" ; then :
461 tryflag CFLAGS_AUTO -fomit-frame-pointer
470 tryflag CFLAGS_AUTO -fno-unwind-tables
471 tryflag CFLAGS_AUTO -fno-asynchronous-unwind-tables
477 # whereby relative address expressions are constant-folded by the
481 tryflag CFLAGS_AUTO -ffunction-sections
482 tryflag CFLAGS_AUTO -fdata-sections
489 # Some build environments pass -march and -mtune options via CC, so
493 fnmatch '-march=*|*\ -march=*' "$CC $CFLAGS" || tryldflag CFLAGS_AUTO -march=i486
494 fnmatch '-mtune=*|*\ -mtune=*' "$CC $CFLAGS" || tryldflag CFLAGS_AUTO -mtune=generic
498 # Even with -std=c99, gcc accepts some constructs which are constraint
500 # other purely stylistic warnings are enabled -- especially implicit
503 tryflag CFLAGS_AUTO -Werror=implicit-function-declaration
504 tryflag CFLAGS_AUTO -Werror=implicit-int
505 tryflag CFLAGS_AUTO -Werror=pointer-sign
506 tryflag CFLAGS_AUTO -Werror=pointer-arith
513 test "$cc_family" = clang && tryflag CFLAGS_AUTO -Qunused-arguments
516 tryflag CFLAGS_AUTO -Wall
517 tryflag CFLAGS_AUTO -Wno-parentheses
518 tryflag CFLAGS_AUTO -Wno-uninitialized
519 tryflag CFLAGS_AUTO -Wno-missing-braces
520 tryflag CFLAGS_AUTO -Wno-unused-value
521 tryflag CFLAGS_AUTO -Wno-unused-but-set-variable
522 tryflag CFLAGS_AUTO -Wno-unknown-pragmas
523 tryflag CFLAGS_AUTO -Wno-pointer-to-int-cast
526 # Determine if the compiler produces position-independent code (PIC)
538 tryldflag LDFLAGS_AUTO -Wl,--sort-section,alignment
539 tryldflag LDFLAGS_AUTO -Wl,--sort-common
543 tryldflag LDFLAGS_AUTO -Wl,--gc-sections
546 tryldflag LDFLAGS_AUTO -Wl,--hash-style=both
552 tryldflag LDFLAGS_AUTO -Wl,--no-undefined
557 tryldflag LDFLAGS_AUTO -Wl,--exclude-libs=ALL
562 # --dynamic-list rather than -Bsymbolic-functions for greater
564 tryldflag LDFLAGS_AUTO -Wl,--dynamic-list="$srcdir/dynamic.list"
567 test -z "$LIBCC" && tryldflag LIBCC -lgcc && tryldflag LIBCC -lgcc_eh
568 test -z "$LIBCC" && tryldflag LIBCC -lcompiler_rt
569 test -z "$LIBCC" && try_libcc=`$CC -print-libgcc-file-name 2>/dev/null` \
571 test -z "$LIBCC" && try_libcc=`$CC -print-file-name=libpcc.a 2>/dev/null` \
584 if $CC $CFLAGS_C99FSE $CPPFLAGS $CFLAGS -fPIC \
585 -c -o /dev/null "$tmpc" >/dev/null 2>&1 ; then
589 CFLAGS_AUTO="$CFLAGS_AUTO -DBROKEN_EBX_ASM"
599 tryflag CFLAGS_AUTO -mimplicit-it=always
600 tryflag CFLAGS_AUTO -Wa,-mimplicit-it=always
601 tryflag CFLAGS_AUTO -Wa,-mthumb
611 if $CC $CFLAGS_C99FSE $CPPFLAGS $CFLAGS -c -o /dev/null "$tmpc" >/dev/null 2>&1 ; then
615 CFLAGS_AUTO="$CFLAGS_AUTO -DBROKEN_VFP_ASM"
627 elif trycppif "__mcffpu__" ; then SUBARCH="-fp64"
628 else SUBARCH="-sf"
635 trycppif __mips_soft_float "$t" && SUBARCH=${SUBARCH}-sf
642 trycppif __mips_soft_float "$t" && SUBARCH=${SUBARCH}-sf
648 trycppif _SOFT_FLOAT "$t" && SUBARCH=${SUBARCH}-sf
651 if $CC $CFLAGS_C99FSE $CPPFLAGS $CFLAGS -c -o /dev/null "$tmpc" >/dev/null 2>&1 ; then
655 CFLAGS_AUTO="$CFLAGS_AUTO -DBROKEN_PPC_D_ASM"
666 trycppif _SOFT_FLOAT "$t" && fail "$0: error: soft-float not supported on powerpc64"
670 trycppif __riscv_float_abi_soft "$t" && SUBARCH=${SUBARCH}-sf
671 trycppif __riscv_float_abi_single "$t" && SUBARCH=${SUBARCH}-sp
675 tryflag CFLAGS_AUTO -Wa,--isa=any
682 echo 'typedef char dblcheck[(int)sizeof(double)-5];' > "$tmpc"
683 if $CC $CFLAGS_C99FSE $CPPFLAGS $CFLAGS -c -o /dev/null "$tmpc" >/dev/null 2>&1 ; then
690 SUBARCH=${SUBARCH}-nofpu
693 SUBARCH=${SUBARCH}-fdpic
716 echo 'typedef char ldcheck[(C(53,8)||C(64,12)||C(64,16)||C(113,16))*2-1];' >> "$tmpc"
718 -I$srcdir/arch/$ARCH -I$srcdir/arch/generic -I$srcdir/include \
719 $CPPFLAGS $CFLAGS -c -o /dev/null "$tmpc" >/dev/null 2>&1 ; then
727 # Some build systems globally pass in broken CFLAGS like -ffast-math
729 # early rather than producing a seriously-broken math library.
747 # Any changes made here will be lost if configure is re-run
748 AR = ${AR:-\$(CROSS_COMPILE)ar}
749 RANLIB = ${RANLIB:-\$(CROSS_COMPILE)ranlib}
781 exec 1>&3 3>&-
783 test "$srcdir" = "." || ln -sf $srcdir/Makefile .