This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: canadian vs build==host configury
Mohan Embar <gnustuff@thisiscool.com> writes:
> You're right. This isn't necessary with build==host. You can use the
> intermediate compiler if build==host && host!=target. I am explicitly
> setting build and host, which is why I'm not seeing the issues you're
> describing. I have to rush out now, but will talk more when I get back.
> If Tom's listening, he has a black belt in this and could chime in too.
My inclination is to figure out some way to choose $GCJ and $GCJH
without relying on $with_cross_host.
Is there any problem with something close to this?
built_gcc_dash_v=${built_gcc_dir}/gcj${host_exeext} -v 2>&1
built_gcc_dir_target=`${built_gcc_dash_v} | grep Target | sed 's_Target: __'`
if test "x${built_gcc_dir_target}" = "x${target}"; then
GCJ="$built_gcc_dir/gcj -B$built_gcc_dir/"
GCH="$built_gcc_dir/gch"
else
# $built_gcc won't help us, so it's up to the user to make sure
# ${target_noncanonical}-foo is in their $PATH
GCJ="${target_noncanonical}-gcj"
GCH="${target_noncanonical}-gch"
fi
Basically, "If ${built_gcc_dir}/gcj is executable (on ${build}) AND it
reports its target as our desired ${target}, then use it. In all
other situations, leave it up to the user to ensure that
${target_noncanonical}-gcj is in the $PATH".
- a