summaryrefslogtreecommitdiff
path: root/configure.ac
AgeCommit message (Collapse)Author
2022-05-22Disable usage of TLS unless availableNobuyoshi Nakada
Thread-local storage is supported since Mac OS X 10.7. Enable TLS only when the target version is enough.
2022-05-22Check if thread-local storage is supported on macOSNobuyoshi Nakada
We need thread-local storage on Clang, since 319afed20fba.
2022-05-22Ruby31: add support for Darwin ppc/ppc64 (#5927)Sergey Fedorov
* add coroutines for ppc & ppc64 * fix universal coroutine to include ppc & ppc64 * add powerpc*-darwin to configure.ac * fix thread_pthread for older systems Notes: Merged-By: ioquatix <samuel@codeotaku.com>
2022-05-12mkmf: Add a configure option to set verbose mode (V=1 or 0) in mkmf.rb.Jun Aruga
Note this change is only for `configure.ac`, not for Windows using `win32/configure.bat`. ``` $ ./configure --help | grep mkmf --enable-mkmf-verbose enable verbose in mkmf ``` Run the following command to enable the mkmf verbose mode. ``` $ ./configure --enable-mkmf-verbose $ grep MKMF_VERBOSE config.status S["MKMF_VERBOSE"]="1" ``` In this mkmf verbose mode, when compiling a native extension, the `rake compile` prints the compiling commands such as "gcc -I. <...> path/to/file" instead of "compiling path/to/file". ``` $ git clone https://github.com/deivid-rodriguez/byebug.git $ cd byebug $ bundle install --standalone $ bundle exec rake compile ... gcc -I. <...> path/to/file ... ``` Notes: Merged: https://github.com/ruby/ruby/pull/5879
2022-05-10Honor --with-thread option to enable pthreadNobuyoshi Nakada
2022-04-28Don't set LDFLAGS by defaultAaron Patterson
This fixes a bug where Ruby on macOS running on ARM would try to look in `/usr/local/lib` for things to link against, but the libraries in that directory are from the x86 installation of Homebrew [ruby-core:108424] Notes: Merged: https://github.com/ruby/ruby/pull/5855
2022-04-27Rust YJITAlan Wu
In December 2021, we opened an [issue] to solicit feedback regarding the porting of the YJIT codebase from C99 to Rust. There were some reservations, but this project was given the go ahead by Ruby core developers and Matz. Since then, we have successfully completed the port of YJIT to Rust. The new Rust version of YJIT has reached parity with the C version, in that it passes all the CRuby tests, is able to run all of the YJIT benchmarks, and performs similarly to the C version (because it works the same way and largely generates the same machine code). We've even incorporated some design improvements, such as a more fine-grained constant invalidation mechanism which we expect will make a big difference in Ruby on Rails applications. Because we want to be careful, YJIT is guarded behind a configure option: ```shell ./configure --enable-yjit # Build YJIT in release mode ./configure --enable-yjit=dev # Build YJIT in dev/debug mode ``` By default, YJIT does not get compiled and cargo/rustc is not required. If YJIT is built in dev mode, then `cargo` is used to fetch development dependencies, but when building in release, `cargo` is not required, only `rustc`. At the moment YJIT requires Rust 1.60.0 or newer. The YJIT command-line options remain mostly unchanged, and more details about the build process are documented in `doc/yjit/yjit.md`. The CI tests have been updated and do not take any more resources than before. The development history of the Rust port is available at the following commit for interested parties: https://github.com/Shopify/ruby/commit/1fd9573d8b4b65219f1c2407f30a0a60e537f8be Our hope is that Rust YJIT will be compiled and included as a part of system packages and compiled binaries of the Ruby 3.2 release. We do not anticipate any major problems as Rust is well supported on every platform which YJIT supports, but to make sure that this process works smoothly, we would like to reach out to those who take care of building systems packages before the 3.2 release is shipped and resolve any issues that may come up. [issue]: https://bugs.ruby-lang.org/issues/18481 Co-authored-by: Maxime Chevalier-Boisvert <maximechevalierb@gmail.com> Co-authored-by: Noah Gibbs <the.codefolio.guy@gmail.com> Co-authored-by: Kevin Newton <kddnewton@gmail.com> Notes: Merged: https://github.com/ruby/ruby/pull/5826
2022-04-09[DOC]Some link prefix replaceS-H-GAMELINKS
Notes: Merged: https://github.com/ruby/ruby/pull/5783
2022-04-07[DOC] Fix comment linksS-H-GAMELINKS
Notes: Merged: https://github.com/ruby/ruby/pull/5765
2022-03-31Remove dependency on libcapstoneAlan Wu
We have received reports of build failures due to this configuration check modifying compile flags. Since only YJIT devs use this library we can remove it to make Ruby easier to build for users. See: https://github.com/rbenv/ruby-build/discussions/1933 Notes: Merged: https://github.com/ruby/ruby/pull/5744 Merged-By: XrXr
2022-03-28Extract RUBY_REQUIRE_FUNCSNobuyoshi Nakada
2022-02-19Check if `__assume` is supportedNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/5577
2022-02-19Define `HAVE___BUILTIN_UNREACHABLE` instead of `UNREACHABLE`Nobuyoshi Nakada
`UNREACHABLE` in ruby/internal/has/builtin.h is only used as just a flag now, and redefined in ruby/backward/2/assume.h then. Notes: Merged: https://github.com/ruby/ruby/pull/5577
2022-02-17Do not search for commands with double tool prefixes [Bug #18504]Nobuyoshi Nakada
The `CC` found by `AC_CHECK_TOOL` is prefixed by the host triplet when cross compiling. To search for commands with `AC_CHECK_TOOL` based on that `CC` means to search also doubly prefixed names. Notes: Merged: https://github.com/ruby/ruby/pull/5565
2022-01-26Check if `execv` is available for ruby/missing.hNobuyoshi Nakada
As MinGW has the declaration, the `dllimport` attribute difference is warned when compiling missing/*.c without including ruby/win32.h. ``` ../src/include/ruby/missing.h:316:17: warning: 'execv' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] 316 | RUBY_EXTERN int execv(const char *, char *const []); | ^~~~~ ``` Notes: Merged: https://github.com/ruby/ruby/pull/5491 Merged-By: nobu <nobu@ruby-lang.org>
2022-01-26Use the prefixed pkg-config commandNobuyoshi Nakada
2022-01-22GCC provides -Wdiv-by-zeroNobuyoshi Nakada
2022-01-20MinGW also uses `rb_w32_shutdown`Nobuyoshi Nakada
Winsock's `shutdown` is incompatible with the other platforms. And autoconf fails to detect WINAPI functions on 32bit Windows, probably due to the argument size suffixes. Notes: Merged: https://github.com/ruby/ruby/pull/5469 Merged-By: nobu <nobu@ruby-lang.org>
2022-01-19Fix a missing commaNobuyoshi Nakada
2022-01-19[wasm] configure.ac: disable mjit on wasi by defaultYuta Saito
Notes: Merged: https://github.com/ruby/ruby/pull/5407
2022-01-19[wasm] configure.ac: don't require dup and dup2 only for wasiYuta Saito
Notes: Merged: https://github.com/ruby/ruby/pull/5407
2022-01-19configure.ac: stop overwriting cc wrapper by darwin-cc everytimeYuta Saito
Notes: Merged: https://github.com/ruby/ruby/pull/5407
2022-01-19[wasm] add coroutine/asyncify implementationYuta Saito
set the default coroutine_type as asyncify when wasi Notes: Merged: https://github.com/ruby/ruby/pull/5407
2022-01-19[wasm] wasm/missing.{c,h}: add missing libc stubs for wasi-libcYuta Saito
Notes: Merged: https://github.com/ruby/ruby/pull/5407
2022-01-19[wasm] add asyncify based setjmp, fiber, register scan emulationYuta Saito
configure.ac: setup build tools and register objects main.c: wrap main with rb_wasm_rt_start to handle asyncify unwinds tool/m4/ruby_wasm_tools.m4: setup default command based on WASI_SDK_PATH environment variable. checks wasm-opt which is used for asyncify. tool/wasm-clangw wasm/wasm-opt: a clang wrapper which replaces real wasm-opt with do-nothing wasm-opt to avoid misoptimization before asyncify. asyncify is performed at POSTLINK, but clang linker driver tries to run optimization by wasm-opt unconditionally. inlining pass at wasm level breaks asyncify's assumption, so should not optimize before POSTLIK. wasm/GNUmakefile.in: wasm specific rules to compile objects Notes: Merged: https://github.com/ruby/ruby/pull/5407
2022-01-19[wasm] configure.ac: setup platform specific librariesYuta Saito
These flags are very wasi-libc version specific, so updating wasi-libc may break the build. But supporting multiple wasi-libc versions in ruby doesn't have much benefit because wasi-libc is not installed in most systems. Notes: Merged: https://github.com/ruby/ruby/pull/5407
2022-01-19[wasm] configure.ac: disable stack-protectorYuta Saito
clang does not yet support stack-protector for wasm Notes: Merged: https://github.com/ruby/ruby/pull/5407
2022-01-18[Feature #18491] Drop support for HP-UXPeter Zhu
IA64 support was dropped in ticket #15894, so we can drop support for HP-UX. Notes: Merged: https://github.com/ruby/ruby/pull/5457
2022-01-07io_buffer.c: use mremap based resizing only when mremap availableYuta Saito
some libc implementations (e.g. wasi-libc) define MREMAP_MAYMOVE, but don't have mremap itself, so guard the use of mremap by HAVE_MREMAP Notes: Merged: https://github.com/ruby/ruby/pull/5401
2021-12-24configure.in: unexpand exec_prefix in includedirNobuyoshi Nakada
Replace `exec_prefix` in includedir as well as bindir, libdir, and so on. [Bug #18373] Notes: Merged: https://github.com/ruby/ruby/pull/5318
2021-12-07Move -ljemalloc to DLDLIBS [Bug #18391]Nobuyoshi Nakada
Set the alternative memory management library only as a platform specific library, without other libraries. Notes: Merged: https://github.com/ruby/ruby/pull/5223
2021-11-30Delete #if line during checking madvise() on SolarisNaohisa Goto
The madvise() declaration should always be compiled on Solaris to check whether the declaration is good on the environment. For the purpose, the #if line is unnecessary. (There was also a trivial typo that the #if was not closed by #endif and the check always failed with preprocessor error.)
2021-11-30Enable load-relative on SolarisNobuyoshi Nakada
2021-11-30Cache wheather madvise declaration is needed on SolarisNobuyoshi Nakada
2021-11-30Fix conflicting declaration on SolarisNobuyoshi Nakada
SunC ``` "cont.c", line 24: identifier redeclared: madvise current : function(pointer to char, unsigned int, int) returning int previous: function(pointer to void, unsigned int, int) returning int : "/usr/include/sys/mman.h", line 232 ``` GCC ``` cont.c:24:12: error: conflicting types for 'madvise' 24 | extern int madvise(caddr_t, size_t, int); | ^~~~~~~ In file included from cont.c:16: /usr/include/sys/mman.h:232:12: note: previous declaration of 'madvise' was here 232 | extern int madvise(void *, size_t, int); | ^~~~~~~ ```
2021-11-30Workaround for implicit declaration of function 'madvise' on SolarisNaohisa Goto
On Solaris, madvise(3C) is NOT defined for SUS (XPG4v2) or later, but MADV_* macros are defined when __EXTENSIONS__ is defined. This may cause compile error on Solaris 10 with GCC when "-Werror=implicit-function-declaration" and "-D_XOPEN_SOURCE=600" are added by configure.
2021-11-03configure.ac: don't use shutdown on emscriptenYusuke Endoh
... to absorb a change on Ubuntu 21.10
2021-10-30Split thread-model config into another ac fileYuta Saito
This is a first step to allow the thread-model implementation to be switched by configure's option Notes: Merged: https://github.com/ruby/ruby/pull/5043
2021-10-27Check old-style definitionsNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/5034
2021-10-20Mention YJIT in Capstone autoconf checkAlan Wu
2021-10-20conditionally add libcapstoneAaron Patterson
2021-10-20Directly link libcapstone for easier developmentAaron Patterson
This lets us use libcapstone directly from miniruby so we don't need a Ruby Gem to to dev work. Example usage: ```ruby def foo(x) if x < 1 "wow" else "neat" end end iseq = RubyVM::InstructionSequence.of(method(:foo)) puts UJIT.disasm(iseq) 100.times { foo 1 } puts UJIT.disasm(iseq) ``` Then in the terminal ``` $ ./miniruby test.rb == disasm: #<ISeq:foo@test.rb:1 (1,0)-(7,3)> (catch: FALSE) local table (size: 1, argc: 1 [opts: 0, rest: -1, post: 0, block: -1, kw: -1@-1, kwrest: -1]) [ 1] x@0<Arg> 0000 getlocal_WC_0 x@0 ( 2)[LiCa] 0002 putobject_INT2FIX_1_ 0003 opt_lt <calldata!mid:<, argc:1, ARGS_SIMPLE> 0005 branchunless 10 0007 putstring "wow" ( 3)[Li] 0009 leave ( 7)[Re] 0010 putstring "neat" ( 5)[Li] 0012 leave ( 7)[Re] == ISEQ RANGE: 10 -> 10 ======================================================== 0x0: movabs rax, 0x7fe816e2d1a0 0xa: mov qword ptr [rdi], rax 0xd: mov r8, rax 0x10: mov r9, rax 0x13: mov r11, r12 0x16: jmp qword ptr [rax] == ISEQ RANGE: 0 -> 7 ========================================================== 0x0: mov rax, qword ptr [rdi + 0x20] 0x4: mov rax, qword ptr [rax - 0x18] 0x8: mov qword ptr [rdx], rax 0xb: mov qword ptr [rdx + 8], 3 0x13: movabs rax, 0x7fe817808200 0x1d: test byte ptr [rax + 0x3e6], 1 0x24: jne 0x3ffff7b 0x2a: test byte ptr [rdx], 1 0x2d: je 0x3ffff7b 0x33: test byte ptr [rdx + 8], 1 0x37: je 0x3ffff7b 0x3d: mov rax, qword ptr [rdx] 0x40: cmp rax, qword ptr [rdx + 8] 0x44: movabs rax, 0 0x4e: movabs rcx, 0x14 0x58: cmovl rax, rcx 0x5c: mov qword ptr [rdx], rax 0x5f: test qword ptr [rdx], -9 0x66: jne 0x3ffffd5 ``` Make sure to `brew install pkg-config capstone`
2021-10-18haiku configure fix (again).David CARLIER
Notes: Merged: https://github.com/ruby/ruby/pull/4980
2021-10-17haiku build update stack overflow check in libroot (haiku's libc) nowDavid CARLIER
Notes: Merged: https://github.com/ruby/ruby/pull/4978
2021-10-08Do not allow configuration where neither static or shared library is installedJeremy Evans
Fixes [Bug #18000] Notes: Merged: https://github.com/ruby/ruby/pull/4737
2021-10-02[Win32] Prefer Cryptography Next Generation APINobuyoshi Nakada
[BCryptGenRandom] is available since Windows Vista / Windows Server 2008. Regarding [CryptGenRandom]: > This API is deprecated. New and existing software should start > using Cryptography Next Generation APIs. Microsoft may remove > this API in future releases. [BCryptGenRandom]: https://docs.microsoft.com/en-us/windows/win32/api/bcrypt/nf-bcrypt-bcryptgenrandom [CryptGenRandom]: https://docs.microsoft.com/en-us/windows/win32/api/wincrypt/nf-wincrypt-cryptgenrandom Notes: Merged: https://github.com/ruby/ruby/pull/4924
2021-10-01Checks for CPU specific header on universal buildNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/4921
2021-10-01Define ACTION-IF-UNIVERSAL of `AC_C_BIGENDIAN` [Bug #18156]Nobuyoshi Nakada
As we do not use config.h.in, just define the helper macro instead.
2021-09-30Needs `AC_PROG_CC`Nobuyoshi Nakada
Although `AC_PROG_CC_C99` has been obsolete, `AC_PROG_CC` is not and the latter is necessary not to make C++ compiler mandatory. Notes: Merged: https://github.com/ruby/ruby/pull/4914
2021-09-20MINGW-UCRT: Set CONFIG['arch'] and RUBY_PLATFORM to "x64-mingw-ucrt"Lars Kanis
This allows easy differentiation between ABI incompatible platforms like MSWIN64 and MSVCRT-based MINGW32. This also implicates a distinct rubygem platform which is also "x64-mingw-ucrt". Although the term "mingw32" is the OS-part for 64 bit systems as well, the "32" is misleading and confusing for many users. Therefore the new platform string drops the "32" from the OS part to just "mingw". This conforms to the common practice of windows platform testing per RUBY_PLATFORM=~/mswin|mingw/ . Notes: Merged: https://github.com/ruby/ruby/pull/4599