pkgsrc-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
pkg/48252: x11/rxvt-unicode invalid assembly macro for sparc
>Number: 48252
>Category: pkg
>Synopsis: x11/rxvt-unicode invalid assembly macro for sparc
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Sep 29 19:30:00 +0000 2013
>Originator: John D. Baker
>Release: NetBSD/sparc-6.1_STABLE, pkgsrc-HEAD (pre-pkgsrc-2013Q3)
>Organization:
>Environment:
NetBSD jean 6.1_STABLE NetBSD 6.1_STABLE (JEAN) #26: Fri Sep 20 12:37:38 CDT
2013
sysop%verthandi.technoskunk.fur@localhost:/d0/build/netbsd-6/obj/sparc/sys/arch/sparc/compile/JEAN
sparc
>Description:
Building x11/rxvt-unicode on NetBSD/sparc-6.1_STABLE fails as follows
(CFLAGS+=-save-temps):
[...]
c++ -I.. -I. -I. -I./../libev -I./../libptytty/src -DHAVE_CONFIG_H
-I/usr/pkg/include -I/usr/X11R7/include -I/usr/include
-I/usr/X11R7/include/freetype2 -D_REENTRANT -I/usr/X11R7/include -D_REENTRANT
-I/usr/X11R7/include -I/usr/pkg/include -I/usr/X11R7/include/freetype2
-I/usr/X11R7/include -I/usr/X11R7/include/freetype2 -I/usr/X11R7/include
-I/usr/pkg/include -I/usr/X11R7/include/freetype2 -I/usr/X11R7/include
-I/usr/X11R7/include/freetype2 -I/usr/X11R7/include -O2 -save-temps
-I/usr/pkg/include -I/usr/X11R7/include -I/usr/include
-I/usr/X11R7/include/freetype2 -w -I/usr/X11R7/include -c ev_cpp.C
In file included from ev_cpp.C:2:0:
./../libev/ev.c:1535:20: warning: 'ev_rt_now' initialized and declared 'extern'
ev_cpp.s: Assembler messages:
ev_cpp.s:1367: Error: Architecture mismatch on "membar".
ev_cpp.s:1367: (Requires v9|v9a|v9b; requested architecture is sparclite.)
ev_cpp.s:1380: Error: Architecture mismatch on "membar".
ev_cpp.s:1380: (Requires v9|v9a|v9b; requested architecture is sparclite.)
ev_cpp.s:1385: Error: Architecture mismatch on "membar".
ev_cpp.s:1385: (Requires v9|v9a|v9b; requested architecture is sparclite.)
ev_cpp.s:1394: Error: Architecture mismatch on "membar".
ev_cpp.s:1394: (Requires v9|v9a|v9b; requested architecture is sparclite.)
ev_cpp.s:1484: Error: Architecture mismatch on "membar".
ev_cpp.s:1484: (Requires v9|v9a|v9b; requested architecture is sparclite.)
ev_cpp.s:1521: Error: Architecture mismatch on "membar".
ev_cpp.s:1521: (Requires v9|v9a|v9b; requested architecture is sparclite.)
ev_cpp.s:1531: Error: Architecture mismatch on "membar".
ev_cpp.s:1531: (Requires v9|v9a|v9b; requested architecture is sparclite.)
ev_cpp.s:3674: Error: Architecture mismatch on "membar".
ev_cpp.s:3674: (Requires v9|v9a|v9b; requested architecture is sparclite.)
ev_cpp.s:3757: Error: Architecture mismatch on "membar".
ev_cpp.s:3757: (Requires v9|v9a|v9b; requested architecture is sparclite.)
ev_cpp.s:3893: Error: Architecture mismatch on "membar".
ev_cpp.s:3893: (Requires v9|v9a|v9b; requested architecture is sparclite.)
*** Error code 1
Stop.
make: stopped in /var/tmp/pkgsrc/x11/rxvt-unicode/work/rxvt-unicode-9.18/src
*** Error code 1
Stop.
make: stopped in /var/tmp/pkgsrc/x11/rxvt-unicode/work/rxvt-unicode-9.18
*** Error code 1
Stop.
make: stopped in /x/pkgsrc/x11/rxvt-unicode
*** Error code 1
Stop.
Looking at the first occurrance of the complaint in ev_cpp.s:
[...]
! 2135 "./../libev/ev.c" 1
membar #LoadStore | #LoadLoad | #StoreStore | #StoreLoad
[...]
Looking in the vicinity of line 2135 of the referenced C source:
[...]
inline_speed void
evpipe_write (EV_P_ EV_ATOMIC_T *flag)
{
ECB_MEMORY_FENCE; /* push out the write before this function was called,
acquire flag */
[...]
Looking back at the top of the file reveals the variant macro
definition:
[...]
#if ECB_NO_SMP
#define ECB_MEMORY_FENCE do { } while (0)
#endif
#ifndef ECB_MEMORY_FENCE
#if ECB_GCC_VERSION(2,5) || defined __INTEL_COMPILER || (__llvm__ &&
__GNUC__) || __SUNPRO_C >= 0x5110 || __SUNPRO_CC >= 0x5110
#if __i386 || __i386__
#define ECB_MEMORY_FENCE __asm__ __volatile__ ("lock; orb $0,
-1(%%esp)" : : : "memory")
#define ECB_MEMORY_FENCE_ACQUIRE __asm__ __volatile__ (""
: : : "memory")
#define ECB_MEMORY_FENCE_RELEASE __asm__ __volatile__ ("")
#elif __amd64 || __amd64__ || __x86_64 || __x86_64__
#define ECB_MEMORY_FENCE __asm__ __volatile__ ("mfence" : : :
"memory")
#define ECB_MEMORY_FENCE_ACQUIRE __asm__ __volatile__ ("" : : :
"memory")
#define ECB_MEMORY_FENCE_RELEASE __asm__ __volatile__ ("")
#elif __powerpc__ || __ppc__ || __powerpc64__ || __ppc64__
#define ECB_MEMORY_FENCE __asm__ __volatile__ ("sync" : : :
"memory")
#elif defined __ARM_ARCH_6__ || defined __ARM_ARCH_6J__ \
|| defined __ARM_ARCH_6K__ || defined __ARM_ARCH_6ZK__
#define ECB_MEMORY_FENCE __asm__ __volatile__ ("mcr
p15,0,%0,c7,c10,5" : : "r" (0) : "memory")
#elif defined __ARM_ARCH_7__ || defined __ARM_ARCH_7A__ \
|| defined __ARM_ARCH_7M__ || defined __ARM_ARCH_7R__
#define ECB_MEMORY_FENCE __asm__ __volatile__ ("dmb" : : :
"memory")
#elif __sparc || __sparc__
#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")
#elif defined __s390__ || defined __s390x__
#define ECB_MEMORY_FENCE __asm__ __volatile__ ("bcr 15,0" : : :
"memory")
#elif defined __mips__
#define ECB_MEMORY_FENCE __asm__ __volatile__ ("sync" : : :
"memory")
#elif defined __alpha__
#define ECB_MEMORY_FENCE __asm__ __volatile__ ("mb" : : :
"memory")
#elif defined __hppa__
#define ECB_MEMORY_FENCE __asm__ __volatile__ ("" : : :
"memory")
#define ECB_MEMORY_FENCE_RELEASE __asm__ __volatile__ ("")
#elif defined __ia64__
#define ECB_MEMORY_FENCE __asm__ __volatile__ ("mf" : : :
"memory")
#endif
#endif
#endif
[...]
And further conditional definitions of "ECB_MEMORY_FENCE" if the above
conditional didn't define it.
So, there appears to be ambiguity when selecting architecture-specific
code. Or just an assembler macro that assumes all sparc is sparcv9.
Or something (Portability? What's that? But that's a different rant).
>How-To-Repeat:
Using pkgsrc-HEAD from about 201309280000Z, attempt to build
x11/rxvt-unicode on netbsd-6(5?)/sparc.
>Fix:
Workaround: Change conditional to something that doesn't match __sparc
or __sparc__. What's the correct one for NetBSD gcc? (__sparc_v9__, if
I read the output of 'strings $(which gcc)' correctly.)
Any sparc assembly gurus think of a proper macro for non-v9 sparc?
Home |
Main Index |
Thread Index |
Old Index