public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: gcc-patches@gcc.gnu.org
Cc: Tom Tromey <tromey@redhat.com>
Subject: [PATCH v2 01/18] clean up SHLIB so subshells are not needed
Date: Mon, 29 Jul 2013 16:25:00 -0000	[thread overview]
Message-ID: <1375115069-31143-2-git-send-email-tromey@redhat.com> (raw)
In-Reply-To: <1375115069-31143-1-git-send-email-tromey@redhat.com>

This changes the handling of SHLIB so that it is inlined into
DRIVER_DEFINES.  This is ok because SHLIB is defined in a Makefile
fragment that is included by the generated Makefile.

The rationale for this is that it simplifies some .o targets, so that
we can share more code.

	* Makefile.in (DRIVER_DEFINES): Use $(and), not shell code,
	to add -DENABLE_SHARED_LIBGCC.
	(gcc.o): Don't use subshell.

	* Make-lang.in (c/gccspec.o): Don't use subshell.

	* Make-lang.in (g++spec.o): Don't use subshell.

	* Make-lang.in (gfortranspec.o): Don't use subshell.

	* Make-lang.in (gospec.o): Don't use subshell.

	* Make-lang.in (jvspec.o): Don't use subshell.
---
 gcc/Makefile.in          | 5 ++---
 gcc/c/Make-lang.in       | 3 +--
 gcc/cp/Make-lang.in      | 3 +--
 gcc/fortran/Make-lang.in | 3 +--
 gcc/go/Make-lang.in      | 3 +--
 gcc/java/Make-lang.in    | 3 +--
 6 files changed, 7 insertions(+), 13 deletions(-)

diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index fb0cb4b..ce5b159 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -2056,16 +2056,15 @@ DRIVER_DEFINES = \
   -DTOOLDIR_BASE_PREFIX=\"$(libsubdir_to_prefix)$(prefix_to_exec_prefix)\" \
   @TARGET_SYSTEM_ROOT_DEFINE@ \
   $(VALGRIND_DRIVER_DEFINES) \
-  `test "X$${SHLIB}" = "X" || test "@enable_shared@" != "yes" || echo "-DENABLE_SHARED_LIBGCC"` \
+  $(and $(SHLIB),$(filter yes,@enable_shared@),-DENABLE_SHARED_LIBGCC) \
   -DCONFIGURE_SPECS="\"@CONFIGURE_SPECS@\""
 
 gcc.o: gcc.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) intl.h multilib.h \
     Makefile $(lang_specs_files) specs.h prefix.h $(GCC_H) $(FLAGS_H) \
     configargs.h $(OBSTACK_H) $(OPTS_H) $(DIAGNOSTIC_H) $(VEC_H) $(PARAMS_H)
-	(SHLIB='$(SHLIB)'; \
 	$(COMPILER) $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) \
   $(DRIVER_DEFINES) \
-  -c $(srcdir)/gcc.c $(OUTPUT_OPTION))
+  -c $(srcdir)/gcc.c $(OUTPUT_OPTION)
 
 specs.h : s-specs ; @true
 s-specs : Makefile
diff --git a/gcc/c/Make-lang.in b/gcc/c/Make-lang.in
index 1161742..86deb1d 100644
--- a/gcc/c/Make-lang.in
+++ b/gcc/c/Make-lang.in
@@ -46,10 +46,9 @@ c: cc1$(exeext)
 # is to cc1 as e.g. g++ is to cc1plus, or gfortran is to f951).
 c/gccspec.o: c/gccspec.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(GCC_H) \
     $(OPTS_H)
-	(SHLIB='$(SHLIB)'; \
 	$(COMPILER) $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) \
   $(DRIVER_DEFINES) \
-  -c $(srcdir)/c/gccspec.c $(OUTPUT_OPTION))
+  -c $(srcdir)/c/gccspec.c $(OUTPUT_OPTION)
 
 # The C compiler itself.
 
diff --git a/gcc/cp/Make-lang.in b/gcc/cp/Make-lang.in
index 2cb919a..da8e87b 100644
--- a/gcc/cp/Make-lang.in
+++ b/gcc/cp/Make-lang.in
@@ -53,9 +53,8 @@ c++: cc1plus$(exeext)
 
 g++spec.o: $(srcdir)/cp/g++spec.c $(SYSTEM_H) coretypes.h $(TM_H) $(GCC_H) \
     $(CONFIG_H) $(OPTS_H)
