From: Paolo Broggini <pbroggini@softool.ch>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] Re: Problem building U-Boot for ARM target
Date: Wed, 12 Oct 2005 10:46:18 +0200 [thread overview]
Message-ID: <434CCD5A.3090409@softool.ch> (raw)
In-Reply-To: <89A528FE6DB0FA44877BB2F05B8467180331C12C@ZIPPY.Emea.Arm.com>
Peter Pearse ha scritto:
>
> No question is stupid - just giving you the info.
I mean, it is quite obvious that it works by you (... and probably by
a lot of other people to)
>
> Depends how much time you have available to sort the bug....
> Sometimes it's worth it in the long run.
Definitely! but I'm far to be a "guru" in the make stuff.
>>I tried the macro cc-option "by hand" (so without $CFLAGS) in a bash
>>
>> shell and I got the same results as above, i.e. the check > for option
>> -mapcs-32 fails but the compiler support it and indeed the compilation
>> works fine! May be a bug?
Sorry forget about this I was making a mistake :-(
The script suggested by Catalin works perfectly either in a bash or a sh shell.
On the other hand, the U-Boot build process fails in both shell.
So I have investigated a little bit the macro cc-option:
cc-option = $(shell if $(CC) $(CFLAGS) $(1) -S -o /dev/null -xc /dev/null \
> /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi ;)
I tried to drop the CFLAGS variable from the macro:
cc-option = $(shell if $(CC) $(1) -S -o /dev/null -xc /dev/null \
> /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi ;)
and the build process worked fine i.e. the check for -mapcs-32 was OK.
Next step, in order to see the content of CFLAGS, I modified the macro as:
cc-option = $(shell echo "$(CFLAGS)" > ./flags.txt; if $(CC) $(CFLAGS) $(1) -S -o /dev/null -xc /dev/null \
> /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi ;)
and this revealed that among a lot of other otions it contains the failing option -mabi=apcs-gnu !!!
But this option is not set by anybody else just by:
PLATFORM_CPPFLAGS +=$(call cc-option,-mapcs-32,-mabi=apcs-gnu)
So it is obvious why cc-option returns the wrong option!
Now the questions are:
1) Why the CFLAGS is in the macro since cc-option should check the compiler support for a particular
option? Indeed the cc-option contained in config.mk is exactly the same as theone contained in
linux kernel 2.6.x makefile.
2) How is it possible that CFLAGS contains the failing option since
$(call cc-option,-mapcs-32,-mabi=apcs-gnu) is not yet processed and not set by anybody else?
3) Why if I replace -mapcs-32 with -g everything works fine? I wish I never tried that!!
Please Peter or Catalin since your compiler support both -mapcs-32 and -mabi=apcs-gnu options could
you try the following?
PLATFORM_CPPFLAGS +=$(call cc-option,-mapcs-32,-mfoo)
Thanks for your patience!
-P.Broggini
next parent reply other threads:[~2005-10-12 8:46 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <89A528FE6DB0FA44877BB2F05B8467180331C12C@ZIPPY.Emea.Arm.com>
2005-10-12 8:46 ` Paolo Broggini [this message]
[not found] <89A528FE6DB0FA44877BB2F05B8467180331C407@ZIPPY.Emea.Arm.com>
2005-10-12 12:26 ` [U-Boot-Users] Re: Problem building U-Boot for ARM target Paolo Broggini
2005-10-11 9:16 [U-Boot-Users] " Paolo Broggini
2005-10-11 10:38 ` [U-Boot-Users] " Catalin Marinas
2005-10-11 12:14 ` Paolo Broggini
2005-10-11 12:48 ` Catalin Marinas
2005-10-11 13:22 ` Paolo Broggini
2005-10-11 13:44 ` Catalin Marinas
2005-10-11 14:07 ` Paolo Broggini
2005-10-11 14:32 ` Catalin Marinas
2005-10-11 15:33 ` Paolo Broggini
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=434CCD5A.3090409@softool.ch \
--to=pbroggini@softool.ch \
--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.