diff mbox

use a more portable syntax for mktemp. fixes build problem under MacOS X

Message ID 20120919164317.GA20160@waldemar-brodkorb.de
State Changes Requested
Headers show

Commit Message

Waldemar Brodkorb Sept. 19, 2012, 4:43 p.m. UTC
Hi Developers,
following patch might be useful, when using buildroot on MacOS X.

Signed-off-by: Waldemar Brodkorb <mail@waldemar-brodkorb.de>
---
 support/kconfig/lxdialog/check-lxdialog.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Thomas Petazzoni Sept. 19, 2012, 8:30 p.m. UTC | #1
Dear Waldemar Brodkorb,

On Wed, 19 Sep 2012 18:43:17 +0200, Waldemar Brodkorb wrote:

> diff --git a/support/kconfig/lxdialog/check-lxdialog.sh b/support/kconfig/lxdialog/check-lxdialog.sh
> index 969cd4c..fb4d90b 100644
> --- a/support/kconfig/lxdialog/check-lxdialog.sh
> +++ b/support/kconfig/lxdialog/check-lxdialog.sh
> @@ -33,7 +33,7 @@ ccflags()
>  }
>  
>  # Temp file, try to clean up after us
> -tmp=$(mktemp)
> +tmp=$(mktemp -t yyy)
>  trap "rm -f $tmp" 0 1 2 3 15
>  
>  # Check if we can link to ncurses

If you make any changes to support/kconfig/, then those changes should
also be done in the patches in support/kconfig/patches/ that help us
port our changes to later versions of kconfig when we sync kconfig with
the latest kernel version.

In your case, changing patch 11 sounds like a good plan. However, does
Buildroot really works on Mac OS X? I don't think anybody uses
Buildroot on Mac OS X, and I suspect that a lot of things might be
broken besides just kconfig, no?

Thomas
Waldemar Brodkorb Sept. 20, 2012, 7:49 a.m. UTC | #2
Hi Thomas Petazzoni,
On Sep 19, 2012, at 10:30 PM, Thomas Petazzoni wrote:

> Dear Waldemar Brodkorb,
> 
> On Wed, 19 Sep 2012 18:43:17 +0200, Waldemar Brodkorb wrote:
> 
>> diff --git a/support/kconfig/lxdialog/check-lxdialog.sh b/support/kconfig/lxdialog/check-lxdialog.sh
>> index 969cd4c..fb4d90b 100644
>> --- a/support/kconfig/lxdialog/check-lxdialog.sh
>> +++ b/support/kconfig/lxdialog/check-lxdialog.sh
>> @@ -33,7 +33,7 @@ ccflags()
>> }
>> 
>> # Temp file, try to clean up after us
>> -tmp=$(mktemp)
>> +tmp=$(mktemp -t yyy)
>> trap "rm -f $tmp" 0 1 2 3 15
>> 
>> # Check if we can link to ncurses
> 
> If you make any changes to support/kconfig/, then those changes should
> also be done in the patches in support/kconfig/patches/ that help us
> port our changes to later versions of kconfig when we sync kconfig with
> the latest kernel version.

Okay.

> In your case, changing patch 11 sounds like a good plan. However, does
> Buildroot really works on Mac OS X? I don't think anybody uses
> Buildroot on Mac OS X, and I suspect that a lot of things might be
> broken besides just kconfig, no?

Yes, there are more things broken. But I can successfully build a Qemu MIPS system
and it boots up fine.
- Busybox have a patch in upstream, will be in the next release
 http://www.mail-archive.com/busybox@busybox.net/msg17046.html
- uClibc utils/getconf.c does not compile (unresolved)
- there is a kernel patch needed to build the different tools ( I can provide this, if someone is interested, this is
used in OpenWrt, too)
- minor patch for echo -e incompatibility

Besides that you need to use GNU sed, GNU xargs and GNU install instead of the MacOS X utils.

best regards 
 Waldemar 

> 
> Thomas
> -- 
> Thomas Petazzoni, Free Electrons
> Kernel, drivers, real-time and embedded Linux
> development, consulting, training and support.
> http://free-electrons.com
>
Peter Korsgaard Sept. 20, 2012, 12:13 p.m. UTC | #3
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

Hi,

 >> # Check if we can link to ncurses

 Thomas> If you make any changes to support/kconfig/, then those changes
 Thomas> should also be done in the patches in support/kconfig/patches/
 Thomas> that help us port our changes to later versions of kconfig when
 Thomas> we sync kconfig with the latest kernel version.

Or Yann's new kconfig-frontends package.

 Thomas> In your case, changing patch 11 sounds like a good plan. However, does
 Thomas> Buildroot really works on Mac OS X? I don't think anybody uses
 Thomas> Buildroot on Mac OS X, and I suspect that a lot of things might be
 Thomas> broken besides just kconfig, no?

My thoughts exactly.
diff mbox

Patch

diff --git a/support/kconfig/lxdialog/check-lxdialog.sh b/support/kconfig/lxdialog/check-lxdialog.sh
index 969cd4c..fb4d90b 100644
--- a/support/kconfig/lxdialog/check-lxdialog.sh
+++ b/support/kconfig/lxdialog/check-lxdialog.sh
@@ -33,7 +33,7 @@  ccflags()
 }
 
 # Temp file, try to clean up after us
-tmp=$(mktemp)
+tmp=$(mktemp -t yyy)
 trap "rm -f $tmp" 0 1 2 3 15
 
 # Check if we can link to ncurses