Commit a3578c13 authored by Peter Eisentraut's avatar Peter Eisentraut

Separate -Wl,-E or equivalent into separate make variable, since it's only

necessary for the postgres/postmaster link, not every link.
parent 450b6213
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
# #
# Copyright (c) 1994, Regents of the University of California # Copyright (c) 1994, Regents of the University of California
# #
# $Header: /cvsroot/pgsql/src/backend/Makefile,v 1.65 2000/09/17 13:02:30 petere Exp $ # $Header: /cvsroot/pgsql/src/backend/Makefile,v 1.66 2000/10/07 18:43:22 petere Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
...@@ -37,7 +37,7 @@ all: postgres $(POSTGRES_IMP) ...@@ -37,7 +37,7 @@ all: postgres $(POSTGRES_IMP)
ifneq ($(PORTNAME), win) ifneq ($(PORTNAME), win)
postgres: $(OBJS) postgres: $(OBJS)
$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) $(export_dynamic)
else # win else # win
...@@ -192,7 +192,7 @@ maintainer-clean: distclean ...@@ -192,7 +192,7 @@ maintainer-clean: distclean
# are up to date. It saves the time of doing all the submakes. # are up to date. It saves the time of doing all the submakes.
.PHONY: quick .PHONY: quick
quick: $(OBJS) quick: $(OBJS)
$(CC) -o postgres $(OBJS) $(LDFLAGS) $(CC) -o postgres $(OBJS) $(LDFLAGS) $(export_dynamic)
depend dep: $(top_srcdir)/src/include/parser/parse.h $(top_builddir)/src/include/utils/fmgroids.h depend dep: $(top_srcdir)/src/include/parser/parse.h $(top_builddir)/src/include/utils/fmgroids.h
for i in $(DIRS); do $(MAKE) -C $$i $@; done for i in $(DIRS); do $(MAKE) -C $$i $@; done
MK_NO_LORDER=true MK_NO_LORDER=true
ifdef ELF_SYSTEM ifdef ELF_SYSTEM
LDFLAGS += -Wl,-E export_dynamic = -Wl,-E
CPPFLAGS+= -I$(top_srcdir)/src/backend/port/beos CPPFLAGS+= -I$(top_srcdir)/src/backend/port/beos
endif endif
%.so: %.o %.so: %.o
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# if we defined .so in template/bsdi_4.0 # if we defined .so in template/bsdi_4.0
ifeq ($(DLSUFFIX), .so) ifeq ($(DLSUFFIX), .so)
LDFLAGS+= -export-dynamic export_dynamic = -export-dynamic
endif endif
%.so: %.o %.so: %.o
......
ifdef ELF_SYSTEM ifdef ELF_SYSTEM
LDFLAGS+= -export-dynamic export_dynamic = -export-dynamic
endif endif
%.so: %.o %.so: %.o
......
...@@ -23,7 +23,8 @@ endif ...@@ -23,7 +23,8 @@ endif
# so that the executables don't need SHLIB_PATH to be set, specify -z # so that the executables don't need SHLIB_PATH to be set, specify -z
# to catch null pointer dereferences, and specify -E to make all symbols # to catch null pointer dereferences, and specify -E to make all symbols
# visible to dynamically linked shared libraries. # visible to dynamically linked shared libraries.
LDFLAGS+= -Wl,+b -Wl,$(libdir) -Wl,-z -Wl,-E LDFLAGS+= -Wl,+b -Wl,$(libdir) -Wl,-z
export_dynamic = -Wl,-E
# Rule for building shared libs (currently used only for regression test # Rule for building shared libs (currently used only for regression test
# shlib ... should go away, since this is not really enough knowledge) # shlib ... should go away, since this is not really enough knowledge)
......
LDFLAGS+= -export-dynamic export_dynamic = -export-dynamic
MK_NO_LORDER= true MK_NO_LORDER= true
%.so: %.o %.so: %.o
......
ifdef ELF_SYSTEM ifdef ELF_SYSTEM
LDFLAGS += -Wl,-E export_dynamic = -Wl,-E
endif endif
%.so: %.o %.so: %.o
ifdef ELF_SYSTEM ifdef ELF_SYSTEM
......
ifdef ELF_SYSTEM ifdef ELF_SYSTEM
LDFLAGS += -Wl,-E export_dynamic = -Wl,-E
endif endif
%.so: %.o %.so: %.o
ifdef ELF_SYSTEM ifdef ELF_SYSTEM
......
CFLAGS += -dy CFLAGS += -dy
LDFLAGS += -W l,-Bexport export_dynamic = -W l,-Bexport
%.so: %.o %.so: %.o
$(LD) -G -Bdynamic -o $@ $< $(LD) -G -Bdynamic -o $@ $<
LDFLAGS+= -lc89 -Wl,-Bexport LDFLAGS+= -lc89
export_dynamic = -Wl,-Bexport
%.so: %.o %.so: %.o
$(LD) -G -Bdynamic -o $@ $< $(LD) -G -Bdynamic -o $@ $<
......
LDFLAGS+= -Wl,-Bexport export_dynamic = -Wl,-Bexport
%.so: %.o %.so: %.o
$(LD) -G -Bdynamic -o $@ $< $(LD) -G -Bdynamic -o $@ $<
......
...@@ -7,7 +7,7 @@ if test "$GCC" = yes ; then ...@@ -7,7 +7,7 @@ if test "$GCC" = yes ; then
DL_LIB=/usr/lib/libdld.sl DL_LIB=/usr/lib/libdld.sl
CCC=g++ CCC=g++
else else
CFLAGS='-Wl,-E -Ae' CFLAGS=-Ae
SHARED_LIB=+z SHARED_LIB=+z
CPP='cc -E -Ae' CPP='cc -E -Ae'
CCC=aCC CCC=aCC
......
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