pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/lang/ocaml/files ocaml: Fix ocamlmklib wrapper script ...
details: https://anonhg.NetBSD.org/pkgsrc/rev/af7cfbb38b53
branches: trunk
changeset: 444758:af7cfbb38b53
user: jperkin <jperkin%pkgsrc.org@localhost>
date: Tue Jan 12 11:19:17 2021 +0000
description:
ocaml: Fix ocamlmklib wrapper script for ld options.
Tested by wiz for relro.
diffstat:
lang/ocaml/files/wrapper.sh | 19 +++++++++++++------
1 files changed, 13 insertions(+), 6 deletions(-)
diffs (37 lines):
diff -r f85968b3e362 -r af7cfbb38b53 lang/ocaml/files/wrapper.sh
--- a/lang/ocaml/files/wrapper.sh Tue Jan 12 08:34:11 2021 +0000
+++ b/lang/ocaml/files/wrapper.sh Tue Jan 12 11:19:17 2021 +0000
@@ -1,6 +1,6 @@
#!@SH@
#
-# $NetBSD: wrapper.sh,v 1.4 2021/01/10 11:13:33 jperkin Exp $
+# $NetBSD: wrapper.sh,v 1.5 2021/01/12 11:19:17 jperkin Exp $
CFLAGS='@CFLAGS@'
LDFLAGS='@LDFLAGS@'
@@ -10,13 +10,20 @@
cflags="${cflags} -ccopt ${flag}"
done
for flag in ${LDFLAGS}; do
- ldflags="${ldflags} -ccopt ${flag}"
+ cldflags="${cldflags} -ccopt ${flag}"
+ ldflags="${ldflags} -ldopt ${flag}"
done
-if echo "$@" | grep ' -c ' >/dev/null; then
+case "${WRAPPEE} $@" in
+ocamlmklib*)
+ MLFLAGS="${cflags} ${ldflags}"
+ ;;
+*" -c "*)
MLFLAGS="${cflags}"
-else
- MLFLAGS="${cflags} ${ldflags}"
-fi
+ ;;
+*)
+ MLFLAGS="${cflags} ${cldflags}"
+ ;;
+esac
exec "@OCAML_PREFIX@/bin/${WRAPPEE}" ${MLFLAGS} "$@"
Home |
Main Index |
Thread Index |
Old Index