From: "kjtsanaktsidis (KJ Tsanaktsidis) via ruby-core" Date: 2024-07-03T11:58:31+00:00 Subject: [ruby-core:118427] [Ruby master Bug#20601] Configuration flags are not properly propagated to assembler Issue #20601 has been updated by kjtsanaktsidis (KJ Tsanaktsidis). Just one more thing: I was worried for a moment that trying to assemble with `$CFLAGS` would cause problems if you had some C-language specific things in cflags, but actually it seems to work fine - even if you have something like `-std=gnu11` or some such. ---------------------------------------- Bug #20601: Configuration flags are not properly propagated to assembler https://bugs.ruby-lang.org/issues/20601#change-108940 * Author: vo.x (Vit Ondruch) * Status: Open * ruby -v: ruby 3.3.2 (2024-05-30 revision e5a195edf6) [x86_64-linux] * Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN ---------------------------------------- Looking into #18061, one of the issues is that the `.S` files are not processed with the correct flags. For example to have the CET enabled, the `-fcf-protection` should be used to preprocess the `coroutine/amd64/Context.S`. First I thought there is something wrong on Fedora side, therefore I have proposed to export the `ASFLAGS` [1]. However, as it turns out, `$(ASFLAGS)` are used by GNU make default rule and passed to `$(AS)`. And indeed, Ruby had historically override of this rule, but it does not do this anymore since: https://github.com/ruby/ruby/commit/091422388e943de1e67ace6faac3d71ed08c14d2 https://github.com/ruby/ruby/commit/42575570a908aac979a80b89266804c4c688dd7c As can be seen, while previously `$(AS)` was used to process the `.s` file, it was replaced by the compiler. This however means that the `.S` files are not preprocessed with the `$(CFLAGS)`, which contains `-fcf-protection`. [1]: https://bugzilla.redhat.com/show_bug.cgi?id=2293107 -- https://bugs.ruby-lang.org/ ______________________________________________ ruby-core mailing list -- ruby-core@ml.ruby-lang.org To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/