Re: [cross]compiling world and mk.conf
Am 08.11.23 um 20:14 schrieb Valery Ushakov: On Wed, Nov 08, 2023 at 13:07:09 +0100, Martin Husemann wrote: Alternatively you can use conditionals in mk.conf, like: .if ${MACHINE} == "sparc" CFLAGS+= -mcpu=v8 -mtune=supersparc .endif *tsk tsk*... :) CPUFLAGS = -mcpu=v8 -mtune=... please. .if ${MACHINE_ARCH} != shark MKKDEBUG=yes .endif *tsk tsk tsk*... :) And you also got MACHINE and MACHINE_ARCH swapped :) Yeah, what Martin said modulo corrections. You can use three levels from more generic to more specific: MACHINE_CPU e.g. sh3 or arm MACHINE_ARCH e.g. sh3el or earmv7hfeb MACHINE e.g. landisk or shark You can ask for the list with: ./build.sh list-arch -uwe Thanks for the heads up. I guess it was me who mentioned CFLAGS first in my example, even though the man page clearly disadvises against this. For me, from the destination host, I am using the MACHINE[_ARCH] from uname -m/-p respectively, hoping, it has been set correctly by the installer :) Unless there is something that speaks against this method. Otherwise, especially with arm, I would be totally lost. But an impressive list anyway.
Re: [cross]compiling world and mk.conf
On Wed, Nov 08, 2023 at 13:07:09 +0100, Martin Husemann wrote: > Alternatively you can use conditionals in mk.conf, like: > > .if ${MACHINE} == "sparc" > CFLAGS+= -mcpu=v8 -mtune=supersparc > .endif *tsk tsk*... :) CPUFLAGS = -mcpu=v8 -mtune=... please. > .if ${MACHINE_ARCH} != shark > MKKDEBUG=yes > .endif *tsk tsk tsk*... :) And you also got MACHINE and MACHINE_ARCH swapped :) Yeah, what Martin said modulo corrections. You can use three levels from more generic to more specific: MACHINE_CPU e.g. sh3 or arm MACHINE_ARCH e.g. sh3el or earmv7hfeb MACHINE e.g. landisk or shark You can ask for the list with: ./build.sh list-arch -uwe
Re: [cross]compiling world and mk.conf
Am 08.11.23 um 13:20 schrieb Greg Troxel: Martin Husemann writes: Alternatively you can use conditionals in mk.conf, like: .if ${MACHINE} == "sparc" CFLAGS+= -mcpu=v8 -mtune=supersparc .endif or .if ${MACHINE_ARCH} != shark MKKDEBUG=yes .endif I would strongly recommend the .if method and having one file. I would expect things you want are mostly the same and only slightly different. Note also that you can .include from mk.conf and you can do that from within an .if. Thanks very much to both of you! I'll give the .if a go and see, how far I get. It's not, that I have dozens of architectures. Unfortunately. Great help, as I am not (yet?) too much into the make syntax. Ede
Re: [cross]compiling world and mk.conf
Martin Husemann writes: > Alternatively you can use conditionals in mk.conf, like: > > .if ${MACHINE} == "sparc" > CFLAGS+= -mcpu=v8 -mtune=supersparc > .endif > > or > > .if ${MACHINE_ARCH} != shark > MKKDEBUG=yes > .endif I would strongly recommend the .if method and having one file. I would expect things you want are mostly the same and only slightly different. Note also that you can .include from mk.conf and you can do that from within an .if.
Re: [cross]compiling world and mk.conf
On Wed, Nov 08, 2023 at 01:02:12PM +0100, Ede Wolf wrote: > Hello, > > I am heading for my first cross compile, but reading chapter 33 or man > make/release, I am having one principal problem of understanding: > > Of course, if I have a central machine to cross compile for different hosts, > I am having a different mk.conf for each remote host or host > group/architecture. From CFLAGS to different build options, like .f.e. > MKINFO > > But I have not been able to find a means to tell make build or build.sh the > location of mk.conf they shall use for that particular build. That is simple (but not obvious): -V MAKECONF=/mk.conf Probably not very usefull side remark here: I never had the need for different mk.conf files per build or architecture (but don't let that stop you!) Alternatively you can use conditionals in mk.conf, like: .if ${MACHINE} == "sparc" CFLAGS+= -mcpu=v8 -mtune=supersparc .endif or .if ${MACHINE_ARCH} != shark MKKDEBUG=yes .endif Martin
[cross]compiling world and mk.conf
Hello, I am heading for my first cross compile, but reading chapter 33 or man make/release, I am having one principal problem of understanding: Of course, if I have a central machine to cross compile for different hosts, I am having a different mk.conf for each remote host or host group/architecture. From CFLAGS to different build options, like .f.e. MKINFO But I have not been able to find a means to tell make build or build.sh the location of mk.conf they shall use for that particular build. What am I missing? Thanks Ede