* `make checkstack' and cross-compilation
@ 2006-12-01 13:58 Geert Uytterhoeven
2006-12-01 15:30 ` Jeff Dike
0 siblings, 1 reply; 5+ messages in thread
From: Geert Uytterhoeven @ 2006-12-01 13:58 UTC (permalink / raw)
To: Linux Kernel Development
Makefile has:
| # Use $(SUBARCH) here instead of $(ARCH) so that this works for UML.
| # In the UML case, $(SUBARCH) is the name of the underlying
| # architecture, while for all other arches, it is the same as $(ARCH).
| checkstack:
| $(OBJDUMP) -d vmlinux $$(find . -name '*.ko') | \
| $(PERL) $(src)/scripts/checkstack.pl $(SUBARCH)
While this may fix `make checkstack' for UML, it breaks cross-compilation.
E.g. when cross-compiling for PPC on ia32, ARCH=powerpc, but SUBARCH=i386.
Probably it should use SUBARCH if ARCH=um, and ARCH otherwise?
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- Sony Network and Software Technology Center Europe (NSCE)
Geert.Uytterhoeven@sonycom.com ------- The Corporate Village, Da Vincilaan 7-D1
Voice +32-2-7008453 Fax +32-2-7008622 ---------------- B-1935 Zaventem, Belgium
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: `make checkstack' and cross-compilation 2006-12-01 13:58 `make checkstack' and cross-compilation Geert Uytterhoeven @ 2006-12-01 15:30 ` Jeff Dike 2006-12-01 16:09 ` Geert Uytterhoeven 0 siblings, 1 reply; 5+ messages in thread From: Jeff Dike @ 2006-12-01 15:30 UTC (permalink / raw) To: Geert Uytterhoeven; +Cc: Linux Kernel Development On Fri, Dec 01, 2006 at 02:58:16PM +0100, Geert Uytterhoeven wrote: > Makefile has: > | # Use $(SUBARCH) here instead of $(ARCH) so that this works for UML. > | # In the UML case, $(SUBARCH) is the name of the underlying > | # architecture, while for all other arches, it is the same as $(ARCH). > | checkstack: > | $(OBJDUMP) -d vmlinux $$(find . -name '*.ko') | \ > | $(PERL) $(src)/scripts/checkstack.pl $(SUBARCH) > > While this may fix `make checkstack' for UML, it breaks cross-compilation. > E.g. when cross-compiling for PPC on ia32, ARCH=powerpc, but SUBARCH=i386. > > Probably it should use SUBARCH if ARCH=um, and ARCH otherwise? Whoops, you're right. Do you have a patch? If not, I'll make one. And, do you have a cross-compilation environment which tests this? Jeff -- Work email - jdike at linux dot intel dot com ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: `make checkstack' and cross-compilation 2006-12-01 15:30 ` Jeff Dike @ 2006-12-01 16:09 ` Geert Uytterhoeven 2006-12-05 18:10 ` Jeff Dike 0 siblings, 1 reply; 5+ messages in thread From: Geert Uytterhoeven @ 2006-12-01 16:09 UTC (permalink / raw) To: Jeff Dike; +Cc: Linux Kernel Development On Fri, 1 Dec 2006, Jeff Dike wrote: > On Fri, Dec 01, 2006 at 02:58:16PM +0100, Geert Uytterhoeven wrote: > > Makefile has: > > | # Use $(SUBARCH) here instead of $(ARCH) so that this works for UML. > > | # In the UML case, $(SUBARCH) is the name of the underlying > > | # architecture, while for all other arches, it is the same as $(ARCH). > > | checkstack: > > | $(OBJDUMP) -d vmlinux $$(find . -name '*.ko') | \ > > | $(PERL) $(src)/scripts/checkstack.pl $(SUBARCH) > > > > While this may fix `make checkstack' for UML, it breaks cross-compilation. > > E.g. when cross-compiling for PPC on ia32, ARCH=powerpc, but SUBARCH=i386. > > > > Probably it should use SUBARCH if ARCH=um, and ARCH otherwise? > > Whoops, you're right. > > Do you have a patch? If not, I'll make one. No. > And, do you have a cross-compilation environment which tests this? Yes :-) Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- Sony Network and Software Technology Center Europe (NSCE) Geert.Uytterhoeven@sonycom.com ------- The Corporate Village, Da Vincilaan 7-D1 Voice +32-2-7008453 Fax +32-2-7008622 ---------------- B-1935 Zaventem, Belgium ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: `make checkstack' and cross-compilation 2006-12-01 16:09 ` Geert Uytterhoeven @ 2006-12-05 18:10 ` Jeff Dike 2006-12-06 9:35 ` Geert Uytterhoeven 0 siblings, 1 reply; 5+ messages in thread From: Jeff Dike @ 2006-12-05 18:10 UTC (permalink / raw) To: Geert Uytterhoeven; +Cc: Linux Kernel Development On Fri, Dec 01, 2006 at 05:09:17PM +0100, Geert Uytterhoeven wrote: > On Fri, 1 Dec 2006, Jeff Dike wrote: > > And, do you have a cross-compilation environment which tests this? > > Yes :-) Can you test this patch? It works for UML and native x86_64 - if it works for your cross-build, I'll send it in. Jeff Index: linux-2.6.18-mm/Makefile =================================================================== --- linux-2.6.18-mm.orig/Makefile 2006-11-24 14:36:32.000000000 -0500 +++ linux-2.6.18-mm/Makefile 2006-12-05 13:08:20.000000000 -0500 @@ -1390,12 +1390,18 @@ endif #ifeq ($(mixed-targets),1) PHONY += checkstack kernelrelease kernelversion -# Use $(SUBARCH) here instead of $(ARCH) so that this works for UML. -# In the UML case, $(SUBARCH) is the name of the underlying -# architecture, while for all other arches, it is the same as $(ARCH). +# UML needs a little special treatment here. It wants to use the host +# toolchain, so needs $(SUBARCH) passed to checkstack.pl. Everyone +# else wants $(ARCH), including people doing cross-builds, which means +# that $(SUBARCH) doesn't work here. +ifeq ($(ARCH), um) +CHECKSTACK_ARCH := $(SUBARCH) +else +CHECKSTACK_ARCH := $(ARCH) +endif checkstack: $(OBJDUMP) -d vmlinux $$(find . -name '*.ko') | \ - $(PERL) $(src)/scripts/checkstack.pl $(SUBARCH) + $(PERL) $(src)/scripts/checkstack.pl $(CHECKSTACK_ARCH) kernelrelease: $(if $(wildcard include/config/kernel.release), $(Q)echo $(KERNELRELEASE), \ -- Work email - jdike at linux dot intel dot com ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: `make checkstack' and cross-compilation 2006-12-05 18:10 ` Jeff Dike @ 2006-12-06 9:35 ` Geert Uytterhoeven 0 siblings, 0 replies; 5+ messages in thread From: Geert Uytterhoeven @ 2006-12-06 9:35 UTC (permalink / raw) To: Jeff Dike; +Cc: Linux Kernel Development On Tue, 5 Dec 2006, Jeff Dike wrote: > On Fri, Dec 01, 2006 at 05:09:17PM +0100, Geert Uytterhoeven wrote: > > On Fri, 1 Dec 2006, Jeff Dike wrote: > > > And, do you have a cross-compilation environment which tests this? > > > > Yes :-) > > Can you test this patch? It works for UML and native x86_64 - if it works > for your cross-build, I'll send it in. Thanks, works fine for cross-compiling for powerpc. Acked-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> > Index: linux-2.6.18-mm/Makefile > =================================================================== > --- linux-2.6.18-mm.orig/Makefile 2006-11-24 14:36:32.000000000 -0500 > +++ linux-2.6.18-mm/Makefile 2006-12-05 13:08:20.000000000 -0500 > @@ -1390,12 +1390,18 @@ endif #ifeq ($(mixed-targets),1) > > PHONY += checkstack kernelrelease kernelversion > > -# Use $(SUBARCH) here instead of $(ARCH) so that this works for UML. > -# In the UML case, $(SUBARCH) is the name of the underlying > -# architecture, while for all other arches, it is the same as $(ARCH). > +# UML needs a little special treatment here. It wants to use the host > +# toolchain, so needs $(SUBARCH) passed to checkstack.pl. Everyone > +# else wants $(ARCH), including people doing cross-builds, which means > +# that $(SUBARCH) doesn't work here. > +ifeq ($(ARCH), um) > +CHECKSTACK_ARCH := $(SUBARCH) > +else > +CHECKSTACK_ARCH := $(ARCH) > +endif > checkstack: > $(OBJDUMP) -d vmlinux $$(find . -name '*.ko') | \ > - $(PERL) $(src)/scripts/checkstack.pl $(SUBARCH) > + $(PERL) $(src)/scripts/checkstack.pl $(CHECKSTACK_ARCH) > > kernelrelease: > $(if $(wildcard include/config/kernel.release), $(Q)echo $(KERNELRELEASE), \ Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- Sony Network and Software Technology Center Europe (NSCE) Geert.Uytterhoeven@sonycom.com ------- The Corporate Village, Da Vincilaan 7-D1 Voice +32-2-7008453 Fax +32-2-7008622 ---------------- B-1935 Zaventem, Belgium ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2006-12-06 9:35 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2006-12-01 13:58 `make checkstack' and cross-compilation Geert Uytterhoeven 2006-12-01 15:30 ` Jeff Dike 2006-12-01 16:09 ` Geert Uytterhoeven 2006-12-05 18:10 ` Jeff Dike 2006-12-06 9:35 ` Geert Uytterhoeven
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox