Commit Graph

99 Commits

Author SHA1 Message Date
Tom Lane 6d4bcda38c Fix out-of-order inclusion of -L switches from LDFLAGS on AIX and HPUX.
Per example from Dirk Pirschel.
2005-12-03 20:16:31 +00:00
Tom Lane a7de22d8d5 Clean up AIX build to avoid 'duplicate symbol' warnings, by moving use
of postgres.imp file into BE_DLLLIBS macro.  This makes the AIX build
work more like the Windows and Darwin builds, which have similar requirements
to mention a backend library when linking shared libraries that will be
dynamically loaded into the backend.
2005-10-28 17:32:22 +00:00
Tom Lane be27a20123 Cygwin no longer needs to hack SHLIB_LINK, now that Rocco Altier
fixed the contrib library inclusions properly.
2005-08-08 03:35:13 +00:00
Tom Lane 89439b8c4f Set shlib naming convention on Cygwin to 'cygFOO.dll', which appears
to be the platform standard.  This should fix recursive-rule breakage
due to recent Makefile changes.  Per discussion.
2005-08-07 19:02:08 +00:00
Tom Lane 0016911b5d Fix unwanted side-effects of recent SHLIB_LINK -L patch on existing
hacking of SHLIB_LINK for HPUX.
2005-07-13 17:00:44 +00:00
Bruce Momjian 5bced8f5cb Move -L flag around for shared builds:
I wrote:
> So either we code up some intelligence to put the "C" in the right
> position or we have to pass down "A B" and "D" separately from the
> main makefile.

The following patch might just do the former.  Please try it out.


Peter E.
2005-07-13 02:11:57 +00:00
Tom Lane b4363b7733 Hack around the discrepancy between default library search paths for
gcc and for HP's ld on HPUX.  There may be better ways to do this,
but this seems to work for me...
2005-07-12 23:06:48 +00:00
Bruce Momjian 7504f0bae8 Reverse this patch:
---------------------------------------------------------------------------

> A quick look shows that when you use --with-libraries=/foo/bar the
> generated link line for libraries says
>
>  -L/foo/bar -lpq
>
> and it should probably be the other way around (as it is for the
> executables).
>
> So I suspect we need some makefile tuning.

You were correct. This patch fixes it.

Jim C. Nasby
2005-07-04 04:17:00 +00:00
Bruce Momjian 16661d60ab > A quick look shows that when you use --with-libraries=/foo/bar the
> generated link line for libraries says
>
>  -L/foo/bar -lpq
>
> and it should probably be the other way around (as it is for the
> executables).
>
> So I suspect we need some makefile tuning.

You were correct. This patch fixes it.

Jim C. Nasby
2005-07-02 23:28:22 +00:00
Tom Lane a34d76ef65 Fix up makefile dependencies for pg_config_paths.h. 2004-11-20 21:13:06 +00:00
Tom Lane 8e57975219 Clean up rpath handling for HPUX --- we can't use the cc-style rpath
switch syntax when calling ld directly.
2004-11-19 21:27:42 +00:00
Tom Lane 86b5545260 Adjust SHLIB_LINK for cygwin case.
Reini Urban
2004-11-17 17:08:15 +00:00
Tom Lane bb85f1b9b1 Suppress duplicate rules for lib$(NAME).a on WIN32 and Cygwin.
Andrew Dunstan
2004-11-16 21:51:13 +00:00
Bruce Momjian c7add816f5 Export only required symbols in libpq on Win32.
Magnus Hagander
2004-10-16 03:26:43 +00:00
Bruce Momjian 4d94e99b90 > This lets you do something like:
>
>    ./configure LDFLAGS=-static-libgcc LDFLAGS_SL=-static-libgcc
>
> to produce binaries that do not depend on libgcc_s.so at all.

