[PATCH] Flush the build data generated by configure into build_data.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The build_data.c is dynamically generated by configure, sometimes the
data may not be synchronized to the file build_data.c, as a result,
it will break the compilation process with the following error:

$ for i in {1..50} ; do make clean ; rm -rf gdb-10.2/ ; make warn ;\
[ $? -ne 0 ] && echo "TRY $i" && break ; done

...
ar: creating crashlib.a
  CXXLD  gdb
/usr/bin/ld: ../../crashlib.a(main.o): in function `dump_build_data':
/home/crash/main.c:1829: undefined reference to `build_command'
/usr/bin/ld: /home/crash/main.c:1830: undefined reference to `build_data'
collect2: error: ld returned 1 exit status
make[4]: *** [Makefile:1872: gdb] Error 1
make[3]: *** [Makefile:10072: all-gdb] Error 2
make[2]: *** [Makefile:860: all] Error 2
crash build failed

The fflush() will help flush the data into the build_data.c.

Signed-off-by: Lianbo Jiang <lijiang@xxxxxxxxxx>
Signed-off-by: Kazuhito Hagio <k-hagio-ab@xxxxxxx>
---
 configure.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/configure.c b/configure.c
index 51888519c18c..41d096bc56ca 100644
--- a/configure.c
+++ b/configure.c
@@ -1337,6 +1337,7 @@ make_build_data(char *target)
         pclose(fp1);
         pclose(fp2);
         pclose(fp3);
+	fflush(fp4);
 	fclose(fp4);
 }
 
-- 
2.20.1

--
Crash-utility mailing list
Crash-utility@xxxxxxxxxx
https://listman.redhat.com/mailman/listinfo/crash-utility




[Index of Archives]     [Fedora Development]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]

 

Powered by Linux