-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix CXXFLAGS and only set the C++ version in CXXFLAGS. #118
base: master
Are you sure you want to change the base?
Conversation
CPPFLAGS are used for building both C and C++ programs, and clang complains when -std=c++11 is used when the driver is invoked in C mode. Using CXXFLAGS to set this allows rtorrent-ps to be successfully built with clang. Unfortunately, fixing CXXFLAGS requires a new hack to ensure -O2 is uniformly used. Otherwise, autoconf will break when detecting XMLRPC-C support with an error like the one in pyroscope#76.
Would you be OK with this patch to clean up build.sh a little? Touching build config is always a bit risky, since it could break on a platform that didn't get tested: I did test that I understand that clang is not a supported compiler. However, following the normal conventions for Some investigation notes:
|
In case of 0.9.6/0.13.6 the Normally, the building environment has to take care of the basic flags if they are not set. If they are then they can override those default flags (at least with certain distributions). Hence the check was added in 0.9.7/0.13.7. What distribution do you use? |
I've been testing on debian stretch, building both 0.9.6/0.13.6 and 0.9.7/0.13.7 (I have a set of local patches to make the latter work). |
You don't have to do this: rtorrent-ps-ch |
Maybe, but making the minor As mentioned, the 'proper' fix is to still make sure the XMLRPC-C test program doesn't build with |
CPPFLAGS are used for building both C and C++ programs, and clang
complains when -std=c++11 is used when the driver is invoked in C mode.
Using CXXFLAGS to set this allows rtorrent-ps to be successfully built
with clang.
Unfortunately, fixing CXXFLAGS requires a new hack to ensure -O2 is
uniformly used. Otherwise, autoconf will break when detecting XMLRPC-C
support with an error like the one in #76.