Oliver Jowett
2004-10-15 05:11:00 +00:00
Bruce Momjian 4855d7ebe4 Allow compiles for Cygwin /contrib modules.
Reini Urban
2004-10-13 10:20:04 +00:00
Bruce Momjian ae1703d897 Enable static lib builds on Win32 and Cygwin. 2004-10-13 09:51:47 +00:00
Bruce Momjian bac78bbac6 Update Cygwin build to not use DLLINIT, per Cygwin report from Reini
Urban
2004-10-12 22:20:17 +00:00
Neil Conway 0b112045b7 Fix vpath build break, induced by Bruce's recent commit. 2004-10-12 04:48:36 +00:00
Bruce Momjian 29e7dc420a Add some pg_config_path.h dependencies for places that include
pg_config_paths.h outside of /src/port.
2004-10-12 01:04:11 +00:00
Tom Lane 79a831e50a Tweak HPUX shared-library build flags, per Shinji Teragaito. 2004-10-08 04:22:59 +00:00
Tom Lane 346900e83b Fix shared library linking operations to work properly on all (or at
least more) combinations of HP-UX hardware, compiler, and linker.
Shinji Teragaito and Tom Lane.
2004-09-02 23:06:43 +00:00
Tom Lane 9df3086972 Cause libpq and ecpg libraries to be built as proper shared libraries
(.dylib format) on Mac OS X, while not messing up loadable modules for
the backend (which are the same kind of animal as a shared library on
every other platform, but not here).  Also get the naming convention
to match OS X practice, viz libFOO.version.so not libFOO.so.version.
In support of that last, refactor code in Makefile.shlib to make it
easier to have platform-specific shlib naming conventions.
This patch is loosely based on the Fink project's current postgresql.patch.
Tested by yours truly on OS X 10.3.4; does anyone have 10.2.* to check
it on?
2004-07-13 00:06:46 +00:00
Bruce Momjian 14531e0c44 Rename irix5 port to irix. 2004-05-19 21:37:43 +00:00
Bruce Momjian 0a54441cbf Here's a patch that will allow external modules like pl<lang> to set
additional flags for the dlltool and dllwrap commands. More info here:

	http://archives.postgresql.org/pgsql-hackers/2004-05/msg00350.php

Thomas Hallgren
2004-05-12 21:56:27 +00:00
Bruce Momjian c217b36e17 Win32 patch for Makefile.shlib
Claudio Natoli
2003-12-01 22:23:06 +00:00
PostgreSQL Daemon 969685ad44 $Header: -> $PostgreSQL Changes ... 2003-11-29 19:52:15 +00:00
Tom Lane 41e6e36719 When building shared libraries on HPUX with gcc, forcibly include -lgcc
to ensure any needed compiler support routines are included.  This is
arguably appropriate on *every* gcc platform, but for the moment I'll take
the conservative approach of only doing it on a platform where it's
provably useful.  Per complaint from Heiko Lehmann, 13-Feb-03, as well
as personal experience --- contrib/pgstattuple has never worked for me,
but it does now.
2003-10-20 01:34:33 +00:00
Tom Lane cd75f94daf Adjust Darwin build to use the default 'two level namespace' linking
method.  Fix a number of places where shared libraries were linked without
mentioning all the libraries they depend on; the Darwin and AIX ports
are known to require this, and it doesn't seem to hurt any other supported
platforms.  (Hence, remove code in pl/tcl makefile that tried to avoid
mentioning other libs if not needed.)
2003-09-27 19:35:32 +00:00
Tom Lane 58ad65ec2d Apply ranlib(1) after installing a static (.a) library on Darwin.
Per past complaints --- verified to still be a problem on OS X 10.2.6.
2003-09-20 21:26:20 +00:00
Bruce Momjian efebe2605e Since I haven't gotten a reply, can someone REVERT the lines in
src/Makefile.shlib that adds $(libdir)/$(soname) for
port,eq,unixware to $(soname)?

Larry Rosenman
2003-09-14 13:33:08 +00:00
Bruce Momjian 0f310ee703 Here is a patch to make PostgreSQL use a full path in DT_SONAME for
UnixWare.

Larry Rosenman
2003-09-10 03:56:33 +00:00
Peter Eisentraut 1a7f4ed525 Make "win" a separate port from "cygwin". This means you can now
configure under native Windows (MinGW that is), but you won't get very far
compiling yet.  The dynaloader files are from Jan Wieck's patch set.
2003-03-21 17:18:34 +00:00
Tom Lane 43057c7a27 Cause symlinks for shared-library versioning to run in the standard
direction on HP-UX; our former approach has been obsolete since HPUX 9.

Giles Lean
2003-01-11 17:22:19 +00:00
Bruce Momjian 33a6b67b51 > > > > and mb conversions (pg_ascii2mic and pg_mic2ascii not
> > > > found in the postmaster and not included from elsewhere)
> >
> > shared libs on AIX need to be able to resolve all symbols at linkage time.
> > Those two symbols are in backend/utils/SUBSYS.o but not in the postgres
> > executable.
>
> They are defined in backend/utils/mb/conv.c and declared in
> include/mb/pg_wchar.h.  They're also linked into the
> postmaster.  I don't see anything unusual.

