aboutsummaryrefslogtreecommitdiff
path: root/libgcc
diff options
context:
space:
mode:
Diffstat (limited to 'libgcc')
-rw-r--r--libgcc/ChangeLog11
-rw-r--r--libgcc/config.host3
-rw-r--r--libgcc/config/avr/t-avr8
-rw-r--r--libgcc/config/avr/t-avrlibc31
-rw-r--r--libgcc/config/avr/t-copy-libgcc13
5 files changed, 64 insertions, 2 deletions
diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog
index c528cec..ff26a0c 100644
--- a/libgcc/ChangeLog
+++ b/libgcc/ChangeLog
@@ -1,3 +1,14 @@
+2019-11-07 Georg-Johann Lay <avr@gjlay.de>
+
+ Support 64-bit double and 64-bit long double configurations.
+
+ PR target/92055
+ * config/avr/t-avr (HOST_LIBGCC2_CFLAGS): Only add -DF=SF if
+ long double is a 32-bit type.
+ * config/avr/t-avrlibc: Copy double64 and long-double64
+ multilib(s) from the vanilla one.
+ * config/avr/t-copy-libgcc: New Makefile snip.
+
2019-11-04 Jozef Lawrynowicz <jozef.l@mittosystems.com>
* crtstuff.c: Define USE_TM_CLONE_REGISTRY to 0 if it's undefined and
diff --git a/libgcc/config.host b/libgcc/config.host
index 122113f..0b8eb4e 100644
--- a/libgcc/config.host
+++ b/libgcc/config.host
@@ -505,6 +505,9 @@ avr-*-*)
tmake_file="$tmake_file ${cpu_type}/t-avrlibc"
fi
tm_file="$tm_file avr/avr-lib.h"
+ if test x${with_fixed_point} = xno; then
+ fixed_point=no
+ fi
;;
bfin*-elf*)
tmake_file="bfin/t-bfin bfin/t-crtlibid bfin/t-crtstuff t-libgcc-pic t-fdpbit"
diff --git a/libgcc/config/avr/t-avr b/libgcc/config/avr/t-avr
index c420c5d..e4f867b 100644
--- a/libgcc/config/avr/t-avr
+++ b/libgcc/config/avr/t-avr
@@ -112,10 +112,14 @@ LIB2FUNCS_EXCLUDE = \
_clrsbdi2 \
-# We do not have the DF type.
+ifeq ($(long_double_type_size),32)
+# We do not have the DFtype.
+HOST_LIBGCC2_CFLAGS += -DDF=SF
+endif
+
# Most of the C functions in libgcc2 use almost all registers,
# so use -mcall-prologues for smaller code size.
-HOST_LIBGCC2_CFLAGS += -DDF=SF -Dinhibit_libc -mcall-prologues -Os
+HOST_LIBGCC2_CFLAGS += -Dinhibit_libc -mcall-prologues -Os
# Extra 16-bit integer functions.
intfuncs16 = _absvXX2 _addvXX3 _subvXX3 _mulvXX3 _negvXX2 _clrsbXX2
diff --git a/libgcc/config/avr/t-avrlibc b/libgcc/config/avr/t-avrlibc
index d2c8b87..2424d66 100644
--- a/libgcc/config/avr/t-avrlibc
+++ b/libgcc/config/avr/t-avrlibc
@@ -64,3 +64,34 @@ LIB2FUNCS_EXCLUDE += \
_fixunssfsi _fixsfdi \
_fixunssfdi \
_floatdisf _floatundisf
+
+ifneq (,$(findstring avr,$(MULTISUBDIR)))
+
+# We are not in the avr2 (default) subdir, hence copying will work.
+# In default dir, copying won'twork because the default multilib is
+# built after all the others.
+
+ifneq (,$(findstring double64,$(MULTISUBDIR)))
+
+# We are in double64/libgcc or long-double64/libgcc:
+# Just copy from the [long ]double=float multilib; we would remove any DFmode
+# bits from this multilib variant, anyway, because the current assumption
+# is that avr-libc hosts *all* the IEEE-double stuff.
+
+LIB2FUNCS_EXCLUDE := %
+LIB1ASMFUNCS :=
+libgcc-objects :=
+libgcov-objects :=
+objects :=
+
+t-copy-libgcc.dep: $(srcdir)/config/avr/t-copy-libgcc
+ -rm -f libgcc.a
+ -rm -f libgcov.a
+ cp $< $@
+
+libgcc.a libgcov.a libgcc_tm.h: t-copy-libgcc.dep
+
+Makefile: t-copy-libgcc.dep
+
+endif
+endif
diff --git a/libgcc/config/avr/t-copy-libgcc b/libgcc/config/avr/t-copy-libgcc
new file mode 100644
index 0000000..d34cbde
--- /dev/null
+++ b/libgcc/config/avr/t-copy-libgcc
@@ -0,0 +1,13 @@
+# Only used with --with-avrlibc & (-mlong-double=64 | -mdouble=64)
+#
+# Inserted at the end of Makefile by magic[tm].
+# We need this *after* Makefile's rules so we can override them.
+
+libgcc.a: ../../libgcc/libgcc.a
+ cp $< $@
+
+libgcov.a: ../../libgcc/libgcov.a
+ @:
+ifeq ($(enable_gcov),yes)
+ cp $< $@
+endif