17 May, 2018

1 commit

  • CONFIG_HAVE_UNDERSCORE_SYMBOL_PREFIX was selected by BLACKFIN, METAG.
    They were removed by commit 4ba66a976072 ("arch: remove blackfin port"),
    commit bb6fb6dfcc17 ("metag: Remove arch/metag/"), respectively.

    No more architecture enables CONFIG_HAVE_UNDERSCORE_SYMBOL_PREFIX.
    Clean up the rest of scripts, and remove the Kconfig entry.

    Signed-off-by: Masahiro Yamada
    Reviewed-by: Sam Ravnborg

    Masahiro Yamada
     

04 Apr, 2018

1 commit

  • Pull Kbuild updates from Masahiro Yamada:

    - add a shell script to get Clang version

    - improve portability of build scripts

    - drop always-enabled CONFIG_THIN_ARCHIVE and remove unused code

    - rename built-in.o which is now thin archive to built-in.a

    - process clean/build targets one by one to get along with -j option

    - simplify ld-option

    - improve building with CONFIG_TRIM_UNUSED_KSYMS

    - define KBUILD_MODNAME even for objects shared among multiple modules

    - avoid linking multiple instances of same objects from composite
    objects

    - move to c_flags to include it only for C
    files

    - clean-up various Makefiles

    * tag 'kbuild-v4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (29 commits)
    kbuild: get out of
    kbuild: clean up link rule of composite modules
    kbuild: clean up archive rule of built-in.a
    kbuild: remove partial section mismatch detection for built-in.a
    net: liquidio: clean up Makefile for simpler composite object handling
    lib: zstd: clean up Makefile for simpler composite object handling
    kbuild: link $(real-obj-y) instead of $(obj-y) into built-in.a
    kbuild: rename real-objs-y/m to real-obj-y/m
    kbuild: move modname and modname-multi close to modname_flags
    kbuild: simplify modname calculation
    kbuild: fix modname for composite modules
    kbuild: define KBUILD_MODNAME even if multiple modules share objects
    kbuild: remove unnecessary $(subst $(obj)/, , ...) in modname-multi
    kbuild: Use ls(1) instead of stat(1) to obtain file size
    kbuild: link vmlinux only once for CONFIG_TRIM_UNUSED_KSYMS
    kbuild: move include/config/ksym/* to include/ksym/*
    kbuild: move CONFIG_TRIM_UNUSED_KSYMS code unneeded for external module
    kbuild: restore autoksyms.h touch to the top Makefile
    kbuild: move 'scripts' target below
    kbuild: remove wrong 'touch' in adjust_autoksyms.sh
    ...

    Linus Torvalds
     

26 Mar, 2018

3 commits

  • The idea of using fixdep was inspired by Kconfig, but autoksyms
    belongs to a different group. So, I want to move those touched
    files under include/config/ksym/ to include/ksym/.

    The directory include/ksym/ can be removed by 'make clean' because
    it is meaningless for the external module building.

    Signed-off-by: Masahiro Yamada
    Acked-by: Nicolas Pitre

    Masahiro Yamada
     
  • The comment mentions it creates autoksyms.h in case it is missing,
    but the actual code touches it when it does exists.

    The build system creates it anyway because and
    need it.

    The code would not have worked as intended, and people have not
    noticed it. This is a proof that we can simply remove it.

    Signed-off-by: Masahiro Yamada
    Acked-by: Nicolas Pitre

    Masahiro Yamada
     
  • * Use BREs where EREs aren't necessary.
    * Pass -E instead of -r to use EREs. This will be standardized in the
    next POSIX revision[0]. GNU sed supports this since 4.2 (May 2009),
    and busybox since 1.22.0 (Jan 2014).
    * Use the [:space:] character class instead of ` \t` in bracket
    expressions. In bracket expressions, POSIX says that loses
    its special meaning, so a conforming implementation cannot expand \t
    to [1].
    * In BREs, use interval expressions (\{n,m\}) instead of non-standard
    features like \+ and \?.
    * Use a loop instead of -s flag.

    There are still plenty of other cases of non-standard sed invocations
    (use of ERE features in BREs, in-place editing), but this fixes some
    core ones.

    [0] http://austingroupbugs.net/view.php?id=528
    [1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap09.html#tag_09_03_05

    Signed-off-by: Michael Forney
    Signed-off-by: Masahiro Yamada

    Michael Forney
     

21 Mar, 2018

1 commit

  • Some filesystems have timestamps with coarse precision that may allow
    for a recently built object file to have the same timestamp as the
    updated time on one of its dependency files. When that happens, the
    object file doesn't get rebuilt as it should.

    This is especially the case on filesystems that don't have sub-second
    time precision, such as ext3 or Ext4 with 128B inodes.

    Let's prevent that by making sure updated dependency files have a newer
    timestamp than the first file we created (i.e. autoksyms.h.tmpnew).

    Reported-by: Thomas Lindroth
    Signed-off-by: Nicolas Pitre
    Tested-by: Thomas Lindroth
    Signed-off-by: Masahiro Yamada

    Nicolas Pitre
     

12 Dec, 2016

1 commit


10 May, 2016

1 commit


30 Mar, 2016

1 commit

  • Given the list of exported symbols needed by all modules, we can create
    a header file containing preprocessor defines for each of those symbols.
    Also, when some symbols are added and/or removed from the list, we can
    update the time on the corresponding files used as build dependencies for
    those symbols. And finally, if any symbol did change state, the
    corresponding source files must be rebuilt.

    The insertion or removal of an EXPORT_SYMBOL() entry within a module may
    create or remove the need for another exported symbol. This is why this
    operation has to be repeated until the list of needed exported symbols
    becomes stable. Only then the final kernel and modules link take place.

    Signed-off-by: Nicolas Pitre
    Acked-by: Rusty Russell

    Nicolas Pitre