MIPS: remove a space after -I to cope with header search paths for VDSO [Linux 5.2]

MIPS: remove a space after -I to cope with header search paths for VDSO [Linux 5.2]

This Linux kernel change "MIPS: remove a space after -I to cope with header search paths for VDSO" is included in the Linux 5.2 release. This change is authored by Masahiro Yamada <yamada.masahiro [at] socionext.com> on Tue May 21 13:03:27 2019 +0900. The commit for this change in Linux stable tree is 3dd0aad (patch).

MIPS: remove a space after -I to cope with header search paths for VDSO

Commit 9cc342f6c4a0 ("treewide: prefix header search paths with
$(srctree)/") caused a build error for MIPS VDSO.

  CC      arch/mips/vdso/gettimeofday.o
In file included from ../arch/mips/vdso/vdso.h:26,
                 from ../arch/mips/vdso/gettimeofday.c:11:
../arch/mips/include/asm/page.h:12:10: fatal error: spaces.h: No such file or directory
 #include <spaces.h>
          ^~~~~~~~~~

The cause of the error is a missing space after the compiler flag -I .

Kbuild used to have a global restriction "no space after -I", but
commit 48f6e3cf5bc6 ("kbuild: do not drop -I without parameter") got
rid of it. Having a space after -I is no longer a big deal as far as
Kbuild is concerned.

It is still a big deal for MIPS because arch/mips/vdso/Makefile
filters the header search paths, like this:

  ccflags-vdso := \
          $(filter -I%,$(KBUILD_CFLAGS)) \

..., which relies on the assumption that there is no space after -I .

Fixes: 9cc342f6c4a0 ("treewide: prefix header search paths with $(srctree)/")
Reported-by: kbuild test robot <[email protected]>
Signed-off-by: Masahiro Yamada <[email protected]>
Signed-off-by: Paul Burton <[email protected]>
Cc: Ralf Baechle <[email protected]>
Cc: James Hogan <[email protected]>
Cc: [email protected]
Cc: [email protected]

There are 2 lines of Linux source code added/deleted in this change. Code changes to Linux kernel are as follows.

 arch/mips/pnx833x/Platform | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/mips/pnx833x/Platform b/arch/mips/pnx833x/Platform
index 6b1a847..2872606 100644
--- a/arch/mips/pnx833x/Platform
+++ b/arch/mips/pnx833x/Platform
@@ -1,5 +1,5 @@
 # NXP STB225
 platform-$(CONFIG_SOC_PNX833X) += pnx833x/
-cflags-$(CONFIG_SOC_PNX833X)   += -I $(srctree)/arch/mips/include/asm/mach-pnx833x
+cflags-$(CONFIG_SOC_PNX833X)   += -I$(srctree)/arch/mips/include/asm/mach-pnx833x
 load-$(CONFIG_NXP_STB220)  += 0xffffffff80001000
 load-$(CONFIG_NXP_STB225)  += 0xffffffff80001000

Leave a Reply

Your email address will not be published. Required fields are marked *