All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Use $(LD) -V for NEW_GAS check [4/4]
@ 2004-05-06 22:40 Joshua Kwan
  2004-05-07 22:17 ` David S. Miller
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: Joshua Kwan @ 2004-05-06 22:40 UTC (permalink / raw)
  To: sparclinux


[-- Attachment #1.1: Type: text/plain, Size: 184 bytes --]

patch 4: use $(LD) -V for NEW_GAS check.

This bug crept up because I have a bi-architecture (32/64) binutils, and
unreasonable defaults sent my build to hell.

-- 
Joshua Kwan

[-- Attachment #1.2: 04_sparc32_use_ld_-V.diff --]
[-- Type: text/plain, Size: 637 bytes --]

--- kernel-source-2.4.26/arch/sparc/Makefile~	2004-04-26 09:33:48.000000000 -0700
+++ kernel-source-2.4.26/arch/sparc/Makefile	2004-04-26 09:34:23.000000000 -0700
@@ -16,7 +16,7 @@
 # debugging of the kernel to get the proper debugging information.
 
 IS_EGCS := $(shell if $(CC) -m32 -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo y; else echo n; fi; )
-NEW_GAS := $(shell if $(LD) --version 2>&1 | grep 'elf64_sparc' > /dev/null; then echo y; else echo n; fi)
+NEW_GAS := $(shell if $(LD) -V 2>&1 | grep 'elf64_sparc' > /dev/null; then echo y; else echo n; fi)
 
 ifeq ($(NEW_GAS),y)
 AS              := $(AS) -32

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 881 bytes --]

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

* Re: [PATCH] Use $(LD) -V for NEW_GAS check [4/4]
  2004-05-06 22:40 [PATCH] Use $(LD) -V for NEW_GAS check [4/4] Joshua Kwan
@ 2004-05-07 22:17 ` David S. Miller
  2004-05-07 23:33 ` Joshua Kwan
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: David S. Miller @ 2004-05-07 22:17 UTC (permalink / raw)
  To: sparclinux

On Thu, 6 May 2004 15:40:26 -0700
joshk@triplehelix.org (Joshua Kwan) wrote:

> patch 4: use $(LD) -V for NEW_GAS check.
> 
> This bug crept up because I have a bi-architecture (32/64) binutils, and
> unreasonable defaults sent my build to hell.

Applied, how did this ever work?  '-V' is what you need to use regardless
of how binutils was configured.

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

* Re: [PATCH] Use $(LD) -V for NEW_GAS check [4/4]
  2004-05-06 22:40 [PATCH] Use $(LD) -V for NEW_GAS check [4/4] Joshua Kwan
  2004-05-07 22:17 ` David S. Miller
@ 2004-05-07 23:33 ` Joshua Kwan
  2004-05-08  0:22 ` David S. Miller
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Joshua Kwan @ 2004-05-07 23:33 UTC (permalink / raw)
  To: sparclinux

[-- Attachment #1: Type: text/plain, Size: 696 bytes --]

On Fri, May 07, 2004 at 03:17:32PM -0700, David S. Miller wrote:
> > This bug crept up because I have a bi-architecture (32/64) binutils, and
> > unreasonable defaults sent my build to hell.
> 
> Applied, how did this ever work?  '-V' is what you need to use regardless
> of how binutils was configured.

I have no idea. Isn't the bug in 2.6 as well?

FYI, on my i386 box, without this fix, it would link sparc32 kernels
correctly, but die when linking together 64-bit .o files. So I guess
'sparc-linux-ld' was really 'sparc-linux-ld -m elf32_sparc'. Perhaps the
binutils on a real sparc machine make the right decision based on the current
system architecture?

-- 
Joshua Kwan

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 881 bytes --]

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

* Re: [PATCH] Use $(LD) -V for NEW_GAS check [4/4]
  2004-05-06 22:40 [PATCH] Use $(LD) -V for NEW_GAS check [4/4] Joshua Kwan
  2004-05-07 22:17 ` David S. Miller
  2004-05-07 23:33 ` Joshua Kwan
