This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: toplevel makefile question


Nathanael Nerode wrote:

I'd like to eliminate the differences between these two makefile targets in
the top level:

.PHONY: install-gcc
install-gcc:
	@if [ -f ./gcc/Makefile ] ; then \
	  r=`${PWD}`; export r; \
	  s=`cd $(srcdir); ${PWD}`; export s; \
	  $(SET_LIB_PATH) \
	  (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) install); \
	else \
	  true; \
	fi

.PHONY: install-gcc-cross
install-gcc-cross:
	@if [ -f ./gcc/Makefile ] ; then \
	  r=`${PWD}`; export r; \
	  s=`cd $(srcdir); ${PWD}`; export s; \
	  $(SET_LIB_PATH) \
	  (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) LANGUAGES="c c++" install); \
	else \
	  true; \
	fi

Note that the only difference is the extra restriction of LANGUAGES for
a cross install.  This seems frankly bogus to me.  What is the purpose of
this?  If it is truly necessary, would it suffice to include a
@maybe_restrict_languages@ bit which configure set to restrict languages
if host != target ?

I remember that at one time ObjC didn't work for crosses, and that might have
been the original reason for this bit. Don't think it's still an issue though,
and these days I think we'd want to fix the compiler rather than try to work
around it in top level configury.

Stan




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]