public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
* [PATCH][Newlib][libgloss] - Semihosting v2 general build changes (1 / 5)
@ 2017-07-03 16:53 Tamar Christina
  2017-07-05  8:36 ` Corinna Vinschen
  0 siblings, 1 reply; 10+ messages in thread
From: Tamar Christina @ 2017-07-03 16:53 UTC (permalink / raw)
  To: newlib; +Cc: nd, jjohnstn

[-- Attachment #1: Type: text/plain, Size: 481 bytes --]

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.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: semihosting-patch-1.patch --]
[-- Type: text/x-patch; name="semihosting-patch-1.patch", Size: 2178 bytes --]

diff --git a/libgloss/multi-build.in b/libgloss/multi-build.in
new file mode 100644
index 0000000000000000000000000000000000000000..0bd12cfd95769d9ec193936b2781bc5cc4db7809
--- /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

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2017-07-06 14:22 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-03 16:53 [PATCH][Newlib][libgloss] - Semihosting v2 general build changes (1 / 5) Tamar Christina
2017-07-05  8:36 ` Corinna Vinschen
2017-07-05  8:44   ` Tamar Christina
2017-07-05 12:13     ` Tamar Christina
2017-07-05 12:42       ` Corinna Vinschen
2017-07-05 13:32     ` [Newlib][libgloss]ARM - semihosting use of __end__symbol in crt0.S Dave Nadler
2017-07-05 15:16       ` Tamar Christina
2017-07-05 18:19         ` Dave Nadler
2017-07-06  4:42           ` Senthil Kumar Selvaraj
2017-07-06 14:22             ` Tamar Christina

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).