Skip to content

Commit 0fbdf39

Browse files
committed
Force deletion of symlinks stubs on install
1 parent 752442d commit 0fbdf39

File tree

2 files changed

+56
-28
lines changed

2 files changed

+56
-28
lines changed

package.json

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,5 +56,14 @@
5656
"download-manager": "^0.0.20",
5757
"fs-extra": "^0.30.0",
5858
"prebuild": "^4.2.2"
59-
}
59+
},
60+
"main": "index.js",
61+
"repository": {
62+
"type": "git",
63+
"url": "git+https://github.com/NodeOS/nodeos-cross-toolchain.git"
64+
},
65+
"bugs": {
66+
"url": "https://github.com/NodeOS/nodeos-cross-toolchain/issues"
67+
},
68+
"homepage": "https://github.com/NodeOS/nodeos-cross-toolchain#readme"
6069
}

scripts/postinstall

Lines changed: 46 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,21 @@
33
set -o pipefail
44

55

6+
SYMLINKS=(addr2line ar as c++filt elfedit gprof ld ld.bfd nm objcopy objdump \
7+
ranlib readelf size strings strip c++ cpp g++ gcc gcov gcov-tool)
8+
9+
10+
# Delete symlinks stubs
11+
12+
(
13+
mkdir -p bin || exit 10
14+
15+
cd bin
16+
17+
rm ${SYMLINKS[@]} || exit 11
18+
) || exit $?
19+
20+
621
# If host platform is not based on musl, don't create un-prefixed symlinks
722
readlink /lib/ld-linux.so.2 | grep musl || exit 0
823

@@ -16,30 +31,34 @@ CPU=
1631

1732
source scripts/adjustEnvVars.sh || exit $?
1833

19-
mkdir -p bin || exit 10
20-
21-
# Binutils
22-
ln -sf $TARGET-addr2line bin/addr2line &&
23-
ln -sf $TARGET-ar bin/ar &&
24-
ln -sf $TARGET-as bin/as &&
25-
ln -sf $TARGET-c++filt bin/c++filt &&
26-
ln -sf $TARGET-elfedit bin/elfedit &&
27-
ln -sf $TARGET-gprof bin/gprof &&
28-
ln -sf $TARGET-ld bin/ld &&
29-
ln -sf $TARGET-ld.bfd bin/ld.bfd &&
30-
ln -sf $TARGET-nm bin/nm &&
31-
ln -sf $TARGET-objcopy bin/objcopy &&
32-
ln -sf $TARGET-objdump bin/objdump &&
33-
ln -sf $TARGET-ranlib bin/ranlib &&
34-
ln -sf $TARGET-readelf bin/readelf &&
35-
ln -sf $TARGET-size bin/size &&
36-
ln -sf $TARGET-strings bin/strings &&
37-
ln -sf $TARGET-strip bin/strip || exit 11
38-
39-
# GCC
40-
ln -sf $TARGET-c++ bin/c++ &&
41-
ln -sf $TARGET-cpp bin/cpp &&
42-
ln -sf $TARGET-g++ bin/g++ &&
43-
ln -sf $TARGET-gcc bin/gcc &&
44-
ln -sf $TARGET-gcov bin/gcov &&
45-
ln -sf $TARGET-gcov-tool bin/gcov-tool || exit 12
34+
(
35+
mkdir -p bin || exit 20
36+
37+
cd bin
38+
39+
# Binutils
40+
ln -sf $TARGET-addr2line addr2line &&
41+
ln -sf $TARGET-ar ar &&
42+
ln -sf $TARGET-as as &&
43+
ln -sf $TARGET-c++filt c++filt &&
44+
ln -sf $TARGET-elfedit elfedit &&
45+
ln -sf $TARGET-gprof gprof &&
46+
ln -sf $TARGET-ld ld &&
47+
ln -sf $TARGET-ld.bfd ld.bfd &&
48+
ln -sf $TARGET-nm nm &&
49+
ln -sf $TARGET-objcopy objcopy &&
50+
ln -sf $TARGET-objdump objdump &&
51+
ln -sf $TARGET-ranlib ranlib &&
52+
ln -sf $TARGET-readelf readelf &&
53+
ln -sf $TARGET-size size &&
54+
ln -sf $TARGET-strings strings &&
55+
ln -sf $TARGET-strip strip || exit 21
56+
57+
# GCC
58+
ln -sf $TARGET-c++ c++ &&
59+
ln -sf $TARGET-cpp cpp &&
60+
ln -sf $TARGET-g++ g++ &&
61+
ln -sf $TARGET-gcc gcc &&
62+
ln -sf $TARGET-gcov gcov &&
63+
ln -sf $TARGET-gcov-tool gcov-tool || exit 22
64+
) || exit $?

0 commit comments

Comments
 (0)