• Home
  • Raw
  • Download

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 --disable-warnings build with recommended warnings flags [enabled]
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]
39 --with-malloc=... choose malloc implementation [mallocng]
43 CFLAGS C compiler flags [-Os -pipe ...]
56 tr '\n' ' ' <<EOF | grep '^[-[:alnum:]_=,./:]* $' >/dev/null 2>&1 && { echo "$1" ; return 0 ; }
59 printf %s\\n "$1" | sed -e "s/'/'\\\\''/g" -e "1s/^/'/" -e "\$s/\$/'/" -e "s#^'\([-[:alnum:]_,./:]*…
65 trycc () { test -z "$CC" && cmdexists "$1" && CC=$1 ; }
77 if $CC $2 -c -o /dev/null "$tmpc" >/dev/null 2>&1 ; then
89 if $CC $CFLAGS_TRY $2 -c -o /dev/null "$tmpc" >/dev/null 2>&1 ; then
103 if $CC $LDFLAGS_TRY -nostdlib -shared "$2" -o /dev/null "$tmpc" >/dev/null 2>&1 ; then
149 --help|-h) usage ;;
150 --srcdir=*) srcdir=${arg#*=} ;;
151 --prefix=*) prefix=${arg#*=} ;;
152 --exec-prefix=*) exec_prefix=${arg#*=} ;;
153 --bindir=*) bindir=${arg#*=} ;;
154 --libdir=*) libdir=${arg#*=} ;;
155 --includedir=*) includedir=${arg#*=} ;;
156 --syslibdir=*) syslibdir=${arg#*=} ;;
157 --enable-shared|--enable-shared=yes) shared=yes ;;
158 --disable-shared|--enable-shared=no) shared=no ;;
159 --enable-static|--enable-static=yes) static=yes ;;
160 --disable-static|--enable-static=no) static=no ;;
161 --enable-optimize) optimize=yes ;;
162 --enable-optimize=*) optimize=${arg#*=} ;;
163 --disable-optimize) optimize=no ;;
164 --enable-debug|--enable-debug=yes) debug=yes ;;
165 --disable-debug|--enable-debug=no) debug=no ;;
166 --enable-warnings|--enable-warnings=yes) warnings=yes ;;
167 --disable-warnings|--enable-warnings=no) warnings=no ;;
168 --enable-wrapper|--enable-wrapper=yes) wrapper=detect ;;
169 --enable-wrapper=all) wrapper=yes ; gcc_wrapper=yes ; clang_wrapper=yes ;;
170 --enable-wrapper=gcc) wrapper=yes ; gcc_wrapper=yes ;;
171 --enable-wrapper=clang) wrapper=yes ; clang_wrapper=yes ;;
172 --disable-wrapper|--enable-wrapper=no) wrapper=no ;;
173 --enable-gcc-wrapper|--enable-gcc-wrapper=yes) wrapper=yes ; gcc_wrapper=yes ;;
174 --disable-gcc-wrapper|--enable-gcc-wrapper=no) wrapper=no ;;
175 --with-malloc=*) malloc_dir=${arg#*=} ;;
176 --enable-*|--disable-*|--with-*|--without-*|--*dir=*) ;;
177 --host=*|--target=*) target=${arg#*=} ;;
178 --build=*) build=${arg#*=} ;;
179 -* ) echo "$0: unknown option $arg" ;;
198 # Get the source dir for out-of-tree builds
200 if test -z "$srcdir" ; then
207 test "$srcdir" != "." && test -f Makefile && test ! -h Makefile && fail "$0: Makefile already exist…
213 set -C
215 tmpc="./conf$$-$PPID-$i.c"
217 test "$i" -gt 50 && fail "$0: cannot create temporary file $tmpc"
225 test -d "$srcdir/src/malloc/$malloc_dir" \
229 # Check whether we are cross-compiling, and set a default
234 test -z "$CROSS_COMPILE" && \
235 CROSS_COMPILE="$target-"
245 test -n "$CC" || { echo "$0: cannot find a C compiler" ; exit 1 ; }
249 if output=$($CC $CPPFLAGS $CFLAGS -c -o /dev/null "$tmpc" 2>&1) ; then
259 tryflag CFLAGS_TRY -Werror=unknown-warning-option
260 tryflag CFLAGS_TRY -Werror=unused-command-line-argument
261 tryflag CFLAGS_TRY -Werror=ignored-optimization-argument
262 tryldflag LDFLAGS_TRY -Werror=unknown-warning-option
263 tryldflag LDFLAGS_TRY -Werror=unused-command-line-argument
270 cc_ver="$(LC_ALL=C $CC -v 2>&1)"
288 if test "$wrapper" = auto && ! $CC -c -o /dev/null "$tmpc" >/dev/null 2>&1 ; then
305 tools="$tools obj/musl-gcc"
306 tool_libs="$tool_libs lib/musl-gcc.specs"
309 tools="$tools obj/musl-clang obj/ld.musl-clang"
316 test -n "$target" || target=$($CC -dumpmachine 2>/dev/null) || target=unknown
323 # Catch these early to simplify matching for 32-bit archs
326 i?86-nt32*) ARCH=nt32 ;;
328 x86_64-x32*|x32*|x86_64*x32) ARCH=x32 ;;
329 x86_64-nt64*) ARCH=nt64 ;;
341 sh[1-9bel-]*|sh|superh*) ARCH=sh ;;
343 unknown) fail "$0: unable to detect target arch; try $0 --target=..." ;;
350 tryflag CFLAGS_C99FSE -std=c99
351 tryflag CFLAGS_C99FSE -nostdinc
352 tryflag CFLAGS_C99FSE -ffreestanding \
353 || tryflag CFLAGS_C99FSE -fno-builtin
354 tryflag CFLAGS_C99FSE -fexcess-precision=standard \
355 || { test "$ARCH" = i386 && tryflag CFLAGS_C99FSE -ffloat-store ; }
356 tryflag CFLAGS_C99FSE -frounding-math
360 # C rules for type-based aliasing, but most if not all real-world
362 # type-based aliasing analysis. See for example GCC bug 107107.
364 tryflag CFLAGS_C99FSE -fno-strict-aliasing
380 -c -o /dev/null "$tmpc" >/dev/null 2>&1 ; then
384 CFLAGS_C99FSE="$CFLAGS_C99FSE -D__may_alias__="
392 tryflag CFLAGS_C99FSE -Wa,--noexecstack
396 # disabled for a few early-bootstrap translation units. If not found,
399 tryflag CFLAGS_NOSSP -fno-stack-protector
403 # generating self-referential versions of memcpy,, memmove, memcmp,
408 tryflag CFLAGS_MEMOPS -fno-tree-loop-distribute-patterns
411 # Enable debugging if requessted.
413 test "$debug" = yes && CFLAGS_AUTO=-g
421 if fnmatch '-g*|*\ -g*' "$CFLAGS_AUTO $CFLAGS" &&
422 test -f "$srcdir/tools/add-cfi.$ARCH.awk" &&
423 …ile.s\"\n.line 1\n.cfi_startproc\n.cfi_endproc" | $CC -g -x assembler -c -o /dev/null 2>/dev/null -
432 # Possibly add a -O option to CFLAGS and select modules to optimize with
433 # -O3 based on the status of --enable-optimize and provided CFLAGS.
438 if fnmatch '-O*|*\ -O*' "$CFLAGS_AUTO $CFLAGS" ; then
451 tryflag CFLAGS_AUTO -O2
452 tryflag CFLAGS_AUTO -fno-align-jumps
453 tryflag CFLAGS_AUTO -fno-align-functions
454 tryflag CFLAGS_AUTO -fno-align-loops
455 tryflag CFLAGS_AUTO -fno-align-labels
456 tryflag CFLAGS_AUTO -fira-region=one
457 tryflag CFLAGS_AUTO -fira-hoist-pressure
458 tryflag CFLAGS_AUTO -freorder-blocks-algorithm=simple \
459 || tryflag CFLAGS_AUTO -fno-reorder-blocks
460 tryflag CFLAGS_AUTO -fno-prefetch-loop-arrays
461 tryflag CFLAGS_AUTO -fno-tree-ch
485 # Always try -pipe
486 tryflag CFLAGS_AUTO -pipe
493 if fnmatch '-g*|*\ -g*' "$CFLAGS_AUTO $CFLAGS" ; then :
495 tryflag CFLAGS_AUTO -fomit-frame-pointer
504 tryflag CFLAGS_AUTO -fno-unwind-tables
505 tryflag CFLAGS_AUTO -fno-asynchronous-unwind-tables
511 # whereby relative address expressions are constant-folded by the
515 tryflag CFLAGS_AUTO -ffunction-sections
516 tryflag CFLAGS_AUTO -fdata-sections
523 # Some build environments pass -march and -mtune options via CC, so
527 fnmatch '-march=*|*\ -march=*' "$CC $CFLAGS" || tryldflag CFLAGS_AUTO -march=i486
528 fnmatch '-mtune=*|*\ -mtune=*' "$CC $CFLAGS" || tryldflag CFLAGS_AUTO -mtune=generic
532 # GCC defines -w as overriding any -W options, regardless of order, but
533 # clang has a bunch of annoying warnings enabled by default and needs -w
534 # to start from a clean slate. So use -w if building with clang. Also
535 # turn off a common on-by-default cast warning regardless of compiler.
537 test "$cc_family" = clang && tryflag CFLAGS_AUTO -w
539 tryflag CFLAGS_AUTO -Wno-pointer-to-int-cast
542 # Even with -std=c99, gcc accepts some constructs which are constraint
544 # other purely stylistic warnings are enabled -- especially implicit
547 tryflag CFLAGS_AUTO -Werror=implicit-function-declaration
548 tryflag CFLAGS_AUTO -Werror=implicit-int
549 tryflag CFLAGS_AUTO -Werror=pointer-sign
550 tryflag CFLAGS_AUTO -Werror=pointer-arith
551 tryflag CFLAGS_AUTO -Werror=int-conversion
552 tryflag CFLAGS_AUTO -Werror=incompatible-pointer-types
553 tryflag CFLAGS_AUTO -Werror=discarded-qualifiers
554 tryflag CFLAGS_AUTO -Werror=discarded-array-qualifiers
561 test "$cc_family" = clang && tryflag CFLAGS_AUTO -Qunused-arguments
564 tryflag CFLAGS_AUTO -Waddress
565 tryflag CFLAGS_AUTO -Warray-bounds
566 tryflag CFLAGS_AUTO -Wchar-subscripts
567 tryflag CFLAGS_AUTO -Wduplicate-decl-specifier
568 tryflag CFLAGS_AUTO -Winit-self
569 tryflag CFLAGS_AUTO -Wreturn-type
570 tryflag CFLAGS_AUTO -Wsequence-point
571 tryflag CFLAGS_AUTO -Wstrict-aliasing
572 tryflag CFLAGS_AUTO -Wunused-function
573 tryflag CFLAGS_AUTO -Wunused-label
574 tryflag CFLAGS_AUTO -Wunused-variable
577 # Determine if the compiler produces position-independent code (PIC)
589 tryldflag LDFLAGS_AUTO -Wl,--sort-section,alignment
590 tryldflag LDFLAGS_AUTO -Wl,--sort-common
594 tryldflag LDFLAGS_AUTO -Wl,--gc-sections
597 tryldflag LDFLAGS_AUTO -Wl,--hash-style=both
603 tryldflag LDFLAGS_AUTO -Wl,--no-undefined
608 tryldflag LDFLAGS_AUTO -Wl,--exclude-libs=ALL
613 # --dynamic-list rather than -Bsymbolic-functions for greater
615 tryldflag LDFLAGS_AUTO -Wl,--dynamic-list="$srcdir/dynamic.list"
618 test -z "$LIBCC" && tryldflag LIBCC -lgcc && tryldflag LIBCC -lgcc_eh
619 test -z "$LIBCC" && tryldflag LIBCC -lcompiler_rt
620 test -z "$LIBCC" && try_libcc=`$CC -print-libgcc-file-name 2>/dev/null` \
622 test -z "$LIBCC" && try_libcc=`$CC -print-file-name=libpcc.a 2>/dev/null` \
635 if $CC $CFLAGS_C99FSE $CPPFLAGS $CFLAGS -fPIC \
636 -c -o /dev/null "$tmpc" >/dev/null 2>&1 ; then
640 CFLAGS_AUTO="$CFLAGS_AUTO -DBROKEN_EBX_ASM"
650 tryflag CFLAGS_AUTO -mimplicit-it=always
651 tryflag CFLAGS_AUTO -Wa,-mimplicit-it=always
652 tryflag CFLAGS_AUTO -Wa,-mthumb
662 if $CC $CFLAGS_C99FSE $CPPFLAGS $CFLAGS -c -o /dev/null "$tmpc" >/dev/null 2>&1 ; then
666 CFLAGS_AUTO="$CFLAGS_AUTO -DBROKEN_VFP_ASM"
677 trycppif __loongarch_soft_float "$t" && SUBARCH=${SUBARCH}-sf
678 trycppif __loongarch_single_float "$t" && SUBARCH=${SUBARCH}-sp
681 if $CC -c -o /dev/null "$tmpc" >/dev/null 2>&1 ; then
685 CFLAGS_AUTO="$CFLAGS_AUTO -DBROKEN_LOONGARCH_FCSR_ASM"
691 elif trycppif "__mcffpu__" ; then SUBARCH="-fp64"
692 else SUBARCH="-sf"
699 trycppif __mips_soft_float "$t" && SUBARCH=${SUBARCH}-sf
706 trycppif __mips_soft_float "$t" && SUBARCH=${SUBARCH}-sf
710 trycppif "_SOFT_FLOAT || __NO_FPRS__" "$t" && SUBARCH=${SUBARCH}-sf
713 if $CC $CFLAGS_C99FSE $CPPFLAGS $CFLAGS -c -o /dev/null "$tmpc" >/dev/null 2>&1 ; then
717 CFLAGS_AUTO="$CFLAGS_AUTO -DBROKEN_PPC_D_ASM"
728 trycppif _SOFT_FLOAT "$t" && fail "$0: error: soft-float not supported on powerpc64"
731 if test "$ARCH" = "riscv64" -o "$ARCH" = "riscv32" ; then
732 trycppif __riscv_float_abi_soft "$t" && SUBARCH=${SUBARCH}-sf
733 trycppif __riscv_float_abi_single "$t" && SUBARCH=${SUBARCH}-sp
737 tryflag CFLAGS_AUTO -Wa,--isa=any
744 echo 'typedef char dblcheck[(int)sizeof(double)-5];' > "$tmpc"
745 if $CC $CFLAGS_C99FSE $CPPFLAGS $CFLAGS -c -o /dev/null "$tmpc" >/dev/null 2>&1 ; then
752 SUBARCH=${SUBARCH}-nofpu
755 SUBARCH=${SUBARCH}-fdpic
773 echo 'typedef char ldcheck[(C(53,8)||C(64,12)||C(64,16)||C(113,16))*2-1];' >> "$tmpc"
775 -I$srcdir/arch/$ARCH -I$srcdir/arch/generic -I$srcdir/include \
776 $CPPFLAGS $CFLAGS -c -o /dev/null "$tmpc" >/dev/null 2>&1 ; then
784 # Some build systems globally pass in broken CFLAGS like -ffast-math
786 # early rather than producing a seriously-broken math library.
804 # Any changes made here will be lost if configure is re-run
805 AR = ${AR:-\$(CROSS_COMPILE)ar}
806 RANLIB = ${RANLIB:-\$(CROSS_COMPILE)ranlib}
839 exec 1>&3 3>&-
841 test "$srcdir" = "." || ln -sf $srcdir/Makefile .