Use ELF symbol versioning
At the same time, we must bump the (major) ABI version. This needed to be
done anyway due to ABI breakage in the AArch64 port (see 12cf89ee and the
corresponding GCC PR70024).
This commit is contained in:
28
Makefile.am
28
Makefile.am
@@ -155,7 +155,6 @@ EXTRA_libffi_la_SOURCES = \
|
||||
|
||||
TARGET_OBJ = @TARGET_OBJ@
|
||||
libffi_la_LIBADD = $(TARGET_OBJ)
|
||||
libffi_la_DEPENDENCIES = $(TARGET_OBJ)
|
||||
|
||||
libffi_convenience_la_SOURCES = $(libffi_la_SOURCES)
|
||||
EXTRA_libffi_convenience_la_SOURCES = $(EXTRA_libffi_la_SOURCES)
|
||||
@@ -172,7 +171,32 @@ if FFI_DEBUG
|
||||
AM_CFLAGS += -DFFI_DEBUG
|
||||
endif
|
||||
|
||||
libffi_la_LDFLAGS = -no-undefined -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(LTLDFLAGS) $(AM_LTLDFLAGS)
|
||||
if LIBFFI_BUILD_VERSIONED_SHLIB
|
||||
if LIBFFI_BUILD_VERSIONED_SHLIB_GNU
|
||||
libffi_version_script = -Wl,--version-script,libffi.map
|
||||
libffi_version_dep = libffi.map
|
||||
endif
|
||||
if LIBFFI_BUILD_VERSIONED_SHLIB_SUN
|
||||
libffi_version_script = -Wl,-M,libffi.map-sun
|
||||
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 \
|
||||
`echo $(libffi_la_OBJECTS) $(libffi_la_LIBADD) | \
|
||||
sed 's,\([^/ ]*\)\.l\([ao]\),.libs/\1.\2,g'` \
|
||||
> $@ || (rm -f $@ ; exit 1)
|
||||
endif
|
||||
else
|
||||
libffi_version_script =
|
||||
libffi_version_dep =
|
||||
endif
|
||||
libffi_version_info = -version-info `grep -v '^\#' $(srcdir)/libtool-version`
|
||||
|
||||
libffi.map: $(top_srcdir)/libffi.map.in
|
||||
$(COMPILE) -D$(TARGET) -E -x assembler-with-cpp -o $@ $<
|
||||
|
||||
libffi_la_LDFLAGS = -no-undefined $(libffi_version_info) $(libffi_version_script) $(LTLDFLAGS) $(AM_LTLDFLAGS)
|
||||
libffi_la_DEPENDENCIES = $(libffi_la_LIBADD) $(libffi_version_dep)
|
||||
|
||||
AM_CPPFLAGS = -I. -I$(top_srcdir)/include -Iinclude -I$(top_srcdir)/src
|
||||
AM_CCASFLAGS = $(AM_CPPFLAGS)
|
||||
|
||||
Reference in New Issue
Block a user