summaryrefslogtreecommitdiffstats
path: root/meta-openembedded/meta-networking/recipes-connectivity/crda/crda
diff options
context:
space:
mode:
Diffstat (limited to 'meta-openembedded/meta-networking/recipes-connectivity/crda/crda')
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/crda/crda/0001-Makefile-respect-LDFLAGS-for-libreg.patch29
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/crda/crda/do-not-run-ldconfig-if-destdir-is-set.patch21
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/crda/crda/fix-gcc-6-unused-variables.patch11
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/crda/crda/fix-issues-when-USE_OPENSSL-1.patch58
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/crda/crda/fix-linking-of-libraries-used-by-reglib.patch57
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/crda/crda/make.patch25
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/crda/crda/use-target-word-size-instead-of-host-s.patch34
7 files changed, 235 insertions, 0 deletions
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/crda/crda/0001-Makefile-respect-LDFLAGS-for-libreg.patch b/meta-openembedded/meta-networking/recipes-connectivity/crda/crda/0001-Makefile-respect-LDFLAGS-for-libreg.patch
new file mode 100644
index 000000000..16800d506
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/crda/crda/0001-Makefile-respect-LDFLAGS-for-libreg.patch
@@ -0,0 +1,29 @@
+From 1e1a78b7b4fa1662b4447aa19c15b1e839b7e9db Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Stefan=20M=C3=BCller-Klieser?= <s.mueller-klieser@phytec.de>
+Date: Wed, 24 Aug 2016 10:58:45 +0200
+Subject: [PATCH] Makefile: respect LDFLAGS for libreg
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Signed-off-by: Stefan Müller-Klieser <s.mueller-klieser@phytec.de>
+---
+ Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index 2879896..1650db8 100644
+--- a/Makefile
++++ b/Makefile
+@@ -116,7 +116,7 @@ keys-%.c: utils/key2pub.py $(wildcard $(PUBKEY_DIR)/*.pem)
+
+ $(LIBREG): regdb.h reglib.h reglib.c
+ $(NQ) ' CC ' $@
+- $(Q)$(CC) $(CFLAGS) $(CPPFLAGS) -o $@ -shared -Wl,-soname,$(LIBREG) $^ $(LIBREGLDLIBS)
++ $(Q)$(CC) $(CFLAGS) $(CPPFLAGS) -o $@ -shared -Wl,-soname,$(LIBREG) $^ $(LDFLAGS) $(LIBREGLDLIBS)
+
+ install-libreg-headers:
+ $(NQ) ' INSTALL libreg-headers'
+--
+1.9.1
+
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/crda/crda/do-not-run-ldconfig-if-destdir-is-set.patch b/meta-openembedded/meta-networking/recipes-connectivity/crda/crda/do-not-run-ldconfig-if-destdir-is-set.patch
new file mode 100644
index 000000000..3ef35ee54
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/crda/crda/do-not-run-ldconfig-if-destdir-is-set.patch
@@ -0,0 +1,21 @@
+From: Ben Hutchings <ben@decadent.org.uk>
+Date: Sat, 23 Aug 2014 12:27:34 -0700
+Subject: crda: Do not run ldconfig if DESTDIR is set
+
+Upstream-Status: Backport [http://www.spinics.net/lists/linux-wireless/msg126028.html]
+
+Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
+Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
+
+--- a/Makefile
++++ b/Makefile
+@@ -132,7 +132,9 @@ install-libreg:
+ $(NQ) ' INSTALL libreg'
+ $(Q)mkdir -p $(DESTDIR)/$(LIBDIR)
+ $(Q)cp $(LIBREG) $(DESTDIR)/$(LIBDIR)/
++ifndef DESTDIR
+ $(Q)ldconfig
++endif
+
+ %.o: %.c regdb.h $(LIBREG)
+ $(NQ) ' CC ' $@
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/crda/crda/fix-gcc-6-unused-variables.patch b/meta-openembedded/meta-networking/recipes-connectivity/crda/crda/fix-gcc-6-unused-variables.patch
new file mode 100644
index 000000000..747804d34
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/crda/crda/fix-gcc-6-unused-variables.patch
@@ -0,0 +1,11 @@
+--- crda-3.18/utils/key2pub.py.orig 2016-06-18 09:54:23.671326113 -0400
++++ crda-3.18/utils/key2pub.py 2016-06-18 09:54:34.387326300 -0400
+@@ -115,7 +115,7 @@
+ .n = _n, .len_n = sizeof(_n), \
+ }
+
+-static const struct key_params keys[] = {
++static const struct key_params keys[] __attribute__((unused))= {
+ ''')
+ for n in xrange(n + 1):
+ output.write(' KEYS(e_%d, n_%d),\n' % (n, n))
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/crda/crda/fix-issues-when-USE_OPENSSL-1.patch b/meta-openembedded/meta-networking/recipes-connectivity/crda/crda/fix-issues-when-USE_OPENSSL-1.patch
new file mode 100644
index 000000000..1bb5c638f
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/crda/crda/fix-issues-when-USE_OPENSSL-1.patch
@@ -0,0 +1,58 @@
+From 8d2164a090f17286ea8291f30a123595cf447dc3 Mon Sep 17 00:00:00 2001
+From: Haiqing Bai <Haiqing.Bai@windriver.com>
+Date: Wed, 30 Nov 2016 10:27:36 +0800
+Subject: [PATCH] crda: fix issues when 'USE_OPENSSL=1'.
+
+Fxed the below issues if configured with 'USE_OPENSSL=1':
+a. keys-ssl.c uses BN_ULONG but doesn't include the openssl headers leading
+ to build failures:
+ keys-ssl.c:2:8: error: unknown type name 'BN_ULONG'
+ static BN_ULONG e_0[1] = {
+
+b. The large unqualified constants also break building:
+ keys-ssl.c:8:2: warning: overflow in implicit constant conversion [-Woverflow]
+ 0x63a2705416a0d8e1, 0xdc9fca11c8ba757b,
+
+c. keys-ssl.c: error: 'keys' defined but not used [-Werror=unused-variable]
+ static struct pubkey keys[] = {
+
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+Upstream-Status: Pending
+Signed-off-by: Haiqing Bai <Haiqing.Bai@windriver.com>
+---
+ utils/key2pub.py | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/utils/key2pub.py b/utils/key2pub.py
+index 401d58a..3ae00b8 100755
+--- a/utils/key2pub.py
++++ b/utils/key2pub.py
+@@ -24,7 +24,7 @@ def print_ssl_64(output, name, val):
+ for v1, v2, v3, v4, v5, v6, v7, v8 in vnew:
+ if not idx:
+ output.write('\t')
+- output.write('0x%.2x%.2x%.2x%.2x%.2x%.2x%.2x%.2x, ' % (ord(v1), ord(v2), ord(v3), ord(v4), ord(v5), ord(v6), ord(v7), ord(v8)))
++ output.write('0x%.2x%.2x%.2x%.2x%.2x%.2x%.2x%.2xULL, ' % (ord(v1), ord(v2), ord(v3), ord(v4), ord(v5), ord(v6), ord(v7), ord(v8)))
+ idx += 1
+ if idx == 2:
+ idx = 0
+@@ -60,6 +60,7 @@ def print_ssl_32(output, name, val):
+ def print_ssl(output, name, val):
+ import os
+ output.write('#include <stdint.h>\n')
++ output.write('#include <openssl/bn.h>\n')
+ if os.getenv('TARGET_BITS') == '64':
+ return print_ssl_64(output, name, val)
+ else:
+@@ -78,7 +79,7 @@ struct pubkey {
+
+ #define KEYS(e,n) { KEY(e), KEY(n), }
+
+-static struct pubkey keys[] = {
++static struct pubkey keys[] __attribute__((unused))= {
+ ''')
+ for n in xrange(n + 1):
+ output.write(' KEYS(e_%d, n_%d),\n' % (n, n))
+--
+1.9.1
+
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/crda/crda/fix-linking-of-libraries-used-by-reglib.patch b/meta-openembedded/meta-networking/recipes-connectivity/crda/crda/fix-linking-of-libraries-used-by-reglib.patch
new file mode 100644
index 000000000..812e98379
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/crda/crda/fix-linking-of-libraries-used-by-reglib.patch
@@ -0,0 +1,57 @@
+From 890f5bf2654b695a866262d72bfa9750af921a3b Mon Sep 17 00:00:00 2001
+From: Ben Hutchings <ben@decadent.org.uk>
+Date: Sat, 23 Aug 2014 12:26:37 -0700
+Subject: [PATCH] Fix linking of libraries used by libreg
+
+The math and crypto libraries are called by and need to be linked to
+libreg.so, not to the executables.
+
+Upstream-Status: Backport [http://www.spinics.net/lists/linux-wireless/msg126027.html]
+
+Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
+Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
+---
+ Makefile | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index a3ead30..da2dcc3 100644
+--- a/Makefile
++++ b/Makefile
+@@ -30,7 +30,7 @@ CFLAGS += -std=gnu99 -Wall -Werror -pedantic
+ CFLAGS += -Wall -g
+ LDLIBREG += -lreg
+ LDLIBS += $(LDLIBREG)
+-LDLIBS += -lm
++LIBREGLDLIBS += -lm
+ LIBREG += libreg.so
+ LDFLAGS += -L ./
+
+@@ -40,13 +40,13 @@ all_noverify: $(LIBREG) crda intersect regdbdump db2rd optimize
+
+ ifeq ($(USE_OPENSSL),1)
+ CFLAGS += -DUSE_OPENSSL -DPUBKEY_DIR=\"$(RUNTIME_PUBKEY_DIR)\" `pkg-config --cflags openssl`
+-LDLIBS += `pkg-config --libs openssl`
++LIBREGLDLIBS += `pkg-config --libs openssl`
+
+ $(LIBREG): keys-ssl.c
+
+ else
+ CFLAGS += -DUSE_GCRYPT
+-LDLIBS += -lgcrypt
++LIBREGLDLIBS += -lgcrypt
+
+ $(LIBREG): keys-gcrypt.c
+
+@@ -116,7 +116,7 @@ keys-%.c: utils/key2pub.py $(wildcard $(PUBKEY_DIR)/*.pem)
+
+ $(LIBREG): regdb.h reglib.h reglib.c
+ $(NQ) ' CC ' $@
+- $(Q)$(CC) $(CFLAGS) $(CPPFLAGS) -o $@ -shared -Wl,-soname,$(LIBREG) $^
++ $(Q)$(CC) $(CFLAGS) $(CPPFLAGS) -o $@ -shared -Wl,-soname,$(LIBREG) $^ $(LIBREGLDLIBS)
+
+ install-libreg-headers:
+ $(NQ) ' INSTALL libreg-headers'
+--
+2.7.4
+
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/crda/crda/make.patch b/meta-openembedded/meta-networking/recipes-connectivity/crda/crda/make.patch
new file mode 100644
index 000000000..0b737852c
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/crda/crda/make.patch
@@ -0,0 +1,25 @@
+These headers are not related to any Make rule but they do appear in
+compiling of libreg.so, specifying .h files in compiler cmdline is flagged
+as error by clang
+
+| clang-4.0: error: cannot specify -o when generating multiple output files
+| make: *** [libreg.so] Error 1
+
+This is how we see headers in cmdline
+-O2 -fpic -std=gnu
+99 -Wall -Werror -pedantic -Wall -g -DUSE_GCRYPT -DCONFIG_LIBNL30 `pkg-config --cflags libnl-3.0` -o libreg.so -shared -Wl,-soname,libreg.so
+regdb.h reglib.h reglib.c keys-gcrypt.c -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -L ./ -lm -lgcrypt
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+--- a/Makefile.kk 2016-11-15 04:54:53.338670000 +0000
++++ a/Makefile 2016-11-15 04:55:07.718670000 +0000
+@@ -114,7 +114,7 @@ keys-%.c: utils/key2pub.py $(wildcard $(
+ $(NQ) ' Trusted pubkeys:' $(wildcard $(PUBKEY_DIR)/*.pem)
+ $(Q)./utils/key2pub.py --$* $(wildcard $(PUBKEY_DIR)/*.pem) $@
+
+-$(LIBREG): regdb.h reglib.h reglib.c
++$(LIBREG): reglib.c
+ $(NQ) ' CC ' $@
+ $(Q)$(CC) $(CFLAGS) $(CPPFLAGS) -o $@ -shared -Wl,-soname,$(LIBREG) $^ $(LDFLAGS) $(LIBREGLDLIBS)
+
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/crda/crda/use-target-word-size-instead-of-host-s.patch b/meta-openembedded/meta-networking/recipes-connectivity/crda/crda/use-target-word-size-instead-of-host-s.patch
new file mode 100644
index 000000000..100b765f2
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/crda/crda/use-target-word-size-instead-of-host-s.patch
@@ -0,0 +1,34 @@
+From c1c42513edd27c97341f2033af77c13a4724eb8f Mon Sep 17 00:00:00 2001
+From: Haiqing Bai <Haiqing.Bai@windriver.com>
+Date: Fri, 25 Nov 2016 16:48:01 +0800
+Subject: [PATCH] crda: Use target word size instead of host's.
+
+In key2pub.py, the codes check the wordsize
+of the host machine but not the target's, this fix
+fetches the wordsize of target from the build system.
+
+Upstream-Status: Pending
+Signed-off-by: Haiqing Bai <Haiqing.Bai@windriver.com>
+---
+ utils/key2pub.py | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/utils/key2pub.py b/utils/key2pub.py
+index 3e84cd2..401d58a 100755
+--- a/utils/key2pub.py
++++ b/utils/key2pub.py
+@@ -58,9 +58,9 @@ def print_ssl_32(output, name, val):
+ output.write('};\n\n')
+
+ def print_ssl(output, name, val):
+- import struct
++ import os
+ output.write('#include <stdint.h>\n')
+- if len(struct.pack('@L', 0)) == 8:
++ if os.getenv('TARGET_BITS') == '64':
+ return print_ssl_64(output, name, val)
+ else:
+ return print_ssl_32(output, name, val)
+--
+1.9.1
+
OpenPOWER on IntegriCloud