Create multiple directory through fixinc.in script.
Jeff Law
law@redhat.com
Mon Aug 1 16:07:00 GMT 2016
On 08/01/2016 08:55 AM, mbilal wrote:
> Hi,
>
> This patch fixes the mkheaders directory creation. It failed to create
> the multiple multilib directory on some cases.
> e.g
> For i686-pc-linux-gnu target config, I have following 'fixinc_list' for
> multilibs.
>
> /system32;
> /system64;/64
> /sgxx-glibc;/sgxx-glibc
> /sgxx-glibc;/64/sgxx-glibc
> /sgxx-glibc;/x32/sgxx-glibc
>
> Now, mkheaders failed to create fixed include directory for the case of
> '/sgxx-glibc;/x32/sgxx-glibc'.
> here fixinc.sh tries to make 'mkdir <include-dir>/x32/sgxx-glibc' and
> failed because parent 'x32' directory doesn't exist. (we defined
> MULTILIB_EXCEPTIONS for x32 directory)
>
>
> Following patch fixes the problem.
>
> fixincludes/ChangeLog:
> 2016-08-01 Muhammad Bilal <mbilal@codesourcery.com>
>
> * fixinc.in: Use --parents option to make LIB directory.
OK. Please install if you have permissions. If not, let me know and
I'll do the commit.
>
>
> Index: fixincludes/fixinc.in
> ===================================================================
> --- fixincludes/fixinc.in (revision 238952)
> +++ fixincludes/fixinc.in (working copy)
> @@ -41,7 +41,7 @@
>
> # Make sure it exists.
> if [ ! -d $LIB ]; then
> - mkdir $LIB || {
> + mkdir -p $LIB || {
> echo fixincludes: output dir '`'$LIB"' cannot be created"
> exit 1
> }
>
>
> I think 'mkdir -p' option is now portable as I'm seeing that
> mkinstalldirs script also uses 'mkdir -p' options.
Right. I actually double-checked and -p is part of the current posix
specification.
Thanks,
Jeff
More information about the Gcc-patches
mailing list