From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1QbFpC-0006kK-6w for garchives@archives.gentoo.org; Mon, 27 Jun 2011 17:42:19 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 037FC1C008; Mon, 27 Jun 2011 17:41:53 +0000 (UTC) Received: from smtprelay05.ispgateway.de (smtprelay05.ispgateway.de [80.67.31.97]) by pigeon.gentoo.org (Postfix) with ESMTP id B6BA41C008 for ; Mon, 27 Jun 2011 17:41:53 +0000 (UTC) Received: from [85.179.21.166] (helo=[192.168.1.2]) by smtprelay05.ispgateway.de with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.68) (envelope-from ) id 1QbFom-0001zv-Qk for gentoo-catalyst@lists.gentoo.org; Mon, 27 Jun 2011 19:41:52 +0200 Message-ID: <4E08C0DD.5010003@gentoo.org> Date: Mon, 27 Jun 2011 19:41:49 +0200 From: Sebastian Pipping User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110526 Thunderbird/3.1.10 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-catalyst@lists.gentoo.org Reply-to: gentoo-catalyst@lists.gentoo.org MIME-Version: 1.0 To: gentoo-catalyst@lists.gentoo.org Subject: Re: [gentoo-catalyst] [rfc] simplifying arch classes References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Df-Sender: sping-gentoo@binera.de X-Archives-Salt: X-Archives-Hash: 5dcdd21e4a9d91580c4db2fdb1ca9e68 On 06/27/2011 07:15 AM, Matt Turner wrote: > class arch_mips(generic): > "MIPS class" > def __init__(self, Olevel, arch, additional_cflags, include_workarounds): > generic.__init__(self) > > self.settings["CFLAGS"] = "-O" + Olevel > self.settings["CFLAGS"] += " -march=" + arch > if additional_cflags != "": > self.settings["CFLAGS"] += " " + additional_cflags > if include_workarounds: > if arch == "mips3": > self.settings["CFLAGS"] += " -mfix-r4000 -mfix-r4400" > elif arch == "r4000" or arch == "r4k": > self.settings["CFLAGS"] += " -mfix-r4000" > elif arch == "r4300": > self.settings["CFLAGS"] += " -mfix-r4300" > elif arch == "r10000" or arch == "r10k": > self.settings["CFLAGS"] += " -mfix-r10000" > self.settings["CFLAGS"] += " -pipe" Thoughts: - How are you going to ensure that such refactoring keeps all ~50 cases working without writing 50 explicit, data-duplicating test cases? Would you be willing to write these? - The code above adds flexibility but is less obvious than the current code. So while it improves on one aspect it worsens on another. - Such refactoring would have to be done on both 2.x and 3.x branches. Better wait until we are clear on their future. Best, Sebastian