mirror of
https://github.com/home-assistant/operating-system.git
synced 2025-11-14 13:19:27 +00:00
* Update buildroot-patches for 2020.11-rc1 buildroot * Update buildroot to 2020.11-rc1 Signed-off-by: Stefan Agner <stefan@agner.ch> * Don't rely on sfdisk --list-free output The --list-free (-F) argument does not allow machine readable mode. And it seems that the output format changes over time (different spacing, using size postfixes instead of raw blocks). Use sfdisk json output and calculate free partition space ourselfs. This works for 2.35 and 2.36 and is more robust since we rely on output which is meant for scripts to parse. * Migrate defconfigs for Buildroot 2020.11-rc1 In particular, rename BR2_TARGET_UBOOT_BOOT_SCRIPT(_SOURCE) to BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT(_SOURCE). * Rebase/remove systemd patches for systemd 246 * Drop apparmor/libapparmor from buildroot-external * hassos-persists: use /run as directory for lockfiles The U-Boot tools use /var/lock by default which is not created any more by systemd by default (it is under tmpfiles legacy.conf, which we no longer install). * Disable systemd-update-done.service The service is not suited for pure read-only systems. In particular the service needs to be able to write a file in /etc and /var. Remove the service. Note: This is a static service and cannot be removed using systemd-preset. * Disable apparmor.service for now The service loads all default profiles. Some might actually cause problems. E.g. the profile for ping seems not to match our setup for /etc/resolv.conf: [85503.634653] audit: type=1400 audit(1605286002.684:236): apparmor="DENIED" operation="open" profile="ping" name="/run/resolv.conf" pid=27585 comm="ping" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
148 lines
4.2 KiB
Diff
148 lines
4.2 KiB
Diff
From c349964887901848fb4cd5db53a5bcb6dae27aaa Mon Sep 17 00:00:00 2001
|
|
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
|
Date: Sun, 23 Nov 2014 10:16:33 +0100
|
|
Subject: [PATCH] Add minimal support for --{enable,disable}-{shared,static}
|
|
|
|
mpdecimal uses autoconf, but not automake or libtool, so this commit
|
|
adds some basic handling of --{enable,disable}-{shared,static}, so
|
|
that building the shared library can be disabled in pure static
|
|
library contexts.
|
|
|
|
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
|
[Fabrice: update for 2.5.0 (add libmpdec++)]
|
|
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
|
---
|
|
Makefile.in | 6 ++++++
|
|
configure.ac | 13 +++++++++++++
|
|
libmpdec/Makefile.in | 11 ++++++++++-
|
|
3 files changed, 29 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/Makefile.in b/Makefile.in
|
|
index 2c91891..0c44f36 100644
|
|
--- a/Makefile.in
|
|
+++ b/Makefile.in
|
|
@@ -9,6 +9,8 @@ LIBSTATIC = @LIBSTATIC@
|
|
LIBSONAME = @LIBSONAME@
|
|
LIBSHARED = @LIBSHARED@
|
|
INSTALL = @INSTALL@
|
|
+BUILD_SHARED = @BUILD_SHARED@
|
|
+BUILD_STATIC = @BUILD_STATIC@
|
|
|
|
prefix = @prefix@
|
|
exec_prefix = @exec_prefix@
|
|
@@ -32,9 +34,13 @@ install: FORCE
|
|
$(INSTALL) -d -m 755 $(DESTDIR)$(includedir)
|
|
$(INSTALL) -m 644 libmpdec/mpdecimal.h $(DESTDIR)$(includedir)
|
|
$(INSTALL) -d -m 755 $(DESTDIR)$(libdir)
|
|
+ifeq ($(BUILD_STATIC),yes)
|
|
$(INSTALL) -m 644 libmpdec/$(LIBSTATIC) $(DESTDIR)$(libdir)
|
|
+endif
|
|
+ifeq ($(BUILD_SHARED),yes)
|
|
$(INSTALL) -m 755 libmpdec/$(LIBSHARED) $(DESTDIR)$(libdir)
|
|
cd $(DESTDIR)$(libdir) && ln -sf $(LIBSHARED) $(LIBSONAME) && ln -sf $(LIBSHARED) $(LIBNAME)
|
|
+endif
|
|
$(INSTALL) -d -m 755 $(DESTDIR)$(docdir)
|
|
cp -R doc/* $(DESTDIR)$(docdir)
|
|
|
|
@@ -74,9 +80,13 @@ install_libcxx: install_lib
|
|
$(INSTALL) -d -m 755 $(DESTDIR)$(includedir)
|
|
$(INSTALL) -m 644 libmpdec++/decimal.hh $(DESTDIR)$(includedir)
|
|
$(INSTALL) -d -m 755 $(DESTDIR)$(libdir)
|
|
+ifeq ($(BUILD_STATIC),yes)
|
|
$(INSTALL) -m 644 libmpdec++/$(LIBSTATIC_CXX) $(DESTDIR)$(libdir)
|
|
+endif
|
|
+ifeq ($(BUILD_SHARED),yes)
|
|
$(INSTALL) -m 755 libmpdec++/$(LIBSHARED_CXX) $(DESTDIR)$(libdir)
|
|
cd $(DESTDIR)$(libdir) && ln -sf $(LIBSHARED_CXX) $(LIBSONAME_CXX) && ln -sf $(LIBSHARED_CXX) $(LIBNAME_CXX)
|
|
+endif
|
|
cp -R doc/libmpdec++ $(DESTDIR)$(docdir)
|
|
|
|
|
|
diff --git a/configure.ac b/configure.ac
|
|
index 7ee8f86..2b3e505 100644
|
|
--- a/configure.ac
|
|
+++ b/configure.ac
|
|
@@ -88,6 +88,19 @@ CFLAGS="$saved_cflags"
|
|
AC_PROG_INSTALL
|
|
AC_SUBST(INSTALL)
|
|
|
|
+AC_ARG_ENABLE([shared],
|
|
+ [AS_HELP_STRING([--enable-shared], [build shared library])],
|
|
+ [BUILD_SHARED=$enableval],
|
|
+ [BUILD_SHARED=yes])
|
|
+
|
|
+AC_ARG_ENABLE([static],
|
|
+ [AS_HELP_STRING([--enable-static], [build static library])],
|
|
+ [BUILD_STATIC=$enableval],
|
|
+ [BUILD_STATIC=yes])
|
|
+
|
|
+AC_SUBST(BUILD_SHARED)
|
|
+AC_SUBST(BUILD_STATIC)
|
|
+
|
|
# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
|
|
# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
|
|
AC_MSG_CHECKING(for glibc _FORTIFY_SOURCE/memmove bug)
|
|
diff --git a/libmpdec/Makefile.in b/libmpdec/Makefile.in
|
|
index d9619a3..985c73c 100644
|
|
--- a/libmpdec/Makefile.in
|
|
+++ b/libmpdec/Makefile.in
|
|
@@ -7,6 +7,8 @@
|
|
LIBSTATIC = @LIBSTATIC@
|
|
LIBSONAME = @LIBSONAME@
|
|
LIBSHARED = @LIBSHARED@
|
|
+BUILD_SHARED = @BUILD_SHARED@
|
|
+BUILD_STATIC = @BUILD_STATIC@
|
|
|
|
CC = @CC@
|
|
LD = @LD@
|
|
@@ -32,8 +34,15 @@ ifeq ($(MAKECMDGOALS), profile_use)
|
|
MPD_LDFLAGS += $(MPD_PUSE)
|
|
endif
|
|
|
|
+ifeq ($(BUILD_SHARED),yes)
|
|
+TARGETS += $(LIBSHARED)
|
|
+endif
|
|
+
|
|
+ifeq ($(BUILD_STATIC),yes)
|
|
+TARGETS += $(LIBSTATIC)
|
|
+endif
|
|
|
|
-default: $(LIBSTATIC) $(LIBSHARED)
|
|
+default: $(TARGETS)
|
|
|
|
|
|
OBJS := basearith.o context.o constants.o convolute.o crt.o mpdecimal.o \
|
|
diff --git a/libmpdec/Makefile.in b/libmpdec/Makefile.in
|
|
index d9619a3..985c73c 100644
|
|
--- a/libmpdec++/Makefile.in
|
|
+++ b/libmpdec++/Makefile.in
|
|
@@ -13,6 +13,8 @@ LIBSTATIC_CXX = @LIBSTATIC_CXX@
|
|
LIBNAME_CXX = @LIBNAME_CXX@
|
|
LIBSONAME_CXX = @LIBSONAME_CXX@
|
|
LIBSHARED_CXX = @LIBSHARED_CXX@
|
|
+BUILD_SHARED = @BUILD_SHARED@
|
|
+BUILD_STATIC = @BUILD_STATIC@
|
|
|
|
CXX = @CXX@
|
|
LDXX = @LDXX@
|
|
@@ -39,8 +41,15 @@ ifeq ($(MAKECMDGOALS), profile_use)
|
|
MPD_LDXXFLAGS += $(MPD_PUSE)
|
|
endif
|
|
|
|
+ifeq ($(BUILD_SHARED),yes)
|
|
+TARGETS += $(LIBSHARED_CXX)
|
|
+endif
|
|
+
|
|
+ifeq ($(BUILD_STATIC),yes)
|
|
+TARGETS += $(LIBSTATIC_CXX)
|
|
+endif
|
|
|
|
-default: $(LIBSTATIC_CXX) $(LIBSHARED_CXX)
|
|
+default: $(TARGETS)
|
|
|
|
|
|
OBJS := decimal.o
|
|
--
|
|
2.1.0
|
|
|