pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pkg/45814: lang/gcc45 doesn't build on 5.99.5x/i386



The following reply was made to PR pkg/45814; it has been noted by GNATS.

From: Noud de Brouwer <noud4%home.nl@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: pkg/45814: lang/gcc45 doesn't build on 5.99.5x/i386
Date: Sun, 10 Jun 2012 08:25:10 +0000

 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10153
 tells us this exists from 2003-03-19 17:36:00 UTC
 
 and there reading comment 4:
 "we cannot store a character to memory from those registers, but we can
 hold a character value in those registers"
 
 i guess, this will not be solved light or overnight or ever.
 
 
 the first patch attempt brought loss to x86_64, register-wise.
 will the below patch just affect non _64 with a __i386__ switch?:
 
 --- /usr/include/x86/lock.h.orig       2011-10-31 22:34:14.000000000 +0000
 +++ /usr/include/x86/lock.h    2012-04-19 15:42:20.000000000 +0000
 @@ -105,10 +105,17 @@
        uint8_t val;
  
        val = __SIMPLELOCK_LOCKED;
 +#ifdef __i386__
 +      __asm volatile ("xchgb %0,(%2)" : 
 +          "=q" (val)
 +          :"0" (val), "q" (lockp));
 +      __insn_barrier();
 +#else
        __asm volatile ("xchgb %0,(%2)" : 
            "=r" (val)
            :"0" (val), "r" (lockp));
        __insn_barrier();
 +#endif
        return val == __SIMPLELOCK_UNLOCKED;
  }
  
 
 Noud
 


Home | Main Index | Thread Index | Old Index