[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: |
Tue, 4 Feb 2020 01:37:06 +0100 |
Hello Gary,
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.
I agree here.
> I have updated "scons -h" to try to make the "target" and "sysroot"
> options more clear.
Typo "toolchaons". And it is really directory? Seems to be prefix:
if env['target']:
for (name, toolname) in devenv:
env[name] = env['target'] + '-' + toolname
(yes, technically it can contain the full path, but notation matches
prefix, rather than directory)
> 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.
Yes, that is a valid point. I just didn't want touch too much, so I used
scons option "target". It is already used the same way when deciding
time_t size (SConstruct reads):
if env['target']:
announce("Not checking sizeof(time_t) when cross-compiling")
sizeof_time_t = 8
So this patch makes it similar. I guess it is better to misuse just
one option, than two of them.
> Maybe gpsd needs an "I am cross-compiling" option?
I'd rather avoid adding new options, since daemon reaload is meant
to ease development here, so (mis)using 'target' seem less evil
thing to do.
Searching for cross compilation using scons I came to
https://github.com/SCons/scons/wiki/PlatformToolConfig
Is it still only a draft?
> As it stands now, if systemd if not found, or the scons options
> systemd=False is set, then the "systemctl daemon-reload" is not run.
>
> I assume that you want systemd=True, so that the systemd files get
> installed in DESTDIR. But you do not want "systemctl daemon-reload" to
> run.
Yes, that is my use case.
> Reloading the daemon is benign, having zero bad side effects. But
> for OCD purposes, maybe improving the situtation is worth effort.
It does not happen at all, running scons as ordinary user. I guess
it should also not happen when installing to DESTDIR, because then
nothing changes for systemd.
> Since I don't run systemd, maybe a systemd person can ponder the
> problem and give us their thoughts.
Agree. For now I'm installing those files manually (well, using make)
after scons does its job.
> On Sun, 2 Feb 2020 10:44:43 +0100
> Ladislav Michl <address@hidden> wrote:
>
> > Besides gpsd is able to cross-compile without sysroot option, it makes
> > this cross-compile check aligned with the one for sizeof(time_t).
> > ---
> > SConstruct | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/SConstruct b/SConstruct
> > index 65e649d32..c49bb8476 100644
> > --- a/SConstruct
> > +++ b/SConstruct
> > @@ -2753,7 +2753,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)
>
>
>
>
> RGDS
> GARY
> ---------------------------------------------------------------------------
> Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
> address@hidden Tel:+1 541 382 8588
>
> Veritas liberabit vos. -- Quid est veritas?
> "If you can't measure it, you can't improve it." - Lord Kelvin
- Re: [PATCH 2/3] SConstruct: Use target_python when constructing extension name, (continued)
[PATCH 3/3] SConstruct: Use 'target' option to decide whenewer to restart systemd, Ladislav Michl, 2020/02/02
Re: [PATCH 3/3] SConstruct: Use 'target' option to decide whenewer to restart systemd,
Ladislav Michl <=
Re: [PATCH 3/3] SConstruct: Use 'target' option to decide whenewer to restart systemd, Gary E. Miller, 2020/02/04
Re: [PATCH 3/3] SConstruct: Use 'target' option to decide whenewer to restart systemd, Ladislav Michl, 2020/02/04
Re: [PATCH 3/3] SConstruct: Use 'target' option to decide whenewer to restart systemd, Ladislav Michl, 2020/02/06
Re: [PATCH 3/3] SConstruct: Use 'target' option to decide whenewer to restart systemd, Gary E. Miller, 2020/02/06
Re: [PATCH 3/3] SConstruct: Use 'target' option to decide whenewer to restart systemd, Ladislav Michl, 2020/02/07
Re: [PATCH 0/3] Cross build nitpicks, Ladislav Michl, 2020/02/03