[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [patches] [patch] port-specific elf dirs not added to sysdirs list when ports add-on is outside tree
- To: Joseph S. Myers <joseph@xxxxxxxxxxxxxxxx>
- Subject: Re: [patches] [patch] port-specific elf dirs not added to sysdirs list when ports add-on is outside tree
- From: c1de0x <c1de0x@xxxxxxxxx>
- Date: Mon, 15 Mar 2010 12:11:50 +0200
Sorry for the long response time.
I've checked your modified patch, and it looks like it works. Feel free to commit.
Thanks,
Clyde
On Feb 4, 2010, at 6:33 PM, Joseph S. Myers wrote:
> On Wed, 27 Jan 2010, c1de0x wrote:
>
>> Hi,
>>
>> Below is a patch which is needed when trying to cross-compile for an elf
>> target (e.g. mips-linux), where the ports tree is outside of the libc
>> tree, and is configured using
>> --enable-add-ons=/path/to/ports
>
> Thank you for the patch. I think I'd prefer this to use the same approach
> as other code that handles add-ons both with and without absolute paths,
> so only check the directory directly if it is indeed an absolute path,
> e.g.
>
> try="${d}sysdeps/$x"
> case $d in
> /*) try_srcdir= ;;
> *) try_srcdir=$srcdir/ ;;
> esac
>
> and
>
> case "$add_on" in
> /*) xsrcdir= ;;
> *) xsrcdir="$srcdir/" ;;
> esac
>
> Does the following (untested) work for you?
>
> Index: configure.in
> ===================================================================
> --- configure.in (revision 9737)
> +++ configure.in (working copy)
> @@ -777,8 +777,13 @@
> elf_dirs=
> for d in $add_ons_pfx ''; do
> for m in $mach; do
> - if test -d $srcdir/${d}sysdeps$m/elf; then
> - elf_dirs="$elf_dirs ${d}sysdeps$m/elf"
> + try="${d}sysdeps$m/elf"
> + case $d in
> + /*) try_srcdir= ;;
> + *) try_srcdir=$srcdir/ ;;
> + esac
> + if test -d $try_srcdir$try; then
> + elf_dirs="$elf_dirs $try"
> fi
> done
> done
>
> --
> Joseph S. Myers
> joseph@xxxxxxxxxxxxxxxx