diff mbox

[committed] Fix libffi/70024

Message ID yddk2ljrhci.fsf@lokon.CeBiTec.Uni-Bielefeld.DE
State New
Headers show

Commit Message

Rainer Orth March 3, 2016, 10:22 a.m. UTC
Hi Richard,

> As discussed in the PR, let's take the opportunity while bumping the soname
> to add symbol versioning.

great idea: I'd already suggested this back in 2010 when doing the bulk
of the Solaris symbol versioning work

	http://gcc.gnu.org/ml/gcc/2010-02/msg00339.html
	http://sourceware.org/ml/libffi-discuss/2010/msg00045.html

but there never was a conclusion on the questions I'd raised.

> Versioning is complicated by the fact that there are several pieces of API
> that are "optional" based on the target.  If these optional pieces are
> later implemented by targets that currently do not, we can't have these
> extra symbols suddenly appear in the base version -- that voids the promise
> that symbol versioning makes.
>
> So the symbols are split among 4 different versions.  Each version's set of
> symbols is either entirely present[*] or entirely absent.  Programs using
> the library will only depend on the subset of versions that they use.
>
> Tested on {x86_64,ppc64,aarch64}-linux.  Compile tested on mips64el-linux,
> which doesn't implement go closures or complex types.

Unfortunately, the patch broke Solaris bootstrap:

make[2]: Entering directory '/var/gcc/regression/trunk/12-gcc/build/i386-pc-solaris2.12/libffi'
Makefile:1906: *** missing separator (did you mean TAB instead of 8 spaces?).  Stop.

Fixed as obvious like this, will commit shortly:

2016-03-03  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	* Makefile.am (libffi.map-sun): Tabify:
	* Makefile.in: Regenerate.
Unfortunately, even with this fixed, all Solaris/x86 tests now fail to
link:

FAIL: libffi.call/closure_fn0.c -W -Wall -Wno-psabi -O0 (test for excess errors)
Excess errors:
Undefined                       first referenced
 symbol                             in file
ffi_closure_alloc                   /var/tmp//ccIpq3qc.o
ffi_type_float                      /var/tmp//ccIpq3qc.o
ffi_type_uint64                     /var/tmp//ccIpq3qc.o
ffi_type_sint32                     /var/tmp//ccIpq3qc.o
ffi_type_sint16                     /var/tmp//ccIpq3qc.o
ffi_type_double                     /var/tmp//ccIpq3qc.o
ffi_prep_cif                        /var/tmp//ccIpq3qc.o
ld: fatal: symbol referencing errors

> For gcc7, we really should pull out these m4 macros to new config/ files.
> I didn't really want to touch anything except libffi for now.

Great idea: I'd meant to do this for a long time, but never got around
to it.

	Rainer
diff mbox

Patch

# HG changeset patch
# Parent  3195cd69f93aa48e3c342ea80e6f2660e30f33da
Tabify libffi/Makefile.am

diff --git a/libffi/Makefile.am b/libffi/Makefile.am
--- a/libffi/Makefile.am
+++ b/libffi/Makefile.am
@@ -214,11 +214,11 @@  libffi_version_script = -Wl,-M,libffi.ma
 libffi_version_dep = libffi.map-sun
 libffi.map-sun : libffi.map $(top_srcdir)/../contrib/make_sunver.pl \
                 $(libffi_la_OBJECTS) $(libffi_la_LIBADD)
-        perl $(top_srcdir)/../contrib/make_sunver.pl libffi.map \
-          $(libffi_la_OBJECTS:%.lo=.libs/%.o) \
-         `echo $(libffi_la_LIBADD) | \
-            sed 's,\([^/        ]*\)\.l\([ao]\),.libs/\1.\2,g'` \
-         > $@ || (rm -f $@ ; exit 1)
+	perl $(top_srcdir)/../contrib/make_sunver.pl libffi.map \
+	  $(libffi_la_OBJECTS:%.lo=.libs/%.o) \
+	 `echo $(libffi_la_LIBADD) | \
+	    sed 's,\([^/        ]*\)\.l\([ao]\),.libs/\1.\2,g'` \
+	 > $@ || (rm -f $@ ; exit 1)
 endif
 else
 libffi_version_script =