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

Chris Dukes <[email protected]>
Newsgroups gmane.comp.apache.apreq
Message-ID <OF6A170C31.73EBFD78-ON852573FE.005F7FE4-852573FE.00625586@us.ibm.com>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.