installing properly gengtype

Message ID
State New
Headers show

Commit Message

Basile Starynkevitch June 28, 2011, 3:43 p.m.
Hello All,

gengtype becomes a user-level program, like cc1 is, so should be installed at the same place as cc1.

For reasons I don't understand, I was told that gengtype needs to be compiled twice (both as build & as host, IIRC).

The patch below does not even work, but I would like some advice about it.


How do you think gengtype should be built & installed as a user program?

I am very uneasy with gcc/, so I really need help about this.



Index: gcc/
--- gcc/	(revision 175588)
+++ gcc/	(working copy)
@@ -769,7 +769,7 @@ 
 # A list of all the language-specific executables.
-COMPILERS = cc1$(exeext) @all_compilers@
+COMPILERS = cc1$(exeext) gcc-gengtype$(exeext) @all_compilers@
 # List of things which should already be built whenever we try to use xgcc
 # to compile anything (without linking).
@@ -1529,7 +1529,7 @@ 
  tm-preds.h tm-constrs.h checksum-options \
  tree-check.h min-insn-modes.c insn-modes.c insn-modes.h \
  genrtl.h gt-*.h gtype-*.h gtype-desc.c gtyp-input.list \
- xgcc$(exeext) cpp$(exeext) cc1$(exeext) $(EXTRA_PASSES) \
+ xgcc$(exeext) cpp$(exeext) cc1$(exeext) gcc-gengtype$(exeext) $(EXTRA_PASSES) \
  $(EXTRA_PARTS) $(EXTRA_PROGRAMS) gcc-cross$(exeext) \
  $(SPECS) collect2$(exeext) lto-wrapper$(exeext) \
  gcov-iov$(build_exeext) gcov$(exeext) gcov-dump$(exeext) \
@@ -1827,7 +1827,7 @@ 
 	$(EXTRA_PASSES) $(EXTRA_PROGRAMS) $(COLLECT2) lto-wrapper$(exeext)
 # Define the names for selecting languages in LANGUAGES.
-c: cc1$(exeext)
+c: cc1$(exeext) gcc-gengtype$(exeext)
 # Tell GNU make these are phony targets.
 .PHONY: c
@@ -4047,6 +4047,11 @@ 
 build/gengtype$(build_exeext) : build/gengtype-lex.o build/gengtype-parse.o \
               build/gengtype-state.o build/version.o
+# The gengtype to be installed
+gcc-gengtype$(exeext): gengtype-lex.o gengtype-parse.o \
+              gengtype-state.o version.o $(LIBIBERTY)
 # Rule for the generator programs:
 $(genprog:%=build/gen%$(build_exeext)): build/gen%$(build_exeext): build/gen%.o $(BUILD_LIBDEPS)