initial buildroot for linux 5.15
This commit is contained in:
@@ -0,0 +1,156 @@
|
||||
From 45ef4455a60929932d1499cf718c1c9f59af9f26 Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
|
||||
Date: Tue, 26 May 2020 22:57:05 +0200
|
||||
Subject: [PATCH] build: Always use EXTERN_UNLESS_MAIN_MODULE pattern
|
||||
|
||||
This patch is loosely based on upstream commit
|
||||
6aff8a132815a84bab69401c1e7de96ec549fbf2 ("build: Always use
|
||||
EXTERN_UNLESS_MAIN_MODULE pattern."). However, this upstream commit
|
||||
applies to gnupg2, and the code base has changed quite significantly
|
||||
compared to gnupg 1.x, so upstream's patch cannot be applied
|
||||
as-is. The goal of the patch is to make sure each variable is only
|
||||
defined once, ass gcc 10 now default to -fno-common.
|
||||
|
||||
Essentially, this patch mainly fixes the EXTERN_UNLESS_MAIN_MODULE
|
||||
define so that it really expands to "extern" when
|
||||
INCLUDED_BY_MAIN_MODULE is not defined, even on non-RiscOS
|
||||
systems. Contrary to upstream's patch we however do not factorize the
|
||||
multiple EXTERN_UNLESS_MAIN_MODULE definitions into a single place as
|
||||
it requires too many changes: instead we simply fix the few
|
||||
definitions of this macro.
|
||||
|
||||
Once the macro is fixed, two places need to define
|
||||
INCLUDED_BY_MAIN_MODULE: tools/bftest.c and tools/mpicalc.c so that
|
||||
when they include the common headers, their variables are at least
|
||||
defined once.
|
||||
|
||||
The iobuf.{c,h} case is handled differently: iobuf.h gains an
|
||||
unconditional "extern", with the variable being added to iobuf.c. This
|
||||
is identical to what upstream's
|
||||
6aff8a132815a84bab69401c1e7de96ec549fbf2 is doing.
|
||||
|
||||
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
|
||||
---
|
||||
g10/options.h | 3 +--
|
||||
include/cipher.h | 2 +-
|
||||
include/iobuf.h | 9 +--------
|
||||
include/memory.h | 2 +-
|
||||
include/mpi.h | 2 +-
|
||||
tools/bftest.c | 1 +
|
||||
tools/mpicalc.c | 1 +
|
||||
util/iobuf.c | 2 ++
|
||||
8 files changed, 9 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/g10/options.h b/g10/options.h
|
||||
index 0ac6e7755..bae19e9e3 100644
|
||||
--- a/g10/options.h
|
||||
+++ b/g10/options.h
|
||||
@@ -26,8 +26,7 @@
|
||||
#include "packet.h"
|
||||
|
||||
#ifndef EXTERN_UNLESS_MAIN_MODULE
|
||||
-/* Norcraft can't cope with common symbols */
|
||||
-#if defined (__riscos__) && !defined (INCLUDED_BY_MAIN_MODULE)
|
||||
+#if !defined (INCLUDED_BY_MAIN_MODULE)
|
||||
#define EXTERN_UNLESS_MAIN_MODULE extern
|
||||
#else
|
||||
#define EXTERN_UNLESS_MAIN_MODULE
|
||||
diff --git a/include/cipher.h b/include/cipher.h
|
||||
index dd4af18cb..6ef6e6829 100644
|
||||
--- a/include/cipher.h
|
||||
+++ b/include/cipher.h
|
||||
@@ -115,7 +115,7 @@ struct gcry_md_context {
|
||||
typedef struct gcry_md_context *MD_HANDLE;
|
||||
|
||||
#ifndef EXTERN_UNLESS_MAIN_MODULE
|
||||
-#if defined (__riscos__) && !defined (INCLUDED_BY_MAIN_MODULE)
|
||||
+#if !defined (INCLUDED_BY_MAIN_MODULE)
|
||||
#define EXTERN_UNLESS_MAIN_MODULE extern
|
||||
#else
|
||||
#define EXTERN_UNLESS_MAIN_MODULE
|
||||
diff --git a/include/iobuf.h b/include/iobuf.h
|
||||
index 030f8c8e9..b4d26b7e1 100644
|
||||
--- a/include/iobuf.h
|
||||
+++ b/include/iobuf.h
|
||||
@@ -69,14 +69,7 @@ struct iobuf_struct {
|
||||
} unget;
|
||||
};
|
||||
|
||||
-#ifndef EXTERN_UNLESS_MAIN_MODULE
|
||||
-#if defined (__riscos__) && !defined (INCLUDED_BY_MAIN_MODULE)
|
||||
-#define EXTERN_UNLESS_MAIN_MODULE extern
|
||||
-#else
|
||||
-#define EXTERN_UNLESS_MAIN_MODULE
|
||||
-#endif
|
||||
-#endif
|
||||
-EXTERN_UNLESS_MAIN_MODULE int iobuf_debug_mode;
|
||||
+extern int iobuf_debug_mode;
|
||||
|
||||
void iobuf_enable_special_filenames ( int yes );
|
||||
int iobuf_is_pipe_filename (const char *fname);
|
||||
diff --git a/include/memory.h b/include/memory.h
|
||||
index d414a9b2e..6698337e3 100644
|
||||
--- a/include/memory.h
|
||||
+++ b/include/memory.h
|
||||
@@ -91,7 +91,7 @@ unsigned secmem_get_flags(void);
|
||||
#define DBG_MEMSTAT memory_stat_debug_mode
|
||||
|
||||
#ifndef EXTERN_UNLESS_MAIN_MODULE
|
||||
-#if defined (__riscos__) && !defined (INCLUDED_BY_MAIN_MODULE)
|
||||
+#if !defined (INCLUDED_BY_MAIN_MODULE)
|
||||
#define EXTERN_UNLESS_MAIN_MODULE extern
|
||||
#else
|
||||
#define EXTERN_UNLESS_MAIN_MODULE
|
||||
diff --git a/include/mpi.h b/include/mpi.h
|
||||
index a4c16f5af..7a45ff805 100644
|
||||
--- a/include/mpi.h
|
||||
+++ b/include/mpi.h
|
||||
@@ -36,7 +36,7 @@
|
||||
#include "memory.h"
|
||||
|
||||
#ifndef EXTERN_UNLESS_MAIN_MODULE
|
||||
-#if defined (__riscos__) && !defined (INCLUDED_BY_MAIN_MODULE)
|
||||
+#if !defined (INCLUDED_BY_MAIN_MODULE)
|
||||
#define EXTERN_UNLESS_MAIN_MODULE extern
|
||||
#else
|
||||
#define EXTERN_UNLESS_MAIN_MODULE
|
||||
diff --git a/tools/bftest.c b/tools/bftest.c
|
||||
index 8a1572c2b..5afd7e125 100644
|
||||
--- a/tools/bftest.c
|
||||
+++ b/tools/bftest.c
|
||||
@@ -26,6 +26,7 @@
|
||||
#include <fcntl.h>
|
||||
#endif
|
||||
|
||||
+#define INCLUDED_BY_MAIN_MODULE
|
||||
#include "util.h"
|
||||
#include "cipher.h"
|
||||
#include "i18n.h"
|
||||
diff --git a/tools/mpicalc.c b/tools/mpicalc.c
|
||||
index 46e5fc824..31acd82a4 100644
|
||||
--- a/tools/mpicalc.c
|
||||
+++ b/tools/mpicalc.c
|
||||
@@ -31,6 +31,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <ctype.h>
|
||||
|
||||
+#define INCLUDED_BY_MAIN_MODULE
|
||||
#include "util.h"
|
||||
#include "mpi.h"
|
||||
#include "i18n.h"
|
||||
diff --git a/util/iobuf.c b/util/iobuf.c
|
||||
index c8442929a..0d9ee4cec 100644
|
||||
--- a/util/iobuf.c
|
||||
+++ b/util/iobuf.c
|
||||
@@ -113,6 +113,8 @@ typedef struct {
|
||||
static CLOSE_CACHE close_cache;
|
||||
#endif
|
||||
|
||||
+int iobuf_debug_mode;
|
||||
+
|
||||
#ifdef _WIN32
|
||||
typedef struct {
|
||||
int sock;
|
||||
--
|
||||
2.26.2
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
config BR2_PACKAGE_GNUPG
|
||||
bool "gnupg"
|
||||
depends on !BR2_PACKAGE_GNUPG2
|
||||
select BR2_PACKAGE_ZLIB
|
||||
help
|
||||
GnuPG is the GNU project's complete and free implementation
|
||||
of the OpenPGP standard as defined by RFC4880. GnuPG allows
|
||||
to encrypt and sign your data and communication, features a
|
||||
versatile key management system as well as access modules
|
||||
for all kinds of public key directories. GnuPG, also known
|
||||
as GPG, is a command line tool with features for easy
|
||||
integration with other applications.
|
||||
|
||||
http://gnupg.org/
|
||||
|
||||
if BR2_PACKAGE_GNUPG
|
||||
|
||||
config BR2_PACKAGE_GNUPG_AES
|
||||
bool "AES support"
|
||||
help
|
||||
Support for the AES cipher
|
||||
|
||||
config BR2_PACKAGE_GNUPG_RSA
|
||||
bool "RSA support"
|
||||
help
|
||||
Support for RSA public key algorithm
|
||||
|
||||
config BR2_PACKAGE_GNUPG_GPGV
|
||||
bool "gpgv"
|
||||
help
|
||||
gpgv is an OpenPGP signature verification tool.
|
||||
|
||||
This program is actually a stripped-down version of gpg
|
||||
which is only able to check signatures. It is somewhat
|
||||
smaller than the fully-blown gpg and uses a different (and
|
||||
simpler) way to check that the public keys used to make the
|
||||
signature are valid. There are no configuration files and
|
||||
only a few options are implemented.
|
||||
|
||||
config BR2_PACKAGE_GNUPG_GPGSPLIT
|
||||
bool "gpgsplit"
|
||||
help
|
||||
gpgsplit splits an OpenPGP message into packets.
|
||||
|
||||
endif
|
||||
@@ -0,0 +1,12 @@
|
||||
config BR2_PACKAGE_HOST_GNUPG
|
||||
bool "host gnupg"
|
||||
help
|
||||
GnuPG is the GNU project's complete and free implementation
|
||||
of the OpenPGP standard as defined by RFC4880. GnuPG allows
|
||||
to encrypt and sign your data and communication, features a
|
||||
versatile key management system as well as access modules
|
||||
for all kinds of public key directories. GnuPG, also known
|
||||
as GPG, is a command line tool with features for easy
|
||||
integration with other applications.
|
||||
|
||||
http://gnupg.org/
|
||||
@@ -0,0 +1,5 @@
|
||||
# Locally computed based on signature
|
||||
# https://gnupg.org/ftp/gcrypt/gnupg/gnupg-1.4.23.tar.bz2.sig
|
||||
sha256 c9462f17e651b6507848c08c430c791287cd75491f8b5a8b50c6ed46b12678ba gnupg-1.4.23.tar.bz2
|
||||
# locally computed
|
||||
sha256 fc82ca8b6fdb18d4e3e85cfd8ab58d1bcd3f1b29abe782895abd91d64763f8e7 COPYING
|
||||
@@ -0,0 +1,90 @@
|
||||
################################################################################
|
||||
#
|
||||
# gnupg
|
||||
#
|
||||
################################################################################
|
||||
|
||||
GNUPG_VERSION = 1.4.23
|
||||
GNUPG_SOURCE = gnupg-$(GNUPG_VERSION).tar.bz2
|
||||
GNUPG_SITE = https://gnupg.org/ftp/gcrypt/gnupg
|
||||
GNUPG_LICENSE = GPL-3.0+
|
||||
GNUPG_LICENSE_FILES = COPYING
|
||||
GNUPG_DEPENDENCIES = zlib $(if $(BR2_PACKAGE_LIBICONV),libiconv)
|
||||
GNUPG_CPE_ID_VENDOR = gnupg
|
||||
GNUPG_CONF_ENV = ac_cv_sys_symbol_underscore=no
|
||||
GNUPG_CONF_OPTS = \
|
||||
--disable-rpath \
|
||||
--enable-minimal \
|
||||
--disable-regex \
|
||||
--enable-sha256 \
|
||||
--enable-sha512
|
||||
|
||||
HOST_GNUPG_DEPENDENCIES = host-zlib
|
||||
HOST_GNUPG_CONF_OPTS = \
|
||||
--disable-rpath \
|
||||
--enable-minimal \
|
||||
--disable-regex \
|
||||
--enable-sha256 \
|
||||
--enable-sha512 \
|
||||
--enable-aes \
|
||||
--enable-rsa \
|
||||
--without-libcurl \
|
||||
--without-readline
|
||||
|
||||
# gnupg doesn't support assembly for coldfire
|
||||
ifeq ($(BR2_m68k_cf),y)
|
||||
GNUPG_CONF_OPTS += --disable-asm
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_BZIP2),y)
|
||||
GNUPG_CONF_OPTS += --enable-bzip2
|
||||
GNUPG_DEPENDENCIES += bzip2
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBCURL),y)
|
||||
GNUPG_CONF_ENV += ac_cv_path__libcurl_config=$(STAGING_DIR)/usr/bin/curl-config
|
||||
GNUPG_DEPENDENCIES += libcurl
|
||||
else
|
||||
GNUPG_CONF_OPTS += --without-libcurl
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_READLINE),y)
|
||||
GNUPG_DEPENDENCIES += readline
|
||||
else
|
||||
GNUPG_CONF_OPTS += --without-readline
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_GNUPG_AES),y)
|
||||
GNUPG_CONF_OPTS += --enable-aes
|
||||
else
|
||||
GNUPG_CONF_OPTS += --disable-aes
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_GNUPG_RSA),y)
|
||||
GNUPG_CONF_OPTS += --enable-rsa
|
||||
else
|
||||
GNUPG_CONF_OPTS += --disable-rsa
|
||||
endif
|
||||
|
||||
ifneq ($(BR2_PACKAGE_GNUPG_GPGV),y)
|
||||
define GNUPG_REMOVE_GPGV
|
||||
rm -f $(TARGET_DIR)/usr/bin/gpgv
|
||||
endef
|
||||
GNUPG_POST_INSTALL_TARGET_HOOKS += GNUPG_REMOVE_GPGV
|
||||
endif
|
||||
|
||||
ifneq ($(BR2_PACKAGE_GNUPG_GPGSPLIT),y)
|
||||
define GNUPG_REMOVE_GPGSPLIT
|
||||
rm -f $(TARGET_DIR)/usr/bin/gpgsplit
|
||||
endef
|
||||
GNUPG_POST_INSTALL_TARGET_HOOKS += GNUPG_REMOVE_GPGSPLIT
|
||||
endif
|
||||
|
||||
define GNUPG_FIXUP_GPG_ZIP
|
||||
test -f $(TARGET_DIR)/usr/bin/gpg-zip && \
|
||||
$(SED) 's%^TAR=.*%TAR=/bin/tar%' $(TARGET_DIR)/usr/bin/gpg-zip
|
||||
endef
|
||||
GNUPG_POST_INSTALL_TARGET_HOOKS += GNUPG_FIXUP_GPG_ZIP
|
||||
|
||||
$(eval $(autotools-package))
|
||||
$(eval $(host-autotools-package))
|
||||
Reference in New Issue
Block a user