<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/tools/objtool/Makefile, branch for-next</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=for-next</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=for-next'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2024-10-17T22:13:06Z</updated>
<entry>
<title>objtool: Also include tools/include/uapi</title>
<updated>2024-10-17T22:13:06Z</updated>
<author>
<name>HONG Yifan</name>
<email>elsk@google.com</email>
</author>
<published>2024-10-08T23:47:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=32b504854bd96f707a03c6ddecb0af9d7fbc4775'/>
<id>urn:sha1:32b504854bd96f707a03c6ddecb0af9d7fbc4775</id>
<content type='text'>
When building objtool against a sysroot that contains a stripped down
version of the UAPI headers, the following error happens:

    In file included from arch/x86/decode.c:10:
    In file included from .../tools/arch/x86/include/asm/insn.h:10:
    In file included from &lt;sysroot&gt;/include/asm/byteorder.h:9:
    In file included from &lt;sysroot&gt;/include/linux/byteorder/little_endian.h:15:
    In file included from &lt;sysroot&gt;/include/linux/stddef.h:9:
    In file included from .../tools/include/linux/compiler_types.h:36:
    .../tools/include/linux/compiler-gcc.h:3:2: error: "Please don't include &lt;linux/compiler-gcc.h&gt; directly, include &lt;linux/compiler.h&gt; instead."
        3 | #error "Please don't include &lt;linux/compiler-gcc.h&gt; directly, include &lt;linux/compiler.h&gt; instead."
        |  ^
    1 error generated.

As hinted by the error, this is because &lt;sysroot&gt;/include/linux/stddef.h
(a stripped-down version of uapi/include/linux/stddef.h) includes
linux/compiler_types.h directly. However, this gets resolved to
tools/include/linux/compiler_types.h, which is not expected to be
included directly.

To resolve this, I added tools/include/uapi to the include paths when
building objtool. With this trick, linux/stddef.h is resolved to
tools/include/uapi/linux/stddef.h, which doesn't include
linux/compiler_types.h.

Signed-off-by: HONG Yifan &lt;elsk@google.com&gt;
Signed-off-by: Josh Poimboeuf &lt;jpoimboe@kernel.org&gt;
</content>
</entry>
<entry>
<title>objtool/LoongArch: Enable orc to be built</title>
<updated>2024-03-11T14:23:47Z</updated>
<author>
<name>Tiezhu Yang</name>
<email>yangtiezhu@loongson.cn</email>
</author>
<published>2024-03-11T14:23:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3c7266cd7bc5e7843b631fea73cb0e82111e3158'/>
<id>urn:sha1:3c7266cd7bc5e7843b631fea73cb0e82111e3158</id>
<content type='text'>
Implement arch-specific init_orc_entry(), write_orc_entry(), reg_name(),
orc_type_name(), print_reg() and orc_print_dump(), then set BUILD_ORC as
y to build the orc related files.

Co-developed-by: Jinyang He &lt;hejinyang@loongson.cn&gt;
Signed-off-by: Jinyang He &lt;hejinyang@loongson.cn&gt;
Co-developed-by: Youling Tang &lt;tangyouling@loongson.cn&gt;
Signed-off-by: Youling Tang &lt;tangyouling@loongson.cn&gt;
Signed-off-by: Tiezhu Yang &lt;yangtiezhu@loongson.cn&gt;
Signed-off-by: Huacai Chen &lt;chenhuacai@loongson.cn&gt;
</content>
</entry>
<entry>
<title>objtool: Fix HOSTCC flag usage</title>
<updated>2023-02-01T17:15:18Z</updated>
<author>
<name>Ian Rogers</name>
<email>irogers@google.com</email>
</author>
<published>2023-01-26T19:06:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=cd955bdd6aa5ec54cdef622a142f8899a64b5446'/>
<id>urn:sha1:cd955bdd6aa5ec54cdef622a142f8899a64b5446</id>
<content type='text'>
HOSTCC is always wanted when building objtool. Setting CC to HOSTCC
happens after tools/scripts/Makefile.include is included, meaning
flags (like CFLAGS) are set assuming say CC is gcc, but then it can be
later set to HOSTCC which may be clang. tools/scripts/Makefile.include
is needed for host set up and common macros in objtool's
Makefile. Rather than override the CC variable to HOSTCC, just pass CC
as HOSTCC to the sub-makes of Makefile.build, the libsubcmd builds and
also to the linkage step.

Signed-off-by: Ian Rogers &lt;irogers@google.com&gt;
Link: https://lore.kernel.org/r/20230126190606.40739-4-irogers@google.com
Signed-off-by: Josh Poimboeuf &lt;jpoimboe@kernel.org&gt;
</content>
</entry>
<entry>
<title>objtool: Properly support make V=1</title>
<updated>2023-01-31T00:28:16Z</updated>
<author>
<name>Ian Rogers</name>
<email>irogers@google.com</email>
</author>
<published>2023-01-26T19:06:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8c4526ca6a45e7ff915c2b33b54db6b773291fac'/>
<id>urn:sha1:8c4526ca6a45e7ff915c2b33b54db6b773291fac</id>
<content type='text'>
The Q variable was being used but never correctly set up. Add the
setting up and use in place of @.

Signed-off-by: Ian Rogers &lt;irogers@google.com&gt;
Link: https://lore.kernel.org/r/20230126190606.40739-3-irogers@google.com
Signed-off-by: Josh Poimboeuf &lt;jpoimboe@kernel.org&gt;
</content>
</entry>
<entry>
<title>objtool: Install libsubcmd in build</title>
<updated>2023-01-31T00:27:46Z</updated>
<author>
<name>Ian Rogers</name>
<email>irogers@google.com</email>
</author>
<published>2023-01-26T19:06:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=bdb8bf7d56afd1d22c12c61455d732d3baff2bde'/>
<id>urn:sha1:bdb8bf7d56afd1d22c12c61455d732d3baff2bde</id>
<content type='text'>
Including from tools/lib can create inadvertent dependencies. Install
libsubcmd in the objtool build and then include the headers from
there.

