GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — build: add suport for x86 architecture · nodejs/node@4ad7184

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • android-configure
  • common.gypi
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎android-configure‎

Copy file name to clipboard
+39-8Lines changed: 39 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,49 @@
11
#!/bin/bash
22

3+
if [ -z "$2" ]; then
4+
ARCH=arm
5+
else
6+
ARCH="$2"
7+
fi
8+
9+
CC_VER="4.9"
10+
case $ARCH in
11+
arm)
12+
DEST_CPU="$ARCH"
13+
SUFFIX="$ARCH-linux-androideabi"
14+
TOOLCHAIN_NAME="$SUFFIX"
15+
;;
16+
x86)
17+
DEST_CPU="ia32"
18+
SUFFIX="i686-linux-android"
19+
TOOLCHAIN_NAME="$ARCH"
20+
;;
21+
x86_64)
22+
DEST_CPU="ia32"
23+
SUFFIX="$ARCH-linux-android"
24+
TOOLCHAIN_NAME="$ARCH"
25+
;;
26+
*)
27+
echo "Unsupported architecture provided: $ARCH"
28+
exit 1
29+
;;
30+
esac
31+
332
export TOOLCHAIN=$PWD/android-toolchain
433
mkdir -p $TOOLCHAIN
534
$1/build/tools/make-standalone-toolchain.sh \
6-
--toolchain=arm-linux-androideabi-4.9 \
7-
--arch=arm \
35+
--toolchain=$TOOLCHAIN_NAME-$CC_VER \
36+
--arch=$ARCH \
837
--install-dir=$TOOLCHAIN \
938
--platform=android-21
1039
export PATH=$TOOLCHAIN/bin:$PATH
11-
export AR=$TOOLCHAIN/bin/arm-linux-androideabi-ar
12-
export CC=$TOOLCHAIN/bin/arm-linux-androideabi-gcc
13-
export CXX=$TOOLCHAIN/bin/arm-linux-androideabi-g++
14-
export LINK=$TOOLCHAIN/bin/arm-linux-androideabi-g++
40+
export AR=$TOOLCHAIN/bin/$SUFFIX-ar
41+
export CC=$TOOLCHAIN/bin/$SUFFIX-gcc
42+
export CXX=$TOOLCHAIN/bin/$SUFFIX-g++
43+
export LINK=$TOOLCHAIN/bin/$SUFFIX-g++
1544

1645
./configure \
17-
--dest-cpu=arm \
18-
--dest-os=android
46+
--dest-cpu=$DEST_CPU \
47+
--dest-os=android \
48+
--without-snapshot \
49+
--openssl-no-asm
Collapse file

‎common.gypi‎

Copy file name to clipboardExpand all lines: common.gypi
+8Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,10 @@
7070
'cflags': [ '-gxcoff' ],
7171
'ldflags': [ '-Wl,-bbigtoc' ],
7272
}],
73+
['OS == "android"', {
74+
'cflags': [ '-fPIE' ],
75+
'ldflags': [ '-fPIE', '-pie' ]
76+
}]
7377
],
7478
'msvs_settings': {
7579
'VCCLCompilerTool': {
@@ -103,6 +107,10 @@
103107
['OS!="mac" and OS!="win"', {
104108
'cflags': [ '-fno-omit-frame-pointer' ],
105109
}],
110+
['OS == "android"', {
111+
'cflags': [ '-fPIE' ],
112+
'ldflags': [ '-fPIE', '-pie' ]
113+
}]
106114
],
107115
'msvs_settings': {
108116
'VCCLCompilerTool': {

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.