pkgsrc-Bugs archive

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

Re: pkg/48252: x11/rxvt-unicode invalid assembly macro for sparc



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

From: "John D. Baker" <jdbaker%mylinuxisp.com@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: pkg/48252: x11/rxvt-unicode invalid assembly macro for sparc
Date: Mon, 7 Jul 2014 10:29:47 -0500 (CDT)

 On Wed, 12 Feb 2014, John D. Baker wrote:
 
 > On Fri, 7 Feb 2014, OBATA Akio wrote:
 > 
 > > Here are libev upstream changes, probably related this issue:
 > > http://cvs.schmorp.de/libev/ev.c?r1=1.461&r2=1.462
 > > 
 > > -    #elif __sparc || __sparc__
 > > +    #elif (__sparc || __sparc__) && !__sparcv8
 
 As of pkgsrc-2014Q2 I see the above is now in the local libev/ev.c
 included with rxvt-unicode v9.20.  As I wrote then:
 
 > The above is not sufficient.  The NetBSD/sparc C compiler predefines only
 > "__sparc" and "__sparc__" when no "-mcpu=xxxx" directive is present.  If,
 > for example, "-mcpu=v8" was specified, "__sparc_v8__" would be defined
 > in addition to the other macros.
 > 
 > It would be nice if a sparcv9-specific macro could be guaranteed defined
 > on sparc64 toolchains when no cpu-tuning options are given.
 
 I don't know whether this will work on actual sparc64 toolchains, but
 to compile for generic sparc (the assembler claims the default to be
 "sparclite" but no compiler symbols to that effect are defined), I must
 now use the following patch:
 
 +--- libev/ev.c.orig   2014-03-25 14:26:35.000000000 -0500
 ++++ libev/ev.c        2014-07-06 11:57:06.000000000 -0500
 +@@ -629,7 +629,7 @@ struct signalfd_siginfo
 +       #define ECB_MEMORY_FENCE         __asm__ __volatile__ ("dmb"      : : 
: "memory")
 +     #elif __aarch64__
 +       #define ECB_MEMORY_FENCE         __asm__ __volatile__ ("dmb ish"  : : 
: "memory")
 +-    #elif (__sparc || __sparc__) && !__sparcv8
 ++    #elif (__sparc || __sparc__) && (__sparcv9 || __sparcv9__ || 
__sparc_v9__)
 +       #define ECB_MEMORY_FENCE         __asm__ __volatile__ ("membar 
#LoadStore | #LoadLoad | #StoreStore | #StoreLoad" : : : "memory")
 +       #define ECB_MEMORY_FENCE_ACQUIRE __asm__ __volatile__ ("membar 
#LoadStore | #LoadLoad"                            : : : "memory")
 +       #define ECB_MEMORY_FENCE_RELEASE __asm__ __volatile__ ("membar 
#LoadStore             | #StoreStore")
 
 -- 
 |/"\ John D. Baker, KN5UKS               NetBSD     Darwin/MacOS X
 |\ / jdbaker[snail]mylinuxisp[flyspeck]com    OpenBSD            FreeBSD
 | X  No HTML/proprietary data in email.   BSD just sits there and works!
 |/ \ GPGkeyID:  D703 4A7E 479F 63F8 D3F4  BD99 9572 8F23 E4AD 1645
 


Home | Main Index | Thread Index | Old Index