summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-04-17 02:41:39 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-04-17 02:41:39 +0000
commit3d69324be300fce437536f7b7ac5f3d5c8c54d7d (patch)
treeb74abf07f8a3cfbc7c1c6db8485bb4030ec1648a /configure.in
parent3784395b8d344800af44cd89ca2353093d358ac1 (diff)
configure.in: FUNC_MINIMIZED
* configure.in (RUBY_FUNC_ATTRIBUTE): escape double quotes in attribute. * configure.in (FUNC_MINIMIZED): attribute to minimize function body. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45608 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in12
1 files changed, 9 insertions, 3 deletions
diff --git a/configure.in b/configure.in
index f52e0ba370..5fbdb93843 100644
--- a/configure.in
+++ b/configure.in
@@ -1506,11 +1506,16 @@ m4_ifval([$3], dnl
[AS_VAR_PUSHDEF([rbcv],[$3])], dnl
[AS_VAR_PUSHDEF([rbcv],[rb_cv_func_][$1])]dnl
)dnl
+m4_pushdef([attrib_code],[m4_bpatsubst([$1],["],[\\"])])
m4_ifval([$4], [rbcv_cond=["$4"]; test "$rbcv_cond" || unset rbcv_cond])
-AC_CACHE_CHECK(for [$1] function attribute, rbcv,
+AC_CACHE_CHECK(for [$2] function attribute, rbcv,
[rbcv=x
RUBY_WERROR_FLAG([
-for mac in "__attribute__ (($1)) x" "x __attribute__ (($1))" "__declspec($1) x" x; do
+for mac in \
+ "__attribute__ ((attrib_code)) x" \
+ "x __attribute__ ((attrib_code))" \
+ "__declspec(attrib_code) x" \
+ x; do
m4_ifval([$4],mac="$mac"${rbcv_cond+" /* only if $rbcv_cond */"})
AC_TRY_COMPILE(
m4_ifval([$4],${rbcv_cond+[@%:@if ]$rbcv_cond})
@@ -1525,7 +1530,7 @@ done
if test "$rbcv" != x; then
RUBY_DEFINE_IF(m4_ifval([$4],[${rbcv_cond}]), attrib[(x)], $rbcv)
fi
-m4_ifval([$4], [unset rbcv_cond])dnl
+m4_ifval([$4], [unset rbcv_cond]) dnl
AS_VAR_POPDEF([attrib])dnl
AS_VAR_POPDEF([rbcv])dnl
])
@@ -1538,6 +1543,7 @@ if_i386=${universal_binary+[defined __i386__]}
RUBY_FUNC_ATTRIBUTE(stdcall, [], [], ${if_i386})
RUBY_FUNC_ATTRIBUTE(cdecl, [], [], ${if_i386})
RUBY_FUNC_ATTRIBUTE(fastcall, [], [], ${if_i386})
+RUBY_FUNC_ATTRIBUTE(optimize("-Os","-fomit-frame-pointer"), FUNC_MINIMIZED, rb_cv_func_minimized)
if test "$GCC" = yes; then
AC_CACHE_CHECK([for function alias], [rb_cv_gcc_function_alias],