On 07 Aug 2025, at 15:54, Branko Čibej <br...@apache.org> wrote:

> Why? Why are we telling our library consumers about debugging, optimisation 
> and warning flags? This makes no sense to me and is actively detrimental. In 
> Serf, for example, we go through extra hoops to remove this crud from the APR 
> flags; and I believe Subversion does something similar. APR should not 
> dictate how its consumers are compiled. The --cppflags, sure, those are 
> necessary on some platforms in order to make the resulting linked code work; 
> but --cflags?
> 
> The culprit seems to be our construction of CFLAGS, then copying them 
> wholesale to EXTRA_CFLAGS, which then get interpolated into the pkg-config 
> file and the apr-X-config scripts. What, exactly, is the point of that 
> interpolation? If it's to pass flags that were set explicitly at configure or 
> build time, then that clearly is not how its implemented, because setting 
> CFLAGS for configure removes them from apr-X-config and the pkg-config file.
> 
> My knee-jerk reaction was to just stop interpolating EXTRA_CFLAGS, but then, 
> I've no clue what that would break. Someone with a deeper understanding of 
> the autotools build, please speak up. I'm happy to dig into the build code to 
> get this fixed, but I would appreciate a place to start; not just on trunk 
> but the 1.7 and 1.8 branches, too.

Agree this is wrong, I've had pain in the past having to recompile half the 
stack just to make the debugger work.

This definitely needs to be aligned with everything else.

Regards,
Graham
--

Reply via email to