aboutsummaryrefslogtreecommitdiff
path: root/libgfortran/Makefile.am
diff options
context:
space:
mode:
authorBernd Schmidt <bernds@codesourcery.com>2014-11-28 17:39:15 +0000
committerBernd Schmidt <bernds@gcc.gnu.org>2014-11-28 17:39:15 +0000
commitee95f9288a029478f1fbf9741db51855ac9a552b (patch)
tree0e296527e984f03d733bdbf9031d556f5292b19a /libgfortran/Makefile.am
parent8760be8546edd0941c1d62dd47e5130fae5df953 (diff)
downloadgcc-ee95f9288a029478f1fbf9741db51855ac9a552b.zip
gcc-ee95f9288a029478f1fbf9741db51855ac9a552b.tar.gz
gcc-ee95f9288a029478f1fbf9741db51855ac9a552b.tar.bz2
Add support for a minimal version of libgfortran for accelerator targets.
* Makefile.am (AM_CFLAGS): Add -DLIBGFOR_MINIMAL if LIBGFOR_MINIMAL. (gfor_io_src, gfor_heper_src, gfor_src): Split into minimal and always included sources. * Makefile.in: Regenerate. * configure.ac (LIBGFOR_MINIMAL): New AM_CONDITIONAL. * configure: Regenerate. * caf/single.c (caf_runtime_error): Don't print messages if LIBGFOR_MINIMAL. * runtime/compile_options.c (fatal_error_in_progress, show_signal, backtrace_handler, maybe_find_addr2line): Guard with !defined LIBGFOR_MINIMAL. (set_options): Likewise for the backtrace code. * runtime/minimal.c: New file. From-SVN: r218170
Diffstat (limited to 'libgfortran/Makefile.am')
-rw-r--r--libgfortran/Makefile.am98
1 files changed, 62 insertions, 36 deletions
diff --git a/libgfortran/Makefile.am b/libgfortran/Makefile.am
index a058a01..31eb986 100644
--- a/libgfortran/Makefile.am
+++ b/libgfortran/Makefile.am
@@ -77,7 +77,16 @@ AM_CFLAGS += $(SECTION_FLAGS)
AM_CFLAGS += $(IEEE_FLAGS)
AM_FCFLAGS += $(IEEE_FLAGS)
+if LIBGFOR_MINIMAL
+AM_CFLAGS += -DLIBGFOR_MINIMAL
+endif
+
gfor_io_src= \
+io/size_from_kind.c
+
+if !LIBGFOR_MINIMAL
+
+gfor_io_src+= \
io/close.c \
io/file_pos.c \
io/format.c \
@@ -87,7 +96,6 @@ io/list_read.c \
io/lock.c \
io/open.c \
io/read.c \
-io/size_from_kind.c \
io/transfer.c \
io/transfer128.c \
io/unit.c \
@@ -95,6 +103,8 @@ io/unix.c \
io/write.c \
io/fbuf.c
+endif
+
gfor_io_headers= \
io/io.h \
io/fbuf.h \
@@ -104,67 +114,73 @@ io/unix.h
gfor_helper_src= \
intrinsics/associated.c \
intrinsics/abort.c \
-intrinsics/access.c \
intrinsics/args.c \
intrinsics/bit_intrinsics.c \
-intrinsics/c99_functions.c \
-intrinsics/chdir.c \
-intrinsics/chmod.c \
-intrinsics/clock.c \
-intrinsics/cpu_time.c \
intrinsics/cshift0.c \
-intrinsics/ctime.c \
-intrinsics/date_and_time.c \
-intrinsics/dtime.c \
-intrinsics/env.c \
intrinsics/eoshift0.c \
intrinsics/eoshift2.c \
intrinsics/erfc_scaled.c \
-intrinsics/etime.c \
-intrinsics/execute_command_line.c \
-intrinsics/exit.c \
intrinsics/extends_type_of.c \
intrinsics/fnum.c \
-intrinsics/gerror.c \
-intrinsics/getcwd.c \
-intrinsics/getlog.c \
-intrinsics/getXid.c \
-intrinsics/hostnm.c \
intrinsics/ierrno.c \
intrinsics/ishftc.c \
intrinsics/iso_c_generated_procs.c \
intrinsics/iso_c_binding.c \
-intrinsics/kill.c \
-intrinsics/link.c \
intrinsics/malloc.c \
intrinsics/mvbits.c \
intrinsics/move_alloc.c \
intrinsics/pack_generic.c \
-intrinsics/perror.c \
intrinsics/selected_char_kind.c \
-intrinsics/signal.c \
intrinsics/size.c \
-intrinsics/sleep.c \
intrinsics/spread_generic.c \
intrinsics/string_intrinsics.c \
-intrinsics/system.c \
intrinsics/rand.c \
intrinsics/random.c \
-intrinsics/rename.c \
intrinsics/reshape_generic.c \
intrinsics/reshape_packed.c \
intrinsics/selected_int_kind.f90 \
intrinsics/selected_real_kind.f90 \
+intrinsics/transpose_generic.c \
+intrinsics/unpack_generic.c \
+runtime/in_pack_generic.c \
+runtime/in_unpack_generic.c
+
+if !LIBGFOR_MINIMAL
+
+gfor_helper_src+= \
+intrinsics/access.c \
+intrinsics/c99_functions.c \
+intrinsics/chdir.c \
+intrinsics/chmod.c \
+intrinsics/clock.c \
+intrinsics/cpu_time.c \
+intrinsics/ctime.c \
+intrinsics/date_and_time.c \
+intrinsics/dtime.c \
+intrinsics/env.c \
+intrinsics/etime.c \
+intrinsics/execute_command_line.c \
+intrinsics/exit.c \
+intrinsics/gerror.c \
+intrinsics/getcwd.c \
+intrinsics/getlog.c \
+intrinsics/getXid.c \
+intrinsics/hostnm.c \
+intrinsics/kill.c \
+intrinsics/link.c \
+intrinsics/perror.c \
+intrinsics/signal.c \
+intrinsics/sleep.c \
+intrinsics/system.c \
+intrinsics/rename.c \
intrinsics/stat.c \
intrinsics/symlnk.c \
intrinsics/system_clock.c \
intrinsics/time.c \
-intrinsics/transpose_generic.c \
intrinsics/umask.c \
-intrinsics/unlink.c \
-intrinsics/unpack_generic.c \
-runtime/in_pack_generic.c \
-runtime/in_unpack_generic.c
+intrinsics/unlink.c
+
+endif
if IEEE_SUPPORT
@@ -182,19 +198,29 @@ gfor_ieee_src=
endif
gfor_src= \
-runtime/backtrace.c \
runtime/bounds.c \
runtime/compile_options.c \
+runtime/memory.c \
+runtime/string.c \
+runtime/select.c
+
+if LIBGFOR_MINIMAL
+
+gfor_src+= runtime/minimal.c
+
+else
+
+gfor_src+= \
+runtime/backtrace.c \
runtime/convert_char.c \
runtime/environ.c \
runtime/error.c \
runtime/fpu.c \
runtime/main.c \
-runtime/memory.c \
runtime/pause.c \
-runtime/stop.c \
-runtime/string.c \
-runtime/select.c
+runtime/stop.c
+
+endif
i_all_c= \
$(srcdir)/generated/all_l1.c \