Hi Tom, thanks for the tip. I ended up just adding a few lines to
Makefile.shlib. Attached is the context diff. The patch has been
tested on IRIX 6.5.2 with MIPSpro C and C++ compiler version 7.2.1
using -n32 ABI.
--Yu Cao
On Sat, 4 Sep 1999, Tom Lane wrote:
> Yu Cao <yucao@falcon.kla-tencor.com> writes:
> > I'm not sure whether using "CC" to create libraries for the pure C
> > modules would work (my guess is it should and I'll try it). If it does
> > then it'll be easy to patch the IRIX makefile template. But then the
> > downside is people will be required to have the C++ compiler even if
> > they don't care about libpq++.
>
> Not necessarily. Since 6.4 or so, the "template" files are not just
> static assignments of variable values --- they can actually contain
> arbitrary fragments of shell script (see configure.in's code that
> reads them). So you could do something like
> if [ -x /usr/bin/CC ]
> then
> CC= CC
> else
> CC= cc
> fi
> in the IRIX template.
>
> regards, tom lane
>
> ************
>
>
>
*** Makefile.shlib.orig Sun Sep 5 23:30:36 1999
--- Makefile.shlib Sun Sep 5 23:41:09 1999
***************
*** 61,66 ****
--- 61,72 ----
shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
LDFLAGS_SL := -shared
CFLAGS += $(CFLAGS_SL)
+ ifeq ($(NAME), pq++)
+ AR := CC
+ AROPT := -ar -o
+ LD := CC
+ LDFLAGS_SL := -shared
+ endif
endif
ifeq ($(PORTNAME), freebsd)