Lines Matching full:cc

6 # The 'cc' module supports checking various 'features' of the C or C++
7 # compiler/linker environment. Common commands are 'cc-check-includes',
8 # 'cc-check-types', 'cc-check-functions', 'cc-with' and 'make-config-header'
12 ## CC - C compiler
66 # @cc-check-sizeof type ...
73 proc cc-check-sizeof {args} {
98 proc cc-check-some-feature {list script} {
108 # @cc-check-includes includes ...
111 proc cc-check-includes {args} {
112 cc-check-some-feature $args {
114 if {[dict exists $::autosetup(cc-include-deps) $each]} {
115 set deps [dict keys [dict get $::autosetup(cc-include-deps) $each]]
116 msg-quiet cc-check-includes {*}$deps
124 cc-with [list -includes $with] {
133 # @cc-include-needs include required ...
137 proc cc-include-needs {file args} {
139 dict set ::autosetup(cc-include-deps) $file $depfile 1
143 # @cc-check-types type ...
146 proc cc-check-types {args} {
147 cc-check-some-feature $args {
152 # @cc-check-defines define ...
155 proc cc-check-defines {args} {
156 cc-check-some-feature $args {
161 # @cc-check-decls name ...
166 proc cc-check-decls {args} {
182 # @cc-check-functions function ...
185 proc cc-check-functions {args} {
186 cc-check-some-feature $args {
191 # @cc-check-members type.member ...
195 proc cc-check-members {args} {
196 cc-check-some-feature $args {
201 # @cc-check-function-in-lib function libs ?otherlibs?
218 proc cc-check-function-in-lib {function libs {otherlibs {}}} {
221 cc-with [list -libs $otherlibs] {
228 cc-with [list -libs -l$lib] {
248 # @cc-check-tools tool ...
263 proc cc-check-tools {args} {
280 # @cc-check-progs prog ...
290 proc cc-check-progs {args} {
307 # @cc-path-progs prog ...
309 # Like cc-check-progs, but sets the define to the full path rather
312 proc cc-path-progs {args} {
333 proc cc-add-settings {settings} {
338 set prev [cc-get-settings]
371 cc-store-settings [array get new]
376 proc cc-store-settings {new} {
380 proc cc-get-settings {} {
384 # Similar to cc-add-settings, but each given setting
388 proc cc-update-settings {args} {
389 set prev [cc-get-settings]
390 cc-store-settings [dict merge $prev $args]
394 # @cc-with settings ?{ script }?
403 ## cc-with {-lang c++} {
405 ## cc-check-types bool
406 ## cc-with {-includes signal.h} {
415 ## cc-with {-libs {-lc -lm}} {
416 ## cc-with {-libs -ldl} {
422 # If you wish to invoke something like cc-check-flags but not have -cflags updated,
425 ## cc-with {} {
426 ## cc-check-flags ...
428 proc cc-with {settings args} {
430 cc-add-settings $settings
432 autosetup-error "usage: cc-with settings ?script?"
434 set save [cc-add-settings $settings]
436 cc-store-settings $save
473 ## CC -cflags CFLAGS CPPFLAGS conftest.c -o conftest.o
478 ## CC LDFLAGS -cflags CFLAGS conftest.c -o conftest -libs LIBS
487 cc-with $args {
488 array set opts [cc-get-settings]
503 set saveopts [cc-update-settings -includes {}]
504 msg-quiet cc-check-includes $i
505 cc-store-settings $saveopts
531 lappend cmdline {*}[get-define CC]
546 lappend cmdline {*}$opts(-cflags) {*}[get-define cc-default-debug ""] {*}$cflags
680 proc cc-init {} {
689 if {[env-is-set CC]} {
691 set try [list [get-env CC ""]]
694 set try [list [get-define cross]cc [get-define cross]gcc]
696 define CC [find-an-executable {*}$try]
697 if {[get-define CC] eq ""} {
701 define CPP [get-env CPP "[get-define CC] -E"]
715 define CC_FOR_BUILD [find-an-executable [get-env CC_FOR_BUILD ""] cc gcc false]
725 …foreach i {CC CXX CCACHE CPP CFLAGS CXXFLAGS CXXFLAGS LDFLAGS LIBS CROSS CPPFLAGS LINKFLAGS CC_FOR…
734cc-store-settings {-cflags {} -includes {} -declare {} -link 0 -lang c -libs {} -code {} -nooutput…
735 set autosetup(cc-include-deps) {}
737 …msg-result "C compiler...[get-define CCACHE] [get-define CC] [get-define CFLAGS] [get-define CPPFL…
748 define cc-default-debug -g0
753 if {![cc-check-includes stdlib.h]} {
758 cc-init