瀏覽代碼

Add support for power ppc64le

pravin-dsilva 7 年之前
父節點
當前提交
36ba04b579
共有 3 個文件被更改,包括 10 次插入2 次删除
  1. 6 0
      protoc-artifacts/build-protoc.sh
  2. 3 1
      protoc-artifacts/build-zip.sh
  3. 1 1
      protoc-artifacts/pom.xml

+ 6 - 0
protoc-artifacts/build-protoc.sh

@@ -81,6 +81,8 @@ checkArch ()
         assertEq $format "elf64-x86-64" $LINENO
         assertEq $format "elf64-x86-64" $LINENO
       elif [[ "$ARCH" == aarch_64 ]]; then
       elif [[ "$ARCH" == aarch_64 ]]; then
         assertEq $format "elf64-little" $LINENO
         assertEq $format "elf64-little" $LINENO
+      elif [[ "$ARCH" == ppcle_64 ]]; then
+        assertEq $format "elf64-powerpcle" $LINENO
       else
       else
         fail "Unsupported arch: $ARCH"
         fail "Unsupported arch: $ARCH"
       fi
       fi
@@ -124,6 +126,8 @@ checkDependencies ()
       white_list="linux-gate\.so\.1\|libpthread\.so\.0\|libm\.so\.6\|libc\.so\.6\|ld-linux\.so\.2"
       white_list="linux-gate\.so\.1\|libpthread\.so\.0\|libm\.so\.6\|libc\.so\.6\|ld-linux\.so\.2"
     elif [[ "$ARCH" == x86_64 ]]; then
     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"
       white_list="linux-vdso\.so\.1\|libpthread\.so\.0\|libm\.so\.6\|libc\.so\.6\|ld-linux-x86-64\.so\.2"
+    elif [[ "$ARCH" == ppcle_64 ]]; then
+      white_list="linux-vdso64\.so\.1\|libpthread\.so\.0\|libm\.so\.6\|libc\.so\.6\|libz\.so\.1\|ld64\.so\.2"
     elif [[ "$ARCH" == aarch_64 ]]; then
     elif [[ "$ARCH" == aarch_64 ]]; then
       dump_cmd='objdump -p '"$1"' | grep NEEDED'
       dump_cmd='objdump -p '"$1"' | grep NEEDED'
       white_list="libpthread\.so\.0\|libc\.so\.6\|ld-linux-aarch64\.so\.1"
       white_list="libpthread\.so\.0\|libc\.so\.6\|ld-linux-aarch64\.so\.1"
@@ -193,6 +197,8 @@ elif [[ "$(uname)" == Linux* ]]; then
       CXXFLAGS="$CXXFLAGS -m32"
       CXXFLAGS="$CXXFLAGS -m32"
     elif [[ "$ARCH" == aarch_64 ]]; then
     elif [[ "$ARCH" == aarch_64 ]]; then
       CONFIGURE_ARGS="$CONFIGURE_ARGS --host=aarch64-linux-gnu"
       CONFIGURE_ARGS="$CONFIGURE_ARGS --host=aarch64-linux-gnu"
+    elif [[ "$ARCH" == ppcle_64 ]]; then
+      CXXFLAGS="$CXXFLAGS -m64"
     else
     else
       fail "Unsupported arch: $ARCH"
       fail "Unsupported arch: $ARCH"
     fi
     fi

+ 3 - 1
protoc-artifacts/build-zip.sh

@@ -13,13 +13,14 @@ Example:
 This script will download pre-built protoc or protoc plugin binaries from maven
 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
 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
 release page. If the target is protoc, well-known type .proto files will also be
-included. Each invocation will create 6 zip packages:
+included. Each invocation will create 7 zip packages:
   dist/<TARGET>-<VERSION_NUMBER>-win32.zip
   dist/<TARGET>-<VERSION_NUMBER>-win32.zip
   dist/<TARGET>-<VERSION_NUMBER>-osx-x86_32.zip
   dist/<TARGET>-<VERSION_NUMBER>-osx-x86_32.zip
   dist/<TARGET>-<VERSION_NUMBER>-osx-x86_64.zip
   dist/<TARGET>-<VERSION_NUMBER>-osx-x86_64.zip
   dist/<TARGET>-<VERSION_NUMBER>-linux-x86_32.zip
   dist/<TARGET>-<VERSION_NUMBER>-linux-x86_32.zip
   dist/<TARGET>-<VERSION_NUMBER>-linux-x86_64.zip
   dist/<TARGET>-<VERSION_NUMBER>-linux-x86_64.zip
   dist/<TARGET>-<VERSION_NUMBER>-linux-aarch_64.zip
   dist/<TARGET>-<VERSION_NUMBER>-linux-aarch_64.zip
+  dist/<TARGET>-<VERSION_NUMBER>-linux-ppcle_64.zip
 EOF
 EOF
   exit 1
   exit 1
 fi
 fi
@@ -35,6 +36,7 @@ declare -a FILE_NAMES=( \
   linux-x86_32.zip linux-x86_32.exe \
   linux-x86_32.zip linux-x86_32.exe \
   linux-x86_64.zip linux-x86_64.exe \
   linux-x86_64.zip linux-x86_64.exe \
   linux-aarch_64.zip linux-aarch_64.exe \
   linux-aarch_64.zip linux-aarch_64.exe \
+  linux-ppcle_64.zip linux-ppcle_64.exe \
 )
 )
 
 
 # List of all well-known types to be included.
 # List of all well-known types to be included.

+ 1 - 1
protoc-artifacts/pom.xml

@@ -37,7 +37,7 @@
       <extension>
       <extension>
         <groupId>kr.motd.maven</groupId>
         <groupId>kr.motd.maven</groupId>
         <artifactId>os-maven-plugin</artifactId>
         <artifactId>os-maven-plugin</artifactId>
-        <version>1.2.3.Final</version>
+        <version>1.5.0.Final</version>
       </extension>
       </extension>
     </extensions>
     </extensions>
     <plugins>
     <plugins>