This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Problems using gcc-2.95 on Linux


Hi!  I've successfully built gcc-2.95 using gcc 2.7.2.3 on RedHat 5.1 w/ a
custom 2.0.38 kernel.  I've found that a lot of things don't compile with
gcc-2.95 because of messages like this:

kerneld.c: In function `finish_jobs':
kerneld.c:722: Invalid `asm' statement:
kerneld.c:722: fixed or forbidden register 2 (cx) was spilled for class
CREG.
make[1]: *** [kerneld.o] Error 1
make[1]: Leaving directory `/home/tomw/modutils-2.1.121/kerneld'
make: *** [all] Error 2
[tomw@unixgw modutils-2.1.121]$

or this:

gerror.c: In function `stack_trace':
gerror.c:232: Invalid `asm' statement:
gerror.c:232: fixed or forbidden register 2 (cx) was spilled for class
CREG.
make[2]: *** [gerror.lo] Error 1
make[2]: Leaving directory `/home/tomw/glib-1.2.4'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/tomw/glib-1.2.4'
make: *** [all-recursive-am] Error 2
[tomw@unixgw glib-1.2.4]$ jed gerror.c
[tomw@unixgw glib-1.2.4]$

I can still use gcc-2.7.2.3 to build both modutils-2.1.121 and glib-1.2.4
(in this case), but I'm wondering how many other applications/libraries
exist that gcc-2.95 will have problems with.

In both cases above, the offending line of code looked exactly like this:

  FD_ZERO (&fdset);

Here is the code snipet from kerneld.c:

/*
 * Look for finished jobs and take care of them.
 * Return < 0 if fatal error
 */
int
finish_jobs()
{
        struct job *job;
        struct job **pjob;
        int status = 0;

        DPRINT(("finish_jobs\n"));
        for (pjob = &job_head, job = job_head; job && (status >= 0); job =
*pjob)$
                if (job->pid == JOB_DONE) {
                        /*
                         * Does the kernel expect an answer?
                         */
                        if (job->msg.id) {
                                if (job->reply_fd) {
                                        struct timeval timeout = { 0, 0 };
                                        fd_set  readfds;

offending line  ------>  FD_ZERO(&readfds);
<------------------------- offending line
                                        FD_SET(job->reply_fd, &readfds);
                                        if ((select(job->reply_fd + 1,
&readfds,
                                                (fd_set *)NULL,
                                                (fd_set *)NULL, &timeout) >
 0) &&
                                        FD_ISSET(job->reply_fd, &readfds))
{
                                                job->reply_size =
read(job->reply$
                                                        job->msg.text,
MSIZE);
                                        }
                                        close(job->reply_fd);
                                }

Are others having these kinds of problems using gcc-2.95 also?

Thanks in advance for your time.

Peace....

Tom Williams
tom.williams@diversifiedsoftware.com



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]