Skip to contentSkip to conversation

configure: make it possible to disable IASL

PATCH In review Michael S. Tsirkin 4 participants 10 messages Nov 24, 2013 – Nov 25, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 configure: make it possible to disable IASL

Useful for platforms with a broken IASL.

---
 configure | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
configure +2 -1
index 0592ba7..d0a0abe 100755
@@ -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
Signature · 1 line
MST
#1 lore raw
Quoted 20 lines · Michael S. Tsirkin

Useful for platforms with a broken IASL.

---
 configure | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
configure +1 -0
index 0592ba7..d0a0abe 100755
@@ -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]"

configure else · line 4276

Quoted 8 lines
configure +1 -1
@@ -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

#2 lore raw
Quoted 36 lines · Marcel Apfelbaum
Quoted 20 lines · Michael S. Tsirkin

Useful for platforms with a broken IASL.

---
 configure | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
configure +1 -0
index 0592ba7..d0a0abe 100755
@@ -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]"

configure else · line 4276

Quoted 8 lines
configure +1 -1
@@ -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)

Quoted 2 lines

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.

Quoted 6 lines

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.

#3 lore raw

Am 24.11.2013 14:42, schrieb Michael S. Tsirkin:

Quoted 36 lines · Marcel Apfelbaum
Quoted 35 lines · Michael S. Tsirkin
Quoted 20 lines

Useful for platforms with a broken IASL.

---
 configure | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
configure +1 -0
index 0592ba7..d0a0abe 100755
@@ -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]"

configure else · line 4276

Quoted 8 lines
configure +1 -1
@@ -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)

Quoted 8 lines
Quoted 2 lines

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

#4 lore raw
Quoted 46 lines · Stefan Weil

Am 24.11.2013 14:42, schrieb Michael S. Tsirkin:

Quoted 36 lines · Marcel Apfelbaum
Quoted 35 lines · Michael S. Tsirkin
Quoted 20 lines

Useful for platforms with a broken IASL.

---
 configure | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
configure +1 -0
index 0592ba7..d0a0abe 100755
@@ -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]"

configure else · line 4276

Quoted 8 lines
configure +1 -1
@@ -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)

Quoted 8 lines
Quoted 2 lines

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.

Quoted 4 lines

--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.

#5 lore raw
Quoted 50 lines · Michael S. Tsirkin
Quoted 49 lines · Stefan Weil

Am 24.11.2013 14:42, schrieb Michael S. Tsirkin:

Quoted 36 lines · Marcel Apfelbaum
Quoted 35 lines · Michael S. Tsirkin
Quoted 20 lines

Useful for platforms with a broken IASL.

---
 configure | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
configure +1 -0
index 0592ba7..d0a0abe 100755
@@ -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]"

configure else · line 4276

Quoted 8 lines
configure +1 -1
@@ -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)

Quoted 8 lines
Quoted 2 lines

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=.

Quoted 6 lines
Quoted 1 line

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.

Signature · 1 line
MST
#6 lore raw

Am 24.11.2013 17:48, schrieb Michael S. Tsirkin:

Quoted 50 lines · Michael S. Tsirkin
Quoted 49 lines · Stefan Weil
Quoted 48 lines

Am 24.11.2013 14:42, schrieb Michael S. Tsirkin:

Quoted 36 lines · Marcel Apfelbaum
Quoted 35 lines · Michael S. Tsirkin
Quoted 20 lines

Useful for platforms with a broken IASL.

---
 configure | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
configure +1 -0
index 0592ba7..d0a0abe 100755
@@ -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]"

configure else · line 4276

Quoted 8 lines
configure +1 -1
@@ -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)

Quoted 8 lines
Quoted 2 lines

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=.

Quoted 8 lines
Quoted 5 lines
Quoted 1 line

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

#7 lore raw
Quoted 66 lines · Stefan Weil

Am 24.11.2013 17:48, schrieb Michael S. Tsirkin:

Quoted 50 lines · Michael S. Tsirkin
Quoted 49 lines · Stefan Weil
Quoted 48 lines

Am 24.11.2013 14:42, schrieb Michael S. Tsirkin:

Quoted 36 lines · Marcel Apfelbaum
Quoted 35 lines · Michael S. Tsirkin
Quoted 20 lines

Useful for platforms with a broken IASL.

---
 configure | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
configure +1 -0
index 0592ba7..d0a0abe 100755
@@ -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]"

configure else · line 4276

Quoted 8 lines
configure +1 -1
@@ -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)

Quoted 8 lines
Quoted 2 lines

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=.

Quoted 8 lines
Quoted 5 lines
Quoted 1 line

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).

Quoted 6 lines

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.

Quoted 4 lines

echo " --host-cc=CC use C compiler CC [$host_cc] for code run at"

Stefan

#8 lore raw
Quoted 76 lines · Michael S. Tsirkin
Quoted 66 lines · Stefan Weil

Am 24.11.2013 17:48, schrieb Michael S. Tsirkin:

Quoted 50 lines · Michael S. Tsirkin
Quoted 49 lines · Stefan Weil
Quoted 48 lines

Am 24.11.2013 14:42, schrieb Michael S. Tsirkin:

Quoted 36 lines · Marcel Apfelbaum
Quoted 35 lines · Michael S. Tsirkin
Quoted 20 lines

Useful for platforms with a broken IASL.

---
 configure | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
configure +1 -0
index 0592ba7..d0a0abe 100755
@@ -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]"

configure else · line 4276

Quoted 8 lines
configure +1 -1
@@ -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)

Quoted 8 lines
Quoted 2 lines

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=.

Quoted 8 lines
Quoted 5 lines
Quoted 1 line

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).

Quoted 6 lines

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.

Quoted 8 lines

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

Quoted 4 lines
Quoted 4 lines

echo " --host-cc=CC use C compiler CC [$host_cc] for code run at"

Stefan

#9 lore raw

Am 25.11.2013 14:54, schrieb Marcel Apfelbaum:

Quoted 32 lines · Michael S. Tsirkin
Quoted 31 lines · Stefan Weil
Quoted 17 lines
Quoted 11 lines
Quoted 8 lines
Quoted 4 lines

--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).

Quoted 6 lines

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.

Quoted 6 lines
Quoted 3 lines

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