apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "carlo\.bramix" <carlo.bra...@libero.it>
Subject non-sense into build/apr-hints.m4
Date Fri, 19 Sep 2008 10:00:29 GMT
Hello,
while waiting for Mingw+MSys support, I noticed this piece of text into build/apr-hints.m4:

dnl gcc (3.4.2 at least) seems to mis-optimize at levels greater than
dnl -O0 producing link-time errors.  The user can override by
dnl explicitly passing a CFLAGS value to configure.
dnl
dnl Example error messages:
dnl undefined reference to 'libmsvcrt_a_iname'
dnl undefined reference to '_nm___pctype'
if test "$ac_test_CFLAGS" != set; then
    APR_REMOVEFROM(CFLAGS,-O2)
    APR_ADDTO(CFLAGS,-O0)
fi

I may be wrong, but this really seems to me the typical error(s) you get when you try to mix
static and shared libraries together.
I just wanted to say to be careful because if I'm right the "-O0" apparently fixes the problem
(especially with ctype.h stuff), but there is no guarantees that calling convention used by
all functions is always the same for all DLLs and static LIBs.
I removed that piece of code and I tried everything with GCC 3.4.5 and I have got any troubles,
it all worked fine.
Perhaps who made this change had some non visible troubles with libraries: if he had all static
libs but some are done for using MSVCRT and others for using LIBC, then the problem will happen
too.
This is my opinion on what has happened in the past and forced this fix, which is wrong in
my opinion.

Sincerely,

Carlo Bramini.



Mime
View raw message