mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[IJI-2420] compile on musl linking statically
GitOrigin-RevId: bd3fd9b48e25bda95dae6719fa62cde553cf7968
This commit is contained in:
committed by
intellij-monorepo-bot
parent
963b497c66
commit
1725b9d802
@@ -1,5 +1,5 @@
|
||||
#!/bin/bash
|
||||
# Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
# Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
set -euo pipefail
|
||||
|
||||
VER="${1:-}"
|
||||
@@ -8,17 +8,5 @@ if [ -z "${VER:-}" ]; then
|
||||
fi
|
||||
|
||||
rm -f fsnotifier
|
||||
${CC:-clang} -O2 -Wall -Wextra -Wpedantic -D "VERSION=\"$VER\"" -std=c11 main.c inotify.c util.c -o fsnotifier
|
||||
${CC:-clang} -static -O2 -Wall -Wextra -Wpedantic -D "VERSION=\"$VER\"" -std=c11 main.c inotify.c util.c -o fsnotifier
|
||||
chmod 755 fsnotifier
|
||||
|
||||
# ensuring supported builds are compatible with RHEL/CentOS 7
|
||||
MAX_GLIBC_VERSION="2.17"
|
||||
ARCH=$(uname -m)
|
||||
if [ "$ARCH" = "x86_64" ] || [ "$ARCH" = "amd64" ] || [ "$ARCH" = "aarch64" ] || [ "$ARCH" = "arm64" ]; then
|
||||
glibc_version="$(objdump -x fsnotifier | grep -o "GLIBC_.*" | sort | uniq | cut -d _ -f 2 | sort -V | tail -n 1)"
|
||||
newest=$(printf "%s\n%s\n" "$MAX_GLIBC_VERSION" "$glibc_version" | sort -V | tail -n 1)
|
||||
if [ "$newest" != "$MAX_GLIBC_VERSION" ]; then
|
||||
echo "ERROR: fsnotifier uses glibc version $glibc_version which is newer than $MAX_GLIBC_VERSION"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user