All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: Guenter Roeck <linux@roeck-us.net>
Cc: Max Filippov <jcmvbkbc@gmail.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: Linux kernel cross-compilers
Date: Fri, 16 Aug 2013 21:26:51 +0200	[thread overview]
Message-ID: <20130816192651.GA13953@merkur.ravnborg.org> (raw)
In-Reply-To: <520E48A7.3050401@roeck-us.net>

On Fri, Aug 16, 2013 at 08:43:35AM -0700, Guenter Roeck wrote:
> On 08/16/2013 02:45 AM, Max Filippov wrote:
>>>> Guenter,
>>>> can you share a complete build log with V=1?
>>>>
>>>
>>> http://roeck-us.net/linux/logs/make.xtensa.log.bad
>>> http://roeck-us.net/linux/logs/make.xtensa.log.ok
>>>
>>> Key difference: the failing command in the bad case is
>>>          xtensa-linux-objcopy -O elf32-xtensa-le
>>> and in the good case
>>>          xtensa-linux-objcopy -O elf32-xtensa-be
>>>
>>> Same compiler (4.6.3 from kernel.org), same configuration file, same command
>>> line.
>>> Configuration file is generated from defconfig, and the resulting .config
>>> file
>>> is the same in both cases.
>>>
>>> If I execute make and expicitly set BIG_ENDIAN=1 on the failing system as
>>> parameter to it,
>>> it works fine. If I set BIG_ENDIAN=0 on the passing system, it fails.
>>>
>>> I am puzzled. Guess there must be something different, but I have no idea
>>> what it might be.
>>
>> What is the output of
>>
>> echo -e __XTENSA_EB__ | xtensa-linux-gcc -E -
>>
>> on the failing system?
>>
> It is "1", but that let me pinpoint the problem.
>
> On the failing system, the version of echo executed by make does
> not understand the "-e" option. Thus, when running arch/xtensa/boot/Makefile,
> "echo -e __XTENSA_EB__" returns "-e __XTENSA_EB__", which doesn't compile,
> and BIG_ENDIAN ends up being 0. So the compiler is completely innocent.
>
> I found out the root source: SHELL is set the /bin/sh, which on the failing
> system points to /bin/dash (default in Ubuntu, or at least it used to be).
> dash apparently has a built-in version of echo which does not understand '-e'.

Could you try to replace "echo -e bla" with "printf "bla".
Kbuild.include uses some similar tricks but here printf is used.
Maybe this can be dash compatible then

	Sam

  parent reply	other threads:[~2013-08-17  0:13 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-15  9:07 Linux kernel cross-compilers Guenter Roeck
2013-08-15  9:46 ` Max Filippov
2013-08-15 14:02   ` Guenter Roeck
2013-08-15 14:22     ` Max Filippov
2013-08-15 14:34       ` Guenter Roeck
2013-08-16  5:48   ` Tony Breeds
2013-08-16  7:22     ` Max Filippov
2013-08-16  7:50       ` Guenter Roeck
2013-08-16  8:31         ` Max Filippov
2013-08-16  9:21           ` Guenter Roeck
2013-08-16  9:45             ` Max Filippov
2013-08-16 15:43               ` Guenter Roeck
2013-08-16 19:09                 ` Max Filippov
2013-08-17 16:56                   ` Sam Ravnborg
2013-08-16 19:26                 ` Sam Ravnborg [this message]
2013-08-16 20:19                   ` Guenter Roeck
2013-08-16  5:47 ` Tony Breeds
2013-08-16  7:54   ` Guenter Roeck

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=20130816192651.GA13953@merkur.ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=jcmvbkbc@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    /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.