This is the mail archive of the gcc-bugs@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]

AIX 4.3 cross compiler hosting problem


	One of my colleagues just pointed out to me that the Makefile
fragment from rs6000/x-aix43:

# Both 32-bit and 64-bit objects in archives
AR_FOR_TARGET=ar -X32_64

necessary to build native tools on AIX 4.3 causes problems when building a
cross toolchain because the above directive overrides the cross archiver.
My instinct is that the fundamentally incorrect assumption is in the
XX_FOR_TARGET macros which have logic like:

    if [ "$(host_canonical)" = "$(target)" ] ; then \
      echo ar;

assuming that "ar" is correct for every native build.  I think that EGCS
needs an additional set of overrideable macros AR_NATIVE, etc. to be used
like:

AR_NATIVE=ar
...
    if [ "$(host_canonical)" = "$(target)" ] ; then \
      echo $(AR_NATIVE);

I can duplicate the entire logic of the original AR_FOR_TARGET in the
Makefile fragment with my variant for "ar", but duplicating the logic in a
place where it will not be maintained to match the version in
gcc/Makefile.in automatically seems like the wrong approach to me.

	Any other ideas about how to solve this problem?

Thanks, David
===============================================================================
David Edelsohn                                      T.J. Watson Research Center
dje@watson.ibm.com                                  P.O. Box 218
+1 914 945 4364 (TL 862)                            Yorktown Heights, NY 10598


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