summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOri Bernstein <ori@markovcorp.com>2018-01-27 12:33:13 -0800
committerOri Bernstein <ori@markovcorp.com>2018-01-27 12:33:13 -0800
commitfcfba8c44c5ee110b7b5fd86d752fdeec33eeb0b (patch)
tree12004bff4d88df91575a5cd9d4b40bfa64aa7fd1
parent4c94aae21c2c2aec19d4fd5871cfe92bc09303a7 (diff)
downloadmc-fcfba8c44c5ee110b7b5fd86d752fdeec33eeb0b.tar.gz
GC sections by default.
Why make our binaries oversized?
-rwxr-xr-xconfigure6
1 files changed, 3 insertions, 3 deletions
diff --git a/configure b/configure
index c1d433c..916afe0 100755
--- a/configure
+++ b/configure
@@ -48,7 +48,7 @@ case $OS in
echo 'export SYS=linux' >> config.mk
echo export INST_MAN=$prefix/share/man/man >> config.mk
echo 'const Sys = "Linux"' >> mbld/config.myr
- echo 'const Linkcmd = ["ld"]' >> mbld/config.myr
+ echo 'const Linkcmd = ["ld", "--gc-sections"]' >> mbld/config.myr
echo 'const Dlflags = ["-dynamic-linker",' \
'"/lib64/ld-linux-x86-64.so.2"]' >> mbld/config.myr
echo "const Manpath = \"share/man/man\"" >> mbld/config.myr
@@ -73,7 +73,7 @@ case $OS in
echo 'export SYS=freebsd' >> config.mk
echo export INST_MAN=$prefix/man/man >> config.mk
echo 'const Sys = "FreeBSD"' >> mbld/config.myr
- echo 'const Linkcmd = ["ld"]' >> mbld/config.myr
+ echo 'const Linkcmd = ["ld", "--gc-sections"]' >> mbld/config.myr
echo 'const Dlflags : byte[:][:] = [][:]' >> mbld/config.myr
echo "const Manpath = \"man/man\"" >> mbld/config.myr
;;
@@ -89,7 +89,7 @@ case $OS in
echo 'export SYS=openbsd' >> config.mk
echo export INST_MAN=$prefix/man/man >> config.mk
echo 'const Sys = "OpenBSD"' >> mbld/config.myr
- echo 'const Linkcmd = ["ld", "-nopie"]' >> mbld/config.myr
+ echo 'const Linkcmd = ["ld", "-nopie", "--gc-sections"]' >> mbld/config.myr
echo 'const Dlflags = ["-dynamic-linker",' \
'"/usr/libexec/ld.so"]' >> mbld/config.myr
echo "const Manpath = \"man/man\"" >> mbld/config.myr