prism
prism copied to clipboard
Disable GNU `make` implicit variables and Quiet `ar` with `ARFLAGS` rather than `> null`
CC
, AR
and ARFLAGS
(and also RM
and CXX
) are all implicit variables in GNU make
.
-
CC
andAR
already defaults tocc
andar
, which meansCC ?= cc
does nothing since before I started tinkering. -
ARFLAGS
defaults to-rv
, wherev
stands forv
erbose.- https://stackoverflow.com/a/40516532 hints that changing it to
r
avoids printing tonull
, and printing to/dev/null
was the final obstacle for me to build nightly Prism on my MSYS-less Windows setup!
- https://stackoverflow.com/a/40516532 hints that changing it to
Rather than adapting the Makefile
and extconf.rb
around them, I disabled them with --no-builtin-variables
. While this flag may be GNU-exclusive, the README
implies that we only support GNU make
.
-
CURDIR
from #2706 is also possibly GNU-exclusive. - The popularity of GNU means it’s a-okay to be toolset-specific rather than platform-specific.
- Previously conflicted with #2716
(Mac Ruby 2.7 CI failure)
Intriguing.
CC
and co. should be set from the rbconfig
in practice. Considering this was never an issue in my previous Makefile
PRs, does this mean that the Mac Ruby 2.7 was set with libtool
for AR
, nothing for ARFLAGS
, and make
had a different default for Mac?
I do not know how to investigate a Mac problem.
Easy solution: drop Ruby 2.7 support (we’re still in 0.x aren’t we?)
Unfortunately we cannot drop 2.7 support, as that is BASERUBY and we need it to build Ruby itself.
CC and AR already defaults to cc and ar, so setting CC to cc does nothing since before I started tinkering.
I'm not sure this is true. Before, we always set CC
to cc
, so it couldn't be overridden by env vars. Now it's going to be the same CC that Ruby is compiled with.
Before, we always set
CC
tocc
, so it couldn't be overridden by env vars.
Like with ARFLAGS
in the PR, I expect the original CC := cc
to be overridable by env vars.
Now it's going to be the same CC that Ruby is compiled with.
This though is intended.
Like with
ARFLAGS
in the PR, I expect the originalCC := cc
to be overridable by env vars.
Oof, I had it mixed up. It’s only overridable with make KEY=VALUE
, not from env vars.
Hey @ParadoxV5 are you still working on this or should this be closed?
Hey @ParadoxV5 are you still working on this or should this be closed?
Hey, @kddnewton, now that https://bugs.ruby-lang.org/issues/20499 has properly fixed #2716 in the Ruby upstream, I plan to get back to this these few of days. By the way, any plans to revert the workaround #2725 (after Ruby releases teenies with the fix)? [c.c. @eregon]
I think I'd prefer to leave it because I'd like to support all of the Ruby versions in the range that we support, which includes patch revisions.
Yeah agreed let's keep that workaround for existing releases and link to the relevant issues to make it easy to figure out from the code why that is needed