From 73379f0be5cea4faacaceb9ad90ebbf2c16096aa Mon Sep 17 00:00:00 2001 From: Ben Gras Date: Wed, 9 May 2012 16:45:11 +0200 Subject: [PATCH] set major version of shlibs to 0 WARNING: this will break existing dynamically linked binaries if they exist. If you have any: . re-build world statically first if necessary . remove libraries from /lib and /usr/lib . then build world This change: . avoids possible future dismay when interfacing other systems' binaries; done until they are abi-compatible Thanks to Antoine Leca for pointing this out. --- docs/UPDATING | 12 +++++++ drivers/ramdisk/proto.common.dynamic | 8 ++--- external/bsd/file/lib/shlib_version | 4 +-- .../libarchive/lib/libarchive/shlib_version | 8 ++--- external/public-domain/xz/lib/shlib_version | 4 +-- lib/libbz2/shlib_version | 7 ++-- lib/libc/compat/shlib_version | 3 -- lib/libc/shlib_version | 36 ++----------------- lib/libcompat_minix/shlib_version | 2 +- lib/libcrypt/shlib_version | 5 +-- lib/libcurses/shlib_version | 8 +---- lib/libelf/Makefile | 2 +- lib/libm/arch/i387/shlib_version | 5 +-- lib/libm/shlib_version | 5 +-- lib/libminlib/shlib_version | 2 +- lib/libprop/shlib_version | 6 ++-- lib/libpuffs/shlib_version | 5 ++- lib/librefuse/shlib_version | 4 +-- lib/libterminfo/shlib_version | 5 +-- lib/libutil/shlib_version | 7 ++-- lib/libz/shlib_version | 2 +- 21 files changed, 40 insertions(+), 100 deletions(-) diff --git a/docs/UPDATING b/docs/UPDATING index 9740f6cb5..14cbc7305 100644 --- a/docs/UPDATING +++ b/docs/UPDATING @@ -1,3 +1,15 @@ +20120510: + WARNING: the shared libraries major revision set to 0 will break + existing dynamically linked binaries if they exist. + + There are two risks. One: existing binaries won't find the current + libraries; two: linking binaries with both majors present will link + them in twice. So the previous libraries have to be removed. + + . re-build world statically first if necessary + . remove libraries from /lib and /usr/lib + . then build world + 20120416: Upgrade your clang to clang-2.9nb6 or clang-3.1nb3 to be able to build shared libraries and dynamically linked executables. The diff --git a/drivers/ramdisk/proto.common.dynamic b/drivers/ramdisk/proto.common.dynamic index 82a9fb150..302c6d02f 100644 --- a/drivers/ramdisk/proto.common.dynamic +++ b/drivers/ramdisk/proto.common.dynamic @@ -3,9 +3,9 @@ $ usr d--755 0 0 lib d--755 0 0 - libc.so.12 ---755 0 0 /lib/libc.so.12 - libminlib.so.1 ---755 0 0 /lib/libminlib.so.1 - libcompat_minix.so.1 ---755 0 0 /lib/libcompat_minix.so.1 - libterminfo.so.1 ---755 0 0 /lib/libterminfo.so.1 + libc.so.0 ---755 0 0 /lib/libc.so.0 + libminlib.so.0 ---755 0 0 /lib/libminlib.so.0 + libcompat_minix.so.0 ---755 0 0 /lib/libcompat_minix.so.0 + libterminfo.so.0 ---755 0 0 /lib/libterminfo.so.0 $ $ diff --git a/external/bsd/file/lib/shlib_version b/external/bsd/file/lib/shlib_version index 4bb484880..97c9f92d6 100644 --- a/external/bsd/file/lib/shlib_version +++ b/external/bsd/file/lib/shlib_version @@ -1,4 +1,2 @@ -# $NetBSD: shlib_version,v 1.1 2009/05/08 17:28:02 christos Exp $ -# -major=3 +major=0 minor=0 diff --git a/external/bsd/libarchive/lib/libarchive/shlib_version b/external/bsd/libarchive/lib/libarchive/shlib_version index 2a057e08f..97c9f92d6 100644 --- a/external/bsd/libarchive/lib/libarchive/shlib_version +++ b/external/bsd/libarchive/lib/libarchive/shlib_version @@ -1,6 +1,2 @@ -# $NetBSD: shlib_version,v 1.1 2010/02/20 02:55:53 joerg Exp $ -# Remember to update distrib/sets/lists/base/shl.* when changing -# - -major=3 -minor=1 +major=0 +minor=0 diff --git a/external/public-domain/xz/lib/shlib_version b/external/public-domain/xz/lib/shlib_version index 11cc2c5bd..97c9f92d6 100644 --- a/external/public-domain/xz/lib/shlib_version +++ b/external/public-domain/xz/lib/shlib_version @@ -1,4 +1,2 @@ -# $NetBSD: shlib_version,v 1.1 2010/11/02 16:34:36 joerg Exp $ -# -major=1 +major=0 minor=0 diff --git a/lib/libbz2/shlib_version b/lib/libbz2/shlib_version index 45ca00de4..97c9f92d6 100644 --- a/lib/libbz2/shlib_version +++ b/lib/libbz2/shlib_version @@ -1,5 +1,2 @@ -# $NetBSD: shlib_version,v 1.4 2008/03/19 17:10:52 bjs Exp $ -# Remember to update distrib/sets/lists/base/shl.* when changing -# -major=1 -minor=1 +major=0 +minor=0 diff --git a/lib/libc/compat/shlib_version b/lib/libc/compat/shlib_version index 5b1659f3c..97c9f92d6 100644 --- a/lib/libc/compat/shlib_version +++ b/lib/libc/compat/shlib_version @@ -1,5 +1,2 @@ -# $NetBSD: shlib_version,v 1.1 2006/03/11 21:07:18 christos Exp $ -# Remember to update distrib/sets/lists/base/shl.* when changing -# major=0 minor=0 diff --git a/lib/libc/shlib_version b/lib/libc/shlib_version index 6c0bd4676..97c9f92d6 100644 --- a/lib/libc/shlib_version +++ b/lib/libc/shlib_version @@ -1,34 +1,2 @@ -# $NetBSD: shlib_version,v 1.220 2010/12/16 18:38:06 christos Exp $ -# Remember to update distrib/sets/lists/base/shl.* when changing -# -# things we wish to do on next major version bump: -# - libc/net/rcmd.c: make __ivaliduser() and __ivaliduser_sa() static -# - libc/net: resolver update to BIND8/9? -# - md2, md4, md5, rmd160 & sha1 functions should take the same arguments AFAP -# - libc/gen/assert.c: __{diag,}assert13() -> __{diag,}assert() -# - libc/gen/times.c: remove; __times13() -> times() -# - libc/gen/timezone.c: remove; __timezone13 -> timezone -# - libc/net/getaddrinfo.c, netdb.h: remove __ai_pad0 -# - libc/gen/utmpx.c, utmpx.h: remove lastlogxname, __getlastlogx13 -> getlastlogx -# - infinity{,f,l}.c, math.h: __infinity -> __huge_val -# - libc/gen/is{inf,nan}d_ieee754.c: remove is{inf,nan} aliases -# - libc/arch/vax/gen/is{inf,nan}.c: remove -# - libc/db/hash/ndbm.c: remove; __ndbm13 -> ndbm -# - libc/net/getnet{ent,namadr}.c, netdb.h: remove __n_pad0 -# - libc/stdio: make _file an int, hide struct FILE, stdin, stdout, stderr impls -# - libc/stdio: make fpos_t larger. see BUGS section in fgetpos(3). -# probably s/fpos_t/off_t/ in __sFILE and __sseek(). it involves -# funopen(3) api change. -# - remove frexp, ldexp, modf: they belong to libm. -# - make sure we can support thread local [on arm don't use r9 for example, -# consider other risc architectures: mips, powerpc, sparc, etc] -# - rename __libc_mutex_lock and similar back to pthread_mutex_lock. -# the functions are used by third party code without prototypes. -# for example in assembler code. -# - kill sigcontext: never request version 0 or 1 signal trampoline. -# always request version 2 trampoline. (on vax, 3). -# - change _ctype_ table in ctype.h and gen/ctype_.c 8bit -> 16 or 32bit. -# it's insufficient bitwidth to implement all ctype class. -# see isblank's comment in ctype.h. -major=12 -minor=175 +major=0 +minor=0 diff --git a/lib/libcompat_minix/shlib_version b/lib/libcompat_minix/shlib_version index 1edea46de..97c9f92d6 100644 --- a/lib/libcompat_minix/shlib_version +++ b/lib/libcompat_minix/shlib_version @@ -1,2 +1,2 @@ -major=1 +major=0 minor=0 diff --git a/lib/libcrypt/shlib_version b/lib/libcrypt/shlib_version index 8cfa7b769..97c9f92d6 100644 --- a/lib/libcrypt/shlib_version +++ b/lib/libcrypt/shlib_version @@ -1,5 +1,2 @@ -# $NetBSD: shlib_version,v 1.6 2009/01/11 03:07:47 christos Exp $ -# Remember to update distrib/sets/lists/base/shl.* when changing -# -major=1 +major=0 minor=0 diff --git a/lib/libcurses/shlib_version b/lib/libcurses/shlib_version index 1c7107b66..97c9f92d6 100644 --- a/lib/libcurses/shlib_version +++ b/lib/libcurses/shlib_version @@ -1,8 +1,2 @@ -# $NetBSD: shlib_version,v 1.40 2009/01/11 03:07:47 christos Exp $ -# Remember to update distrib/sets/lists/base/shl.* when changing -# Remember to run `make fileio.h` when changing -# Remember to increment the major numbers of both libform and libmenu -# when the libcurses major number increments. -# -major=7 +major=0 minor=0 diff --git a/lib/libelf/Makefile b/lib/libelf/Makefile index c0d5a8c3a..1ee57e121 100644 --- a/lib/libelf/Makefile +++ b/lib/libelf/Makefile @@ -63,7 +63,7 @@ CFLAGS+= -I. -I${.CURDIR} SRCS+= mmap.c CFLAGS+= -DNO_MMAP_FILE -SHLIB_MAJOR= 1 +SHLIB_MAJOR= 0 WARNS?= 6 diff --git a/lib/libm/arch/i387/shlib_version b/lib/libm/arch/i387/shlib_version index f077acaaf..97c9f92d6 100644 --- a/lib/libm/arch/i387/shlib_version +++ b/lib/libm/arch/i387/shlib_version @@ -1,5 +1,2 @@ -# $NetBSD: shlib_version,v 1.2 2005/07/21 22:49:16 rpaulo Exp $ -# Remember to update distrib/sets/lists/base/md.i386 when changing -# major=0 -minor=1 +minor=0 diff --git a/lib/libm/shlib_version b/lib/libm/shlib_version index 127db4625..97c9f92d6 100644 --- a/lib/libm/shlib_version +++ b/lib/libm/shlib_version @@ -1,5 +1,2 @@ -# $NetBSD: shlib_version,v 1.11 2010/01/11 16:28:39 christos Exp $ -# Remember to update distrib/sets/lists/base/shl.* when changing -# major=0 -minor=8 +minor=0 diff --git a/lib/libminlib/shlib_version b/lib/libminlib/shlib_version index 1edea46de..97c9f92d6 100644 --- a/lib/libminlib/shlib_version +++ b/lib/libminlib/shlib_version @@ -1,2 +1,2 @@ -major=1 +major=0 minor=0 diff --git a/lib/libprop/shlib_version b/lib/libprop/shlib_version index cb5580554..97c9f92d6 100644 --- a/lib/libprop/shlib_version +++ b/lib/libprop/shlib_version @@ -1,4 +1,2 @@ -# $NetBSD: shlib_version,v 1.10 2009/10/10 18:06:54 bad Exp $ -# Remember to update distrib/sets/lists/base/shl.* when changing -major=1 -minor=1 +major=0 +minor=0 diff --git a/lib/libpuffs/shlib_version b/lib/libpuffs/shlib_version index 0647f916d..97c9f92d6 100644 --- a/lib/libpuffs/shlib_version +++ b/lib/libpuffs/shlib_version @@ -1,3 +1,2 @@ -major=1 -minor=1 - +major=0 +minor=0 diff --git a/lib/librefuse/shlib_version b/lib/librefuse/shlib_version index b82cf9365..97c9f92d6 100644 --- a/lib/librefuse/shlib_version +++ b/lib/librefuse/shlib_version @@ -1,4 +1,2 @@ -# $NetBSD: shlib_version,v 1.3 2010/05/21 10:53:41 pooka Exp $ -# -major=2 +major=0 minor=0 diff --git a/lib/libterminfo/shlib_version b/lib/libterminfo/shlib_version index 9592ee5d8..97c9f92d6 100644 --- a/lib/libterminfo/shlib_version +++ b/lib/libterminfo/shlib_version @@ -1,5 +1,2 @@ -# $NetBSD: shlib_version,v 1.1 2010/02/03 15:16:32 roy Exp $ -# Remember to update distrib/sets/lists/base/shl.* when changing -# -major=1 +major=0 minor=0 diff --git a/lib/libutil/shlib_version b/lib/libutil/shlib_version index 0edfc77fe..97c9f92d6 100644 --- a/lib/libutil/shlib_version +++ b/lib/libutil/shlib_version @@ -1,5 +1,2 @@ -# $NetBSD: shlib_version,v 1.47 2009/05/13 02:50:32 pgoyette Exp $ -# Remember to update distrib/sets/lists/base/shl.* when changing -# -major=7 -minor=17 +major=0 +minor=0 diff --git a/lib/libz/shlib_version b/lib/libz/shlib_version index 1edea46de..97c9f92d6 100644 --- a/lib/libz/shlib_version +++ b/lib/libz/shlib_version @@ -1,2 +1,2 @@ -major=1 +major=0 minor=0 -- 2.44.0