On m68k-linux and parisc-linux between 3.3 and 3.4 the default exception model changed from sjlj based exceptions to dw2 based exceptions. Unfortunately at this time the soversion number of the shared libgcc was not bumped. This patch bumps the version number for these two archs to 2, if not configured with --enable-sjlj-exceptions and keeps the 1 for sjlj enabled builds. It may be better to avoid the soversion 1 altogether as we don't know the exception model used to build the library and use different soversion numbers for the two variants or encode the exception model into the library name.
I didn't look at other architectures, if the distinction is needed as well. at least for linux, arm still uses sjlj based exceptions, and the patch will be needed at some point in the future as well. Matthias 2004-02-15 Matthias Klose <[EMAIL PROTECTED]> * config.gcc: m68k-linux, parisc-linux: when not configured to use sjlj exceptions, include t-make fragments to bump the libgcc soversion number. * config/t-slibgcc-elf-ver: Define SHLIB_NAME and SHLIB_SONAME in terms of SHLIB_SOVERSION. * config/m68k/t-slibgcc-elf-ver: Bump shlib soversion number. * config/pa/t-slibgcc-elf-ver: Likewise. diff -urN --exclude=CVS gcc/config/m68k/t-slibgcc-elf-ver gcc/config/m68k/t-slibgcc-elf-ver --- gcc/config/m68k/t-slibgcc-elf-ver 1970-01-01 01:00:00.000000000 +0100 +++ gcc/config/m68k/t-slibgcc-elf-ver 2004-02-15 11:26:14.000000000 +0100 @@ -0,0 +1,3 @@ +# Bump the version number of the shared libgcc library + +SHLIB_SOVERSION = 2 diff -urN --exclude=CVS gcc/config/pa/t-slibgcc-elf-ver gcc/config/pa/t-slibgcc-elf-ver --- gcc/config/pa/t-slibgcc-elf-ver 1970-01-01 01:00:00.000000000 +0100 +++ gcc/config/pa/t-slibgcc-elf-ver 2004-02-15 11:26:14.000000000 +0100 @@ -0,0 +1,3 @@ +# Bump the version number of the shared libgcc library + +SHLIB_SOVERSION = 2 diff -urN --exclude=CVS gcc/config/t-slibgcc-elf-ver gcc/config/t-slibgcc-elf-ver --- gcc/config/t-slibgcc-elf-ver 2003-08-12 08:10:32.000000000 +0200 +++ gcc/config/t-slibgcc-elf-ver 2004-02-15 11:26:02.000000000 +0100 @@ -3,8 +3,9 @@ SHLIB_EXT = .so SHLIB_SOLINK = @[EMAIL PROTECTED] -SHLIB_SONAME = @[EMAIL PROTECTED] -SHLIB_NAME = @shlib_dir@@[EMAIL PROTECTED] +SHLIB_SOVERSION = 1 +SHLIB_SONAME = @[EMAIL PROTECTED](SHLIB_SOVERSION) +SHLIB_NAME = @shlib_dir@@[EMAIL PROTECTED](SHLIB_SOVERSION) SHLIB_MAP = @shlib_map_file@ SHLIB_OBJS = @shlib_objs@ SHLIB_SLIBDIR_QUAL = @shlib_slibdir_qual@ diff -urN --exclude=CVS gcc/config.gcc gcc/config.gcc --- gcc/config.gcc 2004-01-26 08:44:25.000000000 +0100 +++ gcc/config.gcc 2004-02-15 11:57:33.000000000 +0100 @@ -769,6 +769,11 @@ tm_file="${tm_file} dbxelf.h elfos.h svr4.h linux.h pa/pa-linux.h \ pa/pa32-regs.h pa/pa32-linux.h" tmake_file="t-slibgcc-elf-ver t-linux pa/t-linux" + # if not configured with --enable-sjlj-exceptions, bump the + # libgcc version number + if test x$sjlj != x1; then + tmake_file="$tmake_file pa/t-slibgcc-elf-ver" + fi ;; # port not yet contributed. #hppa*-*-openbsd*) @@ -1424,6 +1435,11 @@ tm_file="m68k/m68k.h dbxelf.h elfos.h svr4.h linux.h m68k/linux.h" tm_defines="MOTOROLA USE_GAS" tmake_file="t-slibgcc-elf-ver t-linux" + # if not configured with --enable-sjlj-exceptions, bump the + # libgcc version number + if test x$sjlj != x1; then + tmake_file="$tmake_file m68k/t-slibgcc-elf-ver" + fi ;; m68k-*-rtems*) tmake_file="m68k/t-m68kbare m68k/t-crtstuff t-rtems m68k/t-rtems"