>But what "configuration" are you changing, and does that result in 
>changes to the tree, or are you passing a different mk.conf, or 
>something else? 


One of the architectures (the 486) needs a customized mk.conf to either enable 
-Os optimization in userland, or alternatively, tell ./build.sh to use PCC 
(which is only documented in share/mk/). I'm under the impression mk.conf is 
best practice to place all environment variables besides MAKECONF. The build 
tree is the same as the one that I'm using for my CD driver, but this doesn't 
affect any generic kernel builds for x86 (i386 or amd64) as of right now 
(although that might change). 


>See pkgsrc/sysutils/etcmanage for the scripts I use, which are aimed 
>at having a source tree per branch and organizing tool/obj/release/dest 
>directories in a way I like. 

Will do, thanks for the info. 




>If you want to pass different mk.conf files and have different paths, 
>that should be pretty easy. The basic hint is to not insist on passing 


>one argument, and accept that you will set multiple options. 

That's fine. I just wanted to make sure this was the "best practice", so I 
don't run into cross-arch or cross-mk.conf errors later on. The only way I've 
seen to set different mk.confs is to set the variable on the command line 
either prior to (and export) or when invoking ./build.sh. Is this correct, or 
is there an undocumented option to set it on the command line? 




>./build.sh -m i386 -j8 -x -u -U -O /usr/obj/gdt-current/i386 -T 
>/usr/obj/gdt-current/tools -D /usr/obj/gdt-current/destdir/i386 -R 
>/usr/obj/gdt-current/>releasedir -X /u0/n0/gdt/NetBSD-current/xsrc release 

Do you set the kernel in mk.conf, or is this just an example where you skip 
building the kernel/it's already built? 

----- Original Message -----
From: "Greg Troxel" <[email protected]> 
To: [email protected] 
Cc: [email protected] 
Sent: Saturday, July 12, 2014 10:54:21 AM 
Subject: Re: Multiple NetBSD targets using the same OBJDIR 


[email protected] writes: 

> I have a need to build NetBSD for multiple architectures using the 
> same source tree. While I understand that one can use the same tools 

This is normal. 

> directory for all possible targets, I have not found an option to 
> separate objects, releasedir, and destdir according to the target or 
> some chosen ID (I also have the need to build NetBSD for the same 
> architecture in two different configurations). 

If you set all of those, you can separate the builds. 

But what "configuration" are you changing, and does that result in 
changes to the tree, or are you passing a different mk.conf, or 
something else? 

See pkgsrc/sysutils/etcmanage for the scripts I use, which are aimed 
at having a source tree per branch and organizing tool/obj/release/dest 
directories in a way I like. 

If you want to pass different mk.conf files and have different paths, 
that should be pretty easy. The basic hint is to not insist on passing 
one argument, and accept that you will set multiple options. 

My script invokes build.sh as 

./build.sh -m i386 -j8 -x -u -U -O /usr/obj/gdt-current/i386 -T 
/usr/obj/gdt-current/tools -D /usr/obj/gdt-current/destdir/i386 -R 
/usr/obj/gdt-current/releasedir -X /u0/n0/gdt/NetBSD-current/xsrc release 

which sets 4 output options in a way that I the human find consistent. 
Arguably I should change -O to make it objdir/i386; there's no good 
reason to have the per-arch objdirs not in a container. 

Reply via email to