diff mbox

[buildfix] configure: Assure existence of linux-headers/ build directory

Message ID 1339686873-5528-1-git-send-email-afaerber@suse.de
State New
Headers show

Commit Message

Andreas Färber June 14, 2012, 3:14 p.m. UTC
Commit ec5b06d (configure: ensure directory exists when creating symlinks)
moved the creation of directories into the symlink() function but forgot
the case where no symlink is created.

This leads to build errors on arm Linux due to -I../linux-headers.

Unbreak the build on arm Linux by reverting part of that commit.

Signed-off-by: Andreas Färber <afaerber@suse.de>
---
 configure |    1 +
 1 file changed, 1 insertion(+)

Comments

Andreas Färber June 14, 2012, 3:56 p.m. UTC | #1
Am 14.06.2012 17:14, schrieb Andreas Färber:
> Commit ec5b06d (configure: ensure directory exists when creating symlinks)
> moved the creation of directories into the symlink() function but forgot
> the case where no symlink is created.
> 
> This leads to build errors on arm Linux due to -I../linux-headers.
> 
> Unbreak the build on arm Linux by reverting part of that commit.

Er, "Unbreak the build by..." would suffice, no need to double-duplicate. ;)

/-F

> Signed-off-by: Andreas Färber <afaerber@suse.de>
> ---
>  configure |    1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/configure b/configure
> index c2366ee..ba8cc7c 100755
> --- a/configure
> +++ b/configure
> @@ -3462,6 +3462,7 @@ done
>  
>  # use included Linux headers
>  if test "$linux" = "yes" ; then
> +  mkdir -p linux-headers
>    case "$cpu" in
>    i386|x86_64)
>      symlink "$source_path/linux-headers/asm-x86" linux-headers/asm
Peter Maydell June 19, 2012, 3:18 p.m. UTC | #2
On 14 June 2012 16:14, Andreas Färber <afaerber@suse.de> wrote:
> Commit ec5b06d (configure: ensure directory exists when creating symlinks)
> moved the creation of directories into the symlink() function but forgot
> the case where no symlink is created.
>
> This leads to build errors on arm Linux due to -I../linux-headers.
>
> Unbreak the build on arm Linux by reverting part of that commit.

I think it would be better to just revert ec5b06d completely.
The comment documenting the symlink() function says
"# symbolically link $1 to $2.  Portable version of "ln -sf"
and "ln -sf" doesn't create the target directory, so symlink()
should not either.

-- PMM
Andreas Färber June 19, 2012, 3:24 p.m. UTC | #3
Am 19.06.2012 17:18, schrieb Peter Maydell:
> On 14 June 2012 16:14, Andreas Färber <afaerber@suse.de> wrote:
>> Commit ec5b06d (configure: ensure directory exists when creating symlinks)
>> moved the creation of directories into the symlink() function but forgot
>> the case where no symlink is created.
>>
>> This leads to build errors on arm Linux due to -I../linux-headers.
>>
>> Unbreak the build on arm Linux by reverting part of that commit.
> 
> I think it would be better to just revert ec5b06d completely.
> The comment documenting the symlink() function says
> "# symbolically link $1 to $2.  Portable version of "ln -sf"
> and "ln -sf" doesn't create the target directory, so symlink()
> should not either.

I don't mind either way as long as the build gets fixed. Anthony?

/-F
Peter Maydell June 20, 2012, 10:42 a.m. UTC | #4
On 19 June 2012 16:24, Andreas Färber <afaerber@suse.de> wrote:
> Am 19.06.2012 17:18, schrieb Peter Maydell:
>> On 14 June 2012 16:14, Andreas Färber <afaerber@suse.de> wrote:
>>> Commit ec5b06d (configure: ensure directory exists when creating symlinks)
>>> moved the creation of directories into the symlink() function but forgot
>>> the case where no symlink is created.
>>>
>>> This leads to build errors on arm Linux due to -I../linux-headers.
>>>
>>> Unbreak the build on arm Linux by reverting part of that commit.
>>
>> I think it would be better to just revert ec5b06d completely.
>> The comment documenting the symlink() function says
>> "# symbolically link $1 to $2.  Portable version of "ln -sf"
>> and "ln -sf" doesn't create the target directory, so symlink()
>> should not either.
>
> I don't mind either way as long as the build gets fixed. Anthony?

It turns out that there are later changes to configure which rely on
the auto-creation of the directory, so simple reversion isn't sufficient.
Maybe your patch is the simplest fix after all.

-- PMM
Peter Maydell June 20, 2012, 4:30 p.m. UTC | #5
On 14 June 2012 16:14, Andreas Färber <afaerber@suse.de> wrote:
> Commit ec5b06d (configure: ensure directory exists when creating symlinks)
> moved the creation of directories into the symlink() function but forgot
> the case where no symlink is created.
>
> This leads to build errors on arm Linux due to -I../linux-headers.
>
> Unbreak the build on arm Linux by reverting part of that commit.
>
> Signed-off-by: Andreas Färber <afaerber@suse.de>

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>

I guess we get to have the usual argument about how build fixes
get committed now :-)

-- PMM
Anthony Liguori June 27, 2012, 9:32 p.m. UTC | #6
On 06/14/2012 10:14 AM, Andreas Färber wrote:
> Commit ec5b06d (configure: ensure directory exists when creating symlinks)
> moved the creation of directories into the symlink() function but forgot
> the case where no symlink is created.
>
> This leads to build errors on arm Linux due to -I../linux-headers.
>
> Unbreak the build on arm Linux by reverting part of that commit.
>
> Signed-off-by: Andreas Färber<afaerber@suse.de>

Applied.  Thanks.

Regards,

Anthony Liguori

> ---
>   configure |    1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/configure b/configure
> index c2366ee..ba8cc7c 100755
> --- a/configure
> +++ b/configure
> @@ -3462,6 +3462,7 @@ done
>
>   # use included Linux headers
>   if test "$linux" = "yes" ; then
> +  mkdir -p linux-headers
>     case "$cpu" in
>     i386|x86_64)
>       symlink "$source_path/linux-headers/asm-x86" linux-headers/asm
diff mbox

Patch

diff --git a/configure b/configure
index c2366ee..ba8cc7c 100755
--- a/configure
+++ b/configure
@@ -3462,6 +3462,7 @@  done
 
 # use included Linux headers
 if test "$linux" = "yes" ; then
+  mkdir -p linux-headers
   case "$cpu" in
   i386|x86_64)
     symlink "$source_path/linux-headers/asm-x86" linux-headers/asm