mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Cross compiling using separate output directory problems
@ 2003-10-08  3:51 Peter Chubb
  2003-10-08 16:06 ` Sam Ravnborg
  0 siblings, 1 reply; 2+ messages in thread
From: Peter Chubb @ 2003-10-08  3:51 UTC (permalink / raw)
  To: sam; +Cc: linux-kernel, linux-ia64


Hi Sam,
   Thanks for doing the work to make comnpilation work with a separate
output directory.

I found the following changes necessary to get it to work properly
when crosscompiling for IA64.  Otherwise include/asm-ia64 hasn't been
created when setting up offsets.h.

There's also a minor change to tell make where to find the
toolchain-flags and check-gas scripts.

===== Makefile 1.36 vs edited =====
--- 1.36/arch/ia64/Makefile	Wed Sep 10 14:17:40 2003
+++ edited/Makefile	Wed Oct  8 13:48:53 2003
@@ -25,9 +25,9 @@
 GCC_VERSION=$(shell $(CC) -v 2>&1 | fgrep 'gcc version' | cut -f3 -d' ' | cut -f1 -d'.')
 GCC_MINOR_VERSION=$(shell $(CC) -v 2>&1 | fgrep 'gcc version' | cut -f3 -d' ' | cut -f2 -d'.')
 
-GAS_STATUS=$(shell arch/ia64/scripts/check-gas $(CC) $(OBJDUMP))
+GAS_STATUS=$(shell $(src)/arch/ia64/scripts/check-gas $(CC) $(OBJDUMP))
 
-CPPFLAGS	+= $(shell arch/ia64/scripts/toolchain-flags $(CC) $(OBJDUMP))
+CPPFLAGS	+= $(shell $(src)/arch/ia64/scripts/toolchain-flags $(CC) $(OBJDUMP))
 
 ifeq ($(GAS_STATUS),buggy)
 $(error Sorry, you need a newer version of the assember, one that is built from	\
@@ -84,18 +84,21 @@
 archclean:
 	$(Q)$(MAKE) $(clean)=$(boot)
 
-CLEAN_FILES += include/asm-ia64/.offsets.h.stamp include/asm-ia64/offsets.h vmlinux.gz bootloader
+CLEAN_FILES += include/asm-$(ARCH)/.offsets.h.stamp include/asm-$(ARCH)/offsets.h vmlinux.gz bootloader
 
-prepare: include/asm-ia64/offsets.h
+prepare: include/asm-$(ARCH)/offsets.h
+
+arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h
 
 include/asm-$(ARCH)/offsets.h: arch/$(ARCH)/kernel/asm-offsets.s
 	$(call filechk,gen-asm-offsets)
 
-arch/ia64/kernel/asm-offsets.s: include/asm-ia64/.offsets.h.stamp
+arch/ia64/kernel/asm-offsets.s: include/asm-$(ARCH)/.offsets.h.stamp
 
-include/asm-ia64/.offsets.h.stamp:
-	[ -s include/asm-ia64/offsets.h ] \
-	 || echo "#define IA64_TASK_SIZE 0" > include/asm-ia64/offsets.h
+include/asm-$(ARCH)/.offsets.h.stamp:
+	mkdir -p include/asm-$(ARCH)
+	[ -s include/asm-$(ARCH)/offsets.h ] \
+	 || echo "#define IA64_TASK_SIZE 0" > include/asm-$(ARCH)/offsets.h
 	touch $@
 
 boot:	lib/lib.a vmlinux

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Cross compiling using separate output directory problems
  2003-10-08  3:51 Cross compiling using separate output directory problems Peter Chubb
@ 2003-10-08 16:06 ` Sam Ravnborg
  0 siblings, 0 replies; 2+ messages in thread
From: Sam Ravnborg @ 2003-10-08 16:06 UTC (permalink / raw)
  To: Peter Chubb; +Cc: sam, linux-kernel, linux-ia64

On Wed, Oct 08, 2003 at 01:51:16PM +1000, Peter Chubb wrote:
> 
> Hi Sam,
>    Thanks for doing the work to make comnpilation work with a separate
> output directory.
Thanks, but Kai Germaschewski did most of the infrastructure woark, I
just made the final stuff. He deserves credits more than I do.

> I found the following changes necessary to get it to work properly
> when crosscompiling for IA64.  Otherwise include/asm-ia64 hasn't been
> created when setting up offsets.h.
> 
> There's also a minor change to tell make where to find the
> toolchain-flags and check-gas scripts.
I'm glad to see people having interest in it, I have notice several
architectures catching up on it.

A few minor comments.

>  
> -GAS_STATUS=$(shell arch/ia64/scripts/check-gas $(CC) $(OBJDUMP))
> +GAS_STATUS=$(shell $(src)/arch/ia64/scripts/check-gas $(CC) $(OBJDUMP))
I prefer the use of $(srctree), which is pointing to the root
of the kernel src tree. src works here because the file is included
from the top-level Makefile.
  
> -CPPFLAGS	+= $(shell arch/ia64/scripts/toolchain-flags $(CC) $(OBJDUMP))
> +CPPFLAGS	+= $(shell $(src)/arch/ia64/scripts/toolchain-flags $(CC) $(OBJDUMP))
Same goes here.

>  
> -CLEAN_FILES += include/asm-ia64/.offsets.h.stamp include/asm-ia64/offsets.h vmlinux.gz bootloader
> +CLEAN_FILES += include/asm-$(ARCH)/.offsets.h.stamp include/asm-$(ARCH)/offsets.h vmlinux.gz bootloader

s#$(ARCH)#ia64#g is unrelated, but OK.

I assume you will push this to David Mosberger.

	Sam

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-10-08 16:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-08  3:51 Cross compiling using separate output directory problems Peter Chubb
2003-10-08 16:06 ` Sam Ravnborg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®