Signed-off-by: Ian Rogers &lt;irogers@google.com&gt;
Link: https://lore.kernel.org/r/20230126190606.40739-2-irogers@google.com
Signed-off-by: Josh Poimboeuf &lt;jpoimboe@kernel.org&gt;
</content>
</entry>
<entry>
<title>Merge tag 'kbuild-v5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild</title>
<updated>2022-05-26T19:09:50Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2022-05-26T19:09:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=df202b452fe6c6d6f1351bad485e2367ef1e644e'/>
<id>urn:sha1:df202b452fe6c6d6f1351bad485e2367ef1e644e</id>
<content type='text'>
Pull Kbuild updates from Masahiro Yamada:

 - Add HOSTPKG_CONFIG env variable to allow users to override pkg-config

 - Support W=e as a shorthand for KCFLAGS=-Werror

 - Fix CONFIG_IKHEADERS build to support toybox cpio

 - Add scripts/dummy-tools/pahole to ease distro packagers' life

 - Suppress false-positive warnings from checksyscalls.sh for W=2 build

 - Factor out the common code of arch/*/boot/install.sh into
   scripts/install.sh

 - Support 'kernel-install' tool in scripts/prune-kernel

 - Refactor module-versioning to link the symbol versions at the final
   link of vmlinux and modules

 - Remove CONFIG_MODULE_REL_CRCS because module-versioning now works in
   an arch-agnostic way

 - Refactor modpost, Makefiles

* tag 'kbuild-v5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (56 commits)
  genksyms: adjust the output format to modpost
  kbuild: stop merging *.symversions
  kbuild: link symbol CRCs at final link, removing CONFIG_MODULE_REL_CRCS
  modpost: extract symbol versions from *.cmd files
  modpost: add sym_find_with_module() helper
  modpost: change the license of EXPORT_SYMBOL to bool type
  modpost: remove left-over cross_compile declaration
  kbuild: record symbol versions in *.cmd files
  kbuild: generate a list of objects in vmlinux
  modpost: move *.mod.c generation to write_mod_c_files()
  modpost: merge add_{intree_flag,retpoline,staging_flag} to add_header
  scripts/prune-kernel: Use kernel-install if available
  kbuild: factor out the common installation code into scripts/install.sh
  modpost: split new_symbol() to symbol allocation and hash table addition
  modpost: make sym_add_exported() always allocate a new symbol
  modpost: make multiple export error
  modpost: dump Module.symvers in the same order of modules.order
  modpost: traverse the namespace_list in order
  modpost: use doubly linked list for dump_lists
  modpost: traverse unresolved symbols in order
  ...
</content>
</entry>
<entry>
<title>objtool: Remove libsubcmd.a when make clean</title>
<updated>2022-05-12T14:28:35Z</updated>
<author>
<name>Tiezhu Yang</name>
<email>yangtiezhu@loongson.cn</email>
</author>
<published>2022-05-11T08:37:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4bc78005887f6fca60b624822943708652fda01a'/>
<id>urn:sha1:4bc78005887f6fca60b624822943708652fda01a</id>
<content type='text'>
The file libsubcmd.a still exists after make clean, remove it.

Signed-off-by: Tiezhu Yang &lt;yangtiezhu@loongson.cn&gt;
Signed-off-by: Josh Poimboeuf &lt;jpoimboe@kernel.org&gt;
Link: https://lore.kernel.org/r/1652258270-6278-3-git-send-email-yangtiezhu@loongson.cn
</content>
</entry>
<entry>
<title>objtool: Remove inat-tables.c when make clean</title>
<updated>2022-05-12T14:28:05Z</updated>
<author>
<name>Tiezhu Yang</name>
<email>yangtiezhu@loongson.cn</email>
</author>
<published>2022-05-11T08:37:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f193c32cad2ddc79ad55a2e2fb3bc35e7d92946a'/>
<id>urn:sha1:f193c32cad2ddc79ad55a2e2fb3bc35e7d92946a</id>
<content type='text'>
When build objtool on x86, the generated file inat-tables.c is in
arch/x86/lib instead of arch/x86, use the correct dir to remove it
when make clean.

$ cd tools/objtool
$ make
[...]
  GEN     arch/x86/lib/inat-tables.c
[...]

Signed-off-by: Tiezhu Yang &lt;yangtiezhu@loongson.cn&gt;
Signed-off-by: Josh Poimboeuf &lt;jpoimboe@kernel.org&gt;
Link: https://lore.kernel.org/r/1652258270-6278-2-git-send-email-yangtiezhu@loongson.cn
</content>
</entry>
<entry>
<title>objtool: Ditch subcommands</title>
<updated>2022-04-22T10:32:01Z</updated>
<author>
<name>Josh Poimboeuf</name>
<email>jpoimboe@redhat.com</email>
</author>
<published>2022-04-18T16:50:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b51277eb9775ce916f9efd2c51533e481180c1e8'/>
<id>urn:sha1:b51277eb9775ce916f9efd2c51533e481180c1e8</id>
<content type='text'>
Objtool has a fairly singular focus.  It runs on object files and does
validations and transformations which can be combined in various ways.
The subcommand model has never been a good fit, making it awkward to
combine and remove options.

Remove the "check" and "orc" subcommands in favor of a more traditional
cmdline option model.  This makes it much more flexible to use, and
easier to port individual features to other arches.

Signed-off-by: Josh Poimboeuf &lt;jpoimboe@redhat.com&gt;
Signed-off-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Reviewed-by: Miroslav Benes &lt;mbenes@suse.cz&gt;
Link: https://lkml.kernel.org/r/5c61ebf805e90aefc5fa62bc63468ffae53b9df6.1650300597.git.jpoimboe@redhat.com
</content>
</entry>
<entry>
<title>kbuild: Allow kernel installation packaging to override pkg-config</title>
<updated>2022-04-05T08:03:31Z</updated>
<author>
<name>Chun-Tse Shao</name>
<email>ctshao@google.com</email>
</author>
<published>2022-04-01T23:18:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d5ea4fece4508bf8e72b659cd22fa4840d8d61e5'/>
<id>urn:sha1:d5ea4fece4508bf8e72b659cd22fa4840d8d61e5</id>
<content type='text'>
Add HOSTPKG_CONFIG to allow tooling that builds the kernel to override
what pkg-config and parameters are used.

Signed-off-by: Chun-Tse Shao &lt;ctshao@google.com&gt;
Reviewed-by: Nick Desaulniers &lt;ndesaulniers@google.com&gt;
Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
</content>
</entry>
</feed>
