aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlloyd <[email protected]>2012-08-31 14:15:26 +0000
committerlloyd <[email protected]>2012-08-31 14:15:26 +0000
commitb72900c62a5c27e588a5512e65ced402bb508871 (patch)
tree5200f1315642d5d4ca73530e03a658682f6bf2c9
parente78969e9ef08de5b0f2d472e180d25ddfe8041f1 (diff)
Add a --chost option to configure that takes a GNU style triplet.
Add a couple aliases so the GNU canonical names are understood by us. Add an Ivy Bridge entry, match it up with the new GCC -march flag
-rwxr-xr-xconfigure.py18
-rw-r--r--src/build-data/arch/x86_64.txt5
-rw-r--r--src/build-data/cc/gcc.txt1
-rw-r--r--src/build-data/os/darwin.txt1
-rw-r--r--src/build-data/os/linux.txt4
5 files changed, 24 insertions, 5 deletions
diff --git a/configure.py b/configure.py
index cdd92f228..91ee18cb8 100755
--- a/configure.py
+++ b/configure.py
@@ -206,6 +206,9 @@ def process_command_line(args):
metavar='BINARY',
help='set the name of the compiler binary')
+ target_group.add_option('--chost', dest='chost',
+ help=optparse.SUPPRESS_HELP)
+
target_group.add_option('--with-endian', metavar='ORDER', default=None,
help='override guess of CPU byte order')
@@ -1699,6 +1702,15 @@ def main(argv = None):
(modules, archinfo, ccinfo, osinfo) = load_info_files(options)
+ if options.chost:
+ chost = options.chost.split('-')
+
+ if options.cpu is None and len(chost) > 0:
+ options.cpu = chost[0]
+
+ if options.os is None and len(chost) > 2:
+ options.os = '-'.join(chost[2:])
+
if options.compiler is None:
if options.os == 'windows':
if have_program('g++') and not have_program('cl'):
@@ -1747,7 +1759,7 @@ def main(argv = None):
else:
cpu_from_user = options.cpu
(options.arch, options.cpu) = canon_processor(archinfo, options.cpu)
- logging.info('Canonicalizized --cpu=%s to %s/%s' % (
+ logging.info('Canonicalizized CPU target %s to %s/%s' % (
cpu_from_user, options.arch, options.cpu))
logging.info('Target is %s-%s-%s-%s' % (
@@ -1844,7 +1856,7 @@ if __name__ == '__main__':
main()
except Exception as e:
logging.error(e)
- import traceback
- logging.info(traceback.format_exc())
+ #import traceback
+ #logging.info(traceback.format_exc())
sys.exit(1)
sys.exit(0)
diff --git a/src/build-data/arch/x86_64.txt b/src/build-data/arch/x86_64.txt
index 922daa104..8d74a193e 100644
--- a/src/build-data/arch/x86_64.txt
+++ b/src/build-data/arch/x86_64.txt
@@ -19,6 +19,7 @@ core2
nehalem
westmere
sandybridge
+ivybridge
</submodels>
<submodel_aliases>
@@ -38,6 +39,6 @@ corei7cpu860 -> nehalem
<isa_extn>
sse2:all
-ssse3:core2,nehalem,westmere,atom,sandybridge
-aes-ni:westmere,sandybridge
+ssse3:core2,nehalem,westmere,atom,sandybridge,ivybridge
+aes-ni:westmere,sandybridge,ivybridge
</isa_extn>
diff --git a/src/build-data/cc/gcc.txt b/src/build-data/cc/gcc.txt
index 33b0cbfe6..cb142dba6 100644
--- a/src/build-data/cc/gcc.txt
+++ b/src/build-data/cc/gcc.txt
@@ -53,6 +53,7 @@ westmere -> "-march=corei7 -maes -momit-leaf-frame-pointer"
#westmere -> "-march=core2 -msse4.1 -msse4.2 -maes -momit-leaf-frame-pointer"
sandybridge -> "-march=corei7-avx -momit-leaf-frame-pointer"
+ivybridge -> "-march=core-avx-i -momit-leaf-frame-pointer"
atom32 -> "-march=atom -momit-leaf-frame-pointer"
ppc601 -> "-mpowerpc -mcpu=601"
diff --git a/src/build-data/os/darwin.txt b/src/build-data/os/darwin.txt
index b63abf32c..0a075eed6 100644
--- a/src/build-data/os/darwin.txt
+++ b/src/build-data/os/darwin.txt
@@ -13,5 +13,6 @@ gettimeofday
</target_features>
<aliases>
+macos
macosx
</aliases>
diff --git a/src/build-data/os/linux.txt b/src/build-data/os/linux.txt
index 4c0965764..394f7673d 100644
--- a/src/build-data/os/linux.txt
+++ b/src/build-data/os/linux.txt
@@ -7,3 +7,7 @@ posix_mlock
gmtime_r
dlopen
</target_features>
+
+<aliases>
+linux-gnu
+</aliases>