<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/arch/sh/Makefile, branch v6.19.11</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.19.11</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.19.11'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2025-07-26T15:15:41+00:00</updated>
<entry>
<title>sh: Do not use hyphen in exported variable name</title>
<updated>2025-07-26T15:15:41+00:00</updated>
<author>
<name>Ben Hutchings</name>
<email>benh@debian.org</email>
</author>
<published>2025-07-17T14:47:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c32969d0362a790fbc6117e0b6a737a7e510b843'/>
<id>urn:sha1:c32969d0362a790fbc6117e0b6a737a7e510b843</id>
<content type='text'>
arch/sh/Makefile defines and exports ld-bfd to be used by
arch/sh/boot/compressed/Makefile and arch/sh/boot/romimage/Makefile.
However some shells, including dash, will not pass through environment
variables whose name includes a hyphen.  Usually GNU make does not use
a shell to recurse, but if e.g. $(srctree) contains '~' it will use a
shell here.

Other instances of this problem were previously fixed by commits
2bfbe7881ee0 "kbuild: Do not use hyphen in exported variable name"
and 82977af93a0d "sh: rename suffix-y to suffix_y".

Rename the variable to ld_bfd.

References: https://buildd.debian.org/status/fetch.php?pkg=linux&amp;arch=sh4&amp;ver=4.13%7Erc5-1%7Eexp1&amp;stamp=1502943967&amp;raw=0
Fixes: 7b022d07a0fd ("sh: Tidy up the ldscript output format specifier.")
Signed-off-by: Ben Hutchings &lt;benh@debian.org&gt;
Reviewed-by: John Paul Adrian Glaubitz &lt;glaubitz@physik.fu-berlin.de&gt;
Signed-off-by: John Paul Adrian Glaubitz &lt;glaubitz@physik.fu-berlin.de&gt;
</content>
</entry>
<entry>
<title>sh: Remove compiler flag duplication</title>
<updated>2023-07-05T16:55:25+00:00</updated>
<author>
<name>Masahiro Yamada</name>
<email>masahiroy@kernel.org</email>
</author>
<published>2023-02-19T14:15:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4bd04b2037423f11e6be03709d1fccdc6045c4a1'/>
<id>urn:sha1:4bd04b2037423f11e6be03709d1fccdc6045c4a1</id>
<content type='text'>
Every compiler flag added by arch/sh/Makefile is passed to the
compiler twice:

$(KBUILD_CPPFLAGS) + $(KBUILD_CFLAGS) is used for compiling *.c
$(KBUILD_CPPFLAGS) + $(KBUILD_AFLAGS) is used for compiling *.S

Given the above, adding $(cflags-y) to all of KBUILD_{CPP/C/A}FLAGS
ends up with duplication.

Add -I options to $(KBUILD_CPPFLAGS), and the rest of $(cflags-y)
to KBUILD_{C,A}FLAGS.

Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
Acked-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Tested-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Reviewed-by: John Paul Adrian Glaubitz &lt;glaubitz@physik.fu-berlin.de&gt;
Link: https://lore.kernel.org/r/20230219141555.2308306-4-masahiroy@kernel.org
Signed-off-by: John Paul Adrian Glaubitz &lt;glaubitz@physik.fu-berlin.de&gt;
</content>
</entry>
<entry>
<title>sh: Refactor header include path addition</title>
<updated>2023-07-05T16:55:24+00:00</updated>
<author>
<name>Masahiro Yamada</name>
<email>masahiroy@kernel.org</email>
</author>
<published>2023-02-19T14:15:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=01658fe3d6c02992846a038c8111e70ace169295'/>
<id>urn:sha1:01658fe3d6c02992846a038c8111e70ace169295</id>
<content type='text'>
Shorten the code. No functional change intended.

Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
Acked-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Tested-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Reviewed-by: John Paul Adrian Glaubitz &lt;glaubitz@physik.fu-berlin.de&gt;
Link: https://lore.kernel.org/r/20230219141555.2308306-3-masahiroy@kernel.org
Signed-off-by: John Paul Adrian Glaubitz &lt;glaubitz@physik.fu-berlin.de&gt;
</content>
</entry>
<entry>
<title>sh: Move build rule for cchips/hd6446x/ to arch/sh/Kbuild</title>
<updated>2023-07-05T16:55:18+00:00</updated>
<author>
<name>Masahiro Yamada</name>
<email>masahiroy@kernel.org</email>
</author>
<published>2023-02-19T14:15:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9b4daf52b67b97ada589a0bd9bf127488f00925a'/>
<id>urn:sha1:9b4daf52b67b97ada589a0bd9bf127488f00925a</id>
<content type='text'>
This is the last user of core-y in arch/sh.

