From patchwork Tue Aug 22 19:26:46 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Kacper Michajlow X-Patchwork-Id: 4799 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.2.137.29 with SMTP id o29csp1182930jaj; Tue, 22 Aug 2017 12:35:35 -0700 (PDT) X-Received: by 10.223.163.74 with SMTP id d10mr126561wrb.82.1503430535642; Tue, 22 Aug 2017 12:35:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1503430535; cv=none; d=google.com; s=arc-20160816; b=jX7WLzApG3D2kTaJuD3EnkLsvQobIDheM00K3GN0ct+lEzsqCUw0iQyBa5ys7F7PAu 05X/Pw/b3/s99LcaU67EtWGLTWn/l0VDB69Vz01bqxohV/ZqRzCebOTOrrrQnzCt5VkO 1O2efHP0I4a1moiyJgV8jiQjO+/n47XBr3AV6RAnKT4F60fIHCShaYk8cuJAjvVW3fNG P87ju9/utAWyO/Rzbk1rj1ZDboKZlyzBhezhcUwCgoe6V0McDJ1SkdNFKBvPEW1dq3Q3 yBPkEmr8GWxpwvEQ4zZKEnuzVgGTaXf61NyrnaoEqKgWvkIKcXjVhtD+jvq1zCyIKRxs 4QBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:mime-version:message-id:date:to:from :dkim-signature:delivered-to:arc-authentication-results; bh=Am7M8oI+xiqa5AioS5JFAL/lkg3bmIAI0VV6kThVk3s=; b=hSeT6UFlKp685IuwZoFpaPmZuDJ1U45jM0UFag5hBfqp39E+Sr4aRQmgWEhhQ+0vpI Gs67IpcYh02f8K1JoXsBUw524dKOuZg2j29hUVrXu0Ko766J0yVwMl33TjOJ61RlpcFt 4KHoKXeZFTforN1c2Ghw5rehxCb/d8EystTszRxvBiAkzndgj02V1kefXtYmb6WcrmKb 1nieMKdqf9z1OhxWZFiK04819RgsdZfaGOhfGTLJKVFIQc+M1UyJlawG8wAq9lzX0jq5 CfEkonWyhm80TqPUUddlLIQUVgRuYfMMte9Lqlwduk0rUcRofZfbRTYO/4zzIladYmzn 0VLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=fGk7GpFJ; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id h15si30486wmi.263.2017.08.22.12.35.34; Tue, 22 Aug 2017 12:35:35 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=fGk7GpFJ; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 3E33768831C; Tue, 22 Aug 2017 22:35:24 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-lf0-f67.google.com (mail-lf0-f67.google.com [209.85.215.67]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 0269D689BDA for ; Tue, 22 Aug 2017 22:35:17 +0300 (EEST) Received: by mail-lf0-f67.google.com with SMTP id d202so3166134lfd.2 for ; Tue, 22 Aug 2017 12:35:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=nkJZqV+zmeFifG9dzikC0uP6mbQhhMLnLGyVfhPVCWo=; b=fGk7GpFJWj3bIMYNrTLyroan+4FIpEMLf/uHm9tub5+VDo6DCqcxFHmtxga4dbEEKj 0gvzCZIOjVWOsodVw3OG+xk7XIQ9MTmg1egd3xKPKBe7+QMxPh1295ou+b2PAnh7guez DvAtx295lD1MpA9soEhJ+2o4y1FLMfLUKiNcghrfMEa8Lf2CoD7err0WBjLDoUrkgCi4 iNWjAq97ou5sy2F8yC1q2vRVC9Up0gN0AxPv2KcvHv9RTO6lG0zFDeyhRPJcacxvxV92 czw3HafAKUkWGttOAIqPoErgebUo2XKorP4Sjmanz6fIt4l72bMR7YaKdpLIZGe4ElmM J4Mg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=nkJZqV+zmeFifG9dzikC0uP6mbQhhMLnLGyVfhPVCWo=; b=du+T1RQZixM7TJnN+sJBtwTX7FlLKZh1ckWnBhpayDl3H8Z7Hn+sqLAf69N02K2e/E Rdik6wYak0/Gu8kQVU/hLKZqbvFe6dAJAte86mezrZs+dtxNbDWJQ7HXtisHS9sW4iY7 0GLsnOpHjXeSnpwpaZtVF5NFKxUgX2jPL1/rpVdeQuWT8XD2or8Z9S/8PAARqthZxdrr bn5y4/F+VN94Hlf9MUtvv6oIn4He0VdwBkaWPKEiUWd4iMOrP1CIhtzYvMQ4/TbqFjpP B5TY2e8MsM9I0z/aVypwq6GeC1KAyudYyjW0CA0mJYBPIBT3DxFq4k+fn5uqJN5zgC2L pDog== X-Gm-Message-State: AHYfb5hSkQdYn1DQ6Qlkkwh783rcEiz5fhTtNjcS8olaGqWdkM73kXZm XnNlSQrCjcNpC8M94EE= X-Received: by 10.25.217.77 with SMTP id q74mr67763lfg.190.1503430056512; Tue, 22 Aug 2017 12:27:36 -0700 (PDT) Received: from localhost.localdomain (89-76-118-198.dynamic.chello.pl. [89.76.118.198]) by smtp.gmail.com with ESMTPSA id 186sm2759698ljj.28.2017.08.22.12.27.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 22 Aug 2017 12:27:35 -0700 (PDT) From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= To: ffmpeg-devel@ffmpeg.org Date: Tue, 22 Aug 2017 21:26:46 +0200 Message-Id: <20170822192646.8772-1-kasper93@gmail.com> X-Mailer: git-send-email 2.13.3.windows.1.13.gaf0c2223da MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] configure: Fix DEF file post-processing with LTO enabled. 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: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" With LTO enabled exported symbol entry looks like: av_audio_convert @3 DATA In order to maintain valid format we need to strip everything after @. This patch fixes linking libraries compiled with MinGW toolchain with LTO enabled. Signed-off-by: Kacper Michajłow --- configure | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 7201941c36..3ed7b72cf4 100755 --- a/configure +++ b/configure @@ -4919,12 +4919,12 @@ case $target_os in SLIBNAME_WITH_MAJOR='$(SLIBPREF)$(FULLNAME)-$(LIBMAJOR)$(SLIBSUF)' dlltool="${cross_prefix}dlltool" if check_cmd lib.exe -list; then - SLIB_EXTRA_CMD=-'sed -e "s/ @[^ ]*//" $$(@:$(SLIBSUF)=.orig.def) > $$(@:$(SLIBSUF)=.def); lib.exe -nologo -machine:$(LIBTARGET) -def:$$(@:$(SLIBSUF)=.def) -out:$(SUBDIR)$(SLIBNAME:$(SLIBSUF)=.lib)' + SLIB_EXTRA_CMD=-'sed -e "s/ @[^\r\n]*//" $$(@:$(SLIBSUF)=.orig.def) > $$(@:$(SLIBSUF)=.def); lib.exe -nologo -machine:$(LIBTARGET) -def:$$(@:$(SLIBSUF)=.def) -out:$(SUBDIR)$(SLIBNAME:$(SLIBSUF)=.lib)' if enabled x86_64; then LIBTARGET=x64 fi elif check_cmd $dlltool --version; then - SLIB_EXTRA_CMD=-'sed -e "s/ @[^ ]*//" $$(@:$(SLIBSUF)=.orig.def) > $$(@:$(SLIBSUF)=.def); $(DLLTOOL) -m $(LIBTARGET) -d $$(@:$(SLIBSUF)=.def) -l $(SUBDIR)$(SLIBNAME:$(SLIBSUF)=.lib) -D $(SLIBNAME_WITH_MAJOR)' + SLIB_EXTRA_CMD=-'sed -e "s/ @[^\r\n]*//" $$(@:$(SLIBSUF)=.orig.def) > $$(@:$(SLIBSUF)=.def); $(DLLTOOL) -m $(LIBTARGET) -d $$(@:$(SLIBSUF)=.def) -l $(SUBDIR)$(SLIBNAME:$(SLIBSUF)=.lib) -D $(SLIBNAME_WITH_MAJOR)' fi SLIB_INSTALL_NAME='$(SLIBNAME_WITH_MAJOR)' SLIB_INSTALL_LINKS=