aboutsummaryrefslogtreecommitdiff
path: root/scripts/build-arch.sh
diff options
context:
space:
mode:
authorDavid Timber <mieabby@gmail.com>2020-08-20 12:23:35 +0930
committerDavid Timber <mieabby@gmail.com>2020-08-20 15:15:57 +0930
commit76d4d6b2bafada7b790e817b7324d53f3d3a0c7f (patch)
treed8b3669fa7b167fc3bf764e971fc6e70bd8d9b49 /scripts/build-arch.sh
parent7bd3eb3b1ad4209ac4cf4b46f849213d46bc33aa (diff)
Progress ...
* Move DVault out of executable. Dynamically load it on startup * Improved testing scheme * Tidy up prne_*assert* macro series * Protocol: store host credentials in base64 string. No mask * Use the lock shm as a shared_global so the stats can persist * mmap() the executable read-only for later use
Diffstat (limited to 'scripts/build-arch.sh')
-rwxr-xr-xscripts/build-arch.sh30
1 files changed, 30 insertions, 0 deletions
diff --git a/scripts/build-arch.sh b/scripts/build-arch.sh
new file mode 100755
index 0000000..7c5301f
--- /dev/null
+++ b/scripts/build-arch.sh
@@ -0,0 +1,30 @@
+#!/bin/bash
+set -e
+
+MISC_BIN="
+ proone-stress
+ proone-resolv
+ proone-test_proto
+ proone-test_util
+"
+
+separate_debug() {
+ cp -a "$1" "$2"
+ "$PROONE_HOST-objcopy" --only-keep-debug "$2" "$3"
+ "$PROONE_HOST-strip" -S --strip-unneeded --remove-section=.note.gnu.gold-version --remove-section=.comment --remove-section=.note --remove-section=.note.gnu.build-id --remove-section=.note.ABI-tag --remove-section=.jcr --remove-section=.got.plt --remove-section=.eh_frame --remove-section=.eh_frame_ptr --remove-section=.eh_frame_hdr "$2"
+ "$PROONE_HOST-objcopy" --add-gnu-debuglink="$3" "$2"
+}
+
+BIN_PATH="$PROONE_EXEC_PREFIX.$PROONE_BIN_ARCH"
+
+./configure --host="$PROONE_HOST" $PROONE_AM_CONF
+cd src
+make -j$(nproc) proone.bin $MISC_BIN
+cd ..
+
+separate_debug src/proone.bin "$BIN_PATH" "$PROONE_DEBUG_SYM_PREFIX""proone.sym.$PROONE_BIN_ARCH"
+for b in $MISC_BIN; do
+ separate_debug "src/$b" "$PROONE_MISC_BIN_PREFIX/$b.$PROONE_BIN_ARCH" "$PROONE_DEBUG_SYM_PREFIX""$b.sym.$PROONE_BIN_ARCH"
+done
+
+make distclean