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. Index: gcc/Makefile.in =================================================================== --- gcc/Makefile.in (revision 175588) +++ gcc/Makefile.in (working copy) @@ -769,7 +769,7 @@ OTHER_FIXINCLUDES_DIRS= # 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) + +$(LINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ $^ + # Rule for the generator programs: $(genprog:%=build/gen%$(build_exeext)): build/gen%$(build_exeext): build/gen%.o $(BUILD_LIBDEPS) +$(LINKER_FOR_BUILD) $(BUILD_LINKERFLAGS) $(BUILD_LDFLAGS) -o $@ \ ################# How do you think gengtype should be built & installed as a user program? I am very uneasy with gcc/Makefile.in, so I really need help about this. Cheers. -- Basile STARYNKEVITCH http://starynkevitch.net/Basile/ email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359 8, rue de la Faiencerie, 92340 Bourg La Reine, France *** opinions {are only mine, sont seulement les miennes} ***