[oe-commits] [meta-openembedded] 08/12: nodejs: use OE-provided compiler flags (arm)

git at git.openembedded.org git at git.openembedded.org
Mon Nov 11 16:06:25 UTC 2019


This is an automated email from the git hooks/post-receive script.

khem pushed a commit to branch master-next
in repository meta-openembedded.

commit 80a1f1dd66523094aef410867f495f6fbc2f8ccc
Author: André Draszik <git at andred.net>
AuthorDate: Sun Nov 10 22:05:09 2019 +0000

    nodejs: use OE-provided compiler flags (arm)
    
    This overrides yocto-provided build flags with its own, e.g we get
        arm-poky-linux-musleabi-g++  -mthumb -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a7 \
                                     ... \
                                      -march=armv7-a -mfpu=neon -mfloat-abi=hard -marm
    
    Causing the latter to override the former, and compiler warnings:
        cc1plus: warning: switch '-mcpu=cortex-a7' conflicts with '-march=armv7-a' switch
    
    Patch this out, so that yocto-provided flags take precedence.
    Note that in reality the same should probably be done for all the other
    supported architectures, too.
    
    Note that this also switches to Thumb(2) mode (in my case). No obvious
    problems have been noted during compilation or runtime.
    
    Upstream-Status: Inappropriate [oe-specific]
    Signed-off-by: André Draszik <git at andred.net>
    Signed-off-by: Khem Raj <raj.khem at gmail.com>
---
 .../nodejs/0007-v8-don-t-override-ARM-CFLAGS.patch | 102 +++++++++++++++++++++
 meta-oe/recipes-devtools/nodejs/nodejs_10.17.0.bb  |   1 +
 2 files changed, 103 insertions(+)

diff --git a/meta-oe/recipes-devtools/nodejs/nodejs/0007-v8-don-t-override-ARM-CFLAGS.patch b/meta-oe/recipes-devtools/nodejs/nodejs/0007-v8-don-t-override-ARM-CFLAGS.patch
new file mode 100644
index 0000000..eb2cbfb
--- /dev/null
+++ b/meta-oe/recipes-devtools/nodejs/nodejs/0007-v8-don-t-override-ARM-CFLAGS.patch
@@ -0,0 +1,102 @@
+From 47ee5cc5501289205d3e8e9f27ea9daf18cebac1 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <git at andred.net>
+Date: Sat, 9 Nov 2019 14:45:30 +0000
+Subject: [PATCH] v8: don't override ARM CFLAGS
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+This overrides yocto-provided build flags with its own, e.g we get
+    arm-poky-linux-musleabi-g++  -mthumb -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a7 \
+                                 ... \
+                                  -march=armv7-a -mfpu=neon -mfloat-abi=hard -marm
+
+Causing the latter to override the former, and compiler warnings:
+    cc1plus: warning: switch '-mcpu=cortex-a7' conflicts with '-march=armv7-a' switch
+
+Patch this out, so that yocto-provided flags take precedence.
+Note that in reality the same should probably be done for all the other
+supported architectures, too.
+
+Note that this also switches to Thumb(2) mode (in my case). No obvious
+problems have been noted during compilation or runtime.
+
+Upstream-Status: Inappropriate [oe-specific]
+Signed-off-by: André Draszik <git at andred.net>
+---
+ deps/v8/gypfiles/toolchain.gypi | 52 ++-------------------------------
+ 1 file changed, 2 insertions(+), 50 deletions(-)
+
+diff --git a/deps/v8/gypfiles/toolchain.gypi b/deps/v8/gypfiles/toolchain.gypi
+index 910a212..1390b15 100644
+--- a/deps/v8/gypfiles/toolchain.gypi
++++ b/deps/v8/gypfiles/toolchain.gypi
+@@ -199,31 +199,7 @@
+         'target_conditions': [
+           ['_toolset=="host"', {
+             'conditions': [
+-              ['v8_target_arch==host_arch', {
+-                # Host built with an Arm CXX compiler.
+-                'conditions': [
+-                  [ 'arm_version==7', {
+-                    'cflags': ['-march=armv7-a',],
+-                  }],
+-                  [ 'arm_version==7 or arm_version=="default"', {
+-                    'conditions': [
+-                      [ 'arm_fpu!="default"', {
+-                        'cflags': ['-mfpu=<(arm_fpu)',],
+-                      }],
+-                    ],
+-                  }],
+-                  [ 'arm_float_abi!="default"', {
+-                    'cflags': ['-mfloat-abi=<(arm_float_abi)',],
+-                  }],
+-                  [ 'arm_thumb==1', {
+-                    'cflags': ['-mthumb',],
+-                  }],
+-                  [ 'arm_thumb==0', {
+-                    'cflags': ['-marm',],
+-                  }],
+-                ],
+-              }, {
+-                # 'v8_target_arch!=host_arch'
++              ['v8_target_arch!=host_arch', {
+                 # Host not built with an Arm CXX compiler (simulator build).
+                 'conditions': [
+                   [ 'arm_float_abi=="hard"', {
+@@ -242,31 +218,7 @@
+           }],  # _toolset=="host"
+           ['_toolset=="target"', {
+             'conditions': [
+-              ['v8_target_arch==target_arch', {
+-                # Target built with an Arm CXX compiler.
+-                'conditions': [
+-                  [ 'arm_version==7', {
+-                    'cflags': ['-march=armv7-a',],
+-                  }],
+-                  [ 'arm_version==7 or arm_version=="default"', {
+-                    'conditions': [
+-                      [ 'arm_fpu!="default"', {
+-                        'cflags': ['-mfpu=<(arm_fpu)',],
+-                      }],
+-                    ],
+-                  }],
+-                  [ 'arm_float_abi!="default"', {
+-                    'cflags': ['-mfloat-abi=<(arm_float_abi)',],
+-                  }],
+-                  [ 'arm_thumb==1', {
+-                    'cflags': ['-mthumb',],
+-                  }],
+-                  [ 'arm_thumb==0', {
+-                    'cflags': ['-marm',],
+-                  }],
+-                ],
+-              }, {
+-                # 'v8_target_arch!=target_arch'
++              ['v8_target_arch!=target_arch', {
+                 # Target not built with an Arm CXX compiler (simulator build).
+                 'conditions': [
+                   [ 'arm_float_abi=="hard"', {
+-- 
+2.23.0.rc1
+
diff --git a/meta-oe/recipes-devtools/nodejs/nodejs_10.17.0.bb b/meta-oe/recipes-devtools/nodejs/nodejs_10.17.0.bb
index 7c3728c..b189d22 100644
--- a/meta-oe/recipes-devtools/nodejs/nodejs_10.17.0.bb
+++ b/meta-oe/recipes-devtools/nodejs/nodejs_10.17.0.bb
@@ -19,6 +19,7 @@ SRC_URI = "http://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz \
            file://0001-Disable-running-gyp-files-for-bundled-deps.patch \
            file://0004-Make-compatibility-with-gcc-4.8.patch \
            file://0005-Link-atomic-library.patch \
+           file://0007-v8-don-t-override-ARM-CFLAGS.patch \
            "
 SRC_URI_append_class-target = " \
            file://0002-Using-native-torque.patch \

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list