pkg-rebar.mk: pass C++ compiler path and options
authorFrank Hunleth <fhunleth@troodon-software.com>
Tue, 2 Feb 2016 19:57:28 +0000 (14:57 -0500)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sat, 20 Feb 2016 15:55:25 +0000 (16:55 +0100)
Previously only the C compiler path and options were passed to rebar.
Erlang projects that used the C++ compiler would fail to build, which
would for example be the case with the latest version of
erlang-p1-stringprep. This fixes those errors.

Signed-off-by: Frank Hunleth <fhunleth@troodon-software.com>
Reviewed-by: Romain Naour <romain.naour@gmail.com>
[Thomas: adjust commit message to indicate an example of an Erlang
package that needs the C++ compiler.]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/pkg-rebar.mk

index c727489bef6032e56d5701863ac3e199fd25d066..44c6d6c8d23a20f59095529f63b6db2d138e3fcd 100644 (file)
@@ -158,7 +158,9 @@ ifndef $(2)_BUILD_CMDS
 define $(2)_BUILD_CMDS
        (cd $$(@D); \
                CC="$$(TARGET_CC)" \
+               CXX="$$(TARGET_CXX)" \
                CFLAGS="$$(TARGET_CFLAGS)" \
+               CXXFLAGS="$$(TARGET_CXXFLAGS)" \
                LDFLAGS="$$(TARGET_LDFLAGS)" \
                $$(REBAR_TARGET_DEPS_ENV) \
                $$(TARGET_MAKE_ENV) \