Jivin Stanislav Meduna lays it down ...
> Hi,
> 
> the attached patch is needed for the recent elf2flt
> on MinGW builds. The stat() cannot cope with directories
> ending with the directory separator.

Applied,

Thanks,
Davidm

> diff -uNr elf2flt-orig/ld-elf2flt.c elf2flt/ld-elf2flt.c
> --- elf2flt-orig/ld-elf2flt.c 2010-08-17 06:25:26 +0200
> +++ elf2flt/ld-elf2flt.c      2011-01-14 16:25:17 +0100
> @@ -506,13 +507,15 @@
>          Make bindir point to the bin dir for bin/<TARGET_ALIAS>-foo.
>          Make tooldir point to the bin dir for <TARGET_ALIAS>/bin/foo.  */
>       if (streqn(elf2flt_progname, TARGET_ALIAS)) {
> -             tmp = concat(argv0_dir, "../" TARGET_ALIAS "/bin/", NULL);
> -             if (stat(tmp, &buf) == 0 && S_ISDIR(buf.st_mode))
> -                     tooldir = tmp;
> +             tmp = concat(argv0_dir, "../" TARGET_ALIAS "/bin", NULL);
> +             if (stat(tmp, &buf) == 0 && S_ISDIR(buf.st_mode)) {
> +                     tooldir = concat(tmp, "/", NULL);
> +             }
>       } else {
> -             tmp = concat(argv0_dir, "../../bin/", NULL);
> -             if (stat(tmp, &buf) == 0 && S_ISDIR(buf.st_mode))
> -                     bindir = tmp;
> +             tmp = concat(argv0_dir, "../../bin", NULL);
> +             if (stat(tmp, &buf) == 0 && S_ISDIR(buf.st_mode)) {
> +                     bindir = concat(tmp, "/", NULL);
> +             }
>       }
>  
>       /* Typically ld-elf2flt is invoked as `ld` which means error

> _______________________________________________
> uClinux-dev mailing list
> uClinux-dev@uclinux.org
> http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
> This message was resent by uclinux-dev@uclinux.org
> To unsubscribe see:
> http://mailman.uclinux.org/mailman/options/uclinux-dev


-- 
David McCullough,      david_mccullo...@mcafee.com,  Ph:+61 734352815
McAfee - SnapGear      http://www.mcafee.com         http://www.uCdot.org
_______________________________________________
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev

Reply via email to