This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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]

[toplevel-libgcc] Allow fp-bit to be placed in the libgcc directory


With some changes I have, I would like to be able to generate fp-bit.c and friends from within the libgcc directory. This allows one to do that, with a make variable that decides where the files are placed. It will go away in due time, of course.

Tested, along with some more changes on powerpc-unknown-linux-gnu. Dan, looks ok?

Paolo
2006-02-22  Paolo Bonzini  <bonzini@gnu.org>

	* Makefile.in (fpbit): Handle fpbit.c being generated in libgcc's
	objdir.

diff -ru gcc-paolo-base/libgcc/Makefile.in gcc-paolo/libgcc/Makefile.in
--- gcc-paolo-base/libgcc/Makefile.in	2006-02-22 20:50:35.258366312 +0100
+++ gcc-paolo/libgcc/Makefile.in	2006-02-22 21:40:48.693254576 +0100
@@ -364,20 +364,23 @@
 # Makefile.
 # FIXME: Soon we will be able to move this logic into this directory.
 
+ifneq ($(fpbit-in-libgcc),yes)
+FPBIT:=$(if $(FPBIT),$(gcc_objdir)/$(FPBIT),)
+DPBIT:=$(if $(DPBIT),$(gcc_objdir)/$(DPBIT),)
+TPBIT:=$(if $(TPBIT),$(gcc_objdir)/$(TPBIT),)
+endif
+
 # Build FPBIT.
 ifneq ($(FPBIT),)
 fpbit-o = $(patsubst %,%$(objext),$(FPBIT_FUNCS))
-$(fpbit-o): %$(objext): $(gcc_objdir)/$(FPBIT)
-	$(gcc_compile) -DFINE_GRAINED_LIBRARIES -DL$* \
-	  -c $(gcc_objdir)/$(FPBIT) \
-	  $(vis_hide)
+$(fpbit-o): %$(objext): $(FPBIT)
+	$(gcc_compile) -DFINE_GRAINED_LIBRARIES -DL$* -c $(FPBIT) $(vis_hide)
 libgcc-objects += $(fpbit-o)
 
 ifeq ($(enable_shared),yes)
 fpbit-s-o = $(patsubst %,%_s$(objext),$(FPBIT_FUNCS))
-$(fpbit-s-o): %_s$(objext): $(gcc_objdir)/$(FPBIT)
-	$(gcc_s_compile) -DFINE_GRAINED_LIBRARIES -DL$* \
-	  -c $(gcc_objdir)/$(FPBIT)
+$(fpbit-s-o): %_s$(objext): $(FPBIT)
+	$(gcc_s_compile) -DFINE_GRAINED_LIBRARIES -DL$* -c $(FPBIT)
 libgcc-s-objects += $(fpbit-s-o)
 endif
 endif
@@ -385,17 +388,14 @@
 # Build DPBIT.
 ifneq ($(DPBIT),)
 dpbit-o = $(patsubst %,%$(objext),$(DPBIT_FUNCS))
-$(dpbit-o): %$(objext): $(gcc_objdir)/$(DPBIT)
-	$(gcc_compile) -DFINE_GRAINED_LIBRARIES -DL$* \
-	  -c $(gcc_objdir)/$(DPBIT) \
-	  $(vis_hide)
+$(dpbit-o): %$(objext): $(DPBIT)
+	$(gcc_compile) -DFINE_GRAINED_LIBRARIES -DL$* -c $(DPBIT) $(vis_hide)
 libgcc-objects += $(dpbit-o)
 
 ifeq ($(enable_shared),yes)
 dpbit-s-o = $(patsubst %,%_s$(objext),$(DPBIT_FUNCS))
-$(dpbit-s-o): %_s$(objext): $(gcc_objdir)/$(DPBIT)
-	$(gcc_s_compile) -DFINE_GRAINED_LIBRARIES -DL$* \
-	  -c $(gcc_objdir)/$(DPBIT)
+$(dpbit-s-o): %_s$(objext): $(DPBIT)
+	$(gcc_s_compile) -DFINE_GRAINED_LIBRARIES -DL$* -c $(DPBIT)
 libgcc-s-objects += $(dpbit-s-o)
 endif
 endif
@@ -403,17 +403,14 @@
 # Build TPBIT.
 ifneq ($(TPBIT),)
 tpbit-o = $(patsubst %,%$(objext),$(TPBIT_FUNCS))
-$(tpbit-o): %$(objext): $(gcc_objdir)/$(TPBIT)
-	$(gcc_compile) -DFINE_GRAINED_LIBRARIES -DL$* \
-	  -c $(gcc_objdir)/$(TPBIT) \
-	  $(vis_hide)
+$(tpbit-o): %$(objext): $(TPBIT)
+	$(gcc_compile) -DFINE_GRAINED_LIBRARIES -DL$* -c $(TPBIT) $(vis_hide)
 libgcc-objects += $(tpbit-o)
 
 ifeq ($(enable_shared),yes)
 tpbit-s-o = $(patsubst %,%_s$(objext),$(TPBIT_FUNCS))
-$(tpbit-s-o): %_s$(objext): $(gcc_objdir)/$(TPBIT)
-	$(gcc_s_compile) -DFINE_GRAINED_LIBRARIES -DL$* \
-	  -c $(gcc_objdir)/$(TPBIT)
+$(tpbit-s-o): %_s$(objext): $(TPBIT)
+	$(gcc_s_compile) -DFINE_GRAINED_LIBRARIES -DL$* -c $(TPBIT)
 libgcc-s-objects += $(tpbit-s-o)
 endif
 endif

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