All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCHv2][meta-browser 1/2] chromium: fix build with newer gcc
@ 2016-02-26 18:03 Martin Jansa
  2016-02-26 18:03 ` [PATCHv2][meta-browser 2/2] recipes: Replace "mv" with "cp -R --no-dereference --preserve=mode, links" Martin Jansa
  0 siblings, 1 reply; 3+ messages in thread
From: Martin Jansa @ 2016-02-26 18:03 UTC (permalink / raw)
  To: openembedded-devel

* for whatever reason setting -Wstrict-overflow just for problematic
  line doesn't work and it needs to be adjusted on function definition
* the errors are also report line number where the function starts not
  the specific line which causes that warning
../../third_party/WebKit/Source/wtf/dtoa/bignum.cc: In member function 'void WTF::double_conversion::Bignum::Align(const WTF::double_conversion::Bignum&)':
../../third_party/WebKit/Source/wtf/dtoa/bignum.cc:715:31: error: assuming signed overflow does not occur when simplifying conditional to constant [-Werror=strict-overflow]
             for (int i = 0; i < zero_digits; ++i) {
                               ^
../../third_party/WebKit/Source/wtf/dtoa/bignum.cc:715:31: error: assuming signed overflow does not occur when simplifying conditional to constant [-Werror=strict-overflow]
../../third_party/WebKit/Source/wtf/dtoa/bignum.cc: In member function 'void WTF::double_conversion::Bignum::AssignDecimalString(WTF::double_conversion::Vector<const char>)':
../../third_party/WebKit/Source/wtf/dtoa/bignum.cc:105:10: error: assuming signed overflow does not occur when assuming that (X + c) < X is always false [-Werror=strict-overflow]
     void Bignum::AssignDecimalString(Vector<const char> value) {
          ^

../../ui/gfx/image/image_util.cc: In function 'bool gfx::VisibleMargins(const gfx::ImageSkia&, int*, int*)':
../../ui/gfx/image/image_util.cc:50:6: error: assuming signed overflow does not occur when assuming that (X - c) <= X is always true [-Werror=strict-overflow]
 bool VisibleMargins(const ImageSkia& image, int* leading, int* trailing) {
      ^

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 ...0001-bignum.cc-disable-warning-from-gcc-5.patch | 39 +++++++++++++++++-----
 ...-image_util.cc-disable-warning-from-gcc-5.patch | 17 +++++-----
 2 files changed, 38 insertions(+), 18 deletions(-)

diff --git a/recipes-browser/chromium/chromium/chromium-40/0001-bignum.cc-disable-warning-from-gcc-5.patch b/recipes-browser/chromium/chromium/chromium-40/0001-bignum.cc-disable-warning-from-gcc-5.patch
index 4a28bda..86691a5 100644
--- a/recipes-browser/chromium/chromium/chromium-40/0001-bignum.cc-disable-warning-from-gcc-5.patch
+++ b/recipes-browser/chromium/chromium/chromium-40/0001-bignum.cc-disable-warning-from-gcc-5.patch
@@ -23,17 +23,38 @@ diff --git a/third_party/WebKit/Source/wtf/dtoa/bignum.cc b/third_party/WebKit/S
 index a000b46..6c6d336 100644
 --- a/third_party/WebKit/Source/wtf/dtoa/bignum.cc
 +++ b/third_party/WebKit/Source/wtf/dtoa/bignum.cc
-@@ -109,7 +109,10 @@ namespace double_conversion {
-         int length = value.length();
-         int pos = 0;
-         // Let's just say that each digit needs 4 bits.
+@@ -102,7 +102,10 @@
+     }
+ 
+ 
 +#pragma GCC diagnostic push
 +#pragma GCC diagnostic warning "-Wstrict-overflow"
-         while (length >= kMaxUint64DecimalDigits) {
+     void Bignum::AssignDecimalString(Vector<const char> value) {
 +#pragma GCC diagnostic pop
-             uint64_t digits = ReadUInt64(value, pos, kMaxUint64DecimalDigits);
-             pos += kMaxUint64DecimalDigits;
-             length -= kMaxUint64DecimalDigits;
+         // 2^64 = 18446744073709551616 > 10^19
+         const int kMaxUint64DecimalDigits = 19;
+         Zero();
+@@ -699,7 +699,10 @@
+     }
+
+
++#pragma GCC diagnostic push
++#pragma GCC diagnostic warning "-Wstrict-overflow"
+     void Bignum::Align(const Bignum& other) {
++#pragma GCC diagnostic pop
+         if (exponent_ > other.exponent_) {
+             // If "X" represents a "hidden" digit (by the exponent) then we are in the
+             // following case (a == this, b == other):
+@@ -715,7 +715,10 @@
+             for (int i = used_digits_ - 1; i >= 0; --i) {
+                 bigits_[i + zero_digits] = bigits_[i];
+             }
++#pragma GCC diagnostic push
++#pragma GCC diagnostic warning "-Wstrict-overflow"
+             for (int i = 0; i < zero_digits; ++i) {
++#pragma GCC diagnostic pop
+                 bigits_[i] = 0;
+             }
+             used_digits_ += zero_digits;
 -- 
 1.8.4.5
-
diff --git a/recipes-browser/chromium/chromium/chromium-40/0002-image_util.cc-disable-warning-from-gcc-5.patch b/recipes-browser/chromium/chromium/chromium-40/0002-image_util.cc-disable-warning-from-gcc-5.patch
index 7023233..1825a85 100644
--- a/recipes-browser/chromium/chromium/chromium-40/0002-image_util.cc-disable-warning-from-gcc-5.patch
+++ b/recipes-browser/chromium/chromium/chromium-40/0002-image_util.cc-disable-warning-from-gcc-5.patch
@@ -24,17 +24,16 @@ diff --git a/ui/gfx/image/image_util.cc b/ui/gfx/image/image_util.cc
 index 89a3f8c..d595da3 100644
 --- a/ui/gfx/image/image_util.cc
 +++ b/ui/gfx/image/image_util.cc
-@@ -68,7 +68,10 @@ bool VisibleMargins(const ImageSkia& image, int* leading, int* trailing) {
-   int inner_min = bitmap.width();
-   for (int x = 0; x < bitmap.width(); ++x) {
-     for (int y = 0; y < bitmap.height(); ++y) {
+@@ -47,7 +47,10 @@
+ }
+ #endif  // !defined(OS_IOS)
+ 
 +#pragma GCC diagnostic push
 +#pragma GCC diagnostic warning "-Wstrict-overflow"
-       if (SkColorGetA(bitmap.getColor(x, y)) > kMinimumVisibleOpacity) {
+ bool VisibleMargins(const ImageSkia& image, int* leading, int* trailing) {
 +#pragma GCC diagnostic pop
-         inner_min = x;
-         break;
-       }
+   *leading = 0;
+   *trailing = std::max(1, image.width()) - 1;
+   if (!image.HasRepresentation(1.0))
 -- 
 1.8.4.5
-
-- 
2.7.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCHv2][meta-browser 2/2] recipes: Replace "mv" with "cp -R --no-dereference --preserve=mode, links"
  2016-02-26 18:03 [PATCHv2][meta-browser 1/2] chromium: fix build with newer gcc Martin Jansa
@ 2016-02-26 18:03 ` Martin Jansa
  2016-02-26 19:20   ` Khem Raj
  0 siblings, 1 reply; 3+ messages in thread
From: Martin Jansa @ 2016-02-26 18:03 UTC (permalink / raw)
  To: openembedded-devel

* Using "cp -a" leaks UID of user running the builds, causing
  many QA warnings.
* See this thread for details:
  http://lists.openembedded.org/pipermail/openembedded-core/2015-November/112904.html

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 recipes-mozilla/firefox-addon/firefox-addon.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/recipes-mozilla/firefox-addon/firefox-addon.inc b/recipes-mozilla/firefox-addon/firefox-addon.inc
index a886201..88dd5aa 100644
--- a/recipes-mozilla/firefox-addon/firefox-addon.inc
+++ b/recipes-mozilla/firefox-addon/firefox-addon.inc
@@ -30,7 +30,7 @@ do_install() {
         [ -z "$EXTENSION" ] && exit 1
 
         mkdir -p ${D}${libdir}/firefox/extensions/
-        mv $e ${D}${libdir}/firefox/extensions/${EXTENSION}
+        cp -R --no-dereference --preserve=mode,links -v $e ${D}${libdir}/firefox/extensions/${EXTENSION}
     done
 }
 
-- 
2.7.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCHv2][meta-browser 2/2] recipes: Replace "mv" with "cp -R --no-dereference --preserve=mode, links"
  2016-02-26 18:03 ` [PATCHv2][meta-browser 2/2] recipes: Replace "mv" with "cp -R --no-dereference --preserve=mode, links" Martin Jansa
