Discussion:
Error building mips-sde-elf crosscompiler
Anders Montonen
2014-07-13 11:01:44 UTC
Permalink
Hi,

I am trying to build a GCC 4.9.0 toolchain targeting mips-sde-elf on a OS X 10.7 host. Building the first stage compiler works fine, but trying to build the final compiler always ends with an error.

The configure command was "../gcc-4.9.0/configure --prefix=/Users/anders/local --target=mips-sde-elf --disable-nls --with-gnu-as --with-gnu-ld --enable-languages=c,c++ --with-arch=mips32r2 --with-mips-plt --with-synci --with-llsc --with-newlib".

Any hints on what's going wrong?

Regards,
Anders Montonen
(please cc, not subscribed to list)

Running configure in multilib subdir el/mips64r2/sof/spram
pwd: /Users/anders/work/toolchain/gcc/4.9.0/mips-sde-elf/mips-sde-elf
mkdir el/mips64r2/sof/spram
configure: creating cache ./config.cache
checking build system type... x86_64-apple-darwin11.4.2
checking host system type... mips-sde-elf
checking for --enable-version-specific-runtime-libs... no
checking for a BSD-compatible install... /usr/bin/install -c
checking for gawk... gawk
checking for mips-sde-elf-ar... /Users/anders/local/mips-sde-elf/bin/ar
checking for mips-sde-elf-lipo... mips-sde-elf-lipo
checking for mips-sde-elf-nm... /Users/anders/work/toolchain/gcc/4.9.0/mips-sde-elf/./gcc/nm
checking for mips-sde-elf-ranlib... /Users/anders/local/mips-sde-elf/bin/ranlib
checking for mips-sde-elf-strip... /Users/anders/local/mips-sde-elf/bin/strip
checking whether ln -s works... yes
checking for mips-sde-elf-gcc... /Users/anders/work/toolchain/gcc/4.9.0/mips-sde-elf/./gcc/xgcc -B/Users/anders/work/toolchain/gcc/4.9.0/mips-sde-elf/./gcc/ -B/Users/anders/local/mips-sde-elf/bin/ -B/Users/anders/local/mips-sde-elf/lib/ -isystem /Users/anders/local/mips-sde-elf/include -isystem /Users/anders/local/mips-sde-elf/sys-include -EL -mips64r2 -msoft-float -mcode-readable=no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether /Users/anders/work/toolchain/gcc/4.9.0/mips-sde-elf/./gcc/xgcc -B/Users/anders/work/toolchain/gcc/4.9.0/mips-sde-elf/./gcc/ -B/Users/anders/local/mips-sde-elf/bin/ -B/Users/anders/local/mips-sde-elf/lib/ -isystem /Users/anders/local/mips-sde-elf/include -isystem /Users/anders/local/mips-sde-elf/sys-include -EL -mips64r2 -msoft-float -mcode-readable=no accepts -g... yes
checking for /Users/anders/work/toolchain/gcc/4.9.0/mips-sde-elf/./gcc/xgcc -B/Users/anders/work/toolchain/gcc/4.9.0/mips-sde-elf/./gcc/ -B/Users/anders/local/mips-sde-elf/bin/ -B/Users/anders/local/mips-sde-elf/lib/ -isystem /Users/anders/local/mips-sde-elf/include -isystem /Users/anders/local/mips-sde-elf/sys-include -EL -mips64r2 -msoft-float -mcode-readable=no option to accept ISO C89... none needed
checking how to run the C preprocessor... /Users/anders/work/toolchain/gcc/4.9.0/mips-sde-elf/./gcc/xgcc -B/Users/anders/work/toolchain/gcc/4.9.0/mips-sde-elf/./gcc/ -B/Users/anders/local/mips-sde-elf/bin/ -B/Users/anders/local/mips-sde-elf/lib/ -isystem /Users/anders/local/mips-sde-elf/include -isystem /Users/anders/local/mips-sde-elf/sys-include -EL -mips64r2 -msoft-float -mcode-readable=no -E
checking size of double... 8
checking size of long double... 8
checking whether decimal floating point is supported... no
configure: WARNING: decimal float is not supported for this target, ignored
checking whether fixed-point is supported... yes
checking whether to use setjmp/longjmp exceptions... no
checking if the linker (/Users/anders/work/toolchain/gcc/4.9.0/mips-sde-elf/./gcc/collect-ld) is GNU ld... yes
checking for thread model used by GCC... single
checking whether assembler supports CFI directives... yes
checking whether the target is hard-float... no
checking for __attribute__((visibility("hidden")))... yes
checking whether the target assembler supports thread-local storage... yes
checking whether the thread-local storage support is from emutls... no
checking for init priority support... yes
configure: updating cache ./config.cache
configure: creating ./config.status
config.status: creating Makefile
config.status: creating auto-target.h
config.status: linking ../../../../../../../gcc-4.9.0/libgcc/enable-execute-stack-empty.c to enable-execute-stack.c
config.status: linking ../../../../../../../gcc-4.9.0/libgcc/unwind-generic.h to unwind.h
config.status: linking ../../../../../../../gcc-4.9.0/libgcc/config/no-unwind.h to md-unwind-support.h
config.status: linking ../../../../../../../gcc-4.9.0/libgcc/config/mips/sfp-machine.h to sfp-machine.h
config.status: linking ../../../../../../../gcc-4.9.0/libgcc/gthr-single.h to gthr-default.h
config.status: executing default commands
Adding multilib support to Makefile in ../../../../../../../gcc-4.9.0/libgcc
with_multisubdir=el/mips64r2/sof/spram
# If this is the top-level multilib, build all the other
# multilibs.
if [ -z "el mips32 mips32r2 mips64 mips64r2 mips16 micromips sof spram sof/spram mips16/sof mips16/spram mips16/sof/spram micromips/sof micromips/spram micromips/sof/spram mips32/mips16 mips32/micromips mips32/sof mips32/spram mips32/sof/spram mips32/mips16/sof mips32/mips16/spram mips32/mips16/sof/spram mips32/micromips/sof mips32/micromips/spram mips32/micromips/sof/spram mips32r2/mips16 mips32r2/micromips mips32r2/sof mips32r2/f64 mips32r2/spram mips32r2/sof/spram mips32r2/f64/spram mips32r2/mips16/sof mips32r2/mips16/f64 mips32r2/mips16/spram mips32r2/mips16/sof/spram mips32r2/mips16/f64/spram mips32r2/micromips/sof mips32r2/micromips/f64 mips32r2/micromips/spram mips32r2/micromips/sof/spram mips32r2/micromips/f64/spram mips64/sof mips64/spram mips64/sof/spram mips64r2/sof mips64r2/spram mips64r2/sof/spram el/mips32 el/mips32r2 el/mips64 el/mips64r2 el/mips16 el/micromips el/sof el/spram el/sof/spram el/mips16/sof el/mips16/spram el/mips16/sof/spram el/micromips/sof el/micromips/spram el/micromips/sof/spram el/mips32/mips16 el/mips32/micromips el/mips32/sof el/mips32/spram el/mips32/sof/spram el/mips32/mips16/sof el/mips32/mips16/spram el/mips32/mips16/sof/spram el/mips32/micromips/sof el/mips32/micromips/spram el/mips32/micromips/sof/spram el/mips32r2/mips16 el/mips32r2/micromips el/mips32r2/sof el/mips32r2/f64 el/mips32r2/spram el/mips32r2/sof/spram el/mips32r2/f64/spram el/mips32r2/mips16/sof el/mips32r2/mips16/f64 el/mips32r2/mips16/spram el/mips32r2/mips16/sof/spram el/mips32r2/mips16/f64/spram el/mips32r2/micromips/sof el/mips32r2/micromips/f64 el/mips32r2/micromips/spram el/mips32r2/micromips/sof/spram el/mips32r2/micromips/f64/spram el/mips64/sof el/mips64/spram el/mips64/sof/spram el/mips64r2/sof el/mips64r2/spram el/mips64r2/sof/spram" ]; then \
true; \
else \
rootpre=`${PWDCMD-pwd}`/; export rootpre; \
srcrootpre=`cd ../../../gcc-4.9.0/libgcc; ${PWDCMD-pwd}`/; export srcrootpre; \
lib=`echo "${rootpre}" | sed -e 's,^.*/\([^/][^/]*\)/$,\1,'`; \
compiler="/Users/anders/work/toolchain/gcc/4.9.0/mips-sde-elf/./gcc/xgcc -B/Users/anders/work/toolchain/gcc/4.9.0/mips-sde-elf/./gcc/ -B/Users/anders/local/mips-sde-elf/bin/ -B/Users/anders/local/mips-sde-elf/lib/ -isystem /Users/anders/local/mips-sde-elf/include -isystem /Users/anders/local/mips-sde-elf/sys-include "; \
for i in `${compiler} --print-multi-lib 2>/dev/null`; do \
dir=`echo $i | sed -e 's/;.*$//'`; \
if [ "${dir}" = "." ]; then \
true; \
else \
if [ -d ../${dir}/${lib} ]; then \
flags=`echo $i | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`; \
if (cd ../${dir}/${lib}; make "AR=/Users/anders/local/mips-sde-elf/bin/ar" "AR_FLAGS=rc" "CC=/Users/anders/work/toolchain/gcc/4.9.0/mips-sde-elf/./gcc/xgcc -B/Users/anders/work/toolchain/gcc/4.9.0/mips-sde-elf/./gcc/ -B/Users/anders/local/mips-sde-elf/bin/ -B/Users/anders/local/mips-sde-elf/lib/ -isystem /Users/anders/local/mips-sde-elf/include -isystem /Users/anders/local/mips-sde-elf/sys-include " "CFLAGS=-g -O2 -Os -minterlink-mips16 -mcode-readable=pcrel -mno-gpopt" "DESTDIR=" "EXTRA_OFILES=" "HDEFINES=" "INSTALL=/usr/bin/install -c" "INSTALL_DATA=/usr/bin/install -c -m 644" "INSTALL_PROGRAM=/usr/bin/install -c" "LDFLAGS=" "LOADLIBES=" "RANLIB=/Users/anders/local/mips-sde-elf/bin/ranlib" "SHELL=/bin/sh" "prefix=/Users/anders/local" "exec_prefix=/Users/anders/local" "libdir=/Users/anders/local/lib" "libsubdir=/Users/anders/local/lib/gcc/mips-sde-elf/4.9.0" "tooldir=/Users/anders/local/mips-sde-elf" \
CFLAGS="-g -O2 -Os -minterlink-mips16 -mcode-readable=pcrel -mno-gpopt ${flags}" \
CCASFLAGS=" ${flags}" \
FCFLAGS=" ${flags}" \
FFLAGS=" ${flags}" \
ADAFLAGS=" ${flags}" \
prefix="/Users/anders/local" \
exec_prefix="/Users/anders/local" \
GCJFLAGS=" ${flags}" \
GOCFLAGS="-O2 -g ${flags}" \
CXXFLAGS="-g -O2 -Os -minterlink-mips16 -mcode-readable=pcrel -mno-gpopt ${flags}" \
LIBCFLAGS="-g -O2 -Os -minterlink-mips16 -mcode-readable=pcrel -mno-gpopt ${flags}" \
LIBCXXFLAGS="-g -O2 -Os -minterlink-mips16 -mcode-readable=pcrel -mno-gpopt -fno-implicit-templates ${flags}" \
LDFLAGS=" ${flags}" \
MULTIFLAGS="${flags}" \
DESTDIR="" \
INSTALL="/usr/bin/install -c" \
INSTALL_DATA="/usr/bin/install -c -m 644" \
INSTALL_PROGRAM="/usr/bin/install -c" \
INSTALL_SCRIPT="/usr/bin/install -c" \
all); then \
true; \
else \
exit 1; \
fi; \
else true; \
fi; \
fi; \
done; \
fi
# If this is the top-level multilib, build all the other
# multilibs.
DEFINES='' HEADERS='' \
../../../../gcc-4.9.0/libgcc/mkheader.sh > tmp-libgcc_tm.h
/bin/sh ../../../../gcc-4.9.0/libgcc/../move-if-change tmp-libgcc_tm.h libgcc_tm.h
echo timestamp > libgcc_tm.stamp
Mode = sf\|df
Suffix = si\|2\|3
/Users/anders/work/toolchain/gcc/4.9.0/mips-sde-elf/./gcc/xgcc -B/Users/anders/work/toolchain/gcc/4.9.0/mips-sde-elf/./gcc/ -B/Users/anders/local/mips-sde-elf/bin/ -B/Users/anders/local/mips-sde-elf/lib/ -isystem /Users/anders/local/mips-sde-elf/include -isystem /Users/anders/local/mips-sde-elf/sys-include -g -O2 -Os -minterlink-mips16 -mcode-readable=pcrel -mno-gpopt -EL -O2 -g -O2 -Os -minterlink-mips16 -mcode-readable=pcrel -mno-gpopt -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -Dinhibit_libc -I. -I. -I../../.././gcc -I../../../../gcc-4.9.0/libgcc -I../../../../gcc-4.9.0/libgcc/. -I../../../../gcc-4.9.0/libgcc/../gcc -I../../../../gcc-4.9.0/libgcc/../include -DHAVE_CC_TLS -o addsf3.o -MT addsf3.o -MD -MP -MF addsf3.dep addsf3 -c ../../../../gcc-4.9.0/libgcc/config/hardfp.c -fvisibility=hidden -DHIDE_EXPORTS -Wno-missing-prototypes
xgcc: error: addsf3: No such file or directory
make[4]: *** [addsf3.o] Error 1
make[3]: *** [multi-do] Error 1
make[2]: *** [all-multi] Error 2
make[1]: *** [all-target-libgcc] Error 2
make: *** [all] Error 2
Kai Ruottu
2014-07-13 17:04:45 UTC
Permalink
Post by Anders Montonen
Hi,
I am trying to build a GCC 4.9.0 toolchain targeting mips-sde-elf on a OS X 10.7 host. Building the first stage compiler works fine, but trying to build the final compiler always ends with an error.
What on earth "first stage" and "final" compilers? Cross GCCs for
embedded targets using newlib should
succeed in one build stage when the host CC is GCC, a native or a cross
one (Canadian Cross).
Post by Anders Montonen
The configure command was "../gcc-4.9.0/configure --prefix=/Users/anders/local --target=mips-sde-elf --disable-nls --with-gnu-as --with-gnu-ld --enable-languages=c,c++ --with-arch=mips32r2 --with-mips-plt --with-synci --with-llsc --with-newlib".
Any hints on what's going wrong?
/Users/anders/work/toolchain/gcc/4.9.0/mips-sde-elf/./gcc/xgcc -B/Users/anders/work/toolchain/gcc/4.9.0/mips-sde-elf/./gcc/ -B/Users/anders/local/mips-sde-elf/bin/ -B/Users/anders/local/mips-sde-elf/lib/ -isystem /Users/anders/local/mips-sde-elf/include -isystem /Users/anders/local/mips-sde-elf/sys-include
<clip>
Post by Anders Montonen
-DHAVE_CC_TLS -o addsf3.o -MT addsf3.o -MD -MP -MF addsf3.dep addsf3
Here is that bare "addsf3" on the compile line... I think a '-Daddsf3'
or something to select the right part of
'config/hardfp.c' should be here instead...
Post by Anders Montonen
-c ../../../../gcc-4.9.0/libgcc/config/hardfp.c -fvisibility=hidden -DHIDE_EXPORTS -Wno-missing-prototypes
xgcc: error: addsf3: No such file or directory
make[4]: *** [addsf3.o] Error 1
How it appeared on it is unclear... I can only repeat your build (in
only one stage) on my Linux system
(CentOS 6.5) and see what happens...
Kai Ruottu
2014-07-14 06:50:48 UTC
Permalink
Post by Anders Montonen
Post by Anders Montonen
Hi,
I am trying to build a GCC 4.9.0 toolchain targeting mips-sde-elf on
a OS X 10.7 host. Building the first stage compiler works fine, but
trying to build the final compiler always ends with an error.
/Users/anders/work/toolchain/gcc/4.9.0/mips-sde-elf/./gcc/xgcc
-B/Users/anders/work/toolchain/gcc/4.9.0/mips-sde-elf/./gcc/
-B/Users/anders/local/mips-sde-elf/bin/
-B/Users/anders/local/mips-sde-elf/lib/ -isystem
/Users/anders/local/mips-sde-elf/include -isystem
/Users/anders/local/mips-sde-elf/sys-include -g -O2 -Os
-minterlink-mips16 -mcode-readable=pcrel -mno-gpopt -EL -O2 -g -O2
-Os -minterlink-mips16 -mcode-readable=pcrel -mno-gpopt -DIN_GCC
-DCROSS_DIRECTORY_STRUCTURE -W -Wall -Wwrite-strings -Wcast-qual
-Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition
-isystem ./include -g -DIN_LIBGCC2 -fbuilding-libgcc
-fno-stack-protector -Dinhibit_libc -I. -I. -I../../.././gcc
-I../../../../gcc-4.9.0/libgcc -I../../../../gcc-4.9.0/libgcc/.
-I../../../../gcc-4.9.0/libgcc/../gcc
-I../../../../gcc-4.9.0/libgcc/../include -DHAVE_CC_TLS -o addsf3.o
-MT addsf3.o -MD -MP -MF addsf3.dep addsf3 -c
../../../../gcc-4.9.0/libgcc/config/hardfp.c -fvisibility=hidden
-DHIDE_EXPORTS -Wno-missing-prototypes
xgcc: error: addsf3: No such file or directory
How it appeared on it is unclear... I can only repeat your build (in
only one stage) on my Linux system
(CentOS 6.5) and see what happens...
When I tried the same (without that weird multi-stage build), I got
Post by Anders Montonen
/home/src/gcc-4.9.0/build/./gcc/xgcc
-B/home/src/gcc-4.9.0/build/./gcc/ -nostdinc
-B/home/src/gcc-4.9.0/build/mips-sde-elf/newlib/ -isystem
/home/src/gcc-4.9.0/build/mips-sde-elf/newlib/targ-include -isystem
/home/src/gcc-4.9.0/newlib/libc/include
-B/home/src/gcc-4.9.0/build/mips-sde-elf/libgloss/mips
-L/home/src/gcc-4.9.0/build/mips-sde-elf/libgloss/libnosys
-L/home/src/gcc-4.9.0/libgloss/mips -B/opt/cross/mips-sde-elf/bin/
-B/opt/cross/mips-sde-elf/lib/ -isystem
/opt/cross/mips-sde-elf/include -isystem
/opt/cross/mips-sde-elf/sys-include -g -O2 -Os -Os
-minterlink-mips16 -mcode-readable=pcrel -mno-gpopt -EL -O2 -g -O2
-Os -Os -minterlink-mips16 -mcode-readable=pcrel -mno-gpopt -DIN_GCC
-DCROSS_DIRECTORY_STRUCTURE -W -Wall -Wwrite-strings -Wcast-qual
-Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition
-isystem ./include -g -DIN_LIBGCC2 -fbuilding-libgcc
-fno-stack-protector -Dinhibit_libc -I. -I. -I../../.././gcc
-I../../../../libgcc -I../../../../libgcc/.
-I../../../../libgcc/../gcc -I../../../../libgcc/../include
-DHAVE_CC_TLS -o addsf3.o -MT addsf3.o -MD -MP -MF addsf3.dep
-DFUNC=__addsf3 -DOP_add3 -DTYPE=sf -c
../../../../libgcc/config/hardfp.c -fvisibility=hidden -DHIDE_EXPORTS
-Wno-missing-prototypes
Ie the "-DFUNC=__addsf3 -DOP_add3 -DTYPE=sf" instead of your bare
"addsf3" in the compile row...
The extra:

"-B/home/src/gcc-4.9.0/build/mips-sde-elf/newlib/ -isystem
/home/src/gcc-4.9.0/build/mips-sde-elf/newlib/targ-include -isystem
/home/src/gcc-4.9.0/newlib/libc/include
-B/home/src/gcc-4.9.0/build/mips-sde-elf/libgloss/mips
-L/home/src/gcc-4.9.0/build/mips-sde-elf/libgloss/libnosys
-L/home/src/gcc-4.9.0/libgloss/mips"

came from having 'newlib' and 'libgloss' from the newlib-2.1.0 sources
symlinked into the gcc-4.9.0 sources. Just
like the gmp, mpc and mpfr sources - building these for the target or
the host during the GCC build. This is what
I meaned with the "single stage" build...

Still I cannot say what causes your problem on a OS X 10.7 host....
Anders Montonen
2014-07-19 11:04:28 UTC
Permalink
Post by Anders Montonen
I am trying to build a GCC 4.9.0 toolchain targeting mips-sde-elf on a OS X 10.7 host. Building the first stage compiler works fine, but trying to build the final compiler always ends with an error.
What on earth "first stage" and "final" compilers? Cross GCCs for embedded targets using newlib should
succeed in one build stage when the host CC is GCC, a native or a cross one (Canadian Cross).
Call it a bootstrap compiler if you wish. Building in one stage produces the same error. GCC 4.9.1 also behaves the same.

