diff options
| author | KJ Tsanaktsidis <kj@kjtsanaktsidis.id.au> | 2024-07-06 14:47:02 +1000 |
|---|---|---|
| committer | KJ Tsanaktsidis <kj@kjtsanaktsidis.id.au> | 2024-07-07 20:14:44 +1000 |
| commit | b18701a7ae0a71c339906ef0db4910fb43645b45 (patch) | |
| tree | e1d7f8859f0f0fdbc8a3c186c935e8dde27b584a /include/ruby/ruby.h | |
| parent | 087b461c8311886f8a9511930a065ef9fd6b57ce (diff) | |
Remove $(ASFLAGS) from build system and assemble with $(CFLAGS) instead
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]
Diffstat (limited to 'include/ruby/ruby.h')
0 files changed, 0 insertions, 0 deletions
