Bump buildroot to version 2017-02
TG-3 #closed
This commit is contained in:
@@ -1,127 +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 ported to gcc 4.7.3
|
||||
|
||||
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
|
||||
|
||||
diff -Nura gcc-4.7.3.orig/libgcc/config/t-slibgcc gcc-4.7.3/libgcc/config/t-slibgcc
|
||||
--- gcc-4.7.3.orig/libgcc/config/t-slibgcc 2013-04-11 15:23:46.491571116 -0300
|
||||
+++ gcc-4.7.3/libgcc/config/t-slibgcc 2013-04-11 15:25:06.241141824 -0300
|
||||
@@ -27,7 +27,7 @@
|
||||
SHLIB_OBJS = @shlib_objs@
|
||||
SHLIB_DIR = @multilib_dir@
|
||||
SHLIB_SLIBDIR_QUAL = @shlib_slibdir_qual@
|
||||
-SHLIB_LC = -lc
|
||||
+SHLIB_LC = @libgcc_libm@ -lc
|
||||
SHLIB_MAKE_SOLINK = $(LN_S) $(SHLIB_SONAME) $(SHLIB_DIR)/$(SHLIB_SOLINK)
|
||||
SHLIB_INSTALL_SOLINK = $(LN_S) $(SHLIB_SONAME) \
|
||||
$(DESTDIR)$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SOLINK)
|
||||
diff -Nura gcc-4.7.3.orig/libgcc/configure gcc-4.7.3/libgcc/configure
|
||||
--- gcc-4.7.3.orig/libgcc/configure 2013-04-11 15:23:46.551573051 -0300
|
||||
+++ gcc-4.7.3/libgcc/configure 2013-04-11 15:25:06.243141875 -0300
|
||||
@@ -563,6 +563,7 @@
|
||||
tmake_file
|
||||
sfp_machine_header
|
||||
set_use_emutls
|
||||
+LIBGCC_LIBM
|
||||
set_have_cc_tls
|
||||
vis_hide
|
||||
fixed_point
|
||||
@@ -4445,6 +4446,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_=
|
||||
diff -Nura gcc-4.7.3.orig/libgcc/configure.ac gcc-4.7.3/libgcc/configure.ac
|
||||
--- gcc-4.7.3.orig/libgcc/configure.ac 2013-04-11 15:23:46.551573051 -0300
|
||||
+++ gcc-4.7.3/libgcc/configure.ac 2013-04-11 15:25:06.244141901 -0300
|
||||
@@ -324,6 +324,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=
|
||||
diff -Nura gcc-4.7.3.orig/libgcc/Makefile.in gcc-4.7.3/libgcc/Makefile.in
|
||||
--- gcc-4.7.3.orig/libgcc/Makefile.in 2013-04-11 15:23:46.537572599 -0300
|
||||
+++ gcc-4.7.3/libgcc/Makefile.in 2013-04-11 15:25:06.241141824 -0300
|
||||
@@ -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@
|
||||
@@ -928,9 +929,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
|
||||
@@ -1,37 +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(-)
|
||||
|
||||
diff --git a/gcc/config/xtensa/xtensa.c b/gcc/config/xtensa/xtensa.c
|
||||
index eb039ba..7296e36 100644
|
||||
--- a/gcc/config/xtensa/xtensa.c
|
||||
+++ b/gcc/config/xtensa/xtensa.c
|
||||
@@ -1461,8 +1461,9 @@ init_alignment_context (struct alignment_context *ac, rtx mem)
|
||||
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.8.1.4
|
||||
|
||||
@@ -1,25 +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(-)
|
||||
|
||||
diff --git a/config/mt-gnu b/config/mt-gnu
|
||||
index 15bf417..5c696f5 100644
|
||||
--- a/config/mt-gnu
|
||||
+++ b/config/mt-gnu
|
||||
@@ -1 +1 @@
|
||||
-CXXFLAGS_FOR_TARGET = $(CXXFLAGS) -D_GNU_SOURCE
|
||||
+CXXFLAGS_FOR_TARGET += -D_GNU_SOURCE
|
||||
--
|
||||
2.1.4
|
||||
|
||||
@@ -1,49 +0,0 @@
|
||||
Index: gcc-4.2/libmudflap/mf-hooks2.c
|
||||
===================================================================
|
||||
--- gcc-4.2/libmudflap/mf-hooks2.c (revision 119834)
|
||||
+++ gcc-4.2/libmudflap/mf-hooks2.c (working copy)
|
||||
@@ -427,7 +427,7 @@
|
||||
{
|
||||
TRACE ("%s\n", __PRETTY_FUNCTION__);
|
||||
MF_VALIDATE_EXTENT(s, n, __MF_CHECK_WRITE, "bzero region");
|
||||
- bzero (s, n);
|
||||
+ memset (s, 0, n);
|
||||
}
|
||||
|
||||
|
||||
@@ -437,7 +437,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);
|
||||
}
|
||||
|
||||
|
||||
@@ -447,7 +447,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);
|
||||
}
|
||||
|
||||
|
||||
@@ -456,7 +456,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);
|
||||
}
|
||||
|
||||
|
||||
@@ -465,7 +465,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,25 +0,0 @@
|
||||
--- a/gcc/config/arm/linux-elf.h
|
||||
+++ b/gcc/config/arm/linux-elf.h
|
||||
@@ -57,7 +57,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,10 @@
|
||||
LIB1ASMSRC = arm/lib1funcs.S
|
||||
LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx _clzsi2 _clzdi2 \
|
||||
- _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,13 +0,0 @@
|
||||
http://sourceware.org/ml/crossgcc/2008-05/msg00009.html
|
||||
|
||||
--- 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,102 +0,0 @@
|
||||
commit 4fa1f8926227d4e79975b674dc4292b9bec4b137
|
||||
Author: jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
|
||||
Date: Thu Mar 6 12:07:07 2014 +0000
|
||||
|
||||
PR target/58595
|
||||
* config/arm/arm.c (arm_tls_symbol_p): Remove.
|
||||
(arm_legitimize_address): Call legitimize_tls_address for any
|
||||
arm_tls_referenced_p expression, handle constant addend. Call it
|
||||
before testing for !TARGET_ARM.
|
||||
(thumb_legitimize_address): Don't handle arm_tls_symbol_p here.
|
||||
|
||||
* gcc.dg/tls/pr58595.c: New test.
|
||||
|
||||
|
||||
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@208380 138bc75d-0d04-0410-961f-82ee72b054a4
|
||||
|
||||
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
|
||||
index ce24bfe..af5666b 100644
|
||||
--- a/gcc/config/arm/arm.c
|
||||
+++ b/gcc/config/arm/arm.c
|
||||
@@ -235,7 +235,6 @@ static tree arm_gimplify_va_arg_expr (tree, tree, gimple_seq *, gimple_seq *);
|
||||
static void arm_option_override (void);
|
||||
static unsigned HOST_WIDE_INT arm_shift_truncation_mask (enum machine_mode);
|
||||
static bool arm_cannot_copy_insn_p (rtx);
|
||||
-static bool arm_tls_symbol_p (rtx x);
|
||||
static int arm_issue_rate (void);
|
||||
static void arm_output_dwarf_dtprel (FILE *, int, rtx) ATTRIBUTE_UNUSED;
|
||||
static bool arm_output_addr_const_extra (FILE *, rtx);
|
||||
@@ -7336,6 +7335,32 @@ legitimize_tls_address (rtx x, rtx reg)
|
||||
rtx
|
||||
arm_legitimize_address (rtx x, rtx orig_x, enum machine_mode mode)
|
||||
{
|
||||
+ if (arm_tls_referenced_p (x))
|
||||
+ {
|
||||
+ rtx addend = NULL;
|
||||
+
|
||||
+ if (GET_CODE (x) == CONST && GET_CODE (XEXP (x, 0)) == PLUS)
|
||||
+ {
|
||||
+ addend = XEXP (XEXP (x, 0), 1);
|
||||
+ x = XEXP (XEXP (x, 0), 0);
|
||||
+ }
|
||||
+
|
||||
+ if (GET_CODE (x) != SYMBOL_REF)
|
||||
+ return x;
|
||||
+
|
||||
+ gcc_assert (SYMBOL_REF_TLS_MODEL (x) != 0);
|
||||
+
|
||||
+ x = legitimize_tls_address (x, NULL_RTX);
|
||||
+
|
||||
+ if (addend)
|
||||
+ {
|
||||
+ x = gen_rtx_PLUS (SImode, x, addend);
|
||||
+ orig_x = x;
|
||||
+ }
|
||||
+ else
|
||||
+ return x;
|
||||
+ }
|
||||
+
|
||||
if (!TARGET_ARM)
|
||||
{
|
||||
/* TODO: legitimize_address for Thumb2. */
|
||||
@@ -7344,9 +7369,6 @@ arm_legitimize_address (rtx x, rtx orig_x, enum machine_mode mode)
|
||||
return thumb_legitimize_address (x, orig_x, mode);
|
||||
}
|
||||
|
||||
- if (arm_tls_symbol_p (x))
|
||||
- return legitimize_tls_address (x, NULL_RTX);
|
||||
-
|
||||
if (GET_CODE (x) == PLUS)
|
||||
{
|
||||
rtx xop0 = XEXP (x, 0);
|
||||
@@ -7459,9 +7481,6 @@ arm_legitimize_address (rtx x, rtx orig_x, enum machine_mode mode)
|
||||
rtx
|
||||
thumb_legitimize_address (rtx x, rtx orig_x, enum machine_mode mode)
|
||||
{
|
||||
- if (arm_tls_symbol_p (x))
|
||||
- return legitimize_tls_address (x, NULL_RTX);
|
||||
-
|
||||
if (GET_CODE (x) == PLUS
|
||||
&& CONST_INT_P (XEXP (x, 1))
|
||||
&& (INTVAL (XEXP (x, 1)) >= 32 * GET_MODE_SIZE (mode)
|
||||
@@ -7756,20 +7775,6 @@ thumb_legitimize_reload_address (rtx *x_p,
|
||||
|
||||
/* Test for various thread-local symbols. */
|
||||
|
||||
-/* Return TRUE if X is a thread-local symbol. */
|
||||
-
|
||||
-static bool
|
||||
-arm_tls_symbol_p (rtx x)
|
||||
-{
|
||||
- if (! TARGET_HAVE_TLS)
|
||||
- return false;
|
||||
-
|
||||
- if (GET_CODE (x) != SYMBOL_REF)
|
||||
- return false;
|
||||
-
|
||||
- return SYMBOL_REF_TLS_MODEL (x) != 0;
|
||||
-}
|
||||
-
|
||||
/* Helper for arm_tls_referenced_p. */
|
||||
|
||||
static int
|
||||
@@ -1,42 +0,0 @@
|
||||
From 4fb4acf88912dd978bb63ecab79641a5795ce84f Mon Sep 17 00:00:00 2001
|
||||
From: Romain Naour <romain.naour@openwide.fr>
|
||||
Date: Mon, 27 Jul 2015 15:05:14 +0200
|
||||
Subject: [PATCH] gcc: fix build with gcc5
|
||||
|
||||
gcc < 4.8 doesn't build with gcc5.
|
||||
|
||||
Patch is from DragonFlyBSD github [1]
|
||||
|
||||
[1] https://github.com/DragonFlyBSD/DPorts/issues/136
|
||||
|
||||
Signed-off-by: Romain Naour <romain.naour@openwide.fr>
|
||||
---
|
||||
gcc/cp/cfns.h | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/gcc/cp/cfns.h b/gcc/cp/cfns.h
|
||||
index 62cdfab..4f63cc4 100644
|
||||
--- a/gcc/cp/cfns.h
|
||||
+++ b/gcc/cp/cfns.h
|
||||
@@ -53,6 +53,9 @@ __inline
|
||||
static unsigned int hash (const char *, unsigned int);
|
||||
#ifdef __GNUC__
|
||||
__inline
|
||||
+#ifdef __GNUC_STDC_INLINE__
|
||||
+__attribute__ ((__gnu_inline__))
|
||||
+#endif
|
||||
#endif
|
||||
const char * libc_name_p (const char *, unsigned int);
|
||||
/* maximum key range = 391, duplicates = 0 */
|
||||
@@ -96,7 +99,7 @@ hash (register const char *str, register unsigned int len)
|
||||
400, 400, 400, 400, 400, 400, 400, 400, 400, 400,
|
||||
400, 400, 400, 400, 400, 400, 400
|
||||
};
|
||||
- register int hval = len;
|
||||
+ register int hval = (int)len;
|
||||
|
||||
switch (hval)
|
||||
{
|
||||
--
|
||||
2.4.3
|
||||
|
||||
@@ -1,244 +0,0 @@
|
||||
From 4e318d50b876def5f97e2031926354055e442ca3 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(-)
|
||||
|
||||
diff --git a/libiberty/Makefile.in b/libiberty/Makefile.in
|
||||
index 5280bc1..a69c6b6 100644
|
||||
--- a/libiberty/Makefile.in
|
||||
+++ b/libiberty/Makefile.in
|
||||
@@ -353,19 +353,19 @@ install-strip: install
|
||||
# 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
|
||||
|
||||
diff --git a/libiberty/configure b/libiberty/configure
|
||||
index 6e98352..44d1f78 100755
|
||||
--- a/libiberty/configure
|
||||
+++ b/libiberty/configure
|
||||
@@ -675,8 +675,8 @@ with_cross_host
|
||||
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 @@ Optional Features:
|
||||
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 @@ if test $cross_compiling = no && test $multilib = yes \
|
||||
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'
|
||||
@@ -5475,7 +5504,6 @@ fi
|
||||
|
||||
setobjs=
|
||||
CHECK=
|
||||
-target_header_dir=
|
||||
if test -n "${with_target_subdir}"; then
|
||||
|
||||
# We are being configured as a target library. AC_REPLACE_FUNCS
|
||||
@@ -5752,29 +5780,6 @@ _ACEOF
|
||||
|
||||
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.
|
||||
diff --git a/libiberty/configure.ac b/libiberty/configure.ac
|
||||
index 754b66a..04260ec 100644
|
||||
--- a/libiberty/configure.ac
|
||||
+++ b/libiberty/configure.ac
|
||||
@@ -128,6 +128,31 @@ if test $cross_compiling = no && test $multilib = yes \
|
||||
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
|
||||
@@ -379,7 +404,6 @@ fi
|
||||
|
||||
setobjs=
|
||||
CHECK=
|
||||
-target_header_dir=
|
||||
if test -n "${with_target_subdir}"; then
|
||||
|
||||
# We are being configured as a target library. AC_REPLACE_FUNCS
|
||||
@@ -490,27 +514,6 @@ if test -n "${with_target_subdir}"; then
|
||||
|
||||
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.
|
||||
--
|
||||
2.4.3
|
||||
|
||||
@@ -1,587 +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>
|
||||
---
|
||||
|
||||
# HG changeset patch
|
||||
# Parent f50bb54f331f73405131a30b4f353cfda1c70304
|
||||
Use the generic implementation of libstdc++ primitives when we're on musl, not the glibc one.
|
||||
|
||||
Index: b/libstdc++-v3/configure.host
|
||||
===================================================================
|
||||
--- a/libstdc++-v3/configure.host
|
||||
+++ b/libstdc++-v3/configure.host
|
||||
@@ -243,6 +243,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
|
||||
@@ -251,6 +258,9 @@
|
||||
os_include_dir="os/gnu-linux"
|
||||
fi
|
||||
;;
|
||||
+
|
||||
+ esac
|
||||
+ ;;
|
||||
hpux*)
|
||||
os_include_dir="os/hpux"
|
||||
;;
|
||||
Index: b/gcc/config.gcc
|
||||
===================================================================
|
||||
--- a/gcc/config.gcc
|
||||
+++ b/gcc/config.gcc
|
||||
@@ -522,7 +522,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
|
||||
@@ -625,6 +625,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"
|
||||
;;
|
||||
@@ -2091,6 +2094,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
|
||||
Index: b/gcc/config/linux.h
|
||||
===================================================================
|
||||
--- a/gcc/config/linux.h
|
||||
+++ b/gcc/config/linux.h
|
||||
@@ -33,10 +33,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() \
|
||||
@@ -54,18 +56,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 */
|
||||
@@ -83,23 +88,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
|
||||
@@ -108,3 +122,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
|
||||
Index: b/gcc/config/linux.opt
|
||||
===================================================================
|
||||
--- 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
|
||||
Index: b/gcc/ginclude/stddef.h
|
||||
===================================================================
|
||||
--- a/gcc/ginclude/stddef.h
|
||||
+++ b/gcc/ginclude/stddef.h
|
||||
@@ -184,6 +184,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
|
||||
@@ -200,6 +201,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. */
|
||||
@@ -215,6 +217,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 */
|
||||
Index: b/libgomp/config/posix/time.c
|
||||
===================================================================
|
||||
--- 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
|
||||
Index: b/libgcc/unwind-dw2-fde-dip.c
|
||||
===================================================================
|
||||
--- a/libgcc/unwind-dw2-fde-dip.c
|
||||
+++ b/libgcc/unwind-dw2-fde-dip.c
|
||||
@@ -71,6 +71,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>
|
||||
Index: b/gcc/configure
|
||||
===================================================================
|
||||
--- a/gcc/configure
|
||||
+++ b/gcc/configure
|
||||
@@ -26906,6 +26910,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
|
||||
Index: b/gcc/configure.ac
|
||||
===================================================================
|
||||
--- a/gcc/configure.ac
|
||||
+++ b/gcc/configure.ac
|
||||
@@ -4767,6 +4771,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
|
||||
Index: b/fixincludes/mkfixinc.sh
|
||||
===================================================================
|
||||
--- a/fixincludes/mkfixinc.sh
|
||||
+++ b/fixincludes/mkfixinc.sh
|
||||
@@ -20,7 +20,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}
|
||||
Index: b/gcc/config/i386/linux.h
|
||||
===================================================================
|
||||
--- a/gcc/config/i386/linux.h
|
||||
+++ b/gcc/config/i386/linux.h
|
||||
@@ -22,3 +22,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"
|
||||
Index: b/gcc/config/i386/linux64.h
|
||||
===================================================================
|
||||
--- a/gcc/config/i386/linux64.h
|
||||
+++ b/gcc/config/i386/linux64.h
|
||||
@@ -31,3 +31,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
|
||||
+#undef MUSL_DYNAMIC_LINKER64
|
||||
+#undef MUSL_DYNAMIC_LINKERX32
|
||||
+#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-i386.so.1"
|
||||
+#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-x86_64.so.1"
|
||||
+#define MUSL_DYNAMIC_LINKERX32 "/lib/ld-musl-x32.so.1"
|
||||
Index: b/libitm/config/linux/x86/tls.h
|
||||
===================================================================
|
||||
--- 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
|
||||
Index: b/gcc/config/arm/linux-eabi.h
|
||||
===================================================================
|
||||
--- a/gcc/config/arm/linux-eabi.h
|
||||
+++ b/gcc/config/arm/linux-eabi.h
|
||||
@@ -64,6 +64,23 @@
|
||||
#undef GLIBC_DYNAMIC_LINKER
|
||||
#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.3"
|
||||
|
||||
+/* 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
|
||||
Index: b/libitm/config/arm/hwcap.cc
|
||||
===================================================================
|
||||
--- 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))
|
||||
Index: b/gcc/config/mips/linux.h
|
||||
===================================================================
|
||||
--- a/gcc/config/mips/linux.h
|
||||
+++ b/gcc/config/mips/linux.h
|
||||
@@ -19,3 +19,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 "%{msoft-float:-sf}.so.1"
|
||||
Index: b/gcc/config/rs6000/linux64.h
|
||||
===================================================================
|
||||
--- a/gcc/config/rs6000/linux64.h
|
||||
+++ b/gcc/config/rs6000/linux64.h
|
||||
@@ -362,17 +362,23 @@
|
||||
#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld64.so.1"
|
||||
#define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0"
|
||||
#define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0"
|
||||
+#undef MUSL_DYNAMIC_LINKER32
|
||||
+#undef MUSL_DYNAMIC_LINKER64
|
||||
+#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-powerpc.so.1"
|
||||
+#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)
|
||||
|
||||
|
||||
#define LINK_OS_LINUX_SPEC32 "-m elf32ppclinux %{!shared: %{!static: \
|
||||
Index: b/gcc/config/rs6000/secureplt.h
|
||||
===================================================================
|
||||
--- 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"
|
||||
Index: b/gcc/config/rs6000/sysv4.h
|
||||
===================================================================
|
||||
--- a/gcc/config/rs6000/sysv4.h
|
||||
+++ b/gcc/config/rs6000/sysv4.h
|
||||
@@ -566,6 +566,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 and set correct endian mode. */
|
||||
#define CC1_SPEC "%{G*} %(cc1_cpu) \
|
||||
@@ -626,7 +629,8 @@
|
||||
%{mlittle: --oformat elf32-powerpcle } %{mlittle-endian: --oformat elf32-powerpcle } \
|
||||
%{!mlittle: %{!mlittle-endian: %{!mbig: %{!mbig-endian: \
|
||||
%{mcall-i960-old: --oformat elf32-powerpcle} \
|
||||
- }}}}"
|
||||
+ }}}} \
|
||||
+%{!mbss-plt: %{!msecure-plt: %(link_secure_plt_default)}}"
|
||||
|
||||
/* Any specific OS flags. */
|
||||
#define LINK_OS_SPEC "\
|
||||
@@ -804,15 +808,19 @@
|
||||
|
||||
#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
|
||||
#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
|
||||
+#undef MUSL_DYNAMIC_LINKER
|
||||
+#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} \
|
||||
@@ -938,6 +946,7 @@
|
||||
{ "cc1_endian_little", CC1_ENDIAN_LITTLE_SPEC }, \
|
||||
{ "cc1_endian_default", CC1_ENDIAN_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 }, \
|
||||
Index: b/gcc/config/mips/linux64.h
|
||||
===================================================================
|
||||
--- a/gcc/config/mips/linux64.h
|
||||
+++ b/gcc/config/mips/linux64.h
|
||||
@@ -30,4 +30,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)
|
||||
@@ -0,0 +1,43 @@
|
||||
From edb9057c195c41dd7bcd8603e5fd420359edd520 Mon Sep 17 00:00:00 2001
|
||||
From: nsz <nsz@138bc75d-0d04-0410-961f-82ee72b054a4>
|
||||
Date: Mon, 23 Nov 2015 15:17:55 +0000
|
||||
Subject: [PATCH] [ARM] PR target/68059 libgcc should not use __write for
|
||||
printing fatal error
|
||||
|
||||
libgcc/
|
||||
PR target/68059
|
||||
* config/arm/linux-atomic-64bit.c (__write): Rename to...
|
||||
(write): ...this and fix the return type.
|
||||
|
||||
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@230762 138bc75d-0d04-0410-961f-82ee72b054a4
|
||||
|
||||
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
|
||||
---
|
||||
libgcc/config/arm/linux-atomic-64bit.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/libgcc/config/arm/linux-atomic-64bit.c b/libgcc/config/arm/linux-atomic-64bit.c
|
||||
index 7aa8dfc..570b4ce 100644
|
||||
--- a/libgcc/config/arm/linux-atomic-64bit.c
|
||||
+++ b/libgcc/config/arm/linux-atomic-64bit.c
|
||||
@@ -33,7 +33,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
||||
kernels; we check for that in an init section and bail out rather
|
||||
unceremoneously. */
|
||||
|
||||
-extern unsigned int __write (int fd, const void *buf, unsigned int count);
|
||||
+extern int write (int fd, const void *buf, unsigned int count);
|
||||
extern void abort (void);
|
||||
|
||||
/* Kernel helper for compare-and-exchange. */
|
||||
@@ -56,7 +56,7 @@ static void __check_for_sync8_kernelhelper (void)
|
||||
for the user - I'm not sure I can rely on much else being
|
||||
available at this point, so do the same as generic-morestack.c
|
||||
write () and abort (). */
|
||||
- __write (2 /* stderr. */, err, sizeof (err));
|
||||
+ write (2 /* stderr. */, err, sizeof (err));
|
||||
abort ();
|
||||
}
|
||||
};
|
||||
--
|
||||
2.10.2
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
From 80bc14a5249da7054b716229206b453f339b4a5e Mon Sep 17 00:00:00 2001
|
||||
From: nsz <nsz@138bc75d-0d04-0410-961f-82ee72b054a4>
|
||||
Date: Mon, 23 Nov 2015 15:17:55 +0000
|
||||
Subject: [PATCH] [ARM] PR target/68059 libgcc should not use __write for
|
||||
printing fatal error
|
||||
|
||||
libgcc/
|
||||
PR target/68059
|
||||
* config/arm/linux-atomic-64bit.c (__write): Rename to...
|
||||
(write): ...this and fix the return type.
|
||||
|
||||
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@230762 138bc75d-0d04-0410-961f-82ee72b054a4
|
||||
|
||||
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
|
||||
---
|
||||
libgcc/config/arm/linux-atomic-64bit.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/libgcc/config/arm/linux-atomic-64bit.c b/libgcc/config/arm/linux-atomic-64bit.c
|
||||
index 5b8c6e2..9078673 100644
|
||||
--- a/libgcc/config/arm/linux-atomic-64bit.c
|
||||
+++ b/libgcc/config/arm/linux-atomic-64bit.c
|
||||
@@ -33,7 +33,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
||||
kernels; we check for that in an init section and bail out rather
|
||||
unceremoneously. */
|
||||
|
||||
-extern unsigned int __write (int fd, const void *buf, unsigned int count);
|
||||
+extern int write (int fd, const void *buf, unsigned int count);
|
||||
extern void abort (void);
|
||||
|
||||
/* Kernel helper for compare-and-exchange. */
|
||||
@@ -56,7 +56,7 @@ static void __check_for_sync8_kernelhelper (void)
|
||||
for the user - I'm not sure I can rely on much else being
|
||||
available at this point, so do the same as generic-morestack.c
|
||||
write () and abort (). */
|
||||
- __write (2 /* stderr. */, err, sizeof (err));
|
||||
+ write (2 /* stderr. */, err, sizeof (err));
|
||||
abort ();
|
||||
}
|
||||
};
|
||||
--
|
||||
2.10.2
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
From 89bd94250827f887b38211ac048b4006229dc9c0 Mon Sep 17 00:00:00 2001
|
||||
From: ktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4>
|
||||
Date: Fri, 26 Aug 2016 10:23:20 +0000
|
||||
Subject: [PATCH] [ARM] PR target/70473: Reduce size of Cortex-A8 automaton
|
||||
|
||||
PR target/70473
|
||||
* config/arm/cortex-a8-neon.md (cortex_a8_vfp_muld): Reduce
|
||||
reservation duration to 15 cycles.
|
||||
(cortex_a8_vfp_macs): Likewise.
|
||||
(cortex_a8_vfp_macd): Likewise.
|
||||
(cortex_a8_vfp_divs): Likewise.
|
||||
(cortex_a8_vfp_divd): Likewise.
|
||||
|
||||
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@239772 138bc75d-0d04-0410-961f-82ee72b054a4
|
||||
|
||||
[Backport from gcc upstream commit 79f5d5e3cd5a668d5ecb2b6b0cce80ef5706ac53.]
|
||||
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
||||
---
|
||||
gcc/config/arm/cortex-a8-neon.md | 14 +++++++++-----
|
||||
1 file changed, 9 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/gcc/config/arm/cortex-a8-neon.md b/gcc/config/arm/cortex-a8-neon.md
|
||||
index 04fa01e..4e6d05d 100644
|
||||
--- a/gcc/config/arm/cortex-a8-neon.md
|
||||
+++ b/gcc/config/arm/cortex-a8-neon.md
|
||||
@@ -357,30 +357,34 @@
|
||||
(eq_attr "type" "fmuls"))
|
||||
"cortex_a8_vfp,cortex_a8_vfplite*11")
|
||||
|
||||
+;; Don't model a reservation for more than 15 cycles as this explodes the
|
||||
+;; state space of the automaton for little gain. It is unlikely that the
|
||||
+;; scheduler will find enough instructions to hide the full latency of the
|
||||
+;; instructions.
|
||||
(define_insn_reservation "cortex_a8_vfp_muld" 17
|
||||
(and (eq_attr "tune" "cortexa8")
|
||||
(eq_attr "type" "fmuld"))
|
||||
- "cortex_a8_vfp,cortex_a8_vfplite*16")
|
||||
+ "cortex_a8_vfp,cortex_a8_vfplite*15")
|
||||
|
||||
(define_insn_reservation "cortex_a8_vfp_macs" 21
|
||||
(and (eq_attr "tune" "cortexa8")
|
||||
(eq_attr "type" "fmacs,ffmas"))
|
||||
- "cortex_a8_vfp,cortex_a8_vfplite*20")
|
||||
+ "cortex_a8_vfp,cortex_a8_vfplite*15")
|
||||
|
||||
(define_insn_reservation "cortex_a8_vfp_macd" 26
|
||||
(and (eq_attr "tune" "cortexa8")
|
||||
(eq_attr "type" "fmacd,ffmad"))
|
||||
- "cortex_a8_vfp,cortex_a8_vfplite*25")
|
||||
+ "cortex_a8_vfp,cortex_a8_vfplite*15")
|
||||
|
||||
(define_insn_reservation "cortex_a8_vfp_divs" 37
|
||||
(and (eq_attr "tune" "cortexa8")
|
||||
(eq_attr "type" "fdivs, fsqrts"))
|
||||
- "cortex_a8_vfp,cortex_a8_vfplite*36")
|
||||
+ "cortex_a8_vfp,cortex_a8_vfplite*15")
|
||||
|
||||
(define_insn_reservation "cortex_a8_vfp_divd" 65
|
||||
(and (eq_attr "tune" "cortexa8")
|
||||
(eq_attr "type" "fdivd, fsqrtd"))
|
||||
- "cortex_a8_vfp,cortex_a8_vfplite*64")
|
||||
+ "cortex_a8_vfp,cortex_a8_vfplite*15")
|
||||
|
||||
;; Comparisons can actually take 7 cycles sometimes instead of four,
|
||||
;; but given all the other instructions lumped into type=ffarith that
|
||||
--
|
||||
2.7.4
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
From 2b4b5775554c91a63ccae4ee566db696b633652e Mon Sep 17 00:00:00 2001
|
||||
From: jcmvbkbc <jcmvbkbc@138bc75d-0d04-0410-961f-82ee72b054a4>
|
||||
Date: Wed, 10 Jun 2015 15:07:40 +0000
|
||||
Subject: [PATCH] xtensa: implement trap pattern
|
||||
|
||||
2015-06-10 Max Filippov <jcmvbkbc@gmail.com>
|
||||
gcc/
|
||||
* config/xtensa/xtensa.h (TARGET_DEBUG): New definition.
|
||||
* config/xtensa/xtensa.md (define_attr "type"): New type "trap".
|
||||
(define_insn "trap"): New definition.
|
||||
|
||||
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
|
||||
|
||||
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@224330 138bc75d-0d04-0410-961f-82ee72b054a4
|
||||
---
|
||||
gcc/config/xtensa/xtensa.h | 1 +
|
||||
gcc/config/xtensa/xtensa.md | 15 ++++++++++++++-
|
||||
2 files changed, 15 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/gcc/config/xtensa/xtensa.h b/gcc/config/xtensa/xtensa.h
|
||||
index 615f741..fb8702c 100644
|
||||
--- a/gcc/config/xtensa/xtensa.h
|
||||
+++ b/gcc/config/xtensa/xtensa.h
|
||||
@@ -67,6 +67,7 @@ extern unsigned xtensa_current_frame_size;
|
||||
#define TARGET_THREADPTR XCHAL_HAVE_THREADPTR
|
||||
#define TARGET_LOOPS XCHAL_HAVE_LOOPS
|
||||
#define TARGET_WINDOWED_ABI (XSHAL_ABI == XTHAL_ABI_WINDOWED)
|
||||
+#define TARGET_DEBUG XCHAL_HAVE_DEBUG
|
||||
|
||||
#define TARGET_DEFAULT \
|
||||
((XCHAL_HAVE_L32R ? 0 : MASK_CONST16) | \
|
||||
diff --git a/gcc/config/xtensa/xtensa.md b/gcc/config/xtensa/xtensa.md
|
||||
index 6d84384..a577aa3 100644
|
||||
--- a/gcc/config/xtensa/xtensa.md
|
||||
+++ b/gcc/config/xtensa/xtensa.md
|
||||
@@ -86,7 +86,7 @@
|
||||
;; Attributes.
|
||||
|
||||
(define_attr "type"
|
||||
- "unknown,jump,call,load,store,move,arith,multi,nop,farith,fmadd,fconv,fload,fstore,mul16,mul32,div32,mac16,rsr,wsr,entry"
|
||||
+ "unknown,jump,call,load,store,move,arith,multi,nop,farith,fmadd,fconv,fload,fstore,mul16,mul32,div32,mac16,rsr,wsr,entry,trap"
|
||||
(const_string "unknown"))
|
||||
|
||||
(define_attr "mode"
|
||||
@@ -1764,6 +1764,19 @@
|
||||
[(set_attr "length" "0")
|
||||
(set_attr "type" "nop")])
|
||||
|
||||
+(define_insn "trap"
|
||||
+ [(trap_if (const_int 1) (const_int 0))]
|
||||
+ ""
|
||||
+{
|
||||
+ if (TARGET_DEBUG)
|
||||
+ return "break\t1, 15";
|
||||
+ else
|
||||
+ return (TARGET_DENSITY ? "ill.n" : "ill");
|
||||
+}
|
||||
+ [(set_attr "type" "trap")
|
||||
+ (set_attr "mode" "none")
|
||||
+ (set_attr "length" "3")])
|
||||
+
|
||||
;; Setting up a frame pointer is tricky for Xtensa because GCC doesn't
|
||||
;; know if a frame pointer is required until the reload pass, and
|
||||
;; because there may be an incoming argument value in the hard frame
|
||||
--
|
||||
2.1.4
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
From e178289a12a829ec47dc5038d91401f65381e71d Mon Sep 17 00:00:00 2001
|
||||
From: Max Filippov <jcmvbkbc@gmail.com>
|
||||
Date: Tue, 29 Nov 2016 13:09:17 -0800
|
||||
Subject: [PATCH 8/8] xtensa: Fix PR target/78603
|
||||
|
||||
2016-11-29 Max Filippov <jcmvbkbc@gmail.com>
|
||||
gcc/
|
||||
* config/xtensa/xtensa.c (hwloop_optimize): Don't emit zero
|
||||
overhead loop start between a call and its CALL_ARG_LOCATION
|
||||
note.
|
||||
|
||||
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
|
||||
---
|
||||
Backported from: r242979
|
||||
|
||||
gcc/config/xtensa/xtensa.c | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/gcc/config/xtensa/xtensa.c b/gcc/config/xtensa/xtensa.c
|
||||
index 206ff80..36ab1e3 100644
|
||||
--- a/gcc/config/xtensa/xtensa.c
|
||||
+++ b/gcc/config/xtensa/xtensa.c
|
||||
@@ -4182,7 +4182,10 @@ hwloop_optimize (hwloop_info loop)
|
||||
entry_after = BB_END (entry_bb);
|
||||
while (DEBUG_INSN_P (entry_after)
|
||||
|| (NOTE_P (entry_after)
|
||||
- && NOTE_KIND (entry_after) != NOTE_INSN_BASIC_BLOCK))
|
||||
+ && NOTE_KIND (entry_after) != NOTE_INSN_BASIC_BLOCK
|
||||
+ /* Make sure we don't split a call and its corresponding
|
||||
+ CALL_ARG_LOCATION note. */
|
||||
+ && NOTE_KIND (entry_after) != NOTE_INSN_CALL_ARG_LOCATION))
|
||||
entry_after = PREV_INSN (entry_after);
|
||||
|
||||
emit_insn_after (seq, entry_after);
|
||||
--
|
||||
2.1.4
|
||||
|
||||
@@ -0,0 +1,103 @@
|
||||
From 920a898d2a04933c13eb808a513bc5822e91f70a Mon Sep 17 00:00:00 2001
|
||||
From: sandra <sandra@138bc75d-0d04-0410-961f-82ee72b054a4>
|
||||
Date: Tue, 12 May 2015 15:57:22 +0000
|
||||
Subject: [PATCH] gcc/nios2: Add IJMP_REGS enum
|
||||
|
||||
2015-05-12 Chung-Lin Tang <cltang@codesourcery.com>
|
||||
Sandra Loosemore <sandra@codesourcery.com>
|
||||
|
||||
gcc/
|
||||
* config/nios2/nios2.h (enum reg_class): Add IJMP_REGS enum
|
||||
value.
|
||||
(REG_CLASS_NAMES): Add "IJMP_REGS".
|
||||
(REG_CLASS_CONTENTS): Add new entry for IJMP_REGS.
|
||||
* config/nios2/nios2.md (indirect_jump,*tablejump): Adjust to
|
||||
use new "c" register constraint.
|
||||
* config/nios2/constraint.md (c): New register constraint
|
||||
corresponding to IJMP_REGS.
|
||||
|
||||
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@223082 138bc75d-0d04-0410-961f-82ee72b054a4
|
||||
|
||||
[Romain: rebase on gcc 5.4]
|
||||
Signed-off-by: Romain Naour <romain.naour@gmail.com>
|
||||
---
|
||||
gcc/config/nios2/constraints.md | 3 +++
|
||||
gcc/config/nios2/nios2.h | 11 +++++++----
|
||||
gcc/config/nios2/nios2.md | 4 ++--
|
||||
3 files changed, 12 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/gcc/config/nios2/constraints.md b/gcc/config/nios2/constraints.md
|
||||
index f4bd9f7..735f892 100644
|
||||
--- a/gcc/config/nios2/constraints.md
|
||||
+++ b/gcc/config/nios2/constraints.md
|
||||
@@ -39,6 +39,9 @@
|
||||
|
||||
;; Register constraints
|
||||
|
||||
+(define_register_constraint "c" "IJMP_REGS"
|
||||
+ "A register suitable for an indirect jump.")
|
||||
+
|
||||
(define_register_constraint "j" "SIB_REGS"
|
||||
"A register suitable for an indirect sibcall.")
|
||||
|
||||
diff --git a/gcc/config/nios2/nios2.h b/gcc/config/nios2/nios2.h
|
||||
index 117983d..7c329ae 100644
|
||||
--- a/gcc/config/nios2/nios2.h
|
||||
+++ b/gcc/config/nios2/nios2.h
|
||||
@@ -173,6 +173,7 @@ enum reg_class
|
||||
{
|
||||
NO_REGS,
|
||||
SIB_REGS,
|
||||
+ IJMP_REGS,
|
||||
GP_REGS,
|
||||
ALL_REGS,
|
||||
LIM_REG_CLASSES
|
||||
@@ -183,6 +184,7 @@ enum reg_class
|
||||
#define REG_CLASS_NAMES \
|
||||
{ "NO_REGS", \
|
||||
"SIB_REGS", \
|
||||
+ "IJMP_REGS", \
|
||||
"GP_REGS", \
|
||||
"ALL_REGS" }
|
||||
|
||||
@@ -190,10 +192,11 @@ enum reg_class
|
||||
|
||||
#define REG_CLASS_CONTENTS \
|
||||
{ \
|
||||
- /* NO_REGS */ { 0, 0}, \
|
||||
- /* SIB_REGS */ { 0xfe0c, 0}, \
|
||||
- /* GP_REGS */ {~0, 0}, \
|
||||
- /* ALL_REGS */ {~0,~0} \
|
||||
+ /* NO_REGS */ { 0, 0}, \
|
||||
+ /* SIB_REGS */ { 0xfe0c, 0}, \
|
||||
+ /* IJMP_REGS */ { 0x7fffffff, 0}, \
|
||||
+ /* GP_REGS */ {~0, 0}, \
|
||||
+ /* ALL_REGS */ {~0,~0} \
|
||||
}
|
||||
|
||||
|
||||
diff --git a/gcc/config/nios2/nios2.md b/gcc/config/nios2/nios2.md
|
||||
index 7b35d269..36ef101 100644
|
||||
--- a/gcc/config/nios2/nios2.md
|
||||
+++ b/gcc/config/nios2/nios2.md
|
||||
@@ -697,7 +697,7 @@
|
||||
; check or adjust for overflow.
|
||||
|
||||
(define_insn "indirect_jump"
|
||||
- [(set (pc) (match_operand:SI 0 "register_operand" "r"))]
|
||||
+ [(set (pc) (match_operand:SI 0 "register_operand" "c"))]
|
||||
""
|
||||
"jmp\\t%0"
|
||||
[(set_attr "type" "control")])
|
||||
@@ -811,7 +811,7 @@
|
||||
|
||||
(define_insn "*tablejump"
|
||||
[(set (pc)
|
||||
- (match_operand:SI 0 "register_operand" "r"))
|
||||
+ (match_operand:SI 0 "register_operand" "c"))
|
||||
(use (label_ref (match_operand 1 "" "")))]
|
||||
""
|
||||
"jmp\\t%0"
|
||||
--
|
||||
2.5.5
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
Add dynamic linker support for uClibc
|
||||
|
||||
Signed-off-by: Waldemar Brodkorb <wbx@uclibc-ng.org>
|
||||
|
||||
diff -Nur gcc-5.3.0.orig/gcc/config/microblaze/linux.h gcc-5.3.0/gcc/config/microblaze/linux.h
|
||||
--- gcc-5.3.0.orig/gcc/config/microblaze/linux.h 2015-05-28 16:08:19.000000000 +0200
|
||||
+++ gcc-5.3.0/gcc/config/microblaze/linux.h 2016-05-13 09:21:01.579262885 +0200
|
||||
@@ -28,7 +28,15 @@
|
||||
#undef TLS_NEEDS_GOT
|
||||
#define TLS_NEEDS_GOT 1
|
||||
|
||||
-#define DYNAMIC_LINKER "/lib/ld.so.1"
|
||||
+#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
|
||||
+#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
|
||||
+
|
||||
+#if DEFAULT_LIBC == LIBC_UCLIBC
|
||||
+#define DYNAMIC_LINKER UCLIBC_DYNAMIC_LINKER
|
||||
+#else
|
||||
+#define DYNAMIC_LINKER GLIBC_DYNAMIC_LINKER
|
||||
+#endif
|
||||
+
|
||||
#undef SUBTARGET_EXTRA_SPECS
|
||||
#define SUBTARGET_EXTRA_SPECS \
|
||||
{ "dynamic_linker", DYNAMIC_LINKER }
|
||||
@@ -0,0 +1,36 @@
|
||||
Add dynamic linker support for uClibc-ng/musl
|
||||
|
||||
Signed-off-by: Waldemar Brodkorb <wbx@uclibc-ng.org>
|
||||
|
||||
|
||||
diff -Nur gcc-5.4.0.orig/gcc/config/microblaze/linux.h gcc-5.4.0/gcc/config/microblaze/linux.h
|
||||
--- gcc-5.4.0.orig/gcc/config/microblaze/linux.h 2015-05-28 16:08:19.000000000 +0200
|
||||
+++ gcc-5.4.0/gcc/config/microblaze/linux.h 2016-10-23 17:09:46.962010871 +0200
|
||||
@@ -28,7 +28,26 @@
|
||||
#undef TLS_NEEDS_GOT
|
||||
#define TLS_NEEDS_GOT 1
|
||||
|
||||
-#define DYNAMIC_LINKER "/lib/ld.so.1"
|
||||
+#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
|
||||
+#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
|
||||
+
|
||||
+#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"
|
||||
+
|
||||
+#if DEFAULT_LIBC == LIBC_UCLIBC
|
||||
+#define DYNAMIC_LINKER UCLIBC_DYNAMIC_LINKER
|
||||
+#elif 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 }
|
||||
75
bsp/buildroot/package/gcc/5.4.0/911-ppc-musl-support.patch
Normal file
75
bsp/buildroot/package/gcc/5.4.0/911-ppc-musl-support.patch
Normal file
@@ -0,0 +1,75 @@
|
||||
Add support for musl on ppc32
|
||||
|
||||
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
|
||||
|
||||
diff -Nur gcc-5.4.0.orig/gcc/config/rs6000/sysv4.h gcc-5.4.0/gcc/config/rs6000/sysv4.h
|
||||
--- gcc-5.4.0.orig/gcc/config/rs6000/sysv4.h 2015-09-24 15:46:45.000000000 +0200
|
||||
+++ gcc-5.4.0/gcc/config/rs6000/sysv4.h 2016-11-27 13:12:33.226953738 +0100
|
||||
@@ -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. */
|
||||
#undef CC1_SPEC
|
||||
@@ -757,17 +760,23 @@
|
||||
|
||||
#define LINK_START_LINUX_SPEC ""
|
||||
|
||||
+#define MUSL_DYNAMIC_LINKER_E ENDIAN_SELECT("","le","")
|
||||
+
|
||||
#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" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.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} \
|
||||
@@ -889,6 +898,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 }, \
|
||||
diff -Nur gcc-5.4.0.orig/gcc/config/rs6000/sysv4le.h gcc-5.4.0/gcc/config/rs6000/sysv4le.h
|
||||
--- gcc-5.4.0.orig/gcc/config/rs6000/sysv4le.h 2015-09-24 15:46:45.000000000 +0200
|
||||
+++ gcc-5.4.0/gcc/config/rs6000/sysv4le.h 2016-11-27 13:12:33.226953738 +0100
|
||||
@@ -31,3 +31,5 @@
|
||||
/* Little-endian PowerPC64 Linux uses the ELF v2 ABI by default. */
|
||||
#define LINUX64_DEFAULT_ABI_ELFv2
|
||||
|
||||
+#undef MUSL_DYNAMIC_LINKER_E
|
||||
+#define MUSL_DYNAMIC_LINKER_E ENDIAN_SELECT("","le","le")
|
||||
diff -Nur gcc-5.4.0.orig/gcc/config.gcc gcc-5.4.0/gcc/config.gcc
|
||||
--- gcc-5.4.0.orig/gcc/config.gcc 2015-09-10 16:17:53.000000000 +0200
|
||||
+++ gcc-5.4.0/gcc/config.gcc 2016-11-27 13:14:17.149638148 +0100
|
||||
@@ -2413,6 +2413,10 @@
|
||||
powerpc*-*-linux*paired*)
|
||||
tm_file="${tm_file} rs6000/750cl.h" ;;
|
||||
esac
|
||||
+ case ${target} in
|
||||
+ powerpc*-*-linux*-musl*)
|
||||
+ enable_secureplt=yes ;;
|
||||
+ esac
|
||||
if test x${enable_secureplt} = xyes; then
|
||||
tm_file="rs6000/secureplt.h ${tm_file}"
|
||||
fi
|
||||
@@ -0,0 +1,43 @@
|
||||
From 83717065090bb8b954556d1216dd9dc397dc0243 Mon Sep 17 00:00:00 2001
|
||||
From: nsz <nsz@138bc75d-0d04-0410-961f-82ee72b054a4>
|
||||
Date: Thu, 25 Aug 2016 14:13:02 +0000
|
||||
Subject: [PATCH] [mips] Add support for mips*r6-*-musl
|
||||
|
||||
gcc/
|
||||
* config/mips/linux.h (MUSL_DYNAMIC_LINKER32): Update.
|
||||
(MUSL_DYNAMIC_LINKER64, MUSL_DYNAMIC_LINKERN32): Update.
|
||||
|
||||
|
||||
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@239760 138bc75d-0d04-0410-961f-82ee72b054a4
|
||||
|
||||
[Vincent: tweak to not patch ChangeLog]
|
||||
|
||||
Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
|
||||
---
|
||||
gcc/config/mips/linux.h | 9 ++++++---
|
||||
1 files changed, 6 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/gcc/config/mips/linux.h b/gcc/config/mips/linux.h
|
||||
index fa253b6..dc51c45 100644
|
||||
--- a/gcc/config/mips/linux.h
|
||||
+++ b/gcc/config/mips/linux.h
|
||||
@@ -38,10 +38,13 @@ along with GCC; see the file COPYING3. If not see
|
||||
"%{mnan=2008:/lib32/ld-uClibc-mipsn8.so.0;:/lib32/ld-uClibc.so.0}"
|
||||
|
||||
#undef MUSL_DYNAMIC_LINKER32
|
||||
-#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-mips%{EL:el}%{msoft-float:-sf}.so.1"
|
||||
+#define MUSL_DYNAMIC_LINKER32 \
|
||||
+ "/lib/ld-musl-mips%{mips32r6|mips64r6:r6}%{EL:el}%{msoft-float:-sf}.so.1"
|
||||
#undef MUSL_DYNAMIC_LINKER64
|
||||
-#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-mips64%{EL:el}%{msoft-float:-sf}.so.1"
|
||||
-#define MUSL_DYNAMIC_LINKERN32 "/lib/ld-musl-mipsn32%{EL:el}%{msoft-float:-sf}.so.1"
|
||||
+#define MUSL_DYNAMIC_LINKER64 \
|
||||
+ "/lib/ld-musl-mips64%{mips64r6:r6}%{EL:el}%{msoft-float:-sf}.so.1"
|
||||
+#define MUSL_DYNAMIC_LINKERN32 \
|
||||
+ "/lib/ld-musl-mipsn32%{mips64r6:r6}%{EL:el}%{msoft-float:-sf}.so.1"
|
||||
|
||||
#define BIONIC_DYNAMIC_LINKERN32 "/system/bin/linker32"
|
||||
#define GNU_USER_DYNAMIC_LINKERN32 \
|
||||
--
|
||||
2.10.0
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
From 07453188b18a2cbe815917dbb893b4ebfdd793b6 Mon Sep 17 00:00:00 2001
|
||||
From: ktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4>
|
||||
Date: Fri, 26 Aug 2016 10:23:20 +0000
|
||||
Subject: [PATCH] [ARM] PR target/70473: Reduce size of Cortex-A8 automaton
|
||||
|
||||
PR target/70473
|
||||
* config/arm/cortex-a8-neon.md (cortex_a8_vfp_muld): Reduce
|
||||
reservation duration to 15 cycles.
|
||||
(cortex_a8_vfp_macs): Likewise.
|
||||
(cortex_a8_vfp_macd): Likewise.
|
||||
(cortex_a8_vfp_divs): Likewise.
|
||||
(cortex_a8_vfp_divd): Likewise.
|
||||
|
||||
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@239772
|
||||
138bc75d-0d04-0410-961f-82ee72b054a4
|
||||
|
||||
[Backport from gcc upstream commit 79f5d5e3cd5a668d5ecb2b6b0cce80ef5706ac53.]
|
||||
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
||||
---
|
||||
gcc/config/arm/cortex-a8-neon.md | 14 +++++++++-----
|
||||
1 file changed, 9 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/gcc/config/arm/cortex-a8-neon.md b/gcc/config/arm/cortex-a8-neon.md
|
||||
index 45f861f..b16c299 100644
|
||||
--- a/gcc/config/arm/cortex-a8-neon.md
|
||||
+++ b/gcc/config/arm/cortex-a8-neon.md
|
||||
@@ -357,30 +357,34 @@
|
||||
(eq_attr "type" "fmuls"))
|
||||
"cortex_a8_vfp,cortex_a8_vfplite*11")
|
||||
|
||||
+;; Don't model a reservation for more than 15 cycles as this explodes the
|
||||
+;; state space of the automaton for little gain. It is unlikely that the
|
||||
+;; scheduler will find enough instructions to hide the full latency of the
|
||||
+;; instructions.
|
||||
(define_insn_reservation "cortex_a8_vfp_muld" 17
|
||||
(and (eq_attr "tune" "cortexa8")
|
||||
(eq_attr "type" "fmuld"))
|
||||
- "cortex_a8_vfp,cortex_a8_vfplite*16")
|
||||
+ "cortex_a8_vfp,cortex_a8_vfplite*15")
|
||||
|
||||
(define_insn_reservation "cortex_a8_vfp_macs" 21
|
||||
(and (eq_attr "tune" "cortexa8")
|
||||
(eq_attr "type" "fmacs,ffmas"))
|
||||
- "cortex_a8_vfp,cortex_a8_vfplite*20")
|
||||
+ "cortex_a8_vfp,cortex_a8_vfplite*15")
|
||||
|
||||
(define_insn_reservation "cortex_a8_vfp_macd" 26
|
||||
(and (eq_attr "tune" "cortexa8")
|
||||
(eq_attr "type" "fmacd,ffmad"))
|
||||
- "cortex_a8_vfp,cortex_a8_vfplite*25")
|
||||
+ "cortex_a8_vfp,cortex_a8_vfplite*15")
|
||||
|
||||
(define_insn_reservation "cortex_a8_vfp_divs" 37
|
||||
(and (eq_attr "tune" "cortexa8")
|
||||
(eq_attr "type" "fdivs, fsqrts"))
|
||||
- "cortex_a8_vfp,cortex_a8_vfplite*36")
|
||||
+ "cortex_a8_vfp,cortex_a8_vfplite*15")
|
||||
|
||||
(define_insn_reservation "cortex_a8_vfp_divd" 65
|
||||
(and (eq_attr "tune" "cortexa8")
|
||||
(eq_attr "type" "fdivd, fsqrtd"))
|
||||
- "cortex_a8_vfp,cortex_a8_vfplite*64")
|
||||
+ "cortex_a8_vfp,cortex_a8_vfplite*15")
|
||||
|
||||
;; Comparisons can actually take 7 cycles sometimes instead of four,
|
||||
;; but given all the other instructions lumped into type=ffarith that
|
||||
--
|
||||
2.7.4
|
||||
|
||||
@@ -0,0 +1,320 @@
|
||||
From 0d2556fa652cc85b3d042e862a38dd07d454175a Mon Sep 17 00:00:00 2001
|
||||
From: Max Filippov <jcmvbkbc@gmail.com>
|
||||
Date: Wed, 26 Oct 2016 08:02:51 +0000
|
||||
Subject: [PATCH 1/2] xtensa: Fix PR target/78118
|
||||
|
||||
It started failing after the following commit: 32e90dc6a0cda45 ("PR
|
||||
rtl-optimization/61047").
|
||||
|
||||
The change that made xtensa backend go ICE looks completely unrelated,
|
||||
and indeed, the issue is caused by the side effect of
|
||||
compute_frame_size() function call hidden in the
|
||||
INITIAL_ELIMINATION_OFFSET macro. This call updates the value of the
|
||||
xtensa_current_frame_size static variable, used in "return" instruction
|
||||
predicate. Prior to the change the value of xtensa_current_frame_size was
|
||||
set to 0 after the end of epilogue generation, which enabled the "return"
|
||||
instruction for the CALL0 ABI, but after the change the additional
|
||||
INITIAL_ELIMINATION_OFFSET calls make xtensa_current_frame_size non-zero
|
||||
and "return" pattern unavailable.
|
||||
|
||||
Get rid of the global xtensa_current_frame_size and
|
||||
xtensa_callee_save_size variables by moving them into the
|
||||
machine_function structure. Implement predicate for the "return" pattern
|
||||
as a function. Don't communicate completion of epilogue generation
|
||||
through zeroing of xtensa_current_frame_size, add explicit epilogue_done
|
||||
variable to the machine_function structure. Don't update stack frame
|
||||
layout after the completion of reload.
|
||||
|
||||
2016-10-26 Max Filippov <jcmvbkbc@gmail.com>
|
||||
gcc/
|
||||
* config/xtensa/xtensa-protos.h
|
||||
(xtensa_use_return_instruction_p): New prototype.
|
||||
* config/xtensa/xtensa.c (xtensa_current_frame_size,
|
||||
xtensa_callee_save_size): Remove.
|
||||
(struct machine_function): Add new fields: current_frame_size,
|
||||
callee_save_size, frame_laid_out and epilogue_done.
|
||||
(compute_frame_size, xtensa_expand_prologue,
|
||||
xtensa_expand_epilogue): Replace xtensa_callee_save_size with
|
||||
cfun->machine->callee_save_size and xtensa_current_frame_size
|
||||
with cfun->machine->current_frame_size.
|
||||
(compute_frame_size): Update cfun->machine->frame_laid_out and
|
||||
don't update frame layout after reload completion.
|
||||
(xtensa_expand_epilogue): Set cfun->machine->epilogue_done
|
||||
instead of zeroing xtensa_current_frame_size.
|
||||
(xtensa_use_return_instruction_p): New function.
|
||||
* config/xtensa/xtensa.h (xtensa_current_frame_size): Remove
|
||||
declaration.
|
||||
(INITIAL_ELIMINATION_OFFSET): Use return value of
|
||||
compute_frame_size instead of xtensa_current_frame_size value.
|
||||
* config/xtensa/xtensa.md ("return" pattern): Use new predicate
|
||||
function xtensa_use_return_instruction_p instead of inline code.
|
||||
|
||||
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
|
||||
---
|
||||
Backported from: r241748
|
||||
|
||||
gcc/config/xtensa/xtensa-protos.h | 1 +
|
||||
gcc/config/xtensa/xtensa.c | 82 ++++++++++++++++++++++++---------------
|
||||
gcc/config/xtensa/xtensa.h | 6 +--
|
||||
gcc/config/xtensa/xtensa.md | 2 +-
|
||||
4 files changed, 55 insertions(+), 36 deletions(-)
|
||||
|
||||
diff --git a/gcc/config/xtensa/xtensa-protos.h b/gcc/config/xtensa/xtensa-protos.h
|
||||
index f2ca526..873557f 100644
|
||||
--- a/gcc/config/xtensa/xtensa-protos.h
|
||||
+++ b/gcc/config/xtensa/xtensa-protos.h
|
||||
@@ -68,6 +68,7 @@ extern rtx xtensa_return_addr (int, rtx);
|
||||
extern void xtensa_setup_frame_addresses (void);
|
||||
extern int xtensa_dbx_register_number (int);
|
||||
extern long compute_frame_size (int);
|
||||
+extern bool xtensa_use_return_instruction_p (void);
|
||||
extern void xtensa_expand_prologue (void);
|
||||
extern void xtensa_expand_epilogue (void);
|
||||
extern void order_regs_for_local_alloc (void);
|
||||
diff --git a/gcc/config/xtensa/xtensa.c b/gcc/config/xtensa/xtensa.c
|
||||
index 64d089b..e49f784 100644
|
||||
--- a/gcc/config/xtensa/xtensa.c
|
||||
+++ b/gcc/config/xtensa/xtensa.c
|
||||
@@ -78,11 +78,6 @@ enum internal_test
|
||||
can support a given mode. */
|
||||
char xtensa_hard_regno_mode_ok[(int) MAX_MACHINE_MODE][FIRST_PSEUDO_REGISTER];
|
||||
|
||||
-/* Current frame size calculated by compute_frame_size. */
|
||||
-unsigned xtensa_current_frame_size;
|
||||
-/* Callee-save area size in the current frame calculated by compute_frame_size. */
|
||||
-int xtensa_callee_save_size;
|
||||
-
|
||||
/* Largest block move to handle in-line. */
|
||||
#define LARGEST_MOVE_RATIO 15
|
||||
|
||||
@@ -94,6 +89,13 @@ struct GTY(()) machine_function
|
||||
bool vararg_a7;
|
||||
rtx vararg_a7_copy;
|
||||
rtx_insn *set_frame_ptr_insn;
|
||||
+ /* Current frame size calculated by compute_frame_size. */
|
||||
+ unsigned current_frame_size;
|
||||
+ /* Callee-save area size in the current frame calculated by
|
||||
+ compute_frame_size. */
|
||||
+ int callee_save_size;
|
||||
+ bool frame_laid_out;
|
||||
+ bool epilogue_done;
|
||||
};
|
||||
|
||||
/* Vector, indexed by hard register number, which contains 1 for a
|
||||
@@ -2628,24 +2630,29 @@ compute_frame_size (int size)
|
||||
{
|
||||
int regno;
|
||||
|
||||
+ if (reload_completed && cfun->machine->frame_laid_out)
|
||||
+ return cfun->machine->current_frame_size;
|
||||
+
|
||||
/* Add space for the incoming static chain value. */
|
||||
if (cfun->static_chain_decl != NULL)
|
||||
size += (1 * UNITS_PER_WORD);
|
||||
|
||||
- xtensa_callee_save_size = 0;
|
||||
+ cfun->machine->callee_save_size = 0;
|
||||
for (regno = 0; regno < FIRST_PSEUDO_REGISTER; ++regno)
|
||||
{
|
||||
if (xtensa_call_save_reg(regno))
|
||||
- xtensa_callee_save_size += UNITS_PER_WORD;
|
||||
+ cfun->machine->callee_save_size += UNITS_PER_WORD;
|
||||
}
|
||||
|
||||
- xtensa_current_frame_size =
|
||||
+ cfun->machine->current_frame_size =
|
||||
XTENSA_STACK_ALIGN (size
|
||||
- + xtensa_callee_save_size
|
||||
+ + cfun->machine->callee_save_size
|
||||
+ crtl->outgoing_args_size
|
||||
+ (WINDOW_SIZE * UNITS_PER_WORD));
|
||||
- xtensa_callee_save_size = XTENSA_STACK_ALIGN (xtensa_callee_save_size);
|
||||
- return xtensa_current_frame_size;
|
||||
+ cfun->machine->callee_save_size =
|
||||
+ XTENSA_STACK_ALIGN (cfun->machine->callee_save_size);
|
||||
+ cfun->machine->frame_laid_out = true;
|
||||
+ return cfun->machine->current_frame_size;
|
||||
}
|
||||
|
||||
|
||||
@@ -2696,6 +2703,7 @@ xtensa_expand_prologue (void)
|
||||
{
|
||||
int regno;
|
||||
HOST_WIDE_INT offset = 0;
|
||||
+ int callee_save_size = cfun->machine->callee_save_size;
|
||||
|
||||
/* -128 is a limit of single addi instruction. */
|
||||
if (total_size > 0 && total_size <= 128)
|
||||
@@ -2709,7 +2717,7 @@ xtensa_expand_prologue (void)
|
||||
add_reg_note (insn, REG_FRAME_RELATED_EXPR, note_rtx);
|
||||
offset = total_size - UNITS_PER_WORD;
|
||||
}
|
||||
- else if (xtensa_callee_save_size)
|
||||
+ else if (callee_save_size)
|
||||
{
|
||||
/* 1020 is maximal s32i offset, if the frame is bigger than that
|
||||
* we move sp to the end of callee-saved save area, save and then
|
||||
@@ -2717,13 +2725,13 @@ xtensa_expand_prologue (void)
|
||||
if (total_size > 1024)
|
||||
{
|
||||
insn = emit_insn (gen_addsi3 (stack_pointer_rtx, stack_pointer_rtx,
|
||||
- GEN_INT (-xtensa_callee_save_size)));
|
||||
+ GEN_INT (-callee_save_size)));
|
||||
RTX_FRAME_RELATED_P (insn) = 1;
|
||||
note_rtx = gen_rtx_SET (stack_pointer_rtx,
|
||||
plus_constant (Pmode, stack_pointer_rtx,
|
||||
- -xtensa_callee_save_size));
|
||||
+ -callee_save_size));
|
||||
add_reg_note (insn, REG_FRAME_RELATED_EXPR, note_rtx);
|
||||
- offset = xtensa_callee_save_size - UNITS_PER_WORD;
|
||||
+ offset = callee_save_size - UNITS_PER_WORD;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2759,13 +2767,13 @@ xtensa_expand_prologue (void)
|
||||
{
|
||||
rtx tmp_reg = gen_rtx_REG (Pmode, A9_REG);
|
||||
emit_move_insn (tmp_reg, GEN_INT (total_size -
|
||||
- xtensa_callee_save_size));
|
||||
+ callee_save_size));
|
||||
insn = emit_insn (gen_subsi3 (stack_pointer_rtx,
|
||||
stack_pointer_rtx, tmp_reg));
|
||||
RTX_FRAME_RELATED_P (insn) = 1;
|
||||
note_rtx = gen_rtx_SET (stack_pointer_rtx,
|
||||
plus_constant (Pmode, stack_pointer_rtx,
|
||||
- xtensa_callee_save_size -
|
||||
+ callee_save_size -
|
||||
total_size));
|
||||
add_reg_note (insn, REG_FRAME_RELATED_EXPR, note_rtx);
|
||||
}
|
||||
@@ -2833,21 +2841,21 @@ xtensa_expand_epilogue (void)
|
||||
int regno;
|
||||
HOST_WIDE_INT offset;
|
||||
|
||||
- if (xtensa_current_frame_size > (frame_pointer_needed ? 127 : 1024))
|
||||
+ if (cfun->machine->current_frame_size > (frame_pointer_needed ? 127 : 1024))
|
||||
{
|
||||
rtx tmp_reg = gen_rtx_REG (Pmode, A9_REG);
|
||||
- emit_move_insn (tmp_reg, GEN_INT (xtensa_current_frame_size -
|
||||
- xtensa_callee_save_size));
|
||||
+ emit_move_insn (tmp_reg, GEN_INT (cfun->machine->current_frame_size -
|
||||
+ cfun->machine->callee_save_size));
|
||||
emit_insn (gen_addsi3 (stack_pointer_rtx, frame_pointer_needed ?
|
||||
hard_frame_pointer_rtx : stack_pointer_rtx,
|
||||
tmp_reg));
|
||||
- offset = xtensa_callee_save_size - UNITS_PER_WORD;
|
||||
+ offset = cfun->machine->callee_save_size - UNITS_PER_WORD;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (frame_pointer_needed)
|
||||
emit_move_insn (stack_pointer_rtx, hard_frame_pointer_rtx);
|
||||
- offset = xtensa_current_frame_size - UNITS_PER_WORD;
|
||||
+ offset = cfun->machine->current_frame_size - UNITS_PER_WORD;
|
||||
}
|
||||
|
||||
/* Prevent reordering of saved a0 update and loading it back from
|
||||
@@ -2867,16 +2875,16 @@ xtensa_expand_epilogue (void)
|
||||
}
|
||||
}
|
||||
|
||||
- if (xtensa_current_frame_size > 0)
|
||||
+ if (cfun->machine->current_frame_size > 0)
|
||||
{
|
||||
if (frame_pointer_needed || /* always reachable with addi */
|
||||
- xtensa_current_frame_size > 1024 ||
|
||||
- xtensa_current_frame_size <= 127)
|
||||
+ cfun->machine->current_frame_size > 1024 ||
|
||||
+ cfun->machine->current_frame_size <= 127)
|
||||
{
|
||||
- if (xtensa_current_frame_size <= 127)
|
||||
- offset = xtensa_current_frame_size;
|
||||
+ if (cfun->machine->current_frame_size <= 127)
|
||||
+ offset = cfun->machine->current_frame_size;
|
||||
else
|
||||
- offset = xtensa_callee_save_size;
|
||||
+ offset = cfun->machine->callee_save_size;
|
||||
|
||||
emit_insn (gen_addsi3 (stack_pointer_rtx,
|
||||
stack_pointer_rtx,
|
||||
@@ -2885,7 +2893,8 @@ xtensa_expand_epilogue (void)
|
||||
else
|
||||
{
|
||||
rtx tmp_reg = gen_rtx_REG (Pmode, A9_REG);
|
||||
- emit_move_insn (tmp_reg, GEN_INT (xtensa_current_frame_size));
|
||||
+ emit_move_insn (tmp_reg,
|
||||
+ GEN_INT (cfun->machine->current_frame_size));
|
||||
emit_insn (gen_addsi3 (stack_pointer_rtx, stack_pointer_rtx,
|
||||
tmp_reg));
|
||||
}
|
||||
@@ -2896,11 +2905,22 @@ xtensa_expand_epilogue (void)
|
||||
stack_pointer_rtx,
|
||||
EH_RETURN_STACKADJ_RTX));
|
||||
}
|
||||
- xtensa_current_frame_size = 0;
|
||||
- xtensa_callee_save_size = 0;
|
||||
+ cfun->machine->epilogue_done = true;
|
||||
emit_jump_insn (gen_return ());
|
||||
}
|
||||
|
||||
+bool
|
||||
+xtensa_use_return_instruction_p (void)
|
||||
+{
|
||||
+ if (!reload_completed)
|
||||
+ return false;
|
||||
+ if (TARGET_WINDOWED_ABI)
|
||||
+ return true;
|
||||
+ if (compute_frame_size (get_frame_size ()) == 0)
|
||||
+ return true;
|
||||
+ return cfun->machine->epilogue_done;
|
||||
+}
|
||||
+
|
||||
void
|
||||
xtensa_set_return_address (rtx address, rtx scratch)
|
||||
{
|
||||
diff --git a/gcc/config/xtensa/xtensa.h b/gcc/config/xtensa/xtensa.h
|
||||
index 82e9900..58eb1b2 100644
|
||||
--- a/gcc/config/xtensa/xtensa.h
|
||||
+++ b/gcc/config/xtensa/xtensa.h
|
||||
@@ -23,8 +23,6 @@ along with GCC; see the file COPYING3. If not see
|
||||
|
||||
/* External variables defined in xtensa.c. */
|
||||
|
||||
-extern unsigned xtensa_current_frame_size;
|
||||
-
|
||||
/* Macros used in the machine description to select various Xtensa
|
||||
configuration options. */
|
||||
#ifndef XCHAL_HAVE_MUL32_HIGH
|
||||
@@ -477,14 +475,14 @@ enum reg_class
|
||||
/* Specify the initial difference between the specified pair of registers. */
|
||||
#define INITIAL_ELIMINATION_OFFSET(FROM, TO, OFFSET) \
|
||||
do { \
|
||||
- compute_frame_size (get_frame_size ()); \
|
||||
+ long frame_size = compute_frame_size (get_frame_size ()); \
|
||||
switch (FROM) \
|
||||
{ \
|
||||
case FRAME_POINTER_REGNUM: \
|
||||
(OFFSET) = 0; \
|
||||
break; \
|
||||
case ARG_POINTER_REGNUM: \
|
||||
- (OFFSET) = xtensa_current_frame_size; \
|
||||
+ (OFFSET) = frame_size; \
|
||||
break; \
|
||||
default: \
|
||||
gcc_unreachable (); \
|
||||
diff --git a/gcc/config/xtensa/xtensa.md b/gcc/config/xtensa/xtensa.md
|
||||
index db54a12..fcdb6c8 100644
|
||||
--- a/gcc/config/xtensa/xtensa.md
|
||||
+++ b/gcc/config/xtensa/xtensa.md
|
||||
@@ -1663,7 +1663,7 @@
|
||||
(define_insn "return"
|
||||
[(return)
|
||||
(use (reg:SI A0_REG))]
|
||||
- "(TARGET_WINDOWED_ABI || !xtensa_current_frame_size) && reload_completed"
|
||||
+ "xtensa_use_return_instruction_p ()"
|
||||
{
|
||||
return TARGET_WINDOWED_ABI ?
|
||||
(TARGET_DENSITY ? "retw.n" : "retw") :
|
||||
--
|
||||
2.1.4
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
From 59cce7b304a8cbbb508ba21ab2f9052d3ee9a9e3 Mon Sep 17 00:00:00 2001
|
||||
From: Max Filippov <jcmvbkbc@gmail.com>
|
||||
Date: Tue, 29 Nov 2016 13:09:17 -0800
|
||||
Subject: [PATCH 2/2] xtensa: Fix PR target/78603
|
||||
|
||||
2016-11-29 Max Filippov <jcmvbkbc@gmail.com>
|
||||
gcc/
|
||||
* config/xtensa/xtensa.c (hwloop_optimize): Don't emit zero
|
||||
overhead loop start between a call and its CALL_ARG_LOCATION
|
||||
note.
|
||||
|
||||
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
|
||||
---
|
||||
Backported from: r242979
|
||||
|
||||
gcc/config/xtensa/xtensa.c | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/gcc/config/xtensa/xtensa.c b/gcc/config/xtensa/xtensa.c
|
||||
index e49f784..70f698a 100644
|
||||
--- a/gcc/config/xtensa/xtensa.c
|
||||
+++ b/gcc/config/xtensa/xtensa.c
|
||||
@@ -4158,7 +4158,10 @@ hwloop_optimize (hwloop_info loop)
|
||||
entry_after = BB_END (entry_bb);
|
||||
while (DEBUG_INSN_P (entry_after)
|
||||
|| (NOTE_P (entry_after)
|
||||
- && NOTE_KIND (entry_after) != NOTE_INSN_BASIC_BLOCK))
|
||||
+ && NOTE_KIND (entry_after) != NOTE_INSN_BASIC_BLOCK
|
||||
+ /* Make sure we don't split a call and its corresponding
|
||||
+ CALL_ARG_LOCATION note. */
|
||||
+ && NOTE_KIND (entry_after) != NOTE_INSN_CALL_ARG_LOCATION))
|
||||
entry_after = PREV_INSN (entry_after);
|
||||
|
||||
emit_insn_after (seq, entry_after);
|
||||
--
|
||||
2.1.4
|
||||
|
||||
@@ -35,23 +35,9 @@ version information for Blackfin, instead of using a custom one.
|
||||
|
||||
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
||||
---
|
||||
libgcc/ChangeLog | 5 +++++
|
||||
libgcc/mkmap-symver.awk | 6 +++++-
|
||||
2 files changed, 10 insertions(+), 1 deletion(-)
|
||||
1 file changed, 5 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog
|
||||
index 6559564..129e43f 100644
|
||||
--- a/libgcc/ChangeLog
|
||||
+++ b/libgcc/ChangeLog
|
||||
@@ -1,3 +1,8 @@
|
||||
+2016-08-19 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
||||
+
|
||||
+ PR gcc/74748
|
||||
+ * libgcc/mkmap-symver.awk: add support for skip_underscore
|
||||
+
|
||||
2016-04-27 Release Manager
|
||||
|
||||
* GCC 6.1.0 released.
|
||||
diff --git a/libgcc/mkmap-symver.awk b/libgcc/mkmap-symver.awk
|
||||
index 266832a..30bb179 100644
|
||||
--- a/libgcc/mkmap-symver.awk
|
||||
@@ -22,28 +22,10 @@ symbols in libgcc, and therefore all libgcc symbols were marked as
|
||||
|
||||
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
||||
---
|
||||
libgcc/ChangeLog | 6 +
|
||||
libgcc/config/bfin/libgcc-glibc.ver | 1894 +----------------------------------
|
||||
libgcc/config/bfin/t-linux | 3 +-
|
||||
3 files changed, 10 insertions(+), 1893 deletions(-)
|
||||
2 files changed, 4 insertions(+), 1893 deletions(-)
|
||||
|
||||
diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog
|
||||
index 129e43f..36c0194 100644
|
||||
--- a/libgcc/ChangeLog
|
||||
+++ b/libgcc/ChangeLog
|
||||
@@ -1,6 +1,12 @@
|
||||
2016-08-19 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
||||
|
||||
PR gcc/74748
|
||||
+ * libgcc/config/bfin/libgcc-glibc.ver, libgcc/config/bfin/t-linux:
|
||||
+ use generic linker version information on Blackfin.
|
||||
+
|
||||
+2016-08-19 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
||||
+
|
||||
+ PR gcc/74748
|
||||
* libgcc/mkmap-symver.awk: add support for skip_underscore
|
||||
|
||||
2016-04-27 Release Manager
|
||||
diff --git a/libgcc/config/bfin/libgcc-glibc.ver b/libgcc/config/bfin/libgcc-glibc.ver
|
||||
index b1bd2df..2af3df7 100644
|
||||
--- a/libgcc/config/bfin/libgcc-glibc.ver
|
||||
@@ -17,23 +17,9 @@ Fixes PR gcc/68468.
|
||||
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
|
||||
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
||||
---
|
||||
libgcc/ChangeLog | 5 +++++
|
||||
libgcc/unwind-dw2-fde-dip.c | 8 ++++++--
|
||||
2 files changed, 11 insertions(+), 2 deletions(-)
|
||||
1 file changed, 6 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog
|
||||
index 36c0194..2e78d20 100644
|
||||
--- a/libgcc/ChangeLog
|
||||
+++ b/libgcc/ChangeLog
|
||||
@@ -1,3 +1,8 @@
|
||||
+2016-08-19 Waldemar Brodkorb <wbx@openadk.org>
|
||||
+
|
||||
+ PR gcc/68468
|
||||
+ * libgcc/unwind-dw2-fde-dip.c: fix build on FDPIC targets.
|
||||
+
|
||||
2016-08-19 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
||||
|
||||
PR gcc/74748
|
||||
diff --git a/libgcc/unwind-dw2-fde-dip.c b/libgcc/unwind-dw2-fde-dip.c
|
||||
index f7a1c3f..801bce8 100644
|
||||
--- a/libgcc/unwind-dw2-fde-dip.c
|
||||
@@ -0,0 +1,17 @@
|
||||
enable _REENTRANT when -lpthread is used
|
||||
|
||||
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
|
||||
|
||||
diff -Nur gcc-6.2.0.orig/gcc/config/bfin/linux.h gcc-6.2.0/gcc/config/bfin/linux.h
|
||||
--- gcc-6.2.0.orig/gcc/config/bfin/linux.h 2016-01-04 15:30:50.000000000 +0100
|
||||
+++ gcc-6.2.0/gcc/config/bfin/linux.h 2016-09-30 20:48:17.446636819 +0200
|
||||
@@ -38,6 +38,9 @@
|
||||
"%{static:--start-group} %{mfast-fp:-lbffastfp} %G %L %{static:--end-group} \
|
||||
%{!static:%{mfast-fp:-lbffastfp} %G}"
|
||||
|
||||
+#undef CPP_SPEC
|
||||
+#define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}"
|
||||
+
|
||||
#undef LINK_SPEC
|
||||
#define LINK_SPEC "\
|
||||
%{mfdpic: -m elf32bfinfd -z text} %{shared} %{pie} \
|
||||
@@ -0,0 +1,43 @@
|
||||
From 83717065090bb8b954556d1216dd9dc397dc0243 Mon Sep 17 00:00:00 2001
|
||||
From: nsz <nsz@138bc75d-0d04-0410-961f-82ee72b054a4>
|
||||
Date: Thu, 25 Aug 2016 14:13:02 +0000
|
||||
Subject: [PATCH] [mips] Add support for mips*r6-*-musl
|
||||
|
||||
gcc/
|
||||
* config/mips/linux.h (MUSL_DYNAMIC_LINKER32): Update.
|
||||
(MUSL_DYNAMIC_LINKER64, MUSL_DYNAMIC_LINKERN32): Update.
|
||||
|
||||
|
||||
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@239760 138bc75d-0d04-0410-961f-82ee72b054a4
|
||||
|
||||
[Vincent: tweak to not patch ChangeLog]
|
||||
|
||||
Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
|
||||
---
|
||||
gcc/config/mips/linux.h | 9 ++++++---
|
||||
1 files changed, 6 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/gcc/config/mips/linux.h b/gcc/config/mips/linux.h
|
||||
index fa253b6..dc51c45 100644
|
||||
--- a/gcc/config/mips/linux.h
|
||||
+++ b/gcc/config/mips/linux.h
|
||||
@@ -38,10 +38,13 @@ along with GCC; see the file COPYING3. If not see
|
||||
"%{mnan=2008:/lib32/ld-uClibc-mipsn8.so.0;:/lib32/ld-uClibc.so.0}"
|
||||
|
||||
#undef MUSL_DYNAMIC_LINKER32
|
||||
-#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-mips%{EL:el}%{msoft-float:-sf}.so.1"
|
||||
+#define MUSL_DYNAMIC_LINKER32 \
|
||||
+ "/lib/ld-musl-mips%{mips32r6|mips64r6:r6}%{EL:el}%{msoft-float:-sf}.so.1"
|
||||
#undef MUSL_DYNAMIC_LINKER64
|
||||
-#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-mips64%{EL:el}%{msoft-float:-sf}.so.1"
|
||||
-#define MUSL_DYNAMIC_LINKERN32 "/lib/ld-musl-mipsn32%{EL:el}%{msoft-float:-sf}.so.1"
|
||||
+#define MUSL_DYNAMIC_LINKER64 \
|
||||
+ "/lib/ld-musl-mips64%{mips64r6:r6}%{EL:el}%{msoft-float:-sf}.so.1"
|
||||
+#define MUSL_DYNAMIC_LINKERN32 \
|
||||
+ "/lib/ld-musl-mipsn32%{mips64r6:r6}%{EL:el}%{msoft-float:-sf}.so.1"
|
||||
|
||||
#define BIONIC_DYNAMIC_LINKERN32 "/system/bin/linker32"
|
||||
#define GNU_USER_DYNAMIC_LINKERN32 \
|
||||
--
|
||||
2.10.0
|
||||
|
||||
@@ -1,90 +1,90 @@
|
||||
comment "GCC Options"
|
||||
|
||||
config BR2_GCC_NEEDS_MPC
|
||||
bool
|
||||
|
||||
config BR2_GCC_SUPPORTS_GRAPHITE
|
||||
bool
|
||||
|
||||
choice
|
||||
prompt "GCC compiler Version"
|
||||
default BR2_GCC_VERSION_4_8_ARC if BR2_arc
|
||||
default BR2_GCC_VERSION_4_9_X
|
||||
default BR2_GCC_VERSION_ARC if BR2_arc
|
||||
default BR2_GCC_VERSION_OR1K if BR2_or1k
|
||||
default BR2_GCC_VERSION_5_X
|
||||
help
|
||||
Select the version of gcc you wish to use.
|
||||
|
||||
config BR2_GCC_VERSION_4_7_X
|
||||
bool "gcc 4.7.x"
|
||||
depends on BR2_DEPRECATED_SINCE_2016_05
|
||||
# Broken or unsupported architectures
|
||||
depends on !BR2_microblaze && !BR2_aarch64 && !BR2_arc \
|
||||
&& !BR2_powerpc64le && !BR2_nios2 && !BR2_bfin
|
||||
# Broken or unsupported ARM cores
|
||||
depends on !BR2_cortex_a12 && !BR2_pj4 && !BR2_cortex_a17
|
||||
# Broken or unsupported PPC cores
|
||||
depends on !BR2_powerpc_e5500 && !BR2_powerpc_e6500 && \
|
||||
!BR2_powerpc_power8
|
||||
# SPARC -mcpu=leon3 appeared in gcc 4.8.x
|
||||
depends on !BR2_sparc_leon3
|
||||
# Broken or unsupported x86 cores
|
||||
depends on !BR2_x86_jaguar && !BR2_x86_steamroller
|
||||
# Unsupported for MIPS R6
|
||||
depends on !BR2_mips_32r6 && !BR2_mips_64r6
|
||||
select BR2_GCC_NEEDS_MPC
|
||||
select BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
|
||||
|
||||
config BR2_GCC_VERSION_4_8_X
|
||||
bool "gcc 4.8.x"
|
||||
# Broken or unsupported architectures
|
||||
depends on !BR2_microblaze && !BR2_arc \
|
||||
depends on !BR2_microblaze && !BR2_arc && !BR2_or1k \
|
||||
&& !BR2_powerpc64le && !BR2_nios2 && !BR2_bfin
|
||||
# Broken or unsupported ARM cores
|
||||
depends on !BR2_cortex_a12 && !BR2_cortex_a17
|
||||
depends on !BR2_cortex_a12 && !BR2_cortex_a17 && !BR2_ARM_CPU_ARMV8
|
||||
# Broken or unsupported PPC cores
|
||||
depends on !BR2_powerpc_power8
|
||||
# Unsupported MIPS cores
|
||||
depends on !BR2_mips_interaptiv
|
||||
# gcc-4.8.x + binutils-2.25 is broken for MIPS
|
||||
depends on !((BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el) && BR2_BINUTILS_VERSION_2_25_X)
|
||||
# Unsupported for MIPS R5
|
||||
depends on !BR2_MIPS_CPU_MIPS32R5 && !BR2_MIPS_CPU_MIPS64R5
|
||||
# Unsupported for MIPS R6
|
||||
depends on !BR2_mips_32r6 && !BR2_mips_64r6
|
||||
select BR2_GCC_NEEDS_MPC
|
||||
select BR2_GCC_SUPPORTS_GRAPHITE
|
||||
depends on !BR2_MIPS_CPU_MIPS32R6 && !BR2_MIPS_CPU_MIPS64R6
|
||||
# musl ppc64 unsupported
|
||||
depends on !(BR2_TOOLCHAIN_USES_MUSL && (BR2_powerpc64 || BR2_powerpc64le))
|
||||
# musl mips64 unsupported
|
||||
depends on !(BR2_TOOLCHAIN_USES_MUSL && (BR2_mips64 || BR2_mips64el))
|
||||
select BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
|
||||
|
||||
config BR2_GCC_VERSION_4_8_ARC
|
||||
bool "gcc 4.8-arc"
|
||||
config BR2_GCC_VERSION_ARC
|
||||
bool "gcc arc (6.x)"
|
||||
# Only supported architecture
|
||||
depends on BR2_arc
|
||||
select BR2_GCC_NEEDS_MPC
|
||||
select BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
|
||||
select BR2_TOOLCHAIN_GCC_AT_LEAST_6
|
||||
|
||||
config BR2_GCC_VERSION_OR1K
|
||||
bool "gcc or1k (5.x)"
|
||||
# Only supported architecture
|
||||
depends on BR2_or1k
|
||||
select BR2_TOOLCHAIN_GCC_AT_LEAST_5
|
||||
|
||||
config BR2_GCC_VERSION_4_9_X
|
||||
bool "gcc 4.9.x"
|
||||
# Broken or unsupported architectures
|
||||
depends on !BR2_arc && !BR2_bfin
|
||||
depends on !BR2_arc && !BR2_bfin && !BR2_or1k
|
||||
# Broken or unsupported ARM cores
|
||||
depends on !BR2_cortex_a17
|
||||
depends on !BR2_cortex_a17 && !BR2_cortex_a72
|
||||
# Unsupported MIPS cores
|
||||
depends on !BR2_mips_interaptiv
|
||||
# Unsupported for MIPS R5
|
||||
depends on !BR2_MIPS_CPU_MIPS32R5 && !BR2_MIPS_CPU_MIPS64R5
|
||||
# Unsupported for MIPS R6
|
||||
depends on !BR2_mips_32r6 && !BR2_mips_64r6
|
||||
depends on !BR2_MIPS_CPU_MIPS32R6 && !BR2_MIPS_CPU_MIPS64R6
|
||||
# musl microblaze unsupported
|
||||
depends on !(BR2_TOOLCHAIN_USES_MUSL && (BR2_microblazeel || BR2_microblazebe))
|
||||
# musl ppc64 unsupported
|
||||
depends on !(BR2_TOOLCHAIN_USES_MUSL && (BR2_powerpc64 || BR2_powerpc64le))
|
||||
# musl mips64 unsupported
|
||||
depends on !(BR2_TOOLCHAIN_USES_MUSL && (BR2_mips64 || BR2_mips64el))
|
||||
# PR60102 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60102
|
||||
select BR2_GCC_NEEDS_MPC
|
||||
select BR2_GCC_SUPPORTS_GRAPHITE
|
||||
select BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
|
||||
|
||||
config BR2_GCC_VERSION_5_X
|
||||
bool "gcc 5.x"
|
||||
# Broken or unsupported architectures
|
||||
depends on !BR2_arc && !BR2_bfin
|
||||
select BR2_GCC_NEEDS_MPC
|
||||
select BR2_GCC_SUPPORTS_GRAPHITE
|
||||
depends on !BR2_arc && !BR2_bfin && !BR2_or1k
|
||||
# musl ppc64 unsupported
|
||||
depends on !(BR2_TOOLCHAIN_USES_MUSL && (BR2_powerpc64 || BR2_powerpc64le))
|
||||
# Unsupported MIPS cores
|
||||
depends on !BR2_mips_interaptiv && !BR2_mips_m5150 && \
|
||||
!BR2_mips_m6250 && !BR2_mips_i6400 && !BR2_mips_p6600
|
||||
# musl mips64 unsupported
|
||||
depends on !(BR2_TOOLCHAIN_USES_MUSL && (BR2_mips64 || BR2_mips64el))
|
||||
select BR2_TOOLCHAIN_GCC_AT_LEAST_5
|
||||
|
||||
config BR2_GCC_VERSION_6_X
|
||||
bool "gcc 6.x"
|
||||
# Broken or unsupported architectures
|
||||
depends on !BR2_arc
|
||||
select BR2_GCC_NEEDS_MPC
|
||||
select BR2_GCC_SUPPORTS_GRAPHITE
|
||||
depends on !BR2_microblaze
|
||||
depends on !BR2_or1k
|
||||
# Unsupported MIPS cores
|
||||
depends on !BR2_mips_m6250 && !BR2_mips_p6600
|
||||
select BR2_TOOLCHAIN_GCC_AT_LEAST_6
|
||||
|
||||
endchoice
|
||||
@@ -102,12 +102,12 @@ config BR2_GCC_SUPPORTS_FINEGRAINEDMTUNE
|
||||
|
||||
config BR2_GCC_VERSION
|
||||
string
|
||||
default "4.7.4" if BR2_GCC_VERSION_4_7_X
|
||||
default "4.8.5" if BR2_GCC_VERSION_4_8_X
|
||||
default "4.9.4" if BR2_GCC_VERSION_4_9_X
|
||||
default "5.4.0" if BR2_GCC_VERSION_5_X
|
||||
default "6.1.0" if BR2_GCC_VERSION_6_X
|
||||
default "arc-2016.09-eng010" if BR2_GCC_VERSION_4_8_ARC
|
||||
default "6.3.0" if BR2_GCC_VERSION_6_X
|
||||
default "arc-2016.09-release" if BR2_GCC_VERSION_ARC
|
||||
default "musl-5.4.0" if BR2_GCC_VERSION_OR1K
|
||||
|
||||
config BR2_EXTRA_GCC_CONFIG_OPTIONS
|
||||
string "Additional gcc options"
|
||||
@@ -140,14 +140,6 @@ config BR2_TOOLCHAIN_BUILDROOT_FORTRAN
|
||||
Fortran language and you want Fortran libraries to be
|
||||
installed on your target system.
|
||||
|
||||
config BR2_GCC_ENABLE_TLS
|
||||
bool "Enable compiler tls support" if BR2_TOOLCHAIN_BUILDROOT_UCLIBC
|
||||
default y
|
||||
depends on BR2_PTHREADS_NATIVE || BR2_TOOLCHAIN_BUILDROOT_GLIBC
|
||||
help
|
||||
Enable the compiler to generate code for accessing
|
||||
thread local storage variables
|
||||
|
||||
config BR2_GCC_ENABLE_LTO
|
||||
bool "Enable compiler link-time-optimization support"
|
||||
select BR2_BINUTILS_ENABLE_LTO
|
||||
@@ -179,7 +171,6 @@ config BR2_GCC_ENABLE_LIBMUDFLAP
|
||||
|
||||
config BR2_GCC_ENABLE_GRAPHITE
|
||||
bool "Enable graphite support"
|
||||
depends on BR2_GCC_SUPPORTS_GRAPHITE
|
||||
help
|
||||
This option enables the graphite optimizations in the
|
||||
compiler.
|
||||
|
||||
@@ -79,8 +79,9 @@ HOST_GCC_FINAL_CONF_OPTS += --disable-symvers
|
||||
endif
|
||||
|
||||
# Disable shared libs like libstdc++ if we do static since it confuses linking
|
||||
# In that case also disable libcilkrts as there is no static version
|
||||
ifeq ($(BR2_STATIC_LIBS),y)
|
||||
HOST_GCC_FINAL_CONF_OPTS += --disable-shared
|
||||
HOST_GCC_FINAL_CONF_OPTS += --disable-shared --disable-libcilkrts
|
||||
else
|
||||
HOST_GCC_FINAL_CONF_OPTS += --enable-shared
|
||||
endif
|
||||
@@ -112,23 +113,12 @@ endef
|
||||
HOST_GCC_FINAL_POST_INSTALL_HOOKS += HOST_GCC_FINAL_CREATE_CC_SYMLINKS
|
||||
|
||||
HOST_GCC_FINAL_TOOLCHAIN_WRAPPER_ARGS += $(HOST_GCC_COMMON_TOOLCHAIN_WRAPPER_ARGS)
|
||||
HOST_GCC_FINAL_POST_BUILD_HOOKS += TOOLCHAIN_BUILD_WRAPPER
|
||||
HOST_GCC_FINAL_POST_BUILD_HOOKS += TOOLCHAIN_WRAPPER_BUILD
|
||||
HOST_GCC_FINAL_POST_INSTALL_HOOKS += TOOLCHAIN_WRAPPER_INSTALL
|
||||
# Note: this must be done after CREATE_CC_SYMLINKS, otherwise the
|
||||
# -cc symlink to the wrapper is not created.
|
||||
HOST_GCC_FINAL_POST_INSTALL_HOOKS += HOST_GCC_INSTALL_WRAPPER_AND_SIMPLE_SYMLINKS
|
||||
|
||||
# In gcc 4.7.x, the ARM EABIhf library loader path for glibc was not
|
||||
# correct, so we create a symbolic link to make things work
|
||||
# properly. glibc installs the library loader as ld-linux-armhf.so.3,
|
||||
# but gcc creates binaries that reference ld-linux.so.3.
|
||||
ifeq ($(BR2_arm)$(BR2_ARM_EABIHF)$(BR2_GCC_VERSION_4_7_X)$(BR2_TOOLCHAIN_USES_GLIBC),yyyy)
|
||||
define HOST_GCC_FINAL_LD_LINUX_LINK
|
||||
ln -sf ld-linux-armhf.so.3 $(TARGET_DIR)/lib/ld-linux.so.3
|
||||
ln -sf ld-linux-armhf.so.3 $(STAGING_DIR)/lib/ld-linux.so.3
|
||||
endef
|
||||
HOST_GCC_FINAL_POST_INSTALL_HOOKS += HOST_GCC_FINAL_LD_LINUX_LINK
|
||||
endif
|
||||
|
||||
# coldfire is not working without removing these object files from libgcc.a
|
||||
ifeq ($(BR2_m68k_cf),y)
|
||||
define HOST_GCC_FINAL_M68K_LIBGCC_FIXUP
|
||||
|
||||
@@ -25,19 +25,6 @@ HOST_GCC_INITIAL_SUBDIR = build
|
||||
|
||||
HOST_GCC_INITIAL_PRE_CONFIGURE_HOOKS += HOST_GCC_CONFIGURE_SYMLINK
|
||||
|
||||
# gcc on ARC has a bug: in its libgcc, even when no C library is
|
||||
# available (--with-newlib is passed, and therefore inhibit_libc is
|
||||
# defined), it tries to use the C library for the libgmon
|
||||
# library. Since it's not needed in gcc-initial, we disabled it here.
|
||||
ifeq ($(BR2_GCC_VERSION_4_8_ARC),y)
|
||||
define HOST_GCC_INITIAL_DISABLE_LIBGMON
|
||||
$(SED) 's/crtbeginS.o libgmon.a crtg.o/crtbeginS.o crtg.o/' \
|
||||
$(@D)/libgcc/config.host
|
||||
endef
|
||||
HOST_GCC_INITIAL_POST_PATCH_HOOKS += HOST_GCC_INITIAL_DISABLE_LIBGMON
|
||||
HOST_GCC_INITIAL_POST_RSYNC_HOOKS += HOST_GCC_INITIAL_DISABLE_LIBGMON
|
||||
endif
|
||||
|
||||
HOST_GCC_INITIAL_CONF_OPTS = \
|
||||
$(HOST_GCC_COMMON_CONF_OPTS) \
|
||||
--enable-languages=c \
|
||||
@@ -61,7 +48,8 @@ HOST_GCC_INITIAL_INSTALL_OPTS += install-target-libgcc
|
||||
endif
|
||||
|
||||
HOST_GCC_INITIAL_TOOLCHAIN_WRAPPER_ARGS += $(HOST_GCC_COMMON_TOOLCHAIN_WRAPPER_ARGS)
|
||||
HOST_GCC_INITIAL_POST_BUILD_HOOKS += TOOLCHAIN_BUILD_WRAPPER
|
||||
HOST_GCC_INITIAL_POST_BUILD_HOOKS += TOOLCHAIN_WRAPPER_BUILD
|
||||
HOST_GCC_INITIAL_POST_INSTALL_HOOKS += TOOLCHAIN_WRAPPER_INSTALL
|
||||
HOST_GCC_INITIAL_POST_INSTALL_HOOKS += HOST_GCC_INSTALL_WRAPPER_AND_SIMPLE_SYMLINKS
|
||||
|
||||
$(eval $(host-autotools-package))
|
||||
|
||||
@@ -8,8 +8,10 @@ sha512 47fdfeca0c0a624cdec9c4ae47137d056c918d5c386d4b96985bb3c8172aba377cb66cbc
|
||||
sha512 93abb78e16277454f41a8e9810f41f66c0fdffdc539a762ff6b67d3037f78db971378683fd2ebf707d1d51c059fad2161fe42d110c330027f40214b7db0f3efe gcc-4.9.4.tar.bz2
|
||||
# From ftp://gcc.gnu.org/pub/gcc/releases/gcc-5.4.0/sha512.sum
|
||||
sha512 2941cc950c8f2409a314df497631f9b0266211aa74746c1839c46e04f1c7c299afe2528d1ef16ea39def408a644ba48f97519ec7a7dd37d260c3e9423514265b gcc-5.4.0.tar.bz2
|
||||
# From ftp://gcc.gnu.org/pub/gcc/releases/gcc-6.1.0/sha512.sum
|
||||
sha512 eeed3e2018b8c012aabce419e8d718fde701e5c3c179b4486c61ba46e5736eecc8fccdd18b01fcd973a42c6ad3116dbbe2ee247fe3757d622d373f93ebaf8d2e gcc-6.1.0.tar.bz2
|
||||
# From ftp://gcc.gnu.org/pub/gcc/releases/gcc-6.3.0/sha512.sum
|
||||
sha512 234dd9b1bdc9a9c6e352216a7ef4ccadc6c07f156006a59759c5e0e6a69f0abcdc14630eff11e3826dd6ba5933a8faa43043f3d1d62df6bd5ab1e82862f9bf78 gcc-6.3.0.tar.bz2
|
||||
|
||||
# Locally calculated (fetched from Github)
|
||||
sha512 a788737022c178a1e7704e4ecd3438937f2239bf27fd487db2b00e4bb5c6604535842e4d6798f120488bdbf0b226fa9c94f4b8aede4ce9d20b0add6bcec82927 gcc-arc-2016.09-eng010.tar.gz
|
||||
sha512 faae6dc3f7843412068a52de5919797cd23e6ed1b8d140c230d0381f13fd38af67baaa4a09e581c03602127da3dd2fab6f9f5d7ac5d4270585bd079c673dda9a gcc-arc-2016.09-release.tar.gz
|
||||
# Locally calculated (fetched from Github)
|
||||
sha512 841101f7de45f327bf2e92f3efc73ca88a021e4b9b541458ce80a16e55882bd8606a8492d75c57c589ee2c10d42ae2865b67690155d7289a541df1d68096402f gcc-musl-5.4.0.tar.gz
|
||||
|
||||
@@ -13,12 +13,14 @@ GCC_VERSION = $(call qstrip,$(BR2_GCC_VERSION))
|
||||
ifeq ($(BR2_arc),y)
|
||||
GCC_SITE = $(call github,foss-for-synopsys-dwc-arc-processors,gcc,$(GCC_VERSION))
|
||||
GCC_SOURCE = gcc-$(GCC_VERSION).tar.gz
|
||||
else ifeq ($(BR2_or1k),y)
|
||||
GCC_SITE = $(call github,openrisc,or1k-gcc,$(GCC_VERSION))
|
||||
GCC_SOURCE = gcc-$(GCC_VERSION).tar.gz
|
||||
else
|
||||
GCC_SITE = $(BR2_GNU_MIRROR:/=)/gcc/gcc-$(GCC_VERSION)
|
||||
GCC_SOURCE = gcc-$(GCC_VERSION).tar.bz2
|
||||
endif
|
||||
|
||||
GCC_SOURCE ?= gcc-$(GCC_VERSION).tar.bz2
|
||||
|
||||
#
|
||||
# Xtensa special hook
|
||||
#
|
||||
@@ -82,6 +84,7 @@ endef
|
||||
HOST_GCC_COMMON_DEPENDENCIES = \
|
||||
host-binutils \
|
||||
host-gmp \
|
||||
host-mpc \
|
||||
host-mpfr \
|
||||
$(if $(BR2_BINFMT_FLAT),host-elf2flt)
|
||||
|
||||
@@ -93,6 +96,7 @@ HOST_GCC_COMMON_CONF_OPTS = \
|
||||
--disable-libssp \
|
||||
--disable-multilib \
|
||||
--with-gmp=$(HOST_DIR)/usr \
|
||||
--with-mpc=$(HOST_DIR)/usr \
|
||||
--with-mpfr=$(HOST_DIR)/usr \
|
||||
--with-pkgversion="Buildroot $(BR2_VERSION_FULL)" \
|
||||
--with-bugurl="http://bugs.buildroot.net/"
|
||||
@@ -114,6 +118,11 @@ ifeq ($(BR2_sparc_v8)$(BR2_sparc_leon3),y)
|
||||
HOST_GCC_COMMON_CONF_OPTS += --disable-libitm
|
||||
endif
|
||||
|
||||
# libmpx uses secure_getenv and struct _libc_fpstate not present in musl
|
||||
ifeq ($(BR2_TOOLCHAIN_BUILDROOT_MUSL)$(BR2_TOOLCHAIN_GCC_AT_LEAST_6),yy)
|
||||
HOST_GCC_COMMON_CONF_OPTS += --disable-libmpx
|
||||
endif
|
||||
|
||||
# quadmath support requires wchar
|
||||
ifeq ($(BR2_USE_WCHAR)$(BR2_TOOLCHAIN_HAS_LIBQUADMATH),yy)
|
||||
HOST_GCC_COMMON_CONF_OPTS += --enable-libquadmath
|
||||
@@ -133,10 +142,13 @@ ifeq ($(BR2_sparc)$(BR2_sparc64),y)
|
||||
HOST_GCC_COMMON_CONF_OPTS += --disable-libsanitizer
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_GCC_ENABLE_TLS),y)
|
||||
HOST_GCC_COMMON_CONF_OPTS += --enable-tls
|
||||
else
|
||||
# TLS support is not needed on uClibc/no-thread and
|
||||
# uClibc/linux-threads, otherwise, for all other situations (glibc,
|
||||
# musl and uClibc/NPTL), we need it.
|
||||
ifeq ($(BR2_TOOLCHAIN_BUILDROOT_UCLIBC)$(BR2_PTHREADS)$(BR2_PTHREADS_NONE),yy)
|
||||
HOST_GCC_COMMON_CONF_OPTS += --disable-tls
|
||||
else
|
||||
HOST_GCC_COMMON_CONF_OPTS += --enable-tls
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_GCC_ENABLE_LTO),y)
|
||||
@@ -158,11 +170,6 @@ else
|
||||
HOST_GCC_COMMON_CONF_OPTS += --enable-threads
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_GCC_NEEDS_MPC),y)
|
||||
HOST_GCC_COMMON_DEPENDENCIES += host-mpc
|
||||
HOST_GCC_COMMON_CONF_OPTS += --with-mpc=$(HOST_DIR)/usr
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_GCC_ENABLE_GRAPHITE),y)
|
||||
HOST_GCC_COMMON_DEPENDENCIES += host-isl
|
||||
HOST_GCC_COMMON_CONF_OPTS += --with-isl=$(HOST_DIR)/usr
|
||||
@@ -176,7 +183,7 @@ else
|
||||
HOST_GCC_COMMON_CONF_OPTS += --without-isl --without-cloog
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_arc),y)
|
||||
ifeq ($(BR2_arc)$(BR2_or1k),y)
|
||||
HOST_GCC_COMMON_DEPENDENCIES += host-flex host-bison
|
||||
endif
|
||||
|
||||
@@ -231,6 +238,16 @@ HOST_GCC_COMMON_CONF_OPTS += \
|
||||
--with-long-double-128
|
||||
endif
|
||||
|
||||
# PowerPC64 big endian by default uses the elfv1 ABI, and PowerPC 64
|
||||
# little endian by default uses the elfv2 ABI. However, musl has
|
||||
# decided to use the elfv2 ABI for both, so we force the elfv2 ABI for
|
||||
# Power64 big endian when the selected C library is musl.
|
||||
ifeq ($(BR2_TOOLCHAIN_USES_MUSL)$(BR2_powerpc64),yy)
|
||||
HOST_GCC_COMMON_CONF_OPTS += \
|
||||
--with-abi=elfv2 \
|
||||
--without-long-double-128
|
||||
endif
|
||||
|
||||
HOST_GCC_COMMON_TOOLCHAIN_WRAPPER_ARGS += -DBR_CROSS_PATH_SUFFIX='".br_real"'
|
||||
ifeq ($(BR2_GCC_ARCH_HAS_CONFIGURABLE_DEFAULTS),)
|
||||
ifeq ($(call qstrip,$(BR2_GCC_TARGET_CPU_REVISION)),)
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
--- gcc/gcc/config/--- gcc/contrib/regression/objs-gcc.sh
|
||||
+++ gcc/contrib/regression/objs-gcc.sh
|
||||
@@ -105,6 +105,10 @@
|
||||
Index: b/contrib/regression/objs-gcc.sh
|
||||
===================================================================
|
||||
--- 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
|
||||
@@ -1,7 +1,9 @@
|
||||
--- gcc-4.0.0/boehm-gc/include/gc.h-orig 2005-04-28 22:28:57.000000000 -0500
|
||||
+++ gcc-4.0.0/boehm-gc/include/gc.h 2005-04-28 22:30:38.000000000 -0500
|
||||
@@ -500,7 +500,7 @@
|
||||
#ifdef __linux__
|
||||
Index: b/boehm-gc/include/gc.h
|
||||
===================================================================
|
||||
--- 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__)
|
||||
@@ -19,7 +19,7 @@ Index: b/libstdc++-v3/config/locale/generic/c_locale.h
|
||||
===================================================================
|
||||
--- a/libstdc++-v3/config/locale/generic/c_locale.h
|
||||
+++ b/libstdc++-v3/config/locale/generic/c_locale.h
|
||||
@@ -71,7 +71,7 @@
|
||||
@@ -70,7 +70,7 @@
|
||||
__builtin_va_list __args;
|
||||
__builtin_va_start(__args, __fmt);
|
||||
|
||||
@@ -32,7 +32,7 @@ Index: b/libstdc++-v3/config/locale/gnu/c_locale.h
|
||||
===================================================================
|
||||
--- a/libstdc++-v3/config/locale/gnu/c_locale.h
|
||||
+++ b/libstdc++-v3/config/locale/gnu/c_locale.h
|
||||
@@ -89,7 +89,7 @@
|
||||
@@ -88,7 +88,7 @@
|
||||
__builtin_va_list __args;
|
||||
__builtin_va_start(__args, __fmt);
|
||||
|
||||
@@ -45,33 +45,33 @@ Index: b/libstdc++-v3/include/bits/basic_string.h
|
||||
===================================================================
|
||||
--- a/libstdc++-v3/include/bits/basic_string.h
|
||||
+++ b/libstdc++-v3/include/bits/basic_string.h
|
||||
@@ -2806,7 +2806,7 @@
|
||||
@@ -5239,7 +5239,7 @@
|
||||
_GLIBCXX_END_NAMESPACE_VERSION
|
||||
} // namespace
|
||||
|
||||
-#if (defined(__GXX_EXPERIMENTAL_CXX0X__) && defined(_GLIBCXX_USE_C99) \
|
||||
+#if (defined(__GXX_EXPERIMENTAL_CXX0X__) && (defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)) \
|
||||
&& !defined(_GLIBCXX_HAVE_BROKEN_VSWPRINTF))
|
||||
-#if __cplusplus >= 201103L && defined(_GLIBCXX_USE_C99)
|
||||
+#if __cplusplus >= 201103L && (defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__))
|
||||
|
||||
#include <ext/string_conversions.h>
|
||||
|
||||
Index: b/libstdc++-v3/include/bits/locale_facets.tcc
|
||||
===================================================================
|
||||
--- a/libstdc++-v3/include/bits/locale_facets.tcc
|
||||
+++ b/libstdc++-v3/include/bits/locale_facets.tcc
|
||||
@@ -989,7 +989,7 @@
|
||||
@@ -992,7 +992,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;
|
||||
// Precision is always used except for hexfloat format.
|
||||
const bool __use_prec =
|
||||
(__io.flags() & ios_base::floatfield) != ios_base::floatfield;
|
||||
Index: b/libstdc++-v3/include/bits/locale_facets_nonio.tcc
|
||||
===================================================================
|
||||
--- a/libstdc++-v3/include/bits/locale_facets_nonio.tcc
|
||||
+++ b/libstdc++-v3/include/bits/locale_facets_nonio.tcc
|
||||
@@ -572,7 +572,7 @@
|
||||
@@ -578,7 +578,7 @@
|
||||
{
|
||||
const locale __loc = __io.getloc();
|
||||
const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc);
|
||||
@@ -84,7 +84,7 @@ Index: b/libstdc++-v3/include/c_compatibility/math.h
|
||||
===================================================================
|
||||
--- a/libstdc++-v3/include/c_compatibility/math.h
|
||||
+++ b/libstdc++-v3/include/c_compatibility/math.h
|
||||
@@ -57,7 +57,7 @@
|
||||
@@ -56,7 +56,7 @@
|
||||
using std::floor;
|
||||
using std::fmod;
|
||||
|
||||
@@ -110,7 +110,7 @@ Index: b/libstdc++-v3/include/c_global/cstdlib
|
||||
===================================================================
|
||||
--- a/libstdc++-v3/include/c_global/cstdlib
|
||||
+++ b/libstdc++-v3/include/c_global/cstdlib
|
||||
@@ -146,7 +146,7 @@
|
||||
@@ -195,7 +195,7 @@
|
||||
_GLIBCXX_END_NAMESPACE_VERSION
|
||||
} // namespace
|
||||
|
||||
@@ -123,7 +123,7 @@ Index: b/libstdc++-v3/include/c_global/cwchar
|
||||
===================================================================
|
||||
--- a/libstdc++-v3/include/c_global/cwchar
|
||||
+++ b/libstdc++-v3/include/c_global/cwchar
|
||||
@@ -234,7 +234,7 @@
|
||||
@@ -232,7 +232,7 @@
|
||||
_GLIBCXX_END_NAMESPACE_VERSION
|
||||
} // namespace
|
||||
|
||||
@@ -132,7 +132,7 @@ Index: b/libstdc++-v3/include/c_global/cwchar
|
||||
|
||||
#undef wcstold
|
||||
#undef wcstoll
|
||||
@@ -291,7 +291,7 @@
|
||||
@@ -289,7 +289,7 @@
|
||||
using std::vwscanf;
|
||||
#endif
|
||||
|
||||
@@ -145,7 +145,7 @@ Index: b/libstdc++-v3/include/c_std/cstdio
|
||||
===================================================================
|
||||
--- a/libstdc++-v3/include/c_std/cstdio
|
||||
+++ b/libstdc++-v3/include/c_std/cstdio
|
||||
@@ -140,7 +140,7 @@
|
||||
@@ -144,7 +144,7 @@
|
||||
using ::vsprintf;
|
||||
} // namespace std
|
||||
|
||||
@@ -158,7 +158,7 @@ Index: b/libstdc++-v3/include/c_std/cstdlib
|
||||
===================================================================
|
||||
--- a/libstdc++-v3/include/c_std/cstdlib
|
||||
+++ b/libstdc++-v3/include/c_std/cstdlib
|
||||
@@ -143,7 +143,7 @@
|
||||
@@ -192,7 +192,7 @@
|
||||
_GLIBCXX_END_NAMESPACE_VERSION
|
||||
} // namespace
|
||||
|
||||
@@ -171,7 +171,7 @@ Index: b/libstdc++-v3/include/c_std/cwchar
|
||||
===================================================================
|
||||
--- a/libstdc++-v3/include/c_std/cwchar
|
||||
+++ b/libstdc++-v3/include/c_std/cwchar
|
||||
@@ -230,7 +230,7 @@
|
||||
@@ -228,7 +228,7 @@
|
||||
_GLIBCXX_END_NAMESPACE_VERSION
|
||||
} // namespace
|
||||
|
||||
@@ -184,12 +184,12 @@ Index: b/libstdc++-v3/include/ext/vstring.h
|
||||
===================================================================
|
||||
--- a/libstdc++-v3/include/ext/vstring.h
|
||||
+++ b/libstdc++-v3/include/ext/vstring.h
|
||||
@@ -2537,7 +2537,7 @@
|
||||
@@ -2680,7 +2680,7 @@
|
||||
_GLIBCXX_END_NAMESPACE_VERSION
|
||||
} // namespace
|
||||
|
||||
-#if (defined(__GXX_EXPERIMENTAL_CXX0X__) && defined(_GLIBCXX_USE_C99))
|
||||
+#if (defined(__GXX_EXPERIMENTAL_CXX0X__) && (defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)))
|
||||
-#if ((__cplusplus >= 201103L) && defined(_GLIBCXX_USE_C99))
|
||||
+#if ((__cplusplus >= 201103L) && (defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)))
|
||||
|
||||
#include <ext/string_conversions.h>
|
||||
|
||||
@@ -249,7 +249,7 @@ Index: b/libstdc++-v3/src/c++11/debug.cc
|
||||
===================================================================
|
||||
--- a/libstdc++-v3/src/c++11/debug.cc
|
||||
+++ b/libstdc++-v3/src/c++11/debug.cc
|
||||
@@ -783,7 +783,7 @@
|
||||
@@ -788,7 +788,7 @@
|
||||
int __n __attribute__ ((__unused__)),
|
||||
const char* __fmt, _Tp __s) const throw ()
|
||||
{
|
||||
@@ -262,7 +262,7 @@ Index: b/libstdc++-v3/include/c_global/cstdio
|
||||
===================================================================
|
||||
--- a/libstdc++-v3/include/c_global/cstdio
|
||||
+++ b/libstdc++-v3/include/c_global/cstdio
|
||||
@@ -140,7 +140,7 @@
|
||||
@@ -146,7 +146,7 @@
|
||||
using ::vsprintf;
|
||||
} // namespace
|
||||
|
||||
56
bsp/buildroot/package/gcc/musl-5.4.0/860-cilk-wchar.patch
Normal file
56
bsp/buildroot/package/gcc/musl-5.4.0/860-cilk-wchar.patch
Normal file
@@ -0,0 +1,56 @@
|
||||
[PATCH] cilk: fix build without wchar
|
||||
|
||||
When building against uClibc with wchar support disabled, WCHAR_MIN and
|
||||
WCHAR_MAX are not defined leading to compilation errors.
|
||||
|
||||
Fix it by only including the wchar code if available.
|
||||
|
||||
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
|
||||
---
|
||||
libcilkrts/include/cilk/reducer_min_max.h | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
Index: b/libcilkrts/include/cilk/reducer_min_max.h
|
||||
===================================================================
|
||||
--- a/libcilkrts/include/cilk/reducer_min_max.h
|
||||
+++ b/libcilkrts/include/cilk/reducer_min_max.h
|
||||
@@ -3154,7 +3154,9 @@
|
||||
CILK_C_REDUCER_MAX_INSTANCE(char, char, CHAR_MIN)
|
||||
CILK_C_REDUCER_MAX_INSTANCE(unsigned char, uchar, 0)
|
||||
CILK_C_REDUCER_MAX_INSTANCE(signed char, schar, SCHAR_MIN)
|
||||
+#ifdef WCHAR_MIN
|
||||
CILK_C_REDUCER_MAX_INSTANCE(wchar_t, wchar_t, WCHAR_MIN)
|
||||
+#endif
|
||||
CILK_C_REDUCER_MAX_INSTANCE(short, short, SHRT_MIN)
|
||||
CILK_C_REDUCER_MAX_INSTANCE(unsigned short, ushort, 0)
|
||||
CILK_C_REDUCER_MAX_INSTANCE(int, int, INT_MIN)
|
||||
@@ -3306,7 +3308,9 @@
|
||||
CILK_C_REDUCER_MAX_INDEX_INSTANCE(char, char, CHAR_MIN)
|
||||
CILK_C_REDUCER_MAX_INDEX_INSTANCE(unsigned char, uchar, 0)
|
||||
CILK_C_REDUCER_MAX_INDEX_INSTANCE(signed char, schar, SCHAR_MIN)
|
||||
+#ifdef WCHAR_MIN
|
||||
CILK_C_REDUCER_MAX_INDEX_INSTANCE(wchar_t, wchar_t, WCHAR_MIN)
|
||||
+#endif
|
||||
CILK_C_REDUCER_MAX_INDEX_INSTANCE(short, short, SHRT_MIN)
|
||||
CILK_C_REDUCER_MAX_INDEX_INSTANCE(unsigned short, ushort, 0)
|
||||
CILK_C_REDUCER_MAX_INDEX_INSTANCE(int, int, INT_MIN)
|
||||
@@ -3432,7 +3436,9 @@
|
||||
CILK_C_REDUCER_MIN_INSTANCE(char, char, CHAR_MAX)
|
||||
CILK_C_REDUCER_MIN_INSTANCE(unsigned char, uchar, CHAR_MAX)
|
||||
CILK_C_REDUCER_MIN_INSTANCE(signed char, schar, SCHAR_MAX)
|
||||
+#ifdef WCHAR_MAX
|
||||
CILK_C_REDUCER_MIN_INSTANCE(wchar_t, wchar_t, WCHAR_MAX)
|
||||
+#endif
|
||||
CILK_C_REDUCER_MIN_INSTANCE(short, short, SHRT_MAX)
|
||||
CILK_C_REDUCER_MIN_INSTANCE(unsigned short, ushort, USHRT_MAX)
|
||||
CILK_C_REDUCER_MIN_INSTANCE(int, int, INT_MAX)
|
||||
@@ -3584,7 +3590,9 @@
|
||||
CILK_C_REDUCER_MIN_INDEX_INSTANCE(char, char, CHAR_MAX)
|
||||
CILK_C_REDUCER_MIN_INDEX_INSTANCE(unsigned char, uchar, CHAR_MAX)
|
||||
CILK_C_REDUCER_MIN_INDEX_INSTANCE(signed char, schar, SCHAR_MAX)
|
||||
+#ifdef WCHAR_MAX
|
||||
CILK_C_REDUCER_MIN_INDEX_INSTANCE(wchar_t, wchar_t, WCHAR_MAX)
|
||||
+#endif
|
||||
CILK_C_REDUCER_MIN_INDEX_INSTANCE(short, short, SHRT_MAX)
|
||||
CILK_C_REDUCER_MIN_INDEX_INSTANCE(unsigned short, ushort, USHRT_MAX)
|
||||
CILK_C_REDUCER_MIN_INDEX_INSTANCE(int, int, INT_MAX)
|
||||
@@ -0,0 +1,14 @@
|
||||
disable split-stack for non-thread builds
|
||||
|
||||
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
|
||||
|
||||
diff -Nur gcc-5.3.0.orig/libgcc/config/t-stack gcc-5.3.0/libgcc/config/t-stack
|
||||
--- gcc-5.3.0.orig/libgcc/config/t-stack 2010-10-01 21:31:49.000000000 +0200
|
||||
+++ gcc-5.3.0/libgcc/config/t-stack 2016-03-07 03:25:32.000000000 +0100
|
||||
@@ -1,4 +1,6 @@
|
||||
# Makefile fragment to provide generic support for -fsplit-stack.
|
||||
# This should be used in config.host for any host which supports
|
||||
# -fsplit-stack.
|
||||
+ifeq ($(enable_threads),yes)
|
||||
LIB2ADD_ST += $(srcdir)/generic-morestack.c $(srcdir)/generic-morestack-thread.c
|
||||
+endif
|
||||
Reference in New Issue
Block a user