Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
go
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
certo
go
Commits
34af8260
Commit
34af8260
authored
Oct 01, 2022
by
Vladimir Bashkirtsev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make go bootstrap within building VM to avoid issues with the host
parent
b09bf6d1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
8 deletions
+28
-8
Makefile
Makefile
+28
-8
No files found.
Makefile
View file @
34af8260
current_dir
:=
$(
dir
$(
abspath
$(
lastword
$(MAKEFILE_LIST)
)))
temporary
:
temporary
:
dd
if
=
/dev/zero
of
=
swap
bs
=
1048576
count
=
1024
dd
if
=
/dev/zero
of
=
swap
bs
=
1048576
count
=
1024
chmod
600 swap
chmod
600 swap
...
@@ -8,22 +6,44 @@ temporary:
...
@@ -8,22 +6,44 @@ temporary:
mkdir
tmp
mkdir
tmp
mount
--bind
tmp /tmp
mount
--bind
tmp /tmp
mkdir
-p
/tmp/gocache
mkdir
-p
/tmp/gocache
tar
xf
go1.4-bootstrap-20171003.tar.gz
patch
-Np1
-d
go
<
go1.4-aarch64.patch
cd
go/src
&&
./make.bash
mv
go
go1.4
tar
xf
go1.17.7.src.tar.gz
if
[
"$(HOSTTYPE)"
=
"aarch64"
];
then
\
cd
go/src
&&
GOROOT_BOOTSTRAP
=
$(CURDIR)
/go1.4
GOCACHE
=
/tmp/gocache
GOOS
=
linux
GOARCH
=
arm64
GOPATH
=
$(CURDIR)
/go ./bootstrap.bash
;
\
rm
-rf
$(CURDIR)
/go-linux-arm64-bootstrap
;
\
elif
[
"
$(HOSTTYPE)
"
=
"x86_64"
]
;
then
\
ln
-s
/lib /lib64
;
\
cd
go/src
&&
GOROOT_BOOTSTRAP
=
$(CURDIR)
/go1.4
GOCACHE
=
/tmp/gocache
GOOS
=
linux
GOARCH
=
amd64
GOPATH
=
$(CURDIR)
/go
CGO_CFLAGS
=
-mno-adx
./bootstrap.bash
;
\
rm
-rf
/lib64
;
\
rm
-rf
$(CURDIR)
/go-linux-amd64-bootstrap
;
\
else
\
cd
go/src
&&
GOROOT_BOOTSTRAP
=
$(CURDIR)
/go1.4
GOCACHE
=
/tmp/gocache
GOOS
=
linux
GOARCH
=
arm
GOPATH
=
$(CURDIR)
/go ./bootstrap.bash
;
\
rm
-rf
$(CURDIR)
/go-linux-arm-bootstrap
;
\
fi
rm
-rf
go1.4
rm
-rf
go
tar
xf
go1.17.7.src.tar.gz
tar
xf
go1.17.7.src.tar.gz
if
[
"$(HOSTTYPE)"
=
"aarch64"
];
then
\
if
[
"$(HOSTTYPE)"
=
"aarch64"
];
then
\
tar
xf
go-linux-arm64-bootstrap.tbz
;
\
tar
xf
go-linux-arm64-bootstrap.tbz
;
\
cd
go/src
&&
GOROOT_BOOTSTRAP
=
$(
current_dir)
go-linux-arm64-bootstrap
GOCACHE
=
/tmp/gocache ./all.bash
;
\
cd
go/src
&&
GOROOT_BOOTSTRAP
=
$(
CURDIR)
/
go-linux-arm64-bootstrap
GOCACHE
=
/tmp/gocache ./all.bash
;
\
rm
-rf
$(
current_dir)
go-linux-arm64-bootstrap
;
\
rm
-rf
$(
CURDIR)
/
go-linux-arm64-bootstrap
;
\
elif
[
"
$(HOSTTYPE)
"
=
"x86_64"
]
;
then
\
elif
[
"
$(HOSTTYPE)
"
=
"x86_64"
]
;
then
\
tar
xf go-linux-amd64-bootstrap.tbz
;
\
tar
xf go-linux-amd64-bootstrap.tbz
;
\
ln
-s
/lib /lib64
;
\
ln
-s
/lib /lib64
;
\
cd
go/src
&&
GOROOT_BOOTSTRAP
=
$(
current_dir)
go-linux-amd64-bootstrap
GOCACHE
=
/tmp/gocache ./all.bash
;
\
cd
go/src
&&
GOROOT_BOOTSTRAP
=
$(
CURDIR)
/
go-linux-amd64-bootstrap
GOCACHE
=
/tmp/gocache ./all.bash
;
\
rm
-rf
/lib64
;
\
rm
-rf
/lib64
;
\
rm
-rf
$(
current_dir)
go-linux-amd64-bootstrap
;
\
rm
-rf
$(
CURDIR)
/
go-linux-amd64-bootstrap
;
\
else
\
else
\
tar
xf go-linux-arm-bootstrap.tbz
;
\
tar
xf go-linux-arm-bootstrap.tbz
;
\
cd
go/src
&&
GOROOT_BOOTSTRAP
=
$(
current_dir)
go-linux-arm-bootstrap
GOCACHE
=
/tmp/gocache ./all.bash
;
\
cd
go/src
&&
GOROOT_BOOTSTRAP
=
$(
CURDIR)
/
go-linux-arm-bootstrap
GOCACHE
=
/tmp/gocache ./all.bash
;
\
rm
-rf
$(
current_dir)
go-linux-arm-bootstrap
;
\
rm
-rf
$(
CURDIR)
/
go-linux-arm-bootstrap
;
\
fi
fi
rm
-rf
/tmp/gocache
rm
-rf
/tmp/gocache
umount
/tmp
umount
/tmp
rm
-rf
tmp
rm
-rf
tmp
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment