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 ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- make CC=clang 40 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 43 example: :: 44 45 - clang --target aarch64-linux-gnu foo.c 46 47 LLVM Utilities 48 --------------
··· 39 ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- make CC=clang 40 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 43 example: :: 44 45 + clang --target=aarch64-linux-gnu foo.c 46 47 LLVM Utilities 48 --------------
+15 -1
scripts/kallsyms.c
··· 82 83 static bool is_ignored_symbol(const char *name, char type) 84 { 85 static const char * const ignored_symbols[] = { 86 /* 87 * Symbols which vary between passes. Passes 1 and 2 must have ··· 105 NULL 106 }; 107 108 static const char * const ignored_prefixes[] = { 109 "$", /* local symbols for ARM, MIPS, etc. */ 110 ".LASANPC", /* s390 kasan local symbols */ ··· 115 NULL 116 }; 117 118 static const char * const ignored_suffixes[] = { 119 "_from_arm", /* arm */ 120 "_from_thumb", /* arm */ ··· 123 NULL 124 }; 125 126 const char * const *p; 127 128 - /* Exclude symbols which vary between passes. */ 129 for (p = ignored_symbols; *p; p++) 130 if (!strcmp(name, *p)) 131 return true; ··· 144 int l = strlen(name) - strlen(*p); 145 146 if (l >= 0 && !strcmp(name + l, *p)) 147 return true; 148 } 149
··· 82 83 static bool is_ignored_symbol(const char *name, char type) 84 { 85 + /* Symbol names that exactly match to the following are ignored.*/ 86 static const char * const ignored_symbols[] = { 87 /* 88 * Symbols which vary between passes. Passes 1 and 2 must have ··· 104 NULL 105 }; 106 107 + /* Symbol names that begin with the following are ignored.*/ 108 static const char * const ignored_prefixes[] = { 109 "$", /* local symbols for ARM, MIPS, etc. */ 110 ".LASANPC", /* s390 kasan local symbols */ ··· 113 NULL 114 }; 115 116 + /* Symbol names that end with the following are ignored.*/ 117 static const char * const ignored_suffixes[] = { 118 "_from_arm", /* arm */ 119 "_from_thumb", /* arm */ ··· 120 NULL 121 }; 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 + 130 const char * const *p; 131 132 for (p = ignored_symbols; *p; p++) 133 if (!strcmp(name, *p)) 134 return true; ··· 135 int l = strlen(name) - strlen(*p); 136 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)) 143 return true; 144 } 145