This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
[conditional multilib patch] Re: mips-sgi-irix6.5 installation
- To: law at cygnus dot com
- Subject: [conditional multilib patch] Re: mips-sgi-irix6.5 installation
- From: Alexandre Oliva <oliva at dcc dot unicamp dot br>
- Date: 10 Apr 1999 10:26:04 -0300
- Cc: Cyril Fischer <fischerc at itam dot cas dot cz>, egcs at egcs dot cygnus dot com
- Cc: egcs-patches at egcs dot cygnus dot com
- References: <1006.923714773@upchuck>
On Apr 10, 1999, Jeffrey A Law <law@upchuck.cygnus.com> wrote:
> In message <orbtgxwoyu.fsf@dcc.unicamp.br>you write:
>> On Apr 9, 1999, Jeffrey A Law <law@upchuck.cygnus.com> wrote:
>> It seems that I'm not the only one affected by the lack of 64bit
>> libraries. Would anyone dislike a patch that would test whether
>> /usr/lib64/libc.so exists, and disable multilibs on IRIX6 if it does
>> not?
> Or if we could just disable the 64bit libraries in that case. But that's
> quite a bit more difficult :-)
Not really. Disabling multilib support within gcc would be quite
hard, but just testing whether a program can be linked with -mabi=64
is trivial, and we can thus avoid trying to create shared libraries
for this ABI. We could still create static ones, though, but they
wouldn't be of much use, so I'm inclined not to do it. How about the
attached patch?
--
Alexandre Oliva http://www.dcc.unicamp.br/~oliva IC-Unicamp, Brasil
{oliva,Alexandre.Oliva}@dcc.unicamp.br aoliva@{acm.org,computer.org}
oliva@{gnu.org,kaffe.org,{egcs,sourceware}.cygnus.com,samba.org}
*** E-mail about software projects will be forwarded to mailing lists
Index: ChangeLog
from Alexandre Oliva <oliva@dcc.unicamp.br>
* config-ml.in: On mips*-*-*, if multidirs contains mabi=64, try to
link a trivial program with -mabi=64. If it fails, remove mabi=64
from multidirs.
Index: config-ml.in
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/config-ml.in,v
retrieving revision 1.5
diff -u -r1.5 config-ml.in
--- config-ml.in 1998/10/08 23:34:45 1.5
+++ config-ml.in 1999/04/10 13:30:25
@@ -299,6 +299,28 @@
esac
done
fi
+ case " $multidirs " in
+ *" mabi=64 "*)
+ # We will not be able to create libraries with -mabi=64 if
+ # we cannot even link a trivial program. It usually
+ # indicates the 64bit libraries are missing.
+ if echo 'main() {}' > conftest.c &&
+ ${CC-gcc} -mabi=64 conftest.c -o conftest; then
+ :
+ else
+ echo Could not link program with -mabi=64, disabling it.
+ old_multidirs="${multidirs}"
+ multidirs=""
+ for x in ${old_multidirs}; do
+ case "$x" in
+ *mabi=64* ) : ;;
+ *) multidirs="${multidirs} ${x}" ;;
+ esac
+ done
+ fi
+ rm -f conftest.c conftest
+ ;;
+ esac
;;
powerpc*-*-* | rs6000*-*-*)
if [ x$enable_softfloat = xno ]