tech-toolchain archive

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

Re: introduce OBJMACHINE_ARCH



In article <20161207212847.7522017FDAB%rebar.astron.com@localhost>,
Christos Zoulas <christos%zoulas.com@localhost> wrote:
>On Dec 8,  7:19am, mrg%eterna.com.au@localhost (matthew green) wrote:
>-- Subject: re: introduce OBJMACHINE_ARCH
>
>| i'm still not a fan.  i am positive you can do this with
>| MAKEOBJPREFIX.
>| 
>| it also relies upon a new feature to work, where as using
>| the existing methods works going back to some distant time
>| in the past.  it's frustrating when the build environment
>| changes so heavily between releases and i'm yet to see why
>| MAKEOBJPREFIX isn't useable here.
>| 
>| here, this seems to work:
>| 
>| MAKEOBJPREFIX=3D'${NETBSDSRCDIR}/obj.${MACHINE}-${MACHINE_ARCH}/${.CURDIR:S=
>| /${NETBSDSRCDIR}\///}'
>
>Not really, it is not designed to be a SUFFIX and it must exist...
>
>[4:27pm] 346>cd /usr/src/bin/ls
>[4:27pm] 347>setenv MAKEOBJDIRPREFIX
>'${NETBSDSRCDIR}${.CURDIR:S/${NETBSDSRCDIR}//}/obj.${MACHINE}-${MACHINE_ARCH}'
>[4:27pm] 348>make obj
>MAKEOBJDIRPREFIX /net/quasar/src-5/NetBSD/src/bin/ls/obj.amd64-x86_64
>does not exist, bailing...
>*** Error code 1
>
>Stop.
>make: stopped in /net/quasar/src-5/NetBSD/src/bin/ls
>Exit 1

Down to one line, and none of the suggestions with MAKEOBJDIRPREFIX
are working....

christos

Index: usr.bin/make/main.c
===================================================================
RCS file: /cvsroot/src/usr.bin/make/main.c,v
retrieving revision 1.253
diff -u -r1.253 main.c
--- usr.bin/make/main.c	7 Dec 2016 19:57:09 -0000	1.253
+++ usr.bin/make/main.c	8 Dec 2016 03:27:52 -0000
@@ -1122,6 +1122,7 @@
 
 	if (!Main_SetVarObjdir("MAKEOBJDIRPREFIX", curdir) &&
 	    !Main_SetVarObjdir("MAKEOBJDIR", "") &&
+	    !Main_SetObjdir("%s.%s-%s", _PATH_OBJDIR, machine, machine_arch) &&
 	    !Main_SetObjdir("%s.%s", _PATH_OBJDIR, machine) &&
 	    !Main_SetObjdir("%s", _PATH_OBJDIR))
 		(void)Main_SetObjdir("%s%s", _PATH_OBJDIRPREFIX, curdir);
Index: share/mk/bsd.obj.mk
===================================================================
RCS file: /cvsroot/src/share/mk/bsd.obj.mk,v
retrieving revision 1.50
diff -u -r1.50 bsd.obj.mk
--- share/mk/bsd.obj.mk	8 Dec 2016 03:25:35 -0000	1.50
+++ share/mk/bsd.obj.mk	8 Dec 2016 03:27:52 -0000
@@ -37,7 +37,7 @@
 .else
 PAWD?=		/bin/pwd
 
-__objdirsuffix=	${OBJMACHINE:D.${MACHINE}}
+__objdirsuffix=	${OBJMACHINE:D.${MACHINE}${OBJMACHINE_ARCH:D-${MACHINE_ARCH}}}
 __objdir=	obj${__objdirsuffix}
 
 __usrobjdir=	${BSDOBJDIR}${USR_OBJMACHINE:D.${MACHINE}}



Home | Main Index | Thread Index | Old Index