Use the standard obj-y syntax.

Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
Acked-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Tested-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Reviewed-by: John Paul Adrian Glaubitz &lt;glaubitz@physik.fu-berlin.de&gt;
Link: https://lore.kernel.org/r/20230219141555.2308306-2-masahiroy@kernel.org
Signed-off-by: John Paul Adrian Glaubitz &lt;glaubitz@physik.fu-berlin.de&gt;
</content>
</entry>
<entry>
<title>sh: Fix -Wmissing-include-dirs warnings for various platforms</title>
<updated>2023-07-05T16:51:10+00:00</updated>
<author>
<name>Masahiro Yamada</name>
<email>masahiroy@kernel.org</email>
</author>
<published>2023-02-19T14:15:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=706afcea16cd83fecb7c2229ccc31bb237ffdbef'/>
<id>urn:sha1:706afcea16cd83fecb7c2229ccc31bb237ffdbef</id>
<content type='text'>
The 0day bot reports a lot of warnings (or errors due to CONFIG_WERROR)
like this:

  cc1: error: arch/sh/include/mach-hp6xx: No such file or directory [-Werror=missing-include-dirs]

Indeed, arch/sh/include/mach-hp6xx does not exist.

While -Wmissing-include-dirs is only a W=1 warning, it may be
annoying when CONFIG_BTRFS_FS is enabled because fs/btrfs/Makefile
unconditionally adds this warning option.

arch/sh/Makefile defines machdir-y for two purposes:

 - Build platform code in arch/sh/boards/mach-*/
 - Add arch/sh/include/mach-*/ to the header search path

For the latter, some platforms use arch/sh/include/mach-common/
instead of having its own arch/sh/include/mach-*/.

Drop unneeded machdir-y to omit non-existing include directories.

To build arch/sh/boards/mach-*/, use the standard obj-y syntax in
arch/sh/boards/Makefile.

Reported-by: kernel test robot &lt;lkp@intel.com&gt;
Link: https://lore.kernel.org/oe-kbuild-all/202302190641.30VVXnPb-lkp@intel.com/
Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
Acked-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Tested-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Reviewed-by: John Paul Adrian Glaubitz &lt;glaubitz@physik.fu-berlin.de&gt;
Link: https://lore.kernel.org/r/20230219141555.2308306-1-masahiroy@kernel.org
Signed-off-by: John Paul Adrian Glaubitz &lt;glaubitz@physik.fu-berlin.de&gt;
</content>
</entry>
<entry>
<title>kbuild: remove head-y syntax</title>
<updated>2022-10-02T09:06:03+00:00</updated>
<author>
<name>Masahiro Yamada</name>
<email>masahiroy@kernel.org</email>
</author>
<published>2022-09-24T18:19:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ce697ccee1a8661da4e23fbe5f3d45d8d6922c20'/>
<id>urn:sha1:ce697ccee1a8661da4e23fbe5f3d45d8d6922c20</id>
<content type='text'>
Kbuild puts the objects listed in head-y at the head of vmlinux.
Conventionally, we do this for head*.S, which contains the kernel entry
point.

A counter approach is to control the section order by the linker script.
Actually, the code marked as __HEAD goes into the ".head.text" section,
which is placed before the normal ".text" section.

I do not know if both of them are needed. From the build system
perspective, head-y is not mandatory. If you can achieve the proper code
placement by the linker script only, it would be cleaner.

