This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [committed] Fix libffi/70024
- From: Rainer Orth <ro at CeBiTec dot Uni-Bielefeld dot DE>
- To: Richard Henderson <rth at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 03 Mar 2016 14:35:32 +0100
- Subject: Re: [committed] Fix libffi/70024
- Authentication-results: sourceware.org; auth=none
- References: <56D79DD0 dot 309 at redhat dot com> <yddk2ljrhci dot fsf at lokon dot CeBiTec dot Uni-Bielefeld dot DE>
Hi Richard,
> 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
turned out to be easy, too: make_sunver.pl got passed a list of
non-existant object files:
.libs/src/prep_cif.o .libs/src/types.o .libs/src/raw_api.o .libs/src/java_raw_api.o .libs/src/closures.o
Treating $(libffi_la_OBJECTS) and $(libffi_la_LIBADD) the same fixed
this so all the symbols above got included in libffi.map-sun and all
tests pass.
Tested on i386-pc-solaris2.12, installed on mainline.
Rainer
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University
2016-03-03 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* Makefile.am (libffi.map-sun): Properly convert
$(libffi_la_OBJECTS) to object names.
* Makefile.in: Regenerate.
# HG changeset patch
# Parent ce4aa09ea32c03f4d0ad44415ce066a861bda6c3
Fix passing object names to make_sunver.pl
diff --git a/libffi/Makefile.am b/libffi/Makefile.am
--- a/libffi/Makefile.am
+++ b/libffi/Makefile.am
@@ -215,8 +215,7 @@ 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) | \
+ `echo $(libffi_la_OBJECTS) $(libffi_la_LIBADD) | \
sed 's,\([^/ ]*\)\.l\([ao]\),.libs/\1.\2,g'` \
> $@ || (rm -f $@ ; exit 1)
endif