Bug 982693 - use -fno-integrated-as (if available) with clang when building vp8_asm_enc_offsets.c r=tterriberry

This commit is contained in:
Landry Breuil 2014-07-11 09:55:27 +02:00
parent 76608dbfec
commit 69da078887
2 changed files with 20 additions and 1 deletions

View File

@ -7798,6 +7798,25 @@ AC_SUBST(PROFILE_GEN_LDFLAGS)
AC_SUBST(PROFILE_USE_CFLAGS)
AC_SUBST(PROFILE_USE_LDFLAGS)
dnl =============================================
dnl Support for -fno-integrated-as (recent clang)
dnl =============================================
dnl Under clang 3.4+, use -fno-integrated-as to
dnl build libvpx's vp8_asm_enc_offsets.c
_SAVE_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -fno-integrated-as"
AC_MSG_CHECKING([whether C compiler supports -fno-integrated-as])
AC_TRY_COMPILE([], [return 0;],
[ NO_INTEGRATED_AS_CFLAGS="-fno-integrated-as"
result="yes" ], result="no")
AC_MSG_RESULT([$result])
CFLAGS="$_SAVE_CFLAGS"
AC_SUBST(NO_INTEGRATED_AS_CFLAGS)
fi # ! SKIP_COMPILER_CHECKS
AC_DEFINE(CPP_THROW_NEW, [throw()])

View File

@ -75,7 +75,7 @@ vp8_asm_enc_offsets.s: CFLAGS := -DINLINE_ASM
vp8_asm_enc_offsets.s: $(srcdir)/vp8/encoder/vp8_asm_enc_offsets.c
$(REPORT_BUILD)
$(CC) -S $(COMPILE_CFLAGS) $(TARGET_LOCAL_INCLUDES) $(_VPATH_SRCS)
$(CC) -S $(COMPILE_CFLAGS) $(NO_INTEGRATED_AS_CFLAGS) $(TARGET_LOCAL_INCLUDES) $(_VPATH_SRCS)
vp8_asm_enc_offsets.asm: vp8_asm_enc_offsets.s
grep $(OFFSET_PATTERN) $< | sed -e 's/[$$\#]//g' \