Sam Ravnborg | 10 Oct 20:42
Gravatar

parisc arch makefile clean-up needed [Was: cleaning up "make headers_install" for various architectures]

It helps when I use the right mailing list address..

	Sam

----- Forwarded message from Sam Ravnborg <sam <at> ravnborg.org> -----

Subject: parisc arch makefile clean-up needed [Was: cleaning up "make headers_install" for various architectures]
Sender: linux-kernel-owner <at> vger.kernel.org
From: Sam Ravnborg <sam <at> ravnborg.org>
Date:	Wed, 10 Oct 2007 20:38:58 +0200
User-Agent: Mutt/1.4.2.1i
To: "Robert P. J. Day" <rpjday <at> mindspring.com>,
	parisc-linux-request <at> lists.parisc-linux.org
Cc: Randy Dunlap <randy.dunlap <at> oracle.com>,
	Linux Kernel Mailing List <linux-kernel <at> vger.kernel.org>,
	Matthew Wilcox <matthew <at> wil.cx>,
	Grant Grundler <grundler <at> parisc-linux.org>,
	Kyle McMartin <kyle <at> parisc-linux.org>
X-Mailing-List:	linux-kernel <at> vger.kernel.org

Added parisc mailing-listi and cc'ed parisc maintainers.

On Wed, Oct 10, 2007 at 01:26:16PM -0400, Robert P. J. Day wrote:
> On Wed, 10 Oct 2007, Randy Dunlap wrote:
> 
> > On Wed, 10 Oct 2007 12:44:58 -0400 (EDT) Robert P. J. Day wrote:
> >
> > >   the final example, parisc, just plain fails:
> > >
> > > $ make ARCH=parisc headers_install
(Continue reading)

Matthew Wilcox | 10 Oct 21:10

Re: 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)
(Continue reading)

Sam Ravnborg | 10 Oct 22:26
Gravatar

[PATCH 1/2] parisc: beautify vmlinux.lds

Introduce a consistent layout of vmlinux.
The same layout has been introduced for most
architectures.

And the same time move a few label definitions inside
the curly brackets so they are assigned the correct
starting address. Before a ld inserted alignment
would have casued the label to pint before the actual
start of the section.

Signed-off-by: Sam Ravnborg <sam <at> ravnborg.org>
---
As I was anyway looking at parisc I made a few janitorial updates.
Due to lack of toolchain I have not even build tested this patch!

	Sam

diff --git a/arch/parisc/kernel/vmlinux.lds.S b/arch/parisc/kernel/vmlinux.lds.S
index ee7a16e..d6951bb 100644
--- a/arch/parisc/kernel/vmlinux.lds.S
+++ b/arch/parisc/kernel/vmlinux.lds.S
@@ -46,168 +46,219 @@ jiffies = jiffies_64;
 #endif
 SECTIONS
 {
+	. = KERNEL_BINARY_TEXT_START;

-  . = KERNEL_BINARY_TEXT_START;
-
-  _text = .;			/* Text and read-only data */
(Continue reading)

Kyle McMartin | 10 Oct 22:27
Picon

Re: [PATCH 1/2] parisc: beautify vmlinux.lds

On Wed, Oct 10, 2007 at 10:26:02PM +0200, Sam Ravnborg wrote:
> As I was anyway looking at parisc I made a few janitorial updates.
> Due to lack of toolchain I have not even build tested this patch!
> 

kyle.mcmartin.ca/hppa64-hp-linux-gcc-3.4.tar

I have a 32-bit toolchain somewhere too, but I can't recall where. If
you want it I'll find it. (Cross-built for i386).

Regards,
	Kyle
Sam Ravnborg | 10 Oct 22:29
Gravatar

[PATCH 2/2] parisc: replace ASM_PAGE_SIZE with PAGE_SIZE

We have the macro _AC() generally available now
so the calculation of PAGE_SIZE can be made
assembler compatible.
Introduce use of _AC() and kill all users of
ASM_PAGE_SIZE.

Signed-off-by: Sam Ravnborg <sam <at> ravnborg.org>
---
As with the previous patch this has not even been built.
There are two ASM_PAGE_SIZE_DIV64 / DIV128 left.
I did not touch them.

diff --git a/arch/parisc/kernel/asm-offsets.c b/arch/parisc/kernel/asm-offsets.c
index d3b7917..8c2bcdb 100644
--- a/arch/parisc/kernel/asm-offsets.c
+++ b/arch/parisc/kernel/asm-offsets.c
@@ -290,7 +290,6 @@ int main(void)
 	DEFINE(ASM_PTE_ENTRY_SIZE, PTE_ENTRY_SIZE);
 	DEFINE(ASM_PFN_PTE_SHIFT, PFN_PTE_SHIFT);
 	DEFINE(ASM_PT_INITIAL, PT_INITIAL);
-	DEFINE(ASM_PAGE_SIZE, PAGE_SIZE);
 	DEFINE(ASM_PAGE_SIZE_DIV64, PAGE_SIZE/64);
 	DEFINE(ASM_PAGE_SIZE_DIV128, PAGE_SIZE/128);
 	BLANK();
diff --git a/arch/parisc/kernel/syscall.S b/arch/parisc/kernel/syscall.S
index 56f6231..06cde9e 100644
--- a/arch/parisc/kernel/syscall.S
+++ b/arch/parisc/kernel/syscall.S
@@ -10,6 +10,7 @@
 #include <asm/asm-offsets.h>
(Continue reading)

Sam Ravnborg | 10 Oct 22:34
Gravatar

Re: [PATCH 1/2] parisc: beautify vmlinux.lds

On Wed, Oct 10, 2007 at 04:27:05PM -0400, Kyle McMartin wrote:
> On Wed, Oct 10, 2007 at 10:26:02PM +0200, Sam Ravnborg wrote:
> > As I was anyway looking at parisc I made a few janitorial updates.
> > Due to lack of toolchain I have not even build tested this patch!
> > 
> 
> kyle.mcmartin.ca/hppa64-hp-linux-gcc-3.4.tar
> 
> I have a 32-bit toolchain somewhere too, but I can't recall where. If
> you want it I'll find it. (Cross-built for i386).

I mostly do defconfig builds and as defconfig is 32bit that is preferred.
Or you can cheat and update defconfig :-)

