diff --git a/libgfortran/configure b/libgfortran/configure index db607eb5954..a3672265d77 100755 --- a/libgfortran/configure +++ b/libgfortran/configure @@ -5768,7 +5768,14 @@ fi # Add -Wall -fno-repack-arrays -fno-underscoring if we are using GCC. if test "x$GCC" = "xyes"; then - AM_FCFLAGS="-I . -Wall -Werror -fimplicit-none -fno-repack-arrays -fno-underscoring" + case "${host_cpu}" in + amiga*) + AM_FCFLAGS="-I . -Wall -Werror -fimplicit-none -fno-repack-arrays" + ;; + *) + AM_FCFLAGS="-I . -Wall -Werror -fimplicit-none -fno-repack-arrays -fno-underscoring" + ;; + esac ## We like to use C11 and C99 routines when available. This makes ## sure that ## __STDC_VERSION__ is set such that libc includes make them available. diff --git a/libgfortran/runtime/compile_options.c b/libgfortran/runtime/compile_options.c index 71ec56a5a8b..ec79e03d14b 100644 --- a/libgfortran/runtime/compile_options.c +++ b/libgfortran/runtime/compile_options.c @@ -29,7 +29,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see /* Useful compile-time options will be stored in here. */ compile_options_t compile_options; -#ifndef LIBGFOR_MINIMAL +#if !defined(LIBGFOR_MINIMAL) && !defined(__AMIGA__) static volatile sig_atomic_t fatal_error_in_progress = 0; @@ -167,7 +167,7 @@ set_options (int num, int options[]) if (num >= 9) compile_options.fpe_summary = options[8]; -#ifndef LIBGFOR_MINIMAL +#if !defined(LIBGFOR_MINIMAL) && !defined(__AMIGA__) /* If backtrace is required, we set signal handlers on the POSIX 2001 signals with core action. */ if (compile_options.backtrace) diff --git a/libgfortran/runtime/error.c b/libgfortran/runtime/error.c index 6478ca732bf..a0d69691134 100644 --- a/libgfortran/runtime/error.c +++ b/libgfortran/runtime/error.c @@ -175,7 +175,9 @@ sys_abort (void) || (options.backtrace == -1 && compile_options.backtrace == 1)) { estr_write ("\nProgram aborted. Backtrace:\n"); +#ifndef __AMIGA__ show_backtrace (false); +#endif signal (SIGABRT, SIG_DFL); } @@ -193,7 +195,9 @@ exit_error (int status) || (options.backtrace == -1 && compile_options.backtrace == 1)) { estr_write ("\nError termination. Backtrace:\n"); +#ifndef __AMIGA__ show_backtrace (false); +#endif } exit (status); }