summaryrefslogtreecommitdiff
path: root/configure.ac
AgeCommit message (Collapse)Author
13 daysCheck for 64bit atomic operationsNobuyoshi Nakada
May not be supported on some 32bit architectures. ``` /usr/lib/gcc-cross/m68k-linux-gnu/14/../../../../m68k-linux-gnu/bin/ld: ../../libruby-static.a(vm.o): in function `rbimpl_atomic_u64_set_relaxed': /home/ubuntu/build/ruby/master/m68k-linux/../src/ruby_atomic.h:60:(.text+0x2468): undefined reference to `__atomic_store_8' /usr/lib/gcc-cross/m68k-linux-gnu/14/../../../../m68k-linux-gnu/bin/ld: ../../libruby-static.a(vm.o): in function `rbimpl_atomic_u64_load_relaxed': /home/ubuntu/build/ruby/master/m68k-linux/../src/ruby_atomic.h:43:(.text+0x2950): undefined reference to `__atomic_load_8' ``` Notes: Merged: https://github.com/ruby/ruby/pull/13509
2025-05-28ZJIT: Add --enable-zjit=dev_nodebug (#13456)Takashi Kokubun
Notes: Merged-By: k0kubun <[email protected]>
2025-05-20Silence error messages of `cd` to non-existent opt directoriesNobuyoshi Nakada
2025-05-19ZJIT: Propagate disasm feature to ZJIT and YJIT (#13372)Takashi Kokubun
Co-authored-by: Alan Wu <[email protected]> Notes: Merged-By: k0kubun <[email protected]>
2025-05-15YJIT: ZJIT: Allow both JITs in the same buildAlan Wu
This commit allows building YJIT and ZJIT simultaneously, a "combo build". Previously, `./configure --enable-yjit --enable-zjit` failed. At runtime, though, only one of the two can be enabled at a time. Add a root Cargo workspace that contains both the yjit and zjit crate. The common Rust build integration mechanisms are factored out into defs/jit.mk. Combo YJIT+ZJIT dev builds are supported; if either JIT uses `--enable-*=dev`, both of them are built in dev mode. The combo build requires Cargo, but building one JIT at a time with only rustc in release build remains supported. Notes: Merged: https://github.com/ruby/ruby/pull/13262
2025-05-12Detect `clock_gettime` and `clock_getres` for winpthreadsNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/13304
2025-05-02YJIT: ZJIT: Share identical glue functionsAlan Wu
Working towards having YJIT and ZJIT in the same build, we need to deduplicate some glue code that would otherwise cause name collision. Add jit.c for this and build it for YJIT and ZJIT builds. Update bindgen to look at jit.c; some shuffling of functions in the output, but the set of functions shouldn't have changed. Notes: Merged: https://github.com/ruby/ruby/pull/13229
2025-04-18Enable YJIT by defaultTakashi Kokubun
Notes: Merged: https://github.com/ruby/ruby/pull/13131
2025-04-18Let ZJIT and YJIT disable each otherTakashi Kokubun
Notes: Merged: https://github.com/ruby/ruby/pull/13131
2025-04-18Use separate cargo build flagsTakashi Kokubun
Notes: Merged: https://github.com/ruby/ruby/pull/13131
2025-04-18Pass CARGO_BUILD_ARGS through properlyAlan Wu
Notes: Merged: https://github.com/ruby/ruby/pull/13131
2025-04-18Fix template/Makefile.inTakashi Kokubun
Notes: Merged: https://github.com/ruby/ruby/pull/13131
2025-04-18Link zjit into the interpreterTakashi Kokubun
Notes: Merged: https://github.com/ruby/ruby/pull/13131
2025-02-17Check programs for CC in the same pathNobuyoshi Nakada
When the path of `CC` contains the target program name, e.g., clang, the replaced program names were unexpected. Replace basename part only. Notes: Merged: https://github.com/ruby/ruby/pull/12762
2025-02-13[Feature #21116] Extract RJIT as a third-party gemNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/12740
2025-01-09Enable riscv64 coroutine on OpenBSD/riscv64Jeremy Evans
Notes: Merged: https://github.com/ruby/ruby/pull/12534
2025-01-08[Bug #21017] Fix `--with-parser` configure optionNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/12532
2024-12-18Fix the end of "dlext & soext" section [ci skip]Nobuyoshi Nakada
2024-12-05Standardize on the name "modular GC"Peter Zhu
We have name fragmentation for this feature, including "shared GC", "modular GC", and "external GC". This commit standardizes the feature name to "modular GC" and the implementation to "GC library". Notes: Merged: https://github.com/ruby/ruby/pull/12261
2024-11-26[MinGW] - Fix NET_LUID checkRaed Rizqie
Notes: Merged: https://github.com/ruby/ruby/pull/12165
2024-11-09[Bug #20800] Use config target for bin directory as-isNobuyoshi Nakada
The "target" in `RbConfig::CONFIG` is being changed from config.sub to align to the system `uname`. Use the value modified by config.sub, and make the directory same as GNU utilities, such as binutils. Notes: Merged: https://github.com/ruby/ruby/pull/12043
2024-11-09[Bug #20800] Locate executable binary file under "libexec" directlyNobuyoshi Nakada
"libexec" means the directory for executable or binary files already. Notes: Merged: https://github.com/ruby/ruby/pull/12043
2024-11-09Add integer overflow check macros for add/sub as well as mulNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/12034
2024-10-23Check if -pipe option worksNobuyoshi Nakada
With `-pipe` option, gcc of Homebrew on macOS results in a mysterious error. ``` $ command -v gcc-14 /opt/homebrew/bin/gcc-14 $ gcc-14 --version gcc-14 (Homebrew GCC 14.2.0) 14.2.0 Copyright (C) 2024 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $ gcc-14 -c -pipe conftest.c clang: error: no input files ``` Notes: Merged: https://github.com/ruby/ruby/pull/11928
2024-10-11Improve RUBY_GC_LIBRARYPeter Zhu
Instead of passing the full GC SO file name to RUBY_GC_LIBRARY, we now only need to pass the GC name. For example, before we needed to pass `RUBY_GC_LIBRARY=librubygc.default.so` but now we only need to pass `RUBY_GC_LIBRARY=default`. Notes: Merged: https://github.com/ruby/ruby/pull/11866
2024-10-10Add `--with-parser` configure optionNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/11852
2024-10-05Use quadrigraphs for a hashNobuyoshi Nakada
So that the closing bracket does not look like commented out.
2024-10-04[Bug #20783] Insert a space between RPATHFLAG and LIBPATHFLAGNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/11797
2024-09-29Remove leading spaces from `LIBPATHFLAG` and `RPATHFLAG`Nobuyoshi Nakada
Join with a space in `MakeMakefile#libpathflag` instead. Notes: Merged: https://github.com/ruby/ruby/pull/11724
2024-09-19Use ppc64le coroutines for powerpc64-freebsd*Piotr Kubaj
There is nothing endianness-related in ppc64le and all the tests pass on both ucontext and ppc64le coroutines on powerpc64-freebsd14.0 Notes: Merged: https://github.com/ruby/ruby/pull/10595
2024-09-19Use ppc64le coroutines on powerpc64le-freebsd*Piotr Kubaj
Only one ractor-related test fails, but it also fails with ucontext. Notes: Merged: https://github.com/ruby/ruby/pull/10595
2024-09-06Add an explicit check for broken libunwind buildsKJ Tsanaktsidis
Libunwind as packaged in MacOS cannot actually unwind code which has pointer authentication on, because _LIBUNWIND_IS_NATIVE_ONLY is not defined. Add a check for this, and prefer building with working unwinding over pointer authentication if we must make a choice. Notes: Merged: https://github.com/ruby/ruby/pull/11548
2024-09-06Revert "Check for both aarch64 and arm64 arch's for pac-ret"Peter Zhu
This reverts commit 6a746e1bc902d4245aac58db4e9ffc2f72d79629. This patch breaks the C level backtrace on macOS ARM machines. Notes: Merged: https://github.com/ruby/ruby/pull/11548
2024-08-22Check for both aarch64 and arm64 arch's for pac-retKJ Tsanaktsidis
Linux calls it aarch64, but MacOS calls it arm64; pac-ret works on both. Notes: Merged: https://github.com/ruby/ruby/pull/11405
2024-08-21[Bug #20687] Check if base ruby provides necessary librariesNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/11419
2024-08-16Revert soname changesRaed Rizqie
- only i386-ucrt soname is changed to fix building on x86 clang - fix detection of x86intrin.h on x86 system - mingw does not have LIBRUBY_SONAME Notes: Merged: https://github.com/ruby/ruby/pull/11362
2024-08-12Revert change of "mingw-ucrt" platform stringLars Kanis
... of commit 00176cd40fe9f385231e9c20b956fc4a84d240b9. The reverted change was made only for constistency, as discussed in https://github.com/ruby/ruby/pull/11358#issuecomment-2282222369 But the platform string "mingw-ucrt" should not be changed. It is used as RUBY_PLATFORM and as the rubygems platform, so that there should be a good reason to change the name of an established platform. "mingw-ucrt" was introduced intentionally in commit 576b2e64cdc5ea42ad345dd3c1c215e006c06fca. Related to GH-11358 Notes: Merged: https://github.com/ruby/ruby/pull/11364 Merged-By: XrXr
2024-08-11fix ucrt archRaed Rizqie
Notes: Merged: https://github.com/ruby/ruby/pull/11358
2024-07-18YJIT: Allow dev_nodebug to disasm release-mode code (#11198)Takashi Kokubun
* YJIT: Allow dev_nodebug to disasm release-mode code * Revert "YJIT: Squash canary before falling back" This reverts commit f05ad373d84909da7541bd6d6ace38b48eaf24a1. The stray canary issue should have been solved by def7023ee4a3fc6eeba9d3a34c31a5bcff315fac, alleviating this codegen accommodation. * s/runtime_assertions/runtime_checks/ --------- Co-authored-by: Alan Wu <[email protected]> Notes: Merged-By: k0kubun <[email protected]>
2024-07-16Stop using `sigsetjmp` to hijack SIGCHLD handlerNobuyoshi Nakada
It already has been dead code. Follow up of 65d3eacc80bbefb29e5cd0f3f9661d886f2e4cee.
2024-07-16Fix a typoKazuhiro NISHIYAMA
[Misc #20636]
2024-07-07Revert autoconf macros defining RUBY_AARCH64_{BTI|PAC}_ENABLEDKJ Tsanaktsidis
This partially reverts https://github.com/ruby/ruby/pull/10944; now that we decided to pass CFLAGS to $(CC) when assembling .S files, we don't need these autoconf macros that capture the state of __ARM_FEATURE{PAC|BTI}_DEFAULT. [Bug #20601]
2024-07-07Remove $(ASFLAGS) from build system and assemble with $(CFLAGS) insteadKJ Tsanaktsidis
We already assemble our assembly files using the $(CC) compiler driver, rather than the actual $(AS) assembler. This means that * The C preprocessor gets run on the assembly file * It's valid to pass gcc-style flags to it, like e.g. -mbranch-protection or -fcf-protection * If you do so, the relevant preprocessor macros like __CET__ get set * If you really wanted to pass assembler flags, you would need to do that using -Wa,... anyway So I think it makes sense to pass "$(XCFLAGS) $(CFLAGS) $(CPPFLAGS)" to gcc/clang/etc when assembling, rather than passing $(ASFLAGS) (since the flags are not actually passed to `as`, but `cc`!). The side effect of this is that if there are mitigation flags like -fcf-protection in $CFLAGS, then the relevant macros like __CET__ will be defined when assembling the files. [Bug #20601]
2024-07-05Change external GC to use directory at configurePeter Zhu
This commit changes the external GC API to use `--with-shared-gc=DIR` at configure time with a directory of the external GC and uses `RUBY_GC_LIBRARY` environment variable to load the external GC at runtime.
2024-07-03Add explicit compiler fence when pushing frames to ensure safe profilingIvo Anjo
**What does this PR do?** This PR tweaks the `vm_push_frame` function to add an explicit compiler fence (`atomic_signal_fence`) to ensure profilers that use signals to interrupt applications (stackprof, vernier, pf2, Datadog profiler) can safely sample from the signal handler. **Motivation:** The `vm_push_frame` was specifically tweaked in https://github.com/ruby/ruby/pull/3296 to initialize the a frame before updating the `cfp` pointer. But since there's nothing stopping the compiler from reordering the initialization of a frame (`*cfp =`) with the update of the cfp pointer (`ec->cfp = cfp`) we've been hesitant to rely on this on the Datadog profiler. In practice, after some experimentation + talking to folks, this reordering does not seem to happen. But since modern compilers have a way for us to exactly tell them not to do the reordering (`atomic_signal_fence`), this seems even better. I've actually extracted `vm_push_frame` into the "Compiler Explorer" website, which you can use to see the assembly output of this function across many compilers and architectures: https://godbolt.org/z/3oxd1446K On that link you can observe two things across many compilers: 1. The compilers are not reordering the writes 2. The barrier does not change the generated assembly output (== has no cost in practice) **Additional Notes:** The checks added in `configure.ac` define two new macros: * `HAVE_STDATOMIC_H` * `HAVE_DECL_ATOMIC_SIGNAL_FENCE` Since Ruby generates an arch-specific `config.h` header with these macros upon installation, this can be used by profilers and other libraries to test if Ruby was compiled with the fence enabled. **How to test the change?** As I mentioned above, you can check https://godbolt.org/z/3oxd1446K to confirm the compiled output of `vm_push_frame` does not change in most compilers (at least all that I've checked on that site).
2024-06-22Exported symbols in DLL on Windows are managed by win32/mkexports.rbNobuyoshi Nakada
2024-06-22build: fix crossruby build by handling empty `ac_abs_builddir`Yuta Saito
`ac_abs_builddir` can be empty when the build is top-level (not subdirs, and Ruby is usually the case). In such case, the MINIRUBY is expanded to `$RUBY -I -r'$(arch)-fake'`, which interprets `-r$(arch)-fake` as an argument to `-I` option. This led to: - Not loading the fake config file - Then not setting `CROSS_COMPILING` constant during extmk.rb execution - Then misusing cross-compiled `./miniruby` instead of baseruby to generate files used in exts. This commit fixes the issue by handling the empty `ac_abs_builddir` case properly.
2024-06-22Get rid of nesting backquotesNobuyoshi Nakada
Also executing variable containing an option may not be portable. Follow up of dd378c5a2483002d50053cf81d00004c1fb3c8bd.
2024-06-22Expand --with-opt-dir argumentsNobuyoshi Nakada
2024-06-21Support LCOV 2.0Yusuke Endoh
LCOV 2.0, a GCOV frontend, seems to have stricter error checking