Re: [U-Boot] [PATCH v2 7/8] Makefile: default to cc for host compiler

2014-09-10 Thread Jeroen Hofstee

Hello Albert,

On 09-09-14 21:59, Albert ARIBAUD wrote:

Hi Jeroen,

On Tue, 09 Sep 2014 19:34:44 +0200, Jeroen Hofstee
jer...@myspectrum.nl wrote:


I've tried building rpi_b as per the README, but I keep getting

/usr/bin/as: unrecognized option '-mfloat-abi=soft'
clang: error: assembler command failed with exit code 1 (use -v
to see invocation)

Shouldn't rpi_b build properly since it is the one given as an example
for Debian-based building?



ok, this turns out to be a simple issue. The gas for arm is not
found since CROSS_COMPILE has a trailing dash. When it is removed
the correct as is picked up (and libs is found automagically as well).
Both the 3.4 and 3.5 binary packages from Ubuntu are able to
compile u-boot with this change, so the README should be updated.

Regards,
Jeroen

This should work:
make HOSTCC=clang CC=clang -target arm-linux-gnueabi -mllvm 
-arm-use-movt=0 -no-integrated-as V=1 all

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 7/8] Makefile: default to cc for host compiler

2014-09-10 Thread Masahiro Yamada
Hi Jeroen,


On Tue, 09 Sep 2014 19:34:44 +0200
Jeroen Hofstee jer...@myspectrum.nl wrote:

 Hello Albert,
 
 On 09-09-14 16:31, Albert ARIBAUD wrote:
  On Thu, 31 Jul 2014 19:01:22 +0900, Masahiro Yamada
  yamad...@jp.panasonic.com wrote:
 
HOSTCXX  = g++
HOSTCFLAGS   = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer
  For consistency,
 
  HOSTCXX = c++
 
  ?
  So, Jeroen, what is your pick ? Will you send a v3 7/8, or are you
  sticking with g++?
 
  (or if everyone agrees, I could to the change to v2 7/8 when applying
  it, and add a comment about it in the commit message.)
 
 I did check Masahiro's statement that cpp is actually used in u-boot
 and it is; make xconfig uses it, if I recall correctly. And as Masahiro
 suggested I sent it to linux-kbuild mailinglist, but I am in the impression
 it never arrived, perhaps I need to be subscribed or something...


I received it because you cced me.

But I am afraid it did not reach the kbuild ML
because I could not find it in the kbuild ML archive.


I recommend to subscribe to the ML and then
resend your patch.


To subscribe to it, visit the following and click 'subscribe'
http://vger.kernel.org/vger-lists.html#linux-kbuild

The kbuild ML does not have much volume.
I guess you won't be annoyed.


To attract the attention of key persons, I'd like to suggest:

 - add 'kbuild: ' prefix to the subject like:

 kbuild: default to cc/c++ for host compiler

 - you can cc linux-ker...@vger.kernel.org too.
   (scripts/get_maintainer.pl will do it automatically.
But I am not sure if it can be reached from unsubscribers.
this ML has a huge volume..)





Best Regards
Masahiro Yamada

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 7/8] Makefile: default to cc for host compiler

2014-09-09 Thread Albert ARIBAUD
Hi Jeroen, Masahiro,

On Thu, 31 Jul 2014 19:01:22 +0900, Masahiro Yamada
yamad...@jp.panasonic.com wrote:

   HOSTCXX  = g++
   HOSTCFLAGS   = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer

 For consistency,
 
 HOSTCXX = c++
 
 ?

So, Jeroen, what is your pick ? Will you send a v3 7/8, or are you
sticking with g++?

(or if everyone agrees, I could to the change to v2 7/8 when applying
it, and add a comment about it in the commit message.)

Amicalement,
-- 
Albert.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 7/8] Makefile: default to cc for host compiler

2014-09-09 Thread Jeroen Hofstee

Hello Albert,

On 09-09-14 16:31, Albert ARIBAUD wrote:

On Thu, 31 Jul 2014 19:01:22 +0900, Masahiro Yamada
yamad...@jp.panasonic.com wrote:


  HOSTCXX  = g++
  HOSTCFLAGS   = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer

For consistency,

HOSTCXX = c++

?

So, Jeroen, what is your pick ? Will you send a v3 7/8, or are you
sticking with g++?

(or if everyone agrees, I could to the change to v2 7/8 when applying
it, and add a comment about it in the commit message.)


I did check Masahiro's statement that cpp is actually used in u-boot
and it is; make xconfig uses it, if I recall correctly. And as Masahiro
suggested I sent it to linux-kbuild mailinglist, but I am in the impression
it never arrived, perhaps I need to be subscribed or something...

Anyway, Masahiro's suggestion is sound and I am fine you changing
it while applying. I tested it on FreeBSD, Xubuntu and Debian.

Regards,
Jeroen

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 7/8] Makefile: default to cc for host compiler

2014-09-09 Thread Albert ARIBAUD
Hi Jeroen,

On Tue, 09 Sep 2014 19:34:44 +0200, Jeroen Hofstee
jer...@myspectrum.nl wrote:

 Hello Albert,
 
 On 09-09-14 16:31, Albert ARIBAUD wrote:
  On Thu, 31 Jul 2014 19:01:22 +0900, Masahiro Yamada
  yamad...@jp.panasonic.com wrote:
 
