summaryrefslogtreecommitdiff
path: root/configure.ac
AgeCommit message (Collapse)Author
2022-10-30Try -fstack-protector-strong on MinGWNobuyoshi Nakada
The CI for MinGW has used it.
2022-10-29Clear `_FORTIFY_SOURCE` before definitionNobuyoshi Nakada
As clang on macOS defines this macro as 0 internally when a sanitizer option is given, clear it before definition to suppress redefinition warnings. Notes: Merged: https://github.com/ruby/ruby/pull/6646
2022-10-19YJIT: fold the "asm_comments" feature into "disasm" (#6591)Alan Wu
Previously, enabling only "disasm" didn't actually build. Since these two features are closely related and we don't really use one without the other, let's simplify and merge the two features together. Notes: Merged-By: maximecb <maximecb@ruby-lang.org>
2022-10-19Fix and improve coroutines for Darwin (macOS) ppc/ppc64. (#5975)Sergey Fedorov
Notes: Merged-By: ioquatix <samuel@codeotaku.com>
2022-10-15Remove wrong dollarNobuyoshi Nakada
2022-10-02[Bug #16909] Honor the tool prefix against pkg-configNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/6482
2022-09-27YJIT: reverse configure.ac changes that disable `--yjit-stats` on Graviton1 ↵Maxime Chevalier-Boisvert
(#6457) Reverse configure.ac changes that disable YJIT stats on Graviton1 Notes: Merged-By: maximecb <maximecb@ruby-lang.org>
2022-09-26Generate the revision.h before MakefileNobuyoshi Nakada
Except for GNU make which updates makefiles automatically, repeating configure in the same directory causes `make` to stop whenever pulled a new commit. This is unexpected in CIs. Notes: Merged: https://github.com/ruby/ruby/pull/6436
2022-09-25Extract `RUBY_RELEASE_DATE` from also revision.hNobuyoshi Nakada
This make variable is very useful for daily build. Notes: Merged: https://github.com/ruby/ruby/pull/6433 Merged-By: nobu <nobu@ruby-lang.org>
2022-09-23YJIT: Support Rust 1.58.1 for --yjit-stats on Arm (#6410)Takashi Kokubun
* YJIT: Test Rust 1.58.1 as well on Cirrus * YJIT: Avoid using a Rust 1.60.0 feature * YJIT: Use autoconf to detect support * YJIT: We actually need to run it for checking it properly * YJIT: Try cfg!(target_feature = "lse") * Revert "YJIT: Try cfg!(target_feature = "lse")" This reverts commit 4e2a9ca9a9c83052c23b5e205c91bdf79e88342e. * YJIT: Add --features stats only when it works * Update configure.ac Co-authored-by: Maxime Chevalier-Boisvert <maximechevalierb@gmail.com> Notes: Merged-By: maximecb <maximecb@ruby-lang.org>
2022-09-23Allow --enable-yjit on OpenBSDJeremy Evans
yjit uses _Unwind_* functions from libunwind. These functions are available in libc++abi (which requires libpthread), so add those to LDFLAGS if enabling yjit on OpenBSD. Notes: Merged: https://github.com/ruby/ruby/pull/6421
2022-09-20YJIT: Support MAKE=bmake for release buildAlan Wu
This add support for bmake, which should allow building with `configure --enable-yjit` for the BSDs. Tested on FreeBSD 13 and on macOS with `configure MAKE=bmake` on a case-sensitive file system. It works by including a fragment into the Makefile through the configure script, similar to common.mk. It uses the always rebuild approach to keep build system changes minimal. Notes: Merged: https://github.com/ruby/ruby/pull/6408
2022-09-17[Bug #19005] dynamic_lookup linker option in external librariesNobuyoshi Nakada
The warning against `-undefined dynamic_lookup` is just a warning yet, and many gems seem to pay no attention to warnings. Until it fails actually, keep it as a migration path, except for standard extension libraries and bundled extension gems. Notes: Merged: https://github.com/ruby/ruby/pull/6394 Merged-By: nobu <nobu@ruby-lang.org>
2022-09-14configure.ac: Apply suggestions from code review in #6366Kenta Murata
Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
2022-09-14configure.ac: Add --with-gmp-dir (#6366)Kenta Murata
Add the `--with-gmp-dir` to specify the prefix directory of GMP. The`--without-gmp` option is preserved for convenience. It can be used to force to reject using GMP even if the `--with-gmp-dir` option is specified. Notes: Merged-By: mrkn <mrkn@ruby-lang.org>
2022-09-14-undefined dynamic_lookup is obsoleteNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/6370
2022-09-14configure.ac: Manage OPT_DIR better (#6367)Nobuyoshi Nakada
* Check rpath flag earlier * Manage OPT_DIR at once Notes: Merged-By: mrkn <mrkn@ruby-lang.org>
2022-09-12Autoconf 2.70 or AC_PROG_CC_C99 for earlier is checking for C99Nobuyoshi Nakada
It is no longer necessary to add it to `CFLAGS`/`CPPFLAGS` later. Furthermore, as `CPPFLAGS` is used also with C++ compiler, the option particular to C such as `-std=gnu99` results in an error. Notes: Merged: https://github.com/ruby/ruby/pull/6361 Merged-By: nobu <nobu@ruby-lang.org>
2022-09-07Define BOOTSTRAPRUBY from HAVE_BASERUBYNobuyoshi Nakada
2022-09-07Ensure BASERUBY when cross-compilingNobuyoshi Nakada
2022-09-05Drop Solaris support for MJITTakashi Kokubun
I tried to debug: http://rubyci.s3.amazonaws.com/solaris10-gcc/ruby-master/log/20220905T070005Z.fail.html.gz but I don't have sudo privilege to install dependencies such as xz on that machine. Thus I can't extract a prebuilt libclang binary. Anyway, if we find out ABI is different from x86_64 / aarch64, we'd like to have sparc CI associated to GitHub to run `make mjit-bindgen`, but we can't. Supporting this could be too hard, so I'm leaving it for now.
2022-09-03BOOTSTRAPRUBY needs fake.rb when cross-compilingNobuyoshi Nakada
2022-09-03Make sources by BASERUBY if available instead of minirubyNobuyoshi Nakada
2022-09-03Exclude LIBPATHENV wrapper from PREPNobuyoshi Nakada
2022-09-03Check if MSys shell can run a command with a drive letterNobuyoshi Nakada
2022-08-12Stop defining `RUBY_ABI_VERSION` if released versionsNobuyoshi Nakada
As commented in include/ruby/internal/abi.h, since teeny versions of Ruby should guarantee ABI compatibility, `RUBY_ABI_VERSION` has no role in released versions of Ruby. Notes: Merged: https://github.com/ruby/ruby/pull/6231
2022-08-11Add `--enable-devel` configure optionNobuyoshi Nakada
Since `RUBY_DEVEL` in cppflags has no effect in the configure script and makefiles. Notes: Merged: https://github.com/ruby/ruby/pull/6230
2022-08-09Do not enable RUBY_DEVEL by RUBY_PATCHLEVELJeremy Evans
This makes RUBY_DEVEL not enabled automatically. It still can be enabled manually. Test manually using RUBY_DEVEL in CI. Implements [Feature #17468] Notes: Merged: https://github.com/ruby/ruby/pull/4993
2022-08-04Resolve abi symbols from libruby.dylib when availableYuta Saito
Notes: Merged: https://github.com/ruby/ruby/pull/6193
2022-08-04Resolve abi symbol references from miniruby to avoid circular depsYuta Saito
Adding `ruby` to `PREP` causes the following circular dependencies because `PREP` is used as a prerequisite by some targets required to build `ruby` target itself. ``` make: Circular .rbconfig.time <- ruby dependency dropped. make: Circular builtin_binary.inc <- ruby dependency dropped. make: Circular ext/extinit.c <- ruby dependency dropped. make: Circular ruby <- ruby dependency dropped. ``` Adding a new Make variable like `EXTPREP` only for exts may be also reasonable, but it would introduce another complexity into our build system. `-bundle_loader` doesn't care that link-time and run-time loader executables are different as long as bound symbols are provided, so it's ok to resolve from miniruby to simplify our build. Notes: Merged: https://github.com/ruby/ruby/pull/6193
2022-08-04Quote $(BUILTRUBY) so paths with spaces workAlan Wu
Notes: Merged: https://github.com/ruby/ruby/pull/6193
2022-08-04Link ext bundles with bundle loader option for newer ld64Yuta Saito
ld64 shipped with Xcode 14 emits a warning when using `-undefined dynamic_lookup`. ``` ld: warning: -undefined dynamic_lookup may not work with chained fixups ``` Actually, `-undefined dynamic_lookup` doesn't work when: 1. Link a *shared library* with the option 2. Link it with a program that uses the chained-fixup introduced from macOS 12 and iOS 15 because `-undefined dynamic_lookup` uses lazy-bindings and they won't be bound while dyld fixes-up by traversing chained-fixup info. However, we build exts as *bundles* and they are loaded only through `dlopen`, so it's safe to use `-undefined dynamic_lookup` in theory. So the warning produced by ld64 is false-positive, and it results failure of option checking in configuration. Therefore, it would be an option to ignore the warning during our configuration. On the other hand, `-undefined dynamic_lookup` is already deprecated on all darwin platforms except for macOS, so it's good time to get rid of the option. ld64 also provides `-bundle_loader <executable>` option, which allows to resolve symbols defined in the executable symtab while linking. It behaves almost the same with `-undefined dynamic_lookup`, but it makes the following changes: 1. Require that unresolved symbols among input objects must be defined in the executable. 2. Lazy symbol binding will lookup only the symtab of the bundle loader executable. (`-undefined dynamic_lookup` lookups all symtab as flat namespace) This patch adds `-bundle_loader $(RUBY)` when non-EXTSTATIC configuration by assuming ruby executable can be linked before building exts. See "New Features" subsection under "Linking" section for chained fixup https://developer.apple.com/documentation/xcode-release-notes/xcode-13-release-notes Notes: Merged: https://github.com/ruby/ruby/pull/6193
2022-07-29Add --enable-yjit=dev_nodebug configure optionJohn Hawthorn
Notes: Merged: https://github.com/ruby/ruby/pull/6105
2022-07-29Add --enable-yjit=stats configure optionJohn Hawthorn
Notes: Merged: https://github.com/ruby/ruby/pull/6105
2022-07-08Fix invalid mkdir detection on OpenBSDJeremy Evans
This was broken by 67e54ce4081abaa16774b93ccd33ccbd1d6c6531, which resulted in " -d" being used as the mkdir_p program. I think this is because $ac_install_sh has been set to '' at the point it is used. There's probably a better way to fix this, but this should allow the OpenBSD CI to continue to work until a better fix is in place. Notes: Merged: https://github.com/ruby/ruby/pull/6110
2022-07-07Fallback `mkdir_p` to `as_mkdir_p`Nobuyoshi Nakada
Assume `mkdir -p` to be race-free on recent systems. And we do not provide install-sh anyway.
2022-06-27[Bug #18879] Fix macOS version detectionsNobuyoshi Nakada
macOS's AvailabilityMacros.h does not contain macros for future versions. If a version macro is not defined, consider only earlier versions to be targeted.
2022-06-20[Feature #18839] Drop support for gcc 3 [ci skip]Nobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/6037
2022-06-18Show gcc version if too old, and move to GCC block [ci skip]Nobuyoshi Nakada
2022-06-18Disable maybe-uninitialized warning for gcc 4Nobuyoshi Nakada
It often shows false positive warnings (at least in 4.8). Newer versions work well and we can check correct warnings.
2022-06-18Disable Mach exception handlers when read barriers in placeKJ Tsanaktsidis
The GC compaction mechanism implements a kind of read barrier by marking some (OS) pages as unreadable, and installing a SIGBUS/SIGSEGV handler to detect when they're accessed and invalidate an attempt to move the object. Unfortunately, when a debugger is attached to the Ruby interpreter on Mac OS, the debugger will trap the EXC_BAD_ACCES mach exception before the runtime can transform that into a SIGBUS signal and dispatch it. Thus, execution gets stuck; any attempt to continue from the debugger re-executes the line that caused the exception and no forward progress can be made. This makes it impossible to debug either the Ruby interpreter or a C extension whilst compaction is in use. To fix this, we disable the EXC_BAD_ACCESS handler when installing the SIGBUS/SIGSEGV handlers, and re-enable them once the compaction is done. The debugger will still trap on the attempt to read the bad page, but it will be trapping the SIGBUS signal, rather than the EXC_BAD_ACCESS mach exception. It's possible to continue from this in the debugger, which invokes the signal handler and allows forward progress to be made. Notes: Merged: https://github.com/ruby/ruby/pull/5991
2022-06-17Update configure.acJeremiah Gowdy
Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org> Notes: Merged: https://github.com/ruby/ruby/pull/6025
2022-06-17Add branch protection to aarch64 targetsJeremiah Gowdy
Notes: Merged: https://github.com/ruby/ruby/pull/6025
2022-06-13Drop MinGW support of MJIT (#6012)Takashi Kokubun
[Feature #18824] Notes: Merged-By: k0kubun <takashikkbn@gmail.com>
2022-06-06Remove useless assignment always overriddenNobuyoshi Nakada
2022-06-06Export RbConfig::CONFIG["COROUTINE_TYPE"]nick evans
THREAD_MODEL is exported already, so this matches that. Exporting this is simpler than inspecting configure_args and arch and matching that up with a specific configure.ac. Fix GH-5976
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