From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.groups.io with SMTP id smtpd.web11.13356.1638547764244483806 for ; Fri, 03 Dec 2021 08:09:24 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=JFbxdkUJ; spf=pass (domain: redhat.com, ip: 170.10.129.124, mailfrom: kraxel@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1638547763; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FItMM1GYB7GpDlGvz1xpGctZx7lslsXnoB62tYaErrM=; b=JFbxdkUJe9KT6lhCKAnqDP+TXBxMqnbShhcwkN4DkdKW9dkvGodefNPqq/jUEN4wK60xi8 MbH66zmFyJHTZrUQzPJ1CwOmjlzzSBp53vSs52m65wHmbPOZgo9UgvKbGa33HrhqClWiPr XTVdSiHcMpQfb+Vzs4Ed+DzmkrPjOCo= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-255-zlLEU_WxPMyDXXiWh7G8Mw-1; Fri, 03 Dec 2021 11:09:20 -0500 X-MC-Unique: zlLEU_WxPMyDXXiWh7G8Mw-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2BBFF84B9A5; Fri, 3 Dec 2021 16:09:19 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.39.193.170]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E280910013D6; Fri, 3 Dec 2021 16:09:18 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 18D8018003B8; Fri, 3 Dec 2021 17:07:49 +0100 (CET) From: "Gerd Hoffmann" To: devel@edk2.groups.io Cc: Jiewen Yao , Jian J Wang , Guomin Jiang , Pawel Polawski , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Xiaoyu Lu , Gerd Hoffmann Subject: [PATCH 16/24] CryptoPkg/openssl: move compiler_flags to buildinf.c Date: Fri, 3 Dec 2021 17:07:40 +0100 Message-Id: <20211203160748.866150-17-kraxel@redhat.com> In-Reply-To: <20211203160748.866150-1-kraxel@redhat.com> References: <20211203160748.866150-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=kraxel@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" Seems with openssl 3.0 this is used by multiple source files, so we get duplicate symbol errors when linking. Fix that by moving compiler_flags from header file to a source file. Signed-off-by: Gerd Hoffmann --- CryptoPkg/Library/OpensslLib/OpensslLib.inf | 1 + CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf | 1 + CryptoPkg/Library/OpensslLib/OpensslLibX64.inf | 1 + CryptoPkg/Library/OpensslLib/OpensslLibX64Gcc.inf | 1 + CryptoPkg/Library/OpensslLib/buildinf.h | 2 +- CryptoPkg/Library/OpensslLib/{buildinf.h => buildinf.c} | 3 +-- 6 files changed, 6 insertions(+), 3 deletions(-) copy CryptoPkg/Library/OpensslLib/{buildinf.h => buildinf.c} (50%) diff --git a/CryptoPkg/Library/OpensslLib/OpensslLib.inf b/CryptoPkg/Library/OpensslLib/OpensslLib.inf index 54e67e2aed26..03eacbff0b92 100644 --- a/CryptoPkg/Library/OpensslLib/OpensslLib.inf +++ b/CryptoPkg/Library/OpensslLib/OpensslLib.inf @@ -886,6 +886,7 @@ [Sources] $(OPENSSL_PATH)/ssl/statem/statem_local.h # Autogenerated files list ends here buildinf.h + buildinf.c ossl_store.c rand_pool.c diff --git a/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf b/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf index f385008e01fa..0a0c8ed6affc 100644 --- a/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf +++ b/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf @@ -834,6 +834,7 @@ [Sources] $(OPENSSL_PATH)/providers/implementations/storemgmt/file_store_local.h # Autogenerated files list ends here buildinf.h + buildinf.c ossl_store.c rand_pool.c diff --git a/CryptoPkg/Library/OpensslLib/OpensslLibX64.inf b/CryptoPkg/Library/OpensslLib/OpensslLibX64.inf index b92feaf1bffe..20bb0b5ecbce 100644 --- a/CryptoPkg/Library/OpensslLib/OpensslLibX64.inf +++ b/CryptoPkg/Library/OpensslLib/OpensslLibX64.inf @@ -586,6 +586,7 @@ [Sources.X64] $(OPENSSL_PATH)/ssl/statem/statem_local.h # Autogenerated files list ends here buildinf.h + buildinf.c ossl_store.c rand_pool.c X64/ApiHooks.c diff --git a/CryptoPkg/Library/OpensslLib/OpensslLibX64Gcc.inf b/CryptoPkg/Library/OpensslLib/OpensslLibX64Gcc.inf index 4ffdd8cd06d3..f2f942083c46 100644 --- a/CryptoPkg/Library/OpensslLib/OpensslLibX64Gcc.inf +++ b/CryptoPkg/Library/OpensslLib/OpensslLibX64Gcc.inf @@ -586,6 +586,7 @@ [Sources.X64] $(OPENSSL_PATH)/ssl/statem/statem_local.h # Autogenerated files list ends here buildinf.h + buildinf.c ossl_store.c rand_pool.c X64/ApiHooks.c diff --git a/CryptoPkg/Library/OpensslLib/buildinf.h b/CryptoPkg/Library/OpensslLib/buildinf.h index b840c8656a28..e25436e8f21a 100644 --- a/CryptoPkg/Library/OpensslLib/buildinf.h +++ b/CryptoPkg/Library/OpensslLib/buildinf.h @@ -1,4 +1,4 @@ #define PLATFORM "UEFI" #define DATE "Fri Dec 22 01:23:45 PDT 2017" -const char * compiler_flags = "compiler: information not available from edk2"; +extern const char * compiler_flags; diff --git a/CryptoPkg/Library/OpensslLib/buildinf.h b/CryptoPkg/Library/OpensslLib/buildinf.c similarity index 50% copy from CryptoPkg/Library/OpensslLib/buildinf.h copy to CryptoPkg/Library/OpensslLib/buildinf.c index b840c8656a28..aa6320f720ef 100644 --- a/CryptoPkg/Library/OpensslLib/buildinf.h +++ b/CryptoPkg/Library/OpensslLib/buildinf.c @@ -1,4 +1,3 @@ -#define PLATFORM "UEFI" -#define DATE "Fri Dec 22 01:23:45 PDT 2017" +#include "buildinf.h" const char * compiler_flags = "compiler: information not available from edk2"; -- 2.33.1