Synchronize the shared object build rules in Makefile.port with Makefile.shlib
authorPeter Eisentraut <[email protected]>
Mon, 1 Sep 2008 08:50:10 +0000 (08:50 +0000)
committerPeter Eisentraut <[email protected]>
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 cafb13586de32e356387b93a6610d5e6f58737b1..2c1f961debcf6ee2859f87bab0bab10b53f50e3a 100644 (file)
@@ -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 ea825a7ca6b54629c148141729a4993b9bd5c596..35d45237f5fc12af7a93181097dffa4d482966fc 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 47b1274055cd3ddb05de3bd1e3e6a36df2bdcf46..0ce070412361e88667048b34b50fc3e3c24addd3 100644 (file)
@@ -21,6 +21,6 @@ CFLAGS_SL =
 endif
 
 %.so: %.o
-       $(CC) -shared -o $@ $<
+       $(CC) $(CFLAGS) -shared -o $@ $<
 
 sqlmansect = 7
index f6e57608064e0bfc0c7c165880964ee602f73f95..201dcd6f4cd7703773fb685b4166b70ba7b9afd1 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 2a23c5a8fd4b72232ce15b63d7e9182996e59639..145653860e12eedc251670bc1e2f9582e4bd243f 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 8766d18f6140cdaf76035720164a894ed60027c9..0fadd273104d51222976f35804775823de12a2ca 100644 (file)
@@ -11,6 +11,6 @@ CFLAGS_SL = -fpic
 endif
 
 %.so: %.o
-       $(CC) -shared -o $@ $<
+       $(CC) $(CFLAGS) -shared -o $@ $<
 
 sqlmansect = 7
index db33ebff78eefba8d8aa3cc4369845261468f1e1..820e33074f17541b74535bfc8153f0cd927861d5 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 24e201836e90db412ae63504d2b996d970736fc3..7c6765c65703552250e6e081439cf4240936da41 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 dac307c2e294c99e14725cda2f32257cfb10f50d..9f2bf1348c02a18a0a4220e624945ae241619593 100644 (file)
@@ -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