nodejs: Add patch to compile with GCC 4.3.3
PATCH 1/1 nodejs: Add patch to compile with GCC 4.3.3
* Add a patch to nodejs to allow compiling with GCC versions less than or equal to 4.3.3.
* Define the function nodejs_get_gcc_ver to allow applying the patch conditionally based on compiler version.
* Patch based on post at https://github.com/joyent/node/issues/883
--- ...01-Add-missing-compiler-flags-for-GCC-4.3.patch | 34 ++++++++++++++++++++ recipes/nodejs/nodejs_0.4.0.bb | 9 +++++ 2 files changed, 43 insertions(+), 0 deletions(-) create mode 100644 recipes/nodejs/files/0001-Add-missing-compiler-flags-for-GCC-4.3.patch
recipes/nodejs/files/0001-Add-missing-compiler-flags-for-GCC-4.3.patch new file +34 -0
@@ -0,0 +1,34 @@ +From 7cb51ed25b688be08825950ce3f5ce2ad38e3f95 Mon Sep 17 00:00:00 2001 +From: Chase Maupin <[email protected]> +Date: Tue, 12 Jul 2011 11:00:48 -0500 +Subject: [PATCH] Add missing compiler flags for GCC 4.3 + +* When compiling nodejs for GCC 4.3.3 you need to also add the + flag -fno-tree-sink. +* This patch was taken from the thread at: + * https://github.com/joyent/node/issues/883 +* Believe that no action is taken on this change upstream because + it is GCC 4.3.3 specific and is not required for GCC 4.5 + +Upstream-Status: Denied + +Signed-off-by: Chase Maupin <[email protected]> +--- + deps/v8/SConstruct | 1 + + 1 files changed, 1 insertions(+), 0 deletions(-) + +diff --git a/deps/v8/SConstruct b/deps/v8/SConstruct +index b2542fd..31c4c7b 100644 +--- a/deps/v8/SConstruct ++++ b/deps/v8/SConstruct +@@ -210,6 +210,7 @@ LIBRARY_FLAGS = { + }, + 'arch:arm': { + 'CPPDEFINES': ['V8_TARGET_ARCH_ARM'], ++ 'CCFLAGS': ['-fno-tree-sink'], + 'unalignedaccesses:on' : { + 'CPPDEFINES' : ['CAN_USE_UNALIGNED_ACCESSES=1'] + }, +-- +1.7.0.4 +
recipes/nodejs/nodejs_0.4.0.bb +9 -0
@@ -4,11 +4,20 @@ LICENSE = "MIT" DEPENDS = "openssl" +PR = "r1" + +def nodejs_get_gcc_version(d): + import subprocess,os,bb + if os.path.exists(bb.data.getVar('TOOLCHAIN_PATH', d, 1)+'/bin/'+bb.data.getVar('TARGET_PREFIX', d, 1)+'gcc'): + return subprocess.Popen([bb.data.getVar('TOOLCHAIN_PATH', d, 1)+'/bin/'+bb.data.getVar('TARGET_PREFIX', d, 1)+'gcc', '-v'], stderr=subprocess.PIPE).communicate()[1].splitlines()[-1].split()[2] + SRC_URI = " \ http://nodejs.org/dist/node-v${PV}.tar.gz \ file://libev-cross-cc_${PV}.patch \ " +SRC_URI += "${@["", "file://0001-Add-missing-compiler-flags-for-GCC-4.3.patch"][nodejs_get_gcc_version(d) <= "4.3.3"]}" + SRC_URI[md5sum] = "18f89256751f9b8e27dee8494f508171" SRC_URI[sha256sum] = "4a30bd9963373cb86a994479bdd451ab3b6f2124f0089493366315da79d3408e"
Signature · 1 line
1.7.0.4
Just FYI, this patch is against the nodejs version in the maintenance branch and was sent to the list so it could be picked up into Koen's staging tree for his next pull request. The previously sent version was for the OE dev mainline and has already been accepted.
Quoted 98 lines
-----Original Message-----
From: Chase Maupin [mailto:[email protected]]
Sent: Tuesday, July 19, 2011 7:30 AM
To: [email protected]
Cc: Maupin, Chase
Subject: [PATCH] nodejs: Add patch to compile with GCC 4.3.3* Add a patch to nodejs to allow compiling with GCC versions less than or equal to 4.3.3.
* Define the functionnodejs_get_gcc_verto allow applying the patch conditionally based on compiler version.
* Patch based on post at https://github.com/joyent/node/issues/883Signed-off-by Chase Maupin <[email protected]>--- ...01-Add-missing-compiler-flags-for-GCC-4.3.patch | 34 ++++++++++++++++++++ recipes/nodejs/nodejs_0.4.0.bb | 9 +++++ 2 files changed, 43 insertions(+), 0 deletions(-) create mode 100644 recipes/nodejs/files/0001-Add-missing-compiler-flags-for-GCC-4.3.patch
(quoted diff) +0
-0GCC-4.3.patch b/recipes/nodejs/files/0001-Add-missing-compiler-flags- for-GCC-4.3.patch
new file mode 100644
index 0000000..080b88frecipes/nodejs/files/0001-Add-missing-compiler-flags-for-GCC- new file +0
-04.3.patch
recipes/nodejs/files/0001-Add-missing-compiler-flags-for-GCC- new file +34
-0@@ -0,0 +1,34 @@ +From 7cb51ed25b688be08825950ce3f5ce2ad38e3f95 Mon Sep 17 00:00:00 2001 +From: Chase Maupin <[email protected]> +Date: Tue, 12 Jul 2011 11:00:48 -0500 +Subject: [PATCH] Add missing compiler flags for GCC 4.3 + +* When compiling nodejs for GCC 4.3.3 you need to also add the + flag -fno-tree-sink. +* This patch was taken from the thread at: + * https://github.com/joyent/node/issues/883 +* Believe that no action is taken on this change upstream because + it is GCC 4.3.3 specific and is not required for GCC 4.5 + +Upstream-Status: Denied + +Signed-off-by: Chase Maupin <[email protected]> +--- + deps/v8/SConstruct | 1 + + 1 files changed, 1 insertions(+), 0 deletions(-) + +diff --git a/deps/v8/SConstruct b/deps/v8/SConstruct +index b2542fd..31c4c7b 100644 +--- a/deps/v8/SConstruct ++++ b/deps/v8/SConstruct +@@ -210,6 +210,7 @@ LIBRARY_FLAGS = { + }, + 'arch:arm': { + 'CPPDEFINES': ['V8_TARGET_ARCH_ARM'], ++ 'CCFLAGS': ['-fno-tree-sink'], + 'unalignedaccesses:on' : { + 'CPPDEFINES' : ['CAN_USE_UNALIGNED_ACCESSES=1'] + }, +-- +1.7.0.4 +recipes/nodejs/nodejs_0.4.0.bb +5
-0@@ -4,11 +4,20 @@ LICENSE = "MIT" DEPENDS = "openssl" +PR = "r1" + +def nodejs_get_gcc_version(d): + import subprocess,os,bb + if os.path.exists(bb.data.getVar('TOOLCHAIN_PATH', d,1)+'/bin/'+bb.data.getVar('TARGET_PREFIX', d, 1)+'gcc'):
+ return subprocess.Popen([bb.data.getVar('TOOLCHAIN_PATH', d,
1)+'/bin/'+bb.data.getVar('TARGET_PREFIX', d, 1)+'gcc', '-v'], stderr=subprocess.PIPE).communicate()[1].splitlines()[-1].split()[2]recipes/nodejs/nodejs_0.4.0.bb +2
-0+ SRC_URI = " \ http://nodejs.org/dist/node-v${PV}.tar.gz \ file://libev-cross-cc_${PV}.patch \ " +SRC_URI += "${@["", "file://0001-Add-missing-compiler-flags-for-GCC-4.3.patch"][nodejs_get_gcc_version(d) <= "4.3.3"]}"
+
SRC_URI[md5sum] = "18f89256751f9b8e27dee8494f508171" SRC_URI[sha256sum] =
"4a30bd9963373cb86a994479bdd451ab3b6f2124f0089493366315da79d3408e"--
1.7.0.4