@ 2016-02-26 19:20   ` Khem Raj
  0 siblings, 0 replies; 3+ messages in thread
From: Khem Raj @ 2016-02-26 19:20 UTC (permalink / raw)
  To: openembeded-devel

[-- Attachment #1: Type: text/plain, Size: 1354 bytes --]


> On Feb 26, 2016, at 10:03 AM, Martin Jansa <martin.jansa@gmail.com> wrote:
> 
> * Using "cp -a" leaks UID of user running the builds, causing
>  many QA warnings.
> * See this thread for details:
>  http://lists.openembedded.org/pipermail/openembedded-core/2015-November/112904.html
> 
> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
> ---
> recipes-mozilla/firefox-addon/firefox-addon.inc | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/recipes-mozilla/firefox-addon/firefox-addon.inc b/recipes-mozilla/firefox-addon/firefox-addon.inc
> index a886201..88dd5aa 100644
> --- a/recipes-mozilla/firefox-addon/firefox-addon.inc
> +++ b/recipes-mozilla/firefox-addon/firefox-addon.inc
> @@ -30,7 +30,7 @@ do_install() {
>         [ -z "$EXTENSION" ] && exit 1
> 
>         mkdir -p ${D}${libdir}/firefox/extensions/
> -        mv $e ${D}${libdir}/firefox/extensions/${EXTENSION}
> +        cp -R --no-dereference --preserve=mode,links -v $e ${D}${libdir}/firefox/extensions/${EXTENSION}

can we use install utility to have better control over perms

>     done
> }
> 
> --
> 2.7.1
> 
> --
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel


[-- Attachment #2: Message signed with OpenPGP using GPGMail --]
[-- Type: application/pgp-signature, Size: 211 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-02-26 19:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-26 18:03 [PATCHv2][meta-browser 1/2] chromium: fix build with newer gcc Martin Jansa
2016-02-26 18:03 ` [PATCHv2][meta-browser 2/2] recipes: Replace "mv" with "cp -R --no-dereference --preserve=mode, links" Martin Jansa
2016-02-26 19:20   ` Khem Raj

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.