Convert linker script comments & linker args to be Solaris compat (John Levon)

This commit is contained in:
Daniel P. Berrange 2008-12-17 21:39:41 +00:00
parent 0604e9efe0
commit c2fb8bfee3
4 changed files with 73 additions and 60 deletions

View File

@ -1,3 +1,12 @@
Wed Dec 17 21:35:39 GMT 2008 Daniel P. Berrange <berrange@redhat.com>
Portability of ELF version script to Solaris (John Levon)
* configure.ac: Check linker flag used to set versioning
script for ELF
* src/Makefile.am: Use platform specific linker flag for
version script as per configure test
* src/libvirt_sym.version.in: Switch to '#' for comments
Wed Dec 17 21:30:39 GMT 2008 Daniel P. Berrange <berrange@redhat.com>
Fix conditional checks for Solaris platform (John Levon)

View File

@ -60,6 +60,11 @@ AM_PROG_LIBTOOL
AM_PROG_CC_C_O
VERSION_SCRIPT_FLAGS=-Wl,--version-script=
`/usr/bin/ld --help 2>&1 | grep -- --version-script >/dev/null` || \
VERSION_SCRIPT_FLAGS="-Wl,-M -Wl,"
AC_SUBST(VERSION_SCRIPT_FLAGS)
LIBVIRT_COMPILE_WARNINGS([maximum])
dnl Support large files / 64 bit seek offsets.

View File

@ -395,7 +395,7 @@ EXTRA_DIST += \
libvirt_la_SOURCES =
libvirt_la_LIBADD += \
@CYGWIN_EXTRA_LIBADD@ ../gnulib/lib/libgnu.la
libvirt_la_LDFLAGS = -Wl,--version-script=libvirt_sym.version \
libvirt_la_LDFLAGS = @VERSION_SCRIPT_FLAGS@libvirt_sym.version \
-version-info @LIBVIRT_VERSION_INFO@ \
$(COVERAGE_CFLAGS:-f%=-Wc,-f%) \
$(LIBXML_LIBS) $(SELINUX_LIBS) \

View File

