~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/scripts/Makefile.compiler

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /scripts/Makefile.compiler (Architecture sparc) and /scripts/Makefile.compiler (Architecture m68k)


  1 # SPDX-License-Identifier: GPL-2.0-only             1 # SPDX-License-Identifier: GPL-2.0-only
  2                                                     2 
  3 # cc-cross-prefix                                   3 # cc-cross-prefix
  4 # Usage: CROSS_COMPILE := $(call cc-cross-pref      4 # Usage: CROSS_COMPILE := $(call cc-cross-prefix, m68k-linux-gnu- m68k-linux-)
  5 # Return first <prefix> where a <prefix>gcc is      5 # Return first <prefix> where a <prefix>gcc is found in PATH.
  6 # If no gcc found in PATH with listed prefixes      6 # If no gcc found in PATH with listed prefixes return nothing
  7 #                                                   7 #
  8 # Note: '2>/dev/null' is here to force Make to      8 # Note: '2>/dev/null' is here to force Make to invoke a shell. Otherwise, it
  9 # would try to directly execute the shell buil      9 # would try to directly execute the shell builtin 'command'. This workaround
 10 # should be kept for a long time since this is     10 # should be kept for a long time since this issue was fixed only after the
 11 # GNU Make 4.2.1 release.                          11 # GNU Make 4.2.1 release.
 12 cc-cross-prefix = $(firstword $(foreach c, $(1     12 cc-cross-prefix = $(firstword $(foreach c, $(1), \
 13                         $(if $(shell command -     13                         $(if $(shell command -v -- $(c)gcc 2>/dev/null), $(c))))
 14                                                    14 
 15 # output directory for tests below                 15 # output directory for tests below
 16 TMPOUT = $(if $(KBUILD_EXTMOD),$(firstword $(K     16 TMPOUT = $(if $(KBUILD_EXTMOD),$(firstword $(KBUILD_EXTMOD))/).tmp_$$$$
 17                                                    17 
 18 # try-run                                          18 # try-run
 19 # Usage: option = $(call try-run, $(CC)...-o "     19 # Usage: option = $(call try-run, $(CC)...-o "$$TMP",option-ok,otherwise)
 20 # Exit code chooses option. "$$TMP" serves as      20 # Exit code chooses option. "$$TMP" serves as a temporary file and is
 21 # automatically cleaned up.                        21 # automatically cleaned up.
 22 try-run = $(shell set -e;               \          22 try-run = $(shell set -e;               \
 23         TMP=$(TMPOUT)/tmp;              \          23         TMP=$(TMPOUT)/tmp;              \
 24         trap "rm -rf $(TMPOUT)" EXIT;   \          24         trap "rm -rf $(TMPOUT)" EXIT;   \
 25         mkdir -p $(TMPOUT);             \          25         mkdir -p $(TMPOUT);             \
 26         if ($(1)) >/dev/null 2>&1;      \          26         if ($(1)) >/dev/null 2>&1;      \
 27         then echo "$(2)";               \          27         then echo "$(2)";               \
 28         else echo "$(3)";               \          28         else echo "$(3)";               \
 29         fi)                                        29         fi)
 30                                                    30 
 31 # as-option                                        31 # as-option
 32 # Usage: aflags-y += $(call as-option,-Wa$(com     32 # Usage: aflags-y += $(call as-option,-Wa$(comma)-isa=foo,)
 33                                                    33 
 34 as-option = $(call try-run,\                       34 as-option = $(call try-run,\
 35         $(CC) -Werror $(KBUILD_CPPFLAGS) $(KBU     35         $(CC) -Werror $(KBUILD_CPPFLAGS) $(KBUILD_AFLAGS) $(1) -c -x assembler-with-cpp /dev/null -o "$$TMP",$(1),$(2))
 36                                                    36 
 37 # as-instr                                         37 # as-instr
 38 # Usage: aflags-y += $(call as-instr,instr,opt     38 # Usage: aflags-y += $(call as-instr,instr,option1,option2)
 39                                                    39 
 40 as-instr = $(call try-run,\                        40 as-instr = $(call try-run,\
 41         printf "%b\n" "$(1)" | $(CC) -Werror $     41         printf "%b\n" "$(1)" | $(CC) -Werror $(CLANG_FLAGS) $(KBUILD_AFLAGS) -Wa$(comma)--fatal-warnings -c -x assembler-with-cpp -o "$$TMP" -,$(2),$(3))
 42                                                    42 
 43 # __cc-option                                      43 # __cc-option
 44 # Usage: MY_CFLAGS += $(call __cc-option,$(CC)     44 # Usage: MY_CFLAGS += $(call __cc-option,$(CC),$(MY_CFLAGS),-march=winchip-c6,-march=i586)
 45 __cc-option = $(call try-run,\                     45 __cc-option = $(call try-run,\
 46         $(1) -Werror $(2) $(3) -c -x c /dev/nu     46         $(1) -Werror $(2) $(3) -c -x c /dev/null -o "$$TMP",$(3),$(4))
 47                                                    47 
 48 # cc-option                                        48 # cc-option
 49 # Usage: cflags-y += $(call cc-option,-march=w     49 # Usage: cflags-y += $(call cc-option,-march=winchip-c6,-march=i586)
 50                                                    50 
 51 cc-option = $(call __cc-option, $(CC),\            51 cc-option = $(call __cc-option, $(CC),\
 52         $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS),$(     52         $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS),$(1),$(2))
 53                                                    53 
 54 # cc-option-yn                                     54 # cc-option-yn
 55 # Usage: flag := $(call cc-option-yn,-march=wi     55 # Usage: flag := $(call cc-option-yn,-march=winchip-c6)
 56 cc-option-yn = $(if $(call cc-option,$1),y,n)      56 cc-option-yn = $(if $(call cc-option,$1),y,n)
 57                                                    57 
 58 # cc-disable-warning                               58 # cc-disable-warning
 59 # Usage: cflags-y += $(call cc-disable-warning     59 # Usage: cflags-y += $(call cc-disable-warning,unused-but-set-variable)
 60 cc-disable-warning = $(if $(call cc-option,-W$     60 cc-disable-warning = $(if $(call cc-option,-W$(strip $1)),-Wno-$(strip $1))
 61                                                    61 
 62 # gcc-min-version                                  62 # gcc-min-version
 63 # Usage: cflags-$(call gcc-min-version, 70100)     63 # Usage: cflags-$(call gcc-min-version, 70100) += -foo
 64 gcc-min-version = $(call test-ge, $(CONFIG_GCC     64 gcc-min-version = $(call test-ge, $(CONFIG_GCC_VERSION), $1)
 65                                                    65 
 66 # clang-min-version                                66 # clang-min-version
 67 # Usage: cflags-$(call clang-min-version, 1100     67 # Usage: cflags-$(call clang-min-version, 110000) += -foo
 68 clang-min-version = $(call test-ge, $(CONFIG_C     68 clang-min-version = $(call test-ge, $(CONFIG_CLANG_VERSION), $1)
 69                                                    69 
 70 # ld-option                                        70 # ld-option
 71 # Usage: KBUILD_LDFLAGS += $(call ld-option, -     71 # Usage: KBUILD_LDFLAGS += $(call ld-option, -X, -Y)
 72 ld-option = $(call try-run, $(LD) $(KBUILD_LDF     72 ld-option = $(call try-run, $(LD) $(KBUILD_LDFLAGS) $(1) -v,$(1),$(2),$(3))
 73                                                    73 
 74 # __rustc-option                                   74 # __rustc-option
 75 # Usage: MY_RUSTFLAGS += $(call __rustc-option     75 # Usage: MY_RUSTFLAGS += $(call __rustc-option,$(RUSTC),$(MY_RUSTFLAGS),-Cinstrument-coverage,-Zinstrument-coverage)
 76 # TODO: remove RUSTC_BOOTSTRAP=1 when we raise     76 # TODO: remove RUSTC_BOOTSTRAP=1 when we raise the minimum GNU Make version to 4.4
 77 __rustc-option = $(call try-run,\                  77 __rustc-option = $(call try-run,\
 78         echo '#![allow(missing_docs)]#![featur     78         echo '#![allow(missing_docs)]#![feature(no_core)]#![no_core]' | RUSTC_BOOTSTRAP=1\
 79         $(1) --sysroot=/dev/null $(filter-out      79         $(1) --sysroot=/dev/null $(filter-out --sysroot=/dev/null,$(2)) $(3)\
 80         --crate-type=rlib --out-dir=$(TMPOUT)      80         --crate-type=rlib --out-dir=$(TMPOUT) --emit=obj=- - >/dev/null,$(3),$(4))
 81                                                    81 
 82 # rustc-option                                     82 # rustc-option
 83 # Usage: rustflags-y += $(call rustc-option,-C     83 # Usage: rustflags-y += $(call rustc-option,-Cinstrument-coverage,-Zinstrument-coverage)
 84 rustc-option = $(call __rustc-option, $(RUSTC)     84 rustc-option = $(call __rustc-option, $(RUSTC),\
 85         $(KBUILD_RUSTFLAGS),$(1),$(2))             85         $(KBUILD_RUSTFLAGS),$(1),$(2))
 86                                                    86 
 87 # rustc-option-yn                                  87 # rustc-option-yn
 88 # Usage: flag := $(call rustc-option-yn,-Cinst     88 # Usage: flag := $(call rustc-option-yn,-Cinstrument-coverage)
 89 rustc-option-yn = $(if $(call rustc-option,$1)     89 rustc-option-yn = $(if $(call rustc-option,$1),y,n)
                                                      

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php