-	(SHLIB='$(SHLIB)'; \
 	$(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(DRIVER_DEFINES) \
-		$(INCLUDES) $(srcdir)/cp/g++spec.c)
+		$(INCLUDES) $(srcdir)/cp/g++spec.c
 
 # Create the compiler driver for g++.
 GXX_OBJS = $(GCC_OBJS) g++spec.o
diff --git a/gcc/fortran/Make-lang.in b/gcc/fortran/Make-lang.in
index ee70423..035a1d5 100644
--- a/gcc/fortran/Make-lang.in
+++ b/gcc/fortran/Make-lang.in
@@ -78,9 +78,8 @@ fortran: f951$(exeext)
 
 gfortranspec.o: $(srcdir)/fortran/gfortranspec.c $(SYSTEM_H) $(TM_H) $(GCC_H) \
 	$(CONFIG_H) coretypes.h intl.h $(OPTS_H)
-	(SHLIB='$(SHLIB)'; \
 	$(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(DRIVER_DEFINES) \
-		$(INCLUDES) $(srcdir)/fortran/gfortranspec.c)
+		$(INCLUDES) $(srcdir)/fortran/gfortranspec.c
 
 # Create the compiler driver gfortran.
 GFORTRAN_D_OBJS = $(GCC_OBJS) gfortranspec.o
diff --git a/gcc/go/Make-lang.in b/gcc/go/Make-lang.in
index 3cb18d6..015ed7a 100644
--- a/gcc/go/Make-lang.in
+++ b/gcc/go/Make-lang.in
@@ -32,9 +32,8 @@ go: go1$(exeext)
 
 gospec.o: $(srcdir)/go/gospec.c $(SYSTEM_H) coretypes.h $(TM_H) $(GCC_H) \
     $(CONFIG_H) opts.h
-	(SHLIB='$(SHLIB)'; \
 	$(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(DRIVER_DEFINES) \
-		$(INCLUDES) $(srcdir)/go/gospec.c)
+		$(INCLUDES) $(srcdir)/go/gospec.c
 
 GCCGO_OBJS = $(GCC_OBJS) gospec.o
 gccgo$(exeext): $(GCCGO_OBJS) $(EXTRA_GCC_OBJS) libcommon-target.a $(LIBDEPS)
diff --git a/gcc/java/Make-lang.in b/gcc/java/Make-lang.in
index 8a6210f..078f6d4 100644
--- a/gcc/java/Make-lang.in
+++ b/gcc/java/Make-lang.in
@@ -57,9 +57,8 @@ JAVA_TARGET_INDEPENDENT_BIN_TOOLS = jcf-dump
 
 jvspec.o: $(srcdir)/java/jvspec.c $(SYSTEM_H) coretypes.h $(TM_H) \
   $(GCC_H) $(CONFIG_H) java/jcf.h java/javaop.h $(OPTS_H)
-	(SHLIB='$(SHLIB)'; \
 	$(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(DRIVER_DEFINES) \
-		$(INCLUDES) $(srcdir)/java/jvspec.c $(OUTPUT_OPTION))
+		$(INCLUDES) $(srcdir)/java/jvspec.c $(OUTPUT_OPTION)
 
 # Create the compiler driver for $(XGCJ).
 $(XGCJ)$(exeext): $(GCC_OBJS) jvspec.o java/jcf-path.o \
-- 
1.8.1.4

  parent reply	other threads:[~2013-07-29 16:24 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-29 16:24 [PATCH v2 00/18] resurrect automatic dependencies Tom Tromey
2013-07-29 16:24 ` [PATCH v2 10/18] Fix up c-family targets Tom Tromey
2013-07-29 16:24 ` [PATCH v2 17/18] remove last definition of CROSS_FLOAT_H Tom Tromey
2013-07-29 16:24 ` [PATCH v2 13/18] convert LTO to automatic dependencies Tom Tromey
2013-07-29 16:24 ` [PATCH v2 12/18] convert the Go front end " Tom Tromey
2013-07-29 16:24 ` [PATCH v2 08/18] convert the ObjC++ " Tom Tromey
2013-07-29 16:40   ` Mike Stump
2013-07-29 16:53     ` Tom Tromey
2013-07-29 16:24 ` [PATCH v2 11/18] convert the Fortran " Tom Tromey
2013-07-29 16:25 ` [PATCH v2 05/18] convert the C " Tom Tromey
2013-07-29 16:25 ` [PATCH v2 16/18] remove last reference to TREE_GIMPLE_H Tom Tromey
2013-07-29 16:25 ` [PATCH v2 18/18] remove unused macros Tom Tromey
2013-07-29 16:25 ` [PATCH v2 14/18] remove explicit dependencies Tom Tromey
2013-07-29 16:25 ` [PATCH v2 06/18] convert the C++ front end to automatic dependencies Tom Tromey
2013-07-30 16:39   ` Gabriel Dos Reis
2013-07-29 16:25 ` [PATCH v2 15/18] make out_object_file rule use " Tom Tromey
2013-07-29 16:25 ` [PATCH v2 02/18] update generated_files Tom Tromey
2013-07-29 16:25 ` Tom Tromey [this message]
2013-07-29 16:25 ` [PATCH v2 04/18] add configury Tom Tromey
2013-07-29 16:25 ` [PATCH v2 03/18] move generated_files order-only dependency later Tom Tromey
2013-07-29 16:25 ` [PATCH v2 07/18] convert the ObjC front end to automatic dependencies Tom Tromey
2013-07-29 16:42   ` Mike Stump
2013-07-29 16:29 ` [PATCH v2 09/18] convert the Java " Tom Tromey
2013-07-29 17:05 ` [PATCH v2 00/18] resurrect " Mike Stump
2013-08-12  8:46 ` Tom Tromey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1375115069-31143-2-git-send-email-tromey@redhat.com \
    --to=tromey@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).