From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v1 2/3] efivar: allow build with uClibc
Date: Mon, 28 Nov 2016 18:35:52 +0200 [thread overview]
Message-ID: <20161128163553.173811-3-andriy.shevchenko@linux.intel.com> (raw)
In-Reply-To: <20161128163553.173811-1-andriy.shevchenko@linux.intel.com>
Details at https://github.com/rhinstaller/efivar/issues/76.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
package/efivar/0002-Allow-build-with-uClibc.patch | 38 +++++++++++++++++++++++
package/efivar/Config.in | 2 --
2 files changed, 38 insertions(+), 2 deletions(-)
create mode 100644 package/efivar/0002-Allow-build-with-uClibc.patch
diff --git a/package/efivar/0002-Allow-build-with-uClibc.patch b/package/efivar/0002-Allow-build-with-uClibc.patch
new file mode 100644
index 0000000..7b62714
--- /dev/null
+++ b/package/efivar/0002-Allow-build-with-uClibc.patch
@@ -0,0 +1,38 @@
+From 2255601757a8a58baddad2d37d0bcc6b003a3732 Mon Sep 17 00:00:00 2001
+From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
+Date: Fri, 25 Nov 2016 19:42:27 +0200
+Subject: [PATCH 2/2] Allow build with uClibc
+
+Basically this replaces type definitions in <uchar.h>.
+
+Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
+---
+ src/export.c | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/src/export.c b/src/export.c
+index 7f2d4dd..72c02d1 100644
+--- a/src/export.c
++++ b/src/export.c
+@@ -21,11 +21,17 @@
+ #include <inttypes.h>
+ #include <stdint.h>
+ #include <stdlib.h>
+-#include <uchar.h>
+
+ #include <efivar.h>
+ #include "lib.h"
+
++#ifdef __UCLIBC__
++typedef int_least16_t char16_t;
++typedef int_least32_t char32_t;
++#else
++#include <uchar.h>
++#endif
++
+ #define EFIVAR_MAGIC 0xf3df1597
+
+ #define ATTRS_UNSET 0xa5a5a5a5a5a5a5a5
+--
+2.10.2
+
diff --git a/package/efivar/Config.in b/package/efivar/Config.in
index 466a30a..5fd3360 100644
--- a/package/efivar/Config.in
+++ b/package/efivar/Config.in
@@ -11,7 +11,6 @@ config BR2_PACKAGE_EFIVAR
!BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII
# doesn't build with uclibc due to lack of uchar.h
# doesn't build with musl due to lack of __bswap_constant_16
- depends on BR2_TOOLCHAIN_USES_GLIBC
depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
select BR2_PACKAGE_POPT
help
@@ -21,7 +20,6 @@ config BR2_PACKAGE_EFIVAR
comment "efivar requires a glibc toolchain w/ headers >= 3.12, gcc >= 4.9"
depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12 || \
- !BR2_TOOLCHAIN_USES_GLIBC || \
!BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS && \
!BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII
--
2.10.2
next prev parent reply other threads:[~2016-11-28 16:35 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-28 16:35 [Buildroot] [PATCH v1 0/3] efibootmgr: build with uClibc Andy Shevchenko
2016-11-28 16:35 ` [Buildroot] [PATCH v1 1/3] efivar: bump to version 30 Andy Shevchenko
2016-12-03 13:34 ` Thomas Petazzoni
2016-12-03 15:18 ` Erico Nunes
2016-12-03 15:34 ` Thomas Petazzoni
2016-11-28 16:35 ` Andy Shevchenko [this message]
2016-11-28 16:35 ` [Buildroot] [PATCH v1 3/3] efibootmrg: Allow build with uClibc Andy Shevchenko
2016-11-28 20:14 ` [Buildroot] [PATCH v1 0/3] efibootmgr: " Thomas Petazzoni
2016-12-13 11:37 ` Andy Shevchenko
-- strict thread matches above, loose matches on Subject: below --
2016-11-27 14:32 Andy Shevchenko
2016-11-27 14:32 ` [Buildroot] [PATCH v1 2/3] efivar: allow " Andy Shevchenko
2016-11-27 15:50 ` Thomas Petazzoni
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161128163553.173811-3-andriy.shevchenko@linux.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox