02 Nov, 2017

1 commit

  • Many source files in the tree are missing licensing information, which
    makes it harder for compliance tools to determine the correct license.

    By default all files without license information are under the default
    license of the kernel, which is GPL version 2.

    Update the files which contain no license information with the 'GPL-2.0'
    SPDX license identifier. The SPDX identifier is a legally binding
    shorthand, which can be used instead of the full boiler plate text.

    This patch is based on work done by Thomas Gleixner and Kate Stewart and
    Philippe Ombredanne.

    How this work was done:

    Patches were generated and checked against linux-4.14-rc6 for a subset of
    the use cases:
    - file had no licensing information it it.
    - file was a */uapi/* one with no licensing information in it,
    - file was a */uapi/* one with existing licensing information,

    Further patches will be generated in subsequent months to fix up cases
    where non-standard license headers were used, and references to license
    had to be inferred by heuristics based on keywords.

    The analysis to determine which SPDX License Identifier to be applied to
    a file was done in a spreadsheet of side by side results from of the
    output of two independent scanners (ScanCode & Windriver) producing SPDX
    tag:value files created by Philippe Ombredanne. Philippe prepared the
    base worksheet, and did an initial spot review of a few 1000 files.

    The 4.13 kernel was the starting point of the analysis with 60,537 files
    assessed. Kate Stewart did a file by file comparison of the scanner
    results in the spreadsheet to determine which SPDX license identifier(s)
    to be applied to the file. She confirmed any determination that was not
    immediately clear with lawyers working with the Linux Foundation.

    Criteria used to select files for SPDX license identifier tagging was:
    - Files considered eligible had to be source code files.
    - Make and config files were included as candidates if they contained >5
    lines of source
    - File already had some variant of a license header in it (even if
    Reviewed-by: Philippe Ombredanne
    Reviewed-by: Thomas Gleixner
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

25 Jun, 2017

1 commit

  • cc-option uses KBUILD_CFLAGS and KBUILD_CPPFLAGS when it determines
    whether an option is supported or not. This is fine for options used to
    build the kernel itself, however some components like the x86 boot code
    use a different set of flags.

    Add the new macro __cc-option which is a more generic version of
    cc-option with additional parameters. One parameter is the compiler
    with which the check should be performed, the other the compiler options
    to be used instead KBUILD_C*FLAGS.

    Refactor cc-option and hostcc-option to use __cc-option and move
    hostcc-option to scripts/Kbuild.include.

    Suggested-by: Arnd Bergmann
    Suggested-by: Masahiro Yamada
    Signed-off-by: Matthias Kaehlcke
    Acked-by: Arnd Bergmann
    Acked-by: Michal Marek
    Signed-off-by: Masahiro Yamada

    Matthias Kaehlcke
     

08 Jun, 2016

1 commit

  • Infrastructure for building independent shared library targets.

    Based on work created by the PaX Team.

    Signed-off-by: Emese Revfy
    Acked-by: Kees Cook
    Signed-off-by: Michal Marek

    Emese Revfy
     

19 Aug, 2014

1 commit


16 Jul, 2014

5 commits

  • Assume we have a Makefile like this:

    hostprogs-y := foo
    foo-cxxobjs := bar/baz.o
    foo-objs := qux/quux.o

    In this case, Kbuild creates bar/ directory,
    but fails to create qux/ directory.

    This commit re-writes directory creation more simply,
    fixing that bug.

    Signed-off-by: Masahiro Yamada
    Signed-off-by: Michal Marek

    Masahiro Yamada
     
  • The directory creation can be more simplified by two levels.

    [1] Drop $(dir ...)

    $(dir $(f)) always returns non-empty string.

    So, $(if $(dir $(f)),$(dir $(f)) is equivalent to $(dir $(f)).

    [2] Unroll $(foreach ...) loop

    $(dir ...) can take one or more arguments and returns a list of
    directories of them.

    $(foreach f, $(progs), $(dir $(f))) can be unrolled as $(dir $(progs)).

    Signed-off-by: Masahiro Yamada
    Signed-off-by: Michal Marek

    Masahiro Yamada
     
  • The shared library feature in Makefile.host is no longer used.
    Rip it off to keep the build infrastucture simple.

    Update Documentation/kbuild/makefiles.txt too.
    The section "4.3 Definition shared libraries" should be removed
    and the following sections should be re-numbered.

    Signed-off-by: Masahiro Yamada
    Suggested-by: Sam Ravnborg
    Signed-off-by: Michal Marek

    Masahiro Yamada
     
  • The comment claims:
    C++ executables compiled from at least one .cc file
    and zero or more .c files

    But C++ executables with zero .c file fail in build.

    For example, assume we have a Makefile like this:

    hostprogs-y := foo
    foo-cxxobjs := bar.o

    In this case, foo is treated as host-csingle
    and Kbuild tries to search non-existing foo.c source.

    Signed-off-by: Masahiro Yamada
    Signed-off-by: Michal Marek

    Masahiro Yamada
     
  • Signed-off-by: Masahiro Yamada
    Signed-off-by: Michal Marek

    Masahiro Yamada
     

13 Jun, 2014

1 commit

  • Pull kbuild misc updates from Michal Marek:
    "This is the non-critical part of kbuild for v3.16-rc1:
    - make deb-pkg can do s390x and arm64
    - new patterns in scripts/tags.sh
    - scripts/tags.sh skips userspace tools' sources (which sometimes
    have copies of kernel structures) and symlinks
    - improvements to the objdiff tool
    - two new coccinelle patches
    - other minor fixes"

    * 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
    scripts: objdiff: support directories for the augument of record command
    scripts: objdiff: fix a comment
    scripts: objdiff: change the extension of disassembly from .o to .dis
    scripts: objdiff: improve path flexibility for record command
    scripts: objdiff: remove unnecessary code
    scripts: objdiff: direct error messages to stderr
    scripts: objdiff: get the path to .tmp_objdiff more simply
    deb-pkg: Add automatic support for s390x architecture
    coccicheck: Add unneeded return variable test
    kbuild: Fix a typo in documentation
    kbuild: trivial - use tabs for code indent where possible
    kbuild: trivial - remove trailing empty lines
    coccinelle: Check for missing NULL terminators in of_device_id tables
    scripts/tags.sh: ignore symlink'ed source files
    scripts/tags.sh: add regular expression replacement pattern for memcg
    builddeb: add arm64 in the supported architectures
    builddeb: use $OBJCOPY variable instead of objcopy
    scripts/tags.sh: ignore code of user space tools
    scripts/tags.sh: add pattern for DEFINE_HASHTABLE
    .gitignore: ignore Module.symvers in all directories

    Linus Torvalds
     

10 Jun, 2014

1 commit


30 Apr, 2014

1 commit


26 Apr, 2008

1 commit


06 May, 2007

1 commit


25 Sep, 2006

2 commits


17 Sep, 2006

1 commit


01 Jul, 2006

1 commit

  • kbuild used $¤(*F to get filename of target without extension.
    This was used in several places all over kbuild, but introducing
    make -rR broke his for all cases where we specified full path to
    target/prerequsite. It is assumed that make -rR disables old style
    suffix-rules which is why is suddenly failed.

    ia64 was impacted by this change because several div* routines in
    arch/ia64/lib are build using explicit paths and then kbuild failed.

    Thanks to David Mosberger-Tang for an explanation
    what was the root-cause and for testing on ia64.

    This patch also fixes two uses of $(*F) in arch/um

    Signed-off-by: Sam Ravnborg

    Sam Ravnborg
     

27 Jun, 2006

1 commit

  • This reverts commit e5c44fd88c146755da6941d047de4d97651404a9.

    Thanks to Daniel Ritz and Michal Piotrowski for noticing the problem.

    Daniel says:

    "[The] reason is a recent change that made modules always shows as
    module.mod. it breaks modprobe and probably many scripts..besides
    lsmod looking horrible

    stuff like this in modprobe.conf:
    install pcmcia_core /sbin/modprobe --ignore-install pcmcia_core; /sbin/modprobe pcmcia
    makes modprobe fork/exec endlessly calling itself...until oom
    interrupts it"

    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

25 Jun, 2006

1 commit

  • make failed to supply the filename when using make -rR and using $(*F)
    to get target filename without extension.
    This bug was not reproduceable in small scale but using:
    $(basename $(notdir $@)) fixes it with same functionality.

    Signed-off-by: Sam Ravnborg

    Sam Ravnborg
     

09 Jun, 2006

1 commit

  • When Makefile.host is included, $(obj-dirs) is subjected to the
    addprefix operation for the second time. Prefix only needs to be added
    to the newly added directories, but not to those that came from
    Makefile.lib.

    This causes the build system to create unneeded empty directories in the
    build tree when building in a separate directory. For instance,
    lib/lib/zlib_inflate is created in the build tree.

    Signed-off-by: Pavel Roskin
    Signed-off-by: Sam Ravnborg

    Pavel Roskin
     

14 Jul, 2005

1 commit


17 Apr, 2005

1 commit

  • Initial git repository build. I'm not bothering with the full history,
    even though we have it. We can create a separate "historical" git
    archive of that later if we want to, and in the meantime it's about
    3.2GB when imported into git - space that would just make the early
    git days unnecessarily complicated, when we don't have a lot of good
    infrastructure for it.

    Let it rip!

    Linus Torvalds