this allows gcc4.9.3 to build on OSX10
This commit is contained in:
parent
9061800b30
commit
ccc1b23bea
3 changed files with 81 additions and 1 deletions
42
var/spack/repos/builtin/packages/gcc/darwin/gcc-4.9.patch1
Normal file
42
var/spack/repos/builtin/packages/gcc/darwin/gcc-4.9.patch1
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
diff --git a/gcc/configure b/gcc/configure
|
||||||
|
index 9523773..52b0bf7 100755
|
||||||
|
--- a/gcc/configure
|
||||||
|
+++ b/gcc/configure
|
||||||
|
@@ -24884,7 +24884,7 @@ if test "${gcc_cv_as_ix86_filds+set}" = set; then :
|
||||||
|
else
|
||||||
|
gcc_cv_as_ix86_filds=no
|
||||||
|
if test x$gcc_cv_as != x; then
|
||||||
|
- $as_echo 'filds mem; fists mem' > conftest.s
|
||||||
|
+ $as_echo 'filds (%ebp); fists (%ebp)' > conftest.s
|
||||||
|
if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
|
||||||
|
{ { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
|
||||||
|
(eval $ac_try) 2>&5
|
||||||
|
@@ -24915,7 +24915,7 @@ if test "${gcc_cv_as_ix86_fildq+set}" = set; then :
|
||||||
|
else
|
||||||
|
gcc_cv_as_ix86_fildq=no
|
||||||
|
if test x$gcc_cv_as != x; then
|
||||||
|
- $as_echo 'fildq mem; fistpq mem' > conftest.s
|
||||||
|
+ $as_echo 'fildq (%ebp); fistpq (%ebp)' > conftest.s
|
||||||
|
if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
|
||||||
|
{ { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
|
||||||
|
(eval $ac_try) 2>&5
|
||||||
|
diff --git a/gcc/configure.ac b/gcc/configure.ac
|
||||||
|
index 68b0ee8..bd53978 100644
|
||||||
|
--- a/gcc/configure.ac
|
||||||
|
+++ b/gcc/configure.ac
|
||||||
|
@@ -3869,13 +3869,13 @@ foo: nop
|
||||||
|
|
||||||
|
gcc_GAS_CHECK_FEATURE([filds and fists mnemonics],
|
||||||
|
gcc_cv_as_ix86_filds,,,
|
||||||
|
- [filds mem; fists mem],,
|
||||||
|
+ [filds (%ebp); fists (%ebp)],,
|
||||||
|
[AC_DEFINE(HAVE_AS_IX86_FILDS, 1,
|
||||||
|
[Define if your assembler uses filds and fists mnemonics.])])
|
||||||
|
|
||||||
|
gcc_GAS_CHECK_FEATURE([fildq and fistpq mnemonics],
|
||||||
|
gcc_cv_as_ix86_fildq,,,
|
||||||
|
- [fildq mem; fistpq mem],,
|
||||||
|
+ [fildq (%ebp); fistpq (%ebp)],,
|
||||||
|
[AC_DEFINE(HAVE_AS_IX86_FILDQ, 1,
|
||||||
|
[Define if your assembler uses fildq and fistq mnemonics.])])
|
||||||
|
|
28
var/spack/repos/builtin/packages/gcc/darwin/gcc-4.9.patch2
Normal file
28
var/spack/repos/builtin/packages/gcc/darwin/gcc-4.9.patch2
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
From 82f81877458ea372176eabb5de36329431dce99b Mon Sep 17 00:00:00 2001
|
||||||
|
From: Iain Sandoe <iain@codesourcery.com>
|
||||||
|
Date: Sat, 21 Dec 2013 00:30:18 +0000
|
||||||
|
Subject: [PATCH] don't try to mark local symbols as no-dead-strip
|
||||||
|
|
||||||
|
---
|
||||||
|
gcc/config/darwin.c | 5 +++++
|
||||||
|
1 file changed, 5 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/gcc/config/darwin.c b/gcc/config/darwin.c
|
||||||
|
index 40804b8..0080299 100644
|
||||||
|
--- a/gcc/config/darwin.c
|
||||||
|
+++ b/gcc/config/darwin.c
|
||||||
|
@@ -1259,6 +1259,11 @@ darwin_encode_section_info (tree decl, rtx rtl, int first ATTRIBUTE_UNUSED)
|
||||||
|
void
|
||||||
|
darwin_mark_decl_preserved (const char *name)
|
||||||
|
{
|
||||||
|
+ /* Actually we shouldn't mark any local symbol this way, but for now
|
||||||
|
+ this only happens with ObjC meta-data. */
|
||||||
|
+ if (darwin_label_is_anonymous_local_objc_name (name))
|
||||||
|
+ return;
|
||||||
|
+
|
||||||
|
fprintf (asm_out_file, "\t.no_dead_strip ");
|
||||||
|
assemble_name (asm_out_file, name);
|
||||||
|
fputc ('\n', asm_out_file);
|
||||||
|
--
|
||||||
|
2.2.1
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
from contextlib import closing
|
from contextlib import closing
|
||||||
from glob import glob
|
from glob import glob
|
||||||
import sys
|
import sys
|
||||||
|
import os
|
||||||
|
|
||||||
class Gcc(Package):
|
class Gcc(Package):
|
||||||
"""The GNU Compiler Collection includes front ends for C, C++,
|
"""The GNU Compiler Collection includes front ends for C, C++,
|
||||||
|
@ -63,6 +64,9 @@ class Gcc(Package):
|
||||||
# TODO: integrate these libraries.
|
# TODO: integrate these libraries.
|
||||||
#depends_on("ppl")
|
#depends_on("ppl")
|
||||||
#depends_on("cloog")
|
#depends_on("cloog")
|
||||||
|
if sys.platform == 'darwin':
|
||||||
|
patch('darwin/gcc-4.9.patch1', when='@4.9.3')
|
||||||
|
patch('darwin/gcc-4.9.patch2', when='@4.9.3')
|
||||||
|
|
||||||
def install(self, spec, prefix):
|
def install(self, spec, prefix):
|
||||||
# libjava/configure needs a minor fix to install into spack paths.
|
# libjava/configure needs a minor fix to install into spack paths.
|
||||||
|
@ -70,6 +74,7 @@ def install(self, spec, prefix):
|
||||||
string=True)
|
string=True)
|
||||||
|
|
||||||
enabled_languages = set(('c', 'c++', 'fortran', 'java', 'objc'))
|
enabled_languages = set(('c', 'c++', 'fortran', 'java', 'objc'))
|
||||||
|
|
||||||
if spec.satisfies("@4.7.1:") and sys.platform != 'darwin':
|
if spec.satisfies("@4.7.1:") and sys.platform != 'darwin':
|
||||||
enabled_languages.add('go')
|
enabled_languages.add('go')
|
||||||
|
|
||||||
|
@ -101,12 +106,17 @@ def install(self, spec, prefix):
|
||||||
isl_options = ["--with-isl=%s" % spec['isl'].prefix]
|
isl_options = ["--with-isl=%s" % spec['isl'].prefix]
|
||||||
options.extend(isl_options)
|
options.extend(isl_options)
|
||||||
|
|
||||||
|
if sys.platform == 'darwin' :
|
||||||
|
darwin_options = [ "--with-build-config=bootstrap-debug" ]
|
||||||
|
options.extend(darwin_options)
|
||||||
|
|
||||||
build_dir = join_path(self.stage.path, 'spack-build')
|
build_dir = join_path(self.stage.path, 'spack-build')
|
||||||
configure = Executable( join_path(self.stage.source_path, 'configure') )
|
configure = Executable( join_path(self.stage.source_path, 'configure') )
|
||||||
with working_dir(build_dir, create=True):
|
with working_dir(build_dir, create=True):
|
||||||
# Rest of install is straightforward.
|
# Rest of install is straightforward.
|
||||||
configure(*options)
|
configure(*options)
|
||||||
make()
|
if sys.platform == 'darwin' : make("bootstrap")
|
||||||
|
else: make()
|
||||||
make("install")
|
make("install")
|
||||||
|
|
||||||
self.write_rpath_specs()
|
self.write_rpath_specs()
|
||||||
|
|
Loading…
Reference in a new issue