HOSTCXX  = g++
HOSTCFLAGS   = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer
  For consistency,
 
  HOSTCXX = c++
 
  ?
  So, Jeroen, what is your pick ? Will you send a v3 7/8, or are you
  sticking with g++?
 
  (or if everyone agrees, I could to the change to v2 7/8 when applying
  it, and add a comment about it in the commit message.)
 
 I did check Masahiro's statement that cpp is actually used in u-boot
 and it is; make xconfig uses it, if I recall correctly. And as Masahiro
 suggested I sent it to linux-kbuild mailinglist, but I am in the impression
 it never arrived, perhaps I need to be subscribed or something...
 
 Anyway, Masahiro's suggestion is sound and I am fine you changing
 it while applying. I tested it on FreeBSD, Xubuntu and Debian.

I've tried building rpi_b as per the README, but I keep getting

/usr/bin/as: unrecognized option '-mfloat-abi=soft'
clang: error: assembler command failed with exit code 1 (use -v
to see invocation)

Shouldn't rpi_b build properly since it is the one given as an example
for Debian-based building?

 Regards,
 Jeroen

Amicalement,
-- 
Albert.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 7/8] Makefile: default to cc for host compiler

2014-09-09 Thread Jeroen Hofstee

Hi,

On 09-09-14 21:59, Albert ARIBAUD wrote:

Hi Jeroen,

On Tue, 09 Sep 2014 19:34:44 +0200, Jeroen Hofstee
jer...@myspectrum.nl wrote:


Hello Albert,

On 09-09-14 16:31, Albert ARIBAUD wrote:

On Thu, 31 Jul 2014 19:01:22 +0900, Masahiro Yamada
yamad...@jp.panasonic.com wrote:


   HOSTCXX  = g++
   HOSTCFLAGS   = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer

For consistency,

HOSTCXX = c++

?

So, Jeroen, what is your pick ? Will you send a v3 7/8, or are you
sticking with g++?

(or if everyone agrees, I could to the change to v2 7/8 when applying
it, and add a comment about it in the commit message.)

I did check Masahiro's statement that cpp is actually used in u-boot
and it is; make xconfig uses it, if I recall correctly. And as Masahiro
suggested I sent it to linux-kbuild mailinglist, but I am in the impression
it never arrived, perhaps I need to be subscribed or something...

Anyway, Masahiro's suggestion is sound and I am fine you changing
it while applying. I tested it on FreeBSD, Xubuntu and Debian.

I've tried building rpi_b as per the README, but I keep getting

/usr/bin/as: unrecognized option '-mfloat-abi=soft'
clang: error: assembler command failed with exit code 1 (use -v
to see invocation)

Shouldn't rpi_b build properly since it is the one given as an example
for Debian-based building?




As discussed with Albert there seems to be some Debian / Ubuntu
specific changes to the package causing trouble. Checking out the
llvm 3.5 branch works fine, using the package fails with above
mentioned error.

No idea why at the moment, patches are fine...

Regards,
Jeroen
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 7/8] Makefile: default to cc for host compiler

2014-07-31 Thread Masahiro Yamada
Hi Jeroen,


On Wed, 30 Jul 2014 21:54:55 +0200
Jeroen Hofstee jer...@myspectrum.nl wrote:

 Since the host compiler might not be gcc but e.g. clang
 default to cc to invoke it.
 
 cc: Masahiro Yamada yamad...@jp.panasonic.com
 cc: Tom Rini tr...@ti.com
 Signed-off-by: Jeroen Hofstee jer...@myspectrum.nl
 ---
  Makefile | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/Makefile b/Makefile
 index 80eb239..c19f7d9 100644
 --- a/Makefile
 +++ b/Makefile
 @@ -204,7 +204,7 @@ CONFIG_SHELL := $(shell if [ -x $$BASH ]; then echo 
 $$BASH; \
 else if [ -x /bin/bash ]; then echo /bin/bash; \
 else echo sh; fi ; fi)
  
 -HOSTCC   = gcc
 +HOSTCC   = cc
  HOSTCXX  = g++
  HOSTCFLAGS   = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer
  HOSTCXXFLAGS = -O2



For consistency,

HOSTCXX = c++

?


Kconfig has a C++ host program.
(scripts/kconfig/qconf.cc)



Could you please consider posting this patch to
linux-kbuild ML  because this may be,
I think, acceptable in Linux too.

On systems where both gcc and clang are installed,
we can select gcc or clang
by using update-alternatives (or alternative)
command.





Best Regards
Masahiro Yamada

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v2 7/8] Makefile: default to cc for host compiler

2014-07-30 Thread Jeroen Hofstee
Since the host compiler might not be gcc but e.g. clang
default to cc to invoke it.

cc: Masahiro Yamada yamad...@jp.panasonic.com
cc: Tom Rini tr...@ti.com
Signed-off-by: Jeroen Hofstee jer...@myspectrum.nl
---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 80eb239..c19f7d9 100644
--- a/Makefile
+++ b/Makefile
@@ -204,7 +204,7 @@ CONFIG_SHELL := $(shell if [ -x $$BASH ]; then echo 
$$BASH; \
  else if [ -x /bin/bash ]; then echo /bin/bash; \
  else echo sh; fi ; fi)
 
-HOSTCC   = gcc
+HOSTCC   = cc
 HOSTCXX  = g++
 HOSTCFLAGS   = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer
 HOSTCXXFLAGS = -O2
-- 
1.9.1

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot