Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
P
protobuf
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
protobuf
Commits
7ba4a99e
Commit
7ba4a99e
authored
Aug 21, 2019
by
salamaniibm
Committed by
Adam Cozzette
Aug 30, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adding protoc support for s390x
parent
36bdcb5a
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
30 additions
and
2 deletions
+30
-2
build.sh
kokoro/release/protoc/linux/build.sh
+5
-1
README.md
protoc-artifacts/README.md
+3
-0
build-protoc.sh
protoc-artifacts/build-protoc.sh
+14
-0
build-zip.sh
protoc-artifacts/build-zip.sh
+3
-1
pom.xml
protoc-artifacts/pom.xml
+5
-0
No files found.
kokoro/release/protoc/linux/build.sh
View file @
7ba4a99e
...
...
@@ -11,16 +11,20 @@ git submodule update --init --recursive
# Generate the configure script.
./autogen.sh
# Cross-build for aarch64
and ppc64le
. Note: we do these builds first to avoid
# Cross-build for aarch64
, ppc64le and s390x
. Note: we do these builds first to avoid
# file permission issues. The Docker builds will create directories owned by
# root, which causes problems if we try to add new artifacts to those
# directories afterward.
sudo
apt
install
-y
g++-aarch64-linux-gnu
protoc-artifacts/build-protoc.sh linux aarch_64 protoc
sudo
apt
install
-y
g++-powerpc64le-linux-gnu
protoc-artifacts/build-protoc.sh linux ppcle_64 protoc
sudo
apt
install
-y
g++-s390x-linux-gnu
protoc-artifacts/build-protoc.sh linux s390x_64 protoc
# Use docker image to build linux artifacts.
DOCKER_IMAGE_NAME
=
protobuf/protoc_
$(
sha1sum
protoc-artifacts/Dockerfile |
cut
-f1
-d
" "
)
docker pull
$DOCKER_IMAGE_NAME
...
...
protoc-artifacts/README.md
View file @
7ba4a99e
...
...
@@ -123,6 +123,8 @@ target directory layout:
protoc.exe
+ ppcle_64
protoc.exe
+ s390x_64
protoc.exe
+ osx
+ x86_64
protoc.exe
...
...
@@ -169,6 +171,7 @@ dist/protoc-3.6.0-linux-x86_32.zip
dist/protoc-3.6.0-linux-x86_64.zip
dist/protoc-3.6.0-linux-aarch_64.zip
dist/protoc-3.6.0-linux-ppcle_64.zip
dist/protoc-3.6.0-linux-s390x_64.zip
```
Before running the script, make sure the artifacts are accessible from:
...
...
protoc-artifacts/build-protoc.sh
View file @
7ba4a99e
...
...
@@ -93,6 +93,12 @@ checkArch ()
assertEq
$format
"elf64-x86-64"
$LINENO
elif
[[
"
$ARCH
"
==
aarch_64
]]
;
then
assertEq
$format
"elf64-little"
$LINENO
elif
[[
"
$ARCH
"
==
s390x_64
]]
;
then
if
[[
$host_machine
==
s390x
]]
;
then
assertEq
$format
"elf64-s390"
$LINENO
else
assertEq
$format
"elf64-big"
$LINENO
fi
elif
[[
"
$ARCH
"
==
ppcle_64
]]
;
then
if
[[
$host_machine
==
ppc64le
]]
;
then
assertEq
$format
"elf64-powerpcle"
$LINENO
...
...
@@ -143,6 +149,11 @@ checkDependencies ()
white_list
=
"linux-gate
\.
so
\.
1
\|
libpthread
\.
so
\.
0
\|
libm
\.
so
\.
6
\|
libc
\.
so
\.
6
\|
ld-linux
\.
so
\.
2"
elif
[[
"
$ARCH
"
==
x86_64
]]
;
then
white_list
=
"linux-vdso
\.
so
\.
1
\|
libpthread
\.
so
\.
0
\|
libm
\.
so
\.
6
\|
libc
\.
so
\.
6
\|
ld-linux-x86-64
\.
so
\.
2"
elif
[[
"
$ARCH
"
==
s390x_64
]]
;
then
if
[[
$host_machine
!=
s390x
]]
;
then
dump_cmd
=
'objdump -p '
"
$1
"
' | grep NEEDED'
fi
white_list
=
"linux-vdso64
\.
so
\.
1
\|
libpthread
\.
so
\.
0
\|
libm
\.
so
\.
6
\|
libc
\.
so
\.
6
\|
libz
\.
so
\.
1
\|
ld64
\.
so
\.
1"
elif
[[
"
$ARCH
"
==
ppcle_64
]]
;
then
if
[[
$host_machine
!=
ppc64le
]]
;
then
dump_cmd
=
'objdump -p '
"
$1
"
' | grep NEEDED'
...
...
@@ -215,6 +226,9 @@ elif [[ "$(uname)" == Linux* ]]; then
elif
[[
"
$ARCH
"
==
ppcle_64
]]
;
then
CXXFLAGS
=
"
$CXXFLAGS
-m64"
CONFIGURE_ARGS
=
"
$CONFIGURE_ARGS
--host=powerpc64le-linux-gnu"
elif
[[
"
$ARCH
"
==
s390x_64
]]
;
then
CXXFLAGS
=
"
$CXXFLAGS
-m64"
CONFIGURE_ARGS
=
"
$CONFIGURE_ARGS
--host=s390x-linux-gnu"
else
fail
"Unsupported arch:
$ARCH
"
fi
...
...
protoc-artifacts/build-zip.sh
View file @
7ba4a99e
...
...
@@ -13,7 +13,7 @@ Example:
This script will download pre-built protoc or protoc plugin binaries from maven
repository and create .zip packages suitable to be included in the github
release page. If the target is protoc, well-known type .proto files will also be
included. Each invocation will create
8
zip packages:
included. Each invocation will create
9
zip packages:
dist/<TARGET>-<VERSION_NUMBER>-win32.zip
dist/<TARGET>-<VERSION_NUMBER>-win64.zip
dist/<TARGET>-<VERSION_NUMBER>-osx-x86_32.zip
...
...
@@ -22,6 +22,7 @@ included. Each invocation will create 8 zip packages:
dist/<TARGET>-<VERSION_NUMBER>-linux-x86_64.zip
dist/<TARGET>-<VERSION_NUMBER>-linux-aarch_64.zip
dist/<TARGET>-<VERSION_NUMBER>-linux-ppcle_64.zip
dist/<TARGET>-<VERSION_NUMBER>-linux-s390x_64.zip
EOF
exit
1
fi
...
...
@@ -39,6 +40,7 @@ declare -a FILE_NAMES=( \
linux-x86_64.zip linux-x86_64.exe
\
linux-aarch_64.zip linux-aarch_64.exe
\
linux-ppcle_64.zip linux-ppcle_64.exe
\
linux-s390x_64.zip linux-s390x_64.exe
\
)
# List of all well-known types to be included.
...
...
protoc-artifacts/pom.xml
View file @
7ba4a99e
...
...
@@ -84,6 +84,11 @@
<file>
${basedir}/target/linux/ppcle_64/protoc.exe
</file>
<classifier>
linux-ppcle_64
</classifier>
<type>
exe
</type>
</artifact>
<artifact>
<file>
${basedir}/target/linux/s390x_64/protoc.exe
</file>
<classifier>
linux-s390x_64
</classifier>
<type>
exe
</type>
</artifact>
</artifacts>
</configuration>
...
...
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