configure/fdt: Use more strict test for libfdt version
PATCH 1/1 configure/fdt: Use more strict test for libfdt version
The libfdt installed in the system is preferred to the dtc submodule by default. The recent libfdt update added a new symbol - fdt_check_full - and this breaks compile if there is an older libfdt installed in the system.
This changes the test to force ./configure into using newer libfdt.
--- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
configure +1 -1
@@ -3826,7 +3826,7 @@ if test "$fdt" != "no" ; then cat > $TMPC << EOF #include <libfdt.h> #include <libfdt_env.h> -int main(void) { fdt_first_subnode(0, 0); return 0; } +int main(void) { fdt_check_full(NULL, 0); return 0; } EOF if compile_prog "" "$fdt_libs" ; then # system DTC is good - use it
Signature · 1 line
2.17.1
Quoted 4 lines · Alexey Kardashevskiy
The libfdt installed in the system is preferred to the dtc submodule by default. The recent libfdt update added a new symbol -
fdt_check_full- and this breaks compile if there is an older libfdt installed in the system.
Unless I'm missing something, QEMU doesn't use the fdt_check_full symbol, so why would the lack of this symbol cause a compile failure.
It should be fine if the dtc submodule contains a newer libfdt than the host system. As long as QEMU doesn't actually need any of the APIs in the newer libfdt we should be able to continue using the older system version if it is present.
Could you elaborate on what build problems you are having.
Quoted 1 line
This changes the test to force ./configure into using newer libfdt.
I'm not convinced we want todo that.
Quoted 11 lines
Signed-off-by Alexey Kardashevskiy <[email protected]>--- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)configure +0
-0
configure if test "$fdt" != "no" ; then · line 3832
Quoted 8 lines
configure +1
-1@@ -3826,7 +3826,7 @@ if test "$fdt" != "no" ; then cat > $TMPC << EOF #include <libfdt.h> #include <libfdt_env.h> -int main(void) { fdt_first_subnode(0, 0); return 0; } +int main(void) { fdt_check_full(NULL, 0); return 0; } EOF if compile_prog "" "$fdt_libs" ; then # system DTC is good - use it
Regards,
Daniel
Signature · 3 lines
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
Quoted 14 lines · Daniel P. Berrangé
Quoted 4 lines · Alexey Kardashevskiy
The libfdt installed in the system is preferred to the dtc submodule by default. The recent libfdt update added a new symbol -
fdt_check_full- and this breaks compile if there is an older libfdt installed in the system.Unless I'm missing something, QEMU doesn't use the
fdt_check_fullsymbol, so why would the lack of this symbol cause a compile failure.It should be fine if the dtc submodule contains a newer libfdt than the host system. As long as QEMU doesn't actually need any of the APIs in the newer libfdt we should be able to continue using the older system version if it is present.
Quoted 5 lines
Could you elaborate on what build problems you are having.
Quoted 1 line
This changes the test to force ./configure into using newer libfdt.
I'm not convinced we want todo that.
So I think the point here is that Alexey has some other outstanding patches that will use fdt_check_full(). The commit message needs to make that clear though. Or else include this patch in that series.
Quoted 23 lines
Quoted 12 lines
Signed-off-by Alexey Kardashevskiy <[email protected]>--- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)configure +0
-0configure if test "$fdt" != "no" ; then · line 3832
Quoted 8 lines
configure +1
-1@@ -3826,7 +3826,7 @@ if test "$fdt" != "no" ; then cat > $TMPC << EOF #include <libfdt.h> #include <libfdt_env.h> -int main(void) { fdt_first_subnode(0, 0); return 0; } +int main(void) { fdt_check_full(NULL, 0); return 0; } EOF if compile_prog "" "$fdt_libs" ; then # system DTC is good - use itRegards,
Daniel
Signature · 4 lines
David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson
Quoted 17 lines · David Gibson
Quoted 16 lines · Daniel P. Berrangé
Quoted 4 lines · Alexey Kardashevskiy
The libfdt installed in the system is preferred to the dtc submodule by default. The recent libfdt update added a new symbol -
fdt_check_full- and this breaks compile if there is an older libfdt installed in the system.Unless I'm missing something, QEMU doesn't use the
fdt_check_fullsymbol, so why would the lack of this symbol cause a compile failure.It should be fine if the dtc submodule contains a newer libfdt than the host system. As long as QEMU doesn't actually need any of the APIs in the newer libfdt we should be able to continue using the older system version if it is present.
Could you elaborate on what build problems you are having.
Quoted 7 lines
Quoted 3 lines
Quoted 1 line
This changes the test to force ./configure into using newer libfdt.
I'm not convinced we want todo that.
So I think the point here is that Alexey has some other outstanding patches that will use
fdt_check_full(). The commit message needs to make that clear though. Or else include this patch in that series.
If they're not merged yet, this patch should be squashed into whichever of those patches first introduces the need for fdt_check_full(), so that series remains fully git bisectable.
Regards,
Daniel
Signature · 3 lines
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|