Gabriel Dos Reis <[EMAIL PROTECTED]> writes: > gensupport.c:1122: undefined reference to `insn_elision_unavailable' > gensupport.c:975: undefined reference to `n_insn_conditions' > gensupport.c:977: undefined reference to `insn_conditions' > collect2: ld returned 1 exit status > > > This is an instance of the situations I reported earlier. > Of course, your suggestion is the natural choice, if we did not have > addiional constraint. Indeed, the file (for MD gen-support machinery) > that defines those variables is dummy-conditions.c, with the following > comment: > > /* In order to avoid dragging in all the headers that are needed to > declare things that gensupport.h uses, we duplicate the declaration > of struct c_test here. (In particular we do not want to have to > include tm.h nor rtl.h in this file.) */ > > Given that constraint, it appears to me that putting "extern" in the > definition is the minimal, viable solution.
How about creating a new header, call it gen-ctest.h, that just contains the definition of struct c_test, and external declarations for the three constants defined by dummy-conditions.c. dummy-conditions.c can include that, and so can gensupport.h. zw