aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Hill <rhill@gentoo.org>2012-05-20 05:40:25 +0000
committerRyan Hill <rhill@gentoo.org>2012-05-20 05:40:25 +0000
commit5b7e55d75e5bd90b904df31e74b53e5408187ece (patch)
treede7f780c4c25a86a57bbea080e23d0e0ecf38c71 /4.7.0/gentoo
parentDrop upstreamed and x32 patches. (diff)
downloadgcc-patches-5b7e55d75e5bd90b904df31e74b53e5408187ece.tar.gz
gcc-patches-5b7e55d75e5bd90b904df31e74b53e5408187ece.tar.bz2
gcc-patches-5b7e55d75e5bd90b904df31e74b53e5408187ece.zip
Finish up patch porting.
Diffstat (limited to '4.7.0/gentoo')
-rw-r--r--4.7.0/gentoo/74_all_gcc47_cloog-dl.patch (renamed from 4.7.0/gentoo/74_all_gcc46_cloog-dl.patch)124
-rw-r--r--4.7.0/gentoo/76_all_4.7.0_c-family-headers.patch50
-rw-r--r--4.7.0/gentoo/README.history3
3 files changed, 65 insertions, 112 deletions
diff --git a/4.7.0/gentoo/74_all_gcc46_cloog-dl.patch b/4.7.0/gentoo/74_all_gcc47_cloog-dl.patch
index 36c40df..ee108e3 100644
--- a/4.7.0/gentoo/74_all_gcc46_cloog-dl.patch
+++ b/4.7.0/gentoo/74_all_gcc47_cloog-dl.patch
@@ -1,36 +1,28 @@
-When graphite support is enabled several extra libraries (libppl, libcloog,
-libgmpxx, libstdc++-v3) get linked into cc1. When these libs bump their soname we get
-a completely broken compiler.
-
-Instead, dlopen libcloog as necessary. This patch originated in Fedora and
-was modified to work on FreeBSD (http://bugs.gentoo.org/317211).
-
2011-01-04 Jakub Jelinek <jakub@redhat.com>
- * Makefile.in (BACKENDLIBS): Link against -ldl instead of
- -lcloog -lppl.
- (graphite.o, graphite%.o): Force -O, remove -fkeep-inline-functions.
- (GRAPHITE_CLOOG_UTIL_H, GRAPHITE_POLY_H): New.
- (graphite*.o): Adjust dependencies.
- * graphite-cloog-compat.h: Include <dlfcn.h>. Reference libcloog and
- libppl symbols through pointers in cloog_pointers__ variable.
- * graphite.c (init_cloog_pointers): New function.
- (graphite_transform_loops): Call init_cloog_pointers.
- * graphite-clast-to-gimple.c (gcc_type_for_iv_of_clast_loop): Rename
- stmt_for argument to stmt_fora.
- * graphite-poly.h: Include graphite-cloog-util.h.
+ * Makefile.in (BACKENDLIBS): Link against -ldl instead of
+ -lcloog -lppl.
+ (graphite.o, graphite%.o): Force -O, remove -fkeep-inline-functions.
+ (GRAPHITE_CLOOG_UTIL_H, GRAPHITE_POLY_H): New.
+ (graphite*.o): Adjust dependencies.
+ * graphite-cloog-compat.h: Include <dlfcn.h>. Reference libcloog and
+ libppl symbols through pointers in cloog_pointers__ variable.
+ * graphite.c (init_cloog_pointers): New function.
+ (graphite_transform_loops): Call init_cloog_pointers.
+ * graphite-clast-to-gimple.c (gcc_type_for_iv_of_clast_loop): Rename
+ stmt_for argument to stmt_fora.
+ * graphite-poly.h: Include graphite-cloog-util.h.
-2011-04-02 Ryan Hill <dirtyepic@gentoo.org>
+2012-05-19 Ryan Hill <dirtyepic@gentoo.org>
- * configure.ac (DL_LIB): Check how to dlopen.
- * configure: Regenerate.
- * Makefile.in (BACKENDLIBS): Use DL_LIB.
- * graphite-cloog-compat.h: Add missing symbols.
+ * configure.ac (DL_LIB): Check how to dlopen.
+ * configure: Regenerate.
+ * Makefile.in (BACKENDLIBS): Use DL_LIB.
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
-@@ -984,6 +984,8 @@ GCC_PLUGIN_H = gcc-plugin.h highlev-plugin-common.h $(CONFIG_H) $(SYSTEM_H) \
+@@ -963,6 +963,8 @@ GCC_PLUGIN_H = gcc-plugin.h highlev-plugin-common.h $(CONFIG_H) $(SYSTEM_H) \
PLUGIN_H = plugin.h $(GCC_PLUGIN_H)
PLUGIN_VERSION_H = plugin-version.h configargs.h
LIBFUNCS_H = libfuncs.h $(HASHTAB_H)
@@ -39,16 +31,16 @@ was modified to work on FreeBSD (http://bugs.gentoo.org/317211).
#
# Now figure out from those variables how to compile and link.
-@@ -1037,7 +1039,7 @@ BUILD_LIBDEPS= $(BUILD_LIBIBERTY)
+@@ -1017,7 +1019,7 @@ BUILD_LIBDEPS= $(BUILD_LIBIBERTY)
# and the system's installed libraries.
- LIBS = @LIBS@ $(CPPLIB) $(LIBINTL) $(LIBICONV) $(LIBIBERTY) $(LIBDECNUMBER) \
- $(HOST_LIBS)
+ LIBS = @LIBS@ libcommon.a $(CPPLIB) $(LIBINTL) $(LIBICONV) $(LIBIBERTY) \
+ $(LIBDECNUMBER) $(HOST_LIBS)
-BACKENDLIBS = $(CLOOGLIBS) $(PPLLIBS) $(GMPLIBS) $(PLUGINLIBS) $(HOST_LIBS) \
+BACKENDLIBS = $(GMPLIBS) $(if $(CLOOGLIBS),@DL_LIB@) $(PLUGINLIBS) $(HOST_LIBS) \
$(ZLIB)
# Any system libraries needed just for GNAT.
SYSLIBS = @GNAT_LIBEXC@
-@@ -2668,40 +2670,40 @@ sese.o : sese.c sese.h $(CONFIG_H) $(SYSTEM_H) coretypes.h tree-pretty-print.h \
+@@ -2603,40 +2605,40 @@ sese.o : sese.c sese.h $(CONFIG_H) $(SYSTEM_H) coretypes.h tree-pretty-print.h \
$(TREE_FLOW_H) $(CFGLOOP_H) $(TREE_DATA_REF_H) tree-pass.h value-prof.h
graphite.o : graphite.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(DIAGNOSTIC_CORE_H) \
$(TREE_FLOW_H) $(TREE_DUMP_H) $(CFGLOOP_H) $(TREE_DATA_REF_H) sese.h \
@@ -103,17 +95,21 @@ was modified to work on FreeBSD (http://bugs.gentoo.org/317211).
graphite-sese-to-poly.h
tree-vect-loop.o: tree-vect-loop.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(TM_H) $(GGC_H) $(TREE_H) $(BASIC_BLOCK_H) $(DIAGNOSTIC_H) $(TREE_FLOW_H) \
-@@ -3483,6 +3485,11 @@ $(out_object_file): $(out_file) $(CONFIG_H) coretypes.h $(TM_H) $(TREE_H) \
+@@ -3455,6 +3457,15 @@ $(common_out_object_file): $(common_out_file) $(CONFIG_H) $(SYSTEM_H) \
$(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) \
- $(out_file) $(OUTPUT_OPTION)
+ $< $(OUTPUT_OPTION)
+graphite%.o : \
+ ALL_CFLAGS := -O $(filter-out -fkeep-inline-functions, $(ALL_CFLAGS))
+graphite.o : \
+ ALL_CFLAGS := -O $(filter-out -fkeep-inline-functions, $(ALL_CFLAGS))
++graphite%.o : \
++ ALL_CXXFLAGS := -O $(filter-out -fkeep-inline-functions, $(ALL_CXXFLAGS))
++graphite.o : \
++ ALL_CXXFLAGS := -O $(filter-out -fkeep-inline-functions, $(ALL_CXXFLAGS))
+
# Build auxiliary files that support ecoff format.
- mips-tfile: mips-tfile.o version.o $(LIBDEPS)
+ mips-tfile: mips-tfile.o $(LIBDEPS)
$(LINKER) $(LINKERFLAGS) $(LDFLAGS) -o $@ \
--- a/gcc/configure
+++ b/gcc/configure
@@ -125,16 +121,7 @@ was modified to work on FreeBSD (http://bugs.gentoo.org/317211).
CLOOGINC
CLOOGLIBS
PPLINC
-@@ -4842,7 +4843,7 @@ fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cv_cc_gcc_supports_ada" >&5
- $as_echo "$acx_cv_cc_gcc_supports_ada" >&6; }
-
--if test x$GNATBIND != xno && test x$GNATMAKE != xno && test x$acx_cv_cc_gcc_supports_ada != xno; then
-+if test "x$GNATBIND" != xno && test "x$GNATMAKE" != xno && test x$acx_cv_cc_gcc_supports_ada != xno; then
- have_gnat=yes
- else
- have_gnat=no
-@@ -26282,6 +26283,7 @@ $as_echo "unable to check" >&6; }
+@@ -27236,6 +27237,7 @@ $as_echo "unable to check" >&6; }
fi
# Check -ldl
@@ -142,11 +129,11 @@ was modified to work on FreeBSD (http://bugs.gentoo.org/317211).
saved_LIBS="$LIBS"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
$as_echo_n "checking for library containing dlopen... " >&6; }
-@@ -26341,7 +26343,9 @@ fi
+@@ -27295,7 +27297,9 @@ fi
if test x"$ac_cv_search_dlopen" = x"-ldl"; then
pluginlibs="$pluginlibs -ldl"
-+ DL_LIB=$ac_cv_search_dlopen
++ DL_LIB=$ac_cv_search_dlopen
fi
+
LIBS="$saved_LIBS"
@@ -154,7 +141,7 @@ was modified to work on FreeBSD (http://bugs.gentoo.org/317211).
# Check that we can build shared objects with -fPIC -shared
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
-@@ -4839,11 +4839,14 @@ if test x"$enable_plugin" = x"yes"; then
+@@ -5109,11 +5109,14 @@ if test x"$enable_plugin" = x"yes"; then
fi
# Check -ldl
@@ -163,7 +150,7 @@ was modified to work on FreeBSD (http://bugs.gentoo.org/317211).
AC_SEARCH_LIBS([dlopen], [dl])
if test x"$ac_cv_search_dlopen" = x"-ldl"; then
pluginlibs="$pluginlibs -ldl"
-+ DL_LIB=$ac_cv_search_dlopen
++ DL_LIB=$ac_cv_search_dlopen
fi
+ AC_SUBST(DL_LIB)
LIBS="$saved_LIBS"
@@ -171,27 +158,42 @@ was modified to work on FreeBSD (http://bugs.gentoo.org/317211).
# Check that we can build shared objects with -fPIC -shared
--- a/gcc/graphite-clast-to-gimple.c
+++ b/gcc/graphite-clast-to-gimple.c
-@@ -738,10 +738,10 @@ clast_get_body_of_loop (struct clast_stmt *stmt)
+@@ -836,7 +836,7 @@ clast_get_body_of_loop (struct clast_stmt *stmt)
from STMT_FOR. */
static tree
--gcc_type_for_iv_of_clast_loop (struct clast_for *stmt_for, int level,
-+gcc_type_for_iv_of_clast_loop (struct clast_for *stmt_fora, int level,
- tree lb_type, tree ub_type)
+-type_for_clast_for (struct clast_for *stmt_for, ivs_params_p ip)
++type_for_clast_for (struct clast_for *stmt_fora, ivs_params_p ip)
{
-- struct clast_stmt *stmt = (struct clast_stmt *) stmt_for;
-+ struct clast_stmt *stmt = (struct clast_stmt *) stmt_fora;
- struct clast_user_stmt *body = clast_get_body_of_loop (stmt);
- CloogStatement *cs = body->statement;
- poly_bb_p pbb = (poly_bb_p) cloog_statement_usr (cs);
+ mpz_t bound_one, bound_two;
+ tree lb_type, ub_type;
+@@ -844,8 +844,8 @@ type_for_clast_for (struct clast_for *stmt_for, ivs_params_p ip)
+ mpz_init (bound_one);
+ mpz_init (bound_two);
+
+- lb_type = type_for_clast_expr (stmt_for->LB, ip, bound_one, bound_two);
+- ub_type = type_for_clast_expr (stmt_for->UB, ip, bound_one, bound_two);
++ lb_type = type_for_clast_expr (stmt_fora->LB, ip, bound_one, bound_two);
++ ub_type = type_for_clast_expr (stmt_fora->UB, ip, bound_one, bound_two);
+
+ mpz_clear (bound_one);
+ mpz_clear (bound_two);
--- a/gcc/graphite-cloog-compat.h
+++ b/gcc/graphite-cloog-compat.h
-@@ -272,4 +272,269 @@ static inline int cloog_matrix_nrows (CloogMatrix * m)
+@@ -272,4 +272,279 @@ static inline int cloog_matrix_nrows (CloogMatrix * m)
return m->NbRows;
}
#endif /* CLOOG_ORG */
+
+#include <dlfcn.h>
++#if PPL_VERSION_MAJOR == 0 && PPL_VERSION_MINOR < 11
++#define DYNSYMS_PPL11
++#else
++#define DYNSYMS_PPL11 \
++ DYNSYM (ppl_new_PIP_Problem_from_constraints); \
++ DYNSYM (ppl_PIP_Problem_is_satisfiable); \
++ DYNSYM (ppl_delete_PIP_Problem);
++#endif
+#define DYNSYMS \
+ DYNSYM (cloog_block_alloc); \
+ DYNSYM (cloog_block_list_free); \
@@ -296,16 +298,15 @@ was modified to work on FreeBSD (http://bugs.gentoo.org/317211).
+ DYNSYM (stmt_guard); \
+ DYNSYM (stmt_root); \
+ DYNSYM (stmt_user); \
++ DYNSYM (stmt_ass); \
+ DYNSYM (ppl_delete_Constraint_System); \
+ DYNSYM (ppl_initialize); \
+ DYNSYM (ppl_new_Constraint_System_from_Constraint); \
+ DYNSYM (ppl_new_C_Polyhedron_from_Constraint_System); \
+ DYNSYM (ppl_Polyhedron_affine_image); \
+ DYNSYM (ppl_io_fprint_Pointset_Powerset_C_Polyhedron); \
-+ DYNSYM (ppl_new_PIP_Problem_from_constraints); \
-+ DYNSYM (ppl_PIP_Problem_is_satisfiable); \
-+ DYNSYM (ppl_delete_PIP_Problem);
-+extern struct
++ DYNSYMS_PPL11
++extern struct cloog_pointers_s__
+{
+ bool inited;
+ void *h;
@@ -442,15 +443,18 @@ was modified to work on FreeBSD (http://bugs.gentoo.org/317211).
+#define stmt_guard (*cloog_pointers__.p_stmt_guard)
+#define stmt_root (*cloog_pointers__.p_stmt_root)
+#define stmt_user (*cloog_pointers__.p_stmt_user)
++#define stmt_ass (*cloog_pointers__.p_stmt_ass)
+#define ppl_delete_Constraint_System (*cloog_pointers__.p_ppl_delete_Constraint_System)
+#define ppl_initialize (*cloog_pointers__.p_ppl_initialize)
+#define ppl_new_Constraint_System_from_Constraint (*cloog_pointers__.p_ppl_new_Constraint_System_from_Constraint)
+#define ppl_new_C_Polyhedron_from_Constraint_System (*cloog_pointers__.p_ppl_new_C_Polyhedron_from_Constraint_System)
+#define ppl_Polyhedron_affine_image (*cloog_pointers__.p_ppl_Polyhedron_affine_image)
+#define ppl_io_fprint_Pointset_Powerset_C_Polyhedron (*cloog_pointers__.p_ppl_io_fprint_Pointset_Powerset_C_Polyhedron)
++#if !(PPL_VERSION_MAJOR == 0 && PPL_VERSION_MINOR < 11)
+#define ppl_new_PIP_Problem_from_constraints (*cloog_pointers__.p_ppl_new_PIP_Problem_from_constraints)
+#define ppl_PIP_Problem_is_satisfiable (*cloog_pointers__.p_ppl_PIP_Problem_is_satisfiable)
+#define ppl_delete_PIP_Problem (*cloog_pointers__.p_ppl_delete_PIP_Problem)
++#endif
+
+#define cloog_finalize (*cloog_pointers__.p_ppl_finalize)
+
diff --git a/4.7.0/gentoo/76_all_4.7.0_c-family-headers.patch b/4.7.0/gentoo/76_all_4.7.0_c-family-headers.patch
deleted file mode 100644
index 9d559fe..0000000
--- a/4.7.0/gentoo/76_all_4.7.0_c-family-headers.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-https://bugs.gentoo.org/396005
-
-
-2011-07-22 Romain Geissler <romain.geissler@gmail.com>
-
- PR plugins/45348
- PR plugins/48425
- PR plugins/46577
- * Makefile.in: Do not flatten c-family directory when installing
- plugin headers.
-
-
-2011-07-25 Romain Geissler <romain.geissler@gmail.com>
-
- * c-pretty-print.h: Search c-common.h in c-family.
-
-
---- gcc/c-family/c-pretty-print.h
-+++ gcc/c-family/c-pretty-print.h
-@@ -23,7 +23,7 @@
- #define GCC_C_PRETTY_PRINTER
-
- #include "tree.h"
--#include "c-common.h"
-+#include "c-family/c-common.h"
- #include "pretty-print.h"
-
-
---- gcc/Makefile.in
-+++ gcc/Makefile.in
-@@ -4602,8 +4602,8 @@
-
- # Install the headers needed to build a plugin.
- install-plugin: installdirs lang.install-plugin s-header-vars
--# We keep the directory structure for files in config and .def files. All
--# other files are flattened to a single directory.
-+# We keep the directory structure for files in config or c-family and .def
-+# files. All other files are flattened to a single directory.
- $(mkinstalldirs) $(DESTDIR)$(plugin_includedir)
- headers=`echo $(PLUGIN_HEADERS) | tr ' ' '\012' | sort -u`; \
- srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`; \
-@@ -4615,7 +4615,7 @@
- else continue; \
- fi; \
- case $$path in \
-- "$(srcdir)"/config/* | "$(srcdir)"/*.def ) \
-+ "$(srcdir)"/config/* | "$(srcdir)"/c-family/* | "$(srcdir)"/*.def ) \
- base=`echo "$$path" | sed -e "s|$$srcdirstrip/||"`;; \
- *) base=`basename $$path` ;; \
- esac; \
diff --git a/4.7.0/gentoo/README.history b/4.7.0/gentoo/README.history
index dbafe14..af1e8a9 100644
--- a/4.7.0/gentoo/README.history
+++ b/4.7.0/gentoo/README.history
@@ -14,6 +14,5 @@
+ 50_all_libiberty-asprintf.patch
+ 51_all_libiberty-pic.patch
+ 52_all_netbsd-Bsymbolic.patch
- + 74_all_gcc46_cloog-dl.patch
- + 76_all_4.7.0_c-family-headers.patch
+ + 74_all_gcc47_cloog-dl.patch
+ 92_all_freebsd-pie.patch