Re: Building modules gives error: "invalid output constraint '=@cce' in asm"
HI Andriy Gapon, Thanks. It works. On Wed, Jun 17, 2020 at 11:53 AM Andriy Gapon wrote: > On 17/06/2020 04:53, Rajesh Kumar wrote: > > Then, I am trying to compile the driver modules and hit the > > compilation error. I haven't done "install world" as I don't want the > base > > 12.0 to be disturbed. > > You should do `make buildenv` and then do the module build in the subshell. > This way you will be using a compiler (toolchain, in general) form the > buildworld, not the currently installed compiler. > > -- > Andriy Gapon > ___ freebsd-current@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Building modules gives error: "invalid output constraint '=@cce' in asm"
On 17/06/2020 04:53, Rajesh Kumar wrote: > Then, I am trying to compile the driver modules and hit the > compilation error. I haven't done "install world" as I don't want the base > 12.0 to be disturbed. You should do `make buildenv` and then do the module build in the subshell. This way you will be using a compiler (toolchain, in general) form the buildworld, not the currently installed compiler. -- Andriy Gapon ___ freebsd-current@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Building modules gives error: "invalid output constraint '=@cce' in asm"
Hi, Has anyone faced a similar issue? I had a 12.0-RELEASE kernel earlier. I cloned the master branch and built world, built kernel and installed kernel with a different kernel name (INSTKERNNAME) and rebooted the machine and see it booting to 13.0-CURRENT as expected. Then, I am trying to compile the driver modules and hit the compilation error. I haven't done "install world" as I don't want the base 12.0 to be disturbed. When I compared the /usr/include/machine/atomic.h and the atomic.h from the OBJ directory, I see the below highlighted change. Looks like, building module is trying to use the headers in OBJ directory as expected, but hitting the compilation issue. *12.0 base installation atomic.h* static __inline int \ atomic_fcmpset_##TYPE(volatile u_##TYPE *dst, u_##TYPE *expect, u_##TYPE src) \ { \ u_char res; \ \ __asm __volatile( \ " " MPLOCKED "" \ " cmpxchg %3,%1 ; " \ " sete%0 ;" \ "# atomic_fcmpset_" #TYPE " " \ *: "=q" (res), /* 0 */ \ * "+m" (*dst), /* 1 */ \ "+a" (*expect)/* 2 */ \ : "r" (src) /* 3 */ \ : "memory", "cc"); \ return (res); \ } *13.0- CURRENT atomic.h in OBJ dir* static __inline int \ atomic_fcmpset_##TYPE(volatile u_##TYPE *dst, u_##TYPE *expect, u_##TYPE src) \ { \ u_char res; \ \ __asm __volatile( \ " " MPLOCKED "" \ "# atomic_fcmpset_" #TYPE " " \ *: "=@cce" (res),/* 0 */ \* "+m" (*dst), /* 1 */ \ "+a" (*expect)/* 2 */ \ : "r" (src) /* 3 */ \ : "memory", "cc"); \ return (res); \ } Any clue would be really helpful? Thanks, Rajesh On Tue, Jun 16, 2020 at 12:29 PM Rajesh Kumar wrote: > Hi, > > I am trying to build my module with freebsd current branch. But I am > facing compilation issue with header files as below. I have built and > installed the freebsd current branch and booted to that kernel before > building my module. So, not sure what is going wrong. > > > > > > > *In file included from > /root//freebsd_current/sys/sys/systm.h:44:./machine/atomic.h:230:1: error: > invalid output constraint '=@cce' in > asmATOMIC_CMPSET(char);^./machine/atomic.h:205:4: note: expanded from macro > 'ATOMIC_CMPSET': "=@cce" (res),/* 0 */ \* > > Am I missing something? > > Thanks, > Rajesh. > ___ freebsd-current@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Building modules gives error: "invalid output constraint '=@cce' in asm"
On Tue, Jun 16, 2020 at 12:29:14PM +0530, Rajesh Kumar wrote: > Hi, > > I am trying to build my module with freebsd current branch. But I am > facing compilation issue with header files as below. I have built and > installed the freebsd current branch and booted to that kernel before > building my module. So, not sure what is going wrong. > > *In file included from > /root//freebsd_current/sys/sys/systm.h:44:./machine/atomic.h:230:1: error: > invalid output constraint '=@cce' in > asmATOMIC_CMPSET(char);^./machine/atomic.h:205:4: note: expanded from macro > 'ATOMIC_CMPSET': "=@cce" (res),/* 0 */ \* > > Am I missing something? Your compiler is too old. You must either build on current, use buildworld/buildkernel method. ___ freebsd-current@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"