[riot-commits] [RIOT-OS/RIOT] 267c8e: Makefile.include: Link with $(CXX) for C++ code

benpicco noreply at github.com
Tue Jul 28 12:42:30 CEST 2020


  Branch: refs/heads/master
  Home:   https://github.com/RIOT-OS/RIOT
  Commit: 267c8e1620c61392cd14435154dd19f524529327
      https://github.com/RIOT-OS/RIOT/commit/267c8e1620c61392cd14435154dd19f524529327
  Author: Marian Buschsieweke <marian.buschsieweke at ovgu.de>
  Date:   2020-07-23 (Thu, 23 Jul 2020)

  Changed paths:
    M Makefile.include

  Log Message:
  -----------
  Makefile.include: Link with $(CXX) for C++ code

When mixing C and C++ code, $(CXX) has to be used for linking. Prior to this
commit, the build system automatically uses $(CXX) if the application contains
C++ source code. However, if C++ is used in an module only, $(CC) is still
used. This has not let to problems, as internal modules must be written in C.
For external modules this restriction does not apply.

This commit checks if the cpp feature is used. In that case, $(CXX) is used
for linking over $(CC). This way external modules may use C++ code.


  Commit: c1ad43566855c9f95b3743d9a9ce28a1d8efe6f3
      https://github.com/RIOT-OS/RIOT/commit/c1ad43566855c9f95b3743d9a9ce28a1d8efe6f3
  Author: Marian Buschsieweke <marian.buschsieweke at ovgu.de>
  Date:   2020-07-23 (Thu, 23 Jul 2020)

  Changed paths:
    M Makefile.base

  Log Message:
  -----------
  Makefile.base: Error for C++ code w/w cpp feature

If external modules use C++ code and forget to require the `cpp` feature,
linking will still take places using $(CC). This commit adds a check if C++ code
was detected without the feature `cpp` being used, now the build is aborted
with a helpful error message rather than a linker error.


  Commit: 057aae1d047a14200d19b6f677ac7b5cfabcabd7
      https://github.com/RIOT-OS/RIOT/commit/057aae1d047a14200d19b6f677ac7b5cfabcabd7
  Author: Marian Buschsieweke <marian.buschsieweke at ovgu.de>
  Date:   2020-07-23 (Thu, 23 Jul 2020)

  Changed paths:
    M makefiles/vars.inc.mk

  Log Message:
  -----------
  makefiles/vars.inc.mk: Export FEATURES_USED

This is needed so that features used can be reliably be accessed.


  Commit: f8b7c899f8695891b08acc1f186c885d224863ef
      https://github.com/RIOT-OS/RIOT/commit/f8b7c899f8695891b08acc1f186c885d224863ef
  Author: Marian Buschsieweke <marian.buschsieweke at ovgu.de>
  Date:   2020-07-23 (Thu, 23 Jul 2020)

  Changed paths:
    M cpu/esp_common/Makefile.dep

  Log Message:
  -----------
  cpu/esp_common: Allows use feature cpp

The vendor code uses C++ code, thus, C++ support needs to be enabled in any
case.


  Commit: 033807008a4324c1eea8cdf540920c687d3ea160
      https://github.com/RIOT-OS/RIOT/commit/033807008a4324c1eea8cdf540920c687d3ea160
  Author: Marian Buschsieweke <marian.buschsieweke at ovgu.de>
  Date:   2020-07-23 (Thu, 23 Jul 2020)

  Changed paths:
    M sys/Makefile.dep

  Log Message:
  -----------
  sys/arduino: Require feature cpp

Arduino code requires C++ support


  Commit: 403b6b15c6b3a7337c95886f28b5b1b423abe4b6
      https://github.com/RIOT-OS/RIOT/commit/403b6b15c6b3a7337c95886f28b5b1b423abe4b6
  Author: benpicco <benjamin.valentin at ml-pa.com>
  Date:   2020-07-28 (Tue, 28 Jul 2020)

  Changed paths:
    M Makefile.base
    M Makefile.include
    M cpu/esp_common/Makefile.dep
    M makefiles/vars.inc.mk
    M sys/Makefile.dep

  Log Message:
  -----------
  Merge pull request #14481 from maribu/cpp-fix-linking

Makefile.{base,include}: Fix linking for C++ code in external modules


Compare: https://github.com/RIOT-OS/RIOT/compare/7acdecb1df77...403b6b15c6b3


More information about the commits mailing list