[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lmi] Copying compiler run-time files in the makefiles
From: |
Greg Chicares |
Subject: |
Re: [lmi] Copying compiler run-time files in the makefiles |
Date: |
Tue, 28 Jun 2022 11:32:58 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0 |
On 6/28/22 00:23, Greg Chicares wrote:
[...]
> Commit 0fc04feacde99 was a little too zealous about information hiding.
>
> The history
> git log -G'compiler_runtime_files' --patch
> is fascinating. Even though there were some false steps along the way,
> it didn't seem correct to revert to any earlier version.
>
> I'll try to specify the desired behavior here, in case you can see a
> better way to accomplish it. To run any msw binary, the compiler runtime
> libraries must be on $WINEPATH; specifically, $localbindir must contain
> copies of them. If you had built some msw binary and later inadvertently
> removed those copies, then they must be restored when you build any
> makefile target that would try to run that msw binary (possibly without
> rebuilding it).
>
> The list of runtime libraries may change with a compiler upgrade, so it
> has to be created dynamically.
BTW, the code for that dynamic list didn't need when we migrated from
32- to 64-bit msw releases: it adapted automatically.
Other ideas that I considered and rejected:
- Make the 'include' directives more promiscuous, so that 'GNUmakefile'
sees everything in 'compiler*.make'. It's already hard enough to
hide information in makefiles, but abandoning the attempt is wrong.
- Move the installation of $(compiler_runtime_files) into 'workhorse.make'
(cloning the 'install:' target already present there to create a new
'install_compiler_runtime_files:'). Then, in 'GNUmakefile', change the
prerequisite-of-everything $(build_dir) target's recipe to invoke
"$(MAKE) install_compiler_runtime_files". I tried it; hilarity ensued,
because of infinite regression. (GNU make tries hard to avoid that,
but I tried harder to make '$(build_dir):' a prerequisite of everything,
including itself.)
- Revert commit 19c09468c8. My untested conjecture is that then
make raze
make unit_tests
would fail, because this:
make install
would be necessary to install the compiler runtime files.
AFAICS, the strategy now in HEAD is optimal despite its ugliness.
Let me mention the reasons for a couple of particulars:
- The 'install' command uses a shell for-loop, because
$(compiler_runtime_files) might be empty, and I see no
better way to deal with that possibility.
- The 'install' command uses '-c', which is already the default
for BSD and does nothing for GNU coreutils. It's a placeholder
for '-C', which seems like a good idea, except that the
coreutils manual advises us to specify group and user IDs
whenever we use '-C'; and that leads back to
https://lists.nongnu.org/archive/html/lmi/2022-06/msg00050.html
where I hesitate either to forsake a dream because it might be
possible, or to invest further in it because it might not.