From 54e61ecd289cad55c3ece8de03b561e969443203 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Nov 03 2016 05:48:30 +0000 Subject: import gcc-libraries-5.3.1-3.1.el7 --- diff --git a/.gcc-libraries.metadata b/.gcc-libraries.metadata index 75a2a6c..25df8dd 100644 --- a/.gcc-libraries.metadata +++ b/.gcc-libraries.metadata @@ -1,2 +1,2 @@ -fcbc6afe50a4566e97b19bbe9d4896543b3afbb3 SOURCES/gcc-5.2.1-20150716.tar.bz2 +2b75e91f3a19e466580b04b057ec7ad251333221 SOURCES/gcc-5.3.1-20160406.tar.bz2 5ef03ca7aee134fe7dfecb6c9d048799f0810278 SOURCES/mpc-0.8.1.tar.gz diff --git a/.gitignore b/.gitignore index 5ca0c12..08c325d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ -SOURCES/gcc-5.2.1-20150716.tar.bz2 +SOURCES/gcc-5.3.1-20160406.tar.bz2 SOURCES/mpc-0.8.1.tar.gz diff --git a/SOURCES/gcc5-pr65689.patch b/SOURCES/gcc5-pr65689.patch deleted file mode 100644 index 0dcdd5e..0000000 --- a/SOURCES/gcc5-pr65689.patch +++ /dev/null @@ -1,231 +0,0 @@ -2015-04-17 Jakub Jelinek - - PR target/65689 - * genpreds.c (struct constraint_data): Add maybe_allows_reg and - maybe_allows_mem bitfields. - (maybe_allows_none_start, maybe_allows_none_end, - maybe_allows_reg_start, maybe_allows_reg_end, maybe_allows_mem_start, - maybe_allows_mem_end): New variables. - (compute_maybe_allows): New function. - (add_constraint): Use it to initialize maybe_allows_reg and - maybe_allows_mem fields. - (choose_enum_order): Sort the non-is_register/is_const_int/is_memory/ - is_address constraints such that those that allow neither mem nor - reg come first, then those that only allow reg but not mem, then - those that only allow mem but not reg, then the rest. - (write_allows_reg_mem_function): New function. - (write_tm_preds_h): Call it. - * stmt.c (parse_output_constraint, parse_input_constraint): Use - the generated insn_extra_constraint_allows_reg_mem function - instead of always setting *allows_reg = true; *allows_mem = true; - for unknown extra constraints. - - * gcc.target/aarch64/c-output-template-4.c: New test. - ---- gcc/genpreds.c.jj 2015-04-08 18:23:50.643556230 +0200 -+++ gcc/genpreds.c 2015-04-17 17:44:23.097650110 +0200 -@@ -640,12 +640,14 @@ struct constraint_data - const char *regclass; /* for register constraints */ - rtx exp; /* for other constraints */ - unsigned int lineno; /* line of definition */ -- unsigned int is_register : 1; -- unsigned int is_const_int : 1; -- unsigned int is_const_dbl : 1; -- unsigned int is_extra : 1; -- unsigned int is_memory : 1; -- unsigned int is_address : 1; -+ unsigned int is_register : 1; -+ unsigned int is_const_int : 1; -+ unsigned int is_const_dbl : 1; -+ unsigned int is_extra : 1; -+ unsigned int is_memory : 1; -+ unsigned int is_address : 1; -+ unsigned int maybe_allows_reg : 1; -+ unsigned int maybe_allows_mem : 1; - }; - - /* Overview of all constraints beginning with a given letter. */ -@@ -691,6 +693,9 @@ static unsigned int satisfied_start; - static unsigned int const_int_start, const_int_end; - static unsigned int memory_start, memory_end; - static unsigned int address_start, address_end; -+static unsigned int maybe_allows_none_start, maybe_allows_none_end; -+static unsigned int maybe_allows_reg_start, maybe_allows_reg_end; -+static unsigned int maybe_allows_mem_start, maybe_allows_mem_end; - - /* Convert NAME, which contains angle brackets and/or underscores, to - a string that can be used as part of a C identifier. The string -@@ -711,6 +716,34 @@ mangle (const char *name) - return XOBFINISH (rtl_obstack, const char *); - } - -+/* Return a bitmask, bit 1 if EXP maybe allows a REG/SUBREG, 2 if EXP -+ maybe allows a MEM. Bits should be clear only when we are sure it -+ will not allow a REG/SUBREG or a MEM. */ -+static int -+compute_maybe_allows (rtx exp) -+{ -+ switch (GET_CODE (exp)) -+ { -+ case IF_THEN_ELSE: -+ /* Conservative answer is like IOR, of the THEN and ELSE branches. */ -+ return compute_maybe_allows (XEXP (exp, 1)) -+ | compute_maybe_allows (XEXP (exp, 2)); -+ case AND: -+ return compute_maybe_allows (XEXP (exp, 0)) -+ & compute_maybe_allows (XEXP (exp, 1)); -+ case IOR: -+ return compute_maybe_allows (XEXP (exp, 0)) -+ | compute_maybe_allows (XEXP (exp, 1)); -+ case MATCH_CODE: -+ if (*XSTR (exp, 1) == '\0') -+ return (strstr (XSTR (exp, 0), "reg") != NULL ? 1 : 0) -+ | (strstr (XSTR (exp, 0), "mem") != NULL ? 2 : 0); -+ /* FALLTHRU */ -+ default: -+ return 3; -+ } -+} -+ - /* Add one constraint, of any sort, to the tables. NAME is its name; - REGCLASS is the register class, if any; EXP is the expression to - test, if any; IS_MEMORY and IS_ADDRESS indicate memory and address -@@ -866,6 +899,11 @@ add_constraint (const char *name, const - c->is_extra = !(regclass || is_const_int || is_const_dbl); - c->is_memory = is_memory; - c->is_address = is_address; -+ int maybe_allows = 3; -+ if (exp) -+ maybe_allows = compute_maybe_allows (exp); -+ c->maybe_allows_reg = (maybe_allows & 1) != 0; -+ c->maybe_allows_mem = (maybe_allows & 2) != 0; - - c->next_this_letter = *slot; - *slot = c; -@@ -940,8 +978,30 @@ choose_enum_order (void) - enum_order[next++] = c; - address_end = next; - -+ maybe_allows_none_start = next; -+ FOR_ALL_CONSTRAINTS (c) -+ if (!c->is_register && !c->is_const_int && !c->is_memory && !c->is_address -+ && !c->maybe_allows_reg && !c->maybe_allows_mem) -+ enum_order[next++] = c; -+ maybe_allows_none_end = next; -+ -+ maybe_allows_reg_start = next; -+ FOR_ALL_CONSTRAINTS (c) -+ if (!c->is_register && !c->is_const_int && !c->is_memory && !c->is_address -+ && c->maybe_allows_reg && !c->maybe_allows_mem) -+ enum_order[next++] = c; -+ maybe_allows_reg_end = next; -+ -+ maybe_allows_mem_start = next; -+ FOR_ALL_CONSTRAINTS (c) -+ if (!c->is_register && !c->is_const_int && !c->is_memory && !c->is_address -+ && !c->maybe_allows_reg && c->maybe_allows_mem) -+ enum_order[next++] = c; -+ maybe_allows_mem_end = next; -+ - FOR_ALL_CONSTRAINTS (c) -- if (!c->is_register && !c->is_const_int && !c->is_memory && !c->is_address) -+ if (!c->is_register && !c->is_const_int && !c->is_memory && !c->is_address -+ && c->maybe_allows_reg && c->maybe_allows_mem) - enum_order[next++] = c; - gcc_assert (next == num_constraints); - } -@@ -1229,6 +1289,41 @@ write_range_function (const char *name, - "}\n\n", name); - } - -+/* Write a definition for insn_extra_constraint_allows_reg_mem function. */ -+static void -+write_allows_reg_mem_function (void) -+{ -+ printf ("static inline void\n" -+ "insn_extra_constraint_allows_reg_mem (enum constraint_num c,\n" -+ "\t\t\t\t bool *allows_reg, bool *allows_mem)\n" -+ "{\n"); -+ if (maybe_allows_none_start != maybe_allows_none_end) -+ printf (" if (c >= CONSTRAINT_%s && c <= CONSTRAINT_%s)\n" -+ " return;\n", -+ enum_order[maybe_allows_none_start]->c_name, -+ enum_order[maybe_allows_none_end - 1]->c_name); -+ if (maybe_allows_reg_start != maybe_allows_reg_end) -+ printf (" if (c >= CONSTRAINT_%s && c <= CONSTRAINT_%s)\n" -+ " {\n" -+ " *allows_reg = true;\n" -+ " return;\n" -+ " }\n", -+ enum_order[maybe_allows_reg_start]->c_name, -+ enum_order[maybe_allows_reg_end - 1]->c_name); -+ if (maybe_allows_mem_start != maybe_allows_mem_end) -+ printf (" if (c >= CONSTRAINT_%s && c <= CONSTRAINT_%s)\n" -+ " {\n" -+ " *allows_mem = true;\n" -+ " return;\n" -+ " }\n", -+ enum_order[maybe_allows_mem_start]->c_name, -+ enum_order[maybe_allows_mem_end - 1]->c_name); -+ printf (" (void) c;\n" -+ " *allows_reg = true;\n" -+ " *allows_mem = true;\n" -+ "}\n\n"); -+} -+ - /* VEC is a list of key/value pairs, with the keys being lower bounds - of a range. Output a decision tree that handles the keys covered by - [VEC[START], VEC[END]), returning FALLBACK for keys lower then VEC[START]'s. -@@ -1326,6 +1421,7 @@ write_tm_preds_h (void) - memory_start, memory_end); - write_range_function ("insn_extra_address_constraint", - address_start, address_end); -+ write_allows_reg_mem_function (); - - if (constraint_max_namelen > 1) - { ---- gcc/stmt.c.jj 2015-04-08 18:23:50.660555956 +0200 -+++ gcc/stmt.c 2015-04-17 17:36:50.623044548 +0200 -@@ -342,13 +342,7 @@ parse_output_constraint (const char **co - else if (insn_extra_memory_constraint (cn)) - *allows_mem = true; - else -- { -- /* Otherwise we can't assume anything about the nature of -- the constraint except that it isn't purely registers. -- Treat it like "g" and hope for the best. */ -- *allows_reg = true; -- *allows_mem = true; -- } -+ insn_extra_constraint_allows_reg_mem (cn, allows_reg, allows_mem); - break; - } - -@@ -465,13 +459,7 @@ parse_input_constraint (const char **con - else if (insn_extra_memory_constraint (cn)) - *allows_mem = true; - else -- { -- /* Otherwise we can't assume anything about the nature of -- the constraint except that it isn't purely registers. -- Treat it like "g" and hope for the best. */ -- *allows_reg = true; -- *allows_mem = true; -- } -+ insn_extra_constraint_allows_reg_mem (cn, allows_reg, allows_mem); - break; - } - ---- gcc/testsuite/gcc.target/aarch64/c-output-template-4.c.jj 2015-04-17 17:48:27.588654584 +0200 -+++ gcc/testsuite/gcc.target/aarch64/c-output-template-4.c 2015-04-17 17:48:22.149743468 +0200 -@@ -0,0 +1,10 @@ -+/* { dg-do compile } */ -+/* { dg-options "-O0" } */ -+ -+void -+test (void) -+{ -+ __asm__ ("@ %c0" : : "S" (&test + 4)); -+} -+ -+/* { dg-final { scan-assembler "@ test\\+4" } } */ diff --git a/SOURCES/gcc5-rh1118870.patch b/SOURCES/gcc5-rh1118870.patch new file mode 100644 index 0000000..9865e72 --- /dev/null +++ b/SOURCES/gcc5-rh1118870.patch @@ -0,0 +1,20 @@ +2014-07-23 Jonathan Wakely + + * testsuite/30_threads/condition_variable_any/rh1118870.cc: New test. + +--- libstdc++-v3/testsuite/30_threads/condition_variable_any/rh1118870.cc ++++ libstdc++-v3/testsuite/30_threads/condition_variable_any/rh1118870.cc +@@ -0,0 +1,13 @@ ++// { dg-options " -std=gnu++11 -pthread" } ++#include ++#include ++ ++int main() ++{ ++ const size_t sz = sizeof(std::condition_variable_any); ++ char garbage[sz]; ++ memset(garbage, 0xff, sz); ++ auto cond = new ((void*)garbage) std::condition_variable_any(); ++ cond->notify_all(); ++ cond->~condition_variable_any(); ++} diff --git a/SOURCES/gcc5-rh1279639.patch b/SOURCES/gcc5-rh1279639.patch new file mode 100644 index 0000000..907452e --- /dev/null +++ b/SOURCES/gcc5-rh1279639.patch @@ -0,0 +1,19 @@ +# Workaround doxygen 1.8.10 bugs. +--- libstdc++-v3/doc/doxygen/user.cfg.in ++++ libstdc++-v3/doc/doxygen/user.cfg.in +@@ -895,7 +895,6 @@ INPUT = @srcdir@/doc/doxygen/doxygroups.cc \ + include/ext/pb_ds/detail/binary_heap_ \ + include/ext/pb_ds/detail/binomial_heap_ \ + include/ext/pb_ds/detail/binomial_heap_base_ \ +- include/ext/pb_ds/detail/bin_search_tree_ \ + include/ext/pb_ds/detail/branch_policy \ + include/ext/pb_ds/detail/cc_hash_table_map_ \ + include/ext/pb_ds/detail/eq_fn \ +@@ -2135,6 +2122,7 @@ PREDEFINED = __cplusplus=201103L \ + _GLIBCXX_USE_CONSTEXPR=constexpr \ + "_GLIBCXX_THROW(E)= " \ + _GLIBCXX_NOEXCEPT=noexcept \ ++ "_GLIBCXX_NOEXCEPT_IF(E)=noexcept(E)" \ + _GLIBCXX_NOTHROW=noexcept \ + _GLIBCXX_USE_NOEXCEPT=noexcept \ + _GLIBCXX_USE_WCHAR_T \ diff --git a/SPECS/gcc-libraries.spec b/SPECS/gcc-libraries.spec index 75a6f19..3ac30f7 100644 --- a/SPECS/gcc-libraries.spec +++ b/SPECS/gcc-libraries.spec @@ -1,9 +1,9 @@ -%global DATE 20150716 -%global SVNREV 225895 -%global gcc_version 5.2.1 +%global DATE 20160406 +%global SVNREV 234777 +%global gcc_version 5.3.1 # Note, gcc_release must be integer, if you want to add suffixes to # %{release}, append them after %{gcc_release} on Release: line. -%global gcc_release 2 +%global gcc_release 3 %global mpc_version 0.8.1 %global _unpackaged_files_terminate_build 0 %global multilib_64_archs sparc64 ppc64 s390x x86_64 @@ -19,11 +19,20 @@ %ifarch x86_64 %global multilib_32_arch i686 %endif +%ifarch aarch64 +%if 0%{?rhel} >= 7 +%global build_libatomic 1 +%else +%global build_libatomic 0 +%endif +%endif +%ifnarch aarch64 %if 0%{?rhel} >= 7 %global build_libatomic 0 %else %global build_libatomic 1 %endif +%endif %if 0%{?rhel} >= 7 %global build_libitm 0 %else @@ -130,7 +139,7 @@ BuildRequires: libmpc-devel >= 0.8.1 %endif Requires(post): /sbin/install-info Requires(preun): /sbin/install-info -ExclusiveArch: %{ix86} x86_64 ppc ppc64 s390 s390x +ExclusiveArch: %{ix86} x86_64 ppc ppc64 s390 s390x aarch64 %global oformat %{nil} %global oformat2 %{nil} @@ -159,6 +168,9 @@ ExclusiveArch: %{ix86} x86_64 ppc ppc64 s390 s390x %ifarch ia64 %global oformat OUTPUT_FORMAT(elf64-ia64-little) %endif +%ifarch ppc64le +%global oformat OUTPUT_FORMAT(elf64-powerpcle) +%endif Patch0: gcc5-hack.patch Patch1: gcc5-java-nomulti.patch @@ -168,15 +180,16 @@ Patch4: gcc5-i386-libgomp.patch Patch5: gcc5-sparc-config-detection.patch Patch6: gcc5-libgomp-omp_h-multilib.patch Patch7: gcc5-libtool-no-rpath.patch -Patch12: gcc5-no-add-needed.patch -Patch15: gcc5-pr65689.patch -Patch16: gcc5-libgo-p224.patch +Patch11: gcc5-no-add-needed.patch +Patch12: gcc5-libgo-p224.patch +Patch15: gcc5-rh1279639.patch #Patch1000: gcc5-libstdc++-compat.patch #Patch1001: gcc5-libgfortran-compat.patch Patch1002: gcc5-alt-compat-test.patch #Patch1003: gcc5-libquadmath-compat.patch Patch1004: gcc5-libstdc++44-xfail.patch +Patch1005: gcc5-rh1118870.patch Patch1100: gcc5-htm-in-asm.patch %if 0%{?rhel} >= 7 @@ -254,10 +267,10 @@ which is used for -fcheck-pointer-bounds -mmpx instrumented programs. %patch5 -p0 -b .sparc-config-detection~ %patch6 -p0 -b .libgomp-omp_h-multilib~ %patch7 -p0 -b .libtool-no-rpath~ -%patch12 -p0 -b .no-add-needed~ -%patch15 -p0 -b .pr65689~ -%patch16 -p0 -b .libgo-p224~ +%patch11 -p0 -b .no-add-needed~ +%patch12 -p0 -b .libgo-p224~ rm -f libgo/go/crypto/elliptic/p224{,_test}.go +%patch15 -p0 -b .rh1279639~ # nonshared stuff not ready yet for DTS4 #%patch1000 -p0 -b .libstdc++-compat~ @@ -278,6 +291,7 @@ rm -f libgo/go/crypto/elliptic/p224{,_test}.go #%if 0%{?rhel} == 6 #%patch1004 -p0 -b .libstdc++44-xfail~ #%endif +%patch1005 -p0 -b .rh1118870~ %patch1100 -p0 -b .gcc5-htm-in-asm~ %if 0%{?rhel} == 6 @@ -293,6 +307,8 @@ cp -a libstdc++-v3/config/cpu/i{4,3}86/opt LC_ALL=C sed -i -e 's/\xa0/ /' gcc/doc/options.texi +sed -i -e 's/Common Driver Var(flag_report_bug)/& Init(1)/' gcc/common.opt + %ifarch ppc if [ -d libstdc++-v3/config/abi/post/powerpc64-linux-gnu ]; then mkdir -p libstdc++-v3/config/abi/post/powerpc64-linux-gnu/64 @@ -315,7 +331,7 @@ cd obj-%{gcc_target_platform} mkdir mpc mpc-install cd mpc ../../mpc-%{mpc_version}/configure --disable-shared \ - CFLAGS="${CFLAGS:-%optflags}" CXXFLAGS="${CXXFLAGS:-%optflags}" \ + CFLAGS="${CFLAGS:-%optflags} -fPIC" CXXFLAGS="${CXXFLAGS:-%optflags} -fPIC" \ --prefix=`cd ..; pwd`/mpc-install make %{?_smp_mflags} make install @@ -372,7 +388,11 @@ CC="$CC" CXX="$CXX" CFLAGS="$OPT_FLAGS" \ ../configure --prefix=%{_prefix} --mandir=%{_mandir} --infodir=%{_infodir} \ --with-bugurl=http://bugzilla.redhat.com/bugzilla --disable-bootstrap \ --enable-shared --enable-threads=posix --enable-checking=release \ +%ifarch ppc64le + --enable-targets=powerpcle-linux --disable-multilib \ +%else --enable-multilib \ +%endif --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions \ --enable-gnu-unique-object \ --enable-linker-build-id \ @@ -384,6 +404,10 @@ CC="$CC" CXX="$CXX" CFLAGS="$OPT_FLAGS" \ --disable-initfini-array \ %endif --disable-libgcj \ +%if 0%{rhel} < 8 + --with-default-libstdcxx-abi=gcc4-compatible \ +%endif + --without-isl \ %if %{build_libmpx} --enable-libmpx \ %else @@ -416,13 +440,18 @@ CC="$CC" CXX="$CXX" CFLAGS="$OPT_FLAGS" \ %ifarch sparc sparcv9 --host=%{gcc_target_platform} --build=%{gcc_target_platform} --target=%{gcc_target_platform} --with-cpu=v7 %endif -%ifarch ppc ppc64 ppc64le ppc64p7 +%ifarch ppc ppc64 ppc64p7 %if 0%{?rhel} >= 7 --with-cpu-32=power7 --with-tune-32=power7 --with-cpu-64=power7 --with-tune-64=power7 \ %else --with-cpu-32=power4 --with-tune-32=power6 --with-cpu-64=power4 --with-tune-64=power6 \ %endif %endif +%ifarch ppc64le +%if 0%{?rhel} >= 7 + --with-cpu-32=power8 --with-tune-32=power8 --with-cpu-64=power8 --with-tune-64=power8 \ +%endif +%endif %ifarch ppc --build=%{gcc_target_platform} --target=%{gcc_target_platform} --with-cpu=default32 %endif @@ -532,7 +561,7 @@ ln -sf libgcc_s.so.1 gcc/libgcc_s.so cd obj-%{gcc_target_platform} # run the tests. -make %{?_smp_mflags} -k check-target-lib{itm,atomic} RUNTESTFLAGS="--target_board=unix/'{,-fstack-protector}'" || : +make %{?_smp_mflags} -k check RUNTESTFLAGS="--target_board=unix/'{,-fstack-protector}'" || : ( LC_ALL=C ../contrib/test_summary -t || : ) 2>&1 | sed -n '/^cat.*EOF/,/^EOF/{/^cat.*EOF/d;/^EOF/d;/^LAST_UPDATED:/d;p;}' > testresults echo ====================TESTING========================= cat testresults @@ -631,6 +660,16 @@ fi %endif %changelog +* Tue Aug 23 2016 Marek Polacek 5.3.1-3.1 +- run the whole testsuite + +* Fri Aug 05 2016 Marek Polacek 5.3.1-2.1 +- enable libatomic on aarch64 (#1362438) +- enable libcilkrts and libmpx testsuites + +* Tue May 10 2016 Marek Polacek 5.3.1-1.1 +- update from DTS gcc-5.3.1-6.1 (#1265252) + * Mon Jul 20 2015 Marek Polacek 5.2.1-2.1 - don't build libatomic and libitm for RHEL7