From 9d1f17a9caf6a5a107a8d5395cae6fdfa2099099 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Thu, 11 Oct 2018 19:34:35 +0200 Subject: build: Fix build on Windows Avoid a long argument list while creating the librtemscpu.a library archive. --- cpukit/Makefile.am | 10 ++++++++++ cpukit/configure.ac | 14 ++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/cpukit/Makefile.am b/cpukit/Makefile.am index 2a5673242f..b7a44f377d 100644 --- a/cpukit/Makefile.am +++ b/cpukit/Makefile.am @@ -1974,3 +1974,13 @@ libmghttpd_a_SOURCES += mghttpd/mongoose.c endif endif + +if HACK_TO_AVOID_LONG_ARG_LIST + +librtemscpu.a: $(librtemscpu_a_OBJECTS) $(librtemscpu_a_DEPENDENCIES) $(EXTRA_librtemscpu_a_DEPENDENCIES) + -rm -f librtemscpu.a librtemscpu.txt + for i in $(librtemscpu_a_OBJECTS) ; do echo "$$i" >>librtemscpu.txt ; done + $(librtemscpu_a_AR) librtemscpu.a @librtemscpu.txt $(librtemscpu_a_LIBADD) + $(RANLIB) librtemscpu.a + +endif diff --git a/cpukit/configure.ac b/cpukit/configure.ac index 67889d2d8e..2c5e4a1f82 100644 --- a/cpukit/configure.ac +++ b/cpukit/configure.ac @@ -39,6 +39,20 @@ RTEMS_CANONICALIZE_TOOLS RTEMS_PROG_CCAS AC_PROG_RANLIB +AC_MSG_CHECKING([for a need to avoid a long argument list]) + +hack_to_avoid_long_arg_list=no +case "${build_os}" in + *cygwin*|*mingw*|*msys*) + hack_to_avoid_long_arg_list=yes + ;; + *) + ;; +esac + +AC_MSG_RESULT([${hack_to_avoid_long_arg_list}]) +AM_CONDITIONAL([HACK_TO_AVOID_LONG_ARG_LIST], [test "${hack_to_avoid_long_arg_list}" = yes]) + RTEMS_CHECK_NEWLIB # BSD-isms, used throughout the sources -- cgit v1.2.3