From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 06F1F1399E6 for ; Wed, 2 Sep 2015 21:52:54 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 2BC2814322; Wed, 2 Sep 2015 21:52:51 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id B8F0814322 for ; Wed, 2 Sep 2015 21:52:50 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id C3E44340752 for ; Wed, 2 Sep 2015 21:52:48 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 8BC16175 for ; Wed, 2 Sep 2015 21:52:46 +0000 (UTC) From: "Richard Farina" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Richard Farina" Message-ID: <1441230768.827a9cd7ea1863242920651752a8265acc8d57ad.zerochaos@gentoo> Subject: [gentoo-commits] proj/catalyst:master commit in: catalyst/base/ X-VCS-Repository: proj/catalyst X-VCS-Files: catalyst/base/stagebase.py X-VCS-Directories: catalyst/base/ X-VCS-Committer: zerochaos X-VCS-Committer-Name: Richard Farina X-VCS-Revision: 827a9cd7ea1863242920651752a8265acc8d57ad X-VCS-Branch: master Date: Wed, 2 Sep 2015 21:52:46 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 93486b42-f6e6-4cdb-90b9-296de9830e1d X-Archives-Hash: 99981bbe4f8d93e8d3b26b332411c359 commit: 827a9cd7ea1863242920651752a8265acc8d57ad Author: Rick Farina (Zero_Chaos) gentoo org> AuthorDate: Wed Sep 2 21:52:48 2015 +0000 Commit: Richard Farina gentoo org> CommitDate: Wed Sep 2 21:52:48 2015 +0000 URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=827a9cd7 support setting/overriding fcflags and fflags, specifically for use with CFLAGS=-frecord-gcc-switches catalyst/base/stagebase.py | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py index 23491aa..d898e95 100644 --- a/catalyst/base/stagebase.py +++ b/catalyst/base/stagebase.py @@ -38,7 +38,7 @@ class StageBase(TargetBase, ClearBase, GenBase): self.valid_values.extend(["version_stamp","target","subarch",\ "rel_type","profile","snapshot","source_subpath","portage_confdir",\ - "cflags","cxxflags","ldflags","cbuild","hostuse","portage_overlay",\ + "cflags","cxxflags","fcflags","fflags","ldflags","cbuild","hostuse","portage_overlay",\ "distcc_hosts","makeopts","pkgcache_path","kerncache_path"]) self.set_valid_build_kernel_vars(addlargs) @@ -280,6 +280,14 @@ class StageBase(TargetBase, ClearBase, GenBase): if "CXXFLAGS" in self.makeconf: self.settings["CXXFLAGS"]=self.makeconf["CXXFLAGS"] + def override_fcflags(self): + if "FCFLAGS" in self.makeconf: + self.settings["FCFLAGS"]=self.makeconf["FCFLAGS"] + + def override_fflags(self): + if "FFLAGS" in self.makeconf: + self.settings["FFLAGS"]=self.makeconf["FFLAGS"] + def override_ldflags(self): if "LDFLAGS" in self.makeconf: self.settings["LDFLAGS"]=self.makeconf["LDFLAGS"] @@ -1020,6 +1028,8 @@ class StageBase(TargetBase, ClearBase, GenBase): self.override_chost() self.override_cflags() self.override_cxxflags() + self.override_fcflags() + self.override_fflags() self.override_ldflags() if "autoresume" in self.settings["options"] \ and self.resume.is_enabled("chroot_setup"): @@ -1077,6 +1087,20 @@ class StageBase(TargetBase, ClearBase, GenBase): myf.write('CXXFLAGS="${CFLAGS}"\n') else: myf.write('CXXFLAGS="${CFLAGS}"\n') + if "FCFLAGS" in self.settings: + if self.settings["FCFLAGS"]!=self.settings["CFLAGS"]: + myf.write('FCFLAGS="'+self.settings["FCFLAGS"]+'"\n') + else: + myf.write('FCFLAGS="${CFLAGS}"\n') + else: + myf.write('FCFLAGS="${CFLAGS}"\n') + if "FFLAGS" in self.settings: + if self.settings["FFLAGS"]!=self.settings["CFLAGS"]: + myf.write('FFLAGS="'+self.settings["FFLAGS"]+'"\n') + else: + myf.write('FFLAGS="${CFLAGS}"\n') + else: + myf.write('FFLAGS="${CFLAGS}"\n') if "LDFLAGS" in self.settings: myf.write("# LDFLAGS is unsupported. USE AT YOUR OWN RISK!\n")