Message ID | 1406750096-7281-8-git-send-email-jeroen@myspectrum.nl |
---|---|
State | Superseded |
Delegated to: | Albert ARIBAUD |
Headers | show |
Hi Jeroen, On Wed, 30 Jul 2014 21:54:55 +0200 Jeroen Hofstee <jeroen@myspectrum.nl> wrote: > Since the host compiler might not be gcc but e.g. clang > default to cc to invoke it. > > cc: Masahiro Yamada <yamada.m@jp.panasonic.com> > cc: Tom Rini <trini@ti.com> > Signed-off-by: Jeroen Hofstee <jeroen@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
Hi Jeroen, Masahiro, On Thu, 31 Jul 2014 19:01:22 +0900, Masahiro Yamada <yamada.m@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,
Hello Albert, On 09-09-14 16:31, Albert ARIBAUD wrote: > On Thu, 31 Jul 2014 19:01:22 +0900, Masahiro Yamada > <yamada.m@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
Hi Jeroen, On Tue, 09 Sep 2014 19:34:44 +0200, Jeroen Hofstee <jeroen@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 > > <yamada.m@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,
Hi, On 09-09-14 21:59, Albert ARIBAUD wrote: > Hi Jeroen, > > On Tue, 09 Sep 2014 19:34:44 +0200, Jeroen Hofstee > <jeroen@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 >>> <yamada.m@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
Hello Albert, On 09-09-14 21:59, Albert ARIBAUD wrote: > Hi Jeroen, > > On Tue, 09 Sep 2014 19:34:44 +0200, Jeroen Hofstee > <jeroen@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
Hi Jeroen, On Tue, 09 Sep 2014 19:34:44 +0200 Jeroen Hofstee <jeroen@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 > > <yamada.m@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-kernel@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
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
Since the host compiler might not be gcc but e.g. clang default to cc to invoke it. cc: Masahiro Yamada <yamada.m@jp.panasonic.com> cc: Tom Rini <trini@ti.com> Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl> --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)