This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: configury assembler features
On Tue, Mar 19, 2002 at 09:33:06PM -0500, Daniel Jacobowitz wrote:
> On Wed, Mar 20, 2002 at 12:44:05PM +1030, Alan Modra wrote:
> > This patch allows gcc to find assembler capabilities when cross-
> > compiling. Also corrects the search dirs to use $target_alias rather
> > than $target.
> >
> > * configure.in (gcc_cv_as): Use $target_alias in directory searchs
> > rather than $target. Heed program_prefix and
> > program_transform_name. Search for gas in cross-compiler case too.
> > "test -x" rather than "test -f".
> > (gcc_cv_ld): Likewise.
> > (gcc_cv_nm): Heed program_prefix and program_transform_name.
> > (gcc_cv_objdump): Likewise.
> > * configure: Regenerate.
>
> I'm glad you did this. I had a whole long message about a problem with
> it, which I can no longer find. I've still got one concern, but you
> didn't introduce it: host-x-host crosses. $host = $target doesn't
> imply that $build has any relation to either, and you can easily find
> the $build assembler here. I build GCC on an i386-linux build for a
> mipsel-linux host, so program_prefix et al will not be used, and you'll
> just find my system assembler.
Hmm, yes. We obviously can't run the assembler and other tools to
find their capabilities when $build != $host. I'll modify the patch
to do:
if test "x$gcc_cv_as" = x -a $build = $host; then
and similarly elsewhere.
> I don't suppose I could persuade you to search $PATH in:
> if test -x "$DEFAULT_ASSEMBLER"; then
> gcc_cv_as="$DEFAULT_ASSEMBLER"
> elif test -x "$AS"; then
> gcc_cv_as="$AS"
>
> ? Then you'll probably find the cross-assembler, and test -its-
> features, which is better than testing the build assembler at least.
Safer to specify the full path in $DEFAULT_ASSEMBLER or $AS.
--
Alan Modra
IBM OzLabs - Linux Technology Centre