diff options
| -rw-r--r-- | meta/recipes-support/libsoup/files/fix-compiling-failed-while-mips-gcc-optimization-enabled.patch | 95 | ||||
| -rw-r--r-- | meta/recipes-support/libsoup/libsoup-2.4_2.45.3.bb | 4 |
2 files changed, 98 insertions, 1 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 | |||
diff --git a/meta/recipes-support/libsoup/libsoup-2.4_2.45.3.bb b/meta/recipes-support/libsoup/libsoup-2.4_2.45.3.bb index b1199d8ce0..a3629c2292 100644 --- a/meta/recipes-support/libsoup/libsoup-2.4_2.45.3.bb +++ b/meta/recipes-support/libsoup/libsoup-2.4_2.45.3.bb | |||
| @@ -15,7 +15,9 @@ PACKAGECONFIG ??= "gnome" | |||
| 15 | PACKAGECONFIG[gnome] = "--with-gnome,--without-gnome" | 15 | PACKAGECONFIG[gnome] = "--with-gnome,--without-gnome" |
| 16 | 16 | ||
| 17 | SHRT_VER = "${@bb.data.getVar('PV',d,1).split('.')[0]}.${@bb.data.getVar('PV',d,1).split('.')[1]}" | 17 | SHRT_VER = "${@bb.data.getVar('PV',d,1).split('.')[0]}.${@bb.data.getVar('PV',d,1).split('.')[1]}" |
| 18 | SRC_URI = "${GNOME_MIRROR}/libsoup/${SHRT_VER}/libsoup-${PV}.tar.xz" | 18 | SRC_URI = "${GNOME_MIRROR}/libsoup/${SHRT_VER}/libsoup-${PV}.tar.xz \ |
| 19 | file://fix-compiling-failed-while-mips-gcc-optimization-enabled.patch \ | ||
| 20 | " | ||
| 19 | 21 | ||
| 20 | SRC_URI[md5sum] = "fe7ec04784c6b97c5f8ea963c8542f59" | 22 | SRC_URI[md5sum] = "fe7ec04784c6b97c5f8ea963c8542f59" |
| 21 | SRC_URI[sha256sum] = "6ac317b931efd2cff9cdea7122987acb3ecb0c32564a9441ba72e5cce021aa12" | 23 | SRC_URI[sha256sum] = "6ac317b931efd2cff9cdea7122987acb3ecb0c32564a9441ba72e5cce021aa12" |
