mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2024-12-19 04:47:52 +00:00
Merge branch 'master' of https://github.com/crosstool-ng/crosstool-ng
This commit is contained in:
commit
34ca68e3b0
@ -41,7 +41,7 @@ env:
|
||||
- CT_SAMPLE=armeb-unknown-linux-gnueabi
|
||||
- CT_SAMPLE=arm-unknown-linux-musleabi
|
||||
- CT_SAMPLE=aarch64-unknown-linux-gnueabi
|
||||
- CT_SAMPLE=mips64el-n64-linux-uclibc
|
||||
- CT_SAMPLE=mips64el-multilib-linux-uclibc
|
||||
- CT_SAMPLE=powerpc-e500v2-linux-gnuspe
|
||||
- CT_SAMPLE=x86_64-unknown-linux-uclibc
|
||||
- CT_SAMPLE=xtensa-unknown-linux-uclibc
|
||||
|
@ -349,6 +349,9 @@ install-lib-samples: $(DESTDIR)$(libdir) install-lib-main
|
||||
$(install) -m 644 "$${libc_cfg}" \
|
||||
"$(DESTDIR)$(libdir)/$${samp_dir}"; \
|
||||
done; \
|
||||
[ -e "$${samp_dir}/broken" ] && \
|
||||
$(install) -m 644 "$${samp_dir}/broken" \
|
||||
"$(DESTDIR)$(libdir)/$${samp_dir}/" || :; \
|
||||
done
|
||||
@$(install) -m 644 samples/samples.mk "$(DESTDIR)$(libdir)/samples/samples.mk"
|
||||
|
||||
|
@ -7,7 +7,7 @@ choice
|
||||
config ARCH_mips_o32
|
||||
bool
|
||||
prompt "o32"
|
||||
depends on ARCH_32
|
||||
depends on (ARCH_32 || MULTILIB)
|
||||
help
|
||||
This is the -mabi=32 gcc option.
|
||||
|
||||
|
@ -29,7 +29,7 @@ if ELF2FLT_GIT
|
||||
config ELF2FLT_GIT_CSET
|
||||
string
|
||||
prompt "git cset"
|
||||
default "454b6b415a31959661406bdfbd9dad22229367bf"
|
||||
default "9dbc458c6122c495bbdec8dc975a15c9d39e5ff2"
|
||||
help
|
||||
Enter the git changeset to use.
|
||||
|
||||
|
@ -71,10 +71,14 @@ choice
|
||||
|
||||
# Don't remove next line
|
||||
# CT_INSERT_VERSION_BELOW
|
||||
|
||||
config CC_GCC_V_5_3_0
|
||||
config CC_GCC_V_6_1_0
|
||||
bool
|
||||
prompt "5.3.0"
|
||||
prompt "6.1.0"
|
||||
select CC_GCC_6
|
||||
|
||||
config CC_GCC_V_5_4_0
|
||||
bool
|
||||
prompt "5.4.0"
|
||||
select CC_GCC_5
|
||||
|
||||
config CC_GCC_V_linaro_5_2
|
||||
@ -162,10 +166,27 @@ config CC_GCC_5_or_later
|
||||
bool
|
||||
select CC_GCC_4_9_or_later
|
||||
|
||||
config CC_GCC_6
|
||||
bool
|
||||
select CC_GCC_6_or_later
|
||||
select CC_GCC_USE_GMP_MPFR
|
||||
select CC_GCC_USE_MPC
|
||||
select CC_GCC_HAS_GRAPHITE
|
||||
select CC_GCC_HAS_LTO
|
||||
select CC_GCC_HAS_PKGVERSION_BUGURL
|
||||
select CC_GCC_HAS_BUILD_ID
|
||||
select CC_GCC_HAS_LNK_HASH_STYLE
|
||||
select CC_GCC_HAS_LIBQUADMATH
|
||||
select CC_GCC_HAS_LIBSANITIZER
|
||||
select CC_SUPPORT_GOLANG
|
||||
|
||||
config CC_GCC_6_or_later
|
||||
bool
|
||||
select CC_GCC_5_or_later
|
||||
|
||||
config CC_GCC_latest
|
||||
bool
|
||||
select CC_GCC_5_or_later
|
||||
select CC_GCC_6_or_later
|
||||
select CC_GCC_USE_GMP_MPFR
|
||||
select CC_GCC_USE_MPC
|
||||
select CC_GCC_HAS_GRAPHITE
|
||||
@ -226,7 +247,7 @@ config CC_GCC_HAS_LNK_HASH_STYLE
|
||||
bool
|
||||
|
||||
# Only enable gcc's support for plugins if binutils has it as well
|
||||
# They are usefull only when doing LTO, but it does no harm enabling
|
||||
# They are useful only when doing LTO, but it does no harm enabling
|
||||
# them even without LTO.
|
||||
config CC_GCC_ENABLE_PLUGINS
|
||||
bool
|
||||
@ -261,7 +282,8 @@ config CC_GCC_VERSION
|
||||
string
|
||||
# Don't remove next line
|
||||
# CT_INSERT_VERSION_STRING_BELOW
|
||||
default "5.3.0" if CC_GCC_V_5_3_0
|
||||
default "6.1.0" if CC_GCC_V_6_1_0
|
||||
default "5.4.0" if CC_GCC_V_5_4_0
|
||||
default "linaro-5.2-2015.11-2" if CC_GCC_V_linaro_5_2
|
||||
default "linaro-4.9-2015.06" if CC_GCC_V_linaro_4_9
|
||||
default "4.9.3" if CC_GCC_V_4_9_3
|
||||
|
@ -14,7 +14,8 @@ config DUMA_A
|
||||
config DUMA_SO
|
||||
bool
|
||||
prompt "Build a shared library"
|
||||
default y if SHARED_LIBS
|
||||
depends on SHARED_LIBS
|
||||
default y
|
||||
|
||||
choice
|
||||
bool
|
||||
|
@ -21,7 +21,7 @@ config GDB_CROSS_STATIC
|
||||
depends on CONFIGURE_has_static_link
|
||||
select WANTS_STATIC_LINK
|
||||
help
|
||||
A static cross gdb can be usefull if you debug on a machine that is
|
||||
A static cross gdb can be useful if you debug on a machine that is
|
||||
not the one that is used to compile the toolchain.
|
||||
|
||||
That way, you can share the cross-gdb without installing a toolchain
|
||||
|
@ -55,16 +55,6 @@ config LIBC_GLIBC_EXTRA_CFLAGS
|
||||
help
|
||||
Extra target CFLAGS to use when building.
|
||||
|
||||
config LIBC_EXTRA_CC_ARGS
|
||||
string
|
||||
prompt "gcc extra flags"
|
||||
default ""
|
||||
help
|
||||
Extra flags to pass gcc when building.
|
||||
|
||||
Seldom used, except for sparc64 which seems to need the flag -64
|
||||
to be passed onto gcc.
|
||||
|
||||
config LIBC_ENABLE_FORTIFIED_BUILD
|
||||
bool
|
||||
prompt "Enable fortified build (EXPERIMENTAL)"
|
||||
|
@ -55,7 +55,7 @@ choice
|
||||
|
||||
config LIBC_MUSL_V_1_1
|
||||
bool
|
||||
prompt "1.1.14 (Mainline)"
|
||||
prompt "1.1.15 (Mainline)"
|
||||
depends on EXPERIMENTAL
|
||||
|
||||
endchoice
|
||||
@ -64,6 +64,6 @@ config LIBC_VERSION
|
||||
string
|
||||
# Don't remove next line
|
||||
# CT_INSERT_VERSION_STRING_BELOW
|
||||
default "1.1.14" if LIBC_MUSL_V_1_1
|
||||
default "1.1.15" if LIBC_MUSL_V_1_1
|
||||
|
||||
endif # ! LIBC_MUSL_CUSTOM
|
||||
|
@ -4,10 +4,10 @@
|
||||
##
|
||||
## help Do not use a C library.
|
||||
## help
|
||||
## help This is usefull if your project is self-contained, does not rely on
|
||||
## help This is useful if your project is self-contained, does not rely on
|
||||
## help an external C library, and provides all the necessary bits.
|
||||
## help
|
||||
## help Most probably usefull to bootloaders, as they generally don't depend
|
||||
## help Most probably useful to bootloaders, as they generally don't depend
|
||||
## help on the C library.
|
||||
## help
|
||||
## help If unsure: do *not* choose that, and use another option in the choice.
|
||||
|
@ -129,13 +129,13 @@ config LIBC_UCLIBC_VERBOSITY_0
|
||||
|
||||
config LIBC_UCLIBC_VERBOSITY_1
|
||||
bool
|
||||
prompt "Brief build (show defines, ld flags)"
|
||||
prompt "Very verbose build"
|
||||
help
|
||||
Print simplified command lines.
|
||||
|
||||
config LIBC_UCLIBC_VERBOSITY_2
|
||||
bool
|
||||
prompt "Very verbose build"
|
||||
prompt "Brief build (show defines, ld flags)"
|
||||
help
|
||||
Print full command lines.
|
||||
|
||||
|
@ -65,9 +65,13 @@ config ARCH_REQUIRES_MULTILIB
|
||||
bool
|
||||
select MULTILIB
|
||||
|
||||
# Multilib requires 1st core pass (i.e., pass without building libgcc)
|
||||
# to determine which target cflags vary with multilib and which must be
|
||||
# passed from the arch configuration.
|
||||
config MULTILIB
|
||||
bool
|
||||
prompt "Build a multilib toolchain (READ HELP!!!)"
|
||||
select CC_CORE_PASS_1_NEEDED
|
||||
help
|
||||
If you say 'y' here, then the toolchain will also contain the C library
|
||||
optimised for some variants of the selected architecture, besides the
|
||||
|
96
patches/duma/2_5_15/200-cpp11-new-operator.patch
Normal file
96
patches/duma/2_5_15/200-cpp11-new-operator.patch
Normal file
@ -0,0 +1,96 @@
|
||||
diff --git a/dumapp.cpp b/dumapp.cpp
|
||||
index dbddf66..b5e9ba3 100644
|
||||
--- a/dumapp.cpp
|
||||
+++ b/dumapp.cpp
|
||||
@@ -189,8 +189,7 @@ void * duma_new_operator(DUMA_SIZE_T userSize, enum _DUMA_Allocator allocator, b
|
||||
* Single object form, no debug information
|
||||
* (11) = (a) ; ASW
|
||||
*/
|
||||
-void * DUMA_CDECL operator new( DUMA_SIZE_T size )
|
||||
-throw(std::bad_alloc)
|
||||
+void * DUMA_CDECL operator new( DUMA_SIZE_T size ) NEW_THROW_SPEC
|
||||
{
|
||||
return duma_new_operator(size, EFA_NEW_ELEM, true DUMA_PARAMS_UK);
|
||||
}
|
||||
@@ -253,8 +252,7 @@ throw()
|
||||
* Array object form, no debug information
|
||||
* (21) = (a) ; AAW
|
||||
*/
|
||||
-void * DUMA_CDECL operator new[]( DUMA_SIZE_T size )
|
||||
-throw(std::bad_alloc)
|
||||
+void * DUMA_CDECL operator new[]( DUMA_SIZE_T size ) NEW_THROW_SPEC
|
||||
{
|
||||
return duma_new_operator(size, EFA_NEW_ARRAY, true DUMA_PARAMS_UK);
|
||||
}
|
||||
@@ -320,8 +318,7 @@ throw()
|
||||
* Single object form with debug information
|
||||
* (31) = (a) ; ASW
|
||||
*/
|
||||
-void * DUMA_CDECL operator new( DUMA_SIZE_T size, const char *filename, int lineno )
|
||||
-throw( std::bad_alloc )
|
||||
+void * DUMA_CDECL operator new( DUMA_SIZE_T size, const char *filename, int lineno ) NEW_THROW_SPEC
|
||||
{
|
||||
return duma_new_operator(size, EFA_NEW_ELEM, true DUMA_PARAMS_FILELINE);
|
||||
}
|
||||
@@ -373,8 +370,7 @@ throw()
|
||||
* Array object form with debug information
|
||||
* (41) = (a) ; AAW
|
||||
*/
|
||||
-void * DUMA_CDECL operator new[]( DUMA_SIZE_T size, const char *filename, int lineno )
|
||||
-throw( std::bad_alloc )
|
||||
+void * DUMA_CDECL operator new[]( DUMA_SIZE_T size, const char *filename, int lineno ) NEW_THROW_SPEC
|
||||
{
|
||||
return duma_new_operator(size, EFA_NEW_ARRAY, true DUMA_PARAMS_FILELINE);
|
||||
}
|
||||
diff --git a/dumapp.h b/dumapp.h
|
||||
index fc40d9a..7175359 100644
|
||||
--- a/dumapp.h
|
||||
+++ b/dumapp.h
|
||||
@@ -64,6 +64,11 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
+#if __cplusplus <= 199711L
|
||||
+#define NEW_THROW_SPEC throw(std::bad_alloc)
|
||||
+#else
|
||||
+#define NEW_THROW_SPEC
|
||||
+#endif
|
||||
|
||||
#ifndef DUMA_NO_CPP_SUPPORT
|
||||
|
||||
@@ -81,7 +86,7 @@
|
||||
/* (12) = (b) ; ASN */
|
||||
/* (13) = (c) ; FSW */
|
||||
/* (14) = (d) ; FSN */
|
||||
- void * DUMA_CDECL operator new(DUMA_SIZE_T) throw(std::bad_alloc);
|
||||
+ void * DUMA_CDECL operator new(DUMA_SIZE_T) NEW_THROW_SPEC;
|
||||
void * DUMA_CDECL operator new(DUMA_SIZE_T, const std::nothrow_t &) throw();
|
||||
void DUMA_CDECL operator delete(void *) throw();
|
||||
void DUMA_CDECL operator delete(void *, const std::nothrow_t &) throw();
|
||||
@@ -91,7 +96,7 @@
|
||||
/* (22) = (b) ; AAN */
|
||||
/* (23) = (c) ; FAW */
|
||||
/* (24) = (d) ; FAN */
|
||||
- void * DUMA_CDECL operator new[](DUMA_SIZE_T) throw(std::bad_alloc);
|
||||
+ void * DUMA_CDECL operator new[](DUMA_SIZE_T) NEW_THROW_SPEC;
|
||||
void * DUMA_CDECL operator new[](DUMA_SIZE_T, const std::nothrow_t &) throw();
|
||||
void DUMA_CDECL operator delete[](void *) throw();
|
||||
void DUMA_CDECL operator delete[](void *, const std::nothrow_t &) throw();
|
||||
@@ -103,7 +108,7 @@
|
||||
/* (32) = (b) ; ASN */
|
||||
/* (33) = (c) ; FSW */
|
||||
/* (34) = (d) ; FSN */
|
||||
- void * DUMA_CDECL operator new(DUMA_SIZE_T, const char *, int) throw(std::bad_alloc);
|
||||
+ void * DUMA_CDECL operator new(DUMA_SIZE_T, const char *, int) NEW_THROW_SPEC;
|
||||
void * DUMA_CDECL operator new(DUMA_SIZE_T, const std::nothrow_t &, const char *, int) throw();
|
||||
void DUMA_CDECL operator delete(void *, const char *, int) throw();
|
||||
void DUMA_CDECL operator delete(void *, const std::nothrow_t &, const char *, int) throw();
|
||||
@@ -113,7 +118,7 @@
|
||||
/* (42) = (b) ; AAN */
|
||||
/* (43) = (c) ; FAW */
|
||||
/* (44) = (d) ; FAN */
|
||||
- void * DUMA_CDECL operator new[](DUMA_SIZE_T, const char *, int) throw(std::bad_alloc);
|
||||
+ void * DUMA_CDECL operator new[](DUMA_SIZE_T, const char *, int) NEW_THROW_SPEC;
|
||||
void * DUMA_CDECL operator new[](DUMA_SIZE_T, const std::nothrow_t &, const char *, int) throw();
|
||||
void DUMA_CDECL operator delete[](void *, const char *, int) throw();
|
||||
void DUMA_CDECL operator delete[](void *, const std::nothrow_t &, const char *, int) throw();
|
@ -1,151 +0,0 @@
|
||||
From 1e5f1089dec3af328fd03125d6778f666d0bd4e4 Mon Sep 17 00:00:00 2001
|
||||
From: edlinger <edlinger@138bc75d-0d04-0410-961f-82ee72b054a4>
|
||||
Date: Thu, 25 Feb 2016 15:33:50 +0000
|
||||
Subject: [PATCH 1/1] 2016-02-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
|
||||
|
||||
Backported from mainline
|
||||
2016-02-19 Jakub Jelinek <jakub@redhat.com>
|
||||
Bernd Edlinger <bernd.edlinger@hotmail.de>
|
||||
|
||||
* Make-lang.in: Invoke gperf with -L C++.
|
||||
* cfns.gperf: Remove prototypes for hash and libc_name_p
|
||||
inlines.
|
||||
* cfns.h: Regenerated.
|
||||
* except.c (nothrow_libfn_p): Adjust.
|
||||
|
||||
|
||||
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-5-branch@233720 138bc75d-0d04-0410-961f-82ee72b054a4
|
||||
---
|
||||
gcc/cp/Make-lang.in | 2 +-
|
||||
gcc/cp/cfns.gperf | 10 ++--------
|
||||
gcc/cp/cfns.h | 41 ++++++++++++++---------------------------
|
||||
gcc/cp/except.c | 3 ++-
|
||||
5 files changed, 31 insertions(+), 37 deletions(-)
|
||||
|
||||
diff --git a/gcc/cp/Make-lang.in b/gcc/cp/Make-lang.in
|
||||
index e98beb1..b09fb02 100644
|
||||
--- a/gcc/cp/Make-lang.in
|
||||
+++ b/gcc/cp/Make-lang.in
|
||||
@@ -111,7 +111,7 @@ else
|
||||
# deleting the $(srcdir)/cp/cfns.h file.
|
||||
$(srcdir)/cp/cfns.h:
|
||||
endif
|
||||
- gperf -o -C -E -k '1-6,$$' -j1 -D -N 'libc_name_p' -L ANSI-C \
|
||||
+ gperf -o -C -E -k '1-6,$$' -j1 -D -N 'libc_name_p' -L C++ \
|
||||
$(srcdir)/cp/cfns.gperf --output-file $(srcdir)/cp/cfns.h
|
||||
|
||||
#
|
||||
diff --git a/gcc/cp/cfns.gperf b/gcc/cp/cfns.gperf
|
||||
index 68acd3d..214ecf6 100644
|
||||
--- a/gcc/cp/cfns.gperf
|
||||
+++ b/gcc/cp/cfns.gperf
|
||||
@@ -1,3 +1,5 @@
|
||||
+%language=C++
|
||||
+%define class-name libc_name
|
||||
%{
|
||||
/* Copyright (C) 2000-2015 Free Software Foundation, Inc.
|
||||
|
||||
@@ -16,14 +18,6 @@ for more details.
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GCC; see the file COPYING3. If not see
|
||||
<http://www.gnu.org/licenses/>. */
|
||||
-#ifdef __GNUC__
|
||||
-__inline
|
||||
-#endif
|
||||
-static unsigned int hash (const char *, unsigned int);
|
||||
-#ifdef __GNUC__
|
||||
-__inline
|
||||
-#endif
|
||||
-const char * libc_name_p (const char *, unsigned int);
|
||||
%}
|
||||
%%
|
||||
# The standard C library functions, for feeding to gperf; the result is used
|
||||
diff --git a/gcc/cp/cfns.h b/gcc/cp/cfns.h
|
||||
index 1c6665d..596f413 100644
|
||||
--- a/gcc/cp/cfns.h
|
||||
+++ b/gcc/cp/cfns.h
|
||||
@@ -1,5 +1,5 @@
|
||||
-/* ANSI-C code produced by gperf version 3.0.3 */
|
||||
-/* Command-line: gperf -o -C -E -k '1-6,$' -j1 -D -N libc_name_p -L ANSI-C cfns.gperf */
|
||||
+/* C++ code produced by gperf version 3.0.4 */
|
||||
+/* Command-line: gperf -o -C -E -k '1-6,$' -j1 -D -N libc_name_p -L C++ --output-file cfns.h cfns.gperf */
|
||||
|
||||
#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
|
||||
&& ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
|
||||
@@ -28,7 +28,7 @@
|
||||
#error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gnu-gperf@gnu.org>."
|
||||
#endif
|
||||
|
||||
-#line 1 "cfns.gperf"
|
||||
+#line 3 "cfns.gperf"
|
||||
|
||||
/* Copyright (C) 2000-2015 Free Software Foundation, Inc.
|
||||
|
||||
@@ -47,25 +47,18 @@ for more details.
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GCC; see the file COPYING3. If not see
|
||||
<http://www.gnu.org/licenses/>. */
|
||||
-#ifdef __GNUC__
|
||||
-__inline
|
||||
-#endif
|
||||
-static unsigned int hash (const char *, unsigned int);
|
||||
-#ifdef __GNUC__
|
||||
-__inline
|
||||
-#endif
|
||||
-const char * libc_name_p (const char *, unsigned int);
|
||||
/* maximum key range = 391, duplicates = 0 */
|
||||
|
||||
-#ifdef __GNUC__
|
||||
-__inline
|
||||
-#else
|
||||
-#ifdef __cplusplus
|
||||
-inline
|
||||
-#endif
|
||||
-#endif
|
||||
-static unsigned int
|
||||
-hash (register const char *str, register unsigned int len)
|
||||
+class libc_name
|
||||
+{
|
||||
+private:
|
||||
+ static inline unsigned int hash (const char *str, unsigned int len);
|
||||
+public:
|
||||
+ static const char *libc_name_p (const char *str, unsigned int len);
|
||||
+};
|
||||
+
|
||||
+inline unsigned int
|
||||
+libc_name::hash (register const char *str, register unsigned int len)
|
||||
{
|
||||
static const unsigned short asso_values[] =
|
||||
{
|
||||
@@ -122,14 +115,8 @@ hash (register const char *str, register unsigned int len)
|
||||
return hval + asso_values[(unsigned char)str[len - 1]];
|
||||
}
|
||||
|
||||
-#ifdef __GNUC__
|
||||
-__inline
|
||||
-#ifdef __GNUC_STDC_INLINE__
|
||||
-__attribute__ ((__gnu_inline__))
|
||||
-#endif
|
||||
-#endif
|
||||
const char *
|
||||
-libc_name_p (register const char *str, register unsigned int len)
|
||||
+libc_name::libc_name_p (register const char *str, register unsigned int len)
|
||||
{
|
||||
enum
|
||||
{
|
||||
diff --git a/gcc/cp/except.c b/gcc/cp/except.c
|
||||
index 3ff1ce6..2f2e396 100644
|
||||
--- a/gcc/cp/except.c
|
||||
+++ b/gcc/cp/except.c
|
||||
@@ -1040,7 +1040,8 @@ nothrow_libfn_p (const_tree fn)
|
||||
unless the system headers are playing rename tricks, and if
|
||||
they are, we don't want to be confused by them. */
|
||||
id = DECL_NAME (fn);
|
||||
- return !!libc_name_p (IDENTIFIER_POINTER (id), IDENTIFIER_LENGTH (id));
|
||||
+ return !!libc_name::libc_name_p (IDENTIFIER_POINTER (id),
|
||||
+ IDENTIFIER_LENGTH (id));
|
||||
}
|
||||
|
||||
/* Returns nonzero if an exception of type FROM will be caught by a
|
||||
--
|
||||
1.7.1
|
174
patches/gcc/5.4.0/874-xtensa-add-uclinux-support.patch
Normal file
174
patches/gcc/5.4.0/874-xtensa-add-uclinux-support.patch
Normal file
@ -0,0 +1,174 @@
|
||||
From 70c2cb98fb129b4766b5da0f945dc41fd568c77a Mon Sep 17 00:00:00 2001
|
||||
From: Max Filippov <jcmvbkbc@gmail.com>
|
||||
Date: Sat, 22 Aug 2015 08:44:26 +0300
|
||||
Subject: [PATCH] xtensa: add uclinux support
|
||||
|
||||
2015-10-03 Max Filippov <jcmvbkbc@gmail.com>
|
||||
gcc/
|
||||
* config.gcc (xtensa*-*-uclinux*): New configuration.
|
||||
* config/xtensa/uclinux.h: New file.
|
||||
* config/xtensa/uclinux.opt: New file.
|
||||
|
||||
libgcc/
|
||||
* config.host (xtensa*-*-uclinux*): New configuration.
|
||||
|
||||
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
|
||||
---
|
||||
Backported from: r228450
|
||||
|
||||
gcc/config.gcc | 5 ++++
|
||||
gcc/config/xtensa/uclinux.h | 69 +++++++++++++++++++++++++++++++++++++++++++
|
||||
gcc/config/xtensa/uclinux.opt | 32 ++++++++++++++++++++
|
||||
libgcc/config.host | 5 ++++
|
||||
4 files changed, 111 insertions(+)
|
||||
create mode 100644 gcc/config/xtensa/uclinux.h
|
||||
create mode 100644 gcc/config/xtensa/uclinux.opt
|
||||
|
||||
diff --git a/gcc/config.gcc b/gcc/config.gcc
|
||||
index c52f5a8..56797bd 100644
|
||||
--- a/gcc/config.gcc
|
||||
+++ b/gcc/config.gcc
|
||||
@@ -2995,6 +2995,11 @@ xtensa*-*-linux*)
|
||||
tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h xtensa/linux.h"
|
||||
tmake_file="${tmake_file} xtensa/t-xtensa"
|
||||
;;
|
||||
+xtensa*-*-uclinux*)
|
||||
+ tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h xtensa/uclinux.h"
|
||||
+ tmake_file="${tmake_file} xtensa/t-xtensa"
|
||||
+ extra_options="${extra_options} xtensa/uclinux.opt"
|
||||
+ ;;
|
||||
am33_2.0-*-linux*)
|
||||
tm_file="mn10300/mn10300.h dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h mn10300/linux.h"
|
||||
gas=yes gnu_ld=yes
|
||||
diff --git a/gcc/config/xtensa/uclinux.h b/gcc/config/xtensa/uclinux.h
|
||||
new file mode 100644
|
||||
index 0000000..4606020
|
||||
--- /dev/null
|
||||
+++ b/gcc/config/xtensa/uclinux.h
|
||||
@@ -0,0 +1,69 @@
|
||||
+/* Xtensa uClinux configuration.
|
||||
+ Derived from the configuration for GCC for Intel i386 running Linux.
|
||||
+ Copyright (C) 2001-2015 Free Software Foundation, Inc.
|
||||
+
|
||||
+This file is part of GCC.
|
||||
+
|
||||
+GCC is free software; you can redistribute it and/or modify it under
|
||||
+the terms of the GNU General Public License as published by the Free
|
||||
+Software Foundation; either version 3, or (at your option) any later
|
||||
+version.
|
||||
+
|
||||
+GCC is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
+WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
+for more details.
|
||||
+
|
||||
+You should have received a copy of the GNU General Public License
|
||||
+along with GCC; see the file COPYING3. If not see
|
||||
+<http://www.gnu.org/licenses/>. */
|
||||
+
|
||||
+#undef TARGET_OS_CPP_BUILTINS
|
||||
+#define TARGET_OS_CPP_BUILTINS() \
|
||||
+ do \
|
||||
+ { \
|
||||
+ GNU_USER_TARGET_OS_CPP_BUILTINS (); \
|
||||
+ builtin_define ("__uClinux__"); \
|
||||
+ } \
|
||||
+ while (0)
|
||||
+
|
||||
+#undef SUBTARGET_CPP_SPEC
|
||||
+#define SUBTARGET_CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}"
|
||||
+
|
||||
+#undef SIZE_TYPE
|
||||
+#define SIZE_TYPE "unsigned int"
|
||||
+
|
||||
+#undef PTRDIFF_TYPE
|
||||
+#define PTRDIFF_TYPE "int"
|
||||
+
|
||||
+#undef WCHAR_TYPE
|
||||
+#define WCHAR_TYPE "long int"
|
||||
+
|
||||
+#undef WCHAR_TYPE_SIZE
|
||||
+#define WCHAR_TYPE_SIZE 32
|
||||
+
|
||||
+#undef ASM_SPEC
|
||||
+#define ASM_SPEC \
|
||||
+ "%{mtext-section-literals:--text-section-literals} \
|
||||
+ %{mno-text-section-literals:--no-text-section-literals} \
|
||||
+ %{mtarget-align:--target-align} \
|
||||
+ %{mno-target-align:--no-target-align} \
|
||||
+ %{mlongcalls:--longcalls} \
|
||||
+ %{mno-longcalls:--no-longcalls} \
|
||||
+ %{mauto-litpools:--auto-litpools} \
|
||||
+ %{mno-auto-litpools:--no-auto-litpools}"
|
||||
+
|
||||
+#undef LINK_SPEC
|
||||
+#define LINK_SPEC "%{!no-elf2flt:%{!elf2flt*:-elf2flt}}"
|
||||
+
|
||||
+#undef LOCAL_LABEL_PREFIX
|
||||
+#define LOCAL_LABEL_PREFIX "."
|
||||
+
|
||||
+/* Always enable "-fpic" for Xtensa Linux. */
|
||||
+#define XTENSA_ALWAYS_PIC 1
|
||||
+
|
||||
+#undef TARGET_LIBC_HAS_FUNCTION
|
||||
+#define TARGET_LIBC_HAS_FUNCTION no_c99_libc_has_function
|
||||
+
|
||||
+#undef DBX_REGISTER_NUMBER
|
||||
+
|
||||
diff --git a/gcc/config/xtensa/uclinux.opt b/gcc/config/xtensa/uclinux.opt
|
||||
new file mode 100644
|
||||
index 0000000..95ef777
|
||||
--- /dev/null
|
||||
+++ b/gcc/config/xtensa/uclinux.opt
|
||||
@@ -0,0 +1,32 @@
|
||||
+; Xtensa uClinux options.
|
||||
+
|
||||
+; Copyright (C) 2015 Free Software Foundation, Inc.
|
||||
+;
|
||||
+; This file is part of GCC.
|
||||
+;
|
||||
+; GCC is free software; you can redistribute it and/or modify it under
|
||||
+; the terms of the GNU General Public License as published by the Free
|
||||
+; Software Foundation; either version 3, or (at your option) any later
|
||||
+; version.
|
||||
+;
|
||||
+; GCC is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
+; WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
+; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
+; for more details.
|
||||
+;
|
||||
+; You should have received a copy of the GNU General Public License
|
||||
+; along with GCC; see the file COPYING3. If not see
|
||||
+; <http://www.gnu.org/licenses/>.
|
||||
+
|
||||
+; See the GCC internals manual (options.texi) for a description of
|
||||
+; this file's format.
|
||||
+
|
||||
+; Please try to keep this file in ASCII collating order.
|
||||
+
|
||||
+elf2flt
|
||||
+Driver
|
||||
+
|
||||
+elf2flt=
|
||||
+Driver JoinedOrMissing
|
||||
+
|
||||
+; This comment is to ensure we retain the blank line above.
|
||||
diff --git a/libgcc/config.host b/libgcc/config.host
|
||||
index 2c64756..2ee92c1 100644
|
||||
--- a/libgcc/config.host
|
||||
+++ b/libgcc/config.host
|
||||
@@ -1295,6 +1295,11 @@ xtensa*-*-linux*)
|
||||
tmake_file="$tmake_file xtensa/t-xtensa xtensa/t-linux t-slibgcc-libgcc"
|
||||
md_unwind_header=xtensa/linux-unwind.h
|
||||
;;
|
||||
+xtensa*-*-uclinux*)
|
||||
+ tmake_file="$tmake_file xtensa/t-xtensa xtensa/t-linux t-slibgcc-libgcc"
|
||||
+ md_unwind_header=xtensa/linux-unwind.h
|
||||
+ extra_parts="$extra_parts crtbeginS.o crtbeginT.o crtendS.o"
|
||||
+ ;;
|
||||
am33_2.0-*-linux*)
|
||||
# Don't need crtbeginT.o from *-*-linux* default.
|
||||
extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
|
||||
--
|
||||
1.8.1.4
|
||||
|
15
patches/gcc/5.4.0/890-fix-m68k-compile.patch
Normal file
15
patches/gcc/5.4.0/890-fix-m68k-compile.patch
Normal file
@ -0,0 +1,15 @@
|
||||
remove unused header, which breaks the toolchain building
|
||||
|
||||
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
|
||||
|
||||
diff -Nur gcc-5.3.0.orig/libgcc/config/m68k/linux-atomic.c gcc-5.3.0/libgcc/config/m68k/linux-atomic.c
|
||||
--- gcc-5.3.0.orig/libgcc/config/m68k/linux-atomic.c 2015-01-05 13:33:28.000000000 +0100
|
||||
+++ gcc-5.3.0/libgcc/config/m68k/linux-atomic.c 2016-03-19 09:25:07.000000000 +0100
|
||||
@@ -33,7 +33,6 @@
|
||||
using the kernel helper defined below. There is no support for
|
||||
64-bit operations yet. */
|
||||
|
||||
-#include <asm/unistd.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#ifndef __NR_atomic_cmpxchg_32
|
18
patches/gcc/5.4.0/891-fix-m68k-uclinux.patch
Normal file
18
patches/gcc/5.4.0/891-fix-m68k-uclinux.patch
Normal file
@ -0,0 +1,18 @@
|
||||
avoids internal compiler error while compiling linux-atomic.c
|
||||
See here:
|
||||
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53833
|
||||
|
||||
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
|
||||
|
||||
diff -Nur gcc-5.3.0.orig/libgcc/config.host gcc-5.3.0/libgcc/config.host
|
||||
--- gcc-5.3.0.orig/libgcc/config.host 2015-10-01 14:01:18.000000000 +0200
|
||||
+++ gcc-5.3.0/libgcc/config.host 2016-04-26 21:30:25.353691745 +0200
|
||||
@@ -794,7 +794,7 @@
|
||||
m68k*-*-openbsd*)
|
||||
;;
|
||||
m68k-*-uclinux*) # Motorola m68k/ColdFire running uClinux with uClibc
|
||||
- tmake_file="$tmake_file m68k/t-floatlib m68k/t-linux"
|
||||
+ tmake_file="$tmake_file m68k/t-floatlib"
|
||||
md_unwind_header=m68k/linux-unwind.h
|
||||
;;
|
||||
m68k-*-linux*) # Motorola m68k's running GNU/Linux
|
24
patches/gcc/5.4.0/892-microblaze-uclibc.patch
Normal file
24
patches/gcc/5.4.0/892-microblaze-uclibc.patch
Normal file
@ -0,0 +1,24 @@
|
||||
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 }
|
28
patches/gcc/5.4.0/910-nios2-bad-multilib-default.patch
Normal file
28
patches/gcc/5.4.0/910-nios2-bad-multilib-default.patch
Normal file
@ -0,0 +1,28 @@
|
||||
diff -urpN gcc-5.3.0.orig/gcc/config/nios2/nios2.h gcc-5.3.0/gcc/config/nios2/nios2.h
|
||||
--- gcc-5.3.0.orig/gcc/config/nios2/nios2.h 2016-04-18 10:32:41.046254061 -0700
|
||||
+++ gcc-5.3.0/gcc/config/nios2/nios2.h 2016-04-18 10:37:25.998841674 -0700
|
||||
@@ -55,11 +55,11 @@
|
||||
#if TARGET_ENDIAN_DEFAULT == 0
|
||||
# define ASM_SPEC "%{!meb:-EL} %{meb:-EB}"
|
||||
# define LINK_SPEC_ENDIAN "%{!meb:-EL} %{meb:-EB}"
|
||||
-# define MULTILIB_DEFAULTS { "EL" }
|
||||
+# define MULTILIB_DEFAULTS { "mel" }
|
||||
#else
|
||||
# define ASM_SPEC "%{!mel:-EB} %{mel:-EL}"
|
||||
# define LINK_SPEC_ENDIAN "%{!mel:-EB} %{mel:-EL}"
|
||||
-# define MULTILIB_DEFAULTS { "EB" }
|
||||
+# define MULTILIB_DEFAULTS { "meb" }
|
||||
#endif
|
||||
|
||||
#define LINK_SPEC LINK_SPEC_ENDIAN \
|
||||
diff -urpN gcc-5.3.0.orig/gcc/config/nios2/t-nios2 gcc-5.3.0/gcc/config/nios2/t-nios2
|
||||
--- gcc-5.3.0.orig/gcc/config/nios2/t-nios2 2016-04-18 10:32:41.046254061 -0700
|
||||
+++ gcc-5.3.0/gcc/config/nios2/t-nios2 2016-04-18 10:36:41.091312157 -0700
|
||||
@@ -22,6 +22,5 @@
|
||||
# MULTILIB_DIRNAMES = nomul mulx fpu-60-1 fpu-60-2
|
||||
# MULTILIB_EXCEPTIONS =
|
||||
|
||||
-# MULTILIB_OPTIONS += EL/EB
|
||||
+# MULTILIB_OPTIONS += mel/meb
|
||||
# MULTILIB_DIRNAMES += le be
|
||||
-# MULTILIB_MATCHES += EL=mel EB=meb
|
@ -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
|
19
patches/gcc/5.4.0/940-uclinux-enable-threads.patch
Normal file
19
patches/gcc/5.4.0/940-uclinux-enable-threads.patch
Normal file
@ -0,0 +1,19 @@
|
||||
Enable POSIX threads for uClinux targets
|
||||
Reported upstream:
|
||||
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71721
|
||||
|
||||
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
|
||||
|
||||
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-07-01 21:26:02.772958441 +0200
|
||||
@@ -808,6 +808,9 @@
|
||||
*-*-uclinux*)
|
||||
extra_options="$extra_options gnu-user.opt"
|
||||
use_gcc_stdint=wrap
|
||||
+ case ${enable_threads} in
|
||||
+ "" | yes | posix) thread_file='posix' ;;
|
||||
+ esac
|
||||
tm_defines="$tm_defines DEFAULT_LIBC=LIBC_UCLIBC SINGLE_LIBC"
|
||||
;;
|
||||
*-*-rdos*)
|
15
patches/gcc/6.1.0/100-uclibc-conf.patch
Normal file
15
patches/gcc/6.1.0/100-uclibc-conf.patch
Normal file
@ -0,0 +1,15 @@
|
||||
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
|
||||
+elif [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-uclibc ]
|
||||
+ then
|
||||
+ make all-gdb all-dejagnu all-ld || exit 1
|
||||
+ make install-gdb install-dejagnu install-ld || exit 1
|
||||
elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then
|
||||
make bootstrap || exit 1
|
||||
make install || exit 1
|
13
patches/gcc/6.1.0/301-missing-execinfo_h.patch
Normal file
13
patches/gcc/6.1.0/301-missing-execinfo_h.patch
Normal file
@ -0,0 +1,13 @@
|
||||
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__)
|
||||
+ && !defined(__ia64__) && !defined(__UCLIBC__)
|
||||
# ifndef GC_HAVE_BUILTIN_BACKTRACE
|
||||
# define GC_HAVE_BUILTIN_BACKTRACE
|
||||
# endif
|
@ -0,0 +1,160 @@
|
||||
diff -urN gcc-5.3.0.orig/config/gcc-plugin.m4 gcc-5.3.0/config/gcc-plugin.m4
|
||||
--- gcc-5.3.0.orig/config/gcc-plugin.m4 2015-12-19 14:39:04.120734900 +0000
|
||||
+++ gcc-5.3.0/config/gcc-plugin.m4 2015-12-20 01:28:45.381965300 +0000
|
||||
@@ -20,6 +20,9 @@
|
||||
|
||||
pluginlibs=
|
||||
|
||||
+ PICFLAG="-fPIC"
|
||||
+ UNDEFINEDPREAMBLE="extern int X;"
|
||||
+ UNDEFINEDCODE="return X == 0;"
|
||||
case "${host}" in
|
||||
*-*-darwin*)
|
||||
if test x$build = x$host; then
|
||||
@@ -30,6 +33,11 @@
|
||||
export_sym_check=
|
||||
fi
|
||||
;;
|
||||
+ *-*-mingw*|*-*-cygwin*|*-*-msys*)
|
||||
+ PICFLAG=""
|
||||
+ UNDEFINEDPREAMBLE=""
|
||||
+ UNDEFINEDCODE=""
|
||||
+ ;;
|
||||
*)
|
||||
if test x$build = x$host; then
|
||||
export_sym_check="objdump${exeext} -T"
|
||||
@@ -81,17 +89,17 @@
|
||||
case "${host}" in
|
||||
*-*-darwin*)
|
||||
CFLAGS=`echo $CFLAGS | sed s/-mdynamic-no-pic//g`
|
||||
- CFLAGS="$CFLAGS -fPIC"
|
||||
+ CFLAGS="$CFLAGS ${PICFLAG}"
|
||||
LDFLAGS="$LDFLAGS -shared -undefined dynamic_lookup"
|
||||
;;
|
||||
*)
|
||||
- CFLAGS="$CFLAGS -fPIC"
|
||||
- LDFLAGS="$LDFLAGS -fPIC -shared"
|
||||
+ CFLAGS="$CFLAGS ${PICFLAG}"
|
||||
+ LDFLAGS="$LDFLAGS ${PICFLAG} -shared"
|
||||
;;
|
||||
esac
|
||||
- AC_MSG_CHECKING([for -fPIC -shared])
|
||||
+ AC_MSG_CHECKING([for ${PICFLAG} -shared])
|
||||
AC_TRY_LINK(
|
||||
- [extern int X;],[return X == 0;],
|
||||
+ [${UNDEFINEDPREAMBLE}],[${UNDEFINEDCODE}],
|
||||
[AC_MSG_RESULT([yes]); have_pic_shared=yes],
|
||||
[AC_MSG_RESULT([no]); have_pic_shared=no])
|
||||
if test x"$have_pic_shared" != x"yes" -o x"$ac_cv_search_dlopen" = x"no"; then
|
||||
diff -urN gcc-5.3.0.orig/gcc/configure gcc-5.3.0/gcc/configure
|
||||
--- gcc-5.3.0.orig/gcc/configure 2015-12-19 14:40:16.893975900 +0000
|
||||
+++ gcc-5.3.0/gcc/configure 2015-12-20 01:28:45.472476700 +0000
|
||||
@@ -28386,6 +28386,9 @@
|
||||
|
||||
pluginlibs=
|
||||
|
||||
+ PICFLAG="-fPIC"
|
||||
+ UNDEFINEDPREAMBLE="extern int X;"
|
||||
+ UNDEFINEDCODE="return X == 0;"
|
||||
case "${host}" in
|
||||
*-*-darwin*)
|
||||
if test x$build = x$host; then
|
||||
@@ -28396,6 +28399,11 @@
|
||||
export_sym_check=
|
||||
fi
|
||||
;;
|
||||
+ *-*-mingw*|*-*-cygwin*|*-*-msys*)
|
||||
+ PICFLAG=""
|
||||
+ UNDEFINEDPREAMBLE=""
|
||||
+ UNDEFINEDCODE=""
|
||||
+ ;;
|
||||
*)
|
||||
if test x$build = x$host; then
|
||||
export_sym_check="objdump${exeext} -T"
|
||||
@@ -28508,23 +28516,23 @@
|
||||
case "${host}" in
|
||||
*-*-darwin*)
|
||||
CFLAGS=`echo $CFLAGS | sed s/-mdynamic-no-pic//g`
|
||||
- CFLAGS="$CFLAGS -fPIC"
|
||||
+ CFLAGS="$CFLAGS ${PICFLAG}"
|
||||
LDFLAGS="$LDFLAGS -shared -undefined dynamic_lookup"
|
||||
;;
|
||||
*)
|
||||
- CFLAGS="$CFLAGS -fPIC"
|
||||
- LDFLAGS="$LDFLAGS -fPIC -shared"
|
||||
+ CFLAGS="$CFLAGS ${PICFLAG}"
|
||||
+ LDFLAGS="$LDFLAGS ${PICFLAG} -shared"
|
||||
;;
|
||||
esac
|
||||
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -fPIC -shared" >&5
|
||||
-$as_echo_n "checking for -fPIC -shared... " >&6; }
|
||||
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${PICFLAG} -shared" >&5
|
||||
+$as_echo_n "checking for ${PICFLAG} -shared... " >&6; }
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
-extern int X;
|
||||
+${UNDEFINEDPREAMBLE}
|
||||
int
|
||||
main ()
|
||||
{
|
||||
-return X == 0;
|
||||
+${UNDEFINEDCODE}
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
diff -urN gcc-5.3.0.orig/libcc1/configure gcc-5.3.0/libcc1/configure
|
||||
--- gcc-5.3.0.orig/libcc1/configure 2015-12-19 14:40:20.855979000 +0000
|
||||
+++ gcc-5.3.0/libcc1/configure 2015-12-20 01:28:45.504980900 +0000
|
||||
@@ -14500,6 +14500,9 @@
|
||||
|
||||
pluginlibs=
|
||||
|
||||
+ PICFLAG="-fPIC"
|
||||
+ UNDEFINEDPREAMBLE="extern int X;"
|
||||
+ UNDEFINEDCODE="return X == 0;"
|
||||
case "${host}" in
|
||||
*-*-darwin*)
|
||||
if test x$build = x$host; then
|
||||
@@ -14510,6 +14513,11 @@
|
||||
export_sym_check=
|
||||
fi
|
||||
;;
|
||||
+ *-*-mingw*|*-*-cygwin*|*-*-msys*)
|
||||
+ PICFLAG=""
|
||||
+ UNDEFINEDPREAMBLE=""
|
||||
+ UNDEFINEDCODE=""
|
||||
+ ;;
|
||||
*)
|
||||
if test x$build = x$host; then
|
||||
export_sym_check="objdump${exeext} -T"
|
||||
@@ -14622,23 +14630,23 @@
|
||||
case "${host}" in
|
||||
*-*-darwin*)
|
||||
CFLAGS=`echo $CFLAGS | sed s/-mdynamic-no-pic//g`
|
||||
- CFLAGS="$CFLAGS -fPIC"
|
||||
+ CFLAGS="$CFLAGS ${PICFLAG}"
|
||||
LDFLAGS="$LDFLAGS -shared -undefined dynamic_lookup"
|
||||
;;
|
||||
*)
|
||||
- CFLAGS="$CFLAGS -fPIC"
|
||||
- LDFLAGS="$LDFLAGS -fPIC -shared"
|
||||
+ CFLAGS="$CFLAGS ${PICFLAG}"
|
||||
+ LDFLAGS="$LDFLAGS ${PICFLAG} -shared"
|
||||
;;
|
||||
esac
|
||||
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -fPIC -shared" >&5
|
||||
-$as_echo_n "checking for -fPIC -shared... " >&6; }
|
||||
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${PICFLAG} -shared" >&5
|
||||
+$as_echo_n "checking for ${PICFLAG} -shared... " >&6; }
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
-extern int X;
|
||||
+${UNDEFINEDPREAMBLE}
|
||||
int
|
||||
main ()
|
||||
{
|
||||
-return X == 0;
|
||||
+${UNDEFINEDCODE}
|
||||
;
|
||||
return 0;
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
diff -urN gcc-5.3.0.orig/libcc1/connection.cc gcc-5.3.0/libcc1/connection.cc
|
||||
--- gcc-5.3.0.orig/libcc1/connection.cc 2015-12-19 14:40:20.860479600 +0000
|
||||
+++ gcc-5.3.0/libcc1/connection.cc 2015-12-20 01:31:04.346611500 +0000
|
||||
@@ -21,6 +21,7 @@
|
||||
#include <string>
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
+#include <sys/select.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include "marshall.hh"
|
30
patches/gcc/6.1.0/810-arm-softfloat-libgcc.patch
Normal file
30
patches/gcc/6.1.0/810-arm-softfloat-libgcc.patch
Normal file
@ -0,0 +1,30 @@
|
||||
Index: b/gcc/config/arm/linux-elf.h
|
||||
===================================================================
|
||||
--- a/gcc/config/arm/linux-elf.h
|
||||
+++ b/gcc/config/arm/linux-elf.h
|
||||
@@ -60,7 +60,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"
|
||||
|
||||
Index: b/libgcc/config/arm/t-linux
|
||||
===================================================================
|
||||
--- a/libgcc/config/arm/t-linux
|
||||
+++ b/libgcc/config/arm/t-linux
|
||||
@@ -1,6 +1,11 @@
|
||||
LIB1ASMSRC = arm/lib1funcs.S
|
||||
LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx _clzsi2 _clzdi2 \
|
||||
- _ctzsi2 _arm_addsubdf3 _arm_addsubsf3
|
||||
+ _ctzsi2 _arm_addsubdf3 _arm_addsubsf3 \
|
||||
+ _arm_addsubdf3 _arm_addsubsf3 \
|
||||
+ _arm_negdf2 _arm_muldivdf3 _arm_cmpdf2 _arm_unorddf2 \
|
||||
+ _arm_fixdfsi _arm_fixunsdfsi _arm_truncdfsf2 \
|
||||
+ _arm_negsf2 _arm_muldivsf3 _arm_cmpsf2 _arm_unordsf2 \
|
||||
+ _arm_fixsfsi _arm_fixunssfsi
|
||||
|
||||
# Just for these, we omit the frame pointer since it makes such a big
|
||||
# difference.
|
15
patches/gcc/6.1.0/830-arm_unbreak_armv4t.patch
Normal file
15
patches/gcc/6.1.0/830-arm_unbreak_armv4t.patch
Normal file
@ -0,0 +1,15 @@
|
||||
http://sourceware.org/ml/crossgcc/2008-05/msg00009.html
|
||||
|
||||
Index: b/gcc/config/arm/linux-eabi.h
|
||||
===================================================================
|
||||
--- 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. */
|
166
patches/gcc/6.1.0/840-microblaze-enable-dwarf-eh-support.patch
Normal file
166
patches/gcc/6.1.0/840-microblaze-enable-dwarf-eh-support.patch
Normal file
@ -0,0 +1,166 @@
|
||||
Fetched from Xilinx gcc git at https://github.com/Xilinx/gcc
|
||||
|
||||
From 23c35173490ac2d6348a668dfc9c1a6eb62171f2 Mon Sep 17 00:00:00 2001
|
||||
From: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>
|
||||
Date: Mon, 18 Jun 2012 20:18:13 +0200
|
||||
Subject: [PATCH] [Patch, microblaze]: Enable DWARF exception handling support.
|
||||
|
||||
Changelog
|
||||
|
||||
2013-03-18 Edgar E. Iglesias <edgar.iglesias@xilinx.com>
|
||||
David Holsgrove <david.holsgrove@xilinx.com>
|
||||
|
||||
* common/config/microblaze/microblaze-common.c: Remove
|
||||
TARGET_EXCEPT_UNWIND_INFO definition.
|
||||
* config/microblaze/microblaze-protos.h: Add
|
||||
microblaze_eh_return prototype.
|
||||
* gcc/config/microblaze/microblaze.c: (microblaze_must_save_register,
|
||||
microblaze_expand_epilogue, microblaze_return_addr): Handle
|
||||
calls_eh_return
|
||||
(microblaze_eh_return): New function.
|
||||
* gcc/config/microblaze/microblaze.h: Define RETURN_ADDR_OFFSET,
|
||||
EH_RETURN_DATA_REGNO, MB_EH_STACKADJ_REGNUM, EH_RETURN_STACKADJ_RTX,
|
||||
ASM_PREFERRED_EH_DATA_FORMAT
|
||||
* gcc/config/microblaze/microblaze.md: Define eh_return pattern.
|
||||
|
||||
Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com>
|
||||
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
|
||||
---
|
||||
gcc/common/config/microblaze/microblaze-common.c | 3 ---
|
||||
gcc/config/microblaze/microblaze-protos.h | 1 +
|
||||
gcc/config/microblaze/microblaze.c | 29 ++++++++++++++++++++----
|
||||
gcc/config/microblaze/microblaze.h | 15 ++++++++++++
|
||||
gcc/config/microblaze/microblaze.md | 11 +++++++++
|
||||
5 files changed, 52 insertions(+), 7 deletions(-)
|
||||
|
||||
Index: b/gcc/common/config/microblaze/microblaze-common.c
|
||||
===================================================================
|
||||
--- a/gcc/common/config/microblaze/microblaze-common.c
|
||||
+++ b/gcc/common/config/microblaze/microblaze-common.c
|
||||
@@ -37,7 +37,4 @@
|
||||
#undef TARGET_OPTION_OPTIMIZATION_TABLE
|
||||
#define TARGET_OPTION_OPTIMIZATION_TABLE microblaze_option_optimization_table
|
||||
|
||||
-#undef TARGET_EXCEPT_UNWIND_INFO
|
||||
-#define TARGET_EXCEPT_UNWIND_INFO sjlj_except_unwind_info
|
||||
-
|
||||
struct gcc_targetm_common targetm_common = TARGETM_COMMON_INITIALIZER;
|
||||
Index: b/gcc/config/microblaze/microblaze-protos.h
|
||||
===================================================================
|
||||
--- a/gcc/config/microblaze/microblaze-protos.h
|
||||
+++ b/gcc/config/microblaze/microblaze-protos.h
|
||||
@@ -56,6 +56,7 @@
|
||||
extern int symbol_mentioned_p (rtx);
|
||||
extern int label_mentioned_p (rtx);
|
||||
extern bool microblaze_cannot_force_const_mem (machine_mode, rtx);
|
||||
+extern void microblaze_eh_return (rtx op0);
|
||||
#endif /* RTX_CODE */
|
||||
|
||||
/* Declare functions in microblaze-c.c. */
|
||||
Index: b/gcc/config/microblaze/microblaze.c
|
||||
===================================================================
|
||||
--- a/gcc/config/microblaze/microblaze.c
|
||||
+++ b/gcc/config/microblaze/microblaze.c
|
||||
@@ -1959,6 +1959,11 @@
|
||||
if (frame_pointer_needed && (regno == HARD_FRAME_POINTER_REGNUM))
|
||||
return 1;
|
||||
|
||||
+ if (crtl->calls_eh_return
|
||||
+ && regno == MB_ABI_SUB_RETURN_ADDR_REGNUM) {
|
||||
+ return 1;
|
||||
+ }
|
||||
+
|
||||
if (!crtl->is_leaf)
|
||||
{
|
||||
if (regno == MB_ABI_SUB_RETURN_ADDR_REGNUM)
|
||||
@@ -1986,6 +1991,13 @@
|
||||
return 1;
|
||||
}
|
||||
|
||||
+ if (crtl->calls_eh_return
|
||||
+ && (regno == EH_RETURN_DATA_REGNO (0)
|
||||
+ || regno == EH_RETURN_DATA_REGNO (1)))
|
||||
+ {
|
||||
+ return 1;
|
||||
+ }
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -3067,6 +3079,12 @@
|
||||
emit_insn (gen_addsi3 (stack_pointer_rtx, stack_pointer_rtx, fsiz_rtx));
|
||||
}
|
||||
|
||||
+ if (crtl->calls_eh_return)
|
||||
+ emit_insn (gen_addsi3 (stack_pointer_rtx,
|
||||
+ stack_pointer_rtx,
|
||||
+ gen_rtx_raw_REG (SImode,
|
||||
+ MB_EH_STACKADJ_REGNUM)));
|
||||
+
|
||||
emit_jump_insn (gen_return_internal (gen_rtx_REG (Pmode, GP_REG_FIRST +
|
||||
MB_ABI_SUB_RETURN_ADDR_REGNUM)));
|
||||
}
|
||||
@@ -3364,10 +3382,13 @@
|
||||
if (count != 0)
|
||||
return NULL_RTX;
|
||||
|
||||
- return gen_rtx_PLUS (Pmode,
|
||||
- get_hard_reg_initial_val (Pmode,
|
||||
- MB_ABI_SUB_RETURN_ADDR_REGNUM),
|
||||
- GEN_INT (8));
|
||||
+ return get_hard_reg_initial_val (Pmode,
|
||||
+ MB_ABI_SUB_RETURN_ADDR_REGNUM);
|
||||
+}
|
||||
+
|
||||
+void microblaze_eh_return (rtx op0)
|
||||
+{
|
||||
+ emit_insn (gen_movsi(gen_rtx_MEM(Pmode, stack_pointer_rtx), op0));
|
||||
}
|
||||
|
||||
/* Queue an .ident string in the queue of top-level asm statements.
|
||||
Index: b/gcc/config/microblaze/microblaze.h
|
||||
===================================================================
|
||||
--- a/gcc/config/microblaze/microblaze.h
|
||||
+++ b/gcc/config/microblaze/microblaze.h
|
||||
@@ -184,6 +184,21 @@
|
||||
#define INCOMING_RETURN_ADDR_RTX \
|
||||
gen_rtx_REG (VOIDmode, GP_REG_FIRST + MB_ABI_SUB_RETURN_ADDR_REGNUM)
|
||||
|
||||
+/* Specifies the offset from INCOMING_RETURN_ADDR_RTX and the actual return PC. */
|
||||
+#define RETURN_ADDR_OFFSET (8)
|
||||
+
|
||||
+/* Describe how we implement __builtin_eh_return. */
|
||||
+#define EH_RETURN_DATA_REGNO(N) (((N) < 2) ? MB_ABI_FIRST_ARG_REGNUM + (N) : INVALID_REGNUM)
|
||||
+
|
||||
+#define MB_EH_STACKADJ_REGNUM MB_ABI_INT_RETURN_VAL2_REGNUM
|
||||
+#define EH_RETURN_STACKADJ_RTX gen_rtx_REG (Pmode, MB_EH_STACKADJ_REGNUM)
|
||||
+
|
||||
+/* Select a format to encode pointers in exception handling data. CODE
|
||||
+ is 0 for data, 1 for code labels, 2 for function pointers. GLOBAL is
|
||||
+ true if the symbol may be affected by dynamic relocations. */
|
||||
+#define ASM_PREFERRED_EH_DATA_FORMAT(CODE,GLOBAL) \
|
||||
+ ((flag_pic || GLOBAL) ? DW_EH_PE_aligned : DW_EH_PE_absptr)
|
||||
+
|
||||
/* Use DWARF 2 debugging information by default. */
|
||||
#define DWARF2_DEBUGGING_INFO
|
||||
#define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
|
||||
Index: b/gcc/config/microblaze/microblaze.md
|
||||
===================================================================
|
||||
--- a/gcc/config/microblaze/microblaze.md
|
||||
+++ b/gcc/config/microblaze/microblaze.md
|
||||
@@ -2272,4 +2272,15 @@
|
||||
(set_attr "mode" "SI")
|
||||
(set_attr "length" "4")])
|
||||
|
||||
+; This is used in compiling the unwind routines.
|
||||
+(define_expand "eh_return"
|
||||
+ [(use (match_operand 0 "general_operand" ""))]
|
||||
+ ""
|
||||
+ "
|
||||
+{
|
||||
+ microblaze_eh_return(operands[0]);
|
||||
+ DONE;
|
||||
+}")
|
||||
+
|
||||
(include "sync.md")
|
||||
+
|
56
patches/gcc/6.1.0/860-cilk-wchar.patch
Normal file
56
patches/gcc/6.1.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,84 @@
|
||||
From df1cf48777fe4cd81ad7fb09ecbe5b31432b7c1c Mon Sep 17 00:00:00 2001
|
||||
From: Yvan Roux <yvan.roux@linaro.org>
|
||||
Date: Fri, 15 Apr 2016 13:29:26 +0200
|
||||
Subject: [PATCH] Suppress GCC 6 warning about ambiguous 'else' with
|
||||
-Wparentheses
|
||||
|
||||
---
|
||||
ChangeLog | 5 +++++
|
||||
nis/nis_call.c | 20 +++++++++++---------
|
||||
stdlib/setenv.c | 26 ++++++++++++++------------
|
||||
3 files changed, 30 insertions(+), 21 deletions(-)
|
||||
|
||||
diff --git a/nis/nis_call.c b/nis/nis_call.c
|
||||
index 3fa37e4..cb7839a 100644
|
||||
--- a/nis/nis_call.c
|
||||
+++ b/nis/nis_call.c
|
||||
@@ -680,16 +680,18 @@ nis_server_cache_add (const_nis_name name, int search_parent,
|
||||
/* Choose which entry should be evicted from the cache. */
|
||||
loc = &nis_server_cache[0];
|
||||
if (*loc != NULL)
|
||||
- for (i = 1; i < 16; ++i)
|
||||
- if (nis_server_cache[i] == NULL)
|
||||
- {
|
||||
+ {
|
||||
+ for (i = 1; i < 16; ++i)
|
||||
+ if (nis_server_cache[i] == NULL)
|
||||
+ {
|
||||
+ loc = &nis_server_cache[i];
|
||||
+ break;
|
||||
+ }
|
||||
+ else if ((*loc)->uses > nis_server_cache[i]->uses
|
||||
+ || ((*loc)->uses == nis_server_cache[i]->uses
|
||||
+ && (*loc)->expires > nis_server_cache[i]->expires))
|
||||
loc = &nis_server_cache[i];
|
||||
- break;
|
||||
- }
|
||||
- else if ((*loc)->uses > nis_server_cache[i]->uses
|
||||
- || ((*loc)->uses == nis_server_cache[i]->uses
|
||||
- && (*loc)->expires > nis_server_cache[i]->expires))
|
||||
- loc = &nis_server_cache[i];
|
||||
+ }
|
||||
old = *loc;
|
||||
*loc = new;
|
||||
|
||||
diff --git a/stdlib/setenv.c b/stdlib/setenv.c
|
||||
index da61ee0..e66045f 100644
|
||||
--- a/stdlib/setenv.c
|
||||
+++ b/stdlib/setenv.c
|
||||
@@ -278,18 +278,20 @@ unsetenv (const char *name)
|
||||
ep = __environ;
|
||||
if (ep != NULL)
|
||||
while (*ep != NULL)
|
||||
- if (!strncmp (*ep, name, len) && (*ep)[len] == '=')
|
||||
- {
|
||||
- /* Found it. Remove this pointer by moving later ones back. */
|
||||
- char **dp = ep;
|
||||
-
|
||||
- do
|
||||
- dp[0] = dp[1];
|
||||
- while (*dp++);
|
||||
- /* Continue the loop in case NAME appears again. */
|
||||
- }
|
||||
- else
|
||||
- ++ep;
|
||||
+ {
|
||||
+ if (!strncmp (*ep, name, len) && (*ep)[len] == '=')
|
||||
+ {
|
||||
+ /* Found it. Remove this pointer by moving later ones back. */
|
||||
+ char **dp = ep;
|
||||
+
|
||||
+ do
|
||||
+ dp[0] = dp[1];
|
||||
+ while (*dp++);
|
||||
+ /* Continue the loop in case NAME appears again. */
|
||||
+ }
|
||||
+ else
|
||||
+ ++ep;
|
||||
+ }
|
||||
|
||||
UNLOCK;
|
||||
|
||||
--
|
||||
2.7.4
|
||||
|
18
samples/arm-multilib-linux-uclibcgnueabi/crosstool.config
Normal file
18
samples/arm-multilib-linux-uclibcgnueabi/crosstool.config
Normal file
@ -0,0 +1,18 @@
|
||||
CT_LOCAL_TARBALLS_DIR="${HOME}/src"
|
||||
CT_SAVE_TARBALLS=y
|
||||
CT_LOG_EXTRA=y
|
||||
CT_ARCH_FLOAT_SW=y
|
||||
CT_ARCH_arm=y
|
||||
CT_MULTILIB=y
|
||||
CT_TARGET_VENDOR="multilib"
|
||||
CT_KERNEL_linux=y
|
||||
CT_BINUTILS_LINKER_LD_GOLD=y
|
||||
CT_BINUTILS_GOLD_THREADS=y
|
||||
CT_BINUTILS_LD_WRAPPER=y
|
||||
CT_BINUTILS_PLUGINS=y
|
||||
CT_LIBC_uClibc=y
|
||||
CT_THREADS_NONE=y
|
||||
CT_CC_GCC_MULTILIB_LIST="aprofile"
|
||||
CT_DEBUG_dmalloc=y
|
||||
CT_DEBUG_ltrace=y
|
||||
CT_DEBUG_strace=y
|
3
samples/arm-multilib-linux-uclibcgnueabi/reported.by
Normal file
3
samples/arm-multilib-linux-uclibcgnueabi/reported.by
Normal file
@ -0,0 +1,3 @@
|
||||
reporter_name="Alexey Neyman"
|
||||
reporter_url=""
|
||||
reporter_comment="Multilib configuration for ARM/uClibc-ng."
|
@ -13,5 +13,5 @@ CT_BINUTILS_V_2_25=y
|
||||
CT_CC_LANG_CXX=y
|
||||
CT_DEBUG_gdb=y
|
||||
CT_MPFR_V_3_1_2=y
|
||||
CT_ISL_V_0_12_2=y
|
||||
CT_ISL_V_0_14=y
|
||||
CT_MPC_V_1_0_2=y
|
||||
|
@ -5,7 +5,8 @@ CT_ARCH_LE=y
|
||||
CT_ARCH_64=y
|
||||
CT_ARCH_FLOAT_SW=y
|
||||
CT_ARCH_mips=y
|
||||
CT_TARGET_VENDOR="n32"
|
||||
CT_MULTILIB=y
|
||||
CT_TARGET_VENDOR="multilib"
|
||||
CT_KERNEL_linux=y
|
||||
CT_BINUTILS_PLUGINS=y
|
||||
CT_LIBC_uClibc=y
|
3
samples/mips64el-multilib-linux-uclibc/reported.by
Normal file
3
samples/mips64el-multilib-linux-uclibc/reported.by
Normal file
@ -0,0 +1,3 @@
|
||||
reporter_name="Alexey Neyman"
|
||||
reporter_url=""
|
||||
reporter_comment="Multilib configuration for MIPS/uClibc-ng."
|
@ -1,3 +0,0 @@
|
||||
reporter_name="Yann E. MORIN"
|
||||
reporter_url="http://ymorin.is-a-geek.org/projects/crosstool"
|
||||
reporter_comment="EXPERIMENTAL MIPS-64 n32 toolchain."
|
@ -1,3 +0,0 @@
|
||||
reporter_name="Yann E. MORIN"
|
||||
reporter_url="http://ymorin.is-a-geek.org/projects/crosstool"
|
||||
reporter_comment="EXPERIMENTAL MIPS-64 n64 toolchain."
|
20
samples/mipsel-multilib-linux-gnu/crosstool.config
Normal file
20
samples/mipsel-multilib-linux-gnu/crosstool.config
Normal file
@ -0,0 +1,20 @@
|
||||
CT_LOCAL_TARBALLS_DIR="${HOME}/src"
|
||||
CT_SAVE_TARBALLS=y
|
||||
CT_LOG_EXTRA=y
|
||||
CT_ARCH_LE=y
|
||||
CT_ARCH_FLOAT_SW=y
|
||||
CT_ARCH_mips=y
|
||||
CT_MULTILIB=y
|
||||
CT_TARGET_VENDOR="multilib"
|
||||
CT_KERNEL_linux=y
|
||||
CT_BINUTILS_PLUGINS=y
|
||||
CT_CC_GCC_CORE_EXTRA_CONFIG_ARRAY="--enable-targets=all"
|
||||
CT_CC_GCC_EXTRA_CONFIG_ARRAY="--enable-targets=all"
|
||||
CT_CC_GCC_mips_plt=y
|
||||
CT_CC_LANG_CXX=y
|
||||
CT_DEBUG_dmalloc=y
|
||||
CT_DEBUG_duma=y
|
||||
CT_DEBUG_gdb=y
|
||||
# CT_GDB_CROSS_PYTHON is not set
|
||||
CT_GDB_NATIVE=y
|
||||
CT_DEBUG_strace=y
|
3
samples/mipsel-multilib-linux-gnu/reported.by
Normal file
3
samples/mipsel-multilib-linux-gnu/reported.by
Normal file
@ -0,0 +1,3 @@
|
||||
reporter_name="Alexey Neyman"
|
||||
reporter_url=""
|
||||
reporter_comment="Multilib configuration for MIPS/glibc."
|
13
samples/powerpc64-multilib-linux-gnu/crosstool.config
Normal file
13
samples/powerpc64-multilib-linux-gnu/crosstool.config
Normal file
@ -0,0 +1,13 @@
|
||||
CT_LOCAL_TARBALLS_DIR="${HOME}/src"
|
||||
CT_SAVE_TARBALLS=y
|
||||
CT_LOG_EXTRA=y
|
||||
CT_ARCH_64=y
|
||||
CT_ARCH_powerpc=y
|
||||
CT_MULTILIB=y
|
||||
CT_TARGET_VENDOR="multilib"
|
||||
CT_KERNEL_linux=y
|
||||
CT_BINUTILS_PLUGINS=y
|
||||
CT_CC_LANG_CXX=y
|
||||
CT_DEBUG_gdb=y
|
||||
# CT_GDB_CROSS_PYTHON is not set
|
||||
CT_GDB_NATIVE=y
|
3
samples/powerpc64-multilib-linux-gnu/reported.by
Normal file
3
samples/powerpc64-multilib-linux-gnu/reported.by
Normal file
@ -0,0 +1,3 @@
|
||||
reporter_name="Alexey Neyman"
|
||||
reporter_url=""
|
||||
reporter_comment="Multilib configuration for PowerPC/glibc."
|
@ -1,15 +1,13 @@
|
||||
CT_LOCAL_TARBALLS_DIR="${HOME}/src"
|
||||
CT_SAVE_TARBALLS=y
|
||||
CT_LOG_EXTRA=y
|
||||
CT_ARCH_LE=y
|
||||
CT_ARCH_64=y
|
||||
CT_ARCH_FLOAT_SW=y
|
||||
CT_ARCH_mips=y
|
||||
CT_ARCH_mips_n64=y
|
||||
CT_TARGET_VENDOR="n64"
|
||||
CT_ARCH_powerpc=y
|
||||
CT_KERNEL_linux=y
|
||||
CT_BINUTILS_PLUGINS=y
|
||||
CT_LIBC_uClibc=y
|
||||
CT_LIBC_UCLIBC_WCHAR=y
|
||||
CT_CC_GCC_mips_plt=y
|
||||
CT_CC_LANG_CXX=y
|
||||
CT_DEBUG_gdb=y
|
||||
# CT_GDB_CROSS_PYTHON is not set
|
||||
CT_GDB_NATIVE=y
|
||||
CT_ARCH_ENDIAN="little"
|
||||
CT_ARCH_LE=y
|
3
samples/powerpc64le-unknown-linux-gnu/reported.by
Normal file
3
samples/powerpc64le-unknown-linux-gnu/reported.by
Normal file
@ -0,0 +1,3 @@
|
||||
reporter_name="Vaibhav Jain"
|
||||
reporter_url="https://github.com/vaibhav92/crosstool-ng"
|
||||
reporter_comment="Based on power64-unknown-linux-gnu sample implemented by Yann E. MORIN"
|
@ -1,6 +1,5 @@
|
||||
CT_LOCAL_TARBALLS_DIR="${HOME}/src"
|
||||
CT_SAVE_TARBALLS=y
|
||||
CT_PATCH_NONE=y
|
||||
CT_LOG_EXTRA=y
|
||||
CT_ARCH_64=y
|
||||
CT_ARCH_s390=y
|
||||
|
@ -186,6 +186,7 @@ $(CT_SAMPLES): config_files
|
||||
__comma = ,
|
||||
prefix_dir = $(CT_PREFIX)/$(subst $(__comma),=,$(1))
|
||||
host_triplet = $(if $(findstring $(__comma),$(1)),$(firstword $(subst $(__comma), ,$(1))))
|
||||
target_triplet = $(if $(findstring $(__comma),$(1)),$(word 2,$(subst $(__comma), ,$(1))),$(1))
|
||||
|
||||
# Create the rule to build a sample
|
||||
# $1: sample name (target tuple, or host/target tuples separated by a comma)
|
||||
@ -212,7 +213,8 @@ define build_sample
|
||||
fi; \
|
||||
printf '\r %-5s %s\n' $$status '$(1)'; \
|
||||
mkdir -p .build-all/$$status/$(1); \
|
||||
bzip2 < build.log > .build-all/$$status/$(1)/build.log.bz2
|
||||
bzip2 < build.log > .build-all/$$status/$(1)/build.log.bz2; \
|
||||
[ "$$status" = PASS -a -z "$(CT_PRESERVE_PASSED_BUILDS)" ] && rm -rf .build/$(call target_triplet,$(1)) || :
|
||||
endef
|
||||
|
||||
# ----------------------------------------------------------
|
||||
|
13
samples/sh4-multilib-linux-gnu/crosstool.config
Normal file
13
samples/sh4-multilib-linux-gnu/crosstool.config
Normal file
@ -0,0 +1,13 @@
|
||||
CT_LOCAL_TARBALLS_DIR="${HOME}/src"
|
||||
CT_SAVE_TARBALLS=y
|
||||
CT_LOG_EXTRA=y
|
||||
CT_ARCH_sh=y
|
||||
CT_ARCH_SH_SH4=y
|
||||
CT_TARGET_VENDOR="multilib"
|
||||
CT_KERNEL_linux=y
|
||||
CT_BINUTILS_PLUGINS=y
|
||||
CT_CC_GCC_V_4_9_3=y
|
||||
CT_CC_GCC_MULTILIB_LIST="m4,m4a"
|
||||
CT_CC_LANG_CXX=y
|
||||
CT_DEBUG_gdb=y
|
||||
# CT_GDB_CROSS_PYTHON is not set
|
3
samples/sh4-multilib-linux-gnu/reported.by
Normal file
3
samples/sh4-multilib-linux-gnu/reported.by
Normal file
@ -0,0 +1,3 @@
|
||||
reporter_name="Alexey Neyman"
|
||||
reporter_url=""
|
||||
reporter_comment="Multilib configuration for SuperH/glibc."
|
14
samples/sh4-multilib-linux-uclibc/crosstool.config
Normal file
14
samples/sh4-multilib-linux-uclibc/crosstool.config
Normal file
@ -0,0 +1,14 @@
|
||||
CT_LOCAL_TARBALLS_DIR="${HOME}/src"
|
||||
CT_SAVE_TARBALLS=y
|
||||
CT_LOG_EXTRA=y
|
||||
CT_ARCH_sh=y
|
||||
CT_ARCH_SH_SH4=y
|
||||
CT_TARGET_VENDOR="multilib"
|
||||
CT_KERNEL_linux=y
|
||||
CT_BINUTILS_PLUGINS=y
|
||||
CT_LIBC_uClibc=y
|
||||
CT_CC_GCC_V_4_9_3=y
|
||||
CT_CC_GCC_MULTILIB_LIST="m4,m4a,m3"
|
||||
CT_CC_LANG_CXX=y
|
||||
CT_DEBUG_gdb=y
|
||||
# CT_GDB_CROSS_PYTHON is not set
|
3
samples/sh4-multilib-linux-uclibc/reported.by
Normal file
3
samples/sh4-multilib-linux-uclibc/reported.by
Normal file
@ -0,0 +1,3 @@
|
||||
reporter_name="Alexey Neyman"
|
||||
reporter_url=""
|
||||
reporter_comment="Multilib configuration for SuperH/uClibc."
|
17
samples/sparc-leon-linux-uclibc/crosstool.config
Normal file
17
samples/sparc-leon-linux-uclibc/crosstool.config
Normal file
@ -0,0 +1,17 @@
|
||||
CT_LOCAL_TARBALLS_DIR="${HOME}/src"
|
||||
CT_SAVE_TARBALLS=y
|
||||
CT_LOG_EXTRA=y
|
||||
CT_ARCH_CPU="leon"
|
||||
CT_ARCH_TUNE="leon"
|
||||
CT_ARCH_FLOAT_SW=y
|
||||
CT_ARCH_sparc=y
|
||||
CT_TARGET_VENDOR="leon"
|
||||
CT_KERNEL_linux=y
|
||||
CT_KERNEL_V_3_10=y
|
||||
CT_LIBC_uClibc=y
|
||||
CT_LIBC_UCLIBC_CONFIG_FILE="${CT_LIB_DIR}/samples/${CT_TARGET}/${CT_LIBC}-${CT_LIBC_VERSION}.config"
|
||||
CT_LIBC_UCLIBC_IPV6=y
|
||||
CT_LIBC_UCLIBC_WCHAR=y
|
||||
CT_CC_GCC_V_4_9_3=y
|
||||
CT_CC_GCC_EXTRA_CONFIG_ARRAY="--disable-libitm"
|
||||
CT_CC_LANG_CXX=y
|
3
samples/sparc-leon-linux-uclibc/reported.by
Normal file
3
samples/sparc-leon-linux-uclibc/reported.by
Normal file
@ -0,0 +1,3 @@
|
||||
reporter_name="Kirill K. Smirnov"
|
||||
reporter_url=""
|
||||
reporter_comment="For sparc/leon without FPU"
|
20
samples/sparc-leon-linux-uclibc/uClibc-1.0.12.config
Normal file
20
samples/sparc-leon-linux-uclibc/uClibc-1.0.12.config
Normal file
@ -0,0 +1,20 @@
|
||||
TARGET_sparc=y
|
||||
# UCLIBC_HAS_FPU is not set
|
||||
DO_C99_MATH=y
|
||||
UCLIBC_HAS_THREADS_NATIVE=y
|
||||
UCLIBC_SUSV3_LEGACY=y
|
||||
UCLIBC_SUSV4_LEGACY=y
|
||||
# UNIX98PTY_ONLY is not set
|
||||
UCLIBC_HAS_LIBUTIL=y
|
||||
UCLIBC_HAS_SHA256_CRYPT_IMPL=y
|
||||
UCLIBC_HAS_SHA512_CRYPT_IMPL=y
|
||||
UCLIBC_HAS_IPV6=y
|
||||
UCLIBC_HAS_RPC=y
|
||||
UCLIBC_HAS_FULL_RPC=y
|
||||
UCLIBC_HAS_REENTRANT_RPC=y
|
||||
UCLIBC_USE_NETLINK=y
|
||||
UCLIBC_HAS_RESOLVER_SUPPORT=y
|
||||
UCLIBC_HAS_LIBRESOLV_STUB=y
|
||||
UCLIBC_HAS_WCHAR=y
|
||||
UCLIBC_HAS_GLIBC_CUSTOM_PRINTF=y
|
||||
UCLIBC_HAS_PRINTF_M_SPEC=y
|
8
samples/sparc64-multilib-linux-gnu/crosstool.config
Normal file
8
samples/sparc64-multilib-linux-gnu/crosstool.config
Normal file
@ -0,0 +1,8 @@
|
||||
CT_LOCAL_TARBALLS_DIR="${HOME}/src"
|
||||
CT_SAVE_TARBALLS=y
|
||||
CT_LOG_EXTRA=y
|
||||
CT_ARCH_64=y
|
||||
CT_ARCH_sparc=y
|
||||
CT_MULTILIB=y
|
||||
CT_TARGET_VENDOR="multilib"
|
||||
CT_KERNEL_linux=y
|
3
samples/sparc64-multilib-linux-gnu/reported.by
Normal file
3
samples/sparc64-multilib-linux-gnu/reported.by
Normal file
@ -0,0 +1,3 @@
|
||||
reporter_name="Alexey Neyman"
|
||||
reporter_url=""
|
||||
reporter_comment="Multilib configuration for SPARC/glibc."
|
17
samples/x86_64-multilib-linux-gnu/crosstool.config
Normal file
17
samples/x86_64-multilib-linux-gnu/crosstool.config
Normal file
@ -0,0 +1,17 @@
|
||||
CT_LOCAL_TARBALLS_DIR="${HOME}/src"
|
||||
CT_SAVE_TARBALLS=y
|
||||
CT_LOG_EXTRA=y
|
||||
CT_ARCH_64=y
|
||||
CT_ARCH_x86=y
|
||||
CT_MULTILIB=y
|
||||
CT_TARGET_VENDOR="multilib"
|
||||
CT_KERNEL_linux=y
|
||||
CT_BINUTILS_LINKER_LD_GOLD=y
|
||||
CT_BINUTILS_GOLD_THREADS=y
|
||||
CT_BINUTILS_LD_WRAPPER=y
|
||||
CT_BINUTILS_PLUGINS=y
|
||||
CT_LIBC_GLIBC_KERNEL_VERSION_NONE=y
|
||||
CT_CC_GCC_MULTILIB_LIST="m64,m32,mx32"
|
||||
CT_CC_GCC_LNK_HASH_STYLE_BOTH=y
|
||||
CT_CC_LANG_CXX=y
|
||||
CT_DEBUG_gdb=y
|
3
samples/x86_64-multilib-linux-gnu/reported.by
Normal file
3
samples/x86_64-multilib-linux-gnu/reported.by
Normal file
@ -0,0 +1,3 @@
|
||||
reporter_name="Alexey Neyman"
|
||||
reporter_url=""
|
||||
reporter_comment="Multilib configuration for x86/glibc."
|
19
samples/x86_64-multilib-linux-musl/crosstool.config
Normal file
19
samples/x86_64-multilib-linux-musl/crosstool.config
Normal file
@ -0,0 +1,19 @@
|
||||
CT_EXPERIMENTAL=y
|
||||
CT_LOCAL_TARBALLS_DIR="${HOME}/src"
|
||||
CT_SAVE_TARBALLS=y
|
||||
CT_LOG_EXTRA=y
|
||||
CT_ARCH_64=y
|
||||
CT_ARCH_x86=y
|
||||
CT_MULTILIB=y
|
||||
CT_TARGET_VENDOR="multilib"
|
||||
CT_KERNEL_linux=y
|
||||
# CT_KERNEL_LINUX_INSTALL_CHECK is not set
|
||||
CT_BINUTILS_LINKER_LD_GOLD=y
|
||||
CT_BINUTILS_GOLD_THREADS=y
|
||||
CT_BINUTILS_LD_WRAPPER=y
|
||||
CT_BINUTILS_PLUGINS=y
|
||||
CT_LIBC_musl=y
|
||||
CT_CC_LANG_CXX=y
|
||||
CT_DEBUG_dmalloc=y
|
||||
CT_DEBUG_duma=y
|
||||
CT_DEBUG_gdb=y
|
3
samples/x86_64-multilib-linux-musl/reported.by
Normal file
3
samples/x86_64-multilib-linux-musl/reported.by
Normal file
@ -0,0 +1,3 @@
|
||||
reporter_name="Alexey Neyman"
|
||||
reporter_url=""
|
||||
reporter_comment="Multilib configuration for x86/musl."
|
20
samples/x86_64-multilib-linux-uclibc/crosstool.config
Normal file
20
samples/x86_64-multilib-linux-uclibc/crosstool.config
Normal file
@ -0,0 +1,20 @@
|
||||
CT_LOCAL_TARBALLS_DIR="${HOME}/src"
|
||||
CT_SAVE_TARBALLS=y
|
||||
CT_LOG_EXTRA=y
|
||||
CT_ARCH_64=y
|
||||
CT_ARCH_x86=y
|
||||
CT_MULTILIB=y
|
||||
CT_TARGET_VENDOR="multilib"
|
||||
CT_KERNEL_linux=y
|
||||
# CT_KERNEL_LINUX_INSTALL_CHECK is not set
|
||||
CT_BINUTILS_LINKER_LD_GOLD=y
|
||||
CT_BINUTILS_GOLD_THREADS=y
|
||||
CT_BINUTILS_LD_WRAPPER=y
|
||||
CT_BINUTILS_PLUGINS=y
|
||||
CT_LIBC_uClibc=y
|
||||
CT_LIBC_UCLIBC_WCHAR=y
|
||||
CT_CC_LANG_CXX=y
|
||||
CT_DEBUG_dmalloc=y
|
||||
CT_DEBUG_duma=y
|
||||
CT_DEBUG_gdb=y
|
||||
CT_GDB_NATIVE=y
|
3
samples/x86_64-multilib-linux-uclibc/reported.by
Normal file
3
samples/x86_64-multilib-linux-uclibc/reported.by
Normal file
@ -0,0 +1,3 @@
|
||||
reporter_name="Alexey Neyman"
|
||||
reporter_url=""
|
||||
reporter_comment="Multilib configuration for x86/uClibc-ng."
|
68
scripts/build/arch.sh
Normal file
68
scripts/build/arch.sh
Normal file
@ -0,0 +1,68 @@
|
||||
# This file provides the default implementations of arch-specific functions.
|
||||
|
||||
# Set up the target tuple
|
||||
CT_DoArchTupleValues() {
|
||||
:;
|
||||
}
|
||||
|
||||
# Multilib: change the target triplet according to CFLAGS
|
||||
# Usage: CT_DoArchGlibcAdjustTuple <variable-name> <CFLAGS>
|
||||
CT_DoArchMultilibTarget() {
|
||||
:;
|
||||
}
|
||||
|
||||
# Multilib: Adjust target tuple for GLIBC
|
||||
# Usage: CT_DoArchGlibcAdjustTuple <variable-name>
|
||||
CT_DoArchGlibcAdjustTuple() {
|
||||
:;
|
||||
}
|
||||
|
||||
# Helper for uClibc configurators: select the architecture
|
||||
# Usage: CT_DoArchUClibcSelectArch <config-file> <architecture>
|
||||
CT_DoArchUClibcSelectArch() {
|
||||
local cfg="${1}"
|
||||
local arch="${2}"
|
||||
|
||||
${sed} -i -r -e '/^TARGET_.*/d' "${cfg}"
|
||||
CT_KconfigEnableOption "TARGET_${arch}" "${cfg}"
|
||||
CT_KconfigSetOption "TARGET_ARCH" "${arch}" "${cfg}"
|
||||
}
|
||||
|
||||
# uClibc: Adjust configuration file according to the CT-NG configuration
|
||||
# Usage: CT_DoArchUClibcConfig <config-file>
|
||||
CT_DoArchUClibcConfig() {
|
||||
CT_DoLog WARN "Support for '${CT_ARCH}' is not implemented in uClibc config tweaker."
|
||||
CT_DoLog WARN "Exact configuration file must be provided."
|
||||
}
|
||||
|
||||
# Multilib/uClibc: Adjust configuration file for given CFLAGS
|
||||
# Usage: CT_DoArchUClibcCflags <config-file> <cflags>
|
||||
CT_DoArchUClibcCflags() {
|
||||
local cfg="${1}"
|
||||
local cflags="${2}"
|
||||
|
||||
# Likely, any non-default cflags need to be reflected into the config.
|
||||
# It may work if we just pass them into EXTRA_CFLAGS, but we have no
|
||||
# idea as they might interact with the CFLAGS inferred by uClibc from
|
||||
# the configuration file.
|
||||
if [ "${cflags}" != "" ]; then
|
||||
CT_DoLog WARN "Multilib configuration not supported for uClibc/${CT_ARCH}"
|
||||
fi
|
||||
}
|
||||
|
||||
# Multilib/uClibc: Adjust header installation path for given CFLAGS
|
||||
# Usage: CT_DoArchUClibcHeaderDir <path-variable> <cflags>
|
||||
CT_DoArchUClibcHeaderDir() {
|
||||
# Only needed if a given architecture may select different uClibc architectures.
|
||||
:;
|
||||
}
|
||||
|
||||
# Multilib/MUSL: Adjust header installation path for given CFLAGS
|
||||
# Usage: CT_DoArchMUSLHeaderDir <path-variable> <cflags>
|
||||
CT_DoArchMUSLHeaderDir() {
|
||||
# Only needed if a given architecture may select different MUSL architectures.
|
||||
:;
|
||||
}
|
||||
|
||||
# Override from the actual arch implementation as needed.
|
||||
. "${CT_LIB_DIR}/scripts/build/arch/${CT_ARCH}.sh"
|
@ -4,14 +4,3 @@ CT_DoArchTupleValues () {
|
||||
# The architecture part of the tuple:
|
||||
CT_TARGET_ARCH="${CT_ARCH}${CT_ARCH_SUFFIX:-${CT_ARCH_ALPHA_VARIANT}}"
|
||||
}
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Get multilib architecture-specific target
|
||||
# Usage: CT_DoArchMultilibTarget "multilib flags" "target tuple"
|
||||
CT_DoArchMultilibTarget ()
|
||||
{
|
||||
local target="${1}"; shift
|
||||
local -a multi_flags=( "$@" )
|
||||
|
||||
echo "${target}"
|
||||
}
|
||||
|
@ -27,7 +27,6 @@ CT_DoArchTupleValues() {
|
||||
thumb)
|
||||
CT_ARCH_CC_CORE_EXTRA_CONFIG="--with-mode=thumb"
|
||||
CT_ARCH_CC_EXTRA_CONFIG="--with-mode=thumb"
|
||||
# CT_ARCH_TARGET_CFLAGS="-mthumb"
|
||||
;;
|
||||
esac
|
||||
|
||||
@ -38,15 +37,84 @@ CT_DoArchTupleValues() {
|
||||
if [ "${CT_ARCH_ARM_TUPLE_USE_EABIHF}" = "y" ]; then
|
||||
CT_TARGET_SYS="${CT_TARGET_SYS}hf"
|
||||
fi
|
||||
|
||||
# If building multilib, zero out any WITH_*/*_CFLAG - GCC on ARM does not allow
|
||||
# any of them with multilib.
|
||||
if [ "${CT_MULTILIB}" = "y" ]; then
|
||||
CT_ARCH_WITH_ARCH=
|
||||
CT_ARCH_WITH_ABI=
|
||||
CT_ARCH_WITH_CPU=
|
||||
CT_ARCH_WITH_TUNE=
|
||||
CT_ARCH_WITH_FPU=
|
||||
CT_ARCH_WITH_FLOAT=
|
||||
CT_ARCH_ARCH_CFLAG=
|
||||
CT_ARCH_ABI_CFLAG=
|
||||
CT_ARCH_CPU_CFLAG=
|
||||
CT_ARCH_TUNE_CFLAG=
|
||||
CT_ARCH_FPU_CFLAG=
|
||||
CT_ARCH_FLOAT_CFLAG=
|
||||
fi
|
||||
}
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Get multilib architecture-specific target
|
||||
# Usage: CT_DoArchMultilibTarget "multilib flags" "target tuple"
|
||||
CT_DoArchMultilibTarget ()
|
||||
{
|
||||
local target="${1}"; shift
|
||||
local -a multi_flags=( "$@" )
|
||||
CT_DoArchUClibcConfig() {
|
||||
local cfg="${1}"
|
||||
|
||||
echo "${target}"
|
||||
CT_DoArchUClibcSelectArch "${cfg}" "arm"
|
||||
|
||||
case "${CT_ARCH_ARM_MODE}" in
|
||||
arm)
|
||||
CT_KconfigDisableOption "COMPILE_IN_THUMB_MODE" "${cfg}"
|
||||
;;
|
||||
thumb)
|
||||
CT_KconfigEnableOption "COMPILE_IN_THUMB_MODE" "${cfg}"
|
||||
;;
|
||||
esac
|
||||
|
||||
# FIXME: CONFIG_ARM_OABI does not exist in neither uClibc/uClibc-ng
|
||||
# FIXME: CONFIG_ARM_EABI does not seem to affect anything in either of them, too
|
||||
# (both check the compiler's built-in define, __ARM_EABI__ instead) except for
|
||||
# a check for match between toolchain configuration and uClibc-ng in
|
||||
# uClibc_arch_features.h
|
||||
if [ "${CT_ARCH_ARM_EABI}" = "y" ]; then
|
||||
CT_KconfigDisableOption "CONFIG_ARM_OABI" "${cfg}"
|
||||
CT_KconfigEnableOption "CONFIG_ARM_EABI" "${cfg}"
|
||||
else
|
||||
CT_KconfigDisableOption "CONFIG_ARM_EABI" "${cfg}"
|
||||
CT_KconfigEnableOption "CONFIG_ARM_OABI" "${cfg}"
|
||||
fi
|
||||
}
|
||||
|
||||
CT_DoArchUClibcCflags() {
|
||||
local cfg="${1}"
|
||||
local cflags="${2}"
|
||||
local f
|
||||
|
||||
for f in ${cflags}; do
|
||||
case "${f}" in
|
||||
-mthumb)
|
||||
CT_KconfigEnableOption "COMPILE_IN_THUMB_MODE" "${cfg}"
|
||||
;;
|
||||
-marm)
|
||||
CT_KconfigDisableOption "COMPILE_IN_THUMB_MODE" "${cfg}"
|
||||
;;
|
||||
-mlittle-endian)
|
||||
CT_KconfigDisableOption "ARCH_BIG_ENDIAN" "${cfg}"
|
||||
CT_KconfigDisableOption "ARCH_WANTS_BIG_ENDIAN" "${cfg}"
|
||||
CT_KconfigEnableOption "ARCH_LITTLE_ENDIAN" "${cfg}"
|
||||
CT_KconfigEnableOption "ARCH_WANTS_LITTLE_ENDIAN" "${cfg}"
|
||||
;;
|
||||
-mbig-endian)
|
||||
CT_KconfigEnableOption "ARCH_BIG_ENDIAN" "${cfg}"
|
||||
CT_KconfigEnableOption "ARCH_WANTS_BIG_ENDIAN" "${cfg}"
|
||||
CT_KconfigDisableOption "ARCH_LITTLE_ENDIAN" "${cfg}"
|
||||
CT_KconfigDisableOption "ARCH_WANTS_LITTLE_ENDIAN" "${cfg}"
|
||||
;;
|
||||
-mhard-float|-mfloat-abi=hard|-mfloat-abi=softfp)
|
||||
CT_KconfigEnableOption "UCLIBC_HAS_FPU" "${cfg}"
|
||||
;;
|
||||
-msoft-float|-mfloat-abi=soft)
|
||||
CT_KconfigDisableOption "UCLIBC_HAS_FPU" "${cfg}"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
@ -1,16 +1,7 @@
|
||||
# Compute M68k-specific values
|
||||
|
||||
CT_DoArchTupleValues() {
|
||||
:
|
||||
}
|
||||
CT_DoArchUClibcConfig() {
|
||||
local cfg="${1}"
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Get multilib architecture-specific target
|
||||
# Usage: CT_DoArchMultilibTarget "multilib flags" "target tuple"
|
||||
CT_DoArchMultilibTarget ()
|
||||
{
|
||||
local target="${1}"; shift
|
||||
local -a multi_flags=( "$@" )
|
||||
|
||||
echo "${target}"
|
||||
CT_DoArchUClibcSelectArch "${cfg}" "m68k"
|
||||
}
|
||||
|
@ -20,13 +20,8 @@ CT_DoArchTupleValues () {
|
||||
|
||||
}
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Get multilib architecture-specific target
|
||||
# Usage: CT_DoArchMultilibTarget "multilib flags" "target tuple"
|
||||
CT_DoArchMultilibTarget ()
|
||||
{
|
||||
local target="${1}"; shift
|
||||
local -a multi_flags=( "$@" )
|
||||
CT_DoArchUClibcConfig() {
|
||||
local cfg="${1}"
|
||||
|
||||
echo "${target}"
|
||||
CT_DoArchUClibcSelectArch "${cfg}" "microblaze"
|
||||
}
|
||||
|
@ -15,13 +15,57 @@ CT_DoArchTupleValues() {
|
||||
CT_ARCH_WITH_ABI="--with-abi=${CT_ARCH_mips_ABI}"
|
||||
}
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Get multilib architecture-specific target
|
||||
# Usage: CT_DoArchMultilibTarget "multilib flags" "target tuple"
|
||||
CT_DoArchMultilibTarget ()
|
||||
{
|
||||
local target="${1}"; shift
|
||||
local -a multi_flags=( "$@" )
|
||||
CT_DoArchUClibcConfig() {
|
||||
local cfg="${1}"
|
||||
|
||||
echo "${target}"
|
||||
CT_DoArchUClibcSelectArch "${cfg}" "${CT_ARCH}"
|
||||
|
||||
CT_KconfigDisableOption "CONFIG_MIPS_O32_ABI" "${cfg}"
|
||||
CT_KconfigDisableOption "CONFIG_MIPS_N32_ABI" "${cfg}"
|
||||
CT_KconfigDisableOption "CONFIG_MIPS_N64_ABI" "${cfg}"
|
||||
case "${CT_ARCH_mips_ABI}" in
|
||||
32)
|
||||
CT_KconfigEnableOption "CONFIG_MIPS_O32_ABI" "${cfg}"
|
||||
;;
|
||||
n32)
|
||||
CT_KconfigEnableOption "CONFIG_MIPS_N32_ABI" "${cfg}"
|
||||
;;
|
||||
64)
|
||||
CT_KconfigEnableOption "CONFIG_MIPS_N64_ABI" "${cfg}"
|
||||
;;
|
||||
esac
|
||||
|
||||
# FIXME: uClibc (!ng) allows to select ISA in the config; should
|
||||
# match from the selected ARCH_ARCH level... For now, delete and
|
||||
# fall back to default.
|
||||
CT_KconfigDeleteOption "CONFIG_MIPS_ISA_1" "${cfg}"
|
||||
CT_KconfigDeleteOption "CONFIG_MIPS_ISA_2" "${cfg}"
|
||||
CT_KconfigDeleteOption "CONFIG_MIPS_ISA_3" "${cfg}"
|
||||
CT_KconfigDeleteOption "CONFIG_MIPS_ISA_4" "${cfg}"
|
||||
CT_KconfigDeleteOption "CONFIG_MIPS_ISA_MIPS32" "${cfg}"
|
||||
CT_KconfigDeleteOption "CONFIG_MIPS_ISA_MIPS32R2" "${cfg}"
|
||||
CT_KconfigDeleteOption "CONFIG_MIPS_ISA_MIPS64" "${cfg}"
|
||||
CT_KconfigDeleteOption "CONFIG_MIPS_ISA_MIPS64R2" "${cfg}"
|
||||
}
|
||||
|
||||
CT_DoArchUClibcCflags() {
|
||||
local cfg="${1}"
|
||||
local cflags="${2}"
|
||||
local f
|
||||
|
||||
for f in ${cflags}; do
|
||||
case "${f}" in
|
||||
-mabi=*)
|
||||
CT_KconfigDisableOption "CONFIG_MIPS_O32_ABI" "${cfg}"
|
||||
CT_KconfigDisableOption "CONFIG_MIPS_N32_ABI" "${cfg}"
|
||||
CT_KconfigDisableOption "CONFIG_MIPS_N64_ABI" "${cfg}"
|
||||
case "${f#-mabi=}" in
|
||||
32) CT_KconfigEnableOption "CONFIG_MIPS_O32_ABI" "${cfg}";;
|
||||
n32) CT_KconfigEnableOption "CONFIG_MIPS_N32_ABI" "${cfg}";;
|
||||
64) CT_KconfigEnableOption "CONFIG_MIPS_N64_ABI" "${cfg}";;
|
||||
*) CT_Abort "Unsupported ABI: ${f#-mabi=}";;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
@ -9,5 +9,4 @@ CT_DoArchTupleValues() {
|
||||
CT_ARCH_WITH_FPU=
|
||||
CT_ARCH_WITH_FLOAT=
|
||||
CT_TARGET_SYS=elf
|
||||
|
||||
}
|
||||
|
@ -26,13 +26,15 @@ CT_DoArchTupleValues () {
|
||||
CT_ARCH_CC_EXTRA_CONFIG="--enable-e500_double"
|
||||
fi
|
||||
}
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Get multilib architecture-specific target
|
||||
# Usage: CT_DoArchMultilibTarget "multilib flags" "target tuple"
|
||||
# Usage: CT_DoArchMultilibTarget "target variable" "multilib flags"
|
||||
CT_DoArchMultilibTarget ()
|
||||
{
|
||||
local target="${1}"; shift
|
||||
local target_var="${1}"; shift
|
||||
local -a multi_flags=( "$@" )
|
||||
local target_
|
||||
|
||||
local m32=false
|
||||
local m64=false
|
||||
@ -48,22 +50,41 @@ CT_DoArchMultilibTarget ()
|
||||
esac
|
||||
done
|
||||
|
||||
eval target_=\"\${${target_var}}\"
|
||||
|
||||
# Fix up bitness
|
||||
case "${target}" in
|
||||
powerpc-*) $m64 && target=${target/#powerpc-/powerpc64-} ;;
|
||||
powerpcle-*) $m64 && target=${target/#powerpcle-/powerpc64le-} ;;
|
||||
powerpc64-*) $m32 && target=${target/#powerpc64-/powerpc-} ;;
|
||||
powerpc64le-*) $m32 && target=${target/#powerpc64le-/powerpcle-} ;;
|
||||
case "${target_}" in
|
||||
powerpc-*) $m64 && target_=${target_/#powerpc-/powerpc64-} ;;
|
||||
powerpcle-*) $m64 && target_=${target_/#powerpcle-/powerpc64le-} ;;
|
||||
powerpc64-*) $m32 && target_=${target_/#powerpc64-/powerpc-} ;;
|
||||
powerpc64le-*) $m32 && target_=${target_/#powerpc64le-/powerpcle-} ;;
|
||||
esac
|
||||
|
||||
# Fix up endianness
|
||||
case "${target}" in
|
||||
powerpc-*) $mlittle && target=${target/#powerpc-/powerpcle-} ;;
|
||||
powerpcle-*) $mbig && target=${target/#powerpcle-/powerpc-} ;;
|
||||
powerpc64-*) $mlittle && target=${target/#powerpc64-/powerpc64le-} ;;
|
||||
powerpc64le-*) $mbig && target=${target/#powerpc64le-/powerpc64-} ;;
|
||||
case "${target_}" in
|
||||
powerpc-*) $mlittle && target_=${target_/#powerpc-/powerpcle-} ;;
|
||||
powerpcle-*) $mbig && target_=${target_/#powerpcle-/powerpc-} ;;
|
||||
powerpc64-*) $mlittle && target_=${target_/#powerpc64-/powerpc64le-} ;;
|
||||
powerpc64le-*) $mbig && target_=${target_/#powerpc64le-/powerpc64-} ;;
|
||||
esac
|
||||
|
||||
# return the target
|
||||
echo "${target}"
|
||||
# Set the target variable
|
||||
eval ${target_var}=\"${target_}\"
|
||||
}
|
||||
|
||||
CT_DoArchUClibcConfig() {
|
||||
local cfg="${1}"
|
||||
|
||||
CT_DoArchUClibcSelectArch "${cfg}" "powerpc"
|
||||
|
||||
CT_KconfigDisableOption "CONFIG_E500" "${cfg}"
|
||||
CT_KconfigDisableOption "CONFIG_CLASSIC" "${cfg}"
|
||||
CT_KconfigDeleteOption "TARGET_SUBARCH" "${cfg}"
|
||||
if [ "${CT_ARCH_powerpc_ABI}" = "spe" ]; then
|
||||
CT_KconfigEnableOption "CONFIG_E500" "${cfg}"
|
||||
CT_KconfigSetOption "TARGET_SUBARCH" "e500" "${cfg}"
|
||||
else
|
||||
CT_KconfigEnableOption "CONFIG_CLASSIC" "${cfg}"
|
||||
CT_KconfigSetOption "TARGET_SUBARCH" "classic" "${cfg}"
|
||||
fi
|
||||
}
|
||||
|
@ -9,11 +9,12 @@ CT_DoArchTupleValues() {
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Get multilib architecture-specific target
|
||||
# Usage: CT_DoArchMultilibTarget "multilib flags" "target tuple"
|
||||
# Usage: CT_DoArchMultilibTarget "target variable" "multilib flags"
|
||||
CT_DoArchMultilibTarget ()
|
||||
{
|
||||
local target="${1}"; shift
|
||||
local target_var="${1}"; shift
|
||||
local -a multi_flags=( "$@" )
|
||||
local target_
|
||||
|
||||
local m31=false
|
||||
local m64=false
|
||||
@ -25,11 +26,14 @@ CT_DoArchMultilibTarget ()
|
||||
esac
|
||||
done
|
||||
|
||||
eval target_=\"\${${target_var}}\"
|
||||
|
||||
# Fix bitness
|
||||
case "${target}" in
|
||||
s390-*) $m64 && target=${target/#s390-/s390x-} ;;
|
||||
s390x-*) $m31 && target=${target/#s390x-/s390-} ;;
|
||||
case "${target_}" in
|
||||
s390-*) $m64 && target_=${target_/#s390-/s390x-} ;;
|
||||
s390x-*) $m31 && target_=${target_/#s390x-/s390-} ;;
|
||||
esac
|
||||
|
||||
echo "${target}"
|
||||
# Set the target variable
|
||||
eval ${target_var}=\"${target_}\"
|
||||
}
|
||||
|
@ -36,13 +36,47 @@ CT_DoArchTupleValues () {
|
||||
CT_ARCH_FLOAT_CFLAG=
|
||||
}
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Get multilib architecture-specific target
|
||||
# Usage: CT_DoArchMultilibTarget "multilib flags" "target tuple"
|
||||
CT_DoArchMultilibTarget ()
|
||||
{
|
||||
local target="${1}"; shift
|
||||
local -a multi_flags=( "$@" )
|
||||
CT_DoArchUClibcConfig() {
|
||||
local cfg="${1}"
|
||||
|
||||
echo "${target}"
|
||||
# FIXME: uclibc (!ng) seems to support sh64 (sh5), too
|
||||
CT_DoArchUClibcSelectArch "${cfg}" "sh"
|
||||
CT_KconfigDisableOption "CONFIG_SH3" "${cfg}"
|
||||
CT_KconfigDisableOption "CONFIG_SH4" "${cfg}"
|
||||
CT_KconfigDisableOption "CONFIG_SH4A" "${cfg}"
|
||||
case "${CT_ARCH_SH_VARIANT}" in
|
||||
sh3) CT_KconfigEnableOption "CONFIG_SH3" "${cfg}";;
|
||||
sh4) CT_KconfigEnableOption "CONFIG_SH4" "${cfg}";;
|
||||
sh4a) CT_KconfigEnableOption "CONFIG_SH4A" "${cfg}";;
|
||||
esac
|
||||
}
|
||||
|
||||
CT_DoArchUClibcCflags() {
|
||||
local cfg="${1}"
|
||||
local cflags="${2}"
|
||||
local f
|
||||
|
||||
for f in ${cflags}; do
|
||||
case "${f}" in
|
||||
-m3)
|
||||
CT_KconfigEnableOption "CONFIG_SH3" "${cfg}"
|
||||
;;
|
||||
-m4)
|
||||
CT_KconfigEnableOption "CONFIG_SH4" "${cfg}"
|
||||
CT_KconfigEnableOption "UCLIBC_HAS_FPU" "${cfg}"
|
||||
;;
|
||||
-m4-nofpu)
|
||||
CT_KconfigEnableOption "CONFIG_SH4" "${cfg}"
|
||||
CT_KconfigDisableOption "UCLIBC_HAS_FPU" "${cfg}"
|
||||
;;
|
||||
-m4a)
|
||||
CT_KconfigEnableOption "CONFIG_SH4A" "${cfg}"
|
||||
CT_KconfigEnableOption "UCLIBC_HAS_FPU" "${cfg}"
|
||||
;;
|
||||
-m4a-nofpu)
|
||||
CT_KconfigEnableOption "CONFIG_SH4A" "${cfg}"
|
||||
CT_KconfigDisableOption "UCLIBC_HAS_FPU" "${cfg}"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
@ -19,11 +19,61 @@ CT_DoArchTupleValues() {
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Get multilib architecture-specific target
|
||||
# Usage: CT_DoArchMultilibTarget "multilib flags" "target tuple"
|
||||
# Usage: CT_DoArchMultilibTarget "target variable" "multilib flags"
|
||||
CT_DoArchMultilibTarget ()
|
||||
{
|
||||
local target="${1}"; shift
|
||||
local target_var="${1}"; shift
|
||||
local -a multi_flags=( "$@" )
|
||||
local target_
|
||||
|
||||
echo "${target}"
|
||||
local m32=false
|
||||
local m64=false
|
||||
|
||||
for m in "${multi_flags[@]}"; do
|
||||
case "$m" in
|
||||
-m32) m32=true ;;
|
||||
-m64) m64=true ;;
|
||||
esac
|
||||
done
|
||||
|
||||
eval target_=\"\${${target_var}}\"
|
||||
|
||||
# Fix up bitness
|
||||
case "${target_}" in
|
||||
sparc-*) $m64 && target_=${target_/#sparc-/sparc64-} ;;
|
||||
sparc64-*) $m32 && target_=${target_/#sparc64-/sparc-} ;;
|
||||
esac
|
||||
|
||||
# Set the target variable
|
||||
eval ${target_var}=\"${target_}\"
|
||||
}
|
||||
|
||||
# Special tuple adjustment for glibc.
|
||||
CT_DoArchGlibcAdjustTuple() {
|
||||
local target_var="${1}"
|
||||
local target_
|
||||
|
||||
eval target_=\"\${${target_var}}\"
|
||||
|
||||
case "${target_}" in
|
||||
# SPARC quirk: glibc 2.23 and newer dropped support for SPARCv8 and
|
||||
# earlier (corresponding pthread barrier code is missing). Until this
|
||||
# support is reintroduced, configure as sparcv9.
|
||||
sparc-*)
|
||||
if [ "${CT_LIBC_GLIBC_2_23_or_later}" = y ]; then
|
||||
CT_DoLog WARN "GLIBC 2.23 only supports SPARCv9"
|
||||
target_=${target_/#sparc-/sparcv9-}
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
# Set the target variable
|
||||
eval ${target_var}=\"${target_}\"
|
||||
}
|
||||
|
||||
CT_DoArchUClibcConfig() {
|
||||
local cfg="${1}"
|
||||
|
||||
CT_DoArchUClibcSelectArch "${cfg}" "${CT_ARCH}"
|
||||
# FIXME: select CONFIG_SPARC_V7/V8/V9/V9B according to the CPU selector
|
||||
}
|
||||
|
@ -15,7 +15,9 @@ CT_DoArchTupleValues() {
|
||||
winchip*) CT_TARGET_ARCH=i486;;
|
||||
pentium|pentium-mmx|c3*) CT_TARGET_ARCH=i586;;
|
||||
pentiumpro|pentium*|athlon*) CT_TARGET_ARCH=i686;;
|
||||
prescott) CT_TARGET_ARCH=i686;;
|
||||
core2|atom) CT_TARGET_ARCH=i686;;
|
||||
prescott|nocona) CT_TARGET_ARCH=i686;;
|
||||
k8*|opteron*) CT_TARGET_ARCH=i686;;
|
||||
*) CT_TARGET_ARCH=i586;;
|
||||
esac
|
||||
fi
|
||||
@ -35,11 +37,12 @@ CT_DoArchTupleValues() {
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Get multilib architecture-specific target
|
||||
# Usage: CT_DoArchMultilibTarget "multilib flags" "target tuple"
|
||||
# Usage: CT_DoArchMultilibTarget "target variable" "multilib flags"
|
||||
CT_DoArchMultilibTarget ()
|
||||
{
|
||||
local target="${1}"; shift
|
||||
local target_var="${1}"; shift
|
||||
local -a multi_flags=( "$@" )
|
||||
local target_
|
||||
|
||||
local bit32=false
|
||||
local bit64=false
|
||||
@ -54,17 +57,126 @@ CT_DoArchMultilibTarget ()
|
||||
esac
|
||||
done
|
||||
|
||||
eval target_=\"\${${target_var}}\"
|
||||
|
||||
# Fix up architecture.
|
||||
case "${target}" in
|
||||
x86_64-*) $bit32 && target=${target/#x86_64-/i386-} ;;
|
||||
i[34567]86-*) $bit64 && target=${target/#i[34567]86-/x86_64-} ;;
|
||||
case "${target_}" in
|
||||
x86_64-*) $bit32 && target_=${target_/#x86_64-/i386-} ;;
|
||||
i[34567]86-*) $bit64 && target_=${target_/#i[34567]86-/x86_64-} ;;
|
||||
esac
|
||||
|
||||
# Fix up the ABI part.
|
||||
case "${target}" in
|
||||
*x32) $abi_dflt && target=${target/%x32} ;;
|
||||
*) $abi_x32 && target=${target}x32 ;;
|
||||
case "${target_}" in
|
||||
*x32) $abi_dflt && target_=${target_/%x32} ;;
|
||||
*) $abi_x32 && target_=${target_}x32 ;;
|
||||
esac
|
||||
|
||||
echo "${target}"
|
||||
# Set the target variable
|
||||
eval ${target_var}=\"${target_}\"
|
||||
}
|
||||
|
||||
# Adjust target tuple for GLIBC
|
||||
CT_DoArchGlibcAdjustTuple() {
|
||||
local target_var="${1}"
|
||||
local target_
|
||||
|
||||
eval target_=\"\${${target_var}}\"
|
||||
|
||||
case "${target_}" in
|
||||
# x86 quirk: architecture name is i386, but glibc expects i[4567]86 - to
|
||||
# indicate the desired optimization. If it was a multilib variant of x86_64,
|
||||
# then it targets at least NetBurst a.k.a. i786, but we'll follow the model
|
||||
# above # and set the optimization to i686. Otherwise, replace with the most
|
||||
# conservative choice, i486.
|
||||
i386-*)
|
||||
if [ "${CT_TARGET_ARCH}" = "x86_64" ]; then
|
||||
target_=${target_/#i386-/i686-}
|
||||
elif [ "${CT_TARGET_ARCH}" != "i386" ]; then
|
||||
target_=${target_/#i386-/${CT_TARGET_ARCH}-}
|
||||
else
|
||||
target_=${target_/#i386-/i486-}
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
# Set the target variable
|
||||
eval ${target_var}=\"${target_}\"
|
||||
}
|
||||
|
||||
CT_DoArchUClibcConfig() {
|
||||
local cfg="${1}"
|
||||
|
||||
if [ "${CT_ARCH_BITNESS}" = 64 ]; then
|
||||
CT_DoArchUClibcSelectArch "${cfg}" "x86_64"
|
||||
else
|
||||
CT_DoArchUClibcSelectArch "${cfg}" "i386"
|
||||
fi
|
||||
|
||||
# FIXME This doesn't cover all cases of x86_32 on uClibc (!ng)
|
||||
CT_KconfigDisableOption "CONFIG_386" "${cfg}"
|
||||
CT_KconfigDisableOption "CONFIG_486" "${cfg}"
|
||||
CT_KconfigDisableOption "CONFIG_586" "${cfg}"
|
||||
CT_KconfigDisableOption "CONFIG_686" "${cfg}"
|
||||
case ${CT_TARGET_ARCH} in
|
||||
i386)
|
||||
CT_KconfigEnableOption "CONFIG_386" "${cfg}"
|
||||
;;
|
||||
i486)
|
||||
CT_KconfigEnableOption "CONFIG_486" "${cfg}"
|
||||
;;
|
||||
i586)
|
||||
CT_KconfigEnableOption "CONFIG_586" "${cfg}"
|
||||
;;
|
||||
i686)
|
||||
CT_KconfigEnableOption "CONFIG_686" "${cfg}"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
CT_DoArchUClibcCflags() {
|
||||
local cfg="${1}"
|
||||
local cflags="${2}"
|
||||
local f
|
||||
|
||||
for f in ${cflags}; do
|
||||
case "${f}" in
|
||||
-m64)
|
||||
CT_DoArchUClibcSelectArch "${cfg}" "x86_64"
|
||||
;;
|
||||
-m32)
|
||||
# Since it's a part of multilib with 64-bit flavor, default
|
||||
# to new architecture (i686).
|
||||
CT_DoArchUClibcSelectArch "${cfg}" "i386"
|
||||
CT_KconfigDisableOption "CONFIG_386" "${cfg}"
|
||||
CT_KconfigDisableOption "CONFIG_486" "${cfg}"
|
||||
CT_KconfigDisableOption "CONFIG_586" "${cfg}"
|
||||
CT_KconfigEnableOption "CONFIG_686" "${cfg}"
|
||||
;;
|
||||
-mx32)
|
||||
CT_Abort "uClibc does not support x32 ABI"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
CT_DoArchUClibcHeaderDir() {
|
||||
local dir_var="${1}"
|
||||
local cflags="${2}"
|
||||
|
||||
# If it is non-default multilib, add a suffix with architecture (reported by gcc)
|
||||
# to the headers installation path.
|
||||
if [ -n "${cflags}" ]; then
|
||||
eval "${dir_var}="$( ${CT_TARGET}-gcc -print-multiarch ${cflags} )
|
||||
fi
|
||||
}
|
||||
|
||||
CT_DoArchMUSLHeaderDir() {
|
||||
local dir_var="${1}"
|
||||
local cflags="${2}"
|
||||
|
||||
# If it is non-default multilib, add a suffix with architecture (reported by gcc)
|
||||
# to the headers installation path.
|
||||
if [ -n "${cflags}" ]; then
|
||||
eval "${dir_var}="$( ${CT_TARGET}-gcc -print-multiarch ${cflags} )
|
||||
fi
|
||||
}
|
||||
|
@ -70,3 +70,9 @@ CT_ConfigureXtensa() {
|
||||
|
||||
CT_Popd
|
||||
}
|
||||
|
||||
CT_DoArchUClibcConfig() {
|
||||
local cfg="${1}"
|
||||
|
||||
CT_DoArchUClibcSelectArch "${cfg}" "xtensa"
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user