Regards,
Anders Montonen
(please cc, not subscribed to list)
Kai Ruottu
2014-07-19 14:40:09 UTC
Permalink
Post by Anders Montonen
Post by Anders Montonen
I am trying to build a GCC 4.9.0 toolchain targeting mips-sde-elf on a OS X 10.7 host. Building the first stage compiler works fine, but trying to build the final compiler always ends with an error.
What on earth "first stage" and "final" compilers? Cross GCCs for embedded targets using newlib should
succeed in one build stage when the host CC is GCC, a native or a cross one (Canadian Cross).
Call it a bootstrap compiler if you wish. Building in one stage produces the same error. GCC 4.9.1 also behaves the same.
Yes, the problem isn't in the build method. My habit is to behave as a
dissident what comes to the weird
'crosstool*' methods borrowed from the 1917-1939 and later theories,
about avoiding everything which
is already made, here for the target (but not for the build or host)
system if there are sources for something.
Needing the prebuilt C library for a system target (one which has the
native GCC as the default type) during
the cross GCC build has been the reason why these multi-stage methods
were invented, in cases when the
target system (created from scratch) doesn't yet exist - there can be
hundreds of similar or compatible
systems already but one isn't allowed to borrow anything from them. But
when people use the same methods
with already existing targets like Linux distros which already have
their glibcs, X11-libs etc., things will become
really absurd when in these cases the cross GCC is only another
incarnation of the earlier native GCC, on another
host. And the build will happen in only one stage, usually with the
native GCC of the host system, making only
binutils and GCC targeted for the target. Everything else being copied
from the target system, not being rebuilt
from any sources. Similarly a cross GCC for an embedded target (no
native GCC for that) is aimed to be built
in only one stage, or at least should be possible always. Either with
an existing old target C library or if the
target C library is newlib, producing also it during the GCC build. Then
there are those '--without-headers' etc
options which allow one to build without any headers for the target seen
during the GCC build.

