aboutsummaryrefslogtreecommitdiffstats
path: root/math/clad/files/patch-demos_ErrorEstimation_PrintModel_PrintModel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'math/clad/files/patch-demos_ErrorEstimation_PrintModel_PrintModel.cpp')
-rw-r--r--math/clad/files/patch-demos_ErrorEstimation_PrintModel_PrintModel.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/math/clad/files/patch-demos_ErrorEstimation_PrintModel_PrintModel.cpp b/math/clad/files/patch-demos_ErrorEstimation_PrintModel_PrintModel.cpp
new file mode 100644
index 000000000000..ba2ae07083d5
--- /dev/null
+++ b/math/clad/files/patch-demos_ErrorEstimation_PrintModel_PrintModel.cpp
@@ -0,0 +1,16 @@
+- workaround for errors like:
+- ld: error: undefined reference due to --no-allow-shlib-undefined: __progname
+- >>> referenced by /lib/libc.so.7
+
+--- demos/ErrorEstimation/PrintModel/PrintModel.cpp.orig 2023-07-18 14:54:11 UTC
++++ demos/ErrorEstimation/PrintModel/PrintModel.cpp
+@@ -4,6 +4,9 @@
+ #include "PrintModel.h"
+ #include "clad/Differentiator/CladUtils.h"
+
++char **environ = nullptr;
++const char *__progname = "x";
++
+ // Here we use the BuildOp function provided by clad to build a multiplication
+ // expression that clad can generate code for.
+ clang::Expr* PrintModel::AssignError(clad::StmtDiff refExpr,