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: Fri, 7 Feb 2020 08:59:42 +0100

On Thu, Feb 06, 2020 at 04:28:12PM -0800, Gary E. Miller wrote:
> > > Maybe gpsd needs an "I am cross-compiling" option?

More or less, gpsd needs an "do not fuck with my system". And gpsd
defaulting to "fuck with my system" is weird part of problem itself.

> > No, it does not. target is pretty reliable indicator.
> 
> Once again around the circle: No.

Be positive, circles are getting smaller.

> Re-read the help text. "Useful", not "Always".

Changing help text does not make code any better. So far we have
learned 'target' is used as a prefix. The other way to cross-compile
is to set all those CC, LD, AR... env vars. This is broken another
way as showed previously, so it is not really an option. It also seems
we already agreed 'sysroot' can be set to both cross and native builds.

Therefore 'target' is way more reliable indicator of cross-compilation
and it is already used to detect cross-compilation in case of time_t
type size detection [*].

And since the very first commit f3680321e650 ("First version of
cross-build instructions.") it is clear 'target', not 'sysroot'
is the very option used.

All above lead me to the conclusion
@@ -2793,7 +2793,7 @@ udev_install = Utility('udev-install', 'install', [

 if env['systemd']:
     env.Requires(udev_install, systemd_install)
-    if not env["sysroot"]:
+    if not env['target']:
         systemctl_daemon_reload = Utility('systemctl-daemon-reload', '',
                                           ['systemctl daemon-reload || true'])
         env.AlwaysBuild(systemctl_daemon_reload)
is a reasonable change.

Best regards,
        ladis

[*] see 89d3c543e000 ("SConstruct: Skip sizeof(time_t) test when
cross-compiling")



reply via email to

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