This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

gfortran requires input files for linking?


Hi,

The libtool-2.2.8 testsuite fails some tests on darwin10 with gfortran because it makes use of Apple ld's -force_load flag to load all members of convenience archives. One of the tests creates link lines like:

gfortran -dynamiclib -Wl,-undefined -Wl,dynamic_lookup -o .libs/liba12.0.dylib -Wl,-force_load,./.libs/liba1.a -Wl,-force_load,./.libs/liba2.a -install_name /notexist/liba12.0.dylib -compatibility_version 1 -current_version 1.0 -Wl,-single_module

For which gfortran complains:
gfortran: no input files; unwilling to write output files

and exits with error.

On my linux system, it has a link line that, while similar, passes gfortran's test for input files:
gfortran -shared -Wl,--whole-archive ./.libs/liba1.a ./.libs/liba2.a -Wl,--no-whole-archive -L/usr/lib/gcc/i686-redhat-linux/4.4.4 -L/usr/lib/gcc/i686-redhat-linux/4.4.4/../../.. -lgfortranbegin -lgfortran -lm -lc -lgcc_s -Wl,-soname -Wl,liba12.so.0 -o .libs/liba12.so.0.0.0


The only difference being that the archives are not -Wl, quoted.

Would the maintainers accept a patch that either
a) removes any checking for input files
or
b) warns instead of errors if it sees no input files

and which would be preferred?

Thanks,
Peter


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]