[pacman-dev] [PATCH] use the default visibility attribute when debugging is enabled, i.e. all symbols will be visible
Signed-off-by: Barbu Paul - Gheorghe <barbu.paul.gheorghe@gmail.com> --- m4/acinclude.m4 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/m4/acinclude.m4 b/m4/acinclude.m4 index f57a515..2829845 100644 --- a/m4/acinclude.m4 +++ b/m4/acinclude.m4 @@ -83,7 +83,8 @@ AC_DEFUN([GCC_VISIBILITY_CC],[ if test $visibility_cv_cc = yes; then AC_DEFINE([ENABLE_VISIBILITY_CC], 1, [Define if symbol visibility C support is enabled.]) fi - AM_CONDITIONAL([ENABLE_VISIBILITY_CC], test "x$visibility_cv_cc" = "xyes") + AM_CONDITIONAL([ENABLE_VISIBILITY_CC], + test "x$visibility_cv_cc" = "xyes" -a "x$debug" != "xyes") fi ]) -- Barbu Paul - Gheorghe Common sense is not so common - Voltaire Visit My GitHub profile to see my open-source projects - https://github.com/paullik
On Wed, Aug 1, 2012 at 12:53 PM, Barbu Paul - Gheorghe <barbu.paul.gheorghe@gmail.com> wrote: Why would we want to do this? This could lead to a situation where one makes a production build and breaks an application because a symbol that was available during development disappears. -1 from me for the above reason, and also because a patch that makes a change like this really needs explanation in a commit message, not just a patch subject.
Signed-off-by: Barbu Paul - Gheorghe <barbu.paul.gheorghe@gmail.com> --- m4/acinclude.m4 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/m4/acinclude.m4 b/m4/acinclude.m4 index f57a515..2829845 100644 --- a/m4/acinclude.m4 +++ b/m4/acinclude.m4 @@ -83,7 +83,8 @@ AC_DEFUN([GCC_VISIBILITY_CC],[ if test $visibility_cv_cc = yes; then AC_DEFINE([ENABLE_VISIBILITY_CC], 1, [Define if symbol visibility C support is enabled.]) fi - AM_CONDITIONAL([ENABLE_VISIBILITY_CC], test "x$visibility_cv_cc" = "xyes") + AM_CONDITIONAL([ENABLE_VISIBILITY_CC], + test "x$visibility_cv_cc" = "xyes" -a "x$debug" != "xyes") fi ])
-- Barbu Paul - Gheorghe Common sense is not so common - Voltaire Visit My GitHub profile to see my open-source projects - https://github.com/paullik
On 08/01/2012 09:03 PM, Dan McGee wrote:
Why would we want to do this? This could lead to a situation where one makes a production build and breaks an application because a symbol that was available during development disappears.
Well, I tought that this would come in handy when debugging, because one can set break points at the and in the "private" functions too (of course they aren't private now that -fvisibility will be default if debugging is enabled). I needed this when trying to understand how parts of libalpm worked and had to break at a "public" function then carefully use "next" and "step" in gdb to reach the desired point. Concerning the release vs the development build ... the programmer coudl always run the tests in order to see if something went wrong. This is the reasoning behind the patch, sorry for my lack of communication, I'll be careful in the future. Have a nice day! -- Barbu Paul - Gheorghe Common sense is not so common - Voltaire Visit My GitHub profile to see my open-source projects - https://github.com/paullik
On Wed, Aug 01, 2012 at 08:53:05PM +0300, Barbu Paul - Gheorghe wrote:
Signed-off-by: Barbu Paul - Gheorghe <barbu.paul.gheorghe@gmail.com> ---
Ok... why?
m4/acinclude.m4 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/m4/acinclude.m4 b/m4/acinclude.m4 index f57a515..2829845 100644 --- a/m4/acinclude.m4 +++ b/m4/acinclude.m4 @@ -83,7 +83,8 @@ AC_DEFUN([GCC_VISIBILITY_CC],[ if test $visibility_cv_cc = yes; then AC_DEFINE([ENABLE_VISIBILITY_CC], 1, [Define if symbol visibility C support is enabled.]) fi - AM_CONDITIONAL([ENABLE_VISIBILITY_CC], test "x$visibility_cv_cc" = "xyes") + AM_CONDITIONAL([ENABLE_VISIBILITY_CC], + test "x$visibility_cv_cc" = "xyes" -a "x$debug" != "xyes") fi ])
-- Barbu Paul - Gheorghe Common sense is not so common - Voltaire Visit My GitHub profile to see my open-source projects - https://github.com/paullik
participants (3)
-
Barbu Paul - Gheorghe
-
Dan McGee
-
Dave Reisner