public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/, catalyst/arch/
@ 2015-09-09 16:34 Richard Farina
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Farina @ 2015-09-09 16:34 UTC (permalink / raw
  To: gentoo-commits

commit:     d05808a7a8313a66a0be67e89867b4c3a1fe5ca0
Author:     Rick Farina (Zero_Chaos) <zerochaos <AT> gentoo <DOT> org>
AuthorDate: Wed Sep  9 16:32:27 2015 +0000
Commit:     Richard Farina <zerochaos <AT> gentoo <DOT> org>
CommitDate: Wed Sep  9 16:32:27 2015 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=d05808a7

only set CHOST in make.conf if we are setting it via catalyst to override the profile

this commit brings catalyst into compliance with the documentation which states that
chost should be set if the user wants to override the profile

This also avoids the ugly warning in make.conf about how dangerous it is to change
your chost

 catalyst/arch/amd64.py     |  7 -------
 catalyst/arch/x86.py       | 11 -----------
 catalyst/base/stagebase.py |  5 +++--
 3 files changed, 3 insertions(+), 20 deletions(-)

diff --git a/catalyst/arch/amd64.py b/catalyst/arch/amd64.py
index 1e11be9..463e8f5 100644
--- a/catalyst/arch/amd64.py
+++ b/catalyst/arch/amd64.py
@@ -12,7 +12,6 @@ class arch_amd64(generic_amd64):
 	def __init__(self,myspec):
 		generic_amd64.__init__(self,myspec)
 		self.settings["CFLAGS"]="-O2 -pipe"
-		self.settings["CHOST"]="x86_64-pc-linux-gnu"
 		#lines like this appears to be trying to set the profile default, better to use the profile
 		#self.settings["HOSTUSEEXPAND"]={"CPU_FLAGS_X86":["mmx","sse","sse2"]}
 
@@ -21,7 +20,6 @@ class arch_nocona(generic_amd64):
 	def __init__(self,myspec):
 		generic_amd64.__init__(self,myspec)
 		self.settings["CFLAGS"]="-O2 -march=nocona -pipe"
-		self.settings["CHOST"]="x86_64-pc-linux-gnu"
 		#self.settings["HOSTUSEEXPAND"]={"CPU_FLAGS_X86":["mmx","sse","sse2"]}
 
 # Requires gcc 4.3 to use this class
@@ -30,7 +28,6 @@ class arch_core2(generic_amd64):
 	def __init__(self,myspec):
 		generic_amd64.__init__(self,myspec)
 		self.settings["CFLAGS"]="-O2 -march=core2 -pipe"
-		self.settings["CHOST"]="x86_64-pc-linux-gnu"
 		#self.settings["HOSTUSEEXPAND"]={"CPU_FLAGS_X86":["mmx","sse","sse2","ssse3"]}
 
 class arch_k8(generic_amd64):
@@ -38,7 +35,6 @@ class arch_k8(generic_amd64):
 	def __init__(self,myspec):
 		generic_amd64.__init__(self,myspec)
 		self.settings["CFLAGS"]="-O2 -march=k8 -pipe"
-		self.settings["CHOST"]="x86_64-pc-linux-gnu"
 		#self.settings["HOSTUSEEXPAND"]={"CPU_FLAGS_X86":["mmx","sse","sse2","3dnow"]}
 
 class arch_k8_sse3(generic_amd64):
@@ -46,7 +42,6 @@ class arch_k8_sse3(generic_amd64):
 	def __init__(self,myspec):
 		generic_amd64.__init__(self,myspec)
 		self.settings["CFLAGS"]="-O2 -march=k8-sse3 -pipe"
-		self.settings["CHOST"]="x86_64-pc-linux-gnu"
 		#self.settings["HOSTUSEEXPAND"]={"CPU_FLAGS_X86":["mmx","sse","sse2","3dnow"]}
 
 class arch_amdfam10(generic_amd64):
@@ -54,7 +49,6 @@ class arch_amdfam10(generic_amd64):
 	def __init__(self,myspec):
 		generic_amd64.__init__(self,myspec)
 		self.settings["CFLAGS"]="-O2 -march=amdfam10 -pipe"
-		self.settings["CHOST"]="x86_64-pc-linux-gnu"
 		#self.settings["HOSTUSEEXPAND"]={"CPU_FLAGS_X86":["mmx","sse","sse2","3dnow"]}
 
 class arch_x32(generic_amd64):
@@ -62,7 +56,6 @@ class arch_x32(generic_amd64):
 	def __init__(self,myspec):
 		generic_amd64.__init__(self,myspec)
 		self.settings["CFLAGS"]="-O2 -pipe"
-		self.settings["CHOST"]="x86_64-pc-linux-gnux32"
 		#self.settings["HOSTUSEEXPAND"]={"CPU_FLAGS_X86":["mmx","sse","sse2"]}
 
 def register():

diff --git a/catalyst/arch/x86.py b/catalyst/arch/x86.py
index f0c4a4c..44a6a49 100644
--- a/catalyst/arch/x86.py
+++ b/catalyst/arch/x86.py
@@ -50,14 +50,12 @@ class arch_i686(generic_x86):
 	def __init__(self,myspec):
 		generic_x86.__init__(self,myspec)
 		self.settings["CFLAGS"]="-O2 -march=i686 -pipe"
-		self.settings["CHOST"]="i686-pc-linux-gnu"
 
 class arch_pentium_mmx(generic_x86):
 	"Intel Pentium MMX CPU with MMX support"
 	def __init__(self,myspec):
 		generic_x86.__init__(self,myspec)
 		self.settings["CFLAGS"]="-O2 -march=pentium-mmx -pipe"
-		self.settings["CHOST"]="i686-pc-linux-gnu"
 		self.settings["HOSTUSEEXPAND"]={"CPU_FLAGS_X86":["mmx"]}
 
 class arch_pentium2(generic_x86):
@@ -65,7 +63,6 @@ class arch_pentium2(generic_x86):
 	def __init__(self,myspec):
 		generic_x86.__init__(self,myspec)
 		self.settings["CFLAGS"]="-O2 -march=pentium2 -pipe"
-		self.settings["CHOST"]="i686-pc-linux-gnu"
 		self.settings["HOSTUSEEXPAND"]={"CPU_FLAGS_X86":["mmx"]}
 
 class arch_pentium3(generic_x86):
@@ -73,7 +70,6 @@ class arch_pentium3(generic_x86):
 	def __init__(self,myspec):
 		generic_x86.__init__(self,myspec)
 		self.settings["CFLAGS"]="-O2 -march=pentium3 -pipe"
-		self.settings["CHOST"]="i686-pc-linux-gnu"
 		self.settings["HOSTUSEEXPAND"]={"CPU_FLAGS_X86":["mmx","sse"]}
 
 class arch_pentium4(generic_x86):
@@ -81,7 +77,6 @@ class arch_pentium4(generic_x86):
 	def __init__(self,myspec):
 		generic_x86.__init__(self,myspec)
 		self.settings["CFLAGS"]="-O2 -march=pentium4 -pipe"
-		self.settings["CHOST"]="i686-pc-linux-gnu"
 		#lines like this appears to be trying to set the profile default, better to use the profile
 		#self.settings["HOSTUSEEXPAND"]={"CPU_FLAGS_X86":["mmx","sse","sse2"]}
 
@@ -90,7 +85,6 @@ class arch_pentium_m(generic_x86):
 	def __init__(self,myspec):
 		generic_x86.__init__(self,myspec)
 		self.settings["CFLAGS"]="-O2 -march=pentium-m -pipe"
-		self.settings["CHOST"]="i686-pc-linux-gnu"
 		#self.settings["HOSTUSEEXPAND"]={"CPU_FLAGS_X86":["mmx","sse","sse2"]}
 
 class arch_prescott(generic_x86):
@@ -98,7 +92,6 @@ class arch_prescott(generic_x86):
 	def __init__(self,myspec):
 		generic_x86.__init__(self,myspec)
 		self.settings["CFLAGS"]="-O2 -march=prescott -pipe"
-		self.settings["CHOST"]="i686-pc-linux-gnu"
 		#self.settings["HOSTUSEEXPAND"]={"CPU_FLAGS_X86":["mmx","sse","sse2"]}
 
 class arch_k6(generic_x86):
@@ -106,7 +99,6 @@ class arch_k6(generic_x86):
 	def __init__(self,myspec):
 		generic_x86.__init__(self,myspec)
 		self.settings["CFLAGS"]="-O2 -march=k6 -pipe"
-		self.settings["CHOST"]="i686-pc-linux-gnu"
 		self.settings["HOSTUSEEXPAND"]={"CPU_FLAGS_X86":["mmx"]}
 
 class arch_k6_2(generic_x86):
@@ -114,7 +106,6 @@ class arch_k6_2(generic_x86):
 	def __init__(self,myspec):
 		generic_x86.__init__(self,myspec)
 		self.settings["CFLAGS"]="-O2 -march=k6-2 -pipe"
-		self.settings["CHOST"]="i686-pc-linux-gnu"
 		self.settings["HOSTUSEEXPAND"]={"CPU_FLAGS_X86":["mmx","3dnow"]}
 
 class arch_athlon(generic_x86):
@@ -122,7 +113,6 @@ class arch_athlon(generic_x86):
 	def __init__(self,myspec):
 		generic_x86.__init__(self,myspec)
 		self.settings["CFLAGS"]="-O2 -march=athlon -pipe"
-		self.settings["CHOST"]="i686-pc-linux-gnu"
 		self.settings["HOSTUSEEXPAND"]={"CPU_FLAGS_X86":["mmx","3dnow"]}
 
 class arch_athlon_xp(generic_x86):
@@ -130,7 +120,6 @@ class arch_athlon_xp(generic_x86):
 	def __init__(self,myspec):
 		generic_x86.__init__(self,myspec)
 		self.settings["CFLAGS"]="-O2 -march=athlon-xp -pipe"
-		self.settings["CHOST"]="i686-pc-linux-gnu"
 		self.settings["HOSTUSEEXPAND"]={"CPU_FLAGS_X86":["mmx","3dnow","sse"]}
 
 def register():

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 60acd55..c6eaaa3 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -1119,8 +1119,9 @@ class StageBase(TargetBase, ClearBase, GenBase):
 				myf.write("# This should not be changed unless you know exactly what you are doing.  You\n# should probably be using a different stage, instead.\n")
 				myf.write('CBUILD="'+self.settings["CBUILD"]+'"\n')
 
-			myf.write("# WARNING: Changing your CHOST is not something that should be done lightly.\n# Please consult http://www.gentoo.org/doc/en/change-chost.xml before changing.\n")
-			myf.write('CHOST="'+self.settings["CHOST"]+'"\n')
+			if "CHOST" in self.settings:
+				myf.write("# WARNING: Changing your CHOST is not something that should be done lightly.\n# Please consult http://www.gentoo.org/doc/en/change-chost.xml before changing.\n")
+				myf.write('CHOST="'+self.settings["CHOST"]+'"\n')
 
 			""" Figure out what our USE vars are for building """
 			myusevars=[]


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/, catalyst/arch/
@ 2018-09-19 15:53 Ben Kohler
  0 siblings, 0 replies; 2+ messages in thread
From: Ben Kohler @ 2018-09-19 15:53 UTC (permalink / raw
  To: gentoo-commits

commit:     14a5425fdf918f7299706196a32ee3e722315376
Author:     Ben Kohler <bkohler <AT> gentoo <DOT> org>
AuthorDate: Wed Sep 19 15:42:11 2018 +0000
Commit:     Ben Kohler <bkohler <AT> gentoo <DOT> org>
CommitDate: Wed Sep 19 15:53:12 2018 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=14a5425f

First implementation of COMMON_FLAGS for make.conf

This introduces a new variable COMMON_FLAGS for make.conf.  In catalyst,
individual arches' arch/${arch}.py files will set COMMON_FLAGS and this
will be expanded to set default values for otherwise unset {C,CXX,F,FC}FLAGS.

Eg:

COMMON_FLAGS="-O2 -pipe"
CFLAGS="${COMMON_FLAGS}"
CXXFLAGS="${COMMON_FLAGS}"
FCFLAGS="${COMMON_FLAGS}"
FFLAGS="${COMMON_FLAGS}"

Individual (sub)arches can choose to set specific values for those other
*FLAGS and then they will not be set to ${COMMON_FLAGS}.

Implementation thanks to dwfreed.  Should resolve the following bugs:

https://bugs.gentoo.org/575446
https://bugs.gentoo.org/665758
https://bugs.gentoo.org/654080

 catalyst/arch/alpha.py     |  18 +++----
 catalyst/arch/amd64.py     |  14 ++---
 catalyst/arch/arm.py       |  28 +++++-----
 catalyst/arch/arm64.py     |   3 +-
 catalyst/arch/hppa.py      |   9 ++--
 catalyst/arch/ia64.py      |   3 +-
 catalyst/arch/m68k.py      |   4 +-
 catalyst/arch/mips.py      | 132 ++++++++++++++++++++++-----------------------
 catalyst/arch/powerpc.py   |  36 ++++++-------
 catalyst/arch/s390.py      |   4 +-
 catalyst/arch/sh.py        |  24 ++++-----
 catalyst/arch/sparc.py     |   4 +-
 catalyst/arch/x86.py       |  30 +++++------
 catalyst/base/stagebase.py |  14 ++---
 14 files changed, 160 insertions(+), 163 deletions(-)

diff --git a/catalyst/arch/alpha.py b/catalyst/arch/alpha.py
index a4e7cafa..813b0020 100644
--- a/catalyst/arch/alpha.py
+++ b/catalyst/arch/alpha.py
@@ -7,55 +7,55 @@ class generic_alpha(builder.generic):
 	"abstract base class for all alpha builders"
 	def __init__(self,myspec):
 		builder.generic.__init__(self,myspec)
-		self.settings["CFLAGS"]="-mieee -pipe"
+		self.settings["COMMON_FLAGS"]="-mieee -pipe"
 
 class arch_alpha(generic_alpha):
 	"builder class for generic alpha (ev4+)"
 	def __init__(self,myspec):
 		generic_alpha.__init__(self,myspec)
-		self.settings["CFLAGS"]+=" -O2 -mcpu=ev4"
+		self.settings["COMMON_FLAGS"]+=" -O2 -mcpu=ev4"
 		self.settings["CHOST"]="alpha-unknown-linux-gnu"
 
 class arch_ev4(generic_alpha):
 	"builder class for alpha ev4"
 	def __init__(self,myspec):
 		generic_alpha.__init__(self,myspec)
-		self.settings["CFLAGS"]+=" -O2 -mcpu=ev4"
+		self.settings["COMMON_FLAGS"]+=" -O2 -mcpu=ev4"
 		self.settings["CHOST"]="alphaev4-unknown-linux-gnu"
 
 class arch_ev45(generic_alpha):
 	"builder class for alpha ev45"
 	def __init__(self,myspec):
 		generic_alpha.__init__(self,myspec)
-		self.settings["CFLAGS"]+=" -O2 -mcpu=ev45"
+		self.settings["COMMON_FLAGS"]+=" -O2 -mcpu=ev45"
 		self.settings["CHOST"]="alphaev45-unknown-linux-gnu"
 
 class arch_ev5(generic_alpha):
 	"builder class for alpha ev5"
 	def __init__(self,myspec):
 		generic_alpha.__init__(self,myspec)
-		self.settings["CFLAGS"]+=" -O2 -mcpu=ev5"
+		self.settings["COMMON_FLAGS"]+=" -O2 -mcpu=ev5"
 		self.settings["CHOST"]="alphaev5-unknown-linux-gnu"
 
 class arch_ev56(generic_alpha):
 	"builder class for alpha ev56 (ev5 plus BWX)"
 	def __init__(self,myspec):
 		generic_alpha.__init__(self,myspec)
-		self.settings["CFLAGS"]+=" -O2 -mcpu=ev56"
+		self.settings["COMMON_FLAGS"]+=" -O2 -mcpu=ev56"
 		self.settings["CHOST"]="alphaev56-unknown-linux-gnu"
 
 class arch_pca56(generic_alpha):
 	"builder class for alpha pca56 (ev5 plus BWX & MAX)"
 	def __init__(self,myspec):
 		generic_alpha.__init__(self,myspec)
-		self.settings["CFLAGS"]+=" -O2 -mcpu=pca56"
+		self.settings["COMMON_FLAGS"]+=" -O2 -mcpu=pca56"
 		self.settings["CHOST"]="alphaev56-unknown-linux-gnu"
 
 class arch_ev6(generic_alpha):
 	"builder class for alpha ev6"
 	def __init__(self,myspec):
 		generic_alpha.__init__(self,myspec)
-		self.settings["CFLAGS"]+=" -O2 -mcpu=ev6"
+		self.settings["COMMON_FLAGS"]+=" -O2 -mcpu=ev6"
 		self.settings["CHOST"]="alphaev6-unknown-linux-gnu"
 		self.settings["HOSTUSE"]=["ev6"]
 
@@ -63,7 +63,7 @@ class arch_ev67(generic_alpha):
 	"builder class for alpha ev67 (ev6 plus CIX)"
 	def __init__(self,myspec):
 		generic_alpha.__init__(self,myspec)
-		self.settings["CFLAGS"]+=" -O2 -mcpu=ev67"
+		self.settings["COMMON_FLAGS"]+=" -O2 -mcpu=ev67"
 		self.settings["CHOST"]="alphaev67-unknown-linux-gnu"
 		self.settings["HOSTUSE"]=["ev6"]
 

diff --git a/catalyst/arch/amd64.py b/catalyst/arch/amd64.py
index 1d9db0e3..73bf8b18 100644
--- a/catalyst/arch/amd64.py
+++ b/catalyst/arch/amd64.py
@@ -10,7 +10,7 @@ class arch_amd64(generic_amd64):
 	"builder class for generic amd64 (Intel and AMD)"
 	def __init__(self,myspec):
 		generic_amd64.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -pipe"
 		#lines like this appears to be trying to set the profile default, better to use the profile
 		#self.settings["HOSTUSEEXPAND"]={"CPU_FLAGS_X86":["mmx","sse","sse2"]}
 
@@ -18,7 +18,7 @@ class arch_nocona(generic_amd64):
 	"improved version of Intel Pentium 4 CPU with 64-bit extensions, MMX, SSE, SSE2 and SSE3 support"
 	def __init__(self,myspec):
 		generic_amd64.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -march=nocona -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -march=nocona -pipe"
 		#self.settings["HOSTUSEEXPAND"]={"CPU_FLAGS_X86":["mmx","sse","sse2"]}
 
 # Requires gcc 4.3 to use this class
@@ -26,35 +26,35 @@ class arch_core2(generic_amd64):
 	"Intel Core 2 CPU with 64-bit extensions, MMX, SSE, SSE2, SSE3 and SSSE3 support"
 	def __init__(self,myspec):
 		generic_amd64.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -march=core2 -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -march=core2 -pipe"
 		#self.settings["HOSTUSEEXPAND"]={"CPU_FLAGS_X86":["mmx","sse","sse2","ssse3"]}
 
 class arch_k8(generic_amd64):
 	"generic k8, opteron and athlon64 support"
 	def __init__(self,myspec):
 		generic_amd64.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -march=k8 -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -march=k8 -pipe"
 		#self.settings["HOSTUSEEXPAND"]={"CPU_FLAGS_X86":["mmx","sse","sse2","3dnow"]}
 
 class arch_k8_sse3(generic_amd64):
 	"improved versions of k8, opteron and athlon64 with SSE3 support"
 	def __init__(self,myspec):
 		generic_amd64.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -march=k8-sse3 -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -march=k8-sse3 -pipe"
 		#self.settings["HOSTUSEEXPAND"]={"CPU_FLAGS_X86":["mmx","sse","sse2","3dnow"]}
 
 class arch_amdfam10(generic_amd64):
 	"AMD Family 10h core based CPUs with x86-64 instruction set support"
 	def __init__(self,myspec):
 		generic_amd64.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -march=amdfam10 -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -march=amdfam10 -pipe"
 		#self.settings["HOSTUSEEXPAND"]={"CPU_FLAGS_X86":["mmx","sse","sse2","3dnow"]}
 
 class arch_x32(generic_amd64):
 	"builder class for generic x32 (Intel and AMD)"
 	def __init__(self,myspec):
 		generic_amd64.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -pipe"
 		#self.settings["HOSTUSEEXPAND"]={"CPU_FLAGS_X86":["mmx","sse","sse2"]}
 
 def register():

diff --git a/catalyst/arch/arm.py b/catalyst/arch/arm.py
index 05146f18..4b0efd8f 100644
--- a/catalyst/arch/arm.py
+++ b/catalyst/arch/arm.py
@@ -6,13 +6,13 @@ class generic_arm(builder.generic):
 	"Abstract base class for all arm (little endian) builders"
 	def __init__(self,myspec):
 		builder.generic.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -pipe"
 
 class generic_armeb(builder.generic):
 	"Abstract base class for all arm (big endian) builders"
 	def __init__(self,myspec):
 		builder.generic.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -pipe"
 
 class arch_arm(generic_arm):
 	"Builder class for arm (little endian) target"
@@ -31,83 +31,83 @@ class arch_armv4l(generic_arm):
 	def __init__(self,myspec):
 		generic_arm.__init__(self,myspec)
 		self.settings["CHOST"]="armv4l-unknown-linux-gnu"
-		self.settings["CFLAGS"]+=" -march=armv4"
+		self.settings["COMMON_FLAGS"]+=" -march=armv4"
 
 class arch_armv4tl(generic_arm):
 	"Builder class for armv4tl target"
 	def __init__(self,myspec):
 		generic_arm.__init__(self,myspec)
 		self.settings["CHOST"]="armv4tl-softfloat-linux-gnueabi"
-		self.settings["CFLAGS"]+=" -march=armv4t"
+		self.settings["COMMON_FLAGS"]+=" -march=armv4t"
 
 class arch_armv5tl(generic_arm):
 	"Builder class for armv5tl target"
 	def __init__(self,myspec):
 		generic_arm.__init__(self,myspec)
 		self.settings["CHOST"]="armv5tl-softfloat-linux-gnueabi"
-		self.settings["CFLAGS"]+=" -march=armv5t"
+		self.settings["COMMON_FLAGS"]+=" -march=armv5t"
 
 class arch_armv5tel(generic_arm):
 	"Builder class for armv5tel target"
 	def __init__(self,myspec):
 		generic_arm.__init__(self,myspec)
 		self.settings["CHOST"]="armv5tel-softfloat-linux-gnueabi"
-		self.settings["CFLAGS"]+=" -march=armv5te"
+		self.settings["COMMON_FLAGS"]+=" -march=armv5te"
 
 class arch_armv5tejl(generic_arm):
 	"Builder class for armv5tejl target"
 	def __init__(self,myspec):
 		generic_arm.__init__(self,myspec)
 		self.settings["CHOST"]="armv5tejl-softfloat-linux-gnueabi"
-		self.settings["CFLAGS"]+=" -march=armv5te"
+		self.settings["COMMON_FLAGS"]+=" -march=armv5te"
 
 class arch_armv6j(generic_arm):
 	"Builder class for armv6j target"
 	def __init__(self,myspec):
 		generic_arm.__init__(self,myspec)
 		self.settings["CHOST"]="armv6j-softfp-linux-gnueabi"
-		self.settings["CFLAGS"]+=" -march=armv6j -mfpu=vfp -mfloat-abi=softfp"
+		self.settings["COMMON_FLAGS"]+=" -march=armv6j -mfpu=vfp -mfloat-abi=softfp"
 
 class arch_armv6z(generic_arm):
 	"Builder class for armv6z target"
 	def __init__(self,myspec):
 		generic_arm.__init__(self,myspec)
 		self.settings["CHOST"]="armv6z-softfp-linux-gnueabi"
-		self.settings["CFLAGS"]+=" -march=armv6z -mfpu=vfp -mfloat-abi=softfp"
+		self.settings["COMMON_FLAGS"]+=" -march=armv6z -mfpu=vfp -mfloat-abi=softfp"
 
 class arch_armv6zk(generic_arm):
 	"Builder class for armv6zk target"
 	def __init__(self,myspec):
 		generic_arm.__init__(self,myspec)
 		self.settings["CHOST"]="armv6zk-softfp-linux-gnueabi"
-		self.settings["CFLAGS"]+=" -march=armv6zk -mfpu=vfp -mfloat-abi=softfp"
+		self.settings["COMMON_FLAGS"]+=" -march=armv6zk -mfpu=vfp -mfloat-abi=softfp"
 
 class arch_armv7a(generic_arm):
 	"Builder class for armv7a target"
 	def __init__(self,myspec):
 		generic_arm.__init__(self,myspec)
 		self.settings["CHOST"]="armv7a-softfp-linux-gnueabi"
-		self.settings["CFLAGS"]+=" -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=softfp"
+		self.settings["COMMON_FLAGS"]+=" -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=softfp"
 
 class arch_armv6j_hardfp(generic_arm):
 	"Builder class for armv6j hardfloat target, needs >=gcc-4.5"
 	def __init__(self,myspec):
 		generic_arm.__init__(self,myspec)
 		self.settings["CHOST"]="armv6j-hardfloat-linux-gnueabi"
-		self.settings["CFLAGS"]+=" -march=armv6j -mfpu=vfp -mfloat-abi=hard"
+		self.settings["COMMON_FLAGS"]+=" -march=armv6j -mfpu=vfp -mfloat-abi=hard"
 
 class arch_armv7a_hardfp(generic_arm):
 	"Builder class for armv7a hardfloat target, needs >=gcc-4.5"
 	def __init__(self,myspec):
 		generic_arm.__init__(self,myspec)
 		self.settings["CHOST"]="armv7a-hardfloat-linux-gnueabi"
-		self.settings["CFLAGS"]+=" -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard"
+		self.settings["COMMON_FLAGS"]+=" -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard"
 
 class arch_armv5teb(generic_armeb):
 	"Builder class for armv5teb (XScale) target"
 	def __init__(self,myspec):
 		generic_armeb.__init__(self,myspec)
-		self.settings["CFLAGS"]+=" -mcpu=xscale"
+		self.settings["COMMON_FLAGS"]+=" -mcpu=xscale"
 		self.settings["CHOST"]="armv5teb-softfloat-linux-gnueabi"
 
 def register():

diff --git a/catalyst/arch/arm64.py b/catalyst/arch/arm64.py
index c12a0a0e..9a223834 100644
--- a/catalyst/arch/arm64.py
+++ b/catalyst/arch/arm64.py
@@ -5,8 +5,7 @@ class arch_arm64(builder.generic):
 	"builder class for arm64"
 	def __init__(self,myspec):
 		builder.generic.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -pipe"
-		self.settings["CFLAGS"]="-O2 -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -pipe"
 		self.settings["CHOST"]="aarch64-unknown-linux-gnu"
 
 def register():

diff --git a/catalyst/arch/hppa.py b/catalyst/arch/hppa.py
index 6e969097..b3c5c931 100644
--- a/catalyst/arch/hppa.py
+++ b/catalyst/arch/hppa.py
@@ -5,28 +5,27 @@ class generic_hppa(builder.generic):
 	"Abstract base class for all hppa builders"
 	def __init__(self,myspec):
 		builder.generic.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -pipe"
-		self.settings["CXXFLAGS"]="-O2 -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -pipe"
 
 class arch_hppa(generic_hppa):
 	"Builder class for hppa systems"
 	def __init__(self,myspec):
 		generic_hppa.__init__(self,myspec)
-		self.settings["CFLAGS"]+=" -march=1.0"
+		self.settings["COMMON_FLAGS"]+=" -march=1.0"
 		self.settings["CHOST"]="hppa-unknown-linux-gnu"
 
 class arch_hppa1_1(generic_hppa):
 	"Builder class for hppa 1.1 systems"
 	def __init__(self,myspec):
 		generic_hppa.__init__(self,myspec)
-		self.settings["CFLAGS"]+=" -march=1.1"
+		self.settings["COMMON_FLAGS"]+=" -march=1.1"
 		self.settings["CHOST"]="hppa1.1-unknown-linux-gnu"
 
 class arch_hppa2_0(generic_hppa):
 	"Builder class for hppa 2.0 systems"
 	def __init__(self,myspec):
 		generic_hppa.__init__(self,myspec)
-		self.settings["CFLAGS"]+=" -march=2.0"
+		self.settings["COMMON_FLAGS"]+=" -march=2.0"
 		self.settings["CHOST"]="hppa2.0-unknown-linux-gnu"
 
 def register():

diff --git a/catalyst/arch/ia64.py b/catalyst/arch/ia64.py
index de0ec9ed..49b17c46 100644
--- a/catalyst/arch/ia64.py
+++ b/catalyst/arch/ia64.py
@@ -5,8 +5,7 @@ class arch_ia64(builder.generic):
 	"builder class for ia64"
 	def __init__(self,myspec):
 		builder.generic.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -pipe"
-		self.settings["CFLAGS"]="-O2 -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -pipe"
 		self.settings["CHOST"]="ia64-unknown-linux-gnu"
 
 def register():

diff --git a/catalyst/arch/m68k.py b/catalyst/arch/m68k.py
index 9fc10839..de127fb4 100644
--- a/catalyst/arch/m68k.py
+++ b/catalyst/arch/m68k.py
@@ -5,13 +5,13 @@ class generic_m68k(builder.generic):
 	"abstract base class for all m68k builders"
 	def __init__(self,myspec):
 		builder.generic.__init__(self,myspec)
-		self.settings["CFLAGS"]=" -pipe"
+		self.settings["COMMON_FLAGS"]=" -pipe"
 
 class arch_m68k(generic_m68k):
 	"builder class for generic m68k"
 	def __init__(self,myspec):
 		generic_m68k.__init__(self,myspec)
-		self.settings["CFLAGS"]+=" -O2"
+		self.settings["COMMON_FLAGS"]+=" -O2"
 		self.settings["CHOST"]="m68k-unknown-linux-gnu"
 
 def register():

diff --git a/catalyst/arch/mips.py b/catalyst/arch/mips.py
index 9682bf26..1ac6f85d 100644
--- a/catalyst/arch/mips.py
+++ b/catalyst/arch/mips.py
@@ -29,402 +29,402 @@ class arch_mips1(generic_mips):
 	"Builder class for MIPS I [Big-endian]"
 	def __init__(self,myspec):
 		generic_mips.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -march=mips1 -mabi=32 -mplt -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -march=mips1 -mabi=32 -mplt -pipe"
 
 class arch_mips2(generic_mips):
 	"Builder class for MIPS II [Big-endian]"
 	def __init__(self,myspec):
 		generic_mips.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -march=mips2 -mabi=32 -mplt -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -march=mips2 -mabi=32 -mplt -pipe"
 
 class arch_mips32(generic_mips):
 	"Builder class for MIPS 32 [Big-endian]"
 	def __init__(self,myspec):
 		generic_mips.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -march=mips32 -mabi=32 -mplt -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -march=mips32 -mabi=32 -mplt -pipe"
 
 class arch_mips32_softfloat(generic_mips):
 	"Builder class for MIPS 32 [Big-endian softfloat]"
 	def __init__(self,myspec):
 		generic_mips.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -march=mips32 -mabi=32 -mplt -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -march=mips32 -mabi=32 -mplt -pipe"
 		self.settings["CHOST"]="mips-softfloat-linux-gnu"
 
 class arch_mips32r2(generic_mips):
 	"Builder class for MIPS 32r2 [Big-endian]"
 	def __init__(self,myspec):
 		generic_mips.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -march=mips32r2 -mabi=32 -mplt -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -march=mips32r2 -mabi=32 -mplt -pipe"
 
 class arch_mips32r2_softfloat(generic_mips):
 	"Builder class for MIPS 32r2 [Big-endian softfloat]"
 	def __init__(self,myspec):
 		generic_mips.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -march=mips32r2 -mabi=32 -mplt -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -march=mips32r2 -mabi=32 -mplt -pipe"
 		self.settings["CHOST"]="mips-softfloat-linux-gnu"
 
 class arch_mips3(generic_mips):
 	"Builder class for MIPS III [Big-endian]"
 	def __init__(self,myspec):
 		generic_mips.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -march=mips3 -mabi=32 -mplt -mfix-r4000 -mfix-r4400 -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -march=mips3 -mabi=32 -mplt -mfix-r4000 -mfix-r4400 -pipe"
 
 class arch_mips3_n32(generic_mips64):
 	"Builder class for MIPS III [Big-endian N32]"
 	def __init__(self,myspec):
 		generic_mips64.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -march=mips3 -mabi=n32 -mplt -mfix-r4000 -mfix-r4400 -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -march=mips3 -mabi=n32 -mplt -mfix-r4000 -mfix-r4400 -pipe"
 
 class arch_mips3_n64(generic_mips64):
 	"Builder class for MIPS III [Big-endian N64]"
 	def __init__(self,myspec):
 		generic_mips64.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -march=mips3 -mabi=64 -mfix-r4000 -mfix-r4400 -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -march=mips3 -mabi=64 -mfix-r4000 -mfix-r4400 -pipe"
 
 class arch_mips3_multilib(generic_mips64):
 	"Builder class for MIPS III [Big-endian multilib]"
 	def __init__(self,myspec):
 		generic_mips64.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -march=mips3 -mplt -mfix-r4000 -mfix-r4400 -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -march=mips3 -mplt -mfix-r4000 -mfix-r4400 -pipe"
 
 class arch_mips4(generic_mips):
 	"Builder class for MIPS IV [Big-endian]"
 	def __init__(self,myspec):
 		generic_mips.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -march=mips4 -mabi=32 -mplt -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -march=mips4 -mabi=32 -mplt -pipe"
 
 class arch_mips4_n32(generic_mips64):
 	"Builder class for MIPS IV [Big-endian N32]"
 	def __init__(self,myspec):
 		generic_mips64.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -march=mips4 -mabi=n32 -mplt -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -march=mips4 -mabi=n32 -mplt -pipe"
 
 class arch_mips4_n64(generic_mips64):
 	"Builder class for MIPS IV [Big-endian N64]"
 	def __init__(self,myspec):
 		generic_mips64.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -march=mips4 -mabi=64 -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -march=mips4 -mabi=64 -pipe"
 
 class arch_mips4_multilib(generic_mips64):
 	"Builder class for MIPS IV [Big-endian multilib]"
 	def __init__(self,myspec):
 		generic_mips64.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -march=mips4 -mplt -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -march=mips4 -mplt -pipe"
 
 class arch_mips4_r10k(generic_mips):
 	"Builder class for MIPS IV R10k [Big-endian]"
 	def __init__(self,myspec):
 		generic_mips.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -march=r10k -mabi=32 -mplt -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -march=r10k -mabi=32 -mplt -pipe"
 
 class arch_mips4_r10k_n32(generic_mips64):
 	"Builder class for MIPS IV R10k [Big-endian N32]"
 	def __init__(self,myspec):
 		generic_mips64.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -march=r10k -mabi=n32 -mplt -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -march=r10k -mabi=n32 -mplt -pipe"
 
 class arch_mips4_r10k_n64(generic_mips64):
 	"Builder class for MIPS IV R10k [Big-endian N64]"
 	def __init__(self,myspec):
 		generic_mips64.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -march=r10k -mabi=64 -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -march=r10k -mabi=64 -pipe"
 
 class arch_mips4_r10k_multilib(generic_mips64):
 	"Builder class for MIPS IV R10k [Big-endian multilib]"
 	def __init__(self,myspec):
 		generic_mips64.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -march=r10k -mplt -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -march=r10k -mplt -pipe"
 
 class arch_mips4_r12k(generic_mips):
 	"Builder class for MIPS IV R12k/R14k/R16k [Big-endian]"
 	def __init__(self,myspec):
 		generic_mips.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -march=r12k -mno-fix-r10000 -mabi=32 -mplt -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -march=r12k -mno-fix-r10000 -mabi=32 -mplt -pipe"
 
 class arch_mips4_r12k_n32(generic_mips64):
 	"Builder class for MIPS IV R12k/R14k/R16k [Big-endian N32]"
 	def __init__(self,myspec):
 		generic_mips64.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -march=r12k -mno-fix-r10000 -mabi=n32 -mplt -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -march=r12k -mno-fix-r10000 -mabi=n32 -mplt -pipe"
 
 class arch_mips4_r12k_n64(generic_mips64):
 	"Builder class for MIPS IV R12k/R14k/R16k [Big-endian N64]"
 	def __init__(self,myspec):
 		generic_mips64.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -march=r12k -mno-fix-r10000 -mabi=64 -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -march=r12k -mno-fix-r10000 -mabi=64 -pipe"
 
 class arch_mips4_r12k_multilib(generic_mips64):
 	"Builder class for MIPS IV R12k/R14k/R16k [Big-endian multilib]"
 	def __init__(self,myspec):
 		generic_mips64.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -march=r12k -mno-fix-r10000 -mplt -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -march=r12k -mno-fix-r10000 -mplt -pipe"
 
 class arch_mips64(generic_mips):
 	"Builder class for MIPS 64 [Big-endian]"
 	def __init__(self,myspec):
 		generic_mips.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -march=mips64 -mabi=32 -mplt -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -march=mips64 -mabi=32 -mplt -pipe"
 
 class arch_mips64_n32(generic_mips64):
 	"Builder class for MIPS 64 [Big-endian N32]"
 	def __init__(self,myspec):
 		generic_mips64.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -march=mips64 -mabi=n32 -mplt -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -march=mips64 -mabi=n32 -mplt -pipe"
 
 class arch_mips64_n64(generic_mips64):
 	"Builder class for MIPS 64 [Big-endian N64]"
 	def __init__(self,myspec):
 		generic_mips64.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -march=mips64 -mabi=64 -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -march=mips64 -mabi=64 -pipe"
 
 class arch_mips64_multilib(generic_mips64):
 	"Builder class for MIPS 64 [Big-endian multilib]"
 	def __init__(self,myspec):
 		generic_mips64.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -march=mips64 -mplt -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -march=mips64 -mplt -pipe"
 
 class arch_mips64r2(generic_mips):
 	"Builder class for MIPS 64r2 [Big-endian]"
 	def __init__(self,myspec):
 		generic_mips.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -march=mips64r2 -mabi=32 -mplt -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -march=mips64r2 -mabi=32 -mplt -pipe"
 
 class arch_mips64r2_n32(generic_mips64):
 	"Builder class for MIPS 64r2 [Big-endian N32]"
 	def __init__(self,myspec):
 		generic_mips64.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -march=mips64r2 -mabi=n32 -mplt -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -march=mips64r2 -mabi=n32 -mplt -pipe"
 
 class arch_mips64r2_n64(generic_mips64):
 	"Builder class for MIPS 64r2 [Big-endian N64]"
 	def __init__(self,myspec):
 		generic_mips64.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -march=mips64r2 -mabi=64 -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -march=mips64r2 -mabi=64 -pipe"
 
 class arch_mips64r2_multilib(generic_mips64):
 	"Builder class for MIPS 64r2 [Big-endian multilib]"
 	def __init__(self,myspec):
 		generic_mips64.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -march=mips64r2 -mplt -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -march=mips64r2 -mplt -pipe"
 
 class arch_mipsel1(generic_mipsel):
 	"Builder class for MIPS I [Little-endian]"
 	def __init__(self,myspec):
 		generic_mipsel.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -march=mips1 -mabi=32 -mplt -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -march=mips1 -mabi=32 -mplt -pipe"
 
 class arch_mipsel2(generic_mipsel):
 	"Builder class for MIPS II [Little-endian]"
 	def __init__(self,myspec):
 		generic_mipsel.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -march=mips2 -mabi=32 -mplt -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -march=mips2 -mabi=32 -mplt -pipe"
 
 class arch_mips32el(generic_mipsel):
 	"Builder class for MIPS 32 [Little-endian]"
 	def __init__(self,myspec):
 		generic_mipsel.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -march=mips32 -mabi=32 -mplt -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -march=mips32 -mabi=32 -mplt -pipe"
 
 class arch_mips32el_softfloat(generic_mipsel):
 	"Builder class for MIPS 32 [Little-endian softfloat]"
 	def __init__(self,myspec):
 		generic_mipsel.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -march=mips32 -mabi=32 -mplt -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -march=mips32 -mabi=32 -mplt -pipe"
 		self.settings["CHOST"]="mipsel-softfloat-linux-gnu"
 
 class arch_mips32r2el(generic_mipsel):
 	"Builder class for MIPS 32r2 [Little-endian]"
 	def __init__(self,myspec):
 		generic_mipsel.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -march=mips32r2 -mabi=32 -mplt -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -march=mips32r2 -mabi=32 -mplt -pipe"
 
 class arch_mips32r2el_softfloat(generic_mipsel):
 	"Builder class for MIPS 32r2 [Little-endian softfloat]"
 	def __init__(self,myspec):
 		generic_mipsel.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -march=mips32r2 -mabi=32 -mplt -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -march=mips32r2 -mabi=32 -mplt -pipe"
 		self.settings["CHOST"]="mipsel-softfloat-linux-gnu"
 
 class arch_mipsel3(generic_mipsel):
 	"Builder class for MIPS III [Little-endian]"
 	def __init__(self,myspec):
 		generic_mipsel.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -march=mips3 -mabi=32 -mplt -Wa,-mfix-loongson2f-nop -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -march=mips3 -mabi=32 -mplt -Wa,-mfix-loongson2f-nop -pipe"
 
 class arch_mipsel3_n32(generic_mips64el):
 	"Builder class for MIPS III [Little-endian N32]"
 	def __init__(self,myspec):
 		generic_mips64el.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -march=mips3 -mabi=n32 -mplt -Wa,-mfix-loongson2f-nop -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -march=mips3 -mabi=n32 -mplt -Wa,-mfix-loongson2f-nop -pipe"
 
 class arch_mipsel3_n64(generic_mips64el):
 	"Builder class for MIPS III [Little-endian N64]"
 	def __init__(self,myspec):
 		generic_mips64el.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -march=mips3 -mabi=64 -Wa,-mfix-loongson2f-nop -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -march=mips3 -mabi=64 -Wa,-mfix-loongson2f-nop -pipe"
 
 class arch_mipsel3_multilib(generic_mips64el):
 	"Builder class for MIPS III [Little-endian multilib]"
 	def __init__(self,myspec):
 		generic_mips64el.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -march=mips3 -mplt -Wa,-mfix-loongson2f-nop -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -march=mips3 -mplt -Wa,-mfix-loongson2f-nop -pipe"
 
 class arch_loongson2e(generic_mipsel):
 	"Builder class for Loongson 2E [Little-endian]"
 	def __init__(self,myspec):
 		generic_mipsel.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -march=loongson2e -mabi=32 -mplt -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -march=loongson2e -mabi=32 -mplt -pipe"
 
 class arch_loongson2e_n32(generic_mips64el):
 	"Builder class for Loongson 2E [Little-endian N32]"
 	def __init__(self,myspec):
 		generic_mips64el.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -march=loongson2e -mabi=n32 -mplt -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -march=loongson2e -mabi=n32 -mplt -pipe"
 
 class arch_loongson2e_n64(generic_mips64el):
 	"Builder class for Loongson 2E [Little-endian N64]"
 	def __init__(self,myspec):
 		generic_mips64el.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -march=loongson2e -mabi=64 -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -march=loongson2e -mabi=64 -pipe"
 
 class arch_loongson2e_multilib(generic_mips64el):
 	"Builder class for Loongson 2E [Little-endian multilib]"
 	def __init__(self,myspec):
 		generic_mips64el.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -march=loongson2e -mplt -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -march=loongson2e -mplt -pipe"
 
 class arch_loongson2f(generic_mipsel):
 	"Builder class for Loongson 2F [Little-endian]"
 	def __init__(self,myspec):
 		generic_mipsel.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -march=loongson2f -mabi=32 -mplt -Wa,-mfix-loongson2f-nop -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -march=loongson2f -mabi=32 -mplt -Wa,-mfix-loongson2f-nop -pipe"
 
 class arch_loongson2f_n32(generic_mips64el):
 	"Builder class for Loongson 2F [Little-endian N32]"
 	def __init__(self,myspec):
 		generic_mips64el.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -march=loongson2f -mabi=n32 -mplt -Wa,-mfix-loongson2f-nop -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -march=loongson2f -mabi=n32 -mplt -Wa,-mfix-loongson2f-nop -pipe"
 
 class arch_loongson2f_n64(generic_mips64el):
 	"Builder class for Loongson 2F [Little-endian N64]"
 	def __init__(self,myspec):
 		generic_mips64el.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -march=loongson2f -mabi=64 -Wa,-mfix-loongson2f-nop -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -march=loongson2f -mabi=64 -Wa,-mfix-loongson2f-nop -pipe"
 
 class arch_loongson2f_multilib(generic_mips64el):
 	"Builder class for Loongson 2F [Little-endian multilib]"
 	def __init__(self,myspec):
 		generic_mips64el.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -march=loongson2f -mplt -Wa,-mfix-loongson2f-nop -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -march=loongson2f -mplt -Wa,-mfix-loongson2f-nop -pipe"
 
 class arch_mipsel4(generic_mipsel):
 	"Builder class for MIPS IV [Little-endian]"
 	def __init__(self,myspec):
 		generic_mipsel.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -march=mips4 -mabi=32 -mplt -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -march=mips4 -mabi=32 -mplt -pipe"
 
 class arch_mipsel4_n32(generic_mips64el):
 	"Builder class for MIPS IV [Little-endian N32]"
 	def __init__(self,myspec):
 		generic_mips64el.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -march=mips4 -mabi=n32 -mplt -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -march=mips4 -mabi=n32 -mplt -pipe"
 
 class arch_mipsel4_n64(generic_mips64el):
 	"Builder class for MIPS IV [Little-endian N64]"
 	def __init__(self,myspec):
 		generic_mips64el.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -march=mips4 -mabi=64 -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -march=mips4 -mabi=64 -pipe"
 
 class arch_mipsel4_multilib(generic_mips64el):
 	"Builder class for MIPS IV [Little-endian multilib]"
 	def __init__(self,myspec):
 		generic_mips64el.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -march=mips4 -mplt -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -march=mips4 -mplt -pipe"
 
 class arch_mips64el(generic_mipsel):
 	"Builder class for MIPS 64 [Little-endian]"
 	def __init__(self,myspec):
 		generic_mipsel.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -march=mips64 -mabi=32 -mplt -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -march=mips64 -mabi=32 -mplt -pipe"
 
 class arch_mips64el_n32(generic_mips64el):
 	"Builder class for MIPS 64 [Little-endian N32]"
 	def __init__(self,myspec):
 		generic_mips64el.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -march=mips64 -mabi=n32 -mplt -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -march=mips64 -mabi=n32 -mplt -pipe"
 
 class arch_mips64el_n64(generic_mips64el):
 	"Builder class for MIPS 64 [Little-endian N64]"
 	def __init__(self,myspec):
 		generic_mips64el.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -march=mips64 -mabi=64 -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -march=mips64 -mabi=64 -pipe"
 
 class arch_mips64el_multilib(generic_mips64el):
 	"Builder class for MIPS 64 [Little-endian multilib]"
 	def __init__(self,myspec):
 		generic_mips64el.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -march=mips64 -mplt -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -march=mips64 -mplt -pipe"
 
 class arch_mips64r2el(generic_mipsel):
 	"Builder class for MIPS 64r2 [Little-endian]"
 	def __init__(self,myspec):
 		generic_mipsel.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -march=mips64r2 -mabi=32 -mplt -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -march=mips64r2 -mabi=32 -mplt -pipe"
 
 class arch_mips64r2el_n32(generic_mips64el):
 	"Builder class for MIPS 64r2 [Little-endian N32]"
 	def __init__(self,myspec):
 		generic_mips64el.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -march=mips64r2 -mabi=n32 -mplt -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -march=mips64r2 -mabi=n32 -mplt -pipe"
 
 class arch_mips64r2el_n64(generic_mips64el):
 	"Builder class for MIPS 64r2 [Little-endian N64]"
 	def __init__(self,myspec):
 		generic_mips64el.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -march=mips64r2 -mabi=64 -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -march=mips64r2 -mabi=64 -pipe"
 
 class arch_mips64r2el_multilib(generic_mips64el):
 	"Builder class for MIPS 64r2 [Little-endian multilib]"
 	def __init__(self,myspec):
 		generic_mips64el.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -march=mips64r2 -mplt -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -march=mips64r2 -mplt -pipe"
 
 class arch_loongson3a(generic_mipsel):
 	"Builder class for Loongson 3A [Little-endian]"
 	def __init__(self,myspec):
 		generic_mipsel.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -march=loongson3a -mabi=32 -mplt -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -march=loongson3a -mabi=32 -mplt -pipe"
 
 class arch_loongson3a_n32(generic_mips64el):
 	"Builder class for Loongson 3A [Little-endian N32]"
 	def __init__(self,myspec):
 		generic_mips64el.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -march=loongson3a -mabi=n32 -mplt -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -march=loongson3a -mabi=n32 -mplt -pipe"
 
 class arch_loongson3a_n64(generic_mips64el):
 	"Builder class for Loongson 3A [Little-endian N64]"
 	def __init__(self,myspec):
 		generic_mips64el.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -march=loongson3a -mabi=64 -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -march=loongson3a -mabi=64 -pipe"
 
 class arch_loongson3a_multilib(generic_mips64el):
 	"Builder class for Loongson 3A [Little-endian multilib]"
 	def __init__(self,myspec):
 		generic_mips64el.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -march=loongson3a -mplt -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -march=loongson3a -mplt -pipe"
 
 class arch_cobalt(generic_mipsel):
 	"Builder class for cobalt [Little-endian]"
 	def __init__(self,myspec):
 		generic_mipsel.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -march=r5000 -mabi=32 -mplt -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -march=r5000 -mabi=32 -mplt -pipe"
 		self.settings["HOSTUSE"]=["cobalt"]
 
 class arch_cobalt_n32(generic_mips64el):
 	"Builder class for cobalt [Little-endian N32]"
 	def __init__(self,myspec):
 		generic_mips64el.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -march=r5000 -mabi=n32 -mplt -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -march=r5000 -mabi=n32 -mplt -pipe"
 		self.settings["HOSTUSE"]=["cobalt"]
 
 def register():

diff --git a/catalyst/arch/powerpc.py b/catalyst/arch/powerpc.py
index 0288945a..59a6d625 100644
--- a/catalyst/arch/powerpc.py
+++ b/catalyst/arch/powerpc.py
@@ -19,119 +19,119 @@ class arch_ppc(generic_ppc):
 	"builder class for generic powerpc"
 	def __init__(self,myspec):
 		generic_ppc.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -mcpu=powerpc -mtune=powerpc -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -mcpu=powerpc -mtune=powerpc -pipe"
 
 class arch_ppc64(generic_ppc64):
 	"builder class for generic ppc64"
 	def __init__(self,myspec):
 		generic_ppc64.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -pipe"
 		self.settings["CHOST"]="powerpc64-unknown-linux-gnu"
 
 class arch_ppc64le(generic_ppc64):
 	"builder class for generic ppc64le"
 	def __init__(self,myspec):
 		generic_ppc64.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -pipe"
 		self.settings["CHOST"]="powerpc64le-unknown-linux-gnu"
 
 class arch_970(arch_ppc64):
 	"builder class for 970 aka G5 under ppc64"
 	def __init__(self,myspec):
 		arch_ppc64.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -pipe -mcpu=970 -mtune=970"
+		self.settings["COMMON_FLAGS"]="-O2 -pipe -mcpu=970 -mtune=970"
 		self.settings["HOSTUSE"]=["altivec"]
 
 class arch_cell(arch_ppc64):
 	"builder class for cell under ppc64"
 	def __init__(self,myspec):
 		arch_ppc64.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -pipe -mcpu=cell -mtune=cell"
+		self.settings["COMMON_FLAGS"]="-O2 -pipe -mcpu=cell -mtune=cell"
 		self.settings["HOSTUSE"]=["altivec","ibm"]
 
 class arch_g3(generic_ppc):
 	def __init__(self,myspec):
 		generic_ppc.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -mcpu=G3 -mtune=G3 -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -mcpu=G3 -mtune=G3 -pipe"
 
 class arch_g4(generic_ppc):
 	def __init__(self,myspec):
 		generic_ppc.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -mcpu=G4 -mtune=G4 -maltivec -mabi=altivec -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -mcpu=G4 -mtune=G4 -maltivec -mabi=altivec -pipe"
 		self.settings["HOSTUSE"]=["altivec"]
 
 class arch_g5(generic_ppc):
 	def __init__(self,myspec):
 		generic_ppc.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -mcpu=G5 -mtune=G5 -maltivec -mabi=altivec -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -mcpu=G5 -mtune=G5 -maltivec -mabi=altivec -pipe"
 		self.settings["HOSTUSE"]=["altivec"]
 
 class arch_power(generic_ppc):
 	"builder class for generic power"
 	def __init__(self,myspec):
 		generic_ppc.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -mcpu=power -mtune=power -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -mcpu=power -mtune=power -pipe"
 
 class arch_power_ppc(generic_ppc):
 	"builder class for generic powerpc/power"
 	def __init__(self,myspec):
 		generic_ppc.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -mcpu=common -mtune=common -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -mcpu=common -mtune=common -pipe"
 
 class arch_power3(arch_ppc64):
 	"builder class for power3 under ppc64"
 	def __init__(self,myspec):
 		arch_ppc64.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -pipe -mcpu=power3 -mtune=power3"
+		self.settings["COMMON_FLAGS"]="-O2 -pipe -mcpu=power3 -mtune=power3"
 		self.settings["HOSTUSE"]=["ibm"]
 
 class arch_power4(arch_ppc64):
 	"builder class for power4 under ppc64"
 	def __init__(self,myspec):
 		arch_ppc64.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -pipe -mcpu=power4 -mtune=power4"
+		self.settings["COMMON_FLAGS"]="-O2 -pipe -mcpu=power4 -mtune=power4"
 		self.settings["HOSTUSE"]=["ibm"]
 
 class arch_power5(arch_ppc64):
 	"builder class for power5 under ppc64"
 	def __init__(self,myspec):
 		arch_ppc64.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -pipe -mcpu=power5 -mtune=power5"
+		self.settings["COMMON_FLAGS"]="-O2 -pipe -mcpu=power5 -mtune=power5"
 		self.settings["HOSTUSE"]=["ibm"]
 
 class arch_power6(arch_ppc64):
 	"builder class for power6 under ppc64"
 	def __init__(self,myspec):
 		arch_ppc64.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -pipe -mcpu=power6 -mtune=power6"
+		self.settings["COMMON_FLAGS"]="-O2 -pipe -mcpu=power6 -mtune=power6"
 		self.settings["HOSTUSE"]=["altivec","ibm"]
 
 class arch_power7(arch_ppc64):
 	"builder class for power7 under ppc64"
 	def __init__(self,myspec):
 		arch_ppc64.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -pipe -mcpu=power7 -mtune=power7 -mabi=elfv2"
+		self.settings["COMMON_FLAGS"]="-O2 -pipe -mcpu=power7 -mtune=power7 -mabi=elfv2"
 		self.settings["HOSTUSE"]=["altivec","ibm"]
 
 class arch_power7le(arch_ppc64le):
 	"builder class for power7 under ppc64le"
 	def __init__(self,myspec):
 		arch_ppc64le.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -pipe -mcpu=power7 -mtune=power7 -mabi=elfv2"
+		self.settings["COMMON_FLAGS"]="-O2 -pipe -mcpu=power7 -mtune=power7 -mabi=elfv2"
 		self.settings["HOSTUSE"]=["altivec","ibm"]
 
 class arch_power8(arch_ppc64):
 	"builder class for power8 under ppc64"
 	def __init__(self,myspec):
 		arch_ppc64.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -pipe -mcpu=power8 -mtune=power8 -mabi=elfv2"
+		self.settings["COMMON_FLAGS"]="-O2 -pipe -mcpu=power8 -mtune=power8 -mabi=elfv2"
 		self.settings["HOSTUSE"]=["altivec","ibm"]
 
 class arch_power8le(arch_ppc64le):
 	"builder class for power8 under ppc64le"
 	def __init__(self,myspec):
 		arch_ppc64le.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -pipe -mcpu=power8 -mtune=power8 -mabi=elfv2"
+		self.settings["COMMON_FLAGS"]="-O2 -pipe -mcpu=power8 -mtune=power8 -mabi=elfv2"
 		self.settings["HOSTUSE"]=["altivec","ibm"]
 
 def register():

diff --git a/catalyst/arch/s390.py b/catalyst/arch/s390.py
index 8ff287bc..f4dfebd9 100644
--- a/catalyst/arch/s390.py
+++ b/catalyst/arch/s390.py
@@ -15,14 +15,14 @@ class arch_s390(generic_s390):
 	"builder class for generic s390"
 	def __init__(self,myspec):
 		generic_s390.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -pipe"
 		self.settings["CHOST"]="s390-ibm-linux-gnu"
 
 class arch_s390x(generic_s390x):
 	"builder class for generic s390x"
 	def __init__(self,myspec):
 		generic_s390x.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -pipe"
 		self.settings["CHOST"]="s390x-ibm-linux-gnu"
 
 def register():

diff --git a/catalyst/arch/sh.py b/catalyst/arch/sh.py
index fdf3974a..36ce2103 100644
--- a/catalyst/arch/sh.py
+++ b/catalyst/arch/sh.py
@@ -15,84 +15,84 @@ class arch_sh(generic_sh):
 	"Builder class for SH [Little-endian]"
 	def __init__(self,myspec):
 		generic_sh.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -pipe"
 		self.settings["CHOST"]="sh-unknown-linux-gnu"
 
 class arch_sh2(generic_sh):
 	"Builder class for SH-2 [Little-endian]"
 	def __init__(self,myspec):
 		generic_sh.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -m2 -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -m2 -pipe"
 		self.settings["CHOST"]="sh2-unknown-linux-gnu"
 
 class arch_sh2a(generic_sh):
 	"Builder class for SH-2A [Little-endian]"
 	def __init__(self,myspec):
 		generic_sh.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -m2a -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -m2a -pipe"
 		self.settings["CHOST"]="sh2a-unknown-linux-gnu"
 
 class arch_sh3(generic_sh):
 	"Builder class for SH-3 [Little-endian]"
 	def __init__(self,myspec):
 		generic_sh.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -m3 -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -m3 -pipe"
 		self.settings["CHOST"]="sh3-unknown-linux-gnu"
 
 class arch_sh4(generic_sh):
 	"Builder class for SH-4 [Little-endian]"
 	def __init__(self,myspec):
 		generic_sh.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -m4 -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -m4 -pipe"
 		self.settings["CHOST"]="sh4-unknown-linux-gnu"
 
 class arch_sh4a(generic_sh):
 	"Builder class for SH-4A [Little-endian]"
 	def __init__(self,myspec):
 		generic_sh.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -m4a -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -m4a -pipe"
 		self.settings["CHOST"]="sh4a-unknown-linux-gnu"
 
 class arch_sheb(generic_sheb):
 	"Builder class for SH [Big-endian]"
 	def __init__(self,myspec):
 		generic_sheb.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -pipe"
 		self.settings["CHOST"]="sheb-unknown-linux-gnu"
 
 class arch_sh2eb(generic_sheb):
 	"Builder class for SH-2 [Big-endian]"
 	def __init__(self,myspec):
 		generic_sheb.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -m2 -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -m2 -pipe"
 		self.settings["CHOST"]="sh2eb-unknown-linux-gnu"
 
 class arch_sh2aeb(generic_sheb):
 	"Builder class for SH-2A [Big-endian]"
 	def __init__(self,myspec):
 		generic_sheb.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -m2a -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -m2a -pipe"
 		self.settings["CHOST"]="sh2aeb-unknown-linux-gnu"
 
 class arch_sh3eb(generic_sheb):
 	"Builder class for SH-3 [Big-endian]"
 	def __init__(self,myspec):
 		generic_sheb.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -m3 -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -m3 -pipe"
 		self.settings["CHOST"]="sh3eb-unknown-linux-gnu"
 
 class arch_sh4eb(generic_sheb):
 	"Builder class for SH-4 [Big-endian]"
 	def __init__(self,myspec):
 		generic_sheb.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -m4 -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -m4 -pipe"
 		self.settings["CHOST"]="sh4eb-unknown-linux-gnu"
 
 class arch_sh4aeb(generic_sheb):
 	"Builder class for SH-4A [Big-endian]"
 	def __init__(self,myspec):
 		generic_sheb.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -m4a -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -m4a -pipe"
 		self.settings["CHOST"]="sh4aeb-unknown-linux-gnu"
 
 def register():

diff --git a/catalyst/arch/sparc.py b/catalyst/arch/sparc.py
index 174d0a98..d9abd4b5 100644
--- a/catalyst/arch/sparc.py
+++ b/catalyst/arch/sparc.py
@@ -18,14 +18,14 @@ class arch_sparc(generic_sparc):
 	"builder class for generic sparc (sun4cdm)"
 	def __init__(self,myspec):
 		generic_sparc.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -pipe"
 		self.settings["CHOST"]="sparc-unknown-linux-gnu"
 
 class arch_sparc64(generic_sparc64):
 	"builder class for generic sparc64 (sun4u)"
 	def __init__(self,myspec):
 		generic_sparc64.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -mcpu=ultrasparc -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -mcpu=ultrasparc -pipe"
 		self.settings["CHOST"]="sparc-unknown-linux-gnu"
 
 def register():

diff --git a/catalyst/arch/x86.py b/catalyst/arch/x86.py
index 118d5ce5..3e369370 100644
--- a/catalyst/arch/x86.py
+++ b/catalyst/arch/x86.py
@@ -13,62 +13,62 @@ class arch_x86(generic_x86):
 	"builder class for generic x86 (386+)"
 	def __init__(self,myspec):
 		generic_x86.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -mtune=i686 -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -mtune=i686 -pipe"
 		self.settings["CHOST"]="i386-pc-linux-gnu"
 
 class arch_i386(generic_x86):
 	"Intel i386 CPU"
 	def __init__(self,myspec):
 		generic_x86.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -march=i386 -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -march=i386 -pipe"
 		self.settings["CHOST"]="i386-pc-linux-gnu"
 
 class arch_i486(generic_x86):
 	"Intel i486 CPU"
 	def __init__(self,myspec):
 		generic_x86.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -march=i486 -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -march=i486 -pipe"
 		self.settings["CHOST"]="i486-pc-linux-gnu"
 
 class arch_i586(generic_x86):
 	"Intel Pentium CPU"
 	def __init__(self,myspec):
 		generic_x86.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -march=i586 -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -march=i586 -pipe"
 		self.settings["CHOST"]="i586-pc-linux-gnu"
 
 class arch_i686(generic_x86):
 	"Intel Pentium Pro CPU"
 	def __init__(self,myspec):
 		generic_x86.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -march=i686 -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -march=i686 -pipe"
 
 class arch_pentium_mmx(generic_x86):
 	"Intel Pentium MMX CPU with MMX support"
 	def __init__(self,myspec):
 		generic_x86.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -march=pentium-mmx -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -march=pentium-mmx -pipe"
 		self.settings["HOSTUSEEXPAND"]={"CPU_FLAGS_X86":["mmx"]}
 
 class arch_pentium2(generic_x86):
 	"Intel Pentium 2 CPU with MMX support"
 	def __init__(self,myspec):
 		generic_x86.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -march=pentium2 -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -march=pentium2 -pipe"
 		self.settings["HOSTUSEEXPAND"]={"CPU_FLAGS_X86":["mmx"]}
 
 class arch_pentium3(generic_x86):
 	"Intel Pentium 3 CPU with MMX and SSE support"
 	def __init__(self,myspec):
 		generic_x86.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -march=pentium3 -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -march=pentium3 -pipe"
 		self.settings["HOSTUSEEXPAND"]={"CPU_FLAGS_X86":["mmx","sse"]}
 
 class arch_pentium4(generic_x86):
 	"Intel Pentium 4 CPU with MMX, SSE and SSE2 support"
 	def __init__(self,myspec):
 		generic_x86.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -march=pentium4 -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -march=pentium4 -pipe"
 		#lines like this appears to be trying to set the profile default, better to use the profile
 		#self.settings["HOSTUSEEXPAND"]={"CPU_FLAGS_X86":["mmx","sse","sse2"]}
 
@@ -76,42 +76,42 @@ class arch_pentium_m(generic_x86):
 	"Intel Pentium M CPU with MMX, SSE and SSE2 support"
 	def __init__(self,myspec):
 		generic_x86.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -march=pentium-m -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -march=pentium-m -pipe"
 		#self.settings["HOSTUSEEXPAND"]={"CPU_FLAGS_X86":["mmx","sse","sse2"]}
 
 class arch_prescott(generic_x86):
 	"improved version of Intel Pentium 4 CPU with MMX, SSE, SSE2 and SSE3 support"
 	def __init__(self,myspec):
 		generic_x86.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -march=prescott -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -march=prescott -pipe"
 		#self.settings["HOSTUSEEXPAND"]={"CPU_FLAGS_X86":["mmx","sse","sse2"]}
 
 class arch_k6(generic_x86):
 	"AMD K6 CPU with MMX support"
 	def __init__(self,myspec):
 		generic_x86.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -march=k6 -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -march=k6 -pipe"
 		self.settings["HOSTUSEEXPAND"]={"CPU_FLAGS_X86":["mmx"]}
 
 class arch_k6_2(generic_x86):
 	"AMD K6-2 CPU with MMX and 3dNOW! support"
 	def __init__(self,myspec):
 		generic_x86.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -march=k6-2 -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -march=k6-2 -pipe"
 		self.settings["HOSTUSEEXPAND"]={"CPU_FLAGS_X86":["mmx","3dnow"]}
 
 class arch_athlon(generic_x86):
 	"AMD Athlon CPU with MMX, 3dNOW!, enhanced 3dNOW! and SSE prefetch support"
 	def __init__(self,myspec):
 		generic_x86.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -march=athlon -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -march=athlon -pipe"
 		self.settings["HOSTUSEEXPAND"]={"CPU_FLAGS_X86":["mmx","3dnow"]}
 
 class arch_athlon_xp(generic_x86):
 	"improved AMD Athlon CPU with MMX, 3dNOW!, enhanced 3dNOW! and full SSE support"
 	def __init__(self,myspec):
 		generic_x86.__init__(self,myspec)
-		self.settings["CFLAGS"]="-O2 -march=athlon-xp -pipe"
+		self.settings["COMMON_FLAGS"]="-O2 -march=athlon-xp -pipe"
 		self.settings["HOSTUSEEXPAND"]={"CPU_FLAGS_X86":["mmx","3dnow","sse"]}
 
 def register():

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index a66229c2..6d78f937 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -1095,16 +1095,16 @@ class StageBase(TargetBase, ClearBase, GenBase):
 					"/usr/share/portage/config/make.conf.example "
 					"for a more\n# detailed example.\n")
 
-			for flags in ["CFLAGS", "CXXFLAGS", "FCFLAGS", "FFLAGS", "LDFLAGS",
-						"ASFLAGS"]:
-				if not flags in self.settings:
-					continue
+			for flags in ["COMMON_FLAGS", "CFLAGS", "CXXFLAGS", "FCFLAGS", "FFLAGS",
+						"LDFLAGS", "ASFLAGS"]:
 				if flags in ["LDFLAGS", "ASFLAGS"]:
+					if not flags in self.settings:
+						continue
 					myf.write("# %s is unsupported.  USE AT YOUR OWN RISK!\n"
 							% flags)
-				if (flags is not "CFLAGS" and
-					self.settings[flags] == self.settings["CFLAGS"]):
-					myf.write('%s="${CFLAGS}"\n' % flags)
+				if flags not in self.settings or (flags is not "COMMON_FLAGS" and
+						self.settings[flags] == self.settings["COMMON_FLAGS"]):
+					myf.write('%s="${COMMON_FLAGS}"\n' % flags)
 				elif isinstance(self.settings[flags], list):
 					myf.write('%s="%s"\n'
 							% (flags, ' '.join(self.settings[flags])))


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-09-19 15:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-19 15:53 [gentoo-commits] proj/catalyst:master commit in: catalyst/base/, catalyst/arch/ Ben Kohler
  -- strict thread matches above, loose matches on Subject: below --
2015-09-09 16:34 Richard Farina

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox