public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* cleaning up "make headers_install" for various architectures
@ 2007-10-10 16:44 Robert P. J. Day
  2007-10-10 16:59 ` Randy Dunlap
  0 siblings, 1 reply; 10+ messages in thread
From: Robert P. J. Day @ 2007-10-10 16:44 UTC (permalink / raw)
  To: Linux Kernel Mailing List


  there are a number of architectures that generate warnings (and, in
one case, an error) if you try to do:

  $ make ARCH=whatever headers_install

when you don't have an appropriate cross-compiler installed.  this
doesn't seem to make sense as you shouldn't have to do any actual
cross-compiling if you're just trying to install headers, should you?

  the examples (i already mentioned the ia64 example on that list):


$ make ARCH=m68k headers_install
make: m68k-linux-gnu-gcc: Command not found
  CHK     include/linux/version.h
  HOSTCC  scripts/unifdef
  MKDIR   include
  ... etc etc ...


$ make ARCH=h8300 headers_install
make: h8300-elf-gcc: Command not found
make: h8300-elf-gcc: Command not found
  CHK     include/linux/version.h
make[1]: `scripts/unifdef' is up to date.
  UNIFDEF include/asm/page.h
  ... etc etc ...


$ make ARCH=sparc64 headers_install
/bin/sh: sparc64-linux-gcc: command not found
make: sparc64-linux-gcc: Command not found
  CHK     include/linux/version.h
make[1]: `scripts/unifdef' is up to date.
  MKDIR   include/asm-sparc64
  ... etc etc ...


$ make ARCH=ia64 headers_install
/home/rpjday/k/git/arch/ia64/scripts/check-segrel.S: Assembler messages:
/home/rpjday/k/git/arch/ia64/scripts/check-segrel.S:1: Error: unknown pseudo-op: `.rodata'
/home/rpjday/k/git/arch/ia64/scripts/check-segrel.S:2: Error: no such instruction: `data4 @segrel(start)'
objdump: '/tmp/out3703': No such file/home/rpjday/k/git/arch/ia64/scripts/toolchain-flags: line 19: [: !=:
unary operator expected


  the final example, parisc, just plain fails:

$ make ARCH=parisc headers_install
/home/rpjday/k/git/scripts/gcc-version.sh: line 16: hppa-linux-gcc: command not found
/home/rpjday/k/git/scripts/gcc-version.sh: line 17: hppa-linux-gcc: command not found
/home/rpjday/k/git/arch/parisc/Makefile:39: *** Sorry, GCC v3.3 or above is required..  Stop.


rday
-- 
========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA

http://crashcourse.ca
========================================================================

^ permalink raw reply	[flat|nested] 10+ messages in thread
* [matthew@wil.cx: Re: [parisc-linux] parisc arch makefile clean-up needed [Was: cleaning up "make headers_install" for various architectures]]
@ 2007-10-10 19:15 Matthew Wilcox
  2007-10-10 19:54 ` parisc arch makefile clean-up needed [Was: cleaning up "make headers_install" for various architectures] Sam Ravnborg
  0 siblings, 1 reply; 10+ messages in thread
From: Matthew Wilcox @ 2007-10-10 19:15 UTC (permalink / raw)
  To: linux-kernel


Sam mipslet 'parisc-linux' in the first mail ... so i replied to the
second mail ... without checking l-k was still cc'd.

----- Forwarded message from Matthew Wilcox <matthew@wil.cx> -----

From: Matthew Wilcox <matthew@wil.cx>
To: Sam Ravnborg <sam@ravnborg.org>
Cc: parisc-linux@lists.parisc-linux.org
Subject: Re: [parisc-linux] parisc arch makefile clean-up needed [Was:
	cleaning up "make headers_install" for various architectures]

On Wed, Oct 10, 2007 at 08:42:25PM +0200, Sam Ravnborg wrote:
> parisc arch Makefile needs some love and care...
> 
> The logic selecting CROSS_COMPILE seems fishy and wrong -
> the error reported by rday is obvious in this respect.

He doesn't have a compiler installed that can target parisc.  It doesn't
seem obvious to me that this should work.

> FINAL_LD is unused - kill it.

OK.

> Building with oldpalo has been broken for a loong time - time to kill it?
> Hint - the "cd ../palo" is not working as expected.
> And use of TOPDIR is deprecated.

OK, killed.  I don't think anyone still uses that.

> The libs-y assignment should learn from the other architectures how to
> get the gcc lib filename:
> $(shell $(CC) $(CFLAGS) -print-libgcc-file-name)

Actually, this looks utterly unstandardised:

arch/cris/Makefile:LIBGCC = $(shell $(CC) $(CFLAGS) -print-file-name=libgcc.a)
arch/h8300/Makefile:LIBGCC := $(shell $(CROSS-COMPILE)$(CC) $(CFLAGS) -print-libgcc-file-name)
arch/m32r/Makefile:LIBGCC       := $(shell $(CC) $(CFLAGS) -print-libgcc-file-name)
arch/parisc/Makefile:libs-y     += arch/parisc/lib/ `$(CC) -print-libgcc-file-name`
arch/sh64/Makefile:LIBGCC := $(shell $(CC) $(CFLAGS) -print-libgcc-file-name)
arch/sh/Makefile:LIBGCC := $(shell $(CC) $(CFLAGS) -print-libgcc-file-name)
arch/xtensa/Makefile:LIBGCC := $(shell $(CC) $(CFLAGS) -print-libgcc-file-name)

How about we set it in the main Makefile, or one of the ones in
scripts/?  That way we don't have to learn why $(shell $(CC) $(CFLAGS)
-print-libgcc-file-name) is superior to `$(CC) -print-libgcc-file-name`

> 
> And this snippet is also wrong:
> PALO := $(shell if which palo; then : ; \
> 	elif [ -x /sbin/palo ]; then echo /sbin/palo; \
> 	fi)
> 
> palo: vmlinux
> 	@if [ -x $PALO ]; then \
> 
> 
> Make does not export variables so $PALO is not the same as $(PALO).
> The latter should be used.

Huh.  Looks like the sense of the test is reversed too.  That should
probably be:

	@if [ ! -x $(PALO) ]; then \

> I did not supply a patch because I do not fully understand the
> logic behind setting CROSS_COMPILE and 64BIT or not.
> But I will be happy to review a patch to fix the issues in the
> parisc Makefile.

One issue is that we don't have native 64-bit userspace on parisc.
And we don't have a toolchain that you can pass -m32/-m64 to; you have
to explicitly build a hppa64-linux-gnu toolchain.  Another thing we try
and make user-friendly is that if you're building the parisc kernel on
a non-parisc machine, you need to use a cross-compiler, so we autodetect
that case for you.

-- 
Intel are signing my paycheques ... these opinions are still mine
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours.  We can't possibly take such
a retrograde step."
_______________________________________________
parisc-linux mailing list
parisc-linux@lists.parisc-linux.org
http://lists.parisc-linux.org/mailman/listinfo/parisc-linux

----- End forwarded message -----

-- 
Intel are signing my paycheques ... these opinions are still mine
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours.  We can't possibly take such
a retrograde step."

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

end of thread, other threads:[~2007-10-10 21:38 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-10 16:44 cleaning up "make headers_install" for various architectures Robert P. J. Day
2007-10-10 16:59 ` Randy Dunlap
2007-10-10 17:26   ` Robert P. J. Day
2007-10-10 18:38     ` parisc arch makefile clean-up needed [Was: cleaning up "make headers_install" for various architectures] Sam Ravnborg
2007-10-10 19:38       ` Kyle McMartin
2007-10-10 19:58         ` Sam Ravnborg
2007-10-10 20:21       ` Matthew Wilcox
2007-10-10 20:41         ` Sam Ravnborg
2007-10-10 21:33         ` Robert P. J. Day
  -- strict thread matches above, loose matches on Subject: below --
2007-10-10 19:15 [matthew@wil.cx: Re: [parisc-linux] parisc arch makefile clean-up needed [Was: cleaning up "make headers_install" for various architectures]] Matthew Wilcox
2007-10-10 19:54 ` parisc arch makefile clean-up needed [Was: cleaning up "make headers_install" for various architectures] Sam Ravnborg

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