diff options
Diffstat (limited to 'meta-oe/recipes-devtools')
| -rw-r--r-- | meta-oe/recipes-devtools/nodejs/nodejs/0007-v8-don-t-override-ARM-CFLAGS.patch | 102 | ||||
| -rw-r--r-- | meta-oe/recipes-devtools/nodejs/nodejs_10.17.0.bb | 1 |
2 files changed, 103 insertions, 0 deletions
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 0000000000..eb2cbfb8b1 --- /dev/null +++ b/meta-oe/recipes-devtools/nodejs/nodejs/0007-v8-don-t-override-ARM-CFLAGS.patch | |||
| @@ -0,0 +1,102 @@ | |||
| 1 | From 47ee5cc5501289205d3e8e9f27ea9daf18cebac1 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <git@andred.net> | ||
| 3 | Date: Sat, 9 Nov 2019 14:45:30 +0000 | ||
| 4 | Subject: [PATCH] v8: don't override ARM CFLAGS | ||
| 5 | MIME-Version: 1.0 | ||
| 6 | Content-Type: text/plain; charset=UTF-8 | ||
| 7 | Content-Transfer-Encoding: 8bit | ||
| 8 | |||
| 9 | This overrides yocto-provided build flags with its own, e.g we get | ||
| 10 | arm-poky-linux-musleabi-g++ -mthumb -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a7 \ | ||
| 11 | ... \ | ||
| 12 | -march=armv7-a -mfpu=neon -mfloat-abi=hard -marm | ||
| 13 | |||
| 14 | Causing the latter to override the former, and compiler warnings: | ||
| 15 | cc1plus: warning: switch '-mcpu=cortex-a7' conflicts with '-march=armv7-a' switch | ||
| 16 | |||
| 17 | Patch this out, so that yocto-provided flags take precedence. | ||
| 18 | Note that in reality the same should probably be done for all the other | ||
| 19 | supported architectures, too. | ||
| 20 | |||
| 21 | Note that this also switches to Thumb(2) mode (in my case). No obvious | ||
| 22 | problems have been noted during compilation or runtime. | ||
| 23 | |||
| 24 | Upstream-Status: Inappropriate [oe-specific] | ||
| 25 | Signed-off-by: André Draszik <git@andred.net> | ||
| 26 | --- | ||
| 27 | deps/v8/gypfiles/toolchain.gypi | 52 ++------------------------------- | ||
| 28 | 1 file changed, 2 insertions(+), 50 deletions(-) | ||
| 29 | |||
| 30 | diff --git a/deps/v8/gypfiles/toolchain.gypi b/deps/v8/gypfiles/toolchain.gypi | ||
| 31 | index 910a212..1390b15 100644 | ||
| 32 | --- a/deps/v8/gypfiles/toolchain.gypi | ||
| 33 | +++ b/deps/v8/gypfiles/toolchain.gypi | ||
| 34 | @@ -199,31 +199,7 @@ | ||
| 35 | 'target_conditions': [ | ||
| 36 | ['_toolset=="host"', { | ||
| 37 | 'conditions': [ | ||
| 38 | - ['v8_target_arch==host_arch', { | ||
| 39 | - # Host built with an Arm CXX compiler. | ||
| 40 | - 'conditions': [ | ||
| 41 | - [ 'arm_version==7', { | ||
| 42 | - 'cflags': ['-march=armv7-a',], | ||
| 43 | - }], | ||
| 44 | - [ 'arm_version==7 or arm_version=="default"', { | ||
| 45 | - 'conditions': [ | ||
| 46 | - [ 'arm_fpu!="default"', { | ||
| 47 | - 'cflags': ['-mfpu=<(arm_fpu)',], | ||
| 48 | - }], | ||
| 49 | - ], | ||
| 50 | - }], | ||
| 51 | - [ 'arm_float_abi!="default"', { | ||
| 52 | - 'cflags': ['-mfloat-abi=<(arm_float_abi)',], | ||
| 53 | - }], | ||
| 54 | - [ 'arm_thumb==1', { | ||
| 55 | - 'cflags': ['-mthumb',], | ||
| 56 | - }], | ||
| 57 | - [ 'arm_thumb==0', { | ||
| 58 | - 'cflags': ['-marm',], | ||
| 59 | - }], | ||
| 60 | - ], | ||
| 61 | - }, { | ||
| 62 | - # 'v8_target_arch!=host_arch' | ||
| 63 | + ['v8_target_arch!=host_arch', { | ||
| 64 | # Host not built with an Arm CXX compiler (simulator build). | ||
| 65 | 'conditions': [ | ||
| 66 | [ 'arm_float_abi=="hard"', { | ||
| 67 | @@ -242,31 +218,7 @@ | ||
| 68 | }], # _toolset=="host" | ||
| 69 | ['_toolset=="target"', { | ||
| 70 | 'conditions': [ | ||
| 71 | - ['v8_target_arch==target_arch', { | ||
| 72 | - # Target built with an Arm CXX compiler. | ||
| 73 | - 'conditions': [ | ||
| 74 | - [ 'arm_version==7', { | ||
| 75 | - 'cflags': ['-march=armv7-a',], | ||
| 76 | - }], | ||
| 77 | - [ 'arm_version==7 or arm_version=="default"', { | ||
| 78 | - 'conditions': [ | ||
| 79 | - [ 'arm_fpu!="default"', { | ||
| 80 | - 'cflags': ['-mfpu=<(arm_fpu)',], | ||
| 81 | - }], | ||
| 82 | - ], | ||
| 83 | - }], | ||
| 84 | - [ 'arm_float_abi!="default"', { | ||
| 85 | - 'cflags': ['-mfloat-abi=<(arm_float_abi)',], | ||
| 86 | - }], | ||
| 87 | - [ 'arm_thumb==1', { | ||
| 88 | - 'cflags': ['-mthumb',], | ||
| 89 | - }], | ||
| 90 | - [ 'arm_thumb==0', { | ||
| 91 | - 'cflags': ['-marm',], | ||
| 92 | - }], | ||
| 93 | - ], | ||
| 94 | - }, { | ||
| 95 | - # 'v8_target_arch!=target_arch' | ||
| 96 | + ['v8_target_arch!=target_arch', { | ||
| 97 | # Target not built with an Arm CXX compiler (simulator build). | ||
| 98 | 'conditions': [ | ||
| 99 | [ 'arm_float_abi=="hard"', { | ||
| 100 | -- | ||
| 101 | 2.23.0.rc1 | ||
| 102 | |||
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 e384b62869..44c016a904 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 \ | |||
| 19 | file://0001-Disable-running-gyp-files-for-bundled-deps.patch \ | 19 | file://0001-Disable-running-gyp-files-for-bundled-deps.patch \ |
| 20 | file://0004-Make-compatibility-with-gcc-4.8.patch \ | 20 | file://0004-Make-compatibility-with-gcc-4.8.patch \ |
| 21 | file://0005-Link-atomic-library.patch \ | 21 | file://0005-Link-atomic-library.patch \ |
| 22 | file://0007-v8-don-t-override-ARM-CFLAGS.patch \ | ||
| 22 | " | 23 | " |
| 23 | SRC_URI_append_class-target = " \ | 24 | SRC_URI_append_class-target = " \ |
| 24 | file://0002-Using-native-torque.patch \ | 25 | file://0002-Using-native-torque.patch \ |
