!4 fix complie failed problem

Merge pull request !4 from 雷炬/master
This commit is contained in:
openeuler-ci-bot 2020-06-03 11:12:37 +08:00 committed by Gitee
commit 4e2ab1e8fa
2 changed files with 58 additions and 1 deletions

View File

@ -0,0 +1,53 @@
From 6e13a3b539105b2773e43055c2d44912cbba7a29 Mon Sep 17 00:00:00 2001
From: lei_ju <lj3074194431@163.com>
Date: Wed, 3 Jun 2020 09:03:49 +0800
Subject: [PATCH] fix unaligned point value with GCC9
---
firmware/2lib/include/2struct.h | 2 +-
firmware/include/gpt.h | 2 +-
firmware/include/vboot_struct.h | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/firmware/2lib/include/2struct.h b/firmware/2lib/include/2struct.h
index 1d5b353..b045a0b 100644
--- a/firmware/2lib/include/2struct.h
+++ b/firmware/2lib/include/2struct.h
@@ -213,7 +213,7 @@ struct vb2_shared_data {
uint32_t gbb_size;
-} __attribute__((packed));
+} __attribute__((aligned));
/****************************************************************************/
diff --git a/firmware/include/gpt.h b/firmware/include/gpt.h
index 4570237..f1da14d 100644
--- a/firmware/include/gpt.h
+++ b/firmware/include/gpt.h
@@ -120,7 +120,7 @@ typedef struct {
} attrs;
uint16_t name[36]; /* UTF-16 encoded partition name */
/* Remainder of entry is reserved and should be 0 */
-} __attribute__((packed)) GptEntry;
+} __attribute__((aligned)) GptEntry;
#define GPTENTRY_EXPECTED_SIZE 128
diff --git a/firmware/include/vboot_struct.h b/firmware/include/vboot_struct.h
index fd5777a..a06d038 100644
--- a/firmware/include/vboot_struct.h
+++ b/firmware/include/vboot_struct.h
@@ -478,7 +478,7 @@ typedef struct VbSharedDataHeader {
* all the fields it knows about are present. Newer firmware needs to
* use reasonable defaults when accessing older structs.
*/
-} __attribute__((packed)) VbSharedDataHeader;
+} __attribute__((aligned)) VbSharedDataHeader;
/*
* Size of VbSharedDataheader for each version
--
2.23.0

View File

@ -2,7 +2,7 @@
Name: vboot-utils
Version: 20180531
Release: 3
Release: 4
Summary: Chromium OS verified boot utility
License: BSD
URL: https://chromium.googlesource.com/chromiumos/platform/vboot_reference
@ -11,6 +11,7 @@ ExclusiveArch: aarch64 x86_64
Source0: %{name}-2cc35b0.tar.xz
Patch0001: vboot-utils-00-disable-static-linking.patch
Patch0002: vboot-utils-cflags.patch
Patch0003: 0001-fix-unaligned-point-value-with-GCC9.patch
BuildRequires: gcc-c++ openssl-devel trousers-devel libyaml-devel xz-devel libuuid-devel python2
@ -45,5 +46,8 @@ make runtests || true
/usr/lib/pkgconfig/
%changelog
* Wed Jan 8 2020 leiju <leiju4@huawei.com> - 20180531-4
- fix unaligned point value with GCC9
* Wed Jan 8 2020 fengbing <fengbing7@huawei.com> - 20180531-3
- Package init