Permalink
Browse files

Revert "Merge pull request #6 from jlebar/check-gcc-version"

This reverts commit 1b06515, reversing
changes made to 9203cb1.
  • Loading branch information...
1 parent 1b06515 commit 0d6d050bc37d3167cc82a1885fd7660456bb0f4e @michaelwu michaelwu committed Oct 4, 2012
Showing with 0 additions and 56 deletions.
  1. +0 −11 core/combo/HOST_linux-x86.mk
  2. +0 −45 tools/check-gcc-version.py
@@ -56,14 +56,3 @@ HOST_GLOBAL_CFLAGS += \
HOST_GLOBAL_CFLAGS += -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0
HOST_NO_UNDEFINED_LDFLAGS := -Wl,--no-undefined
-
-# Check that our host CC and CXX aren't too new.
-check_version_rv := $(shell build/tools/check-gcc-version.py "$(HOST_CC)"; echo "$$?")
-ifneq ($(check_version_rv),0)
- $(error Incompatible HOST_GCC)
-endif
-
-check_version_rv := $(shell build/tools/check-gcc-version.py "$(HOST_CXX)"; echo "$$?")
-ifneq ($(check_version_rv),0)
- $(error Incompatible HOST_GCC)
-endif
View
@@ -1,45 +0,0 @@
-#!/usr/bin/env python
-
-"""Check that the GCC executable (argv[1]) is of an appropriate version.
-Currently, it must be no newer than 4.6.3.
-
-"""
-
-from __future__ import print_function
-
-import sys
-import subprocess
-import traceback
-
-newest_allowable_version = (4, 6, 3)
-
-def usage_and_quit():
- print('Usage: %s PATH_TO_GCC' % sys.argv[0], file=sys.stderr)
- sys.exit(1)
-
-def check_version(gcc_path):
- proc = subprocess.Popen([gcc_path, '--version'], stdout=subprocess.PIPE)
- (stdout, _) = proc.communicate()
-
- # versions should contain three strings, corresponding to the three version
- # numbers (e.g. ['4', '6', '2']).
- versions = stdout.split('\n')[0].split()[-1].split('.')
-
- version_tuple = tuple([int(v) for v in versions])
-
- if version_tuple > newest_allowable_version:
- print('GCC version %s is too new! You must use GCC no newer than %s.' % \
- ('.'.join(versions),
- '.'.join([str(v) for v in newest_allowable_version])),
- file=sys.stderr)
- sys.exit(3)
-
-if __name__ == '__main__':
- if len(sys.argv) != 2:
- usage_and_quit()
-
- try:
- check_version(sys.argv[1])
- except Exception as e:
- traceback.print_exc(e)
- sys.exit(2)

0 comments on commit 0d6d050

Please sign in to comment.