Merge tag 'kbuild-fixes-v5.9-4' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild

Pull Kbuild fixes from Masahiro Yamada:

- ignore compiler stubs for PPC to fix builds

- fix the usage of --target mentioned in the LLVM document

* tag 'kbuild-fixes-v5.9-4' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
Documentation/llvm: Fix clang target examples
scripts/kallsyms: skip ppc compiler stub *.long_branch.* / *.plt_branch.*

Changed files
+17 -3
Documentation
kbuild
scripts
+2 -2
Documentation/kbuild/llvm.rst
··· 39 39 ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- make CC=clang 40 40 41 41 ``CROSS_COMPILE`` is not used to prefix the Clang compiler binary, instead 42 - ``CROSS_COMPILE`` is used to set a command line flag: ``--target <triple>``. For 42 + ``CROSS_COMPILE`` is used to set a command line flag: ``--target=<triple>``. For 43 43 example: :: 44 44 45 - clang --target aarch64-linux-gnu foo.c 45 + clang --target=aarch64-linux-gnu foo.c 46 46 47 47 LLVM Utilities 48 48 --------------
+15 -1
scripts/kallsyms.c
··· 82 82 83 83 static bool is_ignored_symbol(const char *name, char type) 84 84 { 85 + /* Symbol names that exactly match to the following are ignored.*/ 85 86 static const char * const ignored_symbols[] = { 86 87 /* 87 88 * Symbols which vary between passes. Passes 1 and 2 must have ··· 105 104 NULL 106 105 }; 107 106 107 + /* Symbol names that begin with the following are ignored.*/ 108 108 static const char * const ignored_prefixes[] = { 109 109 "$", /* local symbols for ARM, MIPS, etc. */ 110 110 ".LASANPC", /* s390 kasan local symbols */ ··· 115 113 NULL 116 114 }; 117 115 116 + /* Symbol names that end with the following are ignored.*/ 118 117 static const char * const ignored_suffixes[] = { 119 118 "_from_arm", /* arm */ 120 119 "_from_thumb", /* arm */ ··· 123 120 NULL 124 121 }; 125 122 123 + /* Symbol names that contain the following are ignored.*/ 124 + static const char * const ignored_matches[] = { 125 + ".long_branch.", /* ppc stub */ 126 + ".plt_branch.", /* ppc stub */ 127 + NULL 128 + }; 129 + 126 130 const char * const *p; 127 131 128 - /* Exclude symbols which vary between passes. */ 129 132 for (p = ignored_symbols; *p; p++) 130 133 if (!strcmp(name, *p)) 131 134 return true; ··· 144 135 int l = strlen(name) - strlen(*p); 145 136 146 137 if (l >= 0 && !strcmp(name + l, *p)) 138 + return true; 139 + } 140 + 141 + for (p = ignored_matches; *p; p++) { 142 + if (strstr(name, *p)) 147 143 return true; 148 144 } 149 145