• Home
  • Raw
  • Download

Lines Matching +full:x86_64 +full:- +full:w64 +full:- +full:mingw32

5 # Usage: build-protoc.sh <OS> <ARCH>
6 # <OS> and <ARCH> are ${os.detected.name} and ${os.detected.arch} from os-maven-plugin
37 if [ -z "$lineno" ]; then
50 # Usage: checkArch <path-to-protoc>
56 format="$(objdump -f "$1" | grep -o "file format .*$" | grep -o "[^ ]*$")"
60 assertEq $format "elf32-i386" $LINENO
61 elif [[ "$ARCH" == x86_64 ]]; then
62 assertEq $format "elf64-x86-64" $LINENO
69 assertEq $format "pei-i386" $LINENO
70 elif [[ "$ARCH" == x86_64 ]]; then
71 assertEq $format "pei-x86-64" $LINENO
77 format="$(file -b "$1" | grep -o "[^ ]*$")"
81 elif [[ "$ARCH" == x86_64 ]]; then
82 assertEq $format "x86_64" $LINENO
94 # Usage: checkDependencies <path-to-protoc>
98 dump_cmd='objdump -x '"$1"' | fgrep "DLL Name"'
103 white_list="linux-gate\.so\.1\|libpthread\.so\.0\|libm\.so\.6\|libc\.so\.6\|ld-linux\.so\.2"
104 elif [[ "$ARCH" == x86_64 ]]; then
105 …white_list="linux-vdso\.so\.1\|libpthread\.so\.0\|libm\.so\.6\|libc\.so\.6\|ld-linux-x86-64\.so\.2"
108 dump_cmd='otool -L '"$1"' | fgrep dylib'
111 if [[ -z "$white_list" || -z "$dump_cmd" ]]; then
112 fail "Unsupported platform $OS-$ARCH."
115 eval $dump_cmd | grep -i "$white_list" || fail "doesn't show any expected dependencies"
117 eval $dump_cmd | grep -i -v "$white_list"
135 CONFIGURE_ARGS="--disable-shared"
142 # Override the default value set in configure.ac that has '-g' which produces
144 CXXFLAGS="-DNDEBUG"
149 # Use mingw32 compilers because executables produced by Cygwin compiler
151 if [[ "$ARCH" == x86_64 ]]; then
152 CONFIGURE_ARGS="$CONFIGURE_ARGS --host=x86_64-w64-mingw32"
154 CONFIGURE_ARGS="$CONFIGURE_ARGS --host=i686-pc-mingw32"
158 elif [[ "$(uname)" == MINGW32* ]]; then
163 assertEq "$ARCH" x86_64 $LINENO
166 if [[ "$ARCH" == x86_64 ]]; then
167 CXXFLAGS="$CXXFLAGS -m64"
169 CXXFLAGS="$CXXFLAGS -m32"
174 # Cross-compilation for Windows
175 # TODO(zhangkun83) MinGW 64 always adds dependency on libwinpthread-1.dll,
178 if [[ "$ARCH" == x86_64 ]]; then
179 CONFIGURE_ARGS="$CONFIGURE_ARGS --host=x86_64-w64-mingw32"
181 CONFIGURE_ARGS="$CONFIGURE_ARGS --host=i686-w64-mingw32"
191 CXXFLAGS="$CXXFLAGS -mmacosx-version-min=10.7"
192 if [[ "$ARCH" == x86_64 ]]; then
193 CXXFLAGS="$CXXFLAGS -m64"
195 CXXFLAGS="$CXXFLAGS -m32"
204 # -s to produce stripped binary.
207 LDFLAGS="$LDFLAGS -static-libgcc -static-libstdc++ -s"
216 cd "$WORKING_DIR" && mkdir -p target &&
221 # Since Mac linker doesn't accept "-s", we need to run strip