[Bug fortran/40583] automatic preprocessing for .F90 or .F95 files fails with cc1 error (output filename specified twice)
thomas dot orgis at awi dot de
gcc-bugzilla@gcc.gnu.org
Mon Jun 29 12:51:00 GMT 2009
------- Comment #2 from thomas dot orgis at awi dot de 2009-06-29 12:51 -------
Thanks for confirming that it _should_ work.
Now the question is: What is wrong with the installation on my system so that
it does not work?
I see that gfortran is apparently trying to preprocess the .F95 files, but that
cc1 call goes wrong.
Is this perhaps a problem with installing gcc, g++ and gfortran in separate
steps? I mean, the preprocessor itself does not have a problem with
f95-cpp-input ... so that does not seem so plausible.
This is essentially our gfortran install script -- is there something wrong
with that?
#!/bin/bash
sed -i -e "s/lib64/lib/" gcc/config/i386/linux64.h &&
if [[ $CROSS_INSTALL == on ]]; then
OPTS="--host=$HOST $OPTS"
else
OPTS="--build=$HOST $OPTS"
fi &&
cd $SOURCE_DIRECTORY.bld &&
$SOURCE_DIRECTORY/configure \
--prefix=${INSTALL_ROOT}/usr \
--libdir=${INSTALL_ROOT}/usr/lib \
--infodir=${INSTALL_ROOT}/usr/share/info \
--mandir=${INSTALL_ROOT}/usr/share/man \
--enable-threads=posix \
--with-system-zlib \
--enable-languages=f95 \
$GCC_MULTILIB \
$OPTS &&
make CFLAGS="$CFLAGS" BOOT_CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" \
profiledbootstrap-lean
# install part
cd $SOURCE_DIRECTORY.bld &&
make -C gcc lang.install-common lang.install-man &&
install -c gcc/f951 ${INSTALL_ROOT}/usr/libexec/gcc/$HOST/$VERSION/ &&
sedit 's,lib64,lib,' $HOST/libgfortran/Makefile &&
make -C $HOST/libgfortran/ install &&
# specs file stuff
local SPECSDIR=${INSTALL_ROOT}/usr/lib/gcc/$HOST/$VERSION &&
mkdir -p $SPECSDIR/specs-local &&
cp $SCRIPT_DIRECTORY/specs_fortran $SPECSDIR/specs-local
rm_source_dir $SOURCE_DIRECTORY.bld &&
local SPECSDIR=${INSTALL_ROOT}/usr/lib/gcc/$HOST/$VERSION &&
cat $SPECSDIR/specs-local/* > $SPECSDIR/specs
# end of script
The specs_fortran file, being incorporated into the common specs file looks
like that (I am wondering: Are we supposed to ship that file -- I did not write
the build script myself)?):
@f77-cpp-input:
cc1 -E -lang-fortran -traditional-cpp -D_LANGUAGE_FORTRAN %(cpp_options)
%{E|M|MM:%(cpp_debug_options)} %{!M:%{!MM:%{!E: -o %|.f |\n f951 %|.f
%{!ffree-form:-ffixed-form} %(cc1_options) %{J*} %{I*} -fpreprocessed
%{!fsyntax-only:%(invoke_as)}}}}
@f95-cpp-input:
cc1 -E -lang-fortran -traditional-cpp -D_LANGUAGE_FORTRAN %(cpp_options)
%{E|M|MM:%(cpp_debug_options)} %{!M:%{!MM:%{!E: -o %|.f95 |\n f951 %|.f95
%(cc1_options) %{J*} %{I*} -fpreprocessed %{!fsyntax-only:%(invoke_as)}}}}
@f77:
%{!E:f951 %i %{!ffree-form:-ffixed-form} %(cc1_options) %{J*} %{I*}
%{!fsyntax-only:%(invoke_as)}}
@f95:
%{!E:f951 %i %(cc1_options) %{J*} %{I*} %{!fsyntax-only:%(invoke_as)}}
.F:
@f77-cpp-input
.fpp:
@f77-cpp-input
.FPP:
@f77-cpp-input
.F90:
@f95-cpp-input
.F95:
@f95-cpp-input
.f:
@f77
.for:
@f77
.FOR:
@f77
.f90:
@f95
.f95:
@f95
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40583
More information about the Gcc-bugs
mailing list