OSDN Git Service

Synchronize the shared object build rules in Makefile.port with Makefile.shlib
authorPeter Eisentraut <peter_e@gmx.net>
Mon, 1 Sep 2008 08:50:10 +0000 (08:50 +0000)
committerPeter Eisentraut <peter_e@gmx.net>
Mon, 1 Sep 2008 08:50:10 +0000 (08:50 +0000)
somewhat by adding CFLAGS where the compiler is used and Makefile.shlib
already used CFLAGS.

src/Makefile.shlib
src/makefiles/Makefile.aix
src/makefiles/Makefile.bsdi
src/makefiles/Makefile.freebsd
src/makefiles/Makefile.irix
src/makefiles/Makefile.linux
src/makefiles/Makefile.netbsd
src/makefiles/Makefile.openbsd
src/makefiles/Makefile.solaris

index 4e795e3..5bf5b81 100644 (file)
@@ -6,7 +6,7 @@
 # Copyright (c) 1998, Regents of the University of California
 #
 # 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
 
 ifeq ($(PORTNAME), solaris)
   ifeq ($(GCC), yes)
-    LINK.shared                = $(COMPILER) -shared # $(COMPILER) needed for -m64
+    LINK.shared                = $(COMPILER) -shared
   else
-# CFLAGS added for X86_64
-    LINK.shared                = $(CC) -G $(CFLAGS)
+    LINK.shared                = $(COMPILER) -G
   endif
   ifdef soname
     ifeq ($(with_gnu_ld), yes)
index ea825a7..35d4523 100644 (file)
@@ -38,6 +38,6 @@ MKLDEXPORT=$(top_srcdir)/src/backend/port/aix/mkldexport.sh
        $(MKLDEXPORT) $^ >$@
 
 %$(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
index 47b1274..0ce0704 100644 (file)
@@ -21,6 +21,6 @@ CFLAGS_SL =
 endif
 
 %.so: %.o
-       $(CC) -shared -o $@ $<
+       $(CC) $(CFLAGS) -shared -o $@ $<
 
 sqlmansect = 7
index f6e5760..201dcd6 100644 (file)
@@ -16,7 +16,7 @@ endif
 
 %.so: %.o
 ifdef ELF_SYSTEM
-       $(LD) -x -shared -o $@ $<
+       $(CC) $(CFLAGS) -shared -o $@ $<
 else
        $(LD) $(LDREL) $(LDOUT) $<.obj -x $<
        @echo building shared object $@
index 2a23c5a..1456538 100644 (file)
@@ -6,7 +6,7 @@ DLSUFFIX = .so
 CFLAGS_SL =
 
 %.so: %.o
-       $(LD) -G -Bdynamic -shared -o $@ $< 
+       $(CC) $(CFLAGS) -shared -o $@ $< 
 
 override CPPFLAGS += -U_NO_XOPEN4
 
index 8766d18..0fadd27 100644 (file)
@@ -11,6 +11,6 @@ CFLAGS_SL = -fpic
 endif
 
 %.so: %.o
-       $(CC) -shared -o $@ $<
+       $(CC) $(CFLAGS) -shared -o $@ $<
 
 sqlmansect = 7
index db33ebf..820e330 100644 (file)
@@ -18,7 +18,7 @@ endif
 
 %.so: %.o
 ifdef ELF_SYSTEM
-       $(LD) -x -Bshareable -o $@ $<
+       $(CC) $(CFLAGS) -shared -o $@ $<
 else
        $(LD) $(LDREL) $(LDOUT) $<.obj -x $<
        @echo building shared object $@
index 24e2018..7c6765c 100644 (file)
@@ -16,7 +16,7 @@ endif
 
 %.so: %.o
 ifdef ELF_SYSTEM
-       $(CC) -shared -o $@ $<
+       $(CC) $(CFLAGS) -shared -o $@ $<
 else
        $(LD) $(LDREL) $(LDOUT) $<.obj -x $<
        @echo building shared object $@
index 79c92bc..bb56830 100644 (file)
@@ -1,4 +1,4 @@
-# $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
 
@@ -17,6 +17,10 @@ CFLAGS_SL = -KPIC
 endif
 
 %.so: %.o
-       $(LD) -G -Bdynamic -o $@ $<
+ifeq ($(GCC), yes)
+       $(CC) $(CFLAGS) -shared -o $@ $<
+else
+       $(CC) $(CFLAGS) -G -o $@ $<
+endif
 
 sqlmansect = 5sql