Re: buildkernel avoidably building modules specified in the config
On Tue, Feb 7, 2023, 5:20 PM Mateusz Guzik wrote: > ... then a lot of the code ends up being compiled twice for no good reason. > > This popped up again as clang 15 emits a ton of warnings vs K&R funcs. > > I don't know how this works internally, is it really a big problem to sort > out? > I figured config(8) could generate a bunch of WITHOUT_ of similar, but I > guess > sys/modules/Makefile will have to be patched to support it, which it > only does for some modules at the moment. > > I don't have any interest in working on it, so just bringing this up > for interested. > Yea... it's on the list that config.ng would do... At one point modules and kernel .o files were built differently which precluded a number of Makefile hacks. Warner Warner >
buildkernel avoidably building modules specified in the config
... then a lot of the code ends up being compiled twice for no good reason. This popped up again as clang 15 emits a ton of warnings vs K&R funcs. I don't know how this works internally, is it really a big problem to sort out? I figured config(8) could generate a bunch of WITHOUT_ of similar, but I guess sys/modules/Makefile will have to be patched to support it, which it only does for some modules at the moment. I don't have any interest in working on it, so just bringing this up for interested. -- Mateusz Guzik
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"
Building modules gives error: "invalid output constraint '=@cce' in asm"
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: Build broken and not building modules
try "make -DNO_WERROR kernel" it overrides the complier warning messages being generated at the moment (that are treated as errors) . Aleksander Rozman - Andy <[EMAIL PROTECTED]> wrote: > > Hi ! > > I am trying to compile in my code for kernel, but every time I start > > compile (even without my code) it stops in modules. It seems that latest > > commits have a lot of modules errors. Is there a way to override building > > modules. To build kernel I usually go to i386/compile/NAME directory > and > issue make command. Is there a switch I can use to stop building of > modules > (I have everything I need builtin in kernel, what I need). > > Andy > > > ** > * Aleksander Rozman - Andy * Fandoms: E2:EA, SAABer, Trekkie, Earthie > * > * [EMAIL PROTECTED] * Sentinel, BH 90210, True's Trooper, > * > *[EMAIL PROTECTED] * Heller's Angel, Questie, Legacy, PO5, > * > * Maribor, Slovenia (Europe) * Profiler, Buffy (Slayerete), Pretender >* > * ICQ-UIC: 4911125 * > * PGP key available *http://www.atechnet.dhs.org/~andy/ > * > ** > > > To Unsubscribe: send mail to [EMAIL PROTECTED] > with "unsubscribe freebsd-current" in the body of the message > __ FREE voicemail, email, and fax...all in one place. Sign Up Now! http://www.onebox.com To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Build broken and not building modules
Hi ! I am trying to compile in my code for kernel, but every time I start compile (even without my code) it stops in modules. It seems that latest commits have a lot of modules errors. Is there a way to override building modules. To build kernel I usually go to i386/compile/NAME directory and issue make command. Is there a switch I can use to stop building of modules (I have everything I need builtin in kernel, what I need). Andy ** * Aleksander Rozman - Andy * Fandoms: E2:EA, SAABer, Trekkie, Earthie * * [EMAIL PROTECTED] * Sentinel, BH 90210, True's Trooper, * *[EMAIL PROTECTED] * Heller's Angel, Questie, Legacy, PO5, * * Maribor, Slovenia (Europe) * Profiler, Buffy (Slayerete), Pretender* * ICQ-UIC: 4911125 * * PGP key available *http://www.atechnet.dhs.org/~andy/ * ** To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: building modules
On Tue, 25 Jan 2000, Brian Beattie wrote: > I'm trying to figure out how to make a makefile to build a module and have > run into something I do not understand. I am working with freshly > cvsup'ed sources. > > When I try to build a module in /sys/modules, the command line contains a > -DKERNEL, which I find in bsd.kmod.mk. This causes the wrong definitions Your bsd.kmod.mk (maybe the installed one) is out of date. Bruce To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
building modules
I'm trying to figure out how to make a makefile to build a module and have run into something I do not understand. I am working with freshly cvsup'ed sources. When I try to build a module in /sys/modules, the command line contains a -DKERNEL, which I find in bsd.kmod.mk. This causes the wrong definitions to be defined, since the correct ones are protected by #ifdef _KERNEL. (note the _). This is the case for running make from /sys, /sys/module, or /sys/module/ I looked a buildworld log from Jan 25, unknown cvs date, and the modules are built with -D_KERNEL, as I would expect. Am I doing something wrong, did something change, or do I just not understand? Brian Beattie| The only problem with [EMAIL PROTECTED] | winning the rat race ... www.aracnet.com/~beattie | in the end you're still a rat To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message