Commit Graph

5 Commits

Author SHA1 Message Date
Peter Zhu 638fd8774b [Feature #18249] Include ruby.h in extensions to have ABI version
All shared libraries must have `include/ruby/internal/abi.h` to include
the ABI version. Including `ruby.h` will guarantee that.
2022-02-22 09:55:21 -05:00
nobu 638ba47303 load.c: defer static linked init
* enc/encinit.c.erb (Init_enc): initialize encdb and transdb
  directly.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48699 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-03 07:47:37 +00:00
nobu 08b1523553 no K&R style
* enc/encinit.c.erb (Init_enc): no K&R style anymore.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35711 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-19 03:44:04 +00:00
nobu 7333fbf0f7 enc/encinit.c.erb: use %-lines
* enc/encinit.c.erb: use %-lines to adjust indent in the generated file.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35670 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-17 01:39:39 +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