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  <mbi...@codesourcery.com>

        * fixinc.in: Use --parents option to make LIB directory.


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.


OK to commit?


Thanks,
-Bilal
/system32;
/system64;/64
/sgxx-glibc;/sgxx-glibc
/sgxx-glibc;/64/sgxx-glibc
/sgxx-glibc;/x32/sgxx-glibc

Reply via email to