I collected the current head-y objects into head-object-list.txt. It is
a whitelist. My hope is it will be reduced in the long run.

Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
Tested-by: Nick Desaulniers &lt;ndesaulniers@google.com&gt;
Reviewed-by: Nicolas Schier &lt;nicolas@fjasle.eu&gt;
</content>
</entry>
<entry>
<title>kbuild: use more subdir- for visiting subdirectories while cleaning</title>
<updated>2021-10-24T04:49:46+00:00</updated>
<author>
<name>Masahiro Yamada</name>
<email>masahiroy@kernel.org</email>
</author>
<published>2021-10-13T06:36:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8212f8986d311ccf6a72305e6bdbd814691701d6'/>
<id>urn:sha1:8212f8986d311ccf6a72305e6bdbd814691701d6</id>
<content type='text'>
Documentation/kbuild/makefiles.rst suggests to use "archclean" for
cleaning arch/$(SRCARCH)/boot/, but it is not a hard requirement.

Since commit d92cc4d51643 ("kbuild: require all architectures to have
arch/$(SRCARCH)/Kbuild"), we can use the "subdir- += boot" trick for
all architectures. This can take advantage of the parallel option (-j)
for "make clean".

I also cleaned up the comments in arch/$(SRCARCH)/Makefile. The "archdep"
target no longer exists.

Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
Reviewed-by: Kees Cook &lt;keescook@chromium.org&gt;
Acked-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Acked-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt; (powerpc)
</content>
</entry>
<entry>
<title>sh: remove meaningless archclean line</title>
<updated>2021-10-24T04:48:40+00:00</updated>
<author>
<name>Masahiro Yamada</name>
<email>masahiroy@kernel.org</email>
</author>
<published>2021-10-13T06:36:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=10c6ae274fe29f732ca9bbcd7016e9827673c954'/>
<id>urn:sha1:10c6ae274fe29f732ca9bbcd7016e9827673c954</id>
<content type='text'>
The vsyscall directory is cleaned up by the ordinary way
via arch/sh/kernel/Makefile:

  obj-$(CONFIG_VSYSCALL)          += vsyscall/

Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
</content>
</entry>
<entry>
<title>sh: move core-y in arch/sh/Makefile to arch/sh/Kbuild</title>
<updated>2021-05-26T14:11:47+00:00</updated>
<author>
<name>Masahiro Yamada</name>
<email>masahiroy@kernel.org</email>
</author>
<published>2021-05-12T07:57:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=92f378f19e947eeffc52c427cd734f7b19eb54c4'/>
<id>urn:sha1:92f378f19e947eeffc52c427cd734f7b19eb54c4</id>
<content type='text'>
Use obj-y to clean up Makefile.

Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
</content>
</entry>
<entry>
<title>arch: use cross_compiling to check whether it is a cross build or not</title>
<updated>2021-05-05T16:49:13+00:00</updated>
<author>
<name>Masahiro Yamada</name>
<email>masahiroy@kernel.org</email>
</author>
<published>2021-05-01T17:24:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=23243c1ace9fb4eae2f75e0fe0ece8e3219fb4f3'/>
<id>urn:sha1:23243c1ace9fb4eae2f75e0fe0ece8e3219fb4f3</id>
<content type='text'>
'cross_compiling' is defined by the top Makefile and available for
arch Makefiles to check whether it is a cross build or not. A good
thing is the variable name 'cross_compiling' is self-documenting.

This is a simple replacement for m68k, mips, sh, for which $(ARCH)
and $(SRCARCH) always match.

No functional change is intended for xtensa, either.

This is rather a fix for parisc because arch/parisc/Makefile defines
UTS_MATCHINE depending on CONFIG_64BIT, therefore cc-cross-prefix
is not working in Kconfig time.

Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
Acked-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Acked-by: Helge Deller &lt;deller@gmx.de&gt;  # parisc
Acked-by: Max Filippov &lt;jcmvbkbc@gmail.com&gt; # xtensa
</content>
</entry>
</feed>
