Commit 9e179c0c authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

version up : gcc-4.7.4. add gcc-fortran target by Marco.

drop gcc-multiarch.patch that is no longer needed.
add ppl-0.11-gcc-4.9.patch to compile with gcc-4.9.
parent a9172578
......@@ -32,69 +32,81 @@ environment =
[ppl]
recipe = slapos.recipe.cmmi
# we should use version 0.10.x for gcc-4.5
url = http://bugseng.com/products/ppl/download/ftp/releases/0.10.2/ppl-0.10.2.tar.bz2
md5sum = 5667111f53150618b0fa522ffc53fc3e
# we should use version 0.11.x for gcc-4.7
url = http://bugseng.com/external/ppl/download/ftp/releases/0.11/ppl-0.11.tar.bz2
md5sum = c414abd2ecaf1f1f48949c78d383ee1a
patches =
${:_profile_base_location_}/ppl-0.11-gcc-4.9.patch#09e00eefba5f8e6e77a9c9c611fccc64
configure-options =
--with-libgmp-prefix=${gmp-4:location}
--with-libgmpxx-prefix=${gmp-4:location}
--with-gmp=${gmp-4:location}
--with-gmp-prefix=${gmp-4:location}
--disable-static
environment =
PATH=${m4:location}/bin:%(PATH)s
LDFLAGS=-Wl,-rpath=${gmp-4:location}/lib
CXXFLAGS=-fpermissive
[cloog-ppl]
recipe = slapos.recipe.cmmi
url = ftp://gcc.gnu.org/pub/gcc/infrastructure/cloog-ppl-0.15.9.tar.gz
md5sum = 806e001d1b1a6b130069ff6274900af5
url = ftp://gcc.gnu.org/pub/gcc/infrastructure/cloog-0.16.1.tar.gz
md5sum = 947123350d1ff6dcb4b0774947ac015a
configure-options =
--with-gmp=${gmp-4:location}
--with-gmp-prefix=${gmp-4:location}
--with-ppl=${ppl:location}
--disable-static
environment =
PATH=${m4:location}/bin:%(PATH)s
LDFLAGS=-Wl,-rpath=${gmp-4:location}/lib -Wl,-rpath=${ppl:location}/lib
[gcc]
[gcc-common]
recipe = slapos.recipe.cmmi
url = http://www.mirrorservice.org/sites/sourceware.org/pub/gcc/releases/gcc-4.5.3/gcc-4.5.3.tar.bz2
md5sum = 8e0b5c12212e185f3e4383106bfa9cc6
patches =
${:_profile_base_location_}/gcc-multiarch.patch#819e6735270c8a432b0512b49f40219f
patch-options = -p2
configure-command = make clean \\; make distclean \\; ./configure
url = http://ftp.gnu.org/gnu/gcc/gcc-4.7.4/gcc-4.7.4.tar.bz2
md5sum = 4c696da46297de6ae77a82797d2abe28
# make install does not work when several core are used
make-targets = install -j1
[gcc]
<= gcc-common
configure-options =
--disable-bootstrap
--enable-languages="c,c++"
--disable-multilib
--with-gmp=${gmp-4:location}
--with-mpfr=${mpfr:location}
--with-mpc=${mpc:location}
--enable-languages="c,c++"
--with-ppl=${ppl:location}
--with-cloog=${cloog-ppl:location}
--prefix=${buildout:parts-directory}/${:_buildout_section_name_}
--enable-cloog-backend=isl
environment =
LDFLAGS=-Wl,-rpath=${mpfr:location}/lib -Wl,-rpath=${gmp-4:location}/lib -Wl,-rpath=${mpc:location}/lib -Wl,-rpath=${ppl:location}/lib -Wl,-rpath=${cloog-ppl:location}/lib
# make install does not work when several core are used
make-targets = install -j1
[gcc-minimal]
recipe = slapos.recipe.cmmi
url = http://ftp.gnu.org/gnu/gcc/gcc-4.5.4/gcc-core-4.5.4.tar.bz2
md5sum = ca62e442629a9a7710f5d797bf1b521c
patches =
${gcc-multiarch.patch:location}/${gcc-multiarch.patch:filename}
patch-options = -p2
<= gcc-common
configure-options =
--disable-bootstrap
--enable-languages=c
--disable-multilib
--with-gmp=${gmp-4:location}
--with-mpfr=${mpfr:location}
--with-mpc=${mpc:location}
--enable-languages=c
--without-ppl
--without-cloog
environment =
LDFLAGS=-Wl,-rpath=${mpfr:location}/lib -Wl,-rpath=${gmp-4:location}/lib -Wl,-rpath=${mpc:location}/lib
# make install does not work when several core are used
make-targets = install -j1
[gcc-fortran]
<= gcc-common
configure-options =
--disable-bootstrap
--disable-multilib
--with-gmp=${gmp-4:location}
--with-mpfr=${mpfr:location}
--with-mpc=${mpc:location}
--enable-languages="c,c++,fortran"
--with-ppl=${ppl:location}
--with-cloog=${cloog-ppl:location}
--enable-cloog-backend=isl
environment =
LDFLAGS=-Wl,-rpath=${mpfr:location}/lib -Wl,-rpath=${gmp-4:location}/lib -Wl,-rpath=${mpc:location}/lib -Wl,-rpath=${ppl:location}/lib -Wl,-rpath=${cloog-ppl:location}/lib
# DP: Add multiarch support to GCC.
# DP:
# DP: Convert the multilib option to a target triplet,
# DP: add multiarch include directories and libraries path:
# DP: /usr/local/include/<arch>-linux-gnu
# DP: /usr/include/<arch>-linux-gnu
# DP: /usr/lib/<arch>-linux-gnu
# DP: to the system paths.
# DP:
# DP: Original patch:
# DP: http://anonscm.debian.org/viewvc/gcccvs/branches/sid/gcc-4.5/debian/patches/gcc-multiarch.diff?revision=5086&view=co
2011-08-05 Arnaud Fontaine <arnaud.fontaine@nexedi.com>
* Enable multiarch unconditionally.
2011-03-08 Steve Langasek <steve.langasek@linaro.org>
* Canonicalize x86 to i386 everywhere, not i486/i686
2009-03-24 Arthur Loiret <aloiret@debian.org>
* configure.ac: Handle --enable-multiarch and --with-multiarch-defaults.
* config.gcc: Define MULTIARCH_DEFAULTS if multiarch is enabled.
* config.in [!USED_FOR_TARGET]: Undef ENABLE_MULTIARCH.
* gcc.c: include multiarch.h.
(set_multiarch_dir): New function. Adds the multiarch directories to
the library path.
[ENABLE_MULTIARCH]: Use it.
* cppdefault.c [LOCAL_INCLUDE_DIR, STANDARD_INCLUDE_DIR] Add an include
directory for multiarch directories.
* incpath.c: include multiarch.h
[ENABLE_MULTIARCH]: Add the multiarch directory to include directories.
* Makefile.in (MULTIARCH_H): New. Use it for incpath.o and gcc.o.
* multiarch.h: New file.
---
gcc/Makefile.in | 7 ++--
gcc/config.gcc | 9 +++++
gcc/config.in | 4 ++
gcc/configure.ac | 13 ++++++++
gcc/cppdefault.c | 6 +++
gcc/gcc.c | 41 ++++++++++++++++++++++++
gcc/incpath.c | 28 ++++++++++++++++
gcc/multiarch.h | 91 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
8 files changed, 196 insertions(+), 3 deletions(-)
--- a/src/gcc/gcc.c.orig 2009-12-20
+++ b/src/gcc/gcc.c 2009-12-20
@@ -71,6 +71,7 @@
#include "system.h"
#include "coretypes.h"
#include "multilib.h" /* before tm.h */
+#include "multiarch.h"
#include "tm.h"
#include <signal.h>
#if ! defined( SIGCHLD ) && defined( SIGCLD )
@@ -375,6 +376,7 @@
static int used_arg (const char *, int);
static int default_arg (const char *, int);
static void set_multilib_dir (void);
+static void set_multiarch_dir (void);
static void print_multilib_info (void);
static void perror_with_name (const char *);
static void fatal_ice (const char *, ...) ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN;
@@ -7354,6 +7358,9 @@
xputenv (XOBFINISH (&collect_obstack, char *));
}
+ /* Add the multiarch directories to libraries path. */
+ set_multiarch_dir ();
+
/* Warn about any switches that no pass was interested in. */
for (i = 0; (int) i < n_switches; i++)
@@ -8515,6 +8524,25 @@
multilib_os_dir = multilib_dir;
}
+/* Add the multiarch directories to libraries path. This uses the converted
+ multiarch triplet from the multilib value.
+ For example, if the target supports -m32/-m64 as multilib option and
+ defaults to 64, it will add /usr/lib/$triplet_target64/lib to library
+ path if either -m64 or no multilib option at all is set. And it will
+ add /usr/lib/$triplet_target32 if -m32 is set. Triplets are defined in
+ multiarch.def. */
+
+static void
+set_multiarch_dir (void)
+{
+ const char *path;
+
+ path = concat (STANDARD_STARTFILE_PREFIX_2, MULTIARCH_DEFAULTS,
+ dir_separator_str, NULL);
+ add_prefix (&startfile_prefixes, path, NULL,
+ PREFIX_PRIORITY_LAST, 0, 1);
+}
+
/* Print out the multiple library subdirectory selection
information. This prints out a series of lines. Each line looks
like SUBDIRECTORY;@OPTION@OPTION, with as many options as is
--- a/src/gcc/config.gcc.orig 2009-12-20
+++ b/src/gcc/config.gcc 2009-12-20
@@ -3371,3 +3371,10 @@
target_cpu_default=$target_cpu_default2
fi
fi
+
+multiarch_defaults=`echo ${target_noncanonical} | sed -e 's/unknown-//'`
+multiarch_define="__`echo ${multiarch_defaults} | tr '-' '_'`__"
+if test x${with_multiarch_defaults} != x; then
+ multiarch_defaults=${with_multiarch_defaults}
+fi
+tm_defines="${tm_defines} ${multiarch_define}=1 MULTIARCH_DEFAULTS=\\\"${multiarch_defaults}\\\""
--- a/src/gcc/Makefile.in.orig 2009-12-20
+++ b/src/gcc/Makefile.in 2009-12-20
@@ -949,6 +949,7 @@
$(HASHTAB_H)
PLUGIN_H = plugin.h $(GCC_PLUGIN_H)
PLUGIN_VERSION_H = plugin-version.h configargs.h
+MULTIARCH_H = multiarch.h
#
# Now figure out from those variables how to compile and link.
@@ -1955,8 +1956,8 @@
-cp -p $^ $(srcdir)
incpath.o: incpath.c incpath.h $(CONFIG_H) $(SYSTEM_H) $(CPPLIB_H) \
- intl.h prefix.h coretypes.h $(TM_H) cppdefault.h $(TARGET_H) \
- $(MACHMODE_H)
+ intl.h prefix.h coretypes.h $(TM_H) cppdefault.h $(MULTIARCH_H) \
+ $(TARGET_H) $(MACHMODE_H)
c-decl.o : c-decl.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
$(RTL_H) $(C_TREE_H) $(GGC_H) $(TARGET_H) $(FLAGS_H) $(FUNCTION_H) output.h \
@@ -2107,7 +2108,7 @@
gcc.o: gcc.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) intl.h multilib.h \
Makefile $(lang_specs_files) specs.h prefix.h $(GCC_H) $(FLAGS_H) \
- configargs.h $(OBSTACK_H) opts.h
+ configargs.h $(OBSTACK_H) opts.h $(MULTIARCH_H)
(SHLIB_LINK='$(SHLIB_LINK)'; \
$(COMPILER) $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) \
$(DRIVER_DEFINES) \
--- a/src/gcc/incpath.c.orig 2009-11-30
+++ b/src/gcc/incpath.c 2009-12-20
@@ -30,6 +30,7 @@
#include "intl.h"
#include "incpath.h"
#include "cppdefault.h"
+#include "multiarch.h"
/* Microsoft Windows does not natively support inodes.
VMS has non-numeric inodes. */
@@ -132,6 +133,7 @@
const struct default_include *p;
int relocated = cpp_relocated();
size_t len;
+ const char *multiarch;
if (iprefix && (len = cpp_GCC_INCLUDE_DIR_len) != 0)
{
@@ -150,8 +154,15 @@
if (!strncmp (p->fname, cpp_GCC_INCLUDE_DIR, len))
{
char *str = concat (iprefix, p->fname + len, NULL);
+ if (p->multilib == 1 && imultilib)
+ str = concat (str, dir_separator_str, imultilib, NULL);
+ else if (p->multilib == 2)
+ {
+ multiarch = multilib_to_multiarch (imultilib);
+ if (!multiarch)
+ continue;
+ str = concat (str, dir_separator_str, multiarch, NULL);
+ }
- if (p->multilib && imultilib)
- str = concat (str, dir_separator_str, imultilib, NULL);
add_path (str, SYSTEM, p->cxx_aware, false);
}
}
@@ -195,8 +211,15 @@
else
str = update_path (p->fname, p->component);
+ if (p->multilib == 1 && imultilib)
+ str = concat (str, dir_separator_str, imultilib, NULL);
+ else if (p->multilib == 2)
+ {
+ multiarch = multilib_to_multiarch (imultilib);
+ if (!multiarch)
+ continue;
+ str = concat (str, dir_separator_str, multiarch, NULL);
+ }
- if (p->multilib && imultilib)
- str = concat (str, dir_separator_str, imultilib, NULL);
add_path (str, SYSTEM, p->cxx_aware, false);
}
--- a/src/gcc/multiarch.h.orig 2009-12-20
+++ b/src/gcc/multiarch.h 2009-12-20
@@ -0,0 +1,93 @@
+/* Header for multiarch handling (include directories, libraries path).
+ Copyright (C) 2009 Free Software Foundation, Inc.
+ Contributed by Arthur Loiret <aloiret@debian.org>
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free
+Software Foundation; either version 3, or (at your option) any later
+version.
+
+GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with GCC; see the file COPYING3. If not see
+<http://www.gnu.org/licenses/>. */
+
+#ifndef GCC_MULTIARCH_H
+#define GCC_MULTIARCH_H
+
+#include "tm.h"
+
+struct multiarch_mapping
+{
+ const char *const multilib;
+ const char *const multiarch;
+};
+
+const struct multiarch_mapping multiarch_mappings[] = {
+ { "", MULTIARCH_DEFAULTS },
+# if defined(__x86_64_linux_gnu__)
+ { "32", "i386-linux-gnu" },
+# endif
+# if defined(__i486_linux_gnu__) || defined(__i686_linux_gnu__)
+ { "64", "x86_64-linux-gnu" },
+# endif
+# if defined(__powerpc64_linux_gnu__)
+ { "32", "powerpc-linux-gnu" },
+# endif
+# if defined(__powerpc_linux_gnu__)
+ { "64", "powerpc64-linux-gnu" },
+# endif
+# if defined(__sparc64_linux_gnu__)
+ { "32", "sparc-linux-gnu" },
+# endif
+# if defined(__sparc_linux_gnu__)
+ { "64", "sparc64-linux-gnu" },
+# endif
+# if defined(__s390x_linux_gnu__)
+ { "31", "s390-linux-gnu" },
+# endif
+# if defined(__s390_linux_gnu__)
+ { "64", "s390x-linux-gnu" },
+# endif
+# if defined(__mips_linux_gnu__)
+ { "n32", "mips64-linux-gnuabin32" },
+ { "64", "mips64-linux-gnuabi64" },
+# endif
+# if defined(__mipsel_linux_gnu__)
+ { "n32", "mips64el-linux-gnuabin32" },
+ { "64", "mips64el-linux-gnuabi64" },
+# endif
+# if defined(__x86_64_kfreebsd_gnu__)
+ { "32", "i386-kfreebsd-gnu" },
+# endif
+# if defined(__sh4_linux_gnu__)
+ { "m4", "sh4-linux-gnu" },
+ { "m4-nofpu", "sh4_nofpu-linux-gnu" },
+# endif
+ { 0, 0 }
+};
+
+/* Convert the multilib option to the corresponding target triplet.
+ See multiarch.def and config.gcc for multilib/multiarch pairs.
+ When the default multilib is used, the corresponding multilib/multiarch
+ pair is { "", $target_tripplet }. */
+static inline const char*
+multilib_to_multiarch (const char *imultilib)
+{
+ const struct multiarch_mapping *p;
+
+ for (p = multiarch_mappings; p->multiarch; p++)
+ {
+ if (!strcmp(p->multilib, imultilib ? imultilib : ""))
+ return p->multiarch;
+ }
+ return NULL;
+}
+
+#endif /* GCC_MULTIARCH_H */
--- a/src/gcc/cppdefault.c.orig 2008-07-21
+++ b/src/gcc/cppdefault.c 2009-12-20
@@ -60,6 +60,7 @@
#endif
#ifdef LOCAL_INCLUDE_DIR
/* /usr/local/include comes before the fixincluded header files. */
+ { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 2 },
{ LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 0 },
#endif
#ifdef PREFIX_INCLUDE_DIR
@@ -95,6 +98,7 @@
#endif
#ifdef STANDARD_INCLUDE_DIR
/* /usr/include comes dead last. */
+ { STANDARD_INCLUDE_DIR, STANDARD_INCLUDE_COMPONENT, 0, 0, 1, 2 },
{ STANDARD_INCLUDE_DIR, STANDARD_INCLUDE_COMPONENT, 0, 0, 1, 0 },
#endif
{ 0, 0, 0, 0, 0, 0 }
# HG changeset patch
# User Bernhard Walle <bernhard@bwalle.de>
# Date 1399806036 -7200
# Sun May 11 13:00:36 2014 +0200
# Node ID 5632a171e7c1dc4c0fb5c7a8352afb4188cd29d5
# Parent e35fa03cd2043496839aa5fa3a1a3d2d375b5535
complibs/ppl: Fix build of ppl 0.11.2 with gcc 4.9
From: Roberto Bagnara <bagnara@cs.unipr.it>
Date: Tue, 29 Apr 2014 19:51:43 +0000 (+0200)
Subject: Added missing inclusions. Use std::ptrdiff_t.
X-Git-Url: http://www.cs.unipr.it/git/gitweb.cgi?p=ppl%2Fppl.git;a=commitdiff_plain;h=61d4e14dfd9f1121e9b4521dead5728b2424dd7c
Added missing inclusions. Use std::ptrdiff_t.
(Thanks to Paulo Cesar Pereira de Andrade.)
Signed-off-by: Bernhard Walle <bernhard@bwalle.de>
diff -r e35fa03cd204 -r 5632a171e7c1 patches/ppl/0.11.2/500-ptrdiff_t.patch
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/ppl/0.11.2/500-ptrdiff_t.patch Sun May 11 13:00:36 2014 +0200
@@ -0,0 +1,95 @@
+From: Bernhard Walle <bernhard@bwalle.de>
+Subject: Fix compilation with gcc 4.9 (ptrdiff_t errors)
+
+This is a backport of following patch in ppl git
+
+ commit 61d4e14dfd9f1121e9b4521dead5728b2424dd7c
+ Author: Roberto Bagnara <bagnara@cs.unipr.it>
+ Date: Tue Apr 29 21:51:43 2014 +0200
+
+ Added missing inclusions. Use std::ptrdiff_t.
+ (Thanks to Paulo Cesar Pereira de Andrade.)
+
+---
+ src/Congruence_System.defs.hh | 3 ++-
+ src/Constraint_System.defs.hh | 3 ++-
+ src/Generator_System.defs.hh | 3 ++-
+ src/Grid_Generator_System.defs.hh | 3 ++-
+ 4 files changed, 8 insertions(+), 4 deletions(-)
+
+--- a/src/Grid_Generator_System.defs.hh
++++ b/src/Grid_Generator_System.defs.hh
+@@ -30,6 +30,7 @@ site: http://www.cs.unipr.it/ppl/ . */
+ #include "Variables_Set.types.hh"
+ #include "Grid.types.hh"
+ #include <iosfwd>
++#include <cstddef>
+
+ namespace Parma_Polyhedra_Library {
+
+@@ -267,7 +268,7 @@ public:
+ class const_iterator
+ : public std::iterator<std::forward_iterator_tag,
+ Grid_Generator,
+- ptrdiff_t,
++ std::ptrdiff_t,
+ const Grid_Generator*,
+ const Grid_Generator&>,
+ private Generator_System::const_iterator {
+--- a/src/Congruence_System.defs.hh
++++ b/src/Congruence_System.defs.hh
+@@ -33,6 +33,7 @@ site: http://www.cs.unipr.it/ppl/ . */
+ #include "Grid.types.hh"
+ #include "Grid_Certificate.types.hh"
+ #include <iosfwd>
++#include <cstddef>
+
+ namespace Parma_Polyhedra_Library {
+
+@@ -235,7 +236,7 @@ public:
+ class const_iterator
+ : public std::iterator<std::forward_iterator_tag,
+ Congruence,
+- ptrdiff_t,
++ std::ptrdiff_t,
+ const Congruence*,
+ const Congruence&> {
+ public:
+--- a/src/Constraint_System.defs.hh
++++ b/src/Constraint_System.defs.hh
+@@ -33,6 +33,7 @@ site: http://www.cs.unipr.it/ppl/ . */
+ #include "Congruence_System.types.hh"
+ #include <iterator>
+ #include <iosfwd>
++#include <cstddef>
+
+ namespace Parma_Polyhedra_Library {
+
+@@ -204,7 +205,7 @@ public:
+ class const_iterator
+ : public std::iterator<std::forward_iterator_tag,
+ Constraint,
+- ptrdiff_t,
++ std::ptrdiff_t,
+ const Constraint*,
+ const Constraint&> {
+ public:
+--- a/src/Generator_System.defs.hh
++++ b/src/Generator_System.defs.hh
+@@ -33,6 +33,7 @@ site: http://www.cs.unipr.it/ppl/ . */
+ #include "Polyhedron.types.hh"
+ #include "Poly_Con_Relation.defs.hh"
+ #include <iosfwd>
++#include <cstddef>
+
+ namespace Parma_Polyhedra_Library {
+
+@@ -250,7 +251,7 @@ public:
+ class const_iterator
+ : public std::iterator<std::forward_iterator_tag,
+ Generator,
+- ptrdiff_t,
++ std::ptrdiff_t,
+ const Generator*,
+ const Generator&> {
+ public:
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment