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.15100.1678696233089791246 for ; Mon, 13 Mar 2023 01:30:33 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=fPDFZGx7; 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=1678696232; 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=nhgDWbo8jVIpn3Dpe8x2IelesCHGzMT80St3fzV+0u0=; b=fPDFZGx7zuRWF5sy09BVDz/e9LsrqEqx9eBKnTmkGZWSd2iGuzWL54t6Y4S7VZc3JHQY8E vpJFOEZVoBbgBzoFqHxmdtPzdHFb8UZvOF+iHJb3Nv7ndsOWuSIwEX9wuLsz+begxV3bbI +fbsAjMmeli5WVB+AhVFa0QWjp0JtyY= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-159-x0p2hnfTPwmplwJDCoQUww-1; Mon, 13 Mar 2023 04:30:30 -0400 X-MC-Unique: x0p2hnfTPwmplwJDCoQUww-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 06402185A794; Mon, 13 Mar 2023 08:30:30 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.39.192.142]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C2267400F4F; Mon, 13 Mar 2023 08:30:29 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 6B0E71801E8D; Mon, 13 Mar 2023 09:30:16 +0100 (CET) From: "Gerd Hoffmann" To: devel@edk2.groups.io Cc: Jian J Wang , Pawel Polawski , Xiaoyu Lu , Ard Biesheuvel , Guomin Jiang , Gerd Hoffmann , Jiewen Yao , Oliver Steffen , Jordan Justen Subject: [PATCH 13/22] CryptoPkg/openssl: move compiler_flags to buildinf.c Date: Mon, 13 Mar 2023 09:30:07 +0100 Message-Id: <20230313083016.136448-14-kraxel@redhat.com> In-Reply-To: <20230313083016.136448-1-kraxel@redhat.com> References: <20230313083016.136448-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true 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/OpensslLibAccel.inf | 1 + CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf | 1 + CryptoPkg/Library/OpensslLib/OpensslLibFull.inf | 1 + CryptoPkg/Library/OpensslLib/buildinf.h | 2 +- CryptoPkg/Library/OpensslLib/{buildinf.h => buildinf.c} | 4 ++-- 6 files changed, 7 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 57058d20d1db..b92b1daf2096 100644 --- a/CryptoPkg/Library/OpensslLib/OpensslLib.inf +++ b/CryptoPkg/Library/OpensslLib/OpensslLib.inf @@ -34,6 +34,7 @@ [Sources] # Autogenerated files list starts here # Autogenerated files list ends here buildinf.h + buildinf.c ossl_store.c rand_pool.c # SslNull.c diff --git a/CryptoPkg/Library/OpensslLib/OpensslLibAccel.inf b/CryptoPkg/Library/OpensslLib/OpensslLibAccel.inf index 899e243a6db6..59c5d42bc78e 100644 --- a/CryptoPkg/Library/OpensslLib/OpensslLibAccel.inf +++ b/CryptoPkg/Library/OpensslLib/OpensslLibAccel.inf @@ -37,6 +37,7 @@ [Sources] # Autogenerated files list starts here # Autogenerated files list ends here buildinf.h + buildinf.c ossl_store.c rand_pool.c # SslNull.c diff --git a/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf b/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf index 7b7650fc001f..c796effe23fd 100644 --- a/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf +++ b/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf @@ -35,6 +35,7 @@ [Sources] # Autogenerated files list starts here # Autogenerated files list ends here buildinf.h + buildinf.c ossl_store.c rand_pool.c SslNull.c diff --git a/CryptoPkg/Library/OpensslLib/OpensslLibFull.inf b/CryptoPkg/Library/OpensslLib/OpensslLibFull.inf index 9309fe35fa38..aaea1bab5b26 100644 --- a/CryptoPkg/Library/OpensslLib/OpensslLibFull.inf +++ b/CryptoPkg/Library/OpensslLib/OpensslLibFull.inf @@ -39,6 +39,7 @@ [Sources] # Autogenerated files list starts here # Autogenerated files list ends here buildinf.h + buildinf.c ossl_store.c rand_pool.c # SslNull.c diff --git a/CryptoPkg/Library/OpensslLib/buildinf.h b/CryptoPkg/Library/OpensslLib/buildinf.h index 9042c7526fd6..7cf0eae008ed 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 9042c7526fd6..cd7fe9322ed4 100644 --- a/CryptoPkg/Library/OpensslLib/buildinf.h +++ b/CryptoPkg/Library/OpensslLib/buildinf.c @@ -1,4 +1,4 @@ -#define PLATFORM "UEFI" -#define DATE "Fri Dec 22 01:23:45 PDT 2017" +/* SPDX-License-Identifier: BSD-2-Clause-Patent */ +#include "buildinf.h" const char *compiler_flags = "compiler: information not available from edk2"; -- 2.39.2