This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


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

Re: Trying to figure out what host to use


Mark Palmerino wrote:
> I would like to build a cross development platform where the target is a
> 68332 chip and the host is a version of unix running on my Mac - MachTen
> 4.1.
> 
> I started the build process with target=m68k-coff (btw, is this right for
> a 68332?).

 The default target for m68k-coff is m68020/m68881 but the mcpu32/msoft-float
(or just mcpu32) specific libs should be produced too. You just must remember
to use the '-mcpu32' or '-m68332' when compiling and linking. If modifying the
config files, it is possible to set the '-mcpu32' to be the default, but there
isn't yet a 'mcpu32-coff' target for this, neither a 'm5200-coff' for Coldfire
as the default... If you think that the CPU32 core should be the default, then
the target is wrong and you should add a new target, otherwise it is right...

> The host, "powerpc-apple-machten5" was automatically figured out.
> 
> The configure process continues merrily along until it stops with the
> following message:
> ...
> checking if mkdir takes one argument... no
> Configuration powerpc-apple-machten5 not supported
> 
> This occurs while configure is in the gcc directory of the gcc.2.95.2
> directory.  I guess my first question is, is there a "host configuration"
> that will work with my setup?

 Your current GCC and the config files for it will reveal this...

> Here's another question - MachTen comes with gcc (and I believe binutils)
> already installed. The version on the system is 2.8.1.

 What does the gcc-2.8.1 say about the host/target name, ie. what do the
'-dumpmachine' and '-v' tell?  Like:

	e:\usr\local\samples>gcc-mingw32msvc -dumpmachine
	i386-mingw32msvc

	e:\usr\local\samples>gcc-mingw32msvc -dumpversion
	2_95.3

	e:\usr\local\samples>gcc-mingw32msvc -v
	Reading specs from e:\usr\local\lib\gcc-lib\i386-mingw32msvc\2_95.3\specs
	gcc version 2.95.3 20010101 (prerelease)

 Using commands like these you should find the host name used for the gcc-2.8.1
and then be able to investigate the config files used for it...
 
 I would assume you having the sources for your current gcc-2.8.1 with all the
changes possibly made for your host. You will find the names for the related config
files in the 'gcc-2.8.1/configure' by searching for the config entry for your host
there.

 I found only one 'Mach'-type entry for rs6000/powerpc in the current sources:

	rs6000-*-mach*)
		tm_file=rs6000/mach.h
		xm_file="${xm_file} rs6000/xm-mach.h"
		xmake_file=rs6000/x-mach
		use_collect2=yes
		;;

 The 'xm_file' and the 'xmake_file' will describe the host properties and if you
want to use some other sources than those where your host-type is supported, be
prepared to copy these config files into the newer sources, like gcc-2.95.2 and
to add a new config entry for your host.

 After you have found out the host/target name used for the gcc-2.8.1 and have
found out the related config stuff, the situation should be much better...

> Can I use gcc 2.8.1 or do I need to compile gcc 2.95.2?  If I can use gcc 2.8.1,
> what else do I need in order to complete the cross dev. system so that I can
> produce files with S-records for the 68332 chip?

 Using the gcc-2.8.1 sources where your host is recognized can be the easy case.
But gcc-2.95.2 may have some things better and I'm not even sure if the '-mcpu32'
was supported in gcc-2.8.1 or whether the specific libs for CPU32 will be made...
The config entry for the target tells which files to see...

	m68k-*-coff*)
		tmake_file=m68k/t-m68kbare
		tm_file="m68k/m68k-coff.h dbx.h"
		extra_headers=math-68881.h
		float_format=m68k
		;;

 The 'tmake_file', '.../config/m68k/t-m68kbare' here, tells the MULTILIB_OPTIONS-
setting and the 'mcpu32' should be there as one of the variations for which to
generate libs:

	MULTILIB_OPTIONS = m68000/m68020/m5200/mcpu32 m68881/msoft-float
	MULTILIB_DIRNAMES =

 Ok, the current config name (used for the gcc-2.8.1) and the normally small
'xm_file' and 'xmake_file' are things to solve first... After seeing them, and
whether the host is near some other already supported, like the shown
'rs6000-*-mach*', some decisions can be made about what to do...

Cheers, Kai


------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com


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