Bump buildroot to version 2017-02
TG-3 #closed
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
From e0803c0bdbb1abf06b6b5bb1b52fdb733505b8f7 Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
||||
Date: Wed, 25 Jan 2017 22:41:02 +1300
|
||||
Subject: [PATCH] src/regex.c: support old compilers for the endian
|
||||
check
|
||||
|
||||
libselinux 2.6 has added some code in regex.c that uses __BYTE_ORDER__
|
||||
to determine the system endianness. Unfortunately, this definition
|
||||
provided directly by the compiler doesn't exist in older gcc versions
|
||||
such as gcc 4.4.
|
||||
|
||||
In order to address this, this commit extends the logic to use
|
||||
<endian.h> definitions if __BYTE_ORDER__ is not provided by the
|
||||
compiler. This allows libselinux to build properly with gcc 4.4.
|
||||
|
||||
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
||||
---
|
||||
src/regex.c | 13 ++++++++++++-
|
||||
1 file changed, 12 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/regex.c b/src/regex.c
|
||||
index a3b427b..0c5ad27 100644
|
||||
--- a/src/regex.c
|
||||
+++ b/src/regex.c
|
||||
@@ -13,7 +13,18 @@
|
||||
#endif
|
||||
|
||||
#ifndef __BYTE_ORDER__
|
||||
-#error __BYTE_ORDER__ not defined. Unable to determine endianness.
|
||||
+
|
||||
+/* If the compiler doesn't define __BYTE_ORDER__, try to use the C
|
||||
+ * library <endian.h> header definitions. */
|
||||
+#include <endian.h>
|
||||
+#ifndef __BYTE_ORDER
|
||||
+#error Neither __BYTE_ORDER__ nor __BYTE_ORDER defined. Unable to determine endianness.
|
||||
+#endif
|
||||
+
|
||||
+#define __ORDER_LITTLE_ENDIAN __LITTLE_ENDIAN
|
||||
+#define __ORDER_BIG_ENDIAN __BIG_ENDIAN
|
||||
+#define __BYTE_ORDER__ __BYTE_ORDER
|
||||
+
|
||||
#endif
|
||||
|
||||
#ifdef USE_PCRE2
|
||||
--
|
||||
2.7.4
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
# Locally computed
|
||||
sha256 94c9e97706280bedcc288f784f67f2b9d3d6136c192b2c9f812115edba58514f libselinux-2.5.tar.gz
|
||||
sha256 4ea2dde50665c202253ba5caac7738370ea0337c47b251ba981c60d24e1a118a libselinux-2.6.tar.gz
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
#
|
||||
################################################################################
|
||||
|
||||
LIBSELINUX_VERSION = 2.5
|
||||
LIBSELINUX_SITE = https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/20160223
|
||||
LIBSELINUX_VERSION = 2.6
|
||||
LIBSELINUX_SITE = https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/20161014
|
||||
LIBSELINUX_LICENSE = Public Domain
|
||||
LIBSELINUX_LICENSE_FILES = LICENSE
|
||||
|
||||
@@ -23,15 +23,18 @@ LIBSELINUX_MAKE_OPTS = \
|
||||
define LIBSELINUX_BUILD_CMDS
|
||||
# DESTDIR is needed during the compile to compute library and
|
||||
# header paths.
|
||||
$(MAKE) -C $(@D) $(LIBSELINUX_MAKE_OPTS) DESTDIR=$(STAGING_DIR) all
|
||||
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \
|
||||
$(LIBSELINUX_MAKE_OPTS) DESTDIR=$(STAGING_DIR) all
|
||||
endef
|
||||
|
||||
define LIBSELINUX_INSTALL_STAGING_CMDS
|
||||
$(MAKE) -C $(@D) $(LIBSELINUX_MAKE_OPTS) DESTDIR=$(STAGING_DIR) install
|
||||
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \
|
||||
$(LIBSELINUX_MAKE_OPTS) DESTDIR=$(STAGING_DIR) install
|
||||
endef
|
||||
|
||||
define LIBSELINUX_INSTALL_TARGET_CMDS
|
||||
$(MAKE) -C $(@D) $(LIBSELINUX_MAKE_OPTS) DESTDIR=$(TARGET_DIR) install
|
||||
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \
|
||||
$(LIBSELINUX_MAKE_OPTS) DESTDIR=$(TARGET_DIR) install
|
||||
# Create the selinuxfs mount point
|
||||
if [ ! -d "$(TARGET_DIR)/selinux" ]; then mkdir $(TARGET_DIR)/selinux; fi
|
||||
if ! grep -q "selinuxfs" $(TARGET_DIR)/etc/fstab; then \
|
||||
@@ -64,18 +67,22 @@ HOST_LIBSELINUX_MAKE_OPTS = \
|
||||
define HOST_LIBSELINUX_BUILD_CMDS
|
||||
# DESTDIR is needed during the compile to compute library and
|
||||
# header paths.
|
||||
$(MAKE1) -C $(@D) $(HOST_LIBSELINUX_MAKE_OPTS) DESTDIR=$(HOST_DIR) \
|
||||
$(HOST_MAKE_ENV) $(MAKE1) -C $(@D) \
|
||||
$(HOST_LIBSELINUX_MAKE_OPTS) DESTDIR=$(HOST_DIR) \
|
||||
SHLIBDIR=$(HOST_DIR)/usr/lib all
|
||||
# Generate python interface wrapper
|
||||
$(MAKE1) -C $(@D) $(HOST_LIBSELINUX_MAKE_OPTS) DESTDIR=$(HOST_DIR) swigify pywrap
|
||||
$(HOST_MAKE_ENV) $(MAKE1) -C $(@D) \
|
||||
$(HOST_LIBSELINUX_MAKE_OPTS) DESTDIR=$(HOST_DIR) swigify pywrap
|
||||
endef
|
||||
|
||||
define HOST_LIBSELINUX_INSTALL_CMDS
|
||||
$(MAKE) -C $(@D) $(HOST_LIBSELINUX_MAKE_OPTS) DESTDIR=$(HOST_DIR) \
|
||||
$(HOST_MAKE_ENV) $(MAKE) -C $(@D) \
|
||||
$(HOST_LIBSELINUX_MAKE_OPTS) DESTDIR=$(HOST_DIR) \
|
||||
SHLIBDIR=$(HOST_DIR)/usr/lib SBINDIR=$(HOST_DIR)/usr/sbin install
|
||||
(cd $(HOST_DIR)/usr/lib; $(HOSTLN) -sf libselinux.so.1 libselinux.so)
|
||||
# Install python interface wrapper
|
||||
$(MAKE) -C $(@D) $(HOST_LIBSELINUX_MAKE_OPTS) DESTDIR=$(HOST_DIR) install-pywrap
|
||||
$(HOST_MAKE_ENV) $(MAKE) -C $(@D) \
|
||||
$(HOST_LIBSELINUX_MAKE_OPTS) DESTDIR=$(HOST_DIR) install-pywrap
|
||||
endef
|
||||
|
||||
$(eval $(generic-package))
|
||||
|
||||
Reference in New Issue
Block a user