i386 is fine.

Downloading the 64 bit version now.

	Sam
Kyle McMartin | 10 Oct 23:04
Picon

Re: [PATCH 1/2] parisc: beautify vmlinux.lds

On Wed, Oct 10, 2007 at 10:26:02PM +0200, Sam Ravnborg wrote:
> Introduce a consistent layout of vmlinux.
> The same layout has been introduced for most
> architectures.
> 
> And the same time move a few label definitions inside
> the curly brackets so they are assigned the correct
> starting address. Before a ld inserted alignment
> would have casued the label to pint before the actual
> start of the section.
> 
> Signed-off-by: Sam Ravnborg <sam <at> ravnborg.org>

applied. thanks!
Kyle McMartin | 10 Oct 23:04
Picon

Re: [PATCH 2/2] parisc: replace ASM_PAGE_SIZE with PAGE_SIZE

On Wed, Oct 10, 2007 at 10:29:58PM +0200, Sam Ravnborg wrote:
> We have the macro _AC() generally available now
> so the calculation of PAGE_SIZE can be made
> assembler compatible.
> Introduce use of _AC() and kill all users of
> ASM_PAGE_SIZE.
> 
> Signed-off-by: Sam Ravnborg <sam <at> ravnborg.org>

applied, but you missed a usage in head.S that i've fixed up. thanks!
Kyle McMartin | 10 Oct 23:21
Picon

Re: [PATCH 1/2] parisc: beautify vmlinux.lds

On Wed, Oct 10, 2007 at 10:34:08PM +0200, Sam Ravnborg wrote:
> On Wed, Oct 10, 2007 at 04:27:05PM -0400, Kyle McMartin wrote:
> > On Wed, Oct 10, 2007 at 10:26:02PM +0200, Sam Ravnborg wrote:
> > > As I was anyway looking at parisc I made a few janitorial updates.
> > > Due to lack of toolchain I have not even build tested this patch!
> > > 
> > 
> > kyle.mcmartin.ca/hppa64-hp-linux-gcc-3.4.tar
> > 
> > I have a 32-bit toolchain somewhere too, but I can't recall where. If
> > you want it I'll find it. (Cross-built for i386).
> 
> I mostly do defconfig builds and as defconfig is 32bit that is preferred.
> Or you can cheat and update defconfig :-)
> 
> i386 is fine.
> 

hppa-hp-linux-gcc-3.4.tar is the 32-bit toolchain.

Cheers,
	Kyle
Mike Frysinger | 11 Oct 00:34
Picon
Favicon
Gravatar

Re: parisc arch makefile clean-up needed [Was: cleaning up "make headers_install" for various architectures]

On Wednesday 10 October 2007, Sam Ravnborg wrote:
> 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.

not even really an export issue ... $PALO will be interpreted by make as 
$(P)ALO and the script will do [ -x ALO ] which is obviously no good :)
-mike
_______________________________________________
parisc-linux mailing list
parisc-linux <at> lists.parisc-linux.org
http://lists.parisc-linux.org/mailman/listinfo/parisc-linux

Gmane