From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 28853 invoked from network); 27 Mar 2021 15:08:38 -0000 Received: from 1ess.inri.net (216.126.196.35) by inbox.vuxu.org with ESMTPUTF8; 27 Mar 2021 15:08:38 -0000 Received: from duke.felloff.net ([216.126.196.34]) by 1ess; Sat Mar 27 11:00:39 -0400 2021 Message-ID: <2E199923D171437BFE5C102DC6FB649D@felloff.net> Date: Sat, 27 Mar 2021 16:00:27 +0100 From: cinap_lenrek@felloff.net To: 9front@9front.org In-Reply-To: <357BEDBC-499F-420D-BFB7-CF8C1B37B95D@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: content-addressed engine property rich-client framework Subject: Re: [9front] Re: system mkfile changes Reply-To: 9front@9front.org Precedence: bulk Ok, heres my review. > diff -r cc26fdf57bb2 sys/src/cmd/mkfile > --- a/sys/src/cmd/mkfile Sat Mar 13 14:57:53 2021 +0100 > +++ b/sys/src/cmd/mkfile Sat Mar 27 14:58:00 2021 +0100 > @@ -1,137 +1,84 @@ > -TARG=`{ls *.[cy] | sed '/\.tab\.c$/d;s/..$//'} > +YTARG=`{echo *.y | sed 's/\.y//g'} > +TARG=$YTARG `{echo *.c | sed 's/\.c//g'} this is tricky, i think using ls here is better because then you can actually match the file extension (has to end at a line). otherwise, this can produce false positives. > +# solve race, build new cp and yacc first > +CPDEP=`{if(~ $objtype $cputype) echo $O.cp} > +CP=`{if(~ $objtype $cputype) echo ./$O.cp ; if not echo cp} > +YACCDEP=`{if(~ $objtype $cputype) echo $O.yacc} > +YACC=`{if(~ $objtype $cputype) echo ./$O.yacc ; if not echo yacc} i dont think this should be done here. this is a bootstrapping problem and should be handled by /sys/src/mkfile updating the (cross) compilers and build prerequisites first for the current $cputype, then install them. the rest of the mkfiles should be able to always rely on that the currently installed binaries for compilers, linkers, assemblers, yacc, mk, cp, awk, sed, grep, rc shell are the correct ones. these races should never exist if we have clear separation of build and installation, and the install step makes sure its not relying on the very tools it is currently installing. All these rule changes that use $CP and $CPDEP and $YACC and $YACCDEP have to go. It is just insanity. I'm fine with the cleanup of removing update rules and changing none rule to default. The problem that we want to solve is dealing with toolchain updates after a sysupdate. And this cannot be solved locally as the dependency information is not stated in the mkfiles. To build the toolchain, you also need to build their library dependencies, which is also not stated in the mkfiles. -- cinap