mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	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
This commit is contained in:
		
							parent
							
								
									3784395b8d
								
							
						
					
					
						commit
						3d69324be3
					
				
					 2 changed files with 13 additions and 4 deletions
				
			
		
							
								
								
									
										12
									
								
								configure.in
									
										
									
									
									
								
							
							
						
						
									
										12
									
								
								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], | ||||
|  |  | |||
|  | @ -245,9 +245,12 @@ void rb_ia64_flushrs(void); | |||
| #define RUBY_PLATFORM "unknown-unknown" | ||||
| #endif | ||||
| 
 | ||||
| #ifndef FUNC_MINIMIZED | ||||
| #define FUNC_MINIMIZED(x) x | ||||
| #endif | ||||
| #ifndef RUBY_ALIAS_FUNCTION_TYPE | ||||
| #define RUBY_ALIAS_FUNCTION_TYPE(type, prot, name, args) \ | ||||
|     type prot {return name args;} | ||||
|     FUNC_MINIMIZED(type prot) {return name args;} | ||||
| #endif | ||||
| #ifndef RUBY_ALIAS_FUNCTION_VOID | ||||
| #define RUBY_ALIAS_FUNCTION_VOID(prot, name, args) \ | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 nobu
						nobu