@ 2004-05-08  0:22 ` David S. Miller
  2004-05-08  1:18 ` Joshua Kwan
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: David S. Miller @ 2004-05-08  0:22 UTC (permalink / raw)
  To: sparclinux

On Fri, 7 May 2004 16:33:54 -0700
joshk@triplehelix.org (Joshua Kwan) wrote:

> On Fri, May 07, 2004 at 03:17:32PM -0700, David S. Miller wrote:
> > > This bug crept up because I have a bi-architecture (32/64) binutils, and
> > > unreasonable defaults sent my build to hell.
> > 
> > Applied, how did this ever work?  '-V' is what you need to use regardless
> > of how binutils was configured.
> 
> I have no idea. Isn't the bug in 2.6 as well?

I was about to ask you to make and test 2.6.x versions of
your fixed.

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

* Re: [PATCH] Use $(LD) -V for NEW_GAS check [4/4]
  2004-05-06 22:40 [PATCH] Use $(LD) -V for NEW_GAS check [4/4] Joshua Kwan
                   ` (2 preceding siblings ...)
  2004-05-08  0:22 ` David S. Miller
@ 2004-05-08  1:18 ` Joshua Kwan
  2004-05-08 20:03 ` David S. Miller
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Joshua Kwan @ 2004-05-08  1:18 UTC (permalink / raw)
  To: sparclinux


