aboutsummaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-connectivity/samba/samba-4.1.12/0002-Adds-a-new-mode-to-samba-cross-compiling.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-networking/recipes-connectivity/samba/samba-4.1.12/0002-Adds-a-new-mode-to-samba-cross-compiling.patch')
-rw-r--r--meta-networking/recipes-connectivity/samba/samba-4.1.12/0002-Adds-a-new-mode-to-samba-cross-compiling.patch112
1 files changed, 0 insertions, 112 deletions
diff --git a/meta-networking/recipes-connectivity/samba/samba-4.1.12/0002-Adds-a-new-mode-to-samba-cross-compiling.patch b/meta-networking/recipes-connectivity/samba/samba-4.1.12/0002-Adds-a-new-mode-to-samba-cross-compiling.patch
deleted file mode 100644
index fce3abcaa6..0000000000
--- a/meta-networking/recipes-connectivity/samba/samba-4.1.12/0002-Adds-a-new-mode-to-samba-cross-compiling.patch
+++ /dev/null
@@ -1,112 +0,0 @@
-From add52538b9a0ccf66ca87c7a691bf59901765849 Mon Sep 17 00:00:00 2001
-From: Uri Simchoni <urisimchoni@gmail.com>
-Date: Mon, 18 May 2015 21:15:19 +0300
-Subject: [PATCH 2/7] Adds a new mode to samba cross-compiling.
-
-When both --cross-answers and --cross-execute are set, this means:
-- Use cross-answers
-- If answer is unknown, then instead of adding UNKNOWN to the cross-answers
- file and failing configure, the new mode runs cross-execute to determine the
- answer and adds that to the cross-answers file.
-
-Signed-off-by: Uri Simchoni <urisimchoni@gmail.com>
-Reviewed-by: Andrew Bartlett <abartlet@samba.org>
-Reviewed-by: Alexander Bokovoy <ab@samba.org>
-
-Upstream-Status: Backport
-
-Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
----
- buildtools/wafsamba/samba_cross.py | 46 ++++++++++++++++++++++++++++----------
- 1 file changed, 34 insertions(+), 12 deletions(-)
-
-diff --git a/buildtools/wafsamba/samba_cross.py b/buildtools/wafsamba/samba_cross.py
-index fc1d78e..3f1ef12 100644
---- a/buildtools/wafsamba/samba_cross.py
-+++ b/buildtools/wafsamba/samba_cross.py
-@@ -45,7 +45,6 @@ def cross_answer(ca_file, msg):
- try:
- f = open(ca_file, 'r')
- except:
-- add_answer(ca_file, msg, ANSWER_UNKNOWN)
- return ANSWER_UNKNOWN
- for line in f:
- line = line.strip()
-@@ -78,7 +77,6 @@ def cross_answer(ca_file, msg):
- else:
- raise Utils.WafError("Bad answer format '%s' in %s" % (line, ca_file))
- f.close()
-- add_answer(ca_file, msg, ANSWER_UNKNOWN)
- return ANSWER_UNKNOWN
-
-
-@@ -86,24 +84,47 @@ class cross_Popen(Utils.pproc.Popen):
- '''cross-compilation wrapper for Popen'''
- def __init__(*k, **kw):
- (obj, args) = k
--
-- if '--cross-execute' in args:
-- # when --cross-execute is set, then change the arguments
-- # to use the cross emulator
-- i = args.index('--cross-execute')
-- newargs = args[i+1].split()
-- newargs.extend(args[0:i])
-- args = newargs
-- elif '--cross-answers' in args:
-+ use_answers = False
-+ ans = ANSWER_UNKNOWN
-+
-+ # Three possibilities:
-+ # 1. Only cross-answers - try the cross-answers file, and if
-+ # there's no corresponding answer, add to the file and mark
-+ # the configure process as unfinished.
-+ # 2. Only cross-execute - get the answer from cross-execute
-+ # 3. Both - try the cross-answers file, and if there is no
-+ # corresponding answer - use cross-execute to get an answer,
-+ # and add that answer to the file.
-+ if '--cross-answers' in args:
- # when --cross-answers is set, then change the arguments
- # to use the cross answers if available
-+ use_answers = True
- i = args.index('--cross-answers')
- ca_file = args[i+1]
- msg = args[i+2]
- ans = cross_answer(ca_file, msg)
-+
-+ if '--cross-execute' in args and ans == ANSWER_UNKNOWN:
-+ # when --cross-execute is set, then change the arguments
-+ # to use the cross emulator
-+ i = args.index('--cross-execute')
-+ newargs = args[i+1].split()
-+ newargs.extend(args[0:i])
-+ if use_answers:
-+ p = real_Popen(newargs,
-+ stdout=Utils.pproc.PIPE,
-+ stderr=Utils.pproc.PIPE)
-+ ce_out, ce_err = p.communicate()
-+ ans = (p.returncode, ce_out)
-+ add_answer(ca_file, msg, ans)
-+ else:
-+ args = newargs
-+
-+ if use_answers:
- if ans == ANSWER_UNKNOWN:
- global cross_answers_incomplete
- cross_answers_incomplete = True
-+ add_answer(ca_file, msg, ans)
- (retcode, retstring) = ans
- args = ['/bin/sh', '-c', "echo -n '%s'; exit %d" % (retstring, retcode)]
- real_Popen.__init__(*(obj, args), **kw)
-@@ -124,7 +145,8 @@ def SAMBA_CROSS_ARGS(conf, msg=None):
-
- if conf.env.CROSS_EXECUTE:
- ret.extend(['--cross-execute', conf.env.CROSS_EXECUTE])
-- elif conf.env.CROSS_ANSWERS:
-+
-+ if conf.env.CROSS_ANSWERS:
- if msg is None:
- raise Utils.WafError("Cannot have NULL msg in cross-answers")
- ret.extend(['--cross-answers', os.path.join(Options.launch_dir, conf.env.CROSS_ANSWERS), msg])
---
-1.9.1
-