Attached is a patch to fix the mb linking problems on AIX. As a nice side effect

it reduces the duplicate symbol warnings to linking libpq.so and libecpg.so
(all shlibs that are not postmaster loadable modules).

Please apply to current (only affects AIX).

The _LARGE_FILES problem is unfortunately still open, unless Peter
has fixed it per his recent idea.

Zeugswetter Andreas SB SD
2002-10-09 16:21:54 +00:00
Peter Eisentraut 337da0678a Assorted fixes for Cygwin:
Eliminate the mysterious games that the Cygwin build plays with the linker
flag variables.  DLLLIBS is gone, use SHLIB_LINK like everyone else.
Detect cygipc in configure, after the linker flags are set up, otherwise
configure might not work at all.

Make sure everything is covered by make clean.

Fix the build of the new conversion procedure modules.

Add new DLLIMPORT markers where required.

Finally, the compiler complains if we use an explicit
-I/usr/local/include, so don't do that.  Curiously, -L/usr/local/lib is
still necessary.
2002-09-05 18:28:46 +00:00
Peter Eisentraut e43ecb3d1a Remove leftovers from subproject removals. Fixes for Python and Kerberos
configuration.
2002-09-04 22:54:18 +00:00
Tom Lane 07c67187bf Avoid multiple scans of utils/mb/conversion_procs/ subdirectories during
'make install'; there are enough of 'em that this slowed down the make
noticeably.  Ensure that 'all' is the default make target in all these
directories (defaulting to 'make install' is surprising and dangerous
IMHO).  Fix a couple small typos.
2002-09-04 15:45:50 +00:00
Bruce Momjian 738d13833e AIX shlib fix for building libpq.so from Tomoyuki Niijima 2002-09-03 17:17:24 +00:00
Peter Eisentraut b0c3c48eb3 Assemble portability modules into libpgport library.
Some makefile simplifications.
2002-07-27 20:10:05 +00:00
Bruce Momjian 3cbb9eb265 Move few remaining src/utils files to backend/port so everything is in
one place.  Everything may be moved to src/utils eventually.

Add DLLINIT variable to simplify makfiles.
2002-07-16 05:46:36 +00:00
Peter Eisentraut 2f2d05763d Change PL/Tcl build to use configured compiler and Makefile.shlib
system, not Tcl-provided one.

Make sure export file, if any, is cleaned.

Tcl configuration is now read directly in configure and recorded in
Makefile.global.  This eliminates some duplicate efforts and allows
for easier hand-editing of the results, if necessary.
2002-05-24 18:10:17 +00:00
Peter Eisentraut 563673e15d Add make install-strip target. 2002-04-10 16:45:25 +00:00
Bruce Momjian 4552ddd535 Fix for compiling libpq++ on Solaris with Sun SPRO6U2.
Denis A Ustimenko
2001-11-11 19:20:53 +00:00
Peter Eisentraut c3291aed20 Fix shared library builds for MacOS X. 2001-10-05 21:15:38 +00:00
Peter Eisentraut 364a7ebe26 Provide some initial support for building the ODBC driver for
an already installed iODBC or unixODBC driver manager.  In particular,
use the include files provided by the driver manager over our own,
and use the odbcinst library of the driver manager rather than gpps.c.

Migrate portability sections common to several files into psqlodbc.h.
2001-09-22 22:54:33 +00:00
Peter Eisentraut 3278314847 Use gcc -shared rather than gcc -G for shared library linking on Solaris.
suggested by Bob Deblier (bob@virtualunlimited.com)
2001-09-11 23:20:41 +00:00
Peter Eisentraut 90e2663313 Shared libraries should not be linked explicitly against -lc on FreeBSD
(see http://mail.gnu.org/pipermail/libtool/2000-July/001824.html).  But
apparently it should still be present with -Bsymbolic.
2001-06-20 20:25:11 +00:00
Peter Eisentraut f7bfb5518d Shared library and GCC support for SCO OpenServer. 2001-05-07 20:43:28 +00:00
Tom Lane 382a429d84 Add LDFLAGS_SL to AIX shlib building command, per report from
Rocco Altier <roccoa@routescape.com>.
2001-04-15 03:25:07 +00:00