Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 86ec73b

Browse files
committed
Synchronize the shared object build rules in Makefile.port with Makefile.shlib
somewhat by adding CFLAGS where the compiler is used and Makefile.shlib already used CFLAGS.
1 parent b8f5ea7 commit 86ec73b

9 files changed

+16
-13
lines changed

src/Makefile.shlib

+3-4
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-
# $PostgreSQL: pgsql/src/Makefile.shlib,v 1.116 2008/04/08 09:50:29 petere Exp $
9+
# $PostgreSQL: pgsql/src/Makefile.shlib,v 1.117 2008/09/01 08:50:09 petere Exp $
1010
#
1111
#-------------------------------------------------------------------------
1212

@@ -256,10 +256,9 @@ endif
256256

257257
ifeq ($(PORTNAME), solaris)
258258
ifeq ($(GCC), yes)
259-
LINK.shared = $(COMPILER) -shared # $(COMPILER) needed for -m64
259+
LINK.shared = $(COMPILER) -shared
260260
else
261-
# CFLAGS added for X86_64
262-
LINK.shared = $(CC) -G $(CFLAGS)
261+
LINK.shared = $(COMPILER) -G
263262
endif
264263
ifdef soname
265264
ifeq ($(with_gnu_ld), yes)

src/makefiles/Makefile.aix

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,6 @@ MKLDEXPORT=$(top_srcdir)/src/backend/port/aix/mkldexport.sh
3838
$(MKLDEXPORT) $^ >$@
3939

4040
%$(DLSUFFIX): %.o %.exp
41-
$(CC) $(LDFLAGS) $(LDFLAGS_SL) -o $@ $*.o -Wl,-bE:$*.exp $(SHLIB_LINK)
41+
$(CC) $(CFLAGS) $(LDFLAGS) $(LDFLAGS_SL) -o $@ $*.o -Wl,-bE:$*.exp $(SHLIB_LINK)
4242

4343
sqlmansect = 7

src/makefiles/Makefile.bsdi

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@ CFLAGS_SL =
2121
endif
2222

2323
%.so: %.o
24-
$(CC) -shared -o $@ $<
24+
$(CC) $(CFLAGS) -shared -o $@ $<
2525

2626
sqlmansect = 7

src/makefiles/Makefile.freebsd

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ endif
1616

1717
%.so: %.o
1818
ifdef ELF_SYSTEM
19-
$(LD) -x -shared -o $@ $<
19+
$(CC) $(CFLAGS) -shared -o $@ $<
2020
else
2121
$(LD) $(LDREL) $(LDOUT) $<.obj -x $<
2222
@echo building shared object $@

src/makefiles/Makefile.irix

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ DLSUFFIX = .so
66
CFLAGS_SL =
77

88
%.so: %.o
9-
$(LD) -G -Bdynamic -shared -o $@ $<
9+
$(CC) $(CFLAGS) -shared -o $@ $<
1010

1111
override CPPFLAGS += -U_NO_XOPEN4
1212

src/makefiles/Makefile.linux

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ CFLAGS_SL = -fpic
1111
endif
1212

1313
%.so: %.o
14-
$(CC) -shared -o $@ $<
14+
$(CC) $(CFLAGS) -shared -o $@ $<
1515

1616
sqlmansect = 7

src/makefiles/Makefile.netbsd

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ endif
1818

1919
%.so: %.o
2020
ifdef ELF_SYSTEM
21-
$(LD) -x -Bshareable -o $@ $<
21+
$(CC) $(CFLAGS) -shared -o $@ $<
2222
else
2323
$(LD) $(LDREL) $(LDOUT) $<.obj -x $<
2424
@echo building shared object $@

src/makefiles/Makefile.openbsd

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ endif
1616

1717
%.so: %.o
1818
ifdef ELF_SYSTEM
19-
$(CC) -shared -o $@ $<
19+
$(CC) $(CFLAGS) -shared -o $@ $<
2020
else
2121
$(LD) $(LDREL) $(LDOUT) $<.obj -x $<
2222
@echo building shared object $@

src/makefiles/Makefile.solaris

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $PostgreSQL: pgsql/src/makefiles/Makefile.solaris,v 1.13 2005/12/09 21:19:36 petere Exp $
1+
# $PostgreSQL: pgsql/src/makefiles/Makefile.solaris,v 1.14 2008/09/01 08:50:10 petere Exp $
22

33
AROPT = crs
44

@@ -17,6 +17,10 @@ CFLAGS_SL = -KPIC
1717
endif
1818

1919
%.so: %.o
20-
$(LD) -G -Bdynamic -o $@ $<
20+
ifeq ($(GCC), yes)
21+
$(CC) $(CFLAGS) -shared -o $@ $<
22+
else
23+
$(CC) $(CFLAGS) -G -o $@ $<
24+
endif
2125

2226
sqlmansect = 5sql

0 commit comments

Comments
 (0)