Opened 5 years ago

#1161 new task

GCC configure options for checking and libstdcxxtime

Reported by: William Harrington Owned by: clfs-commits@…
Priority: major Milestone: CLFS Standard 3.1.0
Component: BOOK Version: CLFS Standard GIT
Keywords: Cc: berzerkula@…, jonathan@…, chris@…, cross-lfs@…


Do we want --enable-checking=release and --enable-libstdcxx-time?


Enables link-type checks for the availability of the clock_gettime clocks, used in the implementation of [time.clock], and of the nanosleep and sched_yield functions, used in the implementation of [thread.thread.this] of the 2011 ISO C++ standard. The choice OPTION=yes checks for the availability of the facilities in libc and libposix4. In case it's needed the latter is also linked to libstdc++ as part of the build process. OPTION=rt also searches (and, if needed, links) librt. Note that the latter is not always desirable because, in glibc, for example, in turn it triggers the linking of libpthread too, which activates locking, a large overhead for single-thread programs. OPTION=no skips the tests completely. The default is OPTION=auto, which skips the checks and enables the features only for targets known to support them.


When you specify this option, the compiler is built to perform internal consistency checks of the requested complexity. This does not change the generated code, but adds error checking within the compiler. This will slow down the compiler and may only work properly if you are building the compiler with GCC. This is ‘yes,extra’ by default when building from SVN or snapshots, but ‘release’ for releases. The default for building the stage1 compiler is ‘yes’. More control over the checks may be had by specifying list. The categories of checks available are ‘yes’ (most common checks ‘assert,misc,tree,gc,rtlflag,runtime’), ‘no’ (no checks at all), ‘all’ (all but ‘valgrind’), ‘release’ (cheapest checks ‘assert,runtime’) or ‘none’ (same as ‘no’). Individual checks can be enabled with these flags ‘assert’, ‘df’, ‘fold’, ‘gc’, ‘gcac’, ‘misc’, ‘rtl’, ‘rtlflag’, ‘runtime’, ‘tree’, ‘extra’ and ‘valgrind’. ‘extra’ adds for ‘misc’ checking extra checks that might affect code generation and should therefore not differ between stage1 and later stages.

The ‘valgrind’ check requires the external valgrind simulator, available from The ‘df’, ‘rtl’, ‘gcac’ and ‘valgrind’ checks are very expensive. To disable all checking, ‘--disable-checking’ or ‘--enable-checking=none’ must be explicitly requested. Disabling assertions will make the compiler and runtime slightly faster but increase the risk of undetected internal errors causing wrong code to be generated.

--disable-stage1-checking --enable-stage1-checking --enable-stage1-checking=list

If no --enable-checking option is specified the stage1 compiler will be built with ‘yes’ checking enabled, otherwise the stage1 checking flags are the same as specified by --enable-checking. To build the stage1 compiler with different checking options use --enable-stage1-checking. The list of checking options is the same as for --enable-checking. If your system is too slow or too small to bootstrap a released compiler with checking for stage1 enabled, you can use ‘--disable-stage1-checking’ to disable checking for the stage1 compiler.

Change History (0)

Note: See TracTickets for help on using tickets.