Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
a46a1cdc
Commit
a46a1cdc
authored
May 30, 2016
by
Lucas Käldström
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't set the env var CC when not cross-compiling
parent
5643b749
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
11 deletions
+16
-11
golang.sh
hack/lib/golang.sh
+16
-11
No files found.
hack/lib/golang.sh
View file @
a46a1cdc
...
@@ -166,6 +166,7 @@ readonly KUBE_STATIC_LIBRARIES=(
...
@@ -166,6 +166,7 @@ readonly KUBE_STATIC_LIBRARIES=(
kube-proxy
kube-proxy
kubectl
kubectl
federation-apiserver
federation-apiserver
federation-controller-manager
)
)
kube::golang::is_statically_linked_library
()
{
kube::golang::is_statically_linked_library
()
{
...
@@ -225,17 +226,21 @@ kube::golang::set_platform_envs() {
...
@@ -225,17 +226,21 @@ kube::golang::set_platform_envs() {
export
GOOS
=
${
platform
%/*
}
export
GOOS
=
${
platform
%/*
}
export
GOARCH
=
${
platform
##*/
}
export
GOARCH
=
${
platform
##*/
}
# Dynamic CGO linking for other server architectures than linux/amd64 goes here
# Do not set CC when building natively on a platform, only if cross-compiling from linux/amd64
# If you want to include support for more server platforms than these, add arch-specific gcc names here
if
[[
$(
kube::golang::host_platform
)
==
"linux/amd64"
]]
;
then
if
[[
${
platform
}
==
"linux/arm"
]]
;
then
export
CGO_ENABLED
=
1
# Dynamic CGO linking for other server architectures than linux/amd64 goes here
export
CC
=
arm-linux-gnueabi-gcc
# If you want to include support for more server platforms than these, add arch-specific gcc names here
elif
[[
${
platform
}
==
"linux/arm64"
]]
;
then
if
[[
${
platform
}
==
"linux/arm"
]]
;
then
export
CGO_ENABLED
=
1
export
CGO_ENABLED
=
1
export
CC
=
aarch64-linux-gnu-gcc
export
CC
=
arm-linux-gnueabi-gcc
elif
[[
${
platform
}
==
"linux/ppc64le"
]]
;
then
elif
[[
${
platform
}
==
"linux/arm64"
]]
;
then
export
CGO_ENABLED
=
1
export
CGO_ENABLED
=
1
export
CC
=
powerpc64le-linux-gnu-gcc
export
CC
=
aarch64-linux-gnu-gcc
elif
[[
${
platform
}
==
"linux/ppc64le"
]]
;
then
export
CGO_ENABLED
=
1
export
CC
=
powerpc64le-linux-gnu-gcc
fi
fi
fi
}
}
...
...
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