[02/34] rs6000: Add gengtype handling to the build machinery

Message ID 3e062b4c7977c6390b4ec0096ba682639392e47e.1627562851.git.wschmidt@linux.ibm.com
State New
Headers show
Series
  • Replace the Power target-specific builtin machinery
Related show

Commit Message

Richard Biener via Gcc-patches July 29, 2021, 1:30 p.m.
2021-06-07  Bill Schmidt  <wschmidt@linux.ibm.com>

gcc/
	* config.gcc (target_gtfiles): Add ./rs6000-builtins.h.
	* config/rs6000/t-rs6000 (EXTRA_GTYPE_DEPS): Set.
---
 gcc/config.gcc             | 1 +
 gcc/config/rs6000/t-rs6000 | 1 +
 2 files changed, 2 insertions(+)

-- 
2.27.0

Comments

Segher Boessenkool Aug. 4, 2021, 10:52 p.m. | #1
On Thu, Jul 29, 2021 at 08:30:49AM -0500, Bill Schmidt wrote:
> 	* config.gcc (target_gtfiles): Add ./rs6000-builtins.h.

> 	* config/rs6000/t-rs6000 (EXTRA_GTYPE_DEPS): Set.


> --- a/gcc/config/rs6000/t-rs6000

> +++ b/gcc/config/rs6000/t-rs6000

> @@ -22,6 +22,7 @@ TM_H += $(srcdir)/config/rs6000/rs6000-builtin.def

>  TM_H += $(srcdir)/config/rs6000/rs6000-cpus.def

>  TM_H += $(srcdir)/config/rs6000/rs6000-modes.h

>  PASSES_EXTRA += $(srcdir)/config/rs6000/rs6000-passes.def

> +EXTRA_GTYPE_DEPS += $(srcdir)/config/rs6000/rs6000-builtin-new.def

>  

>  rs6000-pcrel-opt.o: $(srcdir)/config/rs6000/rs6000-pcrel-opt.c

>  	$(COMPILE) $<


Surprisingly I couldn't find docs or examples for EXTRA_GTYPE_DEPS.
But it loks like it will work.  Okay for trunkm thanks!


Segher

Patch

diff --git a/gcc/config.gcc b/gcc/config.gcc
index fe2205b4bc2..a880823e562 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -492,6 +492,7 @@  powerpc*-*-*)
 	extra_options="${extra_options} g.opt fused-madd.opt rs6000/rs6000-tables.opt"
 	target_gtfiles="$target_gtfiles \$(srcdir)/config/rs6000/rs6000-logue.c \$(srcdir)/config/rs6000/rs6000-call.c"
 	target_gtfiles="$target_gtfiles \$(srcdir)/config/rs6000/rs6000-pcrel-opt.c"
+	target_gtfiles="$target_gtfiles ./rs6000-builtins.h"
 	;;
 pru-*-*)
 	cpu_type=pru
diff --git a/gcc/config/rs6000/t-rs6000 b/gcc/config/rs6000/t-rs6000
index e0e8ab8d828..92766d8ea25 100644
--- a/gcc/config/rs6000/t-rs6000
+++ b/gcc/config/rs6000/t-rs6000
@@ -22,6 +22,7 @@  TM_H += $(srcdir)/config/rs6000/rs6000-builtin.def
 TM_H += $(srcdir)/config/rs6000/rs6000-cpus.def
 TM_H += $(srcdir)/config/rs6000/rs6000-modes.h
 PASSES_EXTRA += $(srcdir)/config/rs6000/rs6000-passes.def
+EXTRA_GTYPE_DEPS += $(srcdir)/config/rs6000/rs6000-builtin-new.def
 
 rs6000-pcrel-opt.o: $(srcdir)/config/rs6000/rs6000-pcrel-opt.c
 	$(COMPILE) $<