Skip to content

Commit

Permalink
Merge pull request #4 from nudded/16_gcc_mac
Browse files Browse the repository at this point in the history
better gcc support for mac
  • Loading branch information
JensTimmerman committed Jul 6, 2012
2 parents a52de4e + 88c84d3 commit 4a6c35b
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions easybuild/easyblocks/g/gcc.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
##
# Copyright 2009-2012 Stijn De Weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman
# Copyright 2009-2012 Stijn De weirdt, Dries Verdegem, Kenneth Hoste, Pieter De Baets, Jens Timmerman, Toon Willems
#
# This file is part of EasyBuild,
# originally created by the HPC team of the University of Ghent (http://ugent.be/hpc).
Expand Down Expand Up @@ -63,7 +63,7 @@ def create_dir(self, dirname):

def prep_extra_src_dirs(self, stage, target_prefix=None):
"""
Prepare extra (optional) source directories, so GCC will build these as well.
Prepare extra (optional) source directories, so GCC will build these as well.
"""

known_stages = ["stage1", "stage2", "stage3"]
Expand Down Expand Up @@ -170,6 +170,7 @@ def configure(self):
- create obj dir to build in (GCC doesn't like to be built in source dir)
- add configure and make options, according to .eb spec file
- decide whether or not to do a staged build (which is required to enable PPL/CLooG support)
- set platform_lib based on config.guess output
"""

# self.configopts will be reused in a 3-staged build,
Expand Down Expand Up @@ -236,6 +237,15 @@ def configure(self):
self.configopts,
configopts
)

# instead of relying on uname, we run the same command GCC uses to
# determine the platform
out, ec = run_cmd("../config.guess", simple=False)
if ec == 0:
self.platform_lib = out.rstrip()
else:
self.platform_lib = get_platform_name(withversion=True)

self.run_configure_cmd(cmd)

def make(self):
Expand Down Expand Up @@ -422,8 +432,6 @@ def sanitycheck(self):
Custom sanity check for GCC
"""

self.platform_lib = get_platform_name(withversion=True)

if not self.getcfg('sanityCheckPaths'):

kernel_name = get_kernel_name()
Expand Down

0 comments on commit 4a6c35b

Please sign in to comment.