diff options
| author | Khem Raj <raj.khem@gmail.com> | 2020-08-05 12:08:19 -0700 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-08-06 15:12:39 +0100 |
| commit | 1beb67e4dfeeeb7434de56b14a4ef6748ac3ce0b (patch) | |
| tree | d071ddd27a75260528963f774c8b8ab610e315ee | |
| parent | 140483d180577c9f754ed0adbb7b3e59aebd4aa5 (diff) | |
| download | poky-1beb67e4dfeeeb7434de56b14a4ef6748ac3ce0b.tar.gz | |
libacpi: Fix build with -fno-common
(From OE-Core rev: 6d4bfd341eb48e6904cb5b645727cbf351f02a2e)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rw-r--r-- | meta/recipes-bsp/libacpi/files/0001-libacpi-Fix-build-witth-fno-commom.patch | 68 | ||||
| -rw-r--r-- | meta/recipes-bsp/libacpi/libacpi_0.2.bb | 4 |
2 files changed, 71 insertions, 1 deletions
diff --git a/meta/recipes-bsp/libacpi/files/0001-libacpi-Fix-build-witth-fno-commom.patch b/meta/recipes-bsp/libacpi/files/0001-libacpi-Fix-build-witth-fno-commom.patch new file mode 100644 index 0000000000..32808fb92a --- /dev/null +++ b/meta/recipes-bsp/libacpi/files/0001-libacpi-Fix-build-witth-fno-commom.patch | |||
| @@ -0,0 +1,68 @@ | |||
| 1 | From 9839c169f513e65fc711646257b3e8588cce623c Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Wed, 5 Aug 2020 12:06:01 -0700 | ||
| 4 | Subject: [PATCH] libacpi: Fix build witth -fno-commom | ||
| 5 | |||
| 6 | Upstream-Status: Pending | ||
| 7 | |||
| 8 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 9 | --- | ||
| 10 | libacpi.c | 16 ++++++++++++++++ | ||
| 11 | libacpi.h | 6 +++--- | ||
| 12 | 2 files changed, 19 insertions(+), 3 deletions(-) | ||
| 13 | |||
| 14 | diff --git a/libacpi.c b/libacpi.c | ||
| 15 | index 4e34725..9344ea4 100644 | ||
| 16 | --- a/libacpi.c | ||
| 17 | +++ b/libacpi.c | ||
| 18 | @@ -14,6 +14,22 @@ | ||
| 19 | #include "libacpi.h" | ||
| 20 | #include "list.h" | ||
| 21 | |||
| 22 | +/** | ||
| 23 | + * Array for existing batteries, loop until | ||
| 24 | + * globals->battery_count | ||
| 25 | + */ | ||
| 26 | +battery_t batteries[MAX_ITEMS]; | ||
| 27 | +/** | ||
| 28 | + * Array for existing thermal zones, loop until | ||
| 29 | + * globals->thermal_count | ||
| 30 | + */ | ||
| 31 | +thermal_t thermals[MAX_ITEMS]; | ||
| 32 | +/** | ||
| 33 | + * Array for existing fans, loop until | ||
| 34 | + * globals->fan_count | ||
| 35 | + */ | ||
| 36 | +fan_t fans[MAX_ITEMS]; | ||
| 37 | + | ||
| 38 | static int read_acpi_battinfo(const int num); | ||
| 39 | static int read_acpi_battalarm(const int num); | ||
| 40 | static int read_acpi_battstate(const int num); | ||
| 41 | diff --git a/libacpi.h b/libacpi.h | ||
| 42 | index 9334b79..5242d3d 100644 | ||
| 43 | --- a/libacpi.h | ||
| 44 | +++ b/libacpi.h | ||
| 45 | @@ -183,17 +183,17 @@ typedef struct { | ||
| 46 | * Array for existing batteries, loop until | ||
| 47 | * globals->battery_count | ||
| 48 | */ | ||
| 49 | -battery_t batteries[MAX_ITEMS]; | ||
| 50 | +extern battery_t batteries[MAX_ITEMS]; | ||
| 51 | /** | ||
| 52 | * Array for existing thermal zones, loop until | ||
| 53 | * globals->thermal_count | ||
| 54 | */ | ||
| 55 | -thermal_t thermals[MAX_ITEMS]; | ||
| 56 | +extern thermal_t thermals[MAX_ITEMS]; | ||
| 57 | /** | ||
| 58 | * Array for existing fans, loop until | ||
| 59 | * globals->fan_count | ||
| 60 | */ | ||
| 61 | -fan_t fans[MAX_ITEMS]; | ||
| 62 | +extern fan_t fans[MAX_ITEMS]; | ||
| 63 | /** | ||
| 64 | * Finds existing batteries and fills the | ||
| 65 | * corresponding batteries structures with the paths | ||
| 66 | -- | ||
| 67 | 2.28.0 | ||
| 68 | |||
diff --git a/meta/recipes-bsp/libacpi/libacpi_0.2.bb b/meta/recipes-bsp/libacpi/libacpi_0.2.bb index 5e7f7fa8e0..fa9e3d4894 100644 --- a/meta/recipes-bsp/libacpi/libacpi_0.2.bb +++ b/meta/recipes-bsp/libacpi/libacpi_0.2.bb | |||
| @@ -11,7 +11,9 @@ SRC_URI = "http://www.ngolde.de/download/libacpi-${PV}.tar.gz \ | |||
| 11 | file://makefile-fix.patch \ | 11 | file://makefile-fix.patch \ |
| 12 | file://libacpi_fix_for_x32.patch \ | 12 | file://libacpi_fix_for_x32.patch \ |
| 13 | file://use_correct_strip_in_cross_environment.patch \ | 13 | file://use_correct_strip_in_cross_environment.patch \ |
| 14 | file://ldflags.patch " | 14 | file://ldflags.patch \ |
| 15 | file://0001-libacpi-Fix-build-witth-fno-commom.patch \ | ||
| 16 | " | ||
| 15 | 17 | ||
| 16 | SRC_URI[md5sum] = "05b53dd7bead66dda35fec502b91066c" | 18 | SRC_URI[md5sum] = "05b53dd7bead66dda35fec502b91066c" |
| 17 | SRC_URI[sha256sum] = "13086e31d428b9c125954d48ac497b754bbbce2ef34ea29ecd903e82e25bad29" | 19 | SRC_URI[sha256sum] = "13086e31d428b9c125954d48ac497b754bbbce2ef34ea29ecd903e82e25bad29" |
