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
3d2f72bf
Commit
3d2f72bf
authored
7 years ago
by
Jisi Liu
Committed by
GitHub
7 years ago
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3496 from pherl/mingw64
Static link pthread for mingw64 protoc and enable cross compile
parents
f6196219
6654c8dd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
4 deletions
+11
-4
README.md
protoc-artifacts/README.md
+6
-0
build-protoc.sh
protoc-artifacts/build-protoc.sh
+5
-4
No files found.
protoc-artifacts/README.md
View file @
3d2f72bf
...
...
@@ -72,6 +72,7 @@ deployment for all platforms. Currently the following platforms are supported:
-
Windows (x86_32 and x86_64) with
-
Cygwin64 with MinGW compilers (x86_64)
-
MSYS with MinGW32 (x86_32)
-
Cross compile in Linux with MinGW-w64 (x86_32, x86_64)
-
MacOSX (x86_32 and x86_64)
As for MSYS2/MinGW64 for Windows: protoc will build, but it insists on
...
...
@@ -98,6 +99,9 @@ $ mvn clean deploy -P release -Dstaging.repository=comgoogle-123
A 32-bit artifact can be deployed from a 64-bit host with
``-Dos.detected.arch=x86_32``
A windows artifact can be deployed from a linux machine with
``-Dos.detected.name=windows``
When you have done deployment for all platforms, go to
https://oss.sonatype.org/#stagingRepositories, verify that the staging
repository has all the binaries, close and release this repository.
...
...
@@ -173,5 +177,7 @@ We have successfully built artifacts on the following environments:
-
Centos 6.6 (within Docker 1.6.1)
-
Ubuntu 14.04.2 64-bit
-
Windows x86_32: MSYS with
``mingw32-gcc-g++ 4.8.1-4``
on Windows 7 64-bit
-
Windows x86_32: Cross compile with
``i686-w64-mingw32-g++ 4.8.2``
on Ubuntu 14.04.2 64-bit
-
Windows x86_64: Cygwin64 with
``mingw64-x86_64-gcc-g++ 4.8.3-1``
on Windows 7 64-bit
-
Windows x86_64: Cross compile with
``x86_64-w64-mingw32-g++ 4.8.2``
on Ubuntu 14.04.2 64-bit
-
Mac OS X x86_32 and x86_64: Mac OS X 10.9.5
This diff is collapsed.
Click to expand it.
protoc-artifacts/build-protoc.sh
View file @
3d2f72bf
...
...
@@ -185,8 +185,6 @@ elif [[ "$(uname)" == Linux* ]]; then
fi
elif
[[
"
$OS
"
==
windows
]]
;
then
# Cross-compilation for Windows
# TODO(zhangkun83) MinGW 64 always adds dependency on libwinpthread-1.dll,
# which is undesirable for repository deployment.
CONFIGURE_ARGS
=
"
$CONFIGURE_ARGS
"
if
[[
"
$ARCH
"
==
x86_64
]]
;
then
CONFIGURE_ARGS
=
"
$CONFIGURE_ARGS
--host=x86_64-w64-mingw32"
...
...
@@ -215,8 +213,11 @@ fi
# Statically link libgcc and libstdc++.
# -s to produce stripped binary.
# And they don't work under Mac.
if
[[
"
$OS
"
!=
osx
]]
;
then
if
[[
"
$OS
"
==
windows
]]
;
then
# Also static link libpthread required by mingw64
LDFLAGS
=
"
$LDFLAGS
-static-libgcc -static-libstdc++ -Wl,-Bstatic -lstdc++ -lpthread -s"
elif
[[
"
$OS
"
!=
osx
]]
;
then
# And they don't work under Mac.
LDFLAGS
=
"
$LDFLAGS
-static-libgcc -static-libstdc++ -s"
fi
...
...
This diff is collapsed.
Click to expand it.
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