Ok, I tried the same as you: To produce a 'mips-sde-elf' targeted
crosstoolchain from scratch on my CentOS 6.5
x86_64 laptop build host but using a CentOS 5.8 i386 targeted cross GCC
(4.6) as the host GCC, ie producing
the toolchain binaries for a 32-bit system, not for the 64-bit build
system. Producing these for the native host
was expected to succeed just as well...

First I made only the host binaries, binutils and the bare GCC, the
latter with :

make all-gcc

No problems... Then the libgcc variations, quite many!, for the target,
'mips-sde-elf' :

make all-target-libgcc

Again no problems... But you seemingly had problems in this phase :(

Some time later I continued the build with "everything" :

make

and then with installing the produced stuff :

make install

The last two phases required a whole night! Expected things being ready
when waking up but it was still doing
the last libs... In any case there were no problems.

So it looks like that the Makefiles etc made vith the OS X native tools
don't work, making them right will fail
somehow... I don't know whether there is any quarantee for things
always working on a OS X build system.
Or for a Sun Solaris2, old SVR4, Cygwin, MinGW/MSYS etc. "Unix-like"
build systems. Generally I know nothing
about the OS X systems as the build systems. For Cygwin and MinGW,
Solaris2 etc. my habit has been to stay
with the surely working Linux build system and just make a
crosstoolchain for the required new host and then
use it when making things for that host. Making a crosstoolchain for OS
X has been some kind of black magic
some years ago though, maybe it would succeed now. Earlier the GNU
binutils didn't work for OS X/Darwin, Apple had its own "custom GCCs"
etc. which quite soon caused people to forget producing anything for
this host :(
So cross building toolchains for OS X host may still be a bad idea...

But if one produces a 'mips-sde-elf' targeted cross GCC on a Linux host
and on an OS X host, the only difference
between them should be only in what was produced during the binutils
build and during the 'make all-gcc' build.
Everything else being totally identical if the binutils and GCC sources
are just the same. So nothing disables you
to build a 'mips-sde-elf' targeted toolchain on some working Linux build
host and then only binutils and the bare
GCC on the OS X build host, and then copy the
'$prefix/mips-sde-elf/include', '$prefix/mips-sde-elf/lib' and the
'$prefix/lib/gcc/mips-sde-elf' from the Linux host to the OS X host.
Not wondering why building libgcc and most
probably all the other target libraries doesn't succeed on the OS X
host. Of course a bug report for this could be
nice it there are people who will try to get things to work also on the
OS X host...

Maybe replacing one or more of the original OS X native tools with
equivalent GNU tools is what should be done.
That one needs the GNU make is quite clearly told in the "GCC
Prerequisities" but there may be other tools to
check before the build system is the "expected one" and behaves as
expected...
Anders Montonen
2014-07-19 19:00:33 UTC
Permalink
So it looks like that the Makefiles etc made vith the OS X native tools don't work, making them right will fail
somehow... I don't know whether there is any quarantee for things always working on a OS X build system.
My installed tools fulfil GCC's documented prerequisites, and I can eg. build a sh-elf cross toolchain without problems.

Regards,
Anders Montonen
(please cc, not subscribed to list)

Loading...