[-- Attachment #1.1: Type: text/plain, Size: 1461 bytes --]

On Fri, May 07, 2004 at 05:22:45PM -0700, David S. Miller wrote:
> I was about to ask you to make and test 2.6.x versions of
> your fixed.

These fixes already made it into 2.6, it seems:
- source "drivers/i2c/Kconfig" for arch/sparc64
- use $(LD) -V
- pgalloc.h (which you made, heh)

so the only other fix is for the arch/sparc64/Makefile CC definition;
diff attached. However, it does not seem to build, for unrelated
reasons:

  sparc-linux-gcc -Wp,-MD,init/.main.o.d -nostdinc -iwithprefix include -D__KERNEL__ -Iinclude  -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -m64 -pipe -mno-fpu -mcpu=ultrasparc -mcmodel=medlow -ffixed-g4 -fcall-used-g5 -fcall-used-g7 -Wno-sign-compare -Wa,--undeclared-regs -finline-limit=100000 -O2 -fomit-frame-pointer     -DKBUILD_BASENAME=main -DKBUILD_MODNAME=main -c -o init/.tmp_main.o init/main.c
In file included from include/linux/unistd.h:7,
                 from init/main.c:44:
include/asm/unistd.h: In function `setsid':
include/asm/unistd.h:433: error: parse error before '}' token
include/asm/unistd.h:434: error: redeclaration of `__g1'
include/asm/unistd.h:433: error: `__g1' previously declared here
include/asm/unistd.h:434: error: `fd' undeclared (first use in this function)
include/asm/unistd.h:434: error: (Each undeclared identifier is reported only once
(and so on)

include/asm is indeed symlinked to include/asm-sparc64, FWIW.

-- 
Joshua Kwan

[-- Attachment #1.2: NEW_GCC-use-CC.diff --]
[-- Type: text/plain, Size: 678 bytes --]

--- a/arch/sparc64/Makefile	2004-05-07 18:11:16.000000000 -0700
+++ b/arch/sparc64/Makefile	2004-05-07 18:11:45.000000000 -0700
@@ -10,7 +10,7 @@
 
 AFLAGS_vmlinux.lds.o += -Usparc
 
-CC		:= $(shell if gcc -m64 -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo gcc; else echo sparc64-linux-gcc; fi )
+CC		:= $(shell if $(CC) -m64 -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo $(CC); else echo sparc64-linux-gcc; fi )
 
 NEW_GCC := $(shell if $(CC) -m64 -mcmodel=medlow -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo y; else echo n; fi; )
 NEW_GAS := $(shell if $(LD) -V 2>&1 | grep 'elf64_sparc' > /dev/null; then echo y; else echo n; fi)

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 881 bytes --]

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

* Re: [PATCH] Use $(LD) -V for NEW_GAS check [4/4]
  2004-05-06 22:40 [PATCH] Use $(LD) -V for NEW_GAS check [4/4] Joshua Kwan
                   ` (3 preceding siblings ...)
  2004-05-08  1:18 ` Joshua Kwan
@ 2004-05-08 20:03 ` David S. Miller
  2004-05-08 21:04 ` Joshua Kwan
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: David S. Miller @ 2004-05-08 20:03 UTC (permalink / raw)
  To: sparclinux

On Fri, 7 May 2004 18:18:16 -0700
joshk@triplehelix.org (Joshua Kwan) wrote:

> However, it does not seem to build, for unrelated
> reasons:

It is using "-m64" so a sparc64 build, but for some reason the
include/asm symlink is being set to the sparc32 header directory
include/asm-sparc instead of the correct include/asm-sparc64

> include/asm is indeed symlinked to include/asm-sparc64, FWIW.

I really don't think so, line 433 is only a place where a compile
error like that can occur in the sparc32 unistd.h not the sparc64
one.

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

* Re: [PATCH] Use $(LD) -V for NEW_GAS check [4/4]
  2004-05-06 22:40 [PATCH] Use $(LD) -V for NEW_GAS check [4/4] Joshua Kwan
                   ` (4 preceding siblings ...)
  2004-05-08 20:03 ` David S. Miller
@ 2004-05-08 21:04 ` Joshua Kwan
  2004-05-09  0:14 ` David S. Miller
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Joshua Kwan @ 2004-05-08 21:04 UTC (permalink / raw)
  To: sparclinux

[-- Attachment #1: Type: text/plain, Size: 905 bytes --]

On Sat, May 08, 2004 at 01:03:45PM -0700, David S. Miller wrote:
> It is using "-m64" so a sparc64 build, but for some reason the
> include/asm symlink is being set to the sparc32 header directory
> include/asm-sparc instead of the correct include/asm-sparc64

Line 433 in include/asm-sparc/unistd.h is a comment. Remember, I'm
talking 2.6 here.

> > include/asm is indeed symlinked to include/asm-sparc64, FWIW.
> 
> I really don't think so, line 433 is only a place where a compile
> error like that can occur in the sparc32 unistd.h not the sparc64
> one.

We-ell, ok. Let's see then:

$ make ARCH=sparc64 CROSS_COMPILE=sparc-linux- mrproper defconfig image
[...]
(Failure ensues)
$ ls -l include/asm
lrwxrwxrwx    1 joshk    joshk          11 2004-05-08 14:02 include/asm -> asm-sparc64

I'm absolutely positive it is using that directory and that unistd.h.

-- 
Joshua Kwan

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 881 bytes --]

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

* Re: [PATCH] Use $(LD) -V for NEW_GAS check [4/4]
  2004-05-06 22:40 [PATCH] Use $(LD) -V for NEW_GAS check [4/4] Joshua Kwan
                   ` (5 preceding siblings ...)
  2004-05-08 21:04 ` Joshua Kwan
@ 2004-05-09  0:14 ` David S. Miller
  2004-05-09  0:49 ` Joshua Kwan
  2004-05-09  2:25 ` David S. Miller
  8 siblings, 0 replies; 10+ messages in thread
From: David S. Miller @ 2004-05-09  0:14 UTC (permalink / raw)
  To: sparclinux

On Sat, 8 May 2004 14:04:43 -0700
joshk@triplehelix.org (Joshua Kwan) wrote:

> Line 433 in include/asm-sparc/unistd.h is a comment. Remember, I'm
> talking 2.6 here.

No, it's part of a macro definition in 2.6.x:

#define _syscall5(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4, \
	  type5,arg5) \
type name (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5) \
{ \
long __res; \
register long __g1 __asm__ ("g1") = __NR_##name; \
register long __o0 __asm__ ("o0") = (long)(arg1); \
register long __o1 __asm__ ("o1") = (long)(arg2); \
register long __o2 __asm__ ("o2") = (long)(arg3); \
register long __o3 __asm__ ("o3") = (long)(arg4); \
register long __o4 __asm__ ("o4") = (long)(arg5); \
__asm__ __volatile__ ("t 0x10\n\t" \
		      "bcc 1f\n\t" \
		      "mov %%o0, %0\n\t" \
		      "sub %%g0, %%o0, %0\n\t" \
		      "1:\n\t" \
		      : "=r" (__res), "=&r" (__o0) \
		      : "1" (__o0), "r" (__o1), "r" (__o2), "r" (__o3), "r" (__o4), "r" (__g1) \
		      : "cc"); \
if (__res < -255 || __res>=0) \
	return (type) __res; \
errno = -__res; \
return -1; \
}
^^^^^ this is line 433

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

* Re: [PATCH] Use $(LD) -V for NEW_GAS check [4/4]
  2004-05-06 22:40 [PATCH] Use $(LD) -V for NEW_GAS check [4/4] Joshua Kwan
                   ` (6 preceding siblings ...)
  2004-05-09  0:14 ` David S. Miller
@ 2004-05-09  0:49 ` Joshua Kwan
  2004-05-09  2:25 ` David S. Miller
  8 siblings, 0 replies; 10+ messages in thread
From: Joshua Kwan @ 2004-05-09  0:49 UTC (permalink / raw)
  To: sparclinux

[-- Attachment #1: Type: text/plain, Size: 483 bytes --]

On Sat, May 08, 2004 at 05:14:00PM -0700, David S. Miller wrote:
> errno = -__res; \
> return -1; \
> }
> ^^^^^ this is line 433

Er, well - I'm using 2.6.6-rc3-mm2, line 433 of asm-sparc64/unistd.h
contains:

static __inline__ _syscall0(pid_t,setsid)

Well, fancy that, 2.6.6-rc3 stock does build... good to hear, huh? :)

Either way it's your changes that messed it up, so now consider this a
report against the changes made in 2.6.6-rc3-mm2. :D

-- 
Joshua Kwan

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 881 bytes --]

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

* Re: [PATCH] Use $(LD) -V for NEW_GAS check [4/4]
  2004-05-06 22:40 [PATCH] Use $(LD) -V for NEW_GAS check [4/4] Joshua Kwan
                   ` (7 preceding siblings ...)
  2004-05-09  0:49 ` Joshua Kwan
@ 2004-05-09  2:25 ` David S. Miller
  8 siblings, 0 replies; 10+ messages in thread
From: David S. Miller @ 2004-05-09  2:25 UTC (permalink / raw)
  To: sparclinux

On Sat, 8 May 2004 17:49:15 -0700
joshk@triplehelix.org (Joshua Kwan) wrote:

> Either way it's your changes that messed it up, so now consider this a
> report against the changes made in 2.6.6-rc3-mm2. :D

I didn't make the changes you mention to the sparc port, someone
else added that sparc changes to the -mm patch series not me :-)

Since Andrew Morton (akpm@osdl.org) maintains that patch set,
probably you should send him a note about it.

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

end of thread, other threads:[~2004-05-09  2:25 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-05-06 22:40 [PATCH] Use $(LD) -V for NEW_GAS check [4/4] Joshua Kwan
2004-05-07 22:17 ` David S. Miller
2004-05-07 23:33 ` Joshua Kwan
2004-05-08  0:22 ` David S. Miller
2004-05-08  1:18 ` Joshua Kwan
2004-05-08 20:03 ` David S. Miller
2004-05-08 21:04 ` Joshua Kwan
2004-05-09  0:14 ` David S. Miller
2004-05-09  0:49 ` Joshua Kwan
2004-05-09  2:25 ` David S. Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.