@ -1,21 +1,21 @@
/*
* WARNING: libvirt_sym.version.in is the master file
*
* WARNING: libvirt_sym.version is auto-generated by configure
*/
#
# WARNING: libvirt_sym.version.in is the master file
#
# WARNING: libvirt_sym.version is auto-generated by configure
#
/*
* First officially exported symbols, for which header
* file definitions are installed in /usr/include/libvirt
* either from libvirt.h and virterror.h
*
* Versions here are *fixed* to match the libvirt version
* at which the symbol was introduced. This ensures that
* a new client app requiring symbol foo() can't accidentally
* run with old libvirt.so not providing foo() - the global
* soname version info can't enforce this since we never
* change the soname
*/
#
# First officially exported symbols, for which header
# file definitions are installed in /usr/include/libvirt
# either from libvirt.h and virterror.h
#
# Versions here are *fixed* to match the libvirt version
# at which the symbol was introduced. This ensures that
# a new client app requiring symbol foo() can't accidentally
# run with old libvirt.so not providing foo() - the global
# soname version info can't enforce this since we never
# change the soname
#
LIBVIRT_0.0.3 {
global:
virConnectClose;
@ -249,31 +249,30 @@ LIBVIRT_0.5.0 {
} LIBVIRT_0.4.5;
/* no new entry point in 0.5.1 */
/* .... define new API here using predicted next version number .... */
# no new entry point in 0.5.1
# .... define new API here using predicted next version number ....
/*
* Finally these symbols are private and semantics may change
* on every release, hence the version number is spliced in at
* build time. This ensures that if libvirtd, virsh, or a driver
* module was built against one libvirt release, it will refuse
* to load with another where symbols may have same names but
* different semantics.
*
* No header files are provided outside the source tree.
*
* Keep this section ordered alphabetically by header file name
*
* Symbols here are only for use by virsh, libvirtd and dlopen
* driver modules
*/
# Finally these symbols are private and semantics may change
# on every release, hence the version number is spliced in at
# build time. This ensures that if libvirtd, virsh, or a driver
# module was built against one libvirt release, it will refuse
# to load with another where symbols may have same names but
# different semantics.
#
# No header files are provided outside the source tree.
#
# Keep this section ordered alphabetically by header file name
#
# Symbols here are only for use by virsh, libvirtd and dlopen
# driver modules
#
LIBVIRT_PRIVATE_@VERSION@ {
global:
/* bridge.h */
# bridge.h
brAddBridge;
brAddInterface;
brAddTap;
@ -287,7 +286,7 @@ LIBVIRT_PRIVATE_@VERSION@ {
brShutdown;
/* buf.h */
# buf.h
virBufferVSprintf;
virBufferAdd;
virBufferAddChar;
@ -295,7 +294,7 @@ LIBVIRT_PRIVATE_@VERSION@ {
virBufferError;
/* caps.h */
# caps.h
virCapabilitiesAddGuest;
virCapabilitiesAddGuestDomain;
virCapabilitiesAddGuestFeature;
@ -311,7 +310,7 @@ LIBVIRT_PRIVATE_@VERSION@ {
virCapabilitiesSetMacPrefix;
/* conf.h */
# conf.h
virConfNew;
virConfReadFile;
virConfReadMem;
@ -323,7 +322,7 @@ LIBVIRT_PRIVATE_@VERSION@ {
virConfWriteMem;
/* datatypes.h */
# datatypes.h
virGetDomain;
virGetNetwork;
virGetStoragePool;
@ -332,7 +331,7 @@ LIBVIRT_PRIVATE_@VERSION@ {
virUnrefDomain;
/* domain_conf.h */
# domain_conf.h
virDiskNameToBusDeviceIndex;
virDiskNameToIndex;
virDomainAssignDef;
@ -378,7 +377,7 @@ LIBVIRT_PRIVATE_@VERSION@ {
virDomainObjUnlock;
/* domain_event.h */
# domain_event.h
virDomainEventCallbackListAdd;
virDomainEventCallbackListFree;
virDomainEventCallbackListRemove;
@ -400,11 +399,11 @@ LIBVIRT_PRIVATE_@VERSION@ {
/* driver.h */
# driver.h
virDriverLoadModule;
/* event.h */
# event.h
virEventAddHandle;
virEventAddTimeout;
virEventRemoveHandle;
@ -413,7 +412,7 @@ LIBVIRT_PRIVATE_@VERSION@ {
virEventUpdateTimeout;
/* hash.h */
# hash.h
virHashAddEntry;
virHashCreate;
virHashForEach;
@ -425,7 +424,7 @@ LIBVIRT_PRIVATE_@VERSION@ {
virHashSize;
/* iptables.h */
# iptables.h
iptablesAddForwardAllowCross;
iptablesAddForwardAllowIn;
iptablesAddForwardAllowOut;
@ -450,7 +449,7 @@ LIBVIRT_PRIVATE_@VERSION@ {
iptablesSaveRules;
/* libvirt_internal.h */
# libvirt_internal.h
debugFlag;
virStateInitialize;
virStateCleanup;
@ -470,14 +469,14 @@ LIBVIRT_PRIVATE_@VERSION@ {
virRegisterDeviceMonitor;
/* memory.h */
# memory.h
virAlloc;
virAllocN;
virReallocN;
virFree;
/* network_conf.h */
# network_conf.h
virNetworkAssignDef;
virNetworkDefFormat;
virNetworkDefFree;
@ -496,11 +495,11 @@ LIBVIRT_PRIVATE_@VERSION@ {
virNetworkObjUnlock;
/* nodeinfo.h */
# nodeinfo.h
virNodeInfoPopulate;
/* node_device_conf.h */
# node_device_conf.h
virNodeDeviceObjRemove;
virNodeDevCapTypeToString;
virNodeDeviceFindByName;
@ -513,18 +512,18 @@ LIBVIRT_PRIVATE_@VERSION@ {
virNodeDeviceAssignDef;
/* qparams.h */
# qparams.h
qparam_get_query;
qparam_query_parse;
free_qparam_set;
/* stats_linux.h */
# stats_linux.h
linuxDomainInterfaceStats;
xenLinuxDomainBlockStats;
/* storage_backend.h */
# storage_backend.h
virStorageBackendForType;
virStorageBackendFromString;
virStorageBackendPartTableTypeFromString;
@ -537,7 +536,7 @@ LIBVIRT_PRIVATE_@VERSION@ {
virStorageBackendUpdateVolInfoFD;
/* storage_conf.h */
# storage_conf.h
virStorageBackendPoolOptionsForType;
virStoragePoolDefFormat;
virStoragePoolDefFree;
@ -568,7 +567,7 @@ LIBVIRT_PRIVATE_@VERSION@ {
virStoragePoolObjUnlock;
/* util.h */
# util.h
virFileReadAll;
virStrToLong_i;
virStrToLong_ll;
@ -600,26 +599,26 @@ LIBVIRT_PRIVATE_@VERSION@ {
virSkipSpaces;
/* uuid.h */
# uuid.h
virUUIDFormat;
virUUIDGenerate;
virUUIDParse;
/* virterror_internal.h */
# virterror_internal.h
virReportErrorHelper;
virErrorMsg;
virRaiseError;
/* xml.h */
# xml.h
virXPathLong;
virXPathNodeSet;
virXPathString;
virXMLPropString;
/* Finally everything else is totally private */
# Finally everything else is totally private
local:
*;
};