Граф коммитов

433 Коммитов

Автор SHA1 Сообщение Дата
nobu 2254fc650b ruby.c: drop older cygwin
* ruby.c (push_include_cygwin): drop older cygwin support.

* ruby.c (ruby_init_loadpath_safe): ditto, and always use String as
  libpath buffer on Windows.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45614 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-17 08:24:15 +00:00
nobu 6613580145 ruby.c: remove mangled_path
* ruby.c (rubylib_mangled_path): remove obsolete code, which has
  been disabled since 5 years ago.

* man/ruby.1 (ENVIRONMENT): delete an obsolete variable to mangle
  path, RUBYLIB_PREFIX.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45599 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-16 08:46:31 +00:00
nobu 8ca2f8565d ruby.c: check argc
* ruby.c (proc_options): check argc before dereference of argv, to get
  rid of potential out-of-bound access.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44882 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-07 16:20:55 +00:00
tmm1 53e0d4666c gc.c: Load GC tuning settings earlier during boot.
* gc.c (ruby_gc_set_params): Accept safe_level argument so GC tuning
  settings can be applied before rb_safe_level() is available.
* internal.h (rb_gc_set_params): ditto.
* ruby.c (process_options): Apply GC tuning early during boot process
  so boot-time allocations can benefit. This also benefits any code
  loaded in via `ruby -r`.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43991 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-05 00:19:13 +00:00
nari 9d2f54b3e9 * include/ruby/intern.h (rb_gc_set_params): Deprecate
rb_gc_set_params because it's only used in ruby internal.

* internal.h (ruby_gc_set_params): Declare rb_gc_set_params's
  alias function.

* gc.c: ditto.

* ruby.c: use ruby_gc_set_params.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43794 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-22 07:26:55 +00:00
glass 5c54eb4045 * dir.c, pack.c, ruby.c, struct.c, vm_eval.c: use RARRAY_CONST_PTR().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43580 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-08 02:37:47 +00:00
nobu 11ef85d237 ruby.c: load statically linked extensions before rubygems
* ruby.c (process_options): load statically linked extensions before
  rubygems, because of ext/thread.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43280 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-14 03:32:54 +00:00
nobu 02d28d01cf ruby.c: gem_prelude to load rubygems
* ruby.c (process_options): use gem_prelude instead of requiring
  rubygems directly when --enable=gems is given.
* Makefile.in (DEFAULT_PRELUDES): always use gem_prelude regardless of
  --disable-rubygems.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43278 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-14 03:22:24 +00:00
