gpsd-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 3/3] SConstruct: Use 'target' option to decide whenewer to re


From: Ladislav Michl
Subject: Re: [PATCH 3/3] SConstruct: Use 'target' option to decide whenewer to restart systemd
Date: Thu, 6 Feb 2020 08:23:52 +0100

Hello Gary,

let's start over here...

On Mon, Feb 03, 2020 at 03:53:17PM -0800, Gary E. Miller wrote:
> Yo Ladislav!
> 
> As I have already pointed out several times.  This patch conflates
> scons option "target" with the concept of "cross compiling". "target"
> is just the directory of the tool chain to use (cc, ld, nm, etc.).  It
> says nothing about whether or not one is cross-compiling or whether a
> "systemctl daemon-reload" should be run on install.

$ which gcc
/usr/bin/gcc
$ which ld
/usr/bin/ld
$ scons target=/usr/bin
[...]
/usr/bin-gcc -o ais_json.os -c -O2 -fPIC -I/usr/include/dbus-1.0 
-I/usr/lib/x86_64-linux-gnu/dbus-1.0/include ais_json.c
sh: 1: /usr/bin-gcc: not found

$ which arm-v5te-linux-gnueabi-gcc
/opt/OSELAS.Toolchain-2018.12.0/arm-v5te-linux-gnueabi/gcc-8.2.1-glibc-2.28-binutils-2.31.1-kernel-4.19-sanitized/bin/arm-v5te-linux-gnueabi-gcc
$ 
PKG_CONFIG_SYSROOT_DIR=~/src/C-ITS.Devices.O2.Firmware/platform-imx6/sysroot-target
 scons target=arm-v5te-linux-gnueabi
[...]
arm-v5te-linux-gnueabi-gcc -o json.os -c -pthread -O2 -pthread -fPIC 
-I/home/ladis/src/C-ITS.Devices.O2.Firmware/platform-imx6/sysroot-target/usr/include/dbus-1.0
 json.c
(just works)

So now we know 'target' is not a directory, but compiler prefix.

> I have updated "scons -h" to try to make the "target" and "sysroot"
> options more clear.

Please revert that update, it makes things even more confusing.

> Right now gpsd has no option that says "I am cross-compiling".  It only
> has the option to use toolchains that are not the default system tool
> chain.  An optional tool chain may, or may not be, a cross-compiler.
> 
> Maybe gpsd needs an "I am cross-compiling" option?

No, it does not. target is pretty reliable indicator.

        ladis



reply via email to

[Prev in Thread] Current Thread [Next in Thread]