SConstruct (10238:b21b3aad6bd1) SConstruct (10264:894679c8cd63)
1# -*- mode:python -*-
2
3# Copyright (c) 2013 ARM Limited
4# All rights reserved.
5#
6# The license below extends only to copyright in the software and shall
7# not be construed as granting a license to any other intellectual
8# property including but not limited to intellectual property relating

--- 566 unchanged lines hidden (view full) ---

575 gcc_version = readCommand([main['CXX'], '-dumpversion'], exception=False)
576 if compareVersions(gcc_version, "4.6") < 0:
577 print 'Error: gcc version 4.6 or newer required.'
578 print ' Installed version:', gcc_version
579 Exit(1)
580
581 main['GCC_VERSION'] = gcc_version
582
1# -*- mode:python -*-
2
3# Copyright (c) 2013 ARM Limited
4# All rights reserved.
5#
6# The license below extends only to copyright in the software and shall
7# not be construed as granting a license to any other intellectual
8# property including but not limited to intellectual property relating

--- 566 unchanged lines hidden (view full) ---

575 gcc_version = readCommand([main['CXX'], '-dumpversion'], exception=False)
576 if compareVersions(gcc_version, "4.6") < 0:
577 print 'Error: gcc version 4.6 or newer required.'
578 print ' Installed version:', gcc_version
579 Exit(1)
580
581 main['GCC_VERSION'] = gcc_version
582
583 # gcc from version 4.8 and above generates "rep; ret" instructions
584 # to avoid performance penalties on certain AMD chips. Older
585 # assemblers detect this as an error, "Error: expecting string
586 # instruction after `rep'"
587 if compareVersions(gcc_version, "4.8") > 0:
588 as_version = readCommand([main['AS'], '-v', '/dev/null'],
589 exception=False).split()
590
591 if not as_version or compareVersions(as_version[-1], "2.23") < 0:
592 print termcap.Yellow + termcap.Bold + \
593 'Warning: This combination of gcc and binutils have' + \
594 ' known incompatibilities.\n' + \
595 ' If you encounter build problems, please update ' + \
596 'binutils to 2.23.' + \
597 termcap.Normal
598
583 # Add the appropriate Link-Time Optimization (LTO) flags
584 # unless LTO is explicitly turned off. Note that these flags
585 # are only used by the fast target.
586 if not GetOption('no_lto'):
587 # Pass the LTO flag when compiling to produce GIMPLE
588 # output, we merely create the flags here and only append
589 # them later/
590 main['LTO_CCFLAGS'] = ['-flto=%d' % GetOption('num_jobs')]

--- 763 unchanged lines hidden ---
599 # Add the appropriate Link-Time Optimization (LTO) flags
600 # unless LTO is explicitly turned off. Note that these flags
601 # are only used by the fast target.
602 if not GetOption('no_lto'):
603 # Pass the LTO flag when compiling to produce GIMPLE
604 # output, we merely create the flags here and only append
605 # them later/
606 main['LTO_CCFLAGS'] = ['-flto=%d' % GetOption('num_jobs')]

--- 763 unchanged lines hidden ---