* [U-Boot] [PATCH 1/3] buildman: Drop comment about Ctrl-C problem
@ 2018-12-05 12:35 Simon Glass
2018-12-05 12:35 ` [U-Boot] [PATCH 2/3] buildman: Add support for building with clang Simon Glass
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Simon Glass @ 2018-12-05 12:35 UTC (permalink / raw)
To: u-boot
This bug is now fixed, so drop this comment.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
tools/buildman/README | 2 --
1 file changed, 2 deletions(-)
diff --git a/tools/buildman/README b/tools/buildman/README
index 5a709c6ff9e..d688b7cf006 100644
--- a/tools/buildman/README
+++ b/tools/buildman/README
@@ -1169,8 +1169,6 @@ access to log files. Also it would be nice if buildman could 'hunt' for
problems, perhaps by building a few boards for each arch, or checking
commits for changed files and building only boards which use those files.
-A specific problem to fix is that Ctrl-C does not exit buildman cleanly when
-multiple builder threads are active.
Credits
=======
--
2.20.0.rc1.387.gf8505762e3-goog
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH 2/3] buildman: Add support for building with clang
2018-12-05 12:35 [U-Boot] [PATCH 1/3] buildman: Drop comment about Ctrl-C problem Simon Glass
@ 2018-12-05 12:35 ` Simon Glass
2018-12-06 1:31 ` Tom Rini
2018-12-05 12:35 ` [U-Boot] [PATCH 3/3] travis: Use buildman " Simon Glass
2018-12-28 20:47 ` [U-Boot] [PATCH 1/3] buildman: Drop comment about Ctrl-C problem sjg at google.com
2 siblings, 1 reply; 8+ messages in thread
From: Simon Glass @ 2018-12-05 12:35 UTC (permalink / raw)
To: u-boot
Add a -O option which allows building with clang.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
tools/buildman/README | 10 ++++++++++
tools/buildman/cmdline.py | 2 ++
tools/buildman/control.py | 2 +-
tools/buildman/toolchain.py | 18 ++++++++++++++----
4 files changed, 27 insertions(+), 5 deletions(-)
diff --git a/tools/buildman/README b/tools/buildman/README
index d688b7cf006..56a99c70a2a 100644
--- a/tools/buildman/README
+++ b/tools/buildman/README
@@ -1046,6 +1046,16 @@ value for 'altbootcmd', but lost one for ' altbootcmd'.
The -U option uses the u-boot.env files which are produced by a build.
+
+Building with clang
+===================
+
+To build with clang (sandbox only), use the -O option to override the
+toolchain. For example:
+
+ buildman -O clang-7 --board sandbox
+
+
Other options
=============
diff --git a/tools/buildman/cmdline.py b/tools/buildman/cmdline.py
index 93d09ca08d7..832a5145d28 100644
--- a/tools/buildman/cmdline.py
+++ b/tools/buildman/cmdline.py
@@ -74,6 +74,8 @@ def ParseArgs():
parser.add_option('-o', '--output-dir', type='string',
dest='output_dir', default='..',
help='Directory where all builds happen and buildman has its workspace (default is ../)')
+ parser.add_option('-O', '--override-toolchain', type='string',
+ help="Override host toochain to use for sandbox (e.g. 'clang-7')")
parser.add_option('-Q', '--quick', action='store_true',
default=False, help='Do a rough build, with limited warning resolution')
parser.add_option('-p', '--full-path', action='store_true',
diff --git a/tools/buildman/control.py b/tools/buildman/control.py
index c900211510e..27916d3c355 100644
--- a/tools/buildman/control.py
+++ b/tools/buildman/control.py
@@ -141,7 +141,7 @@ def DoBuildman(options, args, toolchains=None, make_func=None, boards=None,
no_toolchains = toolchains is None
if no_toolchains:
- toolchains = toolchain.Toolchains()
+ toolchains = toolchain.Toolchains(options.override_toolchain)
if options.fetch_arch:
if options.fetch_arch == 'list':
diff --git a/tools/buildman/toolchain.py b/tools/buildman/toolchain.py
index 4b35f400e97..a4a2e0e73a1 100644
--- a/tools/buildman/toolchain.py
+++ b/tools/buildman/toolchain.py
@@ -54,9 +54,11 @@ class Toolchain:
arch: Architecture of toolchain as determined from the first
component of the filename. E.g. arm-linux-gcc becomes arm
priority: Toolchain priority (0=highest, 20=lowest)
+ override_toolchain: Toolchain to use for sandbox, overriding the normal
+ one
"""
def __init__(self, fname, test, verbose=False, priority=PRIORITY_CALC,
- arch=None):
+ arch=None, override_toolchain=None):
"""Create a new toolchain object.
Args:
@@ -68,6 +70,7 @@ class Toolchain:
"""
self.gcc = fname
self.path = os.path.dirname(fname)
+ self.override_toolchain = override_toolchain
# Find the CROSS_COMPILE prefix to use for U-Boot. For example,
# 'arm-linux-gnueabihf-gcc' turns into 'arm-linux-gnueabihf-'.
@@ -81,6 +84,8 @@ class Toolchain:
self.arch = arch
else:
self.arch = self.cross[:pos] if pos != -1 else 'sandbox'
+ if self.arch == 'sandbox' and override_toolchain:
+ self.gcc = override_toolchain
env = self.MakeEnvironment(False)
@@ -154,7 +159,10 @@ class Toolchain:
env = dict(os.environ)
wrapper = self.GetWrapper()
- if full_path:
+ if self.override_toolchain:
+ env['HOSTCC'] = self.override_toolchain
+ env['CC'] = self.override_toolchain
+ elif full_path:
env['CROSS_COMPILE'] = wrapper + os.path.join(self.path, self.cross)
else:
env['CROSS_COMPILE'] = wrapper + self.cross
@@ -180,10 +188,11 @@ class Toolchains:
paths: List of paths to check for toolchains (may contain wildcards)
"""
- def __init__(self):
+ def __init__(self, override_toolchain=None):
self.toolchains = {}
self.prefixes = {}
self.paths = []
+ self.override_toolchain = override_toolchain
self._make_flags = dict(bsettings.GetItems('make-flags'))
def GetPathList(self, show_warning=True):
@@ -234,7 +243,8 @@ class Toolchains:
priority: Priority to use for this toolchain
arch: Toolchain architecture, or None if not known
"""
- toolchain = Toolchain(fname, test, verbose, priority, arch)
+ toolchain = Toolchain(fname, test, verbose, priority, arch,
+ self.override_toolchain)
add_it = toolchain.ok
if toolchain.arch in self.toolchains:
add_it = (toolchain.priority <
--
2.20.0.rc1.387.gf8505762e3-goog
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH 3/3] travis: Use buildman for building with clang
2018-12-05 12:35 [U-Boot] [PATCH 1/3] buildman: Drop comment about Ctrl-C problem Simon Glass
2018-12-05 12:35 ` [U-Boot] [PATCH 2/3] buildman: Add support for building with clang Simon Glass
@ 2018-12-05 12:35 ` Simon Glass
2018-12-06 1:31 ` Tom Rini
2018-12-28 20:47 ` [U-Boot] [PATCH 1/3] buildman: Drop comment about Ctrl-C problem sjg at google.com
2 siblings, 1 reply; 8+ messages in thread
From: Simon Glass @ 2018-12-05 12:35 UTC (permalink / raw)
To: u-boot
Now that buildman supports clang, use it.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
.travis.yml | 13 +++----------
1 file changed, 3 insertions(+), 10 deletions(-)
diff --git a/.travis.yml b/.travis.yml
index a061f02399c..59a00d065e3 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -109,16 +109,9 @@ script:
#
# From buildman, exit code 129 means warnings only. If we've been asked to
# use clang only do one configuration.
- - if [[ "${TOOLCHAIN}" == "clang" ]]; then
+ - if [[ "${BUILDMAN}" != "" ]]; then
ret=0;
- make O=../.bm-work/${TEST_PY_BD} HOSTCC=clang-7 CC=clang-7 -j$(nproc)
- KCFLAGS=-Werror sandbox_config all || ret=$?;
- if [[ $ret -ne 0 ]]; then
- exit $ret;
- fi;
- elif [[ "${BUILDMAN}" != "" ]]; then
- ret=0;
- tools/buildman/buildman -P -E ${BUILDMAN} || ret=$?;
+ tools/buildman/buildman -P -E ${BUILDMAN} ${OVERRIDE}|| ret=$?;
if [[ $ret -ne 0 && $ret -ne 129 ]]; then
tools/buildman/buildman -sdeP ${BUILDMAN};
exit $ret;
@@ -343,7 +336,7 @@ matrix:
env:
- TEST_PY_BD="sandbox"
BUILDMAN="^sandbox$"
- TOOLCHAIN="clang"
+ OVERRIDE="clang-7"
- name: "test/py sandbox_spl"
env:
- TEST_PY_BD="sandbox_spl"
--
2.20.0.rc1.387.gf8505762e3-goog
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH 2/3] buildman: Add support for building with clang
2018-12-05 12:35 ` [U-Boot] [PATCH 2/3] buildman: Add support for building with clang Simon Glass
@ 2018-12-06 1:31 ` Tom Rini
2018-12-28 20:47 ` sjg at google.com
0 siblings, 1 reply; 8+ messages in thread
From: Tom Rini @ 2018-12-06 1:31 UTC (permalink / raw)
To: u-boot
On Wed, Dec 05, 2018 at 05:35:27AM -0700, Simon Glass wrote:
> Add a -O option which allows building with clang.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20181205/ae29b93f/attachment.sig>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH 3/3] travis: Use buildman for building with clang
2018-12-05 12:35 ` [U-Boot] [PATCH 3/3] travis: Use buildman " Simon Glass
@ 2018-12-06 1:31 ` Tom Rini
2018-12-28 20:47 ` sjg at google.com
0 siblings, 1 reply; 8+ messages in thread
From: Tom Rini @ 2018-12-06 1:31 UTC (permalink / raw)
To: u-boot
On Wed, Dec 05, 2018 at 05:35:28AM -0700, Simon Glass wrote:
> Now that buildman supports clang, use it.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20181205/413f68cf/attachment.sig>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH 3/3] travis: Use buildman for building with clang
2018-12-06 1:31 ` Tom Rini
@ 2018-12-28 20:47 ` sjg at google.com
0 siblings, 0 replies; 8+ messages in thread
From: sjg at google.com @ 2018-12-28 20:47 UTC (permalink / raw)
To: u-boot
On Wed, Dec 05, 2018 at 05:35:28AM -0700, Simon Glass wrote:
> Now that buildman supports clang, use it.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
--
Tom
Applied to u-boot-dm/master, thanks!
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH 2/3] buildman: Add support for building with clang
2018-12-06 1:31 ` Tom Rini
@ 2018-12-28 20:47 ` sjg at google.com
0 siblings, 0 replies; 8+ messages in thread
From: sjg at google.com @ 2018-12-28 20:47 UTC (permalink / raw)
To: u-boot
On Wed, Dec 05, 2018 at 05:35:27AM -0700, Simon Glass wrote:
> Add a -O option which allows building with clang.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
--
Tom
Applied to u-boot-dm/master, thanks!
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH 1/3] buildman: Drop comment about Ctrl-C problem
2018-12-05 12:35 [U-Boot] [PATCH 1/3] buildman: Drop comment about Ctrl-C problem Simon Glass
2018-12-05 12:35 ` [U-Boot] [PATCH 2/3] buildman: Add support for building with clang Simon Glass
2018-12-05 12:35 ` [U-Boot] [PATCH 3/3] travis: Use buildman " Simon Glass
@ 2018-12-28 20:47 ` sjg at google.com
2 siblings, 0 replies; 8+ messages in thread
From: sjg at google.com @ 2018-12-28 20:47 UTC (permalink / raw)
To: u-boot
This bug is now fixed, so drop this comment.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
tools/buildman/README | 2 --
1 file changed, 2 deletions(-)
Applied to u-boot-dm/master, thanks!
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2018-12-28 20:47 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-05 12:35 [U-Boot] [PATCH 1/3] buildman: Drop comment about Ctrl-C problem Simon Glass
2018-12-05 12:35 ` [U-Boot] [PATCH 2/3] buildman: Add support for building with clang Simon Glass
2018-12-06 1:31 ` Tom Rini
2018-12-28 20:47 ` sjg at google.com
2018-12-05 12:35 ` [U-Boot] [PATCH 3/3] travis: Use buildman " Simon Glass
2018-12-06 1:31 ` Tom Rini
2018-12-28 20:47 ` sjg at google.com
2018-12-28 20:47 ` [U-Boot] [PATCH 1/3] buildman: Drop comment about Ctrl-C problem sjg at google.com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox