[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Problems compiling libtclobjc.a
From: |
J.J. Merelo Guervos |
Subject: |
Re: Problems compiling libtclobjc.a |
Date: |
Fri, 5 Jan 96 13:32:32 +0100 |
>>>>> "Joannes" == Joannes Mongardini <address@hidden> writes:
Hi:
>> You must apply the patch ./gcc.patch to the gcc source dir then
>> recompile and install libobjc.a, then rerun this configure
>> script.
Joannes> It is not clear what the gcc.patch is. There is no patch
Joannes> for 2.7.2 as far as I know. Any help would be great.
It probably means this...
---------------------------------------------------------------------
To: jmerelo (J.J. Merelo Guervos)
Subject: Re: Weird bug IRIX 4.0.5/Objc/2.7.2
In-Reply-To: Your message of "15 Dec 1995 08:45:55 PST."
<address@hidden>
Date: Fri, 15 Dec 1995 16:59:39 -0800
From: Jim Wilson <address@hidden>
I believe this fixes the problem. I wrote it about 11 months ago, but
have not gotten it into the FSF source tree yet.
----
There was a bug report that Objective C got an assembler error on
a mips-dec-ultrix4.4 system. The error is that there is both a definition
and an extern for the same variable, which the MIPS assemblers do not allow.
This occurs because the Objective C front end cheats when outputting some
variables. It uses assemble_label instead of assemble_variable.
assemble_variable uses ASM_DECLARE_OBJECT_NAME, which the mips backend uses
to mark that a variable has been output, so that we won't also output an
extern. However, we can't put a use of ASM_DECLARE_OBJECT_NAME in
assemble_label, because there is no DECL. Also, it would cause other
problems because if we use ASM_DECLARE_OBJECT_NAME then we must also
use ASM_FINISH_DECLARE_NAME, but that comes from someplace else (in toplev.c),
and this just gets hopelessly confusing.
So, the simplest solution seems to be to create a new macro just for
the assemble_label function which is used only from the Objective C
front end. Here is a patch to do this:
Mon Dec 19 12:20:38 1994 Jim Wilson <address@hidden>
* mips.h (ASM_DECLARE_LABEL_NAME): Define.
* varasm.c (assemble_label): Use ASM_DECLARE_LABEL_NAME.
diff -pr clean-ss-941217/config/mips/mips.h ss-941217/config/mips/mips.h
*** clean-ss-941217/config/mips/mips.h Wed Nov 16 13:35:26 1994
--- ss-941217/config/mips/mips.h Mon Dec 19 12:09:34 1994
*************** do
\
*** 3285,3290 ****
--- 3285,3296 ----
} \
while (0)
+ /* A C statement (sans semicolon) to output to the stdio stream
+ STREAM any test necessary for declaring the name NAME of an
+ initialized variable for which we are outputting only a label. */
+
+ #define ASM_DECLARE_LABEL_NAME(STREAM, NAME) \
+ mips_declare_object (STREAM, NAME, "", ":\n", 0)
/* This is how to output a command to make the user-level label named NAME
defined for reference from other files. */
diff -pr clean-ss-941217/tm.texi ss-941217/tm.texi
*** clean-ss-941217/tm.texi Fri Nov 18 19:39:04 1994
--- ss-941217/tm.texi Mon Dec 19 12:08:04 1994
*************** something about the size of the object.
*** 4702,4707 ****
--- 4702,4720 ----
If you don't define this macro, that is equivalent to defining it to do
nothing.
+ @findex ASM_DECLARE_LABEL_NAME
+ @item ASM_DECLARE_LABEL_NAME (@var{stream}, @var{name})
+ A C statement (sans semicolon) to output to the stdio stream
+ @var{stream} any text necessary for declaring the name @var{name} of
+ an initialized variable which is being defined only as a label name.
+ This macro must output the label definition (perhaps using
+ @code{ASM_OUTPUT_LABEL}).
+
+ This macro is only needed in unusual circumstances when
+ @code{ASM_DECLARE_OBJECT_NAME} is used for bookkeeping purposes, and the
+ same bookkeeping needs to be done to some labels output by the Objective C
+ language front end. Normally, this macro should not be defined.
+
@findex ASM_GLOBALIZE_LABEL
@item ASM_GLOBALIZE_LABEL (@var{stream}, @var{name})
A C statement (sans semicolon) to output to the stdio stream
diff -pr clean-ss-941217/varasm.c ss-941217/varasm.c
*** clean-ss-941217/varasm.c Mon Nov 21 19:20:41 1994
--- ss-941217/varasm.c Mon Dec 19 12:02:11 1994
*************** assemble_label (name)
*** 1480,1486 ****
if (output_bytecode)
BC_OUTPUT_LABEL (asm_out_file, name);
else
! ASM_OUTPUT_LABEL (asm_out_file, name);
}
/* Output to FILE a reference to the assembler name of a C-level name NAME.
--- 1480,1492 ----
if (output_bytecode)
BC_OUTPUT_LABEL (asm_out_file, name);
else
! {
! #ifdef ASM_DECLARE_LABEL_NAME
! ASM_DECLARE_LABEL_NAME (asm_out_file, name);
! #else
! ASM_OUTPUT_LABEL (asm_out_file, name);
! #endif
! }
}
/* Output to FILE a reference to the assembler name of a C-level name NAME.
JJ
--
JJ Merelo | http://kal-el.ugr.es/jj.html
Grupo Geneura ---- Univ. Granada | http://kal-el.ugr.es/geneura.html