Re: [HACKERS] Re: [PATCHES] Fix for ODBC close - Mailing list pgsql-odbc
From | Bruce Momjian |
---|---|
Subject | Re: [HACKERS] Re: [PATCHES] Fix for ODBC close |
Date | |
Msg-id | 200102101717.MAA04632@candle.pha.pa.us Whole thread Raw |
In response to | Re: [HACKERS] Re: [PATCHES] Fix for ODBC close (Bruce Momjian <pgman@candle.pha.pa.us>) |
List | pgsql-odbc |
> > -Bsymbolic requires all symbols in the library to be resolvable at link > > time. If you use 'ld' then you will need to provide all the appropriate > > files yourself. The compiler driver normally does that automatically. > > > > Great. I see you modified Makefile.bsdi to properly know it is being > used with gcc, and modified Makefile.shlib. Perfect. > > Should other platforms have this fix too? We didn't need it before > -Bsymbolic, but it seems it would be safe to do for FreeBSD and a few > others. I have applied the following patch for OpenBSD and FreeBSD. They have the same -Bsymbolic handling and same use of LD for linking. I made the duplicate changes Peter made for BSDI. Can anyone commend on the use of 'ld -x' to delete all local symbols? FreeBSD and OpenBSD have it, while BSD/OS does not. I added it to BSDi, and it seems to work fine. Actually, it seems NetBSD already had all these fixes. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026 Index: src/Makefile.shlib =================================================================== RCS file: /home/projects/pgsql/cvsroot/pgsql/src/Makefile.shlib,v retrieving revision 1.41 diff -c -r1.41 Makefile.shlib *** src/Makefile.shlib 2001/02/10 16:51:39 1.41 --- src/Makefile.shlib 2001/02/10 17:16:06 *************** *** 112,118 **** ifeq ($(PORTNAME), openbsd) shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION) ifdef ELF_SYSTEM ! LINK.shared = $(LD) -x -Bshareable -soname $(soname) else LINK.shared = $(LD) -x -Bshareable -Bforcearchive endif --- 112,119 ---- ifeq ($(PORTNAME), openbsd) shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION) ifdef ELF_SYSTEM ! LINK.shared = $(COMPILER) -shared -Wl,-x,-soname,$(soname) ! SHLIB_LINK += -lc else LINK.shared = $(LD) -x -Bshareable -Bforcearchive endif *************** *** 121,127 **** ifeq ($(PORTNAME), bsdi) shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION) ifeq ($(DLSUFFIX), .so) ! LINK.shared = $(COMPILER) -shared -Wl,-soname,$(soname) SHLIB_LINK += -lc endif ifeq ($(DLSUFFIX), .o) --- 122,128 ---- ifeq ($(PORTNAME), bsdi) shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION) ifeq ($(DLSUFFIX), .so) ! LINK.shared = $(COMPILER) -shared -Wl,-x,-soname,$(soname) SHLIB_LINK += -lc endif ifeq ($(DLSUFFIX), .o) *************** *** 132,138 **** ifeq ($(PORTNAME), freebsd) ifdef ELF_SYSTEM shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION) ! LINK.shared = $(LD) -x -shared -soname $(soname) else shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION) LINK.shared = $(LD) -x -Bshareable -Bforcearchive --- 133,140 ---- ifeq ($(PORTNAME), freebsd) ifdef ELF_SYSTEM shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION) ! LINK.shared = $(COMPILER) -shared -Wl,-x,-soname,$(soname) ! SHLIB_LINK += -lc else shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION) LINK.shared = $(LD) -x -Bshareable -Bforcearchive *************** *** 142,148 **** ifeq ($(PORTNAME), netbsd) shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION) ifdef ELF_SYSTEM ! LINK.shared = $(COMPILER) -shared -Wl,-soname,$(soname) else LINK.shared = $(LD) -x -Bshareable -Bforcearchive endif --- 144,150 ---- ifeq ($(PORTNAME), netbsd) shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION) ifdef ELF_SYSTEM ! LINK.shared = $(COMPILER) -shared -Wl,-x,-soname,$(soname) else LINK.shared = $(LD) -x -Bshareable -Bforcearchive endif Index: src/makefiles/Makefile.freebsd =================================================================== RCS file: /home/projects/pgsql/cvsroot/pgsql/src/makefiles/Makefile.freebsd,v retrieving revision 1.13 diff -c -r1.13 Makefile.freebsd *** src/makefiles/Makefile.freebsd 2000/12/16 18:14:25 1.13 --- src/makefiles/Makefile.freebsd 2001/02/10 17:16:07 *************** *** 3,9 **** ifdef ELF_SYSTEM export_dynamic = -export-dynamic rpath = -R$(libdir) ! shlib_symbolic = -Bsymbolic endif DLSUFFIX = .so --- 3,9 ---- ifdef ELF_SYSTEM export_dynamic = -export-dynamic rpath = -R$(libdir) ! shlib_symbolic = -Wl,-Bsymbolic endif DLSUFFIX = .so Index: src/makefiles/Makefile.openbsd =================================================================== RCS file: /home/projects/pgsql/cvsroot/pgsql/src/makefiles/Makefile.openbsd,v retrieving revision 1.6 diff -c -r1.6 Makefile.openbsd *** src/makefiles/Makefile.openbsd 2000/12/16 18:14:25 1.6 --- src/makefiles/Makefile.openbsd 2001/02/10 17:16:07 *************** *** 3,9 **** ifdef ELF_SYSTEM export_dynamic = -Wl,-E rpath = -R$(libdir) ! shlib_symbolic = -Bsymbolic endif DLSUFFIX = .so --- 3,9 ---- ifdef ELF_SYSTEM export_dynamic = -Wl,-E rpath = -R$(libdir) ! shlib_symbolic = -Wl,-Bsymbolic endif DLSUFFIX = .so
pgsql-odbc by date: