You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apreq-dev@httpd.apache.org by Chris Dukes <cd...@us.ibm.com> on 2008/02/29 18:54:03 UTC

Forcing -fno-strict-aliasing to all compiles breaks compiles with xlc/xlc_r

Per the changelog for 2.0.8

- Build [Philip M. Gollucci, Bojan Smojver, joes]
  add -fno-strict-aliasing to all compiles on all systems
  https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=193740
  This fixes an infinite look split_on_bdry() of 
library/parser_multipart.c
  particularly on linux/gcc 4.x platforms.

Unfortunately that leads to test_cgi failing to build.

/bin/sh ../libtool --tag=CC --mode=link xlc_r  -qcpluscmt -O2 
-I/usr/ihs/inst/ap
ache-2.2.8/include  -I/usr/ibmpublic/include  -I/opt/freeware/include 
-fno-st
rict-aliasing  -L/usr/ihs/inst/apache-2.2.8/lib  -L/usr/ibmpublic/lib 
-L/opt/fr
eeware/lib   -o test_cgi 
`/source/wr118651/t/libapreq2-2.08/rs_aix52/apreq2-conf
ig --link-libtool` test_cgi.o
mkdir .libs
xlc_r -qcpluscmt -O2 -I/usr/ihs/inst/apache-2.2.8/include 
-I/usr/ibmpublic/inclu
de -I/opt/freeware/include -fno-strict-aliasing -o .libs/test_cgi 
test_cgi.o  -L
/source/wr118651/t/libapreq2-2.08/rs_aix52/library/.libs 
-L/usr/ihs/inst/apache-
2.2.8/lib -L/usr/ibmpublic/lib -L/opt/freeware/lib -lapreq2 
-L/usr/ibmpublic/lib
-L/opt/freeware/lib -laprutil-1 -lapr-1 -lldap -lssl -lcrypto -ls -llber 
-lexpat
 -liconv -lpthread 
-Wl,-blibpath:/usr/ihs/inst/apache-2.2.8/lib:/usr/ibmpublic/l
ib:/usr/ihs/inst/apache-2.2.8/lib:/usr/ibmpublic/lib:/opt/freeware/lib:/usr/lpp/
xlopt:/usr/lib/threads:/usr/lib:/lib
ld: 0706-005 Cannot find or open file: no-strict-aliasing
        ld:fopen(): No such file or directory
make[2]: *** [test_cgi] Error 255
make[2]: Leaving directory 
`/source/wr118651/t/libapreq2-2.08/rs_aix52/module'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory 
`/source/wr118651/t/libapreq2-2.08/rs_aix52/module'
make: *** [all-recursive] Error 1

I suspect that the problem occurs with the definition of LINK in the 
Makefile/Makefile.in including the CFLAGS when some compilers pass unknown 
parameters on to the linker.

Thanks,
Chris Dukes

Re: Forcing -fno-strict-aliasing to all compiles breaks compiles with xlc/xlc_r

Posted by Bojan Smojver <bo...@rexursive.com>.
On Fri, 2008-03-07 at 12:22 -0700, Chris Dukes wrote:

> Your test is including the '-c', allowing it to pass. 

OK. After I sent the patch, I realised that you toolchain only had a
problem with the whole thing during the link phase. Sorry :-(

Can you try replacing AC_COMPILE_IFELSE in my patch with AC_LINK_IFELSE?
I just want to see if the test will produce the correct result. If it
does, I think the whole thing should be reworked to use both tests and
only if both pass use -fno-strict-aliasing.

-- 
Bojan


Re: Forcing -fno-strict-aliasing to all compiles breaks compiles with xlc/xlc_r

Posted by Chris Dukes <cd...@us.ibm.com>.
No joy.

xlc -fno-strict-aliasing -c -o conftest.o confest.c
will work
Follow that with
xlc -fno-strict-aliasing -c -o conftest conftest.o
and it'll error with 
ld: 0706-005 Cannot find or open file: no-strict-aliasing
        ld:fopen(): A file or directory in the path name does not exist.
This is because '-f' supposed to be passed to 'ld' by xlc on AIX.

Your test is including the '-c', allowing it to pass.

I think the root problem is being introduced with placing $CFLAGS in the 
link invocation of libtool.
Unfortunately, this solution would lead to other problems if someone is 
also making use of '-qipa' in optimization (Not that it makes much sense 
for this package).

Thanks,
Chris Dukes




Bojan Smojver <bo...@rexursive.com> 
03/02/2008 05:32 PM

To
Chris Dukes/Durham/Contr/IBM@IBMUS
cc
apreq-dev@httpd.apache.org
Subject
Re: Forcing -fno-strict-aliasing to all compiles breaks compiles with 
xlc/xlc_r






On Mon, 2008-03-03 at 09:03 +1100, Bojan Smojver wrote:

> Yeah, we should only use -fno-strict-aliasing with GCC.

Can you let me know if this helps? You'll need to run buildconf, of
course...

-- 
Bojan


Re: Forcing -fno-strict-aliasing to all compiles breaks compiles with xlc/xlc_r

Posted by Bojan Smojver <bo...@rexursive.com>.
On Mon, 2008-03-03 at 09:03 +1100, Bojan Smojver wrote:

> Yeah, we should only use -fno-strict-aliasing with GCC.

Can you let me know if this helps? You'll need to run buildconf, of
course...

-- 
Bojan

Re: Forcing -fno-strict-aliasing to all compiles breaks compiles with xlc/xlc_r

Posted by Bojan Smojver <bo...@rexursive.com>.
On Fri, 2008-02-29 at 12:54 -0500, Chris Dukes wrote:

> xlc_r -qcpluscmt

Yeah, we should only use -fno-strict-aliasing with GCC.

-- 
Bojan