summaryrefslogtreecommitdiffhomepage
path: root/contrib/npclient/COMPILE.TXT
diff options
context:
space:
mode:
authormrsanchos <orokhovatskiy@gmail.com>2018-02-16 21:05:36 +0300
committermrsanchos <orokhovatskiy@gmail.com>2018-02-16 21:05:36 +0300
commitb52fd95f1cc86e86ecb696eab07c8d6b6a2e9f5d (patch)
treea8d5a8c98d8ca3b60b0805504049275a3311f59b /contrib/npclient/COMPILE.TXT
parent82c43da829fdac974b3d6adb8742715382ddd051 (diff)
parent7a973ae2ad396c8413405e40bcb2eaab67c95d15 (diff)
Merge branch 'unstable' of https://github.com/opentrack/opentrack into unstable
Diffstat (limited to 'contrib/npclient/COMPILE.TXT')
-rw-r--r--contrib/npclient/COMPILE.TXT18
1 files changed, 14 insertions, 4 deletions
diff --git a/contrib/npclient/COMPILE.TXT b/contrib/npclient/COMPILE.TXT
index d355fbcc..aee101d0 100644
--- a/contrib/npclient/COMPILE.TXT
+++ b/contrib/npclient/COMPILE.TXT
@@ -3,9 +3,19 @@
# This makes small binaries:
CC=clang
-CFLAGS='-Wall -Wextra -Wpedantic -Os -s -ffunction-sections -fdata-sections -Wl,--kill-at,--nxcompat,--dynamicbase,--as-needed,--gc-sections,--strip-all'
+
+CFLAGS=' \
+-Wall -Wextra -Wpedantic -Os -fomit-frame-pointer -mtune=generic \
+-ffunction-sections -fdata-sections -fvisibility=hidden \
+-Wl,--kill-at,--nxcompat,--dynamicbase,--as-needed,--gc-sections \
+-Wl,--no-insert-timestamp \
+-fno-math-errno -fno-trapping-math -fmerge-all-constants \
+-fno-stack-protector \
+'
+
+STRIP='strip --strip-all --remove-section=.eh_frame'
cd -- "$(dirname -- "$0")" &&
-PATH=/mingw32/bin:"$PATH" sh -c "$CC -m32 $CFLAGS -mdll -o NPClient.dll npclient.c" &&
-PATH=/mingw64/bin:"$PATH" sh -c "$CC -m64 $CFLAGS -mdll -o NPClient64.dll npclient.c" &&
-ls -l NPClient{64,}.dll && mv NPClient{64,}.dll ../../bin/
+PATH=/mingw32/bin:"$PATH" sh -c "$CC -m32 -march=pentium4 $CFLAGS -mdll -o NPClient.dll npclient.c && $STRIP NPClient.dll" &&
+PATH=/mingw64/bin:"$PATH" sh -c "$CC -m64 -Wl,--high-entropy-va $CFLAGS -mdll -o NPClient64.dll npclient.c && $STRIP NPClient64.dll" &&
+ls -l NPClient{,64}.dll && openssl md5 NPClient{,64}.dll && mv NPClient{,64}.dll ../../bin/