lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+55aFw86dobRpr5znqeYjfz7NRSDoAS-FLBK2fS+BoF9WB-UA@mail.gmail.com>
Date:   Thu, 2 Nov 2017 11:53:53 -0700
From:   Linus Torvalds <torvalds@...ux-foundation.org>
To:     Thomas Gleixner <tglx@...utronix.de>
Cc:     Greg KH <gregkh@...uxfoundation.org>,
        Masahiro Yamada <yamada.masahiro@...ionext.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Kate Stewart <kstewart@...uxfoundation.org>,
        Philippe Ombredanne <pombredanne@...b.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [GIT PULL] License cleanup: add SPDX license identifiers to some
 kernel files

On Thu, Nov 2, 2017 at 11:21 AM, Thomas Gleixner <tglx@...utronix.de> 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 CPPFLAGS_vmlinux.lds += -P -C -U$(ARCH)

which predates the git history.

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

  arch/$(ARCH)/vmlinux.lds.s: arch/$(ARCH)/vmlinux.lds.S
         $(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.

                Linus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