Re: [HACKERS] Snapshot 26Feb98 - another minor showstopper - Mailing list pgsql-hackers

From Tom I Helbekkmo
Subject Re: [HACKERS] Snapshot 26Feb98 - another minor showstopper
Date
Msg-id 19980226222656.04447@Hamartun.Priv.NO
Whole thread Raw
In response to Re: [HACKERS] Snapshot 26Feb98 - another minor showstopper  (Andrew Martin <martin@biochemistry.ucl.ac.uk>)
Responses Re: [HACKERS] Snapshot 26Feb98 - another minor showstopper  (Michael Meskes <meskes@topsystem.de>)
List pgsql-hackers
On Thu, Feb 26, 1998 at 05:15:28PM +0000, Andrew Martin wrote:

> Just seen that Darren has supplied more extensive patches which
> also fix the problems with -Wall in ecpg
>
> So, ignore my versions (though the patch to configure is still
> needed).

Not entirely.  His version didn't introduce "$(CFLAGS)" into the cc
command lines, which is needed for many systems -- while yours did.
Specifically, this causes building to fail on systems that do shared
libraries.  For the "bsd" port, the shared library setup should also
be modified as has been done everywhere else, to ignore it on those
BSD systems that don't have shared libraries.

Here's a slightly expanded version of your patch -- this is what I'm
using here now:

*** interfaces/ecpg/lib/Makefile.in.orig    Tue Feb 24 09:00:41 1998
--- interfaces/ecpg/lib/Makefile.in    Thu Feb 26 18:29:03 1998
***************
*** 8,13 ****
--- 8,17 ----

  PORTNAME=@PORTNAME@

+ ifdef KRBVERS
+ CFLAGS+= $(KRBFLAGS)
+ endif
+
  # Shared library stuff
  shlib :=
  install-shlib-dep :=
***************
*** 20,29 ****
    endif
  endif
  ifeq ($(PORTNAME), bsd)
!   install-shlib-dep := install-shlib
!   shlib := libecpg.so.$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
!   LDFLAGS_SL = -x -Bshareable -Bforcearchive
!   CFLAGS += $(CFLAGS_SL)
  endif
  #ifeq ($(PORTNAME), i386_solaris)
  #  install-shlib-dep := install-shlib
--- 24,35 ----
    endif
  endif
  ifeq ($(PORTNAME), bsd)
!   ifdef BSD_SHLIB
!     install-shlib-dep := install-shlib
!     shlib := libecpg.so.$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
!     LDFLAGS_SL = -x -Bshareable -Bforcearchive
!     CFLAGS += $(CFLAGS_SL)
!   endif
  endif
  #ifeq ($(PORTNAME), i386_solaris)
  #  install-shlib-dep := install-shlib
***************
*** 61,66 ****
  libecpg.a : libecpg.a(ecpglib.o) libecpg.a(typename.o)

  ecpglib.o : ecpglib.c ../include/ecpglib.h ../include/ecpgtype.h
!     $(CC) -Wall -I../include $(PQ_INCLUDE) -c ecpglib.c
  typename.o : typename.c ../include/ecpgtype.h
!     $(CC) -Wall -I../include $(PQ_INCLUDE) -c typename.c
--- 67,72 ----
  libecpg.a : libecpg.a(ecpglib.o) libecpg.a(typename.o)

  ecpglib.o : ecpglib.c ../include/ecpglib.h ../include/ecpgtype.h
!     $(CC) $(CFLAGS) -I../include $(PQ_INCLUDE) -c ecpglib.c
  typename.o : typename.c ../include/ecpgtype.h
!     $(CC) $(CFLAGS) -I../include $(PQ_INCLUDE) -c typename.c

-tih
--
Popularity is the hallmark of mediocrity.  --Niles Crane, "Frasier"

pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] mode of libs
Next
From: Tom I Helbekkmo
Date:
Subject: Re: [HACKERS] Solution to the pg_user passwd problem !?? (c)