* [Qemu-devel] [PATCH] configure: make it possible to disable IASL
@ 2013-11-24 9:52 Michael S. Tsirkin
2013-11-24 13:04 ` Marcel Apfelbaum
0 siblings, 1 reply; 10+ messages in thread
From: Michael S. Tsirkin @ 2013-11-24 9:52 UTC (permalink / raw)
To: qemu-devel
Cc: Peter Maydell, Richard Henderson, Stefan Hajnoczi,
Anthony Liguori, Paolo Bonzini
Useful for platforms with a broken IASL.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
configure | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/configure b/configure
index 0592ba7..d0a0abe 100755
--- a/configure
+++ b/configure
@@ -1080,6 +1080,7 @@ echo " --source-path=PATH path of source code [$source_path]"
echo " --cross-prefix=PREFIX use PREFIX for compile tools [$cross_prefix]"
echo " --cc=CC use C compiler CC [$cc]"
echo " --iasl=IASL use ACPI compiler IASL [$iasl]"
+echo " iasl='' (empty string) disables ACPI compiler"
echo " --host-cc=CC use C compiler CC [$host_cc] for code run at"
echo " build time"
echo " --cxx=CXX use C++ compiler CXX [$cxx]"
@@ -4269,7 +4270,7 @@ else
fi
echo "PYTHON=$python" >> $config_host_mak
echo "CC=$cc" >> $config_host_mak
-if $iasl -h > /dev/null 2>&1; then
+if test "$iasl" && $iasl -h > /dev/null 2>&1; then
echo "IASL=$iasl" >> $config_host_mak
fi
echo "CC_I386=$cc_i386" >> $config_host_mak
--
MST
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] [PATCH] configure: make it possible to disable IASL
2013-11-24 9:52 [Qemu-devel] [PATCH] configure: make it possible to disable IASL Michael S. Tsirkin
@ 2013-11-24 13:04 ` Marcel Apfelbaum
2013-11-24 13:42 ` Michael S. Tsirkin
0 siblings, 1 reply; 10+ messages in thread
From: Marcel Apfelbaum @ 2013-11-24 13:04 UTC (permalink / raw)
To: Michael S. Tsirkin
Cc: Peter Maydell, Stefan Hajnoczi, qemu-devel, Anthony Liguori,
Paolo Bonzini, Richard Henderson
On Sun, 2013-11-24 at 11:52 +0200, Michael S. Tsirkin wrote:
> Useful for platforms with a broken IASL.
>
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> ---
> configure | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/configure b/configure
> index 0592ba7..d0a0abe 100755
> --- a/configure
> +++ b/configure
> @@ -1080,6 +1080,7 @@ echo " --source-path=PATH path of source code [$source_path]"
> echo " --cross-prefix=PREFIX use PREFIX for compile tools [$cross_prefix]"
> echo " --cc=CC use C compiler CC [$cc]"
> echo " --iasl=IASL use ACPI compiler IASL [$iasl]"
> +echo " iasl='' (empty string) disables ACPI compiler"
> echo " --host-cc=CC use C compiler CC [$host_cc] for code run at"
> echo " build time"
> echo " --cxx=CXX use C++ compiler CXX [$cxx]"
> @@ -4269,7 +4270,7 @@ else
> fi
> echo "PYTHON=$python" >> $config_host_mak
> echo "CC=$cc" >> $config_host_mak
> -if $iasl -h > /dev/null 2>&1; then
> +if test "$iasl" && $iasl -h > /dev/null 2>&1; then
> echo "IASL=$iasl" >> $config_host_mak
> fi
> echo "CC_I386=$cc_i386" >> $config_host_mak
I tried to disable iasl without this patch and it worked for me...
I used:
- [Qemu-devel] [PATCH] configure: make --iasl option actually work
- ./configure --iasl="" (or --iasl=)
and it worked (no sign of IASL in config-host.mak)
I think this is because the prev test "$iasl -h > /dev/null 2>&1"
fails of course.
I don't get it how <test "$iasl"> helps if iasl is broken.
Thanks,
Marcel
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] [PATCH] configure: make it possible to disable IASL
2013-11-24 13:04 ` Marcel Apfelbaum
@ 2013-11-24 13:42 ` Michael S. Tsirkin
2013-11-24 13:54 ` Stefan Weil
0 siblings, 1 reply; 10+ messages in thread
From: Michael S. Tsirkin @ 2013-11-24 13:42 UTC (permalink / raw)
To: marcel.a
Cc: Peter Maydell, Stefan Hajnoczi, qemu-devel, Anthony Liguori,
Paolo Bonzini, Richard Henderson
On Sun, Nov 24, 2013 at 03:04:04PM +0200, Marcel Apfelbaum wrote:
> On Sun, 2013-11-24 at 11:52 +0200, Michael S. Tsirkin wrote:
> > Useful for platforms with a broken IASL.
> >
> > Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> > ---
> > configure | 3 ++-
> > 1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/configure b/configure
> > index 0592ba7..d0a0abe 100755
> > --- a/configure
> > +++ b/configure
> > @@ -1080,6 +1080,7 @@ echo " --source-path=PATH path of source code [$source_path]"
> > echo " --cross-prefix=PREFIX use PREFIX for compile tools [$cross_prefix]"
> > echo " --cc=CC use C compiler CC [$cc]"
> > echo " --iasl=IASL use ACPI compiler IASL [$iasl]"
> > +echo " iasl='' (empty string) disables ACPI compiler"
> > echo " --host-cc=CC use C compiler CC [$host_cc] for code run at"
> > echo " build time"
> > echo " --cxx=CXX use C++ compiler CXX [$cxx]"
> > @@ -4269,7 +4270,7 @@ else
> > fi
> > echo "PYTHON=$python" >> $config_host_mak
> > echo "CC=$cc" >> $config_host_mak
> > -if $iasl -h > /dev/null 2>&1; then
> > +if test "$iasl" && $iasl -h > /dev/null 2>&1; then
> > echo "IASL=$iasl" >> $config_host_mak
> > fi
> > echo "CC_I386=$cc_i386" >> $config_host_mak
>
> I tried to disable iasl without this patch and it worked for me...
> I used:
> - [Qemu-devel] [PATCH] configure: make --iasl option actually work
> - ./configure --iasl="" (or --iasl=)
> and it worked (no sign of IASL in config-host.mak)
>
> I think this is because the prev test "$iasl -h > /dev/null 2>&1"
> fails of course.
By luck, yes.
So this is just a documentation patch: cleaner to document the
interface explicitly.
I'll make this clearer in the commit log.
> I don't get it how <test "$iasl"> helps if iasl is broken.
> Thanks,
> Marcel
>
>
>
It doesn't but it creates an interface to disable iasl
for such configurations.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] [PATCH] configure: make it possible to disable IASL
2013-11-24 13:42 ` Michael S. Tsirkin
@ 2013-11-24 13:54 ` Stefan Weil
2013-11-24 15:39 ` Michael S. Tsirkin
0 siblings, 1 reply; 10+ messages in thread
From: Stefan Weil @ 2013-11-24 13:54 UTC (permalink / raw)
To: Michael S. Tsirkin, marcel.a
Cc: Peter Maydell, Anthony Liguori, qemu-devel, Stefan Hajnoczi,
Paolo Bonzini, Richard Henderson
Am 24.11.2013 14:42, schrieb Michael S. Tsirkin:
> On Sun, Nov 24, 2013 at 03:04:04PM +0200, Marcel Apfelbaum wrote:
>> On Sun, 2013-11-24 at 11:52 +0200, Michael S. Tsirkin wrote:
>>> Useful for platforms with a broken IASL.
>>>
>>> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
>>> ---
>>> configure | 3 ++-
>>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/configure b/configure
>>> index 0592ba7..d0a0abe 100755
>>> --- a/configure
>>> +++ b/configure
>>> @@ -1080,6 +1080,7 @@ echo " --source-path=PATH path of source code [$source_path]"
>>> echo " --cross-prefix=PREFIX use PREFIX for compile tools [$cross_prefix]"
>>> echo " --cc=CC use C compiler CC [$cc]"
>>> echo " --iasl=IASL use ACPI compiler IASL [$iasl]"
>>> +echo " iasl='' (empty string) disables ACPI compiler"
>>> echo " --host-cc=CC use C compiler CC [$host_cc] for code run at"
>>> echo " build time"
>>> echo " --cxx=CXX use C++ compiler CXX [$cxx]"
>>> @@ -4269,7 +4270,7 @@ else
>>> fi
>>> echo "PYTHON=$python" >> $config_host_mak
>>> echo "CC=$cc" >> $config_host_mak
>>> -if $iasl -h > /dev/null 2>&1; then
>>> +if test "$iasl" && $iasl -h > /dev/null 2>&1; then
>>> echo "IASL=$iasl" >> $config_host_mak
>>> fi
>>> echo "CC_I386=$cc_i386" >> $config_host_mak
>> I tried to disable iasl without this patch and it worked for me...
>> I used:
>> - [Qemu-devel] [PATCH] configure: make --iasl option actually work
>> - ./configure --iasl="" (or --iasl=)
>> and it worked (no sign of IASL in config-host.mak)
>>
>> I think this is because the prev test "$iasl -h > /dev/null 2>&1"
>> fails of course.
> By luck, yes.
>
> So this is just a documentation patch: cleaner to document the
> interface explicitly.
> I'll make this clearer in the commit log.
>
--iasl=false works without further modifications (because test "false
-h" works and returns false). It also looks more natural than --iasl=.
Cheers, Stefan
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] [PATCH] configure: make it possible to disable IASL
2013-11-24 13:54 ` Stefan Weil
@ 2013-11-24 15:39 ` Michael S. Tsirkin
2013-11-24 16:48 ` Michael S. Tsirkin
0 siblings, 1 reply; 10+ messages in thread
From: Michael S. Tsirkin @ 2013-11-24 15:39 UTC (permalink / raw)
To: Stefan Weil
Cc: Peter Maydell, Stefan Hajnoczi, marcel.a, qemu-devel,
Anthony Liguori, Paolo Bonzini, Richard Henderson
On Sun, Nov 24, 2013 at 02:54:51PM +0100, Stefan Weil wrote:
> Am 24.11.2013 14:42, schrieb Michael S. Tsirkin:
> > On Sun, Nov 24, 2013 at 03:04:04PM +0200, Marcel Apfelbaum wrote:
> >> On Sun, 2013-11-24 at 11:52 +0200, Michael S. Tsirkin wrote:
> >>> Useful for platforms with a broken IASL.
> >>>
> >>> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> >>> ---
> >>> configure | 3 ++-
> >>> 1 file changed, 2 insertions(+), 1 deletion(-)
> >>>
> >>> diff --git a/configure b/configure
> >>> index 0592ba7..d0a0abe 100755
> >>> --- a/configure
> >>> +++ b/configure
> >>> @@ -1080,6 +1080,7 @@ echo " --source-path=PATH path of source code [$source_path]"
> >>> echo " --cross-prefix=PREFIX use PREFIX for compile tools [$cross_prefix]"
> >>> echo " --cc=CC use C compiler CC [$cc]"
> >>> echo " --iasl=IASL use ACPI compiler IASL [$iasl]"
> >>> +echo " iasl='' (empty string) disables ACPI compiler"
> >>> echo " --host-cc=CC use C compiler CC [$host_cc] for code run at"
> >>> echo " build time"
> >>> echo " --cxx=CXX use C++ compiler CXX [$cxx]"
> >>> @@ -4269,7 +4270,7 @@ else
> >>> fi
> >>> echo "PYTHON=$python" >> $config_host_mak
> >>> echo "CC=$cc" >> $config_host_mak
> >>> -if $iasl -h > /dev/null 2>&1; then
> >>> +if test "$iasl" && $iasl -h > /dev/null 2>&1; then
> >>> echo "IASL=$iasl" >> $config_host_mak
> >>> fi
> >>> echo "CC_I386=$cc_i386" >> $config_host_mak
> >> I tried to disable iasl without this patch and it worked for me...
> >> I used:
> >> - [Qemu-devel] [PATCH] configure: make --iasl option actually work
> >> - ./configure --iasl="" (or --iasl=)
> >> and it worked (no sign of IASL in config-host.mak)
> >>
> >> I think this is because the prev test "$iasl -h > /dev/null 2>&1"
> >> fails of course.
> > By luck, yes.
> >
> > So this is just a documentation patch: cleaner to document the
> > interface explicitly.
> > I'll make this clearer in the commit log.
> >
>
> --iasl=false works without further modifications (because test "false
> -h" works and returns false). It also looks more natural than --iasl=.
>
> Cheers, Stefan
It seems that some people try --iasl= as the more natural way
to do this. It's not documented that a failing iasl will
cause a fall-back and I'd rather document an explicit option
than making it fail.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] [PATCH] configure: make it possible to disable IASL
2013-11-24 15:39 ` Michael S. Tsirkin
@ 2013-11-24 16:48 ` Michael S. Tsirkin
2013-11-24 20:58 ` Stefan Weil
0 siblings, 1 reply; 10+ messages in thread
From: Michael S. Tsirkin @ 2013-11-24 16:48 UTC (permalink / raw)
To: Stefan Weil
Cc: Peter Maydell, Stefan Hajnoczi, marcel.a, qemu-devel,
Anthony Liguori, Paolo Bonzini, Richard Henderson
On Sun, Nov 24, 2013 at 05:39:58PM +0200, Michael S. Tsirkin wrote:
> On Sun, Nov 24, 2013 at 02:54:51PM +0100, Stefan Weil wrote:
> > Am 24.11.2013 14:42, schrieb Michael S. Tsirkin:
> > > On Sun, Nov 24, 2013 at 03:04:04PM +0200, Marcel Apfelbaum wrote:
> > >> On Sun, 2013-11-24 at 11:52 +0200, Michael S. Tsirkin wrote:
> > >>> Useful for platforms with a broken IASL.
> > >>>
> > >>> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> > >>> ---
> > >>> configure | 3 ++-
> > >>> 1 file changed, 2 insertions(+), 1 deletion(-)
> > >>>
> > >>> diff --git a/configure b/configure
> > >>> index 0592ba7..d0a0abe 100755
> > >>> --- a/configure
> > >>> +++ b/configure
> > >>> @@ -1080,6 +1080,7 @@ echo " --source-path=PATH path of source code [$source_path]"
> > >>> echo " --cross-prefix=PREFIX use PREFIX for compile tools [$cross_prefix]"
> > >>> echo " --cc=CC use C compiler CC [$cc]"
> > >>> echo " --iasl=IASL use ACPI compiler IASL [$iasl]"
> > >>> +echo " iasl='' (empty string) disables ACPI compiler"
> > >>> echo " --host-cc=CC use C compiler CC [$host_cc] for code run at"
> > >>> echo " build time"
> > >>> echo " --cxx=CXX use C++ compiler CXX [$cxx]"
> > >>> @@ -4269,7 +4270,7 @@ else
> > >>> fi
> > >>> echo "PYTHON=$python" >> $config_host_mak
> > >>> echo "CC=$cc" >> $config_host_mak
> > >>> -if $iasl -h > /dev/null 2>&1; then
> > >>> +if test "$iasl" && $iasl -h > /dev/null 2>&1; then
> > >>> echo "IASL=$iasl" >> $config_host_mak
> > >>> fi
> > >>> echo "CC_I386=$cc_i386" >> $config_host_mak
> > >> I tried to disable iasl without this patch and it worked for me...
> > >> I used:
> > >> - [Qemu-devel] [PATCH] configure: make --iasl option actually work
> > >> - ./configure --iasl="" (or --iasl=)
> > >> and it worked (no sign of IASL in config-host.mak)
> > >>
> > >> I think this is because the prev test "$iasl -h > /dev/null 2>&1"
> > >> fails of course.
> > > By luck, yes.
> > >
> > > So this is just a documentation patch: cleaner to document the
> > > interface explicitly.
> > > I'll make this clearer in the commit log.
> > >
> >
> > --iasl=false works without further modifications (because test "false
> > -h" works and returns false). It also looks more natural than --iasl=.
> >
> > Cheers, Stefan
>
> It seems that some people try --iasl= as the more natural way
> to do this. It's not documented that a failing iasl will
> cause a fall-back and I'd rather document an explicit option
> than making it fail.
I'm also curious why would you say =false is natural:
it's a string option not a boolean one.
--
MST
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] [PATCH] configure: make it possible to disable IASL
2013-11-24 16:48 ` Michael S. Tsirkin
@ 2013-11-24 20:58 ` Stefan Weil
2013-11-25 11:26 ` Michael S. Tsirkin
0 siblings, 1 reply; 10+ messages in thread
From: Stefan Weil @ 2013-11-24 20:58 UTC (permalink / raw)
To: Michael S. Tsirkin
Cc: Peter Maydell, Stefan Hajnoczi, marcel.a, qemu-devel,
Anthony Liguori, Paolo Bonzini, Richard Henderson
Am 24.11.2013 17:48, schrieb Michael S. Tsirkin:
> On Sun, Nov 24, 2013 at 05:39:58PM +0200, Michael S. Tsirkin wrote:
>> On Sun, Nov 24, 2013 at 02:54:51PM +0100, Stefan Weil wrote:
>>> Am 24.11.2013 14:42, schrieb Michael S. Tsirkin:
>>>> On Sun, Nov 24, 2013 at 03:04:04PM +0200, Marcel Apfelbaum wrote:
>>>>> On Sun, 2013-11-24 at 11:52 +0200, Michael S. Tsirkin wrote:
>>>>>> Useful for platforms with a broken IASL.
>>>>>>
>>>>>> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
>>>>>> ---
>>>>>> configure | 3 ++-
>>>>>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>>>>>
>>>>>> diff --git a/configure b/configure
>>>>>> index 0592ba7..d0a0abe 100755
>>>>>> --- a/configure
>>>>>> +++ b/configure
>>>>>> @@ -1080,6 +1080,7 @@ echo " --source-path=PATH path of source code [$source_path]"
>>>>>> echo " --cross-prefix=PREFIX use PREFIX for compile tools [$cross_prefix]"
>>>>>> echo " --cc=CC use C compiler CC [$cc]"
>>>>>> echo " --iasl=IASL use ACPI compiler IASL [$iasl]"
>>>>>> +echo " iasl='' (empty string) disables ACPI compiler"
>>>>>> echo " --host-cc=CC use C compiler CC [$host_cc] for code run at"
>>>>>> echo " build time"
>>>>>> echo " --cxx=CXX use C++ compiler CXX [$cxx]"
>>>>>> @@ -4269,7 +4270,7 @@ else
>>>>>> fi
>>>>>> echo "PYTHON=$python" >> $config_host_mak
>>>>>> echo "CC=$cc" >> $config_host_mak
>>>>>> -if $iasl -h > /dev/null 2>&1; then
>>>>>> +if test "$iasl" && $iasl -h > /dev/null 2>&1; then
>>>>>> echo "IASL=$iasl" >> $config_host_mak
>>>>>> fi
>>>>>> echo "CC_I386=$cc_i386" >> $config_host_mak
>>>>> I tried to disable iasl without this patch and it worked for me...
>>>>> I used:
>>>>> - [Qemu-devel] [PATCH] configure: make --iasl option actually work
>>>>> - ./configure --iasl="" (or --iasl=)
>>>>> and it worked (no sign of IASL in config-host.mak)
>>>>>
>>>>> I think this is because the prev test "$iasl -h > /dev/null 2>&1"
>>>>> fails of course.
>>>> By luck, yes.
>>>>
>>>> So this is just a documentation patch: cleaner to document the
>>>> interface explicitly.
>>>> I'll make this clearer in the commit log.
>>>>
>>> --iasl=false works without further modifications (because test "false
>>> -h" works and returns false). It also looks more natural than --iasl=.
>>>
>>> Cheers, Stefan
>> It seems that some people try --iasl= as the more natural way
>> to do this. It's not documented that a failing iasl will
>> cause a fall-back and I'd rather document an explicit option
>> than making it fail.
> I'm also curious why would you say =false is natural:
> it's a string option not a boolean one.
>
'false' is a string here, namely the name of the executable which is
normally found at /bin/false.
It takes any number of parameters and always returns 1 (which is boolean
false
in shell conventions).
You could also write --iasl=/bin/false.
I suggest this kind of patch:
echo " --iasl=IASL use ACPI compiler IASL [$iasl]"
+echo " iasl=false disables the ACPI compiler"
echo " --host-cc=CC use C compiler CC [$host_cc] for code run at"
Stefan
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] [PATCH] configure: make it possible to disable IASL
2013-11-24 20:58 ` Stefan Weil
@ 2013-11-25 11:26 ` Michael S. Tsirkin
2013-11-25 13:54 ` Marcel Apfelbaum
0 siblings, 1 reply; 10+ messages in thread
From: Michael S. Tsirkin @ 2013-11-25 11:26 UTC (permalink / raw)
To: Stefan Weil
Cc: Peter Maydell, Stefan Hajnoczi, marcel.a, qemu-devel,
Anthony Liguori, Paolo Bonzini, Richard Henderson
On Sun, Nov 24, 2013 at 09:58:34PM +0100, Stefan Weil wrote:
> Am 24.11.2013 17:48, schrieb Michael S. Tsirkin:
> > On Sun, Nov 24, 2013 at 05:39:58PM +0200, Michael S. Tsirkin wrote:
> >> On Sun, Nov 24, 2013 at 02:54:51PM +0100, Stefan Weil wrote:
> >>> Am 24.11.2013 14:42, schrieb Michael S. Tsirkin:
> >>>> On Sun, Nov 24, 2013 at 03:04:04PM +0200, Marcel Apfelbaum wrote:
> >>>>> On Sun, 2013-11-24 at 11:52 +0200, Michael S. Tsirkin wrote:
> >>>>>> Useful for platforms with a broken IASL.
> >>>>>>
> >>>>>> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> >>>>>> ---
> >>>>>> configure | 3 ++-
> >>>>>> 1 file changed, 2 insertions(+), 1 deletion(-)
> >>>>>>
> >>>>>> diff --git a/configure b/configure
> >>>>>> index 0592ba7..d0a0abe 100755
> >>>>>> --- a/configure
> >>>>>> +++ b/configure
> >>>>>> @@ -1080,6 +1080,7 @@ echo " --source-path=PATH path of source code [$source_path]"
> >>>>>> echo " --cross-prefix=PREFIX use PREFIX for compile tools [$cross_prefix]"
> >>>>>> echo " --cc=CC use C compiler CC [$cc]"
> >>>>>> echo " --iasl=IASL use ACPI compiler IASL [$iasl]"
> >>>>>> +echo " iasl='' (empty string) disables ACPI compiler"
> >>>>>> echo " --host-cc=CC use C compiler CC [$host_cc] for code run at"
> >>>>>> echo " build time"
> >>>>>> echo " --cxx=CXX use C++ compiler CXX [$cxx]"
> >>>>>> @@ -4269,7 +4270,7 @@ else
> >>>>>> fi
> >>>>>> echo "PYTHON=$python" >> $config_host_mak
> >>>>>> echo "CC=$cc" >> $config_host_mak
> >>>>>> -if $iasl -h > /dev/null 2>&1; then
> >>>>>> +if test "$iasl" && $iasl -h > /dev/null 2>&1; then
> >>>>>> echo "IASL=$iasl" >> $config_host_mak
> >>>>>> fi
> >>>>>> echo "CC_I386=$cc_i386" >> $config_host_mak
> >>>>> I tried to disable iasl without this patch and it worked for me...
> >>>>> I used:
> >>>>> - [Qemu-devel] [PATCH] configure: make --iasl option actually work
> >>>>> - ./configure --iasl="" (or --iasl=)
> >>>>> and it worked (no sign of IASL in config-host.mak)
> >>>>>
> >>>>> I think this is because the prev test "$iasl -h > /dev/null 2>&1"
> >>>>> fails of course.
> >>>> By luck, yes.
> >>>>
> >>>> So this is just a documentation patch: cleaner to document the
> >>>> interface explicitly.
> >>>> I'll make this clearer in the commit log.
> >>>>
> >>> --iasl=false works without further modifications (because test "false
> >>> -h" works and returns false). It also looks more natural than --iasl=.
> >>>
> >>> Cheers, Stefan
> >> It seems that some people try --iasl= as the more natural way
> >> to do this. It's not documented that a failing iasl will
> >> cause a fall-back and I'd rather document an explicit option
> >> than making it fail.
> > I'm also curious why would you say =false is natural:
> > it's a string option not a boolean one.
> >
>
> 'false' is a string here, namely the name of the executable which is
> normally found at /bin/false.
> It takes any number of parameters and always returns 1 (which is boolean
> false
> in shell conventions).
>
> You could also write --iasl=/bin/false.
>
> I suggest this kind of patch:
>
> echo " --iasl=IASL use ACPI compiler IASL [$iasl]"
> +echo " iasl=false disables the ACPI compiler"
It's still not a natural interface.
It works by chance because we run iasl and test the return code,
but we don't have to.
For example, a reasonable implementation might produce
an error if the user-specified iasl fails, breaking this hack.
Interfaces should not follow implementation.
If you don't want iasl a reasonable syntax is '' or
--disable-iasl.
> echo " --host-cc=CC use C compiler CC [$host_cc] for code run at"
>
>
> Stefan
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] [PATCH] configure: make it possible to disable IASL
2013-11-25 11:26 ` Michael S. Tsirkin
@ 2013-11-25 13:54 ` Marcel Apfelbaum
2013-11-25 17:27 ` Stefan Weil
0 siblings, 1 reply; 10+ messages in thread
From: Marcel Apfelbaum @ 2013-11-25 13:54 UTC (permalink / raw)
To: Michael S. Tsirkin
Cc: Peter Maydell, Stefan Hajnoczi, Stefan Weil, qemu-devel,
Anthony Liguori, Paolo Bonzini, Richard Henderson
On Mon, 2013-11-25 at 13:26 +0200, Michael S. Tsirkin wrote:
> On Sun, Nov 24, 2013 at 09:58:34PM +0100, Stefan Weil wrote:
> > Am 24.11.2013 17:48, schrieb Michael S. Tsirkin:
> > > On Sun, Nov 24, 2013 at 05:39:58PM +0200, Michael S. Tsirkin wrote:
> > >> On Sun, Nov 24, 2013 at 02:54:51PM +0100, Stefan Weil wrote:
> > >>> Am 24.11.2013 14:42, schrieb Michael S. Tsirkin:
> > >>>> On Sun, Nov 24, 2013 at 03:04:04PM +0200, Marcel Apfelbaum wrote:
> > >>>>> On Sun, 2013-11-24 at 11:52 +0200, Michael S. Tsirkin wrote:
> > >>>>>> Useful for platforms with a broken IASL.
> > >>>>>>
> > >>>>>> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> > >>>>>> ---
> > >>>>>> configure | 3 ++-
> > >>>>>> 1 file changed, 2 insertions(+), 1 deletion(-)
> > >>>>>>
> > >>>>>> diff --git a/configure b/configure
> > >>>>>> index 0592ba7..d0a0abe 100755
> > >>>>>> --- a/configure
> > >>>>>> +++ b/configure
> > >>>>>> @@ -1080,6 +1080,7 @@ echo " --source-path=PATH path of source code [$source_path]"
> > >>>>>> echo " --cross-prefix=PREFIX use PREFIX for compile tools [$cross_prefix]"
> > >>>>>> echo " --cc=CC use C compiler CC [$cc]"
> > >>>>>> echo " --iasl=IASL use ACPI compiler IASL [$iasl]"
> > >>>>>> +echo " iasl='' (empty string) disables ACPI compiler"
> > >>>>>> echo " --host-cc=CC use C compiler CC [$host_cc] for code run at"
> > >>>>>> echo " build time"
> > >>>>>> echo " --cxx=CXX use C++ compiler CXX [$cxx]"
> > >>>>>> @@ -4269,7 +4270,7 @@ else
> > >>>>>> fi
> > >>>>>> echo "PYTHON=$python" >> $config_host_mak
> > >>>>>> echo "CC=$cc" >> $config_host_mak
> > >>>>>> -if $iasl -h > /dev/null 2>&1; then
> > >>>>>> +if test "$iasl" && $iasl -h > /dev/null 2>&1; then
> > >>>>>> echo "IASL=$iasl" >> $config_host_mak
> > >>>>>> fi
> > >>>>>> echo "CC_I386=$cc_i386" >> $config_host_mak
> > >>>>> I tried to disable iasl without this patch and it worked for me...
> > >>>>> I used:
> > >>>>> - [Qemu-devel] [PATCH] configure: make --iasl option actually work
> > >>>>> - ./configure --iasl="" (or --iasl=)
> > >>>>> and it worked (no sign of IASL in config-host.mak)
> > >>>>>
> > >>>>> I think this is because the prev test "$iasl -h > /dev/null 2>&1"
> > >>>>> fails of course.
> > >>>> By luck, yes.
> > >>>>
> > >>>> So this is just a documentation patch: cleaner to document the
> > >>>> interface explicitly.
> > >>>> I'll make this clearer in the commit log.
> > >>>>
> > >>> --iasl=false works without further modifications (because test "false
> > >>> -h" works and returns false). It also looks more natural than --iasl=.
> > >>>
> > >>> Cheers, Stefan
> > >> It seems that some people try --iasl= as the more natural way
> > >> to do this. It's not documented that a failing iasl will
> > >> cause a fall-back and I'd rather document an explicit option
> > >> than making it fail.
> > > I'm also curious why would you say =false is natural:
> > > it's a string option not a boolean one.
> > >
> >
> > 'false' is a string here, namely the name of the executable which is
> > normally found at /bin/false.
> > It takes any number of parameters and always returns 1 (which is boolean
> > false
> > in shell conventions).
> >
> > You could also write --iasl=/bin/false.
> >
> > I suggest this kind of patch:
> >
> > echo " --iasl=IASL use ACPI compiler IASL [$iasl]"
> > +echo " iasl=false disables the ACPI compiler"
>
> It's still not a natural interface.
>
> It works by chance because we run iasl and test the return code,
> but we don't have to.
> For example, a reasonable implementation might produce
> an error if the user-specified iasl fails, breaking this hack.
>
> Interfaces should not follow implementation.
> If you don't want iasl a reasonable syntax is '' or
> --disable-iasl.
+1 on --disable-iasl
Marcel
> > echo " --host-cc=CC use C compiler CC [$host_cc] for code run at"
> >
> >
> > Stefan
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] [PATCH] configure: make it possible to disable IASL
2013-11-25 13:54 ` Marcel Apfelbaum
@ 2013-11-25 17:27 ` Stefan Weil
0 siblings, 0 replies; 10+ messages in thread
From: Stefan Weil @ 2013-11-25 17:27 UTC (permalink / raw)
To: Marcel Apfelbaum, Michael S. Tsirkin
Cc: Peter Maydell, Anthony Liguori, qemu-devel, Stefan Hajnoczi,
Paolo Bonzini, Richard Henderson
Am 25.11.2013 14:54, schrieb Marcel Apfelbaum:
> On Mon, 2013-11-25 at 13:26 +0200, Michael S. Tsirkin wrote:
>> On Sun, Nov 24, 2013 at 09:58:34PM +0100, Stefan Weil wrote:
>>>>>> --iasl=false works without further modifications (because test "false
>>>>>> -h" works and returns false). It also looks more natural than --iasl=.
>>>>>>
>>>>>> Cheers, Stefan
>>>>> It seems that some people try --iasl= as the more natural way
>>>>> to do this. It's not documented that a failing iasl will
>>>>> cause a fall-back and I'd rather document an explicit option
>>>>> than making it fail.
>>>> I'm also curious why would you say =false is natural:
>>>> it's a string option not a boolean one.
>>>>
>>> 'false' is a string here, namely the name of the executable which is
>>> normally found at /bin/false.
>>> It takes any number of parameters and always returns 1 (which is boolean
>>> false
>>> in shell conventions).
>>>
>>> You could also write --iasl=/bin/false.
>>>
>>> I suggest this kind of patch:
>>>
>>> echo " --iasl=IASL use ACPI compiler IASL [$iasl]"
>>> +echo " iasl=false disables the ACPI compiler"
>> It's still not a natural interface.
>>
>> It works by chance because we run iasl and test the return code,
>> but we don't have to.
>> For example, a reasonable implementation might produce
>> an error if the user-specified iasl fails, breaking this hack.
>>
>> Interfaces should not follow implementation.
>> If you don't want iasl a reasonable syntax is '' or
>> --disable-iasl.
> +1 on --disable-iasl
>
> Marcel
I also prefer --disable-iasl because that's the usual QEMU way how to
disable features.
Cheers,
Stefan
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2013-11-25 17:27 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-24 9:52 [Qemu-devel] [PATCH] configure: make it possible to disable IASL Michael S. Tsirkin
2013-11-24 13:04 ` Marcel Apfelbaum
2013-11-24 13:42 ` Michael S. Tsirkin
2013-11-24 13:54 ` Stefan Weil
2013-11-24 15:39 ` Michael S. Tsirkin
2013-11-24 16:48 ` Michael S. Tsirkin
2013-11-24 20:58 ` Stefan Weil
2013-11-25 11:26 ` Michael S. Tsirkin
2013-11-25 13:54 ` Marcel Apfelbaum
2013-11-25 17:27 ` Stefan Weil
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).