public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* PATCH: gcc3.0.2 workaround for 8139too
@ 2001-11-22  2:01 Ali Akcaagac
  2001-11-25 12:25 ` Ali Akcaagac
  0 siblings, 1 reply; 8+ messages in thread
From: Ali Akcaagac @ 2001-11-22  2:01 UTC (permalink / raw)
  To: linux-kernel

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

hello,

after 2.4.10 i've detected that using gcc 3.0.2 to compile the kernel
always fails with the 8139too realtek networkcard driver. errormessage
reports a bug in the compiler itself. 2.4.11-2.4.14 are affected by it
too. that's also the only file affected by this. i have investigated
into stuff and realized that there seems to be a little borkage with
understanding of strcpy. i can't tell how, why and what. i went to
irc.opensource.org and talked there with some people a while back, also
offered a 'temporarely solution' to get things compiled and operate
again (worksforme TM) and saw that a bunch of other people wanted to get
it working again in any circumstances.

so please allow me to post this 'temporarely workaround' here so other
people can profit of it until things with the gcc3.0.2 compiler are
solved.

thank you.

-- 
Name....: Ali Akcaagac
Status..: Student Of Computer & Economic Science
E-Mail..: mailto:ali.akcaagac@stud.fh-wilhelmshaven.de
WWW.....: http://www.fh-wilhelmshaven.de/~akcaagaa

[-- Attachment #2: 8139too.patch --]
[-- Type: text/x-patch, Size: 590 bytes --]

--- linux/drivers/net/8139too.c.bak	Tue Nov 20 22:39:30 2001
+++ linux/drivers/net/8139too.c	Tue Nov 20 22:39:29 2001
@@ -2393,9 +2393,9 @@
 	case ETHTOOL_GDRVINFO:
 		{
 			struct ethtool_drvinfo info = { ETHTOOL_GDRVINFO };
-			strcpy (info.driver, DRV_NAME);
-			strcpy (info.version, DRV_VERSION);
-			strcpy (info.bus_info, np->pci_dev->slot_name);
+			sprintf (info.driver, DRV_NAME);
+			sprintf (info.version, DRV_VERSION);
+			sprintf (info.bus_info, np->pci_dev->slot_name);
 			if (copy_to_user (useraddr, &info, sizeof (info)))
 				return -EFAULT;
 			return 0;

^ permalink raw reply	[flat|nested] 8+ messages in thread
* Re: PATCH: gcc3.0.2 workaround for 8139too
@ 2001-11-26  8:11 Andris Pavenis
  0 siblings, 0 replies; 8+ messages in thread
From: Andris Pavenis @ 2001-11-26  8:11 UTC (permalink / raw)
  To: ali.akcaagac; +Cc: linux-kernel

Problem with -fomit-frame-pointer which caused gcc-3.0.X generate ICE on 
8139too.c is now fixed in gcc-3_0-branch. For example kernel 2.4.16-pre1 
builds Ok with gcc-3.0.3 20011123 (prerelease). Also 8139too.c compiles Ok 
and kernel seems to work Ok.

I have also earlier met cases when gcc-3.0.X miscompiles source (with option 
-fomit-frame-pointer only) due to same bug however it always caused crashes
of compiled source for me, not a silent data corruption.

Andris

^ permalink raw reply	[flat|nested] 8+ messages in thread
* Re: PATCH: gcc3.0.2 workaround for 8139too
@ 2001-11-26 14:45 Luben Tuikov
  2001-11-26 14:56 ` Ali Akcaagac
  0 siblings, 1 reply; 8+ messages in thread
From: Luben Tuikov @ 2001-11-26 14:45 UTC (permalink / raw)
  To: linux-kernel

Sorry, the patch is here...

 http://gcc.gnu.org/ml/gcc-patches/2001-11/msg00698.html

or as someone pointed out get the latest CVS tree.

-lt

--- Luben Tuikov <ltuikov@yahoo.com> wrote:
> gcc 3.0.0, 3.0.1, 3.0.2 needs this patch:
> 
>
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&pr=4529&database=gcc
> 
> to compile the kernel and the 8139too.c nic driver.
> 
> -lt


=====
--

__________________________________________________
Do You Yahoo!?
Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
http://geocities.yahoo.com/ps/info1

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

end of thread, other threads:[~2001-11-26 14:57 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-11-22  2:01 PATCH: gcc3.0.2 workaround for 8139too Ali Akcaagac
2001-11-25 12:25 ` Ali Akcaagac
2001-11-25 15:37   ` Rene Blokland
2001-11-25 15:57     ` Ali Akcaagac
2001-11-26  8:58     ` Luben Tuikov
  -- strict thread matches above, loose matches on Subject: below --
2001-11-26  8:11 Andris Pavenis
2001-11-26 14:45 Luben Tuikov
2001-11-26 14:56 ` Ali Akcaagac

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