linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* PATCH: allow 2.6 to build on old old setups
@ 2003-07-27 20:26 Alan Cox
  2003-07-28  1:52 ` David S. Miller
  0 siblings, 1 reply; 5+ messages in thread
From: Alan Cox @ 2003-07-27 20:26 UTC (permalink / raw)
  To: linux-kernel, torvalds

(Mikael Pettersson)
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux-2.6.0-test2/scripts/modpost.c linux-2.6.0-test2-ac1/scripts/modpost.c
--- linux-2.6.0-test2/scripts/modpost.c	2003-07-10 21:05:39.000000000 +0100
+++ linux-2.6.0-test2-ac1/scripts/modpost.c	2003-07-23 15:37:13.000000000 +0100
@@ -296,12 +296,14 @@
 		/* ignore global offset table */
 		if (strcmp(symname, "_GLOBAL_OFFSET_TABLE_") == 0)
 			break;
+#ifdef STT_REGISTER
 		if (info->hdr->e_machine == EM_SPARC ||
 		    info->hdr->e_machine == EM_SPARCV9) {
 			/* Ignore register directives. */
 			if (ELF_ST_TYPE(sym->st_info) == STT_REGISTER)
 				break;
 		}
+#endif
 		
 		if (memcmp(symname, MODULE_SYMBOL_PREFIX,
 			   strlen(MODULE_SYMBOL_PREFIX)) == 0) {
\x05

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

* Re: PATCH: allow 2.6 to build on old old setups
  2003-07-27 20:26 PATCH: allow 2.6 to build on old old setups Alan Cox
@ 2003-07-28  1:52 ` David S. Miller
  2003-07-28 11:30   ` Alan Cox
  0 siblings, 1 reply; 5+ messages in thread
From: David S. Miller @ 2003-07-28  1:52 UTC (permalink / raw)
  To: Alan Cox; +Cc: linux-kernel, torvalds

On Sun, 27 Jul 2003 21:26:36 +0100
Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:

> +#ifdef STT_REGISTER
>  		if (info->hdr->e_machine == EM_SPARC ||
>  		    info->hdr->e_machine == EM_SPARCV9) {
>  			/* Ignore register directives. */
>  			if (ELF_ST_TYPE(sym->st_info) == STT_REGISTER)
>  				break;
>  		}
> +#endif

This change is wrong.

If you're going to do this, it's much better to define it to the
correct value in this case (which is decimal '13').

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

* Re: PATCH: allow 2.6 to build on old old setups
  2003-07-28  1:52 ` David S. Miller
@ 2003-07-28 11:30   ` Alan Cox
  2003-07-28 13:28     ` Mikael Pettersson
  2003-07-28 14:17     ` David S. Miller
  0 siblings, 2 replies; 5+ messages in thread
From: Alan Cox @ 2003-07-28 11:30 UTC (permalink / raw)
  To: David S. Miller; +Cc: Linux Kernel Mailing List, torvalds

On Llu, 2003-07-28 at 02:52, David S. Miller wrote:
> >  		    info->hdr->e_machine == EM_SPARCV9) {
> >  			/* Ignore register directives. */
> >  			if (ELF_ST_TYPE(sym->st_info) == STT_REGISTER)
> >  				break;
> >  		}
> > +#endif
> 
> This change is wrong.
> 
> If you're going to do this, it's much better to define it to the
> correct value in this case (which is decimal '13').

Its sparc specific stuff so presumably all sparc stuff had the register
?. I can change and resubmit though - no problem


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

* Re: PATCH: allow 2.6 to build on old old setups
  2003-07-28 11:30   ` Alan Cox
@ 2003-07-28 13:28     ` Mikael Pettersson
  2003-07-28 14:17     ` David S. Miller
  1 sibling, 0 replies; 5+ messages in thread
From: Mikael Pettersson @ 2003-07-28 13:28 UTC (permalink / raw)
  To: Alan Cox; +Cc: David S. Miller, Linux Kernel Mailing List, torvalds

Alan Cox writes:
 > On Llu, 2003-07-28 at 02:52, David S. Miller wrote:
 > > >  		    info->hdr->e_machine == EM_SPARCV9) {
 > > >  			/* Ignore register directives. */
 > > >  			if (ELF_ST_TYPE(sym->st_info) == STT_REGISTER)
 > > >  				break;
 > > >  		}
 > > > +#endif
 > > 
 > > This change is wrong.
 > > 
 > > If you're going to do this, it's much better to define it to the
 > > correct value in this case (which is decimal '13').
 > 
 > Its sparc specific stuff so presumably all sparc stuff had the register
 > ?. I can change and resubmit though - no problem

The error is that modpost.c is compiled against the C library elf headers
instead of the kernel's own elf headers. My #ifndef patch is just a workaround
for a missing -Iinclude and possibly -nostdinc when modpost.c is compiled.

David's response to that was that I should update my C library headers
instead. This is doable, but kind of defeats the purpose of having test
machines with old user-spaces around in the first place.

Linus once said that Linux did its own offsetof() just to avoid relying
on a fully working user-space...

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

* Re: PATCH: allow 2.6 to build on old old setups
  2003-07-28 11:30   ` Alan Cox
  2003-07-28 13:28     ` Mikael Pettersson
@ 2003-07-28 14:17     ` David S. Miller
  1 sibling, 0 replies; 5+ messages in thread
From: David S. Miller @ 2003-07-28 14:17 UTC (permalink / raw)
  To: Alan Cox; +Cc: linux-kernel, torvalds

On 28 Jul 2003 12:30:59 +0100
Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:

> On Llu, 2003-07-28 at 02:52, David S. Miller wrote:
> > >  		    info->hdr->e_machine == EM_SPARCV9) {
> > >  			/* Ignore register directives. */
> > >  			if (ELF_ST_TYPE(sym->st_info) == STT_REGISTER)
> > >  				break;
> > >  		}
> > > +#endif
> > 
> > This change is wrong.
> > 
> > If you're going to do this, it's much better to define it to the
> > correct value in this case (which is decimal '13').
> 
> Its sparc specific stuff so presumably all sparc stuff had the register?
> I can change and resubmit though - no problem

The situation is that, on every platform, one gets the define in
/usr/include/elf.h, it's just that older glibc's lack the define.

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

end of thread, other threads:[~2003-07-28 14:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-27 20:26 PATCH: allow 2.6 to build on old old setups Alan Cox
2003-07-28  1:52 ` David S. Miller
2003-07-28 11:30   ` Alan Cox
2003-07-28 13:28     ` Mikael Pettersson
2003-07-28 14:17     ` David S. Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).