postgreSQL 6.4 patches

Started by Billy G. Allieover 27 years ago2 messages
#1Billy G. Allie
Bill.Allie@mug.org
1 attachment(s)

Here are some additional patches needed to get the UnixWare 7 C++ compiler to
attempt to compile libpq++. The patches address the following problems:

1. In my first pass at changing the libpq++ makefile, I forgot to include the
PORTNAME in the Makefile.in file.

2. The UnixWare 7 C++ compiler did not like the '-K alloca' option in
CXXFLAGS.
Unfortunately, the '-K alloca' option is needed in CFLAGS (from which
CXXFLAGS is dereived). My solution was to redefine the COMPILE.cc macro
for the unixware (and univel) port when the compiler is not g++ so that the
'-K alloca' option is removed.

3. The '-Xa' and '-v' options were removed from the CFLAGS entry in the
unixware template. The '-Xa' option is a default and was not compatable
with the C++ compiler. The '-v' option turns on verbose mode in the
compiler and (IMHO) should not be in CFLAGS by default.

The good news is that the C++ compiler will execute correctly when (g)make
runs.

The bad news is that the C++ compiler is unable to compile the source because
it does not have a full implementation of 'string'. As the problem is related
to the compiler and not the implementation of libpq++, I will not (at this
time) continue trying to compile libpq++ on UnixWare. If libpq++ is needed,
then postgreSQL for UnixWare will have to be compiled with gcc/g++.

Attachments:

uw7p5.patchapplication/x-patch; name=uw7p5.patchDownload
*** src/interfaces/libpq++/Makefile.in.orig	Fri Sep 11 16:59:31 1998
--- src/interfaces/libpq++/Makefile.in	Sat Sep 12 00:38:50 1998
***************
*** 20,25 ****
--- 20,27 ----
  
  CXX=@CXX@
  
+ PORTNAME=@PORTNAME@
+ 
  # We have to override -Werror, which makes warnings, fatal, because we
  # inevitably get the warning, "abstract declarator used as declaration"
  # because of our inclusion of c.h and we don't know how to stop that.
***************
*** 67,72 ****
--- 69,78 ----
    shlib := libpq.so.1
    LDFLAGS_SL = -G -z text
    CFLAGS += $(CFLAGS_SL)
+   ifeq ($(CXX), CC)
+     CXXFLAGS += -Xw
+     COMPILE.cc = $(CXX) $(CXXFLAGS:ll,alloca=ll) $(CPPFLAGS) $(TARGET_ARCH) -c
+   endif
  endif
  
  ifeq ($(PORTNAME), univel)
***************
*** 74,79 ****
--- 80,89 ----
    shlib := libpq.so.1
    LDFLAGS_SL = -G -z text
    CFLAGS += $(CFLAGS_SL)
+   ifeq ($(CXX), CC)
+     CXXFLAGS += -Xw
+     COMPILE.cc = $(CXX) $(CXXFLAGS:ll,alloca=ll) $(CPPFLAGS) $(TARGET_ARCH) -c
+   endif
  endif
  
  ifeq ($(PORTNAME), hpux)
*** src/template/univel.orig	Fri Sep 11 22:56:52 1998
--- src/template/univel	Fri Sep 11 22:56:56 1998
***************
*** 1,5 ****
  AROPT:crs
! CFLAGS:-Xa -v -O -K i486,host,inline,loop_unroll -Dsvr4
  SHARED_LIB:-K PIC
  SRCH_INC:
  SRCH_LIB:
--- 1,5 ----
  AROPT:crs
! CFLAGS:-v -O -K i486,host,inline,loop_unroll -Dsvr4
  SHARED_LIB:-K PIC
  SRCH_INC:
  SRCH_LIB:
*** src/template/unixware.orig	Fri Sep 11 22:57:09 1998
--- src/template/unixware	Fri Sep 11 22:57:18 1998
***************
*** 1,5 ****
  AROPT:crs
! CFLAGS:-Xa -v -O -K i486,host,inline,loop_unroll,alloca -Dsvr4
  SHARED_LIB:-K PIC
  SRCH_INC:/opt/include
  SRCH_LIB:/opt/lib
--- 1,5 ----
  AROPT:crs
! CFLAGS:-O -K i486,host,inline,loop_unroll,alloca -Dsvr4
  SHARED_LIB:-K PIC
  SRCH_INC:/opt/include
  SRCH_LIB:/opt/lib
#2Bruce Momjian
maillist@candle.pha.pa.us
In reply to: Billy G. Allie (#1)
Re: [HACKERS] postgreSQL 6.4 patches

Applied

Here are some additional patches needed to get the UnixWare 7 C++ compiler to
attempt to compile libpq++. The patches address the following problems:

1. In my first pass at changing the libpq++ makefile, I forgot to include the
PORTNAME in the Makefile.in file.

2. The UnixWare 7 C++ compiler did not like the '-K alloca' option in
CXXFLAGS.
Unfortunately, the '-K alloca' option is needed in CFLAGS (from which
CXXFLAGS is dereived). My solution was to redefine the COMPILE.cc macro
for the unixware (and univel) port when the compiler is not g++ so that the
'-K alloca' option is removed.

3. The '-Xa' and '-v' options were removed from the CFLAGS entry in the
unixware template. The '-Xa' option is a default and was not compatable
with the C++ compiler. The '-v' option turns on verbose mode in the
compiler and (IMHO) should not be in CFLAGS by default.

The good news is that the C++ compiler will execute correctly when (g)make
runs.

The bad news is that the C++ compiler is unable to compile the source because
it does not have a full implementation of 'string'. As the problem is related
to the compiler and not the implementation of libpq++, I will not (at this
time) continue trying to compile libpq++ on UnixWare. If libpq++ is needed,
then postgreSQL for UnixWare will have to be compiled with gcc/g++.

Content-Description: uw7p5.patch

[Attachment, skipping...]

____ | Billy G. Allie | Domain....: Bill.Allie@mug.org
| /| | 7436 Hartwell | Compuserve: 76337,2061
|-/-|----- | Dearborn, MI 48126| MSN.......: B_G_Allie@email.msn.com
|/ |LLIE | (313) 582-1540 |

-- 
Bruce Momjian                          |  830 Blythe Avenue
maillist@candle.pha.pa.us              |  Drexel Hill, Pennsylvania 19026
  +  If your life is a hard drive,     |  (610) 353-9879(w)
  +  Christ can be your backup.        |  (610) 853-3000(h)