forked from workfloworchestrator/PolyNSI
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgrpc-java-compiler.patch
More file actions
38 lines (38 loc) · 1.47 KB
/
grpc-java-compiler.patch
File metadata and controls
38 lines (38 loc) · 1.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
diff --git a/compiler/check-artifact.sh b/compiler/check-artifact.sh
index 13ae89c74..06b59e5ba 100755
--- a/compiler/check-artifact.sh
+++ b/compiler/check-artifact.sh
@@ -51,7 +51,7 @@ checkArch ()
{
echo
echo "Checking format of $1"
- if [[ "$OS" == windows || "$OS" == linux ]]; then
+ if [[ "$OS" == windows || "$OS" == linux || "$OS" == freebsd ]]; then
format="$(objdump -f "$1" | grep -o "file format .*$" | grep -o "[^ ]*$")"
echo Format=$format
if [[ "$OS" == linux ]]; then
@@ -64,6 +64,12 @@ checkArch ()
else
fail "Unsupported arch: $ARCH"
fi
+ elif [[ "$OS" == freebsd ]]; then
+ if [[ "$ARCH" == x86_64 ]]; then
+ assertEq "$format" "elf64-x86-64-freebsd" $LINENO
+ else
+ fail "Unsupported arch: $ARCH"
+ fi
else
# $OS == windows
if [[ "$ARCH" == x86_32 ]]; then
@@ -109,6 +115,11 @@ checkDependencies ()
dump_cmd='aarch64-linux-gnu-objdump -x '"$1"' |grep "NEEDED"'
white_list="linux-vdso\.so\.1\|libpthread\.so\.0\|libm\.so\.6\|libc\.so\.6\|ld-linux-aarch64\.so\.1"
fi
+ elif [[ "$OS" == freebsd ]]; then
+ if [[ "$ARCH" == x86_64 ]]; then
+ dump_cmd='ldd '"$1"' | tail -n +2'
+ white_list="libthr\.so\.3\|libc++\.so\.1\|libcxxrt\.so\.1\|libm\.so\.5\|libgcc_s\.so\.1\|libc\.so\.7"
+ fi
elif [[ "$OS" == osx ]]; then
dump_cmd='otool -L '"$1"' | fgrep dylib'
white_list="libz\.1\.dylib\|libc++.1.dylib\|libstdc++\.6\.dylib\|libSystem\.B\.dylib"