From patchwork Wed Nov 21 02:47:34 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Xiang, Haihao" X-Patchwork-Id: 11101 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id DB1E544C604 for ; Wed, 21 Nov 2018 04:48:32 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 56B6B689D34; Wed, 21 Nov 2018 04:48:33 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C21F6689AD0 for ; Wed, 21 Nov 2018 04:48:26 +0200 (EET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Nov 2018 18:48:27 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,259,1539673200"; d="scan'208";a="97870533" Received: from xhh-cfl64.sh.intel.com ([10.239.13.24]) by FMSMGA003.fm.intel.com with ESMTP; 20 Nov 2018 18:48:26 -0800 From: Haihao Xiang To: ffmpeg-devel@ffmpeg.org Date: Wed, 21 Nov 2018 10:47:34 +0800 Message-Id: <20181121024734.29307-1-haihao.xiang@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [FFmpeg-devel] [PATCH] Fix link errors when HAVE_X86ASM is not defined X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Haihao Xiang MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" This fixes the link errors below: LD ffmpeg_g libavfilter/libavfilter.so: undefined reference to `ff_scene_sad_avx2' libavfilter/libavfilter.so: undefined reference to `ff_scene_sad_sse2' collect2: error: ld returned 1 exit status Makefile:108: recipe for target 'ffmpeg_g' failed make: *** [ffmpeg_g] Error 1 Signed-off-by: Haihao Xiang --- libavfilter/x86/scene_sad_init.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/libavfilter/x86/scene_sad_init.c b/libavfilter/x86/scene_sad_init.c index 461fa406d9..7e93ef44d3 100644 --- a/libavfilter/x86/scene_sad_init.c +++ b/libavfilter/x86/scene_sad_init.c @@ -20,6 +20,7 @@ #include "libavutil/x86/cpu.h" #include "libavfilter/scene_sad.h" +#if HAVE_X86ASM #define SCENE_SAD_FUNC(FUNC_NAME, ASM_FUNC_NAME, MMSIZE) \ void ASM_FUNC_NAME(SCENE_SAD_PARAMS); \ \ @@ -50,3 +51,12 @@ ff_scene_sad_fn ff_scene_sad_get_fn_x86(int depth) } return NULL; } + +#else + +ff_scene_sad_fn ff_scene_sad_get_fn_x86(int depth) +{ + return NULL; +} + +#endif \ No newline at end of file