aboutsummaryrefslogtreecommitdiff
path: root/math/sage/files/gcc.in
diff options
context:
space:
mode:
Diffstat (limited to 'math/sage/files/gcc.in')
-rw-r--r--math/sage/files/gcc.in13
1 files changed, 12 insertions, 1 deletions
diff --git a/math/sage/files/gcc.in b/math/sage/files/gcc.in
index 49bd6e419463..5bc7c71bb3da 100644
--- a/math/sage/files/gcc.in
+++ b/math/sage/files/gcc.in
@@ -1,3 +1,14 @@
#!/bin/sh
-%%CC%% %%CFLAGS%% $*
+# This is a wrapper to redirect compiler invokations to the port of gcc that
+# contains fortran. LDFLAGS needs to be added so that the linker knows where
+# to find the dynamic libraries.
+
+# If the compiler is invoked with the argument "-v", adding LDFLAGS to the
+# arguments results in an error which stops some packages being built.
+
+if [ "x$*" = "x-v" ]; then
+ exec %%CC%% "$@"
+else
+ exec %%CC%% %%LDFLAGS%% "$@"
+fi