Review Board 1.7.16


Make weak reference support linux and MacOSX only.

Review Request #1617 - Created Dec. 9, 2011 and submitted

rmudgett
1.8
ASTERISK-18728, ASTERISK-18950
Reviewers
asterisk-dev
kpfleming, oej, tilghman
Asterisk
Weak references is not portable and either does not work or does not work as expected on other platforms.

Primarily support weak references on linux platforms because the feature just works.

Allow weak symbol support on MacOS/X platforms only because there is active community support for it.  However, MacOS/X seems to break weak symbols for each new version.
My linux box now configures for HAVE_ATTRIBUTE_weakref instead of HAVE_ATTRIBUTE_weak which is Darwin specific. 

Changes between revision 2 and 3

1 2 3
1 2 3

  1. /branches/1.8/configure.ac: Loading...
/branches/1.8/configure.ac
Diff Revision 2 Diff Revision 3
[20] 884 lines
[+20]
885
AST_GCC_ATTRIBUTE(always_inline)
885
AST_GCC_ATTRIBUTE(always_inline)
886
AST_GCC_ATTRIBUTE(deprecated)
886
AST_GCC_ATTRIBUTE(deprecated)
887
AST_GCC_ATTRIBUTE(sentinel)
887
AST_GCC_ATTRIBUTE(sentinel)
888
AST_GCC_ATTRIBUTE(warn_unused_result)
888
AST_GCC_ATTRIBUTE(warn_unused_result)
889

    
   
889

   
890
# Support weak symbols on a platform specific basis.  The feature is not
890
# Support weak symbols on a platform specific basis.  The Mac OS X
891
# portable and either does not work or does not work as expected on other
891
# (Darwin) support must be isolated from the other platforms because
892
# platforms.
892
# it has caused other platforms to fail.
893
#

   
894
# Primarily support weak symbols on Linux platforms because the feature

   
895
# just works.

   
896
#

   
897
# Allow weak symbol support on Mac OS/X (Darwin) platforms only because

   
898
# there is active community support for it.

   
899
# However, Darwin seems to break weak symbols for each new version.

   
900
#
893
#
901
case "${OSARCH}" in
894
case "${OSARCH}" in
902
	darwin*)
895
	darwin*)

    
   
896
	# Allow weak symbol support on Darwin platforms only because there

    
   
897
	# is active community support for it.

    
   
898
	# However, Darwin seems to break weak symbols for each new version.

    
   
899
	#
903
	AST_GCC_ATTRIBUTE(weak_import, [], [], PBX_WEAKREF)
900
	AST_GCC_ATTRIBUTE(weak_import, [], [], PBX_WEAKREF)
904

    
   
901

   
905
	# Several other platforms including Linux have GCC versions that
902
	# Several other platforms including Linux have GCC versions that
906
	# define the weak attribute.  However, this attribute is only
903
	# define the weak attribute.  However, this attribute is only
907
	# setup for use in the code by Darwin.
904
	# setup for use in the code by Darwin.
908
	AST_GCC_ATTRIBUTE(weak, [], [], PBX_WEAKREF)
905
	AST_GCC_ATTRIBUTE(weak, [], [], PBX_WEAKREF)
909
	;;
906
	;;
910
	linux-gnu)
907
	linux-gnu)

    
   
908
	# Primarily support weak symbols on Linux platforms.

    
   
909
	#

    
   
910
	AST_GCC_ATTRIBUTE(weakref, [weakref("foo")], static, PBX_WEAKREF)

    
   
911
	;;

    
   
912
	*)

    
   
913
	# Allow weak symbols on other platforms.  However, any problems

    
   
914
	# with this feature on other platforms must be fixed by the

    
   
915
	# community.

    
   
916
	#
911
	AST_GCC_ATTRIBUTE(weakref, [weakref("foo")], static, PBX_WEAKREF)
917
	AST_GCC_ATTRIBUTE(weakref, [weakref("foo")], static, PBX_WEAKREF)
912
	;;
918
	;;
913
esac
919
esac
914

    
   
920

   
915
AC_MSG_CHECKING(for -ffunction-sections support)
921
AC_MSG_CHECKING(for -ffunction-sections support)
[+20] [20] 1376 lines
  1. /branches/1.8/configure.ac: Loading...

https://reviewboard.asterisk.org/ runs on a server provided by Digium, Inc. and uses bandwidth donated to the open source Asterisk community by API Digital Communications in Huntsville, AL USA.
Please report problems with this site to asteriskteam@digium.com.