gpsd: fix cross platform compilation 3203/head
authorDavid Thornley <david.thornley@touchstargroup.com>
Thu, 22 Sep 2016 03:11:25 +0000 (13:11 +1000)
committerDavid Thornley <david.thornley@touchstargroup.com>
Sun, 25 Sep 2016 23:48:46 +0000 (09:48 +1000)
In SConstruct the set of executables in the devenv variable should be adjusted to use the cross compile toolchain (as opposed to host's executables).
Achieved by setting target option to the toolchain prefix which corrects compilation on macOS.

Note, TARGET_CROSS has to have the hyphen stripped as SConstruct uses the target variable with an implied hyphen (env['target'] + '-' + toolname)

Signed-off-by: David Thornley <david.thornley@touchstargroup.com>
utils/gpsd/Makefile

index d6ea568d47f4cccc98c98a622f2111e29ab8a2fa..2f50e2d81b55160f8d0f0c4210400f14eeb59cea 100644 (file)
@@ -103,7 +103,8 @@ SCONS_OPTIONS += \
        nostrip=yes \
        python=no \
        implicit_link=no \
-       chrpath=no
+       chrpath=no \
+       target="$(TARGET_CROSS:-=)"
 
 define Build/InstallDev
        $(INSTALL_DIR) $(1)/usr/include