Subject: Re: Nasty bug in devel/zlib
To: Adam <adam@albedo.art.pl>
From: Georg Schwarz <georg.schwarz@freenet.de>
List: tech-pkg
Date: 02/27/2005 00:42:02
> Can you check if adding:
> CFLAGS= -O ${CFLAGS}
> (in the place where CFLAGS= -O is removed by the patch) helps buidling 
> on IRIX?
> If it works, I can commit the change.

well, it does workm, but not the way you probably intended it to.
The configure script replaces everything right hand side of CFLAGS=
with the CFLAGS it has established for the particular system.
Besides, it would not work since CFLAGS is defined recursively in the
Makefile.

What does work is patching configure like this:

--- configure.orig1     2005-02-27 00:32:25.000000000 +0100
+++ configure   2005-02-27 00:33:53.000000000 +0100
@@ -424,7 +424,7 @@
 # udpate Makefile
 sed < Makefile.in "
 /^CC *=/s#=.*#=$CC#
-/^CFLAGS *=/s#=.*#=$CFLAGS#
+/^CONFIG_CFLAGS *=/s#=.*#=$CFLAGS#
 /^CPP *=/s#=.*#=$CPP#
 /^LDSHARED *=/s#=.*#=$LDSHARED#
 /^LIBS *=/s#=.*#=$LIBS#


having in Makefile.in something like this:

CONFIG_CFLAGS=-O
CFLAGS=${PKGSRC_CFLAGS} ${CONFIG_CFLAGS}

and, as Hubert suggested a few minutes ago, pass PKGSRC_CFLAGS=${CFLAGS}
in the pkgsrc Makefile.
This however affects not only IRIX but in principle every platform, since
the platform-specific defines determined by configure had not been used
so far.



-- 
Georg Schwarz    http://home.pages.de/~schwarz/
 georg.schwarz@freenet.de  +49 178 8545053