Skip to content

Commit

Permalink
update build scripts to use STRIP variable for stripping binaries
Browse files Browse the repository at this point in the history
JIRA: RTOS-840
  • Loading branch information
lukileczo committed May 28, 2024
1 parent be677de commit 89d4818
Show file tree
Hide file tree
Showing 14 changed files with 19 additions and 18 deletions.
2 changes: 1 addition & 1 deletion azure_sdk/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ install_binary () {
BINARY_NAME="$(basename "$1")"

cp "$1" "${PREFIX_PROG}"
"${CROSS}strip" -s "${PREFIX_PROG}/${BINARY_NAME}" -o "$PREFIX_PROG_STRIPPED/${BINARY_NAME}"
$STRIP "${PREFIX_PROG}/${BINARY_NAME}" -o "$PREFIX_PROG_STRIPPED/${BINARY_NAME}"
b_install "${PREFIX_PROG_STRIPPED}/${BINARY_NAME}" /bin
}

Expand Down
5 changes: 3 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,11 @@ else
fi
export HOST_TARGET HOST

# use CFLAGS/LDFLAGS taken from make
# use CFLAGS/LDFLAGS/STRIP taken from make
CFLAGS="$EXPORT_CFLAGS"
LDFLAGS="$EXPORT_LDFLAGS"
export CFLAGS LDFLAGS
STRIP="$EXPORT_STRIP"
export CFLAGS LDFLAGS STRIP


if [ -n "$PORTS_INSTALL_STRIPPED" ] && [ "$PORTS_INSTALL_STRIPPED" = "n" ]; then
Expand Down
2 changes: 1 addition & 1 deletion coremark/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,5 @@ export XLFLAGS="${LDFLAGS}"
PORT_DIR=phoenix make compile

cp -a "$PREFIX_COREMARK_BUILD/${COREMARK}/coremark" "$PREFIX_PROG/coremark"
"${CROSS}strip" -s "${PREFIX_PROG}/coremark" -o "${PREFIX_PROG_STRIPPED}/coremark"
$STRIP -s "${PREFIX_PROG}/coremark" -o "${PREFIX_PROG_STRIPPED}/coremark"
b_install "$PREFIX_PORTS_INSTALL/coremark" /bin
2 changes: 1 addition & 1 deletion curl/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,5 @@ make -C "$PREFIX_CURL_BUILD" install
cp -a "$PREFIX_CURL_INSTALL/include/curl" "$PREFIX_H"
cp -a "$PREFIX_CURL_INSTALL/lib/"* "$PREFIX_A"
cp -a "$PREFIX_CURL_INSTALL/bin/curl" "$PREFIX_PROG/curl"
"${CROSS}strip" -s "$PREFIX_PROG/curl" -o "$PREFIX_PROG_STRIPPED/curl"
$STRIP -s "$PREFIX_PROG/curl" -o "$PREFIX_PROG_STRIPPED/curl"
b_install "$PREFIX_PORTS_INSTALL/curl" /usr/bin/
2 changes: 1 addition & 1 deletion dropbear/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ fi
# create multi-binary and hardlinks
make PROGRAMS="dropbear dbclient dropbearkey scp" -C "${PREFIX_DROPBEAR_BUILD}" CROSS_COMPILE="$CROSS" MULTI=1 NO_ADDTL_WARNINGS=1

"${CROSS}strip" -s "$PREFIX_DROPBEAR_BUILD/dropbearmulti" -o "$PREFIX_PROG_STRIPPED/dropbearmulti"
$STRIP -s "$PREFIX_DROPBEAR_BUILD/dropbearmulti" -o "$PREFIX_PROG_STRIPPED/dropbearmulti"
cp -a "$PREFIX_DROPBEAR_BUILD/dropbearmulti" "$PREFIX_PROG/dropbearmulti"

b_install "$PREFIX_PORTS_INSTALL/dropbearmulti" /usr/bin
Expand Down
2 changes: 1 addition & 1 deletion fs_mark/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,5 @@ done
cd "${PREFIX_FS_MARK_BUILD}/${FS_MARK}" && make

cp -a "$PREFIX_FS_MARK_BUILD/${FS_MARK}/fs_mark" "$PREFIX_PROG/fs_mark"
"${CROSS}strip" -s "${PREFIX_PROG}/fs_mark" -o "${PREFIX_PROG_STRIPPED}/fs_mark"
$STRIP -s "${PREFIX_PROG}/fs_mark" -o "${PREFIX_PROG_STRIPPED}/fs_mark"
b_install "$PREFIX_PORTS_INSTALL/fs_mark" /bin
2 changes: 1 addition & 1 deletion lighttpd/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,5 @@ fi

make -C "${PREFIX_LIGHTTPD_BUILD}" install

"${CROSS}strip" -s "$PREFIX_PROG/lighttpd" -o "$PREFIX_PROG_STRIPPED/lighttpd"
$STRIP -s "$PREFIX_PROG/lighttpd" -o "$PREFIX_PROG_STRIPPED/lighttpd"
b_install "$PREFIX_PORTS_INSTALL/lighttpd" /usr/sbin
4 changes: 2 additions & 2 deletions lua/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ fi
# FIXME: no out-of-tree building
make -C "$PREFIX_LUA_SRC" posix

