Skip to content

Commit c7a7949

Browse files
committed
Separate CFLAGS_SL and CXXFLAGS_SL, to allow building with C and C++
compilers from different providers. (Especially important since the C++ compiler that goes with your favourite C compiler might not work.)
1 parent 1fdf2ed commit c7a7949

File tree

6 files changed

+31
-12
lines changed

6 files changed

+31
-12
lines changed

src/Makefile.shlib

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# Copyright (c) 1998, Regents of the University of California
77
#
88
# IDENTIFICATION
9-
# $Header: /cvsroot/pgsql/src/Makefile.shlib,v 1.31 2000/10/31 19:55:18 petere Exp $
9+
# $Header: /cvsroot/pgsql/src/Makefile.shlib,v 1.32 2000/11/04 16:35:54 petere Exp $
1010
#
1111
#-------------------------------------------------------------------------
1212

@@ -88,13 +88,13 @@ ifeq ($(enable_shared), yes)
8888

8989
# Try to keep the sections in some kind of order, folks...
9090

91-
# XXX fix Makefile.aix
92-
ifneq ($(PORTNAME), aix)
93-
ifndef cplusplus
94-
override CFLAGS += $(CFLAGS_SL)
95-
else
96-
override CXXFLAGS += $(CFLAGS_SL)
91+
ifndef cplusplus
92+
override CFLAGS += $(CFLAGS_SL)
93+
else
94+
ifndef CXXFLAGS_SL
95+
CXXFLAGS_SL = $(CFLAGS_SL)
9796
endif
97+
override CXXFLAGS += $(CXXFLAGS_SL)
9898
endif
9999

100100

src/makefiles/Makefile.aix

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,12 @@ AROPT = crs
99
DLSUFFIX = .so
1010
ifneq ($(GCC), yes)
1111
ifeq ($(host_os), aix3.2.5)
12-
CFLAGS_SL = -e _nostart
12+
LDFLAGS_SL = -e _nostart
1313
endif
1414
ifeq ($(host_os), aix4.1)
15-
CFLAGS_SL = -bnoentry
15+
LDFLAGS_SL = -bnoentry
1616
endif
1717
endif
18-
CFLAGS_SL += -lc
1918

2019

2120
EXPSUFF= .exp
@@ -35,4 +34,4 @@ $(POSTGRES_IMP):
3534

3635
%$(DLSUFFIX): %.o %$(EXPSUFF)
3736
@echo Making shared library $@ from $*.o, $*$(EXPSUFF), and installed postgres.imp
38-
$(CC) -Wl,-H512 -Wl,-bM:SRE -Wl,-bI:$(libdir)/$(POSTGRES_IMP) -Wl,-bE:$*$(EXPSUFF) -o $@ $*.o $(LDFLAGS) $(CFLAGS_SL)
37+
$(CC) -Wl,-H512 -Wl,-bM:SRE -Wl,-bI:$(libdir)/$(POSTGRES_IMP) -Wl,-bE:$*$(EXPSUFF) -o $@ $*.o $(LDFLAGS) $(LDFLAGS_SL) -lc

src/makefiles/Makefile.hpux

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@ CFLAGS_SL = -fPIC
3838
else
3939
CFLAGS_SL = +z
4040
endif
41+
ifeq ($(GXX), yes)
42+
CXXFLAGS_SL = -fPIC
43+
else
44+
CXXFLAGS_SL = +z
45+
endif
4146

4247
# Rule for building shared libs (currently used only for regression test
4348
# shlib ... should go away, since this is not really enough knowledge)

src/makefiles/Makefile.solaris

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $Header: /cvsroot/pgsql/src/makefiles/Makefile.solaris,v 1.4 2000/10/27 23:59:39 petere Exp $
1+
# $Header: /cvsroot/pgsql/src/makefiles/Makefile.solaris,v 1.5 2000/11/04 16:35:55 petere Exp $
22

33
AROPT = crs
44

@@ -16,6 +16,11 @@ CFLAGS_SL = -fPIC
1616
else
1717
CFLAGS_SL = -KPIC
1818
endif
19+
ifeq ($(GXX), yes)
20+
CXXFLAGS_SL = -fPIC
21+
else
22+
CXXFLAGS_SL = -KPIC
23+
endif
1924

2025
%.so: %.o
2126
$(LD) -G -Bdynamic -o $@ $<

src/makefiles/Makefile.sunos4

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ CFLAGS_SL = -fPIC
66
else
77
CFLAGS_SL = -PIC
88
endif
9+
ifeq ($(GXX), yes)
10+
CXXFLAGS_SL = -fPIC
11+
else
12+
CXXFLAGS_SL = -PIC
13+
endif
914

1015
%.so: %.o
1116
$(LD) -dc -dp -Bdynamic -o $@ $<

src/makefiles/Makefile.unixware

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ CFLAGS_SL = -fpic
77
else
88
CFLAGS_SL = -K PIC
99
endif
10+
ifeq ($(GXX), yes)
11+
CXXFLAGS_SL = -fpic
12+
else
13+
CXXFLAGS_SL = -K PIC
14+
endif
1015

1116
%.so: %.o
1217
$(LD) -G -Bdynamic -o $@ $<

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy