All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeroen Hofstee <jeroen@myspectrum.nl>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v4 11/13] buildman: Search for *cc instead of *gcc for the compiler
Date: Tue, 05 Aug 2014 19:41:00 +0200	[thread overview]
Message-ID: <53E1172C.3060304@myspectrum.nl> (raw)
In-Reply-To: <1407250023-9501-12-git-send-email-sjg@chromium.org>

Hello Simon,

On 05-08-14 16:47, Simon Glass wrote:
> Compiler names normally end with cc, but not always gcc. So update the
> detection logic.
>
> Reported-by: Jeroen Hofstee <jeroen@myspectrum.nl>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
> Changes in v4:
> - Add new patch to search for *cc instead of *gcc
>
> Changes in v3: None
> Changes in v2: None
>
>   tools/buildman/toolchain.py | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/buildman/toolchain.py b/tools/buildman/toolchain.py
> index 1b9771f..e4fcf1b 100644
> --- a/tools/buildman/toolchain.py
> +++ b/tools/buildman/toolchain.py
> @@ -146,7 +146,7 @@ class Toolchains:
>               for subdir in ['.', 'bin', 'usr/bin']:
>                   dirname = os.path.join(path, subdir)
>                   if verbose: print "      - looking in '%s'" % dirname
> -                for fname in glob.glob(dirname + '/*gcc'):
> +                for fname in glob.glob(dirname + '/*cc'):
>                       if verbose: print "         - found '%s'" % fname
>                       self.Add(fname, True, verbose)
>   

I don't have the time to test this now, but this might have
funny side affects. Since cc itself is commonly a symlink to
gcc / clang etc, it will find the same compiler twice. Not sure
if this is handled correctly.

In my hacky attempt to support this I also stored the actual
compiler name, since it is concatenated with gcc somewhere
else if I recall correctly.

Anyway, unless you are sure this works, I don't mind dropping it,
for the time being. There are some more issues for e.g. FreeBSD,
gcc will get installed in /usr/local/bin and carries a version number
like gcc47 etc. clang on linux is just clang and there is no cc
version etc.

Regards,
Jeroen

  reply	other threads:[~2014-08-05 17:41 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-05 14:46 [U-Boot] [PATCH v4 0/13] Add some missing buildman features and deprecate MAKEALL Simon Glass
2014-08-05 14:46 ` [U-Boot] [PATCH v4 01/13] buildman: Fix a few typos Simon Glass
2014-08-05 14:46 ` [U-Boot] [PATCH v4 02/13] buildman: Add some notes about moving from MAKEALL Simon Glass
2014-08-05 22:34   ` York Sun
2014-08-05 23:07     ` Simon Glass
2014-08-05 23:21       ` York Sun
2014-08-06  2:15         ` Simon Glass
2014-08-06  2:53           ` York Sun
2014-08-06 14:20             ` Simon Glass
2014-08-06 15:06               ` Tom Rini
2014-08-07 12:12                 ` Simon Glass
2014-08-07 13:14                   ` Masahiro Yamada
2014-08-08 10:59                     ` Simon Glass
2014-08-05 14:46 ` [U-Boot] [PATCH v4 03/13] buildman: Allow building of current source tree Simon Glass
2014-08-05 18:54   ` Tom Rini
2014-08-05 18:58     ` Simon Glass
2014-08-05 19:01       ` Tom Rini
2014-08-05 14:46 ` [U-Boot] [PATCH v4 04/13] buildman: Move BuilderThread code to its own file Simon Glass
2014-08-05 14:46 ` [U-Boot] [PATCH v4 05/13] buildman: Sort command line options Simon Glass
2014-08-05 14:46 ` [U-Boot] [PATCH v4 06/13] buildman: Refactor output options Simon Glass
2014-08-05 14:46 ` [U-Boot] [PATCH v4 07/13] buildman: Add verbose option to display errors as they happen Simon Glass
2014-08-05 14:46 ` [U-Boot] [PATCH v4 08/13] buildman: Remove unused non-incremental build method code Simon Glass
2014-08-05 14:46 ` [U-Boot] [PATCH v4 09/13] buildman: Add an option to specify the buildman config file Simon Glass
2014-08-05 14:47 ` [U-Boot] [PATCH v4 10/13] buildman: Add a message indicating there are no errors Simon Glass
2014-08-05 14:47 ` [U-Boot] [PATCH v4 11/13] buildman: Search for *cc instead of *gcc for the compiler Simon Glass
2014-08-05 17:41   ` Jeroen Hofstee [this message]
2014-08-05 18:25     ` Simon Glass
2014-08-05 14:47 ` [U-Boot] [PATCH v4 12/13] buildman: Add a few more toolchain examples to the README Simon Glass
2014-08-05 14:47 ` [U-Boot] [PATCH v4 13/13] RFC: Deprecate MAKEALL Simon Glass
2014-08-05 16:43   ` York Sun
2014-08-05 18:41     ` Simon Glass
2014-08-05 18:48       ` York Sun
2014-08-05 18:52         ` Simon Glass
2014-08-05 18:55           ` York Sun
2014-08-05 18:59             ` Simon Glass
2014-08-05 19:01               ` York Sun
2014-08-05 19:10                 ` Tom Rini
2014-08-05 22:06                   ` York Sun
2014-08-08 21:12                     ` Tom Rini
2014-08-08 21:19                       ` York Sun
2014-08-08 21:30                         ` Tom Rini
2014-08-08 21:36                           ` York Sun

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53E1172C.3060304@myspectrum.nl \
    --to=jeroen@myspectrum.nl \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.