Danny Backx wrote: > >> > @@ -1,4 +1,10 @@ >> > # >> > +# This is a Makefile.in for very limited use : only create and install >> > +# the profiling runtime for cegcc (arm-wince-cegcc and >> > arm-wince-mingw32ce). >> > +# >> > +# This should NOT be fed back to the MingW project as is, it doesn't fit >> > +# nicely into their sources. >> > +# > > >>Yikes! Why are these changes needed? Ah, you used --target, instead of >>--host. > > > The answer is above : I adapted the src/mingw/profile build so it could > work as a standalone directory. The reason is that we need this stuff > for cegcc as well, and we can't install the src/mingw tree there. > > Don't you remember that we chatted about that, and I said I'd implement > this as a standalone directory ? I asked where it should be (src/mingw > is not the right place for it) but we never made a decision on that. >
Yes, I do remember. But the way you've done it is the wrong way. You should follow what the other directories do, and have a top level profile/configure, and put the mingw/profile/ into profile/profile/. Take a look at the gcc or src repositories for inspiration. As a first step, and before the move, you can build the profile stuff where is is using --host. Later, when the move is made into a new dir, say src/profile/profile, calling src/profile/configure --target will descend into its subdirectories with --host. That means those changes aren't needed, really. If this is done this way, there is nothing stopping you to post a patch suggesting the move at the cygwin/mingw repository. ( Yes, is it just one repository for both projects. In fact, the same repository holds also gdb, newlib, binutils, and a bunch of other stuff. That repository is called the src repository: http://sourceware.org/cgi-bin/cvsweb.cgi/src/?cvsroot=src Look at winsup package. That is why all the projects share the same top level configury stuff. The new profile stand alone dir should also. ) > >> > + ${BASE_DIRECTORY}/mingw/profile/configure \ >> > + --target=${TARGET} \ >> > + --prefix=${PREFIX} \ >> > + || exit >> > + >> >> >>Here. Use --host=${TARGET} here. The top level configure script >>takes care of the --target -> --host change, but you are not calling >>the top level one. (Top level is the configure found at gcc/configure, >>src/binutils/configure, etc. ) > > > Unless I have to rework the whole src/mingw/profile configuration, I > don't think this is wrong. > > > >>Humm, why a host environment variable? Since you are implementing a >>host option, it would be better to have a command line switch >>instead of a transparent, environment variable, no? > > > I thought about that but this matches the approach for the other > variables, and it was easy to implement. Open for discussion. > > >>But, I think it would be better to leave the host part as it was (get rid of >>"GCOV_CROSS_PREFIX"), and just replace the getenv calls in mingw32ce version >>with WinCE Registry keys. In cegcc.dll the environ already comes from the >>registry. That way, the only thing special about WinCE profiling in >>comparison with other gcc targets, would be that you set a Registry key, >>instead of doing a shell export. Much more flexible, IMHO. >>I would go as far as implementing the a function that reads from >>the registry with the same interface as getenv, returning a pointer >>into a local static buffer, to keep our patch isolated, and call that >>instead of getenv. >> Easy doesn't mean the best :) What my version allows is to change the profile dir without rebuilding the app, just change the key. That is also the idea behind the original getenv/environ version. Cheers, Pedro Alves ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Cegcc-devel mailing list Cegcc-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/cegcc-devel