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]

[RFC] fixproto and canadian cross builds


I'm having problems building a canadian cross to a target that uses fixproto 
(m68k-elf).  There seems to be some inconsistency in how fix-headers is 
build/run.

In gcc/Makefile.in we have the following comments:

# gen-protos and fix-header are compiled with CC_FOR_BUILD, but they are only
# used in native and host-x-target builds, so it's safe to link them with
# libiberty.a.
...
# This is nominally a 'build' program, but it's run only when host==build,
# so we can (indeed, must) use $(LIBDEPS) and $(LIBS).
build/fix-header$(build_exeext): build/fix-header.o build/scan-decls.o \
...
# We can't run fixproto (it's being built for a different host), but we still
# need to install it so that the user can run it when the compiler is
# installed.
stmp-install-fixproto: fixproto fixhdr.ready

This suggests two options on what's supposed to happen:
(a) fix-header should actually be compiled for the "host" environment. If 
host==build we run it, otherwise we just install it and let the user run it 
on the build system.
(b) fix-header should be compiled for the "build" environment. This currently 
isn't possible for canadian crosses because it uses bits of code only 
compiled for the host. We need to fix this, and there's no point trying to 
install it because it won't run on the host system (ie. we can remove all the 
stmp-install-fixproto stuff).
(c) fixproto is only for crufty old systems no-one really cares about. It 
should be disabled by default, and documented to not work for canadian 
crosses.

I don't really know what fixproto does, but I'm guessing the "right" answer is 
(a) or (c).

Thoughts/comments/suggestions?

Paul


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