Skip to content

Commit 25757f8

Browse files
author
H. Peter Anvin
committed
autoconf: update some of the m4 library
Update some files in the m4 library. This also updates config/unconfig.h to match. Signed-off-by: H. Peter Anvin <[email protected]>
1 parent ef5fd53 commit 25757f8

File tree

5 files changed

+28
-5
lines changed

5 files changed

+28
-5
lines changed

autoconf/m4/pa_add_flags.m4

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
dnl --------------------------------------------------------------------------
2-
dnl PA_ADD_FLAGS(flagvar, flags)
2+
dnl PA_ADD_FLAGS(flagvar, flags [, real-flags [, success [, failure]]])
33
dnl
4-
dnl Add [flags] to the variable [flagvar] if and only if it is accepted
5-
dnl by all languages affected by [flagvar], if those languages have
6-
dnl been previously seen in the script.
4+
dnl Add [real-flags] (default [flags]) to the variable [flagvar] if
5+
dnl and only if [flags] are accepted by all languages affected by
6+
dnl [flagvar], if those languages have been previously seen in the
7+
dnl script.
78
dnl --------------------------------------------------------------------------
89
AC_DEFUN([PA_ADD_FLAGS],
910
[

autoconf/m4/pa_common_attributes.m4

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,6 @@ AC_DEFUN([PA_COMMON_ATTRIBUTES],
1515
PA_FUNC_ATTRIBUTE(const)
1616
PA_FUNC_ATTRIBUTE(pure)
1717
PA_FUNC_ATTRIBUTE(cold,,,,,unlikely_func)
18+
PA_FUNC_ATTRIBUTE(used)
1819
PA_FUNC_ATTRIBUTE(unused)
1920
PA_FUNC_ATTRIBUTE_ERROR])

autoconf/m4/pa_option_debug.m4

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,7 @@ AC_DEFUN([PA_OPTION_DEBUG],
99
[PA_ADD_LANGFLAGS([-g3])], [PA_ADD_LANGFLAGS([-ggdb3 -g3])])
1010
PA_ARG_ENABLED([debug], [optimize for debugging],
1111
[PA_ADD_LANGFLAGS([-Og -O0])
12+
AC_DEFINE([WITH_DEBUG], 1,
13+
[Define to 1 to include code specifically indended to help debugging.])
1214
$1],
1315
[$2])])

autoconf/m4/pa_option_profiling.m4

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,7 @@ dnl Try to enable profiling if --enable-profiling is set.
55
dnl --------------------------------------------------------------------------
66
AC_DEFUN([PA_OPTION_PROFILING],
77
[PA_ARG_ENABLED([profiling], [compile with profiling (-pg option)],
8-
[PA_ADD_LANGFLAGS([-pg])])])
8+
[PA_ADD_LANGFLAGS([-pg])
9+
AC_DEFINE([WITH_PROFILING], 1,
10+
[Define to 1 to include code specifically indended to help profiling.])
11+
])])

config/unconfig.h

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,22 @@
107107
# endif
108108
#endif
109109

110+
#ifndef used_func
111+
# ifdef HAVE_FUNC_ATTRIBUTE_USED
112+
# define used_func ATTRIBUTE(used)
113+
# else
114+
# define used_func
115+
# endif
116+
#endif
117+
118+
#ifndef used_func_ptr
119+
# ifdef HAVE_FUNC_PTR_ATTRIBUTE_USED
120+
# define used_func_ptr ATTRIBUTE(used)
121+
# else
122+
# define used_func_ptr
123+
# endif
124+
#endif
125+
110126
#ifndef unused_func
111127
# ifdef HAVE_FUNC_ATTRIBUTE_UNUSED
112128
# define unused_func ATTRIBUTE(unused)

0 commit comments

Comments
 (0)