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

90 Коммитов

Автор SHA1 Сообщение Дата
Pierrick Bouvier 784fdecc4c
windows-arm64 support (#8995)
* [win32] fix compilation for windows-arm64

Credits to MSYS2 Ruby package using this patch.

* [win32] nm use full options

Fix compilation error when using MSYS2 environment.
Credits to MSYS2 Ruby package using this patch.

* [win32] detect llvm-windres (used for windows-arm64)

When adding preprocessor option for llvm-windres (using clang as
parameter), it fails. Thus, do not add this.

It's needed to be able to compile windows-arm64 version, because MSYS2
toolchain is LLVM based (instead of GCC/binutils).

* [win32] pioinfo detection for windows-arm64

This fixes "unexpected ucrtbase.dll" for native windows-arm64 ruby
binary. It does not solve issue with x64 version emulated on this
platform.

Value of pioinfo pointer can be found in ucrtbase.dll at latest adrp/add
sequence before return of _isatty function. This works for both release
and debug ucrt.

Due to the nature of aarch64 ISA (vs x86 or x64), it's needed to
disassemble instructions to retrieve offset value, which is a bit more
complicated than matching specific string patterns.

Details about adrp/add usage can be found in this blog post:
https://devblogs.microsoft.com/oldnewthing/20220809-00/?p=106955
For instruction decoding, the Arm documentation was used as a reference.
2023-11-23 17:17:28 +09:00
Nobuyoshi Nakada cceb410087 leaked-globals: check leaked symbols in libruby.so if enable-shared 2023-07-08 11:31:17 +09:00
Lars Kanis 518301883e Fix parallel build on MINGW
When the build is running with a base ruby then generating `x64-ucrt-ruby320.rc`
could fail due to a missing dependency to `x64-mingw-ucrt-fake.rb`.
This commit adds this dependency.

A failing build looks like so:
```
generating x64-mingw-ucrt-fake.rb
generating x64-ucrt-ruby320.rc
../snapshot-master/win32/resource.rb:in `require': cannot load such file -- ./x64-mingw-ucrt-fake (LoadError)
make: *** [GNUmakefile:57: x64-ucrt-ruby320.rc] Error 1
make: *** Waiting for unfinished jobs....
linking miniruby.exe
x64-mingw-ucrt-fake.rb updated
```
2022-09-10 09:32:27 +09:00
Nobuyoshi Nakada 7c67d0fd79
Make sources by BASERUBY if available instead of miniruby 2022-09-03 19:25:29 +09:00
Nobuyoshi Nakada c4f2f2ef2b
Reuse macros defined in Makefile.in 2022-09-03 18:42:42 +09:00
Nobuyoshi Nakada 68c1a03f9d
Suppress msys2 pathname conversion also at single test runs [ci skip] 2022-07-06 00:22:32 +09:00
Nobuyoshi Nakada 601c67e42c
Suppress maybe-uninitialized warning on mingw
The compilation time pragma seems not applied to inline functions
expanded by the link time optimization.  The local variable `mi`
in thread_win32.c:native_thread_init_stack is warned.
2021-10-02 08:02:57 +09:00
Nobuyoshi Nakada cb396d4214
Share variables defined in common GNUmakefile also in cygwin/mingw 2021-03-21 17:57:44 +09:00
Nobuyoshi Nakada 952b2dcc88
Fix for windres 2.36 [Bug #17602]
Add --preprocessor and --preprocessor-arg for each preprocessor
command arguments, as windres 2.36 requires preprocessor name and
arguments to be separated to respect spaces in these paths.
2021-02-01 14:59:47 +09:00
Nobuyoshi Nakada 0f8b5819b3
Merged recipes for the same target 2020-05-27 13:13:12 +09:00
Nobuyoshi Nakada 51fa4c9f49
Removed obsolete forwarding DLL recipe
It has never been created by default, and no reason to keep binary
compatibility against extension libraries for ruby 1.8.

1. `LIBRUBY_SO` on Cygwin was named originally.

   - 94089e82a12:: `$(RUBY_INSTALL_NAME)-cygwin.dll`
   - f0ba57341ac:: `$(RUBY_INSTALL_NAME).cygwin.dll`
   - c74a3b21f59:: `cygwin-$(RUBY_INSTALL_NAME)-$(MAJOR).$(MINOR).dll`

2. And then renamed to be net distribution compliant.

   - 6f059f33ef1:: `cyg$(RUBY_SO_NAME)$(MAJOR)$(MINOR).dll`

3. Next at 430eabfe13, forwarding DLL was added for binary
   compatibility against extension libraries.
2020-05-27 12:40:18 +09:00
Nobuyoshi Nakada 2a3f45bdb3
Set `gnumake` in GNUmakefile for cygwin
It was moved from defs/gmake.mk at 88f4ebac83, for use in
dependency rule lines.
2020-03-29 17:43:24 +09:00
nobu 92b710e64b MFLAGS for nmake
* common.mk (mflags): pass make flags to sub-makes, for nmake
  which cannot pass them by the environment variable.

* defs/gmake.mk (mflags): filter out -j option for sub-makes.

* template/exts.mk.tmpl (MFLAGS): extract MFLAGS from sub extmk
  files for nmake.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57594 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-10 06:12:22 +00:00
nobu e95eb9584a Keep -jN option
* {cygwin,template}/GNUmakefile.in (MFLAGS, MAKEFLAGS): keep -jN
  option.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57383 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-20 07:45:10 +00:00
nobu 9b454bfaf3 rubystub
* rubystub.c: generalize win32/stub.c.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55973 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-20 02:20:34 +00:00
nobu c6bf047267 Revert r55968 "scriptbin on cygwin"
win32/stub.c only works with malloced argv as win32/win32.c, to
realloc it.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55969 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-19 08:32:16 +00:00
nobu 7f7e809a45 scriptbin on cygwin
* cygwin/GNUmakefile.in (scriptbin): enable on cygwin.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55968 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-19 08:01:20 +00:00
nobu 468a766b76 strip stub program
* cygwin/GNUmakefile.in (STUBPROGRAM): strip.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55967 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-19 08:01:19 +00:00
nobu 60a063d88d Remove -jN option
* {cygwin,template}/GNUmakefile.in (MAKEFLAGS): remove -jN option
  from MAKEFLAGS as well as MFLAGS.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55505 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-26 00:28:13 +00:00
nobu 3792ad0eca Update cygwin/GNUmakefile.in
* cygwin/GNUmakefile.in: remove -jN option from submake, and
  include defs/gmake.mk to serialize test targets.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55467 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-20 08:40:11 +00:00
nobu 6c8efc0dc7 GNUmakefile.in: fix MSYS2_ARG_CONV_EXCL
* cygwin/GNUmakefile.in (MSYS2_ARG_CONV_EXCL_PARAM):
  * add missing parentheses and remove double quotes.
  * rename to get rid of recursive references.
  * as --excludes-dir option is for a path name, its argument
    should be converted.
  [ruby-dev:49526] [Bug #12199]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54233 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-23 02:38:49 +00:00
nobu 61cefc1359 suppress msys2 pathname conversion
* common.mk (TEST_EXCLUDES, EXCLUDE_TESTFRAMEWORK): use full spell
  long option.
* cygwin/GNUmakefile.in (MSYS2_ARG_CONV_EXCL): suppress path name
  conversions by msys2.  [ruby-dev:49525] [Bug #12199]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54211 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-21 11:18:31 +00:00
nobu a4c091a697 fix rc files conflict in parallel build
* cygwin/GNUmakefile.in (%.rc): generate .rc files separately to
  get rid of conflict in parallel build.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53480 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-01-09 02:46:31 +00:00
nobu 34b1c7ddd6 fix library teeny
* configure.in, win32/Makefile.sub: fix teeny of library version
  to 0.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53474 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-01-09 00:20:46 +00:00
nobu 597da7b2d0 win32.c: fake lchown
* win32/win32.c (lchown, rb_w32_ulchown): fake lchown.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51687 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-26 05:21:41 +00:00
nobu 34c83a37c2 stub.o: under win32
* cygwin/GNUmakefile.in, win32/Makefile.sub (stub.o): make under
  win32 directory.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50161 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-04 01:02:51 +00:00
nobu 2403aa9867 GNUmakefile.in: fix dependency
* cygwin/GNUmakefile.in: fix dependency, win32.o should be under
  win32 directory.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49887 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-08 02:19:04 +00:00
nobu 896039f94b GNUmakefile.in: append resources always
* cygwin/GNUmakefile.in (EXTOBJS): override to add resource files
  always.  [ruby-core:67153] [Bug #10657]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49042 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-28 07:25:15 +00:00
shirosaki 868ab650eb * cygwin/GNUmakefile.in (uncommon.mk): link *.res.o.
EXTOBJES is defined in uncommon.mk. *.res.o setting should be below
  uncommon.mk.
  [ruby-core:48858] [Bug #7277]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37475 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-05 14:00:35 +00:00
shirosaki 14d59c122f extmk.rb: fix mingw make failure with make -jN
* common.mk (WPROGRAM): need same dependencies as PROGRAM.

* cygwin/GNUmakefile.in (uncommon.mk): move include position
  below WPROGRAM definition to be defined in uncommon.mk.

* ext/extmk.rb (all, static): fix make rubyw.exe failure with make -jN.
  If make of ruby.exe and rubyw.exe run in parallel, link dll and link
  exe run in parallel, which causes link failure on mingw. To fix this,
  we make ruby.exe and rubyw.exe in one make process.
  [ruby-core:48007] [Bug #7165]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37246 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-17 12:20:57 +00:00
nobu f5aca8a49e * cygwin/GNUmakefile.in (SCRIPTPROGRAMS): ignore backup files and etc.
* cygwin/GNUmakefile.in (scriptbin): set executable bit.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30163 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-10 09:28:42 +00:00
nobu 83e274d46d * cygwin/GNUmakefile.in, win32/Makefile.sub (clean): rc files are
made at compile time, so should be removed by clean.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29837 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-19 13:44:06 +00:00
nobu d05029240e * cygwin/GNUmakefile.in (SCRIPTPROGRAMS): no needs on cygwin.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29829 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-18 15:00:03 +00:00
nobu fd7c0279f8 * Makefile.in, common.mk, cygwin/GNUmakefile.in, enc/depend,
ext/ripper/depend, lib/mkmf.rb, win32/Makefile.sub: caddle up.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29769 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-12 11:51:42 +00:00
nobu 6c5115379d * cygwin/GNUmakefile.in: shorten messages.
* Makefile.in (install-cross, ext/extinit.o): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29753 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-11 13:03:42 +00:00
nobu 18bd7f8c84 * configure.in (SYMBOL_PREFIX): separate from EXPORT_PREFIX.
* win32/mkexports.rb (Exports#each_export): use SYMBOL_PREFIX.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29739 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-11 11:45:32 +00:00
nobu 536e266e58 * cygwin/GNUmakefile.in (scriptbin): make executable file from
scripts with stub.
* ruby.c (load_file_internal): assume xflag for exe file as well
  as no-shebang file.
* tool/rbinstall.rb: install script programs.
* win32/mkexports.rb (Exports#initialize): alias ruby_sysinit for
  stub.
* win32/stub.c: stub for scripts.  [EXPERIMENTAL]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29738 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-09 22:20:12 +00:00
nobu 835a5edf52 * Makefile.in (CPP): already used in .c.i rule.
* cygwin/GNUmakefile.in (DLLWRAP, WINDRES): add --driver-name and
  --preprocessor options explicitly.  [ruby-core:32776]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29516 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-16 01:55:01 +00:00
nobu a1d7e69106 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29425 b2dd03c8-39d4-4d8f-98ff-823fe69b080e 2010-10-08 01:52:37 +00:00
nobu 0dd56a828e * cygwin/GNUmakefile.in, win32/Makefile.sub (RCFILES): depend on
real config.rb file.  [ruby-core:32709]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29421 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-07 09:10:47 +00:00
nobu 5ac71d9f9e * cygwin/GNUmakefile.in (RUBYDEF): uses mkexports.rb on cygwin too.
* win32/mkexports.rb (Exports::Cygwin): added.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21989 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-02 23:18:30 +00:00
nobu 083e01b006 * cygwin/GNUmakefile.in (dir.o, win32.o): depend on win32/dir.h.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21964 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-02 08:23:15 +00:00
nobu 210651a8e0 * cygwin/GNUmakefile.in (RUBYDEF): depends on makefiles.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21889 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-30 03:59:51 +00:00
nobu 77285faf19 * cygwin/GNUmakefile.in (RUBYDEF): adds DATA to non-function symbols
which is not marked as T.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21888 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-30 03:57:31 +00:00
nobu 9c29032c73 * cygwin/GNUmakefile.in (RUBYDEF): needs DATA marks to export
non-function symbols.  [ruby-core:21582]

* win32/mkexports.rb (Exports::Mingw#each_export): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21795 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-27 05:41:38 +00:00
nobu 050a8e912f * cygwin/GNUmakefile.in (RUBYDEF): needs read-only section too.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21768 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-25 03:17:28 +00:00
nobu 2d03f7274f * Makefile.in (miniruby): renames and then removes, to get rid of
EPERM on cygwin and mingw.

* Makefile.in ($(LIBRUBY_SO)): use wildcard option of objcopy.

* configure.in (DLDFLAGS): do not export all symbols.

* cygwin/GNUmakefile.in (RUBYDEF): rejects symbols prefixex with
  Init_.

* win32/mkexports.rb (Exports::Mingw): includes all symbols except for
  prefixed with Init_ as well as mswin32.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21685 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-20 06:32:36 +00:00
nobu d9691f6e84 * cygwin/GNUmakefile.in (rubydll.def), win32/mkexports.rb
(Exports#exports): added VERSION.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20912 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-22 03:26:22 +00:00
nobu b025ce4678 * common.mk (ID_H_TARGET): phony target to update id.h.
* tool/ifchange, win32/ifchange.bat: --timestamp option added.

* tool/generic_erb.rb: --timestamp, --output and --if-change options
  added.

* template/id.h.tmpl: moved from id.h.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19822 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-17 10:46:23 +00:00
nobu 93e4ba927c * configure.in (uncommon.mk): ignores failures at loading.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19819 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-17 09:15:00 +00:00