This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH][Newlib][libgloss] - Semihosting v2 general build changes (1 / 5)


Hi All,

resubmitting these as git-am patches.

Thanks,
Tamar
________________________________________
From: newlib-owner@sourceware.org <newlib-owner@sourceware.org> on behalf of Tamar Christina <Tamar.Christina@arm.com>
Sent: Wednesday, July 5, 2017 9:44:10 AM
To: newlib@sourceware.org
Cc: nd
Subject: Re: [PATCH][Newlib][libgloss] - Semihosting v2 general build changes (1 / 5)

Hi Corinna,

Ah sure, I will resend them today.

Thanks,
Tamar
________________________________________
From: newlib-owner@sourceware.org <newlib-owner@sourceware.org> on behalf of Corinna Vinschen <vinschen@redhat.com>
Sent: Wednesday, July 5, 2017 9:36:21 AM
To: newlib@sourceware.org
Subject: Re: [PATCH][Newlib][libgloss] - Semihosting v2 general build changes (1 / 5)

Hi Tamar,

On Jul  3 16:53, Tamar Christina wrote:
> Hi All,
>
>
> This patch adds the general build system changes needed
> in order to compile and create the new libraries for Semihosting v2.
>
> This works by creating a similar recursive make target that is modeled
> after the existing multilib makefile config-ml.in.
>
> OK for master?
>
> PS. I do not have commit rights so if OK can someone apply for me?
>
> Thanks,
> Tamar
>
>
> libgloss/
> 2017-07-03  Tamar Christina  <tamar.christina@arm.com>
>
>       * multi-build.in (multi-do): New.

We don't use ChangeLog format anymore.  Rather we would prefer
informative git commit messages and patches in `git format-patch'
format.

These 5 patches qualify as patch series, so it would be nice if
you could resend them that way.


Thanks,
Corinna

--
Corinna Vinschen
Cygwin Maintainer
Red Hat
From a51926437ca158775196bd4c60129ed7d72e7fd0 Mon Sep 17 00:00:00 2001
From: Tamar Christina <tamar.christina@arm.com>
Date: Wed, 5 Jul 2017 12:54:52 +0100
Subject: [PATCH 1/5] Create a recursive make target that is modeled after the
 existing multilib makefile config-ml.in which can be used to build the same
 files within a target multiple ways.

e.g. from the same source file produce multiple libs by varying the
options passed to the compiler.

Signed-off-by: Tamar Christina <tamar.christina@arm.com>
---
 libgloss/multi-build.in | 61 +++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 61 insertions(+)
 create mode 100644 libgloss/multi-build.in

diff --git a/libgloss/multi-build.in b/libgloss/multi-build.in
new file mode 100644
index 000000000..0bd12cfd9
--- /dev/null
+++ b/libgloss/multi-build.in
@@ -0,0 +1,61 @@
+PWD_COMMAND=$${PWDCMD-pwd}
+
+# FIXME: There should be an @-sign in front of the `if'.
+# Leave out until this is tested a bit more.
+multi-do:
+	if [ -z "$(MULTIDIRS)" ]; then \
+	  true; \
+	else \
+	  rootpre=`${PWD_COMMAND}`/; export rootpre; \
+	  srcrootpre=`cd $(srcdir); ${PWD_COMMAND}`/; export srcrootpre; \
+	  lib=`echo "$${rootpre}" | sed -e 's,^.*/\([^/][^/]*\)/$$,\1,'`; export lib; \
+	  compiler="$(CC)"; \
+	  for dir in $(MULTIDIRS); do \
+	    if [ "$${dir}" = "." ]; then \
+	      true; \
+	    else \
+	      destpre=`echo $${rootpre}/$${dir}`/; export destpre; \
+	      if ! test -d $${destpre} ; then \
+		mkdir -p $${destpre}; \
+		cp config.status $${destpre}; \
+		cd $${destpre}; \
+		$(SHELL) config.status; \
+		sed -e "s:^MULTIDIRS\s*+=.*$$:MULTIDIRS = :" \
+		    -e "s:^MULTILIBNAME\s*=.*$$:MULTILIBNAME = MULTIDIR_$${dir}_NAME:" \
+		    -e "s:^MULTI_FLAGS_FOR_TARGET\s*=.*$$:MULTI_FLAGS_FOR_TARGET = MULTIDIR_$${dir}_FLAGS:" \
+		    -e "s:^objdir\s*=.*$$:objdir = ..:" \
+			Makefile > Makefile.tem; \
+		rm -f Makefile; \
+		mv Makefile.tem Makefile; \
+	      else \
+		cd $${destpre}; \
+	      fi; \
+	      if ($(MAKE) $(FLAGS_TO_PASS) \
+		    CFLAGS="$(CFLAGS)" \
+		    CCASFLAGS="$(CCASFLAGS)" \
+		    FCFLAGS="$(FCFLAGS)" \
+		    FFLAGS="$(FFLAGS)" \
+		    ADAFLAGS="$(ADAFLAGS)" \
+		    prefix="$(prefix)" \
+		    exec_prefix="$(exec_prefix)" \
+		    GCJFLAGS="$(GCJFLAGS)" \
+		    GOCFLAGS="$(GOCFLAGS)" \
+		    CXXFLAGS="$(CXXFLAGS)" \
+		    LIBCFLAGS="$(LIBCFLAGS)" \
+		    LIBCXXFLAGS="$(LIBCXXFLAGS)" \
+		    LDFLAGS="$(LDFLAGS)" \
+		    MULTIFLAGS="" \
+		    DESTDIR="" \
+		    SOURCE="${srcdir}/" \
+		    INSTALL="$(INSTALL)" \
+		    INSTALL_DATA="$(INSTALL_DATA)" \
+		    INSTALL_PROGRAM="$(INSTALL_PROGRAM)" \
+		    INSTALL_SCRIPT="$(INSTALL_SCRIPT)" \
+		    $(DO)); then \
+		cd $${rootpre}; \
+	      else \
+		exit 1; \
+	      fi; \
+	    fi; \
+	  done; \
+	fi
-- 
2.13.0


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]