You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2026-06-09 00:37:18 +02:00
configure: Provide checkasm_header_config_generated.h as well
This is required for overriding defines that exist in the public headers of checkasm, when e.g. building with assembly disabled for an architecture where we normally would use the checked_call wrapper. This fixes a leftover in how checkasm is integrated into the ffmpeg build system; there were many different approaches considered for fixing --disable-asm, and the ffmpeg configure integration didn't end up matching the final solution. This fixes building with --disable-asm.
This commit is contained in:
@@ -8872,6 +8872,28 @@ if enabled checkasm; then
|
||||
EOF
|
||||
|
||||
print_config HAVE_ "$TMPH" elf_aux_info getauxval ioctl isatty linux_perf pthread_np_h pthread_setaffinity_np sigaction siglongjmp clock_gettime prctl
|
||||
|
||||
if enabled aarch64; then
|
||||
print_config HAVE_ "$TMPH" as_archext_sve_directive sve
|
||||
print_config HAVE_ "$TMPH" as_archext_sme_directive sme
|
||||
elif enabled riscv; then
|
||||
print_config HAVE_ "$TMPH" sys_hwprobe_h asm_hwprobe_h
|
||||
fi
|
||||
|
||||
cat >> $TMPH <<EOF
|
||||
#endif /* FFMPEG_CHECKASM_CONFIG_GENERATED_H */
|
||||
EOF
|
||||
|
||||
cp_if_changed $TMPH checkasm_config_generated.h
|
||||
|
||||
# Reopen a new TMPH for checkasm_config_generated.h
|
||||
cat > $TMPH <<EOF
|
||||
/* Automatically generated by configure - do not modify! */
|
||||
#ifndef FFMPEG_CHECKASM_HEADER_CONFIG_GENERATED_H
|
||||
#define FFMPEG_CHECKASM_HEADER_CONFIG_GENERATED_H
|
||||
|
||||
EOF
|
||||
|
||||
print_config CHECKASM_ARCH_ "$TMPH" $ARCH_LIST
|
||||
|
||||
# The callcheck harness requires x86asm/rv support on these platforms, so
|
||||
@@ -8892,18 +8914,11 @@ EOF
|
||||
EOF
|
||||
fi
|
||||
|
||||
if enabled aarch64; then
|
||||
print_config HAVE_ "$TMPH" as_archext_sve_directive sve
|
||||
print_config HAVE_ "$TMPH" as_archext_sme_directive sme
|
||||
elif enabled riscv; then
|
||||
print_config HAVE_ "$TMPH" sys_hwprobe_h asm_hwprobe_h
|
||||
fi
|
||||
|
||||
cat >> $TMPH <<EOF
|
||||
#endif /* FFMPEG_CHECKASM_CONFIG_GENERATED_H */
|
||||
#endif /* FFMPEG_CHECKASM_HEADER_CONFIG_GENERATED_H */
|
||||
EOF
|
||||
|
||||
cp_if_changed $TMPH checkasm_config_generated.h
|
||||
cp_if_changed $TMPH checkasm_header_config_generated.h
|
||||
|
||||
if enabled x86asm; then
|
||||
append config_files $TMPASM
|
||||
|
||||
@@ -147,11 +147,15 @@ $(CHECKASMOBJS): CFLAGS := -I$(SRC_PATH)/tests/checkasm/ext/include $(CFLAGS)
|
||||
$(CHECKASMOBJS): ASFLAGS := -I$(SRC_PATH)/tests/checkasm/ext/include $(ASFLAGS)
|
||||
OUTDIRS += $(CHECKASMDIRS)
|
||||
|
||||
# Expose checkasm_config_generated.h/asm to checkasm tests as well, as it
|
||||
# Expose checkasm_config_header_generated.h to checkasm tests as well, as it
|
||||
# modifies the behavior of include/checkasm/header_config.h
|
||||
$(CHECKASMOBJS): CFLAGS += -DCHECKASM_HAVE_GENERATED_H
|
||||
$(CHECKASMOBJS): ASFLAGS += -DCHECKASM_HAVE_GENERATED_H
|
||||
$(CHECKASMOBJS): X86ASMFLAGS += -DCHECKASM_HAVE_GENERATED_H
|
||||
$(CHECKASMOBJS): CFLAGS += -DCHECKASM_HAVE_HEADER_GENERATED_H
|
||||
$(CHECKASMOBJS): ASFLAGS += -DCHECKASM_HAVE_HEADER_GENERATED_H
|
||||
|
||||
# Expose checkasm_config_generated.h/asm only to checkasm itself.
|
||||
$(EXT_CHECKASMOBJS): CFLAGS += -DCHECKASM_HAVE_GENERATED_H
|
||||
$(EXT_CHECKASMOBJS): ASFLAGS += -DCHECKASM_HAVE_GENERATED_H
|
||||
$(EXT_CHECKASMOBJS): X86ASMFLAGS += -DCHECKASM_HAVE_GENERATED_H
|
||||
|
||||
tests/checkasm/checkasm.o: CFLAGS += -Umain
|
||||
|
||||
|
||||
Reference in New Issue
Block a user