On Fri, Jul 15, 2005 at 08:06:15PM -0500, Kris Jurka wrote:
> On Fri, 15 Jul 2005, Marko Kreen wrote:
>
> > [buildfarm machine dragonfly]
> >
> > On Tue, Jul 12, 2005 at 01:06:46PM -0500, Kris Jurka wrote:
> > > Well the buildfarm machine kudu is actually the same machine just
> > > building
> > > with the Sun compiler and it works fine. It links all of libz.a into
> > > libpgcrypto.so while gcc refuses to.
> >
> > I googled a bit and found two suggestions:
> >
> > 1. http://curl.haxx.se/mail/lib-2002-01/0092.html
> > (Use -mimpure-text on linking line)
> >
> > The attached patch does #1. Could you try it and see if it fixes it?
> >
>
> This patch works, pgcrypto links and passes its installcheck test now.
>
> Kris Jurka
Thanks.
Here is the patch with a little comment.
It should not break anything as it just disables a extra
argument "-assert pure-text" to linker.
Linking static libraries into shared one is bad idea, as the
static parts wont be shared between processes, but erroring
out is worse, especially if another compiler for a platform
allows it.
This makes gcc act same way as Sun's cc.
--
marko
Index: src/Makefile.shlib
===================================================================
RCS file: /opt/arc/cvs2/pgsql/src/Makefile.shlib,v
retrieving revision 1.95
diff -u -c -r1.95 Makefile.shlib
*** src/Makefile.shlib 13 Jul 2005 17:00:44 -0000 1.95
--- src/Makefile.shlib 16 Jul 2005 09:59:18 -0000
***************
*** 188,194 ****
ifeq ($(PORTNAME), solaris)
ifeq ($(GCC), yes)
! LINK.shared = $(CC) -shared
else
LINK.shared = $(CC) -G
endif
--- 188,196 ----
ifeq ($(PORTNAME), solaris)
ifeq ($(GCC), yes)
! # -mimpure-text disables passing '-assert pure-text' to linker,
! # to allow linking static library into shared one, like Sun's cc does.
! LINK.shared = $(CC) -shared -mimpure-text
else
LINK.shared = $(CC) -G
endif
---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match