mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2025-01-18 18:56:31 +00:00
gcc: Remove obsolete versions
The following versions were marked obsolete in crosstool-ng-1.24.0, remove them. - gcc-linaro-4.8-2015.06 - gcc-4.8.5 Signed-off-by: Chris Packham <judge.packham@gmail.com>
This commit is contained in:
parent
41d4583a42
commit
e422173483
@ -1,132 +0,0 @@
|
||||
As-applied. From:
|
||||
|
||||
https://gcc.gnu.org/ml/gcc-patches/2014-09/msg02625.html
|
||||
|
||||
Linked from bug62231 comment 4 there
|
||||
|
||||
---
|
||||
gcc/defaults.h | 5 +++
|
||||
gcc/dwarf2cfi.c | 76 +++++++++++++++++++++++++++++++++++-----------------
|
||||
libgcc/unwind-dw2.c | 4 --
|
||||
3 files changed, 57 insertions(+), 28 deletions(-)
|
||||
|
||||
--- a/gcc/defaults.h
|
||||
+++ b/gcc/defaults.h
|
||||
@@ -438,6 +438,11 @@
|
||||
#define DWARF_FRAME_REGNUM(REG) DBX_REGISTER_NUMBER (REG)
|
||||
#endif
|
||||
|
||||
+/* The mapping from dwarf CFA reg number to internal dwarf reg numbers. */
|
||||
+#ifndef DWARF_REG_TO_UNWIND_COLUMN
|
||||
+#define DWARF_REG_TO_UNWIND_COLUMN(REGNO) (REGNO)
|
||||
+#endif
|
||||
+
|
||||
/* Map register numbers held in the call frame info that gcc has
|
||||
collected using DWARF_FRAME_REGNUM to those that should be output in
|
||||
.debug_frame and .eh_frame. */
|
||||
--- a/gcc/dwarf2cfi.c
|
||||
+++ b/gcc/dwarf2cfi.c
|
||||
@@ -225,7 +225,44 @@
|
||||
emit_move_insn (adjust_address (mem, mode, offset), GEN_INT (size));
|
||||
}
|
||||
|
||||
-/* Generate code to initialize the register size table. */
|
||||
+/* Helper for expand_builtin_init_dwarf_reg_sizes. Generate code to
|
||||
+ initialize the dwarf register size table entry corresponding to register
|
||||
+ REGNO in REGMODE. TABLE is the table base address, SLOTMODE is the mode
|
||||
+ to use for the size entry to initialize, and WROTE_RETURN_COLUMN needs to
|
||||
+ be set to true if the dwarf register number for REGNO is the dwarf return
|
||||
+ column number. */
|
||||
+
|
||||
+static
|
||||
+void init_one_dwarf_reg_size (int regno, enum machine_mode regmode,
|
||||
+ rtx table, enum machine_mode slotmode,
|
||||
+ bool *wrote_return_column)
|
||||
+{
|
||||
+ const unsigned int dnum = DWARF_FRAME_REGNUM (regno);
|
||||
+ const unsigned int rnum = DWARF2_FRAME_REG_OUT (dnum, 1);
|
||||
+ const unsigned int dcol = DWARF_REG_TO_UNWIND_COLUMN (rnum);
|
||||
+
|
||||
+ const HOST_WIDE_INT slotoffset = dcol * GET_MODE_SIZE (slotmode);
|
||||
+ const HOST_WIDE_INT regsize = GET_MODE_SIZE (regmode);
|
||||
+
|
||||
+ if (rnum >= DWARF_FRAME_REGISTERS)
|
||||
+ return;
|
||||
+
|
||||
+ if (dnum == DWARF_FRAME_RETURN_COLUMN)
|
||||
+ {
|
||||
+ if (regmode == VOIDmode)
|
||||
+ return;
|
||||
+ *wrote_return_column = true;
|
||||
+ }
|
||||
+
|
||||
+ if (slotoffset < 0)
|
||||
+ return;
|
||||
+
|
||||
+ emit_move_insn (adjust_address (table, slotmode, slotoffset),
|
||||
+ gen_int_mode (regsize, slotmode));
|
||||
+}
|
||||
+
|
||||
+/* Generate code to initialize the dwarf register size table located
|
||||
+ at the provided ADDRESS. */
|
||||
|
||||
void
|
||||
expand_builtin_init_dwarf_reg_sizes (tree address)
|
||||
@@ -238,30 +275,21 @@
|
||||
|
||||
for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
|
||||
{
|
||||
- unsigned int dnum = DWARF_FRAME_REGNUM (i);
|
||||
- unsigned int rnum = DWARF2_FRAME_REG_OUT (dnum, 1);
|
||||
+ enum machine_mode save_mode = reg_raw_mode[i];
|
||||
+ rtx span;
|
||||
|
||||
- if (rnum < DWARF_FRAME_REGISTERS)
|
||||
- {
|
||||
- HOST_WIDE_INT offset = rnum * GET_MODE_SIZE (mode);
|
||||
- enum machine_mode save_mode = reg_raw_mode[i];
|
||||
- HOST_WIDE_INT size;
|
||||
-
|
||||
- if (HARD_REGNO_CALL_PART_CLOBBERED (i, save_mode))
|
||||
- save_mode = choose_hard_reg_mode (i, 1, true);
|
||||
- if (dnum == DWARF_FRAME_RETURN_COLUMN)
|
||||
- {
|
||||
- if (save_mode == VOIDmode)
|
||||
- continue;
|
||||
- wrote_return_column = true;
|
||||
- }
|
||||
- size = GET_MODE_SIZE (save_mode);
|
||||
- if (offset < 0)
|
||||
- continue;
|
||||
-
|
||||
- emit_move_insn (adjust_address (mem, mode, offset),
|
||||
- gen_int_mode (size, mode));
|
||||
- }
|
||||
+ span = targetm.dwarf_register_span (gen_rtx_REG (save_mode, i));
|
||||
+ if (!span)
|
||||
+ init_one_dwarf_reg_size (i, save_mode, mem, mode, &wrote_return_column);
|
||||
+ else
|
||||
+ {
|
||||
+ for (int si = 0; si < XVECLEN (span, 0); si++)
|
||||
+ {
|
||||
+ rtx reg = XVECEXP (span, 0, si);
|
||||
+ init_one_dwarf_reg_size
|
||||
+ (REGNO (reg), GET_MODE (reg), mem, mode, &wrote_return_column);
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
|
||||
if (!wrote_return_column)
|
||||
--- a/libgcc/unwind-dw2.c
|
||||
+++ b/libgcc/unwind-dw2.c
|
||||
@@ -55,10 +55,6 @@
|
||||
#define PRE_GCC3_DWARF_FRAME_REGISTERS DWARF_FRAME_REGISTERS
|
||||
#endif
|
||||
|
||||
-#ifndef DWARF_REG_TO_UNWIND_COLUMN
|
||||
-#define DWARF_REG_TO_UNWIND_COLUMN(REGNO) (REGNO)
|
||||
-#endif
|
||||
-
|
||||
/* ??? For the public function interfaces, we tend to gcc_assert that the
|
||||
column numbers are in range. For the dwarf2 unwind info this does happen,
|
||||
although so far in a case that doesn't actually matter.
|
@ -1,21 +0,0 @@
|
||||
As-applied. From:
|
||||
|
||||
https://gcc.gnu.org/ml/gcc-patches/2014-10/msg02605.html
|
||||
|
||||
Linked from bug62231 comment 4 there
|
||||
|
||||
---
|
||||
gcc/config/rs6000/rs6000.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/gcc/config/rs6000/rs6000.c
|
||||
+++ b/gcc/config/rs6000/rs6000.c
|
||||
@@ -1677,7 +1677,7 @@
|
||||
SCmode so as to pass the value correctly in a pair of
|
||||
registers. */
|
||||
else if (TARGET_E500_DOUBLE && FLOAT_MODE_P (mode) && mode != SCmode
|
||||
- && !DECIMAL_FLOAT_MODE_P (mode))
|
||||
+ && !DECIMAL_FLOAT_MODE_P (mode) && SPE_SIMD_REGNO_P (regno))
|
||||
reg_size = UNITS_PER_FP_WORD;
|
||||
|
||||
else
|
@ -1,18 +0,0 @@
|
||||
---
|
||||
libtool-ldflags | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
--- a/libtool-ldflags
|
||||
+++ b/libtool-ldflags
|
||||
@@ -36,6 +36,11 @@
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
+ -framework)
|
||||
+ # libtool handles this option. It should not be prefixed with
|
||||
+ # -Xcompiler, as that would split it from the argument that
|
||||
+ # follows.
|
||||
+ ;;
|
||||
-f*|--*)
|
||||
# Libtool does not ascribe any special meaning options
|
||||
# that begin with -f or with a double-dash. So, it will
|
@ -1,17 +0,0 @@
|
||||
---
|
||||
contrib/regression/objs-gcc.sh | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
--- a/contrib/regression/objs-gcc.sh
|
||||
+++ b/contrib/regression/objs-gcc.sh
|
||||
@@ -106,6 +106,10 @@
|
||||
then
|
||||
make all-gdb all-dejagnu all-ld || exit 1
|
||||
make install-gdb install-dejagnu install-ld || exit 1
|
||||
+elif [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-uclibc ]
|
||||
+ then
|
||||
+ make all-gdb all-dejagnu all-ld || exit 1
|
||||
+ make install-gdb install-dejagnu install-ld || exit 1
|
||||
elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then
|
||||
make bootstrap || exit 1
|
||||
make install || exit 1
|
@ -1,32 +0,0 @@
|
||||
From b9a7775674d91c7af8043a83211ffeaa576327d7 Mon Sep 17 00:00:00 2001
|
||||
From: Max Filippov <jcmvbkbc@gmail.com>
|
||||
Date: Fri, 10 Apr 2015 17:46:30 +0300
|
||||
Subject: [PATCH] Fix PR target/65730
|
||||
|
||||
2015-05-20 Max Filippov <jcmvbkbc@gmail.com>
|
||||
gcc/
|
||||
* config/xtensa/xtensa.c (init_alignment_context): Replace MULT
|
||||
by BITS_PER_UNIT with ASHIFT by exact_log2 (BITS_PER_UNIT).
|
||||
|
||||
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
|
||||
---
|
||||
Backported from: svn+ssh://gcc.gnu.org/svn/gcc/trunk@223452
|
||||
Changes to ChangeLog are dropped.
|
||||
|
||||
gcc/config/xtensa/xtensa.c | 5 +++--
|
||||
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/gcc/config/xtensa/xtensa.c
|
||||
+++ b/gcc/config/xtensa/xtensa.c
|
||||
@@ -1423,8 +1423,9 @@
|
||||
if (ac->shift != NULL_RTX)
|
||||
{
|
||||
/* Shift is the byte count, but we need the bitcount. */
|
||||
- ac->shift = expand_simple_binop (SImode, MULT, ac->shift,
|
||||
- GEN_INT (BITS_PER_UNIT),
|
||||
+ gcc_assert (exact_log2 (BITS_PER_UNIT) >= 0);
|
||||
+ ac->shift = expand_simple_binop (SImode, ASHIFT, ac->shift,
|
||||
+ GEN_INT (exact_log2 (BITS_PER_UNIT)),
|
||||
NULL_RTX, 1, OPTAB_DIRECT);
|
||||
ac->modemask = expand_simple_binop (SImode, ASHIFT,
|
||||
GEN_INT (GET_MODE_MASK (mode)),
|
@ -1,20 +0,0 @@
|
||||
From c037df1be41f8daf4d581d7ffa4ec8cfa640bccf Mon Sep 17 00:00:00 2001
|
||||
From: glisse <glisse@138bc75d-0d04-0410-961f-82ee72b054a4>
|
||||
Date: Fri, 25 Apr 2014 08:03:08 +0000
|
||||
Subject: [PATCH] 2014-04-25 Marc Glisse <marc.glisse@inria.fr>
|
||||
|
||||
PR target/43538
|
||||
* mt-gnu: Don't reset CXXFLAGS_FOR_TARGET.
|
||||
|
||||
|
||||
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@209784 138bc75d-0d04-0410-961f-82ee72b054a4
|
||||
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
|
||||
---
|
||||
config/mt-gnu | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/config/mt-gnu
|
||||
+++ b/config/mt-gnu
|
||||
@@ -1 +1 @@
|
||||
-CXXFLAGS_FOR_TARGET = $(CXXFLAGS) -D_GNU_SOURCE
|
||||
+CXXFLAGS_FOR_TARGET += -D_GNU_SOURCE
|
@ -1,23 +0,0 @@
|
||||
From 9bcf38cd9f382486b3823eb923b50e2e9a89cef7 Mon Sep 17 00:00:00 2001
|
||||
From: law <law@138bc75d-0d04-0410-961f-82ee72b054a4>
|
||||
Date: Tue, 18 Nov 2014 22:12:52 +0000
|
||||
Subject: [PATCH] 2014-11-17 Bob Dunlop <bob.dunlop@xyzzy.org.uk>
|
||||
|
||||
* mt-ospace (CFLAGS_FOR_TARGET): Append -g -Os rather than
|
||||
overwriting.
|
||||
(CXXFLAGS_FOR_TARGET): Similarly.
|
||||
|
||||
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@217739 138bc75d-0d04-0410-961f-82ee72b054a4
|
||||
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
|
||||
---
|
||||
config/mt-ospace | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/config/mt-ospace
|
||||
+++ b/config/mt-ospace
|
||||
@@ -1,3 +1,3 @@
|
||||
# Build libraries optimizing for space, not speed.
|
||||
- CFLAGS_FOR_TARGET = -g -Os
|
||||
- CXXFLAGS_FOR_TARGET = -g -Os
|
||||
+ CFLAGS_FOR_TARGET += -g -Os
|
||||
+ CXXFLAGS_FOR_TARGET += -g -Os
|
@ -1,141 +0,0 @@
|
||||
From 1e5f1089dec3af328fd03125d6778f666d0bd4e4 Mon Sep 17 00:00:00 2001
|
||||
From: edlinger <edlinger@138bc75d-0d04-0410-961f-82ee72b054a4>
|
||||
Date: Thu, 25 Feb 2016 15:33:50 +0000
|
||||
Subject: [PATCH 1/1] 2016-02-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
|
||||
|
||||
Backported from mainline
|
||||
2016-02-19 Jakub Jelinek <jakub@redhat.com>
|
||||
Bernd Edlinger <bernd.edlinger@hotmail.de>
|
||||
|
||||
* Make-lang.in: Invoke gperf with -L C++.
|
||||
* cfns.gperf: Remove prototypes for hash and libc_name_p
|
||||
inlines.
|
||||
* cfns.h: Regenerated.
|
||||
* except.c (nothrow_libfn_p): Adjust.
|
||||
|
||||
|
||||
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-5-branch@233720 138bc75d-0d04-0410-961f-82ee72b054a4
|
||||
---
|
||||
gcc/cp/Make-lang.in | 2 +-
|
||||
gcc/cp/cfns.gperf | 10 ++--------
|
||||
gcc/cp/cfns.h | 41 ++++++++++++++---------------------------
|
||||
gcc/cp/except.c | 3 ++-
|
||||
4 files changed, 19 insertions(+), 37 deletions(-)
|
||||
|
||||
--- a/gcc/cp/cfns.gperf
|
||||
+++ b/gcc/cp/cfns.gperf
|
||||
@@ -1,3 +1,5 @@
|
||||
+%language=C++
|
||||
+%define class-name libc_name
|
||||
%{
|
||||
/* Copyright (C) 2000-2013 Free Software Foundation, Inc.
|
||||
|
||||
@@ -16,14 +18,6 @@
|
||||
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/>. */
|
||||
-#ifdef __GNUC__
|
||||
-__inline
|
||||
-#endif
|
||||
-static unsigned int hash (const char *, unsigned int);
|
||||
-#ifdef __GNUC__
|
||||
-__inline
|
||||
-#endif
|
||||
-const char * libc_name_p (const char *, unsigned int);
|
||||
%}
|
||||
%%
|
||||
# The standard C library functions, for feeding to gperf; the result is used
|
||||
--- a/gcc/cp/cfns.h
|
||||
+++ b/gcc/cp/cfns.h
|
||||
@@ -1,5 +1,5 @@
|
||||
-/* ANSI-C code produced by gperf version 3.0.3 */
|
||||
-/* Command-line: gperf -o -C -E -k '1-6,$' -j1 -D -N libc_name_p -L ANSI-C cfns.gperf */
|
||||
+/* C++ code produced by gperf version 3.0.4 */
|
||||
+/* Command-line: gperf -o -C -E -k '1-6,$' -j1 -D -N libc_name_p -L C++ --output-file cfns.h cfns.gperf */
|
||||
|
||||
#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
|
||||
&& ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
|
||||
@@ -28,7 +28,7 @@
|
||||
#error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gnu-gperf@gnu.org>."
|
||||
#endif
|
||||
|
||||
-#line 1 "cfns.gperf"
|
||||
+#line 3 "cfns.gperf"
|
||||
|
||||
/* Copyright (C) 2000-2013 Free Software Foundation, Inc.
|
||||
|
||||
@@ -47,25 +47,18 @@
|
||||
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/>. */
|
||||
-#ifdef __GNUC__
|
||||
-__inline
|
||||
-#endif
|
||||
-static unsigned int hash (const char *, unsigned int);
|
||||
-#ifdef __GNUC__
|
||||
-__inline
|
||||
-#endif
|
||||
-const char * libc_name_p (const char *, unsigned int);
|
||||
/* maximum key range = 391, duplicates = 0 */
|
||||
|
||||
-#ifdef __GNUC__
|
||||
-__inline
|
||||
-#else
|
||||
-#ifdef __cplusplus
|
||||
-inline
|
||||
-#endif
|
||||
-#endif
|
||||
-static unsigned int
|
||||
-hash (register const char *str, register unsigned int len)
|
||||
+class libc_name
|
||||
+{
|
||||
+private:
|
||||
+ static inline unsigned int hash (const char *str, unsigned int len);
|
||||
+public:
|
||||
+ static const char *libc_name_p (const char *str, unsigned int len);
|
||||
+};
|
||||
+
|
||||
+inline unsigned int
|
||||
+libc_name::hash (register const char *str, register unsigned int len)
|
||||
{
|
||||
static const unsigned short asso_values[] =
|
||||
{
|
||||
@@ -122,14 +115,8 @@
|
||||
return hval + asso_values[(unsigned char)str[len - 1]];
|
||||
}
|
||||
|
||||
-#ifdef __GNUC__
|
||||
-__inline
|
||||
-#ifdef __GNUC_STDC_INLINE__
|
||||
-__attribute__ ((__gnu_inline__))
|
||||
-#endif
|
||||
-#endif
|
||||
const char *
|
||||
-libc_name_p (register const char *str, register unsigned int len)
|
||||
+libc_name::libc_name_p (register const char *str, register unsigned int len)
|
||||
{
|
||||
enum
|
||||
{
|
||||
--- a/gcc/cp/except.c
|
||||
+++ b/gcc/cp/except.c
|
||||
@@ -1025,7 +1025,8 @@
|
||||
unless the system headers are playing rename tricks, and if
|
||||
they are, we don't want to be confused by them. */
|
||||
id = DECL_NAME (fn);
|
||||
- return !!libc_name_p (IDENTIFIER_POINTER (id), IDENTIFIER_LENGTH (id));
|
||||
+ return !!libc_name::libc_name_p (IDENTIFIER_POINTER (id),
|
||||
+ IDENTIFIER_LENGTH (id));
|
||||
}
|
||||
|
||||
/* Returns nonzero if an exception of type FROM will be caught by a
|
||||
--- a/gcc/cp/Make-lang.in
|
||||
+++ b/gcc/cp/Make-lang.in
|
||||
@@ -115,7 +115,7 @@
|
||||
# deleting the $(srcdir)/cp/cfns.h file.
|
||||
$(srcdir)/cp/cfns.h:
|
||||
endif
|
||||
- gperf -o -C -E -k '1-6,$$' -j1 -D -N 'libc_name_p' -L ANSI-C \
|
||||
+ gperf -o -C -E -k '1-6,$$' -j1 -D -N 'libc_name_p' -L C++ \
|
||||
$(srcdir)/cp/cfns.gperf --output-file $(srcdir)/cp/cfns.h
|
||||
|
||||
#
|
@ -1,15 +0,0 @@
|
||||
---
|
||||
boehm-gc/include/gc.h | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/boehm-gc/include/gc.h
|
||||
+++ b/boehm-gc/include/gc.h
|
||||
@@ -503,7 +503,7 @@
|
||||
#if defined(__linux__) || defined(__GLIBC__)
|
||||
# include <features.h>
|
||||
# if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \
|
||||
- && !defined(__ia64__)
|
||||
+ && !defined(__ia64__) && !defined(__UCLIBC__)
|
||||
# ifndef GC_HAVE_BUILTIN_BACKTRACE
|
||||
# define GC_HAVE_BUILTIN_BACKTRACE
|
||||
# endif
|
@ -1,51 +0,0 @@
|
||||
---
|
||||
libmudflap/mf-hooks2.c | 10 +++++-----
|
||||
1 file changed, 5 insertions(+), 5 deletions(-)
|
||||
|
||||
--- a/libmudflap/mf-hooks2.c
|
||||
+++ b/libmudflap/mf-hooks2.c
|
||||
@@ -424,7 +424,7 @@
|
||||
{
|
||||
TRACE ("%s\n", __PRETTY_FUNCTION__);
|
||||
MF_VALIDATE_EXTENT(s, n, __MF_CHECK_WRITE, "bzero region");
|
||||
- bzero (s, n);
|
||||
+ memset (s, 0, n);
|
||||
}
|
||||
|
||||
|
||||
@@ -434,7 +434,7 @@
|
||||
TRACE ("%s\n", __PRETTY_FUNCTION__);
|
||||
MF_VALIDATE_EXTENT(src, n, __MF_CHECK_READ, "bcopy src");
|
||||
MF_VALIDATE_EXTENT(dest, n, __MF_CHECK_WRITE, "bcopy dest");
|
||||
- bcopy (src, dest, n);
|
||||
+ memmove (dest, src, n);
|
||||
}
|
||||
|
||||
|
||||
@@ -444,7 +444,7 @@
|
||||
TRACE ("%s\n", __PRETTY_FUNCTION__);
|
||||
MF_VALIDATE_EXTENT(s1, n, __MF_CHECK_READ, "bcmp 1st arg");
|
||||
MF_VALIDATE_EXTENT(s2, n, __MF_CHECK_READ, "bcmp 2nd arg");
|
||||
- return bcmp (s1, s2, n);
|
||||
+ return n == 0 ? 0 : memcmp (s1, s2, n);
|
||||
}
|
||||
|
||||
|
||||
@@ -453,7 +453,7 @@
|
||||
size_t n = strlen (s);
|
||||
TRACE ("%s\n", __PRETTY_FUNCTION__);
|
||||
MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "index region");
|
||||
- return index (s, c);
|
||||
+ return strchr (s, c);
|
||||
}
|
||||
|
||||
|
||||
@@ -462,7 +462,7 @@
|
||||
size_t n = strlen (s);
|
||||
TRACE ("%s\n", __PRETTY_FUNCTION__);
|
||||
MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "rindex region");
|
||||
- return rindex (s, c);
|
||||
+ return strrchr (s, c);
|
||||
}
|
||||
|
||||
/* XXX: stpcpy, memccpy */
|
@ -1,107 +0,0 @@
|
||||
---
|
||||
gcc/configure | 22 +++++++++++++++-------
|
||||
gcc/configure.ac | 18 +++++++++++++-----
|
||||
2 files changed, 28 insertions(+), 12 deletions(-)
|
||||
|
||||
--- a/gcc/configure
|
||||
+++ b/gcc/configure
|
||||
@@ -27366,6 +27366,9 @@
|
||||
|
||||
|
||||
pluginlibs=
|
||||
+PICFLAG="-fPIC"
|
||||
+UNDEFINEDPREAMBLE="extern int X;"
|
||||
+UNDEFINEDCODE="return X == 0;"
|
||||
|
||||
case "${host}" in
|
||||
*-*-darwin*)
|
||||
@@ -27377,6 +27380,11 @@
|
||||
export_sym_check=
|
||||
fi
|
||||
;;
|
||||
+ *-*-mingw*|*-*-cygwin*|*-*-msys*)
|
||||
+ PICFLAG=""
|
||||
+ UNDEFINEDPREAMBLE=""
|
||||
+ UNDEFINEDCODE=""
|
||||
+ ;;
|
||||
*)
|
||||
if test x$build = x$host; then
|
||||
export_sym_check="objdump${exeext} -T"
|
||||
@@ -27489,23 +27497,23 @@
|
||||
case "${host}" in
|
||||
*-*-darwin*)
|
||||
CFLAGS=`echo $CFLAGS | sed s/-mdynamic-no-pic//g`
|
||||
- CFLAGS="$CFLAGS -fPIC"
|
||||
+ CFLAGS="$CFLAGS ${PICFLAG}"
|
||||
LDFLAGS="$LDFLAGS -shared -undefined dynamic_lookup"
|
||||
;;
|
||||
*)
|
||||
- CFLAGS="$CFLAGS -fPIC"
|
||||
- LDFLAGS="$LDFLAGS -fPIC -shared"
|
||||
+ CFLAGS="$CFLAGS ${PICFLAG}"
|
||||
+ LDFLAGS="$LDFLAGS ${PICFLAG} -shared"
|
||||
;;
|
||||
esac
|
||||
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -fPIC -shared" >&5
|
||||
-$as_echo_n "checking for -fPIC -shared... " >&6; }
|
||||
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${PICFLAG} -shared" >&5
|
||||
+$as_echo_n "checking for ${PICFLAG} -shared... " >&6; }
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
-extern int X;
|
||||
+${UNDEFINEDPREAMBLE}
|
||||
int
|
||||
main ()
|
||||
{
|
||||
-return X == 0;
|
||||
+${UNDEFINEDCODE}
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
--- a/gcc/configure.ac
|
||||
+++ b/gcc/configure.ac
|
||||
@@ -5244,6 +5244,9 @@
|
||||
enable_plugin=yes; default_plugin=yes)
|
||||
|
||||
pluginlibs=
|
||||
+PICFLAG="-fPIC"
|
||||
+UNDEFINEDPREAMBLE="extern int X;"
|
||||
+UNDEFINEDCODE="return X == 0;"
|
||||
|
||||
case "${host}" in
|
||||
*-*-darwin*)
|
||||
@@ -5255,6 +5258,11 @@
|
||||
export_sym_check=
|
||||
fi
|
||||
;;
|
||||
+ *-*-mingw*|*-*-cygwin*|*-*-msys*)
|
||||
+ PICFLAG=""
|
||||
+ UNDEFINEDPREAMBLE=""
|
||||
+ UNDEFINEDCODE=""
|
||||
+ ;;
|
||||
*)
|
||||
if test x$build = x$host; then
|
||||
export_sym_check="objdump${exeext} -T"
|
||||
@@ -5306,17 +5314,17 @@
|
||||
case "${host}" in
|
||||
*-*-darwin*)
|
||||
CFLAGS=`echo $CFLAGS | sed s/-mdynamic-no-pic//g`
|
||||
- CFLAGS="$CFLAGS -fPIC"
|
||||
+ CFLAGS="$CFLAGS ${PICFLAG}"
|
||||
LDFLAGS="$LDFLAGS -shared -undefined dynamic_lookup"
|
||||
;;
|
||||
*)
|
||||
- CFLAGS="$CFLAGS -fPIC"
|
||||
- LDFLAGS="$LDFLAGS -fPIC -shared"
|
||||
+ CFLAGS="$CFLAGS ${PICFLAG}"
|
||||
+ LDFLAGS="$LDFLAGS ${PICFLAG} -shared"
|
||||
;;
|
||||
esac
|
||||
- AC_MSG_CHECKING([for -fPIC -shared])
|
||||
+ AC_MSG_CHECKING([for ${PICFLAG} -shared])
|
||||
AC_TRY_LINK(
|
||||
- [extern int X;],[return X == 0;],
|
||||
+ [${UNDEFINEDPREAMBLE}],[${UNDEFINEDCODE}],
|
||||
[AC_MSG_RESULT([yes]); have_pic_shared=yes],
|
||||
[AC_MSG_RESULT([no]); have_pic_shared=no])
|
||||
if test x"$have_pic_shared" != x"yes" -o x"$ac_cv_search_dlopen" = x"no"; then
|
@ -1,31 +0,0 @@
|
||||
---
|
||||
gcc/config/arm/linux-elf.h | 2 +-
|
||||
libgcc/config/arm/t-linux | 7 ++++++-
|
||||
2 files changed, 7 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/gcc/config/arm/linux-elf.h
|
||||
+++ b/gcc/config/arm/linux-elf.h
|
||||
@@ -55,7 +55,7 @@
|
||||
%{shared:-lc} \
|
||||
%{!shared:%{profile:-lc_p}%{!profile:-lc}}"
|
||||
|
||||
-#define LIBGCC_SPEC "%{mfloat-abi=soft*:-lfloat} -lgcc"
|
||||
+#define LIBGCC_SPEC "-lgcc"
|
||||
|
||||
#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
|
||||
|
||||
--- a/libgcc/config/arm/t-linux
|
||||
+++ b/libgcc/config/arm/t-linux
|
||||
@@ -1,6 +1,11 @@
|
||||
LIB1ASMSRC = arm/lib1funcs.S
|
||||
LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx _clzsi2 _clzdi2 \
|
||||
- _ctzsi2 _arm_addsubdf3 _arm_addsubsf3
|
||||
+ _ctzsi2 _arm_addsubdf3 _arm_addsubsf3 \
|
||||
+ _arm_addsubdf3 _arm_addsubsf3 \
|
||||
+ _arm_negdf2 _arm_muldivdf3 _arm_cmpdf2 _arm_unorddf2 \
|
||||
+ _arm_fixdfsi _arm_fixunsdfsi _arm_truncdfsf2 \
|
||||
+ _arm_negsf2 _arm_muldivsf3 _arm_cmpsf2 _arm_unordsf2 \
|
||||
+ _arm_fixsfsi _arm_fixunssfsi
|
||||
|
||||
# Just for these, we omit the frame pointer since it makes such a big
|
||||
# difference.
|
@ -1,17 +0,0 @@
|
||||
http://sourceware.org/ml/crossgcc/2008-05/msg00009.html
|
||||
|
||||
---
|
||||
gcc/config/arm/linux-eabi.h | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/gcc/config/arm/linux-eabi.h
|
||||
+++ b/gcc/config/arm/linux-eabi.h
|
||||
@@ -45,7 +45,7 @@
|
||||
The ARM10TDMI core is the default for armv5t, so set
|
||||
SUBTARGET_CPU_DEFAULT to achieve this. */
|
||||
#undef SUBTARGET_CPU_DEFAULT
|
||||
-#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm10tdmi
|
||||
+#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm9tdmi
|
||||
|
||||
/* TARGET_BIG_ENDIAN_DEFAULT is set in
|
||||
config.gcc for big endian configurations. */
|
@ -1,26 +0,0 @@
|
||||
This backports fix from http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57717
|
||||
|
||||
Upstream-Status: Backport
|
||||
Signed-off-by: Julian Brown <Julian_Brown@mentor.com>
|
||||
[Gustavo: Update for gcc 4.8.3]
|
||||
|
||||
fix for PR57717 (PowerPC E500v2)
|
||||
http://gcc.gnu.org/ml/gcc-patches/2013-08/msg00668.html
|
||||
|
||||
---
|
||||
gcc/config/rs6000/rs6000.c | 4 +---
|
||||
1 file changed, 1 insertion(+), 3 deletions(-)
|
||||
|
||||
--- a/gcc/config/rs6000/rs6000.c
|
||||
+++ b/gcc/config/rs6000/rs6000.c
|
||||
@@ -7479,9 +7479,7 @@
|
||||
&& GET_CODE (XEXP (x, 1)) == CONST_INT
|
||||
&& reg_offset_p
|
||||
&& !SPE_VECTOR_MODE (mode)
|
||||
- && !(TARGET_E500_DOUBLE && (mode == DFmode || mode == TFmode
|
||||
- || mode == DDmode || mode == TDmode
|
||||
- || mode == DImode))
|
||||
+ && !(TARGET_E500_DOUBLE && GET_MODE_SIZE (mode) > UNITS_PER_WORD)
|
||||
&& (!VECTOR_MODE_P (mode) || VECTOR_MEM_NONE_P (mode)))
|
||||
{
|
||||
HOST_WIDE_INT val = INTVAL (XEXP (x, 1));
|
115
packages/gcc-linaro/4.8-2015.06/0014-PR60155.patch
vendored
115
packages/gcc-linaro/4.8-2015.06/0014-PR60155.patch
vendored
@ -1,115 +0,0 @@
|
||||
From gcc bugzilla https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60155
|
||||
Upstream status: in trunk.
|
||||
|
||||
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
|
||||
|
||||
---
|
||||
gcc/gcse.c | 71 ++++++++++++++++++++++++++++++++++++++++++++++++++++++-------
|
||||
1 file changed, 64 insertions(+), 7 deletions(-)
|
||||
|
||||
--- a/gcc/gcse.c
|
||||
+++ b/gcc/gcse.c
|
||||
@@ -2479,6 +2479,65 @@
|
||||
}
|
||||
}
|
||||
|
||||
+struct set_data
|
||||
+{
|
||||
+ rtx insn;
|
||||
+ const_rtx set;
|
||||
+ int nsets;
|
||||
+};
|
||||
+
|
||||
+/* Increment number of sets and record set in DATA. */
|
||||
+
|
||||
+static void
|
||||
+record_set_data (rtx dest, const_rtx set, void *data)
|
||||
+{
|
||||
+ struct set_data *s = (struct set_data *)data;
|
||||
+
|
||||
+ if (GET_CODE (set) == SET)
|
||||
+ {
|
||||
+ /* We allow insns having multiple sets, where all but one are
|
||||
+ dead as single set insns. In the common case only a single
|
||||
+ set is present, so we want to avoid checking for REG_UNUSED
|
||||
+ notes unless necessary. */
|
||||
+ if (s->nsets == 1
|
||||
+ && find_reg_note (s->insn, REG_UNUSED, SET_DEST (s->set))
|
||||
+ && !side_effects_p (s->set))
|
||||
+ s->nsets = 0;
|
||||
+
|
||||
+ if (!s->nsets)
|
||||
+ {
|
||||
+ /* Record this set. */
|
||||
+ s->nsets += 1;
|
||||
+ s->set = set;
|
||||
+ }
|
||||
+ else if (!find_reg_note (s->insn, REG_UNUSED, dest)
|
||||
+ || side_effects_p (set))
|
||||
+ s->nsets += 1;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static const_rtx
|
||||
+single_set_gcse (rtx insn)
|
||||
+{
|
||||
+ struct set_data s;
|
||||
+ rtx pattern;
|
||||
+
|
||||
+ gcc_assert (INSN_P (insn));
|
||||
+
|
||||
+ /* Optimize common case. */
|
||||
+ pattern = PATTERN (insn);
|
||||
+ if (GET_CODE (pattern) == SET)
|
||||
+ return pattern;
|
||||
+
|
||||
+ s.insn = insn;
|
||||
+ s.nsets = 0;
|
||||
+ note_stores (pattern, record_set_data, &s);
|
||||
+
|
||||
+ /* Considered invariant insns have exactly one set. */
|
||||
+ gcc_assert (s.nsets == 1);
|
||||
+ return s.set;
|
||||
+}
|
||||
+
|
||||
/* Emit move from SRC to DEST noting the equivalence with expression computed
|
||||
in INSN. */
|
||||
|
||||
@@ -2486,7 +2545,8 @@
|
||||
gcse_emit_move_after (rtx dest, rtx src, rtx insn)
|
||||
{
|
||||
rtx new_rtx;
|
||||
- rtx set = single_set (insn), set2;
|
||||
+ const_rtx set = single_set_gcse (insn);
|
||||
+ rtx set2;
|
||||
rtx note;
|
||||
rtx eqv = NULL_RTX;
|
||||
|
||||
@@ -3345,13 +3405,12 @@
|
||||
FOR_EACH_VEC_ELT (occrs_to_hoist, j, occr)
|
||||
{
|
||||
rtx insn;
|
||||
- rtx set;
|
||||
+ const_rtx set;
|
||||
|
||||
gcc_assert (!occr->deleted_p);
|
||||
|
||||
insn = occr->insn;
|
||||
- set = single_set (insn);
|
||||
- gcc_assert (set);
|
||||
+ set = single_set_gcse (insn);
|
||||
|
||||
/* Create a pseudo-reg to store the result of reaching
|
||||
expressions into. Get the mode for the new pseudo
|
||||
@@ -3432,10 +3491,8 @@
|
||||
{
|
||||
rtx reg;
|
||||
enum reg_class pressure_class;
|
||||
- rtx set = single_set (insn);
|
||||
+ const_rtx set = single_set_gcse (insn);
|
||||
|
||||
- /* Considered invariant insns have only one set. */
|
||||
- gcc_assert (set != NULL_RTX);
|
||||
reg = SET_DEST (set);
|
||||
if (GET_CODE (reg) == SUBREG)
|
||||
reg = SUBREG_REG (reg);
|
@ -1,26 +0,0 @@
|
||||
From 845478644ba54a6947e9b224f2e5cd342e8257a9 Mon Sep 17 00:00:00 2001
|
||||
From: Andrew Hsieh <andrewhsieh@google.com>
|
||||
Date: Wed, 25 Jun 2014 22:13:48 -0700
|
||||
Subject: [PATCH] Fix a typo in vmlaq_lane_s32
|
||||
|
||||
BUG=15526898
|
||||
|
||||
Change-Id: I4e35a764d369d378808dab29beefe34d1f93249b
|
||||
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
|
||||
---
|
||||
|
||||
---
|
||||
gcc/config/aarch64/arm_neon.h | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/gcc/config/aarch64/arm_neon.h
|
||||
+++ b/gcc/config/aarch64/arm_neon.h
|
||||
@@ -8303,7 +8303,7 @@
|
||||
#define vmlaq_lane_s32(a, b, c, d) \
|
||||
__extension__ \
|
||||
({ \
|
||||
- int32x4_t c_ = (c); \
|
||||
+ int32x2_t c_ = (c); \
|
||||
int32x4_t b_ = (b); \
|
||||
int32x4_t a_ = (a); \
|
||||
int32x4_t result; \
|
@ -1,257 +0,0 @@
|
||||
Allow C99-depending features of libstdc++ with uClibc
|
||||
|
||||
The libstdc++ code is fairly restrictive on how it checks for C99
|
||||
compatibility: it requires *complete* C99 support to enable certain
|
||||
features. For example, uClibc provides a good number of C99 features,
|
||||
but not C99 complex number support. For this reason, libstdc++
|
||||
completely disables many the standard C++ methods that can in fact
|
||||
work because uClibc provides the necessary functions.
|
||||
|
||||
This patch is similar and highly inspired from
|
||||
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58393, but implemented in
|
||||
a way that doesn't involve changing the configure.ac script, as
|
||||
autoreconfiguring gcc is complicated. It simply relies on the fact
|
||||
that uClibc defines the __UCLIBC__ definition.
|
||||
|
||||
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
||||
|
||||
---
|
||||
libstdc++-v3/config/locale/generic/c_locale.h | 2 +-
|
||||
libstdc++-v3/config/locale/gnu/c_locale.h | 2 +-
|
||||
libstdc++-v3/include/bits/basic_string.h | 2 +-
|
||||
libstdc++-v3/include/bits/locale_facets.tcc | 2 +-
|
||||
libstdc++-v3/include/bits/locale_facets_nonio.tcc | 2 +-
|
||||
libstdc++-v3/include/c_compatibility/math.h | 2 +-
|
||||
libstdc++-v3/include/c_compatibility/wchar.h | 2 +-
|
||||
libstdc++-v3/include/c_global/cstdio | 2 +-
|
||||
libstdc++-v3/include/c_global/cstdlib | 2 +-
|
||||
libstdc++-v3/include/c_global/cwchar | 4 ++--
|
||||
libstdc++-v3/include/c_std/cstdio | 2 +-
|
||||
libstdc++-v3/include/c_std/cstdlib | 2 +-
|
||||
libstdc++-v3/include/c_std/cwchar | 2 +-
|
||||
libstdc++-v3/include/ext/vstring.h | 2 +-
|
||||
libstdc++-v3/include/tr1/cstdio | 2 +-
|
||||
libstdc++-v3/include/tr1/cstdlib | 2 +-
|
||||
libstdc++-v3/include/tr1/cwchar | 2 +-
|
||||
libstdc++-v3/include/tr1/stdlib.h | 2 +-
|
||||
libstdc++-v3/src/c++11/debug.cc | 2 +-
|
||||
19 files changed, 20 insertions(+), 20 deletions(-)
|
||||
|
||||
--- a/libstdc++-v3/config/locale/generic/c_locale.h
|
||||
+++ b/libstdc++-v3/config/locale/generic/c_locale.h
|
||||
@@ -70,7 +70,7 @@
|
||||
__builtin_va_list __args;
|
||||
__builtin_va_start(__args, __fmt);
|
||||
|
||||
-#ifdef _GLIBCXX_USE_C99
|
||||
+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
|
||||
const int __ret = __builtin_vsnprintf(__out, __size, __fmt, __args);
|
||||
#else
|
||||
const int __ret = __builtin_vsprintf(__out, __fmt, __args);
|
||||
--- a/libstdc++-v3/config/locale/gnu/c_locale.h
|
||||
+++ b/libstdc++-v3/config/locale/gnu/c_locale.h
|
||||
@@ -88,7 +88,7 @@
|
||||
__builtin_va_list __args;
|
||||
__builtin_va_start(__args, __fmt);
|
||||
|
||||
-#ifdef _GLIBCXX_USE_C99
|
||||
+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
|
||||
const int __ret = __builtin_vsnprintf(__out, __size, __fmt, __args);
|
||||
#else
|
||||
const int __ret = __builtin_vsprintf(__out, __fmt, __args);
|
||||
--- a/libstdc++-v3/include/bits/basic_string.h
|
||||
+++ b/libstdc++-v3/include/bits/basic_string.h
|
||||
@@ -2809,7 +2809,7 @@
|
||||
_GLIBCXX_END_NAMESPACE_VERSION
|
||||
} // namespace
|
||||
|
||||
-#if ((__cplusplus >= 201103L) && defined(_GLIBCXX_USE_C99) \
|
||||
+#if ((__cplusplus >= 201103L) && (defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)) \
|
||||
&& !defined(_GLIBCXX_HAVE_BROKEN_VSWPRINTF))
|
||||
|
||||
#include <ext/string_conversions.h>
|
||||
--- a/libstdc++-v3/include/bits/locale_facets.tcc
|
||||
+++ b/libstdc++-v3/include/bits/locale_facets.tcc
|
||||
@@ -987,7 +987,7 @@
|
||||
char __fbuf[16];
|
||||
__num_base::_S_format_float(__io, __fbuf, __mod);
|
||||
|
||||
-#ifdef _GLIBCXX_USE_C99
|
||||
+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
|
||||
// First try a buffer perhaps big enough (most probably sufficient
|
||||
// for non-ios_base::fixed outputs)
|
||||
int __cs_size = __max_digits * 3;
|
||||
--- a/libstdc++-v3/include/bits/locale_facets_nonio.tcc
|
||||
+++ b/libstdc++-v3/include/bits/locale_facets_nonio.tcc
|
||||
@@ -572,7 +572,7 @@
|
||||
{
|
||||
const locale __loc = __io.getloc();
|
||||
const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc);
|
||||
-#ifdef _GLIBCXX_USE_C99
|
||||
+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
|
||||
// First try a buffer perhaps big enough.
|
||||
int __cs_size = 64;
|
||||
char* __cs = static_cast<char*>(__builtin_alloca(__cs_size));
|
||||
--- a/libstdc++-v3/include/c_compatibility/math.h
|
||||
+++ b/libstdc++-v3/include/c_compatibility/math.h
|
||||
@@ -56,7 +56,7 @@
|
||||
using std::floor;
|
||||
using std::fmod;
|
||||
|
||||
-#if _GLIBCXX_USE_C99
|
||||
+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
|
||||
using std::fpclassify;
|
||||
using std::isfinite;
|
||||
using std::isinf;
|
||||
--- a/libstdc++-v3/include/c_compatibility/wchar.h
|
||||
+++ b/libstdc++-v3/include/c_compatibility/wchar.h
|
||||
@@ -103,7 +103,7 @@
|
||||
using std::wmemset;
|
||||
using std::wcsftime;
|
||||
|
||||
-#if _GLIBCXX_USE_C99
|
||||
+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
|
||||
using std::wcstold;
|
||||
using std::wcstoll;
|
||||
using std::wcstoull;
|
||||
--- a/libstdc++-v3/include/c_global/cstdlib
|
||||
+++ b/libstdc++-v3/include/c_global/cstdlib
|
||||
@@ -182,7 +182,7 @@
|
||||
_GLIBCXX_END_NAMESPACE_VERSION
|
||||
} // namespace
|
||||
|
||||
-#if _GLIBCXX_USE_C99
|
||||
+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
|
||||
|
||||
#undef _Exit
|
||||
#undef llabs
|
||||
--- a/libstdc++-v3/include/c_global/cwchar
|
||||
+++ b/libstdc++-v3/include/c_global/cwchar
|
||||
@@ -232,7 +232,7 @@
|
||||
_GLIBCXX_END_NAMESPACE_VERSION
|
||||
} // namespace
|
||||
|
||||
-#if _GLIBCXX_USE_C99
|
||||
+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
|
||||
|
||||
#undef wcstold
|
||||
#undef wcstoll
|
||||
@@ -289,7 +289,7 @@
|
||||
using std::vwscanf;
|
||||
#endif
|
||||
|
||||
-#if _GLIBCXX_USE_C99
|
||||
+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
|
||||
using std::wcstold;
|
||||
using std::wcstoll;
|
||||
using std::wcstoull;
|
||||
--- a/libstdc++-v3/include/c_std/cstdio
|
||||
+++ b/libstdc++-v3/include/c_std/cstdio
|
||||
@@ -139,7 +139,7 @@
|
||||
using ::vsprintf;
|
||||
} // namespace std
|
||||
|
||||
-#if _GLIBCXX_USE_C99
|
||||
+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
|
||||
|
||||
#undef snprintf
|
||||
#undef vfscanf
|
||||
--- a/libstdc++-v3/include/c_std/cstdlib
|
||||
+++ b/libstdc++-v3/include/c_std/cstdlib
|
||||
@@ -180,7 +180,7 @@
|
||||
_GLIBCXX_END_NAMESPACE_VERSION
|
||||
} // namespace
|
||||
|
||||
-#if _GLIBCXX_USE_C99
|
||||
+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
|
||||
|
||||
#undef _Exit
|
||||
#undef llabs
|
||||
--- a/libstdc++-v3/include/c_std/cwchar
|
||||
+++ b/libstdc++-v3/include/c_std/cwchar
|
||||
@@ -228,7 +228,7 @@
|
||||
_GLIBCXX_END_NAMESPACE_VERSION
|
||||
} // namespace
|
||||
|
||||
-#if _GLIBCXX_USE_C99
|
||||
+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
|
||||
|
||||
#undef wcstold
|
||||
#undef wcstoll
|
||||
--- a/libstdc++-v3/include/ext/vstring.h
|
||||
+++ b/libstdc++-v3/include/ext/vstring.h
|
||||
@@ -2571,7 +2571,7 @@
|
||||
_GLIBCXX_END_NAMESPACE_VERSION
|
||||
} // namespace
|
||||
|
||||
-#if ((__cplusplus >= 201103L) && defined(_GLIBCXX_USE_C99))
|
||||
+#if ((__cplusplus >= 201103L) && (defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)))
|
||||
|
||||
#include <ext/string_conversions.h>
|
||||
|
||||
--- a/libstdc++-v3/include/tr1/cstdio
|
||||
+++ b/libstdc++-v3/include/tr1/cstdio
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
#include <cstdio>
|
||||
|
||||
-#if _GLIBCXX_USE_C99
|
||||
+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
|
||||
|
||||
namespace std _GLIBCXX_VISIBILITY(default)
|
||||
{
|
||||
--- a/libstdc++-v3/include/tr1/cstdlib
|
||||
+++ b/libstdc++-v3/include/tr1/cstdlib
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
#if _GLIBCXX_HOSTED
|
||||
|
||||
-#if _GLIBCXX_USE_C99
|
||||
+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
|
||||
|
||||
namespace std _GLIBCXX_VISIBILITY(default)
|
||||
{
|
||||
--- a/libstdc++-v3/include/tr1/cwchar
|
||||
+++ b/libstdc++-v3/include/tr1/cwchar
|
||||
@@ -52,7 +52,7 @@
|
||||
using std::vwscanf;
|
||||
#endif
|
||||
|
||||
-#if _GLIBCXX_USE_C99
|
||||
+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
|
||||
using std::wcstold;
|
||||
using std::wcstoll;
|
||||
using std::wcstoull;
|
||||
--- a/libstdc++-v3/include/tr1/stdlib.h
|
||||
+++ b/libstdc++-v3/include/tr1/stdlib.h
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
#if _GLIBCXX_HOSTED
|
||||
|
||||
-#if _GLIBCXX_USE_C99
|
||||
+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
|
||||
|
||||
using std::tr1::atoll;
|
||||
using std::tr1::strtoll;
|
||||
--- a/libstdc++-v3/src/c++11/debug.cc
|
||||
+++ b/libstdc++-v3/src/c++11/debug.cc
|
||||
@@ -787,7 +787,7 @@
|
||||
int __n __attribute__ ((__unused__)),
|
||||
const char* __fmt, _Tp __s) const throw ()
|
||||
{
|
||||
-#ifdef _GLIBCXX_USE_C99
|
||||
+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
|
||||
std::snprintf(__buf, __n, __fmt, __s);
|
||||
#else
|
||||
std::sprintf(__buf, __fmt, __s);
|
||||
--- a/libstdc++-v3/include/c_global/cstdio
|
||||
+++ b/libstdc++-v3/include/c_global/cstdio
|
||||
@@ -139,7 +139,7 @@
|
||||
using ::vsprintf;
|
||||
} // namespace
|
||||
|
||||
-#if _GLIBCXX_USE_C99
|
||||
+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
|
||||
|
||||
#undef snprintf
|
||||
#undef vfscanf
|
@ -1,235 +0,0 @@
|
||||
From afe990251bd9b3a063f03da31a3b8d139d033bc3 Mon Sep 17 00:00:00 2001
|
||||
From: ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
|
||||
Date: Sat, 1 Jun 2013 00:20:49 +0000
|
||||
Subject: [PATCH] PR other/56780
|
||||
|
||||
* libiberty/configure.ac: Move test for --enable-install-libiberty
|
||||
outside of the 'with_target_subdir' test so that it actually gets
|
||||
run. Add output messages to show the test result.
|
||||
* libiberty/configure: Regenerate.
|
||||
* libiberty/Makefile.in (install_to_libdir): Place the
|
||||
installation of the libiberty library in the same guard as that
|
||||
used for the headers to prevent it being installed unless
|
||||
requested via --enable-install-libiberty.
|
||||
|
||||
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@199570 138bc75d-0d04-0410-961f-82ee72b054a4
|
||||
|
||||
libiberty: fix --enable-install-libiberty flag [PR 56780]
|
||||
|
||||
Commit 199570 fixed the --disable-install-libiberty behavior, but it also
|
||||
added a bug where the enable path never works because the initial clear
|
||||
of target_header_dir wasn't deleted. So we end up initializing properly
|
||||
at the top only to reset it at the end all the time.
|
||||
|
||||
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@206367 138bc75d-0d04-0410-961f-82ee72b054a4
|
||||
|
||||
[Romain
|
||||
squash the two upstream commits
|
||||
Remove the ChangeLog]
|
||||
Signed-off-by: Romain Naour <romain.naour@openwide.fr>
|
||||
---
|
||||
libiberty/Makefile.in | 24 ++++++++++----------
|
||||
libiberty/configure | 57 ++++++++++++++++++++++++++-----------------------
|
||||
libiberty/configure.ac | 47 +++++++++++++++++++++-------------------
|
||||
3 files changed, 68 insertions(+), 60 deletions(-)
|
||||
|
||||
--- a/libiberty/Makefile.in
|
||||
+++ b/libiberty/Makefile.in
|
||||
@@ -355,19 +355,19 @@
|
||||
# since it will be passed the multilib flags.
|
||||
MULTIOSDIR = `$(CC) $(CFLAGS) -print-multi-os-directory`
|
||||
install_to_libdir: all
|
||||
- ${mkinstalldirs} $(DESTDIR)$(libdir)/$(MULTIOSDIR)
|
||||
- $(INSTALL_DATA) $(TARGETLIB) $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB)n
|
||||
- ( cd $(DESTDIR)$(libdir)/$(MULTIOSDIR) ; chmod 644 $(TARGETLIB)n ;$(RANLIB) $(TARGETLIB)n )
|
||||
- mv -f $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB)n $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB)
|
||||
if test -n "${target_header_dir}"; then \
|
||||
- case "${target_header_dir}" in \
|
||||
- /*) thd=${target_header_dir};; \
|
||||
- *) thd=${includedir}/${target_header_dir};; \
|
||||
- esac; \
|
||||
- ${mkinstalldirs} $(DESTDIR)$${thd}; \
|
||||
- for h in ${INSTALLED_HEADERS}; do \
|
||||
- ${INSTALL_DATA} $$h $(DESTDIR)$${thd}; \
|
||||
- done; \
|
||||
+ ${mkinstalldirs} $(DESTDIR)$(libdir)/$(MULTIOSDIR); \
|
||||
+ $(INSTALL_DATA) $(TARGETLIB) $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB)n; \
|
||||
+ ( cd $(DESTDIR)$(libdir)/$(MULTIOSDIR) ; chmod 644 $(TARGETLIB)n ;$(RANLIB) $(TARGETLIB)n ); \
|
||||
+ mv -f $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB)n $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB); \
|
||||
+ case "${target_header_dir}" in \
|
||||
+ /*) thd=${target_header_dir};; \
|
||||
+ *) thd=${includedir}/${target_header_dir};; \
|
||||
+ esac; \
|
||||
+ ${mkinstalldirs} $(DESTDIR)$${thd}; \
|
||||
+ for h in ${INSTALLED_HEADERS}; do \
|
||||
+ ${INSTALL_DATA} $$h $(DESTDIR)$${thd}; \
|
||||
+ done; \
|
||||
fi
|
||||
@$(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=install
|
||||
|
||||
--- a/libiberty/configure
|
||||
+++ b/libiberty/configure
|
||||
@@ -675,8 +675,8 @@
|
||||
with_newlib
|
||||
enable_maintainer_mode
|
||||
enable_multilib
|
||||
-enable_largefile
|
||||
enable_install_libiberty
|
||||
+enable_largefile
|
||||
'
|
||||
ac_precious_vars='build_alias
|
||||
host_alias
|
||||
@@ -1303,8 +1303,8 @@
|
||||
enable make rules and dependencies not useful
|
||||
(and sometimes confusing) to the casual installer
|
||||
--enable-multilib build many library versions (default)
|
||||
+ --enable-install-libiberty Install headers and library for end users
|
||||
--disable-largefile omit support for large files
|
||||
- --enable-install-libiberty Install headers for end users
|
||||
|
||||
Optional Packages:
|
||||
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
|
||||
@@ -2784,6 +2784,35 @@
|
||||
cross_compiling=maybe
|
||||
fi
|
||||
|
||||
+# We may wish to install the target headers somewhere.
|
||||
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to install libiberty headers and static library" >&5
|
||||
+$as_echo_n "checking whether to install libiberty headers and static library... " >&6; }
|
||||
+
|
||||
+# Check whether --enable-install-libiberty was given.
|
||||
+if test "${enable_install_libiberty+set}" = set; then :
|
||||
+ enableval=$enable_install_libiberty; enable_install_libiberty=$enableval
|
||||
+else
|
||||
+ enable_install_libiberty=no
|
||||
+fi
|
||||
+
|
||||
+# Option parsed, now set things appropriately.
|
||||
+case x"$enable_install_libiberty" in
|
||||
+ xyes|x)
|
||||
+ target_header_dir=libiberty
|
||||
+ ;;
|
||||
+ xno)
|
||||
+ target_header_dir=
|
||||
+ ;;
|
||||
+ *)
|
||||
+ # This could be sanity-checked in various ways...
|
||||
+ target_header_dir="${enable_install_libiberty}"
|
||||
+ ;;
|
||||
+esac
|
||||
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_install_libiberty" >&5
|
||||
+$as_echo "$enable_install_libiberty" >&6; }
|
||||
+{ $as_echo "$as_me:${as_lineno-$LINENO}: target_header_dir = $target_header_dir" >&5
|
||||
+$as_echo "$as_me: target_header_dir = $target_header_dir" >&6;}
|
||||
+
|
||||
|
||||
ac_ext=c
|
||||
ac_cpp='$CPP $CPPFLAGS'
|
||||
@@ -5476,7 +5505,6 @@
|
||||
|
||||
setobjs=
|
||||
CHECK=
|
||||
-target_header_dir=
|
||||
if test -n "${with_target_subdir}"; then
|
||||
|
||||
# We are being configured as a target library. AC_REPLACE_FUNCS
|
||||
@@ -5759,29 +5787,6 @@
|
||||
|
||||
esac
|
||||
|
||||
- # We may wish to install the target headers somewhere.
|
||||
- # Check whether --enable-install-libiberty was given.
|
||||
-if test "${enable_install_libiberty+set}" = set; then :
|
||||
- enableval=$enable_install_libiberty; enable_install_libiberty=$enableval
|
||||
-else
|
||||
- enable_install_libiberty=no
|
||||
-fi
|
||||
-
|
||||
- # Option parsed, now set things appropriately.
|
||||
- case x"$enable_install_libiberty" in
|
||||
- xyes|x)
|
||||
- target_header_dir=libiberty
|
||||
- ;;
|
||||
- xno)
|
||||
- target_header_dir=
|
||||
- ;;
|
||||
- *)
|
||||
- # This could be sanity-checked in various ways...
|
||||
- target_header_dir="${enable_install_libiberty}"
|
||||
- ;;
|
||||
- esac
|
||||
-
|
||||
-
|
||||
else
|
||||
|
||||
# Not a target library, so we set things up to run the test suite.
|
||||
--- a/libiberty/configure.ac
|
||||
+++ b/libiberty/configure.ac
|
||||
@@ -128,6 +128,31 @@
|
||||
cross_compiling=maybe
|
||||
fi
|
||||
|
||||
+# We may wish to install the target headers somewhere.
|
||||
+AC_MSG_CHECKING([whether to install libiberty headers and static library])
|
||||
+dnl install-libiberty is disabled by default
|
||||
+
|
||||
+AC_ARG_ENABLE(install-libiberty,
|
||||
+[ --enable-install-libiberty Install headers and library for end users],
|
||||
+enable_install_libiberty=$enableval,
|
||||
+enable_install_libiberty=no)dnl
|
||||
+
|
||||
+# Option parsed, now set things appropriately.
|
||||
+case x"$enable_install_libiberty" in
|
||||
+ xyes|x)
|
||||
+ target_header_dir=libiberty
|
||||
+ ;;
|
||||
+ xno)
|
||||
+ target_header_dir=
|
||||
+ ;;
|
||||
+ *)
|
||||
+ # This could be sanity-checked in various ways...
|
||||
+ target_header_dir="${enable_install_libiberty}"
|
||||
+ ;;
|
||||
+esac
|
||||
+AC_MSG_RESULT($enable_install_libiberty)
|
||||
+AC_MSG_NOTICE([target_header_dir = $target_header_dir])
|
||||
+
|
||||
GCC_NO_EXECUTABLES
|
||||
AC_PROG_CC
|
||||
AC_SYS_LARGEFILE
|
||||
@@ -380,7 +405,6 @@
|
||||
|
||||
setobjs=
|
||||
CHECK=
|
||||
-target_header_dir=
|
||||
if test -n "${with_target_subdir}"; then
|
||||
|
||||
# We are being configured as a target library. AC_REPLACE_FUNCS
|
||||
@@ -492,27 +516,6 @@
|
||||
|
||||
esac
|
||||
|
||||
- # We may wish to install the target headers somewhere.
|
||||
- AC_ARG_ENABLE(install-libiberty,
|
||||
- [ --enable-install-libiberty Install headers for end users],
|
||||
- enable_install_libiberty=$enableval,
|
||||
- enable_install_libiberty=no)dnl
|
||||
-
|
||||
- # Option parsed, now set things appropriately.
|
||||
- case x"$enable_install_libiberty" in
|
||||
- xyes|x)
|
||||
- target_header_dir=libiberty
|
||||
- ;;
|
||||
- xno)
|
||||
- target_header_dir=
|
||||
- ;;
|
||||
- *)
|
||||
- # This could be sanity-checked in various ways...
|
||||
- target_header_dir="${enable_install_libiberty}"
|
||||
- ;;
|
||||
- esac
|
||||
-
|
||||
-
|
||||
else
|
||||
|
||||
# Not a target library, so we set things up to run the test suite.
|
@ -1,273 +0,0 @@
|
||||
From 6d852ffb43b111a39162135c95249e749c4e285b Mon Sep 17 00:00:00 2001
|
||||
From: Max Filippov <jcmvbkbc@gmail.com>
|
||||
Date: Thu, 6 Aug 2015 01:16:02 +0300
|
||||
Subject: [PATCH] xtensa: add -mauto-litpools option
|
||||
|
||||
With support from assembler this option allows compiling huge functions,
|
||||
where single literal pool at the beginning of a function may not be
|
||||
reachable by L32R instructions at its end.
|
||||
|
||||
Currently assembler --auto-litpools option cannot deal with literals
|
||||
used from multiple locations separated by more than 256 KBytes of code.
|
||||
Don't turn constants into literals, instead use MOVI instruction to load
|
||||
them into registers and let the assembler turn them into literals as
|
||||
necessary.
|
||||
|
||||
2015-08-12 Max Filippov <jcmvbkbc@gmail.com>
|
||||
gcc/
|
||||
* config/xtensa/constraints.md (define_constraint "Y"): New
|
||||
constraint.
|
||||
* config/xtensa/elf.h (ASM_SPEC): Add m(no-)auto-litpools.
|
||||
* config/xtensa/linux.h (ASM_SPEC): Likewise.
|
||||
* config/xtensa/predicates.md (move_operand): Match constants
|
||||
and symbols in the presence of TARGET_AUTO_LITPOOLS.
|
||||
* config/xtensa/xtensa.c (xtensa_valid_move): Don't allow
|
||||
immediate references to TLS data.
|
||||
(xtensa_emit_move_sequence): Don't force constants to memory in
|
||||
the presence of TARGET_AUTO_LITPOOLS.
|
||||
(print_operand): Add 'y' format, same as default, but capable of
|
||||
printing SF mode constants as well.
|
||||
* config/xtensa/xtensa.md (movsi_internal, movhi_internal)
|
||||
(movsf_internal): Add movi pattern that loads literal.
|
||||
(movsf, movdf): Don't force constants to memory in the presence
|
||||
of TARGET_AUTO_LITPOOLS.
|
||||
(movdf_internal): Add 'Y' constraint.
|
||||
* config/xtensa/xtensa.opt (mauto-litpools): New option.
|
||||
|
||||
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
|
||||
---
|
||||
Backported from: r226828
|
||||
Changes to ChangeLogs and documentation are dropped.
|
||||
|
||||
gcc/config/xtensa/constraints.md | 5 +++++
|
||||
gcc/config/xtensa/elf.h | 4 +++-
|
||||
gcc/config/xtensa/linux.h | 4 +++-
|
||||
gcc/config/xtensa/predicates.md | 3 ++-
|
||||
gcc/config/xtensa/xtensa.c | 19 ++++++++++++++++++-
|
||||
gcc/config/xtensa/xtensa.md | 35 +++++++++++++++++++----------------
|
||||
gcc/config/xtensa/xtensa.opt | 4 ++++
|
||||
7 files changed, 54 insertions(+), 20 deletions(-)
|
||||
|
||||
--- a/gcc/config/xtensa/constraints.md
|
||||
+++ b/gcc/config/xtensa/constraints.md
|
||||
@@ -111,6 +111,11 @@
|
||||
(and (match_code "const_int")
|
||||
(match_test "xtensa_mask_immediate (ival)")))
|
||||
|
||||
+(define_constraint "Y"
|
||||
+ "A constant that can be used in relaxed MOVI instructions."
|
||||
+ (and (match_code "const_int,const_double,const,symbol_ref,label_ref")
|
||||
+ (match_test "TARGET_AUTO_LITPOOLS")))
|
||||
+
|
||||
;; Memory constraints. Do not use define_memory_constraint here. Doing so
|
||||
;; causes reload to force some constants into the constant pool, but since
|
||||
;; the Xtensa constant pool can only be accessed with L32R instructions, it
|
||||
--- a/gcc/config/xtensa/elf.h
|
||||
+++ b/gcc/config/xtensa/elf.h
|
||||
@@ -48,7 +48,9 @@
|
||||
%{mtarget-align:--target-align} \
|
||||
%{mno-target-align:--no-target-align} \
|
||||
%{mlongcalls:--longcalls} \
|
||||
- %{mno-longcalls:--no-longcalls}"
|
||||
+ %{mno-longcalls:--no-longcalls} \
|
||||
+ %{mauto-litpools:--auto-litpools} \
|
||||
+ %{mno-auto-litpools:--no-auto-litpools}"
|
||||
|
||||
#undef LIB_SPEC
|
||||
#define LIB_SPEC "-lc -lsim -lc -lhandlers-sim -lhal"
|
||||
--- a/gcc/config/xtensa/linux.h
|
||||
+++ b/gcc/config/xtensa/linux.h
|
||||
@@ -42,7 +42,9 @@
|
||||
%{mtarget-align:--target-align} \
|
||||
%{mno-target-align:--no-target-align} \
|
||||
%{mlongcalls:--longcalls} \
|
||||
- %{mno-longcalls:--no-longcalls}"
|
||||
+ %{mno-longcalls:--no-longcalls} \
|
||||
+ %{mauto-litpools:--auto-litpools} \
|
||||
+ %{mno-auto-litpools:--no-auto-litpools}"
|
||||
|
||||
#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
|
||||
|
||||
--- a/gcc/config/xtensa/predicates.md
|
||||
+++ b/gcc/config/xtensa/predicates.md
|
||||
@@ -142,7 +142,8 @@
|
||||
(match_test "GET_MODE_CLASS (mode) == MODE_INT
|
||||
&& xtensa_simm12b (INTVAL (op))"))
|
||||
(and (match_code "const_int,const_double,const,symbol_ref,label_ref")
|
||||
- (match_test "TARGET_CONST16 && CONSTANT_P (op)
|
||||
+ (match_test "(TARGET_CONST16 || TARGET_AUTO_LITPOOLS)
|
||||
+ && CONSTANT_P (op)
|
||||
&& GET_MODE_SIZE (mode) % UNITS_PER_WORD == 0")))))
|
||||
|
||||
;; Accept the floating point constant 1 in the appropriate mode.
|
||||
--- a/gcc/config/xtensa/xtensa.c
|
||||
+++ b/gcc/config/xtensa/xtensa.c
|
||||
@@ -464,6 +464,9 @@
|
||||
{
|
||||
int dst_regnum = xt_true_regnum (operands[0]);
|
||||
|
||||
+ if (xtensa_tls_referenced_p (operands[1]))
|
||||
+ return FALSE;
|
||||
+
|
||||
/* The stack pointer can only be assigned with a MOVSP opcode. */
|
||||
if (dst_regnum == STACK_POINTER_REGNUM)
|
||||
return (mode == SImode
|
||||
@@ -1031,7 +1034,7 @@
|
||||
return 1;
|
||||
}
|
||||
|
||||
- if (! TARGET_CONST16)
|
||||
+ if (! TARGET_AUTO_LITPOOLS && ! TARGET_CONST16)
|
||||
{
|
||||
src = force_const_mem (SImode, src);
|
||||
operands[1] = src;
|
||||
@@ -2415,6 +2418,20 @@
|
||||
}
|
||||
break;
|
||||
|
||||
+ case 'y':
|
||||
+ if (GET_CODE (x) == CONST_DOUBLE &&
|
||||
+ GET_MODE (x) == SFmode)
|
||||
+ {
|
||||
+ REAL_VALUE_TYPE r;
|
||||
+ long l;
|
||||
+ REAL_VALUE_FROM_CONST_DOUBLE (r, x);
|
||||
+ REAL_VALUE_TO_TARGET_SINGLE (r, l);
|
||||
+ fprintf (file, "0x%08lx", l);
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ /* fall through */
|
||||
+
|
||||
default:
|
||||
if (GET_CODE (x) == REG || GET_CODE (x) == SUBREG)
|
||||
fprintf (file, "%s", reg_names[xt_true_regnum (x)]);
|
||||
--- a/gcc/config/xtensa/xtensa.md
|
||||
+++ b/gcc/config/xtensa/xtensa.md
|
||||
@@ -799,8 +799,8 @@
|
||||
})
|
||||
|
||||
(define_insn "movsi_internal"
|
||||
- [(set (match_operand:SI 0 "nonimmed_operand" "=D,D,D,D,R,R,a,q,a,W,a,a,U,*a,*A")
|
||||
- (match_operand:SI 1 "move_operand" "M,D,d,R,D,d,r,r,I,i,T,U,r,*A,*r"))]
|
||||
+ [(set (match_operand:SI 0 "nonimmed_operand" "=D,D,D,D,R,R,a,q,a,a,W,a,a,U,*a,*A")
|
||||
+ (match_operand:SI 1 "move_operand" "M,D,d,R,D,d,r,r,I,Y,i,T,U,r,*A,*r"))]
|
||||
"xtensa_valid_move (SImode, operands)"
|
||||
"@
|
||||
movi.n\t%0, %x1
|
||||
@@ -812,15 +812,16 @@
|
||||
mov\t%0, %1
|
||||
movsp\t%0, %1
|
||||
movi\t%0, %x1
|
||||
+ movi\t%0, %1
|
||||
const16\t%0, %t1\;const16\t%0, %b1
|
||||
%v1l32r\t%0, %1
|
||||
%v1l32i\t%0, %1
|
||||
%v0s32i\t%1, %0
|
||||
rsr\t%0, ACCLO
|
||||
wsr\t%1, ACCLO"
|
||||
- [(set_attr "type" "move,move,move,load,store,store,move,move,move,move,load,load,store,rsr,wsr")
|
||||
+ [(set_attr "type" "move,move,move,load,store,store,move,move,move,move,move,load,load,store,rsr,wsr")
|
||||
(set_attr "mode" "SI")
|
||||
- (set_attr "length" "2,2,2,2,2,2,3,3,3,6,3,3,3,3,3")])
|
||||
+ (set_attr "length" "2,2,2,2,2,2,3,3,3,3,6,3,3,3,3,3")])
|
||||
|
||||
;; 16-bit Integer moves
|
||||
|
||||
@@ -834,21 +835,22 @@
|
||||
})
|
||||
|
||||
(define_insn "movhi_internal"
|
||||
- [(set (match_operand:HI 0 "nonimmed_operand" "=D,D,a,a,a,U,*a,*A")
|
||||
- (match_operand:HI 1 "move_operand" "M,d,r,I,U,r,*A,*r"))]
|
||||
+ [(set (match_operand:HI 0 "nonimmed_operand" "=D,D,a,a,a,a,U,*a,*A")
|
||||
+ (match_operand:HI 1 "move_operand" "M,d,r,I,Y,U,r,*A,*r"))]
|
||||
"xtensa_valid_move (HImode, operands)"
|
||||
"@
|
||||
movi.n\t%0, %x1
|
||||
mov.n\t%0, %1
|
||||
mov\t%0, %1
|
||||
movi\t%0, %x1
|
||||
+ movi\t%0, %1
|
||||
%v1l16ui\t%0, %1
|
||||
%v0s16i\t%1, %0
|
||||
rsr\t%0, ACCLO
|
||||
wsr\t%1, ACCLO"
|
||||
- [(set_attr "type" "move,move,move,move,load,store,rsr,wsr")
|
||||
+ [(set_attr "type" "move,move,move,move,move,load,store,rsr,wsr")
|
||||
(set_attr "mode" "HI")
|
||||
- (set_attr "length" "2,2,3,3,3,3,3,3")])
|
||||
+ (set_attr "length" "2,2,3,3,3,3,3,3,3")])
|
||||
|
||||
;; 8-bit Integer moves
|
||||
|
||||
@@ -919,7 +921,7 @@
|
||||
(match_operand:SF 1 "general_operand" ""))]
|
||||
""
|
||||
{
|
||||
- if (!TARGET_CONST16 && CONSTANT_P (operands[1]))
|
||||
+ if (!TARGET_CONST16 && !TARGET_AUTO_LITPOOLS && CONSTANT_P (operands[1]))
|
||||
operands[1] = force_const_mem (SFmode, operands[1]);
|
||||
|
||||
if ((!register_operand (operands[0], SFmode)
|
||||
@@ -934,8 +936,8 @@
|
||||
})
|
||||
|
||||
(define_insn "movsf_internal"
|
||||
- [(set (match_operand:SF 0 "nonimmed_operand" "=f,f,U,D,D,R,a,f,a,W,a,a,U")
|
||||
- (match_operand:SF 1 "move_operand" "f,U,f,d,R,d,r,r,f,iF,T,U,r"))]
|
||||
+ [(set (match_operand:SF 0 "nonimmed_operand" "=f,f,U,D,D,R,a,f,a,a,W,a,a,U")
|
||||
+ (match_operand:SF 1 "move_operand" "f,U,f,d,R,d,r,r,f,Y,iF,T,U,r"))]
|
||||
"((register_operand (operands[0], SFmode)
|
||||
|| register_operand (operands[1], SFmode))
|
||||
&& !(FP_REG_P (xt_true_regnum (operands[0]))
|
||||
@@ -950,13 +952,14 @@
|
||||
mov\t%0, %1
|
||||
wfr\t%0, %1
|
||||
rfr\t%0, %1
|
||||
+ movi\t%0, %y1
|
||||
const16\t%0, %t1\;const16\t%0, %b1
|
||||
%v1l32r\t%0, %1
|
||||
%v1l32i\t%0, %1
|
||||
%v0s32i\t%1, %0"
|
||||
- [(set_attr "type" "farith,fload,fstore,move,load,store,move,farith,farith,move,load,load,store")
|
||||
+ [(set_attr "type" "farith,fload,fstore,move,load,store,move,farith,farith,move,move,load,load,store")
|
||||
(set_attr "mode" "SF")
|
||||
- (set_attr "length" "3,3,3,2,2,2,3,3,3,6,3,3,3")])
|
||||
+ (set_attr "length" "3,3,3,2,2,2,3,3,3,3,6,3,3,3")])
|
||||
|
||||
(define_insn "*lsiu"
|
||||
[(set (match_operand:SF 0 "register_operand" "=f")
|
||||
@@ -997,7 +1000,7 @@
|
||||
(match_operand:DF 1 "general_operand" ""))]
|
||||
""
|
||||
{
|
||||
- if (CONSTANT_P (operands[1]) && !TARGET_CONST16)
|
||||
+ if (CONSTANT_P (operands[1]) && !TARGET_CONST16 && !TARGET_AUTO_LITPOOLS)
|
||||
operands[1] = force_const_mem (DFmode, operands[1]);
|
||||
|
||||
if (!register_operand (operands[0], DFmode)
|
||||
@@ -1008,8 +1011,8 @@
|
||||
})
|
||||
|
||||
(define_insn_and_split "movdf_internal"
|
||||
- [(set (match_operand:DF 0 "nonimmed_operand" "=a,W,a,a,U")
|
||||
- (match_operand:DF 1 "move_operand" "r,iF,T,U,r"))]
|
||||
+ [(set (match_operand:DF 0 "nonimmed_operand" "=a,a,W,a,a,U")
|
||||
+ (match_operand:DF 1 "move_operand" "r,Y,iF,T,U,r"))]
|
||||
"register_operand (operands[0], DFmode)
|
||||
|| register_operand (operands[1], DFmode)"
|
||||
"#"
|
||||
--- a/gcc/config/xtensa/xtensa.opt
|
||||
+++ b/gcc/config/xtensa/xtensa.opt
|
||||
@@ -38,6 +38,10 @@
|
||||
Target
|
||||
Intersperse literal pools with code in the text section
|
||||
|
||||
+mauto-litpools
|
||||
+Target Report Mask(AUTO_LITPOOLS)
|
||||
+Relax literals in assembler and place them automatically in the text section
|
||||
+
|
||||
mserialize-volatile
|
||||
Target Report Mask(SERIALIZE_VOLATILE)
|
||||
-mno-serialize-volatile Do not serialize volatile memory references with MEMW instructions
|
@ -1,71 +0,0 @@
|
||||
From 05154174b369505238b759cf80d595d8cfc8c731 Mon Sep 17 00:00:00 2001
|
||||
From: Max Filippov <jcmvbkbc@gmail.com>
|
||||
Date: Mon, 10 Aug 2015 21:35:20 +0300
|
||||
Subject: [PATCH 1/3] xtensa: reimplement register spilling
|
||||
|
||||
Spilling windowed registers in userspace is much easier, more portable,
|
||||
less error-prone and equally effective as in kernel. Now that register
|
||||
spilling syscall is considered obsolete in the xtensa linux kernel
|
||||
replace it with CALL12 followed by series of ENTRY in libgcc.
|
||||
|
||||
2015-08-18 Max Filippov <jcmvbkbc@gmail.com>
|
||||
libgcc/
|
||||
* config/xtensa/lib2funcs.S (__xtensa_libgcc_window_spill): Use
|
||||
CALL12 followed by series of ENTRY to spill windowed registers.
|
||||
(__xtensa_nonlocal_goto): Call __xtensa_libgcc_window_spill
|
||||
instead of making linux spill syscall.
|
||||
|
||||
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
|
||||
---
|
||||
Backported from: r226962
|
||||
|
||||
libgcc/config/xtensa/lib2funcs.S | 30 +++++++++++++++++++++++-------
|
||||
1 file changed, 23 insertions(+), 7 deletions(-)
|
||||
|
||||
--- a/libgcc/config/xtensa/lib2funcs.S
|
||||
+++ b/libgcc/config/xtensa/lib2funcs.S
|
||||
@@ -33,10 +33,29 @@
|
||||
.global __xtensa_libgcc_window_spill
|
||||
.type __xtensa_libgcc_window_spill,@function
|
||||
__xtensa_libgcc_window_spill:
|
||||
- entry sp, 32
|
||||
- movi a2, 0
|
||||
- syscall
|
||||
+ entry sp, 48
|
||||
+#if XCHAL_NUM_AREGS > 16
|
||||
+ call12 1f
|
||||
+ retw
|
||||
+ .align 4
|
||||
+1:
|
||||
+ .rept (XCHAL_NUM_AREGS - 24) / 12
|
||||
+ _entry sp, 48
|
||||
+ mov a12, a0
|
||||
+ .endr
|
||||
+ _entry sp, 16
|
||||
+#if XCHAL_NUM_AREGS % 12 == 0
|
||||
+ mov a4, a4
|
||||
+#elif XCHAL_NUM_AREGS % 12 == 4
|
||||
+ mov a8, a8
|
||||
+#elif XCHAL_NUM_AREGS % 12 == 8
|
||||
+ mov a12, a12
|
||||
+#endif
|
||||
+ retw
|
||||
+#else
|
||||
+ mov a8, a8
|
||||
retw
|
||||
+#endif
|
||||
.size __xtensa_libgcc_window_spill, .-__xtensa_libgcc_window_spill
|
||||
|
||||
|
||||
@@ -58,10 +77,7 @@
|
||||
entry sp, 32
|
||||
|
||||
/* Flush registers. */
|
||||
- mov a5, a2
|
||||
- movi a2, 0
|
||||
- syscall
|
||||
- mov a2, a5
|
||||
+ call8 __xtensa_libgcc_window_spill
|
||||
|
||||
/* Because the save area for a0-a3 is stored one frame below
|
||||
the one identified by a2, the only way to restore those
|
@ -1,28 +0,0 @@
|
||||
From f66206679a0ad604f13673559f230160cd3d1189 Mon Sep 17 00:00:00 2001
|
||||
From: Max Filippov <jcmvbkbc@gmail.com>
|
||||
Date: Fri, 14 Aug 2015 02:45:02 +0300
|
||||
Subject: [PATCH 2/3] xtensa: use unwind-dw2-fde-dip instead of unwind-dw2-fde
|
||||
|
||||
This allows having exception cleanup code in binaries that don't
|
||||
register their unwind tables.
|
||||
|
||||
2015-08-18 Max Filippov <jcmvbkbc@gmail.com>
|
||||
libgcc/
|
||||
* config/xtensa/t-xtensa (LIB2ADDEH): Replace unwind-dw2-fde
|
||||
with unwind-dw2-fde-dip.
|
||||
|
||||
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
|
||||
---
|
||||
Backported from: r226963
|
||||
|
||||
libgcc/config/xtensa/t-xtensa | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/libgcc/config/xtensa/t-xtensa
|
||||
+++ b/libgcc/config/xtensa/t-xtensa
|
||||
@@ -13,4 +13,4 @@
|
||||
LIB2ADD = $(srcdir)/config/xtensa/lib2funcs.S
|
||||
|
||||
LIB2ADDEH = $(srcdir)/config/xtensa/unwind-dw2-xtensa.c \
|
||||
- $(srcdir)/unwind-dw2-fde.c $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c
|
||||
+ $(srcdir)/unwind-dw2-fde-dip.c $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c
|
@ -1,35 +0,0 @@
|
||||
From 15c7c4d39b317f0d902ef28fd43eca5c3369f891 Mon Sep 17 00:00:00 2001
|
||||
From: Max Filippov <jcmvbkbc@gmail.com>
|
||||
Date: Sat, 15 Aug 2015 05:12:11 +0300
|
||||
Subject: [PATCH 3/3] xtensa: fix _Unwind_GetCFA
|
||||
|
||||
Returning context->cfa in _Unwind_GetCFA makes CFA point one stack frame
|
||||
higher than what was actually used by code at context->ra. This results
|
||||
in invalid CFA value in signal frames and premature unwinding completion
|
||||
in forced unwinding used by uClibc NPTL thread cancellation.
|
||||
Returning context->sp from _Unwind_GetCFA makes all CFA values valid and
|
||||
matching code that used them.
|
||||
|
||||
2015-08-18 Max Filippov <jcmvbkbc@gmail.com>
|
||||
libgcc/
|
||||
* config/xtensa/unwind-dw2-xtensa.c (_Unwind_GetCFA): Return
|
||||
context->sp instead of context->cfa.
|
||||
|
||||
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
|
||||
---
|
||||
Backported from: r226964
|
||||
|
||||
libgcc/config/xtensa/unwind-dw2-xtensa.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/libgcc/config/xtensa/unwind-dw2-xtensa.c
|
||||
+++ b/libgcc/config/xtensa/unwind-dw2-xtensa.c
|
||||
@@ -130,7 +130,7 @@
|
||||
_Unwind_Word
|
||||
_Unwind_GetCFA (struct _Unwind_Context *context)
|
||||
{
|
||||
- return (_Unwind_Ptr) context->cfa;
|
||||
+ return (_Unwind_Ptr) context->sp;
|
||||
}
|
||||
|
||||
/* Overwrite the saved value for register INDEX in CONTEXT with VAL. */
|
@ -1,68 +0,0 @@
|
||||
From 0343a584d6b5128908eabf1db43c70bed7114989 Mon Sep 17 00:00:00 2001
|
||||
From: Max Filippov <jcmvbkbc@gmail.com>
|
||||
Date: Sun, 28 May 2017 19:56:56 -0700
|
||||
Subject: [PATCH] gcc: xtensa: fix fprintf format specifiers
|
||||
|
||||
HOST_WIDE_INT may not be long as assumed in print_operand and
|
||||
xtensa_emit_call. Use HOST_WIDE_INT_PRINT_DEC/HOST_WIDE_INT_PRINT_HEX
|
||||
format strings instead of %ld/0x%lx. This fixes incorrect assembly code
|
||||
generation by the compiler running on armhf host.
|
||||
|
||||
2017-05-28 Max Filippov <jcmvbkbc@gmail.com>
|
||||
gcc/
|
||||
* config/xtensa/xtensa.c (xtensa_emit_call): Use
|
||||
HOST_WIDE_INT_PRINT_HEX instead of 0x%lx format string.
|
||||
(print_operand): Use HOST_WIDE_INT_PRINT_DEC instead of %ld
|
||||
format string.
|
||||
|
||||
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
|
||||
---
|
||||
gcc/config/xtensa/xtensa.c | 10 +++++-----
|
||||
1 file changed, 5 insertions(+), 5 deletions(-)
|
||||
|
||||
--- a/gcc/config/xtensa/xtensa.c
|
||||
+++ b/gcc/config/xtensa/xtensa.c
|
||||
@@ -1773,7 +1773,7 @@
|
||||
rtx tgt = operands[callop];
|
||||
|
||||
if (GET_CODE (tgt) == CONST_INT)
|
||||
- sprintf (result, "call8\t0x%lx", INTVAL (tgt));
|
||||
+ sprintf (result, "call8\t" HOST_WIDE_INT_PRINT_HEX, INTVAL (tgt));
|
||||
else if (register_operand (tgt, VOIDmode))
|
||||
sprintf (result, "callx8\t%%%d", callop);
|
||||
else
|
||||
@@ -2348,14 +2348,14 @@
|
||||
|
||||
case 'L':
|
||||
if (GET_CODE (x) == CONST_INT)
|
||||
- fprintf (file, "%ld", (32 - INTVAL (x)) & 0x1f);
|
||||
+ fprintf (file, HOST_WIDE_INT_PRINT_DEC, (32 - INTVAL (x)) & 0x1f);
|
||||
else
|
||||
output_operand_lossage ("invalid %%L value");
|
||||
break;
|
||||
|
||||
case 'R':
|
||||
if (GET_CODE (x) == CONST_INT)
|
||||
- fprintf (file, "%ld", INTVAL (x) & 0x1f);
|
||||
+ fprintf (file, HOST_WIDE_INT_PRINT_DEC, INTVAL (x) & 0x1f);
|
||||
else
|
||||
output_operand_lossage ("invalid %%R value");
|
||||
break;
|
||||
@@ -2369,7 +2369,7 @@
|
||||
|
||||
case 'd':
|
||||
if (GET_CODE (x) == CONST_INT)
|
||||
- fprintf (file, "%ld", INTVAL (x));
|
||||
+ fprintf (file, HOST_WIDE_INT_PRINT_DEC, INTVAL (x));
|
||||
else
|
||||
output_operand_lossage ("invalid %%d value");
|
||||
break;
|
||||
@@ -2438,7 +2438,7 @@
|
||||
else if (GET_CODE (x) == MEM)
|
||||
output_address (XEXP (x, 0));
|
||||
else if (GET_CODE (x) == CONST_INT)
|
||||
- fprintf (file, "%ld", INTVAL (x));
|
||||
+ fprintf (file, HOST_WIDE_INT_PRINT_DEC, INTVAL (x));
|
||||
else
|
||||
output_addr_const (file, x);
|
||||
}
|
@ -1,26 +0,0 @@
|
||||
From 91f3a82de1e43362a0ab2cb2e1fd6b89c5a00525 Mon Sep 17 00:00:00 2001
|
||||
From: jcmvbkbc <jcmvbkbc@138bc75d-0d04-0410-961f-82ee72b054a4>
|
||||
Date: Mon, 11 Sep 2017 21:53:38 +0000
|
||||
Subject: [PATCH] xtensa: fix PR target/82181
|
||||
|
||||
2017-09-11 Max Filippov <jcmvbkbc@gmail.com>
|
||||
gcc/
|
||||
Backport from mainline
|
||||
* config/xtensa/xtensa.c (xtensa_mem_offset): Check that both
|
||||
words of DImode object are reachable by xtensa_uimm8x4 access.
|
||||
|
||||
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
|
||||
---
|
||||
gcc/config/xtensa/xtensa.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
--- a/gcc/config/xtensa/xtensa.c
|
||||
+++ b/gcc/config/xtensa/xtensa.c
|
||||
@@ -599,6 +599,7 @@
|
||||
case HImode:
|
||||
return xtensa_uimm8x2 (v);
|
||||
|
||||
+ case DImode:
|
||||
case DFmode:
|
||||
return (xtensa_uimm8x4 (v) && xtensa_uimm8x4 (v + 4));
|
||||
|
@ -1,628 +0,0 @@
|
||||
Add musl support to gcc
|
||||
|
||||
This patch comes from the musl-cross project at
|
||||
https://bitbucket.org/GregorR/musl-cross/src. Compared to the upstream version:
|
||||
|
||||
* the config.sub modifications have been removed, because Buildroot
|
||||
already overwrites all config.sub with a more recent config.sub
|
||||
that has musl support.
|
||||
|
||||
* change to ensure that a dummy dynamic linker path
|
||||
MUSL_DYNAMIC_LINKER<foo> is defined for all architectures,
|
||||
otherwise building gcc for architectures not supported by musl was
|
||||
causing build failure. Bug reported upstream at
|
||||
https://bitbucket.org/GregorR/musl-gcc-patches/issue/4/musl-gcc-patches-break-the-build-on.
|
||||
|
||||
* change the USE_PT_GNU_EH_FRAME logic to keep the existing gcc logic
|
||||
and only add the musl one as an addition, not as a replacement. Not
|
||||
doing this breaks C++ exception handling with glibc, because
|
||||
USE_PT_GNU_EH_FRAME doesn't get defined due to the configure script
|
||||
not testing dl_iterate_phdr() on any system except Solaris.
|
||||
|
||||
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
||||
[Gustavo: Update for gcc 4.8.3]
|
||||
|
||||
---
|
||||
fixincludes/mkfixinc.sh | 3 -
|
||||
gcc/config.gcc | 9 ++-
|
||||
gcc/config/aarch64/aarch64-linux.h | 5 +
|
||||
gcc/config/arm/linux-eabi.h | 17 +++++
|
||||
gcc/config/i386/linux.h | 2
|
||||
gcc/config/i386/linux64.h | 7 ++
|
||||
gcc/config/linux.h | 111 ++++++++++++++++++++++++++++++++-----
|
||||
gcc/config/linux.opt | 4 +
|
||||
gcc/config/microblaze/linux.h | 18 +++++-
|
||||
gcc/config/mips/linux.h | 8 ++
|
||||
gcc/config/mips/linux64.h | 2
|
||||
gcc/config/rs6000/linux64.h | 14 +++-
|
||||
gcc/config/rs6000/secureplt.h | 1
|
||||
gcc/config/rs6000/sysv4.h | 16 ++++-
|
||||
gcc/config/sh/linux.h | 8 ++
|
||||
gcc/configure | 3 +
|
||||
gcc/configure.ac | 3 +
|
||||
gcc/ginclude/stddef.h | 3 +
|
||||
libgcc/unwind-dw2-fde-dip.c | 7 ++
|
||||
libgomp/config/posix/time.c | 2
|
||||
libitm/config/arm/hwcap.cc | 4 +
|
||||
libitm/config/linux/x86/tls.h | 8 ++
|
||||
libstdc++-v3/configure.host | 10 +++
|
||||
23 files changed, 238 insertions(+), 27 deletions(-)
|
||||
|
||||
--- a/fixincludes/mkfixinc.sh
|
||||
+++ b/fixincludes/mkfixinc.sh
|
||||
@@ -19,7 +19,8 @@
|
||||
powerpc-*-eabi* | \
|
||||
powerpc-*-rtems* | \
|
||||
powerpcle-*-eabisim* | \
|
||||
- powerpcle-*-eabi* )
|
||||
+ powerpcle-*-eabi* | \
|
||||
+ *-musl* )
|
||||
# IF there is no include fixing,
|
||||
# THEN create a no-op fixer and exit
|
||||
(echo "#! /bin/sh" ; echo "exit 0" ) > ${target}
|
||||
--- a/gcc/config/aarch64/aarch64-linux.h
|
||||
+++ b/gcc/config/aarch64/aarch64-linux.h
|
||||
@@ -21,7 +21,12 @@
|
||||
#ifndef GCC_AARCH64_LINUX_H
|
||||
#define GCC_AARCH64_LINUX_H
|
||||
|
||||
+/* The AArch64 port currently supports two dynamic linkers:
|
||||
+ - ld-linux-aarch64.so.1 - GLIBC dynamic linker
|
||||
+ - ld-musl-aarch64.so.1 - musl libc dynamic linker */
|
||||
#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-aarch64.so.1"
|
||||
+#undef MUSL_DYNAMIC_LINKER
|
||||
+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-aarch64.so.1"
|
||||
|
||||
#define CPP_SPEC "%{pthread:-D_REENTRANT}"
|
||||
|
||||
--- a/gcc/config/arm/linux-eabi.h
|
||||
+++ b/gcc/config/arm/linux-eabi.h
|
||||
@@ -77,6 +77,23 @@
|
||||
%{mfloat-abi=soft*:" GLIBC_DYNAMIC_LINKER_SOFT_FLOAT "} \
|
||||
%{!mfloat-abi=*:" GLIBC_DYNAMIC_LINKER_DEFAULT "}"
|
||||
|
||||
+/* For ARM musl currently supports four dynamic linkers:
|
||||
+ - ld-musl-arm.so.1 - for the EABI-derived soft-float ABI
|
||||
+ - ld-musl-armhf.so.1 - for the EABI-derived hard-float ABI
|
||||
+ - ld-musl-armeb.so.1 - for the EABI-derived soft-float ABI, EB
|
||||
+ - ld-musl-armebhf.so.1 - for the EABI-derived hard-float ABI, EB
|
||||
+ musl does not support the legacy OABI mode.
|
||||
+ All the dynamic linkers live in /lib.
|
||||
+ We default to soft-float, EL. */
|
||||
+#undef MUSL_DYNAMIC_LINKER
|
||||
+#if TARGET_BIG_ENDIAN_DEFAULT
|
||||
+#define MUSL_DYNAMIC_LINKER_E "%{mlittle-endian:;:eb}"
|
||||
+#else
|
||||
+#define MUSL_DYNAMIC_LINKER_E "%{mbig-endian:eb}"
|
||||
+#endif
|
||||
+#define MUSL_DYNAMIC_LINKER \
|
||||
+ "/lib/ld-musl-arm" MUSL_DYNAMIC_LINKER_E "%{mfloat-abi=hard:hf}.so.1"
|
||||
+
|
||||
/* At this point, bpabi.h will have clobbered LINK_SPEC. We want to
|
||||
use the GNU/Linux version, not the generic BPABI version. */
|
||||
#undef LINK_SPEC
|
||||
--- a/gcc/config/i386/linux64.h
|
||||
+++ b/gcc/config/i386/linux64.h
|
||||
@@ -30,3 +30,10 @@
|
||||
#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2"
|
||||
#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2"
|
||||
#define GLIBC_DYNAMIC_LINKERX32 "/libx32/ld-linux-x32.so.2"
|
||||
+
|
||||
+#undef MUSL_DYNAMIC_LINKER32
|
||||
+#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-i386.so.1"
|
||||
+#undef MUSL_DYNAMIC_LINKER64
|
||||
+#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-x86_64.so.1"
|
||||
+#undef MUSL_DYNAMIC_LINKERX32
|
||||
+#define MUSL_DYNAMIC_LINKERX32 "/lib/ld-musl-x32.so.1"
|
||||
--- a/gcc/config/i386/linux.h
|
||||
+++ b/gcc/config/i386/linux.h
|
||||
@@ -21,3 +21,5 @@
|
||||
|
||||
#define GNU_USER_LINK_EMULATION "elf_i386"
|
||||
#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
|
||||
+#undef MUSL_DYNAMIC_LINKER
|
||||
+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-i386.so.1"
|
||||
--- a/gcc/config/linux.h
|
||||
+++ b/gcc/config/linux.h
|
||||
@@ -32,10 +32,12 @@
|
||||
#define OPTION_GLIBC (DEFAULT_LIBC == LIBC_GLIBC)
|
||||
#define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC)
|
||||
#define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC)
|
||||
+#define OPTION_MUSL (DEFAULT_LIBC == LIBC_MUSL)
|
||||
#else
|
||||
#define OPTION_GLIBC (linux_libc == LIBC_GLIBC)
|
||||
#define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC)
|
||||
#define OPTION_BIONIC (linux_libc == LIBC_BIONIC)
|
||||
+#define OPTION_MUSL (linux_libc == LIBC_MUSL)
|
||||
#endif
|
||||
|
||||
#define GNU_USER_TARGET_OS_CPP_BUILTINS() \
|
||||
@@ -53,18 +55,21 @@
|
||||
uClibc or Bionic is the default C library and whether
|
||||
-muclibc or -mglibc or -mbionic has been passed to change the default. */
|
||||
|
||||
-#define CHOOSE_DYNAMIC_LINKER1(LIBC1, LIBC2, LIBC3, LD1, LD2, LD3) \
|
||||
- "%{" LIBC2 ":" LD2 ";:%{" LIBC3 ":" LD3 ";:" LD1 "}}"
|
||||
+#define CHOOSE_DYNAMIC_LINKER1(LIBC1, LIBC2, LIBC3, LIBC4, LD1, LD2, LD3, LD4) \
|
||||
+ "%{" LIBC2 ":" LD2 ";:%{" LIBC3 ":" LD3 ";:%{" LIBC4 ":" LD4 ";:" LD1 "}}}"
|
||||
|
||||
#if DEFAULT_LIBC == LIBC_GLIBC
|
||||
-#define CHOOSE_DYNAMIC_LINKER(G, U, B) \
|
||||
- CHOOSE_DYNAMIC_LINKER1 ("mglibc", "muclibc", "mbionic", G, U, B)
|
||||
+#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \
|
||||
+ CHOOSE_DYNAMIC_LINKER1 ("mglibc", "muclibc", "mbionic", "mmusl", G, U, B, M)
|
||||
#elif DEFAULT_LIBC == LIBC_UCLIBC
|
||||
-#define CHOOSE_DYNAMIC_LINKER(G, U, B) \
|
||||
- CHOOSE_DYNAMIC_LINKER1 ("muclibc", "mglibc", "mbionic", U, G, B)
|
||||
+#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \
|
||||
+ CHOOSE_DYNAMIC_LINKER1 ("muclibc", "mglibc", "mbionic", "mmusl", U, G, B, M)
|
||||
#elif DEFAULT_LIBC == LIBC_BIONIC
|
||||
-#define CHOOSE_DYNAMIC_LINKER(G, U, B) \
|
||||
- CHOOSE_DYNAMIC_LINKER1 ("mbionic", "mglibc", "muclibc", B, G, U)
|
||||
+#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \
|
||||
+ CHOOSE_DYNAMIC_LINKER1 ("mbionic", "mglibc", "muclibc", "mmusl", B, G, U, M)
|
||||
+#elif DEFAULT_LIBC == LIBC_MUSL
|
||||
+#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \
|
||||
+ CHOOSE_DYNAMIC_LINKER1 ("mmusl", "mglibc", "muclibc", "mbionic", M, G, U, B)
|
||||
#else
|
||||
#error "Unsupported DEFAULT_LIBC"
|
||||
#endif /* DEFAULT_LIBC */
|
||||
@@ -82,23 +87,32 @@
|
||||
#define BIONIC_DYNAMIC_LINKER64 "/system/bin/linker64"
|
||||
#define BIONIC_DYNAMIC_LINKERX32 "/system/bin/linkerx32"
|
||||
|
||||
+/* Musl dynamic linker paths must be defined on a per-architecture
|
||||
+ basis, for each architecture supported by Musl. However, in order
|
||||
+ to let other architectures continue to build with other C
|
||||
+ libraries, we provide a dummy definition of the following defines. */
|
||||
+#define MUSL_DYNAMIC_LINKER "invalid"
|
||||
+#define MUSL_DYNAMIC_LINKER32 "invalid"
|
||||
+#define MUSL_DYNAMIC_LINKER64 "invalid"
|
||||
+#define MUSL_DYNAMIC_LINKERX32 "invalid"
|
||||
+
|
||||
#define GNU_USER_DYNAMIC_LINKER \
|
||||
CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER, \
|
||||
- BIONIC_DYNAMIC_LINKER)
|
||||
+ BIONIC_DYNAMIC_LINKER, MUSL_DYNAMIC_LINKER)
|
||||
#define GNU_USER_DYNAMIC_LINKER32 \
|
||||
CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32, \
|
||||
- BIONIC_DYNAMIC_LINKER32)
|
||||
+ BIONIC_DYNAMIC_LINKER32, MUSL_DYNAMIC_LINKER32)
|
||||
#define GNU_USER_DYNAMIC_LINKER64 \
|
||||
CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64, \
|
||||
- BIONIC_DYNAMIC_LINKER64)
|
||||
+ BIONIC_DYNAMIC_LINKER64, MUSL_DYNAMIC_LINKER64)
|
||||
#define GNU_USER_DYNAMIC_LINKERX32 \
|
||||
CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERX32, UCLIBC_DYNAMIC_LINKERX32, \
|
||||
- BIONIC_DYNAMIC_LINKERX32)
|
||||
+ BIONIC_DYNAMIC_LINKERX32, MUSL_DYNAMIC_LINKERX32)
|
||||
|
||||
/* Determine whether the entire c99 runtime
|
||||
is present in the runtime library. */
|
||||
#undef TARGET_C99_FUNCTIONS
|
||||
-#define TARGET_C99_FUNCTIONS (OPTION_GLIBC)
|
||||
+#define TARGET_C99_FUNCTIONS (OPTION_GLIBC || OPTION_MUSL)
|
||||
|
||||
/* Whether we have sincos that follows the GNU extension. */
|
||||
#undef TARGET_HAS_SINCOS
|
||||
@@ -107,3 +121,74 @@
|
||||
/* Whether we have Bionic libc runtime */
|
||||
#undef TARGET_HAS_BIONIC
|
||||
#define TARGET_HAS_BIONIC (OPTION_BIONIC)
|
||||
+
|
||||
+/* musl avoids problematic includes by rearranging the include directories.
|
||||
+ * Unfortunately, this is mostly duplicated from cppdefault.c */
|
||||
+#if DEFAULT_LIBC == LIBC_MUSL
|
||||
+#define INCLUDE_DEFAULTS_MUSL_GPP \
|
||||
+ { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1, \
|
||||
+ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 }, \
|
||||
+ { GPLUSPLUS_TOOL_INCLUDE_DIR, "G++", 1, 1, \
|
||||
+ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 1 }, \
|
||||
+ { GPLUSPLUS_BACKWARD_INCLUDE_DIR, "G++", 1, 1, \
|
||||
+ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 },
|
||||
+
|
||||
+#ifdef LOCAL_INCLUDE_DIR
|
||||
+#define INCLUDE_DEFAULTS_MUSL_LOCAL \
|
||||
+ { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 2 }, \
|
||||
+ { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 0 },
|
||||
+#else
|
||||
+#define INCLUDE_DEFAULTS_MUSL_LOCAL
|
||||
+#endif
|
||||
+
|
||||
+#ifdef PREFIX_INCLUDE_DIR
|
||||
+#define INCLUDE_DEFAULTS_MUSL_PREFIX \
|
||||
+ { PREFIX_INCLUDE_DIR, 0, 0, 1, 0, 0},
|
||||
+#else
|
||||
+#define INCLUDE_DEFAULTS_MUSL_PREFIX
|
||||
+#endif
|
||||
+
|
||||
+#ifdef CROSS_INCLUDE_DIR
|
||||
+#define INCLUDE_DEFAULTS_MUSL_CROSS \
|
||||
+ { CROSS_INCLUDE_DIR, "GCC", 0, 0, 0, 0},
|
||||
+#else
|
||||
+#define INCLUDE_DEFAULTS_MUSL_CROSS
|
||||
+#endif
|
||||
+
|
||||
+#ifdef TOOL_INCLUDE_DIR
|
||||
+#define INCLUDE_DEFAULTS_MUSL_TOOL \
|
||||
+ { TOOL_INCLUDE_DIR, "BINUTILS", 0, 1, 0, 0},
|
||||
+#else
|
||||
+#define INCLUDE_DEFAULTS_MUSL_TOOL
|
||||
+#endif
|
||||
+
|
||||
+#ifdef NATIVE_SYSTEM_HEADER_DIR
|
||||
+#define INCLUDE_DEFAULTS_MUSL_NATIVE \
|
||||
+ { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 2 }, \
|
||||
+ { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 0 },
|
||||
+#else
|
||||
+#define INCLUDE_DEFAULTS_MUSL_NATIVE
|
||||
+#endif
|
||||
+
|
||||
+#if defined (CROSS_DIRECTORY_STRUCTURE) && !defined (TARGET_SYSTEM_ROOT)
|
||||
+# undef INCLUDE_DEFAULTS_MUSL_LOCAL
|
||||
+# define INCLUDE_DEFAULTS_MUSL_LOCAL
|
||||
+# undef INCLUDE_DEFAULTS_MUSL_NATIVE
|
||||
+# define INCLUDE_DEFAULTS_MUSL_NATIVE
|
||||
+#else
|
||||
+# undef INCLUDE_DEFAULTS_MUSL_CROSS
|
||||
+# define INCLUDE_DEFAULTS_MUSL_CROSS
|
||||
+#endif
|
||||
+
|
||||
+#undef INCLUDE_DEFAULTS
|
||||
+#define INCLUDE_DEFAULTS \
|
||||
+ { \
|
||||
+ INCLUDE_DEFAULTS_MUSL_GPP \
|
||||
+ INCLUDE_DEFAULTS_MUSL_PREFIX \
|
||||
+ INCLUDE_DEFAULTS_MUSL_CROSS \
|
||||
+ INCLUDE_DEFAULTS_MUSL_TOOL \
|
||||
+ INCLUDE_DEFAULTS_MUSL_NATIVE \
|
||||
+ { GCC_INCLUDE_DIR, "GCC", 0, 1, 0, 0 }, \
|
||||
+ { 0, 0, 0, 0, 0, 0 } \
|
||||
+ }
|
||||
+#endif
|
||||
--- a/gcc/config/linux.opt
|
||||
+++ b/gcc/config/linux.opt
|
||||
@@ -30,3 +30,7 @@
|
||||
muclibc
|
||||
Target Report RejectNegative Var(linux_libc,LIBC_UCLIBC) Negative(mbionic)
|
||||
Use uClibc C library
|
||||
+
|
||||
+mmusl
|
||||
+Target Report RejectNegative Var(linux_libc,LIBC_MUSL) Negative(mglibc)
|
||||
+Use musl C library
|
||||
--- a/gcc/config/microblaze/linux.h
|
||||
+++ b/gcc/config/microblaze/linux.h
|
||||
@@ -28,7 +28,23 @@
|
||||
#undef TLS_NEEDS_GOT
|
||||
#define TLS_NEEDS_GOT 1
|
||||
|
||||
-#define DYNAMIC_LINKER "/lib/ld.so.1"
|
||||
+#if TARGET_BIG_ENDIAN_DEFAULT == 0 /* LE */
|
||||
+#define MUSL_DYNAMIC_LINKER_E "%{EB:;:el}"
|
||||
+#else
|
||||
+#define MUSL_DYNAMIC_LINKER_E "%{EL:el}"
|
||||
+#endif
|
||||
+
|
||||
+#undef MUSL_DYNAMIC_LINKER
|
||||
+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-microblaze" MUSL_DYNAMIC_LINKER_E ".so.1"
|
||||
+#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
|
||||
+
|
||||
+#if DEFAULT_LIBC == LIBC_MUSL
|
||||
+#define DYNAMIC_LINKER MUSL_DYNAMIC_LINKER
|
||||
+#else
|
||||
+#define DYNAMIC_LINKER GLIBC_DYNAMIC_LINKER
|
||||
+#endif
|
||||
+
|
||||
+
|
||||
#undef SUBTARGET_EXTRA_SPECS
|
||||
#define SUBTARGET_EXTRA_SPECS \
|
||||
{ "dynamic_linker", DYNAMIC_LINKER }
|
||||
--- a/gcc/config/mips/linux64.h
|
||||
+++ b/gcc/config/mips/linux64.h
|
||||
@@ -29,4 +29,4 @@
|
||||
#define BIONIC_DYNAMIC_LINKERN32 "/system/bin/linker32"
|
||||
#define GNU_USER_DYNAMIC_LINKERN32 \
|
||||
CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERN32, UCLIBC_DYNAMIC_LINKERN32, \
|
||||
- BIONIC_DYNAMIC_LINKERN32)
|
||||
+ BIONIC_DYNAMIC_LINKERN32, MUSL_DYNAMIC_LINKER)
|
||||
--- a/gcc/config/mips/linux.h
|
||||
+++ b/gcc/config/mips/linux.h
|
||||
@@ -18,3 +18,11 @@
|
||||
<http://www.gnu.org/licenses/>. */
|
||||
|
||||
#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
|
||||
+
|
||||
+#if TARGET_ENDIAN_DEFAULT == 0 /* LE */
|
||||
+#define MUSL_DYNAMIC_LINKER_E "%{EB:;:el}"
|
||||
+#else
|
||||
+#define MUSL_DYNAMIC_LINKER_E "%{EL:el}"
|
||||
+#endif
|
||||
+#undef MUSL_DYNAMIC_LINKER
|
||||
+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-mips" MUSL_DYNAMIC_LINKER_E ".so.1"
|
||||
--- a/gcc/config/rs6000/linux64.h
|
||||
+++ b/gcc/config/rs6000/linux64.h
|
||||
@@ -370,17 +370,23 @@
|
||||
#endif
|
||||
#define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0"
|
||||
#define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0"
|
||||
+#undef MUSL_DYNAMIC_LINKER32
|
||||
+#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-powerpc.so.1"
|
||||
+#undef MUSL_DYNAMIC_LINKER64
|
||||
+#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-powerpc64.so.1"
|
||||
#if DEFAULT_LIBC == LIBC_UCLIBC
|
||||
-#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}"
|
||||
+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{mmusl:" M ";:" U "}}"
|
||||
#elif DEFAULT_LIBC == LIBC_GLIBC
|
||||
-#define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:" U ";:" G "}"
|
||||
+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{muclibc:" U ";:%{mmusl:" M ";:" G "}}"
|
||||
+#elif DEFAULT_LIBC == LIBC_MUSL
|
||||
+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{muclibc:" U ";:" M "}}"
|
||||
#else
|
||||
#error "Unsupported DEFAULT_LIBC"
|
||||
#endif
|
||||
#define GNU_USER_DYNAMIC_LINKER32 \
|
||||
- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32)
|
||||
+ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32, MUSL_DYNAMIC_LINKER32)
|
||||
#define GNU_USER_DYNAMIC_LINKER64 \
|
||||
- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64)
|
||||
+ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64, MUSL_DYNAMIC_LINKER64)
|
||||
|
||||
#undef DEFAULT_ASM_ENDIAN
|
||||
#if (TARGET_DEFAULT & MASK_LITTLE_ENDIAN)
|
||||
--- a/gcc/config/rs6000/secureplt.h
|
||||
+++ b/gcc/config/rs6000/secureplt.h
|
||||
@@ -18,3 +18,4 @@
|
||||
<http://www.gnu.org/licenses/>. */
|
||||
|
||||
#define CC1_SECURE_PLT_DEFAULT_SPEC "-msecure-plt"
|
||||
+#define LINK_SECURE_PLT_DEFAULT_SPEC "--secure-plt"
|
||||
--- a/gcc/config/rs6000/sysv4.h
|
||||
+++ b/gcc/config/rs6000/sysv4.h
|
||||
@@ -537,6 +537,9 @@
|
||||
#ifndef CC1_SECURE_PLT_DEFAULT_SPEC
|
||||
#define CC1_SECURE_PLT_DEFAULT_SPEC ""
|
||||
#endif
|
||||
+#ifndef LINK_SECURE_PLT_DEFAULT_SPEC
|
||||
+#define LINK_SECURE_PLT_DEFAULT_SPEC ""
|
||||
+#endif
|
||||
|
||||
/* Pass -G xxx to the compiler. */
|
||||
#define CC1_SPEC "%{G*} %(cc1_cpu)" \
|
||||
@@ -585,7 +588,8 @@
|
||||
|
||||
/* Override the default target of the linker. */
|
||||
#define LINK_TARGET_SPEC \
|
||||
- ENDIAN_SELECT("", " --oformat elf32-powerpcle", "")
|
||||
+ ENDIAN_SELECT("", " --oformat elf32-powerpcle", "") \
|
||||
+ "%{!mbss-plt: %{!msecure-plt: %(link_secure_plt_default)}}"
|
||||
|
||||
/* Any specific OS flags. */
|
||||
#define LINK_OS_SPEC "\
|
||||
@@ -763,15 +767,18 @@
|
||||
|
||||
#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
|
||||
#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
|
||||
+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-powerpc.so.1"
|
||||
#if DEFAULT_LIBC == LIBC_UCLIBC
|
||||
-#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}"
|
||||
+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{mmusl:" M ";:" U "}}"
|
||||
+#elif DEFAULT_LIBC == LIBC_MUSL
|
||||
+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{muclibc:" U ";:" M "}}"
|
||||
#elif !defined (DEFAULT_LIBC) || DEFAULT_LIBC == LIBC_GLIBC
|
||||
-#define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:" U ";:" G "}"
|
||||
+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{muclibc:" U ";:%{mmusl:" M ";:" G "}}"
|
||||
#else
|
||||
#error "Unsupported DEFAULT_LIBC"
|
||||
#endif
|
||||
#define GNU_USER_DYNAMIC_LINKER \
|
||||
- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER)
|
||||
+ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER, MUSL_DYNAMIC_LINKER)
|
||||
|
||||
#define LINK_OS_LINUX_SPEC "-m elf32ppclinux %{!shared: %{!static: \
|
||||
%{rdynamic:-export-dynamic} \
|
||||
@@ -894,6 +901,7 @@
|
||||
{ "link_os_openbsd", LINK_OS_OPENBSD_SPEC }, \
|
||||
{ "link_os_default", LINK_OS_DEFAULT_SPEC }, \
|
||||
{ "cc1_secure_plt_default", CC1_SECURE_PLT_DEFAULT_SPEC }, \
|
||||
+ { "link_secure_plt_default", LINK_SECURE_PLT_DEFAULT_SPEC }, \
|
||||
{ "cpp_os_ads", CPP_OS_ADS_SPEC }, \
|
||||
{ "cpp_os_yellowknife", CPP_OS_YELLOWKNIFE_SPEC }, \
|
||||
{ "cpp_os_mvme", CPP_OS_MVME_SPEC }, \
|
||||
--- a/gcc/config/sh/linux.h
|
||||
+++ b/gcc/config/sh/linux.h
|
||||
@@ -43,7 +43,15 @@
|
||||
|
||||
#define TARGET_ASM_FILE_END file_end_indicate_exec_stack
|
||||
|
||||
+#if TARGET_BIG_ENDIAN_DEFAULT /* BE */
|
||||
+#define MUSL_DYNAMIC_LINKER_E "eb"
|
||||
+#else
|
||||
+#define MUSL_DYNAMIC_LINKER_E
|
||||
+#endif
|
||||
+
|
||||
#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
|
||||
+#undef MUSL_DYNAMIC_LINKER
|
||||
+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-sh" MUSL_DYNAMIC_LINKER_E ".so.1"
|
||||
|
||||
#undef SUBTARGET_LINK_EMUL_SUFFIX
|
||||
#define SUBTARGET_LINK_EMUL_SUFFIX "_linux"
|
||||
--- a/gcc/config.gcc
|
||||
+++ b/gcc/config.gcc
|
||||
@@ -559,7 +559,7 @@
|
||||
esac
|
||||
|
||||
# Common C libraries.
|
||||
-tm_defines="$tm_defines LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3"
|
||||
+tm_defines="$tm_defines LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3 LIBC_MUSL=4"
|
||||
|
||||
# Common parts for widely ported systems.
|
||||
case ${target} in
|
||||
@@ -662,6 +662,9 @@
|
||||
*-*-*uclibc*)
|
||||
tm_defines="$tm_defines DEFAULT_LIBC=LIBC_UCLIBC"
|
||||
;;
|
||||
+ *-*-*musl*)
|
||||
+ tm_defines="$tm_defines DEFAULT_LIBC=LIBC_MUSL"
|
||||
+ ;;
|
||||
*)
|
||||
tm_defines="$tm_defines DEFAULT_LIBC=LIBC_GLIBC"
|
||||
;;
|
||||
@@ -2142,6 +2145,10 @@
|
||||
powerpc*-*-linux*paired*)
|
||||
tm_file="${tm_file} rs6000/750cl.h" ;;
|
||||
esac
|
||||
+ case ${target} in
|
||||
+ *-linux*-musl*)
|
||||
+ enable_secureplt=yes ;;
|
||||
+ esac
|
||||
if test x${enable_secureplt} = xyes; then
|
||||
tm_file="rs6000/secureplt.h ${tm_file}"
|
||||
fi
|
||||
--- a/gcc/configure
|
||||
+++ b/gcc/configure
|
||||
@@ -26969,6 +26969,9 @@
|
||||
gcc_cv_target_dl_iterate_phdr=no
|
||||
fi
|
||||
;;
|
||||
+ *-linux-musl*)
|
||||
+ gcc_cv_target_dl_iterate_phdr=yes
|
||||
+ ;;
|
||||
esac
|
||||
|
||||
if test x$gcc_cv_target_dl_iterate_phdr = xyes; then
|
||||
--- a/gcc/configure.ac
|
||||
+++ b/gcc/configure.ac
|
||||
@@ -4875,6 +4875,9 @@
|
||||
gcc_cv_target_dl_iterate_phdr=no
|
||||
fi
|
||||
;;
|
||||
+ *-linux-musl*)
|
||||
+ gcc_cv_target_dl_iterate_phdr=yes
|
||||
+ ;;
|
||||
esac
|
||||
GCC_TARGET_TEMPLATE([TARGET_DL_ITERATE_PHDR])
|
||||
if test x$gcc_cv_target_dl_iterate_phdr = xyes; then
|
||||
--- a/gcc/ginclude/stddef.h
|
||||
+++ b/gcc/ginclude/stddef.h
|
||||
@@ -181,6 +181,7 @@
|
||||
#ifndef _GCC_SIZE_T
|
||||
#ifndef _SIZET_
|
||||
#ifndef __size_t
|
||||
+#ifndef __DEFINED_size_t /* musl */
|
||||
#define __size_t__ /* BeOS */
|
||||
#define __SIZE_T__ /* Cray Unicos/Mk */
|
||||
#define _SIZE_T
|
||||
@@ -197,6 +198,7 @@
|
||||
#define ___int_size_t_h
|
||||
#define _GCC_SIZE_T
|
||||
#define _SIZET_
|
||||
+#define __DEFINED_size_t /* musl */
|
||||
#if (defined (__FreeBSD__) && (__FreeBSD__ >= 5)) \
|
||||
|| defined(__FreeBSD_kernel__)
|
||||
/* __size_t is a typedef on FreeBSD 5, must not trash it. */
|
||||
@@ -214,6 +216,7 @@
|
||||
typedef long ssize_t;
|
||||
#endif /* __BEOS__ */
|
||||
#endif /* !(defined (__GNUG__) && defined (size_t)) */
|
||||
+#endif /* __DEFINED_size_t */
|
||||
#endif /* __size_t */
|
||||
#endif /* _SIZET_ */
|
||||
#endif /* _GCC_SIZE_T */
|
||||
--- a/libgcc/unwind-dw2-fde-dip.c
|
||||
+++ b/libgcc/unwind-dw2-fde-dip.c
|
||||
@@ -75,6 +75,13 @@
|
||||
# define USE_PT_GNU_EH_FRAME
|
||||
#endif
|
||||
|
||||
+/* For musl libc, TARGET_DL_ITERATE_PHDR gets defined by the configure
|
||||
+ script. */
|
||||
+#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \
|
||||
+ && defined(TARGET_DL_ITERATE_PHDR)
|
||||
+# define USE_PT_GNU_EH_FRAME
|
||||
+#endif
|
||||
+
|
||||
#if defined(USE_PT_GNU_EH_FRAME)
|
||||
|
||||
#include <link.h>
|
||||
--- a/libgomp/config/posix/time.c
|
||||
+++ b/libgomp/config/posix/time.c
|
||||
@@ -28,6 +28,8 @@
|
||||
The following implementation uses the most simple POSIX routines.
|
||||
If present, POSIX 4 clocks should be used instead. */
|
||||
|
||||
+#define _POSIX_C_SOURCE 199309L /* for clocks */
|
||||
+
|
||||
#include "libgomp.h"
|
||||
#include <unistd.h>
|
||||
#if TIME_WITH_SYS_TIME
|
||||
--- a/libitm/config/arm/hwcap.cc
|
||||
+++ b/libitm/config/arm/hwcap.cc
|
||||
@@ -40,7 +40,11 @@
|
||||
|
||||
#ifdef __linux__
|
||||
#include <unistd.h>
|
||||
+#ifdef __GLIBC__
|
||||
#include <sys/fcntl.h>
|
||||
+#else
|
||||
+#include <fcntl.h>
|
||||
+#endif
|
||||
#include <elf.h>
|
||||
|
||||
static void __attribute__((constructor))
|
||||
--- a/libitm/config/linux/x86/tls.h
|
||||
+++ b/libitm/config/linux/x86/tls.h
|
||||
@@ -25,16 +25,19 @@
|
||||
#ifndef LIBITM_X86_TLS_H
|
||||
#define LIBITM_X86_TLS_H 1
|
||||
|
||||
-#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 10)
|
||||
+#if defined(__GLIBC_PREREQ)
|
||||
+#if __GLIBC_PREREQ(2, 10)
|
||||
/* Use slots in the TCB head rather than __thread lookups.
|
||||
GLIBC has reserved words 10 through 13 for TM. */
|
||||
#define HAVE_ARCH_GTM_THREAD 1
|
||||
#define HAVE_ARCH_GTM_THREAD_DISP 1
|
||||
#endif
|
||||
+#endif
|
||||
|
||||
#include "config/generic/tls.h"
|
||||
|
||||
-#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 10)
|
||||
+#if defined(__GLIBC_PREREQ)
|
||||
+#if __GLIBC_PREREQ(2, 10)
|
||||
namespace GTM HIDDEN {
|
||||
|
||||
#ifdef __x86_64__
|
||||
@@ -101,5 +104,6 @@
|
||||
|
||||
} // namespace GTM
|
||||
#endif /* >= GLIBC 2.10 */
|
||||
+#endif
|
||||
|
||||
#endif // LIBITM_X86_TLS_H
|
||||
--- a/libstdc++-v3/configure.host
|
||||
+++ b/libstdc++-v3/configure.host
|
||||
@@ -263,6 +263,13 @@
|
||||
os_include_dir="os/bsd/freebsd"
|
||||
;;
|
||||
gnu* | linux* | kfreebsd*-gnu | knetbsd*-gnu)
|
||||
+ # check for musl by target
|
||||
+ case "${host_os}" in
|
||||
+ *-musl*)
|
||||
+ os_include_dir="os/generic"
|
||||
+ ;;
|
||||
+ *)
|
||||
+
|
||||
if [ "$uclibc" = "yes" ]; then
|
||||
os_include_dir="os/uclibc"
|
||||
elif [ "$bionic" = "yes" ]; then
|
||||
@@ -271,6 +278,9 @@
|
||||
os_include_dir="os/gnu-linux"
|
||||
fi
|
||||
;;
|
||||
+
|
||||
+ esac
|
||||
+ ;;
|
||||
hpux*)
|
||||
os_include_dir="os/hpux"
|
||||
;;
|
@ -1,15 +0,0 @@
|
||||
---
|
||||
gcc/config.host | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/gcc/config.host
|
||||
+++ b/gcc/config.host
|
||||
@@ -214,7 +214,7 @@
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
- i[34567]86-*-cygwin*)
|
||||
+ i[34567]86-*-cygwin* | x86_64-*-cygwin*)
|
||||
host_xm_file=i386/xm-cygwin.h
|
||||
out_host_hook_obj=host-cygwin.o
|
||||
host_xmake_file="${host_xmake_file} i386/x-cygwin"
|
@ -1,122 +0,0 @@
|
||||
http://gcc.gnu.org/ml/gcc-patches/2008-10/msg00269.html
|
||||
|
||||
On glibc the libc.so carries a copy of the math function copysignl() but
|
||||
on uClibc math functions like copysignl() live in libm. Since libgcc_s
|
||||
contains unresolved symbols, any attempt to link against libgcc_s
|
||||
without explicitely specifying -lm fails, resulting in a broken
|
||||
bootstrap of the compiler.
|
||||
|
||||
Forward port to gcc 4.5.1 by Gustavo Zacarias <gustavo@zacarias.com.ar>
|
||||
|
||||
---
|
||||
libgcc/Makefile.in | 4 +++-
|
||||
libgcc/configure | 32 ++++++++++++++++++++++++++++++++
|
||||
libgcc/configure.ac | 21 +++++++++++++++++++++
|
||||
3 files changed, 56 insertions(+), 1 deletion(-)
|
||||
|
||||
Index: gcc-4.8.0/libgcc/Makefile.in
|
||||
===================================================================
|
||||
--- gcc-4.8.0.orig/libgcc/Makefile.in 2013-02-04 20:06:20.000000000 +0100
|
||||
+++ gcc-4.8.0/libgcc/Makefile.in 2013-03-24 09:12:43.000000000 +0100
|
||||
@@ -41,6 +41,7 @@
|
||||
decimal_float = @decimal_float@
|
||||
enable_decimal_float = @enable_decimal_float@
|
||||
fixed_point = @fixed_point@
|
||||
+LIBGCC_LIBM = @LIBGCC_LIBM@
|
||||
|
||||
host_noncanonical = @host_noncanonical@
|
||||
target_noncanonical = @target_noncanonical@
|
||||
@@ -927,9 +928,10 @@
|
||||
@multilib_dir@,$(MULTIDIR),$(subst \
|
||||
@shlib_objs@,$(objects) libgcc.a,$(subst \
|
||||
@shlib_base_name@,libgcc_s,$(subst \
|
||||
+ @libgcc_libm@,$(LIBGCC_LIBM),$(subst \
|
||||
@shlib_map_file@,$(mapfile),$(subst \
|
||||
@shlib_slibdir_qual@,$(MULTIOSSUBDIR),$(subst \
|
||||
- @shlib_slibdir@,$(shlib_slibdir),$(SHLIB_LINK))))))))
|
||||
+ @shlib_slibdir@,$(shlib_slibdir),$(SHLIB_LINK)))))))))
|
||||
|
||||
libunwind$(SHLIB_EXT): $(libunwind-s-objects) $(extra-parts)
|
||||
# @multilib_flags@ is still needed because this may use
|
||||
Index: gcc-4.8.0/libgcc/configure
|
||||
===================================================================
|
||||
--- gcc-4.8.0.orig/libgcc/configure 2012-11-05 00:08:42.000000000 +0100
|
||||
+++ gcc-4.8.0/libgcc/configure 2013-03-24 09:12:43.000000000 +0100
|
||||
@@ -564,6 +564,7 @@
|
||||
tmake_file
|
||||
sfp_machine_header
|
||||
set_use_emutls
|
||||
+LIBGCC_LIBM
|
||||
set_have_cc_tls
|
||||
vis_hide
|
||||
fixed_point
|
||||
@@ -4481,6 +4482,37 @@
|
||||
fi
|
||||
fi
|
||||
|
||||
+# On powerpc libgcc_s references copysignl which is a libm function but
|
||||
+# glibc apparently also provides it via libc as opposed to uClibc where
|
||||
+# it lives in libm.
|
||||
+echo "$as_me:$LINENO: checking for library containing copysignl" >&5
|
||||
+echo $ECHO_N "checking for library containing copysignl... $ECHO_C" >&6
|
||||
+if test "${libgcc_cv_copysignl_lib+set}" = set; then
|
||||
+ echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
+else
|
||||
+
|
||||
+ echo '#include <features.h>' > conftest.c
|
||||
+ echo 'int the_libc = __UCLIBC__ + __powerpc__;' >> conftest.c
|
||||
+ libgcc_cv_copysignl_lib="-lc"
|
||||
+ if { ac_try='${CC-cc} -S conftest.c -o conftest.s 1>&5'
|
||||
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
+ (eval $ac_try) 2>&5
|
||||
+ ac_status=$?
|
||||
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
+ (exit $ac_status); }; }
|
||||
+ then
|
||||
+ libgcc_cv_copysignl_lib="-lm"
|
||||
+ fi
|
||||
+ rm -f conftest.*
|
||||
+
|
||||
+fi
|
||||
+echo "$as_me:$LINENO: result: $libgcc_cv_copysignl_lib" >&5
|
||||
+echo "${ECHO_T}$libgcc_cv_copysignl_lib" >&6
|
||||
+
|
||||
+case /${libgcc_cv_copysignl_lib}/ in
|
||||
+ /-lm/) LIBGCC_LIBM="$LIBGCC_LIBM -lm" ;;
|
||||
+ *) LIBGCC_LIBM= ;;
|
||||
+esac
|
||||
|
||||
# Conditionalize the makefile for this target machine.
|
||||
tmake_file_=
|
||||
Index: gcc-4.8.0/libgcc/configure.ac
|
||||
===================================================================
|
||||
--- gcc-4.8.0.orig/libgcc/configure.ac 2012-10-15 15:10:30.000000000 +0200
|
||||
+++ gcc-4.8.0/libgcc/configure.ac 2013-03-24 09:12:43.000000000 +0100
|
||||
@@ -326,6 +326,27 @@
|
||||
fi
|
||||
AC_SUBST(set_have_cc_tls)
|
||||
|
||||
+# On powerpc libgcc_s references copysignl which is a libm function but
|
||||
+# glibc apparently also provides it via libc as opposed to uClibc where
|
||||
+# it lives in libm.
|
||||
+AC_CACHE_CHECK
|
||||
+ libgcc_cv_copysignl_lib,
|
||||
+ echo '#include <features.h>' > conftest.c
|
||||
+ echo 'int the_libc = __UCLIBC__ + __powerpc__;' >> conftest.c
|
||||
+ libgcc_cv_copysignl_lib="-lc"
|
||||
+ if AC_TRY_COMMAND(${CC-cc} -S conftest.c -o conftest.s 1>&AS_MESSAGE_LOG_FD)
|
||||
+ then
|
||||
+ libgcc_cv_copysignl_lib="-lm"
|
||||
+ fi
|
||||
+ rm -f conftest.*
|
||||
+ ])
|
||||
+
|
||||
+case /${libgcc_cv_copysignl_lib}/ in
|
||||
+ /-lm/) LIBGCC_LIBM="$LIBGCC_LIBM -lm" ;;
|
||||
+ *) LIBGCC_LIBM= ;;
|
||||
+esac
|
||||
+AC_SUBST(LIBGCC_LIBM)
|
||||
+
|
||||
# See if we have emulated thread-local storage.
|
||||
GCC_CHECK_EMUTLS
|
||||
set_use_emutls=
|
4
packages/gcc-linaro/4.8-2015.06/chksum
vendored
4
packages/gcc-linaro/4.8-2015.06/chksum
vendored
@ -1,4 +0,0 @@
|
||||
md5 gcc-linaro-4.8-2015.06.tar.xz b985b5c476b93d616c4a8d13a0acc85f
|
||||
sha1 gcc-linaro-4.8-2015.06.tar.xz a5aca71d965a6b74d0086c10980ad2158f422e91
|
||||
sha256 gcc-linaro-4.8-2015.06.tar.xz f29d497fdd45a3c78597a7cea3397073c50c7167ae8534fc7bbc3470dc775053
|
||||
sha512 gcc-linaro-4.8-2015.06.tar.xz 58fc7b09eaf2eb7166013a0e9d7e908bbe399aafc4cf5fcdf230c3cd363be29d4d974ad463ebe5c6e610eb83517d7a8fb3637c9005a035a719232af656648743
|
1
packages/gcc-linaro/4.8-2015.06/version.desc
vendored
1
packages/gcc-linaro/4.8-2015.06/version.desc
vendored
@ -1 +0,0 @@
|
||||
obsolete='yes'
|
132
packages/gcc/4.8.5/0000-gcc_bug_62231.patch
vendored
132
packages/gcc/4.8.5/0000-gcc_bug_62231.patch
vendored
@ -1,132 +0,0 @@
|
||||
As-applied. From:
|
||||
|
||||
https://gcc.gnu.org/ml/gcc-patches/2014-09/msg02625.html
|
||||
|
||||
Linked from bug62231 comment 4 there
|
||||
|
||||
---
|
||||
gcc/defaults.h | 5 +++
|
||||
gcc/dwarf2cfi.c | 76 +++++++++++++++++++++++++++++++++++-----------------
|
||||
libgcc/unwind-dw2.c | 4 --
|
||||
3 files changed, 57 insertions(+), 28 deletions(-)
|
||||
|
||||
--- a/gcc/defaults.h
|
||||
+++ b/gcc/defaults.h
|
||||
@@ -438,6 +438,11 @@
|
||||
#define DWARF_FRAME_REGNUM(REG) DBX_REGISTER_NUMBER (REG)
|
||||
#endif
|
||||
|
||||
+/* The mapping from dwarf CFA reg number to internal dwarf reg numbers. */
|
||||
+#ifndef DWARF_REG_TO_UNWIND_COLUMN
|
||||
+#define DWARF_REG_TO_UNWIND_COLUMN(REGNO) (REGNO)
|
||||
+#endif
|
||||
+
|
||||
/* Map register numbers held in the call frame info that gcc has
|
||||
collected using DWARF_FRAME_REGNUM to those that should be output in
|
||||
.debug_frame and .eh_frame. */
|
||||
--- a/gcc/dwarf2cfi.c
|
||||
+++ b/gcc/dwarf2cfi.c
|
||||
@@ -225,7 +225,44 @@
|
||||
emit_move_insn (adjust_address (mem, mode, offset), GEN_INT (size));
|
||||
}
|
||||
|
||||
-/* Generate code to initialize the register size table. */
|
||||
+/* Helper for expand_builtin_init_dwarf_reg_sizes. Generate code to
|
||||
+ initialize the dwarf register size table entry corresponding to register
|
||||
+ REGNO in REGMODE. TABLE is the table base address, SLOTMODE is the mode
|
||||
+ to use for the size entry to initialize, and WROTE_RETURN_COLUMN needs to
|
||||
+ be set to true if the dwarf register number for REGNO is the dwarf return
|
||||
+ column number. */
|
||||
+
|
||||
+static
|
||||
+void init_one_dwarf_reg_size (int regno, enum machine_mode regmode,
|
||||
+ rtx table, enum machine_mode slotmode,
|
||||
+ bool *wrote_return_column)
|
||||
+{
|
||||
+ const unsigned int dnum = DWARF_FRAME_REGNUM (regno);
|
||||
+ const unsigned int rnum = DWARF2_FRAME_REG_OUT (dnum, 1);
|
||||
+ const unsigned int dcol = DWARF_REG_TO_UNWIND_COLUMN (rnum);
|
||||
+
|
||||
+ const HOST_WIDE_INT slotoffset = dcol * GET_MODE_SIZE (slotmode);
|
||||
+ const HOST_WIDE_INT regsize = GET_MODE_SIZE (regmode);
|
||||
+
|
||||
+ if (rnum >= DWARF_FRAME_REGISTERS)
|
||||
+ return;
|
||||
+
|
||||
+ if (dnum == DWARF_FRAME_RETURN_COLUMN)
|
||||
+ {
|
||||
+ if (regmode == VOIDmode)
|
||||
+ return;
|
||||
+ *wrote_return_column = true;
|
||||
+ }
|
||||
+
|
||||
+ if (slotoffset < 0)
|
||||
+ return;
|
||||
+
|
||||
+ emit_move_insn (adjust_address (table, slotmode, slotoffset),
|
||||
+ gen_int_mode (regsize, slotmode));
|
||||
+}
|
||||
+
|
||||
+/* Generate code to initialize the dwarf register size table located
|
||||
+ at the provided ADDRESS. */
|
||||
|
||||
void
|
||||
expand_builtin_init_dwarf_reg_sizes (tree address)
|
||||
@@ -238,30 +275,21 @@
|
||||
|
||||
for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
|
||||
{
|
||||
- unsigned int dnum = DWARF_FRAME_REGNUM (i);
|
||||
- unsigned int rnum = DWARF2_FRAME_REG_OUT (dnum, 1);
|
||||
+ enum machine_mode save_mode = reg_raw_mode[i];
|
||||
+ rtx span;
|
||||
|
||||
- if (rnum < DWARF_FRAME_REGISTERS)
|
||||
- {
|
||||
- HOST_WIDE_INT offset = rnum * GET_MODE_SIZE (mode);
|
||||
- enum machine_mode save_mode = reg_raw_mode[i];
|
||||
- HOST_WIDE_INT size;
|
||||
-
|
||||
- if (HARD_REGNO_CALL_PART_CLOBBERED (i, save_mode))
|
||||
- save_mode = choose_hard_reg_mode (i, 1, true);
|
||||
- if (dnum == DWARF_FRAME_RETURN_COLUMN)
|
||||
- {
|
||||
- if (save_mode == VOIDmode)
|
||||
- continue;
|
||||
- wrote_return_column = true;
|
||||
- }
|
||||
- size = GET_MODE_SIZE (save_mode);
|
||||
- if (offset < 0)
|
||||
- continue;
|
||||
-
|
||||
- emit_move_insn (adjust_address (mem, mode, offset),
|
||||
- gen_int_mode (size, mode));
|
||||
- }
|
||||
+ span = targetm.dwarf_register_span (gen_rtx_REG (save_mode, i));
|
||||
+ if (!span)
|
||||
+ init_one_dwarf_reg_size (i, save_mode, mem, mode, &wrote_return_column);
|
||||
+ else
|
||||
+ {
|
||||
+ for (int si = 0; si < XVECLEN (span, 0); si++)
|
||||
+ {
|
||||
+ rtx reg = XVECEXP (span, 0, si);
|
||||
+ init_one_dwarf_reg_size
|
||||
+ (REGNO (reg), GET_MODE (reg), mem, mode, &wrote_return_column);
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
|
||||
if (!wrote_return_column)
|
||||
--- a/libgcc/unwind-dw2.c
|
||||
+++ b/libgcc/unwind-dw2.c
|
||||
@@ -55,10 +55,6 @@
|
||||
#define PRE_GCC3_DWARF_FRAME_REGISTERS DWARF_FRAME_REGISTERS
|
||||
#endif
|
||||
|
||||
-#ifndef DWARF_REG_TO_UNWIND_COLUMN
|
||||
-#define DWARF_REG_TO_UNWIND_COLUMN(REGNO) (REGNO)
|
||||
-#endif
|
||||
-
|
||||
/* ??? For the public function interfaces, we tend to gcc_assert that the
|
||||
column numbers are in range. For the dwarf2 unwind info this does happen,
|
||||
although so far in a case that doesn't actually matter.
|
21
packages/gcc/4.8.5/0001-gcc_bug_62231.patch
vendored
21
packages/gcc/4.8.5/0001-gcc_bug_62231.patch
vendored
@ -1,21 +0,0 @@
|
||||
As-applied. From:
|
||||
|
||||
https://gcc.gnu.org/ml/gcc-patches/2014-10/msg02605.html
|
||||
|
||||
Linked from bug62231 comment 4 there
|
||||
|
||||
---
|
||||
gcc/config/rs6000/rs6000.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/gcc/config/rs6000/rs6000.c
|
||||
+++ b/gcc/config/rs6000/rs6000.c
|
||||
@@ -1677,7 +1677,7 @@
|
||||
SCmode so as to pass the value correctly in a pair of
|
||||
registers. */
|
||||
else if (TARGET_E500_DOUBLE && FLOAT_MODE_P (mode) && mode != SCmode
|
||||
- && !DECIMAL_FLOAT_MODE_P (mode))
|
||||
+ && !DECIMAL_FLOAT_MODE_P (mode) && SPE_SIMD_REGNO_P (regno))
|
||||
reg_size = UNITS_PER_FP_WORD;
|
||||
|
||||
else
|
@ -1,18 +0,0 @@
|
||||
---
|
||||
libtool-ldflags | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
--- a/libtool-ldflags
|
||||
+++ b/libtool-ldflags
|
||||
@@ -36,6 +36,11 @@
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
+ -framework)
|
||||
+ # libtool handles this option. It should not be prefixed with
|
||||
+ # -Xcompiler, as that would split it from the argument that
|
||||
+ # follows.
|
||||
+ ;;
|
||||
-f*|--*)
|
||||
# Libtool does not ascribe any special meaning options
|
||||
# that begin with -f or with a double-dash. So, it will
|
17
packages/gcc/4.8.5/0003-uclibc-conf.patch
vendored
17
packages/gcc/4.8.5/0003-uclibc-conf.patch
vendored
@ -1,17 +0,0 @@
|
||||
---
|
||||
contrib/regression/objs-gcc.sh | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
--- a/contrib/regression/objs-gcc.sh
|
||||
+++ b/contrib/regression/objs-gcc.sh
|
||||
@@ -106,6 +106,10 @@
|
||||
then
|
||||
make all-gdb all-dejagnu all-ld || exit 1
|
||||
make install-gdb install-dejagnu install-ld || exit 1
|
||||
+elif [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-uclibc ]
|
||||
+ then
|
||||
+ make all-gdb all-dejagnu all-ld || exit 1
|
||||
+ make install-gdb install-dejagnu install-ld || exit 1
|
||||
elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then
|
||||
make bootstrap || exit 1
|
||||
make install || exit 1
|
15
packages/gcc/4.8.5/0004-alpha-bad-eh_frame.patch
vendored
15
packages/gcc/4.8.5/0004-alpha-bad-eh_frame.patch
vendored
@ -1,15 +0,0 @@
|
||||
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80037
|
||||
|
||||
---
|
||||
libgcc/config/alpha/t-alpha | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
--- a/libgcc/config/alpha/t-alpha
|
||||
+++ b/libgcc/config/alpha/t-alpha
|
||||
@@ -1,2 +1,6 @@
|
||||
# This is a support routine for longlong.h, used by libgcc2.c.
|
||||
LIB2ADD += $(srcdir)/config/alpha/qrnnd.S
|
||||
+
|
||||
+# When GAS-generated unwind tables are created, they get created
|
||||
+# after the __FRAME_END__ terminator, which causes an ld error.
|
||||
+CRTSTUFF_T_CFLAGS = -fno-unwind-tables
|
32
packages/gcc/4.8.5/0005-pr65730.patch
vendored
32
packages/gcc/4.8.5/0005-pr65730.patch
vendored
@ -1,32 +0,0 @@
|
||||
From b9a7775674d91c7af8043a83211ffeaa576327d7 Mon Sep 17 00:00:00 2001
|
||||
From: Max Filippov <jcmvbkbc@gmail.com>
|
||||
Date: Fri, 10 Apr 2015 17:46:30 +0300
|
||||
Subject: [PATCH] Fix PR target/65730
|
||||
|
||||
2015-05-20 Max Filippov <jcmvbkbc@gmail.com>
|
||||
gcc/
|
||||
* config/xtensa/xtensa.c (init_alignment_context): Replace MULT
|
||||
by BITS_PER_UNIT with ASHIFT by exact_log2 (BITS_PER_UNIT).
|
||||
|
||||
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
|
||||
---
|
||||
Backported from: svn+ssh://gcc.gnu.org/svn/gcc/trunk@223452
|
||||
Changes to ChangeLog are dropped.
|
||||
|
||||
gcc/config/xtensa/xtensa.c | 5 +++--
|
||||
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/gcc/config/xtensa/xtensa.c
|
||||
+++ b/gcc/config/xtensa/xtensa.c
|
||||
@@ -1423,8 +1423,9 @@
|
||||
if (ac->shift != NULL_RTX)
|
||||
{
|
||||
/* Shift is the byte count, but we need the bitcount. */
|
||||
- ac->shift = expand_simple_binop (SImode, MULT, ac->shift,
|
||||
- GEN_INT (BITS_PER_UNIT),
|
||||
+ gcc_assert (exact_log2 (BITS_PER_UNIT) >= 0);
|
||||
+ ac->shift = expand_simple_binop (SImode, ASHIFT, ac->shift,
|
||||
+ GEN_INT (exact_log2 (BITS_PER_UNIT)),
|
||||
NULL_RTX, 1, OPTAB_DIRECT);
|
||||
ac->modemask = expand_simple_binop (SImode, ASHIFT,
|
||||
GEN_INT (GET_MODE_MASK (mode)),
|
20
packages/gcc/4.8.5/0006-pr43538.patch
vendored
20
packages/gcc/4.8.5/0006-pr43538.patch
vendored
@ -1,20 +0,0 @@
|
||||
From c037df1be41f8daf4d581d7ffa4ec8cfa640bccf Mon Sep 17 00:00:00 2001
|
||||
From: glisse <glisse@138bc75d-0d04-0410-961f-82ee72b054a4>
|
||||
Date: Fri, 25 Apr 2014 08:03:08 +0000
|
||||
Subject: [PATCH] 2014-04-25 Marc Glisse <marc.glisse@inria.fr>
|
||||
|
||||
PR target/43538
|
||||
* mt-gnu: Don't reset CXXFLAGS_FOR_TARGET.
|
||||
|
||||
|
||||
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@209784 138bc75d-0d04-0410-961f-82ee72b054a4
|
||||
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
|
||||
---
|
||||
config/mt-gnu | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/config/mt-gnu
|
||||
+++ b/config/mt-gnu
|
||||
@@ -1 +1 @@
|
||||
-CXXFLAGS_FOR_TARGET = $(CXXFLAGS) -D_GNU_SOURCE
|
||||
+CXXFLAGS_FOR_TARGET += -D_GNU_SOURCE
|
@ -1,23 +0,0 @@
|
||||
From 9bcf38cd9f382486b3823eb923b50e2e9a89cef7 Mon Sep 17 00:00:00 2001
|
||||
From: law <law@138bc75d-0d04-0410-961f-82ee72b054a4>
|
||||
Date: Tue, 18 Nov 2014 22:12:52 +0000
|
||||
Subject: [PATCH] 2014-11-17 Bob Dunlop <bob.dunlop@xyzzy.org.uk>
|
||||
|
||||
* mt-ospace (CFLAGS_FOR_TARGET): Append -g -Os rather than
|
||||
overwriting.
|
||||
(CXXFLAGS_FOR_TARGET): Similarly.
|
||||
|
||||
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@217739 138bc75d-0d04-0410-961f-82ee72b054a4
|
||||
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
|
||||
---
|
||||
config/mt-ospace | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/config/mt-ospace
|
||||
+++ b/config/mt-ospace
|
||||
@@ -1,3 +1,3 @@
|
||||
# Build libraries optimizing for space, not speed.
|
||||
- CFLAGS_FOR_TARGET = -g -Os
|
||||
- CXXFLAGS_FOR_TARGET = -g -Os
|
||||
+ CFLAGS_FOR_TARGET += -g -Os
|
||||
+ CXXFLAGS_FOR_TARGET += -g -Os
|
141
packages/gcc/4.8.5/0008-build_gcc-5_with_gcc-6.patch
vendored
141
packages/gcc/4.8.5/0008-build_gcc-5_with_gcc-6.patch
vendored
@ -1,141 +0,0 @@
|
||||
From 1e5f1089dec3af328fd03125d6778f666d0bd4e4 Mon Sep 17 00:00:00 2001
|
||||
From: edlinger <edlinger@138bc75d-0d04-0410-961f-82ee72b054a4>
|
||||
Date: Thu, 25 Feb 2016 15:33:50 +0000
|
||||
Subject: [PATCH 1/1] 2016-02-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
|
||||
|
||||
Backported from mainline
|
||||
2016-02-19 Jakub Jelinek <jakub@redhat.com>
|
||||
Bernd Edlinger <bernd.edlinger@hotmail.de>
|
||||
|
||||
* Make-lang.in: Invoke gperf with -L C++.
|
||||
* cfns.gperf: Remove prototypes for hash and libc_name_p
|
||||
inlines.
|
||||
* cfns.h: Regenerated.
|
||||
* except.c (nothrow_libfn_p): Adjust.
|
||||
|
||||
|
||||
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-5-branch@233720 138bc75d-0d04-0410-961f-82ee72b054a4
|
||||
---
|
||||
gcc/cp/Make-lang.in | 2 +-
|
||||
gcc/cp/cfns.gperf | 10 ++--------
|
||||
gcc/cp/cfns.h | 41 ++++++++++++++---------------------------
|
||||
gcc/cp/except.c | 3 ++-
|
||||
4 files changed, 19 insertions(+), 37 deletions(-)
|
||||
|
||||
--- a/gcc/cp/cfns.gperf
|
||||
+++ b/gcc/cp/cfns.gperf
|
||||
@@ -1,3 +1,5 @@
|
||||
+%language=C++
|
||||
+%define class-name libc_name
|
||||
%{
|
||||
/* Copyright (C) 2000-2013 Free Software Foundation, Inc.
|
||||
|
||||
@@ -16,14 +18,6 @@
|
||||
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/>. */
|
||||
-#ifdef __GNUC__
|
||||
-__inline
|
||||
-#endif
|
||||
-static unsigned int hash (const char *, unsigned int);
|
||||
-#ifdef __GNUC__
|
||||
-__inline
|
||||
-#endif
|
||||
-const char * libc_name_p (const char *, unsigned int);
|
||||
%}
|
||||
%%
|
||||
# The standard C library functions, for feeding to gperf; the result is used
|
||||
--- a/gcc/cp/cfns.h
|
||||
+++ b/gcc/cp/cfns.h
|
||||
@@ -1,5 +1,5 @@
|
||||
-/* ANSI-C code produced by gperf version 3.0.3 */
|
||||
-/* Command-line: gperf -o -C -E -k '1-6,$' -j1 -D -N libc_name_p -L ANSI-C cfns.gperf */
|
||||
+/* C++ code produced by gperf version 3.0.4 */
|
||||
+/* Command-line: gperf -o -C -E -k '1-6,$' -j1 -D -N libc_name_p -L C++ --output-file cfns.h cfns.gperf */
|
||||
|
||||
#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
|
||||
&& ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
|
||||
@@ -28,7 +28,7 @@
|
||||
#error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gnu-gperf@gnu.org>."
|
||||
#endif
|
||||
|
||||
-#line 1 "cfns.gperf"
|
||||
+#line 3 "cfns.gperf"
|
||||
|
||||
/* Copyright (C) 2000-2013 Free Software Foundation, Inc.
|
||||
|
||||
@@ -47,25 +47,18 @@
|
||||
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/>. */
|
||||
-#ifdef __GNUC__
|
||||
-__inline
|
||||
-#endif
|
||||
-static unsigned int hash (const char *, unsigned int);
|
||||
-#ifdef __GNUC__
|
||||
-__inline
|
||||
-#endif
|
||||
-const char * libc_name_p (const char *, unsigned int);
|
||||
/* maximum key range = 391, duplicates = 0 */
|
||||
|
||||
-#ifdef __GNUC__
|
||||
-__inline
|
||||
-#else
|
||||
-#ifdef __cplusplus
|
||||
-inline
|
||||
-#endif
|
||||
-#endif
|
||||
-static unsigned int
|
||||
-hash (register const char *str, register unsigned int len)
|
||||
+class libc_name
|
||||
+{
|
||||
+private:
|
||||
+ static inline unsigned int hash (const char *str, unsigned int len);
|
||||
+public:
|
||||
+ static const char *libc_name_p (const char *str, unsigned int len);
|
||||
+};
|
||||
+
|
||||
+inline unsigned int
|
||||
+libc_name::hash (register const char *str, register unsigned int len)
|
||||
{
|
||||
static const unsigned short asso_values[] =
|
||||
{
|
||||
@@ -122,14 +115,8 @@
|
||||
return hval + asso_values[(unsigned char)str[len - 1]];
|
||||
}
|
||||
|
||||
-#ifdef __GNUC__
|
||||
-__inline
|
||||
-#ifdef __GNUC_STDC_INLINE__
|
||||
-__attribute__ ((__gnu_inline__))
|
||||
-#endif
|
||||
-#endif
|
||||
const char *
|
||||
-libc_name_p (register const char *str, register unsigned int len)
|
||||
+libc_name::libc_name_p (register const char *str, register unsigned int len)
|
||||
{
|
||||
enum
|
||||
{
|
||||
--- a/gcc/cp/except.c
|
||||
+++ b/gcc/cp/except.c
|
||||
@@ -1025,7 +1025,8 @@
|
||||
unless the system headers are playing rename tricks, and if
|
||||
they are, we don't want to be confused by them. */
|
||||
id = DECL_NAME (fn);
|
||||
- return !!libc_name_p (IDENTIFIER_POINTER (id), IDENTIFIER_LENGTH (id));
|
||||
+ return !!libc_name::libc_name_p (IDENTIFIER_POINTER (id),
|
||||
+ IDENTIFIER_LENGTH (id));
|
||||
}
|
||||
|
||||
/* Returns nonzero if an exception of type FROM will be caught by a
|
||||
--- a/gcc/cp/Make-lang.in
|
||||
+++ b/gcc/cp/Make-lang.in
|
||||
@@ -115,7 +115,7 @@
|
||||
# deleting the $(srcdir)/cp/cfns.h file.
|
||||
$(srcdir)/cp/cfns.h:
|
||||
endif
|
||||
- gperf -o -C -E -k '1-6,$$' -j1 -D -N 'libc_name_p' -L ANSI-C \
|
||||
+ gperf -o -C -E -k '1-6,$$' -j1 -D -N 'libc_name_p' -L C++ \
|
||||
$(srcdir)/cp/cfns.gperf --output-file $(srcdir)/cp/cfns.h
|
||||
|
||||
#
|
15
packages/gcc/4.8.5/0009-missing-execinfo_h.patch
vendored
15
packages/gcc/4.8.5/0009-missing-execinfo_h.patch
vendored
@ -1,15 +0,0 @@
|
||||
---
|
||||
boehm-gc/include/gc.h | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/boehm-gc/include/gc.h
|
||||
+++ b/boehm-gc/include/gc.h
|
||||
@@ -503,7 +503,7 @@
|
||||
#if defined(__linux__) || defined(__GLIBC__)
|
||||
# include <features.h>
|
||||
# if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \
|
||||
- && !defined(__ia64__)
|
||||
+ && !defined(__ia64__) && !defined(__UCLIBC__)
|
||||
# ifndef GC_HAVE_BUILTIN_BACKTRACE
|
||||
# define GC_HAVE_BUILTIN_BACKTRACE
|
||||
# endif
|
@ -1,51 +0,0 @@
|
||||
---
|
||||
libmudflap/mf-hooks2.c | 10 +++++-----
|
||||
1 file changed, 5 insertions(+), 5 deletions(-)
|
||||
|
||||
--- a/libmudflap/mf-hooks2.c
|
||||
+++ b/libmudflap/mf-hooks2.c
|
||||
@@ -424,7 +424,7 @@
|
||||
{
|
||||
TRACE ("%s\n", __PRETTY_FUNCTION__);
|
||||
MF_VALIDATE_EXTENT(s, n, __MF_CHECK_WRITE, "bzero region");
|
||||
- bzero (s, n);
|
||||
+ memset (s, 0, n);
|
||||
}
|
||||
|
||||
|
||||
@@ -434,7 +434,7 @@
|
||||
TRACE ("%s\n", __PRETTY_FUNCTION__);
|
||||
MF_VALIDATE_EXTENT(src, n, __MF_CHECK_READ, "bcopy src");
|
||||
MF_VALIDATE_EXTENT(dest, n, __MF_CHECK_WRITE, "bcopy dest");
|
||||
- bcopy (src, dest, n);
|
||||
+ memmove (dest, src, n);
|
||||
}
|
||||
|
||||
|
||||
@@ -444,7 +444,7 @@
|
||||
TRACE ("%s\n", __PRETTY_FUNCTION__);
|
||||
MF_VALIDATE_EXTENT(s1, n, __MF_CHECK_READ, "bcmp 1st arg");
|
||||
MF_VALIDATE_EXTENT(s2, n, __MF_CHECK_READ, "bcmp 2nd arg");
|
||||
- return bcmp (s1, s2, n);
|
||||
+ return n == 0 ? 0 : memcmp (s1, s2, n);
|
||||
}
|
||||
|
||||
|
||||
@@ -453,7 +453,7 @@
|
||||
size_t n = strlen (s);
|
||||
TRACE ("%s\n", __PRETTY_FUNCTION__);
|
||||
MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "index region");
|
||||
- return index (s, c);
|
||||
+ return strchr (s, c);
|
||||
}
|
||||
|
||||
|
||||
@@ -462,7 +462,7 @@
|
||||
size_t n = strlen (s);
|
||||
TRACE ("%s\n", __PRETTY_FUNCTION__);
|
||||
MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "rindex region");
|
||||
- return rindex (s, c);
|
||||
+ return strrchr (s, c);
|
||||
}
|
||||
|
||||
/* XXX: stpcpy, memccpy */
|
@ -1,107 +0,0 @@
|
||||
---
|
||||
gcc/configure | 22 +++++++++++++++-------
|
||||
gcc/configure.ac | 18 +++++++++++++-----
|
||||
2 files changed, 28 insertions(+), 12 deletions(-)
|
||||
|
||||
--- a/gcc/configure
|
||||
+++ b/gcc/configure
|
||||
@@ -27364,6 +27364,9 @@
|
||||
|
||||
|
||||
pluginlibs=
|
||||
+PICFLAG="-fPIC"
|
||||
+UNDEFINEDPREAMBLE="extern int X;"
|
||||
+UNDEFINEDCODE="return X == 0;"
|
||||
|
||||
case "${host}" in
|
||||
*-*-darwin*)
|
||||
@@ -27375,6 +27378,11 @@
|
||||
export_sym_check=
|
||||
fi
|
||||
;;
|
||||
+ *-*-mingw*|*-*-cygwin*|*-*-msys*)
|
||||
+ PICFLAG=""
|
||||
+ UNDEFINEDPREAMBLE=""
|
||||
+ UNDEFINEDCODE=""
|
||||
+ ;;
|
||||
*)
|
||||
if test x$build = x$host; then
|
||||
export_sym_check="objdump${exeext} -T"
|
||||
@@ -27487,23 +27495,23 @@
|
||||
case "${host}" in
|
||||
*-*-darwin*)
|
||||
CFLAGS=`echo $CFLAGS | sed s/-mdynamic-no-pic//g`
|
||||
- CFLAGS="$CFLAGS -fPIC"
|
||||
+ CFLAGS="$CFLAGS ${PICFLAG}"
|
||||
LDFLAGS="$LDFLAGS -shared -undefined dynamic_lookup"
|
||||
;;
|
||||
*)
|
||||
- CFLAGS="$CFLAGS -fPIC"
|
||||
- LDFLAGS="$LDFLAGS -fPIC -shared"
|
||||
+ CFLAGS="$CFLAGS ${PICFLAG}"
|
||||
+ LDFLAGS="$LDFLAGS ${PICFLAG} -shared"
|
||||
;;
|
||||
esac
|
||||
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -fPIC -shared" >&5
|
||||
-$as_echo_n "checking for -fPIC -shared... " >&6; }
|
||||
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${PICFLAG} -shared" >&5
|
||||
+$as_echo_n "checking for ${PICFLAG} -shared... " >&6; }
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
-extern int X;
|
||||
+${UNDEFINEDPREAMBLE}
|
||||
int
|
||||
main ()
|
||||
{
|
||||
-return X == 0;
|
||||
+${UNDEFINEDCODE}
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
--- a/gcc/configure.ac
|
||||
+++ b/gcc/configure.ac
|
||||
@@ -5243,6 +5243,9 @@
|
||||
enable_plugin=yes; default_plugin=yes)
|
||||
|
||||
pluginlibs=
|
||||
+PICFLAG="-fPIC"
|
||||
+UNDEFINEDPREAMBLE="extern int X;"
|
||||
+UNDEFINEDCODE="return X == 0;"
|
||||
|
||||
case "${host}" in
|
||||
*-*-darwin*)
|
||||
@@ -5254,6 +5257,11 @@
|
||||
export_sym_check=
|
||||
fi
|
||||
;;
|
||||
+ *-*-mingw*|*-*-cygwin*|*-*-msys*)
|
||||
+ PICFLAG=""
|
||||
+ UNDEFINEDPREAMBLE=""
|
||||
+ UNDEFINEDCODE=""
|
||||
+ ;;
|
||||
*)
|
||||
if test x$build = x$host; then
|
||||
export_sym_check="objdump${exeext} -T"
|
||||
@@ -5305,17 +5313,17 @@
|
||||
case "${host}" in
|
||||
*-*-darwin*)
|
||||
CFLAGS=`echo $CFLAGS | sed s/-mdynamic-no-pic//g`
|
||||
- CFLAGS="$CFLAGS -fPIC"
|
||||
+ CFLAGS="$CFLAGS ${PICFLAG}"
|
||||
LDFLAGS="$LDFLAGS -shared -undefined dynamic_lookup"
|
||||
;;
|
||||
*)
|
||||
- CFLAGS="$CFLAGS -fPIC"
|
||||
- LDFLAGS="$LDFLAGS -fPIC -shared"
|
||||
+ CFLAGS="$CFLAGS ${PICFLAG}"
|
||||
+ LDFLAGS="$LDFLAGS ${PICFLAG} -shared"
|
||||
;;
|
||||
esac
|
||||
- AC_MSG_CHECKING([for -fPIC -shared])
|
||||
+ AC_MSG_CHECKING([for ${PICFLAG} -shared])
|
||||
AC_TRY_LINK(
|
||||
- [extern int X;],[return X == 0;],
|
||||
+ [${UNDEFINEDPREAMBLE}],[${UNDEFINEDCODE}],
|
||||
[AC_MSG_RESULT([yes]); have_pic_shared=yes],
|
||||
[AC_MSG_RESULT([no]); have_pic_shared=no])
|
||||
if test x"$have_pic_shared" != x"yes" -o x"$ac_cv_search_dlopen" = x"no"; then
|
@ -1,31 +0,0 @@
|
||||
---
|
||||
gcc/config/arm/linux-elf.h | 2 +-
|
||||
libgcc/config/arm/t-linux | 7 ++++++-
|
||||
2 files changed, 7 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/gcc/config/arm/linux-elf.h
|
||||
+++ b/gcc/config/arm/linux-elf.h
|
||||
@@ -55,7 +55,7 @@
|
||||
%{shared:-lc} \
|
||||
%{!shared:%{profile:-lc_p}%{!profile:-lc}}"
|
||||
|
||||
-#define LIBGCC_SPEC "%{mfloat-abi=soft*:-lfloat} -lgcc"
|
||||
+#define LIBGCC_SPEC "-lgcc"
|
||||
|
||||
#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
|
||||
|
||||
--- a/libgcc/config/arm/t-linux
|
||||
+++ b/libgcc/config/arm/t-linux
|
||||
@@ -1,6 +1,11 @@
|
||||
LIB1ASMSRC = arm/lib1funcs.S
|
||||
LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx _clzsi2 _clzdi2 \
|
||||
- _ctzsi2 _arm_addsubdf3 _arm_addsubsf3
|
||||
+ _ctzsi2 _arm_addsubdf3 _arm_addsubsf3 \
|
||||
+ _arm_addsubdf3 _arm_addsubsf3 \
|
||||
+ _arm_negdf2 _arm_muldivdf3 _arm_cmpdf2 _arm_unorddf2 \
|
||||
+ _arm_fixdfsi _arm_fixunsdfsi _arm_truncdfsf2 \
|
||||
+ _arm_negsf2 _arm_muldivsf3 _arm_cmpsf2 _arm_unordsf2 \
|
||||
+ _arm_fixsfsi _arm_fixunssfsi
|
||||
|
||||
# Just for these, we omit the frame pointer since it makes such a big
|
||||
# difference.
|
17
packages/gcc/4.8.5/0013-arm_unbreak_armv4t.patch
vendored
17
packages/gcc/4.8.5/0013-arm_unbreak_armv4t.patch
vendored
@ -1,17 +0,0 @@
|
||||
http://sourceware.org/ml/crossgcc/2008-05/msg00009.html
|
||||
|
||||
---
|
||||
gcc/config/arm/linux-eabi.h | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/gcc/config/arm/linux-eabi.h
|
||||
+++ b/gcc/config/arm/linux-eabi.h
|
||||
@@ -45,7 +45,7 @@
|
||||
The ARM10TDMI core is the default for armv5t, so set
|
||||
SUBTARGET_CPU_DEFAULT to achieve this. */
|
||||
#undef SUBTARGET_CPU_DEFAULT
|
||||
-#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm10tdmi
|
||||
+#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm9tdmi
|
||||
|
||||
/* TARGET_BIG_ENDIAN_DEFAULT is set in
|
||||
config.gcc for big endian configurations. */
|
26
packages/gcc/4.8.5/0014-PR57717-E500v2.patch
vendored
26
packages/gcc/4.8.5/0014-PR57717-E500v2.patch
vendored
@ -1,26 +0,0 @@
|
||||
This backports fix from http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57717
|
||||
|
||||
Upstream-Status: Backport
|
||||
Signed-off-by: Julian Brown <Julian_Brown@mentor.com>
|
||||
[Gustavo: Update for gcc 4.8.3]
|
||||
|
||||
fix for PR57717 (PowerPC E500v2)
|
||||
http://gcc.gnu.org/ml/gcc-patches/2013-08/msg00668.html
|
||||
|
||||
---
|
||||
gcc/config/rs6000/rs6000.c | 4 +---
|
||||
1 file changed, 1 insertion(+), 3 deletions(-)
|
||||
|
||||
--- a/gcc/config/rs6000/rs6000.c
|
||||
+++ b/gcc/config/rs6000/rs6000.c
|
||||
@@ -7479,9 +7479,7 @@
|
||||
&& GET_CODE (XEXP (x, 1)) == CONST_INT
|
||||
&& reg_offset_p
|
||||
&& !SPE_VECTOR_MODE (mode)
|
||||
- && !(TARGET_E500_DOUBLE && (mode == DFmode || mode == TFmode
|
||||
- || mode == DDmode || mode == TDmode
|
||||
- || mode == DImode))
|
||||
+ && !(TARGET_E500_DOUBLE && GET_MODE_SIZE (mode) > UNITS_PER_WORD)
|
||||
&& (!VECTOR_MODE_P (mode) || VECTOR_MEM_NONE_P (mode)))
|
||||
{
|
||||
HOST_WIDE_INT val = INTVAL (XEXP (x, 1));
|
115
packages/gcc/4.8.5/0015-PR60155.patch
vendored
115
packages/gcc/4.8.5/0015-PR60155.patch
vendored
@ -1,115 +0,0 @@
|
||||
From gcc bugzilla https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60155
|
||||
Upstream status: in trunk.
|
||||
|
||||
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
|
||||
|
||||
---
|
||||
gcc/gcse.c | 71 ++++++++++++++++++++++++++++++++++++++++++++++++++++++-------
|
||||
1 file changed, 64 insertions(+), 7 deletions(-)
|
||||
|
||||
--- a/gcc/gcse.c
|
||||
+++ b/gcc/gcse.c
|
||||
@@ -2479,6 +2479,65 @@
|
||||
}
|
||||
}
|
||||
|
||||
+struct set_data
|
||||
+{
|
||||
+ rtx insn;
|
||||
+ const_rtx set;
|
||||
+ int nsets;
|
||||
+};
|
||||
+
|
||||
+/* Increment number of sets and record set in DATA. */
|
||||
+
|
||||
+static void
|
||||
+record_set_data (rtx dest, const_rtx set, void *data)
|
||||
+{
|
||||
+ struct set_data *s = (struct set_data *)data;
|
||||
+
|
||||
+ if (GET_CODE (set) == SET)
|
||||
+ {
|
||||
+ /* We allow insns having multiple sets, where all but one are
|
||||
+ dead as single set insns. In the common case only a single
|
||||
+ set is present, so we want to avoid checking for REG_UNUSED
|
||||
+ notes unless necessary. */
|
||||
+ if (s->nsets == 1
|
||||
+ && find_reg_note (s->insn, REG_UNUSED, SET_DEST (s->set))
|
||||
+ && !side_effects_p (s->set))
|
||||
+ s->nsets = 0;
|
||||
+
|
||||
+ if (!s->nsets)
|
||||
+ {
|
||||
+ /* Record this set. */
|
||||
+ s->nsets += 1;
|
||||
+ s->set = set;
|
||||
+ }
|
||||
+ else if (!find_reg_note (s->insn, REG_UNUSED, dest)
|
||||
+ || side_effects_p (set))
|
||||
+ s->nsets += 1;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static const_rtx
|
||||
+single_set_gcse (rtx insn)
|
||||
+{
|
||||
+ struct set_data s;
|
||||
+ rtx pattern;
|
||||
+
|
||||
+ gcc_assert (INSN_P (insn));
|
||||
+
|
||||
+ /* Optimize common case. */
|
||||
+ pattern = PATTERN (insn);
|
||||
+ if (GET_CODE (pattern) == SET)
|
||||
+ return pattern;
|
||||
+
|
||||
+ s.insn = insn;
|
||||
+ s.nsets = 0;
|
||||
+ note_stores (pattern, record_set_data, &s);
|
||||
+
|
||||
+ /* Considered invariant insns have exactly one set. */
|
||||
+ gcc_assert (s.nsets == 1);
|
||||
+ return s.set;
|
||||
+}
|
||||
+
|
||||
/* Emit move from SRC to DEST noting the equivalence with expression computed
|
||||
in INSN. */
|
||||
|
||||
@@ -2486,7 +2545,8 @@
|
||||
gcse_emit_move_after (rtx dest, rtx src, rtx insn)
|
||||
{
|
||||
rtx new_rtx;
|
||||
- rtx set = single_set (insn), set2;
|
||||
+ const_rtx set = single_set_gcse (insn);
|
||||
+ rtx set2;
|
||||
rtx note;
|
||||
rtx eqv = NULL_RTX;
|
||||
|
||||
@@ -3345,13 +3405,12 @@
|
||||
FOR_EACH_VEC_ELT (occrs_to_hoist, j, occr)
|
||||
{
|
||||
rtx insn;
|
||||
- rtx set;
|
||||
+ const_rtx set;
|
||||
|
||||
gcc_assert (!occr->deleted_p);
|
||||
|
||||
insn = occr->insn;
|
||||
- set = single_set (insn);
|
||||
- gcc_assert (set);
|
||||
+ set = single_set_gcse (insn);
|
||||
|
||||
/* Create a pseudo-reg to store the result of reaching
|
||||
expressions into. Get the mode for the new pseudo
|
||||
@@ -3432,10 +3491,8 @@
|
||||
{
|
||||
rtx reg;
|
||||
enum reg_class pressure_class;
|
||||
- rtx set = single_set (insn);
|
||||
+ const_rtx set = single_set_gcse (insn);
|
||||
|
||||
- /* Considered invariant insns have only one set. */
|
||||
- gcc_assert (set != NULL_RTX);
|
||||
reg = SET_DEST (set);
|
||||
if (GET_CODE (reg) == SUBREG)
|
||||
reg = SUBREG_REG (reg);
|
@ -1,26 +0,0 @@
|
||||
From 845478644ba54a6947e9b224f2e5cd342e8257a9 Mon Sep 17 00:00:00 2001
|
||||
From: Andrew Hsieh <andrewhsieh@google.com>
|
||||
Date: Wed, 25 Jun 2014 22:13:48 -0700
|
||||
Subject: [PATCH] Fix a typo in vmlaq_lane_s32
|
||||
|
||||
BUG=15526898
|
||||
|
||||
Change-Id: I4e35a764d369d378808dab29beefe34d1f93249b
|
||||
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
|
||||
---
|
||||
|
||||
---
|
||||
gcc/config/aarch64/arm_neon.h | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/gcc/config/aarch64/arm_neon.h
|
||||
+++ b/gcc/config/aarch64/arm_neon.h
|
||||
@@ -9984,7 +9984,7 @@
|
||||
#define vmlaq_lane_s32(a, b, c, d) \
|
||||
__extension__ \
|
||||
({ \
|
||||
- int32x4_t c_ = (c); \
|
||||
+ int32x2_t c_ = (c); \
|
||||
int32x4_t b_ = (b); \
|
||||
int32x4_t a_ = (a); \
|
||||
int32x4_t result; \
|
257
packages/gcc/4.8.5/0017-libstdcxx-uclibc-c99.patch
vendored
257
packages/gcc/4.8.5/0017-libstdcxx-uclibc-c99.patch
vendored
@ -1,257 +0,0 @@
|
||||
Allow C99-depending features of libstdc++ with uClibc
|
||||
|
||||
The libstdc++ code is fairly restrictive on how it checks for C99
|
||||
compatibility: it requires *complete* C99 support to enable certain
|
||||
features. For example, uClibc provides a good number of C99 features,
|
||||
but not C99 complex number support. For this reason, libstdc++
|
||||
completely disables many the standard C++ methods that can in fact
|
||||
work because uClibc provides the necessary functions.
|
||||
|
||||
This patch is similar and highly inspired from
|
||||
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58393, but implemented in
|
||||
a way that doesn't involve changing the configure.ac script, as
|
||||
autoreconfiguring gcc is complicated. It simply relies on the fact
|
||||
that uClibc defines the __UCLIBC__ definition.
|
||||
|
||||
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
||||
|
||||
---
|
||||
libstdc++-v3/config/locale/generic/c_locale.h | 2 +-
|
||||
libstdc++-v3/config/locale/gnu/c_locale.h | 2 +-
|
||||
libstdc++-v3/include/bits/basic_string.h | 2 +-
|
||||
libstdc++-v3/include/bits/locale_facets.tcc | 2 +-
|
||||
libstdc++-v3/include/bits/locale_facets_nonio.tcc | 2 +-
|
||||
libstdc++-v3/include/c_compatibility/math.h | 2 +-
|
||||
libstdc++-v3/include/c_compatibility/wchar.h | 2 +-
|
||||
libstdc++-v3/include/c_global/cstdio | 2 +-
|
||||
libstdc++-v3/include/c_global/cstdlib | 2 +-
|
||||
libstdc++-v3/include/c_global/cwchar | 4 ++--
|
||||
libstdc++-v3/include/c_std/cstdio | 2 +-
|
||||
libstdc++-v3/include/c_std/cstdlib | 2 +-
|
||||
libstdc++-v3/include/c_std/cwchar | 2 +-
|
||||
libstdc++-v3/include/ext/vstring.h | 2 +-
|
||||
libstdc++-v3/include/tr1/cstdio | 2 +-
|
||||
libstdc++-v3/include/tr1/cstdlib | 2 +-
|
||||
libstdc++-v3/include/tr1/cwchar | 2 +-
|
||||
libstdc++-v3/include/tr1/stdlib.h | 2 +-
|
||||
libstdc++-v3/src/c++11/debug.cc | 2 +-
|
||||
19 files changed, 20 insertions(+), 20 deletions(-)
|
||||
|
||||
--- a/libstdc++-v3/config/locale/generic/c_locale.h
|
||||
+++ b/libstdc++-v3/config/locale/generic/c_locale.h
|
||||
@@ -70,7 +70,7 @@
|
||||
__builtin_va_list __args;
|
||||
__builtin_va_start(__args, __fmt);
|
||||
|
||||
-#ifdef _GLIBCXX_USE_C99
|
||||
+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
|
||||
const int __ret = __builtin_vsnprintf(__out, __size, __fmt, __args);
|
||||
#else
|
||||
const int __ret = __builtin_vsprintf(__out, __fmt, __args);
|
||||
--- a/libstdc++-v3/config/locale/gnu/c_locale.h
|
||||
+++ b/libstdc++-v3/config/locale/gnu/c_locale.h
|
||||
@@ -88,7 +88,7 @@
|
||||
__builtin_va_list __args;
|
||||
__builtin_va_start(__args, __fmt);
|
||||
|
||||
-#ifdef _GLIBCXX_USE_C99
|
||||
+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
|
||||
const int __ret = __builtin_vsnprintf(__out, __size, __fmt, __args);
|
||||
#else
|
||||
const int __ret = __builtin_vsprintf(__out, __fmt, __args);
|
||||
--- a/libstdc++-v3/include/bits/basic_string.h
|
||||
+++ b/libstdc++-v3/include/bits/basic_string.h
|
||||
@@ -2809,7 +2809,7 @@
|
||||
_GLIBCXX_END_NAMESPACE_VERSION
|
||||
} // namespace
|
||||
|
||||
-#if ((__cplusplus >= 201103L) && defined(_GLIBCXX_USE_C99) \
|
||||
+#if ((__cplusplus >= 201103L) && (defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)) \
|
||||
&& !defined(_GLIBCXX_HAVE_BROKEN_VSWPRINTF))
|
||||
|
||||
#include <ext/string_conversions.h>
|
||||
--- a/libstdc++-v3/include/bits/locale_facets.tcc
|
||||
+++ b/libstdc++-v3/include/bits/locale_facets.tcc
|
||||
@@ -987,7 +987,7 @@
|
||||
char __fbuf[16];
|
||||
__num_base::_S_format_float(__io, __fbuf, __mod);
|
||||
|
||||
-#ifdef _GLIBCXX_USE_C99
|
||||
+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
|
||||
// First try a buffer perhaps big enough (most probably sufficient
|
||||
// for non-ios_base::fixed outputs)
|
||||
int __cs_size = __max_digits * 3;
|
||||
--- a/libstdc++-v3/include/bits/locale_facets_nonio.tcc
|
||||
+++ b/libstdc++-v3/include/bits/locale_facets_nonio.tcc
|
||||
@@ -572,7 +572,7 @@
|
||||
{
|
||||
const locale __loc = __io.getloc();
|
||||
const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc);
|
||||
-#ifdef _GLIBCXX_USE_C99
|
||||
+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
|
||||
// First try a buffer perhaps big enough.
|
||||
int __cs_size = 64;
|
||||
char* __cs = static_cast<char*>(__builtin_alloca(__cs_size));
|
||||
--- a/libstdc++-v3/include/c_compatibility/math.h
|
||||
+++ b/libstdc++-v3/include/c_compatibility/math.h
|
||||
@@ -56,7 +56,7 @@
|
||||
using std::floor;
|
||||
using std::fmod;
|
||||
|
||||
-#if _GLIBCXX_USE_C99
|
||||
+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
|
||||
using std::fpclassify;
|
||||
using std::isfinite;
|
||||
using std::isinf;
|
||||
--- a/libstdc++-v3/include/c_compatibility/wchar.h
|
||||
+++ b/libstdc++-v3/include/c_compatibility/wchar.h
|
||||
@@ -103,7 +103,7 @@
|
||||
using std::wmemset;
|
||||
using std::wcsftime;
|
||||
|
||||
-#if _GLIBCXX_USE_C99
|
||||
+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
|
||||
using std::wcstold;
|
||||
using std::wcstoll;
|
||||
using std::wcstoull;
|
||||
--- a/libstdc++-v3/include/c_global/cstdlib
|
||||
+++ b/libstdc++-v3/include/c_global/cstdlib
|
||||
@@ -182,7 +182,7 @@
|
||||
_GLIBCXX_END_NAMESPACE_VERSION
|
||||
} // namespace
|
||||
|
||||
-#if _GLIBCXX_USE_C99
|
||||
+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
|
||||
|
||||
#undef _Exit
|
||||
#undef llabs
|
||||
--- a/libstdc++-v3/include/c_global/cwchar
|
||||
+++ b/libstdc++-v3/include/c_global/cwchar
|
||||
@@ -232,7 +232,7 @@
|
||||
_GLIBCXX_END_NAMESPACE_VERSION
|
||||
} // namespace
|
||||
|
||||
-#if _GLIBCXX_USE_C99
|
||||
+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
|
||||
|
||||
#undef wcstold
|
||||
#undef wcstoll
|
||||
@@ -289,7 +289,7 @@
|
||||
using std::vwscanf;
|
||||
#endif
|
||||
|
||||
-#if _GLIBCXX_USE_C99
|
||||
+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
|
||||
using std::wcstold;
|
||||
using std::wcstoll;
|
||||
using std::wcstoull;
|
||||
--- a/libstdc++-v3/include/c_std/cstdio
|
||||
+++ b/libstdc++-v3/include/c_std/cstdio
|
||||
@@ -139,7 +139,7 @@
|
||||
using ::vsprintf;
|
||||
} // namespace std
|
||||
|
||||
-#if _GLIBCXX_USE_C99
|
||||
+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
|
||||
|
||||
#undef snprintf
|
||||
#undef vfscanf
|
||||
--- a/libstdc++-v3/include/c_std/cstdlib
|
||||
+++ b/libstdc++-v3/include/c_std/cstdlib
|
||||
@@ -180,7 +180,7 @@
|
||||
_GLIBCXX_END_NAMESPACE_VERSION
|
||||
} // namespace
|
||||
|
||||
-#if _GLIBCXX_USE_C99
|
||||
+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
|
||||
|
||||
#undef _Exit
|
||||
#undef llabs
|
||||
--- a/libstdc++-v3/include/c_std/cwchar
|
||||
+++ b/libstdc++-v3/include/c_std/cwchar
|
||||
@@ -228,7 +228,7 @@
|
||||
_GLIBCXX_END_NAMESPACE_VERSION
|
||||
} // namespace
|
||||
|
||||
-#if _GLIBCXX_USE_C99
|
||||
+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
|
||||
|
||||
#undef wcstold
|
||||
#undef wcstoll
|
||||
--- a/libstdc++-v3/include/ext/vstring.h
|
||||
+++ b/libstdc++-v3/include/ext/vstring.h
|
||||
@@ -2571,7 +2571,7 @@
|
||||
_GLIBCXX_END_NAMESPACE_VERSION
|
||||
} // namespace
|
||||
|
||||
-#if ((__cplusplus >= 201103L) && defined(_GLIBCXX_USE_C99))
|
||||
+#if ((__cplusplus >= 201103L) && (defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)))
|
||||
|
||||
#include <ext/string_conversions.h>
|
||||
|
||||
--- a/libstdc++-v3/include/tr1/cstdio
|
||||
+++ b/libstdc++-v3/include/tr1/cstdio
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
#include <cstdio>
|
||||
|
||||
-#if _GLIBCXX_USE_C99
|
||||
+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
|
||||
|
||||
namespace std _GLIBCXX_VISIBILITY(default)
|
||||
{
|
||||
--- a/libstdc++-v3/include/tr1/cstdlib
|
||||
+++ b/libstdc++-v3/include/tr1/cstdlib
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
#if _GLIBCXX_HOSTED
|
||||
|
||||
-#if _GLIBCXX_USE_C99
|
||||
+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
|
||||
|
||||
namespace std _GLIBCXX_VISIBILITY(default)
|
||||
{
|
||||
--- a/libstdc++-v3/include/tr1/cwchar
|
||||
+++ b/libstdc++-v3/include/tr1/cwchar
|
||||
@@ -52,7 +52,7 @@
|
||||
using std::vwscanf;
|
||||
#endif
|
||||
|
||||
-#if _GLIBCXX_USE_C99
|
||||
+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
|
||||
using std::wcstold;
|
||||
using std::wcstoll;
|
||||
using std::wcstoull;
|
||||
--- a/libstdc++-v3/include/tr1/stdlib.h
|
||||
+++ b/libstdc++-v3/include/tr1/stdlib.h
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
#if _GLIBCXX_HOSTED
|
||||
|
||||
-#if _GLIBCXX_USE_C99
|
||||
+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
|
||||
|
||||
using std::tr1::atoll;
|
||||
using std::tr1::strtoll;
|
||||
--- a/libstdc++-v3/src/c++11/debug.cc
|
||||
+++ b/libstdc++-v3/src/c++11/debug.cc
|
||||
@@ -787,7 +787,7 @@
|
||||
int __n __attribute__ ((__unused__)),
|
||||
const char* __fmt, _Tp __s) const throw ()
|
||||
{
|
||||
-#ifdef _GLIBCXX_USE_C99
|
||||
+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
|
||||
std::snprintf(__buf, __n, __fmt, __s);
|
||||
#else
|
||||
std::sprintf(__buf, __fmt, __s);
|
||||
--- a/libstdc++-v3/include/c_global/cstdio
|
||||
+++ b/libstdc++-v3/include/c_global/cstdio
|
||||
@@ -139,7 +139,7 @@
|
||||
using ::vsprintf;
|
||||
} // namespace
|
||||
|
||||
-#if _GLIBCXX_USE_C99
|
||||
+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
|
||||
|
||||
#undef snprintf
|
||||
#undef vfscanf
|
235
packages/gcc/4.8.5/0018-PR-other-56780.patch
vendored
235
packages/gcc/4.8.5/0018-PR-other-56780.patch
vendored
@ -1,235 +0,0 @@
|
||||
From afe990251bd9b3a063f03da31a3b8d139d033bc3 Mon Sep 17 00:00:00 2001
|
||||
From: ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
|
||||
Date: Sat, 1 Jun 2013 00:20:49 +0000
|
||||
Subject: [PATCH] PR other/56780
|
||||
|
||||
* libiberty/configure.ac: Move test for --enable-install-libiberty
|
||||
outside of the 'with_target_subdir' test so that it actually gets
|
||||
run. Add output messages to show the test result.
|
||||
* libiberty/configure: Regenerate.
|
||||
* libiberty/Makefile.in (install_to_libdir): Place the
|
||||
installation of the libiberty library in the same guard as that
|
||||
used for the headers to prevent it being installed unless
|
||||
requested via --enable-install-libiberty.
|
||||
|
||||
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@199570 138bc75d-0d04-0410-961f-82ee72b054a4
|
||||
|
||||
libiberty: fix --enable-install-libiberty flag [PR 56780]
|
||||
|
||||
Commit 199570 fixed the --disable-install-libiberty behavior, but it also
|
||||
added a bug where the enable path never works because the initial clear
|
||||
of target_header_dir wasn't deleted. So we end up initializing properly
|
||||
at the top only to reset it at the end all the time.
|
||||
|
||||
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@206367 138bc75d-0d04-0410-961f-82ee72b054a4
|
||||
|
||||
[Romain
|
||||
squash the two upstream commits
|
||||
Remove the ChangeLog]
|
||||
Signed-off-by: Romain Naour <romain.naour@openwide.fr>
|
||||
---
|
||||
libiberty/Makefile.in | 24 ++++++++++----------
|
||||
libiberty/configure | 57 ++++++++++++++++++++++++++-----------------------
|
||||
libiberty/configure.ac | 47 +++++++++++++++++++++-------------------
|
||||
3 files changed, 68 insertions(+), 60 deletions(-)
|
||||
|
||||
--- a/libiberty/Makefile.in
|
||||
+++ b/libiberty/Makefile.in
|
||||
@@ -355,19 +355,19 @@
|
||||
# since it will be passed the multilib flags.
|
||||
MULTIOSDIR = `$(CC) $(CFLAGS) -print-multi-os-directory`
|
||||
install_to_libdir: all
|
||||
- ${mkinstalldirs} $(DESTDIR)$(libdir)/$(MULTIOSDIR)
|
||||
- $(INSTALL_DATA) $(TARGETLIB) $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB)n
|
||||
- ( cd $(DESTDIR)$(libdir)/$(MULTIOSDIR) ; chmod 644 $(TARGETLIB)n ;$(RANLIB) $(TARGETLIB)n )
|
||||
- mv -f $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB)n $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB)
|
||||
if test -n "${target_header_dir}"; then \
|
||||
- case "${target_header_dir}" in \
|
||||
- /*) thd=${target_header_dir};; \
|
||||
- *) thd=${includedir}/${target_header_dir};; \
|
||||
- esac; \
|
||||
- ${mkinstalldirs} $(DESTDIR)$${thd}; \
|
||||
- for h in ${INSTALLED_HEADERS}; do \
|
||||
- ${INSTALL_DATA} $$h $(DESTDIR)$${thd}; \
|
||||
- done; \
|
||||
+ ${mkinstalldirs} $(DESTDIR)$(libdir)/$(MULTIOSDIR); \
|
||||
+ $(INSTALL_DATA) $(TARGETLIB) $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB)n; \
|
||||
+ ( cd $(DESTDIR)$(libdir)/$(MULTIOSDIR) ; chmod 644 $(TARGETLIB)n ;$(RANLIB) $(TARGETLIB)n ); \
|
||||
+ mv -f $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB)n $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB); \
|
||||
+ case "${target_header_dir}" in \
|
||||
+ /*) thd=${target_header_dir};; \
|
||||
+ *) thd=${includedir}/${target_header_dir};; \
|
||||
+ esac; \
|
||||
+ ${mkinstalldirs} $(DESTDIR)$${thd}; \
|
||||
+ for h in ${INSTALLED_HEADERS}; do \
|
||||
+ ${INSTALL_DATA} $$h $(DESTDIR)$${thd}; \
|
||||
+ done; \
|
||||
fi
|
||||
@$(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=install
|
||||
|
||||
--- a/libiberty/configure
|
||||
+++ b/libiberty/configure
|
||||
@@ -675,8 +675,8 @@
|
||||
with_newlib
|
||||
enable_maintainer_mode
|
||||
enable_multilib
|
||||
-enable_largefile
|
||||
enable_install_libiberty
|
||||
+enable_largefile
|
||||
'
|
||||
ac_precious_vars='build_alias
|
||||
host_alias
|
||||
@@ -1303,8 +1303,8 @@
|
||||
enable make rules and dependencies not useful
|
||||
(and sometimes confusing) to the casual installer
|
||||
--enable-multilib build many library versions (default)
|
||||
+ --enable-install-libiberty Install headers and library for end users
|
||||
--disable-largefile omit support for large files
|
||||
- --enable-install-libiberty Install headers for end users
|
||||
|
||||
Optional Packages:
|
||||
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
|
||||
@@ -2784,6 +2784,35 @@
|
||||
cross_compiling=maybe
|
||||
fi
|
||||
|
||||
+# We may wish to install the target headers somewhere.
|
||||
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to install libiberty headers and static library" >&5
|
||||
+$as_echo_n "checking whether to install libiberty headers and static library... " >&6; }
|
||||
+
|
||||
+# Check whether --enable-install-libiberty was given.
|
||||
+if test "${enable_install_libiberty+set}" = set; then :
|
||||
+ enableval=$enable_install_libiberty; enable_install_libiberty=$enableval
|
||||
+else
|
||||
+ enable_install_libiberty=no
|
||||
+fi
|
||||
+
|
||||
+# Option parsed, now set things appropriately.
|
||||
+case x"$enable_install_libiberty" in
|
||||
+ xyes|x)
|
||||
+ target_header_dir=libiberty
|
||||
+ ;;
|
||||
+ xno)
|
||||
+ target_header_dir=
|
||||
+ ;;
|
||||
+ *)
|
||||
+ # This could be sanity-checked in various ways...
|
||||
+ target_header_dir="${enable_install_libiberty}"
|
||||
+ ;;
|
||||
+esac
|
||||
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_install_libiberty" >&5
|
||||
+$as_echo "$enable_install_libiberty" >&6; }
|
||||
+{ $as_echo "$as_me:${as_lineno-$LINENO}: target_header_dir = $target_header_dir" >&5
|
||||
+$as_echo "$as_me: target_header_dir = $target_header_dir" >&6;}
|
||||
+
|
||||
|
||||
ac_ext=c
|
||||
ac_cpp='$CPP $CPPFLAGS'
|
||||
@@ -5476,7 +5505,6 @@
|
||||
|
||||
setobjs=
|
||||
CHECK=
|
||||
-target_header_dir=
|
||||
if test -n "${with_target_subdir}"; then
|
||||
|
||||
# We are being configured as a target library. AC_REPLACE_FUNCS
|
||||
@@ -5759,29 +5787,6 @@
|
||||
|
||||
esac
|
||||
|
||||
- # We may wish to install the target headers somewhere.
|
||||
- # Check whether --enable-install-libiberty was given.
|
||||
-if test "${enable_install_libiberty+set}" = set; then :
|
||||
- enableval=$enable_install_libiberty; enable_install_libiberty=$enableval
|
||||
-else
|
||||
- enable_install_libiberty=no
|
||||
-fi
|
||||
-
|
||||
- # Option parsed, now set things appropriately.
|
||||
- case x"$enable_install_libiberty" in
|
||||
- xyes|x)
|
||||
- target_header_dir=libiberty
|
||||
- ;;
|
||||
- xno)
|
||||
- target_header_dir=
|
||||
- ;;
|
||||
- *)
|
||||
- # This could be sanity-checked in various ways...
|
||||
- target_header_dir="${enable_install_libiberty}"
|
||||
- ;;
|
||||
- esac
|
||||
-
|
||||
-
|
||||
else
|
||||
|
||||
# Not a target library, so we set things up to run the test suite.
|
||||
--- a/libiberty/configure.ac
|
||||
+++ b/libiberty/configure.ac
|
||||
@@ -128,6 +128,31 @@
|
||||
cross_compiling=maybe
|
||||
fi
|
||||
|
||||
+# We may wish to install the target headers somewhere.
|
||||
+AC_MSG_CHECKING([whether to install libiberty headers and static library])
|
||||
+dnl install-libiberty is disabled by default
|
||||
+
|
||||
+AC_ARG_ENABLE(install-libiberty,
|
||||
+[ --enable-install-libiberty Install headers and library for end users],
|
||||
+enable_install_libiberty=$enableval,
|
||||
+enable_install_libiberty=no)dnl
|
||||
+
|
||||
+# Option parsed, now set things appropriately.
|
||||
+case x"$enable_install_libiberty" in
|
||||
+ xyes|x)
|
||||
+ target_header_dir=libiberty
|
||||
+ ;;
|
||||
+ xno)
|
||||
+ target_header_dir=
|
||||
+ ;;
|
||||
+ *)
|
||||
+ # This could be sanity-checked in various ways...
|
||||
+ target_header_dir="${enable_install_libiberty}"
|
||||
+ ;;
|
||||
+esac
|
||||
+AC_MSG_RESULT($enable_install_libiberty)
|
||||
+AC_MSG_NOTICE([target_header_dir = $target_header_dir])
|
||||
+
|
||||
GCC_NO_EXECUTABLES
|
||||
AC_PROG_CC
|
||||
AC_SYS_LARGEFILE
|
||||
@@ -380,7 +405,6 @@
|
||||
|
||||
setobjs=
|
||||
CHECK=
|
||||
-target_header_dir=
|
||||
if test -n "${with_target_subdir}"; then
|
||||
|
||||
# We are being configured as a target library. AC_REPLACE_FUNCS
|
||||
@@ -492,27 +516,6 @@
|
||||
|
||||
esac
|
||||
|
||||
- # We may wish to install the target headers somewhere.
|
||||
- AC_ARG_ENABLE(install-libiberty,
|
||||
- [ --enable-install-libiberty Install headers for end users],
|
||||
- enable_install_libiberty=$enableval,
|
||||
- enable_install_libiberty=no)dnl
|
||||
-
|
||||
- # Option parsed, now set things appropriately.
|
||||
- case x"$enable_install_libiberty" in
|
||||
- xyes|x)
|
||||
- target_header_dir=libiberty
|
||||
- ;;
|
||||
- xno)
|
||||
- target_header_dir=
|
||||
- ;;
|
||||
- *)
|
||||
- # This could be sanity-checked in various ways...
|
||||
- target_header_dir="${enable_install_libiberty}"
|
||||
- ;;
|
||||
- esac
|
||||
-
|
||||
-
|
||||
else
|
||||
|
||||
# Not a target library, so we set things up to run the test suite.
|
@ -1,273 +0,0 @@
|
||||
From 6d852ffb43b111a39162135c95249e749c4e285b Mon Sep 17 00:00:00 2001
|
||||
From: Max Filippov <jcmvbkbc@gmail.com>
|
||||
Date: Thu, 6 Aug 2015 01:16:02 +0300
|
||||
Subject: [PATCH] xtensa: add -mauto-litpools option
|
||||
|
||||
With support from assembler this option allows compiling huge functions,
|
||||
where single literal pool at the beginning of a function may not be
|
||||
reachable by L32R instructions at its end.
|
||||
|
||||
Currently assembler --auto-litpools option cannot deal with literals
|
||||
used from multiple locations separated by more than 256 KBytes of code.
|
||||
Don't turn constants into literals, instead use MOVI instruction to load
|
||||
them into registers and let the assembler turn them into literals as
|
||||
necessary.
|
||||
|
||||
2015-08-12 Max Filippov <jcmvbkbc@gmail.com>
|
||||
gcc/
|
||||
* config/xtensa/constraints.md (define_constraint "Y"): New
|
||||
constraint.
|
||||
* config/xtensa/elf.h (ASM_SPEC): Add m(no-)auto-litpools.
|
||||
* config/xtensa/linux.h (ASM_SPEC): Likewise.
|
||||
* config/xtensa/predicates.md (move_operand): Match constants
|
||||
and symbols in the presence of TARGET_AUTO_LITPOOLS.
|
||||
* config/xtensa/xtensa.c (xtensa_valid_move): Don't allow
|
||||
immediate references to TLS data.
|
||||
(xtensa_emit_move_sequence): Don't force constants to memory in
|
||||
the presence of TARGET_AUTO_LITPOOLS.
|
||||
(print_operand): Add 'y' format, same as default, but capable of
|
||||
printing SF mode constants as well.
|
||||
* config/xtensa/xtensa.md (movsi_internal, movhi_internal)
|
||||
(movsf_internal): Add movi pattern that loads literal.
|
||||
(movsf, movdf): Don't force constants to memory in the presence
|
||||
of TARGET_AUTO_LITPOOLS.
|
||||
(movdf_internal): Add 'Y' constraint.
|
||||
* config/xtensa/xtensa.opt (mauto-litpools): New option.
|
||||
|
||||
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
|
||||
---
|
||||
Backported from: r226828
|
||||
Changes to ChangeLogs and documentation are dropped.
|
||||
|
||||
gcc/config/xtensa/constraints.md | 5 +++++
|
||||
gcc/config/xtensa/elf.h | 4 +++-
|
||||
gcc/config/xtensa/linux.h | 4 +++-
|
||||
gcc/config/xtensa/predicates.md | 3 ++-
|
||||
gcc/config/xtensa/xtensa.c | 19 ++++++++++++++++++-
|
||||
gcc/config/xtensa/xtensa.md | 35 +++++++++++++++++++----------------
|
||||
gcc/config/xtensa/xtensa.opt | 4 ++++
|
||||
7 files changed, 54 insertions(+), 20 deletions(-)
|
||||
|
||||
--- a/gcc/config/xtensa/constraints.md
|
||||
+++ b/gcc/config/xtensa/constraints.md
|
||||
@@ -111,6 +111,11 @@
|
||||
(and (match_code "const_int")
|
||||
(match_test "xtensa_mask_immediate (ival)")))
|
||||
|
||||
+(define_constraint "Y"
|
||||
+ "A constant that can be used in relaxed MOVI instructions."
|
||||
+ (and (match_code "const_int,const_double,const,symbol_ref,label_ref")
|
||||
+ (match_test "TARGET_AUTO_LITPOOLS")))
|
||||
+
|
||||
;; Memory constraints. Do not use define_memory_constraint here. Doing so
|
||||
;; causes reload to force some constants into the constant pool, but since
|
||||
;; the Xtensa constant pool can only be accessed with L32R instructions, it
|
||||
--- a/gcc/config/xtensa/elf.h
|
||||
+++ b/gcc/config/xtensa/elf.h
|
||||
@@ -48,7 +48,9 @@
|
||||
%{mtarget-align:--target-align} \
|
||||
%{mno-target-align:--no-target-align} \
|
||||
%{mlongcalls:--longcalls} \
|
||||
- %{mno-longcalls:--no-longcalls}"
|
||||
+ %{mno-longcalls:--no-longcalls} \
|
||||
+ %{mauto-litpools:--auto-litpools} \
|
||||
+ %{mno-auto-litpools:--no-auto-litpools}"
|
||||
|
||||
#undef LIB_SPEC
|
||||
#define LIB_SPEC "-lc -lsim -lc -lhandlers-sim -lhal"
|
||||
--- a/gcc/config/xtensa/linux.h
|
||||
+++ b/gcc/config/xtensa/linux.h
|
||||
@@ -42,7 +42,9 @@
|
||||
%{mtarget-align:--target-align} \
|
||||
%{mno-target-align:--no-target-align} \
|
||||
%{mlongcalls:--longcalls} \
|
||||
- %{mno-longcalls:--no-longcalls}"
|
||||
+ %{mno-longcalls:--no-longcalls} \
|
||||
+ %{mauto-litpools:--auto-litpools} \
|
||||
+ %{mno-auto-litpools:--no-auto-litpools}"
|
||||
|
||||
#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
|
||||
|
||||
--- a/gcc/config/xtensa/predicates.md
|
||||
+++ b/gcc/config/xtensa/predicates.md
|
||||
@@ -142,7 +142,8 @@
|
||||
(match_test "GET_MODE_CLASS (mode) == MODE_INT
|
||||
&& xtensa_simm12b (INTVAL (op))"))
|
||||
(and (match_code "const_int,const_double,const,symbol_ref,label_ref")
|
||||
- (match_test "TARGET_CONST16 && CONSTANT_P (op)
|
||||
+ (match_test "(TARGET_CONST16 || TARGET_AUTO_LITPOOLS)
|
||||
+ && CONSTANT_P (op)
|
||||
&& GET_MODE_SIZE (mode) % UNITS_PER_WORD == 0")))))
|
||||
|
||||
;; Accept the floating point constant 1 in the appropriate mode.
|
||||
--- a/gcc/config/xtensa/xtensa.c
|
||||
+++ b/gcc/config/xtensa/xtensa.c
|
||||
@@ -464,6 +464,9 @@
|
||||
{
|
||||
int dst_regnum = xt_true_regnum (operands[0]);
|
||||
|
||||
+ if (xtensa_tls_referenced_p (operands[1]))
|
||||
+ return FALSE;
|
||||
+
|
||||
/* The stack pointer can only be assigned with a MOVSP opcode. */
|
||||
if (dst_regnum == STACK_POINTER_REGNUM)
|
||||
return (mode == SImode
|
||||
@@ -1031,7 +1034,7 @@
|
||||
return 1;
|
||||
}
|
||||
|
||||
- if (! TARGET_CONST16)
|
||||
+ if (! TARGET_AUTO_LITPOOLS && ! TARGET_CONST16)
|
||||
{
|
||||
src = force_const_mem (SImode, src);
|
||||
operands[1] = src;
|
||||
@@ -2415,6 +2418,20 @@
|
||||
}
|
||||
break;
|
||||
|
||||
+ case 'y':
|
||||
+ if (GET_CODE (x) == CONST_DOUBLE &&
|
||||
+ GET_MODE (x) == SFmode)
|
||||
+ {
|
||||
+ REAL_VALUE_TYPE r;
|
||||
+ long l;
|
||||
+ REAL_VALUE_FROM_CONST_DOUBLE (r, x);
|
||||
+ REAL_VALUE_TO_TARGET_SINGLE (r, l);
|
||||
+ fprintf (file, "0x%08lx", l);
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ /* fall through */
|
||||
+
|
||||
default:
|
||||
if (GET_CODE (x) == REG || GET_CODE (x) == SUBREG)
|
||||
fprintf (file, "%s", reg_names[xt_true_regnum (x)]);
|
||||
--- a/gcc/config/xtensa/xtensa.md
|
||||
+++ b/gcc/config/xtensa/xtensa.md
|
||||
@@ -799,8 +799,8 @@
|
||||
})
|
||||
|
||||
(define_insn "movsi_internal"
|
||||
- [(set (match_operand:SI 0 "nonimmed_operand" "=D,D,D,D,R,R,a,q,a,W,a,a,U,*a,*A")
|
||||
- (match_operand:SI 1 "move_operand" "M,D,d,R,D,d,r,r,I,i,T,U,r,*A,*r"))]
|
||||
+ [(set (match_operand:SI 0 "nonimmed_operand" "=D,D,D,D,R,R,a,q,a,a,W,a,a,U,*a,*A")
|
||||
+ (match_operand:SI 1 "move_operand" "M,D,d,R,D,d,r,r,I,Y,i,T,U,r,*A,*r"))]
|
||||
"xtensa_valid_move (SImode, operands)"
|
||||
"@
|
||||
movi.n\t%0, %x1
|
||||
@@ -812,15 +812,16 @@
|
||||
mov\t%0, %1
|
||||
movsp\t%0, %1
|
||||
movi\t%0, %x1
|
||||
+ movi\t%0, %1
|
||||
const16\t%0, %t1\;const16\t%0, %b1
|
||||
%v1l32r\t%0, %1
|
||||
%v1l32i\t%0, %1
|
||||
%v0s32i\t%1, %0
|
||||
rsr\t%0, ACCLO
|
||||
wsr\t%1, ACCLO"
|
||||
- [(set_attr "type" "move,move,move,load,store,store,move,move,move,move,load,load,store,rsr,wsr")
|
||||
+ [(set_attr "type" "move,move,move,load,store,store,move,move,move,move,move,load,load,store,rsr,wsr")
|
||||
(set_attr "mode" "SI")
|
||||
- (set_attr "length" "2,2,2,2,2,2,3,3,3,6,3,3,3,3,3")])
|
||||
+ (set_attr "length" "2,2,2,2,2,2,3,3,3,3,6,3,3,3,3,3")])
|
||||
|
||||
;; 16-bit Integer moves
|
||||
|
||||
@@ -834,21 +835,22 @@
|
||||
})
|
||||
|
||||
(define_insn "movhi_internal"
|
||||
- [(set (match_operand:HI 0 "nonimmed_operand" "=D,D,a,a,a,U,*a,*A")
|
||||
- (match_operand:HI 1 "move_operand" "M,d,r,I,U,r,*A,*r"))]
|
||||
+ [(set (match_operand:HI 0 "nonimmed_operand" "=D,D,a,a,a,a,U,*a,*A")
|
||||
+ (match_operand:HI 1 "move_operand" "M,d,r,I,Y,U,r,*A,*r"))]
|
||||
"xtensa_valid_move (HImode, operands)"
|
||||
"@
|
||||
movi.n\t%0, %x1
|
||||
mov.n\t%0, %1
|
||||
mov\t%0, %1
|
||||
movi\t%0, %x1
|
||||
+ movi\t%0, %1
|
||||
%v1l16ui\t%0, %1
|
||||
%v0s16i\t%1, %0
|
||||
rsr\t%0, ACCLO
|
||||
wsr\t%1, ACCLO"
|
||||
- [(set_attr "type" "move,move,move,move,load,store,rsr,wsr")
|
||||
+ [(set_attr "type" "move,move,move,move,move,load,store,rsr,wsr")
|
||||
(set_attr "mode" "HI")
|
||||
- (set_attr "length" "2,2,3,3,3,3,3,3")])
|
||||
+ (set_attr "length" "2,2,3,3,3,3,3,3,3")])
|
||||
|
||||
;; 8-bit Integer moves
|
||||
|
||||
@@ -919,7 +921,7 @@
|
||||
(match_operand:SF 1 "general_operand" ""))]
|
||||
""
|
||||
{
|
||||
- if (!TARGET_CONST16 && CONSTANT_P (operands[1]))
|
||||
+ if (!TARGET_CONST16 && !TARGET_AUTO_LITPOOLS && CONSTANT_P (operands[1]))
|
||||
operands[1] = force_const_mem (SFmode, operands[1]);
|
||||
|
||||
if ((!register_operand (operands[0], SFmode)
|
||||
@@ -934,8 +936,8 @@
|
||||
})
|
||||
|
||||
(define_insn "movsf_internal"
|
||||
- [(set (match_operand:SF 0 "nonimmed_operand" "=f,f,U,D,D,R,a,f,a,W,a,a,U")
|
||||
- (match_operand:SF 1 "move_operand" "f,U,f,d,R,d,r,r,f,iF,T,U,r"))]
|
||||
+ [(set (match_operand:SF 0 "nonimmed_operand" "=f,f,U,D,D,R,a,f,a,a,W,a,a,U")
|
||||
+ (match_operand:SF 1 "move_operand" "f,U,f,d,R,d,r,r,f,Y,iF,T,U,r"))]
|
||||
"((register_operand (operands[0], SFmode)
|
||||
|| register_operand (operands[1], SFmode))
|
||||
&& !(FP_REG_P (xt_true_regnum (operands[0]))
|
||||
@@ -950,13 +952,14 @@
|
||||
mov\t%0, %1
|
||||
wfr\t%0, %1
|
||||
rfr\t%0, %1
|
||||
+ movi\t%0, %y1
|
||||
const16\t%0, %t1\;const16\t%0, %b1
|
||||
%v1l32r\t%0, %1
|
||||
%v1l32i\t%0, %1
|
||||
%v0s32i\t%1, %0"
|
||||
- [(set_attr "type" "farith,fload,fstore,move,load,store,move,farith,farith,move,load,load,store")
|
||||
+ [(set_attr "type" "farith,fload,fstore,move,load,store,move,farith,farith,move,move,load,load,store")
|
||||
(set_attr "mode" "SF")
|
||||
- (set_attr "length" "3,3,3,2,2,2,3,3,3,6,3,3,3")])
|
||||
+ (set_attr "length" "3,3,3,2,2,2,3,3,3,3,6,3,3,3")])
|
||||
|
||||
(define_insn "*lsiu"
|
||||
[(set (match_operand:SF 0 "register_operand" "=f")
|
||||
@@ -997,7 +1000,7 @@
|
||||
(match_operand:DF 1 "general_operand" ""))]
|
||||
""
|
||||
{
|
||||
- if (CONSTANT_P (operands[1]) && !TARGET_CONST16)
|
||||
+ if (CONSTANT_P (operands[1]) && !TARGET_CONST16 && !TARGET_AUTO_LITPOOLS)
|
||||
operands[1] = force_const_mem (DFmode, operands[1]);
|
||||
|
||||
if (!register_operand (operands[0], DFmode)
|
||||
@@ -1008,8 +1011,8 @@
|
||||
})
|
||||
|
||||
(define_insn_and_split "movdf_internal"
|
||||
- [(set (match_operand:DF 0 "nonimmed_operand" "=a,W,a,a,U")
|
||||
- (match_operand:DF 1 "move_operand" "r,iF,T,U,r"))]
|
||||
+ [(set (match_operand:DF 0 "nonimmed_operand" "=a,a,W,a,a,U")
|
||||
+ (match_operand:DF 1 "move_operand" "r,Y,iF,T,U,r"))]
|
||||
"register_operand (operands[0], DFmode)
|
||||
|| register_operand (operands[1], DFmode)"
|
||||
"#"
|
||||
--- a/gcc/config/xtensa/xtensa.opt
|
||||
+++ b/gcc/config/xtensa/xtensa.opt
|
||||
@@ -38,6 +38,10 @@
|
||||
Target
|
||||
Intersperse literal pools with code in the text section
|
||||
|
||||
+mauto-litpools
|
||||
+Target Report Mask(AUTO_LITPOOLS)
|
||||
+Relax literals in assembler and place them automatically in the text section
|
||||
+
|
||||
mserialize-volatile
|
||||
Target Report Mask(SERIALIZE_VOLATILE)
|
||||
-mno-serialize-volatile Do not serialize volatile memory references with MEMW instructions
|
@ -1,71 +0,0 @@
|
||||
From 05154174b369505238b759cf80d595d8cfc8c731 Mon Sep 17 00:00:00 2001
|
||||
From: Max Filippov <jcmvbkbc@gmail.com>
|
||||
Date: Mon, 10 Aug 2015 21:35:20 +0300
|
||||
Subject: [PATCH 1/3] xtensa: reimplement register spilling
|
||||
|
||||
Spilling windowed registers in userspace is much easier, more portable,
|
||||
less error-prone and equally effective as in kernel. Now that register
|
||||
spilling syscall is considered obsolete in the xtensa linux kernel
|
||||
replace it with CALL12 followed by series of ENTRY in libgcc.
|
||||
|
||||
2015-08-18 Max Filippov <jcmvbkbc@gmail.com>
|
||||
libgcc/
|
||||
* config/xtensa/lib2funcs.S (__xtensa_libgcc_window_spill): Use
|
||||
CALL12 followed by series of ENTRY to spill windowed registers.
|
||||
(__xtensa_nonlocal_goto): Call __xtensa_libgcc_window_spill
|
||||
instead of making linux spill syscall.
|
||||
|
||||
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
|
||||
---
|
||||
Backported from: r226962
|
||||
|
||||
libgcc/config/xtensa/lib2funcs.S | 30 +++++++++++++++++++++++-------
|
||||
1 file changed, 23 insertions(+), 7 deletions(-)
|
||||
|
||||
--- a/libgcc/config/xtensa/lib2funcs.S
|
||||
+++ b/libgcc/config/xtensa/lib2funcs.S
|
||||
@@ -33,10 +33,29 @@
|
||||
.global __xtensa_libgcc_window_spill
|
||||
.type __xtensa_libgcc_window_spill,@function
|
||||
__xtensa_libgcc_window_spill:
|
||||
- entry sp, 32
|
||||
- movi a2, 0
|
||||
- syscall
|
||||
+ entry sp, 48
|
||||
+#if XCHAL_NUM_AREGS > 16
|
||||
+ call12 1f
|
||||
+ retw
|
||||
+ .align 4
|
||||
+1:
|
||||
+ .rept (XCHAL_NUM_AREGS - 24) / 12
|
||||
+ _entry sp, 48
|
||||
+ mov a12, a0
|
||||
+ .endr
|
||||
+ _entry sp, 16
|
||||
+#if XCHAL_NUM_AREGS % 12 == 0
|
||||
+ mov a4, a4
|
||||
+#elif XCHAL_NUM_AREGS % 12 == 4
|
||||
+ mov a8, a8
|
||||
+#elif XCHAL_NUM_AREGS % 12 == 8
|
||||
+ mov a12, a12
|
||||
+#endif
|
||||
+ retw
|
||||
+#else
|
||||
+ mov a8, a8
|
||||
retw
|
||||
+#endif
|
||||
.size __xtensa_libgcc_window_spill, .-__xtensa_libgcc_window_spill
|
||||
|
||||
|
||||
@@ -58,10 +77,7 @@
|
||||
entry sp, 32
|
||||
|
||||
/* Flush registers. */
|
||||
- mov a5, a2
|
||||
- movi a2, 0
|
||||
- syscall
|
||||
- mov a2, a5
|
||||
+ call8 __xtensa_libgcc_window_spill
|
||||
|
||||
/* Because the save area for a0-a3 is stored one frame below
|
||||
the one identified by a2, the only way to restore those
|
@ -1,28 +0,0 @@
|
||||
From f66206679a0ad604f13673559f230160cd3d1189 Mon Sep 17 00:00:00 2001
|
||||
From: Max Filippov <jcmvbkbc@gmail.com>
|
||||
Date: Fri, 14 Aug 2015 02:45:02 +0300
|
||||
Subject: [PATCH 2/3] xtensa: use unwind-dw2-fde-dip instead of unwind-dw2-fde
|
||||
|
||||
This allows having exception cleanup code in binaries that don't
|
||||
register their unwind tables.
|
||||
|
||||
2015-08-18 Max Filippov <jcmvbkbc@gmail.com>
|
||||
libgcc/
|
||||
* config/xtensa/t-xtensa (LIB2ADDEH): Replace unwind-dw2-fde
|
||||
with unwind-dw2-fde-dip.
|
||||
|
||||
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
|
||||
---
|
||||
Backported from: r226963
|
||||
|
||||
libgcc/config/xtensa/t-xtensa | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/libgcc/config/xtensa/t-xtensa
|
||||
+++ b/libgcc/config/xtensa/t-xtensa
|
||||
@@ -13,4 +13,4 @@
|
||||
LIB2ADD = $(srcdir)/config/xtensa/lib2funcs.S
|
||||
|
||||
LIB2ADDEH = $(srcdir)/config/xtensa/unwind-dw2-xtensa.c \
|
||||
- $(srcdir)/unwind-dw2-fde.c $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c
|
||||
+ $(srcdir)/unwind-dw2-fde-dip.c $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c
|
@ -1,35 +0,0 @@
|
||||
From 15c7c4d39b317f0d902ef28fd43eca5c3369f891 Mon Sep 17 00:00:00 2001
|
||||
From: Max Filippov <jcmvbkbc@gmail.com>
|
||||
Date: Sat, 15 Aug 2015 05:12:11 +0300
|
||||
Subject: [PATCH 3/3] xtensa: fix _Unwind_GetCFA
|
||||
|
||||
Returning context->cfa in _Unwind_GetCFA makes CFA point one stack frame
|
||||
higher than what was actually used by code at context->ra. This results
|
||||
in invalid CFA value in signal frames and premature unwinding completion
|
||||
in forced unwinding used by uClibc NPTL thread cancellation.
|
||||
Returning context->sp from _Unwind_GetCFA makes all CFA values valid and
|
||||
matching code that used them.
|
||||
|
||||
2015-08-18 Max Filippov <jcmvbkbc@gmail.com>
|
||||
libgcc/
|
||||
* config/xtensa/unwind-dw2-xtensa.c (_Unwind_GetCFA): Return
|
||||
context->sp instead of context->cfa.
|
||||
|
||||
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
|
||||
---
|
||||
Backported from: r226964
|
||||
|
||||
libgcc/config/xtensa/unwind-dw2-xtensa.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/libgcc/config/xtensa/unwind-dw2-xtensa.c
|
||||
+++ b/libgcc/config/xtensa/unwind-dw2-xtensa.c
|
||||
@@ -130,7 +130,7 @@
|
||||
_Unwind_Word
|
||||
_Unwind_GetCFA (struct _Unwind_Context *context)
|
||||
{
|
||||
- return (_Unwind_Ptr) context->cfa;
|
||||
+ return (_Unwind_Ptr) context->sp;
|
||||
}
|
||||
|
||||
/* Overwrite the saved value for register INDEX in CONTEXT with VAL. */
|
@ -1,68 +0,0 @@
|
||||
From 0343a584d6b5128908eabf1db43c70bed7114989 Mon Sep 17 00:00:00 2001
|
||||
From: Max Filippov <jcmvbkbc@gmail.com>
|
||||
Date: Sun, 28 May 2017 19:56:56 -0700
|
||||
Subject: [PATCH] gcc: xtensa: fix fprintf format specifiers
|
||||
|
||||
HOST_WIDE_INT may not be long as assumed in print_operand and
|
||||
xtensa_emit_call. Use HOST_WIDE_INT_PRINT_DEC/HOST_WIDE_INT_PRINT_HEX
|
||||
format strings instead of %ld/0x%lx. This fixes incorrect assembly code
|
||||
generation by the compiler running on armhf host.
|
||||
|
||||
2017-05-28 Max Filippov <jcmvbkbc@gmail.com>
|
||||
gcc/
|
||||
* config/xtensa/xtensa.c (xtensa_emit_call): Use
|
||||
HOST_WIDE_INT_PRINT_HEX instead of 0x%lx format string.
|
||||
(print_operand): Use HOST_WIDE_INT_PRINT_DEC instead of %ld
|
||||
format string.
|
||||
|
||||
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
|
||||
---
|
||||
gcc/config/xtensa/xtensa.c | 10 +++++-----
|
||||
1 file changed, 5 insertions(+), 5 deletions(-)
|
||||
|
||||
--- a/gcc/config/xtensa/xtensa.c
|
||||
+++ b/gcc/config/xtensa/xtensa.c
|
||||
@@ -1773,7 +1773,7 @@
|
||||
rtx tgt = operands[callop];
|
||||
|
||||
if (GET_CODE (tgt) == CONST_INT)
|
||||
- sprintf (result, "call8\t0x%lx", INTVAL (tgt));
|
||||
+ sprintf (result, "call8\t" HOST_WIDE_INT_PRINT_HEX, INTVAL (tgt));
|
||||
else if (register_operand (tgt, VOIDmode))
|
||||
sprintf (result, "callx8\t%%%d", callop);
|
||||
else
|
||||
@@ -2348,14 +2348,14 @@
|
||||
|
||||
case 'L':
|
||||
if (GET_CODE (x) == CONST_INT)
|
||||
- fprintf (file, "%ld", (32 - INTVAL (x)) & 0x1f);
|
||||
+ fprintf (file, HOST_WIDE_INT_PRINT_DEC, (32 - INTVAL (x)) & 0x1f);
|
||||
else
|
||||
output_operand_lossage ("invalid %%L value");
|
||||
break;
|
||||
|
||||
case 'R':
|
||||
if (GET_CODE (x) == CONST_INT)
|
||||
- fprintf (file, "%ld", INTVAL (x) & 0x1f);
|
||||
+ fprintf (file, HOST_WIDE_INT_PRINT_DEC, INTVAL (x) & 0x1f);
|
||||
else
|
||||
output_operand_lossage ("invalid %%R value");
|
||||
break;
|
||||
@@ -2369,7 +2369,7 @@
|
||||
|
||||
case 'd':
|
||||
if (GET_CODE (x) == CONST_INT)
|
||||
- fprintf (file, "%ld", INTVAL (x));
|
||||
+ fprintf (file, HOST_WIDE_INT_PRINT_DEC, INTVAL (x));
|
||||
else
|
||||
output_operand_lossage ("invalid %%d value");
|
||||
break;
|
||||
@@ -2438,7 +2438,7 @@
|
||||
else if (GET_CODE (x) == MEM)
|
||||
output_address (XEXP (x, 0));
|
||||
else if (GET_CODE (x) == CONST_INT)
|
||||
- fprintf (file, "%ld", INTVAL (x));
|
||||
+ fprintf (file, HOST_WIDE_INT_PRINT_DEC, INTVAL (x));
|
||||
else
|
||||
output_addr_const (file, x);
|
||||
}
|
@ -1,26 +0,0 @@
|
||||
From 91f3a82de1e43362a0ab2cb2e1fd6b89c5a00525 Mon Sep 17 00:00:00 2001
|
||||
From: jcmvbkbc <jcmvbkbc@138bc75d-0d04-0410-961f-82ee72b054a4>
|
||||
Date: Mon, 11 Sep 2017 21:53:38 +0000
|
||||
Subject: [PATCH] xtensa: fix PR target/82181
|
||||
|
||||
2017-09-11 Max Filippov <jcmvbkbc@gmail.com>
|
||||
gcc/
|
||||
Backport from mainline
|
||||
* config/xtensa/xtensa.c (xtensa_mem_offset): Check that both
|
||||
words of DImode object are reachable by xtensa_uimm8x4 access.
|
||||
|
||||
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
|
||||
---
|
||||
gcc/config/xtensa/xtensa.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
--- a/gcc/config/xtensa/xtensa.c
|
||||
+++ b/gcc/config/xtensa/xtensa.c
|
||||
@@ -599,6 +599,7 @@
|
||||
case HImode:
|
||||
return xtensa_uimm8x2 (v);
|
||||
|
||||
+ case DImode:
|
||||
case DFmode:
|
||||
return (xtensa_uimm8x4 (v) && xtensa_uimm8x4 (v + 4));
|
||||
|
628
packages/gcc/4.8.5/0025-musl-support.patch
vendored
628
packages/gcc/4.8.5/0025-musl-support.patch
vendored
@ -1,628 +0,0 @@
|
||||
Add musl support to gcc
|
||||
|
||||
This patch comes from the musl-cross project at
|
||||
https://bitbucket.org/GregorR/musl-cross/src. Compared to the upstream version:
|
||||
|
||||
* the config.sub modifications have been removed, because Buildroot
|
||||
already overwrites all config.sub with a more recent config.sub
|
||||
that has musl support.
|
||||
|
||||
* change to ensure that a dummy dynamic linker path
|
||||
MUSL_DYNAMIC_LINKER<foo> is defined for all architectures,
|
||||
otherwise building gcc for architectures not supported by musl was
|
||||
causing build failure. Bug reported upstream at
|
||||
https://bitbucket.org/GregorR/musl-gcc-patches/issue/4/musl-gcc-patches-break-the-build-on.
|
||||
|
||||
* change the USE_PT_GNU_EH_FRAME logic to keep the existing gcc logic
|
||||
and only add the musl one as an addition, not as a replacement. Not
|
||||
doing this breaks C++ exception handling with glibc, because
|
||||
USE_PT_GNU_EH_FRAME doesn't get defined due to the configure script
|
||||
not testing dl_iterate_phdr() on any system except Solaris.
|
||||
|
||||
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
||||
[Gustavo: Update for gcc 4.8.3]
|
||||
|
||||
---
|
||||
fixincludes/mkfixinc.sh | 3 -
|
||||
gcc/config.gcc | 9 ++-
|
||||
gcc/config/aarch64/aarch64-linux.h | 5 +
|
||||
gcc/config/arm/linux-eabi.h | 17 +++++
|
||||
gcc/config/i386/linux.h | 2
|
||||
gcc/config/i386/linux64.h | 7 ++
|
||||
gcc/config/linux.h | 111 ++++++++++++++++++++++++++++++++-----
|
||||
gcc/config/linux.opt | 4 +
|
||||
gcc/config/microblaze/linux.h | 18 +++++-
|
||||
gcc/config/mips/linux.h | 8 ++
|
||||
gcc/config/mips/linux64.h | 2
|
||||
gcc/config/rs6000/linux64.h | 14 +++-
|
||||
gcc/config/rs6000/secureplt.h | 1
|
||||
gcc/config/rs6000/sysv4.h | 16 ++++-
|
||||
gcc/config/sh/linux.h | 8 ++
|
||||
gcc/configure | 3 +
|
||||
gcc/configure.ac | 3 +
|
||||
gcc/ginclude/stddef.h | 3 +
|
||||
libgcc/unwind-dw2-fde-dip.c | 7 ++
|
||||
libgomp/config/posix/time.c | 2
|
||||
libitm/config/arm/hwcap.cc | 4 +
|
||||
libitm/config/linux/x86/tls.h | 8 ++
|
||||
libstdc++-v3/configure.host | 10 +++
|
||||
23 files changed, 238 insertions(+), 27 deletions(-)
|
||||
|
||||
--- a/fixincludes/mkfixinc.sh
|
||||
+++ b/fixincludes/mkfixinc.sh
|
||||
@@ -19,7 +19,8 @@
|
||||
powerpc-*-eabi* | \
|
||||
powerpc-*-rtems* | \
|
||||
powerpcle-*-eabisim* | \
|
||||
- powerpcle-*-eabi* )
|
||||
+ powerpcle-*-eabi* | \
|
||||
+ *-musl* )
|
||||
# IF there is no include fixing,
|
||||
# THEN create a no-op fixer and exit
|
||||
(echo "#! /bin/sh" ; echo "exit 0" ) > ${target}
|
||||
--- a/gcc/config/aarch64/aarch64-linux.h
|
||||
+++ b/gcc/config/aarch64/aarch64-linux.h
|
||||
@@ -21,7 +21,12 @@
|
||||
#ifndef GCC_AARCH64_LINUX_H
|
||||
#define GCC_AARCH64_LINUX_H
|
||||
|
||||
+/* The AArch64 port currently supports two dynamic linkers:
|
||||
+ - ld-linux-aarch64.so.1 - GLIBC dynamic linker
|
||||
+ - ld-musl-aarch64.so.1 - musl libc dynamic linker */
|
||||
#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-aarch64.so.1"
|
||||
+#undef MUSL_DYNAMIC_LINKER
|
||||
+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-aarch64.so.1"
|
||||
|
||||
#define CPP_SPEC "%{pthread:-D_REENTRANT}"
|
||||
|
||||
--- a/gcc/config/arm/linux-eabi.h
|
||||
+++ b/gcc/config/arm/linux-eabi.h
|
||||
@@ -77,6 +77,23 @@
|
||||
%{mfloat-abi=soft*:" GLIBC_DYNAMIC_LINKER_SOFT_FLOAT "} \
|
||||
%{!mfloat-abi=*:" GLIBC_DYNAMIC_LINKER_DEFAULT "}"
|
||||
|
||||
+/* For ARM musl currently supports four dynamic linkers:
|
||||
+ - ld-musl-arm.so.1 - for the EABI-derived soft-float ABI
|
||||
+ - ld-musl-armhf.so.1 - for the EABI-derived hard-float ABI
|
||||
+ - ld-musl-armeb.so.1 - for the EABI-derived soft-float ABI, EB
|
||||
+ - ld-musl-armebhf.so.1 - for the EABI-derived hard-float ABI, EB
|
||||
+ musl does not support the legacy OABI mode.
|
||||
+ All the dynamic linkers live in /lib.
|
||||
+ We default to soft-float, EL. */
|
||||
+#undef MUSL_DYNAMIC_LINKER
|
||||
+#if TARGET_BIG_ENDIAN_DEFAULT
|
||||
+#define MUSL_DYNAMIC_LINKER_E "%{mlittle-endian:;:eb}"
|
||||
+#else
|
||||
+#define MUSL_DYNAMIC_LINKER_E "%{mbig-endian:eb}"
|
||||
+#endif
|
||||
+#define MUSL_DYNAMIC_LINKER \
|
||||
+ "/lib/ld-musl-arm" MUSL_DYNAMIC_LINKER_E "%{mfloat-abi=hard:hf}.so.1"
|
||||
+
|
||||
/* At this point, bpabi.h will have clobbered LINK_SPEC. We want to
|
||||
use the GNU/Linux version, not the generic BPABI version. */
|
||||
#undef LINK_SPEC
|
||||
--- a/gcc/config/i386/linux64.h
|
||||
+++ b/gcc/config/i386/linux64.h
|
||||
@@ -30,3 +30,10 @@
|
||||
#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2"
|
||||
#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2"
|
||||
#define GLIBC_DYNAMIC_LINKERX32 "/libx32/ld-linux-x32.so.2"
|
||||
+
|
||||
+#undef MUSL_DYNAMIC_LINKER32
|
||||
+#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-i386.so.1"
|
||||
+#undef MUSL_DYNAMIC_LINKER64
|
||||
+#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-x86_64.so.1"
|
||||
+#undef MUSL_DYNAMIC_LINKERX32
|
||||
+#define MUSL_DYNAMIC_LINKERX32 "/lib/ld-musl-x32.so.1"
|
||||
--- a/gcc/config/i386/linux.h
|
||||
+++ b/gcc/config/i386/linux.h
|
||||
@@ -21,3 +21,5 @@
|
||||
|
||||
#define GNU_USER_LINK_EMULATION "elf_i386"
|
||||
#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
|
||||
+#undef MUSL_DYNAMIC_LINKER
|
||||
+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-i386.so.1"
|
||||
--- a/gcc/config/linux.h
|
||||
+++ b/gcc/config/linux.h
|
||||
@@ -32,10 +32,12 @@
|
||||
#define OPTION_GLIBC (DEFAULT_LIBC == LIBC_GLIBC)
|
||||
#define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC)
|
||||
#define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC)
|
||||
+#define OPTION_MUSL (DEFAULT_LIBC == LIBC_MUSL)
|
||||
#else
|
||||
#define OPTION_GLIBC (linux_libc == LIBC_GLIBC)
|
||||
#define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC)
|
||||
#define OPTION_BIONIC (linux_libc == LIBC_BIONIC)
|
||||
+#define OPTION_MUSL (linux_libc == LIBC_MUSL)
|
||||
#endif
|
||||
|
||||
#define GNU_USER_TARGET_OS_CPP_BUILTINS() \
|
||||
@@ -53,18 +55,21 @@
|
||||
uClibc or Bionic is the default C library and whether
|
||||
-muclibc or -mglibc or -mbionic has been passed to change the default. */
|
||||
|
||||
-#define CHOOSE_DYNAMIC_LINKER1(LIBC1, LIBC2, LIBC3, LD1, LD2, LD3) \
|
||||
- "%{" LIBC2 ":" LD2 ";:%{" LIBC3 ":" LD3 ";:" LD1 "}}"
|
||||
+#define CHOOSE_DYNAMIC_LINKER1(LIBC1, LIBC2, LIBC3, LIBC4, LD1, LD2, LD3, LD4) \
|
||||
+ "%{" LIBC2 ":" LD2 ";:%{" LIBC3 ":" LD3 ";:%{" LIBC4 ":" LD4 ";:" LD1 "}}}"
|
||||
|
||||
#if DEFAULT_LIBC == LIBC_GLIBC
|
||||
-#define CHOOSE_DYNAMIC_LINKER(G, U, B) \
|
||||
- CHOOSE_DYNAMIC_LINKER1 ("mglibc", "muclibc", "mbionic", G, U, B)
|
||||
+#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \
|
||||
+ CHOOSE_DYNAMIC_LINKER1 ("mglibc", "muclibc", "mbionic", "mmusl", G, U, B, M)
|
||||
#elif DEFAULT_LIBC == LIBC_UCLIBC
|
||||
-#define CHOOSE_DYNAMIC_LINKER(G, U, B) \
|
||||
- CHOOSE_DYNAMIC_LINKER1 ("muclibc", "mglibc", "mbionic", U, G, B)
|
||||
+#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \
|
||||
+ CHOOSE_DYNAMIC_LINKER1 ("muclibc", "mglibc", "mbionic", "mmusl", U, G, B, M)
|
||||
#elif DEFAULT_LIBC == LIBC_BIONIC
|
||||
-#define CHOOSE_DYNAMIC_LINKER(G, U, B) \
|
||||
- CHOOSE_DYNAMIC_LINKER1 ("mbionic", "mglibc", "muclibc", B, G, U)
|
||||
+#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \
|
||||
+ CHOOSE_DYNAMIC_LINKER1 ("mbionic", "mglibc", "muclibc", "mmusl", B, G, U, M)
|
||||
+#elif DEFAULT_LIBC == LIBC_MUSL
|
||||
+#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \
|
||||
+ CHOOSE_DYNAMIC_LINKER1 ("mmusl", "mglibc", "muclibc", "mbionic", M, G, U, B)
|
||||
#else
|
||||
#error "Unsupported DEFAULT_LIBC"
|
||||
#endif /* DEFAULT_LIBC */
|
||||
@@ -82,23 +87,32 @@
|
||||
#define BIONIC_DYNAMIC_LINKER64 "/system/bin/linker64"
|
||||
#define BIONIC_DYNAMIC_LINKERX32 "/system/bin/linkerx32"
|
||||
|
||||
+/* Musl dynamic linker paths must be defined on a per-architecture
|
||||
+ basis, for each architecture supported by Musl. However, in order
|
||||
+ to let other architectures continue to build with other C
|
||||
+ libraries, we provide a dummy definition of the following defines. */
|
||||
+#define MUSL_DYNAMIC_LINKER "invalid"
|
||||
+#define MUSL_DYNAMIC_LINKER32 "invalid"
|
||||
+#define MUSL_DYNAMIC_LINKER64 "invalid"
|
||||
+#define MUSL_DYNAMIC_LINKERX32 "invalid"
|
||||
+
|
||||
#define GNU_USER_DYNAMIC_LINKER \
|
||||
CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER, \
|
||||
- BIONIC_DYNAMIC_LINKER)
|
||||
+ BIONIC_DYNAMIC_LINKER, MUSL_DYNAMIC_LINKER)
|
||||
#define GNU_USER_DYNAMIC_LINKER32 \
|
||||
CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32, \
|
||||
- BIONIC_DYNAMIC_LINKER32)
|
||||
+ BIONIC_DYNAMIC_LINKER32, MUSL_DYNAMIC_LINKER32)
|
||||
#define GNU_USER_DYNAMIC_LINKER64 \
|
||||
CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64, \
|
||||
- BIONIC_DYNAMIC_LINKER64)
|
||||
+ BIONIC_DYNAMIC_LINKER64, MUSL_DYNAMIC_LINKER64)
|
||||
#define GNU_USER_DYNAMIC_LINKERX32 \
|
||||
CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERX32, UCLIBC_DYNAMIC_LINKERX32, \
|
||||
- BIONIC_DYNAMIC_LINKERX32)
|
||||
+ BIONIC_DYNAMIC_LINKERX32, MUSL_DYNAMIC_LINKERX32)
|
||||
|
||||
/* Determine whether the entire c99 runtime
|
||||
is present in the runtime library. */
|
||||
#undef TARGET_C99_FUNCTIONS
|
||||
-#define TARGET_C99_FUNCTIONS (OPTION_GLIBC)
|
||||
+#define TARGET_C99_FUNCTIONS (OPTION_GLIBC || OPTION_MUSL)
|
||||
|
||||
/* Whether we have sincos that follows the GNU extension. */
|
||||
#undef TARGET_HAS_SINCOS
|
||||
@@ -107,3 +121,74 @@
|
||||
/* Whether we have Bionic libc runtime */
|
||||
#undef TARGET_HAS_BIONIC
|
||||
#define TARGET_HAS_BIONIC (OPTION_BIONIC)
|
||||
+
|
||||
+/* musl avoids problematic includes by rearranging the include directories.
|
||||
+ * Unfortunately, this is mostly duplicated from cppdefault.c */
|
||||
+#if DEFAULT_LIBC == LIBC_MUSL
|
||||
+#define INCLUDE_DEFAULTS_MUSL_GPP \
|
||||
+ { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1, \
|
||||
+ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 }, \
|
||||
+ { GPLUSPLUS_TOOL_INCLUDE_DIR, "G++", 1, 1, \
|
||||
+ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 1 }, \
|
||||
+ { GPLUSPLUS_BACKWARD_INCLUDE_DIR, "G++", 1, 1, \
|
||||
+ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 },
|
||||
+
|
||||
+#ifdef LOCAL_INCLUDE_DIR
|
||||
+#define INCLUDE_DEFAULTS_MUSL_LOCAL \
|
||||
+ { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 2 }, \
|
||||
+ { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 0 },
|
||||
+#else
|
||||
+#define INCLUDE_DEFAULTS_MUSL_LOCAL
|
||||
+#endif
|
||||
+
|
||||
+#ifdef PREFIX_INCLUDE_DIR
|
||||
+#define INCLUDE_DEFAULTS_MUSL_PREFIX \
|
||||
+ { PREFIX_INCLUDE_DIR, 0, 0, 1, 0, 0},
|
||||
+#else
|
||||
+#define INCLUDE_DEFAULTS_MUSL_PREFIX
|
||||
+#endif
|
||||
+
|
||||
+#ifdef CROSS_INCLUDE_DIR
|
||||
+#define INCLUDE_DEFAULTS_MUSL_CROSS \
|
||||
+ { CROSS_INCLUDE_DIR, "GCC", 0, 0, 0, 0},
|
||||
+#else
|
||||
+#define INCLUDE_DEFAULTS_MUSL_CROSS
|
||||
+#endif
|
||||
+
|
||||
+#ifdef TOOL_INCLUDE_DIR
|
||||
+#define INCLUDE_DEFAULTS_MUSL_TOOL \
|
||||
+ { TOOL_INCLUDE_DIR, "BINUTILS", 0, 1, 0, 0},
|
||||
+#else
|
||||
+#define INCLUDE_DEFAULTS_MUSL_TOOL
|
||||
+#endif
|
||||
+
|
||||
+#ifdef NATIVE_SYSTEM_HEADER_DIR
|
||||
+#define INCLUDE_DEFAULTS_MUSL_NATIVE \
|
||||
+ { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 2 }, \
|
||||
+ { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 0 },
|
||||
+#else
|
||||
+#define INCLUDE_DEFAULTS_MUSL_NATIVE
|
||||
+#endif
|
||||
+
|
||||
+#if defined (CROSS_DIRECTORY_STRUCTURE) && !defined (TARGET_SYSTEM_ROOT)
|
||||
+# undef INCLUDE_DEFAULTS_MUSL_LOCAL
|
||||
+# define INCLUDE_DEFAULTS_MUSL_LOCAL
|
||||
+# undef INCLUDE_DEFAULTS_MUSL_NATIVE
|
||||
+# define INCLUDE_DEFAULTS_MUSL_NATIVE
|
||||
+#else
|
||||
+# undef INCLUDE_DEFAULTS_MUSL_CROSS
|
||||
+# define INCLUDE_DEFAULTS_MUSL_CROSS
|
||||
+#endif
|
||||
+
|
||||
+#undef INCLUDE_DEFAULTS
|
||||
+#define INCLUDE_DEFAULTS \
|
||||
+ { \
|
||||
+ INCLUDE_DEFAULTS_MUSL_GPP \
|
||||
+ INCLUDE_DEFAULTS_MUSL_PREFIX \
|
||||
+ INCLUDE_DEFAULTS_MUSL_CROSS \
|
||||
+ INCLUDE_DEFAULTS_MUSL_TOOL \
|
||||
+ INCLUDE_DEFAULTS_MUSL_NATIVE \
|
||||
+ { GCC_INCLUDE_DIR, "GCC", 0, 1, 0, 0 }, \
|
||||
+ { 0, 0, 0, 0, 0, 0 } \
|
||||
+ }
|
||||
+#endif
|
||||
--- a/gcc/config/linux.opt
|
||||
+++ b/gcc/config/linux.opt
|
||||
@@ -30,3 +30,7 @@
|
||||
muclibc
|
||||
Target Report RejectNegative Var(linux_libc,LIBC_UCLIBC) Negative(mbionic)
|
||||
Use uClibc C library
|
||||
+
|
||||
+mmusl
|
||||
+Target Report RejectNegative Var(linux_libc,LIBC_MUSL) Negative(mglibc)
|
||||
+Use musl C library
|
||||
--- a/gcc/config/microblaze/linux.h
|
||||
+++ b/gcc/config/microblaze/linux.h
|
||||
@@ -28,7 +28,23 @@
|
||||
#undef TLS_NEEDS_GOT
|
||||
#define TLS_NEEDS_GOT 1
|
||||
|
||||
-#define DYNAMIC_LINKER "/lib/ld.so.1"
|
||||
+#if TARGET_BIG_ENDIAN_DEFAULT == 0 /* LE */
|
||||
+#define MUSL_DYNAMIC_LINKER_E "%{EB:;:el}"
|
||||
+#else
|
||||
+#define MUSL_DYNAMIC_LINKER_E "%{EL:el}"
|
||||
+#endif
|
||||
+
|
||||
+#undef MUSL_DYNAMIC_LINKER
|
||||
+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-microblaze" MUSL_DYNAMIC_LINKER_E ".so.1"
|
||||
+#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
|
||||
+
|
||||
+#if DEFAULT_LIBC == LIBC_MUSL
|
||||
+#define DYNAMIC_LINKER MUSL_DYNAMIC_LINKER
|
||||
+#else
|
||||
+#define DYNAMIC_LINKER GLIBC_DYNAMIC_LINKER
|
||||
+#endif
|
||||
+
|
||||
+
|
||||
#undef SUBTARGET_EXTRA_SPECS
|
||||
#define SUBTARGET_EXTRA_SPECS \
|
||||
{ "dynamic_linker", DYNAMIC_LINKER }
|
||||
--- a/gcc/config/mips/linux64.h
|
||||
+++ b/gcc/config/mips/linux64.h
|
||||
@@ -29,4 +29,4 @@
|
||||
#define BIONIC_DYNAMIC_LINKERN32 "/system/bin/linker32"
|
||||
#define GNU_USER_DYNAMIC_LINKERN32 \
|
||||
CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERN32, UCLIBC_DYNAMIC_LINKERN32, \
|
||||
- BIONIC_DYNAMIC_LINKERN32)
|
||||
+ BIONIC_DYNAMIC_LINKERN32, MUSL_DYNAMIC_LINKER)
|
||||
--- a/gcc/config/mips/linux.h
|
||||
+++ b/gcc/config/mips/linux.h
|
||||
@@ -18,3 +18,11 @@
|
||||
<http://www.gnu.org/licenses/>. */
|
||||
|
||||
#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
|
||||
+
|
||||
+#if TARGET_ENDIAN_DEFAULT == 0 /* LE */
|
||||
+#define MUSL_DYNAMIC_LINKER_E "%{EB:;:el}"
|
||||
+#else
|
||||
+#define MUSL_DYNAMIC_LINKER_E "%{EL:el}"
|
||||
+#endif
|
||||
+#undef MUSL_DYNAMIC_LINKER
|
||||
+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-mips" MUSL_DYNAMIC_LINKER_E ".so.1"
|
||||
--- a/gcc/config/rs6000/linux64.h
|
||||
+++ b/gcc/config/rs6000/linux64.h
|
||||
@@ -370,17 +370,23 @@
|
||||
#endif
|
||||
#define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0"
|
||||
#define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0"
|
||||
+#undef MUSL_DYNAMIC_LINKER32
|
||||
+#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-powerpc.so.1"
|
||||
+#undef MUSL_DYNAMIC_LINKER64
|
||||
+#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-powerpc64.so.1"
|
||||
#if DEFAULT_LIBC == LIBC_UCLIBC
|
||||
-#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}"
|
||||
+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{mmusl:" M ";:" U "}}"
|
||||
#elif DEFAULT_LIBC == LIBC_GLIBC
|
||||
-#define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:" U ";:" G "}"
|
||||
+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{muclibc:" U ";:%{mmusl:" M ";:" G "}}"
|
||||
+#elif DEFAULT_LIBC == LIBC_MUSL
|
||||
+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{muclibc:" U ";:" M "}}"
|
||||
#else
|
||||
#error "Unsupported DEFAULT_LIBC"
|
||||
#endif
|
||||
#define GNU_USER_DYNAMIC_LINKER32 \
|
||||
- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32)
|
||||
+ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32, MUSL_DYNAMIC_LINKER32)
|
||||
#define GNU_USER_DYNAMIC_LINKER64 \
|
||||
- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64)
|
||||
+ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64, MUSL_DYNAMIC_LINKER64)
|
||||
|
||||
#undef DEFAULT_ASM_ENDIAN
|
||||
#if (TARGET_DEFAULT & MASK_LITTLE_ENDIAN)
|
||||
--- a/gcc/config/rs6000/secureplt.h
|
||||
+++ b/gcc/config/rs6000/secureplt.h
|
||||
@@ -18,3 +18,4 @@
|
||||
<http://www.gnu.org/licenses/>. */
|
||||
|
||||
#define CC1_SECURE_PLT_DEFAULT_SPEC "-msecure-plt"
|
||||
+#define LINK_SECURE_PLT_DEFAULT_SPEC "--secure-plt"
|
||||
--- a/gcc/config/rs6000/sysv4.h
|
||||
+++ b/gcc/config/rs6000/sysv4.h
|
||||
@@ -537,6 +537,9 @@
|
||||
#ifndef CC1_SECURE_PLT_DEFAULT_SPEC
|
||||
#define CC1_SECURE_PLT_DEFAULT_SPEC ""
|
||||
#endif
|
||||
+#ifndef LINK_SECURE_PLT_DEFAULT_SPEC
|
||||
+#define LINK_SECURE_PLT_DEFAULT_SPEC ""
|
||||
+#endif
|
||||
|
||||
/* Pass -G xxx to the compiler. */
|
||||
#define CC1_SPEC "%{G*} %(cc1_cpu)" \
|
||||
@@ -585,7 +588,8 @@
|
||||
|
||||
/* Override the default target of the linker. */
|
||||
#define LINK_TARGET_SPEC \
|
||||
- ENDIAN_SELECT("", " --oformat elf32-powerpcle", "")
|
||||
+ ENDIAN_SELECT("", " --oformat elf32-powerpcle", "") \
|
||||
+ "%{!mbss-plt: %{!msecure-plt: %(link_secure_plt_default)}}"
|
||||
|
||||
/* Any specific OS flags. */
|
||||
#define LINK_OS_SPEC "\
|
||||
@@ -763,15 +767,18 @@
|
||||
|
||||
#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
|
||||
#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
|
||||
+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-powerpc.so.1"
|
||||
#if DEFAULT_LIBC == LIBC_UCLIBC
|
||||
-#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}"
|
||||
+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{mmusl:" M ";:" U "}}"
|
||||
+#elif DEFAULT_LIBC == LIBC_MUSL
|
||||
+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{muclibc:" U ";:" M "}}"
|
||||
#elif !defined (DEFAULT_LIBC) || DEFAULT_LIBC == LIBC_GLIBC
|
||||
-#define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:" U ";:" G "}"
|
||||
+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{muclibc:" U ";:%{mmusl:" M ";:" G "}}"
|
||||
#else
|
||||
#error "Unsupported DEFAULT_LIBC"
|
||||
#endif
|
||||
#define GNU_USER_DYNAMIC_LINKER \
|
||||
- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER)
|
||||
+ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER, MUSL_DYNAMIC_LINKER)
|
||||
|
||||
#define LINK_OS_LINUX_SPEC "-m elf32ppclinux %{!shared: %{!static: \
|
||||
%{rdynamic:-export-dynamic} \
|
||||
@@ -894,6 +901,7 @@
|
||||
{ "link_os_openbsd", LINK_OS_OPENBSD_SPEC }, \
|
||||
{ "link_os_default", LINK_OS_DEFAULT_SPEC }, \
|
||||
{ "cc1_secure_plt_default", CC1_SECURE_PLT_DEFAULT_SPEC }, \
|
||||
+ { "link_secure_plt_default", LINK_SECURE_PLT_DEFAULT_SPEC }, \
|
||||
{ "cpp_os_ads", CPP_OS_ADS_SPEC }, \
|
||||
{ "cpp_os_yellowknife", CPP_OS_YELLOWKNIFE_SPEC }, \
|
||||
{ "cpp_os_mvme", CPP_OS_MVME_SPEC }, \
|
||||
--- a/gcc/config/sh/linux.h
|
||||
+++ b/gcc/config/sh/linux.h
|
||||
@@ -43,7 +43,15 @@
|
||||
|
||||
#define TARGET_ASM_FILE_END file_end_indicate_exec_stack
|
||||
|
||||
+#if TARGET_BIG_ENDIAN_DEFAULT /* BE */
|
||||
+#define MUSL_DYNAMIC_LINKER_E "eb"
|
||||
+#else
|
||||
+#define MUSL_DYNAMIC_LINKER_E
|
||||
+#endif
|
||||
+
|
||||
#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
|
||||
+#undef MUSL_DYNAMIC_LINKER
|
||||
+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-sh" MUSL_DYNAMIC_LINKER_E ".so.1"
|
||||
|
||||
#undef SUBTARGET_LINK_EMUL_SUFFIX
|
||||
#define SUBTARGET_LINK_EMUL_SUFFIX "_linux"
|
||||
--- a/gcc/config.gcc
|
||||
+++ b/gcc/config.gcc
|
||||
@@ -550,7 +550,7 @@
|
||||
esac
|
||||
|
||||
# Common C libraries.
|
||||
-tm_defines="$tm_defines LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3"
|
||||
+tm_defines="$tm_defines LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3 LIBC_MUSL=4"
|
||||
|
||||
# Common parts for widely ported systems.
|
||||
case ${target} in
|
||||
@@ -653,6 +653,9 @@
|
||||
*-*-*uclibc*)
|
||||
tm_defines="$tm_defines DEFAULT_LIBC=LIBC_UCLIBC"
|
||||
;;
|
||||
+ *-*-*musl*)
|
||||
+ tm_defines="$tm_defines DEFAULT_LIBC=LIBC_MUSL"
|
||||
+ ;;
|
||||
*)
|
||||
tm_defines="$tm_defines DEFAULT_LIBC=LIBC_GLIBC"
|
||||
;;
|
||||
@@ -2145,6 +2148,10 @@
|
||||
powerpc*-*-linux*paired*)
|
||||
tm_file="${tm_file} rs6000/750cl.h" ;;
|
||||
esac
|
||||
+ case ${target} in
|
||||
+ *-linux*-musl*)
|
||||
+ enable_secureplt=yes ;;
|
||||
+ esac
|
||||
if test x${enable_secureplt} = xyes; then
|
||||
tm_file="rs6000/secureplt.h ${tm_file}"
|
||||
fi
|
||||
--- a/gcc/configure
|
||||
+++ b/gcc/configure
|
||||
@@ -26967,6 +26967,9 @@
|
||||
gcc_cv_target_dl_iterate_phdr=no
|
||||
fi
|
||||
;;
|
||||
+ *-linux-musl*)
|
||||
+ gcc_cv_target_dl_iterate_phdr=yes
|
||||
+ ;;
|
||||
esac
|
||||
|
||||
if test x$gcc_cv_target_dl_iterate_phdr = xyes; then
|
||||
--- a/gcc/configure.ac
|
||||
+++ b/gcc/configure.ac
|
||||
@@ -4874,6 +4874,9 @@
|
||||
gcc_cv_target_dl_iterate_phdr=no
|
||||
fi
|
||||
;;
|
||||
+ *-linux-musl*)
|
||||
+ gcc_cv_target_dl_iterate_phdr=yes
|
||||
+ ;;
|
||||
esac
|
||||
GCC_TARGET_TEMPLATE([TARGET_DL_ITERATE_PHDR])
|
||||
if test x$gcc_cv_target_dl_iterate_phdr = xyes; then
|
||||
--- a/gcc/ginclude/stddef.h
|
||||
+++ b/gcc/ginclude/stddef.h
|
||||
@@ -181,6 +181,7 @@
|
||||
#ifndef _GCC_SIZE_T
|
||||
#ifndef _SIZET_
|
||||
#ifndef __size_t
|
||||
+#ifndef __DEFINED_size_t /* musl */
|
||||
#define __size_t__ /* BeOS */
|
||||
#define __SIZE_T__ /* Cray Unicos/Mk */
|
||||
#define _SIZE_T
|
||||
@@ -197,6 +198,7 @@
|
||||
#define ___int_size_t_h
|
||||
#define _GCC_SIZE_T
|
||||
#define _SIZET_
|
||||
+#define __DEFINED_size_t /* musl */
|
||||
#if (defined (__FreeBSD__) && (__FreeBSD__ >= 5)) \
|
||||
|| defined(__FreeBSD_kernel__)
|
||||
/* __size_t is a typedef on FreeBSD 5, must not trash it. */
|
||||
@@ -214,6 +216,7 @@
|
||||
typedef long ssize_t;
|
||||
#endif /* __BEOS__ */
|
||||
#endif /* !(defined (__GNUG__) && defined (size_t)) */
|
||||
+#endif /* __DEFINED_size_t */
|
||||
#endif /* __size_t */
|
||||
#endif /* _SIZET_ */
|
||||
#endif /* _GCC_SIZE_T */
|
||||
--- a/libgcc/unwind-dw2-fde-dip.c
|
||||
+++ b/libgcc/unwind-dw2-fde-dip.c
|
||||
@@ -75,6 +75,13 @@
|
||||
# define USE_PT_GNU_EH_FRAME
|
||||
#endif
|
||||
|
||||
+/* For musl libc, TARGET_DL_ITERATE_PHDR gets defined by the configure
|
||||
+ script. */
|
||||
+#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \
|
||||
+ && defined(TARGET_DL_ITERATE_PHDR)
|
||||
+# define USE_PT_GNU_EH_FRAME
|
||||
+#endif
|
||||
+
|
||||
#if defined(USE_PT_GNU_EH_FRAME)
|
||||
|
||||
#include <link.h>
|
||||
--- a/libgomp/config/posix/time.c
|
||||
+++ b/libgomp/config/posix/time.c
|
||||
@@ -28,6 +28,8 @@
|
||||
The following implementation uses the most simple POSIX routines.
|
||||
If present, POSIX 4 clocks should be used instead. */
|
||||
|
||||
+#define _POSIX_C_SOURCE 199309L /* for clocks */
|
||||
+
|
||||
#include "libgomp.h"
|
||||
#include <unistd.h>
|
||||
#if TIME_WITH_SYS_TIME
|
||||
--- a/libitm/config/arm/hwcap.cc
|
||||
+++ b/libitm/config/arm/hwcap.cc
|
||||
@@ -40,7 +40,11 @@
|
||||
|
||||
#ifdef __linux__
|
||||
#include <unistd.h>
|
||||
+#ifdef __GLIBC__
|
||||
#include <sys/fcntl.h>
|
||||
+#else
|
||||
+#include <fcntl.h>
|
||||
+#endif
|
||||
#include <elf.h>
|
||||
|
||||
static void __attribute__((constructor))
|
||||
--- a/libitm/config/linux/x86/tls.h
|
||||
+++ b/libitm/config/linux/x86/tls.h
|
||||
@@ -25,16 +25,19 @@
|
||||
#ifndef LIBITM_X86_TLS_H
|
||||
#define LIBITM_X86_TLS_H 1
|
||||
|
||||
-#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 10)
|
||||
+#if defined(__GLIBC_PREREQ)
|
||||
+#if __GLIBC_PREREQ(2, 10)
|
||||
/* Use slots in the TCB head rather than __thread lookups.
|
||||
GLIBC has reserved words 10 through 13 for TM. */
|
||||
#define HAVE_ARCH_GTM_THREAD 1
|
||||
#define HAVE_ARCH_GTM_THREAD_DISP 1
|
||||
#endif
|
||||
+#endif
|
||||
|
||||
#include "config/generic/tls.h"
|
||||
|
||||
-#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 10)
|
||||
+#if defined(__GLIBC_PREREQ)
|
||||
+#if __GLIBC_PREREQ(2, 10)
|
||||
namespace GTM HIDDEN {
|
||||
|
||||
#ifdef __x86_64__
|
||||
@@ -101,5 +104,6 @@
|
||||
|
||||
} // namespace GTM
|
||||
#endif /* >= GLIBC 2.10 */
|
||||
+#endif
|
||||
|
||||
#endif // LIBITM_X86_TLS_H
|
||||
--- a/libstdc++-v3/configure.host
|
||||
+++ b/libstdc++-v3/configure.host
|
||||
@@ -263,6 +263,13 @@
|
||||
os_include_dir="os/bsd/freebsd"
|
||||
;;
|
||||
gnu* | linux* | kfreebsd*-gnu | knetbsd*-gnu)
|
||||
+ # check for musl by target
|
||||
+ case "${host_os}" in
|
||||
+ *-musl*)
|
||||
+ os_include_dir="os/generic"
|
||||
+ ;;
|
||||
+ *)
|
||||
+
|
||||
if [ "$uclibc" = "yes" ]; then
|
||||
os_include_dir="os/uclibc"
|
||||
elif [ "$bionic" = "yes" ]; then
|
||||
@@ -271,6 +278,9 @@
|
||||
os_include_dir="os/gnu-linux"
|
||||
fi
|
||||
;;
|
||||
+
|
||||
+ esac
|
||||
+ ;;
|
||||
hpux*)
|
||||
os_include_dir="os/hpux"
|
||||
;;
|
15
packages/gcc/4.8.5/0026-cygwin64.patch
vendored
15
packages/gcc/4.8.5/0026-cygwin64.patch
vendored
@ -1,15 +0,0 @@
|
||||
---
|
||||
gcc/config.host | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/gcc/config.host
|
||||
+++ b/gcc/config.host
|
||||
@@ -214,7 +214,7 @@
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
- i[34567]86-*-cygwin*)
|
||||
+ i[34567]86-*-cygwin* | x86_64-*-cygwin*)
|
||||
host_xm_file=i386/xm-cygwin.h
|
||||
out_host_hook_obj=host-cygwin.o
|
||||
host_xmake_file="${host_xmake_file} i386/x-cygwin"
|
@ -1,122 +0,0 @@
|
||||
http://gcc.gnu.org/ml/gcc-patches/2008-10/msg00269.html
|
||||
|
||||
On glibc the libc.so carries a copy of the math function copysignl() but
|
||||
on uClibc math functions like copysignl() live in libm. Since libgcc_s
|
||||
contains unresolved symbols, any attempt to link against libgcc_s
|
||||
without explicitely specifying -lm fails, resulting in a broken
|
||||
bootstrap of the compiler.
|
||||
|
||||
Forward port to gcc 4.5.1 by Gustavo Zacarias <gustavo@zacarias.com.ar>
|
||||
|
||||
---
|
||||
libgcc/Makefile.in | 4 +++-
|
||||
libgcc/configure | 32 ++++++++++++++++++++++++++++++++
|
||||
libgcc/configure.ac | 21 +++++++++++++++++++++
|
||||
3 files changed, 56 insertions(+), 1 deletion(-)
|
||||
|
||||
Index: gcc-4.8.0/libgcc/Makefile.in
|
||||
===================================================================
|
||||
--- gcc-4.8.0.orig/libgcc/Makefile.in 2013-02-04 20:06:20.000000000 +0100
|
||||
+++ gcc-4.8.0/libgcc/Makefile.in 2013-03-24 09:12:43.000000000 +0100
|
||||
@@ -41,6 +41,7 @@
|
||||
decimal_float = @decimal_float@
|
||||
enable_decimal_float = @enable_decimal_float@
|
||||
fixed_point = @fixed_point@
|
||||
+LIBGCC_LIBM = @LIBGCC_LIBM@
|
||||
|
||||
host_noncanonical = @host_noncanonical@
|
||||
target_noncanonical = @target_noncanonical@
|
||||
@@ -927,9 +928,10 @@
|
||||
@multilib_dir@,$(MULTIDIR),$(subst \
|
||||
@shlib_objs@,$(objects) libgcc.a,$(subst \
|
||||
@shlib_base_name@,libgcc_s,$(subst \
|
||||
+ @libgcc_libm@,$(LIBGCC_LIBM),$(subst \
|
||||
@shlib_map_file@,$(mapfile),$(subst \
|
||||
@shlib_slibdir_qual@,$(MULTIOSSUBDIR),$(subst \
|
||||
- @shlib_slibdir@,$(shlib_slibdir),$(SHLIB_LINK))))))))
|
||||
+ @shlib_slibdir@,$(shlib_slibdir),$(SHLIB_LINK)))))))))
|
||||
|
||||
libunwind$(SHLIB_EXT): $(libunwind-s-objects) $(extra-parts)
|
||||
# @multilib_flags@ is still needed because this may use
|
||||
Index: gcc-4.8.0/libgcc/configure
|
||||
===================================================================
|
||||
--- gcc-4.8.0.orig/libgcc/configure 2012-11-05 00:08:42.000000000 +0100
|
||||
+++ gcc-4.8.0/libgcc/configure 2013-03-24 09:12:43.000000000 +0100
|
||||
@@ -564,6 +564,7 @@
|
||||
tmake_file
|
||||
sfp_machine_header
|
||||
set_use_emutls
|
||||
+LIBGCC_LIBM
|
||||
set_have_cc_tls
|
||||
vis_hide
|
||||
fixed_point
|
||||
@@ -4481,6 +4482,37 @@
|
||||
fi
|
||||
fi
|
||||
|
||||
+# On powerpc libgcc_s references copysignl which is a libm function but
|
||||
+# glibc apparently also provides it via libc as opposed to uClibc where
|
||||
+# it lives in libm.
|
||||
+echo "$as_me:$LINENO: checking for library containing copysignl" >&5
|
||||
+echo $ECHO_N "checking for library containing copysignl... $ECHO_C" >&6
|
||||
+if test "${libgcc_cv_copysignl_lib+set}" = set; then
|
||||
+ echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
+else
|
||||
+
|
||||
+ echo '#include <features.h>' > conftest.c
|
||||
+ echo 'int the_libc = __UCLIBC__ + __powerpc__;' >> conftest.c
|
||||
+ libgcc_cv_copysignl_lib="-lc"
|
||||
+ if { ac_try='${CC-cc} -S conftest.c -o conftest.s 1>&5'
|
||||
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
+ (eval $ac_try) 2>&5
|
||||
+ ac_status=$?
|
||||
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
+ (exit $ac_status); }; }
|
||||
+ then
|
||||
+ libgcc_cv_copysignl_lib="-lm"
|
||||
+ fi
|
||||
+ rm -f conftest.*
|
||||
+
|
||||
+fi
|
||||
+echo "$as_me:$LINENO: result: $libgcc_cv_copysignl_lib" >&5
|
||||
+echo "${ECHO_T}$libgcc_cv_copysignl_lib" >&6
|
||||
+
|
||||
+case /${libgcc_cv_copysignl_lib}/ in
|
||||
+ /-lm/) LIBGCC_LIBM="$LIBGCC_LIBM -lm" ;;
|
||||
+ *) LIBGCC_LIBM= ;;
|
||||
+esac
|
||||
|
||||
# Conditionalize the makefile for this target machine.
|
||||
tmake_file_=
|
||||
Index: gcc-4.8.0/libgcc/configure.ac
|
||||
===================================================================
|
||||
--- gcc-4.8.0.orig/libgcc/configure.ac 2012-10-15 15:10:30.000000000 +0200
|
||||
+++ gcc-4.8.0/libgcc/configure.ac 2013-03-24 09:12:43.000000000 +0100
|
||||
@@ -326,6 +326,27 @@
|
||||
fi
|
||||
AC_SUBST(set_have_cc_tls)
|
||||
|
||||
+# On powerpc libgcc_s references copysignl which is a libm function but
|
||||
+# glibc apparently also provides it via libc as opposed to uClibc where
|
||||
+# it lives in libm.
|
||||
+AC_CACHE_CHECK
|
||||
+ libgcc_cv_copysignl_lib,
|
||||
+ echo '#include <features.h>' > conftest.c
|
||||
+ echo 'int the_libc = __UCLIBC__ + __powerpc__;' >> conftest.c
|
||||
+ libgcc_cv_copysignl_lib="-lc"
|
||||
+ if AC_TRY_COMMAND(${CC-cc} -S conftest.c -o conftest.s 1>&AS_MESSAGE_LOG_FD)
|
||||
+ then
|
||||
+ libgcc_cv_copysignl_lib="-lm"
|
||||
+ fi
|
||||
+ rm -f conftest.*
|
||||
+ ])
|
||||
+
|
||||
+case /${libgcc_cv_copysignl_lib}/ in
|
||||
+ /-lm/) LIBGCC_LIBM="$LIBGCC_LIBM -lm" ;;
|
||||
+ *) LIBGCC_LIBM= ;;
|
||||
+esac
|
||||
+AC_SUBST(LIBGCC_LIBM)
|
||||
+
|
||||
# See if we have emulated thread-local storage.
|
||||
GCC_CHECK_EMUTLS
|
||||
set_use_emutls=
|
8
packages/gcc/4.8.5/chksum
vendored
8
packages/gcc/4.8.5/chksum
vendored
@ -1,8 +0,0 @@
|
||||
md5 gcc-4.8.5.tar.bz2 80d2c2982a3392bb0b89673ff136e223
|
||||
sha1 gcc-4.8.5.tar.bz2 de144b551f10e23d82f30ecd2d6d0e18c26f8850
|
||||
sha256 gcc-4.8.5.tar.bz2 22fb1e7e0f68a63cee631d85b20461d1ea6bda162f03096350e38c8d427ecf23
|
||||
sha512 gcc-4.8.5.tar.bz2 47fdfeca0c0a624cdec9c4ae47137d056c918d5c386d4b96985bb3c8172aba377cb66cbcc30e80832fd244a7d98f562c20198056915c70cfef0977545073a8ea
|
||||
md5 gcc-4.8.5.tar.gz bfe56e74d31d25009c8fb55fd3ca7e01
|
||||
sha1 gcc-4.8.5.tar.gz 50d09a74cbd4a80a06652beafea8453684518808
|
||||
sha256 gcc-4.8.5.tar.gz 1dbc5cd94c9947fe5dffd298e569de7f44c3cedbd428fceea59490d336d8295a
|
||||
sha512 gcc-4.8.5.tar.gz a012e06f975f82c053a9671483173bceeff4d9efc6a6d6e51304ef2a09a86c40f8088e23465f1d729276a34031bb1655cacef9f8a960f6206a3382dd0dc431e9
|
2
packages/gcc/4.8.5/version.desc
vendored
2
packages/gcc/4.8.5/version.desc
vendored
@ -1,2 +0,0 @@
|
||||
obsolete='yes'
|
||||
archive_formats='.tar.bz2 .tar.gz'
|
Loading…
Reference in New Issue
Block a user