Bug 201227 - www/node010: add armv6 to supported achitecture
Summary: www/node010: add armv6 to supported achitecture
Status: Closed Not Accepted
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: arm Any
: --- Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-30 18:47 UTC by Mikael Urankar
Modified: 2015-09-15 22:18 UTC (History)
5 users (show)

See Also:
bugzilla: maintainer-feedback? (linpct)


Attachments
armv6 fix (10.24 KB, patch)
2015-06-30 18:47 UTC, Mikael Urankar
no flags Details | Diff
armv6 fix (9.50 KB, patch)
2015-07-06 11:25 UTC, Mikael Urankar
no flags Details | Diff
armv6 fix (9.50 KB, patch)
2015-07-06 11:26 UTC, Mikael Urankar
no flags Details | Diff
armv6 fix (10.38 KB, patch)
2015-07-06 11:47 UTC, Mikael Urankar
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mikael Urankar freebsd_committer freebsd_triage 2015-06-30 18:47:41 UTC
Created attachment 158198 [details]
armv6 fix

Hi,

www/node010 builds and works fine (tested with www/npm) on armv6 with the attached patch.

build log:
http://mikael.urankar.free.fr/FreeBSD/arm/build_logs/node010-0.10.38_2.log

Thanks.
Comment 1 Andrew Turner freebsd_committer freebsd_triage 2015-07-06 09:53:41 UTC
Why do you need -no-integrated-as?
Comment 2 Mikael Urankar freebsd_committer freebsd_triage 2015-07-06 10:08:24 UTC
(In reply to Andrew Turner from comment #1)
There is some GAS assembly in openssl that clang can't compile:
  cc '-DL_ENDIAN' '-DPURIFY' '-D_REENTRANT' '-DOPENSSL_NO_HEARTBEATS' '-DENGINESDIR="/dev/null"' '-DTERMIOS' '-DOPENSSLDIR="/etc/ssl"' '-DAES_ASM' '-DCPUID_ASM' '-DOPENSSL_BN_ASM_MONT' '-DOPENSSL_CPUID_OBJ' '-DSHA1_ASM' '-DSHA256_ASM' '-DSHA512_ASM' '-DGHASH_ASM' '-DDSO_DLFCN' '-DHAVE_DLFCN_H' -I../deps/openssl -I../deps/openssl/openssl -I../deps/openssl/openssl/crypto -I../deps/openssl/openssl/crypto/asn1 -I../deps/openssl/openssl/crypto/evp -I../deps/openssl/openssl/crypto/md2 -I../deps/openssl/openssl/crypto/modes -I../deps/openssl/openssl/crypto/store -I../deps/openssl/openssl/include  -Wno-missing-field-initializers -Wall -Wextra -Wno-unused-parameter -pthread -O2 -fno-strict-aliasing -fno-omit-frame-pointer  -MMD -MF /usr/ports/www/node010/work/node-v0.10.38/out/Release/.deps//usr/ports/www/node010/work/node-v0.10.38/out/Release/obj.target/openssl/deps/openssl/openssl/crypto/cast/c_enc.o.d.raw -O -pipe -mfloat-abi=softfp  -Wno-unused-private-field -Wno-nested-anon-types -Wno-unused-function -Wno-unused-const-variable -fno-strict-aliasing -c -o /usr/ports/www/node010/work/node-v0.10.38/out/Release/obj.target/openssl/deps/openssl/openssl/crypto/cast/c_enc.o ../deps/openssl/openssl/crypto/cast/c_enc.c
../deps/openssl/asm/arm-elf-gas/modes/ghash-armv4.S:76:2: error: invalid instruction
 ldrplb r12,[r2,r3]
 ^
../deps/openssl/asm/arm-elf-gas/modes/ghash-armv4.S:86:2: error: invalid instruction
 ldrplb r8,[r0,r3]
 ^
../deps/openssl/asm/arm-elf-gas/modes/ghash-armv4.S:132:2: error: invalid instruction
 ldrneb r12,[r2,#15]
 ^
../deps/openssl/asm/arm-elf-gas/modes/ghash-armv4.S:221:2: error: invalid instruction
 ldrplb r12,[r0,r3]
Comment 3 Mikael Urankar freebsd_committer freebsd_triage 2015-07-06 11:25:23 UTC
Created attachment 158412 [details]
armv6 fix

ASM optimizations are off by default for security/openssl. We can do the same with node010 and use clang integrated as.
I've updated the patch.
Comment 4 Mikael Urankar freebsd_committer freebsd_triage 2015-07-06 11:26:53 UTC
Created attachment 158413 [details]
armv6 fix

remove a debug option that crept in my previous patch
Comment 5 Mikael Urankar freebsd_committer freebsd_triage 2015-07-06 11:47:13 UTC
Created attachment 158414 [details]
armv6 fix

Build log with my last patch:
http://mikael.urankar.free.fr/FreeBSD/arm/build_logs/node010-0.10.38_2_last.log
Comment 6 Mark Felder freebsd_committer freebsd_triage 2015-07-06 13:10:50 UTC
Where was this patch sourced from? Is upstream aware of it? Is upstream still supporting node 0.10.x ? We try to avoid larger patches in the ports tree if possible.
Comment 7 Mikael Urankar freebsd_committer freebsd_triage 2015-07-06 13:23:57 UTC
(In reply to Mark Felder from comment #6)
I wrote the patch.
Upstream is not aware of it.
branch 0.10 is in maintenance mode (latest version is 0.10.39)
Comment 8 linpct 2015-07-07 09:20:58 UTC
Hi, hope that could be accepted by upstream, that we do not need to patch it in every new version.

Thanks.
Comment 9 Mark Felder freebsd_committer freebsd_triage 2015-07-07 13:57:19 UTC
I did a pull request. Let's see what they say.

https://github.com/joyent/node/pull/25641
Comment 10 Carlo Strub freebsd_committer freebsd_triage 2015-09-15 22:18:49 UTC
Rejected upstream with good arguments regarding complex maintenance. I don't think it makes sense pursuing this in the port either.