Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'kbuild-fixes-v6.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild

Pull Kbuild fixes from Masahiro Yamada:

- Remove stale code in usr/include/headers_check.pl

- Fix issues in the user-mode-linux Debian package

- Fix false-positive "export twice" errors in modpost

* tag 'kbuild-fixes-v6.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
modpost: distinguish same module paths from different dump files
kbuild: deb-pkg: Do not install maint scripts for arch 'um'
kbuild: deb-pkg: add debarch for ARCH=um
kbuild: Drop support for include/asm-<arch> in headers_check.pl

+27 -17
+9 -8
scripts/mod/modpost.c
··· 155 155 /* A list of all modules we processed */ 156 156 LIST_HEAD(modules); 157 157 158 - static struct module *find_module(const char *modname) 158 + static struct module *find_module(const char *filename, const char *modname) 159 159 { 160 160 struct module *mod; 161 161 162 162 list_for_each_entry(mod, &modules, list) { 163 - if (strcmp(mod->name, modname) == 0) 163 + if (!strcmp(mod->dump_file, filename) && 164 + !strcmp(mod->name, modname)) 164 165 return mod; 165 166 } 166 167 return NULL; ··· 2031 2030 continue; 2032 2031 } 2033 2032 2034 - mod = find_module(modname); 2033 + mod = find_module(fname, modname); 2035 2034 if (!mod) { 2036 2035 mod = new_module(modname, strlen(modname)); 2037 - mod->from_dump = true; 2036 + mod->dump_file = fname; 2038 2037 } 2039 2038 s = sym_add_exported(symname, mod, gpl_only, namespace); 2040 2039 sym_set_crc(s, crc); ··· 2053 2052 struct symbol *sym; 2054 2053 2055 2054 list_for_each_entry(mod, &modules, list) { 2056 - if (mod->from_dump) 2055 + if (mod->dump_file) 2057 2056 continue; 2058 2057 list_for_each_entry(sym, &mod->exported_symbols, list) { 2059 2058 if (trim_unused_exports && !sym->used) ··· 2077 2076 2078 2077 list_for_each_entry(mod, &modules, list) { 2079 2078 2080 - if (mod->from_dump || list_empty(&mod->missing_namespaces)) 2079 + if (mod->dump_file || list_empty(&mod->missing_namespaces)) 2081 2080 continue; 2082 2081 2083 2082 buf_printf(&ns_deps_buf, "%s.ko:", mod->name); ··· 2195 2194 read_symbols_from_files(files_source); 2196 2195 2197 2196 list_for_each_entry(mod, &modules, list) { 2198 - if (mod->from_dump || mod->is_vmlinux) 2197 + if (mod->dump_file || mod->is_vmlinux) 2199 2198 continue; 2200 2199 2201 2200 check_modname_len(mod); ··· 2206 2205 handle_white_list_exports(unused_exports_white_list); 2207 2206 2208 2207 list_for_each_entry(mod, &modules, list) { 2209 - if (mod->from_dump) 2208 + if (mod->dump_file) 2210 2209 continue; 2211 2210 2212 2211 if (mod->is_vmlinux)
+2 -1
scripts/mod/modpost.h
··· 95 95 /** 96 96 * struct module - represent a module (vmlinux or *.ko) 97 97 * 98 + * @dump_file: path to the .symvers file if loaded from a file 98 99 * @aliases: list head for module_aliases 99 100 */ 100 101 struct module { 101 102 struct list_head list; 102 103 struct list_head exported_symbols; 103 104 struct list_head unresolved_symbols; 105 + const char *dump_file; 104 106 bool is_gpl_compatible; 105 - bool from_dump; /* true if module was loaded from *.symvers */ 106 107 bool is_vmlinux; 107 108 bool seen; 108 109 bool has_init;
+6
scripts/package/builddeb
··· 63 63 esac 64 64 cp "$(${MAKE} -s -f ${srctree}/Makefile image_name)" "${pdir}/${installed_image_path}" 65 65 66 + if [ "${ARCH}" != um ]; then 67 + install_maint_scripts "${pdir}" 68 + fi 69 + } 70 + 71 + install_maint_scripts () { 66 72 # Install the maintainer scripts 67 73 # Note: hook scripts under /etc/kernel are also executed by official Debian 68 74 # kernel packages, as well as kernel packages built using make-kpkg.
+7
scripts/package/mkdebian
··· 70 70 debarch=sh4$(if_enabled_echo CONFIG_CPU_BIG_ENDIAN eb) 71 71 fi 72 72 ;; 73 + um) 74 + if is_enabled CONFIG_64BIT; then 75 + debarch=amd64 76 + else 77 + debarch=i386 78 + fi 79 + ;; 73 80 esac 74 81 if [ -z "$debarch" ]; then 75 82 debarch=$(dpkg-architecture -qDEB_HOST_ARCH)
+1 -1
usr/include/Makefile
··· 78 78 cmd_hdrtest = \ 79 79 $(CC) $(c_flags) -fsyntax-only -x c /dev/null \ 80 80 $(if $(filter-out $(no-header-test), $*.h), -include $< -include $<); \ 81 - $(PERL) $(src)/headers_check.pl $(obj) $(SRCARCH) $<; \ 81 + $(PERL) $(src)/headers_check.pl $(obj) $<; \ 82 82 touch $@ 83 83 84 84 $(obj)/%.hdrtest: $(obj)/%.h FORCE
+2 -7
usr/include/headers_check.pl
··· 3 3 # 4 4 # headers_check.pl execute a number of trivial consistency checks 5 5 # 6 - # Usage: headers_check.pl dir arch [files...] 6 + # Usage: headers_check.pl dir [files...] 7 7 # dir: dir to look for included files 8 - # arch: architecture 9 8 # files: list of files to check 10 9 # 11 10 # The script reads the supplied files line by line and: ··· 22 23 use strict; 23 24 use File::Basename; 24 25 25 - my ($dir, $arch, @files) = @ARGV; 26 + my ($dir, @files) = @ARGV; 26 27 27 28 my $ret = 0; 28 29 my $line; ··· 53 54 my $inc = $1; 54 55 my $found; 55 56 $found = stat($dir . "/" . $inc); 56 - if (!$found) { 57 - $inc =~ s#asm/#asm-$arch/#; 58 - $found = stat($dir . "/" . $inc); 59 - } 60 57 if (!$found) { 61 58 printf STDERR "$filename:$lineno: included file '$inc' is not exported\n"; 62 59 $ret = 1;