mirror of
https://github.com/devkitPro/buildscripts.git
synced 2026-04-25 07:22:27 -05:00
252 lines
9.3 KiB
Diff
252 lines
9.3 KiB
Diff
diff --git a/gcc/config/arm/arm-cpus.in b/gcc/config/arm/arm-cpus.in
|
|
index 728be500b80..74c1abad635 100644
|
|
--- a/gcc/config/arm/arm-cpus.in
|
|
+++ b/gcc/config/arm/arm-cpus.in
|
|
@@ -392,7 +392,7 @@ begin arch armv6k
|
|
tune for mpcore
|
|
tune flags CO_PROC
|
|
base 6K
|
|
- isa ARMv6k
|
|
+ isa ARMv6k VFPv2 FP_DBL
|
|
option fp add VFPv2 FP_DBL
|
|
optalias vfpv2 fp
|
|
option nofp remove ALL_FP
|
|
diff --git a/gcc/config/arm/t-arm-elf b/gcc/config/arm/t-arm-elf
|
|
index 3d92bd23322..35cefcde676 100644
|
|
--- a/gcc/config/arm/t-arm-elf
|
|
+++ b/gcc/config/arm/t-arm-elf
|
|
@@ -16,111 +16,14 @@
|
|
# along with GCC; see the file COPYING3. If not see
|
|
# <http://www.gnu.org/licenses/>.
|
|
|
|
-# Build a very basic set of libraries that should cater for most cases.
|
|
-
|
|
-# Single-precision floating-point is NOT supported; we don't build a
|
|
-# suitable library for that. Use the rm-profile config in that case.
|
|
-
|
|
-# PART 1 - Useful groups of options
|
|
-
|
|
-dp_fpus := vfp vfpv2 vfpv3 vfpv3-fp16 vfpv3-d16 vfpv3-d16-fp16 \
|
|
- neon neon-vfpv3 neon-fp16 vfpv4 neon-vfpv4 vfpv4-d16 \
|
|
- fpv5-d16 fp-armv8 neon-fp-armv8 crypto-neon-fp-armv8 \
|
|
- vfp3
|
|
-
|
|
-sp_fpus := vfpv3xd vfpv3xd-fp16 fpv4-sp-d16 fpv5-sp-d16
|
|
-
|
|
-v7a_fps := vfpv3 vfpv3-fp16 vfpv4 simd neon-fp16 neon-vfpv4
|
|
-v7ve_fps := vfpv3-d16 vfpv3 vfpv3-d16-fp16 vfpv3-fp16 vfpv4 neon \
|
|
- neon-fp16 simd
|
|
-
|
|
-# Not all these permutations exist for all architecture variants, but
|
|
-# it seems to work ok.
|
|
-v8_fps := simd fp16 crypto fp16+crypto dotprod fp16fml
|
|
-
|
|
-# We don't do anything special with these. Pre-v4t probably doesn't work.
|
|
-all_early_nofp := armv4 armv4t armv5t
|
|
-
|
|
-all_early_arch := armv5tej armv6 armv6j armv6k armv6z armv6kz \
|
|
- armv6zk armv6t2 iwmmxt iwmmxt2
|
|
-
|
|
-all_v7_a_r := armv7-a armv7ve armv7-r
|
|
-
|
|
-all_v8_archs := armv8-a armv8-a+crc armv8.1-a armv8.2-a armv8.3-a armv8.4-a \
|
|
- armv8.5-a armv8.6-a
|
|
-
|
|
-# No floating point variants, require thumb1 softfp
|
|
-all_nofp_t := armv6-m armv6s-m armv8-m.base
|
|
-
|
|
-all_nofp_t2 := armv7-m
|
|
-
|
|
-all_sp_only := armv7e-m armv8-m.main
|
|
-
|
|
-MULTILIB_OPTIONS =
|
|
-MULTILIB_DIRNAMES =
|
|
+MULTILIB_OPTIONS = mthumb mbig-endian march=armv6k mfloat-abi=hard
|
|
+MULTILIB_DIRNAMES = thumb be armv6k fpu
|
|
MULTILIB_EXCEPTIONS =
|
|
MULTILIB_MATCHES =
|
|
-MULTILIB_REUSE =
|
|
-
|
|
-# PART 2 - multilib build rules
|
|
-
|
|
-MULTILIB_OPTIONS += marm/mthumb
|
|
-MULTILIB_DIRNAMES += arm thumb
|
|
-
|
|
-MULTILIB_OPTIONS += mfpu=auto
|
|
-MULTILIB_DIRNAMES += autofp
|
|
-
|
|
-MULTILIB_OPTIONS += march=armv5te+fp/march=armv7+fp
|
|
-MULTILIB_DIRNAMES += v5te v7
|
|
-
|
|
-MULTILIB_OPTIONS += mfloat-abi=hard
|
|
-MULTILIB_DIRNAMES += fpu
|
|
-
|
|
-# Build a total of 4 library variants (base options plus the following):
|
|
-MULTILIB_REQUIRED += mthumb
|
|
-MULTILIB_REQUIRED += marm/mfpu=auto/march=armv5te+fp/mfloat-abi=hard
|
|
-MULTILIB_REQUIRED += mthumb/mfpu=auto/march=armv7+fp/mfloat-abi=hard
|
|
-
|
|
-# PART 3 - Match rules
|
|
-
|
|
-# Map all supported FPUs onto mfpu=auto
|
|
-MULTILIB_MATCHES += $(foreach FPU, $(dp_fpus), \
|
|
- mfpu?auto=mfpu?$(FPU))
|
|
-
|
|
-MULTILIB_MATCHES += march?armv5te+fp=march?armv5te
|
|
-
|
|
-MULTILIB_MATCHES += $(foreach ARCH, $(all_early_arch), \
|
|
- march?armv5te+fp=march?$(ARCH) \
|
|
- march?armv5te+fp=march?$(ARCH)+fp)
|
|
-
|
|
-MULTILIB_MATCHES += march?armv7+fp=march?armv7
|
|
-
|
|
-MULTILIB_MATCHES += $(foreach FPARCH, $(v7a_fps), \
|
|
- march?armv7+fp=march?armv7-a+$(FPARCH))
|
|
-
|
|
-MULTILIB_MATCHES += $(foreach FPARCH, $(v7ve_fps), \
|
|
- march?armv7+fp=march?armv7ve+$(FPARCH))
|
|
-
|
|
-MULTILIB_MATCHES += $(foreach ARCH, $(all_v7_a_r), \
|
|
- march?armv7+fp=march?$(ARCH) \
|
|
- march?armv7+fp=march?$(ARCH)+fp)
|
|
|
|
-MULTILIB_MATCHES += $(foreach ARCH, $(all_v8_archs), \
|
|
- march?armv7+fp=march?$(ARCH) \
|
|
- $(foreach FPARCH, $(v8_fps), \
|
|
- march?armv7+fp=march?$(ARCH)+$(FPARCH)))
|
|
+MULTILIB_REQUIRED = mthumb mbig-endian mthumb/mbig-endian march=armv6k/mfloat-abi=hard
|
|
|
|
-MULTILIB_MATCHES += $(foreach ARCH, armv7e-m armv8-m.mainline, \
|
|
- march?armv7+fp=march?$(ARCH)+fp.dp)
|
|
|
|
-# PART 4 - Reuse rules
|
|
+MULTILIB_MATCHES += march?armv6k=mtune?mpcore
|
|
+MULTILIB_MATCHES += march?armv6k=mcpu?mpcore
|
|
|
|
-MULTILIB_REUSE += mthumb=mthumb/mfpu.auto
|
|
-MULTILIB_REUSE += mthumb=mthumb/mfpu.auto/march.armv5te+fp
|
|
-MULTILIB_REUSE += mthumb=mthumb/march.armv5te+fp
|
|
-MULTILIB_REUSE += marm/mfpu.auto/march.armv5te+fp/mfloat-abi.hard=marm/march.armv5te+fp/mfloat-abi.hard
|
|
-MULTILIB_REUSE += marm/mfpu.auto/march.armv5te+fp/mfloat-abi.hard=march.armv5te+fp/mfloat-abi.hard
|
|
-MULTILIB_REUSE += marm/mfpu.auto/march.armv5te+fp/mfloat-abi.hard=mfpu.auto/march.armv5te+fp/mfloat-abi.hard
|
|
-MULTILIB_REUSE += mthumb/mfpu.auto/march.armv7+fp/mfloat-abi.hard=mthumb/march.armv7+fp/mfloat-abi.hard
|
|
-MULTILIB_REUSE += mthumb/mfpu.auto/march.armv7+fp/mfloat-abi.hard=mfpu.auto/march.armv7+fp/mfloat-abi.hard
|
|
-MULTILIB_REUSE += mthumb/mfpu.auto/march.armv7+fp/mfloat-abi.hard=march.armv7+fp/mfloat-abi.hard
|
|
diff --git a/gcc/config/arm/unknown-elf.h b/gcc/config/arm/unknown-elf.h
|
|
index 9ad2947505f..1790caa8e88 100644
|
|
--- a/gcc/config/arm/unknown-elf.h
|
|
+++ b/gcc/config/arm/unknown-elf.h
|
|
@@ -29,7 +29,7 @@
|
|
#endif
|
|
|
|
/* Now we define the strings used to build the spec file. */
|
|
-#define UNKNOWN_ELF_STARTFILE_SPEC " crti%O%s crtbegin%O%s crt0%O%s"
|
|
+#define UNKNOWN_ELF_STARTFILE_SPEC " crti%O%s crtbegin%O%s"
|
|
|
|
#undef STARTFILE_SPEC
|
|
#define STARTFILE_SPEC \
|
|
@@ -93,4 +93,5 @@
|
|
udivmoddi4, which will depend on the exception unwind routines,
|
|
which will depend on abort, which is defined in libc. */
|
|
#undef LINK_GCC_C_SEQUENCE_SPEC
|
|
-#define LINK_GCC_C_SEQUENCE_SPEC "--start-group %G %{!nolibc:%L} --end-group"
|
|
+#define LINK_GCC_C_SEQUENCE_SPEC "--start-group %G %L %(libgloss) --end-group"
|
|
+
|
|
diff --git a/gcc/config/i386/host-mingw32.c b/gcc/config/i386/host-mingw32.c
|
|
index 250fef59b55..36b2239aa5d 100644
|
|
--- a/gcc/config/i386/host-mingw32.c
|
|
+++ b/gcc/config/i386/host-mingw32.c
|
|
@@ -44,9 +44,6 @@ static size_t mingw32_gt_pch_alloc_granularity (void);
|
|
|
|
static inline void w32_error(const char*, const char*, int, const char*);
|
|
|
|
-/* FIXME: Is this big enough? */
|
|
-static const size_t pch_VA_max_size = 128 * 1024 * 1024;
|
|
-
|
|
/* Granularity for reserving address space. */
|
|
static size_t va_granularity = 0x10000;
|
|
|
|
@@ -88,9 +85,6 @@ static void *
|
|
mingw32_gt_pch_get_address (size_t size, int)
|
|
{
|
|
void* res;
|
|
- size = (size + va_granularity - 1) & ~(va_granularity - 1);
|
|
- if (size > pch_VA_max_size)
|
|
- return NULL;
|
|
|
|
/* FIXME: We let system determine base by setting first arg to NULL.
|
|
Allocating at top of available address space avoids unnecessary
|
|
@@ -100,7 +94,7 @@ mingw32_gt_pch_get_address (size_t size, int)
|
|
If we allocate at bottom we need to reserve the address as early
|
|
as possible and at the same point in each invocation. */
|
|
|
|
- res = VirtualAlloc (NULL, pch_VA_max_size,
|
|
+ res = VirtualAlloc (NULL, size,
|
|
MEM_RESERVE | MEM_TOP_DOWN,
|
|
PAGE_NOACCESS);
|
|
if (!res)
|
|
@@ -150,7 +144,7 @@ mingw32_gt_pch_use_address (void *addr, size_t size, int fd,
|
|
|
|
/* Offset must be also be a multiple of allocation granularity for
|
|
this to work. We can't change the offset. */
|
|
- if ((offset & (va_granularity - 1)) != 0 || size > pch_VA_max_size)
|
|
+ if ((offset & (va_granularity - 1)) != 0)
|
|
return -1;
|
|
|
|
|
|
diff --git a/gcc/gcc.c b/gcc/gcc.c
|
|
index 9f790db0daf..97f52d0b893 100644
|
|
--- a/gcc/gcc.c
|
|
+++ b/gcc/gcc.c
|
|
@@ -793,6 +793,11 @@ proper position among the other output files. */
|
|
#endif
|
|
#endif
|
|
|
|
+#ifndef LIBGLOSS_SPEC
|
|
+# define LIBGLOSS_SPEC "-lsysbase"
|
|
+#endif
|
|
+
|
|
+
|
|
/* config.h can define STARTFILE_SPEC to override the default crt0 files. */
|
|
#ifndef STARTFILE_SPEC
|
|
#define STARTFILE_SPEC \
|
|
@@ -1085,6 +1090,7 @@ static const char *link_spec = LINK_SPEC;
|
|
static const char *lib_spec = LIB_SPEC;
|
|
static const char *link_gomp_spec = "";
|
|
static const char *libgcc_spec = LIBGCC_SPEC;
|
|
+static const char *libgloss_spec = LIBGLOSS_SPEC;
|
|
static const char *endfile_spec = ENDFILE_SPEC;
|
|
static const char *startfile_spec = STARTFILE_SPEC;
|
|
static const char *linker_name_spec = LINKER_NAME;
|
|
@@ -1582,6 +1588,7 @@ static struct spec_list static_specs[] =
|
|
INIT_STATIC_SPEC ("lib", &lib_spec),
|
|
INIT_STATIC_SPEC ("link_gomp", &link_gomp_spec),
|
|
INIT_STATIC_SPEC ("libgcc", &libgcc_spec),
|
|
+ INIT_STATIC_SPEC ("libgloss", &libgloss_spec),
|
|
INIT_STATIC_SPEC ("startfile", &startfile_spec),
|
|
INIT_STATIC_SPEC ("cross_compile", &cross_compile),
|
|
INIT_STATIC_SPEC ("version", &compiler_version),
|
|
diff --git a/libgcc/config/arm/t-bpabi b/libgcc/config/arm/t-bpabi
|
|
index dddddc7c444..c2502597953 100644
|
|
--- a/libgcc/config/arm/t-bpabi
|
|
+++ b/libgcc/config/arm/t-bpabi
|
|
@@ -17,4 +17,4 @@ SHLIB_MAPFILES += $(srcdir)/config/arm/libgcc-bpabi.ver
|
|
# On ARM, specifying -fnon-call-exceptions will needlessly pull in
|
|
# the unwinder in simple programs which use 64-bit division. Omitting
|
|
# the option is safe.
|
|
-LIB2_DIVMOD_EXCEPTION_FLAGS := -fexceptions
|
|
+LIB2_DIVMOD_EXCEPTION_FLAGS := -fno-exceptions
|
|
diff --git a/libgcc/crtstuff.c b/libgcc/crtstuff.c
|
|
index 3f769a1c660..e005d8304b7 100644
|
|
--- a/libgcc/crtstuff.c
|
|
+++ b/libgcc/crtstuff.c
|
|
@@ -325,7 +325,7 @@ register_tm_clones (void)
|
|
|
|
#ifdef OBJECT_FORMAT_ELF
|
|
|
|
-#if DEFAULT_USE_CXA_ATEXIT
|
|
+#if 1 /* DEFAULT_USE_CXA_ATEXIT */
|
|
/* Declare the __dso_handle variable. It should have a unique value
|
|
in every shared-object; in a main program its value is zero. The
|
|
object should in any case be protected. This means the instance
|