diff options
author | Joerg Bornemann <joerg.bornemann@digia.com> | 2012-11-22 14:10:43 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2012-11-22 14:58:19 +0100 |
commit | 9eefa9fb9a5424d56f8fcf35b45ee99e20dc87f2 (patch) | |
tree | 72d07e5574dde6b57b0f4225ee01e93ecf2494c2 | |
parent | 471842d8f4cd096ce426723dac19c293421ae61a (diff) | |
download | qt5-9eefa9fb9a5424d56f8fcf35b45ee99e20dc87f2.tar.gz |
Fix parallel builds in WebKit
The parallel builds aborts because parallel execution of flex breaks
due to the usage of the same temporary file names. This stems from
using a hard coded temp file name "~flex_temp_out_main" and
"random numbers" based on constants in mkstempFILE.
Fixing those issues by embedding the current PID into the temp file
names. Patch is in gnuwin32/patches/win_flex.patch
Change-Id: I6c0cd499b3c9c35128280ec0fee5e450a9ca097f
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
-rw-r--r-- | gnuwin32/bin/win_flex.exe | bin | 528384 -> 547328 bytes | |||
-rw-r--r-- | gnuwin32/patches/win_flex.patch | 47 |
2 files changed, 47 insertions, 0 deletions
diff --git a/gnuwin32/bin/win_flex.exe b/gnuwin32/bin/win_flex.exe Binary files differindex 39ef9a60..bdad3117 100644 --- a/gnuwin32/bin/win_flex.exe +++ b/gnuwin32/bin/win_flex.exe diff --git a/gnuwin32/patches/win_flex.patch b/gnuwin32/patches/win_flex.patch new file mode 100644 index 00000000..27d1e936 --- /dev/null +++ b/gnuwin32/patches/win_flex.patch @@ -0,0 +1,47 @@ +Index: flex/src/main.c +=================================================================== +--- flex/src/main.c (revision 24) ++++ flex/src/main.c (working copy) +@@ -112,7 +112,7 @@ + struct yytbl_writer tableswr; + + int prev_stdout = 0; +-char *flex_temp_out_main="~flex_temp_out_main"; ++char *flex_temp_out_main = 0; + + /* Make sure program_name is initialized so we don't crash if writing + * out an error message before getting the program name from argv[0]. +@@ -767,6 +767,8 @@ + tblsiz); + } + ++ free (flex_temp_out_main); ++ flex_temp_out_main = 0; + exit (exit_status); + } + +@@ -779,8 +781,10 @@ + { + int i, sawcmpflag, rv, optind; + char *arg; ++ char flex_temp_out_main_template[] = "~flex_temp_out_main_XXXXXX"; + scanopt_t sopt; + ++ flex_temp_out_main = _strdup(_mktemp(flex_temp_out_main_template)); + printstats = syntaxerror = trace = spprdflt = false; + lex_compat = posix_compat = C_plus_plus = backing_up_report = + ddebug = fulltbl = false; +Index: flex/src/filter.c +=================================================================== +--- flex/src/filter.c (revision 24) ++++ flex/src/filter.c (working copy) +@@ -86,7 +86,8 @@ + + /* Get some more or less random data. */ + { +- static unsigned long long g_value = 827363; ++ static unsigned long long g_value; ++ g_value = _getpid(); + g_value += 100; + random_time_bits = (((unsigned long long)234546 << 32) + | (unsigned long long)g_value); |