knu 1b4addb445 Process#setproctitle,argv0: Fix and improve rdoc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42771 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-02 05:42:02 +00:00
nobu e941e50506 ruby.c: use String path version parser functions
* ruby.c (load_file_internal): use rb_parser_compile_string_path and
  rb_parser_compile_file_path, String path name versions.  [Bug #8753]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42468 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-09 13:20:58 +00:00
knu d5ecd17aee Add Process.argv0.
* ruby.c (Process.argv0): New method to return the original value
  of $0. [Feature #8696]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42426 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-07 14:12:08 +00:00
knu 34bb945c40 Add Process.setproctitle().
* ruby.c (Process.setproctitle): New method to change the title of
  the running process that is shown in ps(1). [Feature #8696]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42425 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-07 14:12:04 +00:00
nobu 8948280c67 load.c: search in OS path encoding
* load.c (rb_load_internal): use rb_load_file_str() to keep path
  encoding.
* load.c (rb_require_safe): search in OS path encoding for Windows.
* ruby.c (rb_load_file_str): load file with keeping path encoding.
* win32/file.c (rb_file_load_ok): use WCHAR type API assuming incoming
  path is encoded in UTF-8.  [ruby-core:56136] [Bug #8676]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42183 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-26 04:04:23 +00:00
charliesome fff3589899 * compile.c (make_name_for_block): use PRIsVALUE in format string
instead of %s and RSTRING_PTR to protect objects from being garbage
  collected too soon
* encoding.c (str_to_encindex): ditto
* hash.c (rb_hash_fetch_m): ditto
* io.c (rb_io_reopen): ditto
* parse.y (reg_fragment_check_gen): ditto
* parse.y (reg_compile_gen): ditto
* parse.y (ripper_assert_Qundef): ditto
* re.c (rb_reg_raise): ditto
* ruby.c (set_option_encoding_once): ditto
* vm_eval.c (rb_throw_obj): ditto

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41597 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-24 11:31:21 +00:00
akr bd15d4ca78 * internal.h (numberof): Gathered from various files.
* array.c, math.c, thread_pthread.c, iseq.c, enum.c, string.c, io.c,
  load.c, compile.c, struct.c, eval.c, gc.c, parse.y, process.c,
  error.c, ruby.c: Remove the definitions of numberof.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41142 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-07 10:01:19 +00:00
ktsj edb98f8b91 fix typos. Patch by k_takata.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40825 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-19 03:10:21 +00:00
ko1 83aba04862 * include/ruby/ruby.h: constify RBasic::klass and add
RBASIC_CLASS(obj) macro which returns a class of `obj'.
  This change is a part of RGENGC branch [ruby-trunk - Feature #8339].
* object.c: add new function rb_obj_reveal().
  This function reveal interal (hidden) object by rb_obj_hide().
  Note that do not change class before and after hiding.
  Only permitted example is:
  klass = RBASIC_CLASS(obj);
  rb_obj_hide(obj);
  ....
  rb_obj_reveal(obj, klass);
  TODO: API design. rb_obj_reveal() should be replaced with others.
  TODO: modify constified variables using cast may be harmful for
  compiler's analysis and optimizaton.
  Any idea to prohibt inserting RBasic::klass directly?
  If rename RBasic::klass and force to use RBASIC_CLASS(obj),
  then all codes such as `RBASIC(obj)->klass' will be
  compilation error. Is it acceptable? (We have similar
  experience at Ruby 1.9,
  for example "RARRAY(ary)->ptr" to "RARRAY_PTR(ary)".
* internal.h: add some macros.
* RBASIC_CLEAR_CLASS(obj) clear RBasic::klass to make it internal
  object.
* RBASIC_SET_CLASS(obj, cls) set RBasic::klass.
* RBASIC_SET_CLASS_RAW(obj, cls) same as RBASIC_SET_CLASS
  without write barrier (planned).
* RCLASS_SET_SUPER(a, b) set super class of a.
* array.c, class.c, compile.c, encoding.c, enum.c, error.c, eval.c,
  file.c, gc.c, hash.c, io.c, iseq.c, marshal.c, object.c,
  parse.y, proc.c, process.c, random.c, ruby.c, sprintf.c,
  string.c, thread.c, transcode.c, vm.c, vm_eval.c, win32/file.c:
  Use above macros and functions to access RBasic::klass.
* ext/coverage/coverage.c, ext/readline/readline.c,
  ext/socket/ancdata.c, ext/socket/init.c,
* ext/zlib/zlib.c: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-13 10:49:11 +00:00
ko1 aacd771046 * *.c, parse.y, insns.def: use RARRAY_AREF/ASET macro
instead of using RARRAY_PTR().



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40690 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-13 09:56:22 +00:00
zzak 0b4214ad9b * class.c: Example of Object#methods by @windwiny [Fixes GH-293]
* ruby.c: Document return values of Kernel #sub, #gsub, and #chop


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40432 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-24 04:47:31 +00:00
nobu 7505436d62 * ruby.c (is_option_with_optarg): macro for optional argument option.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39526 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-27 08:08:10 +00:00
nobu 74016f1842 ruby.c: fix for multiarch library
* ruby.c (ruby_init_loadpath_safe): try two levels upper for stripping
  libdir name.  [Bug #7874]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39348 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-21 03:45:07 +00:00
nobu 46cdc66f84 version.c: move ruby_exec_prefix
* version.c (ruby_exec_prefix): move all path configuration stuffs.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39296 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-18 01:11:58 +00:00
kazu 09f564b15f * ruby.c (usage): sort --*-encoding in help. (same order of -E)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-11 14:38:57 +00:00
ko1 f4ef96e6a2 * ruby.c (process_options): need to acquire env from TOPLEVEL_BINDING
each time.
  `bind->env' may update after `eval()'.
  [Bug #7536]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38529 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-21 10:39:59 +00:00
usa e446378ad0 * ruby.c (load_file_internal): use original C string as the filename
for parser.
  reported by whiteleaf at [ruby-list:49085] [ruby-dev:46738]
  [Bug #7562]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38474 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-19 14:54:50 +00:00
nobu b9163cc1fd ruby.c: argv check
* ruby.c (proc_options, process_options, ruby_process_options): take
  care of the case argc is 0, and check if argv has NULL.
  [ruby-core:49889] [Bug #7423]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37823 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-23 15:00:55 +00:00
nobu 48df345894 ruby.c: wrap descriptions
* ruby.c (usage): wrap description lines if options are too long.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37818 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-23 08:31:57 +00:00
nobu 38a1bcb056 * ruby.c, test/ruby/test_rubyoptions.rb: revert r37815:r37816.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37817 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-23 08:31:52 +00:00
tadf 10cceae9e3 * ruby.c: revert r37298.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37816 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-23 03:35:27 +00:00
zzak 7e96fb252a * ruby.c (usage_msg): Fix typo [ruby-core:49205] [Bug #7327]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37745 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-20 03:37:27 +00:00
duerst 35020e355c ruby.c: removed a comma before "before"
(at Tamatsukuri Hot Spring (Onsen Hackathon))

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37615 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-10 23:47:45 +00:00
naruse 58ef0f06c6 * ruby.c (load_file_internal): set default source encoding as
UTF-8 instead of US-ASCII. [ruby-core:46021] [Feature #6679]

* parse.y (parser_initialize): set default parser encoding as
  UTF-8 instead of US-ASCII.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37485 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-06 00:49:57 +00:00
shirosaki 9823c46189 Cache the expanded load path
* load.c (rb_get_expanded_load_path): cache the expanded load
  path.  This saves 4KB of allocation and some stats for every
  element of the load path (so nearly a MB in my Rails app)
  on every require.

* load.c (rb_construct_expanded_load_path): ensure that $LOAD_PATH
  entries are frozen strings.  The user must mutate $LOAD_PATH
  itself rather than its individual entries.

* vm_core.h (rb_vm_struct): add fields.

* vm.c (rb_vm_mark): mark new fields.

* ruby.c (process_options): modify $LOAD_PATH directly rather than
  its elements.
  Patch by Greg Price.
  [ruby-core:47970] [Bug #7158]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37481 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-05 15:27:05 +00:00
nobu 357a5f5ab5 ruby.c: --help option
* ruby.c (usage, process_options): show more info in --help.
  [EXPREIMENTAL] [ruby-core:48072] [Bug #7184]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37298 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-23 08:08:42 +00:00
nobu 9e02550b21 ruby.c: passing block
* ruby.c (rb_f_sub, rb_f_gsub): pass the given block.
  [ruby-core:47967] [Bug #7157]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37177 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-14 03:30:50 +00:00
nobu 22c81db9d8 configure.in: use configured libdir value
* configure.in (LIBDIR_BASENAME): use configured libdir value to fix
  --enable-load-relative on systems where libdir is not default value,
  overridden in config.site files.  [ruby-core:47267] [Bug #6903]
* ruby.c (ruby_init_loadpath_safe): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36847 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-29 06:03:09 +00:00
nobu 58d0277775 ruby.c: magic numbers
* ruby.c (ruby_init_loadpath_safe): remove magic numbers.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36845 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-29 05:59:05 +00:00
nobu c68d29960b load.c: keep encoding of feature name
* file.c (rb_find_file_ext_safe, rb_find_file_safe): default to
  US-ASCII for encdb and transdb.
* load.c (search_required): keep encoding of feature name.  set
  loading path to filesystem encoding.  [Bug #6377][ruby-core:44750]
* ruby.c (add_modules, require_libraries): assume default external
  encoding as well as ARGV.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36800 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-23 07:46:12 +00:00
nobu 0e92dc4b72 ruby.c: show version only once
* ruby.c (proc_options): show version only once even if -v and
  --verbose are given together.
  http://twitter.com/d6rkaiz/status/233491797085671424


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36667 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-09 09:33:49 +00:00
yugui 64ef091a64 Reverts a half of r36079. As we discussed on ruby-dev@ and IRC,
we do not need to disclose intermediate representation of program.
The program embedding CRuby should use rb_eval_string family.
* include/ruby/ruby.h (ruby_opaque_t): removed.
  (ruby_compile_main_from_file, ruby_compile_main_from_string,
   ruby_eval_main): removed.

* eval.c (ruby_eval_main_internal): became ruby_exec_internal() again.
  (ruby_eval_main): removed.

* ruby.c (PREPARE_PARSE_MAIN) reverted.
  (parse_and_compile_main, ruby_compile_main_from_file,
   ruby_compile_main_from_string): removed

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36362 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-11 03:25:16 +00:00
naruse 007c9aa2bf * ruby.c (proc_options): warn only if -K and -w option is specified.
see also r36274 [Feature #5206]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36310 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-04 16:01:01 +00:00
naruse c2a87e2733 * ruby.c (proc_options): warn if -K option is specified. [Feature #5206]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36274 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-03 01:52:51 +00:00
ko1 c4bc9b5758 * iseq.c, vm_eval.c: set th->base_block properly.
th->base_block is information for (a) parsing, (b) compiling
  and (c) setting up the frame to execute the program passed by
  `eval' method.  For example, (1) parser need to know up-level
  variables to detect it is variable or method without paren.
  Befor (a), (b) and (c), VM set th->base_block by passed bindng
  (or previous frame information).  After execute (a), (b) and (c),
  VM should clear th->base_block.  However, if (a), (b) or (c)
  raises an exception, then th->base_block is not cleared.
  Problem is that the uncleared value th->balo_block is used for
  irrelevant iseq compilation.  It causes SEGV or critical error.
  I tried to solve this problem: to clear them before exception,
  but finally I found out that it is difficult to do it (Ruby
  program can be run in many places).
  Because of this background, I set th->base_block before
  compiling iseq and restore it after compiling.
  Basically, th->base_block is dirty hack (similar to global
  variable) and this patch is also dirty.
* bootstraptest/test_eval.rb: add a test for above.
* internal.h: remove unused decl.
* iseq.c (rb_iseq_compile_with_option): add base_block parameter.
  set th->base_block before compation and restore it after
  compilation.
* ruby.c (require_libraries): pass 0 as base_block instead of
  setting th->base_block
* tool/compile_prelude.rb (prelude_eval): apply above changes.
* vm.c, vm_eval.c: ditto.
* vm_core.h: add comments.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36179 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-22 09:32:56 +00:00
kosaki 6d69c3b0ce * ruby.c (rb_f_sub): use ansi style declaration.
* ruby.c (rb_f_gsub): ditto.
* ruby.c (rb_f_chomp): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36145 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-19 21:50:09 +00:00
nobu 6648846e05 ruby.c: add cast
* ruby.c (parse_and_compile_main): add cast to a pointer type.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36083 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-14 04:03:31 +00:00
nobu 073297789a fix r36079
* include/ruby/ruby.h: public symbols must have default visibility.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36081 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-14 03:03:48 +00:00
yugui 8c9a453f2d Embedding CRuby interpreter without internal headers has been difficult
for few years because:
* NODE is no longer accessible.
* rb_iseq_eval_main crashes without preparing with rb_thread_t.
* some existing APIs calls exit(3) without giving the opportunity to
  finalize or handle errors to the client.
* No general-purpose function to compile a source to an iseq are
  published in the public headers.

This commit solves the problems.

	* include/ruby/ruby.h: Grouped APIs for embedding CRuby interpreter.
	  (ruby_setup, ruby_compile_main_from_file,
	  ruby_compile_main_from_string, ruby_eval_main,
	  ruby_set_script_name): new APIs to embed CRuby.
	  (ruby_opaque_t) Opaque pointer to an internal data, to NODE or iseq
	  in particular.

	* eval.c (ruby_setup): Similar to ruby_init but returns an error code
	  instead of exit(3) on error.
	  (ruby_eval_main): Similar to ruby_exec_node but returns the
	  evaluation result.
	  (ruby_eval_main_internal): renamed from ruby_exec_internal.

	* ruby.c (toplevel_context): new helper function.
	  (PREPARE_EVAL_MAIN): moved.
	  (process_options): refactored with new functions.
	  (parse_and_compile_main) new helper funciton.
	  (ruby_compile_main_from_file, ruby_compile_main_from_string) new API
	  (ruby_set_script_name): new API.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36079 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-14 02:22:08 +00:00
yugui f8601bd903 * eval.c: Add doxygen comments.
* ruby.c: ditto.

* thread_pthread.c: ditto

* version.c: ditto.

* vm_core.h: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36078 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-14 02:21:51 +00:00
nobu ea0c3a8832 ruby.c: fixed typo
* ruby.c (Init_enc): fixed typo. defined in dmyext.c.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35725 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-20 14:00:10 +00:00
yugui 3fa3f9abb9 Supports static linking of extensions and encodings again.
Fixes --with-static-linked-ext.

Patch by Google Inc. [ruby-core:45073].

* Makefile.in (ENCOBJS, EXTOBJS): New variables to specify static
  linked libraries. Also reintroduces extinit.o, introduces encinit.o
  introduces encinit.o

* common.mk: Builds static libraries rather than shared objects if
  specified.

* configure.in (LD): new substitution. 
  Avoids PIE if s

* enc/depend: Supports static linked libraries
  (libencs, libenc, libtrans): New target.

* enc/encinit.c.erb: new template to generate the initialization of
  statically linked encodings.

* enc/make_encmake.rb (--module): new flag to specify whether static
  or dynamic.

* transcode_data.h (TRANS_INIT): New macro to get rid of the name
  collision of encoding initializers and transcoder initializers.

* ext/extmk.rb: Fixes the behavior on $extstatic is true.

* lib/mkmf.rb (clean-static): new target to clean up static linked
  libraries.

* ruby.c (process_options): New initializes statically linked
  encodings here.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35662 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-16 05:39:06 +00:00