This is the mail archive of the crossgcc@sourceware.cygnus.com mailing list for the crossgcc project.
See the CrossGCC FAQ for lots more infromation.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Tseng Chou Ming wrote:
> How can i enable "-msoft-float" for mipsel-linux-gcc?
> I tried to use "configure --nfp" but it doesn't work
The '-msoft-float' needs the 'fp-bit.c' / 'dp-bit.c' routines
for 'libgcc.a'. These are used now for the embedded 'mips-elf' and
'mips-ecoff' targets, but seemingly not for the 'system' targets.
I would suggest you trying the following:
1. add a new line to the current 'mips*-linux' config entry (in gcc/configure),
for a new 'tmake_file' of your own :
------------ mips*-linux entry -----------------------------
mips*-*-linux*) # Linux MIPS, either endian.
+ tmake_file=t-linux
xmake_file=x-linux
xm_file="xm-siglist.h ${xm_file}"
case $machine in
mipsel-*) tm_file="mips/elfl.h mips/linux.h" ;;
*) tm_file="mips/elf.h mips/linux.h" ;;
esac
extra_parts="crtbegin.o crtend.o"
gnu_ld=yes
gas=yes
;;
------------ mips*-linux entry -----------------------------
The text in the 'tmake_file' will be included to the resulted 'Makefile'
while running 'configure'...
Then add the new 'gcc/config/t-linux', using the 'gcc/config/t-elf' as
a template (strongly stripped) :
------------ t-linux -----------------------------
# We have a premade insn-attrtab.c to save the hour it takes to run genattrtab.
# PREMADE_ATTRTAB = $(srcdir)/config/mips/mips-at.c
# PREMADE_ATTRTAB_MD = $(srcdir)/config/mips/mips-at.md
# Suppress building libgcc1.a, since the MIPS compiler port is complete
# and does not need anything from libgcc1.a.
LIBGCC1 =
# fp-bit and dp-bit are really part of libgcc1, but this will cause
# them to be built correctly, so... [taken from t-sparclite]
LIB2FUNCS_EXTRA = fp-bit.c dp-bit.c
dp-bit.c: $(srcdir)/config/fp-bit.c
echo '#ifdef __MIPSEL__' > dp-bit.c
echo '#define FLOAT_BIT_ORDER_MISMATCH' >> dp-bit.c
echo '#endif' >> dp-bit.c
echo '#define US_SOFTWARE_GOFAST' >> dp-bit.c
cat $(srcdir)/config/fp-bit.c >> dp-bit.c
fp-bit.c: $(srcdir)/config/fp-bit.c
echo '#define FLOAT' > fp-bit.c
echo '#ifdef __MIPSEL__' >> fp-bit.c
echo '#define FLOAT_BIT_ORDER_MISMATCH' >> fp-bit.c
echo '#endif' >> fp-bit.c
echo '#define US_SOFTWARE_GOFAST' >> fp-bit.c
cat $(srcdir)/config/fp-bit.c >> fp-bit.c
# Build the libraries for both hard and soft floating point
MULTILIB_OPTIONS = msoft-float
MULTILIB_DIRNAMES = soft-float
MULTILIB_MATCHES =
LIBGCC = stmp-multilib
INSTALL_LIBGCC = install-multilib
------------ t-linux -----------------------------
Please compare this with the originally used, 'default', t-mips !!!
I didn't copy it and don't remember if the following lines :
# PREMADE_ATTRTAB = $(srcdir)/config/mips/mips-at.c
# PREMADE_ATTRTAB_MD = $(srcdir)/config/mips/mips-at.md
were with or without the comments there... The 't-linux' should
just be a superset of the 't-mips'...
You can consider adding still more variations for the libs, like
the '-mips3', just look at the 't-elf'... The default is probably
still R3000...
The extra libs will be installed into the subdirs mentioned in the
'MULTILIB_DIRNAMES', one name for each option in 'MULTILIB_OPTIONS'.
And 'gcc' will add the right '-L xxxx' for the used '-mxxxx' option.
(Here if you use '-msoft-float', the 'ld' command line will be put
to search first in the 'soft-float' subdir.)
Cheers, Kai
------
Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |