mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Matt <matt@lpbproductions.com>
To: linux-kernel@vger.kernel.org
Subject: Re: 2.6.0-test10 : compile error in /fs/proc/array.c
Date: Mon, 24 Nov 2003 12:56:20 -0700	[thread overview]
Message-ID: <200311241256.20554.matt@lpbproductions.com> (raw)
In-Reply-To: <Pine.LNX.4.44.0311242014030.8867-100000@sarijopen.student.utwente.nl>

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

appy this patch , it was posted here on the lkml before. Not quite sure who 
posted it first , but it works.

Matt H.


>On Monday 24 November 2003 12:29 pm, mp3project@sarijopen.student.utwente.nl 
wrote:
> Ave people
>
> My redhat 7.3 compiler (gcc 2.96--113) is still complaining about that
> file.
>
> make[1]: `arch/i386/kernel/asm-offsets.s' is up to date.
>   CHK     include/linux/compile.h
>   CC      fs/proc/array.o
> fs/proc/array.c: In function `proc_pid_stat':
> fs/proc/array.c:398: Unrecognizable insn:
> (insn/i 1332 1663 1657 (parallel[
>             (set (reg:SI 0 eax)
>                 (asm_operands ("") ("=a") 0[
>                         (reg:DI 1 edx)
>                     ]
>                     [
>                         (asm_input:DI ("A"))
>                     ]  ("include/linux/times.h") 38))
>             (set (reg:SI 1 edx)
>                 (asm_operands ("") ("=d") 1[
>                         (reg:DI 1 edx)
>                     ]
>                     [
>                         (asm_input:DI ("A"))
>                     ]  ("include/linux/times.h") 38))
>             (clobber (reg:QI 19 dirflag))
>             (clobber (reg:QI 18 fpsr))
>             (clobber (reg:QI 17 flags))
>         ] ) -1 (insn_list 1326 (nil))
>     (nil))
> fs/proc/array.c:398: confused by earlier errors, bailing out
> make[2]: *** [fs/proc/array.o] Error 1
> make[1]: *** [fs/proc] Error 2
> make: *** [fs] Error 2
>
>
> It's a known error and various patches are floating around on lkml.
>
> Is this
> a)a post 2.6.0 item
> b)a case of fix the compiler,we ain't gonna work around.
>
> Patching the source is not difficult to do,but it would be nice if
> vanilla 2.6.0 is gonna compile cleanly without patching on redhat 7.3
>
> Greetz Mu
>
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

[-- Attachment #2: 501-gcc-2.96-array-fix.patch --]
[-- Type: text/x-diff, Size: 1826 bytes --]

On Tuesday October 21st 2003 at 15:52 uur Marco Roeland wrote:

> > http://marc.theaimsgroup.com/?l=linux-kernel&m=106651554401143&w=2
> > 
> > It's supposed to fix test8 compile with gcc-2.96 for RedHat 7.x.
> 
> Perhaps if the huge sprintf with 40+ arguments (fs/proc/array.c, line 346)
> amongst which several trinary operators, were to be split up into several
> parts, might that not solve the problem more elegantly?

Does this compile (and work) for any of you friendly RedHat 7.[23] users? 
In 2.6.0-test8 yet another argument was added to the monstrous sprintf.
Perhaps this was just the droplet to overflow gcc-2.96's buckets? Here we
split it into 3 distinct parts.

--- linux-2.6.0-test8/fs/proc/array.c.orig	2003-10-21 16:18:40.000000000 +0200
+++ linux-2.6.0-test8/fs/proc/array.c	2003-10-21 16:24:42.000000000 +0200
@@ -343,9 +343,7 @@
 	read_lock(&tasklist_lock);
 	ppid = task->pid ? task->real_parent->pid : 0;
 	read_unlock(&tasklist_lock);
-	res = sprintf(buffer,"%d (%s) %c %d %d %d %d %d %lu %lu \
-%lu %lu %lu %lu %lu %ld %ld %ld %ld %d %ld %llu %lu %ld %lu %lu %lu %lu %lu \
-%lu %lu %lu %lu %lu %lu %lu %lu %d %d %lu %lu\n",
+	res = sprintf(buffer,"%d (%s) %c %d %d %d %d %d %lu %lu ",
 		task->pid,
 		task->comm,
 		state,
@@ -355,7 +353,8 @@
 		tty_nr,
 		tty_pgrp,
 		task->flags,
-		task->min_flt,
+		task->min_flt);
+	res += sprintf(buffer + res,"%lu %lu %lu %lu %lu %ld %ld %ld %ld %d %ld %llu %lu %ld %lu %lu %lu %lu %lu ",
 		task->cmin_flt,
 		task->maj_flt,
 		task->cmaj_flt,
@@ -375,7 +374,8 @@
 		mm ? mm->start_code : 0,
 		mm ? mm->end_code : 0,
 		mm ? mm->start_stack : 0,
-		esp,
+		esp);
+	res += sprintf(buffer + res,"%lu %lu %lu %lu %lu %lu %lu %lu %d %d %lu %lu\n",
 		eip,
 		/* The signal information here is obsolete.
 		 * It must be decimal for Linux 2.0 compatibility.

-

      reply	other threads:[~2003-11-24 19:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-24 19:29 mp3project
2003-11-24 19:56 ` Matt [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200311241256.20554.matt@lpbproductions.com \
    --to=matt@lpbproductions.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®