apt: Fix a latent bug exposed by gcc 4.7
PATCH 1/2 apt: Fix a latent bug exposed by gcc 4.7
Further Details are in patch itself
Signed-off-by Khem Raj <[email protected]>
--- .../apt/apt-0.7.14/remove-redeclaration.patch | 57 ++++++++++++++++++++ meta/recipes-devtools/apt/apt_0.7.14.bb | 6 ++- 2 files changed, 61 insertions(+), 2 deletions(-) create mode 100644 meta/recipes-devtools/apt/apt-0.7.14/remove-redeclaration.patch
meta/recipes-devtools/apt/apt-0.7.14/remove-redeclaration.patch new file +57 -0
@@ -0,0 +1,57 @@ +Fix build errors + +deb/deblistparser.cc: In member function 'virtual short unsigned int debListParser::VersionHash()': +deb/deblistparser.cc:212:13: error: redeclaration of 'char* I' +deb/deblistparser.cc:202:22: error: 'const char** I' previously declared here + +Upstream-Status: Backport +Signed-off-by: Khem Raj <[email protected]> +Index: apt-0.7.14/apt-pkg/deb/deblistparser.cc +=================================================================== +--- apt-0.7.14.orig/apt-pkg/deb/deblistparser.cc 2012-03-30 11:17:09.112456632 -0700 ++++ apt-0.7.14/apt-pkg/deb/deblistparser.cc 2012-03-30 11:25:40.484481643 -0700 +@@ -209,18 +209,18 @@ + /* Strip out any spaces from the text, this undoes dpkgs reformatting + of certain fields. dpkg also has the rather interesting notion of + reformatting depends operators < -> <= */ +- char *I = S; ++ char *J = S; + for (; Start != End; Start++) + { + if (isspace(*Start) == 0) +- *I++ = tolower(*Start); ++ *J++ = tolower(*Start); + if (*Start == '<' && Start[1] != '<' && Start[1] != '=') +- *I++ = '='; ++ *J++ = '='; + if (*Start == '>' && Start[1] != '>' && Start[1] != '=') +- *I++ = '='; ++ *J++ = '='; + } + +- Result = AddCRC16(Result,S,I - S); ++ Result = AddCRC16(Result,S,J - S); + } + + return Result; +Index: apt-0.7.14/cmdline/apt-get.cc +=================================================================== +--- apt-0.7.14.orig/cmdline/apt-get.cc 2012-03-30 11:28:56.048490824 -0700 ++++ apt-0.7.14/cmdline/apt-get.cc 2012-03-30 11:32:00.248499740 -0700 +@@ -1752,12 +1752,12 @@ + if ((*Cache)[I].Install() == false) + continue; + +- const char **J; +- for (J = CmdL.FileList + 1; *J != 0; J++) +- if (strcmp(*J,I.Name()) == 0) ++ const char **K; ++ for (K = CmdL.FileList + 1; *K != 0; J++) ++ if (strcmp(*K,I.Name()) == 0) + break; + +- if (*J == 0) { ++ if (*K == 0) { + List += string(I.Name()) + " "; + VersionsList += string(Cache[I].CandVersion) + "\n"; + }
meta/recipes-devtools/apt/apt_0.7.14.bb +4 -2
@@ -3,10 +3,12 @@ RDEPENDS_${PN} = "dpkg" LIC_FILES_CHKSUM = "file://COPYING.GPL;md5=0636e73ff0215e8d672dc4c32c317bb3" require apt.inc -PR = "r10" +PR = "r11" SRC_URI += "file://nodoc.patch \ - file://includes-fix.patch " + file://includes-fix.patch \ + file://remove-redeclaration.patch \ + " SRC_URI[md5sum] = "19efa18fb1ef20c58b9b44e94258b814" SRC_URI[sha256sum] = "8fc06effaf8a4e4333308eedcdc6840f1c8056f2e924210f151dfc076bcd4045"
Signature · 1 line
1.7.5.4
PATCH 2/2 gst-ffmpeg: Fix build with gcc 4.7
A cmp instruction with two constants is invalid, therefore 'g' constraint is not correct but must be "rm" instead.
Signed-off-by Khem Raj <[email protected]>
--- .../gst-ffmpeg-0.10.13/h264_qpel_mmx.patch | 57 ++++++++++++++++++++ .../gstreamer/gst-ffmpeg_0.10.13.bb | 3 +- 2 files changed, 59 insertions(+), 1 deletions(-) create mode 100644 meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/h264_qpel_mmx.patch
meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/h264_qpel_mmx.patch new file +57 -0
@@ -0,0 +1,57 @@ +Backport http://git.videolan.org/?p=ffmpeg.git;a=commitdiff;h=5f654897e325349dacf2546674e0510bb72ecb50;hp=250cebeb3b348c3da71f9972eb500d6005dc01f1 + +Fixes these errors on x86 + +libavcodec/x86/h264_qpel_mmx.c: Assembler messages: +libavcodec/x86/h264_qpel_mmx.c:1294: Error: operand type mismatch for `cmp' +libavcodec/x86/h264_qpel_mmx.c:1294: Error: operand type mismatch for `cmp' +libavcodec/x86/h264_qpel_mmx.c:1298: Error: operand type mismatch for `cmp' +libavcodec/x86/h264_qpel_mmx.c:1298: Error: operand type mismatch for `cmp' +libavcodec/x86/h264_qpel_mmx.c:964: Error: operand type mismatch for `cmp' +libavcodec/x86/h264_qpel_mmx.c:964: Error: operand type mismatch for `cmp' +libavcodec/x86/h264_qpel_mmx.c:964: Error: operand type mismatch for `cmp' +make[5]: *** [libavcodec/x86/dsputil_mmx.o] Error 1 + + +Signed-off-by: Khem Raj <[email protected]> +Upstream-status: Backport +Index: gst-ffmpeg-0.10.13/gst-libs/ext/libav/libavcodec/x86/h264_qpel_mmx.c +=================================================================== +--- gst-ffmpeg-0.10.13.orig/gst-libs/ext/libav/libavcodec/x86/h264_qpel_mmx.c 2012-03-30 11:39:41.324522051 -0700 ++++ gst-ffmpeg-0.10.13/gst-libs/ext/libav/libavcodec/x86/h264_qpel_mmx.c 2012-03-30 11:54:08.152564075 -0700 +@@ -398,7 +398,7 @@ + "2: \n\t"\ + \ + : "+a"(src), "+c"(dst)\ +- : "S"((x86_reg)srcStride), "D"((x86_reg)dstStride), "g"(h)\ ++ : "S"((x86_reg)srcStride), "D"((x86_reg)dstStride), "rm"(h)\ + : "memory"\ + );\ + src += 4-(h+5)*srcStride;\ +@@ -446,7 +446,7 @@ + QPEL_H264HV(%%mm3, %%mm4, %%mm5, %%mm0, %%mm1, %%mm2, 15*48)\ + "2: \n\t"\ + : "+a"(src)\ +- : "c"(tmp), "S"((x86_reg)srcStride), "g"(size)\ ++ : "c"(tmp), "S"((x86_reg)srcStride), "rm"(size)\ + : "memory"\ + );\ + tmp += 4;\ +@@ -823,7 +823,7 @@ + "2: \n\t"\ + \ + : "+a"(src), "+c"(dst)\ +- : "S"((x86_reg)srcStride), "D"((x86_reg)dstStride), "g"(h)\ ++ : "S"((x86_reg)srcStride), "D"((x86_reg)dstStride), "rm"(h)\ + : XMM_CLOBBERS("%xmm0", "%xmm1", "%xmm2", "%xmm3", \ + "%xmm4", "%xmm5", "%xmm6", "%xmm7",)\ + "memory"\ +@@ -878,7 +878,7 @@ + QPEL_H264HV_XMM(%%xmm3, %%xmm4, %%xmm5, %%xmm0, %%xmm1, %%xmm2, 15*48) + "2: \n\t" + : "+a"(src) +- : "c"(tmp), "S"((x86_reg)srcStride), "g"(size) ++ : "c"(tmp), "S"((x86_reg)srcStride), "rm"(size) + : XMM_CLOBBERS("%xmm0", "%xmm1", "%xmm2", "%xmm3", + "%xmm4", "%xmm5", "%xmm6", "%xmm7",) + "memory"
meta/recipes-multimedia/gstreamer/gst-ffmpeg_0.10.13.bb +2 -1
@@ -18,12 +18,13 @@ inherit autotools pkgconfig SRC_URI = "http://gstreamer.freedesktop.org/src/${BPN}/${BPN}-${PV}.tar.bz2 \ file://lower-rank.diff \ file://configure-fix.patch \ + file://h264_qpel_mmx.patch \ " SRC_URI[md5sum] = "7f5beacaf1312db2db30a026b36888c4" SRC_URI[sha256sum] = "76fca05b08e00134e3cb92fa347507f42cbd48ddb08ed3343a912def187fbb62" -PR = "r1" +PR = "r2" GSTREAMER_DEBUG ?= "--disable-debug" EXTRA_OECONF = "--with-ffmpeg-extra-configure=\"--target-os=linux\" ${GSTREAMER_DEBUG}"
Signature · 1 line
1.7.5.4
Quoted 81 lines · Khem Raj
Further Details are in patch itself
Signed-off-by Khem Raj<[email protected]>--- .../apt/apt-0.7.14/remove-redeclaration.patch | 57 ++++++++++++++++++++ meta/recipes-devtools/apt/apt_0.7.14.bb | 6 ++- 2 files changed, 61 insertions(+), 2 deletions(-)create mode 100644
meta/recipes-devtools/apt/apt-0.7.14/remove-redeclaration.patchmeta/recipes-devtools/apt/apt-0.7.14/remove-redeclaration.patch new file +57
-0@@ -0,0 +1,57 @@ +Fix build errors + +deb/deblistparser.cc: In member function 'virtual short unsigned int debListParser::VersionHash()': +deb/deblistparser.cc:212:13: error: redeclaration of 'char* I' +deb/deblistparser.cc:202:22: error: 'const char** I' previously declared here + +Upstream-Status: Backport +Signed-off-by: Khem Raj<[email protected]> +Index: apt-0.7.14/apt-pkg/deb/deblistparser.cc +=================================================================== +--- apt-0.7.14.orig/apt-pkg/deb/deblistparser.cc 2012-03-30 11:17:09.112456632 -0700 ++++ apt-0.7.14/apt-pkg/deb/deblistparser.cc 2012-03-30 11:25:40.484481643 -0700 +@@ -209,18 +209,18 @@ + /* Strip out any spaces from the text, this undoes dpkgs reformatting + of certain fields. dpkg also has the rather interesting notion of + reformatting depends operators< -> <= */ +- char *I = S; ++ char *J = S; + for (; Start != End; Start++) + { + if (isspace(*Start) == 0) +- *I++ = tolower(*Start); ++ *J++ = tolower(*Start); + if (*Start == '<'&& Start[1] != '<'&& Start[1] != '=') +- *I++ = '='; ++ *J++ = '='; + if (*Start == '>'&& Start[1] != '>'&& Start[1] != '=') +- *I++ = '='; ++ *J++ = '='; + } + +- Result = AddCRC16(Result,S,I - S); ++ Result = AddCRC16(Result,S,J - S); + } + + return Result; +Index: apt-0.7.14/cmdline/apt-get.cc +=================================================================== +--- apt-0.7.14.orig/cmdline/apt-get.cc 2012-03-30 11:28:56.048490824 -0700 ++++ apt-0.7.14/cmdline/apt-get.cc 2012-03-30 11:32:00.248499740 -0700 +@@ -1752,12 +1752,12 @@ + if ((*Cache)[I].Install() == false) + continue; + +- const char **J; +- for (J = CmdL.FileList + 1; *J != 0; J++) +- if (strcmp(*J,I.Name()) == 0) ++ const char **K; ++ for (K = CmdL.FileList + 1; *K != 0; J++) ++ if (strcmp(*K,I.Name()) == 0) + break; + +- if (*J == 0) { ++ if (*K == 0) { + List += string(I.Name()) + " "; + VersionsList += string(Cache[I].CandVersion) + "\n"; + }meta/recipes-devtools/apt/apt_0.7.14.bb +0
-1@@ -3,10 +3,12 @@ RDEPENDS_${PN} = "dpkg" LIC_FILES_CHKSUM = "file://COPYING.GPL;md5=0636e73ff0215e8d672dc4c32c317bb3" require apt.inc -PR = "r10"
meta/recipes-devtools/apt/apt_0.7.14.bb RDEPENDS_${PN} = "dpkg" · line 14
Quoted 10 lines
meta/recipes-devtools/apt/apt_0.7.14.bb +4
-1+PR = "r11" SRC_URI += "file://nodoc.patch \ - file://includes-fix.patch " + file://includes-fix.patch \ + file://remove-redeclaration.patch \ + " SRC_URI[md5sum] = "19efa18fb1ef20c58b9b44e94258b814" SRC_URI[sha256sum] = "8fc06effaf8a4e4333308eedcdc6840f1c8056f2e924210f151dfc076bcd4045"
Both patches merged into OE-Core
Thanks
Sau!