[14/14] Incorporate new code into the build machinery.

Message ID 9e539e42d9783cd2e1de914e6cd5bb920a8b5932.1580782131.git.wschmidt@linux.ibm.com
State New
Headers show
Series
  • rs6000: Begin replacing built-in support
Related show

Commit Message

Bill Schmidt Feb. 4, 2020, 2:26 a.m.
2020-02-03  Bill Schmidt  <wschmidt@linux.ibm.com>

        * config.gcc (powerpc-*-*-*): Add rs6000-bif.o to extra_objs.
        * config/rs6000/t-rs6000 (rs6000-genbif.o): New	target.
        (rbtree.o): Likewise.
        (rs6000-genbif): Likewise.
        (rs6000-bif.c):	Likewise.
        (rs6000-bif.o):	Likewise.
---
 gcc/config.gcc             |  3 ++-
 gcc/config/rs6000/t-rs6000 | 22 ++++++++++++++++++++++
 2 files changed, 24 insertions(+), 1 deletion(-)

-- 
2.17.1

Patch

diff --git a/gcc/config.gcc b/gcc/config.gcc
index ae5a845fcce..72448e43017 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -504,7 +504,8 @@  or1k*-*-*)
 	;;
 powerpc*-*-*)
 	cpu_type=rs6000
-	extra_objs="rs6000-string.o rs6000-p8swap.o rs6000-logue.o rs6000-call.o"
+	extra_objs="rs6000-string.o rs6000-p8swap.o rs6000-logue.o"
+	extra_objs="${extra_objs} rs6000-call.o rs6000-bif.o"
 	extra_headers="ppc-asm.h altivec.h htmintrin.h htmxlintrin.h"
 	extra_headers="${extra_headers} bmi2intrin.h bmiintrin.h"
 	extra_headers="${extra_headers} xmmintrin.h mm_malloc.h emmintrin.h"
diff --git a/gcc/config/rs6000/t-rs6000 b/gcc/config/rs6000/t-rs6000
index 170a69591dd..a3a214b2bfb 100644
--- a/gcc/config/rs6000/t-rs6000
+++ b/gcc/config/rs6000/t-rs6000
@@ -47,6 +47,28 @@  rs6000-call.o: $(srcdir)/config/rs6000/rs6000-call.c
 	$(COMPILE) $<
 	$(POSTCOMPILE)
 
+rs6000-genbif.o: $(srcdir)/config/rs6000/rs6000-genbif.c
+	$(COMPILE) $<
+	$(POSTCOMPILE)
+
+rbtree.o: $(srcdir)/config/rs6000/rbtree.c
+	$(COMPILE) $<
+	$(POSTCOMPILE)
+
+rs6000-genbif: rs6000-genbif.o rbtree.o
+	+$(LINKER_FOR_BUILD) $(BUILD_LINKERFLAGS) $(BUILD_LDFLAGS) -o $@ \
+	    $(filter-out $(BUILD_LIBDEPS), $^) $(BUILD_LIBS)
+
+rs6000-bif.c: rs6000-genbif $(srcdir)/config/rs6000/rs6000-bif.def \
+		$(srcdir)/config/rs6000/rs6000-overload.def
+	./rs6000-genbif $(srcdir)/config/rs6000/rs6000-bif.def \
+		$(srcdir)/config/rs6000/rs6000-overload.def rs6000-bif.h \
+		rs6000-bif.c rs6000-vecdefines.h
+
+rs6000-bif.o: rs6000-bif.c
+	$(COMPILE) $<
+	$(POSTCOMPILE)
+
 $(srcdir)/config/rs6000/rs6000-tables.opt: $(srcdir)/config/rs6000/genopt.sh \
   $(srcdir)/config/rs6000/rs6000-cpus.def
 	$(SHELL) $(srcdir)/config/rs6000/genopt.sh $(srcdir)/config/rs6000 > \