[lkml]   [2017]   [Nov]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [GIT PULL] License cleanup: add SPDX license identifiers to some kernel files
On Thu, Nov 2, 2017 at 11:21 AM, Thomas Gleixner <> wrote:
> The wreckage is with the *.lds.S ones which are used to generate .lds with
> some gcc preprocessor magic. And then ld falls flat on its nose with the //
> comment.

The cpp phase should just get rid of them.

But we actually explicitly use "cpp -C" for the lds file to keep
comments around. Which makes no sense to me, but there it is.

That is *completely* crazy. I wonder why we do that brain-damage.

Literally just removing that -C fixes the problem:

- cmd_cpp_lds_S = $(CPP) $(cpp_flags) -P -C -U$(ARCH) \
+ cmd_cpp_lds_S = $(CPP) $(cpp_flags) -P -U$(ARCH) \

and there is no reason to keep them that I can possibly see.

Seriously, we should fix that regardless, but if it actually keeps us
from having C++ style comments in header files that might be included
in lds.S files, we should _definitely_ fix it.

It seems to be a historical oddity. The "-C" was added in 51b563fc93c8
("arm, cris, mips, sparc, powerpc, um, xtensa: fix build with bash
4.0"), but it came from our old

export += -P -C -U$(ARCH)

which predates the git history.

Hmm.. Digging down, long long ago we used to do

arch/$(ARCH)/ arch/$(ARCH)/
$(CPP) $(CPPFLAGS) $(CPPFLAGS_$@) -P -C -U$(ARCH) $< -o $@

and that's where the -C comes from. And *that* came from MIPS, ia64
and sh doing so back in 2002.

But they used to use "-traditional" too.

So I'm pretty sure that the whole stupid "-C" is just a bogus result
of history that should have been gotten rid of long long long ago.


 \ /
  Last update: 2017-11-02 19:55    [W:0.063 / U:59.148 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site