aboutsummaryrefslogtreecommitdiffstats
path: root/community
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2018-03-09 15:21:27 +0100
committerJakub Jirutka <jakub@jirutka.cz>2018-03-10 02:17:25 +0100
commit85f8b3d1175c4a611df8c9757bd927557cc86f9a (patch)
tree3f29e91387d9cdbf0c025f8f606806b70eaa6ce2 /community
parentb80a6560548dee8072800db92df85b9bbeb27911 (diff)
community/ocaml: build without debug info
Diffstat (limited to 'community')
-rw-r--r--community/ocaml/APKBUILD5
-rw-r--r--community/ocaml/compile-without-debug-info.patch15
2 files changed, 19 insertions, 1 deletions
diff --git a/community/ocaml/APKBUILD b/community/ocaml/APKBUILD
index 8dbe02227d9..622eae53815 100644
--- a/community/ocaml/APKBUILD
+++ b/community/ocaml/APKBUILD
@@ -18,6 +18,7 @@ subpackages="
$pkgname-runtime
"
source="http://caml.inria.fr/pub/distrib/ocaml-${pkgver%.*}/$pkgname-$pkgver.tar.gz
+ compile-without-debug-info.patch
fix-mcontext-fields.patch
fix-segfault-in-ppc64le.patch
"
@@ -29,7 +30,8 @@ build() {
# Strip out -fomit-frame-pointer due to -pg.
export CFLAGS="${CFLAGS/-fomit-frame-pointer/} -fPIC"
- ./configure -cc "${CC:-gcc}" \
+ ./configure \
+ -cc "${CC:-gcc}" \
--bindir /usr/bin \
--libdir /usr/lib/ocaml \
--mandir /usr/share/man \
@@ -109,5 +111,6 @@ _submv() {
}
sha512sums="42560874ce363212fa4e862138d7260113bc8dff8b39c040332bbd9b039ba938788344ba8ce63ffc0a251bf21a6e493f3c1e505b6f51db6fec4d21578921060e ocaml-4.06.1.tar.gz
+b42af74ae80428a0488bbb182ca5f48d35ce34d6ba336aa10904a78863e7e1e6b61303d5cd3ad89cba5329cb0983692ba92341e2058ea3e31bb22aa4f7b46dd8 compile-without-debug-info.patch
75c67e143a4a05b334bdebbad48ded1e04d383d8ea9b747df2633a5af96b1115b502510faf57753c71bbac38fbc9d9746b167861a63b2fd295901db0d22ea317 fix-mcontext-fields.patch
b2cef41400b31c1dcfd206c1534827f7b33b0afd6234b26fb95cf15c092affa85c27a615c14ece254ec326430f31b58ca70b9cc23a84ebf8baac2624bd5b0a71 fix-segfault-in-ppc64le.patch"
diff --git a/community/ocaml/compile-without-debug-info.patch b/community/ocaml/compile-without-debug-info.patch
new file mode 100644
index 00000000000..06b0eda8204
--- /dev/null
+++ b/community/ocaml/compile-without-debug-info.patch
@@ -0,0 +1,15 @@
+Significantly decrease size of bytecode-compiled binaries (and slightly
+even natives).
+--- a/Makefile
++++ b/Makefile
+@@ -52,8 +52,8 @@
+ CAMLYACC ?= boot/ocamlyacc
+ include stdlib/StdlibModules
+
+-CAMLC=$(CAMLRUN) boot/ocamlc -g -nostdlib -I boot -use-prims byterun/primitives
+-CAMLOPT=$(CAMLRUN) ./ocamlopt -g -nostdlib -I stdlib -I otherlibs/dynlink
++CAMLC=$(CAMLRUN) boot/ocamlc -nostdlib -I boot -use-prims byterun/primitives
++CAMLOPT=$(CAMLRUN) ./ocamlopt -nostdlib -I stdlib -I otherlibs/dynlink
+ ARCHES=amd64 i386 arm arm64 power s390x
+ INCLUDES=-I utils -I parsing -I typing -I bytecomp -I middle_end \
+ -I middle_end/base_types -I asmcomp -I asmcomp/debug \