[riot-commits] [RIOT-OS/RIOT] a946c2: newlib.mk: fix: do not require slash terminated NE...

Martine Lenders authmillenon at gmail.com
Thu Aug 2 18:44:46 CEST 2018


  Branch: refs/heads/master
  Home:   https://github.com/RIOT-OS/RIOT
  Commit: a946c2c5bd86c0be599c7251d79d13faba0c537e
      https://github.com/RIOT-OS/RIOT/commit/a946c2c5bd86c0be599c7251d79d13faba0c537e
  Author: Gaëtan Harter <gaetan.harter at fu-berlin.de>
  Date:   2018-08-02 (Thu, 02 Aug 2018)

  Changed paths:
    M makefiles/libc/newlib.mk

  Log Message:
  -----------
  newlib.mk: fix: do not require slash terminated NEWLIB_INCLUDE_DIR

When NEWLIB_INCLUDE_DIR is set from other parts than 'COMPILER_INCLUDE_PATHS' it
does not have a trailing slash.
Also, it makes it more problematic when supplying it from the command line.

And anyway having two '/' does not break anything.


  Commit: 18a4ccf31587085e23118a3b0439a10e92cc2705
      https://github.com/RIOT-OS/RIOT/commit/18a4ccf31587085e23118a3b0439a10e92cc2705
  Author: Gaëtan Harter <gaetan.harter at fu-berlin.de>
  Date:   2018-08-02 (Thu, 02 Aug 2018)

  Changed paths:
    M makefiles/libc/newlib.mk

  Log Message:
  -----------
  newlib.mk: fix NEWLIB_INCLUDE_DIR not being set by PATTERNS

As NEWLIB_INCLUDE_DIR has already been set here, with an empty value, it is not
overwriting it because of the '?='.


  Commit: 3a4538ee761046ac641200946c9ff0176f1ffd82
      https://github.com/RIOT-OS/RIOT/commit/3a4538ee761046ac641200946c9ff0176f1ffd82
  Author: Gaëtan Harter <gaetan.harter at fu-berlin.de>
  Date:   2018-08-02 (Thu, 02 Aug 2018)

  Changed paths:
    M makefiles/libc/newlib.mk

  Log Message:
  -----------
  newlib.mk: sanitize output before getting include path

Only keep lines that are indeed include path.
It also keeps newlines as they do not matter.

It fixes Mingw32 support where `grep '^\s'` is not working the same way.
It also handles some mac `sed` that do not support `\s`.

Ouput tested with:

    make -C examples/hello-world BOARD=samr21-xpro info-debug-variable-COMPILER_INCLUDE_PATHS
    # by also putting newlines for readability

Now:

    /usr/bin/../lib/gcc/arm-none-eabi/7.2.1/include
    /usr/bin/../lib/gcc/arm-none-eabi/7.2.1/include-fixed
    /usr/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/include

Before:

    /usr/bin/../lib/gcc/arm-none-eabi/7.2.1/cc1 -E -quiet -v -iprefix /usr/bin/../lib/gcc/arm-none-eabi/7.2.1/ -isysroot /usr/bin/../arm-none-eabi -D__USES_INITFINI__ /dev/null
    /usr/bin/../lib/gcc/arm-none-eabi/7.2.1/include
    /usr/bin/../lib/gcc/arm-none-eabi/7.2.1/include-fixed
    /usr/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/include


  Commit: 37a92c4c5eee54f4622cc4f5315e1467ea216d48
      https://github.com/RIOT-OS/RIOT/commit/37a92c4c5eee54f4622cc4f5315e1467ea216d48
  Author: Gaëtan Harter <gaetan.harter at fu-berlin.de>
  Date:   2018-08-02 (Thu, 02 Aug 2018)

  Changed paths:
    M makefiles/libc/newlib.mk

  Log Message:
  -----------
  newlib.mk: Windows/MSYS Bash support: use realpath instead of abspath

Some versions of Mingw32 abspath implementation has trouble working with
windows formatted path.

    $(abspath "C:/A/B") returns "/C/CUR/DIR/C:/A/B" instead of "/C/A/B"

relpath does not have this problem, it does additional symlink resolution but is
not a problem.
Note: on windows it does not remove the trailing `/`.

https://github.com/zephyrproject-rtos/zephyr/issues/2061#issuecomment-331635063

Patched in

https://github.com/zephyrproject-rtos/zephyr/commit/941059c69f9488613775a1a8802a099447cdea4c


  Commit: 154d64ee477a4621cc290028789c7d3817a47616
      https://github.com/RIOT-OS/RIOT/commit/154d64ee477a4621cc290028789c7d3817a47616
  Author: Gaëtan Harter <gaetan.harter at fu-berlin.de>
  Date:   2018-08-02 (Thu, 02 Aug 2018)

  Changed paths:
    M makefiles/libc/newlib.mk

  Log Message:
  -----------
  newlib.mk: get NEWLIB_INCLUDE_DIR absolute and without trailing slash

It replaces

    make BOARD=iotlab-m3 info-debug-variable-NEWLIB_INCLUDE_DIR
    /usr/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/include/

with

    make BOARD=iotlab-m3 info-debug-variable-NEWLIB_INCLUDE_DIR
    /usr/arm-none-eabi/include

Without trailing slash and without relative '..' everywhere.

It also uses `realpath` instead of `abspath` to support Mingw32.


  Commit: 3226918e175035e46d17217dd7dd4730d72c98db
      https://github.com/RIOT-OS/RIOT/commit/3226918e175035e46d17217dd7dd4730d72c98db
  Author: Gaëtan Harter <gaetan.harter at fu-berlin.de>
  Date:   2018-08-02 (Thu, 02 Aug 2018)

  Changed paths:
    M makefiles/libc/newlib.mk

  Log Message:
  -----------
  newlib.mk: indent comments in conditionnal

Comments inside an if are usually also indented.


  Commit: ccb5653f8a78fa8a13a1e94dd9e6332ae5a9e8e0
      https://github.com/RIOT-OS/RIOT/commit/ccb5653f8a78fa8a13a1e94dd9e6332ae5a9e8e0
  Author: Martine Lenders <authmillenon at gmail.com>
  Date:   2018-08-02 (Thu, 02 Aug 2018)

  Changed paths:
    M makefiles/libc/newlib.mk

  Log Message:
  -----------
  Merge pull request #9515 from cladmi/pr/make/newlib/fixandstuff

newlib.mk: fix regressions


Compare: https://github.com/RIOT-OS/RIOT/compare/7f04742e0b86...ccb5653f8a78
      **NOTE:** This service has been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/

      Functionality will be removed from GitHub.com on January 31st, 2019.


More information about the commits mailing list