Skip to content

Commit

Permalink
Makefile: Fix build when using clang as AS
Browse files Browse the repository at this point in the history
Unlike gcc, clang enforces -mgeneral-regs-only when used as the assembler so
this removes that flag to fix the error in #393. This is only needed for
utils_asm.S which has code saving/restoring SIMD state, but this commit applies
it to all asm files for simplicity since code for fp regs shouldn't be generated
unless they're explicitly used anyway.

Signed-off-by: Ayrton Munoz <[email protected]>
  • Loading branch information
ayrtonm authored and marcan committed Sep 24, 2024
1 parent 69d241c commit 58fe1d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ build/%.o: src/%.S
$(QUIET)echo " AS $@"
$(QUIET)mkdir -p $(DEPDIR)
$(QUIET)mkdir -p "$(dir $@)"
$(QUIET)$(AS) -c $(CFLAGS) -MMD -MF $(DEPDIR)/$(*F).d -MQ "$@" -MP -o $@ $<
$(QUIET)$(AS) -c $(BASE_CFLAGS) -MMD -MF $(DEPDIR)/$(*F).d -MQ "$@" -MP -o $@ $<

$(BUILD_FP_OBJS): build/%.o: src/%.c
$(QUIET)echo " CC FP $@"
Expand Down

0 comments on commit 58fe1d7

Please sign in to comment.