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> Wed Dec 17 21:30:39 GMT 2008 Daniel P. Berrange <berrange@redhat.com>
Fix conditional checks for Solaris platform (John Levon) Fix conditional checks for Solaris platform (John Levon)

View File

@ -60,6 +60,11 @@ AM_PROG_LIBTOOL
AM_PROG_CC_C_O 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]) LIBVIRT_COMPILE_WARNINGS([maximum])
dnl Support large files / 64 bit seek offsets. dnl Support large files / 64 bit seek offsets.

View File

@ -395,7 +395,7 @@ EXTRA_DIST += \
libvirt_la_SOURCES = libvirt_la_SOURCES =
libvirt_la_LIBADD += \ libvirt_la_LIBADD += \
@CYGWIN_EXTRA_LIBADD@ ../gnulib/lib/libgnu.la @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@ \ -version-info @LIBVIRT_VERSION_INFO@ \
$(COVERAGE_CFLAGS:-f%=-Wc,-f%) \ $(COVERAGE_CFLAGS:-f%=-Wc,-f%) \
$(LIBXML_LIBS) $(SELINUX_LIBS) \ $(LIBXML_LIBS) $(SELINUX_LIBS) \

View File

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