ports/math/sage/files/gcc.in
2013-06-28 03:28:12 +00:00

14 lines
461 B
Bash

#!/bin/sh
# 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%% -Wl,--copy-dt-needed-entries "$@"
fi