"${CROSS}strip" -s "$PREFIX_LUA_SRC/src/lua" -o "$PREFIX_PROG_STRIPPED/lua"
"${CROSS}strip" -s "$PREFIX_LUA_SRC/src/luac" -o "$PREFIX_PROG_STRIPPED/luac"
$STRIP -s "$PREFIX_LUA_SRC/src/lua" -o "$PREFIX_PROG_STRIPPED/lua"
$STRIP -s "$PREFIX_LUA_SRC/src/luac" -o "$PREFIX_PROG_STRIPPED/luac"
cp -a "$PREFIX_LUA_SRC/src/lua" "$PREFIX_PROG/lua"
cp -a "$PREFIX_LUA_SRC/src/luac" "$PREFIX_PROG/luac"

Expand Down
4 changes: 2 additions & 2 deletions openiked/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ popd

cp -a "${PREFIX_OPENIKED_INSTALL}/usr/local/sbin/ikectl" "${PREFIX_PROG}/ikectl"
cp -a "${PREFIX_OPENIKED_INSTALL}/usr/local/sbin/iked" "${PREFIX_PROG}/iked"
"${CROSS}strip" -s "${PREFIX_PROG}/ikectl" -o "${PREFIX_PROG_STRIPPED}/ikectl"
"${CROSS}strip" -s "${PREFIX_PROG}/iked" -o "${PREFIX_PROG_STRIPPED}/iked"
$STRIP -s "${PREFIX_PROG}/ikectl" -o "${PREFIX_PROG_STRIPPED}/ikectl"
$STRIP -s "${PREFIX_PROG}/iked" -o "${PREFIX_PROG_STRIPPED}/iked"
b_install "${PREFIX_PORTS_INSTALL}/ikectl" /usr/bin
b_install "${PREFIX_PORTS_INSTALL}/iked" /usr/bin
2 changes: 1 addition & 1 deletion openssl/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,5 @@ cp -a "$PREFIX_OPENSSL_INSTALL/lib/pkgconfig" "$PREFIX_A"
sed -i "s/openssl\/install$/lib\/pkgconfg/" "$PREFIX_A/pkgconfig/"*

cp -a "$PREFIX_OPENSSL_INSTALL/bin/openssl" "$PREFIX_PROG"
"${CROSS}strip" -s "$PREFIX_PROG/openssl" -o "$PREFIX_PROG_STRIPPED/openssl"
$STRIP -s "$PREFIX_PROG/openssl" -o "$PREFIX_PROG_STRIPPED/openssl"
b_install "$PREFIX_PORTS_INSTALL/openssl" /usr/bin/
2 changes: 1 addition & 1 deletion openvpn/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,5 @@ fi
make -C "$PREFIX_OPENVPN_BUILD"
make -C "$PREFIX_OPENVPN_BUILD" install-exec

"${CROSS}strip" -s "$PREFIX_PROG/openvpn" -o "$PREFIX_PROG_STRIPPED/openvpn"
$STRIP -s "$PREFIX_PROG/openvpn" -o "$PREFIX_PROG_STRIPPED/openvpn"
b_install "$PREFIX_PORTS_INSTALL/openvpn" /sbin/
2 changes: 1 addition & 1 deletion picocom/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export LDFLAGS="${CFLAGS} $LDFLAGS"
#
(cd "${PREFIX_PCOM_SRC}" && make clean && make)
cp -a "${PREFIX_PCOM_SRC}/picocom" "$PREFIX_PROG"
"${CROSS}strip" -s "${PREFIX_PROG}/picocom" -o "$PREFIX_PROG_STRIPPED/picocom"
$STRIP -s "${PREFIX_PROG}/picocom" -o "$PREFIX_PROG_STRIPPED/picocom"


b_install "${PREFIX_PROG_STRIPPED}/picocom" /bin
2 changes: 1 addition & 1 deletion sscep/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,5 @@ make install DESTDIR="$PREFIX_SSCEP_INSTALL"
popd

cp -a "${PREFIX_SSCEP_INSTALL}/bin/sscep" "${PREFIX_PROG}/sscep"
"${CROSS}strip" -s "${PREFIX_PROG}/sscep" -o "${PREFIX_PROG_STRIPPED}/sscep"
$STRIP -s "${PREFIX_PROG}/sscep" -o "${PREFIX_PROG_STRIPPED}/sscep"
b_install "${PREFIX_PORTS_INSTALL}/sscep" /usr/bin
4 changes: 2 additions & 2 deletions wpa_supplicant/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ popd

cp -a "${PREFIX_WPA_SUPPLICANT_INSTALL}/bin/wpa_cli" "${PREFIX_PROG}/wpa_cli"
cp -a "${PREFIX_WPA_SUPPLICANT_INSTALL}/bin/wpa_supplicant" "${PREFIX_PROG}/wpa_supplicant"
"${CROSS}strip" -s "${PREFIX_PROG}/wpa_cli" -o "${PREFIX_PROG_STRIPPED}/wpa_cli"
"${CROSS}strip" -s "${PREFIX_PROG}/wpa_supplicant" -o "${PREFIX_PROG_STRIPPED}/wpa_supplicant"
$STRIP -s "${PREFIX_PROG}/wpa_cli" -o "${PREFIX_PROG_STRIPPED}/wpa_cli"
$STRIP -s "${PREFIX_PROG}/wpa_supplicant" -o "${PREFIX_PROG_STRIPPED}/wpa_supplicant"
b_install "${PREFIX_PORTS_INSTALL}/wpa_cli" /usr/bin
b_install "${PREFIX_PORTS_INSTALL}/wpa_supplicant" /usr/bin

0 comments on commit 89d4818

Please sign in to comment.