mirror of git://gcc.gnu.org/git/gcc.git
Makefile.in (LIB2_DIVMOD_EXCEPTION_FLAGS): Default to -fexceptions -fnon-call-exceptions if not defined.
libgcc/
* Makefile.in (LIB2_DIVMOD_EXCEPTION_FLAGS): Default to
-fexceptions -fnon-call-exceptions if not defined.
($(lib2-divmod-o), $(lib2-divmod-s-o)): Use above.
* config/arm/t-bpabi (LIB2_DIVMOD_EXCEPTION_FLAGS): Define.
gcc/testsuite/
* gcc.target/arm/div64-unwinding.c: New test.
From-SVN: r190483
This commit is contained in:
parent
5615a07d0c
commit
a508e1a8cb
|
|
@ -1,3 +1,7 @@
|
||||||
|
2012-08-17 Julian Brown <julian@codesourcery.com>
|
||||||
|
|
||||||
|
* gcc.target/arm/div64-unwinding.c: New test.
|
||||||
|
|
||||||
2012-08-17 Jakub Jelinek <jakub@redhat.com>
|
2012-08-17 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
* gcc.dg/torture/Wsizeof-pointer-memaccess1.c: New test.
|
* gcc.dg/torture/Wsizeof-pointer-memaccess1.c: New test.
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
/* Performing a 64-bit division should not pull in the unwinder. */
|
||||||
|
|
||||||
|
/* { dg-do run } */
|
||||||
|
/* { dg-options "-O0" } */
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
long long
|
||||||
|
foo (long long c, long long d)
|
||||||
|
{
|
||||||
|
return c/d;
|
||||||
|
}
|
||||||
|
|
||||||
|
long long x = 0;
|
||||||
|
long long y = 1;
|
||||||
|
|
||||||
|
extern int (*_Unwind_RaiseException) (void *) __attribute__((weak));
|
||||||
|
|
||||||
|
int main(void)
|
||||||
|
{
|
||||||
|
if (&_Unwind_RaiseException != NULL)
|
||||||
|
abort ();;
|
||||||
|
return foo (x, y);
|
||||||
|
}
|
||||||
|
|
@ -1,3 +1,10 @@
|
||||||
|
2012-08-17 Julian Brown <julian@codesourcery.com>
|
||||||
|
|
||||||
|
* Makefile.in (LIB2_DIVMOD_EXCEPTION_FLAGS): Default to
|
||||||
|
-fexceptions -fnon-call-exceptions if not defined.
|
||||||
|
($(lib2-divmod-o), $(lib2-divmod-s-o)): Use above.
|
||||||
|
* config/arm/t-bpabi (LIB2_DIVMOD_EXCEPTION_FLAGS): Define.
|
||||||
|
|
||||||
2012-08-17 Andreas Schwab <schwab@linux-m68k.org>
|
2012-08-17 Andreas Schwab <schwab@linux-m68k.org>
|
||||||
|
|
||||||
* config/m68k/linux-atomic.c (__sync_lock_test_and_set_1): Fix
|
* config/m68k/linux-atomic.c (__sync_lock_test_and_set_1): Fix
|
||||||
|
|
|
||||||
|
|
@ -497,18 +497,24 @@ libgcc-s-objects += $(patsubst %,%_s$(objext),$(sifuncs) $(difuncs) $(tifuncs))
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(LIB2_DIVMOD_EXCEPTION_FLAGS),)
|
||||||
|
# Provide default flags for compiling divmod functions, if they haven't been
|
||||||
|
# set already by a target-specific Makefile fragment.
|
||||||
|
LIB2_DIVMOD_EXCEPTION_FLAGS := -fexceptions -fnon-call-exceptions
|
||||||
|
endif
|
||||||
|
|
||||||
# Build LIB2_DIVMOD_FUNCS.
|
# Build LIB2_DIVMOD_FUNCS.
|
||||||
lib2-divmod-o = $(patsubst %,%$(objext),$(LIB2_DIVMOD_FUNCS))
|
lib2-divmod-o = $(patsubst %,%$(objext),$(LIB2_DIVMOD_FUNCS))
|
||||||
$(lib2-divmod-o): %$(objext): $(srcdir)/libgcc2.c
|
$(lib2-divmod-o): %$(objext): $(srcdir)/libgcc2.c
|
||||||
$(gcc_compile) -DL$* -c $< \
|
$(gcc_compile) -DL$* -c $< \
|
||||||
-fexceptions -fnon-call-exceptions $(vis_hide)
|
$(LIB2_DIVMOD_EXCEPTION_FLAGS) $(vis_hide)
|
||||||
libgcc-objects += $(lib2-divmod-o)
|
libgcc-objects += $(lib2-divmod-o)
|
||||||
|
|
||||||
ifeq ($(enable_shared),yes)
|
ifeq ($(enable_shared),yes)
|
||||||
lib2-divmod-s-o = $(patsubst %,%_s$(objext),$(LIB2_DIVMOD_FUNCS))
|
lib2-divmod-s-o = $(patsubst %,%_s$(objext),$(LIB2_DIVMOD_FUNCS))
|
||||||
$(lib2-divmod-s-o): %_s$(objext): $(srcdir)/libgcc2.c
|
$(lib2-divmod-s-o): %_s$(objext): $(srcdir)/libgcc2.c
|
||||||
$(gcc_s_compile) -DL$* -c $< \
|
$(gcc_s_compile) -DL$* -c $< \
|
||||||
-fexceptions -fnon-call-exceptions
|
$(LIB2_DIVMOD_EXCEPTION_FLAGS)
|
||||||
libgcc-s-objects += $(lib2-divmod-s-o)
|
libgcc-s-objects += $(lib2-divmod-s-o)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,3 +13,8 @@ LIB2ADDEH = $(srcdir)/config/arm/unwind-arm.c \
|
||||||
|
|
||||||
# Add the BPABI names.
|
# Add the BPABI names.
|
||||||
SHLIB_MAPFILES += $(srcdir)/config/arm/libgcc-bpabi.ver
|
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
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue