christos@ wrote: > >Now I get the following erro during local tests of > >"build.sh -U -m hp300 release" on NetBSD/i386 9.0_RC1 host: > > > >--- > ># create compat_util/compat_exec.d : > >In file included from /s/cvs/src/sys/sys/param.h:149:0, > > from /s/cvs/src/sys/compat/common/compat_exec.c:41: > >./m68k/pmap_motorola.h:165:5: error: operator '*' has no left operand > > #if PAGE_SIZE == 8192 /* NBPG / (SG4_LEV1SIZE * sizeof(st_entry_t)) */ > > ^ > >nbmkdep: compile failed. > >*** [compat_exec.d] Error code 1 > > try cc -E?
It turns out the problem is more complicated. <uvm/uvm_param.h> has the following definitions: https://nxr.netbsd.org/xref/src/sys/uvm/uvm_param.h?r=1.38#135 --- 135 * If MIN_PAGE_SIZE and MAX_PAGE_SIZE are not equal, then we must use 136 * non-constant PAGE_SIZE, et al for LKMs. 137 */ 138 #if (MIN_PAGE_SIZE != MAX_PAGE_SIZE) 139 #define __uvmexp_pagesize 140 #if defined(_LKM) || defined(_MODULE) 141 #undef PAGE_SIZE 142 #undef PAGE_MASK 143 #undef PAGE_SHIFT 144 #endif 145 #endif 146 147 /* 148 * Now provide PAGE_SIZE, PAGE_MASK, and PAGE_SHIFT if we do not 149 * have ones that are compile-time constants. 150 */ 151 #if !defined(PAGE_SIZE) 152 extern const int *const uvmexp_pagesize; 153 extern const int *const uvmexp_pagemask; 154 extern const int *const uvmexp_pageshift; 155 #define PAGE_SIZE (*uvmexp_pagesize) /* size of page */ 156 #define PAGE_MASK (*uvmexp_pagemask) /* size of page - 1 */ 157 #define PAGE_SHIFT (*uvmexp_pageshift) /* bits to shift for pages */ 158 #endif /* PAGE_SIZE */ --- I.e. <uvm/uvm_param> assumes PAGE_SIZE is not compile time constant for MODULEs if (MIN_PAGE_SIZE != MAX_PAGE_SIZE). Probably this is the same reason of recent arm build failures: https://releng.netbsd.org/builds/HEAD/202001130720Z/ https://releng.netbsd.org/builds/HEAD/202001130720Z/evbarm-earm.build.failed --- /tmp/genassym.Lq8h9d/assym.c:57:1: error: asm operand 0 probably doesn't match constraints [-Werror] __asm("XYZZY VM_MIN_ADDRESS %0" : : "n" (VM_MIN_ADDRESS)); ^~~~~ /tmp/genassym.Lq8h9d/assym.c:58:1: error: asm operand 0 probably doesn't match constraints [-Werror] __asm("XYZZY VM_MAXUSER_ADDRESS %0" : : "n" (VM_MAXUSER_ADDRESS)); ^~~~~ /tmp/genassym.Lq8h9d/assym.c:97:1: error: asm operand 0 probably doesn't match constraints [-Werror] __asm("XYZZY PAGE_MASK %0" : : "n" (PAGE_MASK)); ^~~~~ /tmp/genassym.Lq8h9d/assym.c:98:1: error: asm operand 0 probably doesn't match constraints [-Werror] __asm("XYZZY PAGE_SIZE %0" : : "n" (PAGE_SIZE)); ^~~~~ --- Should we prepare independent constant for "possible pagesize value among different MACHINE with the same MACHINE_ARCH" for jemalloc(3)? --- Izumi Tsutsui