mirror of
https://github.com/MiyooCFW/buildroot.git
synced 2025-09-27 22:24:19 +03:00
Merge from bittboy/buildroot@26c91a9
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
From 060b9b4147f6e5ff386a8b017796118d783e59fa Mon Sep 17 00:00:00 2001
|
||||
From: Matt Weber <matthew.weber@rockwellcollins.com>
|
||||
Date: Tue, 22 Oct 2019 12:44:30 -0500
|
||||
Subject: [PATCH] Makefile: cleanup install for rebuilds
|
||||
|
||||
Support the ability to rebuild and redeploy without a clean. This
|
||||
required some force linking and man archive creation.
|
||||
|
||||
Provide the ability to override the stripping of the shared lib for
|
||||
cases where a embedded target build may want to control stripping
|
||||
or provide cross arch tools.
|
||||
|
||||
Signed-off-by: Matthew Weber <matthew.weber@rockwellcollins.com>
|
||||
Signed-off-by: Stephan Mueller <smueller@chronox.de>
|
||||
[Retrieved from:
|
||||
https://github.com/smuellerDD/jitterentropy-library/commit/060b9b4147f6e5ff386a8b017796118d783e59fa]
|
||||
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
---
|
||||
Makefile | 10 ++++++----
|
||||
1 file changed, 6 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 4ff069b..2e78607 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -14,6 +14,8 @@ LIBDIR := lib
|
||||
# include target directory
|
||||
INCDIR := include
|
||||
|
||||
+INSTALL_STRIP ?= install -s
|
||||
+
|
||||
NAME := jitterentropy
|
||||
LIBMAJOR=$(shell cat jitterentropy-base.c | grep define | grep MAJVERSION | awk '{print $$3}')
|
||||
LIBMINOR=$(shell cat jitterentropy-base.c | grep define | grep MINVERSION | awk '{print $$3}')
|
||||
@@ -58,15 +60,15 @@ cppcheck:
|
||||
install:
|
||||
install -d -m 0755 $(DESTDIR)$(PREFIX)/share/man/man3
|
||||
install -m 644 doc/$(NAME).3 $(DESTDIR)$(PREFIX)/share/man/man3/
|
||||
- gzip -9 $(DESTDIR)$(PREFIX)/share/man/man3/$(NAME).3
|
||||
+ gzip -f -9 $(DESTDIR)$(PREFIX)/share/man/man3/$(NAME).3
|
||||
install -d -m 0755 $(DESTDIR)$(PREFIX)/$(LIBDIR)
|
||||
- install -m 0755 -s lib$(NAME).so.$(LIBVERSION) $(DESTDIR)$(PREFIX)/$(LIBDIR)/
|
||||
+ $(INSTALL_STRIP) -m 0755 lib$(NAME).so.$(LIBVERSION) $(DESTDIR)$(PREFIX)/$(LIBDIR)/
|
||||
install -d -m 0755 $(DESTDIR)$(PREFIX)/$(INCDIR)
|
||||
install -m 0644 jitterentropy.h $(DESTDIR)$(PREFIX)/$(INCDIR)/
|
||||
install -m 0644 jitterentropy-base-user.h $(DESTDIR)$(PREFIX)/$(INCDIR)/
|
||||
$(RM) $(DESTDIR)$(PREFIX)/$(LIBDIR)/lib$(NAME).so.$(LIBMAJOR)
|
||||
- ln -s lib$(NAME).so.$(LIBVERSION) $(DESTDIR)$(PREFIX)/$(LIBDIR)/lib$(NAME).so.$(LIBMAJOR)
|
||||
- ln -s lib$(NAME).so.$(LIBMAJOR) $(DESTDIR)$(PREFIX)/$(LIBDIR)/lib$(NAME).so
|
||||
+ ln -sf lib$(NAME).so.$(LIBVERSION) $(DESTDIR)$(PREFIX)/$(LIBDIR)/lib$(NAME).so.$(LIBMAJOR)
|
||||
+ ln -sf lib$(NAME).so.$(LIBMAJOR) $(DESTDIR)$(PREFIX)/$(LIBDIR)/lib$(NAME).so
|
||||
|
||||
clean:
|
||||
@- $(RM) $(NAME)
|
||||
@@ -0,0 +1,56 @@
|
||||
From d545d76cb3173cc98e1421604929248f2d882821 Mon Sep 17 00:00:00 2001
|
||||
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
Date: Thu, 24 Oct 2019 18:48:47 +0200
|
||||
Subject: [PATCH] Makefile: add additional install targets
|
||||
|
||||
Add install-includes, install-man, install-shared and install-static
|
||||
targets to allow the user to configure what must be installed
|
||||
|
||||
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
[Upstream status:
|
||||
https://github.com/smuellerDD/jitterentropy-library/pull/11]
|
||||
---
|
||||
Makefile | 18 ++++++++++++++----
|
||||
1 file changed, 14 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 2e78607..41bc4f7 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -57,19 +57,29 @@ scan: $(analyze_plists)
|
||||
cppcheck:
|
||||
cppcheck --force -q --enable=performance --enable=warning --enable=portability *.h *.c
|
||||
|
||||
-install:
|
||||
+install: install-man install-shared install-includes
|
||||
+
|
||||
+install-man:
|
||||
install -d -m 0755 $(DESTDIR)$(PREFIX)/share/man/man3
|
||||
install -m 644 doc/$(NAME).3 $(DESTDIR)$(PREFIX)/share/man/man3/
|
||||
gzip -f -9 $(DESTDIR)$(PREFIX)/share/man/man3/$(NAME).3
|
||||
+
|
||||
+install-shared:
|
||||
install -d -m 0755 $(DESTDIR)$(PREFIX)/$(LIBDIR)
|
||||
$(INSTALL_STRIP) -m 0755 lib$(NAME).so.$(LIBVERSION) $(DESTDIR)$(PREFIX)/$(LIBDIR)/
|
||||
- install -d -m 0755 $(DESTDIR)$(PREFIX)/$(INCDIR)
|
||||
- install -m 0644 jitterentropy.h $(DESTDIR)$(PREFIX)/$(INCDIR)/
|
||||
- install -m 0644 jitterentropy-base-user.h $(DESTDIR)$(PREFIX)/$(INCDIR)/
|
||||
$(RM) $(DESTDIR)$(PREFIX)/$(LIBDIR)/lib$(NAME).so.$(LIBMAJOR)
|
||||
ln -sf lib$(NAME).so.$(LIBVERSION) $(DESTDIR)$(PREFIX)/$(LIBDIR)/lib$(NAME).so.$(LIBMAJOR)
|
||||
ln -sf lib$(NAME).so.$(LIBMAJOR) $(DESTDIR)$(PREFIX)/$(LIBDIR)/lib$(NAME).so
|
||||
|
||||
+install-includes:
|
||||
+ install -d -m 0755 $(DESTDIR)$(PREFIX)/$(INCDIR)
|
||||
+ install -m 0644 jitterentropy.h $(DESTDIR)$(PREFIX)/$(INCDIR)/
|
||||
+ install -m 0644 jitterentropy-base-user.h $(DESTDIR)$(PREFIX)/$(INCDIR)/
|
||||
+
|
||||
+install-static:
|
||||
+ install -d -m 0755 $(DESTDIR)$(PREFIX)/$(LIBDIR)
|
||||
+ install -m 0755 lib$(NAME).a $(DESTDIR)$(PREFIX)/$(LIBDIR)/
|
||||
+
|
||||
clean:
|
||||
@- $(RM) $(NAME)
|
||||
@- $(RM) $(OBJS)
|
||||
--
|
||||
2.23.0
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
From 37e8a6a7e5875e20a8de07fbfbb69912f1964f7d Mon Sep 17 00:00:00 2001
|
||||
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
Date: Mon, 28 Oct 2019 09:47:49 +0100
|
||||
Subject: [PATCH] Makefile: allow the user to disable stack protector
|
||||
|
||||
Allow the user to disable stack-protector by overriding CFLAGS as it is
|
||||
not supported by all toolchains.
|
||||
|
||||
Fixes:
|
||||
- http://autobuild.buildroot.net/results/cba1ae830c7a4d1740098fe67aec59b4dc2f9a03
|
||||
|
||||
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
[Upstream status: https://github.com/smuellerDD/jitterentropy-library/pull/12]
|
||||
---
|
||||
Makefile | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 41bc4f7..b0f20e2 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -1,9 +1,9 @@
|
||||
# Compile Noise Source as user space application
|
||||
|
||||
CC ?= gcc
|
||||
-CFLAGS +=-Wextra -Wall -pedantic -fPIC -O0
|
||||
#Hardening
|
||||
-CFLAGS +=-fstack-protector-all -fwrapv --param ssp-buffer-size=4
|
||||
+CFLAGS ?=-fstack-protector-all --param ssp-buffer-size=4
|
||||
+CFLAGS +=-Wextra -Wall -pedantic -fPIC -O0 -fwrapv
|
||||
LDFLAGS +=-Wl,-z,relro,-z,now
|
||||
|
||||
# Change as necessary
|
||||
--
|
||||
2.23.0
|
||||
|
||||
6
package/jitterentropy-library/Config.in
Normal file
6
package/jitterentropy-library/Config.in
Normal file
@@ -0,0 +1,6 @@
|
||||
config BR2_PACKAGE_JITTERENTROPY_LIBRARY
|
||||
bool "libjitterentropy"
|
||||
help
|
||||
Hardware RNG based on CPU timing jitter.
|
||||
|
||||
https://github.com/smuellerDD/jitterentropy-library
|
||||
5
package/jitterentropy-library/jitterentropy-library.hash
Normal file
5
package/jitterentropy-library/jitterentropy-library.hash
Normal file
@@ -0,0 +1,5 @@
|
||||
# Locally computed
|
||||
sha256 42d4bd1050b5f0d7b45b5453e5b6cfc45c0492bb428791f571d8f69b066351a4 jitterentropy-library-2.2.0.tar.gz
|
||||
sha256 96b5a6b49aaeeba9036f9b80e6e299d613a8eca158741a25a67dc78792413e23 COPYING
|
||||
sha256 13aa749a5b0a454917a944ed8fffc530b784f5ead522b1aacaf4ec8aa55a6239 COPYING.bsd
|
||||
sha256 e6d6a009505e345fe949e1310334fcb0747f28dae2856759de102ab66b722cb4 COPYING.gplv2
|
||||
41
package/jitterentropy-library/jitterentropy-library.mk
Normal file
41
package/jitterentropy-library/jitterentropy-library.mk
Normal file
@@ -0,0 +1,41 @@
|
||||
################################################################################
|
||||
#
|
||||
# jitterentropy-library
|
||||
#
|
||||
################################################################################
|
||||
|
||||
JITTERENTROPY_LIBRARY_VERSION = 2.2.0
|
||||
JITTERENTROPY_LIBRARY_SITE = $(call github,smuellerDD,$(JITTERENTROPY_LIBRARY_NAME),v$(JITTERENTROPY_LIBRARY_VERSION))
|
||||
JITTERENTROPY_LIBRARY_LICENSE = GPL-2.0 or BSD-3-Clause
|
||||
JITTERENTROPY_LIBRARY_LICENSE_FILES = COPYING COPYING.bsd COPYING.gplv2
|
||||
JITTERENTROPY_LIBRARY_INSTALL_STAGING = YES
|
||||
JITTERENTROPY_LIBRARY_INSTALL_TARGETS = install-includes
|
||||
|
||||
ifeq ($(BR2_STATIC_LIBS)$(BR2_SHARED_STATIC_LIBS),y)
|
||||
JITTERENTROPY_LIBRARY_BUILD_TARGETS += jitterentropy-static
|
||||
JITTERENTROPY_LIBRARY_INSTALL_TARGETS += install-static
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_SHARED_LIBS)$(BR2_SHARED_STATIC_LIBS),y)
|
||||
JITTERENTROPY_LIBRARY_BUILD_TARGETS += jitterentropy
|
||||
JITTERENTROPY_LIBRARY_INSTALL_TARGETS += install-shared
|
||||
endif
|
||||
|
||||
define JITTERENTROPY_LIBRARY_BUILD_CMDS
|
||||
$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) \
|
||||
$(JITTERENTROPY_LIBRARY_BUILD_TARGETS)
|
||||
endef
|
||||
|
||||
define JITTERENTROPY_LIBRARY_INSTALL_STAGING_CMDS
|
||||
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(STAGING_DIR) \
|
||||
INSTALL_STRIP="install" PREFIX=/usr \
|
||||
$(JITTERENTROPY_LIBRARY_INSTALL_TARGETS)
|
||||
endef
|
||||
|
||||
define JITTERENTROPY_LIBRARY_INSTALL_TARGET_CMDS
|
||||
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) \
|
||||
INSTALL_STRIP="install" PREFIX=/usr \
|
||||
$(JITTERENTROPY_LIBRARY_INSTALL_TARGETS)
|
||||
endef
|
||||
|
||||
$(eval $(generic-package))
|
||||
Reference in New Issue
Block a user