pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/lang/ocaml/files
Module Name: pkgsrc
Committed By: jperkin
Date: Tue Jan 12 11:19:17 UTC 2021
Modified Files:
pkgsrc/lang/ocaml/files: wrapper.sh
Log Message:
ocaml: Fix ocamlmklib wrapper script for ld options.
Tested by wiz for relro.
To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 pkgsrc/lang/ocaml/files/wrapper.sh
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/lang/ocaml/files/wrapper.sh
diff -u pkgsrc/lang/ocaml/files/wrapper.sh:1.4 pkgsrc/lang/ocaml/files/wrapper.sh:1.5
--- pkgsrc/lang/ocaml/files/wrapper.sh:1.4 Sun Jan 10 11:13:33 2021
+++ pkgsrc/lang/ocaml/files/wrapper.sh Tue Jan 12 11:19:17 2021
@@ -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 @@ for flag in ${CFLAGS}; do
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
- MLFLAGS="${cflags}"
-else
+case "${WRAPPEE} $@" in
+ocamlmklib*)
MLFLAGS="${cflags} ${ldflags}"
-fi
+ ;;
+*" -c "*)
+ MLFLAGS="${cflags}"
+ ;;
+*)
+ MLFLAGS="${cflags} ${cldflags}"
+ ;;
+esac
exec "@OCAML_PREFIX@/bin/${WRAPPEE}" ${MLFLAGS} "$@"
Home |
Main Index |
Thread Index |
Old Index