[uClibc] Buildroot issues with gcc 2.95.3
James A. Beaulieu
beaulieu at ti.com
Wed Feb 4 16:47:33 UTC 2004
Greetings.
I am trying to build a new toolchain using gcc 2.95.3 to add c++ support to
our system, and I seem to be running into problems. I downloaded both the
toolchain and buildroot packages from CVS on 2/3/2004. I am building for
mipsel.
I would prefer to build a 2.95.3 compiler. When building either the toolchain
or buildroot with gcc 2.95.3, I get an the following errors
gcc -c -DCROSS_COMPILE -DIN_GCC -DUSE_UCLIBC -g -O2 -DHAVE_CONFIG_H -I.
-I/home/a0850426/cli/buildroot/toolchain_build_mipsel/gcc-20011006/gcc
-I/home/a0850426/cli/buildroot/toolchain_build_mipsel/gcc-20011006/gcc/config
-I/home/a0850426/cli/buildroot/toolchain_build_mipsel/gcc-20011006/gcc/../include
underscore.c
rm -f collect2
gcc -DCROSS_COMPILE -DIN_GCC -DUSE_UCLIBC -g -O2 -DHAVE_CONFIG_H -o
collect2 collect2.o tlink.o hash.o intl.o underscore.o version.o obstack.o
../libiberty/libiberty.a
../libiberty/libiberty.a(choose-temp.o)(.text+0x114): In function
`choose_temp_base':
/home/a0850426/cli/buildroot/toolchain_build_mipsel/gcc-20011006/libiberty/choose-temp.c:138:
the use of `mktemp' is dangerous, better use `mkstemp'
cp xgcc gcc-cross
/home/a0850426/cli/buildroot/toolchain_build_mipsel/gcc2_95-initial/gcc/xgcc
-B/home/a0850426/cli/buildroot/toolchain_build_mipsel/gcc2_95-initial/gcc/
-B/home/a0850426/cli/buildroot/build_mipsel/staging_dir/mipsel-linux-uclibc/bin/
-I/home/a0850426/cli/buildroot/build_mipsel/staging_dir/mipsel-linux-uclibc/include
-dumpspecs > tmp-specs
mv tmp-specs specs
touch stmp-headers
mv libgcc1.a libgcc1.cross || (echo You must find a way to make libgcc1.a;
false)
mv: can't stat source libgcc1.a
You must find a way to make libgcc1.a
make[2]: *** [libgcc1.cross] Error 1
make[2]: Leaving directory
`/home/a0850426/cli/buildroot/toolchain_build_mipsel/gcc2_95-initial/gcc'
make[1]: *** [all-gcc] Error 2
make[1]: Leaving directory
`/home/a0850426/cli/buildroot/toolchain_build_mipsel/gcc2_95-initial'
yet, the file gcc/config/mips/t-mips specifically mentions that it does not
need to build libgcc1.a
Should I just touch an empty libgcc1.a, or make an empty libgcc1.a with ar?
I will try to build a 3.3.2 gcc version next. But based on my experience, the
3.2.2 compiler builds bigger executables then 2.95.3.
Thanks in advance.
Jim
P.S.
Here are the top portions of the Makefiles:
ToolChain:
# What sortof target system shall we compile this for?
#ARCH:=i386
#ARCH:=arm
#ARCH:=mips
ARCH:=mipsel
#ARCH:=powerpc
#ARCH:=sh4
# Busybox link failing due to needing libgcc functions that are statics.
#ARCH:=cris
# The following currently fail to build since no shared lib support.
#ARCH:=sh64
#ARCH:=m68k
#ARCH:=v850
#ARCH:=sparc
#ARCH:=whatever
# Enable this to use the uClibc daily snapshot instead of a released
# version. Daily snapshots may contain new features and bugfixes. Or
# they may not even compile at all, depending on what Erik is doing...
USE_UCLIBC_SNAPSHOT:=true
# Enable large file (files > 2 GB) support
BUILD_WITH_LARGEFILE:=false
# Command used to download source code
WGET:=wget --passive-ftp
# Optimize toolchain for which type of CPU?
OPTIMIZE_FOR_CPU=$(ARCH)
# Note... gcc 2.95 does not seem to like anything higher than i586.
#OPTIMIZE_FOR_CPU=i586
#OPTIMIZE_FOR_CPU=whatever
# Soft floating point options.
# Notes:
# Currently builds with gcc 3.3 for arm, mips, mipsel, powerpc.
# (i386 support will be added back in at some point.)
# Only tested with multilib enabled.
# For i386, long double is the same as double (64 bits). While this
# is unusual for x86, it seemed the best approach considering the
# limitations in the gcc floating point emulation library.
# For arm, soft float uses the usual libfloat routines.
# Custom specs files are used to set the default gcc mode to soft float
# as a convenience, since you shouldn't link hard and soft float
# together. In fact, arm won't even let you.
# (Un)comment the appropriate line below.
SOFT_FLOAT:=false
TARGET_OPTIMIZATION=-Os
TARGET_DEBUGGING= #-g
# Any additional gcc options you may want to include....
EXTRA_GCC_CONFIG_OPTIONS:=
# Enable the following if you want locale/gettext/i18n support.
# NOTE! Currently the pregnerated locale stuff only works for x86!
ENABLE_LOCALE:=false
# If you want multilib enabled, enable this...
MULTILIB:=--enable-multilib
# Build/install c++ compiler and libstdc++?
INSTALL_LIBSTDCPP:=true
# For SMP machines some stuff can be run in parallel
#JLEVEL=-j3
Buildroot:
# What sortof target system shall we compile this for?
#ARCH:=i386
#ARCH:=arm
#ARCH:=mips
ARCH:=mipsel
#ARCH:=powerpc
#ARCH:=sh4
# Busybox link failing due to needing libgcc functions that are statics.
#ARCH:=cris
# The following currently fail to build since no shared lib support.
#ARCH:=sh64
#ARCH:=m68k
#ARCH:=v850
#ARCH:=sparc
#ARCH:=whatever
# If you are building a native gcc toolchain, do you want to
# build the old gcc-2.95 based toolchain, or would you prefer
# a nice and shiny new gcc-3.3.2 toolchain?
# WARNING -- 2.95 currently only builds for i386, arm, mips*, and powerpc.
# WARNING -- 2.95 does not currently build natively for the target.
GCC_2_95_TOOLCHAIN:=true
# Enable this to use the uClibc daily snapshot instead of a released
# version. Daily snapshots may contain new features and bugfixes. Or
# they may not even compile at all, depending on what Erik is doing...
USE_UCLIBC_SNAPSHOT:=true
# Enable this to use the busybox daily snapshot instead of a released
# version. Daily snapshots may contain new features and bugfixes. Or
# they may not even compile at all....
USE_BUSYBOX_SNAPSHOT:=true
# Enable large file (files > 2 GB) support
BUILD_WITH_LARGEFILE:=true
# Command used to download source code
WGET:=wget --passive-ftp
# Optimize toolchain for which type of CPU?
OPTIMIZE_FOR_CPU=$(ARCH)
#OPTIMIZE_FOR_CPU=i686
# Note... gcc 2.95 does not seem to like anything higher than i586.
#OPTIMIZE_FOR_CPU=i586
#OPTIMIZE_FOR_CPU=whatever
# Soft floating point options.
# Notes:
# Currently builds with gcc 3.3 for arm, mips, mipsel, powerpc.
# (i386 support will be added back in at some point.)
# Only tested with multilib enabled.
# For i386, long double is the same as double (64 bits). While this
# is unusual for x86, it seemed the best approach considering the
# limitations in the gcc floating point emulation library.
# For arm, soft float uses the usual libfloat routines.
# Custom specs files are used to set the default gcc mode to soft float
# as a convenience, since you shouldn't link hard and soft float
# together. In fact, arm won't even let you.
# (Un)comment the appropriate line below.
#SOFT_FLOAT:=true
SOFT_FLOAT:=false
TARGET_OPTIMIZATION=-Os
TARGET_DEBUGGING= #-g
# Any additional gcc options you may want to include....
EXTRA_GCC_CONFIG_OPTIONS:=
# Enable the following if you want locale/gettext/i18n support.
# NOTE! Currently the pregnerated locale stuff only works for x86!
#ENABLE_LOCALE:=true
ENABLE_LOCALE:=false
# If you want multilib enabled, enable this...
MULTILIB:=--enable-multilib
# Build/install c++ compiler and libstdc++?
INSTALL_LIBSTDCPP:=true
# For SMP machines some stuff can be run in parallel
#JLEVEL=-j3
More information about the uClibc
mailing list