aboutsummaryrefslogtreecommitdiff
path: root/cmake/CheckLinkerFlag.c
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2017-12-22 21:48:31 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2017-12-31 14:26:12 +0000
commit776b44f17b44b92b08f8cc37ec87e74ac68762ea (patch)
treea2ef598f0454073e7e903b238a817ab755ae4acb /cmake/CheckLinkerFlag.c
parentMerge pull request #2955 (diff)
downloadmonero-776b44f17b44b92b08f8cc37ec87e74ac68762ea.tar.xz
Add misc hardening flags to the cmake machinery
See https://wiki.debian.org/Hardening#User_Space
Diffstat (limited to 'cmake/CheckLinkerFlag.c')
-rw-r--r--cmake/CheckLinkerFlag.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/cmake/CheckLinkerFlag.c b/cmake/CheckLinkerFlag.c
new file mode 100644
index 000000000..a0dcc168d
--- /dev/null
+++ b/cmake/CheckLinkerFlag.c
@@ -0,0 +1,14 @@
+#ifdef __CLASSIC_C__
+int main()
+{
+ int ac;
+ char* av[];
+#else
+int main(int ac, char* av[])
+{
+#endif
+ if (ac > 1000) {
+ return *av[0];
+ }
+ return 0;
+}