Re: [PATCH] GCC 3.4.3: libobjc build failure

Andrew Pinski <[email protected]>
Newsgroups gmane.comp.gcc.patches,gmane.comp.gcc.devel,gmane.linux.gcc
Message-ID <[email protected]>
On Dec 20, 2004, at 4:48 PM, Denis Zaitsev wrote:

> On Mon, Dec 20, 2004 at 04:38:36PM -0500, Andrew Pinski wrote:
>>
>> On Dec 20, 2004, at 4:35 PM, Denis Zaitsev wrote:
>>
>>> This patch is for exactly the same issue as described in
>>>
>>> http://gcc.gnu.org/ml/gcc/2002-12/msg00033.html
>>>
>>> The fix is exactly the same, just another file is the target.  
>>> Without
>>> it libobjc fails to build when --with-objc-gc is given to configure.
>>
>> This patch is incorrect as noted before.  I am going to reject it
>> as it was rejected before.  Again libobjc has no reason to include
>> these headers.
>
> a) The patches from the reference I've noted are already applied.
Yes and the patch was submitted before, see
<http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12035>.


> b) libobjc is not compiled without the new patch.  How should it be
>    fixed then?

The uses of the macros are not needed as shown by a "grep -r ."

Does this patch fix the problem for you?

Thanks,
Andrew Pinski
temp1.diff.txt (text/plain, 779 B)
Index: gc.c
===================================================================
RCS file: /cvs/gcc/gcc/libobjc/gc.c,v
retrieving revision 1.6
diff -u -p -r1.6 gc.c
--- gc.c	23 May 2003 20:04:58 -0000	1.6
+++ gc.c	20 Dec 2004 21:51:20 -0000
@@ -40,18 +40,6 @@ Boston, MA 02111-1307, USA.  */
 typedef GC_word word;
 typedef GC_signed_word signed_word;
 
-#if BITS_PER_WORD == 32
-# define LOGWL	5
-# define modWORDSZ(n) ((n) & 0x1f)        /* n mod size of word	    */
-#endif
-
-#if BITS_PER_WORD == 64
-# define LOGWL 6
-# define modWORDSZ(n) ((n) & 0x3f)        /* n mod size of word	    */
-#endif
-
-#define divWORDSZ(n) ((n) >> LOGWL)	   /* divide n by size of word      */
-
 #include <gc_typed.h>
 
 /* The following functions set up in `mask` the corresponding pointers.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.