File tree Expand file tree Collapse file tree 4 files changed +81
-6
lines changed
Expand file tree Collapse file tree 4 files changed +81
-6
lines changed Original file line number Diff line number Diff line change 11deps /
22obj /
33node_modules /
4+ out /
5+ bin /
6+ npm-debug.log
7+ prebuilds /
Original file line number Diff line number Diff line change 11{
22 "name" : " nodeos-cross-toolchain" ,
3- "version" : " 0.0.0 " ,
3+ "version" : " 0.0.1 " ,
44 "description" : " Cross-toolchain to build NodeOS based on Compressed Linux From Scratch Embedded" ,
55 "main" : " ./out" ,
6+ "bin" : {
7+ "ar" : " bin/ar" ,
8+ "as" : " bin/as" ,
9+ "c++" : " bin/c++" ,
10+ "g++" : " bin/g++" ,
11+ "gcc" : " bin/gcc" ,
12+ "ld" : " bin/ld" ,
13+ "ld.bfd" : " bin/ld.bfd" ,
14+ "nm" : " bin/nm" ,
15+ "objcopy" : " bin/objcopy" ,
16+ "objdump" : " bin/objdump" ,
17+ "ranlib" : " bin/ranlib" ,
18+ "strip" : " bin/strip"
19+ },
620 "scripts" : {
7- "install " : " scripts/build " ,
8- "postinstall " : " scripts/postinstall" ,
9- "preinstall " : " scripts/preinstall " ,
21+ "BigRedButton " : " scripts/BigRedButton " ,
22+ "build " : " scripts/preinstall && scripts/build && scripts/postinstall" ,
23+ "install " : " prebuild --download https://github.com/NodeOS/nodeos-cross-toolchain/releases/download/{version}/{platform}-{arch}.tar.gz " ,
1024 "test" : " scripts/test" ,
1125 "unbuild" : " scripts/unbuild"
1226 },
1529 " CLFS" ,
1630 " embedded" ,
1731 " toolchain" ,
18- " cross"
32+ " cross" ,
33+ " gcc" ,
34+ " musl" ,
35+ " linux" ,
36+ " binutils"
1937 ],
2038 "author" : " Jesús Leganés Combarro \" piranna\" <piranna@gmail.com>" ,
2139 "license" : " MIT" ,
2240 "dependencies" : {
41+ "prebuild" : " piranna/prebuild"
42+ },
43+ "devDpendencies" : {
2344 "download-manager" : " ^0.0.15" ,
24- "fs-extra" : " ^0.26.0 "
45+ "fs-extra" : " ^0.26.5 "
2546 }
2647}
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env sh
2+
3+ #
4+ # Build cross toolchain for all supported platforms
5+ #
6+
7+ PLATFORM=pc_qemu_32 npm run build || exit 1
8+ PLATFORM=pc_qemu_64 npm run build || exit 2
9+
10+ #
11+ # Pack toolchain in a node-gyp compatible way
12+ #
13+
14+ mkdir -p prebuilds &&
15+ tar -cf - out | gzip > prebuilds/linux-x64.tar.gz || exit 3
16+
17+ #
18+ # Upload release to GitHub
19+ #
20+
21+ if [ " $GITHUB_TOKEN " ]; then
22+ prebuild --upload-all $GITHUB_TOKEN || exit 4
23+ fi
Original file line number Diff line number Diff line change @@ -18,7 +18,34 @@ source scripts/adjustEnvVars.sh || exit $?
1818$TARGET -strip --strip-debug $TOOLS /{,$TARGET }/lib/* & >> /dev/null
1919$TARGET -strip --strip-unneeded $TOOLS /{,$TARGET }/bin/* & >> /dev/null
2020
21+ $TARGET -strip --strip-unneeded $TOOLS /libexec/gcc/$TARGET /* /* {,/* } & >> /dev/null
22+
2123rm -rf $TOOLS /{,share}/{info,man,doc}
2224
2325
26+ #
27+ # Symbolic links for native platform binaries
28+ #
29+
30+ PLATFORM=
31+ CPU=
32+
33+ source scripts/adjustEnvVars.sh || exit $?
34+
35+ mkdir -p bin || exit 10
36+
37+ ln -sf ../out/$TARGET /bin/ld.bfd \
38+ ../out/$TARGET /bin/as \
39+ ../out/$TARGET /bin/ranlib \
40+ ../out/$TARGET /bin/strip \
41+ ../out/$TARGET /bin/ar \
42+ ../out/$TARGET /bin/nm \
43+ ../out/$TARGET /bin/gcc \
44+ ../out/$TARGET /bin/ld \
45+ ../out/$TARGET /bin/objdump \
46+ ../out/$TARGET /bin/c++ \
47+ ../out/$TARGET /bin/g++ \
48+ ../out/$TARGET /bin/objcopy bin || exit 11
49+
50+
2451echo -e " ${GRN} Successfully built a $TARGET cross-toolchain${CLR} "
You can’t perform that action at this time.
0 commit comments