diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 13:44:03 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 13:44:03 +0000 |
commit | 293913568e6a7a86fd1479e1cff8e2ecb58d6568 (patch) | |
tree | fc3b469a3ec5ab71b36ea97cc7aaddb838423a0c /src/makefiles/Makefile.aix | |
parent | Initial commit. (diff) | |
download | postgresql-16-293913568e6a7a86fd1479e1cff8e2ecb58d6568.tar.xz postgresql-16-293913568e6a7a86fd1479e1cff8e2ecb58d6568.zip |
Adding upstream version 16.2.upstream/16.2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/makefiles/Makefile.aix')
-rw-r--r-- | src/makefiles/Makefile.aix | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/src/makefiles/Makefile.aix b/src/makefiles/Makefile.aix new file mode 100644 index 0000000..dd16a7a --- /dev/null +++ b/src/makefiles/Makefile.aix @@ -0,0 +1,39 @@ +# MAKE_EXPORTS is required for svr4 loaders that want a file of +# symbol names to tell them what to export/import. +MAKE_EXPORTS= true + +# -blibpath must contain ALL directories where we should look for libraries +libpath := $(shell echo $(subst -L,:,$(filter -L/%,$(LDFLAGS))) | sed -e's/ //g'):/usr/lib:/lib + +# when building with gcc, need to make sure that libgcc can be found +ifeq ($(GCC), yes) +libpath := $(libpath):$(dir $(shell gcc -print-libgcc-file-name)) +endif + +rpath = -Wl,-blibpath:'$(rpathdir)$(libpath)' + +LDFLAGS_SL += -Wl,-bnoentry -Wl,-H512 -Wl,-bM:SRE + +# gcc needs to know it's building a shared lib, otherwise it'll not emit +# correct code / link to the right support libraries +ifeq ($(GCC), yes) +LDFLAGS_SL += -shared +endif + +# env var name to use in place of LD_LIBRARY_PATH +ld_library_path_var = LIBPATH + + +POSTGRES_IMP= postgres.imp + +ifdef PGXS +BE_DLLLIBS= -Wl,-bI:$(pkglibdir)/$(POSTGRES_IMP) +else +BE_DLLLIBS= -Wl,-bI:$(top_builddir)/src/backend/$(POSTGRES_IMP) +endif + +MKLDEXPORT_DIR=src/backend/port/aix +MKLDEXPORT=$(top_srcdir)/$(MKLDEXPORT_DIR)/mkldexport.sh + +%$(DLSUFFIX): %.o + $(CC) $(CFLAGS) $*.o $(LDFLAGS) $(LDFLAGS_SL) -o $@ $(BE_DLLLIBS) |