Commit 86ec73b9 authored by Peter Eisentraut's avatar Peter Eisentraut

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.
parent b8f5ea76
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
# Copyright (c) 1998, Regents of the University of California # Copyright (c) 1998, Regents of the University of California
# #
# IDENTIFICATION # IDENTIFICATION
# $PostgreSQL: pgsql/src/Makefile.shlib,v 1.116 2008/04/08 09:50:29 petere Exp $ # $PostgreSQL: pgsql/src/Makefile.shlib,v 1.117 2008/09/01 08:50:09 petere Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
...@@ -256,10 +256,9 @@ endif ...@@ -256,10 +256,9 @@ endif
ifeq ($(PORTNAME), solaris) ifeq ($(PORTNAME), solaris)
ifeq ($(GCC), yes) ifeq ($(GCC), yes)
LINK.shared = $(COMPILER) -shared # $(COMPILER) needed for -m64 LINK.shared = $(COMPILER) -shared
else else
# CFLAGS added for X86_64 LINK.shared = $(COMPILER) -G
LINK.shared = $(CC) -G $(CFLAGS)
endif endif
ifdef soname ifdef soname
ifeq ($(with_gnu_ld), yes) ifeq ($(with_gnu_ld), yes)
......
...@@ -38,6 +38,6 @@ MKLDEXPORT=$(top_srcdir)/src/backend/port/aix/mkldexport.sh ...@@ -38,6 +38,6 @@ MKLDEXPORT=$(top_srcdir)/src/backend/port/aix/mkldexport.sh
$(MKLDEXPORT) $^ >$@ $(MKLDEXPORT) $^ >$@
%$(DLSUFFIX): %.o %.exp %$(DLSUFFIX): %.o %.exp
$(CC) $(LDFLAGS) $(LDFLAGS_SL) -o $@ $*.o -Wl,-bE:$*.exp $(SHLIB_LINK) $(CC) $(CFLAGS) $(LDFLAGS) $(LDFLAGS_SL) -o $@ $*.o -Wl,-bE:$*.exp $(SHLIB_LINK)
sqlmansect = 7 sqlmansect = 7
...@@ -21,6 +21,6 @@ CFLAGS_SL = ...@@ -21,6 +21,6 @@ CFLAGS_SL =
endif endif
%.so: %.o %.so: %.o
$(CC) -shared -o $@ $< $(CC) $(CFLAGS) -shared -o $@ $<
sqlmansect = 7 sqlmansect = 7
...@@ -16,7 +16,7 @@ endif ...@@ -16,7 +16,7 @@ endif
%.so: %.o %.so: %.o
ifdef ELF_SYSTEM ifdef ELF_SYSTEM
$(LD) -x -shared -o $@ $< $(CC) $(CFLAGS) -shared -o $@ $<
else else
$(LD) $(LDREL) $(LDOUT) $<.obj -x $< $(LD) $(LDREL) $(LDOUT) $<.obj -x $<
@echo building shared object $@ @echo building shared object $@
......
...@@ -6,7 +6,7 @@ DLSUFFIX = .so ...@@ -6,7 +6,7 @@ DLSUFFIX = .so
CFLAGS_SL = CFLAGS_SL =
%.so: %.o %.so: %.o
$(LD) -G -Bdynamic -shared -o $@ $< $(CC) $(CFLAGS) -shared -o $@ $<
override CPPFLAGS += -U_NO_XOPEN4 override CPPFLAGS += -U_NO_XOPEN4
......
...@@ -11,6 +11,6 @@ CFLAGS_SL = -fpic ...@@ -11,6 +11,6 @@ CFLAGS_SL = -fpic
endif endif
%.so: %.o %.so: %.o
$(CC) -shared -o $@ $< $(CC) $(CFLAGS) -shared -o $@ $<
sqlmansect = 7 sqlmansect = 7
...@@ -18,7 +18,7 @@ endif ...@@ -18,7 +18,7 @@ endif
%.so: %.o %.so: %.o
ifdef ELF_SYSTEM ifdef ELF_SYSTEM
$(LD) -x -Bshareable -o $@ $< $(CC) $(CFLAGS) -shared -o $@ $<
else else
$(LD) $(LDREL) $(LDOUT) $<.obj -x $< $(LD) $(LDREL) $(LDOUT) $<.obj -x $<
@echo building shared object $@ @echo building shared object $@
......
...@@ -16,7 +16,7 @@ endif ...@@ -16,7 +16,7 @@ endif
%.so: %.o %.so: %.o
ifdef ELF_SYSTEM ifdef ELF_SYSTEM
$(CC) -shared -o $@ $< $(CC) $(CFLAGS) -shared -o $@ $<
else else
$(LD) $(LDREL) $(LDOUT) $<.obj -x $< $(LD) $(LDREL) $(LDOUT) $<.obj -x $<
@echo building shared object $@ @echo building shared object $@
......
# $PostgreSQL: pgsql/src/makefiles/Makefile.solaris,v 1.13 2005/12/09 21:19:36 petere Exp $ # $PostgreSQL: pgsql/src/makefiles/Makefile.solaris,v 1.14 2008/09/01 08:50:10 petere Exp $
AROPT = crs AROPT = crs
...@@ -17,6 +17,10 @@ CFLAGS_SL = -KPIC ...@@ -17,6 +17,10 @@ CFLAGS_SL = -KPIC
endif endif
%.so: %.o %.so: %.o
$(LD) -G -Bdynamic -o $@ $< ifeq ($(GCC), yes)
$(CC) $(CFLAGS) -shared -o $@ $<
else
$(CC) $(CFLAGS) -G -o $@ $<
endif
sqlmansect = 5sql sqlmansect = 5sql
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment