[PATCH] Please make the build system respect variables CC, CXX, LDFLAGS
pysvn is the pythonic interface to subversion
Brought to you by:
barry-scott
Hi Barry,
in Gentoo packaging I need to support environment variables CC, CXX, and LDFLAGS during the build. I currently need to patch those in (https://github.com/gentoo/gentoo/blob/50cd663733598e3c53c2918ed4f4690740d65b60/dev-python/pysvn/files/pysvn-1.9.13-respect-flags.patch) and then forward-port that patch for every release manually downstream, e.g. the patch against 1.9.11 did not apply against 1.9.13 unmodified. If you'd be willing to accept that patch or some flavor of it upstream, that would be great. What do you think?
Best, Sebastian
That is a reasonable change.
I'll need to design it so that I only use the overrides if defined.
Cool! This is what comes to mind with regard to "only if defined":
os.environ.setdefault('CC', 'gcc')CC ?= gcc(shy)CC = gccwithmake CC=[..](rather thanCC=[..] make, order matters)I have made the change and commited as r2066
"add support for CC, CCC, CFLAGS amd LDFLAGS in the unix builds
Try this source kit and let me know if it what you need: https://pysvn.barrys-emacs.org/source_kits/pysvn-1.9.15.tar.gz
I have tested this with the Fedora pysvn packaging and it seems to work.
Hi Barry,
thanks for your work in this direction. To respect the rules of packaging for Gentoo myself, I would still need to patch the nine or so places with
-gaway because the end user (where the compiling happens) is expected full control. (For a workaround in packaging, I'm unsure if present-gcan be fully negated by appending, but it doesn't seem very robust). Would you be up for making addition of-gsuppressible some way? PS: What are your thoughts on the part forPatches/test_proplist.makin the Gentoo patch?Best, Sebastian
Last edit: Sebastian Pipping 2021-07-12
The -g is controlled by the --enable-debug option. SInce you do not use that option I'm not sure what the problem could be?
I did leave -g on the generate_svn_error_codes build tool, but you do not install that so I'm assuming that you do not care about that.
I used CCC to match what the code was already using for names not CXX.
I see that you set that on the emake line so you can use CCC right?
So you would have CCC=$(tc-getCXX) on the emake line.
Also you can remove the fake_svnversion command as I fixed the tooling to look for
an svn revision in a file in the tarball. It is only builds from a svn checkout that use svnversion.
I'm not sure what else you need that is in your test_proplist.mak that I have not done?
Barry
Hi Barry,
There are more places in there that add
-g— that made me bring it up. It seems like none of these cases affect Linux though, not even the one inUnixCompilerGCC.setupUtilitieswhile expected. So the fix probably already works for Linux (but not for macOS if that matters).I see, thanks for the clarifaction. I guess I do not care for packaging, as you assumed, yes.
CXXwould have been more standard I guess butCCCwill work, yes.Seen that, thanks for the fix. How official is https://pysvn.barrys-emacs.org/source_kits/pysvn-1.9.15.tar.gz for a release — is that something I can/should use for packaging in a Linux distro?
When building tool
test_proplistusing makefilePatches/test_proplist.mak, variablesCFLAGSandLDFLAGSare not yet respected. I figured now it will not matter to my cases.Best, Sebastian
I need to tag in svn the release and make sure the release notes are correct.
Then its official.
I have a busy few days ahead, so it may be the start of next week.
If possible I'll do this weekend.
Okay great, thanks for sharing your time constraints. See you.
I have release 1.9.15 officially.
Its taged and updated on the web sites.
Thanks, I have updated Gentoo to 1.9.15 just now.