summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoakim Sindholt <opensource@zhasha.com>2015-08-28 14:39:46 +0200
committerJoakim Sindholt <opensource@zhasha.com>2015-08-28 14:39:46 +0200
commit668c6b8e4c12162c6bc591c6f9e23f281d7ddd74 (patch)
treee123c3906b8226ce9574312d5bc976341e6cbadb
parent21e0297a34c46cae38ab8bb00796fee98dc31722 (diff)
remove unnecessary LTOOPTS in favor of OPTS in linker
-rw-r--r--bin/p9l.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/p9l.sh b/bin/p9l.sh
index ad9f5e5..a32f449 100644
--- a/bin/p9l.sh
+++ b/bin/p9l.sh
@@ -179,15 +179,15 @@ if [ -e "${LIBDIR}/crti.o" ]; then CRTSTART+=("${LIBDIR}/crti.o"); fi
if [ -e "${LIBDIR}/rcrt1.o" ]; then CRTSTART+=("${LIBDIR}/rcrt1.o"); fi
if [ -e "${LIBDIR}/crtn.o" ]; then CRTEND+=("${LIBDIR}/crtn.o"); fi
-LTOOPTS=()
if [ $USE_LTO == true ]
then
- LTOOPTS+=("--plugin" "$(clang -print-file-name=LLVMgold.so)" "-plugin-opt=-march=${MARCH}")
+ OPTS+=("--plugin" "$(clang -print-file-name=LLVMgold.so)")
+ OPTS+=("-plugin-opt=-march=${MARCH}")
fi
ld.gold \
--gc-sections -pie -Bstatic -Bsymbolic -E -X -e "${START_SYM}" \
-z now -z nodlopen -z nodump -z nodelete -z noexecstack -z text \
- -nostdlib "${LTOOPTS[@]}" -L"${LIBDIR}" "${OPTS[@]}" -o "${OUTPUT_NAME}" \
+ -nostdlib -L"${LIBDIR}" "${OPTS[@]}" -o "${OUTPUT_NAME}" \
"${CRTSTART[@]}" '-(' "${FARGS[@]}" "${LIBS[@]}" '-)' "${CRTEND[@]}"
if [ $? -ne 0 ]; then exit 1; fi