Re: Changes to kbuild in 6.x causing cpp build issues.

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

 



Any help would be appreciated on how to create the *.o.cmd file for .cpp files?

On Tue, Jan 30, 2024 at 10:42 PM David F. <df7729@xxxxxxxxx> wrote:
>
> Thank you, I use .cpp rather than .cc, would I be better off using
> .cc?     Or, how do I create the .cmd file when building the .o file?
>
> On Tue, Jan 30, 2024 at 12:37 AM Masahiro Yamada <masahiroy@xxxxxxxxxx> wrote:
> >
> > On Tue, Jan 30, 2024 at 3:32 PM David F. <df7729@xxxxxxxxx> wrote:
> > >
> > > Hello,
> > >
> > > resending this because it doesn't show that it made it to the archives.
> > >
> > > I've been building an out-of-tree linux kernel module that has a .cpp
> > > module (plus a library that is built) for well over a decade using the
> > > basic method outlined at https://github.com/veltzer/kcpp.   There was
> > > a patch needed (provided here) in the 5.x version to be able to link
> > > to the .a file generated.  That patch I've been able to modify as
> > > slight changes occured, but now in 6.6.14 things have changed a lot,
> > > I'm not sure if I'll need something like it to get to the final link
> > > but I don't think I'm at that point yet.
> > >
> > > My main issue now is this:
> > >
> > > LD [M]  /media/sf_SRC_DRIVE/mymodule/l
> > > inux/driver/6.6.14-686-mine/mymodule.o
> > >   ld -m elf_i386 -z noexecstack   -r -o
> > > /media/sf_SRC_DRIVE/mymodule/linux/driver/6.6.14-686-mine/mymodule.o
> > > @/media/sf_SRC_DRIVE/mymodule/linux/driver/6.6.14-686-mine/mymodule.mod
> > > # cmd_modules_order
> > > /media/sf_SRC_DRIVE/mymodule/linux/driver/6.6.14-686-mine/modules.order
> > >   {   echo /media/sf_SRC_DRIVE/mymodule/linux/driver/6.6.14-686-mine/mymodule.o;
> > > :; } > /media/sf_SRC_DRIVE/mymodule/linux/driver/6.6.14-686-mine/modules.order
> > > sh ./scripts/modules-check.sh
> > > /media/sf_SRC_DRIVE/mymodule/linux/driver/6.6.14-686-mine/modules.order
> > > make -f ./scripts/Makefile.modpost
> > > # MODPOST /media/sf_SRC_DRIVE/mymodule/linux/driver/6.6.14-686-mine/Module.symvers
> > >    scripts/mod/modpost -M -m       -o
> > > /media/sf_SRC_DRIVE/mymodule/linux/driver/6.6.14-686-mine/Module.symvers
> > > -T /media/sf_SRC_DRIVE/mymodule/linux/driver/6.6.14-686-mine/modules.order
> > > -i Module.symvers -e
> > > /media/sf_SRC_DRIVE/mymodule/linux/driver/6.6.14-686-mine/.mymodulelindrivercpp.o.cmd:
> > > No such file or directory
> > >
> > > It has never built a *.o.cmd file for the .cpp module and still
> > > doesn't, but the new system is looking for it.    Could someone
> > > familiar with kbuild tell me what I can patch / do to allow the system
> > > to complete the build like it used to?
> > >
> > > Thank You.
> > >
> >
> >
> > Presumably, the relevant commit is
> > f292d875d0dc700b3af0bef04c5abc1dc7b3b62c
> >
> >
> > modpost requires .*.cmd files, when CONFIG_MODVERSIONS=y.
> >
> >
> > This project does not produce .*.cmd file
> > when building *.o from *.cc
> >
> > https://github.com/veltzer/kcpp/blob/177ea052f3c52c9f85bb091235061a0e620f51bd/Makefile#L68
> >
> >
> >
> >
> > --
> > Best Regards
> > Masahiro Yamada





[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux