diff options
Diffstat (limited to 'meta/recipes-support/libsoup/files/fix-compiling-failed-while-mips-gcc-optimization-enabled.patch')
| -rw-r--r-- | meta/recipes-support/libsoup/files/fix-compiling-failed-while-mips-gcc-optimization-enabled.patch | 95 |
1 files changed, 95 insertions, 0 deletions
diff --git a/meta/recipes-support/libsoup/files/fix-compiling-failed-while-mips-gcc-optimization-enabled.patch b/meta/recipes-support/libsoup/files/fix-compiling-failed-while-mips-gcc-optimization-enabled.patch new file mode 100644 index 0000000000..346964261d --- /dev/null +++ b/meta/recipes-support/libsoup/files/fix-compiling-failed-while-mips-gcc-optimization-enabled.patch | |||
| @@ -0,0 +1,95 @@ | |||
| 1 | test/header-parsing.c: fix compiling failed while mips-gcc optimization enabled | ||
| 2 | |||
| 3 | There was an error about mips-gcc optimization while compiling | ||
| 4 | libsoup-2.4 2.45.3 with DEBUG_OPTIMIZATION enabled. | ||
| 5 | |||
| 6 | The test code of libsoup-2.4 2.45.3 triggered gcc assert which located | ||
| 7 | in gcc/dwarf2out.c:20810: | ||
| 8 | ... | ||
| 9 | 20806 gcc_assert (prev | ||
| 10 | 20807 && (CALL_P (prev) | ||
| 11 | 20808 || (NONJUMP_INSN_P (prev) | ||
| 12 | 20809 && GET_CODE (PATTERN (prev)) == SEQUENCE | ||
| 13 | 20810 && CALL_P (XVECEXP (PATTERN (prev), 0, 0))))); | ||
| 14 | ... | ||
| 15 | |||
| 16 | The issue test code is the C function 'do_qvalue_tests' located in | ||
| 17 | tests/header-parsing.c. | ||
| 18 | |||
| 19 | The 2.45.92 have refactored the test code and this issue has been fixed. | ||
| 20 | So backport the fix to 2.45.3. | ||
| 21 | |||
| 22 | Upstream-Status: backport | ||
| 23 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
| 24 | --- | ||
| 25 | tests/header-parsing.c | 28 ++-------------------------- | ||
| 26 | 1 file changed, 2 insertions(+), 26 deletions(-) | ||
| 27 | |||
| 28 | diff --git a/tests/header-parsing.c b/tests/header-parsing.c | ||
| 29 | index 5b2950f..00f5a4e 100644 | ||
| 30 | --- a/tests/header-parsing.c | ||
| 31 | +++ b/tests/header-parsing.c | ||
| 32 | @@ -896,9 +896,7 @@ do_qvalue_tests (void) | ||
| 33 | { | ||
| 34 | int i, j; | ||
| 35 | GSList *acceptable, *unacceptable, *iter; | ||
| 36 | - gboolean wrong; | ||
| 37 | |||
| 38 | - debug_printf (1, "qvalue tests\n"); | ||
| 39 | for (i = 0; i < num_qvaluetests; i++) { | ||
| 40 | debug_printf (1, "%2d. %s:\n", i + 1, qvaluetests[i].header_value); | ||
| 41 | |||
| 42 | @@ -907,48 +905,26 @@ do_qvalue_tests (void) | ||
| 43 | &unacceptable); | ||
| 44 | |||
| 45 | debug_printf (1, " acceptable: "); | ||
| 46 | - wrong = FALSE; | ||
| 47 | if (acceptable) { | ||
| 48 | for (iter = acceptable, j = 0; iter; iter = iter->next, j++) { | ||
| 49 | debug_printf (1, "%s ", (char *)iter->data); | ||
| 50 | - if (!qvaluetests[i].acceptable[j] || | ||
| 51 | - strcmp (iter->data, qvaluetests[i].acceptable[j]) != 0) | ||
| 52 | - wrong = TRUE; | ||
| 53 | + g_assert_cmpstr (iter->data, ==, qvaluetests[i].acceptable[j]); | ||
| 54 | } | ||
| 55 | debug_printf (1, "\n"); | ||
| 56 | soup_header_free_list (acceptable); | ||
| 57 | } else | ||
| 58 | debug_printf (1, "(none)\n"); | ||
| 59 | - if (wrong) { | ||
| 60 | - debug_printf (1, " WRONG! expected: "); | ||
| 61 | - for (j = 0; qvaluetests[i].acceptable[j]; j++) | ||
| 62 | - debug_printf (1, "%s ", qvaluetests[i].acceptable[j]); | ||
| 63 | - debug_printf (1, "\n"); | ||
| 64 | - errors++; | ||
| 65 | - } | ||
| 66 | |||
| 67 | debug_printf (1, " unacceptable: "); | ||
| 68 | - wrong = FALSE; | ||
| 69 | if (unacceptable) { | ||
| 70 | for (iter = unacceptable, j = 0; iter; iter = iter->next, j++) { | ||
| 71 | debug_printf (1, "%s ", (char *)iter->data); | ||
| 72 | - if (!qvaluetests[i].unacceptable[j] || | ||
| 73 | - strcmp (iter->data, qvaluetests[i].unacceptable[j]) != 0) | ||
| 74 | - wrong = TRUE; | ||
| 75 | + g_assert_cmpstr (iter->data, ==, qvaluetests[i].unacceptable[j]); | ||
| 76 | } | ||
| 77 | debug_printf (1, "\n"); | ||
| 78 | soup_header_free_list (unacceptable); | ||
| 79 | } else | ||
| 80 | debug_printf (1, "(none)\n"); | ||
| 81 | - if (wrong) { | ||
| 82 | - debug_printf (1, " WRONG! expected: "); | ||
| 83 | - for (j = 0; qvaluetests[i].unacceptable[j]; j++) | ||
| 84 | - debug_printf (1, "%s ", qvaluetests[i].unacceptable[j]); | ||
| 85 | - debug_printf (1, "\n"); | ||
| 86 | - errors++; | ||
| 87 | - } | ||
| 88 | - | ||
| 89 | - debug_printf (1, "\n"); | ||
| 90 | } | ||
| 91 | } | ||
| 92 | |||
| 93 | -- | ||
| 94 | 1.7.9.5 | ||
| 95 | |||
